@treeui/vue 0.10.0 → 0.12.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.
@@ -0,0 +1,2 @@
1
+ var e=require("./TAppShell.vue_vue_type_script_setup_true_lang.cjs").default;exports.default=e;
2
+ //# sourceMappingURL=TAppShell.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TAppShell.cjs","names":[],"sources":["../../src/components/TAppShell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n createId,\n focusFirst,\n focusLast,\n getFocusableElements,\n isEscapeKey,\n} from '@treeui/utils';\nimport { getTreeIcon, treeIconDefaults } from '@treeui/icons';\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n toRef,\n useAttrs,\n watch,\n} from 'vue';\nimport { useControllableOpen } from '../composables/useControllableOpen';\nimport type { TSidebarSide } from './TSidebar.vue';\nimport { treeSidebarInjectionKey } from './sidebar';\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst CloseIcon = getTreeIcon('x');\n\nconst props = withDefaults(\n defineProps<{\n as?: string;\n side?: TSidebarSide;\n sidebarWidth?: string;\n collapsedWidth?: string;\n collapsible?: boolean;\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n mobile?: boolean;\n breakpoint?: string;\n sidebarOpen?: boolean;\n defaultSidebarOpen?: boolean;\n closeOnEscape?: boolean;\n closeOnOverlay?: boolean;\n showMenuButton?: boolean;\n menuLabel?: string;\n closeLabel?: string;\n sidebarLabel?: string;\n }>(),\n {\n as: 'div',\n side: 'left',\n sidebarWidth: '17.5rem',\n collapsedWidth: '4.75rem',\n collapsible: false,\n collapsed: undefined,\n defaultCollapsed: false,\n mobile: undefined,\n breakpoint: '768px',\n sidebarOpen: undefined,\n defaultSidebarOpen: false,\n closeOnEscape: true,\n closeOnOverlay: true,\n showMenuButton: true,\n menuLabel: 'Open menu',\n closeLabel: 'Close menu',\n sidebarLabel: 'Sidebar',\n },\n);\n\nconst emit = defineEmits<{\n 'update:collapsed': [value: boolean];\n 'collapse-change': [value: boolean];\n 'update:sidebarOpen': [value: boolean];\n 'sidebar-open-change': [value: boolean];\n}>();\n\nexport interface AppShellSlotProps {\n mobile: boolean;\n collapsed: boolean;\n sidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n toggleCollapsed: () => void;\n}\n\ndefineSlots<{\n header?: (props: AppShellSlotProps) => unknown;\n sidebar?: (props: AppShellSlotProps) => unknown;\n default?: (props: Pick<AppShellSlotProps, 'mobile' | 'collapsed'>) => unknown;\n 'menu-icon'?: (props: { sidebarOpen: boolean }) => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst sidebarId = createId('t-app-shell-sidebar');\n\nconst { value: isCollapsed, setValue: setCollapsed } = useControllableOpen(\n toRef(props, 'collapsed'),\n props.defaultCollapsed,\n (value) => {\n emit('update:collapsed', value);\n emit('collapse-change', value);\n },\n);\n\nconst { value: isSidebarOpen, setValue: setSidebarOpen } = useControllableOpen(\n toRef(props, 'sidebarOpen'),\n props.defaultSidebarOpen,\n (value) => {\n emit('update:sidebarOpen', value);\n emit('sidebar-open-change', value);\n },\n);\n\n// Auto responsive detection when `mobile` is not explicitly controlled.\nconst autoMobile = ref(false);\nlet mediaQuery: MediaQueryList | null = null;\n\nconst onMediaChange = (event: MediaQueryListEvent | MediaQueryList) => {\n autoMobile.value = event.matches;\n};\n\nconst setupMediaQuery = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n teardownMediaQuery();\n mediaQuery = window.matchMedia(`(max-width: ${props.breakpoint})`);\n autoMobile.value = mediaQuery.matches;\n mediaQuery.addEventListener?.('change', onMediaChange);\n};\n\nconst teardownMediaQuery = () => {\n mediaQuery?.removeEventListener?.('change', onMediaChange);\n mediaQuery = null;\n};\n\nconst isMobile = computed(() => props.mobile ?? autoMobile.value);\n\n// Collapse is a desktop-only concept; the mobile drawer always shows the\n// expanded sidebar, so descendants and slots see `collapsed: false` there.\nconst effectiveCollapsed = computed(() =>\n isMobile.value ? false : isCollapsed.value,\n);\n\nconst surfaceRef = ref<HTMLElement | null>(null);\nconst previousFocusedElement = ref<HTMLElement | null>(null);\nlet previousBodyOverflow = '';\nlet bodyLocked = false;\n\nconst lockBodyScroll = () => {\n if (typeof document === 'undefined' || bodyLocked) {\n return;\n }\n\n previousBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n bodyLocked = true;\n};\n\nconst unlockBodyScroll = () => {\n if (typeof document === 'undefined' || !bodyLocked) {\n return;\n }\n\n document.body.style.overflow = previousBodyOverflow;\n bodyLocked = false;\n};\n\nconst focusSurface = () => {\n nextTick(() => {\n if (!surfaceRef.value) {\n return;\n }\n\n const focused = focusFirst(surfaceRef.value);\n if (!focused) {\n surfaceRef.value.focus();\n }\n });\n};\n\nconst openSidebar = () => {\n previousFocusedElement.value =\n typeof document === 'undefined'\n ? null\n : (document.activeElement as HTMLElement | null);\n setSidebarOpen(true);\n};\n\nconst closeSidebar = () => {\n setSidebarOpen(false);\n};\n\nconst toggleSidebar = () => {\n if (isSidebarOpen.value) {\n closeSidebar();\n } else {\n openSidebar();\n }\n};\n\nconst toggleCollapsed = () => {\n if (!props.collapsible) {\n return;\n }\n\n setCollapsed(!isCollapsed.value);\n};\n\nconst onOverlayClick = () => {\n if (props.closeOnOverlay) {\n closeSidebar();\n }\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n if (isEscapeKey(event) && props.closeOnEscape) {\n event.preventDefault();\n closeSidebar();\n return;\n }\n\n if (event.key !== 'Tab' || !surfaceRef.value) {\n return;\n }\n\n const focusable = getFocusableElements(surfaceRef.value);\n\n if (!focusable.length) {\n event.preventDefault();\n surfaceRef.value.focus();\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const activeElement = document.activeElement as HTMLElement | null;\n\n if (event.shiftKey && activeElement === first) {\n event.preventDefault();\n focusLast(surfaceRef.value);\n }\n\n if (!event.shiftKey && activeElement === last) {\n event.preventDefault();\n focusFirst(surfaceRef.value);\n }\n};\n\n// The off-canvas drawer only exists in mobile mode; keep body-scroll lock and\n// focus handling in sync with both the open flag and the responsive mode.\nconst syncOverlayState = (open: boolean, wasOpen: boolean) => {\n if (open && isMobile.value) {\n lockBodyScroll();\n focusSurface();\n return;\n }\n\n if (wasOpen) {\n unlockBodyScroll();\n nextTick(() => {\n previousFocusedElement.value?.focus();\n });\n }\n};\n\nwatch(isSidebarOpen, (value, previousValue) => {\n syncOverlayState(value, Boolean(previousValue));\n});\n\nwatch(isMobile, (mobile) => {\n if (!isSidebarOpen.value) {\n return;\n }\n\n // Leaving mobile removes the drawer from the DOM, so release the lock and\n // restore focus; re-entering mobile while \"open\" re-arms the overlay.\n if (mobile) {\n lockBodyScroll();\n focusSurface();\n } else {\n unlockBodyScroll();\n }\n});\n\nwatch(\n () => props.breakpoint,\n () => {\n if (typeof window !== 'undefined') {\n setupMediaQuery();\n }\n },\n);\n\nonMounted(() => {\n setupMediaQuery();\n});\n\nonBeforeUnmount(() => {\n teardownMediaQuery();\n unlockBodyScroll();\n});\n\nprovide(treeSidebarInjectionKey, {\n collapsed: effectiveCollapsed,\n});\n\nconst rootClasses = computed(() => [\n 't-app-shell',\n `t-app-shell--${props.side}`,\n {\n 'is-mobile': isMobile.value,\n 'is-collapsed':\n !isMobile.value && props.collapsible && isCollapsed.value,\n 'is-sidebar-open': isMobile.value && isSidebarOpen.value,\n },\n attrs.class,\n]);\n\nconst rootStyle = computed(() => [\n {\n '--tree-app-shell-sidebar-width': props.sidebarWidth,\n '--tree-app-shell-collapsed-width': props.collapsedWidth,\n },\n attrs.style,\n]);\n\nconst rootAttrs = computed(() => {\n const { class: _class, style: _style, ...rest } = attrs;\n return rest;\n});\n\nconst slotProps = computed<AppShellSlotProps>(() => ({\n mobile: isMobile.value,\n collapsed: effectiveCollapsed.value,\n sidebarOpen: isSidebarOpen.value,\n toggleSidebar,\n closeSidebar,\n toggleCollapsed,\n}));\n</script>\n\n<template>\n <component\n :is=\"as\"\n v-bind=\"rootAttrs\"\n :class=\"rootClasses\"\n :style=\"rootStyle\"\n :data-mobile=\"isMobile ? 'true' : 'false'\"\n >\n <header class=\"t-app-shell__header\">\n <button\n v-if=\"isMobile && showMenuButton\"\n type=\"button\"\n class=\"t-app-shell__menu-button\"\n :aria-label=\"menuLabel\"\n :aria-expanded=\"isSidebarOpen\"\n :aria-controls=\"sidebarId\"\n @click=\"toggleSidebar\"\n >\n <slot\n name=\"menu-icon\"\n :sidebar-open=\"isSidebarOpen\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"6\"\n y2=\"6\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"12\"\n y2=\"12\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"18\"\n y2=\"18\"\n />\n </svg>\n </slot>\n </button>\n\n <div class=\"t-app-shell__header-content\">\n <slot\n name=\"header\"\n v-bind=\"slotProps\"\n />\n </div>\n </header>\n\n <aside\n v-if=\"!isMobile\"\n :id=\"sidebarId\"\n class=\"t-app-shell__sidebar\"\n :aria-label=\"sidebarLabel\"\n >\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </aside>\n\n <main class=\"t-app-shell__main\">\n <slot\n :mobile=\"isMobile\"\n :collapsed=\"effectiveCollapsed\"\n />\n </main>\n\n <transition name=\"t-app-shell-fade\">\n <div\n v-if=\"isMobile && isSidebarOpen\"\n class=\"t-app-shell__overlay\"\n >\n <div\n class=\"t-app-shell__backdrop\"\n aria-hidden=\"true\"\n @click=\"onOverlayClick\"\n />\n <aside\n :id=\"sidebarId\"\n ref=\"surfaceRef\"\n class=\"t-app-shell__drawer\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"sidebarLabel\"\n tabindex=\"-1\"\n @keydown=\"onKeydown\"\n >\n <div class=\"t-app-shell__drawer-topbar\">\n <button\n type=\"button\"\n class=\"t-app-shell__drawer-close\"\n :aria-label=\"closeLabel\"\n @click=\"closeSidebar\"\n >\n <CloseIcon v-bind=\"treeIconDefaults\" />\n </button>\n </div>\n <div class=\"t-app-shell__drawer-body\">\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </div>\n </aside>\n </div>\n </transition>\n </component>\n</template>\n"],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import e from "./TAppShell.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/TAppShell.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
6
+
7
+ //# sourceMappingURL=TAppShell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TAppShell.js","names":[],"sources":["../../src/components/TAppShell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n createId,\n focusFirst,\n focusLast,\n getFocusableElements,\n isEscapeKey,\n} from '@treeui/utils';\nimport { getTreeIcon, treeIconDefaults } from '@treeui/icons';\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n toRef,\n useAttrs,\n watch,\n} from 'vue';\nimport { useControllableOpen } from '../composables/useControllableOpen';\nimport type { TSidebarSide } from './TSidebar.vue';\nimport { treeSidebarInjectionKey } from './sidebar';\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst CloseIcon = getTreeIcon('x');\n\nconst props = withDefaults(\n defineProps<{\n as?: string;\n side?: TSidebarSide;\n sidebarWidth?: string;\n collapsedWidth?: string;\n collapsible?: boolean;\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n mobile?: boolean;\n breakpoint?: string;\n sidebarOpen?: boolean;\n defaultSidebarOpen?: boolean;\n closeOnEscape?: boolean;\n closeOnOverlay?: boolean;\n showMenuButton?: boolean;\n menuLabel?: string;\n closeLabel?: string;\n sidebarLabel?: string;\n }>(),\n {\n as: 'div',\n side: 'left',\n sidebarWidth: '17.5rem',\n collapsedWidth: '4.75rem',\n collapsible: false,\n collapsed: undefined,\n defaultCollapsed: false,\n mobile: undefined,\n breakpoint: '768px',\n sidebarOpen: undefined,\n defaultSidebarOpen: false,\n closeOnEscape: true,\n closeOnOverlay: true,\n showMenuButton: true,\n menuLabel: 'Open menu',\n closeLabel: 'Close menu',\n sidebarLabel: 'Sidebar',\n },\n);\n\nconst emit = defineEmits<{\n 'update:collapsed': [value: boolean];\n 'collapse-change': [value: boolean];\n 'update:sidebarOpen': [value: boolean];\n 'sidebar-open-change': [value: boolean];\n}>();\n\nexport interface AppShellSlotProps {\n mobile: boolean;\n collapsed: boolean;\n sidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n toggleCollapsed: () => void;\n}\n\ndefineSlots<{\n header?: (props: AppShellSlotProps) => unknown;\n sidebar?: (props: AppShellSlotProps) => unknown;\n default?: (props: Pick<AppShellSlotProps, 'mobile' | 'collapsed'>) => unknown;\n 'menu-icon'?: (props: { sidebarOpen: boolean }) => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst sidebarId = createId('t-app-shell-sidebar');\n\nconst { value: isCollapsed, setValue: setCollapsed } = useControllableOpen(\n toRef(props, 'collapsed'),\n props.defaultCollapsed,\n (value) => {\n emit('update:collapsed', value);\n emit('collapse-change', value);\n },\n);\n\nconst { value: isSidebarOpen, setValue: setSidebarOpen } = useControllableOpen(\n toRef(props, 'sidebarOpen'),\n props.defaultSidebarOpen,\n (value) => {\n emit('update:sidebarOpen', value);\n emit('sidebar-open-change', value);\n },\n);\n\n// Auto responsive detection when `mobile` is not explicitly controlled.\nconst autoMobile = ref(false);\nlet mediaQuery: MediaQueryList | null = null;\n\nconst onMediaChange = (event: MediaQueryListEvent | MediaQueryList) => {\n autoMobile.value = event.matches;\n};\n\nconst setupMediaQuery = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n teardownMediaQuery();\n mediaQuery = window.matchMedia(`(max-width: ${props.breakpoint})`);\n autoMobile.value = mediaQuery.matches;\n mediaQuery.addEventListener?.('change', onMediaChange);\n};\n\nconst teardownMediaQuery = () => {\n mediaQuery?.removeEventListener?.('change', onMediaChange);\n mediaQuery = null;\n};\n\nconst isMobile = computed(() => props.mobile ?? autoMobile.value);\n\n// Collapse is a desktop-only concept; the mobile drawer always shows the\n// expanded sidebar, so descendants and slots see `collapsed: false` there.\nconst effectiveCollapsed = computed(() =>\n isMobile.value ? false : isCollapsed.value,\n);\n\nconst surfaceRef = ref<HTMLElement | null>(null);\nconst previousFocusedElement = ref<HTMLElement | null>(null);\nlet previousBodyOverflow = '';\nlet bodyLocked = false;\n\nconst lockBodyScroll = () => {\n if (typeof document === 'undefined' || bodyLocked) {\n return;\n }\n\n previousBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n bodyLocked = true;\n};\n\nconst unlockBodyScroll = () => {\n if (typeof document === 'undefined' || !bodyLocked) {\n return;\n }\n\n document.body.style.overflow = previousBodyOverflow;\n bodyLocked = false;\n};\n\nconst focusSurface = () => {\n nextTick(() => {\n if (!surfaceRef.value) {\n return;\n }\n\n const focused = focusFirst(surfaceRef.value);\n if (!focused) {\n surfaceRef.value.focus();\n }\n });\n};\n\nconst openSidebar = () => {\n previousFocusedElement.value =\n typeof document === 'undefined'\n ? null\n : (document.activeElement as HTMLElement | null);\n setSidebarOpen(true);\n};\n\nconst closeSidebar = () => {\n setSidebarOpen(false);\n};\n\nconst toggleSidebar = () => {\n if (isSidebarOpen.value) {\n closeSidebar();\n } else {\n openSidebar();\n }\n};\n\nconst toggleCollapsed = () => {\n if (!props.collapsible) {\n return;\n }\n\n setCollapsed(!isCollapsed.value);\n};\n\nconst onOverlayClick = () => {\n if (props.closeOnOverlay) {\n closeSidebar();\n }\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n if (isEscapeKey(event) && props.closeOnEscape) {\n event.preventDefault();\n closeSidebar();\n return;\n }\n\n if (event.key !== 'Tab' || !surfaceRef.value) {\n return;\n }\n\n const focusable = getFocusableElements(surfaceRef.value);\n\n if (!focusable.length) {\n event.preventDefault();\n surfaceRef.value.focus();\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const activeElement = document.activeElement as HTMLElement | null;\n\n if (event.shiftKey && activeElement === first) {\n event.preventDefault();\n focusLast(surfaceRef.value);\n }\n\n if (!event.shiftKey && activeElement === last) {\n event.preventDefault();\n focusFirst(surfaceRef.value);\n }\n};\n\n// The off-canvas drawer only exists in mobile mode; keep body-scroll lock and\n// focus handling in sync with both the open flag and the responsive mode.\nconst syncOverlayState = (open: boolean, wasOpen: boolean) => {\n if (open && isMobile.value) {\n lockBodyScroll();\n focusSurface();\n return;\n }\n\n if (wasOpen) {\n unlockBodyScroll();\n nextTick(() => {\n previousFocusedElement.value?.focus();\n });\n }\n};\n\nwatch(isSidebarOpen, (value, previousValue) => {\n syncOverlayState(value, Boolean(previousValue));\n});\n\nwatch(isMobile, (mobile) => {\n if (!isSidebarOpen.value) {\n return;\n }\n\n // Leaving mobile removes the drawer from the DOM, so release the lock and\n // restore focus; re-entering mobile while \"open\" re-arms the overlay.\n if (mobile) {\n lockBodyScroll();\n focusSurface();\n } else {\n unlockBodyScroll();\n }\n});\n\nwatch(\n () => props.breakpoint,\n () => {\n if (typeof window !== 'undefined') {\n setupMediaQuery();\n }\n },\n);\n\nonMounted(() => {\n setupMediaQuery();\n});\n\nonBeforeUnmount(() => {\n teardownMediaQuery();\n unlockBodyScroll();\n});\n\nprovide(treeSidebarInjectionKey, {\n collapsed: effectiveCollapsed,\n});\n\nconst rootClasses = computed(() => [\n 't-app-shell',\n `t-app-shell--${props.side}`,\n {\n 'is-mobile': isMobile.value,\n 'is-collapsed':\n !isMobile.value && props.collapsible && isCollapsed.value,\n 'is-sidebar-open': isMobile.value && isSidebarOpen.value,\n },\n attrs.class,\n]);\n\nconst rootStyle = computed(() => [\n {\n '--tree-app-shell-sidebar-width': props.sidebarWidth,\n '--tree-app-shell-collapsed-width': props.collapsedWidth,\n },\n attrs.style,\n]);\n\nconst rootAttrs = computed(() => {\n const { class: _class, style: _style, ...rest } = attrs;\n return rest;\n});\n\nconst slotProps = computed<AppShellSlotProps>(() => ({\n mobile: isMobile.value,\n collapsed: effectiveCollapsed.value,\n sidebarOpen: isSidebarOpen.value,\n toggleSidebar,\n closeSidebar,\n toggleCollapsed,\n}));\n</script>\n\n<template>\n <component\n :is=\"as\"\n v-bind=\"rootAttrs\"\n :class=\"rootClasses\"\n :style=\"rootStyle\"\n :data-mobile=\"isMobile ? 'true' : 'false'\"\n >\n <header class=\"t-app-shell__header\">\n <button\n v-if=\"isMobile && showMenuButton\"\n type=\"button\"\n class=\"t-app-shell__menu-button\"\n :aria-label=\"menuLabel\"\n :aria-expanded=\"isSidebarOpen\"\n :aria-controls=\"sidebarId\"\n @click=\"toggleSidebar\"\n >\n <slot\n name=\"menu-icon\"\n :sidebar-open=\"isSidebarOpen\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"6\"\n y2=\"6\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"12\"\n y2=\"12\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"18\"\n y2=\"18\"\n />\n </svg>\n </slot>\n </button>\n\n <div class=\"t-app-shell__header-content\">\n <slot\n name=\"header\"\n v-bind=\"slotProps\"\n />\n </div>\n </header>\n\n <aside\n v-if=\"!isMobile\"\n :id=\"sidebarId\"\n class=\"t-app-shell__sidebar\"\n :aria-label=\"sidebarLabel\"\n >\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </aside>\n\n <main class=\"t-app-shell__main\">\n <slot\n :mobile=\"isMobile\"\n :collapsed=\"effectiveCollapsed\"\n />\n </main>\n\n <transition name=\"t-app-shell-fade\">\n <div\n v-if=\"isMobile && isSidebarOpen\"\n class=\"t-app-shell__overlay\"\n >\n <div\n class=\"t-app-shell__backdrop\"\n aria-hidden=\"true\"\n @click=\"onOverlayClick\"\n />\n <aside\n :id=\"sidebarId\"\n ref=\"surfaceRef\"\n class=\"t-app-shell__drawer\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"sidebarLabel\"\n tabindex=\"-1\"\n @keydown=\"onKeydown\"\n >\n <div class=\"t-app-shell__drawer-topbar\">\n <button\n type=\"button\"\n class=\"t-app-shell__drawer-close\"\n :aria-label=\"closeLabel\"\n @click=\"closeSidebar\"\n >\n <CloseIcon v-bind=\"treeIconDefaults\" />\n </button>\n </div>\n <div class=\"t-app-shell__drawer-body\">\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </div>\n </aside>\n </div>\n </transition>\n </component>\n</template>\n"],"mappings":""}
@@ -0,0 +1,90 @@
1
+ import { TSidebarSide } from './TSidebar.vue';
2
+ type __VLS_Props = {
3
+ as?: string;
4
+ side?: TSidebarSide;
5
+ sidebarWidth?: string;
6
+ collapsedWidth?: string;
7
+ collapsible?: boolean;
8
+ collapsed?: boolean;
9
+ defaultCollapsed?: boolean;
10
+ mobile?: boolean;
11
+ breakpoint?: string;
12
+ sidebarOpen?: boolean;
13
+ defaultSidebarOpen?: boolean;
14
+ closeOnEscape?: boolean;
15
+ closeOnOverlay?: boolean;
16
+ showMenuButton?: boolean;
17
+ menuLabel?: string;
18
+ closeLabel?: string;
19
+ sidebarLabel?: string;
20
+ };
21
+ export interface AppShellSlotProps {
22
+ mobile: boolean;
23
+ collapsed: boolean;
24
+ sidebarOpen: boolean;
25
+ toggleSidebar: () => void;
26
+ closeSidebar: () => void;
27
+ toggleCollapsed: () => void;
28
+ }
29
+ declare function __VLS_template(): {
30
+ attrs: Partial<{}>;
31
+ slots: Readonly<{
32
+ header?: (props: AppShellSlotProps) => unknown;
33
+ sidebar?: (props: AppShellSlotProps) => unknown;
34
+ default?: (props: Pick<AppShellSlotProps, "mobile" | "collapsed">) => unknown;
35
+ 'menu-icon'?: (props: {
36
+ sidebarOpen: boolean;
37
+ }) => unknown;
38
+ }> & {
39
+ header?: (props: AppShellSlotProps) => unknown;
40
+ sidebar?: (props: AppShellSlotProps) => unknown;
41
+ default?: (props: Pick<AppShellSlotProps, "mobile" | "collapsed">) => unknown;
42
+ 'menu-icon'?: (props: {
43
+ sidebarOpen: boolean;
44
+ }) => unknown;
45
+ };
46
+ refs: {
47
+ surfaceRef: HTMLElement;
48
+ };
49
+ rootEl: any;
50
+ };
51
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
52
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
53
+ "update:collapsed": (value: boolean) => any;
54
+ "collapse-change": (value: boolean) => any;
55
+ "update:sidebarOpen": (value: boolean) => any;
56
+ "sidebar-open-change": (value: boolean) => any;
57
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
58
+ "onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
59
+ "onCollapse-change"?: ((value: boolean) => any) | undefined;
60
+ "onUpdate:sidebarOpen"?: ((value: boolean) => any) | undefined;
61
+ "onSidebar-open-change"?: ((value: boolean) => any) | undefined;
62
+ }>, {
63
+ collapsible: boolean;
64
+ as: string;
65
+ mobile: boolean;
66
+ closeOnEscape: boolean;
67
+ closeOnOverlay: boolean;
68
+ closeLabel: string;
69
+ side: TSidebarSide;
70
+ collapsed: boolean;
71
+ defaultCollapsed: boolean;
72
+ collapsedWidth: string;
73
+ sidebarWidth: string;
74
+ breakpoint: string;
75
+ sidebarOpen: boolean;
76
+ defaultSidebarOpen: boolean;
77
+ showMenuButton: boolean;
78
+ menuLabel: string;
79
+ sidebarLabel: string;
80
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
81
+ surfaceRef: HTMLElement;
82
+ }, any>;
83
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
84
+ export default _default;
85
+ type __VLS_WithTemplateSlots<T, S> = T & {
86
+ new (): {
87
+ $slots: S;
88
+ };
89
+ };
90
+ //# sourceMappingURL=TAppShell.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TAppShell.vue.d.ts","sourceRoot":"","sources":["../../src/components/TAppShell.vue"],"names":[],"mappings":"AA2eA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AASnD,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAgCJ,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,C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AAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ const e=require("../composables/useControllableOpen.cjs"),t=require("./sidebar.cjs");let n=require("vue"),r=require("@treeui/utils"),i=require("@treeui/icons");var a={class:`t-app-shell__header`},o=[`aria-label`,`aria-expanded`,`aria-controls`],s={class:`t-app-shell__header-content`},c=[`id`,`aria-label`],l={class:`t-app-shell__main`},u={key:0,class:`t-app-shell__overlay`},d=[`id`,`aria-label`],f={class:`t-app-shell__drawer-topbar`},p=[`aria-label`],m={class:`t-app-shell__drawer-body`},h=(0,n.defineComponent)({inheritAttrs:!1,__name:`TAppShell`,props:{as:{default:`div`},side:{default:`left`},sidebarWidth:{default:`17.5rem`},collapsedWidth:{default:`4.75rem`},collapsible:{type:Boolean,default:!1},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:!1},mobile:{type:Boolean,default:void 0},breakpoint:{default:`768px`},sidebarOpen:{type:Boolean,default:void 0},defaultSidebarOpen:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!0},showMenuButton:{type:Boolean,default:!0},menuLabel:{default:`Open menu`},closeLabel:{default:`Close menu`},sidebarLabel:{default:`Sidebar`}},emits:[`update:collapsed`,`collapse-change`,`update:sidebarOpen`,`sidebar-open-change`],setup(h,{emit:g}){let _=(0,i.getTreeIcon)(`x`),v=h,y=g,b=(0,n.useAttrs)(),x=(0,r.createId)(`t-app-shell-sidebar`),{value:S,setValue:C}=e.useControllableOpen((0,n.toRef)(v,`collapsed`),v.defaultCollapsed,e=>{y(`update:collapsed`,e),y(`collapse-change`,e)}),{value:w,setValue:T}=e.useControllableOpen((0,n.toRef)(v,`sidebarOpen`),v.defaultSidebarOpen,e=>{y(`update:sidebarOpen`,e),y(`sidebar-open-change`,e)}),E=(0,n.ref)(!1),D=null,O=e=>{E.value=e.matches},k=()=>{typeof window>`u`||typeof window.matchMedia!=`function`||(A(),D=window.matchMedia(`(max-width: ${v.breakpoint})`),E.value=D.matches,D.addEventListener?.(`change`,O))},A=()=>{D?.removeEventListener?.(`change`,O),D=null},j=(0,n.computed)(()=>v.mobile??E.value),M=(0,n.computed)(()=>!j.value&&S.value),N=(0,n.ref)(null),P=(0,n.ref)(null),F=``,I=!1,L=()=>{typeof document>`u`||I||(F=document.body.style.overflow,document.body.style.overflow=`hidden`,I=!0)},R=()=>{typeof document>`u`||!I||(document.body.style.overflow=F,I=!1)},z=()=>{(0,n.nextTick)(()=>{N.value&&((0,r.focusFirst)(N.value)||N.value.focus())})},B=()=>{P.value=typeof document>`u`?null:document.activeElement,T(!0)},V=()=>{T(!1)},H=()=>{w.value?V():B()},U=()=>{v.collapsible&&C(!S.value)},W=()=>{v.closeOnOverlay&&V()},G=e=>{if((0,r.isEscapeKey)(e)&&v.closeOnEscape){e.preventDefault(),V();return}if(e.key!==`Tab`||!N.value)return;let t=(0,r.getFocusableElements)(N.value);if(!t.length){e.preventDefault(),N.value.focus();return}let n=t[0],i=t[t.length-1],a=document.activeElement;e.shiftKey&&a===n&&(e.preventDefault(),(0,r.focusLast)(N.value)),!e.shiftKey&&a===i&&(e.preventDefault(),(0,r.focusFirst)(N.value))},K=(e,t)=>{if(e&&j.value){L(),z();return}t&&(R(),(0,n.nextTick)(()=>{P.value?.focus()}))};(0,n.watch)(w,(e,t)=>{K(e,!!t)}),(0,n.watch)(j,e=>{w.value&&(e?(L(),z()):R())}),(0,n.watch)(()=>v.breakpoint,()=>{typeof window<`u`&&k()}),(0,n.onMounted)(()=>{k()}),(0,n.onBeforeUnmount)(()=>{A(),R()}),(0,n.provide)(t.treeSidebarInjectionKey,{collapsed:M});let q=(0,n.computed)(()=>[`t-app-shell`,`t-app-shell--${v.side}`,{"is-mobile":j.value,"is-collapsed":!j.value&&v.collapsible&&S.value,"is-sidebar-open":j.value&&w.value},b.class]),J=(0,n.computed)(()=>[{"--tree-app-shell-sidebar-width":v.sidebarWidth,"--tree-app-shell-collapsed-width":v.collapsedWidth},b.style]),Y=(0,n.computed)(()=>{let{class:e,style:t,...n}=b;return n}),X=(0,n.computed)(()=>({mobile:j.value,collapsed:M.value,sidebarOpen:w.value,toggleSidebar:H,closeSidebar:V,toggleCollapsed:U}));return(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(h.as),(0,n.mergeProps)(Y.value,{class:q.value,style:J.value,"data-mobile":j.value?`true`:`false`}),{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`header`,a,[j.value&&h.showMenuButton?((0,n.openBlock)(),(0,n.createElementBlock)(`button`,{key:0,type:`button`,class:`t-app-shell__menu-button`,"aria-label":h.menuLabel,"aria-expanded":(0,n.unref)(w),"aria-controls":(0,n.unref)(x),onClick:H},[(0,n.renderSlot)(e.$slots,`menu-icon`,{sidebarOpen:(0,n.unref)(w)},()=>[t[0]||=(0,n.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,n.createElementVNode)(`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`}),(0,n.createElementVNode)(`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`}),(0,n.createElementVNode)(`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`})],-1)])],8,o)):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`div`,s,[(0,n.renderSlot)(e.$slots,`header`,(0,n.normalizeProps)((0,n.guardReactiveProps)(X.value)))])]),j.value?(0,n.createCommentVNode)(``,!0):((0,n.openBlock)(),(0,n.createElementBlock)(`aside`,{key:0,id:(0,n.unref)(x),class:`t-app-shell__sidebar`,"aria-label":h.sidebarLabel},[(0,n.renderSlot)(e.$slots,`sidebar`,(0,n.normalizeProps)((0,n.guardReactiveProps)(X.value)))],8,c)),(0,n.createElementVNode)(`main`,l,[(0,n.renderSlot)(e.$slots,`default`,{mobile:j.value,collapsed:M.value})]),(0,n.createVNode)(n.Transition,{name:`t-app-shell-fade`},{default:(0,n.withCtx)(()=>[j.value&&(0,n.unref)(w)?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,u,[(0,n.createElementVNode)(`div`,{class:`t-app-shell__backdrop`,"aria-hidden":`true`,onClick:W}),(0,n.createElementVNode)(`aside`,{id:(0,n.unref)(x),ref_key:`surfaceRef`,ref:N,class:`t-app-shell__drawer`,role:`dialog`,"aria-modal":`true`,"aria-label":h.sidebarLabel,tabindex:`-1`,onKeydown:G},[(0,n.createElementVNode)(`div`,f,[(0,n.createElementVNode)(`button`,{type:`button`,class:`t-app-shell__drawer-close`,"aria-label":h.closeLabel,onClick:V},[(0,n.createVNode)((0,n.unref)(_),(0,n.normalizeProps)((0,n.guardReactiveProps)((0,n.unref)(i.treeIconDefaults))),null,16)],8,p)]),(0,n.createElementVNode)(`div`,m,[(0,n.renderSlot)(e.$slots,`sidebar`,(0,n.normalizeProps)((0,n.guardReactiveProps)(X.value)))])],40,d)])):(0,n.createCommentVNode)(``,!0)]),_:3})]),_:3},16,[`class`,`style`,`data-mobile`]))}});exports.default=h;
2
+ //# sourceMappingURL=TAppShell.vue_vue_type_script_setup_true_lang.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TAppShell.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/components/TAppShell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n createId,\n focusFirst,\n focusLast,\n getFocusableElements,\n isEscapeKey,\n} from '@treeui/utils';\nimport { getTreeIcon, treeIconDefaults } from '@treeui/icons';\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n toRef,\n useAttrs,\n watch,\n} from 'vue';\nimport { useControllableOpen } from '../composables/useControllableOpen';\nimport type { TSidebarSide } from './TSidebar.vue';\nimport { treeSidebarInjectionKey } from './sidebar';\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst CloseIcon = getTreeIcon('x');\n\nconst props = withDefaults(\n defineProps<{\n as?: string;\n side?: TSidebarSide;\n sidebarWidth?: string;\n collapsedWidth?: string;\n collapsible?: boolean;\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n mobile?: boolean;\n breakpoint?: string;\n sidebarOpen?: boolean;\n defaultSidebarOpen?: boolean;\n closeOnEscape?: boolean;\n closeOnOverlay?: boolean;\n showMenuButton?: boolean;\n menuLabel?: string;\n closeLabel?: string;\n sidebarLabel?: string;\n }>(),\n {\n as: 'div',\n side: 'left',\n sidebarWidth: '17.5rem',\n collapsedWidth: '4.75rem',\n collapsible: false,\n collapsed: undefined,\n defaultCollapsed: false,\n mobile: undefined,\n breakpoint: '768px',\n sidebarOpen: undefined,\n defaultSidebarOpen: false,\n closeOnEscape: true,\n closeOnOverlay: true,\n showMenuButton: true,\n menuLabel: 'Open menu',\n closeLabel: 'Close menu',\n sidebarLabel: 'Sidebar',\n },\n);\n\nconst emit = defineEmits<{\n 'update:collapsed': [value: boolean];\n 'collapse-change': [value: boolean];\n 'update:sidebarOpen': [value: boolean];\n 'sidebar-open-change': [value: boolean];\n}>();\n\nexport interface AppShellSlotProps {\n mobile: boolean;\n collapsed: boolean;\n sidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n toggleCollapsed: () => void;\n}\n\ndefineSlots<{\n header?: (props: AppShellSlotProps) => unknown;\n sidebar?: (props: AppShellSlotProps) => unknown;\n default?: (props: Pick<AppShellSlotProps, 'mobile' | 'collapsed'>) => unknown;\n 'menu-icon'?: (props: { sidebarOpen: boolean }) => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst sidebarId = createId('t-app-shell-sidebar');\n\nconst { value: isCollapsed, setValue: setCollapsed } = useControllableOpen(\n toRef(props, 'collapsed'),\n props.defaultCollapsed,\n (value) => {\n emit('update:collapsed', value);\n emit('collapse-change', value);\n },\n);\n\nconst { value: isSidebarOpen, setValue: setSidebarOpen } = useControllableOpen(\n toRef(props, 'sidebarOpen'),\n props.defaultSidebarOpen,\n (value) => {\n emit('update:sidebarOpen', value);\n emit('sidebar-open-change', value);\n },\n);\n\n// Auto responsive detection when `mobile` is not explicitly controlled.\nconst autoMobile = ref(false);\nlet mediaQuery: MediaQueryList | null = null;\n\nconst onMediaChange = (event: MediaQueryListEvent | MediaQueryList) => {\n autoMobile.value = event.matches;\n};\n\nconst setupMediaQuery = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n teardownMediaQuery();\n mediaQuery = window.matchMedia(`(max-width: ${props.breakpoint})`);\n autoMobile.value = mediaQuery.matches;\n mediaQuery.addEventListener?.('change', onMediaChange);\n};\n\nconst teardownMediaQuery = () => {\n mediaQuery?.removeEventListener?.('change', onMediaChange);\n mediaQuery = null;\n};\n\nconst isMobile = computed(() => props.mobile ?? autoMobile.value);\n\n// Collapse is a desktop-only concept; the mobile drawer always shows the\n// expanded sidebar, so descendants and slots see `collapsed: false` there.\nconst effectiveCollapsed = computed(() =>\n isMobile.value ? false : isCollapsed.value,\n);\n\nconst surfaceRef = ref<HTMLElement | null>(null);\nconst previousFocusedElement = ref<HTMLElement | null>(null);\nlet previousBodyOverflow = '';\nlet bodyLocked = false;\n\nconst lockBodyScroll = () => {\n if (typeof document === 'undefined' || bodyLocked) {\n return;\n }\n\n previousBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n bodyLocked = true;\n};\n\nconst unlockBodyScroll = () => {\n if (typeof document === 'undefined' || !bodyLocked) {\n return;\n }\n\n document.body.style.overflow = previousBodyOverflow;\n bodyLocked = false;\n};\n\nconst focusSurface = () => {\n nextTick(() => {\n if (!surfaceRef.value) {\n return;\n }\n\n const focused = focusFirst(surfaceRef.value);\n if (!focused) {\n surfaceRef.value.focus();\n }\n });\n};\n\nconst openSidebar = () => {\n previousFocusedElement.value =\n typeof document === 'undefined'\n ? null\n : (document.activeElement as HTMLElement | null);\n setSidebarOpen(true);\n};\n\nconst closeSidebar = () => {\n setSidebarOpen(false);\n};\n\nconst toggleSidebar = () => {\n if (isSidebarOpen.value) {\n closeSidebar();\n } else {\n openSidebar();\n }\n};\n\nconst toggleCollapsed = () => {\n if (!props.collapsible) {\n return;\n }\n\n setCollapsed(!isCollapsed.value);\n};\n\nconst onOverlayClick = () => {\n if (props.closeOnOverlay) {\n closeSidebar();\n }\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n if (isEscapeKey(event) && props.closeOnEscape) {\n event.preventDefault();\n closeSidebar();\n return;\n }\n\n if (event.key !== 'Tab' || !surfaceRef.value) {\n return;\n }\n\n const focusable = getFocusableElements(surfaceRef.value);\n\n if (!focusable.length) {\n event.preventDefault();\n surfaceRef.value.focus();\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const activeElement = document.activeElement as HTMLElement | null;\n\n if (event.shiftKey && activeElement === first) {\n event.preventDefault();\n focusLast(surfaceRef.value);\n }\n\n if (!event.shiftKey && activeElement === last) {\n event.preventDefault();\n focusFirst(surfaceRef.value);\n }\n};\n\n// The off-canvas drawer only exists in mobile mode; keep body-scroll lock and\n// focus handling in sync with both the open flag and the responsive mode.\nconst syncOverlayState = (open: boolean, wasOpen: boolean) => {\n if (open && isMobile.value) {\n lockBodyScroll();\n focusSurface();\n return;\n }\n\n if (wasOpen) {\n unlockBodyScroll();\n nextTick(() => {\n previousFocusedElement.value?.focus();\n });\n }\n};\n\nwatch(isSidebarOpen, (value, previousValue) => {\n syncOverlayState(value, Boolean(previousValue));\n});\n\nwatch(isMobile, (mobile) => {\n if (!isSidebarOpen.value) {\n return;\n }\n\n // Leaving mobile removes the drawer from the DOM, so release the lock and\n // restore focus; re-entering mobile while \"open\" re-arms the overlay.\n if (mobile) {\n lockBodyScroll();\n focusSurface();\n } else {\n unlockBodyScroll();\n }\n});\n\nwatch(\n () => props.breakpoint,\n () => {\n if (typeof window !== 'undefined') {\n setupMediaQuery();\n }\n },\n);\n\nonMounted(() => {\n setupMediaQuery();\n});\n\nonBeforeUnmount(() => {\n teardownMediaQuery();\n unlockBodyScroll();\n});\n\nprovide(treeSidebarInjectionKey, {\n collapsed: effectiveCollapsed,\n});\n\nconst rootClasses = computed(() => [\n 't-app-shell',\n `t-app-shell--${props.side}`,\n {\n 'is-mobile': isMobile.value,\n 'is-collapsed':\n !isMobile.value && props.collapsible && isCollapsed.value,\n 'is-sidebar-open': isMobile.value && isSidebarOpen.value,\n },\n attrs.class,\n]);\n\nconst rootStyle = computed(() => [\n {\n '--tree-app-shell-sidebar-width': props.sidebarWidth,\n '--tree-app-shell-collapsed-width': props.collapsedWidth,\n },\n attrs.style,\n]);\n\nconst rootAttrs = computed(() => {\n const { class: _class, style: _style, ...rest } = attrs;\n return rest;\n});\n\nconst slotProps = computed<AppShellSlotProps>(() => ({\n mobile: isMobile.value,\n collapsed: effectiveCollapsed.value,\n sidebarOpen: isSidebarOpen.value,\n toggleSidebar,\n closeSidebar,\n toggleCollapsed,\n}));\n</script>\n\n<template>\n <component\n :is=\"as\"\n v-bind=\"rootAttrs\"\n :class=\"rootClasses\"\n :style=\"rootStyle\"\n :data-mobile=\"isMobile ? 'true' : 'false'\"\n >\n <header class=\"t-app-shell__header\">\n <button\n v-if=\"isMobile && showMenuButton\"\n type=\"button\"\n class=\"t-app-shell__menu-button\"\n :aria-label=\"menuLabel\"\n :aria-expanded=\"isSidebarOpen\"\n :aria-controls=\"sidebarId\"\n @click=\"toggleSidebar\"\n >\n <slot\n name=\"menu-icon\"\n :sidebar-open=\"isSidebarOpen\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"6\"\n y2=\"6\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"12\"\n y2=\"12\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"18\"\n y2=\"18\"\n />\n </svg>\n </slot>\n </button>\n\n <div class=\"t-app-shell__header-content\">\n <slot\n name=\"header\"\n v-bind=\"slotProps\"\n />\n </div>\n </header>\n\n <aside\n v-if=\"!isMobile\"\n :id=\"sidebarId\"\n class=\"t-app-shell__sidebar\"\n :aria-label=\"sidebarLabel\"\n >\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </aside>\n\n <main class=\"t-app-shell__main\">\n <slot\n :mobile=\"isMobile\"\n :collapsed=\"effectiveCollapsed\"\n />\n </main>\n\n <transition name=\"t-app-shell-fade\">\n <div\n v-if=\"isMobile && isSidebarOpen\"\n class=\"t-app-shell__overlay\"\n >\n <div\n class=\"t-app-shell__backdrop\"\n aria-hidden=\"true\"\n @click=\"onOverlayClick\"\n />\n <aside\n :id=\"sidebarId\"\n ref=\"surfaceRef\"\n class=\"t-app-shell__drawer\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"sidebarLabel\"\n tabindex=\"-1\"\n @keydown=\"onKeydown\"\n >\n <div class=\"t-app-shell__drawer-topbar\">\n <button\n type=\"button\"\n class=\"t-app-shell__drawer-close\"\n :aria-label=\"closeLabel\"\n @click=\"closeSidebar\"\n >\n <CloseIcon v-bind=\"treeIconDefaults\" />\n </button>\n </div>\n <div class=\"t-app-shell__drawer-body\">\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </div>\n </aside>\n </div>\n </transition>\n </component>\n</template>\n"],"mappings":"qvCA4BA,IAAM,GAAA,EAAA,EAAA,YAAA,CAAwB,GAAG,EAE3B,EAAQ,EAyCR,EAAO,EAuBP,GAAA,EAAA,EAAA,SAAA,CAAiB,EACjB,GAAA,EAAA,EAAA,SAAA,CAAqB,qBAAqB,EAE1C,CAAE,MAAO,EAAa,SAAU,GAAiB,EAAA,qBAAA,EAAA,EAAA,MAAA,CAC/C,EAAO,WAA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,6BA4BF,QAAA,CAzBL,IAAA,EAAA,EAAA,MAAA,CAAI,CAAA,UACD,aAAJ,IAAI,EACJ,MAAM,sBACN,KAAK,SACL,aAAW,OACV,aAAY,EAAA,aACb,SAAS,KACC,uCAWJ,MATN,EASM,EAAA,EAAA,EAAA,mBAAA,CADK,SAAA,CANP,KAAK,SACL,MAAM,4BACL,aAAY,EAAA,WACZ,QAAO,kCAE+B,CAAA,GAAA,EAAA,EAAA,eAAA,EAAA,EAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,MAAA,CAApB,EAAA,gBAAA,CAAgB,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAQjC,MALN,EAKM,EAAA,EAAA,EAAA,WAAA,CADF,EAAA,OAAA,WAAA,EAAA,EAAA,eAAA,EAAA,EAAA,EAAA,mBAAA,CADQ,EAAA,KAAS,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,CAAA,CAAA,CAAA,IAAA,EAAA,EAAA,mBAAA,CAAA,GAAA,EAAA,CAAA,CAAA"}
@@ -0,0 +1,244 @@
1
+ import { useControllableOpen as e } from "../composables/useControllableOpen.js";
2
+ import { treeSidebarInjectionKey as t } from "./sidebar.js";
3
+ import { Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as ee, nextTick as d, normalizeProps as f, onBeforeUnmount as p, onMounted as m, openBlock as h, provide as te, ref as g, renderSlot as _, resolveDynamicComponent as v, toRef as y, unref as b, useAttrs as ne, watch as x, withCtx as S } from "vue";
4
+ import { createId as C, focusFirst as w, focusLast as T, getFocusableElements as E, isEscapeKey as re } from "@treeui/utils";
5
+ import { getTreeIcon as ie, treeIconDefaults as ae } from "@treeui/icons";
6
+ //#region src/components/TAppShell.vue?vue&type=script&setup=true&lang.ts
7
+ var oe = { class: "t-app-shell__header" }, se = [
8
+ "aria-label",
9
+ "aria-expanded",
10
+ "aria-controls"
11
+ ], ce = { class: "t-app-shell__header-content" }, le = ["id", "aria-label"], ue = { class: "t-app-shell__main" }, de = {
12
+ key: 0,
13
+ class: "t-app-shell__overlay"
14
+ }, fe = ["id", "aria-label"], pe = { class: "t-app-shell__drawer-topbar" }, me = ["aria-label"], he = { class: "t-app-shell__drawer-body" }, D = /*@__PURE__*/ l({
15
+ inheritAttrs: !1,
16
+ __name: "TAppShell",
17
+ props: {
18
+ as: { default: "div" },
19
+ side: { default: "left" },
20
+ sidebarWidth: { default: "17.5rem" },
21
+ collapsedWidth: { default: "4.75rem" },
22
+ collapsible: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ collapsed: {
27
+ type: Boolean,
28
+ default: void 0
29
+ },
30
+ defaultCollapsed: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ mobile: {
35
+ type: Boolean,
36
+ default: void 0
37
+ },
38
+ breakpoint: { default: "768px" },
39
+ sidebarOpen: {
40
+ type: Boolean,
41
+ default: void 0
42
+ },
43
+ defaultSidebarOpen: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ closeOnEscape: {
48
+ type: Boolean,
49
+ default: !0
50
+ },
51
+ closeOnOverlay: {
52
+ type: Boolean,
53
+ default: !0
54
+ },
55
+ showMenuButton: {
56
+ type: Boolean,
57
+ default: !0
58
+ },
59
+ menuLabel: { default: "Open menu" },
60
+ closeLabel: { default: "Close menu" },
61
+ sidebarLabel: { default: "Sidebar" }
62
+ },
63
+ emits: [
64
+ "update:collapsed",
65
+ "collapse-change",
66
+ "update:sidebarOpen",
67
+ "sidebar-open-change"
68
+ ],
69
+ setup(l, { emit: D }) {
70
+ let ge = ie("x"), O = l, k = D, A = ne(), j = C("t-app-shell-sidebar"), { value: M, setValue: N } = e(y(O, "collapsed"), O.defaultCollapsed, (e) => {
71
+ k("update:collapsed", e), k("collapse-change", e);
72
+ }), { value: P, setValue: F } = e(y(O, "sidebarOpen"), O.defaultSidebarOpen, (e) => {
73
+ k("update:sidebarOpen", e), k("sidebar-open-change", e);
74
+ }), I = g(!1), L = null, R = (e) => {
75
+ I.value = e.matches;
76
+ }, z = () => {
77
+ typeof window > "u" || typeof window.matchMedia != "function" || (B(), L = window.matchMedia(`(max-width: ${O.breakpoint})`), I.value = L.matches, L.addEventListener?.("change", R));
78
+ }, B = () => {
79
+ L?.removeEventListener?.("change", R), L = null;
80
+ }, V = r(() => O.mobile ?? I.value), H = r(() => !V.value && M.value), U = g(null), W = g(null), G = "", K = !1, q = () => {
81
+ typeof document > "u" || K || (G = document.body.style.overflow, document.body.style.overflow = "hidden", K = !0);
82
+ }, J = () => {
83
+ typeof document > "u" || !K || (document.body.style.overflow = G, K = !1);
84
+ }, Y = () => {
85
+ d(() => {
86
+ U.value && (w(U.value) || U.value.focus());
87
+ });
88
+ }, _e = () => {
89
+ W.value = typeof document > "u" ? null : document.activeElement, F(!0);
90
+ }, X = () => {
91
+ F(!1);
92
+ }, Z = () => {
93
+ P.value ? X() : _e();
94
+ }, Q = () => {
95
+ O.collapsible && N(!M.value);
96
+ }, ve = () => {
97
+ O.closeOnOverlay && X();
98
+ }, ye = (e) => {
99
+ if (re(e) && O.closeOnEscape) {
100
+ e.preventDefault(), X();
101
+ return;
102
+ }
103
+ if (e.key !== "Tab" || !U.value) return;
104
+ let t = E(U.value);
105
+ if (!t.length) {
106
+ e.preventDefault(), U.value.focus();
107
+ return;
108
+ }
109
+ let n = t[0], r = t[t.length - 1], i = document.activeElement;
110
+ e.shiftKey && i === n && (e.preventDefault(), T(U.value)), !e.shiftKey && i === r && (e.preventDefault(), w(U.value));
111
+ }, be = (e, t) => {
112
+ if (e && V.value) {
113
+ q(), Y();
114
+ return;
115
+ }
116
+ t && (J(), d(() => {
117
+ W.value?.focus();
118
+ }));
119
+ };
120
+ x(P, (e, t) => {
121
+ be(e, !!t);
122
+ }), x(V, (e) => {
123
+ P.value && (e ? (q(), Y()) : J());
124
+ }), x(() => O.breakpoint, () => {
125
+ typeof window < "u" && z();
126
+ }), m(() => {
127
+ z();
128
+ }), p(() => {
129
+ B(), J();
130
+ }), te(t, { collapsed: H });
131
+ let xe = r(() => [
132
+ "t-app-shell",
133
+ `t-app-shell--${O.side}`,
134
+ {
135
+ "is-mobile": V.value,
136
+ "is-collapsed": !V.value && O.collapsible && M.value,
137
+ "is-sidebar-open": V.value && P.value
138
+ },
139
+ A.class
140
+ ]), Se = r(() => [{
141
+ "--tree-app-shell-sidebar-width": O.sidebarWidth,
142
+ "--tree-app-shell-collapsed-width": O.collapsedWidth
143
+ }, A.style]), Ce = r(() => {
144
+ let { class: e, style: t, ...n } = A;
145
+ return n;
146
+ }), $ = r(() => ({
147
+ mobile: V.value,
148
+ collapsed: H.value,
149
+ sidebarOpen: P.value,
150
+ toggleSidebar: Z,
151
+ closeSidebar: X,
152
+ toggleCollapsed: Q
153
+ }));
154
+ return (e, t) => (h(), i(v(l.as), ee(Ce.value, {
155
+ class: xe.value,
156
+ style: Se.value,
157
+ "data-mobile": V.value ? "true" : "false"
158
+ }), {
159
+ default: S(() => [
160
+ s("header", oe, [V.value && l.showMenuButton ? (h(), o("button", {
161
+ key: 0,
162
+ type: "button",
163
+ class: "t-app-shell__menu-button",
164
+ "aria-label": l.menuLabel,
165
+ "aria-expanded": b(P),
166
+ "aria-controls": b(j),
167
+ onClick: Z
168
+ }, [_(e.$slots, "menu-icon", { sidebarOpen: b(P) }, () => [t[0] ||= s("svg", {
169
+ xmlns: "http://www.w3.org/2000/svg",
170
+ width: "24",
171
+ height: "24",
172
+ viewBox: "0 0 24 24",
173
+ fill: "none",
174
+ stroke: "currentColor",
175
+ "stroke-width": "2",
176
+ "stroke-linecap": "round",
177
+ "stroke-linejoin": "round",
178
+ "aria-hidden": "true"
179
+ }, [
180
+ s("line", {
181
+ x1: "4",
182
+ x2: "20",
183
+ y1: "6",
184
+ y2: "6"
185
+ }),
186
+ s("line", {
187
+ x1: "4",
188
+ x2: "20",
189
+ y1: "12",
190
+ y2: "12"
191
+ }),
192
+ s("line", {
193
+ x1: "4",
194
+ x2: "20",
195
+ y1: "18",
196
+ y2: "18"
197
+ })
198
+ ], -1)])], 8, se)) : a("", !0), s("div", ce, [_(e.$slots, "header", f(u($.value)))])]),
199
+ V.value ? a("", !0) : (h(), o("aside", {
200
+ key: 0,
201
+ id: b(j),
202
+ class: "t-app-shell__sidebar",
203
+ "aria-label": l.sidebarLabel
204
+ }, [_(e.$slots, "sidebar", f(u($.value)))], 8, le)),
205
+ s("main", ue, [_(e.$slots, "default", {
206
+ mobile: V.value,
207
+ collapsed: H.value
208
+ })]),
209
+ c(n, { name: "t-app-shell-fade" }, {
210
+ default: S(() => [V.value && b(P) ? (h(), o("div", de, [s("div", {
211
+ class: "t-app-shell__backdrop",
212
+ "aria-hidden": "true",
213
+ onClick: ve
214
+ }), s("aside", {
215
+ id: b(j),
216
+ ref_key: "surfaceRef",
217
+ ref: U,
218
+ class: "t-app-shell__drawer",
219
+ role: "dialog",
220
+ "aria-modal": "true",
221
+ "aria-label": l.sidebarLabel,
222
+ tabindex: "-1",
223
+ onKeydown: ye
224
+ }, [s("div", pe, [s("button", {
225
+ type: "button",
226
+ class: "t-app-shell__drawer-close",
227
+ "aria-label": l.closeLabel,
228
+ onClick: X
229
+ }, [c(b(ge), f(u(b(ae))), null, 16)], 8, me)]), s("div", he, [_(e.$slots, "sidebar", f(u($.value)))])], 40, fe)])) : a("", !0)]),
230
+ _: 3
231
+ })
232
+ ]),
233
+ _: 3
234
+ }, 16, [
235
+ "class",
236
+ "style",
237
+ "data-mobile"
238
+ ]));
239
+ }
240
+ });
241
+ //#endregion
242
+ export { D as default };
243
+
244
+ //# sourceMappingURL=TAppShell.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TAppShell.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/TAppShell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n createId,\n focusFirst,\n focusLast,\n getFocusableElements,\n isEscapeKey,\n} from '@treeui/utils';\nimport { getTreeIcon, treeIconDefaults } from '@treeui/icons';\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n toRef,\n useAttrs,\n watch,\n} from 'vue';\nimport { useControllableOpen } from '../composables/useControllableOpen';\nimport type { TSidebarSide } from './TSidebar.vue';\nimport { treeSidebarInjectionKey } from './sidebar';\n\ndefineOptions({\n inheritAttrs: false,\n});\n\nconst CloseIcon = getTreeIcon('x');\n\nconst props = withDefaults(\n defineProps<{\n as?: string;\n side?: TSidebarSide;\n sidebarWidth?: string;\n collapsedWidth?: string;\n collapsible?: boolean;\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n mobile?: boolean;\n breakpoint?: string;\n sidebarOpen?: boolean;\n defaultSidebarOpen?: boolean;\n closeOnEscape?: boolean;\n closeOnOverlay?: boolean;\n showMenuButton?: boolean;\n menuLabel?: string;\n closeLabel?: string;\n sidebarLabel?: string;\n }>(),\n {\n as: 'div',\n side: 'left',\n sidebarWidth: '17.5rem',\n collapsedWidth: '4.75rem',\n collapsible: false,\n collapsed: undefined,\n defaultCollapsed: false,\n mobile: undefined,\n breakpoint: '768px',\n sidebarOpen: undefined,\n defaultSidebarOpen: false,\n closeOnEscape: true,\n closeOnOverlay: true,\n showMenuButton: true,\n menuLabel: 'Open menu',\n closeLabel: 'Close menu',\n sidebarLabel: 'Sidebar',\n },\n);\n\nconst emit = defineEmits<{\n 'update:collapsed': [value: boolean];\n 'collapse-change': [value: boolean];\n 'update:sidebarOpen': [value: boolean];\n 'sidebar-open-change': [value: boolean];\n}>();\n\nexport interface AppShellSlotProps {\n mobile: boolean;\n collapsed: boolean;\n sidebarOpen: boolean;\n toggleSidebar: () => void;\n closeSidebar: () => void;\n toggleCollapsed: () => void;\n}\n\ndefineSlots<{\n header?: (props: AppShellSlotProps) => unknown;\n sidebar?: (props: AppShellSlotProps) => unknown;\n default?: (props: Pick<AppShellSlotProps, 'mobile' | 'collapsed'>) => unknown;\n 'menu-icon'?: (props: { sidebarOpen: boolean }) => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst sidebarId = createId('t-app-shell-sidebar');\n\nconst { value: isCollapsed, setValue: setCollapsed } = useControllableOpen(\n toRef(props, 'collapsed'),\n props.defaultCollapsed,\n (value) => {\n emit('update:collapsed', value);\n emit('collapse-change', value);\n },\n);\n\nconst { value: isSidebarOpen, setValue: setSidebarOpen } = useControllableOpen(\n toRef(props, 'sidebarOpen'),\n props.defaultSidebarOpen,\n (value) => {\n emit('update:sidebarOpen', value);\n emit('sidebar-open-change', value);\n },\n);\n\n// Auto responsive detection when `mobile` is not explicitly controlled.\nconst autoMobile = ref(false);\nlet mediaQuery: MediaQueryList | null = null;\n\nconst onMediaChange = (event: MediaQueryListEvent | MediaQueryList) => {\n autoMobile.value = event.matches;\n};\n\nconst setupMediaQuery = () => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n teardownMediaQuery();\n mediaQuery = window.matchMedia(`(max-width: ${props.breakpoint})`);\n autoMobile.value = mediaQuery.matches;\n mediaQuery.addEventListener?.('change', onMediaChange);\n};\n\nconst teardownMediaQuery = () => {\n mediaQuery?.removeEventListener?.('change', onMediaChange);\n mediaQuery = null;\n};\n\nconst isMobile = computed(() => props.mobile ?? autoMobile.value);\n\n// Collapse is a desktop-only concept; the mobile drawer always shows the\n// expanded sidebar, so descendants and slots see `collapsed: false` there.\nconst effectiveCollapsed = computed(() =>\n isMobile.value ? false : isCollapsed.value,\n);\n\nconst surfaceRef = ref<HTMLElement | null>(null);\nconst previousFocusedElement = ref<HTMLElement | null>(null);\nlet previousBodyOverflow = '';\nlet bodyLocked = false;\n\nconst lockBodyScroll = () => {\n if (typeof document === 'undefined' || bodyLocked) {\n return;\n }\n\n previousBodyOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n bodyLocked = true;\n};\n\nconst unlockBodyScroll = () => {\n if (typeof document === 'undefined' || !bodyLocked) {\n return;\n }\n\n document.body.style.overflow = previousBodyOverflow;\n bodyLocked = false;\n};\n\nconst focusSurface = () => {\n nextTick(() => {\n if (!surfaceRef.value) {\n return;\n }\n\n const focused = focusFirst(surfaceRef.value);\n if (!focused) {\n surfaceRef.value.focus();\n }\n });\n};\n\nconst openSidebar = () => {\n previousFocusedElement.value =\n typeof document === 'undefined'\n ? null\n : (document.activeElement as HTMLElement | null);\n setSidebarOpen(true);\n};\n\nconst closeSidebar = () => {\n setSidebarOpen(false);\n};\n\nconst toggleSidebar = () => {\n if (isSidebarOpen.value) {\n closeSidebar();\n } else {\n openSidebar();\n }\n};\n\nconst toggleCollapsed = () => {\n if (!props.collapsible) {\n return;\n }\n\n setCollapsed(!isCollapsed.value);\n};\n\nconst onOverlayClick = () => {\n if (props.closeOnOverlay) {\n closeSidebar();\n }\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n if (isEscapeKey(event) && props.closeOnEscape) {\n event.preventDefault();\n closeSidebar();\n return;\n }\n\n if (event.key !== 'Tab' || !surfaceRef.value) {\n return;\n }\n\n const focusable = getFocusableElements(surfaceRef.value);\n\n if (!focusable.length) {\n event.preventDefault();\n surfaceRef.value.focus();\n return;\n }\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const activeElement = document.activeElement as HTMLElement | null;\n\n if (event.shiftKey && activeElement === first) {\n event.preventDefault();\n focusLast(surfaceRef.value);\n }\n\n if (!event.shiftKey && activeElement === last) {\n event.preventDefault();\n focusFirst(surfaceRef.value);\n }\n};\n\n// The off-canvas drawer only exists in mobile mode; keep body-scroll lock and\n// focus handling in sync with both the open flag and the responsive mode.\nconst syncOverlayState = (open: boolean, wasOpen: boolean) => {\n if (open && isMobile.value) {\n lockBodyScroll();\n focusSurface();\n return;\n }\n\n if (wasOpen) {\n unlockBodyScroll();\n nextTick(() => {\n previousFocusedElement.value?.focus();\n });\n }\n};\n\nwatch(isSidebarOpen, (value, previousValue) => {\n syncOverlayState(value, Boolean(previousValue));\n});\n\nwatch(isMobile, (mobile) => {\n if (!isSidebarOpen.value) {\n return;\n }\n\n // Leaving mobile removes the drawer from the DOM, so release the lock and\n // restore focus; re-entering mobile while \"open\" re-arms the overlay.\n if (mobile) {\n lockBodyScroll();\n focusSurface();\n } else {\n unlockBodyScroll();\n }\n});\n\nwatch(\n () => props.breakpoint,\n () => {\n if (typeof window !== 'undefined') {\n setupMediaQuery();\n }\n },\n);\n\nonMounted(() => {\n setupMediaQuery();\n});\n\nonBeforeUnmount(() => {\n teardownMediaQuery();\n unlockBodyScroll();\n});\n\nprovide(treeSidebarInjectionKey, {\n collapsed: effectiveCollapsed,\n});\n\nconst rootClasses = computed(() => [\n 't-app-shell',\n `t-app-shell--${props.side}`,\n {\n 'is-mobile': isMobile.value,\n 'is-collapsed':\n !isMobile.value && props.collapsible && isCollapsed.value,\n 'is-sidebar-open': isMobile.value && isSidebarOpen.value,\n },\n attrs.class,\n]);\n\nconst rootStyle = computed(() => [\n {\n '--tree-app-shell-sidebar-width': props.sidebarWidth,\n '--tree-app-shell-collapsed-width': props.collapsedWidth,\n },\n attrs.style,\n]);\n\nconst rootAttrs = computed(() => {\n const { class: _class, style: _style, ...rest } = attrs;\n return rest;\n});\n\nconst slotProps = computed<AppShellSlotProps>(() => ({\n mobile: isMobile.value,\n collapsed: effectiveCollapsed.value,\n sidebarOpen: isSidebarOpen.value,\n toggleSidebar,\n closeSidebar,\n toggleCollapsed,\n}));\n</script>\n\n<template>\n <component\n :is=\"as\"\n v-bind=\"rootAttrs\"\n :class=\"rootClasses\"\n :style=\"rootStyle\"\n :data-mobile=\"isMobile ? 'true' : 'false'\"\n >\n <header class=\"t-app-shell__header\">\n <button\n v-if=\"isMobile && showMenuButton\"\n type=\"button\"\n class=\"t-app-shell__menu-button\"\n :aria-label=\"menuLabel\"\n :aria-expanded=\"isSidebarOpen\"\n :aria-controls=\"sidebarId\"\n @click=\"toggleSidebar\"\n >\n <slot\n name=\"menu-icon\"\n :sidebar-open=\"isSidebarOpen\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"6\"\n y2=\"6\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"12\"\n y2=\"12\"\n />\n <line\n x1=\"4\"\n x2=\"20\"\n y1=\"18\"\n y2=\"18\"\n />\n </svg>\n </slot>\n </button>\n\n <div class=\"t-app-shell__header-content\">\n <slot\n name=\"header\"\n v-bind=\"slotProps\"\n />\n </div>\n </header>\n\n <aside\n v-if=\"!isMobile\"\n :id=\"sidebarId\"\n class=\"t-app-shell__sidebar\"\n :aria-label=\"sidebarLabel\"\n >\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </aside>\n\n <main class=\"t-app-shell__main\">\n <slot\n :mobile=\"isMobile\"\n :collapsed=\"effectiveCollapsed\"\n />\n </main>\n\n <transition name=\"t-app-shell-fade\">\n <div\n v-if=\"isMobile && isSidebarOpen\"\n class=\"t-app-shell__overlay\"\n >\n <div\n class=\"t-app-shell__backdrop\"\n aria-hidden=\"true\"\n @click=\"onOverlayClick\"\n />\n <aside\n :id=\"sidebarId\"\n ref=\"surfaceRef\"\n class=\"t-app-shell__drawer\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"sidebarLabel\"\n tabindex=\"-1\"\n @keydown=\"onKeydown\"\n >\n <div class=\"t-app-shell__drawer-topbar\">\n <button\n type=\"button\"\n class=\"t-app-shell__drawer-close\"\n :aria-label=\"closeLabel\"\n @click=\"closeSidebar\"\n >\n <CloseIcon v-bind=\"treeIconDefaults\" />\n </button>\n </div>\n <div class=\"t-app-shell__drawer-body\">\n <slot\n name=\"sidebar\"\n v-bind=\"slotProps\"\n />\n </div>\n </aside>\n </div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,WAAA,EAAA,EADQ,EAAA,KAAS,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,IAAA,EAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
@@ -36,6 +36,8 @@ export { default as TSelect } from './TSelect.vue';
36
36
  export type { TSelectOption } from './TSelect.vue';
37
37
  export { default as TSidebar } from './TSidebar.vue';
38
38
  export type { TSidebarSide } from './TSidebar.vue';
39
+ export { default as TAppShell } from './TAppShell.vue';
40
+ export type { AppShellSlotProps } from './TAppShell.vue';
39
41
  export { default as TInput } from './TInput.vue';
40
42
  export { default as TNumberInput } from './TNumberInput.vue';
41
43
  export { default as TSelectableList } from './TSelectableList.vue';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,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AsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});/* empty css */const e=require("./components/TAccordion.cjs"),t=require("./components/TAccordionItem.cjs"),n=require("./components/TAlert.cjs"),r=require("./components/TBadge.cjs"),ee=require("./components/TBreadcrumb.cjs"),te=require("./components/TBreadcrumbItem.cjs"),i=require("./components/TSpinner.cjs"),a=require("./components/TButton.cjs"),o=require("./components/TCard.cjs"),s=require("./components/TCheckbox.cjs"),c=require("./components/TCombobox.cjs"),l=require("./components/TModal.cjs"),u=require("./components/TConfirmDialog.cjs"),d=require("./components/TContainer.cjs"),f=require("./components/TContextMenu.cjs"),p=require("./components/TDatePicker.cjs"),m=require("./components/TDateTimePicker.cjs"),h=require("./components/TDrawer.cjs"),g=require("./components/TDropdown.cjs"),_=require("./components/TEmptyState.cjs"),v=require("./components/TFileUpload.cjs"),y=require("./components/TMultiSelect.cjs"),b=require("./components/TGrid.cjs"),x=require("./components/TNavbar.cjs"),S=require("./components/TLink.cjs"),C=require("./components/TNavMenu.cjs"),w=require("./components/TRadio.cjs"),T=require("./components/TRadioGroup.cjs"),E=require("./components/TSelect.cjs"),D=require("./components/TSidebar.cjs"),O=require("./components/TInput.cjs"),k=require("./components/TNumberInput.cjs"),A=require("./components/TSelectableList.cjs"),ne=require("./components/TStack.cjs"),j=require("./components/TTreeView.cjs"),M=require("./components/TSteps.cjs"),N=require("./components/TToggleGroup.cjs"),P=require("./components/TTextarea.cjs"),F=require("./components/TSkeleton.cjs"),I=require("./components/TStat.cjs"),L=require("./components/TSwitch.cjs"),R=require("./components/TTooltip.cjs"),z=require("./components/TFormField.cjs"),B=require("./components/TPagination.cjs"),V=require("./components/TPopover.cjs"),H=require("./components/TProgress.cjs"),U=require("./components/TTabs.cjs"),W=require("./components/TTabList.cjs"),G=require("./components/TTab.cjs"),K=require("./components/TTabPanel.cjs"),q=require("./components/TToast.cjs"),J=require("./composables/useToast.cjs"),Y=require("./components/TToastProvider.cjs"),X=require("./components/TAvatar.cjs"),Z=require("./components/TDivider.cjs"),re=require("./components/TTable.cjs"),ie=require("./components/TTag.cjs"),ae=require("./components/TTimeline.cjs"),oe=require("./components/TPricingCard.cjs"),se=require("./components/TPricing.cjs"),ce=require("./components/TMarkdownEditor.cjs"),le=require("./components/TIcon.cjs"),Q=require("./plugin.cjs"),$=require("./types/contracts.cjs");exports.TAccordion=e.default,exports.TAccordionItem=t.default,exports.TAlert=n.default,exports.TAppBar=x.default,exports.TAvatar=X.default,exports.TBadge=r.default,exports.TBreadcrumb=ee.default,exports.TBreadcrumbItem=te.default,exports.TButton=a.default,exports.TCard=o.default,exports.TCheckbox=s.default,exports.TCombobox=c.default,exports.TConfirmDialog=u.default,exports.TContainer=d.default,exports.TContextMenu=f.default,exports.TDatePicker=p.default,exports.TDateTimePicker=m.default,exports.TDivider=Z.default,exports.TDrawer=h.default,exports.TDropdown=g.default,exports.TEmptyState=_.default,exports.TFileUpload=v.default,exports.TFormField=z.default,exports.TGrid=b.default,exports.TIcon=le.default,exports.TInput=O.default,exports.TLink=S.default,exports.TMarkdownEditor=ce.default,exports.TModal=l.default,exports.TMultiSelect=y.default,exports.TNavMenu=C.default,exports.TNavbar=x.default,exports.TNumberInput=k.default,exports.TPagination=B.default,exports.TPopover=V.default,exports.TPricing=se.default,exports.TPricingCard=oe.default,exports.TProgress=H.default,exports.TRadio=w.default,exports.TRadioGroup=T.default,exports.TSelect=E.default,exports.TSelectableList=A.default,exports.TSidebar=D.default,exports.TSkeleton=F.default,exports.TSpinner=i.default,exports.TStack=ne.default,exports.TStat=I.default,exports.TStepper=M.default,exports.TSteps=M.default,exports.TSwitch=L.default,exports.TTab=G.default,exports.TTabList=W.default,exports.TTabPanel=K.default,exports.TTable=re.default,exports.TTabs=U.default,exports.TTag=ie.default,exports.TTextarea=P.default,exports.TTimeline=ae.default,exports.TToast=q.default,exports.TToastProvider=Y.default,exports.TToggleGroup=N.default,exports.TTooltip=R.default,exports.TTreeView=j.default,exports.TreeUIPlugin=Q.TreeUIPlugin,exports.default=Q.TreeUIPlugin,exports.install=Q.install,exports.treeCardVariants=$.treeCardVariants,exports.treeDrawerSides=$.treeDrawerSides,exports.treeSizes=$.treeSizes,exports.treeTooltipSides=$.treeTooltipSides,exports.treeVariants=$.treeVariants,exports.useToast=J.useToast;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});/* empty css */const e=require("./components/TAccordion.cjs"),t=require("./components/TAccordionItem.cjs"),n=require("./components/TAlert.cjs"),r=require("./components/TBadge.cjs"),ee=require("./components/TBreadcrumb.cjs"),te=require("./components/TBreadcrumbItem.cjs"),i=require("./components/TSpinner.cjs"),a=require("./components/TButton.cjs"),o=require("./components/TCard.cjs"),s=require("./components/TCheckbox.cjs"),c=require("./components/TCombobox.cjs"),l=require("./components/TModal.cjs"),u=require("./components/TConfirmDialog.cjs"),d=require("./components/TContainer.cjs"),f=require("./components/TContextMenu.cjs"),p=require("./components/TDatePicker.cjs"),m=require("./components/TDateTimePicker.cjs"),h=require("./components/TDrawer.cjs"),g=require("./components/TDropdown.cjs"),_=require("./components/TEmptyState.cjs"),v=require("./components/TFileUpload.cjs"),y=require("./components/TMultiSelect.cjs"),b=require("./components/TGrid.cjs"),x=require("./components/TNavbar.cjs"),S=require("./components/TLink.cjs"),C=require("./components/TNavMenu.cjs"),w=require("./components/TRadio.cjs"),T=require("./components/TRadioGroup.cjs"),E=require("./components/TSelect.cjs"),D=require("./components/TSidebar.cjs"),O=require("./components/TAppShell.cjs"),k=require("./components/TInput.cjs"),A=require("./components/TNumberInput.cjs"),ne=require("./components/TSelectableList.cjs"),j=require("./components/TStack.cjs"),M=require("./components/TTreeView.cjs"),N=require("./components/TSteps.cjs"),P=require("./components/TToggleGroup.cjs"),F=require("./components/TTextarea.cjs"),I=require("./components/TSkeleton.cjs"),L=require("./components/TStat.cjs"),R=require("./components/TSwitch.cjs"),z=require("./components/TTooltip.cjs"),B=require("./components/TFormField.cjs"),V=require("./components/TPagination.cjs"),H=require("./components/TPopover.cjs"),U=require("./components/TProgress.cjs"),W=require("./components/TTabs.cjs"),G=require("./components/TTabList.cjs"),K=require("./components/TTab.cjs"),q=require("./components/TTabPanel.cjs"),J=require("./components/TToast.cjs"),Y=require("./composables/useToast.cjs"),X=require("./components/TToastProvider.cjs"),Z=require("./components/TAvatar.cjs"),re=require("./components/TDivider.cjs"),ie=require("./components/TTable.cjs"),ae=require("./components/TTag.cjs"),oe=require("./components/TTimeline.cjs"),se=require("./components/TPricingCard.cjs"),ce=require("./components/TPricing.cjs"),le=require("./components/TMarkdownEditor.cjs"),ue=require("./components/TIcon.cjs"),Q=require("./plugin.cjs"),$=require("./types/contracts.cjs");exports.TAccordion=e.default,exports.TAccordionItem=t.default,exports.TAlert=n.default,exports.TAppBar=x.default,exports.TAppShell=O.default,exports.TAvatar=Z.default,exports.TBadge=r.default,exports.TBreadcrumb=ee.default,exports.TBreadcrumbItem=te.default,exports.TButton=a.default,exports.TCard=o.default,exports.TCheckbox=s.default,exports.TCombobox=c.default,exports.TConfirmDialog=u.default,exports.TContainer=d.default,exports.TContextMenu=f.default,exports.TDatePicker=p.default,exports.TDateTimePicker=m.default,exports.TDivider=re.default,exports.TDrawer=h.default,exports.TDropdown=g.default,exports.TEmptyState=_.default,exports.TFileUpload=v.default,exports.TFormField=B.default,exports.TGrid=b.default,exports.TIcon=ue.default,exports.TInput=k.default,exports.TLink=S.default,exports.TMarkdownEditor=le.default,exports.TModal=l.default,exports.TMultiSelect=y.default,exports.TNavMenu=C.default,exports.TNavbar=x.default,exports.TNumberInput=A.default,exports.TPagination=V.default,exports.TPopover=H.default,exports.TPricing=ce.default,exports.TPricingCard=se.default,exports.TProgress=U.default,exports.TRadio=w.default,exports.TRadioGroup=T.default,exports.TSelect=E.default,exports.TSelectableList=ne.default,exports.TSidebar=D.default,exports.TSkeleton=I.default,exports.TSpinner=i.default,exports.TStack=j.default,exports.TStat=L.default,exports.TStepper=N.default,exports.TSteps=N.default,exports.TSwitch=R.default,exports.TTab=K.default,exports.TTabList=G.default,exports.TTabPanel=q.default,exports.TTable=ie.default,exports.TTabs=W.default,exports.TTag=ae.default,exports.TTextarea=F.default,exports.TTimeline=oe.default,exports.TToast=J.default,exports.TToastProvider=X.default,exports.TToggleGroup=P.default,exports.TTooltip=z.default,exports.TTreeView=M.default,exports.TreeUIPlugin=Q.TreeUIPlugin,exports.default=Q.TreeUIPlugin,exports.install=Q.install,exports.treeCardVariants=$.treeCardVariants,exports.treeDrawerSides=$.treeDrawerSides,exports.treeSizes=$.treeSizes,exports.treeTooltipSides=$.treeTooltipSides,exports.treeVariants=$.treeVariants,exports.useToast=Y.useToast;