@xleddyl/443-components-vue 0.16.105 → 0.16.107
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 +31 -31
- package/README.md +1 -1
- package/dist/components/layout/AppShell.vue +18 -1
- package/dist/components/layout/NavLink.vue +18 -2
- package/dist/components/layout/NavLink.vue.d.ts +3 -3
- package/dist/components/layout/PageHeader.vue +30 -3
- package/dist/components/layout/PageHeader.vue.d.ts +9 -2
- package/dist/components/templates/FormDrawer.vue +2 -1
- package/dist/components/templates/FormDrawer.vue.d.ts +2 -0
- package/dist/components/templates/FormModal.vue +2 -1
- package/dist/components/templates/FormModal.vue.d.ts +2 -0
- package/dist/editor/TemplateEditor.vue +27 -2
- package/dist/editor/TemplateEditor.vue.d.ts +6 -2
- package/dist/editor/template-editor.css +2 -1
- package/dist/icons/builtin.d.ts +3 -0
- package/dist/icons/builtin.mjs +9 -0
- package/dist/internal/layout/NavGroup.vue +13 -2
- package/dist/internal/layout/NavGroup.vue.d.ts +2 -2
- package/dist/internal/overlays/DialogFrame.vue +9 -2
- package/dist/internal/overlays/dock.d.ts +2 -0
- package/dist/locale/de.mjs +3 -1
- package/dist/locale/en.mjs +3 -1
- package/dist/locale/it.mjs +3 -1
- package/dist/locale/types.d.ts +2 -0
- package/package.json +1 -1
package/CATALOG.md
CHANGED
|
@@ -253,7 +253,7 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
253
253
|
| Component | Purpose and when to use it | Main props, models, slots, events | Playground |
|
|
254
254
|
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
|
|
255
255
|
| `Card` | Container with optional title, description, icon, actions and footer. Can be a link or a selectable button. | Props: `title`, `description`, `icon`, `variant` (raised, outline, subtle, dashed: a centered add or empty tile), `padding`, `as`, `to`, `href`, `selected`, `disabled`, `disabledReason` (with `disabled` on a button or link card: it stays focusable with `aria-disabled`, ignores clicks and shows the reason in a tooltip and as its description), `animated`, `fill` (takes the rest of the parent height, the body is a scrolling flex column, the footer pinned at the bottom). Slots: default, `header`, `title`, `description`, `icon`, `actions`, `footer`. | `layout/card.vue` |
|
|
256
|
-
| `PageHeader` | Page title with description, breadcrumbs, badge and actions. The page templates include it. | Props: `title`, `description`, `icon`, `breadcrumbs` (small trail above the title), `trail` (the earlier levels as links: the title becomes a breadcrumb trail whose last item is the heading), `trailLabel`, `level`, `bordered`, `align`, `truncate` (one line; with a `trail` the title keeps a minimum width and the earlier crumbs truncate), `size` (`md`, `sm` for a panel or inspector header). Slots: `actions`, `badge`, `description`, `title`, `icon`, `breadcrumbs`.
|
|
256
|
+
| `PageHeader` | Page title with description, breadcrumbs, badge and actions. The page templates include it. | Props: `title`, `description`, `icon`, `breadcrumbs` (small trail above the title), `trail` (the earlier levels as links: the title becomes a breadcrumb trail whose last item is the heading), `trailLabel`, `level`, `bordered`, `align`, `truncate` (one line; with a `trail` the title keeps a minimum width and the earlier crumbs truncate), `size` (`md`, `sm` for a panel or inspector header), `dockToggle` (default `true`: on a page with a docked drawer in a wide shell, a button at the end of the actions detaches or docks the dock, `detachLabel`, `attachLabel`). Slots: `actions`, `badge`, `description`, `title`, `icon`, `breadcrumbs`. | `layout/page-header.vue` |
|
|
257
257
|
| `Breadcrumbs` | Path navigation. | Props: `items` (`label`, `to`, `href`, `icon`), `separator`, `linkLast`, `ancestors`, `size` (`sm` for panel headers, `md`, `lg` for a title sized trail), `heading` (the current item is a heading of that level). Slot: `item`. | `layout/breadcrumbs.vue` |
|
|
258
258
|
| `Stepper` | Step indicator for wizards and multi step flows (import, checkout). Horizontal or vertical, compact on narrow widths. | Model: `v-model` (current step value). Props: `steps` (`value`, `label`, `description`, `icon`, `disabled`, `state`: `complete` or `error`), `label`, `orientation`, `size`, `linear` (only completed and current steps clickable), `readonly`, `compact` (`'auto'` by default, `true`, `false`), `summary` (false hides the compact "Step 2 of 4" line), `positionLabel`, `completeLabel`, `errorLabel`. Event: `select`. | `layout/stepper.vue` |
|
|
259
259
|
| `Tabs` | Tabs with panels, badges and dots. Segmented or underline. | Model: `v-model` (active value). Props: `items` (`value`, `label`, `icon`, `color` (a palette name or hex, a dot before the label), `badge`, `badgeTone`, `dot`, `title` (a tooltip on hover and focus, also on a disabled tab; native `title` until mount), `disabled`), `variant`, `size`, `lazy`, `fill`, `stretch`, `inset`, `controls` (id of a panel outside the component: only the tab list renders). Slots: `panel-<value>`, `panel`. | `layout/tabs.vue` |
|
|
@@ -265,7 +265,7 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
265
265
|
| `Toolbar` | Group of controls with arrow key navigation (ARIA toolbar). | Props: `label`, `orientation`, `roving`, `bordered`. | `layout/toolbar.vue` |
|
|
266
266
|
| `CopyButton` | Button that copies a value and shows "copied". | Props: `value`, `label`, `copiedLabel`, `showLabel`, `size`, `variant`, `tone`, `resetAfter`. Event: `copy(success)`. | `layout/copy-button.vue` |
|
|
267
267
|
| `ThemeSwitch` | Light, dark and system switch. | Props: `variant` (segmented, icon), `size`, `showLabels`. | `layout/theme-switch.vue` |
|
|
268
|
-
| `NavLink` | One navigation link with icon, badge and active state. | Props: `label`, `to`, `href`, `icon`, `badge`, `active`, `match` (exact, prefix), `external`, `disabled`. Slots: default, `icon`.
|
|
268
|
+
| `NavLink` | One navigation link with icon, badge and active state. | Props: `label`, `to`, `href`, `icon`, `badge`, `active`, `match` (exact, prefix), `external`, `disabled`. In the collapsed rail the label shows as a tooltip on hover and focus (also for a group). Slots: default, `icon`. | `layout/nav-link.vue` |
|
|
269
269
|
| `AppShell` | App frame: sidebar, topbar, mobile menu, collapse, skip link. Use it for a custom frame. Use `DashboardLayout` for the ready one. | Models: `v-model:collapsed`, `v-model:open`. Props: `variant` (inset, sidebar, floating), `content` (`page`, `fill`, `centered`, `bleed`), `fluid`, `fill`, `topbar`, `storageKey` (collapsed state in the preferences store), `dockStorageKey`, `dockLabel`, `dockEmptyTitle`, `dockEmptyDescription`, `dockResizeLabel` (the dock of docked drawers on the right: shown while a page has a mounted `docked` drawer, empty state, resize handle, width in the preferences store under `dock:<key>`), `shortcut`, `loading` (hides the page content and shows a page skeleton, `aria-busy` on `main`), `loadingLabel`. Slots: default, `sidebar`, `topbar`, `overlays`, `loading` (replaces the default page skeleton). | `layout/app-shell.vue` |
|
|
270
270
|
| `Sidebar` | Sidebar content with header, collapse button and footer. Goes in the `sidebar` slot of `AppShell`. | Props: `label`, `collapsible`, `collapseLabel`, `brandAlign` (`start`, `center`). Icons `sidebar-collapse` and `sidebar-expand` for the collapse button. Slots: default, `header`, `top`, `footer`. | `layout/app-shell.vue` |
|
|
271
271
|
| `SidebarNav` | Navigation list from data, with groups and children. | Props: `items` (`NavItem[]` or `NavSection[]`: `label`, `to`, `icon`, `badge`, `children`), `currentPath`. | `layout/app-shell.vue` |
|
|
@@ -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
|
|
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`.
|
|
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`.
|
|
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`.
|
|
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`.
|
|
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`.
|
|
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`.
|
|
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>`.
|
|
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
|
|
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()`.
|
|
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`.
|
|
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`.
|
|
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`.
|
|
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`.
|
|
307
|
-
| `SettingsGroup` | Block with label, description and actions inside a settings section. | Props: `label`, `description`, `level`, `row`. Slots: default, `label`, `description`, `actions`.
|
|
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`.
|
|
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`.
|
|
310
|
-
| `SaveBar` | Floating bar with save and discard for unsaved changes. | Props: `visible`, `saving`, `message`, `saveLabel`, `discardLabel`, `form`. Slots: default, `actions`. Events: `save`, `discard`.
|
|
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`.
|
|
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`.
|
|
313
|
-
| `NotFoundPage` | 404 screen. | Props: `title`, `message`, `homeTo`, `homeLabel`, `backLabel`, `brandName`, `fill`, `onHome`. Slots: default, `actions`, `brand`.
|
|
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`.
|
|
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`.
|
|
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
|
|
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`.
|
|
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`.
|
|
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`.
|
|
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
|
@@ -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.
|
|
781
|
+
- `size` gives the width of the overlay mode only. The dock can be detached: every docked drawer of the app then opens as a normal overlay and no page shows the dock. Two buttons change it: one in the header of a docked drawer (icon `dock-window` while docked, `dock-attach` in the overlay) and one at the end of the actions of `PageHeader` (`dock-detach` or `dock-attach`, `dockToggle: false` hides it), shown on every page with a docked drawer in a wide shell, also while the drawer is closed. Labels `detachLabel` and `attachLabel`. Alias the icons like the sidebar ones (`k.icons.aliases: { 'dock-attach': 'lucide:panel-right-open', 'dock-detach': 'lucide:panel-right-close', 'dock-window': 'lucide:app-window' }`). 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.
|
|
@@ -277,6 +277,17 @@ const storedDock = computed(
|
|
|
277
277
|
const dockWidth = ref(storedDock.value.width ?? DOCK_WIDTH.initial);
|
|
278
278
|
const dockDetached = ref(storedDock.value.detached ?? false);
|
|
279
279
|
const dockResizing = ref(false);
|
|
280
|
+
const dockables = ref(0);
|
|
281
|
+
const dockAvailable = computed(() => dockables.value > 0 && dockWide.value);
|
|
282
|
+
function registerDockable() {
|
|
283
|
+
dockables.value += 1;
|
|
284
|
+
let registered = true;
|
|
285
|
+
return () => {
|
|
286
|
+
if (!registered) return;
|
|
287
|
+
registered = false;
|
|
288
|
+
dockables.value -= 1;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
280
291
|
const dockMax = computed(
|
|
281
292
|
() => Math.max(
|
|
282
293
|
DOCK_WIDTH.min,
|
|
@@ -316,7 +327,13 @@ useResizeObserver(
|
|
|
316
327
|
onBeforeUnmount(() => {
|
|
317
328
|
if (dockFrame.value && dockFrame.value === dockFrameRef.value) dockFrame.value = null;
|
|
318
329
|
});
|
|
319
|
-
provide(DOCK_KEY, {
|
|
330
|
+
provide(DOCK_KEY, {
|
|
331
|
+
target: dockSlot,
|
|
332
|
+
wide: dockWide,
|
|
333
|
+
detached: dockDetached,
|
|
334
|
+
available: dockAvailable,
|
|
335
|
+
register: registerDockable
|
|
336
|
+
});
|
|
320
337
|
provide(SHELL_KEY, {
|
|
321
338
|
sidebarId,
|
|
322
339
|
collapsed,
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
:bind="linkAttrs"
|
|
6
6
|
class="k-navlink"
|
|
7
7
|
:class="{ 'is-active': active, 'is-disabled': disabled }"
|
|
8
|
-
:title="rail ? label : void 0"
|
|
8
|
+
:title="rail && !mounted ? label : void 0"
|
|
9
9
|
:aria-label="railLabel"
|
|
10
10
|
@click="onClick"
|
|
11
|
+
@pointerenter="armHint"
|
|
12
|
+
@focusin="armHint"
|
|
11
13
|
>
|
|
12
14
|
<span v-if="icon || $slots.icon" class="k-navlink-icon" aria-hidden="true">
|
|
13
15
|
<slot name="icon"><Icon v-if="icon" :name="icon" /></slot>
|
|
@@ -18,13 +20,15 @@
|
|
|
18
20
|
<span v-if="badge !== void 0 && badge !== ''" class="k-navlink-badge">{{ badge }}</span>
|
|
19
21
|
<Icon v-if="external" name="arrow-right" class="k-navlink-external" />
|
|
20
22
|
<span v-if="external" class="k-visually-hidden">{{ t("common.opensInNewTab") }}</span>
|
|
23
|
+
<HintTooltip v-if="showHint" :text="label" placement="right" />
|
|
21
24
|
</Polymorphic>
|
|
22
25
|
</template>
|
|
23
26
|
|
|
24
27
|
<script setup>
|
|
25
28
|
import { linkHref } from "../../internal/core/link";
|
|
26
29
|
import { Polymorphic } from "../../internal/core/Polymorphic";
|
|
27
|
-
import { computed } from "vue";
|
|
30
|
+
import { computed, onMounted, ref, watch } from "vue";
|
|
31
|
+
import HintTooltip from "../../internal/overlays/HintTooltip.vue";
|
|
28
32
|
import { useAppShell } from "../../composables/useAppShell";
|
|
29
33
|
import { useLinkComponent } from "../../composables/useLink";
|
|
30
34
|
import { useLocale } from "../../composables/useLocale";
|
|
@@ -49,6 +53,18 @@ const railLabel = computed(() => {
|
|
|
49
53
|
if (!rail.value || !props.label) return void 0;
|
|
50
54
|
return props.external ? `${props.label} ${t("common.opensInNewTab")}` : props.label;
|
|
51
55
|
});
|
|
56
|
+
const mounted = ref(false);
|
|
57
|
+
const hintArmed = ref(false);
|
|
58
|
+
const showHint = computed(
|
|
59
|
+
() => rail.value && Boolean(props.label) && mounted.value && hintArmed.value
|
|
60
|
+
);
|
|
61
|
+
function armHint() {
|
|
62
|
+
if (rail.value && props.label) hintArmed.value = true;
|
|
63
|
+
}
|
|
64
|
+
watch(rail, (value) => {
|
|
65
|
+
if (!value) hintArmed.value = false;
|
|
66
|
+
});
|
|
67
|
+
onMounted(() => mounted.value = true);
|
|
52
68
|
const tag = computed(() => {
|
|
53
69
|
if (props.disabled) return "a";
|
|
54
70
|
if (props.to !== void 0 && linkComponent) return linkComponent;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { IconName } from '../../composables/useIcons';
|
|
2
2
|
import type { LinkTarget } from '../core/types';
|
|
3
|
-
declare var
|
|
3
|
+
declare var __VLS_11: {}, __VLS_18: {};
|
|
4
4
|
type __VLS_Slots = {} & {
|
|
5
|
-
icon?: (props: typeof
|
|
5
|
+
icon?: (props: typeof __VLS_11) => any;
|
|
6
6
|
} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_18) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: import("vue").DefineComponent<{
|
|
10
10
|
label?: string;
|
|
@@ -59,8 +59,20 @@
|
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
|
-
<div v-if="$slots.actions" class="k-page-header-actions">
|
|
62
|
+
<div v-if="$slots.actions || showDockToggle" class="k-page-header-actions">
|
|
63
63
|
<slot name="actions" />
|
|
64
|
+
<Button
|
|
65
|
+
v-if="showDockToggle"
|
|
66
|
+
variant="ghost"
|
|
67
|
+
tone="neutral"
|
|
68
|
+
size="sm"
|
|
69
|
+
square
|
|
70
|
+
class="k-page-header-dock"
|
|
71
|
+
:icon="dockDetached ? 'dock-attach' : 'dock-detach'"
|
|
72
|
+
:aria-label="dockDetached ? attachText : detachText"
|
|
73
|
+
:aria-pressed="dockDetached ? 'false' : 'true'"
|
|
74
|
+
@click="toggleDock"
|
|
75
|
+
/>
|
|
64
76
|
</div>
|
|
65
77
|
<div v-if="$slots.default" class="k-page-header-extra">
|
|
66
78
|
<slot />
|
|
@@ -69,7 +81,10 @@
|
|
|
69
81
|
</template>
|
|
70
82
|
|
|
71
83
|
<script setup>
|
|
72
|
-
import { computed } from "vue";
|
|
84
|
+
import { computed, inject } from "vue";
|
|
85
|
+
import { useLocale } from "../../composables/useLocale";
|
|
86
|
+
import { DOCK_KEY } from "../../internal/overlays/dock";
|
|
87
|
+
import Button from "../core/Button.vue";
|
|
73
88
|
import Icon from "../core/Icon.vue";
|
|
74
89
|
import Breadcrumbs from "./Breadcrumbs.vue";
|
|
75
90
|
const props = defineProps({
|
|
@@ -84,8 +99,20 @@ const props = defineProps({
|
|
|
84
99
|
bordered: { type: Boolean, required: false },
|
|
85
100
|
align: { type: String, required: false, default: "end" },
|
|
86
101
|
truncate: { type: Boolean, required: false },
|
|
87
|
-
size: { type: String, required: false, default: "md" }
|
|
102
|
+
size: { type: String, required: false, default: "md" },
|
|
103
|
+
dockToggle: { type: Boolean, required: false, default: true },
|
|
104
|
+
detachLabel: { type: String, required: false },
|
|
105
|
+
attachLabel: { type: String, required: false }
|
|
88
106
|
});
|
|
107
|
+
const { t } = useLocale();
|
|
108
|
+
const dockHost = inject(DOCK_KEY, null);
|
|
109
|
+
const showDockToggle = computed(() => Boolean(props.dockToggle && dockHost?.available.value));
|
|
110
|
+
const dockDetached = computed(() => Boolean(dockHost?.detached.value));
|
|
111
|
+
const detachText = computed(() => props.detachLabel ?? t("dock.detach"));
|
|
112
|
+
const attachText = computed(() => props.attachLabel ?? t("dock.attach"));
|
|
113
|
+
function toggleDock() {
|
|
114
|
+
if (dockHost) dockHost.detached.value = !dockHost.detached.value;
|
|
115
|
+
}
|
|
89
116
|
const trailItems = computed(() => [
|
|
90
117
|
...(props.trail ?? []).map(
|
|
91
118
|
(item) => props.truncate ? { ...item, attrs: { title: item.label, ...item.attrs } } : item
|
|
@@ -4,7 +4,7 @@ declare var __VLS_1: {}, __VLS_10: {
|
|
|
4
4
|
item: BreadcrumbItem;
|
|
5
5
|
index: number;
|
|
6
6
|
current: boolean;
|
|
7
|
-
}, __VLS_12: {}, __VLS_26: {}, __VLS_39: {}, __VLS_41: {}, __VLS_43: {}, __VLS_45: {},
|
|
7
|
+
}, __VLS_12: {}, __VLS_26: {}, __VLS_39: {}, __VLS_41: {}, __VLS_43: {}, __VLS_45: {}, __VLS_54: {};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
9
|
breadcrumbs?: (props: typeof __VLS_1) => any;
|
|
10
10
|
} & {
|
|
@@ -22,7 +22,7 @@ type __VLS_Slots = {} & {
|
|
|
22
22
|
} & {
|
|
23
23
|
actions?: (props: typeof __VLS_45) => any;
|
|
24
24
|
} & {
|
|
25
|
-
default?: (props: typeof
|
|
25
|
+
default?: (props: typeof __VLS_54) => any;
|
|
26
26
|
};
|
|
27
27
|
declare const __VLS_base: import("vue").DefineComponent<{
|
|
28
28
|
title?: string | undefined;
|
|
@@ -37,6 +37,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
37
37
|
align?: "start" | "center" | "end";
|
|
38
38
|
truncate?: boolean;
|
|
39
39
|
size?: PageHeaderSize;
|
|
40
|
+
dockToggle?: boolean;
|
|
41
|
+
detachLabel?: string;
|
|
42
|
+
attachLabel?: string;
|
|
40
43
|
innerHTML?: string | undefined | undefined;
|
|
41
44
|
class?: import("vue").ClassValue;
|
|
42
45
|
style?: import("vue").StyleValue;
|
|
@@ -241,6 +244,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
241
244
|
align?: "start" | "center" | "end";
|
|
242
245
|
truncate?: boolean;
|
|
243
246
|
size?: PageHeaderSize;
|
|
247
|
+
dockToggle?: boolean;
|
|
248
|
+
detachLabel?: string;
|
|
249
|
+
attachLabel?: string;
|
|
244
250
|
innerHTML?: string | undefined | undefined;
|
|
245
251
|
class?: import("vue").ClassValue;
|
|
246
252
|
style?: import("vue").StyleValue;
|
|
@@ -436,6 +442,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
436
442
|
size: PageHeaderSize;
|
|
437
443
|
align: "start" | "center" | "end";
|
|
438
444
|
level: HeadingLevel;
|
|
445
|
+
dockToggle: boolean;
|
|
439
446
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
440
447
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
441
448
|
declare const _default: typeof __VLS_export;
|
|
@@ -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 {
|
|
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
|
|
2
|
+
declare var __VLS_22: {
|
|
3
3
|
value: string | null;
|
|
4
4
|
};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
preview?: (props: typeof
|
|
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;
|
package/dist/icons/builtin.d.ts
CHANGED
|
@@ -74,6 +74,9 @@ export declare const builtinIcons: {
|
|
|
74
74
|
readonly cube: readonly ["m21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"];
|
|
75
75
|
readonly bolt: readonly ["m3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75L12 13.5z"];
|
|
76
76
|
readonly 'adjustments-horizontal': readonly ["M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"];
|
|
77
|
+
readonly 'dock-attach': readonly ["M3.75 5.25h16.5a1.5 1.5 0 0 1 1.5 1.5v10.5a1.5 1.5 0 0 1-1.5 1.5H3.75a1.5 1.5 0 0 1-1.5-1.5V6.75a1.5 1.5 0 0 1 1.5-1.5ZM15 5.25v13.5M10.5 9.75 8.25 12l2.25 2.25"];
|
|
78
|
+
readonly 'dock-detach': readonly ["M3.75 5.25h16.5a1.5 1.5 0 0 1 1.5 1.5v10.5a1.5 1.5 0 0 1-1.5 1.5H3.75a1.5 1.5 0 0 1-1.5-1.5V6.75a1.5 1.5 0 0 1 1.5-1.5ZM15 5.25v13.5M8.25 9.75 10.5 12l-2.25 2.25"];
|
|
79
|
+
readonly 'dock-window': readonly ["M3.75 5.25h16.5a1.5 1.5 0 0 1 1.5 1.5v10.5a1.5 1.5 0 0 1-1.5 1.5H3.75a1.5 1.5 0 0 1-1.5-1.5V6.75a1.5 1.5 0 0 1 1.5-1.5ZM2.25 9h19.5"];
|
|
77
80
|
readonly 'arrows-pointing-out': readonly ["M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"];
|
|
78
81
|
readonly 'arrows-pointing-in': readonly ["M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"];
|
|
79
82
|
readonly 'cursor-arrow-rays': readonly ["M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672ZM12 2.25V4.5m5.834.166-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243-1.59-1.59"];
|
package/dist/icons/builtin.mjs
CHANGED
|
@@ -176,6 +176,15 @@ export const builtinIcons = {
|
|
|
176
176
|
"adjustments-horizontal": [
|
|
177
177
|
"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"
|
|
178
178
|
],
|
|
179
|
+
"dock-attach": [
|
|
180
|
+
"M3.75 5.25h16.5a1.5 1.5 0 0 1 1.5 1.5v10.5a1.5 1.5 0 0 1-1.5 1.5H3.75a1.5 1.5 0 0 1-1.5-1.5V6.75a1.5 1.5 0 0 1 1.5-1.5ZM15 5.25v13.5M10.5 9.75 8.25 12l2.25 2.25"
|
|
181
|
+
],
|
|
182
|
+
"dock-detach": [
|
|
183
|
+
"M3.75 5.25h16.5a1.5 1.5 0 0 1 1.5 1.5v10.5a1.5 1.5 0 0 1-1.5 1.5H3.75a1.5 1.5 0 0 1-1.5-1.5V6.75a1.5 1.5 0 0 1 1.5-1.5ZM15 5.25v13.5M8.25 9.75 10.5 12l-2.25 2.25"
|
|
184
|
+
],
|
|
185
|
+
"dock-window": [
|
|
186
|
+
"M3.75 5.25h16.5a1.5 1.5 0 0 1 1.5 1.5v10.5a1.5 1.5 0 0 1-1.5 1.5H3.75a1.5 1.5 0 0 1-1.5-1.5V6.75a1.5 1.5 0 0 1 1.5-1.5ZM2.25 9h19.5"
|
|
187
|
+
],
|
|
179
188
|
"arrows-pointing-out": [
|
|
180
189
|
"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
|
|
181
190
|
],
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
:aria-haspopup="rail ? 'menu' : void 0"
|
|
14
14
|
:aria-expanded="(rail ? menuOpen : open) ? 'true' : 'false'"
|
|
15
15
|
:aria-controls="rail ? menuId : panelId"
|
|
16
|
-
:title="rail ? item.label : void 0"
|
|
16
|
+
:title="rail && !mounted ? item.label : void 0"
|
|
17
17
|
@click="onClick"
|
|
18
18
|
@keydown="onKeydown"
|
|
19
19
|
@pointerdown="onPointerDown"
|
|
20
|
+
@pointerenter="armHint"
|
|
21
|
+
@focusin="armHint"
|
|
20
22
|
>
|
|
21
23
|
<span v-if="item.icon" class="k-navlink-icon" aria-hidden="true">
|
|
22
24
|
<Icon :name="item.icon" />
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
{{ item.badge }}
|
|
27
29
|
</span>
|
|
28
30
|
<Icon name="chevron-right" class="k-navgroup-chevron" />
|
|
31
|
+
<HintTooltip v-if="showHint" :text="item.label" placement="right" />
|
|
29
32
|
</button>
|
|
30
33
|
<div :id="panelId" class="k-navgroup-panel" :inert="open && !rail ? void 0 : true">
|
|
31
34
|
<div class="k-navgroup-list">
|
|
@@ -47,8 +50,9 @@
|
|
|
47
50
|
</template>
|
|
48
51
|
|
|
49
52
|
<script setup>
|
|
50
|
-
import { computed, ref, useTemplateRef, watch } from "vue";
|
|
53
|
+
import { computed, onMounted, ref, useTemplateRef, watch } from "vue";
|
|
51
54
|
import Icon from "../../components/core/Icon.vue";
|
|
55
|
+
import HintTooltip from "../overlays/HintTooltip.vue";
|
|
52
56
|
import { useInvoker } from "../floating/trigger";
|
|
53
57
|
import MenuList from "../overlays/MenuList.vue";
|
|
54
58
|
import { menuTriggerHandlers } from "../overlays/menu";
|
|
@@ -64,6 +68,13 @@ const menuId = computed(() => `${props.panelId}-menu`);
|
|
|
64
68
|
const triggerRef = useTemplateRef("triggerRef");
|
|
65
69
|
const menuRef = useTemplateRef("menuRef");
|
|
66
70
|
const menuOpen = ref(false);
|
|
71
|
+
const mounted = ref(false);
|
|
72
|
+
const hintArmed = ref(false);
|
|
73
|
+
const showHint = computed(() => props.rail && !menuOpen.value && mounted.value && hintArmed.value);
|
|
74
|
+
function armHint() {
|
|
75
|
+
if (props.rail) hintArmed.value = true;
|
|
76
|
+
}
|
|
77
|
+
onMounted(() => mounted.value = true);
|
|
67
78
|
const railTrigger = computed(() => props.rail ? triggerRef.value : null);
|
|
68
79
|
const menuElement = computed(() => menuRef.value?.el ?? null);
|
|
69
80
|
function toMenuItem(item) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NavItem } from '../../components/layout/types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_16: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_16) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<{
|
|
7
7
|
item: NavItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Teleport :to="dockTarget" :disabled="!docked">
|
|
2
|
+
<Teleport :to="dockTarget ?? 'body'" :disabled="!docked">
|
|
3
3
|
<dialog
|
|
4
4
|
ref="dialogRef"
|
|
5
5
|
v-bind="$attrs"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<slot name="actions" :close="close" />
|
|
69
69
|
<Button
|
|
70
70
|
v-if="showDockToggle"
|
|
71
|
-
:icon="docked ? '
|
|
71
|
+
:icon="docked ? 'dock-window' : 'dock-attach'"
|
|
72
72
|
variant="ghost"
|
|
73
73
|
tone="neutral"
|
|
74
74
|
size="sm"
|
|
@@ -277,6 +277,13 @@ async function navigate(index) {
|
|
|
277
277
|
}
|
|
278
278
|
onMounted(() => {
|
|
279
279
|
mounted.value = true;
|
|
280
|
+
watch(
|
|
281
|
+
dockable,
|
|
282
|
+
(value, _previous, onCleanup) => {
|
|
283
|
+
if (value && dockHost) onCleanup(dockHost.register());
|
|
284
|
+
},
|
|
285
|
+
{ immediate: true }
|
|
286
|
+
);
|
|
280
287
|
if (dialogRef.value) setDialogScope(dialogRef.value, leave);
|
|
281
288
|
});
|
|
282
289
|
onBeforeUnmount(() => {
|
|
@@ -10,6 +10,8 @@ export interface DockHost {
|
|
|
10
10
|
target: Readonly<Ref<HTMLElement | null>>;
|
|
11
11
|
wide: Readonly<Ref<boolean>>;
|
|
12
12
|
detached: Ref<boolean>;
|
|
13
|
+
available: Readonly<Ref<boolean>>;
|
|
14
|
+
register: () => () => void;
|
|
13
15
|
}
|
|
14
16
|
export interface DockPreference {
|
|
15
17
|
width?: number;
|
package/dist/locale/de.mjs
CHANGED
|
@@ -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",
|
package/dist/locale/en.mjs
CHANGED
package/dist/locale/it.mjs
CHANGED
|
@@ -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",
|
package/dist/locale/types.d.ts
CHANGED
package/package.json
CHANGED