vlite3 0.4.8 → 0.5.2

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 (268) hide show
  1. package/README.md +201 -100
  2. package/_virtual/Barcode.js +4 -0
  3. package/_virtual/CODE128.js +4 -0
  4. package/_virtual/CODE128A.js +4 -0
  5. package/_virtual/CODE128B.js +4 -0
  6. package/_virtual/CODE128C.js +4 -0
  7. package/_virtual/CODE128_AUTO.js +4 -0
  8. package/_virtual/CODE93.js +4 -0
  9. package/_virtual/CODE93FullASCII.js +4 -0
  10. package/_virtual/EAN.js +4 -0
  11. package/_virtual/EAN13.js +4 -0
  12. package/_virtual/EAN2.js +4 -0
  13. package/_virtual/EAN5.js +4 -0
  14. package/_virtual/EAN8.js +4 -0
  15. package/_virtual/ErrorHandler.js +4 -0
  16. package/_virtual/FileSaver.min.js +5 -0
  17. package/_virtual/FileSaver.min2.js +4 -0
  18. package/_virtual/ITF.js +4 -0
  19. package/_virtual/ITF14.js +4 -0
  20. package/_virtual/JsBarcode.js +7 -0
  21. package/_virtual/MSI.js +4 -0
  22. package/_virtual/MSI10.js +4 -0
  23. package/_virtual/MSI1010.js +4 -0
  24. package/_virtual/MSI11.js +4 -0
  25. package/_virtual/MSI1110.js +4 -0
  26. package/_virtual/UPC.js +4 -0
  27. package/_virtual/UPCE.js +4 -0
  28. package/_virtual/_commonjsHelpers.js +8 -0
  29. package/_virtual/alignment-pattern.js +4 -0
  30. package/_virtual/auto.js +4 -0
  31. package/_virtual/browser.js +7 -0
  32. package/_virtual/browser2.js +4 -0
  33. package/_virtual/canvas.js +4 -0
  34. package/_virtual/canvas2.js +4 -0
  35. package/_virtual/checksums.js +4 -0
  36. package/_virtual/constants.js +4 -0
  37. package/_virtual/constants2.js +4 -0
  38. package/_virtual/constants3.js +4 -0
  39. package/_virtual/constants4.js +4 -0
  40. package/_virtual/defaults.js +4 -0
  41. package/_virtual/dijkstra.js +4 -0
  42. package/_virtual/encoder.js +4 -0
  43. package/_virtual/error-correction-code.js +4 -0
  44. package/_virtual/error-correction-level.js +4 -0
  45. package/_virtual/exceptions.js +4 -0
  46. package/_virtual/finder-pattern.js +4 -0
  47. package/_virtual/fixOptions.js +4 -0
  48. package/_virtual/format-info.js +4 -0
  49. package/_virtual/galois-field.js +4 -0
  50. package/_virtual/getOptionsFromElement.js +4 -0
  51. package/_virtual/getRenderProperties.js +4 -0
  52. package/_virtual/index.js +4 -0
  53. package/_virtual/index10.js +4 -0
  54. package/_virtual/index11.js +4 -0
  55. package/_virtual/index2.js +4 -0
  56. package/_virtual/index3.js +4 -0
  57. package/_virtual/index4.js +4 -0
  58. package/_virtual/index5.js +4 -0
  59. package/_virtual/index6.js +4 -0
  60. package/_virtual/index7.js +4 -0
  61. package/_virtual/index8.js +4 -0
  62. package/_virtual/index9.js +4 -0
  63. package/_virtual/linearizeEncodings.js +4 -0
  64. package/_virtual/mask-pattern.js +4 -0
  65. package/_virtual/merge.js +4 -0
  66. package/_virtual/mode.js +4 -0
  67. package/_virtual/object.js +4 -0
  68. package/_virtual/optionsFromStrings.js +4 -0
  69. package/_virtual/papaparse.min.js +7 -0
  70. package/_virtual/papaparse.min2.js +4 -0
  71. package/_virtual/polynomial.js +4 -0
  72. package/_virtual/qrcode.js +4 -0
  73. package/_virtual/regex.js +4 -0
  74. package/_virtual/segments.js +4 -0
  75. package/_virtual/shared.js +4 -0
  76. package/_virtual/svg-tag.js +4 -0
  77. package/_virtual/svg.js +4 -0
  78. package/_virtual/utils.js +4 -0
  79. package/_virtual/utils2.js +4 -0
  80. package/_virtual/version-check.js +4 -0
  81. package/_virtual/version.js +4 -0
  82. package/components/Accordion/Accordion.vue.d.ts +7 -7
  83. package/components/Accordion/AccordionItem.vue.d.ts +4 -4
  84. package/components/Accordion/AccordionTrigger.vue.d.ts +2 -2
  85. package/components/Alert.vue.d.ts +1 -1
  86. package/components/Avatar.vue.d.ts +2 -2
  87. package/components/Avatar.vue.js +2 -2
  88. package/components/AvatarUploader/AvatarUploader.vue.d.ts +5 -5
  89. package/components/Badge.vue.d.ts +1 -1
  90. package/components/Barcode/Barcode.vue.d.ts +22 -0
  91. package/components/Barcode/Barcode.vue.js +58 -0
  92. package/components/Barcode/Barcode.vue2.js +4 -0
  93. package/components/Barcode/index.d.ts +2 -0
  94. package/components/Barcode/types.d.ts +5 -0
  95. package/components/Barcode/types.js +15 -0
  96. package/components/Breadcrumb/Breadcrumb.vue.d.ts +23 -0
  97. package/components/Breadcrumb/Breadcrumb.vue.js +7 -0
  98. package/components/Breadcrumb/Breadcrumb.vue2.js +84 -0
  99. package/components/Breadcrumb/BreadcrumbItem.vue.d.ts +27 -0
  100. package/components/Breadcrumb/BreadcrumbItem.vue.js +7 -0
  101. package/components/Breadcrumb/BreadcrumbItem.vue2.js +50 -0
  102. package/components/Breadcrumb/index.d.ts +3 -0
  103. package/components/Breadcrumb/types.d.ts +19 -0
  104. package/components/Button.vue.d.ts +4 -4
  105. package/components/Button.vue.js +32 -29
  106. package/components/ButtonGroup.vue.d.ts +1 -1
  107. package/components/Carousel/Carousel.vue.d.ts +58 -58
  108. package/components/CheckBox.vue.d.ts +2 -2
  109. package/components/Chip/Chip.vue.d.ts +3 -3
  110. package/components/ChoiceBox/ChoiceBox.vue.d.ts +4 -4
  111. package/components/ColorPicker/ColorPicker.vue.d.ts +3 -3
  112. package/components/ColorPicker/index.d.ts +1 -0
  113. package/components/CommandPaletteContent.vue.d.ts +15 -0
  114. package/components/CommandPaletteContent.vue.js +7 -0
  115. package/components/CommandPaletteContent.vue2.js +287 -0
  116. package/components/ConfirmationModal.vue.js +12 -10
  117. package/components/DataList/DataList.vue.d.ts +2 -2
  118. package/components/DataTable/DataTable.vue.d.ts +6 -6
  119. package/components/DataTable/DataTableRow.vue.d.ts +3 -3
  120. package/components/DatePicker.vue.d.ts +2 -2
  121. package/components/DatePicker.vue.js +7 -7
  122. package/components/DateRangePicker.vue.d.ts +29 -0
  123. package/components/DateRangePicker.vue.js +231 -0
  124. package/components/DateRangePicker.vue2.js +4 -0
  125. package/components/Dropdown/Dropdown.vue.d.ts +11 -6
  126. package/components/Dropdown/Dropdown.vue.js +147 -109
  127. package/components/Dropdown/DropdownBooleanItem.vue.js +9 -8
  128. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  129. package/components/Dropdown/DropdownGroupedLayout.vue.js +35 -34
  130. package/components/Dropdown/DropdownItem.vue.js +11 -10
  131. package/components/Dropdown/DropdownMenu.vue.d.ts +5 -3
  132. package/components/Dropdown/DropdownMenu.vue.js +114 -111
  133. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  134. package/components/Dropdown/DropdownTrigger.vue.js +9 -7
  135. package/components/ExportData/ExportData.vue.d.ts +16 -0
  136. package/components/ExportData/ExportData.vue.js +135 -0
  137. package/components/ExportData/ExportData.vue2.js +4 -0
  138. package/components/ExportData/index.d.ts +2 -0
  139. package/components/ExportData/types.d.ts +17 -0
  140. package/components/FilePicker/FilePicker.vue.d.ts +5 -5
  141. package/components/Form/CustomFields.vue.d.ts +6 -6
  142. package/components/Form/CustomFields.vue.js +1 -1
  143. package/components/Form/Form.vue.d.ts +4 -5
  144. package/components/Form/Form.vue.js +2 -2
  145. package/components/Form/Form.vue2.js +221 -178
  146. package/components/Form/FormField.vue.d.ts +4 -3
  147. package/components/Form/FormField.vue.js +70 -62
  148. package/components/Form/FormFields.vue.d.ts +3 -1
  149. package/components/Form/FormFields.vue.js +2 -2
  150. package/components/Form/FormFields.vue2.js +105 -59
  151. package/components/GoogleLogin.vue.d.ts +2 -2
  152. package/components/Icon.vue.d.ts +2 -0
  153. package/components/Icon.vue.js +12 -11
  154. package/components/ImportData/ImportData.vue.d.ts +31 -0
  155. package/components/ImportData/ImportData.vue.js +242 -0
  156. package/components/ImportData/ImportData.vue2.js +4 -0
  157. package/components/ImportData/ImportStep1.vue.d.ts +23 -0
  158. package/components/ImportData/ImportStep1.vue.js +162 -0
  159. package/components/ImportData/ImportStep1.vue2.js +4 -0
  160. package/components/ImportData/ImportStep2.vue.d.ts +20 -0
  161. package/components/ImportData/ImportStep2.vue.js +98 -0
  162. package/components/ImportData/ImportStep2.vue2.js +4 -0
  163. package/components/ImportData/ImportStep3.vue.d.ts +6 -0
  164. package/components/ImportData/ImportStep3.vue.js +98 -0
  165. package/components/ImportData/ImportStep3.vue2.js +4 -0
  166. package/components/ImportData/ImportStep4.vue.d.ts +6 -0
  167. package/components/ImportData/ImportStep4.vue.js +139 -0
  168. package/components/ImportData/ImportStep4.vue2.js +4 -0
  169. package/components/ImportData/index.d.ts +2 -0
  170. package/components/ImportData/types.d.ts +51 -0
  171. package/components/Input.vue.d.ts +9 -9
  172. package/components/Input.vue.js +137 -120
  173. package/components/List/List.vue.d.ts +18 -0
  174. package/components/List/List.vue.js +189 -0
  175. package/components/List/List.vue2.js +4 -0
  176. package/components/List/ListFieldRow.vue.d.ts +35 -0
  177. package/components/List/ListFieldRow.vue.js +119 -0
  178. package/components/List/ListFieldRow.vue2.js +4 -0
  179. package/components/List/index.d.ts +4 -0
  180. package/components/List/types.d.ts +1 -0
  181. package/components/List/utils.d.ts +9 -0
  182. package/components/List/utils.js +64 -0
  183. package/components/Masonry/Masonry.vue.d.ts +2 -2
  184. package/components/Modal.vue.js +5 -122
  185. package/components/Modal.vue2.js +133 -2
  186. package/components/MultiSelect/MultiSelect.vue.d.ts +12 -9
  187. package/components/MultiSelect/MultiSelect.vue.js +101 -64
  188. package/components/Navbar/Navbar.vue.d.ts +48 -9
  189. package/components/Navbar/Navbar.vue.js +418 -146
  190. package/components/Navbar/NavbarItem.vue.d.ts +2 -2
  191. package/components/Navbar/NavbarTabs.vue.d.ts +21 -0
  192. package/components/Navbar/NavbarTabs.vue.js +179 -0
  193. package/components/Navbar/NavbarTabs.vue3.js +5 -0
  194. package/components/Navbar/index.d.ts +3 -0
  195. package/components/NavbarCommandPalette.vue.d.ts +48 -0
  196. package/components/NumberInput.vue.d.ts +8 -8
  197. package/components/OTPInput/OTPInput.vue.d.ts +7 -7
  198. package/components/Pagination/Pagination.vue.d.ts +1 -1
  199. package/components/PermissionMatrix/PermissionEditor.vue.d.ts +36 -0
  200. package/components/PermissionMatrix/PermissionEditor.vue.js +323 -0
  201. package/components/PermissionMatrix/PermissionEditor.vue2.js +4 -0
  202. package/components/PermissionMatrix/PermissionMatrix.vue.d.ts +15 -0
  203. package/components/PermissionMatrix/PermissionMatrix.vue.js +7 -0
  204. package/components/PermissionMatrix/PermissionMatrix.vue2.js +245 -0
  205. package/components/PermissionMatrix/index.d.ts +3 -0
  206. package/components/PermissionMatrix/types.d.ts +59 -0
  207. package/components/PricingPlan/PricingPlan.vue.d.ts +3 -3
  208. package/components/ProgressBar/ProgressBar.vue.d.ts +3 -3
  209. package/components/QRCode/QRCode.vue.d.ts +15 -0
  210. package/components/QRCode/QRCode.vue.js +38 -0
  211. package/components/QRCode/QRCode.vue2.js +4 -0
  212. package/components/QRCode/index.d.ts +1 -0
  213. package/components/Screen/Screen.vue.d.ts +232 -5
  214. package/components/Screen/Screen.vue.js +423 -271
  215. package/components/Screen/ScreenFilter.vue.d.ts +2 -2
  216. package/components/Screen/ScreenFilter.vue.js +9 -9
  217. package/components/Screen/types.d.ts +12 -0
  218. package/components/SidePanel.vue.d.ts +2 -2
  219. package/components/SidebarMenu/SidebarMenu.vue.d.ts +15 -2
  220. package/components/SidebarMenu/SidebarMenu.vue.js +117 -47
  221. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +2 -0
  222. package/components/SidebarMenu/SidebarMenuItem.vue.js +192 -175
  223. package/components/SidebarMenu/types.d.ts +32 -5
  224. package/components/Slider.vue.d.ts +2 -2
  225. package/components/Spinner/Spinner.vue.d.ts +2 -2
  226. package/components/Stats/Stats.vue.d.ts +14 -0
  227. package/components/Stats/Stats.vue.js +307 -0
  228. package/components/Stats/Stats.vue2.js +4 -0
  229. package/components/Stats/index.d.ts +2 -0
  230. package/components/Stats/types.d.ts +32 -0
  231. package/components/Switch.vue.d.ts +2 -1
  232. package/components/Switch.vue.js +4 -2
  233. package/components/Tabes/Tabes.vue.d.ts +3 -3
  234. package/components/Tabes/Tabes.vue.js +60 -57
  235. package/components/Tabes/types.d.ts +5 -0
  236. package/components/Textarea.vue.d.ts +3 -3
  237. package/components/{Timeline.vue.d.ts → Timeline/Timeline.vue.d.ts} +23 -2
  238. package/components/Timeline/Timeline.vue.js +92 -0
  239. package/components/Timeline/TimelineIndicator.vue.d.ts +9 -0
  240. package/components/Timeline/TimelineIndicator.vue.js +68 -0
  241. package/components/Timeline/TimelineIndicator.vue2.js +4 -0
  242. package/components/Timeline/TimelineItem.vue.d.ts +56 -0
  243. package/components/Timeline/TimelineItem.vue.js +173 -0
  244. package/components/Timeline/TimelineItem.vue2.js +4 -0
  245. package/components/Timeline/index.d.ts +3 -0
  246. package/components/Tooltip.vue.d.ts +2 -2
  247. package/components/Workbook/Sheet.vue.d.ts +2 -2
  248. package/components/Workbook/Workbook.vue.d.ts +3 -3
  249. package/components/index.d.ts +62 -0
  250. package/composables/useBreadcrumb.d.ts +17 -0
  251. package/composables/useBreadcrumb.js +27 -0
  252. package/core/config.d.ts +34 -0
  253. package/core/config.js +10 -7
  254. package/core/index.js +15 -8
  255. package/index.d.ts +55 -44
  256. package/index.js +243 -200
  257. package/package.json +12 -2
  258. package/router.d.ts +2 -0
  259. package/style.css +7 -5
  260. package/types/button.d.ts +1 -1
  261. package/types/config.type.d.ts +35 -0
  262. package/types/form.type.d.ts +3 -1
  263. package/types/index.d.ts +2 -1
  264. package/types/list.type.d.ts +57 -0
  265. package/types/navbar.type.d.ts +38 -1
  266. package/types/timeline.type.d.ts +14 -4
  267. package/components/Timeline.vue.js +0 -160
  268. /package/components/{Timeline.vue2.js → Timeline/Timeline.vue2.js} +0 -0
@@ -1,145 +1,165 @@
1
- import { defineComponent as Q, inject as U, computed as c, resolveComponent as W, openBlock as o, createElementBlock as m, createBlock as p, unref as l, withCtx as h, resolveDynamicComponent as $, createCommentVNode as d, createElementVNode as v, toDisplayString as y, normalizeClass as s, createVNode as k, mergeProps as A, createTextVNode as X, Fragment as D, withKeys as Y, withModifiers as Z, Transition as O, normalizeStyle as ee, renderList as te } from "vue";
2
- import g from "../Icon.vue.js";
3
- import P from "../Tooltip.vue.js";
4
- import ne from "../Dropdown/Dropdown.vue.js";
5
- import { $t as V } from "../../utils/i18n.js";
6
- const ae = { class: "w-full relative sidebar-manu-item" }, ie = {
1
+ import { defineComponent as X, inject as Y, computed as s, resolveComponent as Z, openBlock as r, createElementBlock as v, normalizeClass as u, createBlock as p, unref as a, withCtx as h, createElementVNode as f, normalizeStyle as $, createCommentVNode as d, toDisplayString as y, createVNode as C, 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
+ import { useRouter as oe } from "vue-router";
3
+ import w from "../Icon.vue.js";
4
+ import _ from "../Tooltip.vue.js";
5
+ import le from "../Dropdown/Dropdown.vue.js";
6
+ import { $t as K } from "../../utils/i18n.js";
7
+ const re = {
7
8
  key: 0,
8
9
  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"
9
- }, oe = { class: "w-full" }, le = { class: "truncate flex-1" }, re = ["onKeydown"], ce = {
10
+ }, 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 = {
10
11
  key: 0,
11
12
  class: "overflow-hidden transition-all duration-300 ease-in-out relative"
12
- }, se = { class: "mt-0.5 space-y-0.5" }, he = /* @__PURE__ */ Q({
13
+ }, ve = { class: "mt-0.5 space-y-0.5" }, xe = /* @__PURE__ */ X({
13
14
  __name: "SidebarMenuItem",
14
15
  props: {
15
16
  item: {},
16
- depth: { default: 0 }
17
+ depth: { default: 0 },
18
+ menuOffset: {},
19
+ itemClass: {}
17
20
  },
18
- setup(r) {
19
- const t = r, e = U("sidebar-menu-ctx");
21
+ setup(c) {
22
+ const t = c, e = Y("sidebar-menu-ctx"), O = oe();
20
23
  if (!e)
21
24
  throw new Error("SidebarMenuItem must be used within a SidebarMenu");
22
- const K = c(() => e.compact && b.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), C = c(() => K.value === "popover" && b.value), x = c(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), b = c(() => !!t.item.children?.length), E = c(() => C.value ? !1 : e.expandedItems.includes(x.value)), I = c(() => e.activeItem === x.value), j = (a) => {
23
- t.item.disabled || (b.value && !t.item.to && !t.item.href && (C.value || e.toggleExpand(x.value)), t.item.action && t.item.action(t.item), (!b.value || t.item.to) && e.setActive(x.value));
24
- }, M = (a) => {
25
- a.stopPropagation(), C.value || e.toggleExpand(x.value);
26
- }, S = c(() => e.indentSize || 12), L = c(() => e.compact ? { width: "100%" } : {
27
- marginLeft: `${t.depth * S.value}px`,
28
- width: `calc(100% - ${t.depth * S.value}px)`
29
- }), _ = c(() => {
30
- const a = "group flex items-center justify-between text-sm 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 w-full", n = e.compact ? "justify-center py-2 px-1" : "justify-between py-2 px-2";
31
- let f = "";
32
- return I.value ? f = "bg-primary-light text-primary-fg-light" : f = "text-muted hover:bg-accent/80 hover:text-foreground", t.item.disabled && (f = "opacity-50 cursor-not-allowed pointer-events-none"), `${a} ${n} ${f} ${t.item.class || ""}`;
33
- }), u = c(() => e.compact && e.showCompactLabels), w = c(() => t.item.labelI18n ? V(t.item.labelI18n) : t.item.label), B = (a) => ({
34
- label: a.labelI18n ? V(a.labelI18n) : a.label,
35
- value: a.id || a.label,
36
- icon: a.icon,
37
- disabled: a.disabled,
38
- children: a.children ? a.children.map(B) : void 0,
39
- data: a
40
- }), T = c(() => t.item.children ? t.item.children.map(B) : []), H = (a) => {
41
- const n = a.data;
42
- if (n) {
43
- n.action && n.action(n);
44
- const f = n.id || n.label || (typeof n.to == "string" ? n.to : "");
45
- f && e.setActive(f);
25
+ const n = s(() => e.currentOrientation === "horizontal" && t.depth === 0), b = s(() => !!t.item.children?.length), R = s(() => n.value && b.value || e.compact && b.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), S = s(() => e.renderNestedTabs && t.depth === 0 ? !1 : R.value === "popover" && b.value), g = s(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), M = s(() => S.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(g.value)), E = s(() => !(!b.value || e.renderNestedTabs && t.depth === 0)), I = s(() => e.activeItem === g.value), j = (o) => {
26
+ if (!t.item.disabled) {
27
+ if (e.renderNestedTabs && t.depth === 0) {
28
+ t.item.action && t.item.action(t.item), e.setActive(g.value);
29
+ return;
30
+ }
31
+ b.value && !t.item.to && !t.item.href && (S.value || e.toggleExpand(g.value)), t.item.action && t.item.action(t.item), (!b.value || t.item.to) && e.setActive(g.value);
46
32
  }
47
- }, F = (a) => {
48
- const n = a;
49
- n.style.height = "0", n.style.opacity = "0";
50
- }, R = (a) => {
51
- const n = a;
52
- n.style.height = n.scrollHeight + "px", n.style.opacity = "1";
53
- }, q = (a) => {
54
- const n = a;
55
- n.style.height = "auto", n.style.overflow = "visible";
56
- }, G = (a) => {
57
- const n = a;
58
- n.style.height = n.scrollHeight + "px", n.style.overflow = "hidden", n.style.opacity = "1";
59
- }, J = (a) => {
60
- const n = a;
61
- n.style.height = "0", n.style.opacity = "0";
62
- }, N = c(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), z = c(() => t.item.to ? { to: t.item.to } : t.item.href ? {
33
+ }, L = (o) => {
34
+ if (o.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
35
+ t.item.action && t.item.action(t.item), e.setActive(g.value);
36
+ return;
37
+ }
38
+ S.value || e.toggleExpand(g.value);
39
+ }, z = s(() => e.indentSize || 12), N = s(() => n.value ? {} : e.compact ? { width: "100%" } : {
40
+ marginLeft: `${t.depth * z.value}px`,
41
+ width: `calc(100% - ${t.depth * z.value}px)`
42
+ }), T = s(() => {
43
+ const i = `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 ${n.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`, x = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
44
+ let l = "";
45
+ return I.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"), `${i} ${x} ${l} ${t.item.class || ""}`;
46
+ }), m = s(() => e.compact && e.showCompactLabels), k = s(
47
+ () => t.item.labelI18n ? K(t.item.labelI18n) : t.item.label
48
+ ), A = (o) => ({
49
+ label: o.labelI18n ? K(o.labelI18n) : o.label,
50
+ value: o.id || o.label,
51
+ icon: o.icon,
52
+ disabled: o.disabled,
53
+ children: o.children ? o.children.map(A) : void 0,
54
+ data: o
55
+ }), F = s(() => t.item.children ? t.item.children.map(A) : []), W = (o) => {
56
+ const i = o.data;
57
+ if (i) {
58
+ i.action && i.action(i);
59
+ const x = i.id || i.label || (typeof i.to == "string" ? i.to : "");
60
+ x && e.setActive(x), i.to ? O.push(i.to).catch(() => {
61
+ }) : i.href && window.open(i.href, "_blank");
62
+ }
63
+ }, q = (o) => {
64
+ const i = o;
65
+ i.style.height = "0", i.style.opacity = "0";
66
+ }, G = (o) => {
67
+ const i = o;
68
+ i.style.height = i.scrollHeight + "px", i.style.opacity = "1";
69
+ }, J = (o) => {
70
+ const i = o;
71
+ i.style.height = "auto", i.style.overflow = "visible";
72
+ }, Q = (o) => {
73
+ const i = o;
74
+ i.style.height = i.scrollHeight + "px", i.style.overflow = "hidden", i.style.opacity = "1";
75
+ }, U = (o) => {
76
+ const i = o;
77
+ i.style.height = "0", i.style.opacity = "0";
78
+ }, H = s(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), P = s(() => t.item.to ? { to: t.item.to } : t.item.href ? {
63
79
  href: t.item.href,
64
80
  target: "_blank",
65
81
  rel: "noopener noreferrer"
66
82
  } : { type: "button" });
67
- return (a, n) => {
68
- const f = W("SidebarMenuItem", !0);
69
- return o(), m("div", ae, [
70
- C.value ? (o(), p(l(ne), {
83
+ return (o, i) => {
84
+ const x = Z("SidebarMenuItem", !0);
85
+ return r(), v("div", {
86
+ class: u(["relative sidebar-manu-item", n.value ? "w-auto" : "w-full"])
87
+ }, [
88
+ S.value ? (r(), p(a(le), {
71
89
  key: 0,
72
- position: "right-start",
73
- offset: [0, 10],
74
- class: "w-full",
90
+ position: n.value ? "bottom-start" : "right-start",
91
+ offset: c.menuOffset,
92
+ class: "w-full block",
75
93
  searchable: !1,
76
- width: "220px",
77
- options: T.value,
78
- onOnSelect: H
94
+ width: a(e).nestedMenuWidth,
95
+ maxHeight: a(e).nestedMenuMaxHeight,
96
+ options: F.value,
97
+ onOnSelect: W
79
98
  }, {
80
99
  header: h(() => [
81
- l(e).compact ? (o(), m("div", ie, [
82
- r.item.icon ? (o(), p(g, {
100
+ a(e).compact && !n.value ? (r(), v("div", re, [
101
+ c.item.icon ? (r(), p(w, {
83
102
  key: 0,
84
- icon: r.item.icon,
103
+ icon: c.item.icon,
85
104
  class: "shrink-0 transition-colors opacity-80 group-hover:opacity-100"
86
105
  }, null, 8, ["icon"])) : d("", !0),
87
- X(" " + y(w.value), 1)
106
+ ee(" " + y(k.value), 1)
88
107
  ])) : d("", !0)
89
108
  ]),
90
- trigger: h(({ isOpen: i }) => [
91
- k(P, {
92
- content: w.value,
93
- placement: "right",
109
+ trigger: h(({ isOpen: l }) => [
110
+ C(_, {
111
+ content: k.value,
112
+ placement: n.value ? "bottom" : "right",
94
113
  className: "sidebar-menu-tooltip",
95
- disabled: !l(e).compact || i,
114
+ disabled: !a(e).showTooltip || !a(e).compact && !n.value || l,
96
115
  class: "w-full block"
97
116
  }, {
98
117
  default: h(() => [
99
- v("div", oe, [
100
- (o(), p($(N.value), A(z.value, {
101
- class: [_.value, i ? "bg-muted text-foreground" : ""],
102
- style: L.value,
118
+ f("div", ce, [
119
+ (r(), p(B(H.value), D(P.value, {
120
+ class: [T.value, l ? "bg-muted text-foreground" : ""],
121
+ style: N.value,
103
122
  "aria-haspopup": !0,
104
- "aria-expanded": i,
123
+ "aria-expanded": l,
105
124
  onClick: j
106
125
  }), {
107
126
  default: h(() => [
108
- v("div", {
109
- class: s(["min-w-0 flex-1 flex", [
110
- u.value ? "flex-col items-center justify-center gap-1" : l(e).compact ? "justify-center" : "items-center gap-2.5"
127
+ f("div", {
128
+ class: u(["min-w-0 flex-1 flex", [
129
+ m.value && !n.value ? "flex-col items-center justify-center gap-1" : a(e).compact && !n.value ? "justify-center" : "items-center gap-2.5"
111
130
  ]])
112
131
  }, [
113
- r.item.icon ? (o(), p(g, {
132
+ c.item.icon ? (r(), p(w, {
114
133
  key: 0,
115
- icon: r.item.icon,
116
- class: s(["shrink-0 transition-colors opacity-70 group-hover:opacity-100", [
117
- I.value || i ? "opacity-100" : "",
118
- l(e).compact ? "h-5 w-5" : "h-4 w-4"
119
- ]])
120
- }, null, 8, ["icon", "class"])) : d("", !0),
121
- v("span", {
122
- class: s(["truncate leading-none pt-0.5", {
123
- "text-[10px]": u.value,
124
- hidden: l(e).compact && !u.value,
125
- "md:hidden": l(e).compact && !u.value
134
+ icon: c.item.icon,
135
+ class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [I.value || l ? "opacity-100" : ""]]),
136
+ style: $({
137
+ width: a(e).compact && !n.value ? a(e).compactIconSize : a(e).iconSize,
138
+ height: a(e).compact && !n.value ? a(e).compactIconSize : a(e).iconSize
139
+ })
140
+ }, null, 8, ["icon", "class", "style"])) : d("", !0),
141
+ f("span", {
142
+ class: u(["truncate leading-none pt-0.5", {
143
+ [a(e).compactLabelClass]: m.value && !n.value,
144
+ hidden: a(e).compact && !m.value && !n.value,
145
+ "md:hidden": a(e).compact && !m.value && !n.value
126
146
  }])
127
- }, y(w.value), 3),
128
- r.item.badge && (!l(e).compact || !u.value) ? (o(), m("span", {
147
+ }, y(k.value), 3),
148
+ c.item.badge && (!a(e).compact || !m.value || n.value) ? (r(), v("span", {
129
149
  key: 1,
130
- class: s(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
131
- r.item.badgeClass || "bg-muted text-muted-foreground",
132
- { "md:hidden": l(e).compact }
150
+ class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
151
+ c.item.badgeClass || "bg-muted text-muted-foreground",
152
+ { "md:hidden": a(e).compact && !n.value }
133
153
  ]])
134
- }, y(r.item.badge), 3)) : d("", !0)
154
+ }, y(c.item.badge), 3)) : d("", !0)
135
155
  ], 2),
136
- v("div", {
137
- class: s(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": l(e).compact }])
156
+ f("div", {
157
+ class: u(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": a(e).compact && !n.value }])
138
158
  }, [
139
- k(g, {
140
- icon: "lucide:chevron-right",
159
+ C(w, {
160
+ icon: n.value ? "lucide:chevron-down" : "lucide:chevron-right",
141
161
  class: "h-3 w-3"
142
- })
162
+ }, null, 8, ["icon"])
143
163
  ], 2)
144
164
  ]),
145
165
  _: 2
@@ -147,113 +167,110 @@ const ae = { class: "w-full relative sidebar-manu-item" }, ie = {
147
167
  ])
148
168
  ]),
149
169
  _: 2
150
- }, 1032, ["content", "disabled"])
170
+ }, 1032, ["content", "placement", "disabled"])
151
171
  ]),
152
- item: h(({ option: i }) => [
153
- (o(), p($(i.data?.to ? "router-link" : i.data?.href ? "a" : "div"), {
154
- to: i.data?.to,
155
- href: i.data?.href,
156
- target: "option.data?.href ? '_blank' : undefined",
157
- class: "flex items-center w-full gap-2 text-sm"
158
- }, {
159
- default: h(() => [
160
- i.icon ? (o(), p(g, {
161
- key: 0,
162
- icon: i.icon,
163
- class: "h-4 w-4 shrink-0 opacity-70"
164
- }, null, 8, ["icon"])) : d("", !0),
165
- v("span", le, y(i.label), 1),
166
- i.data?.badge ? (o(), m("span", {
167
- key: 1,
168
- class: s(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", i.data?.badgeClass || "bg-muted text-muted-foreground"])
169
- }, y(i.data.badge), 3)) : d("", !0)
170
- ]),
171
- _: 2
172
- }, 1032, ["to", "href"]))
172
+ item: h(({ option: l }) => [
173
+ f("div", se, [
174
+ l.icon ? (r(), p(w, {
175
+ key: 0,
176
+ icon: l.icon,
177
+ class: "shrink-0 opacity-80",
178
+ style: $({ width: a(e).iconSize, height: a(e).iconSize })
179
+ }, null, 8, ["icon", "style"])) : d("", !0),
180
+ f("span", ue, y(l.label), 1),
181
+ l.data?.badge ? (r(), v("span", {
182
+ key: 1,
183
+ 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"])
184
+ }, y(l.data.badge), 3)) : d("", !0)
185
+ ])
173
186
  ]),
174
187
  _: 1
175
- }, 8, ["options"])) : (o(), m(D, { key: 1 }, [
176
- k(P, {
177
- content: w.value,
178
- placement: "right",
179
- disabled: !l(e).compact,
188
+ }, 8, ["position", "offset", "width", "maxHeight", "options"])) : (r(), v(V, { key: 1 }, [
189
+ C(_, {
190
+ content: k.value,
191
+ placement: n.value ? "bottom" : "right",
192
+ disabled: !a(e).showTooltip || !a(e).compact && !n.value,
180
193
  class: "w-full block"
181
194
  }, {
182
195
  default: h(() => [
183
- (o(), p($(N.value), A(z.value, {
184
- class: _.value,
185
- style: L.value,
186
- "aria-expanded": b.value ? E.value : void 0,
196
+ (r(), p(B(H.value), D(P.value, {
197
+ class: T.value,
198
+ style: N.value,
199
+ "aria-expanded": E.value ? M.value : void 0,
187
200
  "aria-current": I.value ? "page" : void 0,
188
201
  onClick: j
189
202
  }), {
190
203
  default: h(() => [
191
- v("div", {
192
- class: s(["min-w-0 flex-1 flex", [
193
- u.value ? "flex-col items-center justify-center gap-1" : l(e).compact ? "justify-center" : "items-center gap-2.5"
204
+ f("div", {
205
+ class: u(["min-w-0 flex-1 flex", [
206
+ m.value && !n.value ? "flex-col items-center justify-center gap-1" : a(e).compact && !n.value ? "justify-center" : "items-center gap-2.5"
194
207
  ]])
195
208
  }, [
196
- r.item.icon ? (o(), p(g, {
209
+ c.item.icon ? (r(), p(w, {
197
210
  key: 0,
198
- icon: r.item.icon,
199
- class: s(["shrink-0 transition-colors opacity-70 group-hover:opacity-100", [I.value ? "opacity-100" : "", l(e).compact ? "h-5 w-5" : "h-4 w-4"]])
200
- }, null, 8, ["icon", "class"])) : d("", !0),
201
- v("span", {
202
- class: s(["truncate leading-none pt-0.5", {
203
- "text-[10px]": u.value,
204
- hidden: l(e).compact && !u.value,
205
- "md:hidden": l(e).compact && !u.value
211
+ icon: c.item.icon,
212
+ class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [I.value ? "opacity-100" : ""]]),
213
+ style: $({
214
+ width: a(e).compact && !n.value ? a(e).compactIconSize : a(e).iconSize,
215
+ height: a(e).compact && !n.value ? a(e).compactIconSize : a(e).iconSize
216
+ })
217
+ }, null, 8, ["icon", "class", "style"])) : d("", !0),
218
+ f("span", {
219
+ class: u(["truncate leading-none pt-0.5 wrap-break-word flex-wrap text-wrap", {
220
+ [a(e).compactLabelClass]: m.value && !n.value,
221
+ hidden: a(e).compact && !m.value && !n.value,
222
+ "md:hidden": a(e).compact && !m.value && !n.value
206
223
  }])
207
- }, y(w.value), 3),
208
- r.item.badge && (!l(e).compact || !u.value) ? (o(), m("span", {
224
+ }, y(k.value), 3),
225
+ c.item.badge && (!a(e).compact || !m.value || n.value) ? (r(), v("span", {
209
226
  key: 1,
210
- class: s(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
211
- r.item.badgeClass || "bg-muted text-muted-foreground",
212
- { "md:hidden": l(e).compact }
227
+ class: u(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
228
+ c.item.badgeClass || "bg-muted text-muted-foreground",
229
+ { "md:hidden": a(e).compact && !n.value }
213
230
  ]])
214
- }, y(r.item.badge), 3)) : d("", !0)
231
+ }, y(c.item.badge), 3)) : d("", !0)
215
232
  ], 2),
216
- b.value ? (o(), m("div", {
233
+ E.value ? (r(), v("div", {
217
234
  key: 0,
218
235
  role: "button",
219
236
  tabindex: "0",
220
- class: s(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-all", { "md:hidden": l(e).compact }]),
221
- onClick: M,
222
- onKeydown: Y(Z(M, ["prevent"]), ["enter", "space"])
237
+ class: u(["ml-1.5 flex shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-all", { "md:hidden": a(e).compact && !n.value }]),
238
+ onClick: L,
239
+ onKeydown: te(ae(L, ["prevent"]), ["enter", "space"])
223
240
  }, [
224
- k(g, {
241
+ C(w, {
225
242
  icon: "lucide:chevron-down",
226
- class: s(["h-3 w-3 transition-transform duration-200", { "rotate-180": E.value }])
243
+ class: u(["h-3 w-3 transition-transform duration-200", { "rotate-180": M.value && !n.value }])
227
244
  }, null, 8, ["class"])
228
- ], 42, re)) : d("", !0)
245
+ ], 42, de)) : d("", !0)
229
246
  ]),
230
247
  _: 1
231
248
  }, 16, ["class", "style", "aria-expanded", "aria-current"]))
232
249
  ]),
233
250
  _: 1
234
- }, 8, ["content", "disabled"]),
235
- k(O, {
251
+ }, 8, ["content", "placement", "disabled"]),
252
+ C(ne, {
236
253
  name: "sidebar-slide",
237
- onBeforeEnter: F,
238
- onEnter: R,
239
- onAfterEnter: q,
240
- onBeforeLeave: G,
241
- onLeave: J
254
+ onBeforeEnter: q,
255
+ onEnter: G,
256
+ onAfterEnter: J,
257
+ onBeforeLeave: Q,
258
+ onLeave: U
242
259
  }, {
243
260
  default: h(() => [
244
- b.value && E.value ? (o(), m("div", ce, [
245
- l(e).variant === "default" ? (o(), m("div", {
261
+ b.value && M.value && !n.value ? (r(), v("div", me, [
262
+ a(e).variant === "default" ? (r(), v("div", {
246
263
  key: 0,
247
264
  class: "absolute top-0 bottom-2 w-px bg-border",
248
- style: ee({
249
- left: `${(r.depth + 1) * S.value - S.value / 2}px`
265
+ style: $({
266
+ left: `${(c.depth + 1) * z.value - z.value / 2}px`
250
267
  })
251
268
  }, null, 4)) : d("", !0),
252
- v("div", se, [
253
- (o(!0), m(D, null, te(r.item.children, (i) => (o(), p(f, {
254
- key: i.id || i.label,
255
- item: i,
256
- depth: r.depth + 1
269
+ f("div", ve, [
270
+ (r(!0), v(V, null, ie(c.item.children, (l) => (r(), p(x, {
271
+ key: l.id || l.label,
272
+ item: l,
273
+ depth: c.depth + 1
257
274
  }, null, 8, ["item", "depth"]))), 128))
258
275
  ])
259
276
  ])) : d("", !0)
@@ -261,10 +278,10 @@ const ae = { class: "w-full relative sidebar-manu-item" }, ie = {
261
278
  _: 1
262
279
  })
263
280
  ], 64))
264
- ]);
281
+ ], 2);
265
282
  };
266
283
  }
267
284
  });
268
285
  export {
269
- he as default
286
+ xe as default
270
287
  };
@@ -3,25 +3,41 @@ export interface SidebarMenuItemSchema {
3
3
  label: string;
4
4
  labelI18n?: string;
5
5
  icon?: string;
6
- to?: string | Record<string, any>;
6
+ to?: string | {
7
+ path: string;
8
+ [key: string]: any;
9
+ };
7
10
  href?: string;
8
11
  children?: SidebarMenuItemSchema[];
9
12
  badge?: string | number;
10
13
  badgeClass?: string;
11
14
  disabled?: boolean;
12
- class?: string;
13
- action?: (item: SidebarMenuItemSchema) => void;
14
15
  renderMode?: 'tree' | 'popover';
16
+ action?: (item: SidebarMenuItemSchema) => void;
17
+ class?: string;
15
18
  }
16
19
  export interface SidebarMenuProps {
17
- items: SidebarMenuItemSchema[];
20
+ items?: SidebarMenuItemSchema[];
18
21
  allowMultiple?: boolean;
19
22
  indentSize?: number;
20
23
  variant?: 'default' | 'ghost';
21
24
  defaultExpanded?: string[];
22
25
  compact?: boolean;
23
- renderMode?: 'tree' | 'popover';
24
26
  showCompactLabels?: boolean;
27
+ renderMode?: 'tree' | 'popover';
28
+ iconSize?: string;
29
+ compactIconSize?: string;
30
+ labelClass?: string;
31
+ compactLabelClass?: string;
32
+ itemPadding?: string;
33
+ compactItemPadding?: string;
34
+ nestedMenuWidth?: string;
35
+ nestedMenuMaxHeight?: string;
36
+ itemClass?: string;
37
+ menuOffset?: [number, number];
38
+ orientation?: 'vertical' | 'horizontal';
39
+ mobileBreakpoint?: 'sm' | 'md' | 'lg' | 'xl' | 'none';
40
+ showTooltip?: boolean;
25
41
  }
26
42
  export interface SidebarMenuContext {
27
43
  activeItem: string | null;
@@ -31,6 +47,17 @@ export interface SidebarMenuContext {
31
47
  indentSize: number;
32
48
  variant: 'default' | 'ghost';
33
49
  renderMode: 'tree' | 'popover';
50
+ renderNestedTabs: boolean;
34
51
  compact: boolean;
35
52
  showCompactLabels: boolean;
53
+ iconSize: string;
54
+ compactIconSize: string;
55
+ labelClass: string;
56
+ compactLabelClass: string;
57
+ itemPadding: string;
58
+ compactItemPadding: string;
59
+ nestedMenuWidth: string;
60
+ nestedMenuMaxHeight: string;
61
+ currentOrientation: 'vertical' | 'horizontal';
62
+ showTooltip: boolean;
36
63
  }
@@ -13,12 +13,12 @@ type __VLS_Props = {
13
13
  size?: 'xs' | 'sm' | 'md' | 'lg';
14
14
  };
15
15
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
- "update:modelValue": (value: number) => any;
17
16
  change: (value: number) => any;
17
+ "update:modelValue": (value: number) => any;
18
18
  iconClick: () => any;
19
19
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
20
- "onUpdate:modelValue"?: (value: number) => any;
21
20
  onChange?: (value: number) => any;
21
+ "onUpdate:modelValue"?: (value: number) => any;
22
22
  onIconClick?: () => any;
23
23
  }>, {
24
24
  size: "xs" | "sm" | "md" | "lg";
@@ -1,8 +1,8 @@
1
1
  import { SpinnerProps, SpinnerSize, SpinnerColor, SpinnerVariant } from './types';
2
2
  declare const _default: import('vue').DefineComponent<SpinnerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpinnerProps> & Readonly<{}>, {
3
+ variant: SpinnerVariant;
4
+ size: SpinnerSize;
3
5
  class: string;
4
6
  color: SpinnerColor;
5
- size: SpinnerSize;
6
- variant: SpinnerVariant;
7
7
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
8
8
  export default _default;
@@ -0,0 +1,14 @@
1
+ import { StatsProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<StatsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StatsProps> & Readonly<{}>, {
3
+ variant: import('./types').StatsVariant;
4
+ class: string;
5
+ columns: number | string;
6
+ layout: import('./types').StatsLayout;
7
+ attached: boolean;
8
+ titleSize: string;
9
+ valueSize: string;
10
+ iconSize: string;
11
+ iconBoxShape: import('./types').IconBoxShape;
12
+ iconBoxStyle: import('./types').IconBoxStyle;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
14
+ export default _default;