@dimasbaguspm/versaur 0.0.26 → 0.0.28
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/{bottom-sheet-input-1C3Up2xF.js → bottom-sheet-input-BIbHW5ME.js} +255 -244
- package/dist/js/{bottom-sheet-CQw_O-4W.js → bottom-sheet-tOKkkgJA.js} +169 -153
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle--Sy82Ff9.js → image-rectangle-C1zMt0DR.js} +319 -199
- package/dist/js/index.js +68 -64
- package/dist/js/layouts/index.js +8 -6
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +17 -15
- package/dist/js/{tabs-CoNG51E1.js → tabs-CtPlBMP4.js} +1 -1
- package/dist/js/{tooltip-BbTHXz6h.js → tooltip-C_riAXZP.js} +16 -16
- package/dist/js/top-bar-BqLv8_hy.js +731 -0
- package/dist/types/forms/drawer-input/types.d.ts +1 -1
- package/dist/types/layouts/badge-group/badge-group.d.ts +27 -0
- package/dist/types/layouts/badge-group/index.d.ts +2 -0
- package/dist/types/layouts/badge-group/types.d.ts +32 -0
- package/dist/types/layouts/filter-chip-group/filter-chip-group.d.ts +27 -0
- package/dist/types/layouts/filter-chip-group/index.d.ts +2 -0
- package/dist/types/layouts/filter-chip-group/types.d.ts +32 -0
- package/dist/types/layouts/index.d.ts +2 -0
- package/dist/types/overlays/bottom-sheet/types.d.ts +4 -0
- package/dist/types/overlays/drawer/types.d.ts +5 -13
- package/dist/types/overlays/modal/types.d.ts +14 -4
- package/dist/types/primitive/card/card.d.ts +24 -0
- package/dist/types/primitive/card/index.d.ts +2 -0
- package/dist/types/primitive/card/types.d.ts +39 -0
- package/dist/types/primitive/filter-chip/filter-chip.d.ts +3 -0
- package/dist/types/primitive/filter-chip/index.d.ts +2 -0
- package/dist/types/primitive/filter-chip/types.d.ts +35 -0
- package/dist/types/primitive/index.d.ts +2 -0
- package/dist/utils/enforce-subpath-import.js +4 -0
- package/package.json +1 -1
- package/dist/js/top-bar-BjE0FiE8.js +0 -607
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as j, j as e, a as p } from "./index-DOdDlCoL.js";
|
|
2
2
|
import x, { createContext as S, useContext as V, useRef as $, forwardRef as I, useState as O, useId as D, useEffect as X, useMemo as P } from "react";
|
|
3
3
|
import { Check as F, Calendar as Y, SearchIcon as Z, Clock as ee, Banknote as re, MailIcon as te } from "lucide-react";
|
|
4
|
-
import { I as z } from "./image-rectangle
|
|
4
|
+
import { I as z } from "./image-rectangle-C1zMt0DR.js";
|
|
5
5
|
import "./snackbar-DH8jCh2V.js";
|
|
6
|
-
import { M, D as E, B as R } from "./bottom-sheet-
|
|
6
|
+
import { M, D as E, B as R } from "./bottom-sheet-tOKkkgJA.js";
|
|
7
7
|
const oe = j("space-y-2", {
|
|
8
8
|
variants: {
|
|
9
9
|
direction: {
|
|
@@ -76,15 +76,15 @@ const oe = j("space-y-2", {
|
|
|
76
76
|
if (!r)
|
|
77
77
|
throw new Error("CheckboxOption must be used within CheckboxInput");
|
|
78
78
|
return r;
|
|
79
|
-
}, H = x.forwardRef(({ children: r, description: t, className: s, disabled:
|
|
80
|
-
const n = ae(), o = x.useId(),
|
|
79
|
+
}, H = x.forwardRef(({ children: r, description: t, className: s, disabled: d, id: a, ...c }, u) => {
|
|
80
|
+
const n = ae(), o = x.useId(), i = a || o, g = d || n.disabled, f = n.error ? "danger" : n.variant || "primary";
|
|
81
81
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
82
82
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
83
83
|
"input",
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
85
|
+
ref: u,
|
|
86
86
|
type: "checkbox",
|
|
87
|
-
id:
|
|
87
|
+
id: i,
|
|
88
88
|
disabled: g,
|
|
89
89
|
className: p(
|
|
90
90
|
se({
|
|
@@ -102,14 +102,14 @@ const oe = j("space-y-2", {
|
|
|
102
102
|
f?.includes("outline") && "checked:after:border-current",
|
|
103
103
|
s
|
|
104
104
|
),
|
|
105
|
-
...
|
|
105
|
+
...c
|
|
106
106
|
}
|
|
107
107
|
) }),
|
|
108
108
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
109
109
|
/* @__PURE__ */ e.jsx(
|
|
110
110
|
"label",
|
|
111
111
|
{
|
|
112
|
-
htmlFor:
|
|
112
|
+
htmlFor: i,
|
|
113
113
|
className: ne({
|
|
114
114
|
size: n.size,
|
|
115
115
|
disabled: g
|
|
@@ -139,25 +139,25 @@ const L = x.forwardRef(
|
|
|
139
139
|
variant: r = "primary",
|
|
140
140
|
size: t = "md",
|
|
141
141
|
label: s,
|
|
142
|
-
helperText:
|
|
142
|
+
helperText: d,
|
|
143
143
|
error: a,
|
|
144
|
-
direction:
|
|
145
|
-
className:
|
|
144
|
+
direction: c = "vertical",
|
|
145
|
+
className: u,
|
|
146
146
|
disabled: n,
|
|
147
147
|
children: o,
|
|
148
|
-
...
|
|
148
|
+
...i
|
|
149
149
|
}, g) => {
|
|
150
|
-
const f = !!a,
|
|
150
|
+
const f = !!a, l = {
|
|
151
151
|
variant: r,
|
|
152
152
|
size: t,
|
|
153
153
|
disabled: n,
|
|
154
154
|
error: f
|
|
155
155
|
};
|
|
156
|
-
return /* @__PURE__ */ e.jsx(A.Provider, { value:
|
|
156
|
+
return /* @__PURE__ */ e.jsx(A.Provider, { value: l, children: /* @__PURE__ */ e.jsxs("div", { ref: g, className: p("w-full", u), ...i, children: [
|
|
157
157
|
s && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: s }),
|
|
158
|
-
/* @__PURE__ */ e.jsx("div", { className: oe({ direction:
|
|
158
|
+
/* @__PURE__ */ e.jsx("div", { className: oe({ direction: c }), children: o }),
|
|
159
159
|
f && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
|
|
160
|
-
!f &&
|
|
160
|
+
!f && d && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: d })
|
|
161
161
|
] }) });
|
|
162
162
|
}
|
|
163
163
|
);
|
|
@@ -232,22 +232,22 @@ const tr = Object.assign(L, {
|
|
|
232
232
|
children: r,
|
|
233
233
|
className: t,
|
|
234
234
|
disabled: s,
|
|
235
|
-
id:
|
|
235
|
+
id: d,
|
|
236
236
|
value: a,
|
|
237
|
-
check:
|
|
238
|
-
defaultCheck:
|
|
237
|
+
check: c,
|
|
238
|
+
defaultCheck: u = !1,
|
|
239
239
|
...n
|
|
240
240
|
}, o) => {
|
|
241
|
-
const
|
|
241
|
+
const i = ie(), g = x.useId(), f = d || g, l = s || i.disabled, b = [
|
|
242
242
|
"primary",
|
|
243
243
|
"secondary",
|
|
244
244
|
"tertiary",
|
|
245
245
|
"ghost",
|
|
246
246
|
"neutral"
|
|
247
247
|
].includes(
|
|
248
|
-
|
|
249
|
-
) ?
|
|
250
|
-
|
|
248
|
+
i.variant
|
|
249
|
+
) ? i.variant : "primary", w = i.shape || "circle", m = i.size || "sm", v = i.value === a, y = (C) => {
|
|
250
|
+
l || i.onChange?.(a), n.onChange?.(C);
|
|
251
251
|
}, N = m === "lg" ? 20 : m === "md" ? 18 : 16;
|
|
252
252
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
253
253
|
/* @__PURE__ */ e.jsx(
|
|
@@ -256,10 +256,10 @@ const tr = Object.assign(L, {
|
|
|
256
256
|
ref: o,
|
|
257
257
|
type: "radio",
|
|
258
258
|
id: f,
|
|
259
|
-
name:
|
|
259
|
+
name: i.name,
|
|
260
260
|
value: a,
|
|
261
261
|
checked: v,
|
|
262
|
-
disabled:
|
|
262
|
+
disabled: l,
|
|
263
263
|
onChange: y,
|
|
264
264
|
className: "sr-only",
|
|
265
265
|
...n
|
|
@@ -277,11 +277,11 @@ const tr = Object.assign(L, {
|
|
|
277
277
|
shape: w,
|
|
278
278
|
size: m
|
|
279
279
|
}),
|
|
280
|
-
|
|
280
|
+
l && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
281
281
|
t
|
|
282
282
|
),
|
|
283
283
|
children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
284
|
-
(
|
|
284
|
+
(c || u) && /* @__PURE__ */ e.jsx(
|
|
285
285
|
"span",
|
|
286
286
|
{
|
|
287
287
|
className: p(
|
|
@@ -290,7 +290,7 @@ const tr = Object.assign(L, {
|
|
|
290
290
|
v ? "opacity-100 scale-100 mr-1" : "opacity-0 scale-75"
|
|
291
291
|
),
|
|
292
292
|
"aria-hidden": "true",
|
|
293
|
-
children: v && (
|
|
293
|
+
children: v && (c || /* @__PURE__ */ e.jsx(
|
|
294
294
|
F,
|
|
295
295
|
{
|
|
296
296
|
size: N,
|
|
@@ -310,31 +310,31 @@ const tr = Object.assign(L, {
|
|
|
310
310
|
variant: r = "primary",
|
|
311
311
|
shape: t = "circle",
|
|
312
312
|
size: s = "sm",
|
|
313
|
-
label:
|
|
313
|
+
label: d,
|
|
314
314
|
helperText: a,
|
|
315
|
-
error:
|
|
316
|
-
className:
|
|
315
|
+
error: c,
|
|
316
|
+
className: u,
|
|
317
317
|
disabled: n,
|
|
318
318
|
name: o,
|
|
319
|
-
value:
|
|
319
|
+
value: i,
|
|
320
320
|
onChange: g,
|
|
321
321
|
children: f,
|
|
322
|
-
...
|
|
322
|
+
...l
|
|
323
323
|
}, h) => {
|
|
324
|
-
const b = !!
|
|
324
|
+
const b = !!c, w = {
|
|
325
325
|
variant: r,
|
|
326
326
|
shape: t,
|
|
327
327
|
size: s,
|
|
328
328
|
disabled: n,
|
|
329
329
|
error: b,
|
|
330
330
|
name: o,
|
|
331
|
-
value:
|
|
331
|
+
value: i,
|
|
332
332
|
onChange: g
|
|
333
333
|
};
|
|
334
|
-
return /* @__PURE__ */ e.jsx(T.Provider, { value: w, children: /* @__PURE__ */ e.jsxs("div", { ref: h, className: p("w-full",
|
|
335
|
-
|
|
334
|
+
return /* @__PURE__ */ e.jsx(T.Provider, { value: w, children: /* @__PURE__ */ e.jsxs("div", { ref: h, className: p("w-full", u), ...l, children: [
|
|
335
|
+
d && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: d }),
|
|
336
336
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
|
|
337
|
-
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
337
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: c }),
|
|
338
338
|
!b && a && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: a })
|
|
339
339
|
] }) });
|
|
340
340
|
}
|
|
@@ -436,17 +436,17 @@ const tr = Object.assign(L, {
|
|
|
436
436
|
children: r,
|
|
437
437
|
className: t,
|
|
438
438
|
disabled: s,
|
|
439
|
-
id:
|
|
439
|
+
id: d,
|
|
440
440
|
value: a,
|
|
441
|
-
check:
|
|
442
|
-
defaultCheck:
|
|
441
|
+
check: c,
|
|
442
|
+
defaultCheck: u = !1,
|
|
443
443
|
...n
|
|
444
444
|
}, o) => {
|
|
445
|
-
const
|
|
446
|
-
if (!
|
|
447
|
-
const C =
|
|
445
|
+
const i = ue(), g = x.useId(), f = d || g, l = s || i.disabled, h = i.error ? "danger" : i.variant || "primary", b = i.shape || "circle", w = i.size || "sm", m = i.value?.includes(a) ?? !1, v = (N) => {
|
|
446
|
+
if (!l) {
|
|
447
|
+
const C = i.value || [];
|
|
448
448
|
let B;
|
|
449
|
-
m ? B = C.filter((U) => U !== a) : B = [...C, a],
|
|
449
|
+
m ? B = C.filter((U) => U !== a) : B = [...C, a], i.onChange?.(B);
|
|
450
450
|
}
|
|
451
451
|
n.onChange?.(N);
|
|
452
452
|
}, y = w === "lg" ? 20 : w === "md" ? 18 : 16;
|
|
@@ -457,10 +457,10 @@ const tr = Object.assign(L, {
|
|
|
457
457
|
ref: o,
|
|
458
458
|
type: "checkbox",
|
|
459
459
|
id: f,
|
|
460
|
-
name: `${
|
|
460
|
+
name: `${i.name}[]`,
|
|
461
461
|
value: a,
|
|
462
462
|
checked: m,
|
|
463
|
-
disabled:
|
|
463
|
+
disabled: l,
|
|
464
464
|
onChange: v,
|
|
465
465
|
className: "sr-only",
|
|
466
466
|
...n
|
|
@@ -478,11 +478,11 @@ const tr = Object.assign(L, {
|
|
|
478
478
|
shape: b,
|
|
479
479
|
size: w
|
|
480
480
|
}),
|
|
481
|
-
|
|
481
|
+
l && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
482
482
|
t
|
|
483
483
|
),
|
|
484
484
|
children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
485
|
-
(
|
|
485
|
+
(c || u) && /* @__PURE__ */ e.jsx(
|
|
486
486
|
"span",
|
|
487
487
|
{
|
|
488
488
|
className: p(
|
|
@@ -491,7 +491,7 @@ const tr = Object.assign(L, {
|
|
|
491
491
|
m ? "opacity-100 scale-100 mr-1" : "opacity-0 scale-75"
|
|
492
492
|
),
|
|
493
493
|
"aria-hidden": "true",
|
|
494
|
-
children: m && (
|
|
494
|
+
children: m && (c || /* @__PURE__ */ e.jsx(
|
|
495
495
|
F,
|
|
496
496
|
{
|
|
497
497
|
size: y,
|
|
@@ -513,31 +513,31 @@ const fe = x.forwardRef(
|
|
|
513
513
|
variant: r = "primary",
|
|
514
514
|
shape: t = "circle",
|
|
515
515
|
size: s = "sm",
|
|
516
|
-
label:
|
|
516
|
+
label: d,
|
|
517
517
|
helperText: a,
|
|
518
|
-
error:
|
|
519
|
-
className:
|
|
518
|
+
error: c,
|
|
519
|
+
className: u,
|
|
520
520
|
disabled: n,
|
|
521
521
|
name: o,
|
|
522
|
-
value:
|
|
522
|
+
value: i = [],
|
|
523
523
|
onChange: g,
|
|
524
524
|
children: f,
|
|
525
|
-
...
|
|
525
|
+
...l
|
|
526
526
|
}, h) => {
|
|
527
|
-
const b = !!
|
|
527
|
+
const b = !!c, w = {
|
|
528
528
|
variant: r,
|
|
529
529
|
shape: t,
|
|
530
530
|
size: s,
|
|
531
531
|
disabled: n,
|
|
532
532
|
error: b,
|
|
533
533
|
name: o,
|
|
534
|
-
value:
|
|
534
|
+
value: i,
|
|
535
535
|
onChange: g
|
|
536
536
|
};
|
|
537
|
-
return /* @__PURE__ */ e.jsx(G.Provider, { value: w, children: /* @__PURE__ */ e.jsxs("div", { ref: h, className: p("w-full",
|
|
538
|
-
|
|
537
|
+
return /* @__PURE__ */ e.jsx(G.Provider, { value: w, children: /* @__PURE__ */ e.jsxs("div", { ref: h, className: p("w-full", u), ...l, children: [
|
|
538
|
+
d && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: d }),
|
|
539
539
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
|
|
540
|
-
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
540
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: c }),
|
|
541
541
|
!b && a && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: a })
|
|
542
542
|
] }) });
|
|
543
543
|
}
|
|
@@ -580,25 +580,25 @@ const fe = x.forwardRef(
|
|
|
580
580
|
variant: r = "primary",
|
|
581
581
|
label: t,
|
|
582
582
|
leftContent: s,
|
|
583
|
-
rightContent:
|
|
583
|
+
rightContent: d,
|
|
584
584
|
helperText: a,
|
|
585
|
-
error:
|
|
586
|
-
className:
|
|
585
|
+
error: c,
|
|
586
|
+
className: u,
|
|
587
587
|
disabled: n,
|
|
588
588
|
id: o,
|
|
589
|
-
...
|
|
589
|
+
...i
|
|
590
590
|
}, g) => {
|
|
591
|
-
const f = x.useId(),
|
|
591
|
+
const f = x.useId(), l = o || f, h = !!c;
|
|
592
592
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
593
593
|
t && /* @__PURE__ */ e.jsx(
|
|
594
594
|
"label",
|
|
595
595
|
{
|
|
596
|
-
htmlFor:
|
|
596
|
+
htmlFor: l,
|
|
597
597
|
className: "block text-sm font-medium text-foreground mb-2",
|
|
598
598
|
children: t
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
|
-
/* @__PURE__ */ e.jsxs("div", { className: p("relative w-full",
|
|
601
|
+
/* @__PURE__ */ e.jsxs("div", { className: p("relative w-full", u), children: [
|
|
602
602
|
s && /* @__PURE__ */ e.jsx(
|
|
603
603
|
"span",
|
|
604
604
|
{
|
|
@@ -611,7 +611,7 @@ const fe = x.forwardRef(
|
|
|
611
611
|
"input",
|
|
612
612
|
{
|
|
613
613
|
ref: g,
|
|
614
|
-
id:
|
|
614
|
+
id: l,
|
|
615
615
|
"aria-invalid": h,
|
|
616
616
|
"aria-disabled": n,
|
|
617
617
|
disabled: n,
|
|
@@ -620,22 +620,22 @@ const fe = x.forwardRef(
|
|
|
620
620
|
variant: h ? "danger" : r
|
|
621
621
|
}),
|
|
622
622
|
s ? "pl-9" : "pl-3",
|
|
623
|
-
|
|
623
|
+
d ? "pr-9" : "pr-3",
|
|
624
624
|
"h-10"
|
|
625
625
|
),
|
|
626
|
-
...
|
|
626
|
+
...i
|
|
627
627
|
}
|
|
628
628
|
),
|
|
629
|
-
|
|
629
|
+
d && /* @__PURE__ */ e.jsx(
|
|
630
630
|
"span",
|
|
631
631
|
{
|
|
632
632
|
className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
633
633
|
"data-testid": "right-content",
|
|
634
|
-
children:
|
|
634
|
+
children: d
|
|
635
635
|
}
|
|
636
636
|
)
|
|
637
637
|
] }),
|
|
638
|
-
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
638
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: c }),
|
|
639
639
|
!h && a && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: a })
|
|
640
640
|
] });
|
|
641
641
|
}
|
|
@@ -650,13 +650,13 @@ function be(r) {
|
|
|
650
650
|
day: "numeric"
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
|
-
const nr = x.forwardRef(function({ value: t = "", onChange: s, label:
|
|
654
|
-
const n = $(null), o = (
|
|
655
|
-
n.current =
|
|
656
|
-
},
|
|
653
|
+
const nr = x.forwardRef(function({ value: t = "", onChange: s, label: d, formatter: a, ...c }, u) {
|
|
654
|
+
const n = $(null), o = (l) => {
|
|
655
|
+
n.current = l, typeof u == "function" ? u(l) : u && typeof u == "object" && (u.current = l);
|
|
656
|
+
}, i = () => {
|
|
657
657
|
n.current && (typeof n.current.showPicker == "function" ? n.current.showPicker() : n.current.focus());
|
|
658
|
-
}, g = (
|
|
659
|
-
s(
|
|
658
|
+
}, g = (l) => {
|
|
659
|
+
s(l.target.value);
|
|
660
660
|
}, f = (a ?? be)(t);
|
|
661
661
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
662
662
|
/* @__PURE__ */ e.jsx(
|
|
@@ -664,14 +664,14 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
664
664
|
{
|
|
665
665
|
type: "text",
|
|
666
666
|
value: f,
|
|
667
|
-
label:
|
|
667
|
+
label: d,
|
|
668
668
|
readOnly: !0,
|
|
669
669
|
tabIndex: 0,
|
|
670
670
|
"aria-hidden": "true",
|
|
671
|
-
onClick:
|
|
671
|
+
onClick: i,
|
|
672
672
|
leftContent: /* @__PURE__ */ e.jsx(z, { as: Y, color: "inherit", size: "sm" }),
|
|
673
673
|
"data-testid": "date-single-picker-visible-input",
|
|
674
|
-
...
|
|
674
|
+
...c
|
|
675
675
|
}
|
|
676
676
|
),
|
|
677
677
|
/* @__PURE__ */ e.jsx(
|
|
@@ -683,7 +683,7 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
683
683
|
onChange: g,
|
|
684
684
|
className: "sr-only absolute opacity-0 h-0 w-0 pointer-events-none",
|
|
685
685
|
tabIndex: -1,
|
|
686
|
-
"aria-label": typeof
|
|
686
|
+
"aria-label": typeof d == "string" ? d : void 0
|
|
687
687
|
}
|
|
688
688
|
)
|
|
689
689
|
] });
|
|
@@ -764,8 +764,8 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
764
764
|
);
|
|
765
765
|
return r;
|
|
766
766
|
}, we = x.forwardRef(
|
|
767
|
-
({ children: r, description: t, className: s, disabled:
|
|
768
|
-
const o = ye(),
|
|
767
|
+
({ children: r, description: t, className: s, disabled: d, id: a, value: c, ...u }, n) => {
|
|
768
|
+
const o = ye(), i = x.useId(), g = a || i, f = d || o.disabled, l = o.error ? "danger" : o.variant || "primary";
|
|
769
769
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
770
770
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
771
771
|
"input",
|
|
@@ -774,11 +774,11 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
774
774
|
type: "radio",
|
|
775
775
|
id: g,
|
|
776
776
|
name: o.name,
|
|
777
|
-
value:
|
|
777
|
+
value: c,
|
|
778
778
|
disabled: f,
|
|
779
779
|
className: p(
|
|
780
780
|
me({
|
|
781
|
-
variant:
|
|
781
|
+
variant: l,
|
|
782
782
|
size: o.size
|
|
783
783
|
}),
|
|
784
784
|
// Custom radio dot styling using ::before - centered positioning with size variants
|
|
@@ -789,10 +789,10 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
789
789
|
o.size === "lg" && "before:w-[10px] before:h-[10px]",
|
|
790
790
|
"checked:before:opacity-100",
|
|
791
791
|
// Outline variants use colored radio dot
|
|
792
|
-
|
|
792
|
+
l?.includes("outline") && "checked:before:bg-current",
|
|
793
793
|
s
|
|
794
794
|
),
|
|
795
|
-
...
|
|
795
|
+
...u
|
|
796
796
|
}
|
|
797
797
|
) }),
|
|
798
798
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
@@ -828,27 +828,27 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
828
828
|
variant: r = "primary",
|
|
829
829
|
size: t = "md",
|
|
830
830
|
label: s,
|
|
831
|
-
helperText:
|
|
831
|
+
helperText: d,
|
|
832
832
|
error: a,
|
|
833
|
-
direction:
|
|
834
|
-
className:
|
|
833
|
+
direction: c = "vertical",
|
|
834
|
+
className: u,
|
|
835
835
|
disabled: n,
|
|
836
836
|
name: o,
|
|
837
|
-
children:
|
|
837
|
+
children: i,
|
|
838
838
|
...g
|
|
839
839
|
}, f) => {
|
|
840
|
-
const
|
|
840
|
+
const l = !!a, h = {
|
|
841
841
|
variant: r,
|
|
842
842
|
size: t,
|
|
843
843
|
disabled: n,
|
|
844
|
-
error:
|
|
844
|
+
error: l,
|
|
845
845
|
name: o
|
|
846
846
|
};
|
|
847
|
-
return /* @__PURE__ */ e.jsx(W.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: f, className: p("w-full",
|
|
847
|
+
return /* @__PURE__ */ e.jsx(W.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: f, className: p("w-full", u), ...g, children: [
|
|
848
848
|
s && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: s }),
|
|
849
|
-
/* @__PURE__ */ e.jsx("div", { className: xe({ direction:
|
|
850
|
-
|
|
851
|
-
!
|
|
849
|
+
/* @__PURE__ */ e.jsx("div", { className: xe({ direction: c }), children: i }),
|
|
850
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
|
|
851
|
+
!l && d && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: d })
|
|
852
852
|
] }) });
|
|
853
853
|
}
|
|
854
854
|
), ar = Object.assign(ve, {
|
|
@@ -944,13 +944,13 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
944
944
|
);
|
|
945
945
|
return r;
|
|
946
946
|
}, q = x.forwardRef(
|
|
947
|
-
({ children: r, className: t, disabled: s, id:
|
|
948
|
-
const o = Ne(),
|
|
947
|
+
({ children: r, className: t, disabled: s, id: d, value: a, position: c = "middle", ...u }, n) => {
|
|
948
|
+
const o = Ne(), i = x.useId(), g = d || i, f = s || o.disabled, l = o.error ? "danger" : o.variant || "primary", h = o.value === a, b = (w) => {
|
|
949
949
|
if (!f) {
|
|
950
950
|
const m = o.value === a ? null : a;
|
|
951
951
|
o.onChange?.(m);
|
|
952
952
|
}
|
|
953
|
-
|
|
953
|
+
u.onChange?.(w);
|
|
954
954
|
};
|
|
955
955
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
956
956
|
/* @__PURE__ */ e.jsx(
|
|
@@ -965,7 +965,7 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
965
965
|
disabled: f,
|
|
966
966
|
onChange: b,
|
|
967
967
|
className: "sr-only",
|
|
968
|
-
...
|
|
968
|
+
...u
|
|
969
969
|
}
|
|
970
970
|
),
|
|
971
971
|
/* @__PURE__ */ e.jsx(
|
|
@@ -975,11 +975,11 @@ const nr = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatt
|
|
|
975
975
|
className: p(
|
|
976
976
|
"flex flex-row items-center justify-center",
|
|
977
977
|
ke({
|
|
978
|
-
variant:
|
|
978
|
+
variant: l,
|
|
979
979
|
size: o.size,
|
|
980
|
-
rounded:
|
|
980
|
+
rounded: c
|
|
981
981
|
}),
|
|
982
|
-
h && Ie(
|
|
982
|
+
h && Ie(l),
|
|
983
983
|
f && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
984
984
|
t
|
|
985
985
|
),
|
|
@@ -995,24 +995,24 @@ const Ce = x.forwardRef(
|
|
|
995
995
|
variant: r = "primary",
|
|
996
996
|
size: t = "md",
|
|
997
997
|
label: s,
|
|
998
|
-
helperText:
|
|
998
|
+
helperText: d,
|
|
999
999
|
error: a,
|
|
1000
|
-
disabled:
|
|
1001
|
-
name:
|
|
1000
|
+
disabled: c,
|
|
1001
|
+
name: u,
|
|
1002
1002
|
value: n,
|
|
1003
1003
|
onChange: o,
|
|
1004
|
-
children:
|
|
1004
|
+
children: i,
|
|
1005
1005
|
...g
|
|
1006
1006
|
}, f) => {
|
|
1007
|
-
const
|
|
1007
|
+
const l = !!a, h = {
|
|
1008
1008
|
variant: r,
|
|
1009
1009
|
size: t,
|
|
1010
|
-
disabled:
|
|
1011
|
-
error:
|
|
1012
|
-
name:
|
|
1010
|
+
disabled: c,
|
|
1011
|
+
error: l,
|
|
1012
|
+
name: u,
|
|
1013
1013
|
value: n,
|
|
1014
1014
|
onChange: o
|
|
1015
|
-
}, b = x.Children.toArray(
|
|
1015
|
+
}, b = x.Children.toArray(i), w = b.map((m, v) => {
|
|
1016
1016
|
if (x.isValidElement(m)) {
|
|
1017
1017
|
let y;
|
|
1018
1018
|
return b.length === 1 ? y = "single" : v === 0 ? y = "first" : v === b.length - 1 ? y = "last" : y = "middle", x.cloneElement(
|
|
@@ -1029,16 +1029,16 @@ const Ce = x.forwardRef(
|
|
|
1029
1029
|
{
|
|
1030
1030
|
className: p(
|
|
1031
1031
|
je({
|
|
1032
|
-
variant:
|
|
1032
|
+
variant: l ? "danger" : r,
|
|
1033
1033
|
size: t,
|
|
1034
|
-
error:
|
|
1034
|
+
error: l
|
|
1035
1035
|
})
|
|
1036
1036
|
),
|
|
1037
1037
|
children: w
|
|
1038
1038
|
}
|
|
1039
1039
|
),
|
|
1040
|
-
|
|
1041
|
-
!
|
|
1040
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
|
|
1041
|
+
!l && d && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: d })
|
|
1042
1042
|
] }) });
|
|
1043
1043
|
}
|
|
1044
1044
|
), ir = Object.assign(Ce, {
|
|
@@ -1134,14 +1134,14 @@ const Ce = x.forwardRef(
|
|
|
1134
1134
|
);
|
|
1135
1135
|
return r;
|
|
1136
1136
|
}, Q = x.forwardRef(
|
|
1137
|
-
({ children: r, className: t, disabled: s, id:
|
|
1138
|
-
const o = Re(),
|
|
1137
|
+
({ children: r, className: t, disabled: s, id: d, value: a, position: c = "middle", ...u }, n) => {
|
|
1138
|
+
const o = Re(), i = x.useId(), g = d || i, f = s || o.disabled, l = o.error ? "danger" : o.variant || "primary", h = o.value?.includes(a) ?? !1, b = (w) => {
|
|
1139
1139
|
if (!f) {
|
|
1140
1140
|
const m = o.value || [];
|
|
1141
1141
|
let v;
|
|
1142
1142
|
h ? v = m.filter((y) => y !== a) : v = [...m, a], o.onChange?.(v);
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1144
|
+
u.onChange?.(w);
|
|
1145
1145
|
};
|
|
1146
1146
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1147
1147
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1156,7 +1156,7 @@ const Ce = x.forwardRef(
|
|
|
1156
1156
|
disabled: f,
|
|
1157
1157
|
onChange: b,
|
|
1158
1158
|
className: "sr-only",
|
|
1159
|
-
...
|
|
1159
|
+
...u
|
|
1160
1160
|
}
|
|
1161
1161
|
),
|
|
1162
1162
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1166,11 +1166,11 @@ const Ce = x.forwardRef(
|
|
|
1166
1166
|
className: p(
|
|
1167
1167
|
"flex flex-row items-center justify-center",
|
|
1168
1168
|
Se({
|
|
1169
|
-
variant:
|
|
1169
|
+
variant: l,
|
|
1170
1170
|
size: o.size,
|
|
1171
|
-
rounded:
|
|
1171
|
+
rounded: c
|
|
1172
1172
|
}),
|
|
1173
|
-
h && Ve(
|
|
1173
|
+
h && Ve(l),
|
|
1174
1174
|
f && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
1175
1175
|
t
|
|
1176
1176
|
),
|
|
@@ -1186,24 +1186,24 @@ const Oe = x.forwardRef(
|
|
|
1186
1186
|
variant: r = "primary",
|
|
1187
1187
|
size: t = "md",
|
|
1188
1188
|
label: s,
|
|
1189
|
-
helperText:
|
|
1189
|
+
helperText: d,
|
|
1190
1190
|
error: a,
|
|
1191
|
-
disabled:
|
|
1192
|
-
name:
|
|
1191
|
+
disabled: c,
|
|
1192
|
+
name: u,
|
|
1193
1193
|
value: n = [],
|
|
1194
1194
|
onChange: o,
|
|
1195
|
-
children:
|
|
1195
|
+
children: i,
|
|
1196
1196
|
...g
|
|
1197
1197
|
}, f) => {
|
|
1198
|
-
const
|
|
1198
|
+
const l = !!a, h = {
|
|
1199
1199
|
variant: r,
|
|
1200
1200
|
size: t,
|
|
1201
|
-
disabled:
|
|
1202
|
-
error:
|
|
1203
|
-
name:
|
|
1201
|
+
disabled: c,
|
|
1202
|
+
error: l,
|
|
1203
|
+
name: u,
|
|
1204
1204
|
value: n,
|
|
1205
1205
|
onChange: o
|
|
1206
|
-
}, b = x.Children.toArray(
|
|
1206
|
+
}, b = x.Children.toArray(i), w = b.map((m, v) => {
|
|
1207
1207
|
if (x.isValidElement(m)) {
|
|
1208
1208
|
let y;
|
|
1209
1209
|
return b.length === 1 ? y = "single" : v === 0 ? y = "first" : v === b.length - 1 ? y = "last" : y = "middle", x.cloneElement(
|
|
@@ -1220,16 +1220,16 @@ const Oe = x.forwardRef(
|
|
|
1220
1220
|
{
|
|
1221
1221
|
className: p(
|
|
1222
1222
|
ze({
|
|
1223
|
-
variant:
|
|
1223
|
+
variant: l ? "danger" : r,
|
|
1224
1224
|
size: t,
|
|
1225
|
-
error:
|
|
1225
|
+
error: l
|
|
1226
1226
|
})
|
|
1227
1227
|
),
|
|
1228
1228
|
children: w
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
1231
|
-
|
|
1232
|
-
!
|
|
1231
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
|
|
1232
|
+
!l && d && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: d })
|
|
1233
1233
|
] }) });
|
|
1234
1234
|
}
|
|
1235
1235
|
), cr = Object.assign(Oe, {
|
|
@@ -1239,10 +1239,10 @@ const Oe = x.forwardRef(
|
|
|
1239
1239
|
autoComplete: r = "off",
|
|
1240
1240
|
spellCheck: t = !1,
|
|
1241
1241
|
inputMode: s = "search",
|
|
1242
|
-
placeholder:
|
|
1242
|
+
placeholder: d = "Search...",
|
|
1243
1243
|
maxLength: a = 256,
|
|
1244
|
-
enterKeyHint:
|
|
1245
|
-
"aria-label":
|
|
1244
|
+
enterKeyHint: c = "search",
|
|
1245
|
+
"aria-label": u = "Search",
|
|
1246
1246
|
// internal default, not in props
|
|
1247
1247
|
...n
|
|
1248
1248
|
}, o) => /* @__PURE__ */ e.jsx(
|
|
@@ -1253,10 +1253,10 @@ const Oe = x.forwardRef(
|
|
|
1253
1253
|
inputMode: s,
|
|
1254
1254
|
autoComplete: r,
|
|
1255
1255
|
spellCheck: t,
|
|
1256
|
-
placeholder:
|
|
1256
|
+
placeholder: d,
|
|
1257
1257
|
maxLength: a,
|
|
1258
|
-
enterKeyHint:
|
|
1259
|
-
"aria-label":
|
|
1258
|
+
enterKeyHint: c,
|
|
1259
|
+
"aria-label": u,
|
|
1260
1260
|
leftContent: /* @__PURE__ */ e.jsx(z, { as: Z, color: "inherit", size: "sm" }),
|
|
1261
1261
|
...n
|
|
1262
1262
|
}
|
|
@@ -1298,20 +1298,20 @@ const Oe = x.forwardRef(
|
|
|
1298
1298
|
variant: r = "primary",
|
|
1299
1299
|
label: t,
|
|
1300
1300
|
helperText: s,
|
|
1301
|
-
error:
|
|
1301
|
+
error: d,
|
|
1302
1302
|
className: a,
|
|
1303
|
-
disabled:
|
|
1304
|
-
id:
|
|
1303
|
+
disabled: c,
|
|
1304
|
+
id: u,
|
|
1305
1305
|
placeholder: n,
|
|
1306
1306
|
children: o,
|
|
1307
|
-
...
|
|
1307
|
+
...i
|
|
1308
1308
|
}, g) => {
|
|
1309
|
-
const f = x.useId(),
|
|
1309
|
+
const f = x.useId(), l = u || f, h = !!d;
|
|
1310
1310
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1311
1311
|
/* @__PURE__ */ e.jsx(
|
|
1312
1312
|
"label",
|
|
1313
1313
|
{
|
|
1314
|
-
htmlFor:
|
|
1314
|
+
htmlFor: l,
|
|
1315
1315
|
className: "block text-sm font-medium text-foreground mb-2",
|
|
1316
1316
|
children: t
|
|
1317
1317
|
}
|
|
@@ -1321,17 +1321,17 @@ const Oe = x.forwardRef(
|
|
|
1321
1321
|
"select",
|
|
1322
1322
|
{
|
|
1323
1323
|
ref: g,
|
|
1324
|
-
id:
|
|
1324
|
+
id: l,
|
|
1325
1325
|
"aria-invalid": h,
|
|
1326
|
-
"aria-disabled":
|
|
1327
|
-
disabled:
|
|
1326
|
+
"aria-disabled": c,
|
|
1327
|
+
disabled: c,
|
|
1328
1328
|
className: p(
|
|
1329
1329
|
Me({
|
|
1330
1330
|
variant: h ? "danger" : r
|
|
1331
1331
|
}),
|
|
1332
1332
|
"h-10 pl-3"
|
|
1333
1333
|
),
|
|
1334
|
-
...
|
|
1334
|
+
...i,
|
|
1335
1335
|
children: [
|
|
1336
1336
|
n && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: n }),
|
|
1337
1337
|
o
|
|
@@ -1357,7 +1357,7 @@ const Oe = x.forwardRef(
|
|
|
1357
1357
|
}
|
|
1358
1358
|
) })
|
|
1359
1359
|
] }),
|
|
1360
|
-
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
1360
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: d }),
|
|
1361
1361
|
!h && s && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: s })
|
|
1362
1362
|
] });
|
|
1363
1363
|
}
|
|
@@ -1405,19 +1405,19 @@ const Fe = j(
|
|
|
1405
1405
|
variant: r = "primary",
|
|
1406
1406
|
label: t,
|
|
1407
1407
|
helperText: s,
|
|
1408
|
-
error:
|
|
1408
|
+
error: d,
|
|
1409
1409
|
className: a,
|
|
1410
|
-
disabled:
|
|
1411
|
-
id:
|
|
1410
|
+
disabled: c,
|
|
1411
|
+
id: u,
|
|
1412
1412
|
minRows: n = 3,
|
|
1413
1413
|
maxRows: o,
|
|
1414
|
-
fieldSizing:
|
|
1414
|
+
fieldSizing: i = "fixed",
|
|
1415
1415
|
style: g,
|
|
1416
1416
|
rows: f,
|
|
1417
|
-
...
|
|
1417
|
+
...l
|
|
1418
1418
|
}, h) => {
|
|
1419
|
-
const b = x.useId(), w =
|
|
1420
|
-
...
|
|
1419
|
+
const b = x.useId(), w = u || b, m = !!d, v = f || n, y = i === "content" ? void 0 : o, N = {
|
|
1420
|
+
...i === "content" && { fieldSizing: "content" },
|
|
1421
1421
|
...y && {
|
|
1422
1422
|
maxHeight: `${y * 1.5}rem`
|
|
1423
1423
|
// Approximate line height
|
|
@@ -1440,27 +1440,27 @@ const Fe = j(
|
|
|
1440
1440
|
id: w,
|
|
1441
1441
|
rows: v,
|
|
1442
1442
|
"aria-invalid": m,
|
|
1443
|
-
"aria-disabled":
|
|
1444
|
-
disabled:
|
|
1443
|
+
"aria-disabled": c,
|
|
1444
|
+
disabled: c,
|
|
1445
1445
|
style: N,
|
|
1446
1446
|
className: p(
|
|
1447
1447
|
Fe({
|
|
1448
1448
|
variant: m ? "danger" : r,
|
|
1449
|
-
fieldSizing:
|
|
1449
|
+
fieldSizing: i
|
|
1450
1450
|
}),
|
|
1451
1451
|
"px-3 py-2"
|
|
1452
1452
|
),
|
|
1453
|
-
...
|
|
1453
|
+
...l
|
|
1454
1454
|
}
|
|
1455
1455
|
) }),
|
|
1456
|
-
m && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
1456
|
+
m && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: d }),
|
|
1457
1457
|
!m && s && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: s })
|
|
1458
1458
|
] });
|
|
1459
1459
|
}
|
|
1460
1460
|
);
|
|
1461
1461
|
Be.displayName = "TextAreaInput";
|
|
1462
1462
|
const lr = I(function(t, s) {
|
|
1463
|
-
const
|
|
1463
|
+
const d = (a) => {
|
|
1464
1464
|
t?.onChange?.(a.target.value);
|
|
1465
1465
|
};
|
|
1466
1466
|
return /* @__PURE__ */ e.jsx(
|
|
@@ -1472,7 +1472,7 @@ const lr = I(function(t, s) {
|
|
|
1472
1472
|
leftContent: /* @__PURE__ */ e.jsx(z, { as: ee, color: "inherit", size: "sm" }),
|
|
1473
1473
|
ref: s,
|
|
1474
1474
|
...t,
|
|
1475
|
-
onChange:
|
|
1475
|
+
onChange: d
|
|
1476
1476
|
}
|
|
1477
1477
|
);
|
|
1478
1478
|
}), De = j(
|
|
@@ -1554,7 +1554,7 @@ const lr = I(function(t, s) {
|
|
|
1554
1554
|
color: r = "primary",
|
|
1555
1555
|
size: t = "md",
|
|
1556
1556
|
disabled: s = !1,
|
|
1557
|
-
className:
|
|
1557
|
+
className: d,
|
|
1558
1558
|
checked: a
|
|
1559
1559
|
}) => /* @__PURE__ */ e.jsx(
|
|
1560
1560
|
"span",
|
|
@@ -1562,18 +1562,18 @@ const lr = I(function(t, s) {
|
|
|
1562
1562
|
className: p(
|
|
1563
1563
|
De({ color: r, size: t, disabled: s, checked: a }),
|
|
1564
1564
|
"rounded-full pointer-events-none",
|
|
1565
|
-
|
|
1565
|
+
d
|
|
1566
1566
|
),
|
|
1567
1567
|
"aria-hidden": "true"
|
|
1568
1568
|
}
|
|
1569
|
-
), Ae = ({ size: r = "md", checked: t = !1 }) => /* @__PURE__ */ e.jsx("span", { className: p(Pe({ size: r, checked: t })), "aria-hidden": "true" }), He = ({ label: r, htmlFor: t, placement: s = "top", disabled:
|
|
1569
|
+
), Ae = ({ size: r = "md", checked: t = !1 }) => /* @__PURE__ */ e.jsx("span", { className: p(Pe({ size: r, checked: t })), "aria-hidden": "true" }), He = ({ label: r, htmlFor: t, placement: s = "top", disabled: d = !1 }) => r ? /* @__PURE__ */ e.jsx(
|
|
1570
1570
|
"label",
|
|
1571
1571
|
{
|
|
1572
1572
|
htmlFor: t,
|
|
1573
1573
|
className: p(
|
|
1574
1574
|
"text-sm select-none font-medium text-foreground",
|
|
1575
1575
|
s === "inline" ? "ml-2 mb-0" : "mb-1",
|
|
1576
|
-
|
|
1576
|
+
d && "opacity-50 cursor-not-allowed"
|
|
1577
1577
|
),
|
|
1578
1578
|
children: r
|
|
1579
1579
|
}
|
|
@@ -1582,19 +1582,19 @@ const lr = I(function(t, s) {
|
|
|
1582
1582
|
checked: r,
|
|
1583
1583
|
defaultChecked: t,
|
|
1584
1584
|
onCheckedChange: s,
|
|
1585
|
-
color:
|
|
1585
|
+
color: d = "primary",
|
|
1586
1586
|
size: a = "md",
|
|
1587
|
-
label:
|
|
1588
|
-
labelPlacement:
|
|
1587
|
+
label: c,
|
|
1588
|
+
labelPlacement: u = "top",
|
|
1589
1589
|
disabled: n = !1,
|
|
1590
1590
|
className: o,
|
|
1591
|
-
id:
|
|
1591
|
+
id: i,
|
|
1592
1592
|
ariaLabel: g,
|
|
1593
1593
|
...f
|
|
1594
|
-
},
|
|
1594
|
+
}, l) => {
|
|
1595
1595
|
const [h, b] = O(
|
|
1596
1596
|
t ?? !1
|
|
1597
|
-
), w = D(), m =
|
|
1597
|
+
), w = D(), m = i || w, v = typeof r == "boolean", y = v ? r : h, N = (C) => {
|
|
1598
1598
|
v || b(C.target.checked), s?.(C.target.checked);
|
|
1599
1599
|
};
|
|
1600
1600
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -1602,16 +1602,16 @@ const lr = I(function(t, s) {
|
|
|
1602
1602
|
{
|
|
1603
1603
|
className: p(
|
|
1604
1604
|
"flex flex-col",
|
|
1605
|
-
|
|
1605
|
+
u === "inline" && "flex-row items-center",
|
|
1606
1606
|
o
|
|
1607
1607
|
),
|
|
1608
1608
|
children: [
|
|
1609
1609
|
/* @__PURE__ */ e.jsx(
|
|
1610
1610
|
He,
|
|
1611
1611
|
{
|
|
1612
|
-
label:
|
|
1612
|
+
label: c,
|
|
1613
1613
|
htmlFor: m,
|
|
1614
|
-
placement:
|
|
1614
|
+
placement: u,
|
|
1615
1615
|
disabled: n
|
|
1616
1616
|
}
|
|
1617
1617
|
),
|
|
@@ -1620,16 +1620,16 @@ const lr = I(function(t, s) {
|
|
|
1620
1620
|
{
|
|
1621
1621
|
className: p(
|
|
1622
1622
|
"relative flex items-center",
|
|
1623
|
-
|
|
1623
|
+
u === "inline" && "ml-2"
|
|
1624
1624
|
),
|
|
1625
1625
|
children: [
|
|
1626
1626
|
/* @__PURE__ */ e.jsx(
|
|
1627
1627
|
"input",
|
|
1628
1628
|
{
|
|
1629
|
-
ref:
|
|
1629
|
+
ref: l,
|
|
1630
1630
|
type: "checkbox",
|
|
1631
1631
|
id: m,
|
|
1632
|
-
"aria-label": g ||
|
|
1632
|
+
"aria-label": g || c,
|
|
1633
1633
|
checked: y,
|
|
1634
1634
|
disabled: n,
|
|
1635
1635
|
onChange: N,
|
|
@@ -1640,7 +1640,7 @@ const lr = I(function(t, s) {
|
|
|
1640
1640
|
/* @__PURE__ */ e.jsx(
|
|
1641
1641
|
$e,
|
|
1642
1642
|
{
|
|
1643
|
-
color:
|
|
1643
|
+
color: d,
|
|
1644
1644
|
size: a,
|
|
1645
1645
|
disabled: n,
|
|
1646
1646
|
checked: y
|
|
@@ -1665,38 +1665,38 @@ const ur = ({
|
|
|
1665
1665
|
value: r,
|
|
1666
1666
|
onChange: t,
|
|
1667
1667
|
allowNegative: s = !1,
|
|
1668
|
-
inputProps:
|
|
1668
|
+
inputProps: d,
|
|
1669
1669
|
label: a,
|
|
1670
|
-
helperText:
|
|
1671
|
-
error:
|
|
1670
|
+
helperText: c,
|
|
1671
|
+
error: u,
|
|
1672
1672
|
variant: n,
|
|
1673
1673
|
...o
|
|
1674
1674
|
}) => {
|
|
1675
|
-
const
|
|
1675
|
+
const i = $(null), [g, f] = O(
|
|
1676
1676
|
r === "" ? "" : String(r)
|
|
1677
1677
|
);
|
|
1678
1678
|
Te(r, f);
|
|
1679
|
-
const
|
|
1679
|
+
const l = (h) => {
|
|
1680
1680
|
let b = h.target.value.replace(/[^\d.,-]/g, "");
|
|
1681
1681
|
s || (b = b.replace(/-/g, "")), f(b), t(b);
|
|
1682
1682
|
};
|
|
1683
1683
|
return /* @__PURE__ */ e.jsx(
|
|
1684
1684
|
k,
|
|
1685
1685
|
{
|
|
1686
|
-
ref:
|
|
1686
|
+
ref: i,
|
|
1687
1687
|
type: "text",
|
|
1688
1688
|
label: a,
|
|
1689
1689
|
value: g,
|
|
1690
|
-
onChange:
|
|
1691
|
-
error:
|
|
1692
|
-
helperText:
|
|
1690
|
+
onChange: l,
|
|
1691
|
+
error: u,
|
|
1692
|
+
helperText: c,
|
|
1693
1693
|
placeholder: o.placeholder,
|
|
1694
1694
|
leftContent: /* @__PURE__ */ e.jsx(z, { as: re, color: "inherit", size: "sm" }),
|
|
1695
1695
|
variant: n,
|
|
1696
1696
|
inputMode: "numeric",
|
|
1697
1697
|
autoComplete: "off",
|
|
1698
1698
|
pattern: s ? "^-?[\\d,.]*$" : "^[\\d,.]*$",
|
|
1699
|
-
...
|
|
1699
|
+
...d,
|
|
1700
1700
|
...o
|
|
1701
1701
|
}
|
|
1702
1702
|
);
|
|
@@ -1748,37 +1748,37 @@ const ur = ({
|
|
|
1748
1748
|
disabled: !1
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
), fr = I(({ value: r, label: t, checked: s, id:
|
|
1752
|
-
const o = D(),
|
|
1751
|
+
), fr = I(({ value: r, label: t, checked: s, id: d, className: a, disabled: c, ...u }, n) => {
|
|
1752
|
+
const o = D(), i = d || o;
|
|
1753
1753
|
return /* @__PURE__ */ e.jsxs(
|
|
1754
1754
|
"label",
|
|
1755
1755
|
{
|
|
1756
|
-
htmlFor:
|
|
1756
|
+
htmlFor: i,
|
|
1757
1757
|
className: p(
|
|
1758
1758
|
Ge({
|
|
1759
1759
|
checked: !!s,
|
|
1760
|
-
disabled: !!
|
|
1760
|
+
disabled: !!c
|
|
1761
1761
|
}),
|
|
1762
1762
|
a
|
|
1763
1763
|
),
|
|
1764
1764
|
"aria-checked": s,
|
|
1765
1765
|
role: "radio",
|
|
1766
1766
|
"aria-label": `Select ${r}`,
|
|
1767
|
-
tabIndex:
|
|
1767
|
+
tabIndex: c ? -1 : 0,
|
|
1768
1768
|
children: [
|
|
1769
1769
|
/* @__PURE__ */ e.jsx(
|
|
1770
1770
|
"input",
|
|
1771
1771
|
{
|
|
1772
1772
|
ref: n,
|
|
1773
|
-
id:
|
|
1773
|
+
id: i,
|
|
1774
1774
|
type: "radio",
|
|
1775
1775
|
value: r,
|
|
1776
1776
|
checked: s,
|
|
1777
|
-
disabled:
|
|
1777
|
+
disabled: c,
|
|
1778
1778
|
className: "sr-only",
|
|
1779
1779
|
"aria-hidden": !0,
|
|
1780
1780
|
"aria-checked": s,
|
|
1781
|
-
...
|
|
1781
|
+
...u
|
|
1782
1782
|
}
|
|
1783
1783
|
),
|
|
1784
1784
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1786,7 +1786,7 @@ const ur = ({
|
|
|
1786
1786
|
{
|
|
1787
1787
|
className: Ke({
|
|
1788
1788
|
checked: !!s,
|
|
1789
|
-
disabled: !!
|
|
1789
|
+
disabled: !!c
|
|
1790
1790
|
}),
|
|
1791
1791
|
"aria-hidden": "true",
|
|
1792
1792
|
children: s ? /* @__PURE__ */ e.jsx(z, { as: F, color: "neutral", size: "md" }) : null
|
|
@@ -1832,37 +1832,37 @@ const ur = ({
|
|
|
1832
1832
|
disabled: !1
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
|
-
), hr = I(({ value: r, label: t, checked: s, id:
|
|
1836
|
-
const o = D(),
|
|
1835
|
+
), hr = I(({ value: r, label: t, checked: s, id: d, className: a, disabled: c, ...u }, n) => {
|
|
1836
|
+
const o = D(), i = d || o;
|
|
1837
1837
|
return /* @__PURE__ */ e.jsxs(
|
|
1838
1838
|
"label",
|
|
1839
1839
|
{
|
|
1840
|
-
htmlFor:
|
|
1840
|
+
htmlFor: i,
|
|
1841
1841
|
className: p(
|
|
1842
1842
|
We({
|
|
1843
1843
|
checked: !!s,
|
|
1844
|
-
disabled: !!
|
|
1844
|
+
disabled: !!c
|
|
1845
1845
|
}),
|
|
1846
1846
|
a
|
|
1847
1847
|
),
|
|
1848
1848
|
"aria-checked": s,
|
|
1849
1849
|
role: "checkbox",
|
|
1850
1850
|
"aria-label": `Select ${r}`,
|
|
1851
|
-
tabIndex:
|
|
1851
|
+
tabIndex: c ? -1 : 0,
|
|
1852
1852
|
children: [
|
|
1853
1853
|
/* @__PURE__ */ e.jsx(
|
|
1854
1854
|
"input",
|
|
1855
1855
|
{
|
|
1856
1856
|
ref: n,
|
|
1857
|
-
id:
|
|
1857
|
+
id: i,
|
|
1858
1858
|
type: "checkbox",
|
|
1859
1859
|
value: r,
|
|
1860
1860
|
checked: s,
|
|
1861
|
-
disabled:
|
|
1861
|
+
disabled: c,
|
|
1862
1862
|
className: "sr-only",
|
|
1863
1863
|
"aria-hidden": !0,
|
|
1864
1864
|
"aria-checked": s,
|
|
1865
|
-
...
|
|
1865
|
+
...u
|
|
1866
1866
|
}
|
|
1867
1867
|
),
|
|
1868
1868
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1870,7 +1870,7 @@ const ur = ({
|
|
|
1870
1870
|
{
|
|
1871
1871
|
className: _e({
|
|
1872
1872
|
checked: !!s,
|
|
1873
|
-
disabled: !!
|
|
1873
|
+
disabled: !!c
|
|
1874
1874
|
}),
|
|
1875
1875
|
"aria-hidden": "true",
|
|
1876
1876
|
children: s ? /* @__PURE__ */ e.jsx(z, { as: F, color: "neutral", size: "md" }) : null
|
|
@@ -1881,8 +1881,8 @@ const ur = ({
|
|
|
1881
1881
|
}
|
|
1882
1882
|
);
|
|
1883
1883
|
}), qe = I(
|
|
1884
|
-
({ children: r, onChange: t, value: s, size:
|
|
1885
|
-
const [n, o] = O(!1),
|
|
1884
|
+
({ children: r, onChange: t, value: s, size: d, placement: a, ...c }, u) => {
|
|
1885
|
+
const [n, o] = O(!1), i = P(
|
|
1886
1886
|
() => ({ isOpen: n, setIsOpen: o, onChange: t, value: s }),
|
|
1887
1887
|
[n, o, t, s]
|
|
1888
1888
|
);
|
|
@@ -1890,10 +1890,10 @@ const ur = ({
|
|
|
1890
1890
|
/* @__PURE__ */ e.jsx(
|
|
1891
1891
|
k,
|
|
1892
1892
|
{
|
|
1893
|
-
...
|
|
1893
|
+
...c,
|
|
1894
1894
|
onChange: t,
|
|
1895
1895
|
value: s,
|
|
1896
|
-
ref:
|
|
1896
|
+
ref: u,
|
|
1897
1897
|
readOnly: !0,
|
|
1898
1898
|
tabIndex: 0,
|
|
1899
1899
|
onClick: () => o(!0),
|
|
@@ -1909,9 +1909,9 @@ const ur = ({
|
|
|
1909
1909
|
{
|
|
1910
1910
|
isOpen: n,
|
|
1911
1911
|
onClose: () => o(!1),
|
|
1912
|
-
size:
|
|
1912
|
+
size: d,
|
|
1913
1913
|
placement: a,
|
|
1914
|
-
children: n && r(
|
|
1914
|
+
children: n && r(i)
|
|
1915
1915
|
}
|
|
1916
1916
|
)
|
|
1917
1917
|
] });
|
|
@@ -1921,37 +1921,48 @@ const ur = ({
|
|
|
1921
1921
|
Body: M.Body,
|
|
1922
1922
|
Footer: M.Footer
|
|
1923
1923
|
}), Je = I(
|
|
1924
|
-
({
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1924
|
+
({
|
|
1925
|
+
children: r,
|
|
1926
|
+
onChange: t,
|
|
1927
|
+
value: s,
|
|
1928
|
+
size: d,
|
|
1929
|
+
position: a,
|
|
1930
|
+
disableEscapeKeyDown: c,
|
|
1931
|
+
disableOverlayClickToClose: u,
|
|
1932
|
+
...n
|
|
1933
|
+
}, o) => {
|
|
1934
|
+
const [i, g] = O(!1), f = P(
|
|
1935
|
+
() => ({ isOpen: i, setIsOpen: g, onChange: t, value: s }),
|
|
1936
|
+
[i, g, t, s]
|
|
1928
1937
|
);
|
|
1929
1938
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1930
1939
|
/* @__PURE__ */ e.jsx(
|
|
1931
1940
|
k,
|
|
1932
1941
|
{
|
|
1933
|
-
...
|
|
1942
|
+
...n,
|
|
1934
1943
|
onChange: t,
|
|
1935
1944
|
value: s,
|
|
1936
|
-
ref:
|
|
1945
|
+
ref: o,
|
|
1937
1946
|
readOnly: !0,
|
|
1938
1947
|
tabIndex: 0,
|
|
1939
|
-
onClick: () =>
|
|
1940
|
-
onKeyDown: (
|
|
1941
|
-
(
|
|
1948
|
+
onClick: () => g(!0),
|
|
1949
|
+
onKeyDown: (l) => {
|
|
1950
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), g(!0));
|
|
1942
1951
|
},
|
|
1943
1952
|
"aria-haspopup": "dialog",
|
|
1944
|
-
"aria-expanded":
|
|
1953
|
+
"aria-expanded": i
|
|
1945
1954
|
}
|
|
1946
1955
|
),
|
|
1947
1956
|
/* @__PURE__ */ e.jsx(
|
|
1948
1957
|
E,
|
|
1949
1958
|
{
|
|
1950
|
-
isOpen:
|
|
1951
|
-
onClose:
|
|
1952
|
-
size:
|
|
1959
|
+
isOpen: i,
|
|
1960
|
+
onClose: () => g(!1),
|
|
1961
|
+
size: d,
|
|
1953
1962
|
position: a,
|
|
1954
|
-
|
|
1963
|
+
disableEscapeKeyDown: c,
|
|
1964
|
+
disableOverlayClickToClose: u,
|
|
1965
|
+
children: i && r(f)
|
|
1955
1966
|
}
|
|
1956
1967
|
)
|
|
1957
1968
|
] });
|
|
@@ -1960,30 +1971,30 @@ const ur = ({
|
|
|
1960
1971
|
Header: E.Header,
|
|
1961
1972
|
Body: E.Body,
|
|
1962
1973
|
Footer: E.Footer
|
|
1963
|
-
}), Qe = I(({ children: r, onChange: t, value: s, ...
|
|
1964
|
-
const [
|
|
1965
|
-
() => ({ isOpen:
|
|
1966
|
-
[
|
|
1974
|
+
}), Qe = I(({ children: r, onChange: t, value: s, ...d }, a) => {
|
|
1975
|
+
const [c, u] = O(!1), n = P(
|
|
1976
|
+
() => ({ isOpen: c, setIsOpen: u, onChange: t, value: s }),
|
|
1977
|
+
[c, u, t, s]
|
|
1967
1978
|
);
|
|
1968
1979
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1969
1980
|
/* @__PURE__ */ e.jsx(
|
|
1970
1981
|
k,
|
|
1971
1982
|
{
|
|
1972
|
-
...
|
|
1983
|
+
...d,
|
|
1973
1984
|
onChange: t,
|
|
1974
1985
|
value: s,
|
|
1975
1986
|
ref: a,
|
|
1976
1987
|
readOnly: !0,
|
|
1977
1988
|
tabIndex: 0,
|
|
1978
|
-
onClick: () =>
|
|
1989
|
+
onClick: () => u(!0),
|
|
1979
1990
|
"aria-haspopup": "dialog",
|
|
1980
|
-
"aria-expanded":
|
|
1991
|
+
"aria-expanded": c,
|
|
1981
1992
|
onKeyDown: (o) => {
|
|
1982
|
-
(o.key === "Enter" || o.key === " ") && (o.preventDefault(),
|
|
1993
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), u(!0));
|
|
1983
1994
|
}
|
|
1984
1995
|
}
|
|
1985
1996
|
),
|
|
1986
|
-
/* @__PURE__ */ e.jsx(R, { isOpen:
|
|
1997
|
+
/* @__PURE__ */ e.jsx(R, { isOpen: c, onClose: () => u(!1), children: c && r(n) })
|
|
1987
1998
|
] });
|
|
1988
1999
|
}), mr = Object.assign(Qe, {
|
|
1989
2000
|
Header: R.Header,
|