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,4 +1,4 @@
1
- import { defineComponent as w, ref as c, openBlock as n, createElementBlock as d, normalizeClass as i, unref as o, Fragment as g, createElementVNode as r, renderSlot as s, createVNode as v, createCommentVNode as u, createBlock as T, isRef as B, withCtx as y, createTextVNode as x } from "vue";
1
+ import { defineComponent as w, ref as c, openBlock as n, createElementBlock as d, normalizeClass as i, unref as o, Fragment as g, createElementVNode as r, renderSlot as s, createVNode as v, createCommentVNode as f, createBlock as T, isRef as B, withCtx as y, createTextVNode as x } from "vue";
2
2
  import { onClickOutside as M } from "@vueuse/core";
3
3
  import h from "../Icon.vue.js";
4
4
  import z from "../SidePanel.vue.js";
@@ -37,7 +37,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
37
37
  setup(k) {
38
38
  const a = k, {
39
39
  isMobileMenuOpen: t,
40
- breakpointClasses: f,
40
+ breakpointClasses: u,
41
41
  containerClasses: $,
42
42
  centerClasses: C
43
43
  } = N(a), b = c(null), m = c(null);
@@ -61,7 +61,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
61
61
  type: "button",
62
62
  ref_key: "mobileTriggerRef",
63
63
  ref: m,
64
- class: i(["p-2 -ml-2 text-muted-foreground hover:bg-accent rounded-md shrink-0", [o(f).mobileTrigger, a.mobileTriggerClass]]),
64
+ class: i(["p-2 -ms-2 text-muted-foreground hover:bg-accent rounded-md shrink-0", [o(u).mobileTrigger, a.mobileTriggerClass]]),
65
65
  onClick: l[0] || (l[0] = (p) => t.value = !o(t))
66
66
  }, [
67
67
  v(h, {
@@ -73,21 +73,21 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
73
73
  ]),
74
74
  e.$slots?.left ? (n(), d("div", {
75
75
  key: 0,
76
- class: i(["items-center gap-1 overflow-x-auto no-scrollbar mask-gradient", o(f).desktopContent])
76
+ class: i(["items-center gap-1 overflow-x-auto no-scrollbar mask-gradient", o(u).desktopContent])
77
77
  }, [
78
78
  s(e.$slots, "left")
79
- ], 2)) : u("", !0)
79
+ ], 2)) : f("", !0)
80
80
  ]),
81
81
  e.$slots?.center ? (n(), d("div", {
82
82
  key: 0,
83
83
  class: i([o(C), "max-w-full", a.contentClass])
84
84
  }, [
85
85
  s(e.$slots, "center")
86
- ], 2)) : u("", !0),
86
+ ], 2)) : f("", !0),
87
87
  r("div", {
88
88
  class: i(["flex items-center gap-2 shrink-0 max-w-[40%] z-10", [
89
89
  {
90
- "ml-auto": a.centerPosition === "left" || a.centerPosition === "center"
90
+ "ms-auto": a.centerPosition === "left" || a.centerPosition === "center"
91
91
  },
92
92
  a.rightClass
93
93
  ]])
@@ -96,7 +96,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
96
96
  ], 2)
97
97
  ], 64)) : (n(), d(g, { key: 1 }, [
98
98
  r("div", {
99
- class: i(o(f).mobileHeader)
99
+ class: i(o(u).mobileHeader)
100
100
  }, [
101
101
  s(e.$slots, "mobile-trigger", {
102
102
  isOpen: o(t),
@@ -106,7 +106,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
106
106
  type: "button",
107
107
  ref_key: "mobileTriggerRef",
108
108
  ref: m,
109
- class: i(["p-2 -mr-2 text-muted-foreground hover:bg-accent rounded-md", a.mobileTriggerClass]),
109
+ class: i(["p-2 -me-2 text-muted-foreground hover:bg-accent rounded-md", a.mobileTriggerClass]),
110
110
  onClick: l[1] || (l[1] = (p) => t.value = !o(t))
111
111
  }, [
112
112
  v(h, {
@@ -118,7 +118,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
118
118
  ])
119
119
  ], 2),
120
120
  r("div", {
121
- class: i(o(f).desktopSidebar)
121
+ class: i(o(u).desktopSidebar)
122
122
  }, [
123
123
  r("div", {
124
124
  class: i(["flex-1 px-2.5 pt-0 pb-4 overflow-y-auto space-y-4 scrollbar-thin scrollbar-stable", a.contentClass])
@@ -132,7 +132,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
132
132
  class: i(["p-2 border-t border-border shrink-0 bg-background mt-auto", a.rightClass])
133
133
  }, [
134
134
  s(e.$slots, "right")
135
- ], 2)) : u("", !0)
135
+ ], 2)) : f("", !0)
136
136
  ], 2)
137
137
  ], 64)),
138
138
  a.mobileMenuVariant === "dropdown" ? (n(), d(g, { key: 2 }, [
@@ -140,7 +140,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
140
140
  key: 0,
141
141
  ref_key: "mobileMenuRef",
142
142
  ref: b,
143
- class: i(["absolute top-[calc(100%_+_1px)] left-0 w-full bg-body border border-border/50 shadow-xl z-50 flex flex-col transition-all duration-300 origin-top overflow-hidden will-change-transform", a.menuClass])
143
+ class: i(["absolute top-[calc(100%_+_1px)] start-0 w-full bg-body border border-border/50 shadow-xl z-50 flex flex-col transition-all duration-300 origin-top overflow-hidden will-change-transform", a.menuClass])
144
144
  }, [
145
145
  r("div", R, [
146
146
  s(e.$slots, "mobile-menu", {}, () => [
@@ -153,16 +153,16 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
153
153
  ])
154
154
  ])
155
155
  ])
156
- ], 2)) : u("", !0)
156
+ ], 2)) : f("", !0)
157
157
  ], 64)) : (n(), T(z, {
158
158
  key: 3,
159
159
  show: o(t),
160
160
  "onUpdate:show": l[2] || (l[2] = (p) => B(t) ? t.value = p : null),
161
161
  position: "left",
162
162
  size: "sm",
163
- triggerClass: o(f).mobileTrigger,
164
- class: i(["z-60", o(f).mobileTrigger]),
165
- headerClass: "pl-3! pr-4.5! py-3!",
163
+ triggerClass: o(u).mobileTrigger,
164
+ class: i(["z-60", o(u).mobileTrigger]),
165
+ headerClass: "ps-3! pe-4.5! py-3!",
166
166
  bodyClass: "p-0!"
167
167
  }, {
168
168
  header: y(() => [
@@ -185,7 +185,7 @@ const O = { class: "flex items-center gap-4 shrink-0 z-10" }, R = {
185
185
  ])),
186
186
  e.$slots?.right ? (n(), d("div", H, [
187
187
  s(e.$slots, "right")
188
- ])) : u("", !0)
188
+ ])) : f("", !0)
189
189
  ])
190
190
  ]),
191
191
  _: 3
@@ -1,18 +1,19 @@
1
- import { defineComponent as s, computed as r, openBlock as l, createElementBlock as n, normalizeClass as c, renderSlot as i } from "vue";
2
- const f = /* @__PURE__ */ s({
1
+ import { defineComponent as n, computed as r, openBlock as s, createElementBlock as l, normalizeClass as c, renderSlot as i } from "vue";
2
+ const f = /* @__PURE__ */ n({
3
3
  __name: "NavbarGroup",
4
4
  props: {
5
5
  orientation: { default: "horizontal" },
6
6
  class: { default: "" }
7
7
  },
8
- setup(o) {
9
- const e = o, t = r(() => [
8
+ setup(t) {
9
+ const e = t, o = r(() => [
10
10
  "flex",
11
- e.orientation === "vertical" ? "flex-col space-y-1" : "flex-row items-center space-x-1",
11
+ // bare `flex` + gap (not flex-row/space-x) so i18n.css row-reverse does not double-flip under dir=rtl
12
+ e.orientation === "vertical" ? "flex-col gap-1" : "items-center gap-1",
12
13
  e.class
13
14
  ].join(" "));
14
- return (a, p) => (l(), n("div", {
15
- class: c(t.value)
15
+ return (a, p) => (s(), l("div", {
16
+ class: c(o.value)
16
17
  }, [
17
18
  i(a.$slots, "default")
18
19
  ], 2));
@@ -1,8 +1,9 @@
1
- import { defineComponent as $, computed as i, inject as j, openBlock as o, createBlock as u, withCtx as v, resolveDynamicComponent as w, normalizeClass as s, createCommentVNode as c, createElementBlock as h, renderSlot as g, createTextVNode as B, toDisplayString as R } from "vue";
2
- import { useRoute as D } from "vue-router";
1
+ import { defineComponent as R, computed as r, inject as w, openBlock as n, createBlock as u, withCtx as v, resolveDynamicComponent as B, normalizeClass as s, createCommentVNode as c, createElementBlock as h, renderSlot as g, createTextVNode as D, toDisplayString as N } from "vue";
2
+ import { useRoute as S } from "vue-router";
3
3
  import b from "../Icon.vue.js";
4
- import N from "../Tooltip.vue.js";
5
- const T = /* @__PURE__ */ $({
4
+ import W from "../Tooltip.vue.js";
5
+ import { useRtl as z } from "../../composables/useRtl.js";
6
+ const I = /* @__PURE__ */ R({
6
7
  __name: "NavbarItem",
7
8
  props: {
8
9
  to: {},
@@ -17,85 +18,85 @@ const T = /* @__PURE__ */ $({
17
18
  variant: { default: "ghost" }
18
19
  },
19
20
  emits: ["click"],
20
- setup(r, { emit: p }) {
21
- const t = r, y = p, d = D(), n = i(() => {
21
+ setup(o, { emit: p }) {
22
+ const t = o, y = p, d = S(), x = z(), k = r(() => x.value ? "left" : "right"), a = r(() => {
22
23
  if (t.active) return !0;
23
24
  if (t.to && d) {
24
25
  const e = t.to.toString();
25
26
  return d.path === e || d.path.startsWith(e) && e !== "/" && e.length > 1;
26
27
  }
27
28
  return !1;
28
- }), f = i(() => t.href && (t.href.startsWith("http") || t.href.startsWith("//"))), m = i(() => t.to ? "router-link" : t.href ? "a" : "button"), x = j("navbar-context", null), a = i(() => x?.compact.value || !1), k = i(() => {
29
- const e = "group flex items-center gap-2 px-3 py-2 text-sm font-medium transition-all duration-200 rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none cursor-pointer", l = a.value ? "justify-center" : "";
29
+ }), f = r(() => t.href && (t.href.startsWith("http") || t.href.startsWith("//"))), m = r(() => t.to ? "router-link" : t.href ? "a" : "button"), C = w("navbar-context", null), l = r(() => C?.compact.value || !1), $ = r(() => {
30
+ const e = "group flex items-center gap-2 px-3 py-2 text-sm font-medium transition-all duration-200 rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none cursor-pointer", i = l.value ? "justify-center" : "";
30
31
  return t.variant === "ghost" ? [
31
32
  e,
32
- l,
33
+ i,
33
34
  "hover:bg-accent hover:text-foreground text-muted-foreground",
34
- n.value ? "bg-primary-light text-primary-fg-light font-semibold" : "text-muted-foreground",
35
+ a.value ? "bg-primary-light text-primary-fg-light font-semibold" : "text-muted-foreground",
35
36
  t.class
36
37
  ].join(" ") : t.variant === "pill" ? [
37
38
  e,
38
- l,
39
- n.value ? "bg-primary text-primary-fg shadow-sm" : "text-muted-foreground hover:bg-accent hover:text-foreground",
39
+ i,
40
+ a.value ? "bg-primary text-primary-fg shadow-sm" : "text-muted-foreground hover:bg-accent hover:text-foreground",
40
41
  t.class
41
42
  ].join(" ") : t.variant === "underline" ? [
42
43
  e,
43
- l,
44
+ i,
44
45
  "rounded-none border-b-2",
45
- n.value ? "text-primary border-primary" : "text-muted-foreground border-transparent hover:border-border hover:text-foreground",
46
+ a.value ? "text-primary border-primary" : "text-muted-foreground border-transparent hover:border-border hover:text-foreground",
46
47
  t.class
47
48
  ].join(" ") : [
48
49
  e,
49
- l,
50
+ i,
50
51
  "hover:text-foreground transition-colors",
51
- n.value ? "text-foreground font-semibold" : "text-muted-foreground",
52
+ a.value ? "text-foreground font-semibold" : "text-muted-foreground",
52
53
  t.class
53
54
  ].join(" ");
54
- }), C = (e) => {
55
+ }), j = (e) => {
55
56
  if (t.disabled) {
56
57
  e.preventDefault();
57
58
  return;
58
59
  }
59
60
  y("click", e);
60
61
  };
61
- return (e, l) => (o(), u(N, {
62
- content: r.label || (typeof e.$slots.default == "string" ? e.$slots.default : ""),
63
- placement: "right",
64
- disabled: !a.value,
62
+ return (e, i) => (n(), u(W, {
63
+ content: o.label || (typeof e.$slots.default == "string" ? e.$slots.default : ""),
64
+ placement: k.value,
65
+ disabled: !l.value,
65
66
  class: "w-full"
66
67
  }, {
67
68
  default: v(() => [
68
- (o(), u(w(m.value), {
69
- to: r.to,
70
- href: r.href,
69
+ (n(), u(B(m.value), {
70
+ to: o.to,
71
+ href: o.href,
71
72
  type: m.value === "button" ? "button" : void 0,
72
73
  target: f.value ? "_blank" : void 0,
73
74
  rel: f.value ? "noopener noreferrer" : void 0,
74
- class: s(k.value),
75
- onClick: C
75
+ class: s($.value),
76
+ onClick: j
76
77
  }, {
77
78
  default: v(() => [
78
- r.icon ? (o(), u(b, {
79
+ o.icon ? (n(), u(b, {
79
80
  key: 0,
80
- icon: r.icon,
81
- class: s(["h-4 w-4 shrink-0 transition-colors", n.value ? "text-current" : "text-muted-foreground group-hover:text-current"])
81
+ icon: o.icon,
82
+ class: s(["h-4 w-4 shrink-0 transition-colors", a.value ? "text-current" : "text-muted-foreground group-hover:text-current"])
82
83
  }, null, 8, ["icon", "class"])) : c("", !0),
83
- r.label || e.$slots.default ? (o(), h("span", {
84
+ o.label || e.$slots.default ? (n(), h("span", {
84
85
  key: 1,
85
- class: s(["flex-1 truncate text-left", { "md:hidden": a.value }])
86
+ class: s(["flex-1 truncate text-start", { "md:hidden": l.value }])
86
87
  }, [
87
88
  g(e.$slots, "default", {}, () => [
88
- B(R(r.label), 1)
89
+ D(N(o.label), 1)
89
90
  ])
90
91
  ], 2)) : c("", !0),
91
- r.iconRight ? (o(), u(b, {
92
+ o.iconRight ? (n(), u(b, {
92
93
  key: 2,
93
- icon: r.iconRight,
94
- class: s(["h-4 w-4 shrink-0 opacity-70", { "md:hidden": a.value }])
94
+ icon: o.iconRight,
95
+ class: s(["h-4 w-4 shrink-0 opacity-70", { "md:hidden": l.value }])
95
96
  }, null, 8, ["icon", "class"])) : c("", !0),
96
- e.$slots.badge ? (o(), h("div", {
97
+ e.$slots.badge ? (n(), h("div", {
97
98
  key: 3,
98
- class: s(["ml-auto", { "md:hidden": a.value }])
99
+ class: s(["ml-auto", { "md:hidden": l.value }])
99
100
  }, [
100
101
  g(e.$slots, "badge")
101
102
  ], 2)) : c("", !0)
@@ -104,9 +105,9 @@ const T = /* @__PURE__ */ $({
104
105
  }, 8, ["to", "href", "type", "target", "rel", "class"]))
105
106
  ]),
106
107
  _: 3
107
- }, 8, ["content", "disabled"]));
108
+ }, 8, ["content", "placement", "disabled"]));
108
109
  }
109
110
  });
110
111
  export {
111
- T as default
112
+ I as default
112
113
  };
@@ -1,186 +1,8 @@
1
- import { defineComponent as A, ref as d, onMounted as F, nextTick as k, onUnmounted as H, watch as T, openBlock as s, createElementBlock as b, normalizeClass as v, createVNode as g, Transition as _, withCtx as w, createElementVNode as l, createCommentVNode as p, Fragment as U, renderList as q, isMemoSame as G, createBlock as C, resolveDynamicComponent as J, mergeProps as K, toDisplayString as O, unref as Q } from "vue";
2
- import { useRoute as X } from "vue-router";
3
- import m from "../Icon.vue.js";
4
- import { $t as Y } from "../../utils/i18n.js";
5
- const Z = {
6
- key: 0,
7
- class: "absolute left-0 top-0 bottom-0 z-10 flex items-center pointer-events-none"
8
- }, ee = { class: "truncate" }, te = {
9
- key: 0,
10
- class: "absolute right-0 top-0 bottom-0 z-10 flex items-center justify-end pointer-events-none"
11
- }, le = /* @__PURE__ */ A({
12
- __name: "NavbarTabs",
13
- props: {
14
- items: {},
15
- variant: { default: "solid" },
16
- size: { default: "md" },
17
- activeClass: { default: "" },
18
- inactiveClass: { default: "" },
19
- class: { default: "" }
20
- },
21
- setup(a) {
22
- const n = a, i = d(null), I = d(!1), z = d(!1), c = () => {
23
- const t = i.value;
24
- t && (I.value = t.scrollLeft > 2, z.value = t.scrollLeft + t.clientWidth < t.scrollWidth - 2);
25
- }, R = (t) => {
26
- const r = i.value;
27
- if (!r) return;
28
- const e = r.clientWidth * 0.6;
29
- r.scrollBy({ left: t === "right" ? e : -e, behavior: "smooth" });
30
- };
31
- F(() => {
32
- k(() => {
33
- c(), i.value?.addEventListener("scroll", c, { passive: !0 });
34
- });
35
- }), H(() => {
36
- i.value?.removeEventListener("scroll", c);
37
- });
38
- const h = X();
39
- T(
40
- () => h.path,
41
- () => k(c)
42
- );
43
- const x = d(/* @__PURE__ */ new Map()), E = (t, r) => {
44
- const e = t?.$el ?? t;
45
- e instanceof HTMLElement ? x.value.set(r, e) : x.value.delete(r);
46
- };
47
- T(
48
- () => h.path,
49
- (t) => {
50
- k(() => {
51
- const r = n.items.findIndex((o) => u(o));
52
- if (r === -1) return;
53
- x.value.get(r)?.scrollIntoView({ block: "nearest", inline: "center", behavior: "smooth" });
54
- });
55
- },
56
- { immediate: !0 }
57
- );
58
- const V = {
59
- line: "flex border-b border-border gap-0",
60
- pill: "flex gap-1 p-1 bg-secondary/80 rounded-lg",
61
- solid: "flex gap-0",
62
- ghost: "flex gap-1"
63
- }, $ = {
64
- sm: "px-2.5 py-1.5 text-xs",
65
- md: "px-3.5 py-2 text-sm",
66
- lg: "px-5 py-2.5 text-base"
67
- }, M = {
68
- line: "text-primary border-b-2 border-primary -mb-px",
69
- pill: "bg-background text-foreground shadow-sm",
70
- solid: "bg-primary-light text-primary-dark",
71
- ghost: "bg-accent text-accent-foreground"
72
- }, N = {
73
- line: "text-muted-foreground border-b-2 border-transparent hover:text-foreground hover:border-border",
74
- pill: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
75
- solid: "text-muted-foreground hover:text-foreground hover:bg-accent/50",
76
- ghost: "text-muted-foreground hover:text-foreground hover:bg-accent/50"
77
- }, u = (t) => {
78
- const r = h.path;
79
- if (!t.to) return !1;
80
- const e = typeof t.to == "string" ? t.to : t.to.path;
81
- if (!e) return !1;
82
- if (t.exact || e === "/")
83
- return r === e;
84
- if (r === e) return !0;
85
- if (r.startsWith(e)) {
86
- const o = r[e.length];
87
- return o === "/" || o === "?" || o === "#" || o === void 0;
88
- }
89
- return !1;
90
- }, W = (t) => {
91
- const r = "group relative inline-flex items-center justify-center gap-2 font-medium whitespace-nowrap shrink-0 select-none cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-1", e = t.disabled ? "opacity-50 pointer-events-none cursor-not-allowed" : "", S = u(t) ? n.activeClass || M[n.variant] : n.inactiveClass || N[n.variant];
92
- return [r, $[n.size], S, e].filter(Boolean).join(" ");
93
- }, j = (t) => t.to ? "router-link" : t.href ? "a" : "button", D = (t) => t.to ? { to: t.to } : t.href ? { href: t.href, target: "_blank", rel: "noopener noreferrer" } : { type: "button" }, P = (t, r) => {
94
- r.disabled && t.preventDefault();
95
- };
96
- return (t, r) => (s(), b("div", {
97
- class: v(["relative flex items-center w-full min-w-0 border-b", n.class])
98
- }, [
99
- g(_, { name: "fade-x" }, {
100
- default: w(() => [
101
- I.value ? (s(), b("div", Z, [
102
- r[4] || (r[4] = l("div", { class: "w-8 h-full bg-gradient-to-r from-background to-transparent" }, null, -1)),
103
- l("button", {
104
- type: "button",
105
- class: "pointer-events-auto absolute left-0 bg-body h-full px-1 flex items-center text-muted-foreground hover:text-foreground transition-colors",
106
- "aria-label": "Scroll tabs left",
107
- tabindex: "-1",
108
- onClick: r[0] || (r[0] = (e) => R("left"))
109
- }, [
110
- g(m, {
111
- icon: "lucide:chevron-left",
112
- class: "w-4 h-4"
113
- })
114
- ])
115
- ])) : p("", !0)
116
- ]),
117
- _: 1
118
- }),
119
- l("nav", {
120
- ref_key: "scrollRef",
121
- ref: i,
122
- role: "tablist",
123
- class: v([
124
- "flex-1 overflow-x-auto scroll-smooth navbar-tabs-no-scrollbar",
125
- V[a.variant]
126
- ]),
127
- style: { "will-change": "transform", contain: "layout style" },
128
- "aria-label": "Page tabs"
129
- }, [
130
- (s(!0), b(U, null, q(a.items, (e, o, S, f) => {
131
- const L = [e, u(e), e.disabled];
132
- if (f && f.key === o && G(f, L)) return f;
133
- const B = (s(), C(J(j(e)), K({ key: o }, { ref_for: !0 }, D(e), {
134
- ref_for: !0,
135
- ref: (y) => E(y, o),
136
- role: "tab",
137
- "aria-selected": u(e),
138
- "aria-disabled": e.disabled || void 0,
139
- tabindex: e.disabled ? -1 : 0,
140
- class: W(e),
141
- onClick: (y) => P(y, e)
142
- }), {
143
- default: w(() => [
144
- e.icon ? (s(), C(m, {
145
- key: 0,
146
- icon: e.icon,
147
- class: v(["shrink-0", a.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4"])
148
- }, null, 8, ["icon", "class"])) : p("", !0),
149
- l("span", ee, O(e.labelI18n ? Q(Y)(e.labelI18n) : e.label), 1),
150
- e.iconRight ? (s(), C(m, {
151
- key: 1,
152
- icon: e.iconRight,
153
- class: v(["shrink-0 opacity-70", a.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4"])
154
- }, null, 8, ["icon", "class"])) : p("", !0)
155
- ]),
156
- _: 2
157
- }, 1040, ["aria-selected", "aria-disabled", "tabindex", "class", "onClick"]));
158
- return B.memo = L, B;
159
- }, r, 1), 128))
160
- ], 2),
161
- g(_, { name: "fade-x" }, {
162
- default: w(() => [
163
- z.value ? (s(), b("div", te, [
164
- r[5] || (r[5] = l("div", { class: "w-8 h-full bg-gradient-to-l from-background to-transparent" }, null, -1)),
165
- l("button", {
166
- type: "button",
167
- class: "pointer-events-auto absolute right-0 h-full px-1 flex items-center text-muted-foreground hover:text-foreground transition-colors bg-body",
168
- "aria-label": "Scroll tabs right",
169
- tabindex: "-1",
170
- onClick: r[3] || (r[3] = (e) => R("right"))
171
- }, [
172
- g(m, {
173
- icon: "lucide:chevron-right",
174
- class: "w-4 h-4"
175
- })
176
- ])
177
- ])) : p("", !0)
178
- ]),
179
- _: 1
180
- })
181
- ], 2));
182
- }
183
- });
1
+ import o from "./NavbarTabs.vue2.js";
2
+ /* empty css */
3
+ /* empty css */
4
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const s = /* @__PURE__ */ a(o, [["__scopeId", "data-v-b4a2c569"]]);
184
6
  export {
185
- le as default
7
+ s as default
186
8
  };