vlite3 1.4.1 → 1.4.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 (57) hide show
  1. package/components/AppShell/AppShell.vue.d.ts +1 -0
  2. package/components/AppShell/AppShell.vue.js +33 -26
  3. package/components/AppShell/AppShellLayoutStorefront.vue.d.ts +54 -0
  4. package/components/AppShell/AppShellLayoutStorefront.vue.js +222 -0
  5. package/components/AppShell/AppShellLayoutStorefront.vue2.js +4 -0
  6. package/components/AsyncSelect/createAsyncSelect.js +3 -2
  7. package/components/CategoryManager/CategoryManager.vue2.js +4 -3
  8. package/components/CategoryMenu/CategoryMenu.vue.d.ts +22 -0
  9. package/components/CategoryMenu/CategoryMenu.vue.js +106 -0
  10. package/components/CategoryMenu/CategoryMenu.vue2.js +4 -0
  11. package/components/CategoryMenu/CategoryMenuVariant1.vue.d.ts +17 -0
  12. package/components/CategoryMenu/CategoryMenuVariant1.vue.js +146 -0
  13. package/components/CategoryMenu/CategoryMenuVariant1.vue2.js +4 -0
  14. package/components/CategoryMenu/CategoryMenuVariant2.vue.d.ts +18 -0
  15. package/components/CategoryMenu/CategoryMenuVariant2.vue.js +162 -0
  16. package/components/CategoryMenu/CategoryMenuVariant2.vue2.js +4 -0
  17. package/components/CategoryMenu/index.d.ts +2 -0
  18. package/components/CategoryMenu/types.d.ts +32 -0
  19. package/components/CategoryMenu/utils.d.ts +16 -0
  20. package/components/CategoryMenu/utils.js +45 -0
  21. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  22. package/components/ColorPicker/ColorPicker.vue.d.ts +7 -3
  23. package/components/ColorPicker/ColorPicker.vue.js +60 -46
  24. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  25. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  26. package/components/DatePicker.vue.js +5 -4
  27. package/components/DateRangePicker.vue.js +3 -2
  28. package/components/Dropdown/Dropdown.vue.d.ts +4 -1
  29. package/components/Dropdown/Dropdown.vue.js +8 -7
  30. package/components/Dropdown/DropdownGroupedLayout.vue2.js +5 -2
  31. package/components/Dropdown/DropdownGroupedLayout.vue3.js +111 -0
  32. package/components/Dropdown/DropdownItem.vue.d.ts +2 -2
  33. package/components/Dropdown/DropdownItem.vue.js +66 -49
  34. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  35. package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +40 -40
  36. package/components/Dropdown/composables/useDropdownHydration.d.ts +4 -0
  37. package/components/Dropdown/composables/useDropdownNavigation.js +30 -18
  38. package/components/Form/FormField.vue.js +14 -11
  39. package/components/IconPicker.vue.js +3 -2
  40. package/components/ImportData/ImportStep2.vue.js +3 -2
  41. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +4 -0
  42. package/components/NavbarCommandPalette.vue.js +1 -1
  43. package/components/PermissionMatrix/PermissionTopBar.vue.js +3 -2
  44. package/components/Screen/ScreenFilter.vue.js +20 -19
  45. package/components/SidebarMenu/SidebarMenuItem.vue.js +3 -2
  46. package/components/Switch.vue.js +8 -8
  47. package/components/Tooltip.vue.js +1 -0
  48. package/components/Workbook/Sheet.vue.js +14 -13
  49. package/components/index.d.ts +1 -0
  50. package/index.d.ts +1 -0
  51. package/index.js +153 -151
  52. package/package.json +2 -2
  53. package/style.css +1 -1
  54. package/types/appshell.type.d.ts +2 -1
  55. package/types/styles.d.ts +2 -0
  56. package/components/Dropdown/DropdownGroupedLayout.vue.js +0 -75
  57. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -21,6 +21,8 @@ export declare function useDropdownHydration(opts: UseDropdownHydrationOptions):
21
21
  selectedBuffer: import('vue').Ref<Map<any, {
22
22
  label: string;
23
23
  labelI18n?: string;
24
+ to?: string;
25
+ href?: string;
24
26
  value?: any;
25
27
  subtitle?: string;
26
28
  subtitleI18n?: string;
@@ -62,6 +64,8 @@ export declare function useDropdownHydration(opts: UseDropdownHydrationOptions):
62
64
  }> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>, Map<any, IDropdownOption> | (Map<any, {
63
65
  label: string;
64
66
  labelI18n?: string;
67
+ to?: string;
68
+ href?: string;
65
69
  value?: any;
66
70
  subtitle?: string;
67
71
  subtitleI18n?: string;
@@ -1,24 +1,36 @@
1
- import { ref as u, computed as i } from "vue";
2
- import { $t as c } from "../../../utils/i18n.js";
3
- function b(n) {
4
- const t = u(-1), o = u(!1), s = i(() => {
5
- const e = n.options.value;
6
- if (!n.searchQuery.value) return e;
7
- const a = n.searchQuery.value.toLowerCase();
8
- return e.filter((l) => (l.labelI18n ? c(l.labelI18n) : l.label).toLowerCase().includes(a));
1
+ import { ref as i, computed as d } from "vue";
2
+ import { $t as f } from "../../../utils/i18n.js";
3
+ function g(o) {
4
+ const t = i(-1), l = i(!1), s = d(() => {
5
+ const e = o.options.value;
6
+ if (!o.searchQuery.value) return e;
7
+ const a = o.searchQuery.value.toLowerCase();
8
+ return e.filter((n) => (n.labelI18n ? f(n.labelI18n) : n.label).toLowerCase().includes(a));
9
9
  }), r = (e) => {
10
- if (!n.containerRef.value || e < 0) return;
11
- const l = n.containerRef.value.querySelectorAll("[data-dropdown-item]")[e];
12
- l && l.scrollIntoView({ block: "nearest" });
10
+ if (!o.containerRef.value || e < 0) return;
11
+ const n = o.containerRef.value.querySelectorAll("[data-dropdown-item]")[e];
12
+ n && n.scrollIntoView({ block: "nearest" });
13
13
  };
14
14
  return {
15
15
  focusedIndex: t,
16
- isKeyboardMode: o,
16
+ isKeyboardMode: l,
17
17
  filteredOptions: s,
18
18
  handleKeyDown: (e) => {
19
+ if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && !e.defaultPrevented) {
20
+ const n = document.activeElement;
21
+ if (!(n?.tagName === "INPUT" || n?.tagName === "TEXTAREA" || n?.isContentEditable)) {
22
+ const c = o.containerRef.value?.closest(".dropdown-menu");
23
+ if (c) {
24
+ const u = c.querySelector(
25
+ 'input[data-testid="dropdown-search-input"]'
26
+ );
27
+ u && document.activeElement !== u && u.focus();
28
+ }
29
+ }
30
+ }
19
31
  const a = s.value;
20
32
  if (a.length !== 0)
21
- switch (["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && (o.value = !0), e.key) {
33
+ switch (["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && (l.value = !0), e.key) {
22
34
  case "ArrowDown":
23
35
  e.preventDefault(), e.stopPropagation(), t.value < a.length - 1 ? t.value++ : t.value = 0, r(t.value);
24
36
  break;
@@ -27,17 +39,17 @@ function b(n) {
27
39
  break;
28
40
  case "Enter":
29
41
  if (e.preventDefault(), e.stopPropagation(), t.value >= 0 && t.value < a.length) {
30
- const l = a[t.value];
31
- l.children || n.handleSelect(l, t.value);
42
+ const n = a[t.value];
43
+ n.children || o.handleSelect(n, t.value);
32
44
  }
33
45
  break;
34
46
  case "Escape":
35
- e.preventDefault(), e.stopPropagation(), n.emit("close");
47
+ e.preventDefault(), e.stopPropagation(), o.emit("close");
36
48
  break;
37
49
  }
38
50
  },
39
51
  handleMouseMove: () => {
40
- o.value && (o.value = !1);
52
+ l.value && (l.value = !1);
41
53
  },
42
54
  onMouseEnterItem: (e) => {
43
55
  t.value = e;
@@ -46,5 +58,5 @@ function b(n) {
46
58
  };
47
59
  }
48
60
  export {
49
- b as useDropdownNavigation
61
+ g as useDropdownNavigation
50
62
  };
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as E, computed as s, markRaw as M, openBlock as c, createBlock as m, mergeProps as p, toHandlers as L, createSlots as q, unref as P, withCtx as u, createVNode as N, createTextVNode as b, toDisplayString as y, createCommentVNode as B, resolveDynamicComponent as G } from "vue";
2
2
  import { resolveFieldType as J, isComponent as R, isAddonObject as x } from "./utils/form.utils.js";
3
3
  import K from "../NumberInput.vue.js";
4
- import V from "../Button.vue.js";
4
+ import z from "../Button.vue.js";
5
5
  import { $t as Q } from "../../utils/i18n.js";
6
- import z from "../Input.vue.js";
6
+ import V from "../Input.vue.js";
7
7
  /* empty css */
8
8
  import W from "../Switch.vue.js";
9
9
  import X from "../CheckBox.vue.js";
@@ -63,9 +63,9 @@ const Be = /* @__PURE__ */ E({
63
63
  case "url":
64
64
  case "search":
65
65
  case "textarea":
66
- return z;
66
+ return V;
67
67
  case "number":
68
- return k.value ? z : K;
68
+ return k.value ? V : K;
69
69
  case "switch":
70
70
  return W;
71
71
  case "check":
@@ -99,7 +99,7 @@ const Be = /* @__PURE__ */ E({
99
99
  case "richTextEditor":
100
100
  return oe;
101
101
  default:
102
- return z;
102
+ return V;
103
103
  }
104
104
  }), A = s(() => {
105
105
  const a = f.value, { disabled: l, readonly: r, ...g } = e.field, t = {
@@ -309,7 +309,10 @@ const Be = /* @__PURE__ */ E({
309
309
  if (a === "color")
310
310
  return {
311
311
  ...t,
312
- modelValue: e.value || "#000000"
312
+ modelValue: e.value || "#000000",
313
+ variant: e.variant,
314
+ size: e.size,
315
+ rounded: e.rounded
313
316
  };
314
317
  if (a === "iconPicker")
315
318
  return {
@@ -427,7 +430,7 @@ const Be = /* @__PURE__ */ E({
427
430
  }, C = (a) => {
428
431
  a.action && v("addonAction", a.action);
429
432
  };
430
- return (a, l) => O.value ? (c(), m(z, p({ key: 0 }, {
433
+ return (a, l) => O.value ? (c(), m(V, p({ key: 0 }, {
431
434
  ...A.value,
432
435
  ...i.field?.props || {}
433
436
  }, L($.value)), q({ _: 2 }, [
@@ -442,7 +445,7 @@ const Be = /* @__PURE__ */ E({
442
445
  onOnSelect: l[0] || (l[0] = (r) => F(i.field.addonLeft, r))
443
446
  }), {
444
447
  trigger: u(({ selectedLabel: r }) => [
445
- N(V, { variant: "outline" }, {
448
+ N(z, { variant: "outline" }, {
446
449
  default: u(() => [
447
450
  b(y(r), 1)
448
451
  ]),
@@ -450,7 +453,7 @@ const Be = /* @__PURE__ */ E({
450
453
  }, 1024)
451
454
  ]),
452
455
  _: 1
453
- }, 16, ["modelValue", "options"])) : i.field.addonLeft.type === "button" ? (c(), m(V, p({
456
+ }, 16, ["modelValue", "options"])) : i.field.addonLeft.type === "button" ? (c(), m(z, p({
454
457
  key: 1,
455
458
  variant: "outline"
456
459
  }, i.field.addonLeft.props || {}, {
@@ -475,7 +478,7 @@ const Be = /* @__PURE__ */ E({
475
478
  onOnSelect: l[2] || (l[2] = (r) => F(i.field.addonRight, r))
476
479
  }), {
477
480
  trigger: u(({ selectedLabel: r }) => [
478
- N(V, { variant: "outline" }, {
481
+ N(z, { variant: "outline" }, {
479
482
  default: u(() => [
480
483
  b(y(r), 1)
481
484
  ]),
@@ -483,7 +486,7 @@ const Be = /* @__PURE__ */ E({
483
486
  }, 1024)
484
487
  ]),
485
488
  _: 1
486
- }, 16, ["modelValue", "options"])) : i.field.addonRight.type === "button" ? (c(), m(V, p({
489
+ }, 16, ["modelValue", "options"])) : i.field.addonRight.type === "button" ? (c(), m(z, p({
487
490
  key: 1,
488
491
  variant: "outline"
489
492
  }, i.field.addonRight.props || {}, {
@@ -3,11 +3,12 @@ import $ from "./Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
4
  import { $t as d } from "../utils/i18n.js";
5
5
  /* empty css */
6
+ /* empty css */
6
7
  /* empty css */
7
8
  import C from "./Button.vue.js";
8
9
  import I from "iconify-icon-picker";
9
10
  import "iconify-icon-picker/style.css";
10
- const j = /* @__PURE__ */ g({
11
+ const A = /* @__PURE__ */ g({
11
12
  __name: "IconPicker",
12
13
  props: {
13
14
  btnProps: {},
@@ -130,5 +131,5 @@ const j = /* @__PURE__ */ g({
130
131
  }
131
132
  });
132
133
  export {
133
- j as default
134
+ A as default
134
135
  };
@@ -3,6 +3,7 @@ import A from "../Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  /* empty css */
6
+ /* empty css */
6
7
  /* empty css */
7
8
  import P from "../CheckBox.vue.js";
8
9
  const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }, q = { class: "border border-border rounded-xl overflow-hidden" }, L = { class: "overflow-x-auto max-h-[440px] always-scroll scrollbar-thin" }, W = { class: "import-table" }, G = { class: "import-thead" }, J = { class: "import-th" }, K = { class: "import-th" }, Q = { class: "import-th" }, T = { class: "import-tbody" }, X = { class: "import-td-header" }, Y = { class: "import-td-dropdown" }, Z = {
@@ -14,7 +15,7 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
14
15
  }, st = { class: "import-td-action" }, ot = { class: "flex justify-center items-center h-full" }, it = {
15
16
  key: 0,
16
17
  class: "text-center text-sm text-warning font-medium p-4 bg-warning/10 rounded-lg border border-warning/20"
17
- }, ut = /* @__PURE__ */ V({
18
+ }, vt = /* @__PURE__ */ V({
18
19
  __name: "ImportStep2",
19
20
  props: {
20
21
  headers: {},
@@ -113,5 +114,5 @@ const R = { class: "space-y-5" }, U = { class: "text-sm text-muted-foreground" }
113
114
  }
114
115
  });
115
116
  export {
116
- ut as default
117
+ vt as default
117
118
  };
@@ -13,6 +13,8 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
13
13
  selectedBuffer: import('vue').Ref<Map<any, {
14
14
  label: string;
15
15
  labelI18n?: string;
16
+ to?: string;
17
+ href?: string;
16
18
  value?: any;
17
19
  subtitle?: string;
18
20
  subtitleI18n?: string;
@@ -54,6 +56,8 @@ export declare function useMultiSelectHydration(opts: UseMultiSelectHydrationOpt
54
56
  }> & Omit<Map<any, IDropdownOption>, keyof Map<any, any>>, Map<any, IDropdownOption> | (Map<any, {
55
57
  label: string;
56
58
  labelI18n?: string;
59
+ to?: string;
60
+ href?: string;
57
61
  value?: any;
58
62
  subtitle?: string;
59
63
  subtitleI18n?: string;
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
3
3
  import v from "./Modal.vue.js";
4
4
  import N from "./CommandPalette/CommandPaletteContent.vue.js";
5
5
  import { $t as U } from "../utils/i18n.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
8
8
  __name: "NavbarCommandPalette",
9
9
  props: {
@@ -5,6 +5,7 @@ import y from "../Icon.vue.js";
5
5
  import K from "../CheckBox.vue.js";
6
6
  import B from "../Dropdown/Dropdown.vue.js";
7
7
  import "../../core/config.js";
8
+ /* empty css */
8
9
  /* empty css */
9
10
  const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3 mb-4" }, A = { class: "flex items-center gap-2 flex-1 w-full sm:max-w-lg" }, Q = {
10
11
  key: 0,
@@ -15,7 +16,7 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
15
16
  }, N = ["onClick"], P = { class: "text-sm" }, E = {
16
17
  key: 0,
17
18
  class: "border-t px-3 py-1.5"
18
- }, F = { class: "flex items-center gap-3 ml-auto" }, I = /* @__PURE__ */ w({
19
+ }, F = { class: "flex items-center gap-3 ml-auto" }, J = /* @__PURE__ */ w({
19
20
  __name: "PermissionTopBar",
20
21
  props: {
21
22
  searchQuery: {},
@@ -129,5 +130,5 @@ const S = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-3
129
130
  }
130
131
  });
131
132
  export {
132
- I as default
133
+ J as default
133
134
  };
@@ -1,10 +1,11 @@
1
- import { defineComponent as B, ref as M, computed as d, openBlock as r, createBlock as n, withCtx as o, createElementVNode as l, createVNode as a, unref as w, toDisplayString as v, withModifiers as F, setBlockTracking as C, createElementBlock as S } from "vue";
1
+ import { defineComponent as B, ref as M, computed as d, openBlock as s, createBlock as n, withCtx as o, createElementVNode as l, createVNode as a, unref as w, toDisplayString as v, withModifiers as F, setBlockTracking as C, createElementBlock as S } from "vue";
2
2
  import f from "../Button.vue.js";
3
3
  import j from "../Modal.vue.js";
4
4
  import z from "../Dropdown/Dropdown.vue.js";
5
5
  import h from "../Icon.vue.js";
6
6
  import { $t as y } from "../../utils/i18n.js";
7
7
  /* empty css */
8
+ /* empty css */
8
9
  /* empty css */
9
10
  import O from "../Form/Form.vue.js";
10
11
  /* empty css */
@@ -14,7 +15,7 @@ import "v-datepicker-lite";
14
15
  import "v-datepicker-lite/style.css";
15
16
  import "@jaames/iro";
16
17
  import "@vueuse/core";
17
- /* empty css */
18
+ /* empty css */
18
19
  import "iconify-icon-picker";
19
20
  import "iconify-icon-picker/style.css";
20
21
  /* empty css */
@@ -27,7 +28,7 @@ import "../../core/config.js";
27
28
  const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }, A = { style: { "will-change": "transform", contain: "layout style" } }, E = {
28
29
  class: "pt-2 px-2 min-w-[295px]",
29
30
  style: { "will-change": "transform", contain: "layout style" }
30
- }, ae = /* @__PURE__ */ B({
31
+ }, me = /* @__PURE__ */ B({
31
32
  __name: "ScreenFilter",
32
33
  props: {
33
34
  schema: {},
@@ -36,10 +37,10 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
36
37
  },
37
38
  emits: ["update:modelValue", "change"],
38
39
  setup(i, { emit: $ }) {
39
- const m = i, c = $, s = M(!1), p = d(() => m.modelValue ? Object.keys(m.modelValue).filter(
40
+ const m = i, c = $, r = M(!1), p = d(() => m.modelValue ? Object.keys(m.modelValue).filter(
40
41
  (e) => m.modelValue[e] !== "" && m.modelValue[e] !== null && m.modelValue[e] !== void 0
41
42
  ).length : 0), x = (e) => {
42
- c("update:modelValue", e.values), c("change", e.values), s.value = !1;
43
+ c("update:modelValue", e.values), c("change", e.values), r.value = !1;
43
44
  }, k = () => {
44
45
  c("update:modelValue", {}), c("change", {});
45
46
  }, g = d(() => {
@@ -52,19 +53,19 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
52
53
  const e = y("vlite.screen.filter");
53
54
  return e !== "vlite.screen.filter" ? e : "Filter";
54
55
  });
55
- return (e, t) => i.type === "modal" ? (r(), n(j, {
56
+ return (e, t) => i.type === "modal" ? (s(), n(j, {
56
57
  key: 0,
57
58
  title: g.value,
58
- show: s.value,
59
- "onUpdate:show": t[3] || (t[3] = (u) => s.value = u),
59
+ show: r.value,
60
+ "onUpdate:show": t[3] || (t[3] = (u) => r.value = u),
60
61
  "max-width": "sm:max-w-md"
61
62
  }, {
62
63
  trigger: o(() => [
63
- p.value > 0 ? (r(), n(f, {
64
+ p.value > 0 ? (s(), n(f, {
64
65
  key: 0,
65
66
  variant: "secondary",
66
67
  class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0",
67
- onClick: t[0] || (t[0] = (u) => s.value = !0)
68
+ onClick: t[0] || (t[0] = (u) => r.value = !0)
68
69
  }, {
69
70
  default: o(() => [
70
71
  a(h, {
@@ -83,10 +84,10 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
83
84
  ])
84
85
  ]),
85
86
  _: 1
86
- })) : (r(), n(f, {
87
+ })) : (s(), n(f, {
87
88
  key: 1,
88
89
  variant: "outline",
89
- onClick: t[2] || (t[2] = (u) => s.value = !0),
90
+ onClick: t[2] || (t[2] = (u) => r.value = !0),
90
91
  title: V.value,
91
92
  size: "lg",
92
93
  asIcon: "",
@@ -94,7 +95,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
94
95
  }, {
95
96
  default: o(() => [
96
97
  l("div", N, [
97
- t[1] || (C(-1, !0), (t[1] = (r(), S("svg", {
98
+ t[1] || (C(-1, !0), (t[1] = (s(), S("svg", {
98
99
  xmlns: "http://www.w3.org/2000/svg",
99
100
  width: "1.132em",
100
101
  height: "1.132em",
@@ -125,10 +126,10 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
125
126
  ])
126
127
  ]),
127
128
  _: 1
128
- }, 8, ["title", "show"])) : (r(), n(w(z), {
129
+ }, 8, ["title", "show"])) : (s(), n(w(z), {
129
130
  key: 1,
130
- isOpen: s.value,
131
- "onUpdate:isOpen": t[4] || (t[4] = (u) => s.value = u),
131
+ isOpen: r.value,
132
+ "onUpdate:isOpen": t[4] || (t[4] = (u) => r.value = u),
132
133
  "close-on-select": !1,
133
134
  position: "bottom-end",
134
135
  maxHeight: "430px",
@@ -136,7 +137,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
136
137
  class: "w-auto"
137
138
  }, {
138
139
  trigger: o(() => [
139
- p.value > 0 ? (r(), n(f, {
140
+ p.value > 0 ? (s(), n(f, {
140
141
  key: 0,
141
142
  variant: "secondary",
142
143
  class: "flex items-center gap-1.5 pl-3 pr-1.5 shrink-0 bg-gray-150! hover:bg-gray-100!",
@@ -159,7 +160,7 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
159
160
  ])
160
161
  ]),
161
162
  _: 1
162
- })) : (r(), n(f, {
163
+ })) : (s(), n(f, {
163
164
  key: 1,
164
165
  variant: "outline",
165
166
  icon: "hugeicons:filter-add",
@@ -190,5 +191,5 @@ const N = { class: "text-gray-800! h-4! w-4! flex items-center justify-center" }
190
191
  }
191
192
  });
192
193
  export {
193
- ae as default
194
+ me as default
194
195
  };
@@ -5,6 +5,7 @@ import G from "../Tooltip.vue.js";
5
5
  import xe from "../Dropdown/Dropdown.vue.js";
6
6
  import { $t as J } from "../../utils/i18n.js";
7
7
  /* empty css */
8
+ /* empty css */
8
9
  /* empty css */
9
10
  const we = {
10
11
  key: 0,
@@ -12,7 +13,7 @@ const we = {
12
13
  }, ke = { class: "w-full" }, Ce = { class: "flex items-center w-full gap-2 text-sm" }, Ie = { class: "truncate flex-1 font-medium" }, Se = ["onKeydown"], ze = {
13
14
  key: 0,
14
15
  class: "sidebar-children-container overflow-hidden transition-all duration-300 ease-in-out relative"
15
- }, $e = { class: "pt-1 space-y-0.5" }, Ae = /* @__PURE__ */ le({
16
+ }, $e = { class: "pt-1 space-y-0.5" }, De = /* @__PURE__ */ le({
16
17
  __name: "SidebarMenuItem",
17
18
  props: {
18
19
  item: {},
@@ -378,5 +379,5 @@ const we = {
378
379
  }
379
380
  });
380
381
  export {
381
- Ae as default
382
+ De as default
382
383
  };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as h, computed as b, openBlock as n, createElementBlock as s, normalizeClass as i, createElementVNode as o, toDisplayString as d, createCommentVNode as u, withModifiers as v } from "vue";
2
2
  import { $t as m } from "../utils/i18n.js";
3
- const w = { class: "flex flex-col gap-0.5 min-w-0" }, k = {
3
+ const w = { class: "flex flex-col gap-0.5 min-w-0" }, p = {
4
4
  key: 0,
5
5
  class: "text-sm font-medium text-foreground leading-snug select-none"
6
- }, p = {
6
+ }, y = {
7
7
  key: 1,
8
8
  class: "text-xs text-muted-foreground leading-snug select-none"
9
- }, x = ["id", "aria-checked", "aria-label", "disabled", "data-testid"], y = ["id", "aria-checked", "aria-label", "disabled", "data-testid"], z = /* @__PURE__ */ h({
9
+ }, k = ["id", "aria-checked", "aria-label", "disabled", "data-testid"], x = ["id", "aria-checked", "aria-label", "disabled", "data-testid"], z = /* @__PURE__ */ h({
10
10
  __name: "Switch",
11
11
  props: {
12
12
  modelValue: { type: Boolean, default: !1 },
@@ -36,8 +36,8 @@ const w = { class: "flex flex-col gap-0.5 min-w-0" }, k = {
36
36
  onClick: r
37
37
  }, [
38
38
  o("div", w, [
39
- t.value ? (n(), s("span", k, d(t.value), 1)) : u("", !0),
40
- c.value ? (n(), s("span", p, d(c.value), 1)) : u("", !0)
39
+ t.value ? (n(), s("span", p, d(t.value), 1)) : u("", !0),
40
+ c.value ? (n(), s("span", y, d(c.value), 1)) : u("", !0)
41
41
  ]),
42
42
  o("button", {
43
43
  id: e.id,
@@ -57,7 +57,7 @@ const w = { class: "flex flex-col gap-0.5 min-w-0" }, k = {
57
57
  e.modelValue ? "translate-x-5 rtl:translate-x-0" : "translate-x-0 rtl:-translate-x-5"
58
58
  ])
59
59
  }, null, 2)
60
- ], 10, x)
60
+ ], 10, k)
61
61
  ], 2)) : (n(), s("div", {
62
62
  key: 1,
63
63
  class: i(["inline-flex items-center gap-2", a.class])
@@ -76,11 +76,11 @@ const w = { class: "flex flex-col gap-0.5 min-w-0" }, k = {
76
76
  o("span", {
77
77
  "aria-hidden": "true",
78
78
  class: i([
79
- "pointer-events-none inline-block h-4.5 w-4.5 transform rounded-full bg-background shadow-lg ring-0 transition duration-200 ease-in-out",
79
+ "pointer-events-none inline-block h-4.5 w-4.5 transform rounded-full bg-primary-fg shadow-lg ring-0 transition duration-200 ease-in-out",
80
80
  e.modelValue ? "translate-x-5 rtl:translate-x-0" : "translate-x-0 rtl:-translate-x-5"
81
81
  ])
82
82
  }, null, 2)
83
- ], 10, y),
83
+ ], 10, x),
84
84
  t.value ? (n(), s("label", {
85
85
  key: 0,
86
86
  class: i([e.disabled ? "opacity-50" : "", "text-sm font-medium text-foreground cursor-pointer"]),
@@ -14,6 +14,7 @@ const y = {
14
14
  placement: { default: "top" },
15
15
  offset: {},
16
16
  trigger: {},
17
+ reference: {},
17
18
  arrow: { type: Boolean, default: !0 },
18
19
  triggerClass: { default: "" },
19
20
  className: { default: "" },
@@ -1,8 +1,9 @@
1
- import { defineComponent as I, ref as b, computed as v, openBlock as a, createElementBlock as d, normalizeClass as $, createElementVNode as u, withModifiers as r, createBlock as S, withCtx as x, createVNode as m, createCommentVNode as V, withDirectives as j, withKeys as g, vModelText as z, toDisplayString as K, unref as M, nextTick as N } from "vue";
1
+ import { defineComponent as I, ref as b, computed as v, openBlock as r, createElementBlock as d, normalizeClass as $, createElementVNode as u, withModifiers as a, createBlock as S, withCtx as x, createVNode as m, createCommentVNode as V, withDirectives as j, withKeys as g, vModelText as z, toDisplayString as K, unref as M, nextTick as N } from "vue";
2
2
  import y from "../Icon.vue.js";
3
3
  import O from "../Dropdown/Dropdown.vue.js";
4
4
  import { $t as l } from "../../utils/i18n.js";
5
5
  /* empty css */
6
+ /* empty css */
6
7
  /* empty css */
7
8
  import R from "../Button.vue.js";
8
9
  import A from "../IconPicker.vue.js";
@@ -15,7 +16,7 @@ const U = {
15
16
  }, F = { class: "flex-1 min-w-0 pr-1" }, G = ["onKeydown"], H = {
16
17
  key: 1,
17
18
  class: "block truncate text-sm font-medium leading-normal"
18
- }, _ = /* @__PURE__ */ I({
19
+ }, ee = /* @__PURE__ */ I({
19
20
  __name: "Sheet",
20
21
  props: {
21
22
  sheet: {},
@@ -86,17 +87,17 @@ const U = {
86
87
  e.isActive ? `bg-secondary text-foreground ring-1 ring-border ring-b-0 z-10 ${e.activeItemClass}` : `text-muted-foreground hover:bg-accent/50 ${e.inactiveItemClass}`,
87
88
  e.isEditing ? "cursor-text" : ""
88
89
  ].filter(Boolean).join(" "));
89
- return (n, t) => (a(), d("div", {
90
+ return (n, t) => (r(), d("div", {
90
91
  class: $(E.value),
91
92
  onClick: t[5] || (t[5] = (c) => o("select", i.sheet.id)),
92
93
  onDblclick: h
93
94
  }, [
94
95
  u("div", {
95
- onClick: t[1] || (t[1] = r(() => {
96
+ onClick: t[1] || (t[1] = a(() => {
96
97
  }, ["stop"])),
97
98
  class: "mr-2 flex items-center shrink-0"
98
99
  }, [
99
- (i.sheet.icon || i.isEditing) && i.allowIconChange ? (a(), S(A, {
100
+ (i.sheet.icon || i.isEditing) && i.allowIconChange ? (r(), S(A, {
100
101
  key: 0,
101
102
  value: i.sheet.icon || "lucide:file",
102
103
  position: "bottom-start",
@@ -111,7 +112,7 @@ const U = {
111
112
  ])
112
113
  ]),
113
114
  _: 1
114
- }, 8, ["value"])) : i.sheet.icon ? (a(), d("div", q, [
115
+ }, 8, ["value"])) : i.sheet.icon ? (r(), d("div", q, [
115
116
  m(y, {
116
117
  icon: i.sheet.icon,
117
118
  class: "w-4 h-4 opacity-70"
@@ -119,7 +120,7 @@ const U = {
119
120
  ])) : V("", !0)
120
121
  ]),
121
122
  u("div", F, [
122
- i.isEditing ? j((a(), d("input", {
123
+ i.isEditing ? j((r(), d("input", {
123
124
  key: 0,
124
125
  ref_key: "inputRef",
125
126
  ref: f,
@@ -128,18 +129,18 @@ const U = {
128
129
  class: "w-full bg-transparent border-none outline-none p-0 text-sm font-medium text-foreground placeholder-muted-foreground focus:ring-0",
129
130
  onBlur: k,
130
131
  onKeydown: [
131
- g(r(k, ["prevent"]), ["enter"]),
132
- g(r(D, ["prevent"]), ["esc"])
132
+ g(a(k, ["prevent"]), ["enter"]),
133
+ g(a(D, ["prevent"]), ["esc"])
133
134
  ],
134
- onClick: t[3] || (t[3] = r(() => {
135
+ onClick: t[3] || (t[3] = a(() => {
135
136
  }, ["stop"]))
136
137
  }, null, 40, G)), [
137
138
  [z, s.value]
138
- ]) : (a(), d("span", H, K(C.value), 1))
139
+ ]) : (r(), d("span", H, K(C.value), 1))
139
140
  ]),
140
141
  u("div", {
141
142
  class: "opacity-0 group-hover:opacity-100 transition-opacity ml-auto pl-1 -mr-2 flex items-center",
142
- onClick: t[4] || (t[4] = r(() => {
143
+ onClick: t[4] || (t[4] = a(() => {
143
144
  }, ["stop"]))
144
145
  }, [
145
146
  m(M(O), {
@@ -165,5 +166,5 @@ const U = {
165
166
  }
166
167
  });
167
168
  export {
168
- _ as default
169
+ ee as default
169
170
  };
@@ -6,6 +6,7 @@ export { default as Badge } from './Badge.vue';
6
6
  export { Barcode } from './Barcode';
7
7
  export { default as Beacon } from './Beacon.vue';
8
8
  export { Breadcrumb, BreadcrumbItem } from './Breadcrumb';
9
+ export { CategoryMenu } from './CategoryMenu';
9
10
  export { default as Button } from './Button.vue';
10
11
  export { default as BackButton } from './BackButton.vue';
11
12
  export { default as ButtonGroup } from './ButtonGroup.vue';
package/index.d.ts CHANGED
@@ -50,6 +50,7 @@ export * from './components/AttachmentsList';
50
50
  export * from './components/CustomFieldsDisplay';
51
51
  export * from './components/Invoice';
52
52
  export * from './components/CategoryManager';
53
+ export * from './components/CategoryMenu';
53
54
  export * from './components/ThumbnailSelector';
54
55
  export * from './components/TagInput';
55
56
  export * from './components/Calendar';