@dimasbaguspm/versaur 0.0.50 → 0.0.52
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.
package/dist/js/forms/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, b as p, a as n, D as i, E as u, P as s, c as I, R as l, S as c, d as S, f as r, e as h, g as P, h as b, T as g, i as o } from "../time-picker-input-
|
|
1
|
+
import { C as a, b as p, a as n, D as i, E as u, P as s, c as I, R as l, S as c, d as S, f as r, e as h, g as P, h as b, T as g, i as o } from "../time-picker-input-BaM8Wdih.js";
|
|
2
2
|
export {
|
|
3
3
|
a as CheckboxInput,
|
|
4
4
|
p as ChipMultipleInput,
|
package/dist/js/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as e, P as t, S as r } from "./skeleton-BNZyaRjo.js";
|
|
2
2
|
import { A as n, a as p, B as u, b as i, F as c, e as l, c as I, P as d, d as B, S, T as m } from "./top-bar-BMw3gFYA.js";
|
|
3
|
-
import { C as b, b as T, a as h, D as x, E as A, P, c as C, R as f, S as k, d as M, f as F, e as L, g as D, h as H, T as R, i as G } from "./time-picker-input-
|
|
3
|
+
import { C as b, b as T, a as h, D as x, E as A, P, c as C, R as f, S as k, d as M, f as F, e as L, g as D, h as H, T as R, i as G } from "./time-picker-input-BaM8Wdih.js";
|
|
4
4
|
import { B as v, D as w, M as E, T as N } from "./tooltip-nZW9TUz3.js";
|
|
5
5
|
import { A as y, a as z, b as J, c as K, d as O, e as Q, f as U, B as V, s as W, g as X, h as Y, i as Z, l as _, j as $, k as aa, C as sa, F as ea, H as ta, m as ra, I as oa, p as na, r as pa, q as ua, M as ia, N as ca, T as la, n as Ia, o as da } from "./image-rectangle-K9jmTTED.js";
|
|
6
6
|
import { S as Sa } from "./snackbar-DH8jCh2V.js";
|
|
@@ -34,7 +34,7 @@ const ue = N("space-y-2", {
|
|
|
34
34
|
throw new Error("CheckboxOption must be used within CheckboxInput");
|
|
35
35
|
return e;
|
|
36
36
|
}, q = b.forwardRef(({ children: e, description: r, className: a, disabled: s, id: n, ...o }, d) => {
|
|
37
|
-
const
|
|
37
|
+
const i = me(), c = b.useId(), l = n || c, u = s || i.disabled;
|
|
38
38
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
39
39
|
/* @__PURE__ */ t.jsx("div", { className: "relative flex items-center mt-0.5", children: /* @__PURE__ */ t.jsx(
|
|
40
40
|
"input",
|
|
@@ -89,8 +89,8 @@ const K = b.forwardRef(
|
|
|
89
89
|
className: n,
|
|
90
90
|
disabled: o,
|
|
91
91
|
required: d,
|
|
92
|
-
children:
|
|
93
|
-
...
|
|
92
|
+
children: i,
|
|
93
|
+
...c
|
|
94
94
|
}, l) => {
|
|
95
95
|
const u = !!a, p = {
|
|
96
96
|
disabled: o
|
|
@@ -101,13 +101,13 @@ const K = b.forwardRef(
|
|
|
101
101
|
ref: l,
|
|
102
102
|
disabled: o,
|
|
103
103
|
className: y("w-full border-0 p-0 m-0", n),
|
|
104
|
-
...
|
|
104
|
+
...c,
|
|
105
105
|
children: [
|
|
106
106
|
e && /* @__PURE__ */ t.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3", children: [
|
|
107
107
|
e,
|
|
108
108
|
d && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
|
|
109
109
|
] }),
|
|
110
|
-
/* @__PURE__ */ t.jsx("div", { className: ue({ direction: s }), children:
|
|
110
|
+
/* @__PURE__ */ t.jsx("div", { className: ue({ direction: s }), children: i }),
|
|
111
111
|
u && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
|
|
112
112
|
!u && r && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: r })
|
|
113
113
|
]
|
|
@@ -140,7 +140,7 @@ const it = Object.assign(K, {
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
), ge = b.forwardRef(({ children: e, className: r, disabled: a, id: s, value: n, ...o }, d) => {
|
|
143
|
-
const { size:
|
|
143
|
+
const { size: i = "md", maxWidth: c, ...l } = he(), u = M(), p = s || u, f = a || l.disabled, m = l.readOnly, h = l.value === n, w = (g) => {
|
|
144
144
|
!f && !m && l.onChange?.(n), o.onChange?.(g);
|
|
145
145
|
};
|
|
146
146
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -165,14 +165,14 @@ const it = Object.assign(K, {
|
|
|
165
165
|
{
|
|
166
166
|
htmlFor: p,
|
|
167
167
|
"data-selected": h,
|
|
168
|
-
style:
|
|
168
|
+
style: c ? { maxWidth: c } : void 0,
|
|
169
169
|
className: y(
|
|
170
170
|
be({
|
|
171
|
-
size:
|
|
171
|
+
size: i
|
|
172
172
|
}),
|
|
173
173
|
f && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
174
174
|
m && "cursor-default pointer-events-none",
|
|
175
|
-
|
|
175
|
+
c && "overflow-hidden",
|
|
176
176
|
r
|
|
177
177
|
),
|
|
178
178
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -180,7 +180,7 @@ const it = Object.assign(K, {
|
|
|
180
180
|
{
|
|
181
181
|
className: y(
|
|
182
182
|
"flex items-center gap-2",
|
|
183
|
-
|
|
183
|
+
c && "truncate min-w-0"
|
|
184
184
|
),
|
|
185
185
|
children: e
|
|
186
186
|
}
|
|
@@ -197,8 +197,8 @@ const it = Object.assign(K, {
|
|
|
197
197
|
error: n,
|
|
198
198
|
className: o,
|
|
199
199
|
disabled: d,
|
|
200
|
-
readOnly:
|
|
201
|
-
maxWidth:
|
|
200
|
+
readOnly: i,
|
|
201
|
+
maxWidth: c,
|
|
202
202
|
name: l,
|
|
203
203
|
value: u,
|
|
204
204
|
onChange: p,
|
|
@@ -208,11 +208,11 @@ const it = Object.assign(K, {
|
|
|
208
208
|
const w = !!n, g = {
|
|
209
209
|
size: e,
|
|
210
210
|
disabled: d,
|
|
211
|
-
readOnly:
|
|
211
|
+
readOnly: i,
|
|
212
212
|
error: w,
|
|
213
213
|
name: l,
|
|
214
214
|
value: u,
|
|
215
|
-
maxWidth:
|
|
215
|
+
maxWidth: c,
|
|
216
216
|
onChange: p
|
|
217
217
|
};
|
|
218
218
|
return /* @__PURE__ */ t.jsx(_.Provider, { value: g, children: /* @__PURE__ */ t.jsxs(
|
|
@@ -258,7 +258,7 @@ const it = Object.assign(K, {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
), ve = b.forwardRef(({ children: e, className: r, disabled: a, id: s, value: n, ...o }, d) => {
|
|
261
|
-
const { size:
|
|
261
|
+
const { size: i = "md", maxWidth: c, ...l } = ye(), u = M(), p = s || u, f = a || l.disabled, m = l.readOnly, h = l.value?.includes(n) ?? !1, w = (g) => {
|
|
262
262
|
if (!f && !m) {
|
|
263
263
|
const I = l.value || [];
|
|
264
264
|
let k;
|
|
@@ -288,14 +288,14 @@ const it = Object.assign(K, {
|
|
|
288
288
|
{
|
|
289
289
|
htmlFor: p,
|
|
290
290
|
"data-selected": h,
|
|
291
|
-
style:
|
|
291
|
+
style: c ? { maxWidth: c } : void 0,
|
|
292
292
|
className: y(
|
|
293
293
|
we({
|
|
294
|
-
size:
|
|
294
|
+
size: i
|
|
295
295
|
}),
|
|
296
296
|
f && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
297
297
|
m && "cursor-default pointer-events-none",
|
|
298
|
-
|
|
298
|
+
c && "overflow-hidden",
|
|
299
299
|
r
|
|
300
300
|
),
|
|
301
301
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -303,7 +303,7 @@ const it = Object.assign(K, {
|
|
|
303
303
|
{
|
|
304
304
|
className: y(
|
|
305
305
|
"flex items-center gap-2",
|
|
306
|
-
|
|
306
|
+
c && "truncate min-w-0"
|
|
307
307
|
),
|
|
308
308
|
children: e
|
|
309
309
|
}
|
|
@@ -320,8 +320,8 @@ const it = Object.assign(K, {
|
|
|
320
320
|
error: n,
|
|
321
321
|
className: o,
|
|
322
322
|
disabled: d,
|
|
323
|
-
readOnly:
|
|
324
|
-
maxWidth:
|
|
323
|
+
readOnly: i,
|
|
324
|
+
maxWidth: c,
|
|
325
325
|
name: l,
|
|
326
326
|
value: u = [],
|
|
327
327
|
onChange: p,
|
|
@@ -331,11 +331,11 @@ const it = Object.assign(K, {
|
|
|
331
331
|
const w = !!n, g = {
|
|
332
332
|
size: e,
|
|
333
333
|
disabled: d,
|
|
334
|
-
readOnly:
|
|
334
|
+
readOnly: i,
|
|
335
335
|
error: w,
|
|
336
336
|
name: l,
|
|
337
337
|
value: u,
|
|
338
|
-
maxWidth:
|
|
338
|
+
maxWidth: c,
|
|
339
339
|
onChange: p
|
|
340
340
|
};
|
|
341
341
|
return /* @__PURE__ */ t.jsx(H.Provider, { value: g, children: /* @__PURE__ */ t.jsxs(
|
|
@@ -382,12 +382,12 @@ const it = Object.assign(K, {
|
|
|
382
382
|
error: n,
|
|
383
383
|
className: o,
|
|
384
384
|
disabled: d,
|
|
385
|
-
readOnly:
|
|
386
|
-
id:
|
|
385
|
+
readOnly: i,
|
|
386
|
+
id: c,
|
|
387
387
|
required: l,
|
|
388
388
|
...u
|
|
389
389
|
}, p) => {
|
|
390
|
-
const f = b.useId(), m =
|
|
390
|
+
const f = b.useId(), m = c || f, h = `${m}-helper`, w = `${m}-error`, g = !!n, I = b.useMemo(() => {
|
|
391
391
|
const k = [];
|
|
392
392
|
return g ? k.push(w) : s && k.push(h), k.length > 0 ? k.join(" ") : void 0;
|
|
393
393
|
}, [g, s, w, h]);
|
|
@@ -420,13 +420,13 @@ const it = Object.assign(K, {
|
|
|
420
420
|
id: m,
|
|
421
421
|
required: l,
|
|
422
422
|
disabled: d,
|
|
423
|
-
readOnly:
|
|
423
|
+
readOnly: i,
|
|
424
424
|
"aria-invalid": g,
|
|
425
425
|
"aria-describedby": I,
|
|
426
426
|
"aria-errormessage": g ? w : void 0,
|
|
427
427
|
className: y(
|
|
428
428
|
ke({
|
|
429
|
-
state: g ? "error" :
|
|
429
|
+
state: g ? "error" : i ? "readOnly" : "default"
|
|
430
430
|
}),
|
|
431
431
|
r ? "pl-9" : "pl-3",
|
|
432
432
|
a ? "pr-9" : "pr-3",
|
|
@@ -469,9 +469,9 @@ function Ie(e) {
|
|
|
469
469
|
day: "numeric"
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
|
-
const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...
|
|
472
|
+
const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...i }, c) {
|
|
473
473
|
const l = T(null), u = (h) => {
|
|
474
|
-
l.current = h, typeof
|
|
474
|
+
l.current = h, typeof c == "function" ? c(h) : c && typeof c == "object" && (c.current = h);
|
|
475
475
|
}, p = () => {
|
|
476
476
|
l.current && (typeof l.current.showPicker == "function" ? l.current.showPicker() : l.current.focus());
|
|
477
477
|
}, f = (h) => {
|
|
@@ -495,7 +495,7 @@ const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
|
|
|
495
495
|
"aria-hidden": "true",
|
|
496
496
|
leftContent: /* @__PURE__ */ t.jsx(O, { as: se, color: "inherit", size: "sm" }),
|
|
497
497
|
"data-testid": "date-single-picker-visible-input",
|
|
498
|
-
...
|
|
498
|
+
...i
|
|
499
499
|
}
|
|
500
500
|
)
|
|
501
501
|
}
|
|
@@ -527,7 +527,7 @@ const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
|
|
|
527
527
|
leftContent: /* @__PURE__ */ t.jsx(O, { as: oe, color: "inherit", size: "sm" })
|
|
528
528
|
}
|
|
529
529
|
)
|
|
530
|
-
), Ne = "w-9 h-9 text-center border border-primary/30 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Ce = "w-9 h-9 text-center border border-danger rounded-md bg-danger/5 transition-colors focus:outline-none focus:ring-2 focus:ring-danger/20 focus:border-danger disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Re = (e) => /^\d$/.test(e), W = (e, r) => e?.replace(/\D/g, "").slice(0, r), J = b.forwardRef(
|
|
530
|
+
), Ne = "w-9 h-9 text-center border border-primary/30 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Ce = "w-9 h-9 text-center border border-danger rounded-md bg-danger/5 transition-colors focus:outline-none focus:ring-2 focus:ring-danger/20 focus:border-danger disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Re = (e) => /^\d$/.test(e), W = (e, r) => e?.replace(/\D/g, "").slice(0, r) || "", J = b.forwardRef(
|
|
531
531
|
({
|
|
532
532
|
value: e,
|
|
533
533
|
onChange: r,
|
|
@@ -536,20 +536,20 @@ const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
|
|
|
536
536
|
onPaste: n,
|
|
537
537
|
disabled: o,
|
|
538
538
|
error: d,
|
|
539
|
-
secure:
|
|
540
|
-
inputRef:
|
|
539
|
+
secure: i,
|
|
540
|
+
inputRef: c,
|
|
541
541
|
index: l,
|
|
542
542
|
id: u
|
|
543
543
|
}, p) => /* @__PURE__ */ t.jsx(
|
|
544
544
|
"input",
|
|
545
545
|
{
|
|
546
|
-
ref:
|
|
546
|
+
ref: c,
|
|
547
547
|
id: u,
|
|
548
548
|
type: "text",
|
|
549
549
|
inputMode: "numeric",
|
|
550
|
-
pattern: "[0-9]*",
|
|
550
|
+
pattern: i ? void 0 : "[0-9]*",
|
|
551
551
|
maxLength: 1,
|
|
552
|
-
value:
|
|
552
|
+
value: i ? e ? "•" : "" : e,
|
|
553
553
|
onChange: (f) => {
|
|
554
554
|
const m = f.target.value;
|
|
555
555
|
(m === "" || Re(m)) && r(m);
|
|
@@ -576,28 +576,28 @@ const Ve = b.forwardRef(
|
|
|
576
576
|
value: n,
|
|
577
577
|
onChange: o,
|
|
578
578
|
onComplete: d,
|
|
579
|
-
digits:
|
|
580
|
-
className:
|
|
579
|
+
digits: i = 6,
|
|
580
|
+
className: c,
|
|
581
581
|
id: l,
|
|
582
582
|
name: u,
|
|
583
583
|
required: p,
|
|
584
584
|
secure: f = !1,
|
|
585
585
|
...m
|
|
586
586
|
}, h) => {
|
|
587
|
-
const w = b.useId(), g = l || w, I = !!a, k = b.useRef([]), C = W(n,
|
|
587
|
+
const w = b.useId(), g = l || w, I = !!a, k = b.useRef([]), C = W(n, i), V = C.split("").concat(Array(i - C.length).fill("")), R = b.useCallback(
|
|
588
588
|
(v) => {
|
|
589
|
-
const x = W(v,
|
|
590
|
-
o(x), x.length ===
|
|
589
|
+
const x = W(v, i);
|
|
590
|
+
o(x), x.length === i && d?.(x);
|
|
591
591
|
},
|
|
592
|
-
[o, d,
|
|
592
|
+
[o, d, i]
|
|
593
593
|
), D = b.useCallback(
|
|
594
594
|
(v, x) => {
|
|
595
595
|
const j = [...V];
|
|
596
596
|
j[v] = x;
|
|
597
597
|
const S = j.join("").replace(/\s+$/, "");
|
|
598
|
-
R(S), x && v <
|
|
598
|
+
R(S), x && v < i - 1 && k.current[v + 1]?.focus();
|
|
599
599
|
},
|
|
600
|
-
[V, R,
|
|
600
|
+
[V, R, i]
|
|
601
601
|
), B = b.useCallback(
|
|
602
602
|
(v, x) => {
|
|
603
603
|
if (x.key === "Backspace") {
|
|
@@ -614,22 +614,22 @@ const Ve = b.forwardRef(
|
|
|
614
614
|
const S = j.join("").replace(/\s+$/, "");
|
|
615
615
|
R(S);
|
|
616
616
|
}
|
|
617
|
-
} else x.key === "ArrowLeft" && v > 0 ? (x.preventDefault(), k.current[v - 1]?.focus()) : x.key === "ArrowRight" && v <
|
|
617
|
+
} else x.key === "ArrowLeft" && v > 0 ? (x.preventDefault(), k.current[v - 1]?.focus()) : x.key === "ArrowRight" && v < i - 1 && (x.preventDefault(), k.current[v + 1]?.focus());
|
|
618
618
|
},
|
|
619
|
-
[V, R,
|
|
619
|
+
[V, R, i]
|
|
620
620
|
), A = b.useCallback(
|
|
621
621
|
(v) => {
|
|
622
622
|
v.preventDefault();
|
|
623
|
-
const x = v.clipboardData.getData("text"), j = W(x,
|
|
623
|
+
const x = v.clipboardData.getData("text"), j = W(x, i);
|
|
624
624
|
if (j.length > 0) {
|
|
625
625
|
R(j);
|
|
626
|
-
const S = Math.min(j.length,
|
|
626
|
+
const S = Math.min(j.length, i - 1);
|
|
627
627
|
k.current[S]?.focus();
|
|
628
628
|
}
|
|
629
629
|
},
|
|
630
|
-
[R,
|
|
630
|
+
[R, i]
|
|
631
631
|
);
|
|
632
|
-
return /* @__PURE__ */ t.jsxs("div", { ref: h, className: y("w-full",
|
|
632
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: h, className: y("w-full", c), ...m, children: [
|
|
633
633
|
e && /* @__PURE__ */ t.jsxs(
|
|
634
634
|
"label",
|
|
635
635
|
{
|
|
@@ -736,8 +736,8 @@ function Q(e, r = !1) {
|
|
|
736
736
|
let n = (a ? e.slice(1) : e).replace(/[^\d.,]/g, "");
|
|
737
737
|
const o = n.lastIndexOf(",");
|
|
738
738
|
if (o !== -1) {
|
|
739
|
-
const d = n.slice(0, o).replace(/,/g, ""),
|
|
740
|
-
n = d + "," +
|
|
739
|
+
const d = n.slice(0, o).replace(/,/g, ""), i = n.slice(o + 1).replace(/,/g, "");
|
|
740
|
+
n = d + "," + i;
|
|
741
741
|
}
|
|
742
742
|
return n = n.replace(/\.{2,}/g, "."), (a ? "-" : "") + n;
|
|
743
743
|
}
|
|
@@ -749,9 +749,9 @@ const ft = ({
|
|
|
749
749
|
label: n,
|
|
750
750
|
helperText: o,
|
|
751
751
|
error: d,
|
|
752
|
-
...
|
|
752
|
+
...i
|
|
753
753
|
}) => {
|
|
754
|
-
const
|
|
754
|
+
const c = T(null), [l, u] = ne(
|
|
755
755
|
e === "" ? "" : String(e)
|
|
756
756
|
);
|
|
757
757
|
Se(e, u);
|
|
@@ -762,20 +762,20 @@ const ft = ({
|
|
|
762
762
|
return /* @__PURE__ */ t.jsx(
|
|
763
763
|
$,
|
|
764
764
|
{
|
|
765
|
-
ref:
|
|
765
|
+
ref: c,
|
|
766
766
|
type: "text",
|
|
767
767
|
label: n,
|
|
768
768
|
value: l,
|
|
769
769
|
onChange: p,
|
|
770
770
|
error: d,
|
|
771
771
|
helperText: o,
|
|
772
|
-
placeholder:
|
|
772
|
+
placeholder: i.placeholder,
|
|
773
773
|
leftContent: /* @__PURE__ */ t.jsx(O, { as: ie, color: "inherit", size: "sm" }),
|
|
774
774
|
inputMode: "numeric",
|
|
775
775
|
autoComplete: "off",
|
|
776
776
|
pattern: "[0-9.,-]*",
|
|
777
777
|
...s,
|
|
778
|
-
...
|
|
778
|
+
...i
|
|
779
779
|
}
|
|
780
780
|
);
|
|
781
781
|
}, Oe = N("space-y-2", {
|
|
@@ -855,29 +855,29 @@ const ft = ({
|
|
|
855
855
|
);
|
|
856
856
|
return e;
|
|
857
857
|
}, Me = b.forwardRef(
|
|
858
|
-
({ children: e, description: r, className: a, disabled: s, id: n, value: o, ...d },
|
|
859
|
-
const
|
|
858
|
+
({ children: e, description: r, className: a, disabled: s, id: n, value: o, ...d }, i) => {
|
|
859
|
+
const c = Fe(), l = b.useId(), u = n || l, p = s || c.disabled, f = c.error ? "danger" : c.variant || "primary";
|
|
860
860
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
861
861
|
/* @__PURE__ */ t.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ t.jsx(
|
|
862
862
|
"input",
|
|
863
863
|
{
|
|
864
|
-
ref:
|
|
864
|
+
ref: i,
|
|
865
865
|
type: "radio",
|
|
866
866
|
id: u,
|
|
867
|
-
name:
|
|
867
|
+
name: c.name,
|
|
868
868
|
value: o,
|
|
869
869
|
disabled: p,
|
|
870
870
|
className: y(
|
|
871
871
|
$e({
|
|
872
872
|
variant: f,
|
|
873
|
-
size:
|
|
873
|
+
size: c.size
|
|
874
874
|
}),
|
|
875
875
|
// Custom radio dot styling using ::before - centered positioning with size variants
|
|
876
876
|
'before:content-[""] before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:bg-white before:opacity-0 before:transition-opacity before:duration-200',
|
|
877
877
|
// Size-specific radio dot dimensions
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
878
|
+
c.size === "sm" && "before:w-[6px] before:h-[6px]",
|
|
879
|
+
c.size === "md" && "before:w-[8px] before:h-[8px]",
|
|
880
|
+
c.size === "lg" && "before:w-[10px] before:h-[10px]",
|
|
881
881
|
"checked:before:opacity-100",
|
|
882
882
|
// Outline variants use colored radio dot
|
|
883
883
|
f?.includes("outline") && "checked:before:bg-current",
|
|
@@ -892,7 +892,7 @@ const ft = ({
|
|
|
892
892
|
{
|
|
893
893
|
htmlFor: u,
|
|
894
894
|
className: Ee({
|
|
895
|
-
size:
|
|
895
|
+
size: c.size,
|
|
896
896
|
disabled: p
|
|
897
897
|
}),
|
|
898
898
|
children: e
|
|
@@ -903,9 +903,9 @@ const ft = ({
|
|
|
903
903
|
{
|
|
904
904
|
className: y(
|
|
905
905
|
"text-gray-600 mt-1",
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
906
|
+
c.size === "sm" && "text-xs",
|
|
907
|
+
c.size === "md" && "text-xs",
|
|
908
|
+
c.size === "lg" && "text-sm",
|
|
909
909
|
p && "opacity-50"
|
|
910
910
|
),
|
|
911
911
|
children: r
|
|
@@ -923,17 +923,17 @@ const ft = ({
|
|
|
923
923
|
error: n,
|
|
924
924
|
direction: o = "vertical",
|
|
925
925
|
className: d,
|
|
926
|
-
disabled:
|
|
927
|
-
name:
|
|
926
|
+
disabled: i,
|
|
927
|
+
name: c,
|
|
928
928
|
children: l,
|
|
929
929
|
...u
|
|
930
930
|
}, p) => {
|
|
931
931
|
const f = !!n, m = {
|
|
932
932
|
variant: e,
|
|
933
933
|
size: r,
|
|
934
|
-
disabled:
|
|
934
|
+
disabled: i,
|
|
935
935
|
error: f,
|
|
936
|
-
name:
|
|
936
|
+
name: c
|
|
937
937
|
};
|
|
938
938
|
return /* @__PURE__ */ t.jsx(U.Provider, { value: m, children: /* @__PURE__ */ t.jsxs("div", { ref: p, className: y("w-full", d), ...u, children: [
|
|
939
939
|
a && /* @__PURE__ */ t.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: a }),
|
|
@@ -954,11 +954,11 @@ const ft = ({
|
|
|
954
954
|
enterKeyHint: o = "search",
|
|
955
955
|
"aria-label": d = "Search",
|
|
956
956
|
// internal default, not in props
|
|
957
|
-
...
|
|
958
|
-
},
|
|
957
|
+
...i
|
|
958
|
+
}, c) => /* @__PURE__ */ t.jsx(
|
|
959
959
|
$,
|
|
960
960
|
{
|
|
961
|
-
ref:
|
|
961
|
+
ref: c,
|
|
962
962
|
type: "search",
|
|
963
963
|
inputMode: a,
|
|
964
964
|
autoComplete: e,
|
|
@@ -968,7 +968,7 @@ const ft = ({
|
|
|
968
968
|
enterKeyHint: o,
|
|
969
969
|
"aria-label": d,
|
|
970
970
|
leftContent: /* @__PURE__ */ t.jsx(O, { as: ce, color: "inherit", size: "sm" }),
|
|
971
|
-
...
|
|
971
|
+
...i
|
|
972
972
|
}
|
|
973
973
|
)
|
|
974
974
|
), Ae = N(
|
|
@@ -998,8 +998,8 @@ const Z = b.forwardRef(
|
|
|
998
998
|
disabled: n,
|
|
999
999
|
readOnly: o,
|
|
1000
1000
|
id: d,
|
|
1001
|
-
required:
|
|
1002
|
-
placeholder:
|
|
1001
|
+
required: i,
|
|
1002
|
+
placeholder: c,
|
|
1003
1003
|
children: l,
|
|
1004
1004
|
onChange: u,
|
|
1005
1005
|
...p
|
|
@@ -1016,7 +1016,7 @@ const Z = b.forwardRef(
|
|
|
1016
1016
|
className: "block text-sm font-medium text-foreground mb-2",
|
|
1017
1017
|
children: [
|
|
1018
1018
|
e,
|
|
1019
|
-
|
|
1019
|
+
i && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
|
|
1020
1020
|
]
|
|
1021
1021
|
}
|
|
1022
1022
|
),
|
|
@@ -1026,7 +1026,7 @@ const Z = b.forwardRef(
|
|
|
1026
1026
|
{
|
|
1027
1027
|
ref: f,
|
|
1028
1028
|
id: h,
|
|
1029
|
-
required:
|
|
1029
|
+
required: i,
|
|
1030
1030
|
disabled: n || o,
|
|
1031
1031
|
"aria-invalid": I,
|
|
1032
1032
|
"aria-describedby": k,
|
|
@@ -1040,7 +1040,7 @@ const Z = b.forwardRef(
|
|
|
1040
1040
|
),
|
|
1041
1041
|
...p,
|
|
1042
1042
|
children: [
|
|
1043
|
-
|
|
1043
|
+
c && /* @__PURE__ */ t.jsx("option", { value: "", disabled: !0, hidden: !0, children: c }),
|
|
1044
1044
|
l
|
|
1045
1045
|
]
|
|
1046
1046
|
}
|
|
@@ -1129,8 +1129,8 @@ const ht = Object.assign(Z, {
|
|
|
1129
1129
|
className: n,
|
|
1130
1130
|
disabled: o,
|
|
1131
1131
|
checkboxPlacement: d = "center",
|
|
1132
|
-
hideCheckbox:
|
|
1133
|
-
...
|
|
1132
|
+
hideCheckbox: i = !1,
|
|
1133
|
+
...c
|
|
1134
1134
|
}, l) => {
|
|
1135
1135
|
const u = M(), p = s || u, f = typeof r == "function" ? r(a) : r;
|
|
1136
1136
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -1142,7 +1142,7 @@ const ht = Object.assign(Z, {
|
|
|
1142
1142
|
checked: !!a,
|
|
1143
1143
|
disabled: !!o,
|
|
1144
1144
|
checkboxPlacement: d,
|
|
1145
|
-
hideCheckbox:
|
|
1145
|
+
hideCheckbox: i
|
|
1146
1146
|
}),
|
|
1147
1147
|
n
|
|
1148
1148
|
),
|
|
@@ -1163,10 +1163,10 @@ const ht = Object.assign(Z, {
|
|
|
1163
1163
|
className: "sr-only",
|
|
1164
1164
|
"aria-hidden": !0,
|
|
1165
1165
|
"aria-checked": a,
|
|
1166
|
-
...
|
|
1166
|
+
...c
|
|
1167
1167
|
}
|
|
1168
1168
|
),
|
|
1169
|
-
!
|
|
1169
|
+
!i && /* @__PURE__ */ t.jsx(
|
|
1170
1170
|
"span",
|
|
1171
1171
|
{
|
|
1172
1172
|
className: y(
|
|
@@ -1246,8 +1246,8 @@ const Ge = N(
|
|
|
1246
1246
|
className: n,
|
|
1247
1247
|
disabled: o,
|
|
1248
1248
|
checkboxPlacement: d = "center",
|
|
1249
|
-
hideCheckbox:
|
|
1250
|
-
...
|
|
1249
|
+
hideCheckbox: i = !1,
|
|
1250
|
+
...c
|
|
1251
1251
|
}, l) => {
|
|
1252
1252
|
const u = M(), p = s || u, f = typeof r == "function" ? r(a) : r;
|
|
1253
1253
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -1259,7 +1259,7 @@ const Ge = N(
|
|
|
1259
1259
|
checked: !!a,
|
|
1260
1260
|
disabled: !!o,
|
|
1261
1261
|
checkboxPlacement: d,
|
|
1262
|
-
hideCheckbox:
|
|
1262
|
+
hideCheckbox: i
|
|
1263
1263
|
}),
|
|
1264
1264
|
n
|
|
1265
1265
|
),
|
|
@@ -1280,10 +1280,10 @@ const Ge = N(
|
|
|
1280
1280
|
className: "sr-only",
|
|
1281
1281
|
"aria-hidden": !0,
|
|
1282
1282
|
"aria-checked": a,
|
|
1283
|
-
...
|
|
1283
|
+
...c
|
|
1284
1284
|
}
|
|
1285
1285
|
),
|
|
1286
|
-
!
|
|
1286
|
+
!i && /* @__PURE__ */ t.jsx(
|
|
1287
1287
|
"span",
|
|
1288
1288
|
{
|
|
1289
1289
|
className: y(
|
|
@@ -1370,8 +1370,8 @@ const _e = N(
|
|
|
1370
1370
|
required: n = !1,
|
|
1371
1371
|
className: o,
|
|
1372
1372
|
id: d,
|
|
1373
|
-
ariaLabel:
|
|
1374
|
-
...
|
|
1373
|
+
ariaLabel: i,
|
|
1374
|
+
...c
|
|
1375
1375
|
}, l) => {
|
|
1376
1376
|
const u = b.useId(), p = d || u, f = e ?? !1, m = (h) => {
|
|
1377
1377
|
r?.(h.target.checked);
|
|
@@ -1385,14 +1385,14 @@ const _e = N(
|
|
|
1385
1385
|
type: "checkbox",
|
|
1386
1386
|
role: "switch",
|
|
1387
1387
|
id: p,
|
|
1388
|
-
"aria-label":
|
|
1388
|
+
"aria-label": i || a,
|
|
1389
1389
|
"aria-checked": f,
|
|
1390
1390
|
checked: f,
|
|
1391
1391
|
disabled: s,
|
|
1392
1392
|
required: n,
|
|
1393
1393
|
onChange: m,
|
|
1394
1394
|
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10 disabled:cursor-not-allowed",
|
|
1395
|
-
...
|
|
1395
|
+
...c
|
|
1396
1396
|
}
|
|
1397
1397
|
),
|
|
1398
1398
|
/* @__PURE__ */ t.jsx(Je, { disabled: s, checked: f }),
|
|
@@ -1437,8 +1437,8 @@ const Ye = N(
|
|
|
1437
1437
|
n.deleteFromDocument();
|
|
1438
1438
|
const o = n.getRangeAt(0), d = document.createTextNode(s);
|
|
1439
1439
|
o.insertNode(d), o.setStartAfter(d), o.setEndAfter(d), n.removeAllRanges(), n.addRange(o);
|
|
1440
|
-
const
|
|
1441
|
-
e.currentTarget.dispatchEvent(
|
|
1440
|
+
const i = new Event("input", { bubbles: !0 });
|
|
1441
|
+
e.currentTarget.dispatchEvent(i);
|
|
1442
1442
|
}, tt = b.forwardRef(
|
|
1443
1443
|
({
|
|
1444
1444
|
label: e,
|
|
@@ -1448,8 +1448,8 @@ const Ye = N(
|
|
|
1448
1448
|
disabled: n,
|
|
1449
1449
|
readOnly: o,
|
|
1450
1450
|
id: d,
|
|
1451
|
-
value:
|
|
1452
|
-
defaultValue:
|
|
1451
|
+
value: i,
|
|
1452
|
+
defaultValue: c,
|
|
1453
1453
|
onChange: l,
|
|
1454
1454
|
placeholder: u,
|
|
1455
1455
|
name: p,
|
|
@@ -1460,7 +1460,7 @@ const Ye = N(
|
|
|
1460
1460
|
onKeyDown: g,
|
|
1461
1461
|
...I
|
|
1462
1462
|
}, k) => {
|
|
1463
|
-
const C = b.useId(), V = d || C, R = !!a, D = b.useRef(null), [B, A] = b.useState(
|
|
1463
|
+
const C = b.useId(), V = d || C, R = !!a, D = b.useRef(null), [B, A] = b.useState(c || ""), v = i !== void 0, x = v ? i : B;
|
|
1464
1464
|
b.useImperativeHandle(k, () => D.current), b.useEffect(() => {
|
|
1465
1465
|
D.current && D.current.textContent !== x && (D.current.textContent = x);
|
|
1466
1466
|
}, [x]);
|