@dimasbaguspm/versaur 0.0.17 → 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 → assets}/styles.css +37 -0
- package/dist/js/{bottom-sheet-CHRSxXRE.js → bottom-sheet-BRv-oJL-.js} +285 -140
- package/dist/js/feedbacks/index.js +1 -1
- package/dist/js/{form-layout-Dhlv-FZL.js → form-layout-4ASWdXn8.js} +1 -1
- package/dist/js/forms/index.js +15 -16
- package/dist/js/{tile-B9bt2AY6.js → image-rectangle-CLU-GVtw.js} +855 -658
- package/dist/js/{index-C1uJQB34.js → index-DOdDlCoL.js} +2 -2
- package/dist/js/index.js +54 -47
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +4 -5
- package/dist/js/primitive/index.js +22 -16
- package/dist/js/providers/index.js +5 -0
- package/dist/js/selectable-multiple-input-CJXfqy1Z.js +1901 -0
- package/dist/js/{skeleton-QEyPZAuF.js → skeleton-BNZyaRjo.js} +1 -1
- package/dist/js/snackbar-DH8jCh2V.js +50 -0
- package/dist/js/{tabs-DYcTvVao.js → tabs-BbOkYchB.js} +1 -1
- package/dist/js/use-snackbars-oPoF7J5t.js +94 -0
- package/dist/types/feedbacks/loading-indicator/index.d.ts +2 -1
- package/dist/types/forms/chip-single-input/index.d.ts +2 -1
- package/dist/types/forms/index.d.ts +2 -1
- package/dist/types/forms/price-input/index.d.ts +1 -1
- 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/forms/switch-input/index.d.ts +2 -3
- package/dist/types/forms/time-picker-input/time-picker-input.d.ts +4 -4
- package/dist/types/forms/time-picker-input/types.d.ts +2 -38
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layouts/page-layout/index.d.ts +2 -1
- package/dist/types/overlays/menu/index.d.ts +2 -2
- package/dist/types/primitive/description-list/description-list.atoms.d.ts +13 -0
- package/dist/types/primitive/description-list/description-list.d.ts +6 -0
- package/dist/types/primitive/description-list/index.d.ts +2 -0
- package/dist/types/primitive/description-list/types.d.ts +46 -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 +2 -0
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/providers/snackbars-provider/index.d.ts +3 -0
- package/dist/types/providers/snackbars-provider/provider.d.ts +7 -0
- package/dist/types/providers/snackbars-provider/types.d.ts +28 -0
- package/dist/types/providers/snackbars-provider/use-snackbars-queue.d.ts +9 -0
- package/dist/types/providers/snackbars-provider/use-snackbars.d.ts +4 -0
- package/dist/{js → utils}/enforce-subpath-import.js +67 -54
- package/package.json +8 -4
- package/dist/js/email-input-CVyrFzqL.js +0 -1820
- package/dist/js/modal-FqewbVts.js +0 -150
- package/dist/types/forms/calculator-input/calculator-input.atoms.d.ts +0 -11
- package/dist/types/forms/calculator-input/calculator-input.d.ts +0 -8
- package/dist/types/forms/calculator-input/index.d.ts +0 -1
- package/dist/types/forms/calculator-input/types.d.ts +0 -51
- package/dist/types/forms/time-picker-input/time-picker-input.atoms.d.ts +0 -15
|
@@ -0,0 +1,1901 @@
|
|
|
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
|
+
import "./snackbar-DH8jCh2V.js";
|
|
6
|
+
const Z = j("space-y-2", {
|
|
7
|
+
variants: {
|
|
8
|
+
direction: {
|
|
9
|
+
vertical: "space-y-2 space-x-0",
|
|
10
|
+
horizontal: "flex flex-wrap gap-4 space-y-0"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
direction: "vertical"
|
|
15
|
+
}
|
|
16
|
+
}), ee = j(
|
|
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
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
// Core variants using Versaur color system
|
|
22
|
+
primary: "border-primary/40 checked:bg-primary checked:border-primary focus:ring-primary/20",
|
|
23
|
+
secondary: "border-secondary/40 checked:bg-secondary checked:border-secondary focus:ring-secondary/20",
|
|
24
|
+
tertiary: "border-tertiary/40 checked:bg-tertiary checked:border-tertiary focus:ring-tertiary/20",
|
|
25
|
+
ghost: "border-ghost/40 checked:bg-ghost checked:border-ghost focus:ring-ghost/20",
|
|
26
|
+
neutral: "border-gray-300 checked:bg-gray-500 checked:border-gray-500 focus:ring-gray-400/20",
|
|
27
|
+
// Outline variants
|
|
28
|
+
"primary-outline": "border-primary checked:bg-white checked:border-primary focus:ring-primary/20",
|
|
29
|
+
"secondary-outline": "border-secondary checked:bg-white checked:border-secondary focus:ring-secondary/20",
|
|
30
|
+
"tertiary-outline": "border-tertiary checked:bg-white checked:border-tertiary focus:ring-tertiary/20",
|
|
31
|
+
"ghost-outline": "border-ghost checked:bg-white checked:border-ghost focus:ring-ghost/20",
|
|
32
|
+
"neutral-outline": "border-gray-400 checked:bg-white checked:border-gray-400 focus:ring-gray-500/20",
|
|
33
|
+
// Semantic variants
|
|
34
|
+
success: "border-success/40 checked:bg-success checked:border-success focus:ring-success/20",
|
|
35
|
+
"success-outline": "border-success checked:bg-white checked:border-success focus:ring-success/20",
|
|
36
|
+
info: "border-info/40 checked:bg-info checked:border-info focus:ring-info/20",
|
|
37
|
+
"info-outline": "border-info checked:bg-white checked:border-info focus:ring-info/20",
|
|
38
|
+
warning: "border-warning/40 checked:bg-warning checked:border-warning focus:ring-warning/20",
|
|
39
|
+
"warning-outline": "border-warning checked:bg-white checked:border-warning focus:ring-warning/20",
|
|
40
|
+
danger: "border-danger/40 checked:bg-danger checked:border-danger focus:ring-danger/20",
|
|
41
|
+
"danger-outline": "border-danger checked:bg-white checked:border-danger focus:ring-danger/20"
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
sm: "h-3 w-3",
|
|
45
|
+
md: "h-4 w-4",
|
|
46
|
+
lg: "h-5 w-5"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: "primary",
|
|
51
|
+
size: "md"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
), re = j(
|
|
55
|
+
"text-foreground cursor-pointer select-none",
|
|
56
|
+
{
|
|
57
|
+
variants: {
|
|
58
|
+
size: {
|
|
59
|
+
sm: "text-xs",
|
|
60
|
+
md: "text-sm",
|
|
61
|
+
lg: "text-base"
|
|
62
|
+
},
|
|
63
|
+
disabled: {
|
|
64
|
+
true: "opacity-50 cursor-not-allowed",
|
|
65
|
+
false: ""
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
defaultVariants: {
|
|
69
|
+
size: "md",
|
|
70
|
+
disabled: !1
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
), P = C(null), te = () => {
|
|
74
|
+
const r = z(P);
|
|
75
|
+
if (!r)
|
|
76
|
+
throw new Error("CheckboxOption must be used within CheckboxInput");
|
|
77
|
+
return r;
|
|
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
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
81
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
82
|
+
"input",
|
|
83
|
+
{
|
|
84
|
+
ref: u,
|
|
85
|
+
type: "checkbox",
|
|
86
|
+
id: i,
|
|
87
|
+
disabled: h,
|
|
88
|
+
className: p(
|
|
89
|
+
ee({
|
|
90
|
+
variant: g,
|
|
91
|
+
size: a.size
|
|
92
|
+
}),
|
|
93
|
+
// Custom checkmark styling using ::after - centered positioning with size variants
|
|
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
|
+
// Size-specific checkmark dimensions
|
|
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
|
+
"checked:after:opacity-100",
|
|
100
|
+
// Outline variants use colored checkmark
|
|
101
|
+
g?.includes("outline") && "checked:after:border-current",
|
|
102
|
+
s
|
|
103
|
+
),
|
|
104
|
+
...d
|
|
105
|
+
}
|
|
106
|
+
) }),
|
|
107
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
108
|
+
/* @__PURE__ */ e.jsx(
|
|
109
|
+
"label",
|
|
110
|
+
{
|
|
111
|
+
htmlFor: i,
|
|
112
|
+
className: re({
|
|
113
|
+
size: a.size,
|
|
114
|
+
disabled: h
|
|
115
|
+
}),
|
|
116
|
+
children: r
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
t && /* @__PURE__ */ e.jsx(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: p(
|
|
123
|
+
"text-gray-600 mt-1",
|
|
124
|
+
a.size === "sm" && "text-xs",
|
|
125
|
+
a.size === "md" && "text-xs",
|
|
126
|
+
a.size === "lg" && "text-sm",
|
|
127
|
+
h && "opacity-50"
|
|
128
|
+
),
|
|
129
|
+
children: t
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] })
|
|
133
|
+
] });
|
|
134
|
+
});
|
|
135
|
+
B.displayName = "CheckboxOption";
|
|
136
|
+
const D = x.forwardRef(
|
|
137
|
+
({
|
|
138
|
+
variant: r = "primary",
|
|
139
|
+
size: t = "md",
|
|
140
|
+
label: s,
|
|
141
|
+
helperText: c,
|
|
142
|
+
error: n,
|
|
143
|
+
direction: d = "vertical",
|
|
144
|
+
className: u,
|
|
145
|
+
disabled: a,
|
|
146
|
+
children: o,
|
|
147
|
+
...i
|
|
148
|
+
}, h) => {
|
|
149
|
+
const g = !!n, l = {
|
|
150
|
+
variant: r,
|
|
151
|
+
size: t,
|
|
152
|
+
disabled: a,
|
|
153
|
+
error: g
|
|
154
|
+
};
|
|
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
|
+
] }) });
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
D.displayName = "CheckboxInput";
|
|
164
|
+
const Ke = Object.assign(D, {
|
|
165
|
+
Option: B
|
|
166
|
+
}), $ = C(null), oe = () => {
|
|
167
|
+
const r = z($);
|
|
168
|
+
if (!r)
|
|
169
|
+
throw new Error(
|
|
170
|
+
"useChipSingleInputContext must be used within ChipSingleInputContext"
|
|
171
|
+
);
|
|
172
|
+
return r;
|
|
173
|
+
}, se = j(
|
|
174
|
+
"inline-flex items-center bg-white font-regular transition-colors duration-200 cursor-pointer border border-border",
|
|
175
|
+
{
|
|
176
|
+
variants: {
|
|
177
|
+
variant: {
|
|
178
|
+
primary: [
|
|
179
|
+
"hover:bg-primary-soft",
|
|
180
|
+
"hover:border-primary-light",
|
|
181
|
+
"focus:border-primary-light",
|
|
182
|
+
"data-[selected=true]:bg-primary-soft",
|
|
183
|
+
"data-[selected=true]:border-primary"
|
|
184
|
+
].join(" "),
|
|
185
|
+
secondary: [
|
|
186
|
+
"hover:bg-secondary-soft",
|
|
187
|
+
"hover:border-secondary-light",
|
|
188
|
+
"focus:border-secondary-light",
|
|
189
|
+
"data-[selected=true]:bg-secondary-soft",
|
|
190
|
+
"data-[selected=true]:border-secondary"
|
|
191
|
+
].join(" "),
|
|
192
|
+
tertiary: [
|
|
193
|
+
"hover:bg-tertiary-soft",
|
|
194
|
+
"hover:border-tertiary-light",
|
|
195
|
+
"focus:border-tertiary-light",
|
|
196
|
+
"data-[selected=true]:bg-tertiary-soft",
|
|
197
|
+
"data-[selected=true]:border-tertiary"
|
|
198
|
+
].join(" "),
|
|
199
|
+
ghost: [
|
|
200
|
+
"hover:bg-ghost-soft",
|
|
201
|
+
"hover:border-ghost-light",
|
|
202
|
+
"focus:border-ghost-light",
|
|
203
|
+
"data-[selected=true]:bg-ghost-soft",
|
|
204
|
+
"data-[selected=true]:border-ghost"
|
|
205
|
+
].join(" "),
|
|
206
|
+
neutral: ["hover:bg-gray-soft", "hover:border-gray-light"].join(" ")
|
|
207
|
+
},
|
|
208
|
+
shape: {
|
|
209
|
+
circle: "rounded-full",
|
|
210
|
+
rounded: "rounded-lg"
|
|
211
|
+
},
|
|
212
|
+
size: {
|
|
213
|
+
sm: "h-8 px-3 text-sm",
|
|
214
|
+
md: "h-10 px-4 text-base",
|
|
215
|
+
lg: "h-12 px-5 text-lg"
|
|
216
|
+
},
|
|
217
|
+
selected: {
|
|
218
|
+
true: "",
|
|
219
|
+
false: ""
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
defaultVariants: {
|
|
223
|
+
variant: "primary",
|
|
224
|
+
shape: "circle",
|
|
225
|
+
size: "sm",
|
|
226
|
+
selected: !1
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
), ne = x.forwardRef(
|
|
230
|
+
({
|
|
231
|
+
children: r,
|
|
232
|
+
className: t,
|
|
233
|
+
disabled: s,
|
|
234
|
+
id: c,
|
|
235
|
+
value: n,
|
|
236
|
+
check: d,
|
|
237
|
+
defaultCheck: u = !1,
|
|
238
|
+
...a
|
|
239
|
+
}, o) => {
|
|
240
|
+
const i = oe(), h = x.useId(), g = c || h, l = s || i.disabled, b = [
|
|
241
|
+
"primary",
|
|
242
|
+
"secondary",
|
|
243
|
+
"tertiary",
|
|
244
|
+
"ghost",
|
|
245
|
+
"neutral"
|
|
246
|
+
].includes(
|
|
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
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
252
|
+
/* @__PURE__ */ e.jsx(
|
|
253
|
+
"input",
|
|
254
|
+
{
|
|
255
|
+
ref: o,
|
|
256
|
+
type: "radio",
|
|
257
|
+
id: g,
|
|
258
|
+
name: i.name,
|
|
259
|
+
value: n,
|
|
260
|
+
checked: v,
|
|
261
|
+
disabled: l,
|
|
262
|
+
onChange: y,
|
|
263
|
+
className: "sr-only",
|
|
264
|
+
...a
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
/* @__PURE__ */ e.jsx(
|
|
268
|
+
"label",
|
|
269
|
+
{
|
|
270
|
+
htmlFor: g,
|
|
271
|
+
"data-selected": v,
|
|
272
|
+
className: p(
|
|
273
|
+
se({
|
|
274
|
+
variant: b,
|
|
275
|
+
selected: v,
|
|
276
|
+
shape: w,
|
|
277
|
+
size: m
|
|
278
|
+
}),
|
|
279
|
+
l && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
280
|
+
t
|
|
281
|
+
),
|
|
282
|
+
children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
283
|
+
(d || u) && /* @__PURE__ */ e.jsx(
|
|
284
|
+
"span",
|
|
285
|
+
{
|
|
286
|
+
className: p(
|
|
287
|
+
"flex items-center",
|
|
288
|
+
"transition-transform transition-opacity duration-200",
|
|
289
|
+
v ? "opacity-100 scale-100 mr-1" : "opacity-0 scale-75"
|
|
290
|
+
),
|
|
291
|
+
"aria-hidden": "true",
|
|
292
|
+
children: v && (d || /* @__PURE__ */ e.jsx(
|
|
293
|
+
R,
|
|
294
|
+
{
|
|
295
|
+
size: k,
|
|
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
|
+
}
|
|
298
|
+
))
|
|
299
|
+
}
|
|
300
|
+
),
|
|
301
|
+
r
|
|
302
|
+
] })
|
|
303
|
+
}
|
|
304
|
+
)
|
|
305
|
+
] });
|
|
306
|
+
}
|
|
307
|
+
), ae = x.forwardRef(
|
|
308
|
+
({
|
|
309
|
+
variant: r = "primary",
|
|
310
|
+
shape: t = "circle",
|
|
311
|
+
size: s = "sm",
|
|
312
|
+
label: c,
|
|
313
|
+
helperText: n,
|
|
314
|
+
error: d,
|
|
315
|
+
className: u,
|
|
316
|
+
disabled: a,
|
|
317
|
+
name: o,
|
|
318
|
+
value: i,
|
|
319
|
+
onChange: h,
|
|
320
|
+
children: g,
|
|
321
|
+
...l
|
|
322
|
+
}, f) => {
|
|
323
|
+
const b = !!d, w = {
|
|
324
|
+
variant: r,
|
|
325
|
+
shape: t,
|
|
326
|
+
size: s,
|
|
327
|
+
disabled: a,
|
|
328
|
+
error: b,
|
|
329
|
+
name: o,
|
|
330
|
+
value: i,
|
|
331
|
+
onChange: h
|
|
332
|
+
};
|
|
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
|
+
!b && n && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: n })
|
|
338
|
+
] }) });
|
|
339
|
+
}
|
|
340
|
+
), Qe = Object.assign(ae, {
|
|
341
|
+
Option: ne
|
|
342
|
+
}), A = C(null), ie = () => {
|
|
343
|
+
const r = z(A);
|
|
344
|
+
if (!r)
|
|
345
|
+
throw new Error(
|
|
346
|
+
"useChipMultipleInputContext must be used within ChipMultipleInputContext"
|
|
347
|
+
);
|
|
348
|
+
return r;
|
|
349
|
+
}, ce = j(
|
|
350
|
+
"inline-flex items-center bg-white font-regular transition-colors duration-200 cursor-pointer border border-border",
|
|
351
|
+
{
|
|
352
|
+
variants: {
|
|
353
|
+
variant: {
|
|
354
|
+
primary: [
|
|
355
|
+
"hover:bg-primary-soft",
|
|
356
|
+
"hover:border-primary-light",
|
|
357
|
+
"focus:border-primary-light",
|
|
358
|
+
"data-[selected=true]:bg-primary-soft",
|
|
359
|
+
"data-[selected=true]:border-primary"
|
|
360
|
+
].join(" "),
|
|
361
|
+
secondary: [
|
|
362
|
+
"hover:bg-secondary-soft",
|
|
363
|
+
"hover:border-secondary-light",
|
|
364
|
+
"focus:border-secondary-light",
|
|
365
|
+
"data-[selected=true]:bg-secondary-soft",
|
|
366
|
+
"data-[selected=true]:border-secondary"
|
|
367
|
+
].join(" "),
|
|
368
|
+
tertiary: [
|
|
369
|
+
"hover:bg-tertiary-soft",
|
|
370
|
+
"hover:border-tertiary-light",
|
|
371
|
+
"focus:border-tertiary-light",
|
|
372
|
+
"data-[selected=true]:bg-tertiary-soft",
|
|
373
|
+
"data-[selected=true]:border-tertiary"
|
|
374
|
+
].join(" "),
|
|
375
|
+
ghost: [
|
|
376
|
+
"hover:bg-ghost-soft",
|
|
377
|
+
"hover:border-ghost-light",
|
|
378
|
+
"focus:border-ghost-light",
|
|
379
|
+
"data-[selected=true]:bg-ghost-soft",
|
|
380
|
+
"data-[selected=true]:border-ghost"
|
|
381
|
+
].join(" "),
|
|
382
|
+
neutral: [
|
|
383
|
+
"hover:bg-gray-soft",
|
|
384
|
+
"hover:border-gray-light",
|
|
385
|
+
"focus:border-gray-light",
|
|
386
|
+
"data-[selected=true]:bg-gray-soft",
|
|
387
|
+
"data-[selected=true]:border-gray"
|
|
388
|
+
].join(" "),
|
|
389
|
+
success: [
|
|
390
|
+
"hover:bg-success-soft",
|
|
391
|
+
"hover:border-success-light",
|
|
392
|
+
"focus:border-success-light",
|
|
393
|
+
"data-[selected=true]:bg-success-soft",
|
|
394
|
+
"data-[selected=true]:border-success"
|
|
395
|
+
].join(" "),
|
|
396
|
+
info: [
|
|
397
|
+
"hover:bg-info-soft",
|
|
398
|
+
"hover:border-info-light",
|
|
399
|
+
"focus:border-info-light",
|
|
400
|
+
"data-[selected=true]:bg-info-soft",
|
|
401
|
+
"data-[selected=true]:border-info"
|
|
402
|
+
].join(" "),
|
|
403
|
+
warning: [
|
|
404
|
+
"hover:bg-warning-soft",
|
|
405
|
+
"hover:border-warning-light",
|
|
406
|
+
"focus:border-warning-light",
|
|
407
|
+
"data-[selected=true]:bg-warning-soft",
|
|
408
|
+
"data-[selected=true]:border-warning"
|
|
409
|
+
].join(" "),
|
|
410
|
+
danger: [
|
|
411
|
+
"hover:bg-danger-soft",
|
|
412
|
+
"hover:border-danger-light",
|
|
413
|
+
"focus:border-danger-light",
|
|
414
|
+
"data-[selected=true]:bg-danger-soft",
|
|
415
|
+
"data-[selected=true]:border-danger"
|
|
416
|
+
].join(" ")
|
|
417
|
+
},
|
|
418
|
+
selected: {
|
|
419
|
+
true: "",
|
|
420
|
+
false: ""
|
|
421
|
+
},
|
|
422
|
+
shape: {
|
|
423
|
+
circle: "rounded-full",
|
|
424
|
+
rounded: "rounded-lg"
|
|
425
|
+
},
|
|
426
|
+
size: {
|
|
427
|
+
sm: "px-3 py-1 text-xs min-h-[32px]",
|
|
428
|
+
md: "px-4 py-2 text-sm min-h-[40px]",
|
|
429
|
+
lg: "px-5 py-2.5 text-base min-h-[48px]"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
), L = x.forwardRef(
|
|
434
|
+
({
|
|
435
|
+
children: r,
|
|
436
|
+
className: t,
|
|
437
|
+
disabled: s,
|
|
438
|
+
id: c,
|
|
439
|
+
value: n,
|
|
440
|
+
check: d,
|
|
441
|
+
defaultCheck: u = !1,
|
|
442
|
+
...a
|
|
443
|
+
}, o) => {
|
|
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
|
+
}
|
|
450
|
+
a.onChange?.(k);
|
|
451
|
+
}, y = w === "lg" ? 20 : w === "md" ? 18 : 16;
|
|
452
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
453
|
+
/* @__PURE__ */ e.jsx(
|
|
454
|
+
"input",
|
|
455
|
+
{
|
|
456
|
+
ref: o,
|
|
457
|
+
type: "checkbox",
|
|
458
|
+
id: g,
|
|
459
|
+
name: `${i.name}[]`,
|
|
460
|
+
value: n,
|
|
461
|
+
checked: m,
|
|
462
|
+
disabled: l,
|
|
463
|
+
onChange: v,
|
|
464
|
+
className: "sr-only",
|
|
465
|
+
...a
|
|
466
|
+
}
|
|
467
|
+
),
|
|
468
|
+
/* @__PURE__ */ e.jsx(
|
|
469
|
+
"label",
|
|
470
|
+
{
|
|
471
|
+
htmlFor: g,
|
|
472
|
+
"data-selected": m,
|
|
473
|
+
className: p(
|
|
474
|
+
ce({
|
|
475
|
+
variant: f,
|
|
476
|
+
selected: m,
|
|
477
|
+
shape: b,
|
|
478
|
+
size: w
|
|
479
|
+
}),
|
|
480
|
+
l && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
481
|
+
t
|
|
482
|
+
),
|
|
483
|
+
children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
|
|
484
|
+
(d || u) && /* @__PURE__ */ e.jsx(
|
|
485
|
+
"span",
|
|
486
|
+
{
|
|
487
|
+
className: p(
|
|
488
|
+
"flex items-center",
|
|
489
|
+
"transition-transform transition-opacity duration-200",
|
|
490
|
+
m ? "opacity-100 scale-100 mr-1" : "opacity-0 scale-75"
|
|
491
|
+
),
|
|
492
|
+
"aria-hidden": "true",
|
|
493
|
+
children: m && (d || /* @__PURE__ */ e.jsx(
|
|
494
|
+
R,
|
|
495
|
+
{
|
|
496
|
+
size: y,
|
|
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"
|
|
498
|
+
}
|
|
499
|
+
))
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
r
|
|
503
|
+
] })
|
|
504
|
+
}
|
|
505
|
+
)
|
|
506
|
+
] });
|
|
507
|
+
}
|
|
508
|
+
);
|
|
509
|
+
L.displayName = "ChipMultipleOption";
|
|
510
|
+
const de = x.forwardRef(
|
|
511
|
+
({
|
|
512
|
+
variant: r = "primary",
|
|
513
|
+
shape: t = "circle",
|
|
514
|
+
size: s = "sm",
|
|
515
|
+
label: c,
|
|
516
|
+
helperText: n,
|
|
517
|
+
error: d,
|
|
518
|
+
className: u,
|
|
519
|
+
disabled: a,
|
|
520
|
+
name: o,
|
|
521
|
+
value: i = [],
|
|
522
|
+
onChange: h,
|
|
523
|
+
children: g,
|
|
524
|
+
...l
|
|
525
|
+
}, f) => {
|
|
526
|
+
const b = !!d, w = {
|
|
527
|
+
variant: r,
|
|
528
|
+
shape: t,
|
|
529
|
+
size: s,
|
|
530
|
+
disabled: a,
|
|
531
|
+
error: b,
|
|
532
|
+
name: o,
|
|
533
|
+
value: i,
|
|
534
|
+
onChange: h
|
|
535
|
+
};
|
|
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
|
+
!b && n && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: n })
|
|
541
|
+
] }) });
|
|
542
|
+
}
|
|
543
|
+
), Ue = Object.assign(de, {
|
|
544
|
+
Option: L
|
|
545
|
+
}), le = j(
|
|
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
|
+
{
|
|
548
|
+
variants: {
|
|
549
|
+
variant: {
|
|
550
|
+
// Core variants using Versaur color system
|
|
551
|
+
primary: "border-primary/30 text-foreground focus:border-primary focus:ring-primary/20",
|
|
552
|
+
secondary: "border-secondary/30 text-foreground focus:border-secondary focus:ring-secondary/20",
|
|
553
|
+
tertiary: "border-tertiary/30 text-foreground focus:border-tertiary focus:ring-tertiary/20",
|
|
554
|
+
ghost: "border-ghost/30 text-foreground focus:border-ghost focus:ring-ghost/20",
|
|
555
|
+
neutral: "border-gray-300 text-foreground focus:border-gray-400 focus:ring-gray-400/20",
|
|
556
|
+
// Outline variants
|
|
557
|
+
"primary-outline": "border-primary text-foreground focus:border-primary focus:ring-primary/20",
|
|
558
|
+
"secondary-outline": "border-secondary text-foreground focus:border-secondary focus:ring-secondary/20",
|
|
559
|
+
"tertiary-outline": "border-tertiary text-foreground focus:border-tertiary focus:ring-tertiary/20",
|
|
560
|
+
"ghost-outline": "border-ghost text-foreground focus:border-ghost focus:ring-ghost/20",
|
|
561
|
+
"neutral-outline": "border-gray-400 text-foreground focus:border-gray-500 focus:ring-gray-500/20",
|
|
562
|
+
// Semantic variants
|
|
563
|
+
success: "border-success/30 text-foreground focus:border-success focus:ring-success/20",
|
|
564
|
+
"success-outline": "border-success text-foreground focus:border-success focus:ring-success/20",
|
|
565
|
+
info: "border-info/30 text-foreground focus:border-info focus:ring-info/20",
|
|
566
|
+
"info-outline": "border-info text-foreground focus:border-info focus:ring-info/20",
|
|
567
|
+
warning: "border-warning/30 text-foreground focus:border-warning focus:ring-warning/20",
|
|
568
|
+
"warning-outline": "border-warning text-foreground focus:border-warning focus:ring-warning/20",
|
|
569
|
+
danger: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
|
|
570
|
+
"danger-outline": "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
defaultVariants: {
|
|
574
|
+
variant: "primary"
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
), S = x.forwardRef(
|
|
578
|
+
({
|
|
579
|
+
variant: r = "primary",
|
|
580
|
+
label: t,
|
|
581
|
+
leftContent: s,
|
|
582
|
+
rightContent: c,
|
|
583
|
+
helperText: n,
|
|
584
|
+
error: d,
|
|
585
|
+
className: u,
|
|
586
|
+
disabled: a,
|
|
587
|
+
id: o,
|
|
588
|
+
...i
|
|
589
|
+
}, h) => {
|
|
590
|
+
const g = x.useId(), l = o || g, f = !!d;
|
|
591
|
+
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
592
|
+
t && /* @__PURE__ */ e.jsx(
|
|
593
|
+
"label",
|
|
594
|
+
{
|
|
595
|
+
htmlFor: l,
|
|
596
|
+
className: "block text-sm font-medium text-foreground mb-2",
|
|
597
|
+
children: t
|
|
598
|
+
}
|
|
599
|
+
),
|
|
600
|
+
/* @__PURE__ */ e.jsxs("div", { className: p("relative w-full", u), children: [
|
|
601
|
+
s && /* @__PURE__ */ e.jsx(
|
|
602
|
+
"span",
|
|
603
|
+
{
|
|
604
|
+
className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
605
|
+
"data-testid": "left-content",
|
|
606
|
+
children: s
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
/* @__PURE__ */ e.jsx(
|
|
610
|
+
"input",
|
|
611
|
+
{
|
|
612
|
+
ref: h,
|
|
613
|
+
id: l,
|
|
614
|
+
"aria-invalid": f,
|
|
615
|
+
"aria-disabled": a,
|
|
616
|
+
disabled: a,
|
|
617
|
+
className: p(
|
|
618
|
+
le({
|
|
619
|
+
variant: f ? "danger" : r
|
|
620
|
+
}),
|
|
621
|
+
s ? "pl-9" : "pl-3",
|
|
622
|
+
c ? "pr-9" : "pr-3",
|
|
623
|
+
"h-10"
|
|
624
|
+
),
|
|
625
|
+
...i
|
|
626
|
+
}
|
|
627
|
+
),
|
|
628
|
+
c && /* @__PURE__ */ e.jsx(
|
|
629
|
+
"span",
|
|
630
|
+
{
|
|
631
|
+
className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
632
|
+
"data-testid": "right-content",
|
|
633
|
+
children: c
|
|
634
|
+
}
|
|
635
|
+
)
|
|
636
|
+
] }),
|
|
637
|
+
f && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: d }),
|
|
638
|
+
!f && n && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: n })
|
|
639
|
+
] });
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
S.displayName = "TextInput";
|
|
643
|
+
function ue(r) {
|
|
644
|
+
if (!r) return "";
|
|
645
|
+
const t = new Date(r);
|
|
646
|
+
return isNaN(t.getTime()) ? r : t.toLocaleDateString(void 0, {
|
|
647
|
+
year: "numeric",
|
|
648
|
+
month: "short",
|
|
649
|
+
day: "numeric"
|
|
650
|
+
});
|
|
651
|
+
}
|
|
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
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
661
|
+
/* @__PURE__ */ e.jsx(
|
|
662
|
+
S,
|
|
663
|
+
{
|
|
664
|
+
type: "text",
|
|
665
|
+
value: g,
|
|
666
|
+
label: c,
|
|
667
|
+
readOnly: !0,
|
|
668
|
+
tabIndex: 0,
|
|
669
|
+
"aria-hidden": "true",
|
|
670
|
+
onClick: i,
|
|
671
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: K, color: "inherit", size: "sm" }),
|
|
672
|
+
"data-testid": "date-single-picker-visible-input",
|
|
673
|
+
...d
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
/* @__PURE__ */ e.jsx(
|
|
677
|
+
"input",
|
|
678
|
+
{
|
|
679
|
+
ref: o,
|
|
680
|
+
type: "date",
|
|
681
|
+
value: t,
|
|
682
|
+
onChange: h,
|
|
683
|
+
className: "sr-only absolute opacity-0 h-0 w-0 pointer-events-none",
|
|
684
|
+
tabIndex: -1,
|
|
685
|
+
"aria-label": typeof c == "string" ? c : void 0
|
|
686
|
+
}
|
|
687
|
+
)
|
|
688
|
+
] });
|
|
689
|
+
}), ge = j("space-y-2", {
|
|
690
|
+
variants: {
|
|
691
|
+
direction: {
|
|
692
|
+
vertical: "space-y-2 space-x-0",
|
|
693
|
+
horizontal: "flex flex-wrap gap-4 space-y-0"
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
defaultVariants: {
|
|
697
|
+
direction: "vertical"
|
|
698
|
+
}
|
|
699
|
+
}), fe = j(
|
|
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
|
+
{
|
|
702
|
+
variants: {
|
|
703
|
+
variant: {
|
|
704
|
+
// Core variants using Versaur color system
|
|
705
|
+
primary: "border-primary/40 checked:bg-primary checked:border-primary focus:ring-primary/20",
|
|
706
|
+
secondary: "border-secondary/40 checked:bg-secondary checked:border-secondary focus:ring-secondary/20",
|
|
707
|
+
tertiary: "border-tertiary/40 checked:bg-tertiary checked:border-tertiary focus:ring-tertiary/20",
|
|
708
|
+
ghost: "border-ghost/40 checked:bg-ghost checked:border-ghost focus:ring-ghost/20",
|
|
709
|
+
neutral: "border-gray-300 checked:bg-gray-500 checked:border-gray-500 focus:ring-gray-400/20",
|
|
710
|
+
// Outline variants
|
|
711
|
+
"primary-outline": "border-primary checked:bg-white checked:border-primary focus:ring-primary/20",
|
|
712
|
+
"secondary-outline": "border-secondary checked:bg-white checked:border-secondary focus:ring-secondary/20",
|
|
713
|
+
"tertiary-outline": "border-tertiary checked:bg-white checked:border-tertiary focus:ring-tertiary/20",
|
|
714
|
+
"ghost-outline": "border-ghost checked:bg-white checked:border-ghost focus:ring-ghost/20",
|
|
715
|
+
"neutral-outline": "border-gray-400 checked:bg-white checked:border-gray-400 focus:ring-gray-500/20",
|
|
716
|
+
// Semantic variants
|
|
717
|
+
success: "border-success/40 checked:bg-success checked:border-success focus:ring-success/20",
|
|
718
|
+
"success-outline": "border-success checked:bg-white checked:border-success focus:ring-success/20",
|
|
719
|
+
info: "border-info/40 checked:bg-info checked:border-info focus:ring-info/20",
|
|
720
|
+
"info-outline": "border-info checked:bg-white checked:border-info focus:ring-info/20",
|
|
721
|
+
warning: "border-warning/40 checked:bg-warning checked:border-warning focus:ring-warning/20",
|
|
722
|
+
"warning-outline": "border-warning checked:bg-white checked:border-warning focus:ring-warning/20",
|
|
723
|
+
danger: "border-danger/40 checked:bg-danger checked:border-danger focus:ring-danger/20",
|
|
724
|
+
"danger-outline": "border-danger checked:bg-white checked:border-danger focus:ring-danger/20"
|
|
725
|
+
},
|
|
726
|
+
size: {
|
|
727
|
+
sm: "h-3 w-3",
|
|
728
|
+
md: "h-4 w-4",
|
|
729
|
+
lg: "h-5 w-5"
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
defaultVariants: {
|
|
733
|
+
variant: "primary",
|
|
734
|
+
size: "md"
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
), he = j(
|
|
738
|
+
"text-foreground cursor-pointer select-none",
|
|
739
|
+
{
|
|
740
|
+
variants: {
|
|
741
|
+
size: {
|
|
742
|
+
sm: "text-xs",
|
|
743
|
+
md: "text-sm",
|
|
744
|
+
lg: "text-base"
|
|
745
|
+
},
|
|
746
|
+
disabled: {
|
|
747
|
+
true: "opacity-50 cursor-not-allowed",
|
|
748
|
+
false: ""
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
defaultVariants: {
|
|
752
|
+
size: "md",
|
|
753
|
+
disabled: !1
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
), G = C(
|
|
757
|
+
null
|
|
758
|
+
), be = () => {
|
|
759
|
+
const r = z(G);
|
|
760
|
+
if (!r)
|
|
761
|
+
throw new Error(
|
|
762
|
+
"useRadioInputContext must be used within RadioInputContext"
|
|
763
|
+
);
|
|
764
|
+
return r;
|
|
765
|
+
}, xe = x.forwardRef(
|
|
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
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
769
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
770
|
+
"input",
|
|
771
|
+
{
|
|
772
|
+
ref: a,
|
|
773
|
+
type: "radio",
|
|
774
|
+
id: h,
|
|
775
|
+
name: o.name,
|
|
776
|
+
value: d,
|
|
777
|
+
disabled: g,
|
|
778
|
+
className: p(
|
|
779
|
+
fe({
|
|
780
|
+
variant: l,
|
|
781
|
+
size: o.size
|
|
782
|
+
}),
|
|
783
|
+
// Custom radio dot styling using ::before - centered positioning with size variants
|
|
784
|
+
'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',
|
|
785
|
+
// Size-specific radio dot dimensions
|
|
786
|
+
o.size === "sm" && "before:w-[6px] before:h-[6px]",
|
|
787
|
+
o.size === "md" && "before:w-[8px] before:h-[8px]",
|
|
788
|
+
o.size === "lg" && "before:w-[10px] before:h-[10px]",
|
|
789
|
+
"checked:before:opacity-100",
|
|
790
|
+
// Outline variants use colored radio dot
|
|
791
|
+
l?.includes("outline") && "checked:before:bg-current",
|
|
792
|
+
s
|
|
793
|
+
),
|
|
794
|
+
...u
|
|
795
|
+
}
|
|
796
|
+
) }),
|
|
797
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
|
|
798
|
+
/* @__PURE__ */ e.jsx(
|
|
799
|
+
"label",
|
|
800
|
+
{
|
|
801
|
+
htmlFor: h,
|
|
802
|
+
className: he({
|
|
803
|
+
size: o.size,
|
|
804
|
+
disabled: g
|
|
805
|
+
}),
|
|
806
|
+
children: r
|
|
807
|
+
}
|
|
808
|
+
),
|
|
809
|
+
t && /* @__PURE__ */ e.jsx(
|
|
810
|
+
"div",
|
|
811
|
+
{
|
|
812
|
+
className: p(
|
|
813
|
+
"text-gray-600 mt-1",
|
|
814
|
+
o.size === "sm" && "text-xs",
|
|
815
|
+
o.size === "md" && "text-xs",
|
|
816
|
+
o.size === "lg" && "text-sm",
|
|
817
|
+
g && "opacity-50"
|
|
818
|
+
),
|
|
819
|
+
children: t
|
|
820
|
+
}
|
|
821
|
+
)
|
|
822
|
+
] })
|
|
823
|
+
] });
|
|
824
|
+
}
|
|
825
|
+
), me = x.forwardRef(
|
|
826
|
+
({
|
|
827
|
+
variant: r = "primary",
|
|
828
|
+
size: t = "md",
|
|
829
|
+
label: s,
|
|
830
|
+
helperText: c,
|
|
831
|
+
error: n,
|
|
832
|
+
direction: d = "vertical",
|
|
833
|
+
className: u,
|
|
834
|
+
disabled: a,
|
|
835
|
+
name: o,
|
|
836
|
+
children: i,
|
|
837
|
+
...h
|
|
838
|
+
}, g) => {
|
|
839
|
+
const l = !!n, f = {
|
|
840
|
+
variant: r,
|
|
841
|
+
size: t,
|
|
842
|
+
disabled: a,
|
|
843
|
+
error: l,
|
|
844
|
+
name: o
|
|
845
|
+
};
|
|
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
|
+
] }) });
|
|
852
|
+
}
|
|
853
|
+
), Ye = Object.assign(me, {
|
|
854
|
+
Option: xe
|
|
855
|
+
}), pe = j(
|
|
856
|
+
"flex flex-row rounded-full border overflow-hidden p-1 gap-0.25",
|
|
857
|
+
{
|
|
858
|
+
variants: {
|
|
859
|
+
variant: {
|
|
860
|
+
// Core variants using Versaur color system
|
|
861
|
+
primary: "border-primary-light",
|
|
862
|
+
secondary: "border-secondary-light",
|
|
863
|
+
tertiary: "border-tertiary-light",
|
|
864
|
+
ghost: "border-ghost-light",
|
|
865
|
+
neutral: "border-gray-200",
|
|
866
|
+
// Semantic variants
|
|
867
|
+
success: "border-success-light",
|
|
868
|
+
info: "border-info-light",
|
|
869
|
+
warning: "border-warning-light",
|
|
870
|
+
danger: "border-danger-light"
|
|
871
|
+
},
|
|
872
|
+
size: {
|
|
873
|
+
sm: "text-xs",
|
|
874
|
+
md: "text-sm",
|
|
875
|
+
lg: "text-base"
|
|
876
|
+
},
|
|
877
|
+
error: {
|
|
878
|
+
true: "border-danger",
|
|
879
|
+
false: ""
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
defaultVariants: {
|
|
883
|
+
variant: "primary",
|
|
884
|
+
size: "md",
|
|
885
|
+
error: !1
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
), ye = j(
|
|
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
|
+
{
|
|
891
|
+
variants: {
|
|
892
|
+
variant: {
|
|
893
|
+
// Core variants using Versaur color system
|
|
894
|
+
primary: "text-ghost hover:text-primary focus:ring-primary/30",
|
|
895
|
+
secondary: "text-ghost hover:text-secondary focus:ring-secondary/30",
|
|
896
|
+
tertiary: "text-ghost hover:text-tertiary focus:ring-tertiary/30",
|
|
897
|
+
ghost: "text-ghost hover:text-ghost focus:ring-ghost/30",
|
|
898
|
+
neutral: "text-ghost hover:text-gray-700 focus:ring-gray-400/30",
|
|
899
|
+
// Semantic variants
|
|
900
|
+
success: "text-ghost hover:text-success focus:ring-success/30",
|
|
901
|
+
info: "text-ghost hover:text-info focus:ring-info/30",
|
|
902
|
+
warning: "text-ghost hover:text-warning focus:ring-warning/30",
|
|
903
|
+
danger: "text-ghost hover:text-danger focus:ring-danger/30"
|
|
904
|
+
},
|
|
905
|
+
size: {
|
|
906
|
+
sm: "px-2 py-1.5 text-xs",
|
|
907
|
+
md: "px-3 py-2 text-sm",
|
|
908
|
+
lg: "px-4 py-2.5 text-base"
|
|
909
|
+
},
|
|
910
|
+
rounded: {
|
|
911
|
+
first: "rounded-l-full",
|
|
912
|
+
middle: "",
|
|
913
|
+
last: "rounded-r-full",
|
|
914
|
+
single: "rounded-full"
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
defaultVariants: {
|
|
918
|
+
variant: "primary",
|
|
919
|
+
size: "md",
|
|
920
|
+
rounded: "middle"
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
), we = (r) => {
|
|
924
|
+
const t = {
|
|
925
|
+
// Core variants - override hover text color changes
|
|
926
|
+
primary: "bg-primary text-white hover:text-white",
|
|
927
|
+
secondary: "bg-secondary text-white hover:text-white",
|
|
928
|
+
tertiary: "bg-tertiary text-white hover:text-white",
|
|
929
|
+
ghost: "bg-ghost text-white hover:text-white",
|
|
930
|
+
neutral: "bg-gray-500 text-white hover:text-white",
|
|
931
|
+
// Semantic variants - override hover text color changes
|
|
932
|
+
success: "bg-success text-white hover:text-white",
|
|
933
|
+
info: "bg-info text-white hover:text-white",
|
|
934
|
+
warning: "bg-warning text-white hover:text-white",
|
|
935
|
+
danger: "bg-danger text-white hover:text-white"
|
|
936
|
+
};
|
|
937
|
+
return t[r || "primary"] || t.primary;
|
|
938
|
+
}, T = C(null), ve = () => {
|
|
939
|
+
const r = z(T);
|
|
940
|
+
if (!r)
|
|
941
|
+
throw new Error(
|
|
942
|
+
"useSegmentSingleInputContext must be used within SegmentSingleInputContext"
|
|
943
|
+
);
|
|
944
|
+
return r;
|
|
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
|
+
const m = o.value === n ? null : n;
|
|
950
|
+
o.onChange?.(m);
|
|
951
|
+
}
|
|
952
|
+
u.onChange?.(w);
|
|
953
|
+
};
|
|
954
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
955
|
+
/* @__PURE__ */ e.jsx(
|
|
956
|
+
"input",
|
|
957
|
+
{
|
|
958
|
+
ref: a,
|
|
959
|
+
type: "radio",
|
|
960
|
+
id: h,
|
|
961
|
+
name: o.name,
|
|
962
|
+
value: n,
|
|
963
|
+
checked: f,
|
|
964
|
+
disabled: g,
|
|
965
|
+
onChange: b,
|
|
966
|
+
className: "sr-only",
|
|
967
|
+
...u
|
|
968
|
+
}
|
|
969
|
+
),
|
|
970
|
+
/* @__PURE__ */ e.jsx(
|
|
971
|
+
"label",
|
|
972
|
+
{
|
|
973
|
+
htmlFor: h,
|
|
974
|
+
className: p(
|
|
975
|
+
"flex flex-row items-center justify-center",
|
|
976
|
+
ye({
|
|
977
|
+
variant: l,
|
|
978
|
+
size: o.size,
|
|
979
|
+
rounded: d
|
|
980
|
+
}),
|
|
981
|
+
f && we(l),
|
|
982
|
+
g && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
983
|
+
t
|
|
984
|
+
),
|
|
985
|
+
children: r
|
|
986
|
+
}
|
|
987
|
+
)
|
|
988
|
+
] });
|
|
989
|
+
}
|
|
990
|
+
);
|
|
991
|
+
W.displayName = "SegmentOption";
|
|
992
|
+
const je = x.forwardRef(
|
|
993
|
+
({
|
|
994
|
+
variant: r = "primary",
|
|
995
|
+
size: t = "md",
|
|
996
|
+
label: s,
|
|
997
|
+
helperText: c,
|
|
998
|
+
error: n,
|
|
999
|
+
disabled: d,
|
|
1000
|
+
name: u,
|
|
1001
|
+
value: a,
|
|
1002
|
+
onChange: o,
|
|
1003
|
+
children: i,
|
|
1004
|
+
...h
|
|
1005
|
+
}, g) => {
|
|
1006
|
+
const l = !!n, f = {
|
|
1007
|
+
variant: r,
|
|
1008
|
+
size: t,
|
|
1009
|
+
disabled: d,
|
|
1010
|
+
error: l,
|
|
1011
|
+
name: u,
|
|
1012
|
+
value: a,
|
|
1013
|
+
onChange: o
|
|
1014
|
+
}, b = x.Children.toArray(i), w = b.map((m, v) => {
|
|
1015
|
+
if (x.isValidElement(m)) {
|
|
1016
|
+
let y;
|
|
1017
|
+
return b.length === 1 ? y = "single" : v === 0 ? y = "first" : v === b.length - 1 ? y = "last" : y = "middle", x.cloneElement(
|
|
1018
|
+
m,
|
|
1019
|
+
{ position: y }
|
|
1020
|
+
);
|
|
1021
|
+
}
|
|
1022
|
+
return m;
|
|
1023
|
+
});
|
|
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
|
+
/* @__PURE__ */ e.jsx(
|
|
1027
|
+
"div",
|
|
1028
|
+
{
|
|
1029
|
+
className: p(
|
|
1030
|
+
pe({
|
|
1031
|
+
variant: l ? "danger" : r,
|
|
1032
|
+
size: t,
|
|
1033
|
+
error: l
|
|
1034
|
+
})
|
|
1035
|
+
),
|
|
1036
|
+
children: w
|
|
1037
|
+
}
|
|
1038
|
+
),
|
|
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
|
+
] }) });
|
|
1042
|
+
}
|
|
1043
|
+
), Ze = Object.assign(je, {
|
|
1044
|
+
Option: W
|
|
1045
|
+
}), ke = j(
|
|
1046
|
+
"flex flex-row rounded-full border overflow-hidden p-1 gap-0.25",
|
|
1047
|
+
{
|
|
1048
|
+
variants: {
|
|
1049
|
+
variant: {
|
|
1050
|
+
// Core variants using Versaur color system
|
|
1051
|
+
primary: "border-primary-light",
|
|
1052
|
+
secondary: "border-secondary-light",
|
|
1053
|
+
tertiary: "border-tertiary-light",
|
|
1054
|
+
ghost: "border-ghost-light",
|
|
1055
|
+
neutral: "border-gray-200",
|
|
1056
|
+
// Semantic variants
|
|
1057
|
+
success: "border-success-light",
|
|
1058
|
+
info: "border-info-light",
|
|
1059
|
+
warning: "border-warning-light",
|
|
1060
|
+
danger: "border-danger-light"
|
|
1061
|
+
},
|
|
1062
|
+
size: {
|
|
1063
|
+
sm: "text-xs",
|
|
1064
|
+
md: "text-sm",
|
|
1065
|
+
lg: "text-base"
|
|
1066
|
+
},
|
|
1067
|
+
error: {
|
|
1068
|
+
true: "border-danger",
|
|
1069
|
+
false: ""
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
defaultVariants: {
|
|
1073
|
+
variant: "primary",
|
|
1074
|
+
size: "md",
|
|
1075
|
+
error: !1
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
), Ie = j(
|
|
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
|
+
{
|
|
1081
|
+
variants: {
|
|
1082
|
+
variant: {
|
|
1083
|
+
// Core variants using Versaur color system
|
|
1084
|
+
primary: "text-ghost hover:text-primary focus:ring-primary/30",
|
|
1085
|
+
secondary: "text-ghost hover:text-secondary focus:ring-secondary/30",
|
|
1086
|
+
tertiary: "text-ghost hover:text-tertiary focus:ring-tertiary/30",
|
|
1087
|
+
ghost: "text-ghost hover:text-ghost focus:ring-ghost/30",
|
|
1088
|
+
neutral: "text-ghost hover:text-gray-700 focus:ring-gray-400/30",
|
|
1089
|
+
// Semantic variants
|
|
1090
|
+
success: "text-ghost hover:text-success focus:ring-success/30",
|
|
1091
|
+
info: "text-ghost hover:text-info focus:ring-info/30",
|
|
1092
|
+
warning: "text-ghost hover:text-warning focus:ring-warning/30",
|
|
1093
|
+
danger: "text-ghost hover:text-danger focus:ring-danger/30"
|
|
1094
|
+
},
|
|
1095
|
+
size: {
|
|
1096
|
+
sm: "px-2 py-1.5 text-xs",
|
|
1097
|
+
md: "px-3 py-2 text-sm",
|
|
1098
|
+
lg: "px-4 py-2.5 text-base"
|
|
1099
|
+
},
|
|
1100
|
+
rounded: {
|
|
1101
|
+
first: "rounded-l-full",
|
|
1102
|
+
middle: "",
|
|
1103
|
+
last: "rounded-r-full",
|
|
1104
|
+
single: "rounded-full"
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
defaultVariants: {
|
|
1108
|
+
variant: "primary",
|
|
1109
|
+
size: "md",
|
|
1110
|
+
rounded: "middle"
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
), Ne = (r) => {
|
|
1114
|
+
const t = {
|
|
1115
|
+
// Core variants - override hover text color changes
|
|
1116
|
+
primary: "bg-primary text-white hover:text-white",
|
|
1117
|
+
secondary: "bg-secondary text-white hover:text-white",
|
|
1118
|
+
tertiary: "bg-tertiary text-white hover:text-white",
|
|
1119
|
+
ghost: "bg-ghost text-white hover:text-white",
|
|
1120
|
+
neutral: "bg-gray-500 text-white hover:text-white",
|
|
1121
|
+
// Semantic variants - override hover text color changes
|
|
1122
|
+
success: "bg-success text-white hover:text-white",
|
|
1123
|
+
info: "bg-info text-white hover:text-white",
|
|
1124
|
+
warning: "bg-warning text-white hover:text-white",
|
|
1125
|
+
danger: "bg-danger text-white hover:text-white"
|
|
1126
|
+
};
|
|
1127
|
+
return t[r || "primary"] || t.primary;
|
|
1128
|
+
}, _ = C(null), Ce = () => {
|
|
1129
|
+
const r = z(_);
|
|
1130
|
+
if (!r)
|
|
1131
|
+
throw new Error(
|
|
1132
|
+
"useSegmentMultipleInputContext must be used within SegmentMultipleInputContext"
|
|
1133
|
+
);
|
|
1134
|
+
return r;
|
|
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
|
+
const m = o.value || [];
|
|
1140
|
+
let v;
|
|
1141
|
+
f ? v = m.filter((y) => y !== n) : v = [...m, n], o.onChange?.(v);
|
|
1142
|
+
}
|
|
1143
|
+
u.onChange?.(w);
|
|
1144
|
+
};
|
|
1145
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1146
|
+
/* @__PURE__ */ e.jsx(
|
|
1147
|
+
"input",
|
|
1148
|
+
{
|
|
1149
|
+
ref: a,
|
|
1150
|
+
type: "checkbox",
|
|
1151
|
+
id: h,
|
|
1152
|
+
name: `${o.name}[]`,
|
|
1153
|
+
value: n,
|
|
1154
|
+
checked: f,
|
|
1155
|
+
disabled: g,
|
|
1156
|
+
onChange: b,
|
|
1157
|
+
className: "sr-only",
|
|
1158
|
+
...u
|
|
1159
|
+
}
|
|
1160
|
+
),
|
|
1161
|
+
/* @__PURE__ */ e.jsx(
|
|
1162
|
+
"label",
|
|
1163
|
+
{
|
|
1164
|
+
htmlFor: h,
|
|
1165
|
+
className: p(
|
|
1166
|
+
"flex flex-row items-center justify-center",
|
|
1167
|
+
Ie({
|
|
1168
|
+
variant: l,
|
|
1169
|
+
size: o.size,
|
|
1170
|
+
rounded: d
|
|
1171
|
+
}),
|
|
1172
|
+
f && Ne(l),
|
|
1173
|
+
g && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
1174
|
+
t
|
|
1175
|
+
),
|
|
1176
|
+
children: r
|
|
1177
|
+
}
|
|
1178
|
+
)
|
|
1179
|
+
] });
|
|
1180
|
+
}
|
|
1181
|
+
);
|
|
1182
|
+
H.displayName = "SegmentOption";
|
|
1183
|
+
const ze = x.forwardRef(
|
|
1184
|
+
({
|
|
1185
|
+
variant: r = "primary",
|
|
1186
|
+
size: t = "md",
|
|
1187
|
+
label: s,
|
|
1188
|
+
helperText: c,
|
|
1189
|
+
error: n,
|
|
1190
|
+
disabled: d,
|
|
1191
|
+
name: u,
|
|
1192
|
+
value: a = [],
|
|
1193
|
+
onChange: o,
|
|
1194
|
+
children: i,
|
|
1195
|
+
...h
|
|
1196
|
+
}, g) => {
|
|
1197
|
+
const l = !!n, f = {
|
|
1198
|
+
variant: r,
|
|
1199
|
+
size: t,
|
|
1200
|
+
disabled: d,
|
|
1201
|
+
error: l,
|
|
1202
|
+
name: u,
|
|
1203
|
+
value: a,
|
|
1204
|
+
onChange: o
|
|
1205
|
+
}, b = x.Children.toArray(i), w = b.map((m, v) => {
|
|
1206
|
+
if (x.isValidElement(m)) {
|
|
1207
|
+
let y;
|
|
1208
|
+
return b.length === 1 ? y = "single" : v === 0 ? y = "first" : v === b.length - 1 ? y = "last" : y = "middle", x.cloneElement(
|
|
1209
|
+
m,
|
|
1210
|
+
{ position: y }
|
|
1211
|
+
);
|
|
1212
|
+
}
|
|
1213
|
+
return m;
|
|
1214
|
+
});
|
|
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
|
+
/* @__PURE__ */ e.jsx(
|
|
1218
|
+
"div",
|
|
1219
|
+
{
|
|
1220
|
+
className: p(
|
|
1221
|
+
ke({
|
|
1222
|
+
variant: l ? "danger" : r,
|
|
1223
|
+
size: t,
|
|
1224
|
+
error: l
|
|
1225
|
+
})
|
|
1226
|
+
),
|
|
1227
|
+
children: w
|
|
1228
|
+
}
|
|
1229
|
+
),
|
|
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
|
+
] }) });
|
|
1233
|
+
}
|
|
1234
|
+
), er = Object.assign(ze, {
|
|
1235
|
+
Option: H
|
|
1236
|
+
}), rr = V(
|
|
1237
|
+
({
|
|
1238
|
+
autoComplete: r = "off",
|
|
1239
|
+
spellCheck: t = !1,
|
|
1240
|
+
inputMode: s = "search",
|
|
1241
|
+
placeholder: c = "Search...",
|
|
1242
|
+
maxLength: n = 256,
|
|
1243
|
+
enterKeyHint: d = "search",
|
|
1244
|
+
"aria-label": u = "Search",
|
|
1245
|
+
// internal default, not in props
|
|
1246
|
+
...a
|
|
1247
|
+
}, o) => /* @__PURE__ */ e.jsx(
|
|
1248
|
+
S,
|
|
1249
|
+
{
|
|
1250
|
+
ref: o,
|
|
1251
|
+
type: "search",
|
|
1252
|
+
inputMode: s,
|
|
1253
|
+
autoComplete: r,
|
|
1254
|
+
spellCheck: t,
|
|
1255
|
+
placeholder: c,
|
|
1256
|
+
maxLength: n,
|
|
1257
|
+
enterKeyHint: d,
|
|
1258
|
+
"aria-label": u,
|
|
1259
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: Q, color: "inherit", size: "sm" }),
|
|
1260
|
+
...a
|
|
1261
|
+
}
|
|
1262
|
+
)
|
|
1263
|
+
), Se = j(
|
|
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
|
+
{
|
|
1266
|
+
variants: {
|
|
1267
|
+
variant: {
|
|
1268
|
+
// Core variants using Versaur color system
|
|
1269
|
+
primary: "border-primary/30 text-foreground focus:border-primary focus:ring-primary/20",
|
|
1270
|
+
secondary: "border-secondary/30 text-foreground focus:border-secondary focus:ring-secondary/20",
|
|
1271
|
+
tertiary: "border-tertiary/30 text-foreground focus:border-tertiary focus:ring-tertiary/20",
|
|
1272
|
+
ghost: "border-ghost/30 text-foreground focus:border-ghost focus:ring-ghost/20",
|
|
1273
|
+
neutral: "border-gray-300 text-foreground focus:border-gray-400 focus:ring-gray-400/20",
|
|
1274
|
+
// Outline variants
|
|
1275
|
+
"primary-outline": "border-primary text-foreground focus:border-primary focus:ring-primary/20",
|
|
1276
|
+
"secondary-outline": "border-secondary text-foreground focus:border-secondary focus:ring-secondary/20",
|
|
1277
|
+
"tertiary-outline": "border-tertiary text-foreground focus:border-tertiary focus:ring-tertiary/20",
|
|
1278
|
+
"ghost-outline": "border-ghost text-foreground focus:border-ghost focus:ring-ghost/20",
|
|
1279
|
+
"neutral-outline": "border-gray-400 text-foreground focus:border-gray-500 focus:ring-gray-500/20",
|
|
1280
|
+
// Semantic variants
|
|
1281
|
+
success: "border-success/30 text-foreground focus:border-success focus:ring-success/20",
|
|
1282
|
+
"success-outline": "border-success text-foreground focus:border-success focus:ring-success/20",
|
|
1283
|
+
info: "border-info/30 text-foreground focus:border-info focus:ring-info/20",
|
|
1284
|
+
"info-outline": "border-info text-foreground focus:border-info focus:ring-info/20",
|
|
1285
|
+
warning: "border-warning/30 text-foreground focus:border-warning focus:ring-warning/20",
|
|
1286
|
+
"warning-outline": "border-warning text-foreground focus:border-warning focus:ring-warning/20",
|
|
1287
|
+
danger: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
|
|
1288
|
+
"danger-outline": "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20"
|
|
1289
|
+
}
|
|
1290
|
+
},
|
|
1291
|
+
defaultVariants: {
|
|
1292
|
+
variant: "primary"
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
), Ve = x.forwardRef(
|
|
1296
|
+
({
|
|
1297
|
+
variant: r = "primary",
|
|
1298
|
+
label: t,
|
|
1299
|
+
helperText: s,
|
|
1300
|
+
error: c,
|
|
1301
|
+
className: n,
|
|
1302
|
+
disabled: d,
|
|
1303
|
+
id: u,
|
|
1304
|
+
placeholder: a,
|
|
1305
|
+
children: o,
|
|
1306
|
+
...i
|
|
1307
|
+
}, h) => {
|
|
1308
|
+
const g = x.useId(), l = u || g, f = !!c;
|
|
1309
|
+
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1310
|
+
/* @__PURE__ */ e.jsx(
|
|
1311
|
+
"label",
|
|
1312
|
+
{
|
|
1313
|
+
htmlFor: l,
|
|
1314
|
+
className: "block text-sm font-medium text-foreground mb-2",
|
|
1315
|
+
children: t
|
|
1316
|
+
}
|
|
1317
|
+
),
|
|
1318
|
+
/* @__PURE__ */ e.jsxs("div", { className: p("relative w-full", n), children: [
|
|
1319
|
+
/* @__PURE__ */ e.jsxs(
|
|
1320
|
+
"select",
|
|
1321
|
+
{
|
|
1322
|
+
ref: h,
|
|
1323
|
+
id: l,
|
|
1324
|
+
"aria-invalid": f,
|
|
1325
|
+
"aria-disabled": d,
|
|
1326
|
+
disabled: d,
|
|
1327
|
+
className: p(
|
|
1328
|
+
Se({
|
|
1329
|
+
variant: f ? "danger" : r
|
|
1330
|
+
}),
|
|
1331
|
+
"h-10 pl-3"
|
|
1332
|
+
),
|
|
1333
|
+
...i,
|
|
1334
|
+
children: [
|
|
1335
|
+
a && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: a }),
|
|
1336
|
+
o
|
|
1337
|
+
]
|
|
1338
|
+
}
|
|
1339
|
+
),
|
|
1340
|
+
/* @__PURE__ */ e.jsx("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none", children: /* @__PURE__ */ e.jsx(
|
|
1341
|
+
"svg",
|
|
1342
|
+
{
|
|
1343
|
+
className: "w-5 h-5 text-gray-400",
|
|
1344
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1345
|
+
viewBox: "0 0 20 20",
|
|
1346
|
+
fill: "currentColor",
|
|
1347
|
+
"aria-hidden": "true",
|
|
1348
|
+
children: /* @__PURE__ */ e.jsx(
|
|
1349
|
+
"path",
|
|
1350
|
+
{
|
|
1351
|
+
fillRule: "evenodd",
|
|
1352
|
+
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
1353
|
+
clipRule: "evenodd"
|
|
1354
|
+
}
|
|
1355
|
+
)
|
|
1356
|
+
}
|
|
1357
|
+
) })
|
|
1358
|
+
] }),
|
|
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
|
+
] });
|
|
1362
|
+
}
|
|
1363
|
+
);
|
|
1364
|
+
Ve.displayName = "SelectInput";
|
|
1365
|
+
const Re = j(
|
|
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
|
+
{
|
|
1368
|
+
variants: {
|
|
1369
|
+
variant: {
|
|
1370
|
+
// Core variants using Versaur color system
|
|
1371
|
+
primary: "border-primary/30 text-foreground focus:border-primary focus:ring-primary/20",
|
|
1372
|
+
secondary: "border-secondary/30 text-foreground focus:border-secondary focus:ring-secondary/20",
|
|
1373
|
+
tertiary: "border-tertiary/30 text-foreground focus:border-tertiary focus:ring-tertiary/20",
|
|
1374
|
+
ghost: "border-ghost/30 text-foreground focus:border-ghost focus:ring-ghost/20",
|
|
1375
|
+
neutral: "border-gray-300 text-foreground focus:border-gray-400 focus:ring-gray-400/20",
|
|
1376
|
+
// Outline variants
|
|
1377
|
+
"primary-outline": "border-primary text-foreground focus:border-primary focus:ring-primary/20",
|
|
1378
|
+
"secondary-outline": "border-secondary text-foreground focus:border-secondary focus:ring-secondary/20",
|
|
1379
|
+
"tertiary-outline": "border-tertiary text-foreground focus:border-tertiary focus:ring-tertiary/20",
|
|
1380
|
+
"ghost-outline": "border-ghost text-foreground focus:border-ghost focus:ring-ghost/20",
|
|
1381
|
+
"neutral-outline": "border-gray-400 text-foreground focus:border-gray-500 focus:ring-gray-500/20",
|
|
1382
|
+
// Semantic variants
|
|
1383
|
+
success: "border-success/30 text-foreground focus:border-success focus:ring-success/20",
|
|
1384
|
+
"success-outline": "border-success text-foreground focus:border-success focus:ring-success/20",
|
|
1385
|
+
info: "border-info/30 text-foreground focus:border-info focus:ring-info/20",
|
|
1386
|
+
"info-outline": "border-info text-foreground focus:border-info focus:ring-info/20",
|
|
1387
|
+
warning: "border-warning/30 text-foreground focus:border-warning focus:ring-warning/20",
|
|
1388
|
+
"warning-outline": "border-warning text-foreground focus:border-warning focus:ring-warning/20",
|
|
1389
|
+
danger: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
|
|
1390
|
+
"danger-outline": "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20"
|
|
1391
|
+
},
|
|
1392
|
+
fieldSizing: {
|
|
1393
|
+
content: "field-sizing-content resize-none",
|
|
1394
|
+
fixed: "resize-y"
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1397
|
+
defaultVariants: {
|
|
1398
|
+
variant: "primary",
|
|
1399
|
+
fieldSizing: "fixed"
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
), Oe = x.forwardRef(
|
|
1403
|
+
({
|
|
1404
|
+
variant: r = "primary",
|
|
1405
|
+
label: t,
|
|
1406
|
+
helperText: s,
|
|
1407
|
+
error: c,
|
|
1408
|
+
className: n,
|
|
1409
|
+
disabled: d,
|
|
1410
|
+
id: u,
|
|
1411
|
+
minRows: a = 3,
|
|
1412
|
+
maxRows: o,
|
|
1413
|
+
fieldSizing: i = "fixed",
|
|
1414
|
+
style: h,
|
|
1415
|
+
rows: g,
|
|
1416
|
+
...l
|
|
1417
|
+
}, f) => {
|
|
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
|
+
...y && {
|
|
1421
|
+
maxHeight: `${y * 1.5}rem`
|
|
1422
|
+
// Approximate line height
|
|
1423
|
+
},
|
|
1424
|
+
...h
|
|
1425
|
+
};
|
|
1426
|
+
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
1427
|
+
t && /* @__PURE__ */ e.jsx(
|
|
1428
|
+
"label",
|
|
1429
|
+
{
|
|
1430
|
+
htmlFor: w,
|
|
1431
|
+
className: "block text-sm font-medium text-foreground mb-2",
|
|
1432
|
+
children: t
|
|
1433
|
+
}
|
|
1434
|
+
),
|
|
1435
|
+
/* @__PURE__ */ e.jsx("div", { className: p("relative w-full", n), children: /* @__PURE__ */ e.jsx(
|
|
1436
|
+
"textarea",
|
|
1437
|
+
{
|
|
1438
|
+
ref: f,
|
|
1439
|
+
id: w,
|
|
1440
|
+
rows: v,
|
|
1441
|
+
"aria-invalid": m,
|
|
1442
|
+
"aria-disabled": d,
|
|
1443
|
+
disabled: d,
|
|
1444
|
+
style: k,
|
|
1445
|
+
className: p(
|
|
1446
|
+
Re({
|
|
1447
|
+
variant: m ? "danger" : r,
|
|
1448
|
+
fieldSizing: i
|
|
1449
|
+
}),
|
|
1450
|
+
"px-3 py-2"
|
|
1451
|
+
),
|
|
1452
|
+
...l
|
|
1453
|
+
}
|
|
1454
|
+
) }),
|
|
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
|
+
] });
|
|
1458
|
+
}
|
|
1459
|
+
);
|
|
1460
|
+
Oe.displayName = "TextAreaInput";
|
|
1461
|
+
const tr = V(function(t, s) {
|
|
1462
|
+
const c = (n) => {
|
|
1463
|
+
t?.onChange?.(n.target.value);
|
|
1464
|
+
};
|
|
1465
|
+
return /* @__PURE__ */ e.jsx(
|
|
1466
|
+
S,
|
|
1467
|
+
{
|
|
1468
|
+
type: "time",
|
|
1469
|
+
tabIndex: 0,
|
|
1470
|
+
"aria-hidden": "true",
|
|
1471
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: U, color: "inherit", size: "sm" }),
|
|
1472
|
+
ref: s,
|
|
1473
|
+
...t,
|
|
1474
|
+
onChange: c
|
|
1475
|
+
}
|
|
1476
|
+
);
|
|
1477
|
+
}), Ee = j(
|
|
1478
|
+
"relative inline-flex items-center transition-colors duration-200 border border-transparent",
|
|
1479
|
+
{
|
|
1480
|
+
variants: {
|
|
1481
|
+
color: {
|
|
1482
|
+
primary: "",
|
|
1483
|
+
secondary: "",
|
|
1484
|
+
tertiary: "",
|
|
1485
|
+
ghost: "",
|
|
1486
|
+
neutral: "",
|
|
1487
|
+
success: "",
|
|
1488
|
+
info: "",
|
|
1489
|
+
warning: "",
|
|
1490
|
+
danger: ""
|
|
1491
|
+
},
|
|
1492
|
+
size: {
|
|
1493
|
+
sm: "h-4 w-8",
|
|
1494
|
+
md: "h-5 w-10",
|
|
1495
|
+
lg: "h-6 w-12"
|
|
1496
|
+
},
|
|
1497
|
+
disabled: {
|
|
1498
|
+
true: "opacity-50 cursor-not-allowed",
|
|
1499
|
+
false: ""
|
|
1500
|
+
},
|
|
1501
|
+
checked: {
|
|
1502
|
+
true: "",
|
|
1503
|
+
false: ""
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
defaultVariants: {
|
|
1507
|
+
color: "primary",
|
|
1508
|
+
size: "md",
|
|
1509
|
+
disabled: !1,
|
|
1510
|
+
checked: !1
|
|
1511
|
+
},
|
|
1512
|
+
compoundVariants: [
|
|
1513
|
+
{
|
|
1514
|
+
checked: !0,
|
|
1515
|
+
color: "primary",
|
|
1516
|
+
class: "bg-primary"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
checked: !0,
|
|
1520
|
+
color: "secondary",
|
|
1521
|
+
class: "bg-secondary"
|
|
1522
|
+
},
|
|
1523
|
+
{ checked: !0, color: "tertiary", class: "bg-tertiary" },
|
|
1524
|
+
{ checked: !0, color: "ghost", class: "bg-ghost" },
|
|
1525
|
+
{ checked: !0, color: "neutral", class: "bg-neutral" },
|
|
1526
|
+
{ checked: !0, color: "success", class: "bg-success" },
|
|
1527
|
+
{ checked: !0, color: "info", class: "bg-info" },
|
|
1528
|
+
{ checked: !0, color: "warning", class: "bg-warning" },
|
|
1529
|
+
{ checked: !0, color: "danger", class: "bg-danger" },
|
|
1530
|
+
{ checked: !1, class: "bg-white border-border" }
|
|
1531
|
+
]
|
|
1532
|
+
}
|
|
1533
|
+
), Me = j(
|
|
1534
|
+
"absolute rounded-full transition-transform duration-200",
|
|
1535
|
+
{
|
|
1536
|
+
variants: {
|
|
1537
|
+
size: {
|
|
1538
|
+
sm: "h-3 w-3",
|
|
1539
|
+
md: "h-4 w-4",
|
|
1540
|
+
lg: "h-5 w-5"
|
|
1541
|
+
},
|
|
1542
|
+
checked: {
|
|
1543
|
+
true: "translate-x-full bg-white left-1.5",
|
|
1544
|
+
false: "bg-neutral left-0.5"
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
defaultVariants: {
|
|
1548
|
+
size: "md",
|
|
1549
|
+
checked: !1
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
), Fe = ({
|
|
1553
|
+
color: r = "primary",
|
|
1554
|
+
size: t = "md",
|
|
1555
|
+
disabled: s = !1,
|
|
1556
|
+
className: c,
|
|
1557
|
+
checked: n
|
|
1558
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
1559
|
+
"span",
|
|
1560
|
+
{
|
|
1561
|
+
className: p(
|
|
1562
|
+
Ee({ color: r, size: t, disabled: s, checked: n }),
|
|
1563
|
+
"rounded-full pointer-events-none",
|
|
1564
|
+
c
|
|
1565
|
+
),
|
|
1566
|
+
"aria-hidden": "true"
|
|
1567
|
+
}
|
|
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
|
+
"label",
|
|
1570
|
+
{
|
|
1571
|
+
htmlFor: t,
|
|
1572
|
+
className: p(
|
|
1573
|
+
"text-sm select-none font-medium text-foreground",
|
|
1574
|
+
s === "inline" ? "ml-2 mb-0" : "mb-1",
|
|
1575
|
+
c && "opacity-50 cursor-not-allowed"
|
|
1576
|
+
),
|
|
1577
|
+
children: r
|
|
1578
|
+
}
|
|
1579
|
+
) : null, De = x.forwardRef(
|
|
1580
|
+
({
|
|
1581
|
+
checked: r,
|
|
1582
|
+
defaultChecked: t,
|
|
1583
|
+
onCheckedChange: s,
|
|
1584
|
+
color: c = "primary",
|
|
1585
|
+
size: n = "md",
|
|
1586
|
+
label: d,
|
|
1587
|
+
labelPlacement: u = "top",
|
|
1588
|
+
disabled: a = !1,
|
|
1589
|
+
className: o,
|
|
1590
|
+
id: i,
|
|
1591
|
+
ariaLabel: h,
|
|
1592
|
+
...g
|
|
1593
|
+
}, l) => {
|
|
1594
|
+
const [f, b] = F(
|
|
1595
|
+
t ?? !1
|
|
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
|
+
};
|
|
1599
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1600
|
+
"div",
|
|
1601
|
+
{
|
|
1602
|
+
className: p(
|
|
1603
|
+
"flex flex-col",
|
|
1604
|
+
u === "inline" && "flex-row items-center",
|
|
1605
|
+
o
|
|
1606
|
+
),
|
|
1607
|
+
children: [
|
|
1608
|
+
/* @__PURE__ */ e.jsx(
|
|
1609
|
+
Be,
|
|
1610
|
+
{
|
|
1611
|
+
label: d,
|
|
1612
|
+
htmlFor: m,
|
|
1613
|
+
placement: u,
|
|
1614
|
+
disabled: a
|
|
1615
|
+
}
|
|
1616
|
+
),
|
|
1617
|
+
/* @__PURE__ */ e.jsxs(
|
|
1618
|
+
"span",
|
|
1619
|
+
{
|
|
1620
|
+
className: p(
|
|
1621
|
+
"relative flex items-center",
|
|
1622
|
+
u === "inline" && "ml-2"
|
|
1623
|
+
),
|
|
1624
|
+
children: [
|
|
1625
|
+
/* @__PURE__ */ e.jsx(
|
|
1626
|
+
"input",
|
|
1627
|
+
{
|
|
1628
|
+
ref: l,
|
|
1629
|
+
type: "checkbox",
|
|
1630
|
+
id: m,
|
|
1631
|
+
"aria-label": h || d,
|
|
1632
|
+
checked: y,
|
|
1633
|
+
disabled: a,
|
|
1634
|
+
onChange: k,
|
|
1635
|
+
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",
|
|
1636
|
+
...g
|
|
1637
|
+
}
|
|
1638
|
+
),
|
|
1639
|
+
/* @__PURE__ */ e.jsx(
|
|
1640
|
+
Fe,
|
|
1641
|
+
{
|
|
1642
|
+
color: c,
|
|
1643
|
+
size: n,
|
|
1644
|
+
disabled: a,
|
|
1645
|
+
checked: y
|
|
1646
|
+
}
|
|
1647
|
+
),
|
|
1648
|
+
/* @__PURE__ */ e.jsx(Pe, { size: n, checked: y })
|
|
1649
|
+
]
|
|
1650
|
+
}
|
|
1651
|
+
)
|
|
1652
|
+
]
|
|
1653
|
+
}
|
|
1654
|
+
);
|
|
1655
|
+
}
|
|
1656
|
+
);
|
|
1657
|
+
De.displayName = "SwitchInput";
|
|
1658
|
+
function $e(r, t) {
|
|
1659
|
+
J(() => {
|
|
1660
|
+
typeof r == "number" && !isNaN(r) ? t(`${r}`) : r === "" || r === null || r === void 0 ? t("") : typeof r == "string" && t(r);
|
|
1661
|
+
}, [r, t]);
|
|
1662
|
+
}
|
|
1663
|
+
const or = ({
|
|
1664
|
+
value: r,
|
|
1665
|
+
onChange: t,
|
|
1666
|
+
allowNegative: s = !1,
|
|
1667
|
+
inputProps: c,
|
|
1668
|
+
label: n,
|
|
1669
|
+
helperText: d,
|
|
1670
|
+
error: u,
|
|
1671
|
+
variant: a,
|
|
1672
|
+
...o
|
|
1673
|
+
}) => {
|
|
1674
|
+
const i = M(null), [h, g] = F(
|
|
1675
|
+
r === "" ? "" : String(r)
|
|
1676
|
+
);
|
|
1677
|
+
$e(r, g);
|
|
1678
|
+
const l = (f) => {
|
|
1679
|
+
let b = f.target.value.replace(/[^\d.,-]/g, "");
|
|
1680
|
+
s || (b = b.replace(/-/g, "")), g(b), t(b);
|
|
1681
|
+
};
|
|
1682
|
+
return /* @__PURE__ */ e.jsx(
|
|
1683
|
+
S,
|
|
1684
|
+
{
|
|
1685
|
+
ref: i,
|
|
1686
|
+
type: "text",
|
|
1687
|
+
label: n,
|
|
1688
|
+
value: h,
|
|
1689
|
+
onChange: l,
|
|
1690
|
+
error: u,
|
|
1691
|
+
helperText: d,
|
|
1692
|
+
placeholder: o.placeholder,
|
|
1693
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: X, color: "inherit", size: "sm" }),
|
|
1694
|
+
variant: a,
|
|
1695
|
+
inputMode: "numeric",
|
|
1696
|
+
autoComplete: "off",
|
|
1697
|
+
pattern: s ? "^-?[\\d,.]*$" : "^[\\d,.]*$",
|
|
1698
|
+
...c,
|
|
1699
|
+
...o
|
|
1700
|
+
}
|
|
1701
|
+
);
|
|
1702
|
+
}, sr = V(
|
|
1703
|
+
(r, t) => /* @__PURE__ */ e.jsx(
|
|
1704
|
+
S,
|
|
1705
|
+
{
|
|
1706
|
+
...r,
|
|
1707
|
+
ref: t,
|
|
1708
|
+
type: "email",
|
|
1709
|
+
autoComplete: "email",
|
|
1710
|
+
inputMode: "email",
|
|
1711
|
+
leftContent: /* @__PURE__ */ e.jsx(N, { as: Y, color: "inherit", size: "sm" })
|
|
1712
|
+
}
|
|
1713
|
+
)
|
|
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
|
+
});
|
|
1883
|
+
export {
|
|
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,
|
|
1895
|
+
Ve as e,
|
|
1896
|
+
Oe as f,
|
|
1897
|
+
tr as g,
|
|
1898
|
+
De as h,
|
|
1899
|
+
nr as i,
|
|
1900
|
+
ar as j
|
|
1901
|
+
};
|