@xleddyl/443-components-vue 0.16.96 → 0.16.98

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 (94) hide show
  1. package/CATALOG.md +48 -39
  2. package/README.md +127 -38
  3. package/dist/components/core/FormField.vue +46 -2
  4. package/dist/components/core/FormField.vue.d.ts +2 -0
  5. package/dist/components/core/Root.vue +2 -0
  6. package/dist/components/core/Root.vue.d.ts +2 -0
  7. package/dist/components/core/types.d.ts +1 -0
  8. package/dist/components/data/FilterPills.vue +2 -1
  9. package/dist/components/data/Table.vue +3 -1
  10. package/dist/components/data/Table.vue.d.ts +1 -0
  11. package/dist/components/data/TileGrid.vue +1 -0
  12. package/dist/components/data/types.d.ts +1 -0
  13. package/dist/components/feedback/Alert.vue +13 -3
  14. package/dist/components/feedback/Alert.vue.d.ts +4 -4
  15. package/dist/components/forms/FileDropOverlay.vue +28 -0
  16. package/dist/components/forms/FileDropOverlay.vue.d.ts +410 -0
  17. package/dist/components/forms/PaletteSelect.vue.d.ts +2 -2
  18. package/dist/components/forms/SegmentedControl.vue +20 -1
  19. package/dist/components/forms/index.d.ts +1 -0
  20. package/dist/components/forms/index.mjs +1 -0
  21. package/dist/components/forms/types.d.ts +4 -1
  22. package/dist/components/layout/Accordion.vue +7 -2
  23. package/dist/components/layout/Accordion.vue.d.ts +2 -0
  24. package/dist/components/layout/Card.vue +47 -6
  25. package/dist/components/layout/Card.vue.d.ts +4 -0
  26. package/dist/components/layout/PageHeader.vue +5 -2
  27. package/dist/components/layout/PageHeader.vue.d.ts +4 -1
  28. package/dist/components/layout/ResizeHandle.vue +94 -0
  29. package/dist/components/layout/ResizeHandle.vue.d.ts +418 -0
  30. package/dist/components/layout/Stack.vue +3 -2
  31. package/dist/components/layout/Stack.vue.d.ts +2 -0
  32. package/dist/components/layout/index.d.ts +1 -0
  33. package/dist/components/layout/index.mjs +1 -0
  34. package/dist/components/layout/types.d.ts +4 -1
  35. package/dist/components/overlays/CommandList.vue +22 -4
  36. package/dist/components/overlays/ConfirmDialog.vue.d.ts +8 -8
  37. package/dist/components/overlays/ConfirmHost.vue.d.ts +8 -8
  38. package/dist/components/overlays/Popover.vue +64 -24
  39. package/dist/components/overlays/Popover.vue.d.ts +13 -4
  40. package/dist/components/overlays/types.d.ts +7 -1
  41. package/dist/components/templates/ListPage.vue +3 -2
  42. package/dist/components/templates/SettingsModal.vue.d.ts +2 -2
  43. package/dist/components/templates/SettingsSection.vue.d.ts +4 -0
  44. package/dist/components/templates/WorkspaceLayout.vue +296 -0
  45. package/dist/components/templates/WorkspaceLayout.vue.d.ts +455 -0
  46. package/dist/components/templates/index.d.ts +1 -0
  47. package/dist/components/templates/index.mjs +1 -0
  48. package/dist/components/templates/types.d.ts +32 -0
  49. package/dist/composables/core.d.ts +1 -0
  50. package/dist/composables/core.mjs +1 -0
  51. package/dist/composables/forms.d.ts +1 -0
  52. package/dist/composables/forms.mjs +1 -0
  53. package/dist/composables/useFieldHighlight.d.ts +8 -0
  54. package/dist/composables/useFieldHighlight.mjs +19 -0
  55. package/dist/composables/useFileDialog.d.ts +17 -0
  56. package/dist/composables/useFileDialog.mjs +40 -0
  57. package/dist/composables/usePreferences.d.ts +1 -0
  58. package/dist/composables/usePreferences.mjs +2 -1
  59. package/dist/internal/core/HighlightText.d.ts +12 -0
  60. package/dist/internal/core/HighlightText.mjs +30 -0
  61. package/dist/internal/core/env.d.ts +2 -0
  62. package/dist/internal/core/env.mjs +20 -1
  63. package/dist/internal/overlays/OverlayView.vue.d.ts +8 -8
  64. package/dist/locale/de.mjs +10 -0
  65. package/dist/locale/en.mjs +10 -0
  66. package/dist/locale/it.mjs +10 -0
  67. package/dist/locale/types.d.ts +10 -0
  68. package/dist/nuxt/runtime/layouts/auth.vue.d.ts +2 -0
  69. package/dist/nuxt/runtime/layouts/dashboard.vue.d.ts +2 -0
  70. package/dist/styles/base.css +13 -0
  71. package/dist/styles/core/form-field.css +13 -0
  72. package/dist/styles/core/root.css +23 -0
  73. package/dist/styles/data/table.css +17 -0
  74. package/dist/styles/data/thumbnail.css +5 -2
  75. package/dist/styles/data/tile-grid.css +2 -1
  76. package/dist/styles/design-tokens.css +4 -0
  77. package/dist/styles/feedback/alert.css +13 -0
  78. package/dist/styles/forced-colors.css +22 -1
  79. package/dist/styles/forms/file-drop-overlay.css +48 -0
  80. package/dist/styles/forms/segmented.css +36 -0
  81. package/dist/styles/forms.css +1 -0
  82. package/dist/styles/layout/accordion.css +8 -0
  83. package/dist/styles/layout/breadcrumbs.css +23 -0
  84. package/dist/styles/layout/card.css +19 -7
  85. package/dist/styles/layout/page-header.css +58 -0
  86. package/dist/styles/layout/resize-handle.css +52 -0
  87. package/dist/styles/layout/stack.css +5 -0
  88. package/dist/styles/layout.css +1 -0
  89. package/dist/styles/overlays/command.css +17 -0
  90. package/dist/styles/shared.css +8 -0
  91. package/dist/styles/templates/list-page.css +1 -21
  92. package/dist/styles/templates/workspace-layout.css +143 -0
  93. package/dist/styles/templates.css +1 -0
  94. package/package.json +3 -2
package/README.md CHANGED
@@ -113,8 +113,26 @@ Vite 8 minifies CSS with Lightning CSS. Set `build.cssTarget` to browsers that s
113
113
 
114
114
  Tokens live on `.k-root`, never on `:root`. Override them on a root element: host CSS, Root props or inline style.
115
115
 
116
+ `Root` with `document` is the page itself (the outermost root of an app that owns the whole document): it covers the viewport (`min-height: 100dvh`) on `--k-canvas`, and the document follows it without any `html` or `body` rule in the app: `<html>` takes the color scheme of its `theme` (system, light or dark, so scrollbars and the overscroll area match) and no overscroll bounce, `<body>` loses its margin. The rules are `:root:has(.k-root.is-document)` selectors, so they work in the server render and stop when the root unmounts. A nested root ignores it. With Nuxt, `k.global: true` puts the root on `<html>` instead.
117
+
116
118
  With Tailwind CSS 4, import the theme bridge after Tailwind: `@import '@xleddyl/443-components-vue/tailwind.css';`. It maps the tokens to Tailwind theme values, so host code writes `border-line`, `bg-subtle`, `text-text-muted`, `text-danger-text`, `rounded-md` or `shadow-raised` instead of `border-(--k-line)`. A token `--k-<name>` is the color `<name>`; radii, shadows and fonts keep their names. The values stay live, so presets, dark mode and custom themes apply.
117
119
 
120
+ Outside the components (a site page, an iframe, a non Vue widget), `@import '@xleddyl/443-components-vue/tokens.css'` (or a `<link>` to it) loads only the design tokens, in the `k.tokens` layer: every `--k-*` custom property for light and dark (`light-dark()`, `data-theme` forces one), the accent variants derived from `--k-accent` and the presets (`data-preset`). Like in the full stylesheet they are scoped to `.k-root`, so put `class="k-root"` (and `data-theme`, `data-preset`, your theme class) on the element that holds your markup and read `var(--k-accent)`, `var(--k-surface)` and the rest. It has no reset, no component styles and no fonts: load the fonts of your preset yourself. With the full `style.css` on the same page it adds nothing, the rules are the same.
121
+
122
+ ```css
123
+ @import '@xleddyl/443-components-vue/tokens.css';
124
+
125
+ .preview-banner {
126
+ background: var(--k-elevated);
127
+ color: var(--k-text);
128
+ box-shadow: var(--k-shadow-overlay);
129
+ }
130
+ ```
131
+
132
+ ```html
133
+ <div class="k-root" data-theme="dark"><div class="preview-banner">...</div></div>
134
+ ```
135
+
118
136
  The brand of an app is a custom theme: a class on the outermost root, with the token overrides in host CSS. Keep the brand values in this one place, not in Root props.
119
137
 
120
138
  ```vue
@@ -214,14 +232,15 @@ Buttons show `icon` before the label and `trailingIcon` after it. Put action ico
214
232
 
215
233
  ## Preferences
216
234
 
217
- UI choices are kept in one preferences store: the theme, the preset, the collapsed sidebar and the DataGrid columns and page size. By default the store is `localStorage` (keys `k-pref:<key>`, JSON, SSR safe, never throws, synced across tabs). Give the app your own store to keep the choices per user in a database, so they follow the user across devices.
235
+ UI choices are kept in one preferences store: the theme, the preset, the collapsed sidebar, the DataGrid columns and page size, and the WorkspaceLayout panes. By default the store is `localStorage` (keys `k-pref:<key>`, JSON, SSR safe, never throws, synced across tabs). Give the app your own store to keep the choices per user in a database, so they follow the user across devices.
218
236
 
219
- | Key | Value | Written by |
220
- | -------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------- |
221
- | `theme` | `'system' \| 'light' \| 'dark'` | `useTheme().set`, `ThemeSwitch`, `AppearanceSettings` |
222
- | `preset` | `ThemePreset` | `usePreset().set`, `AppearanceSettings` |
223
- | `shell:<storageKey>` | `boolean` (collapsed) | `AppShell` and `DashboardLayout` (`shell:k-sidebar-collapsed`) |
224
- | `grid:<storageKey>` | `GridPreference` (`{ columns?: GridColumnState[], pageSize }`) | `DataGrid` with `storageKey`: visibility, order, width, pinned, page size |
237
+ | Key | Value | Written by |
238
+ | ------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
239
+ | `theme` | `'system' \| 'light' \| 'dark'` | `useTheme().set`, `ThemeSwitch`, `AppearanceSettings` |
240
+ | `preset` | `ThemePreset` | `usePreset().set`, `AppearanceSettings` |
241
+ | `shell:<storageKey>` | `boolean` (collapsed) | `AppShell` and `DashboardLayout` (`shell:k-sidebar-collapsed`) |
242
+ | `grid:<storageKey>` | `GridPreference` (`{ columns?: GridColumnState[], pageSize }`) | `DataGrid` with `storageKey`: visibility, order, width, pinned, page size |
243
+ | `workspace:<storageKey>` | `WorkspacePreference` (`{ left?: { width, collapsed }, right?: { width, collapsed } }`) | `WorkspaceLayout` with `storageKey`: side pane widths and collapsed state |
225
244
 
226
245
  `PREFERENCE_KEYS` builds them (`PREFERENCE_KEYS.grid('orders')`). Your own keys work too: use a namespace of your app (`app:<name>`).
227
246
 
@@ -468,20 +487,20 @@ async function switchView() {
468
487
 
469
488
  ## Components
470
489
 
471
- | Group | Components |
472
- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
473
- | core | Root, Icon, Button, Spinner, Input, Textarea, FormField, FieldMessage, FieldBoundary, Form, FormAlerts, Kbd, VisuallyHidden |
474
- | forms | Calendar, Checkbox, CheckboxGroup, ColorInput, Combobox, DateInput, DatePicker, FileInput, FocalPointInput, InputAddon, InputGroup, NumberInput, PaletteSelect, PasswordInput, PinInput, Radio, RadioGroup, SegmentedControl, Select, Slider, Switch, TimeInput, TreeSelect |
475
- | overlays | CommandButton, CommandList, CommandPalette, ConfirmDialog, ConfirmHost, ContextMenu, Drawer, DropdownMenu, HoverCard, Modal, OverlayHost, Popover, Toaster, Tooltip |
476
- | data | Avatar, AvatarGroup, Badge, DescriptionList, FilterPill, FilterPills, Pagination, RecordList, SelectionBar, SortableList, Stat, Table, Tag, TagList, Thumbnail, TileGrid, Timeline, Tree |
477
- | layout | Accordion, AppShell, Breadcrumbs, Card, CopyButton, Grid, NavLink, PageHeader, Separator, Sidebar, SidebarNav, SidebarSection, Stack, Stepper, Tabs, ThemeSwitch, Toolbar |
478
- | templates | DashboardLayout, AuthLayout, AuthLogin, AuthLogout, DashboardPage, ListPage, DetailPage, FormPage, SettingsPage, SettingsSection, SettingsModal, SettingsGroup, AppearanceSettings, SaveBar, ErrorPage, NotFoundPage, EmptyPage, Brand, AccountMenu, FormDrawer |
479
- | feedback | Alert, EmptyState, LoadingOverlay, Meter, Progress, ProgressRing, Skeleton, SkeletonForm, SkeletonList |
480
- | grid | DataGrid, GridToolbar, cell renderers (BadgeCell, BooleanCell, ButtonCell, DateCell, EmptyCell, ImageCell, LinkCell) |
481
- | editor | RichTextEditor, TemplateEditor, TemplateText |
482
- | chart | ChartPanel, ChartLegend, LineChart, BarChart, DoughnutChart |
483
-
484
- Composables: `useTheme`, `usePreset`, `useForm`, `useField`, `useFieldControl`, `useToast` (and `toast`), `useConfirm`, `useAlert`, `usePrompt`, `useModal`, `useDrawer`, `useOverlay`, `useModalContext`, `useLoading` (and `withLoading`), `useLoadingState`, `useHotkey`, `useCopy`, `useFileDrop` (with `readDroppedFiles`), `useSortable`, `usePasswordStrength`, `useTableSort`, `useAppShell`, `useRouteState`, `useRouteRecord`, `usePageCommands`, `usePreference` (with `usePreferences`, `createPreferences`, `providePreferences`), `useScrollLock`, `useLeaveGuard` (with `useLeaveScope`, `provideLeaveScope`), `useDirtyGuard`, `useIcons` helpers and `useLinkComponent`, `provideFieldBoundary`, `provideAuxiliaryControls`, `provideForm`, `provideGridConfig` (with `createGridConfig`, `useGridConfig`), `useLocale`. With the Nuxt module also `useDashboard()` (runtime account, breadcrumbs and badges for the `k-dashboard` layout) and `useNavigationPending()` (`true` while a navigation to another path renders the new page), auto-imported or imported from `@xleddyl/443-components-vue/nuxt/composables`.
490
+ | Group | Components |
491
+ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
492
+ | core | Root, Icon, Button, Spinner, Input, Textarea, FormField, FieldMessage, FieldBoundary, Form, FormAlerts, Kbd, VisuallyHidden |
493
+ | forms | Calendar, Checkbox, CheckboxGroup, ColorInput, Combobox, DateInput, DatePicker, FileDropOverlay, FileInput, FocalPointInput, InputAddon, InputGroup, NumberInput, PaletteSelect, PasswordInput, PinInput, Radio, RadioGroup, SegmentedControl, Select, Slider, Switch, TimeInput, TreeSelect |
494
+ | overlays | CommandButton, CommandList, CommandPalette, ConfirmDialog, ConfirmHost, ContextMenu, Drawer, DropdownMenu, HoverCard, Modal, OverlayHost, Popover, Toaster, Tooltip |
495
+ | data | Avatar, AvatarGroup, Badge, DescriptionList, FilterPill, FilterPills, Pagination, RecordList, SelectionBar, SortableList, Stat, Table, Tag, TagList, Thumbnail, TileGrid, Timeline, Tree |
496
+ | layout | Accordion, AppShell, Breadcrumbs, Card, CopyButton, Grid, NavLink, PageHeader, ResizeHandle, Separator, Sidebar, SidebarNav, SidebarSection, Stack, Stepper, Tabs, ThemeSwitch, Toolbar |
497
+ | templates | DashboardLayout, WorkspaceLayout, AuthLayout, AuthLogin, AuthLogout, DashboardPage, ListPage, DetailPage, FormPage, SettingsPage, SettingsSection, SettingsModal, SettingsGroup, AppearanceSettings, SaveBar, ErrorPage, NotFoundPage, EmptyPage, Brand, AccountMenu, FormDrawer |
498
+ | feedback | Alert, EmptyState, LoadingOverlay, Meter, Progress, ProgressRing, Skeleton, SkeletonForm, SkeletonList |
499
+ | grid | DataGrid, GridToolbar, cell renderers (BadgeCell, BooleanCell, ButtonCell, DateCell, EmptyCell, ImageCell, LinkCell) |
500
+ | editor | RichTextEditor, TemplateEditor, TemplateText |
501
+ | chart | ChartPanel, ChartLegend, LineChart, BarChart, DoughnutChart |
502
+
503
+ Composables: `useTheme`, `usePreset`, `useForm`, `useField`, `useFieldControl`, `useToast` (and `toast`), `useConfirm`, `useAlert`, `usePrompt`, `useModal`, `useDrawer`, `useOverlay`, `useModalContext`, `useLoading` (and `withLoading`), `useLoadingState`, `useHotkey`, `useCopy`, `useFileDrop` (with `readDroppedFiles`), `useFileDialog`, `useSortable`, `usePasswordStrength`, `useTableSort`, `useAppShell`, `useRouteState`, `useRouteRecord`, `usePageCommands`, `usePreference` (with `usePreferences`, `createPreferences`, `providePreferences`), `useScrollLock`, `useLeaveGuard` (with `useLeaveScope`, `provideLeaveScope`), `useDirtyGuard`, `useIcons` helpers and `useLinkComponent`, `provideFieldBoundary`, `provideAuxiliaryControls`, `provideForm`, `provideGridConfig` (with `createGridConfig`, `useGridConfig`), `useLocale`. With the Nuxt module also `useDashboard()` (runtime account, breadcrumbs and badges for the `k-dashboard` layout) and `useNavigationPending()` (`true` while a navigation to another path renders the new page), auto-imported or imported from `@xleddyl/443-components-vue/nuxt/composables`.
485
504
 
486
505
  ### Buttons and tooltips
487
506
 
@@ -515,6 +534,7 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
515
534
  - `Input` and `Textarea` take `counter`: with a `maxlength` attribute they show `length / maxlength` inside the field, describe the control with "12 of 40 characters" (`form.characterCount`) and announce "Character limit reached" when it is hit.
516
535
  - Numbers are left aligned in every field. `Input` `numeric` sets the decimal keyboard, the number model and tabular digits; `NumberInput` takes `align="end"` to right align its value when a layout needs it (default `start`).
517
536
  - `Input` takes `transform: (value: string) => string`, applied to the typed text before it reaches the model (the caret keeps its place; IME composition is transformed when it ends). `:transform="(value) => value.toUpperCase()"` enforces uppercase codes. Values set from outside are not transformed.
537
+ - `FormField` `highlight` flashes the field for a deep link or a search result: when it becomes `true` (or on mount) the field scrolls to the center of its scroll container and gets an `--k-accent-soft` tint that fades out in 2.4s (`is-highlighted`, an outline in forced colors). With reduced motion it jumps there and the tint shows without fading for the same time. `useFieldHighlight(duration?)` returns `{ highlighted, highlight(name), clear }`: `highlight(name)` sets `highlighted` to the name and clears it after the flash, so the same field can flash again: `<KFormField name="slug" :highlight="highlighted === 'slug'">`.
518
538
  - `FormField` takes `optional`, a muted localized "Optional" marker in the label row (`form.optional`, `optionalText` overrides it), the counterpart of the required asterisk. It is hidden when the field is required. `help` adds an info icon after the label: the text shows as a tooltip on hover and is linked to the control with `aria-describedby`, for a format or a rule that the label cannot say.
519
539
  - `CheckboxGroup` takes `columns` (a number): the options are laid out in a grid with that many equal columns. Unset keeps the `orientation` layout. `variant="filled"` (`CheckboxGroupVariant`, `'default' | 'filled'`, default `'default'`) puts the options in a subtle filled panel, styled by `--k-checkbox-group-background` (`--k-subtle`), `--k-checkbox-group-padding` (0.75rem), `--k-checkbox-group-radius` (`--k-radius-md`) and `--k-checkbox-group-border` (none).
520
540
  - `Combobox` with `creatable` takes `createTransform` (`ComboboxCreateTransform`, `(input) => string | null | undefined`) and `createValidate` (`ComboboxCreateValidate`, `(input) => string | true | undefined`). The transform runs on the typed text first: the "Create" option shows its result, and an empty result (or `null`) shows no create option. The validator gets the transformed text when the user picks the create option: a returned string is the error, shown inline through the surrounding `FormField` (`useFieldControl().setControlError`, or a `FieldMessage` under the control and an announcement without a field) with `aria-invalid` on the input, and nothing is created; `true` or nothing accepts it. The error clears when the query changes. Both work with `multiple`, where created values become tags: `<KCombobox v-model="tags" multiple creatable :create-transform="(input) => input.toLowerCase()" :create-validate="(input) => input.length >= 3 || 'Too short'" />`.
@@ -538,13 +558,14 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
538
558
  - `Tabs` items take `dot: true` for a small indicator without a number (`dotTone`, default `danger`; `dotLabel` is the hidden text, default "Needs attention"). `color` (a palette name or a hex, `ColorValue`) draws a small color dot before the label, separate from the status dot. `title` shows a tooltip on hover and keyboard focus (the native `title` only until mount) and becomes the tab description; a disabled tab keeps it (it uses `aria-disabled`, cannot be selected and is skipped by Tab and the arrow keys), so it can say why it is disabled. The same items work in the `tabs` of `Modal`, `Drawer`, `FormDrawer` and `DetailPage`.
539
559
  - `Card` takes `variant="dashed"` (`CardVariant`) for a placeholder tile: a dashed `--k-line-strong` border on `--k-subtle`, with the icon, title and description centered in a column (the icon in a raised box, the title at 0.8125rem). As a button (`as="button"`) or a link (`to`, `href`) it gets the hover and focus of the `FileInput` dropzone (`--k-fill` and a `--k-text-dimmed` border on hover, a solid `--k-ring` border and the focus ring on focus); `disabled` dims it, and `selected` tints it with the accent, for a drop target while something is dragged over it. Use it for an "Add" tile at the end of a grid of items and for an empty area: `<KCard variant="dashed" as="button" icon="plus" title="Add block" @click="add" />`.
540
560
  - `DropdownMenu` takes `matchTriggerWidth` (the menu is at least as wide as its trigger) and `minWidth` (a CSS length).
541
- - `PageHeader` takes `align` (`'end'` by default, `'start'` or `'center'`) for the title block and the actions, and `truncate` to keep the title on one line with an ellipsis (the full title is in its `title` attribute). `trail` (`BreadcrumbItem[]`, the earlier levels as links) turns the title into a breadcrumb trail that ends with `title`, at the page title size: a `nav` (named by `trailLabel`, default "Breadcrumb") around an ordered list whose last item is the heading (`h<level>`, `aria-current="page"`, only the title, `#title` fills it). With `truncate` the trail stays on one line and the title gets the ellipsis. Use it for a record or a nested page instead of `Breadcrumbs` in `#title` (a `nav` inside a heading). `breadcrumbs` stays the small trail above the title.
561
+ - `PageHeader` takes `align` (`'end'` by default, `'start'` or `'center'`) for the title block and the actions, and `truncate` to keep the title on one line with an ellipsis (the full title is in its `title` attribute). `trail` (`BreadcrumbItem[]`, the earlier levels as links) turns the title into a breadcrumb trail that ends with `title`, at the page title size: a `nav` (named by `trailLabel`, default "Breadcrumb") around an ordered list whose last item is the heading (`h<level>`, `aria-current="page"`, only the title, `#title` fills it). With `truncate` the trail stays on one line and the title gets the ellipsis. Use it for a record or a nested page instead of `Breadcrumbs` in `#title` (a `nav` inside a heading). `breadcrumbs` stays the small trail above the title. `size="sm"` (`PageHeaderSize`, default `md`) is the compact header of a panel or an inspector: the title at the card title size (0.9375rem, 600), a 1.75rem icon box, tighter gaps, a 0.75rem description, `breadcrumbs` at `Breadcrumbs` size `sm` and the `trail` at the title size.
562
+ - `ResizeHandle` is a focusable `separator` that resizes the panel next to it: `v-model` is the size in pixels (`aria-valuenow`), `min` (default 0) and `max` clamp it (`aria-valuemin`, `aria-valuemax`), `orientation` is `vertical` (default, a vertical line that resizes a width, Left and Right arrows) or `horizontal` (a height, Up and Down arrows), and `target` says where the panel is: `before` (default, left or above, dragging right or down grows it) or `after` (an inspector on the right). The arrow keys move it by `step` (default 16), Home and End jump to `min` and `max`, a double click calls `onReset`. Dragging captures the pointer (it keeps working over iframes) and emits `resizeStart` and `resizeEnd(size)`. Name it with `label` and point `aria-controls` at the panel. The 1px line has a 11px hit area and turns `--k-ring` on hover, while dragging and on focus (with the `--k-ring-soft` halo).
542
563
  - `RichTextEditor` accepts `'underline'` in `toolbar` (not in the default toolbar).
543
564
  - `RichTextEditor` takes `linkTypes` (`EditorLinkType[]`, `'url' | 'email' | 'phone'`, default `['url']`). With more than one type the link form shows a type select; email links get `mailto:` and phone links `tel:` (spaces and separators removed). When no text is selected the form asks for the link text too (`editor.linkText`) and inserts it as a link, falling back to the address.
544
565
  - `BarChart` takes `colorByPoint` (every bar of a series takes the next palette color, or one from `colors: string[]`; the legend lists and toggles the categories). The palette comes from `--k-chart-1` to `--k-chart-8`.
545
566
  - `SelectionBar` shows a plural aware selected count (announced in a live region), select all (`total` plus `@select-all`; a listener that returns a promise shows a spinner until it settles) and clear (`@clear`) actions (with `@select-all` and `count` at `total`, the select all action becomes a "Clear selection" button in place of the clear icon), an `#actions` slot and `placement` `inline`, `sticky` or `floating`. With `count` 0 it renders no box (only its live region), so it can sit in a flex toolbar without adding a gap; the first count after mount is announced too. `ListPage` renders it in its toolbar when `selectable`.
546
- - `FilterPills` is generic: the value type comes from the options, `multiple` makes the model an array and `required` drops `null` from it (like `SegmentedControl`). Options take `menu` items (a dropdown trigger showing `valueLabel`) or `panel: true`, which opens a popover with the `#panel-<value>` slot (`{ option, active, toggle, close }`, `panelLabel` names it). The `#pill` slot renders any trigger and its scope has `defaultPill`, a component that renders the built-in pill for that option, so one custom pill does not mean rewriting the others: `<component :is="defaultPill" v-else />`. `FilterPill` is exported so custom triggers match the other pills.
547
- - `SegmentedControl` with `required` narrows `v-model` to a non null value. Options take `title` (tooltip and description) and `muted`, and the `#option` slot replaces the content of each option.
567
+ - `FilterPills` is generic: the value type comes from the options, `multiple` makes the model an array and `required` drops `null` from it (like `SegmentedControl`). Options take `menu` items (a dropdown trigger showing `valueLabel`) or `panel: true`, which opens a popover with the `#panel-<value>` slot (`{ option, active, toggle, close }`, `panelLabel` names it, `panelWidth` sets its width like the `Popover` `width`, capped at the viewport). The `#pill` slot renders any trigger and its scope has `defaultPill`, a component that renders the built-in pill for that option, so one custom pill does not mean rewriting the others: `<component :is="defaultPill" v-else />`. `FilterPill` is exported so custom triggers match the other pills.
568
+ - `SegmentedControl` with `required` narrows `v-model` to a non null value. Options take `title` (tooltip and description) and `muted`, and the `#option` slot replaces the content of each option. Like `Tabs` items, options take `dot: true` for a small status dot after the label (`dotTone`, default `danger`; `dotLabel` is the hidden text, default "Needs attention", `segmentedControl.dot`), for example the translation status of each locale; with `iconOnly` the dot sits in the corner and `dotLabel` becomes the option description.
548
569
  - `FileInput` takes `directory` (folder picker; dropped folders are walked, every file keeps its relative path) or `directory="drop"` (the click opens a file picker, dropped folders are still walked), `directoryAction` (an "Upload a folder" button under the dropzone, `directoryActionLabel` renames it) or the `#actions` slot (`{ browse, browseDirectory, disabled }`), `skipHidden` (ignores dot files and dot folders), `list: false` (no file list: picks and drops only emit `add`), `fill` (the dropzone fills the height of its flex column parent, with the icon and the text centered: an import screen), `loading` and the `#hint` slot. `add` receives `(files, { entries: [{ file, path }], directories, source, event, dataTransfer })`; `directories` lists every folder path of a folder pick or drop, empty folders included, and `add` also fires for a drop of empty folders. `invalid` fires per file and `reject` once with every rejected file (`(events, detail)`). `acceptMode="hint"` only passes `accept` to the picker and leaves filtering to the host. The component exposes `browse()`, `browseDirectory()`, `addFiles()` and `focus()`.
549
570
  - `FocalPointInput` edits the point of an image that must stay visible when it is cropped: `v-model` is a `FocalPoint` (`{ x, y }`, each from 0 to 1, rounded to 0.001) or `null` (not set). Click or drag on the `src` image to place the crosshair; the arrow keys move it by `step` (default 0.01, ten times with Shift; from the center when it is not set), Home, End, Page Up and Page Down move along one axis. It is a group (named by `label` or the FormField label, with a development warning when unnamed) of two visually hidden range inputs, "Horizontal position" and "Vertical position" (`horizontalLabel`, `verticalLabel`), with one tab stop: their value text is the percentage, or "Not set" (`emptyText`), and a hidden hint describes the pointer and keys. The current value shows under the image ("X 30%, Y 40%"). `clearable` adds a Reset button (`clearLabel`, focus moves to the point before it disappears) and lets Delete and Backspace clear the value. `disabled` follows `Form`, `Fieldset` and `FormField` (an explicit `:disabled="false"` opts out), `readonly` keeps the point visible and focusable without changes, `invalid` comes from the field. `--k-focal-point-input-height` (20rem) caps the image height. Pass the value to `Thumbnail` `focal` to preview the crops.
550
571
 
@@ -582,7 +603,7 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
582
603
 
583
604
  - `useSortable(container, options)` is the reorder logic of `TagList` for any list. Options: `items` (a ref or getter), `onMove(items, move)` (`SortableMove`: `{ item, from, to, items, source }`, write `items` back to your state), `orientation` (`'vertical'` by default, `'horizontal'` for wrapping rows, `'grid'` for a CSS grid of cells: the item lands in the cell nearest to the pointer across wrapped rows, Alt with Left and Right moves it by one and Alt with Up and Down to the nearest cell of the row above or below), `disabled`, `handle` (a selector: only a pointer down on it starts a drag; without it any pointer down outside buttons, links and inputs does), `preview` (a selector inside the item: only that part follows the pointer and the item stays in its slot, so style the dragged item as the drop indicator, a dashed placeholder), `canMove(item, index)`, `label(item)` and `movedText(move)` for the announcement. Bind `itemProps(index)` on each item element (the attribute marks it, plus pointer and Alt with arrow key handlers) and render `announcement` in a polite live region. `move(from, to, { announce })` moves from your own buttons, `dragging` is the index being dragged (for your own dragging style), `canMove(index)` reports locked items. Pointer drags reorder live and follow the pointer, Escape or a cancelled pointer puts the item back, and the click after a drag is swallowed. The dragged item is lifted by default: while a drag runs it carries `data-k-sortable-dragging` (`position: relative` and `z-index: 1`, so it stacks above the next items) and the part that follows the pointer (the item, or `preview`) carries `data-k-sortable-lifted` with the orientation; in a vertical list it gets `--k-shadow-raised` with `--k-shadow-sm`. Both rules have zero specificity, so any style of yours wins; `SortableList` uses the same lift.
584
605
 
585
- - `Thumbnail` previews an image, a video or a file: `kind` (`ThumbnailKind`, `'image' | 'video' | 'file' | 'icon'`, default `'image'`), `src`, `alt` and `icon` (the fallback icon, by default `photo`, `video-camera` or `document`). A video shows its first frame (`preload="metadata"`, muted, no controls) under a play glyph. Without `size` it is fluid (the width of its parent, the height from `aspect`, a ratio string like `'4/3'` or a number, default 1); `size` (`ThumbnailSize`, `'xs' | 'sm' | 'md' | 'lg'`) gives a fixed inline box for tables and lists. `fit` is `'cover'` (default) or `'contain'`, `rounded` (`ThumbnailRounded`, `'none' | 'sm' | 'md' | 'lg' | 'full'`) overrides the radius of the size, and `focal` (`FocalPoint`, `{ x, y }` from 0 to 1, what `FocalPointInput` edits) or `objectPosition` (any CSS value, it wins) choose the part of the image that stays in view. While the media loads the box pulses; `missing`, or an image or video that fails to load, shows a hatched box with the icon and a hidden "File not available" (`thumbnail.missing`, `missingText` overrides it). The `top-start` and `top-end` slots put badges and actions in the corners, `caption` (or the `#caption` slot) sits at the bottom on a readable scrim, and `reveal` (`ThumbnailOverlay[]`, default `['caption']`) lists the overlays that only show on hover and focus, also when a link or button around the thumbnail is hovered or focused (always on touch screens). The default slot replaces the media with your own content (a text preview). Text and icons over media use the `--k-media-scrim` and `--k-media-text` tokens, the same in both themes; use them for your own overlays too.
606
+ - `Thumbnail` previews an image, a video or a file: `kind` (`ThumbnailKind`, `'image' | 'video' | 'file' | 'icon'`, default `'image'`), `src`, `alt` and `icon` (the fallback icon, by default `photo`, `video-camera` or `document`). A video shows its first frame (`preload="metadata"`, muted, no controls) under a play glyph. Without `size` it is fluid (the width of its parent, the height from `aspect`, a ratio string like `'4/3'` or a number, default 1); `size` (`ThumbnailSize`, `'xs' | 'sm' | 'md' | 'lg'`) gives a fixed inline box for tables and lists. `fit` is `'cover'` (default) or `'contain'`, `rounded` (`ThumbnailRounded`, `'none' | 'sm' | 'md' | 'lg' | 'full'`) overrides the radius of the size, and `focal` (`FocalPoint`, `{ x, y }` from 0 to 1, what `FocalPointInput` edits) or `objectPosition` (any CSS value, it wins) choose the part of the image that stays in view. While the media loads the box pulses; `missing`, or an image or video that fails to load, shows a hatched box with the icon and a hidden "File not available" (`thumbnail.missing`, `missingText` overrides it). The `top-start` and `top-end` slots put badges and actions in the corners, `caption` (or the `#caption` slot) sits at the bottom on a readable scrim, and `reveal` (`ThumbnailOverlay[]`, default `['caption']`) lists the overlays that only show on hover and focus (always on touch screens): of the thumbnail itself, or of the link, button, label, `TileGrid` tile or interactive `Card` around it; add the `k-thumbnail-anchor` class to any other element that should reveal them (a list row). Other focusable containers (the page `main`) do not. The default slot replaces the media with your own content (a text preview). Text and icons over media use the `--k-media-scrim` and `--k-media-text` tokens, the same in both themes; use them for your own overlays too.
586
607
 
587
608
  ```vue
588
609
  <KThumbnail :src="url" kind="video" aspect="4/3" :caption="name" :reveal="['caption', 'top-end']">
@@ -592,7 +613,7 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
592
613
  </KThumbnail>
593
614
  ```
594
615
 
595
- - `TileGrid` lays out `items` as a responsive grid of tiles: `minItemWidth` (default `10rem`, the narrowest tile), `columns` (the most columns, unset fills the row) and `gap` (`LayoutGap`, default `md`). The `#tile` slot (`{ item, index, selected, dragging }`) renders each tile (a `Card`, a `Thumbnail`) and stretches it to the cell; `#add` is a last cell after the tiles (a `Card variant="dashed" as="button"`). `itemKey` (a field name, default `id`, or `(item, index) => key`) keys the tiles and the selection, `itemLabel(item)` names each tile and its announcements, `label` names the grid (default "Items"). The tiles are one tab stop: the arrow keys move between them across wrapped rows (Up and Down go to the nearest tile of the row above or below), Home and End go to the ends, and the controls inside a tile keep their own tab stops. `selectable` with `v-model:selected` (the keys) makes it a multi select `listbox` (otherwise a `list`): a round check shows on hover, focus and on every tile while something is selected (always on touch screens), a click on it toggles the tile, Shift adds the range from the last toggled tile, Space and Shift with Space do the same from the keyboard and Ctrl or Cmd with A selects all. A click on the tile itself toggles it while something is selected or with Shift, Ctrl or Cmd held, and calls `@activate(item, index, event)` otherwise (Enter too; without an `activate` listener it toggles). `sortable` reorders by pointer drag (the tile follows the pointer and its cell stays as a dashed placeholder, Escape cancels; `handle`, a selector, limits where a drag starts and keeps touch scrolling on the rest of the tile) and by Alt with an arrow key on a focused tile, with an announcement; bind `v-model:items` (or write `items` back from `move({ item, from, to, items })`). `dragData(item, items)` makes tiles native drag sources for drop targets outside the grid (folders): it returns `{ [mimeType]: string }` for the `DataTransfer` (or `null` to refuse the drag), `items` is the whole selection when the dragged tile is selected, `dragEffect` sets `effectAllowed` (default `move`), the dragged tiles fade and `itemDragStart` and `itemDragEnd` (`{ item, items, event }`) fire. `dragData` is ignored when `sortable` is set. `--k-tile-grid-radius` (default `--k-radius-lg`) is the radius of the tiles, the selected ring and the placeholder.
616
+ - `TileGrid` lays out `items` as a responsive grid of tiles: `minItemWidth` (default `10rem`, the narrowest tile), `columns` (the most columns, unset fills the row) and `gap` (`LayoutGap`, default `md`). The `#tile` slot (`{ item, index, selected, dragging }`) renders each tile (a `Card`, a `Thumbnail`) and stretches it to the cell; `#add` is a last cell after the tiles (a `Card variant="dashed" as="button"`). `itemKey` (a field name, default `id`, or `(item, index) => key`) keys the tiles and the selection, `itemLabel(item)` names each tile and its announcements, `label` names the grid (default "Items"). The tiles are one tab stop: the arrow keys move between them across wrapped rows (Up and Down go to the nearest tile of the row above or below), Home and End go to the ends, and the controls inside a tile keep their own tab stops. `selectable` with `v-model:selected` (the keys) makes it a multi select `listbox` (otherwise a `list`): a round check shows on hover, focus and on every tile while something is selected (always on touch screens), a click on it toggles the tile, Shift adds the range from the last toggled tile, Space and Shift with Space do the same from the keyboard and Ctrl or Cmd with A selects all. A click on the tile itself toggles it while something is selected or with Shift, Ctrl or Cmd held, and calls `@activate(item, index, event)` otherwise (Enter too; without an `activate` listener it toggles). With an `activate` listener the tiles have the pointer cursor, also without `selectable`. `sortable` reorders by pointer drag (the tile follows the pointer and its cell stays as a dashed placeholder, Escape cancels; `handle`, a selector, limits where a drag starts and keeps touch scrolling on the rest of the tile) and by Alt with an arrow key on a focused tile, with an announcement; bind `v-model:items` (or write `items` back from `move({ item, from, to, items })`). `dragData(item, items)` makes tiles native drag sources for drop targets outside the grid (folders): it returns `{ [mimeType]: string }` for the `DataTransfer` (or `null` to refuse the drag), `items` is the whole selection when the dragged tile is selected, `dragEffect` sets `effectAllowed` (default `move`), the dragged tiles fade and `itemDragStart` and `itemDragEnd` (`{ item, items, event }`) fire. `dragData` is ignored when `sortable` is set. `--k-tile-grid-radius` (default `--k-radius-lg`) is the radius of the tiles, the selected ring and the placeholder.
596
617
 
597
618
  ```vue
598
619
  <KTileGrid
@@ -611,6 +632,18 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
611
632
  </KTileGrid>
612
633
  ```
613
634
 
635
+ - Full height lists outside `ListPage` (a media gallery with its own toolbar, breadcrumbs and a footer, also inside a modal): `Card` `fill` takes the rest of the height of its flex column parent (`flex: 1 1 0`, `min-height: 0`), its body becomes a flex column with `min-height: 0` that scrolls when its content is taller, and the footer stays pinned at the bottom. `Table` `fill` takes the rest of the body: the rows scroll under the sticky header and the empty row (`#empty`) is centered in the free height. `Stack` `grow` (`flex: 1 1 0`, `min-height: 0`) passes the height down through a wrapper between the `.k-page` (or the modal body) and the card. The parents need a height: a page with `content: 'fill'`, a `Modal` with a height, or any flex column with a height. `ListPage` `fill` is built on the same `Card` and `Table` `fill`.
636
+
637
+ ```vue
638
+ <KStack grow>
639
+ <KCard fill padding="none">
640
+ <MediaToolbar />
641
+ <KTable :rows="rows" :columns="columns" fill />
642
+ <template #footer><KPagination v-model:page="page" :total="total" /></template>
643
+ </KCard>
644
+ </KStack>
645
+ ```
646
+
614
647
  - `Table` takes `rowAttrs(row, index)` (`TableRowAttrs`): attributes and listeners bound on each `<tr>` (`data-*`, `title`, `onDragover` to make rows drop targets); classes and listeners merge with the table's own. `rowDraggable` (`true` or `(row, index) => boolean`) with `dragData(row, rows)` makes rows native drag sources for drop targets outside the table (folders): `dragData` returns `{ [mimeType]: string }` for the `DataTransfer` (or `null` to refuse the drag), `rows` is the whole selection when the dragged row is selected, `dragEffect` sets `effectAllowed` (default `move`), the dragged rows fade and `rowDragStart` and `rowDragEnd` (`{ row, rows, event }`) fire. Selection, `rowClick`, row links and the keyboard keep working; links in draggable rows are not dragged on their own.
615
648
 
616
649
  ```vue
@@ -626,8 +659,10 @@ On your own elements, `paletteClass(color)` gives the class of a palette name an
626
659
  />
627
660
  ```
628
661
 
662
+ - `FileDropOverlay` shows the `over` state of `useFileDrop` over a whole area (a media gallery): it covers its positioned container (`position: relative`) with a dashed `--k-ring` border on a translucent blurred surface, an icon (`icon`, default `arrow-up-tray`, or the `#icon` slot), a title (`title` or the default slot for rich text, default "Release to add files", `fileInput.drop`) and a `description` (or `#description`). `active` shows it (default `true`, bind `over`); it fades in, ignores the pointer so the drop reaches the container, and is hidden from assistive technology like the drag itself. `--k-file-drop-overlay-inset` (default 0, a negative value bleeds past the container) and `--k-file-drop-overlay-radius` (default `--k-radius-lg`) adjust it: `<KFileDropOverlay :active="over">Drop to upload to <strong>{{ folder }}</strong></KFileDropOverlay>`.
663
+ - `useFileDialog({ accept, multiple, directory, onChange })` opens the native file dialog from any action (a menu item `onSelect`, a button) without a visible input. `open(overrides?)` must run inside the user gesture and resolves to the chosen `File[]` (empty when the dialog is cancelled); `files` keeps the last choice and `reset()` clears it. The options take refs or getters, `open({ accept, multiple, directory })` overrides them for one call: `const [file] = await useFileDialog({ accept: '.csv' }).open()`.
629
664
  - `useFileDrop` returns `{ over, reset }` and takes `ignore(event)`. A drop handled by a nested drop zone is skipped by the outer ones, and the state resets after any drop, even when a child stops propagation. `readDroppedFiles(dataTransfer)` walks dropped folders (call it synchronously in the drop handler) and resolves to `[{ file, path }]`; `readDroppedFiles(dataTransfer, { directories: true })` resolves to `{ files, directories }` with every folder path, empty ones included, and `skipHidden: true` leaves out dot entries.
630
- - `Tabs` items take `badgeTone` and `badgeLabel` (the accessible name of the badge); the `#panel="{ item }"` slot renders a single panel for the active tab. `stretch` makes the tabs fill the remaining height of a flex column and the active panel grow with it (`flex: 1; min-height: 0`), and `inset` spaces the tab list from the container edges with the panel flush below it, for inspectors and side panes. `Breadcrumbs` items take `attrs` and `onClick` (an item without a link renders a button, handy for drop targets), `#item` customizes the content, and `ancestors` links every item and ends with a separator (`breadcrumbsAncestors` on `PageHeader`). `heading` (a heading level) renders the current item as that heading, for a trail that is the title of the page. `Accordion` takes `variant` `card` (default), `outline` (the same card without a shadow), `separated` or `plain`; items take `description`, and `contentVariant="neutral"` drops the text styling of the content (it inherits font size and color, for forms) and keeps the padding of the item, aligned with the trigger. `:padded="false"` drops the content padding for content that brings its own spacing or reaches the edges (a list, a table, a tree), with either content variant.
665
+ - `Tabs` items take `badgeTone` and `badgeLabel` (the accessible name of the badge); the `#panel="{ item }"` slot renders a single panel for the active tab. `stretch` makes the tabs fill the remaining height of a flex column and the active panel grow with it (`flex: 1; min-height: 0`), and `inset` spaces the tab list from the container edges with the panel flush below it, for inspectors and side panes. `Breadcrumbs` items take `attrs` and `onClick` (an item without a link renders a button, handy for drop targets), `#item` customizes the content, and `ancestors` links every item and ends with a separator (`breadcrumbsAncestors` on `PageHeader`). `heading` (a heading level) renders the current item as that heading, for a trail that is the title of the page. `size` is `sm` (0.75rem with tighter gaps, for panel headers and inspectors), `md` (default) or `lg` (a title sized trail). `Accordion` takes `variant` `card` (default), `outline` (the same card without a shadow), `separated` or `plain`; items take `description`, and `contentVariant="neutral"` drops the text styling of the content (it inherits font size and color, for forms) and keeps the padding of the item, aligned with the trigger. `:padded="false"` drops the content padding for content that brings its own spacing or reaches the edges (a list, a table, a tree), with either content variant. `divided` draws a `--k-line` divider between the trigger and the open content (the line between the items of the `card` and `outline` variants), with a matching top padding when the content is padded; use it for a form section in `contentVariant="neutral"`.
631
666
  - `RichTextEditor` labels heading buttons by their real level (`headingLabel="relative"` numbers them from 1) and `toolbar` picks and orders the buttons: `['headings', '|', 'bold', 'italic', 'link']`.
632
667
 
633
668
  ### Grid defaults
@@ -786,6 +821,8 @@ const archived = useRouteState('archived', {
786
821
 
787
822
  `Popover`: `width` sets the width of the panel (any CSS length, like `18rem`) instead of the default range (12rem to 24rem), capped at the viewport width. `anchor` places the panel against any element or a virtual reference (`OverlayVirtualAnchor`, an object with `getBoundingClientRect()`, for a pointer position or a text selection) instead of its trigger, and the trigger slot becomes optional: open it with `v-model:open` or the exposed `show()`. An element inside a same origin iframe works too: the panel is placed in the page against it, and a click or Escape inside the iframe closes it. The position follows scroll and resize. Focus moves into the panel on open and returns to the anchor when it can take focus, otherwise to the element focused before; a click outside and Escape close it. Without a trigger, name the panel with `label`.
788
823
 
824
+ `sheet` renders the panel as a bottom sheet on phones: when the viewport is 640px wide or less (the breakpoint of the `Modal` sheet), the same `#content` opens in a `Modal` with its sheet look, `label` as the title (the trigger text names it without a `label`), the same first focus (`initialFocus`) and focus return, and `close` in the slot scope still closes it. `v-model:open`, `anchor` and the exposed `show`, `hide` and `toggle` work in both modes; crossing the breakpoint closes the open panel. Use it for pickers that need room on a phone (a block picker, a long `CommandList`).
825
+
789
826
  ```vue
790
827
  <script setup lang="ts">
791
828
  const open = ref(false)
@@ -803,6 +840,8 @@ function openAt(event: MouseEvent) {
803
840
  </KPopover>
804
841
  ```
805
842
 
843
+ `CommandPalette` and `CommandList` items take `meta`, an inline secondary label after the label (the field of a content hit; it is matched by the filter too), and `highlight` (`CommandItemHighlight`, `{ label?: TextRange[], description?: TextRange[] }`), the ranges to mark in the label and the description as `[start, end)` character offsets (`TextRange`), usually from your `search`: a snippet `{ before, match, after }` becomes `description: before + match + after` with `highlight: { description: [[before.length, before.length + match.length]] }`. Overlapping and out of range offsets are merged and clamped. The marks use the `k-mark` class (`--k-selection` behind `--k-text`, `Mark` in forced colors), which also works on your own `<mark class="k-mark">` in the `#item` slot.
844
+
806
845
  `CommandPalette`: an item takes a `badge` (a label, or `{ label, tone, color }`), shown before its shortcut. Recent items do not keep the badge, because it can change. Items take typed `data` (`CommandItem<T>`, `CommandGroup<T>`), which reaches the `#item` slot and the `select` event typed; `emptyText` also takes `(query) => string`. Groups take a `description` (shown after the label), the `#group-label` slot (`{ group, label, description, recent }`) replaces the label, and `notice` or the `#after-results` slot (`{ query, count }`) adds a line under the results, for example "Showing the first results". `pinned` (items, or `(query) => CommandItem[]`) adds items at the top that are never filtered and never saved as recent, like "Paste block" or "Create {query}"; the empty text still shows under them when nothing else matches.
807
846
 
808
847
  `CommandList` is the palette content without the dialog: the search field (focused on mount unless `:autofocus="false"`), the grouped and filtered list, arrow keys and Enter, the empty state and the same props, slots and `v-model:query`. Escape emits `close` and is not stopped, so a surrounding `Popover` closes too. `footer` shows the key hints. Put it in a side panel, or in a `Popover` with `anchor` for a picker opened next to any element:
@@ -816,6 +855,7 @@ function openAt(event: MouseEvent) {
816
855
  ```
817
856
 
818
857
  - `Brand`: `logo` takes an image URL, trusted inline SVG markup (`'<svg ...>'`) or a component; the `#logo` slot replaces the boxed mark; `show-name` keeps the name visible next to a logo.
858
+ - `Card` `disabledReason` explains a disabled interactive card (`as="button"`, `to` or `href`), like `Button`: with `disabled` and a reason the card uses `aria-disabled` instead of `disabled` (a link card renders its link without `href`), stays in the Tab order, ignores clicks (except in its actions and footer), shows the reason as a tooltip on hover and keyboard focus linked with `aria-describedby`, and before mount the reason is the native `title`. A disabled interactive card has the `not-allowed` cursor and no hover lift.
819
859
  - `Card`: `selected` gives a pressed look (`aria-pressed` on `as="button"`, `aria-selected` with `role="option"` and similar roles); `:animated="false"` turns off the entrance animation. The `icon` stays beside the heading at any width (the title and the description wrap next to it), and the header actions move to their own line when they do not fit.
820
860
  - `Spinner`: `block` renders a centered loading state that fills its container, with `label` shown under the spinner: `<KSpinner block size="lg" label="Loading entries" />`.
821
861
 
@@ -863,6 +903,54 @@ Ready defaults to start a dashboard project: an app frame, an auth frame and pag
863
903
 
864
904
  Slots: `brand`, `search`, `sidebar-top` (under the search, for example a workspace select), `sidebar` (replaces the navigation), `sidebar-footer`, `account`, `topbar-brand`, `topbar`, `actions`, default, plus `settings-section-<id>`, `settings-actions-<id>`, `settings-tabs-<id>`, `settings-nav-footer`, `settings-account-start` and `settings-account-fields`, forwarded to the SettingsModal. The exposed `openSettings(id?)` opens it on a section. Landmarks: skip link, `aside` and `nav` with labels, `main` with an id, `aria-current="page"` on the active link. `SidebarNav` (layout group) renders the same navigation data inside your own `Sidebar`.
865
905
 
906
+ ### WorkspaceLayout
907
+
908
+ A full height app workspace for editors (a visual page editor, a mail client, a file manager): a top bar and up to three panes, the side ones resizable, collapsible and remembered.
909
+
910
+ ```vue
911
+ <KWorkspaceLayout
912
+ v-model:pane="pane"
913
+ storage-key="editor"
914
+ :left="{ label: 'Blocks', min: 220, max: 420, initial: 280, badge: blocks.length }"
915
+ :main="{ label: 'Preview' }"
916
+ :right="{
917
+ label: 'Fields',
918
+ min: 280,
919
+ max: 520,
920
+ initial: 340,
921
+ badge: errors,
922
+ badgeTone: 'danger',
923
+ }"
924
+ >
925
+ <template #start><KButton icon="arrow-left" aria-label="Back" to="/pages" /> About us</template>
926
+ <template #center><KSegmentedControl v-model="device" :options="devices" label="Preview width" /></template>
927
+ <template #end="{ compact, collapsed, toggle }">
928
+ <KButton
929
+ v-if="!compact"
930
+ icon="list-bullet"
931
+ aria-label="Blocks panel"
932
+ :aria-pressed="!collapsed.left"
933
+ @click="toggle('left')"
934
+ />
935
+ <KButton label="Publish" />
936
+ </template>
937
+ <template #left-header><KPageHeader size="sm" title="Blocks" :level="2" /></template>
938
+ <template #left="{ reveal }"><KTree :nodes="nodes" @update:selected="reveal('right')" /></template>
939
+ <template #main><iframe src="/preview" title="Live preview" /></template>
940
+ <template #right-header><KPageHeader size="sm" :title="block.label" :level="2" /></template>
941
+ <template #right>...</template>
942
+ </KWorkspaceLayout>
943
+ ```
944
+
945
+ - Top bar: a `header` with the slots `start`, `center` (centered, on its own row under 40rem of workspace width) and `end`, rendered only when one of them is set.
946
+ - Panes: `left` and `right` are `aside` landmarks and `main` is `main` (a `section`, named by its label, inside an `AppShell` or `DashboardLayout`, which already have the main landmark). A side pane renders when its slot is set. `left-header`, `main-header` and `right-header` add a header strip above the scrolling pane body (a `PageHeader size="sm"` fits there). The pane bodies are flex columns that scroll.
947
+ - Side panes: `left` and `right` take `label` (the landmark and tab name, default "Left panel" and "Right panel"), `min`, `max` and `initial` widths in pixels (default 200, 480, 280). A `ResizeHandle` sits on the inner edge: drag it, or focus it and use the arrow keys (`step`, default 16), Home and End; a double click goes back to `initial`. While dragging, the workspace gets `is-resizing` (column cursor, iframes ignore the pointer). `v-model:left-width` and `v-model:right-width` bind the widths, `v-model:left-collapsed` and `v-model:right-collapsed` hide a pane (it stays mounted, so its state survives).
948
+ - Persistence: with `storageKey` the widths and the collapsed state go to the preferences store under `workspace:<storageKey>` (`PREFERENCE_KEYS.workspace(key)`), restored after mount with a `localStorage` store or on the first render with a server snapshot.
949
+ - Compact mode: under `breakpoint` (default 1024, the width of the workspace itself, not the viewport; 0 turns it off) the panes become `Tabs` under the top bar, one panel at a time, with the active pane in `v-model:pane` (`'left' | 'main' | 'right'`, default `main`). The tab labels come from the pane `label`s, and `badge`, `badgeTone`, `badgeLabel`, `dot`, `dotTone`, `dotLabel` and `icon` on `left`, `main` and `right` show on the tabs (an error count on the fields pane). `panesLabel` names the tab list.
950
+ - Slot scope: every slot gets `{ compact, pane, collapsed: { left, right }, toggle(side), reveal(pane) }`. `reveal` selects the tab in compact mode and expands a collapsed pane otherwise (selecting a block reveals its fields). `toggle`, `reveal` and `compact` are also exposed on the component.
951
+ - Height: `100dvh` by default (`--k-workspace-height` changes it, `100%` inside a modal). Inside `DashboardLayout` or `AppShell` with `content="fill"` it fills the content panel with a border, without it with `content="bleed"`.
952
+ - Copy: `resizeLabel` (`'Resize {pane}'`) names the handles, `panesLabel` the tabs.
953
+
866
954
  ### SettingsModal
867
955
 
868
956
  A large dialog (60rem) with a section nav on the left and the content on the right, the nuxt-cms settings look. Below 640px the nav turns into a scrolling row above the content.
@@ -924,17 +1012,17 @@ Both take the `AuthLayout` frame props and the `brand`, `corner`, `footer` and `
924
1012
 
925
1013
  ### Page templates
926
1014
 
927
- | Component | What it gives you |
928
- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
929
- | `DashboardPage` | PageHeader (`title`, `eyebrow`, `description`, `#actions`), a Stat grid from `stats` (or `#stats`), a content grid (`columns`, default 1 then 3 columns). |
930
- | `ListPage` | Header, toolbar (search with `searchable`, FilterPills from `filters`, `#toolbar`, `#bulk` when rows are selected), Table from `columns`/`rows`, Pagination. Client mode filters (`searchKeys`, `filterKey`), sorts and paginates; pass `total` for server mode. States: `loading` skeleton rows, first run `#empty`, no results with a clear button, `error` with retry. Filters of your own in `#toolbar` (a Select, a date range) set `filtered` while they are active: no rows then show the no results state with the toolbar still visible instead of the first run `#empty`, and the clear button (or `clear` of `#no-results`) emits `clear`, where you reset them. `cell-*` and `header-*` slots go to the Table. `fill` makes the card take the rest of the height of its parent (a page with `content: 'fill'`, or any flex parent with a height): the rows scroll inside the card under the sticky header row, the footer (summary and pagination) stays at the bottom even with few rows, the first run, error and no results states are centered in the same height, and a custom `#table` scrolls in the same area. It stays on at every width (like `content="fill"` and `DataGrid` `fill`); the card keeps a 20rem minimum height, so on a short screen the panel scrolls instead of squeezing the rows. An `EmptyPage` in `#empty` fills by itself. `count` shows the number of rows in a `Badge` next to the title (`true`: `total` in server mode, `rows.length` in client mode, hidden while the first load, the first run empty state or an error shows; a number: that number); `#badge` (scope `{ total }`, the result count) replaces it. With `selectable` the selection bar counts against the result total (`3 of 42 selected`) and, like the `DataGrid` footer link, offers "Select all N" once every row of the page is selected and more rows match: in client mode it selects every filtered row (across pages), in server mode it needs `allIds` (`() => Promise<readonly RowKey[]> | readonly RowKey[]`), awaits it with a spinner and sets `v-model:selected` to the returned ids (a rejected promise keeps the selection and logs an error). With every row selected the action becomes "Clear selection". |
931
- | `DetailPage` | Back link (`backTo`), title, `status` badge, `#actions`, optional `tabs` (`#panel-<value>`), main column plus an aside with DescriptionList cards from `sections` (or `#aside`). `loading` and `error` states. |
932
- | `FormDrawer` | A `Drawer` with a `Form` (`form` from `useForm`) around the body and a footer: delete on the left (`deletable`, `@delete`, `deleteDisabled`, `deleteHint`), cancel and submit on the right. `creating` changes the submit text to Create and enables it without changes; otherwise it needs a dirty form (`requireDirty`). `readonly` keeps only a Close button and disables every field of the body (see [Forms](#forms)). Every close asks before discarding a dirty form (`guard`, the leave guard of its `Drawer`), then runs `beforeClose`. `deleteHint` is the tooltip of the delete button, and its reason when `deleteDisabled`. `submitIcon` adds an icon to the submit button (`check`, `plus`, `printer`), `deleteIcon` changes the delete icon (default `trash`). `onCancel` replaces the close of the cancel button (back to a parent view), after the same question. `loading` shows a `SkeletonForm` (or `#skeleton`) and keeps the header, the tabs and the footer in place. Pass another `form` to switch the body to a subpage (with `trail`). A tab with `fill: true` (`FormDrawerTab`) makes the drawer `fill` while it is active (a tab with a long table). |
933
- | `FormModal` | The modal version of `FormDrawer`: a `Modal` with a `Form` around the body, footer with delete (`deletable`, `deleteDisabled`, `deleteHint`, `deleteIcon`), cancel (ghost) and submit (`creating`, `requireDirty`, `submitting` state, `submitIcon`), the leave guard on close and cancel, `loading` skeleton, `readonly`. `nested` renders the form as a `div`, for a modal opened from a field of another form (its footer submit then calls `submit()`). `@submitted` fires after a successful submit. |
934
- | `FormPage` | Header, your cards inside `Form` (`form` from `useForm`, or a plain `form` emitting `submit`), sticky footer with cancel and submit, unsaved state, dirty guard (`guard`, on by default) through `useDirtyGuard`. |
935
- | `SettingsPage`, `SettingsSection`, `SaveBar` | Section nav (sticky on the left, a scrolling row on narrow screens; items with `to` become route links), `#section-<value>` panels, section cards with a save footer, and a floating save bar while `dirty`. |
936
- | `ErrorPage`, `NotFoundPage` | Status code, title, message (defaults per status code, reads a Nuxt `error`), home, retry (`@retry`) and back actions. `@home` replaces the home link, handy for `clearError`. |
937
- | `EmptyPage` | First run screen: illustration, title, description, primary and secondary actions, onboarding `steps`. |
1015
+ | Component | What it gives you |
1016
+ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1017
+ | `DashboardPage` | PageHeader (`title`, `eyebrow`, `description`, `#actions`), a Stat grid from `stats` (or `#stats`), a content grid (`columns`, default 1 then 3 columns). |
1018
+ | `ListPage` | Header, toolbar (search with `searchable`, FilterPills from `filters`, `#toolbar`, `#bulk` when rows are selected), Table from `columns`/`rows`, Pagination. Client mode filters (`searchKeys`, `filterKey`), sorts and paginates; pass `total` for server mode. States: `loading` skeleton rows, first run `#empty`, no results with a clear button, `error` with retry. Filters of your own in `#toolbar` (a Select, a date range) set `filtered` while they are active: no rows then show the no results state with the toolbar still visible instead of the first run `#empty`, and the clear button (or `clear` of `#no-results`) emits `clear`, where you reset them. `cell-*` and `header-*` slots go to the Table. `fill` makes the card take the rest of the height of its parent (a page with `content: 'fill'`, or any flex parent with a height): the rows scroll inside the card under the sticky header row, the footer (summary and pagination) stays at the bottom even with few rows, the first run, error and no results states are centered in the same height, and a custom `#table` scrolls in the same area. It stays on at every width (like `content="fill"` and `DataGrid` `fill`); the card keeps a 20rem minimum height, so on a short screen the panel scrolls instead of squeezing the rows. An `EmptyPage` in `#empty` fills by itself. It is built on `Card` `fill` and `Table` `fill`, the same pieces for a full height list of your own. `count` shows the number of rows in a `Badge` next to the title (`true`: `total` in server mode, `rows.length` in client mode, hidden while the first load, the first run empty state or an error shows; a number: that number); `#badge` (scope `{ total }`, the result count) replaces it. With `selectable` the selection bar counts against the result total (`3 of 42 selected`) and, like the `DataGrid` footer link, offers "Select all N" once every row of the page is selected and more rows match: in client mode it selects every filtered row (across pages), in server mode it needs `allIds` (`() => Promise<readonly RowKey[]> | readonly RowKey[]`), awaits it with a spinner and sets `v-model:selected` to the returned ids (a rejected promise keeps the selection and logs an error). With every row selected the action becomes "Clear selection". |
1019
+ | `DetailPage` | Back link (`backTo`), title, `status` badge, `#actions`, optional `tabs` (`#panel-<value>`), main column plus an aside with DescriptionList cards from `sections` (or `#aside`). `loading` and `error` states. |
1020
+ | `FormDrawer` | A `Drawer` with a `Form` (`form` from `useForm`) around the body and a footer: delete on the left (`deletable`, `@delete`, `deleteDisabled`, `deleteHint`), cancel and submit on the right. `creating` changes the submit text to Create and enables it without changes; otherwise it needs a dirty form (`requireDirty`). `readonly` keeps only a Close button and disables every field of the body (see [Forms](#forms)). Every close asks before discarding a dirty form (`guard`, the leave guard of its `Drawer`), then runs `beforeClose`. `deleteHint` is the tooltip of the delete button, and its reason when `deleteDisabled`. `submitIcon` adds an icon to the submit button (`check`, `plus`, `printer`), `deleteIcon` changes the delete icon (default `trash`). `onCancel` replaces the close of the cancel button (back to a parent view), after the same question. `loading` shows a `SkeletonForm` (or `#skeleton`) and keeps the header, the tabs and the footer in place. Pass another `form` to switch the body to a subpage (with `trail`). A tab with `fill: true` (`FormDrawerTab`) makes the drawer `fill` while it is active (a tab with a long table). |
1021
+ | `FormModal` | The modal version of `FormDrawer`: a `Modal` with a `Form` around the body, footer with delete (`deletable`, `deleteDisabled`, `deleteHint`, `deleteIcon`), cancel (ghost) and submit (`creating`, `requireDirty`, `submitting` state, `submitIcon`), the leave guard on close and cancel, `loading` skeleton, `readonly`. `nested` renders the form as a `div`, for a modal opened from a field of another form (its footer submit then calls `submit()`). `@submitted` fires after a successful submit. |
1022
+ | `FormPage` | Header, your cards inside `Form` (`form` from `useForm`, or a plain `form` emitting `submit`), sticky footer with cancel and submit, unsaved state, dirty guard (`guard`, on by default) through `useDirtyGuard`. |
1023
+ | `SettingsPage`, `SettingsSection`, `SaveBar` | Section nav (sticky on the left, a scrolling row on narrow screens; items with `to` become route links), `#section-<value>` panels, section cards with a save footer, and a floating save bar while `dirty`. |
1024
+ | `ErrorPage`, `NotFoundPage` | Status code, title, message (defaults per status code, reads a Nuxt `error`), home, retry (`@retry`) and back actions. `@home` replaces the home link, handy for `clearError`. |
1025
+ | `EmptyPage` | First run screen: illustration, title, description, primary and secondary actions, onboarding `steps`. |
938
1026
 
939
1027
  `useDirtyGuard(dirty, options?)` asks before leaving (router navigation through `ConfirmHost`, or the native confirm) and on tab close. Returns `confirmLeave()` and `allowNext()`. It is built on the leave guard, see [Unsaved changes](#unsaved-changes).
940
1028
 
@@ -1057,6 +1145,7 @@ Accessibility related props and defaults:
1057
1145
 
1058
1146
  - Accessible names: `label` on `RadioGroup` and `CheckboxGroup` (alias of `legend`), `SegmentedControl`, `Slider`, `FocalPointInput`, `PinInput`, `InputGroup`, `Tabs`, `Toolbar`, `Modal`, `Drawer` and `useModal`/`useDrawer` options (when there is no `title`), `Card` (stretched link without a title), `ChartLegend`. `AppShell` takes `closeLabel` for the close button of the mobile navigation, which opens as a named modal dialog. `Sidebar`'s collapse button keeps one label (`collapseLabel`) and exposes the state with `aria-expanded`.
1059
1147
  - Heading levels: `level` on `Calendar`, `DatePicker`, `ChartPanel`, `ErrorPage` and `NotFoundPage`; page templates pass `level + 1` to their sections and empty states.
1148
+ - `Alert` `description` also takes an array of messages (`string[]`, an import with several errors): two or more render as a bulleted list, one as plain text, empty entries are skipped.
1060
1149
  - Live roles are opt in on `Alert`: pass `role="alert"` or `role="status"` for messages that appear at runtime; static banners get none. Without a title the tone is spoken from a hidden prefix.
1061
1150
  - `Toolbar` uses roving focus by default (`:roving="false"` renders a plain named group).
1062
1151
  - Copy props that contain a value are templates: `removeLabel` (`'Remove {label}'`) on `Tag`, `Combobox` and `FileInput`, `moreLabel` (`'{count} more'`) on `AvatarGroup`, `pageLabel` (`'Page {page}'`) on `Pagination`. `ListPage` takes `resultsText: (count) => string` for the announced result count, `ColorInput` takes `invalidText`.
@@ -1,7 +1,9 @@
1
1
  <template>
2
2
  <div
3
+ ref="rootRef"
3
4
  class="k-form-field"
4
5
  :class="{
6
+ 'is-highlighted': highlighted,
5
7
  'is-invalid': Boolean(errorMessage),
6
8
  'is-warning': !errorMessage && Boolean(warningMessage),
7
9
  'is-shaking': shaking,
@@ -69,9 +71,22 @@
69
71
  </template>
70
72
 
71
73
  <script setup>
72
- import { computed, provide, ref, shallowReactive, useId, useSlots, watch } from "vue";
74
+ import {
75
+ computed,
76
+ onBeforeUnmount,
77
+ onMounted,
78
+ provide,
79
+ ref,
80
+ shallowReactive,
81
+ useId,
82
+ useSlots,
83
+ useTemplateRef,
84
+ watch
85
+ } from "vue";
86
+ import { FIELD_HIGHLIGHT_DURATION } from "../../composables/useFieldHighlight";
73
87
  import { useFormContext } from "../../composables/useForm";
74
88
  import { useLocale } from "../../composables/useLocale";
89
+ import { prefersReducedMotion } from "../../internal/core/env";
75
90
  import { joinIds } from "../../internal/forms/control";
76
91
  import { useFormDisabled } from "../../internal/forms/disabled";
77
92
  import { FIELD_KEY, FIELD_ROLE_KEY } from "../../internal/keys";
@@ -91,7 +106,8 @@ const props = defineProps({
91
106
  disabled: { type: Boolean, required: false },
92
107
  icon: { type: null, required: false },
93
108
  help: { type: String, required: false },
94
- id: { type: String, required: false }
109
+ id: { type: String, required: false },
110
+ highlight: { type: Boolean, required: false }
95
111
  });
96
112
  const slots = useSlots();
97
113
  const form = useFormContext();
@@ -189,4 +205,32 @@ function onFocusOut(event) {
189
205
  if (next && event.currentTarget.contains(next)) return;
190
206
  if (props.name) form?.touch(props.name);
191
207
  }
208
+ const rootRef = useTemplateRef("rootRef");
209
+ const highlighted = ref(false);
210
+ let highlightTimer;
211
+ function flash() {
212
+ const element = rootRef.value;
213
+ if (!element) return;
214
+ clearTimeout(highlightTimer);
215
+ highlighted.value = false;
216
+ element.scrollIntoView({
217
+ block: "center",
218
+ behavior: prefersReducedMotion() ? "auto" : "smooth"
219
+ });
220
+ requestAnimationFrame(() => {
221
+ highlighted.value = true;
222
+ highlightTimer = setTimeout(() => highlighted.value = false, FIELD_HIGHLIGHT_DURATION);
223
+ });
224
+ }
225
+ watch(
226
+ () => props.highlight,
227
+ (value) => {
228
+ if (value) flash();
229
+ },
230
+ { flush: "post" }
231
+ );
232
+ onMounted(() => {
233
+ if (props.highlight) flash();
234
+ });
235
+ onBeforeUnmount(() => clearTimeout(highlightTimer));
192
236
  </script>
@@ -29,6 +29,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
29
29
  icon?: IconName;
30
30
  help?: string;
31
31
  id?: string | undefined;
32
+ highlight?: boolean;
32
33
  innerHTML?: string | undefined | undefined;
33
34
  class?: import("vue").ClassValue;
34
35
  style?: import("vue").StyleValue;
@@ -234,6 +235,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
234
235
  icon?: IconName;
235
236
  help?: string;
236
237
  id?: string | undefined;
238
+ highlight?: boolean;
237
239
  innerHTML?: string | undefined | undefined;
238
240
  class?: import("vue").ClassValue;
239
241
  style?: import("vue").StyleValue;
@@ -3,6 +3,7 @@
3
3
  :as="as"
4
4
  v-bind="$attrs"
5
5
  class="k-root"
6
+ :class="{ 'is-document': document && !nested }"
6
7
  :data-theme="dataTheme"
7
8
  :data-preset="dataPreset"
8
9
  :lang="lang"
@@ -29,6 +30,7 @@ const props = defineProps({
29
30
  fontMono: { type: String, required: false },
30
31
  fontDisplay: { type: String, required: false },
31
32
  radiusScale: { type: Number, required: false },
33
+ document: { type: Boolean, required: false },
32
34
  as: { type: String, required: false, default: "div" }
33
35
  });
34
36
  const store = resolveThemeStore();
@@ -14,6 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
14
14
  fontMono?: string;
15
15
  fontDisplay?: string;
16
16
  radiusScale?: number;
17
+ document?: boolean;
17
18
  as?: string | import("vue").Component;
18
19
  inlist?: any;
19
20
  download?: any;
@@ -232,6 +233,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
232
233
  fontMono?: string;
233
234
  fontDisplay?: string;
234
235
  radiusScale?: number;
236
+ document?: boolean;
235
237
  as?: string | import("vue").Component;
236
238
  inlist?: any;
237
239
  download?: any;
@@ -7,3 +7,4 @@ export type DotColor = ColorValue | 'muted';
7
7
  export type ButtonVariant = 'solid' | 'soft' | 'subtle' | 'outline' | 'ghost' | 'link';
8
8
  export type FieldSize = 'sm' | 'md' | 'lg';
9
9
  export type LinkTarget = string | Record<string, unknown>;
10
+ export type TextRange = readonly [start: number, end: number];
@@ -165,7 +165,8 @@ function renderTrigger(option, base, active) {
165
165
  {
166
166
  open: openPanel.value === value,
167
167
  "onUpdate:open": (open) => setPanel(value, open),
168
- label: option.panelLabel ?? option.label
168
+ label: option.panelLabel ?? option.label,
169
+ width: option.panelWidth
169
170
  },
170
171
  {
171
172
  default: () => h(FilterPill, { ...base, active, caret: true }),