@xleddyl/443-components-vue 0.16.93 → 0.16.95

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 (46) hide show
  1. package/CATALOG.md +176 -166
  2. package/README.md +78 -14
  3. package/dist/components/core/Button.vue.d.ts +3 -3
  4. package/dist/components/data/SortableList.vue +120 -0
  5. package/dist/components/data/SortableList.vue.d.ts +48 -0
  6. package/dist/components/data/Table.vue +43 -3
  7. package/dist/components/data/Table.vue.d.ts +8 -2
  8. package/dist/components/data/Thumbnail.vue +157 -0
  9. package/dist/components/data/Thumbnail.vue.d.ts +439 -0
  10. package/dist/components/data/TileGrid.vue +274 -0
  11. package/dist/components/data/TileGrid.vue.d.ts +51 -0
  12. package/dist/components/data/index.d.ts +3 -0
  13. package/dist/components/data/index.mjs +3 -0
  14. package/dist/components/data/types.d.ts +39 -0
  15. package/dist/components/forms/FocalPointInput.vue +251 -0
  16. package/dist/components/forms/FocalPointInput.vue.d.ts +426 -0
  17. package/dist/components/forms/PaletteSelect.vue.d.ts +2 -2
  18. package/dist/components/forms/index.d.ts +1 -0
  19. package/dist/components/forms/index.mjs +1 -0
  20. package/dist/components/layout/ThemeSwitch.vue.d.ts +2 -2
  21. package/dist/components/layout/types.d.ts +1 -1
  22. package/dist/components/templates/FormPage.vue.d.ts +2 -2
  23. package/dist/composables/useSortable.d.ts +1 -0
  24. package/dist/composables/useSortable.mjs +40 -11
  25. package/dist/grid/cells/ButtonCell.vue.d.ts +2 -2
  26. package/dist/icons/builtin.d.ts +3 -0
  27. package/dist/icons/builtin.mjs +7 -0
  28. package/dist/internal/data/sortable.d.ts +4 -1
  29. package/dist/internal/data/sortable.mjs +49 -0
  30. package/dist/locale/de.mjs +23 -0
  31. package/dist/locale/en.mjs +23 -0
  32. package/dist/locale/it.mjs +23 -0
  33. package/dist/locale/types.d.ts +23 -0
  34. package/dist/styles/data/sortable-list.css +185 -0
  35. package/dist/styles/data/table.css +12 -0
  36. package/dist/styles/data/thumbnail.css +209 -0
  37. package/dist/styles/data/tile-grid.css +144 -0
  38. package/dist/styles/data.css +3 -0
  39. package/dist/styles/forced-colors.css +42 -0
  40. package/dist/styles/forms/focal-point-input.css +154 -0
  41. package/dist/styles/forms.css +1 -0
  42. package/dist/styles/layout/card.css +84 -0
  43. package/dist/styles/shared.css +2 -1
  44. package/dist/styles/tailwind.css +2 -0
  45. package/dist/styles/tokens.css +2 -0
  46. package/package.json +1 -1
package/CATALOG.md CHANGED
@@ -28,120 +28,126 @@ 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 | Nothing for a `Form`: it registers itself in the leave guard (modal, drawer, settings modal, page). `useLeaveGuard(dirty)` for other state, `guard: false` to opt out |
39
- | Form in a modal (title, fields, cancel, delete, submit) | `FormModal` |
40
- | Floating "unsaved changes" bar | `SaveBar` |
41
- | Single line text | `Input` |
42
- | Multi line text | `Textarea` |
43
- | Rich text (bold, lists, links) | `RichTextEditor` (group `editor`) |
44
- | Template with placeholders ({name} {size}) | `TemplateEditor`, `TemplateText` (group `editor`) |
45
- | Password with strength meter and generator | `PasswordInput` |
46
- | Number with stepper, locale format | `NumberInput` |
47
- | Money or unit prefix and suffix around an input | `InputGroup` + `InputAddon` |
48
- | One choice from a short list (5 or fewer) | `RadioGroup` or `SegmentedControl` |
49
- | One choice from a longer list, no search | `Select` |
50
- | One choice from a short fixed list with a color dot or an icon, no search | `Combobox` with `:searchable="false"` (a button trigger with typeahead, also `multiple`) |
51
- | Searchable select, async search, multi select, create option | `Combobox` |
52
- | Pick one node of a hierarchy (category, folder) | `TreeSelect` (`leavesOnly` to allow only leaves) |
53
- | Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate` |
54
- | Several create actions for the typed text (create here, create in a form) | `Combobox` with `createActions` |
55
- | Several choices as checkboxes | `CheckboxGroup` |
56
- | One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form) |
57
- | Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges) |
58
- | Inline calendar | `Calendar` |
59
- | Time of day | `TimeInput` |
60
- | Color | `ColorInput` |
61
- | Number in a range | `Slider` |
62
- | One time code, OTP | `PinInput` |
63
- | File or folder upload with drop zone | `FileInput` |
64
- | Drop files on any element | `useFileDrop` |
65
- | Confirm a destructive action | `useConfirm` |
66
- | Show a message the user must acknowledge | `useAlert` |
67
- | Ask for one text value | `usePrompt` |
68
- | Short message after an action | `toast` |
69
- | Toast for a promise (loading, success, error) | `toast.promise` |
70
- | Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
71
- | 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. |
72
- | Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
73
- | Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
74
- | Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
75
- | Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute` |
76
- | 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 |
77
- | Commands of the open page in the command search | `usePageCommands(() => CommandItem[])` (DashboardLayout adds the group "This page") |
78
- | A button made from a command (same label, icon and action as the palette) | `CommandButton` (`command`) |
79
- | Short list of records with title, badge, action, skeleton and empty state | `RecordList` |
80
- | Menu opened by a button | `DropdownMenu` |
81
- | Right click menu | `ContextMenu` |
82
- | Small floating panel with content or a form | `Popover` |
83
- | Preview on hover (user card) | `HoverCard` |
84
- | Short label on hover or focus | `Tooltip` |
85
- | Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`), `CommandList` for the same list inline or in a `Popover` |
86
- | Small table, simple sort | `Table` (+ `useTableSort` for client sort) |
87
- | Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing) |
88
- | Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `activeFilters` (or `filterCount`), `@filter-remove` and `@filters-reset` |
89
- | Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge) |
90
- | Whole list page: search, filters, table, pagination | `ListPage` |
91
- | Page numbers and page size | `Pagination` |
92
- | Bulk actions bar for selected rows | `SelectionBar` |
93
- | Filter chips, active filters | `FilterPills` |
94
- | Tags, chips, removable labels | `Tag` |
95
- | Color per group or category (tags, labels, series) | `color` (palette name or hex) on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `paletteColor(key)` |
96
- | Choose a palette color (a group, a division) | `PaletteSelect` (`v-model` color or null, `clearable` for "Automatic", `custom` for any hex color) |
97
- | Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
98
- | Reorder any list by drag and keyboard | `useSortable` |
99
- | Status label, counter, dot | `Badge` |
100
- | User picture or initials; stack of users | `Avatar`; `AvatarGroup` |
101
- | Key figure with delta and trend (KPI) | `Stat` |
102
- | Label and value pairs (details) | `DescriptionList` |
103
- | Event history, activity feed | `Timeline` |
104
- | Hierarchy, folders, drag to reorder | `Tree` |
105
- | Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`) |
106
- | Tabs | `Tabs` |
107
- | Wizard steps, step indicator (Step 2 of 4) | `Stepper` |
108
- | Collapsible sections, FAQ | `Accordion` |
109
- | Container with title and actions | `Card` |
110
- | Page title, description, breadcrumbs, actions | `PageHeader` (or a page template) |
111
- | Breadcrumb trail as the page title (a record, a nested page) | `trail` on `PageHeader` |
112
- | Breadcrumbs only | `Breadcrumbs` |
113
- | Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
114
- | Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
115
- | 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 |
116
- | Page that fills the panel height (a full height grid) | `content="fill"` or `"centered"` on `DashboardLayout` / `AppShell`, `definePageMeta({ content: 'fill' })`, with `DataGrid fill` or `ListPage fill` |
117
- | Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
118
- | Login, sign up, reset password page | `AuthLogin` + `AuthLogout` (two step flow); `AuthLayout` (or `k-auth`) for other pages |
119
- | Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it) |
120
- | Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup` |
121
- | Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset` |
122
- | Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys |
123
- | Detail page of one record with tabs and aside | `DetailPage` |
124
- | Overview page with stats | `DashboardPage` |
125
- | First run screen with steps | `EmptyPage` |
126
- | Error page, 404 page | `ErrorPage`, `NotFoundPage` |
127
- | Empty state inside a card or list | `EmptyState` |
128
- | Loading placeholder for content | `Skeleton` |
129
- | Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`) |
130
- | Spinner; spinner that fills its container | `Spinner`; `Spinner block` |
131
- | Cover an area while it loads | `LoadingOverlay` |
132
- | Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`) |
133
- | Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button` |
134
- | Progress of a task | `Progress` (bar) or `ProgressRing` |
135
- | Value in a known range (quota, score) | `Meter` |
136
- | Inline message (info, warning, error) | `Alert` |
137
- | Copy text to the clipboard | `CopyButton` or `useCopy` |
138
- | Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd` |
139
- | Row or column layout with gap; responsive grid | `Stack`; `Grid` |
140
- | Line or labelled divider; section heading with actions | `Separator` |
141
- | Group of buttons or tools with arrow key navigation | `Toolbar` |
142
- | Text for screen readers only | `VisuallyHidden` |
143
- | Translations of the component texts | `useLocale` (languages: en, it, de) |
144
- | 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 | Nothing for a `Form`: it registers itself in the leave guard (modal, drawer, settings modal, page). `useLeaveGuard(dirty)` for other state, `guard: false` to opt out |
39
+ | Form in a modal (title, fields, cancel, delete, submit) | `FormModal` |
40
+ | Floating "unsaved changes" bar | `SaveBar` |
41
+ | Single line text | `Input` |
42
+ | Multi line text | `Textarea` |
43
+ | Rich text (bold, lists, links) | `RichTextEditor` (group `editor`) |
44
+ | Template with placeholders ({name} {size}) | `TemplateEditor`, `TemplateText` (group `editor`) |
45
+ | Password with strength meter and generator | `PasswordInput` |
46
+ | Number with stepper, locale format | `NumberInput` |
47
+ | Money or unit prefix and suffix around an input | `InputGroup` + `InputAddon` |
48
+ | One choice from a short list (5 or fewer) | `RadioGroup` or `SegmentedControl` |
49
+ | One choice from a longer list, no search | `Select` |
50
+ | One choice from a short fixed list with a color dot or an icon, no search | `Combobox` with `:searchable="false"` (a button trigger with typeahead, also `multiple`) |
51
+ | Searchable select, async search, multi select, create option | `Combobox` |
52
+ | Pick one node of a hierarchy (category, folder) | `TreeSelect` (`leavesOnly` to allow only leaves) |
53
+ | Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate` |
54
+ | Several create actions for the typed text (create here, create in a form) | `Combobox` with `createActions` |
55
+ | Several choices as checkboxes | `CheckboxGroup` |
56
+ | One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form) |
57
+ | Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges) |
58
+ | Inline calendar | `Calendar` |
59
+ | Time of day | `TimeInput` |
60
+ | Color | `ColorInput` |
61
+ | Number in a range | `Slider` |
62
+ | One time code, OTP | `PinInput` |
63
+ | File or folder upload with drop zone | `FileInput` |
64
+ | Focal point of an image (the part kept in view when cropped) | `FocalPointInput` (preview the crops with `Thumbnail` `focal`) |
65
+ | Drop files on any element | `useFileDrop` |
66
+ | Confirm a destructive action | `useConfirm` |
67
+ | Show a message the user must acknowledge | `useAlert` |
68
+ | Ask for one text value | `usePrompt` |
69
+ | Short message after an action | `toast` |
70
+ | Toast for a promise (loading, success, error) | `toast.promise` |
71
+ | Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
72
+ | 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. |
73
+ | Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
74
+ | Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
75
+ | Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
76
+ | Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute` |
77
+ | 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 |
78
+ | Commands of the open page in the command search | `usePageCommands(() => CommandItem[])` (DashboardLayout adds the group "This page") |
79
+ | A button made from a command (same label, icon and action as the palette) | `CommandButton` (`command`) |
80
+ | Short list of records with title, badge, action, skeleton and empty state | `RecordList` |
81
+ | Menu opened by a button | `DropdownMenu` |
82
+ | Right click menu | `ContextMenu` |
83
+ | Small floating panel with content or a form | `Popover` |
84
+ | Preview on hover (user card) | `HoverCard` |
85
+ | Short label on hover or focus | `Tooltip` |
86
+ | Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`), `CommandList` for the same list inline or in a `Popover` |
87
+ | Small table, simple sort | `Table` (+ `useTableSort` for client sort) |
88
+ | Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing) |
89
+ | Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `activeFilters` (or `filterCount`), `@filter-remove` and `@filters-reset` |
90
+ | Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge) |
91
+ | Whole list page: search, filters, table, pagination | `ListPage` |
92
+ | Page numbers and page size | `Pagination` |
93
+ | Bulk actions bar for selected rows | `SelectionBar` |
94
+ | Filter chips, active filters | `FilterPills` |
95
+ | Tags, chips, removable labels | `Tag` |
96
+ | Color per group or category (tags, labels, series) | `color` (palette name or hex) on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `paletteColor(key)` |
97
+ | Choose a palette color (a group, a division) | `PaletteSelect` (`v-model` color or null, `clearable` for "Automatic", `custom` for any hex color) |
98
+ | Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
99
+ | Reorder rows with a handle and switches (columns, steps) | `SortableList` (`v-model`, `#trailing`) |
100
+ | Reorder any list by drag and keyboard | `useSortable` |
101
+ | Status label, counter, dot | `Badge` |
102
+ | User picture or initials; stack of users | `Avatar`; `AvatarGroup` |
103
+ | Preview of an image, video or file (media grid, upload tile, table cell) | `Thumbnail` |
104
+ | Grid of tiles: media library with selection and drag to folders, reorderable blocks with an add tile | `TileGrid` (`selectable`, `sortable`, `dragData`, `#add`) |
105
+ | Drag table rows onto folders or other drop targets | `Table` (`rowDraggable` + `dragData`, or `rowAttrs`) |
106
+ | Key figure with delta and trend (KPI) | `Stat` |
107
+ | Label and value pairs (details) | `DescriptionList` |
108
+ | Event history, activity feed | `Timeline` |
109
+ | Hierarchy, folders, drag to reorder | `Tree` |
110
+ | Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`) |
111
+ | Tabs | `Tabs` |
112
+ | Wizard steps, step indicator (Step 2 of 4) | `Stepper` |
113
+ | Collapsible sections, FAQ | `Accordion` |
114
+ | Container with title and actions | `Card` |
115
+ | "Add" tile next to a grid of items, empty drop area | `Card` `variant="dashed"` (`as="button"`, `icon`, `title`) |
116
+ | Page title, description, breadcrumbs, actions | `PageHeader` (or a page template) |
117
+ | Breadcrumb trail as the page title (a record, a nested page) | `trail` on `PageHeader` |
118
+ | Breadcrumbs only | `Breadcrumbs` |
119
+ | Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
120
+ | Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
121
+ | 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 |
122
+ | Page that fills the panel height (a full height grid) | `content="fill"` or `"centered"` on `DashboardLayout` / `AppShell`, `definePageMeta({ content: 'fill' })`, with `DataGrid fill` or `ListPage fill` |
123
+ | Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
124
+ | Login, sign up, reset password page | `AuthLogin` + `AuthLogout` (two step flow); `AuthLayout` (or `k-auth`) for other pages |
125
+ | Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it) |
126
+ | Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup` |
127
+ | Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset` |
128
+ | Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys |
129
+ | Detail page of one record with tabs and aside | `DetailPage` |
130
+ | Overview page with stats | `DashboardPage` |
131
+ | First run screen with steps | `EmptyPage` |
132
+ | Error page, 404 page | `ErrorPage`, `NotFoundPage` |
133
+ | Empty state inside a card or list | `EmptyState` |
134
+ | Loading placeholder for content | `Skeleton` |
135
+ | Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`) |
136
+ | Spinner; spinner that fills its container | `Spinner`; `Spinner block` |
137
+ | Cover an area while it loads | `LoadingOverlay` |
138
+ | Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`) |
139
+ | Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button` |
140
+ | Progress of a task | `Progress` (bar) or `ProgressRing` |
141
+ | Value in a known range (quota, score) | `Meter` |
142
+ | Inline message (info, warning, error) | `Alert` |
143
+ | Copy text to the clipboard | `CopyButton` or `useCopy` |
144
+ | Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd` |
145
+ | Row or column layout with gap; responsive grid | `Stack`; `Grid` |
146
+ | Line or labelled divider; section heading with actions | `Separator` |
147
+ | Group of buttons or tools with arrow key navigation | `Toolbar` |
148
+ | Text for screen readers only | `VisuallyHidden` |
149
+ | Translations of the component texts | `useLocale` (languages: en, it, de) |
150
+ | Custom icons | `createIcons`, `provideIcons`, Nuxt option `k.icons` |
145
151
 
146
152
  ## Core
147
153
 
@@ -163,7 +169,7 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
163
169
 
164
170
  ## Forms
165
171
 
166
- All field components work inside `FormField` and take `invalid`, `disabled`, `readonly`, `required` and `size`, except: `Select` has no `readonly`, `Slider` and `PaletteSelect` have no `required`, `Calendar` takes only `disabled` and `readonly`. They use `v-model`.
172
+ All field components work inside `FormField` and take `invalid`, `disabled`, `readonly`, `required` and `size`, except: `Select` has no `readonly`, `Slider` and `PaletteSelect` have no `required`, `Calendar` takes only `disabled` and `readonly`, `FocalPointInput` has no `required` and no `size`. They use `v-model`.
167
173
 
168
174
  | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
169
175
  | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
@@ -190,6 +196,7 @@ All field components work inside `FormField` and take `invalid`, `disabled`, `re
190
196
  | `PaletteSelect` | Select of a palette color, with the dot and the localized color name. | Model: `ColorValue` (palette name or `#rrggbb`) or null. A non-searchable `Combobox` (pass `:searchable="true"` to type a filter). Props: `colors` (subset of `PALETTE_COLORS`), `clearable` (placeholder "Automatic"), `custom` (adds "Custom": choosing it shows a `ColorInput` under the select and the model becomes the hex), `customLabel` (name of the color input), `placeholder`, `size`, `disabled`, `readonly`, `invalid`. | `forms/palette-select.vue` |
191
197
  | `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` |
192
198
  | `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`, `fill` (fills the height of its parent, centered), `loading`, `capture`, `title`, `dropText`, `hint`. Slots: `title`, `hint`, `actions`. Events: `add`, `remove`, `invalid`, `reject`. | `forms/file-input.vue` |
199
+ | `FocalPointInput` | Point on an image that must stay visible when it is cropped: click or drag on the image, or the arrow keys. | Model: `FocalPoint` (`{ x, y }` from 0 to 1) or null. Props: `src`, `alt`, `label`, `clearable` (a Reset button, Delete and Backspace clear), `clearLabel`, `horizontalLabel`, `verticalLabel`, `emptyText`, `step` (0.01, Shift times 10), `invalid`, `disabled`, `readonly`. | `forms/focal-point-input.vue` |
193
200
 
194
201
  ## Overlays
195
202
 
@@ -214,29 +221,32 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
214
221
 
215
222
  ## Data
216
223
 
217
- | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
218
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
219
- | `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` |
220
- | `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` |
221
- | `SelectionBar` | Shows the selected count and bulk actions for a list or table. | Props: `count`, `total`, `placement` (inline, sticky, floating), `onSelectAll` (may return a promise: spinner), `onClear`. With everything selected, select all becomes "Clear selection". Slots: `actions`, `count`. With `count` 0 it renders nothing visible. | `data/selection-bar.vue` |
222
- | `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` |
223
- | `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` |
224
- | `Tag` | Chip or label, optionally removable. Use `Badge` for a status. | Props: `label`, `tone`, `color` (palette name or hex), `size`, `icon`, `removable`, `removeLabel`, `removeTabindex`, `disabled`. Slot: default. Event: `remove`. | `data/tag.vue` |
225
- | `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` |
226
- | `Badge` | Status label, counter or dot. Not interactive. | Props: `label` (string or number), `tone`, `color` (palette name or hex), `variant` (soft, solid, outline), `size`, `dot`, `pulse`, `icon`. Slot: default. | `data/badge.vue` |
227
- | `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` |
228
- | `AvatarGroup` | Overlapping stack of avatars with "+N". | Props: `items` (`src`, `name`, `alt`), `max`, `size`, `shape`, `moreLabel`. | `data/avatar.vue` |
229
- | `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` |
230
- | `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` (truncated, full text on hover), `description`, `badge` `{ label, tone }`), `loading`, `avatar`, `action`, `label`, `skeletonRows`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Event: `row-click` (`item`, `event`): each row becomes a navigation item (padding, hover and press background like a ghost button, no separators) and its title a button, so Tab reaches every row and Enter or Space opens it (focus ring on the row, the description is the button description). Clicks on buttons, links, inputs, menu items and inside an open menu, popover or dialog of the row are ignored, and pressing them does not tint the row; `rowClickable(item)` keeps some rows static in the same list (no button, no hover). Slots: `leading`, `action` (`{ item }`), `empty`, `empty-actions` (buttons in the default empty state). | `data/record-list.vue` |
231
- | `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` |
232
- | `Timeline` | Vertical list of events or activity. | Props: `items` (`title`, `description`, `time`, `datetime`, `icon`, `tone`), `compact`. Slot: `item`. | `data/timeline.vue` |
233
- | `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`, `invalid`), `selectable`, `highlighted` (id or ids tinted like hover), `invalidText`, `reorderable`, `nestable`, `moveButtons` (default `true`; `false` hides the row arrows, drag and Alt+arrow keys still work), `canDrop`, `size`, `checkmark`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Slots: `label` (`node`, `level`, `invalid`; an invalid row tints a custom label), `meta`, `actions` (row end, on hover, focus and the selected row, and while a popup opened from them is open; always visible without hover; `node`, `level`, `selected`, `expanded`, `highlighted`, `hovered`), `empty`, `empty-actions` (buttons in the default empty state). Events: `select`, `move`, `hover` (node or `null`). | `data/tree.vue` |
224
+ | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
225
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
226
+ | `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`, `rowAttrs(row, index)` (attributes and listeners on each row), `rowDraggable` with `dragData(row, rows)` and `dragEffect` (rows dragged onto external drop targets). Slots: `cell-<key>`, `header-<key>`, `empty`. Events: `rowClick`, `rowDragStart`, `rowDragEnd`. | `data/table.vue` |
227
+ | `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` |
228
+ | `SelectionBar` | Shows the selected count and bulk actions for a list or table. | Props: `count`, `total`, `placement` (inline, sticky, floating), `onSelectAll` (may return a promise: spinner), `onClear`. With everything selected, select all becomes "Clear selection". Slots: `actions`, `count`. With `count` 0 it renders nothing visible. | `data/selection-bar.vue` |
229
+ | `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` |
230
+ | `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` |
231
+ | `Tag` | Chip or label, optionally removable. Use `Badge` for a status. | Props: `label`, `tone`, `color` (palette name or hex), `size`, `icon`, `removable`, `removeLabel`, `removeTabindex`, `disabled`. Slot: default. Event: `remove`. | `data/tag.vue` |
232
+ | `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` |
233
+ | `SortableList` | A vertical list of rows reorderable by drag (handle or label) and by keyboard (arrow keys on the handle, Alt with an arrow key in the row), each with an icon, a label, a description and a trailing slot (switches, actions). | Model: `v-model` (`SortableListItem[]`: `value`, `label`, `description`, `icon`, `disabled`). Props: `label`, `size` (sm, md), `disabled`, `emptyText`, `handleLabel`. Slots: `item`, `trailing`, `empty`. Event: `move`. | `data/sortable-list.vue` |
234
+ | `Badge` | Status label, counter or dot. Not interactive. | Props: `label` (string or number), `tone`, `color` (palette name or hex), `variant` (soft, solid, outline), `size`, `dot`, `pulse`, `icon`. Slot: default. | `data/badge.vue` |
235
+ | `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` |
236
+ | `AvatarGroup` | Overlapping stack of avatars with "+N". | Props: `items` (`src`, `name`, `alt`), `max`, `size`, `shape`, `moreLabel`. | `data/avatar.vue` |
237
+ | `Thumbnail` | Preview box for an image, the first frame of a video or a file icon, with loading and missing states. Fixed sizes for inline use or fluid with an aspect ratio. | Props: `src`, `alt`, `kind` (image, video, file, icon), `icon` (fallback icon), `fit` (cover, contain), `aspect` (`'4/3'`, `'16/9'` or a number, default 1), `size` (xs to lg, fluid when unset), `rounded` (none, sm, md, lg, full), `missing`, `missingText`, `focal` (`{ x, y }` from 0 to 1), `objectPosition`, `caption`, `reveal` (overlays shown only on hover and focus, default `['caption']`), `lazy`. Slots: default (replaces the media), `top-start`, `top-end`, `caption`. | `data/thumbnail.vue` |
238
+ | `TileGrid` | Responsive grid of tiles (cards, thumbnails) with roving arrow key focus across rows, an optional multi selection (check overlay, Shift ranges, Space, Ctrl or Cmd with A), reorder by drag or Alt with the arrow keys, native drag to external drop targets and a trailing add tile. | Models: `v-model:items` (order), `v-model:selected` (keys). Props: `itemKey`, `itemLabel`, `label`, `minItemWidth`, `columns`, `gap`, `selectable`, `sortable`, `handle`, `dragData(item, items)`, `dragEffect`, `disabled`. Slots: `tile` (`{ item, index, selected, dragging }`), `add`. Events: `activate`, `move`, `itemDragStart`, `itemDragEnd`. | `data/tile-grid.vue` |
239
+ | `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` |
240
+ | `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` (truncated, full text on hover), `description`, `badge` `{ label, tone }`), `loading`, `avatar`, `action`, `label`, `skeletonRows`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Event: `row-click` (`item`, `event`): each row becomes a navigation item (padding, hover and press background like a ghost button, no separators) and its title a button, so Tab reaches every row and Enter or Space opens it (focus ring on the row, the description is the button description). Clicks on buttons, links, inputs, menu items and inside an open menu, popover or dialog of the row are ignored, and pressing them does not tint the row; `rowClickable(item)` keeps some rows static in the same list (no button, no hover). Slots: `leading`, `action` (`{ item }`), `empty`, `empty-actions` (buttons in the default empty state). | `data/record-list.vue` |
241
+ | `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` |
242
+ | `Timeline` | Vertical list of events or activity. | Props: `items` (`title`, `description`, `time`, `datetime`, `icon`, `tone`), `compact`. Slot: `item`. | `data/timeline.vue` |
243
+ | `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`, `invalid`), `selectable`, `highlighted` (id or ids tinted like hover), `invalidText`, `reorderable`, `nestable`, `moveButtons` (default `true`; `false` hides the row arrows, drag and Alt+arrow keys still work), `canDrop`, `size`, `checkmark`, `emptyText`, `emptyDescription`, `emptyIcon`, `emptyVariant` (card, the default, or plain). Slots: `label` (`node`, `level`, `invalid`; an invalid row tints a custom label), `meta`, `actions` (row end, on hover, focus and the selected row, and while a popup opened from them is open; always visible without hover; `node`, `level`, `selected`, `expanded`, `highlighted`, `hovered`), `empty`, `empty-actions` (buttons in the default empty state). Events: `select`, `move`, `hover` (node or `null`). | `data/tree.vue` |
234
244
 
235
245
  ## Layout
236
246
 
237
247
  | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
238
248
  | ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- |
239
- | `Card` | Container with optional title, description, icon, actions and footer. Can be a link or a selectable button. | Props: `title`, `description`, `icon`, `variant` (raised, outline, subtle), `padding`, `as`, `to`, `href`, `selected`, `disabled`, `animated`. Slots: default, `header`, `title`, `description`, `icon`, `actions`, `footer`. | `layout/card.vue` |
249
+ | `Card` | Container with optional title, description, icon, actions and footer. Can be a link or a selectable button. | Props: `title`, `description`, `icon`, `variant` (raised, outline, subtle, dashed: a centered add or empty tile), `padding`, `as`, `to`, `href`, `selected`, `disabled`, `animated`. Slots: default, `header`, `title`, `description`, `icon`, `actions`, `footer`. | `layout/card.vue` |
240
250
  | `PageHeader` | Page title with description, breadcrumbs, badge and actions. The page templates include it. | Props: `title`, `description`, `icon`, `breadcrumbs` (small trail above the title), `trail` (the earlier levels as links: the title becomes a breadcrumb trail whose last item is the heading), `trailLabel`, `level`, `bordered`, `align`, `truncate`. Slots: `actions`, `badge`, `description`, `title`, `icon`, `breadcrumbs`. | `layout/page-header.vue` |
241
251
  | `Breadcrumbs` | Path navigation. | Props: `items` (`label`, `to`, `href`, `icon`), `separator`, `linkLast`, `ancestors`, `size` (`md`, `lg` for a title sized trail), `heading` (the current item is a heading of that level). Slot: `item`. | `layout/breadcrumbs.vue` |
242
252
  | `Stepper` | Step indicator for wizards and multi step flows (import, checkout). Horizontal or vertical, compact on narrow widths. | Model: `v-model` (current step value). Props: `steps` (`value`, `label`, `description`, `icon`, `disabled`, `state`: `complete` or `error`), `label`, `orientation`, `size`, `linear` (only completed and current steps clickable), `readonly`, `compact` (`'auto'` by default, `true`, `false`), `summary` (false hides the compact "Step 2 of 4" line), `positionLabel`, `completeLabel`, `errorLabel`. Event: `select`. | `layout/stepper.vue` |
@@ -343,39 +353,39 @@ A color value (`ColorValue`) is a palette name or a custom hex color `#rrggbb` (
343
353
 
344
354
  All are exported from `@xleddyl/443-components-vue` (the Nuxt only ones from `@xleddyl/443-components-vue/nuxt/composables`) and auto-imported in Nuxt.
345
355
 
346
- | Composable | Purpose and when to use it | Signature and notes | Playground |
347
- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
348
- | `useForm` | State of a form: values, errors, warnings, touched, dirty, submit, server errors. Use it for every form with more than one field. | `useForm({ schema, values, validator, warnings, validateOn, onSubmit, onInvalid, submitError, messages, translateMessage, guard })` (`guard: false` keeps the form out of the leave guard; `createFormConfig({ guard: false })` for every form). Schema fields: `initial`, `required`, `min`, `max`, `minLength`, `maxLength`, `pattern`, `validate`. `validator` takes any Standard Schema (Zod 4, Valibot, ArkType). Returns `values`, `errors`, `dirty`, `dirtyFields`, `valid`, `submitting`, `validate`, `validateSync`, `setError`, `setErrors`, `setIssues`, `reset(next?)`, `markClean()` (the current values become the saved state), `submit` (a successful `onSubmit` marks the form clean; throw to keep it dirty), `touch`, `isRequired`. Pass it to `Form`. | `core/form.vue` |
349
- | `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` |
350
- | `provideFieldBoundary`, `provideAuxiliaryControls` | In your own overlay component, stop controls from inheriting the field context of the trigger. | Call in `setup`. | - |
351
- | `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` |
352
- | `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; one dialog at a time, and once per route navigation however many guards ask). | `overlays/hooks.vue` |
353
- | `useAlert` | Show a message and wait until the user closes it. | `await useAlert()({ title, description, tone })`. | `overlays/hooks.vue` |
354
- | `usePrompt` | Ask for one text value. Returns the string or `null`. | `await usePrompt()({ title, label, value, placeholder, type, required, maxLength, validate(value), onConfirm(value) })`. | `overlays/hooks.vue` |
355
- | `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` |
356
- | `useModalContext` | Inside a component opened by `useModal` or `useDrawer`: close with a result and set the loading state. | `const { close, setLoading } = useModalContext<R>()`. | `overlays/hooks.vue` |
357
- | `useLoading`, `withLoading` | Global loading: top bar after a delay, or a blocking screen. Ref counted. | `useLoading().wrap(promise, { blocking, label })`, `start()` returns a stop function. `withLoading(fn)` wraps a function. Needs `OverlayHost`. | `overlays/hooks.vue` |
358
- | `useLoadingState` | Local loading and error flag for a button or form. | `const { loading, error, run } = useLoadingState()`; `await run(() => api.save())`. | `overlays/hooks.vue` |
359
- | `useLeaveGuard`, `useLeaveScope`, `provideLeaveScope` | Unsaved changes guard for state that is not a `Form` (an editable grid, a canvas), or a custom leave scope. | `useLeaveGuard(dirty?, { enabled, title, description })` registers `dirty` in the nearest scope (an open `Modal`, `Drawer`, `SettingsModal`, else the page: route path change and tab close) and returns `dirty` (of the scope), `confirmLeave()`, `allowNext()`, `scope`. `provideLeaveScope(options?)` makes a component a scope (call `scope.confirmLeave()` before you replace its content). | `templates/form-modal.vue` |
360
- | `useDirtyGuard` | Ask before leaving a page or closing the tab with unsaved changes. | `useDirtyGuard(dirty, options?)`, now built on `useLeaveGuard`. Returns `confirmLeave()` and `allowNext()`. `FormPage` already uses it. | `templates/form-page.vue` |
361
- | `useFileDrop` | Make any element a drop zone. Use `FileInput` when you need the full control. | `useFileDrop(targetRef, { onDrop(files, event), disabled, ignore })` returns `{ over, reset }`. `readDroppedFiles(dataTransfer)` walks dropped folders. | `forms/file-input.vue` |
362
- | `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` |
363
- | `useHotkey` | Keyboard shortcut for a page or component. | `useHotkey('mod+k', handler, { enabled, preventDefault, allowInInputs, target })`. `formatHotkey` and `ariaKeyShortcuts` are exported. | `overlays/command-palette.vue` |
364
- | `useCopy` | Copy text with a `copied` flag. | `const { copy, copied, error } = useCopy({ resetAfter })`. | `layout/copy-button.vue` |
365
- | `useTableSort` | Client side sort for `Table`. | `const { sort, sorted } = useTableSort(rows, { columns, initial, locale })`. Bind `sort` to `v-model:sort` and render `sorted`. | `data/table.vue` |
366
- | `usePasswordStrength` | Score a password. Also `scorePassword` and `generatePassword`. | Returns the level 0 to 4. `PasswordInput` already uses it. | `forms/password-input.vue` |
367
- | `useTheme` | Read or set the theme preference (system, light, dark). | `const { preference, resolved, set } = useTheme()`. Nuxt module stores it in a cookie. | `layout/theme-switch.vue` |
368
- | `usePreset` | Read or set the visual preset. | `presetOptions` lists the presets. | `presets.vue` (pages root) |
369
- | `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` |
370
- | `useAppShell` | Read the `AppShell` state (collapsed, open) from a child component. | Returns the shell context or `null` outside a shell. | `layout/app-shell.vue` |
371
- | `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` |
372
- | `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` |
373
- | `useScrollLock` | Lock the page scroll while something is open. | `useScrollLock(activeRef)`. | - |
374
- | `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) |
375
- | `useIcons` helpers, `createIcons`, `provideIcons` | Register your own icons by name. | Nuxt: option `k.icons: { dir: '~/assets/icons' }`. | `components/core/icon.vue` |
376
- | `useLinkComponent`, `createLinkComponent` | Use the router link (for example `NuxtLink`) for every `to` prop. | The Nuxt module does it for you. | - |
377
- | `useDashboard` (Nuxt only) | Runtime account, breadcrumbs and badges for the `k-dashboard` layout. | Auto-imported by the module, or `import { useDashboard } from '@xleddyl/443-components-vue/nuxt/composables'` (a Nuxt module or layer). | `layouts/` of the playground |
378
- | `useNavigationPending` (Nuxt only) | `true` while a navigation to another path renders the new page. Bind it to `loading` of `DashboardLayout` or `AppShell`. | Auto-imported by the module, or `import { useNavigationPending } from '@xleddyl/443-components-vue/nuxt/composables'` (a Nuxt module or layer). | `layouts/` of the playground |
356
+ | Composable | Purpose and when to use it | Signature and notes | Playground |
357
+ | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
358
+ | `useForm` | State of a form: values, errors, warnings, touched, dirty, submit, server errors. Use it for every form with more than one field. | `useForm({ schema, values, validator, warnings, validateOn, onSubmit, onInvalid, submitError, messages, translateMessage, guard })` (`guard: false` keeps the form out of the leave guard; `createFormConfig({ guard: false })` for every form). Schema fields: `initial`, `required`, `min`, `max`, `minLength`, `maxLength`, `pattern`, `validate`. `validator` takes any Standard Schema (Zod 4, Valibot, ArkType). Returns `values`, `errors`, `dirty`, `dirtyFields`, `valid`, `submitting`, `validate`, `validateSync`, `setError`, `setErrors`, `setIssues`, `reset(next?)`, `markClean()` (the current values become the saved state), `submit` (a successful `onSubmit` marks the form clean; throw to keep it dirty), `touch`, `isRequired`. Pass it to `Form`. | `core/form.vue` |
359
+ | `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` |
360
+ | `provideFieldBoundary`, `provideAuxiliaryControls` | In your own overlay component, stop controls from inheriting the field context of the trigger. | Call in `setup`. | - |
361
+ | `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` |
362
+ | `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; one dialog at a time, and once per route navigation however many guards ask). | `overlays/hooks.vue` |
363
+ | `useAlert` | Show a message and wait until the user closes it. | `await useAlert()({ title, description, tone })`. | `overlays/hooks.vue` |
364
+ | `usePrompt` | Ask for one text value. Returns the string or `null`. | `await usePrompt()({ title, label, value, placeholder, type, required, maxLength, validate(value), onConfirm(value) })`. | `overlays/hooks.vue` |
365
+ | `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` |
366
+ | `useModalContext` | Inside a component opened by `useModal` or `useDrawer`: close with a result and set the loading state. | `const { close, setLoading } = useModalContext<R>()`. | `overlays/hooks.vue` |
367
+ | `useLoading`, `withLoading` | Global loading: top bar after a delay, or a blocking screen. Ref counted. | `useLoading().wrap(promise, { blocking, label })`, `start()` returns a stop function. `withLoading(fn)` wraps a function. Needs `OverlayHost`. | `overlays/hooks.vue` |
368
+ | `useLoadingState` | Local loading and error flag for a button or form. | `const { loading, error, run } = useLoadingState()`; `await run(() => api.save())`. | `overlays/hooks.vue` |
369
+ | `useLeaveGuard`, `useLeaveScope`, `provideLeaveScope` | Unsaved changes guard for state that is not a `Form` (an editable grid, a canvas), or a custom leave scope. | `useLeaveGuard(dirty?, { enabled, title, description })` registers `dirty` in the nearest scope (an open `Modal`, `Drawer`, `SettingsModal`, else the page: route path change and tab close) and returns `dirty` (of the scope), `confirmLeave()`, `allowNext()`, `scope`. `provideLeaveScope(options?)` makes a component a scope (call `scope.confirmLeave()` before you replace its content). | `templates/form-modal.vue` |
370
+ | `useDirtyGuard` | Ask before leaving a page or closing the tab with unsaved changes. | `useDirtyGuard(dirty, options?)`, now built on `useLeaveGuard`. Returns `confirmLeave()` and `allowNext()`. `FormPage` already uses it. | `templates/form-page.vue` |
371
+ | `useFileDrop` | Make any element a drop zone. Use `FileInput` when you need the full control. | `useFileDrop(targetRef, { onDrop(files, event), disabled, ignore })` returns `{ over, reset }`. `readDroppedFiles(dataTransfer)` walks dropped folders. | `forms/file-input.vue` |
372
+ | `useSortable` | Reorder any small list or grid of cells 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 (vertical, horizontal, grid), disabled, handle, preview, 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` |
373
+ | `useHotkey` | Keyboard shortcut for a page or component. | `useHotkey('mod+k', handler, { enabled, preventDefault, allowInInputs, target })`. `formatHotkey` and `ariaKeyShortcuts` are exported. | `overlays/command-palette.vue` |
374
+ | `useCopy` | Copy text with a `copied` flag. | `const { copy, copied, error } = useCopy({ resetAfter })`. | `layout/copy-button.vue` |
375
+ | `useTableSort` | Client side sort for `Table`. | `const { sort, sorted } = useTableSort(rows, { columns, initial, locale })`. Bind `sort` to `v-model:sort` and render `sorted`. | `data/table.vue` |
376
+ | `usePasswordStrength` | Score a password. Also `scorePassword` and `generatePassword`. | Returns the level 0 to 4. `PasswordInput` already uses it. | `forms/password-input.vue` |
377
+ | `useTheme` | Read or set the theme preference (system, light, dark). | `const { preference, resolved, set } = useTheme()`. Nuxt module stores it in a cookie. | `layout/theme-switch.vue` |
378
+ | `usePreset` | Read or set the visual preset. | `presetOptions` lists the presets. | `presets.vue` (pages root) |
379
+ | `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` |
380
+ | `useAppShell` | Read the `AppShell` state (collapsed, open) from a child component. | Returns the shell context or `null` outside a shell. | `layout/app-shell.vue` |
381
+ | `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` |
382
+ | `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` |
383
+ | `useScrollLock` | Lock the page scroll while something is open. | `useScrollLock(activeRef)`. | - |
384
+ | `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) |
385
+ | `useIcons` helpers, `createIcons`, `provideIcons` | Register your own icons by name. | Nuxt: option `k.icons: { dir: '~/assets/icons' }`. | `components/core/icon.vue` |
386
+ | `useLinkComponent`, `createLinkComponent` | Use the router link (for example `NuxtLink`) for every `to` prop. | The Nuxt module does it for you. | - |
387
+ | `useDashboard` (Nuxt only) | Runtime account, breadcrumbs and badges for the `k-dashboard` layout. | Auto-imported by the module, or `import { useDashboard } from '@xleddyl/443-components-vue/nuxt/composables'` (a Nuxt module or layer). | `layouts/` of the playground |
388
+ | `useNavigationPending` (Nuxt only) | `true` while a navigation to another path renders the new page. Bind it to `loading` of `DashboardLayout` or `AppShell`. | Auto-imported by the module, or `import { useNavigationPending } from '@xleddyl/443-components-vue/nuxt/composables'` (a Nuxt module or layer). | `layouts/` of the playground |
379
389
 
380
390
  ## Before you build your own
381
391