@xleddyl/443-components-vue 0.16.14 → 0.16.16

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 (59) hide show
  1. package/CATALOG.md +155 -144
  2. package/README.md +4 -0
  3. package/dist/components/core/index.d.ts +1 -0
  4. package/dist/components/core/index.mjs +1 -0
  5. package/dist/components/core/palette.d.ts +4 -0
  6. package/dist/components/core/palette.mjs +22 -0
  7. package/dist/components/core/types.d.ts +1 -0
  8. package/dist/components/data/Badge.vue +8 -1
  9. package/dist/components/data/Badge.vue.d.ts +2 -2
  10. package/dist/components/data/FilterPill.vue +8 -0
  11. package/dist/components/data/FilterPill.vue.d.ts +2 -2
  12. package/dist/components/data/FilterPills.vue +1 -0
  13. package/dist/components/data/RecordList.vue +55 -0
  14. package/dist/components/data/RecordList.vue.d.ts +237 -0
  15. package/dist/components/data/Tag.vue +3 -1
  16. package/dist/components/data/Tag.vue.d.ts +2 -2
  17. package/dist/components/data/index.d.ts +1 -0
  18. package/dist/components/data/index.mjs +1 -0
  19. package/dist/components/data/types.d.ts +11 -1
  20. package/dist/components/forms/Combobox.vue +31 -3
  21. package/dist/components/forms/Combobox.vue.d.ts +2 -0
  22. package/dist/components/forms/types.d.ts +2 -0
  23. package/dist/components/overlays/CommandButton.vue +21 -0
  24. package/dist/components/overlays/CommandButton.vue.d.ts +249 -0
  25. package/dist/components/overlays/CommandPalette.vue +13 -2
  26. package/dist/components/overlays/index.d.ts +2 -0
  27. package/dist/components/overlays/index.mjs +2 -0
  28. package/dist/components/overlays/types.d.ts +4 -0
  29. package/dist/components/templates/DashboardLayout.vue +22 -6
  30. package/dist/components/templates/DashboardLayout.vue.d.ts +1 -0
  31. package/dist/components/templates/FormDrawer.vue +59 -9
  32. package/dist/components/templates/FormDrawer.vue.d.ts +3 -1
  33. package/dist/components/templates/types.d.ts +4 -0
  34. package/dist/composables/layout.d.ts +1 -0
  35. package/dist/composables/layout.mjs +1 -0
  36. package/dist/composables/templates.d.ts +1 -0
  37. package/dist/composables/templates.mjs +1 -0
  38. package/dist/composables/useConfirm.d.ts +4 -1
  39. package/dist/composables/useConfirm.mjs +16 -2
  40. package/dist/composables/usePageCommands.d.ts +6 -0
  41. package/dist/composables/usePageCommands.mjs +9 -0
  42. package/dist/composables/useRouteRecord.d.ts +24 -0
  43. package/dist/composables/useRouteRecord.mjs +55 -0
  44. package/dist/grid/cells/BadgeCell.vue +27 -15
  45. package/dist/grid/data-grid.css +4 -0
  46. package/dist/grid/types.d.ts +5 -2
  47. package/dist/locale/de.mjs +1 -0
  48. package/dist/locale/en.mjs +1 -0
  49. package/dist/locale/it.mjs +1 -0
  50. package/dist/locale/types.d.ts +1 -0
  51. package/dist/styles/data/badge.css +5 -0
  52. package/dist/styles/data/filter-pills.css +8 -0
  53. package/dist/styles/data/record-list.css +57 -0
  54. package/dist/styles/data/tag.css +5 -0
  55. package/dist/styles/data.css +1 -0
  56. package/dist/styles/forms/combobox.css +27 -0
  57. package/dist/styles/tokens.css +12 -0
  58. package/dist/styles/utilities.css +55 -0
  59. package/package.json +1 -1
package/CATALOG.md CHANGED
@@ -28,108 +28,113 @@ 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
- | Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate` |
50
- | Several choices as checkboxes | `CheckboxGroup` |
51
- | One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form) |
52
- | Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges) |
53
- | Inline calendar | `Calendar` |
54
- | Time of day | `TimeInput` |
55
- | Color | `ColorInput` |
56
- | Number in a range | `Slider` |
57
- | One time code, OTP | `PinInput` |
58
- | File or folder upload with drop zone | `FileInput` |
59
- | Drop files on any element | `useFileDrop` |
60
- | `useSortable` | Reorder any small list by pointer drag (live, Escape cancels) and Alt with the arrow keys, with an announcement. `TagList` uses it. | `useSortable(containerRef, { items, onMove(items, move), orientation, disabled, handle, canMove, label, movedText })` returns `{ itemProps(index), move(from, to), canMove, dragging, announcement }`. Bind `itemProps(index)` on each item and render `announcement` in a live region. | `data/tag-list.vue` |
61
- | Confirm a destructive action | `useConfirm` |
62
- | Show a message the user must acknowledge | `useAlert` |
63
- | Ask for one text value | `usePrompt` |
64
- | Short message after an action | `toast` |
65
- | Toast for a promise (loading, success, error) | `toast.promise` |
66
- | Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
67
- | Detail or edit panel from the side | `Drawer` (or `useDrawer().open`) |
68
- | Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
69
- | Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
70
- | Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
71
- | Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute` |
72
- | Menu opened by a button | `DropdownMenu` |
73
- | Right click menu | `ContextMenu` |
74
- | Small floating panel with content or a form | `Popover` |
75
- | Preview on hover (user card) | `HoverCard` |
76
- | Short label on hover or focus | `Tooltip` |
77
- | Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`) |
78
- | Small table, simple sort | `Table` (+ `useTableSort` for client sort) |
79
- | Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing) |
80
- | Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `filterCount` and `@filters-reset` |
81
- | Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge) |
82
- | Whole list page: search, filters, table, pagination | `ListPage` |
83
- | Page numbers and page size | `Pagination` |
84
- | Bulk actions bar for selected rows | `SelectionBar` |
85
- | Filter chips, active filters | `FilterPills` |
86
- | Tags, chips, removable labels | `Tag` |
87
- | Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
88
- | Reorder any list by drag and keyboard | `useSortable` |
89
- | Status label, counter, dot | `Badge` |
90
- | User picture or initials; stack of users | `Avatar`; `AvatarGroup` |
91
- | Key figure with delta and trend (KPI) | `Stat` |
92
- | Label and value pairs (details) | `DescriptionList` |
93
- | Event history, activity feed | `Timeline` |
94
- | Hierarchy, folders, drag to reorder | `Tree` |
95
- | Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`) |
96
- | Tabs | `Tabs` |
97
- | Wizard steps, step indicator (Step 2 of 4) | `Stepper` |
98
- | Collapsible sections, FAQ | `Accordion` |
99
- | Container with title and actions | `Card` |
100
- | Page title, description, breadcrumbs, actions | `PageHeader` (or a page template) |
101
- | Breadcrumbs only | `Breadcrumbs` |
102
- | Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
103
- | Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
104
- | Page that fills the panel height (a full height grid) | `content="fill"` or `"centered"` on `DashboardLayout` / `AppShell`, `definePageMeta({ content: 'fill' })` |
105
- | Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
106
- | Login, sign up, reset password page | `AuthLayout` (or the Nuxt layout `k-auth`) |
107
- | Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it) |
108
- | Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup` |
109
- | Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset` |
110
- | Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys |
111
- | Detail page of one record with tabs and aside | `DetailPage` |
112
- | Overview page with stats | `DashboardPage` |
113
- | First run screen with steps | `EmptyPage` |
114
- | Error page, 404 page | `ErrorPage`, `NotFoundPage` |
115
- | Empty state inside a card or list | `EmptyState` |
116
- | Loading placeholder for content | `Skeleton` |
117
- | Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`) |
118
- | Spinner; spinner that fills its container | `Spinner`; `Spinner block` |
119
- | Cover an area while it loads | `LoadingOverlay` |
120
- | Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`) |
121
- | Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button` |
122
- | Progress of a task | `Progress` (bar) or `ProgressRing` |
123
- | Value in a known range (quota, score) | `Meter` |
124
- | Inline message (info, warning, error) | `Alert` |
125
- | Copy text to the clipboard | `CopyButton` or `useCopy` |
126
- | Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd` |
127
- | Row or column layout with gap; responsive grid | `Stack`; `Grid` |
128
- | Line or labelled divider; section heading with actions | `Separator` |
129
- | Group of buttons or tools with arrow key navigation | `Toolbar` |
130
- | Text for screen readers only | `VisuallyHidden` |
131
- | Translations of the component texts | `useLocale` (languages: en, it, de) |
132
- | 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
+ | Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate` |
50
+ | Several choices as checkboxes | `CheckboxGroup` |
51
+ | One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form) |
52
+ | Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges) |
53
+ | Inline calendar | `Calendar` |
54
+ | Time of day | `TimeInput` |
55
+ | Color | `ColorInput` |
56
+ | Number in a range | `Slider` |
57
+ | One time code, OTP | `PinInput` |
58
+ | File or folder upload with drop zone | `FileInput` |
59
+ | Drop files on any element | `useFileDrop` |
60
+ | `useSortable` | Reorder any small list by pointer drag (live, Escape cancels) and Alt with the arrow keys, with an announcement. `TagList` uses it. | `useSortable(containerRef, { items, onMove(items, move), orientation, disabled, handle, canMove, label, movedText })` returns `{ itemProps(index), move(from, to), canMove, dragging, announcement }`. Bind `itemProps(index)` on each item and render `announcement` in a live region. | `data/tag-list.vue` |
61
+ | Confirm a destructive action | `useConfirm` |
62
+ | Show a message the user must acknowledge | `useAlert` |
63
+ | Ask for one text value | `usePrompt` |
64
+ | Short message after an action | `toast` |
65
+ | Toast for a promise (loading, success, error) | `toast.promise` |
66
+ | Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
67
+ | Detail or edit panel from the side | `Drawer` (or `useDrawer().open`) |
68
+ | Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
69
+ | Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
70
+ | Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
71
+ | Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute` |
72
+ | 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` |
73
+ | Commands of the open page in the command search | `usePageCommands(() => CommandItem[])` (DashboardLayout adds the group "This page") |
74
+ | A button made from a command (same label, icon and action as the palette) | `CommandButton` (`command`) |
75
+ | Short list of records with title, badge, action, skeleton and empty state | `RecordList` |
76
+ | Menu opened by a button | `DropdownMenu` |
77
+ | Right click menu | `ContextMenu` |
78
+ | Small floating panel with content or a form | `Popover` |
79
+ | Preview on hover (user card) | `HoverCard` |
80
+ | Short label on hover or focus | `Tooltip` |
81
+ | Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`) |
82
+ | Small table, simple sort | `Table` (+ `useTableSort` for client sort) |
83
+ | Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing) |
84
+ | Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `filterCount` and `@filters-reset` |
85
+ | Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge) |
86
+ | Whole list page: search, filters, table, pagination | `ListPage` |
87
+ | Page numbers and page size | `Pagination` |
88
+ | Bulk actions bar for selected rows | `SelectionBar` |
89
+ | Filter chips, active filters | `FilterPills` |
90
+ | Tags, chips, removable labels | `Tag` |
91
+ | Color per group or category (tags, labels, series) | `color` on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `PALETTE_COLORS`, `paletteColor(key)` |
92
+ | Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
93
+ | Reorder any list by drag and keyboard | `useSortable` |
94
+ | Status label, counter, dot | `Badge` |
95
+ | User picture or initials; stack of users | `Avatar`; `AvatarGroup` |
96
+ | Key figure with delta and trend (KPI) | `Stat` |
97
+ | Label and value pairs (details) | `DescriptionList` |
98
+ | Event history, activity feed | `Timeline` |
99
+ | Hierarchy, folders, drag to reorder | `Tree` |
100
+ | Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`) |
101
+ | Tabs | `Tabs` |
102
+ | Wizard steps, step indicator (Step 2 of 4) | `Stepper` |
103
+ | Collapsible sections, FAQ | `Accordion` |
104
+ | Container with title and actions | `Card` |
105
+ | Page title, description, breadcrumbs, actions | `PageHeader` (or a page template) |
106
+ | Breadcrumbs only | `Breadcrumbs` |
107
+ | Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
108
+ | Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
109
+ | Page that fills the panel height (a full height grid) | `content="fill"` or `"centered"` on `DashboardLayout` / `AppShell`, `definePageMeta({ content: 'fill' })` |
110
+ | Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
111
+ | Login, sign up, reset password page | `AuthLayout` (or the Nuxt layout `k-auth`) |
112
+ | Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it) |
113
+ | Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup` |
114
+ | Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset` |
115
+ | Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys |
116
+ | Detail page of one record with tabs and aside | `DetailPage` |
117
+ | Overview page with stats | `DashboardPage` |
118
+ | First run screen with steps | `EmptyPage` |
119
+ | Error page, 404 page | `ErrorPage`, `NotFoundPage` |
120
+ | Empty state inside a card or list | `EmptyState` |
121
+ | Loading placeholder for content | `Skeleton` |
122
+ | Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`) |
123
+ | Spinner; spinner that fills its container | `Spinner`; `Spinner block` |
124
+ | Cover an area while it loads | `LoadingOverlay` |
125
+ | Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`) |
126
+ | Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button` |
127
+ | Progress of a task | `Progress` (bar) or `ProgressRing` |
128
+ | Value in a known range (quota, score) | `Meter` |
129
+ | Inline message (info, warning, error) | `Alert` |
130
+ | Copy text to the clipboard | `CopyButton` or `useCopy` |
131
+ | Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd` |
132
+ | Row or column layout with gap; responsive grid | `Stack`; `Grid` |
133
+ | Line or labelled divider; section heading with actions | `Separator` |
134
+ | Group of buttons or tools with arrow key navigation | `Toolbar` |
135
+ | Text for screen readers only | `VisuallyHidden` |
136
+ | Translations of the component texts | `useLocale` (languages: en, it, de) |
137
+ | Custom icons | `createIcons`, `provideIcons`, Nuxt option `k.icons` |
133
138
 
134
139
  ## Core
135
140
 
@@ -153,47 +158,48 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
153
158
 
154
159
  All field components work inside `FormField` and take `invalid`, `disabled`, `readonly`, `required` and `size`. They use `v-model`.
155
160
 
156
- | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
157
- | ------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- |
158
- | `Checkbox` | One boolean, or one value in an array model. Use `Switch` for an instant setting. | Model: boolean or array. Props: `label`, `description`, `value`, `indeterminate`. Slots: default, `description`. | `forms/checkbox.vue` |
159
- | `CheckboxGroup` | Several choices as checkboxes from `options`. | Model: `T[]`. Props: `options` (`label`, `value`, `description`, `disabled`, `icon`), `legend`, `orientation`, `columns`, `variant` (default, filled), `name`. | `forms/checkbox-group.vue` |
160
- | `Radio` | One radio option, used inside `RadioGroup`. | Props: `value`, `label`, `description`, `icon`. Slots: default, `description`. | `forms/radio-group.vue` |
161
- | `RadioGroup` | One choice from a short list. Use `Select` for long lists, `SegmentedControl` for a compact toggle. | Model: value or null. Props: `options`, `legend`, `orientation`, `variant` (default, card), `name`. | `forms/radio-group.vue` |
162
- | `SegmentedControl` | Compact toggle between 2 to 5 options (view mode, period). | Model: value (with `required` it is never null). Props: `options` (`label`, `value`, `icon`, `title`, `muted`), `iconOnly`, `block`, `label`. Slot: `option`. | `forms/segmented-control.vue` |
163
- | `Select` | Native styled select. Use `Combobox` when search or async options are needed. | Model: `T or null`. Props: `options` (items or groups with `label`, `value`, `disabled`), `placeholder`, `icon`. Option values can be string, number or boolean. | `forms/select.vue` |
164
- | `Combobox` | Searchable select. Local filter, async `search`, `multiple` with tags, `creatable`. | Models: `v-model`, `v-model:query`. Props: `options` (`label`, `value`, `description`, `icon`, `keywords`), `search(query, signal)`, `filter`, `multiple`, `hideTags`, `creatable`, `createTransform`, `createValidate` (a returned string is the inline error), `debounce`, `minQueryLength`, `maxSelected`, `clearable`, `loading`, `placeholder`, `emptyText`. Slots: `option`, `empty`. Events: `create`, `open`, `close`. | `forms/combobox.vue` |
165
- | `Switch` | On or off setting that applies at once. | Model: boolean. Props: `label`, `description`, `labelPosition`, `checkedIcon`, `uncheckedIcon`, `name`. Slots: default, `description`. | `forms/switch.vue` |
166
- | `NumberInput` | Locale aware number with stepper, min, max, step. | Model: number or null. Props: `min`, `max`, `step`, `largeStep`, `locale`, `formatOptions` (currency, percent), `stepper`, `wheel`, `align`, `icon`, `placeholder`. | `forms/number-input.vue` |
167
- | `PasswordInput` | Password with show or hide, optional generator, copy and strength meter. | Model: string. Props: `generate` (true or a function), `copy`, `strength`, `minLength`, `autocomplete`. Event: `generate`. | `forms/password-input.vue` |
168
- | `PinInput` | One time code or PIN in separate cells. | Model: string. Props: `length`, `mode` (numeric, alphanumeric, alphabetic), `mask`, `uppercase`, `separatorAfter`, `autocomplete`. Event: `complete(value)`. | `forms/pin-input.vue` |
169
- | `InputGroup` | Join an input with addons or buttons on its sides. | Props: `label`, `size`, `block`. Slot: default (inputs, `InputAddon`, `Button`). | `forms/input-group.vue` |
170
- | `InputAddon` | Static text or icon (currency, domain, unit) inside an `InputGroup`. | Props: `label`, `icon`, `size`. Slot: default. | `forms/input-group.vue` |
171
- | `DateInput` | Native date, datetime-local, month or week input. Use `DatePicker` for a calendar popover or ranges. | Model: ISO string or null. Props: `type`, `min`, `max`, `step`, `clearable`. | `forms/date-input.vue` |
172
- | `DatePicker` | Input with a calendar popover. Single date or `range`. | Model: ISO string, range object (`start`, `end`) or null. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `format`, `closeOnSelect`, `clearable`. Slot: `footer`. | `forms/date-picker.vue` |
173
- | `Calendar` | Inline calendar. Use it for availability views, or as a building block. | Models: `v-model` (date or range), `v-model:month`. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `dayText(iso)`. Slots: `day`, `footer`. Event: `select`. | `forms/calendar.vue` |
174
- | `TimeInput` | Time of day (HH:MM, optional seconds). | Model: string or null. Props: `min`, `max`, `step`, `seconds`, `clearable`. | `forms/time-input.vue` |
175
- | `ColorInput` | Color text field with picker and swatches. | Model: hex string or null. Props: `swatches` (strings or `{ value, label }`), `placeholder`, `invalidText`. | `forms/color-input.vue` |
176
- | `Slider` | Number in a range with drag handle. | Model: number. Props: `min`, `max`, `step`, `bubble` (true, always), `marks`, `format(value)`, `label`. Event: `change` (on release). | `forms/slider.vue` |
177
- | `FileInput` | Drop zone and file picker. Validates type, size and count. Supports folders and previews. | Model: `File`, `File[]` or null. Props: `accept`, `acceptMode`, `maxSize`, `maxFiles`, `multiple`, `directory`, `directoryAction`, `previews`, `list`, `loading`, `capture`, `title`, `dropText`, `hint`. Slots: `title`, `hint`, `actions`. Events: `add`, `remove`, `invalid`, `reject`. | `forms/file-input.vue` |
161
+ | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
162
+ | ------------------ | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
163
+ | `Checkbox` | One boolean, or one value in an array model. Use `Switch` for an instant setting. | Model: boolean or array. Props: `label`, `description`, `value`, `indeterminate`. Slots: default, `description`. | `forms/checkbox.vue` |
164
+ | `CheckboxGroup` | Several choices as checkboxes from `options`. | Model: `T[]`. Props: `options` (`label`, `value`, `description`, `disabled`, `icon`), `legend`, `orientation`, `columns`, `variant` (default, filled), `name`. | `forms/checkbox-group.vue` |
165
+ | `Radio` | One radio option, used inside `RadioGroup`. | Props: `value`, `label`, `description`, `icon`. Slots: default, `description`. | `forms/radio-group.vue` |
166
+ | `RadioGroup` | One choice from a short list. Use `Select` for long lists, `SegmentedControl` for a compact toggle. | Model: value or null. Props: `options`, `legend`, `orientation`, `variant` (default, card), `name`. | `forms/radio-group.vue` |
167
+ | `SegmentedControl` | Compact toggle between 2 to 5 options (view mode, period). | Model: value (with `required` it is never null). Props: `options` (`label`, `value`, `icon`, `title`, `muted`), `iconOnly`, `block`, `label`. Slot: `option`. | `forms/segmented-control.vue` |
168
+ | `Select` | Native styled select. Use `Combobox` when search or async options are needed. | Model: `T or null`. Props: `options` (items or groups with `label`, `value`, `disabled`), `placeholder`, `icon`. Option values can be string, number or boolean. | `forms/select.vue` |
169
+ | `Combobox` | Searchable select. Local filter, async `search`, `multiple` with tags, `creatable`. | Models: `v-model`, `v-model:query`. Props: `options` (`label`, `value`, `description` (also the tooltip of a selected tag), `icon`, `color` (dot and tag color), `keywords`), `search(query, signal)`, `filter`, `multiple`, `hideTags`, `creatable`, `createTransform`, `createValidate` (a returned string is the inline error), `debounce`, `minQueryLength`, `maxSelected`, `clearable`, `loading`, `placeholder`, `emptyText`. Slots: `option`, `empty`, `header` (top of the panel, for example quick filter pills). Events: `create`, `open`, `close`. | `forms/combobox.vue` |
170
+ | `Switch` | On or off setting that applies at once. | Model: boolean. Props: `label`, `description`, `labelPosition`, `checkedIcon`, `uncheckedIcon`, `name`. Slots: default, `description`. | `forms/switch.vue` |
171
+ | `NumberInput` | Locale aware number with stepper, min, max, step. | Model: number or null. Props: `min`, `max`, `step`, `largeStep`, `locale`, `formatOptions` (currency, percent), `stepper`, `wheel`, `align`, `icon`, `placeholder`. | `forms/number-input.vue` |
172
+ | `PasswordInput` | Password with show or hide, optional generator, copy and strength meter. | Model: string. Props: `generate` (true or a function), `copy`, `strength`, `minLength`, `autocomplete`. Event: `generate`. | `forms/password-input.vue` |
173
+ | `PinInput` | One time code or PIN in separate cells. | Model: string. Props: `length`, `mode` (numeric, alphanumeric, alphabetic), `mask`, `uppercase`, `separatorAfter`, `autocomplete`. Event: `complete(value)`. | `forms/pin-input.vue` |
174
+ | `InputGroup` | Join an input with addons or buttons on its sides. | Props: `label`, `size`, `block`. Slot: default (inputs, `InputAddon`, `Button`). | `forms/input-group.vue` |
175
+ | `InputAddon` | Static text or icon (currency, domain, unit) inside an `InputGroup`. | Props: `label`, `icon`, `size`. Slot: default. | `forms/input-group.vue` |
176
+ | `DateInput` | Native date, datetime-local, month or week input. Use `DatePicker` for a calendar popover or ranges. | Model: ISO string or null. Props: `type`, `min`, `max`, `step`, `clearable`. | `forms/date-input.vue` |
177
+ | `DatePicker` | Input with a calendar popover. Single date or `range`. | Model: ISO string, range object (`start`, `end`) or null. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `format`, `closeOnSelect`, `clearable`. Slot: `footer`. | `forms/date-picker.vue` |
178
+ | `Calendar` | Inline calendar. Use it for availability views, or as a building block. | Models: `v-model` (date or range), `v-model:month`. Props: `range`, `min`, `max`, `isDateDisabled`, `locale`, `weekStartsOn`, `dayText(iso)`. Slots: `day`, `footer`. Event: `select`. | `forms/calendar.vue` |
179
+ | `TimeInput` | Time of day (HH:MM, optional seconds). | Model: string or null. Props: `min`, `max`, `step`, `seconds`, `clearable`. | `forms/time-input.vue` |
180
+ | `ColorInput` | Color text field with picker and swatches. | Model: hex string or null. Props: `swatches` (strings or `{ value, label }`), `placeholder`, `invalidText`. | `forms/color-input.vue` |
181
+ | `Slider` | Number in a range with drag handle. | Model: number. Props: `min`, `max`, `step`, `bubble` (true, always), `marks`, `format(value)`, `label`. Event: `change` (on release). | `forms/slider.vue` |
182
+ | `FileInput` | Drop zone and file picker. Validates type, size and count. Supports folders and previews. | Model: `File`, `File[]` or null. Props: `accept`, `acceptMode`, `maxSize`, `maxFiles`, `multiple`, `directory`, `directoryAction`, `previews`, `list`, `loading`, `capture`, `title`, `dropText`, `hint`. Slots: `title`, `hint`, `actions`. Events: `add`, `remove`, `invalid`, `reject`. | `forms/file-input.vue` |
178
183
 
179
184
  ## Overlays
180
185
 
181
186
  Mount `OverlayHost` once for the imperative hooks (see [Composables](#composables)).
182
187
 
183
- | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
184
- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ |
185
- | `Modal` | Centered dialog for forms and content. Use `Drawer` for a side panel, `useConfirm` for a yes or no question. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `size` (sm to xl, full, fit, fullscreen), `width`, `minHeight`, `dismissible`, `hideClose`, `sheet`, `flush`, `loading`, `beforeClose(reason)`, `tabs` (tabs in the header), `trail` (breadcrumb title and back button), `backLabel`. Slots: default (`{ tab }`), `header`, `actions` (header, before the close button), `footer`, `title-trailing`. Events: `open`, `close`, `afterLeave`, `navigate(index)`. | `overlays/modal.vue` |
186
- | `Drawer` | Panel from the side or bottom for details and edit forms. Use `Modal` for short focused dialogs. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side` (left, right, bottom), `size` (sm to xl, full), `dismissible`, `hideClose`, `flush`, `loading`, `beforeClose(reason)`, `tabs`, `trail`, `backLabel`. Slots like `Modal`. Events: `open`, `close`, `afterLeave`, `navigate(index)`. | `overlays/drawer.vue` |
187
- | `ConfirmDialog` | Declarative confirm dialog. Prefer `useConfirm()`. Use this one only when the dialog state lives in the template. | Model: `v-model:open`. Props: `title`, `description`, `confirmLabel`, `cancelLabel`, `tone`, `icon`, `hideCancel`, `onConfirm`. Events: `resolve(confirmed)`, `cancel`, `afterLeave`. | `overlays/confirm-dialog.vue` |
188
- | `ConfirmHost` | Renders the dialogs of `useConfirm`, `useAlert`, `usePrompt`. `OverlayHost` includes it. Do not mount it alone. | None. | - |
189
- | `OverlayHost` | One mount point for toasts, confirm dialogs, programmatic modals and loading indicators. | Props: `toaster` (true or options), `confirm`, `modals`, `loading` (true or `{ bar, delay, label }`). | `overlays/hooks.vue` |
190
- | `Toaster` | Renders toasts. `OverlayHost` includes it. Use it directly only for custom options. The stack moves out of the way of an open side Drawer (beside it, or above its footer). | Props: `position`, `max`, `duration`, `gap`, `expand`, `progress`, `hotkey`. | `overlays/toast.vue` |
191
- | `DropdownMenu` | Menu opened by its trigger. Items can have icons, shortcuts, checkboxes, radios, sub menus and links. | Model: `v-model:open`. Props: `items` (`label`, `icon`, `to`, `href`, `tone: danger`, `shortcut`, `disabled`, `children`, `onSelect`; also `type`: checkbox, radio, label, separator), `placement`, `offset`, `matchTriggerWidth`, `minWidth`. Slot: default (the trigger). Event: `select`. | `overlays/dropdown-menu.vue` |
192
- | `ContextMenu` | Menu on right click of the wrapped area. | Model: `v-model:open`. Props: `items` (same as `DropdownMenu`), `disabled`. Slot: default (the area). Event: `select`. | `overlays/context-menu.vue` |
193
- | `Popover` | Floating panel with any content (a form, filters) opened by its trigger. Use `DropdownMenu` for a list of actions. | Model: `v-model:open`. Props: `placement`, `offset`, `arrow`, `label`, `initialFocus`. Slots: default (the trigger), `content`. | `overlays/popover.vue` |
194
- | `HoverCard` | Rich preview on hover or focus (user card, link preview). Use `Tooltip` for plain text. | Model: `v-model:open`. Props: `placement`, `openDelay`, `closeDelay`, `arrow`, `disabled`. Slots: default (trigger), `content`. | `overlays/hover-card.vue` |
195
- | `Tooltip` | Short text on hover or focus. Optional shortcut. | Props: `text`, `placement`, `openDelay`, `closeDelay`, `arrow`, `shortcut`, `disabled`. Slots: default (trigger), `content`. | `overlays/tooltip.vue` |
196
- | `CommandPalette` | Search and command dialog (Cmd+K) with groups, recent items, async search and typed item data. | Models: `v-model:open`, `v-model:query`. Props: `groups` (items with `id`, `label`, `description`, `icon`, `shortcut`, `keywords`, `to`, `data`, `onSelect`), `search(query, signal)`, `shortcut`, `trigger`, `recentKey`, `emptyText`, `notice`. Slots: `item`, `empty`, `group-label`, `after-results`. Events: `select`, `open`, `close`. | `overlays/command-palette.vue` |
188
+ | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
189
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ |
190
+ | `Modal` | Centered dialog for forms and content. Use `Drawer` for a side panel, `useConfirm` for a yes or no question. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `size` (sm to xl, full, fit, fullscreen), `width`, `minHeight`, `dismissible`, `hideClose`, `sheet`, `flush`, `loading`, `beforeClose(reason)`, `tabs` (tabs in the header), `trail` (breadcrumb title and back button), `backLabel`. Slots: default (`{ tab }`), `header`, `actions` (header, before the close button), `footer`, `title-trailing`. Events: `open`, `close`, `afterLeave`, `navigate(index)`. | `overlays/modal.vue` |
191
+ | `Drawer` | Panel from the side or bottom for details and edit forms. Use `Modal` for short focused dialogs. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side` (left, right, bottom), `size` (sm to xl, full), `dismissible`, `hideClose`, `flush`, `loading`, `beforeClose(reason)`, `tabs`, `trail`, `backLabel`. Slots like `Modal`. Events: `open`, `close`, `afterLeave`, `navigate(index)`. | `overlays/drawer.vue` |
192
+ | `ConfirmDialog` | Declarative confirm dialog. Prefer `useConfirm()`. Use this one only when the dialog state lives in the template. | Model: `v-model:open`. Props: `title`, `description`, `confirmLabel`, `cancelLabel`, `tone`, `icon`, `hideCancel`, `onConfirm`. Events: `resolve(confirmed)`, `cancel`, `afterLeave`. | `overlays/confirm-dialog.vue` |
193
+ | `ConfirmHost` | Renders the dialogs of `useConfirm`, `useAlert`, `usePrompt`. `OverlayHost` includes it. Do not mount it alone. | None. | - |
194
+ | `OverlayHost` | One mount point for toasts, confirm dialogs, programmatic modals and loading indicators. | Props: `toaster` (true or options), `confirm`, `modals`, `loading` (true or `{ bar, delay, label }`). | `overlays/hooks.vue` |
195
+ | `Toaster` | Renders toasts. `OverlayHost` includes it. Use it directly only for custom options. The stack moves out of the way of an open side Drawer (beside it, or above its footer). | Props: `position`, `max`, `duration`, `gap`, `expand`, `progress`, `hotkey`. | `overlays/toast.vue` |
196
+ | `DropdownMenu` | Menu opened by its trigger. Items can have icons, shortcuts, checkboxes, radios, sub menus and links. | Model: `v-model:open`. Props: `items` (`label`, `icon`, `to`, `href`, `tone: danger`, `shortcut`, `disabled`, `children`, `onSelect`; also `type`: checkbox, radio, label, separator), `placement`, `offset`, `matchTriggerWidth`, `minWidth`. Slot: default (the trigger). Event: `select`. | `overlays/dropdown-menu.vue` |
197
+ | `ContextMenu` | Menu on right click of the wrapped area. | Model: `v-model:open`. Props: `items` (same as `DropdownMenu`), `disabled`. Slot: default (the area). Event: `select`. | `overlays/context-menu.vue` |
198
+ | `Popover` | Floating panel with any content (a form, filters) opened by its trigger. Use `DropdownMenu` for a list of actions. | Model: `v-model:open`. Props: `placement`, `offset`, `arrow`, `label`, `initialFocus`. Slots: default (the trigger), `content`. | `overlays/popover.vue` |
199
+ | `HoverCard` | Rich preview on hover or focus (user card, link preview). Use `Tooltip` for plain text. | Model: `v-model:open`. Props: `placement`, `openDelay`, `closeDelay`, `arrow`, `disabled`. Slots: default (trigger), `content`. | `overlays/hover-card.vue` |
200
+ | `Tooltip` | Short text on hover or focus. Optional shortcut. | Props: `text`, `placement`, `openDelay`, `closeDelay`, `arrow`, `shortcut`, `disabled`. Slots: default (trigger), `content`. | `overlays/tooltip.vue` |
201
+ | `CommandPalette` | Search and command dialog (Cmd+K) with groups, recent items, async search and typed item data. Groups take `icon` (default item icon) and `more` (a last "show all" item). Matching (`matchesSearch`, exported) finds every word in any order, without case or accents. | Models: `v-model:open`, `v-model:query`. Props: `groups` (items with `id`, `label`, `description`, `icon`, `shortcut`, `keywords`, `to`, `data`, `onSelect`), `search(query, signal)`, `shortcut`, `trigger`, `recentKey`, `emptyText`, `notice`. Slots: `item`, `empty`, `group-label`, `after-results`. Events: `select`, `open`, `close`. | `overlays/command-palette.vue` |
202
+ | `CommandButton` | A `Button` made from a `CommandItem`: label, icon, `to`, `href`, `disabled` and `onSelect` come from the command. | Props: `command`, `label`, `icon`, and every `Button` prop (size, variant, tone). | `overlays/command-palette.vue` |
197
203
 
198
204
  ## Data
199
205
 
@@ -202,14 +208,15 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
202
208
  | `Table` | Small to medium table with sort, selection, links and loading rows. For thousands of rows or editing use `DataGrid`. | Models: `v-model:sort` (`{ key, direction }`), `v-model:selected` (row keys). Props: `rows`, `columns` (`key`, `label`, `align`, `width`, `numeric`, `sortable`, `value`, `format`), `rowKey`, `selectable`, `rowTo`, `loading`, `emptyText`, `density`, `stickyHeader`, `maxHeight`, `bordered`, `caption`. Slots: `cell-<key>`, `header-<key>`, `empty`. Event: `rowClick`. | `data/table.vue` |
203
209
  | `Pagination` | Page buttons, page size select and summary. Client or server paging. | Models: `v-model:page`, `v-model:pageSize`. Props: `total`, `pageSizes` (numbers, `'all'` for every row), `allLabel`, `showEdges`, `showJump`, `compact`, `loading`, `showSummary`. Slot: `summary`. | `data/pagination.vue` |
204
210
  | `SelectionBar` | Shows the selected count and bulk actions for a list or table. | Props: `count`, `total`, `placement` (inline, sticky, floating), `onSelectAll`, `onClear`. Slots: `actions`, `count`. With `count` 0 it renders nothing visible. | `data/selection-bar.vue` |
205
- | `FilterPills` | Quick filters as pills: single, multiple, menu or panel pills, removable active filters. | Model: value, array (`multiple`) or null. Props: `options` (`value`, `label`, `valueLabel`, `count`, `icon`, `menu`, `panel`, `removable`), `multiple`, `required`, `clearable`, `size`. Slots: `pill`, `panel-<value>`. Events: `select`, `remove`. | `data/filter-pills.vue` |
211
+ | `FilterPills` | Quick filters as pills: single, multiple, menu or panel pills, removable active filters. | Model: value, array (`multiple`) or null. Props: `options` (`value`, `label`, `valueLabel`, `count`, `icon`, `color`, `menu`, `panel`, `removable`), `multiple`, `required`, `clearable`, `size`. Slots: `pill`, `panel-<value>`. Events: `select`, `remove`. | `data/filter-pills.vue` |
206
212
  | `FilterPill` | One pill button. Use it alone for a custom filter trigger. `FilterPills` uses it. | Props: `label`, `valueLabel`, `icon`, `count`, `active`, `pressed`, `caret`, `size`, `disabled`. Slot: default. | `data/filter-pills.vue` |
207
- | `Tag` | Chip or label, optionally removable. Use `Badge` for a status. | Props: `label`, `tone`, `size`, `icon`, `removable`, `removeLabel`, `removeTabindex`, `disabled`. Slot: default. Event: `remove`. | `data/tag.vue` |
213
+ | `Tag` | Chip or label, optionally removable. Use `Badge` for a status. | Props: `label`, `tone`, `color` (palette color), `size`, `icon`, `removable`, `removeLabel`, `removeTabindex`, `disabled`. Slot: default. Event: `remove`. | `data/tag.vue` |
208
214
  | `TagList` | A list of `Tag` chips, reorderable by drag, by keyboard (Alt with an arrow key) or move buttons, removable, and a drop target for items dragged from another panel (columns of an export). | Model: `v-model` (`TagListItem[]`: `value`, `label`, `tone`, `icon`, `removable`, `disabled`). Props: `label`, `sortable`, `removable`, `moveButtons`, `accept` (MIME types or a function), `dropEffect`, `tone`, `size`, `disabled`, `emptyText`, `removeLabel`. Slots: `item`, `empty`. Events: `remove`, `move`, `itemDrop` (`{ index, dataTransfer, event }`). | `data/tag-list.vue` |
209
- | `Badge` | Status label, counter or dot. Not interactive. | Props: `label` (string or number), `tone`, `variant` (soft, solid, outline), `size`, `dot`, `pulse`, `icon`. Slot: default. | `data/badge.vue` |
215
+ | `Badge` | Status label, counter or dot. Not interactive. | Props: `label` (string or number), `tone`, `color` (palette color), `variant` (soft, solid, outline), `size`, `dot`, `pulse`, `icon`. Slot: default. | `data/badge.vue` |
210
216
  | `Avatar` | User picture with initials fallback and status dot. | Props: `src`, `name`, `alt`, `size` (xs to xl), `shape` (circle, square), `status` (online, away, busy, offline), `decorative`. Slot: `fallback`. | `data/avatar.vue` |
211
217
  | `AvatarGroup` | Overlapping stack of avatars with "+N". | Props: `items` (`src`, `name`, `alt`), `max`, `size`, `shape`, `moreLabel`. | `data/avatar.vue` |
212
218
  | `Stat` | Key figure (KPI) with unit, delta, trend, hint and optional sparkline. Can be a link. | Props: `label`, `value`, `unit`, `delta`, `trend` (up, down, flat), `invert` (down is good), `hint`, `icon`, `loading`, `to`, `href`, `plain`. Slots: `label`, `value`, `icon`, `sparkline`, `footer`. | `data/stat.vue` |
219
+ | `RecordList` | Short list of records (settings, users, tokens): title, badge, description, leading and action slots, `SkeletonList` while `loading`, empty state. | Props: `items` (`RecordListItem`: `id`, `title`, `description`, `badge` `{ label, tone }`), `loading`, `avatar`, `action`, `label`, `skeletonRows`, `emptyText`, `emptyDescription`, `emptyIcon`. Slots: `leading`, `action` (`{ item }`), `empty`. | `data/record-list.vue` |
213
220
  | `DescriptionList` | Label and value pairs for a record. Use it on detail views. | Props: `items` (`key`, `label`, `value`, `hint`), `layout` (stacked, inline, grid), `columns`, `divided`, `emptyText`. Slots: `term`, `value`, `value-<key>`. | `data/description-list.vue` |
214
221
  | `Timeline` | Vertical list of events or activity. | Props: `items` (`title`, `description`, `time`, `datetime`, `icon`, `tone`), `compact`. Slot: `item`. | `data/timeline.vue` |
215
222
  | `Tree` | Expandable hierarchy with selection, drag to reorder and nesting. | Models: `v-model:expanded`, `v-model:selected`. Props: `nodes` (`id`, `label`, `description`, `meta`, `icon`, `children`, `disabled`), `selectable`, `reorderable`, `nestable`, `moveButtons` (default `true`; `false` hides the row arrows, drag and Alt+arrow keys still work), `canDrop`, `size`, `checkmark`, `emptyText`. Slots: `label`, `meta`, `empty`. Events: `select`, `move`. | `data/tree.vue` |
@@ -260,7 +267,7 @@ Templates combine core parts into whole pages and layouts. Start from them for n
260
267
  | `AuthLayout` | Login, sign up and reset password frame. Centered card or split with aside. | Props: `variant` (centered, split), `title`, `description`, `footer`, `brandName`, `brandIcon`, `brandLogo`, `asideTitle`, `asideDescription`, `themeSwitch`. Slots: default, `links`, `footer`, `brand`, `aside`, `corner`. | `templates/auth-layout.vue` |
261
268
  | `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` |
262
269
  | `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` |
263
- | `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`, `tabs`, `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` |
270
+ | `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`, `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` |
264
271
  | `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` |
265
272
  | `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` |
266
273
  | `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` |
@@ -286,7 +293,7 @@ Import from `@xleddyl/443-components-vue/grid`. It wraps AG Grid Community.
286
293
  | `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), `density`, `selectable`, `loading`, `height`, `fill`, `autoHeight`, `toolbar`, `searchable`, `columnMenu`, `exportable`, `serverSort`, `pagination`, `serverPagination`, `total`, `filterable`, `editable`, `spreadsheet`, `gridOptions`, `messages`, `filterCount`. 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`, `rowClick`, `selectionChange`, `sortChange`, `filterChange`, `cellsChange`, `cellsInvalid`, `dirtyChange`, `rangeChange`, `copy`. | `grid/data-grid.vue` |
287
294
  | `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`, `undo`, `redo`, `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` |
288
295
  | `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`. Model: `v-model` (query). Slots: default (actions), `filters`. Events: `resetColumns`, `filtersReset`. | - |
289
- | Cell renderers | Use as `cellRenderer` in a column definition, with `cellRendererParams`. | `BadgeCell` (`tones`, `labels`, `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`; an inline button that does not trigger the row click). | `grid/data-grid.vue` |
296
+ | 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`; an inline button that does not trigger the row click). | `grid/data-grid.vue` |
290
297
 
291
298
  Grid helpers: `registerGridModules`, `registerGridEditorModules`, `registerGridFilterModules`, `registerGridSpreadsheetModules` (register AG Grid modules by hand), `createGridTheme`, `parseTsv`, `formatTsv`.
292
299
 
@@ -310,6 +317,10 @@ Import from `@xleddyl/443-components-vue/chart`. It wraps Chart.js. Colors come
310
317
 
311
318
  Chart helpers: `useChartColors`, `readChartColors`, `withAlpha`, `registerChartModules`.
312
319
 
320
+ ## Palette
321
+
322
+ `PALETTE_COLORS` is a categorical palette of 12 colors (`--k-palette-<name>` tokens, light and dark). `paletteColor(key)` gives a stable color for a string, `paletteClass(color)` the class that sets `--k-palette` and `--k-palette-text` on your own elements.
323
+
313
324
  ## Composables
314
325
 
315
326
  All are exported from `@xleddyl/443-components-vue` and auto-imported in Nuxt.
@@ -320,7 +331,7 @@ All are exported from `@xleddyl/443-components-vue` and auto-imported in Nuxt.
320
331
  | `useField`, `useFieldControl` | Build your own field control that reads the surrounding `FormField` (id, invalid, described by). | `useFieldControl({ role: 'auxiliary' })` for a secondary control. `control.setControlError(message)` reports a control level error. | `core/form-field.vue` |
321
332
  | `provideFieldBoundary`, `provideAuxiliaryControls` | In your own overlay component, stop controls from inheriting the field context of the trigger. | Call in `setup`. | - |
322
333
  | `toast` / `useToast` | Toasts. | `toast(title, opts)`, `toast.success`, `.error`, `.warning`, `.info`, `.loading`, `.promise(promise, { loading, success, error })`, `.update(id, opts)`, `.dismiss(id)`. Options: `description` (string or list), `action` (`label`, `onClick`), `duration`, `dismissible`. | `overlays/toast.vue` |
323
- | `useConfirm` | Ask yes or no. Returns a promise of `true` or `false`. | `await useConfirm()({ title, description, tone, confirmLabel, cancelLabel, body })`. | `overlays/hooks.vue` |
334
+ | `useConfirm` | Ask yes or no. Returns a promise of `true` or `false`. | `await useConfirm()({ title, description, tone, confirmLabel, cancelLabel, body })`. Presets: `confirm.delete(title, options?)` (danger, Delete) and `confirm.discard(options?)` (unsaved changes). | `overlays/hooks.vue` |
324
335
  | `useAlert` | Show a message and wait until the user closes it. | `await useAlert()({ title, description, tone })`. | `overlays/hooks.vue` |
325
336
  | `usePrompt` | Ask for one text value. Returns the string or `null`. | `await usePrompt()({ title, label, value, placeholder, type, required, validate(value), onConfirm(value) })`. | `overlays/hooks.vue` |
326
337
  | `useModal`, `useDrawer`, `useOverlay` | Open a component as a modal or drawer and await its result. Use it when the content is a component with its own logic. | `const result = await useModal().open(Component, props, { title, size, beforeClose })`. The handle has `id`, `close(result)`, `update(props)`. `useModal().close(id?)`, `closeAll()`. `useOverlay` is the base (option `as`). | `overlays/hooks.vue` |