@xleddyl/443-components-vue 0.16.105 → 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
@@ -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
 
@@ -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"
@@ -299,6 +299,8 @@ declare const __VLS_export: <S extends FormSchema, V extends object>(__VLS_props
299
299
  }) => any;
300
300
  } & {
301
301
  footer?: (props: {}) => any;
302
+ } & {
303
+ 'footer-start'?: (props: {}) => any;
302
304
  };
303
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));
304
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"
@@ -296,6 +296,8 @@ declare const __VLS_export: <S extends FormSchema, V extends object>(__VLS_props
296
296
  submit: () => Promise<boolean>;
297
297
  cancel: () => Promise<void>;
298
298
  }) => any;
299
+ } & {
300
+ 'footer-start'?: (props: {}) => any;
299
301
  };
300
302
  emit: (((evt: "close") => void) & ((evt: "delete") => void) & ((evt: "open") => void) & ((evt: "submitted") => void) & ((evt: "afterLeave") => void)) & ((event: "update:open", value: boolean) => void);
301
303
  }>) => import("vue").VNode & {
@@ -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
 
@@ -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",
@@ -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",
@@ -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",
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.105",
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)",