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,4 +1,4 @@
1
- import { defineComponent as $, ref as p, computed as v, openBlock as t, createElementBlock as a, normalizeClass as i, createElementVNode as c, createBlock as f, createCommentVNode as b, toDisplayString as h, renderSlot as w, resolveDynamicComponent as L, Fragment as m, createVNode as B } from "vue";
1
+ import { defineComponent as M, ref as $, computed as v, openBlock as t, createElementBlock as a, normalizeClass as s, createElementVNode as c, createBlock as f, createCommentVNode as x, toDisplayString as b, renderSlot as w, resolveDynamicComponent as L, Fragment as m, createVNode as p } from "vue";
2
2
  import g from "../Icon.vue.js";
3
3
  import k from "../Price/Price.vue.js";
4
4
  import { $t as j } from "../../utils/i18n.js";
@@ -23,7 +23,7 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
23
23
  key: 1,
24
24
  class: "text-sm text-gray-600 tracking-widest select-none",
25
25
  "aria-hidden": "true"
26
- }, se = ["aria-label"], ie = ["src", "alt"], oe = ["innerHTML"], ye = /* @__PURE__ */ $({
26
+ }, ie = ["aria-label"], se = ["src", "alt"], oe = ["innerHTML"], ye = /* @__PURE__ */ M({
27
27
  __name: "ListFieldRow",
28
28
  props: {
29
29
  field: {},
@@ -38,7 +38,7 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
38
38
  autoLineByLineThreshold: { default: 50 }
39
39
  },
40
40
  setup(e) {
41
- const l = e, s = p(!1), o = v(() => I(l.field.key, l.data)), r = v(() => {
41
+ const l = e, i = $(!1), o = v(() => I(l.field.key, l.data)), r = v(() => {
42
42
  const n = o.value;
43
43
  if (l.field.format)
44
44
  return l.field.format(n, l.data);
@@ -71,12 +71,12 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
71
71
  } else
72
72
  n.push(l.field.class);
73
73
  return n.join(" ");
74
- }), x = v(() => l.field.type === "image"), T = v(() => l.variant === "striped" && l.index % 2 !== 0), S = v(() => l.variant === "stacked"), H = v(() => l.field.lineByLine ? !0 : l.autoLineByLineThreshold > 0 ? String(r.value ?? "").length > l.autoLineByLineThreshold : !1), M = v(() => l.stackedBorderStyle === "divider" && l.stackedColIndex !== 0 ? "border-l border-border pl-4 pr-3.5 py-2" : "px-3.5 py-2");
75
- return (n, u) => S.value ? (t(), a("div", {
74
+ }), h = v(() => l.field.type === "image"), B = v(() => l.variant === "striped" && l.index % 2 !== 0), C = v(() => l.variant === "stacked"), S = v(() => l.field.lineByLineLayout === "inline" ? !1 : l.field.lineByLineLayout === "block" || l.field.lineByLine ? !0 : l.autoLineByLineThreshold > 0 ? String(r.value ?? "").length > l.autoLineByLineThreshold : !1), H = v(() => l.stackedBorderStyle === "divider" && l.stackedColIndex !== 0 ? "border-l border-border pl-4 pr-3.5 py-2" : "px-3.5 py-2");
75
+ return (n, u) => C.value ? (t(), a("div", {
76
76
  key: 0,
77
- class: i([
77
+ class: s([
78
78
  "list-field-row list-field-row--stacked flex flex-col gap-0.5 min-w-0",
79
- M.value
79
+ H.value
80
80
  ]),
81
81
  role: "row"
82
82
  }, [
@@ -85,8 +85,8 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
85
85
  key: 0,
86
86
  icon: e.field.icon,
87
87
  class: "w-3 h-3 text-muted-foreground shrink-0"
88
- }, null, 8, ["icon"])) : b("", !0),
89
- c("span", F, h(y.value), 1)
88
+ }, null, 8, ["icon"])) : x("", !0),
89
+ c("span", F, b(y.value), 1)
90
90
  ]),
91
91
  c("div", O, [
92
92
  n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
@@ -99,29 +99,29 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
99
99
  data: e.data,
100
100
  value: o.value
101
101
  }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", z, [
102
- s.value ? (t(), a(m, { key: 0 }, [
102
+ i.value ? (t(), a(m, { key: 0 }, [
103
103
  e.field.type === "price" ? (t(), f(k, {
104
104
  key: 0,
105
105
  value: o.value,
106
- class: i(["text-sm font-semibold text-foreground break-words leading-snug", d.value])
106
+ class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value])
107
107
  }, null, 8, ["value", "class"])) : (t(), a("span", {
108
108
  key: 1,
109
- class: i(["text-sm font-semibold text-foreground break-words leading-snug", d.value]),
109
+ class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value]),
110
110
  innerHTML: r.value
111
111
  }, null, 10, R))
112
112
  ], 64)) : (t(), a("span", Y, " •••••••• ")),
113
113
  c("button", {
114
114
  type: "button",
115
115
  class: "shrink-0 p-0.5 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
116
- "aria-label": s.value ? "Hide value" : "Show value",
117
- onClick: u[0] || (u[0] = (C) => s.value = !s.value)
116
+ "aria-label": i.value ? "Hide value" : "Show value",
117
+ onClick: u[0] || (u[0] = (T) => i.value = !i.value)
118
118
  }, [
119
- B(g, {
120
- icon: s.value ? "lucide:eye-off" : "lucide:eye",
119
+ p(g, {
120
+ icon: i.value ? "lucide:eye-off" : "lucide:eye",
121
121
  class: "w-3 h-3"
122
122
  }, null, 8, ["icon"])
123
123
  ], 8, q)
124
- ])) : x.value ? (t(), a("img", {
124
+ ])) : h.value ? (t(), a("img", {
125
125
  key: 3,
126
126
  src: r.value,
127
127
  alt: y.value,
@@ -130,19 +130,19 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
130
130
  e.field.type === "price" ? (t(), f(k, {
131
131
  key: 0,
132
132
  value: o.value,
133
- class: i(["text-sm font-semibold text-foreground break-words leading-snug", d.value])
133
+ class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value])
134
134
  }, null, 8, ["value", "class"])) : (t(), a("span", {
135
135
  key: 1,
136
- class: i(["text-sm font-semibold text-foreground break-words leading-snug", d.value]),
136
+ class: s(["text-sm font-semibold text-foreground wrap-break-word leading-snug", d.value]),
137
137
  innerHTML: r.value
138
138
  }, null, 10, G))
139
139
  ], 64))
140
140
  ])
141
- ], 2)) : H.value ? (t(), a("div", {
141
+ ], 2)) : S.value ? (t(), a("div", {
142
142
  key: 1,
143
- class: i(["list-field-row list-field-row--block flex flex-col gap-y-1 px-3 py-2.5 transition-colors w-full", [
143
+ class: s(["list-field-row list-field-row--block flex flex-col gap-y-1 px-3 py-2.5 transition-colors w-full", [
144
144
  e.showBorderBottom && !e.isLast ? "border-b border-border" : "",
145
- T.value ? "bg-muted/40" : "",
145
+ B.value ? "bg-muted/40" : "",
146
146
  e.variant === "compact" ? "py-1.5!" : "",
147
147
  e.variant === "minimal" ? "px-0!" : ""
148
148
  ]]),
@@ -153,8 +153,8 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
153
153
  key: 0,
154
154
  icon: e.field.icon,
155
155
  class: "w-3.5 h-3.5 text-gray-800 shrink-0"
156
- }, null, 8, ["icon"])) : b("", !0),
157
- c("span", K, h(y.value) + h(e.showColon ? ":" : ""), 1)
156
+ }, null, 8, ["icon"])) : x("", !0),
157
+ c("span", K, b(y.value) + b(e.showColon ? ":" : ""), 1)
158
158
  ]),
159
159
  c("div", P, [
160
160
  n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
@@ -167,29 +167,29 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
167
167
  data: e.data,
168
168
  value: o.value
169
169
  }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a("div", Q, [
170
- s.value ? (t(), a(m, { key: 0 }, [
170
+ i.value ? (t(), a(m, { key: 0 }, [
171
171
  e.field.type === "price" ? (t(), f(k, {
172
172
  key: 0,
173
173
  value: o.value,
174
- class: i(["text-sm text-gray-600 break-words leading-snug", d.value])
174
+ class: s(["text-sm text-gray-600 wrap-break-word leading-snug", d.value])
175
175
  }, null, 8, ["value", "class"])) : (t(), a("span", {
176
176
  key: 1,
177
- class: i(["text-sm text-gray-600 break-words leading-snug", d.value]),
177
+ class: s(["text-sm text-gray-600 wrap-break-word leading-snug", d.value]),
178
178
  innerHTML: r.value
179
179
  }, null, 10, U))
180
180
  ], 64)) : (t(), a("span", W, " •••••••• ")),
181
181
  c("button", {
182
182
  type: "button",
183
183
  class: "shrink-0 p-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
184
- "aria-label": s.value ? "Hide value" : "Show value",
185
- onClick: u[1] || (u[1] = (C) => s.value = !s.value)
184
+ "aria-label": i.value ? "Hide value" : "Show value",
185
+ onClick: u[1] || (u[1] = (T) => i.value = !i.value)
186
186
  }, [
187
- B(g, {
188
- icon: s.value ? "lucide:eye-off" : "lucide:eye",
187
+ p(g, {
188
+ icon: i.value ? "lucide:eye-off" : "lucide:eye",
189
189
  class: "w-3.5 h-3.5"
190
190
  }, null, 8, ["icon"])
191
191
  ], 8, X)
192
- ])) : x.value ? (t(), a("img", {
192
+ ])) : h.value ? (t(), a("img", {
193
193
  key: 3,
194
194
  src: r.value,
195
195
  alt: y.value,
@@ -198,19 +198,19 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
198
198
  e.field.type === "price" ? (t(), f(k, {
199
199
  key: 0,
200
200
  value: o.value,
201
- class: i(["text-sm text-gray-900 break-words leading-snug", d.value])
201
+ class: s(["text-sm text-gray-900 wrap-break-word leading-snug", d.value])
202
202
  }, null, 8, ["value", "class"])) : (t(), a("span", {
203
203
  key: 1,
204
- class: i(["text-sm text-gray-900 break-words leading-snug", d.value]),
204
+ class: s(["text-sm text-gray-900 wrap-break-word leading-snug", d.value]),
205
205
  innerHTML: r.value
206
206
  }, null, 10, _))
207
207
  ], 64))
208
208
  ])
209
209
  ], 2)) : (t(), a("div", {
210
210
  key: 2,
211
- class: i(["list-field-row flex justify-between gap-3 px-3 py-2.5 transition-colors", [
211
+ class: s(["list-field-row flex justify-between gap-3 px-3 py-2.5 transition-colors", [
212
212
  e.showBorderBottom && !e.isLast ? "border-b border-border" : "",
213
- T.value ? "bg-muted/40" : "",
213
+ B.value ? "bg-muted/40" : "",
214
214
  e.variant === "compact" ? "py-1.5!" : "",
215
215
  e.variant === "minimal" ? "px-0!" : ""
216
216
  ]]),
@@ -221,8 +221,8 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
221
221
  key: 0,
222
222
  icon: e.field.icon,
223
223
  class: "w-3.5 h-3.5 text-gray-800 shrink-0"
224
- }, null, 8, ["icon"])) : b("", !0),
225
- c("span", te, h(y.value) + h(e.showColon ? ":" : ""), 1)
224
+ }, null, 8, ["icon"])) : x("", !0),
225
+ c("span", te, b(y.value) + b(e.showColon ? ":" : ""), 1)
226
226
  ]),
227
227
  c("div", le, [
228
228
  n.$slots[e.field.key] ? w(n.$slots, e.field.key, {
@@ -235,41 +235,41 @@ const E = { class: "flex items-center gap-2 min-w-0" }, F = { class: "text-xs fo
235
235
  data: e.data,
236
236
  value: o.value
237
237
  }, null, 8, ["data", "value"])) : e.field.isSensitive ? (t(), a(m, { key: 2 }, [
238
- s.value ? (t(), a(m, { key: 0 }, [
238
+ i.value ? (t(), a(m, { key: 0 }, [
239
239
  e.field.type === "price" ? (t(), f(k, {
240
240
  key: 0,
241
241
  value: o.value,
242
- class: i(["text-sm text-gray-600 text-right break-words", d.value])
242
+ class: s(["text-sm text-gray-600 text-right wrap-break-word", d.value])
243
243
  }, null, 8, ["value", "class"])) : (t(), a("span", {
244
244
  key: 1,
245
- class: i(["text-sm text-gray-600 text-right break-words", d.value]),
245
+ class: s(["text-sm text-gray-600 text-right wrap-break-word", d.value]),
246
246
  innerHTML: r.value
247
247
  }, null, 10, ae))
248
248
  ], 64)) : (t(), a("span", ne, " •••••••• ")),
249
249
  c("button", {
250
250
  type: "button",
251
251
  class: "shrink-0 p-1 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary/50",
252
- "aria-label": s.value ? "Hide value" : "Show value",
253
- onClick: u[2] || (u[2] = (C) => s.value = !s.value)
252
+ "aria-label": i.value ? "Hide value" : "Show value",
253
+ onClick: u[2] || (u[2] = (T) => i.value = !i.value)
254
254
  }, [
255
- B(g, {
256
- icon: s.value ? "lucide:eye-off" : "lucide:eye",
255
+ p(g, {
256
+ icon: i.value ? "lucide:eye-off" : "lucide:eye",
257
257
  class: "w-3.5 h-3.5"
258
258
  }, null, 8, ["icon"])
259
- ], 8, se)
260
- ], 64)) : x.value ? (t(), a("img", {
259
+ ], 8, ie)
260
+ ], 64)) : h.value ? (t(), a("img", {
261
261
  key: 3,
262
262
  src: r.value,
263
263
  alt: y.value,
264
264
  class: "w-8 h-8 rounded-full object-cover border border-border"
265
- }, null, 8, ie)) : (t(), a(m, { key: 4 }, [
265
+ }, null, 8, se)) : (t(), a(m, { key: 4 }, [
266
266
  e.field.type === "price" ? (t(), f(k, {
267
267
  key: 0,
268
268
  value: o.value,
269
- class: i(["text-sm text-gray-900 text-right break-words leading-snug", d.value])
269
+ class: s(["text-sm text-gray-900 text-right wrap-break-word leading-snug", d.value])
270
270
  }, null, 8, ["value", "class"])) : (t(), a("span", {
271
271
  key: 1,
272
- class: i(["text-sm text-gray-900 text-right break-words leading-snug", d.value]),
272
+ class: s(["text-sm text-gray-900 text-right wrap-break-word leading-snug", d.value]),
273
273
  innerHTML: r.value
274
274
  }, null, 10, oe))
275
275
  ], 64))
@@ -16,8 +16,8 @@ declare function __VLS_template(): {
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<MasonryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MasonryProps> & Readonly<{}>, {
18
18
  tag: string;
19
- itemKey: string;
20
19
  gap: number;
20
+ itemKey: string;
21
21
  cols: number | Record<string | number, number>;
22
22
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
23
23
  containerRef: unknown;
@@ -1,7 +1,7 @@
1
1
  import o from "./Modal.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7c958115"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-350b61e5"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as P, ref as c, inject as R, computed as h, markRaw as V, watch as T, provide as W, nextTick as K, onMounted as A, onUnmounted as U, openBlock as s, createElementBlock as r, Fragment as q, mergeProps as B, withModifiers as I, renderSlot as m, createCommentVNode as a, createBlock as S, Teleport as G, normalizeClass as i, createElementVNode as b, toDisplayString as F, createVNode as H, resolveDynamicComponent as J } from "vue";
2
- import L from "./Button.vue.js";
1
+ import { defineComponent as P, ref as f, inject as R, computed as h, markRaw as V, watch as T, provide as W, nextTick as K, onMounted as L, onUnmounted as A, openBlock as s, createElementBlock as d, Fragment as U, mergeProps as B, withModifiers as S, renderSlot as v, createCommentVNode as n, createBlock as I, Teleport as q, normalizeClass as i, createElementVNode as b, toDisplayString as z, createVNode as G, resolveDynamicComponent as H } from "vue";
2
+ import J from "./Button.vue.js";
3
3
  import { useKeyStroke as Q } from "../composables/useKeyStroke.js";
4
- import { $t as O } from "../utils/i18n.js";
5
- const X = {
4
+ import { $t as F } from "../utils/i18n.js";
5
+ const X = ["data-testid"], Y = ["data-testid"], Z = {
6
6
  key: 0,
7
7
  class: "flex-none flex flex-col space-y-1.5 pb-0 border-b border-border/90"
8
- }, Y = { class: "text-lg font-semibold leading-none tracking-tight" }, Z = {
8
+ }, _ = { class: "text-lg font-semibold leading-none tracking-tight" }, ee = {
9
9
  key: 0,
10
10
  class: "text-sm text-muted-foreground mb-3.5"
11
- }, le = /* @__PURE__ */ P({
11
+ }, ae = /* @__PURE__ */ P({
12
12
  inheritAttrs: !1,
13
13
  __name: "Modal",
14
14
  props: {
@@ -28,107 +28,113 @@ const X = {
28
28
  bodyProps: {}
29
29
  },
30
30
  emits: ["close", "update:show", "onOpen"],
31
- setup(t, { emit: j }) {
32
- const o = t, d = j, l = c(o.show), g = c(!1), v = c(!1), k = c(null);
33
- let u = null;
34
- const y = c(!1), n = R("dropdown-context", null), C = h(() => o.body ? V(o.body) : void 0);
31
+ setup(t, { emit: O }) {
32
+ const o = t, u = O, l = f(o.show), k = f(!1), g = f(!1), C = f(null);
33
+ let c = null;
34
+ const y = f(!1), a = R("dropdown-context", null), w = h(() => o.body ? V(o.body) : void 0);
35
35
  T(
36
36
  () => o.show,
37
37
  (e) => {
38
- l.value = e, e && (d("onOpen"), n?.close());
38
+ l.value = e, e && (u("onOpen"), a?.close());
39
39
  }
40
40
  );
41
- const z = () => {
42
- l.value = !0, n?.close();
41
+ const j = () => {
42
+ l.value = !0, a?.close();
43
43
  }, D = (e) => {
44
- g.value = e;
44
+ k.value = e;
45
45
  }, E = (e) => {
46
46
  y.value = e;
47
- }, f = () => {
48
- if (g.value) {
49
- v.value = !0, u && clearTimeout(u), u = setTimeout(() => {
50
- v.value = !1;
47
+ }, m = () => {
48
+ if (k.value) {
49
+ g.value = !0, c && clearTimeout(c), c = setTimeout(() => {
50
+ g.value = !1;
51
51
  }, 1e3);
52
52
  return;
53
53
  }
54
- l.value = !1, d("update:show", !1), d("close");
54
+ l.value = !1, u("update:show", !1), u("close");
55
55
  }, p = () => {
56
- l.value = !1, d("update:show", !1), d("close");
56
+ l.value = !1, u("update:show", !1), u("close");
57
57
  };
58
- W("modal-context", { close: f, setSubmitting: D, registerFormFooter: E });
58
+ W("modal-context", { close: m, setSubmitting: D, registerFormFooter: E });
59
59
  const M = () => {
60
- o.closeOutside && f();
60
+ o.closeOutside && m();
61
61
  }, { onKeyStroke: N } = Q();
62
- N("Escape", f), T(l, async (e) => {
63
- e ? (n?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await K(), k.value?.focus()) : (document.body.style.overflow = "", n?.onChildToggle?.(!1), y.value = !1);
62
+ N("Escape", m), T(l, async (e) => {
63
+ e ? (a?.onChildToggle?.(!0), document.body.style.overflow = "hidden", await K(), C.value?.focus()) : (document.body.style.overflow = "", a?.onChildToggle?.(!1), y.value = !1);
64
+ }), L(() => {
65
+ l.value && a?.onChildToggle?.(!0);
64
66
  }), A(() => {
65
- l.value && n?.onChildToggle?.(!0);
66
- }), U(() => {
67
- l.value && n?.onChildToggle?.(!1), document.body.style.overflow = "", u && clearTimeout(u);
67
+ l.value && a?.onChildToggle?.(!1), document.body.style.overflow = "", c && clearTimeout(c);
68
68
  });
69
- const x = h(() => o.titleI18n ? O(o.titleI18n) : o.title), w = h(
70
- () => o.descriptionI18n ? O(o.descriptionI18n) : o.description
69
+ const r = h(() => o.titleI18n ? F(o.titleI18n) : o.title), x = h(
70
+ () => o.descriptionI18n ? F(o.descriptionI18n) : o.description
71
71
  );
72
- return (e, $) => (s(), r(q, null, [
73
- e.$slots?.trigger || e.$slots?.default ? (s(), r("span", B({
72
+ return (e, $) => (s(), d(U, null, [
73
+ e.$slots?.trigger || e.$slots?.default ? (s(), d("span", B({
74
74
  key: 0,
75
- onClick: I(z, ["stop"]),
75
+ onClick: S(j, ["stop"]),
76
76
  class: `${t.triggerClass}`
77
- }, e.$attrs), [
78
- m(e.$slots, "trigger", {}, () => [
79
- t.body ? m(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
77
+ }, e.$attrs, {
78
+ "data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : r.value ? `modal-trigger-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal-trigger"
79
+ }), [
80
+ v(e.$slots, "trigger", {}, () => [
81
+ t.body ? v(e.$slots, "default", { key: 0 }, void 0, !0) : n("", !0)
80
82
  ], !0)
81
- ], 16)) : a("", !0),
82
- (s(), S(G, { to: "body" }, [
83
- l.value ? (s(), r("div", {
83
+ ], 16, X)) : n("", !0),
84
+ (s(), I(q, { to: "body" }, [
85
+ l.value ? (s(), d("div", {
84
86
  key: 0,
85
87
  class: i(["fixed inset-0 z-50 flex items-center justify-center p-4 v-modal-overlay", t.backdrop ? "v-modal-backdrop" : ""]),
86
88
  onClick: M
87
89
  }, [
88
90
  b("div", {
89
91
  ref_key: "modalRef",
90
- ref: k,
92
+ ref: C,
91
93
  tabindex: "-1",
94
+ role: "dialog",
95
+ "aria-modal": "true",
92
96
  class: i(["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]]),
93
- onClick: $[0] || ($[0] = I(() => {
97
+ "data-testid": e.$attrs["data-testid"] || (r.value ? `modal-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "modal"),
98
+ onClick: $[0] || ($[0] = S(() => {
94
99
  }, ["stop"]))
95
100
  }, [
96
- x.value ? (s(), r("div", X, [
101
+ r.value ? (s(), d("div", Z, [
97
102
  b("div", {
98
103
  class: i(["flex items-center justify-between py-2 px-4 rounded-t-md", t.headerClass])
99
104
  }, [
100
- b("h3", Y, F(x.value), 1),
101
- H(L, {
105
+ b("h3", _, z(r.value), 1),
106
+ G(J, {
102
107
  rounded: "full",
103
108
  size: "sm",
104
109
  icon: "lucide:x",
105
110
  variant: "ghost",
106
- class: i(["hover:bg-gray-250/25!", { "blink-bg": v.value }]),
107
- onClick: f
111
+ class: i(["hover:bg-gray-250/25!", { "blink-bg": g.value }]),
112
+ "data-testid": "modal-close-btn",
113
+ onClick: m
108
114
  }, null, 8, ["class"])
109
115
  ], 2)
110
- ])) : a("", !0),
116
+ ])) : n("", !0),
111
117
  b("div", {
112
118
  class: i(["flex-1 overflow-y-auto px-4 pt-4 min-h-0 scrollbar-thin scrollbar-stable", [y.value ? "pb-0" : "pb-3.5", t.bodyClass]])
113
119
  }, [
114
- w.value ? (s(), r("p", Z, F(w.value), 1)) : a("", !0),
115
- C.value ? (s(), S(J(C.value), B({ key: 1 }, { ...t.bodyProps, ...e.$attrs }, { close: p }), null, 16)) : m(e.$slots, "default", {
120
+ x.value ? (s(), d("p", ee, z(x.value), 1)) : n("", !0),
121
+ w.value ? (s(), I(H(w.value), B({ key: 1 }, { ...t.bodyProps, ...e.$attrs }, { close: p }), null, 16)) : v(e.$slots, "default", {
116
122
  key: 2,
117
123
  close: p
118
124
  }, void 0, !0)
119
125
  ], 2),
120
- e.$slots.footer ? (s(), r("div", {
126
+ e.$slots.footer ? (s(), d("div", {
121
127
  key: 1,
122
128
  class: i([t.footerClass, "flex-none flex items-center px-4 py-3 border-t border-border/75 rounded-b-xl bg-body"])
123
129
  }, [
124
- m(e.$slots, "footer", { close: p }, void 0, !0)
125
- ], 2)) : a("", !0)
126
- ], 2)
127
- ], 2)) : a("", !0)
130
+ v(e.$slots, "footer", { close: p }, void 0, !0)
131
+ ], 2)) : n("", !0)
132
+ ], 10, Y)
133
+ ], 2)) : n("", !0)
128
134
  ]))
129
135
  ], 64));
130
136
  }
131
137
  });
132
138
  export {
133
- le as default
139
+ ae as default
134
140
  };
@@ -33,8 +33,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
33
33
  variant: "default" | "outline" | "solid" | "floating" | string;
34
34
  size: "sm" | "md" | "lg";
35
35
  rounded: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | string;
36
- disabled: boolean;
37
36
  loading: boolean;
37
+ disabled: boolean;
38
38
  modelValue: any[];
39
39
  options: (IDropdownOption | string | number)[];
40
40
  layout: "default" | "grouped";