vlite3 0.6.7 → 0.6.9

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 (46) hide show
  1. package/_virtual/_commonjsHelpers.js +6 -0
  2. package/_virtual/dayjs.min.js +7 -0
  3. package/_virtual/dayjs.min2.js +4 -0
  4. package/components/Barcode/Barcode.vue.d.ts +1 -1
  5. package/components/Breadcrumb/BreadcrumbItem.vue.js +2 -2
  6. package/components/ConfirmationModal.vue.js +30 -25
  7. package/components/DataTable/DataTableRow.vue.js +70 -64
  8. package/components/Date/Date.vue.d.ts +8 -0
  9. package/components/Date/Date.vue.js +21 -0
  10. package/components/Date/Date.vue2.js +4 -0
  11. package/components/Date/index.d.ts +1 -0
  12. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  13. package/components/Form/Form.vue.js +1 -1
  14. package/components/Form/Form.vue2.js +39 -36
  15. package/components/List/ListFieldRow.vue.js +150 -107
  16. package/components/Modal.vue.js +2 -2
  17. package/components/Modal.vue2.js +43 -42
  18. package/components/Navbar/Navbar.vue.d.ts +33 -19
  19. package/components/Navbar/Navbar.vue.js +295 -185
  20. package/components/Navbar/NavbarTabs.vue.js +1 -1
  21. package/components/PermissionMatrix/PermissionEditor.vue.js +37 -37
  22. package/components/PermissionMatrix/PermissionEditorList.vue.js +5 -154
  23. package/components/PermissionMatrix/PermissionEditorList.vue2.js +160 -2
  24. package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +5 -205
  25. package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +204 -2
  26. package/components/PermissionMatrix/PermissionMatrix.vue.js +1 -1
  27. package/components/PermissionMatrix/PermissionMatrix.vue2.js +115 -126
  28. package/components/Price/Price.vue.d.ts +8 -0
  29. package/components/Price/Price.vue.js +26 -0
  30. package/components/Price/Price.vue2.js +4 -0
  31. package/components/Price/index.d.ts +1 -0
  32. package/components/Screen/Screen.vue.js +19 -19
  33. package/components/SidebarMenu/SidebarMenu.vue.js +95 -93
  34. package/components/SidebarMenu/SidebarMenuItem.vue.js +42 -42
  35. package/components/Tabes/Tabes.vue.d.ts +6 -0
  36. package/components/Tabes/Tabes.vue.js +63 -56
  37. package/core/config.d.ts +14 -1
  38. package/core/config.js +15 -9
  39. package/core/index.d.ts +0 -22
  40. package/core/index.js +17 -9
  41. package/index.d.ts +2 -0
  42. package/index.js +18 -14
  43. package/package.json +2 -1
  44. package/style.css +1 -1
  45. package/types/config.type.d.ts +6 -0
  46. package/types/navbar.type.d.ts +7 -17
@@ -1,9 +1,9 @@
1
- import { defineComponent as S, inject as E, ref as T, computed as l, watch as g, reactive as N, provide as L, openBlock as C, createElementBlock as k, normalizeClass as P, Fragment as A, renderList as O, createBlock as F } from "vue";
2
- import { useRoute as W } from "vue-router";
3
- import { useBreakpoints as H, breakpointsTailwind as D } from "@vueuse/core";
4
- import R from "./SidebarMenuItem.vue.js";
1
+ import { defineComponent as E, inject as N, ref as w, computed as l, watch as T, reactive as P, provide as L, openBlock as x, createElementBlock as k, normalizeClass as O, Fragment as W, renderList as H, createBlock as A } from "vue";
2
+ import { useRoute as F } from "vue-router";
3
+ import { useBreakpoints as R, breakpointsTailwind as _ } from "@vueuse/core";
4
+ import j from "./SidebarMenuItem.vue.js";
5
5
  /* empty css */
6
- const K = /* @__PURE__ */ S({
6
+ const U = /* @__PURE__ */ E({
7
7
  __name: "SidebarMenu",
8
8
  props: {
9
9
  items: { default: () => [] },
@@ -29,116 +29,118 @@ const K = /* @__PURE__ */ S({
29
29
  showTooltip: { type: Boolean, default: !0 }
30
30
  },
31
31
  setup(m) {
32
- const c = E("navbar-context", null), e = m, f = W(), y = H(D), d = T([...e.defaultExpanded]), s = T(null), B = l(() => !e.mobileBreakpoint || e.mobileBreakpoint === "none" ? !0 : y.greaterOrEqual(e.mobileBreakpoint).value), v = l(() => B.value && e.orientation || "vertical"), r = (t) => t.id || (typeof t.to == "string" ? t.to : null) || t.label, M = (t, o) => {
33
- if (s.value === r(t)) return !0;
34
- if (t.to) {
35
- const a = typeof t.to == "string" ? t.to : t.to.path;
36
- if (a) {
37
- if (o === a) return !0;
38
- if (o.startsWith(a) && a !== "/" && a.length > 1) {
39
- const i = o[a.length];
40
- if (!i || i === "/" || i === "?")
41
- return !0;
42
- }
43
- }
32
+ const c = N("navbar-context", null), a = m, f = F(), B = R(_), o = w([...a.defaultExpanded]), v = w(null), y = l(() => !a.mobileBreakpoint || a.mobileBreakpoint === "none" ? !0 : B.greaterOrEqual(a.mobileBreakpoint).value), h = l(() => y.value && a.orientation || "vertical"), p = (e) => e.id || (typeof e.to == "string" ? e.to : null) || e.label, b = (e, n) => {
33
+ if (!e.to) return !1;
34
+ const t = typeof e.to == "string" ? e.to : e.to.path;
35
+ if (!t) return !1;
36
+ if (n === t) return !0;
37
+ if (t !== "/" && t.length > 1 && n.startsWith(t)) {
38
+ const i = n[t.length];
39
+ return !i || i === "/" || i === "?";
44
40
  }
45
41
  return !1;
46
- }, b = (t, o, a = []) => {
47
- let i = !1;
48
- for (const n of t) {
49
- const u = r(n);
50
- let p = !1;
51
- n.children && (p = b(n.children, o, [...a, u]), p && (i = !0));
52
- const x = M(n, o), z = p && c?.renderNestedTabs?.value && a.length === 0;
53
- (x || z) && (s.value = u, a.forEach((w) => {
54
- d.value.includes(w) || d.value.push(w);
55
- }), i = !0);
42
+ }, g = (e, n, t = []) => {
43
+ for (const i of e) {
44
+ const u = p(i);
45
+ if (i.children?.length) {
46
+ const r = g(i.children, n, [...t, u]);
47
+ if (r !== null)
48
+ return o.value.includes(u) || o.value.push(u), r;
49
+ }
50
+ if (b(i, n))
51
+ return t.forEach((r) => {
52
+ o.value.includes(r) || o.value.push(r);
53
+ }), u;
56
54
  }
57
- return i;
58
- }, h = (t) => {
59
- if (!c?.renderNestedTabs?.value) return;
60
- const o = e.items.find((a) => s.value === r(a) ? !0 : a.children?.some((n) => s.value === r(n) || n.children && n.children.some((u) => s.value === r(u))) || M(a, t));
61
- if (o && o.children) {
62
- const a = o.children.map((n) => ({
63
- label: n.label,
64
- labelI18n: n.labelI18n,
65
- value: r(n),
66
- icon: n.icon,
67
- disabled: n.disabled,
68
- to: n.to,
69
- href: n.href
55
+ return null;
56
+ }, C = (e, n) => {
57
+ for (const t of a.items) {
58
+ if (!t.children?.length || !(b(t, e) || t.children.some(
59
+ (s) => b(s, e) || s.children?.some((d) => b(d, e))
60
+ ))) continue;
61
+ const u = t.children.map((s) => ({
62
+ label: s.label,
63
+ labelI18n: s.labelI18n,
64
+ value: p(s),
65
+ icon: s.icon,
66
+ disabled: s.disabled,
67
+ to: s.to,
68
+ href: s.href
70
69
  }));
71
- let i = a[0].value;
72
- if (s.value) {
73
- const n = a.find((u) => u.value === s.value);
74
- if (n)
75
- i = n.value;
70
+ let r = u[0]?.value ?? "";
71
+ if (n) {
72
+ const s = u.find((d) => d.value === n);
73
+ if (s)
74
+ r = s.value;
76
75
  else {
77
- const u = o.children.find((p) => p.children?.some((x) => r(x) === s.value));
78
- u && (i = r(u));
76
+ const d = t.children.find(
77
+ (S) => S.children?.some((I) => p(I) === n)
78
+ );
79
+ d && (r = p(d));
79
80
  }
80
81
  }
81
- c.setNestedTabs(a, i);
82
- } else
83
- e.items.some(
84
- (i) => i.children?.some((n) => r(n) === s.value)
85
- ) || c.setNestedTabs([], "");
82
+ return { tabs: u, activeTab: r };
83
+ }
84
+ return null;
85
+ }, M = (e) => {
86
+ const n = g(a.items, e);
87
+ if (v.value = n, !c?.renderNestedTabs?.value) return;
88
+ const t = C(e, n);
89
+ t ? c.setNestedTabs(t.tabs, t.activeTab) : c.setNestedTabs([], "");
86
90
  };
87
- g(
91
+ T(
88
92
  () => f?.path,
89
- (t) => {
90
- t && (b(e.items, t), h(t));
93
+ (e) => {
94
+ e && M(e);
91
95
  },
92
96
  { immediate: !0 }
93
- ), g(
94
- () => e.items,
97
+ ), T(
98
+ () => a.items,
95
99
  () => {
96
- f?.path && (b(e.items, f.path), h(f.path));
100
+ f?.path && M(f.path);
97
101
  },
98
102
  { deep: !0 }
99
- ), g(
100
- () => s.value,
101
- () => {
102
- c?.renderNestedTabs?.value && h(f?.path || "");
103
- }
104
103
  );
105
- const I = N({
106
- activeItem: s,
107
- expandedItems: d,
108
- toggleExpand: (t) => {
109
- d.value.includes(t) ? d.value = d.value.filter((a) => a !== t) : e.allowMultiple ? d.value.push(t) : d.value = [t];
104
+ const z = P({
105
+ activeItem: v,
106
+ expandedItems: o,
107
+ toggleExpand: (e) => {
108
+ o.value.includes(e) ? o.value = o.value.filter((t) => t !== e) : a.allowMultiple ? o.value.push(e) : o.value = [e];
110
109
  },
111
- setActive: (t) => {
112
- s.value = t;
110
+ setActive: (e) => {
111
+ if (v.value = e, c?.renderNestedTabs?.value && f?.path) {
112
+ const n = C(f.path, e);
113
+ n ? c.setNestedTabs(n.tabs, n.activeTab) : c.setNestedTabs([], "");
114
+ }
113
115
  },
114
- indentSize: l(() => e.indentSize),
115
- variant: l(() => e.variant),
116
- renderMode: l(() => e.renderMode || "tree"),
116
+ indentSize: l(() => a.indentSize),
117
+ variant: l(() => a.variant),
118
+ renderMode: l(() => a.renderMode || "tree"),
117
119
  renderNestedTabs: l(() => !!c?.renderNestedTabs?.value),
118
- compact: l(() => e.compact),
119
- showCompactLabels: l(() => e.showCompactLabels),
120
- iconSize: l(() => e.iconSize),
121
- compactIconSize: l(() => e.compactIconSize),
122
- labelClass: l(() => e.labelClass),
123
- compactLabelClass: l(() => e.compactLabelClass),
124
- itemPadding: l(() => e.itemPadding),
125
- compactItemPadding: l(() => e.compactItemPadding),
126
- nestedMenuWidth: l(() => e.nestedMenuWidth),
127
- nestedMenuMaxHeight: l(() => e.nestedMenuMaxHeight),
128
- currentOrientation: v,
129
- showTooltip: l(() => e.showTooltip)
120
+ compact: l(() => a.compact),
121
+ showCompactLabels: l(() => a.showCompactLabels),
122
+ iconSize: l(() => a.iconSize),
123
+ compactIconSize: l(() => a.compactIconSize),
124
+ labelClass: l(() => a.labelClass),
125
+ compactLabelClass: l(() => a.compactLabelClass),
126
+ itemPadding: l(() => a.itemPadding),
127
+ compactItemPadding: l(() => a.compactItemPadding),
128
+ nestedMenuWidth: l(() => a.nestedMenuWidth),
129
+ nestedMenuMaxHeight: l(() => a.nestedMenuMaxHeight),
130
+ currentOrientation: h,
131
+ showTooltip: l(() => a.showTooltip)
130
132
  });
131
- return L("sidebar-menu-ctx", I), (t, o) => (C(), k("nav", {
132
- class: P(["flex w-full transition-all duration-300", [
133
- v.value === "horizontal" ? "flex-row flex-wrap gap-2 items-center" : "flex-col",
134
- v.value === "vertical" && !e.compact ? "space-y-1" : ""
133
+ return L("sidebar-menu-ctx", z), (e, n) => (x(), k("nav", {
134
+ class: O(["flex w-full transition-all duration-300", [
135
+ h.value === "horizontal" ? "flex-row flex-wrap gap-2 items-center" : "flex-col",
136
+ h.value === "vertical" && !a.compact ? "space-y-1" : ""
135
137
  ]]),
136
138
  role: "tree",
137
139
  "aria-label": "Sidebar Menu"
138
140
  }, [
139
- (C(!0), k(A, null, O(m.items, (a) => (C(), F(R, {
140
- key: a.id || a.label,
141
- item: a,
141
+ (x(!0), k(W, null, H(m.items, (t) => (x(), A(j, {
142
+ key: t.id || t.label,
143
+ item: t,
142
144
  itemClass: m.itemClass,
143
145
  menuOffset: m.menuOffset
144
146
  }, null, 8, ["item", "itemClass", "menuOffset"]))), 128))
@@ -146,5 +148,5 @@ const K = /* @__PURE__ */ S({
146
148
  }
147
149
  });
148
150
  export {
149
- K as default
151
+ U as default
150
152
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as X, inject as Y, computed as c, resolveComponent as Z, openBlock as r, createElementBlock as f, normalizeClass as u, createBlock as h, unref as n, withCtx as b, createElementVNode as p, normalizeStyle as M, createCommentVNode as d, toDisplayString as g, createVNode as S, resolveDynamicComponent as B, mergeProps as D, createTextVNode as ee, Fragment as V, withKeys as te, withModifiers as ae, Transition as ne, renderList as ie } from "vue";
1
+ import { defineComponent as X, inject as Y, computed as s, resolveComponent as Z, openBlock as r, createElementBlock as f, normalizeClass as u, createBlock as h, unref as n, withCtx as b, createElementVNode as v, normalizeStyle as M, createCommentVNode as d, toDisplayString as g, createVNode as S, resolveDynamicComponent as B, mergeProps as D, createTextVNode as ee, Fragment as V, withKeys as te, withModifiers as ae, Transition as ne, renderList as ie } from "vue";
2
2
  import { useRouter as oe } from "vue-router";
3
3
  import w from "../Icon.vue.js";
4
4
  import K from "../Tooltip.vue.js";
@@ -8,7 +8,7 @@ import { $t as O } from "../../utils/i18n.js";
8
8
  const re = {
9
9
  key: 0,
10
10
  class: "px-3 py-1.5 text-sm flex items-center gap-2 font-medium border-b bg-muted-light rounded-t-md text-center truncate"
11
- }, se = { class: "w-full" }, ce = { class: "flex items-center w-full gap-2 text-sm" }, ue = { class: "truncate flex-1 font-medium" }, de = ["onKeydown"], me = {
11
+ }, ce = { class: "w-full" }, se = { class: "flex items-center w-full gap-2 text-sm" }, ue = { class: "truncate flex-1 font-medium" }, de = ["onKeydown"], me = {
12
12
  key: 0,
13
13
  class: "overflow-hidden transition-all duration-300 ease-in-out relative"
14
14
  }, fe = { class: "mt-0.5 space-y-0.5" }, we = /* @__PURE__ */ X({
@@ -19,13 +19,13 @@ const re = {
19
19
  menuOffset: {},
20
20
  itemClass: {}
21
21
  },
22
- setup(s) {
23
- const t = s, e = Y("sidebar-menu-ctx"), k = oe();
22
+ setup(c) {
23
+ const t = c, e = Y("sidebar-menu-ctx"), k = oe();
24
24
  if (!e)
25
25
  throw new Error("SidebarMenuItem must be used within a SidebarMenu");
26
- const i = c(
26
+ const i = s(
27
27
  () => e.currentOrientation === "horizontal" && t.depth === 0
28
- ), v = c(() => !!t.item.children?.length), R = c(() => i.value && v.value || e.compact && v.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), I = c(() => e.renderNestedTabs && t.depth === 0 ? !1 : R.value === "popover" && v.value), y = c(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), E = c(() => I.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(y.value)), j = c(() => !(!v.value || e.renderNestedTabs && t.depth === 0)), z = c(() => e.activeItem === y.value), L = (o) => {
28
+ ), p = s(() => !!t.item.children?.length), R = s(() => i.value && p.value || e.compact && p.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), I = s(() => e.renderNestedTabs && t.depth === 0 ? !1 : R.value === "popover" && p.value), y = s(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), E = s(() => I.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(y.value)), j = s(() => !(!p.value || e.renderNestedTabs && t.depth === 0)), z = s(() => e.activeItem === y.value), L = (o) => {
29
29
  if (!t.item.disabled) {
30
30
  if (e.renderNestedTabs && t.depth === 0) {
31
31
  if (t.item.action && t.item.action(t.item), t.item.to)
@@ -33,7 +33,7 @@ const re = {
33
33
  });
34
34
  else if (t.item.href)
35
35
  window.open(t.item.href, "_blank");
36
- else if (v.value) {
36
+ else if (p.value) {
37
37
  const a = t.item.children?.[0];
38
38
  a && (a.to ? k.push(a.to).catch(() => {
39
39
  }) : a.href && window.open(a.href, "_blank"));
@@ -41,7 +41,7 @@ const re = {
41
41
  e.setActive(y.value);
42
42
  return;
43
43
  }
44
- v.value && !t.item.to && !t.item.href && (I.value || e.toggleExpand(y.value)), t.item.action && t.item.action(t.item), (!v.value || t.item.to) && e.setActive(y.value);
44
+ p.value && !t.item.to && !t.item.href && (I.value || e.toggleExpand(y.value)), t.item.action && t.item.action(t.item), (!p.value || t.item.to) && e.setActive(y.value);
45
45
  }
46
46
  }, N = (o) => {
47
47
  if (o.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
@@ -50,7 +50,7 @@ const re = {
50
50
  });
51
51
  else if (t.item.href)
52
52
  window.open(t.item.href, "_blank");
53
- else if (v.value) {
53
+ else if (p.value) {
54
54
  const a = t.item.children?.[0];
55
55
  a && (a.to ? k.push(a.to).catch(() => {
56
56
  }) : a.href && window.open(a.href, "_blank"));
@@ -59,14 +59,14 @@ const re = {
59
59
  return;
60
60
  }
61
61
  I.value || e.toggleExpand(y.value);
62
- }, $ = c(() => e.indentSize || 12), T = c(() => i.value ? {} : e.compact ? { width: "100%" } : {
62
+ }, $ = s(() => e.indentSize || 12), T = s(() => i.value ? {} : e.compact ? { width: "100%" } : {
63
63
  marginLeft: `${t.depth * $.value}px`,
64
64
  width: `calc(100% - ${t.depth * $.value}px)`
65
- }), _ = c(() => {
66
- const a = `group flex items-center justify-between font-medium rounded-md transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/50 relative border border-transparent select-none cursor-pointer ${i.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`, x = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
65
+ }), _ = s(() => {
66
+ const a = `group flex items-center justify-between font-medium rounded-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/50 relative border border-transparent select-none cursor-pointer ${i.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`, x = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
67
67
  let l = "";
68
68
  return z.value ? l = "bg-primary-light text-primary-fg-light" : l = "text-muted hover:bg-accent/80 hover:text-foreground", t.item.disabled && (l = "opacity-50 cursor-not-allowed pointer-events-none"), `${a} ${x} ${l} ${t.item.class || ""}`;
69
- }), m = c(() => e.compact && e.showCompactLabels), C = c(
69
+ }), m = s(() => e.compact && e.showCompactLabels), C = s(
70
70
  () => t.item.labelI18n ? O(t.item.labelI18n) : t.item.label
71
71
  ), A = (o) => ({
72
72
  label: o.labelI18n ? O(o.labelI18n) : o.label,
@@ -75,7 +75,7 @@ const re = {
75
75
  disabled: o.disabled,
76
76
  children: o.children ? o.children.map(A) : void 0,
77
77
  data: o
78
- }), F = c(() => t.item.children ? t.item.children.map(A) : []), W = (o) => {
78
+ }), F = s(() => t.item.children ? t.item.children.map(A) : []), W = (o) => {
79
79
  const a = o.data;
80
80
  if (a) {
81
81
  a.action && a.action(a);
@@ -98,7 +98,7 @@ const re = {
98
98
  }, U = (o) => {
99
99
  const a = o;
100
100
  a.style.height = "0", a.style.opacity = "0";
101
- }, H = c(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), P = c(() => t.item.to ? { to: t.item.to } : t.item.href ? {
101
+ }, H = s(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), P = s(() => t.item.to ? { to: t.item.to } : t.item.href ? {
102
102
  href: t.item.href,
103
103
  target: "_blank",
104
104
  rel: "noopener noreferrer"
@@ -111,7 +111,7 @@ const re = {
111
111
  I.value ? (r(), h(n(le), {
112
112
  key: 0,
113
113
  position: i.value ? "bottom-start" : "right-start",
114
- offset: s.menuOffset,
114
+ offset: c.menuOffset,
115
115
  class: "w-full block",
116
116
  searchable: !1,
117
117
  width: n(e).nestedMenuWidth,
@@ -121,9 +121,9 @@ const re = {
121
121
  }, {
122
122
  header: b(() => [
123
123
  n(e).compact && !i.value ? (r(), f("div", re, [
124
- s.item.icon ? (r(), h(w, {
124
+ c.item.icon ? (r(), h(w, {
125
125
  key: 0,
126
- icon: s.item.icon,
126
+ icon: c.item.icon,
127
127
  class: "shrink-0 transition-colors opacity-80 group-hover:opacity-100"
128
128
  }, null, 8, ["icon"])) : d("", !0),
129
129
  ee(" " + g(C.value), 1)
@@ -138,7 +138,7 @@ const re = {
138
138
  class: "w-full block"
139
139
  }, {
140
140
  default: b(() => [
141
- p("div", se, [
141
+ v("div", ce, [
142
142
  (r(), h(B(H.value), D(P.value, {
143
143
  class: [_.value, l ? "bg-muted text-foreground" : ""],
144
144
  style: T.value,
@@ -147,36 +147,36 @@ const re = {
147
147
  onClick: L
148
148
  }), {
149
149
  default: b(() => [
150
- p("div", {
150
+ v("div", {
151
151
  class: u(["min-w-0 flex-1 flex", [
152
152
  m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
153
153
  ]])
154
154
  }, [
155
- s.item.icon ? (r(), h(w, {
155
+ c.item.icon ? (r(), h(w, {
156
156
  key: 0,
157
- icon: s.item.icon,
157
+ icon: c.item.icon,
158
158
  class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value || l ? "opacity-100" : ""]]),
159
159
  style: M({
160
160
  width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
161
161
  height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
162
162
  })
163
163
  }, null, 8, ["icon", "class", "style"])) : d("", !0),
164
- p("span", {
165
- class: u(["truncate leading-none pt-0.5", {
164
+ v("span", {
165
+ class: u(["truncate leading-none pt-0.5 text-wrap", {
166
166
  [n(e).compactLabelClass]: m.value && !i.value,
167
167
  hidden: n(e).compact && !m.value && !i.value,
168
168
  "md:hidden": n(e).compact && !m.value && !i.value
169
169
  }])
170
170
  }, g(C.value), 3),
171
- s.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
171
+ c.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
172
172
  key: 1,
173
173
  class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
174
- s.item.badgeClass || "bg-muted text-muted-foreground",
174
+ c.item.badgeClass || "bg-muted text-muted-foreground",
175
175
  { "md:hidden": n(e).compact && !i.value }
176
176
  ]])
177
- }, g(s.item.badge), 3)) : d("", !0)
177
+ }, g(c.item.badge), 3)) : d("", !0)
178
178
  ], 2),
179
- p("div", {
179
+ v("div", {
180
180
  class: u(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": n(e).compact && !i.value }])
181
181
  }, [
182
182
  S(w, {
@@ -193,14 +193,14 @@ const re = {
193
193
  }, 1032, ["content", "placement", "disabled"])
194
194
  ]),
195
195
  item: b(({ option: l }) => [
196
- p("div", ce, [
196
+ v("div", se, [
197
197
  l.icon ? (r(), h(w, {
198
198
  key: 0,
199
199
  icon: l.icon,
200
200
  class: "shrink-0 opacity-80",
201
201
  style: M({ width: n(e).iconSize, height: n(e).iconSize })
202
202
  }, null, 8, ["icon", "style"])) : d("", !0),
203
- p("span", ue, g(l.label), 1),
203
+ v("span", ue, g(l.label), 1),
204
204
  l.data?.badge ? (r(), f("span", {
205
205
  key: 1,
206
206
  class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", l.data?.badgeClass || "bg-muted text-muted-foreground"])
@@ -224,34 +224,34 @@ const re = {
224
224
  onClick: L
225
225
  }), {
226
226
  default: b(() => [
227
- p("div", {
227
+ v("div", {
228
228
  class: u(["min-w-0 flex-1 flex py-0.5", [
229
229
  m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
230
230
  ]])
231
231
  }, [
232
- s.item.icon ? (r(), h(w, {
232
+ c.item.icon ? (r(), h(w, {
233
233
  key: 0,
234
- icon: s.item.icon,
234
+ icon: c.item.icon,
235
235
  class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value ? "opacity-100" : ""]]),
236
236
  style: M({
237
237
  width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
238
238
  height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
239
239
  })
240
240
  }, null, 8, ["icon", "class", "style"])) : d("", !0),
241
- p("span", {
241
+ v("span", {
242
242
  class: u(["truncate leading-none pt-0.5 wrap-break-word flex-wrap text-wrap", {
243
243
  [n(e).compactLabelClass]: m.value && !i.value,
244
244
  hidden: n(e).compact && !m.value && !i.value,
245
245
  "md:hidden": n(e).compact && !m.value && !i.value
246
246
  }])
247
247
  }, g(C.value), 3),
248
- s.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
248
+ c.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
249
249
  key: 1,
250
250
  class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
251
- s.item.badgeClass || "bg-muted text-muted-foreground",
251
+ c.item.badgeClass || "bg-muted text-muted-foreground",
252
252
  { "md:hidden": n(e).compact && !i.value }
253
253
  ]])
254
- }, g(s.item.badge), 3)) : d("", !0)
254
+ }, g(c.item.badge), 3)) : d("", !0)
255
255
  ], 2),
256
256
  j.value ? (r(), f("div", {
257
257
  key: 0,
@@ -281,19 +281,19 @@ const re = {
281
281
  onLeave: U
282
282
  }, {
283
283
  default: b(() => [
284
- v.value && E.value && !i.value ? (r(), f("div", me, [
284
+ p.value && E.value && !i.value ? (r(), f("div", me, [
285
285
  n(e).variant === "default" ? (r(), f("div", {
286
286
  key: 0,
287
287
  class: "absolute top-0 bottom-2 w-px bg-border",
288
288
  style: M({
289
- left: `${(s.depth + 1) * $.value - $.value / 2}px`
289
+ left: `${(c.depth + 1) * $.value - $.value / 2}px`
290
290
  })
291
291
  }, null, 4)) : d("", !0),
292
- p("div", fe, [
293
- (r(!0), f(V, null, ie(s.item.children, (l) => (r(), h(x, {
292
+ v("div", fe, [
293
+ (r(!0), f(V, null, ie(c.item.children, (l) => (r(), h(x, {
294
294
  key: l.id || l.label,
295
295
  item: l,
296
- depth: s.depth + 1
296
+ depth: c.depth + 1
297
297
  }, null, 8, ["item", "depth"]))), 128))
298
298
  ])
299
299
  ])) : d("", !0)
@@ -6,6 +6,11 @@ interface Props {
6
6
  variant?: TabesVariant;
7
7
  block?: boolean;
8
8
  textClass?: string;
9
+ /**
10
+ * When true, tabs wrap to multiple rows on small screens instead of scrolling.
11
+ * Default: false (horizontal scroll behavior)
12
+ */
13
+ wrap?: boolean;
9
14
  }
10
15
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
16
  change: (value: string | number) => any;
@@ -17,6 +22,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
17
22
  variant: TabesVariant;
18
23
  size: TabesSize;
19
24
  block: boolean;
25
+ wrap: boolean;
20
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
21
27
  containerRef: HTMLDivElement;
22
28
  }, HTMLDivElement>;