@nubisco/ui 5.26.1 → 5.27.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/dist/{Blueprint-DxHaLr4P.cjs → Blueprint-CMNV_pFD.cjs} +1 -1
- package/dist/{Blueprint-CQ0UBrND.js → Blueprint-DAySN9o8.js} +2 -2
- package/dist/{BlueprintCard-BpVITfop.js → BlueprintCard-CaDr0605.js} +1 -1
- package/dist/{BlueprintCard-ndSnIVKE.cjs → BlueprintCard-DIe9bROZ.cjs} +1 -1
- package/dist/{InlineLoading-w5XKQdGi.cjs → InlineLoading-DBJe1W5c.cjs} +1 -1
- package/dist/{InlineLoading-uGDGiTNv.js → InlineLoading-DcAS5wVb.js} +1 -1
- package/dist/{NotificationCenter-DNA6BL18.js → NotificationCenter-BcBIvNED.js} +3 -3
- package/dist/{NotificationCenter-BceqDL0a.cjs → NotificationCenter-CzYFsX7I.cjs} +1 -1
- package/dist/Shell-BWIHH0q8.js +497 -0
- package/dist/Shell-CgOJlNco.cjs +1 -0
- package/dist/SidebarHeaderToggle-BZ_YU8EU.cjs +1 -0
- package/dist/SidebarHeaderToggle-DBiI4idz.js +61 -0
- package/dist/{Skeleton-Ba4m2jYi.js → Skeleton-1DNgvYeb.js} +1 -1
- package/dist/{Skeleton-Bgo6pIY2.cjs → Skeleton-DmkE06TO.cjs} +1 -1
- package/dist/{Slider-BAhq6cJT.js → Slider-B7dj-HgC.js} +1 -1
- package/dist/{Slider-BK5yS7Ih.cjs → Slider-CUe2-pUo.cjs} +1 -1
- package/dist/{Spinner-swPRQ7kf.cjs → Spinner-BJ0Xx-p9.cjs} +1 -1
- package/dist/{Spinner-BxnDJP1H.js → Spinner-DQULvHnJ.js} +1 -1
- package/dist/{Stepper-BH7RO00M.js → Stepper-BOVp6Jjq.js} +1 -1
- package/dist/{Stepper-Da0Ba3PE.cjs → Stepper-SRPMyDLn.cjs} +1 -1
- package/dist/{StepperStep-CI482bzO.cjs → StepperStep-B5eYC6hG.cjs} +1 -1
- package/dist/{StepperStep-CLd8c1dj.js → StepperStep-CqlIqHLF.js} +1 -1
- package/dist/{Toaster-Cit4iNYG.cjs → Toaster-BqGcvJTt.cjs} +1 -1
- package/dist/{Toaster-zIdIFToW.js → Toaster-jp4xMJRY.js} +1 -1
- package/dist/{Tree-BiqO99_n.cjs → Tree-CBRmya_L.cjs} +1 -1
- package/dist/{Tree-ZtXPSE7w.js → Tree-HuylLYXS.js} +1 -1
- package/dist/{TreeNode-HVTTXuRl.js → TreeNode-BUYoyTFq.js} +1 -1
- package/dist/{TreeNode-BcVuy7zd.cjs → TreeNode-QHxF9qEB.cjs} +1 -1
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +205 -203
- package/dist/component-styles.json +4 -0
- package/dist/components/Blueprint.cjs +1 -1
- package/dist/components/Blueprint.mjs +1 -1
- package/dist/components/BlueprintBackground.cjs +1 -1
- package/dist/components/BlueprintBackground.mjs +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/BlueprintMinimap.cjs +1 -1
- package/dist/components/BlueprintMinimap.mjs +1 -1
- package/dist/components/BottomPanel.cjs +1 -1
- package/dist/components/BottomPanel.mjs +1 -1
- package/dist/components/Charts/Sparkline.cjs +1 -1
- package/dist/components/Charts/Sparkline.mjs +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/Form.cjs +1 -1
- package/dist/components/Form.mjs +1 -1
- package/dist/components/ImageCropper.cjs +1 -1
- package/dist/components/ImageCropper.mjs +1 -1
- package/dist/components/InlineEdit.cjs +1 -1
- package/dist/components/InlineEdit.mjs +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenterItem.cjs +1 -1
- package/dist/components/NotificationCenterItem.mjs +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar.mjs +1 -1
- package/dist/components/Radio.cjs +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/Shell.cjs +1 -1
- package/dist/components/Shell.d.ts +26 -0
- package/dist/components/Shell.mjs +1 -1
- package/dist/components/Shell.vue.d.ts +19 -13
- package/dist/components/Shell.vue.d.ts.map +1 -1
- package/dist/components/ShellPanel.cjs +1 -1
- package/dist/components/ShellPanel.mjs +1 -1
- package/dist/components/SidebarHeaderToggle.cjs +1 -0
- package/dist/components/SidebarHeaderToggle.d.ts +22 -0
- package/dist/components/SidebarHeaderToggle.mjs +2 -0
- package/dist/components/SidebarHeaderToggle.vue.d.ts +13 -0
- package/dist/components/SidebarHeaderToggle.vue.d.ts.map +1 -0
- package/dist/components/SidebarLink.cjs +1 -1
- package/dist/components/SidebarLink.mjs +1 -1
- package/dist/components/SidebarMenu.cjs +1 -1
- package/dist/components/SidebarMenu.mjs +1 -1
- package/dist/components/SidebarMenuGroup.cjs +1 -1
- package/dist/components/SidebarMenuGroup.mjs +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Skeleton.mjs +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Stepper.cjs +1 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/StepperStep.cjs +1 -1
- package/dist/components/StepperStep.mjs +1 -1
- package/dist/components/TableOfContents.cjs +1 -1
- package/dist/components/TableOfContents.mjs +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.mjs +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Tree.cjs +1 -1
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeNode.cjs +1 -1
- package/dist/components/TreeNode.mjs +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/Wireframe.cjs +1 -1
- package/dist/components/Wireframe.mjs +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +1 -0
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/manifest.js +1 -0
- package/dist/composables/useBlueprint.composable.cjs +1 -1
- package/dist/composables/useBlueprint.composable.mjs +1 -1
- package/dist/composables/useInlineLoading.composable.cjs +1 -1
- package/dist/composables/useInlineLoading.composable.mjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.cjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.mjs +1 -1
- package/dist/global.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +52 -51
- package/dist/main.d.ts +3 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/Shell.css +1 -1
- package/dist/styles/SidebarHeaderToggle.css +1 -0
- package/dist/ui.css +2 -1
- package/package.json +1 -1
- package/dist/Shell-6Dwl2FnC.cjs +0 -1
- package/dist/Shell-C9DK_Phw.js +0 -487
- /package/dist/{Blueprint.context-BU2ujsDD.js → Blueprint.context-2_MDBjES.js} +0 -0
- /package/dist/{Blueprint.context-DjbRPuLQ.cjs → Blueprint.context-Bg93XvTO.cjs} +0 -0
- /package/dist/{BlueprintBackground-D5i-Rlmm.cjs → BlueprintBackground-BMsTpTgI.cjs} +0 -0
- /package/dist/{BlueprintBackground-DtGJCzDy.js → BlueprintBackground-Drl6oulr.js} +0 -0
- /package/dist/{BlueprintControls-xe0sgQXW.cjs → BlueprintControls-BzVToPNV.cjs} +0 -0
- /package/dist/{BlueprintControls-CLW9PC_k.js → BlueprintControls-Yv2qEoQn.js} +0 -0
- /package/dist/{BlueprintMinimap-CujSRNvs.cjs → BlueprintMinimap-BKmT77co.cjs} +0 -0
- /package/dist/{BlueprintMinimap-xwEOZlv6.js → BlueprintMinimap-CfP0QG1u.js} +0 -0
- /package/dist/{BottomPanel-Cpr7_cZI.cjs → BottomPanel-B4BKovGy.cjs} +0 -0
- /package/dist/{BottomPanel-DdjpIyOA.js → BottomPanel-BElntZaN.js} +0 -0
- /package/dist/{FileUploader-DAbs5fWp.cjs → FileUploader-B1eAj1oT.cjs} +0 -0
- /package/dist/{FileUploader-DBGNk6Qg.js → FileUploader-B3JSn14R.js} +0 -0
- /package/dist/{Form-2pXj4bhZ.js → Form-4TJwMxqu.js} +0 -0
- /package/dist/{Form-CYesmztD.cjs → Form-B19aJo0v.cjs} +0 -0
- /package/dist/{ImageCropper-CLyH3zZ-.js → ImageCropper-B1a_A5Ib.js} +0 -0
- /package/dist/{ImageCropper-DAU0ddvI.cjs → ImageCropper-Czn19fHb.cjs} +0 -0
- /package/dist/{InlineEdit-BLrO3i1p.cjs → InlineEdit-CdzJp_Qc.cjs} +0 -0
- /package/dist/{InlineEdit-BemWhcI3.js → InlineEdit-sXl15lhv.js} +0 -0
- /package/dist/{NotificationCenterItem-CdzyTsCY.js → NotificationCenterItem-BS99lA9U.js} +0 -0
- /package/dist/{NotificationCenterItem-C8zaSiem.cjs → NotificationCenterItem-Bq6hBjxG.cjs} +0 -0
- /package/dist/{NumberInput-BtPQ7p5y.cjs → NumberInput-B3dMMfkv.cjs} +0 -0
- /package/dist/{NumberInput-Dk8ofnNJ.js → NumberInput-CYKutu9p.js} +0 -0
- /package/dist/{ProgressBar-B2EXpOdC.js → ProgressBar-NAH9T3du.js} +0 -0
- /package/dist/{ProgressBar-D1O4iAxy.cjs → ProgressBar-vlXYuXqm.cjs} +0 -0
- /package/dist/{Radio-DALC1A47.cjs → Radio-CZFANKLv.cjs} +0 -0
- /package/dist/{Radio-fgJU2hwQ.js → Radio-CqwO18b1.js} +0 -0
- /package/dist/{ShellPanel-rrSF7BQs.cjs → ShellPanel-BBR1L2R6.cjs} +0 -0
- /package/dist/{ShellPanel-Cu3C3H9J.js → ShellPanel-BpyI2aIg.js} +0 -0
- /package/dist/{SidebarLink-Bi8GxvCf.js → SidebarLink-CrAE9jVP.js} +0 -0
- /package/dist/{SidebarLink-BbzeT8Tq.cjs → SidebarLink-Q_24cprL.cjs} +0 -0
- /package/dist/{SidebarMenu-B4nng5Fz.cjs → SidebarMenu-CG7INeFB.cjs} +0 -0
- /package/dist/{SidebarMenu-DoMgZO7c.js → SidebarMenu-CyU7BDNi.js} +0 -0
- /package/dist/{SidebarMenuGroup-CmCPtZJD.js → SidebarMenuGroup-DBYK7rcf.js} +0 -0
- /package/dist/{SidebarMenuGroup-BdOpz4N1.cjs → SidebarMenuGroup-DTBKBUjn.cjs} +0 -0
- /package/dist/{Sparkline-DI7arXX0.cjs → Sparkline-BVdqvpyz.cjs} +0 -0
- /package/dist/{Sparkline-C4gA55Pc.js → Sparkline-DcUnQ1P1.js} +0 -0
- /package/dist/{Stepper.context-Dxw8xYGX.cjs → Stepper.context-ChJ_li6d.cjs} +0 -0
- /package/dist/{Stepper.context-q_CjX3CO.js → Stepper.context-qAFBgE0m.js} +0 -0
- /package/dist/{TableOfContents-1OY_mlI4.js → TableOfContents-D_BGx-pk.js} +0 -0
- /package/dist/{TableOfContents-BZCrLDe1.cjs → TableOfContents-DuHDYa_2.cjs} +0 -0
- /package/dist/{Tabs-D3daz-Xc.cjs → Tabs-CAp2Db_g.cjs} +0 -0
- /package/dist/{Tabs-BzsQiQ2H.js → Tabs-DMvOHEf0.js} +0 -0
- /package/dist/{Toast-Ci4P6mM0.cjs → Toast-DVDmzm3P.cjs} +0 -0
- /package/dist/{Toast-CeGAznEA.js → Toast-DonkhsQJ.js} +0 -0
- /package/dist/{TreeContext-xtlNBGhB.js → TreeContext-C7vosBJ7.js} +0 -0
- /package/dist/{TreeContext-we7Xt7IP.cjs → TreeContext-DndlJ7Bk.cjs} +0 -0
- /package/dist/{Walkthrough-ZuHZx69C.cjs → Walkthrough-4ZCZMy5H.cjs} +0 -0
- /package/dist/{Walkthrough-BYCQMYqG.js → Walkthrough-BhmY-KYC.js} +0 -0
- /package/dist/{Wireframe-CX8KvGJx.cjs → Wireframe-BRodipXd.cjs} +0 -0
- /package/dist/{Wireframe-Bf55dFWu.js → Wireframe-BjuYZcDs.js} +0 -0
- /package/dist/{pixi-scene-D57Y3MvT.js → pixi-scene-BO02twgE.js} +0 -0
- /package/dist/{pixi-scene-OOSMyGKD.cjs → pixi-scene-BZa8QvH8.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-BMMz4C1C.cjs → useLoadingAnnouncer.composable-BCTl7kry.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-DY8jGEwJ.js → useLoadingAnnouncer.composable-kJ9fDUqa.js} +0 -0
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
2
|
+
import { NB_LAYER_INJECTION_KEY as t, clampLayer as n, useSurfaceLayer as r } from "./composables/useSurfaceLayer.composable.mjs";
|
|
3
|
+
import { hasSlotContent as i } from "./utils/slotContent.helper.mjs";
|
|
4
|
+
import { NB_SHELL_SLOT_KEY as ee, createShellSlotRegistry as te } from "./composables/useShellSlot.composable.mjs";
|
|
5
|
+
import { NB_SHELL_LAYOUT_KEY as ne } from "./composables/useShellLayout.composable.mjs";
|
|
6
|
+
import { computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as re, defineComponent as ie, getCurrentInstance as ae, mergeProps as oe, nextTick as l, normalizeClass as u, normalizeStyle as se, onBeforeUnmount as ce, onMounted as le, openBlock as d, provide as f, ref as p, renderSlot as m, toDisplayString as h, toRef as ue, unref as de, useId as fe, useSlots as pe, vShow as me, watch as g, withCtx as he, withDirectives as ge, withKeys as _e } from "vue";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/components/SurfaceLayerScope.vue
|
|
9
|
+
var ve = /* @__PURE__ */ ie({
|
|
10
|
+
__name: "SurfaceLayerScope",
|
|
11
|
+
props: { level: {} },
|
|
12
|
+
setup(e) {
|
|
13
|
+
let r = e;
|
|
14
|
+
return f(t, a(() => n(r.level))), (e, t) => m(e.$slots, "default");
|
|
15
|
+
}
|
|
16
|
+
}), ye = ["href"], be = { class: "nb-shell__middle" }, xe = [
|
|
17
|
+
"id",
|
|
18
|
+
"aria-label",
|
|
19
|
+
"tabindex",
|
|
20
|
+
"inert",
|
|
21
|
+
"aria-hidden"
|
|
22
|
+
], Se = { class: "nb-shell__sidebar-logo" }, Ce = { class: "nb-shell__sidebar-header-action" }, we = {
|
|
23
|
+
key: 1,
|
|
24
|
+
class: "nb-shell__sidebar-logo"
|
|
25
|
+
}, Te = { class: "nb-shell__sidebar-nav" }, Ee = { class: "nb-shell__sidebar-bottom" }, De = { class: "nb-shell__right" }, Oe = {
|
|
26
|
+
key: 2,
|
|
27
|
+
class: "nb-shell__menubar"
|
|
28
|
+
}, ke = {
|
|
29
|
+
key: 3,
|
|
30
|
+
class: "nb-shell__topbar"
|
|
31
|
+
}, Ae = [
|
|
32
|
+
"aria-label",
|
|
33
|
+
"aria-expanded",
|
|
34
|
+
"aria-controls"
|
|
35
|
+
], je = { class: "nb-shell__content-row" }, Me = ["inert", "aria-hidden"], Ne = ["aria-expanded"], Pe = {
|
|
36
|
+
class: "nb-shell__contextbar-toggle-glyph",
|
|
37
|
+
"aria-hidden": "true"
|
|
38
|
+
}, Fe = { class: "nb-shell__main-row" }, Ie = ["aria-label"], Le = ["id"], Re = [
|
|
39
|
+
"aria-label",
|
|
40
|
+
"inert",
|
|
41
|
+
"aria-hidden"
|
|
42
|
+
], ze = ["aria-label"], Be = [
|
|
43
|
+
"aria-label",
|
|
44
|
+
"aria-valuenow",
|
|
45
|
+
"aria-valuemax"
|
|
46
|
+
], Ve = "(pointer: coarse) and (hover: none) and (max-height: 500px)", He = "a[href], [role=\"menuitem\"]", _ = 288, Ue = 16, We = 64, v = /* @__PURE__ */ e(/* @__PURE__ */ ie({
|
|
47
|
+
__name: "Shell",
|
|
48
|
+
props: {
|
|
49
|
+
inspectorVisible: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
},
|
|
53
|
+
inspectorExpanded: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
inspectorSize: { default: "md" },
|
|
58
|
+
resizable: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
61
|
+
},
|
|
62
|
+
inspectorWidth: {},
|
|
63
|
+
mainPadding: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: !0
|
|
66
|
+
},
|
|
67
|
+
sidebarVariant: { default: "compact" },
|
|
68
|
+
sidebarHeaderActionPosition: { default: "end" },
|
|
69
|
+
sidebarHeaderActionCompact: { default: "stack" },
|
|
70
|
+
topbar: { default: "auto" },
|
|
71
|
+
skipToContent: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !0
|
|
74
|
+
},
|
|
75
|
+
skipToContentLabel: { default: "Skip to content" },
|
|
76
|
+
mainId: {},
|
|
77
|
+
sidebarLabel: { default: "Primary" },
|
|
78
|
+
inspectorLabel: { default: "Inspector" },
|
|
79
|
+
contextbarLabel: { default: "Browse" },
|
|
80
|
+
collapseAt: { default: "md" },
|
|
81
|
+
sidebarOpen: { type: Boolean },
|
|
82
|
+
navToggleLabel: { default: "Navigation" },
|
|
83
|
+
inspectorCloseLabel: { default: "Close inspector" }
|
|
84
|
+
},
|
|
85
|
+
emits: [
|
|
86
|
+
"update:inspectorWidth",
|
|
87
|
+
"update:sidebarOpen",
|
|
88
|
+
"update:inspectorVisible"
|
|
89
|
+
],
|
|
90
|
+
setup(e, { expose: t, emit: n }) {
|
|
91
|
+
let ie = pe();
|
|
92
|
+
function v(e) {
|
|
93
|
+
return i(ie, e);
|
|
94
|
+
}
|
|
95
|
+
let { registry: Ge, count: y, sharedCount: Ke, setElement: b } = te();
|
|
96
|
+
f(ee, Ge);
|
|
97
|
+
let qe = /* @__PURE__ */ new Map();
|
|
98
|
+
function x(e) {
|
|
99
|
+
let t = qe.get(e);
|
|
100
|
+
return t || (t = (t) => b(e, t ?? null), qe.set(e, t)), t;
|
|
101
|
+
}
|
|
102
|
+
function S(e) {
|
|
103
|
+
return v(e) || y(e) > 0;
|
|
104
|
+
}
|
|
105
|
+
function C(e) {
|
|
106
|
+
return Ke(e) > 0 ? "nb-shell__region--ordered" : null;
|
|
107
|
+
}
|
|
108
|
+
let w = a(() => {
|
|
109
|
+
for (let e of [
|
|
110
|
+
"sidebar-logo",
|
|
111
|
+
"sidebar-nav",
|
|
112
|
+
"sidebar-bottom"
|
|
113
|
+
]) if (v(e)) return !0;
|
|
114
|
+
return !1;
|
|
115
|
+
}), T = e, E = p(!1), D = n, Je = {
|
|
116
|
+
md: 672,
|
|
117
|
+
lg: 1056
|
|
118
|
+
}, O = p(typeof window < "u" ? window.innerWidth : Infinity);
|
|
119
|
+
function k(e) {
|
|
120
|
+
let t = Je[T.collapseAt];
|
|
121
|
+
return t != null && e < t;
|
|
122
|
+
}
|
|
123
|
+
let A = 0;
|
|
124
|
+
function Ye() {
|
|
125
|
+
let e = window.innerWidth;
|
|
126
|
+
k(e) !== k(O.value) && (O.value = e);
|
|
127
|
+
}
|
|
128
|
+
function Xe() {
|
|
129
|
+
A ||= window.requestAnimationFrame(() => {
|
|
130
|
+
A = 0, O.value = window.innerWidth;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function Ze() {
|
|
134
|
+
typeof window > "u" || (window.removeEventListener("resize", Xe), A &&= (window.cancelAnimationFrame(A), 0));
|
|
135
|
+
}
|
|
136
|
+
function Qe() {
|
|
137
|
+
typeof window > "u" || (O.value = window.innerWidth, window.addEventListener("resize", Xe, { passive: !0 }));
|
|
138
|
+
}
|
|
139
|
+
let j = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia(Ve) : null, M = p(j?.matches === !0);
|
|
140
|
+
function N(e) {
|
|
141
|
+
M.value = e.matches;
|
|
142
|
+
}
|
|
143
|
+
let P = a(() => k(O.value) || T.collapseAt !== "none" && M.value), F = ae()?.vnode.props ?? {};
|
|
144
|
+
function I(e, t) {
|
|
145
|
+
return e in F || t in F;
|
|
146
|
+
}
|
|
147
|
+
function $e(e, t) {
|
|
148
|
+
if (e in F) return F[e];
|
|
149
|
+
if (t in F) return F[t];
|
|
150
|
+
}
|
|
151
|
+
function L(e, t) {
|
|
152
|
+
return I(e, t) && $e(e, t) !== void 0;
|
|
153
|
+
}
|
|
154
|
+
let R = L("sidebarOpen", "sidebar-open"), z = p(!1);
|
|
155
|
+
I("sidebarOpen", "sidebar-open") && !R && g(() => T.sidebarOpen, (e) => {
|
|
156
|
+
z.value = e === !0;
|
|
157
|
+
});
|
|
158
|
+
let B = a(() => R ? T.sidebarOpen === !0 : z.value), et = fe(), tt = a(() => `nb-shell-sidebar-${et}`), nt = p(null), V = p(null), rt = a(() => w.value && P.value), it = a(() => w.value && P.value && !B.value);
|
|
159
|
+
function H(e) {
|
|
160
|
+
R || (z.value = e), D("update:sidebarOpen", e);
|
|
161
|
+
}
|
|
162
|
+
function at(e) {
|
|
163
|
+
if (!e.defaultPrevented) {
|
|
164
|
+
if (w.value && P.value && B.value) {
|
|
165
|
+
H(!1);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
K.value && q(!1);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function ot(e, t) {
|
|
172
|
+
let n = e.target, r = n?.closest?.(He);
|
|
173
|
+
if (!r || !t?.contains(r)) return !1;
|
|
174
|
+
let i = r.getAttribute("aria-haspopup");
|
|
175
|
+
return !(i != null && i !== "false" || r.hasAttribute("aria-expanded") || r.getAttribute("aria-disabled") === "true" || n?.closest?.("[data-nb-keep-open]"));
|
|
176
|
+
}
|
|
177
|
+
function st(e) {
|
|
178
|
+
!P.value || !B.value || ot(e, V.value) && H(!1);
|
|
179
|
+
}
|
|
180
|
+
function ct(e) {
|
|
181
|
+
!P.value || !E.value || ot(e, e.currentTarget) && (E.value = !1);
|
|
182
|
+
}
|
|
183
|
+
function lt(e) {
|
|
184
|
+
E.value = e;
|
|
185
|
+
}
|
|
186
|
+
g(B, async (e) => {
|
|
187
|
+
P.value && (await l(), e ? (V.value?.querySelector("a[href], button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])") ?? V.value)?.focus?.() : nt.value?.focus?.());
|
|
188
|
+
}), g(P, (e) => {
|
|
189
|
+
!e && B.value && H(!1);
|
|
190
|
+
});
|
|
191
|
+
let U = L("inspectorVisible", "inspector-visible"), ut = p(T.inspectorVisible === !0);
|
|
192
|
+
I("inspectorVisible", "inspector-visible") && !U && g(() => T.inspectorVisible, (e) => {
|
|
193
|
+
ut.value = e === !0;
|
|
194
|
+
});
|
|
195
|
+
let W = p(!1), G = a(() => (U ? T.inspectorVisible === !0 : ut.value) ? !(P.value && W.value) : !1), K = a(() => P.value && G.value);
|
|
196
|
+
function q(e) {
|
|
197
|
+
U ? W.value = !e : (ut.value = e, W.value = !1), D("update:inspectorVisible", e);
|
|
198
|
+
}
|
|
199
|
+
g(() => T.inspectorVisible, (e) => {
|
|
200
|
+
e && (W.value = !1);
|
|
201
|
+
}), g(P, (e) => {
|
|
202
|
+
e || (W.value = !1);
|
|
203
|
+
});
|
|
204
|
+
let dt = p(null), ft = p(null);
|
|
205
|
+
g(K, async (e) => {
|
|
206
|
+
if (e) ft.value = document.activeElement ?? null, await l(), dt.value?.focus?.();
|
|
207
|
+
else {
|
|
208
|
+
let e = ft.value;
|
|
209
|
+
ft.value = null, e?.isConnected && (await l(), e.focus?.());
|
|
210
|
+
}
|
|
211
|
+
}), g(K, (e) => {
|
|
212
|
+
e && w.value && B.value && H(!1);
|
|
213
|
+
});
|
|
214
|
+
function pt() {
|
|
215
|
+
q(!1);
|
|
216
|
+
}
|
|
217
|
+
f(ne, {
|
|
218
|
+
collapsed: P,
|
|
219
|
+
inspectorOverlay: K
|
|
220
|
+
});
|
|
221
|
+
let mt = a(() => K.value), J = p(null), ht = fe(), gt = a(() => T.mainId || `nb-shell-main-${ht}`);
|
|
222
|
+
function _t() {
|
|
223
|
+
J.value?.focus();
|
|
224
|
+
}
|
|
225
|
+
let vt = a(() => rt.value || T.topbar === "always" ? !0 : T.topbar === "never" ? !1 : v("topbar-left") || v("topbar-right") || y("topbar-left") > 0 || y("topbar-right") > 0), { layerProps: yt } = r(), { layerProps: bt } = r({
|
|
226
|
+
level: 0,
|
|
227
|
+
probe: !1,
|
|
228
|
+
provideContext: !1
|
|
229
|
+
});
|
|
230
|
+
f("nb-shell-sidebar-variant", ue(T, "sidebarVariant"));
|
|
231
|
+
let xt = a(() => v("sidebar-header-action") && !P.value);
|
|
232
|
+
f("nb-shell-sidebar-header-action-position", ue(T, "sidebarHeaderActionPosition"));
|
|
233
|
+
let Y = p(null), St = p(!1);
|
|
234
|
+
le(() => b("inspector", Y.value)), g(Y, (e) => b("inspector", e));
|
|
235
|
+
let Ct = {
|
|
236
|
+
lg: .5,
|
|
237
|
+
xl: .75
|
|
238
|
+
}, wt = {
|
|
239
|
+
xs: 288,
|
|
240
|
+
sm: 360,
|
|
241
|
+
md: 560
|
|
242
|
+
}, Tt = a(() => Number.isFinite(O.value) ? O.value : 1280), X = a(() => Math.max(_, Tt.value * .5));
|
|
243
|
+
function Z(e) {
|
|
244
|
+
return Math.round(Math.max(_, Math.min(e, X.value)));
|
|
245
|
+
}
|
|
246
|
+
let Et = L("inspectorWidth", "inspector-width"), Dt = p(null), Ot = a(() => Et ? T.inspectorWidth ?? null : Dt.value);
|
|
247
|
+
function kt(e) {
|
|
248
|
+
Et || (Dt.value = e), D("update:inspectorWidth", e);
|
|
249
|
+
}
|
|
250
|
+
let At = a(() => {
|
|
251
|
+
let e = Ot.value;
|
|
252
|
+
if (!(!T.resizable || !G.value || e == null)) return { "--nb-shell-inspector-width": `${Z(e)}px` };
|
|
253
|
+
}), Q = a(() => {
|
|
254
|
+
let e = Ot.value;
|
|
255
|
+
if (e != null) return Z(e);
|
|
256
|
+
if (T.inspectorExpanded) return Math.round(Tt.value * .5);
|
|
257
|
+
let t = Ct[T.inspectorSize], n = t == null ? wt[T.inspectorSize] ?? _ : Tt.value * t;
|
|
258
|
+
return Math.round(T.inspectorSize === "xl" ? n : Math.min(n, X.value));
|
|
259
|
+
}), jt = a(() => Math.round(Math.max(X.value, Q.value))), Mt = a(() => Q.value);
|
|
260
|
+
function Nt() {
|
|
261
|
+
return Q.value;
|
|
262
|
+
}
|
|
263
|
+
function Pt(e) {
|
|
264
|
+
let t = Y.value;
|
|
265
|
+
if (!t) return;
|
|
266
|
+
let n = t.getBoundingClientRect().right;
|
|
267
|
+
kt(Z(n - e.clientX));
|
|
268
|
+
}
|
|
269
|
+
function $() {
|
|
270
|
+
St.value = !1, window.removeEventListener("pointermove", Pt), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $);
|
|
271
|
+
}
|
|
272
|
+
function Ft(e) {
|
|
273
|
+
T.resizable && (e.preventDefault(), St.value = !0, window.addEventListener("pointermove", Pt), window.addEventListener("pointerup", $), window.addEventListener("pointercancel", $));
|
|
274
|
+
}
|
|
275
|
+
function It() {
|
|
276
|
+
kt(null);
|
|
277
|
+
}
|
|
278
|
+
function Lt(e) {
|
|
279
|
+
if (!T.resizable) return;
|
|
280
|
+
let t = e.shiftKey ? We : Ue, n;
|
|
281
|
+
switch (e.key) {
|
|
282
|
+
case "ArrowLeft":
|
|
283
|
+
n = Nt() + t;
|
|
284
|
+
break;
|
|
285
|
+
case "ArrowRight":
|
|
286
|
+
n = Nt() - t;
|
|
287
|
+
break;
|
|
288
|
+
case "Home":
|
|
289
|
+
n = _;
|
|
290
|
+
break;
|
|
291
|
+
case "End":
|
|
292
|
+
n = X.value;
|
|
293
|
+
break;
|
|
294
|
+
case "Enter":
|
|
295
|
+
case " ":
|
|
296
|
+
n = null;
|
|
297
|
+
break;
|
|
298
|
+
default: return;
|
|
299
|
+
}
|
|
300
|
+
e.preventDefault(), kt(n == null ? null : Z(n));
|
|
301
|
+
}
|
|
302
|
+
return le(() => {
|
|
303
|
+
typeof window > "u" || (O.value = window.innerWidth, window.addEventListener("resize", Ye, { passive: !0 }), T.resizable && Qe(), j && (M.value = j.matches, typeof j.addEventListener == "function" ? j.addEventListener("change", N) : j.addListener?.(N)));
|
|
304
|
+
}), g(() => T.collapseAt, () => {
|
|
305
|
+
typeof window < "u" && (O.value = window.innerWidth);
|
|
306
|
+
}), g(() => T.resizable, (e) => e ? Qe() : Ze()), ce(() => {
|
|
307
|
+
$(), Ze(), typeof window < "u" && window.removeEventListener("resize", Ye), j && (typeof j.removeEventListener == "function" ? j.removeEventListener("change", N) : j.removeListener?.(N));
|
|
308
|
+
}), t({
|
|
309
|
+
mainEl: J,
|
|
310
|
+
sidebarEl: V,
|
|
311
|
+
inspectorEl: Y,
|
|
312
|
+
focusMain: () => J.value?.focus(),
|
|
313
|
+
setSidebarOpen: H,
|
|
314
|
+
setInspectorVisible: q,
|
|
315
|
+
collapsed: P,
|
|
316
|
+
inspectorOverlay: K,
|
|
317
|
+
setContextbarOpen: lt
|
|
318
|
+
}), (t, n) => (d(), s("div", oe({ class: "nb-shell" }, de(yt), {
|
|
319
|
+
class: [
|
|
320
|
+
{ "nb-shell--no-sidebar": !w.value },
|
|
321
|
+
w.value ? `nb-shell--sidebar-${e.sidebarVariant}` : null,
|
|
322
|
+
{
|
|
323
|
+
"nb-shell--collapsed": P.value,
|
|
324
|
+
"nb-shell--drawer-open": P.value && B.value
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
onKeydown: _e(at, ["esc"])
|
|
328
|
+
}), [
|
|
329
|
+
e.skipToContent ? (d(), s("a", {
|
|
330
|
+
key: 0,
|
|
331
|
+
class: "nb-shell__skip-link",
|
|
332
|
+
href: `#${gt.value}`,
|
|
333
|
+
onClick: _t
|
|
334
|
+
}, h(e.skipToContentLabel), 9, ye)) : o("", !0),
|
|
335
|
+
S("outer-menu") ? (d(), s("div", {
|
|
336
|
+
key: 1,
|
|
337
|
+
ref: x("outer-menu"),
|
|
338
|
+
class: u(["nb-shell__outer-menu", C("outer-menu")])
|
|
339
|
+
}, [m(t.$slots, "outer-menu", {}, void 0, !0)], 2)) : o("", !0),
|
|
340
|
+
c("div", be, [
|
|
341
|
+
w.value ? (d(), s("nav", {
|
|
342
|
+
key: 0,
|
|
343
|
+
id: tt.value,
|
|
344
|
+
ref_key: "sidebarRef",
|
|
345
|
+
ref: V,
|
|
346
|
+
class: "nb-shell__sidebar",
|
|
347
|
+
"aria-label": e.sidebarLabel,
|
|
348
|
+
tabindex: P.value ? -1 : void 0,
|
|
349
|
+
inert: it.value || void 0,
|
|
350
|
+
"aria-hidden": it.value || void 0,
|
|
351
|
+
onClickCapture: st
|
|
352
|
+
}, [
|
|
353
|
+
xt.value ? (d(), s("div", {
|
|
354
|
+
key: 0,
|
|
355
|
+
class: u(["nb-shell__sidebar-header", [`nb-shell__sidebar-header--${e.sidebarHeaderActionPosition}`, `nb-shell__sidebar-header--compact-${e.sidebarHeaderActionCompact}`]])
|
|
356
|
+
}, [c("div", Se, [m(t.$slots, "sidebar-logo", {}, void 0, !0)]), c("div", Ce, [m(t.$slots, "sidebar-header-action", {}, void 0, !0)])], 2)) : (d(), s("div", we, [m(t.$slots, "sidebar-logo", {}, void 0, !0)])),
|
|
357
|
+
c("div", Te, [m(t.$slots, "sidebar-nav", {}, void 0, !0)]),
|
|
358
|
+
n[4] ||= c("div", { class: "nb-shell__sidebar-spacer" }, null, -1),
|
|
359
|
+
c("div", Ee, [m(t.$slots, "sidebar-bottom", {}, void 0, !0)])
|
|
360
|
+
], 40, xe)) : o("", !0),
|
|
361
|
+
w.value && P.value && B.value ? (d(), s("div", {
|
|
362
|
+
key: 1,
|
|
363
|
+
class: "nb-shell__scrim",
|
|
364
|
+
onClick: n[0] ||= (e) => H(!1)
|
|
365
|
+
})) : o("", !0),
|
|
366
|
+
c("div", De, [
|
|
367
|
+
S("inner-menu") ? (d(), s("div", {
|
|
368
|
+
key: 0,
|
|
369
|
+
ref: x("inner-menu"),
|
|
370
|
+
class: u(["nb-shell__inner-menu", C("inner-menu")])
|
|
371
|
+
}, [m(t.$slots, "inner-menu", {}, void 0, !0)], 2)) : o("", !0),
|
|
372
|
+
S("notification") ? (d(), s("div", {
|
|
373
|
+
key: 1,
|
|
374
|
+
ref: x("notification"),
|
|
375
|
+
class: u(["nb-shell__notification", C("notification")])
|
|
376
|
+
}, [m(t.$slots, "notification", {}, void 0, !0)], 2)) : o("", !0),
|
|
377
|
+
v("menubar") ? (d(), s("div", Oe, [m(t.$slots, "menubar", {}, void 0, !0)])) : o("", !0),
|
|
378
|
+
vt.value ? (d(), s("div", ke, [
|
|
379
|
+
rt.value ? (d(), s("button", {
|
|
380
|
+
key: 0,
|
|
381
|
+
ref_key: "navToggleRef",
|
|
382
|
+
ref: nt,
|
|
383
|
+
type: "button",
|
|
384
|
+
class: "nb-shell__nav-toggle",
|
|
385
|
+
"aria-label": e.navToggleLabel,
|
|
386
|
+
"aria-expanded": B.value,
|
|
387
|
+
"aria-controls": tt.value,
|
|
388
|
+
onClick: n[1] ||= (e) => H(!B.value)
|
|
389
|
+
}, [...n[5] ||= [c("span", {
|
|
390
|
+
class: "nb-shell__nav-toggle-glyph",
|
|
391
|
+
"aria-hidden": "true"
|
|
392
|
+
}, [
|
|
393
|
+
c("span"),
|
|
394
|
+
c("span"),
|
|
395
|
+
c("span")
|
|
396
|
+
], -1)]], 8, Ae)) : o("", !0),
|
|
397
|
+
c("div", {
|
|
398
|
+
ref: x("topbar-left"),
|
|
399
|
+
class: "nb-shell__topbar-left"
|
|
400
|
+
}, [m(t.$slots, "topbar-left", {}, void 0, !0)], 512),
|
|
401
|
+
c("div", {
|
|
402
|
+
ref: x("topbar-right"),
|
|
403
|
+
class: "nb-shell__topbar-right"
|
|
404
|
+
}, [m(t.$slots, "topbar-right", {}, void 0, !0)], 512)
|
|
405
|
+
])) : o("", !0),
|
|
406
|
+
c("div", je, [c("div", {
|
|
407
|
+
class: "nb-shell__body",
|
|
408
|
+
inert: mt.value || void 0,
|
|
409
|
+
"aria-hidden": mt.value || void 0
|
|
410
|
+
}, [
|
|
411
|
+
S("fixedbar") ? (d(), s("div", {
|
|
412
|
+
key: 0,
|
|
413
|
+
ref: x("fixedbar"),
|
|
414
|
+
class: "nb-shell__fixedbar"
|
|
415
|
+
}, [m(t.$slots, "fixedbar", {}, void 0, !0)], 512)) : o("", !0),
|
|
416
|
+
P.value && S("contextbar") ? (d(), s("button", {
|
|
417
|
+
key: 1,
|
|
418
|
+
type: "button",
|
|
419
|
+
class: "nb-shell__contextbar-toggle",
|
|
420
|
+
"aria-expanded": E.value,
|
|
421
|
+
onClick: n[2] ||= (e) => E.value = !E.value
|
|
422
|
+
}, [c("span", null, h(e.contextbarLabel), 1), c("span", Pe, h(E.value ? "▾" : "▸"), 1)], 8, Ne)) : o("", !0),
|
|
423
|
+
c("div", Fe, [S("contextbar") ? ge((d(), s("aside", {
|
|
424
|
+
key: 0,
|
|
425
|
+
ref: x("contextbar"),
|
|
426
|
+
class: u(["nb-shell__contextbar", C("contextbar")]),
|
|
427
|
+
"aria-label": e.contextbarLabel,
|
|
428
|
+
onClickCapture: ct
|
|
429
|
+
}, [m(t.$slots, "contextbar", {}, void 0, !0)], 42, Ie)), [[me, !P.value || E.value]]) : o("", !0), c("main", oe({
|
|
430
|
+
id: gt.value,
|
|
431
|
+
ref_key: "mainRef",
|
|
432
|
+
ref: J,
|
|
433
|
+
tabindex: "-1",
|
|
434
|
+
class: ["nb-shell__main", { "nb-shell__main--no-padding": !e.mainPadding }]
|
|
435
|
+
}, de(bt)), [re(ve, { level: 1 }, {
|
|
436
|
+
default: he(() => [m(t.$slots, "default", {}, void 0, !0)]),
|
|
437
|
+
_: 3
|
|
438
|
+
})], 16, Le)]),
|
|
439
|
+
S("bottom") ? (d(), s("div", {
|
|
440
|
+
key: 2,
|
|
441
|
+
ref: x("bottom"),
|
|
442
|
+
class: "nb-shell__bottom"
|
|
443
|
+
}, [m(t.$slots, "bottom", {}, void 0, !0)], 512)) : o("", !0)
|
|
444
|
+
], 8, Me), c("aside", {
|
|
445
|
+
ref_key: "inspectorRef",
|
|
446
|
+
ref: Y,
|
|
447
|
+
class: u(["nb-shell__inspector", {
|
|
448
|
+
"nb-shell__inspector--visible": G.value,
|
|
449
|
+
"nb-shell__inspector--expanded": G.value && e.inspectorExpanded,
|
|
450
|
+
[`nb-shell__inspector--${e.inspectorSize}`]: G.value,
|
|
451
|
+
"nb-shell__inspector--resizing": St.value,
|
|
452
|
+
"nb-shell__inspector--overlay": K.value
|
|
453
|
+
}]),
|
|
454
|
+
"aria-label": e.inspectorLabel,
|
|
455
|
+
inert: !G.value || void 0,
|
|
456
|
+
"aria-hidden": !G.value || void 0,
|
|
457
|
+
style: se(At.value)
|
|
458
|
+
}, [
|
|
459
|
+
K.value ? (d(), s("button", {
|
|
460
|
+
key: 0,
|
|
461
|
+
ref_key: "inspectorDismissRef",
|
|
462
|
+
ref: dt,
|
|
463
|
+
type: "button",
|
|
464
|
+
class: "nb-shell__inspector-dismiss",
|
|
465
|
+
"aria-label": e.inspectorCloseLabel,
|
|
466
|
+
onClick: n[3] ||= (e) => q(!1)
|
|
467
|
+
}, [...n[6] ||= [c("span", {
|
|
468
|
+
class: "nb-shell__inspector-dismiss-glyph",
|
|
469
|
+
"aria-hidden": "true"
|
|
470
|
+
}, "×", -1)]], 8, ze)) : o("", !0),
|
|
471
|
+
e.resizable && G.value && !P.value ? (d(), s("div", {
|
|
472
|
+
key: 1,
|
|
473
|
+
class: "nb-shell__inspector-resize",
|
|
474
|
+
role: "separator",
|
|
475
|
+
tabindex: "0",
|
|
476
|
+
"aria-orientation": "vertical",
|
|
477
|
+
"aria-label": `Resize ${e.inspectorLabel}`,
|
|
478
|
+
"aria-valuenow": Mt.value,
|
|
479
|
+
"aria-valuemin": _,
|
|
480
|
+
"aria-valuemax": jt.value,
|
|
481
|
+
title: "Drag or use the arrow keys to resize, Enter or double-click to reset",
|
|
482
|
+
onPointerdown: Ft,
|
|
483
|
+
onDblclick: It,
|
|
484
|
+
onKeydown: Lt
|
|
485
|
+
}, null, 40, Be)) : o("", !0),
|
|
486
|
+
m(t.$slots, "inspector", {
|
|
487
|
+
overlay: K.value,
|
|
488
|
+
close: pt
|
|
489
|
+
}, void 0, !0)
|
|
490
|
+
], 14, Re)])
|
|
491
|
+
])
|
|
492
|
+
])
|
|
493
|
+
], 16));
|
|
494
|
+
}
|
|
495
|
+
}), [["__scopeId", "data-v-08e52f50"]]);
|
|
496
|
+
//#endregion
|
|
497
|
+
export { v as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),t=require(`./composables/useSurfaceLayer.composable.cjs`),n=require(`./utils/slotContent.helper.cjs`),r=require(`./composables/useShellSlot.composable.cjs`),i=require(`./composables/useShellLayout.composable.cjs`);let a=require(`vue`);var ee=(0,a.defineComponent)({__name:`SurfaceLayerScope`,props:{level:{}},setup(e){let n=e;return(0,a.provide)(t.NB_LAYER_INJECTION_KEY,(0,a.computed)(()=>t.clampLayer(n.level))),(e,t)=>(0,a.renderSlot)(e.$slots,`default`)}}),te=[`href`],ne={class:`nb-shell__middle`},re=[`id`,`aria-label`,`tabindex`,`inert`,`aria-hidden`],ie={class:`nb-shell__sidebar-logo`},ae={class:`nb-shell__sidebar-header-action`},oe={key:1,class:`nb-shell__sidebar-logo`},se={class:`nb-shell__sidebar-nav`},ce={class:`nb-shell__sidebar-bottom`},le={class:`nb-shell__right`},ue={key:2,class:`nb-shell__menubar`},de={key:3,class:`nb-shell__topbar`},fe=[`aria-label`,`aria-expanded`,`aria-controls`],pe={class:`nb-shell__content-row`},me=[`inert`,`aria-hidden`],he=[`aria-expanded`],ge={class:`nb-shell__contextbar-toggle-glyph`,"aria-hidden":`true`},_e={class:`nb-shell__main-row`},ve=[`aria-label`],ye=[`id`],be=[`aria-label`,`inert`,`aria-hidden`],xe=[`aria-label`],Se=[`aria-label`,`aria-valuenow`,`aria-valuemax`],Ce=`(pointer: coarse) and (hover: none) and (max-height: 500px)`,we=`a[href], [role="menuitem"]`,o=288,Te=16,Ee=64,s=(0,a.defineComponent)({__name:`Shell`,props:{inspectorVisible:{type:Boolean,default:!1},inspectorExpanded:{type:Boolean,default:!1},inspectorSize:{default:`md`},resizable:{type:Boolean,default:!1},inspectorWidth:{},mainPadding:{type:Boolean,default:!0},sidebarVariant:{default:`compact`},sidebarHeaderActionPosition:{default:`end`},sidebarHeaderActionCompact:{default:`stack`},topbar:{default:`auto`},skipToContent:{type:Boolean,default:!0},skipToContentLabel:{default:`Skip to content`},mainId:{},sidebarLabel:{default:`Primary`},inspectorLabel:{default:`Inspector`},contextbarLabel:{default:`Browse`},collapseAt:{default:`md`},sidebarOpen:{type:Boolean},navToggleLabel:{default:`Navigation`},inspectorCloseLabel:{default:`Close inspector`}},emits:[`update:inspectorWidth`,`update:sidebarOpen`,`update:inspectorVisible`],setup(e,{expose:s,emit:De}){let Oe=(0,a.useSlots)();function c(e){return n.hasSlotContent(Oe,e)}let{registry:ke,count:l,sharedCount:Ae,setElement:u}=r.createShellSlotRegistry();(0,a.provide)(r.NB_SHELL_SLOT_KEY,ke);let je=new Map;function d(e){let t=je.get(e);return t||(t=t=>u(e,t??null),je.set(e,t)),t}function f(e){return c(e)||l(e)>0}function p(e){return Ae(e)>0?`nb-shell__region--ordered`:null}let m=(0,a.computed)(()=>{for(let e of[`sidebar-logo`,`sidebar-nav`,`sidebar-bottom`])if(c(e))return!0;return!1}),h=e,g=(0,a.ref)(!1),_=De,Me={md:672,lg:1056},v=(0,a.ref)(typeof window<`u`?window.innerWidth:1/0);function y(e){let t=Me[h.collapseAt];return t!=null&&e<t}let b=0;function Ne(){let e=window.innerWidth;y(e)!==y(v.value)&&(v.value=e)}function Pe(){b||=window.requestAnimationFrame(()=>{b=0,v.value=window.innerWidth})}function x(){typeof window>`u`||(window.removeEventListener(`resize`,Pe),b&&=(window.cancelAnimationFrame(b),0))}function Fe(){typeof window>`u`||(v.value=window.innerWidth,window.addEventListener(`resize`,Pe,{passive:!0}))}let S=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(Ce):null,C=(0,a.ref)(S?.matches===!0);function w(e){C.value=e.matches}let T=(0,a.computed)(()=>y(v.value)||h.collapseAt!==`none`&&C.value),E=(0,a.getCurrentInstance)()?.vnode.props??{};function D(e,t){return e in E||t in E}function Ie(e,t){if(e in E)return E[e];if(t in E)return E[t]}function O(e,t){return D(e,t)&&Ie(e,t)!==void 0}let k=O(`sidebarOpen`,`sidebar-open`),A=(0,a.ref)(!1);D(`sidebarOpen`,`sidebar-open`)&&!k&&(0,a.watch)(()=>h.sidebarOpen,e=>{A.value=e===!0});let j=(0,a.computed)(()=>k?h.sidebarOpen===!0:A.value),Le=(0,a.useId)(),Re=(0,a.computed)(()=>`nb-shell-sidebar-${Le}`),M=(0,a.ref)(null),N=(0,a.ref)(null),P=(0,a.computed)(()=>m.value&&T.value),F=(0,a.computed)(()=>m.value&&T.value&&!j.value);function I(e){k||(A.value=e),_(`update:sidebarOpen`,e)}function ze(e){if(!e.defaultPrevented){if(m.value&&T.value&&j.value){I(!1);return}H.value&&U(!1)}}function L(e,t){let n=e.target,r=n?.closest?.(we);if(!r||!t?.contains(r))return!1;let i=r.getAttribute(`aria-haspopup`);return!(i!=null&&i!==`false`||r.hasAttribute(`aria-expanded`)||r.getAttribute(`aria-disabled`)===`true`||n?.closest?.(`[data-nb-keep-open]`))}function Be(e){!T.value||!j.value||L(e,N.value)&&I(!1)}function Ve(e){!T.value||!g.value||L(e,e.currentTarget)&&(g.value=!1)}function He(e){g.value=e}(0,a.watch)(j,async e=>{T.value&&(await(0,a.nextTick)(),e?(N.value?.querySelector(`a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])`)??N.value)?.focus?.():M.value?.focus?.())}),(0,a.watch)(T,e=>{!e&&j.value&&I(!1)});let R=O(`inspectorVisible`,`inspector-visible`),z=(0,a.ref)(h.inspectorVisible===!0);D(`inspectorVisible`,`inspector-visible`)&&!R&&(0,a.watch)(()=>h.inspectorVisible,e=>{z.value=e===!0});let B=(0,a.ref)(!1),V=(0,a.computed)(()=>(R?h.inspectorVisible===!0:z.value)?!(T.value&&B.value):!1),H=(0,a.computed)(()=>T.value&&V.value);function U(e){R?B.value=!e:(z.value=e,B.value=!1),_(`update:inspectorVisible`,e)}(0,a.watch)(()=>h.inspectorVisible,e=>{e&&(B.value=!1)}),(0,a.watch)(T,e=>{e||(B.value=!1)});let Ue=(0,a.ref)(null),W=(0,a.ref)(null);(0,a.watch)(H,async e=>{if(e)W.value=document.activeElement??null,await(0,a.nextTick)(),Ue.value?.focus?.();else{let e=W.value;W.value=null,e?.isConnected&&(await(0,a.nextTick)(),e.focus?.())}}),(0,a.watch)(H,e=>{e&&m.value&&j.value&&I(!1)});function We(){U(!1)}(0,a.provide)(i.NB_SHELL_LAYOUT_KEY,{collapsed:T,inspectorOverlay:H});let Ge=(0,a.computed)(()=>H.value),G=(0,a.ref)(null),Ke=(0,a.useId)(),qe=(0,a.computed)(()=>h.mainId||`nb-shell-main-${Ke}`);function Je(){G.value?.focus()}let Ye=(0,a.computed)(()=>P.value||h.topbar===`always`?!0:h.topbar===`never`?!1:c(`topbar-left`)||c(`topbar-right`)||l(`topbar-left`)>0||l(`topbar-right`)>0),{layerProps:Xe}=t.useSurfaceLayer(),{layerProps:Ze}=t.useSurfaceLayer({level:0,probe:!1,provideContext:!1});(0,a.provide)(`nb-shell-sidebar-variant`,(0,a.toRef)(h,`sidebarVariant`));let Qe=(0,a.computed)(()=>c(`sidebar-header-action`)&&!T.value);(0,a.provide)(`nb-shell-sidebar-header-action-position`,(0,a.toRef)(h,`sidebarHeaderActionPosition`));let K=(0,a.ref)(null),q=(0,a.ref)(!1);(0,a.onMounted)(()=>u(`inspector`,K.value)),(0,a.watch)(K,e=>u(`inspector`,e));let $e={lg:.5,xl:.75},et={xs:288,sm:360,md:560},J=(0,a.computed)(()=>Number.isFinite(v.value)?v.value:1280),Y=(0,a.computed)(()=>Math.max(o,J.value*.5));function X(e){return Math.round(Math.max(o,Math.min(e,Y.value)))}let tt=O(`inspectorWidth`,`inspector-width`),nt=(0,a.ref)(null),rt=(0,a.computed)(()=>tt?h.inspectorWidth??null:nt.value);function Z(e){tt||(nt.value=e),_(`update:inspectorWidth`,e)}let it=(0,a.computed)(()=>{let e=rt.value;if(!(!h.resizable||!V.value||e==null))return{"--nb-shell-inspector-width":`${X(e)}px`}}),Q=(0,a.computed)(()=>{let e=rt.value;if(e!=null)return X(e);if(h.inspectorExpanded)return Math.round(J.value*.5);let t=$e[h.inspectorSize],n=t==null?et[h.inspectorSize]??o:J.value*t;return Math.round(h.inspectorSize===`xl`?n:Math.min(n,Y.value))}),at=(0,a.computed)(()=>Math.round(Math.max(Y.value,Q.value))),ot=(0,a.computed)(()=>Q.value);function st(){return Q.value}function ct(e){let t=K.value;if(!t)return;let n=t.getBoundingClientRect().right;Z(X(n-e.clientX))}function $(){q.value=!1,window.removeEventListener(`pointermove`,ct),window.removeEventListener(`pointerup`,$),window.removeEventListener(`pointercancel`,$)}function lt(e){h.resizable&&(e.preventDefault(),q.value=!0,window.addEventListener(`pointermove`,ct),window.addEventListener(`pointerup`,$),window.addEventListener(`pointercancel`,$))}function ut(){Z(null)}function dt(e){if(!h.resizable)return;let t=e.shiftKey?Ee:Te,n;switch(e.key){case`ArrowLeft`:n=st()+t;break;case`ArrowRight`:n=st()-t;break;case`Home`:n=o;break;case`End`:n=Y.value;break;case`Enter`:case` `:n=null;break;default:return}e.preventDefault(),Z(n==null?null:X(n))}return(0,a.onMounted)(()=>{typeof window>`u`||(v.value=window.innerWidth,window.addEventListener(`resize`,Ne,{passive:!0}),h.resizable&&Fe(),S&&(C.value=S.matches,typeof S.addEventListener==`function`?S.addEventListener(`change`,w):S.addListener?.(w)))}),(0,a.watch)(()=>h.collapseAt,()=>{typeof window<`u`&&(v.value=window.innerWidth)}),(0,a.watch)(()=>h.resizable,e=>e?Fe():x()),(0,a.onBeforeUnmount)(()=>{$(),x(),typeof window<`u`&&window.removeEventListener(`resize`,Ne),S&&(typeof S.removeEventListener==`function`?S.removeEventListener(`change`,w):S.removeListener?.(w))}),s({mainEl:G,sidebarEl:N,inspectorEl:K,focusMain:()=>G.value?.focus(),setSidebarOpen:I,setInspectorVisible:U,collapsed:T,inspectorOverlay:H,setContextbarOpen:He}),(t,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,(0,a.mergeProps)({class:`nb-shell`},(0,a.unref)(Xe),{class:[{"nb-shell--no-sidebar":!m.value},m.value?`nb-shell--sidebar-${e.sidebarVariant}`:null,{"nb-shell--collapsed":T.value,"nb-shell--drawer-open":T.value&&j.value}],onKeydown:(0,a.withKeys)(ze,[`esc`])}),[e.skipToContent?((0,a.openBlock)(),(0,a.createElementBlock)(`a`,{key:0,class:`nb-shell__skip-link`,href:`#${qe.value}`,onClick:Je},(0,a.toDisplayString)(e.skipToContentLabel),9,te)):(0,a.createCommentVNode)(``,!0),f(`outer-menu`)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,ref:d(`outer-menu`),class:(0,a.normalizeClass)([`nb-shell__outer-menu`,p(`outer-menu`)])},[(0,a.renderSlot)(t.$slots,`outer-menu`,{},void 0,!0)],2)):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`div`,ne,[m.value?((0,a.openBlock)(),(0,a.createElementBlock)(`nav`,{key:0,id:Re.value,ref_key:`sidebarRef`,ref:N,class:`nb-shell__sidebar`,"aria-label":e.sidebarLabel,tabindex:T.value?-1:void 0,inert:F.value||void 0,"aria-hidden":F.value||void 0,onClickCapture:Be},[Qe.value?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,class:(0,a.normalizeClass)([`nb-shell__sidebar-header`,[`nb-shell__sidebar-header--${e.sidebarHeaderActionPosition}`,`nb-shell__sidebar-header--compact-${e.sidebarHeaderActionCompact}`]])},[(0,a.createElementVNode)(`div`,ie,[(0,a.renderSlot)(t.$slots,`sidebar-logo`,{},void 0,!0)]),(0,a.createElementVNode)(`div`,ae,[(0,a.renderSlot)(t.$slots,`sidebar-header-action`,{},void 0,!0)])],2)):((0,a.openBlock)(),(0,a.createElementBlock)(`div`,oe,[(0,a.renderSlot)(t.$slots,`sidebar-logo`,{},void 0,!0)])),(0,a.createElementVNode)(`div`,se,[(0,a.renderSlot)(t.$slots,`sidebar-nav`,{},void 0,!0)]),n[4]||=(0,a.createElementVNode)(`div`,{class:`nb-shell__sidebar-spacer`},null,-1),(0,a.createElementVNode)(`div`,ce,[(0,a.renderSlot)(t.$slots,`sidebar-bottom`,{},void 0,!0)])],40,re)):(0,a.createCommentVNode)(``,!0),m.value&&T.value&&j.value?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:`nb-shell__scrim`,onClick:n[0]||=e=>I(!1)})):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`div`,le,[f(`inner-menu`)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,ref:d(`inner-menu`),class:(0,a.normalizeClass)([`nb-shell__inner-menu`,p(`inner-menu`)])},[(0,a.renderSlot)(t.$slots,`inner-menu`,{},void 0,!0)],2)):(0,a.createCommentVNode)(``,!0),f(`notification`)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,ref:d(`notification`),class:(0,a.normalizeClass)([`nb-shell__notification`,p(`notification`)])},[(0,a.renderSlot)(t.$slots,`notification`,{},void 0,!0)],2)):(0,a.createCommentVNode)(``,!0),c(`menubar`)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,ue,[(0,a.renderSlot)(t.$slots,`menubar`,{},void 0,!0)])):(0,a.createCommentVNode)(``,!0),Ye.value?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,de,[P.value?((0,a.openBlock)(),(0,a.createElementBlock)(`button`,{key:0,ref_key:`navToggleRef`,ref:M,type:`button`,class:`nb-shell__nav-toggle`,"aria-label":e.navToggleLabel,"aria-expanded":j.value,"aria-controls":Re.value,onClick:n[1]||=e=>I(!j.value)},[...n[5]||=[(0,a.createElementVNode)(`span`,{class:`nb-shell__nav-toggle-glyph`,"aria-hidden":`true`},[(0,a.createElementVNode)(`span`),(0,a.createElementVNode)(`span`),(0,a.createElementVNode)(`span`)],-1)]],8,fe)):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`div`,{ref:d(`topbar-left`),class:`nb-shell__topbar-left`},[(0,a.renderSlot)(t.$slots,`topbar-left`,{},void 0,!0)],512),(0,a.createElementVNode)(`div`,{ref:d(`topbar-right`),class:`nb-shell__topbar-right`},[(0,a.renderSlot)(t.$slots,`topbar-right`,{},void 0,!0)],512)])):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`div`,pe,[(0,a.createElementVNode)(`div`,{class:`nb-shell__body`,inert:Ge.value||void 0,"aria-hidden":Ge.value||void 0},[f(`fixedbar`)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,ref:d(`fixedbar`),class:`nb-shell__fixedbar`},[(0,a.renderSlot)(t.$slots,`fixedbar`,{},void 0,!0)],512)):(0,a.createCommentVNode)(``,!0),T.value&&f(`contextbar`)?((0,a.openBlock)(),(0,a.createElementBlock)(`button`,{key:1,type:`button`,class:`nb-shell__contextbar-toggle`,"aria-expanded":g.value,onClick:n[2]||=e=>g.value=!g.value},[(0,a.createElementVNode)(`span`,null,(0,a.toDisplayString)(e.contextbarLabel),1),(0,a.createElementVNode)(`span`,ge,(0,a.toDisplayString)(g.value?`▾`:`▸`),1)],8,he)):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`div`,_e,[f(`contextbar`)?(0,a.withDirectives)(((0,a.openBlock)(),(0,a.createElementBlock)(`aside`,{key:0,ref:d(`contextbar`),class:(0,a.normalizeClass)([`nb-shell__contextbar`,p(`contextbar`)]),"aria-label":e.contextbarLabel,onClickCapture:Ve},[(0,a.renderSlot)(t.$slots,`contextbar`,{},void 0,!0)],42,ve)),[[a.vShow,!T.value||g.value]]):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`main`,(0,a.mergeProps)({id:qe.value,ref_key:`mainRef`,ref:G,tabindex:`-1`,class:[`nb-shell__main`,{"nb-shell__main--no-padding":!e.mainPadding}]},(0,a.unref)(Ze)),[(0,a.createVNode)(ee,{level:1},{default:(0,a.withCtx)(()=>[(0,a.renderSlot)(t.$slots,`default`,{},void 0,!0)]),_:3})],16,ye)]),f(`bottom`)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:2,ref:d(`bottom`),class:`nb-shell__bottom`},[(0,a.renderSlot)(t.$slots,`bottom`,{},void 0,!0)],512)):(0,a.createCommentVNode)(``,!0)],8,me),(0,a.createElementVNode)(`aside`,{ref_key:`inspectorRef`,ref:K,class:(0,a.normalizeClass)([`nb-shell__inspector`,{"nb-shell__inspector--visible":V.value,"nb-shell__inspector--expanded":V.value&&e.inspectorExpanded,[`nb-shell__inspector--${e.inspectorSize}`]:V.value,"nb-shell__inspector--resizing":q.value,"nb-shell__inspector--overlay":H.value}]),"aria-label":e.inspectorLabel,inert:!V.value||void 0,"aria-hidden":!V.value||void 0,style:(0,a.normalizeStyle)(it.value)},[H.value?((0,a.openBlock)(),(0,a.createElementBlock)(`button`,{key:0,ref_key:`inspectorDismissRef`,ref:Ue,type:`button`,class:`nb-shell__inspector-dismiss`,"aria-label":e.inspectorCloseLabel,onClick:n[3]||=e=>U(!1)},[...n[6]||=[(0,a.createElementVNode)(`span`,{class:`nb-shell__inspector-dismiss-glyph`,"aria-hidden":`true`},`×`,-1)]],8,xe)):(0,a.createCommentVNode)(``,!0),e.resizable&&V.value&&!T.value?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:`nb-shell__inspector-resize`,role:`separator`,tabindex:`0`,"aria-orientation":`vertical`,"aria-label":`Resize ${e.inspectorLabel}`,"aria-valuenow":ot.value,"aria-valuemin":o,"aria-valuemax":at.value,title:`Drag or use the arrow keys to resize, Enter or double-click to reset`,onPointerdown:lt,onDblclick:ut,onKeydown:dt},null,40,Se)):(0,a.createCommentVNode)(``,!0),(0,a.renderSlot)(t.$slots,`inspector`,{overlay:H.value,close:We},void 0,!0)],14,be)])])])],16))}}),De=e.t(s,[[`__scopeId`,`data-v-08e52f50`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return De}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-D-qHiVGv.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./Icon-C8R_r_In.cjs`),r=require(`./vue-i18n-B_5xehV9.cjs`);let i=require(`vue`),a=require(`@nubisco/ui/icons/caret-right`);a=e.n(a);let o=require(`@nubisco/ui/icons/caret-left`);o=e.n(o);let s=require(`@nubisco/ui/icons/sidebar-simple`);s=e.n(s);var c=[`aria-label`,`aria-expanded`],l=(0,i.defineComponent)({__name:`SidebarHeaderToggle`,props:{collapseLabel:{default:void 0},expandLabel:{default:void 0},icon:{default:void 0}},emits:[`toggle`],setup(e,{emit:t}){let l=e,u=t,d=(0,i.inject)(`nb-shell-sidebar-variant`,(0,i.ref)(`verbose`)),f=(0,i.inject)(`nb-shell-sidebar-header-action-position`,(0,i.ref)(`end`)),p=(0,i.computed)(()=>d.value===`compact`),m=(0,i.computed)(()=>f.value===`edge`),h=(0,i.computed)(()=>l.icon?l.icon:m.value?p.value?a:o:s),g={en:{COLLAPSE:`Collapse sidebar`,EXPAND:`Expand sidebar`},pt:{COLLAPSE:`Recolher barra lateral`,EXPAND:`Expandir barra lateral`}};function _(){try{return r.t({useScope:`global`})}catch{return null}}let v=_();function y(e){let t=`sidebarCollapseToggle.${e}`;return v?.te(t)?v.t(t):g[String(v?.locale.value??`en`).toLowerCase().split(`-`)[0]]?.[e]??g.en[e]}let b=(0,i.computed)(()=>p.value?l.expandLabel??y(`EXPAND`):l.collapseLabel??y(`COLLAPSE`));return(e,t)=>{let r=(0,i.resolveDirective)(`nb-tooltip`);return(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createElementBlock)(`button`,{type:`button`,class:(0,i.normalizeClass)([`nb-sidebar-header-toggle`,{"nb-sidebar-header-toggle--edge":m.value}]),"aria-label":b.value,"aria-expanded":!p.value,onClick:t[0]||=e=>u(`toggle`)},[(0,i.createVNode)(n.t,{name:h.value,size:m.value?14:18},null,8,[`name`,`size`])],10,c)),[[r,{body:b.value,aria:`none`,position:`right`}]])}}}),u=t.t(l,[[`__scopeId`,`data-v-6ef71e7b`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
2
|
+
import { t } from "./Icon-rREAqsu0.js";
|
|
3
|
+
import { t as n } from "./vue-i18n-Dzm-MDw4.js";
|
|
4
|
+
import { computed as r, createElementBlock as i, createVNode as a, defineComponent as o, inject as s, normalizeClass as c, openBlock as l, ref as u, resolveDirective as d, withDirectives as f } from "vue";
|
|
5
|
+
import * as p from "@nubisco/ui/icons/caret-right";
|
|
6
|
+
import * as m from "@nubisco/ui/icons/caret-left";
|
|
7
|
+
import * as h from "@nubisco/ui/icons/sidebar-simple";
|
|
8
|
+
//#region src/components/SidebarHeaderToggle.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var g = ["aria-label", "aria-expanded"], _ = /* @__PURE__ */ e(/* @__PURE__ */ o({
|
|
10
|
+
__name: "SidebarHeaderToggle",
|
|
11
|
+
props: {
|
|
12
|
+
collapseLabel: { default: void 0 },
|
|
13
|
+
expandLabel: { default: void 0 },
|
|
14
|
+
icon: { default: void 0 }
|
|
15
|
+
},
|
|
16
|
+
emits: ["toggle"],
|
|
17
|
+
setup(e, { emit: o }) {
|
|
18
|
+
let _ = e, v = o, y = s("nb-shell-sidebar-variant", u("verbose")), b = s("nb-shell-sidebar-header-action-position", u("end")), x = r(() => y.value === "compact"), S = r(() => b.value === "edge"), C = r(() => _.icon ? _.icon : S.value ? x.value ? p : m : h), w = {
|
|
19
|
+
en: {
|
|
20
|
+
COLLAPSE: "Collapse sidebar",
|
|
21
|
+
EXPAND: "Expand sidebar"
|
|
22
|
+
},
|
|
23
|
+
pt: {
|
|
24
|
+
COLLAPSE: "Recolher barra lateral",
|
|
25
|
+
EXPAND: "Expandir barra lateral"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
function T() {
|
|
29
|
+
try {
|
|
30
|
+
return n({ useScope: "global" });
|
|
31
|
+
} catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
let E = T();
|
|
36
|
+
function D(e) {
|
|
37
|
+
let t = `sidebarCollapseToggle.${e}`;
|
|
38
|
+
return E?.te(t) ? E.t(t) : w[String(E?.locale.value ?? "en").toLowerCase().split("-")[0]]?.[e] ?? w.en[e];
|
|
39
|
+
}
|
|
40
|
+
let O = r(() => x.value ? _.expandLabel ?? D("EXPAND") : _.collapseLabel ?? D("COLLAPSE"));
|
|
41
|
+
return (e, n) => {
|
|
42
|
+
let r = d("nb-tooltip");
|
|
43
|
+
return f((l(), i("button", {
|
|
44
|
+
type: "button",
|
|
45
|
+
class: c(["nb-sidebar-header-toggle", { "nb-sidebar-header-toggle--edge": S.value }]),
|
|
46
|
+
"aria-label": O.value,
|
|
47
|
+
"aria-expanded": !x.value,
|
|
48
|
+
onClick: n[0] ||= (e) => v("toggle")
|
|
49
|
+
}, [a(t, {
|
|
50
|
+
name: C.value,
|
|
51
|
+
size: S.value ? 14 : 18
|
|
52
|
+
}, null, 8, ["name", "size"])], 10, g)), [[r, {
|
|
53
|
+
body: O.value,
|
|
54
|
+
aria: "none",
|
|
55
|
+
position: "right"
|
|
56
|
+
}]]);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}), [["__scopeId", "data-v-6ef71e7b"]]);
|
|
60
|
+
//#endregion
|
|
61
|
+
export { _ as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useReducedMotion as e } from "./composables/useReducedMotion.composable.mjs";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
3
3
|
import { useStableId as n } from "./composables/useStableId.composable.mjs";
|
|
4
|
-
import { t as r } from "./useLoadingAnnouncer.composable-
|
|
4
|
+
import { t as r } from "./useLoadingAnnouncer.composable-kJ9fDUqa.js";
|
|
5
5
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, openBlock as p, ref as m, renderList as h, toDisplayString as g, unref as _, watch as v } from "vue";
|
|
6
6
|
//#region src/components/Skeleton.d.ts
|
|
7
7
|
var y = /* @__PURE__ */ function(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./composables/useReducedMotion.composable.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./composables/useStableId.composable.cjs`),r=require(`./useLoadingAnnouncer.composable-
|
|
1
|
+
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./composables/useReducedMotion.composable.cjs`),t=require(`./_plugin-vue_export-helper-tagjRzOz.cjs`),n=require(`./composables/useStableId.composable.cjs`),r=require(`./useLoadingAnnouncer.composable-BCTl7kry.cjs`);let i=require(`vue`);var a=function(e){return e.Text=`text`,e.Heading=`heading`,e.Block=`block`,e.Circle=`circle`,e}(a||{}),o=[`id`,`role`,`aria-live`,`aria-hidden`],s={key:0,class:`nb-skeleton__label`},c={class:`nb-skeleton__lines`,"aria-busy":`true`},l=(0,i.defineComponent)({__name:`Skeleton`,props:{variant:{default:a.Text},type:{default:void 0},lines:{default:1},lastLineWidth:{default:`60%`},width:{default:void 0},height:{default:void 0},radius:{default:`sm`},animated:{type:Boolean,default:!0},label:{default:void 0},completeLabel:{default:void 0},id:{default:void 0}},setup(t){let l=t,u=n.useStableId(l),d=e.useReducedMotion(),f=(0,i.ref)(``),p;(0,i.watch)(()=>l.label,e=>{if(p&&=(clearTimeout(p),void 0),!e){f.value=``;return}if(f.value!==``){f.value=e;return}p=setTimeout(()=>{p=void 0,f.value=e},0)},{immediate:!0}),(0,i.onBeforeUnmount)(()=>{p&&clearTimeout(p),r.t(l.completeLabel)});let m=[`label-sm`,`label-md`,`label-lg`,`body-sm`,`body-md`,`body-lg`,`code-sm`,`code-md`,`code-lg`,`heading-01`,`heading-02`,`heading-03`,`heading-04`,`heading-05`,`heading-06`],h=(0,i.computed)(()=>l.type&&m.includes(l.type)?l.type:l.variant===a.Heading?`heading-02`:`body-md`),g=(0,i.computed)(()=>l.variant===a.Text||l.variant===a.Heading),_=(0,i.computed)(()=>l.variant===a.Text?Math.max(1,Math.floor(l.lines)):1);function v(e){if(e!=null)return typeof e==`number`?`${e}px`:e}let y=(0,i.computed)(()=>Array.from({length:_.value},(e,t)=>{let n=t===_.value-1;if(l.variant===a.Text&&_.value>1&&n)return{width:l.lastLineWidth}})),b=(0,i.computed)(()=>[`nb-skeleton`,`nb-skeleton--${l.variant}`,`nb-skeleton--radius-${l.radius}`,{"nb-skeleton--static":!l.animated,"nb-skeleton--reduced-motion":d.value}]),x=(0,i.computed)(()=>{let e={};if(g.value&&(e[`--nb-skeleton-font-size`]=`var(--nb-type-${h.value}-size)`,e[`--nb-skeleton-line-height`]=`var(--nb-type-${h.value}-line-height)`),l.variant===a.Circle){let t=v(l.height??l.width);return t&&(e.width=t,e[`--nb-skeleton-height`]=t),e}let t=v(l.width);t&&(e.width=t);let n=v(l.height);return n&&!g.value&&(e[`--nb-skeleton-height`]=n),e});return(e,n)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{id:(0,i.unref)(u),class:(0,i.normalizeClass)(b.value),style:(0,i.normalizeStyle)(x.value),role:t.label?`status`:void 0,"aria-live":t.label?`polite`:void 0,"aria-hidden":t.label?void 0:`true`},[t.label?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,s,(0,i.toDisplayString)(f.value),1)):(0,i.createCommentVNode)(``,!0),(0,i.createElementVNode)(`div`,c,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(y.value,(e,t)=>((0,i.openBlock)(),(0,i.createElementBlock)(`span`,{key:t,class:`nb-skeleton__line`},[(0,i.createElementVNode)(`span`,{class:`nb-skeleton__fill`,style:(0,i.normalizeStyle)(e)},null,4)]))),128))])],14,o))}}),u=t.t(l,[[`__scopeId`,`data-v-a57a3982`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
|
|
@@ -3,7 +3,7 @@ import { r as t } from "./Size.d-Bah6vMl3.js";
|
|
|
3
3
|
import { t as n } from "./Grid-XtnH-vr_.js";
|
|
4
4
|
import { t as r } from "./Label-ciCAG21-.js";
|
|
5
5
|
import { t as i } from "./Message-Cecz48PA.js";
|
|
6
|
-
import { t as a } from "./NumberInput-
|
|
6
|
+
import { t as a } from "./NumberInput-CYKutu9p.js";
|
|
7
7
|
import { Fragment as ee, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, openBlock as _, ref as v, toDisplayString as y, withCtx as b, withModifiers as x } from "vue";
|
|
8
8
|
//#region src/components/Slider.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var S = { class: "nb-slider__field-box" }, C = {
|