@dicehub/kappa 0.7.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/THIRD_PARTY_NOTICES.md +103 -1
  3. package/dist/{DropdownSubTrigger-DrZmNIcU.js → DropdownSubTrigger-DVOFK5Y1.js} +202 -146
  4. package/dist/DropdownSubTrigger-DVOFK5Y1.js.map +1 -0
  5. package/dist/PoweredByDicehub-DPceYF8f.js +143 -0
  6. package/dist/PoweredByDicehub-DPceYF8f.js.map +1 -0
  7. package/dist/{WorkspaceSwitcher-DBWdKZbM.js → WorkspaceSwitcher-DDAIMxeE.js} +5 -9
  8. package/dist/WorkspaceSwitcher-DDAIMxeE.js.map +1 -0
  9. package/dist/app-shell-PGvfb1aZ.js +570 -0
  10. package/dist/app-shell-PGvfb1aZ.js.map +1 -0
  11. package/dist/blocks/app-shell/AppShell.vue.d.ts +41 -0
  12. package/dist/blocks/app-shell/AppShellActions.vue.d.ts +3 -0
  13. package/dist/blocks/app-shell/AppShellAsideResizeHandle.vue.d.ts +20 -0
  14. package/dist/blocks/app-shell/AppShellPage.vue.d.ts +6 -0
  15. package/dist/blocks/app-shell/AppShellPanels.vue.d.ts +33 -0
  16. package/dist/blocks/app-shell/AppShellSearchDialog.vue.d.ts +10 -0
  17. package/dist/blocks/app-shell/AppShellSearchTrigger.vue.d.ts +7 -0
  18. package/dist/blocks/app-shell/AppShellToolbar.vue.d.ts +3 -0
  19. package/dist/blocks/app-shell/app-shell.d.ts +67 -0
  20. package/dist/blocks/app-shell/index.d.ts +19 -0
  21. package/dist/blocks/app-shell.js +2 -0
  22. package/dist/blocks/file-browser.js +1 -1
  23. package/dist/blocks/index.d.ts +1 -0
  24. package/dist/blocks/sidebar-layout/SidebarLayout.vue.d.ts +2 -0
  25. package/dist/blocks/sidebar-layout/sidebar-layout.d.ts +14 -2
  26. package/dist/blocks/sidebar-layout.js +1 -1
  27. package/dist/blocks/workspace-switcher/workspace-switcher.d.ts +2 -0
  28. package/dist/blocks/workspace-switcher.js +1 -1
  29. package/dist/{breadcrumbs-CIxUxZVD.js → breadcrumbs-CPfb83sY.js} +36 -41
  30. package/dist/{breadcrumbs-CIxUxZVD.js.map → breadcrumbs-CPfb83sY.js.map} +1 -1
  31. package/dist/button-Cst2B-9X.js +208 -0
  32. package/dist/button-Cst2B-9X.js.map +1 -0
  33. package/dist/{command-palette-BHFB86Gc.js → command-palette-BjXvHrd6.js} +178 -165
  34. package/dist/command-palette-BjXvHrd6.js.map +1 -0
  35. package/dist/components/breadcrumbs.js +1 -1
  36. package/dist/components/button/index.d.ts +2 -0
  37. package/dist/components/button/toolbar-button.d.ts +23 -0
  38. package/dist/components/button.js +2 -2
  39. package/dist/components/command-palette/CommandPaletteResultItem.vue.d.ts +1 -1
  40. package/dist/components/command-palette.js +1 -1
  41. package/dist/components/context-menu/ContextMenu.vue.d.ts +5 -5
  42. package/dist/components/context-menu.js +2 -2
  43. package/dist/components/data-grid.js +1 -1
  44. package/dist/components/date-picker/DatePicker.vue.d.ts +1 -1
  45. package/dist/components/dialog/Dialog.vue.d.ts +7 -7
  46. package/dist/components/dialog-layout/DialogLayoutAlert.vue.d.ts +3 -3
  47. package/dist/components/dicehub-logo/dicehub-logo.d.ts +17 -4
  48. package/dist/components/dicehub-logo/index.d.ts +1 -1
  49. package/dist/components/dicehub-logo.js +2 -2
  50. package/dist/components/drawer/Drawer.vue.d.ts +3 -3
  51. package/dist/components/dropdown/Dropdown.vue.d.ts +5 -5
  52. package/dist/components/dropdown/DropdownContent.vue.d.ts +1 -0
  53. package/dist/components/dropdown/DropdownSub.vue.d.ts +5 -5
  54. package/dist/components/dropdown/DropdownSubContent.vue.d.ts +1 -0
  55. package/dist/components/dropdown/dropdown.d.ts +2 -0
  56. package/dist/components/dropdown/use-dropdown-focus.d.ts +6 -0
  57. package/dist/components/dropdown.js +2 -2
  58. package/dist/components/filter-bar.js +1 -1
  59. package/dist/components/hover-card/HoverCard.vue.d.ts +2 -2
  60. package/dist/components/kbd.js +1 -1
  61. package/dist/components/loader/Loader.vue.d.ts +1 -1
  62. package/dist/components/matrix-loader/MatrixLoader.vue.d.ts +1 -1
  63. package/dist/components/menu-bar.js +1 -1
  64. package/dist/components/popover/Popover.vue.d.ts +7 -7
  65. package/dist/components/sidebar/SidebarProvider.vue.d.ts +1 -0
  66. package/dist/components/sidebar/index.d.ts +1 -1
  67. package/dist/components/sidebar/sidebar-resize.d.ts +1 -0
  68. package/dist/components/sidebar/sidebar.d.ts +5 -1
  69. package/dist/components/sidebar.js +1 -1
  70. package/dist/components/table/TableCheckCell.vue.d.ts +1 -1
  71. package/dist/components/table/TableCheckHead.vue.d.ts +1 -1
  72. package/dist/components/toolbar/ToolbarButton.vue.d.ts +5 -1
  73. package/dist/components/toolbar/index.d.ts +3 -2
  74. package/dist/components/toolbar/toolbar.d.ts +2 -3
  75. package/dist/components/toolbar.js +3 -2
  76. package/dist/components/tooltip/Tooltip.vue.d.ts +5 -5
  77. package/dist/{context-menu-B_noSd5p.js → context-menu-WmJWrUGu.js} +2 -2
  78. package/dist/{context-menu-B_noSd5p.js.map → context-menu-WmJWrUGu.js.map} +1 -1
  79. package/dist/{data-grid-CobgDr8q.js → data-grid-BQkLsfk0.js} +2 -2
  80. package/dist/{data-grid-CobgDr8q.js.map → data-grid-BQkLsfk0.js.map} +1 -1
  81. package/dist/{dropdown-Dedb1tk8.js → dropdown-BABKXjuz.js} +2 -2
  82. package/dist/{dropdown-Dedb1tk8.js.map → dropdown-BABKXjuz.js.map} +1 -1
  83. package/dist/{file-browser-CGqaz2eI.js → file-browser-BxOJWvrF.js} +5 -5
  84. package/dist/{file-browser-CGqaz2eI.js.map → file-browser-BxOJWvrF.js.map} +1 -1
  85. package/dist/{filter-bar-COAlDQE4.js → filter-bar-CAyW-YoF.js} +2 -2
  86. package/dist/{filter-bar-COAlDQE4.js.map → filter-bar-CAyW-YoF.js.map} +1 -1
  87. package/dist/index.js +104 -103
  88. package/dist/{KbdGroup-CNwqr4vX.js → kbd-CNwqr4vX.js} +1 -1
  89. package/dist/kbd-CNwqr4vX.js.map +1 -0
  90. package/dist/{menu-bar-C-qQn2L1.js → menu-bar-DPJllpvf.js} +2 -2
  91. package/dist/{menu-bar-C-qQn2L1.js.map → menu-bar-DPJllpvf.js.map} +1 -1
  92. package/dist/paneled-bottom.png +0 -0
  93. package/dist/paneled-side.png +0 -0
  94. package/dist/registry/component-registry.json +15 -6
  95. package/dist/registry/generated.d.ts +75 -9
  96. package/dist/{registry-BhOIvW4q.js → registry-Bgb2nbb2.js} +102 -8
  97. package/dist/registry-Bgb2nbb2.js.map +1 -0
  98. package/dist/registry.js +1 -1
  99. package/dist/{sidebar-tcrbUrk_.js → sidebar-9TqPqgDD.js} +178 -157
  100. package/dist/sidebar-9TqPqgDD.js.map +1 -0
  101. package/dist/{SidebarLayout-D9RT-MdT.js → sidebar-layout-DRe1HpSt.js} +65 -46
  102. package/dist/sidebar-layout-DRe1HpSt.js.map +1 -0
  103. package/dist/styles/kappa.css +1 -1
  104. package/dist/styles/theme-kappa.css +296 -1
  105. package/dist/styles/tokens.json +767 -0
  106. package/dist/{toolbar-DC-4XdHD.js → toolbar-DJsnox8t.js} +90 -146
  107. package/dist/toolbar-DJsnox8t.js.map +1 -0
  108. package/licenses/nunito.LICENSE +93 -0
  109. package/package.json +1 -1
  110. package/dist/DropdownSubTrigger-DrZmNIcU.js.map +0 -1
  111. package/dist/KbdGroup-CNwqr4vX.js.map +0 -1
  112. package/dist/PoweredByDicehub-BD-y1NZA.js +0 -92
  113. package/dist/PoweredByDicehub-BD-y1NZA.js.map +0 -1
  114. package/dist/SidebarLayout-D9RT-MdT.js.map +0 -1
  115. package/dist/WorkspaceSwitcher-DBWdKZbM.js.map +0 -1
  116. package/dist/button-DSgFcDoO.js +0 -128
  117. package/dist/button-DSgFcDoO.js.map +0 -1
  118. package/dist/command-palette-BHFB86Gc.js.map +0 -1
  119. package/dist/registry-BhOIvW4q.js.map +0 -1
  120. package/dist/sidebar-tcrbUrk_.js.map +0 -1
  121. package/dist/toolbar-DC-4XdHD.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"sidebar-tcrbUrk_.js","names":["$attrs","$attrs","$slots","$attrs","$slots","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$slots","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs","$attrs"],"sources":["../src/components/sidebar/sidebar-context.ts","../src/components/sidebar/sidebar-peek.ts","../src/components/sidebar/Sidebar.vue","../src/components/sidebar/Sidebar.vue","../src/components/sidebar/sidebar.ts","../src/components/sidebar/sidebar-resize.ts","../src/components/sidebar/SidebarProvider.vue","../src/components/sidebar/SidebarProvider.vue","../src/components/sidebar/SidebarContext.vue","../src/components/sidebar/SidebarContext.vue","../src/components/sidebar/SidebarTrigger.vue","../src/components/sidebar/SidebarTrigger.vue","../src/components/sidebar/SidebarClose.vue","../src/components/sidebar/SidebarClose.vue","../src/components/sidebar/SidebarHeader.vue","../src/components/sidebar/SidebarHeader.vue","../src/components/sidebar/SidebarFooter.vue","../src/components/sidebar/SidebarFooter.vue","../src/components/sidebar/SidebarContent.vue","../src/components/sidebar/SidebarContent.vue","../src/components/sidebar/SidebarGroup.vue","../src/components/sidebar/SidebarGroup.vue","../src/components/sidebar/SidebarGroupLabel.vue","../src/components/sidebar/SidebarGroupLabel.vue","../src/components/sidebar/SidebarMenu.vue","../src/components/sidebar/SidebarMenu.vue","../src/components/sidebar/SidebarMenuItem.vue","../src/components/sidebar/SidebarMenuItem.vue","../src/components/sidebar/SidebarMenuChild.ts","../src/components/sidebar/SidebarMenuButton.vue","../src/components/sidebar/SidebarMenuButton.vue","../src/components/sidebar/SidebarMenuSub.vue","../src/components/sidebar/SidebarMenuSub.vue","../src/components/sidebar/SidebarMenuSubItem.vue","../src/components/sidebar/SidebarMenuSubItem.vue","../src/components/sidebar/SidebarMenuLabel.vue","../src/components/sidebar/SidebarMenuLabel.vue","../src/components/sidebar/SidebarMenuBadge.vue","../src/components/sidebar/SidebarMenuBadge.vue","../src/components/sidebar/SidebarMenuChevron.vue","../src/components/sidebar/SidebarMenuChevron.vue","../src/components/sidebar/SidebarSeparator.vue","../src/components/sidebar/SidebarSeparator.vue","../src/components/sidebar/SidebarCollapsible.vue","../src/components/sidebar/SidebarCollapsible.vue","../src/components/sidebar/SidebarCollapsibleTrigger.vue","../src/components/sidebar/SidebarCollapsibleTrigger.vue","../src/components/sidebar/SidebarCollapsibleContent.vue","../src/components/sidebar/SidebarCollapsibleContent.vue","../src/components/sidebar/SidebarLoading.vue","../src/components/sidebar/SidebarLoading.vue","../src/components/sidebar/SidebarResizeControl.vue","../src/components/sidebar/SidebarResizeControl.vue","../src/components/sidebar/SidebarResizeHandle.vue","../src/components/sidebar/SidebarResizeHandle.vue","../src/components/sidebar/sidebar-sliding-context.ts","../src/components/sidebar/SidebarSlidingViews.vue","../src/components/sidebar/SidebarSlidingViews.vue","../src/components/sidebar/SidebarSlidingView.vue","../src/components/sidebar/SidebarSlidingView.vue","../src/components/sidebar/index.ts"],"sourcesContent":["import { inject, type ComputedRef, type InjectionKey, type UnwrapRef } from \"vue\";\nimport type { SidebarCollapsibleMode, SidebarSide, SidebarState } from \"./sidebar\";\n\nexport interface SidebarContext {\n open: ComputedRef<boolean>;\n mobileOpen: ComputedRef<boolean>;\n isMobile: ComputedRef<boolean>;\n state: ComputedRef<SidebarState>;\n iconCollapsed: ComputedRef<boolean>;\n peekable: ComputedRef<boolean>;\n isPeeking: ComputedRef<boolean>;\n resizable: ComputedRef<boolean>;\n isResizing: ComputedRef<boolean>;\n width: ComputedRef<number>;\n collapsible: ComputedRef<SidebarCollapsibleMode>;\n side: ComputedRef<SidebarSide>;\n compact: ComputedRef<boolean>;\n navId: ComputedRef<string>;\n contentId: ComputedRef<string>;\n dimensions: ComputedRef<Record<string, string>>;\n setOpen: (open: boolean) => void;\n setMobileOpen: (open: boolean) => void;\n toggle: () => void;\n rememberTrigger: (id: string) => void;\n focusTrigger: () => void;\n setPeekInteraction: (active: boolean) => void;\n setWidth: (width: number) => void;\n}\n\nexport type SidebarContextValue = UnwrapRef<SidebarContext>;\nexport const sidebarContextKey: InjectionKey<SidebarContext> = Symbol(\"KappaSidebar\");\n\nexport function useSidebarContext(): SidebarContext {\n const context = inject(sidebarContextKey);\n if (!context) throw new Error(\"[Kappa Sidebar] Parts must be inside Sidebar.Provider.\");\n return context;\n}\n","import { nextTick, onScopeDispose, watch, watchEffect, type Ref } from \"vue\";\nimport type { SidebarContext } from \"./sidebar-context\";\n\n/** Keep temporary navigation open across its trigger, gap, and owned popups. */\nexport function useSidebarPeek(nav: Ref<HTMLElement | undefined>, sidebar: SidebarContext) {\n watchEffect((onCleanup) => {\n const root = nav.value;\n if (!root || !sidebar.peekable.value || sidebar.isMobile.value || sidebar.collapsible.value === \"none\") return;\n const doc = root.ownerDocument;\n const offcanvas = sidebar.collapsible.value === \"offcanvas\";\n let pointerInside = false;\n let pointerTarget: EventTarget | null = null;\n let dismissed = false;\n let suspended = false;\n let disposed = false;\n let focusFrame: number | undefined;\n function contains(target: EventTarget | null): boolean {\n if (!(target instanceof Node)) return false;\n const visited = new Set<Element>();\n const areas: Element[] = [root!];\n while (areas.length) {\n const area = areas.pop()!;\n if (visited.has(area)) continue;\n visited.add(area);\n if (area.contains(target)) return true;\n for (const trigger of area.querySelectorAll('[aria-controls][aria-expanded=\"true\"]')) {\n for (const id of trigger.getAttribute(\"aria-controls\")!.split(/\\s+/)) {\n const popup = doc.getElementById(id);\n if (popup) areas.push(popup);\n }\n }\n }\n return false;\n }\n function containsPointer(target: EventTarget | null) {\n if (contains(target)) return true;\n if (!offcanvas || !(target instanceof Element)) return false;\n const trigger = target.closest('[data-slot=\"sidebar-trigger\"][data-peek]:not(:disabled):not([aria-disabled=\"true\"]):not([data-disabled])');\n return trigger?.getAttribute(\"aria-controls\") === sidebar.navId.value;\n }\n function update() {\n if (disposed) return;\n const popupOpen = root!.querySelector('[aria-haspopup]:not([aria-haspopup=\"false\"])[aria-controls][aria-expanded=\"true\"]') !== null;\n const active = pointerInside || contains(doc.activeElement) || popupOpen;\n if (!active) dismissed = false;\n sidebar.setPeekInteraction(active && !dismissed && !suspended);\n }\n function onPointerOver(event: PointerEvent) {\n if (event.pointerType === \"touch\") return;\n suspended = false;\n pointerTarget = event.target;\n pointerInside = containsPointer(pointerTarget);\n if (focusFrame === undefined) update();\n }\n function onPointerOut(event: PointerEvent) {\n if (event.pointerType === \"touch\") return;\n pointerTarget = event.relatedTarget;\n pointerInside = containsPointer(pointerTarget);\n if (focusFrame === undefined) update();\n }\n function onFocus() {\n if (!doc.hasFocus()) return;\n suspended = false;\n update();\n }\n function onFocusOut() {\n // Popup effects settle on a frame, then return focus after deactivation.\n if (focusFrame !== undefined) doc.defaultView?.cancelAnimationFrame(focusFrame);\n focusFrame = doc.defaultView?.requestAnimationFrame(() => {\n focusFrame = doc.defaultView?.requestAnimationFrame(() => { focusFrame = undefined; update(); });\n });\n }\n function onBlur() {\n suspended = true;\n if (focusFrame !== undefined) doc.defaultView?.cancelAnimationFrame(focusFrame);\n focusFrame = undefined;\n pointerTarget = null;\n pointerInside = false;\n sidebar.setPeekInteraction(false);\n }\n async function onKeydown(event: KeyboardEvent) {\n if (event.key !== \"Escape\" || event.defaultPrevented || !sidebar.isPeeking.value) return;\n const layer = event.target instanceof Element ? event.target.closest('[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"]') : null;\n if (layer && !root!.contains(layer)) return;\n // A nested popup owns its first Escape. Hover-only peeks can be dismissed\n // even while focus remains in the page behind the rail.\n if (root!.querySelector('[aria-haspopup]:not([aria-haspopup=\"false\"])[aria-expanded=\"true\"]')) return;\n const active = doc.activeElement;\n const hadFocus = contains(active);\n const section = active instanceof Element && root!.contains(active) ? active.closest('[data-slot=\"sidebar-collapsible\"]') : null;\n dismissed = true;\n sidebar.setPeekInteraction(false);\n event.preventDefault();\n await nextTick();\n // Nested links become hidden; leave their focus on the visible disclosure.\n if (offcanvas && hadFocus) sidebar.focusTrigger();\n else section?.querySelector<HTMLElement>('[data-scope=\"collapsible\"][data-part=\"trigger\"]')?.focus({ preventScroll: true });\n }\n const stopOpen = watch(sidebar.open, (open, previous) => {\n if (!open && previous) { dismissed = true; sidebar.setPeekInteraction(false); }\n else if (open) dismissed = false;\n }, { flush: \"sync\" });\n // A trigger can be disabled or lose its peek prop without pointer movement.\n const triggers = new MutationObserver((changes) => {\n pointerInside = containsPointer(pointerTarget);\n if (changes.some(change => change.attributeName === \"aria-expanded\" && contains(change.target))) {\n onFocusOut();\n } else if (focusFrame === undefined) update();\n });\n if (offcanvas) triggers.observe(doc.documentElement, { subtree: true, attributes: true,\n attributeFilter: [\"data-peek\", \"disabled\", \"aria-disabled\", \"data-disabled\", \"aria-expanded\"] });\n doc.addEventListener(\"pointerover\", onPointerOver);\n doc.addEventListener(\"pointerout\", onPointerOut);\n doc.addEventListener(\"focusin\", onFocus);\n doc.addEventListener(\"focusout\", onFocusOut);\n doc.addEventListener(\"keydown\", onKeydown);\n doc.defaultView?.addEventListener(\"blur\", onBlur);\n doc.defaultView?.addEventListener(\"focus\", onFocus);\n update();\n onCleanup(() => {\n disposed = true;\n if (focusFrame !== undefined) doc.defaultView?.cancelAnimationFrame(focusFrame);\n doc.removeEventListener(\"pointerover\", onPointerOver);\n doc.removeEventListener(\"pointerout\", onPointerOut);\n doc.removeEventListener(\"focusin\", onFocus);\n doc.removeEventListener(\"focusout\", onFocusOut);\n doc.removeEventListener(\"keydown\", onKeydown);\n doc.defaultView?.removeEventListener(\"blur\", onBlur);\n doc.defaultView?.removeEventListener(\"focus\", onFocus);\n stopOpen();\n triggers.disconnect();\n sidebar.setPeekInteraction(false);\n });\n });\n onScopeDispose(() => sidebar.setPeekInteraction(false));\n}\n","<script setup lang=\"ts\">\nimport { Drawer as ArkDrawer } from \"@ark-ui/vue/drawer\";\nimport { DEFAULT_LOCALE, useLocaleContext } from \"@ark-ui/vue/locale\";\nimport { computed, ref, Teleport } from \"vue\";\nimport type { SidebarProps, SidebarSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\nimport { useSidebarPeek } from \"./sidebar-peek\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarProps>(), { label: \"Main navigation\", fullScreenOnMobile: false });\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\nconst locale = useLocaleContext(DEFAULT_LOCALE);\nconst nav = ref<HTMLElement>();\nuseSidebarPeek(nav, sidebar);\nconst navProps = computed(() => ({\n id: sidebar.navId.value,\n \"aria-label\": props.label,\n \"data-state\": sidebar.isMobile.value ? \"expanded\" : sidebar.state.value,\n \"data-side\": sidebar.side.value,\n \"data-collapsible\": sidebar.collapsible.value,\n \"data-compact\": sidebar.compact.value ? \"\" : undefined,\n \"data-mobile\": sidebar.isMobile.value ? \"\" : undefined,\n \"data-peekable\": sidebar.peekable.value ? \"\" : undefined,\n \"data-resizing\": sidebar.isResizing.value ? \"\" : undefined,\n style: sidebar.dimensions.value,\n}));\n</script>\n\n<template>\n <Teleport v-if=\"sidebar.isMobile.value\" to=\"body\">\n <ArkDrawer.Backdrop class=\"kappa-sidebar__backdrop\" data-slot=\"sidebar-backdrop\" />\n <ArkDrawer.Positioner class=\"kappa-sidebar__positioner\" :dir=\"locale.dir\">\n <ArkDrawer.Content\n class=\"kappa-sidebar__dialog\"\n data-slot=\"sidebar-dialog\"\n :aria-label=\"props.label\"\n :draggable=\"false\"\n :dir=\"locale.dir\"\n :data-full-screen=\"props.fullScreenOnMobile ? '' : undefined\"\n :style=\"sidebar.dimensions.value\"\n >\n <nav v-bind=\"{ ...navProps, ...$attrs, id: sidebar.navId.value }\" class=\"kappa-sidebar\" data-slot=\"sidebar\">\n <slot />\n </nav>\n </ArkDrawer.Content>\n </ArkDrawer.Positioner>\n </Teleport>\n <div\n v-else\n class=\"kappa-sidebar__shell\"\n :data-state=\"sidebar.state.value\"\n :data-side=\"sidebar.side.value\"\n :data-collapsible=\"sidebar.collapsible.value\"\n :data-peekable=\"sidebar.peekable.value ? '' : undefined\"\n :data-resizing=\"sidebar.isResizing.value ? '' : undefined\"\n >\n <nav\n ref=\"nav\"\n v-bind=\"{ ...navProps, ...$attrs, id: sidebar.navId.value }\"\n class=\"kappa-sidebar\"\n data-slot=\"sidebar\"\n :inert=\"sidebar.collapsible.value === 'offcanvas' && sidebar.state.value === 'collapsed' ? true : undefined\"\n :aria-hidden=\"sidebar.collapsible.value === 'offcanvas' && sidebar.state.value === 'collapsed' ? true : undefined\"\n ><slot /></nav>\n </div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Drawer as ArkDrawer } from \"@ark-ui/vue/drawer\";\nimport { DEFAULT_LOCALE, useLocaleContext } from \"@ark-ui/vue/locale\";\nimport { computed, ref, Teleport } from \"vue\";\nimport type { SidebarProps, SidebarSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\nimport { useSidebarPeek } from \"./sidebar-peek\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarProps>(), { label: \"Main navigation\", fullScreenOnMobile: false });\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\nconst locale = useLocaleContext(DEFAULT_LOCALE);\nconst nav = ref<HTMLElement>();\nuseSidebarPeek(nav, sidebar);\nconst navProps = computed(() => ({\n id: sidebar.navId.value,\n \"aria-label\": props.label,\n \"data-state\": sidebar.isMobile.value ? \"expanded\" : sidebar.state.value,\n \"data-side\": sidebar.side.value,\n \"data-collapsible\": sidebar.collapsible.value,\n \"data-compact\": sidebar.compact.value ? \"\" : undefined,\n \"data-mobile\": sidebar.isMobile.value ? \"\" : undefined,\n \"data-peekable\": sidebar.peekable.value ? \"\" : undefined,\n \"data-resizing\": sidebar.isResizing.value ? \"\" : undefined,\n style: sidebar.dimensions.value,\n}));\n</script>\n\n<template>\n <Teleport v-if=\"sidebar.isMobile.value\" to=\"body\">\n <ArkDrawer.Backdrop class=\"kappa-sidebar__backdrop\" data-slot=\"sidebar-backdrop\" />\n <ArkDrawer.Positioner class=\"kappa-sidebar__positioner\" :dir=\"locale.dir\">\n <ArkDrawer.Content\n class=\"kappa-sidebar__dialog\"\n data-slot=\"sidebar-dialog\"\n :aria-label=\"props.label\"\n :draggable=\"false\"\n :dir=\"locale.dir\"\n :data-full-screen=\"props.fullScreenOnMobile ? '' : undefined\"\n :style=\"sidebar.dimensions.value\"\n >\n <nav v-bind=\"{ ...navProps, ...$attrs, id: sidebar.navId.value }\" class=\"kappa-sidebar\" data-slot=\"sidebar\">\n <slot />\n </nav>\n </ArkDrawer.Content>\n </ArkDrawer.Positioner>\n </Teleport>\n <div\n v-else\n class=\"kappa-sidebar__shell\"\n :data-state=\"sidebar.state.value\"\n :data-side=\"sidebar.side.value\"\n :data-collapsible=\"sidebar.collapsible.value\"\n :data-peekable=\"sidebar.peekable.value ? '' : undefined\"\n :data-resizing=\"sidebar.isResizing.value ? '' : undefined\"\n >\n <nav\n ref=\"nav\"\n v-bind=\"{ ...navProps, ...$attrs, id: sidebar.navId.value }\"\n class=\"kappa-sidebar\"\n data-slot=\"sidebar\"\n :inert=\"sidebar.collapsible.value === 'offcanvas' && sidebar.state.value === 'collapsed' ? true : undefined\"\n :aria-hidden=\"sidebar.collapsible.value === 'offcanvas' && sidebar.state.value === 'collapsed' ? true : undefined\"\n ><slot /></nav>\n </div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","import type { Component, VNodeChild } from \"vue\";\nimport type { CollapsibleRootProps } from \"@ark-ui/vue/collapsible\";\n\nexport const SIDEBAR_DEFAULTS = {\n defaultOpen: true,\n defaultMobileOpen: false,\n collapsible: \"icon\",\n side: \"start\",\n compact: false,\n mobileBreakpoint: 768,\n width: \"16.25rem\",\n collapsedWidth: \"3.25rem\",\n mobileWidth: \"18rem\",\n resizable: false,\n collapseOnResize: true,\n defaultWidth: 260,\n minWidth: 180,\n maxWidth: 400,\n peekable: false,\n} as const;\n\nexport type SidebarSide = \"start\" | \"end\";\nexport type SidebarCollapsibleMode = \"icon\" | \"offcanvas\" | \"none\";\nexport type SidebarState = \"expanded\" | \"collapsed\" | \"peeking\";\n\nexport interface SidebarProviderProps {\n id?: string;\n open?: boolean;\n defaultOpen?: boolean;\n mobileOpen?: boolean;\n defaultMobileOpen?: boolean;\n /** Desktop collapse mode. Mobile always uses a modal drawer. */\n collapsible?: SidebarCollapsibleMode;\n side?: SidebarSide;\n compact?: boolean;\n /** Viewport widths below this value use the mobile drawer. Zero disables it. */\n mobileBreakpoint?: number;\n width?: string;\n collapsedWidth?: string;\n mobileWidth?: string;\n /** Enable the desktop edge separator. Add Sidebar.ResizeHandle inside Root. */\n resizable?: boolean;\n /** Allow the resize separator to collapse navigation. Triggers remain independent. */\n collapseOnResize?: boolean;\n /** Controlled expanded resize width, in pixels. Used only with resizable. */\n resizeWidth?: number;\n defaultWidth?: number;\n minWidth?: number;\n maxWidth?: number;\n /** Temporarily reveal collapsed desktop navigation without changing open. */\n peekable?: boolean;\n}\n\nexport interface SidebarOpenChangeDetails { open: boolean }\nexport interface SidebarResizeDetails { width: number }\nexport type SidebarProviderEmits = {\n \"update:open\": [open: boolean];\n openChange: [details: SidebarOpenChangeDetails];\n \"update:mobileOpen\": [open: boolean];\n mobileOpenChange: [details: SidebarOpenChangeDetails];\n \"update:resizeWidth\": [width: number];\n resize: [details: SidebarResizeDetails];\n resizeEnd: [details: SidebarResizeDetails];\n};\nexport interface SidebarSlots { default?: () => VNodeChild }\nexport type SidebarProviderSlots = SidebarSlots;\nexport interface SidebarProps {\n /** Accessible name for both the navigation landmark and mobile dialog. */\n label?: string;\n fullScreenOnMobile?: boolean;\n}\nexport type SidebarRootProps = SidebarProps;\nexport type SidebarRootSlots = SidebarSlots;\nexport interface SidebarPartProps { asChild?: boolean }\nexport interface SidebarTriggerProps extends SidebarPartProps {\n /** Reveal a peekable offcanvas Sidebar on pointer hover. Click pins it open. */\n peek?: boolean;\n expandLabel?: string;\n collapseLabel?: string;\n openLabel?: string;\n closeLabel?: string;\n disabled?: boolean;\n}\nexport interface SidebarCloseProps extends SidebarPartProps { label?: string }\nexport interface SidebarMenuButtonProps extends SidebarPartProps {\n /** A native anchor is rendered when href is present. */\n href?: string;\n active?: boolean;\n disabled?: boolean;\n icon?: Component;\n /** Optional collapsed-rail tooltip. Slot text remains accessible without it. */\n tooltip?: string;\n}\nexport interface SidebarMenuButtonSlots extends SidebarSlots {\n icon?: () => VNodeChild;\n}\nexport interface SidebarCollapsibleProps {\n open?: boolean;\n defaultOpen?: boolean;\n disabled?: boolean;\n id?: string;\n}\nexport type SidebarCollapsibleEmits = {\n \"update:open\": [open: boolean];\n openChange: [details: SidebarOpenChangeDetails];\n};\nexport interface SidebarCollapsibleContentProps extends SidebarPartProps {}\nexport type SidebarCollapsibleTriggerProps = Pick<CollapsibleRootProps, \"asChild\">;\nexport interface SidebarLoadingProps { rows?: number; label?: string }\nexport interface SidebarResizeHandleProps { label?: string; disabled?: boolean }\nexport interface SidebarSlidingViewsProps {\n activeKey: string;\n /** Physical direction of the incoming view. Reverse it for back navigation. */\n direction?: \"left\" | \"right\";\n}\nexport interface SidebarSlidingViewProps { value: string; label?: string }\n\nexport function resolveSidebarWidthBounds(min: number, max: number) {\n const minWidth = Number.isFinite(min) ? Math.max(1, min) : SIDEBAR_DEFAULTS.minWidth;\n const maxWidth = Number.isFinite(max) ? Math.max(minWidth, max) : Math.max(minWidth, SIDEBAR_DEFAULTS.maxWidth);\n return { minWidth, maxWidth };\n}\n\nexport function clampSidebarWidth(value: number, min: number, max: number) {\n const { minWidth, maxWidth } = resolveSidebarWidthBounds(min, max);\n return Math.min(maxWidth, Math.max(minWidth, Number.isFinite(value) ? value : SIDEBAR_DEFAULTS.defaultWidth));\n}\n\nexport function resolveSidebarBreakpoint(value: number): number {\n return Number.isFinite(value) ? Math.max(0, value) : SIDEBAR_DEFAULTS.mobileBreakpoint;\n}\n\nexport function resolveSidebarLoadingRows(value: number): number {\n return Number.isFinite(value) ? Math.min(20, Math.max(1, Math.floor(value))) : 5;\n}\n","import type { UseSplitterProps } from \"@ark-ui/vue/splitter\";\nimport { DEFAULT_LOCALE, useLocaleContext } from \"@ark-ui/vue/locale\";\nimport { computed, inject, onMounted, onScopeDispose, provide, ref, type ComputedRef, type InjectionKey, type Ref } from \"vue\";\nimport { clampSidebarWidth, resolveSidebarWidthBounds, type SidebarProviderProps } from \"./sidebar\";\n\ninterface ResizeOptions {\n layout: Ref<HTMLElement | undefined>;\n id: ComputedRef<string>;\n navId: ComputedRef<string>;\n open: ComputedRef<boolean>;\n isMobile: ComputedRef<boolean>;\n setOpen: (open: boolean) => void;\n onResize: (width: number) => void;\n onResizeEnd: (width: number) => void;\n}\ninterface ResizeContext {\n props: ComputedRef<UseSplitterProps>;\n handleId: ComputedRef<\"navigation:remainder\" | \"remainder:navigation\">;\n range: ComputedRef<{ min: number; max: number; collapsed: number }>;\n canCollapse: ComputedRef<boolean>;\n setIsResizing: (value: boolean) => void;\n}\nconst resizeKey: InjectionKey<ResizeContext> = Symbol(\"KappaSidebarResize\");\nexport const useSidebarResizeContext = () => inject(resizeKey)!;\n\n/** Adapt Ark's two-panel size model to Sidebar's pixel width and ordinary flex remainder.\n * The separator controls only the real navigation element; no extra application wrapper is required.\n * Ark retains pointer capture, keyboard handling, collapse thresholds, and drag cleanup.\n * Use physical left/right panel order in an LTR resize scope: the installed Splitter\n * flips RTL keys but not pointer deltas. Navigation keeps the application's locale.\n */\nexport function useSidebarResize(props: Required<Pick<SidebarProviderProps, \"defaultWidth\" | \"minWidth\" | \"maxWidth\" | \"collapsedWidth\">> & SidebarProviderProps, options: ResizeOptions) {\n const internalWidth = ref(props.defaultWidth);\n const locale = useLocaleContext(DEFAULT_LOCALE);\n const resizing = ref(false);\n const groupWidth = ref(0);\n const bounds = computed(() => resolveSidebarWidthBounds(props.minWidth, props.maxWidth));\n const width = computed(() => Math.min(groupWidth.value || Infinity, clampSidebarWidth(props.resizeWidth ?? internalWidth.value, bounds.value.minWidth, bounds.value.maxWidth)));\n const enabled = computed(() => !!props.resizable && !options.isMobile.value);\n const canCollapse = computed(() => props.collapseOnResize !== false && props.collapsible !== \"none\");\n const sidebarIndex = computed(() => (props.side === \"end\") !== (locale.value.dir === \"rtl\") ? 1 : 0);\n const handleId = computed(() => sidebarIndex.value ? \"remainder:navigation\" as const : \"navigation:remainder\" as const);\n const collapsedPixels = ref(52);\n const range = computed(() => {\n const collapsed = props.collapsible === \"offcanvas\" ? 0 : Math.min(collapsedPixels.value, bounds.value.minWidth);\n return { min: canCollapse.value ? collapsed : bounds.value.minWidth, max: Math.min(groupWidth.value || Infinity, bounds.value.maxWidth), collapsed };\n });\n let observer: ResizeObserver | undefined;\n\n function measure() {\n const root = options.layout.value;\n if (!root) return;\n groupWidth.value = root.getBoundingClientRect().width;\n // Resolve arbitrary CSS rail lengths through layout, not a second CSS parser.\n const ruler = root.querySelector<HTMLElement>('[data-slot=\"sidebar-width-measure\"]');\n if (ruler) collapsedPixels.value = ruler.getBoundingClientRect().width;\n }\n onMounted(() => {\n measure();\n observer = new ResizeObserver(measure);\n if (options.layout.value) observer.observe(options.layout.value);\n const ruler = options.layout.value?.querySelector('[data-slot=\"sidebar-width-measure\"]');\n if (ruler) observer.observe(ruler);\n });\n onScopeDispose(() => observer?.disconnect());\n\n function setWidth(value: number) {\n const next = clampSidebarWidth(value, bounds.value.minWidth, bounds.value.maxWidth);\n if (Math.abs(next - width.value) < 0.01) return;\n if (props.resizeWidth === undefined) internalWidth.value = next;\n options.onResize(next);\n }\n\n const splitterProps = computed<UseSplitterProps>(() => {\n const collapsed = props.collapsible === \"offcanvas\" ? 0 : Math.min(collapsedPixels.value, bounds.value.minWidth);\n const current = options.open.value ? width.value : collapsed;\n const percentage = groupWidth.value > 0 ? Math.min(100, current / groupWidth.value * 100) : 25;\n const navigation = {\n id: \"navigation\", minSize: `${bounds.value.minWidth}px`, maxSize: `${bounds.value.maxWidth}px`,\n collapsible: canCollapse.value, collapsedSize: `${collapsed}px`, resizeBehavior: \"preserve-pixel-size\" as const,\n };\n return {\n id: `${options.id.value}-resize`,\n ids: { root: `${options.id.value}-layout`, panel: (id) => id === \"navigation\" ? options.navId.value : `${options.id.value}-remainder` },\n panels: sidebarIndex.value ? [{ id: \"remainder\", minSize: 0 }, navigation] : [navigation, { id: \"remainder\", minSize: 0 }],\n size: sidebarIndex.value ? [100 - percentage, percentage] : [percentage, 100 - percentage],\n keyboardResizeBy: 1,\n onResize: ({ size }: { size: number[] }) => {\n if (!enabled.value || groupWidth.value <= 0) return;\n const next = (size[sidebarIndex.value] ?? 0) / 100 * groupWidth.value;\n const isCollapsed = canCollapse.value && next <= collapsed + 0.5;\n options.setOpen(!isCollapsed);\n if (!isCollapsed) setWidth(next);\n },\n onResizeEnd: () => { if (enabled.value) options.onResizeEnd(width.value); },\n };\n });\n provide(resizeKey, { props: splitterProps, handleId, range, canCollapse, setIsResizing: (value) => { resizing.value = value; } });\n return { width, setWidth, isResizing: computed(() => enabled.value && resizing.value) };\n}\n","<script setup lang=\"ts\">\nimport { Drawer as ArkDrawer } from \"@ark-ui/vue/drawer\";\nimport { computed, nextTick, onMounted, provide, ref, useId, watch, watchEffect } from \"vue\";\nimport {\n SIDEBAR_DEFAULTS, resolveSidebarBreakpoint,\n type SidebarProviderEmits, type SidebarProviderProps, type SidebarProviderSlots,\n} from \"./sidebar\";\nimport { sidebarContextKey, type SidebarContext } from \"./sidebar-context\";\nimport { useSidebarResize } from \"./sidebar-resize\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarProviderProps>(), {\n ...SIDEBAR_DEFAULTS, open: undefined, mobileOpen: undefined,\n});\nconst emit = defineEmits<SidebarProviderEmits>();\ndefineSlots<SidebarProviderSlots>();\nconst generatedId = useId();\nconst id = computed(() => props.id ?? `kappa-sidebar-${generatedId}`);\nconst navId = computed(() => `${id.value}-nav`);\nconst contentId = computed(() => `${id.value}-dialog`);\nconst mounted = ref(false);\nconst narrowViewport = ref(false);\nconst internalOpen = ref(props.defaultOpen);\nconst internalMobileOpen = ref(props.defaultMobileOpen);\nconst lastTriggerId = ref<string>();\nconst layout = ref<HTMLElement>();\nlet mobileReturnTarget: HTMLElement | null = null;\nconst open = computed(() => props.collapsible === \"none\" || (props.open ?? internalOpen.value));\nconst mobileOpen = computed(() => props.mobileOpen ?? internalMobileOpen.value);\nconst isMobile = computed(() => narrowViewport.value);\nconst peekInteraction = ref(false);\nconst resize = useSidebarResize(props, {\n layout, id, navId, open, isMobile, setOpen,\n onResize: (width) => { emit(\"update:resizeWidth\", width); emit(\"resize\", { width }); },\n onResizeEnd: (width) => emit(\"resizeEnd\", { width }),\n});\nconst isPeeking = computed(() => props.peekable && !isMobile.value && !open.value && props.collapsible !== \"none\" && peekInteraction.value && !resize.isResizing.value);\nconst iconCollapsed = computed(() => !isMobile.value && !open.value && !isPeeking.value && props.collapsible === \"icon\");\nconst state = computed(() => isPeeking.value ? \"peeking\" : (isMobile.value ? mobileOpen.value : open.value) ? \"expanded\" : \"collapsed\");\nconst dimensions = computed(() => ({\n \"--kappa-sidebar-width\": props.resizable ? `${resize.width.value}px` : props.width,\n \"--kappa-sidebar-collapsed-width\": props.collapsedWidth,\n \"--kappa-sidebar-mobile-width\": props.mobileWidth,\n}));\n\nfunction setOpen(value: boolean) {\n if (props.collapsible === \"none\" || value === open.value) return;\n if (props.open === undefined) internalOpen.value = value;\n emit(\"update:open\", value);\n emit(\"openChange\", { open: value });\n}\nfunction setMobileOpen(value: boolean) {\n if (value === mobileOpen.value) return;\n if (props.mobileOpen === undefined) internalMobileOpen.value = value;\n emit(\"update:mobileOpen\", value);\n emit(\"mobileOpenChange\", { open: value });\n}\nfunction finalFocusEl() {\n const visible = (node: HTMLElement | null | undefined) =>\n node?.isConnected && node !== document.body && !node.closest('[inert], [hidden]') && node.getClientRects().length;\n if (visible(mobileReturnTarget)) return mobileReturnTarget;\n const trigger = lastTriggerId.value ? document.getElementById(lastTriggerId.value) : null;\n if (visible(trigger)) return trigger;\n return Array.from(layout.value?.querySelectorAll<HTMLElement>('[data-slot=\"sidebar-trigger\"]') ?? [])\n .find(node => visible(node) && [navId.value, contentId.value].includes(node.getAttribute(\"aria-controls\") ?? \"\")) ?? null;\n}\n\nonMounted(() => { mounted.value = true; });\nwatchEffect((onCleanup) => {\n if (!mounted.value) return;\n const breakpoint = resolveSidebarBreakpoint(props.mobileBreakpoint);\n const media = window.matchMedia(`(width < ${breakpoint}px)`);\n const update = () => { narrowViewport.value = media.matches; };\n update();\n media.addEventListener(\"change\", update);\n onCleanup(() => media.removeEventListener(\"change\", update));\n});\n\n// Include openings requested directly by a controlled parent.\nwatch(() => isMobile.value && mobileOpen.value, (visible) => {\n if (visible) mobileReturnTarget = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n});\n// A closed mobile drawer must not reopen after a desktop round trip.\nwatch(isMobile, (mobile, previous) => {\n if (!mobile && previous) setMobileOpen(false);\n});\n// When an external control hides a focused descendant, leave focus on a visible control.\nwatch(open, async (expanded) => {\n if (expanded || isMobile.value || !mounted.value) return;\n mobileReturnTarget = null;\n const nav = document.getElementById(navId.value);\n const active = document.activeElement;\n if (!(active instanceof HTMLElement) || !nav?.contains(active)) return;\n const section = active.closest('[data-slot=\"sidebar-collapsible\"]');\n await nextTick();\n const sectionTrigger = section?.querySelector<HTMLElement>('[data-part=\"trigger\"]');\n const target = props.collapsible === \"icon\" ? sectionTrigger ?? active : finalFocusEl();\n if (target?.isConnected && target.getClientRects().length) target.focus();\n else finalFocusEl()?.focus({ preventScroll: true });\n});\n\nconst context: SidebarContext = {\n open, mobileOpen, isMobile, state, iconCollapsed, navId, contentId, dimensions,\n peekable: computed(() => props.peekable), isPeeking,\n resizable: computed(() => props.resizable), isResizing: resize.isResizing,\n width: resize.width, setWidth: resize.setWidth,\n setPeekInteraction: (value) => { peekInteraction.value = value; },\n collapsible: computed(() => props.collapsible),\n side: computed(() => props.side),\n compact: computed(() => props.compact),\n setOpen, setMobileOpen,\n toggle: () => isMobile.value ? setMobileOpen(!mobileOpen.value) : setOpen(!open.value),\n rememberTrigger: (value) => { lastTriggerId.value = value; },\n focusTrigger: () => { finalFocusEl()?.focus({ preventScroll: true }); },\n};\nprovide(sidebarContextKey, context);\n</script>\n\n<template>\n <ArkDrawer.Root\n :id=\"id\"\n :ids=\"{ content: contentId }\"\n :open=\"isMobile && mobileOpen\"\n :swipe-direction=\"props.side\"\n :final-focus-el=\"finalFocusEl\"\n :lazy-mount=\"true\"\n :unmount-on-exit=\"false\"\n @update:open=\"setMobileOpen\"\n >\n <div\n ref=\"layout\"\n v-bind=\"$attrs\"\n class=\"kappa-sidebar-provider\"\n :id=\"`${id}-layout`\"\n data-slot=\"sidebar-provider\"\n :data-state=\"state\"\n :data-mobile=\"isMobile ? '' : undefined\"\n :data-peekable=\"props.peekable ? '' : undefined\"\n :data-collapsible=\"props.collapsible\"\n :data-resizing=\"resize.isResizing.value ? '' : undefined\"\n :style=\"dimensions\"\n >\n <span class=\"kappa-sidebar__width-measure\" data-slot=\"sidebar-width-measure\" aria-hidden=\"true\" />\n <slot />\n </div>\n </ArkDrawer.Root>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Drawer as ArkDrawer } from \"@ark-ui/vue/drawer\";\nimport { computed, nextTick, onMounted, provide, ref, useId, watch, watchEffect } from \"vue\";\nimport {\n SIDEBAR_DEFAULTS, resolveSidebarBreakpoint,\n type SidebarProviderEmits, type SidebarProviderProps, type SidebarProviderSlots,\n} from \"./sidebar\";\nimport { sidebarContextKey, type SidebarContext } from \"./sidebar-context\";\nimport { useSidebarResize } from \"./sidebar-resize\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarProviderProps>(), {\n ...SIDEBAR_DEFAULTS, open: undefined, mobileOpen: undefined,\n});\nconst emit = defineEmits<SidebarProviderEmits>();\ndefineSlots<SidebarProviderSlots>();\nconst generatedId = useId();\nconst id = computed(() => props.id ?? `kappa-sidebar-${generatedId}`);\nconst navId = computed(() => `${id.value}-nav`);\nconst contentId = computed(() => `${id.value}-dialog`);\nconst mounted = ref(false);\nconst narrowViewport = ref(false);\nconst internalOpen = ref(props.defaultOpen);\nconst internalMobileOpen = ref(props.defaultMobileOpen);\nconst lastTriggerId = ref<string>();\nconst layout = ref<HTMLElement>();\nlet mobileReturnTarget: HTMLElement | null = null;\nconst open = computed(() => props.collapsible === \"none\" || (props.open ?? internalOpen.value));\nconst mobileOpen = computed(() => props.mobileOpen ?? internalMobileOpen.value);\nconst isMobile = computed(() => narrowViewport.value);\nconst peekInteraction = ref(false);\nconst resize = useSidebarResize(props, {\n layout, id, navId, open, isMobile, setOpen,\n onResize: (width) => { emit(\"update:resizeWidth\", width); emit(\"resize\", { width }); },\n onResizeEnd: (width) => emit(\"resizeEnd\", { width }),\n});\nconst isPeeking = computed(() => props.peekable && !isMobile.value && !open.value && props.collapsible !== \"none\" && peekInteraction.value && !resize.isResizing.value);\nconst iconCollapsed = computed(() => !isMobile.value && !open.value && !isPeeking.value && props.collapsible === \"icon\");\nconst state = computed(() => isPeeking.value ? \"peeking\" : (isMobile.value ? mobileOpen.value : open.value) ? \"expanded\" : \"collapsed\");\nconst dimensions = computed(() => ({\n \"--kappa-sidebar-width\": props.resizable ? `${resize.width.value}px` : props.width,\n \"--kappa-sidebar-collapsed-width\": props.collapsedWidth,\n \"--kappa-sidebar-mobile-width\": props.mobileWidth,\n}));\n\nfunction setOpen(value: boolean) {\n if (props.collapsible === \"none\" || value === open.value) return;\n if (props.open === undefined) internalOpen.value = value;\n emit(\"update:open\", value);\n emit(\"openChange\", { open: value });\n}\nfunction setMobileOpen(value: boolean) {\n if (value === mobileOpen.value) return;\n if (props.mobileOpen === undefined) internalMobileOpen.value = value;\n emit(\"update:mobileOpen\", value);\n emit(\"mobileOpenChange\", { open: value });\n}\nfunction finalFocusEl() {\n const visible = (node: HTMLElement | null | undefined) =>\n node?.isConnected && node !== document.body && !node.closest('[inert], [hidden]') && node.getClientRects().length;\n if (visible(mobileReturnTarget)) return mobileReturnTarget;\n const trigger = lastTriggerId.value ? document.getElementById(lastTriggerId.value) : null;\n if (visible(trigger)) return trigger;\n return Array.from(layout.value?.querySelectorAll<HTMLElement>('[data-slot=\"sidebar-trigger\"]') ?? [])\n .find(node => visible(node) && [navId.value, contentId.value].includes(node.getAttribute(\"aria-controls\") ?? \"\")) ?? null;\n}\n\nonMounted(() => { mounted.value = true; });\nwatchEffect((onCleanup) => {\n if (!mounted.value) return;\n const breakpoint = resolveSidebarBreakpoint(props.mobileBreakpoint);\n const media = window.matchMedia(`(width < ${breakpoint}px)`);\n const update = () => { narrowViewport.value = media.matches; };\n update();\n media.addEventListener(\"change\", update);\n onCleanup(() => media.removeEventListener(\"change\", update));\n});\n\n// Include openings requested directly by a controlled parent.\nwatch(() => isMobile.value && mobileOpen.value, (visible) => {\n if (visible) mobileReturnTarget = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n});\n// A closed mobile drawer must not reopen after a desktop round trip.\nwatch(isMobile, (mobile, previous) => {\n if (!mobile && previous) setMobileOpen(false);\n});\n// When an external control hides a focused descendant, leave focus on a visible control.\nwatch(open, async (expanded) => {\n if (expanded || isMobile.value || !mounted.value) return;\n mobileReturnTarget = null;\n const nav = document.getElementById(navId.value);\n const active = document.activeElement;\n if (!(active instanceof HTMLElement) || !nav?.contains(active)) return;\n const section = active.closest('[data-slot=\"sidebar-collapsible\"]');\n await nextTick();\n const sectionTrigger = section?.querySelector<HTMLElement>('[data-part=\"trigger\"]');\n const target = props.collapsible === \"icon\" ? sectionTrigger ?? active : finalFocusEl();\n if (target?.isConnected && target.getClientRects().length) target.focus();\n else finalFocusEl()?.focus({ preventScroll: true });\n});\n\nconst context: SidebarContext = {\n open, mobileOpen, isMobile, state, iconCollapsed, navId, contentId, dimensions,\n peekable: computed(() => props.peekable), isPeeking,\n resizable: computed(() => props.resizable), isResizing: resize.isResizing,\n width: resize.width, setWidth: resize.setWidth,\n setPeekInteraction: (value) => { peekInteraction.value = value; },\n collapsible: computed(() => props.collapsible),\n side: computed(() => props.side),\n compact: computed(() => props.compact),\n setOpen, setMobileOpen,\n toggle: () => isMobile.value ? setMobileOpen(!mobileOpen.value) : setOpen(!open.value),\n rememberTrigger: (value) => { lastTriggerId.value = value; },\n focusTrigger: () => { finalFocusEl()?.focus({ preventScroll: true }); },\n};\nprovide(sidebarContextKey, context);\n</script>\n\n<template>\n <ArkDrawer.Root\n :id=\"id\"\n :ids=\"{ content: contentId }\"\n :open=\"isMobile && mobileOpen\"\n :swipe-direction=\"props.side\"\n :final-focus-el=\"finalFocusEl\"\n :lazy-mount=\"true\"\n :unmount-on-exit=\"false\"\n @update:open=\"setMobileOpen\"\n >\n <div\n ref=\"layout\"\n v-bind=\"$attrs\"\n class=\"kappa-sidebar-provider\"\n :id=\"`${id}-layout`\"\n data-slot=\"sidebar-provider\"\n :data-state=\"state\"\n :data-mobile=\"isMobile ? '' : undefined\"\n :data-peekable=\"props.peekable ? '' : undefined\"\n :data-collapsible=\"props.collapsible\"\n :data-resizing=\"resize.isResizing.value ? '' : undefined\"\n :style=\"dimensions\"\n >\n <span class=\"kappa-sidebar__width-measure\" data-slot=\"sidebar-width-measure\" aria-hidden=\"true\" />\n <slot />\n </div>\n </ArkDrawer.Root>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { reactive, type VNodeChild } from \"vue\";\nimport { useSidebarContext, type SidebarContextValue } from \"./sidebar-context\";\ndefineSlots<{ default?: (context: SidebarContextValue) => VNodeChild }>();\nconst context = reactive(useSidebarContext());\n</script>\n<template><slot v-bind=\"context\" /></template>\n","<script setup lang=\"ts\">\nimport { reactive, type VNodeChild } from \"vue\";\nimport { useSidebarContext, type SidebarContextValue } from \"./sidebar-context\";\ndefineSlots<{ default?: (context: SidebarContextValue) => VNodeChild }>();\nconst context = reactive(useSidebarContext());\n</script>\n<template><slot v-bind=\"context\" /></template>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport { computed, useAttrs, useId } from \"vue\";\nimport type { SidebarSlots, SidebarTriggerProps } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarTriggerProps>(), {\n asChild: false, disabled: false, peek: false,\n expandLabel: \"Expand sidebar\", collapseLabel: \"Collapse sidebar\",\n openLabel: \"Open sidebar\", closeLabel: \"Close sidebar\",\n});\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\nconst attrs = useAttrs();\nconst generatedId = useId();\nconst id = computed(() => String(attrs.id ?? `kappa-sidebar-trigger-${generatedId}`));\nconst expanded = computed(() => sidebar.isMobile.value ? sidebar.mobileOpen.value : sidebar.open.value);\nconst visible = computed(() => expanded.value || (props.peek && sidebar.isPeeking.value));\nconst label = computed(() => sidebar.isMobile.value\n ? expanded.value ? props.closeLabel : props.openLabel\n : expanded.value ? props.collapseLabel : props.expandLabel);\nfunction onClick(event: MouseEvent) {\n if (event.defaultPrevented || props.disabled) return;\n sidebar.rememberTrigger(id.value);\n sidebar.toggle();\n}\n</script>\n\n<template>\n <ark.button\n :aria-label=\"$slots.default ? undefined : label\"\n v-bind=\"$attrs\"\n :id=\"id\"\n :as-child=\"props.asChild\"\n class=\"kappa-sidebar__trigger\"\n data-slot=\"sidebar-trigger\"\n :data-peek=\"props.peek && !props.disabled && sidebar.peekable.value && sidebar.collapsible.value === 'offcanvas' && !sidebar.isMobile.value ? '' : undefined\"\n type=\"button\"\n :disabled=\"props.disabled || (!sidebar.isMobile.value && sidebar.collapsible.value === 'none')\"\n :aria-expanded=\"visible\"\n :aria-controls=\"sidebar.isMobile.value ? sidebar.contentId.value : sidebar.navId.value\"\n :aria-haspopup=\"sidebar.isMobile.value ? 'dialog' : undefined\"\n @click=\"onClick\"\n >\n <slot>\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" focusable=\"false\">\n <rect x=\"2\" y=\"2.5\" width=\"12\" height=\"11\" rx=\"1.5\" />\n <path d=\"M6 2.5v11\" />\n </svg>\n </slot>\n </ark.button>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport { computed, useAttrs, useId } from \"vue\";\nimport type { SidebarSlots, SidebarTriggerProps } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarTriggerProps>(), {\n asChild: false, disabled: false, peek: false,\n expandLabel: \"Expand sidebar\", collapseLabel: \"Collapse sidebar\",\n openLabel: \"Open sidebar\", closeLabel: \"Close sidebar\",\n});\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\nconst attrs = useAttrs();\nconst generatedId = useId();\nconst id = computed(() => String(attrs.id ?? `kappa-sidebar-trigger-${generatedId}`));\nconst expanded = computed(() => sidebar.isMobile.value ? sidebar.mobileOpen.value : sidebar.open.value);\nconst visible = computed(() => expanded.value || (props.peek && sidebar.isPeeking.value));\nconst label = computed(() => sidebar.isMobile.value\n ? expanded.value ? props.closeLabel : props.openLabel\n : expanded.value ? props.collapseLabel : props.expandLabel);\nfunction onClick(event: MouseEvent) {\n if (event.defaultPrevented || props.disabled) return;\n sidebar.rememberTrigger(id.value);\n sidebar.toggle();\n}\n</script>\n\n<template>\n <ark.button\n :aria-label=\"$slots.default ? undefined : label\"\n v-bind=\"$attrs\"\n :id=\"id\"\n :as-child=\"props.asChild\"\n class=\"kappa-sidebar__trigger\"\n data-slot=\"sidebar-trigger\"\n :data-peek=\"props.peek && !props.disabled && sidebar.peekable.value && sidebar.collapsible.value === 'offcanvas' && !sidebar.isMobile.value ? '' : undefined\"\n type=\"button\"\n :disabled=\"props.disabled || (!sidebar.isMobile.value && sidebar.collapsible.value === 'none')\"\n :aria-expanded=\"visible\"\n :aria-controls=\"sidebar.isMobile.value ? sidebar.contentId.value : sidebar.navId.value\"\n :aria-haspopup=\"sidebar.isMobile.value ? 'dialog' : undefined\"\n @click=\"onClick\"\n >\n <slot>\n <svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" focusable=\"false\">\n <rect x=\"2\" y=\"2.5\" width=\"12\" height=\"11\" rx=\"1.5\" />\n <path d=\"M6 2.5v11\" />\n </svg>\n </slot>\n </ark.button>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Drawer as ArkDrawer } from \"@ark-ui/vue/drawer\";\nimport type { SidebarCloseProps, SidebarSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCloseProps>(), { asChild: false, label: \"Close sidebar\" });\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\n</script>\n\n<template>\n <ArkDrawer.CloseTrigger\n v-if=\"sidebar.isMobile.value\"\n :aria-label=\"$slots.default ? undefined : props.label\"\n v-bind=\"$attrs\"\n :as-child=\"props.asChild\"\n class=\"kappa-sidebar__close\"\n data-slot=\"sidebar-close\"\n type=\"button\"\n >\n <slot><svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m4 4 8 8M12 4l-8 8\" /></svg></slot>\n </ArkDrawer.CloseTrigger>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Drawer as ArkDrawer } from \"@ark-ui/vue/drawer\";\nimport type { SidebarCloseProps, SidebarSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCloseProps>(), { asChild: false, label: \"Close sidebar\" });\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\n</script>\n\n<template>\n <ArkDrawer.CloseTrigger\n v-if=\"sidebar.isMobile.value\"\n :aria-label=\"$slots.default ? undefined : props.label\"\n v-bind=\"$attrs\"\n :as-child=\"props.asChild\"\n class=\"kappa-sidebar__close\"\n data-slot=\"sidebar-close\"\n type=\"button\"\n >\n <slot><svg viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m4 4 8 8M12 4l-8 8\" /></svg></slot>\n </ArkDrawer.CloseTrigger>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.header v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__header\" data-slot=\"sidebar-header\"><slot /></ark.header>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.header v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__header\" data-slot=\"sidebar-header\"><slot /></ark.header>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.footer v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__footer\" data-slot=\"sidebar-footer\"><slot /></ark.footer>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.footer v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__footer\" data-slot=\"sidebar-footer\"><slot /></ark.footer>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.div tabindex=\"0\" role=\"region\" aria-label=\"Navigation items\" v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__content\" data-slot=\"sidebar-content\"><slot /></ark.div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.div tabindex=\"0\" role=\"region\" aria-label=\"Navigation items\" v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__content\" data-slot=\"sidebar-content\"><slot /></ark.div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.div v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__group\" data-slot=\"sidebar-group\"><slot /></ark.div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.div v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__group\" data-slot=\"sidebar-group\"><slot /></ark.div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.div v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__group-label\" data-slot=\"sidebar-group-label\"><slot /></ark.div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.div v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__group-label\" data-slot=\"sidebar-group-label\"><slot /></ark.div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.ul v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu\" data-slot=\"sidebar-menu\"><slot /></ark.ul>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.ul v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu\" data-slot=\"sidebar-menu\"><slot /></ark.ul>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.li v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-item\" data-slot=\"sidebar-menu-item\"><slot /></ark.li>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.li v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-item\" data-slot=\"sidebar-menu-item\"><slot /></ark.li>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","import { cloneVNode, Comment, defineComponent, Fragment, isVNode, mergeProps, type VNode } from \"vue\";\n\nfunction flatten(nodes: VNode[]): VNode[] {\n return nodes.flatMap(node => node.type === Fragment && Array.isArray(node.children)\n ? flatten(node.children.filter(isVNode)) : [node]);\n}\n\n// Ark's asChild lets child props win. Enforce disabled link semantics after that merge.\nexport default defineComponent({\n name: \"SidebarMenuChild\",\n inheritAttrs: false,\n props: { disabled: Boolean },\n setup(props, { attrs, slots }) {\n return () => {\n const nodes = flatten(slots.default?.() ?? []);\n const index = nodes.findIndex(node => node.type !== Comment);\n if (index < 0) return nodes;\n const child = nodes[index];\n const disabled = props.disabled ? {\n href: null,\n tabindex: -1,\n \"aria-disabled\": true,\n ...(child.type === \"a\" ? { role: \"link\" } : {}),\n ...(child.type === \"button\" ? { disabled: true } : {}),\n } : {};\n nodes[index] = cloneVNode({ ...child, props: {} }, mergeProps(attrs, child.props ?? {}, disabled));\n return nodes;\n };\n },\n});\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport { DEFAULT_LOCALE, useLocaleContext } from \"@ark-ui/vue/locale\";\nimport { computed } from \"vue\";\nimport { Tooltip } from \"../tooltip\";\nimport SidebarMenuChild from \"./SidebarMenuChild\";\nimport type { SidebarMenuButtonProps, SidebarMenuButtonSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarMenuButtonProps>(), {\n asChild: false, active: false, disabled: false,\n});\ndefineSlots<SidebarMenuButtonSlots>();\nconst sidebar = useSidebarContext();\nconst locale = useLocaleContext(DEFAULT_LOCALE);\nconst element = computed(() => props.href !== undefined ? ark.a : ark.button);\nconst placement = computed(() => (sidebar.side.value === 'start') !== (locale.value.dir === 'rtl') ? 'right' : 'left');\nfunction blockDisabled(event: Event) {\n if (!props.disabled) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n}\nfunction blockDisabledKey(event: KeyboardEvent) {\n if (event.key === \"Enter\" || event.key === \" \") blockDisabled(event);\n}\n</script>\n\n<template>\n <Tooltip.Root\n :disabled=\"!sidebar.iconCollapsed.value || !props.tooltip || props.disabled\"\n :positioning=\"{ placement, gutter: 8 }\"\n >\n <Tooltip.Trigger as-child>\n <component\n :is=\"element\"\n :aria-current=\"props.active ? 'page' : undefined\"\n :role=\"props.disabled && props.href !== undefined ? 'link' : undefined\"\n v-bind=\"{ ...$attrs, ...(props.disabled ? { tabindex: -1 } : {}) }\"\n :as-child=\"props.asChild\"\n class=\"kappa-sidebar__menu-button\"\n data-slot=\"sidebar-menu-button\"\n :data-active=\"props.active ? '' : undefined\"\n :data-disabled=\"props.disabled ? '' : undefined\"\n :data-icon=\"props.icon || $slots.icon ? '' : undefined\"\n :href=\"props.disabled ? undefined : props.href\"\n :type=\"props.href !== undefined || props.asChild ? undefined : 'button'\"\n :disabled=\"props.href === undefined && !props.asChild ? props.disabled : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n @click.capture=\"blockDisabled\"\n @pointerdown.capture=\"blockDisabled\"\n @keydown.capture=\"blockDisabledKey\"\n >\n <SidebarMenuChild v-if=\"props.asChild\" :disabled=\"props.disabled\"><slot /></SidebarMenuChild>\n <template v-else>\n <span v-if=\"props.icon || $slots.icon\" class=\"kappa-sidebar__menu-icon\" aria-hidden=\"true\">\n <slot name=\"icon\"><component :is=\"props.icon\" focusable=\"false\" /></slot>\n </span>\n <span class=\"kappa-sidebar__menu-label\"><slot /></span>\n </template>\n </component>\n </Tooltip.Trigger>\n <Tooltip.Content v-if=\"props.tooltip\" :show-arrow=\"false\">{{ props.tooltip }}</Tooltip.Content>\n </Tooltip.Root>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport { DEFAULT_LOCALE, useLocaleContext } from \"@ark-ui/vue/locale\";\nimport { computed } from \"vue\";\nimport { Tooltip } from \"../tooltip\";\nimport SidebarMenuChild from \"./SidebarMenuChild\";\nimport type { SidebarMenuButtonProps, SidebarMenuButtonSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarMenuButtonProps>(), {\n asChild: false, active: false, disabled: false,\n});\ndefineSlots<SidebarMenuButtonSlots>();\nconst sidebar = useSidebarContext();\nconst locale = useLocaleContext(DEFAULT_LOCALE);\nconst element = computed(() => props.href !== undefined ? ark.a : ark.button);\nconst placement = computed(() => (sidebar.side.value === 'start') !== (locale.value.dir === 'rtl') ? 'right' : 'left');\nfunction blockDisabled(event: Event) {\n if (!props.disabled) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n}\nfunction blockDisabledKey(event: KeyboardEvent) {\n if (event.key === \"Enter\" || event.key === \" \") blockDisabled(event);\n}\n</script>\n\n<template>\n <Tooltip.Root\n :disabled=\"!sidebar.iconCollapsed.value || !props.tooltip || props.disabled\"\n :positioning=\"{ placement, gutter: 8 }\"\n >\n <Tooltip.Trigger as-child>\n <component\n :is=\"element\"\n :aria-current=\"props.active ? 'page' : undefined\"\n :role=\"props.disabled && props.href !== undefined ? 'link' : undefined\"\n v-bind=\"{ ...$attrs, ...(props.disabled ? { tabindex: -1 } : {}) }\"\n :as-child=\"props.asChild\"\n class=\"kappa-sidebar__menu-button\"\n data-slot=\"sidebar-menu-button\"\n :data-active=\"props.active ? '' : undefined\"\n :data-disabled=\"props.disabled ? '' : undefined\"\n :data-icon=\"props.icon || $slots.icon ? '' : undefined\"\n :href=\"props.disabled ? undefined : props.href\"\n :type=\"props.href !== undefined || props.asChild ? undefined : 'button'\"\n :disabled=\"props.href === undefined && !props.asChild ? props.disabled : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n @click.capture=\"blockDisabled\"\n @pointerdown.capture=\"blockDisabled\"\n @keydown.capture=\"blockDisabledKey\"\n >\n <SidebarMenuChild v-if=\"props.asChild\" :disabled=\"props.disabled\"><slot /></SidebarMenuChild>\n <template v-else>\n <span v-if=\"props.icon || $slots.icon\" class=\"kappa-sidebar__menu-icon\" aria-hidden=\"true\">\n <slot name=\"icon\"><component :is=\"props.icon\" focusable=\"false\" /></slot>\n </span>\n <span class=\"kappa-sidebar__menu-label\"><slot /></span>\n </template>\n </component>\n </Tooltip.Trigger>\n <Tooltip.Content v-if=\"props.tooltip\" :show-arrow=\"false\">{{ props.tooltip }}</Tooltip.Content>\n </Tooltip.Root>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.ul v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-sub\" data-slot=\"sidebar-menu-sub\"><slot /></ark.ul>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.ul v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-sub\" data-slot=\"sidebar-menu-sub\"><slot /></ark.ul>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.li v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-sub-item\" data-slot=\"sidebar-menu-sub-item\"><slot /></ark.li>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.li v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-sub-item\" data-slot=\"sidebar-menu-sub-item\"><slot /></ark.li>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.span v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-label\" data-slot=\"sidebar-menu-label\"><slot /></ark.span>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.span v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-label\" data-slot=\"sidebar-menu-label\"><slot /></ark.span>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.span v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-badge\" data-slot=\"sidebar-menu-badge\"><slot /></ark.span>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.span v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-badge\" data-slot=\"sidebar-menu-badge\"><slot /></ark.span>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\ndefineOptions({ inheritAttrs: false });\n</script>\n<template>\n <ArkCollapsible.Indicator v-bind=\"$attrs\" class=\"kappa-sidebar__menu-chevron\" data-slot=\"sidebar-menu-chevron\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" focusable=\"false\"><path d=\"m6 4 4 4-4 4\" /></svg>\n </ArkCollapsible.Indicator>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\ndefineOptions({ inheritAttrs: false });\n</script>\n<template>\n <ArkCollapsible.Indicator v-bind=\"$attrs\" class=\"kappa-sidebar__menu-chevron\" data-slot=\"sidebar-menu-chevron\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" focusable=\"false\"><path d=\"m6 4 4 4-4 4\" /></svg>\n </ArkCollapsible.Indicator>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.hr v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__separator\" data-slot=\"sidebar-separator\" />\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { ark } from \"@ark-ui/vue/factory\";\nimport type { SidebarPartProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarPartProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n\n<template>\n <ark.hr v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__separator\" data-slot=\"sidebar-separator\" />\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\nimport { computed, ref } from \"vue\";\nimport type { SidebarCollapsibleProps, SidebarCollapsibleEmits, SidebarSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCollapsibleProps>(), {\n open: undefined, defaultOpen: false, disabled: false,\n});\nconst emit = defineEmits<SidebarCollapsibleEmits>();\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\nconst internalOpen = ref(props.defaultOpen);\nconst open = computed(() => !sidebar.iconCollapsed.value && (props.open ?? internalOpen.value));\nfunction setOpen(value: boolean) {\n if (sidebar.iconCollapsed.value && value) sidebar.setOpen(true);\n if (props.open === undefined) internalOpen.value = value;\n emit(\"update:open\", value);\n emit(\"openChange\", { open: value });\n}\n</script>\n\n<template>\n <ArkCollapsible.Root\n v-bind=\"$attrs\"\n :id=\"props.id\"\n :open=\"open\"\n :disabled=\"props.disabled\"\n :unmount-on-exit=\"false\"\n class=\"kappa-sidebar__collapsible\"\n data-slot=\"sidebar-collapsible\"\n @update:open=\"setOpen\"\n ><slot /></ArkCollapsible.Root>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\nimport { computed, ref } from \"vue\";\nimport type { SidebarCollapsibleProps, SidebarCollapsibleEmits, SidebarSlots } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCollapsibleProps>(), {\n open: undefined, defaultOpen: false, disabled: false,\n});\nconst emit = defineEmits<SidebarCollapsibleEmits>();\ndefineSlots<SidebarSlots>();\nconst sidebar = useSidebarContext();\nconst internalOpen = ref(props.defaultOpen);\nconst open = computed(() => !sidebar.iconCollapsed.value && (props.open ?? internalOpen.value));\nfunction setOpen(value: boolean) {\n if (sidebar.iconCollapsed.value && value) sidebar.setOpen(true);\n if (props.open === undefined) internalOpen.value = value;\n emit(\"update:open\", value);\n emit(\"openChange\", { open: value });\n}\n</script>\n\n<template>\n <ArkCollapsible.Root\n v-bind=\"$attrs\"\n :id=\"props.id\"\n :open=\"open\"\n :disabled=\"props.disabled\"\n :unmount-on-exit=\"false\"\n class=\"kappa-sidebar__collapsible\"\n data-slot=\"sidebar-collapsible\"\n @update:open=\"setOpen\"\n ><slot /></ArkCollapsible.Root>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\nimport type { SidebarCollapsibleTriggerProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCollapsibleTriggerProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n<template>\n <ArkCollapsible.Trigger v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-button\" data-slot=\"sidebar-collapsible-trigger\"><slot /></ArkCollapsible.Trigger>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\nimport type { SidebarCollapsibleTriggerProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCollapsibleTriggerProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n<template>\n <ArkCollapsible.Trigger v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__menu-button\" data-slot=\"sidebar-collapsible-trigger\"><slot /></ArkCollapsible.Trigger>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\nimport type { SidebarCollapsibleContentProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCollapsibleContentProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n<template>\n <ArkCollapsible.Content v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__collapsible-content\" data-slot=\"sidebar-collapsible-content\"><slot /></ArkCollapsible.Content>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { Collapsible as ArkCollapsible } from \"@ark-ui/vue/collapsible\";\nimport type { SidebarCollapsibleContentProps, SidebarSlots } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarCollapsibleContentProps>(), { asChild: false });\ndefineSlots<SidebarSlots>();\n</script>\n<template>\n <ArkCollapsible.Content v-bind=\"$attrs\" :as-child=\"props.asChild\" class=\"kappa-sidebar__collapsible-content\" data-slot=\"sidebar-collapsible-content\"><slot /></ArkCollapsible.Content>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { resolveSidebarLoadingRows, type SidebarLoadingProps } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLoadingProps>(), { rows: 5, label: \"Loading navigation\" });\nconst rows = computed(() => resolveSidebarLoadingRows(props.rows));\n</script>\n<template>\n <div v-bind=\"$attrs\" class=\"kappa-sidebar__loading\" data-slot=\"sidebar-loading\" role=\"status\" :aria-label=\"props.label\">\n <div v-for=\"row in rows\" :key=\"row\" class=\"kappa-sidebar__loading-row\" aria-hidden=\"true\">\n <span class=\"kappa-sidebar__loading-icon\" /><span class=\"kappa-sidebar__loading-label\" />\n </div>\n </div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { resolveSidebarLoadingRows, type SidebarLoadingProps } from \"./sidebar\";\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLoadingProps>(), { rows: 5, label: \"Loading navigation\" });\nconst rows = computed(() => resolveSidebarLoadingRows(props.rows));\n</script>\n<template>\n <div v-bind=\"$attrs\" class=\"kappa-sidebar__loading\" data-slot=\"sidebar-loading\" role=\"status\" :aria-label=\"props.label\">\n <div v-for=\"row in rows\" :key=\"row\" class=\"kappa-sidebar__loading-row\" aria-hidden=\"true\">\n <span class=\"kappa-sidebar__loading-icon\" /><span class=\"kappa-sidebar__loading-label\" />\n </div>\n </div>\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { useSplitter } from \"@ark-ui/vue/splitter\";\nimport { computed, onScopeDispose, watch } from \"vue\";\nimport type { SidebarResizeHandleProps } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\nimport { useSidebarResizeContext } from \"./sidebar-resize\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = defineProps<SidebarResizeHandleProps>();\nconst sidebar = useSidebarContext();\nconst resize = useSidebarResizeContext();\nconst api = useSplitter(resize.props);\nconst handleProps = computed(() => api.value.getResizeTriggerProps({ id: resize.handleId.value, disabled: props.disabled }));\nfunction toggleTrailingPanel(event: KeyboardEvent) {\n if (event.defaultPrevented || props.disabled || !resize.canCollapse.value || event.key !== \"Enter\" || resize.handleId.value !== \"remainder:navigation\") return;\n // Ark's Enter shortcut targets the leading panel. Our controlled panel can trail it.\n event.preventDefault();\n if (sidebar.open.value) api.value.collapsePanel(\"navigation\");\n else api.value.expandPanel(\"navigation\");\n}\nwatch(() => api.value.dragging, resize.setIsResizing);\nonScopeDispose(() => resize.setIsResizing(false));\n</script>\n\n<template>\n <div\n v-bind=\"{ ...handleProps, ...$attrs }\"\n class=\"kappa-sidebar__resize-handle\"\n data-slot=\"sidebar-resize-handle\"\n :aria-label=\"props.label\"\n aria-orientation=\"vertical\"\n :aria-controls=\"sidebar.navId.value\"\n :aria-valuemin=\"resize.range.value.min\"\n :aria-valuemax=\"resize.range.value.max\"\n :aria-valuenow=\"Math.round(sidebar.open.value ? sidebar.width.value : resize.range.value.collapsed)\"\n :aria-valuetext=\"sidebar.open.value ? `${Math.round(sidebar.width.value)} pixels` : 'Collapsed'\"\n :aria-disabled=\"props.disabled || undefined\"\n @keydown.capture=\"toggleTrailingPanel\"\n />\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { useSplitter } from \"@ark-ui/vue/splitter\";\nimport { computed, onScopeDispose, watch } from \"vue\";\nimport type { SidebarResizeHandleProps } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\nimport { useSidebarResizeContext } from \"./sidebar-resize\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = defineProps<SidebarResizeHandleProps>();\nconst sidebar = useSidebarContext();\nconst resize = useSidebarResizeContext();\nconst api = useSplitter(resize.props);\nconst handleProps = computed(() => api.value.getResizeTriggerProps({ id: resize.handleId.value, disabled: props.disabled }));\nfunction toggleTrailingPanel(event: KeyboardEvent) {\n if (event.defaultPrevented || props.disabled || !resize.canCollapse.value || event.key !== \"Enter\" || resize.handleId.value !== \"remainder:navigation\") return;\n // Ark's Enter shortcut targets the leading panel. Our controlled panel can trail it.\n event.preventDefault();\n if (sidebar.open.value) api.value.collapsePanel(\"navigation\");\n else api.value.expandPanel(\"navigation\");\n}\nwatch(() => api.value.dragging, resize.setIsResizing);\nonScopeDispose(() => resize.setIsResizing(false));\n</script>\n\n<template>\n <div\n v-bind=\"{ ...handleProps, ...$attrs }\"\n class=\"kappa-sidebar__resize-handle\"\n data-slot=\"sidebar-resize-handle\"\n :aria-label=\"props.label\"\n aria-orientation=\"vertical\"\n :aria-controls=\"sidebar.navId.value\"\n :aria-valuemin=\"resize.range.value.min\"\n :aria-valuemax=\"resize.range.value.max\"\n :aria-valuenow=\"Math.round(sidebar.open.value ? sidebar.width.value : resize.range.value.collapsed)\"\n :aria-valuetext=\"sidebar.open.value ? `${Math.round(sidebar.width.value)} pixels` : 'Collapsed'\"\n :aria-disabled=\"props.disabled || undefined\"\n @keydown.capture=\"toggleTrailingPanel\"\n />\n</template>\n\n<style src=\"./sidebar.css\"></style>\n","<script setup lang=\"ts\">\nimport { DEFAULT_LOCALE, LocaleProvider, useLocaleContext } from \"@ark-ui/vue/locale\";\nimport type { SidebarResizeHandleProps } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\nimport SidebarResizeControl from \"./SidebarResizeControl.vue\";\nimport { useSidebarResizeContext } from \"./sidebar-resize\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarResizeHandleProps>(), { label: \"Resize sidebar\", disabled: false });\nconst sidebar = useSidebarContext();\nconst resize = useSidebarResizeContext();\nconst locale = useLocaleContext(DEFAULT_LOCALE);\n</script>\n\n<template>\n <LocaleProvider locale=\"en-US\">\n <SidebarResizeControl v-if=\"sidebar.resizable.value && !sidebar.isMobile.value && (sidebar.open.value || resize.canCollapse.value)\" v-bind=\"{ ...$attrs, ...props, dir: locale.dir }\" />\n </LocaleProvider>\n</template>\n","<script setup lang=\"ts\">\nimport { DEFAULT_LOCALE, LocaleProvider, useLocaleContext } from \"@ark-ui/vue/locale\";\nimport type { SidebarResizeHandleProps } from \"./sidebar\";\nimport { useSidebarContext } from \"./sidebar-context\";\nimport SidebarResizeControl from \"./SidebarResizeControl.vue\";\nimport { useSidebarResizeContext } from \"./sidebar-resize\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarResizeHandleProps>(), { label: \"Resize sidebar\", disabled: false });\nconst sidebar = useSidebarContext();\nconst resize = useSidebarResizeContext();\nconst locale = useLocaleContext(DEFAULT_LOCALE);\n</script>\n\n<template>\n <LocaleProvider locale=\"en-US\">\n <SidebarResizeControl v-if=\"sidebar.resizable.value && !sidebar.isMobile.value && (sidebar.open.value || resize.canCollapse.value)\" v-bind=\"{ ...$attrs, ...props, dir: locale.dir }\" />\n </LocaleProvider>\n</template>\n","import { inject, type ComputedRef, type InjectionKey } from \"vue\";\n\ninterface SlidingContext { activeKey: ComputedRef<string>; direction: ComputedRef<\"left\" | \"right\"> }\nexport const sidebarSlidingKey: InjectionKey<SlidingContext> = Symbol(\"KappaSidebarSlidingViews\");\nexport function useSidebarSlidingContext() {\n const context = inject(sidebarSlidingKey);\n if (!context) throw new Error(\"[Kappa Sidebar] SlidingView must be inside Sidebar.SlidingViews.\");\n return context;\n}\n","<script setup lang=\"ts\">\nimport { computed, nextTick, provide, ref, watch } from \"vue\";\nimport type { SidebarSlidingViewsProps, SidebarSlots } from \"./sidebar\";\nimport { sidebarSlidingKey } from \"./sidebar-sliding-context\";\n\nconst props = withDefaults(defineProps<SidebarSlidingViewsProps>(), { direction: \"left\" });\ndefineSlots<SidebarSlots>();\nconst root = ref<HTMLElement>();\nconst lastFocus = new Map<string, HTMLElement>();\nprovide(sidebarSlidingKey, { activeKey: computed(() => props.activeKey), direction: computed(() => props.direction) });\n\nwatch(() => props.activeKey, async (key, previous) => {\n for (const [value, node] of lastFocus) if (!root.value?.contains(node)) lastFocus.delete(value);\n const active = root.value?.ownerDocument.activeElement;\n const previousView = active?.closest('[data-slot=\"sidebar-sliding-view\"]');\n if (!(active instanceof HTMLElement) || previousView?.getAttribute(\"data-value\") !== previous || previousView.closest('[data-slot=\"sidebar-sliding-views\"]') !== root.value) return;\n lastFocus.set(previous, active);\n await nextTick();\n const view = Array.from(root.value?.querySelectorAll<HTMLElement>('[data-slot=\"sidebar-sliding-view\"]') ?? [])\n .find(node => node.dataset.value === key && node.closest('[data-slot=\"sidebar-sliding-views\"]') === root.value);\n if (!view) return;\n const saved = lastFocus.get(key);\n const target = saved?.isConnected && view.contains(saved) && saved.getClientRects().length && !saved.closest('[inert], [hidden], [disabled], [aria-disabled=\"true\"]') ? saved : view;\n target.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <div ref=\"root\" class=\"kappa-sidebar__sliding-views\" data-slot=\"sidebar-sliding-views\" :data-direction=\"props.direction\">\n <slot />\n </div>\n</template>\n\n<style src=\"./sidebar-sliding.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, provide, ref, watch } from \"vue\";\nimport type { SidebarSlidingViewsProps, SidebarSlots } from \"./sidebar\";\nimport { sidebarSlidingKey } from \"./sidebar-sliding-context\";\n\nconst props = withDefaults(defineProps<SidebarSlidingViewsProps>(), { direction: \"left\" });\ndefineSlots<SidebarSlots>();\nconst root = ref<HTMLElement>();\nconst lastFocus = new Map<string, HTMLElement>();\nprovide(sidebarSlidingKey, { activeKey: computed(() => props.activeKey), direction: computed(() => props.direction) });\n\nwatch(() => props.activeKey, async (key, previous) => {\n for (const [value, node] of lastFocus) if (!root.value?.contains(node)) lastFocus.delete(value);\n const active = root.value?.ownerDocument.activeElement;\n const previousView = active?.closest('[data-slot=\"sidebar-sliding-view\"]');\n if (!(active instanceof HTMLElement) || previousView?.getAttribute(\"data-value\") !== previous || previousView.closest('[data-slot=\"sidebar-sliding-views\"]') !== root.value) return;\n lastFocus.set(previous, active);\n await nextTick();\n const view = Array.from(root.value?.querySelectorAll<HTMLElement>('[data-slot=\"sidebar-sliding-view\"]') ?? [])\n .find(node => node.dataset.value === key && node.closest('[data-slot=\"sidebar-sliding-views\"]') === root.value);\n if (!view) return;\n const saved = lastFocus.get(key);\n const target = saved?.isConnected && view.contains(saved) && saved.getClientRects().length && !saved.closest('[inert], [hidden], [disabled], [aria-disabled=\"true\"]') ? saved : view;\n target.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <div ref=\"root\" class=\"kappa-sidebar__sliding-views\" data-slot=\"sidebar-sliding-views\" :data-direction=\"props.direction\">\n <slot />\n </div>\n</template>\n\n<style src=\"./sidebar-sliding.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { SidebarSlidingViewProps, SidebarSlots } from \"./sidebar\";\nimport { useSidebarSlidingContext } from \"./sidebar-sliding-context\";\n\nconst props = defineProps<SidebarSlidingViewProps>();\ndefineSlots<SidebarSlots>();\nconst views = useSidebarSlidingContext();\nconst active = computed(() => views.activeKey.value === props.value);\n</script>\n\n<template>\n <Transition :name=\"`kappa-sidebar-slide-${views.direction.value}`\">\n <div\n v-show=\"active\"\n class=\"kappa-sidebar__sliding-view\"\n data-slot=\"sidebar-sliding-view\"\n :data-value=\"props.value\"\n :data-state=\"active ? 'active' : 'inactive'\"\n role=\"group\"\n :aria-label=\"props.label ?? props.value\"\n tabindex=\"-1\"\n :aria-hidden=\"!active || undefined\"\n :inert=\"!active || undefined\"\n ><slot /></div>\n </Transition>\n</template>\n\n<style src=\"./sidebar-sliding.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport type { SidebarSlidingViewProps, SidebarSlots } from \"./sidebar\";\nimport { useSidebarSlidingContext } from \"./sidebar-sliding-context\";\n\nconst props = defineProps<SidebarSlidingViewProps>();\ndefineSlots<SidebarSlots>();\nconst views = useSidebarSlidingContext();\nconst active = computed(() => views.activeKey.value === props.value);\n</script>\n\n<template>\n <Transition :name=\"`kappa-sidebar-slide-${views.direction.value}`\">\n <div\n v-show=\"active\"\n class=\"kappa-sidebar__sliding-view\"\n data-slot=\"sidebar-sliding-view\"\n :data-value=\"props.value\"\n :data-state=\"active ? 'active' : 'inactive'\"\n role=\"group\"\n :aria-label=\"props.label ?? props.value\"\n tabindex=\"-1\"\n :aria-hidden=\"!active || undefined\"\n :inert=\"!active || undefined\"\n ><slot /></div>\n </Transition>\n</template>\n\n<style src=\"./sidebar-sliding.css\"></style>\n","import SidebarRoot from \"./Sidebar.vue\";\nimport SidebarProvider from \"./SidebarProvider.vue\";\nimport SidebarContext from \"./SidebarContext.vue\";\nimport SidebarTrigger from \"./SidebarTrigger.vue\";\nimport SidebarClose from \"./SidebarClose.vue\";\nimport SidebarHeader from \"./SidebarHeader.vue\";\nimport SidebarFooter from \"./SidebarFooter.vue\";\nimport SidebarContent from \"./SidebarContent.vue\";\nimport SidebarGroup from \"./SidebarGroup.vue\";\nimport SidebarGroupLabel from \"./SidebarGroupLabel.vue\";\nimport SidebarMenu from \"./SidebarMenu.vue\";\nimport SidebarMenuItem from \"./SidebarMenuItem.vue\";\nimport SidebarMenuButton from \"./SidebarMenuButton.vue\";\nimport SidebarMenuSub from \"./SidebarMenuSub.vue\";\nimport SidebarMenuSubItem from \"./SidebarMenuSubItem.vue\";\nimport SidebarMenuLabel from \"./SidebarMenuLabel.vue\";\nimport SidebarMenuBadge from \"./SidebarMenuBadge.vue\";\nimport SidebarMenuChevron from \"./SidebarMenuChevron.vue\";\nimport SidebarSeparator from \"./SidebarSeparator.vue\";\nimport SidebarCollapsible from \"./SidebarCollapsible.vue\";\nimport SidebarCollapsibleTrigger from \"./SidebarCollapsibleTrigger.vue\";\nimport SidebarCollapsibleContent from \"./SidebarCollapsibleContent.vue\";\nimport SidebarLoading from \"./SidebarLoading.vue\";\nimport SidebarResizeHandle from \"./SidebarResizeHandle.vue\";\nimport SidebarSlidingViews from \"./SidebarSlidingViews.vue\";\nimport SidebarSlidingView from \"./SidebarSlidingView.vue\";\n\nexport const Sidebar = Object.assign(SidebarRoot, {\n Root: SidebarRoot,\n Provider: SidebarProvider,\n Context: SidebarContext,\n Trigger: SidebarTrigger,\n Close: SidebarClose,\n Header: SidebarHeader,\n Footer: SidebarFooter,\n Content: SidebarContent,\n Group: SidebarGroup,\n GroupLabel: SidebarGroupLabel,\n Menu: SidebarMenu,\n MenuItem: SidebarMenuItem,\n MenuButton: SidebarMenuButton,\n MenuSub: SidebarMenuSub,\n MenuSubItem: SidebarMenuSubItem,\n MenuLabel: SidebarMenuLabel,\n MenuBadge: SidebarMenuBadge,\n MenuChevron: SidebarMenuChevron,\n Separator: SidebarSeparator,\n Collapsible: SidebarCollapsible,\n CollapsibleTrigger: SidebarCollapsibleTrigger,\n CollapsibleContent: SidebarCollapsibleContent,\n Loading: SidebarLoading,\n ResizeHandle: SidebarResizeHandle,\n SlidingViews: SidebarSlidingViews,\n SlidingView: SidebarSlidingView,\n});\n\nexport {\n SidebarRoot,\n SidebarProvider,\n SidebarContext,\n SidebarTrigger,\n SidebarClose,\n SidebarHeader,\n SidebarFooter,\n SidebarContent,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarMenu,\n SidebarMenuItem,\n SidebarMenuButton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarMenuLabel,\n SidebarMenuBadge,\n SidebarMenuChevron,\n SidebarSeparator,\n SidebarCollapsible,\n SidebarCollapsibleTrigger,\n SidebarCollapsibleContent,\n SidebarLoading,\n SidebarResizeHandle,\n SidebarSlidingViews,\n SidebarSlidingView,\n};\n\nexport { SIDEBAR_DEFAULTS } from \"./sidebar\";\nexport { useSidebarContext } from \"./sidebar-context\";\nexport type { SidebarContextValue } from \"./sidebar-context\";\nexport type {\n SidebarProps, SidebarRootProps, SidebarSlots, SidebarRootSlots,\n SidebarProviderProps, SidebarProviderEmits, SidebarProviderSlots,\n SidebarSide, SidebarCollapsibleMode, SidebarState, SidebarOpenChangeDetails,\n SidebarPartProps, SidebarTriggerProps, SidebarCloseProps,\n SidebarMenuButtonProps, SidebarMenuButtonSlots,\n SidebarCollapsibleProps, SidebarCollapsibleEmits,\n SidebarCollapsibleTriggerProps, SidebarCollapsibleContentProps, SidebarLoadingProps,\n SidebarResizeHandleProps, Sidebar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IAAS,QAAe,EAAM,UAAU,UAAU,EAAM,KAAK;oBAIjE,EAAA,GAAA,EAaa,GAAA,EAbA,MAAI,uBAAyB,EAAA,CAAA,CAAK,CAAC,UAAU,QAAA,GAAA;GACxD,SAAA,QAWe,CAXf,EAAA,EAWe,OAAA;IATb,OAAM;IACN,aAAU;IACT,cAAY,EAAM;IAClB,cAAY,EAAA,QAAM,WAAA;IACnB,MAAK;IACJ,cAAY,EAAM,SAAS,EAAM;IAClC,UAAS;IACR,eAAW,CAAG,EAAA,SAAU,KAAA;IACxB,OAAK,CAAG,EAAA,SAAU,KAAA;GACpB,GAAA,CAAA,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,GAAA,EAAA,GAAA,CAVC,CAAA,GAAA,EAAA,KAAM,CAAA,CAAA,CAAA,CAAA;;;;IEaP,KAAU,OAAO,OAAO,GAAa;CAChD,MAAM;CACN,UAAU;CACV,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,OAAO;CACP,YAAY;CACZ,MAAM;CACN,UAAU;CACV,YAAY;CACZ,SAAS;CACT,aAAa;CACb,WAAW;CACX,WAAW;CACX,aAAa;CACb,WAAW;CACX,aAAa;CACb,oBAAoB;CACpB,oBAAoB;CACpB,SAAS;CACT,cAAc;CACd,cAAc;CACd,aAAa;AACf,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolbar-DC-4XdHD.js","names":["$attrs","$attrs"],"sources":["../src/components/toolbar/context.ts","../src/components/toolbar/toolbar.ts","../src/components/toolbar/Toolbar.vue","../src/components/toolbar/Toolbar.vue","../src/components/toolbar/ToolbarButton.vue","../src/components/toolbar/ToolbarButton.vue","../src/components/toolbar/ToolbarInput.vue","../src/components/toolbar/ToolbarInput.vue","../src/components/toolbar/ToolbarInputGroup.vue","../src/components/toolbar/ToolbarInputGroup.vue","../src/components/toolbar/ToolbarLink.vue","../src/components/toolbar/ToolbarLink.vue","../src/components/toolbar/ToolbarSeparator.vue","../src/components/toolbar/ToolbarSeparator.vue","../src/components/toolbar/index.ts"],"sourcesContent":["import { inject, provide, type ComputedRef, type InjectionKey } from \"vue\";\nimport type { ToolbarOrientation, ToolbarSize } from \"./toolbar\";\n\nexport interface ToolbarContextValue {\n disabled: ComputedRef<boolean>;\n orientation: ComputedRef<ToolbarOrientation>;\n size: ComputedRef<ToolbarSize>;\n}\n\nconst toolbarContextKey: InjectionKey<ToolbarContextValue> = Symbol(\n \"kappa-toolbar\",\n);\n\nexport const provideToolbarContext = (context: ToolbarContextValue) => {\n provide(toolbarContextKey, context);\n};\n\nexport const useToolbarContext = () =>\n inject(toolbarContextKey, undefined);\n","import type { ButtonProps, ButtonSlots, LinkButtonProps } from \"../button/button\";\nimport type {\n InputGroupRootProps,\n InputGroupSlots,\n} from \"../input-group/input-group\";\nimport type { InputProps } from \"../input/input\";\nimport type { SeparatorProps } from \"../separator/separator\";\nimport type { HTMLAttributes, VNodeChild } from \"vue\";\n\nexport const TOOLBAR_ORIENTATIONS = [\"horizontal\", \"vertical\"] as const;\nexport const TOOLBAR_SIZES = [\"xs\", \"sm\", \"base\", \"lg\"] as const;\n\nexport type ToolbarOrientation = (typeof TOOLBAR_ORIENTATIONS)[number];\nexport type ToolbarSize = (typeof TOOLBAR_SIZES)[number];\n\nexport const TOOLBAR_DEFAULT_ORIENTATION =\n \"horizontal\" satisfies ToolbarOrientation;\nexport const TOOLBAR_DEFAULT_SIZE = \"base\" satisfies ToolbarSize;\nexport const TOOLBAR_DEFAULT_LOOP_FOCUS = true;\n\nconst includesOwn = <T extends string>(\n values: readonly T[],\n value: unknown,\n): value is T => typeof value === \"string\" && values.includes(value as T);\n\nexport const isToolbarOrientation = (\n value: unknown,\n): value is ToolbarOrientation => includesOwn(TOOLBAR_ORIENTATIONS, value);\n\nexport const isToolbarSize = (value: unknown): value is ToolbarSize =>\n includesOwn(TOOLBAR_SIZES, value);\n\nexport const resolveToolbarOrientation = (\n value: unknown,\n): ToolbarOrientation =>\n isToolbarOrientation(value) ? value : TOOLBAR_DEFAULT_ORIENTATION;\n\nexport const resolveToolbarSize = (value: unknown): ToolbarSize =>\n isToolbarSize(value) ? value : TOOLBAR_DEFAULT_SIZE;\n\nexport interface ToolbarRootProps\n extends /* @vue-ignore */ Omit<HTMLAttributes, \"role\"> {\n /** Layout axis used by arrow-key navigation. */\n orientation?: ToolbarOrientation;\n /** Shared density for supported toolbar controls. */\n size?: ToolbarSize;\n /** Disable navigation and mark the toolbar unavailable. */\n disabled?: boolean;\n /** Whether arrow navigation wraps from the last item to the first. */\n loopFocus?: boolean;\n}\n\nexport type ToolbarProps = ToolbarRootProps;\n\nexport interface ToolbarSlots {\n default?: () => VNodeChild;\n}\n\nexport type ToolbarButtonProps = Omit<ButtonProps, \"size\" | \"variant\">;\n\nexport type ToolbarButtonSlots = ButtonSlots;\n\nexport interface ToolbarLinkProps\n extends Omit<LinkButtonProps, \"size\" | \"variant\"> {}\n\nexport type ToolbarLinkSlots = ButtonSlots;\n\nexport type ToolbarInputProps = Omit<InputProps, \"size\">;\n\n/** Props consumed by Toolbar.Input; other input attributes remain in `$attrs`. */\nexport interface ToolbarInputComponentProps {\n disabled?: boolean;\n invalid?: boolean;\n modelValue?: string | number;\n passwordManagerIgnore?: boolean;\n}\n\nexport type ToolbarInputEmits = {\n \"update:modelValue\": [value: string];\n valueChange: [value: string];\n};\n\nexport interface ToolbarInputSlots {}\n\nexport type ToolbarInputGroupProps = Omit<InputGroupRootProps, \"size\">;\n\nexport type ToolbarInputGroupSlots = InputGroupSlots;\nexport type ToolbarSeparatorProps = SeparatorProps;\n\nexport interface ToolbarSeparatorSlots {}\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n onUnmounted,\n onUpdated,\n ref,\n useAttrs,\n} from \"vue\";\nimport { provideToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_LOOP_FOCUS,\n TOOLBAR_DEFAULT_ORIENTATION,\n TOOLBAR_DEFAULT_SIZE,\n resolveToolbarOrientation,\n resolveToolbarSize,\n type ToolbarProps,\n type ToolbarSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarProps>(), {\n disabled: false,\n loopFocus: TOOLBAR_DEFAULT_LOOP_FOCUS,\n orientation: TOOLBAR_DEFAULT_ORIENTATION,\n size: TOOLBAR_DEFAULT_SIZE,\n});\n\ndefineSlots<ToolbarSlots>();\n\nconst attrs = useAttrs();\nconst rootRef = ref<HTMLElement | null>(null);\nconst rovingTarget = ref<HTMLElement | null>(null);\nlet childObserver: MutationObserver | undefined;\n\nconst resolvedOrientation = computed(() =>\n resolveToolbarOrientation(props.orientation),\n);\nconst resolvedSize = computed(() => resolveToolbarSize(props.size));\nconst resolvedDisabled = computed(\n () =>\n props.disabled ||\n attrs[\"aria-disabled\"] === true ||\n attrs[\"aria-disabled\"] === \"true\",\n);\nconst resolvedAriaDisabled = computed(() =>\n resolvedDisabled.value\n ? \"true\"\n : attrs[\"aria-disabled\"] === false || attrs[\"aria-disabled\"] === \"false\"\n ? \"false\"\n : undefined,\n);\n\nprovideToolbarContext({\n disabled: resolvedDisabled,\n orientation: resolvedOrientation,\n size: resolvedSize,\n});\n\nconst focusableSelector = 'button, input, select, textarea, a[href], [tabindex]';\nconst toolbarItemSelector = \"[data-kappa-toolbar-item]\";\nconst toolbarInputGroupSelector = \"[data-kappa-toolbar-input-group]\";\n\ntype ToolbarEntry = {\n container: HTMLElement;\n enabled: boolean;\n target: HTMLElement;\n};\n\nconst isHidden = (element: HTMLElement) => {\n if (\n element.hidden ||\n Boolean(\n element.closest(\"[hidden], [aria-hidden='true'], [inert]\") ||\n element.matches(\"[inert]\"),\n )\n ) {\n return true;\n }\n\n const style = element.ownerDocument.defaultView?.getComputedStyle(element);\n return style?.display === \"none\" ||\n style?.visibility === \"hidden\" ||\n style?.visibility === \"collapse\";\n};\n\nconst isDisabled = (element: HTMLElement, container: HTMLElement) =>\n element.matches(\":disabled, [aria-disabled='true']\") ||\n container.matches(\":disabled, [aria-disabled='true']\") ||\n Boolean(element.closest(\"[aria-disabled='true']\"));\n\nconst targetFor = (container: HTMLElement) => {\n if (container.matches(focusableSelector)) return container;\n return container.querySelector<HTMLElement>(focusableSelector);\n};\n\nconst getEntries = (root: HTMLElement): ToolbarEntry[] => {\n const marked = Array.from(\n root.querySelectorAll<HTMLElement>(toolbarItemSelector),\n );\n const entries = marked.flatMap((container) => {\n if (isHidden(container)) return [];\n const targets = container.matches(toolbarInputGroupSelector)\n ? Array.from(container.querySelectorAll<HTMLElement>(focusableSelector)).filter(\n (target) => target.closest(toolbarItemSelector) === container,\n )\n : (() => {\n const target = targetFor(container);\n return target ? [target] : [];\n })();\n\n return targets\n .filter((target) => !isHidden(target))\n .map((target) => ({\n container,\n enabled: !isDisabled(target, container),\n target,\n }));\n });\n\n // A native control can still participate when a consumer composes one\n // directly inside Root. Marked non-group parts remain one toolbar item.\n const unmarked = Array.from(\n root.querySelectorAll<HTMLElement>(focusableSelector),\n )\n .filter((target) => !target.closest(toolbarItemSelector))\n .filter((target) => !isHidden(target))\n .map((target) => ({\n container: target,\n enabled: !isDisabled(target, target),\n target,\n }));\n\n return [...entries, ...unmarked].sort((left, right) => {\n if (left.target === right.target) return 0;\n return left.target.compareDocumentPosition(right.target) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1;\n });\n};\n\nconst syncTabStops = () => {\n const root = rootRef.value;\n if (!root) return;\n\n const entries = getEntries(root);\n const enabled = resolvedDisabled.value ? [] : entries.filter((entry) => entry.enabled);\n const activeElement = root.ownerDocument.activeElement;\n const focusedIndex = enabled.findIndex(\n (entry) =>\n entry.target === activeElement || entry.target.contains(activeElement),\n );\n const rovingIndex = enabled.findIndex(\n (entry) => entry.target === rovingTarget.value,\n );\n const selected = enabled[focusedIndex >= 0 ? focusedIndex : rovingIndex >= 0 ? rovingIndex : 0];\n\n for (const entry of entries) {\n const tabindex = selected && entry.target === selected.target ? \"0\" : \"-1\";\n if (entry.target.getAttribute(\"tabindex\") !== tabindex) {\n entry.target.setAttribute(\"tabindex\", tabindex);\n }\n }\n rovingTarget.value = selected?.target ?? null;\n};\n\nconst getDirection = (element: HTMLElement) => {\n const computedDirection = element.ownerDocument.defaultView?.getComputedStyle(\n element,\n ).direction;\n if (computedDirection === \"rtl\" || computedDirection === \"ltr\") {\n return computedDirection;\n }\n return element.closest<HTMLElement>(\"[dir]\")?.getAttribute(\"dir\") === \"rtl\"\n ? \"rtl\"\n : \"ltr\";\n};\n\nconst shouldKeepTextCursor = (event: KeyboardEvent, target: EventTarget | null) => {\n if (!(target instanceof HTMLTextAreaElement || target instanceof HTMLInputElement)) {\n return false;\n }\n\n const selectionStart = target.selectionStart;\n const selectionEnd = target.selectionEnd;\n if (selectionStart === null || selectionEnd === null) return false;\n const hasSelection = selectionStart !== selectionEnd;\n if (hasSelection) return true;\n\n const direction = getDirection(target);\n const value = target.value;\n const lineStart = target instanceof HTMLTextAreaElement\n ? value.lastIndexOf(\"\\n\", selectionStart - 1) + 1\n : 0;\n const lineBreak = target instanceof HTMLTextAreaElement\n ? value.indexOf(\"\\n\", selectionStart)\n : -1;\n const lineEnd = lineBreak === -1 ? value.length : lineBreak;\n\n if (event.key === \"ArrowLeft\") {\n return direction === \"rtl\" ? selectionEnd < lineEnd : selectionStart > lineStart;\n }\n if (event.key === \"ArrowRight\") {\n return direction === \"rtl\" ? selectionStart > lineStart : selectionEnd < lineEnd;\n }\n if (event.key === \"ArrowUp\") {\n return target instanceof HTMLTextAreaElement && lineStart > 0;\n }\n if (event.key === \"ArrowDown\") {\n return target instanceof HTMLTextAreaElement && lineEnd < value.length;\n }\n if (event.key === \"Home\") return selectionStart > lineStart;\n if (event.key === \"End\") return selectionEnd < lineEnd;\n return false;\n};\n\nconst shouldKeepNativeArrowKey = (\n event: KeyboardEvent,\n target: EventTarget | null,\n) => {\n if (target instanceof HTMLSelectElement) {\n if (![\"ArrowUp\", \"ArrowDown\"].includes(event.key)) return false;\n const selectedIndex = target.selectedIndex;\n if (selectedIndex < 0) return true;\n return event.key === \"ArrowUp\"\n ? selectedIndex > 0\n : selectedIndex < target.options.length - 1;\n }\n\n if (!(target instanceof HTMLInputElement)) return false;\n const inputType = target.type.toLowerCase();\n if (![\"number\", \"range\"].includes(inputType)) return false;\n\n const value = target.valueAsNumber;\n if (Number.isNaN(value)) return true;\n\n if (inputType === \"number\") {\n if (![\"ArrowUp\", \"ArrowDown\"].includes(event.key)) return false;\n const step = target.step === \"any\" ? 1 : Number(target.step) || 1;\n const nextValue = event.key === \"ArrowUp\" ? value + step : value - step;\n const min = target.min === \"\" ? undefined : Number(target.min);\n const max = target.max === \"\" ? undefined : Number(target.max);\n return (min === undefined || nextValue >= min) &&\n (max === undefined || nextValue <= max);\n }\n\n if (![\"ArrowLeft\", \"ArrowRight\", \"ArrowUp\", \"ArrowDown\"].includes(event.key)) {\n return false;\n }\n const min = target.min === \"\" ? 0 : Number(target.min);\n const max = target.max === \"\" ? 100 : Number(target.max);\n const isRtl = getDirection(target) === \"rtl\";\n const increases = event.key === \"ArrowUp\" ||\n (event.key === \"ArrowRight\" && !isRtl) ||\n (event.key === \"ArrowLeft\" && isRtl);\n return increases ? value < max : value > min;\n};\n\nconst handleKeydown = (event: KeyboardEvent) => {\n if (resolvedDisabled.value || event.altKey || event.ctrlKey || event.metaKey) return;\n if (!(event.currentTarget instanceof HTMLElement)) return;\n if (event.defaultPrevented) return;\n\n const isHorizontal = resolvedOrientation.value === \"horizontal\";\n const isRtl = getDirection(event.currentTarget) === \"rtl\";\n const forwardKey = isHorizontal\n ? isRtl\n ? \"ArrowLeft\"\n : \"ArrowRight\"\n : \"ArrowDown\";\n const backwardKey = isHorizontal\n ? isRtl\n ? \"ArrowRight\"\n : \"ArrowLeft\"\n : \"ArrowUp\";\n const isForward = event.key === forwardKey;\n const isBackward = event.key === backwardKey;\n const isHome = event.key === \"Home\";\n const isEnd = event.key === \"End\";\n\n if (!isForward && !isBackward && !isHome && !isEnd) return;\n if (\n shouldKeepTextCursor(event, event.target) ||\n shouldKeepNativeArrowKey(event, event.target)\n ) {\n return;\n }\n\n const enabled = getEntries(event.currentTarget).filter(\n (entry) => entry.enabled,\n );\n if (enabled.length === 0 || !(event.target instanceof Node)) return;\n\n const currentIndex = enabled.findIndex(\n (entry) =>\n entry.target === event.target || entry.target.contains(event.target as Node),\n );\n if (currentIndex < 0) return;\n\n const lastIndex = enabled.length - 1;\n let nextIndex = currentIndex;\n if (isHome) nextIndex = 0;\n else if (isEnd) nextIndex = lastIndex;\n else if (isBackward) {\n nextIndex = props.loopFocus\n ? (currentIndex - 1 + enabled.length) % enabled.length\n : Math.max(0, currentIndex - 1);\n } else if (isForward) {\n nextIndex = props.loopFocus\n ? (currentIndex + 1) % enabled.length\n : Math.min(lastIndex, currentIndex + 1);\n }\n\n event.preventDefault();\n const nextTarget = enabled[nextIndex]?.target;\n if (!nextTarget) return;\n rovingTarget.value = nextTarget;\n nextTarget.focus();\n syncTabStops();\n};\n\nconst handleFocusin = (event: FocusEvent) => {\n if (resolvedDisabled.value || !(event.target instanceof Node)) return;\n const root = rootRef.value;\n if (!root) return;\n const entry = getEntries(root).find((candidate) =>\n candidate.target === event.target || candidate.target.contains(event.target as Node),\n );\n if (!entry?.enabled) return;\n rovingTarget.value = entry.target;\n syncTabStops();\n};\n\nonMounted(() => {\n syncTabStops();\n childObserver = new MutationObserver(() => syncTabStops());\n childObserver.observe(rootRef.value as Node, {\n attributes: true,\n attributeFilter: [\n \"aria-disabled\",\n \"aria-hidden\",\n \"class\",\n \"disabled\",\n \"hidden\",\n \"inert\",\n \"style\",\n \"tabindex\",\n ],\n childList: true,\n subtree: true,\n });\n void nextTick(syncTabStops);\n});\n\nonUpdated(syncTabStops);\n\nonUnmounted(() => {\n childObserver?.disconnect();\n});\n</script>\n\n<template>\n <div\n ref=\"rootRef\"\n v-bind=\"$attrs\"\n class=\"kappa-toolbar\"\n data-slot=\"toolbar\"\n :data-disabled=\"resolvedDisabled ? '' : undefined\"\n :data-orientation=\"resolvedOrientation\"\n :data-size=\"resolvedSize\"\n role=\"toolbar\"\n :aria-disabled=\"resolvedAriaDisabled\"\n :aria-orientation=\"resolvedOrientation\"\n @focusin=\"handleFocusin\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </div>\n</template>\n\n<style src=\"./toolbar.css\"></style>\n","<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n onUnmounted,\n onUpdated,\n ref,\n useAttrs,\n} from \"vue\";\nimport { provideToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_LOOP_FOCUS,\n TOOLBAR_DEFAULT_ORIENTATION,\n TOOLBAR_DEFAULT_SIZE,\n resolveToolbarOrientation,\n resolveToolbarSize,\n type ToolbarProps,\n type ToolbarSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarProps>(), {\n disabled: false,\n loopFocus: TOOLBAR_DEFAULT_LOOP_FOCUS,\n orientation: TOOLBAR_DEFAULT_ORIENTATION,\n size: TOOLBAR_DEFAULT_SIZE,\n});\n\ndefineSlots<ToolbarSlots>();\n\nconst attrs = useAttrs();\nconst rootRef = ref<HTMLElement | null>(null);\nconst rovingTarget = ref<HTMLElement | null>(null);\nlet childObserver: MutationObserver | undefined;\n\nconst resolvedOrientation = computed(() =>\n resolveToolbarOrientation(props.orientation),\n);\nconst resolvedSize = computed(() => resolveToolbarSize(props.size));\nconst resolvedDisabled = computed(\n () =>\n props.disabled ||\n attrs[\"aria-disabled\"] === true ||\n attrs[\"aria-disabled\"] === \"true\",\n);\nconst resolvedAriaDisabled = computed(() =>\n resolvedDisabled.value\n ? \"true\"\n : attrs[\"aria-disabled\"] === false || attrs[\"aria-disabled\"] === \"false\"\n ? \"false\"\n : undefined,\n);\n\nprovideToolbarContext({\n disabled: resolvedDisabled,\n orientation: resolvedOrientation,\n size: resolvedSize,\n});\n\nconst focusableSelector = 'button, input, select, textarea, a[href], [tabindex]';\nconst toolbarItemSelector = \"[data-kappa-toolbar-item]\";\nconst toolbarInputGroupSelector = \"[data-kappa-toolbar-input-group]\";\n\ntype ToolbarEntry = {\n container: HTMLElement;\n enabled: boolean;\n target: HTMLElement;\n};\n\nconst isHidden = (element: HTMLElement) => {\n if (\n element.hidden ||\n Boolean(\n element.closest(\"[hidden], [aria-hidden='true'], [inert]\") ||\n element.matches(\"[inert]\"),\n )\n ) {\n return true;\n }\n\n const style = element.ownerDocument.defaultView?.getComputedStyle(element);\n return style?.display === \"none\" ||\n style?.visibility === \"hidden\" ||\n style?.visibility === \"collapse\";\n};\n\nconst isDisabled = (element: HTMLElement, container: HTMLElement) =>\n element.matches(\":disabled, [aria-disabled='true']\") ||\n container.matches(\":disabled, [aria-disabled='true']\") ||\n Boolean(element.closest(\"[aria-disabled='true']\"));\n\nconst targetFor = (container: HTMLElement) => {\n if (container.matches(focusableSelector)) return container;\n return container.querySelector<HTMLElement>(focusableSelector);\n};\n\nconst getEntries = (root: HTMLElement): ToolbarEntry[] => {\n const marked = Array.from(\n root.querySelectorAll<HTMLElement>(toolbarItemSelector),\n );\n const entries = marked.flatMap((container) => {\n if (isHidden(container)) return [];\n const targets = container.matches(toolbarInputGroupSelector)\n ? Array.from(container.querySelectorAll<HTMLElement>(focusableSelector)).filter(\n (target) => target.closest(toolbarItemSelector) === container,\n )\n : (() => {\n const target = targetFor(container);\n return target ? [target] : [];\n })();\n\n return targets\n .filter((target) => !isHidden(target))\n .map((target) => ({\n container,\n enabled: !isDisabled(target, container),\n target,\n }));\n });\n\n // A native control can still participate when a consumer composes one\n // directly inside Root. Marked non-group parts remain one toolbar item.\n const unmarked = Array.from(\n root.querySelectorAll<HTMLElement>(focusableSelector),\n )\n .filter((target) => !target.closest(toolbarItemSelector))\n .filter((target) => !isHidden(target))\n .map((target) => ({\n container: target,\n enabled: !isDisabled(target, target),\n target,\n }));\n\n return [...entries, ...unmarked].sort((left, right) => {\n if (left.target === right.target) return 0;\n return left.target.compareDocumentPosition(right.target) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1;\n });\n};\n\nconst syncTabStops = () => {\n const root = rootRef.value;\n if (!root) return;\n\n const entries = getEntries(root);\n const enabled = resolvedDisabled.value ? [] : entries.filter((entry) => entry.enabled);\n const activeElement = root.ownerDocument.activeElement;\n const focusedIndex = enabled.findIndex(\n (entry) =>\n entry.target === activeElement || entry.target.contains(activeElement),\n );\n const rovingIndex = enabled.findIndex(\n (entry) => entry.target === rovingTarget.value,\n );\n const selected = enabled[focusedIndex >= 0 ? focusedIndex : rovingIndex >= 0 ? rovingIndex : 0];\n\n for (const entry of entries) {\n const tabindex = selected && entry.target === selected.target ? \"0\" : \"-1\";\n if (entry.target.getAttribute(\"tabindex\") !== tabindex) {\n entry.target.setAttribute(\"tabindex\", tabindex);\n }\n }\n rovingTarget.value = selected?.target ?? null;\n};\n\nconst getDirection = (element: HTMLElement) => {\n const computedDirection = element.ownerDocument.defaultView?.getComputedStyle(\n element,\n ).direction;\n if (computedDirection === \"rtl\" || computedDirection === \"ltr\") {\n return computedDirection;\n }\n return element.closest<HTMLElement>(\"[dir]\")?.getAttribute(\"dir\") === \"rtl\"\n ? \"rtl\"\n : \"ltr\";\n};\n\nconst shouldKeepTextCursor = (event: KeyboardEvent, target: EventTarget | null) => {\n if (!(target instanceof HTMLTextAreaElement || target instanceof HTMLInputElement)) {\n return false;\n }\n\n const selectionStart = target.selectionStart;\n const selectionEnd = target.selectionEnd;\n if (selectionStart === null || selectionEnd === null) return false;\n const hasSelection = selectionStart !== selectionEnd;\n if (hasSelection) return true;\n\n const direction = getDirection(target);\n const value = target.value;\n const lineStart = target instanceof HTMLTextAreaElement\n ? value.lastIndexOf(\"\\n\", selectionStart - 1) + 1\n : 0;\n const lineBreak = target instanceof HTMLTextAreaElement\n ? value.indexOf(\"\\n\", selectionStart)\n : -1;\n const lineEnd = lineBreak === -1 ? value.length : lineBreak;\n\n if (event.key === \"ArrowLeft\") {\n return direction === \"rtl\" ? selectionEnd < lineEnd : selectionStart > lineStart;\n }\n if (event.key === \"ArrowRight\") {\n return direction === \"rtl\" ? selectionStart > lineStart : selectionEnd < lineEnd;\n }\n if (event.key === \"ArrowUp\") {\n return target instanceof HTMLTextAreaElement && lineStart > 0;\n }\n if (event.key === \"ArrowDown\") {\n return target instanceof HTMLTextAreaElement && lineEnd < value.length;\n }\n if (event.key === \"Home\") return selectionStart > lineStart;\n if (event.key === \"End\") return selectionEnd < lineEnd;\n return false;\n};\n\nconst shouldKeepNativeArrowKey = (\n event: KeyboardEvent,\n target: EventTarget | null,\n) => {\n if (target instanceof HTMLSelectElement) {\n if (![\"ArrowUp\", \"ArrowDown\"].includes(event.key)) return false;\n const selectedIndex = target.selectedIndex;\n if (selectedIndex < 0) return true;\n return event.key === \"ArrowUp\"\n ? selectedIndex > 0\n : selectedIndex < target.options.length - 1;\n }\n\n if (!(target instanceof HTMLInputElement)) return false;\n const inputType = target.type.toLowerCase();\n if (![\"number\", \"range\"].includes(inputType)) return false;\n\n const value = target.valueAsNumber;\n if (Number.isNaN(value)) return true;\n\n if (inputType === \"number\") {\n if (![\"ArrowUp\", \"ArrowDown\"].includes(event.key)) return false;\n const step = target.step === \"any\" ? 1 : Number(target.step) || 1;\n const nextValue = event.key === \"ArrowUp\" ? value + step : value - step;\n const min = target.min === \"\" ? undefined : Number(target.min);\n const max = target.max === \"\" ? undefined : Number(target.max);\n return (min === undefined || nextValue >= min) &&\n (max === undefined || nextValue <= max);\n }\n\n if (![\"ArrowLeft\", \"ArrowRight\", \"ArrowUp\", \"ArrowDown\"].includes(event.key)) {\n return false;\n }\n const min = target.min === \"\" ? 0 : Number(target.min);\n const max = target.max === \"\" ? 100 : Number(target.max);\n const isRtl = getDirection(target) === \"rtl\";\n const increases = event.key === \"ArrowUp\" ||\n (event.key === \"ArrowRight\" && !isRtl) ||\n (event.key === \"ArrowLeft\" && isRtl);\n return increases ? value < max : value > min;\n};\n\nconst handleKeydown = (event: KeyboardEvent) => {\n if (resolvedDisabled.value || event.altKey || event.ctrlKey || event.metaKey) return;\n if (!(event.currentTarget instanceof HTMLElement)) return;\n if (event.defaultPrevented) return;\n\n const isHorizontal = resolvedOrientation.value === \"horizontal\";\n const isRtl = getDirection(event.currentTarget) === \"rtl\";\n const forwardKey = isHorizontal\n ? isRtl\n ? \"ArrowLeft\"\n : \"ArrowRight\"\n : \"ArrowDown\";\n const backwardKey = isHorizontal\n ? isRtl\n ? \"ArrowRight\"\n : \"ArrowLeft\"\n : \"ArrowUp\";\n const isForward = event.key === forwardKey;\n const isBackward = event.key === backwardKey;\n const isHome = event.key === \"Home\";\n const isEnd = event.key === \"End\";\n\n if (!isForward && !isBackward && !isHome && !isEnd) return;\n if (\n shouldKeepTextCursor(event, event.target) ||\n shouldKeepNativeArrowKey(event, event.target)\n ) {\n return;\n }\n\n const enabled = getEntries(event.currentTarget).filter(\n (entry) => entry.enabled,\n );\n if (enabled.length === 0 || !(event.target instanceof Node)) return;\n\n const currentIndex = enabled.findIndex(\n (entry) =>\n entry.target === event.target || entry.target.contains(event.target as Node),\n );\n if (currentIndex < 0) return;\n\n const lastIndex = enabled.length - 1;\n let nextIndex = currentIndex;\n if (isHome) nextIndex = 0;\n else if (isEnd) nextIndex = lastIndex;\n else if (isBackward) {\n nextIndex = props.loopFocus\n ? (currentIndex - 1 + enabled.length) % enabled.length\n : Math.max(0, currentIndex - 1);\n } else if (isForward) {\n nextIndex = props.loopFocus\n ? (currentIndex + 1) % enabled.length\n : Math.min(lastIndex, currentIndex + 1);\n }\n\n event.preventDefault();\n const nextTarget = enabled[nextIndex]?.target;\n if (!nextTarget) return;\n rovingTarget.value = nextTarget;\n nextTarget.focus();\n syncTabStops();\n};\n\nconst handleFocusin = (event: FocusEvent) => {\n if (resolvedDisabled.value || !(event.target instanceof Node)) return;\n const root = rootRef.value;\n if (!root) return;\n const entry = getEntries(root).find((candidate) =>\n candidate.target === event.target || candidate.target.contains(event.target as Node),\n );\n if (!entry?.enabled) return;\n rovingTarget.value = entry.target;\n syncTabStops();\n};\n\nonMounted(() => {\n syncTabStops();\n childObserver = new MutationObserver(() => syncTabStops());\n childObserver.observe(rootRef.value as Node, {\n attributes: true,\n attributeFilter: [\n \"aria-disabled\",\n \"aria-hidden\",\n \"class\",\n \"disabled\",\n \"hidden\",\n \"inert\",\n \"style\",\n \"tabindex\",\n ],\n childList: true,\n subtree: true,\n });\n void nextTick(syncTabStops);\n});\n\nonUpdated(syncTabStops);\n\nonUnmounted(() => {\n childObserver?.disconnect();\n});\n</script>\n\n<template>\n <div\n ref=\"rootRef\"\n v-bind=\"$attrs\"\n class=\"kappa-toolbar\"\n data-slot=\"toolbar\"\n :data-disabled=\"resolvedDisabled ? '' : undefined\"\n :data-orientation=\"resolvedOrientation\"\n :data-size=\"resolvedSize\"\n role=\"toolbar\"\n :aria-disabled=\"resolvedAriaDisabled\"\n :aria-orientation=\"resolvedOrientation\"\n @focusin=\"handleFocusin\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </div>\n</template>\n\n<style src=\"./toolbar.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots } from \"vue\";\nimport { Button } from \"../button\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarButtonProps,\n type ToolbarButtonSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarButtonProps>(), {\n disabled: false,\n icon: undefined,\n iconProps: undefined,\n loading: false,\n shape: undefined,\n type: \"button\",\n});\n\ndefineSlots<ToolbarButtonSlots>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst toolbar = useToolbarContext();\n\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst resolvedShape = computed(() =>\n props.shape ?? (!slots.default && props.icon ? \"square\" : \"base\"),\n);\nconst nativeDisabled = computed(\n () => props.loading || props.disabled || Boolean(toolbar?.disabled.value),\n);\nconst buttonAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(\n ([key]) =>\n ![\"size\", \"variant\"].includes(key),\n ),\n ),\n);\n</script>\n\n<template>\n <Button\n v-bind=\"buttonAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__button\"\n data-kappa-component=\"Toolbar.Button\"\n data-kappa-toolbar-item=\"\"\n :disabled=\"nativeDisabled\"\n :full-width=\"props.fullWidth\"\n :icon=\"props.icon\"\n :icon-position=\"props.iconPosition\"\n :icon-props=\"props.iconProps\"\n :loading=\"props.loading\"\n :shape=\"resolvedShape\"\n :size=\"resolvedSize\"\n :title=\"props.title\"\n :type=\"props.type\"\n variant=\"ghost\"\n >\n <slot />\n </Button>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots } from \"vue\";\nimport { Button } from \"../button\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarButtonProps,\n type ToolbarButtonSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarButtonProps>(), {\n disabled: false,\n icon: undefined,\n iconProps: undefined,\n loading: false,\n shape: undefined,\n type: \"button\",\n});\n\ndefineSlots<ToolbarButtonSlots>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst toolbar = useToolbarContext();\n\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst resolvedShape = computed(() =>\n props.shape ?? (!slots.default && props.icon ? \"square\" : \"base\"),\n);\nconst nativeDisabled = computed(\n () => props.loading || props.disabled || Boolean(toolbar?.disabled.value),\n);\nconst buttonAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(\n ([key]) =>\n ![\"size\", \"variant\"].includes(key),\n ),\n ),\n);\n</script>\n\n<template>\n <Button\n v-bind=\"buttonAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__button\"\n data-kappa-component=\"Toolbar.Button\"\n data-kappa-toolbar-item=\"\"\n :disabled=\"nativeDisabled\"\n :full-width=\"props.fullWidth\"\n :icon=\"props.icon\"\n :icon-position=\"props.iconPosition\"\n :icon-props=\"props.iconProps\"\n :loading=\"props.loading\"\n :shape=\"resolvedShape\"\n :size=\"resolvedSize\"\n :title=\"props.title\"\n :type=\"props.type\"\n variant=\"ghost\"\n >\n <slot />\n </Button>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { Input } from \"../input\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarInputComponentProps,\n type ToolbarInputEmits,\n type ToolbarInputSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarInputComponentProps>(), {\n disabled: false,\n invalid: false,\n modelValue: undefined,\n passwordManagerIgnore: false,\n});\n\nconst emit = defineEmits<ToolbarInputEmits>();\ndefineSlots<ToolbarInputSlots>();\n\nconst attrs = useAttrs();\nconst toolbar = useToolbarContext();\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst nativeDisabled = computed(\n () => props.disabled || Boolean(toolbar?.disabled.value),\n);\nconst inputAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(\n ([key]) => key !== \"size\",\n ),\n ),\n);\n\nconst handleUpdate = (value: string) => {\n emit(\"update:modelValue\", value);\n emit(\"valueChange\", value);\n};\n</script>\n\n<template>\n <Input\n v-bind=\"inputAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__input\"\n data-kappa-component=\"Toolbar.Input\"\n data-kappa-toolbar-item=\"\"\n :disabled=\"nativeDisabled\"\n :invalid=\"props.invalid\"\n :model-value=\"props.modelValue\"\n :password-manager-ignore=\"props.passwordManagerIgnore\"\n :size=\"resolvedSize\"\n @update:model-value=\"handleUpdate\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { Input } from \"../input\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarInputComponentProps,\n type ToolbarInputEmits,\n type ToolbarInputSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarInputComponentProps>(), {\n disabled: false,\n invalid: false,\n modelValue: undefined,\n passwordManagerIgnore: false,\n});\n\nconst emit = defineEmits<ToolbarInputEmits>();\ndefineSlots<ToolbarInputSlots>();\n\nconst attrs = useAttrs();\nconst toolbar = useToolbarContext();\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst nativeDisabled = computed(\n () => props.disabled || Boolean(toolbar?.disabled.value),\n);\nconst inputAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(\n ([key]) => key !== \"size\",\n ),\n ),\n);\n\nconst handleUpdate = (value: string) => {\n emit(\"update:modelValue\", value);\n emit(\"valueChange\", value);\n};\n</script>\n\n<template>\n <Input\n v-bind=\"inputAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__input\"\n data-kappa-component=\"Toolbar.Input\"\n data-kappa-toolbar-item=\"\"\n :disabled=\"nativeDisabled\"\n :invalid=\"props.invalid\"\n :model-value=\"props.modelValue\"\n :password-manager-ignore=\"props.passwordManagerIgnore\"\n :size=\"resolvedSize\"\n @update:model-value=\"handleUpdate\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { InputGroup } from \"../input-group\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarInputGroupProps,\n type ToolbarInputGroupSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarInputGroupProps>(), {\n disabled: false,\n invalid: false,\n});\n\ndefineSlots<ToolbarInputGroupSlots>();\n\nconst attrs = useAttrs();\nconst toolbar = useToolbarContext();\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst nativeDisabled = computed(\n () => props.disabled || Boolean(toolbar?.disabled.value),\n);\nconst groupAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(([key]) => key !== \"size\"),\n ),\n);\n</script>\n\n<template>\n <InputGroup\n v-bind=\"groupAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__input-group\"\n data-kappa-component=\"Toolbar.InputGroup\"\n data-kappa-toolbar-item=\"\"\n data-kappa-toolbar-input-group=\"\"\n :disabled=\"nativeDisabled\"\n :invalid=\"props.invalid\"\n :size=\"resolvedSize\"\n >\n <slot />\n </InputGroup>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs } from \"vue\";\nimport { InputGroup } from \"../input-group\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarInputGroupProps,\n type ToolbarInputGroupSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarInputGroupProps>(), {\n disabled: false,\n invalid: false,\n});\n\ndefineSlots<ToolbarInputGroupSlots>();\n\nconst attrs = useAttrs();\nconst toolbar = useToolbarContext();\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst nativeDisabled = computed(\n () => props.disabled || Boolean(toolbar?.disabled.value),\n);\nconst groupAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(([key]) => key !== \"size\"),\n ),\n);\n</script>\n\n<template>\n <InputGroup\n v-bind=\"groupAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__input-group\"\n data-kappa-component=\"Toolbar.InputGroup\"\n data-kappa-toolbar-item=\"\"\n data-kappa-toolbar-input-group=\"\"\n :disabled=\"nativeDisabled\"\n :invalid=\"props.invalid\"\n :size=\"resolvedSize\"\n >\n <slot />\n </InputGroup>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots } from \"vue\";\nimport { LinkButton } from \"../button\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarLinkProps,\n type ToolbarLinkSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarLinkProps>(), {\n asChild: false,\n disabled: false,\n external: false,\n href: undefined,\n icon: undefined,\n iconProps: undefined,\n shape: undefined,\n title: undefined,\n});\n\ndefineSlots<ToolbarLinkSlots>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst toolbar = useToolbarContext();\n\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst resolvedShape = computed(() =>\n props.shape ?? (!slots.default && props.icon ? \"square\" : \"base\"),\n);\nconst linkAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(([key]) => ![\"size\", \"variant\"].includes(key)),\n ),\n);\nconst resolvedDisabled = computed(\n () => props.disabled || Boolean(toolbar?.disabled.value),\n);\n</script>\n\n<template>\n <LinkButton\n v-bind=\"linkAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__button kappa-toolbar__link\"\n data-kappa-component=\"Toolbar.Link\"\n data-kappa-toolbar-item=\"\"\n :as-child=\"props.asChild\"\n :disabled=\"resolvedDisabled\"\n :external=\"props.external\"\n :full-width=\"props.fullWidth\"\n :href=\"props.href\"\n :icon=\"props.icon\"\n :icon-position=\"props.iconPosition\"\n :icon-props=\"props.iconProps\"\n :shape=\"resolvedShape\"\n :size=\"resolvedSize\"\n :title=\"props.title\"\n variant=\"ghost\"\n >\n <slot />\n </LinkButton>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots } from \"vue\";\nimport { LinkButton } from \"../button\";\nimport { useToolbarContext } from \"./context\";\nimport {\n TOOLBAR_DEFAULT_SIZE,\n type ToolbarLinkProps,\n type ToolbarLinkSlots,\n} from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarLinkProps>(), {\n asChild: false,\n disabled: false,\n external: false,\n href: undefined,\n icon: undefined,\n iconProps: undefined,\n shape: undefined,\n title: undefined,\n});\n\ndefineSlots<ToolbarLinkSlots>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst toolbar = useToolbarContext();\n\nconst resolvedSize = computed(() => toolbar?.size.value ?? TOOLBAR_DEFAULT_SIZE);\nconst resolvedShape = computed(() =>\n props.shape ?? (!slots.default && props.icon ? \"square\" : \"base\"),\n);\nconst linkAttrs = computed(() =>\n Object.fromEntries(\n Object.entries(attrs).filter(([key]) => ![\"size\", \"variant\"].includes(key)),\n ),\n);\nconst resolvedDisabled = computed(\n () => props.disabled || Boolean(toolbar?.disabled.value),\n);\n</script>\n\n<template>\n <LinkButton\n v-bind=\"linkAttrs\"\n class=\"kappa-toolbar__item kappa-toolbar__button kappa-toolbar__link\"\n data-kappa-component=\"Toolbar.Link\"\n data-kappa-toolbar-item=\"\"\n :as-child=\"props.asChild\"\n :disabled=\"resolvedDisabled\"\n :external=\"props.external\"\n :full-width=\"props.fullWidth\"\n :href=\"props.href\"\n :icon=\"props.icon\"\n :icon-position=\"props.iconPosition\"\n :icon-props=\"props.iconProps\"\n :shape=\"resolvedShape\"\n :size=\"resolvedSize\"\n :title=\"props.title\"\n variant=\"ghost\"\n >\n <slot />\n </LinkButton>\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Separator } from \"../separator\";\nimport { useToolbarContext } from \"./context\";\nimport type { ToolbarSeparatorProps, ToolbarSeparatorSlots } from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarSeparatorProps>(), {\n decorative: true,\n orientation: undefined,\n});\n\ndefineSlots<ToolbarSeparatorSlots>();\n\nconst toolbar = useToolbarContext();\nconst resolvedOrientation = computed(\n () =>\n props.orientation ??\n (toolbar?.orientation.value === \"vertical\" ? \"horizontal\" : \"vertical\"),\n);\n</script>\n\n<template>\n <Separator\n v-bind=\"$attrs\"\n class=\"kappa-toolbar__separator\"\n data-kappa-component=\"Toolbar.Separator\"\n :decorative=\"props.decorative\"\n :orientation=\"resolvedOrientation\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Separator } from \"../separator\";\nimport { useToolbarContext } from \"./context\";\nimport type { ToolbarSeparatorProps, ToolbarSeparatorSlots } from \"./toolbar\";\n\ndefineOptions({ inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ToolbarSeparatorProps>(), {\n decorative: true,\n orientation: undefined,\n});\n\ndefineSlots<ToolbarSeparatorSlots>();\n\nconst toolbar = useToolbarContext();\nconst resolvedOrientation = computed(\n () =>\n props.orientation ??\n (toolbar?.orientation.value === \"vertical\" ? \"horizontal\" : \"vertical\"),\n);\n</script>\n\n<template>\n <Separator\n v-bind=\"$attrs\"\n class=\"kappa-toolbar__separator\"\n data-kappa-component=\"Toolbar.Separator\"\n :decorative=\"props.decorative\"\n :orientation=\"resolvedOrientation\"\n />\n</template>\n","import ToolbarRoot from \"./Toolbar.vue\";\nimport ToolbarButton from \"./ToolbarButton.vue\";\nimport ToolbarInput from \"./ToolbarInput.vue\";\nimport ToolbarInputGroup from \"./ToolbarInputGroup.vue\";\nimport ToolbarLink from \"./ToolbarLink.vue\";\nimport ToolbarSeparator from \"./ToolbarSeparator.vue\";\n\nexport const Toolbar = Object.assign(ToolbarRoot, {\n Root: ToolbarRoot,\n Button: ToolbarButton,\n Link: ToolbarLink,\n Input: ToolbarInput,\n InputGroup: ToolbarInputGroup,\n Separator: ToolbarSeparator,\n});\n\nexport {\n ToolbarButton,\n ToolbarInput,\n ToolbarInputGroup,\n ToolbarLink,\n ToolbarRoot,\n ToolbarSeparator,\n};\n\nexport type {\n ToolbarButtonProps,\n ToolbarButtonSlots,\n ToolbarInputGroupProps,\n ToolbarInputGroupSlots,\n ToolbarInputEmits,\n ToolbarInputProps,\n ToolbarInputSlots,\n ToolbarLinkProps,\n ToolbarLinkSlots,\n ToolbarOrientation,\n ToolbarProps,\n ToolbarRootProps,\n ToolbarSeparatorProps,\n ToolbarSeparatorSlots,\n ToolbarSize,\n ToolbarSlots,\n} from \"./toolbar\";\n\nexport {\n TOOLBAR_DEFAULT_LOOP_FOCUS,\n TOOLBAR_DEFAULT_ORIENTATION,\n TOOLBAR_DEFAULT_SIZE,\n TOOLBAR_ORIENTATIONS,\n TOOLBAR_SIZES,\n isToolbarOrientation,\n isToolbarSize,\n resolveToolbarOrientation,\n resolveToolbarSize,\n} from \"./toolbar\";\n"],"mappings":";;;;;;;AASA,IAAM,IAAuD,OAC3D,eACF,GAEa,KAAyB,MAAiC;CACrE,EAAQ,GAAmB,CAAO;AACpC,GAEa,UACX,EAAO,GAAmB,KAAA,CAAS,GCTxB,IAAuB,CAAC,cAAc,UAAU,GAChD,IAAgB;CAAC;CAAM;CAAM;CAAQ;AAAI,GAKzC,IACX,cACW,IAAuB,QACvB,IAA6B,IAEpC,KACJ,GACA,MACe,OAAO,KAAU,YAAY,EAAO,SAAS,CAAU,GAE3D,KACX,MACgC,EAAY,GAAsB,CAAK,GAE5D,KAAiB,MAC5B,EAAY,GAAe,CAAK,GAErB,KACX,MAEA,EAAqB,CAAK,IAAI,IAAQ,GAE3B,KAAsB,MACjC,EAAc,CAAK,IAAI,IAAQ;;;;;;GCuB3B,IAAoB,wDACpB,IAAsB,6BACtB,IAA4B;;;;;;;;;;;;;;;;EAxClC,IAAM,IAAQ,GASR,IAAQ,EAAS,GACjB,IAAU,EAAwB,IAAI,GACtC,IAAe,EAAwB,IAAI,GAC7C,GAEE,IAAsB,QAC1B,EAA0B,EAAM,WAAW,CAC7C,GACM,IAAe,QAAe,EAAmB,EAAM,IAAI,CAAC,GAC5D,IAAmB,QAErB,EAAM,YACN,EAAM,qBAAqB,MAC3B,EAAM,qBAAqB,MAC/B,GACM,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