vlite3 1.4.40 → 1.5.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/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
- package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
- package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
- package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
- package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
- package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
- package/components/AppShell/useAppShell.d.ts +4 -0
- package/components/AppShell/useAppShell.js +45 -40
- package/components/AsyncSelect/createAsyncSelect.js +10 -10
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
- package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
- package/components/AttachmentsList/types.d.ts +37 -0
- package/components/BackButton.vue.js +2 -2
- package/components/Button.vue.d.ts +1 -0
- package/components/Button.vue.js +5 -241
- package/components/Button.vue2.js +245 -2
- package/components/ButtonGroup.vue.js +2 -2
- package/components/ButtonGroup.vue2.js +4 -1
- package/components/Calendar/Calendar.vue2.js +16 -16
- package/components/Cart/CartCouponInput.vue.js +24 -24
- package/components/Cart/CartEmptyState.vue.js +4 -4
- package/components/Cart/CartLineItem.vue.js +33 -33
- package/components/Cart/CartVariant1.vue.js +3 -3
- package/components/Cart/CartVariant2.vue.js +5 -5
- package/components/Cart/CartVariant3.vue.js +25 -25
- package/components/Cart/CartVariant4.vue.js +9 -9
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.js +18 -18
- package/components/CategoryManager/CategoryNode.vue.js +4 -4
- package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
- package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
- package/components/Chat/ChatInterface.vue.js +23 -23
- package/components/Clipboard.vue.d.ts +7 -1
- package/components/Clipboard.vue.js +19 -17
- package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +8 -8
- package/components/Comment/CommentEditor.vue.js +14 -14
- package/components/Comment/CommentItem.vue2.js +6 -6
- package/components/Comment/CommentThread.vue.js +4 -4
- package/components/DataList/DataList.vue.js +7 -7
- package/components/DataTable/DataTable.vue.d.ts +9 -1
- package/components/DataTable/DataTable.vue.js +374 -263
- package/components/DataTable/DataTableRow.vue.d.ts +23 -2
- package/components/DataTable/DataTableRow.vue.js +5 -198
- package/components/DataTable/DataTableRow.vue2.js +360 -2
- package/components/DataTable/dataTableHeaders.d.ts +18 -0
- package/components/DataTable/dataTableHeaders.js +9 -0
- package/components/DataTable/types.d.ts +6 -0
- package/components/DatePicker.vue.js +8 -9
- package/components/DateRangePicker.vue2.js +34 -34
- package/components/Dropdown/Dropdown.vue.d.ts +7 -2
- package/components/Dropdown/Dropdown.vue.js +146 -139
- package/components/Dropdown/DropdownTrigger.vue.js +6 -6
- package/components/ExportData/ExportData.vue.js +15 -15
- package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
- package/components/FilePicker/FilePickerInput.vue.js +3 -2
- package/components/FilePicker/FilePreview.vue.js +3 -3
- package/components/FileTree/FileTree.vue.js +4 -4
- package/components/FileTree/FileTree.vue2.js +9 -9
- package/components/FileTree/FileTreeNode.vue.js +76 -72
- package/components/Footer/Variant1.vue.js +48 -48
- package/components/Footer/Variant2.vue.js +42 -42
- package/components/Form/AccordionView.vue.d.ts +1 -1
- package/components/Form/AccordionView.vue.js +2 -2
- package/components/Form/AccordionView.vue3.js +61 -57
- package/components/Form/Form.vue2.js +41 -41
- package/components/Form/TableRow.vue.d.ts +7 -0
- package/components/Form/TableRow.vue.js +187 -41
- package/components/Form/TableView.vue.d.ts +11 -1
- package/components/Form/TableView.vue.js +71 -49
- package/components/Form/composables/useForm.js +146 -142
- package/components/Form/index.vue.d.ts +5 -1
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index.vue2.js +44 -37
- package/components/Form/rowHelpers.d.ts +20 -0
- package/components/Form/rowHelpers.js +76 -28
- package/components/Form/types.d.ts +11 -0
- package/components/GoogleLogin.vue.js +4 -4
- package/components/IconPicker.vue.js +9 -9
- package/components/ImportData/ImportData.vue.js +11 -11
- package/components/ImportData/ImportStep1.vue.js +10 -10
- package/components/ImportData/ImportStep2.vue.js +15 -14
- package/components/Input.vue.js +133 -129
- package/components/Kanban/KanbanBoard.vue.js +1 -1
- package/components/Kanban/KanbanBoard.vue2.js +9 -9
- package/components/MultiSelect/MultiSelect.vue.js +3 -2
- package/components/Navbar/Navbar.vue.js +17 -17
- package/components/Navbar/NavbarGroup.vue.js +8 -7
- package/components/Navbar/NavbarItem.vue.js +40 -39
- package/components/Navbar/NavbarTabs.vue.js +6 -184
- package/components/Navbar/NavbarTabs.vue2.js +204 -0
- package/components/Navbar/useNavbar.js +3 -3
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +81 -77
- package/components/OTPInput/OTPInput.vue.js +24 -23
- package/components/Pagination/Pagination.vue.d.ts +1 -1
- package/components/Pagination/Pagination.vue.js +5 -274
- package/components/Pagination/Pagination.vue2.js +283 -2
- package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
- package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
- package/components/Screen/Screen.vue.d.ts +1 -1
- package/components/Screen/Screen.vue.js +21 -21
- package/components/Screen/ScreenFilter.vue.js +5 -5
- package/components/Screen/components/ScreenAddAction.vue.js +3 -3
- package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
- package/components/Screen/components/ScreenExportModal.vue.js +12 -12
- package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
- package/components/Screen/components/ScreenToolbar.vue.js +15 -15
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +6 -6
- package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
- package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
- package/components/Slider.vue.js +123 -108
- package/components/Tabes/Tabes.vue.d.ts +25 -4
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +274 -211
- package/components/Tabes/tabes.utils.d.ts +30 -0
- package/components/Tabes/tabes.utils.js +49 -18
- package/components/Tabes/types.d.ts +7 -0
- package/components/Textarea.vue.d.ts +2 -0
- package/components/Textarea.vue.js +19 -16
- package/components/ThemeToggle.vue.js +8 -8
- package/components/ToastNotification.vue2.js +10 -10
- package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
- package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
- package/components/TreeConnectors/geometry.js +77 -69
- package/components/Workbook/WorkbookAddButton.vue.js +2 -2
- package/composables/useRtl.d.ts +14 -0
- package/composables/useRtl.js +33 -0
- package/index.js +470 -471
- package/package.json +5 -4
- package/style.css +86 -1
- package/types/button.d.ts +8 -0
- package/components/Navbar/NavbarTabs.vue3.js +0 -5
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as de, inject as me, computed as r, ref as fe, onMounted as ve, nextTick as pe, resolveComponent as he, openBlock as s, createElementBlock as p, normalizeClass as d, unref as a, createBlock as y, withCtx as g, createElementVNode as b, normalizeStyle as T, createCommentVNode as v, toDisplayString as w, createVNode as C, resolveDynamicComponent as G, mergeProps as J, createTextVNode as be, Fragment as Q, withKeys as ye, withModifiers as ge, Transition as xe, renderList as we } from "vue";
|
|
2
|
+
import { useRouter as ke, useRoute as Ce } from "vue-router";
|
|
3
3
|
import k from "../Icon.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { $t as
|
|
4
|
+
import U from "../Tooltip.vue.js";
|
|
5
|
+
import Ie from "../Dropdown/Dropdown.vue.js";
|
|
6
|
+
import { $t as X } from "../../utils/i18n.js";
|
|
7
|
+
import { useRtl as Se } from "../../composables/useRtl.js";
|
|
7
8
|
/* empty css */
|
|
8
9
|
/* empty css */
|
|
9
10
|
/* empty css */
|
|
10
|
-
|
|
11
|
+
/* empty css */
|
|
12
|
+
const ze = {
|
|
11
13
|
key: 0,
|
|
12
14
|
class: "px-3 py-1.5 text-sm flex items-center gap-2 font-medium border-b bg-muted-light rounded-t-md text-center truncate"
|
|
13
|
-
},
|
|
15
|
+
}, $e = { class: "w-full" }, Te = { class: "flex items-center w-full gap-2 text-sm" }, Me = { class: "truncate flex-1 font-medium" }, Ne = ["onKeydown"], Ee = {
|
|
14
16
|
key: 0,
|
|
15
17
|
class: "sidebar-children-container overflow-hidden transition-all duration-300 ease-in-out relative"
|
|
16
|
-
},
|
|
18
|
+
}, Pe = { class: "pt-1 space-y-0.5" }, We = /* @__PURE__ */ de({
|
|
17
19
|
__name: "SidebarMenuItem",
|
|
18
20
|
props: {
|
|
19
21
|
item: {},
|
|
@@ -22,111 +24,113 @@ const we = {
|
|
|
22
24
|
itemClass: {}
|
|
23
25
|
},
|
|
24
26
|
setup(u) {
|
|
25
|
-
const n = u, e =
|
|
27
|
+
const n = u, e = me("sidebar-menu-ctx"), Y = ke(), Z = Ce(), M = Se();
|
|
26
28
|
if (!e)
|
|
27
29
|
throw new Error("SidebarMenuItem must be used within a SidebarMenu");
|
|
28
|
-
const
|
|
30
|
+
const j = r(
|
|
31
|
+
() => M.value ? "lucide:chevron-left" : "lucide:chevron-right"
|
|
32
|
+
), ee = r(() => M.value ? "left-start" : "right-start"), L = r(() => M.value ? "left" : "right"), N = fe(null), i = r(
|
|
29
33
|
() => e.currentOrientation === "horizontal" && n.depth === 0
|
|
30
|
-
), f = r(() => !!n.item.children?.length),
|
|
34
|
+
), f = r(() => !!n.item.children?.length), _ = r(() => i.value && f.value || e.compact && f.value ? "popover" : n.item.renderMode || e.renderMode || "tree"), I = r(() => e.renderNestedTabs && n.depth === 0 ? !1 : _.value === "drilldown" && f.value), z = r(() => e.renderNestedTabs && n.depth === 0 || I.value ? !1 : _.value === "popover" && f.value), x = r(() => n.item.id ? n.item.id : n.item.to && typeof n.item.to == "string" ? n.item.to : n.item.label), E = r(() => z.value || I.value || e.renderNestedTabs && n.depth === 0 ? !1 : e.expandedItems.includes(x.value)), A = r(() => !(!f.value || I.value || e.renderNestedTabs && n.depth === 0)), te = r(() => I.value && f.value), D = (t, o, c) => {
|
|
31
35
|
const l = t.id || (typeof t.to == "string" ? t.to : null) || t.label;
|
|
32
|
-
if (
|
|
36
|
+
if (o && l === o) return !0;
|
|
33
37
|
if (t.to) {
|
|
34
38
|
const m = typeof t.to == "string" ? t.to : t.to.path;
|
|
35
39
|
if (m) {
|
|
36
|
-
if (
|
|
37
|
-
if (m !== "/" && m.length > 1 &&
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
40
|
+
if (c === m) return !0;
|
|
41
|
+
if (m !== "/" && m.length > 1 && c.startsWith(m)) {
|
|
42
|
+
const P = c[m.length];
|
|
43
|
+
if (!P || P === "/" || P === "?") return !0;
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
|
-
return t.children?.length ? t.children.some((m) =>
|
|
47
|
+
return t.children?.length ? t.children.some((m) => D(m, o, c)) : !1;
|
|
44
48
|
}, $ = r(() => {
|
|
45
|
-
const t =
|
|
46
|
-
return f.value ?
|
|
47
|
-
}),
|
|
48
|
-
|
|
49
|
+
const t = Z?.path || "", o = e.activeItem;
|
|
50
|
+
return f.value ? D(n.item, o, t) : o === x.value;
|
|
51
|
+
}), K = r(() => e.activeItem === x.value), ne = (t = !0) => {
|
|
52
|
+
K.value && N.value && N.value.scrollIntoView({ behavior: t ? "smooth" : "auto", block: "center" });
|
|
49
53
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
ve(() => {
|
|
55
|
+
K.value && pe(() => {
|
|
56
|
+
ne(!1);
|
|
53
57
|
});
|
|
54
58
|
});
|
|
55
|
-
const
|
|
59
|
+
const R = (t) => {
|
|
56
60
|
if (n.item.disabled) return;
|
|
57
|
-
const
|
|
61
|
+
const o = t.metaKey || t.ctrlKey || t.shiftKey || t.altKey;
|
|
58
62
|
if (I.value) {
|
|
59
|
-
if (
|
|
63
|
+
if (o) return;
|
|
60
64
|
n.item.action && n.item.action(n.item), e.drillInto(n.item);
|
|
61
65
|
return;
|
|
62
66
|
}
|
|
63
67
|
if (e.renderNestedTabs && n.depth === 0) {
|
|
64
|
-
if (
|
|
68
|
+
if (o) return;
|
|
65
69
|
n.item.action && n.item.action(n.item), e.setActive(x.value);
|
|
66
70
|
return;
|
|
67
71
|
}
|
|
68
72
|
if (f.value && !n.item.to && !n.item.href && !z.value) {
|
|
69
|
-
if (
|
|
73
|
+
if (o) return;
|
|
70
74
|
e.toggleExpand(x.value);
|
|
71
75
|
}
|
|
72
|
-
|
|
73
|
-
},
|
|
76
|
+
o || (n.item.action && n.item.action(n.item), (!f.value || n.item.to) && e.setActive(x.value));
|
|
77
|
+
}, H = (t) => {
|
|
74
78
|
t.stopPropagation(), z.value || e.toggleExpand(x.value);
|
|
75
|
-
},
|
|
76
|
-
const
|
|
77
|
-
return `${n.depth *
|
|
78
|
-
}),
|
|
79
|
+
}, B = r(() => e.indentSize || 12), oe = r(() => {
|
|
80
|
+
const o = 8 + parseInt(e.iconSize || "16", 10) / 2;
|
|
81
|
+
return `${n.depth * B.value + o}px`;
|
|
82
|
+
}), V = r(() => {
|
|
79
83
|
if (i.value) return {};
|
|
80
84
|
if (e.compact)
|
|
81
85
|
return { width: "100%" };
|
|
82
86
|
if (n.depth > 0) {
|
|
83
|
-
const
|
|
87
|
+
const o = 8 + parseInt(e.iconSize || "16", 10) / 2, c = (n.depth - 1) * B.value + o + 8;
|
|
84
88
|
return {
|
|
85
|
-
|
|
86
|
-
width: `calc(100% - ${
|
|
89
|
+
marginInlineStart: `${c}px`,
|
|
90
|
+
width: `calc(100% - ${c}px)`
|
|
87
91
|
};
|
|
88
92
|
}
|
|
89
93
|
return {};
|
|
90
|
-
}),
|
|
91
|
-
const
|
|
92
|
-
let
|
|
93
|
-
!e.compact && n.depth > 0 && (
|
|
94
|
-
const l = e.compact ? `justify-center ${
|
|
94
|
+
}), O = r(() => {
|
|
95
|
+
const o = `group flex items-center justify-between font-medium rounded-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/50 relative border border-transparent select-none cursor-pointer ${i.value ? "w-auto" : "w-full"} ${n?.itemClass || ""} ${e.labelClass}`;
|
|
96
|
+
let c = e.compact ? e.compactItemPadding : e.itemPadding;
|
|
97
|
+
!e.compact && n.depth > 0 && (c = c.replace(/py-[\d\.]+/, "py-1.5"));
|
|
98
|
+
const l = e.compact ? `justify-center ${c}` : `justify-between ${c}`;
|
|
95
99
|
let m = "";
|
|
96
|
-
return $.value ? m = "bg-primary-light text-primary-fg-light" : m = "text-muted hover:bg-accent/80 hover:text-foreground", n.item.disabled && (m = "opacity-50 cursor-not-allowed pointer-events-none"), `${
|
|
100
|
+
return $.value ? m = "bg-primary-light text-primary-fg-light" : m = "text-muted hover:bg-accent/80 hover:text-foreground", n.item.disabled && (m = "opacity-50 cursor-not-allowed pointer-events-none"), `${o} ${l} ${m} ${n.item.class || ""}`;
|
|
97
101
|
}), h = r(() => e.compact && e.showCompactLabels), S = r(
|
|
98
|
-
() => n.item.labelI18n ?
|
|
99
|
-
),
|
|
100
|
-
label: t.labelI18n ?
|
|
102
|
+
() => n.item.labelI18n ? X(n.item.labelI18n) : n.item.label
|
|
103
|
+
), W = (t) => ({
|
|
104
|
+
label: t.labelI18n ? X(t.labelI18n) : t.label,
|
|
101
105
|
value: t.id || t.label,
|
|
102
106
|
icon: t.icon,
|
|
103
107
|
disabled: t.disabled,
|
|
104
|
-
children: t.children ? t.children.map(
|
|
108
|
+
children: t.children ? t.children.map(W) : void 0,
|
|
105
109
|
data: t
|
|
106
|
-
}),
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
}) :
|
|
110
|
+
}), ae = r(() => n.item.children ? n.item.children.map(W) : []), ie = (t) => {
|
|
111
|
+
const o = t.data;
|
|
112
|
+
if (o) {
|
|
113
|
+
o.action && o.action(o);
|
|
114
|
+
const c = o.id || o.label || (typeof o.to == "string" ? o.to : "");
|
|
115
|
+
c && e.setActive(c), o.to ? Y.push(o.to).catch(() => {
|
|
116
|
+
}) : o.href && window.open(o.href, "_blank");
|
|
113
117
|
}
|
|
114
|
-
}, ne = (t) => {
|
|
115
|
-
const a = t;
|
|
116
|
-
a.style.height = "0", a.style.opacity = "0";
|
|
117
|
-
}, ae = (t) => {
|
|
118
|
-
const a = t;
|
|
119
|
-
a.style.height = a.scrollHeight + "px", a.style.opacity = "1";
|
|
120
|
-
}, oe = (t) => {
|
|
121
|
-
const a = t;
|
|
122
|
-
a.style.height = "auto", a.style.overflow = "visible";
|
|
123
|
-
}, ie = (t) => {
|
|
124
|
-
const a = t;
|
|
125
|
-
a.style.height = a.scrollHeight + "px", a.style.overflow = "hidden", a.style.opacity = "1";
|
|
126
118
|
}, re = (t) => {
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
},
|
|
119
|
+
const o = t;
|
|
120
|
+
o.style.height = "0", o.style.opacity = "0";
|
|
121
|
+
}, le = (t) => {
|
|
122
|
+
const o = t;
|
|
123
|
+
o.style.height = o.scrollHeight + "px", o.style.opacity = "1";
|
|
124
|
+
}, se = (t) => {
|
|
125
|
+
const o = t;
|
|
126
|
+
o.style.height = "auto", o.style.overflow = "visible";
|
|
127
|
+
}, ce = (t) => {
|
|
128
|
+
const o = t;
|
|
129
|
+
o.style.height = o.scrollHeight + "px", o.style.overflow = "hidden", o.style.opacity = "1";
|
|
130
|
+
}, ue = (t) => {
|
|
131
|
+
const o = t;
|
|
132
|
+
o.style.height = "0", o.style.opacity = "0";
|
|
133
|
+
}, F = r(() => {
|
|
130
134
|
if (n.item.to) return "router-link";
|
|
131
135
|
if (n.item.href) return "a";
|
|
132
136
|
if (e.renderNestedTabs && n.depth === 0 && f.value) {
|
|
@@ -135,7 +139,7 @@ const we = {
|
|
|
135
139
|
if (t?.href) return "a";
|
|
136
140
|
}
|
|
137
141
|
return "button";
|
|
138
|
-
}),
|
|
142
|
+
}), q = r(() => {
|
|
139
143
|
if (n.item.to) return { to: n.item.to };
|
|
140
144
|
if (n.item.href)
|
|
141
145
|
return {
|
|
@@ -155,91 +159,91 @@ const we = {
|
|
|
155
159
|
}
|
|
156
160
|
return { type: "button" };
|
|
157
161
|
});
|
|
158
|
-
return (t,
|
|
159
|
-
const
|
|
160
|
-
return
|
|
162
|
+
return (t, o) => {
|
|
163
|
+
const c = he("SidebarMenuItem", !0);
|
|
164
|
+
return s(), p("div", {
|
|
161
165
|
ref_key: "itemRef",
|
|
162
|
-
ref:
|
|
166
|
+
ref: N,
|
|
163
167
|
class: d([
|
|
164
168
|
"relative sidebar-manu-item",
|
|
165
169
|
i.value ? "w-auto" : "w-full",
|
|
166
|
-
|
|
170
|
+
a(e).compact && "mb-px"
|
|
167
171
|
])
|
|
168
172
|
}, [
|
|
169
|
-
z.value ? (
|
|
173
|
+
z.value ? (s(), y(a(Ie), {
|
|
170
174
|
key: 0,
|
|
171
|
-
position: i.value ? "bottom-start" :
|
|
175
|
+
position: i.value ? "bottom-start" : ee.value,
|
|
172
176
|
offset: u.menuOffset,
|
|
173
177
|
class: "w-full block",
|
|
174
178
|
searchable: !1,
|
|
175
|
-
width:
|
|
176
|
-
maxHeight:
|
|
177
|
-
options:
|
|
178
|
-
onOnSelect:
|
|
179
|
+
width: a(e).nestedMenuWidth,
|
|
180
|
+
maxHeight: a(e).nestedMenuMaxHeight,
|
|
181
|
+
options: ae.value,
|
|
182
|
+
onOnSelect: ie
|
|
179
183
|
}, {
|
|
180
184
|
header: g(() => [
|
|
181
|
-
|
|
182
|
-
u.item.icon ? (
|
|
185
|
+
a(e).compact && !i.value ? (s(), p("div", ze, [
|
|
186
|
+
u.item.icon ? (s(), y(k, {
|
|
183
187
|
key: 0,
|
|
184
188
|
icon: u.item.icon,
|
|
185
189
|
class: "shrink-0 transition-colors opacity-90 group-hover:opacity-100"
|
|
186
|
-
}, null, 8, ["icon"])) :
|
|
187
|
-
|
|
188
|
-
])) :
|
|
190
|
+
}, null, 8, ["icon"])) : v("", !0),
|
|
191
|
+
be(" " + w(S.value), 1)
|
|
192
|
+
])) : v("", !0)
|
|
189
193
|
]),
|
|
190
194
|
trigger: g(({ isOpen: l }) => [
|
|
191
|
-
C(
|
|
195
|
+
C(U, {
|
|
192
196
|
content: S.value,
|
|
193
|
-
placement: i.value ? "bottom" :
|
|
197
|
+
placement: i.value ? "bottom" : L.value,
|
|
194
198
|
className: "sidebar-menu-tooltip",
|
|
195
|
-
disabled: !
|
|
199
|
+
disabled: !a(e).showTooltip || !a(e).compact && !i.value || l,
|
|
196
200
|
class: "w-full block"
|
|
197
201
|
}, {
|
|
198
202
|
default: g(() => [
|
|
199
|
-
b("div",
|
|
200
|
-
(
|
|
201
|
-
class: [
|
|
202
|
-
style:
|
|
203
|
+
b("div", $e, [
|
|
204
|
+
(s(), y(G(F.value), J(q.value, {
|
|
205
|
+
class: [O.value, l ? "bg-muted text-foreground" : ""],
|
|
206
|
+
style: V.value,
|
|
203
207
|
"aria-haspopup": !0,
|
|
204
208
|
"aria-expanded": l,
|
|
205
|
-
onClick:
|
|
209
|
+
onClick: R
|
|
206
210
|
}), {
|
|
207
211
|
default: g(() => [
|
|
208
212
|
b("div", {
|
|
209
213
|
class: d(["min-w-0 flex-1 flex", [
|
|
210
|
-
h.value && !i.value ? "flex-col items-center justify-center text-center gap-1" :
|
|
214
|
+
h.value && !i.value ? "flex-col items-center justify-center text-center gap-1" : a(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
211
215
|
]])
|
|
212
216
|
}, [
|
|
213
|
-
u.item.icon ? (
|
|
217
|
+
u.item.icon ? (s(), y(k, {
|
|
214
218
|
key: 0,
|
|
215
219
|
icon: u.item.icon,
|
|
216
220
|
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [$.value || l ? "opacity-100" : ""]]),
|
|
217
|
-
style:
|
|
218
|
-
width:
|
|
219
|
-
height:
|
|
221
|
+
style: T({
|
|
222
|
+
width: a(e).compact && !i.value ? a(e).compactIconSize : a(e).iconSize,
|
|
223
|
+
height: a(e).compact && !i.value ? a(e).compactIconSize : a(e).iconSize
|
|
220
224
|
})
|
|
221
|
-
}, null, 8, ["icon", "class", "style"])) :
|
|
225
|
+
}, null, 8, ["icon", "class", "style"])) : v("", !0),
|
|
222
226
|
b("span", {
|
|
223
227
|
class: d(["truncate leading-none pt-0.5 text-wrap", {
|
|
224
|
-
[
|
|
225
|
-
"w-full text-center":
|
|
226
|
-
hidden:
|
|
227
|
-
"md:hidden":
|
|
228
|
+
[a(e).compactLabelClass]: h.value && !i.value,
|
|
229
|
+
"w-full text-center": a(e).compact,
|
|
230
|
+
hidden: a(e).compact && !h.value && !i.value,
|
|
231
|
+
"md:hidden": a(e).compact && !h.value && !i.value
|
|
228
232
|
}])
|
|
229
233
|
}, w(S.value), 3),
|
|
230
|
-
u.item.badge && (!
|
|
234
|
+
u.item.badge && (!a(e).compact || !h.value || i.value) ? (s(), p("span", {
|
|
231
235
|
key: 1,
|
|
232
|
-
class: d(["
|
|
236
|
+
class: d(["ms-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
233
237
|
u.item.badgeClass || "bg-muted text-muted-foreground",
|
|
234
|
-
{ "md:hidden":
|
|
238
|
+
{ "md:hidden": a(e).compact && !i.value }
|
|
235
239
|
]])
|
|
236
|
-
}, w(u.item.badge), 3)) :
|
|
240
|
+
}, w(u.item.badge), 3)) : v("", !0)
|
|
237
241
|
], 2),
|
|
238
242
|
b("div", {
|
|
239
|
-
class: d(["
|
|
243
|
+
class: d(["ms-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": a(e).compact && !i.value }])
|
|
240
244
|
}, [
|
|
241
245
|
C(k, {
|
|
242
|
-
icon: i.value ? "lucide:chevron-down" :
|
|
246
|
+
icon: i.value ? "lucide:chevron-down" : j.value,
|
|
243
247
|
class: "h-3 w-3"
|
|
244
248
|
}, null, 8, ["icon"])
|
|
245
249
|
], 2)
|
|
@@ -252,124 +256,124 @@ const we = {
|
|
|
252
256
|
}, 1032, ["content", "placement", "disabled"])
|
|
253
257
|
]),
|
|
254
258
|
item: g(({ option: l }) => [
|
|
255
|
-
b("div",
|
|
256
|
-
l.icon ? (
|
|
259
|
+
b("div", Te, [
|
|
260
|
+
l.icon ? (s(), y(k, {
|
|
257
261
|
key: 0,
|
|
258
262
|
icon: l.icon,
|
|
259
263
|
class: "shrink-0 opacity-90",
|
|
260
|
-
style:
|
|
261
|
-
}, null, 8, ["icon", "style"])) :
|
|
262
|
-
b("span",
|
|
263
|
-
l.data?.badge ? (
|
|
264
|
+
style: T({ width: a(e).iconSize, height: a(e).iconSize })
|
|
265
|
+
}, null, 8, ["icon", "style"])) : v("", !0),
|
|
266
|
+
b("span", Me, w(l.label), 1),
|
|
267
|
+
l.data?.badge ? (s(), p("span", {
|
|
264
268
|
key: 1,
|
|
265
|
-
class: d(["
|
|
266
|
-
}, w(l.data.badge), 3)) :
|
|
269
|
+
class: d(["ms-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", l.data?.badgeClass || "bg-muted text-muted-foreground"])
|
|
270
|
+
}, w(l.data.badge), 3)) : v("", !0)
|
|
267
271
|
])
|
|
268
272
|
]),
|
|
269
273
|
_: 1
|
|
270
|
-
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (
|
|
271
|
-
C(
|
|
274
|
+
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (s(), p(Q, { key: 1 }, [
|
|
275
|
+
C(U, {
|
|
272
276
|
content: S.value,
|
|
273
|
-
placement: i.value ? "bottom" :
|
|
274
|
-
disabled: !
|
|
277
|
+
placement: i.value ? "bottom" : L.value,
|
|
278
|
+
disabled: !a(e).showTooltip || !a(e).compact && !i.value,
|
|
275
279
|
class: "w-full block"
|
|
276
280
|
}, {
|
|
277
281
|
default: g(() => [
|
|
278
|
-
(
|
|
279
|
-
class:
|
|
280
|
-
style:
|
|
281
|
-
"aria-expanded":
|
|
282
|
+
(s(), y(G(F.value), J(q.value, {
|
|
283
|
+
class: O.value,
|
|
284
|
+
style: V.value,
|
|
285
|
+
"aria-expanded": A.value ? E.value : void 0,
|
|
282
286
|
"aria-current": $.value ? "page" : void 0,
|
|
283
|
-
onClick:
|
|
287
|
+
onClick: R
|
|
284
288
|
}), {
|
|
285
289
|
default: g(() => [
|
|
286
290
|
b("div", {
|
|
287
291
|
class: d(["min-w-0 flex-1 flex py-0.5", [
|
|
288
|
-
h.value && !i.value ? "flex-col items-center justify-center text-center gap-1" :
|
|
292
|
+
h.value && !i.value ? "flex-col items-center justify-center text-center gap-1" : a(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
289
293
|
]])
|
|
290
294
|
}, [
|
|
291
|
-
u.item.icon ? (
|
|
295
|
+
u.item.icon ? (s(), y(k, {
|
|
292
296
|
key: 0,
|
|
293
297
|
icon: u.item.icon,
|
|
294
298
|
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [$.value ? "opacity-100" : ""]]),
|
|
295
|
-
style:
|
|
296
|
-
width:
|
|
297
|
-
height:
|
|
299
|
+
style: T({
|
|
300
|
+
width: a(e).compact && !i.value ? a(e).compactIconSize : a(e).iconSize,
|
|
301
|
+
height: a(e).compact && !i.value ? a(e).compactIconSize : a(e).iconSize
|
|
298
302
|
})
|
|
299
|
-
}, null, 8, ["icon", "class", "style"])) :
|
|
303
|
+
}, null, 8, ["icon", "class", "style"])) : v("", !0),
|
|
300
304
|
b("span", {
|
|
301
305
|
class: d(["truncate leading-none pt-0.5 wrap-break-word flex-wrap text-wrap", {
|
|
302
|
-
[
|
|
303
|
-
"w-full text-center":
|
|
304
|
-
hidden:
|
|
305
|
-
"md:hidden":
|
|
306
|
+
[a(e).compactLabelClass]: h.value && !i.value,
|
|
307
|
+
"w-full text-center": a(e).compact,
|
|
308
|
+
hidden: a(e).compact && !h.value && !i.value,
|
|
309
|
+
"md:hidden": a(e).compact && !h.value && !i.value
|
|
306
310
|
}])
|
|
307
311
|
}, w(S.value), 3),
|
|
308
|
-
u.item.badge && (!
|
|
312
|
+
u.item.badge && (!a(e).compact || !h.value || i.value) ? (s(), p("span", {
|
|
309
313
|
key: 1,
|
|
310
|
-
class: d(["
|
|
314
|
+
class: d(["ms-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
311
315
|
u.item.badgeClass || "bg-muted text-muted-foreground",
|
|
312
|
-
{ "md:hidden":
|
|
316
|
+
{ "md:hidden": a(e).compact && !i.value }
|
|
313
317
|
]])
|
|
314
|
-
}, w(u.item.badge), 3)) :
|
|
318
|
+
}, w(u.item.badge), 3)) : v("", !0)
|
|
315
319
|
], 2),
|
|
316
|
-
|
|
320
|
+
A.value ? (s(), p("div", {
|
|
317
321
|
key: 0,
|
|
318
322
|
role: "button",
|
|
319
323
|
tabindex: "0",
|
|
320
|
-
class: d(["
|
|
321
|
-
onClick:
|
|
322
|
-
onKeydown:
|
|
324
|
+
class: d(["ms-1.5 flex shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-all", { "md:hidden": a(e).compact && !i.value }]),
|
|
325
|
+
onClick: H,
|
|
326
|
+
onKeydown: ye(ge(H, ["prevent"]), ["enter", "space"])
|
|
323
327
|
}, [
|
|
324
328
|
C(k, {
|
|
325
329
|
icon: "lucide:chevron-down",
|
|
326
|
-
class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180":
|
|
330
|
+
class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180": E.value && !i.value }])
|
|
327
331
|
}, null, 8, ["class"])
|
|
328
|
-
], 42,
|
|
329
|
-
|
|
332
|
+
], 42, Ne)) : v("", !0),
|
|
333
|
+
te.value ? (s(), p("div", {
|
|
330
334
|
key: 1,
|
|
331
|
-
class: d(["
|
|
335
|
+
class: d(["ms-1.5 flex shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": a(e).compact && !i.value }])
|
|
332
336
|
}, [
|
|
333
337
|
C(k, {
|
|
334
|
-
icon:
|
|
338
|
+
icon: j.value,
|
|
335
339
|
class: "h-3.5 w-3.5 opacity-50 transition-opacity group-hover:opacity-80"
|
|
336
|
-
})
|
|
337
|
-
], 2)) :
|
|
340
|
+
}, null, 8, ["icon"])
|
|
341
|
+
], 2)) : v("", !0)
|
|
338
342
|
]),
|
|
339
343
|
_: 1
|
|
340
344
|
}, 16, ["class", "style", "aria-expanded", "aria-current"]))
|
|
341
345
|
]),
|
|
342
346
|
_: 1
|
|
343
347
|
}, 8, ["content", "placement", "disabled"]),
|
|
344
|
-
C(
|
|
348
|
+
C(xe, {
|
|
345
349
|
name: "sidebar-slide",
|
|
346
|
-
onBeforeEnter:
|
|
347
|
-
onEnter:
|
|
348
|
-
onAfterEnter:
|
|
349
|
-
onBeforeLeave:
|
|
350
|
-
onLeave:
|
|
350
|
+
onBeforeEnter: re,
|
|
351
|
+
onEnter: le,
|
|
352
|
+
onAfterEnter: se,
|
|
353
|
+
onBeforeLeave: ce,
|
|
354
|
+
onLeave: ue
|
|
351
355
|
}, {
|
|
352
356
|
default: g(() => [
|
|
353
|
-
f.value &&
|
|
354
|
-
|
|
357
|
+
f.value && E.value && !i.value ? (s(), p("div", Ee, [
|
|
358
|
+
a(e).variant === "default" ? (s(), p("div", {
|
|
355
359
|
key: 0,
|
|
356
360
|
class: "sidebar-tree-line absolute rounded-full z-[1]",
|
|
357
|
-
style:
|
|
358
|
-
|
|
361
|
+
style: T({
|
|
362
|
+
insetInlineStart: oe.value,
|
|
359
363
|
top: "4px",
|
|
360
364
|
bottom: "10px",
|
|
361
365
|
width: "1px",
|
|
362
366
|
backgroundColor: "var(--color-border)"
|
|
363
367
|
})
|
|
364
|
-
}, null, 4)) :
|
|
365
|
-
b("div",
|
|
366
|
-
(
|
|
368
|
+
}, null, 4)) : v("", !0),
|
|
369
|
+
b("div", Pe, [
|
|
370
|
+
(s(!0), p(Q, null, we(u.item.children, (l) => (s(), y(c, {
|
|
367
371
|
key: l.id || l.label,
|
|
368
372
|
item: l,
|
|
369
373
|
depth: u.depth + 1
|
|
370
374
|
}, null, 8, ["item", "depth"]))), 128))
|
|
371
375
|
])
|
|
372
|
-
])) :
|
|
376
|
+
])) : v("", !0)
|
|
373
377
|
]),
|
|
374
378
|
_: 1
|
|
375
379
|
})
|
|
@@ -379,5 +383,5 @@ const we = {
|
|
|
379
383
|
}
|
|
380
384
|
});
|
|
381
385
|
export {
|
|
382
|
-
|
|
386
|
+
We as default
|
|
383
387
|
};
|