@dicehub/kappa 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/THIRD_PARTY_NOTICES.md +103 -1
- package/dist/{DropdownSubTrigger-DrZmNIcU.js → DropdownSubTrigger-DVOFK5Y1.js} +202 -146
- package/dist/DropdownSubTrigger-DVOFK5Y1.js.map +1 -0
- package/dist/PoweredByDicehub-DPceYF8f.js +143 -0
- package/dist/PoweredByDicehub-DPceYF8f.js.map +1 -0
- package/dist/{WorkspaceSwitcher-DBWdKZbM.js → WorkspaceSwitcher-DDAIMxeE.js} +5 -9
- package/dist/WorkspaceSwitcher-DDAIMxeE.js.map +1 -0
- package/dist/app-shell-PGvfb1aZ.js +570 -0
- package/dist/app-shell-PGvfb1aZ.js.map +1 -0
- package/dist/blocks/app-shell/AppShell.vue.d.ts +41 -0
- package/dist/blocks/app-shell/AppShellActions.vue.d.ts +3 -0
- package/dist/blocks/app-shell/AppShellAsideResizeHandle.vue.d.ts +20 -0
- package/dist/blocks/app-shell/AppShellPage.vue.d.ts +6 -0
- package/dist/blocks/app-shell/AppShellPanels.vue.d.ts +33 -0
- package/dist/blocks/app-shell/AppShellSearchDialog.vue.d.ts +10 -0
- package/dist/blocks/app-shell/AppShellSearchTrigger.vue.d.ts +7 -0
- package/dist/blocks/app-shell/AppShellToolbar.vue.d.ts +3 -0
- package/dist/blocks/app-shell/app-shell.d.ts +67 -0
- package/dist/blocks/app-shell/index.d.ts +19 -0
- package/dist/blocks/app-shell.js +2 -0
- package/dist/blocks/file-browser.js +1 -1
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/sidebar-layout/SidebarLayout.vue.d.ts +2 -0
- package/dist/blocks/sidebar-layout/sidebar-layout.d.ts +14 -2
- package/dist/blocks/sidebar-layout.js +1 -1
- package/dist/blocks/workspace-switcher/workspace-switcher.d.ts +2 -0
- package/dist/blocks/workspace-switcher.js +1 -1
- package/dist/{breadcrumbs-CIxUxZVD.js → breadcrumbs-CPfb83sY.js} +36 -41
- package/dist/{breadcrumbs-CIxUxZVD.js.map → breadcrumbs-CPfb83sY.js.map} +1 -1
- package/dist/button-Cst2B-9X.js +208 -0
- package/dist/button-Cst2B-9X.js.map +1 -0
- package/dist/{command-palette-BHFB86Gc.js → command-palette-BjXvHrd6.js} +178 -165
- package/dist/command-palette-BjXvHrd6.js.map +1 -0
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/toolbar-button.d.ts +23 -0
- package/dist/components/button.js +2 -2
- package/dist/components/command-palette/CommandPaletteResultItem.vue.d.ts +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/context-menu/ContextMenu.vue.d.ts +5 -5
- package/dist/components/context-menu.js +2 -2
- package/dist/components/data-grid.js +1 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +1 -1
- package/dist/components/dialog/Dialog.vue.d.ts +7 -7
- package/dist/components/dialog-layout/DialogLayoutAlert.vue.d.ts +3 -3
- package/dist/components/dicehub-logo/dicehub-logo.d.ts +17 -4
- package/dist/components/dicehub-logo/index.d.ts +1 -1
- package/dist/components/dicehub-logo.js +2 -2
- package/dist/components/drawer/Drawer.vue.d.ts +3 -3
- package/dist/components/dropdown/Dropdown.vue.d.ts +5 -5
- package/dist/components/dropdown/DropdownContent.vue.d.ts +1 -0
- package/dist/components/dropdown/DropdownSub.vue.d.ts +5 -5
- package/dist/components/dropdown/DropdownSubContent.vue.d.ts +1 -0
- package/dist/components/dropdown/dropdown.d.ts +2 -0
- package/dist/components/dropdown/use-dropdown-focus.d.ts +6 -0
- package/dist/components/dropdown.js +2 -2
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/hover-card/HoverCard.vue.d.ts +2 -2
- package/dist/components/kbd.js +1 -1
- package/dist/components/loader/Loader.vue.d.ts +1 -1
- package/dist/components/matrix-loader/MatrixLoader.vue.d.ts +1 -1
- package/dist/components/menu-bar.js +1 -1
- package/dist/components/popover/Popover.vue.d.ts +7 -7
- package/dist/components/sidebar/SidebarProvider.vue.d.ts +1 -0
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar/sidebar-resize.d.ts +1 -0
- package/dist/components/sidebar/sidebar.d.ts +5 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/table/TableCheckCell.vue.d.ts +1 -1
- package/dist/components/table/TableCheckHead.vue.d.ts +1 -1
- package/dist/components/toolbar/ToolbarButton.vue.d.ts +5 -1
- package/dist/components/toolbar/index.d.ts +3 -2
- package/dist/components/toolbar/toolbar.d.ts +2 -3
- package/dist/components/toolbar.js +3 -2
- package/dist/components/tooltip/Tooltip.vue.d.ts +5 -5
- package/dist/{context-menu-B_noSd5p.js → context-menu-WmJWrUGu.js} +2 -2
- package/dist/{context-menu-B_noSd5p.js.map → context-menu-WmJWrUGu.js.map} +1 -1
- package/dist/{data-grid-CobgDr8q.js → data-grid-BQkLsfk0.js} +2 -2
- package/dist/{data-grid-CobgDr8q.js.map → data-grid-BQkLsfk0.js.map} +1 -1
- package/dist/{dropdown-Dedb1tk8.js → dropdown-BABKXjuz.js} +2 -2
- package/dist/{dropdown-Dedb1tk8.js.map → dropdown-BABKXjuz.js.map} +1 -1
- package/dist/{file-browser-CGqaz2eI.js → file-browser-BxOJWvrF.js} +5 -5
- package/dist/{file-browser-CGqaz2eI.js.map → file-browser-BxOJWvrF.js.map} +1 -1
- package/dist/{filter-bar-COAlDQE4.js → filter-bar-CAyW-YoF.js} +2 -2
- package/dist/{filter-bar-COAlDQE4.js.map → filter-bar-CAyW-YoF.js.map} +1 -1
- package/dist/index.js +104 -103
- package/dist/{KbdGroup-CNwqr4vX.js → kbd-CNwqr4vX.js} +1 -1
- package/dist/kbd-CNwqr4vX.js.map +1 -0
- package/dist/{menu-bar-C-qQn2L1.js → menu-bar-DPJllpvf.js} +2 -2
- package/dist/{menu-bar-C-qQn2L1.js.map → menu-bar-DPJllpvf.js.map} +1 -1
- package/dist/paneled-bottom.png +0 -0
- package/dist/paneled-side.png +0 -0
- package/dist/registry/component-registry.json +15 -6
- package/dist/registry/generated.d.ts +75 -9
- package/dist/{registry-BhOIvW4q.js → registry-Bgb2nbb2.js} +102 -8
- package/dist/registry-Bgb2nbb2.js.map +1 -0
- package/dist/registry.js +1 -1
- package/dist/{sidebar-tcrbUrk_.js → sidebar-9TqPqgDD.js} +178 -157
- package/dist/sidebar-9TqPqgDD.js.map +1 -0
- package/dist/{SidebarLayout-D9RT-MdT.js → sidebar-layout-DRe1HpSt.js} +65 -46
- package/dist/sidebar-layout-DRe1HpSt.js.map +1 -0
- package/dist/styles/kappa.css +1 -1
- package/dist/styles/theme-kappa.css +296 -1
- package/dist/styles/tokens.json +767 -0
- package/dist/{toolbar-DC-4XdHD.js → toolbar-DJsnox8t.js} +90 -146
- package/dist/toolbar-DJsnox8t.js.map +1 -0
- package/licenses/nunito.LICENSE +93 -0
- package/package.json +1 -1
- package/dist/DropdownSubTrigger-DrZmNIcU.js.map +0 -1
- package/dist/KbdGroup-CNwqr4vX.js.map +0 -1
- package/dist/PoweredByDicehub-BD-y1NZA.js +0 -92
- package/dist/PoweredByDicehub-BD-y1NZA.js.map +0 -1
- package/dist/SidebarLayout-D9RT-MdT.js.map +0 -1
- package/dist/WorkspaceSwitcher-DBWdKZbM.js.map +0 -1
- package/dist/button-DSgFcDoO.js +0 -128
- package/dist/button-DSgFcDoO.js.map +0 -1
- package/dist/command-palette-BHFB86Gc.js.map +0 -1
- package/dist/registry-BhOIvW4q.js.map +0 -1
- package/dist/sidebar-tcrbUrk_.js.map +0 -1
- package/dist/toolbar-DC-4XdHD.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./avatar-BTIZnxA-.js";
|
|
2
2
|
import { t } from "./Button-Da1Xjklh.js";
|
|
3
|
-
import { t as n } from "./dropdown-
|
|
3
|
+
import { t as n } from "./dropdown-BABKXjuz.js";
|
|
4
4
|
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, nextTick as p, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
5
5
|
//#region src/blocks/workspace-switcher/WorkspaceSwitcherBadge.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
|
|
6
|
+
var S = ["data-large", "data-avatar-shape"], C = { key: 2 }, w = /* @__PURE__ */ d({
|
|
7
7
|
__name: "WorkspaceSwitcherBadge",
|
|
8
8
|
props: {
|
|
9
9
|
item: {},
|
|
@@ -13,6 +13,7 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
|
|
|
13
13
|
return (n, r) => (m(), s("span", {
|
|
14
14
|
class: "kappa-workspace-switcher__badge",
|
|
15
15
|
"data-large": t.large || void 0,
|
|
16
|
+
"data-avatar-shape": t.item.avatarShape ?? "square",
|
|
16
17
|
"aria-hidden": "true"
|
|
17
18
|
}, [t.item.avatarSrc ? (m(), a(b(e).Root, {
|
|
18
19
|
key: 0,
|
|
@@ -37,7 +38,7 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
|
|
|
37
38
|
emits: ["action"],
|
|
38
39
|
setup(e) {
|
|
39
40
|
return (t, i) => (m(), a(b(n).Group, null, {
|
|
40
|
-
default: x(() => [e.section === "footer" ? (m(), a(b(n).Separator, { key: 0 })) : o("", !0), (m(!0), s(r, null, g(e.items, (r) => (m(), a(b(n).Item, {
|
|
41
|
+
default: x(() => [e.section === "workspace" || e.section === "footer" ? (m(), a(b(n).Separator, { key: 0 })) : o("", !0), (m(!0), s(r, null, g(e.items, (r) => (m(), a(b(n).Item, {
|
|
41
42
|
key: r.value,
|
|
42
43
|
value: `workspace-action:${e.section}:${r.value}`,
|
|
43
44
|
"value-text": r.label,
|
|
@@ -204,11 +205,6 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
|
|
|
204
205
|
"close-on-select": "",
|
|
205
206
|
class: "kappa-workspace-switcher__option"
|
|
206
207
|
}, {
|
|
207
|
-
indicator: x(() => [...i[7] ||= [c("svg", {
|
|
208
|
-
viewBox: "0 0 16 16",
|
|
209
|
-
"aria-hidden": "true",
|
|
210
|
-
focusable: "false"
|
|
211
|
-
}, [c("path", { d: "m3 8.25 3 3 7-7" })], -1)]]),
|
|
212
208
|
default: x(() => [
|
|
213
209
|
u(w, { item: e }, null, 8, ["item"]),
|
|
214
210
|
c("span", j, y(e.name), 1),
|
|
@@ -262,4 +258,4 @@ var S = ["data-large"], C = { key: 2 }, w = /* @__PURE__ */ d({
|
|
|
262
258
|
//#endregion
|
|
263
259
|
export { E as n, N as t };
|
|
264
260
|
|
|
265
|
-
//# sourceMappingURL=WorkspaceSwitcher-
|
|
261
|
+
//# sourceMappingURL=WorkspaceSwitcher-DDAIMxeE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceSwitcher-DDAIMxeE.js","names":["$emit","$attrs"],"sources":["../src/blocks/workspace-switcher/WorkspaceSwitcherBadge.vue","../src/blocks/workspace-switcher/WorkspaceSwitcherBadge.vue","../src/blocks/workspace-switcher/WorkspaceSwitcherActions.vue","../src/blocks/workspace-switcher/WorkspaceSwitcherActions.vue","../src/blocks/workspace-switcher/workspace-switcher.ts","../src/blocks/workspace-switcher/WorkspaceSwitcher.vue","../src/blocks/workspace-switcher/WorkspaceSwitcher.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Avatar } from \"../../components/avatar\";\nimport type { WorkspaceSwitcherItem } from \"./workspace-switcher\";\ndefineProps<{ item: WorkspaceSwitcherItem; large?: boolean }>();\n</script>\n\n<template>\n <span class=\"kappa-workspace-switcher__badge\" :data-large=\"large || undefined\" :data-avatar-shape=\"item.avatarShape ?? 'square'\" aria-hidden=\"true\">\n <Avatar.Root v-if=\"item.avatarSrc\" class=\"kappa-workspace-switcher__avatar\">\n <Avatar.Image :src=\"item.avatarSrc\" alt=\"\" />\n <Avatar.Fallback>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</Avatar.Fallback>\n </Avatar.Root>\n <component :is=\"item.icon\" v-else-if=\"item.icon\" />\n <span v-else>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { Avatar } from \"../../components/avatar\";\nimport type { WorkspaceSwitcherItem } from \"./workspace-switcher\";\ndefineProps<{ item: WorkspaceSwitcherItem; large?: boolean }>();\n</script>\n\n<template>\n <span class=\"kappa-workspace-switcher__badge\" :data-large=\"large || undefined\" :data-avatar-shape=\"item.avatarShape ?? 'square'\" aria-hidden=\"true\">\n <Avatar.Root v-if=\"item.avatarSrc\" class=\"kappa-workspace-switcher__avatar\">\n <Avatar.Image :src=\"item.avatarSrc\" alt=\"\" />\n <Avatar.Fallback>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</Avatar.Fallback>\n </Avatar.Root>\n <component :is=\"item.icon\" v-else-if=\"item.icon\" />\n <span v-else>{{ item.initials ?? item.name.slice(0, 2).toUpperCase() }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { Dropdown } from \"../../components/dropdown\";\nimport type { WorkspaceSwitcherAction } from \"./workspace-switcher\";\ndefineProps<{ items: readonly WorkspaceSwitcherAction[]; section: \"primary\" | \"workspace\" | \"footer\" }>();\ndefineEmits<{ action: [action: WorkspaceSwitcherAction] }>();\n</script>\n\n<template>\n <Dropdown.Group>\n <Dropdown.Separator v-if=\"section === 'workspace' || section === 'footer'\" />\n <Dropdown.Item v-for=\"action in items\" :key=\"action.value\" :value=\"`workspace-action:${section}:${action.value}`\"\n :value-text=\"action.label\" :icon=\"action.icon\" :disabled=\"action.disabled\" :variant=\"action.variant\"\n :data-accent=\"action.accent || undefined\" class=\"kappa-workspace-switcher__action\"\n @select=\"$emit('action', action)\">{{ action.label }}</Dropdown.Item>\n </Dropdown.Group>\n</template>\n","<script setup lang=\"ts\">\nimport { Dropdown } from \"../../components/dropdown\";\nimport type { WorkspaceSwitcherAction } from \"./workspace-switcher\";\ndefineProps<{ items: readonly WorkspaceSwitcherAction[]; section: \"primary\" | \"workspace\" | \"footer\" }>();\ndefineEmits<{ action: [action: WorkspaceSwitcherAction] }>();\n</script>\n\n<template>\n <Dropdown.Group>\n <Dropdown.Separator v-if=\"section === 'workspace' || section === 'footer'\" />\n <Dropdown.Item v-for=\"action in items\" :key=\"action.value\" :value=\"`workspace-action:${section}:${action.value}`\"\n :value-text=\"action.label\" :icon=\"action.icon\" :disabled=\"action.disabled\" :variant=\"action.variant\"\n :data-accent=\"action.accent || undefined\" class=\"kappa-workspace-switcher__action\"\n @select=\"$emit('action', action)\">{{ action.label }}</Dropdown.Item>\n </Dropdown.Group>\n</template>\n","import type { Component, VNodeChild } from \"vue\";\nimport type { DropdownDirection, DropdownEmits, DropdownItemVariant, DropdownPositioningOptions } from \"../../components/dropdown\";\n\nexport interface WorkspaceSwitcherItem {\n value: string;\n name: string;\n /** Plan, member count, or other application-provided details. */\n description?: string;\n icon?: Component;\n avatarSrc?: string;\n /** Use a circle for personal identities. Defaults to square. */\n avatarShape?: \"circle\" | \"square\";\n initials?: string;\n disabled?: boolean;\n shortcut?: string;\n ariaKeyshortcuts?: string;\n}\n\nexport interface WorkspaceSwitcherAction {\n value: string;\n label: string;\n icon?: Component;\n disabled?: boolean;\n variant?: DropdownItemVariant;\n accent?: boolean;\n}\n\nexport const WORKSPACE_SWITCHER_DEFAULT_POSITIONING = {\n placement: \"bottom-start\", strategy: \"fixed\", gutter: 6, fitViewport: true, overflowPadding: 8,\n} as const satisfies DropdownPositioningOptions;\n\nexport interface WorkspaceSwitcherProps {\n items: readonly WorkspaceSwitcherItem[];\n /** Controlled workspace selection. */\n modelValue: string;\n label?: string;\n placeholder?: string;\n triggerLabel?: string;\n accountLabel?: string;\n /** Actions below the current workspace details. */\n actions?: readonly WorkspaceSwitcherAction[];\n /** Actions below the workspace list, such as creation or browsing. */\n workspaceActions?: readonly WorkspaceSwitcherAction[];\n footerActions?: readonly WorkspaceSwitcherAction[];\n disabled?: boolean;\n open?: boolean;\n defaultOpen?: boolean;\n dir?: DropdownDirection;\n positioning?: DropdownPositioningOptions;\n /** Disable inside a mobile drawer to keep its menu in the dialog. */\n teleport?: boolean;\n}\n\nexport type WorkspaceSwitcherEmits = {\n \"update:modelValue\": [value: string];\n \"update:open\": [value: boolean];\n openChange: [details: DropdownEmits[\"openChange\"][0]];\n action: [action: WorkspaceSwitcherAction];\n};\n\nexport interface WorkspaceSwitcherSlots {\n /** One button or link. Bind disabled when supplying a custom trigger. */\n trigger?: (context: { workspace: WorkspaceSwitcherItem | undefined; disabled: boolean }) => VNodeChild;\n}\n","<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from \"vue\";\nimport { Button } from \"../../components/button\";\nimport { Dropdown } from \"../../components/dropdown\";\nimport WorkspaceSwitcherBadge from \"./WorkspaceSwitcherBadge.vue\";\nimport WorkspaceSwitcherActions from \"./WorkspaceSwitcherActions.vue\";\nimport { WORKSPACE_SWITCHER_DEFAULT_POSITIONING, type WorkspaceSwitcherEmits, type WorkspaceSwitcherProps, type WorkspaceSwitcherSlots } from \"./workspace-switcher\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<WorkspaceSwitcherProps>(), {\n label: \"Workspaces\", placeholder: \"Select workspace\", disabled: false,\n open: undefined, defaultOpen: false, dir: undefined, teleport: true,\n positioning: () => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING }),\n actions: () => [], workspaceActions: () => [], footerActions: () => [],\n});\nconst emit = defineEmits<WorkspaceSwitcherEmits>();\ndefineSlots<WorkspaceSwitcherSlots>();\nconst scrollBody = ref<HTMLElement>();\nconst current = computed(() => props.items.find(item => item.value === props.modelValue));\nconst workspacePrefix = \"workspace:\";\nconst menuValue = computed(() => workspacePrefix + props.modelValue);\nconst positioning = computed(() => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING, ...props.positioning }));\nconst triggerLabel = computed(() => props.triggerLabel ?? (current.value ? `${props.label}: ${current.value.name}` : props.placeholder));\nasync function scrollHighlighted(details: { highlightedValue: string | null }) {\n await nextTick();\n const body = scrollBody.value;\n if (!body || details.highlightedValue === null) return;\n const item = Array.from(body.querySelectorAll<HTMLElement>('[data-part=\"item\"]'))\n .find(item => item.dataset.value === details.highlightedValue && item.hasAttribute(\"data-highlighted\"));\n if (!item) return;\n const bounds = body.getBoundingClientRect();\n const row = item.getBoundingClientRect();\n if (row.top < bounds.top || row.bottom > bounds.bottom) item.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n}\n</script>\n\n<template>\n <Dropdown.Root :open=\"props.open\" :default-open=\"props.defaultOpen\" :dir=\"props.dir\" :positioning=\"positioning\"\n :lazy-mount=\"!props.teleport\" :unmount-on-exit=\"!props.teleport\"\n :aria-label=\"props.label\" @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @highlight-change=\"scrollHighlighted\">\n <Dropdown.Trigger as-child>\n <slot name=\"trigger\" :workspace=\"current\" :disabled=\"props.disabled\">\n <Button variant=\"ghost\" :disabled=\"props.disabled\" :aria-label=\"triggerLabel\" class=\"kappa-workspace-switcher__trigger\">\n <WorkspaceSwitcherBadge v-if=\"current\" :item=\"current\" />\n <span class=\"kappa-workspace-switcher__trigger-name\">{{ current?.name ?? props.placeholder }}</span>\n <svg class=\"kappa-workspace-switcher__chevron\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m5 6 3-3 3 3M5 10l3 3 3-3\" /></svg>\n </Button>\n </slot>\n </Dropdown.Trigger>\n <Dropdown.Context v-slot=\"menu\">\n <Dropdown.Content v-bind=\"$attrs\" :teleport=\"props.teleport\" :inert=\"!menu.open || undefined\"\n class=\"kappa-workspace-switcher\" data-workspace-switcher>\n <div ref=\"scrollBody\" class=\"kappa-workspace-switcher__body\">\n <div v-if=\"current\" class=\"kappa-workspace-switcher__current\" data-slot=\"workspace-switcher-current\">\n <WorkspaceSwitcherBadge :item=\"current\" large />\n <div class=\"kappa-workspace-switcher__identity\"><strong>{{ current.name }}</strong><span v-if=\"current.description\">{{ current.description }}</span></div>\n </div>\n <template v-if=\"props.actions.length\">\n <Dropdown.Separator />\n <WorkspaceSwitcherActions :items=\"props.actions\" section=\"primary\" @action=\"emit('action', $event)\" />\n </template>\n <Dropdown.Separator v-if=\"current || props.actions.length\" />\n <Dropdown.RadioGroup :model-value=\"menuValue\" @update:model-value=\"emit('update:modelValue', $event.slice(workspacePrefix.length))\">\n <Dropdown.Label class=\"kappa-workspace-switcher__label\">{{ props.accountLabel ?? props.label }}</Dropdown.Label>\n <Dropdown.RadioItem v-for=\"item in props.items\" :key=\"item.value\" :value=\"workspacePrefix + item.value\" :value-text=\"item.name\"\n :aria-label=\"item.name\" :aria-keyshortcuts=\"item.ariaKeyshortcuts\" :disabled=\"item.disabled\" close-on-select\n class=\"kappa-workspace-switcher__option\">\n <WorkspaceSwitcherBadge :item=\"item\" />\n <span class=\"kappa-workspace-switcher__name\">{{ item.name }}</span>\n <Dropdown.Shortcut v-if=\"item.shortcut\" aria-hidden=\"true\">{{ item.shortcut }}</Dropdown.Shortcut>\n </Dropdown.RadioItem>\n </Dropdown.RadioGroup>\n <WorkspaceSwitcherActions v-if=\"props.workspaceActions.length\" :items=\"props.workspaceActions\" section=\"workspace\" @action=\"emit('action', $event)\" />\n </div>\n <WorkspaceSwitcherActions v-if=\"props.footerActions.length\" :items=\"props.footerActions\" section=\"footer\"\n class=\"kappa-workspace-switcher__footer\" @action=\"emit('action', $event)\" />\n </Dropdown.Content>\n </Dropdown.Context>\n </Dropdown.Root>\n</template>\n\n<style src=\"./workspace-switcher.css\"></style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from \"vue\";\nimport { Button } from \"../../components/button\";\nimport { Dropdown } from \"../../components/dropdown\";\nimport WorkspaceSwitcherBadge from \"./WorkspaceSwitcherBadge.vue\";\nimport WorkspaceSwitcherActions from \"./WorkspaceSwitcherActions.vue\";\nimport { WORKSPACE_SWITCHER_DEFAULT_POSITIONING, type WorkspaceSwitcherEmits, type WorkspaceSwitcherProps, type WorkspaceSwitcherSlots } from \"./workspace-switcher\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = withDefaults(defineProps<WorkspaceSwitcherProps>(), {\n label: \"Workspaces\", placeholder: \"Select workspace\", disabled: false,\n open: undefined, defaultOpen: false, dir: undefined, teleport: true,\n positioning: () => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING }),\n actions: () => [], workspaceActions: () => [], footerActions: () => [],\n});\nconst emit = defineEmits<WorkspaceSwitcherEmits>();\ndefineSlots<WorkspaceSwitcherSlots>();\nconst scrollBody = ref<HTMLElement>();\nconst current = computed(() => props.items.find(item => item.value === props.modelValue));\nconst workspacePrefix = \"workspace:\";\nconst menuValue = computed(() => workspacePrefix + props.modelValue);\nconst positioning = computed(() => ({ ...WORKSPACE_SWITCHER_DEFAULT_POSITIONING, ...props.positioning }));\nconst triggerLabel = computed(() => props.triggerLabel ?? (current.value ? `${props.label}: ${current.value.name}` : props.placeholder));\nasync function scrollHighlighted(details: { highlightedValue: string | null }) {\n await nextTick();\n const body = scrollBody.value;\n if (!body || details.highlightedValue === null) return;\n const item = Array.from(body.querySelectorAll<HTMLElement>('[data-part=\"item\"]'))\n .find(item => item.dataset.value === details.highlightedValue && item.hasAttribute(\"data-highlighted\"));\n if (!item) return;\n const bounds = body.getBoundingClientRect();\n const row = item.getBoundingClientRect();\n if (row.top < bounds.top || row.bottom > bounds.bottom) item.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n}\n</script>\n\n<template>\n <Dropdown.Root :open=\"props.open\" :default-open=\"props.defaultOpen\" :dir=\"props.dir\" :positioning=\"positioning\"\n :lazy-mount=\"!props.teleport\" :unmount-on-exit=\"!props.teleport\"\n :aria-label=\"props.label\" @update:open=\"emit('update:open', $event)\" @open-change=\"emit('openChange', $event)\"\n @highlight-change=\"scrollHighlighted\">\n <Dropdown.Trigger as-child>\n <slot name=\"trigger\" :workspace=\"current\" :disabled=\"props.disabled\">\n <Button variant=\"ghost\" :disabled=\"props.disabled\" :aria-label=\"triggerLabel\" class=\"kappa-workspace-switcher__trigger\">\n <WorkspaceSwitcherBadge v-if=\"current\" :item=\"current\" />\n <span class=\"kappa-workspace-switcher__trigger-name\">{{ current?.name ?? props.placeholder }}</span>\n <svg class=\"kappa-workspace-switcher__chevron\" viewBox=\"0 0 16 16\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m5 6 3-3 3 3M5 10l3 3 3-3\" /></svg>\n </Button>\n </slot>\n </Dropdown.Trigger>\n <Dropdown.Context v-slot=\"menu\">\n <Dropdown.Content v-bind=\"$attrs\" :teleport=\"props.teleport\" :inert=\"!menu.open || undefined\"\n class=\"kappa-workspace-switcher\" data-workspace-switcher>\n <div ref=\"scrollBody\" class=\"kappa-workspace-switcher__body\">\n <div v-if=\"current\" class=\"kappa-workspace-switcher__current\" data-slot=\"workspace-switcher-current\">\n <WorkspaceSwitcherBadge :item=\"current\" large />\n <div class=\"kappa-workspace-switcher__identity\"><strong>{{ current.name }}</strong><span v-if=\"current.description\">{{ current.description }}</span></div>\n </div>\n <template v-if=\"props.actions.length\">\n <Dropdown.Separator />\n <WorkspaceSwitcherActions :items=\"props.actions\" section=\"primary\" @action=\"emit('action', $event)\" />\n </template>\n <Dropdown.Separator v-if=\"current || props.actions.length\" />\n <Dropdown.RadioGroup :model-value=\"menuValue\" @update:model-value=\"emit('update:modelValue', $event.slice(workspacePrefix.length))\">\n <Dropdown.Label class=\"kappa-workspace-switcher__label\">{{ props.accountLabel ?? props.label }}</Dropdown.Label>\n <Dropdown.RadioItem v-for=\"item in props.items\" :key=\"item.value\" :value=\"workspacePrefix + item.value\" :value-text=\"item.name\"\n :aria-label=\"item.name\" :aria-keyshortcuts=\"item.ariaKeyshortcuts\" :disabled=\"item.disabled\" close-on-select\n class=\"kappa-workspace-switcher__option\">\n <WorkspaceSwitcherBadge :item=\"item\" />\n <span class=\"kappa-workspace-switcher__name\">{{ item.name }}</span>\n <Dropdown.Shortcut v-if=\"item.shortcut\" aria-hidden=\"true\">{{ item.shortcut }}</Dropdown.Shortcut>\n </Dropdown.RadioItem>\n </Dropdown.RadioGroup>\n <WorkspaceSwitcherActions v-if=\"props.workspaceActions.length\" :items=\"props.workspaceActions\" section=\"workspace\" @action=\"emit('action', $event)\" />\n </div>\n <WorkspaceSwitcherActions v-if=\"props.footerActions.length\" :items=\"props.footerActions\" section=\"footer\"\n class=\"kappa-workspace-switcher__footer\" @action=\"emit('action', $event)\" />\n </Dropdown.Content>\n </Dropdown.Context>\n </Dropdown.Root>\n</template>\n\n<style src=\"./workspace-switcher.css\"></style>\n"],"mappings":";;;;;;;;;;;;oBAOE,EAAA,GAAA,EAOO,QAAA;GAPD,OAAM;GAAmC,cAAY,EAAA,SAAS,KAAA;GAAY,qBAAmB,EAAA,KAAK,eAAW;GAAc,eAAY;EACxH,GAAA,CAAA,EAAA,KAAK,aAAxB,EAAA,GAAA,EAGc,EAAA,CAAA,CAAA,CAAA,MAAA;;GAHqB,OAAM;;GACvC,SAAA,QAA6C,CAA7C,EAA6C,EAAA,CAAA,CAAA,CAAA,OAAA;IAA9B,KAAK,EAAA,KAAK;IAAW,KAAI;GACxC,GAAA,MAAA,GAAA,CAAA,KAAA,CAAA,GAAA,EAA6F,EAAA,CAAA,CAAA,CAAA,UAAA,MAAA;IAA5E,SAAA,QAA0D,CAAvD,EAAA,EAAA,EAAA,KAAK,YAAY,EAAA,KAAK,KAAK,MAAK,GAAA,CAAA,CAAA,CAAO,YAAW,CAAA,GAAA,CAAA,CAAA,CAAA;;;;EAElC,CAAA,KAAA,EAAA,KAAK,QAA3C,EAAA,GAAA,EAAmD,EAAnC,EAAA,KAAK,IAAI,GAAA,EAAA,KA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,EAAA,GAAA,EAC8E,GAAA;;MADjB,OAAO,EAAM;MAAe,SAAQ;MAC/F,OAAM;MAAoC,UAAM,AAAA,EAAA,QAAA,MAAE,EAAI,UAAW,CAAM"}
|
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
import { t as e } from "./Button-Da1Xjklh.js";
|
|
2
|
+
import { t } from "./command-palette-BjXvHrd6.js";
|
|
3
|
+
import { t as n } from "./dialog-BgI1aM8y.js";
|
|
4
|
+
import { n as r, t as i } from "./kbd-CNwqr4vX.js";
|
|
5
|
+
import { t as a } from "./resizable-C9p_l-MV.js";
|
|
6
|
+
import { t as o } from "./sidebar-9TqPqgDD.js";
|
|
7
|
+
import { t as s } from "./sidebar-layout-DRe1HpSt.js";
|
|
8
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, guardReactiveProps as v, mergeProps as y, nextTick as ee, normalizeProps as b, normalizeStyle as te, onBeforeUnmount as ne, onMounted as re, openBlock as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, useId as ie, useSlots as O, watch as k, withCtx as A, withModifiers as j } from "vue";
|
|
9
|
+
import { DEFAULT_LOCALE as ae, LocaleProvider as oe, useLocaleContext as se } from "@ark-ui/vue/locale";
|
|
10
|
+
import { useSplitter as M } from "@ark-ui/vue/splitter";
|
|
11
|
+
//#region src/blocks/app-shell/AppShell.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var N = ["aria-label"], P = /* @__PURE__ */ _({
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
__name: "AppShell",
|
|
15
|
+
props: {
|
|
16
|
+
appearance: { default: "default" },
|
|
17
|
+
fill: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
hideDesktopTrigger: { type: Boolean },
|
|
22
|
+
bloom: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
railLabel: { default: "Workspace tools" },
|
|
27
|
+
variant: {},
|
|
28
|
+
contentAlignment: {},
|
|
29
|
+
contentMaxWidth: {},
|
|
30
|
+
label: {},
|
|
31
|
+
navigationLabel: {},
|
|
32
|
+
navigationProps: {},
|
|
33
|
+
secondaryLabel: {},
|
|
34
|
+
closeLabel: {},
|
|
35
|
+
resizeLabel: {},
|
|
36
|
+
fullScreenOnMobile: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: void 0
|
|
39
|
+
},
|
|
40
|
+
triggerProps: {},
|
|
41
|
+
id: {},
|
|
42
|
+
open: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: void 0
|
|
45
|
+
},
|
|
46
|
+
defaultOpen: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: void 0
|
|
49
|
+
},
|
|
50
|
+
mobileOpen: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: void 0
|
|
53
|
+
},
|
|
54
|
+
defaultMobileOpen: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
collapsible: {},
|
|
59
|
+
side: {},
|
|
60
|
+
compact: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: void 0
|
|
63
|
+
},
|
|
64
|
+
mobileBreakpoint: {},
|
|
65
|
+
mobileBreakpointReference: {},
|
|
66
|
+
width: {},
|
|
67
|
+
collapsedWidth: {},
|
|
68
|
+
mobileWidth: {},
|
|
69
|
+
resizable: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: void 0
|
|
72
|
+
},
|
|
73
|
+
collapseOnResize: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: void 0
|
|
76
|
+
},
|
|
77
|
+
resizeWidth: {},
|
|
78
|
+
defaultWidth: {},
|
|
79
|
+
minWidth: {},
|
|
80
|
+
maxWidth: {},
|
|
81
|
+
peekable: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: void 0
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
emits: [
|
|
87
|
+
"update:open",
|
|
88
|
+
"openChange",
|
|
89
|
+
"update:mobileOpen",
|
|
90
|
+
"mobileOpenChange",
|
|
91
|
+
"update:resizeWidth",
|
|
92
|
+
"resize",
|
|
93
|
+
"resizeEnd"
|
|
94
|
+
],
|
|
95
|
+
setup(e, { emit: t }) {
|
|
96
|
+
let n = e, r = t, i = O(), a = () => Object.keys(i).filter((e) => e !== "rail" && e !== "toolbar-trigger"), c = l(() => {
|
|
97
|
+
let { appearance: e, fill: t, bloom: r, hideDesktopTrigger: i, railLabel: a, ...o } = n;
|
|
98
|
+
return {
|
|
99
|
+
...e === "paneled" ? {
|
|
100
|
+
variant: "header",
|
|
101
|
+
contentAlignment: "available",
|
|
102
|
+
width: "240px",
|
|
103
|
+
collapsedWidth: "44px",
|
|
104
|
+
mobileWidth: "min(80vw, 320px)",
|
|
105
|
+
mobileBreakpoint: 1200
|
|
106
|
+
} : e === "compact" ? {
|
|
107
|
+
variant: "header",
|
|
108
|
+
width: "250px",
|
|
109
|
+
defaultWidth: 250,
|
|
110
|
+
collapsedWidth: "48px",
|
|
111
|
+
resizable: !0,
|
|
112
|
+
minWidth: 200,
|
|
113
|
+
maxWidth: 420
|
|
114
|
+
} : {},
|
|
115
|
+
...Object.fromEntries(Object.entries(o).filter(([, e]) => e !== void 0))
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
return (e, t) => (x(), u(D(s), y({
|
|
119
|
+
...e.$attrs,
|
|
120
|
+
...c.value
|
|
121
|
+
}, {
|
|
122
|
+
class: "kappa-app-shell",
|
|
123
|
+
"data-has-rail": !!i.rail || void 0,
|
|
124
|
+
"data-hide-desktop-trigger": n.hideDesktopTrigger || void 0,
|
|
125
|
+
"data-appearance": n.appearance,
|
|
126
|
+
"data-fill": n.fill || void 0,
|
|
127
|
+
"data-bloom": n.bloom || void 0,
|
|
128
|
+
"navigation-props": {
|
|
129
|
+
...n.navigationProps,
|
|
130
|
+
"data-app-shell-appearance": n.appearance
|
|
131
|
+
},
|
|
132
|
+
"onUpdate:open": t[0] ||= (e) => r("update:open", e),
|
|
133
|
+
onOpenChange: t[1] ||= (e) => r("openChange", e),
|
|
134
|
+
"onUpdate:mobileOpen": t[2] ||= (e) => r("update:mobileOpen", e),
|
|
135
|
+
onMobileOpenChange: t[3] ||= (e) => r("mobileOpenChange", e),
|
|
136
|
+
"onUpdate:resizeWidth": t[4] ||= (e) => r("update:resizeWidth", e),
|
|
137
|
+
onResize: t[5] ||= (e) => r("resize", e),
|
|
138
|
+
onResizeEnd: t[6] ||= (e) => r("resizeEnd", e)
|
|
139
|
+
}), m({
|
|
140
|
+
"toolbar-trigger": A((r) => [w(e.$slots, "toolbar-trigger", b(v(r)), () => [n.appearance === "paneled" && r.isMobile ? (x(), u(D(o).Trigger, y({ key: 0 }, n.triggerProps, { "aria-label": r.mobileOpen ? n.triggerProps?.closeLabel ?? "Close sidebar" : n.triggerProps?.openLabel ?? "Open sidebar" }), {
|
|
141
|
+
default: A(() => [...t[7] ||= [p("svg", {
|
|
142
|
+
viewBox: "0 0 16 16",
|
|
143
|
+
fill: "none",
|
|
144
|
+
"aria-hidden": "true",
|
|
145
|
+
focusable: "false"
|
|
146
|
+
}, [p("path", { d: "M2 4h12M2 8h12M2 12h12" })], -1)]]),
|
|
147
|
+
_: 1
|
|
148
|
+
}, 16, ["aria-label"])) : (x(), u(D(o).Trigger, b(y({ key: 1 }, n.triggerProps)), null, 16))])]),
|
|
149
|
+
_: 2
|
|
150
|
+
}, [C(a(), (t) => ({
|
|
151
|
+
name: t,
|
|
152
|
+
fn: A((n) => [w(e.$slots, t, b(v(n)))])
|
|
153
|
+
})), i.rail ? {
|
|
154
|
+
name: "rail",
|
|
155
|
+
fn: A((t) => [p("nav", {
|
|
156
|
+
class: "kappa-app-shell__rail",
|
|
157
|
+
"aria-label": n.railLabel
|
|
158
|
+
}, [w(e.$slots, "rail", b(v(t)))], 8, N)]),
|
|
159
|
+
key: "0"
|
|
160
|
+
} : void 0]), 1040, [
|
|
161
|
+
"data-has-rail",
|
|
162
|
+
"data-hide-desktop-trigger",
|
|
163
|
+
"data-appearance",
|
|
164
|
+
"data-fill",
|
|
165
|
+
"data-bloom",
|
|
166
|
+
"navigation-props"
|
|
167
|
+
]));
|
|
168
|
+
}
|
|
169
|
+
}), F = [
|
|
170
|
+
"dir",
|
|
171
|
+
"aria-label",
|
|
172
|
+
"aria-controls",
|
|
173
|
+
"aria-valuemin",
|
|
174
|
+
"aria-valuemax",
|
|
175
|
+
"aria-valuenow",
|
|
176
|
+
"aria-valuetext"
|
|
177
|
+
], ce = /* @__PURE__ */ _({
|
|
178
|
+
__name: "AppShellAsideResizeHandle",
|
|
179
|
+
props: {
|
|
180
|
+
frameId: {},
|
|
181
|
+
primaryId: {},
|
|
182
|
+
asideId: {},
|
|
183
|
+
direction: {},
|
|
184
|
+
width: {},
|
|
185
|
+
groupWidth: {},
|
|
186
|
+
minWidth: {},
|
|
187
|
+
maxWidth: {},
|
|
188
|
+
label: {}
|
|
189
|
+
},
|
|
190
|
+
emits: ["resize", "reset"],
|
|
191
|
+
setup(e, { emit: t }) {
|
|
192
|
+
let n = e, r = t, i = l(() => n.direction === "rtl" ? 0 : 1), a = l(() => i.value ? "primary:aside" : "aside:primary"), o = M(l(() => {
|
|
193
|
+
let e = n.groupWidth > 0 ? n.width / n.groupWidth * 100 : 50, t = {
|
|
194
|
+
id: "aside",
|
|
195
|
+
minSize: `${n.minWidth}px`,
|
|
196
|
+
maxSize: `${n.maxWidth}px`
|
|
197
|
+
}, a = {
|
|
198
|
+
id: "primary",
|
|
199
|
+
minSize: 0
|
|
200
|
+
};
|
|
201
|
+
return {
|
|
202
|
+
id: `${n.frameId}-resize`,
|
|
203
|
+
ids: {
|
|
204
|
+
root: n.frameId,
|
|
205
|
+
panel: (e) => e === "aside" ? n.asideId : n.primaryId
|
|
206
|
+
},
|
|
207
|
+
panels: i.value ? [a, t] : [t, a],
|
|
208
|
+
size: i.value ? [100 - e, e] : [e, 100 - e],
|
|
209
|
+
keyboardResizeBy: n.groupWidth > 0 ? 24 / n.groupWidth * 100 : 1,
|
|
210
|
+
onResize: ({ size: e }) => {
|
|
211
|
+
n.groupWidth > 0 && r("resize", e[i.value] / 100 * n.groupWidth);
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
})), s = l(() => o.value.getResizeTriggerProps({ id: a.value }));
|
|
215
|
+
return (t, n) => (x(), f("div", y(s.value, {
|
|
216
|
+
dir: e.direction,
|
|
217
|
+
class: "kappa-app-shell__aside-resize",
|
|
218
|
+
"data-slot": "app-shell-aside-resize",
|
|
219
|
+
"aria-label": e.label,
|
|
220
|
+
"aria-orientation": "vertical",
|
|
221
|
+
"aria-controls": e.asideId,
|
|
222
|
+
"aria-valuemin": e.minWidth,
|
|
223
|
+
"aria-valuemax": e.maxWidth,
|
|
224
|
+
"aria-valuenow": Math.round(e.width),
|
|
225
|
+
"aria-valuetext": `${Math.round(e.width)} pixels`,
|
|
226
|
+
onDblclick: n[0] ||= j((e) => r("reset"), ["prevent"])
|
|
227
|
+
}), null, 16, F));
|
|
228
|
+
}
|
|
229
|
+
}), le = [
|
|
230
|
+
"data-aside-mode",
|
|
231
|
+
"data-aside-open",
|
|
232
|
+
"data-aside-present",
|
|
233
|
+
"data-maximized",
|
|
234
|
+
"data-wide"
|
|
235
|
+
], ue = [
|
|
236
|
+
"id",
|
|
237
|
+
"inert",
|
|
238
|
+
"data-panel-mode",
|
|
239
|
+
"data-detail-open"
|
|
240
|
+
], de = ["id"], I = /* @__PURE__ */ _({
|
|
241
|
+
__name: "AppShellPanels",
|
|
242
|
+
props: {
|
|
243
|
+
detailOpen: {
|
|
244
|
+
type: Boolean,
|
|
245
|
+
default: !1
|
|
246
|
+
},
|
|
247
|
+
asideOpen: {
|
|
248
|
+
type: Boolean,
|
|
249
|
+
default: !1
|
|
250
|
+
},
|
|
251
|
+
asideMaximized: {
|
|
252
|
+
type: Boolean,
|
|
253
|
+
default: void 0
|
|
254
|
+
},
|
|
255
|
+
asideWidth: {},
|
|
256
|
+
size: {},
|
|
257
|
+
splitAt: { default: 1200 },
|
|
258
|
+
minSize: { default: 30 },
|
|
259
|
+
detailLabel: { default: "Details" },
|
|
260
|
+
asideLabel: { default: "Activity" },
|
|
261
|
+
resizeLabel: { default: "Resize panels" },
|
|
262
|
+
asideResizeLabel: { default: "Resize side panel" },
|
|
263
|
+
initialDetailFocus: {},
|
|
264
|
+
finalDetailFocus: {},
|
|
265
|
+
initialAsideFocus: {},
|
|
266
|
+
finalAsideFocus: {}
|
|
267
|
+
},
|
|
268
|
+
emits: [
|
|
269
|
+
"update:detailOpen",
|
|
270
|
+
"update:asideOpen",
|
|
271
|
+
"update:asideMaximized",
|
|
272
|
+
"update:asideWidth",
|
|
273
|
+
"update:size"
|
|
274
|
+
],
|
|
275
|
+
setup(e, { emit: t }) {
|
|
276
|
+
let r = e, i = t, o = S(), s = S(), c = S(), m = S(0), h = S(0), _ = S(0), v = `kappa-shell-panels-${ie()}`, y = se(ae), b = S(0), C = l(() => b.value || h.value), T = null, E = l(() => m.value >= r.splitAt ? "split" : "overlay"), O = l(() => C.value < 992 ? "overlay" : "inline"), j = S(!1), M = l(() => r.asideMaximized ?? j.value);
|
|
277
|
+
function N(e) {
|
|
278
|
+
r.asideMaximized === void 0 && (j.value = e), i("update:asideMaximized", e);
|
|
279
|
+
}
|
|
280
|
+
let P = l(() => r.asideOpen && M.value && O.value === "inline"), F = l(() => P.value && C.value < 2560), I = S(r.asideOpen), L = S(), R = l(() => Math.min(400, Math.floor(_.value || 400))), z = l(() => Math.floor(Math.max(R.value, Math.min(960, C.value * .6, _.value - 320)))), B = l(() => Math.max(400, Math.min(560, C.value * .2))), V = l(() => Math.max(R.value, Math.min(z.value, r.asideWidth ?? L.value ?? B.value)));
|
|
281
|
+
function H(e) {
|
|
282
|
+
let t = Math.max(R.value, Math.min(z.value, e));
|
|
283
|
+
r.asideWidth === void 0 && (L.value = t), i("update:asideWidth", t);
|
|
284
|
+
}
|
|
285
|
+
function U() {
|
|
286
|
+
L.value = void 0, i("update:asideWidth", void 0);
|
|
287
|
+
}
|
|
288
|
+
let W = S([50, 50]), G = l(() => r.detailOpen && E.value === "split" ? r.size ?? W.value : [100, 0]), K = l(() => [{
|
|
289
|
+
id: "primary",
|
|
290
|
+
minSize: r.detailOpen && E.value === "split" ? r.minSize : 0
|
|
291
|
+
}, {
|
|
292
|
+
id: "detail",
|
|
293
|
+
minSize: r.detailOpen && E.value === "split" ? r.minSize : 0
|
|
294
|
+
}]);
|
|
295
|
+
function q(e) {
|
|
296
|
+
!r.detailOpen || E.value !== "split" || e.some((e) => e < r.minSize) || (W.value = e, i("update:size", e));
|
|
297
|
+
}
|
|
298
|
+
function fe() {
|
|
299
|
+
i("update:detailOpen", !1);
|
|
300
|
+
}
|
|
301
|
+
function pe() {
|
|
302
|
+
i("update:asideOpen", !1);
|
|
303
|
+
}
|
|
304
|
+
function J() {
|
|
305
|
+
N(!P.value);
|
|
306
|
+
}
|
|
307
|
+
let Y = null, X = null;
|
|
308
|
+
k(() => r.detailOpen, (e) => {
|
|
309
|
+
e && (Y = document.activeElement instanceof HTMLElement ? document.activeElement : null);
|
|
310
|
+
}, { flush: "sync" }), k(() => r.asideOpen, (e) => {
|
|
311
|
+
e ? (I.value = !0, X = document.activeElement instanceof HTMLElement ? document.activeElement : null) : M.value && N(!1);
|
|
312
|
+
}, { flush: "sync" }), k(O, (e) => {
|
|
313
|
+
e === "overlay" && M.value && N(!1);
|
|
314
|
+
});
|
|
315
|
+
function Z(e, t) {
|
|
316
|
+
let n = e?.() ?? t;
|
|
317
|
+
n?.isConnected && n.getClientRects().length && !n.closest("[inert]") && n.focus({ preventScroll: !0 });
|
|
318
|
+
}
|
|
319
|
+
function Q() {
|
|
320
|
+
r.detailOpen || Z(r.finalDetailFocus, Y);
|
|
321
|
+
}
|
|
322
|
+
async function me() {
|
|
323
|
+
r.asideOpen || (I.value = !1, await ee(), Z(r.finalAsideFocus, X));
|
|
324
|
+
}
|
|
325
|
+
let $;
|
|
326
|
+
return re(() => {
|
|
327
|
+
T = o.value?.closest(".kappa-app-shell") ?? null, $ = new ResizeObserver((e) => {
|
|
328
|
+
for (let t of e) t.target === c.value && (m.value = t.contentRect.width), t.target === T && (b.value = t.contentRect.width), t.target === o.value && (h.value = t.contentRect.width), t.target === s.value && (_.value = t.contentRect.width);
|
|
329
|
+
}), c.value && $.observe(c.value), o.value && $.observe(o.value), s.value && $.observe(s.value), T && $.observe(T);
|
|
330
|
+
}), ne(() => $?.disconnect()), (e, t) => (x(), f("div", {
|
|
331
|
+
ref_key: "body",
|
|
332
|
+
ref: o,
|
|
333
|
+
class: "kappa-app-shell__panels-body",
|
|
334
|
+
"data-aside-mode": O.value,
|
|
335
|
+
"data-aside-open": r.asideOpen || void 0,
|
|
336
|
+
"data-aside-present": I.value || void 0,
|
|
337
|
+
"data-maximized": P.value || void 0,
|
|
338
|
+
"data-wide": C.value >= 2560 || void 0
|
|
339
|
+
}, [p("div", {
|
|
340
|
+
id: v,
|
|
341
|
+
ref_key: "frame",
|
|
342
|
+
ref: s,
|
|
343
|
+
class: "kappa-app-shell__panel-frame",
|
|
344
|
+
style: te({ "--kappa-shell-aside-width": `${V.value}px` })
|
|
345
|
+
}, [p("div", {
|
|
346
|
+
id: `${v}-primary`,
|
|
347
|
+
ref_key: "primary",
|
|
348
|
+
ref: c,
|
|
349
|
+
class: "kappa-app-shell__panels",
|
|
350
|
+
inert: F.value || void 0,
|
|
351
|
+
"data-panel-mode": E.value,
|
|
352
|
+
"data-detail-open": r.detailOpen || void 0
|
|
353
|
+
}, [g(D(a).Root, {
|
|
354
|
+
size: G.value,
|
|
355
|
+
panels: K.value,
|
|
356
|
+
class: "kappa-app-shell__splitter",
|
|
357
|
+
"onUpdate:size": q
|
|
358
|
+
}, {
|
|
359
|
+
default: A(() => [
|
|
360
|
+
g(D(a).Panel, {
|
|
361
|
+
id: "primary",
|
|
362
|
+
class: "kappa-app-shell__primary"
|
|
363
|
+
}, {
|
|
364
|
+
default: A(() => [w(e.$slots, "header"), w(e.$slots, "default")]),
|
|
365
|
+
_: 3
|
|
366
|
+
}),
|
|
367
|
+
r.detailOpen && E.value === "split" ? (x(), u(D(a).Handle, {
|
|
368
|
+
key: 0,
|
|
369
|
+
id: "primary:detail",
|
|
370
|
+
"aria-label": r.resizeLabel,
|
|
371
|
+
class: "kappa-app-shell__resize"
|
|
372
|
+
}, null, 8, ["aria-label"])) : d("", !0),
|
|
373
|
+
g(D(a).Panel, {
|
|
374
|
+
id: "detail",
|
|
375
|
+
class: "kappa-app-shell__detail-region"
|
|
376
|
+
}, {
|
|
377
|
+
default: A(() => [g(D(n).Root, {
|
|
378
|
+
open: r.detailOpen,
|
|
379
|
+
"restore-focus": !1,
|
|
380
|
+
modal: !1,
|
|
381
|
+
"trap-focus": !1,
|
|
382
|
+
"prevent-scroll": !1,
|
|
383
|
+
"close-on-interact-outside": !1,
|
|
384
|
+
"initial-focus-el": r.initialDetailFocus,
|
|
385
|
+
"aria-label": r.detailLabel,
|
|
386
|
+
"onUpdate:open": t[0] ||= (e) => i("update:detailOpen", e),
|
|
387
|
+
onExitComplete: Q
|
|
388
|
+
}, {
|
|
389
|
+
default: A(() => [g(D(n).Content, {
|
|
390
|
+
teleport: !1,
|
|
391
|
+
"show-backdrop": !1,
|
|
392
|
+
"show-close-button": !1,
|
|
393
|
+
class: "kappa-app-shell__detail",
|
|
394
|
+
"aria-label": r.detailLabel,
|
|
395
|
+
inert: !r.detailOpen || void 0
|
|
396
|
+
}, {
|
|
397
|
+
default: A(() => [w(e.$slots, "detail", {
|
|
398
|
+
close: fe,
|
|
399
|
+
mode: E.value
|
|
400
|
+
})]),
|
|
401
|
+
_: 3
|
|
402
|
+
}, 8, ["aria-label", "inert"])]),
|
|
403
|
+
_: 3
|
|
404
|
+
}, 8, [
|
|
405
|
+
"open",
|
|
406
|
+
"initial-focus-el",
|
|
407
|
+
"aria-label"
|
|
408
|
+
])]),
|
|
409
|
+
_: 3
|
|
410
|
+
})
|
|
411
|
+
]),
|
|
412
|
+
_: 3
|
|
413
|
+
}, 8, ["size", "panels"])], 8, ue), e.$slots.aside ? (x(), f("div", {
|
|
414
|
+
key: 0,
|
|
415
|
+
id: `${v}-aside`,
|
|
416
|
+
class: "kappa-app-shell__aside-region"
|
|
417
|
+
}, [r.asideOpen && O.value === "inline" && !P.value && h.value > 0 ? (x(), u(D(oe), {
|
|
418
|
+
key: 0,
|
|
419
|
+
locale: "en-US"
|
|
420
|
+
}, {
|
|
421
|
+
default: A(() => [g(ce, {
|
|
422
|
+
"frame-id": v,
|
|
423
|
+
"primary-id": `${v}-primary`,
|
|
424
|
+
"aside-id": `${v}-aside`,
|
|
425
|
+
direction: D(y).dir,
|
|
426
|
+
width: V.value,
|
|
427
|
+
"group-width": h.value,
|
|
428
|
+
"min-width": R.value,
|
|
429
|
+
"max-width": z.value,
|
|
430
|
+
label: r.asideResizeLabel,
|
|
431
|
+
onResize: H,
|
|
432
|
+
onReset: U
|
|
433
|
+
}, null, 8, [
|
|
434
|
+
"primary-id",
|
|
435
|
+
"aside-id",
|
|
436
|
+
"direction",
|
|
437
|
+
"width",
|
|
438
|
+
"group-width",
|
|
439
|
+
"min-width",
|
|
440
|
+
"max-width",
|
|
441
|
+
"label"
|
|
442
|
+
])]),
|
|
443
|
+
_: 1
|
|
444
|
+
})) : d("", !0), g(D(n).Root, {
|
|
445
|
+
open: r.asideOpen,
|
|
446
|
+
"restore-focus": !1,
|
|
447
|
+
modal: !1,
|
|
448
|
+
"trap-focus": !1,
|
|
449
|
+
"prevent-scroll": !1,
|
|
450
|
+
"close-on-interact-outside": !1,
|
|
451
|
+
"initial-focus-el": r.initialAsideFocus,
|
|
452
|
+
"aria-label": r.asideLabel,
|
|
453
|
+
"onUpdate:open": t[1] ||= (e) => i("update:asideOpen", e),
|
|
454
|
+
onExitComplete: me
|
|
455
|
+
}, {
|
|
456
|
+
default: A(() => [g(D(n).Content, {
|
|
457
|
+
teleport: !1,
|
|
458
|
+
"show-backdrop": !1,
|
|
459
|
+
"show-close-button": !1,
|
|
460
|
+
class: "kappa-app-shell__aside",
|
|
461
|
+
"aria-label": r.asideLabel,
|
|
462
|
+
inert: !r.asideOpen || void 0
|
|
463
|
+
}, {
|
|
464
|
+
default: A(() => [w(e.$slots, "aside", {
|
|
465
|
+
close: pe,
|
|
466
|
+
toggleMaximized: J,
|
|
467
|
+
maximized: P.value,
|
|
468
|
+
canMaximize: O.value === "inline"
|
|
469
|
+
})]),
|
|
470
|
+
_: 3
|
|
471
|
+
}, 8, ["aria-label", "inert"])]),
|
|
472
|
+
_: 3
|
|
473
|
+
}, 8, [
|
|
474
|
+
"open",
|
|
475
|
+
"initial-focus-el",
|
|
476
|
+
"aria-label"
|
|
477
|
+
])], 8, de)) : d("", !0)], 4)], 8, le));
|
|
478
|
+
}
|
|
479
|
+
}), L = {
|
|
480
|
+
key: 0,
|
|
481
|
+
class: "kappa-app-shell__page-heading"
|
|
482
|
+
}, R = { key: 0 }, z = { key: 1 }, B = {
|
|
483
|
+
key: 0,
|
|
484
|
+
class: "kappa-app-shell__actions"
|
|
485
|
+
}, V = /* @__PURE__ */ _({
|
|
486
|
+
__name: "AppShellPage",
|
|
487
|
+
props: {
|
|
488
|
+
as: { default: "main" },
|
|
489
|
+
title: {},
|
|
490
|
+
description: {}
|
|
491
|
+
},
|
|
492
|
+
setup(e) {
|
|
493
|
+
return (t, n) => (x(), u(T(e.as), { class: "kappa-app-shell__page" }, {
|
|
494
|
+
default: A(() => [e.title || t.$slots.actions ? (x(), f("header", L, [p("div", null, [e.title ? (x(), f("h1", R, E(e.title), 1)) : d("", !0), e.description ? (x(), f("p", z, E(e.description), 1)) : d("", !0)]), t.$slots.actions ? (x(), f("div", B, [w(t.$slots, "actions")])) : d("", !0)])) : d("", !0), w(t.$slots, "default")]),
|
|
495
|
+
_: 3
|
|
496
|
+
}));
|
|
497
|
+
}
|
|
498
|
+
}), H = (e, t) => {
|
|
499
|
+
let n = e.__vccOpts || e;
|
|
500
|
+
for (let [e, r] of t) n[e] = r;
|
|
501
|
+
return n;
|
|
502
|
+
}, U = {}, W = { class: "kappa-app-shell__toolbar" };
|
|
503
|
+
function G(e, t) {
|
|
504
|
+
return x(), f("header", W, [w(e.$slots, "default")]);
|
|
505
|
+
}
|
|
506
|
+
var K = /*#__PURE__*/ H(U, [["render", G]]), q = {}, fe = { class: "kappa-app-shell__actions" };
|
|
507
|
+
function pe(e, t) {
|
|
508
|
+
return x(), f("div", fe, [w(e.$slots, "default")]);
|
|
509
|
+
}
|
|
510
|
+
var J = /*#__PURE__*/ H(q, [["render", pe]]), Y = { class: "kappa-app-shell__search-label" }, X = { key: 0 }, Z = /* @__PURE__ */ _({
|
|
511
|
+
__name: "AppShellSearchTrigger",
|
|
512
|
+
props: {
|
|
513
|
+
label: { default: "Search or go to…" },
|
|
514
|
+
shortcut: { default: "" },
|
|
515
|
+
icon: {}
|
|
516
|
+
},
|
|
517
|
+
setup(t) {
|
|
518
|
+
let n = t, a = l(() => n.shortcut.trim().split(/\s+\+\s+/).filter(Boolean));
|
|
519
|
+
return (n, o) => (x(), u(D(e), {
|
|
520
|
+
class: "kappa-app-shell__search",
|
|
521
|
+
variant: "ghost",
|
|
522
|
+
icon: t.icon,
|
|
523
|
+
"aria-label": t.label,
|
|
524
|
+
"aria-haspopup": "dialog"
|
|
525
|
+
}, {
|
|
526
|
+
default: A(() => [p("span", Y, E(t.label), 1), a.value.length ? (x(), u(D(i), {
|
|
527
|
+
key: 0,
|
|
528
|
+
"aria-hidden": "true"
|
|
529
|
+
}, {
|
|
530
|
+
default: A(() => [(x(!0), f(c, null, C(a.value, (e, t) => (x(), f(c, { key: t }, [t ? (x(), f("span", X, "+")) : d("", !0), g(D(r), null, {
|
|
531
|
+
default: A(() => [h(E(e), 1)]),
|
|
532
|
+
_: 2
|
|
533
|
+
}, 1024)], 64))), 128))]),
|
|
534
|
+
_: 1
|
|
535
|
+
})) : d("", !0)]),
|
|
536
|
+
_: 1
|
|
537
|
+
}, 8, ["icon", "aria-label"]));
|
|
538
|
+
}
|
|
539
|
+
}), Q = /* @__PURE__ */ _({
|
|
540
|
+
__name: "AppShellSearchDialog",
|
|
541
|
+
props: { open: { type: Boolean } },
|
|
542
|
+
emits: ["update:open"],
|
|
543
|
+
setup(e, { emit: n }) {
|
|
544
|
+
let r = n;
|
|
545
|
+
return (n, i) => (x(), u(D(t).Dialog, {
|
|
546
|
+
open: e.open,
|
|
547
|
+
class: "kappa-app-shell__search-dialog",
|
|
548
|
+
"onUpdate:open": i[0] ||= (e) => r("update:open", e)
|
|
549
|
+
}, {
|
|
550
|
+
default: A(() => [w(n.$slots, "default")]),
|
|
551
|
+
_: 3
|
|
552
|
+
}, 8, ["open"]));
|
|
553
|
+
}
|
|
554
|
+
}), me = [
|
|
555
|
+
"default",
|
|
556
|
+
"compact",
|
|
557
|
+
"paneled"
|
|
558
|
+
], $ = Object.assign(P, {
|
|
559
|
+
Root: P,
|
|
560
|
+
SearchDialog: Q,
|
|
561
|
+
Panels: I,
|
|
562
|
+
Page: V,
|
|
563
|
+
Toolbar: K,
|
|
564
|
+
Actions: J,
|
|
565
|
+
SearchTrigger: Z
|
|
566
|
+
});
|
|
567
|
+
//#endregion
|
|
568
|
+
export { J as a, I as c, Z as i, P as l, me as n, K as o, Q as r, V as s, $ as t };
|
|
569
|
+
|
|
570
|
+
//# sourceMappingURL=app-shell-PGvfb1aZ.js.map
|