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.
Files changed (137) hide show
  1. package/components/AppShell/AppShellLayoutClassic.vue.js +27 -28
  2. package/components/AppShell/AppShellLayoutDashboard.vue.js +48 -48
  3. package/components/AppShell/AppShellLayoutDock.vue.js +51 -51
  4. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +69 -69
  5. package/components/AppShell/AppShellLayoutSidebarFirst.vue.d.ts +2 -2
  6. package/components/AppShell/AppShellLayoutSidebarFirst.vue.js +78 -78
  7. package/components/AppShell/AppShellLayoutStorefront.vue.js +14 -15
  8. package/components/AppShell/useAppShell.d.ts +4 -0
  9. package/components/AppShell/useAppShell.js +45 -40
  10. package/components/AsyncSelect/createAsyncSelect.js +10 -10
  11. package/components/AttachmentsList/AttachmentsList.vue.d.ts +50 -2
  12. package/components/AttachmentsList/AttachmentsList.vue.js +289 -272
  13. package/components/AttachmentsList/types.d.ts +37 -0
  14. package/components/BackButton.vue.js +2 -2
  15. package/components/Button.vue.d.ts +1 -0
  16. package/components/Button.vue.js +5 -241
  17. package/components/Button.vue2.js +245 -2
  18. package/components/ButtonGroup.vue.js +2 -2
  19. package/components/ButtonGroup.vue2.js +4 -1
  20. package/components/Calendar/Calendar.vue2.js +16 -16
  21. package/components/Cart/CartCouponInput.vue.js +24 -24
  22. package/components/Cart/CartEmptyState.vue.js +4 -4
  23. package/components/Cart/CartLineItem.vue.js +33 -33
  24. package/components/Cart/CartVariant1.vue.js +3 -3
  25. package/components/Cart/CartVariant2.vue.js +5 -5
  26. package/components/Cart/CartVariant3.vue.js +25 -25
  27. package/components/Cart/CartVariant4.vue.js +9 -9
  28. package/components/CategoryManager/CategoryManager.vue.d.ts +2 -2
  29. package/components/CategoryManager/CategoryManager.vue2.js +18 -18
  30. package/components/CategoryManager/CategoryNode.vue.js +4 -4
  31. package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
  32. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
  33. package/components/Chat/ChatInterface.vue.js +23 -23
  34. package/components/Clipboard.vue.d.ts +7 -1
  35. package/components/Clipboard.vue.js +19 -17
  36. package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
  37. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  38. package/components/ColorPicker/ColorPicker.vue.js +8 -8
  39. package/components/Comment/CommentEditor.vue.js +14 -14
  40. package/components/Comment/CommentItem.vue2.js +6 -6
  41. package/components/Comment/CommentThread.vue.js +4 -4
  42. package/components/DataList/DataList.vue.js +7 -7
  43. package/components/DataTable/DataTable.vue.d.ts +9 -1
  44. package/components/DataTable/DataTable.vue.js +374 -263
  45. package/components/DataTable/DataTableRow.vue.d.ts +23 -2
  46. package/components/DataTable/DataTableRow.vue.js +5 -198
  47. package/components/DataTable/DataTableRow.vue2.js +360 -2
  48. package/components/DataTable/dataTableHeaders.d.ts +18 -0
  49. package/components/DataTable/dataTableHeaders.js +9 -0
  50. package/components/DataTable/types.d.ts +6 -0
  51. package/components/DatePicker.vue.js +8 -9
  52. package/components/DateRangePicker.vue2.js +34 -34
  53. package/components/Dropdown/Dropdown.vue.d.ts +7 -2
  54. package/components/Dropdown/Dropdown.vue.js +146 -139
  55. package/components/Dropdown/DropdownTrigger.vue.js +6 -6
  56. package/components/ExportData/ExportData.vue.js +15 -15
  57. package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
  58. package/components/FilePicker/FilePickerInput.vue.js +3 -2
  59. package/components/FilePicker/FilePreview.vue.js +3 -3
  60. package/components/FileTree/FileTree.vue.js +4 -4
  61. package/components/FileTree/FileTree.vue2.js +9 -9
  62. package/components/FileTree/FileTreeNode.vue.js +76 -72
  63. package/components/Footer/Variant1.vue.js +48 -48
  64. package/components/Footer/Variant2.vue.js +42 -42
  65. package/components/Form/AccordionView.vue.d.ts +1 -1
  66. package/components/Form/AccordionView.vue.js +2 -2
  67. package/components/Form/AccordionView.vue3.js +61 -57
  68. package/components/Form/Form.vue2.js +41 -41
  69. package/components/Form/TableRow.vue.d.ts +7 -0
  70. package/components/Form/TableRow.vue.js +187 -41
  71. package/components/Form/TableView.vue.d.ts +11 -1
  72. package/components/Form/TableView.vue.js +71 -49
  73. package/components/Form/composables/useForm.js +146 -142
  74. package/components/Form/index.vue.d.ts +5 -1
  75. package/components/Form/index.vue.js +2 -2
  76. package/components/Form/index.vue2.js +44 -37
  77. package/components/Form/rowHelpers.d.ts +20 -0
  78. package/components/Form/rowHelpers.js +76 -28
  79. package/components/Form/types.d.ts +11 -0
  80. package/components/GoogleLogin.vue.js +4 -4
  81. package/components/IconPicker.vue.js +9 -9
  82. package/components/ImportData/ImportData.vue.js +11 -11
  83. package/components/ImportData/ImportStep1.vue.js +10 -10
  84. package/components/ImportData/ImportStep2.vue.js +15 -14
  85. package/components/Input.vue.js +133 -129
  86. package/components/Kanban/KanbanBoard.vue.js +1 -1
  87. package/components/Kanban/KanbanBoard.vue2.js +9 -9
  88. package/components/MultiSelect/MultiSelect.vue.js +3 -2
  89. package/components/Navbar/Navbar.vue.js +17 -17
  90. package/components/Navbar/NavbarGroup.vue.js +8 -7
  91. package/components/Navbar/NavbarItem.vue.js +40 -39
  92. package/components/Navbar/NavbarTabs.vue.js +6 -184
  93. package/components/Navbar/NavbarTabs.vue2.js +204 -0
  94. package/components/Navbar/useNavbar.js +3 -3
  95. package/components/NavbarCommandPalette.vue.js +1 -1
  96. package/components/NumberInput.vue.js +2 -2
  97. package/components/NumberInput.vue2.js +81 -77
  98. package/components/OTPInput/OTPInput.vue.js +24 -23
  99. package/components/Pagination/Pagination.vue.d.ts +1 -1
  100. package/components/Pagination/Pagination.vue.js +5 -274
  101. package/components/Pagination/Pagination.vue2.js +283 -2
  102. package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
  103. package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
  104. package/components/Screen/Screen.vue.d.ts +1 -1
  105. package/components/Screen/Screen.vue.js +21 -21
  106. package/components/Screen/ScreenFilter.vue.js +5 -5
  107. package/components/Screen/components/ScreenAddAction.vue.js +3 -3
  108. package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
  109. package/components/Screen/components/ScreenExportModal.vue.js +12 -12
  110. package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
  111. package/components/Screen/components/ScreenToolbar.vue.js +15 -15
  112. package/components/SidePanel.vue.js +2 -2
  113. package/components/SidePanel.vue2.js +6 -6
  114. package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
  115. package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
  116. package/components/Slider.vue.js +123 -108
  117. package/components/Tabes/Tabes.vue.d.ts +25 -4
  118. package/components/Tabes/Tabes.vue.js +3 -3
  119. package/components/Tabes/Tabes.vue2.js +274 -211
  120. package/components/Tabes/tabes.utils.d.ts +30 -0
  121. package/components/Tabes/tabes.utils.js +49 -18
  122. package/components/Tabes/types.d.ts +7 -0
  123. package/components/Textarea.vue.d.ts +2 -0
  124. package/components/Textarea.vue.js +19 -16
  125. package/components/ThemeToggle.vue.js +8 -8
  126. package/components/ToastNotification.vue2.js +10 -10
  127. package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
  128. package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
  129. package/components/TreeConnectors/geometry.js +77 -69
  130. package/components/Workbook/WorkbookAddButton.vue.js +2 -2
  131. package/composables/useRtl.d.ts +14 -0
  132. package/composables/useRtl.js +33 -0
  133. package/index.js +470 -471
  134. package/package.json +5 -4
  135. package/style.css +86 -1
  136. package/types/button.d.ts +8 -0
  137. package/components/Navbar/NavbarTabs.vue3.js +0 -5
@@ -1,12 +1,15 @@
1
- import { defineComponent as Ce, ref as h, computed as d, watch as p, onMounted as Ve, onBeforeUnmount as ze, openBlock as f, createElementBlock as $, normalizeClass as l, withDirectives as M, createVNode as y, vShow as L, createElementVNode as c, normalizeStyle as Se, createCommentVNode as E, Fragment as J, renderList as Be, unref as X, createBlock as A, withCtx as Y, toDisplayString as Z, withMemo as $e, resolveDynamicComponent as Me, mergeProps as Le, nextTick as Ae } from "vue";
2
- import { useResizeObserver as _ } from "@vueuse/core";
3
- import { getActiveMarkerKey as Oe, isMenuTab as ee, isTabActive as te } from "./tabes.utils.js";
4
- import { measureTabesMarkerGeometry as Re, toTabesLocalScrollDelta as ne } from "./TabesMarkerGeometry.js";
5
- import w from "../Icon.vue.js";
6
- import re from "../FadeOverlay/FadeOverlay.vue.js";
7
- import Fe from "../Dropdown/Dropdown.vue.js";
8
- import { $t as Ie } from "../../utils/i18n.js";
9
- const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded", "disabled"], Qe = /* @__PURE__ */ Ce({
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: "ltr" }
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(s, { emit: ae }) {
24
- const n = s, m = ae, k = h(null), u = h(null), v = /* @__PURE__ */ new Map(), C = h(!1), V = h(!1);
25
- let O = 0, T = 0, z = !1, S = !1, R = 0;
26
- const j = () => {
27
- if (!u.value) return;
28
- const { scrollLeft: e, scrollWidth: r, clientWidth: t } = u.value, a = e > 1, o = Math.ceil(e + t) < r - 1;
29
- C.value !== a && (C.value = a), V.value !== o && (V.value = o);
30
- }, se = () => {
31
- S || (S = !0, T = requestAnimationFrame(() => {
32
- S = !1, j();
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
- }, q = (e) => {
35
- u.value && u.value.scrollBy({ left: e, behavior: "smooth" });
36
- }, D = d(() => Oe(n.options, n.modelValue)), oe = () => {
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 r = v.get(e);
41
- if (!r) return;
42
- const t = u.value, a = r.getBoundingClientRect(), o = t.getBoundingClientRect(), g = 40;
43
- a.left < o.left + g ? t.scrollBy({
44
- left: ne(
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
- a.left - o.left - g
79
+ n.left - s.left - u
47
80
  ),
48
81
  behavior: "smooth"
49
- }) : a.right > o.right - g && t.scrollBy({
50
- left: ne(
82
+ }) : n.right > s.right - u && t.scrollBy({
83
+ left: fe(
51
84
  t,
52
- a.right - o.right + g
85
+ n.right - s.right + u
53
86
  ),
54
87
  behavior: "smooth"
55
88
  });
56
- }, W = (e, r) => {
57
- e instanceof HTMLElement ? v.set(r, e) : e && typeof e == "object" && "$el" in e && e.$el instanceof HTMLElement ? v.set(r, e.$el) : v.delete(r);
58
- }, b = h({
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
- }), F = h(!1), P = () => {
64
- b.value.opacity !== 0 && (b.value = {
65
- ...b.value,
98
+ }), j = d(!1), P = () => {
99
+ w.value.opacity !== 0 && (w.value = {
100
+ ...w.value,
66
101
  opacity: 0
67
102
  });
68
- }, le = async () => {
69
- await Ae();
70
- const e = k.value, r = D.value, t = r !== void 0 ? v.get(r) : 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;
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: a, height: o, left: g, top: ke } = Re(e, t), x = {
80
- width: `${a}px`,
81
- height: `${o}px`,
82
- transform: `translate(${g}px, ${ke}px)`,
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
- }, B = b.value;
85
- B.width === x.width && B.height === x.height && B.transform === x.transform && B.opacity === x.opacity || (b.value = x, F.value || (cancelAnimationFrame(R), R = requestAnimationFrame(() => {
86
- F.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;
87
124
  })));
88
125
  };
89
- let I = !1;
90
- const H = async (e) => {
91
- await le(), j(), e?.ensureVisible && oe();
92
- }, i = (e) => {
93
- e?.ensureVisible && (I = !0), !z && (z = !0, cancelAnimationFrame(O), O = requestAnimationFrame(() => {
94
- z = !1;
95
- const r = I;
96
- I = !1, H({ ensureVisible: r });
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
- _(u, () => i()), _(k, () => i()), p(
100
- () => n.modelValue,
101
- () => i({ ensureVisible: !0 })
102
- ), p(
103
- () => n.options,
104
- () => i()
105
- ), p(
106
- () => n.size,
107
- () => i()
108
- ), p(
109
- () => n.block,
110
- () => i()
111
- ), p(
112
- () => n.wrap,
113
- () => i()
114
- ), p(
115
- () => n.variant,
116
- () => i()
117
- ), Ve(() => {
118
- H({ ensureVisible: !0 });
119
- }), ze(() => {
120
- cancelAnimationFrame(O), cancelAnimationFrame(T), cancelAnimationFrame(R), z = !1, S = !1, v.clear();
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 ie = d(() => {
123
- const e = n.variant === "line";
124
- return n.block || e ? "flex w-full relative" : "inline-flex max-w-full relative";
125
- }), N = d(() => [
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
- n.variant === "line" ? "pb-[10px]" : ""
128
- ]), ce = (e) => {
129
- e.disabled || ee(e) || (m("update:modelValue", e.value), m("change", e.value));
130
- }, ue = (e, r) => {
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 = r.value;
133
- t != null && (m("update:modelValue", t), m("change", t), m("menu-select", { value: t, option: r.option, tab: e }));
134
- }, de = (e) => {
135
- m("menu-open", e);
136
- }, fe = (e) => {
137
- m("menu-close", e), i();
138
- }, me = d(() => {
139
- const e = n.variant === "line";
140
- return (n.block || n.wrap) && !e ? "flex-1 min-w-max" : "shrink-0";
141
- }), ve = (e) => e.dropdown?.direction ?? n.direction, be = d(() => {
142
- const e = n.variant === "line", r = {
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 = n.wrap && !e ? "flex-wrap" : "";
151
- return [`${n.block || e ? "flex min-w-full w-max" : "inline-flex"} rounded-lg relative isolate ${t}`, r[n.variant]];
152
- }), G = d(() => n.variant === "surface" || n.variant === "primary" || n.variant === "secondary" ? "var(--color-secondary)" : n.variant === "danger" ? "color-mix(in srgb, var(--color-danger) 10%, transparent)" : n.variant === "success" ? "color-mix(in srgb, var(--color-success) 10%, transparent)" : "var(--color-background)"), K = {
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
- }, ge = d(() => {
157
- const e = n.variant === "line", r = 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 = (n.block || n.wrap) && !e ? "flex-1" : "";
158
- return [r, t];
159
- }), Q = (e) => {
160
- const r = te(e, n.modelValue), t = n.variant === "line";
161
- let a = "";
162
- if (r)
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
- a = n.wrap ? "text-primary !border-primary" : "text-primary";
221
+ n = r.wrap ? "text-primary !border-primary" : "text-primary";
165
222
  else
166
- switch (n.variant) {
223
+ switch (r.variant) {
167
224
  case "surface":
168
- a = n.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";
169
226
  break;
170
227
  case "primary":
171
- a = n.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
228
+ n = r.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
172
229
  break;
173
230
  case "secondary":
174
- a = n.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
231
+ n = r.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
175
232
  break;
176
233
  case "danger":
177
- a = n.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
234
+ n = r.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
178
235
  break;
179
236
  case "success":
180
- a = n.wrap ? "text-success-fg bg-success" : "text-success-fg";
237
+ n = r.wrap ? "text-success-fg bg-success" : "text-success-fg";
181
238
  break;
182
239
  case "outline":
183
- a = n.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";
184
241
  break;
185
242
  default:
186
- a = "text-foreground";
243
+ n = "text-foreground";
187
244
  }
188
245
  else
189
- a = t ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
190
- const o = e.disabled ? "opacity-50 cursor-not-allowed" : "";
191
- return [ge.value, a, n?.tabClass, o].join(" ");
192
- }, he = d(() => {
193
- const r = `absolute left-0 top-0 z-0 pointer-events-none ${F.value ? "transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]" : ""}`;
194
- return n.variant === "line" ? `${r} !h-[2px] !top-auto bottom-0` : `${r} rounded-md shadow-sm`;
195
- }), pe = () => ({
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
- })[n.variant], U = (e) => e.labelI18n ? Ie(e.labelI18n) : e.label, xe = (e) => e.to ? "router-link" : e.href ? "a" : "button", ye = (e) => e.to ? { to: e.to } : e.href ? { href: e.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, we = (e) => [
204
- n.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5",
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, r) => (f(), $("div", {
209
- class: l([ie.value, "group"]),
210
- dir: s.direction
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
- M(y(re, {
213
- direction: "left",
214
- color: G.value,
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: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-l-lg"])
220
- }, null, 8, ["color", "class"]), [
221
- [L, C.value]
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
- M(c("div", {
224
- class: l(["left-0 pl-1", N.value])
282
+ D(g("div", {
283
+ class: i(["start-0 ps-1", _.value])
225
284
  }, [
226
- c("button", {
227
- onClick: r[0] || (r[0] = (t) => q(-200)),
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 left"
288
+ "aria-label": "Scroll backward"
230
289
  }, [
231
- y(w, {
232
- icon: "lucide:chevron-left",
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
- [L, C.value]
296
+ [A, B.value]
238
297
  ]),
239
- c("div", {
298
+ g("div", {
240
299
  ref_key: "scrollRef",
241
- ref: u,
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: se
302
+ onScroll: he
244
303
  }, [
245
- c("div", {
304
+ g("div", {
246
305
  ref_key: "containerRef",
247
306
  ref: k,
248
- class: l([be.value, "tabes-container"]),
307
+ class: i([Fe.value, "tabes-container"]),
249
308
  role: "tablist",
250
- "data-variant": n.variant,
309
+ "data-variant": r.variant,
251
310
  "data-tabes": ""
252
311
  }, [
253
- s.modelValue !== void 0 && !s.wrap ? (f(), $("div", {
312
+ o.modelValue !== void 0 && !o.wrap ? (h(), M("div", {
254
313
  key: 0,
255
- class: l(["tabes-marker", [he.value, pe()]]),
256
- style: Se(b.value)
257
- }, null, 6)) : E("", !0),
258
- (f(!0), $(J, null, Be(s.options, (t) => (f(), $(J, {
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
- X(ee)(t) ? (f(), A(Fe, {
320
+ se(ce)(t) ? (h(), F(tt, {
262
321
  key: 0,
263
322
  options: t.menu,
264
- selected: s.modelValue,
323
+ selected: o.modelValue,
265
324
  disabled: t.disabled,
266
- direction: ve(t),
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: l(["tabes-menu", "inline-flex!", me.value]),
281
- onOnSelect: (a) => ue(t, a),
282
- onOnOpen: () => de(t),
283
- onOnClose: () => fe(t)
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: Y(({ isOpen: a }) => [
286
- c("button", {
346
+ trigger: oe(({ isOpen: n }) => [
347
+ g("button", {
287
348
  ref_for: !0,
288
- ref: (o) => W(o, t.value),
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": X(te)(t, s.modelValue),
354
+ "aria-selected": se(ue)(t, o.modelValue),
294
355
  "aria-haspopup": !0,
295
- "aria-expanded": a,
356
+ "aria-expanded": n,
296
357
  disabled: t.disabled,
297
- class: l([Q(t), K[n.size], "w-full"])
358
+ class: i([re(t), te[r.size], "w-full"])
298
359
  }, [
299
- t.icon ? (f(), A(w, {
360
+ t.icon ? (h(), F(S, {
300
361
  key: 0,
301
362
  icon: t.icon,
302
- class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
303
- }, null, 8, ["icon", "class"])) : E("", !0),
304
- c("span", {
305
- class: l(["whitespace-nowrap z-20 relative", s.textClass])
306
- }, Z(U(t)), 3),
307
- y(w, {
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: l(we(a)),
370
+ class: i(Pe(n)),
310
371
  "aria-hidden": "true"
311
372
  }, null, 8, ["class"])
312
- ], 10, je)
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"])) : $e([t, s.modelValue === t.value, s.size, s.variant, s.block, s.wrap, s.tabClass, s.textClass], () => (f(), A(Me(xe(t)), Le({
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: (a) => W(a, t.value),
379
+ ref: (n) => Y(n, t.value),
319
380
  role: "tab",
320
381
  "data-tabes-item": "",
321
- "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,
322
385
  disabled: t.disabled,
323
- class: [Q(t), K[n.size]]
324
- }, { ref_for: !0 }, ye(t), {
325
- onClick: (a) => ce(t)
386
+ class: [re(t), te[r.size]]
387
+ }, { ref_for: !0 }, je(t), {
388
+ onClick: (n) => Se(t)
326
389
  }), {
327
- default: Y(() => [
328
- t.icon ? (f(), A(w, {
390
+ default: oe(() => [
391
+ t.icon ? (h(), F(S, {
329
392
  key: 0,
330
393
  icon: t.icon,
331
- class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
332
- }, null, 8, ["icon", "class"])) : E("", !0),
333
- c("span", {
334
- class: l(["whitespace-nowrap z-20 relative", s.textClass])
335
- }, Z(U(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)
336
399
  ]),
337
400
  _: 2
338
- }, 1040, ["aria-selected", "disabled", "class", "onClick"])), r, 1)
401
+ }, 1040, ["data-tabes-disabled", "aria-selected", "disabled", "class", "onClick"])), a, 0)
339
402
  ], 64))), 128))
340
- ], 10, Te)
403
+ ], 10, lt)
341
404
  ], 544),
342
- M(y(re, {
343
- direction: "right",
344
- color: G.value,
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: l(["z-10 pointer-events-none", n.variant === "line" ? "" : "rounded-r-lg"])
350
- }, null, 8, ["color", "class"]), [
351
- [L, V.value]
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
- M(c("div", {
354
- class: l(["right-0 pr-1", N.value])
416
+ D(g("div", {
417
+ class: i(["end-0 pe-1", _.value])
355
418
  }, [
356
- c("button", {
357
- onClick: r[2] || (r[2] = (t) => q(200)),
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 right"
422
+ "aria-label": "Scroll forward"
360
423
  }, [
361
- y(w, {
362
- icon: "lucide:chevron-right",
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
- [L, V.value]
430
+ [A, $.value]
368
431
  ])
369
- ], 10, Ee));
432
+ ], 10, ot));
370
433
  }
371
434
  });
372
435
  export {
373
- Qe as default
436
+ yt as default
374
437
  };