@xleddyl/443-components-vue 0.16.104 → 0.16.106

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 CHANGED
@@ -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`), `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` |
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; a header button detaches or docks the whole dock, saved in the preferences, `detachLabel`, `attachLabel`). 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` |
@@ -289,30 +289,30 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
289
289
 
290
290
  Templates combine core parts into whole pages and layouts. Start from them for new pages.
291
291
 
292
- | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
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`, `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
- | `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
- | `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
- | `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
- | `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
- | `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
- | `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`, `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
- | `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
- | `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
- | `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` |
305
- | `SettingsPage` | Settings as a page: section nav, panels, floating save bar when `dirty`. | Model: `v-model:section`. Props: `title`, `sections` (`value`, `label`, `icon`, `to`), `dirty`, `saving`, `saveBar`, `form`. Slots: `section-<value>`, `actions`, `nav-footer`. Events: `save`, `discard`. | `templates/settings-page.vue` |
306
- | `SettingsSection` | Card of one settings section with a save footer. | Props: `title`, `description`, `icon`, `hint`, `saveable`, `saving`, `saveDisabled`, `saveLabel`, `form`. Slots: default, `actions`, `footer`, `hint`. Event: `save`. | `templates/settings-page.vue` |
307
- | `SettingsGroup` | Block with label, description and actions inside a settings section. | Props: `label`, `description`, `level`, `row`. Slots: default, `label`, `description`, `actions`. | `templates/settings-modal.vue` |
308
- | `SettingsModal` | Settings dialog with nav, built-in account and appearance sections, your own sections and subpages. A subpage title is a one line trail. | Models: `v-model:open`, `v-model:section`, `v-model:pages`. Props: `sections` (`id`, `label`, `icon`, `group`, `badge`, `to`), `account`, `presets`, `title`, `onSignOut`, `hideSession`, `beforeClose`, `route` (sync with `?settings=<section>/<page>`), `routeLocation` (`'hash'`: `#settings/<section>/<page>`), `accountSection` (id with the built-in account content, default `account`), `resolvePage(section, id, parents)`, `guard`, `guardTitle`, `guardMessage` (back, breadcrumb, another section, close and a route change of the modal ask before discarding a dirty `Form` of the section). Slot props: `section`, `close`, `page`, `pages`, `openPage(page)`, `back()`, `goTo(depth)` (the last three resolve `false` when the user keeps editing), `confirmLeave()`. Slots: `section-<id>`, `actions-<id>` (right of the header row, also on a subpage), `nav-footer` (small text in the footer of the side navigation, under the divider and above the sign out item, for example the app version; hidden at phone width), `tabs-<id>` (tabs at the bottom of the header, like a drawer; the strip shows only when the slot renders content), `account-start` (above the profile card), `account-fields`. | `templates/settings-modal.vue` |
309
- | `AppearanceSettings` | Theme (light, dark, system) and preset cards. Used by `SettingsModal`. Use alone in a settings page. | Props: `presets` (list or false), `themes`, `level`. | `presets.vue` (pages root) |
310
- | `SaveBar` | Floating bar with save and discard for unsaved changes. | Props: `visible`, `saving`, `message`, `saveLabel`, `discardLabel`, `form`. Slots: default, `actions`. Events: `save`, `discard`. | `templates/settings-page.vue` |
311
- | `EmptyPage` | First run screen with illustration, actions and onboarding steps. | Props: `title`, `description`, `icon`, `actionLabel`, `actionTo`, `onAction`, `actionIcon`, `secondaryLabel`, `secondaryTo`, `secondaryHref`, `onSecondary`, `steps` (`title`, `description`, `done`, `to`), `fill`. Slots: default, `illustration`, `title`, `description`, `actions`. | `templates/empty-page.vue` |
312
- | `ErrorPage` | Error screen. Reads a Nuxt `error`. Use it in `app/error.vue`. | Props: `error`, `statusCode`, `title`, `message`, `homeTo`, `homeLabel`, `retryLabel`, `brandName`, `fill`, `onHome`, `onRetry`. Slots: default, `title`, `message`, `actions`, `brand`. | `templates/error-page.vue` |
313
- | `NotFoundPage` | 404 screen. | Props: `title`, `message`, `homeTo`, `homeLabel`, `backLabel`, `brandName`, `fill`, `onHome`. Slots: default, `actions`, `brand`. | `templates/error-page.vue` |
314
- | `Brand` | Logo and name block (image URL, inline SVG or component). | Props: `name`, `subtitle`, `icon`, `logo`, `to`, `size`, `accent`, `hideText`, `showName`. Slots: default, `logo`, `mark`, `subtitle`. | `templates/dashboard-layout.vue` |
315
- | `AccountMenu` | Account button with avatar, name and a dropdown menu. Used by `DashboardLayout`. | Props: `name`, `email`, `avatar`, `menu` (menu items), `placement`, `icon`. Event: `select`. | `templates/dashboard-layout.vue` |
292
+ | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
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`, `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
+ | `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
+ | `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
+ | `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
+ | `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
+ | `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
+ | `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`, `docked` (as `Drawer`). `deleteHint` is a tooltip of the delete button, and the reason when `deleteDisabled`. Slots: default (`{ tab }`), `actions`, `title-trailing`, `skeleton`, `footer`, `footer-start` (buttons on the left of the footer after delete, also when `readonly`: archive, restore). Events: `delete`, `submitted`, `navigate`, `afterLeave`. Exposes `confirmDiscard()`, `close()`. | `templates/form-drawer.vue` |
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 }`), `footer-start` (buttons on the left of the footer after delete, also when `readonly`: archive, restore). Events: `delete`, `submitted`, `open`, `close`, `afterLeave`. Exposes `submit()`, `confirmDiscard()`, `close()`. | `templates/form-modal.vue` |
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
+ | `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` |
305
+ | `SettingsPage` | Settings as a page: section nav, panels, floating save bar when `dirty`. | Model: `v-model:section`. Props: `title`, `sections` (`value`, `label`, `icon`, `to`), `dirty`, `saving`, `saveBar`, `form`. Slots: `section-<value>`, `actions`, `nav-footer`. Events: `save`, `discard`. | `templates/settings-page.vue` |
306
+ | `SettingsSection` | Card of one settings section with a save footer. | Props: `title`, `description`, `icon`, `hint`, `saveable`, `saving`, `saveDisabled`, `saveLabel`, `form`. Slots: default, `actions`, `footer`, `hint`. Event: `save`. | `templates/settings-page.vue` |
307
+ | `SettingsGroup` | Block with label, description and actions inside a settings section. | Props: `label`, `description`, `level`, `row`. Slots: default, `label`, `description`, `actions`. | `templates/settings-modal.vue` |
308
+ | `SettingsModal` | Settings dialog with nav, built-in account and appearance sections, your own sections and subpages. A subpage title is a one line trail. | Models: `v-model:open`, `v-model:section`, `v-model:pages`. Props: `sections` (`id`, `label`, `icon`, `group`, `badge`, `to`), `account`, `presets`, `title`, `onSignOut`, `hideSession`, `beforeClose`, `route` (sync with `?settings=<section>/<page>`), `routeLocation` (`'hash'`: `#settings/<section>/<page>`), `accountSection` (id with the built-in account content, default `account`), `resolvePage(section, id, parents)`, `guard`, `guardTitle`, `guardMessage` (back, breadcrumb, another section, close and a route change of the modal ask before discarding a dirty `Form` of the section). Slot props: `section`, `close`, `page`, `pages`, `openPage(page)`, `back()`, `goTo(depth)` (the last three resolve `false` when the user keeps editing), `confirmLeave()`. Slots: `section-<id>`, `actions-<id>` (right of the header row, also on a subpage), `nav-footer` (small text in the footer of the side navigation, under the divider and above the sign out item, for example the app version; hidden at phone width), `tabs-<id>` (tabs at the bottom of the header, like a drawer; the strip shows only when the slot renders content), `account-start` (above the profile card), `account-fields`. | `templates/settings-modal.vue` |
309
+ | `AppearanceSettings` | Theme (light, dark, system) and preset cards. Used by `SettingsModal`. Use alone in a settings page. | Props: `presets` (list or false), `themes`, `level`. | `presets.vue` (pages root) |
310
+ | `SaveBar` | Floating bar with save and discard for unsaved changes. | Props: `visible`, `saving`, `message`, `saveLabel`, `discardLabel`, `form`. Slots: default, `actions`. Events: `save`, `discard`. | `templates/settings-page.vue` |
311
+ | `EmptyPage` | First run screen with illustration, actions and onboarding steps. | Props: `title`, `description`, `icon`, `actionLabel`, `actionTo`, `onAction`, `actionIcon`, `secondaryLabel`, `secondaryTo`, `secondaryHref`, `onSecondary`, `steps` (`title`, `description`, `done`, `to`), `fill`. Slots: default, `illustration`, `title`, `description`, `actions`. | `templates/empty-page.vue` |
312
+ | `ErrorPage` | Error screen. Reads a Nuxt `error`. Use it in `app/error.vue`. | Props: `error`, `statusCode`, `title`, `message`, `homeTo`, `homeLabel`, `retryLabel`, `brandName`, `fill`, `onHome`, `onRetry`. Slots: default, `title`, `message`, `actions`, `brand`. | `templates/error-page.vue` |
313
+ | `NotFoundPage` | 404 screen. | Props: `title`, `message`, `homeTo`, `homeLabel`, `backLabel`, `brandName`, `fill`, `onHome`. Slots: default, `actions`, `brand`. | `templates/error-page.vue` |
314
+ | `Brand` | Logo and name block (image URL, inline SVG or component). | Props: `name`, `subtitle`, `icon`, `logo`, `to`, `size`, `accent`, `hideText`, `showName`. Slots: default, `logo`, `mark`, `subtitle`. | `templates/dashboard-layout.vue` |
315
+ | `AccountMenu` | Account button with avatar, name and a dropdown menu. Used by `DashboardLayout`. | Props: `name`, `email`, `avatar`, `menu` (menu items), `placement`, `icon`. Event: `select`. | `templates/dashboard-layout.vue` |
316
316
 
317
317
  Nuxt ready layouts: with `k: { layouts: true }` the module registers the layouts `k-dashboard` and `k-auth`. They read brand, navigation, account and settings from `app.config.ts` (`k` key). `useDashboard()` gives the runtime account, breadcrumbs and badges for `k-dashboard`. `useNavigationPending()` is `true` from the moment the guards accept a navigation to another path (after the discard question of a leave guard) until the new page has rendered; the module waits two frames at the start so the skeleton paints first, and `k-dashboard` binds it to `loading`. See README, section "Nuxt: ready layouts".
318
318
 
@@ -331,11 +331,11 @@ Grid helpers: `registerGridModules`, `registerGridEditorModules`, `registerGridF
331
331
 
332
332
  ## Editor (group `editor`)
333
333
 
334
- | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
335
- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
336
- | `RichTextEditor` | Rich text field (Tiptap): headings, bold, italic, lists, quote, code, links. Use `Textarea` for plain text. | Model: `v-model` (HTML string or JSON, per `format`). Props: `format` (html, json), `placeholder`, `readonly`, `disabled`, `invalid`, `required`, `maxLength`, `showCount`, `minHeight`, `maxHeight`, `toolbar` (items and `'\|'` separators, `'source'` for the raw value toggle), `source` (adds the raw value toggle to the default toolbar), `headings`, `headingLabel`, `linkTypes` (url, email, phone), `extensions`, `messages`. Works inside `FormField`. | `editor/rich-text-editor.vue` |
337
- | `TemplateEditor` | Single line template with `{key}` placeholders for users who do not know the syntax: each placeholder is one block with its label, an insert button lists the tokens with their description, a click on a block changes or removes it, typed or pasted `{key}` becomes a block. | Model: `v-model` (plain text with `{key}`). Props: `tokens` (`TemplateToken[]`: `key`, `label`, `description`, `group`), `preview` (result text under the field, empty shows `editor.previewEmpty`), `placeholder`, `readonly`, `disabled`, `invalid`, `required`, `maxLength` (of the stored text), `label`, `messages`. Slot: `preview` (`{ value }`). Works inside `FormField`. | `editor/template-editor.vue` |
338
- | `TemplateText` | Read only render of a template value with the same blocks (lists, grid cells). | Props: `value`, `tokens`. Helpers: `templateParts(value, tokens)` (text and token parts, unknown `{key}` stays text), `templateToken(key)`, `TEMPLATE_TOKEN_PATTERN`. | `editor/template-editor.vue` |
334
+ | Component | Purpose and when to use it | Main props, models, slots, events | Playground |
335
+ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
336
+ | `RichTextEditor` | Rich text field (Tiptap): headings, bold, italic, lists, quote, code, links. Use `Textarea` for plain text. | Model: `v-model` (HTML string or JSON, per `format`). Props: `format` (html, json), `placeholder`, `readonly`, `disabled`, `invalid`, `required`, `maxLength`, `showCount`, `minHeight`, `maxHeight`, `toolbar` (items and `'\|'` separators, `'source'` for the raw value toggle), `source` (adds the raw value toggle to the default toolbar), `headings`, `headingLabel`, `linkTypes` (url, email, phone), `extensions`, `messages`. Works inside `FormField`. | `editor/rich-text-editor.vue` |
337
+ | `TemplateEditor` | Single line template with `{key}` placeholders for users who do not know the syntax: each placeholder is one block with its label, an insert button lists the tokens with their description, a click on a block changes or removes it, typed or pasted `{key}` becomes a block. | Model: `v-model` (plain text with `{key}`). Props: `tokens` (`TemplateToken[]`: `key`, `label`, `description`, `group`), `preview` (result text under the field, hidden until the eye button next to the insert button shows it, `v-model:previewOpen`; empty shows `editor.previewEmpty`), `placeholder`, `readonly`, `disabled`, `invalid`, `required`, `maxLength` (of the stored text), `label`, `messages`. Slot: `preview` (`{ value }`). Works inside `FormField`. | `editor/template-editor.vue` |
338
+ | `TemplateText` | Read only render of a template value with the same blocks (lists, grid cells). | Props: `value`, `tokens`. Helpers: `templateParts(value, tokens)` (text and token parts, unknown `{key}` stays text), `templateToken(key)`, `TEMPLATE_TOKEN_PATTERN`. | `editor/template-editor.vue` |
339
339
 
340
340
  ## Chart (group `chart`)
341
341
 
package/README.md CHANGED
@@ -234,14 +234,14 @@ Buttons show `icon` before the label and `trailingIcon` after it. Put action ico
234
234
 
235
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.
236
236
 
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 |
244
- | `dock:<dockStorageKey>` | `number` (px) | `AppShell` and `DashboardLayout`: the width of the docked drawer panel |
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 |
244
+ | `dock:<dockStorageKey>` | `number` (px) | `AppShell` and `DashboardLayout`: the width of the dock and the detached choice |
245
245
 
246
246
  `PREFERENCE_KEYS` builds them (`PREFERENCE_KEYS.grid('orders')`). Your own keys work too: use a namespace of your app (`app:<name>`).
247
247
 
@@ -778,7 +778,7 @@ const confirmDiscard = () => !dirty.value || confirm({ title: 'Discard changes?'
778
778
  - It needs a `DashboardLayout` or an `AppShell` around the page, and a shell width of at least 1280px. Otherwise (and on a phone) it is the normal overlay drawer, and it changes mode while it is open when the window is resized.
779
779
  - The shell shows a dock on the right of the page as long as a docked drawer is mounted, also while it is closed: a page with a docked drawer shows the empty state of the dock ("Nothing selected", `dockEmptyTitle` and `dockEmptyDescription` of the layout), and a page without one shows no dock. The open drawer fills the dock.
780
780
  - The dock has a resize handle on its left edge (min 22rem, max 48rem and at most 45% of the shell, double click resets to 30rem). The width goes to the preferences store under `dock:<dockStorageKey>` (default `k-dock`, `false` keeps it only in memory).
781
- - `size` gives the width of the overlay mode only. A docked drawer of size `lg`, `xl` or `full` gets an expand button in the header (`expandLabel`, `collapseLabel`): it shows the same drawer as an overlay at its size, and the button, Escape or a click on the backdrop docks it again.
781
+ - `size` gives the width of the overlay mode only. Every docked drawer has a dock button in the header (`detachLabel`, `attachLabel`): it detaches the whole dock, so every docked drawer of the app opens as a normal overlay and no page shows the dock, and the same button in the overlay docks them again. The choice is saved with the width (`dock:<dockStorageKey>`, `{ width, detached }`).
782
782
  - A docked drawer is not modal: no backdrop, no scroll lock, focus stays where it was when it opens, and Escape closes it only when the focus is inside it (and no menu or nested dialog is open). The leave guard is the same: closing it, its trail and a navigation ask before they drop a dirty form.
783
783
  - `useRouteRecord().openRecord(id)` asks the discard question when it replaces another open record (the user clicked another row with a dirty form). The default `beforeLeave` reads the topmost modal dialog, else the docked drawer. A discard accepted by a scope also answers the next question of the same scope in the same task, so a drawer that asks and then calls `openRecord()` asks once.
784
784
  - Toasts move to the left of the dock.
@@ -8,7 +8,8 @@
8
8
  'is-nav-open': open,
9
9
  'is-mobile': mobile,
10
10
  'is-named': viewTransition,
11
- 'is-fill': contentMode === 'bleed'
11
+ 'is-fill': contentMode === 'bleed',
12
+ 'is-dock-detached': dockDetached
12
13
  }"
13
14
  :data-content="contentMode"
14
15
  @keydown.esc="onEscape"
@@ -147,7 +148,13 @@ import Skeleton from "../feedback/Skeleton.vue";
147
148
  import SkeletonList from "../feedback/SkeletonList.vue";
148
149
  import ResizeHandle from "./ResizeHandle.vue";
149
150
  import { focusFirst } from "../../internal/core/focus";
150
- import { DOCK_BREAKPOINT, DOCK_KEY, DOCK_WIDTH, dockFrame } from "../../internal/overlays/dock";
151
+ import {
152
+ DOCK_BREAKPOINT,
153
+ DOCK_KEY,
154
+ DOCK_WIDTH,
155
+ dockFrame,
156
+ isDockPreference
157
+ } from "../../internal/overlays/dock";
151
158
  import { PREFERENCE_KEYS, usePreference } from "../../composables/usePreferences";
152
159
  const props = defineProps({
153
160
  variant: { type: String, required: false, default: "inset" },
@@ -257,10 +264,18 @@ watch(open, (value) => {
257
264
  const dockSlot = useTemplateRef("dockSlot");
258
265
  const dockFrameRef = useTemplateRef("dockFrameRef");
259
266
  const dockWide = computed(() => shellWidth.value >= DOCK_BREAKPOINT);
260
- const dockPreference = props.dockStorageKey ? usePreference(PREFERENCE_KEYS.dock(props.dockStorageKey), DOCK_WIDTH.initial, {
261
- validate: (value) => typeof value === "number" && value > 0
262
- }) : ref(DOCK_WIDTH.initial);
263
- const dockWidth = ref(dockPreference.value);
267
+ const dockPreference = props.dockStorageKey ? usePreference(
268
+ PREFERENCE_KEYS.dock(props.dockStorageKey),
269
+ {},
270
+ {
271
+ validate: isDockPreference
272
+ }
273
+ ) : ref({});
274
+ const storedDock = computed(
275
+ () => typeof dockPreference.value === "number" ? { width: dockPreference.value } : dockPreference.value
276
+ );
277
+ const dockWidth = ref(storedDock.value.width ?? DOCK_WIDTH.initial);
278
+ const dockDetached = ref(storedDock.value.detached ?? false);
264
279
  const dockResizing = ref(false);
265
280
  const dockMax = computed(
266
281
  () => Math.max(
@@ -269,14 +284,19 @@ const dockMax = computed(
269
284
  )
270
285
  );
271
286
  const dockSize = computed(() => Math.min(Math.max(dockWidth.value, DOCK_WIDTH.min), dockMax.value));
272
- watch(dockPreference, (value) => {
273
- if (!dockResizing.value && value !== dockWidth.value) dockWidth.value = value;
287
+ watch(storedDock, (value) => {
288
+ const width = value.width ?? DOCK_WIDTH.initial;
289
+ if (!dockResizing.value && width !== dockWidth.value) dockWidth.value = width;
290
+ const detached = value.detached ?? false;
291
+ if (detached !== dockDetached.value) dockDetached.value = detached;
274
292
  });
275
293
  function persistDock() {
276
- if (dockResizing.value || dockPreference.value === dockWidth.value) return;
277
- dockPreference.value = dockWidth.value;
294
+ if (dockResizing.value) return;
295
+ const stored = storedDock.value;
296
+ if (stored.width === dockWidth.value && (stored.detached ?? false) === dockDetached.value) return;
297
+ dockPreference.value = { width: dockWidth.value, detached: dockDetached.value };
278
298
  }
279
- watch(dockWidth, persistDock);
299
+ watch([dockWidth, dockDetached], persistDock);
280
300
  function endDockResize() {
281
301
  dockResizing.value = false;
282
302
  persistDock();
@@ -296,7 +316,7 @@ useResizeObserver(
296
316
  onBeforeUnmount(() => {
297
317
  if (dockFrame.value && dockFrame.value === dockFrameRef.value) dockFrame.value = null;
298
318
  });
299
- provide(DOCK_KEY, { target: dockSlot, wide: dockWide });
319
+ provide(DOCK_KEY, { target: dockSlot, wide: dockWide, detached: dockDetached });
300
320
  provide(SHELL_KEY, {
301
321
  sidebarId,
302
322
  collapsed,
@@ -238,9 +238,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
238
238
  backLabel?: string;
239
239
  guardTitle?: string;
240
240
  guardMessage?: string;
241
- expandable?: boolean;
242
- expandLabel?: string;
243
- collapseLabel?: string;
241
+ detachLabel?: string;
242
+ attachLabel?: string;
244
243
  onOpen?: (() => any) | undefined;
245
244
  "onUpdate:tab"?: ((value: string | number | undefined) => any) | undefined;
246
245
  closedby?: import("../../index.ts").DialogClosedBy;
@@ -483,9 +482,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
483
482
  backLabel?: string;
484
483
  guardTitle?: string;
485
484
  guardMessage?: string;
486
- expandable?: boolean;
487
- expandLabel?: string;
488
- collapseLabel?: string;
485
+ detachLabel?: string;
486
+ attachLabel?: string;
489
487
  onOpen?: (() => any) | undefined;
490
488
  "onUpdate:tab"?: ((value: string | number | undefined) => any) | undefined;
491
489
  closedby?: import("../../index.ts").DialogClosedBy;
@@ -228,9 +228,8 @@ declare const __VLS_export: import("vue").DefineComponent<Partial<NonNullable<{
228
228
  readonly backLabel?: string | undefined;
229
229
  readonly guardTitle?: string | undefined;
230
230
  readonly guardMessage?: string | undefined;
231
- readonly expandable?: boolean | undefined;
232
- readonly expandLabel?: string | undefined;
233
- readonly collapseLabel?: string | undefined;
231
+ readonly detachLabel?: string | undefined;
232
+ readonly attachLabel?: string | undefined;
234
233
  readonly onOpen?: (() => any) | undefined;
235
234
  readonly "onUpdate:tab"?: ((value: string | number | undefined) => any) | undefined;
236
235
  readonly closedby?: import("../../index.ts").DialogClosedBy | undefined;
@@ -469,9 +468,8 @@ declare const __VLS_export: import("vue").DefineComponent<Partial<NonNullable<{
469
468
  readonly backLabel?: string | undefined;
470
469
  readonly guardTitle?: string | undefined;
471
470
  readonly guardMessage?: string | undefined;
472
- readonly expandable?: boolean | undefined;
473
- readonly expandLabel?: string | undefined;
474
- readonly collapseLabel?: string | undefined;
471
+ readonly detachLabel?: string | undefined;
472
+ readonly attachLabel?: string | undefined;
475
473
  readonly onOpen?: (() => any) | undefined;
476
474
  readonly "onUpdate:tab"?: ((value: string | number | undefined) => any) | undefined;
477
475
  readonly closedby?: import("../../index.ts").DialogClosedBy | undefined;
@@ -21,9 +21,8 @@
21
21
  :trail="trail"
22
22
  :back-label="backLabel"
23
23
  :dock="docked && side === 'right'"
24
- :expandable="EXPANDABLE_SIZES.includes(size)"
25
- :expand-label="expandLabel"
26
- :collapse-label="collapseLabel"
24
+ :detach-label="detachLabel"
25
+ :attach-label="attachLabel"
27
26
  v-model:tab="tab"
28
27
  @navigate="(index) => emit('navigate', index)"
29
28
  @open="emit('open')"
@@ -59,10 +58,9 @@ defineProps({
59
58
  guardTitle: { type: String, required: false },
60
59
  guardMessage: { type: String, required: false },
61
60
  docked: { type: Boolean, required: false },
62
- expandLabel: { type: String, required: false },
63
- collapseLabel: { type: String, required: false }
61
+ detachLabel: { type: String, required: false },
62
+ attachLabel: { type: String, required: false }
64
63
  });
65
- const EXPANDABLE_SIZES = ["lg", "xl", "full"];
66
64
  const slots = defineSlots();
67
65
  const slotNames = () => Object.keys(slots);
68
66
  const emit = defineEmits(["open", "close", "afterLeave", "navigate"]);
@@ -22,8 +22,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
22
22
  guardTitle?: string;
23
23
  guardMessage?: string;
24
24
  docked?: boolean;
25
- expandLabel?: string;
26
- collapseLabel?: string;
25
+ detachLabel?: string;
26
+ attachLabel?: string;
27
27
  open?: boolean | undefined;
28
28
  tab?: TabItem["value"];
29
29
  key?: PropertyKey | undefined;
@@ -226,7 +226,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
226
226
  onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
227
227
  onCancel?: ((payload: Event) => void) | undefined;
228
228
  rootClass?: unknown;
229
- expandable?: boolean;
230
229
  closedby?: import("../../index.ts").DialogClosedBy;
231
230
  }, {
232
231
  close: () => Promise<boolean>;
@@ -260,8 +259,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
260
259
  guardTitle?: string;
261
260
  guardMessage?: string;
262
261
  docked?: boolean;
263
- expandLabel?: string;
264
- collapseLabel?: string;
262
+ detachLabel?: string;
263
+ attachLabel?: string;
265
264
  open?: boolean | undefined;
266
265
  tab?: TabItem["value"];
267
266
  key?: PropertyKey | undefined;
@@ -464,7 +463,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
464
463
  onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
465
464
  onCancel?: ((payload: Event) => void) | undefined;
466
465
  rootClass?: unknown;
467
- expandable?: boolean;
468
466
  closedby?: import("../../index.ts").DialogClosedBy;
469
467
  }> & Readonly<{
470
468
  onClose?: (() => any) | undefined;
@@ -226,9 +226,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
226
226
  onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
227
227
  onCancel?: ((payload: Event) => void) | undefined;
228
228
  rootClass?: unknown;
229
- expandable?: boolean;
230
- expandLabel?: string;
231
- collapseLabel?: string;
229
+ detachLabel?: string;
230
+ attachLabel?: string;
232
231
  closedby?: import("../../index.ts").DialogClosedBy;
233
232
  }, {
234
233
  close: () => Promise<boolean>;
@@ -466,9 +465,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
466
465
  onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
467
466
  onCancel?: ((payload: Event) => void) | undefined;
468
467
  rootClass?: unknown;
469
- expandable?: boolean;
470
- expandLabel?: string;
471
- collapseLabel?: string;
468
+ detachLabel?: string;
469
+ attachLabel?: string;
472
470
  closedby?: import("../../index.ts").DialogClosedBy;
473
471
  }> & Readonly<{
474
472
  onClose?: (() => any) | undefined;
@@ -46,7 +46,7 @@
46
46
  <slot v-else :tab="active" />
47
47
  </template>
48
48
 
49
- <template v-if="form || $slots.footer" #footer>
49
+ <template v-if="form || $slots.footer || $slots['footer-start']" #footer>
50
50
  <slot name="footer">
51
51
  <Button
52
52
  v-if="deletable && !readonly"
@@ -61,6 +61,7 @@
61
61
  >
62
62
  {{ deleteText }}
63
63
  </Button>
64
+ <slot name="footer-start" />
64
65
  <div class="k-form-drawer-actions">
65
66
  <Button
66
67
  variant="ghost"
@@ -64,8 +64,8 @@ declare const __VLS_export: <S extends FormSchema, V extends object>(__VLS_props
64
64
  readonly guardTitle?: string | undefined;
65
65
  readonly guardMessage?: string | undefined;
66
66
  readonly docked?: boolean | undefined;
67
- readonly expandLabel?: string | undefined;
68
- readonly collapseLabel?: string | undefined;
67
+ readonly detachLabel?: string | undefined;
68
+ readonly attachLabel?: string | undefined;
69
69
  readonly open?: boolean | undefined;
70
70
  readonly tab?: TabItem["value"] | undefined;
71
71
  readonly key?: PropertyKey | undefined;
@@ -268,7 +268,6 @@ declare const __VLS_export: <S extends FormSchema, V extends object>(__VLS_props
268
268
  readonly onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
269
269
  readonly onCancel?: ((payload: Event) => void) | undefined;
270
270
  readonly rootClass?: unknown;
271
- readonly expandable?: boolean | undefined;
272
271
  readonly closedby?: import("../../index.ts").DialogClosedBy | undefined;
273
272
  readonly onClose?: (() => any) | undefined;
274
273
  readonly onOpen?: (() => any) | undefined;
@@ -300,6 +299,8 @@ declare const __VLS_export: <S extends FormSchema, V extends object>(__VLS_props
300
299
  }) => any;
301
300
  } & {
302
301
  footer?: (props: {}) => any;
302
+ } & {
303
+ 'footer-start'?: (props: {}) => any;
303
304
  };
304
305
  emit: (((evt: "delete") => void) & ((evt: "submitted") => void) & ((evt: "navigate", index: number) => void) & ((evt: "afterLeave") => void)) & (((event: "update:open", value: boolean) => void) & ((event: "update:tab", value: string | number | undefined) => void));
305
306
  }>) => import("vue").VNode & {
@@ -43,7 +43,7 @@
43
43
  </Form>
44
44
  <slot v-else />
45
45
 
46
- <template v-if="form || $slots.footer" #footer>
46
+ <template v-if="form || $slots.footer || $slots['footer-start']" #footer>
47
47
  <slot name="footer" :submit="submit" :cancel="cancel">
48
48
  <Button
49
49
  v-if="deletable && !readonly"
@@ -58,6 +58,7 @@
58
58
  >
59
59
  {{ deleteText }}
60
60
  </Button>
61
+ <slot name="footer-start" />
61
62
  <div class="k-form-modal-actions">
62
63
  <Button
63
64
  variant="ghost"
@@ -263,9 +263,8 @@ declare const __VLS_export: <S extends FormSchema, V extends object>(__VLS_props
263
263
  readonly onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
264
264
  readonly onCancel?: ((payload: Event) => void) | undefined;
265
265
  readonly rootClass?: unknown;
266
- readonly expandable?: boolean | undefined;
267
- readonly expandLabel?: string | undefined;
268
- readonly collapseLabel?: string | undefined;
266
+ readonly detachLabel?: string | undefined;
267
+ readonly attachLabel?: string | undefined;
269
268
  readonly closedby?: import("../../index.ts").DialogClosedBy | undefined;
270
269
  readonly onClose?: (() => any) | undefined;
271
270
  readonly onOpen?: (() => any) | undefined;
@@ -297,6 +296,8 @@ declare const __VLS_export: <S extends FormSchema, V extends object>(__VLS_props
297
296
  submit: () => Promise<boolean>;
298
297
  cancel: () => Promise<void>;
299
298
  }) => any;
299
+ } & {
300
+ 'footer-start'?: (props: {}) => any;
300
301
  };
301
302
  emit: (((evt: "close") => void) & ((evt: "delete") => void) & ((evt: "open") => void) & ((evt: "submitted") => void) & ((evt: "afterLeave") => void)) & ((event: "update:open", value: boolean) => void);
302
303
  }>) => import("vue").VNode & {
@@ -267,9 +267,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
267
267
  trail?: string[];
268
268
  rootClass?: unknown;
269
269
  hideClose?: boolean;
270
- expandable?: boolean;
271
- expandLabel?: string;
272
- collapseLabel?: string;
270
+ detachLabel?: string;
271
+ attachLabel?: string;
273
272
  "onUpdate:tab"?: ((value: string | number | undefined) => any) | undefined;
274
273
  closedby?: import("../../index.ts").DialogClosedBy;
275
274
  minHeight?: string;
@@ -527,9 +526,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
527
526
  trail?: string[];
528
527
  rootClass?: unknown;
529
528
  hideClose?: boolean;
530
- expandable?: boolean;
531
- expandLabel?: string;
532
- collapseLabel?: string;
529
+ detachLabel?: string;
530
+ attachLabel?: string;
533
531
  "onUpdate:tab"?: ((value: string | number | undefined) => any) | undefined;
534
532
  closedby?: import("../../index.ts").DialogClosedBy;
535
533
  minHeight?: string;
@@ -24,8 +24,22 @@
24
24
  @mousedown.prevent
25
25
  @click="openInsertMenu"
26
26
  />
27
+ <Button
28
+ v-if="showPreview"
29
+ variant="ghost"
30
+ tone="neutral"
31
+ size="xs"
32
+ square
33
+ :icon="previewOpen ? 'eye-slash' : 'eye'"
34
+ class="k-template-editor-preview-toggle"
35
+ :aria-label="previewOpen ? text.hidePreview : text.showPreview"
36
+ :aria-pressed="previewOpen ? 'true' : 'false'"
37
+ :aria-controls="previewId"
38
+ @mousedown.prevent
39
+ @click="previewOpen = !previewOpen"
40
+ />
27
41
  </div>
28
- <div v-if="showPreview" class="k-template-editor-preview">
42
+ <div v-if="showPreview && previewOpen" :id="previewId" class="k-template-editor-preview">
29
43
  <span class="k-template-editor-preview-label">{{ text.preview }}</span>
30
44
  <span class="k-template-editor-preview-text">
31
45
  <slot name="preview" :value="model">
@@ -58,7 +72,16 @@ import {
58
72
  useEditor
59
73
  } from "@tiptap/vue-3";
60
74
  import { Plugin, NodeSelection } from "@tiptap/pm/state";
61
- import { computed, onBeforeUnmount, ref, shallowRef, useSlots, useTemplateRef, watch } from "vue";
75
+ import {
76
+ computed,
77
+ onBeforeUnmount,
78
+ ref,
79
+ shallowRef,
80
+ useId,
81
+ useSlots,
82
+ useTemplateRef,
83
+ watch
84
+ } from "vue";
62
85
  import Button from "../components/core/Button.vue";
63
86
  import { useFieldControl } from "../composables/useField";
64
87
  import { useLocale } from "../composables/useLocale";
@@ -80,6 +103,8 @@ const props = defineProps({
80
103
  messages: { type: Object, required: false }
81
104
  });
82
105
  const model = defineModel({ type: [String, null], ...{ default: "" } });
106
+ const previewOpen = defineModel("previewOpen", { type: Boolean, ...{ default: false } });
107
+ const previewId = useId();
83
108
  const slots = useSlots();
84
109
  const control = useFieldControl({
85
110
  invalid: () => props.invalid,
@@ -1,9 +1,9 @@
1
1
  import type { EditorMessages, TemplateToken } from './types';
2
- declare var __VLS_14: {
2
+ declare var __VLS_22: {
3
3
  value: string | null;
4
4
  };
5
5
  type __VLS_Slots = {} & {
6
- preview?: (props: typeof __VLS_14) => any;
6
+ preview?: (props: typeof __VLS_22) => any;
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<{
9
9
  tokens: TemplateToken[];
@@ -17,6 +17,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
17
17
  preview?: string | null;
18
18
  messages?: Partial<EditorMessages>;
19
19
  modelValue?: string | null;
20
+ previewOpen?: boolean;
20
21
  key?: PropertyKey | undefined;
21
22
  prefix?: string | undefined | undefined;
22
23
  title?: string | undefined | undefined;
@@ -213,6 +214,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
213
214
  focus: () => boolean | undefined;
214
215
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
215
216
  "update:modelValue": (value: string | null) => any;
217
+ "update:previewOpen": (value: boolean) => any;
216
218
  }, string, import("vue").PublicProps, Readonly<{
217
219
  tokens: TemplateToken[];
218
220
  placeholder?: string | undefined;
@@ -225,6 +227,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
225
227
  preview?: string | null;
226
228
  messages?: Partial<EditorMessages>;
227
229
  modelValue?: string | null;
230
+ previewOpen?: boolean;
228
231
  key?: PropertyKey | undefined;
229
232
  prefix?: string | undefined | undefined;
230
233
  title?: string | undefined | undefined;
@@ -418,6 +421,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
418
421
  popover?: (import("../index.ts").PopoverMode | "" | boolean) | undefined;
419
422
  }> & Readonly<{
420
423
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
424
+ "onUpdate:previewOpen"?: ((value: boolean) => any) | undefined;
421
425
  }>, {
422
426
  invalid: boolean;
423
427
  preview: string | null;
@@ -84,7 +84,8 @@
84
84
  background: var(--k-selection);
85
85
  }
86
86
 
87
- .k-template-editor-insert {
87
+ .k-template-editor-insert,
88
+ .k-template-editor-preview-toggle {
88
89
  flex-shrink: 0;
89
90
  }
90
91
 
@@ -1,13 +1,9 @@
1
1
  <template>
2
- <Teleport :to="dockTarget" :disabled="!teleported">
2
+ <Teleport :to="dockTarget" :disabled="!docked">
3
3
  <dialog
4
4
  ref="dialogRef"
5
5
  v-bind="$attrs"
6
- :class="[
7
- prefix,
8
- rootClass,
9
- { 'is-dockable': dockable, 'is-docked': docked, 'is-expanded': teleported && expanded }
10
- ]"
6
+ :class="[prefix, rootClass, { 'is-dockable': dockable, 'is-docked': docked }]"
11
7
  :aria-labelledby="labelledBy"
12
8
  :aria-label="labelledBy ? void 0 : label"
13
9
  :aria-describedby="hasDescription ? descriptionId : void 0"
@@ -55,7 +51,7 @@
55
51
  </div>
56
52
  </template>
57
53
  <div
58
- v-if="$slots.actions || showClose || hasTrail || showExpand"
54
+ v-if="$slots.actions || showClose || hasTrail || showDockToggle"
59
55
  :class="`${prefix}-actions`"
60
56
  >
61
57
  <Button
@@ -71,14 +67,14 @@
71
67
  </Button>
72
68
  <slot name="actions" :close="close" />
73
69
  <Button
74
- v-if="showExpand"
75
- :icon="expanded ? 'arrows-pointing-in' : 'arrows-pointing-out'"
70
+ v-if="showDockToggle"
71
+ :icon="docked ? 'arrows-pointing-out' : 'arrows-pointing-in'"
76
72
  variant="ghost"
77
73
  tone="neutral"
78
74
  size="sm"
79
75
  :disabled="loading"
80
- :aria-label="expanded ? collapseText : expandText"
81
- @click="expanded = !expanded"
76
+ :aria-label="docked ? detachText : attachText"
77
+ @click="toggleDock"
82
78
  />
83
79
  <Button
84
80
  v-if="showClose"
@@ -178,9 +174,8 @@ const props = defineProps({
178
174
  guardTitle: { type: String, required: false },
179
175
  guardMessage: { type: String, required: false },
180
176
  dock: { type: Boolean, required: false },
181
- expandable: { type: Boolean, required: false },
182
- expandLabel: { type: String, required: false },
183
- collapseLabel: { type: String, required: false }
177
+ detachLabel: { type: String, required: false },
178
+ attachLabel: { type: String, required: false }
184
179
  });
185
180
  provideFieldBoundary();
186
181
  const parentScope = useLeaveScope();
@@ -200,18 +195,20 @@ async function guardedClose(reason) {
200
195
  const { t } = useLocale();
201
196
  const closeText = computed(() => props.closeLabel ?? t("common.close"));
202
197
  const backText = computed(() => props.backLabel ?? t("common.back"));
203
- const expandText = computed(() => props.expandLabel ?? t("dock.expand"));
204
- const collapseText = computed(() => props.collapseLabel ?? t("dock.collapse"));
198
+ const detachText = computed(() => props.detachLabel ?? t("dock.detach"));
199
+ const attachText = computed(() => props.attachLabel ?? t("dock.attach"));
205
200
  const dockHost = inject(DOCK_KEY, null);
206
201
  const mounted = ref(false);
207
- const expanded = ref(false);
208
202
  const dockable = computed(() => Boolean(props.dock && dockHost));
209
203
  const dockTarget = computed(() => dockHost?.target.value ?? null);
210
- const teleported = computed(
204
+ const dockAvailable = computed(
211
205
  () => dockable.value && mounted.value && !!dockTarget.value && !!dockHost?.wide.value
212
206
  );
213
- const docked = computed(() => teleported.value && !expanded.value);
214
- const showExpand = computed(() => Boolean(props.expandable && teleported.value));
207
+ const docked = computed(() => dockAvailable.value && !dockHost?.detached.value);
208
+ const showDockToggle = dockAvailable;
209
+ function toggleDock() {
210
+ if (dockHost) dockHost.detached.value = !dockHost.detached.value;
211
+ }
215
212
  const slots = defineSlots();
216
213
  const emit = defineEmits(["open", "close", "afterLeave", "navigate"]);
217
214
  const open = defineModel("open", { type: Boolean, ...{ required: true } });
@@ -259,12 +256,6 @@ const { present, requestClose, onCancel, onClose, onPointerDown, onClick } = use
259
256
  panel: panelRef,
260
257
  open,
261
258
  modal: () => !docked.value,
262
- interceptClose: (reason) => {
263
- if (!expanded.value || !teleported.value) return false;
264
- if (reason !== "escape" && reason !== "backdrop") return false;
265
- expanded.value = false;
266
- return true;
267
- },
268
259
  dismissible: () => props.dismissible && !props.loading,
269
260
  beforeClose: () => leave.dirty.value || props.beforeClose ? guardedClose : void 0,
270
261
  onOpen: () => emit("open"),
@@ -279,9 +270,6 @@ function onDockedEscape(event) {
279
270
  event.preventDefault();
280
271
  if (props.dismissible && !props.loading) requestClose("escape");
281
272
  }
282
- watch(open, (value) => {
283
- if (!value) expanded.value = false;
284
- });
285
273
  async function navigate(index) {
286
274
  if (props.loading) return;
287
275
  if (!await leave.confirmLeave()) return;
@@ -45,9 +45,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
45
45
  guardTitle?: string;
46
46
  guardMessage?: string;
47
47
  dock?: boolean;
48
- expandable?: boolean;
49
- expandLabel?: string;
50
- collapseLabel?: string;
48
+ detachLabel?: string;
49
+ attachLabel?: string;
51
50
  open: boolean;
52
51
  tab?: TabItem["value"];
53
52
  key?: PropertyKey | undefined;
@@ -274,9 +273,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
274
273
  guardTitle?: string;
275
274
  guardMessage?: string;
276
275
  dock?: boolean;
277
- expandable?: boolean;
278
- expandLabel?: string;
279
- collapseLabel?: string;
276
+ detachLabel?: string;
277
+ attachLabel?: string;
280
278
  open: boolean;
281
279
  tab?: TabItem["value"];
282
280
  key?: PropertyKey | undefined;
@@ -226,9 +226,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
226
226
  backLabel?: string;
227
227
  guardTitle?: string;
228
228
  guardMessage?: string;
229
- expandable?: boolean;
230
- expandLabel?: string;
231
- collapseLabel?: string;
229
+ detachLabel?: string;
230
+ attachLabel?: string;
232
231
  onOpen?: ((() => any) & (() => any)) | undefined;
233
232
  "onUpdate:tab"?: (((value: string | number | undefined) => any) & ((value: string | number | undefined) => any)) | undefined;
234
233
  closedby?: import("../../index.ts").DialogClosedBy;
@@ -465,9 +464,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
465
464
  backLabel?: string;
466
465
  guardTitle?: string;
467
466
  guardMessage?: string;
468
- expandable?: boolean;
469
- expandLabel?: string;
470
- collapseLabel?: string;
467
+ detachLabel?: string;
468
+ attachLabel?: string;
471
469
  onOpen?: ((() => any) & (() => any)) | undefined;
472
470
  "onUpdate:tab"?: (((value: string | number | undefined) => any) & ((value: string | number | undefined) => any)) | undefined;
473
471
  closedby?: import("../../index.ts").DialogClosedBy;
@@ -8,7 +8,6 @@ export interface ModalDialogOptions {
8
8
  panel: Readonly<Ref<HTMLElement | null | undefined>>;
9
9
  open: Ref<boolean>;
10
10
  modal?: () => boolean;
11
- interceptClose?: (reason: DialogCloseReason) => boolean;
12
11
  dismissible: () => boolean;
13
12
  beforeClose?: () => DialogBeforeClose | undefined;
14
13
  onOpen?: () => void;
@@ -35,7 +35,6 @@ export function useModalDialog(options) {
35
35
  }
36
36
  async function requestClose(reason) {
37
37
  if (!options.open.value) return true;
38
- if (options.interceptClose?.(reason)) return false;
39
38
  if (!await allowClose(reason)) return false;
40
39
  options.open.value = false;
41
40
  return true;
@@ -9,7 +9,13 @@ export declare const DOCK_WIDTH: {
9
9
  export interface DockHost {
10
10
  target: Readonly<Ref<HTMLElement | null>>;
11
11
  wide: Readonly<Ref<boolean>>;
12
+ detached: Ref<boolean>;
12
13
  }
14
+ export interface DockPreference {
15
+ width?: number;
16
+ detached?: boolean;
17
+ }
18
+ export declare function isDockPreference(value: unknown): value is DockPreference | number;
13
19
  export declare const DOCK_KEY: InjectionKey<DockHost>;
14
20
  export declare const dockedStack: import("vue").ShallowReactive<HTMLDialogElement[]>;
15
21
  export declare const dockFrame: import("vue").ShallowRef<HTMLElement | null, HTMLElement | null>;
@@ -1,6 +1,12 @@
1
1
  import { shallowReactive, shallowRef } from "vue";
2
2
  export const DOCK_BREAKPOINT = 1280;
3
3
  export const DOCK_WIDTH = { initial: 480, min: 352, max: 768, share: 0.45 };
4
+ export function isDockPreference(value) {
5
+ if (typeof value === "number") return value > 0;
6
+ if (!value || typeof value !== "object") return false;
7
+ const record = value;
8
+ return (record.width === void 0 || typeof record.width === "number" && record.width > 0) && (record.detached === void 0 || typeof record.detached === "boolean");
9
+ }
4
10
  export const DOCK_KEY = Symbol("k-dock");
5
11
  export const dockedStack = shallowReactive([]);
6
12
  export const dockFrame = shallowRef(null);
@@ -79,7 +79,9 @@ export const de = {
79
79
  tokens: "Felder",
80
80
  removeToken: "Entfernen",
81
81
  preview: "Vorschau",
82
- previewEmpty: "Kein Text"
82
+ previewEmpty: "Kein Text",
83
+ showPreview: "Vorschau anzeigen",
84
+ hidePreview: "Vorschau ausblenden"
83
85
  },
84
86
  grid: {
85
87
  noRows: "Keine Zeilen vorhanden",
@@ -264,8 +266,8 @@ export const de = {
264
266
  emptyTitle: "Nichts ausgew\xE4hlt",
265
267
  emptyDescription: "W\xE4hlen Sie ein Element der Liste, um hier seine Details zu sehen.",
266
268
  resize: "Gr\xF6\xDFe des Detailbereichs \xE4ndern",
267
- expand: "Erweitern",
268
- collapse: "Seitlich andocken"
269
+ detach: "Bereich l\xF6sen",
270
+ attach: "Seitlich andocken"
269
271
  },
270
272
  formDrawer: {
271
273
  discardDescription: "Die \xC4nderungen an diesem Element gehen verloren."
@@ -79,7 +79,9 @@ export const en = {
79
79
  tokens: "Fields",
80
80
  removeToken: "Remove",
81
81
  preview: "Preview",
82
- previewEmpty: "No text"
82
+ previewEmpty: "No text",
83
+ showPreview: "Show preview",
84
+ hidePreview: "Hide preview"
83
85
  },
84
86
  grid: {
85
87
  noRows: "No rows to show",
@@ -264,8 +266,8 @@ export const en = {
264
266
  emptyTitle: "Nothing selected",
265
267
  emptyDescription: "Select an item in the list to see its details here.",
266
268
  resize: "Resize the details panel",
267
- expand: "Expand",
268
- collapse: "Dock to the side"
269
+ detach: "Detach the panel",
270
+ attach: "Dock to the side"
269
271
  },
270
272
  formDrawer: {
271
273
  discardDescription: "The changes to this item will be lost."
@@ -79,7 +79,9 @@ export const it = {
79
79
  tokens: "Campi",
80
80
  removeToken: "Rimuovi",
81
81
  preview: "Anteprima",
82
- previewEmpty: "Nessun testo"
82
+ previewEmpty: "Nessun testo",
83
+ showPreview: "Mostra anteprima",
84
+ hidePreview: "Nascondi anteprima"
83
85
  },
84
86
  grid: {
85
87
  noRows: "Nessuna riga da mostrare",
@@ -264,8 +266,8 @@ export const it = {
264
266
  emptyTitle: "Nessun elemento selezionato",
265
267
  emptyDescription: "Seleziona un elemento della lista per vederne qui i dettagli.",
266
268
  resize: "Ridimensiona il pannello dei dettagli",
267
- expand: "Espandi",
268
- collapse: "Riduci a lato"
269
+ detach: "Stacca il pannello",
270
+ attach: "Aggancia a lato"
269
271
  },
270
272
  formDrawer: {
271
273
  discardDescription: "Le modifiche a questo elemento andranno perse."
@@ -79,6 +79,8 @@ export interface KMessages {
79
79
  removeToken: string;
80
80
  preview: string;
81
81
  previewEmpty: string;
82
+ showPreview: string;
83
+ hidePreview: string;
82
84
  };
83
85
  grid: {
84
86
  noRows: string;
@@ -251,8 +253,8 @@ export interface KMessages {
251
253
  emptyTitle: string;
252
254
  emptyDescription: string;
253
255
  resize: string;
254
- expand: string;
255
- collapse: string;
256
+ detach: string;
257
+ attach: string;
256
258
  };
257
259
  formDrawer: {
258
260
  discardDescription: string;
@@ -235,7 +235,7 @@ html.k-root body {
235
235
  }
236
236
 
237
237
  @container k-shell (min-width: 1280px) {
238
- .k-shell:has(.k-drawer.is-dockable) > .k-shell-dock {
238
+ .k-shell:not(.is-dock-detached):has(.k-drawer.is-dockable) > .k-shell-dock {
239
239
  display: flex;
240
240
  }
241
241
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.104",
3
+ "version": "0.16.106",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",