vlite3 1.2.5 → 1.2.8

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 (53) hide show
  1. package/README.md +5 -1
  2. package/components/Barcode/Barcode.vue.d.ts +1 -1
  3. package/components/Button.vue.js +18 -18
  4. package/components/Chart/GanttChart.vue.d.ts +67 -0
  5. package/components/Chart/GanttChart.vue.js +7 -0
  6. package/components/Chart/GanttChart.vue2.js +911 -0
  7. package/components/Chart/SpeedometerChart.vue.d.ts +54 -0
  8. package/components/Chart/SpeedometerChart.vue.js +558 -0
  9. package/components/Chart/SpeedometerChart.vue2.js +4 -0
  10. package/components/Chart/index.d.ts +3 -1
  11. package/components/Chart/types.d.ts +106 -0
  12. package/components/Chip/Chip.vue.js +10 -9
  13. package/components/Chip/types.d.ts +1 -1
  14. package/components/ChoiceBox/ChoiceBox.vue.d.ts +46 -1
  15. package/components/ChoiceBox/ChoiceBox.vue.js +274 -91
  16. package/components/ChoiceBox/index.d.ts +1 -1
  17. package/components/ColorPicker/ColorPicker.vue.js +1 -1
  18. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  19. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  20. package/components/DataTable/DataTableHeader.vue.js +33 -30
  21. package/components/Dropdown/Dropdown.vue.d.ts +2 -0
  22. package/components/Dropdown/Dropdown.vue.js +35 -30
  23. package/components/Form/Form.vue.d.ts +10 -1
  24. package/components/Form/Form.vue.js +1 -1
  25. package/components/Form/Form.vue2.js +146 -132
  26. package/components/ImageComparison/ImageComparison.vue.d.ts +29 -0
  27. package/components/ImageComparison/ImageComparison.vue.js +126 -0
  28. package/components/ImageComparison/ImageComparison.vue2.js +4 -0
  29. package/components/ImageComparison/index.d.ts +1 -0
  30. package/components/ImportData/ImportData.vue.js +1 -1
  31. package/components/NavbarCommandPalette.vue.js +1 -1
  32. package/components/OTPInput/OTPInput.vue.d.ts +18 -0
  33. package/components/OTPInput/OTPInput.vue.js +127 -82
  34. package/components/PricingPlan/PricingPlanItem.vue.js +19 -19
  35. package/components/Radio.vue.d.ts +41 -0
  36. package/components/Radio.vue.js +97 -0
  37. package/components/Radio.vue2.js +4 -0
  38. package/components/RadioGroup.vue.d.ts +38 -0
  39. package/components/RadioGroup.vue.js +37 -0
  40. package/components/RadioGroup.vue2.js +4 -0
  41. package/components/Screen/ScreenFilter.vue.js +25 -25
  42. package/components/SidePanel.vue.js +3 -3
  43. package/components/SidePanel.vue2.js +1 -1
  44. package/components/Slider.vue.d.ts +7 -0
  45. package/components/Slider.vue.js +194 -120
  46. package/components/StatusChip/status-map.js +13 -0
  47. package/components/Timeline/Timeline.vue.d.ts +1 -1
  48. package/components/index.d.ts +1 -1
  49. package/index.d.ts +3 -0
  50. package/index.js +138 -128
  51. package/package.json +1 -1
  52. package/style.css +66 -26
  53. package/types/form.type.d.ts +23 -0
@@ -1,25 +1,42 @@
1
- import { defineComponent as O, computed as m, openBlock as r, createElementBlock as i, toDisplayString as c, createCommentVNode as n, createElementVNode as a, normalizeClass as o, Fragment as A, renderList as $, withKeys as D, withModifiers as K, createVNode as N, createBlock as v } from "vue";
2
- import y from "../Icon.vue.js";
3
- import { $t as u } from "../../utils/i18n.js";
4
- const E = { class: "w-full" }, S = {
1
+ import { defineComponent as G, computed as c, openBlock as i, createElementBlock as a, toDisplayString as b, createCommentVNode as d, createElementVNode as o, normalizeClass as s, Fragment as H, renderList as J, withKeys as Q, withModifiers as R, renderSlot as T, createVNode as m, createBlock as y } from "vue";
2
+ import g from "../Icon.vue.js";
3
+ import $ from "../CheckBox.vue.js";
4
+ import p from "../Switch.vue.js";
5
+ import { $t as x } from "../../utils/i18n.js";
6
+ const U = { class: "w-full" }, X = {
5
7
  key: 0,
6
8
  class: "mb-4"
7
- }, T = {
9
+ }, Y = {
8
10
  key: 0,
9
11
  class: "text-base font-semibold text-foreground"
10
- }, j = {
12
+ }, Z = {
11
13
  key: 1,
12
14
  class: "text-sm text-muted-foreground mt-1"
13
- }, q = ["onClick", "onKeydown"], z = { class: "flex flex-1 gap-3" }, F = {
15
+ }, _ = ["onClick", "onKeydown"], ee = {
14
16
  key: 0,
15
- class: "shrink-0 pt-0.5"
16
- }, L = { class: "flex flex-col" }, M = { class: "flex items-center gap-2" }, G = {
17
+ class: "shrink-0 mr-3 flex items-center"
18
+ }, te = {
17
19
  key: 0,
18
- class: "mt-0.5 -text-fs-3 text-muted leading-relaxed"
19
- }, H = {
20
+ class: "pointer-events-none flex items-center shrink-0"
21
+ }, re = {
22
+ key: 2,
23
+ class: "pointer-events-none flex items-center shrink-0"
24
+ }, ie = {
20
25
  key: 0,
21
- class: "absolute top-4 right-4 text-primary"
22
- }, R = /* @__PURE__ */ O({
26
+ class: "shrink-0 flex items-center justify-center"
27
+ }, ne = { class: "flex items-center gap-2" }, le = {
28
+ key: 1,
29
+ class: "shrink-0 ml-3 flex items-center"
30
+ }, ae = {
31
+ key: 0,
32
+ class: "pointer-events-none flex items-center shrink-0"
33
+ }, se = {
34
+ key: 2,
35
+ class: "pointer-events-none flex items-center shrink-0"
36
+ }, de = {
37
+ key: 2,
38
+ class: "pointer-events-none flex items-center shrink-0"
39
+ }, fe = /* @__PURE__ */ G({
23
40
  __name: "ChoiceBox",
24
41
  props: {
25
42
  modelValue: { default: void 0 },
@@ -31,36 +48,46 @@ const E = { class: "w-full" }, S = {
31
48
  descriptionI18n: {},
32
49
  disabled: { type: Boolean, default: !1 },
33
50
  grid: { default: 1 },
34
- gap: { default: 4 }
51
+ gap: { default: 4 },
52
+ variant: { default: "1" },
53
+ indicatorType: { default: "default" },
54
+ indicatorPosition: { default: "top-right" },
55
+ size: { default: "md" },
56
+ lineThroughOnSelect: { type: Boolean, default: !1 }
35
57
  },
36
58
  emits: ["update:modelValue", "change"],
37
- setup(g, { emit: _ }) {
38
- const s = g, x = _, f = m(() => s.titleI18n ? u(s.titleI18n) : s.title), p = m(
39
- () => s.descriptionI18n ? u(s.descriptionI18n) : s.description
40
- ), k = (t) => t.titleI18n ? u(t.titleI18n) : t.title, I = (t) => t.descriptionI18n ? u(t.descriptionI18n) : t.description, w = (t) => t.badgeI18n ? u(t.badgeI18n) : t.badge, d = (t) => Array.isArray(s.modelValue) ? s.modelValue.includes(t) : s.modelValue === t, b = (t) => {
41
- if (s.disabled || s.options.find((l) => l.id === t)?.disabled) return;
42
- let e;
43
- if (s.multiple) {
44
- const l = Array.isArray(s.modelValue) ? [...s.modelValue] : [], h = l.indexOf(t);
45
- h === -1 ? l.push(t) : l.splice(h, 1), e = l;
59
+ setup(e, { emit: B }) {
60
+ const r = e, C = B, z = c(() => r.titleI18n ? x(r.titleI18n) : r.title), w = c(
61
+ () => r.descriptionI18n ? x(r.descriptionI18n) : r.description
62
+ ), A = (l) => l.titleI18n ? x(l.titleI18n) : l.title, D = (l) => l.descriptionI18n ? x(l.descriptionI18n) : l.description, P = (l) => l.badgeI18n ? x(l.badgeI18n) : l.badge, n = (l) => Array.isArray(r.modelValue) ? r.modelValue.includes(l) : r.modelValue === l, I = (l) => {
63
+ if (r.disabled || r.options.find((u) => u.id === l)?.disabled) return;
64
+ let t;
65
+ if (r.multiple) {
66
+ const u = Array.isArray(r.modelValue) ? [...r.modelValue] : [], k = u.indexOf(l);
67
+ k === -1 ? u.push(l) : u.splice(k, 1), t = u;
46
68
  } else
47
- e = t;
48
- x("update:modelValue", e), x("change", e);
49
- }, V = m(() => {
50
- switch (s.grid) {
69
+ t = l;
70
+ C("update:modelValue", t), C("change", t);
71
+ }, q = c(() => {
72
+ switch (r.grid) {
73
+ case 0:
74
+ return "flex flex-wrap";
51
75
  case 1:
52
- return "grid-cols-1";
76
+ return "grid grid-cols-1";
53
77
  case 2:
54
- return "grid-cols-1 sm:grid-cols-2";
78
+ return "grid grid-cols-1 sm:grid-cols-2";
55
79
  case 3:
56
- return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
80
+ return "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
57
81
  case 4:
58
- return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
82
+ return "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
59
83
  default:
60
- return "grid-cols-1";
84
+ return "grid grid-cols-1";
61
85
  }
62
- }), C = m(() => {
63
- switch (s.gap) {
86
+ }), K = c(() => {
87
+ if (r.variant === "2") return "gap-0";
88
+ switch (r.gap) {
89
+ case 0:
90
+ return "gap-0";
64
91
  case 2:
65
92
  return "gap-2";
66
93
  case 3:
@@ -74,73 +101,229 @@ const E = { class: "w-full" }, S = {
74
101
  default:
75
102
  return "gap-4";
76
103
  }
77
- });
78
- return (t, B) => (r(), i("div", E, [
79
- f.value || p.value ? (r(), i("div", S, [
80
- f.value ? (r(), i("h3", T, c(f.value), 1)) : n("", !0),
81
- p.value ? (r(), i("p", j, c(p.value), 1)) : n("", !0)
82
- ])) : n("", !0),
83
- a("div", {
84
- class: o(["grid", [V.value, C.value]])
104
+ }), N = (l) => {
105
+ const t = n(l.id) && !r.lineThroughOnSelect, u = "relative flex items-center cursor-pointer transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", k = r.disabled || l.disabled ? "opacity-50 cursor-not-allowed grayscale" : "", j = {
106
+ 1: { sm: "p-3", md: "p-4", lg: "p-5" },
107
+ 2: { sm: "py-3 px-3", md: "py-4 px-4", lg: "py-5 px-5" },
108
+ 3: { sm: "p-3", md: "p-4", lg: "p-5" },
109
+ 4: { sm: "p-4", md: "p-5", lg: "p-6" },
110
+ 5: { sm: "px-3 py-1.5", md: "px-4 py-2", lg: "px-5 py-2.5" }
111
+ }, v = j[r.variant]?.[r.size] || j[r.variant].md;
112
+ let h = "";
113
+ switch (r.variant) {
114
+ case "1":
115
+ h = `rounded-xl border ${v} ${t ? "border-primary bg-primary/5" : "border-border bg-card hover:border-primary/40 hover:bg-accent/30"}`;
116
+ break;
117
+ case "2":
118
+ h = `border-b border-border ${v} last:border-0 ${t ? "bg-black/5 dark:bg-white/10" : "bg-transparent hover:bg-accent/30"}`;
119
+ break;
120
+ case "3":
121
+ h = `rounded-xl ${v} ${t ? "bg-primary/15" : "bg-muted/60 hover:bg-muted"}`;
122
+ break;
123
+ case "4":
124
+ h = `rounded-2xl border-[2.5px] ${v} ${t ? "border-primary bg-transparent" : "border-border/80 bg-transparent hover:border-muted-foreground/40"}`;
125
+ break;
126
+ case "5":
127
+ const W = r.indicatorType !== "none" && r.indicatorType !== "default";
128
+ h = `rounded-full border ${v} justify-center ${t ? W ? "border-primary bg-primary/10 text-primary" : "border-primary bg-primary text-primary-foreground" : "border-border bg-background hover:bg-accent"}`;
129
+ break;
130
+ }
131
+ return [u, h, k].filter(Boolean).join(" ");
132
+ }, E = c(() => r.size === "sm" ? "text-sm" : r.size === "lg" ? "text-base" : "text-[15px]"), M = c(() => r.size === "sm" ? "text-[12px]" : r.size === "lg" ? "text-[14px]" : "text-[13px]"), F = c(() => r.variant === "5" ? "h-5 w-5 bg-transparent" : r.size === "sm" ? "h-8 w-8" : r.size === "lg" ? "h-12 w-12" : "h-10 w-10"), L = c(() => r.size === "sm" ? "h-4 w-4" : r.size === "lg" ? "h-6 w-6" : "h-5 w-5"), f = c(() => r.size === "sm" ? "h-4 w-4" : r.size === "lg" ? "h-6 w-6" : "h-5 w-5"), S = c(() => r.size === "sm" ? "h-4 w-4" : r.size === "lg" ? "h-6 w-6" : "h-5 w-5"), O = c(() => r.size === "sm" ? "h-2 w-2" : r.size === "lg" ? "h-3 w-3" : "h-2.5 w-2.5");
133
+ return (l, V) => (i(), a("div", U, [
134
+ z.value || w.value ? (i(), a("div", X, [
135
+ z.value ? (i(), a("h3", Y, b(z.value), 1)) : d("", !0),
136
+ w.value ? (i(), a("p", Z, b(w.value), 1)) : d("", !0)
137
+ ])) : d("", !0),
138
+ o("div", {
139
+ class: s([q.value, K.value])
85
140
  }, [
86
- (r(!0), i(A, null, $(g.options, (e) => (r(), i("div", {
87
- key: e.id,
88
- class: o(["relative flex cursor-pointer rounded-xl border border-border p-4 transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", [
89
- d(e.id) ? "border-primary bg-accent" : "bg-card hover:border-primary/50 hover:bg-accent",
90
- g.disabled || e.disabled ? "opacity-50 cursor-not-allowed grayscale" : ""
91
- ]]),
92
- onClick: (l) => b(e.id),
141
+ (i(!0), a(H, null, J(e.options, (t) => (i(), a("div", {
142
+ key: t.id,
143
+ class: s(N(t)),
144
+ onClick: (u) => I(t.id),
93
145
  tabindex: "0",
94
- onKeydown: D(K((l) => b(e.id), ["prevent"]), ["enter", "space"])
146
+ onKeydown: Q(R((u) => I(t.id), ["prevent"]), ["enter", "space"])
95
147
  }, [
96
- a("div", z, [
97
- e.icon ? (r(), i("div", F, [
98
- a("div", {
99
- class: o([
100
- "flex h-10 w-10 items-center justify-center rounded-full transition-colors",
101
- d(e.id) ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
102
- ])
148
+ e.indicatorPosition === "left" && e.indicatorType !== "none" ? (i(), a("div", ee, [
149
+ T(l.$slots, "indicator", {
150
+ option: t,
151
+ selected: n(t.id)
152
+ }, () => [
153
+ e.indicatorType === "checkbox" ? (i(), a("div", te, [
154
+ m($, {
155
+ "model-value": n(t.id),
156
+ size: e.size
157
+ }, null, 8, ["model-value", "size"])
158
+ ])) : e.indicatorType === "radio" ? (i(), a("div", {
159
+ key: 1,
160
+ class: s([[S.value, n(t.id) && !e.lineThroughOnSelect ? "border-primary" : "border-muted-foreground/50"], "rounded-full border-[2px] flex items-center justify-center transition-colors shrink-0"])
161
+ }, [
162
+ n(t.id) ? (i(), a("div", {
163
+ key: 0,
164
+ class: s([[O.value, e.lineThroughOnSelect ? "bg-muted-foreground/50" : "bg-primary"], "rounded-full"])
165
+ }, null, 2)) : d("", !0)
166
+ ], 2)) : e.indicatorType === "switch" ? (i(), a("div", re, [
167
+ m(p, {
168
+ "model-value": n(t.id)
169
+ }, null, 8, ["model-value"])
170
+ ])) : e.indicatorType === "default" ? (i(), a("div", {
171
+ key: 3,
172
+ class: s(["flex items-center shrink-0 transition-colors", n(t.id) ? e.lineThroughOnSelect ? "text-muted-foreground opacity-50" : e.variant === "5" ? "text-primary-foreground" : "text-primary" : "text-transparent"])
103
173
  }, [
104
- N(y, {
105
- icon: e.icon,
106
- class: "h-5 w-5"
107
- }, null, 8, ["icon"])
174
+ e.multiple ? (i(), y(g, {
175
+ key: 0,
176
+ icon: "lucide:check-square",
177
+ class: s(f.value)
178
+ }, null, 8, ["class"])) : (i(), y(g, {
179
+ key: 1,
180
+ icon: "lucide:check-circle-2",
181
+ class: s(f.value)
182
+ }, null, 8, ["class"]))
183
+ ], 2)) : d("", !0)
184
+ ])
185
+ ])) : d("", !0),
186
+ o("div", {
187
+ class: s(["flex flex-1 gap-3 items-center", { "justify-center": e.variant === "5" }])
188
+ }, [
189
+ T(l.$slots, "option", {
190
+ option: t,
191
+ selected: n(t.id)
192
+ }, () => [
193
+ t.icon ? (i(), a("div", ie, [
194
+ o("div", {
195
+ class: s(["flex items-center justify-center rounded-full transition-colors", [
196
+ F.value,
197
+ n(t.id) && e.variant !== "5" && !e.lineThroughOnSelect ? e.variant === "2" ? "bg-muted text-foreground" : "bg-primary/10 text-primary" : e.variant !== "5" ? "bg-muted text-muted-foreground" : "text-current",
198
+ e.lineThroughOnSelect && n(t.id) ? "opacity-50" : ""
199
+ ]])
200
+ }, [
201
+ m(g, {
202
+ icon: t.icon,
203
+ class: s(L.value)
204
+ }, null, 8, ["icon", "class"])
205
+ ], 2)
206
+ ])) : d("", !0),
207
+ o("div", {
208
+ class: s(["flex flex-col flex-1 justify-center", { "items-center text-center": e.variant === "5" && !t.icon }])
209
+ }, [
210
+ o("div", ne, [
211
+ o("span", {
212
+ class: s(["font-medium transition-colors", [
213
+ E.value,
214
+ n(t.id) && !e.lineThroughOnSelect ? e.variant === "5" && (e.indicatorType === "none" || e.indicatorType === "default") ? "text-primary-foreground" : e.variant === "2" ? "text-foreground font-semibold" : "text-primary" : "text-foreground"
215
+ ]])
216
+ }, [
217
+ o("span", {
218
+ class: s({ "line-through opacity-50": t.disabled || e.lineThroughOnSelect && n(t.id) })
219
+ }, b(A(t)), 3)
220
+ ], 2),
221
+ t.badge || t.badgeI18n ? (i(), a("span", {
222
+ key: 0,
223
+ class: s([
224
+ "inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium",
225
+ n(t.id) && !e.lineThroughOnSelect ? e.variant === "5" ? "bg-background/20 text-current" : "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
226
+ ])
227
+ }, b(P(t)), 3)) : d("", !0)
228
+ ]),
229
+ (t.description || t.descriptionI18n) && e.variant !== "5" ? (i(), a("span", {
230
+ key: 0,
231
+ class: s(["mt-0.5 leading-relaxed transition-colors", [
232
+ M.value,
233
+ "text-muted-foreground",
234
+ e.lineThroughOnSelect && n(t.id) ? "line-through opacity-50" : ""
235
+ ]])
236
+ }, b(D(t)), 3)) : d("", !0)
108
237
  ], 2)
109
- ])) : n("", !0),
110
- a("div", L, [
111
- a("div", M, [
112
- a("span", {
113
- class: o(["font-semibold text-foreground text-fs-1", {
114
- "text-primary": d(e.id)
115
- }])
116
- }, c(k(e)), 3),
117
- e.badge || e.badgeI18n ? (r(), i("span", {
238
+ ])
239
+ ], 2),
240
+ e.indicatorPosition === "right" && e.indicatorType !== "none" ? (i(), a("div", le, [
241
+ T(l.$slots, "indicator", {
242
+ option: t,
243
+ selected: n(t.id)
244
+ }, () => [
245
+ e.indicatorType === "checkbox" ? (i(), a("div", ae, [
246
+ m($, {
247
+ "model-value": n(t.id),
248
+ size: e.size
249
+ }, null, 8, ["model-value", "size"])
250
+ ])) : e.indicatorType === "radio" ? (i(), a("div", {
251
+ key: 1,
252
+ class: s([[S.value, n(t.id) && !e.lineThroughOnSelect ? "border-primary" : "border-muted-foreground/50"], "rounded-full border-[2px] flex items-center justify-center transition-colors shrink-0"])
253
+ }, [
254
+ n(t.id) ? (i(), a("div", {
255
+ key: 0,
256
+ class: s([[O.value, e.lineThroughOnSelect ? "bg-muted-foreground/50" : "bg-primary"], "rounded-full"])
257
+ }, null, 2)) : d("", !0)
258
+ ], 2)) : e.indicatorType === "switch" ? (i(), a("div", se, [
259
+ m(p, {
260
+ "model-value": n(t.id)
261
+ }, null, 8, ["model-value"])
262
+ ])) : e.indicatorType === "default" ? (i(), a("div", {
263
+ key: 3,
264
+ class: s(["flex items-center shrink-0 transition-colors", n(t.id) ? e.lineThroughOnSelect ? "text-muted-foreground opacity-50" : e.variant === "5" ? "text-primary-foreground" : "text-primary" : "text-transparent"])
265
+ }, [
266
+ e.multiple ? (i(), y(g, {
267
+ key: 0,
268
+ icon: "lucide:check-square",
269
+ class: s(f.value)
270
+ }, null, 8, ["class"])) : (i(), y(g, {
271
+ key: 1,
272
+ icon: "lucide:check-circle-2",
273
+ class: s(f.value)
274
+ }, null, 8, ["class"]))
275
+ ], 2)) : d("", !0)
276
+ ])
277
+ ])) : d("", !0),
278
+ e.indicatorPosition === "top-right" && e.indicatorType !== "none" ? (i(), a("div", {
279
+ key: 2,
280
+ class: s(["absolute flex items-center", ["1", "3", "4"].includes(e.variant) ? "top-4 right-4" : "top-1/2 -translate-y-1/2 right-4"])
281
+ }, [
282
+ T(l.$slots, "indicator", {
283
+ option: t,
284
+ selected: n(t.id)
285
+ }, () => [
286
+ e.indicatorType === "checkbox" ? (i(), a("div", {
287
+ key: 0,
288
+ class: s(["pointer-events-none flex items-center shrink-0", e.lineThroughOnSelect ? "" : "text-primary"])
289
+ }, [
290
+ m($, {
291
+ "model-value": n(t.id),
292
+ size: e.size
293
+ }, null, 8, ["model-value", "size"])
294
+ ], 2)) : e.indicatorType === "radio" ? (i(), a("div", {
295
+ key: 1,
296
+ class: s([[S.value, n(t.id) && !e.lineThroughOnSelect ? "border-primary" : "border-muted-foreground/50"], "rounded-full border-[2px] flex items-center justify-center transition-colors shrink-0"])
297
+ }, [
298
+ n(t.id) ? (i(), a("div", {
299
+ key: 0,
300
+ class: s([[O.value, e.lineThroughOnSelect ? "bg-muted-foreground/50" : "bg-primary"], "rounded-full"])
301
+ }, null, 2)) : d("", !0)
302
+ ], 2)) : e.indicatorType === "switch" ? (i(), a("div", de, [
303
+ m(p, {
304
+ "model-value": n(t.id)
305
+ }, null, 8, ["model-value"])
306
+ ])) : e.indicatorType === "default" ? (i(), a("div", {
307
+ key: 3,
308
+ class: s(["flex items-center shrink-0 transition-colors", n(t.id) ? e.lineThroughOnSelect ? "text-muted-foreground opacity-50" : "text-primary" : "text-transparent"])
309
+ }, [
310
+ n(t.id) && e.multiple ? (i(), y(g, {
118
311
  key: 0,
119
- class: o([
120
- "inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
121
- d(e.id) ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
122
- ])
123
- }, c(w(e)), 3)) : n("", !0)
124
- ]),
125
- e.description || e.descriptionI18n ? (r(), i("span", G, c(I(e)), 1)) : n("", !0)
312
+ icon: "lucide:check-square",
313
+ class: s(f.value)
314
+ }, null, 8, ["class"])) : n(t.id) && !e.multiple ? (i(), y(g, {
315
+ key: 1,
316
+ icon: "lucide:check-circle-2",
317
+ class: s(f.value)
318
+ }, null, 8, ["class"])) : d("", !0)
319
+ ], 2)) : d("", !0)
126
320
  ])
127
- ]),
128
- d(e.id) ? (r(), i("div", H, [
129
- g.multiple ? (r(), v(y, {
130
- key: 0,
131
- icon: "lucide:check-square",
132
- class: "h-5 w-5"
133
- })) : (r(), v(y, {
134
- key: 1,
135
- icon: "lucide:check-circle-2",
136
- class: "h-5 w-5"
137
- }))
138
- ])) : n("", !0)
139
- ], 42, q))), 128))
321
+ ], 2)) : d("", !0)
322
+ ], 42, _))), 128))
140
323
  ], 2)
141
324
  ]));
142
325
  }
143
326
  });
144
327
  export {
145
- R as default
328
+ fe as default
146
329
  };
@@ -1,2 +1,2 @@
1
1
  export { default as ChoiceBox } from './ChoiceBox.vue';
2
- export type { ChoiceBoxOption } from './ChoiceBox.vue';
2
+ export type { ChoiceBoxOption, ChoiceBoxVariant, ChoiceBoxIndicatorType, ChoiceBoxIndicatorPosition, ChoiceBoxSize } from './ChoiceBox.vue';
@@ -11,7 +11,7 @@ import E from "./ColorIro.vue2.js";
11
11
  import { useEyeDropper as P } from "@vueuse/core";
12
12
  const I = {
13
13
  key: 0,
14
- class: "p-2 w-max flex flex-col justify-center"
14
+ class: "p-1 w-max flex flex-col justify-center"
15
15
  }, N = {
16
16
  key: 0,
17
17
  class: "flex items-center gap-1.5 w-full"
@@ -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.vue2.js";
7
+ import ee from "./CommandPaletteItem.vue.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 {
@@ -1,10 +1,10 @@
1
- import { defineComponent as x, computed as r, openBlock as l, createElementBlock as n, normalizeClass as o, createElementVNode as s, toDisplayString as y, createVNode as b, createCommentVNode as v } from "vue";
2
- import C from "../Icon.vue.js";
3
- import { $t as w } from "../../utils/i18n.js";
4
- const B = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 truncate" }, S = {
1
+ import { defineComponent as y, computed as t, openBlock as s, createElementBlock as i, normalizeClass as a, createElementVNode as c, toDisplayString as v, createVNode as C, createCommentVNode as b } from "vue";
2
+ import w from "../Icon.vue.js";
3
+ import { $t as B } from "../../utils/i18n.js";
4
+ const _ = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 truncate" }, k = {
5
5
  key: 0,
6
6
  class: "w-4 h-4 shrink-0"
7
- }, I = /* @__PURE__ */ x({
7
+ }, j = /* @__PURE__ */ y({
8
8
  __name: "DataTableHeader",
9
9
  props: {
10
10
  header: {},
@@ -15,43 +15,46 @@ const B = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 tr
15
15
  cellBordered: { type: Boolean }
16
16
  },
17
17
  emits: ["sort"],
18
- setup(t, { emit: i }) {
19
- const e = t, d = i, a = r(() => e.header.sortKey || e.header.field), c = r(
20
- () => e.sortConfig?.field === a.value && e.sortConfig?.order
21
- ), u = r(() => !e.sortConfig || e.sortConfig.field !== a.value ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), f = () => {
22
- e.tableSortable && e.header.sortable !== !1 && d("sort", e.header.field);
23
- }, p = r(() => ({
18
+ setup(l, { emit: d }) {
19
+ const e = l, u = d, n = t(() => e.header.sortKey || e.header.field), f = t(
20
+ () => e.sortConfig?.field === n.value && e.sortConfig?.order
21
+ ), p = t(() => !e.sortConfig || e.sortConfig.field !== n.value ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), r = t(() => {
22
+ const o = !!e.header.title || !!e.header.titleI18n;
23
+ return e.tableSortable && e.header.sortable !== !1 && o;
24
+ }), h = () => {
25
+ r.value && u("sort", e.header.field);
26
+ }, m = t(() => ({
24
27
  left: "justify-start text-left",
25
28
  center: "justify-center text-center",
26
29
  right: "justify-end text-right"
27
- })[e.header.align || "left"]), h = r(
28
- () => e.header.titleI18n ? w(e.header.titleI18n) : e.header.title
29
- ), m = r(() => e.size === "xs" || e.compact ? `py-1.5! ${e.cellBordered ? "px-3!" : ""}` : e.size === "sm" ? `py-2! ${e.cellBordered ? "px-3!" : ""}` : e.size === "lg" ? `py-4! ${e.cellBordered ? "px-4!" : ""}` : `py-3! ${e.cellBordered ? "px-3.5!" : ""}`);
30
- return (g, k) => (l(), n("th", {
30
+ })[e.header.align || "left"]), g = t(
31
+ () => e.header.titleI18n ? B(e.header.titleI18n) : e.header.title
32
+ ), x = t(() => e.size === "xs" || e.compact ? `py-1.5! ${e.cellBordered ? "px-3!" : ""}` : e.size === "sm" ? `py-2! ${e.cellBordered ? "px-3!" : ""}` : e.size === "lg" ? `py-4! ${e.cellBordered ? "px-4!" : ""}` : `py-3! ${e.cellBordered ? "px-3.5!" : ""}`);
33
+ return (o, S) => (s(), i("th", {
31
34
  scope: "col",
32
- class: o(["group/th px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden max-w-[400px]", [
33
- m.value,
34
- t.header.sortable !== !1 && t.tableSortable ? "cursor-pointer hover:bg-muted/50" : "",
35
- t.header.hideOnMobile ? "hidden md:table-cell" : ""
35
+ class: a(["group/th px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden max-w-[400px]", [
36
+ x.value,
37
+ r.value ? "cursor-pointer hover:bg-muted/50" : "",
38
+ l.header.hideOnMobile ? "hidden md:table-cell" : ""
36
39
  ]]),
37
- onClick: f
40
+ onClick: h
38
41
  }, [
39
- s("div", {
40
- class: o(["flex items-center gap-2 space-x-2", p.value])
42
+ c("div", {
43
+ class: a(["flex items-center gap-2 space-x-2", m.value])
41
44
  }, [
42
- s("span", B, y(h.value), 1),
43
- t.tableSortable && t.header.sortable !== !1 ? (l(), n("span", S, [
44
- b(C, {
45
- icon: u.value,
46
- class: o(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
47
- c.value ? "opacity-100 text-foreground" : "opacity-0 group-hover/th:opacity-100"
45
+ c("span", _, v(g.value), 1),
46
+ r.value ? (s(), i("span", k, [
47
+ C(w, {
48
+ icon: p.value,
49
+ class: a(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
50
+ f.value ? "opacity-100 text-foreground" : "opacity-0 group-hover/th:opacity-100"
48
51
  ]])
49
52
  }, null, 8, ["icon", "class"])
50
- ])) : v("", !0)
53
+ ])) : b("", !0)
51
54
  ], 2)
52
55
  ], 2));
53
56
  }
54
57
  });
55
58
  export {
56
- I as default
59
+ j as default
57
60
  };
@@ -39,6 +39,7 @@ type __VLS_Props = {
39
39
  isNested?: boolean;
40
40
  disabled?: boolean;
41
41
  readonly?: boolean;
42
+ unstyled?: boolean;
42
43
  };
43
44
  declare function __VLS_template(): {
44
45
  attrs: Partial<{}>;
@@ -112,6 +113,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
112
113
  showSelectedIcon: boolean;
113
114
  doubleConfirmation: boolean;
114
115
  isNested: boolean;
116
+ unstyled: boolean;
115
117
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
116
118
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
117
119
  export default _default;