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.
@@ -1,13 +1,15 @@
1
- import { defineComponent as Te, ref as f, computed as o, watch as m, onMounted as De, onBeforeUnmount as Ie, openBlock as v, createElementBlock as M, normalizeClass as l, withDirectives as A, createVNode as w, vShow as F, createElementVNode as u, normalizeStyle as je, createCommentVNode as j, Fragment as ee, renderList as qe, unref as te, createBlock as O, withCtx as re, toDisplayString as ne, withMemo as Pe, resolveDynamicComponent as He, mergeProps as Ne, nextTick as We } from "vue";
2
- import { useResizeObserver as ae } from "@vueuse/core";
3
- import { getActiveMarkerKey as Ge, isMenuTab as se, isTabActive as oe, scrollTabesStrip as le, getTabesScrollOverflow as Ke } from "./tabes.utils.js";
4
- import { measureTabesMarkerGeometry as Qe, toTabesLocalScrollDelta as ie } from "./TabesMarkerGeometry.js";
5
- import y from "../Icon.vue.js";
6
- import ce from "../FadeOverlay/FadeOverlay.vue.js";
7
- import Ue from "../Dropdown/Dropdown.vue.js";
8
- import { $t as Je } from "../../utils/i18n.js";
9
- import { useRtl as Xe, resolveDirFromAncestors as Ye } from "../../composables/useRtl.js";
10
- const Ze = ["dir"], _e = ["data-variant"], et = ["aria-selected", "aria-expanded", "disabled"], ue = 200, ut = /* @__PURE__ */ Te({
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(s, { emit: de }) {
25
- const r = s, b = de, q = f(null), k = f(null), d = f(null), g = /* @__PURE__ */ new Map(), P = Xe(), L = f(null), C = o(() => r.direction === "rtl" ? "rtl" : r.direction === "ltr" ? "ltr" : L.value ? L.value : P.value ? "rtl" : "ltr"), S = o(() => C.value === "rtl"), H = () => {
26
- L.value = Ye(q.value);
27
- }, V = f(!1), z = f(!1);
28
- let E = 0, N = 0, B = !1, $ = !1, T = 0;
29
- const W = () => {
30
- if (!d.value) return;
31
- const { canScrollStart: e, canScrollEnd: n } = Ke(
32
- d.value
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
- V.value !== e && (V.value = e), z.value !== n && (z.value = n);
35
- }, fe = () => {
36
- $ || ($ = !0, N = requestAnimationFrame(() => {
37
- $ = !1, W();
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
- }, me = () => le(d.value, "start", ue), ve = () => le(d.value, "end", ue), G = o(() => Ge(r.options, r.modelValue)), be = () => {
40
- if (!d.value || !k.value) return;
41
- const e = G.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;
42
72
  if (e === void 0) return;
43
- const n = g.get(e);
44
- if (!n) return;
45
- const t = d.value, a = n.getBoundingClientRect(), i = t.getBoundingClientRect(), p = 40;
46
- a.left < i.left + p ? t.scrollBy({
47
- left: ie(
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
- a.left - i.left - p
79
+ n.left - s.left - u
50
80
  ),
51
81
  behavior: "smooth"
52
- }) : a.right > i.right - p && t.scrollBy({
53
- left: ie(
82
+ }) : n.right > s.right - u && t.scrollBy({
83
+ left: fe(
54
84
  t,
55
- a.right - i.right + p
85
+ n.right - s.right + u
56
86
  ),
57
87
  behavior: "smooth"
58
88
  });
59
- }, K = (e, n) => {
60
- e instanceof HTMLElement ? g.set(n, e) : e && typeof e == "object" && "$el" in e && e.$el instanceof HTMLElement ? g.set(n, e.$el) : g.delete(n);
61
- }, h = f({
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
- }), D = f(!1), Q = () => {
69
- h.value.opacity !== 0 && (h.value = {
70
- ...h.value,
98
+ }), j = d(!1), P = () => {
99
+ w.value.opacity !== 0 && (w.value = {
100
+ ...w.value,
71
101
  opacity: 0
72
102
  });
73
- }, ge = async () => {
74
- await We();
75
- const e = k.value, n = G.value, t = n !== void 0 ? g.get(n) : void 0;
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
- Q();
107
+ P();
78
108
  return;
79
109
  }
80
110
  if (e.offsetWidth <= 0 || t.offsetWidth <= 0) {
81
- Q();
111
+ P();
82
112
  return;
83
113
  }
84
- const { width: a, height: i, left: p, top: Ee } = Qe(e, t), x = {
85
- width: `${a}px`,
86
- height: `${i}px`,
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(${p}px, ${Ee}px)`,
119
+ transform: `translate(${u}px, ${K}px)`,
90
120
  opacity: 1
91
- }, R = h.value;
92
- R.width === x.width && R.height === x.height && R.transform === x.transform && R.opacity === x.opacity || (h.value = x, D.value || (cancelAnimationFrame(T), T = requestAnimationFrame(() => {
93
- D.value = !0;
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 I = !1;
97
- const U = async (e) => {
98
- await ge(), W(), e?.ensureVisible && be();
126
+ let q = !1;
127
+ const Z = async (e) => {
128
+ await ke(), J(), e?.ensureVisible && we();
99
129
  }, c = (e) => {
100
- e?.ensureVisible && (I = !0), !B && (B = !0, cancelAnimationFrame(E), E = requestAnimationFrame(() => {
101
- B = !1;
102
- const n = I;
103
- I = !1, U({ ensureVisible: n });
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
- ae(d, () => c()), ae(k, () => c()), m(
136
+ ie(p, () => c()), ie(k, () => c()), b(
107
137
  () => r.modelValue,
108
138
  () => c({ ensureVisible: !0 })
109
- ), m(
139
+ ), b(
110
140
  () => r.options,
111
- () => c()
112
- ), m(
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
- ), m(
152
+ ), b(
116
153
  () => r.block,
117
154
  () => c()
118
- ), m(
155
+ ), b(
119
156
  () => r.wrap,
120
157
  () => c()
121
- ), m(
158
+ ), b(
122
159
  () => r.variant,
123
160
  () => c()
124
- ), m(P, () => H()), m(C, () => c({ ensureVisible: !0 })), De(() => {
125
- H(), U({ ensureVisible: !0 });
126
- }), Ie(() => {
127
- cancelAnimationFrame(E), cancelAnimationFrame(N), cancelAnimationFrame(T), B = !1, $ = !1, g.clear();
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 he = o(() => {
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
- }), J = o(() => [
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
- ]), pe = (e) => {
136
- e.disabled || se(e) || (b("update:modelValue", e.value), b("change", e.value));
137
- }, xe = (e, n) => {
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 = n.value;
140
- t != null && (b("update:modelValue", t), b("change", t), b("menu-select", { value: t, option: n.option, tab: e }));
141
- }, we = (e) => {
142
- b("menu-open", e);
143
- }, ye = (e) => {
144
- b("menu-close", e), c();
145
- }, ke = o(() => {
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
- }), Ce = (e) => e.dropdown?.direction ?? C.value, Se = o(() => S.value ? "right" : "left"), Ve = o(() => S.value ? "left" : "right"), ze = o(() => S.value ? "lucide:chevron-right" : "lucide:chevron-left"), Be = o(() => S.value ? "lucide:chevron-left" : "lucide:chevron-right"), $e = o(() => {
149
- const e = r.variant === "line", n = {
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}`, n[r.variant]];
159
- }), X = o(() => 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)"), Y = {
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
- }, Re = o(() => {
164
- const e = r.variant === "line", n = 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" : "";
165
- return [n, t];
166
- }), Z = (e) => {
167
- const n = oe(e, r.modelValue), t = r.variant === "line";
168
- let a = "";
169
- if (n)
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
- a = r.wrap ? "text-primary !border-primary" : "text-primary";
221
+ n = r.wrap ? "text-primary !border-primary" : "text-primary";
172
222
  else
173
223
  switch (r.variant) {
174
224
  case "surface":
175
- a = r.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
225
+ n = r.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
176
226
  break;
177
227
  case "primary":
178
- a = r.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
228
+ n = r.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
179
229
  break;
180
230
  case "secondary":
181
- a = r.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
231
+ n = r.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
182
232
  break;
183
233
  case "danger":
184
- a = r.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
234
+ n = r.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
185
235
  break;
186
236
  case "success":
187
- a = r.wrap ? "text-success-fg bg-success" : "text-success-fg";
237
+ n = r.wrap ? "text-success-fg bg-success" : "text-success-fg";
188
238
  break;
189
239
  case "outline":
190
- a = r.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
240
+ n = r.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
191
241
  break;
192
242
  default:
193
- a = "text-foreground";
243
+ n = "text-foreground";
194
244
  }
195
245
  else
196
- a = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
197
- const i = e.disabled ? "opacity-50 cursor-not-allowed" : "";
198
- return [Re.value, a, r?.tabClass, i].join(" ");
199
- }, Me = o(() => {
200
- const n = `absolute z-0 pointer-events-none ${D.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
201
- return r.variant === "line" ? `${n} !h-[2px] !top-auto bottom-0` : `${n} rounded-md shadow-sm`;
202
- }), Ae = () => ({
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], _ = (e) => e.labelI18n ? Je(e.labelI18n) : e.label, Fe = (e) => e.to ? "router-link" : e.href ? "a" : "button", Oe = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, Le = (e) => [
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, n) => (v(), M("div", {
265
+ return (e, a) => (h(), M("div", {
216
266
  ref_key: "rootRef",
217
- ref: q,
218
- class: l([he.value, "group"]),
219
- dir: C.value
267
+ ref: H,
268
+ class: i([Ce.value, "group"]),
269
+ dir: V.value
220
270
  }, [
221
- A(w(ce, {
222
- direction: Se.value,
223
- color: X.value,
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: l(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-s-lg"])
278
+ class: i(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-s-lg"])
229
279
  }, null, 8, ["direction", "color", "class"]), [
230
- [F, V.value]
280
+ [A, B.value]
231
281
  ]),
232
- A(u("div", {
233
- class: l(["start-0 ps-1", J.value])
282
+ D(g("div", {
283
+ class: i(["start-0 ps-1", _.value])
234
284
  }, [
235
- u("button", {
236
- onClick: me,
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
- w(y, {
241
- icon: ze.value,
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
- [F, V.value]
296
+ [A, B.value]
247
297
  ]),
248
- u("div", {
298
+ g("div", {
249
299
  ref_key: "scrollRef",
250
- ref: d,
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: fe
302
+ onScroll: he
253
303
  }, [
254
- u("div", {
304
+ g("div", {
255
305
  ref_key: "containerRef",
256
306
  ref: k,
257
- class: l([$e.value, "tabes-container"]),
307
+ class: i([Fe.value, "tabes-container"]),
258
308
  role: "tablist",
259
309
  "data-variant": r.variant,
260
310
  "data-tabes": ""
261
311
  }, [
262
- s.modelValue !== void 0 && !s.wrap ? (v(), M("div", {
312
+ o.modelValue !== void 0 && !o.wrap ? (h(), M("div", {
263
313
  key: 0,
264
- class: l(["tabes-marker", [Me.value, Ae()]]),
265
- style: je(h.value)
266
- }, null, 6)) : j("", !0),
267
- (v(!0), M(ee, null, qe(s.options, (t) => (v(), M(ee, {
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
- te(se)(t) ? (v(), O(Ue, {
320
+ se(ce)(t) ? (h(), F(tt, {
271
321
  key: 0,
272
322
  options: t.menu,
273
- selected: s.modelValue,
323
+ selected: o.modelValue,
274
324
  disabled: t.disabled,
275
- direction: Ce(t),
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: l(["tabes-menu", "inline-flex!", ke.value]),
290
- onOnSelect: (a) => xe(t, a),
291
- onOnOpen: () => we(t),
292
- onOnClose: () => ye(t)
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: re(({ isOpen: a }) => [
295
- u("button", {
346
+ trigger: oe(({ isOpen: n }) => [
347
+ g("button", {
296
348
  ref_for: !0,
297
- ref: (i) => K(i, t.value),
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": te(oe)(t, s.modelValue),
354
+ "aria-selected": se(ue)(t, o.modelValue),
303
355
  "aria-haspopup": !0,
304
- "aria-expanded": a,
356
+ "aria-expanded": n,
305
357
  disabled: t.disabled,
306
- class: l([Z(t), Y[r.size], "w-full"])
358
+ class: i([re(t), te[r.size], "w-full"])
307
359
  }, [
308
- t.icon ? (v(), O(y, {
360
+ t.icon ? (h(), F(S, {
309
361
  key: 0,
310
362
  icon: t.icon,
311
- class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
312
- }, null, 8, ["icon", "class"])) : j("", !0),
313
- u("span", {
314
- class: l(["whitespace-nowrap z-20 relative", s.textClass])
315
- }, ne(_(t)), 3),
316
- w(y, {
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: l(Le(a)),
370
+ class: i(Pe(n)),
319
371
  "aria-hidden": "true"
320
372
  }, null, 8, ["class"])
321
- ], 10, et)
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"])) : Pe([t, s.modelValue === t.value, s.size, s.variant, s.block, s.wrap, s.tabClass, s.textClass], () => (v(), O(He(Fe(t)), Ne({
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: (a) => K(a, t.value),
379
+ ref: (n) => Y(n, t.value),
328
380
  role: "tab",
329
381
  "data-tabes-item": "",
330
- "aria-selected": s.modelValue === t.value,
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: [Z(t), Y[r.size]]
333
- }, { ref_for: !0 }, Oe(t), {
334
- onClick: (a) => pe(t)
386
+ class: [re(t), te[r.size]]
387
+ }, { ref_for: !0 }, je(t), {
388
+ onClick: (n) => Se(t)
335
389
  }), {
336
- default: re(() => [
337
- t.icon ? (v(), O(y, {
390
+ default: oe(() => [
391
+ t.icon ? (h(), F(S, {
338
392
  key: 0,
339
393
  icon: t.icon,
340
- class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
341
- }, null, 8, ["icon", "class"])) : j("", !0),
342
- u("span", {
343
- class: l(["whitespace-nowrap z-20 relative", s.textClass])
344
- }, ne(_(t)), 3)
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"])), n, 0)
401
+ }, 1040, ["data-tabes-disabled", "aria-selected", "disabled", "class", "onClick"])), a, 0)
348
402
  ], 64))), 128))
349
- ], 10, _e)
403
+ ], 10, lt)
350
404
  ], 544),
351
- A(w(ce, {
352
- direction: Ve.value,
353
- color: X.value,
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: l(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-e-lg"])
412
+ class: i(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-e-lg"])
359
413
  }, null, 8, ["direction", "color", "class"]), [
360
- [F, z.value]
414
+ [A, $.value]
361
415
  ]),
362
- A(u("div", {
363
- class: l(["end-0 pe-1", J.value])
416
+ D(g("div", {
417
+ class: i(["end-0 pe-1", _.value])
364
418
  }, [
365
- u("button", {
366
- onClick: ve,
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
- w(y, {
371
- icon: Be.value,
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
- [F, z.value]
430
+ [A, $.value]
377
431
  ])
378
- ], 10, Ze));
432
+ ], 10, ot));
379
433
  }
380
434
  });
381
435
  export {
382
- ut as default
436
+ yt as default
383
437
  };