diff --git a/atomic/_old_structure/ts/components/Activity/ActivityDashboard.vue b/atomic/_old_structure/ts/components/Activity/ActivityDashboard.vue index 7062172..f86a688 100644 --- a/atomic/_old_structure/ts/components/Activity/ActivityDashboard.vue +++ b/atomic/_old_structure/ts/components/Activity/ActivityDashboard.vue @@ -11,7 +11,7 @@ :loading="loading" />
-

- {{ articles?.length }} -

+
-

- Articles -

+ text="Articles" + />
-

- {{ contacts?.length }} -

+
-

- Contacts -

+ text="Contacts" + />
-

- {{ users?.length }} -

+ +
-

- Users -

+
@@ -84,17 +88,17 @@ diff --git a/atomic/_old_structure/ts/components/Admin/ArticleDashboard.vue b/atomic/_old_structure/ts/components/Admin/ArticleDashboard.vue index 4189cfc..9c0cd25 100644 --- a/atomic/_old_structure/ts/components/Admin/ArticleDashboard.vue +++ b/atomic/_old_structure/ts/components/Admin/ArticleDashboard.vue @@ -1,7 +1,7 @@ diff --git a/atomic/_old_structure/ts/components/Auth/Register.vue b/atomic/_old_structure/ts/components/Auth/Register.vue index c1debfe..92f78bf 100644 --- a/atomic/_old_structure/ts/components/Auth/Register.vue +++ b/atomic/_old_structure/ts/components/Auth/Register.vue @@ -7,10 +7,9 @@
-

- Already have an account? + -

+
diff --git a/atomic/_old_structure/ts/components/Contact/ContactDashboard.vue b/atomic/_old_structure/ts/components/Contact/ContactDashboard.vue index 22813a4..f3b1794 100644 --- a/atomic/_old_structure/ts/components/Contact/ContactDashboard.vue +++ b/atomic/_old_structure/ts/components/Contact/ContactDashboard.vue @@ -11,7 +11,7 @@ :loading="loading" />
-

- Responsive web design was coined in 2010 by Ethan +

@@ -51,11 +52,11 @@ />
-

- Over 53% of internet users worldwide access the web +

@@ -74,12 +75,12 @@ />
-

- Google's implementation of mobile-first indexing in - 2018 underscored the importance of mobile-responsive - design, prioritizing mobile versions for indexing - and ranking. -

+
diff --git a/atomic/_old_structure/ts/components/Home/WhyUs.vue b/atomic/_old_structure/ts/components/Home/WhyUs.vue index 8bb62a9..5487397 100644 --- a/atomic/_old_structure/ts/components/Home/WhyUs.vue +++ b/atomic/_old_structure/ts/components/Home/WhyUs.vue @@ -38,7 +38,10 @@ diff --git a/atomic/atoms/Paragraph.vue b/atomic/atoms/Paragraph.vue new file mode 100644 index 0000000..c99f612 --- /dev/null +++ b/atomic/atoms/Paragraph.vue @@ -0,0 +1,12 @@ + + + diff --git a/atomic/atoms/Skeleton.vue b/atomic/atoms/Skeleton.vue new file mode 100644 index 0000000..9b2ae2a --- /dev/null +++ b/atomic/atoms/Skeleton.vue @@ -0,0 +1,17 @@ + + + diff --git a/atomic/atoms/atoms.ts b/atomic/atoms/atoms.ts index 661aaf8..263e66d 100644 --- a/atomic/atoms/atoms.ts +++ b/atomic/atoms/atoms.ts @@ -9,9 +9,11 @@ import { InputText, Item, Label, + Paragraph, ProgressBar, ProgressSpinner, RadioButton, + Skeleton, Toast, } from './' @@ -24,8 +26,10 @@ export default function registerAtoms(app: App): void { .component('input-text-atom', InputText) .component('item-atom', Item) .component('label-atom', Label) + .component('paragraph-atom', Paragraph) .component('progress-bar-atom', ProgressBar) .component('progress-spinner-atom', ProgressSpinner) .component('radio-button-atom', RadioButton) + .component('skeleton-atom', Skeleton) .component('toast-atom', Toast) } diff --git a/atomic/atoms/index.ts b/atomic/atoms/index.ts index c02f554..1704eae 100644 --- a/atomic/atoms/index.ts +++ b/atomic/atoms/index.ts @@ -8,7 +8,9 @@ export { default as Image } from './Image.vue' export { default as InputText } from './InputText.vue' export { default as Item } from './Item.vue' export { default as Label } from './Label.vue' +export { default as Paragraph } from './Paragraph.vue' export { default as ProgressBar } from './ProgressBar.vue' export { default as ProgressSpinner } from './ProgressSpinner.vue' export { default as RadioButton } from './RadioButton.vue' +export { default as Skeleton } from './Skeleton.vue' export { default as Toast } from './Toast.vue' diff --git a/atomic/bosons/constants/organisms/DataTable/columns.ts b/atomic/bosons/constants/organisms/DataTable/columns.ts index f7fc813..37706bb 100644 --- a/atomic/bosons/constants/organisms/DataTable/columns.ts +++ b/atomic/bosons/constants/organisms/DataTable/columns.ts @@ -1,43 +1,104 @@ -export const columns = { +import { ColumnsInterface } from 'atomic/bosons/types' + +export const columns: ColumnsInterface = { activity: [ - { field: 'id', header: 'ID', class: 'idActivityColumn' }, + { + field: 'id', + header: 'ID', + class: 'idActivityColumn', + sortable: true, + }, { field: 'description', header: 'Description', class: 'descriptionColumn', + sortable: true, }, { field: 'created_at', header: 'Created At', class: 'createdAtActivityColumn', + sortable: true, }, ], article: [ - { field: 'title', header: 'Title', class: 'titleColumn' }, + { + field: 'title', + header: 'Title', + class: 'titleColumn', + sortable: true, + }, { field: 'category', header: 'Category', class: 'categoryColumn desktopColumn', + sortable: true, + }, + { + field: 'created_at', + header: 'Created At', + class: 'createdAtColumn', + sortable: true, + }, + { + field: 'updated_at', + header: 'Updated At', + class: 'updatedAtColumn', + sortable: true, }, - { field: 'created_at', header: 'Created At', class: 'createdAtColumn' }, - { field: 'updated_at', header: 'Updated At', class: 'updatedAtColumn' }, ], contact: [ - { field: 'full_name', header: 'Full name', class: 'fullNameColumn' }, - { field: 'email', header: 'Email', class: 'emailColumn tabletColumn' }, + { + field: 'full_name', + header: 'Full name', + class: 'fullNameColumn', + sortable: true, + }, + { + field: 'email', + header: 'Email', + class: 'emailColumn tabletColumn', + sortable: true, + }, { field: 'birthday', header: 'Birthday', class: 'birthdayColumn desktopColumn', + sortable: true, + }, + { + field: 'created_at', + header: 'Created At', + class: 'createdAtColumn', + sortable: true, + }, + { + field: 'updated_at', + header: 'Updated At', + class: 'updatedAtColumn', + sortable: true, }, - { field: 'created_at', header: 'Created At', class: 'createdAtColumn' }, - { field: 'updated_at', header: 'Updated At', class: 'updatedAtColumn' }, ], user: [ - { field: 'name', header: 'Name', class: 'nameColumn' }, - { field: 'email', header: 'Email', class: 'emailColumn' }, - { field: 'role', header: 'Role', class: 'roleColumn' }, - { field: 'created_at', header: 'Created At', class: 'createdAtColumn' }, - { field: 'updated_at', header: 'Updated At', class: 'updatedAtColumn' }, + { field: 'name', header: 'Name', class: 'nameColumn', sortable: true }, + { + field: 'email', + header: 'Email', + class: 'emailColumn', + sortable: true, + }, + { field: 'role', header: 'Role', class: 'roleColumn', sortable: true }, + { + field: 'created_at', + header: 'Created At', + class: 'createdAtColumn', + sortable: true, + }, + { + field: 'updated_at', + header: 'Updated At', + class: 'updatedAtColumn', + sortable: true, + }, ], } diff --git a/atomic/bosons/styles/organisms/_index.scss b/atomic/bosons/styles/organisms/_index.scss index 5864595..66d96ed 100644 --- a/atomic/bosons/styles/organisms/_index.scss +++ b/atomic/bosons/styles/organisms/_index.scss @@ -1 +1,2 @@ +@use 'datatable'; @use 'dialog'; diff --git a/atomic/bosons/styles/organisms/datatable/_index.scss b/atomic/bosons/styles/organisms/datatable/_index.scss new file mode 100644 index 0000000..b361981 --- /dev/null +++ b/atomic/bosons/styles/organisms/datatable/_index.scss @@ -0,0 +1 @@ +@use 'skeleton'; diff --git a/atomic/bosons/styles/organisms/datatable/skeleton/_index.scss b/atomic/bosons/styles/organisms/datatable/skeleton/_index.scss new file mode 100644 index 0000000..a5a03a8 --- /dev/null +++ b/atomic/bosons/styles/organisms/datatable/skeleton/_index.scss @@ -0,0 +1,10 @@ +.skeletonDataTable { + td { + height: 49px; + padding: 5px 9px; + + .p-skeleton { + height: 30px !important; + } + } +} diff --git a/atomic/bosons/types/atoms/Paragraph/index.ts b/atomic/bosons/types/atoms/Paragraph/index.ts new file mode 100644 index 0000000..f1444d3 --- /dev/null +++ b/atomic/bosons/types/atoms/Paragraph/index.ts @@ -0,0 +1 @@ +export * from './interfaces' diff --git a/atomic/bosons/types/atoms/Paragraph/interfaces.ts b/atomic/bosons/types/atoms/Paragraph/interfaces.ts new file mode 100644 index 0000000..3fd49dc --- /dev/null +++ b/atomic/bosons/types/atoms/Paragraph/interfaces.ts @@ -0,0 +1,3 @@ +export interface ParagraphInterface { + text?: string | number +} diff --git a/atomic/bosons/types/atoms/Skeleton/index.ts b/atomic/bosons/types/atoms/Skeleton/index.ts new file mode 100644 index 0000000..f1444d3 --- /dev/null +++ b/atomic/bosons/types/atoms/Skeleton/index.ts @@ -0,0 +1 @@ +export * from './interfaces' diff --git a/atomic/bosons/types/atoms/Skeleton/interfaces.ts b/atomic/bosons/types/atoms/Skeleton/interfaces.ts new file mode 100644 index 0000000..62eb03f --- /dev/null +++ b/atomic/bosons/types/atoms/Skeleton/interfaces.ts @@ -0,0 +1,9 @@ +export interface SkeletonInterface { + shape?: 'circle' | 'rectangle' + size?: string + width?: string + height?: string + borderRadius?: string + animation?: 'none' | 'wave' + unstyled?: boolean +} diff --git a/atomic/bosons/types/atoms/index.ts b/atomic/bosons/types/atoms/index.ts index 52354de..97e1f56 100644 --- a/atomic/bosons/types/atoms/index.ts +++ b/atomic/bosons/types/atoms/index.ts @@ -5,7 +5,9 @@ export * from './Heading' export * from './Image' export * from './InputText' export * from './Label' +export * from './Paragraph' export * from './ProgressBar' export * from './ProgressSpinner' export * from './RadioButton' +export * from './Skeleton' export * from './Toast' diff --git a/atomic/_old_structure/ts/types/bootstrap.d.ts b/atomic/bosons/types/bootstrap.d.ts similarity index 100% rename from atomic/_old_structure/ts/types/bootstrap.d.ts rename to atomic/bosons/types/bootstrap.d.ts diff --git a/atomic/bosons/types/organisms/DataTable/interfaces.ts b/atomic/bosons/types/organisms/DataTable/interfaces.ts index 3669f2b..1145f8c 100644 --- a/atomic/bosons/types/organisms/DataTable/interfaces.ts +++ b/atomic/bosons/types/organisms/DataTable/interfaces.ts @@ -9,11 +9,32 @@ import { import { SelectedObjectType } from '@/types' export interface DataTableInterface { - data: any[] // eslint-disable-line @typescript-eslint/no-explicit-any - type: ObjectNameType + value: any[] // eslint-disable-line @typescript-eslint/no-explicit-any + rows?: number + type?: ObjectNameType loading: LoadingType actions?: ActionInterface - styles: ColorItemStyleInterface + styles?: ColorItemStyleInterface openDialog: OpenDialogFunctionType selectedObject?: SelectedObjectType } + +export interface DataTableSkeletonInterface { + rows: [] + loading: LoadingType + specificColumns: ColumnInterface[] +} + +export interface ColumnInterface { + field?: string + header?: string + class?: string + sortable?: boolean +} + +export interface ColumnsInterface { + activity: ColumnInterface[] + article: ColumnInterface[] + contact: ColumnInterface[] + user: ColumnInterface[] +} diff --git a/atomic/organisms/DataTable.vue b/atomic/organisms/DataTable/DataTable.vue similarity index 90% rename from atomic/organisms/DataTable.vue rename to atomic/organisms/DataTable/DataTable.vue index d1fe84b..f7affe3 100644 --- a/atomic/organisms/DataTable.vue +++ b/atomic/organisms/DataTable/DataTable.vue @@ -1,26 +1,24 @@ + diff --git a/atomic/organisms/DataTable/Skeleton.vue b/atomic/organisms/DataTable/Skeleton.vue new file mode 100644 index 0000000..d2a82a5 --- /dev/null +++ b/atomic/organisms/DataTable/Skeleton.vue @@ -0,0 +1,30 @@ + + + diff --git a/atomic/organisms/DataTable/index.ts b/atomic/organisms/DataTable/index.ts new file mode 100644 index 0000000..fe75e02 --- /dev/null +++ b/atomic/organisms/DataTable/index.ts @@ -0,0 +1,2 @@ +export { default as DataTable } from './DataTable.vue' +export { default as DataTableSkeleton } from './Skeleton.vue' diff --git a/atomic/organisms/index.ts b/atomic/organisms/index.ts index 6d63578..8379b4c 100644 --- a/atomic/organisms/index.ts +++ b/atomic/organisms/index.ts @@ -1,6 +1,7 @@ export { default as registerOrganisms } from './organisms' +export * from './DataTable' + export { default as Chart } from './Chart.vue' -export { default as DataTable } from './DataTable.vue' export { default as Dialog } from './Dialog.vue' export { default as Dock } from './Dock.vue' diff --git a/atomic/organisms/organisms.ts b/atomic/organisms/organisms.ts index 81342c8..d0f4e85 100644 --- a/atomic/organisms/organisms.ts +++ b/atomic/organisms/organisms.ts @@ -1,10 +1,27 @@ import { App } from 'vue' -import { Chart, DataTable, Dialog, Dock } from './' +import { Chart, DataTable, DataTableSkeleton, Dialog, Dock } from './' export default function registerOrganisms(app: App): void { - app.component('chart-organism', Chart) + app + /** + * Chart + */ + .component('chart-organism', Chart) + + /** + * DataTable + */ .component('data-table-organism', DataTable) + .component('data-table-skeleton', DataTableSkeleton) + + /** + * Dialog + */ .component('dialog-organism', Dialog) + + /** + * Dock + */ .component('dock-organism', Dock) } diff --git a/atomic/primevue.ts b/atomic/primevue.ts index 2b29d79..620100c 100644 --- a/atomic/primevue.ts +++ b/atomic/primevue.ts @@ -22,6 +22,7 @@ import Menu from 'primevue/menu' import ProgressBar from 'primevue/progressbar' import ProgressSpinner from 'primevue/progressspinner' import RadioButton from 'primevue/radiobutton' +import Skeleton from 'primevue/skeleton' import Textarea from 'primevue/textarea' import Toast from 'primevue/toast' @@ -60,6 +61,7 @@ export default function registerPrimeVue(app: App): void { .component('ProgressBar', ProgressBar) .component('ProgressSpinner', ProgressSpinner) .component('RadioButton', RadioButton) + .component('Skeleton', Skeleton) .component('Textarea', Textarea) .component('Toast', Toast) diff --git a/atomic/templates/Card/DataTable.vue b/atomic/templates/Card/DataTable.vue index 817a8ad..c9f2d88 100644 --- a/atomic/templates/Card/DataTable.vue +++ b/atomic/templates/Card/DataTable.vue @@ -22,14 +22,14 @@