@dimasbaguspm/versaur 0.0.18 → 0.0.19
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 +11 -9
- package/dist/js/{description-list-DZQF212Z.js → image-rectangle-CLU-GVtw.js} +263 -76
- package/dist/js/index.js +53 -47
- package/dist/js/primitive/index.js +15 -11
- package/dist/js/{email-input-BIbrfs5q.js → selectable-multiple-input-CJXfqy1Z.js} +573 -403
- package/dist/types/forms/index.d.ts +2 -0
- package/dist/types/forms/selectable-multiple-input/index.d.ts +2 -0
- package/dist/types/forms/selectable-multiple-input/selectable-multiple-input.d.ts +6 -0
- package/dist/types/forms/selectable-multiple-input/types.d.ts +18 -0
- package/dist/types/forms/selectable-single-input/index.d.ts +2 -0
- package/dist/types/forms/selectable-single-input/selectable-single-input.d.ts +6 -0
- package/dist/types/forms/selectable-single-input/types.d.ts +18 -0
- package/dist/types/primitive/image/base-image.atoms.d.ts +6 -0
- package/dist/types/primitive/image/base-image.d.ts +6 -0
- package/dist/types/primitive/image/image-circle.d.ts +6 -0
- package/dist/types/primitive/image/image-rectangle.d.ts +6 -0
- package/dist/types/primitive/image/image-square.d.ts +6 -0
- package/dist/types/primitive/image/index.d.ts +5 -0
- package/dist/types/primitive/image/types.d.ts +48 -0
- package/dist/types/primitive/image/use-image.d.ts +13 -0
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/utils/enforce-subpath-import.js +6 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import x, { createContext as
|
|
3
|
-
import { Check as
|
|
4
|
-
import { I as
|
|
1
|
+
import { c as j, j as e, a as p } from "./index-DOdDlCoL.js";
|
|
2
|
+
import x, { createContext as C, useContext as z, useRef as M, forwardRef as V, useState as F, useId as E, useEffect as J } from "react";
|
|
3
|
+
import { Check as R, Calendar as K, SearchIcon as Q, Clock as U, Banknote as X, MailIcon as Y } from "lucide-react";
|
|
4
|
+
import { I as N } from "./image-rectangle-CLU-GVtw.js";
|
|
5
5
|
import "./snackbar-DH8jCh2V.js";
|
|
6
|
-
const Z =
|
|
6
|
+
const Z = j("space-y-2", {
|
|
7
7
|
variants: {
|
|
8
8
|
direction: {
|
|
9
9
|
vertical: "space-y-2 space-x-0",
|
|
@@ -13,7 +13,7 @@ const Z = k("space-y-2", {
|
|
|
13
13
|
defaultVariants: {
|
|
14
14
|
direction: "vertical"
|
|
15
15
|
}
|
|
16
|
-
}), ee =
|
|
16
|
+
}), ee = j(
|
|
17
17
|
"relative h-4 w-4 rounded border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed appearance-none bg-white",
|
|
18
18
|
{
|
|
19
19
|
variants: {
|
|
@@ -51,7 +51,7 @@ const Z = k("space-y-2", {
|
|
|
51
51
|
size: "md"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
), re =
|
|
54
|
+
), re = j(
|
|
55
55
|
"text-foreground cursor-pointer select-none",
|
|
56
56
|
{
|
|
57
57
|
variants: {
|
|
@@ -70,47 +70,47 @@ const Z = k("space-y-2", {
|
|
|
70
70
|
disabled: !1
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
),
|
|
74
|
-
const r =
|
|
73
|
+
), P = C(null), te = () => {
|
|
74
|
+
const r = z(P);
|
|
75
75
|
if (!r)
|
|
76
76
|
throw new Error("CheckboxOption must be used within CheckboxInput");
|
|
77
77
|
return r;
|
|
78
|
-
},
|
|
79
|
-
const
|
|
78
|
+
}, B = x.forwardRef(({ children: r, description: t, className: s, disabled: c, id: n, ...d }, u) => {
|
|
79
|
+
const a = te(), o = x.useId(), i = n || o, h = c || a.disabled, g = a.error ? "danger" : a.variant || "primary";
|
|
80
80
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
81
81
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
82
82
|
"input",
|
|
83
83
|
{
|
|
84
|
-
ref:
|
|
84
|
+
ref: u,
|
|
85
85
|
type: "checkbox",
|
|
86
|
-
id:
|
|
86
|
+
id: i,
|
|
87
87
|
disabled: h,
|
|
88
88
|
className: p(
|
|
89
89
|
ee({
|
|
90
|
-
variant:
|
|
91
|
-
size:
|
|
90
|
+
variant: g,
|
|
91
|
+
size: a.size
|
|
92
92
|
}),
|
|
93
93
|
// Custom checkmark styling using ::after - centered positioning with size variants
|
|
94
94
|
'after:content-[""] after:absolute after:left-1/2 after:top-[45%] after:-translate-x-1/2 after:-translate-y-1/2 after:border-b-2 after:border-r-2 after:border-white after:rotate-45 after:opacity-0 after:transition-opacity after:duration-200',
|
|
95
95
|
// Size-specific checkmark dimensions
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
a.size === "sm" && "after:w-[3px] after:h-[6px]",
|
|
97
|
+
a.size === "md" && "after:w-[4px] after:h-[8px]",
|
|
98
|
+
a.size === "lg" && "after:w-[6px] after:h-[10px]",
|
|
99
99
|
"checked:after:opacity-100",
|
|
100
100
|
// Outline variants use colored checkmark
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
g?.includes("outline") && "checked:after:border-current",
|
|
102
|
+
s
|
|
103
103
|
),
|
|
104
|
-
...
|
|
104
|
+
...d
|
|
105
105
|
}
|
|
106
106
|
) }),
|
|
107
107
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
108
108
|
/* @__PURE__ */ e.jsx(
|
|
109
109
|
"label",
|
|
110
110
|
{
|
|
111
|
-
htmlFor:
|
|
111
|
+
htmlFor: i,
|
|
112
112
|
className: re({
|
|
113
|
-
size:
|
|
113
|
+
size: a.size,
|
|
114
114
|
disabled: h
|
|
115
115
|
}),
|
|
116
116
|
children: r
|
|
@@ -121,9 +121,9 @@ const Z = k("space-y-2", {
|
|
|
121
121
|
{
|
|
122
122
|
className: p(
|
|
123
123
|
"text-gray-600 mt-1",
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
a.size === "sm" && "text-xs",
|
|
125
|
+
a.size === "md" && "text-xs",
|
|
126
|
+
a.size === "lg" && "text-sm",
|
|
127
127
|
h && "opacity-50"
|
|
128
128
|
),
|
|
129
129
|
children: t
|
|
@@ -132,45 +132,45 @@ const Z = k("space-y-2", {
|
|
|
132
132
|
] })
|
|
133
133
|
] });
|
|
134
134
|
});
|
|
135
|
-
|
|
135
|
+
B.displayName = "CheckboxOption";
|
|
136
136
|
const D = x.forwardRef(
|
|
137
137
|
({
|
|
138
138
|
variant: r = "primary",
|
|
139
139
|
size: t = "md",
|
|
140
|
-
label:
|
|
141
|
-
helperText:
|
|
140
|
+
label: s,
|
|
141
|
+
helperText: c,
|
|
142
142
|
error: n,
|
|
143
|
-
direction:
|
|
144
|
-
className:
|
|
145
|
-
disabled:
|
|
143
|
+
direction: d = "vertical",
|
|
144
|
+
className: u,
|
|
145
|
+
disabled: a,
|
|
146
146
|
children: o,
|
|
147
|
-
...
|
|
147
|
+
...i
|
|
148
148
|
}, h) => {
|
|
149
|
-
const
|
|
149
|
+
const g = !!n, l = {
|
|
150
150
|
variant: r,
|
|
151
151
|
size: t,
|
|
152
|
-
disabled:
|
|
153
|
-
error:
|
|
152
|
+
disabled: a,
|
|
153
|
+
error: g
|
|
154
154
|
};
|
|
155
|
-
return /* @__PURE__ */ e.jsx(
|
|
156
|
-
|
|
157
|
-
/* @__PURE__ */ e.jsx("div", { className: Z({ direction:
|
|
158
|
-
|
|
159
|
-
!
|
|
155
|
+
return /* @__PURE__ */ e.jsx(P.Provider, { value: l, children: /* @__PURE__ */ e.jsxs("div", { ref: h, className: p("w-full", u), ...i, children: [
|
|
156
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: s }),
|
|
157
|
+
/* @__PURE__ */ e.jsx("div", { className: Z({ direction: d }), children: o }),
|
|
158
|
+
g && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
159
|
+
!g && c && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: c })
|
|
160
160
|
] }) });
|
|
161
161
|
}
|
|
162
162
|
);
|
|
163
163
|
D.displayName = "CheckboxInput";
|
|
164
|
-
const
|
|
165
|
-
Option:
|
|
166
|
-
}),
|
|
167
|
-
const r =
|
|
164
|
+
const Ke = Object.assign(D, {
|
|
165
|
+
Option: B
|
|
166
|
+
}), $ = C(null), oe = () => {
|
|
167
|
+
const r = z($);
|
|
168
168
|
if (!r)
|
|
169
169
|
throw new Error(
|
|
170
170
|
"useChipSingleInputContext must be used within ChipSingleInputContext"
|
|
171
171
|
);
|
|
172
172
|
return r;
|
|
173
|
-
},
|
|
173
|
+
}, se = j(
|
|
174
174
|
"inline-flex items-center bg-white font-regular transition-colors duration-200 cursor-pointer border border-border",
|
|
175
175
|
{
|
|
176
176
|
variants: {
|
|
@@ -226,61 +226,61 @@ const _e = Object.assign(D, {
|
|
|
226
226
|
selected: !1
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
),
|
|
229
|
+
), ne = x.forwardRef(
|
|
230
230
|
({
|
|
231
231
|
children: r,
|
|
232
232
|
className: t,
|
|
233
|
-
disabled:
|
|
234
|
-
id:
|
|
233
|
+
disabled: s,
|
|
234
|
+
id: c,
|
|
235
235
|
value: n,
|
|
236
|
-
check:
|
|
237
|
-
defaultCheck:
|
|
238
|
-
...
|
|
236
|
+
check: d,
|
|
237
|
+
defaultCheck: u = !1,
|
|
238
|
+
...a
|
|
239
239
|
}, o) => {
|
|
240
|
-
const
|
|
240
|
+
const i = oe(), h = x.useId(), g = c || h, l = s || i.disabled, b = [
|
|
241
241
|
"primary",
|
|
242
242
|
"secondary",
|
|
243
243
|
"tertiary",
|
|
244
244
|
"ghost",
|
|
245
245
|
"neutral"
|
|
246
246
|
].includes(
|
|
247
|
-
|
|
248
|
-
) ?
|
|
249
|
-
|
|
250
|
-
},
|
|
247
|
+
i.variant
|
|
248
|
+
) ? i.variant : "primary", w = i.shape || "circle", m = i.size || "sm", v = i.value === n, y = (I) => {
|
|
249
|
+
l || i.onChange?.(n), a.onChange?.(I);
|
|
250
|
+
}, k = m === "lg" ? 20 : m === "md" ? 18 : 16;
|
|
251
251
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
252
252
|
/* @__PURE__ */ e.jsx(
|
|
253
253
|
"input",
|
|
254
254
|
{
|
|
255
255
|
ref: o,
|
|
256
256
|
type: "radio",
|
|
257
|
-
id:
|
|
258
|
-
name:
|
|
257
|
+
id: g,
|
|
258
|
+
name: i.name,
|
|
259
259
|
value: n,
|
|
260
260
|
checked: v,
|
|
261
|
-
disabled:
|
|
261
|
+
disabled: l,
|
|
262
262
|
onChange: y,
|
|
263
263
|
className: "sr-only",
|
|
264
|
-
...
|
|
264
|
+
...a
|
|
265
265
|
}
|
|
266
266
|
),
|
|
267
267
|
/* @__PURE__ */ e.jsx(
|
|
268
268
|
"label",
|
|
269
269
|
{
|
|
270
|
-
htmlFor:
|
|
270
|
+
htmlFor: g,
|
|
271
271
|
"data-selected": v,
|
|
272
272
|
className: p(
|
|
273
|
-
|
|
273
|
+
se({
|
|
274
274
|
variant: b,
|
|
275
275
|
selected: v,
|
|
276
276
|
shape: w,
|
|
277
277
|
size: m
|
|
278
278
|
}),
|
|
279
|
-
|
|
279
|
+
l && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
280
280
|
t
|
|
281
281
|
),
|
|
282
282
|
children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
283
|
-
(
|
|
283
|
+
(d || u) && /* @__PURE__ */ e.jsx(
|
|
284
284
|
"span",
|
|
285
285
|
{
|
|
286
286
|
className: p(
|
|
@@ -289,10 +289,10 @@ const _e = Object.assign(D, {
|
|
|
289
289
|
v ? "opacity-100 scale-100 mr-1" : "opacity-0 scale-75"
|
|
290
290
|
),
|
|
291
291
|
"aria-hidden": "true",
|
|
292
|
-
children: v && (
|
|
293
|
-
|
|
292
|
+
children: v && (d || /* @__PURE__ */ e.jsx(
|
|
293
|
+
R,
|
|
294
294
|
{
|
|
295
|
-
size:
|
|
295
|
+
size: k,
|
|
296
296
|
className: b === "primary" ? "text-primary" : b === "secondary" ? "text-secondary" : b === "tertiary" ? "text-tertiary" : b === "ghost" ? "text-ghost" : b === "neutral" ? "text-neutral" : "text-primary"
|
|
297
297
|
}
|
|
298
298
|
))
|
|
@@ -308,45 +308,45 @@ const _e = Object.assign(D, {
|
|
|
308
308
|
({
|
|
309
309
|
variant: r = "primary",
|
|
310
310
|
shape: t = "circle",
|
|
311
|
-
size:
|
|
312
|
-
label:
|
|
311
|
+
size: s = "sm",
|
|
312
|
+
label: c,
|
|
313
313
|
helperText: n,
|
|
314
|
-
error:
|
|
315
|
-
className:
|
|
316
|
-
disabled:
|
|
314
|
+
error: d,
|
|
315
|
+
className: u,
|
|
316
|
+
disabled: a,
|
|
317
317
|
name: o,
|
|
318
|
-
value:
|
|
318
|
+
value: i,
|
|
319
319
|
onChange: h,
|
|
320
|
-
children:
|
|
321
|
-
...
|
|
320
|
+
children: g,
|
|
321
|
+
...l
|
|
322
322
|
}, f) => {
|
|
323
|
-
const b = !!
|
|
323
|
+
const b = !!d, w = {
|
|
324
324
|
variant: r,
|
|
325
325
|
shape: t,
|
|
326
|
-
size:
|
|
327
|
-
disabled:
|
|
326
|
+
size: s,
|
|
327
|
+
disabled: a,
|
|
328
328
|
error: b,
|
|
329
329
|
name: o,
|
|
330
|
-
value:
|
|
330
|
+
value: i,
|
|
331
331
|
onChange: h
|
|
332
332
|
};
|
|
333
|
-
return /* @__PURE__ */ e.jsx(
|
|
334
|
-
|
|
335
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children:
|
|
336
|
-
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
333
|
+
return /* @__PURE__ */ e.jsx($.Provider, { value: w, children: /* @__PURE__ */ e.jsxs("div", { ref: f, className: p("w-full", u), ...l, children: [
|
|
334
|
+
c && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: c }),
|
|
335
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: g }),
|
|
336
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: d }),
|
|
337
337
|
!b && n && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: n })
|
|
338
338
|
] }) });
|
|
339
339
|
}
|
|
340
|
-
),
|
|
341
|
-
Option:
|
|
342
|
-
}),
|
|
343
|
-
const r =
|
|
340
|
+
), Qe = Object.assign(ae, {
|
|
341
|
+
Option: ne
|
|
342
|
+
}), A = C(null), ie = () => {
|
|
343
|
+
const r = z(A);
|
|
344
344
|
if (!r)
|
|
345
345
|
throw new Error(
|
|
346
346
|
"useChipMultipleInputContext must be used within ChipMultipleInputContext"
|
|
347
347
|
);
|
|
348
348
|
return r;
|
|
349
|
-
}, ce =
|
|
349
|
+
}, ce = j(
|
|
350
350
|
"inline-flex items-center bg-white font-regular transition-colors duration-200 cursor-pointer border border-border",
|
|
351
351
|
{
|
|
352
352
|
variants: {
|
|
@@ -430,24 +430,24 @@ const _e = Object.assign(D, {
|
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
),
|
|
433
|
+
), L = x.forwardRef(
|
|
434
434
|
({
|
|
435
435
|
children: r,
|
|
436
436
|
className: t,
|
|
437
|
-
disabled:
|
|
438
|
-
id:
|
|
437
|
+
disabled: s,
|
|
438
|
+
id: c,
|
|
439
439
|
value: n,
|
|
440
|
-
check:
|
|
441
|
-
defaultCheck:
|
|
442
|
-
...
|
|
440
|
+
check: d,
|
|
441
|
+
defaultCheck: u = !1,
|
|
442
|
+
...a
|
|
443
443
|
}, o) => {
|
|
444
|
-
const
|
|
445
|
-
if (!
|
|
446
|
-
const
|
|
447
|
-
let
|
|
448
|
-
m ?
|
|
444
|
+
const i = ie(), h = x.useId(), g = c || h, l = s || i.disabled, f = i.error ? "danger" : i.variant || "primary", b = i.shape || "circle", w = i.size || "sm", m = i.value?.includes(n) ?? !1, v = (k) => {
|
|
445
|
+
if (!l) {
|
|
446
|
+
const I = i.value || [];
|
|
447
|
+
let O;
|
|
448
|
+
m ? O = I.filter((q) => q !== n) : O = [...I, n], i.onChange?.(O);
|
|
449
449
|
}
|
|
450
|
-
|
|
450
|
+
a.onChange?.(k);
|
|
451
451
|
}, y = w === "lg" ? 20 : w === "md" ? 18 : 16;
|
|
452
452
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
453
453
|
/* @__PURE__ */ e.jsx(
|
|
@@ -455,20 +455,20 @@ const _e = Object.assign(D, {
|
|
|
455
455
|
{
|
|
456
456
|
ref: o,
|
|
457
457
|
type: "checkbox",
|
|
458
|
-
id:
|
|
459
|
-
name: `${
|
|
458
|
+
id: g,
|
|
459
|
+
name: `${i.name}[]`,
|
|
460
460
|
value: n,
|
|
461
461
|
checked: m,
|
|
462
|
-
disabled:
|
|
462
|
+
disabled: l,
|
|
463
463
|
onChange: v,
|
|
464
464
|
className: "sr-only",
|
|
465
|
-
...
|
|
465
|
+
...a
|
|
466
466
|
}
|
|
467
467
|
),
|
|
468
468
|
/* @__PURE__ */ e.jsx(
|
|
469
469
|
"label",
|
|
470
470
|
{
|
|
471
|
-
htmlFor:
|
|
471
|
+
htmlFor: g,
|
|
472
472
|
"data-selected": m,
|
|
473
473
|
className: p(
|
|
474
474
|
ce({
|
|
@@ -477,11 +477,11 @@ const _e = Object.assign(D, {
|
|
|
477
477
|
shape: b,
|
|
478
478
|
size: w
|
|
479
479
|
}),
|
|
480
|
-
|
|
480
|
+
l && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
481
481
|
t
|
|
482
482
|
),
|
|
483
483
|
children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
484
|
-
(
|
|
484
|
+
(d || u) && /* @__PURE__ */ e.jsx(
|
|
485
485
|
"span",
|
|
486
486
|
{
|
|
487
487
|
className: p(
|
|
@@ -490,8 +490,8 @@ const _e = Object.assign(D, {
|
|
|
490
490
|
m ? "opacity-100 scale-100 mr-1" : "opacity-0 scale-75"
|
|
491
491
|
),
|
|
492
492
|
"aria-hidden": "true",
|
|
493
|
-
children: m && (
|
|
494
|
-
|
|
493
|
+
children: m && (d || /* @__PURE__ */ e.jsx(
|
|
494
|
+
R,
|
|
495
495
|
{
|
|
496
496
|
size: y,
|
|
497
497
|
className: f === "primary" ? "text-primary" : f === "secondary" ? "text-secondary" : f === "tertiary" ? "text-tertiary" : f === "ghost" ? "text-ghost" : f === "success" ? "text-success" : f === "info" ? "text-info" : f === "warning" ? "text-warning" : f === "danger" ? "text-danger" : "text-primary"
|
|
@@ -506,43 +506,43 @@ const _e = Object.assign(D, {
|
|
|
506
506
|
] });
|
|
507
507
|
}
|
|
508
508
|
);
|
|
509
|
-
|
|
509
|
+
L.displayName = "ChipMultipleOption";
|
|
510
510
|
const de = x.forwardRef(
|
|
511
511
|
({
|
|
512
512
|
variant: r = "primary",
|
|
513
513
|
shape: t = "circle",
|
|
514
|
-
size:
|
|
515
|
-
label:
|
|
514
|
+
size: s = "sm",
|
|
515
|
+
label: c,
|
|
516
516
|
helperText: n,
|
|
517
|
-
error:
|
|
518
|
-
className:
|
|
519
|
-
disabled:
|
|
517
|
+
error: d,
|
|
518
|
+
className: u,
|
|
519
|
+
disabled: a,
|
|
520
520
|
name: o,
|
|
521
|
-
value:
|
|
521
|
+
value: i = [],
|
|
522
522
|
onChange: h,
|
|
523
|
-
children:
|
|
524
|
-
...
|
|
523
|
+
children: g,
|
|
524
|
+
...l
|
|
525
525
|
}, f) => {
|
|
526
|
-
const b = !!
|
|
526
|
+
const b = !!d, w = {
|
|
527
527
|
variant: r,
|
|
528
528
|
shape: t,
|
|
529
|
-
size:
|
|
530
|
-
disabled:
|
|
529
|
+
size: s,
|
|
530
|
+
disabled: a,
|
|
531
531
|
error: b,
|
|
532
532
|
name: o,
|
|
533
|
-
value:
|
|
533
|
+
value: i,
|
|
534
534
|
onChange: h
|
|
535
535
|
};
|
|
536
|
-
return /* @__PURE__ */ e.jsx(
|
|
537
|
-
|
|
538
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children:
|
|
539
|
-
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
536
|
+
return /* @__PURE__ */ e.jsx(A.Provider, { value: w, children: /* @__PURE__ */ e.jsxs("div", { ref: f, className: p("w-full", u), ...l, children: [
|
|
537
|
+
c && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: c }),
|
|
538
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: g }),
|
|
539
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: d }),
|
|
540
540
|
!b && n && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: n })
|
|
541
541
|
] }) });
|
|
542
542
|
}
|
|
543
|
-
),
|
|
544
|
-
Option:
|
|
545
|
-
}), le =
|
|
543
|
+
), Ue = Object.assign(de, {
|
|
544
|
+
Option: L
|
|
545
|
+
}), le = j(
|
|
546
546
|
"block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50",
|
|
547
547
|
{
|
|
548
548
|
variants: {
|
|
@@ -574,72 +574,72 @@ const de = x.forwardRef(
|
|
|
574
574
|
variant: "primary"
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
),
|
|
577
|
+
), S = x.forwardRef(
|
|
578
578
|
({
|
|
579
579
|
variant: r = "primary",
|
|
580
580
|
label: t,
|
|
581
|
-
leftContent:
|
|
582
|
-
rightContent:
|
|
581
|
+
leftContent: s,
|
|
582
|
+
rightContent: c,
|
|
583
583
|
helperText: n,
|
|
584
|
-
error:
|
|
585
|
-
className:
|
|
586
|
-
disabled:
|
|
584
|
+
error: d,
|
|
585
|
+
className: u,
|
|
586
|
+
disabled: a,
|
|
587
587
|
id: o,
|
|
588
|
-
...
|
|
588
|
+
...i
|
|
589
589
|
}, h) => {
|
|
590
|
-
const
|
|
590
|
+
const g = x.useId(), l = o || g, f = !!d;
|
|
591
591
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
592
592
|
t && /* @__PURE__ */ e.jsx(
|
|
593
593
|
"label",
|
|
594
594
|
{
|
|
595
|
-
htmlFor:
|
|
595
|
+
htmlFor: l,
|
|
596
596
|
className: "block text-sm font-medium text-foreground mb-2",
|
|
597
597
|
children: t
|
|
598
598
|
}
|
|
599
599
|
),
|
|
600
|
-
/* @__PURE__ */ e.jsxs("div", { className: p("relative w-full",
|
|
601
|
-
|
|
600
|
+
/* @__PURE__ */ e.jsxs("div", { className: p("relative w-full", u), children: [
|
|
601
|
+
s && /* @__PURE__ */ e.jsx(
|
|
602
602
|
"span",
|
|
603
603
|
{
|
|
604
604
|
className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
605
605
|
"data-testid": "left-content",
|
|
606
|
-
children:
|
|
606
|
+
children: s
|
|
607
607
|
}
|
|
608
608
|
),
|
|
609
609
|
/* @__PURE__ */ e.jsx(
|
|
610
610
|
"input",
|
|
611
611
|
{
|
|
612
612
|
ref: h,
|
|
613
|
-
id:
|
|
613
|
+
id: l,
|
|
614
614
|
"aria-invalid": f,
|
|
615
|
-
"aria-disabled":
|
|
616
|
-
disabled:
|
|
615
|
+
"aria-disabled": a,
|
|
616
|
+
disabled: a,
|
|
617
617
|
className: p(
|
|
618
618
|
le({
|
|
619
619
|
variant: f ? "danger" : r
|
|
620
620
|
}),
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
s ? "pl-9" : "pl-3",
|
|
622
|
+
c ? "pr-9" : "pr-3",
|
|
623
623
|
"h-10"
|
|
624
624
|
),
|
|
625
|
-
...
|
|
625
|
+
...i
|
|
626
626
|
}
|
|
627
627
|
),
|
|
628
|
-
|
|
628
|
+
c && /* @__PURE__ */ e.jsx(
|
|
629
629
|
"span",
|
|
630
630
|
{
|
|
631
631
|
className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
632
632
|
"data-testid": "right-content",
|
|
633
|
-
children:
|
|
633
|
+
children: c
|
|
634
634
|
}
|
|
635
635
|
)
|
|
636
636
|
] }),
|
|
637
|
-
f && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
637
|
+
f && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: d }),
|
|
638
638
|
!f && n && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: n })
|
|
639
639
|
] });
|
|
640
640
|
}
|
|
641
641
|
);
|
|
642
|
-
|
|
642
|
+
S.displayName = "TextInput";
|
|
643
643
|
function ue(r) {
|
|
644
644
|
if (!r) return "";
|
|
645
645
|
const t = new Date(r);
|
|
@@ -649,28 +649,28 @@ function ue(r) {
|
|
|
649
649
|
day: "numeric"
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
-
const
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
},
|
|
656
|
-
|
|
657
|
-
}, h = (
|
|
658
|
-
|
|
659
|
-
},
|
|
652
|
+
const Xe = x.forwardRef(function({ value: t = "", onChange: s, label: c, formatter: n, ...d }, u) {
|
|
653
|
+
const a = M(null), o = (l) => {
|
|
654
|
+
a.current = l, typeof u == "function" ? u(l) : u && typeof u == "object" && (u.current = l);
|
|
655
|
+
}, i = () => {
|
|
656
|
+
a.current && (typeof a.current.showPicker == "function" ? a.current.showPicker() : a.current.focus());
|
|
657
|
+
}, h = (l) => {
|
|
658
|
+
s(l.target.value);
|
|
659
|
+
}, g = (n ?? ue)(t);
|
|
660
660
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
661
661
|
/* @__PURE__ */ e.jsx(
|
|
662
|
-
|
|
662
|
+
S,
|
|
663
663
|
{
|
|
664
664
|
type: "text",
|
|
665
|
-
value:
|
|
666
|
-
label:
|
|
665
|
+
value: g,
|
|
666
|
+
label: c,
|
|
667
667
|
readOnly: !0,
|
|
668
668
|
tabIndex: 0,
|
|
669
669
|
"aria-hidden": "true",
|
|
670
|
-
onClick:
|
|
671
|
-
leftContent: /* @__PURE__ */ e.jsx(
|
|
670
|
+
onClick: i,
|
|
671
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: K, color: "inherit", size: "sm" }),
|
|
672
672
|
"data-testid": "date-single-picker-visible-input",
|
|
673
|
-
...
|
|
673
|
+
...d
|
|
674
674
|
}
|
|
675
675
|
),
|
|
676
676
|
/* @__PURE__ */ e.jsx(
|
|
@@ -682,11 +682,11 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
682
682
|
onChange: h,
|
|
683
683
|
className: "sr-only absolute opacity-0 h-0 w-0 pointer-events-none",
|
|
684
684
|
tabIndex: -1,
|
|
685
|
-
"aria-label": typeof
|
|
685
|
+
"aria-label": typeof c == "string" ? c : void 0
|
|
686
686
|
}
|
|
687
687
|
)
|
|
688
688
|
] });
|
|
689
|
-
}), ge =
|
|
689
|
+
}), ge = j("space-y-2", {
|
|
690
690
|
variants: {
|
|
691
691
|
direction: {
|
|
692
692
|
vertical: "space-y-2 space-x-0",
|
|
@@ -696,7 +696,7 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
696
696
|
defaultVariants: {
|
|
697
697
|
direction: "vertical"
|
|
698
698
|
}
|
|
699
|
-
}), fe =
|
|
699
|
+
}), fe = j(
|
|
700
700
|
"relative h-4 w-4 rounded-full border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed appearance-none bg-white",
|
|
701
701
|
{
|
|
702
702
|
variants: {
|
|
@@ -734,7 +734,7 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
734
734
|
size: "md"
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
), he =
|
|
737
|
+
), he = j(
|
|
738
738
|
"text-foreground cursor-pointer select-none",
|
|
739
739
|
{
|
|
740
740
|
variants: {
|
|
@@ -753,31 +753,31 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
753
753
|
disabled: !1
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
),
|
|
756
|
+
), G = C(
|
|
757
757
|
null
|
|
758
758
|
), be = () => {
|
|
759
|
-
const r =
|
|
759
|
+
const r = z(G);
|
|
760
760
|
if (!r)
|
|
761
761
|
throw new Error(
|
|
762
762
|
"useRadioInputContext must be used within RadioInputContext"
|
|
763
763
|
);
|
|
764
764
|
return r;
|
|
765
765
|
}, xe = x.forwardRef(
|
|
766
|
-
({ children: r, description: t, className:
|
|
767
|
-
const o = be(),
|
|
766
|
+
({ children: r, description: t, className: s, disabled: c, id: n, value: d, ...u }, a) => {
|
|
767
|
+
const o = be(), i = x.useId(), h = n || i, g = c || o.disabled, l = o.error ? "danger" : o.variant || "primary";
|
|
768
768
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
769
769
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
770
770
|
"input",
|
|
771
771
|
{
|
|
772
|
-
ref:
|
|
772
|
+
ref: a,
|
|
773
773
|
type: "radio",
|
|
774
774
|
id: h,
|
|
775
775
|
name: o.name,
|
|
776
|
-
value:
|
|
777
|
-
disabled:
|
|
776
|
+
value: d,
|
|
777
|
+
disabled: g,
|
|
778
778
|
className: p(
|
|
779
779
|
fe({
|
|
780
|
-
variant:
|
|
780
|
+
variant: l,
|
|
781
781
|
size: o.size
|
|
782
782
|
}),
|
|
783
783
|
// Custom radio dot styling using ::before - centered positioning with size variants
|
|
@@ -788,10 +788,10 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
788
788
|
o.size === "lg" && "before:w-[10px] before:h-[10px]",
|
|
789
789
|
"checked:before:opacity-100",
|
|
790
790
|
// Outline variants use colored radio dot
|
|
791
|
-
|
|
792
|
-
|
|
791
|
+
l?.includes("outline") && "checked:before:bg-current",
|
|
792
|
+
s
|
|
793
793
|
),
|
|
794
|
-
...
|
|
794
|
+
...u
|
|
795
795
|
}
|
|
796
796
|
) }),
|
|
797
797
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
@@ -801,7 +801,7 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
801
801
|
htmlFor: h,
|
|
802
802
|
className: he({
|
|
803
803
|
size: o.size,
|
|
804
|
-
disabled:
|
|
804
|
+
disabled: g
|
|
805
805
|
}),
|
|
806
806
|
children: r
|
|
807
807
|
}
|
|
@@ -814,7 +814,7 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
814
814
|
o.size === "sm" && "text-xs",
|
|
815
815
|
o.size === "md" && "text-xs",
|
|
816
816
|
o.size === "lg" && "text-sm",
|
|
817
|
-
|
|
817
|
+
g && "opacity-50"
|
|
818
818
|
),
|
|
819
819
|
children: t
|
|
820
820
|
}
|
|
@@ -826,33 +826,33 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
826
826
|
({
|
|
827
827
|
variant: r = "primary",
|
|
828
828
|
size: t = "md",
|
|
829
|
-
label:
|
|
830
|
-
helperText:
|
|
829
|
+
label: s,
|
|
830
|
+
helperText: c,
|
|
831
831
|
error: n,
|
|
832
|
-
direction:
|
|
833
|
-
className:
|
|
834
|
-
disabled:
|
|
832
|
+
direction: d = "vertical",
|
|
833
|
+
className: u,
|
|
834
|
+
disabled: a,
|
|
835
835
|
name: o,
|
|
836
|
-
children:
|
|
836
|
+
children: i,
|
|
837
837
|
...h
|
|
838
|
-
},
|
|
839
|
-
const
|
|
838
|
+
}, g) => {
|
|
839
|
+
const l = !!n, f = {
|
|
840
840
|
variant: r,
|
|
841
841
|
size: t,
|
|
842
|
-
disabled:
|
|
843
|
-
error:
|
|
842
|
+
disabled: a,
|
|
843
|
+
error: l,
|
|
844
844
|
name: o
|
|
845
845
|
};
|
|
846
|
-
return /* @__PURE__ */ e.jsx(
|
|
847
|
-
|
|
848
|
-
/* @__PURE__ */ e.jsx("div", { className: ge({ direction:
|
|
849
|
-
|
|
850
|
-
!
|
|
846
|
+
return /* @__PURE__ */ e.jsx(G.Provider, { value: f, children: /* @__PURE__ */ e.jsxs("div", { ref: g, className: p("w-full", u), ...h, children: [
|
|
847
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: s }),
|
|
848
|
+
/* @__PURE__ */ e.jsx("div", { className: ge({ direction: d }), children: i }),
|
|
849
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
850
|
+
!l && c && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: c })
|
|
851
851
|
] }) });
|
|
852
852
|
}
|
|
853
|
-
),
|
|
853
|
+
), Ye = Object.assign(me, {
|
|
854
854
|
Option: xe
|
|
855
|
-
}), pe =
|
|
855
|
+
}), pe = j(
|
|
856
856
|
"flex flex-row rounded-full border overflow-hidden p-1 gap-0.25",
|
|
857
857
|
{
|
|
858
858
|
variants: {
|
|
@@ -885,7 +885,7 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
885
885
|
error: !1
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
), ye =
|
|
888
|
+
), ye = j(
|
|
889
889
|
"inline relative flex flex-row items-center px-3 py-2 text-center font-medium transition-all duration-200 cursor-pointer border-0 bg-transparent outline-none focus:ring-2 focus:ring-offset-1 flex-1",
|
|
890
890
|
{
|
|
891
891
|
variants: {
|
|
@@ -935,36 +935,36 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
935
935
|
danger: "bg-danger text-white hover:text-white"
|
|
936
936
|
};
|
|
937
937
|
return t[r || "primary"] || t.primary;
|
|
938
|
-
},
|
|
939
|
-
const r =
|
|
938
|
+
}, T = C(null), ve = () => {
|
|
939
|
+
const r = z(T);
|
|
940
940
|
if (!r)
|
|
941
941
|
throw new Error(
|
|
942
942
|
"useSegmentSingleInputContext must be used within SegmentSingleInputContext"
|
|
943
943
|
);
|
|
944
944
|
return r;
|
|
945
|
-
},
|
|
946
|
-
({ children: r, className: t, disabled:
|
|
947
|
-
const o = ve(),
|
|
948
|
-
if (!
|
|
945
|
+
}, W = x.forwardRef(
|
|
946
|
+
({ children: r, className: t, disabled: s, id: c, value: n, position: d = "middle", ...u }, a) => {
|
|
947
|
+
const o = ve(), i = x.useId(), h = c || i, g = s || o.disabled, l = o.error ? "danger" : o.variant || "primary", f = o.value === n, b = (w) => {
|
|
948
|
+
if (!g) {
|
|
949
949
|
const m = o.value === n ? null : n;
|
|
950
950
|
o.onChange?.(m);
|
|
951
951
|
}
|
|
952
|
-
|
|
952
|
+
u.onChange?.(w);
|
|
953
953
|
};
|
|
954
954
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
955
955
|
/* @__PURE__ */ e.jsx(
|
|
956
956
|
"input",
|
|
957
957
|
{
|
|
958
|
-
ref:
|
|
958
|
+
ref: a,
|
|
959
959
|
type: "radio",
|
|
960
960
|
id: h,
|
|
961
961
|
name: o.name,
|
|
962
962
|
value: n,
|
|
963
963
|
checked: f,
|
|
964
|
-
disabled:
|
|
964
|
+
disabled: g,
|
|
965
965
|
onChange: b,
|
|
966
966
|
className: "sr-only",
|
|
967
|
-
...
|
|
967
|
+
...u
|
|
968
968
|
}
|
|
969
969
|
),
|
|
970
970
|
/* @__PURE__ */ e.jsx(
|
|
@@ -974,12 +974,12 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
974
974
|
className: p(
|
|
975
975
|
"flex flex-row items-center justify-center",
|
|
976
976
|
ye({
|
|
977
|
-
variant:
|
|
977
|
+
variant: l,
|
|
978
978
|
size: o.size,
|
|
979
|
-
rounded:
|
|
979
|
+
rounded: d
|
|
980
980
|
}),
|
|
981
|
-
f && we(
|
|
982
|
-
|
|
981
|
+
f && we(l),
|
|
982
|
+
g && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
983
983
|
t
|
|
984
984
|
),
|
|
985
985
|
children: r
|
|
@@ -988,30 +988,30 @@ const Je = x.forwardRef(function({ value: t = "", onChange: d, label: i, formatt
|
|
|
988
988
|
] });
|
|
989
989
|
}
|
|
990
990
|
);
|
|
991
|
-
|
|
992
|
-
const
|
|
991
|
+
W.displayName = "SegmentOption";
|
|
992
|
+
const je = x.forwardRef(
|
|
993
993
|
({
|
|
994
994
|
variant: r = "primary",
|
|
995
995
|
size: t = "md",
|
|
996
|
-
label:
|
|
997
|
-
helperText:
|
|
996
|
+
label: s,
|
|
997
|
+
helperText: c,
|
|
998
998
|
error: n,
|
|
999
|
-
disabled:
|
|
1000
|
-
name:
|
|
1001
|
-
value:
|
|
999
|
+
disabled: d,
|
|
1000
|
+
name: u,
|
|
1001
|
+
value: a,
|
|
1002
1002
|
onChange: o,
|
|
1003
|
-
children:
|
|
1003
|
+
children: i,
|
|
1004
1004
|
...h
|
|
1005
|
-
},
|
|
1006
|
-
const
|
|
1005
|
+
}, g) => {
|
|
1006
|
+
const l = !!n, f = {
|
|
1007
1007
|
variant: r,
|
|
1008
1008
|
size: t,
|
|
1009
|
-
disabled:
|
|
1010
|
-
error:
|
|
1011
|
-
name:
|
|
1012
|
-
value:
|
|
1009
|
+
disabled: d,
|
|
1010
|
+
error: l,
|
|
1011
|
+
name: u,
|
|
1012
|
+
value: a,
|
|
1013
1013
|
onChange: o
|
|
1014
|
-
}, b = x.Children.toArray(
|
|
1014
|
+
}, b = x.Children.toArray(i), w = b.map((m, v) => {
|
|
1015
1015
|
if (x.isValidElement(m)) {
|
|
1016
1016
|
let y;
|
|
1017
1017
|
return b.length === 1 ? y = "single" : v === 0 ? y = "first" : v === b.length - 1 ? y = "last" : y = "middle", x.cloneElement(
|
|
@@ -1021,28 +1021,28 @@ const ke = x.forwardRef(
|
|
|
1021
1021
|
}
|
|
1022
1022
|
return m;
|
|
1023
1023
|
});
|
|
1024
|
-
return /* @__PURE__ */ e.jsx(
|
|
1025
|
-
|
|
1024
|
+
return /* @__PURE__ */ e.jsx(T.Provider, { value: f, children: /* @__PURE__ */ e.jsxs("div", { ref: g, ...h, children: [
|
|
1025
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: s }),
|
|
1026
1026
|
/* @__PURE__ */ e.jsx(
|
|
1027
1027
|
"div",
|
|
1028
1028
|
{
|
|
1029
1029
|
className: p(
|
|
1030
1030
|
pe({
|
|
1031
|
-
variant:
|
|
1031
|
+
variant: l ? "danger" : r,
|
|
1032
1032
|
size: t,
|
|
1033
|
-
error:
|
|
1033
|
+
error: l
|
|
1034
1034
|
})
|
|
1035
1035
|
),
|
|
1036
1036
|
children: w
|
|
1037
1037
|
}
|
|
1038
1038
|
),
|
|
1039
|
-
|
|
1040
|
-
!
|
|
1039
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
1040
|
+
!l && c && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: c })
|
|
1041
1041
|
] }) });
|
|
1042
1042
|
}
|
|
1043
|
-
),
|
|
1044
|
-
Option:
|
|
1045
|
-
}),
|
|
1043
|
+
), Ze = Object.assign(je, {
|
|
1044
|
+
Option: W
|
|
1045
|
+
}), ke = j(
|
|
1046
1046
|
"flex flex-row rounded-full border overflow-hidden p-1 gap-0.25",
|
|
1047
1047
|
{
|
|
1048
1048
|
variants: {
|
|
@@ -1075,7 +1075,7 @@ const ke = x.forwardRef(
|
|
|
1075
1075
|
error: !1
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
),
|
|
1078
|
+
), Ie = j(
|
|
1079
1079
|
"inline relative flex flex-row items-center px-3 py-2 text-center font-medium transition-all duration-200 cursor-pointer border-0 bg-transparent outline-none focus:ring-2 focus:ring-offset-1 flex-1",
|
|
1080
1080
|
{
|
|
1081
1081
|
variants: {
|
|
@@ -1110,7 +1110,7 @@ const ke = x.forwardRef(
|
|
|
1110
1110
|
rounded: "middle"
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
|
-
),
|
|
1113
|
+
), Ne = (r) => {
|
|
1114
1114
|
const t = {
|
|
1115
1115
|
// Core variants - override hover text color changes
|
|
1116
1116
|
primary: "bg-primary text-white hover:text-white",
|
|
@@ -1125,37 +1125,37 @@ const ke = x.forwardRef(
|
|
|
1125
1125
|
danger: "bg-danger text-white hover:text-white"
|
|
1126
1126
|
};
|
|
1127
1127
|
return t[r || "primary"] || t.primary;
|
|
1128
|
-
},
|
|
1129
|
-
const r =
|
|
1128
|
+
}, _ = C(null), Ce = () => {
|
|
1129
|
+
const r = z(_);
|
|
1130
1130
|
if (!r)
|
|
1131
1131
|
throw new Error(
|
|
1132
1132
|
"useSegmentMultipleInputContext must be used within SegmentMultipleInputContext"
|
|
1133
1133
|
);
|
|
1134
1134
|
return r;
|
|
1135
|
-
},
|
|
1136
|
-
({ children: r, className: t, disabled:
|
|
1137
|
-
const o =
|
|
1138
|
-
if (!
|
|
1135
|
+
}, H = x.forwardRef(
|
|
1136
|
+
({ children: r, className: t, disabled: s, id: c, value: n, position: d = "middle", ...u }, a) => {
|
|
1137
|
+
const o = Ce(), i = x.useId(), h = c || i, g = s || o.disabled, l = o.error ? "danger" : o.variant || "primary", f = o.value?.includes(n) ?? !1, b = (w) => {
|
|
1138
|
+
if (!g) {
|
|
1139
1139
|
const m = o.value || [];
|
|
1140
1140
|
let v;
|
|
1141
1141
|
f ? v = m.filter((y) => y !== n) : v = [...m, n], o.onChange?.(v);
|
|
1142
1142
|
}
|
|
1143
|
-
|
|
1143
|
+
u.onChange?.(w);
|
|
1144
1144
|
};
|
|
1145
1145
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1146
1146
|
/* @__PURE__ */ e.jsx(
|
|
1147
1147
|
"input",
|
|
1148
1148
|
{
|
|
1149
|
-
ref:
|
|
1149
|
+
ref: a,
|
|
1150
1150
|
type: "checkbox",
|
|
1151
1151
|
id: h,
|
|
1152
1152
|
name: `${o.name}[]`,
|
|
1153
1153
|
value: n,
|
|
1154
1154
|
checked: f,
|
|
1155
|
-
disabled:
|
|
1155
|
+
disabled: g,
|
|
1156
1156
|
onChange: b,
|
|
1157
1157
|
className: "sr-only",
|
|
1158
|
-
...
|
|
1158
|
+
...u
|
|
1159
1159
|
}
|
|
1160
1160
|
),
|
|
1161
1161
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1164,13 +1164,13 @@ const ke = x.forwardRef(
|
|
|
1164
1164
|
htmlFor: h,
|
|
1165
1165
|
className: p(
|
|
1166
1166
|
"flex flex-row items-center justify-center",
|
|
1167
|
-
|
|
1168
|
-
variant:
|
|
1167
|
+
Ie({
|
|
1168
|
+
variant: l,
|
|
1169
1169
|
size: o.size,
|
|
1170
|
-
rounded:
|
|
1170
|
+
rounded: d
|
|
1171
1171
|
}),
|
|
1172
|
-
f &&
|
|
1173
|
-
|
|
1172
|
+
f && Ne(l),
|
|
1173
|
+
g && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
1174
1174
|
t
|
|
1175
1175
|
),
|
|
1176
1176
|
children: r
|
|
@@ -1179,30 +1179,30 @@ const ke = x.forwardRef(
|
|
|
1179
1179
|
] });
|
|
1180
1180
|
}
|
|
1181
1181
|
);
|
|
1182
|
-
|
|
1182
|
+
H.displayName = "SegmentOption";
|
|
1183
1183
|
const ze = x.forwardRef(
|
|
1184
1184
|
({
|
|
1185
1185
|
variant: r = "primary",
|
|
1186
1186
|
size: t = "md",
|
|
1187
|
-
label:
|
|
1188
|
-
helperText:
|
|
1187
|
+
label: s,
|
|
1188
|
+
helperText: c,
|
|
1189
1189
|
error: n,
|
|
1190
|
-
disabled:
|
|
1191
|
-
name:
|
|
1192
|
-
value:
|
|
1190
|
+
disabled: d,
|
|
1191
|
+
name: u,
|
|
1192
|
+
value: a = [],
|
|
1193
1193
|
onChange: o,
|
|
1194
|
-
children:
|
|
1194
|
+
children: i,
|
|
1195
1195
|
...h
|
|
1196
|
-
},
|
|
1197
|
-
const
|
|
1196
|
+
}, g) => {
|
|
1197
|
+
const l = !!n, f = {
|
|
1198
1198
|
variant: r,
|
|
1199
1199
|
size: t,
|
|
1200
|
-
disabled:
|
|
1201
|
-
error:
|
|
1202
|
-
name:
|
|
1203
|
-
value:
|
|
1200
|
+
disabled: d,
|
|
1201
|
+
error: l,
|
|
1202
|
+
name: u,
|
|
1203
|
+
value: a,
|
|
1204
1204
|
onChange: o
|
|
1205
|
-
}, b = x.Children.toArray(
|
|
1205
|
+
}, b = x.Children.toArray(i), w = b.map((m, v) => {
|
|
1206
1206
|
if (x.isValidElement(m)) {
|
|
1207
1207
|
let y;
|
|
1208
1208
|
return b.length === 1 ? y = "single" : v === 0 ? y = "first" : v === b.length - 1 ? y = "last" : y = "middle", x.cloneElement(
|
|
@@ -1212,55 +1212,55 @@ const ze = x.forwardRef(
|
|
|
1212
1212
|
}
|
|
1213
1213
|
return m;
|
|
1214
1214
|
});
|
|
1215
|
-
return /* @__PURE__ */ e.jsx(
|
|
1216
|
-
|
|
1215
|
+
return /* @__PURE__ */ e.jsx(_.Provider, { value: f, children: /* @__PURE__ */ e.jsxs("div", { ref: g, ...h, children: [
|
|
1216
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: s }),
|
|
1217
1217
|
/* @__PURE__ */ e.jsx(
|
|
1218
1218
|
"div",
|
|
1219
1219
|
{
|
|
1220
1220
|
className: p(
|
|
1221
|
-
|
|
1222
|
-
variant:
|
|
1221
|
+
ke({
|
|
1222
|
+
variant: l ? "danger" : r,
|
|
1223
1223
|
size: t,
|
|
1224
|
-
error:
|
|
1224
|
+
error: l
|
|
1225
1225
|
})
|
|
1226
1226
|
),
|
|
1227
1227
|
children: w
|
|
1228
1228
|
}
|
|
1229
1229
|
),
|
|
1230
|
-
|
|
1231
|
-
!
|
|
1230
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
1231
|
+
!l && c && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: c })
|
|
1232
1232
|
] }) });
|
|
1233
1233
|
}
|
|
1234
|
-
),
|
|
1235
|
-
Option:
|
|
1236
|
-
}),
|
|
1234
|
+
), er = Object.assign(ze, {
|
|
1235
|
+
Option: H
|
|
1236
|
+
}), rr = V(
|
|
1237
1237
|
({
|
|
1238
1238
|
autoComplete: r = "off",
|
|
1239
1239
|
spellCheck: t = !1,
|
|
1240
|
-
inputMode:
|
|
1241
|
-
placeholder:
|
|
1240
|
+
inputMode: s = "search",
|
|
1241
|
+
placeholder: c = "Search...",
|
|
1242
1242
|
maxLength: n = 256,
|
|
1243
|
-
enterKeyHint:
|
|
1244
|
-
"aria-label":
|
|
1243
|
+
enterKeyHint: d = "search",
|
|
1244
|
+
"aria-label": u = "Search",
|
|
1245
1245
|
// internal default, not in props
|
|
1246
|
-
...
|
|
1246
|
+
...a
|
|
1247
1247
|
}, o) => /* @__PURE__ */ e.jsx(
|
|
1248
|
-
|
|
1248
|
+
S,
|
|
1249
1249
|
{
|
|
1250
1250
|
ref: o,
|
|
1251
1251
|
type: "search",
|
|
1252
|
-
inputMode:
|
|
1252
|
+
inputMode: s,
|
|
1253
1253
|
autoComplete: r,
|
|
1254
1254
|
spellCheck: t,
|
|
1255
|
-
placeholder:
|
|
1255
|
+
placeholder: c,
|
|
1256
1256
|
maxLength: n,
|
|
1257
|
-
enterKeyHint:
|
|
1258
|
-
"aria-label":
|
|
1259
|
-
leftContent: /* @__PURE__ */ e.jsx(
|
|
1260
|
-
...
|
|
1257
|
+
enterKeyHint: d,
|
|
1258
|
+
"aria-label": u,
|
|
1259
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: Q, color: "inherit", size: "sm" }),
|
|
1260
|
+
...a
|
|
1261
1261
|
}
|
|
1262
1262
|
)
|
|
1263
|
-
), Se =
|
|
1263
|
+
), Se = j(
|
|
1264
1264
|
"block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 appearance-none bg-no-repeat bg-right pr-10",
|
|
1265
1265
|
{
|
|
1266
1266
|
variants: {
|
|
@@ -1296,21 +1296,21 @@ const ze = x.forwardRef(
|
|
|
1296
1296
|
({
|
|
1297
1297
|
variant: r = "primary",
|
|
1298
1298
|
label: t,
|
|
1299
|
-
helperText:
|
|
1300
|
-
error:
|
|
1299
|
+
helperText: s,
|
|
1300
|
+
error: c,
|
|
1301
1301
|
className: n,
|
|
1302
|
-
disabled:
|
|
1303
|
-
id:
|
|
1304
|
-
placeholder:
|
|
1302
|
+
disabled: d,
|
|
1303
|
+
id: u,
|
|
1304
|
+
placeholder: a,
|
|
1305
1305
|
children: o,
|
|
1306
|
-
...
|
|
1306
|
+
...i
|
|
1307
1307
|
}, h) => {
|
|
1308
|
-
const
|
|
1308
|
+
const g = x.useId(), l = u || g, f = !!c;
|
|
1309
1309
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1310
1310
|
/* @__PURE__ */ e.jsx(
|
|
1311
1311
|
"label",
|
|
1312
1312
|
{
|
|
1313
|
-
htmlFor:
|
|
1313
|
+
htmlFor: l,
|
|
1314
1314
|
className: "block text-sm font-medium text-foreground mb-2",
|
|
1315
1315
|
children: t
|
|
1316
1316
|
}
|
|
@@ -1320,19 +1320,19 @@ const ze = x.forwardRef(
|
|
|
1320
1320
|
"select",
|
|
1321
1321
|
{
|
|
1322
1322
|
ref: h,
|
|
1323
|
-
id:
|
|
1323
|
+
id: l,
|
|
1324
1324
|
"aria-invalid": f,
|
|
1325
|
-
"aria-disabled":
|
|
1326
|
-
disabled:
|
|
1325
|
+
"aria-disabled": d,
|
|
1326
|
+
disabled: d,
|
|
1327
1327
|
className: p(
|
|
1328
1328
|
Se({
|
|
1329
1329
|
variant: f ? "danger" : r
|
|
1330
1330
|
}),
|
|
1331
1331
|
"h-10 pl-3"
|
|
1332
1332
|
),
|
|
1333
|
-
...
|
|
1333
|
+
...i,
|
|
1334
1334
|
children: [
|
|
1335
|
-
|
|
1335
|
+
a && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: a }),
|
|
1336
1336
|
o
|
|
1337
1337
|
]
|
|
1338
1338
|
}
|
|
@@ -1356,13 +1356,13 @@ const ze = x.forwardRef(
|
|
|
1356
1356
|
}
|
|
1357
1357
|
) })
|
|
1358
1358
|
] }),
|
|
1359
|
-
f && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
1360
|
-
!f &&
|
|
1359
|
+
f && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: c }),
|
|
1360
|
+
!f && s && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: s })
|
|
1361
1361
|
] });
|
|
1362
1362
|
}
|
|
1363
1363
|
);
|
|
1364
1364
|
Ve.displayName = "SelectInput";
|
|
1365
|
-
const Re =
|
|
1365
|
+
const Re = j(
|
|
1366
1366
|
"block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50",
|
|
1367
1367
|
{
|
|
1368
1368
|
variants: {
|
|
@@ -1403,20 +1403,20 @@ const Re = k(
|
|
|
1403
1403
|
({
|
|
1404
1404
|
variant: r = "primary",
|
|
1405
1405
|
label: t,
|
|
1406
|
-
helperText:
|
|
1407
|
-
error:
|
|
1406
|
+
helperText: s,
|
|
1407
|
+
error: c,
|
|
1408
1408
|
className: n,
|
|
1409
|
-
disabled:
|
|
1410
|
-
id:
|
|
1411
|
-
minRows:
|
|
1409
|
+
disabled: d,
|
|
1410
|
+
id: u,
|
|
1411
|
+
minRows: a = 3,
|
|
1412
1412
|
maxRows: o,
|
|
1413
|
-
fieldSizing:
|
|
1413
|
+
fieldSizing: i = "fixed",
|
|
1414
1414
|
style: h,
|
|
1415
|
-
rows:
|
|
1416
|
-
...
|
|
1415
|
+
rows: g,
|
|
1416
|
+
...l
|
|
1417
1417
|
}, f) => {
|
|
1418
|
-
const b = x.useId(), w =
|
|
1419
|
-
...
|
|
1418
|
+
const b = x.useId(), w = u || b, m = !!c, v = g || a, y = i === "content" ? void 0 : o, k = {
|
|
1419
|
+
...i === "content" && { fieldSizing: "content" },
|
|
1420
1420
|
...y && {
|
|
1421
1421
|
maxHeight: `${y * 1.5}rem`
|
|
1422
1422
|
// Approximate line height
|
|
@@ -1439,42 +1439,42 @@ const Re = k(
|
|
|
1439
1439
|
id: w,
|
|
1440
1440
|
rows: v,
|
|
1441
1441
|
"aria-invalid": m,
|
|
1442
|
-
"aria-disabled":
|
|
1443
|
-
disabled:
|
|
1444
|
-
style:
|
|
1442
|
+
"aria-disabled": d,
|
|
1443
|
+
disabled: d,
|
|
1444
|
+
style: k,
|
|
1445
1445
|
className: p(
|
|
1446
1446
|
Re({
|
|
1447
1447
|
variant: m ? "danger" : r,
|
|
1448
|
-
fieldSizing:
|
|
1448
|
+
fieldSizing: i
|
|
1449
1449
|
}),
|
|
1450
1450
|
"px-3 py-2"
|
|
1451
1451
|
),
|
|
1452
|
-
...
|
|
1452
|
+
...l
|
|
1453
1453
|
}
|
|
1454
1454
|
) }),
|
|
1455
|
-
m && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
1456
|
-
!m &&
|
|
1455
|
+
m && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: c }),
|
|
1456
|
+
!m && s && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: s })
|
|
1457
1457
|
] });
|
|
1458
1458
|
}
|
|
1459
1459
|
);
|
|
1460
1460
|
Oe.displayName = "TextAreaInput";
|
|
1461
|
-
const
|
|
1462
|
-
const
|
|
1461
|
+
const tr = V(function(t, s) {
|
|
1462
|
+
const c = (n) => {
|
|
1463
1463
|
t?.onChange?.(n.target.value);
|
|
1464
1464
|
};
|
|
1465
1465
|
return /* @__PURE__ */ e.jsx(
|
|
1466
|
-
|
|
1466
|
+
S,
|
|
1467
1467
|
{
|
|
1468
1468
|
type: "time",
|
|
1469
1469
|
tabIndex: 0,
|
|
1470
1470
|
"aria-hidden": "true",
|
|
1471
|
-
leftContent: /* @__PURE__ */ e.jsx(
|
|
1472
|
-
ref:
|
|
1471
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: U, color: "inherit", size: "sm" }),
|
|
1472
|
+
ref: s,
|
|
1473
1473
|
...t,
|
|
1474
|
-
onChange:
|
|
1474
|
+
onChange: c
|
|
1475
1475
|
}
|
|
1476
1476
|
);
|
|
1477
|
-
}), Ee =
|
|
1477
|
+
}), Ee = j(
|
|
1478
1478
|
"relative inline-flex items-center transition-colors duration-200 border border-transparent",
|
|
1479
1479
|
{
|
|
1480
1480
|
variants: {
|
|
@@ -1530,7 +1530,7 @@ const Ye = R(function(t, d) {
|
|
|
1530
1530
|
{ checked: !1, class: "bg-white border-border" }
|
|
1531
1531
|
]
|
|
1532
1532
|
}
|
|
1533
|
-
), Me =
|
|
1533
|
+
), Me = j(
|
|
1534
1534
|
"absolute rounded-full transition-transform duration-200",
|
|
1535
1535
|
{
|
|
1536
1536
|
variants: {
|
|
@@ -1552,66 +1552,66 @@ const Ye = R(function(t, d) {
|
|
|
1552
1552
|
), Fe = ({
|
|
1553
1553
|
color: r = "primary",
|
|
1554
1554
|
size: t = "md",
|
|
1555
|
-
disabled:
|
|
1556
|
-
className:
|
|
1555
|
+
disabled: s = !1,
|
|
1556
|
+
className: c,
|
|
1557
1557
|
checked: n
|
|
1558
1558
|
}) => /* @__PURE__ */ e.jsx(
|
|
1559
1559
|
"span",
|
|
1560
1560
|
{
|
|
1561
1561
|
className: p(
|
|
1562
|
-
Ee({ color: r, size: t, disabled:
|
|
1562
|
+
Ee({ color: r, size: t, disabled: s, checked: n }),
|
|
1563
1563
|
"rounded-full pointer-events-none",
|
|
1564
|
-
|
|
1564
|
+
c
|
|
1565
1565
|
),
|
|
1566
1566
|
"aria-hidden": "true"
|
|
1567
1567
|
}
|
|
1568
|
-
), Pe = ({ size: r = "md", checked: t = !1 }) => /* @__PURE__ */ e.jsx("span", { className: p(Me({ size: r, checked: t })), "aria-hidden": "true" }),
|
|
1568
|
+
), Pe = ({ size: r = "md", checked: t = !1 }) => /* @__PURE__ */ e.jsx("span", { className: p(Me({ size: r, checked: t })), "aria-hidden": "true" }), Be = ({ label: r, htmlFor: t, placement: s = "top", disabled: c = !1 }) => r ? /* @__PURE__ */ e.jsx(
|
|
1569
1569
|
"label",
|
|
1570
1570
|
{
|
|
1571
1571
|
htmlFor: t,
|
|
1572
1572
|
className: p(
|
|
1573
1573
|
"text-sm select-none font-medium text-foreground",
|
|
1574
|
-
|
|
1575
|
-
|
|
1574
|
+
s === "inline" ? "ml-2 mb-0" : "mb-1",
|
|
1575
|
+
c && "opacity-50 cursor-not-allowed"
|
|
1576
1576
|
),
|
|
1577
1577
|
children: r
|
|
1578
1578
|
}
|
|
1579
|
-
) : null,
|
|
1579
|
+
) : null, De = x.forwardRef(
|
|
1580
1580
|
({
|
|
1581
1581
|
checked: r,
|
|
1582
1582
|
defaultChecked: t,
|
|
1583
|
-
onCheckedChange:
|
|
1584
|
-
color:
|
|
1583
|
+
onCheckedChange: s,
|
|
1584
|
+
color: c = "primary",
|
|
1585
1585
|
size: n = "md",
|
|
1586
|
-
label:
|
|
1587
|
-
labelPlacement:
|
|
1588
|
-
disabled:
|
|
1586
|
+
label: d,
|
|
1587
|
+
labelPlacement: u = "top",
|
|
1588
|
+
disabled: a = !1,
|
|
1589
1589
|
className: o,
|
|
1590
|
-
id:
|
|
1590
|
+
id: i,
|
|
1591
1591
|
ariaLabel: h,
|
|
1592
|
-
...
|
|
1593
|
-
},
|
|
1594
|
-
const [f, b] =
|
|
1592
|
+
...g
|
|
1593
|
+
}, l) => {
|
|
1594
|
+
const [f, b] = F(
|
|
1595
1595
|
t ?? !1
|
|
1596
|
-
), w =
|
|
1597
|
-
v || b(
|
|
1596
|
+
), w = E(), m = i || w, v = typeof r == "boolean", y = v ? r : f, k = (I) => {
|
|
1597
|
+
v || b(I.target.checked), s?.(I.target.checked);
|
|
1598
1598
|
};
|
|
1599
1599
|
return /* @__PURE__ */ e.jsxs(
|
|
1600
1600
|
"div",
|
|
1601
1601
|
{
|
|
1602
1602
|
className: p(
|
|
1603
1603
|
"flex flex-col",
|
|
1604
|
-
|
|
1604
|
+
u === "inline" && "flex-row items-center",
|
|
1605
1605
|
o
|
|
1606
1606
|
),
|
|
1607
1607
|
children: [
|
|
1608
1608
|
/* @__PURE__ */ e.jsx(
|
|
1609
|
-
|
|
1609
|
+
Be,
|
|
1610
1610
|
{
|
|
1611
|
-
label:
|
|
1611
|
+
label: d,
|
|
1612
1612
|
htmlFor: m,
|
|
1613
|
-
placement:
|
|
1614
|
-
disabled:
|
|
1613
|
+
placement: u,
|
|
1614
|
+
disabled: a
|
|
1615
1615
|
}
|
|
1616
1616
|
),
|
|
1617
1617
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -1619,29 +1619,29 @@ const Ye = R(function(t, d) {
|
|
|
1619
1619
|
{
|
|
1620
1620
|
className: p(
|
|
1621
1621
|
"relative flex items-center",
|
|
1622
|
-
|
|
1622
|
+
u === "inline" && "ml-2"
|
|
1623
1623
|
),
|
|
1624
1624
|
children: [
|
|
1625
1625
|
/* @__PURE__ */ e.jsx(
|
|
1626
1626
|
"input",
|
|
1627
1627
|
{
|
|
1628
|
-
ref:
|
|
1628
|
+
ref: l,
|
|
1629
1629
|
type: "checkbox",
|
|
1630
1630
|
id: m,
|
|
1631
|
-
"aria-label": h ||
|
|
1631
|
+
"aria-label": h || d,
|
|
1632
1632
|
checked: y,
|
|
1633
|
-
disabled:
|
|
1634
|
-
onChange:
|
|
1633
|
+
disabled: a,
|
|
1634
|
+
onChange: k,
|
|
1635
1635
|
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",
|
|
1636
|
-
...
|
|
1636
|
+
...g
|
|
1637
1637
|
}
|
|
1638
1638
|
),
|
|
1639
1639
|
/* @__PURE__ */ e.jsx(
|
|
1640
1640
|
Fe,
|
|
1641
1641
|
{
|
|
1642
|
-
color:
|
|
1642
|
+
color: c,
|
|
1643
1643
|
size: n,
|
|
1644
|
-
disabled:
|
|
1644
|
+
disabled: a,
|
|
1645
1645
|
checked: y
|
|
1646
1646
|
}
|
|
1647
1647
|
),
|
|
@@ -1654,78 +1654,248 @@ const Ye = R(function(t, d) {
|
|
|
1654
1654
|
);
|
|
1655
1655
|
}
|
|
1656
1656
|
);
|
|
1657
|
-
|
|
1657
|
+
De.displayName = "SwitchInput";
|
|
1658
1658
|
function $e(r, t) {
|
|
1659
1659
|
J(() => {
|
|
1660
1660
|
typeof r == "number" && !isNaN(r) ? t(`${r}`) : r === "" || r === null || r === void 0 ? t("") : typeof r == "string" && t(r);
|
|
1661
1661
|
}, [r, t]);
|
|
1662
1662
|
}
|
|
1663
|
-
const
|
|
1663
|
+
const or = ({
|
|
1664
1664
|
value: r,
|
|
1665
1665
|
onChange: t,
|
|
1666
|
-
allowNegative:
|
|
1667
|
-
inputProps:
|
|
1666
|
+
allowNegative: s = !1,
|
|
1667
|
+
inputProps: c,
|
|
1668
1668
|
label: n,
|
|
1669
|
-
helperText:
|
|
1670
|
-
error:
|
|
1671
|
-
variant:
|
|
1669
|
+
helperText: d,
|
|
1670
|
+
error: u,
|
|
1671
|
+
variant: a,
|
|
1672
1672
|
...o
|
|
1673
1673
|
}) => {
|
|
1674
|
-
const
|
|
1674
|
+
const i = M(null), [h, g] = F(
|
|
1675
1675
|
r === "" ? "" : String(r)
|
|
1676
1676
|
);
|
|
1677
|
-
$e(r,
|
|
1678
|
-
const
|
|
1677
|
+
$e(r, g);
|
|
1678
|
+
const l = (f) => {
|
|
1679
1679
|
let b = f.target.value.replace(/[^\d.,-]/g, "");
|
|
1680
|
-
|
|
1680
|
+
s || (b = b.replace(/-/g, "")), g(b), t(b);
|
|
1681
1681
|
};
|
|
1682
1682
|
return /* @__PURE__ */ e.jsx(
|
|
1683
|
-
|
|
1683
|
+
S,
|
|
1684
1684
|
{
|
|
1685
|
-
ref:
|
|
1685
|
+
ref: i,
|
|
1686
1686
|
type: "text",
|
|
1687
1687
|
label: n,
|
|
1688
1688
|
value: h,
|
|
1689
|
-
onChange:
|
|
1690
|
-
error:
|
|
1691
|
-
helperText:
|
|
1689
|
+
onChange: l,
|
|
1690
|
+
error: u,
|
|
1691
|
+
helperText: d,
|
|
1692
1692
|
placeholder: o.placeholder,
|
|
1693
|
-
leftContent: /* @__PURE__ */ e.jsx(
|
|
1694
|
-
variant:
|
|
1693
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: X, color: "inherit", size: "sm" }),
|
|
1694
|
+
variant: a,
|
|
1695
1695
|
inputMode: "numeric",
|
|
1696
1696
|
autoComplete: "off",
|
|
1697
|
-
pattern:
|
|
1698
|
-
...
|
|
1697
|
+
pattern: s ? "^-?[\\d,.]*$" : "^[\\d,.]*$",
|
|
1698
|
+
...c,
|
|
1699
1699
|
...o
|
|
1700
1700
|
}
|
|
1701
1701
|
);
|
|
1702
|
-
},
|
|
1702
|
+
}, sr = V(
|
|
1703
1703
|
(r, t) => /* @__PURE__ */ e.jsx(
|
|
1704
|
-
|
|
1704
|
+
S,
|
|
1705
1705
|
{
|
|
1706
1706
|
...r,
|
|
1707
1707
|
ref: t,
|
|
1708
1708
|
type: "email",
|
|
1709
1709
|
autoComplete: "email",
|
|
1710
1710
|
inputMode: "email",
|
|
1711
|
-
leftContent: /* @__PURE__ */ e.jsx(
|
|
1711
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: Y, color: "inherit", size: "sm" })
|
|
1712
1712
|
}
|
|
1713
1713
|
)
|
|
1714
|
-
)
|
|
1714
|
+
), Ae = j(
|
|
1715
|
+
"flex items-center gap-3 cursor-pointer border-b border-border select-none p-4 transition-colors hover:bg-neutral-light",
|
|
1716
|
+
{
|
|
1717
|
+
variants: {
|
|
1718
|
+
checked: {
|
|
1719
|
+
true: "",
|
|
1720
|
+
false: ""
|
|
1721
|
+
},
|
|
1722
|
+
disabled: {
|
|
1723
|
+
true: "opacity-50 cursor-not-allowed",
|
|
1724
|
+
false: ""
|
|
1725
|
+
}
|
|
1726
|
+
},
|
|
1727
|
+
defaultVariants: {
|
|
1728
|
+
checked: !1,
|
|
1729
|
+
disabled: !1
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
), Le = j(
|
|
1733
|
+
"flex h-6 w-6 items-center justify-center rounded-sm overflow-hidden border border-border transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
1734
|
+
{
|
|
1735
|
+
variants: {
|
|
1736
|
+
checked: {
|
|
1737
|
+
true: "bg-primary",
|
|
1738
|
+
false: "border-border bg-white"
|
|
1739
|
+
},
|
|
1740
|
+
disabled: {
|
|
1741
|
+
true: "opacity-50",
|
|
1742
|
+
false: "active:scale-95"
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
defaultVariants: {
|
|
1746
|
+
checked: !1,
|
|
1747
|
+
disabled: !1
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
), nr = V(({ value: r, label: t, checked: s, id: c, className: n, disabled: d, ...u }, a) => {
|
|
1751
|
+
const o = E(), i = c || o;
|
|
1752
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1753
|
+
"label",
|
|
1754
|
+
{
|
|
1755
|
+
htmlFor: i,
|
|
1756
|
+
className: p(
|
|
1757
|
+
Ae({
|
|
1758
|
+
checked: !!s,
|
|
1759
|
+
disabled: !!d
|
|
1760
|
+
}),
|
|
1761
|
+
n
|
|
1762
|
+
),
|
|
1763
|
+
"aria-checked": s,
|
|
1764
|
+
role: "radio",
|
|
1765
|
+
"aria-label": `Select ${r}`,
|
|
1766
|
+
tabIndex: d ? -1 : 0,
|
|
1767
|
+
children: [
|
|
1768
|
+
/* @__PURE__ */ e.jsx(
|
|
1769
|
+
"input",
|
|
1770
|
+
{
|
|
1771
|
+
ref: a,
|
|
1772
|
+
id: i,
|
|
1773
|
+
type: "radio",
|
|
1774
|
+
value: r,
|
|
1775
|
+
checked: s,
|
|
1776
|
+
disabled: d,
|
|
1777
|
+
className: "sr-only",
|
|
1778
|
+
"aria-hidden": !0,
|
|
1779
|
+
"aria-checked": s,
|
|
1780
|
+
...u
|
|
1781
|
+
}
|
|
1782
|
+
),
|
|
1783
|
+
/* @__PURE__ */ e.jsx(
|
|
1784
|
+
"span",
|
|
1785
|
+
{
|
|
1786
|
+
className: Le({
|
|
1787
|
+
checked: !!s,
|
|
1788
|
+
disabled: !!d
|
|
1789
|
+
}),
|
|
1790
|
+
"aria-hidden": "true",
|
|
1791
|
+
children: s ? /* @__PURE__ */ e.jsx(N, { as: R, color: "neutral", size: "md" }) : null
|
|
1792
|
+
}
|
|
1793
|
+
),
|
|
1794
|
+
/* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: t })
|
|
1795
|
+
]
|
|
1796
|
+
}
|
|
1797
|
+
);
|
|
1798
|
+
}), Ge = j(
|
|
1799
|
+
"flex items-center gap-3 cursor-pointer border-b border-border select-none p-4 transition-colors hover:bg-neutral-light",
|
|
1800
|
+
{
|
|
1801
|
+
variants: {
|
|
1802
|
+
checked: {
|
|
1803
|
+
true: "",
|
|
1804
|
+
false: ""
|
|
1805
|
+
},
|
|
1806
|
+
disabled: {
|
|
1807
|
+
true: "opacity-50 cursor-not-allowed",
|
|
1808
|
+
false: ""
|
|
1809
|
+
}
|
|
1810
|
+
},
|
|
1811
|
+
defaultVariants: {
|
|
1812
|
+
checked: !1,
|
|
1813
|
+
disabled: !1
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
), Te = j(
|
|
1817
|
+
"flex h-6 w-6 items-center justify-center rounded-sm overflow-hidden border border-border transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
1818
|
+
{
|
|
1819
|
+
variants: {
|
|
1820
|
+
checked: {
|
|
1821
|
+
true: "bg-primary",
|
|
1822
|
+
false: "border-border bg-white"
|
|
1823
|
+
},
|
|
1824
|
+
disabled: {
|
|
1825
|
+
true: "opacity-50",
|
|
1826
|
+
false: "active:scale-95"
|
|
1827
|
+
}
|
|
1828
|
+
},
|
|
1829
|
+
defaultVariants: {
|
|
1830
|
+
checked: !1,
|
|
1831
|
+
disabled: !1
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
), ar = V(({ value: r, label: t, checked: s, id: c, className: n, disabled: d, ...u }, a) => {
|
|
1835
|
+
const o = E(), i = c || o;
|
|
1836
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1837
|
+
"label",
|
|
1838
|
+
{
|
|
1839
|
+
htmlFor: i,
|
|
1840
|
+
className: p(
|
|
1841
|
+
Ge({
|
|
1842
|
+
checked: !!s,
|
|
1843
|
+
disabled: !!d
|
|
1844
|
+
}),
|
|
1845
|
+
n
|
|
1846
|
+
),
|
|
1847
|
+
"aria-checked": s,
|
|
1848
|
+
role: "checkbox",
|
|
1849
|
+
"aria-label": `Select ${r}`,
|
|
1850
|
+
tabIndex: d ? -1 : 0,
|
|
1851
|
+
children: [
|
|
1852
|
+
/* @__PURE__ */ e.jsx(
|
|
1853
|
+
"input",
|
|
1854
|
+
{
|
|
1855
|
+
ref: a,
|
|
1856
|
+
id: i,
|
|
1857
|
+
type: "checkbox",
|
|
1858
|
+
value: r,
|
|
1859
|
+
checked: s,
|
|
1860
|
+
disabled: d,
|
|
1861
|
+
className: "sr-only",
|
|
1862
|
+
"aria-hidden": !0,
|
|
1863
|
+
"aria-checked": s,
|
|
1864
|
+
...u
|
|
1865
|
+
}
|
|
1866
|
+
),
|
|
1867
|
+
/* @__PURE__ */ e.jsx(
|
|
1868
|
+
"span",
|
|
1869
|
+
{
|
|
1870
|
+
className: Te({
|
|
1871
|
+
checked: !!s,
|
|
1872
|
+
disabled: !!d
|
|
1873
|
+
}),
|
|
1874
|
+
"aria-hidden": "true",
|
|
1875
|
+
children: s ? /* @__PURE__ */ e.jsx(N, { as: R, color: "neutral", size: "md" }) : null
|
|
1876
|
+
}
|
|
1877
|
+
),
|
|
1878
|
+
/* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: t })
|
|
1879
|
+
]
|
|
1880
|
+
}
|
|
1881
|
+
);
|
|
1882
|
+
});
|
|
1715
1883
|
export {
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1884
|
+
Ke as C,
|
|
1885
|
+
Xe as D,
|
|
1886
|
+
sr as E,
|
|
1887
|
+
or as P,
|
|
1888
|
+
Ye as R,
|
|
1889
|
+
Ze as S,
|
|
1890
|
+
S as T,
|
|
1891
|
+
Qe as a,
|
|
1892
|
+
Ue as b,
|
|
1893
|
+
er as c,
|
|
1894
|
+
rr as d,
|
|
1727
1895
|
Ve as e,
|
|
1728
1896
|
Oe as f,
|
|
1729
|
-
|
|
1730
|
-
|
|
1897
|
+
tr as g,
|
|
1898
|
+
De as h,
|
|
1899
|
+
nr as i,
|
|
1900
|
+
ar as j
|
|
1731
1901
|
};
|