@xleddyl/443-components-vue 0.16.62 → 0.16.64

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.
Files changed (88) hide show
  1. package/CATALOG.md +120 -119
  2. package/README.md +48 -13
  3. package/dist/chart/ChartLegend.vue.d.ts +4 -4
  4. package/dist/components/core/Form.vue +4 -1
  5. package/dist/components/core/Form.vue.d.ts +1 -0
  6. package/dist/components/core/FormField.vue +5 -2
  7. package/dist/components/core/Input.vue.d.ts +4 -4
  8. package/dist/components/core/Root.vue.d.ts +6 -6
  9. package/dist/components/core/Textarea.vue.d.ts +4 -4
  10. package/dist/components/core/VisuallyHidden.vue.d.ts +6 -6
  11. package/dist/components/data/Pagination.vue.d.ts +4 -4
  12. package/dist/components/data/Stat.vue.d.ts +4 -4
  13. package/dist/components/data/Tag.vue.d.ts +4 -4
  14. package/dist/components/data/Tree.vue.d.ts +2 -2
  15. package/dist/components/feedback/Alert.vue.d.ts +4 -4
  16. package/dist/components/forms/Calendar.vue.d.ts +2 -2
  17. package/dist/components/forms/ColorInput.vue.d.ts +4 -4
  18. package/dist/components/forms/DateInput.vue.d.ts +4 -4
  19. package/dist/components/forms/DatePicker.vue.d.ts +4 -4
  20. package/dist/components/forms/FileInput.vue.d.ts +4 -4
  21. package/dist/components/forms/NumberInput.vue.d.ts +5 -5
  22. package/dist/components/forms/PaletteSelect.vue.d.ts +4 -4
  23. package/dist/components/forms/PasswordInput.vue.d.ts +4 -4
  24. package/dist/components/forms/PinInput.vue.d.ts +4 -4
  25. package/dist/components/forms/Slider.vue.d.ts +4 -4
  26. package/dist/components/forms/Switch.vue.d.ts +5 -5
  27. package/dist/components/forms/TimeInput.vue.d.ts +4 -4
  28. package/dist/components/forms/TreeSelect.vue.d.ts +4 -4
  29. package/dist/components/layout/Accordion.vue.d.ts +4 -4
  30. package/dist/components/layout/AppShell.vue.d.ts +5 -5
  31. package/dist/components/layout/Card.vue.d.ts +4 -4
  32. package/dist/components/layout/CopyButton.vue.d.ts +4 -4
  33. package/dist/components/layout/NavLink.vue.d.ts +4 -4
  34. package/dist/components/layout/PageHeader.vue.d.ts +1 -1
  35. package/dist/components/layout/Separator.vue.d.ts +1 -1
  36. package/dist/components/layout/Stack.vue.d.ts +6 -6
  37. package/dist/components/layout/Stepper.vue.d.ts +3 -3
  38. package/dist/components/layout/Tabs.vue.d.ts +4 -4
  39. package/dist/components/overlays/CommandPalette.vue.d.ts +2 -2
  40. package/dist/components/overlays/ConfirmDialog.vue.d.ts +4 -4
  41. package/dist/components/overlays/ConfirmHost.vue.d.ts +4 -4
  42. package/dist/components/overlays/ContextMenu.vue.d.ts +2 -2
  43. package/dist/components/overlays/Drawer.vue.d.ts +5 -5
  44. package/dist/components/overlays/DropdownMenu.vue.d.ts +2 -2
  45. package/dist/components/overlays/HoverCard.vue.d.ts +4 -4
  46. package/dist/components/overlays/Modal.vue.d.ts +4 -4
  47. package/dist/components/overlays/Popover.vue.d.ts +4 -4
  48. package/dist/components/overlays/Toaster.vue.d.ts +4 -4
  49. package/dist/components/templates/AccountMenu.vue.d.ts +4 -4
  50. package/dist/components/templates/Brand.vue.d.ts +4 -4
  51. package/dist/components/templates/DashboardLayout.vue.d.ts +2 -2
  52. package/dist/components/templates/DetailPage.vue.d.ts +4 -4
  53. package/dist/components/templates/FormDrawer.vue +7 -2
  54. package/dist/components/templates/FormDrawer.vue.d.ts +2 -2
  55. package/dist/components/templates/SaveBar.vue.d.ts +4 -4
  56. package/dist/components/templates/SettingsModal.vue.d.ts +4 -4
  57. package/dist/components/templates/SettingsPage.vue.d.ts +4 -4
  58. package/dist/components/templates/SettingsSection.vue.d.ts +10 -10
  59. package/dist/components/templates/types.d.ts +1 -0
  60. package/dist/composables/data.d.ts +1 -0
  61. package/dist/composables/data.mjs +1 -0
  62. package/dist/composables/useField.mjs +5 -1
  63. package/dist/composables/useGridConfig.d.ts +14 -0
  64. package/dist/composables/useGridConfig.mjs +16 -0
  65. package/dist/composables/useRouteRecord.d.ts +1 -0
  66. package/dist/composables/useRouteRecord.mjs +29 -2
  67. package/dist/editor/RichTextEditor.vue.d.ts +4 -4
  68. package/dist/grid/DataGrid.vue +18 -12
  69. package/dist/grid/GridToolbar.vue.d.ts +4 -4
  70. package/dist/grid/types.d.ts +1 -1
  71. package/dist/index.d.ts +1 -1
  72. package/dist/index.mjs +1 -0
  73. package/dist/internal/forms/disabled.d.ts +3 -0
  74. package/dist/internal/forms/disabled.mjs +11 -0
  75. package/dist/internal/keys.d.ts +2 -0
  76. package/dist/internal/keys.mjs +1 -0
  77. package/dist/internal/layout/CollapsedTrail.vue.d.ts +4 -4
  78. package/dist/internal/layout/NavGroup.vue.d.ts +4 -4
  79. package/dist/internal/overlays/DialogFrame.vue.d.ts +4 -4
  80. package/dist/internal/overlays/DialogTrail.vue.d.ts +4 -4
  81. package/dist/internal/overlays/OverlayView.vue.d.ts +6 -6
  82. package/dist/nuxt/module.d.ts +3 -1
  83. package/dist/nuxt/module.mjs +3 -1
  84. package/dist/nuxt/runtime/grid.d.ts +2 -0
  85. package/dist/nuxt/runtime/grid.mjs +9 -0
  86. package/dist/nuxt/runtime/layouts/auth.vue.d.ts +6 -6
  87. package/dist/nuxt/runtime/layouts/dashboard.vue.d.ts +6 -6
  88. package/package.json +1 -1
package/CATALOG.md CHANGED
@@ -16,7 +16,7 @@ This file is a map, not the full reference. For all props, tokens, theming and a
16
16
 
17
17
  ### Optional groups
18
18
 
19
- Install the peer dependencies only for the groups you use. Turn the group on in `nuxt.config.ts` (`k: { grid: true }`, `editor: true`, `chart: true`). Without Nuxt, import from the subpath and import its `style.css`.
19
+ Install the peer dependencies only for the groups you use. Turn the group on in `nuxt.config.ts` (`k: { grid: true }`, `editor: true`, `chart: true`; `grid` also takes the app-wide grid defaults, `grid: { density: 'compact', columnMenu: false, exportable: false, pageSizes: [25, 50, 100, 'all'] }`). Without Nuxt, import from the subpath and import its `style.css`.
20
20
 
21
21
  | Group | Subpath | Peer dependencies |
22
22
  | ------ | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
@@ -28,116 +28,116 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
28
28
 
29
29
  ## Which component for which task
30
30
 
31
- | Task | Use |
32
- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
33
- | Form with validation, dirty state and server errors | `useForm` + `Form` + `FormField` + field components |
34
- | One labelled field with error, hint and required marker | `FormField` |
35
- | Map a server error (409, 422) to fields | `useForm` option `submitError`, `form.setErrors`, `form.setIssues` |
36
- | Form as a full page with sticky save footer | `FormPage` |
37
- | Create or edit form in a side panel (cancel, save, delete, guard) | `FormDrawer` (`form`, `creating`, `readonly`, `deletable`, `loading`) |
38
- | Warn before the user leaves with unsaved changes | `useDirtyGuard` (or `FormPage`, it has `guard`) |
39
- | Floating "unsaved changes" bar | `SaveBar` |
40
- | Single line text | `Input` |
41
- | Multi line text | `Textarea` |
42
- | Rich text (bold, lists, links) | `RichTextEditor` (group `editor`) |
43
- | Password with strength meter and generator | `PasswordInput` |
44
- | Number with stepper, locale format | `NumberInput` |
45
- | Money or unit prefix and suffix around an input | `InputGroup` + `InputAddon` |
46
- | One choice from a short list (5 or fewer) | `RadioGroup` or `SegmentedControl` |
47
- | One choice from a longer list, no search | `Select` |
48
- | Searchable select, async search, multi select, create option | `Combobox` |
49
- | Pick one node of a hierarchy (category, folder) | `TreeSelect` (`leavesOnly` to allow only leaves) |
50
- | Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate` |
51
- | Several create actions for the typed text (create here, create in a form) | `Combobox` with `createActions` |
52
- | Several choices as checkboxes | `CheckboxGroup` |
53
- | One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form) |
54
- | Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges) |
55
- | Inline calendar | `Calendar` |
56
- | Time of day | `TimeInput` |
57
- | Color | `ColorInput` |
58
- | Number in a range | `Slider` |
59
- | One time code, OTP | `PinInput` |
60
- | File or folder upload with drop zone | `FileInput` |
61
- | Drop files on any element | `useFileDrop` |
62
- | Confirm a destructive action | `useConfirm` |
63
- | Show a message the user must acknowledge | `useAlert` |
64
- | Ask for one text value | `usePrompt` |
65
- | Short message after an action | `toast` |
66
- | Toast for a promise (loading, success, error) | `toast.promise` |
67
- | Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
68
- | Detail or edit panel from the side | `Drawer` (or `useDrawer().open`). At 640px or less, a left or right drawer is a full-width sheet from the bottom. |
69
- | Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
70
- | Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
71
- | Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
72
- | Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute` |
73
- | One record in the URL (`#family/fam_1`, `#family/new`), with linked entries | `useRouteRecord(key, { find, loaded, canCreate, linkedKeys })`: `open`, `current`, `loading`, `openRecord`, `close`, `replaceId` |
74
- | Commands of the open page in the command search | `usePageCommands(() => CommandItem[])` (DashboardLayout adds the group "This page") |
75
- | A button made from a command (same label, icon and action as the palette) | `CommandButton` (`command`) |
76
- | Short list of records with title, badge, action, skeleton and empty state | `RecordList` |
77
- | Menu opened by a button | `DropdownMenu` |
78
- | Right click menu | `ContextMenu` |
79
- | Small floating panel with content or a form | `Popover` |
80
- | Preview on hover (user card) | `HoverCard` |
81
- | Short label on hover or focus | `Tooltip` |
82
- | Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`) |
83
- | Small table, simple sort | `Table` (+ `useTableSort` for client sort) |
84
- | Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing) |
85
- | Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `activeFilters` (or `filterCount`), `@filter-remove` and `@filters-reset` |
86
- | Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge) |
87
- | Whole list page: search, filters, table, pagination | `ListPage` |
88
- | Page numbers and page size | `Pagination` |
89
- | Bulk actions bar for selected rows | `SelectionBar` |
90
- | Filter chips, active filters | `FilterPills` |
91
- | Tags, chips, removable labels | `Tag` |
92
- | Color per group or category (tags, labels, series) | `color` (palette name or hex) on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `paletteColor(key)` |
93
- | Choose a palette color (a group, a division) | `PaletteSelect` (`v-model` color or null, `clearable` for "Automatic", `custom` for any hex color) |
94
- | Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
95
- | Reorder any list by drag and keyboard | `useSortable` |
96
- | Status label, counter, dot | `Badge` |
97
- | User picture or initials; stack of users | `Avatar`; `AvatarGroup` |
98
- | Key figure with delta and trend (KPI) | `Stat` |
99
- | Label and value pairs (details) | `DescriptionList` |
100
- | Event history, activity feed | `Timeline` |
101
- | Hierarchy, folders, drag to reorder | `Tree` |
102
- | Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`) |
103
- | Tabs | `Tabs` |
104
- | Wizard steps, step indicator (Step 2 of 4) | `Stepper` |
105
- | Collapsible sections, FAQ | `Accordion` |
106
- | Container with title and actions | `Card` |
107
- | Page title, description, breadcrumbs, actions | `PageHeader` (or a page template) |
108
- | Breadcrumbs only | `Breadcrumbs` |
109
- | Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
110
- | Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
111
- | Tabs in a settings section header, like a drawer | `#tabs-<id>` on `SettingsModal`, `#settings-tabs-<id>` on `DashboardLayout`: put a `Tabs` `variant="underline"` `size="sm"` in it |
112
- | Page that fills the panel height (a full height grid) | `content="fill"` or `"centered"` on `DashboardLayout` / `AppShell`, `definePageMeta({ content: 'fill' })` |
113
- | Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
114
- | Login, sign up, reset password page | `AuthLogin` + `AuthLogout` (two step flow); `AuthLayout` (or `k-auth`) for other pages |
115
- | Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it) |
116
- | Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup` |
117
- | Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset` |
118
- | Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys |
119
- | Detail page of one record with tabs and aside | `DetailPage` |
120
- | Overview page with stats | `DashboardPage` |
121
- | First run screen with steps | `EmptyPage` |
122
- | Error page, 404 page | `ErrorPage`, `NotFoundPage` |
123
- | Empty state inside a card or list | `EmptyState` |
124
- | Loading placeholder for content | `Skeleton` |
125
- | Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`) |
126
- | Spinner; spinner that fills its container | `Spinner`; `Spinner block` |
127
- | Cover an area while it loads | `LoadingOverlay` |
128
- | Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`) |
129
- | Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button` |
130
- | Progress of a task | `Progress` (bar) or `ProgressRing` |
131
- | Value in a known range (quota, score) | `Meter` |
132
- | Inline message (info, warning, error) | `Alert` |
133
- | Copy text to the clipboard | `CopyButton` or `useCopy` |
134
- | Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd` |
135
- | Row or column layout with gap; responsive grid | `Stack`; `Grid` |
136
- | Line or labelled divider; section heading with actions | `Separator` |
137
- | Group of buttons or tools with arrow key navigation | `Toolbar` |
138
- | Text for screen readers only | `VisuallyHidden` |
139
- | Translations of the component texts | `useLocale` (languages: en, it, de) |
140
- | Custom icons | `createIcons`, `provideIcons`, Nuxt option `k.icons` |
31
+ | Task | Use |
32
+ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | Form with validation, dirty state and server errors | `useForm` + `Form` + `FormField` + field components |
34
+ | One labelled field with error, hint and required marker | `FormField` |
35
+ | Map a server error (409, 422) to fields | `useForm` option `submitError`, `form.setErrors`, `form.setIssues` |
36
+ | Form as a full page with sticky save footer | `FormPage` |
37
+ | Create or edit form in a side panel (cancel, save, delete, guard) | `FormDrawer` (`form`, `creating`, `readonly`, `deletable`, `loading`) |
38
+ | Warn before the user leaves with unsaved changes | `useDirtyGuard` (or `FormPage`, it has `guard`) |
39
+ | Floating "unsaved changes" bar | `SaveBar` |
40
+ | Single line text | `Input` |
41
+ | Multi line text | `Textarea` |
42
+ | Rich text (bold, lists, links) | `RichTextEditor` (group `editor`) |
43
+ | Password with strength meter and generator | `PasswordInput` |
44
+ | Number with stepper, locale format | `NumberInput` |
45
+ | Money or unit prefix and suffix around an input | `InputGroup` + `InputAddon` |
46
+ | One choice from a short list (5 or fewer) | `RadioGroup` or `SegmentedControl` |
47
+ | One choice from a longer list, no search | `Select` |
48
+ | Searchable select, async search, multi select, create option | `Combobox` |
49
+ | Pick one node of a hierarchy (category, folder) | `TreeSelect` (`leavesOnly` to allow only leaves) |
50
+ | Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate` |
51
+ | Several create actions for the typed text (create here, create in a form) | `Combobox` with `createActions` |
52
+ | Several choices as checkboxes | `CheckboxGroup` |
53
+ | One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form) |
54
+ | Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges) |
55
+ | Inline calendar | `Calendar` |
56
+ | Time of day | `TimeInput` |
57
+ | Color | `ColorInput` |
58
+ | Number in a range | `Slider` |
59
+ | One time code, OTP | `PinInput` |
60
+ | File or folder upload with drop zone | `FileInput` |
61
+ | Drop files on any element | `useFileDrop` |
62
+ | Confirm a destructive action | `useConfirm` |
63
+ | Show a message the user must acknowledge | `useAlert` |
64
+ | Ask for one text value | `usePrompt` |
65
+ | Short message after an action | `toast` |
66
+ | Toast for a promise (loading, success, error) | `toast.promise` |
67
+ | Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
68
+ | Detail or edit panel from the side | `Drawer` (or `useDrawer().open`). At 640px or less, a left or right drawer is a full-width sheet from the bottom. |
69
+ | Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
70
+ | Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
71
+ | Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
72
+ | Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute` |
73
+ | One record in the URL (`#family/fam_1`, `#family/new`), with linked entries | `useRouteRecord(key, { find, loaded, canCreate, linkedKeys, beforeLeave })`: `open`, `current`, `loading`, `openRecord`, `close`, `replaceId`. `beforeLeave` (returns `false` or a promise of it) cancels a navigation that would close or change the open record (back button, links); the composable's own `close`, `openRecord`, `replaceId` skip it |
74
+ | Commands of the open page in the command search | `usePageCommands(() => CommandItem[])` (DashboardLayout adds the group "This page") |
75
+ | A button made from a command (same label, icon and action as the palette) | `CommandButton` (`command`) |
76
+ | Short list of records with title, badge, action, skeleton and empty state | `RecordList` |
77
+ | Menu opened by a button | `DropdownMenu` |
78
+ | Right click menu | `ContextMenu` |
79
+ | Small floating panel with content or a form | `Popover` |
80
+ | Preview on hover (user card) | `HoverCard` |
81
+ | Short label on hover or focus | `Tooltip` |
82
+ | Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`) |
83
+ | Small table, simple sort | `Table` (+ `useTableSort` for client sort) |
84
+ | Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing) |
85
+ | Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `activeFilters` (or `filterCount`), `@filter-remove` and `@filters-reset` |
86
+ | Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge) |
87
+ | Whole list page: search, filters, table, pagination | `ListPage` |
88
+ | Page numbers and page size | `Pagination` |
89
+ | Bulk actions bar for selected rows | `SelectionBar` |
90
+ | Filter chips, active filters | `FilterPills` |
91
+ | Tags, chips, removable labels | `Tag` |
92
+ | Color per group or category (tags, labels, series) | `color` (palette name or hex) on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `paletteColor(key)` |
93
+ | Choose a palette color (a group, a division) | `PaletteSelect` (`v-model` color or null, `clearable` for "Automatic", `custom` for any hex color) |
94
+ | Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
95
+ | Reorder any list by drag and keyboard | `useSortable` |
96
+ | Status label, counter, dot | `Badge` |
97
+ | User picture or initials; stack of users | `Avatar`; `AvatarGroup` |
98
+ | Key figure with delta and trend (KPI) | `Stat` |
99
+ | Label and value pairs (details) | `DescriptionList` |
100
+ | Event history, activity feed | `Timeline` |
101
+ | Hierarchy, folders, drag to reorder | `Tree` |
102
+ | Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`) |
103
+ | Tabs | `Tabs` |
104
+ | Wizard steps, step indicator (Step 2 of 4) | `Stepper` |
105
+ | Collapsible sections, FAQ | `Accordion` |
106
+ | Container with title and actions | `Card` |
107
+ | Page title, description, breadcrumbs, actions | `PageHeader` (or a page template) |
108
+ | Breadcrumbs only | `Breadcrumbs` |
109
+ | Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
110
+ | Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
111
+ | Tabs in a settings section header, like a drawer | `#tabs-<id>` on `SettingsModal`, `#settings-tabs-<id>` on `DashboardLayout`: put a `Tabs` `variant="underline"` `size="sm"` in it |
112
+ | Page that fills the panel height (a full height grid) | `content="fill"` or `"centered"` on `DashboardLayout` / `AppShell`, `definePageMeta({ content: 'fill' })` |
113
+ | Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
114
+ | Login, sign up, reset password page | `AuthLogin` + `AuthLogout` (two step flow); `AuthLayout` (or `k-auth`) for other pages |
115
+ | Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it) |
116
+ | Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup` |
117
+ | Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset` |
118
+ | Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys |
119
+ | Detail page of one record with tabs and aside | `DetailPage` |
120
+ | Overview page with stats | `DashboardPage` |
121
+ | First run screen with steps | `EmptyPage` |
122
+ | Error page, 404 page | `ErrorPage`, `NotFoundPage` |
123
+ | Empty state inside a card or list | `EmptyState` |
124
+ | Loading placeholder for content | `Skeleton` |
125
+ | Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`) |
126
+ | Spinner; spinner that fills its container | `Spinner`; `Spinner block` |
127
+ | Cover an area while it loads | `LoadingOverlay` |
128
+ | Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`) |
129
+ | Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button` |
130
+ | Progress of a task | `Progress` (bar) or `ProgressRing` |
131
+ | Value in a known range (quota, score) | `Meter` |
132
+ | Inline message (info, warning, error) | `Alert` |
133
+ | Copy text to the clipboard | `CopyButton` or `useCopy` |
134
+ | Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd` |
135
+ | Row or column layout with gap; responsive grid | `Stack`; `Grid` |
136
+ | Line or labelled divider; section heading with actions | `Separator` |
137
+ | Group of buttons or tools with arrow key navigation | `Toolbar` |
138
+ | Text for screen readers only | `VisuallyHidden` |
139
+ | Translations of the component texts | `useLocale` (languages: en, it, de) |
140
+ | Custom icons | `createIcons`, `provideIcons`, Nuxt option `k.icons` |
141
141
 
142
142
  ## Core
143
143
 
@@ -152,7 +152,7 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
152
152
  | `FormField` | Label, description, hint, error and required marker around one control. It links ids and ARIA for the control inside. | Props: `label`, `name` (reads error and warning from the surrounding `Form`), `description`, `hint`, `error`, `warning`, `required`, `optional`, `disabled`, `icon`. Slots: default, `label`, `label-actions`, `description`, `hint`. | `core/form-field.vue` |
153
153
  | `FieldMessage` | One error, warning or hint line outside a `FormField`. | Props: `message`, `tone` (danger, warning, neutral), `icon`. Slot: default. | `core/field-message.vue` |
154
154
  | `FieldBoundary` | Cut the field context for controls inside a `FormField` that are not the main control (a search box above a `Tree`). | Prop: `auxiliary` (keeps own id, follows only `disabled`). Without it the context is fully cut. | `core/form-field.vue` |
155
- | `Form` | Connects a `useForm` result to a `<form>`. Provides errors to `FormField`, handles submit, reset, focus on first error. | Props: `form` (required), `as` (form or div; use `div` for a form nested in a modal), `focusOnError`, `alerts` (start, end, false). Slot: default, `alerts`. Events: `submitted`, `invalid`, `reset`. | `core/form.vue` |
155
+ | `Form` | Connects a `useForm` result to a `<form>`. Provides errors to `FormField`, handles submit, reset, focus on first error. | Props: `form` (required), `as` (form or div; use `div` for a form nested in a modal), `focusOnError`, `alerts` (start, end, false), `disabled` (every `FormField` and control inside is disabled; a nested form inherits it unless it sets its own). Slot: default, `alerts`. Events: `submitted`, `invalid`, `reset`. | `core/form.vue` |
156
156
  | `FormAlerts` | Render root errors and warnings as alerts. `Form` already does it. Use it only for a custom placement. | Props: `errors`, `warnings`. | `core/form.vue` |
157
157
  | `Kbd` | Show a keyboard key or shortcut. | Props: `value` (for example `mod+k`, shown per platform), `size`. Slot: default. | `core/kbd.vue` |
158
158
  | `VisuallyHidden` | Text for screen readers only. | Props: `as`, `focusable`. | `core/visually-hidden.vue` |
@@ -274,7 +274,7 @@ Templates combine core parts into whole pages and layouts. Start from them for n
274
274
  | `AuthLogout` | Sign out page: runs `logout()`, remembers the account, reloads the sign in page. Retry on error. | Props: `logout`, `account` (`{ email, name }`), `loginTo`, `reasonKey`, frame props of `AuthLayout`. Slots: `footer`, `brand`, `aside`, `corner`. Helpers: `rememberSignedOutAccount`, `takeSignedOutAccount`, `SIGNED_OUT_REASON`. | `templates/auth-login.vue` |
275
275
  | `ListPage` | Whole list page: header, search, filters, table, pagination, bulk actions, loading, empty, no results and error states. Client or server mode (`total`). | Models: `page`, `pageSize`, `search`, `filter`, `sort`, `selected`. Props: `title`, `rows`, `columns`, `rowKey`, `rowTo`, `selectable`, `loading`, `error`, `total`, `paginate`, `searchable`, `searchKeys`, `filters`, `filterKey`, `filterMultiple`, `emptyTitle`. Slots: `actions`, `toolbar`, `toolbar-end`, `bulk`, `empty`, `empty-actions`, `no-results`, `error`, `cell-<key>`, `table`. Events: `retry`, `clear`, `rowClick`. | `templates/list-page.vue` |
276
276
  | `DetailPage` | Record page: back link, title, status, actions, tabs, main column and aside with description lists. | Model: `v-model:tab`. Props: `title`, `backTo`, `backLabel`, `status` (`label`, `tone`, `dot`), `tabs`, `sections` (`title`, `items`), `loading`, `error`. Slots: default, `actions`, `badge`, `meta`, `aside`, `aside-before`, `panel-<value>`. | `templates/detail-page.vue` |
277
- | `FormDrawer` | Drawer with a form: `Form` around the body, footer with delete (left), cancel and submit, a discard confirmation on close when the form is dirty, `SkeletonForm` while `loading`. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side`, `size`, `fill` (per tab, for a full height table), `tabs` (`FormDrawerTab`: `fields` gives the error dot and opens the tab on a failed submit), `tabRoute` (keeps the tab in the hash under this key), `trail`, `backLabel`, `form`, `loading`, `readonly`, `creating` (submit says Create, no dirty needed), `requireDirty`, `deletable`, `deleteDisabled`, `deleteHint`, `submitLabel`, `cancelLabel`, `deleteLabel`, `guard`, `guardTitle`, `guardMessage`, `beforeClose`, `onCancel`. Slots: default (`{ tab }`), `actions`, `title-trailing`, `skeleton`, `footer`. Events: `delete`, `navigate`, `afterLeave`. Exposes `confirmDiscard()`, `close()`. | `templates/form-drawer.vue` |
277
+ | `FormDrawer` | Drawer with a form: `Form` around the body, footer with delete (left), cancel and submit, a discard confirmation on close when the form is dirty, `SkeletonForm` while `loading`. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side`, `size`, `fill` (full height body), `tabs` (`FormDrawerTab`: `fields` gives the error dot and opens the tab on a failed submit, `fill: true` makes the drawer `fill` while the tab is active), `tabRoute` (keeps the tab in the hash under this key), `trail`, `backLabel`, `form`, `loading`, `readonly` (also disables every field of the body, your own `Form` in the slot too), `creating` (submit says Create, no dirty needed), `requireDirty`, `deletable`, `deleteDisabled`, `deleteHint`, `submitLabel`, `cancelLabel`, `deleteLabel`, `guard`, `guardTitle`, `guardMessage`, `beforeClose`, `onCancel`. Slots: default (`{ tab }`), `actions`, `title-trailing`, `skeleton`, `footer`. Events: `delete`, `navigate`, `afterLeave`. Exposes `confirmDiscard()`, `close()`. | `templates/form-drawer.vue` |
278
278
  | `FormPage` | Form page: header, cards in a `Form`, sticky submit and cancel footer, dirty guard. | Props: `title`, `backTo`, `form` (from `useForm`), `dirty`, `saving`, `guard`, `requireDirty`, `submitLabel`, `cancelLabel`, `cancelTo`, `width`, `sticky`. Slots: default, `actions`, `footer`, `status`. Events: `submit`, `submitted`, `invalid`, `reset`, `cancel`. | `templates/form-page.vue` |
279
279
  | `DashboardPage` | Overview page: header, stat grid, content grid. | Props: `title`, `eyebrow`, `description`, `stats` (`PageStat[]`), `statsColumns`, `columns`, `loading`. Slots: default, `actions`, `stats`, `sparkline`, `before`, `after`, `eyebrow`. | `templates/dashboard-page.vue` |
280
280
  | `SettingsPage` | Settings as a page: section nav, panels, floating save bar when `dirty`. | Model: `v-model:section`. Props: `title`, `sections` (`value`, `label`, `icon`, `to`), `dirty`, `saving`, `saveBar`, `form`. Slots: `section-<value>`, `actions`, `nav-footer`. Events: `save`, `discard`. | `templates/settings-page.vue` |
@@ -295,12 +295,12 @@ Nuxt ready layouts: with `k: { layouts: true }` the module registers the layouts
295
295
 
296
296
  Import from `@xleddyl/443-components-vue/grid`. It wraps AG Grid Community.
297
297
 
298
- | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
299
- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
300
- | `DataGrid` | Big table: virtual scroll, column menu, search, CSV export, selection, server sort and paging, inline editing. For small tables use `Table`. | Models: `v-model:query`, `v-model:page`, `v-model:pageSize`, `v-model:sort` (`{ column, direction }`). Props: `rows`, `columns` (AG Grid `ColDef`), `rowIdKey` or `getRowId`, `storageKey` (columns and page size in the preferences store; without `columnMenu` the column visibility always comes from `columns`), `density`, `selectable`, `loading`, `height`, `fill`, `autoHeight`, `toolbar`, `searchable`, `columnMenu`, `exportable`, `serverSort`, `pagination`, `serverPagination`, `total`, `filterable`, `editable`, `spreadsheet`, `gridOptions`, `messages`, `filterCount`, `activeFilters` (`{ id, label, value }[]`, removable pills next to the filter button; a click opens the filters). Slots: `actions`, `actions-end` (after the column menu and export buttons), `filters` (`{ close, count }`, hosted in a modal opened by a funnel button next to the search). Events: `filtersReset`, `filterRemove` (id), `rowClick`, `selectionChange`, `sortChange`, `filterChange`, `cellsChange`, `cellsInvalid`, `dirtyChange`, `rangeChange`, `copy`. | `grid/data-grid.vue` |
301
- | `DataGrid` with `spreadsheet` | Excel-like editing: cell range selection, copy and paste (TSV), fill down and right, clear, undo and redo, dirty cell tracking. Set `rowIdKey` or `getRowId`. | Template ref methods (`GridSpreadsheetMethods`): `getRange`, `getSelectedCells`, `selectRange`, `selectAll`, `setRangeValue`, `copyRange`, `paste`, `fillDown`, `fillRight`, `clearCells`, `clearRange`, `undo`, `redo`, `clearHistory`, `getDirtyCells`, `clearDirty`. The `actions` slot gets the same methods plus `range`, `selectedCellCount`, `dirtyCount`, `canUndo`, `canRedo`. Use `cellsChange` to save edits, `cellsInvalid` for rejected input. | `grid/spreadsheet.vue` |
302
- | `GridToolbar` | Toolbar of `DataGrid` (search, column menu, export). `DataGrid` already renders it. Use it alone only for a custom grid setup. | Props: `api`, `searchable`, `columnMenu`, `exportable`, `exportFileName`, `debounce`, `filterCount`, `activeFilters`. Model: `v-model` (query). Slots: default (actions), `end`, `filters`. Events: `resetColumns`, `filtersReset`, `filterRemove`. | - |
303
- | Cell renderers | Use as `cellRenderer` in a column definition, with `cellRendererParams`. | `BadgeCell` (`tones`, `colors`, `labels`, `titles` (a record or a function of the value), `defaultTone`, `variant`; array values render one badge each, `max` adds a `+N` badge, `wrap`), `BooleanCell` (`trueLabel`, `falseLabel`), `DateCell` (`locale`, `options`, `relative`), `EmptyCell` (placeholder for empty values), `ImageCell` (`alt`, `rounded`, `fit`: `cover`, `contain` or `natural` (original aspect, height `size`), `size`), `LinkCell` (`href`, `label`, `target`), `ButtonCell` (`onClick`, `label`, `ariaLabel`, `emptyLabel`, `tone`, `variant`, `icon` (as `Button`, an `xs` button; without them an inline link style button); does not trigger the row click). | `grid/data-grid.vue` |
298
+ | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
299
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
300
+ | `DataGrid` | Big table: virtual scroll, column menu, search, CSV export, selection, server sort and paging, inline editing. For small tables use `Table`. | Models: `v-model:query`, `v-model:page`, `v-model:pageSize`, `v-model:sort` (`{ column, direction }`). Props: `rows`, `columns` (AG Grid `ColDef`), `rowIdKey` or `getRowId`, `storageKey` (columns and page size in the preferences store; without `columnMenu` the column visibility always comes from `columns`), `density` (default `normal`), `selectable`, `loading`, `height`, `fill`, `autoHeight`, `toolbar`, `searchable`, `columnMenu` (default on), `exportable` (default on), `pageSizes` (default `[10, 25, 50, 100]`; these four defaults can be set for the whole app with `provideGridConfig` or the Nuxt option `k.grid: { density, columnMenu, exportable, pageSizes }`, a prop still wins), `serverSort`, `pagination`, `serverPagination`, `total`, `filterable`, `editable`, `spreadsheet`, `gridOptions`, `messages`, `filterCount`, `activeFilters` (`{ id, label, value }[]`, removable pills next to the filter button; a click opens the filters). Slots: `actions`, `actions-end` (after the column menu and export buttons), `filters` (`{ close, count }`, hosted in a modal opened by a funnel button next to the search). Events: `filtersReset`, `filterRemove` (id), `rowClick`, `selectionChange`, `sortChange`, `filterChange`, `cellsChange`, `cellsInvalid`, `dirtyChange`, `rangeChange`, `copy`. | `grid/data-grid.vue` |
301
+ | `DataGrid` with `spreadsheet` | Excel-like editing: cell range selection, copy and paste (TSV), fill down and right, clear, undo and redo, dirty cell tracking. Set `rowIdKey` or `getRowId`. | Template ref methods (`GridSpreadsheetMethods`): `getRange`, `getSelectedCells`, `selectRange`, `selectAll`, `setRangeValue`, `copyRange`, `paste`, `fillDown`, `fillRight`, `clearCells`, `clearRange`, `undo`, `redo`, `clearHistory`, `getDirtyCells`, `clearDirty`. The `actions` slot gets the same methods plus `range`, `selectedCellCount`, `dirtyCount`, `canUndo`, `canRedo`. Use `cellsChange` to save edits, `cellsInvalid` for rejected input. | `grid/spreadsheet.vue` |
302
+ | `GridToolbar` | Toolbar of `DataGrid` (search, column menu, export). `DataGrid` already renders it. Use it alone only for a custom grid setup. | Props: `api`, `searchable`, `columnMenu`, `exportable`, `exportFileName`, `debounce`, `filterCount`, `activeFilters`. Model: `v-model` (query). Slots: default (actions), `end`, `filters`. Events: `resetColumns`, `filtersReset`, `filterRemove`. | - |
303
+ | Cell renderers | Use as `cellRenderer` in a column definition, with `cellRendererParams`. | `BadgeCell` (`tones`, `colors`, `labels`, `titles` (a record or a function of the value), `defaultTone`, `variant`; array values render one badge each, `max` adds a `+N` badge, `wrap`), `BooleanCell` (`trueLabel`, `falseLabel`), `DateCell` (`locale`, `options`, `relative`), `EmptyCell` (placeholder for empty values), `ImageCell` (`alt`, `rounded`, `fit`: `cover`, `contain` or `natural` (original aspect, height `size`), `size`), `LinkCell` (`href`, `label`, `target`), `ButtonCell` (`onClick`, `label`, `ariaLabel`, `emptyLabel`, `tone`, `variant`, `icon` (as `Button`, an `xs` button; without them an inline link style button); does not trigger the row click). | `grid/data-grid.vue` |
304
304
 
305
305
  Grid helpers: `registerGridModules`, `registerGridEditorModules`, `registerGridFilterModules`, `registerGridSpreadsheetModules` (register AG Grid modules by hand), `createGridTheme`, `parseTsv`, `formatTsv`.
306
306
 
@@ -359,6 +359,7 @@ All are exported from `@xleddyl/443-components-vue` and auto-imported in Nuxt.
359
359
  | `usePreference`, `usePreferences`, `createPreferences`, `providePreferences` | Remember UI choices per user (theme, preset, sidebar collapsed, DataGrid columns and page size, your own keys) in one pluggable store. | `app.use(createPreferences(store))`; a store is `{ get, set, subscribe?, clientOnly? }`. `createRemotePreferenceStore({ initial, save, debounce })` for an API, `createLocalPreferenceStore()` is the default. `usePreference(key, fallback, { validate })` is a writable computed. Keys: `theme`, `preset`, `shell:<storageKey>`, `grid:<storageKey>` (`PREFERENCE_KEYS`). | `core/preferences.vue` |
360
360
  | `useAppShell` | Read the `AppShell` state (collapsed, open) from a child component. | Returns the shell context or `null` outside a shell. | `layout/app-shell.vue` |
361
361
  | `useRouteState` | Bind a ref to a URL query parameter or hash entry: deep links to drawers and modals, back button closes them, filters in the URL. | `useRouteState(key, { parse, serialize, default, history: 'push' \| 'replace', location: 'query' \| 'hash' })`. Returns a ref; `undefined` or `''` removes the parameter. Hash entries are `key/value` joined with `&` (`#family/fam_1&variant/var_2`), read after mount. `routeHash(hash, { key: value })` builds a link hash, `routeHashValue(hash, key)` reads one entry. `withRouteStateScroll(scrollBehavior)` for plain vue-router. No-op without a router. | `overlays/drawer.vue` |
362
+ | `provideGridConfig`, `createGridConfig`, `useGridConfig` | Defaults of every `DataGrid` in the app or a subtree: `density`, `columnMenu`, `exportable`, `pageSizes`. | `app.use(createGridConfig({ density: 'compact', columnMenu: false }))` or `provideGridConfig(config)` in a component (`GridConfig`). Nuxt: option `k.grid: { ... }`. A prop on the grid wins. | `grid/data-grid.vue` |
362
363
  | `useScrollLock` | Lock the page scroll while something is open. | `useScrollLock(activeRef)`. | - |
363
364
  | `useLocale` | Translate component texts and read the active locale (en, it, de). | `const { locale, t } = useLocale()`. `provideLocale` and `createLocale` set it. Nuxt follows `k.locale`. | `languages.vue` (pages root) |
364
365
  | `useIcons` helpers, `createIcons`, `provideIcons` | Register your own icons by name. | Nuxt: option `k.icons: { dir: '~/assets/icons' }`. | `components/core/icon.vue` |