vlite3 1.1.4 → 1.1.5
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/README.md +5 -0
- package/components/CategoryManager/CategoryManager.vue.js +1 -1
- package/components/Chart/BarChart.vue.d.ts +48 -0
- package/components/Chart/CircleChart.vue.d.ts +47 -0
- package/components/Chart/LineChart.vue.d.ts +55 -0
- package/components/Chart/PieChart.vue.d.ts +49 -0
- package/components/Chart/index.d.ts +5 -0
- package/components/Chart/types.d.ts +135 -0
- package/components/Chart/utils.d.ts +40 -0
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Comment/CommentEditor.vue.d.ts +41 -0
- package/components/Comment/CommentEditor.vue.js +221 -0
- package/components/Comment/CommentEditor.vue2.js +4 -0
- package/components/Comment/CommentItem.vue.d.ts +70 -0
- package/components/Comment/CommentItem.vue.js +7 -0
- package/components/Comment/CommentItem.vue2.js +322 -0
- package/components/Comment/CommentThread.vue.d.ts +64 -0
- package/components/Comment/CommentThread.vue.js +185 -0
- package/components/Comment/CommentThread.vue2.js +4 -0
- package/components/Comment/index.d.ts +4 -0
- package/components/Comment/types.d.ts +34 -0
- package/components/DataTable/DataTable.vue.d.ts +2 -4
- package/components/DataTable/DataTable.vue.js +175 -226
- package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
- package/components/DataTable/DataTableHeader.vue.js +24 -23
- package/components/DataTable/DataTableRow.vue.d.ts +2 -0
- package/components/DataTable/DataTableRow.vue.js +32 -31
- package/components/DataTable/types.d.ts +2 -9
- package/components/Dropdown/Dropdown.vue.d.ts +2 -0
- package/components/Dropdown/Dropdown.vue.js +60 -58
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +7 -6
- package/components/Empty/Empty.vue.js +7 -5
- package/components/Empty/index.d.ts +1 -1
- package/components/Empty/variants/Variant12.vue.d.ts +22 -0
- package/components/Empty/variants/Variant12.vue.js +35 -0
- package/components/Empty/variants/Variant12.vue2.js +4 -0
- package/components/Footer/Footer.vue.d.ts +3 -0
- package/components/Footer/Variant1.vue.d.ts +20 -0
- package/components/Footer/Variant2.vue.d.ts +20 -0
- package/components/Footer/Variant3.vue.d.ts +12 -0
- package/components/Footer/index.d.ts +2 -0
- package/components/Footer/types.d.ts +73 -0
- package/components/Form/CustomFields.vue.d.ts +2 -0
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/CustomFields.vue2.js +125 -122
- package/components/Form/FormField.vue.js +1 -1
- package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
- package/components/MultiSelect/MultiSelect.vue.js +95 -94
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +1 -1
- package/components/NumberInput.vue2.js +39 -38
- package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
- package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
- package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
- package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
- package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
- package/components/RichTextEditor/index.d.ts +2 -0
- package/components/Screen/Screen.vue.js +45 -46
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
- package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
- package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
- package/components/SidebarMenu/types.d.ts +12 -3
- package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
- package/components/Splitter/Splitter.vue.js +64 -0
- package/components/Splitter/Splitter.vue2.js +4 -0
- package/components/Splitter/index.d.ts +1 -0
- package/components/StatusChip/status-map.js +34 -2
- package/components/index.d.ts +4 -0
- package/core/config.d.ts +18 -0
- package/index.d.ts +2 -0
- package/index.js +316 -307
- package/package.json +1 -1
- package/style.css +42 -6
- package/types/config.type.d.ts +2 -0
- package/components/DataTable/DataTableToolbar.vue.js +0 -60
- package/components/DataTable/DataTableToolbar.vue2.js +0 -4
- package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as ie, inject as ae, computed as s, resolveComponent as oe, openBlock as r, createElementBlock as v, normalizeClass as u, createBlock as g, unref as a, withCtx as y, createElementVNode as p, normalizeStyle as E, createCommentVNode as m, toDisplayString as x, createVNode as C, resolveDynamicComponent as R, mergeProps as W, createTextVNode as le, Fragment as F, withKeys as re, withModifiers as se, Transition as ce, renderList as ue } from "vue";
|
|
2
|
+
import { useRouter as de, useRoute as me } from "vue-router";
|
|
3
3
|
import k from "../Icon.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { $t as
|
|
4
|
+
import q from "../Tooltip.vue.js";
|
|
5
|
+
import fe from "../Dropdown/Dropdown.vue.js";
|
|
6
|
+
import { $t as G } from "../../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
const
|
|
9
|
+
const ve = {
|
|
10
10
|
key: 0,
|
|
11
11
|
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"
|
|
12
|
-
},
|
|
12
|
+
}, he = { class: "w-full" }, pe = { class: "flex items-center w-full gap-2 text-sm" }, be = { class: "truncate flex-1 font-medium" }, ge = ["onKeydown"], ye = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "overflow-hidden transition-all duration-300 ease-in-out relative"
|
|
15
|
-
},
|
|
15
|
+
}, we = { class: "mt-0.5 space-y-0.5" }, je = /* @__PURE__ */ ie({
|
|
16
16
|
__name: "SidebarMenuItem",
|
|
17
17
|
props: {
|
|
18
18
|
item: {},
|
|
@@ -20,184 +20,188 @@ const me = {
|
|
|
20
20
|
menuOffset: {},
|
|
21
21
|
itemClass: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const t =
|
|
23
|
+
setup(c) {
|
|
24
|
+
const t = c, e = ae("sidebar-menu-ctx"), S = de(), J = me();
|
|
25
25
|
if (!e)
|
|
26
26
|
throw new Error("SidebarMenuItem must be used within a SidebarMenu");
|
|
27
|
-
const o =
|
|
27
|
+
const o = s(
|
|
28
28
|
() => e.currentOrientation === "horizontal" && t.depth === 0
|
|
29
|
-
),
|
|
30
|
-
const l =
|
|
29
|
+
), d = s(() => !!t.item.children?.length), L = s(() => o.value && d.value || e.compact && d.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), I = s(() => e.renderNestedTabs && t.depth === 0 ? !1 : L.value === "drilldown" && d.value), $ = s(() => e.renderNestedTabs && t.depth === 0 || I.value ? !1 : L.value === "popover" && d.value), w = s(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), N = s(() => $.value || I.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(w.value)), _ = s(() => !(!d.value || I.value || e.renderNestedTabs && t.depth === 0)), Q = s(() => I.value && d.value), A = (i, n, f) => {
|
|
30
|
+
const l = i.id || (typeof i.to == "string" ? i.to : null) || i.label;
|
|
31
31
|
if (n && l === n) return !0;
|
|
32
|
-
if (
|
|
33
|
-
const b = typeof
|
|
32
|
+
if (i.to) {
|
|
33
|
+
const b = typeof i.to == "string" ? i.to : i.to.path;
|
|
34
34
|
if (b) {
|
|
35
|
-
if (
|
|
36
|
-
if (b !== "/" && b.length > 1 &&
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
35
|
+
if (f === b) return !0;
|
|
36
|
+
if (b !== "/" && b.length > 1 && f.startsWith(b)) {
|
|
37
|
+
const T = f[b.length];
|
|
38
|
+
if (!T || T === "/" || T === "?") return !0;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
return
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
}),
|
|
42
|
+
return i.children?.length ? i.children.some((b) => A(b, n, f)) : !1;
|
|
43
|
+
}, M = s(() => {
|
|
44
|
+
const i = J?.path || "", n = e.activeItem;
|
|
45
|
+
return d.value ? A(t.item, n, i) : n === w.value;
|
|
46
|
+
}), D = (i) => {
|
|
47
47
|
if (!t.item.disabled) {
|
|
48
|
+
if (I.value) {
|
|
49
|
+
t.item.action && t.item.action(t.item), e.drillInto(t.item);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
48
52
|
if (e.renderNestedTabs && t.depth === 0) {
|
|
49
53
|
if (t.item.action && t.item.action(t.item), t.item.to)
|
|
50
|
-
|
|
54
|
+
S.push(t.item.to).catch(() => {
|
|
51
55
|
});
|
|
52
56
|
else if (t.item.href)
|
|
53
57
|
window.open(t.item.href, "_blank");
|
|
54
|
-
else if (
|
|
58
|
+
else if (d.value) {
|
|
55
59
|
const n = t.item.children?.[0];
|
|
56
|
-
n && (n.to ?
|
|
60
|
+
n && (n.to ? S.push(n.to).catch(() => {
|
|
57
61
|
}) : n.href && window.open(n.href, "_blank"));
|
|
58
62
|
}
|
|
59
|
-
e.setActive(
|
|
63
|
+
e.setActive(w.value);
|
|
60
64
|
return;
|
|
61
65
|
}
|
|
62
|
-
|
|
66
|
+
d.value && !t.item.to && !t.item.href && ($.value || e.toggleExpand(w.value)), t.item.action && t.item.action(t.item), (!d.value || t.item.to) && e.setActive(w.value);
|
|
63
67
|
}
|
|
64
|
-
},
|
|
65
|
-
if (
|
|
68
|
+
}, H = (i) => {
|
|
69
|
+
if (i.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
|
|
66
70
|
if (t.item.action && t.item.action(t.item), t.item.to)
|
|
67
|
-
|
|
71
|
+
S.push(t.item.to).catch(() => {
|
|
68
72
|
});
|
|
69
73
|
else if (t.item.href)
|
|
70
74
|
window.open(t.item.href, "_blank");
|
|
71
|
-
else if (
|
|
75
|
+
else if (d.value) {
|
|
72
76
|
const n = t.item.children?.[0];
|
|
73
|
-
n && (n.to ?
|
|
77
|
+
n && (n.to ? S.push(n.to).catch(() => {
|
|
74
78
|
}) : n.href && window.open(n.href, "_blank"));
|
|
75
79
|
}
|
|
76
|
-
e.setActive(
|
|
80
|
+
e.setActive(w.value);
|
|
77
81
|
return;
|
|
78
82
|
}
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
marginLeft: `${t.depth *
|
|
82
|
-
width: `calc(100% - ${t.depth *
|
|
83
|
-
}),
|
|
84
|
-
const n = `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 ${o.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`,
|
|
83
|
+
$.value || e.toggleExpand(w.value);
|
|
84
|
+
}, j = s(() => e.indentSize || 12), B = s(() => o.value ? {} : e.compact ? { width: "100%" } : {
|
|
85
|
+
marginLeft: `${t.depth * j.value}px`,
|
|
86
|
+
width: `calc(100% - ${t.depth * j.value}px)`
|
|
87
|
+
}), P = s(() => {
|
|
88
|
+
const n = `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 ${o.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`, f = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
|
|
85
89
|
let l = "";
|
|
86
|
-
return
|
|
87
|
-
}),
|
|
88
|
-
() => t.item.labelI18n ?
|
|
89
|
-
),
|
|
90
|
-
label:
|
|
91
|
-
value:
|
|
92
|
-
icon:
|
|
93
|
-
disabled:
|
|
94
|
-
children:
|
|
95
|
-
data:
|
|
96
|
-
}),
|
|
97
|
-
const n =
|
|
90
|
+
return M.value ? l = "bg-primary-light text-primary-fg-light" : l = "text-muted hover:bg-accent/80 hover:text-foreground", t.item.disabled && (l = "opacity-50 cursor-not-allowed pointer-events-none"), `${n} ${f} ${l} ${t.item.class || ""}`;
|
|
91
|
+
}), h = s(() => e.compact && e.showCompactLabels), z = s(
|
|
92
|
+
() => t.item.labelI18n ? G(t.item.labelI18n) : t.item.label
|
|
93
|
+
), V = (i) => ({
|
|
94
|
+
label: i.labelI18n ? G(i.labelI18n) : i.label,
|
|
95
|
+
value: i.id || i.label,
|
|
96
|
+
icon: i.icon,
|
|
97
|
+
disabled: i.disabled,
|
|
98
|
+
children: i.children ? i.children.map(V) : void 0,
|
|
99
|
+
data: i
|
|
100
|
+
}), U = s(() => t.item.children ? t.item.children.map(V) : []), X = (i) => {
|
|
101
|
+
const n = i.data;
|
|
98
102
|
if (n) {
|
|
99
103
|
n.action && n.action(n);
|
|
100
|
-
const
|
|
101
|
-
|
|
104
|
+
const f = n.id || n.label || (typeof n.to == "string" ? n.to : "");
|
|
105
|
+
f && e.setActive(f), n.to ? S.push(n.to).catch(() => {
|
|
102
106
|
}) : n.href && window.open(n.href, "_blank");
|
|
103
107
|
}
|
|
104
|
-
},
|
|
105
|
-
const n =
|
|
108
|
+
}, Y = (i) => {
|
|
109
|
+
const n = i;
|
|
106
110
|
n.style.height = "0", n.style.opacity = "0";
|
|
107
|
-
},
|
|
108
|
-
const n =
|
|
111
|
+
}, Z = (i) => {
|
|
112
|
+
const n = i;
|
|
109
113
|
n.style.height = n.scrollHeight + "px", n.style.opacity = "1";
|
|
110
|
-
},
|
|
111
|
-
const n =
|
|
114
|
+
}, ee = (i) => {
|
|
115
|
+
const n = i;
|
|
112
116
|
n.style.height = "auto", n.style.overflow = "visible";
|
|
113
|
-
},
|
|
114
|
-
const n =
|
|
117
|
+
}, te = (i) => {
|
|
118
|
+
const n = i;
|
|
115
119
|
n.style.height = n.scrollHeight + "px", n.style.overflow = "hidden", n.style.opacity = "1";
|
|
116
|
-
},
|
|
117
|
-
const n =
|
|
120
|
+
}, ne = (i) => {
|
|
121
|
+
const n = i;
|
|
118
122
|
n.style.height = "0", n.style.opacity = "0";
|
|
119
|
-
},
|
|
123
|
+
}, K = s(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), O = s(() => t.item.to ? { to: t.item.to } : t.item.href ? {
|
|
120
124
|
href: t.item.href,
|
|
121
125
|
target: "_blank",
|
|
122
126
|
rel: "noopener noreferrer"
|
|
123
127
|
} : { type: "button" });
|
|
124
|
-
return (
|
|
125
|
-
const
|
|
126
|
-
return r(),
|
|
128
|
+
return (i, n) => {
|
|
129
|
+
const f = oe("SidebarMenuItem", !0);
|
|
130
|
+
return r(), v("div", {
|
|
127
131
|
class: u(["relative sidebar-manu-item", o.value ? "w-auto" : "w-full"])
|
|
128
132
|
}, [
|
|
129
|
-
|
|
133
|
+
$.value ? (r(), g(a(fe), {
|
|
130
134
|
key: 0,
|
|
131
135
|
position: o.value ? "bottom-start" : "right-start",
|
|
132
|
-
offset:
|
|
136
|
+
offset: c.menuOffset,
|
|
133
137
|
class: "w-full block",
|
|
134
138
|
searchable: !1,
|
|
135
|
-
width:
|
|
136
|
-
maxHeight:
|
|
137
|
-
options:
|
|
138
|
-
onOnSelect:
|
|
139
|
+
width: a(e).nestedMenuWidth,
|
|
140
|
+
maxHeight: a(e).nestedMenuMaxHeight,
|
|
141
|
+
options: U.value,
|
|
142
|
+
onOnSelect: X
|
|
139
143
|
}, {
|
|
140
144
|
header: y(() => [
|
|
141
|
-
|
|
142
|
-
|
|
145
|
+
a(e).compact && !o.value ? (r(), v("div", ve, [
|
|
146
|
+
c.item.icon ? (r(), g(k, {
|
|
143
147
|
key: 0,
|
|
144
|
-
icon:
|
|
148
|
+
icon: c.item.icon,
|
|
145
149
|
class: "shrink-0 transition-colors opacity-90 group-hover:opacity-100"
|
|
146
150
|
}, null, 8, ["icon"])) : m("", !0),
|
|
147
|
-
|
|
151
|
+
le(" " + x(z.value), 1)
|
|
148
152
|
])) : m("", !0)
|
|
149
153
|
]),
|
|
150
154
|
trigger: y(({ isOpen: l }) => [
|
|
151
|
-
|
|
152
|
-
content:
|
|
155
|
+
C(q, {
|
|
156
|
+
content: z.value,
|
|
153
157
|
placement: o.value ? "bottom" : "right",
|
|
154
158
|
className: "sidebar-menu-tooltip",
|
|
155
|
-
disabled: !
|
|
159
|
+
disabled: !a(e).showTooltip || !a(e).compact && !o.value || l,
|
|
156
160
|
class: "w-full block"
|
|
157
161
|
}, {
|
|
158
162
|
default: y(() => [
|
|
159
|
-
|
|
160
|
-
(r(), g(K
|
|
161
|
-
class: [
|
|
162
|
-
style:
|
|
163
|
+
p("div", he, [
|
|
164
|
+
(r(), g(R(K.value), W(O.value, {
|
|
165
|
+
class: [P.value, l ? "bg-muted text-foreground" : ""],
|
|
166
|
+
style: B.value,
|
|
163
167
|
"aria-haspopup": !0,
|
|
164
168
|
"aria-expanded": l,
|
|
165
|
-
onClick:
|
|
169
|
+
onClick: D
|
|
166
170
|
}), {
|
|
167
171
|
default: y(() => [
|
|
168
|
-
|
|
172
|
+
p("div", {
|
|
169
173
|
class: u(["min-w-0 flex-1 flex", [
|
|
170
|
-
|
|
174
|
+
h.value && !o.value ? "flex-col items-center justify-center gap-1" : a(e).compact && !o.value ? "justify-center" : "items-center gap-2.5"
|
|
171
175
|
]])
|
|
172
176
|
}, [
|
|
173
|
-
|
|
177
|
+
c.item.icon ? (r(), g(k, {
|
|
174
178
|
key: 0,
|
|
175
|
-
icon:
|
|
176
|
-
class: u(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [
|
|
179
|
+
icon: c.item.icon,
|
|
180
|
+
class: u(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [M.value || l ? "opacity-100" : ""]]),
|
|
177
181
|
style: E({
|
|
178
|
-
width:
|
|
179
|
-
height:
|
|
182
|
+
width: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize,
|
|
183
|
+
height: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize
|
|
180
184
|
})
|
|
181
185
|
}, null, 8, ["icon", "class", "style"])) : m("", !0),
|
|
182
|
-
|
|
186
|
+
p("span", {
|
|
183
187
|
class: u(["truncate leading-none pt-0.5 text-wrap", {
|
|
184
|
-
[
|
|
185
|
-
hidden:
|
|
186
|
-
"md:hidden":
|
|
188
|
+
[a(e).compactLabelClass]: h.value && !o.value,
|
|
189
|
+
hidden: a(e).compact && !h.value && !o.value,
|
|
190
|
+
"md:hidden": a(e).compact && !h.value && !o.value
|
|
187
191
|
}])
|
|
188
|
-
},
|
|
189
|
-
|
|
192
|
+
}, x(z.value), 3),
|
|
193
|
+
c.item.badge && (!a(e).compact || !h.value || o.value) ? (r(), v("span", {
|
|
190
194
|
key: 1,
|
|
191
195
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
192
|
-
|
|
193
|
-
{ "md:hidden":
|
|
196
|
+
c.item.badgeClass || "bg-muted text-muted-foreground",
|
|
197
|
+
{ "md:hidden": a(e).compact && !o.value }
|
|
194
198
|
]])
|
|
195
|
-
},
|
|
199
|
+
}, x(c.item.badge), 3)) : m("", !0)
|
|
196
200
|
], 2),
|
|
197
|
-
|
|
198
|
-
class: u(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden":
|
|
201
|
+
p("div", {
|
|
202
|
+
class: u(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": a(e).compact && !o.value }])
|
|
199
203
|
}, [
|
|
200
|
-
|
|
204
|
+
C(k, {
|
|
201
205
|
icon: o.value ? "lucide:chevron-down" : "lucide:chevron-right",
|
|
202
206
|
class: "h-3 w-3"
|
|
203
207
|
}, null, 8, ["icon"])
|
|
@@ -211,107 +215,116 @@ const me = {
|
|
|
211
215
|
}, 1032, ["content", "placement", "disabled"])
|
|
212
216
|
]),
|
|
213
217
|
item: y(({ option: l }) => [
|
|
214
|
-
|
|
218
|
+
p("div", pe, [
|
|
215
219
|
l.icon ? (r(), g(k, {
|
|
216
220
|
key: 0,
|
|
217
221
|
icon: l.icon,
|
|
218
222
|
class: "shrink-0 opacity-90",
|
|
219
|
-
style: E({ width:
|
|
223
|
+
style: E({ width: a(e).iconSize, height: a(e).iconSize })
|
|
220
224
|
}, null, 8, ["icon", "style"])) : m("", !0),
|
|
221
|
-
|
|
222
|
-
l.data?.badge ? (r(),
|
|
225
|
+
p("span", be, x(l.label), 1),
|
|
226
|
+
l.data?.badge ? (r(), v("span", {
|
|
223
227
|
key: 1,
|
|
224
228
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", l.data?.badgeClass || "bg-muted text-muted-foreground"])
|
|
225
|
-
},
|
|
229
|
+
}, x(l.data.badge), 3)) : m("", !0)
|
|
226
230
|
])
|
|
227
231
|
]),
|
|
228
232
|
_: 1
|
|
229
|
-
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (r(),
|
|
230
|
-
|
|
231
|
-
content:
|
|
233
|
+
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (r(), v(F, { key: 1 }, [
|
|
234
|
+
C(q, {
|
|
235
|
+
content: z.value,
|
|
232
236
|
placement: o.value ? "bottom" : "right",
|
|
233
|
-
disabled: !
|
|
237
|
+
disabled: !a(e).showTooltip || !a(e).compact && !o.value,
|
|
234
238
|
class: "w-full block"
|
|
235
239
|
}, {
|
|
236
240
|
default: y(() => [
|
|
237
|
-
(r(), g(K
|
|
238
|
-
class: [
|
|
239
|
-
style:
|
|
240
|
-
"aria-expanded":
|
|
241
|
-
"aria-current":
|
|
242
|
-
onClick:
|
|
241
|
+
(r(), g(R(K.value), W(O.value, {
|
|
242
|
+
class: [P.value, "mb-0.5"],
|
|
243
|
+
style: B.value,
|
|
244
|
+
"aria-expanded": _.value ? N.value : void 0,
|
|
245
|
+
"aria-current": M.value ? "page" : void 0,
|
|
246
|
+
onClick: D
|
|
243
247
|
}), {
|
|
244
248
|
default: y(() => [
|
|
245
|
-
|
|
249
|
+
p("div", {
|
|
246
250
|
class: u(["min-w-0 flex-1 flex py-0.5", [
|
|
247
|
-
|
|
251
|
+
h.value && !o.value ? "flex-col items-center justify-center gap-1" : a(e).compact && !o.value ? "justify-center" : "items-center gap-2.5"
|
|
248
252
|
]])
|
|
249
253
|
}, [
|
|
250
|
-
|
|
254
|
+
c.item.icon ? (r(), g(k, {
|
|
251
255
|
key: 0,
|
|
252
|
-
icon:
|
|
253
|
-
class: u(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [
|
|
256
|
+
icon: c.item.icon,
|
|
257
|
+
class: u(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [M.value ? "opacity-100" : ""]]),
|
|
254
258
|
style: E({
|
|
255
|
-
width:
|
|
256
|
-
height:
|
|
259
|
+
width: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize,
|
|
260
|
+
height: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize
|
|
257
261
|
})
|
|
258
262
|
}, null, 8, ["icon", "class", "style"])) : m("", !0),
|
|
259
|
-
|
|
263
|
+
p("span", {
|
|
260
264
|
class: u(["truncate leading-none pt-0.5 wrap-break-word flex-wrap text-wrap", {
|
|
261
|
-
[
|
|
262
|
-
hidden:
|
|
263
|
-
"md:hidden":
|
|
265
|
+
[a(e).compactLabelClass]: h.value && !o.value,
|
|
266
|
+
hidden: a(e).compact && !h.value && !o.value,
|
|
267
|
+
"md:hidden": a(e).compact && !h.value && !o.value
|
|
264
268
|
}])
|
|
265
|
-
},
|
|
266
|
-
|
|
269
|
+
}, x(z.value), 3),
|
|
270
|
+
c.item.badge && (!a(e).compact || !h.value || o.value) ? (r(), v("span", {
|
|
267
271
|
key: 1,
|
|
268
272
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
269
|
-
|
|
270
|
-
{ "md:hidden":
|
|
273
|
+
c.item.badgeClass || "bg-muted text-muted-foreground",
|
|
274
|
+
{ "md:hidden": a(e).compact && !o.value }
|
|
271
275
|
]])
|
|
272
|
-
},
|
|
276
|
+
}, x(c.item.badge), 3)) : m("", !0)
|
|
273
277
|
], 2),
|
|
274
|
-
|
|
278
|
+
_.value ? (r(), v("div", {
|
|
275
279
|
key: 0,
|
|
276
280
|
role: "button",
|
|
277
281
|
tabindex: "0",
|
|
278
|
-
class: u(["ml-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":
|
|
279
|
-
onClick:
|
|
280
|
-
onKeydown:
|
|
282
|
+
class: u(["ml-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 && !o.value }]),
|
|
283
|
+
onClick: H,
|
|
284
|
+
onKeydown: re(se(H, ["prevent"]), ["enter", "space"])
|
|
281
285
|
}, [
|
|
282
|
-
|
|
286
|
+
C(k, {
|
|
283
287
|
icon: "lucide:chevron-down",
|
|
284
|
-
class: u(["h-3 w-3 transition-transform duration-200", { "rotate-180":
|
|
288
|
+
class: u(["h-3 w-3 transition-transform duration-200", { "rotate-180": N.value && !o.value }])
|
|
285
289
|
}, null, 8, ["class"])
|
|
286
|
-
], 42,
|
|
290
|
+
], 42, ge)) : m("", !0),
|
|
291
|
+
Q.value ? (r(), v("div", {
|
|
292
|
+
key: 1,
|
|
293
|
+
class: u(["ml-1.5 flex shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": a(e).compact && !o.value }])
|
|
294
|
+
}, [
|
|
295
|
+
C(k, {
|
|
296
|
+
icon: "lucide:chevron-right",
|
|
297
|
+
class: "h-3.5 w-3.5 opacity-50 transition-opacity group-hover:opacity-80"
|
|
298
|
+
})
|
|
299
|
+
], 2)) : m("", !0)
|
|
287
300
|
]),
|
|
288
301
|
_: 1
|
|
289
302
|
}, 16, ["class", "style", "aria-expanded", "aria-current"]))
|
|
290
303
|
]),
|
|
291
304
|
_: 1
|
|
292
305
|
}, 8, ["content", "placement", "disabled"]),
|
|
293
|
-
|
|
306
|
+
C(ce, {
|
|
294
307
|
name: "sidebar-slide",
|
|
295
|
-
onBeforeEnter:
|
|
296
|
-
onEnter:
|
|
297
|
-
onAfterEnter:
|
|
298
|
-
onBeforeLeave:
|
|
299
|
-
onLeave:
|
|
308
|
+
onBeforeEnter: Y,
|
|
309
|
+
onEnter: Z,
|
|
310
|
+
onAfterEnter: ee,
|
|
311
|
+
onBeforeLeave: te,
|
|
312
|
+
onLeave: ne
|
|
300
313
|
}, {
|
|
301
314
|
default: y(() => [
|
|
302
|
-
|
|
303
|
-
|
|
315
|
+
d.value && N.value && !o.value ? (r(), v("div", ye, [
|
|
316
|
+
a(e).variant === "default" ? (r(), v("div", {
|
|
304
317
|
key: 0,
|
|
305
318
|
class: "absolute top-0 bottom-2 w-px bg-border",
|
|
306
319
|
style: E({
|
|
307
|
-
left: `${(
|
|
320
|
+
left: `${(c.depth + 1) * j.value - j.value / 2}px`
|
|
308
321
|
})
|
|
309
322
|
}, null, 4)) : m("", !0),
|
|
310
|
-
|
|
311
|
-
(r(!0),
|
|
323
|
+
p("div", we, [
|
|
324
|
+
(r(!0), v(F, null, ue(c.item.children, (l) => (r(), g(f, {
|
|
312
325
|
key: l.id || l.label,
|
|
313
326
|
item: l,
|
|
314
|
-
depth:
|
|
327
|
+
depth: c.depth + 1
|
|
315
328
|
}, null, 8, ["item", "depth"]))), 128))
|
|
316
329
|
])
|
|
317
330
|
])) : m("", !0)
|
|
@@ -324,5 +337,5 @@ const me = {
|
|
|
324
337
|
}
|
|
325
338
|
});
|
|
326
339
|
export {
|
|
327
|
-
|
|
340
|
+
je as default
|
|
328
341
|
};
|
|
@@ -12,7 +12,7 @@ export interface SidebarMenuItemSchema {
|
|
|
12
12
|
badge?: string | number;
|
|
13
13
|
badgeClass?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
-
renderMode?: 'tree' | 'popover';
|
|
15
|
+
renderMode?: 'tree' | 'popover' | 'drilldown';
|
|
16
16
|
action?: (item: SidebarMenuItemSchema) => void;
|
|
17
17
|
class?: string;
|
|
18
18
|
}
|
|
@@ -24,7 +24,7 @@ export interface SidebarMenuProps {
|
|
|
24
24
|
defaultExpanded?: string[];
|
|
25
25
|
compact?: boolean;
|
|
26
26
|
showCompactLabels?: boolean;
|
|
27
|
-
renderMode?: 'tree' | 'popover';
|
|
27
|
+
renderMode?: 'tree' | 'popover' | 'drilldown';
|
|
28
28
|
iconSize?: string;
|
|
29
29
|
compactIconSize?: string;
|
|
30
30
|
labelClass?: string;
|
|
@@ -51,7 +51,7 @@ export interface SidebarMenuContext {
|
|
|
51
51
|
setActive: (id: string | null) => void;
|
|
52
52
|
indentSize: number;
|
|
53
53
|
variant: 'default' | 'ghost';
|
|
54
|
-
renderMode: 'tree' | 'popover';
|
|
54
|
+
renderMode: 'tree' | 'popover' | 'drilldown';
|
|
55
55
|
renderNestedTabs: boolean;
|
|
56
56
|
compact: boolean;
|
|
57
57
|
showCompactLabels: boolean;
|
|
@@ -65,4 +65,13 @@ export interface SidebarMenuContext {
|
|
|
65
65
|
nestedMenuMaxHeight: string;
|
|
66
66
|
currentOrientation: 'vertical' | 'horizontal';
|
|
67
67
|
showTooltip: boolean;
|
|
68
|
+
drilldownStack: {
|
|
69
|
+
items: SidebarMenuItemSchema[];
|
|
70
|
+
label: string;
|
|
71
|
+
icon?: string;
|
|
72
|
+
}[];
|
|
73
|
+
drillInto: (item: SidebarMenuItemSchema) => void;
|
|
74
|
+
drillBack: () => void;
|
|
75
|
+
drilldownItems: SidebarMenuItemSchema[];
|
|
76
|
+
isDrilldown: boolean;
|
|
68
77
|
}
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
layout?: 'horizontal' | 'vertical';
|
|
3
|
+
modelValue?: number;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
6
|
class?: string;
|
|
7
|
-
searchClass?: string;
|
|
8
7
|
}
|
|
9
8
|
declare function __VLS_template(): {
|
|
10
9
|
attrs: Partial<{}>;
|
|
11
10
|
slots: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
start?(_: {}): any;
|
|
12
|
+
end?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {
|
|
15
|
+
containerRef: HTMLDivElement;
|
|
15
16
|
};
|
|
16
|
-
refs: {};
|
|
17
17
|
rootEl: HTMLDivElement;
|
|
18
18
|
};
|
|
19
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
20
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
21
|
-
"update:modelValue": (
|
|
21
|
+
"update:modelValue": (val: number) => any;
|
|
22
22
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
23
|
-
"onUpdate:modelValue"?: (
|
|
23
|
+
"onUpdate:modelValue"?: (val: number) => any;
|
|
24
24
|
}>, {
|
|
25
25
|
class: string;
|
|
26
|
-
modelValue:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
modelValue: number;
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
layout: "horizontal" | "vertical";
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
31
|
+
containerRef: HTMLDivElement;
|
|
32
|
+
}, HTMLDivElement>;
|
|
30
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
34
|
export default _default;
|
|
32
35
|
type __VLS_WithTemplateSlots<T, S> = T & {
|