vlite3 0.6.7 → 0.6.9
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/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/dayjs.min.js +7 -0
- package/_virtual/dayjs.min2.js +4 -0
- package/components/Barcode/Barcode.vue.d.ts +1 -1
- package/components/Breadcrumb/BreadcrumbItem.vue.js +2 -2
- package/components/ConfirmationModal.vue.js +30 -25
- package/components/DataTable/DataTableRow.vue.js +70 -64
- package/components/Date/Date.vue.d.ts +8 -0
- package/components/Date/Date.vue.js +21 -0
- package/components/Date/Date.vue2.js +4 -0
- package/components/Date/index.d.ts +1 -0
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +39 -36
- package/components/List/ListFieldRow.vue.js +150 -107
- package/components/Modal.vue.js +2 -2
- package/components/Modal.vue2.js +43 -42
- package/components/Navbar/Navbar.vue.d.ts +33 -19
- package/components/Navbar/Navbar.vue.js +295 -185
- package/components/Navbar/NavbarTabs.vue.js +1 -1
- package/components/PermissionMatrix/PermissionEditor.vue.js +37 -37
- package/components/PermissionMatrix/PermissionEditorList.vue.js +5 -154
- package/components/PermissionMatrix/PermissionEditorList.vue2.js +160 -2
- package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +5 -205
- package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +204 -2
- package/components/PermissionMatrix/PermissionMatrix.vue.js +1 -1
- package/components/PermissionMatrix/PermissionMatrix.vue2.js +115 -126
- package/components/Price/Price.vue.d.ts +8 -0
- package/components/Price/Price.vue.js +26 -0
- package/components/Price/Price.vue2.js +4 -0
- package/components/Price/index.d.ts +1 -0
- package/components/Screen/Screen.vue.js +19 -19
- package/components/SidebarMenu/SidebarMenu.vue.js +95 -93
- package/components/SidebarMenu/SidebarMenuItem.vue.js +42 -42
- package/components/Tabes/Tabes.vue.d.ts +6 -0
- package/components/Tabes/Tabes.vue.js +63 -56
- package/core/config.d.ts +14 -1
- package/core/config.js +15 -9
- package/core/index.d.ts +0 -22
- package/core/index.js +17 -9
- package/index.d.ts +2 -0
- package/index.js +18 -14
- package/package.json +2 -1
- package/style.css +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/navbar.type.d.ts +7 -17
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useBreakpoints as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as E, inject as N, ref as w, computed as l, watch as T, reactive as P, provide as L, openBlock as x, createElementBlock as k, normalizeClass as O, Fragment as W, renderList as H, createBlock as A } from "vue";
|
|
2
|
+
import { useRoute as F } from "vue-router";
|
|
3
|
+
import { useBreakpoints as R, breakpointsTailwind as _ } from "@vueuse/core";
|
|
4
|
+
import j from "./SidebarMenuItem.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
const
|
|
6
|
+
const U = /* @__PURE__ */ E({
|
|
7
7
|
__name: "SidebarMenu",
|
|
8
8
|
props: {
|
|
9
9
|
items: { default: () => [] },
|
|
@@ -29,116 +29,118 @@ const K = /* @__PURE__ */ S({
|
|
|
29
29
|
showTooltip: { type: Boolean, default: !0 }
|
|
30
30
|
},
|
|
31
31
|
setup(m) {
|
|
32
|
-
const c =
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (!i || i === "/" || i === "?")
|
|
41
|
-
return !0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
32
|
+
const c = N("navbar-context", null), a = m, f = F(), B = R(_), o = w([...a.defaultExpanded]), v = w(null), y = l(() => !a.mobileBreakpoint || a.mobileBreakpoint === "none" ? !0 : B.greaterOrEqual(a.mobileBreakpoint).value), h = l(() => y.value && a.orientation || "vertical"), p = (e) => e.id || (typeof e.to == "string" ? e.to : null) || e.label, b = (e, n) => {
|
|
33
|
+
if (!e.to) return !1;
|
|
34
|
+
const t = typeof e.to == "string" ? e.to : e.to.path;
|
|
35
|
+
if (!t) return !1;
|
|
36
|
+
if (n === t) return !0;
|
|
37
|
+
if (t !== "/" && t.length > 1 && n.startsWith(t)) {
|
|
38
|
+
const i = n[t.length];
|
|
39
|
+
return !i || i === "/" || i === "?";
|
|
44
40
|
}
|
|
45
41
|
return !1;
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
}, g = (e, n, t = []) => {
|
|
43
|
+
for (const i of e) {
|
|
44
|
+
const u = p(i);
|
|
45
|
+
if (i.children?.length) {
|
|
46
|
+
const r = g(i.children, n, [...t, u]);
|
|
47
|
+
if (r !== null)
|
|
48
|
+
return o.value.includes(u) || o.value.push(u), r;
|
|
49
|
+
}
|
|
50
|
+
if (b(i, n))
|
|
51
|
+
return t.forEach((r) => {
|
|
52
|
+
o.value.includes(r) || o.value.push(r);
|
|
53
|
+
}), u;
|
|
56
54
|
}
|
|
57
|
-
return
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
55
|
+
return null;
|
|
56
|
+
}, C = (e, n) => {
|
|
57
|
+
for (const t of a.items) {
|
|
58
|
+
if (!t.children?.length || !(b(t, e) || t.children.some(
|
|
59
|
+
(s) => b(s, e) || s.children?.some((d) => b(d, e))
|
|
60
|
+
))) continue;
|
|
61
|
+
const u = t.children.map((s) => ({
|
|
62
|
+
label: s.label,
|
|
63
|
+
labelI18n: s.labelI18n,
|
|
64
|
+
value: p(s),
|
|
65
|
+
icon: s.icon,
|
|
66
|
+
disabled: s.disabled,
|
|
67
|
+
to: s.to,
|
|
68
|
+
href: s.href
|
|
70
69
|
}));
|
|
71
|
-
let
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
|
|
70
|
+
let r = u[0]?.value ?? "";
|
|
71
|
+
if (n) {
|
|
72
|
+
const s = u.find((d) => d.value === n);
|
|
73
|
+
if (s)
|
|
74
|
+
r = s.value;
|
|
76
75
|
else {
|
|
77
|
-
const
|
|
78
|
-
|
|
76
|
+
const d = t.children.find(
|
|
77
|
+
(S) => S.children?.some((I) => p(I) === n)
|
|
78
|
+
);
|
|
79
|
+
d && (r = p(d));
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
return { tabs: u, activeTab: r };
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
}, M = (e) => {
|
|
86
|
+
const n = g(a.items, e);
|
|
87
|
+
if (v.value = n, !c?.renderNestedTabs?.value) return;
|
|
88
|
+
const t = C(e, n);
|
|
89
|
+
t ? c.setNestedTabs(t.tabs, t.activeTab) : c.setNestedTabs([], "");
|
|
86
90
|
};
|
|
87
|
-
|
|
91
|
+
T(
|
|
88
92
|
() => f?.path,
|
|
89
|
-
(
|
|
90
|
-
|
|
93
|
+
(e) => {
|
|
94
|
+
e && M(e);
|
|
91
95
|
},
|
|
92
96
|
{ immediate: !0 }
|
|
93
|
-
),
|
|
94
|
-
() =>
|
|
97
|
+
), T(
|
|
98
|
+
() => a.items,
|
|
95
99
|
() => {
|
|
96
|
-
f?.path && (
|
|
100
|
+
f?.path && M(f.path);
|
|
97
101
|
},
|
|
98
102
|
{ deep: !0 }
|
|
99
|
-
), g(
|
|
100
|
-
() => s.value,
|
|
101
|
-
() => {
|
|
102
|
-
c?.renderNestedTabs?.value && h(f?.path || "");
|
|
103
|
-
}
|
|
104
103
|
);
|
|
105
|
-
const
|
|
106
|
-
activeItem:
|
|
107
|
-
expandedItems:
|
|
108
|
-
toggleExpand: (
|
|
109
|
-
|
|
104
|
+
const z = P({
|
|
105
|
+
activeItem: v,
|
|
106
|
+
expandedItems: o,
|
|
107
|
+
toggleExpand: (e) => {
|
|
108
|
+
o.value.includes(e) ? o.value = o.value.filter((t) => t !== e) : a.allowMultiple ? o.value.push(e) : o.value = [e];
|
|
110
109
|
},
|
|
111
|
-
setActive: (
|
|
112
|
-
|
|
110
|
+
setActive: (e) => {
|
|
111
|
+
if (v.value = e, c?.renderNestedTabs?.value && f?.path) {
|
|
112
|
+
const n = C(f.path, e);
|
|
113
|
+
n ? c.setNestedTabs(n.tabs, n.activeTab) : c.setNestedTabs([], "");
|
|
114
|
+
}
|
|
113
115
|
},
|
|
114
|
-
indentSize: l(() =>
|
|
115
|
-
variant: l(() =>
|
|
116
|
-
renderMode: l(() =>
|
|
116
|
+
indentSize: l(() => a.indentSize),
|
|
117
|
+
variant: l(() => a.variant),
|
|
118
|
+
renderMode: l(() => a.renderMode || "tree"),
|
|
117
119
|
renderNestedTabs: l(() => !!c?.renderNestedTabs?.value),
|
|
118
|
-
compact: l(() =>
|
|
119
|
-
showCompactLabels: l(() =>
|
|
120
|
-
iconSize: l(() =>
|
|
121
|
-
compactIconSize: l(() =>
|
|
122
|
-
labelClass: l(() =>
|
|
123
|
-
compactLabelClass: l(() =>
|
|
124
|
-
itemPadding: l(() =>
|
|
125
|
-
compactItemPadding: l(() =>
|
|
126
|
-
nestedMenuWidth: l(() =>
|
|
127
|
-
nestedMenuMaxHeight: l(() =>
|
|
128
|
-
currentOrientation:
|
|
129
|
-
showTooltip: l(() =>
|
|
120
|
+
compact: l(() => a.compact),
|
|
121
|
+
showCompactLabels: l(() => a.showCompactLabels),
|
|
122
|
+
iconSize: l(() => a.iconSize),
|
|
123
|
+
compactIconSize: l(() => a.compactIconSize),
|
|
124
|
+
labelClass: l(() => a.labelClass),
|
|
125
|
+
compactLabelClass: l(() => a.compactLabelClass),
|
|
126
|
+
itemPadding: l(() => a.itemPadding),
|
|
127
|
+
compactItemPadding: l(() => a.compactItemPadding),
|
|
128
|
+
nestedMenuWidth: l(() => a.nestedMenuWidth),
|
|
129
|
+
nestedMenuMaxHeight: l(() => a.nestedMenuMaxHeight),
|
|
130
|
+
currentOrientation: h,
|
|
131
|
+
showTooltip: l(() => a.showTooltip)
|
|
130
132
|
});
|
|
131
|
-
return L("sidebar-menu-ctx",
|
|
132
|
-
class:
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
return L("sidebar-menu-ctx", z), (e, n) => (x(), k("nav", {
|
|
134
|
+
class: O(["flex w-full transition-all duration-300", [
|
|
135
|
+
h.value === "horizontal" ? "flex-row flex-wrap gap-2 items-center" : "flex-col",
|
|
136
|
+
h.value === "vertical" && !a.compact ? "space-y-1" : ""
|
|
135
137
|
]]),
|
|
136
138
|
role: "tree",
|
|
137
139
|
"aria-label": "Sidebar Menu"
|
|
138
140
|
}, [
|
|
139
|
-
(
|
|
140
|
-
key:
|
|
141
|
-
item:
|
|
141
|
+
(x(!0), k(W, null, H(m.items, (t) => (x(), A(j, {
|
|
142
|
+
key: t.id || t.label,
|
|
143
|
+
item: t,
|
|
142
144
|
itemClass: m.itemClass,
|
|
143
145
|
menuOffset: m.menuOffset
|
|
144
146
|
}, null, 8, ["item", "itemClass", "menuOffset"]))), 128))
|
|
@@ -146,5 +148,5 @@ const K = /* @__PURE__ */ S({
|
|
|
146
148
|
}
|
|
147
149
|
});
|
|
148
150
|
export {
|
|
149
|
-
|
|
151
|
+
U as default
|
|
150
152
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as X, inject as Y, computed as
|
|
1
|
+
import { defineComponent as X, inject as Y, computed as s, resolveComponent as Z, openBlock as r, createElementBlock as f, normalizeClass as u, createBlock as h, unref as n, withCtx as b, createElementVNode as v, normalizeStyle as M, createCommentVNode as d, toDisplayString as g, createVNode as S, resolveDynamicComponent as B, mergeProps as D, createTextVNode as ee, Fragment as V, withKeys as te, withModifiers as ae, Transition as ne, renderList as ie } from "vue";
|
|
2
2
|
import { useRouter as oe } from "vue-router";
|
|
3
3
|
import w from "../Icon.vue.js";
|
|
4
4
|
import K from "../Tooltip.vue.js";
|
|
@@ -8,7 +8,7 @@ import { $t as O } from "../../utils/i18n.js";
|
|
|
8
8
|
const re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
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"
|
|
11
|
-
},
|
|
11
|
+
}, ce = { class: "w-full" }, se = { class: "flex items-center w-full gap-2 text-sm" }, ue = { class: "truncate flex-1 font-medium" }, de = ["onKeydown"], me = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "overflow-hidden transition-all duration-300 ease-in-out relative"
|
|
14
14
|
}, fe = { class: "mt-0.5 space-y-0.5" }, we = /* @__PURE__ */ X({
|
|
@@ -19,13 +19,13 @@ const re = {
|
|
|
19
19
|
menuOffset: {},
|
|
20
20
|
itemClass: {}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const t =
|
|
22
|
+
setup(c) {
|
|
23
|
+
const t = c, e = Y("sidebar-menu-ctx"), k = oe();
|
|
24
24
|
if (!e)
|
|
25
25
|
throw new Error("SidebarMenuItem must be used within a SidebarMenu");
|
|
26
|
-
const i =
|
|
26
|
+
const i = s(
|
|
27
27
|
() => e.currentOrientation === "horizontal" && t.depth === 0
|
|
28
|
-
),
|
|
28
|
+
), p = s(() => !!t.item.children?.length), R = s(() => i.value && p.value || e.compact && p.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), I = s(() => e.renderNestedTabs && t.depth === 0 ? !1 : R.value === "popover" && p.value), y = s(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), E = s(() => I.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(y.value)), j = s(() => !(!p.value || e.renderNestedTabs && t.depth === 0)), z = s(() => e.activeItem === y.value), L = (o) => {
|
|
29
29
|
if (!t.item.disabled) {
|
|
30
30
|
if (e.renderNestedTabs && t.depth === 0) {
|
|
31
31
|
if (t.item.action && t.item.action(t.item), t.item.to)
|
|
@@ -33,7 +33,7 @@ const re = {
|
|
|
33
33
|
});
|
|
34
34
|
else if (t.item.href)
|
|
35
35
|
window.open(t.item.href, "_blank");
|
|
36
|
-
else if (
|
|
36
|
+
else if (p.value) {
|
|
37
37
|
const a = t.item.children?.[0];
|
|
38
38
|
a && (a.to ? k.push(a.to).catch(() => {
|
|
39
39
|
}) : a.href && window.open(a.href, "_blank"));
|
|
@@ -41,7 +41,7 @@ const re = {
|
|
|
41
41
|
e.setActive(y.value);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
p.value && !t.item.to && !t.item.href && (I.value || e.toggleExpand(y.value)), t.item.action && t.item.action(t.item), (!p.value || t.item.to) && e.setActive(y.value);
|
|
45
45
|
}
|
|
46
46
|
}, N = (o) => {
|
|
47
47
|
if (o.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
|
|
@@ -50,7 +50,7 @@ const re = {
|
|
|
50
50
|
});
|
|
51
51
|
else if (t.item.href)
|
|
52
52
|
window.open(t.item.href, "_blank");
|
|
53
|
-
else if (
|
|
53
|
+
else if (p.value) {
|
|
54
54
|
const a = t.item.children?.[0];
|
|
55
55
|
a && (a.to ? k.push(a.to).catch(() => {
|
|
56
56
|
}) : a.href && window.open(a.href, "_blank"));
|
|
@@ -59,14 +59,14 @@ const re = {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
I.value || e.toggleExpand(y.value);
|
|
62
|
-
}, $ =
|
|
62
|
+
}, $ = s(() => e.indentSize || 12), T = s(() => i.value ? {} : e.compact ? { width: "100%" } : {
|
|
63
63
|
marginLeft: `${t.depth * $.value}px`,
|
|
64
64
|
width: `calc(100% - ${t.depth * $.value}px)`
|
|
65
|
-
}), _ =
|
|
66
|
-
const a = `group flex items-center justify-between font-medium rounded-md
|
|
65
|
+
}), _ = s(() => {
|
|
66
|
+
const a = `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"} ${t?.itemClass || ""} ${e.labelClass}`, x = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
|
|
67
67
|
let l = "";
|
|
68
68
|
return z.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"), `${a} ${x} ${l} ${t.item.class || ""}`;
|
|
69
|
-
}), m =
|
|
69
|
+
}), m = s(() => e.compact && e.showCompactLabels), C = s(
|
|
70
70
|
() => t.item.labelI18n ? O(t.item.labelI18n) : t.item.label
|
|
71
71
|
), A = (o) => ({
|
|
72
72
|
label: o.labelI18n ? O(o.labelI18n) : o.label,
|
|
@@ -75,7 +75,7 @@ const re = {
|
|
|
75
75
|
disabled: o.disabled,
|
|
76
76
|
children: o.children ? o.children.map(A) : void 0,
|
|
77
77
|
data: o
|
|
78
|
-
}), F =
|
|
78
|
+
}), F = s(() => t.item.children ? t.item.children.map(A) : []), W = (o) => {
|
|
79
79
|
const a = o.data;
|
|
80
80
|
if (a) {
|
|
81
81
|
a.action && a.action(a);
|
|
@@ -98,7 +98,7 @@ const re = {
|
|
|
98
98
|
}, U = (o) => {
|
|
99
99
|
const a = o;
|
|
100
100
|
a.style.height = "0", a.style.opacity = "0";
|
|
101
|
-
}, H =
|
|
101
|
+
}, H = s(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), P = s(() => t.item.to ? { to: t.item.to } : t.item.href ? {
|
|
102
102
|
href: t.item.href,
|
|
103
103
|
target: "_blank",
|
|
104
104
|
rel: "noopener noreferrer"
|
|
@@ -111,7 +111,7 @@ const re = {
|
|
|
111
111
|
I.value ? (r(), h(n(le), {
|
|
112
112
|
key: 0,
|
|
113
113
|
position: i.value ? "bottom-start" : "right-start",
|
|
114
|
-
offset:
|
|
114
|
+
offset: c.menuOffset,
|
|
115
115
|
class: "w-full block",
|
|
116
116
|
searchable: !1,
|
|
117
117
|
width: n(e).nestedMenuWidth,
|
|
@@ -121,9 +121,9 @@ const re = {
|
|
|
121
121
|
}, {
|
|
122
122
|
header: b(() => [
|
|
123
123
|
n(e).compact && !i.value ? (r(), f("div", re, [
|
|
124
|
-
|
|
124
|
+
c.item.icon ? (r(), h(w, {
|
|
125
125
|
key: 0,
|
|
126
|
-
icon:
|
|
126
|
+
icon: c.item.icon,
|
|
127
127
|
class: "shrink-0 transition-colors opacity-80 group-hover:opacity-100"
|
|
128
128
|
}, null, 8, ["icon"])) : d("", !0),
|
|
129
129
|
ee(" " + g(C.value), 1)
|
|
@@ -138,7 +138,7 @@ const re = {
|
|
|
138
138
|
class: "w-full block"
|
|
139
139
|
}, {
|
|
140
140
|
default: b(() => [
|
|
141
|
-
|
|
141
|
+
v("div", ce, [
|
|
142
142
|
(r(), h(B(H.value), D(P.value, {
|
|
143
143
|
class: [_.value, l ? "bg-muted text-foreground" : ""],
|
|
144
144
|
style: T.value,
|
|
@@ -147,36 +147,36 @@ const re = {
|
|
|
147
147
|
onClick: L
|
|
148
148
|
}), {
|
|
149
149
|
default: b(() => [
|
|
150
|
-
|
|
150
|
+
v("div", {
|
|
151
151
|
class: u(["min-w-0 flex-1 flex", [
|
|
152
152
|
m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
153
153
|
]])
|
|
154
154
|
}, [
|
|
155
|
-
|
|
155
|
+
c.item.icon ? (r(), h(w, {
|
|
156
156
|
key: 0,
|
|
157
|
-
icon:
|
|
157
|
+
icon: c.item.icon,
|
|
158
158
|
class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value || l ? "opacity-100" : ""]]),
|
|
159
159
|
style: M({
|
|
160
160
|
width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
|
|
161
161
|
height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
|
|
162
162
|
})
|
|
163
163
|
}, null, 8, ["icon", "class", "style"])) : d("", !0),
|
|
164
|
-
|
|
165
|
-
class: u(["truncate leading-none pt-0.5", {
|
|
164
|
+
v("span", {
|
|
165
|
+
class: u(["truncate leading-none pt-0.5 text-wrap", {
|
|
166
166
|
[n(e).compactLabelClass]: m.value && !i.value,
|
|
167
167
|
hidden: n(e).compact && !m.value && !i.value,
|
|
168
168
|
"md:hidden": n(e).compact && !m.value && !i.value
|
|
169
169
|
}])
|
|
170
170
|
}, g(C.value), 3),
|
|
171
|
-
|
|
171
|
+
c.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
|
|
172
172
|
key: 1,
|
|
173
173
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
174
|
-
|
|
174
|
+
c.item.badgeClass || "bg-muted text-muted-foreground",
|
|
175
175
|
{ "md:hidden": n(e).compact && !i.value }
|
|
176
176
|
]])
|
|
177
|
-
}, g(
|
|
177
|
+
}, g(c.item.badge), 3)) : d("", !0)
|
|
178
178
|
], 2),
|
|
179
|
-
|
|
179
|
+
v("div", {
|
|
180
180
|
class: u(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": n(e).compact && !i.value }])
|
|
181
181
|
}, [
|
|
182
182
|
S(w, {
|
|
@@ -193,14 +193,14 @@ const re = {
|
|
|
193
193
|
}, 1032, ["content", "placement", "disabled"])
|
|
194
194
|
]),
|
|
195
195
|
item: b(({ option: l }) => [
|
|
196
|
-
|
|
196
|
+
v("div", se, [
|
|
197
197
|
l.icon ? (r(), h(w, {
|
|
198
198
|
key: 0,
|
|
199
199
|
icon: l.icon,
|
|
200
200
|
class: "shrink-0 opacity-80",
|
|
201
201
|
style: M({ width: n(e).iconSize, height: n(e).iconSize })
|
|
202
202
|
}, null, 8, ["icon", "style"])) : d("", !0),
|
|
203
|
-
|
|
203
|
+
v("span", ue, g(l.label), 1),
|
|
204
204
|
l.data?.badge ? (r(), f("span", {
|
|
205
205
|
key: 1,
|
|
206
206
|
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"])
|
|
@@ -224,34 +224,34 @@ const re = {
|
|
|
224
224
|
onClick: L
|
|
225
225
|
}), {
|
|
226
226
|
default: b(() => [
|
|
227
|
-
|
|
227
|
+
v("div", {
|
|
228
228
|
class: u(["min-w-0 flex-1 flex py-0.5", [
|
|
229
229
|
m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
230
230
|
]])
|
|
231
231
|
}, [
|
|
232
|
-
|
|
232
|
+
c.item.icon ? (r(), h(w, {
|
|
233
233
|
key: 0,
|
|
234
|
-
icon:
|
|
234
|
+
icon: c.item.icon,
|
|
235
235
|
class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value ? "opacity-100" : ""]]),
|
|
236
236
|
style: M({
|
|
237
237
|
width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
|
|
238
238
|
height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
|
|
239
239
|
})
|
|
240
240
|
}, null, 8, ["icon", "class", "style"])) : d("", !0),
|
|
241
|
-
|
|
241
|
+
v("span", {
|
|
242
242
|
class: u(["truncate leading-none pt-0.5 wrap-break-word flex-wrap text-wrap", {
|
|
243
243
|
[n(e).compactLabelClass]: m.value && !i.value,
|
|
244
244
|
hidden: n(e).compact && !m.value && !i.value,
|
|
245
245
|
"md:hidden": n(e).compact && !m.value && !i.value
|
|
246
246
|
}])
|
|
247
247
|
}, g(C.value), 3),
|
|
248
|
-
|
|
248
|
+
c.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
|
|
249
249
|
key: 1,
|
|
250
250
|
class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
251
|
-
|
|
251
|
+
c.item.badgeClass || "bg-muted text-muted-foreground",
|
|
252
252
|
{ "md:hidden": n(e).compact && !i.value }
|
|
253
253
|
]])
|
|
254
|
-
}, g(
|
|
254
|
+
}, g(c.item.badge), 3)) : d("", !0)
|
|
255
255
|
], 2),
|
|
256
256
|
j.value ? (r(), f("div", {
|
|
257
257
|
key: 0,
|
|
@@ -281,19 +281,19 @@ const re = {
|
|
|
281
281
|
onLeave: U
|
|
282
282
|
}, {
|
|
283
283
|
default: b(() => [
|
|
284
|
-
|
|
284
|
+
p.value && E.value && !i.value ? (r(), f("div", me, [
|
|
285
285
|
n(e).variant === "default" ? (r(), f("div", {
|
|
286
286
|
key: 0,
|
|
287
287
|
class: "absolute top-0 bottom-2 w-px bg-border",
|
|
288
288
|
style: M({
|
|
289
|
-
left: `${(
|
|
289
|
+
left: `${(c.depth + 1) * $.value - $.value / 2}px`
|
|
290
290
|
})
|
|
291
291
|
}, null, 4)) : d("", !0),
|
|
292
|
-
|
|
293
|
-
(r(!0), f(V, null, ie(
|
|
292
|
+
v("div", fe, [
|
|
293
|
+
(r(!0), f(V, null, ie(c.item.children, (l) => (r(), h(x, {
|
|
294
294
|
key: l.id || l.label,
|
|
295
295
|
item: l,
|
|
296
|
-
depth:
|
|
296
|
+
depth: c.depth + 1
|
|
297
297
|
}, null, 8, ["item", "depth"]))), 128))
|
|
298
298
|
])
|
|
299
299
|
])) : d("", !0)
|
|
@@ -6,6 +6,11 @@ interface Props {
|
|
|
6
6
|
variant?: TabesVariant;
|
|
7
7
|
block?: boolean;
|
|
8
8
|
textClass?: string;
|
|
9
|
+
/**
|
|
10
|
+
* When true, tabs wrap to multiple rows on small screens instead of scrolling.
|
|
11
|
+
* Default: false (horizontal scroll behavior)
|
|
12
|
+
*/
|
|
13
|
+
wrap?: boolean;
|
|
9
14
|
}
|
|
10
15
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
16
|
change: (value: string | number) => any;
|
|
@@ -17,6 +22,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
17
22
|
variant: TabesVariant;
|
|
18
23
|
size: TabesSize;
|
|
19
24
|
block: boolean;
|
|
25
|
+
wrap: boolean;
|
|
20
26
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
27
|
containerRef: HTMLDivElement;
|
|
22
28
|
}, HTMLDivElement>;
|