nuxt-ui-tools 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +3 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +37 -0
- package/dist/runtime/dashboard/components/block/dashboard-block-state.d.vue.ts +12 -0
- package/dist/runtime/dashboard/components/block/dashboard-block-state.vue +59 -0
- package/dist/runtime/dashboard/components/block/dashboard-block-state.vue.d.ts +12 -0
- package/dist/runtime/dashboard/components/block/dashboard-data-table.d.vue.ts +9 -0
- package/dist/runtime/dashboard/components/block/dashboard-data-table.vue +47 -0
- package/dist/runtime/dashboard/components/block/dashboard-data-table.vue.d.ts +9 -0
- package/dist/runtime/dashboard/components/block/dashboard-ring.d.vue.ts +34 -0
- package/dist/runtime/dashboard/components/block/dashboard-ring.vue +91 -0
- package/dist/runtime/dashboard/components/block/dashboard-ring.vue.d.ts +34 -0
- package/dist/runtime/dashboard/components/block/dashboard-row-actions.d.vue.ts +13 -0
- package/dist/runtime/dashboard/components/block/dashboard-row-actions.vue +49 -0
- package/dist/runtime/dashboard/components/block/dashboard-row-actions.vue.d.ts +13 -0
- package/dist/runtime/dashboard/components/block/dashboard-skeleton.d.vue.ts +34 -0
- package/dist/runtime/dashboard/components/block/dashboard-skeleton.vue +312 -0
- package/dist/runtime/dashboard/components/block/dashboard-skeleton.vue.d.ts +34 -0
- package/dist/runtime/dashboard/components/charts/renderer.d.ts +43 -0
- package/dist/runtime/dashboard/components/charts/renderer.js +34 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.d.vue.ts +18 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.vue +45 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-donut-chart.vue.d.ts +18 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.d.vue.ts +14 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.vue +190 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-chart.vue.d.ts +14 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.d.vue.ts +13 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.vue +72 -0
- package/dist/runtime/dashboard/components/charts/unovis/dashboard-xy-marks.vue.d.ts +13 -0
- package/dist/runtime/dashboard/components/charts/unovis/xy-layers.d.ts +43 -0
- package/dist/runtime/dashboard/components/charts/unovis/xy-layers.js +60 -0
- package/dist/runtime/dashboard/components/dashboard-alerts.d.vue.ts +49 -0
- package/dist/runtime/dashboard/components/dashboard-alerts.vue +226 -0
- package/dist/runtime/dashboard/components/dashboard-alerts.vue.d.ts +49 -0
- package/dist/runtime/dashboard/components/dashboard-bar-chart.d.vue.ts +53 -0
- package/dist/runtime/dashboard/components/dashboard-bar-chart.vue +131 -0
- package/dist/runtime/dashboard/components/dashboard-bar-chart.vue.d.ts +53 -0
- package/dist/runtime/dashboard/components/dashboard-bars.d.vue.ts +49 -0
- package/dist/runtime/dashboard/components/dashboard-bars.vue +187 -0
- package/dist/runtime/dashboard/components/dashboard-bars.vue.d.ts +49 -0
- package/dist/runtime/dashboard/components/dashboard-card.d.vue.ts +47 -0
- package/dist/runtime/dashboard/components/dashboard-card.vue +316 -0
- package/dist/runtime/dashboard/components/dashboard-card.vue.d.ts +47 -0
- package/dist/runtime/dashboard/components/dashboard-combo-chart.d.vue.ts +52 -0
- package/dist/runtime/dashboard/components/dashboard-combo-chart.vue +128 -0
- package/dist/runtime/dashboard/components/dashboard-combo-chart.vue.d.ts +52 -0
- package/dist/runtime/dashboard/components/dashboard-donut-chart.d.vue.ts +48 -0
- package/dist/runtime/dashboard/components/dashboard-donut-chart.vue +216 -0
- package/dist/runtime/dashboard/components/dashboard-donut-chart.vue.d.ts +48 -0
- package/dist/runtime/dashboard/components/dashboard-feed.d.vue.ts +49 -0
- package/dist/runtime/dashboard/components/dashboard-feed.vue +238 -0
- package/dist/runtime/dashboard/components/dashboard-feed.vue.d.ts +49 -0
- package/dist/runtime/dashboard/components/dashboard-funnel.d.vue.ts +34 -0
- package/dist/runtime/dashboard/components/dashboard-funnel.vue +157 -0
- package/dist/runtime/dashboard/components/dashboard-funnel.vue.d.ts +34 -0
- package/dist/runtime/dashboard/components/dashboard-gauge.d.vue.ts +55 -0
- package/dist/runtime/dashboard/components/dashboard-gauge.vue +177 -0
- package/dist/runtime/dashboard/components/dashboard-gauge.vue.d.ts +55 -0
- package/dist/runtime/dashboard/components/dashboard-grid.d.vue.ts +38 -0
- package/dist/runtime/dashboard/components/dashboard-grid.vue +49 -0
- package/dist/runtime/dashboard/components/dashboard-grid.vue.d.ts +38 -0
- package/dist/runtime/dashboard/components/dashboard-legend.d.vue.ts +8 -0
- package/dist/runtime/dashboard/components/dashboard-legend.vue +37 -0
- package/dist/runtime/dashboard/components/dashboard-legend.vue.d.ts +8 -0
- package/dist/runtime/dashboard/components/dashboard-line-chart.d.vue.ts +46 -0
- package/dist/runtime/dashboard/components/dashboard-line-chart.vue +129 -0
- package/dist/runtime/dashboard/components/dashboard-line-chart.vue.d.ts +46 -0
- package/dist/runtime/dashboard/components/dashboard-list.d.vue.ts +63 -0
- package/dist/runtime/dashboard/components/dashboard-list.vue +239 -0
- package/dist/runtime/dashboard/components/dashboard-list.vue.d.ts +63 -0
- package/dist/runtime/dashboard/components/dashboard-paired-bars.d.vue.ts +43 -0
- package/dist/runtime/dashboard/components/dashboard-paired-bars.vue +194 -0
- package/dist/runtime/dashboard/components/dashboard-paired-bars.vue.d.ts +43 -0
- package/dist/runtime/dashboard/components/dashboard-refresh.d.vue.ts +29 -0
- package/dist/runtime/dashboard/components/dashboard-refresh.vue +86 -0
- package/dist/runtime/dashboard/components/dashboard-refresh.vue.d.ts +29 -0
- package/dist/runtime/dashboard/components/dashboard-relative-time.d.vue.ts +12 -0
- package/dist/runtime/dashboard/components/dashboard-relative-time.vue +23 -0
- package/dist/runtime/dashboard/components/dashboard-relative-time.vue.d.ts +12 -0
- package/dist/runtime/dashboard/components/dashboard-stack-bar.d.vue.ts +36 -0
- package/dist/runtime/dashboard/components/dashboard-stack-bar.vue +162 -0
- package/dist/runtime/dashboard/components/dashboard-stack-bar.vue.d.ts +36 -0
- package/dist/runtime/dashboard/components/dashboard-stat.d.vue.ts +69 -0
- package/dist/runtime/dashboard/components/dashboard-stat.vue +279 -0
- package/dist/runtime/dashboard/components/dashboard-stat.vue.d.ts +69 -0
- package/dist/runtime/dashboard/components/dashboard-stats.d.vue.ts +38 -0
- package/dist/runtime/dashboard/components/dashboard-stats.vue +202 -0
- package/dist/runtime/dashboard/components/dashboard-stats.vue.d.ts +38 -0
- package/dist/runtime/dashboard/components/dashboard-table.d.vue.ts +52 -0
- package/dist/runtime/dashboard/components/dashboard-table.vue +305 -0
- package/dist/runtime/dashboard/components/dashboard-table.vue.d.ts +52 -0
- package/dist/runtime/dashboard/components/dashboard-tabs.d.vue.ts +35 -0
- package/dist/runtime/dashboard/components/dashboard-tabs.vue +55 -0
- package/dist/runtime/dashboard/components/dashboard-tabs.vue.d.ts +35 -0
- package/dist/runtime/dashboard/components/dashboard-total.d.vue.ts +10 -0
- package/dist/runtime/dashboard/components/dashboard-total.vue +32 -0
- package/dist/runtime/dashboard/components/dashboard-total.vue.d.ts +10 -0
- package/dist/runtime/dashboard/components/dashboard-widget.d.vue.ts +46 -0
- package/dist/runtime/dashboard/components/dashboard-widget.vue +84 -0
- package/dist/runtime/dashboard/components/dashboard-widget.vue.d.ts +46 -0
- package/dist/runtime/dashboard/composables/use-dashboard-api.d.ts +15 -0
- package/dist/runtime/dashboard/composables/use-dashboard-api.js +91 -0
- package/dist/runtime/dashboard/composables/use-dashboard-block.d.ts +22 -0
- package/dist/runtime/dashboard/composables/use-dashboard-block.js +35 -0
- package/dist/runtime/dashboard/composables/use-dashboard-chart.d.ts +36 -0
- package/dist/runtime/dashboard/composables/use-dashboard-chart.js +118 -0
- package/dist/runtime/dashboard/composables/use-dashboard-derived.d.ts +12 -0
- package/dist/runtime/dashboard/composables/use-dashboard-derived.js +47 -0
- package/dist/runtime/dashboard/composables/use-dashboard-format.d.ts +6 -0
- package/dist/runtime/dashboard/composables/use-dashboard-format.js +12 -0
- package/dist/runtime/dashboard/composables/use-dashboard-options.d.ts +8 -0
- package/dist/runtime/dashboard/composables/use-dashboard-options.js +63 -0
- package/dist/runtime/dashboard/composables/use-dashboard-param-scope.d.ts +30 -0
- package/dist/runtime/dashboard/composables/use-dashboard-param-scope.js +71 -0
- package/dist/runtime/dashboard/composables/use-dashboard-remote-options.d.ts +12 -0
- package/dist/runtime/dashboard/composables/use-dashboard-remote-options.js +117 -0
- package/dist/runtime/dashboard/composables/use-dashboard-resource.d.ts +35 -0
- package/dist/runtime/dashboard/composables/use-dashboard-resource.js +80 -0
- package/dist/runtime/dashboard/composables/use-dashboard-scope.d.ts +46 -0
- package/dist/runtime/dashboard/composables/use-dashboard-scope.js +127 -0
- package/dist/runtime/dashboard/composables/use-dashboard-time.d.ts +13 -0
- package/dist/runtime/dashboard/composables/use-dashboard-time.js +40 -0
- package/dist/runtime/dashboard/composables/use-dashboard-ui.d.ts +22 -0
- package/dist/runtime/dashboard/composables/use-dashboard-ui.js +19 -0
- package/dist/runtime/dashboard/composables/use-dashboard-views.d.ts +46 -0
- package/dist/runtime/dashboard/composables/use-dashboard-views.js +49 -0
- package/dist/runtime/dashboard/composables/use-dashboard.d.ts +24 -0
- package/dist/runtime/dashboard/composables/use-dashboard.js +42 -0
- package/dist/runtime/dashboard/constants/query.d.ts +16 -0
- package/dist/runtime/dashboard/constants/query.js +15 -0
- package/dist/runtime/dashboard/index.d.ts +4 -0
- package/dist/runtime/dashboard/index.js +3 -0
- package/dist/runtime/dashboard/schema/index.d.ts +57 -0
- package/dist/runtime/dashboard/schema/index.js +3 -0
- package/dist/runtime/dashboard/types/blocks.d.ts +251 -0
- package/dist/runtime/dashboard/types/blocks.js +0 -0
- package/dist/runtime/dashboard/types/charts.d.ts +60 -0
- package/dist/runtime/dashboard/types/charts.js +0 -0
- package/dist/runtime/dashboard/types/index.d.ts +7 -0
- package/dist/runtime/dashboard/types/index.js +0 -0
- package/dist/runtime/dashboard/types/options.d.ts +46 -0
- package/dist/runtime/dashboard/types/options.js +0 -0
- package/dist/runtime/dashboard/types/params.d.ts +115 -0
- package/dist/runtime/dashboard/types/params.js +0 -0
- package/dist/runtime/dashboard/types/resource.d.ts +106 -0
- package/dist/runtime/dashboard/types/resource.js +0 -0
- package/dist/runtime/dashboard/types/runtime.d.ts +44 -0
- package/dist/runtime/dashboard/types/runtime.js +0 -0
- package/dist/runtime/dashboard/types/schema.d.ts +171 -0
- package/dist/runtime/dashboard/types/schema.js +0 -0
- package/dist/runtime/dashboard/types/ui.d.ts +201 -0
- package/dist/runtime/dashboard/types/ui.js +0 -0
- package/dist/runtime/dashboard/utils/builders/dashboard-params.d.ts +85 -0
- package/dist/runtime/dashboard/utils/builders/dashboard-params.js +87 -0
- package/dist/runtime/dashboard/utils/chart-frame.d.ts +5 -0
- package/dist/runtime/dashboard/utils/chart-frame.js +27 -0
- package/dist/runtime/dashboard/utils/charts.d.ts +61 -0
- package/dist/runtime/dashboard/utils/charts.js +142 -0
- package/dist/runtime/dashboard/utils/comparison.d.ts +15 -0
- package/dist/runtime/dashboard/utils/comparison.js +19 -0
- package/dist/runtime/dashboard/utils/export.d.ts +13 -0
- package/dist/runtime/dashboard/utils/export.js +45 -0
- package/dist/runtime/dashboard/utils/options.d.ts +12 -0
- package/dist/runtime/dashboard/utils/options.js +23 -0
- package/dist/runtime/dashboard/utils/params/codecs.d.ts +14 -0
- package/dist/runtime/dashboard/utils/params/codecs.js +69 -0
- package/dist/runtime/dashboard/utils/resource.d.ts +16 -0
- package/dist/runtime/dashboard/utils/resource.js +39 -0
- package/dist/runtime/dashboard/utils/schema.d.ts +9 -0
- package/dist/runtime/dashboard/utils/schema.js +31 -0
- package/dist/runtime/dashboard/utils/sparkline.d.ts +21 -0
- package/dist/runtime/dashboard/utils/sparkline.js +53 -0
- package/dist/runtime/dashboard/utils/state.d.ts +28 -0
- package/dist/runtime/dashboard/utils/state.js +32 -0
- package/dist/runtime/dashboard/utils/time.d.ts +17 -0
- package/dist/runtime/dashboard/utils/time.js +60 -0
- package/dist/runtime/dashboard/utils/tracker.d.ts +12 -0
- package/dist/runtime/dashboard/utils/tracker.js +31 -0
- package/dist/runtime/dashboard/utils/ui.d.ts +38 -0
- package/dist/runtime/dashboard/utils/ui.js +24 -0
- package/dist/runtime/dashboard/utils/visibility.d.ts +2 -0
- package/dist/runtime/dashboard/utils/visibility.js +25 -0
- package/dist/runtime/form/components/root/form.vue +1 -1
- package/dist/runtime/form/composables/use-form-validation.d.ts +2 -3
- package/dist/runtime/form/composables/use-form-validation.js +24 -112
- package/dist/runtime/form/composables/use-form.js +1 -1
- package/dist/runtime/form/fields/password/component.vue +132 -28
- package/dist/runtime/form/fields/password/types.d.ts +6 -0
- package/dist/runtime/form/fields/text/component.vue +7 -2
- package/dist/runtime/form/types/field.d.ts +1 -1
- package/dist/runtime/form/types/options.d.ts +15 -36
- package/dist/runtime/form/types/validation.d.ts +3 -20
- package/dist/runtime/form/utils/state.d.ts +1 -14
- package/dist/runtime/form/utils/state.js +0 -199
- package/dist/runtime/i18n/locales/en.js +63 -0
- package/dist/runtime/i18n/locales/fr.js +63 -0
- package/dist/runtime/i18n/types.d.ts +68 -0
- package/dist/runtime/shared/index.d.ts +2 -0
- package/dist/runtime/shared/styles/tokens.css +1 -1
- package/dist/runtime/shared/types/query.d.ts +10 -0
- package/dist/runtime/shared/types/query.js +0 -0
- package/dist/runtime/shared/types/remote-options.d.ts +37 -0
- package/dist/runtime/shared/types/remote-options.js +0 -0
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.d.vue.ts +2 -2
- package/dist/runtime/spreadsheet/components/layout/spreadsheet-import-footer.vue.d.ts +2 -2
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-internals.d.ts +15 -15
- package/dist/runtime/spreadsheet/composables/use-spreadsheet-resolutions.d.ts +2 -2
- package/dist/runtime/spreadsheet/schema/normalize.d.ts +1 -1
- package/dist/runtime/spreadsheet/utils/references/sources.d.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-content.d.vue.ts +20 -18
- package/dist/runtime/table/components/data-list/data-list-content.vue +14 -87
- package/dist/runtime/table/components/data-list/data-list-content.vue.d.ts +20 -18
- package/dist/runtime/table/components/data-list/data-list-default.d.vue.ts +1 -4
- package/dist/runtime/table/components/data-list/data-list-default.vue.d.ts +1 -4
- package/dist/runtime/table/components/data-list/data-list-error-state.d.vue.ts +13 -0
- package/dist/runtime/table/components/data-list/data-list-error-state.vue +91 -0
- package/dist/runtime/table/components/data-list/data-list-error-state.vue.d.ts +13 -0
- package/dist/runtime/table/components/data-list/data-list-infinite-loader.d.vue.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-infinite-loader.vue.d.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-layout-switch.d.vue.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-layout-switch.vue +1 -1
- package/dist/runtime/table/components/data-list/data-list-layout-switch.vue.d.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-pagination.d.vue.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-pagination.vue.d.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-refresh.vue +42 -4
- package/dist/runtime/table/components/data-list/data-list-root.d.vue.ts +1 -9
- package/dist/runtime/table/components/data-list/data-list-root.vue.d.ts +1 -9
- package/dist/runtime/table/components/data-list/data-list-sort-menu.d.vue.ts +1 -1
- package/dist/runtime/table/components/data-list/data-list-sort-menu.vue +11 -5
- package/dist/runtime/table/components/data-list/data-list-sort-menu.vue.d.ts +1 -1
- package/dist/runtime/table/components/data-list/sort-menu-panel.d.vue.ts +2 -2
- package/dist/runtime/table/components/data-list/sort-menu-panel.vue.d.ts +2 -2
- package/dist/runtime/table/components/data-list.d.vue.ts +2 -13
- package/dist/runtime/table/components/data-list.vue.d.ts +2 -13
- package/dist/runtime/table/components/drawers/column-panel.vue +7 -2
- package/dist/runtime/table/components/filters/panel/filter-panel-chips.vue +2 -5
- package/dist/runtime/table/components/filters/panel/option-filter-panel-field.vue +1 -1
- package/dist/runtime/table/components/filters/shared/dynamic-filter-picker.d.vue.ts +2 -2
- package/dist/runtime/table/components/filters/shared/dynamic-filter-picker.vue +103 -101
- package/dist/runtime/table/components/filters/shared/dynamic-filter-picker.vue.d.ts +2 -2
- package/dist/runtime/table/components/filters/shared/filter-match-mode-button.d.vue.ts +1 -1
- package/dist/runtime/table/components/filters/shared/filter-match-mode-button.vue.d.ts +1 -1
- package/dist/runtime/table/components/filters/shared/filter-option-multiple-list.vue +2 -2
- package/dist/runtime/table/components/filters/shared/filter-option-picker-content.vue +3 -3
- package/dist/runtime/table/components/filters/shared/filter-option-single-list.vue +1 -1
- package/dist/runtime/table/components/filters/shared/filter-popover-shell.d.vue.ts +3 -3
- package/dist/runtime/table/components/filters/shared/filter-popover-shell.vue +17 -15
- package/dist/runtime/table/components/filters/shared/filter-popover-shell.vue.d.ts +3 -3
- package/dist/runtime/table/components/filters/shared/filter-searchable-panel.vue +10 -2
- package/dist/runtime/table/components/filters/sheet/filter-sheet.vue +4 -3
- package/dist/runtime/table/components/filters/tags/filter-tags-bar.vue +1 -1
- package/dist/runtime/table/components/grid/grid-renderer.vue +2 -4
- package/dist/runtime/table/components/layout/table-footer.d.vue.ts +1 -1
- package/dist/runtime/table/components/layout/table-footer.vue.d.ts +1 -1
- package/dist/runtime/table/components/table/table-cell-ellipsis.d.ts +1 -1
- package/dist/runtime/table/components/table/table-renderer.d.vue.ts +8 -2
- package/dist/runtime/table/components/table/table-renderer.vue +24 -6
- package/dist/runtime/table/components/table/table-renderer.vue.d.ts +8 -2
- package/dist/runtime/table/composables/use-option-filter-editor-state.d.ts +1 -0
- package/dist/runtime/table/composables/use-option-filter-editor-state.js +2 -2
- package/dist/runtime/table/composables/use-query-state.d.ts +3 -3
- package/dist/runtime/table/composables/use-table-actions.js +10 -5
- package/dist/runtime/table/composables/use-table-api.js +4 -1
- package/dist/runtime/table/composables/use-table-columns.d.ts +9 -5
- package/dist/runtime/table/composables/use-table-data.d.ts +2 -1
- package/dist/runtime/table/composables/use-table-data.js +19 -2
- package/dist/runtime/table/composables/use-table-filter-options.d.ts +1 -0
- package/dist/runtime/table/composables/use-table-filter-options.js +2 -1
- package/dist/runtime/table/composables/use-table-internals.d.ts +45 -33
- package/dist/runtime/table/composables/use-table-pagination.d.ts +2 -2
- package/dist/runtime/table/composables/use-table-selection.d.ts +1 -1
- package/dist/runtime/table/composables/use-table-state.d.ts +3 -3
- package/dist/runtime/table/types/actions.d.ts +3 -2
- package/dist/runtime/table/types/data-list.d.ts +8 -0
- package/dist/runtime/table/types/source.d.ts +14 -6
- package/dist/runtime/table/utils/builders/table-source.d.ts +14 -15
- package/dist/runtime/table/utils/client-query.d.ts +1 -1
- package/dist/runtime/table/utils/columns/menu.d.ts +1 -1
- package/dist/runtime/table/utils/columns/render.d.ts +13 -5
- package/dist/runtime/table/utils/columns/render.js +3 -2
- package/dist/runtime/table/utils/columns/state.d.ts +1 -1
- package/dist/runtime/table/utils/data-list-ui.d.ts +1 -1
- package/dist/runtime/table/utils/filters/editor-size.js +9 -9
- package/dist/runtime/table/utils/filters/options.js +6 -1
- package/dist/runtime/table/utils/index.d.ts +1 -0
- package/dist/runtime/table/utils/index.js +1 -0
- package/dist/runtime/table/utils/prefetch.js +5 -1
- package/dist/runtime/table/utils/source-request.d.ts +2 -0
- package/dist/runtime/table/utils/source-request.js +9 -0
- package/package.json +28 -1
package/dist/module.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
import { ModuleOptions as ModuleOptions$1 } from 'nuxt-viewport';
|
|
3
|
+
import { DashboardUiConfig } from '../dist/runtime/dashboard/types/index.js';
|
|
3
4
|
import { FormUiConfig } from '../dist/runtime/form/types/index.js';
|
|
4
5
|
import { DataListUiConfig } from '../dist/runtime/table/types/index.js';
|
|
5
6
|
|
|
@@ -9,12 +10,14 @@ declare module '@nuxt/schema' {
|
|
|
9
10
|
}
|
|
10
11
|
interface AppConfigInput {
|
|
11
12
|
nuxtUiTools?: {
|
|
13
|
+
dashboard?: DashboardUiConfig;
|
|
12
14
|
dataList?: DataListUiConfig;
|
|
13
15
|
form?: FormUiConfig;
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
interface AppConfig {
|
|
17
19
|
nuxtUiTools?: {
|
|
20
|
+
dashboard?: DashboardUiConfig;
|
|
18
21
|
dataList?: DataListUiConfig;
|
|
19
22
|
form?: FormUiConfig;
|
|
20
23
|
};
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -45,6 +45,36 @@ function getPublicComponents(runtimeDir, options) {
|
|
|
45
45
|
global: options.global,
|
|
46
46
|
name: `${prefix}DataList${part}`
|
|
47
47
|
})),
|
|
48
|
+
// Dashboard
|
|
49
|
+
...[
|
|
50
|
+
"Grid",
|
|
51
|
+
"Card",
|
|
52
|
+
"Stat",
|
|
53
|
+
"Stats",
|
|
54
|
+
"Gauge",
|
|
55
|
+
"Tabs",
|
|
56
|
+
"Refresh",
|
|
57
|
+
"Widget",
|
|
58
|
+
"List",
|
|
59
|
+
"Bars",
|
|
60
|
+
"PairedBars",
|
|
61
|
+
"Funnel",
|
|
62
|
+
"StackBar",
|
|
63
|
+
"BarChart",
|
|
64
|
+
"LineChart",
|
|
65
|
+
"ComboChart",
|
|
66
|
+
"DonutChart",
|
|
67
|
+
"Alerts",
|
|
68
|
+
"Feed",
|
|
69
|
+
"Table",
|
|
70
|
+
"Legend",
|
|
71
|
+
"Total",
|
|
72
|
+
"RelativeTime"
|
|
73
|
+
].map((part) => ({
|
|
74
|
+
filePath: `${runtimeDir}/dashboard/components/dashboard-${toKebabCase(part)}.vue`,
|
|
75
|
+
global: options.global,
|
|
76
|
+
name: `${prefix}Dashboard${part}`
|
|
77
|
+
})),
|
|
48
78
|
// Form
|
|
49
79
|
{
|
|
50
80
|
filePath: `${runtimeDir}/form/components/root/form.vue`,
|
|
@@ -120,6 +150,12 @@ function setupImports(runtimeDir) {
|
|
|
120
150
|
{ from: "table", name: "tableSource" },
|
|
121
151
|
{ from: "table", name: "useTable" }
|
|
122
152
|
]),
|
|
153
|
+
// Dashboard
|
|
154
|
+
...withRuntime(runtimeDir, [
|
|
155
|
+
{ from: "dashboard", name: "defineDashboardSchema" },
|
|
156
|
+
{ from: "dashboard", name: "useDashboard" },
|
|
157
|
+
{ from: "dashboard", name: "resolveDashboardComparisonRange" }
|
|
158
|
+
]),
|
|
123
159
|
// Form
|
|
124
160
|
...withRuntime(runtimeDir, [
|
|
125
161
|
{ from: "form", name: "defineFormField" },
|
|
@@ -299,6 +335,7 @@ const viewportDefaults = {
|
|
|
299
335
|
feature: "minWidth"
|
|
300
336
|
};
|
|
301
337
|
const publicRuntimeDomains = [
|
|
338
|
+
"dashboard",
|
|
302
339
|
"form",
|
|
303
340
|
"i18n",
|
|
304
341
|
"query-prefetch",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DashboardEmptyContent } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
kind: 'error' | 'empty';
|
|
4
|
+
empty?: DashboardEmptyContent;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
retry: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onRetry?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UButton from "@nuxt/ui/components/Button.vue";
|
|
3
|
+
import UIcon from "@nuxt/ui/components/Icon.vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
6
|
+
import { resolveTextValue } from "#ui-tools/shared/utils/render";
|
|
7
|
+
import { useDashboardUi } from "../../composables/use-dashboard-ui";
|
|
8
|
+
import { resolveDashboardClasses } from "../../utils/ui";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
kind: { type: String, required: true },
|
|
11
|
+
empty: { type: Object, required: false }
|
|
12
|
+
});
|
|
13
|
+
const emit = defineEmits(["retry"]);
|
|
14
|
+
const { t } = useUiToolsLocale();
|
|
15
|
+
const appUi = useDashboardUi();
|
|
16
|
+
const content = computed(
|
|
17
|
+
() => props.kind === "error" ? {
|
|
18
|
+
description: t("dashboard.states.errorDescription"),
|
|
19
|
+
icon: "i-lucide-cloud-alert",
|
|
20
|
+
title: t("dashboard.states.error")
|
|
21
|
+
} : {
|
|
22
|
+
description: resolveTextValue(props.empty?.description),
|
|
23
|
+
icon: props.empty?.icon ?? "i-lucide-chart-no-axes-column",
|
|
24
|
+
title: resolveTextValue(props.empty?.title, t("dashboard.states.empty"))
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const classes = computed(
|
|
28
|
+
() => resolveDashboardClasses(
|
|
29
|
+
{
|
|
30
|
+
description: "max-w-72 text-xs text-muted",
|
|
31
|
+
icon: "mb-1 size-6.5 text-dimmed",
|
|
32
|
+
root: "flex min-h-40 flex-col items-center justify-center gap-1 px-4 py-10 text-center",
|
|
33
|
+
title: "text-sm font-semibold text-highlighted"
|
|
34
|
+
},
|
|
35
|
+
appUi.value.state
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<div :role="kind === 'error' ? 'alert' : void 0" :data-state="kind" :class="classes.root">
|
|
42
|
+
<UIcon
|
|
43
|
+
:name="content.icon"
|
|
44
|
+
:class="[classes.icon, kind === 'error' && 'text-[var(--nut-dash-down)]']"
|
|
45
|
+
/>
|
|
46
|
+
<p :class="classes.title">{{ content.title }}</p>
|
|
47
|
+
<p v-if="content.description" :class="classes.description">{{ content.description }}</p>
|
|
48
|
+
<UButton
|
|
49
|
+
v-if="kind === 'error'"
|
|
50
|
+
class="mt-2.5"
|
|
51
|
+
color="neutral"
|
|
52
|
+
variant="outline"
|
|
53
|
+
size="xs"
|
|
54
|
+
icon="i-lucide-rotate-cw"
|
|
55
|
+
:label="t('dashboard.states.retry')"
|
|
56
|
+
@click="emit('retry')"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DashboardEmptyContent } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
kind: 'error' | 'empty';
|
|
4
|
+
empty?: DashboardEmptyContent;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
retry: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onRetry?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DashboardDataTable } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
table: DashboardDataTable;
|
|
4
|
+
/** Caps the height and scrolls under a sticky header. */
|
|
5
|
+
scroll?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useDashboardUi } from "../../composables/use-dashboard-ui";
|
|
4
|
+
import { DASHBOARD_TABLE_CLASSES, resolveDashboardClasses } from "../../utils/ui";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
table: { type: Object, required: true },
|
|
7
|
+
scroll: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const appUi = useDashboardUi();
|
|
10
|
+
const classes = computed(() => resolveDashboardClasses(DASHBOARD_TABLE_CLASSES, appUi.value.table));
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div :class="[classes.wrapper, scroll && 'max-h-80']" data-table-view>
|
|
15
|
+
<table :class="classes.table">
|
|
16
|
+
<thead :class="classes.head">
|
|
17
|
+
<tr>
|
|
18
|
+
<th
|
|
19
|
+
v-for="column in props.table.columns"
|
|
20
|
+
:key="column.key"
|
|
21
|
+
scope="col"
|
|
22
|
+
:class="[classes.th, column.numeric ? 'text-end' : 'text-start']"
|
|
23
|
+
>
|
|
24
|
+
{{ column.label }}
|
|
25
|
+
</th>
|
|
26
|
+
</tr>
|
|
27
|
+
</thead>
|
|
28
|
+
<tbody>
|
|
29
|
+
<tr v-for="(row, rowIndex) in props.table.rows" :key="rowIndex" :class="classes.row">
|
|
30
|
+
<component
|
|
31
|
+
:is="index === 0 ? 'th' : 'td'"
|
|
32
|
+
v-for="(cell, index) in row"
|
|
33
|
+
:key="index"
|
|
34
|
+
:scope="index === 0 ? 'row' : void 0"
|
|
35
|
+
:class="[
|
|
36
|
+
classes.td,
|
|
37
|
+
props.table.columns[index]?.numeric ? 'text-end tabular-nums' : 'text-start',
|
|
38
|
+
index === 0 && 'font-medium text-default'
|
|
39
|
+
]"
|
|
40
|
+
>
|
|
41
|
+
{{ cell.text }}
|
|
42
|
+
</component>
|
|
43
|
+
</tr>
|
|
44
|
+
</tbody>
|
|
45
|
+
</table>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DashboardDataTable } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
table: DashboardDataTable;
|
|
4
|
+
/** Caps the height and scrolls under a sticky header. */
|
|
5
|
+
scroll?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress ring: a track and a filled stroke, with content centered inside. `arc` opens the ring at
|
|
3
|
+
* the bottom (a 240° gauge); `target` adds a tick across the stroke. Plain SVG, no chart library.
|
|
4
|
+
*/
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/** Filled share, `0`–`1`. Values outside are clamped. */
|
|
7
|
+
ratio: number;
|
|
8
|
+
/** Outer size in pixels. */
|
|
9
|
+
size?: number;
|
|
10
|
+
thickness?: number;
|
|
11
|
+
color?: string;
|
|
12
|
+
arc?: boolean;
|
|
13
|
+
/** Target share, `0`–`1`, drawn as a tick. */
|
|
14
|
+
target?: number | null;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
target: number | null;
|
|
22
|
+
color: string;
|
|
23
|
+
size: number;
|
|
24
|
+
thickness: number;
|
|
25
|
+
arc: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
ratio: { type: Number, required: true },
|
|
5
|
+
size: { type: Number, required: false, default: 36 },
|
|
6
|
+
thickness: { type: Number, required: false, default: 3 },
|
|
7
|
+
color: { type: String, required: false, default: "var(--nut-dash-s1)" },
|
|
8
|
+
arc: { type: Boolean, required: false, default: false },
|
|
9
|
+
target: { type: [Number, null], required: false, default: null }
|
|
10
|
+
});
|
|
11
|
+
const SWEEP_ARC = 240;
|
|
12
|
+
function clamp(value) {
|
|
13
|
+
return Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0));
|
|
14
|
+
}
|
|
15
|
+
const geometry = computed(() => {
|
|
16
|
+
const radius = (props.size - props.thickness) / 2;
|
|
17
|
+
const circumference = 2 * Math.PI * radius;
|
|
18
|
+
const sweep = props.arc ? SWEEP_ARC : 360;
|
|
19
|
+
const start = props.arc ? 90 + (360 - sweep) / 2 : -90;
|
|
20
|
+
const length = circumference * sweep / 360;
|
|
21
|
+
const center = props.size / 2;
|
|
22
|
+
return {
|
|
23
|
+
center,
|
|
24
|
+
circumference,
|
|
25
|
+
filled: length * clamp(props.ratio),
|
|
26
|
+
length,
|
|
27
|
+
radius,
|
|
28
|
+
start,
|
|
29
|
+
tick: props.target === null ? null : tickAt(start + sweep * clamp(props.target))
|
|
30
|
+
};
|
|
31
|
+
function tickAt(degrees) {
|
|
32
|
+
const angle = degrees * Math.PI / 180;
|
|
33
|
+
const inner = radius - props.thickness * 0.75;
|
|
34
|
+
const outer = radius + props.thickness * 0.75;
|
|
35
|
+
return {
|
|
36
|
+
x1: center + inner * Math.cos(angle),
|
|
37
|
+
x2: center + outer * Math.cos(angle),
|
|
38
|
+
y1: center + inner * Math.sin(angle),
|
|
39
|
+
y2: center + outer * Math.sin(angle)
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<span
|
|
47
|
+
class="relative grid shrink-0 place-items-center"
|
|
48
|
+
:style="{ height: `${size}px`, width: `${size}px` }"
|
|
49
|
+
>
|
|
50
|
+
<svg
|
|
51
|
+
class="absolute inset-0 overflow-visible"
|
|
52
|
+
:viewBox="`0 0 ${size} ${size}`"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
data-ring
|
|
55
|
+
>
|
|
56
|
+
<g :transform="`rotate(${geometry.start} ${geometry.center} ${geometry.center})`">
|
|
57
|
+
<circle
|
|
58
|
+
:cx="geometry.center"
|
|
59
|
+
:cy="geometry.center"
|
|
60
|
+
:r="geometry.radius"
|
|
61
|
+
fill="none"
|
|
62
|
+
stroke="var(--nut-dash-track)"
|
|
63
|
+
:stroke-width="thickness"
|
|
64
|
+
stroke-linecap="round"
|
|
65
|
+
:stroke-dasharray="`${geometry.length} ${geometry.circumference}`"
|
|
66
|
+
/>
|
|
67
|
+
<circle
|
|
68
|
+
v-if="geometry.filled > 0"
|
|
69
|
+
:cx="geometry.center"
|
|
70
|
+
:cy="geometry.center"
|
|
71
|
+
:r="geometry.radius"
|
|
72
|
+
fill="none"
|
|
73
|
+
:stroke="color"
|
|
74
|
+
:stroke-width="thickness"
|
|
75
|
+
stroke-linecap="round"
|
|
76
|
+
:stroke-dasharray="`${geometry.filled} ${geometry.circumference}`"
|
|
77
|
+
class="transition-[stroke-dasharray] duration-700 ease-out motion-reduce:transition-none"
|
|
78
|
+
/>
|
|
79
|
+
</g>
|
|
80
|
+
<line
|
|
81
|
+
v-if="geometry.tick"
|
|
82
|
+
v-bind="geometry.tick"
|
|
83
|
+
stroke="var(--ui-text-highlighted)"
|
|
84
|
+
stroke-width="2"
|
|
85
|
+
stroke-linecap="round"
|
|
86
|
+
data-ring-target
|
|
87
|
+
/>
|
|
88
|
+
</svg>
|
|
89
|
+
<span class="relative text-center"><slot /></span>
|
|
90
|
+
</span>
|
|
91
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress ring: a track and a filled stroke, with content centered inside. `arc` opens the ring at
|
|
3
|
+
* the bottom (a 240° gauge); `target` adds a tick across the stroke. Plain SVG, no chart library.
|
|
4
|
+
*/
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/** Filled share, `0`–`1`. Values outside are clamped. */
|
|
7
|
+
ratio: number;
|
|
8
|
+
/** Outer size in pixels. */
|
|
9
|
+
size?: number;
|
|
10
|
+
thickness?: number;
|
|
11
|
+
color?: string;
|
|
12
|
+
arc?: boolean;
|
|
13
|
+
/** Target share, `0`–`1`, drawn as a tick. */
|
|
14
|
+
target?: number | null;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
target: number | null;
|
|
22
|
+
color: string;
|
|
23
|
+
size: number;
|
|
24
|
+
thickness: number;
|
|
25
|
+
arc: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DashboardRowAction } from '../../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Actions of one row: `inline` actions as icon buttons, the others in a `⋮` menu. Sits above the
|
|
4
|
+
* row's stretched select button, so both stay clickable.
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
actions: readonly DashboardRowAction[];
|
|
8
|
+
/** Accessible name of the `⋮` button, naming the row. */
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import UButton from "@nuxt/ui/components/Button.vue";
|
|
3
|
+
import UDropdownMenu from "@nuxt/ui/components/DropdownMenu.vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { useUiToolsLocale } from "#ui-tools/i18n";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
actions: { type: Array, required: true },
|
|
8
|
+
label: { type: String, required: true }
|
|
9
|
+
});
|
|
10
|
+
const { t } = useUiToolsLocale();
|
|
11
|
+
const inline = computed(() => props.actions.filter((action) => action.inline && action.icon));
|
|
12
|
+
const items = computed(
|
|
13
|
+
() => props.actions.flatMap(({ inline: isInline, ...item }) => isInline && item.icon ? [] : [item])
|
|
14
|
+
);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div class="relative z-[1] -me-1 flex shrink-0 items-center gap-0.5" data-row-actions>
|
|
19
|
+
<UButton
|
|
20
|
+
v-for="(action, index) in inline"
|
|
21
|
+
:key="index"
|
|
22
|
+
color="neutral"
|
|
23
|
+
variant="ghost"
|
|
24
|
+
size="xs"
|
|
25
|
+
square
|
|
26
|
+
:icon="action.icon"
|
|
27
|
+
:to="action.to"
|
|
28
|
+
:disabled="action.disabled"
|
|
29
|
+
:aria-label="action.label"
|
|
30
|
+
class="text-dimmed hover:text-default"
|
|
31
|
+
@click="action.onSelect?.($event)"
|
|
32
|
+
/>
|
|
33
|
+
<UDropdownMenu
|
|
34
|
+
v-if="items.length"
|
|
35
|
+
:items
|
|
36
|
+
:content="{ align: 'end', side: 'bottom', sideOffset: 4 }"
|
|
37
|
+
>
|
|
38
|
+
<UButton
|
|
39
|
+
color="neutral"
|
|
40
|
+
variant="ghost"
|
|
41
|
+
size="xs"
|
|
42
|
+
square
|
|
43
|
+
icon="i-lucide-ellipsis-vertical"
|
|
44
|
+
:aria-label="t('dashboard.rowActions', { label })"
|
|
45
|
+
class="text-dimmed hover:text-default"
|
|
46
|
+
/>
|
|
47
|
+
</UDropdownMenu>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DashboardRowAction } from '../../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Actions of one row: `inline` actions as icon buttons, the others in a `⋮` menu. Sits above the
|
|
4
|
+
* row's stretched select button, so both stay clickable.
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
actions: readonly DashboardRowAction[];
|
|
8
|
+
/** Accessible name of the `⋮` button, naming the row. */
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DashboardSkeletonKind } from '../../types/index.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
kind?: DashboardSkeletonKind;
|
|
4
|
+
/** Rows for list-like kinds, x points for charts. */
|
|
5
|
+
count?: number;
|
|
6
|
+
/** Bars per group (`bars`), or lines (`lines`). */
|
|
7
|
+
series?: number;
|
|
8
|
+
/** Chart height in pixels, x labels included. */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Leading visual of `rows`. */
|
|
11
|
+
leading?: 'avatar' | 'code' | 'icon';
|
|
12
|
+
/** Columns of `table`. */
|
|
13
|
+
columns?: number;
|
|
14
|
+
/** Extra line of `stat`: a sparkline or a progress bar. */
|
|
15
|
+
extra?: 'trend' | 'goal';
|
|
16
|
+
/** `donut` legend placement. */
|
|
17
|
+
layout?: 'side' | 'stacked';
|
|
18
|
+
/** Diameter of the `donut` ring. */
|
|
19
|
+
diameter?: number;
|
|
20
|
+
/** Seed of the deterministic geometry: server and client paint the same ghost. */
|
|
21
|
+
seed?: string;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
kind: DashboardSkeletonKind;
|
|
25
|
+
layout: "side" | "stacked";
|
|
26
|
+
height: number;
|
|
27
|
+
count: number;
|
|
28
|
+
series: number;
|
|
29
|
+
columns: number;
|
|
30
|
+
diameter: number;
|
|
31
|
+
seed: string;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|