vlite3 1.1.1 → 1.1.4

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 (117) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
  2. package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
  3. package/components/Avatar.vue.js +1 -1
  4. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  5. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  6. package/components/Button.vue.d.ts +1 -1
  7. package/components/Button.vue.js +30 -28
  8. package/components/Calendar/Calendar.vue.d.ts +6 -6
  9. package/components/Carousel/Carousel.vue.d.ts +2 -2
  10. package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
  11. package/components/CategoryManager/CategoryManager.vue.js +204 -145
  12. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  13. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  14. package/components/CategoryManager/types.d.ts +14 -0
  15. package/components/Chat/ChatBubble.vue.js +22 -22
  16. package/components/CheckBox.vue.js +29 -28
  17. package/components/Chip/Chip.vue.d.ts +2 -2
  18. package/components/ConfirmationModal.vue.d.ts +2 -2
  19. package/components/ConfirmationModal.vue.js +30 -28
  20. package/components/CopyButton.vue.d.ts +50 -0
  21. package/components/CopyButton.vue.js +69 -0
  22. package/components/CopyButton.vue2.js +4 -0
  23. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
  24. package/components/DataTable/DataTable.vue.d.ts +3 -3
  25. package/components/DataTable/DataTable.vue.js +44 -44
  26. package/components/DatePicker.vue.js +41 -35
  27. package/components/DateRangePicker.vue.js +18 -17
  28. package/components/Dropdown/Dropdown.vue.d.ts +5 -2
  29. package/components/Dropdown/Dropdown.vue.js +117 -115
  30. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  31. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  32. package/components/Dropdown/DropdownItem.vue.js +21 -20
  33. package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
  34. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  35. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  36. package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
  37. package/components/Dropdown/DropdownTrigger.vue.js +10 -6
  38. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  39. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  40. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  41. package/components/FilePicker/FilePicker.vue.d.ts +1 -1
  42. package/components/FilePicker/FilePicker.vue.js +93 -90
  43. package/components/Form/CustomFields.vue.js +2 -2
  44. package/components/Form/Form.vue.js +1 -1
  45. package/components/Form/Form.vue2.js +230 -238
  46. package/components/Form/FormField.vue.d.ts +1 -1
  47. package/components/Form/FormField.vue.js +204 -148
  48. package/components/Form/FormFields.vue.js +2 -2
  49. package/components/Form/FormFields.vue2.js +28 -27
  50. package/components/Form/types.d.ts +2 -2
  51. package/components/Form/utils/form.utils.d.ts +3 -3
  52. package/components/Form/utils/form.utils.js +37 -37
  53. package/components/Input.vue.d.ts +3 -3
  54. package/components/Input.vue.js +64 -62
  55. package/components/Invoice/Invoice.vue.d.ts +1 -4
  56. package/components/Invoice/Invoice.vue.js +22 -13
  57. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  58. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  59. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  60. package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
  61. package/components/Invoice/InvoiceVariant1.vue.js +304 -271
  62. package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
  63. package/components/Invoice/InvoiceVariant2.vue.js +168 -181
  64. package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
  65. package/components/Invoice/InvoiceVariant3.vue.js +215 -182
  66. package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
  67. package/components/Invoice/InvoiceVariant4.vue.js +281 -238
  68. package/components/Invoice/index.d.ts +1 -0
  69. package/components/Invoice/types.d.ts +26 -0
  70. package/components/List/List.vue.d.ts +1 -9
  71. package/components/List/List.vue.js +166 -165
  72. package/components/List/ListFieldRow.vue.d.ts +2 -2
  73. package/components/List/ListFieldRow.vue.js +50 -50
  74. package/components/Masonry/Masonry.vue.d.ts +1 -1
  75. package/components/Modal.vue.js +1 -1
  76. package/components/Modal.vue2.js +60 -54
  77. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  78. package/components/MultiSelect/MultiSelect.vue.js +47 -46
  79. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  80. package/components/Navbar/NavbarItem.vue.d.ts +1 -1
  81. package/components/NumberInput.vue.d.ts +2 -2
  82. package/components/NumberInput.vue.js +2 -2
  83. package/components/NumberInput.vue2.js +121 -116
  84. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  85. package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
  86. package/components/SidePanel.vue.js +2 -2
  87. package/components/SidePanel.vue2.js +58 -52
  88. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  89. package/components/Stats/StatItem.vue.js +96 -91
  90. package/components/Stats/Stats.vue.d.ts +1 -1
  91. package/components/Stats/types.d.ts +1 -0
  92. package/components/StatusChip/status-map.js +27 -7
  93. package/components/Switch.vue.d.ts +6 -1
  94. package/components/Switch.vue.js +61 -24
  95. package/components/TagInput/TagInput.vue.d.ts +187 -0
  96. package/components/TagInput/TagInput.vue.js +113 -0
  97. package/components/TagInput/TagInput.vue2.js +4 -0
  98. package/components/TagInput/index.d.ts +1 -0
  99. package/components/Textarea.vue.js +19 -18
  100. package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
  101. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  102. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  103. package/components/Workbook/Workbook.vue.d.ts +3 -3
  104. package/core/config.d.ts +112 -0
  105. package/core/index.js +17 -5
  106. package/index.d.ts +2 -0
  107. package/index.js +279 -271
  108. package/package.json +1 -1
  109. package/style.css +617 -2
  110. package/types/button.d.ts +1 -1
  111. package/types/config.type.d.ts +6 -0
  112. package/types/list.type.d.ts +6 -0
  113. package/types/styles.d.ts +1 -0
  114. package/utils/configUtils.d.ts +9 -0
  115. package/utils/configUtils.js +7 -0
  116. package/utils/functions.js +9 -9
  117. package/utils/index.d.ts +1 -0
@@ -1,16 +1,16 @@
1
- import { defineComponent as ne, ref as i, computed as c, inject as oe, onMounted as ae, onUnmounted as ie, watch as P, provide as V, reactive as se, toRefs as re, openBlock as x, createElementBlock as R, normalizeStyle as de, createVNode as M, unref as g, withCtx as f, renderSlot as m, createCommentVNode as z, createBlock as ue, normalizeClass as ce, createSlots as fe, normalizeProps as E, guardReactiveProps as j } from "vue";
2
- import me from "v-tooltip-lite";
1
+ import { defineComponent as oe, ref as i, computed as f, inject as ae, onMounted as ie, onUnmounted as se, watch as P, provide as R, reactive as re, toRefs as de, openBlock as x, createElementBlock as z, normalizeStyle as ue, createVNode as M, unref as u, withCtx as m, renderSlot as v, createCommentVNode as E, createBlock as ce, normalizeClass as fe, createSlots as me, normalizeProps as j, guardReactiveProps as U } from "vue";
2
+ import ve from "v-tooltip-lite";
3
3
  import "v-tooltip-lite/style.css";
4
- import ve from "./DropdownMenu.vue.js";
5
- import he from "./DropdownTrigger.vue.js";
4
+ import he from "./DropdownMenu.vue.js";
5
+ import ge from "./DropdownTrigger.vue.js";
6
6
  import pe from "../ConfirmationModal.vue.js";
7
- import { useDropdownIds as ge } from "./composables/useDropdownIds.js";
8
- import { useDropdownSelection as ye } from "./composables/useDropdownSelection.js";
9
- import { useDropdownHydration as be } from "./composables/useDropdownHydration.js";
10
- const Ce = {
7
+ import { useDropdownIds as ye } from "./composables/useDropdownIds.js";
8
+ import { useDropdownSelection as be } from "./composables/useDropdownSelection.js";
9
+ import { useDropdownHydration as Ce } from "./composables/useDropdownHydration.js";
10
+ const Oe = {
11
11
  key: 0,
12
12
  tabindex: "0"
13
- }, Me = /* @__PURE__ */ ne({
13
+ }, Ne = /* @__PURE__ */ oe({
14
14
  __name: "Dropdown",
15
15
  props: {
16
16
  selected: {},
@@ -34,6 +34,7 @@ const Ce = {
34
34
  nestedPosition: {},
35
35
  nestedOffset: {},
36
36
  showSelectedLabel: { type: Boolean, default: !0 },
37
+ showSelectedIcon: { type: Boolean, default: !1 },
37
38
  selectable: { type: Boolean, default: !0 },
38
39
  doubleConfirmation: { type: Boolean, default: !1 },
39
40
  layout: { default: "default" },
@@ -50,22 +51,22 @@ const Ce = {
50
51
  disabled: { type: Boolean, default: !1 }
51
52
  },
52
53
  emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
53
- setup(l, { emit: U }) {
54
- const o = l, v = U, y = i(!1), h = i(null), r = i({
54
+ setup(t, { emit: q }) {
55
+ const o = t, h = q, y = i(!1), g = i(null), r = i({
55
56
  title: "Confirm Selection",
56
57
  description: "Are you sure you want to select this option?",
57
58
  confirmText: "Confirm",
58
59
  cancelText: "Cancel",
59
60
  variant: "primary"
60
- }), q = c(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), F = c(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), b = i(o.isOpen || !1), C = i(0), G = `dropdown-${Math.random().toString(36).substring(2, 9)}`, $ = c(() => o.menuId || G), p = i([]), s = oe("dropdown-context", null), J = (e) => {
61
+ }), F = f(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), G = f(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), b = i(o.isOpen || !1), C = i(0), J = `dropdown-${Math.random().toString(36).substring(2, 9)}`, w = f(() => o.menuId || J), p = i([]), s = ae("dropdown-context", null), K = (e) => {
61
62
  p.value.includes(e) || p.value.push(e), s?.registerChildId?.(e);
62
- }, K = (e) => {
63
+ }, Q = (e) => {
63
64
  p.value = p.value.filter((n) => n !== e), s?.unregisterChildId?.(e);
64
65
  };
65
- ae(() => {
66
- s?.registerChildId && s.registerChildId(`#${$.value}`);
67
- }), ie(() => {
68
- s?.unregisterChildId && s.unregisterChildId(`#${$.value}`);
66
+ ie(() => {
67
+ s?.registerChildId && s.registerChildId(`#${w.value}`);
68
+ }), se(() => {
69
+ s?.unregisterChildId && s.unregisterChildId(`#${w.value}`);
69
70
  }), P(
70
71
  () => o.isOpen,
71
72
  (e) => {
@@ -77,71 +78,71 @@ const Ce = {
77
78
  );
78
79
  const N = (e) => {
79
80
  if (o.disabled) {
80
- b.value = !1, v("update:isOpen", !1);
81
+ b.value = !1, h("update:isOpen", !1);
81
82
  return;
82
83
  }
83
- b.value = e, v("update:isOpen", e), v(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
84
+ b.value = e, h("update:isOpen", e), h(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
84
85
  }, O = () => {
85
86
  N(!1);
86
- }, Q = (e) => {
87
+ }, W = (e) => {
87
88
  e ? C.value++ : C.value = Math.max(0, C.value - 1);
88
89
  };
89
- V("dropdown-context", {
90
+ R("dropdown-context", {
90
91
  close: O,
91
92
  onChildToggle: (e) => {
92
- Q(e), s?.onChildToggle?.(e);
93
+ W(e), s?.onChildToggle?.(e);
93
94
  },
94
- registerChildId: J,
95
- unregisterChildId: K
96
- }), V("modal-context", null);
97
- const w = c(() => o.options ? o.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), k = i(!1);
95
+ registerChildId: K,
96
+ unregisterChildId: Q
97
+ }), R("modal-context", null);
98
+ const I = f(() => o.options ? o.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), $ = i(!1);
98
99
  P(
99
- w,
100
+ I,
100
101
  (e) => {
101
102
  if (e) {
102
103
  if (o.remote) {
103
104
  const n = [...S.value];
104
- e.forEach((t) => {
105
- n.some((a) => a.value !== void 0 && t.value !== void 0 ? typeof a.value == "object" && a.key && t.key ? a.key === t.key && a.value[a.key] === t.value[t.key] : a.value === t.value : a.label === t.label) || n.push(t);
105
+ e.forEach((l) => {
106
+ n.some((a) => a.value !== void 0 && l.value !== void 0 ? typeof a.value == "object" && a.key && l.key ? a.key === l.key && a.value[a.key] === l.value[l.key] : a.value === l.value : a.label === l.label) || n.push(l);
106
107
  }), S.value = n;
107
108
  } else
108
109
  S.value = e;
109
110
  !A.value && e.length > 0 && (A.value = !0, setTimeout(() => {
110
- k.value = !0, H(T.value);
111
+ $.value = !0, H(T.value);
111
112
  }, 10));
112
113
  }
113
114
  },
114
115
  { immediate: !0 }
115
116
  );
116
- const u = c(() => {
117
- const e = [...S.value], n = new Set(e.map((t) => t.value ?? t.label));
118
- return I.value.forEach((t, d) => {
119
- n.has(d) || (e.unshift(t), n.add(d));
117
+ const c = f(() => {
118
+ const e = [...S.value], n = new Set(e.map((l) => l.value ?? l.label));
119
+ return k.value.forEach((l, d) => {
120
+ n.has(d) || (e.unshift(l), n.add(d));
120
121
  }), e;
121
- }), { selectedBuffer: I, isHydrating: W, hydrateSelected: H } = be({
122
+ }), { selectedBuffer: k, isHydrating: X, hydrateSelected: H } = Ce({
122
123
  fetchSelected: o.fetchSelected,
123
- getAvailableOptions: () => u.value,
124
- isReady: () => k.value
125
- }), { getAllRecursiveIds: X } = ge(), Y = se({
126
- ...re(o),
127
- options: u
128
- }), { currentValue: T, selectedLabel: D, selectOption: Z } = ye(
129
- Y,
130
- v
131
- ), _ = c(() => {
132
- const e = o.ignoreClickOutside || [], n = X(u.value);
124
+ getAvailableOptions: () => c.value,
125
+ isReady: () => $.value
126
+ }), { getAllRecursiveIds: Y } = ye(), Z = re({
127
+ ...de(o),
128
+ options: c
129
+ }), { currentValue: T, selectedLabel: D, selectedIcon: L, selectOption: _ } = be(
130
+ Z,
131
+ h
132
+ ), ee = f(() => {
133
+ const e = o.ignoreClickOutside || [], n = Y(c.value);
133
134
  return [.../* @__PURE__ */ new Set([...e, ...n, ...p.value])];
134
135
  });
135
136
  P(
136
137
  () => T.value,
137
138
  (e) => {
138
- k.value && H(e);
139
+ $.value && H(e);
139
140
  },
140
141
  { deep: !0 }
141
142
  );
142
- const ee = (e) => {
143
+ const te = (e) => {
143
144
  if (o.disabled || e.disabled) return;
144
- o.doubleConfirmation || !!e.confirmation ? (h.value = e, typeof e.confirmation == "object" ? r.value = {
145
+ o.doubleConfirmation || !!e.confirmation ? (g.value = e, typeof e.confirmation == "object" ? r.value = {
145
146
  title: e.confirmation.title || "Confirm Selection",
146
147
  description: e.confirmation.description || "Are you sure you want to select this option?",
147
148
  confirmText: e.confirmation.confirmText || "Confirm",
@@ -153,120 +154,121 @@ const Ce = {
153
154
  confirmText: "Confirm",
154
155
  cancelText: "Cancel",
155
156
  variant: "primary"
156
- }, y.value = !0, O()) : (L(e), o.closeOnSelect && O());
157
- }, L = (e) => {
157
+ }, y.value = !0, O()) : (V(e), o.closeOnSelect && O());
158
+ }, V = (e) => {
158
159
  if (o.disabled || e.disabled) return;
159
160
  const n = e.value ?? e.label;
160
- I.value.has(n) || I.value.set(n, e);
161
- const t = Z(e);
161
+ k.value.has(n) || k.value.set(n, e);
162
+ const l = _(e);
162
163
  if (!o.isNested) {
163
164
  const d = e._originalOption || e, a = d.value ?? d.label;
164
165
  (e._path || [d]).forEach((B) => {
165
166
  typeof B.onSelect == "function" && B.onSelect({
166
167
  value: a,
167
168
  option: B,
168
- data: u.value || [],
169
- values: t
169
+ data: c.value || [],
170
+ values: l
170
171
  });
171
172
  });
172
173
  }
173
- }, te = () => {
174
- h.value && (L(h.value), h.value = null, y.value = !1);
175
174
  }, le = () => {
176
- h.value = null, y.value = !1;
175
+ g.value && (V(g.value), g.value = null, y.value = !1);
176
+ }, ne = () => {
177
+ g.value = null, y.value = !1;
177
178
  };
178
- return (e, n) => (x(), R("div", {
179
+ return (e, n) => (x(), z("div", {
179
180
  class: "relative inline-block text-left",
180
- style: de({ direction: l.direction })
181
+ style: ue({ direction: t.direction })
181
182
  }, [
182
- M(g(me), {
183
+ M(u(ve), {
183
184
  content: "",
184
185
  trigger: "click",
185
186
  arrow: !1,
186
- teleport: l.teleport,
187
- offset: l.offset,
188
- placement: q.value,
187
+ teleport: t.teleport,
188
+ offset: t.offset,
189
+ placement: F.value,
189
190
  isOpen: b.value,
190
191
  keepAlive: C.value > 0,
191
- menuId: $.value,
192
- ignoreClickOutside: _.value,
192
+ menuId: w.value,
193
+ ignoreClickOutside: ee.value,
193
194
  class: "w-full",
194
- className: "dropdown " + (l.className || ""),
195
- onOnShow: n[2] || (n[2] = (t) => e.$emit("onOpen")),
196
- onOnHide: n[3] || (n[3] = (t) => e.$emit("onClose")),
195
+ className: "dropdown " + (t.className || ""),
196
+ onOnShow: n[2] || (n[2] = (l) => e.$emit("onOpen")),
197
+ onOnHide: n[3] || (n[3] = (l) => e.$emit("onClose")),
197
198
  "onUpdate:isOpen": N,
198
199
  triggerClass: "w-full",
199
200
  styles: { padding: "0" }
200
201
  }, {
201
- trigger: f(({ isOpen: t }) => [
202
- m(e.$slots, "trigger", E(j({ selectedLabel: g(D), isOpen: t })), () => [
203
- M(he, {
204
- "selected-label": g(D),
205
- "is-open": t,
206
- direction: l.direction,
207
- disabled: l.disabled,
208
- triggerProps: l.triggerProps,
202
+ trigger: m(({ isOpen: l }) => [
203
+ v(e.$slots, "trigger", j(U({ selectedLabel: u(D), selectedIcon: t.showSelectedIcon ? u(L) : void 0, isOpen: l })), () => [
204
+ M(ge, {
205
+ "selected-label": u(D),
206
+ "selected-icon": t.showSelectedIcon ? u(L) : void 0,
207
+ "is-open": l,
208
+ direction: t.direction,
209
+ disabled: t.disabled,
210
+ triggerProps: t.triggerProps,
209
211
  class: "w-full"
210
- }, null, 8, ["selected-label", "is-open", "direction", "disabled", "triggerProps"])
212
+ }, null, 8, ["selected-label", "selected-icon", "is-open", "direction", "disabled", "triggerProps"])
211
213
  ])
212
214
  ]),
213
- default: f(() => [
214
- e.$slots?.default ? (x(), R("span", Ce, [
215
- m(e.$slots, "default")
216
- ])) : z("", !0),
217
- !l.disabled && (w.value.length || u.value.length || e.$slots.menu || e.$slots.item || l.remote || l.searchable) ? (x(), ue(ve, {
215
+ default: m(() => [
216
+ e.$slots?.default ? (x(), z("span", Oe, [
217
+ v(e.$slots, "default")
218
+ ])) : E("", !0),
219
+ !t.disabled && (I.value.length || c.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable) ? (x(), ce(he, {
218
220
  key: 1,
219
- options: w.value,
220
- cachedOptions: u.value,
221
- class: ce(l.className),
222
- selected: g(T),
223
- selectedIndex: l.selectedIndex,
224
- maxHeight: l.maxHeight,
225
- nestedPosition: F.value,
226
- nestedOffset: l.nestedOffset,
227
- selectable: l.selectable,
228
- direction: l.direction,
229
- layout: l.layout,
230
- columns: l.columns,
231
- loading: l.loading || g(W),
232
- hasMore: l.hasMore,
233
- searchable: l.searchable,
234
- remote: l.remote,
235
- debounceTime: l.debounceTime,
236
- onSelect: ee,
221
+ options: I.value,
222
+ cachedOptions: c.value,
223
+ class: fe(t.className),
224
+ selected: u(T),
225
+ selectedIndex: t.selectedIndex,
226
+ maxHeight: t.maxHeight,
227
+ nestedPosition: G.value,
228
+ nestedOffset: t.nestedOffset,
229
+ selectable: t.selectable,
230
+ direction: t.direction,
231
+ layout: t.layout,
232
+ columns: t.columns,
233
+ loading: t.loading || u(X),
234
+ hasMore: t.hasMore,
235
+ searchable: t.searchable,
236
+ remote: t.remote,
237
+ debounceTime: t.debounceTime,
238
+ onSelect: te,
237
239
  onClose: O,
238
- onLoadMore: n[0] || (n[0] = (t) => e.$emit("load-more")),
239
- onSearch: n[1] || (n[1] = (t) => e.$emit("search", t))
240
- }, fe({ _: 2 }, [
240
+ onLoadMore: n[0] || (n[0] = (l) => e.$emit("load-more")),
241
+ onSearch: n[1] || (n[1] = (l) => e.$emit("search", l))
242
+ }, me({ _: 2 }, [
241
243
  e.$slots.menu ? {
242
244
  name: "menu",
243
- fn: f(() => [
244
- m(e.$slots, "menu")
245
+ fn: m(() => [
246
+ v(e.$slots, "menu")
245
247
  ]),
246
248
  key: "0"
247
249
  } : void 0,
248
250
  e.$slots.item ? {
249
251
  name: "item",
250
- fn: f((t) => [
251
- m(e.$slots, "item", E(j(t)))
252
+ fn: m((l) => [
253
+ v(e.$slots, "item", j(U(l)))
252
254
  ]),
253
255
  key: "1"
254
256
  } : void 0,
255
257
  e.$slots.header ? {
256
258
  name: "header",
257
- fn: f(() => [
258
- m(e.$slots, "header")
259
+ fn: m(() => [
260
+ v(e.$slots, "header")
259
261
  ]),
260
262
  key: "2"
261
263
  } : void 0,
262
264
  e.$slots.footer ? {
263
265
  name: "footer",
264
- fn: f(() => [
265
- m(e.$slots, "footer")
266
+ fn: m(() => [
267
+ v(e.$slots, "footer")
266
268
  ]),
267
269
  key: "3"
268
270
  } : void 0
269
- ]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : z("", !0)
271
+ ]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : E("", !0)
270
272
  ]),
271
273
  _: 3
272
274
  }, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
@@ -277,12 +279,12 @@ const Ce = {
277
279
  "confirm-text": r.value.confirmText,
278
280
  "cancel-text": r.value.cancelText,
279
281
  variant: r.value.variant,
280
- onConfirm: te,
281
- onCancel: le
282
+ onConfirm: le,
283
+ onCancel: ne
282
284
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
283
285
  ], 4));
284
286
  }
285
287
  });
286
288
  export {
287
- Me as default
289
+ Ne as default
288
290
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as r, computed as d, openBlock as a, createElementBlock as u, withModifiers as p, normalizeClass as f, createElementVNode as l, createBlock as g, createCommentVNode as v, toDisplayString as h, createVNode as x } from "vue";
2
- import b from "../Switch.vue.js";
1
+ import { defineComponent as m, computed as d, openBlock as a, createElementBlock as u, withModifiers as p, normalizeClass as f, createElementVNode as l, createBlock as g, createCommentVNode as h, toDisplayString as v, createVNode as b } from "vue";
2
+ import x from "../Switch.vue.js";
3
3
  import y from "../Icon.vue.js";
4
4
  import { $t as k } from "../../utils/i18n.js";
5
- const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "truncate font-medium" }, N = /* @__PURE__ */ r({
5
+ const w = ["data-testid"], B = { class: "flex items-center gap-2 flex-1 min-w-0" }, $ = { class: "truncate font-medium" }, z = /* @__PURE__ */ m({
6
6
  __name: "DropdownBooleanItem",
7
7
  props: {
8
8
  option: {},
@@ -11,36 +11,37 @@ const w = { class: "flex items-center gap-2 flex-1 min-w-0" }, B = { class: "tru
11
11
  },
12
12
  emits: ["change"],
13
13
  setup(e, { emit: c }) {
14
- const o = e, s = c, m = d(
14
+ const o = e, s = c, r = d(
15
15
  () => o.option.labelI18n ? k(o.option.labelI18n) : o.option.label
16
- ), t = (n) => {
17
- s("change", n, o.option);
16
+ ), n = (t) => {
17
+ s("change", t, o.option);
18
18
  };
19
- return (n, i) => (a(), u("div", {
19
+ return (t, i) => (a(), u("div", {
20
20
  tabindex: "0",
21
21
  "data-dropdown-item": "",
22
22
  class: f(["relative flex cursor-pointer select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none transition-colors", [
23
23
  e.focused ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground"
24
24
  ]]),
25
- onClick: i[0] || (i[0] = p((j) => t(!e.value), ["stop"]))
25
+ "data-testid": t.$attrs["data-testid"] || `dropdown-item-bool-${e.option.key || e.option.label}`.toLowerCase().replace(/[^a-z0-9]+/g, "-"),
26
+ onClick: i[0] || (i[0] = p((j) => n(!e.value), ["stop"]))
26
27
  }, [
27
- l("div", w, [
28
+ l("div", B, [
28
29
  e.option.icon || e.option.emoji ? (a(), g(y, {
29
30
  key: 0,
30
31
  icon: e.option.icon,
31
32
  emoji: e.option.emoji,
32
33
  class: "h-4 w-4 shrink-0 opacity-70"
33
- }, null, 8, ["icon", "emoji"])) : v("", !0),
34
- l("span", B, h(m.value), 1)
34
+ }, null, 8, ["icon", "emoji"])) : h("", !0),
35
+ l("span", $, v(r.value), 1)
35
36
  ]),
36
- x(b, {
37
+ b(x, {
37
38
  "model-value": e.value,
38
39
  class: "ml-3 shrink-0 scale-75 origin-right",
39
- "onUpdate:modelValue": t
40
+ "onUpdate:modelValue": n
40
41
  }, null, 8, ["model-value"])
41
- ], 2));
42
+ ], 10, w));
42
43
  }
43
44
  });
44
45
  export {
45
- N as default
46
+ z as default
46
47
  };
@@ -14,8 +14,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
14
14
  onSelect?: (option: IDropdownOption) => any;
15
15
  onMouseenter?: (payload: any) => any;
16
16
  }>, {
17
+ columns: number | string;
17
18
  selectable: boolean;
18
19
  options: IDropdownOptions;
19
- columns: number | string;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
21
21
  export default _default;
@@ -1,13 +1,13 @@
1
- import { defineComponent as g, computed as s, openBlock as n, createElementBlock as l, withKeys as k, withModifiers as w, normalizeClass as h, renderSlot as I, normalizeProps as $, guardReactiveProps as B, createBlock as p, createCommentVNode as i, createElementVNode as c, toDisplayString as a } from "vue";
1
+ import { defineComponent as g, computed as a, openBlock as n, createElementBlock as s, withKeys as w, withModifiers as k, normalizeClass as h, renderSlot as $, normalizeProps as I, guardReactiveProps as B, createBlock as p, createCommentVNode as i, createElementVNode as c, toDisplayString as d } from "vue";
2
2
  import v from "../Icon.vue.js";
3
- import { $t as d } from "../../utils/i18n.js";
4
- const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-w-0" }, D = { class: "flex items-center justify-between gap-2" }, S = { class: "truncate font-medium" }, z = {
3
+ import { $t as r } from "../../utils/i18n.js";
4
+ const j = ["tabindex", "data-disabled", "data-testid"], C = { class: "flex flex-col flex-1 min-w-0" }, S = { class: "flex items-center justify-between gap-2" }, z = { class: "truncate font-medium" }, D = {
5
5
  key: 0,
6
6
  class: "text-xs text-muted-foreground whitespace-nowrap opacity-90"
7
7
  }, E = {
8
8
  key: 0,
9
9
  class: "text-[10px] text-muted-foreground truncate opacity-70"
10
- }, P = /* @__PURE__ */ g({
10
+ }, N = /* @__PURE__ */ g({
11
11
  __name: "DropdownItem",
12
12
  props: {
13
13
  option: {},
@@ -18,14 +18,14 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
18
18
  },
19
19
  emits: ["click", "mouseenter"],
20
20
  setup(e, { emit: x }) {
21
- const t = e, r = x, y = s(
22
- () => t.option.labelI18n ? d(t.option.labelI18n) : t.option.label
23
- ), u = s(
24
- () => t.option.subtitleI18n ? d(t.option.subtitleI18n) : t.option.subtitle
25
- ), m = s(
26
- () => t.option.descriptionI18n ? d(t.option.descriptionI18n) : t.option.description
21
+ const t = e, u = x, y = a(
22
+ () => t.option.labelI18n ? r(t.option.labelI18n) : t.option.label
23
+ ), m = a(
24
+ () => t.option.subtitleI18n ? r(t.option.subtitleI18n) : t.option.subtitle
25
+ ), f = a(
26
+ () => t.option.descriptionI18n ? r(t.option.descriptionI18n) : t.option.description
27
27
  );
28
- return (f, o) => (n(), l("div", {
28
+ return (l, o) => (n(), s("div", {
29
29
  tabindex: e.option.disabled ? -1 : 0,
30
30
  "data-dropdown-item": "",
31
31
  class: h(["relative w-full flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-1 focus-visible:ring-primary focus-visible:ring-offset-1 data-disabled:pointer-events-none data-disabled:opacity-50", [
@@ -35,11 +35,12 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
35
35
  e.option.class || ""
36
36
  ]]),
37
37
  "data-disabled": e.option.disabled ? !0 : void 0,
38
- onClick: o[0] || (o[0] = (b) => r("click", e.option)),
39
- onKeydown: o[1] || (o[1] = k(w((b) => r("click", e.option), ["prevent"]), ["enter"])),
40
- onMouseenter: o[2] || (o[2] = (b) => f.$emit("mouseenter", e.index ?? -1))
38
+ "data-testid": l.$attrs["data-testid"] || (e.option.value ? `dropdown-item-${e.option.value}` : `dropdown-item-${e.option.label}`).toString().toLowerCase().replace(/[^a-z0-9]+/g, "-"),
39
+ onClick: o[0] || (o[0] = (b) => u("click", e.option)),
40
+ onKeydown: o[1] || (o[1] = w(k((b) => u("click", e.option), ["prevent"]), ["enter"])),
41
+ onMouseenter: o[2] || (o[2] = (b) => l.$emit("mouseenter", e.index ?? -1))
41
42
  }, [
42
- I(f.$slots, "default", $(B({ option: e.option, index: e.index, selected: e.selected })), () => [
43
+ $(l.$slots, "default", I(B({ option: e.option, index: e.index, selected: e.selected })), () => [
43
44
  e.option.icon || e.option.emoji ? (n(), p(v, {
44
45
  key: 0,
45
46
  icon: e.option.icon,
@@ -47,11 +48,11 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
47
48
  class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
48
49
  }, null, 8, ["icon", "emoji"])) : i("", !0),
49
50
  c("div", C, [
50
- c("div", D, [
51
- c("span", S, a(y.value), 1),
52
- u.value ? (n(), l("span", z, a(u.value), 1)) : i("", !0)
51
+ c("div", S, [
52
+ c("span", z, d(y.value), 1),
53
+ m.value ? (n(), s("span", D, d(m.value), 1)) : i("", !0)
53
54
  ]),
54
- m.value ? (n(), l("span", E, a(m.value), 1)) : i("", !0)
55
+ f.value ? (n(), s("span", E, d(f.value), 1)) : i("", !0)
55
56
  ]),
56
57
  e.selectable && e.selected ? (n(), p(v, {
57
58
  key: 1,
@@ -63,5 +64,5 @@ const j = ["tabindex", "data-disabled"], C = { class: "flex flex-col flex-1 min-
63
64
  }
64
65
  });
65
66
  export {
66
- P as default
67
+ N as default
67
68
  };
@@ -48,11 +48,11 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
48
48
  "onLoad-more"?: () => any;
49
49
  }>, {
50
50
  class: string;
51
+ columns: number | string;
51
52
  loading: boolean;
52
53
  direction: "ltr" | "rtl";
53
54
  selectable: boolean;
54
55
  options: (IDropdownOption | string | number)[];
55
- columns: number | string;
56
56
  cachedOptions: IDropdownOptions;
57
57
  selectedIndex: number | null;
58
58
  maxHeight: string;
@@ -1,7 +1,7 @@
1
1
  import o from "./DropdownMenu.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d555d458"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-77113fbb"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -21,7 +21,7 @@ const ve = ["dir"], ye = {
21
21
  }, we = {
22
22
  key: 0,
23
23
  class: "h-px bg-border my-1 mx-1"
24
- }, xe = ["onMouseenter"], pe = { class: "flex items-center flex-1 min-w-0" }, Se = { class: "truncate" }, Oe = {
24
+ }, pe = ["onMouseenter"], xe = { class: "flex items-center flex-1 min-w-0" }, Se = { class: "truncate" }, Oe = {
25
25
  key: 3,
26
26
  class: "flex justify-center py-2"
27
27
  }, _e = {
@@ -70,11 +70,11 @@ const ve = ["dir"], ye = {
70
70
  e.disabled || f("select", e);
71
71
  }, {
72
72
  focusedIndex: y,
73
- isKeyboardMode: x,
73
+ isKeyboardMode: p,
74
74
  filteredOptions: F,
75
75
  handleKeyDown: M,
76
76
  handleMouseMove: B,
77
- onMouseEnterItem: p,
77
+ onMouseEnterItem: x,
78
78
  scrollToIndex: K
79
79
  } = fe({
80
80
  options: u,
@@ -140,7 +140,8 @@ const ve = ["dir"], ye = {
140
140
  "input-class": "-ml-1",
141
141
  variant: "transparent",
142
142
  "icon-class": "h-3.5! w-3.5!",
143
- "show-clear-button": !1
143
+ "show-clear-button": !1,
144
+ "data-testid": "dropdown-search-input"
144
145
  }, null, 8, ["modelValue", "placeholder"])
145
146
  ])) : d("", !0),
146
147
  e.$slots.header ? (o(), i("div", ge, [
@@ -174,9 +175,9 @@ const ve = ["dir"], ye = {
174
175
  key: 1,
175
176
  option: l,
176
177
  value: G(l),
177
- focused: r(x) && r(y) === n,
178
+ focused: r(p) && r(y) === n,
178
179
  onChange: J,
179
- onMouseenter: (c) => r(p)(n)
180
+ onMouseenter: (c) => r(x)(n)
180
181
  }, null, 8, ["option", "value", "focused", "onMouseenter"])) : l.children && l.children.length > 0 ? (o(), m(he, {
181
182
  key: 2,
182
183
  "is-nested": !0,
@@ -198,13 +199,13 @@ const ve = ["dir"], ye = {
198
199
  tabindex: 0,
199
200
  "data-dropdown-item": "",
200
201
  class: E(["relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none transition-colors justify-between w-full focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-1 focus-visible:ring-primary focus-visible:ring-offset-1", [
201
- r(x) && r(y) === n ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
202
+ r(p) && r(y) === n ? "bg-accent text-accent-foreground" : "hover:bg-accent hover:text-accent-foreground",
202
203
  l.disabled ? "opacity-50 cursor-not-allowed" : "",
203
204
  l.triggerClass || l.class || ""
204
205
  ]]),
205
- onMouseenter: (c) => r(p)(n)
206
+ onMouseenter: (c) => r(x)(n)
206
207
  }, [
207
- S("div", pe, [
208
+ S("div", xe, [
208
209
  l.icon || l.emoji ? (o(), m(O, {
209
210
  key: 0,
210
211
  icon: l.icon,
@@ -218,7 +219,7 @@ const ve = ["dir"], ye = {
218
219
  icon: a.direction === "rtl" ? "lucide:chevron-left" : "lucide:chevron-right",
219
220
  class: "h-4 w-4 text-muted-foreground shrink-0 ml-2"
220
221
  }, null, 8, ["icon"])) : d("", !0)
221
- ], 42, xe)
222
+ ], 42, pe)
222
223
  ]),
223
224
  _: 2
224
225
  }, 1032, ["position", "offset", "options", "selected", "menuId", "nestedPosition", "nestedOffset", "selectable", "ignoreClickOutside", "direction", "onOnSelect"])) : (o(), m(ce, {
@@ -226,10 +227,10 @@ const ve = ["dir"], ye = {
226
227
  option: l,
227
228
  index: n,
228
229
  selected: q(l),
229
- focused: r(x) && r(y) === n,
230
+ focused: r(p) && r(y) === n,
230
231
  selectable: a.selectable,
231
232
  onClick: (c) => w(l),
232
- onMouseenter: (c) => r(p)(n)
233
+ onMouseenter: (c) => r(x)(n)
233
234
  }, ne({ _: 2 }, [
234
235
  e.$slots.item ? {
235
236
  name: "default",