vlite3 1.1.2 → 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 (87) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
  2. package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
  3. package/components/Avatar.vue.js +1 -1
  4. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  5. package/components/Button.vue.js +30 -28
  6. package/components/Carousel/Carousel.vue.d.ts +2 -2
  7. package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
  8. package/components/CategoryManager/CategoryManager.vue.js +137 -118
  9. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  10. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  11. package/components/Chat/ChatBubble.vue.js +22 -22
  12. package/components/CheckBox.vue.js +29 -28
  13. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  14. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  15. package/components/ConfirmationModal.vue.js +30 -28
  16. package/components/CopyButton.vue.d.ts +50 -0
  17. package/components/CopyButton.vue.js +69 -0
  18. package/components/CopyButton.vue2.js +4 -0
  19. package/components/DataTable/DataTable.vue.js +44 -44
  20. package/components/DatePicker.vue.js +41 -35
  21. package/components/DateRangePicker.vue.js +18 -17
  22. package/components/Dropdown/Dropdown.vue.d.ts +3 -0
  23. package/components/Dropdown/Dropdown.vue.js +117 -115
  24. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  25. package/components/Dropdown/DropdownItem.vue.js +21 -20
  26. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  27. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  28. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  29. package/components/Dropdown/DropdownTrigger.vue.js +10 -6
  30. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  31. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  32. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  33. package/components/FilePicker/FilePicker.vue.js +93 -90
  34. package/components/Form/CustomFields.vue.js +2 -2
  35. package/components/Form/Form.vue.js +2 -2
  36. package/components/Form/Form.vue2.js +68 -64
  37. package/components/Form/FormField.vue.js +204 -148
  38. package/components/Form/FormFields.vue.js +2 -2
  39. package/components/Form/FormFields.vue2.js +28 -27
  40. package/components/Form/types.d.ts +2 -2
  41. package/components/Form/utils/form.utils.d.ts +3 -3
  42. package/components/Form/utils/form.utils.js +37 -37
  43. package/components/Input.vue.js +64 -62
  44. package/components/Invoice/Invoice.vue.js +9 -7
  45. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  46. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  47. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  48. package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
  49. package/components/Invoice/InvoiceVariant1.vue.js +194 -207
  50. package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
  51. package/components/Invoice/InvoiceVariant2.vue.js +109 -118
  52. package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
  53. package/components/Invoice/InvoiceVariant3.vue.js +157 -167
  54. package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
  55. package/components/Invoice/InvoiceVariant4.vue.js +192 -202
  56. package/components/Invoice/index.d.ts +1 -0
  57. package/components/Invoice/types.d.ts +22 -0
  58. package/components/Masonry/Masonry.vue.d.ts +1 -1
  59. package/components/Modal.vue.js +1 -1
  60. package/components/Modal.vue2.js +60 -54
  61. package/components/MultiSelect/MultiSelect.vue.js +47 -46
  62. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  63. package/components/NavbarCommandPalette.vue.js +1 -1
  64. package/components/NumberInput.vue.js +2 -2
  65. package/components/NumberInput.vue2.js +121 -116
  66. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  67. package/components/SidePanel.vue.js +2 -2
  68. package/components/SidePanel.vue2.js +58 -52
  69. package/components/Stats/StatItem.vue.js +96 -91
  70. package/components/Stats/types.d.ts +1 -0
  71. package/components/Switch.vue.d.ts +6 -1
  72. package/components/Switch.vue.js +61 -24
  73. package/components/TagInput/TagInput.vue.d.ts +187 -0
  74. package/components/TagInput/TagInput.vue.js +113 -0
  75. package/components/TagInput/TagInput.vue2.js +4 -0
  76. package/components/TagInput/index.d.ts +1 -0
  77. package/components/Textarea.vue.js +19 -18
  78. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  79. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  80. package/core/config.d.ts +36 -0
  81. package/index.d.ts +2 -0
  82. package/index.js +130 -124
  83. package/package.json +1 -1
  84. package/style.css +616 -1
  85. package/types/button.d.ts +1 -1
  86. package/types/styles.d.ts +1 -0
  87. package/utils/functions.js +9 -9
@@ -1,176 +1,181 @@
1
- import { defineComponent as F, inject as K, computed as p, resolveComponent as R, openBlock as r, createBlock as x, unref as l, withCtx as T, createElementBlock as s, Fragment as A, renderList as L, isMemoSame as O, createElementVNode as f, normalizeClass as u, createVNode as i, createCommentVNode as c, withDirectives as k, withModifiers as P, withKeys as w, vModelText as U, toDisplayString as Q, vShow as q } from "vue";
2
- import { VueDraggable as G } from "vue-draggable-plus";
1
+ import { defineComponent as K, inject as R, computed as g, resolveComponent as T, openBlock as r, createBlock as f, unref as l, withCtx as A, createElementBlock as d, Fragment as L, renderList as O, isMemoSame as P, createElementVNode as y, normalizeClass as u, createVNode as i, createCommentVNode as c, withDirectives as k, withModifiers as Q, withKeys as w, vModelText as z, toDisplayString as q, vShow as G } from "vue";
2
+ import { VueDraggable as H } from "vue-draggable-plus";
3
3
  import C from "../Icon.vue.js";
4
- import g from "../Button.vue.js";
5
- import N from "../IconPicker.vue.js";
6
- const H = { class: "flex items-center gap-px overflow-hidden flex-1" }, J = ["onClick"], W = { class: "flex items-center gap-1.5 overflow-hidden flex-1 w-full" }, X = {
4
+ import m from "../Button.vue.js";
5
+ import E from "../IconPicker.vue.js";
6
+ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["onClick"], X = { class: "flex items-center gap-1.5 overflow-hidden flex-1 w-full" }, Y = {
7
7
  key: 0,
8
8
  class: "drag-handle cursor-grab active:cursor-grabbing text-muted hover:text-foreground transition-colors p-0.5 shrink-0"
9
- }, Y = ["onUpdate:modelValue", "onChange"], Z = {
9
+ }, Z = ["onUpdate:modelValue", "onChange"], ee = {
10
10
  key: 0,
11
11
  class: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0 bg-background/80 px-1 rounded ml-2"
12
- }, ee = {
12
+ }, te = {
13
13
  key: 0,
14
14
  class: "ml-6 pl-3 border-l border-border mt-1.5 flex flex-col relative"
15
- }, te = {
15
+ }, ne = {
16
16
  key: 1,
17
17
  class: "flex items-center gap-1.5 py-1.5 px-2 bg-background border border-border shadow-sm rounded-lg w-full mb-1.5"
18
- }, de = /* @__PURE__ */ F({
18
+ }, ue = /* @__PURE__ */ K({
19
19
  __name: "CategoryNode",
20
20
  props: {
21
21
  modelValue: {},
22
22
  level: { default: 0 }
23
23
  },
24
- emits: ["update:modelValue", "change"],
25
- setup(V, { emit: D }) {
26
- const S = V, y = D, t = K("categoryManager"), b = p({
24
+ emits: ["update:modelValue", "change", "dragEnd"],
25
+ setup(V, { emit: U }) {
26
+ const S = V, p = U, n = R("categoryManager"), b = g({
27
27
  get: () => S.modelValue,
28
- set: (d) => y("update:modelValue", d)
29
- }), M = (d, n) => {
30
- n.children = d, y("change");
31
- }, I = () => y("change"), v = p(() => t?.readonly.value || !1), a = p(() => t?.size.value || "md"), j = p(() => a.value === "sm" ? "p-1 md:p-1.5" : a.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"), $ = p(() => {
32
- const n = S.level === 0 ? "font-semibold" : "font-medium";
33
- return a.value === "sm" ? `text-xs ${n} text-foreground` : a.value === "lg" ? `-text-fs-1 ${n} text-foreground` : `text-sm ${n} text-foreground`;
34
- }), m = p(() => a.value === "sm" ? "w-3.5 h-3.5" : a.value === "lg" ? "w-4.5 h-4.5" : "w-4 h-4"), B = {
35
- mounted: (d) => {
36
- setTimeout(() => d.focus(), 10);
28
+ set: (s) => p("update:modelValue", s)
29
+ }), D = (s, t) => {
30
+ t.children = s, p("change");
31
+ }, N = () => p("change"), M = (s) => {
32
+ const t = s.item?.dataset?.id;
33
+ t && p("dragEnd", t);
34
+ }, v = g(() => n?.readonly.value || !1), a = g(() => n?.size.value || "md"), j = g(() => a.value === "sm" ? "p-1 md:p-1.5" : a.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"), I = g(() => {
35
+ const t = S.level === 0 ? "font-semibold" : "font-medium";
36
+ return a.value === "sm" ? `text-xs ${t} text-foreground` : a.value === "lg" ? `-text-fs-1 ${t} text-foreground` : `text-sm ${t} text-foreground`;
37
+ }), h = g(() => a.value === "sm" ? "w-3.5 h-3.5" : a.value === "lg" ? "w-4.5 h-4.5" : "w-4 h-4"), B = {
38
+ mounted: (s) => {
39
+ setTimeout(() => s.focus(), 10);
37
40
  }
38
41
  };
39
- return (d, n) => {
40
- const E = R("CategoryNode", !0);
41
- return r(), x(l(G), {
42
+ return (s, t) => {
43
+ const F = T("CategoryNode", !0);
44
+ return r(), f(l(H), {
42
45
  modelValue: b.value,
43
- "onUpdate:modelValue": n[10] || (n[10] = (e) => b.value = e),
46
+ "onUpdate:modelValue": t[11] || (t[11] = (e) => b.value = e),
44
47
  group: "category-manager",
45
48
  animation: 150,
46
49
  handle: ".drag-handle",
47
50
  "ghost-class": "opacity-50",
48
51
  disabled: v.value,
49
52
  class: "min-h-[2px]",
50
- onChange: I
53
+ onEnd: M
51
54
  }, {
52
- default: T(() => [
53
- (r(!0), s(A, null, L(b.value, (e, ne, le, h) => {
54
- const _ = [
55
+ default: A(() => [
56
+ (r(!0), d(L, null, O(b.value, (e, oe, le, x) => {
57
+ const $ = [
55
58
  e.id,
56
59
  e.title,
57
60
  e.icon,
58
- e.children?.length,
59
- l(t)?.expandedIds.value.has(e.id),
60
- l(t)?.inlineState.value.targetId === e.id,
61
- l(t)?.inlineState.value.mode,
61
+ e.children?.map((o) => o.id).join(","),
62
+ l(n)?.expandedIds.value.has(e.id),
63
+ l(n)?.inlineState.value.targetId === e.id,
64
+ l(n)?.inlineState.value.mode,
62
65
  v.value,
63
66
  a.value
64
67
  ];
65
- if (h && h.key === e.id && O(h, _)) return h;
66
- const z = (r(), s("div", {
68
+ if (x && x.key === e.id && P(x, $)) return x;
69
+ const _ = (r(), d("div", {
67
70
  key: e.id,
71
+ "data-id": e.id,
68
72
  class: "mb-1.5 flex flex-col"
69
73
  }, [
70
- f("div", {
74
+ y("div", {
71
75
  class: u([
72
76
  "group flex items-center justify-between rounded-lg transition-colors bg-body! border border-border ",
73
77
  j.value
74
78
  ])
75
79
  }, [
76
- f("div", H, [
77
- e.children && e.children.length > 0 ? (r(), s("button", {
80
+ y("div", J, [
81
+ e.children && e.children.length > 0 ? (r(), d("button", {
78
82
  key: 0,
79
- onClick: (o) => l(t)?.toggleExpand(e.id),
83
+ onClick: (o) => l(n)?.toggleExpand(e.id),
80
84
  class: u([
81
85
  "flex items-center justify-center shrink-0 text-muted-foreground hover:bg-muted rounded transition-colors",
82
86
  a.value === "sm" ? "w-4 h-4" : a.value === "lg" ? "w-6 h-6" : "w-6.5 h-6.5"
83
87
  ])
84
88
  }, [
85
89
  i(C, {
86
- icon: l(t)?.expandedIds.value.has(e.id) ? "lucide:chevron-down" : "lucide:chevron-right",
87
- class: u(m.value)
90
+ icon: l(n)?.expandedIds.value.has(e.id) ? "lucide:chevron-down" : "lucide:chevron-right",
91
+ class: u(h.value)
88
92
  }, null, 8, ["icon", "class"])
89
- ], 10, J)) : c("", !0),
90
- f("div", W, [
91
- v.value ? c("", !0) : (r(), s("div", X, [
93
+ ], 10, W)) : c("", !0),
94
+ y("div", X, [
95
+ v.value ? c("", !0) : (r(), d("div", Y, [
92
96
  i(C, {
93
97
  icon: "lucide:grip-vertical",
94
- class: u(m.value)
98
+ class: u(h.value)
95
99
  }, null, 8, ["class"])
96
100
  ])),
97
- v.value ? e.icon ? (r(), x(C, {
101
+ v.value ? e.icon ? (r(), f(C, {
98
102
  key: 2,
99
103
  icon: e.icon,
100
- class: u([m.value, "shrink-0 text-muted-foreground"])
101
- }, null, 8, ["icon", "class"])) : c("", !0) : (r(), x(N, {
104
+ class: u([h.value, "shrink-0 text-muted-foreground"])
105
+ }, null, 8, ["icon", "class"])) : c("", !0) : (r(), f(E, {
102
106
  key: 1,
103
107
  value: e.icon,
104
108
  "btn-props": {
105
109
  variant: "ghost",
106
110
  size: "xs",
107
- iconClass: m.value,
111
+ iconClass: h.value,
108
112
  class: (a.value === "sm" ? "h-5 w-5" : a.value === "lg" ? "h-7 w-7" : "h-6 w-6") + " -ml-0.5! p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md"
109
113
  },
110
114
  position: "bottom-start",
111
115
  onOnSelect: (o) => {
112
- console.log("IconPicker value :>> ", o), e.icon = o, l(t)?.saveItem(e);
116
+ console.log("IconPicker value :>> ", o), e.icon = o, l(n)?.saveItem(e);
113
117
  }
114
118
  }, null, 8, ["value", "btn-props", "onOnSelect"])),
115
- v.value ? (r(), s("span", {
119
+ v.value ? (r(), d("span", {
116
120
  key: 4,
117
- class: u(["truncate", $.value])
118
- }, Q(e.title), 3)) : k((r(), s("input", {
121
+ class: u(["truncate", I.value])
122
+ }, q(e.title), 3)) : k((r(), d("input", {
119
123
  key: 3,
120
124
  "onUpdate:modelValue": (o) => e.title = o,
121
125
  class: u([
122
126
  "bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 -ml-1 transition-colors w-full truncate cursor-text min-w-0 shadow-none caret-primary",
123
- $.value
127
+ I.value
124
128
  ]),
125
129
  placeholder: "Category title...",
126
- onChange: (o) => l(t)?.saveItem(e),
127
- onKeyup: n[0] || (n[0] = w((o) => o.target.blur(), ["enter"])),
128
- onClick: n[1] || (n[1] = P(() => {
130
+ onChange: (o) => l(n)?.saveItem(e),
131
+ onKeyup: t[0] || (t[0] = w((o) => o.target.blur(), ["enter"])),
132
+ onClick: t[1] || (t[1] = Q(() => {
129
133
  }, ["stop"]))
130
- }, null, 42, Y)), [
131
- [U, e.title]
134
+ }, null, 42, Z)), [
135
+ [z, e.title]
132
136
  ])
133
137
  ])
134
138
  ]),
135
- v.value ? c("", !0) : (r(), s("div", Z, [
136
- i(g, {
139
+ v.value ? c("", !0) : (r(), d("div", ee, [
140
+ i(m, {
137
141
  variant: "ghost",
138
142
  size: "xs",
139
143
  icon: "lucide:plus",
140
144
  title: "Quick Add Subcategory",
141
145
  class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
142
- onClick: (o) => l(t)?.startInline("add-child", e.id)
146
+ onClick: (o) => l(n)?.startInline("add-child", e.id)
143
147
  }, null, 8, ["onClick"]),
144
- i(g, {
148
+ i(m, {
145
149
  variant: "ghost",
146
150
  size: "xs",
147
151
  icon: "lucide:settings",
148
152
  title: "Advanced Details",
149
153
  class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
150
- onClick: (o) => l(t)?.openModalForm("edit", e)
154
+ onClick: (o) => l(n)?.openModalForm("edit", e)
151
155
  }, null, 8, ["onClick"]),
152
- i(g, {
156
+ i(m, {
153
157
  variant: "ghost",
154
158
  size: "xs",
155
159
  icon: "lucide:trash-2",
156
160
  title: "Delete",
157
161
  class: "h-7 w-7 px-0 text-muted-foreground hover:text-destructive hover:bg-destructive/10",
158
- onClick: (o) => l(t)?.deleteItem(e)
162
+ onClick: (o) => l(n)?.deleteItem(e)
159
163
  }, null, 8, ["onClick"])
160
164
  ]))
161
165
  ], 2),
162
- e.children && e.children.length > 0 || l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? k((r(), s("div", ee, [
163
- e.children && e.children.length > 0 ? (r(), x(E, {
166
+ e.children && e.children.length > 0 || l(n)?.inlineState.value.mode === "add-child" && l(n).inlineState.value.targetId === e.id ? k((r(), d("div", te, [
167
+ e.children && e.children.length > 0 ? (r(), f(F, {
164
168
  key: 0,
165
169
  modelValue: e.children,
166
- "onUpdate:modelValue": (o) => M(o, e),
170
+ "onUpdate:modelValue": (o) => D(o, e),
167
171
  level: V.level + 1,
168
- onChange: I
172
+ onChange: N,
173
+ onDragEnd: t[2] || (t[2] = (o) => p("dragEnd", o))
169
174
  }, null, 8, ["modelValue", "onUpdate:modelValue", "level"])) : c("", !0),
170
- l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? (r(), s("div", te, [
171
- i(N, {
172
- modelValue: l(t).inlineState.value.icon,
173
- "onUpdate:modelValue": n[2] || (n[2] = (o) => l(t).inlineState.value.icon = o),
175
+ l(n)?.inlineState.value.mode === "add-child" && l(n).inlineState.value.targetId === e.id ? (r(), d("div", ne, [
176
+ i(E, {
177
+ modelValue: l(n).inlineState.value.icon,
178
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => l(n).inlineState.value.icon = o),
174
179
  "btn-props": {
175
180
  variant: "ghost",
176
181
  size: "xs",
@@ -178,41 +183,41 @@ const H = { class: "flex items-center gap-px overflow-hidden flex-1" }, J = ["on
178
183
  },
179
184
  position: "bottom-start"
180
185
  }, null, 8, ["modelValue"]),
181
- k(f("input", {
182
- "onUpdate:modelValue": n[3] || (n[3] = (o) => l(t).inlineState.value.title = o),
186
+ k(y("input", {
187
+ "onUpdate:modelValue": t[4] || (t[4] = (o) => l(n).inlineState.value.title = o),
183
188
  class: "flex-1 bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 text-sm transition-colors w-full shadow-none caret-primary text-foreground placeholder:text-muted-foreground",
184
189
  placeholder: "New subcategory title...",
185
190
  onKeyup: [
186
- n[4] || (n[4] = w((o) => l(t).saveInline(), ["enter"])),
187
- n[5] || (n[5] = w((o) => l(t).cancelInline(), ["esc"]))
191
+ t[5] || (t[5] = w((o) => l(n).saveInline(), ["enter"])),
192
+ t[6] || (t[6] = w((o) => l(n).cancelInline(), ["esc"]))
188
193
  ]
189
194
  }, null, 544), [
190
195
  [B],
191
- [U, l(t).inlineState.value.title]
196
+ [z, l(n).inlineState.value.title]
192
197
  ]),
193
- i(g, {
198
+ i(m, {
194
199
  variant: "primary",
195
200
  size: "xs",
196
201
  icon: "lucide:check",
197
202
  class: "shrink-0 h-6 w-6 px-0",
198
203
  title: "Save",
199
- onClick: n[6] || (n[6] = (o) => l(t).saveInline())
204
+ onClick: t[7] || (t[7] = (o) => l(n).saveInline())
200
205
  }),
201
- i(g, {
206
+ i(m, {
202
207
  variant: "ghost",
203
208
  size: "xs",
204
209
  icon: "lucide:x",
205
210
  class: "shrink-0 h-6 w-6 px-0",
206
211
  title: "Cancel",
207
- onClick: n[7] || (n[7] = (o) => l(t).cancelInline())
212
+ onClick: t[8] || (t[8] = (o) => l(n).cancelInline())
208
213
  })
209
214
  ])) : c("", !0)
210
215
  ], 512)), [
211
- [q, l(t)?.expandedIds.value.has(e.id)]
216
+ [G, l(n)?.expandedIds.value.has(e.id)]
212
217
  ]) : c("", !0)
213
- ]));
214
- return z.memo = _, z;
215
- }, n, 8), 128))
218
+ ], 8, ["data-id"]));
219
+ return _.memo = $, _;
220
+ }, t, 9), 128))
216
221
  ]),
217
222
  _: 1
218
223
  }, 8, ["modelValue", "disabled"]);
@@ -220,5 +225,5 @@ const H = { class: "flex items-center gap-px overflow-hidden flex-1" }, J = ["on
220
225
  }
221
226
  });
222
227
  export {
223
- de as default
228
+ ue as default
224
229
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as S, computed as x, ref as T, openBlock as t, createElementBlock as a, normalizeClass as l, createVNode as f, createCommentVNode as i, createElementVNode as d, toDisplayString as u, unref as B, createBlock as E, withModifiers as C } from "vue";
1
+ import { defineComponent as S, computed as x, ref as T, openBlock as t, createElementBlock as i, normalizeClass as l, createVNode as f, createCommentVNode as a, createElementVNode as d, toDisplayString as u, unref as B, createBlock as E, withModifiers as C } from "vue";
2
2
  import D from "../Avatar.vue.js";
3
3
  import g from "../Button.vue.js";
4
4
  import I from "../AttachmentsList/AttachmentsList.vue.js";
@@ -53,16 +53,16 @@ const z = {
53
53
  }, k = () => {
54
54
  n.value = !1, r && (clearTimeout(r), r = null);
55
55
  };
56
- return (m, o) => (t(), a("div", {
56
+ return (m, o) => (t(), i("div", {
57
57
  class: l(["flex w-full min-w-0 gap-3 group", e.isSender ? "flex-row-reverse" : "flex-row"])
58
58
  }, [
59
- e.showAvatar ? (t(), a("div", z, [
59
+ e.showAvatar ? (t(), i("div", z, [
60
60
  f(D, {
61
61
  src: e.message.avatar,
62
62
  alt: e.message.senderName,
63
63
  size: "sm"
64
64
  }, null, 8, ["src", "alt"])
65
- ])) : i("", !0),
65
+ ])) : a("", !0),
66
66
  d("div", {
67
67
  class: l(["flex flex-col min-w-0 overflow-hidden max-w-[85%]", e.isSender ? "items-end" : "items-start"])
68
68
  }, [
@@ -74,9 +74,9 @@ const z = {
74
74
  e.isSender ? "bg-primary text-primary-foreground rounded-br-sm" : "bg-muted text-foreground rounded-bl-sm"
75
75
  ]])
76
76
  }, [
77
- e.showUserInfo && e.message.senderName && !e.isSender ? (t(), a("div", A, u(e.message.senderName), 1)) : i("", !0),
78
- e.message.text ? (t(), a("p", N, u(e.message.text), 1)) : i("", !0),
79
- e.message.attachments && e.message.attachments.length > 0 ? (t(), a("div", {
77
+ e.showUserInfo && e.message.senderName && !e.isSender ? (t(), i("div", A, u(e.message.senderName), 1)) : a("", !0),
78
+ e.message.text ? (t(), i("p", N, u(e.message.text), 1)) : a("", !0),
79
+ e.message.attachments && e.message.attachments.length > 0 ? (t(), i("div", {
80
80
  key: 2,
81
81
  class: l({ "mt-2": e.message.text || e.showUserInfo && !e.isSender })
82
82
  }, [
@@ -89,27 +89,27 @@ const z = {
89
89
  "click-to-preview": !0,
90
90
  "show-download-in-list": !1
91
91
  }, null, 8, ["attachments"])
92
- ], 2)) : i("", !0),
93
- e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(), a("div", {
92
+ ], 2)) : a("", !0),
93
+ e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(), i("div", {
94
94
  key: 3,
95
95
  class: l(["mt-1 flex items-center gap-1", e.isSender ? "justify-end" : "justify-start"])
96
96
  }, [
97
- e.message.isEdited && e.showEditedStatus !== !1 ? (t(), a("span", {
97
+ e.message.isEdited && e.showEditedStatus !== !1 ? (t(), i("span", {
98
98
  key: 0,
99
99
  class: l(["text-[10px] opacity-60", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
100
- }, u(y.value), 3)) : i("", !0),
101
- e.message.isEdited && e.showEditedStatus !== !1 && e.message.timestamp ? (t(), a("span", {
100
+ }, u(y.value), 3)) : a("", !0),
101
+ e.message.isEdited && e.showEditedStatus !== !1 && e.message.timestamp ? (t(), i("span", {
102
102
  key: 1,
103
103
  class: l(["text-[10px] opacity-40", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
104
- }, " · ", 2)) : i("", !0),
105
- e.message.timestamp ? (t(), a("span", {
104
+ }, " · ", 2)) : a("", !0),
105
+ e.message.timestamp ? (t(), i("span", {
106
106
  key: 2,
107
107
  class: l(["text-[10px] opacity-60 tabular-nums", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
108
- }, u(h.value), 3)) : i("", !0)
109
- ], 2)) : i("", !0)
108
+ }, u(h.value), 3)) : a("", !0)
109
+ ], 2)) : a("", !0)
110
110
  ], 2),
111
111
  d("div", {
112
- class: l(["absolute top-1/2 -translate-y-1/2 opacity-0 group-hover/bubble:opacity-100 focus-within:opacity-100 transition-opacity flex gap-0 pointer-events-none group-hover/bubble:pointer-events-auto focus-within:pointer-events-auto z-10", e.isSender ? "right-full pr-1" : "left-full pl-1"])
112
+ class: l(["opacity-0 group-hover/bubble:opacity-100 focus-within:opacity-100 transition-opacity flex gap-0 pointer-events-none group-hover/bubble:pointer-events-auto focus-within:pointer-events-auto z-10", e.isSender ? "right-full pr-1" : "left-full pl-1"])
113
113
  }, [
114
114
  (e.isSender || e.allowEditAll) && e.message.text?.trim() ? (t(), E(g, {
115
115
  key: 0,
@@ -120,8 +120,8 @@ const z = {
120
120
  class: "text-muted-foreground hover:text-foreground h-7 w-7",
121
121
  onClick: o[0] || (o[0] = ($) => c("edit", e.message)),
122
122
  "aria-label": "Edit message"
123
- })) : i("", !0),
124
- e.isSender || e.allowDeleteAll ? (t(), a("div", j, [
123
+ })) : a("", !0),
124
+ e.isSender || e.allowDeleteAll ? (t(), i("div", j, [
125
125
  f(g, {
126
126
  variant: "ghost",
127
127
  size: "xs",
@@ -131,7 +131,7 @@ const z = {
131
131
  onClick: b,
132
132
  "aria-label": n.value ? "Confirm delete" : "Delete message"
133
133
  }, null, 8, ["icon", "aria-label"]),
134
- n.value ? (t(), a("button", {
134
+ n.value ? (t(), i("button", {
135
135
  key: 0,
136
136
  class: "absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-muted border border-border flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors",
137
137
  onClick: C(k, ["stop"]),
@@ -160,8 +160,8 @@ const z = {
160
160
  y2: "18"
161
161
  })
162
162
  ], -1)
163
- ])])) : i("", !0)
164
- ])) : i("", !0)
163
+ ])])) : a("", !0)
164
+ ])) : a("", !0)
165
165
  ], 2)
166
166
  ], 2)
167
167
  ], 2)
@@ -1,11 +1,11 @@
1
- import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as i, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
2
- import p from "./Icon.vue.js";
3
- import B from "./Label.vue.js";
4
- import { $t as N } from "../utils/i18n.js";
5
- const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-state", "disabled", "id"], I = {
1
+ import { defineComponent as v, computed as n, openBlock as s, createElementBlock as f, createElementVNode as g, normalizeClass as o, createVNode as w, Transition as C, withCtx as h, createBlock as c, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
2
+ import b from "./Icon.vue.js";
3
+ import $ from "./Label.vue.js";
4
+ import { $t as B } from "../utils/i18n.js";
5
+ const N = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-state", "disabled", "id", "data-testid"], I = {
6
6
  key: 0,
7
7
  class: "flex items-center justify-center text-current w-full h-full"
8
- }, L = /* @__PURE__ */ v({
8
+ }, q = /* @__PURE__ */ v({
9
9
  __name: "CheckBox",
10
10
  props: {
11
11
  modelValue: { type: Boolean, default: !1 },
@@ -20,24 +20,24 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
20
20
  rounded: {}
21
21
  },
22
22
  emits: ["update:modelValue", "update:checked"],
23
- setup(t, { emit: b }) {
24
- const e = t, c = b, u = s(() => e.labelI18n ? N(e.labelI18n) : e.label), m = () => {
23
+ setup(t, { emit: k }) {
24
+ const e = t, u = k, d = n(() => e.labelI18n ? B(e.labelI18n) : e.label), m = () => {
25
25
  if (e.disabled) return;
26
- const d = !(e.modelValue || e.checked);
27
- c("update:modelValue", d), c("update:checked", d);
28
- }, k = {
26
+ const l = !(e.modelValue || e.checked);
27
+ u("update:modelValue", l), u("update:checked", l);
28
+ }, p = {
29
29
  xs: "h-3.5 w-3.5",
30
30
  sm: "h-4 w-4",
31
31
  md: "h-4.5 w-4.5",
32
32
  lg: "h-5 w-5",
33
33
  xl: "h-5.5 w-5.5"
34
- }, n = {
34
+ }, i = {
35
35
  xs: "h-2.5 w-2.5",
36
36
  sm: "h-3 w-3",
37
37
  md: "h-3.5 w-3.5",
38
38
  lg: "h-4 w-4",
39
39
  xl: "h-5 w-5"
40
- }, y = {
40
+ }, x = {
41
41
  none: "rounded-none",
42
42
  xs: "rounded-[3px]",
43
43
  sm: "rounded-[4px]",
@@ -46,34 +46,35 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
46
46
  xl: "rounded-lg",
47
47
  "2xl": "rounded-xl",
48
48
  full: "rounded-full"
49
- }, a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), x = s(() => [
49
+ }, a = n(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), y = n(() => [
50
50
  "peer shrink-0 border transition-all duration-200 ease-in-out",
51
51
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
52
52
  "disabled:cursor-not-allowed disabled:opacity-50",
53
53
  "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
54
54
  "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
55
55
  "cursor-pointer bg-transparent",
56
- k[e.size],
57
- y[e.rounded || e.size],
56
+ p[e.size],
57
+ x[e.rounded || e.size],
58
58
  a.value === "checked" ? "border-primary!" : "border-gray-400!",
59
59
  e.class
60
60
  ].join(" "));
61
- return s(() => [
61
+ return n(() => [
62
62
  "transition-transform duration-200",
63
63
  a.value === "checked" || a.value === "indeterminate" ? "scale-100" : "scale-0",
64
- n[e.size]
65
- ].join(" ")), (d, $) => (l(), f("div", _, [
64
+ i[e.size]
65
+ ].join(" ")), (l, S) => (s(), f("div", N, [
66
66
  g("button", {
67
67
  type: "button",
68
68
  role: "checkbox",
69
69
  "aria-checked": t.indeterminate ? "mixed" : t.modelValue,
70
70
  "data-state": a.value,
71
71
  disabled: t.disabled,
72
- class: i(x.value),
72
+ class: o(y.value),
73
73
  id: t.id,
74
+ "data-testid": l.$attrs["data-testid"] || (l.$attrs.name ? `checkbox-${l.$attrs.name}` : t.id ? `checkbox-${t.id}` : d.value ? `checkbox-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "checkbox"),
74
75
  onClick: m
75
76
  }, [
76
- a.value === "checked" || a.value === "indeterminate" ? (l(), f("div", I, [
77
+ a.value === "checked" || a.value === "indeterminate" ? (s(), f("div", I, [
77
78
  w(C, {
78
79
  "enter-active-class": "transition duration-200 ease-out",
79
80
  "enter-from-class": "scale-50 opacity-0",
@@ -83,28 +84,28 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
83
84
  "leave-to-class": "scale-50 opacity-0"
84
85
  }, {
85
86
  default: h(() => [
86
- a.value === "checked" ? (l(), o(p, {
87
+ a.value === "checked" ? (s(), c(b, {
87
88
  key: 0,
88
89
  icon: "lucide:check",
89
- class: i(n[t.size])
90
- }, null, 8, ["class"])) : a.value === "indeterminate" ? (l(), o(p, {
90
+ class: o(i[t.size])
91
+ }, null, 8, ["class"])) : a.value === "indeterminate" ? (s(), c(b, {
91
92
  key: 1,
92
93
  icon: "lucide:minus",
93
- class: i(n[t.size])
94
+ class: o(i[t.size])
94
95
  }, null, 8, ["class"])) : r("", !0)
95
96
  ]),
96
97
  _: 1
97
98
  })
98
99
  ])) : r("", !0)
99
100
  ], 10, j),
100
- u.value ? (l(), o(B, {
101
+ d.value ? (s(), c($, {
101
102
  key: 0,
102
103
  for: t.id,
103
104
  class: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
104
105
  onClick: m
105
106
  }, {
106
107
  default: h(() => [
107
- V(z(u.value), 1)
108
+ V(z(d.value), 1)
108
109
  ]),
109
110
  _: 1
110
111
  }, 8, ["for"])) : r("", !0)
@@ -112,5 +113,5 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
112
113
  }
113
114
  });
114
115
  export {
115
- L as default
116
+ q as default
116
117
  };
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
4
4
  import { $t as E } from "../../utils/i18n.js";
5
5
  import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
6
6
  import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
7
- import ee from "./CommandPaletteItem.vue.js";
7
+ import ee from "./CommandPaletteItem.vue2.js";
8
8
  const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
9
9
  key: 0,
10
10
  class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
@@ -1,5 +1,5 @@
1
1
  import t from "./CommandPaletteItem.vue3.js";
2
- /* empty css */
2
+ /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-66b1ae06"]]);
5
5
  export {