vlite3 1.4.39 → 1.4.41

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 (135) 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.vue2.js +18 -18
  29. package/components/CategoryManager/CategoryNode.vue.js +4 -4
  30. package/components/CategoryMenu/CategoryMenu.vue.js +3 -2
  31. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +3 -2
  32. package/components/Chat/ChatInterface.vue.js +23 -23
  33. package/components/Clipboard.vue.d.ts +7 -1
  34. package/components/Clipboard.vue.js +19 -17
  35. package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +22 -22
  36. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  37. package/components/ColorPicker/ColorPicker.vue.js +8 -8
  38. package/components/Comment/CommentEditor.vue.js +14 -14
  39. package/components/Comment/CommentItem.vue2.js +6 -6
  40. package/components/Comment/CommentThread.vue.js +4 -4
  41. package/components/DataList/DataList.vue.js +7 -7
  42. package/components/DataTable/DataTable.vue.d.ts +9 -0
  43. package/components/DataTable/DataTable.vue.js +380 -265
  44. package/components/DataTable/DataTableRow.vue.d.ts +23 -2
  45. package/components/DataTable/DataTableRow.vue.js +5 -198
  46. package/components/DataTable/DataTableRow.vue2.js +360 -2
  47. package/components/DataTable/dataTableHeaders.d.ts +18 -0
  48. package/components/DataTable/dataTableHeaders.js +9 -0
  49. package/components/DataTable/types.d.ts +11 -0
  50. package/components/DatePicker.vue.js +8 -9
  51. package/components/DateRangePicker.vue2.js +34 -34
  52. package/components/Dropdown/Dropdown.vue.d.ts +7 -2
  53. package/components/Dropdown/Dropdown.vue.js +146 -139
  54. package/components/Dropdown/DropdownTrigger.vue.js +6 -6
  55. package/components/ExportData/ExportData.vue.js +15 -15
  56. package/components/FilePicker/FilePickerDropzone.vue.js +16 -16
  57. package/components/FilePicker/FilePickerInput.vue.js +3 -2
  58. package/components/FilePicker/FilePreview.vue.js +3 -3
  59. package/components/FileTree/FileTree.vue.js +4 -4
  60. package/components/FileTree/FileTree.vue2.js +9 -9
  61. package/components/FileTree/FileTreeNode.vue.js +76 -72
  62. package/components/Footer/Variant1.vue.js +48 -48
  63. package/components/Footer/Variant2.vue.js +42 -42
  64. package/components/Form/AccordionView.vue.d.ts +1 -1
  65. package/components/Form/AccordionView.vue2.js +2 -2
  66. package/components/Form/AccordionView.vue3.js +61 -57
  67. package/components/Form/Form.vue2.js +41 -41
  68. package/components/Form/TableRow.vue.d.ts +7 -0
  69. package/components/Form/TableRow.vue.js +187 -41
  70. package/components/Form/TableView.vue.d.ts +11 -1
  71. package/components/Form/TableView.vue.js +71 -49
  72. package/components/Form/composables/useForm.js +146 -142
  73. package/components/Form/index.vue.d.ts +5 -1
  74. package/components/Form/index.vue.js +2 -2
  75. package/components/Form/index.vue2.js +44 -37
  76. package/components/Form/rowHelpers.d.ts +20 -0
  77. package/components/Form/rowHelpers.js +76 -28
  78. package/components/Form/types.d.ts +11 -0
  79. package/components/GoogleLogin.vue.js +4 -4
  80. package/components/IconPicker.vue.js +9 -9
  81. package/components/ImportData/ImportData.vue.js +11 -11
  82. package/components/ImportData/ImportStep1.vue.js +10 -10
  83. package/components/ImportData/ImportStep2.vue.js +15 -14
  84. package/components/Input.vue.js +133 -129
  85. package/components/Kanban/KanbanBoard.vue.js +1 -1
  86. package/components/Kanban/KanbanBoard.vue2.js +9 -9
  87. package/components/MultiSelect/MultiSelect.vue.js +3 -2
  88. package/components/Navbar/Navbar.vue.js +17 -17
  89. package/components/Navbar/NavbarGroup.vue.js +8 -7
  90. package/components/Navbar/NavbarItem.vue.js +40 -39
  91. package/components/Navbar/NavbarTabs.vue.js +6 -184
  92. package/components/Navbar/NavbarTabs.vue2.js +204 -0
  93. package/components/Navbar/useNavbar.js +3 -3
  94. package/components/NavbarCommandPalette.vue.js +1 -1
  95. package/components/NumberInput.vue.js +2 -2
  96. package/components/NumberInput.vue2.js +81 -77
  97. package/components/OTPInput/OTPInput.vue.js +24 -23
  98. package/components/Pagination/Pagination.vue.d.ts +1 -1
  99. package/components/Pagination/Pagination.vue.js +5 -274
  100. package/components/Pagination/Pagination.vue2.js +283 -2
  101. package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
  102. package/components/PricingPlan/PricingPlanItem.vue.js +7 -7
  103. package/components/Screen/Screen.vue.d.ts +1 -1
  104. package/components/Screen/Screen.vue.js +21 -21
  105. package/components/Screen/ScreenFilter.vue.js +5 -5
  106. package/components/Screen/components/ScreenAddAction.vue.js +3 -3
  107. package/components/Screen/components/ScreenEmptyState.vue.js +10 -10
  108. package/components/Screen/components/ScreenExportModal.vue.js +12 -12
  109. package/components/Screen/components/ScreenOptionsDropdown.vue.js +5 -5
  110. package/components/Screen/components/ScreenToolbar.vue.js +15 -15
  111. package/components/SidePanel.vue.js +2 -2
  112. package/components/SidePanel.vue2.js +6 -6
  113. package/components/SidebarMenu/SidebarMenu.vue.js +77 -72
  114. package/components/SidebarMenu/SidebarMenuItem.vue.js +172 -168
  115. package/components/Slider.vue.js +123 -108
  116. package/components/Tabes/Tabes.vue.d.ts +8 -3
  117. package/components/Tabes/Tabes.vue.js +2 -2
  118. package/components/Tabes/Tabes.vue2.js +209 -200
  119. package/components/Tabes/tabes.utils.d.ts +23 -0
  120. package/components/Tabes/tabes.utils.js +39 -16
  121. package/components/Textarea.vue.d.ts +2 -0
  122. package/components/Textarea.vue.js +19 -16
  123. package/components/ThemeToggle.vue.js +8 -8
  124. package/components/ToastNotification.vue2.js +10 -10
  125. package/components/TreeConnectors/TreeConnectors.vue.d.ts +1 -1
  126. package/components/TreeConnectors/TreeConnectors.vue.js +13 -8
  127. package/components/TreeConnectors/geometry.js +77 -69
  128. package/components/Workbook/WorkbookAddButton.vue.js +2 -2
  129. package/composables/useRtl.d.ts +14 -0
  130. package/composables/useRtl.js +33 -0
  131. package/index.js +470 -471
  132. package/package.json +1 -1
  133. package/style.css +86 -1
  134. package/types/button.d.ts +8 -0
  135. package/components/Navbar/NavbarTabs.vue3.js +0 -5
@@ -1,12 +1,13 @@
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 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({
10
11
  __name: "Tabes",
11
12
  props: {
12
13
  options: {},
@@ -17,129 +18,135 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
17
18
  textClass: {},
18
19
  wrap: { type: Boolean, default: !1 },
19
20
  tabClass: {},
20
- direction: { default: "ltr" }
21
+ direction: { default: "auto" }
21
22
  },
22
23
  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();
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
33
+ );
34
+ V.value !== e && (V.value = e), z.value !== n && (z.value = n);
35
+ }, fe = () => {
36
+ $ || ($ = !0, N = requestAnimationFrame(() => {
37
+ $ = !1, W();
33
38
  }));
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;
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;
39
42
  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(
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(
45
48
  t,
46
- a.left - o.left - g
49
+ a.left - i.left - p
47
50
  ),
48
51
  behavior: "smooth"
49
- }) : a.right > o.right - g && t.scrollBy({
50
- left: ne(
52
+ }) : a.right > i.right - p && t.scrollBy({
53
+ left: ie(
51
54
  t,
52
- a.right - o.right + g
55
+ a.right - i.right + p
53
56
  ),
54
57
  behavior: "smooth"
55
58
  });
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({
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({
59
62
  width: "0px",
60
63
  height: "0px",
64
+ left: "0px",
65
+ top: "0px",
61
66
  transform: "translate(0px, 0px)",
62
67
  opacity: 0
63
- }), F = h(!1), P = () => {
64
- b.value.opacity !== 0 && (b.value = {
65
- ...b.value,
68
+ }), D = f(!1), Q = () => {
69
+ h.value.opacity !== 0 && (h.value = {
70
+ ...h.value,
66
71
  opacity: 0
67
72
  });
68
- }, le = async () => {
69
- await Ae();
70
- const e = k.value, r = D.value, t = r !== void 0 ? v.get(r) : void 0;
73
+ }, ge = async () => {
74
+ await We();
75
+ const e = k.value, n = G.value, t = n !== void 0 ? g.get(n) : void 0;
71
76
  if (!e || !t) {
72
- P();
77
+ Q();
73
78
  return;
74
79
  }
75
80
  if (e.offsetWidth <= 0 || t.offsetWidth <= 0) {
76
- P();
81
+ Q();
77
82
  return;
78
83
  }
79
- const { width: a, height: o, left: g, top: ke } = Re(e, t), x = {
84
+ const { width: a, height: i, left: p, top: Ee } = Qe(e, t), x = {
80
85
  width: `${a}px`,
81
- height: `${o}px`,
82
- transform: `translate(${g}px, ${ke}px)`,
86
+ height: `${i}px`,
87
+ left: "0px",
88
+ top: "0px",
89
+ transform: `translate(${p}px, ${Ee}px)`,
83
90
  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;
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;
87
94
  })));
88
95
  };
89
96
  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 });
97
+ const U = async (e) => {
98
+ await ge(), W(), e?.ensureVisible && be();
99
+ }, 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 });
97
104
  }));
98
105
  };
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();
106
+ ae(d, () => c()), ae(k, () => c()), m(
107
+ () => r.modelValue,
108
+ () => c({ ensureVisible: !0 })
109
+ ), m(
110
+ () => r.options,
111
+ () => c()
112
+ ), m(
113
+ () => r.size,
114
+ () => c()
115
+ ), m(
116
+ () => r.block,
117
+ () => c()
118
+ ), m(
119
+ () => r.wrap,
120
+ () => c()
121
+ ), m(
122
+ () => r.variant,
123
+ () => 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();
121
128
  });
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(() => [
129
+ const he = o(() => {
130
+ const e = r.variant === "line";
131
+ return r.block || e ? "flex w-full relative" : "inline-flex max-w-full relative";
132
+ }), J = o(() => [
126
133
  "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) => {
134
+ 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) => {
131
138
  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 = {
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(() => {
146
+ const e = r.variant === "line";
147
+ 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 = {
143
150
  surface: "bg-secondary/80 p-1",
144
151
  primary: "bg-secondary p-1",
145
152
  secondary: "bg-secondary p-1",
@@ -147,52 +154,52 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
147
154
  success: "bg-success/10 p-1",
148
155
  outline: "bg-transparent border border-border p-1",
149
156
  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 = {
157
+ }, 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 = {
153
160
  sm: "text-xs px-2.5 py-1",
154
161
  md: "-text-fs-2 px-3 py-1",
155
162
  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";
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";
161
168
  let a = "";
162
- if (r)
169
+ if (n)
163
170
  if (t)
164
- a = n.wrap ? "text-primary !border-primary" : "text-primary";
171
+ a = r.wrap ? "text-primary !border-primary" : "text-primary";
165
172
  else
166
- switch (n.variant) {
173
+ switch (r.variant) {
167
174
  case "surface":
168
- a = n.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
175
+ a = r.wrap ? "text-foreground bg-[#ffff] dark:bg-[#0B0B0B] shadow-sm" : "text-foreground";
169
176
  break;
170
177
  case "primary":
171
- a = n.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
178
+ a = r.wrap ? "text-primary-foreground bg-primary" : "text-primary-foreground";
172
179
  break;
173
180
  case "secondary":
174
- a = n.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
181
+ a = r.wrap ? "text-secondary bg-secondary-foreground" : "text-secondary";
175
182
  break;
176
183
  case "danger":
177
- a = n.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
184
+ a = r.wrap ? "text-danger-fg bg-danger" : "text-danger-fg";
178
185
  break;
179
186
  case "success":
180
- a = n.wrap ? "text-success-fg bg-success" : "text-success-fg";
187
+ a = r.wrap ? "text-success-fg bg-success" : "text-success-fg";
181
188
  break;
182
189
  case "outline":
183
- a = n.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
190
+ a = r.wrap ? "text-accent-foreground bg-accent/50 ring-1 ring-border" : "text-accent-foreground";
184
191
  break;
185
192
  default:
186
193
  a = "text-foreground";
187
194
  }
188
195
  else
189
196
  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 = () => ({
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 = () => ({
196
203
  surface: "bg-[#ffff] dark:bg-[#0B0B0B]",
197
204
  primary: "bg-primary",
198
205
  secondary: "bg-secondary-foreground",
@@ -200,70 +207,72 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
200
207
  success: "bg-success",
201
208
  outline: "bg-accent/50 ring-1 ring-border",
202
209
  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",
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) => [
211
+ r.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5",
205
212
  "opacity-70 shrink-0 transition-transform duration-200",
206
213
  e ? "rotate-180" : ""
207
214
  ].join(" ");
208
- return (e, r) => (f(), $("div", {
209
- class: l([ie.value, "group"]),
210
- dir: s.direction
215
+ return (e, n) => (v(), M("div", {
216
+ ref_key: "rootRef",
217
+ ref: q,
218
+ class: l([he.value, "group"]),
219
+ dir: C.value
211
220
  }, [
212
- M(y(re, {
213
- direction: "left",
214
- color: G.value,
221
+ A(w(ce, {
222
+ direction: Se.value,
223
+ color: X.value,
215
224
  coverage: "100px",
216
225
  blur: "40px",
217
226
  easing: "smooth",
218
227
  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]
228
+ class: l(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-s-lg"])
229
+ }, null, 8, ["direction", "color", "class"]), [
230
+ [F, V.value]
222
231
  ]),
223
- M(c("div", {
224
- class: l(["left-0 pl-1", N.value])
232
+ A(u("div", {
233
+ class: l(["start-0 ps-1", J.value])
225
234
  }, [
226
- c("button", {
227
- onClick: r[0] || (r[0] = (t) => q(-200)),
235
+ u("button", {
236
+ onClick: me,
228
237
  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"
238
+ "aria-label": "Scroll backward"
230
239
  }, [
231
- y(w, {
232
- icon: "lucide:chevron-left",
240
+ w(y, {
241
+ icon: ze.value,
233
242
  class: "w-5 h-5"
234
- })
243
+ }, null, 8, ["icon"])
235
244
  ])
236
245
  ], 2), [
237
- [L, C.value]
246
+ [F, V.value]
238
247
  ]),
239
- c("div", {
248
+ u("div", {
240
249
  ref_key: "scrollRef",
241
- ref: u,
250
+ ref: d,
242
251
  class: "tabes-scroll flex-1 min-w-0 max-w-full overflow-x-auto scrollbar-hide scroll-smooth",
243
- onScroll: se
252
+ onScroll: fe
244
253
  }, [
245
- c("div", {
254
+ u("div", {
246
255
  ref_key: "containerRef",
247
256
  ref: k,
248
- class: l([be.value, "tabes-container"]),
257
+ class: l([$e.value, "tabes-container"]),
249
258
  role: "tablist",
250
- "data-variant": n.variant,
259
+ "data-variant": r.variant,
251
260
  "data-tabes": ""
252
261
  }, [
253
- s.modelValue !== void 0 && !s.wrap ? (f(), $("div", {
262
+ s.modelValue !== void 0 && !s.wrap ? (v(), M("div", {
254
263
  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, {
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, {
259
268
  key: t.value
260
269
  }, [
261
- X(ee)(t) ? (f(), A(Fe, {
270
+ te(se)(t) ? (v(), O(Ue, {
262
271
  key: 0,
263
272
  options: t.menu,
264
273
  selected: s.modelValue,
265
274
  disabled: t.disabled,
266
- direction: ve(t),
275
+ direction: Ce(t),
267
276
  position: t.dropdown?.position,
268
277
  offset: t.dropdown?.offset ?? [0, 8],
269
278
  searchable: t.dropdown?.searchable ?? !1,
@@ -277,98 +286,98 @@ const Ee = ["dir"], Te = ["data-variant"], je = ["aria-selected", "aria-expanded
277
286
  "show-selected-icon": !1,
278
287
  "toggle-selection": !1,
279
288
  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)
289
+ class: l(["tabes-menu", "inline-flex!", ke.value]),
290
+ onOnSelect: (a) => xe(t, a),
291
+ onOnOpen: () => we(t),
292
+ onOnClose: () => ye(t)
284
293
  }, {
285
- trigger: Y(({ isOpen: a }) => [
286
- c("button", {
294
+ trigger: re(({ isOpen: a }) => [
295
+ u("button", {
287
296
  ref_for: !0,
288
- ref: (o) => W(o, t.value),
297
+ ref: (i) => K(i, t.value),
289
298
  type: "button",
290
299
  role: "tab",
291
300
  "data-tabes-item": "",
292
301
  "data-tabes-menu-trigger": "",
293
- "aria-selected": X(te)(t, s.modelValue),
302
+ "aria-selected": te(oe)(t, s.modelValue),
294
303
  "aria-haspopup": !0,
295
304
  "aria-expanded": a,
296
305
  disabled: t.disabled,
297
- class: l([Q(t), K[n.size], "w-full"])
306
+ class: l([Z(t), Y[r.size], "w-full"])
298
307
  }, [
299
- t.icon ? (f(), A(w, {
308
+ t.icon ? (v(), O(y, {
300
309
  key: 0,
301
310
  icon: t.icon,
302
311
  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", {
312
+ }, null, 8, ["icon", "class"])) : j("", !0),
313
+ u("span", {
305
314
  class: l(["whitespace-nowrap z-20 relative", s.textClass])
306
- }, Z(U(t)), 3),
307
- y(w, {
315
+ }, ne(_(t)), 3),
316
+ w(y, {
308
317
  icon: "lucide:chevron-down",
309
- class: l(we(a)),
318
+ class: l(Le(a)),
310
319
  "aria-hidden": "true"
311
320
  }, null, 8, ["class"])
312
- ], 10, je)
321
+ ], 10, et)
313
322
  ]),
314
323
  _: 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({
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({
316
325
  key: 1,
317
326
  ref_for: !0,
318
- ref: (a) => W(a, t.value),
327
+ ref: (a) => K(a, t.value),
319
328
  role: "tab",
320
329
  "data-tabes-item": "",
321
330
  "aria-selected": s.modelValue === t.value,
322
331
  disabled: t.disabled,
323
- class: [Q(t), K[n.size]]
324
- }, { ref_for: !0 }, ye(t), {
325
- onClick: (a) => ce(t)
332
+ class: [Z(t), Y[r.size]]
333
+ }, { ref_for: !0 }, Oe(t), {
334
+ onClick: (a) => pe(t)
326
335
  }), {
327
- default: Y(() => [
328
- t.icon ? (f(), A(w, {
336
+ default: re(() => [
337
+ t.icon ? (v(), O(y, {
329
338
  key: 0,
330
339
  icon: t.icon,
331
340
  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", {
341
+ }, null, 8, ["icon", "class"])) : j("", !0),
342
+ u("span", {
334
343
  class: l(["whitespace-nowrap z-20 relative", s.textClass])
335
- }, Z(U(t)), 3)
344
+ }, ne(_(t)), 3)
336
345
  ]),
337
346
  _: 2
338
- }, 1040, ["aria-selected", "disabled", "class", "onClick"])), r, 1)
347
+ }, 1040, ["aria-selected", "disabled", "class", "onClick"])), n, 0)
339
348
  ], 64))), 128))
340
- ], 10, Te)
349
+ ], 10, _e)
341
350
  ], 544),
342
- M(y(re, {
343
- direction: "right",
344
- color: G.value,
351
+ A(w(ce, {
352
+ direction: Ve.value,
353
+ color: X.value,
345
354
  coverage: "100px",
346
355
  blur: "40",
347
356
  easing: "smooth",
348
357
  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]
358
+ class: l(["z-10 pointer-events-none", r.variant === "line" ? "" : "rounded-e-lg"])
359
+ }, null, 8, ["direction", "color", "class"]), [
360
+ [F, z.value]
352
361
  ]),
353
- M(c("div", {
354
- class: l(["right-0 pr-1", N.value])
362
+ A(u("div", {
363
+ class: l(["end-0 pe-1", J.value])
355
364
  }, [
356
- c("button", {
357
- onClick: r[2] || (r[2] = (t) => q(200)),
365
+ u("button", {
366
+ onClick: ve,
358
367
  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"
368
+ "aria-label": "Scroll forward"
360
369
  }, [
361
- y(w, {
362
- icon: "lucide:chevron-right",
370
+ w(y, {
371
+ icon: Be.value,
363
372
  class: "w-5 h-5"
364
- })
373
+ }, null, 8, ["icon"])
365
374
  ])
366
375
  ], 2), [
367
- [L, V.value]
376
+ [F, z.value]
368
377
  ])
369
- ], 10, Ee));
378
+ ], 10, Ze));
370
379
  }
371
380
  });
372
381
  export {
373
- Qe as default
382
+ ut as default
374
383
  };
@@ -12,3 +12,26 @@ export declare function isTabActive(option: TabesOption, modelValue: string | nu
12
12
  * For menu tabs, returns the parent tab's value when a child is selected.
13
13
  */
14
14
  export declare function getActiveMarkerKey(options: TabesOption[], modelValue: string | number): string | number | undefined;
15
+ /** Start/end (inline-edge) scroll overflow of a horizontal tab strip. */
16
+ export interface TabesScrollOverflow {
17
+ /** More content is hidden past the inline-start edge. */
18
+ canScrollStart: boolean;
19
+ /** More content is hidden past the inline-end edge. */
20
+ canScrollEnd: boolean;
21
+ }
22
+ /**
23
+ * Compute inline-start / inline-end scroll overflow for a horizontal tab strip,
24
+ * shared by `Tabes` and `NavbarTabs` so both track affordances identically.
25
+ *
26
+ * Direction-agnostic: modern engines report `scrollLeft` as ≤ 0 under RTL
27
+ * (start = 0, end grows negative), so the magnitude is the distance scrolled
28
+ * from the inline-start edge in either direction. `itemSelector` is an optional
29
+ * guard — with no matching items there is nothing to scroll.
30
+ */
31
+ export declare function getTabesScrollOverflow(el: HTMLElement | null | undefined, itemSelector?: string): TabesScrollOverflow;
32
+ /**
33
+ * Smoothly step a tab strip one page toward its inline-start / inline-end edge.
34
+ * `scrollBy({ left })` is physical, so the sign flips under RTL where
35
+ * inline-start sits on the physical right.
36
+ */
37
+ export declare function scrollTabesStrip(el: HTMLElement | null | undefined, toward: 'start' | 'end', amount: number): void;