vlite3 1.5.6 → 1.5.8

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