vlite3 1.2.4 → 1.2.7
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 +22 -8
- package/components/AvatarGroup/AvatarGroup.vue.js +10 -9
- package/components/Beacon.vue.d.ts +13 -0
- package/components/Button.vue.js +18 -18
- package/components/Chart/GanttChart.vue.d.ts +67 -0
- package/components/Chart/GanttChart.vue.js +7 -0
- package/components/Chart/GanttChart.vue2.js +911 -0
- package/components/Chart/SpeedometerChart.vue.d.ts +54 -0
- package/components/Chart/SpeedometerChart.vue.js +558 -0
- package/components/Chart/SpeedometerChart.vue2.js +4 -0
- package/components/Chart/index.d.ts +3 -1
- package/components/Chart/types.d.ts +106 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +46 -1
- package/components/ChoiceBox/ChoiceBox.vue.js +274 -91
- package/components/ChoiceBox/index.d.ts +1 -1
- package/components/{CopyButton.vue.d.ts → Clipboard.vue.d.ts} +4 -3
- package/components/{CopyButton.vue.js → Clipboard.vue.js} +19 -19
- package/components/Clipboard.vue2.js +4 -0
- package/components/ColorPicker/ColorPicker.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/DataTable/DataTableHeader.vue.js +33 -30
- package/components/DataTable/types.d.ts +1 -1
- package/components/ImageComparison/ImageComparison.vue.d.ts +29 -0
- package/components/ImageComparison/ImageComparison.vue.js +126 -0
- package/components/ImageComparison/ImageComparison.vue2.js +4 -0
- package/components/ImageComparison/index.d.ts +1 -0
- package/components/ImportData/ImportData.vue.js +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +92 -86
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/OTPInput/OTPInput.vue.d.ts +18 -0
- package/components/OTPInput/OTPInput.vue.js +127 -82
- package/components/Persona.vue.d.ts +25 -0
- package/components/PricingPlan/PricingPlanItem.vue.js +19 -19
- package/components/Radio.vue.d.ts +41 -0
- package/components/Radio.vue.js +97 -0
- package/components/Radio.vue2.js +4 -0
- package/components/RadioGroup.vue.d.ts +38 -0
- package/components/RadioGroup.vue.js +37 -0
- package/components/RadioGroup.vue2.js +4 -0
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +45 -57
- package/components/SidebarMenu/SidebarMenuItem.vue.js +70 -74
- package/components/Slider.vue.d.ts +7 -0
- package/components/Slider.vue.js +194 -120
- package/components/ThemeToggle.vue.js +10 -10
- package/components/Timeline/Timeline.vue.d.ts +1 -1
- package/components/index.d.ts +3 -1
- package/index.d.ts +4 -1
- package/index.js +148 -138
- package/package.json +1 -1
- package/style.css +58 -40
- package/types/form.type.d.ts +23 -0
- package/components/CopyButton.vue2.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-99967d3b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, ref as N, inject as P, computed as f, markRaw as D, watch as h, onMounted as L, onUnmounted as V, openBlock as l, createElementBlock as i, Fragment as j, createElementVNode as y, mergeProps as w, withModifiers as K, renderSlot as c, createCommentVNode as a, createBlock as g, Teleport as M, normalizeClass as m, createVNode as F, Transition as R, withCtx as U, toDisplayString as $, resolveDynamicComponent as q } from "vue";
|
|
2
2
|
import G from "./Button.vue.js";
|
|
3
3
|
import { useKeyStroke as H } from "../composables/useKeyStroke.js";
|
|
4
|
-
import { $t as
|
|
4
|
+
import { $t as k } from "../utils/i18n.js";
|
|
5
5
|
const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold text-foreground" }, X = {
|
|
6
6
|
key: 0,
|
|
7
|
-
class: "
|
|
8
|
-
}, te = /* @__PURE__ */
|
|
7
|
+
class: "-text-fs-2 text-muted-foreground"
|
|
8
|
+
}, te = /* @__PURE__ */ E({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "SidePanel",
|
|
11
11
|
props: {
|
|
@@ -29,91 +29,79 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
29
29
|
bodyProps: {}
|
|
30
30
|
},
|
|
31
31
|
emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
|
|
32
|
-
setup(o, { emit:
|
|
33
|
-
const t = o, v =
|
|
32
|
+
setup(o, { emit: x }) {
|
|
33
|
+
const t = o, v = x, s = N(t.show);
|
|
34
34
|
let u = null;
|
|
35
|
-
const
|
|
35
|
+
const r = P("dropdown-context", null), b = f(() => t.body ? D(t.body) : void 0);
|
|
36
36
|
h(
|
|
37
37
|
() => t.show,
|
|
38
38
|
(e) => {
|
|
39
|
-
s.value = e, e && (v("onOpen"),
|
|
39
|
+
s.value = e, e && (v("onOpen"), r?.close());
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
const
|
|
43
|
-
s.value = !0,
|
|
42
|
+
const B = () => {
|
|
43
|
+
s.value = !0, r?.close();
|
|
44
44
|
}, n = () => {
|
|
45
45
|
s.value = !1, v("update:show", !1), v("close");
|
|
46
|
-
},
|
|
46
|
+
}, T = () => {
|
|
47
47
|
t.closeOutside && n();
|
|
48
|
-
}, { onKeyStroke:
|
|
49
|
-
|
|
50
|
-
u && clearTimeout(u), e ? (
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
}),
|
|
54
|
-
s.value &&
|
|
55
|
-
}),
|
|
56
|
-
u && clearTimeout(u), s.value &&
|
|
48
|
+
}, { onKeyStroke: z } = H();
|
|
49
|
+
z("Escape", n), h(s, (e) => {
|
|
50
|
+
u && clearTimeout(u), e ? (r?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
|
|
51
|
+
r?.onChildToggle?.(!1);
|
|
52
|
+
}, 150));
|
|
53
|
+
}), L(() => {
|
|
54
|
+
s.value && r?.onChildToggle?.(!0);
|
|
55
|
+
}), V(() => {
|
|
56
|
+
u && clearTimeout(u), s.value && r?.onChildToggle?.(!1), document.body.style.overflow = "";
|
|
57
57
|
});
|
|
58
|
-
const
|
|
58
|
+
const A = {
|
|
59
59
|
sm: "max-w-sm",
|
|
60
60
|
md: "max-w-md",
|
|
61
61
|
lg: "max-w-lg",
|
|
62
62
|
xl: "max-w-xl",
|
|
63
63
|
full: "max-w-full"
|
|
64
|
-
},
|
|
65
|
-
() => t.descriptionI18n ?
|
|
64
|
+
}, O = f(() => t.position === "left" ? "left-0 rounded-r-lg" : "right-0 rounded-l-md"), S = f(() => t.position === "left" ? "slide-left" : "slide-right"), d = f(() => t.titleI18n ? k(t.titleI18n) : t.title), C = f(
|
|
65
|
+
() => t.descriptionI18n ? k(t.descriptionI18n) : t.description
|
|
66
66
|
);
|
|
67
|
-
return (e, p) => (l(),
|
|
67
|
+
return (e, p) => (l(), i(j, null, [
|
|
68
68
|
y("span", w({
|
|
69
|
-
onClick:
|
|
69
|
+
onClick: K(B, ["stop"]),
|
|
70
70
|
class: `${o.triggerClass}`
|
|
71
71
|
}, e.$attrs, {
|
|
72
|
-
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` :
|
|
72
|
+
"data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : d.value ? `sidepanel-trigger-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel-trigger"
|
|
73
73
|
}), [
|
|
74
74
|
c(e.$slots, "trigger", {}, () => [
|
|
75
75
|
o.body ? c(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
|
|
76
76
|
], !0)
|
|
77
77
|
], 16, J),
|
|
78
|
-
(l(), g(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
(l(), g(M, { to: "body" }, [
|
|
79
|
+
s.value ? (l(), i("div", {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: m(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
|
|
82
|
+
onClick: T
|
|
83
|
+
}, null, 2)) : a("", !0),
|
|
84
|
+
F(R, {
|
|
85
|
+
name: S.value,
|
|
86
|
+
onAfterEnter: p[0] || (p[0] = (I) => e.$emit("onAfterOpen")),
|
|
87
|
+
onAfterLeave: p[1] || (p[1] = (I) => e.$emit("onAfterClose"))
|
|
86
88
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
s.value ? (l(),
|
|
89
|
-
key: 0,
|
|
90
|
-
class: m(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
|
|
91
|
-
onClick: O
|
|
92
|
-
}, null, 2)) : a("", !0)
|
|
93
|
-
]),
|
|
94
|
-
_: 1
|
|
95
|
-
}),
|
|
96
|
-
$(k, {
|
|
97
|
-
name: N.value,
|
|
98
|
-
onAfterEnter: p[0] || (p[0] = (P) => e.$emit("onAfterOpen")),
|
|
99
|
-
onAfterLeave: p[1] || (p[1] = (P) => e.$emit("onAfterClose"))
|
|
100
|
-
}, {
|
|
101
|
-
default: x(() => [
|
|
102
|
-
s.value ? (l(), d("div", {
|
|
89
|
+
default: U(() => [
|
|
90
|
+
s.value ? (l(), i("div", {
|
|
103
91
|
key: 0,
|
|
104
92
|
role: "dialog",
|
|
105
93
|
"aria-modal": "true",
|
|
106
|
-
class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border
|
|
107
|
-
"data-testid": e.$attrs["data-testid"] || (
|
|
94
|
+
class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border border-border/80 w-full", [A[o.size], O.value, t.class]]),
|
|
95
|
+
"data-testid": e.$attrs["data-testid"] || (d.value ? `sidepanel-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
|
|
108
96
|
}, [
|
|
109
|
-
|
|
97
|
+
d.value || e.$slots.header ? (l(), i("div", {
|
|
110
98
|
key: 0,
|
|
111
99
|
class: m([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
|
|
112
100
|
}, [
|
|
113
101
|
c(e.$slots, "header", {}, () => [
|
|
114
102
|
y("div", null, [
|
|
115
|
-
y("h3", W,
|
|
116
|
-
|
|
103
|
+
y("h3", W, $(d.value), 1),
|
|
104
|
+
C.value ? (l(), i("p", X, $(C.value), 1)) : a("", !0)
|
|
117
105
|
])
|
|
118
106
|
], !0),
|
|
119
107
|
o.hideCloseButton ? a("", !0) : (l(), g(G, {
|
|
@@ -130,12 +118,12 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
|
|
|
130
118
|
y("div", {
|
|
131
119
|
class: m(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
|
|
132
120
|
}, [
|
|
133
|
-
|
|
121
|
+
b.value ? (l(), g(q(b.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : c(e.$slots, "default", {
|
|
134
122
|
key: 1,
|
|
135
123
|
close: n
|
|
136
124
|
}, void 0, !0)
|
|
137
125
|
], 2),
|
|
138
|
-
e.$slots.footer ? (l(),
|
|
126
|
+
e.$slots.footer ? (l(), i("div", {
|
|
139
127
|
key: 1,
|
|
140
128
|
class: m(["flex-none px-6 py-3 border-t border-border", o.footerClass])
|
|
141
129
|
}, [
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as re, inject as ce, ref as se, computed as l, onMounted as ue, nextTick as de,
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as re, inject as ce, ref as se, computed as l, onMounted as ue, nextTick as de, resolveComponent as me, openBlock as c, createElementBlock as v, normalizeClass as d, unref as o, createBlock as g, withCtx as x, createElementVNode as b, normalizeStyle as T, createCommentVNode as p, toDisplayString as w, createVNode as C, resolveDynamicComponent as F, mergeProps as q, createTextVNode as fe, Fragment as G, withKeys as pe, withModifiers as ve, Transition as he, renderList as be } from "vue";
|
|
2
|
+
import { useRouter as ye, useRoute as ge } from "vue-router";
|
|
3
3
|
import k from "../Icon.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { $t as
|
|
4
|
+
import J from "../Tooltip.vue.js";
|
|
5
|
+
import xe from "../Dropdown/Dropdown.vue.js";
|
|
6
|
+
import { $t as Q } from "../../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
const
|
|
9
|
+
const we = {
|
|
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
|
+
}, ke = { class: "w-full" }, Ce = { class: "flex items-center w-full gap-2 text-sm" }, Ie = { class: "truncate flex-1 font-medium" }, Se = ["onKeydown"], ze = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "sidebar-children-container overflow-hidden transition-all duration-300 ease-in-out relative"
|
|
15
|
-
},
|
|
15
|
+
}, $e = { class: "pt-1 space-y-0.5" }, Ae = /* @__PURE__ */ re({
|
|
16
16
|
__name: "SidebarMenuItem",
|
|
17
17
|
props: {
|
|
18
18
|
item: {},
|
|
@@ -21,12 +21,12 @@ const ke = {
|
|
|
21
21
|
itemClass: {}
|
|
22
22
|
},
|
|
23
23
|
setup(u) {
|
|
24
|
-
const t = u, e = ce("sidebar-menu-ctx"), I =
|
|
24
|
+
const t = u, e = ce("sidebar-menu-ctx"), I = ye(), U = ge();
|
|
25
25
|
if (!e)
|
|
26
26
|
throw new Error("SidebarMenuItem must be used within a SidebarMenu");
|
|
27
27
|
const E = se(null), a = l(
|
|
28
28
|
() => e.currentOrientation === "horizontal" && t.depth === 0
|
|
29
|
-
), f = l(() => !!t.item.children?.length),
|
|
29
|
+
), f = l(() => !!t.item.children?.length), j = l(() => a.value && f.value || e.compact && f.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), S = l(() => e.renderNestedTabs && t.depth === 0 ? !1 : j.value === "drilldown" && f.value), $ = l(() => e.renderNestedTabs && t.depth === 0 || S.value ? !1 : j.value === "popover" && f.value), y = l(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), L = l(() => $.value || S.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(y.value)), _ = l(() => !(!f.value || S.value || e.renderNestedTabs && t.depth === 0)), X = l(() => S.value && f.value), P = (i, n, s) => {
|
|
30
30
|
const r = i.id || (typeof i.to == "string" ? i.to : null) || i.label;
|
|
31
31
|
if (n && r === n) return !0;
|
|
32
32
|
if (i.to) {
|
|
@@ -34,28 +34,24 @@ const ke = {
|
|
|
34
34
|
if (m) {
|
|
35
35
|
if (s === m) return !0;
|
|
36
36
|
if (m !== "/" && m.length > 1 && s.startsWith(m)) {
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
37
|
+
const N = s[m.length];
|
|
38
|
+
if (!N || N === "/" || N === "?") return !0;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
return i.children?.length ? i.children.some((m) =>
|
|
43
|
-
},
|
|
44
|
-
const i =
|
|
45
|
-
return f.value ?
|
|
46
|
-
}),
|
|
47
|
-
|
|
42
|
+
return i.children?.length ? i.children.some((m) => P(m, n, s)) : !1;
|
|
43
|
+
}, M = l(() => {
|
|
44
|
+
const i = U?.path || "", n = e.activeItem;
|
|
45
|
+
return f.value ? P(t.item, n, i) : n === y.value;
|
|
46
|
+
}), A = l(() => e.activeItem === y.value), Y = (i = !0) => {
|
|
47
|
+
A.value && E.value && E.value.scrollIntoView({ behavior: i ? "smooth" : "auto", block: "center" });
|
|
48
48
|
};
|
|
49
49
|
ue(() => {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
A.value && de(() => {
|
|
51
|
+
Y(!1);
|
|
52
52
|
});
|
|
53
|
-
}), me(N, (i) => {
|
|
54
|
-
i && setTimeout(() => {
|
|
55
|
-
D(!0);
|
|
56
|
-
}, 250);
|
|
57
53
|
});
|
|
58
|
-
const
|
|
54
|
+
const D = (i) => {
|
|
59
55
|
if (!t.item.disabled) {
|
|
60
56
|
if (S.value) {
|
|
61
57
|
t.item.action && t.item.action(t.item), e.drillInto(t.item);
|
|
@@ -77,7 +73,7 @@ const ke = {
|
|
|
77
73
|
}
|
|
78
74
|
f.value && !t.item.to && !t.item.href && ($.value || e.toggleExpand(y.value)), t.item.action && t.item.action(t.item), (!f.value || t.item.to) && e.setActive(y.value);
|
|
79
75
|
}
|
|
80
|
-
},
|
|
76
|
+
}, H = (i) => {
|
|
81
77
|
if (i.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
|
|
82
78
|
if (t.item.action && t.item.action(t.item), t.item.to)
|
|
83
79
|
I.push(t.item.to).catch(() => {
|
|
@@ -93,38 +89,38 @@ const ke = {
|
|
|
93
89
|
return;
|
|
94
90
|
}
|
|
95
91
|
$.value || e.toggleExpand(y.value);
|
|
96
|
-
},
|
|
92
|
+
}, B = l(() => e.indentSize || 12), Z = l(() => {
|
|
97
93
|
const n = 8 + parseInt(e.iconSize || "16", 10) / 2;
|
|
98
|
-
return `${t.depth *
|
|
99
|
-
}),
|
|
94
|
+
return `${t.depth * B.value + n}px`;
|
|
95
|
+
}), R = l(() => {
|
|
100
96
|
if (a.value) return {};
|
|
101
97
|
if (e.compact)
|
|
102
98
|
return { width: "100%" };
|
|
103
99
|
if (t.depth > 0) {
|
|
104
|
-
const n = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (t.depth - 1) *
|
|
100
|
+
const n = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (t.depth - 1) * B.value + n + 8;
|
|
105
101
|
return {
|
|
106
102
|
marginLeft: `${s}px`,
|
|
107
103
|
width: `calc(100% - ${s}px)`
|
|
108
104
|
};
|
|
109
105
|
}
|
|
110
106
|
return {};
|
|
111
|
-
}),
|
|
107
|
+
}), V = l(() => {
|
|
112
108
|
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 ${a.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`;
|
|
113
109
|
let s = e.compact ? e.compactItemPadding : e.itemPadding;
|
|
114
110
|
!e.compact && t.depth > 0 && (s = s.replace(/py-[\d\.]+/, "py-1.5"));
|
|
115
111
|
const r = e.compact ? `justify-center ${s}` : `justify-between ${s}`;
|
|
116
112
|
let m = "";
|
|
117
|
-
return
|
|
113
|
+
return M.value ? m = "bg-primary-light text-primary-fg-light" : m = "text-muted hover:bg-accent/80 hover:text-foreground", t.item.disabled && (m = "opacity-50 cursor-not-allowed pointer-events-none"), `${n} ${r} ${m} ${t.item.class || ""}`;
|
|
118
114
|
}), h = l(() => e.compact && e.showCompactLabels), z = l(
|
|
119
|
-
() => t.item.labelI18n ?
|
|
120
|
-
),
|
|
121
|
-
label: i.labelI18n ?
|
|
115
|
+
() => t.item.labelI18n ? Q(t.item.labelI18n) : t.item.label
|
|
116
|
+
), K = (i) => ({
|
|
117
|
+
label: i.labelI18n ? Q(i.labelI18n) : i.label,
|
|
122
118
|
value: i.id || i.label,
|
|
123
119
|
icon: i.icon,
|
|
124
120
|
disabled: i.disabled,
|
|
125
|
-
children: i.children ? i.children.map(
|
|
121
|
+
children: i.children ? i.children.map(K) : void 0,
|
|
126
122
|
data: i
|
|
127
|
-
}), ee = l(() => t.item.children ? t.item.children.map(
|
|
123
|
+
}), ee = l(() => t.item.children ? t.item.children.map(K) : []), te = (i) => {
|
|
128
124
|
const n = i.data;
|
|
129
125
|
if (n) {
|
|
130
126
|
n.action && n.action(n);
|
|
@@ -147,13 +143,13 @@ const ke = {
|
|
|
147
143
|
}, le = (i) => {
|
|
148
144
|
const n = i;
|
|
149
145
|
n.style.height = "0", n.style.opacity = "0";
|
|
150
|
-
},
|
|
146
|
+
}, O = l(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), W = l(() => t.item.to ? { to: t.item.to } : t.item.href ? {
|
|
151
147
|
href: t.item.href,
|
|
152
148
|
target: "_blank",
|
|
153
149
|
rel: "noopener noreferrer"
|
|
154
150
|
} : { type: "button" });
|
|
155
151
|
return (i, n) => {
|
|
156
|
-
const s =
|
|
152
|
+
const s = me("SidebarMenuItem", !0);
|
|
157
153
|
return c(), v("div", {
|
|
158
154
|
ref_key: "itemRef",
|
|
159
155
|
ref: E,
|
|
@@ -163,7 +159,7 @@ const ke = {
|
|
|
163
159
|
o(e).compact && "mb-px"
|
|
164
160
|
])
|
|
165
161
|
}, [
|
|
166
|
-
$.value ? (c(), g(o(
|
|
162
|
+
$.value ? (c(), g(o(xe), {
|
|
167
163
|
key: 0,
|
|
168
164
|
position: a.value ? "bottom-start" : "right-start",
|
|
169
165
|
offset: u.menuOffset,
|
|
@@ -175,17 +171,17 @@ const ke = {
|
|
|
175
171
|
onOnSelect: te
|
|
176
172
|
}, {
|
|
177
173
|
header: x(() => [
|
|
178
|
-
o(e).compact && !a.value ? (c(), v("div",
|
|
174
|
+
o(e).compact && !a.value ? (c(), v("div", we, [
|
|
179
175
|
u.item.icon ? (c(), g(k, {
|
|
180
176
|
key: 0,
|
|
181
177
|
icon: u.item.icon,
|
|
182
178
|
class: "shrink-0 transition-colors opacity-90 group-hover:opacity-100"
|
|
183
179
|
}, null, 8, ["icon"])) : p("", !0),
|
|
184
|
-
|
|
180
|
+
fe(" " + w(z.value), 1)
|
|
185
181
|
])) : p("", !0)
|
|
186
182
|
]),
|
|
187
183
|
trigger: x(({ isOpen: r }) => [
|
|
188
|
-
C(
|
|
184
|
+
C(J, {
|
|
189
185
|
content: z.value,
|
|
190
186
|
placement: a.value ? "bottom" : "right",
|
|
191
187
|
className: "sidebar-menu-tooltip",
|
|
@@ -193,13 +189,13 @@ const ke = {
|
|
|
193
189
|
class: "w-full block"
|
|
194
190
|
}, {
|
|
195
191
|
default: x(() => [
|
|
196
|
-
b("div",
|
|
197
|
-
(c(), g(
|
|
198
|
-
class: [
|
|
199
|
-
style:
|
|
192
|
+
b("div", ke, [
|
|
193
|
+
(c(), g(F(O.value), q(W.value, {
|
|
194
|
+
class: [V.value, r ? "bg-muted text-foreground" : ""],
|
|
195
|
+
style: R.value,
|
|
200
196
|
"aria-haspopup": !0,
|
|
201
197
|
"aria-expanded": r,
|
|
202
|
-
onClick:
|
|
198
|
+
onClick: D
|
|
203
199
|
}), {
|
|
204
200
|
default: x(() => [
|
|
205
201
|
b("div", {
|
|
@@ -210,8 +206,8 @@ const ke = {
|
|
|
210
206
|
u.item.icon ? (c(), g(k, {
|
|
211
207
|
key: 0,
|
|
212
208
|
icon: u.item.icon,
|
|
213
|
-
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [
|
|
214
|
-
style:
|
|
209
|
+
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [M.value || r ? "opacity-100" : ""]]),
|
|
210
|
+
style: T({
|
|
215
211
|
width: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize,
|
|
216
212
|
height: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize
|
|
217
213
|
})
|
|
@@ -249,14 +245,14 @@ const ke = {
|
|
|
249
245
|
}, 1032, ["content", "placement", "disabled"])
|
|
250
246
|
]),
|
|
251
247
|
item: x(({ option: r }) => [
|
|
252
|
-
b("div",
|
|
248
|
+
b("div", Ce, [
|
|
253
249
|
r.icon ? (c(), g(k, {
|
|
254
250
|
key: 0,
|
|
255
251
|
icon: r.icon,
|
|
256
252
|
class: "shrink-0 opacity-90",
|
|
257
|
-
style:
|
|
253
|
+
style: T({ width: o(e).iconSize, height: o(e).iconSize })
|
|
258
254
|
}, null, 8, ["icon", "style"])) : p("", !0),
|
|
259
|
-
b("span",
|
|
255
|
+
b("span", Ie, w(r.label), 1),
|
|
260
256
|
r.data?.badge ? (c(), v("span", {
|
|
261
257
|
key: 1,
|
|
262
258
|
class: d(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", r.data?.badgeClass || "bg-muted text-muted-foreground"])
|
|
@@ -264,20 +260,20 @@ const ke = {
|
|
|
264
260
|
])
|
|
265
261
|
]),
|
|
266
262
|
_: 1
|
|
267
|
-
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(
|
|
268
|
-
C(
|
|
263
|
+
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(G, { key: 1 }, [
|
|
264
|
+
C(J, {
|
|
269
265
|
content: z.value,
|
|
270
266
|
placement: a.value ? "bottom" : "right",
|
|
271
267
|
disabled: !o(e).showTooltip || !o(e).compact && !a.value,
|
|
272
268
|
class: "w-full block"
|
|
273
269
|
}, {
|
|
274
270
|
default: x(() => [
|
|
275
|
-
(c(), g(
|
|
276
|
-
class:
|
|
277
|
-
style:
|
|
278
|
-
"aria-expanded":
|
|
279
|
-
"aria-current":
|
|
280
|
-
onClick:
|
|
271
|
+
(c(), g(F(O.value), q(W.value, {
|
|
272
|
+
class: V.value,
|
|
273
|
+
style: R.value,
|
|
274
|
+
"aria-expanded": _.value ? L.value : void 0,
|
|
275
|
+
"aria-current": M.value ? "page" : void 0,
|
|
276
|
+
onClick: D
|
|
281
277
|
}), {
|
|
282
278
|
default: x(() => [
|
|
283
279
|
b("div", {
|
|
@@ -288,8 +284,8 @@ const ke = {
|
|
|
288
284
|
u.item.icon ? (c(), g(k, {
|
|
289
285
|
key: 0,
|
|
290
286
|
icon: u.item.icon,
|
|
291
|
-
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [
|
|
292
|
-
style:
|
|
287
|
+
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [M.value ? "opacity-100" : ""]]),
|
|
288
|
+
style: T({
|
|
293
289
|
width: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize,
|
|
294
290
|
height: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize
|
|
295
291
|
})
|
|
@@ -310,20 +306,20 @@ const ke = {
|
|
|
310
306
|
]])
|
|
311
307
|
}, w(u.item.badge), 3)) : p("", !0)
|
|
312
308
|
], 2),
|
|
313
|
-
|
|
309
|
+
_.value ? (c(), v("div", {
|
|
314
310
|
key: 0,
|
|
315
311
|
role: "button",
|
|
316
312
|
tabindex: "0",
|
|
317
313
|
class: d(["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": o(e).compact && !a.value }]),
|
|
318
|
-
onClick:
|
|
319
|
-
onKeydown: ve(
|
|
314
|
+
onClick: H,
|
|
315
|
+
onKeydown: pe(ve(H, ["prevent"]), ["enter", "space"])
|
|
320
316
|
}, [
|
|
321
317
|
C(k, {
|
|
322
318
|
icon: "lucide:chevron-down",
|
|
323
319
|
class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180": L.value && !a.value }])
|
|
324
320
|
}, null, 8, ["class"])
|
|
325
|
-
], 42,
|
|
326
|
-
|
|
321
|
+
], 42, Se)) : p("", !0),
|
|
322
|
+
X.value ? (c(), v("div", {
|
|
327
323
|
key: 1,
|
|
328
324
|
class: d(["ml-1.5 flex shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": o(e).compact && !a.value }])
|
|
329
325
|
}, [
|
|
@@ -338,7 +334,7 @@ const ke = {
|
|
|
338
334
|
]),
|
|
339
335
|
_: 1
|
|
340
336
|
}, 8, ["content", "placement", "disabled"]),
|
|
341
|
-
C(
|
|
337
|
+
C(he, {
|
|
342
338
|
name: "sidebar-slide",
|
|
343
339
|
onBeforeEnter: ne,
|
|
344
340
|
onEnter: ie,
|
|
@@ -347,11 +343,11 @@ const ke = {
|
|
|
347
343
|
onLeave: le
|
|
348
344
|
}, {
|
|
349
345
|
default: x(() => [
|
|
350
|
-
f.value && L.value && !a.value ? (c(), v("div",
|
|
346
|
+
f.value && L.value && !a.value ? (c(), v("div", ze, [
|
|
351
347
|
o(e).variant === "default" ? (c(), v("div", {
|
|
352
348
|
key: 0,
|
|
353
349
|
class: "sidebar-tree-line absolute rounded-full z-[1]",
|
|
354
|
-
style:
|
|
350
|
+
style: T({
|
|
355
351
|
left: Z.value,
|
|
356
352
|
top: "4px",
|
|
357
353
|
bottom: "10px",
|
|
@@ -359,8 +355,8 @@ const ke = {
|
|
|
359
355
|
backgroundColor: "var(--color-border)"
|
|
360
356
|
})
|
|
361
357
|
}, null, 4)) : p("", !0),
|
|
362
|
-
b("div",
|
|
363
|
-
(c(!0), v(
|
|
358
|
+
b("div", $e, [
|
|
359
|
+
(c(!0), v(G, null, be(u.item.children, (r) => (c(), g(s, {
|
|
364
360
|
key: r.id || r.label,
|
|
365
361
|
item: r,
|
|
366
362
|
depth: u.depth + 1
|
|
@@ -376,5 +372,5 @@ const ke = {
|
|
|
376
372
|
}
|
|
377
373
|
});
|
|
378
374
|
export {
|
|
379
|
-
|
|
375
|
+
Ae as default
|
|
380
376
|
};
|
|
@@ -9,8 +9,12 @@ type __VLS_Props = {
|
|
|
9
9
|
showValue?: boolean;
|
|
10
10
|
modelValue?: number;
|
|
11
11
|
labelClass?: string;
|
|
12
|
+
valueClass?: string;
|
|
12
13
|
centerOrigin?: boolean;
|
|
13
14
|
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
15
|
+
orientation?: 'horizontal' | 'vertical';
|
|
16
|
+
variant?: 'one' | 'two';
|
|
17
|
+
thumbVariant?: 'default' | 'solid';
|
|
14
18
|
};
|
|
15
19
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
20
|
change: (value: number) => any;
|
|
@@ -21,12 +25,15 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
21
25
|
"onUpdate:modelValue"?: (value: number) => any;
|
|
22
26
|
onIconClick?: () => any;
|
|
23
27
|
}>, {
|
|
28
|
+
variant: "one" | "two";
|
|
24
29
|
size: "xs" | "sm" | "md" | "lg";
|
|
30
|
+
orientation: "horizontal" | "vertical";
|
|
25
31
|
modelValue: number;
|
|
26
32
|
min: number;
|
|
27
33
|
max: number;
|
|
28
34
|
step: number;
|
|
29
35
|
showValue: boolean;
|
|
30
36
|
centerOrigin: boolean;
|
|
37
|
+
thumbVariant: "default" | "solid";
|
|
31
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
32
39
|
export default _default;
|