vlite3 0.7.13 → 0.7.15

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 (58) hide show
  1. package/components/Button.vue.js +1 -1
  2. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  3. package/components/ColorPicker/ColorPicker.vue.js +18 -17
  4. package/components/{CommandPaletteContent.vue.d.ts → CommandPalette/CommandPaletteContent.vue.d.ts} +3 -3
  5. package/components/CommandPalette/CommandPaletteContent.vue.js +7 -0
  6. package/components/CommandPalette/CommandPaletteContent.vue2.js +180 -0
  7. package/components/CommandPalette/CommandPaletteItem.vue.d.ts +15 -0
  8. package/components/CommandPalette/CommandPaletteItem.vue2.js +7 -0
  9. package/components/CommandPalette/CommandPaletteItem.vue3.js +60 -0
  10. package/components/CommandPalette/index.d.ts +5 -0
  11. package/components/CommandPalette/types.d.ts +40 -0
  12. package/components/CommandPalette/useCommandPaletteItems.d.ts +15 -0
  13. package/components/CommandPalette/useCommandPaletteItems.js +99 -0
  14. package/components/CommandPalette/useCommandPaletteNav.d.ts +13 -0
  15. package/components/CommandPalette/useCommandPaletteNav.js +49 -0
  16. package/components/DataList/DataList.vue.js +53 -50
  17. package/components/DataTable/DataTable.vue.js +185 -173
  18. package/components/DatePicker.vue.js +3 -2
  19. package/components/DateRangePicker.vue.js +26 -25
  20. package/components/Dropdown/Dropdown.vue.js +20 -20
  21. package/components/Dropdown/DropdownMenu.vue.js +5 -256
  22. package/components/Dropdown/DropdownMenu.vue2.js +256 -2
  23. package/components/Form/CustomFields.vue.js +1 -1
  24. package/components/Form/CustomFields.vue2.js +102 -97
  25. package/components/Form/Form.vue.d.ts +0 -1
  26. package/components/Form/Form.vue.js +2 -2
  27. package/components/Form/Form.vue2.js +20 -20
  28. package/components/Form/FormFields.vue.js +2 -2
  29. package/components/Form/FormFields.vue2.js +90 -78
  30. package/components/IconPicker.vue.js +3 -2
  31. package/components/ImportData/ImportStep2.vue.js +10 -9
  32. package/components/List/List.vue.js +205 -180
  33. package/components/Modal.vue.js +2 -2
  34. package/components/Modal.vue2.js +82 -96
  35. package/components/MultiSelect/MultiSelect.vue.js +7 -7
  36. package/components/Navbar/Navbar.vue.js +12 -12
  37. package/components/NavbarCommandPalette.vue.d.ts +7 -30
  38. package/components/NavbarCommandPalette.vue.js +40 -40
  39. package/components/PermissionMatrix/PermissionEditorList.vue.js +1 -1
  40. package/components/PermissionMatrix/PermissionEditorList.vue2.js +84 -75
  41. package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +2 -2
  42. package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +122 -107
  43. package/components/PermissionMatrix/PermissionMatrix.vue.js +2 -2
  44. package/components/PermissionMatrix/PermissionMatrix.vue2.js +161 -138
  45. package/components/PermissionMatrix/PermissionTopBar.vue.js +19 -18
  46. package/components/Screen/Screen.vue.js +169 -166
  47. package/components/Screen/ScreenFilter.vue.js +4 -3
  48. package/components/SidePanel.vue.js +5 -146
  49. package/components/SidePanel.vue2.js +146 -2
  50. package/components/SidebarMenu/SidebarMenuItem.vue.js +26 -25
  51. package/components/Workbook/Sheet.vue.js +3 -2
  52. package/index.d.ts +1 -1
  53. package/index.js +1 -1
  54. package/package.json +1 -1
  55. package/style.css +1 -1
  56. package/components/CommandPaletteContent.vue.js +0 -7
  57. package/components/CommandPaletteContent.vue2.js +0 -311
  58. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -1,14 +1,14 @@
1
- import { defineComponent as P, ref as m, inject as V, watch as w, provide as K, nextTick as R, onMounted as W, onUnmounted as A, computed as T, openBlock as s, createElementBlock as a, Fragment as F, mergeProps as $, withModifiers as B, renderSlot as y, createCommentVNode as i, createBlock as I, Teleport as U, createVNode as S, Transition as q, withCtx as G, normalizeClass as r, createElementVNode as b, toDisplayString as O, resolveDynamicComponent as H } from "vue";
2
- import J from "./Button.vue.js";
3
- import { useKeyStroke as L } from "../composables/useKeyStroke.js";
4
- import { $t as j } from "../utils/i18n.js";
5
- const Q = {
1
+ import { defineComponent as N, ref as f, inject as P, computed as p, markRaw as R, watch as $, provide as V, nextTick as K, onMounted as W, onUnmounted as A, openBlock as s, createElementBlock as a, Fragment as F, mergeProps as T, withModifiers as B, renderSlot as m, createCommentVNode as r, createBlock as I, Teleport as U, normalizeClass as d, createElementVNode as y, toDisplayString as S, createVNode as q, resolveDynamicComponent as G } from "vue";
2
+ import H from "./Button.vue.js";
3
+ import { useKeyStroke as J } from "../composables/useKeyStroke.js";
4
+ import { $t as O } from "../utils/i18n.js";
5
+ const L = {
6
6
  key: 0,
7
7
  class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
8
- }, X = { class: "text-lg font-semibold leading-none tracking-tight" }, Y = {
8
+ }, Q = { class: "text-lg font-semibold leading-none tracking-tight" }, X = {
9
9
  key: 0,
10
10
  class: "text-sm text-muted-foreground mb-3.5"
11
- }, te = /* @__PURE__ */ P({
11
+ }, oe = /* @__PURE__ */ N({
12
12
  inheritAttrs: !1,
13
13
  __name: "Modal",
14
14
  props: {
@@ -28,119 +28,105 @@ const Q = {
28
28
  bodyProps: {}
29
29
  },
30
30
  emits: ["close", "update:show", "onOpen"],
31
- setup(o, { emit: z }) {
32
- const t = o, d = z, l = m(t.show), g = m(!1), v = m(!1), h = m(null);
33
- let c = null, u = null;
34
- const n = V("dropdown-context", null);
35
- w(
36
- () => t.show,
31
+ setup(t, { emit: j }) {
32
+ const o = t, i = j, l = f(o.show), g = f(!1), b = f(!1), h = f(null);
33
+ let u = null;
34
+ const n = P("dropdown-context", null), k = p(() => o.body ? R(o.body) : void 0);
35
+ $(
36
+ () => o.show,
37
37
  (e) => {
38
- l.value = e, e && (d("onOpen"), n?.close());
38
+ l.value = e, e && (i("onOpen"), n?.close());
39
39
  }
40
40
  );
41
- const D = () => {
41
+ const z = () => {
42
42
  l.value = !0, n?.close();
43
- }, E = (e) => {
43
+ }, D = (e) => {
44
44
  g.value = e;
45
- }, f = () => {
45
+ }, c = () => {
46
46
  if (g.value) {
47
- v.value = !0, c && clearTimeout(c), c = setTimeout(() => {
48
- v.value = !1;
47
+ b.value = !0, u && clearTimeout(u), u = setTimeout(() => {
48
+ b.value = !1;
49
49
  }, 1e3);
50
50
  return;
51
51
  }
52
- l.value = !1, d("update:show", !1), d("close");
53
- }, p = () => {
54
- l.value = !1, d("update:show", !1), d("close");
52
+ l.value = !1, i("update:show", !1), i("close");
53
+ }, v = () => {
54
+ l.value = !1, i("update:show", !1), i("close");
55
55
  };
56
- K("modal-context", { close: f, setSubmitting: E });
57
- const M = () => {
58
- t.closeOutside && f();
59
- }, { onKeyStroke: N } = L();
60
- N("Escape", f), w(l, async (e) => {
61
- u && clearTimeout(u), e ? (n?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await R(), h.value?.focus()) : (document.body.style.overflow = "", u = setTimeout(() => {
62
- n?.onChildToggle?.(!1);
63
- }, 200));
56
+ V("modal-context", { close: c, setSubmitting: D });
57
+ const E = () => {
58
+ o.closeOutside && c();
59
+ }, { onKeyStroke: M } = J();
60
+ M("Escape", c), $(l, async (e) => {
61
+ e ? (n?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await K(), h.value?.focus()) : (document.body.style.overflow = "", n?.onChildToggle?.(!1));
64
62
  }), W(() => {
65
63
  l.value && n?.onChildToggle?.(!0);
66
64
  }), A(() => {
67
- u && clearTimeout(u), l.value && n?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
65
+ l.value && n?.onChildToggle?.(!1), document.body.style.overflow = "", u && clearTimeout(u);
68
66
  });
69
- const k = T(() => t.titleI18n ? j(t.titleI18n) : t.title), x = T(
70
- () => t.descriptionI18n ? j(t.descriptionI18n) : t.description
67
+ const C = p(() => o.titleI18n ? O(o.titleI18n) : o.title), x = p(
68
+ () => o.descriptionI18n ? O(o.descriptionI18n) : o.description
71
69
  );
72
- return (e, C) => (s(), a(F, null, [
73
- e.$slots?.trigger || e.$slots?.default ? (s(), a("span", $({
70
+ return (e, w) => (s(), a(F, null, [
71
+ e.$slots?.trigger || e.$slots?.default ? (s(), a("span", T({
74
72
  key: 0,
75
- onClick: B(D, ["stop"]),
76
- class: `${o.triggerClass}`
73
+ onClick: B(z, ["stop"]),
74
+ class: `${t.triggerClass}`
77
75
  }, e.$attrs), [
78
- y(e.$slots, "trigger", {}, () => [
79
- o.body ? y(e.$slots, "default", { key: 0 }, void 0, !0) : i("", !0)
76
+ m(e.$slots, "trigger", {}, () => [
77
+ t.body ? m(e.$slots, "default", { key: 0 }, void 0, !0) : r("", !0)
80
78
  ], !0)
81
- ], 16)) : i("", !0),
79
+ ], 16)) : r("", !0),
82
80
  (s(), I(U, { to: "body" }, [
83
- S(q, {
84
- "enter-active-class": "transition duration-200 ease-out",
85
- "enter-from-class": "opacity-0",
86
- "enter-to-class": "opacity-100",
87
- "leave-active-class": "transition duration-150 ease-in",
88
- "leave-from-class": "opacity-100",
89
- "leave-to-class": "opacity-0"
90
- }, {
91
- default: G(() => [
92
- l.value ? (s(), a("div", {
93
- key: 0,
94
- class: r(["fixed inset-0 z-50 flex items-center justify-center bg-[#00000051] p-4 v-modal-overlay", o.backdrop && "backdrop-blur-[2px]"]),
95
- onClick: M
96
- }, [
97
- b("div", {
98
- ref_key: "modalRef",
99
- ref: h,
100
- tabindex: "-1",
101
- class: r(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [o.maxWidth]]),
102
- onClick: C[0] || (C[0] = B(() => {
103
- }, ["stop"]))
81
+ l.value ? (s(), a("div", {
82
+ key: 0,
83
+ class: d(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", t.backdrop ? "v-modal-backdrop" : ""]),
84
+ onClick: E
85
+ }, [
86
+ y("div", {
87
+ ref_key: "modalRef",
88
+ ref: h,
89
+ tabindex: "-1",
90
+ class: d(["modal-body relative w-full rounded border border-border/60 bg-body shadow-lg text-foreground flex flex-col max-h-[85vh] sm:max-h-[90vh] focus:outline-none", [t.maxWidth]]),
91
+ onClick: w[0] || (w[0] = B(() => {
92
+ }, ["stop"]))
93
+ }, [
94
+ C.value ? (s(), a("div", L, [
95
+ y("div", {
96
+ class: d(["flex items-center justify-between py-2 px-4 rounded-t-md", t.headerClass])
104
97
  }, [
105
- k.value ? (s(), a("div", Q, [
106
- b("div", {
107
- class: r(["flex items-center justify-between py-2 px-4 rounded-t-md", o.headerClass])
108
- }, [
109
- b("h3", X, O(k.value), 1),
110
- S(J, {
111
- rounded: "full",
112
- size: "sm",
113
- icon: "lucide:x",
114
- variant: "ghost",
115
- class: r(["hover:bg-gray-250/25! transition-all", { "blink-bg": v.value }]),
116
- onClick: f
117
- }, null, 8, ["class"])
118
- ], 2)
119
- ])) : i("", !0),
120
- b("div", {
121
- class: r(["flex-1 overflow-y-auto px-4 pt-4 pb-3.5 min-h-0", o.bodyClass])
122
- }, [
123
- x.value ? (s(), a("p", Y, O(x.value), 1)) : i("", !0),
124
- o.body ? (s(), I(H(o.body), $({ key: 1 }, { ...o.bodyProps, ...e.$attrs }, { close: p }), null, 16)) : y(e.$slots, "default", {
125
- key: 2,
126
- close: p
127
- }, void 0, !0)
128
- ], 2),
129
- e.$slots.footer ? (s(), a("div", {
130
- key: 1,
131
- class: r([o.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
132
- }, [
133
- y(e.$slots, "footer", { close: p }, void 0, !0)
134
- ], 2)) : i("", !0)
98
+ y("h3", Q, S(C.value), 1),
99
+ q(H, {
100
+ rounded: "full",
101
+ size: "sm",
102
+ icon: "lucide:x",
103
+ variant: "ghost",
104
+ class: d(["hover:bg-gray-250/25!", { "blink-bg": b.value }]),
105
+ onClick: c
106
+ }, null, 8, ["class"])
135
107
  ], 2)
136
- ], 2)) : i("", !0)
137
- ]),
138
- _: 3
139
- })
108
+ ])) : r("", !0),
109
+ y("div", {
110
+ class: d(["flex-1 overflow-y-auto px-4 pt-4 pb-3.5 min-h-0", t.bodyClass])
111
+ }, [
112
+ x.value ? (s(), a("p", X, S(x.value), 1)) : r("", !0),
113
+ k.value ? (s(), I(G(k.value), T({ key: 1 }, { ...t.bodyProps, ...e.$attrs }, { close: v }), null, 16)) : m(e.$slots, "default", {
114
+ key: 2,
115
+ close: v
116
+ }, void 0, !0)
117
+ ], 2),
118
+ e.$slots.footer ? (s(), a("div", {
119
+ key: 1,
120
+ class: d([t.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
121
+ }, [
122
+ m(e.$slots, "footer", { close: v }, void 0, !0)
123
+ ], 2)) : r("", !0)
124
+ ], 2)
125
+ ], 2)) : r("", !0)
140
126
  ]))
141
127
  ], 64));
142
128
  }
143
129
  });
144
130
  export {
145
- te as default
131
+ oe as default
146
132
  };
@@ -40,11 +40,11 @@ const K = {
40
40
  if (t.placeholder) return t.placeholder;
41
41
  const e = O("vlite.multiSelect.placeholder");
42
42
  return e !== "vlite.multiSelect.placeholder" ? e : "Select items...";
43
- }), y = s(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), $ = V(!1), x = V(!1);
43
+ }), y = s(() => t.options ? t.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), B = V(!1), x = V(!1);
44
44
  M(
45
45
  y,
46
46
  (e) => {
47
- !$.value && e.length > 0 && ($.value = !0, setTimeout(() => {
47
+ !B.value && e.length > 0 && (B.value = !0, setTimeout(() => {
48
48
  x.value = !0, d.hydrateSelected(t.modelValue || []);
49
49
  }, 10));
50
50
  },
@@ -71,7 +71,7 @@ const K = {
71
71
  const f = s(() => w.value.filter((e) => {
72
72
  const a = e.value ?? e.label;
73
73
  return t.modelValue.includes(a);
74
- })), E = s(() => f.value.slice(0, t.maxVisible)), B = s(() => f.value.length - t.maxVisible), D = (e) => {
74
+ })), D = s(() => f.value.slice(0, t.maxVisible)), $ = s(() => f.value.length - t.maxVisible), E = (e) => {
75
75
  const a = e.value ?? e.label;
76
76
  d.selectedBuffer.value.has(a) || d.selectedBuffer.value.set(a, e);
77
77
  const n = [...t.modelValue], r = n.indexOf(a);
@@ -105,7 +105,7 @@ const K = {
105
105
  class: u(["flex gap-1.5 items-center flex-1 min-w-0", [l.wrap ? "flex-wrap py-0.5" : "flex-nowrap overflow-hidden py-1"]])
106
106
  }, [
107
107
  f.value.length === 0 ? (o(), c("span", K, S(j.value), 1)) : (o(), c(I, { key: 1 }, [
108
- (o(!0), c(I, null, R(E.value, (r) => (o(), v(L, {
108
+ (o(!0), c(I, null, R(D.value, (r) => (o(), v(L, {
109
109
  key: r.value,
110
110
  variant: l.variant === "transparent" ? "outline" : "secondary",
111
111
  size: z.value,
@@ -131,7 +131,7 @@ const K = {
131
131
  ]),
132
132
  _: 2
133
133
  }, 1032, ["variant", "size", "rounded", "class"]))), 128)),
134
- B.value > 0 ? (o(), v(L, {
134
+ $.value > 0 ? (o(), v(L, {
135
135
  key: 0,
136
136
  variant: l.variant === "transparent" ? "outline" : "secondary",
137
137
  size: z.value,
@@ -139,7 +139,7 @@ const K = {
139
139
  class: u(["shrink-0", l.variant === "transparent" ? "border-transparent bg-muted/50 text-muted-foreground font-medium shadow-none" : ""])
140
140
  }, {
141
141
  default: p(() => [
142
- U(" +" + S(B.value), 1)
142
+ U(" +" + S($.value), 1)
143
143
  ]),
144
144
  _: 1
145
145
  }, 8, ["variant", "size", "rounded", "class"])) : b("", !0)
@@ -172,7 +172,7 @@ const K = {
172
172
  remote: l.remote,
173
173
  debounceTime: l.debounceTime,
174
174
  layout: l.layout,
175
- onSelect: D,
175
+ onSelect: E,
176
176
  onClose: a[0] || (a[0] = (n) => m.value = !1),
177
177
  onLoadMore: a[1] || (a[1] = (n) => e.$emit("load-more")),
178
178
  onSearch: a[2] || (a[2] = (n) => e.$emit("search", n))
@@ -1,8 +1,8 @@
1
- import { defineComponent as _, computed as m, ref as w, provide as ee, useSlots as le, onMounted as se, onUnmounted as oe, watch as A, openBlock as r, createElementBlock as i, createVNode as b, Transition as W, withCtx as g, withDirectives as Y, createElementVNode as t, normalizeClass as n, renderSlot as s, createCommentVNode as u, vShow as q, unref as c, createTextVNode as L, normalizeStyle as te, Fragment as x, createBlock as G } from "vue";
1
+ import { defineComponent as _, computed as m, ref as w, provide as ee, useSlots as le, onMounted as se, onUnmounted as oe, watch as A, openBlock as r, createElementBlock as i, createVNode as b, Transition as W, withCtx as g, withDirectives as Y, createElementVNode as t, normalizeClass as n, renderSlot as s, createCommentVNode as u, vShow as q, unref as c, createTextVNode as P, normalizeStyle as te, Fragment as x, createBlock as G } from "vue";
2
2
  import { useRoute as ae } from "vue-router";
3
3
  import { useLocalStorage as re, onClickOutside as ie, useBreakpoints as ne, breakpointsTailwind as de } from "@vueuse/core";
4
4
  import z from "../Icon.vue.js";
5
- import P from "../SidePanel.vue.js";
5
+ import L from "../SidePanel.vue.js";
6
6
  import J from "./NavbarTabs.vue.js";
7
7
  /* empty css */
8
8
  import K from "../Breadcrumb/Breadcrumb.vue.js";
@@ -41,10 +41,10 @@ const fe = {
41
41
  }, Ne = {
42
42
  key: 1,
43
43
  class: "flex flex-col space-y-4 flex-1 overflow-y-auto px-3.5!"
44
- }, Le = {
44
+ }, Pe = {
45
45
  key: 2,
46
46
  class: "mt-auto pt-2 border-t border-border px-3! py-2!"
47
- }, Pe = { class: "flex items-center gap-4 shrink-0 z-10" }, Re = { class: "flex flex-col max-h-[80vh] overflow-y-auto" }, He = { class: "space-y-1 p-2" }, je = { class: "space-y-1 p-2" }, Ie = { class: "flex flex-col space-y-6 pt-4 h-full" }, Ue = {
47
+ }, Le = { class: "flex items-center gap-4 shrink-0 z-10" }, Re = { class: "flex flex-col max-h-[80vh] overflow-y-auto" }, He = { class: "space-y-1 p-2" }, je = { class: "space-y-1 p-2" }, Ie = { class: "flex flex-col space-y-6 pt-4 h-full" }, Ue = {
48
48
  key: 0,
49
49
  class: "flex flex-col space-y-1"
50
50
  }, Ee = {
@@ -268,7 +268,7 @@ const fe = {
268
268
  ])
269
269
  ])) : u("", !0)
270
270
  ]),
271
- b(P, {
271
+ b(L, {
272
272
  show: a.value,
273
273
  "onUpdate:show": o[1] || (o[1] = (d) => a.value = d),
274
274
  position: "left",
@@ -280,7 +280,7 @@ const fe = {
280
280
  }, {
281
281
  header: g(() => [
282
282
  s(e.$slots, "logo", {}, () => [
283
- o[9] || (o[9] = L("Brand", -1))
283
+ o[9] || (o[9] = P("Brand", -1))
284
284
  ])
285
285
  ]),
286
286
  default: g(() => [
@@ -452,7 +452,7 @@ const fe = {
452
452
  ])
453
453
  ])
454
454
  ], 2)) : u("", !0)
455
- ], 64)) : (r(), G(P, {
455
+ ], 64)) : (r(), G(L, {
456
456
  key: 2,
457
457
  show: a.value,
458
458
  "onUpdate:show": o[5] || (o[5] = (d) => a.value = d),
@@ -465,7 +465,7 @@ const fe = {
465
465
  }, {
466
466
  header: g(() => [
467
467
  s(e.$slots, "logo", {}, () => [
468
- o[13] || (o[13] = L("Brand", -1))
468
+ o[13] || (o[13] = P("Brand", -1))
469
469
  ])
470
470
  ]),
471
471
  default: g(() => [
@@ -481,7 +481,7 @@ const fe = {
481
481
  s(e.$slots, "default"),
482
482
  s(e.$slots, "center")
483
483
  ])),
484
- e.$slots?.right ? (r(), i("div", Le, [
484
+ e.$slots?.right ? (r(), i("div", Pe, [
485
485
  s(e.$slots, "right")
486
486
  ])) : u("", !0)
487
487
  ])
@@ -495,7 +495,7 @@ const fe = {
495
495
  role: "navigation"
496
496
  }, [
497
497
  v.variant === "header" ? (r(), i(x, { key: 0 }, [
498
- t("div", Pe, [
498
+ t("div", Le, [
499
499
  s(e.$slots, "mobile-trigger", {
500
500
  isOpen: a.value,
501
501
  toggle: () => a.value = !a.value
@@ -595,7 +595,7 @@ const fe = {
595
595
  ])
596
596
  ])
597
597
  ], 2)) : u("", !0)
598
- ], 64)) : (r(), G(P, {
598
+ ], 64)) : (r(), G(L, {
599
599
  key: 3,
600
600
  show: a.value,
601
601
  "onUpdate:show": o[8] || (o[8] = (d) => a.value = d),
@@ -608,7 +608,7 @@ const fe = {
608
608
  }, {
609
609
  header: g(() => [
610
610
  s(e.$slots, "logo", {}, () => [
611
- o[18] || (o[18] = L("Brand", -1))
611
+ o[18] || (o[18] = P("Brand", -1))
612
612
  ])
613
613
  ]),
614
614
  default: g(() => [
@@ -1,54 +1,31 @@
1
1
  import { SidebarMenuItemSchema } from './SidebarMenu/types';
2
- export interface CommandPlateSchema {
3
- id?: string;
4
- label: string;
5
- labelI18n?: string;
6
- description?: string;
7
- descriptionI18n?: string;
8
- icon?: string;
9
- group?: string;
10
- to?: string;
11
- href?: string;
12
- action?: () => void;
13
- keywords?: string[];
14
- disabled?: boolean;
15
- modalBody?: any;
16
- modalProps?: Record<string, any>;
17
- show?: boolean | (() => boolean);
18
- children?: CommandPlateSchema[];
19
- }
20
- export type CommandPaletteItem = CommandPlateSchema;
21
- export interface CommandPaletteGroup {
22
- key: string;
23
- label: string;
24
- items: CommandPaletteItem[];
25
- }
2
+ export type { CommandPaletteItem, CommandPaletteGroup } from './CommandPalette';
3
+ export type CommandPlateSchema = import('./CommandPalette').CommandPaletteItem;
26
4
  interface Props {
27
5
  /** Items directly supplied to the palette (static list or pre-mapped) */
28
- items?: CommandPaletteItem[];
6
+ items?: import('./CommandPalette').CommandPaletteItem[];
29
7
  /**
30
8
  * Raw SidebarMenuItemSchema tree — the palette auto-flattens and groups these.
31
- * Supports top-level links, nested children, and grouped items.
32
9
  */
33
10
  menuItems?: SidebarMenuItemSchema[];
34
11
  /** Keyboard shortcut that opens the palette (default: Meta+K / Ctrl+K) */
35
12
  shortcutKey?: string;
36
13
  /** Placeholder text for the search input */
37
14
  placeholder?: string;
38
- /** I18n translation key for placeholder */
15
+ /** i18n translation key for placeholder */
39
16
  placeholderI18n?: string;
40
17
  /** Maximum number of results shown per group */
41
18
  maxResultsPerGroup?: number;
42
- /** Whether the palette is enabled at all when false, nothing mounts or listens */
19
+ /** When false, nothing renders and no shortcut listener is registered */
43
20
  enabled?: boolean;
44
21
  triggerClass?: string;
45
22
  }
46
23
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
47
24
  placeholder: string;
48
- items: CommandPaletteItem[];
25
+ items: import('./CommandPalette').CommandPaletteItem[];
49
26
  enabled: boolean;
50
27
  menuItems: SidebarMenuItemSchema[];
51
- shortcutKey: string;
52
28
  maxResultsPerGroup: number;
29
+ shortcutKey: string;
53
30
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
54
31
  export default _default;
@@ -1,9 +1,10 @@
1
- import { defineComponent as x, ref as m, shallowRef as k, onMounted as C, onUnmounted as P, watch as M, computed as y, openBlock as I, createElementBlock as E, Fragment as K, createElementVNode as a, normalizeClass as D, createVNode as c, toDisplayString as p, mergeProps as O, createCommentVNode as B } from "vue";
2
- import G from "./Icon.vue.js";
1
+ import { defineComponent as x, ref as m, shallowRef as k, onMounted as C, onUnmounted as P, watch as I, computed as y, openBlock as M, createElementBlock as E, Fragment as K, createElementVNode as a, normalizeClass as D, createVNode as c, toDisplayString as p, unref as O, mergeProps as B, createCommentVNode as G } from "vue";
2
+ import L from "./Icon.vue.js";
3
3
  import v from "./Modal.vue.js";
4
- import L from "./CommandPaletteContent.vue.js";
5
- import { $t as N } from "../utils/i18n.js";
6
- const R = { class: "block truncate -text-fs-1.5" }, U = { 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" }, F = /* @__PURE__ */ x({
4
+ import N from "./CommandPalette/CommandPaletteContent.vue.js";
5
+ import { $t as R } from "../utils/i18n.js";
6
+ /* empty css */
7
+ const U = { class: "block truncate -text-fs-1.5" }, V = { 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" }, q = /* @__PURE__ */ x({
7
8
  __name: "NavbarCommandPalette",
8
9
  props: {
9
10
  items: { default: () => [] },
@@ -15,77 +16,76 @@ const R = { class: "block truncate -text-fs-1.5" }, U = { class: "ml-auto inline
15
16
  enabled: { type: Boolean, default: !0 },
16
17
  triggerClass: {}
17
18
  },
18
- setup(t) {
19
- const o = t, l = m(!1), s = m(!1), f = k(null), d = m({}), b = () => {
20
- l.value = !0;
19
+ setup(o) {
20
+ const t = o, n = m(!1), s = m(!1), f = k(null), d = m({}), b = () => {
21
+ n.value = !0;
21
22
  }, u = () => {
22
- l.value = !1;
23
- }, h = (e, n) => {
24
- u(), f.value = e, d.value = n || {}, s.value = !0;
23
+ n.value = !1;
24
+ }, h = (e, l) => {
25
+ u(), f.value = e, d.value = l || {}, s.value = !0;
25
26
  }, r = (e) => {
26
- if (!o.enabled) return;
27
- (e.metaKey || e.ctrlKey) && e.key === o.shortcutKey && (e.preventDefault(), l.value ? u() : b());
27
+ t.enabled && (e.metaKey || e.ctrlKey) && e.key === t.shortcutKey && (e.preventDefault(), n.value ? u() : b());
28
28
  };
29
29
  C(() => {
30
- o.enabled && window.addEventListener("keydown", r);
30
+ t.enabled && window.addEventListener("keydown", r);
31
31
  }), P(() => {
32
32
  window.removeEventListener("keydown", r);
33
- }), M(
34
- () => o.enabled,
33
+ }), I(
34
+ () => t.enabled,
35
35
  (e) => {
36
- e ? window.addEventListener("keydown", r) : (window.removeEventListener("keydown", r), l.value && u());
36
+ e ? window.addEventListener("keydown", r) : (window.removeEventListener("keydown", r), n.value && u());
37
37
  }
38
38
  );
39
39
  const w = y(() => {
40
- if (o.placeholderI18n) {
41
- const e = N(o.placeholderI18n);
42
- if (e !== o.placeholderI18n) return e;
40
+ if (t.placeholderI18n) {
41
+ const e = R(t.placeholderI18n);
42
+ if (e !== t.placeholderI18n) return e;
43
43
  }
44
- return o.placeholder;
44
+ return t.placeholder;
45
45
  }), g = y(
46
46
  () => typeof navigator < "u" ? /mac/i.test(navigator.platform) : !0
47
47
  );
48
- return (e, n) => t.enabled ? (I(), E(K, { key: 0 }, [
48
+ return (e, l) => o.enabled ? (M(), E(K, { key: 0 }, [
49
49
  a("button", {
50
50
  type: "button",
51
- class: D(["command-palette-trigger inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-sm text-muted-foreground bg-muted/60 hover:bg-muted border border-border/60 focus-visible:outline-none justify-between focus-visible:ring-2 focus-visible:ring-primary/50 select-none cursor-pointer shrink-0", t.triggerClass]),
51
+ class: D(["command-palette-trigger inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-sm text-muted-foreground bg-muted/60 hover:bg-muted border border-border/60 focus-visible:outline-none justify-between focus-visible:ring-2 focus-visible:ring-primary/50 select-none cursor-pointer shrink-0", o.triggerClass]),
52
52
  "aria-label": "Open command palette",
53
53
  onClick: b
54
54
  }, [
55
- c(G, {
55
+ c(L, {
56
56
  icon: "lucide:search",
57
57
  class: "w-3.5 h-3.5 shrink-0"
58
58
  }),
59
- a("span", R, p(w.value.split(",")[0]) + "...", 1),
60
- a("kbd", U, [
59
+ a("span", U, p(w.value.split(",")[0]) + "...", 1),
60
+ a("kbd", V, [
61
61
  a("span", null, p(g.value ? "⌘" : "Ctrl"), 1),
62
- a("span", null, p(t.shortcutKey.toUpperCase()), 1)
62
+ a("span", null, p(o.shortcutKey.toUpperCase()), 1)
63
63
  ])
64
64
  ], 2),
65
65
  c(v, {
66
- show: l.value,
67
- "onUpdate:show": n[0] || (n[0] = (i) => l.value = i),
66
+ show: n.value,
67
+ "onUpdate:show": l[0] || (l[0] = (i) => n.value = i),
68
68
  maxWidth: "max-w-2xl",
69
69
  bodyClass: "!p-0 flex flex-col h-full",
70
- body: L,
70
+ body: O(N),
71
71
  bodyProps: {
72
- items: t.items,
73
- menuItems: t.menuItems,
74
- placeholder: t.placeholder,
75
- placeholderI18n: t.placeholderI18n,
76
- maxResultsPerGroup: t.maxResultsPerGroup,
72
+ items: o.items,
73
+ menuItems: o.menuItems,
74
+ placeholder: o.placeholder,
75
+ placeholderI18n: o.placeholderI18n,
76
+ maxResultsPerGroup: o.maxResultsPerGroup,
77
77
  onOpenDynamicModal: h
78
78
  }
79
- }, null, 8, ["show", "bodyProps"]),
80
- c(v, O(d.value, {
79
+ }, null, 8, ["show", "body", "bodyProps"]),
80
+ c(v, B(d.value, {
81
81
  show: s.value,
82
- "onUpdate:show": n[1] || (n[1] = (i) => s.value = i),
82
+ "onUpdate:show": l[1] || (l[1] = (i) => s.value = i),
83
83
  body: f.value,
84
84
  bodyProps: d.value
85
85
  }), null, 16, ["show", "body", "bodyProps"])
86
- ], 64)) : B("", !0);
86
+ ], 64)) : G("", !0);
87
87
  }
88
88
  });
89
89
  export {
90
- F as default
90
+ q as default
91
91
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./PermissionEditorList.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fc14e574"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a42b2fb0"]]);
5
5
  export {
6
6
  m as default
7
7
  };