vlite3 1.4.41 → 1.5.1
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/Button.vue.js +2 -2
- package/components/Button.vue2.js +10 -10
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue2.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/DataTable.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Form/{AccordionView.vue2.js → AccordionView.vue.js} +1 -1
- package/components/Form/index.vue2.js +1 -1
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Screen/components/ScreenAddAction.vue.js +10 -10
- package/components/Screen/components/ScreenHeaderTitle.vue.js +11 -11
- package/components/Tabes/Tabes.vue.d.ts +17 -1
- package/components/Tabes/Tabes.vue.js +3 -3
- package/components/Tabes/Tabes.vue2.js +243 -189
- package/components/Tabes/tabes.utils.d.ts +7 -0
- package/components/Tabes/tabes.utils.js +30 -22
- package/components/Tabes/types.d.ts +7 -0
- package/components/ToastNotification.vue.js +2 -2
- package/components/ToastNotification.vue2.js +38 -36
- package/package.json +5 -4
- package/style.css +10 -1
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
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({
|
|
11
13
|
__name: "Tabes",
|
|
12
14
|
props: {
|
|
13
15
|
options: {},
|
|
@@ -18,135 +20,183 @@ const Ze = ["dir"], _e = ["data-variant"], et = ["aria-selected", "aria-expanded
|
|
|
18
20
|
textClass: {},
|
|
19
21
|
wrap: { type: Boolean, default: !1 },
|
|
20
22
|
tabClass: {},
|
|
21
|
-
direction: { default: "auto" }
|
|
23
|
+
direction: { default: "auto" },
|
|
24
|
+
sortable: { type: Boolean, default: !1 },
|
|
25
|
+
storageKey: {}
|
|
22
26
|
},
|
|
23
|
-
emits: ["update:modelValue", "change", "menu-select", "menu-open", "menu-close"],
|
|
24
|
-
setup(
|
|
25
|
-
const r =
|
|
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
|
|
33
63
|
);
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
64
|
+
B.value !== e && (B.value = e), $.value !== a && ($.value = a);
|
|
65
|
+
}, he = () => {
|
|
66
|
+
O || (O = !0, U = requestAnimationFrame(() => {
|
|
67
|
+
O = !1, J();
|
|
38
68
|
}));
|
|
39
|
-
},
|
|
40
|
-
if (!
|
|
41
|
-
const e =
|
|
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;
|
|
42
72
|
if (e === void 0) return;
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
const t =
|
|
46
|
-
|
|
47
|
-
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(
|
|
48
78
|
t,
|
|
49
|
-
|
|
79
|
+
n.left - s.left - u
|
|
50
80
|
),
|
|
51
81
|
behavior: "smooth"
|
|
52
|
-
}) :
|
|
53
|
-
left:
|
|
82
|
+
}) : n.right > s.right - u && t.scrollBy({
|
|
83
|
+
left: fe(
|
|
54
84
|
t,
|
|
55
|
-
|
|
85
|
+
n.right - s.right + u
|
|
56
86
|
),
|
|
57
87
|
behavior: "smooth"
|
|
58
88
|
});
|
|
59
|
-
},
|
|
60
|
-
e instanceof HTMLElement ?
|
|
61
|
-
},
|
|
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({
|
|
62
92
|
width: "0px",
|
|
63
93
|
height: "0px",
|
|
64
94
|
left: "0px",
|
|
65
95
|
top: "0px",
|
|
66
96
|
transform: "translate(0px, 0px)",
|
|
67
97
|
opacity: 0
|
|
68
|
-
}),
|
|
69
|
-
|
|
70
|
-
...
|
|
98
|
+
}), j = d(!1), P = () => {
|
|
99
|
+
w.value.opacity !== 0 && (w.value = {
|
|
100
|
+
...w.value,
|
|
71
101
|
opacity: 0
|
|
72
102
|
});
|
|
73
|
-
},
|
|
74
|
-
await
|
|
75
|
-
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;
|
|
76
106
|
if (!e || !t) {
|
|
77
|
-
|
|
107
|
+
P();
|
|
78
108
|
return;
|
|
79
109
|
}
|
|
80
110
|
if (e.offsetWidth <= 0 || t.offsetWidth <= 0) {
|
|
81
|
-
|
|
111
|
+
P();
|
|
82
112
|
return;
|
|
83
113
|
}
|
|
84
|
-
const { width:
|
|
85
|
-
width: `${
|
|
86
|
-
height: `${
|
|
114
|
+
const { width: n, height: s, left: u, top: K } = et(e, t), v = {
|
|
115
|
+
width: `${n}px`,
|
|
116
|
+
height: `${s}px`,
|
|
87
117
|
left: "0px",
|
|
88
118
|
top: "0px",
|
|
89
|
-
transform: `translate(${
|
|
119
|
+
transform: `translate(${u}px, ${K}px)`,
|
|
90
120
|
opacity: 1
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
|
|
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;
|
|
94
124
|
})));
|
|
95
125
|
};
|
|
96
|
-
let
|
|
97
|
-
const
|
|
98
|
-
await
|
|
126
|
+
let q = !1;
|
|
127
|
+
const Z = async (e) => {
|
|
128
|
+
await ke(), J(), e?.ensureVisible && we();
|
|
99
129
|
}, c = (e) => {
|
|
100
|
-
e?.ensureVisible && (
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
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 });
|
|
104
134
|
}));
|
|
105
135
|
};
|
|
106
|
-
|
|
136
|
+
ie(p, () => c()), ie(k, () => c()), b(
|
|
107
137
|
() => r.modelValue,
|
|
108
138
|
() => c({ ensureVisible: !0 })
|
|
109
|
-
),
|
|
139
|
+
), b(
|
|
110
140
|
() => r.options,
|
|
111
|
-
() =>
|
|
112
|
-
|
|
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(
|
|
113
150
|
() => r.size,
|
|
114
151
|
() => c()
|
|
115
|
-
),
|
|
152
|
+
), b(
|
|
116
153
|
() => r.block,
|
|
117
154
|
() => c()
|
|
118
|
-
),
|
|
155
|
+
), b(
|
|
119
156
|
() => r.wrap,
|
|
120
157
|
() => c()
|
|
121
|
-
),
|
|
158
|
+
), b(
|
|
122
159
|
() => r.variant,
|
|
123
160
|
() => c()
|
|
124
|
-
),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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();
|
|
128
178
|
});
|
|
129
|
-
const
|
|
179
|
+
const Ce = l(() => {
|
|
130
180
|
const e = r.variant === "line";
|
|
131
181
|
return r.block || e ? "flex w-full relative" : "inline-flex max-w-full relative";
|
|
132
|
-
}),
|
|
182
|
+
}), _ = l(() => [
|
|
133
183
|
"absolute top-0 bottom-0 z-20 flex items-center pointer-events-none transition-opacity duration-200",
|
|
134
184
|
r.variant === "line" ? "pb-[10px]" : ""
|
|
135
|
-
]),
|
|
136
|
-
e.disabled ||
|
|
137
|
-
},
|
|
185
|
+
]), Se = (e) => {
|
|
186
|
+
e.disabled || ce(e) || (f("update:modelValue", e.value), f("change", e.value));
|
|
187
|
+
}, Ve = (e, a) => {
|
|
138
188
|
if (e.disabled) return;
|
|
139
|
-
const t =
|
|
140
|
-
t != null && (
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
},
|
|
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(() => {
|
|
146
196
|
const e = r.variant === "line";
|
|
147
197
|
return (r.block || r.wrap) && !e ? "flex-1 min-w-max" : "shrink-0";
|
|
148
|
-
}),
|
|
149
|
-
const e = r.variant === "line",
|
|
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 = {
|
|
150
200
|
surface: "bg-secondary/80 p-1",
|
|
151
201
|
primary: "bg-secondary p-1",
|
|
152
202
|
secondary: "bg-secondary p-1",
|
|
@@ -155,51 +205,51 @@ const Ze = ["dir"], _e = ["data-variant"], et = ["aria-selected", "aria-expanded
|
|
|
155
205
|
outline: "bg-transparent border border-border p-1",
|
|
156
206
|
line: "bg-transparent gap-6 rounded-none p-0 border-b border-border"
|
|
157
207
|
}, t = r.wrap && !e ? "flex-wrap" : "";
|
|
158
|
-
return [`${r.block || e ? "flex min-w-full w-max" : "inline-flex"} rounded-lg relative isolate ${t}`,
|
|
159
|
-
}),
|
|
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 = {
|
|
160
210
|
sm: "text-xs px-2.5 py-1",
|
|
161
211
|
md: "-text-fs-2 px-3 py-1",
|
|
162
212
|
lg: "-text-fs-1 px-4 py-1"
|
|
163
|
-
},
|
|
164
|
-
const e = r.variant === "line",
|
|
165
|
-
return [
|
|
166
|
-
}),
|
|
167
|
-
const
|
|
168
|
-
let
|
|
169
|
-
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)
|
|
170
220
|
if (t)
|
|
171
|
-
|
|
221
|
+
n = r.wrap ? "text-primary !border-primary" : "text-primary";
|
|
172
222
|
else
|
|
173
223
|
switch (r.variant) {
|
|
174
224
|
case "surface":
|
|
175
|
-
|
|
225
|
+
n = r.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
|
|
176
226
|
break;
|
|
177
227
|
case "primary":
|
|
178
|
-
|
|
228
|
+
n = r.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
|
|
179
229
|
break;
|
|
180
230
|
case "secondary":
|
|
181
|
-
|
|
231
|
+
n = r.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
|
|
182
232
|
break;
|
|
183
233
|
case "danger":
|
|
184
|
-
|
|
234
|
+
n = r.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
|
|
185
235
|
break;
|
|
186
236
|
case "success":
|
|
187
|
-
|
|
237
|
+
n = r.wrap ? "text-success-fg bg-success" : "text-success-fg";
|
|
188
238
|
break;
|
|
189
239
|
case "outline":
|
|
190
|
-
|
|
240
|
+
n = r.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
|
|
191
241
|
break;
|
|
192
242
|
default:
|
|
193
|
-
|
|
243
|
+
n = "text-foreground";
|
|
194
244
|
}
|
|
195
245
|
else
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
return [
|
|
199
|
-
},
|
|
200
|
-
const
|
|
201
|
-
return r.variant === "line" ? `${
|
|
202
|
-
}),
|
|
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 = () => ({
|
|
203
253
|
surface: "bg-[#ffff] dark:bg-[#0B0B0B]",
|
|
204
254
|
primary: "bg-primary",
|
|
205
255
|
secondary: "bg-secondary-foreground",
|
|
@@ -207,72 +257,74 @@ const Ze = ["dir"], _e = ["data-variant"], et = ["aria-selected", "aria-expanded
|
|
|
207
257
|
success: "bg-success",
|
|
208
258
|
outline: "bg-accent/50 ring-1 ring-border",
|
|
209
259
|
line: "bg-primary"
|
|
210
|
-
})[r.variant],
|
|
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) => [
|
|
211
261
|
r.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5",
|
|
212
262
|
"opacity-70 shrink-0 transition-transform duration-200",
|
|
213
263
|
e ? "rotate-180" : ""
|
|
214
264
|
].join(" ");
|
|
215
|
-
return (e,
|
|
265
|
+
return (e, a) => (h(), M("div", {
|
|
216
266
|
ref_key: "rootRef",
|
|
217
|
-
ref:
|
|
218
|
-
class:
|
|
219
|
-
dir:
|
|
267
|
+
ref: H,
|
|
268
|
+
class: i([Ce.value, "group"]),
|
|
269
|
+
dir: V.value
|
|
220
270
|
}, [
|
|
221
|
-
|
|
222
|
-
direction:
|
|
223
|
-
color:
|
|
271
|
+
D(C(me, {
|
|
272
|
+
direction: Oe.value,
|
|
273
|
+
color: ee.value,
|
|
224
274
|
coverage: "100px",
|
|
225
275
|
blur: "40px",
|
|
226
276
|
easing: "smooth",
|
|
227
277
|
tintOpacity: 1,
|
|
228
|
-
class:
|
|
278
|
+
class: i(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-s-lg"])
|
|
229
279
|
}, null, 8, ["direction", "color", "class"]), [
|
|
230
|
-
[
|
|
280
|
+
[A, B.value]
|
|
231
281
|
]),
|
|
232
|
-
|
|
233
|
-
class:
|
|
282
|
+
D(g("div", {
|
|
283
|
+
class: i(["start-0 ps-1", _.value])
|
|
234
284
|
}, [
|
|
235
|
-
|
|
236
|
-
onClick:
|
|
285
|
+
g("button", {
|
|
286
|
+
onClick: xe,
|
|
237
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",
|
|
238
288
|
"aria-label": "Scroll backward"
|
|
239
289
|
}, [
|
|
240
|
-
|
|
241
|
-
icon:
|
|
290
|
+
C(S, {
|
|
291
|
+
icon: De.value,
|
|
242
292
|
class: "w-5 h-5"
|
|
243
293
|
}, null, 8, ["icon"])
|
|
244
294
|
])
|
|
245
295
|
], 2), [
|
|
246
|
-
[
|
|
296
|
+
[A, B.value]
|
|
247
297
|
]),
|
|
248
|
-
|
|
298
|
+
g("div", {
|
|
249
299
|
ref_key: "scrollRef",
|
|
250
|
-
ref:
|
|
300
|
+
ref: p,
|
|
251
301
|
class: "tabes-scroll flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
|
|
252
|
-
onScroll:
|
|
302
|
+
onScroll: he
|
|
253
303
|
}, [
|
|
254
|
-
|
|
304
|
+
g("div", {
|
|
255
305
|
ref_key: "containerRef",
|
|
256
306
|
ref: k,
|
|
257
|
-
class:
|
|
307
|
+
class: i([Fe.value, "tabes-container"]),
|
|
258
308
|
role: "tablist",
|
|
259
309
|
"data-variant": r.variant,
|
|
260
310
|
"data-tabes": ""
|
|
261
311
|
}, [
|
|
262
|
-
|
|
312
|
+
o.modelValue !== void 0 && !o.wrap ? (h(), M("div", {
|
|
263
313
|
key: 0,
|
|
264
|
-
class:
|
|
265
|
-
style:
|
|
266
|
-
}, null, 6)) :
|
|
267
|
-
(
|
|
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, {
|
|
268
318
|
key: t.value
|
|
269
319
|
}, [
|
|
270
|
-
|
|
320
|
+
se(ce)(t) ? (h(), F(tt, {
|
|
271
321
|
key: 0,
|
|
272
322
|
options: t.menu,
|
|
273
|
-
selected:
|
|
323
|
+
selected: o.modelValue,
|
|
274
324
|
disabled: t.disabled,
|
|
275
|
-
|
|
325
|
+
"data-tabes-sortable": "",
|
|
326
|
+
"data-tabes-disabled": t.disabled || void 0,
|
|
327
|
+
direction: Re(t),
|
|
276
328
|
position: t.dropdown?.position,
|
|
277
329
|
offset: t.dropdown?.offset ?? [0, 8],
|
|
278
330
|
searchable: t.dropdown?.searchable ?? !1,
|
|
@@ -286,98 +338,100 @@ const Ze = ["dir"], _e = ["data-variant"], et = ["aria-selected", "aria-expanded
|
|
|
286
338
|
"show-selected-icon": !1,
|
|
287
339
|
"toggle-selection": !1,
|
|
288
340
|
selectable: !0,
|
|
289
|
-
class:
|
|
290
|
-
onOnSelect: (
|
|
291
|
-
onOnOpen: () =>
|
|
292
|
-
onOnClose: () =>
|
|
341
|
+
class: i(["tabes-menu", "inline-flex!", $e.value]),
|
|
342
|
+
onOnSelect: (n) => Ve(t, n),
|
|
343
|
+
onOnOpen: () => ze(t),
|
|
344
|
+
onOnClose: () => Be(t)
|
|
293
345
|
}, {
|
|
294
|
-
trigger:
|
|
295
|
-
|
|
346
|
+
trigger: oe(({ isOpen: n }) => [
|
|
347
|
+
g("button", {
|
|
296
348
|
ref_for: !0,
|
|
297
|
-
ref: (
|
|
349
|
+
ref: (s) => Y(s, t.value),
|
|
298
350
|
type: "button",
|
|
299
351
|
role: "tab",
|
|
300
352
|
"data-tabes-item": "",
|
|
301
353
|
"data-tabes-menu-trigger": "",
|
|
302
|
-
"aria-selected":
|
|
354
|
+
"aria-selected": se(ue)(t, o.modelValue),
|
|
303
355
|
"aria-haspopup": !0,
|
|
304
|
-
"aria-expanded":
|
|
356
|
+
"aria-expanded": n,
|
|
305
357
|
disabled: t.disabled,
|
|
306
|
-
class:
|
|
358
|
+
class: i([re(t), te[r.size], "w-full"])
|
|
307
359
|
}, [
|
|
308
|
-
t.icon ? (
|
|
360
|
+
t.icon ? (h(), F(S, {
|
|
309
361
|
key: 0,
|
|
310
362
|
icon: t.icon,
|
|
311
|
-
class:
|
|
312
|
-
}, null, 8, ["icon", "class"])) :
|
|
313
|
-
|
|
314
|
-
class:
|
|
315
|
-
},
|
|
316
|
-
|
|
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, {
|
|
317
369
|
icon: "lucide:chevron-down",
|
|
318
|
-
class:
|
|
370
|
+
class: i(Pe(n)),
|
|
319
371
|
"aria-hidden": "true"
|
|
320
372
|
}, null, 8, ["class"])
|
|
321
|
-
], 10,
|
|
373
|
+
], 10, it)
|
|
322
374
|
]),
|
|
323
375
|
_: 2
|
|
324
|
-
}, 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({
|
|
325
377
|
key: 1,
|
|
326
378
|
ref_for: !0,
|
|
327
|
-
ref: (
|
|
379
|
+
ref: (n) => Y(n, t.value),
|
|
328
380
|
role: "tab",
|
|
329
381
|
"data-tabes-item": "",
|
|
330
|
-
"
|
|
382
|
+
"data-tabes-sortable": "",
|
|
383
|
+
"data-tabes-disabled": t.disabled || void 0,
|
|
384
|
+
"aria-selected": o.modelValue === t.value,
|
|
331
385
|
disabled: t.disabled,
|
|
332
|
-
class: [
|
|
333
|
-
}, { ref_for: !0 },
|
|
334
|
-
onClick: (
|
|
386
|
+
class: [re(t), te[r.size]]
|
|
387
|
+
}, { ref_for: !0 }, je(t), {
|
|
388
|
+
onClick: (n) => Se(t)
|
|
335
389
|
}), {
|
|
336
|
-
default:
|
|
337
|
-
t.icon ? (
|
|
390
|
+
default: oe(() => [
|
|
391
|
+
t.icon ? (h(), F(S, {
|
|
338
392
|
key: 0,
|
|
339
393
|
icon: t.icon,
|
|
340
|
-
class:
|
|
341
|
-
}, null, 8, ["icon", "class"])) :
|
|
342
|
-
|
|
343
|
-
class:
|
|
344
|
-
},
|
|
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)
|
|
345
399
|
]),
|
|
346
400
|
_: 2
|
|
347
|
-
}, 1040, ["aria-selected", "disabled", "class", "onClick"])),
|
|
401
|
+
}, 1040, ["data-tabes-disabled", "aria-selected", "disabled", "class", "onClick"])), a, 0)
|
|
348
402
|
], 64))), 128))
|
|
349
|
-
], 10,
|
|
403
|
+
], 10, lt)
|
|
350
404
|
], 544),
|
|
351
|
-
|
|
352
|
-
direction:
|
|
353
|
-
color:
|
|
405
|
+
D(C(me, {
|
|
406
|
+
direction: Me.value,
|
|
407
|
+
color: ee.value,
|
|
354
408
|
coverage: "100px",
|
|
355
409
|
blur: "40",
|
|
356
410
|
easing: "smooth",
|
|
357
411
|
tintOpacity: 1,
|
|
358
|
-
class:
|
|
412
|
+
class: i(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-e-lg"])
|
|
359
413
|
}, null, 8, ["direction", "color", "class"]), [
|
|
360
|
-
[
|
|
414
|
+
[A, $.value]
|
|
361
415
|
]),
|
|
362
|
-
|
|
363
|
-
class:
|
|
416
|
+
D(g("div", {
|
|
417
|
+
class: i(["end-0 pe-1", _.value])
|
|
364
418
|
}, [
|
|
365
|
-
|
|
366
|
-
onClick:
|
|
419
|
+
g("button", {
|
|
420
|
+
onClick: ye,
|
|
367
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",
|
|
368
422
|
"aria-label": "Scroll forward"
|
|
369
423
|
}, [
|
|
370
|
-
|
|
371
|
-
icon:
|
|
424
|
+
C(S, {
|
|
425
|
+
icon: Ae.value,
|
|
372
426
|
class: "w-5 h-5"
|
|
373
427
|
}, null, 8, ["icon"])
|
|
374
428
|
])
|
|
375
429
|
], 2), [
|
|
376
|
-
[
|
|
430
|
+
[A, $.value]
|
|
377
431
|
])
|
|
378
|
-
], 10,
|
|
432
|
+
], 10, ot));
|
|
379
433
|
}
|
|
380
434
|
});
|
|
381
435
|
export {
|
|
382
|
-
|
|
436
|
+
yt as default
|
|
383
437
|
};
|