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
@@ -3,7 +3,7 @@ import L from "./Icon.vue.js";
3
3
  import v from "./Modal.vue.js";
4
4
  import N from "./CommandPalette/CommandPaletteContent.vue.js";
5
5
  import { $t as U } from "../utils/i18n.js";
6
- /* empty css */
6
+ /* empty css */
7
7
  const V = { class: "block truncate -text-fs-1.5" }, S = { class: "ml-auto inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border border-border/80 bg-background text-muted-foreground ml-1" }, A = /* @__PURE__ */ x({
8
8
  __name: "NavbarCommandPalette",
9
9
  props: {
@@ -11,15 +11,26 @@ interface Props {
11
11
  size?: 'sm' | 'md' | 'lg';
12
12
  mask?: boolean;
13
13
  fluid?: boolean;
14
+ allowResend?: boolean;
15
+ resendDuration?: number;
16
+ maxResends?: number;
17
+ resendText?: string;
18
+ resendActionText?: string;
19
+ resendWaitText?: string;
20
+ resendLimitText?: string;
14
21
  }
15
22
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
23
  change: (value: string) => any;
17
24
  "update:modelValue": (value: string) => any;
18
25
  complete: (value: string) => any;
26
+ resend: (count: number) => any;
27
+ "resend-limit-reached": () => any;
19
28
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
20
29
  onChange?: (value: string) => any;
21
30
  "onUpdate:modelValue"?: (value: string) => any;
22
31
  onComplete?: (value: string) => any;
32
+ onResend?: (count: number) => any;
33
+ "onResend-limit-reached"?: () => any;
23
34
  }>, {
24
35
  length: number;
25
36
  type: "text" | "number";
@@ -33,5 +44,12 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
33
44
  autofocus: boolean;
34
45
  attached: boolean;
35
46
  fluid: boolean;
47
+ allowResend: boolean;
48
+ resendDuration: number;
49
+ maxResends: number;
50
+ resendText: string;
51
+ resendActionText: string;
52
+ resendWaitText: string;
53
+ resendLimitText: string;
36
54
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
37
55
  export default _default;
@@ -1,5 +1,11 @@
1
- import { defineComponent as C, ref as v, watch as M, onMounted as V, nextTick as A, computed as m, openBlock as g, createElementBlock as h, normalizeClass as y, Fragment as E, renderList as F } from "vue";
2
- const K = ["value", "type", "inputmode", "disabled", "placeholder", "onInput", "onKeydown"], T = /* @__PURE__ */ C({
1
+ import { defineComponent as K, ref as w, watch as N, onMounted as J, nextTick as W, onUnmounted as $, computed as x, openBlock as d, createElementBlock as c, normalizeClass as D, createElementVNode as k, Fragment as I, renderList as O, createTextVNode as B, toDisplayString as m, createCommentVNode as S } from "vue";
2
+ const U = ["value", "type", "inputmode", "disabled", "placeholder", "onInput", "onKeydown"], q = {
3
+ key: 0,
4
+ class: "text-sm text-center text-muted-foreground mt-1"
5
+ }, G = { key: 0 }, H = { class: "font-medium text-primary" }, Q = { key: 1 }, X = {
6
+ key: 1,
7
+ class: "text-destructive font-medium"
8
+ }, Z = /* @__PURE__ */ K({
3
9
  __name: "OTPInput",
4
10
  props: {
5
11
  length: { default: 6 },
@@ -13,78 +19,98 @@ const K = ["value", "type", "inputmode", "disabled", "placeholder", "onInput", "
13
19
  attached: { type: Boolean, default: !1 },
14
20
  size: { default: "md" },
15
21
  mask: { type: Boolean, default: !1 },
16
- fluid: { type: Boolean, default: !1 }
22
+ fluid: { type: Boolean, default: !1 },
23
+ allowResend: { type: Boolean, default: !1 },
24
+ resendDuration: { default: 45 },
25
+ maxResends: { default: 5 },
26
+ resendText: { default: "Don't see it?" },
27
+ resendActionText: { default: "Resend code" },
28
+ resendWaitText: { default: "Resend code in" },
29
+ resendLimitText: { default: "Too many attempts. Please try again." }
17
30
  },
18
- emits: ["update:modelValue", "complete", "change"],
19
- setup(d, { emit: b }) {
20
- const t = d, p = b, s = v([]), r = v(new Array(t.length).fill(""));
21
- M(
22
- () => t.modelValue,
23
- (l) => {
24
- const e = l || "", a = e.split("").slice(0, t.length);
25
- if (r.value.join("") !== e) {
26
- const o = new Array(t.length).fill("");
27
- a.forEach((u, i) => o[i] = u), r.value = o;
31
+ emits: ["update:modelValue", "complete", "change", "resend", "resend-limit-reached"],
32
+ setup(s, { emit: R }) {
33
+ const e = s, p = R, i = w([]), r = w(new Array(e.length).fill("")), v = w(e.resendDuration), g = w(0);
34
+ let f = null;
35
+ const T = () => {
36
+ f && clearInterval(f), v.value = e.resendDuration, f = setInterval(() => {
37
+ v.value > 0 ? v.value-- : f && clearInterval(f);
38
+ }, 1e3);
39
+ }, C = () => {
40
+ g.value >= e.maxResends || (g.value++, p("resend", g.value), g.value >= e.maxResends ? p("resend-limit-reached") : T());
41
+ };
42
+ N(
43
+ () => e.modelValue,
44
+ (n) => {
45
+ const t = n || "", o = t.split("").slice(0, e.length);
46
+ if (r.value.join("") !== t) {
47
+ const l = new Array(e.length).fill("");
48
+ o.forEach((u, y) => l[y] = u), r.value = l;
28
49
  }
29
50
  },
30
51
  { immediate: !0 }
31
52
  );
32
- const c = () => {
33
- const l = r.value.join("");
34
- p("update:modelValue", l), p("change", l), l.length === t.length && p("complete", l);
35
- }, w = (l, e) => {
36
- let n = l.target.value;
37
- if (t.type === "number" && (n = n.replace(/\D/g, "")), n.length === 1) {
38
- r.value[e] = n, c(), e < t.length - 1 && s.value[e + 1]?.focus();
53
+ const h = () => {
54
+ const n = r.value.join("");
55
+ p("update:modelValue", n), p("change", n), n.length === e.length && p("complete", n);
56
+ }, V = (n, t) => {
57
+ let a = n.target.value;
58
+ if (e.type === "number" && (a = a.replace(/\D/g, "")), a.length === 1) {
59
+ r.value[t] = a, h(), t < e.length - 1 && i.value[t + 1]?.focus();
39
60
  return;
40
61
  }
41
- if (!n) {
42
- r.value[e] = "", c();
62
+ if (!a) {
63
+ r.value[t] = "", h();
43
64
  return;
44
65
  }
45
- if (n.length > 1) {
46
- const o = n.split("").slice(0, t.length - e);
47
- o.forEach((i, f) => {
48
- e + f < t.length && (r.value[e + f] = i);
49
- }), c();
50
- const u = Math.min(e + o.length, t.length - 1);
51
- s.value[u]?.focus();
66
+ if (a.length > 1) {
67
+ const l = a.split("").slice(0, e.length - t);
68
+ l.forEach((y, b) => {
69
+ t + b < e.length && (r.value[t + b] = y);
70
+ }), h();
71
+ const u = Math.min(t + l.length, e.length - 1);
72
+ i.value[u]?.focus();
52
73
  }
53
- }, D = (l, e) => {
54
- const a = l.key;
55
- if (a === "Backspace") {
56
- r.value[e] || (l.preventDefault(), e > 0 && (r.value[e - 1] = "", s.value[e - 1]?.focus(), c()));
74
+ }, j = (n, t) => {
75
+ const o = n.key;
76
+ if (o === "Backspace") {
77
+ r.value[t] || (n.preventDefault(), t > 0 && (r.value[t - 1] = "", i.value[t - 1]?.focus(), h()));
57
78
  return;
58
79
  }
59
- a === "ArrowLeft" && (l.preventDefault(), e > 0 && s.value[e - 1]?.focus()), a === "ArrowRight" && (l.preventDefault(), e < t.length - 1 && s.value[e + 1]?.focus());
60
- }, k = (l) => {
61
- l.preventDefault();
62
- const e = l.clipboardData?.getData("text/plain");
63
- if (!e) return;
64
- let a = e.trim();
65
- t.type === "number" && (a = a.replace(/\D/g, ""));
66
- const n = a.split("").slice(0, t.length), o = [...r.value];
67
- n.forEach((i, f) => {
68
- o[f] = i;
69
- }), r.value = o, c();
70
- const u = Math.min(n.length, t.length - 1);
71
- s.value[u]?.focus();
72
- }, B = (l, e) => {
73
- l && (s.value[e] = l);
80
+ o === "ArrowLeft" && (n.preventDefault(), t > 0 && i.value[t - 1]?.focus()), o === "ArrowRight" && (n.preventDefault(), t < e.length - 1 && i.value[t + 1]?.focus());
81
+ }, A = (n) => {
82
+ n.preventDefault();
83
+ const t = n.clipboardData?.getData("text/plain");
84
+ if (!t) return;
85
+ let o = t.trim();
86
+ e.type === "number" && (o = o.replace(/\D/g, ""));
87
+ const a = o.split("").slice(0, e.length), l = [...r.value];
88
+ a.forEach((y, b) => {
89
+ l[b] = y;
90
+ }), r.value = l, h();
91
+ const u = Math.min(a.length, e.length - 1);
92
+ i.value[u]?.focus();
93
+ }, z = (n, t) => {
94
+ n && (i.value[t] = n);
74
95
  };
75
- V(() => {
76
- t.autofocus && A(() => {
77
- s.value[0]?.focus();
78
- });
96
+ J(() => {
97
+ e.autofocus && W(() => {
98
+ i.value[0]?.focus();
99
+ }), e.allowResend && T();
100
+ }), $(() => {
101
+ f && clearInterval(f);
79
102
  });
80
- const I = m(() => t.mask ? "password" : t.type === "number" ? "tel" : "text"), j = m(() => {
81
- if (!t.mask)
82
- return t.type === "number" ? "numeric" : void 0;
83
- }), x = m(() => {
84
- const l = t.attached ? "-space-x-px" : "gap-2", e = t.fluid ? "w-full" : "";
85
- return ["flex items-center", l, e].filter(Boolean).join(" ");
86
- }), z = (l) => {
87
- const e = "text-center font-medium transition-all focus:outline-none focus:z-10 disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted-foreground", a = t.fluid ? {
103
+ const E = x(() => e.mask ? "password" : e.type === "number" ? "tel" : "text"), M = x(() => {
104
+ if (!e.mask)
105
+ return e.type === "number" ? "numeric" : void 0;
106
+ }), L = x(() => [
107
+ "flex flex-col gap-2",
108
+ e.fluid ? "w-full" : "w-fit"
109
+ ].filter(Boolean).join(" ")), P = x(() => {
110
+ const n = e.attached ? "-space-x-px" : "gap-2", t = e.fluid ? "w-full" : "";
111
+ return ["flex items-center", n, t].filter(Boolean).join(" ");
112
+ }), F = (n) => {
113
+ const t = "text-center font-medium transition-all focus:outline-none focus:z-10 disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted-foreground", o = e.fluid ? {
88
114
  sm: "flex-1 min-w-0 h-8 text-sm",
89
115
  md: "flex-1 min-w-0 h-10 text-lg",
90
116
  lg: "flex-1 min-w-0 h-12 text-xl"
@@ -92,36 +118,55 @@ const K = ["value", "type", "inputmode", "disabled", "placeholder", "onInput", "
92
118
  sm: "w-8 h-8 text-sm",
93
119
  md: "w-10 h-10 text-lg",
94
120
  lg: "w-12 h-12 text-xl"
95
- }, n = {
121
+ }, a = {
96
122
  solid: "bg-muted border border-transparent focus:border-primary focus:ring-2 focus:ring-primary",
97
123
  outline: "border border-input focus:border-primary focus:ring-2 focus:ring-primary",
98
124
  ghost: "bg-transparent border border-transparent hover:bg-accent focus:border-primary focus:ring-2 focus:ring-primary"
99
- }, o = t.error ? "border-destructive focus:ring-destructive text-destructive" : "";
125
+ }, l = e.error ? "border-destructive focus:ring-destructive text-destructive" : "";
100
126
  let u = "rounded-md";
101
- return t.attached && (l === 0 ? u = "rounded-l-md rounded-r-none" : l === t.length - 1 ? u = "rounded-r-md rounded-l-none" : u = "rounded-none"), [e, a[t.size], n[t.variant], o, u].join(" ");
127
+ return e.attached && (n === 0 ? u = "rounded-l-md rounded-r-none" : n === e.length - 1 ? u = "rounded-r-md rounded-l-none" : u = "rounded-none"), [t, o[e.size], a[e.variant], l, u].join(" ");
102
128
  };
103
- return (l, e) => (g(), h("div", {
104
- class: y(x.value)
129
+ return (n, t) => (d(), c("div", {
130
+ class: D(L.value)
105
131
  }, [
106
- (g(!0), h(E, null, F(t.length, (a, n) => (g(), h("input", {
107
- key: n,
108
- ref_for: !0,
109
- ref: (o) => B(o, n),
110
- value: r.value[n],
111
- type: I.value,
112
- inputmode: j.value,
113
- maxlength: 1,
114
- disabled: d.disabled,
115
- placeholder: d.placeholder,
116
- class: y(z(n)),
117
- onInput: (o) => w(o, n),
118
- onKeydown: (o) => D(o, n),
119
- onPaste: k,
120
- onFocus: e[0] || (e[0] = (o) => l.$emit("update:modelValue", r.value.join("")))
121
- }, null, 42, K))), 128))
132
+ k("div", {
133
+ class: D(P.value)
134
+ }, [
135
+ (d(!0), c(I, null, O(e.length, (o, a) => (d(), c("input", {
136
+ key: a,
137
+ ref_for: !0,
138
+ ref: (l) => z(l, a),
139
+ value: r.value[a],
140
+ type: E.value,
141
+ inputmode: M.value,
142
+ maxlength: 1,
143
+ disabled: s.disabled,
144
+ placeholder: s.placeholder,
145
+ class: D(F(a)),
146
+ onInput: (l) => V(l, a),
147
+ onKeydown: (l) => j(l, a),
148
+ onPaste: A,
149
+ onFocus: t[0] || (t[0] = (l) => n.$emit("update:modelValue", r.value.join("")))
150
+ }, null, 42, U))), 128))
151
+ ], 2),
152
+ s.allowResend ? (d(), c("div", q, [
153
+ g.value < s.maxResends ? (d(), c(I, { key: 0 }, [
154
+ v.value > 0 ? (d(), c("span", G, [
155
+ B(m(s.resendText) + " " + m(s.resendWaitText) + " ", 1),
156
+ k("span", H, m(v.value) + "s", 1)
157
+ ])) : (d(), c("span", Q, [
158
+ B(m(s.resendText) + " ", 1),
159
+ k("button", {
160
+ type: "button",
161
+ onClick: C,
162
+ class: "font-medium text-primary hover:underline focus:outline-none focus:ring-2 focus:ring-primary rounded px-1 transition-colors"
163
+ }, m(s.resendActionText), 1)
164
+ ]))
165
+ ], 64)) : (d(), c("span", X, m(s.resendLimitText), 1))
166
+ ])) : S("", !0)
122
167
  ], 2));
123
168
  }
124
169
  });
125
170
  export {
126
- T as default
171
+ Z as default
127
172
  };
@@ -0,0 +1,25 @@
1
+ import { AvatarSize, AvatarRounded } from '../types';
2
+ export type PresenceType = 'online' | 'offline' | 'busy' | 'dnd' | 'away';
3
+ export type PersonaLabelTheme = 'default' | 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info' | 'muted' | string;
4
+ interface Props {
5
+ src?: string;
6
+ link?: string;
7
+ alt?: string;
8
+ fallback?: string;
9
+ size?: AvatarSize;
10
+ rounded?: AvatarRounded;
11
+ presence?: PresenceType;
12
+ label?: string;
13
+ secondaryLabel?: string;
14
+ labelTheme?: PersonaLabelTheme;
15
+ hideDetails?: boolean;
16
+ class?: string;
17
+ }
18
+ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
+ class: string;
20
+ size: AvatarSize;
21
+ rounded: AvatarRounded;
22
+ labelTheme: PersonaLabelTheme;
23
+ hideDetails: boolean;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ export default _default;
@@ -1,11 +1,11 @@
1
- import { defineComponent as F, computed as o, openBlock as i, createElementBlock as a, normalizeClass as m, createVNode as v, withCtx as h, createTextVNode as b, toDisplayString as l, createCommentVNode as u, createElementVNode as s, Fragment as D, renderList as E, createBlock as y } from "vue";
1
+ import { defineComponent as F, computed as o, openBlock as i, createElementBlock as a, normalizeClass as u, createVNode as v, withCtx as h, createTextVNode as b, toDisplayString as l, createCommentVNode as m, createElementVNode as s, Fragment as j, renderList as D, createBlock as y } from "vue";
2
2
  import _ from "../Icon.vue.js";
3
- import S from "../Button.vue.js";
4
- import j from "../Badge.vue.js";
3
+ import E from "../Button.vue.js";
4
+ import S from "../Badge.vue.js";
5
5
  import { $t as n } from "../../utils/i18n.js";
6
6
  const L = {
7
7
  key: 0,
8
- class: "absolute -top-3 left-1/2 -translate-x-1/2 z-20"
8
+ class: "absolute -top-3 left-1/2 -translate-x-1/2 z-20 flex w-full max-w-[90%] justify-center"
9
9
  }, M = { class: "mb-3 text-center" }, R = { class: "text-xl font-bold text-foreground tracking-tight" }, q = {
10
10
  key: 0,
11
11
  class: "text-sm text-muted-foreground mt-2 min-h-[40px] leading-relaxed"
@@ -22,9 +22,9 @@ const L = {
22
22
  },
23
23
  emits: ["select"],
24
24
  setup(c, { emit: P }) {
25
- const e = c, k = P, I = () => {
25
+ const e = c, k = P, w = () => {
26
26
  e.selectable && k("select", e.item);
27
- }, T = o(() => e.item.titleI18n ? n(e.item.titleI18n) : e.item.title), p = o(() => e.item.descriptionI18n ? n(e.item.descriptionI18n) : e.item.description), f = o(() => e.item.periodI18n ? n(e.item.periodI18n) : e.item.period), w = o(() => {
27
+ }, I = o(() => e.item.titleI18n ? n(e.item.titleI18n) : e.item.title), p = o(() => e.item.descriptionI18n ? n(e.item.descriptionI18n) : e.item.description), f = o(() => e.item.periodI18n ? n(e.item.periodI18n) : e.item.period), T = o(() => {
28
28
  if (e.item.buttonTextI18n) return n(e.item.buttonTextI18n);
29
29
  if (e.item.buttonText) return e.item.buttonText;
30
30
  const t = n("vlite.pricingPlan.selected") !== "vlite.pricingPlan.selected" ? n("vlite.pricingPlan.selected") : "Selected", r = n("vlite.pricingPlan.choosePlan") !== "vlite.pricingPlan.choosePlan" ? n("vlite.pricingPlan.choosePlan") : "Choose Plan";
@@ -42,30 +42,30 @@ const L = {
42
42
  return t !== "vlite.pricingPlan.mostPopular" ? t : "Most Popular";
43
43
  });
44
44
  return (t, r) => (i(), a("div", {
45
- class: m(C.value),
46
- onClick: I
45
+ class: u(C.value),
46
+ onClick: w
47
47
  }, [
48
48
  x.value ? (i(), a("div", L, [
49
- v(j, {
49
+ v(S, {
50
50
  variant: B.value,
51
- class: "shadow-sm px-4 py-1 text-xs uppercase tracking-wider font-bold"
51
+ class: "shadow-sm px-4 py-1 text-xs uppercase tracking-wider font-bold truncate max-w-full"
52
52
  }, {
53
53
  default: h(() => [
54
54
  b(l(z.value), 1)
55
55
  ]),
56
56
  _: 1
57
57
  }, 8, ["variant"])
58
- ])) : u("", !0),
58
+ ])) : m("", !0),
59
59
  s("div", M, [
60
- s("h3", R, l(T.value), 1),
61
- p.value ? (i(), a("p", q, l(p.value), 1)) : u("", !0)
60
+ s("h3", R, l(I.value), 1),
61
+ p.value ? (i(), a("p", q, l(p.value), 1)) : m("", !0)
62
62
  ]),
63
63
  s("div", A, [
64
64
  s("span", G, l(c.item.price), 1),
65
- f.value ? (i(), a("span", H, l(f.value), 1)) : u("", !0)
65
+ f.value ? (i(), a("span", H, l(f.value), 1)) : m("", !0)
66
66
  ]),
67
67
  s("ul", J, [
68
- (i(!0), a(D, null, E(c.item.features, (d, N) => (i(), a("li", {
68
+ (i(!0), a(j, null, D(c.item.features, (d, N) => (i(), a("li", {
69
69
  key: N,
70
70
  class: "flex items-start gap-3 text-sm group/feature"
71
71
  }, [
@@ -81,20 +81,20 @@ const L = {
81
81
  }))
82
82
  ]),
83
83
  s("span", {
84
- class: m(
84
+ class: u(
85
85
  g(d) ? "text-foreground/90 font-medium" : "text-muted-foreground/60 decoration-slate-300/50"
86
86
  )
87
87
  }, l($(d)), 3)
88
88
  ]))), 128))
89
89
  ]),
90
90
  s("div", O, [
91
- v(S, {
91
+ v(E, {
92
92
  variant: V.value,
93
- class: m(["w-full font-semibold shadow-sm rounded-lg", { "ring-2 ring-primary ring-offset-2": c.selected }]),
93
+ class: u(["w-full font-semibold shadow-sm rounded-lg", { "ring-2 ring-primary ring-offset-2": c.selected }]),
94
94
  size: "lg"
95
95
  }, {
96
96
  default: h(() => [
97
- b(l(w.value), 1)
97
+ b(l(T.value), 1)
98
98
  ]),
99
99
  _: 1
100
100
  }, 8, ["variant", "class"])
@@ -0,0 +1,41 @@
1
+ import { RadioSize, RadioColor } from '../types';
2
+ interface Props {
3
+ modelValue?: any;
4
+ value?: any;
5
+ disabled?: boolean;
6
+ label?: string;
7
+ labelI18n?: string;
8
+ id?: string;
9
+ class?: string;
10
+ size?: RadioSize;
11
+ color?: RadioColor;
12
+ name?: string;
13
+ }
14
+ declare function __VLS_template(): {
15
+ attrs: Partial<{}>;
16
+ slots: {
17
+ default?(_: {}): any;
18
+ };
19
+ refs: {};
20
+ rootEl: HTMLDivElement;
21
+ };
22
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
24
+ "update:modelValue": (value: any) => any;
25
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
26
+ "onUpdate:modelValue"?: (value: any) => any;
27
+ }>, {
28
+ value: any;
29
+ class: string;
30
+ color: RadioColor;
31
+ size: RadioSize;
32
+ disabled: boolean;
33
+ modelValue: any;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
35
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
+ export default _default;
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1,97 @@
1
+ import { defineComponent as x, inject as V, computed as o, unref as s, openBlock as m, createElementBlock as z, createElementVNode as g, withModifiers as $, normalizeClass as f, createBlock as S, withCtx as j, renderSlot as B, createTextVNode as N, toDisplayString as D, createCommentVNode as I } from "vue";
2
+ import M from "./Label.vue.js";
3
+ import { $t as E } from "../utils/i18n.js";
4
+ const G = { class: "flex items-center space-x-2" }, L = ["aria-checked", "data-state", "disabled", "id", "name", "data-testid"], A = /* @__PURE__ */ x({
5
+ __name: "Radio",
6
+ props: {
7
+ modelValue: { default: void 0 },
8
+ value: { default: void 0 },
9
+ disabled: { type: Boolean, default: !1 },
10
+ label: {},
11
+ labelI18n: {},
12
+ id: {},
13
+ class: { default: "" },
14
+ size: { default: void 0 },
15
+ color: { default: void 0 },
16
+ name: {}
17
+ },
18
+ emits: ["update:modelValue"],
19
+ setup(i, { emit: v }) {
20
+ const e = i, p = v, r = V("radioGroup", null), n = o(() => r ? s(r.modelValue) === e.value : e.modelValue === e.value), d = o(() => s(r?.disabled) || e.disabled), u = o(() => e.size || s(r?.size) || "md"), c = o(() => e.color || s(r?.color) || "primary"), h = o(() => s(r?.name) || e.name || `radio-${Math.random().toString(36).substring(2, 9)}`), t = o(() => e.labelI18n ? E(e.labelI18n) : e.label), b = () => {
21
+ d.value || (r ? r.updateValue(e.value) : p("update:modelValue", e.value));
22
+ }, y = {
23
+ xs: "h-3.5 w-3.5",
24
+ sm: "h-4 w-4",
25
+ md: "h-4.5 w-4.5",
26
+ lg: "h-5 w-5",
27
+ xl: "h-5.5 w-5.5"
28
+ }, w = {
29
+ xs: "h-1.5 w-1.5",
30
+ sm: "h-2 w-2",
31
+ md: "h-2.5 w-2.5",
32
+ lg: "h-3 w-3",
33
+ xl: "h-3.5 w-3.5"
34
+ }, l = {
35
+ primary: { border: "border-primary!", bg: "bg-primary", ring: "focus-visible:ring-primary" },
36
+ secondary: { border: "border-secondary!", bg: "bg-secondary", ring: "focus-visible:ring-secondary" },
37
+ success: { border: "border-success!", bg: "bg-success", ring: "focus-visible:ring-success" },
38
+ warning: { border: "border-warning!", bg: "bg-warning", ring: "focus-visible:ring-warning" },
39
+ danger: { border: "border-danger!", bg: "bg-danger", ring: "focus-visible:ring-danger" },
40
+ info: { border: "border-info!", bg: "bg-info", ring: "focus-visible:ring-info" }
41
+ }, C = o(() => {
42
+ const a = l[c.value] || l.primary;
43
+ return [
44
+ "peer shrink-0 rounded-full border transition-all duration-200 ease-in-out",
45
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
46
+ "disabled:cursor-not-allowed disabled:opacity-50",
47
+ "cursor-pointer bg-transparent flex items-center justify-center",
48
+ y[u.value],
49
+ n.value ? a.border : "border-gray-400!",
50
+ a.ring,
51
+ e.class
52
+ ].join(" ");
53
+ }), k = o(() => {
54
+ const a = l[c.value] || l.primary;
55
+ return [
56
+ "rounded-full transition-transform duration-200",
57
+ n.value ? "scale-100" : "scale-0",
58
+ w[u.value],
59
+ a.bg
60
+ ].join(" ");
61
+ });
62
+ return (a, _) => (m(), z("div", G, [
63
+ g("button", {
64
+ type: "button",
65
+ role: "radio",
66
+ "aria-checked": n.value,
67
+ "data-state": n.value ? "checked" : "unchecked",
68
+ disabled: d.value,
69
+ class: f(C.value),
70
+ id: i.id,
71
+ name: h.value,
72
+ "data-testid": a.$attrs["data-testid"] || (i.id ? `radio-${i.id}` : t.value ? `radio-${t.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "radio"),
73
+ onClick: $(b, ["prevent"])
74
+ }, [
75
+ g("div", {
76
+ class: f(k.value)
77
+ }, null, 2)
78
+ ], 10, L),
79
+ t.value || a.$slots.default ? (m(), S(M, {
80
+ key: 0,
81
+ for: i.id,
82
+ class: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
83
+ onClick: b
84
+ }, {
85
+ default: j(() => [
86
+ B(a.$slots, "default", {}, () => [
87
+ N(D(t.value), 1)
88
+ ])
89
+ ]),
90
+ _: 3
91
+ }, 8, ["for"])) : I("", !0)
92
+ ]));
93
+ }
94
+ });
95
+ export {
96
+ A as default
97
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Radio.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,38 @@
1
+ import { RadioSize, RadioColor } from '../types';
2
+ interface Props {
3
+ modelValue?: any;
4
+ name?: string;
5
+ disabled?: boolean;
6
+ direction?: 'row' | 'column';
7
+ size?: RadioSize;
8
+ color?: RadioColor;
9
+ class?: string;
10
+ }
11
+ declare function __VLS_template(): {
12
+ attrs: Partial<{}>;
13
+ slots: {
14
+ default?(_: {}): any;
15
+ };
16
+ refs: {};
17
+ rootEl: HTMLDivElement;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
21
+ "update:modelValue": (value: any) => any;
22
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
23
+ "onUpdate:modelValue"?: (value: any) => any;
24
+ }>, {
25
+ class: string;
26
+ color: RadioColor;
27
+ size: RadioSize;
28
+ disabled: boolean;
29
+ modelValue: any;
30
+ direction: "row" | "column";
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
32
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
33
+ export default _default;
34
+ type __VLS_WithTemplateSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as n, computed as o, provide as i, openBlock as c, createElementBlock as m, normalizeClass as p, renderSlot as f } from "vue";
2
+ const v = /* @__PURE__ */ n({
3
+ __name: "RadioGroup",
4
+ props: {
5
+ modelValue: { default: void 0 },
6
+ name: {},
7
+ disabled: { type: Boolean, default: !1 },
8
+ direction: { default: "column" },
9
+ size: { default: "md" },
10
+ color: { default: "primary" },
11
+ class: { default: "" }
12
+ },
13
+ emits: ["update:modelValue"],
14
+ setup(l, { emit: t }) {
15
+ const e = l, r = t, d = (a) => {
16
+ r("update:modelValue", a);
17
+ }, s = o(() => e.name || `radio-group-${Math.random().toString(36).substring(2, 9)}`);
18
+ i("radioGroup", {
19
+ modelValue: o(() => e.modelValue),
20
+ updateValue: d,
21
+ name: s.value,
22
+ disabled: o(() => e.disabled),
23
+ size: o(() => e.size),
24
+ color: o(() => e.color)
25
+ });
26
+ const u = o(() => e.direction === "row" ? "flex-row space-x-4" : "flex-col space-y-2");
27
+ return (a, V) => (c(), m("div", {
28
+ class: p(["flex", u.value, e.class]),
29
+ role: "radiogroup"
30
+ }, [
31
+ f(a.$slots, "default")
32
+ ], 2));
33
+ }
34
+ });
35
+ export {
36
+ v as default
37
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./RadioGroup.vue.js";
2
+ export {
3
+ f as default
4
+ };