@xleddyl/443-components-vue 0.16.106 → 0.16.108

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
@@ -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`. | `layout/page-header.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), `dockToggle` (default `true`: while the dock is detached, on a page with a docked drawer in a wide shell, a button at the end of the actions docks it again, `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`. | `layout/nav-link.vue` |
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` |
package/README.md CHANGED
@@ -321,7 +321,7 @@ The Nuxt module still writes the theme (`k-theme`), the preset (`k-preset`) and
321
321
  `<KIcon name="..." />` resolves a name in this order:
322
322
 
323
323
  1. Icons registered with `createIcons()`, `provideIcons()`, `k.icons.dir` or `k.icons.aliases`. A registered name replaces a built-in one, so `k.icons.aliases: { 'x-mark': 'lucide:x' }` changes the close icon of every component.
324
- 2. The built-in Heroicons outline set (`builtinIcons`, the icons the components use).
324
+ 2. The built-in Heroicons outline set (`builtinIcons`, the icons the components use). A path of a built-in icon is a stroked string, or `{ d, fill: true }` for a filled part (the small panel of `sidebar-collapse`, `sidebar-expand` and `dock-attach`).
325
325
  3. Iconify collections, written `prefix:name` (`heroicons:newspaper`, `lucide:file-text`). Names without a prefix also try `k.icons.defaultCollection`.
326
326
 
327
327
  Collections come from the `@iconify-json/*` packages (or `@iconify/json`), installed in the host:
@@ -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. Every docked drawer has a dock button in the header (`detachLabel`, `attachLabel`): it detaches the whole dock, so every docked drawer of the app opens as a normal overlay and no page shows the dock, and the same button in the overlay docks them again. The choice is saved with the width (`dock:<dockStorageKey>`, `{ width, detached }`).
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. The header of a docked drawer has the detach button (icon `dock-detach`, a pop out); the header of the overlay and the end of the actions of `PageHeader` (only while detached, on a page with a docked drawer in a wide shell, `dockToggle: false` hides it) have the dock button (icon `dock-attach`, a frame with a small filled panel on the right). Labels `detachLabel` and `attachLabel`. 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.
@@ -905,7 +905,7 @@ Ready defaults to start a dashboard project: an app frame, an auth frame and pag
905
905
  | `variant` | `'inset'` | `inset` (canvas sidebar, inset content panel), `sidebar` (bordered sidebar, full bleed content), `floating` (raised sidebar card on the canvas). |
906
906
  | `navigation` | | `NavItem[]` or `NavSection[]` (`{ label?, items }`). Items: `label`, `to`/`href`, `icon`, `badge`, `exact`, `active`, `external`, `disabled`, `children`. |
907
907
  | `currentPath` | router path | Active state is computed from the router (`$route`) with prefix matching (`/` and `exact` items match exactly). |
908
- | `brandName`, `brandSubtitle`, `brandIcon`, `brandLogo`, `brandShowName`, `brandTo` | `brandTo: '/'` | `brandLogo` takes an image URL, inline SVG markup or a component; the name is hidden next to a logo unless `brandShowName`. Or the `#brand` slot. `brandAlign` (`'start'` or `'center'`) centers the brand in the expanded sidebar, with the collapse button on the right. The collapse button uses the icons `sidebar-collapse` and `sidebar-expand` (chevrons by default), so `k.icons.aliases: { 'sidebar-collapse': 'lucide:panel-left-close', 'sidebar-expand': 'lucide:panel-left-open' }` changes only that button. |
908
+ | `brandName`, `brandSubtitle`, `brandIcon`, `brandLogo`, `brandShowName`, `brandTo` | `brandTo: '/'` | `brandLogo` takes an image URL, inline SVG markup or a component; the name is hidden next to a logo unless `brandShowName`. Or the `#brand` slot. `brandAlign` (`'start'` or `'center'`) centers the brand in the expanded sidebar, with the collapse button on the right. The collapse button uses the icons `sidebar-collapse` and `sidebar-expand` (a frame with a small filled panel on the left by default), so `k.icons.aliases: { 'sidebar-collapse': 'lucide:panel-left-close', 'sidebar-expand': 'lucide:panel-left-open' }` changes only that button. |
909
909
  | `account` | | `{ name, email?, avatar?, role?, menu? }`. Shown as a row (avatar, name, email, chevron) at the bottom of the sidebar. |
910
910
  | `accountAction` | `'settings'` | `settings`: the row opens a `SettingsModal` (`settingsSections`, `settingsPresets`, `v-model:settings-open`, `v-model:settings-section`, `@sign-out`). `menu`: a DropdownMenu with `account.menu`, selections emit `account-select`. Or replace it with the `#account` slot. |
911
911
  | `settingsRoute`, `settingsResolvePage` | `false` | Sync the settings modal with the URL (`?settings=users/usr_123`): `true` uses the key `settings`, a string sets the key. `settingsRouteLocation: 'hash'` gives `#settings/users/usr_123`. `settingsAccountSection` renames the built-in account section. `settingsResolvePage(section, id, parents)` gives the label of a subpage restored from the URL. See SettingsModal. |
@@ -15,13 +15,15 @@
15
15
  stroke-width="1.5"
16
16
  >
17
17
  <title v-if="label">{{ label }}</title>
18
- <path
19
- v-for="path in resolved.paths"
20
- :key="path"
21
- :d="path"
22
- stroke-linecap="round"
23
- stroke-linejoin="round"
24
- />
18
+ <template v-for="path in resolved.paths" :key="typeof path === 'string' ? path : path.d">
19
+ <path
20
+ v-if="typeof path === 'string'"
21
+ :d="path"
22
+ stroke-linecap="round"
23
+ stroke-linejoin="round"
24
+ />
25
+ <path v-else :d="path.d" fill="currentColor" stroke="none" />
26
+ </template>
25
27
  </svg>
26
28
  <svg
27
29
  v-else-if="resolved?.kind === 'svg'"
@@ -15,6 +15,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
15
15
  class?: unknown;
16
16
  style?: unknown;
17
17
  modelValue?: ColorValue | "custom" | null | undefined;
18
+ search?: import("./types").ComboboxSearch<PaletteOptionValue> | undefined;
18
19
  key?: PropertyKey | undefined;
19
20
  loading?: boolean | undefined;
20
21
  prefix?: string | undefined | undefined;
@@ -22,7 +23,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
22
23
  value?: any;
23
24
  filter?: ((option: ComboboxOption<PaletteOptionValue>, query: string) => boolean) | undefined;
24
25
  form?: string | undefined | undefined;
25
- search?: import("./types").ComboboxSearch<PaletteOptionValue> | undefined;
26
26
  required?: boolean | undefined;
27
27
  min?: (string | number) | undefined;
28
28
  max?: (string | number) | undefined;
@@ -285,6 +285,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
285
285
  class?: unknown;
286
286
  style?: unknown;
287
287
  modelValue?: ColorValue | "custom" | null | undefined;
288
+ search?: import("./types").ComboboxSearch<PaletteOptionValue> | undefined;
288
289
  key?: PropertyKey | undefined;
289
290
  loading?: boolean | undefined;
290
291
  prefix?: string | undefined | undefined;
@@ -292,7 +293,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
292
293
  value?: any;
293
294
  filter?: ((option: ComboboxOption<PaletteOptionValue>, query: string) => boolean) | undefined;
294
295
  form?: string | undefined | undefined;
295
- search?: import("./types").ComboboxSearch<PaletteOptionValue> | undefined;
296
296
  required?: boolean | undefined;
297
297
  min?: (string | number) | undefined;
298
298
  max?: (string | number) | undefined;
@@ -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, { target: dockSlot, wide: dockWide, detached: dockDetached });
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 __VLS_9: {}, __VLS_16: {};
3
+ declare var __VLS_11: {}, __VLS_18: {};
4
4
  type __VLS_Slots = {} & {
5
- icon?: (props: typeof __VLS_9) => any;
5
+ icon?: (props: typeof __VLS_11) => any;
6
6
  } & {
7
- default?: (props: typeof __VLS_16) => any;
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,19 @@
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="dock-attach"
72
+ :aria-label="attachText"
73
+ @click="attachDock"
74
+ />
64
75
  </div>
65
76
  <div v-if="$slots.default" class="k-page-header-extra">
66
77
  <slot />
@@ -69,7 +80,10 @@
69
80
  </template>
70
81
 
71
82
  <script setup>
72
- import { computed } from "vue";
83
+ import { computed, inject } from "vue";
84
+ import { useLocale } from "../../composables/useLocale";
85
+ import { DOCK_KEY } from "../../internal/overlays/dock";
86
+ import Button from "../core/Button.vue";
73
87
  import Icon from "../core/Icon.vue";
74
88
  import Breadcrumbs from "./Breadcrumbs.vue";
75
89
  const props = defineProps({
@@ -84,8 +98,19 @@ const props = defineProps({
84
98
  bordered: { type: Boolean, required: false },
85
99
  align: { type: String, required: false, default: "end" },
86
100
  truncate: { type: Boolean, required: false },
87
- size: { type: String, required: false, default: "md" }
101
+ size: { type: String, required: false, default: "md" },
102
+ dockToggle: { type: Boolean, required: false, default: true },
103
+ attachLabel: { type: String, required: false }
88
104
  });
105
+ const { t } = useLocale();
106
+ const dockHost = inject(DOCK_KEY, null);
107
+ const showDockToggle = computed(
108
+ () => Boolean(props.dockToggle && dockHost?.available.value && dockHost.detached.value)
109
+ );
110
+ const attachText = computed(() => props.attachLabel ?? t("dock.attach"));
111
+ function attachDock() {
112
+ if (dockHost) dockHost.detached.value = false;
113
+ }
89
114
  const trailItems = computed(() => [
90
115
  ...(props.trail ?? []).map(
91
116
  (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: {}, __VLS_47: {};
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 __VLS_47) => any;
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,8 @@ 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
+ attachLabel?: string;
40
42
  innerHTML?: string | undefined | undefined;
41
43
  class?: import("vue").ClassValue;
42
44
  style?: import("vue").StyleValue;
@@ -241,6 +243,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
241
243
  align?: "start" | "center" | "end";
242
244
  truncate?: boolean;
243
245
  size?: PageHeaderSize;
246
+ dockToggle?: boolean;
247
+ attachLabel?: string;
244
248
  innerHTML?: string | undefined | undefined;
245
249
  class?: import("vue").ClassValue;
246
250
  style?: import("vue").StyleValue;
@@ -436,6 +440,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
436
440
  size: PageHeaderSize;
437
441
  align: "start" | "center" | "end";
438
442
  level: HeadingLevel;
443
+ dockToggle: boolean;
439
444
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
440
445
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
441
446
  declare const _default: typeof __VLS_export;
@@ -18,10 +18,10 @@ declare const __VLS_base: import("vue").DefineComponent<{
18
18
  hideCancel?: boolean;
19
19
  onConfirm?: () => unknown;
20
20
  open?: boolean | undefined;
21
+ fill?: boolean;
21
22
  key?: PropertyKey | undefined;
22
23
  loading?: boolean;
23
24
  prefix?: "k-modal" | "k-drawer" | undefined;
24
- fill?: boolean;
25
25
  size?: import("./types.ts").ModalSize;
26
26
  dock?: boolean;
27
27
  tabs?: import("../layout/types.ts").TabItem[];
@@ -262,10 +262,10 @@ declare const __VLS_base: import("vue").DefineComponent<{
262
262
  hideCancel?: boolean;
263
263
  onConfirm?: () => unknown;
264
264
  open?: boolean | undefined;
265
+ fill?: boolean;
265
266
  key?: PropertyKey | undefined;
266
267
  loading?: boolean;
267
268
  prefix?: "k-modal" | "k-drawer" | undefined;
268
- fill?: boolean;
269
269
  size?: import("./types.ts").ModalSize;
270
270
  dock?: boolean;
271
271
  tabs?: import("../layout/types.ts").TabItem[];
@@ -8,10 +8,10 @@ declare const __VLS_export: import("vue").DefineComponent<Partial<NonNullable<{
8
8
  readonly hideCancel?: boolean | undefined;
9
9
  readonly onConfirm?: (() => unknown) | undefined;
10
10
  readonly open?: boolean | undefined;
11
+ readonly fill?: boolean | undefined;
11
12
  readonly key?: PropertyKey | undefined;
12
13
  readonly loading?: boolean | undefined;
13
14
  readonly prefix?: "k-modal" | "k-drawer" | undefined;
14
- readonly fill?: boolean | undefined;
15
15
  readonly size?: import("./types.ts").ModalSize | undefined;
16
16
  readonly dock?: boolean | undefined;
17
17
  readonly tabs?: import("../layout/types.ts").TabItem[] | undefined;
@@ -248,10 +248,10 @@ declare const __VLS_export: import("vue").DefineComponent<Partial<NonNullable<{
248
248
  readonly hideCancel?: boolean | undefined;
249
249
  readonly onConfirm?: (() => unknown) | undefined;
250
250
  readonly open?: boolean | undefined;
251
+ readonly fill?: boolean | undefined;
251
252
  readonly key?: PropertyKey | undefined;
252
253
  readonly loading?: boolean | undefined;
253
254
  readonly prefix?: "k-modal" | "k-drawer" | undefined;
254
- readonly fill?: boolean | undefined;
255
255
  readonly size?: import("./types.ts").ModalSize | undefined;
256
256
  readonly dock?: boolean | undefined;
257
257
  readonly tabs?: import("../layout/types.ts").TabItem[] | undefined;
@@ -10,9 +10,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
10
10
  label?: string;
11
11
  disabled?: boolean;
12
12
  open?: boolean;
13
+ anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
13
14
  key?: PropertyKey | undefined;
14
15
  prefix?: string | undefined;
15
- anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
16
16
  title?: string | undefined;
17
17
  style?: import("vue").StyleValue;
18
18
  results?: (string | number) | undefined;
@@ -226,9 +226,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
226
226
  label?: string;
227
227
  disabled?: boolean;
228
228
  open?: boolean;
229
+ anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
229
230
  key?: PropertyKey | undefined;
230
231
  prefix?: string | undefined;
231
- anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
232
232
  title?: string | undefined;
233
233
  style?: import("vue").StyleValue;
234
234
  results?: (string | number) | undefined;
@@ -13,9 +13,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
13
13
  matchTriggerWidth?: boolean;
14
14
  minWidth?: string;
15
15
  open?: boolean;
16
+ anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
16
17
  key?: PropertyKey | undefined;
17
18
  prefix?: string | undefined;
18
- anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
19
19
  title?: string | undefined;
20
20
  style?: import("vue").StyleValue;
21
21
  results?: (string | number) | undefined;
@@ -230,9 +230,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
230
230
  matchTriggerWidth?: boolean;
231
231
  minWidth?: string;
232
232
  open?: boolean;
233
+ anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
233
234
  key?: PropertyKey | undefined;
234
235
  prefix?: string | undefined;
235
- anchor?: (() => import("./types").OverlayAnchorTarget | null | undefined) | undefined;
236
236
  title?: string | undefined;
237
237
  style?: import("vue").StyleValue;
238
238
  results?: (string | number) | undefined;
@@ -433,8 +433,8 @@ declare const __VLS_base: import("vue").DefineComponent<{
433
433
  ref_for?: boolean | undefined | undefined;
434
434
  ref_key?: string | undefined | undefined;
435
435
  }> & Readonly<{}>, {
436
- icon: IconName;
437
436
  fill: boolean;
437
+ icon: IconName;
438
438
  level: HeadingLevel;
439
439
  actionIcon: IconName;
440
440
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -52,10 +52,10 @@ declare const __VLS_base: import("vue").DefineComponent<{
52
52
  open?: boolean | undefined;
53
53
  section?: string;
54
54
  pages?: SettingsModalPage[];
55
+ fill?: boolean;
55
56
  key?: PropertyKey | undefined;
56
57
  loading?: boolean;
57
58
  prefix?: "k-modal" | "k-drawer" | undefined;
58
- fill?: boolean;
59
59
  size?: import("../overlays/types").ModalSize;
60
60
  dock?: boolean;
61
61
  tabs?: import("../layout/types.ts").TabItem[];
@@ -311,10 +311,10 @@ declare const __VLS_base: import("vue").DefineComponent<{
311
311
  open?: boolean | undefined;
312
312
  section?: string;
313
313
  pages?: SettingsModalPage[];
314
+ fill?: boolean;
314
315
  key?: PropertyKey | undefined;
315
316
  loading?: boolean;
316
317
  prefix?: "k-modal" | "k-drawer" | undefined;
317
- fill?: boolean;
318
318
  size?: import("../overlays/types").ModalSize;
319
319
  dock?: boolean;
320
320
  tabs?: import("../layout/types.ts").TabItem[];
@@ -21,9 +21,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
21
21
  saveLabel?: string;
22
22
  form?: string;
23
23
  level?: HeadingLevel;
24
+ fill?: boolean;
24
25
  key?: PropertyKey | undefined;
25
26
  prefix?: string | undefined;
26
- fill?: boolean;
27
27
  selected?: boolean;
28
28
  label?: string;
29
29
  style?: import("vue").StyleValue;
@@ -251,9 +251,9 @@ declare const __VLS_base: import("vue").DefineComponent<{
251
251
  saveLabel?: string;
252
252
  form?: string;
253
253
  level?: HeadingLevel;
254
+ fill?: boolean;
254
255
  key?: PropertyKey | undefined;
255
256
  prefix?: string | undefined;
256
- fill?: boolean;
257
257
  selected?: boolean;
258
258
  label?: string;
259
259
  style?: import("vue").StyleValue;
@@ -1,5 +1,5 @@
1
1
  import type { App, Component } from 'vue';
2
- import type { BuiltinIconName } from '../icons/builtin';
2
+ import type { BuiltinIconName, BuiltinIconPath } from '../icons/builtin';
3
3
  export { hasIconCollection, loadIconCollection, registerIconCollection, setDefaultIconCollection, } from '../icons/collections';
4
4
  export type { IconCollectionSource, IconifyCollection, IconifyIcon } from '../icons/collections';
5
5
  export type IconSource = Component | string;
@@ -11,7 +11,7 @@ export interface ParsedSvg {
11
11
  }
12
12
  export type ResolvedIcon = {
13
13
  kind: 'builtin';
14
- paths: readonly string[];
14
+ paths: readonly BuiltinIconPath[];
15
15
  } | {
16
16
  kind: 'component';
17
17
  component: Component;
@@ -1,3 +1,7 @@
1
+ export type BuiltinIconPath = string | {
2
+ readonly d: string;
3
+ readonly fill: true;
4
+ };
1
5
  export declare const builtinIcons: {
2
6
  readonly 'x-mark': readonly ["M6 18 18 6M6 6l12 12"];
3
7
  readonly check: readonly ["m4.5 12.75 6 6 9-13.5"];
@@ -7,8 +11,14 @@ export declare const builtinIcons: {
7
11
  readonly 'chevron-up': readonly ["m4.5 15.75 7.5-7.5 7.5 7.5"];
8
12
  readonly 'chevron-left': readonly ["M15.75 19.5 8.25 12l7.5-7.5"];
9
13
  readonly 'chevron-right': readonly ["m8.25 4.5 7.5 7.5-7.5 7.5"];
10
- readonly 'sidebar-collapse': readonly ["M15.75 19.5 8.25 12l7.5-7.5"];
11
- readonly 'sidebar-expand': readonly ["m8.25 4.5 7.5 7.5-7.5 7.5"];
14
+ readonly 'sidebar-collapse': 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.5Z", {
15
+ readonly d: "M5.25 7.5h2.25a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H5.25a.75.75 0 0 1-.75-.75v-7.5a.75.75 0 0 1 .75-.75Z";
16
+ readonly fill: true;
17
+ }];
18
+ readonly 'sidebar-expand': 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.5Z", {
19
+ readonly d: "M5.25 7.5h2.25a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H5.25a.75.75 0 0 1-.75-.75v-7.5a.75.75 0 0 1 .75-.75Z";
20
+ readonly fill: true;
21
+ }];
12
22
  readonly 'chevron-up-down': readonly ["M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"];
13
23
  readonly 'chevron-double-left': readonly ["m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"];
14
24
  readonly 'chevron-double-right': readonly ["m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"];
@@ -74,8 +84,11 @@ export declare const builtinIcons: {
74
84
  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
85
  readonly bolt: readonly ["m3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75L12 13.5z"];
76
86
  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 '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
- 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"];
87
+ 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.5Z", {
88
+ readonly d: "M16.5 7.5h2.25a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H16.5a.75.75 0 0 1-.75-.75v-7.5a.75.75 0 0 1 .75-.75Z";
89
+ readonly fill: true;
90
+ }];
91
+ readonly 'dock-detach': readonly ["M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"];
79
92
  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"];
80
93
  readonly 'rectangle-stack': readonly ["M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0q.354-.126.75-.128h10.5q.396.002.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.3 2.3 0 0 0-.75-.128H5.25q-.396.002-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122"];
81
94
  readonly sparkles: readonly ["M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09m8.445-7.188L18 9.75l-.259-1.035a3.38 3.38 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.38 3.38 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.38 3.38 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.38 3.38 0 0 0-2.456 2.456m-1.365 11.852L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183l.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394l-1.183.394a2.25 2.25 0 0 0-1.423 1.423"];
@@ -7,8 +7,20 @@ export const builtinIcons = {
7
7
  "chevron-up": ["m4.5 15.75 7.5-7.5 7.5 7.5"],
8
8
  "chevron-left": ["M15.75 19.5 8.25 12l7.5-7.5"],
9
9
  "chevron-right": ["m8.25 4.5 7.5 7.5-7.5 7.5"],
10
- "sidebar-collapse": ["M15.75 19.5 8.25 12l7.5-7.5"],
11
- "sidebar-expand": ["m8.25 4.5 7.5 7.5-7.5 7.5"],
10
+ "sidebar-collapse": [
11
+ "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.5Z",
12
+ {
13
+ d: "M5.25 7.5h2.25a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H5.25a.75.75 0 0 1-.75-.75v-7.5a.75.75 0 0 1 .75-.75Z",
14
+ fill: true
15
+ }
16
+ ],
17
+ "sidebar-expand": [
18
+ "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.5Z",
19
+ {
20
+ d: "M5.25 7.5h2.25a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H5.25a.75.75 0 0 1-.75-.75v-7.5a.75.75 0 0 1 .75-.75Z",
21
+ fill: true
22
+ }
23
+ ],
12
24
  "chevron-up-down": ["M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"],
13
25
  "chevron-double-left": ["m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"],
14
26
  "chevron-double-right": ["m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"],
@@ -176,11 +188,15 @@ export const builtinIcons = {
176
188
  "adjustments-horizontal": [
177
189
  "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
190
  ],
179
- "arrows-pointing-out": [
180
- "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"
191
+ "dock-attach": [
192
+ "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.5Z",
193
+ {
194
+ d: "M16.5 7.5h2.25a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-.75.75H16.5a.75.75 0 0 1-.75-.75v-7.5a.75.75 0 0 1 .75-.75Z",
195
+ fill: true
196
+ }
181
197
  ],
182
- "arrows-pointing-in": [
183
- "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"
198
+ "dock-detach": [
199
+ "M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"
184
200
  ],
185
201
  "cursor-arrow-rays": [
186
202
  "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"
@@ -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 __VLS_11: {};
2
+ declare var __VLS_16: {};
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_11) => any;
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 ? 'arrows-pointing-out' : 'arrows-pointing-in'"
71
+ :icon="docked ? 'dock-detach' : '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(() => {
@@ -1,10 +1,10 @@
1
1
  import type { OverlayEntry } from './stack';
2
2
  declare const __VLS_export: import("vue").DefineComponent<{
3
3
  entry: OverlayEntry;
4
+ fill?: boolean;
4
5
  key?: PropertyKey | undefined;
5
6
  loading?: boolean;
6
7
  prefix?: "k-modal" | "k-drawer" | undefined;
7
- fill?: boolean;
8
8
  size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
9
9
  dock?: boolean;
10
10
  tabs?: import("../../index.ts").TabItem[];
@@ -239,10 +239,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
239
239
  afterLeave: () => any;
240
240
  }, string, import("vue").PublicProps, Readonly<{
241
241
  entry: OverlayEntry;
242
+ fill?: boolean;
242
243
  key?: PropertyKey | undefined;
243
244
  loading?: boolean;
244
245
  prefix?: "k-modal" | "k-drawer" | undefined;
245
- fill?: boolean;
246
246
  size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
247
247
  dock?: boolean;
248
248
  tabs?: import("../../index.ts").TabItem[];
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.106",
3
+ "version": "0.16.108",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",