@dimasbaguspm/versaur 0.0.36 → 0.0.38
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-CoR7hCZO.js → bottom-sheet-B9Knzg2N.js} +1 -1
- package/dist/js/{bottom-sheet-input-DzZ1xoOR.js → bottom-sheet-input-DnDTMRzo.js} +517 -476
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-B48Z5AzG.js → image-rectangle-C1ydvFGL.js} +311 -235
- package/dist/js/index.js +32 -31
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +3 -3
- package/dist/js/primitive/index.js +24 -23
- package/dist/js/{tabs-Cs-qKwI3.js → tabs-38zAflsT.js} +1 -1
- package/dist/js/{tooltip-D5V0M0cy.js → tooltip-CvOzRRkS.js} +1 -1
- package/dist/js/{top-bar-o8F7AMVL.js → top-bar-CKFu3xrL.js} +1 -1
- package/dist/types/forms/price-input/price-input.d.ts +4 -1
- package/dist/types/overlays/menu/types.d.ts +3 -0
- package/dist/types/primitive/button-menu/button-menu.d.ts +4 -0
- package/dist/types/primitive/button-menu/index.d.ts +2 -0
- package/dist/types/primitive/button-menu/types.d.ts +17 -0
- package/dist/types/primitive/card/types.d.ts +5 -1
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/utils/enforce-subpath-import.js +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import x, { createContext as N, useContext as
|
|
3
|
-
import { I as C } from "./image-rectangle-
|
|
4
|
-
import { Calendar as
|
|
1
|
+
import { c as v, j as e, a as m } from "./index-DOdDlCoL.js";
|
|
2
|
+
import x, { createContext as N, useContext as z, useId as F, forwardRef as j, useRef as B, useState as R, useEffect as U, useMemo as E } from "react";
|
|
3
|
+
import { I as C } from "./image-rectangle-C1ydvFGL.js";
|
|
4
|
+
import { Calendar as X, SearchIcon as Y, Clock as Z, Banknote as ee, MailIcon as re, Check as P } from "lucide-react";
|
|
5
5
|
import "./snackbar-DH8jCh2V.js";
|
|
6
|
-
import { M as
|
|
7
|
-
const
|
|
6
|
+
import { M as O, D as M, B as V } from "./bottom-sheet-B9Knzg2N.js";
|
|
7
|
+
const te = v("space-y-2", {
|
|
8
8
|
variants: {
|
|
9
9
|
direction: {
|
|
10
10
|
vertical: "space-y-2 space-x-0",
|
|
@@ -14,7 +14,7 @@ const re = w("space-y-2", {
|
|
|
14
14
|
defaultVariants: {
|
|
15
15
|
direction: "vertical"
|
|
16
16
|
}
|
|
17
|
-
}),
|
|
17
|
+
}), oe = v(
|
|
18
18
|
"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",
|
|
19
19
|
{
|
|
20
20
|
variants: {
|
|
@@ -52,7 +52,7 @@ const re = w("space-y-2", {
|
|
|
52
52
|
size: "md"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
),
|
|
55
|
+
), ne = v(
|
|
56
56
|
"text-foreground cursor-pointer select-none",
|
|
57
57
|
{
|
|
58
58
|
variants: {
|
|
@@ -71,13 +71,13 @@ const re = w("space-y-2", {
|
|
|
71
71
|
disabled: !1
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
), $ = N(null),
|
|
75
|
-
const r =
|
|
74
|
+
), $ = N(null), se = () => {
|
|
75
|
+
const r = z($);
|
|
76
76
|
if (!r)
|
|
77
77
|
throw new Error("CheckboxOption must be used within CheckboxInput");
|
|
78
78
|
return r;
|
|
79
|
-
}, A = x.forwardRef(({ children: r, description: t, className:
|
|
80
|
-
const
|
|
79
|
+
}, A = x.forwardRef(({ children: r, description: t, className: o, disabled: a, id: n, ...i }, d) => {
|
|
80
|
+
const c = se(), s = x.useId(), g = n || s, u = a || c.disabled, f = c.error ? "danger" : c.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",
|
|
@@ -87,22 +87,22 @@ const re = w("space-y-2", {
|
|
|
87
87
|
id: g,
|
|
88
88
|
disabled: u,
|
|
89
89
|
className: m(
|
|
90
|
-
|
|
90
|
+
oe({
|
|
91
91
|
variant: f,
|
|
92
|
-
size:
|
|
92
|
+
size: c.size
|
|
93
93
|
}),
|
|
94
94
|
// Custom checkmark styling using ::after - centered positioning with size variants
|
|
95
95
|
'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',
|
|
96
96
|
// Size-specific checkmark dimensions
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
c.size === "sm" && "after:w-[3px] after:h-[6px]",
|
|
98
|
+
c.size === "md" && "after:w-[4px] after:h-[8px]",
|
|
99
|
+
c.size === "lg" && "after:w-[6px] after:h-[10px]",
|
|
100
100
|
"checked:after:opacity-100",
|
|
101
101
|
// Outline variants use colored checkmark
|
|
102
102
|
f?.includes("outline") && "checked:after:border-current",
|
|
103
|
-
|
|
103
|
+
o
|
|
104
104
|
),
|
|
105
|
-
...
|
|
105
|
+
...i
|
|
106
106
|
}
|
|
107
107
|
) }),
|
|
108
108
|
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
@@ -110,8 +110,8 @@ const re = w("space-y-2", {
|
|
|
110
110
|
"label",
|
|
111
111
|
{
|
|
112
112
|
htmlFor: g,
|
|
113
|
-
className:
|
|
114
|
-
size:
|
|
113
|
+
className: ne({
|
|
114
|
+
size: c.size,
|
|
115
115
|
disabled: u
|
|
116
116
|
}),
|
|
117
117
|
children: r
|
|
@@ -122,9 +122,9 @@ const re = w("space-y-2", {
|
|
|
122
122
|
{
|
|
123
123
|
className: m(
|
|
124
124
|
"text-gray-600 mt-1",
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
c.size === "sm" && "text-xs",
|
|
126
|
+
c.size === "md" && "text-xs",
|
|
127
|
+
c.size === "lg" && "text-sm",
|
|
128
128
|
u && "opacity-50"
|
|
129
129
|
),
|
|
130
130
|
children: t
|
|
@@ -138,40 +138,40 @@ const H = x.forwardRef(
|
|
|
138
138
|
({
|
|
139
139
|
variant: r = "primary",
|
|
140
140
|
size: t = "md",
|
|
141
|
-
label:
|
|
142
|
-
helperText:
|
|
143
|
-
error:
|
|
144
|
-
direction:
|
|
141
|
+
label: o,
|
|
142
|
+
helperText: a,
|
|
143
|
+
error: n,
|
|
144
|
+
direction: i = "vertical",
|
|
145
145
|
className: d,
|
|
146
|
-
disabled:
|
|
147
|
-
children:
|
|
146
|
+
disabled: c,
|
|
147
|
+
children: s,
|
|
148
148
|
...g
|
|
149
149
|
}, u) => {
|
|
150
|
-
const f = !!
|
|
150
|
+
const f = !!n, l = {
|
|
151
151
|
variant: r,
|
|
152
152
|
size: t,
|
|
153
|
-
disabled:
|
|
153
|
+
disabled: c,
|
|
154
154
|
error: f
|
|
155
155
|
};
|
|
156
156
|
return /* @__PURE__ */ e.jsx($.Provider, { value: l, children: /* @__PURE__ */ e.jsxs("div", { ref: u, className: m("w-full", d), ...g, children: [
|
|
157
|
-
|
|
158
|
-
/* @__PURE__ */ e.jsx("div", { className:
|
|
159
|
-
f && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
160
|
-
!f &&
|
|
157
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: o }),
|
|
158
|
+
/* @__PURE__ */ e.jsx("div", { className: te({ direction: i }), children: s }),
|
|
159
|
+
f && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
160
|
+
!f && a && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: a })
|
|
161
161
|
] }) });
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
164
|
H.displayName = "CheckboxInput";
|
|
165
|
-
const
|
|
165
|
+
const nr = Object.assign(H, {
|
|
166
166
|
Option: A
|
|
167
|
-
}),
|
|
168
|
-
const r =
|
|
167
|
+
}), W = N(null), ae = () => {
|
|
168
|
+
const r = z(W);
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error(
|
|
171
171
|
"useChipSingleInputContext must be used within ChipSingleInputContext"
|
|
172
172
|
);
|
|
173
173
|
return r;
|
|
174
|
-
},
|
|
174
|
+
}, ie = v(
|
|
175
175
|
"inline-flex items-center bg-white font-regular transition-colors duration-200 cursor-pointer border border-border",
|
|
176
176
|
{
|
|
177
177
|
variants: {
|
|
@@ -226,14 +226,14 @@ const er = Object.assign(H, {
|
|
|
226
226
|
size: "sm"
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
),
|
|
229
|
+
), ce = x.forwardRef(({ children: r, className: t, disabled: o, id: a, value: n, ...i }, d) => {
|
|
230
230
|
const {
|
|
231
|
-
variant:
|
|
232
|
-
shape:
|
|
231
|
+
variant: c = "primary",
|
|
232
|
+
shape: s = "circle",
|
|
233
233
|
size: g = "sm",
|
|
234
234
|
...u
|
|
235
|
-
} =
|
|
236
|
-
h || u.onChange?.(
|
|
235
|
+
} = ae(), f = F(), l = a || f, h = o || u.disabled, b = u.value === n, p = (y) => {
|
|
236
|
+
h || u.onChange?.(n), i.onChange?.(y);
|
|
237
237
|
};
|
|
238
238
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
239
239
|
/* @__PURE__ */ e.jsx(
|
|
@@ -243,12 +243,12 @@ const er = Object.assign(H, {
|
|
|
243
243
|
type: "radio",
|
|
244
244
|
id: l,
|
|
245
245
|
name: u.name,
|
|
246
|
-
value:
|
|
246
|
+
value: n,
|
|
247
247
|
checked: b,
|
|
248
248
|
disabled: h,
|
|
249
|
-
onChange:
|
|
249
|
+
onChange: p,
|
|
250
250
|
className: "sr-only",
|
|
251
|
-
...
|
|
251
|
+
...i
|
|
252
252
|
}
|
|
253
253
|
),
|
|
254
254
|
/* @__PURE__ */ e.jsx(
|
|
@@ -257,9 +257,9 @@ const er = Object.assign(H, {
|
|
|
257
257
|
htmlFor: l,
|
|
258
258
|
"data-selected": b,
|
|
259
259
|
className: m(
|
|
260
|
-
|
|
261
|
-
variant:
|
|
262
|
-
shape:
|
|
260
|
+
ie({
|
|
261
|
+
variant: c,
|
|
262
|
+
shape: s,
|
|
263
263
|
size: g
|
|
264
264
|
}),
|
|
265
265
|
h && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
@@ -269,49 +269,49 @@ const er = Object.assign(H, {
|
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
271
|
] });
|
|
272
|
-
}),
|
|
272
|
+
}), de = j(
|
|
273
273
|
({
|
|
274
274
|
variant: r = "primary",
|
|
275
275
|
shape: t = "circle",
|
|
276
|
-
size:
|
|
277
|
-
label:
|
|
278
|
-
helperText:
|
|
279
|
-
error:
|
|
276
|
+
size: o = "sm",
|
|
277
|
+
label: a,
|
|
278
|
+
helperText: n,
|
|
279
|
+
error: i,
|
|
280
280
|
className: d,
|
|
281
|
-
disabled:
|
|
282
|
-
name:
|
|
281
|
+
disabled: c,
|
|
282
|
+
name: s,
|
|
283
283
|
value: g,
|
|
284
284
|
onChange: u,
|
|
285
285
|
children: f,
|
|
286
286
|
...l
|
|
287
287
|
}, h) => {
|
|
288
|
-
const b = !!
|
|
288
|
+
const b = !!i, p = {
|
|
289
289
|
variant: r,
|
|
290
290
|
shape: t,
|
|
291
|
-
size:
|
|
292
|
-
disabled:
|
|
291
|
+
size: o,
|
|
292
|
+
disabled: c,
|
|
293
293
|
error: b,
|
|
294
|
-
name:
|
|
294
|
+
name: s,
|
|
295
295
|
value: g,
|
|
296
296
|
onChange: u
|
|
297
297
|
};
|
|
298
|
-
return /* @__PURE__ */ e.jsx(
|
|
299
|
-
|
|
298
|
+
return /* @__PURE__ */ e.jsx(W.Provider, { value: p, children: /* @__PURE__ */ e.jsxs("div", { ref: h, className: m("w-full", d), ...l, children: [
|
|
299
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: a }),
|
|
300
300
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
|
|
301
|
-
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
302
|
-
!b &&
|
|
301
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: i }),
|
|
302
|
+
!b && n && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: n })
|
|
303
303
|
] }) });
|
|
304
304
|
}
|
|
305
|
-
),
|
|
306
|
-
Option:
|
|
307
|
-
}),
|
|
308
|
-
const r =
|
|
305
|
+
), sr = Object.assign(de, {
|
|
306
|
+
Option: ce
|
|
307
|
+
}), L = N(null), le = () => {
|
|
308
|
+
const r = z(L);
|
|
309
309
|
if (!r)
|
|
310
310
|
throw new Error(
|
|
311
311
|
"useChipMultipleInputContext must be used within ChipMultipleInputContext"
|
|
312
312
|
);
|
|
313
313
|
return r;
|
|
314
|
-
},
|
|
314
|
+
}, ue = v(
|
|
315
315
|
"inline-flex items-center bg-white font-regular transition-colors duration-200 cursor-pointer border border-border",
|
|
316
316
|
{
|
|
317
317
|
variants: {
|
|
@@ -365,19 +365,19 @@ const er = Object.assign(H, {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
),
|
|
368
|
+
), T = j(({ children: r, className: t, disabled: o, id: a, value: n, ...i }, d) => {
|
|
369
369
|
const {
|
|
370
|
-
variant:
|
|
371
|
-
shape:
|
|
370
|
+
variant: c = "primary",
|
|
371
|
+
shape: s = "circle",
|
|
372
372
|
size: g = "sm",
|
|
373
373
|
...u
|
|
374
|
-
} =
|
|
374
|
+
} = le(), f = x.useId(), l = a || f, h = o || u.disabled, b = u.value?.includes(n) ?? !1, p = (y) => {
|
|
375
375
|
if (!h) {
|
|
376
376
|
const k = u.value || [];
|
|
377
|
-
let
|
|
378
|
-
b ?
|
|
377
|
+
let w;
|
|
378
|
+
b ? w = k.filter((S) => S !== n) : w = [...k, n], u.onChange?.(w);
|
|
379
379
|
}
|
|
380
|
-
|
|
380
|
+
i.onChange?.(y);
|
|
381
381
|
};
|
|
382
382
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
383
383
|
/* @__PURE__ */ e.jsx(
|
|
@@ -387,12 +387,12 @@ const er = Object.assign(H, {
|
|
|
387
387
|
type: "checkbox",
|
|
388
388
|
id: l,
|
|
389
389
|
name: `${u.name}[]`,
|
|
390
|
-
value:
|
|
390
|
+
value: n,
|
|
391
391
|
checked: b,
|
|
392
392
|
disabled: h,
|
|
393
|
-
onChange:
|
|
393
|
+
onChange: p,
|
|
394
394
|
className: "sr-only",
|
|
395
|
-
...
|
|
395
|
+
...i
|
|
396
396
|
}
|
|
397
397
|
),
|
|
398
398
|
/* @__PURE__ */ e.jsx(
|
|
@@ -401,9 +401,9 @@ const er = Object.assign(H, {
|
|
|
401
401
|
htmlFor: l,
|
|
402
402
|
"data-selected": b,
|
|
403
403
|
className: m(
|
|
404
|
-
|
|
405
|
-
variant:
|
|
406
|
-
shape:
|
|
404
|
+
ue({
|
|
405
|
+
variant: c,
|
|
406
|
+
shape: s,
|
|
407
407
|
size: g
|
|
408
408
|
}),
|
|
409
409
|
h && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
@@ -414,43 +414,43 @@ const er = Object.assign(H, {
|
|
|
414
414
|
)
|
|
415
415
|
] });
|
|
416
416
|
});
|
|
417
|
-
|
|
418
|
-
const
|
|
417
|
+
T.displayName = "ChipMultipleOption";
|
|
418
|
+
const ge = j(
|
|
419
419
|
({
|
|
420
420
|
variant: r = "primary",
|
|
421
421
|
shape: t = "circle",
|
|
422
|
-
size:
|
|
423
|
-
label:
|
|
424
|
-
helperText:
|
|
425
|
-
error:
|
|
422
|
+
size: o = "sm",
|
|
423
|
+
label: a,
|
|
424
|
+
helperText: n,
|
|
425
|
+
error: i,
|
|
426
426
|
className: d,
|
|
427
|
-
disabled:
|
|
428
|
-
name:
|
|
427
|
+
disabled: c,
|
|
428
|
+
name: s,
|
|
429
429
|
value: g = [],
|
|
430
430
|
onChange: u,
|
|
431
431
|
children: f,
|
|
432
432
|
...l
|
|
433
433
|
}, h) => {
|
|
434
|
-
const b = !!
|
|
434
|
+
const b = !!i, p = {
|
|
435
435
|
variant: r,
|
|
436
436
|
shape: t,
|
|
437
|
-
size:
|
|
438
|
-
disabled:
|
|
437
|
+
size: o,
|
|
438
|
+
disabled: c,
|
|
439
439
|
error: b,
|
|
440
|
-
name:
|
|
440
|
+
name: s,
|
|
441
441
|
value: g,
|
|
442
442
|
onChange: u
|
|
443
443
|
};
|
|
444
|
-
return /* @__PURE__ */ e.jsx(
|
|
445
|
-
|
|
444
|
+
return /* @__PURE__ */ e.jsx(L.Provider, { value: p, children: /* @__PURE__ */ e.jsxs("div", { ref: h, className: m("w-full", d), ...l, children: [
|
|
445
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: a }),
|
|
446
446
|
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
|
|
447
|
-
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
448
|
-
!b &&
|
|
447
|
+
b && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: i }),
|
|
448
|
+
!b && n && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: n })
|
|
449
449
|
] }) });
|
|
450
450
|
}
|
|
451
|
-
),
|
|
452
|
-
Option:
|
|
453
|
-
}),
|
|
451
|
+
), ar = Object.assign(ge, {
|
|
452
|
+
Option: T
|
|
453
|
+
}), fe = v(
|
|
454
454
|
"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",
|
|
455
455
|
{
|
|
456
456
|
variants: {
|
|
@@ -486,16 +486,16 @@ const ue = j(
|
|
|
486
486
|
({
|
|
487
487
|
variant: r = "primary",
|
|
488
488
|
label: t,
|
|
489
|
-
leftContent:
|
|
490
|
-
rightContent:
|
|
491
|
-
helperText:
|
|
492
|
-
error:
|
|
489
|
+
leftContent: o,
|
|
490
|
+
rightContent: a,
|
|
491
|
+
helperText: n,
|
|
492
|
+
error: i,
|
|
493
493
|
className: d,
|
|
494
|
-
disabled:
|
|
495
|
-
id:
|
|
494
|
+
disabled: c,
|
|
495
|
+
id: s,
|
|
496
496
|
...g
|
|
497
497
|
}, u) => {
|
|
498
|
-
const f = x.useId(), l =
|
|
498
|
+
const f = x.useId(), l = s || f, h = !!i;
|
|
499
499
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
500
500
|
t && /* @__PURE__ */ e.jsx(
|
|
501
501
|
"label",
|
|
@@ -506,12 +506,12 @@ const ue = j(
|
|
|
506
506
|
}
|
|
507
507
|
),
|
|
508
508
|
/* @__PURE__ */ e.jsxs("div", { className: m("relative w-full", d), children: [
|
|
509
|
-
|
|
509
|
+
o && /* @__PURE__ */ e.jsx(
|
|
510
510
|
"span",
|
|
511
511
|
{
|
|
512
512
|
className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
513
513
|
"data-testid": "left-content",
|
|
514
|
-
children:
|
|
514
|
+
children: o
|
|
515
515
|
}
|
|
516
516
|
),
|
|
517
517
|
/* @__PURE__ */ e.jsx(
|
|
@@ -520,35 +520,35 @@ const ue = j(
|
|
|
520
520
|
ref: u,
|
|
521
521
|
id: l,
|
|
522
522
|
"aria-invalid": h,
|
|
523
|
-
"aria-disabled":
|
|
524
|
-
disabled:
|
|
523
|
+
"aria-disabled": c,
|
|
524
|
+
disabled: c,
|
|
525
525
|
className: m(
|
|
526
|
-
|
|
526
|
+
fe({
|
|
527
527
|
variant: h ? "danger" : r
|
|
528
528
|
}),
|
|
529
|
-
|
|
530
|
-
|
|
529
|
+
o ? "pl-9" : "pl-3",
|
|
530
|
+
a ? "pr-9" : "pr-3",
|
|
531
531
|
"h-9"
|
|
532
532
|
),
|
|
533
533
|
...g
|
|
534
534
|
}
|
|
535
535
|
),
|
|
536
|
-
|
|
536
|
+
a && /* @__PURE__ */ e.jsx(
|
|
537
537
|
"span",
|
|
538
538
|
{
|
|
539
539
|
className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
540
540
|
"data-testid": "right-content",
|
|
541
|
-
children:
|
|
541
|
+
children: a
|
|
542
542
|
}
|
|
543
543
|
)
|
|
544
544
|
] }),
|
|
545
|
-
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
546
|
-
!h &&
|
|
545
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: i }),
|
|
546
|
+
!h && n && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: n })
|
|
547
547
|
] });
|
|
548
548
|
}
|
|
549
549
|
);
|
|
550
550
|
I.displayName = "TextInput";
|
|
551
|
-
function
|
|
551
|
+
function he(r) {
|
|
552
552
|
if (!r) return "";
|
|
553
553
|
const t = new Date(r);
|
|
554
554
|
return isNaN(t.getTime()) ? r : t.toLocaleDateString(void 0, {
|
|
@@ -557,44 +557,44 @@ function fe(r) {
|
|
|
557
557
|
day: "numeric"
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
const
|
|
561
|
-
const
|
|
562
|
-
|
|
560
|
+
const ir = x.forwardRef(function({ value: t = "", onChange: o, label: a, formatter: n, ...i }, d) {
|
|
561
|
+
const c = B(null), s = (l) => {
|
|
562
|
+
c.current = l, typeof d == "function" ? d(l) : d && typeof d == "object" && (d.current = l);
|
|
563
563
|
}, g = () => {
|
|
564
|
-
|
|
564
|
+
c.current && (typeof c.current.showPicker == "function" ? c.current.showPicker() : c.current.focus());
|
|
565
565
|
}, u = (l) => {
|
|
566
|
-
|
|
567
|
-
}, f = (
|
|
566
|
+
o(l.target.value);
|
|
567
|
+
}, f = (n ?? he)(t);
|
|
568
568
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
569
569
|
/* @__PURE__ */ e.jsx(
|
|
570
570
|
I,
|
|
571
571
|
{
|
|
572
572
|
type: "text",
|
|
573
573
|
value: f,
|
|
574
|
-
label:
|
|
574
|
+
label: a,
|
|
575
575
|
readOnly: !0,
|
|
576
576
|
tabIndex: 0,
|
|
577
577
|
"aria-hidden": "true",
|
|
578
578
|
onClick: g,
|
|
579
|
-
leftContent: /* @__PURE__ */ e.jsx(C, { as:
|
|
579
|
+
leftContent: /* @__PURE__ */ e.jsx(C, { as: X, color: "inherit", size: "sm" }),
|
|
580
580
|
"data-testid": "date-single-picker-visible-input",
|
|
581
|
-
...
|
|
581
|
+
...i
|
|
582
582
|
}
|
|
583
583
|
),
|
|
584
584
|
/* @__PURE__ */ e.jsx(
|
|
585
585
|
"input",
|
|
586
586
|
{
|
|
587
|
-
ref:
|
|
587
|
+
ref: s,
|
|
588
588
|
type: "date",
|
|
589
589
|
value: t,
|
|
590
590
|
onChange: u,
|
|
591
591
|
className: "sr-only absolute opacity-0 h-0 w-0 pointer-events-none",
|
|
592
592
|
tabIndex: -1,
|
|
593
|
-
"aria-label": typeof
|
|
593
|
+
"aria-label": typeof a == "string" ? a : void 0
|
|
594
594
|
}
|
|
595
595
|
)
|
|
596
596
|
] });
|
|
597
|
-
}),
|
|
597
|
+
}), be = v("space-y-2", {
|
|
598
598
|
variants: {
|
|
599
599
|
direction: {
|
|
600
600
|
vertical: "space-y-2 space-x-0",
|
|
@@ -604,7 +604,7 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
604
604
|
defaultVariants: {
|
|
605
605
|
direction: "vertical"
|
|
606
606
|
}
|
|
607
|
-
}),
|
|
607
|
+
}), xe = v(
|
|
608
608
|
"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",
|
|
609
609
|
{
|
|
610
610
|
variants: {
|
|
@@ -642,7 +642,7 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
642
642
|
size: "md"
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
),
|
|
645
|
+
), me = v(
|
|
646
646
|
"text-foreground cursor-pointer select-none",
|
|
647
647
|
{
|
|
648
648
|
variants: {
|
|
@@ -661,43 +661,43 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
661
661
|
disabled: !1
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
|
-
),
|
|
664
|
+
), G = N(
|
|
665
665
|
null
|
|
666
|
-
),
|
|
667
|
-
const r =
|
|
666
|
+
), pe = () => {
|
|
667
|
+
const r = z(G);
|
|
668
668
|
if (!r)
|
|
669
669
|
throw new Error(
|
|
670
670
|
"useRadioInputContext must be used within RadioInputContext"
|
|
671
671
|
);
|
|
672
672
|
return r;
|
|
673
|
-
},
|
|
674
|
-
({ children: r, description: t, className:
|
|
675
|
-
const
|
|
673
|
+
}, ye = x.forwardRef(
|
|
674
|
+
({ children: r, description: t, className: o, disabled: a, id: n, value: i, ...d }, c) => {
|
|
675
|
+
const s = pe(), g = x.useId(), u = n || g, f = a || s.disabled, l = s.error ? "danger" : s.variant || "primary";
|
|
676
676
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
677
677
|
/* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
678
678
|
"input",
|
|
679
679
|
{
|
|
680
|
-
ref:
|
|
680
|
+
ref: c,
|
|
681
681
|
type: "radio",
|
|
682
682
|
id: u,
|
|
683
|
-
name:
|
|
684
|
-
value:
|
|
683
|
+
name: s.name,
|
|
684
|
+
value: i,
|
|
685
685
|
disabled: f,
|
|
686
686
|
className: m(
|
|
687
|
-
|
|
687
|
+
xe({
|
|
688
688
|
variant: l,
|
|
689
|
-
size:
|
|
689
|
+
size: s.size
|
|
690
690
|
}),
|
|
691
691
|
// Custom radio dot styling using ::before - centered positioning with size variants
|
|
692
692
|
'before:content-[""] before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:bg-white before:opacity-0 before:transition-opacity before:duration-200',
|
|
693
693
|
// Size-specific radio dot dimensions
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
694
|
+
s.size === "sm" && "before:w-[6px] before:h-[6px]",
|
|
695
|
+
s.size === "md" && "before:w-[8px] before:h-[8px]",
|
|
696
|
+
s.size === "lg" && "before:w-[10px] before:h-[10px]",
|
|
697
697
|
"checked:before:opacity-100",
|
|
698
698
|
// Outline variants use colored radio dot
|
|
699
699
|
l?.includes("outline") && "checked:before:bg-current",
|
|
700
|
-
|
|
700
|
+
o
|
|
701
701
|
),
|
|
702
702
|
...d
|
|
703
703
|
}
|
|
@@ -707,8 +707,8 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
707
707
|
"label",
|
|
708
708
|
{
|
|
709
709
|
htmlFor: u,
|
|
710
|
-
className:
|
|
711
|
-
size:
|
|
710
|
+
className: me({
|
|
711
|
+
size: s.size,
|
|
712
712
|
disabled: f
|
|
713
713
|
}),
|
|
714
714
|
children: r
|
|
@@ -719,9 +719,9 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
719
719
|
{
|
|
720
720
|
className: m(
|
|
721
721
|
"text-gray-600 mt-1",
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
722
|
+
s.size === "sm" && "text-xs",
|
|
723
|
+
s.size === "md" && "text-xs",
|
|
724
|
+
s.size === "lg" && "text-sm",
|
|
725
725
|
f && "opacity-50"
|
|
726
726
|
),
|
|
727
727
|
children: t
|
|
@@ -730,37 +730,37 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
730
730
|
] })
|
|
731
731
|
] });
|
|
732
732
|
}
|
|
733
|
-
),
|
|
733
|
+
), we = x.forwardRef(
|
|
734
734
|
({
|
|
735
735
|
variant: r = "primary",
|
|
736
736
|
size: t = "md",
|
|
737
|
-
label:
|
|
738
|
-
helperText:
|
|
739
|
-
error:
|
|
740
|
-
direction:
|
|
737
|
+
label: o,
|
|
738
|
+
helperText: a,
|
|
739
|
+
error: n,
|
|
740
|
+
direction: i = "vertical",
|
|
741
741
|
className: d,
|
|
742
|
-
disabled:
|
|
743
|
-
name:
|
|
742
|
+
disabled: c,
|
|
743
|
+
name: s,
|
|
744
744
|
children: g,
|
|
745
745
|
...u
|
|
746
746
|
}, f) => {
|
|
747
|
-
const l = !!
|
|
747
|
+
const l = !!n, h = {
|
|
748
748
|
variant: r,
|
|
749
749
|
size: t,
|
|
750
|
-
disabled:
|
|
750
|
+
disabled: c,
|
|
751
751
|
error: l,
|
|
752
|
-
name:
|
|
752
|
+
name: s
|
|
753
753
|
};
|
|
754
|
-
return /* @__PURE__ */ e.jsx(
|
|
755
|
-
|
|
756
|
-
/* @__PURE__ */ e.jsx("div", { className:
|
|
757
|
-
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
758
|
-
!l &&
|
|
754
|
+
return /* @__PURE__ */ e.jsx(G.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: f, className: m("w-full", d), ...u, children: [
|
|
755
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: o }),
|
|
756
|
+
/* @__PURE__ */ e.jsx("div", { className: be({ direction: i }), children: g }),
|
|
757
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
758
|
+
!l && a && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: a })
|
|
759
759
|
] }) });
|
|
760
760
|
}
|
|
761
|
-
),
|
|
762
|
-
Option:
|
|
763
|
-
}),
|
|
761
|
+
), cr = Object.assign(we, {
|
|
762
|
+
Option: ye
|
|
763
|
+
}), ve = v(
|
|
764
764
|
"flex flex-row rounded-full border overflow-hidden p-1 gap-0.25",
|
|
765
765
|
{
|
|
766
766
|
variants: {
|
|
@@ -793,7 +793,7 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
793
793
|
error: !1
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
),
|
|
796
|
+
), ke = v(
|
|
797
797
|
"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",
|
|
798
798
|
{
|
|
799
799
|
variants: {
|
|
@@ -828,7 +828,7 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
828
828
|
rounded: "middle"
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
|
-
),
|
|
831
|
+
), je = (r) => {
|
|
832
832
|
const t = {
|
|
833
833
|
// Core variants - override hover text color changes
|
|
834
834
|
primary: "bg-primary text-white hover:text-white",
|
|
@@ -843,31 +843,31 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
843
843
|
danger: "bg-danger text-white hover:text-white"
|
|
844
844
|
};
|
|
845
845
|
return t[r || "primary"] || t.primary;
|
|
846
|
-
},
|
|
847
|
-
const r =
|
|
846
|
+
}, K = N(null), Ie = () => {
|
|
847
|
+
const r = z(K);
|
|
848
848
|
if (!r)
|
|
849
849
|
throw new Error(
|
|
850
850
|
"useSegmentSingleInputContext must be used within SegmentSingleInputContext"
|
|
851
851
|
);
|
|
852
852
|
return r;
|
|
853
853
|
}, _ = x.forwardRef(
|
|
854
|
-
({ children: r, className: t, disabled:
|
|
855
|
-
const
|
|
854
|
+
({ children: r, className: t, disabled: o, id: a, value: n, position: i = "middle", ...d }, c) => {
|
|
855
|
+
const s = Ie(), g = x.useId(), u = a || g, f = o || s.disabled, l = s.error ? "danger" : s.variant || "primary", h = s.value === n, b = (p) => {
|
|
856
856
|
if (!f) {
|
|
857
|
-
const
|
|
858
|
-
|
|
857
|
+
const y = s.value === n ? null : n;
|
|
858
|
+
s.onChange?.(y);
|
|
859
859
|
}
|
|
860
|
-
d.onChange?.(
|
|
860
|
+
d.onChange?.(p);
|
|
861
861
|
};
|
|
862
862
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
863
863
|
/* @__PURE__ */ e.jsx(
|
|
864
864
|
"input",
|
|
865
865
|
{
|
|
866
|
-
ref:
|
|
866
|
+
ref: c,
|
|
867
867
|
type: "radio",
|
|
868
868
|
id: u,
|
|
869
|
-
name:
|
|
870
|
-
value:
|
|
869
|
+
name: s.name,
|
|
870
|
+
value: n,
|
|
871
871
|
checked: h,
|
|
872
872
|
disabled: f,
|
|
873
873
|
onChange: b,
|
|
@@ -881,12 +881,12 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
881
881
|
htmlFor: u,
|
|
882
882
|
className: m(
|
|
883
883
|
"flex flex-row items-center justify-center",
|
|
884
|
-
|
|
884
|
+
ke({
|
|
885
885
|
variant: l,
|
|
886
|
-
size:
|
|
887
|
-
rounded:
|
|
886
|
+
size: s.size,
|
|
887
|
+
rounded: i
|
|
888
888
|
}),
|
|
889
|
-
h &&
|
|
889
|
+
h && je(l),
|
|
890
890
|
f && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
891
891
|
t
|
|
892
892
|
),
|
|
@@ -897,60 +897,60 @@ const or = x.forwardRef(function({ value: t = "", onChange: n, label: i, formatt
|
|
|
897
897
|
}
|
|
898
898
|
);
|
|
899
899
|
_.displayName = "SegmentOption";
|
|
900
|
-
const
|
|
900
|
+
const Ce = x.forwardRef(
|
|
901
901
|
({
|
|
902
902
|
variant: r = "primary",
|
|
903
903
|
size: t = "md",
|
|
904
|
-
label:
|
|
905
|
-
helperText:
|
|
906
|
-
error:
|
|
907
|
-
disabled:
|
|
904
|
+
label: o,
|
|
905
|
+
helperText: a,
|
|
906
|
+
error: n,
|
|
907
|
+
disabled: i,
|
|
908
908
|
name: d,
|
|
909
|
-
value:
|
|
910
|
-
onChange:
|
|
909
|
+
value: c,
|
|
910
|
+
onChange: s,
|
|
911
911
|
children: g,
|
|
912
912
|
...u
|
|
913
913
|
}, f) => {
|
|
914
|
-
const l = !!
|
|
914
|
+
const l = !!n, h = {
|
|
915
915
|
variant: r,
|
|
916
916
|
size: t,
|
|
917
|
-
disabled:
|
|
917
|
+
disabled: i,
|
|
918
918
|
error: l,
|
|
919
919
|
name: d,
|
|
920
|
-
value:
|
|
921
|
-
onChange:
|
|
922
|
-
}, b = x.Children.toArray(g),
|
|
923
|
-
if (x.isValidElement(
|
|
924
|
-
let
|
|
925
|
-
return b.length === 1 ?
|
|
926
|
-
|
|
927
|
-
{ position:
|
|
920
|
+
value: c,
|
|
921
|
+
onChange: s
|
|
922
|
+
}, b = x.Children.toArray(g), p = b.map((y, k) => {
|
|
923
|
+
if (x.isValidElement(y)) {
|
|
924
|
+
let w;
|
|
925
|
+
return b.length === 1 ? w = "single" : k === 0 ? w = "first" : k === b.length - 1 ? w = "last" : w = "middle", x.cloneElement(
|
|
926
|
+
y,
|
|
927
|
+
{ position: w }
|
|
928
928
|
);
|
|
929
929
|
}
|
|
930
|
-
return
|
|
930
|
+
return y;
|
|
931
931
|
});
|
|
932
|
-
return /* @__PURE__ */ e.jsx(
|
|
933
|
-
|
|
932
|
+
return /* @__PURE__ */ e.jsx(K.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: f, ...u, children: [
|
|
933
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: o }),
|
|
934
934
|
/* @__PURE__ */ e.jsx(
|
|
935
935
|
"div",
|
|
936
936
|
{
|
|
937
937
|
className: m(
|
|
938
|
-
|
|
938
|
+
ve({
|
|
939
939
|
variant: l ? "danger" : r,
|
|
940
940
|
size: t,
|
|
941
941
|
error: l
|
|
942
942
|
})
|
|
943
943
|
),
|
|
944
|
-
children:
|
|
944
|
+
children: p
|
|
945
945
|
}
|
|
946
946
|
),
|
|
947
|
-
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
948
|
-
!l &&
|
|
947
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
948
|
+
!l && a && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: a })
|
|
949
949
|
] }) });
|
|
950
950
|
}
|
|
951
|
-
),
|
|
951
|
+
), dr = Object.assign(Ce, {
|
|
952
952
|
Option: _
|
|
953
|
-
}),
|
|
953
|
+
}), Ne = v(
|
|
954
954
|
"flex flex-row rounded-full border overflow-hidden p-1 gap-0.25",
|
|
955
955
|
{
|
|
956
956
|
variants: {
|
|
@@ -983,7 +983,7 @@ const Ie = x.forwardRef(
|
|
|
983
983
|
error: !1
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
),
|
|
986
|
+
), ze = v(
|
|
987
987
|
"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",
|
|
988
988
|
{
|
|
989
989
|
variants: {
|
|
@@ -1033,32 +1033,32 @@ const Ie = x.forwardRef(
|
|
|
1033
1033
|
danger: "bg-danger text-white hover:text-white"
|
|
1034
1034
|
};
|
|
1035
1035
|
return t[r || "primary"] || t.primary;
|
|
1036
|
-
}, q = N(null),
|
|
1037
|
-
const r =
|
|
1036
|
+
}, q = N(null), Ve = () => {
|
|
1037
|
+
const r = z(q);
|
|
1038
1038
|
if (!r)
|
|
1039
1039
|
throw new Error(
|
|
1040
1040
|
"useSegmentMultipleInputContext must be used within SegmentMultipleInputContext"
|
|
1041
1041
|
);
|
|
1042
1042
|
return r;
|
|
1043
1043
|
}, J = x.forwardRef(
|
|
1044
|
-
({ children: r, className: t, disabled:
|
|
1045
|
-
const
|
|
1044
|
+
({ children: r, className: t, disabled: o, id: a, value: n, position: i = "middle", ...d }, c) => {
|
|
1045
|
+
const s = Ve(), g = x.useId(), u = a || g, f = o || s.disabled, l = s.error ? "danger" : s.variant || "primary", h = s.value?.includes(n) ?? !1, b = (p) => {
|
|
1046
1046
|
if (!f) {
|
|
1047
|
-
const
|
|
1047
|
+
const y = s.value || [];
|
|
1048
1048
|
let k;
|
|
1049
|
-
h ? k =
|
|
1049
|
+
h ? k = y.filter((w) => w !== n) : k = [...y, n], s.onChange?.(k);
|
|
1050
1050
|
}
|
|
1051
|
-
d.onChange?.(
|
|
1051
|
+
d.onChange?.(p);
|
|
1052
1052
|
};
|
|
1053
1053
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1054
1054
|
/* @__PURE__ */ e.jsx(
|
|
1055
1055
|
"input",
|
|
1056
1056
|
{
|
|
1057
|
-
ref:
|
|
1057
|
+
ref: c,
|
|
1058
1058
|
type: "checkbox",
|
|
1059
1059
|
id: u,
|
|
1060
|
-
name: `${
|
|
1061
|
-
value:
|
|
1060
|
+
name: `${s.name}[]`,
|
|
1061
|
+
value: n,
|
|
1062
1062
|
checked: h,
|
|
1063
1063
|
disabled: f,
|
|
1064
1064
|
onChange: b,
|
|
@@ -1072,10 +1072,10 @@ const Ie = x.forwardRef(
|
|
|
1072
1072
|
htmlFor: u,
|
|
1073
1073
|
className: m(
|
|
1074
1074
|
"flex flex-row items-center justify-center",
|
|
1075
|
-
|
|
1075
|
+
ze({
|
|
1076
1076
|
variant: l,
|
|
1077
|
-
size:
|
|
1078
|
-
rounded:
|
|
1077
|
+
size: s.size,
|
|
1078
|
+
rounded: i
|
|
1079
1079
|
}),
|
|
1080
1080
|
h && Se(l),
|
|
1081
1081
|
f && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
@@ -1088,87 +1088,87 @@ const Ie = x.forwardRef(
|
|
|
1088
1088
|
}
|
|
1089
1089
|
);
|
|
1090
1090
|
J.displayName = "SegmentOption";
|
|
1091
|
-
const
|
|
1091
|
+
const Re = x.forwardRef(
|
|
1092
1092
|
({
|
|
1093
1093
|
variant: r = "primary",
|
|
1094
1094
|
size: t = "md",
|
|
1095
|
-
label:
|
|
1096
|
-
helperText:
|
|
1097
|
-
error:
|
|
1098
|
-
disabled:
|
|
1095
|
+
label: o,
|
|
1096
|
+
helperText: a,
|
|
1097
|
+
error: n,
|
|
1098
|
+
disabled: i,
|
|
1099
1099
|
name: d,
|
|
1100
|
-
value:
|
|
1101
|
-
onChange:
|
|
1100
|
+
value: c = [],
|
|
1101
|
+
onChange: s,
|
|
1102
1102
|
children: g,
|
|
1103
1103
|
...u
|
|
1104
1104
|
}, f) => {
|
|
1105
|
-
const l = !!
|
|
1105
|
+
const l = !!n, h = {
|
|
1106
1106
|
variant: r,
|
|
1107
1107
|
size: t,
|
|
1108
|
-
disabled:
|
|
1108
|
+
disabled: i,
|
|
1109
1109
|
error: l,
|
|
1110
1110
|
name: d,
|
|
1111
|
-
value:
|
|
1112
|
-
onChange:
|
|
1113
|
-
}, b = x.Children.toArray(g),
|
|
1114
|
-
if (x.isValidElement(
|
|
1115
|
-
let
|
|
1116
|
-
return b.length === 1 ?
|
|
1117
|
-
|
|
1118
|
-
{ position:
|
|
1111
|
+
value: c,
|
|
1112
|
+
onChange: s
|
|
1113
|
+
}, b = x.Children.toArray(g), p = b.map((y, k) => {
|
|
1114
|
+
if (x.isValidElement(y)) {
|
|
1115
|
+
let w;
|
|
1116
|
+
return b.length === 1 ? w = "single" : k === 0 ? w = "first" : k === b.length - 1 ? w = "last" : w = "middle", x.cloneElement(
|
|
1117
|
+
y,
|
|
1118
|
+
{ position: w }
|
|
1119
1119
|
);
|
|
1120
1120
|
}
|
|
1121
|
-
return
|
|
1121
|
+
return y;
|
|
1122
1122
|
});
|
|
1123
1123
|
return /* @__PURE__ */ e.jsx(q.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: f, ...u, children: [
|
|
1124
|
-
|
|
1124
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: o }),
|
|
1125
1125
|
/* @__PURE__ */ e.jsx(
|
|
1126
1126
|
"div",
|
|
1127
1127
|
{
|
|
1128
1128
|
className: m(
|
|
1129
|
-
|
|
1129
|
+
Ne({
|
|
1130
1130
|
variant: l ? "danger" : r,
|
|
1131
1131
|
size: t,
|
|
1132
1132
|
error: l
|
|
1133
1133
|
})
|
|
1134
1134
|
),
|
|
1135
|
-
children:
|
|
1135
|
+
children: p
|
|
1136
1136
|
}
|
|
1137
1137
|
),
|
|
1138
|
-
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children:
|
|
1139
|
-
!l &&
|
|
1138
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
|
|
1139
|
+
!l && a && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: a })
|
|
1140
1140
|
] }) });
|
|
1141
1141
|
}
|
|
1142
|
-
),
|
|
1142
|
+
), lr = Object.assign(Re, {
|
|
1143
1143
|
Option: J
|
|
1144
|
-
}),
|
|
1144
|
+
}), ur = j(
|
|
1145
1145
|
({
|
|
1146
1146
|
autoComplete: r = "off",
|
|
1147
1147
|
spellCheck: t = !1,
|
|
1148
|
-
inputMode:
|
|
1149
|
-
placeholder:
|
|
1150
|
-
maxLength:
|
|
1151
|
-
enterKeyHint:
|
|
1148
|
+
inputMode: o = "search",
|
|
1149
|
+
placeholder: a = "Search...",
|
|
1150
|
+
maxLength: n = 256,
|
|
1151
|
+
enterKeyHint: i = "search",
|
|
1152
1152
|
"aria-label": d = "Search",
|
|
1153
1153
|
// internal default, not in props
|
|
1154
|
-
...
|
|
1155
|
-
},
|
|
1154
|
+
...c
|
|
1155
|
+
}, s) => /* @__PURE__ */ e.jsx(
|
|
1156
1156
|
I,
|
|
1157
1157
|
{
|
|
1158
|
-
ref:
|
|
1158
|
+
ref: s,
|
|
1159
1159
|
type: "search",
|
|
1160
|
-
inputMode:
|
|
1160
|
+
inputMode: o,
|
|
1161
1161
|
autoComplete: r,
|
|
1162
1162
|
spellCheck: t,
|
|
1163
|
-
placeholder:
|
|
1164
|
-
maxLength:
|
|
1165
|
-
enterKeyHint:
|
|
1163
|
+
placeholder: a,
|
|
1164
|
+
maxLength: n,
|
|
1165
|
+
enterKeyHint: i,
|
|
1166
1166
|
"aria-label": d,
|
|
1167
|
-
leftContent: /* @__PURE__ */ e.jsx(C, { as:
|
|
1168
|
-
...
|
|
1167
|
+
leftContent: /* @__PURE__ */ e.jsx(C, { as: Y, color: "inherit", size: "sm" }),
|
|
1168
|
+
...c
|
|
1169
1169
|
}
|
|
1170
1170
|
)
|
|
1171
|
-
), Oe =
|
|
1171
|
+
), Oe = v(
|
|
1172
1172
|
"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",
|
|
1173
1173
|
{
|
|
1174
1174
|
variants: {
|
|
@@ -1200,20 +1200,20 @@ const Ve = x.forwardRef(
|
|
|
1200
1200
|
variant: "primary"
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
),
|
|
1203
|
+
), Me = x.forwardRef(
|
|
1204
1204
|
({
|
|
1205
1205
|
variant: r = "primary",
|
|
1206
1206
|
label: t,
|
|
1207
|
-
helperText:
|
|
1208
|
-
error:
|
|
1209
|
-
className:
|
|
1210
|
-
disabled:
|
|
1207
|
+
helperText: o,
|
|
1208
|
+
error: a,
|
|
1209
|
+
className: n,
|
|
1210
|
+
disabled: i,
|
|
1211
1211
|
id: d,
|
|
1212
|
-
placeholder:
|
|
1213
|
-
children:
|
|
1212
|
+
placeholder: c,
|
|
1213
|
+
children: s,
|
|
1214
1214
|
...g
|
|
1215
1215
|
}, u) => {
|
|
1216
|
-
const f = x.useId(), l = d || f, h = !!
|
|
1216
|
+
const f = x.useId(), l = d || f, h = !!a;
|
|
1217
1217
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1218
1218
|
/* @__PURE__ */ e.jsx(
|
|
1219
1219
|
"label",
|
|
@@ -1223,15 +1223,15 @@ const Ve = x.forwardRef(
|
|
|
1223
1223
|
children: t
|
|
1224
1224
|
}
|
|
1225
1225
|
),
|
|
1226
|
-
/* @__PURE__ */ e.jsxs("div", { className: m("relative w-full",
|
|
1226
|
+
/* @__PURE__ */ e.jsxs("div", { className: m("relative w-full", n), children: [
|
|
1227
1227
|
/* @__PURE__ */ e.jsxs(
|
|
1228
1228
|
"select",
|
|
1229
1229
|
{
|
|
1230
1230
|
ref: u,
|
|
1231
1231
|
id: l,
|
|
1232
1232
|
"aria-invalid": h,
|
|
1233
|
-
"aria-disabled":
|
|
1234
|
-
disabled:
|
|
1233
|
+
"aria-disabled": i,
|
|
1234
|
+
disabled: i,
|
|
1235
1235
|
className: m(
|
|
1236
1236
|
Oe({
|
|
1237
1237
|
variant: h ? "danger" : r
|
|
@@ -1240,8 +1240,8 @@ const Ve = x.forwardRef(
|
|
|
1240
1240
|
),
|
|
1241
1241
|
...g,
|
|
1242
1242
|
children: [
|
|
1243
|
-
|
|
1244
|
-
|
|
1243
|
+
c && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: c }),
|
|
1244
|
+
s
|
|
1245
1245
|
]
|
|
1246
1246
|
}
|
|
1247
1247
|
),
|
|
@@ -1264,13 +1264,13 @@ const Ve = x.forwardRef(
|
|
|
1264
1264
|
}
|
|
1265
1265
|
) })
|
|
1266
1266
|
] }),
|
|
1267
|
-
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children:
|
|
1268
|
-
!h &&
|
|
1267
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: a }),
|
|
1268
|
+
!h && o && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: o })
|
|
1269
1269
|
] });
|
|
1270
1270
|
}
|
|
1271
1271
|
);
|
|
1272
|
-
|
|
1273
|
-
const
|
|
1272
|
+
Me.displayName = "SelectInput";
|
|
1273
|
+
const Fe = v(
|
|
1274
1274
|
"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",
|
|
1275
1275
|
{
|
|
1276
1276
|
variants: {
|
|
@@ -1311,22 +1311,22 @@ const Me = w(
|
|
|
1311
1311
|
({
|
|
1312
1312
|
variant: r = "primary",
|
|
1313
1313
|
label: t,
|
|
1314
|
-
helperText:
|
|
1315
|
-
error:
|
|
1316
|
-
className:
|
|
1317
|
-
disabled:
|
|
1314
|
+
helperText: o,
|
|
1315
|
+
error: a,
|
|
1316
|
+
className: n,
|
|
1317
|
+
disabled: i,
|
|
1318
1318
|
id: d,
|
|
1319
|
-
minRows:
|
|
1320
|
-
maxRows:
|
|
1319
|
+
minRows: c = 3,
|
|
1320
|
+
maxRows: s,
|
|
1321
1321
|
fieldSizing: g = "fixed",
|
|
1322
1322
|
style: u,
|
|
1323
1323
|
rows: f,
|
|
1324
1324
|
...l
|
|
1325
1325
|
}, h) => {
|
|
1326
|
-
const b = x.useId(),
|
|
1326
|
+
const b = x.useId(), p = d || b, y = !!a, k = f || c, w = g === "content" ? void 0 : s, S = {
|
|
1327
1327
|
...g === "content" && { fieldSizing: "content" },
|
|
1328
|
-
...
|
|
1329
|
-
maxHeight: `${
|
|
1328
|
+
...w && {
|
|
1329
|
+
maxHeight: `${w * 1.5}rem`
|
|
1330
1330
|
// Approximate line height
|
|
1331
1331
|
},
|
|
1332
1332
|
...u
|
|
@@ -1335,24 +1335,24 @@ const Me = w(
|
|
|
1335
1335
|
t && /* @__PURE__ */ e.jsx(
|
|
1336
1336
|
"label",
|
|
1337
1337
|
{
|
|
1338
|
-
htmlFor:
|
|
1338
|
+
htmlFor: p,
|
|
1339
1339
|
className: "block text-sm font-medium text-foreground mb-2",
|
|
1340
1340
|
children: t
|
|
1341
1341
|
}
|
|
1342
1342
|
),
|
|
1343
|
-
/* @__PURE__ */ e.jsx("div", { className: m("relative w-full",
|
|
1343
|
+
/* @__PURE__ */ e.jsx("div", { className: m("relative w-full", n), children: /* @__PURE__ */ e.jsx(
|
|
1344
1344
|
"textarea",
|
|
1345
1345
|
{
|
|
1346
1346
|
ref: h,
|
|
1347
|
-
id:
|
|
1347
|
+
id: p,
|
|
1348
1348
|
rows: k,
|
|
1349
|
-
"aria-invalid":
|
|
1350
|
-
"aria-disabled":
|
|
1351
|
-
disabled:
|
|
1352
|
-
style:
|
|
1349
|
+
"aria-invalid": y,
|
|
1350
|
+
"aria-disabled": i,
|
|
1351
|
+
disabled: i,
|
|
1352
|
+
style: S,
|
|
1353
1353
|
className: m(
|
|
1354
|
-
|
|
1355
|
-
variant:
|
|
1354
|
+
Fe({
|
|
1355
|
+
variant: y ? "danger" : r,
|
|
1356
1356
|
fieldSizing: g
|
|
1357
1357
|
}),
|
|
1358
1358
|
"px-3 py-2"
|
|
@@ -1360,15 +1360,15 @@ const Me = w(
|
|
|
1360
1360
|
...l
|
|
1361
1361
|
}
|
|
1362
1362
|
) }),
|
|
1363
|
-
|
|
1364
|
-
!
|
|
1363
|
+
y && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: a }),
|
|
1364
|
+
!y && o && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: o })
|
|
1365
1365
|
] });
|
|
1366
1366
|
}
|
|
1367
1367
|
);
|
|
1368
1368
|
Ee.displayName = "TextAreaInput";
|
|
1369
|
-
const
|
|
1370
|
-
const
|
|
1371
|
-
t?.onChange?.(
|
|
1369
|
+
const gr = j(function(t, o) {
|
|
1370
|
+
const a = (n) => {
|
|
1371
|
+
t?.onChange?.(n.target.value);
|
|
1372
1372
|
};
|
|
1373
1373
|
return /* @__PURE__ */ e.jsx(
|
|
1374
1374
|
I,
|
|
@@ -1376,13 +1376,13 @@ const cr = j(function(t, n) {
|
|
|
1376
1376
|
type: "time",
|
|
1377
1377
|
tabIndex: 0,
|
|
1378
1378
|
"aria-hidden": "true",
|
|
1379
|
-
leftContent: /* @__PURE__ */ e.jsx(C, { as:
|
|
1380
|
-
ref:
|
|
1379
|
+
leftContent: /* @__PURE__ */ e.jsx(C, { as: Z, color: "inherit", size: "sm" }),
|
|
1380
|
+
ref: o,
|
|
1381
1381
|
...t,
|
|
1382
|
-
onChange:
|
|
1382
|
+
onChange: a
|
|
1383
1383
|
}
|
|
1384
1384
|
);
|
|
1385
|
-
}),
|
|
1385
|
+
}), De = v(
|
|
1386
1386
|
"relative inline-flex items-center transition-colors duration-200 border border-transparent",
|
|
1387
1387
|
{
|
|
1388
1388
|
variants: {
|
|
@@ -1438,7 +1438,7 @@ const cr = j(function(t, n) {
|
|
|
1438
1438
|
{ checked: !1, class: "bg-white border-border" }
|
|
1439
1439
|
]
|
|
1440
1440
|
}
|
|
1441
|
-
), Be =
|
|
1441
|
+
), Be = v(
|
|
1442
1442
|
"absolute rounded-full transition-transform duration-200",
|
|
1443
1443
|
{
|
|
1444
1444
|
variants: {
|
|
@@ -1457,52 +1457,52 @@ const cr = j(function(t, n) {
|
|
|
1457
1457
|
checked: !1
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
|
-
),
|
|
1460
|
+
), Pe = ({
|
|
1461
1461
|
color: r = "primary",
|
|
1462
1462
|
size: t = "md",
|
|
1463
|
-
disabled:
|
|
1464
|
-
className:
|
|
1465
|
-
checked:
|
|
1463
|
+
disabled: o = !1,
|
|
1464
|
+
className: a,
|
|
1465
|
+
checked: n
|
|
1466
1466
|
}) => /* @__PURE__ */ e.jsx(
|
|
1467
1467
|
"span",
|
|
1468
1468
|
{
|
|
1469
1469
|
className: m(
|
|
1470
|
-
|
|
1470
|
+
De({ color: r, size: t, disabled: o, checked: n }),
|
|
1471
1471
|
"rounded-full pointer-events-none",
|
|
1472
|
-
|
|
1472
|
+
a
|
|
1473
1473
|
),
|
|
1474
1474
|
"aria-hidden": "true"
|
|
1475
1475
|
}
|
|
1476
|
-
),
|
|
1476
|
+
), $e = ({ size: r = "md", checked: t = !1 }) => /* @__PURE__ */ e.jsx("span", { className: m(Be({ size: r, checked: t })), "aria-hidden": "true" }), Ae = ({ label: r, htmlFor: t, placement: o = "top", disabled: a = !1 }) => r ? /* @__PURE__ */ e.jsx(
|
|
1477
1477
|
"label",
|
|
1478
1478
|
{
|
|
1479
1479
|
htmlFor: t,
|
|
1480
1480
|
className: m(
|
|
1481
1481
|
"text-sm select-none font-medium text-foreground",
|
|
1482
|
-
|
|
1483
|
-
|
|
1482
|
+
o === "inline" ? "ml-2 mb-0" : "mb-1",
|
|
1483
|
+
a && "opacity-50 cursor-not-allowed"
|
|
1484
1484
|
),
|
|
1485
1485
|
children: r
|
|
1486
1486
|
}
|
|
1487
|
-
) : null,
|
|
1487
|
+
) : null, He = x.forwardRef(
|
|
1488
1488
|
({
|
|
1489
1489
|
checked: r,
|
|
1490
1490
|
defaultChecked: t,
|
|
1491
|
-
onCheckedChange:
|
|
1492
|
-
color:
|
|
1493
|
-
size:
|
|
1494
|
-
label:
|
|
1491
|
+
onCheckedChange: o,
|
|
1492
|
+
color: a = "primary",
|
|
1493
|
+
size: n = "md",
|
|
1494
|
+
label: i,
|
|
1495
1495
|
labelPlacement: d = "top",
|
|
1496
|
-
disabled:
|
|
1497
|
-
className:
|
|
1496
|
+
disabled: c = !1,
|
|
1497
|
+
className: s,
|
|
1498
1498
|
id: g,
|
|
1499
1499
|
ariaLabel: u,
|
|
1500
1500
|
...f
|
|
1501
1501
|
}, l) => {
|
|
1502
|
-
const [h, b] =
|
|
1502
|
+
const [h, b] = R(
|
|
1503
1503
|
t ?? !1
|
|
1504
|
-
),
|
|
1505
|
-
k || b(
|
|
1504
|
+
), p = F(), y = g || p, k = typeof r == "boolean", w = k ? r : h, S = (D) => {
|
|
1505
|
+
k || b(D.target.checked), o?.(D.target.checked);
|
|
1506
1506
|
};
|
|
1507
1507
|
return /* @__PURE__ */ e.jsxs(
|
|
1508
1508
|
"div",
|
|
@@ -1510,16 +1510,16 @@ const cr = j(function(t, n) {
|
|
|
1510
1510
|
className: m(
|
|
1511
1511
|
"flex flex-col",
|
|
1512
1512
|
d === "inline" && "flex-row items-center",
|
|
1513
|
-
|
|
1513
|
+
s
|
|
1514
1514
|
),
|
|
1515
1515
|
children: [
|
|
1516
1516
|
/* @__PURE__ */ e.jsx(
|
|
1517
|
-
|
|
1517
|
+
Ae,
|
|
1518
1518
|
{
|
|
1519
|
-
label:
|
|
1520
|
-
htmlFor:
|
|
1519
|
+
label: i,
|
|
1520
|
+
htmlFor: y,
|
|
1521
1521
|
placement: d,
|
|
1522
|
-
disabled:
|
|
1522
|
+
disabled: c
|
|
1523
1523
|
}
|
|
1524
1524
|
),
|
|
1525
1525
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -1535,25 +1535,25 @@ const cr = j(function(t, n) {
|
|
|
1535
1535
|
{
|
|
1536
1536
|
ref: l,
|
|
1537
1537
|
type: "checkbox",
|
|
1538
|
-
id:
|
|
1539
|
-
"aria-label": u ||
|
|
1540
|
-
checked:
|
|
1541
|
-
disabled:
|
|
1542
|
-
onChange:
|
|
1538
|
+
id: y,
|
|
1539
|
+
"aria-label": u || i,
|
|
1540
|
+
checked: w,
|
|
1541
|
+
disabled: c,
|
|
1542
|
+
onChange: S,
|
|
1543
1543
|
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",
|
|
1544
1544
|
...f
|
|
1545
1545
|
}
|
|
1546
1546
|
),
|
|
1547
1547
|
/* @__PURE__ */ e.jsx(
|
|
1548
|
-
|
|
1548
|
+
Pe,
|
|
1549
1549
|
{
|
|
1550
|
-
color:
|
|
1551
|
-
size:
|
|
1552
|
-
disabled:
|
|
1553
|
-
checked:
|
|
1550
|
+
color: a,
|
|
1551
|
+
size: n,
|
|
1552
|
+
disabled: c,
|
|
1553
|
+
checked: w
|
|
1554
1554
|
}
|
|
1555
1555
|
),
|
|
1556
|
-
/* @__PURE__ */ e.jsx(
|
|
1556
|
+
/* @__PURE__ */ e.jsx($e, { size: n, checked: w })
|
|
1557
1557
|
]
|
|
1558
1558
|
}
|
|
1559
1559
|
)
|
|
@@ -1562,52 +1562,93 @@ const cr = j(function(t, n) {
|
|
|
1562
1562
|
);
|
|
1563
1563
|
}
|
|
1564
1564
|
);
|
|
1565
|
-
|
|
1566
|
-
function
|
|
1567
|
-
|
|
1565
|
+
He.displayName = "SwitchInput";
|
|
1566
|
+
function We(r, t) {
|
|
1567
|
+
U(() => {
|
|
1568
1568
|
typeof r == "number" && !isNaN(r) ? t(`${r}`) : r === "" || r === null || r === void 0 ? t("") : typeof r == "string" && t(r);
|
|
1569
1569
|
}, [r, t]);
|
|
1570
1570
|
}
|
|
1571
|
-
|
|
1571
|
+
function Le(r, t = !1) {
|
|
1572
|
+
if (r === "" || r === "-" && t) return !0;
|
|
1573
|
+
const o = t && r.startsWith("-") ? r.slice(1) : r;
|
|
1574
|
+
if (t && r.startsWith("-") && o === "") return !0;
|
|
1575
|
+
if (o.startsWith(".") || o.startsWith(",") || !/^[\d.,]+$/.test(o)) return !1;
|
|
1576
|
+
const a = o.split(",");
|
|
1577
|
+
if (a.length > 2) return !1;
|
|
1578
|
+
const n = a[0], i = a[1];
|
|
1579
|
+
return !(n === "" || !Te(n) || i !== void 0 && i !== "" && !Ge(i));
|
|
1580
|
+
}
|
|
1581
|
+
function Te(r) {
|
|
1582
|
+
if (r === "") return !1;
|
|
1583
|
+
if (!r.includes("."))
|
|
1584
|
+
return /^\d+$/.test(r);
|
|
1585
|
+
const t = r.split(".");
|
|
1586
|
+
if (t[0] === "" || !/^\d{1,3}$/.test(t[0])) return !1;
|
|
1587
|
+
for (let o = 1; o < t.length; o++) {
|
|
1588
|
+
const a = t[o];
|
|
1589
|
+
if (o === t.length - 1) {
|
|
1590
|
+
if (a !== "" && !/^\d{1,3}$/.test(a)) return !1;
|
|
1591
|
+
} else if (!/^\d{3}$/.test(a)) return !1;
|
|
1592
|
+
}
|
|
1593
|
+
return !0;
|
|
1594
|
+
}
|
|
1595
|
+
function Ge(r) {
|
|
1596
|
+
return /^\d{1,2}$/.test(r);
|
|
1597
|
+
}
|
|
1598
|
+
function Q(r, t = !1) {
|
|
1599
|
+
if (r === "") return "";
|
|
1600
|
+
const o = r.startsWith("-");
|
|
1601
|
+
if (o && !t)
|
|
1602
|
+
return Q(r.slice(1), !1);
|
|
1603
|
+
if (o && r.length === 1) return "-";
|
|
1604
|
+
let n = (o ? r.slice(1) : r).replace(/[^\d.,]/g, "");
|
|
1605
|
+
const i = n.lastIndexOf(",");
|
|
1606
|
+
if (i !== -1) {
|
|
1607
|
+
const d = n.slice(0, i).replace(/,/g, ""), c = n.slice(i + 1).replace(/,/g, "");
|
|
1608
|
+
n = d + "," + c;
|
|
1609
|
+
}
|
|
1610
|
+
return n = n.replace(/\.{2,}/g, "."), (o ? "-" : "") + n;
|
|
1611
|
+
}
|
|
1612
|
+
const fr = ({
|
|
1572
1613
|
value: r,
|
|
1573
1614
|
onChange: t,
|
|
1574
|
-
allowNegative:
|
|
1575
|
-
inputProps:
|
|
1576
|
-
label:
|
|
1577
|
-
helperText:
|
|
1615
|
+
allowNegative: o = !1,
|
|
1616
|
+
inputProps: a,
|
|
1617
|
+
label: n,
|
|
1618
|
+
helperText: i,
|
|
1578
1619
|
error: d,
|
|
1579
|
-
variant:
|
|
1580
|
-
...
|
|
1620
|
+
variant: c,
|
|
1621
|
+
...s
|
|
1581
1622
|
}) => {
|
|
1582
|
-
const g =
|
|
1623
|
+
const g = B(null), [u, f] = R(
|
|
1583
1624
|
r === "" ? "" : String(r)
|
|
1584
1625
|
);
|
|
1585
|
-
|
|
1626
|
+
We(r, f);
|
|
1586
1627
|
const l = (h) => {
|
|
1587
|
-
|
|
1588
|
-
|
|
1628
|
+
const b = h.target.value, p = Q(b, o);
|
|
1629
|
+
Le(p, o) ? (f(p), t(p)) : h.preventDefault();
|
|
1589
1630
|
};
|
|
1590
1631
|
return /* @__PURE__ */ e.jsx(
|
|
1591
1632
|
I,
|
|
1592
1633
|
{
|
|
1593
1634
|
ref: g,
|
|
1594
1635
|
type: "text",
|
|
1595
|
-
label:
|
|
1636
|
+
label: n,
|
|
1596
1637
|
value: u,
|
|
1597
1638
|
onChange: l,
|
|
1598
1639
|
error: d,
|
|
1599
|
-
helperText:
|
|
1600
|
-
placeholder:
|
|
1601
|
-
leftContent: /* @__PURE__ */ e.jsx(C, { as:
|
|
1602
|
-
variant:
|
|
1640
|
+
helperText: i,
|
|
1641
|
+
placeholder: s.placeholder,
|
|
1642
|
+
leftContent: /* @__PURE__ */ e.jsx(C, { as: ee, color: "inherit", size: "sm" }),
|
|
1643
|
+
variant: c,
|
|
1603
1644
|
inputMode: "numeric",
|
|
1604
1645
|
autoComplete: "off",
|
|
1605
|
-
pattern:
|
|
1606
|
-
...
|
|
1607
|
-
...
|
|
1646
|
+
pattern: o ? "^-?\\d{1,3}(\\.\\d{3})*(,\\d{1,2})?$" : "^\\d{1,3}(\\.\\d{3})*(,\\d{1,2})?$",
|
|
1647
|
+
...a,
|
|
1648
|
+
...s
|
|
1608
1649
|
}
|
|
1609
1650
|
);
|
|
1610
|
-
},
|
|
1651
|
+
}, hr = j(
|
|
1611
1652
|
(r, t) => /* @__PURE__ */ e.jsx(
|
|
1612
1653
|
I,
|
|
1613
1654
|
{
|
|
@@ -1616,10 +1657,10 @@ const dr = ({
|
|
|
1616
1657
|
type: "email",
|
|
1617
1658
|
autoComplete: "email",
|
|
1618
1659
|
inputMode: "email",
|
|
1619
|
-
leftContent: /* @__PURE__ */ e.jsx(C, { as:
|
|
1660
|
+
leftContent: /* @__PURE__ */ e.jsx(C, { as: re, color: "inherit", size: "sm" })
|
|
1620
1661
|
}
|
|
1621
1662
|
)
|
|
1622
|
-
),
|
|
1663
|
+
), Ke = v(
|
|
1623
1664
|
"flex items-center gap-3 cursor-pointer border-b border-border select-none p-4 transition-colors hover:bg-neutral-light",
|
|
1624
1665
|
{
|
|
1625
1666
|
variants: {
|
|
@@ -1637,7 +1678,7 @@ const dr = ({
|
|
|
1637
1678
|
disabled: !1
|
|
1638
1679
|
}
|
|
1639
1680
|
}
|
|
1640
|
-
),
|
|
1681
|
+
), _e = v(
|
|
1641
1682
|
"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",
|
|
1642
1683
|
{
|
|
1643
1684
|
variants: {
|
|
@@ -1655,55 +1696,55 @@ const dr = ({
|
|
|
1655
1696
|
disabled: !1
|
|
1656
1697
|
}
|
|
1657
1698
|
}
|
|
1658
|
-
),
|
|
1659
|
-
const
|
|
1699
|
+
), br = j(({ value: r, label: t, checked: o, id: a, className: n, disabled: i, ...d }, c) => {
|
|
1700
|
+
const s = F(), g = a || s;
|
|
1660
1701
|
return /* @__PURE__ */ e.jsxs(
|
|
1661
1702
|
"label",
|
|
1662
1703
|
{
|
|
1663
1704
|
htmlFor: g,
|
|
1664
1705
|
className: m(
|
|
1665
|
-
|
|
1666
|
-
checked: !!
|
|
1667
|
-
disabled: !!
|
|
1706
|
+
Ke({
|
|
1707
|
+
checked: !!o,
|
|
1708
|
+
disabled: !!i
|
|
1668
1709
|
}),
|
|
1669
|
-
|
|
1710
|
+
n
|
|
1670
1711
|
),
|
|
1671
|
-
"aria-checked":
|
|
1712
|
+
"aria-checked": o,
|
|
1672
1713
|
role: "radio",
|
|
1673
1714
|
"aria-label": `Select ${r}`,
|
|
1674
|
-
tabIndex:
|
|
1715
|
+
tabIndex: i ? -1 : 0,
|
|
1675
1716
|
children: [
|
|
1676
1717
|
/* @__PURE__ */ e.jsx(
|
|
1677
1718
|
"input",
|
|
1678
1719
|
{
|
|
1679
|
-
ref:
|
|
1720
|
+
ref: c,
|
|
1680
1721
|
id: g,
|
|
1681
1722
|
type: "radio",
|
|
1682
1723
|
value: r,
|
|
1683
|
-
checked:
|
|
1684
|
-
disabled:
|
|
1724
|
+
checked: o,
|
|
1725
|
+
disabled: i,
|
|
1685
1726
|
className: "sr-only",
|
|
1686
1727
|
"aria-hidden": !0,
|
|
1687
|
-
"aria-checked":
|
|
1728
|
+
"aria-checked": o,
|
|
1688
1729
|
...d
|
|
1689
1730
|
}
|
|
1690
1731
|
),
|
|
1691
1732
|
/* @__PURE__ */ e.jsx(
|
|
1692
1733
|
"span",
|
|
1693
1734
|
{
|
|
1694
|
-
className:
|
|
1695
|
-
checked: !!
|
|
1696
|
-
disabled: !!
|
|
1735
|
+
className: _e({
|
|
1736
|
+
checked: !!o,
|
|
1737
|
+
disabled: !!i
|
|
1697
1738
|
}),
|
|
1698
1739
|
"aria-hidden": "true",
|
|
1699
|
-
children:
|
|
1740
|
+
children: o ? /* @__PURE__ */ e.jsx(C, { as: P, color: "neutral", size: "md" }) : null
|
|
1700
1741
|
}
|
|
1701
1742
|
),
|
|
1702
1743
|
/* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: t })
|
|
1703
1744
|
]
|
|
1704
1745
|
}
|
|
1705
1746
|
);
|
|
1706
|
-
}),
|
|
1747
|
+
}), qe = v(
|
|
1707
1748
|
"flex items-center gap-3 cursor-pointer border-b border-border select-none p-4 transition-colors hover:bg-neutral-light",
|
|
1708
1749
|
{
|
|
1709
1750
|
variants: {
|
|
@@ -1721,7 +1762,7 @@ const dr = ({
|
|
|
1721
1762
|
disabled: !1
|
|
1722
1763
|
}
|
|
1723
1764
|
}
|
|
1724
|
-
),
|
|
1765
|
+
), Je = v(
|
|
1725
1766
|
"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",
|
|
1726
1767
|
{
|
|
1727
1768
|
variants: {
|
|
@@ -1739,117 +1780,117 @@ const dr = ({
|
|
|
1739
1780
|
disabled: !1
|
|
1740
1781
|
}
|
|
1741
1782
|
}
|
|
1742
|
-
),
|
|
1743
|
-
const
|
|
1783
|
+
), xr = j(({ value: r, label: t, checked: o, id: a, className: n, disabled: i, ...d }, c) => {
|
|
1784
|
+
const s = F(), g = a || s;
|
|
1744
1785
|
return /* @__PURE__ */ e.jsxs(
|
|
1745
1786
|
"label",
|
|
1746
1787
|
{
|
|
1747
1788
|
htmlFor: g,
|
|
1748
1789
|
className: m(
|
|
1749
|
-
|
|
1750
|
-
checked: !!
|
|
1751
|
-
disabled: !!
|
|
1790
|
+
qe({
|
|
1791
|
+
checked: !!o,
|
|
1792
|
+
disabled: !!i
|
|
1752
1793
|
}),
|
|
1753
|
-
|
|
1794
|
+
n
|
|
1754
1795
|
),
|
|
1755
|
-
"aria-checked":
|
|
1796
|
+
"aria-checked": o,
|
|
1756
1797
|
role: "checkbox",
|
|
1757
1798
|
"aria-label": `Select ${r}`,
|
|
1758
|
-
tabIndex:
|
|
1799
|
+
tabIndex: i ? -1 : 0,
|
|
1759
1800
|
children: [
|
|
1760
1801
|
/* @__PURE__ */ e.jsx(
|
|
1761
1802
|
"input",
|
|
1762
1803
|
{
|
|
1763
|
-
ref:
|
|
1804
|
+
ref: c,
|
|
1764
1805
|
id: g,
|
|
1765
1806
|
type: "checkbox",
|
|
1766
1807
|
value: r,
|
|
1767
|
-
checked:
|
|
1768
|
-
disabled:
|
|
1808
|
+
checked: o,
|
|
1809
|
+
disabled: i,
|
|
1769
1810
|
className: "sr-only",
|
|
1770
1811
|
"aria-hidden": !0,
|
|
1771
|
-
"aria-checked":
|
|
1812
|
+
"aria-checked": o,
|
|
1772
1813
|
...d
|
|
1773
1814
|
}
|
|
1774
1815
|
),
|
|
1775
1816
|
/* @__PURE__ */ e.jsx(
|
|
1776
1817
|
"span",
|
|
1777
1818
|
{
|
|
1778
|
-
className:
|
|
1779
|
-
checked: !!
|
|
1780
|
-
disabled: !!
|
|
1819
|
+
className: Je({
|
|
1820
|
+
checked: !!o,
|
|
1821
|
+
disabled: !!i
|
|
1781
1822
|
}),
|
|
1782
1823
|
"aria-hidden": "true",
|
|
1783
|
-
children:
|
|
1824
|
+
children: o ? /* @__PURE__ */ e.jsx(C, { as: P, color: "neutral", size: "md" }) : null
|
|
1784
1825
|
}
|
|
1785
1826
|
),
|
|
1786
1827
|
/* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: t })
|
|
1787
1828
|
]
|
|
1788
1829
|
}
|
|
1789
1830
|
);
|
|
1790
|
-
}),
|
|
1791
|
-
({ children: r, onChange: t, value:
|
|
1792
|
-
const [
|
|
1793
|
-
() => ({ isOpen:
|
|
1794
|
-
[
|
|
1831
|
+
}), Qe = j(
|
|
1832
|
+
({ children: r, onChange: t, value: o, size: a, placement: n, ...i }, d) => {
|
|
1833
|
+
const [c, s] = R(!1), g = E(
|
|
1834
|
+
() => ({ isOpen: c, setIsOpen: s, onChange: t, value: o }),
|
|
1835
|
+
[c, s, t, o]
|
|
1795
1836
|
);
|
|
1796
1837
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1797
1838
|
/* @__PURE__ */ e.jsx(
|
|
1798
1839
|
I,
|
|
1799
1840
|
{
|
|
1800
|
-
...
|
|
1841
|
+
...i,
|
|
1801
1842
|
onChange: t,
|
|
1802
|
-
value:
|
|
1843
|
+
value: o,
|
|
1803
1844
|
ref: d,
|
|
1804
1845
|
readOnly: !0,
|
|
1805
1846
|
tabIndex: 0,
|
|
1806
|
-
onClick: () =>
|
|
1847
|
+
onClick: () => s(!0),
|
|
1807
1848
|
"aria-haspopup": "dialog",
|
|
1808
|
-
"aria-expanded":
|
|
1849
|
+
"aria-expanded": c,
|
|
1809
1850
|
onKeyDown: (u) => {
|
|
1810
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(),
|
|
1851
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), s(!0));
|
|
1811
1852
|
}
|
|
1812
1853
|
}
|
|
1813
1854
|
),
|
|
1814
1855
|
/* @__PURE__ */ e.jsx(
|
|
1815
|
-
|
|
1856
|
+
O,
|
|
1816
1857
|
{
|
|
1817
|
-
isOpen:
|
|
1818
|
-
onClose: () =>
|
|
1819
|
-
size:
|
|
1820
|
-
placement:
|
|
1821
|
-
children:
|
|
1858
|
+
isOpen: c,
|
|
1859
|
+
onClose: () => s(!1),
|
|
1860
|
+
size: a,
|
|
1861
|
+
placement: n,
|
|
1862
|
+
children: c && r(g)
|
|
1822
1863
|
}
|
|
1823
1864
|
)
|
|
1824
1865
|
] });
|
|
1825
1866
|
}
|
|
1826
|
-
),
|
|
1827
|
-
Header:
|
|
1828
|
-
Body:
|
|
1829
|
-
Footer:
|
|
1830
|
-
}),
|
|
1867
|
+
), mr = Object.assign(Qe, {
|
|
1868
|
+
Header: O.Header,
|
|
1869
|
+
Body: O.Body,
|
|
1870
|
+
Footer: O.Footer
|
|
1871
|
+
}), Ue = j(
|
|
1831
1872
|
({
|
|
1832
1873
|
children: r,
|
|
1833
1874
|
onChange: t,
|
|
1834
|
-
value:
|
|
1835
|
-
size:
|
|
1836
|
-
position:
|
|
1837
|
-
disableEscapeKeyDown:
|
|
1875
|
+
value: o,
|
|
1876
|
+
size: a,
|
|
1877
|
+
position: n,
|
|
1878
|
+
disableEscapeKeyDown: i,
|
|
1838
1879
|
disableOverlayClickToClose: d,
|
|
1839
|
-
...
|
|
1840
|
-
},
|
|
1841
|
-
const [g, u] =
|
|
1842
|
-
() => ({ isOpen: g, setIsOpen: u, onChange: t, value:
|
|
1843
|
-
[g, u, t,
|
|
1880
|
+
...c
|
|
1881
|
+
}, s) => {
|
|
1882
|
+
const [g, u] = R(!1), f = E(
|
|
1883
|
+
() => ({ isOpen: g, setIsOpen: u, onChange: t, value: o }),
|
|
1884
|
+
[g, u, t, o]
|
|
1844
1885
|
);
|
|
1845
1886
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1846
1887
|
/* @__PURE__ */ e.jsx(
|
|
1847
1888
|
I,
|
|
1848
1889
|
{
|
|
1849
|
-
...
|
|
1890
|
+
...c,
|
|
1850
1891
|
onChange: t,
|
|
1851
|
-
value:
|
|
1852
|
-
ref:
|
|
1892
|
+
value: o,
|
|
1893
|
+
ref: s,
|
|
1853
1894
|
readOnly: !0,
|
|
1854
1895
|
tabIndex: 0,
|
|
1855
1896
|
onClick: () => u(!0),
|
|
@@ -1865,69 +1906,69 @@ const dr = ({
|
|
|
1865
1906
|
{
|
|
1866
1907
|
isOpen: g,
|
|
1867
1908
|
onClose: () => u(!1),
|
|
1868
|
-
size:
|
|
1869
|
-
position:
|
|
1870
|
-
disableEscapeKeyDown:
|
|
1909
|
+
size: a,
|
|
1910
|
+
position: n,
|
|
1911
|
+
disableEscapeKeyDown: i,
|
|
1871
1912
|
disableOverlayClickToClose: d,
|
|
1872
1913
|
children: g && r(f)
|
|
1873
1914
|
}
|
|
1874
1915
|
)
|
|
1875
1916
|
] });
|
|
1876
1917
|
}
|
|
1877
|
-
),
|
|
1918
|
+
), pr = Object.assign(Ue, {
|
|
1878
1919
|
Header: M.Header,
|
|
1879
1920
|
Body: M.Body,
|
|
1880
1921
|
Footer: M.Footer
|
|
1881
|
-
}),
|
|
1882
|
-
const [
|
|
1883
|
-
() => ({ isOpen:
|
|
1884
|
-
[
|
|
1922
|
+
}), Xe = j(({ children: r, onChange: t, value: o, ...a }, n) => {
|
|
1923
|
+
const [i, d] = R(!1), c = E(
|
|
1924
|
+
() => ({ isOpen: i, setIsOpen: d, onChange: t, value: o }),
|
|
1925
|
+
[i, d, t, o]
|
|
1885
1926
|
);
|
|
1886
1927
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1887
1928
|
/* @__PURE__ */ e.jsx(
|
|
1888
1929
|
I,
|
|
1889
1930
|
{
|
|
1890
|
-
...
|
|
1931
|
+
...a,
|
|
1891
1932
|
onChange: t,
|
|
1892
|
-
value:
|
|
1893
|
-
ref:
|
|
1933
|
+
value: o,
|
|
1934
|
+
ref: n,
|
|
1894
1935
|
readOnly: !0,
|
|
1895
1936
|
tabIndex: 0,
|
|
1896
1937
|
onClick: () => d(!0),
|
|
1897
1938
|
"aria-haspopup": "dialog",
|
|
1898
|
-
"aria-expanded":
|
|
1899
|
-
onKeyDown: (
|
|
1900
|
-
(
|
|
1939
|
+
"aria-expanded": i,
|
|
1940
|
+
onKeyDown: (s) => {
|
|
1941
|
+
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), d(!0));
|
|
1901
1942
|
}
|
|
1902
1943
|
}
|
|
1903
1944
|
),
|
|
1904
|
-
/* @__PURE__ */ e.jsx(V, { isOpen:
|
|
1945
|
+
/* @__PURE__ */ e.jsx(V, { isOpen: i, onClose: () => d(!1), children: i && r(c) })
|
|
1905
1946
|
] });
|
|
1906
|
-
}),
|
|
1947
|
+
}), yr = Object.assign(Xe, {
|
|
1907
1948
|
Header: V.Header,
|
|
1908
1949
|
Body: V.Body,
|
|
1909
1950
|
Footer: V.Footer,
|
|
1910
1951
|
Title: V.Title
|
|
1911
1952
|
});
|
|
1912
1953
|
export {
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1954
|
+
yr as B,
|
|
1955
|
+
nr as C,
|
|
1956
|
+
ir as D,
|
|
1957
|
+
hr as E,
|
|
1958
|
+
mr as M,
|
|
1959
|
+
fr as P,
|
|
1960
|
+
cr as R,
|
|
1961
|
+
dr as S,
|
|
1921
1962
|
I as T,
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1963
|
+
sr as a,
|
|
1964
|
+
ar as b,
|
|
1965
|
+
lr as c,
|
|
1966
|
+
ur as d,
|
|
1967
|
+
Me as e,
|
|
1927
1968
|
Ee as f,
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1969
|
+
gr as g,
|
|
1970
|
+
He as h,
|
|
1971
|
+
br as i,
|
|
1972
|
+
xr as j,
|
|
1973
|
+
pr as k
|
|
1933
1974
|
};
|