diff --git a/atable/src/components/ATableLoading.vue b/atable/src/components/ATableLoading.vue new file mode 100644 index 00000000..d9bd32f8 --- /dev/null +++ b/atable/src/components/ATableLoading.vue @@ -0,0 +1,86 @@ + + + diff --git a/atable/src/components/ATableLoadingBar.vue b/atable/src/components/ATableLoadingBar.vue new file mode 100644 index 00000000..88ce0b31 --- /dev/null +++ b/atable/src/components/ATableLoadingBar.vue @@ -0,0 +1,81 @@ + + + diff --git a/atable/src/index.ts b/atable/src/index.ts index eb92709f..b8ad3810 100644 --- a/atable/src/index.ts +++ b/atable/src/index.ts @@ -5,6 +5,8 @@ import AExpansionRow from './components/AExpansionRow.vue' import ARow from './components/ARow.vue' import ATable from './components/ATable.vue' import ATableHeader from './components/ATableHeader.vue' +import ATableLoading from './components/ATableLoading.vue' +import ATableLoadingBar from './components/ATableLoadingBar.vue' import ATableModal from './components/ATableModal.vue' export { createTableStore } from './stores/table' export type { @@ -28,7 +30,9 @@ function install(app: App /* options */) { app.component('ARow', ARow) app.component('ATable', ATable) app.component('ATableHeader', ATableHeader) + app.component('ATableLoading', ATableLoading) + app.component('ATableLoadingBar', ATableLoadingBar) app.component('ATableModal', ATableModal) } -export { install, ACell, AExpansionRow, ARow, ATable, ATableHeader, ATableModal } +export { install, ACell, AExpansionRow, ARow, ATable, ATableHeader, ATableLoading, ATableModal } diff --git a/common/changes/@stonecrop/atable/feat-atable-loading-gradient_2024-12-17-17-16.json b/common/changes/@stonecrop/atable/feat-atable-loading-gradient_2024-12-17-17-16.json new file mode 100644 index 00000000..050ac312 --- /dev/null +++ b/common/changes/@stonecrop/atable/feat-atable-loading-gradient_2024-12-17-17-16.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/atable", + "comment": "added atable loading component", + "type": "patch" + } + ], + "packageName": "@stonecrop/atable" +} \ No newline at end of file diff --git a/common/changes/@stonecrop/themes/feat-atable-loading-gradient_2024-12-17-17-16.json b/common/changes/@stonecrop/themes/feat-atable-loading-gradient_2024-12-17-17-16.json new file mode 100644 index 00000000..2ca286eb --- /dev/null +++ b/common/changes/@stonecrop/themes/feat-atable-loading-gradient_2024-12-17-17-16.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@stonecrop/themes", + "comment": "added rgb variable for loading gradient color", + "type": "patch" + } + ], + "packageName": "@stonecrop/themes" +} \ No newline at end of file diff --git a/common/reviews/api/atable.api.md b/common/reviews/api/atable.api.md index c45b61cd..9bd2d7c4 100644 --- a/common/reviews/api/atable.api.md +++ b/common/reviews/api/atable.api.md @@ -10,6 +10,7 @@ import { App } from 'vue'; import ARow from './components/ARow.vue'; import ATable from './components/ATable.vue'; import ATableHeader from './components/ATableHeader.vue'; +import ATableLoading from './components/ATableLoading.vue'; import ATableModal from './components/ATableModal.vue'; import { ComputedRef } from 'vue'; import { CSSProperties } from 'vue'; @@ -26,6 +27,8 @@ export { ATable } export { ATableHeader } +export { ATableLoading } + export { ATableModal } // @public diff --git a/examples/atable/default.story.vue b/examples/atable/default.story.vue index 533aa47c..61ce86f7 100644 --- a/examples/atable/default.story.vue +++ b/examples/atable/default.story.vue @@ -12,6 +12,11 @@ + + Loading +
+ Loading +
@@ -21,6 +26,19 @@ import { reactive } from 'vue' import rows from './sample_data/http_logs.json' +const empty_rows = [ + { + home_page: { + title: 'https://ceara.berlin', + url: 'https://ceara.berlin', + }, + http_method: 'HEAD', + ip_address: '75.228.138.84', + report_date: 1580804064118.311, + status: '503 Service Unavailable', + }, +] + const columns: TableColumn[] = [ { label: 'Home Page', diff --git a/themes/default/_variables.css b/themes/default/_variables.css index 53c0581a..a1c17d23 100644 --- a/themes/default/_variables.css +++ b/themes/default/_variables.css @@ -55,6 +55,7 @@ --sc-atable-row-padding: 0.125rem; --sc-atable-row-height: 1.5em; --sc-atable-cell-border-width: 2px; + --sc-table-loading-color: 204, 204, 204; /* BTNS */ --sc-btn-border: #cccccc;