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,12 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { defineComponent as qe, ref as d, computed as l, watch as b, onMounted as Ke, onBeforeUnmount as Ne, openBlock as h, createElementBlock as M, normalizeClass as i, withDirectives as D, createVNode as C, vShow as A, createElementVNode as g, normalizeStyle as He, createCommentVNode as N, Fragment as ne, renderList as We, unref as se, createBlock as F, withCtx as oe, toDisplayString as le, withMemo as Ge, resolveDynamicComponent as Qe, mergeProps as Ue, nextTick as Je } from "vue";
|
|
2
|
+
import { useResizeObserver as ie } from "@vueuse/core";
|
|
3
|
+
import { useDraggable as Xe } from "vue-draggable-plus";
|
|
4
|
+
import { hashTabesValues as Ye, getActiveMarkerKey as Ze, isMenuTab as ce, isTabActive as ue, scrollTabesStrip as de, getTabesScrollOverflow as _e } from "./tabes.utils.js";
|
|
5
|
+
import { measureTabesMarkerGeometry as et, toTabesLocalScrollDelta as fe } from "./TabesMarkerGeometry.js";
|
|
6
|
+
import S from "../Icon.vue.js";
|
|
7
|
+
import me from "../FadeOverlay/FadeOverlay.vue.js";
|
|
8
|
+
import tt from "../Dropdown/Dropdown.vue.js";
|
|
9
|
+
import { $t as rt } from "../../utils/i18n.js";
|
|
10
|
+
import { useRtl as at, resolveDirFromAncestors as nt } from "../../composables/useRtl.js";
|
|
11
|
+
import { usePersistentState as st } from "../../utils/usePersistentState.js";
|
|
12
|
+
const ot = ["dir"], lt = ["data-variant"], it = ["aria-selected", "aria-expanded", "disabled"], ve = 200, yt = /* @__PURE__ */ qe({
|
|
10
13
|
__name: "Tabes",
|
|
11
14
|
props: {
|
|
12
15
|
options: {},
|
|
@@ -17,57 +20,89 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
|
|
|
17
20
|
textClass: {},
|
|
18
21
|
wrap: { type: Boolean, default: !1 },
|
|
19
22
|
tabClass: {},
|
|
20
|
-
direction: { default: "
|
|
23
|
+
direction: { default: "auto" },
|
|
24
|
+
sortable: { type: Boolean, default: !1 },
|
|
25
|
+
storageKey: {}
|
|
21
26
|
},
|
|
22
|
-
emits: ["update:modelValue", "change", "menu-select", "menu-open", "menu-close"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
emits: ["update:modelValue", "change", "menu-select", "menu-open", "menu-close", "reorder", "update:options"],
|
|
28
|
+
setup(o, { emit: be }) {
|
|
29
|
+
const r = o, f = be, H = d(null), k = d(null), p = d(null), y = /* @__PURE__ */ new Map(), W = at(), E = d(null), V = l(() => r.direction === "rtl" ? "rtl" : r.direction === "ltr" ? "ltr" : E.value ? E.value : W.value ? "rtl" : "ltr"), z = l(() => V.value === "rtl"), G = () => {
|
|
30
|
+
E.value = nt(H.value);
|
|
31
|
+
}, Q = r.sortable ? st(
|
|
32
|
+
`tabes-order-${r.storageKey ?? `auto-${Ye(r.options)}`}`,
|
|
33
|
+
[],
|
|
34
|
+
{ writeDefaults: !1 }
|
|
35
|
+
) : d([]), L = (e) => {
|
|
36
|
+
if (!r.sortable) return [...e];
|
|
37
|
+
const a = Q.value;
|
|
38
|
+
if (!a?.length) return [...e];
|
|
39
|
+
const t = new Map(e.map((s) => [s.value, s])), n = [];
|
|
40
|
+
for (const s of a) {
|
|
41
|
+
const u = t.get(s);
|
|
42
|
+
u && (n.push(u), t.delete(s));
|
|
43
|
+
}
|
|
44
|
+
for (const s of e) t.has(s.value) && n.push(s);
|
|
45
|
+
return n;
|
|
46
|
+
}, m = d(L(r.options)), ge = () => {
|
|
47
|
+
const e = m.value.map((a) => a.value);
|
|
48
|
+
Q.value = e, f("reorder", { options: [...m.value], order: e }), f("update:options", [...m.value]), c({ ensureVisible: !0 });
|
|
49
|
+
}, pe = (e) => {
|
|
50
|
+
const { item: a, from: t, oldIndex: n, oldDraggableIndex: s, newDraggableIndex: u } = e;
|
|
51
|
+
a.parentNode?.removeChild(a);
|
|
52
|
+
const K = typeof n == "number" ? t.children[n] ?? null : null;
|
|
53
|
+
if (t.insertBefore(a, K), s == null || u == null || s === u)
|
|
54
|
+
return;
|
|
55
|
+
const v = [...m.value], [x] = v.splice(s, 1);
|
|
56
|
+
x && (v.splice(u, 0, x), m.value = v, ge());
|
|
57
|
+
}, B = d(!1), $ = d(!1);
|
|
58
|
+
let T = 0, U = 0, R = !1, O = !1, I = 0;
|
|
59
|
+
const J = () => {
|
|
60
|
+
if (!p.value) return;
|
|
61
|
+
const { canScrollStart: e, canScrollEnd: a } = _e(
|
|
62
|
+
p.value
|
|
63
|
+
);
|
|
64
|
+
B.value !== e && (B.value = e), $.value !== a && ($.value = a);
|
|
65
|
+
}, he = () => {
|
|
66
|
+
O || (O = !0, U = requestAnimationFrame(() => {
|
|
67
|
+
O = !1, J();
|
|
33
68
|
}));
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!u.value || !k.value) return;
|
|
38
|
-
const e = D.value;
|
|
69
|
+
}, xe = () => de(p.value, "start", ve), ye = () => de(p.value, "end", ve), X = l(() => Ze(r.options, r.modelValue)), we = () => {
|
|
70
|
+
if (!p.value || !k.value) return;
|
|
71
|
+
const e = X.value;
|
|
39
72
|
if (e === void 0) return;
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
42
|
-
const t =
|
|
43
|
-
|
|
44
|
-
left:
|
|
73
|
+
const a = y.get(e);
|
|
74
|
+
if (!a) return;
|
|
75
|
+
const t = p.value, n = a.getBoundingClientRect(), s = t.getBoundingClientRect(), u = 40;
|
|
76
|
+
n.left < s.left + u ? t.scrollBy({
|
|
77
|
+
left: fe(
|
|
45
78
|
t,
|
|
46
|
-
|
|
79
|
+
n.left - s.left - u
|
|
47
80
|
),
|
|
48
81
|
behavior: "smooth"
|
|
49
|
-
}) :
|
|
50
|
-
left:
|
|
82
|
+
}) : n.right > s.right - u && t.scrollBy({
|
|
83
|
+
left: fe(
|
|
51
84
|
t,
|
|
52
|
-
|
|
85
|
+
n.right - s.right + u
|
|
53
86
|
),
|
|
54
87
|
behavior: "smooth"
|
|
55
88
|
});
|
|
56
|
-
},
|
|
57
|
-
e instanceof HTMLElement ?
|
|
58
|
-
},
|
|
89
|
+
}, Y = (e, a) => {
|
|
90
|
+
e instanceof HTMLElement ? y.set(a, e) : e && typeof e == "object" && "$el" in e && e.$el instanceof HTMLElement ? y.set(a, e.$el) : y.delete(a);
|
|
91
|
+
}, w = d({
|
|
59
92
|
width: "0px",
|
|
60
93
|
height: "0px",
|
|
94
|
+
left: "0px",
|
|
95
|
+
top: "0px",
|
|
61
96
|
transform: "translate(0px, 0px)",
|
|
62
97
|
opacity: 0
|
|
63
|
-
}),
|
|
64
|
-
|
|
65
|
-
...
|
|
98
|
+
}), j = d(!1), P = () => {
|
|
99
|
+
w.value.opacity !== 0 && (w.value = {
|
|
100
|
+
...w.value,
|
|
66
101
|
opacity: 0
|
|
67
102
|
});
|
|
68
|
-
},
|
|
69
|
-
await
|
|
70
|
-
const e = k.value,
|
|
103
|
+
}, ke = async () => {
|
|
104
|
+
await Je();
|
|
105
|
+
const e = k.value, a = X.value, t = a !== void 0 ? y.get(a) : void 0;
|
|
71
106
|
if (!e || !t) {
|
|
72
107
|
P();
|
|
73
108
|
return;
|
|
@@ -76,70 +111,92 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
|
|
|
76
111
|
P();
|
|
77
112
|
return;
|
|
78
113
|
}
|
|
79
|
-
const { width:
|
|
80
|
-
width: `${
|
|
81
|
-
height: `${
|
|
82
|
-
|
|
114
|
+
const { width: n, height: s, left: u, top: K } = et(e, t), v = {
|
|
115
|
+
width: `${n}px`,
|
|
116
|
+
height: `${s}px`,
|
|
117
|
+
left: "0px",
|
|
118
|
+
top: "0px",
|
|
119
|
+
transform: `translate(${u}px, ${K}px)`,
|
|
83
120
|
opacity: 1
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
121
|
+
}, x = w.value;
|
|
122
|
+
x.width === v.width && x.height === v.height && x.transform === v.transform && x.opacity === v.opacity || (w.value = v, j.value || (cancelAnimationFrame(I), I = requestAnimationFrame(() => {
|
|
123
|
+
j.value = !0;
|
|
87
124
|
})));
|
|
88
125
|
};
|
|
89
|
-
let
|
|
90
|
-
const
|
|
91
|
-
await
|
|
92
|
-
},
|
|
93
|
-
e?.ensureVisible && (
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
126
|
+
let q = !1;
|
|
127
|
+
const Z = async (e) => {
|
|
128
|
+
await ke(), J(), e?.ensureVisible && we();
|
|
129
|
+
}, c = (e) => {
|
|
130
|
+
e?.ensureVisible && (q = !0), !R && (R = !0, cancelAnimationFrame(T), T = requestAnimationFrame(() => {
|
|
131
|
+
R = !1;
|
|
132
|
+
const a = q;
|
|
133
|
+
q = !1, Z({ ensureVisible: a });
|
|
97
134
|
}));
|
|
98
135
|
};
|
|
99
|
-
|
|
100
|
-
() =>
|
|
101
|
-
() =>
|
|
102
|
-
),
|
|
103
|
-
() =>
|
|
104
|
-
() =>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
() =>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
() =>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
() =>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
136
|
+
ie(p, () => c()), ie(k, () => c()), b(
|
|
137
|
+
() => r.modelValue,
|
|
138
|
+
() => c({ ensureVisible: !0 })
|
|
139
|
+
), b(
|
|
140
|
+
() => r.options,
|
|
141
|
+
(e) => {
|
|
142
|
+
m.value = L(e), c();
|
|
143
|
+
}
|
|
144
|
+
), b(
|
|
145
|
+
() => r.sortable,
|
|
146
|
+
() => {
|
|
147
|
+
m.value = L(r.options), c();
|
|
148
|
+
}
|
|
149
|
+
), b(
|
|
150
|
+
() => r.size,
|
|
151
|
+
() => c()
|
|
152
|
+
), b(
|
|
153
|
+
() => r.block,
|
|
154
|
+
() => c()
|
|
155
|
+
), b(
|
|
156
|
+
() => r.wrap,
|
|
157
|
+
() => c()
|
|
158
|
+
), b(
|
|
159
|
+
() => r.variant,
|
|
160
|
+
() => c()
|
|
161
|
+
), b(W, () => G()), b(V, () => c({ ensureVisible: !0 })), r.sortable && Xe(k, m, {
|
|
162
|
+
animation: 150,
|
|
163
|
+
draggable: "[data-tabes-sortable]",
|
|
164
|
+
filter: "[data-tabes-disabled]",
|
|
165
|
+
ghostClass: "tabes-drag-ghost",
|
|
166
|
+
chosenClass: "tabes-drag-chosen",
|
|
167
|
+
dragClass: "tabes-drag-active",
|
|
168
|
+
// Hide the marker while dragging (it can't track a moving target), then
|
|
169
|
+
// re-measure on drop so it lands on the active tab's new position.
|
|
170
|
+
onStart: () => P(),
|
|
171
|
+
onEnd: () => c(),
|
|
172
|
+
// Own the reorder so the marker child can't skew the list indices.
|
|
173
|
+
customUpdate: (e) => pe(e)
|
|
174
|
+
}), Ke(() => {
|
|
175
|
+
G(), Z({ ensureVisible: !0 });
|
|
176
|
+
}), Ne(() => {
|
|
177
|
+
cancelAnimationFrame(T), cancelAnimationFrame(U), cancelAnimationFrame(I), R = !1, O = !1, y.clear();
|
|
121
178
|
});
|
|
122
|
-
const
|
|
123
|
-
const e =
|
|
124
|
-
return
|
|
125
|
-
}),
|
|
179
|
+
const Ce = l(() => {
|
|
180
|
+
const e = r.variant === "line";
|
|
181
|
+
return r.block || e ? "flex w-full relative" : "inline-flex max-w-full relative";
|
|
182
|
+
}), _ = l(() => [
|
|
126
183
|
"absolute top-0 bottom-0 z-20 flex items-center pointer-events-none transition-opacity duration-200",
|
|
127
|
-
|
|
128
|
-
]),
|
|
129
|
-
e.disabled ||
|
|
130
|
-
},
|
|
184
|
+
r.variant === "line" ? "pb-[10px]" : ""
|
|
185
|
+
]), Se = (e) => {
|
|
186
|
+
e.disabled || ce(e) || (f("update:modelValue", e.value), f("change", e.value));
|
|
187
|
+
}, Ve = (e, a) => {
|
|
131
188
|
if (e.disabled) return;
|
|
132
|
-
const t =
|
|
133
|
-
t != null && (
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
const e =
|
|
140
|
-
return (
|
|
141
|
-
}),
|
|
142
|
-
const e =
|
|
189
|
+
const t = a.value;
|
|
190
|
+
t != null && (f("update:modelValue", t), f("change", t), f("menu-select", { value: t, option: a.option, tab: e }));
|
|
191
|
+
}, ze = (e) => {
|
|
192
|
+
f("menu-open", e);
|
|
193
|
+
}, Be = (e) => {
|
|
194
|
+
f("menu-close", e), c();
|
|
195
|
+
}, $e = l(() => {
|
|
196
|
+
const e = r.variant === "line";
|
|
197
|
+
return (r.block || r.wrap) && !e ? "flex-1 min-w-max" : "shrink-0";
|
|
198
|
+
}), Re = (e) => e.dropdown?.direction ?? V.value, Oe = l(() => z.value ? "right" : "left"), Me = l(() => z.value ? "left" : "right"), De = l(() => z.value ? "lucide:chevron-right" : "lucide:chevron-left"), Ae = l(() => z.value ? "lucide:chevron-left" : "lucide:chevron-right"), Fe = l(() => {
|
|
199
|
+
const e = r.variant === "line", a = {
|
|
143
200
|
surface: "bg-secondary/80 p-1",
|
|
144
201
|
primary: "bg-secondary p-1",
|
|
145
202
|
secondary: "bg-secondary p-1",
|
|
@@ -147,52 +204,52 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
|
|
|
147
204
|
success: "bg-success/10 p-1",
|
|
148
205
|
outline: "bg-transparent border border-border p-1",
|
|
149
206
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
150
|
-
}, t =
|
|
151
|
-
return [`${
|
|
152
|
-
}),
|
|
207
|
+
}, t = r.wrap && !e ? "flex-wrap" : "";
|
|
208
|
+
return [`${r.block || e ? "flex min-w-full w-max" : "inline-flex"} rounded-lg relative isolate ${t}`, a[r.variant], r.sortable ? "is-sortable" : ""];
|
|
209
|
+
}), ee = l(() => r.variant === "surface" || r.variant === "primary" || r.variant === "secondary" ? "var(--color-secondary)" : r.variant === "danger" ? "color-mix(in srgb, var(--color-danger) 10%, transparent)" : r.variant === "success" ? "color-mix(in srgb, var(--color-success) 10%, transparent)" : "var(--color-background)"), te = {
|
|
153
210
|
sm: "text-xs px-2.5 py-1",
|
|
154
211
|
md: "-text-fs-2 px-3 py-1",
|
|
155
212
|
lg: "-text-fs-1 px-4 py-1"
|
|
156
|
-
},
|
|
157
|
-
const e =
|
|
158
|
-
return [
|
|
159
|
-
}),
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
if (
|
|
213
|
+
}, Ee = l(() => {
|
|
214
|
+
const e = r.variant === "line", a = e ? "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none outline-none pb-3 border-b-2 border-transparent hover:text-foreground shrink-0" : "relative z-10 flex items-center justify-center gap-2 font-medium transition-colors duration-50 ease-out cursor-pointer select-none rounded-md outline-none shrink-0", t = (r.block || r.wrap) && !e ? "flex-1" : "";
|
|
215
|
+
return [a, t];
|
|
216
|
+
}), re = (e) => {
|
|
217
|
+
const a = ue(e, r.modelValue), t = r.variant === "line";
|
|
218
|
+
let n = "";
|
|
219
|
+
if (a)
|
|
163
220
|
if (t)
|
|
164
|
-
|
|
221
|
+
n = r.wrap ? "text-primary !border-primary" : "text-primary";
|
|
165
222
|
else
|
|
166
|
-
switch (
|
|
223
|
+
switch (r.variant) {
|
|
167
224
|
case "surface":
|
|
168
|
-
|
|
225
|
+
n = r.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
|
|
169
226
|
break;
|
|
170
227
|
case "primary":
|
|
171
|
-
|
|
228
|
+
n = r.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
|
|
172
229
|
break;
|
|
173
230
|
case "secondary":
|
|
174
|
-
|
|
231
|
+
n = r.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
|
|
175
232
|
break;
|
|
176
233
|
case "danger":
|
|
177
|
-
|
|
234
|
+
n = r.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
|
|
178
235
|
break;
|
|
179
236
|
case "success":
|
|
180
|
-
|
|
237
|
+
n = r.wrap ? "text-success-fg bg-success" : "text-success-fg";
|
|
181
238
|
break;
|
|
182
239
|
case "outline":
|
|
183
|
-
|
|
240
|
+
n = r.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
|
|
184
241
|
break;
|
|
185
242
|
default:
|
|
186
|
-
|
|
243
|
+
n = "text-foreground";
|
|
187
244
|
}
|
|
188
245
|
else
|
|
189
|
-
|
|
190
|
-
const
|
|
191
|
-
return [
|
|
192
|
-
},
|
|
193
|
-
const
|
|
194
|
-
return
|
|
195
|
-
}),
|
|
246
|
+
n = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
|
|
247
|
+
const s = e.disabled ? "opacity-50 cursor-not-allowed" : "";
|
|
248
|
+
return [Ee.value, n, r?.tabClass, s].join(" ");
|
|
249
|
+
}, Le = l(() => {
|
|
250
|
+
const a = `absolute z-0 pointer-events-none ${j.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
|
|
251
|
+
return r.variant === "line" ? `${a} !h-[2px] !top-auto bottom-0` : `${a} rounded-md shadow-sm`;
|
|
252
|
+
}), Te = () => ({
|
|
196
253
|
surface: "bg-[#ffff] dark:bg-[#0B0B0B]",
|
|
197
254
|
primary: "bg-primary",
|
|
198
255
|
secondary: "bg-secondary-foreground",
|
|
@@ -200,70 +257,74 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
|
|
|
200
257
|
success: "bg-success",
|
|
201
258
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
202
259
|
line: "bg-primary"
|
|
203
|
-
})[
|
|
204
|
-
|
|
260
|
+
})[r.variant], ae = (e) => e.labelI18n ? rt(e.labelI18n) : e.label, Ie = (e) => e.to ? "router-link" : e.href ? "a" : "button", je = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, Pe = (e) => [
|
|
261
|
+
r.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5",
|
|
205
262
|
"opacity-70 shrink-0 transition-transform duration-200",
|
|
206
263
|
e ? "rotate-180" : ""
|
|
207
264
|
].join(" ");
|
|
208
|
-
return (e,
|
|
209
|
-
|
|
210
|
-
|
|
265
|
+
return (e, a) => (h(), M("div", {
|
|
266
|
+
ref_key: "rootRef",
|
|
267
|
+
ref: H,
|
|
268
|
+
class: i([Ce.value, "group"]),
|
|
269
|
+
dir: V.value
|
|
211
270
|
}, [
|
|
212
|
-
|
|
213
|
-
direction:
|
|
214
|
-
color:
|
|
271
|
+
D(C(me, {
|
|
272
|
+
direction: Oe.value,
|
|
273
|
+
color: ee.value,
|
|
215
274
|
coverage: "100px",
|
|
216
275
|
blur: "40px",
|
|
217
276
|
easing: "smooth",
|
|
218
277
|
tintOpacity: 1,
|
|
219
|
-
class:
|
|
220
|
-
}, null, 8, ["color", "class"]), [
|
|
221
|
-
[
|
|
278
|
+
class: i(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-s-lg"])
|
|
279
|
+
}, null, 8, ["direction", "color", "class"]), [
|
|
280
|
+
[A, B.value]
|
|
222
281
|
]),
|
|
223
|
-
|
|
224
|
-
class:
|
|
282
|
+
D(g("div", {
|
|
283
|
+
class: i(["start-0 ps-1", _.value])
|
|
225
284
|
}, [
|
|
226
|
-
|
|
227
|
-
onClick:
|
|
285
|
+
g("button", {
|
|
286
|
+
onClick: xe,
|
|
228
287
|
class: "pointer-events-auto h-full px-1 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors focus:outline-none",
|
|
229
|
-
"aria-label": "Scroll
|
|
288
|
+
"aria-label": "Scroll backward"
|
|
230
289
|
}, [
|
|
231
|
-
|
|
232
|
-
icon:
|
|
290
|
+
C(S, {
|
|
291
|
+
icon: De.value,
|
|
233
292
|
class: "w-5 h-5"
|
|
234
|
-
})
|
|
293
|
+
}, null, 8, ["icon"])
|
|
235
294
|
])
|
|
236
295
|
], 2), [
|
|
237
|
-
[
|
|
296
|
+
[A, B.value]
|
|
238
297
|
]),
|
|
239
|
-
|
|
298
|
+
g("div", {
|
|
240
299
|
ref_key: "scrollRef",
|
|
241
|
-
ref:
|
|
300
|
+
ref: p,
|
|
242
301
|
class: "tabes-scroll flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
|
|
243
|
-
onScroll:
|
|
302
|
+
onScroll: he
|
|
244
303
|
}, [
|
|
245
|
-
|
|
304
|
+
g("div", {
|
|
246
305
|
ref_key: "containerRef",
|
|
247
306
|
ref: k,
|
|
248
|
-
class:
|
|
307
|
+
class: i([Fe.value, "tabes-container"]),
|
|
249
308
|
role: "tablist",
|
|
250
|
-
"data-variant":
|
|
309
|
+
"data-variant": r.variant,
|
|
251
310
|
"data-tabes": ""
|
|
252
311
|
}, [
|
|
253
|
-
|
|
312
|
+
o.modelValue !== void 0 && !o.wrap ? (h(), M("div", {
|
|
254
313
|
key: 0,
|
|
255
|
-
class:
|
|
256
|
-
style:
|
|
257
|
-
}, null, 6)) :
|
|
258
|
-
(
|
|
314
|
+
class: i(["tabes-marker", [Le.value, Te()]]),
|
|
315
|
+
style: He(w.value)
|
|
316
|
+
}, null, 6)) : N("", !0),
|
|
317
|
+
(h(!0), M(ne, null, We(m.value, (t) => (h(), M(ne, {
|
|
259
318
|
key: t.value
|
|
260
319
|
}, [
|
|
261
|
-
|
|
320
|
+
se(ce)(t) ? (h(), F(tt, {
|
|
262
321
|
key: 0,
|
|
263
322
|
options: t.menu,
|
|
264
|
-
selected:
|
|
323
|
+
selected: o.modelValue,
|
|
265
324
|
disabled: t.disabled,
|
|
266
|
-
|
|
325
|
+
"data-tabes-sortable": "",
|
|
326
|
+
"data-tabes-disabled": t.disabled || void 0,
|
|
327
|
+
direction: Re(t),
|
|
267
328
|
position: t.dropdown?.position,
|
|
268
329
|
offset: t.dropdown?.offset ?? [0, 8],
|
|
269
330
|
searchable: t.dropdown?.searchable ?? !1,
|
|
@@ -277,98 +338,100 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
|
|
|
277
338
|
"show-selected-icon": !1,
|
|
278
339
|
"toggle-selection": !1,
|
|
279
340
|
selectable: !0,
|
|
280
|
-
class:
|
|
281
|
-
onOnSelect: (
|
|
282
|
-
onOnOpen: () =>
|
|
283
|
-
onOnClose: () =>
|
|
341
|
+
class: i(["tabes-menu", "inline-flex!", $e.value]),
|
|
342
|
+
onOnSelect: (n) => Ve(t, n),
|
|
343
|
+
onOnOpen: () => ze(t),
|
|
344
|
+
onOnClose: () => Be(t)
|
|
284
345
|
}, {
|
|
285
|
-
trigger:
|
|
286
|
-
|
|
346
|
+
trigger: oe(({ isOpen: n }) => [
|
|
347
|
+
g("button", {
|
|
287
348
|
ref_for: !0,
|
|
288
|
-
ref: (
|
|
349
|
+
ref: (s) => Y(s, t.value),
|
|
289
350
|
type: "button",
|
|
290
351
|
role: "tab",
|
|
291
352
|
"data-tabes-item": "",
|
|
292
353
|
"data-tabes-menu-trigger": "",
|
|
293
|
-
"aria-selected":
|
|
354
|
+
"aria-selected": se(ue)(t, o.modelValue),
|
|
294
355
|
"aria-haspopup": !0,
|
|
295
|
-
"aria-expanded":
|
|
356
|
+
"aria-expanded": n,
|
|
296
357
|
disabled: t.disabled,
|
|
297
|
-
class:
|
|
358
|
+
class: i([re(t), te[r.size], "w-full"])
|
|
298
359
|
}, [
|
|
299
|
-
t.icon ? (
|
|
360
|
+
t.icon ? (h(), F(S, {
|
|
300
361
|
key: 0,
|
|
301
362
|
icon: t.icon,
|
|
302
|
-
class:
|
|
303
|
-
}, null, 8, ["icon", "class"])) :
|
|
304
|
-
|
|
305
|
-
class:
|
|
306
|
-
},
|
|
307
|
-
|
|
363
|
+
class: i(o.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
364
|
+
}, null, 8, ["icon", "class"])) : N("", !0),
|
|
365
|
+
g("span", {
|
|
366
|
+
class: i(["whitespace-nowrap z-20 relative", o.textClass])
|
|
367
|
+
}, le(ae(t)), 3),
|
|
368
|
+
C(S, {
|
|
308
369
|
icon: "lucide:chevron-down",
|
|
309
|
-
class:
|
|
370
|
+
class: i(Pe(n)),
|
|
310
371
|
"aria-hidden": "true"
|
|
311
372
|
}, null, 8, ["class"])
|
|
312
|
-
], 10,
|
|
373
|
+
], 10, it)
|
|
313
374
|
]),
|
|
314
375
|
_: 2
|
|
315
|
-
}, 1032, ["options", "selected", "disabled", "direction", "position", "offset", "searchable", "close-on-select", "max-height", "min-width", "width", "menu-id", "teleport", "class", "onOnSelect", "onOnOpen", "onOnClose"])) :
|
|
376
|
+
}, 1032, ["options", "selected", "disabled", "data-tabes-disabled", "direction", "position", "offset", "searchable", "close-on-select", "max-height", "min-width", "width", "menu-id", "teleport", "class", "onOnSelect", "onOnOpen", "onOnClose"])) : Ge([t, o.modelValue === t.value, o.size, o.variant, o.block, o.wrap, o.tabClass, o.textClass, o.sortable], () => (h(), F(Qe(Ie(t)), Ue({
|
|
316
377
|
key: 1,
|
|
317
378
|
ref_for: !0,
|
|
318
|
-
ref: (
|
|
379
|
+
ref: (n) => Y(n, t.value),
|
|
319
380
|
role: "tab",
|
|
320
381
|
"data-tabes-item": "",
|
|
321
|
-
"
|
|
382
|
+
"data-tabes-sortable": "",
|
|
383
|
+
"data-tabes-disabled": t.disabled || void 0,
|
|
384
|
+
"aria-selected": o.modelValue === t.value,
|
|
322
385
|
disabled: t.disabled,
|
|
323
|
-
class: [
|
|
324
|
-
}, { ref_for: !0 },
|
|
325
|
-
onClick: (
|
|
386
|
+
class: [re(t), te[r.size]]
|
|
387
|
+
}, { ref_for: !0 }, je(t), {
|
|
388
|
+
onClick: (n) => Se(t)
|
|
326
389
|
}), {
|
|
327
|
-
default:
|
|
328
|
-
t.icon ? (
|
|
390
|
+
default: oe(() => [
|
|
391
|
+
t.icon ? (h(), F(S, {
|
|
329
392
|
key: 0,
|
|
330
393
|
icon: t.icon,
|
|
331
|
-
class:
|
|
332
|
-
}, null, 8, ["icon", "class"])) :
|
|
333
|
-
|
|
334
|
-
class:
|
|
335
|
-
},
|
|
394
|
+
class: i(o.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
|
|
395
|
+
}, null, 8, ["icon", "class"])) : N("", !0),
|
|
396
|
+
g("span", {
|
|
397
|
+
class: i(["whitespace-nowrap z-20 relative", o.textClass])
|
|
398
|
+
}, le(ae(t)), 3)
|
|
336
399
|
]),
|
|
337
400
|
_: 2
|
|
338
|
-
}, 1040, ["aria-selected", "disabled", "class", "onClick"])),
|
|
401
|
+
}, 1040, ["data-tabes-disabled", "aria-selected", "disabled", "class", "onClick"])), a, 0)
|
|
339
402
|
], 64))), 128))
|
|
340
|
-
], 10,
|
|
403
|
+
], 10, lt)
|
|
341
404
|
], 544),
|
|
342
|
-
|
|
343
|
-
direction:
|
|
344
|
-
color:
|
|
405
|
+
D(C(me, {
|
|
406
|
+
direction: Me.value,
|
|
407
|
+
color: ee.value,
|
|
345
408
|
coverage: "100px",
|
|
346
409
|
blur: "40",
|
|
347
410
|
easing: "smooth",
|
|
348
411
|
tintOpacity: 1,
|
|
349
|
-
class:
|
|
350
|
-
}, null, 8, ["color", "class"]), [
|
|
351
|
-
[
|
|
412
|
+
class: i(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-e-lg"])
|
|
413
|
+
}, null, 8, ["direction", "color", "class"]), [
|
|
414
|
+
[A, $.value]
|
|
352
415
|
]),
|
|
353
|
-
|
|
354
|
-
class:
|
|
416
|
+
D(g("div", {
|
|
417
|
+
class: i(["end-0 pe-1", _.value])
|
|
355
418
|
}, [
|
|
356
|
-
|
|
357
|
-
onClick:
|
|
419
|
+
g("button", {
|
|
420
|
+
onClick: ye,
|
|
358
421
|
class: "pointer-events-auto h-full px-1 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors focus:outline-none",
|
|
359
|
-
"aria-label": "Scroll
|
|
422
|
+
"aria-label": "Scroll forward"
|
|
360
423
|
}, [
|
|
361
|
-
|
|
362
|
-
icon:
|
|
424
|
+
C(S, {
|
|
425
|
+
icon: Ae.value,
|
|
363
426
|
class: "w-5 h-5"
|
|
364
|
-
})
|
|
427
|
+
}, null, 8, ["icon"])
|
|
365
428
|
])
|
|
366
429
|
], 2), [
|
|
367
|
-
[
|
|
430
|
+
[A, $.value]
|
|
368
431
|
])
|
|
369
|
-
], 10,
|
|
432
|
+
], 10, ot));
|
|
370
433
|
}
|
|
371
434
|
});
|
|
372
435
|
export {
|
|
373
|
-
|
|
436
|
+
yt as default
|
|
374
437
|
};
|