vlite3 1.2.4 → 1.2.7

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 (55) hide show
  1. package/README.md +22 -8
  2. package/components/AvatarGroup/AvatarGroup.vue.js +10 -9
  3. package/components/Beacon.vue.d.ts +13 -0
  4. package/components/Button.vue.js +18 -18
  5. package/components/Chart/GanttChart.vue.d.ts +67 -0
  6. package/components/Chart/GanttChart.vue.js +7 -0
  7. package/components/Chart/GanttChart.vue2.js +911 -0
  8. package/components/Chart/SpeedometerChart.vue.d.ts +54 -0
  9. package/components/Chart/SpeedometerChart.vue.js +558 -0
  10. package/components/Chart/SpeedometerChart.vue2.js +4 -0
  11. package/components/Chart/index.d.ts +3 -1
  12. package/components/Chart/types.d.ts +106 -0
  13. package/components/ChoiceBox/ChoiceBox.vue.d.ts +46 -1
  14. package/components/ChoiceBox/ChoiceBox.vue.js +274 -91
  15. package/components/ChoiceBox/index.d.ts +1 -1
  16. package/components/{CopyButton.vue.d.ts → Clipboard.vue.d.ts} +4 -3
  17. package/components/{CopyButton.vue.js → Clipboard.vue.js} +19 -19
  18. package/components/Clipboard.vue2.js +4 -0
  19. package/components/ColorPicker/ColorPicker.vue.js +1 -1
  20. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  21. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  22. package/components/DataTable/DataTableHeader.vue.js +33 -30
  23. package/components/DataTable/types.d.ts +1 -1
  24. package/components/ImageComparison/ImageComparison.vue.d.ts +29 -0
  25. package/components/ImageComparison/ImageComparison.vue.js +126 -0
  26. package/components/ImageComparison/ImageComparison.vue2.js +4 -0
  27. package/components/ImageComparison/index.d.ts +1 -0
  28. package/components/ImportData/ImportData.vue.js +1 -1
  29. package/components/Modal.vue.js +1 -1
  30. package/components/Modal.vue2.js +92 -86
  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/Persona.vue.d.ts +25 -0
  35. package/components/PricingPlan/PricingPlanItem.vue.js +19 -19
  36. package/components/Radio.vue.d.ts +41 -0
  37. package/components/Radio.vue.js +97 -0
  38. package/components/Radio.vue2.js +4 -0
  39. package/components/RadioGroup.vue.d.ts +38 -0
  40. package/components/RadioGroup.vue.js +37 -0
  41. package/components/RadioGroup.vue2.js +4 -0
  42. package/components/SidePanel.vue.js +1 -1
  43. package/components/SidePanel.vue2.js +45 -57
  44. package/components/SidebarMenu/SidebarMenuItem.vue.js +70 -74
  45. package/components/Slider.vue.d.ts +7 -0
  46. package/components/Slider.vue.js +194 -120
  47. package/components/ThemeToggle.vue.js +10 -10
  48. package/components/Timeline/Timeline.vue.d.ts +1 -1
  49. package/components/index.d.ts +3 -1
  50. package/index.d.ts +4 -1
  51. package/index.js +148 -138
  52. package/package.json +1 -1
  53. package/style.css +58 -40
  54. package/types/form.type.d.ts +23 -0
  55. package/components/CopyButton.vue2.js +0 -4
@@ -192,6 +192,47 @@ export interface GaugeChartProps {
192
192
  /** Play an entry animation on mount and value change */
193
193
  animate?: boolean;
194
194
  }
195
+ /** Visual rendering mode for SpeedometerChart */
196
+ export type SpeedometerVariant = 'classic' | 'modern' | 'sport' | 'minimal';
197
+ export interface SpeedometerChartProps {
198
+ /** Current speed / value */
199
+ value: number;
200
+ /** Minimum value on the scale */
201
+ min?: number;
202
+ /** Maximum value on the scale (default 240) */
203
+ max?: number;
204
+ /**
205
+ * classic — Traditional car speedometer with full tick marks and numbers
206
+ * modern — Sleek speedometer with glowing accents
207
+ * sport — Racing-style with red-zone, aggressive ticks
208
+ * minimal — Clean minimal speedometer with fewer markings
209
+ */
210
+ variant?: SpeedometerVariant;
211
+ /** SVG bounding diameter in px */
212
+ size?: number;
213
+ /** Opening gap at the bottom, in degrees (default 60) */
214
+ gapAngle?: number;
215
+ /** Semantic color name ('primary', 'success', etc.) or any CSS color */
216
+ color?: ChartColor;
217
+ /** Needle color — defaults to 'danger' for sport, color for others */
218
+ needleColor?: string;
219
+ /** Step between major tick labels (e.g. 20 → 0, 20, 40, 60, ...) */
220
+ majorStep?: number;
221
+ /** Number of minor ticks between major ticks */
222
+ minorTicks?: number;
223
+ /** Unit label (e.g. 'km/h', 'mph', 'RPM') */
224
+ unit?: string;
225
+ /** Show the current value in the center */
226
+ showValue?: boolean;
227
+ /** Custom value formatter */
228
+ formatValue?: (v: number) => string;
229
+ /** Primary label below the chart */
230
+ label?: string;
231
+ /** Start of the danger zone (absolute value). Rendered in red. */
232
+ redZoneStart?: number;
233
+ /** Animate needle sweep on mount and value change */
234
+ animate?: boolean;
235
+ }
195
236
  /** A single task bar on the timeline */
196
237
  export interface TimelineTask {
197
238
  /** Person / row label shown on the Y axis */
@@ -292,3 +333,68 @@ export interface WaffleChartProps {
292
333
  /** Enable hover tooltip */
293
334
  showTooltip?: boolean;
294
335
  }
336
+ /** View granularity for the Gantt time axis */
337
+ export type GanttViewMode = 'day' | 'week' | 'month';
338
+ /** A single task (or milestone) on the Gantt chart */
339
+ export interface GanttTask {
340
+ /** Unique identifier for this task */
341
+ id: string;
342
+ /** Display name shown in the row label */
343
+ name: string;
344
+ /** Start date (Date object or ISO string) */
345
+ start: Date | string;
346
+ /** End date (Date object or ISO string) */
347
+ end: Date | string;
348
+ /** Percentage complete (0–100). Renders a filled overlay inside the bar */
349
+ progress?: number;
350
+ /** CSS color for this task bar. Falls back to palette rotation */
351
+ color?: string;
352
+ /** Group label — tasks sharing the same group are visually grouped */
353
+ group?: string;
354
+ /** IDs of tasks this task depends on. Renders dependency arrows */
355
+ dependencies?: string[];
356
+ /** If true, renders as a diamond milestone marker instead of a bar */
357
+ milestone?: boolean;
358
+ }
359
+ export interface GanttChartProps {
360
+ /** Array of task objects */
361
+ tasks: GanttTask[];
362
+ /** Time axis granularity */
363
+ viewMode?: GanttViewMode;
364
+ /** Total chart height in px (auto-expands if more rows) */
365
+ height?: number;
366
+ /** Height of each task row in px */
367
+ rowHeight?: number;
368
+ /** Corner radius per task bar */
369
+ barRadius?: number;
370
+ /** Task bar height within the row (should be ≤ rowHeight) */
371
+ barHeight?: number;
372
+ /** Width of the left task-name sidebar in px */
373
+ sidebarWidth?: number;
374
+ /** Show dashed vertical grid lines */
375
+ showGrid?: boolean;
376
+ /** Enable hover tooltip */
377
+ showTooltip?: boolean;
378
+ /** Show task name labels inside bars when wide enough */
379
+ showLabels?: boolean;
380
+ /** Show progress fill inside task bars */
381
+ showProgress?: boolean;
382
+ /** Render dependency arrows between tasks */
383
+ showDependencies?: boolean;
384
+ /** Show a vertical "today" marker line */
385
+ showTodayLine?: boolean;
386
+ /** Show the top date axis header */
387
+ showHeader?: boolean;
388
+ /** Play an entry animation on mount */
389
+ animate?: boolean;
390
+ /** Custom color palette (cycles for tasks without explicit color) */
391
+ colors?: string[];
392
+ /** Color for the "today" marker line */
393
+ todayColor?: string;
394
+ /** Locale string for date formatting (e.g. 'en-US') */
395
+ locale?: string;
396
+ /** Allow drag-and-drop to move/resize tasks */
397
+ draggable?: boolean;
398
+ /** When moving a task, also shift all dependent tasks recursively */
399
+ cascadeDependencies?: boolean;
400
+ }
@@ -8,7 +8,12 @@ export interface ChoiceBoxOption {
8
8
  disabled?: boolean;
9
9
  badge?: string;
10
10
  badgeI18n?: string;
11
+ [key: string]: any;
11
12
  }
13
+ export type ChoiceBoxVariant = '1' | '2' | '3' | '4' | '5';
14
+ export type ChoiceBoxIndicatorType = 'default' | 'checkbox' | 'radio' | 'switch' | 'none';
15
+ export type ChoiceBoxIndicatorPosition = 'left' | 'right' | 'top-right';
16
+ export type ChoiceBoxSize = 'sm' | 'md' | 'lg';
12
17
  interface Props {
13
18
  modelValue?: string | number | (string | number)[] | null;
14
19
  options: ChoiceBoxOption[];
@@ -20,8 +25,37 @@ interface Props {
20
25
  disabled?: boolean;
21
26
  grid?: number;
22
27
  gap?: number;
28
+ variant?: ChoiceBoxVariant;
29
+ indicatorType?: ChoiceBoxIndicatorType;
30
+ indicatorPosition?: ChoiceBoxIndicatorPosition;
31
+ size?: ChoiceBoxSize;
32
+ lineThroughOnSelect?: boolean;
23
33
  }
24
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
34
+ declare function __VLS_template(): {
35
+ attrs: Partial<{}>;
36
+ slots: {
37
+ indicator?(_: {
38
+ option: ChoiceBoxOption;
39
+ selected: boolean;
40
+ }): any;
41
+ indicator?(_: {
42
+ option: ChoiceBoxOption;
43
+ selected: boolean;
44
+ }): any;
45
+ indicator?(_: {
46
+ option: ChoiceBoxOption;
47
+ selected: boolean;
48
+ }): any;
49
+ option?(_: {
50
+ option: ChoiceBoxOption;
51
+ selected: boolean;
52
+ }): any;
53
+ };
54
+ refs: {};
55
+ rootEl: HTMLDivElement;
56
+ };
57
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
58
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
25
59
  change: (value: string | number | (string | number)[]) => any;
26
60
  "update:modelValue": (value: string | number | (string | number)[]) => any;
27
61
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
@@ -29,9 +63,20 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
29
63
  "onUpdate:modelValue"?: (value: string | number | (string | number)[]) => any;
30
64
  }>, {
31
65
  grid: number;
66
+ variant: ChoiceBoxVariant;
67
+ size: ChoiceBoxSize;
32
68
  disabled: boolean;
33
69
  multiple: boolean;
34
70
  modelValue: string | number | (string | number)[] | null;
35
71
  gap: number;
72
+ indicatorType: ChoiceBoxIndicatorType;
73
+ indicatorPosition: ChoiceBoxIndicatorPosition;
74
+ lineThroughOnSelect: boolean;
36
75
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
76
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
77
  export default _default;
78
+ type __VLS_WithTemplateSlots<T, S> = T & {
79
+ new (): {
80
+ $slots: S;
81
+ };
82
+ };
@@ -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';
@@ -1,5 +1,5 @@
1
1
  import { ButtonVariant, ButtonSize, ButtonRounded } from '../types';
2
- export interface CopyButtonProps {
2
+ export interface ClipboardProps {
3
3
  /** The content to be copied to the clipboard */
4
4
  textToCopy: string;
5
5
  variant?: ButtonVariant;
@@ -26,15 +26,16 @@ declare function __VLS_template(): {
26
26
  rootEl: HTMLButtonElement;
27
27
  };
28
28
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
- declare const __VLS_component: import('vue').DefineComponent<CopyButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
+ declare const __VLS_component: import('vue').DefineComponent<ClipboardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
30
30
  copy: (text: string) => any;
31
31
  error: (err: Error) => any;
32
- }, string, import('vue').PublicProps, Readonly<CopyButtonProps> & Readonly<{
32
+ }, string, import('vue').PublicProps, Readonly<ClipboardProps> & Readonly<{
33
33
  onCopy?: (text: string) => any;
34
34
  onError?: (err: Error) => any;
35
35
  }>, {
36
36
  variant: ButtonVariant;
37
37
  size: ButtonSize;
38
+ rounded: ButtonRounded;
38
39
  asIcon: boolean;
39
40
  defaultIcon: string;
40
41
  copiedIcon: string;