@dicehub/kappa 1.0.0 → 1.1.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.
- package/CHANGELOG.md +19 -0
- package/dist/{app-shell-PGvfb1aZ.js → app-shell-BeYS5h5q.js} +53 -45
- package/dist/{app-shell-PGvfb1aZ.js.map → app-shell-BeYS5h5q.js.map} +1 -1
- package/dist/blocks/app-shell.js +1 -1
- package/dist/blocks/file-browser.js +1 -1
- package/dist/blocks/sidebar-layout/SidebarLayout.vue.d.ts +2 -0
- package/dist/blocks/sidebar-layout.js +1 -1
- package/dist/{breadcrumbs-CPfb83sY.js → breadcrumbs-Nh5QvVSR.js} +62 -22
- package/dist/breadcrumbs-Nh5QvVSR.js.map +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.vue.d.ts +1 -0
- package/dist/components/breadcrumbs/BreadcrumbsTrigger.vue.d.ts +14 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +18 -1
- package/dist/components/breadcrumbs/index.d.ts +4 -2
- package/dist/components/breadcrumbs.js +2 -2
- package/dist/components/sidebar/SidebarProvider.vue.d.ts +2 -0
- package/dist/components/sidebar/sidebar-preferred-width.d.ts +12 -0
- package/dist/components/sidebar/sidebar-resize.d.ts +9 -0
- package/dist/components/sidebar/sidebar-smart-resize.d.ts +22 -0
- package/dist/components/sidebar/sidebar.d.ts +6 -0
- package/dist/components/sidebar.js +1 -1
- package/dist/{file-browser-BxOJWvrF.js → file-browser-CAGvIXr9.js} +2 -2
- package/dist/{file-browser-BxOJWvrF.js.map → file-browser-CAGvIXr9.js.map} +1 -1
- package/dist/index.js +105 -105
- package/dist/registry/component-registry.json +6 -5
- package/dist/registry/generated.d.ts +14 -6
- package/dist/{registry-Bgb2nbb2.js → registry-BvRgKksA.js} +16 -6
- package/dist/registry-BvRgKksA.js.map +1 -0
- package/dist/registry.js +1 -1
- package/dist/{sidebar-9TqPqgDD.js → sidebar-DPCWLFHj.js} +360 -216
- package/dist/sidebar-DPCWLFHj.js.map +1 -0
- package/dist/{sidebar-layout-DRe1HpSt.js → sidebar-layout-CDGqskKn.js} +4 -2
- package/dist/{sidebar-layout-DRe1HpSt.js.map → sidebar-layout-CDGqskKn.js.map} +1 -1
- package/dist/styles/kappa.css +1 -1
- package/dist/styles/theme-kappa.css +6 -1
- package/dist/styles/tokens.json +13 -0
- package/package.json +1 -1
- package/dist/breadcrumbs-CPfb83sY.js.map +0 -1
- package/dist/registry-Bgb2nbb2.js.map +0 -1
- package/dist/sidebar-9TqPqgDD.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-DPCWLFHj.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-preferred-width.ts","../src/components/sidebar/sidebar-smart-resize.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 mobileBreakpointReference: \"viewport\",\n width: \"16.25rem\",\n collapsedWidth: \"3.25rem\",\n mobileWidth: \"18rem\",\n resizable: false,\n collapseOnResize: true,\n smartResize: false,\n showSnapGuide: false,\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\";\nexport type SidebarMobileBreakpointReference = \"viewport\" | \"container\";\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 /** Reference widths below this value use the mobile drawer. Zero disables it. */\n mobileBreakpoint?: number;\n /** Measure the viewport or the Provider's content-box width for mobile mode. */\n mobileBreakpointReference?: SidebarMobileBreakpointReference;\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 /** Snap to defaultWidth immediately, then learn a preferred width. Keyboard resizing stays unsnapped. */\n smartResize?: boolean;\n /** Show the snap zone when smart resizing is enabled. Does not change resize behavior. */\n showSnapGuide?: 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","interface WidthSample { width: number; time: number }\nexport interface WidthHistory { samples: WidthSample[]; preferred: number | null }\nexport const SIDEBAR_SNAP_DISTANCE = 10;\n\n/** A bounded, recency-weighted estimate. Updated only after a completed drag. */\nexport function recordPreferredWidth(history: WidthHistory, width: number, time: number, initialPoint: number | null): WidthHistory {\n const last = history.samples.at(-1);\n // A quick correction replaces the previous adjustment instead of adding a vote.\n const previous = last && time - last.time < 2000 ? history.samples.slice(0, -1) : history.samples;\n const samples = [...previous, { width, time }].slice(-40);\n const votes = samples.map((sample, index) => ({\n width: sample.width, weight: 2 ** ((index + 1 - samples.length) / 5),\n }));\n const density = (at: number) => votes.reduce((sum, vote) =>\n sum + vote.weight * Math.exp(-((at - vote.width) ** 2) / 128), 0);\n const seed = votes.reduce((best, vote) => density(vote.width) > density(best.width) ? vote : best);\n const nearby = votes.filter(vote => Math.abs(vote.width - seed.width) <= 16);\n const support = nearby.reduce((sum, vote) => sum + vote.weight, 0);\n if (support < 2.5) return { samples, preferred: history.preferred };\n const candidate = Math.round(nearby.reduce((sum, vote) => sum + vote.width * vote.weight, 0) / support);\n // Fine adjustments stay reachable without moving the reference on each release.\n const reference = initialPoint ?? history.preferred;\n const preferred = reference !== null && Math.abs(candidate - reference) <= SIDEBAR_SNAP_DISTANCE\n ? reference : candidate;\n return { samples, preferred };\n}\n","import { computed, onScopeDispose, ref, shallowRef, watch } from \"vue\";\nimport { recordPreferredWidth, SIDEBAR_SNAP_DISTANCE, type WidthHistory } from \"./sidebar-preferred-width\";\n\ninterface SmartResizeOptions {\n enabled: () => boolean;\n width: () => number;\n defaultWidth: () => number;\n setWidth: (width: number) => void;\n open: () => boolean;\n geometry: () => readonly number[];\n}\n\n/** Applies a preferred width to Ark's pointer requests without replacing its interaction. */\nexport function useSidebarSmartResize(options: SmartResizeOptions) {\n const history = shallowRef<WidthHistory>({ samples: [], preferred: null });\n let beforeDrag = history.value;\n let beforeClickPair = history.value;\n const caught = ref(false);\n const targetPoint = computed(() => {\n if (!options.enabled()) return null;\n const [min, max] = options.geometry();\n const preferred = history.value.preferred;\n const target = preferred !== null && preferred >= min && preferred <= max ? preferred : options.defaultWidth();\n return target >= min && target <= max ? target : null;\n });\n let disposePointer: (() => void) | undefined;\n let dwell: ReturnType<typeof setTimeout> | undefined;\n let dragging = false;\n let pointerMove: PointerEvent | undefined;\n let changed = false;\n let hand = 0;\n const snapped = ref(false);\n let pausePosition = 0;\n let freeFrom: number | undefined;\n let point: number | null = null;\n let lastTarget: number | undefined;\n\n function clearDwell() { clearTimeout(dwell); dwell = undefined; }\n function stopPointer() {\n clearDwell();\n disposePointer?.();\n disposePointer = undefined;\n dragging = false;\n pointerMove = undefined;\n snapped.value = false;\n freeFrom = undefined;\n }\n function cancel() { stopPointer(); caught.value = false; }\n\n function start(event: PointerEvent) {\n if (!options.enabled() || event.button !== 0 || !event.isPrimary) return;\n stopPointer();\n beforeDrag = history.value;\n const target = event.currentTarget as HTMLElement;\n const doc = target.ownerDocument;\n const win = doc.defaultView;\n const pointerId = event.pointerId;\n const [, , , side] = options.geometry();\n const origin = event.clientX;\n const initialWidth = options.width();\n const direction = side ? -1 : 1;\n point = targetPoint.value;\n dragging = true;\n changed = false;\n lastTarget = undefined;\n const move = (next: PointerEvent) => {\n if (next.pointerId !== pointerId) return;\n if (next.pointerType === \"mouse\" && next.buttons === 0) { cancel(); return; }\n // Ark reads this same event in the bubble phase. Other resize requests bypass snapping.\n pointerMove = next;\n // Retain overshoot: Ark's requested width is already clamped at the bounds.\n hand = initialWidth + (next.clientX - origin) * direction;\n };\n const finishMove = (next: PointerEvent) => {\n // Ark omits equal-size requests. Still track a hold at a bound and retain\n // the fine-adjustment offset when the raw request equals the displayed edge.\n if (pointerMove === next && (snapped.value || freeFrom !== undefined) && options.open()) {\n options.setWidth(apply(options.width(), false));\n }\n };\n const finish = (next: PointerEvent) => {\n if (next.pointerId !== pointerId) return;\n const width = options.width();\n const record = next.type === \"pointerup\" && changed && options.open()\n && lastTarget !== undefined && Math.abs(width - lastTarget) < 0.5;\n if (next.type === \"pointerup\") stopPointer();\n else cancel();\n if (record) history.value = recordPreferredWidth(history.value, Math.round(width), Date.now(), point);\n };\n const lost = (next: PointerEvent) => { if (next.pointerId === pointerId) cancel(); };\n doc.addEventListener(\"pointermove\", move, true);\n doc.addEventListener(\"pointerup\", finish, true);\n doc.addEventListener(\"pointercancel\", finish, true);\n doc.addEventListener(\"contextmenu\", cancel, true);\n target.addEventListener(\"lostpointercapture\", lost);\n win?.addEventListener(\"blur\", cancel);\n win?.addEventListener(\"pointermove\", finishMove);\n disposePointer = () => {\n doc.removeEventListener(\"pointermove\", move, true);\n doc.removeEventListener(\"pointerup\", finish, true);\n doc.removeEventListener(\"pointercancel\", finish, true);\n doc.removeEventListener(\"contextmenu\", cancel, true);\n target.removeEventListener(\"lostpointercapture\", lost);\n win?.removeEventListener(\"blur\", cancel);\n win?.removeEventListener(\"pointermove\", finishMove);\n };\n }\n\n function apply(requested: number, collapsed: boolean) {\n if (!dragging || !pointerMove?.eventPhase || !options.enabled()) return requested;\n pointerMove = undefined;\n changed = true;\n if (collapsed) {\n lastTarget = undefined;\n clearDwell();\n snapped.value = false;\n freeFrom = undefined;\n return requested;\n }\n const accept = (value: number) => {\n const [min, max] = options.geometry();\n lastTarget = Math.max(min, Math.min(max, value));\n return lastTarget;\n };\n if (point === null) return accept(requested);\n if (freeFrom !== undefined) return accept(point + hand - freeFrom);\n if (Math.abs(hand - point) > SIDEBAR_SNAP_DISTANCE) {\n clearDwell();\n snapped.value = false;\n return accept(requested);\n }\n const [min, max] = options.geometry();\n if (hand < min || hand > max) {\n // A pause outside the range must not anchor fine movement beyond a bound.\n clearDwell();\n snapped.value = true;\n return accept(point);\n }\n if (!dwell || !snapped.value || Math.abs(hand - pausePosition) > SIDEBAR_SNAP_DISTANCE / 6) {\n clearDwell();\n pausePosition = hand;\n dwell = setTimeout(() => {\n if (!dragging || !snapped.value) return;\n freeFrom = hand;\n snapped.value = false;\n }, 300);\n }\n snapped.value = true;\n return accept(point);\n }\n\n watch([options.enabled, options.geometry], cancel, { flush: \"sync\" });\n onScopeDispose(cancel);\n const visiblySnapped = computed(() => snapped.value && options.open()\n && point !== null && Math.abs(options.width() - point) < 0.5);\n const inZone = computed(() => options.open() && targetPoint.value !== null\n && Math.abs(options.width() - targetPoint.value) <= SIDEBAR_SNAP_DISTANCE);\n watch(visiblySnapped, holding => { if (holding) caught.value = true; }, { flush: \"sync\" });\n watch(inZone, inside => { if (!inside) caught.value = false; }, { flush: \"sync\" });\n const zone = computed(() => options.open() && targetPoint.value !== null\n ? { width: targetPoint.value, radius: SIDEBAR_SNAP_DISTANCE, active: caught.value && inZone.value }\n : null);\n // Only the browser knows whether two releases form a double-click. A reset\n // discards movement from both clicks and keeps any earlier width samples.\n function click(event: MouseEvent) {\n if (!options.enabled()) return;\n if (event.detail === 1) beforeClickPair = beforeDrag;\n if (event.detail === 2) history.value = beforeClickPair;\n }\n return { start, apply, cancel, click, snapped: visiblySnapped, zone };\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\";\nimport { useSidebarSmartResize } from \"./sidebar-smart-resize\";\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 defaultSize: ComputedRef<number>;\n setIsResizing: (value: boolean) => void;\n startPointer: (event: PointerEvent) => void;\n cancelSnap: () => void;\n clickHandle: (event: MouseEvent) => void;\n snapped: Readonly<Ref<boolean>>;\n snapZone: ComputedRef<{ width: number; radius: number; active: boolean } | null>;\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 const snapGeometry = computed(() => [bounds.value.minWidth, range.value.max, groupWidth.value, sidebarIndex.value] as const);\n const snap = useSidebarSmartResize({\n enabled: () => enabled.value && !!props.smartResize,\n width: () => options.open.value ? width.value : range.value.collapsed, open: () => options.open.value,\n defaultWidth: () => clampSidebarWidth(props.defaultWidth, bounds.value.minWidth, bounds.value.maxWidth),\n setWidth,\n geometry: () => snapGeometry.value,\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: groupWidth.value > 0 ? 24 / groupWidth.value * 100 : 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 const adjusted = snap.apply(next, isCollapsed);\n if (!isCollapsed) setWidth(adjusted);\n },\n onResizeEnd: () => { if (enabled.value) options.onResizeEnd(width.value); },\n };\n });\n const defaultSize = computed(() => groupWidth.value > 0\n ? clampSidebarWidth(props.defaultWidth, bounds.value.minWidth, bounds.value.maxWidth) / groupWidth.value * 100\n : 25);\n const snapZone = computed(() => props.showSnapGuide ? snap.zone.value : null);\n provide(resizeKey, { props: splitterProps, handleId, range, canCollapse, defaultSize, startPointer: snap.start, cancelSnap: snap.cancel, clickHandle: snap.click, snapped: snap.snapped, snapZone, 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 narrowLayout = 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(() => narrowLayout.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 if (breakpoint === 0) {\n narrowLayout.value = false;\n return;\n }\n if (props.mobileBreakpointReference === \"container\") {\n const root = layout.value;\n if (!root) return;\n const observer = new ResizeObserver(([entry]) => {\n // Hidden previews have no available width. Retain their state until shown.\n if (entry && entry.contentRect.width > 0) narrowLayout.value = entry.contentRect.width < breakpoint;\n });\n observer.observe(root);\n onCleanup(() => observer.disconnect());\n return;\n }\n const media = window.matchMedia(`(width < ${breakpoint}px)`);\n const update = () => { narrowLayout.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 narrowLayout = 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(() => narrowLayout.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 if (breakpoint === 0) {\n narrowLayout.value = false;\n return;\n }\n if (props.mobileBreakpointReference === \"container\") {\n const root = layout.value;\n if (!root) return;\n const observer = new ResizeObserver(([entry]) => {\n // Hidden previews have no available width. Retain their state until shown.\n if (entry && entry.contentRect.width > 0) narrowLayout.value = entry.contentRect.width < breakpoint;\n });\n observer.observe(root);\n onCleanup(() => observer.disconnect());\n return;\n }\n const media = window.matchMedia(`(width < ${breakpoint}px)`);\n const update = () => { narrowLayout.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}\nfunction resetWidth() {\n resize.cancelSnap();\n if (!props.disabled) api.value.resizePanel(\"navigation\", resize.defaultSize.value);\n}\nwatch(() => api.value.dragging, resize.setIsResizing);\nwatch(() => props.disabled, disabled => { if (disabled) resize.cancelSnap(); });\nonScopeDispose(() => { resize.cancelSnap(); resize.setIsResizing(false); });\n</script>\n\n<template>\n <span\n v-if=\"resize.snapZone.value && !props.disabled\"\n class=\"kappa-sidebar__snap-zone\"\n data-slot=\"sidebar-snap-zone\"\n :data-active=\"resize.snapZone.value.active || undefined\"\n aria-hidden=\"true\"\n :style=\"{\n '--kappa-sidebar-snap-point': `${resize.snapZone.value.width}px`,\n '--kappa-sidebar-snap-radius': `${resize.snapZone.value.radius}px`,\n }\"\n />\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 :data-snapped=\"resize.snapped.value || undefined\"\n @keydown.capture=\"toggleTrailingPanel\"\n @pointerdown.capture=\"!props.disabled && resize.startPointer($event)\"\n @click=\"!props.disabled && resize.clickHandle($event)\"\n @dblclick.prevent=\"resetWidth\"\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}\nfunction resetWidth() {\n resize.cancelSnap();\n if (!props.disabled) api.value.resizePanel(\"navigation\", resize.defaultSize.value);\n}\nwatch(() => api.value.dragging, resize.setIsResizing);\nwatch(() => props.disabled, disabled => { if (disabled) resize.cancelSnap(); });\nonScopeDispose(() => { resize.cancelSnap(); resize.setIsResizing(false); });\n</script>\n\n<template>\n <span\n v-if=\"resize.snapZone.value && !props.disabled\"\n class=\"kappa-sidebar__snap-zone\"\n data-slot=\"sidebar-snap-zone\"\n :data-active=\"resize.snapZone.value.active || undefined\"\n aria-hidden=\"true\"\n :style=\"{\n '--kappa-sidebar-snap-point': `${resize.snapZone.value.width}px`,\n '--kappa-sidebar-snap-radius': `${resize.snapZone.value.radius}px`,\n }\"\n />\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 :data-snapped=\"resize.snapped.value || undefined\"\n @keydown.capture=\"toggleTrailingPanel\"\n @pointerdown.capture=\"!props.disabled && resize.startPointer($event)\"\n @click=\"!props.disabled && resize.clickHandle($event)\"\n @dblclick.prevent=\"resetWidth\"\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, SidebarMobileBreakpointReference, SidebarOpenChangeDetails,\n SidebarPartProps, SidebarTriggerProps, SidebarCloseProps,\n SidebarMenuButtonProps, SidebarMenuButtonSlots,\n SidebarCollapsibleProps, SidebarCollapsibleEmits,\n SidebarCollapsibleTriggerProps, SidebarCollapsibleContentProps, SidebarLoadingProps,\n SidebarResizeHandleProps, SidebarResizeDetails, SidebarSlidingViewsProps, SidebarSlidingViewProps,\n} from \"./sidebar\";\n"],"mappings":";;;;;;;;AA8BA,IAAa,KAAkD,OAAO,cAAc;AAEpF,SAAgB,IAAoC;CAClD,IAAM,IAAU,EAAO,EAAiB;CACxC,IAAI,CAAC,GAAS,MAAU,MAAM,wDAAwD;CACtF,OAAO;AACT;;;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AW,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,4 +1,4 @@
|
|
|
1
|
-
import { D as e, k as t, t as n } from "./sidebar-
|
|
1
|
+
import { D as e, k as t, t as n } from "./sidebar-DPCWLFHj.js";
|
|
2
2
|
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeDefaults as d, mergeProps as f, nextTick as p, normalizeProps as m, openBlock as h, ref as g, renderSlot as _, unref as v, watch as y, withCtx as b } from "vue";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/blocks/sidebar-layout/SidebarLayoutSecondary.vue
|
|
@@ -91,6 +91,8 @@ var E = {
|
|
|
91
91
|
mobileWidth: {},
|
|
92
92
|
resizable: { type: Boolean },
|
|
93
93
|
collapseOnResize: { type: Boolean },
|
|
94
|
+
smartResize: { type: Boolean },
|
|
95
|
+
showSnapGuide: { type: Boolean },
|
|
94
96
|
resizeWidth: {},
|
|
95
97
|
defaultWidth: {},
|
|
96
98
|
minWidth: {},
|
|
@@ -209,4 +211,4 @@ var E = {
|
|
|
209
211
|
//#endregion
|
|
210
212
|
export { C as n, S as r, P as t };
|
|
211
213
|
|
|
212
|
-
//# sourceMappingURL=sidebar-layout-
|
|
214
|
+
//# sourceMappingURL=sidebar-layout-CDGqskKn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-layout-DRe1HpSt.js","names":["$attrs","$slots"],"sources":["../src/blocks/sidebar-layout/SidebarLayoutSecondary.vue","../src/blocks/sidebar-layout/SidebarLayoutSecondary.vue","../src/blocks/sidebar-layout/sidebar-layout.ts","../src/blocks/sidebar-layout/SidebarLayout.vue","../src/blocks/sidebar-layout/SidebarLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { nextTick, ref, watch } from \"vue\";\nimport { Sidebar, useSidebarContext } from \"../../components/sidebar\";\n\ndefineProps<{ label: string }>();\nconst sidebar = useSidebarContext();\nconst content = ref<{ $el: HTMLElement }>();\nwatch(sidebar.iconCollapsed, async (hidden) => {\n const element = content.value?.$el;\n if (!hidden || !element?.contains(document.activeElement)) return;\n const toggle = element.closest(\".kappa-sidebar-layout\")?.querySelector<HTMLElement>('.kappa-sidebar-layout__toolbar [data-slot=\"sidebar-trigger\"]');\n await nextTick();\n toggle?.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <Sidebar.Content ref=\"content\" :aria-label=\"label\" class=\"kappa-sidebar-layout__secondary\" :hidden=\"sidebar.iconCollapsed.value\" :inert=\"sidebar.iconCollapsed.value || undefined\"><slot /></Sidebar.Content>\n</template>\n","<script setup lang=\"ts\">\nimport { nextTick, ref, watch } from \"vue\";\nimport { Sidebar, useSidebarContext } from \"../../components/sidebar\";\n\ndefineProps<{ label: string }>();\nconst sidebar = useSidebarContext();\nconst content = ref<{ $el: HTMLElement }>();\nwatch(sidebar.iconCollapsed, async (hidden) => {\n const element = content.value?.$el;\n if (!hidden || !element?.contains(document.activeElement)) return;\n const toggle = element.closest(\".kappa-sidebar-layout\")?.querySelector<HTMLElement>('.kappa-sidebar-layout__toolbar [data-slot=\"sidebar-trigger\"]');\n await nextTick();\n toggle?.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <Sidebar.Content ref=\"content\" :aria-label=\"label\" class=\"kappa-sidebar-layout__secondary\" :hidden=\"sidebar.iconCollapsed.value\" :inert=\"sidebar.iconCollapsed.value || undefined\"><slot /></Sidebar.Content>\n</template>\n","import type { VNodeChild } from \"vue\";\nimport type { SidebarContextValue, SidebarProviderEmits, SidebarProviderProps, SidebarTriggerProps } from \"../../components/sidebar\";\n\nexport const SIDEBAR_LAYOUT_VARIANTS = [\"workspace\", \"rail\", \"inset\", \"floating\", \"split\", \"header\"] as const;\nexport type SidebarLayoutVariant = (typeof SIDEBAR_LAYOUT_VARIANTS)[number];\nexport type SidebarLayoutContentAlignment = \"available\" | \"shell\";\n\nexport const SIDEBAR_LAYOUT_DEFAULTS = {\n variant: \"workspace\",\n contentAlignment: \"shell\",\n contentMaxWidth: \"72rem\",\n mobileBreakpointReference: \"viewport\",\n label: \"Application navigation\",\n navigationLabel: \"Navigation links\",\n secondaryLabel: \"Secondary navigation\",\n closeLabel: \"Close navigation\",\n resizeLabel: \"Resize sidebar\",\n fullScreenOnMobile: false,\n} as const;\n\nexport interface SidebarLayoutProps extends SidebarProviderProps {\n variant?: SidebarLayoutVariant;\n /** Center bounded content in the shell when it fits, or use all available space. */\n contentAlignment?: SidebarLayoutContentAlignment;\n /** Maximum content width in shell alignment. A CSS length, including page padding. */\n contentMaxWidth?: string;\n /** Name of the navigation landmark and mobile dialog. */\n label?: string;\n navigationLabel?: string;\n /** Attributes for the navigation element, including its mobile instance. */\n navigationProps?: Record<string, unknown>;\n secondaryLabel?: string;\n closeLabel?: string;\n resizeLabel?: string;\n fullScreenOnMobile?: boolean;\n /** Translated labels and disabled state for the built-in toggle. */\n triggerProps?: SidebarTriggerProps;\n}\n\nexport type SidebarLayoutEmits = SidebarProviderEmits;\nexport interface SidebarLayoutSlots {\n header?: (context: SidebarContextValue) => VNodeChild;\n navigation?: (context: SidebarContextValue) => VNodeChild;\n footer?: (context: SidebarContextValue) => VNodeChild;\n /** Used by split; hidden with the collapsed rail and stacked on mobile. */\n secondary?: (context: SidebarContextValue) => VNodeChild;\n /** Content before the header toggle, such as a brand link. Preserves DOM and tab order. */\n \"toolbar-start\"?: (context: SidebarContextValue) => VNodeChild;\n /** Optional replacement for the built-in header toggle. Compose Sidebar.Trigger. */\n \"toolbar-trigger\"?: (context: SidebarContextValue) => VNodeChild;\n /** Content after the built-in toggle; in the site header for header. */\n toolbar?: (context: SidebarContextValue) => VNodeChild;\n /** Shell-level tools, outside the main content region. */\n rail?: (context: SidebarContextValue) => VNodeChild;\n default?: (context: SidebarContextValue) => VNodeChild;\n}\n\nexport function sidebarLayoutDefaultOpen(variant: SidebarLayoutVariant): boolean {\n return variant !== \"rail\";\n}\n\nexport function sidebarLayoutDefaultWidth(variant: SidebarLayoutVariant): number {\n return variant === \"split\" ? 352 : 260;\n}\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Sidebar, SIDEBAR_DEFAULTS } from \"../../components/sidebar\";\nimport SidebarLayoutSecondary from \"./SidebarLayoutSecondary.vue\";\nimport {\n SIDEBAR_LAYOUT_DEFAULTS, sidebarLayoutDefaultOpen, sidebarLayoutDefaultWidth,\n type SidebarLayoutEmits, type SidebarLayoutProps, type SidebarLayoutSlots,\n} from \"./sidebar-layout\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLayoutProps>(), {\n ...SIDEBAR_DEFAULTS, ...SIDEBAR_LAYOUT_DEFAULTS,\n open: undefined, mobileOpen: undefined, defaultOpen: undefined,\n width: undefined, defaultWidth: undefined,\n});\nconst emit = defineEmits<SidebarLayoutEmits>();\ndefineSlots<SidebarLayoutSlots>();\nconst providerProps = computed(() => {\n const { variant, contentAlignment, contentMaxWidth, label, navigationLabel, navigationProps, secondaryLabel, closeLabel, resizeLabel, fullScreenOnMobile, triggerProps, ...provider } = props;\n return {\n ...provider,\n defaultOpen: props.defaultOpen ?? sidebarLayoutDefaultOpen(variant),\n width: props.width ?? `${sidebarLayoutDefaultWidth(variant)}px`,\n defaultWidth: props.defaultWidth ?? sidebarLayoutDefaultWidth(variant),\n };\n});\n</script>\n\n<template>\n <Sidebar.Provider\n v-bind=\"{ ...$attrs, ...providerProps }\"\n class=\"kappa-sidebar-layout\" :data-variant=\"props.variant\" :data-side=\"props.side\"\n :data-content-alignment=\"props.contentAlignment\" :data-collapsible=\"props.collapsible\"\n :style=\"{ '--kappa-sidebar-layout-content-max-width': props.contentMaxWidth }\"\n @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @update:mobile-open=\"emit('update:mobileOpen', $event)\" @mobile-open-change=\"emit('mobileOpenChange', $event)\"\n @update:resize-width=\"emit('update:resizeWidth', $event)\" @resize=\"emit('resize', $event)\" @resize-end=\"emit('resizeEnd', $event)\"\n >\n <Sidebar.Context v-slot=\"context\">\n <header v-if=\"props.variant === 'header'\" class=\"kappa-sidebar-layout__toolbar kappa-sidebar-layout__site-header\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__body\">\n <Sidebar.Root v-bind=\"props.navigationProps\" :label=\"props.label\" :full-screen-on-mobile=\"props.fullScreenOnMobile\" class=\"kappa-sidebar-layout__navigation\" :data-layout=\"props.variant\">\n <Sidebar.Header>\n <slot name=\"header\" v-bind=\"context\" />\n <Sidebar.Close :label=\"props.closeLabel\" />\n </Sidebar.Header>\n <div class=\"kappa-sidebar-layout__columns\">\n <Sidebar.Content :aria-label=\"props.navigationLabel\" class=\"kappa-sidebar-layout__primary\">\n <slot name=\"navigation\" v-bind=\"context\" />\n </Sidebar.Content>\n <SidebarLayoutSecondary\n v-if=\"props.variant === 'split' && $slots.secondary\"\n :label=\"props.secondaryLabel\"\n ><slot name=\"secondary\" v-bind=\"context\" /></SidebarLayoutSecondary>\n </div>\n <Sidebar.Footer v-if=\"$slots.footer\"><slot name=\"footer\" v-bind=\"context\" /></Sidebar.Footer>\n <Sidebar.ResizeHandle v-if=\"props.resizable\" :label=\"props.resizeLabel\" />\n </Sidebar.Root>\n <div class=\"kappa-sidebar-layout__main\">\n <header v-if=\"props.variant !== 'header'\" class=\"kappa-sidebar-layout__toolbar\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__content-frame\">\n <div class=\"kappa-sidebar-layout__content\"><div class=\"kappa-sidebar-layout__content-body\"><slot v-bind=\"context\" /></div></div>\n </div>\n </div>\n <slot name=\"rail\" v-bind=\"context\" />\n </div>\n </Sidebar.Context>\n </Sidebar.Provider>\n</template>\n\n<style src=\"./sidebar-layout.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Sidebar, SIDEBAR_DEFAULTS } from \"../../components/sidebar\";\nimport SidebarLayoutSecondary from \"./SidebarLayoutSecondary.vue\";\nimport {\n SIDEBAR_LAYOUT_DEFAULTS, sidebarLayoutDefaultOpen, sidebarLayoutDefaultWidth,\n type SidebarLayoutEmits, type SidebarLayoutProps, type SidebarLayoutSlots,\n} from \"./sidebar-layout\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLayoutProps>(), {\n ...SIDEBAR_DEFAULTS, ...SIDEBAR_LAYOUT_DEFAULTS,\n open: undefined, mobileOpen: undefined, defaultOpen: undefined,\n width: undefined, defaultWidth: undefined,\n});\nconst emit = defineEmits<SidebarLayoutEmits>();\ndefineSlots<SidebarLayoutSlots>();\nconst providerProps = computed(() => {\n const { variant, contentAlignment, contentMaxWidth, label, navigationLabel, navigationProps, secondaryLabel, closeLabel, resizeLabel, fullScreenOnMobile, triggerProps, ...provider } = props;\n return {\n ...provider,\n defaultOpen: props.defaultOpen ?? sidebarLayoutDefaultOpen(variant),\n width: props.width ?? `${sidebarLayoutDefaultWidth(variant)}px`,\n defaultWidth: props.defaultWidth ?? sidebarLayoutDefaultWidth(variant),\n };\n});\n</script>\n\n<template>\n <Sidebar.Provider\n v-bind=\"{ ...$attrs, ...providerProps }\"\n class=\"kappa-sidebar-layout\" :data-variant=\"props.variant\" :data-side=\"props.side\"\n :data-content-alignment=\"props.contentAlignment\" :data-collapsible=\"props.collapsible\"\n :style=\"{ '--kappa-sidebar-layout-content-max-width': props.contentMaxWidth }\"\n @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @update:mobile-open=\"emit('update:mobileOpen', $event)\" @mobile-open-change=\"emit('mobileOpenChange', $event)\"\n @update:resize-width=\"emit('update:resizeWidth', $event)\" @resize=\"emit('resize', $event)\" @resize-end=\"emit('resizeEnd', $event)\"\n >\n <Sidebar.Context v-slot=\"context\">\n <header v-if=\"props.variant === 'header'\" class=\"kappa-sidebar-layout__toolbar kappa-sidebar-layout__site-header\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__body\">\n <Sidebar.Root v-bind=\"props.navigationProps\" :label=\"props.label\" :full-screen-on-mobile=\"props.fullScreenOnMobile\" class=\"kappa-sidebar-layout__navigation\" :data-layout=\"props.variant\">\n <Sidebar.Header>\n <slot name=\"header\" v-bind=\"context\" />\n <Sidebar.Close :label=\"props.closeLabel\" />\n </Sidebar.Header>\n <div class=\"kappa-sidebar-layout__columns\">\n <Sidebar.Content :aria-label=\"props.navigationLabel\" class=\"kappa-sidebar-layout__primary\">\n <slot name=\"navigation\" v-bind=\"context\" />\n </Sidebar.Content>\n <SidebarLayoutSecondary\n v-if=\"props.variant === 'split' && $slots.secondary\"\n :label=\"props.secondaryLabel\"\n ><slot name=\"secondary\" v-bind=\"context\" /></SidebarLayoutSecondary>\n </div>\n <Sidebar.Footer v-if=\"$slots.footer\"><slot name=\"footer\" v-bind=\"context\" /></Sidebar.Footer>\n <Sidebar.ResizeHandle v-if=\"props.resizable\" :label=\"props.resizeLabel\" />\n </Sidebar.Root>\n <div class=\"kappa-sidebar-layout__main\">\n <header v-if=\"props.variant !== 'header'\" class=\"kappa-sidebar-layout__toolbar\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__content-frame\">\n <div class=\"kappa-sidebar-layout__content\"><div class=\"kappa-sidebar-layout__content-body\"><slot v-bind=\"context\" /></div></div>\n </div>\n </div>\n <slot name=\"rail\" v-bind=\"context\" />\n </div>\n </Sidebar.Context>\n </Sidebar.Provider>\n</template>\n\n<style src=\"./sidebar-layout.css\"></style>\n"],"mappings":";;;;;;;;EAKA,IAAM,IAAU,EAAkB,GAC5B,IAAU,EAA0B;SAC1C,EAAM,EAAQ,eAAe,OAAO,MAAW;GAC7C,IAAM,IAAU,EAAQ,OAAO;GAC/B,IAAI,CAAC,KAAU,CAAC,GAAS,SAAS,SAAS,aAAa,GAAG;GAC3D,IAAM,IAAS,EAAQ,QAAQ,uBAAuB,CAAC,EAAE,cAA2B,gEAA8D;GAElJ,AADA,MAAM,EAAS,GACf,GAAQ,MAAM,EAAE,eAAe,GAAK,CAAC;EACvC,CAAC,cAIC,EAAA,GAAA,EAA6M,EAAA,CAAA,CAAA,CAAA,SAAA;GAAxL,SAAA;GAAJ,KAAI;GAAW,cAAY,EAAA;GAAO,OAAM;GAAmC,QAAQ,EAAA,CAAA,CAAO,CAAC,cAAc;GAAQ,OAAO,EAAA,CAAA,CAAO,CAAC,cAAc,SAAS,KA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,CAAA,CAAA;KAGpH,EAAqC,EAAA,QAAA,QAAA,EAAA,EAAX,CAAO,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"sidebar-layout-CDGqskKn.js","names":["$attrs","$slots"],"sources":["../src/blocks/sidebar-layout/SidebarLayoutSecondary.vue","../src/blocks/sidebar-layout/SidebarLayoutSecondary.vue","../src/blocks/sidebar-layout/sidebar-layout.ts","../src/blocks/sidebar-layout/SidebarLayout.vue","../src/blocks/sidebar-layout/SidebarLayout.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { nextTick, ref, watch } from \"vue\";\nimport { Sidebar, useSidebarContext } from \"../../components/sidebar\";\n\ndefineProps<{ label: string }>();\nconst sidebar = useSidebarContext();\nconst content = ref<{ $el: HTMLElement }>();\nwatch(sidebar.iconCollapsed, async (hidden) => {\n const element = content.value?.$el;\n if (!hidden || !element?.contains(document.activeElement)) return;\n const toggle = element.closest(\".kappa-sidebar-layout\")?.querySelector<HTMLElement>('.kappa-sidebar-layout__toolbar [data-slot=\"sidebar-trigger\"]');\n await nextTick();\n toggle?.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <Sidebar.Content ref=\"content\" :aria-label=\"label\" class=\"kappa-sidebar-layout__secondary\" :hidden=\"sidebar.iconCollapsed.value\" :inert=\"sidebar.iconCollapsed.value || undefined\"><slot /></Sidebar.Content>\n</template>\n","<script setup lang=\"ts\">\nimport { nextTick, ref, watch } from \"vue\";\nimport { Sidebar, useSidebarContext } from \"../../components/sidebar\";\n\ndefineProps<{ label: string }>();\nconst sidebar = useSidebarContext();\nconst content = ref<{ $el: HTMLElement }>();\nwatch(sidebar.iconCollapsed, async (hidden) => {\n const element = content.value?.$el;\n if (!hidden || !element?.contains(document.activeElement)) return;\n const toggle = element.closest(\".kappa-sidebar-layout\")?.querySelector<HTMLElement>('.kappa-sidebar-layout__toolbar [data-slot=\"sidebar-trigger\"]');\n await nextTick();\n toggle?.focus({ preventScroll: true });\n});\n</script>\n\n<template>\n <Sidebar.Content ref=\"content\" :aria-label=\"label\" class=\"kappa-sidebar-layout__secondary\" :hidden=\"sidebar.iconCollapsed.value\" :inert=\"sidebar.iconCollapsed.value || undefined\"><slot /></Sidebar.Content>\n</template>\n","import type { VNodeChild } from \"vue\";\nimport type { SidebarContextValue, SidebarProviderEmits, SidebarProviderProps, SidebarTriggerProps } from \"../../components/sidebar\";\n\nexport const SIDEBAR_LAYOUT_VARIANTS = [\"workspace\", \"rail\", \"inset\", \"floating\", \"split\", \"header\"] as const;\nexport type SidebarLayoutVariant = (typeof SIDEBAR_LAYOUT_VARIANTS)[number];\nexport type SidebarLayoutContentAlignment = \"available\" | \"shell\";\n\nexport const SIDEBAR_LAYOUT_DEFAULTS = {\n variant: \"workspace\",\n contentAlignment: \"shell\",\n contentMaxWidth: \"72rem\",\n mobileBreakpointReference: \"viewport\",\n label: \"Application navigation\",\n navigationLabel: \"Navigation links\",\n secondaryLabel: \"Secondary navigation\",\n closeLabel: \"Close navigation\",\n resizeLabel: \"Resize sidebar\",\n fullScreenOnMobile: false,\n} as const;\n\nexport interface SidebarLayoutProps extends SidebarProviderProps {\n variant?: SidebarLayoutVariant;\n /** Center bounded content in the shell when it fits, or use all available space. */\n contentAlignment?: SidebarLayoutContentAlignment;\n /** Maximum content width in shell alignment. A CSS length, including page padding. */\n contentMaxWidth?: string;\n /** Name of the navigation landmark and mobile dialog. */\n label?: string;\n navigationLabel?: string;\n /** Attributes for the navigation element, including its mobile instance. */\n navigationProps?: Record<string, unknown>;\n secondaryLabel?: string;\n closeLabel?: string;\n resizeLabel?: string;\n fullScreenOnMobile?: boolean;\n /** Translated labels and disabled state for the built-in toggle. */\n triggerProps?: SidebarTriggerProps;\n}\n\nexport type SidebarLayoutEmits = SidebarProviderEmits;\nexport interface SidebarLayoutSlots {\n header?: (context: SidebarContextValue) => VNodeChild;\n navigation?: (context: SidebarContextValue) => VNodeChild;\n footer?: (context: SidebarContextValue) => VNodeChild;\n /** Used by split; hidden with the collapsed rail and stacked on mobile. */\n secondary?: (context: SidebarContextValue) => VNodeChild;\n /** Content before the header toggle, such as a brand link. Preserves DOM and tab order. */\n \"toolbar-start\"?: (context: SidebarContextValue) => VNodeChild;\n /** Optional replacement for the built-in header toggle. Compose Sidebar.Trigger. */\n \"toolbar-trigger\"?: (context: SidebarContextValue) => VNodeChild;\n /** Content after the built-in toggle; in the site header for header. */\n toolbar?: (context: SidebarContextValue) => VNodeChild;\n /** Shell-level tools, outside the main content region. */\n rail?: (context: SidebarContextValue) => VNodeChild;\n default?: (context: SidebarContextValue) => VNodeChild;\n}\n\nexport function sidebarLayoutDefaultOpen(variant: SidebarLayoutVariant): boolean {\n return variant !== \"rail\";\n}\n\nexport function sidebarLayoutDefaultWidth(variant: SidebarLayoutVariant): number {\n return variant === \"split\" ? 352 : 260;\n}\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Sidebar, SIDEBAR_DEFAULTS } from \"../../components/sidebar\";\nimport SidebarLayoutSecondary from \"./SidebarLayoutSecondary.vue\";\nimport {\n SIDEBAR_LAYOUT_DEFAULTS, sidebarLayoutDefaultOpen, sidebarLayoutDefaultWidth,\n type SidebarLayoutEmits, type SidebarLayoutProps, type SidebarLayoutSlots,\n} from \"./sidebar-layout\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLayoutProps>(), {\n ...SIDEBAR_DEFAULTS, ...SIDEBAR_LAYOUT_DEFAULTS,\n open: undefined, mobileOpen: undefined, defaultOpen: undefined,\n width: undefined, defaultWidth: undefined,\n});\nconst emit = defineEmits<SidebarLayoutEmits>();\ndefineSlots<SidebarLayoutSlots>();\nconst providerProps = computed(() => {\n const { variant, contentAlignment, contentMaxWidth, label, navigationLabel, navigationProps, secondaryLabel, closeLabel, resizeLabel, fullScreenOnMobile, triggerProps, ...provider } = props;\n return {\n ...provider,\n defaultOpen: props.defaultOpen ?? sidebarLayoutDefaultOpen(variant),\n width: props.width ?? `${sidebarLayoutDefaultWidth(variant)}px`,\n defaultWidth: props.defaultWidth ?? sidebarLayoutDefaultWidth(variant),\n };\n});\n</script>\n\n<template>\n <Sidebar.Provider\n v-bind=\"{ ...$attrs, ...providerProps }\"\n class=\"kappa-sidebar-layout\" :data-variant=\"props.variant\" :data-side=\"props.side\"\n :data-content-alignment=\"props.contentAlignment\" :data-collapsible=\"props.collapsible\"\n :style=\"{ '--kappa-sidebar-layout-content-max-width': props.contentMaxWidth }\"\n @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @update:mobile-open=\"emit('update:mobileOpen', $event)\" @mobile-open-change=\"emit('mobileOpenChange', $event)\"\n @update:resize-width=\"emit('update:resizeWidth', $event)\" @resize=\"emit('resize', $event)\" @resize-end=\"emit('resizeEnd', $event)\"\n >\n <Sidebar.Context v-slot=\"context\">\n <header v-if=\"props.variant === 'header'\" class=\"kappa-sidebar-layout__toolbar kappa-sidebar-layout__site-header\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__body\">\n <Sidebar.Root v-bind=\"props.navigationProps\" :label=\"props.label\" :full-screen-on-mobile=\"props.fullScreenOnMobile\" class=\"kappa-sidebar-layout__navigation\" :data-layout=\"props.variant\">\n <Sidebar.Header>\n <slot name=\"header\" v-bind=\"context\" />\n <Sidebar.Close :label=\"props.closeLabel\" />\n </Sidebar.Header>\n <div class=\"kappa-sidebar-layout__columns\">\n <Sidebar.Content :aria-label=\"props.navigationLabel\" class=\"kappa-sidebar-layout__primary\">\n <slot name=\"navigation\" v-bind=\"context\" />\n </Sidebar.Content>\n <SidebarLayoutSecondary\n v-if=\"props.variant === 'split' && $slots.secondary\"\n :label=\"props.secondaryLabel\"\n ><slot name=\"secondary\" v-bind=\"context\" /></SidebarLayoutSecondary>\n </div>\n <Sidebar.Footer v-if=\"$slots.footer\"><slot name=\"footer\" v-bind=\"context\" /></Sidebar.Footer>\n <Sidebar.ResizeHandle v-if=\"props.resizable\" :label=\"props.resizeLabel\" />\n </Sidebar.Root>\n <div class=\"kappa-sidebar-layout__main\">\n <header v-if=\"props.variant !== 'header'\" class=\"kappa-sidebar-layout__toolbar\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__content-frame\">\n <div class=\"kappa-sidebar-layout__content\"><div class=\"kappa-sidebar-layout__content-body\"><slot v-bind=\"context\" /></div></div>\n </div>\n </div>\n <slot name=\"rail\" v-bind=\"context\" />\n </div>\n </Sidebar.Context>\n </Sidebar.Provider>\n</template>\n\n<style src=\"./sidebar-layout.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { Sidebar, SIDEBAR_DEFAULTS } from \"../../components/sidebar\";\nimport SidebarLayoutSecondary from \"./SidebarLayoutSecondary.vue\";\nimport {\n SIDEBAR_LAYOUT_DEFAULTS, sidebarLayoutDefaultOpen, sidebarLayoutDefaultWidth,\n type SidebarLayoutEmits, type SidebarLayoutProps, type SidebarLayoutSlots,\n} from \"./sidebar-layout\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<SidebarLayoutProps>(), {\n ...SIDEBAR_DEFAULTS, ...SIDEBAR_LAYOUT_DEFAULTS,\n open: undefined, mobileOpen: undefined, defaultOpen: undefined,\n width: undefined, defaultWidth: undefined,\n});\nconst emit = defineEmits<SidebarLayoutEmits>();\ndefineSlots<SidebarLayoutSlots>();\nconst providerProps = computed(() => {\n const { variant, contentAlignment, contentMaxWidth, label, navigationLabel, navigationProps, secondaryLabel, closeLabel, resizeLabel, fullScreenOnMobile, triggerProps, ...provider } = props;\n return {\n ...provider,\n defaultOpen: props.defaultOpen ?? sidebarLayoutDefaultOpen(variant),\n width: props.width ?? `${sidebarLayoutDefaultWidth(variant)}px`,\n defaultWidth: props.defaultWidth ?? sidebarLayoutDefaultWidth(variant),\n };\n});\n</script>\n\n<template>\n <Sidebar.Provider\n v-bind=\"{ ...$attrs, ...providerProps }\"\n class=\"kappa-sidebar-layout\" :data-variant=\"props.variant\" :data-side=\"props.side\"\n :data-content-alignment=\"props.contentAlignment\" :data-collapsible=\"props.collapsible\"\n :style=\"{ '--kappa-sidebar-layout-content-max-width': props.contentMaxWidth }\"\n @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @update:mobile-open=\"emit('update:mobileOpen', $event)\" @mobile-open-change=\"emit('mobileOpenChange', $event)\"\n @update:resize-width=\"emit('update:resizeWidth', $event)\" @resize=\"emit('resize', $event)\" @resize-end=\"emit('resizeEnd', $event)\"\n >\n <Sidebar.Context v-slot=\"context\">\n <header v-if=\"props.variant === 'header'\" class=\"kappa-sidebar-layout__toolbar kappa-sidebar-layout__site-header\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__body\">\n <Sidebar.Root v-bind=\"props.navigationProps\" :label=\"props.label\" :full-screen-on-mobile=\"props.fullScreenOnMobile\" class=\"kappa-sidebar-layout__navigation\" :data-layout=\"props.variant\">\n <Sidebar.Header>\n <slot name=\"header\" v-bind=\"context\" />\n <Sidebar.Close :label=\"props.closeLabel\" />\n </Sidebar.Header>\n <div class=\"kappa-sidebar-layout__columns\">\n <Sidebar.Content :aria-label=\"props.navigationLabel\" class=\"kappa-sidebar-layout__primary\">\n <slot name=\"navigation\" v-bind=\"context\" />\n </Sidebar.Content>\n <SidebarLayoutSecondary\n v-if=\"props.variant === 'split' && $slots.secondary\"\n :label=\"props.secondaryLabel\"\n ><slot name=\"secondary\" v-bind=\"context\" /></SidebarLayoutSecondary>\n </div>\n <Sidebar.Footer v-if=\"$slots.footer\"><slot name=\"footer\" v-bind=\"context\" /></Sidebar.Footer>\n <Sidebar.ResizeHandle v-if=\"props.resizable\" :label=\"props.resizeLabel\" />\n </Sidebar.Root>\n <div class=\"kappa-sidebar-layout__main\">\n <header v-if=\"props.variant !== 'header'\" class=\"kappa-sidebar-layout__toolbar\">\n <slot name=\"toolbar-start\" v-bind=\"context\" />\n <slot name=\"toolbar-trigger\" v-bind=\"context\"><Sidebar.Trigger v-bind=\"props.triggerProps\" /></slot>\n <slot name=\"toolbar\" v-bind=\"context\" />\n </header>\n <div class=\"kappa-sidebar-layout__content-frame\">\n <div class=\"kappa-sidebar-layout__content\"><div class=\"kappa-sidebar-layout__content-body\"><slot v-bind=\"context\" /></div></div>\n </div>\n </div>\n <slot name=\"rail\" v-bind=\"context\" />\n </div>\n </Sidebar.Context>\n </Sidebar.Provider>\n</template>\n\n<style src=\"./sidebar-layout.css\"></style>\n"],"mappings":";;;;;;;;EAKA,IAAM,IAAU,EAAkB,GAC5B,IAAU,EAA0B;SAC1C,EAAM,EAAQ,eAAe,OAAO,MAAW;GAC7C,IAAM,IAAU,EAAQ,OAAO;GAC/B,IAAI,CAAC,KAAU,CAAC,GAAS,SAAS,SAAS,aAAa,GAAG;GAC3D,IAAM,IAAS,EAAQ,QAAQ,uBAAuB,CAAC,EAAE,cAA2B,gEAA8D;GAElJ,AADA,MAAM,EAAS,GACf,GAAQ,MAAM,EAAE,eAAe,GAAK,CAAC;EACvC,CAAC,cAIC,EAAA,GAAA,EAA6M,EAAA,CAAA,CAAA,CAAA,SAAA;GAAxL,SAAA;GAAJ,KAAI;GAAW,cAAY,EAAA;GAAO,OAAM;GAAmC,QAAQ,EAAA,CAAA,CAAO,CAAC,cAAc;GAAQ,OAAO,EAAA,CAAA,CAAO,CAAC,cAAc,SAAS,KAAA;;GAAW,SAAA,QAAQ,CAAR,EAAQ,EAAA,QAAA,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