@xleddyl/443-components-vue 0.16.101 → 0.16.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CATALOG.md +147 -147
- package/README.md +49 -28
- package/dist/components/layout/AppShell.vue +89 -1
- package/dist/components/layout/AppShell.vue.d.ts +12 -2
- package/dist/components/overlays/ConfirmDialog.vue.d.ts +8 -0
- package/dist/components/overlays/ConfirmHost.vue.d.ts +8 -0
- package/dist/components/overlays/Drawer.vue +9 -1
- package/dist/components/overlays/Drawer.vue.d.ts +10 -0
- package/dist/components/overlays/Modal.vue.d.ts +8 -0
- package/dist/components/overlays/Toaster.vue +2 -1
- package/dist/components/templates/DashboardLayout.vue +11 -1
- package/dist/components/templates/DashboardLayout.vue.d.ts +10 -0
- package/dist/components/templates/FormDrawer.vue +3 -1
- package/dist/components/templates/FormDrawer.vue.d.ts +6 -0
- package/dist/components/templates/FormModal.vue.d.ts +4 -0
- package/dist/components/templates/SettingsModal.vue.d.ts +8 -0
- package/dist/composables/usePreferences.d.ts +1 -0
- package/dist/composables/usePreferences.mjs +2 -1
- package/dist/composables/useRouteRecord.mjs +6 -4
- package/dist/icons/builtin.d.ts +3 -0
- package/dist/icons/builtin.mjs +9 -0
- package/dist/internal/forms/leave.mjs +9 -2
- package/dist/internal/overlays/DialogFrame.vue +152 -90
- package/dist/internal/overlays/DialogFrame.vue.d.ts +8 -0
- package/dist/internal/overlays/OverlayView.vue.d.ts +10 -0
- package/dist/internal/overlays/avoid.mjs +16 -0
- package/dist/internal/overlays/dialog.d.ts +3 -0
- package/dist/internal/overlays/dialog.mjs +61 -15
- package/dist/internal/overlays/dock.d.ts +16 -0
- package/dist/internal/overlays/dock.mjs +10 -0
- package/dist/locale/de.mjs +8 -0
- package/dist/locale/en.mjs +8 -0
- package/dist/locale/it.mjs +8 -0
- package/dist/locale/types.d.ts +8 -0
- package/dist/nuxt/runtime/navigation.mjs +17 -1
- package/dist/styles/feedback/skeleton.css +6 -0
- package/dist/styles/layout/app-shell.css +75 -0
- package/dist/styles/layout/stack.css +7 -0
- package/dist/styles/overlays/drawer.css +59 -0
- package/dist/styles/overlays/modal.css +1 -0
- package/package.json +1 -1
package/CATALOG.md
CHANGED
|
@@ -29,130 +29,130 @@ Playground paths in this file are relative to `playground/nuxt/app/pages/compone
|
|
|
29
29
|
|
|
30
30
|
## Which component for which task
|
|
31
31
|
|
|
32
|
-
| Task | Use
|
|
33
|
-
| ---------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| Form with validation, dirty state and server errors | `useForm` + `Form` + `FormField` + field components
|
|
35
|
-
| One labelled field with error, hint and required marker | `FormField`
|
|
36
|
-
| Map a server error (409, 422) to fields | `useForm` option `submitError`, `form.setErrors`, `form.setIssues`
|
|
37
|
-
| Form as a full page with sticky save footer | `FormPage`
|
|
38
|
-
| Create or edit form in a side panel (cancel, save, delete, guard) | `FormDrawer` (`form`, `creating`, `readonly`, `deletable`, `loading`)
|
|
39
|
-
| 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
|
|
40
|
-
| Form in a modal (title, fields, cancel, delete, submit) | `FormModal`
|
|
41
|
-
| Floating "unsaved changes" bar | `SaveBar`
|
|
42
|
-
| Single line text | `Input`
|
|
43
|
-
| Multi line text | `Textarea`
|
|
44
|
-
| Rich text (bold, lists, links) | `RichTextEditor` (group `editor`)
|
|
45
|
-
| Template with placeholders ({name} {size}) | `TemplateEditor`, `TemplateText` (group `editor`)
|
|
46
|
-
| Password with strength meter and generator | `PasswordInput`
|
|
47
|
-
| Number with stepper, locale format | `NumberInput`
|
|
48
|
-
| Money or unit prefix and suffix around an input | `InputGroup` + `InputAddon`
|
|
49
|
-
| One choice from a short list (5 or fewer) | `RadioGroup` or `SegmentedControl`
|
|
50
|
-
| One choice from a longer list, no search | `Select`
|
|
51
|
-
| 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`)
|
|
52
|
-
| Searchable select, async search, multi select, create option | `Combobox`
|
|
53
|
-
| Pick one node of a hierarchy (category, folder) | `TreeSelect` (`leavesOnly` to allow only leaves)
|
|
54
|
-
| Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate`
|
|
55
|
-
| Several create actions for the typed text (create here, create in a form) | `Combobox` with `createActions`
|
|
56
|
-
| Several choices as checkboxes | `CheckboxGroup`
|
|
57
|
-
| One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form)
|
|
58
|
-
| Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges)
|
|
59
|
-
| Inline calendar | `Calendar`
|
|
60
|
-
| Time of day | `TimeInput`
|
|
61
|
-
| Color | `ColorInput`
|
|
62
|
-
| Number in a range | `Slider`
|
|
63
|
-
| One time code, OTP | `PinInput`
|
|
64
|
-
| File or folder upload with drop zone | `FileInput`
|
|
65
|
-
| Focal point of an image (the part kept in view when cropped) | `FocalPointInput` (preview the crops with `Thumbnail` `focal`)
|
|
66
|
-
| Drop files on any element | `useFileDrop` (with `FileDropOverlay` over the area while dragging)
|
|
67
|
-
| `useFileDialog` | Open the native file dialog from a menu item or any action, without a visible input.
|
|
68
|
-
| Confirm a destructive action | `useConfirm`
|
|
69
|
-
| Show a message the user must acknowledge | `useAlert`
|
|
70
|
-
| Ask for one text value | `usePrompt`
|
|
71
|
-
| Short message after an action | `toast`
|
|
72
|
-
| Toast for a promise (loading, success, error) | `toast.promise`
|
|
73
|
-
| Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer)
|
|
74
|
-
| 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.
|
|
75
|
-
| Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise)
|
|
76
|
-
| Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer`
|
|
77
|
-
| Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button)
|
|
78
|
-
| Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute`
|
|
79
|
-
| 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
|
|
80
|
-
| Commands of the open page in the command search | `usePageCommands(() => CommandItem[])` (DashboardLayout adds the group "This page")
|
|
81
|
-
| A button made from a command (same label, icon and action as the palette) | `CommandButton` (`command`)
|
|
82
|
-
| Short list of records with title, badge, action, skeleton and empty state | `RecordList`
|
|
83
|
-
| Menu opened by a button | `DropdownMenu`
|
|
84
|
-
| Right click menu | `ContextMenu`
|
|
85
|
-
| Small floating panel with content or a form | `Popover`
|
|
86
|
-
| Preview on hover (user card) | `HoverCard`
|
|
87
|
-
| Short label on hover or focus | `Tooltip`
|
|
88
|
-
| Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`), `CommandList` for the same list inline or in a `Popover`
|
|
89
|
-
| Small table, simple sort | `Table` (+ `useTableSort` for client sort)
|
|
90
|
-
| Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing)
|
|
91
|
-
| Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `activeFilters` (or `filterCount`), `@filter-remove` and `@filters-reset`
|
|
92
|
-
| Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge)
|
|
93
|
-
| Whole list page: search, filters, table, pagination | `ListPage`
|
|
94
|
-
| Page numbers and page size | `Pagination`
|
|
95
|
-
| Bulk actions bar for selected rows | `SelectionBar`
|
|
96
|
-
| Filter chips, active filters | `FilterPills`
|
|
97
|
-
| Tags, chips, removable labels | `Tag`
|
|
98
|
-
| Color per group or category (tags, labels, series) | `color` (palette name or hex) on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `paletteColor(key)`
|
|
99
|
-
| Choose a palette color (a group, a division) | `PaletteSelect` (`v-model` color or null, `clearable` for "Automatic", `custom` for any hex color)
|
|
100
|
-
| Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`)
|
|
101
|
-
| Reorder rows with a handle and switches (columns, steps) | `SortableList` (`v-model`, `#trailing`)
|
|
102
|
-
| Reorder any list by drag and keyboard | `useSortable`
|
|
103
|
-
| Status label, counter, dot | `Badge`
|
|
104
|
-
| User picture or initials; stack of users | `Avatar`; `AvatarGroup`
|
|
105
|
-
| Preview of an image, video or file (media grid, upload tile, table cell) | `Thumbnail`
|
|
106
|
-
| Grid of tiles: media library with selection and drag to folders, reorderable blocks with an add tile | `TileGrid` (`selectable`, `sortable`, `dragData`, `#add`)
|
|
107
|
-
| Drag table rows onto folders or other drop targets | `Table` (`rowDraggable` + `dragData`, or `rowAttrs`)
|
|
108
|
-
| Key figure with delta and trend (KPI) | `Stat`
|
|
109
|
-
| Label and value pairs (details) | `DescriptionList`
|
|
110
|
-
| Event history, activity feed | `Timeline`
|
|
111
|
-
| Hierarchy, folders, drag to reorder | `Tree`
|
|
112
|
-
| Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`)
|
|
113
|
-
| Tabs | `Tabs`
|
|
114
|
-
| Wizard steps, step indicator (Step 2 of 4) | `Stepper`
|
|
115
|
-
| Collapsible sections, FAQ | `Accordion`
|
|
116
|
-
| Container with title and actions | `Card`
|
|
117
|
-
| "Add" tile next to a grid of items, empty drop area | `Card` `variant="dashed"` (`as="button"`, `icon`, `title`)
|
|
118
|
-
| Resizable panel next to content (a split view, a side pane you drag or resize with the keyboard) | `ResizeHandle` (`WorkspaceLayout` for a whole editor frame)
|
|
119
|
-
| Page title, description, breadcrumbs, actions | `PageHeader` (or a page template)
|
|
120
|
-
| Breadcrumb trail as the page title (a record, a nested page) | `trail` on `PageHeader`
|
|
121
|
-
| Compact header of a side panel or an inspector (title, icon, parents, actions) | `PageHeader size="sm"`
|
|
122
|
-
| Breadcrumbs only | `Breadcrumbs`
|
|
123
|
-
| Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`)
|
|
124
|
-
| Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`)
|
|
125
|
-
| 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
|
|
126
|
-
| 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`
|
|
127
|
-
| Editor with a tree, a canvas and an inspector (resizable side panes, tabs on narrow screens) | `WorkspaceLayout` with `PageHeader size="sm"` pane headers
|
|
128
|
-
| Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav`
|
|
129
|
-
| Login, sign up, reset password page | `AuthLogin` + `AuthLogout` (two step flow); `AuthLayout` (or `k-auth`) for other pages
|
|
130
|
-
| Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it)
|
|
131
|
-
| Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup`
|
|
132
|
-
| Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset`
|
|
133
|
-
| Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys
|
|
134
|
-
| Detail page of one record with tabs and aside | `DetailPage`
|
|
135
|
-
| Overview page with stats | `DashboardPage`
|
|
136
|
-
| First run screen with steps | `EmptyPage`
|
|
137
|
-
| Error page, 404 page | `ErrorPage`, `NotFoundPage`
|
|
138
|
-
| Empty state inside a card or list | `EmptyState`
|
|
139
|
-
| Loading placeholder for content | `Skeleton`
|
|
140
|
-
| Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`)
|
|
141
|
-
| Spinner; spinner that fills its container | `Spinner`; `Spinner block`
|
|
142
|
-
| Cover an area while it loads | `LoadingOverlay`
|
|
143
|
-
| Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`)
|
|
144
|
-
| Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button`
|
|
145
|
-
| Progress of a task | `Progress` (bar) or `ProgressRing`
|
|
146
|
-
| Value in a known range (quota, score) | `Meter`
|
|
147
|
-
| Inline message (info, warning, error) | `Alert`
|
|
148
|
-
| Copy text to the clipboard | `CopyButton` or `useCopy`
|
|
149
|
-
| Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd`
|
|
150
|
-
| Row or column layout with gap; responsive grid | `Stack`; `Grid`
|
|
151
|
-
| Line or labelled divider; section heading with actions | `Separator`
|
|
152
|
-
| Group of buttons or tools with arrow key navigation | `Toolbar`
|
|
153
|
-
| Text for screen readers only | `VisuallyHidden`
|
|
154
|
-
| Translations of the component texts | `useLocale` (languages: en, it, de)
|
|
155
|
-
| Custom icons | `createIcons`, `provideIcons`, Nuxt option `k.icons`
|
|
32
|
+
| Task | Use |
|
|
33
|
+
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
+
| Form with validation, dirty state and server errors | `useForm` + `Form` + `FormField` + field components |
|
|
35
|
+
| One labelled field with error, hint and required marker | `FormField` |
|
|
36
|
+
| Map a server error (409, 422) to fields | `useForm` option `submitError`, `form.setErrors`, `form.setIssues` |
|
|
37
|
+
| Form as a full page with sticky save footer | `FormPage` |
|
|
38
|
+
| Create or edit form in a side panel (cancel, save, delete, guard) | `FormDrawer` (`form`, `creating`, `readonly`, `deletable`, `loading`) |
|
|
39
|
+
| 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 |
|
|
40
|
+
| Form in a modal (title, fields, cancel, delete, submit) | `FormModal` |
|
|
41
|
+
| Floating "unsaved changes" bar | `SaveBar` |
|
|
42
|
+
| Single line text | `Input` |
|
|
43
|
+
| Multi line text | `Textarea` |
|
|
44
|
+
| Rich text (bold, lists, links) | `RichTextEditor` (group `editor`) |
|
|
45
|
+
| Template with placeholders ({name} {size}) | `TemplateEditor`, `TemplateText` (group `editor`) |
|
|
46
|
+
| Password with strength meter and generator | `PasswordInput` |
|
|
47
|
+
| Number with stepper, locale format | `NumberInput` |
|
|
48
|
+
| Money or unit prefix and suffix around an input | `InputGroup` + `InputAddon` |
|
|
49
|
+
| One choice from a short list (5 or fewer) | `RadioGroup` or `SegmentedControl` |
|
|
50
|
+
| One choice from a longer list, no search | `Select` |
|
|
51
|
+
| 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`) |
|
|
52
|
+
| Searchable select, async search, multi select, create option | `Combobox` |
|
|
53
|
+
| Pick one node of a hierarchy (category, folder) | `TreeSelect` (`leavesOnly` to allow only leaves) |
|
|
54
|
+
| Create new values with a format or rule (tags, codes) | `Combobox` with `creatable`, `createTransform`, `createValidate` |
|
|
55
|
+
| Several create actions for the typed text (create here, create in a form) | `Combobox` with `createActions` |
|
|
56
|
+
| Several choices as checkboxes | `CheckboxGroup` |
|
|
57
|
+
| One yes or no | `Switch` (instant setting) or `Checkbox` (part of a form) |
|
|
58
|
+
| Date, date and time, month | `DateInput` (native) or `DatePicker` (popover calendar, ranges) |
|
|
59
|
+
| Inline calendar | `Calendar` |
|
|
60
|
+
| Time of day | `TimeInput` |
|
|
61
|
+
| Color | `ColorInput` |
|
|
62
|
+
| Number in a range | `Slider` |
|
|
63
|
+
| One time code, OTP | `PinInput` |
|
|
64
|
+
| File or folder upload with drop zone | `FileInput` |
|
|
65
|
+
| Focal point of an image (the part kept in view when cropped) | `FocalPointInput` (preview the crops with `Thumbnail` `focal`) |
|
|
66
|
+
| Drop files on any element | `useFileDrop` (with `FileDropOverlay` over the area while dragging) |
|
|
67
|
+
| `useFileDialog` | Open the native file dialog from a menu item or any action, without a visible input. | `useFileDialog({ accept, multiple, directory, onChange })` returns `{ files, open(overrides?), reset }`; `open()` resolves to the chosen files, empty when cancelled. | `forms/file-input.vue` |
|
|
68
|
+
| Confirm a destructive action | `useConfirm` |
|
|
69
|
+
| Show a message the user must acknowledge | `useAlert` |
|
|
70
|
+
| Ask for one text value | `usePrompt` |
|
|
71
|
+
| Short message after an action | `toast` |
|
|
72
|
+
| Toast for a promise (loading, success, error) | `toast.promise` |
|
|
73
|
+
| Toast after saving in an open Drawer | `toast` (the stack moves beside the drawer or above its footer) |
|
|
74
|
+
| 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. `docked` keeps it beside the page (a list with a detail panel) when the shell is at least 1280px wide. |
|
|
75
|
+
| Dialog with a form or content | `Modal` (or `useModal().open` to get the result as a promise) |
|
|
76
|
+
| Tabs or subpages (breadcrumb and back) in a Modal or Drawer | `tabs` + `v-model:tab`; `trail` + `@navigate` on `Modal` / `Drawer` |
|
|
77
|
+
| Buttons in a Modal or Drawer header | `#actions` slot of `Modal` / `Drawer` (right side, before the close button) |
|
|
78
|
+
| Deep link to a drawer or modal (`?family=fam_1`, `#family/fam_1`) | `useRouteState('family')` + `:open="!!familyId"`, `location: 'hash'`; settings: `route`, `settingsRoute` |
|
|
79
|
+
| 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` and `replaceId` skip it, `openRecord` asks only when it replaces another open record |
|
|
80
|
+
| Commands of the open page in the command search | `usePageCommands(() => CommandItem[])` (DashboardLayout adds the group "This page") |
|
|
81
|
+
| A button made from a command (same label, icon and action as the palette) | `CommandButton` (`command`) |
|
|
82
|
+
| Short list of records with title, badge, action, skeleton and empty state | `RecordList` |
|
|
83
|
+
| Menu opened by a button | `DropdownMenu` |
|
|
84
|
+
| Right click menu | `ContextMenu` |
|
|
85
|
+
| Small floating panel with content or a form | `Popover` |
|
|
86
|
+
| Preview on hover (user card) | `HoverCard` |
|
|
87
|
+
| Short label on hover or focus | `Tooltip` |
|
|
88
|
+
| Global search, command menu (Cmd+K) | `CommandPalette` (the `DashboardLayout` has it with `search`), `CommandList` for the same list inline or in a `Popover` |
|
|
89
|
+
| Small table, simple sort | `Table` (+ `useTableSort` for client sort) |
|
|
90
|
+
| Big table, many rows, editing, Excel-like | `DataGrid` (+ `spreadsheet` prop for Excel-like editing) |
|
|
91
|
+
| Filters for a grid (selects, dates in a modal from the toolbar) | `DataGrid` `#filters` slot with `activeFilters` (or `filterCount`), `@filter-remove` and `@filters-reset` |
|
|
92
|
+
| Several tags or statuses in one grid cell | `BadgeCell` with an array value (`max` adds a `+N` badge) |
|
|
93
|
+
| Whole list page: search, filters, table, pagination | `ListPage` |
|
|
94
|
+
| Page numbers and page size | `Pagination` |
|
|
95
|
+
| Bulk actions bar for selected rows | `SelectionBar` |
|
|
96
|
+
| Filter chips, active filters | `FilterPills` |
|
|
97
|
+
| Tags, chips, removable labels | `Tag` |
|
|
98
|
+
| Color per group or category (tags, labels, series) | `color` (palette name or hex) on `Tag`, `Badge`, `FilterPill`, `Combobox` options, `BadgeCell` `colors`; `paletteColor(key)` |
|
|
99
|
+
| Choose a palette color (a group, a division) | `PaletteSelect` (`v-model` color or null, `clearable` for "Automatic", `custom` for any hex color) |
|
|
100
|
+
| Reorder chips by drag and keyboard, drop items from another panel | `TagList` (`sortable`, `removable`, `accept` + `@item-drop`) |
|
|
101
|
+
| Reorder rows with a handle and switches (columns, steps) | `SortableList` (`v-model`, `#trailing`) |
|
|
102
|
+
| Reorder any list by drag and keyboard | `useSortable` |
|
|
103
|
+
| Status label, counter, dot | `Badge` |
|
|
104
|
+
| User picture or initials; stack of users | `Avatar`; `AvatarGroup` |
|
|
105
|
+
| Preview of an image, video or file (media grid, upload tile, table cell) | `Thumbnail` |
|
|
106
|
+
| Grid of tiles: media library with selection and drag to folders, reorderable blocks with an add tile | `TileGrid` (`selectable`, `sortable`, `dragData`, `#add`) |
|
|
107
|
+
| Drag table rows onto folders or other drop targets | `Table` (`rowDraggable` + `dragData`, or `rowAttrs`) |
|
|
108
|
+
| Key figure with delta and trend (KPI) | `Stat` |
|
|
109
|
+
| Label and value pairs (details) | `DescriptionList` |
|
|
110
|
+
| Event history, activity feed | `Timeline` |
|
|
111
|
+
| Hierarchy, folders, drag to reorder | `Tree` |
|
|
112
|
+
| Charts (line, bar, doughnut) | `ChartPanel` + `LineChart` / `BarChart` / `DoughnutChart` (group `chart`) |
|
|
113
|
+
| Tabs | `Tabs` |
|
|
114
|
+
| Wizard steps, step indicator (Step 2 of 4) | `Stepper` |
|
|
115
|
+
| Collapsible sections, FAQ | `Accordion` |
|
|
116
|
+
| Container with title and actions | `Card` |
|
|
117
|
+
| "Add" tile next to a grid of items, empty drop area | `Card` `variant="dashed"` (`as="button"`, `icon`, `title`) |
|
|
118
|
+
| Resizable panel next to content (a split view, a side pane you drag or resize with the keyboard) | `ResizeHandle` (`WorkspaceLayout` for a whole editor frame) |
|
|
119
|
+
| Page title, description, breadcrumbs, actions | `PageHeader` (or a page template) |
|
|
120
|
+
| Breadcrumb trail as the page title (a record, a nested page) | `trail` on `PageHeader` |
|
|
121
|
+
| Compact header of a side panel or an inspector (title, icon, parents, actions) | `PageHeader size="sm"` |
|
|
122
|
+
| Breadcrumbs only | `Breadcrumbs` |
|
|
123
|
+
| Dashboard layout with sidebar, search, account and settings | `DashboardLayout` (or the Nuxt layout `k-dashboard`) |
|
|
124
|
+
| Actions in a settings section header ("Add user") | `#actions-<id>` on `SettingsModal`, `#settings-actions-<id>` on `DashboardLayout` (gets `page`, `openPage`, `back`) |
|
|
125
|
+
| 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 |
|
|
126
|
+
| 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` |
|
|
127
|
+
| Editor with a tree, a canvas and an inspector (resizable side panes, tabs on narrow screens) | `WorkspaceLayout` with `PageHeader size="sm"` pane headers |
|
|
128
|
+
| Custom app frame with your own sidebar | `AppShell` + `Sidebar` + `SidebarNav` |
|
|
129
|
+
| Login, sign up, reset password page | `AuthLogin` + `AuthLogout` (two step flow); `AuthLayout` (or `k-auth`) for other pages |
|
|
130
|
+
| Settings in a modal (account, appearance, your sections) | `SettingsModal` (the `DashboardLayout` embeds it) |
|
|
131
|
+
| Settings as a page with sections | `SettingsPage` + `SettingsSection` + `SettingsGroup` |
|
|
132
|
+
| Theme and preset choice | `AppearanceSettings`, `ThemeSwitch`, `useTheme`, `usePreset` |
|
|
133
|
+
| Remember UI choices per user (theme, sidebar, grid columns, page size) | `createPreferences` with your store (`createRemotePreferenceStore` for an API), `usePreference` for your own keys |
|
|
134
|
+
| Detail page of one record with tabs and aside | `DetailPage` |
|
|
135
|
+
| Overview page with stats | `DashboardPage` |
|
|
136
|
+
| First run screen with steps | `EmptyPage` |
|
|
137
|
+
| Error page, 404 page | `ErrorPage`, `NotFoundPage` |
|
|
138
|
+
| Empty state inside a card or list | `EmptyState` |
|
|
139
|
+
| Loading placeholder for content | `Skeleton` |
|
|
140
|
+
| Loading placeholder for a form or a list (rough, not 1:1 with the UI) | `SkeletonForm` (`fields`, `columns`), `SkeletonList` (`rows`, `lines`, `avatar`, `action`) |
|
|
141
|
+
| Spinner; spinner that fills its container | `Spinner`; `Spinner block` |
|
|
142
|
+
| Cover an area while it loads | `LoadingOverlay` |
|
|
143
|
+
| Global loading bar or blocking screen | `useLoading` / `withLoading` (needs `OverlayHost`) |
|
|
144
|
+
| Loading flag for one button or form | `useLoadingState`, or `loading` prop of `Button` |
|
|
145
|
+
| Progress of a task | `Progress` (bar) or `ProgressRing` |
|
|
146
|
+
| Value in a known range (quota, score) | `Meter` |
|
|
147
|
+
| Inline message (info, warning, error) | `Alert` |
|
|
148
|
+
| Copy text to the clipboard | `CopyButton` or `useCopy` |
|
|
149
|
+
| Keyboard shortcut handler; show a shortcut | `useHotkey`; `Kbd` |
|
|
150
|
+
| Row or column layout with gap; responsive grid | `Stack`; `Grid` |
|
|
151
|
+
| Line or labelled divider; section heading with actions | `Separator` |
|
|
152
|
+
| Group of buttons or tools with arrow key navigation | `Toolbar` |
|
|
153
|
+
| Text for screen readers only | `VisuallyHidden` |
|
|
154
|
+
| Translations of the component texts | `useLocale` (languages: en, it, de) |
|
|
155
|
+
| Custom icons | `createIcons`, `provideIcons`, Nuxt option `k.icons` |
|
|
156
156
|
|
|
157
157
|
## Core
|
|
158
158
|
|
|
@@ -211,7 +211,7 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
211
211
|
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
212
212
|
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
|
|
213
213
|
| `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`, `height` (fixed, capped at the viewport), `dismissible`, `hideClose`, `sheet`, `flush`, `fill`, `loading`, `beforeClose(reason)`, `tabs` (tabs in the header), `trail` (breadcrumb title and back button; a long trail stays on one line, the middle crumbs collapse into a "..." menu and the current title truncates), `backLabel`, `guard` (default `true`: closing, or a trail navigation, with a dirty `Form` inside asks to discard first; `beforeClose` runs after), `guardTitle`, `guardMessage`. Slots: default (`{ tab }`), `header`, `actions` (header, before the close button), `toolbar` (a full width row of controls under the title and the description, such as filters), `footer`, `title-trailing`. Events: `open`, `close`, `afterLeave`, `navigate(index)`. Exposes `close()`, `confirmLeave()`, `dirty`. | `overlays/modal.vue` |
|
|
214
|
-
| `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`, `fill` (the body content takes the full height, for a table or a grid), `loading`, `beforeClose(reason)`, `tabs`, `trail`, `backLabel`, `guard`, `guardTitle`, `guardMessage` (as `Modal`). Slots like `Modal`. Events: `open`, `close`, `afterLeave`, `navigate(index)`. Exposes `close()`, `confirmLeave()`, `dirty`.
|
|
214
|
+
| `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`, `fill` (the body content takes the full height, for a table or a grid), `loading`, `beforeClose(reason)`, `tabs`, `trail`, `backLabel`, `guard`, `guardTitle`, `guardMessage` (as `Modal`), `docked` (a right drawer stays in the dock of `AppShell` beside the page, not modal, from 1280px of shell width; the dock shows an empty state while it is closed; `lg`, `xl` and `full` get an expand button that shows it as an overlay, `expandLabel`, `collapseLabel`). The body is a size container (`k-drawer`): use container queries inside. Slots like `Modal`. Events: `open`, `close`, `afterLeave`, `navigate(index)`. Exposes `close()`, `confirmLeave()`, `dirty`. | `overlays/drawer.vue` |
|
|
215
215
|
| `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` |
|
|
216
216
|
| `ConfirmHost` | Renders the dialogs of `useConfirm`, `useAlert`, `usePrompt`. `OverlayHost` includes it. Do not mount it alone. | None. | - |
|
|
217
217
|
| `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` |
|
|
@@ -250,26 +250,26 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
250
250
|
|
|
251
251
|
## Layout
|
|
252
252
|
|
|
253
|
-
| Component | Purpose and when to use it | Main props, models, slots, events
|
|
254
|
-
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
255
|
-
| `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`, `disabledReason` (with `disabled` on a button or link card: it stays focusable with `aria-disabled`, ignores clicks and shows the reason in a tooltip and as its description), `animated`, `fill` (takes the rest of the parent height, the body is a scrolling flex column, the footer pinned at the bottom). Slots: default, `header`, `title`, `description`, `icon`, `actions`, `footer`.
|
|
256
|
-
| `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` (one line; with a `trail` the title keeps a minimum width and the earlier crumbs truncate), `size` (`md`, `sm` for a panel or inspector header). Slots: `actions`, `badge`, `description`, `title`, `icon`, `breadcrumbs`.
|
|
257
|
-
| `Breadcrumbs` | Path navigation. | Props: `items` (`label`, `to`, `href`, `icon`), `separator`, `linkLast`, `ancestors`, `size` (`sm` for panel headers, `md`, `lg` for a title sized trail), `heading` (the current item is a heading of that level). Slot: `item`.
|
|
258
|
-
| `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`.
|
|
259
|
-
| `Tabs` | Tabs with panels, badges and dots. Segmented or underline. | Model: `v-model` (active value). Props: `items` (`value`, `label`, `icon`, `color` (a palette name or hex, a dot before the label), `badge`, `badgeTone`, `dot`, `title` (a tooltip on hover and focus, also on a disabled tab; native `title` until mount), `disabled`), `variant`, `size`, `lazy`, `fill`, `stretch`, `inset`, `controls` (id of a panel outside the component: only the tab list renders). Slots: `panel-<value>`, `panel`.
|
|
260
|
-
| `Accordion` | Collapsible sections. | Model: `v-model` (open value or values). Props: `items` (`value`, `title`, `description`, `content`, `icon`), `multiple`, `collapsible`, `variant`, `contentVariant` (text, or neutral: inherited font and color for forms, same padding), `padded` (default `true`; `false` for flush content), `divided` (a line between the trigger and the open content). Slots: default, `title`.
|
|
261
|
-
| `ResizeHandle` | Draggable and keyboard resizable separator between a panel and the rest (a side pane, a split editor). | Model: `v-model` (size in px). Props: `orientation` (`vertical`, `horizontal`), `target` (`before`, `after`: where the resized panel is), `min`, `max`, `step` (arrow keys, default 16), `label`, `onReset` (double click). Events: `resizeStart`, `resizeEnd`.
|
|
262
|
-
| `Separator` | Divider, labelled divider, or section heading with description and actions. | Props: `orientation`, `variant` (label, heading), `label`, `description`, `align`, `level`, `lines` (default `true`; `false` hides the lines of either variant). Slots: default, `description`, `actions`.
|
|
263
|
-
| `Stack` | Flex row or column with gap. | Props: `direction`, `gap` (none to xl), `align`, `justify`, `wrap`, `responsive`, `grow` (flex 1 with `min-height: 0`, passes a height down to a fill card), `as`.
|
|
264
|
-
| `Grid` | Responsive CSS grid. | Props: `columns` (number or breakpoints), `minItemWidth` (auto fit), `gap`, `as`.
|
|
265
|
-
| `Toolbar` | Group of controls with arrow key navigation (ARIA toolbar). | Props: `label`, `orientation`, `roving`, `bordered`.
|
|
266
|
-
| `CopyButton` | Button that copies a value and shows "copied". | Props: `value`, `label`, `copiedLabel`, `showLabel`, `size`, `variant`, `tone`, `resetAfter`. Event: `copy(success)`.
|
|
267
|
-
| `ThemeSwitch` | Light, dark and system switch. | Props: `variant` (segmented, icon), `size`, `showLabels`.
|
|
268
|
-
| `NavLink` | One navigation link with icon, badge and active state. | Props: `label`, `to`, `href`, `icon`, `badge`, `active`, `match` (exact, prefix), `external`, `disabled`. Slots: default, `icon`.
|
|
269
|
-
| `AppShell` | App frame: sidebar, topbar, mobile menu, collapse, skip link. Use it for a custom frame. Use `DashboardLayout` for the ready one. | Models: `v-model:collapsed`, `v-model:open`. Props: `variant` (inset, sidebar, floating), `content` (`page`, `fill`, `centered`, `bleed`), `fluid`, `fill`, `topbar`, `storageKey` (collapsed state in the preferences store), `shortcut`, `loading` (hides the page content and shows a page skeleton, `aria-busy` on `main`), `loadingLabel`. Slots: default, `sidebar`, `topbar`, `overlays`, `loading` (replaces the default page skeleton).
|
|
270
|
-
| `Sidebar` | Sidebar content with header, collapse button and footer. Goes in the `sidebar` slot of `AppShell`. | Props: `label`, `collapsible`, `collapseLabel`, `brandAlign` (`start`, `center`). Icons `sidebar-collapse` and `sidebar-expand` for the collapse button. Slots: default, `header`, `top`, `footer`.
|
|
271
|
-
| `SidebarNav` | Navigation list from data, with groups and children. | Props: `items` (`NavItem[]` or `NavSection[]`: `label`, `to`, `icon`, `badge`, `children`), `currentPath`.
|
|
272
|
-
| `SidebarSection` | Labelled block inside a sidebar for hand written links. | Prop: `label`. Slot: default.
|
|
253
|
+
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
254
|
+
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
|
|
255
|
+
| `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`, `disabledReason` (with `disabled` on a button or link card: it stays focusable with `aria-disabled`, ignores clicks and shows the reason in a tooltip and as its description), `animated`, `fill` (takes the rest of the parent height, the body is a scrolling flex column, the footer pinned at the bottom). Slots: default, `header`, `title`, `description`, `icon`, `actions`, `footer`. | `layout/card.vue` |
|
|
256
|
+
| `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` (one line; with a `trail` the title keeps a minimum width and the earlier crumbs truncate), `size` (`md`, `sm` for a panel or inspector header). Slots: `actions`, `badge`, `description`, `title`, `icon`, `breadcrumbs`. | `layout/page-header.vue` |
|
|
257
|
+
| `Breadcrumbs` | Path navigation. | Props: `items` (`label`, `to`, `href`, `icon`), `separator`, `linkLast`, `ancestors`, `size` (`sm` for panel headers, `md`, `lg` for a title sized trail), `heading` (the current item is a heading of that level). Slot: `item`. | `layout/breadcrumbs.vue` |
|
|
258
|
+
| `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` |
|
|
259
|
+
| `Tabs` | Tabs with panels, badges and dots. Segmented or underline. | Model: `v-model` (active value). Props: `items` (`value`, `label`, `icon`, `color` (a palette name or hex, a dot before the label), `badge`, `badgeTone`, `dot`, `title` (a tooltip on hover and focus, also on a disabled tab; native `title` until mount), `disabled`), `variant`, `size`, `lazy`, `fill`, `stretch`, `inset`, `controls` (id of a panel outside the component: only the tab list renders). Slots: `panel-<value>`, `panel`. | `layout/tabs.vue` |
|
|
260
|
+
| `Accordion` | Collapsible sections. | Model: `v-model` (open value or values). Props: `items` (`value`, `title`, `description`, `content`, `icon`), `multiple`, `collapsible`, `variant`, `contentVariant` (text, or neutral: inherited font and color for forms, same padding), `padded` (default `true`; `false` for flush content), `divided` (a line between the trigger and the open content). Slots: default, `title`. | `layout/accordion.vue` |
|
|
261
|
+
| `ResizeHandle` | Draggable and keyboard resizable separator between a panel and the rest (a side pane, a split editor). | Model: `v-model` (size in px). Props: `orientation` (`vertical`, `horizontal`), `target` (`before`, `after`: where the resized panel is), `min`, `max`, `step` (arrow keys, default 16), `label`, `onReset` (double click). Events: `resizeStart`, `resizeEnd`. | `layout/resize-handle.vue` |
|
|
262
|
+
| `Separator` | Divider, labelled divider, or section heading with description and actions. | Props: `orientation`, `variant` (label, heading), `label`, `description`, `align`, `level`, `lines` (default `true`; `false` hides the lines of either variant). Slots: default, `description`, `actions`. | `layout/separator.vue` |
|
|
263
|
+
| `Stack` | Flex row or column with gap. | Props: `direction`, `gap` (none to xl), `align`, `justify`, `wrap`, `responsive`, `grow` (flex 1 with `min-height: 0`, passes a height down to a fill card), `as`. | `layout/stack.vue` |
|
|
264
|
+
| `Grid` | Responsive CSS grid. | Props: `columns` (number or breakpoints), `minItemWidth` (auto fit), `gap`, `as`. | `layout/grid.vue` |
|
|
265
|
+
| `Toolbar` | Group of controls with arrow key navigation (ARIA toolbar). | Props: `label`, `orientation`, `roving`, `bordered`. | `layout/toolbar.vue` |
|
|
266
|
+
| `CopyButton` | Button that copies a value and shows "copied". | Props: `value`, `label`, `copiedLabel`, `showLabel`, `size`, `variant`, `tone`, `resetAfter`. Event: `copy(success)`. | `layout/copy-button.vue` |
|
|
267
|
+
| `ThemeSwitch` | Light, dark and system switch. | Props: `variant` (segmented, icon), `size`, `showLabels`. | `layout/theme-switch.vue` |
|
|
268
|
+
| `NavLink` | One navigation link with icon, badge and active state. | Props: `label`, `to`, `href`, `icon`, `badge`, `active`, `match` (exact, prefix), `external`, `disabled`. Slots: default, `icon`. | `layout/nav-link.vue` |
|
|
269
|
+
| `AppShell` | App frame: sidebar, topbar, mobile menu, collapse, skip link. Use it for a custom frame. Use `DashboardLayout` for the ready one. | Models: `v-model:collapsed`, `v-model:open`. Props: `variant` (inset, sidebar, floating), `content` (`page`, `fill`, `centered`, `bleed`), `fluid`, `fill`, `topbar`, `storageKey` (collapsed state in the preferences store), `dockStorageKey`, `dockLabel`, `dockEmptyTitle`, `dockEmptyDescription`, `dockResizeLabel` (the dock of docked drawers on the right: shown while a page has a mounted `docked` drawer, empty state, resize handle, width in the preferences store under `dock:<key>`), `shortcut`, `loading` (hides the page content and shows a page skeleton, `aria-busy` on `main`), `loadingLabel`. Slots: default, `sidebar`, `topbar`, `overlays`, `loading` (replaces the default page skeleton). | `layout/app-shell.vue` |
|
|
270
|
+
| `Sidebar` | Sidebar content with header, collapse button and footer. Goes in the `sidebar` slot of `AppShell`. | Props: `label`, `collapsible`, `collapseLabel`, `brandAlign` (`start`, `center`). Icons `sidebar-collapse` and `sidebar-expand` for the collapse button. Slots: default, `header`, `top`, `footer`. | `layout/app-shell.vue` |
|
|
271
|
+
| `SidebarNav` | Navigation list from data, with groups and children. | Props: `items` (`NavItem[]` or `NavSection[]`: `label`, `to`, `icon`, `badge`, `children`), `currentPath`. | `layout/app-shell.vue` |
|
|
272
|
+
| `SidebarSection` | Labelled block inside a sidebar for hand written links. | Prop: `label`. Slot: default. | `layout/app-shell.vue` |
|
|
273
273
|
|
|
274
274
|
## Feedback
|
|
275
275
|
|
|
@@ -291,14 +291,14 @@ Templates combine core parts into whole pages and layouts. Start from them for n
|
|
|
291
291
|
|
|
292
292
|
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
293
293
|
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
|
|
294
|
-
| `DashboardLayout` | Ready app frame: brand, navigation, command search, account menu, settings modal, breadcrumbs, theme switch. Put it in `layouts/default.vue`. | Models: `v-model:collapsed`, `v-model:open`, `v-model:settingsOpen`, `v-model:settingsSection`. Props: `navigation` (`NavItem[]` or `NavSection[]`), `account` (`name`, `email`, `avatar`, `role`, `menu`), `brandName`, `brandIcon`, `brandLogo`, `breadcrumbs`, `search` (true, groups or function), `settingsSections`, `settingsRoute`, `settingsRouteLocation`, `settingsAccountSection`, `settingsResolvePage`, `settingsHideSession`, `variant`, `content` (`page`, `fill`, `centered`, `bleed`; per page with `definePageMeta({ content })` in `k-dashboard`), `fluid`, `fill`, `loading` (page skeleton while a navigation is pending: bind `useNavigationPending()` in Nuxt), `loadingLabel`, `onSignOut
|
|
294
|
+
| `DashboardLayout` | Ready app frame: brand, navigation, command search, account menu, settings modal, breadcrumbs, theme switch. Put it in `layouts/default.vue`. | Models: `v-model:collapsed`, `v-model:open`, `v-model:settingsOpen`, `v-model:settingsSection`. Props: `navigation` (`NavItem[]` or `NavSection[]`), `account` (`name`, `email`, `avatar`, `role`, `menu`), `brandName`, `brandIcon`, `brandLogo`, `breadcrumbs`, `search` (true, groups or function), `settingsSections`, `settingsRoute`, `settingsRouteLocation`, `settingsAccountSection`, `settingsResolvePage`, `settingsHideSession`, `variant`, `content` (`page`, `fill`, `centered`, `bleed`; per page with `definePageMeta({ content })` in `k-dashboard`), `fluid`, `fill`, `loading` (page skeleton while a navigation is pending: bind `useNavigationPending()` in Nuxt), `loadingLabel`, `onSignOut`, `dockStorageKey` (default `k-dock`), `dockLabel`, `dockEmptyTitle`, `dockEmptyDescription`, `dockResizeLabel` (the dock of docked drawers, see `AppShell`). Slots: default, `loading`, `actions`, `brand`, `sidebar-top`, `sidebar`, `sidebar-footer`, `account`, `topbar`, `search-item`, `settings-account-start`, `settings-account-fields`, `settings-section-<id>`, `settings-actions-<id>`, `settings-tabs-<id>`, `settings-nav-footer`. Event: `accountSelect`. | `templates/dashboard-layout.vue` |
|
|
295
295
|
| `WorkspaceLayout` | Full height editor workspace: top bar (`start`, `center`, `end`) and up to three panes, the side panes resizable, collapsible and persisted, tabs under a container breakpoint. | Models: `v-model:pane` (active tab in compact mode), `v-model:left-collapsed`, `v-model:right-collapsed`, `v-model:left-width`, `v-model:right-width`. Props: `left`, `right` (`label`, `min`, `max`, `initial`, tab `badge`, `badgeTone`, `badgeLabel`, `dot`, `icon`), `main` (`label`, badge), `storageKey`, `breakpoint` (1024), `step`, `panesLabel`, `resizeLabel`. Slots: `start`, `center`, `end`, `left`, `left-header`, `main`, `main-header`, `right`, `right-header` (scope `{ compact, pane, collapsed, toggle, reveal }`; a `PageHeader` in `start` or a pane header fills the row and shrinks, its actions stay on the title row). Exposed: `toggle`, `reveal`, `compact`. | `templates/workspace-layout.vue` |
|
|
296
296
|
| `AuthLayout` | Frame of sign in, sign up and reset password pages: left column with brand, title (or a large breadcrumb), form and footer; aside panel on the right from 960px. | Props: `title`, `description`, `breadcrumbs`, `footer`, `brandName`, `brandIcon`, `brandLogo`, `aside`, `asideTitle`, `asideDescription`, `themeSwitch`. Slots: default, `links`, `footer`, `brand`, `aside`, `corner`. | `templates/auth-layout.vue` |
|
|
297
297
|
| `AuthLogin` | Complete sign in page in two steps (email, then password with a breadcrumb back). Offers to sign in again after `AuthLogout`. | Props: `submit` (`{ email, password }`), `submitError`, `title`, `description`, `emailLabel`, `emailPlaceholder`, `passwordLabel`, `submitLabel`, `stepKey`, `reasonKey`, frame props of `AuthLayout`. Slots: `links` (`{ email, step }`), `footer`, `brand`, `aside`, `corner`. | `templates/auth-login.vue` |
|
|
298
298
|
| `AuthLogout` | Sign out page: runs `logout()`, remembers the account, reloads the sign in page. Retry on error. | Props: `logout`, `account` (`{ email, name }`), `loginTo`, `reasonKey`, frame props of `AuthLayout`. Slots: `footer`, `brand`, `aside`, `corner`. Helpers: `rememberSignedOutAccount`, `takeSignedOutAccount`, `SIGNED_OUT_REASON`. | `templates/auth-login.vue` |
|
|
299
299
|
| `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`, `filtered` (filters of your own in `#toolbar` are active: no rows show no results with the toolbar and a clear button that emits `clear`, not the first run empty state), `fill` (the card fills the page height, for `content: 'fill'` pages: rows scroll under a sticky header, footer pinned, states centered), `count` (a badge next to the title: `true` for `total` or the row count, or a number), `allIds` (server mode "Select all N" in the selection bar; client mode selects every filtered row without it), `selectedText`, `emptyTitle`. Slots: `actions`, `badge`, `toolbar`, `toolbar-end`, `bulk`, `empty`, `empty-actions`, `no-results`, `error`, `cell-<key>`, `table`. Events: `retry`, `clear`, `rowClick`. | `templates/list-page.vue` |
|
|
300
300
|
| `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` |
|
|
301
|
-
| `FormDrawer` | Drawer with a form: `Form` around the body, footer with delete (left), cancel and submit, a discard confirmation on close when the form is dirty, `SkeletonForm` while `loading`. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side`, `size`, `fill` (full height body), `tabs` (`FormDrawerTab`: `fields` gives the error dot and opens the tab on a failed submit, `fill: true` makes the drawer `fill` while the tab is active), `tabRoute` (keeps the tab in the hash under this key), `trail`, `backLabel`, `form`, `loading`, `readonly` (also disables every field of the body, your own `Form` in the slot too), `creating` (submit says Create, no dirty needed), `requireDirty`, `deletable`, `deleteDisabled`, `deleteHint`, `submitLabel`, `cancelLabel`, `deleteLabel`, `submitIcon` (icon of the submit button), `deleteIcon` (default `trash`), `guard`, `guardTitle`, `guardMessage` (the leave guard of the drawer: close, cancel, trail navigation), `beforeClose`, `onCancel
|
|
301
|
+
| `FormDrawer` | Drawer with a form: `Form` around the body, footer with delete (left), cancel and submit, a discard confirmation on close when the form is dirty, `SkeletonForm` while `loading`. | Models: `v-model:open`, `v-model:tab`. Props: `title`, `description`, `side`, `size`, `fill` (full height body), `tabs` (`FormDrawerTab`: `fields` gives the error dot and opens the tab on a failed submit, `fill: true` makes the drawer `fill` while the tab is active), `tabRoute` (keeps the tab in the hash under this key), `trail`, `backLabel`, `form`, `loading`, `readonly` (also disables every field of the body, your own `Form` in the slot too), `creating` (submit says Create, no dirty needed), `requireDirty`, `deletable`, `deleteDisabled`, `deleteHint`, `submitLabel`, `cancelLabel`, `deleteLabel`, `submitIcon` (icon of the submit button), `deleteIcon` (default `trash`), `guard`, `guardTitle`, `guardMessage` (the leave guard of the drawer: close, cancel, trail navigation), `beforeClose`, `onCancel`, `docked` (as `Drawer`). `deleteHint` is a tooltip of the delete button, and the reason when `deleteDisabled`. Slots: default (`{ tab }`), `actions`, `title-trailing`, `skeleton`, `footer`. Events: `delete`, `submitted`, `navigate`, `afterLeave`. Exposes `confirmDiscard()`, `close()`. | `templates/form-drawer.vue` |
|
|
302
302
|
| `FormModal` | Modal with a form, like `FormDrawer`: `Form` around the body, footer with delete (left), cancel and submit, the leave guard on close, `SkeletonForm` while `loading`, `readonly`. | Model: `v-model:open`. Props: `title`, `description`, `label`, `size`, `sheet`, `width`, `fill`, `dismissible`, `form`, `nested` (the form is a `div`: a modal opened from a field of another form), `loading`, `readonly`, `creating`, `requireDirty`, `deletable`, `deleteDisabled`, `deleteHint`, `submitLabel`, `cancelLabel`, `deleteLabel`, `submitIcon` (icon of the submit button), `deleteIcon` (default `trash`), `guard`, `guardTitle`, `guardMessage`, `beforeClose`, `onCancel`. Slots: default, `actions`, `title-trailing`, `skeleton`, `footer` (`{ submit, cancel }`). Events: `delete`, `submitted`, `open`, `close`, `afterLeave`. Exposes `submit()`, `confirmDiscard()`, `close()`. | `templates/form-modal.vue` |
|
|
303
303
|
| `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` |
|
|
304
304
|
| `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` |
|