vlite3 1.1.2 → 1.1.5

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 (149) hide show
  1. package/README.md +5 -0
  2. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
  3. package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
  4. package/components/Avatar.vue.js +1 -1
  5. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  6. package/components/Button.vue.js +30 -28
  7. package/components/Carousel/Carousel.vue.d.ts +2 -2
  8. package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
  9. package/components/CategoryManager/CategoryManager.vue.js +138 -119
  10. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  11. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  12. package/components/Chart/BarChart.vue.d.ts +48 -0
  13. package/components/Chart/CircleChart.vue.d.ts +47 -0
  14. package/components/Chart/LineChart.vue.d.ts +55 -0
  15. package/components/Chart/PieChart.vue.d.ts +49 -0
  16. package/components/Chart/index.d.ts +5 -0
  17. package/components/Chart/types.d.ts +135 -0
  18. package/components/Chart/utils.d.ts +40 -0
  19. package/components/Chat/ChatBubble.vue.js +22 -22
  20. package/components/CheckBox.vue.js +29 -28
  21. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  22. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  23. package/components/Comment/CommentEditor.vue.d.ts +41 -0
  24. package/components/Comment/CommentEditor.vue.js +221 -0
  25. package/components/Comment/CommentEditor.vue2.js +4 -0
  26. package/components/Comment/CommentItem.vue.d.ts +70 -0
  27. package/components/Comment/CommentItem.vue.js +7 -0
  28. package/components/Comment/CommentItem.vue2.js +322 -0
  29. package/components/Comment/CommentThread.vue.d.ts +64 -0
  30. package/components/Comment/CommentThread.vue.js +185 -0
  31. package/components/Comment/CommentThread.vue2.js +4 -0
  32. package/components/Comment/index.d.ts +4 -0
  33. package/components/Comment/types.d.ts +34 -0
  34. package/components/ConfirmationModal.vue.js +30 -28
  35. package/components/CopyButton.vue.d.ts +50 -0
  36. package/components/CopyButton.vue.js +69 -0
  37. package/components/CopyButton.vue2.js +4 -0
  38. package/components/DataTable/DataTable.vue.d.ts +2 -4
  39. package/components/DataTable/DataTable.vue.js +184 -235
  40. package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
  41. package/components/DataTable/DataTableHeader.vue.js +24 -23
  42. package/components/DataTable/DataTableRow.vue.d.ts +2 -0
  43. package/components/DataTable/DataTableRow.vue.js +32 -31
  44. package/components/DataTable/types.d.ts +2 -9
  45. package/components/DatePicker.vue.js +41 -35
  46. package/components/DateRangePicker.vue.js +18 -17
  47. package/components/Dropdown/Dropdown.vue.d.ts +5 -0
  48. package/components/Dropdown/Dropdown.vue.js +141 -137
  49. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  50. package/components/Dropdown/DropdownItem.vue.js +21 -20
  51. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  52. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  53. package/components/Dropdown/DropdownTrigger.vue.d.ts +4 -0
  54. package/components/Dropdown/DropdownTrigger.vue.js +12 -7
  55. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  56. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  57. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  58. package/components/Empty/Empty.vue.js +7 -5
  59. package/components/Empty/index.d.ts +1 -1
  60. package/components/Empty/variants/Variant12.vue.d.ts +22 -0
  61. package/components/Empty/variants/Variant12.vue.js +35 -0
  62. package/components/Empty/variants/Variant12.vue2.js +4 -0
  63. package/components/FilePicker/FilePicker.vue.js +93 -90
  64. package/components/Footer/Footer.vue.d.ts +3 -0
  65. package/components/Footer/Variant1.vue.d.ts +20 -0
  66. package/components/Footer/Variant2.vue.d.ts +20 -0
  67. package/components/Footer/Variant3.vue.d.ts +12 -0
  68. package/components/Footer/index.d.ts +2 -0
  69. package/components/Footer/types.d.ts +73 -0
  70. package/components/Form/CustomFields.vue.d.ts +2 -0
  71. package/components/Form/CustomFields.vue.js +1 -1
  72. package/components/Form/CustomFields.vue2.js +125 -122
  73. package/components/Form/Form.vue.js +2 -2
  74. package/components/Form/Form.vue2.js +68 -64
  75. package/components/Form/FormField.vue.js +205 -149
  76. package/components/Form/FormFields.vue.js +2 -2
  77. package/components/Form/FormFields.vue2.js +28 -27
  78. package/components/Form/types.d.ts +2 -2
  79. package/components/Form/utils/form.utils.d.ts +3 -3
  80. package/components/Form/utils/form.utils.js +37 -37
  81. package/components/Input.vue.js +64 -62
  82. package/components/Invoice/Invoice.vue.js +9 -7
  83. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  84. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  85. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  86. package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
  87. package/components/Invoice/InvoiceVariant1.vue.js +194 -207
  88. package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
  89. package/components/Invoice/InvoiceVariant2.vue.js +109 -118
  90. package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
  91. package/components/Invoice/InvoiceVariant3.vue.js +157 -167
  92. package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
  93. package/components/Invoice/InvoiceVariant4.vue.js +192 -202
  94. package/components/Invoice/index.d.ts +1 -0
  95. package/components/Invoice/types.d.ts +22 -0
  96. package/components/Masonry/Masonry.vue.d.ts +1 -1
  97. package/components/Modal.vue.js +1 -1
  98. package/components/Modal.vue2.js +60 -54
  99. package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  100. package/components/MultiSelect/MultiSelect.vue.js +92 -90
  101. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  102. package/components/NumberInput.vue.js +2 -2
  103. package/components/NumberInput.vue2.js +127 -121
  104. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  105. package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
  106. package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
  107. package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
  108. package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
  109. package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
  110. package/components/RichTextEditor/index.d.ts +2 -0
  111. package/components/Screen/Screen.vue.js +45 -46
  112. package/components/Screen/ScreenFilter.vue.js +1 -1
  113. package/components/SidePanel.vue.js +2 -2
  114. package/components/SidePanel.vue2.js +58 -52
  115. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  116. package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
  117. package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
  118. package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
  119. package/components/SidebarMenu/types.d.ts +12 -3
  120. package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
  121. package/components/Splitter/Splitter.vue.js +64 -0
  122. package/components/Splitter/Splitter.vue2.js +4 -0
  123. package/components/Splitter/index.d.ts +1 -0
  124. package/components/Stats/StatItem.vue.js +96 -91
  125. package/components/Stats/types.d.ts +1 -0
  126. package/components/StatusChip/status-map.js +34 -2
  127. package/components/Switch.vue.d.ts +6 -1
  128. package/components/Switch.vue.js +61 -24
  129. package/components/TagInput/TagInput.vue.d.ts +187 -0
  130. package/components/TagInput/TagInput.vue.js +113 -0
  131. package/components/TagInput/TagInput.vue2.js +4 -0
  132. package/components/TagInput/index.d.ts +1 -0
  133. package/components/Textarea.vue.js +19 -18
  134. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  135. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  136. package/components/index.d.ts +4 -0
  137. package/core/config.d.ts +54 -0
  138. package/index.d.ts +4 -0
  139. package/index.js +300 -285
  140. package/package.json +1 -1
  141. package/style.css +657 -6
  142. package/types/button.d.ts +1 -1
  143. package/types/config.type.d.ts +2 -0
  144. package/types/styles.d.ts +1 -0
  145. package/utils/functions.js +9 -9
  146. package/components/DataTable/DataTableToolbar.vue.js +0 -60
  147. package/components/DataTable/DataTableToolbar.vue2.js +0 -4
  148. package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
  149. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -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";
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 = {
4
+ import he from "./DropdownMenu.vue.js";
5
+ import ye from "./DropdownTrigger.vue.js";
6
+ import ge from "../ConfirmationModal.vue.js";
7
+ import { useDropdownIds as pe } 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" },
@@ -47,101 +48,102 @@ const Ce = {
47
48
  triggerProps: {},
48
49
  direction: { default: "ltr" },
49
50
  isNested: { type: Boolean, default: !1 },
50
- disabled: { type: Boolean, default: !1 }
51
+ disabled: { type: Boolean, default: !1 },
52
+ readonly: { type: Boolean, default: !1 }
51
53
  },
52
54
  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({
55
+ setup(t, { emit: q }) {
56
+ const l = t, h = q, p = i(!1), y = i(null), r = i({
55
57
  title: "Confirm Selection",
56
58
  description: "Are you sure you want to select this option?",
57
59
  confirmText: "Confirm",
58
60
  cancelText: "Cancel",
59
61
  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
- p.value.includes(e) || p.value.push(e), s?.registerChildId?.(e);
62
- }, K = (e) => {
63
- p.value = p.value.filter((n) => n !== e), s?.unregisterChildId?.(e);
62
+ }), F = f(() => l.position ? l.position : l.direction === "rtl" ? "bottom-end" : "bottom-start"), G = f(() => l.nestedPosition ? l.nestedPosition : l.direction === "rtl" ? "left-start" : "right-start"), b = i(l.isOpen || !1), C = i(0), J = `dropdown-${Math.random().toString(36).substring(2, 9)}`, w = f(() => l.menuId || J), g = i([]), s = ae("dropdown-context", null), K = (e) => {
63
+ g.value.includes(e) || g.value.push(e), s?.registerChildId?.(e);
64
+ }, Q = (e) => {
65
+ g.value = g.value.filter((o) => o !== e), s?.unregisterChildId?.(e);
64
66
  };
65
- ae(() => {
66
- s?.registerChildId && s.registerChildId(`#${$.value}`);
67
- }), ie(() => {
68
- s?.unregisterChildId && s.unregisterChildId(`#${$.value}`);
67
+ ie(() => {
68
+ s?.registerChildId && s.registerChildId(`#${w.value}`);
69
+ }), se(() => {
70
+ s?.unregisterChildId && s.unregisterChildId(`#${w.value}`);
69
71
  }), P(
70
- () => o.isOpen,
72
+ () => l.isOpen,
71
73
  (e) => {
72
74
  if (e !== void 0) {
73
- if (o.disabled && e) return;
75
+ if ((l.disabled || l.readonly) && e) return;
74
76
  b.value = e;
75
77
  }
76
78
  }
77
79
  );
78
80
  const N = (e) => {
79
- if (o.disabled) {
80
- b.value = !1, v("update:isOpen", !1);
81
+ if (l.disabled || l.readonly) {
82
+ b.value = !1, h("update:isOpen", !1);
81
83
  return;
82
84
  }
83
- b.value = e, v("update:isOpen", e), v(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
85
+ b.value = e, h("update:isOpen", e), h(e ? "onOpen" : "onClose"), s?.onChildToggle?.(e);
84
86
  }, O = () => {
85
87
  N(!1);
86
- }, Q = (e) => {
88
+ }, W = (e) => {
87
89
  e ? C.value++ : C.value = Math.max(0, C.value - 1);
88
90
  };
89
- V("dropdown-context", {
91
+ R("dropdown-context", {
90
92
  close: O,
91
93
  onChildToggle: (e) => {
92
- Q(e), s?.onChildToggle?.(e);
94
+ W(e), s?.onChildToggle?.(e);
93
95
  },
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);
96
+ registerChildId: K,
97
+ unregisterChildId: Q
98
+ }), R("modal-context", null);
99
+ const I = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), $ = i(!1);
98
100
  P(
99
- w,
101
+ I,
100
102
  (e) => {
101
103
  if (e) {
102
- if (o.remote) {
103
- 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);
106
- }), S.value = n;
104
+ if (l.remote) {
105
+ const o = [...S.value];
106
+ e.forEach((n) => {
107
+ o.some((a) => a.value !== void 0 && n.value !== void 0 ? typeof a.value == "object" && a.key && n.key ? a.key === n.key && a.value[a.key] === n.value[n.key] : a.value === n.value : a.label === n.label) || o.push(n);
108
+ }), S.value = o;
107
109
  } else
108
110
  S.value = e;
109
111
  !A.value && e.length > 0 && (A.value = !0, setTimeout(() => {
110
- k.value = !0, H(T.value);
112
+ $.value = !0, H(B.value);
111
113
  }, 10));
112
114
  }
113
115
  },
114
116
  { immediate: !0 }
115
117
  );
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));
118
+ const c = f(() => {
119
+ const e = [...S.value], o = new Set(e.map((n) => n.value ?? n.label));
120
+ return k.value.forEach((n, d) => {
121
+ o.has(d) || (e.unshift(n), o.add(d));
120
122
  }), e;
121
- }), { selectedBuffer: I, isHydrating: W, hydrateSelected: H } = be({
122
- 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);
133
- return [.../* @__PURE__ */ new Set([...e, ...n, ...p.value])];
123
+ }), { selectedBuffer: k, isHydrating: X, hydrateSelected: H } = Ce({
124
+ fetchSelected: l.fetchSelected,
125
+ getAvailableOptions: () => c.value,
126
+ isReady: () => $.value
127
+ }), { getAllRecursiveIds: Y } = pe(), Z = re({
128
+ ...de(l),
129
+ options: c
130
+ }), { currentValue: B, selectedLabel: D, selectedIcon: L, selectOption: _ } = be(
131
+ Z,
132
+ h
133
+ ), ee = f(() => {
134
+ const e = l.ignoreClickOutside || [], o = Y(c.value);
135
+ return [.../* @__PURE__ */ new Set([...e, ...o, ...g.value])];
134
136
  });
135
137
  P(
136
- () => T.value,
138
+ () => B.value,
137
139
  (e) => {
138
- k.value && H(e);
140
+ $.value && H(e);
139
141
  },
140
142
  { deep: !0 }
141
143
  );
142
- const ee = (e) => {
143
- if (o.disabled || e.disabled) return;
144
- o.doubleConfirmation || !!e.confirmation ? (h.value = e, typeof e.confirmation == "object" ? r.value = {
144
+ const te = (e) => {
145
+ if (l.disabled || l.readonly || e.disabled) return;
146
+ l.doubleConfirmation || !!e.confirmation ? (y.value = e, typeof e.confirmation == "object" ? r.value = {
145
147
  title: e.confirmation.title || "Confirm Selection",
146
148
  description: e.confirmation.description || "Are you sure you want to select this option?",
147
149
  confirmText: e.confirmation.confirmText || "Confirm",
@@ -153,136 +155,138 @@ const Ce = {
153
155
  confirmText: "Confirm",
154
156
  cancelText: "Cancel",
155
157
  variant: "primary"
156
- }, y.value = !0, O()) : (L(e), o.closeOnSelect && O());
157
- }, L = (e) => {
158
- if (o.disabled || e.disabled) return;
159
- const n = e.value ?? e.label;
160
- I.value.has(n) || I.value.set(n, e);
161
- const t = Z(e);
162
- if (!o.isNested) {
158
+ }, p.value = !0, O()) : (V(e), l.closeOnSelect && O());
159
+ }, V = (e) => {
160
+ if (l.disabled || l.readonly || e.disabled) return;
161
+ const o = e.value ?? e.label;
162
+ k.value.has(o) || k.value.set(o, e);
163
+ const n = _(e);
164
+ if (!l.isNested) {
163
165
  const d = e._originalOption || e, a = d.value ?? d.label;
164
- (e._path || [d]).forEach((B) => {
165
- typeof B.onSelect == "function" && B.onSelect({
166
+ (e._path || [d]).forEach((T) => {
167
+ typeof T.onSelect == "function" && T.onSelect({
166
168
  value: a,
167
- option: B,
168
- data: u.value || [],
169
- values: t
169
+ option: T,
170
+ data: c.value || [],
171
+ values: n
170
172
  });
171
173
  });
172
174
  }
173
- }, te = () => {
174
- h.value && (L(h.value), h.value = null, y.value = !1);
175
175
  }, le = () => {
176
- h.value = null, y.value = !1;
176
+ y.value && (V(y.value), y.value = null, p.value = !1);
177
+ }, ne = () => {
178
+ y.value = null, p.value = !1;
177
179
  };
178
- return (e, n) => (x(), R("div", {
180
+ return (e, o) => (x(), z("div", {
179
181
  class: "relative inline-block text-left",
180
- style: de({ direction: l.direction })
182
+ style: ue({ direction: t.direction })
181
183
  }, [
182
- M(g(me), {
184
+ M(u(ve), {
183
185
  content: "",
184
186
  trigger: "click",
185
187
  arrow: !1,
186
- teleport: l.teleport,
187
- offset: l.offset,
188
- placement: q.value,
188
+ teleport: t.teleport,
189
+ offset: t.offset,
190
+ placement: F.value,
189
191
  isOpen: b.value,
190
192
  keepAlive: C.value > 0,
191
- menuId: $.value,
192
- ignoreClickOutside: _.value,
193
+ menuId: w.value,
194
+ ignoreClickOutside: ee.value,
193
195
  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")),
196
+ className: "dropdown " + (t.className || ""),
197
+ onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
198
+ onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
197
199
  "onUpdate:isOpen": N,
198
200
  triggerClass: "w-full",
199
201
  styles: { padding: "0" }
200
202
  }, {
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,
203
+ trigger: m(({ isOpen: n }) => [
204
+ v(e.$slots, "trigger", j(U({ selectedLabel: u(D), selectedIcon: t.showSelectedIcon ? u(L) : void 0, isOpen: n })), () => [
205
+ M(ye, {
206
+ "selected-label": u(D),
207
+ "selected-icon": t.showSelectedIcon ? u(L) : void 0,
208
+ "is-open": n,
209
+ direction: t.direction,
210
+ disabled: t.disabled,
211
+ readonly: t.readonly,
212
+ triggerProps: t.triggerProps,
209
213
  class: "w-full"
210
- }, null, 8, ["selected-label", "is-open", "direction", "disabled", "triggerProps"])
214
+ }, null, 8, ["selected-label", "selected-icon", "is-open", "direction", "disabled", "readonly", "triggerProps"])
211
215
  ])
212
216
  ]),
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, {
217
+ default: m(() => [
218
+ e.$slots?.default ? (x(), z("span", Oe, [
219
+ v(e.$slots, "default")
220
+ ])) : E("", !0),
221
+ !(t.disabled || t.readonly) && (I.value.length || c.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable) ? (x(), ce(he, {
218
222
  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,
223
+ options: I.value,
224
+ cachedOptions: c.value,
225
+ class: fe(t.className),
226
+ selected: u(B),
227
+ selectedIndex: t.selectedIndex,
228
+ maxHeight: t.maxHeight,
229
+ nestedPosition: G.value,
230
+ nestedOffset: t.nestedOffset,
231
+ selectable: t.selectable,
232
+ direction: t.direction,
233
+ layout: t.layout,
234
+ columns: t.columns,
235
+ loading: t.loading || u(X),
236
+ hasMore: t.hasMore,
237
+ searchable: t.searchable,
238
+ remote: t.remote,
239
+ debounceTime: t.debounceTime,
240
+ onSelect: te,
237
241
  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 }, [
242
+ onLoadMore: o[0] || (o[0] = (n) => e.$emit("load-more")),
243
+ onSearch: o[1] || (o[1] = (n) => e.$emit("search", n))
244
+ }, me({ _: 2 }, [
241
245
  e.$slots.menu ? {
242
246
  name: "menu",
243
- fn: f(() => [
244
- m(e.$slots, "menu")
247
+ fn: m(() => [
248
+ v(e.$slots, "menu")
245
249
  ]),
246
250
  key: "0"
247
251
  } : void 0,
248
252
  e.$slots.item ? {
249
253
  name: "item",
250
- fn: f((t) => [
251
- m(e.$slots, "item", E(j(t)))
254
+ fn: m((n) => [
255
+ v(e.$slots, "item", j(U(n)))
252
256
  ]),
253
257
  key: "1"
254
258
  } : void 0,
255
259
  e.$slots.header ? {
256
260
  name: "header",
257
- fn: f(() => [
258
- m(e.$slots, "header")
261
+ fn: m(() => [
262
+ v(e.$slots, "header")
259
263
  ]),
260
264
  key: "2"
261
265
  } : void 0,
262
266
  e.$slots.footer ? {
263
267
  name: "footer",
264
- fn: f(() => [
265
- m(e.$slots, "footer")
268
+ fn: m(() => [
269
+ v(e.$slots, "footer")
266
270
  ]),
267
271
  key: "3"
268
272
  } : void 0
269
- ]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : z("", !0)
273
+ ]), 1032, ["options", "cachedOptions", "class", "selected", "selectedIndex", "maxHeight", "nestedPosition", "nestedOffset", "selectable", "direction", "layout", "columns", "loading", "hasMore", "searchable", "remote", "debounceTime"])) : E("", !0)
270
274
  ]),
271
275
  _: 3
272
276
  }, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
273
- M(pe, {
274
- show: y.value,
277
+ M(ge, {
278
+ show: p.value,
275
279
  title: r.value.title,
276
280
  description: r.value.description,
277
281
  "confirm-text": r.value.confirmText,
278
282
  "cancel-text": r.value.cancelText,
279
283
  variant: r.value.variant,
280
- onConfirm: te,
281
- onCancel: le
284
+ onConfirm: le,
285
+ onCancel: ne
282
286
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text", "variant"])
283
287
  ], 4));
284
288
  }
285
289
  });
286
290
  export {
287
- Me as default
291
+ Ne as default
288
292
  };
@@ -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
  };
@@ -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
  };
@@ -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",