@dimasbaguspm/versaur 0.0.54 → 0.0.56

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.
@@ -1,9 +1,9 @@
1
- import { c as N, j as e, a as x } from "./index-DOdDlCoL.js";
2
- import b, { createContext as E, useContext as F, useId as B, forwardRef as z, useRef as T, useEffect as ne, useState as se } from "react";
3
- import { I as P } from "./image-rectangle-K9jmTTED.js";
1
+ import { c as C, j as e, a as x } from "./index-DOdDlCoL.js";
2
+ import m, { createContext as F, useContext as B, useId as A, forwardRef as O, useRef as T, useEffect as ne, useState as se } from "react";
3
+ import { I as $ } from "./image-rectangle-K9jmTTED.js";
4
4
  import { Calendar as oe, MailIcon as ie, Banknote as ce, SearchIcon as le, ChevronDown as de, Clock as ue } from "lucide-react";
5
5
  import "./snackbar-DH8jCh2V.js";
6
- const fe = N("space-y-2", {
6
+ const fe = C("space-y-2", {
7
7
  variants: {
8
8
  direction: {
9
9
  vertical: "space-y-2 space-x-0",
@@ -13,9 +13,9 @@ const fe = N("space-y-2", {
13
13
  defaultVariants: {
14
14
  direction: "vertical"
15
15
  }
16
- }), pe = N(
16
+ }), pe = C(
17
17
  "relative h-4 w-4 rounded border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed appearance-none bg-white border-primary/40 checked:bg-primary checked:border-primary focus:ring-primary/20"
18
- ), me = N(
18
+ ), me = C(
19
19
  "text-sm text-foreground cursor-pointer select-none",
20
20
  {
21
21
  variants: {
@@ -28,20 +28,20 @@ const fe = N("space-y-2", {
28
28
  disabled: !1
29
29
  }
30
30
  }
31
- ), q = E(null), he = () => {
32
- const t = F(q);
31
+ ), q = F(null), he = () => {
32
+ const t = B(q);
33
33
  if (!t)
34
34
  throw new Error("CheckboxOption must be used within CheckboxInput");
35
35
  return t;
36
- }, G = b.forwardRef(({ children: t, description: r, className: a, disabled: s, id: n, ...o }, d) => {
37
- const c = he(), i = b.useId(), l = n || i, u = s || c.disabled;
36
+ }, G = m.forwardRef(({ children: t, description: r, className: a, disabled: s, id: n, ...o }, d) => {
37
+ const l = he(), c = m.useId(), i = n || c, u = s || l.disabled;
38
38
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
39
39
  /* @__PURE__ */ e.jsx("div", { className: "relative flex items-center mt-0.5", children: /* @__PURE__ */ e.jsx(
40
40
  "input",
41
41
  {
42
42
  ref: d,
43
43
  type: "checkbox",
44
- id: l,
44
+ id: i,
45
45
  disabled: u,
46
46
  className: x(
47
47
  pe(),
@@ -59,7 +59,7 @@ const fe = N("space-y-2", {
59
59
  /* @__PURE__ */ e.jsx(
60
60
  "label",
61
61
  {
62
- htmlFor: l,
62
+ htmlFor: i,
63
63
  className: me({
64
64
  disabled: u
65
65
  }),
@@ -80,7 +80,7 @@ const fe = N("space-y-2", {
80
80
  ] });
81
81
  });
82
82
  G.displayName = "CheckboxOption";
83
- const K = b.forwardRef(
83
+ const K = m.forwardRef(
84
84
  ({
85
85
  label: t,
86
86
  helperText: r,
@@ -89,25 +89,25 @@ const K = b.forwardRef(
89
89
  className: n,
90
90
  disabled: o,
91
91
  required: d,
92
- children: c,
93
- ...i
94
- }, l) => {
92
+ children: l,
93
+ ...c
94
+ }, i) => {
95
95
  const u = !!a, p = {
96
96
  disabled: o
97
97
  };
98
98
  return /* @__PURE__ */ e.jsx(q.Provider, { value: p, children: /* @__PURE__ */ e.jsxs(
99
99
  "fieldset",
100
100
  {
101
- ref: l,
101
+ ref: i,
102
102
  disabled: o,
103
103
  className: x("w-full border-0 p-0 m-0", n),
104
- ...i,
104
+ ...c,
105
105
  children: [
106
106
  t && /* @__PURE__ */ e.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3", children: [
107
107
  t,
108
108
  d && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
109
109
  ] }),
110
- /* @__PURE__ */ e.jsx("div", { className: fe({ direction: s }), children: c }),
110
+ /* @__PURE__ */ e.jsx("div", { className: fe({ direction: s }), children: l }),
111
111
  u && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
112
112
  !u && r && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: r })
113
113
  ]
@@ -118,14 +118,14 @@ const K = b.forwardRef(
118
118
  K.displayName = "CheckboxInput";
119
119
  const lt = Object.assign(K, {
120
120
  Option: G
121
- }), _ = E(null), be = () => {
122
- const t = F(_);
121
+ }), _ = F(null), be = () => {
122
+ const t = B(_);
123
123
  if (!t)
124
124
  throw new Error(
125
125
  "useChipSingleInputContext must be used within ChipSingleInputContext"
126
126
  );
127
127
  return t;
128
- }, ge = N(
128
+ }, ge = C(
129
129
  "inline-flex items-center justify-center rounded-full bg-white transition-colors duration-200 cursor-pointer border border-border hover:bg-primary-soft hover:border-primary-bold focus:border-primary-light data-[selected=true]:bg-primary data-[selected=true]:border-primary data-[selected=true]:text-white",
130
130
  {
131
131
  variants: {
@@ -139,9 +139,9 @@ const lt = Object.assign(K, {
139
139
  size: "md"
140
140
  }
141
141
  }
142
- ), xe = b.forwardRef(({ children: t, className: r, disabled: a, id: s, value: n, ...o }, d) => {
143
- const { size: c = "md", maxWidth: i, ...l } = be(), u = B(), p = s || u, f = a || l.disabled, m = l.readOnly, h = l.value === n, y = (g) => {
144
- !f && !m && l.onChange?.(n), o.onChange?.(g);
142
+ ), xe = m.forwardRef(({ children: t, className: r, disabled: a, id: s, value: n, ...o }, d) => {
143
+ const { size: l = "md", maxWidth: c, ...i } = be(), u = A(), p = s || u, f = a || i.disabled, h = i.readOnly, b = i.value === n, w = (g) => {
144
+ !f && !h && i.onChange?.(n), o.onChange?.(g);
145
145
  };
146
146
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
147
147
  /* @__PURE__ */ e.jsx(
@@ -150,12 +150,12 @@ const lt = Object.assign(K, {
150
150
  ref: d,
151
151
  type: "radio",
152
152
  id: p,
153
- name: l.name,
153
+ name: i.name,
154
154
  value: n,
155
- checked: h,
155
+ checked: b,
156
156
  disabled: f,
157
- readOnly: m,
158
- onChange: y,
157
+ readOnly: h,
158
+ onChange: w,
159
159
  className: "sr-only",
160
160
  ...o
161
161
  }
@@ -164,15 +164,15 @@ const lt = Object.assign(K, {
164
164
  "label",
165
165
  {
166
166
  htmlFor: p,
167
- "data-selected": h,
168
- style: i ? { maxWidth: i } : void 0,
167
+ "data-selected": b,
168
+ style: c ? { maxWidth: c } : void 0,
169
169
  className: x(
170
170
  ge({
171
- size: c
171
+ size: l
172
172
  }),
173
173
  f && "opacity-50 cursor-not-allowed pointer-events-none",
174
- m && "cursor-default pointer-events-none",
175
- i && "overflow-hidden",
174
+ h && "cursor-default pointer-events-none",
175
+ c && "overflow-hidden",
176
176
  r
177
177
  ),
178
178
  children: /* @__PURE__ */ e.jsx(
@@ -180,7 +180,7 @@ const lt = Object.assign(K, {
180
180
  {
181
181
  className: x(
182
182
  "flex items-center gap-2",
183
- i && "truncate min-w-0"
183
+ c && "truncate min-w-0"
184
184
  ),
185
185
  children: t
186
186
  }
@@ -188,7 +188,7 @@ const lt = Object.assign(K, {
188
188
  }
189
189
  )
190
190
  ] });
191
- }), ye = z(
191
+ }), ye = O(
192
192
  ({
193
193
  size: t = "md",
194
194
  label: r,
@@ -197,53 +197,53 @@ const lt = Object.assign(K, {
197
197
  error: n,
198
198
  className: o,
199
199
  disabled: d,
200
- readOnly: c,
201
- maxWidth: i,
202
- name: l,
200
+ readOnly: l,
201
+ maxWidth: c,
202
+ name: i,
203
203
  value: u,
204
204
  onChange: p,
205
205
  children: f,
206
- ...m
207
- }, h) => {
208
- const y = !!n, g = {
206
+ ...h
207
+ }, b) => {
208
+ const w = !!n, g = {
209
209
  size: t,
210
210
  disabled: d,
211
- readOnly: c,
212
- error: y,
213
- name: l,
211
+ readOnly: l,
212
+ error: w,
213
+ name: i,
214
214
  value: u,
215
- maxWidth: i,
215
+ maxWidth: c,
216
216
  onChange: p
217
217
  };
218
218
  return /* @__PURE__ */ e.jsx(_.Provider, { value: g, children: /* @__PURE__ */ e.jsxs(
219
219
  "fieldset",
220
220
  {
221
- ref: h,
221
+ ref: b,
222
222
  className: x("w-full border-0 p-0 m-0", o),
223
223
  disabled: d,
224
- ...m,
224
+ ...h,
225
225
  children: [
226
226
  r && /* @__PURE__ */ e.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
227
227
  r,
228
228
  a && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
229
229
  ] }),
230
230
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
231
- y && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
232
- !y && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
231
+ w && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
232
+ !w && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
233
233
  ]
234
234
  }
235
235
  ) });
236
236
  }
237
237
  ), dt = Object.assign(ye, {
238
238
  Option: xe
239
- }), H = E(null), we = () => {
240
- const t = F(H);
239
+ }), H = F(null), we = () => {
240
+ const t = B(H);
241
241
  if (!t)
242
242
  throw new Error(
243
243
  "useChipMultipleInputContext must be used within ChipMultipleInputContext"
244
244
  );
245
245
  return t;
246
- }, ve = N(
246
+ }, ve = C(
247
247
  "inline-flex items-center justify-center rounded-full bg-white transition-colors duration-200 cursor-pointer border border-border hover:bg-primary-soft hover:border-primary-bold focus:border-primary-light data-[selected=true]:bg-primary data-[selected=true]:border-primary data-[selected=true]:text-white",
248
248
  {
249
249
  variants: {
@@ -257,12 +257,12 @@ const lt = Object.assign(K, {
257
257
  size: "md"
258
258
  }
259
259
  }
260
- ), je = b.forwardRef(({ children: t, className: r, disabled: a, id: s, value: n, ...o }, d) => {
261
- const { size: c = "md", maxWidth: i, ...l } = we(), u = B(), p = s || u, f = a || l.disabled, m = l.readOnly, h = l.value?.includes(n) ?? !1, y = (g) => {
262
- if (!f && !m) {
263
- const j = l.value || [];
260
+ ), je = m.forwardRef(({ children: t, className: r, disabled: a, id: s, value: n, ...o }, d) => {
261
+ const { size: l = "md", maxWidth: c, ...i } = we(), u = A(), p = s || u, f = a || i.disabled, h = i.readOnly, b = i.value?.includes(n) ?? !1, w = (g) => {
262
+ if (!f && !h) {
263
+ const k = i.value || [];
264
264
  let v;
265
- h ? v = j.filter((V) => V !== n) : v = [...j, n], l.onChange?.(v);
265
+ b ? v = k.filter((N) => N !== n) : v = [...k, n], i.onChange?.(v);
266
266
  }
267
267
  o.onChange?.(g);
268
268
  };
@@ -273,12 +273,12 @@ const lt = Object.assign(K, {
273
273
  ref: d,
274
274
  type: "checkbox",
275
275
  id: p,
276
- name: `${l.name}[]`,
276
+ name: `${i.name}[]`,
277
277
  value: n,
278
- checked: h,
278
+ checked: b,
279
279
  disabled: f,
280
- readOnly: m,
281
- onChange: y,
280
+ readOnly: h,
281
+ onChange: w,
282
282
  className: "sr-only",
283
283
  ...o
284
284
  }
@@ -287,15 +287,15 @@ const lt = Object.assign(K, {
287
287
  "label",
288
288
  {
289
289
  htmlFor: p,
290
- "data-selected": h,
291
- style: i ? { maxWidth: i } : void 0,
290
+ "data-selected": b,
291
+ style: c ? { maxWidth: c } : void 0,
292
292
  className: x(
293
293
  ve({
294
- size: c
294
+ size: l
295
295
  }),
296
296
  f && "opacity-50 cursor-not-allowed pointer-events-none",
297
- m && "cursor-default pointer-events-none",
298
- i && "overflow-hidden",
297
+ h && "cursor-default pointer-events-none",
298
+ c && "overflow-hidden",
299
299
  r
300
300
  ),
301
301
  children: /* @__PURE__ */ e.jsx(
@@ -303,7 +303,7 @@ const lt = Object.assign(K, {
303
303
  {
304
304
  className: x(
305
305
  "flex items-center gap-2",
306
- i && "truncate min-w-0"
306
+ c && "truncate min-w-0"
307
307
  ),
308
308
  children: t
309
309
  }
@@ -311,7 +311,7 @@ const lt = Object.assign(K, {
311
311
  }
312
312
  )
313
313
  ] });
314
- }), ke = z(
314
+ }), ke = O(
315
315
  ({
316
316
  size: t = "md",
317
317
  label: r,
@@ -320,46 +320,46 @@ const lt = Object.assign(K, {
320
320
  error: n,
321
321
  className: o,
322
322
  disabled: d,
323
- readOnly: c,
324
- maxWidth: i,
325
- name: l,
323
+ readOnly: l,
324
+ maxWidth: c,
325
+ name: i,
326
326
  value: u = [],
327
327
  onChange: p,
328
328
  children: f,
329
- ...m
330
- }, h) => {
331
- const y = !!n, g = {
329
+ ...h
330
+ }, b) => {
331
+ const w = !!n, g = {
332
332
  size: t,
333
333
  disabled: d,
334
- readOnly: c,
335
- error: y,
336
- name: l,
334
+ readOnly: l,
335
+ error: w,
336
+ name: i,
337
337
  value: u,
338
- maxWidth: i,
338
+ maxWidth: c,
339
339
  onChange: p
340
340
  };
341
341
  return /* @__PURE__ */ e.jsx(H.Provider, { value: g, children: /* @__PURE__ */ e.jsxs(
342
342
  "fieldset",
343
343
  {
344
- ref: h,
344
+ ref: b,
345
345
  className: x("w-full border-0 p-0 m-0", o),
346
346
  disabled: d,
347
- ...m,
347
+ ...h,
348
348
  children: [
349
349
  r && /* @__PURE__ */ e.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
350
350
  r,
351
351
  a && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
352
352
  ] }),
353
353
  /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
354
- y && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
355
- !y && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
354
+ w && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
355
+ !w && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
356
356
  ]
357
357
  }
358
358
  ) });
359
359
  }
360
360
  ), ut = Object.assign(ke, {
361
361
  Option: je
362
- }), Ie = N(
362
+ }), Ie = C(
363
363
  "block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:bg-gray-50 text-left",
364
364
  {
365
365
  variants: {
@@ -373,7 +373,7 @@ const lt = Object.assign(K, {
373
373
  state: "default"
374
374
  }
375
375
  }
376
- ), J = b.forwardRef(
376
+ ), J = m.forwardRef(
377
377
  ({
378
378
  label: t,
379
379
  leftContent: r,
@@ -382,26 +382,27 @@ const lt = Object.assign(K, {
382
382
  error: n,
383
383
  className: o,
384
384
  disabled: d,
385
- id: c,
386
- required: i,
387
- value: l = "",
388
- placeholder: u = "",
389
- name: p,
390
- ...f
391
- }, m) => {
392
- const h = b.useId(), y = c || h, g = `${y}-helper`, j = `${y}-error`, v = !!n, V = l || u, R = b.useMemo(() => {
393
- const C = [];
394
- return v ? C.push(j) : s && C.push(g), C.length > 0 ? C.join(" ") : void 0;
395
- }, [v, s, j, g]);
385
+ id: l,
386
+ required: c,
387
+ value: i,
388
+ displayValue: u,
389
+ placeholder: p = "",
390
+ name: f,
391
+ ...h
392
+ }, b) => {
393
+ const w = m.useId(), g = l || w, k = `${g}-helper`, v = `${g}-error`, N = !!n, V = m.useMemo(() => u && u !== "" ? u : p, [u, p]), R = m.useMemo(() => i == null ? "" : typeof i == "string" || typeof i == "number" || typeof i == "boolean" ? String(i) : Array.isArray(i) || typeof i == "object" ? JSON.stringify(i) : String(i), [i]), S = u !== void 0 && u !== "", E = m.useMemo(() => {
394
+ const z = [];
395
+ return N ? z.push(v) : s && z.push(k), z.length > 0 ? z.join(" ") : void 0;
396
+ }, [N, s, v, k]);
396
397
  return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", o), children: [
397
398
  t && /* @__PURE__ */ e.jsxs(
398
399
  "label",
399
400
  {
400
- htmlFor: y,
401
+ htmlFor: g,
401
402
  className: "block text-sm font-medium text-foreground mb-2",
402
403
  children: [
403
404
  t,
404
- i && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
405
+ c && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
405
406
  ]
406
407
  }
407
408
  ),
@@ -418,24 +419,24 @@ const lt = Object.assign(K, {
418
419
  /* @__PURE__ */ e.jsx(
419
420
  "button",
420
421
  {
421
- ref: m,
422
- id: y,
422
+ ref: b,
423
+ id: g,
423
424
  type: "button",
424
425
  disabled: d,
425
- "aria-invalid": v || void 0,
426
- "aria-describedby": R,
427
- "aria-errormessage": v ? j : void 0,
428
- "aria-required": i || void 0,
426
+ "aria-invalid": N || void 0,
427
+ "aria-describedby": E,
428
+ "aria-errormessage": N ? v : void 0,
429
+ "aria-required": c || void 0,
429
430
  className: x(
430
431
  Ie({
431
- state: v ? "error" : "default"
432
+ state: N ? "error" : "default"
432
433
  }),
433
434
  r ? "pl-9" : "pl-3",
434
435
  a ? "pr-9" : "pr-3",
435
436
  "h-9",
436
- !l && "text-gray-400"
437
+ !S && "text-gray-400"
437
438
  ),
438
- ...f,
439
+ ...h,
439
440
  children: V
440
441
  }
441
442
  ),
@@ -448,28 +449,28 @@ const lt = Object.assign(K, {
448
449
  children: a
449
450
  }
450
451
  ),
451
- p && /* @__PURE__ */ e.jsx(
452
+ f && /* @__PURE__ */ e.jsx(
452
453
  "input",
453
454
  {
454
455
  type: "hidden",
455
- name: p,
456
- value: l,
456
+ name: f,
457
+ value: R,
457
458
  readOnly: !0,
458
459
  "data-testid": "hidden-input"
459
460
  }
460
461
  )
461
462
  ] }),
462
- v && /* @__PURE__ */ e.jsx(
463
+ N && /* @__PURE__ */ e.jsx(
463
464
  "div",
464
465
  {
465
- id: j,
466
+ id: v,
466
467
  className: "mt-1 text-sm text-danger",
467
468
  role: "alert",
468
469
  "aria-live": "polite",
469
470
  children: n
470
471
  }
471
472
  ),
472
- !v && s && /* @__PURE__ */ e.jsx("div", { id: g, className: "mt-1 text-sm text-gray-600", children: s })
473
+ !N && s && /* @__PURE__ */ e.jsx("div", { id: k, className: "mt-1 text-sm text-gray-600", children: s })
473
474
  ] });
474
475
  }
475
476
  );
@@ -483,24 +484,25 @@ function Ne(t) {
483
484
  day: "numeric"
484
485
  });
485
486
  }
486
- const ft = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...c }, i) {
487
- const l = T(null), u = (h) => {
488
- l.current = h, typeof i == "function" ? i(h) : i && typeof i == "object" && (i.current = h);
487
+ const ft = m.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...l }, c) {
488
+ const i = T(null), u = (b) => {
489
+ i.current = b, typeof c == "function" ? c(b) : c && typeof c == "object" && (c.current = b);
489
490
  }, p = () => {
490
- l.current && (typeof l.current.showPicker == "function" ? l.current.showPicker() : l.current.focus());
491
- }, f = (h) => {
492
- a(h.target.value);
493
- }, m = (n ?? Ne)(r);
491
+ i.current && (typeof i.current.showPicker == "function" ? i.current.showPicker() : i.current.focus());
492
+ }, f = (b) => {
493
+ a(b.target.value);
494
+ }, h = (n ?? Ne)(r);
494
495
  return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
495
496
  /* @__PURE__ */ e.jsx(
496
497
  J,
497
498
  {
498
499
  onClick: p,
499
- value: m,
500
+ value: r,
501
+ displayValue: h,
500
502
  label: s,
501
- leftContent: /* @__PURE__ */ e.jsx(P, { as: oe, color: "inherit", size: "sm" }),
503
+ leftContent: /* @__PURE__ */ e.jsx($, { as: oe, color: "inherit", size: "sm" }),
502
504
  "data-testid": "date-single-picker-visible-input",
503
- ...c
505
+ ...l
504
506
  }
505
507
  ),
506
508
  /* @__PURE__ */ e.jsx(
@@ -518,7 +520,7 @@ const ft = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
518
520
  }
519
521
  )
520
522
  ] });
521
- }), Ce = N(
523
+ }), Ce = C(
522
524
  "block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:bg-gray-50",
523
525
  {
524
526
  variants: {
@@ -532,7 +534,7 @@ const ft = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
532
534
  state: "default"
533
535
  }
534
536
  }
535
- ), $ = b.forwardRef(
537
+ ), M = m.forwardRef(
536
538
  ({
537
539
  label: t,
538
540
  leftContent: r,
@@ -541,24 +543,24 @@ const ft = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
541
543
  error: n,
542
544
  className: o,
543
545
  disabled: d,
544
- readOnly: c,
545
- id: i,
546
- required: l,
546
+ readOnly: l,
547
+ id: c,
548
+ required: i,
547
549
  ...u
548
550
  }, p) => {
549
- const f = b.useId(), m = i || f, h = `${m}-helper`, y = `${m}-error`, g = !!n, j = b.useMemo(() => {
551
+ const f = m.useId(), h = c || f, b = `${h}-helper`, w = `${h}-error`, g = !!n, k = m.useMemo(() => {
550
552
  const v = [];
551
- return g ? v.push(y) : s && v.push(h), v.length > 0 ? v.join(" ") : void 0;
552
- }, [g, s, y, h]);
553
+ return g ? v.push(w) : s && v.push(b), v.length > 0 ? v.join(" ") : void 0;
554
+ }, [g, s, w, b]);
553
555
  return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", o), children: [
554
556
  t && /* @__PURE__ */ e.jsxs(
555
557
  "label",
556
558
  {
557
- htmlFor: m,
559
+ htmlFor: h,
558
560
  className: "block text-sm font-medium text-foreground mb-2",
559
561
  children: [
560
562
  t,
561
- l && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
563
+ i && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
562
564
  ]
563
565
  }
564
566
  ),
@@ -576,16 +578,16 @@ const ft = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
576
578
  "input",
577
579
  {
578
580
  ref: p,
579
- id: m,
580
- required: l,
581
+ id: h,
582
+ required: i,
581
583
  disabled: d,
582
- readOnly: c,
584
+ readOnly: l,
583
585
  "aria-invalid": g,
584
- "aria-describedby": j,
585
- "aria-errormessage": g ? y : void 0,
586
+ "aria-describedby": k,
587
+ "aria-errormessage": g ? w : void 0,
586
588
  className: x(
587
589
  Ce({
588
- state: g ? "error" : c ? "readOnly" : "default"
590
+ state: g ? "error" : l ? "readOnly" : "default"
589
591
  }),
590
592
  r ? "pl-9" : "pl-3",
591
593
  a ? "pr-9" : "pr-3",
@@ -607,31 +609,31 @@ const ft = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
607
609
  g && /* @__PURE__ */ e.jsx(
608
610
  "div",
609
611
  {
610
- id: y,
612
+ id: w,
611
613
  className: "mt-1 text-sm text-danger",
612
614
  role: "alert",
613
615
  "aria-live": "polite",
614
616
  children: n
615
617
  }
616
618
  ),
617
- !g && s && /* @__PURE__ */ e.jsx("div", { id: h, className: "mt-1 text-sm text-gray-600", children: s })
619
+ !g && s && /* @__PURE__ */ e.jsx("div", { id: b, className: "mt-1 text-sm text-gray-600", children: s })
618
620
  ] });
619
621
  }
620
622
  );
621
- $.displayName = "TextInput";
622
- const pt = z(
623
+ M.displayName = "TextInput";
624
+ const pt = O(
623
625
  (t, r) => /* @__PURE__ */ e.jsx(
624
- $,
626
+ M,
625
627
  {
626
628
  ...t,
627
629
  ref: r,
628
630
  type: "email",
629
631
  autoComplete: "email",
630
632
  inputMode: "email",
631
- leftContent: /* @__PURE__ */ e.jsx(P, { as: ie, color: "inherit", size: "sm" })
633
+ leftContent: /* @__PURE__ */ e.jsx($, { as: ie, color: "inherit", size: "sm" })
632
634
  }
633
635
  )
634
- ), Ve = "w-9 h-9 text-center border border-primary/30 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Re = "w-9 h-9 text-center border border-danger rounded-md bg-danger/5 transition-colors focus:outline-none focus:ring-2 focus:ring-danger/20 focus:border-danger disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Se = (t) => /^\d$/.test(t), W = (t, r) => t?.replace(/\D/g, "").slice(0, r) || "", Q = b.forwardRef(
636
+ ), Re = "w-9 h-9 text-center border border-primary/30 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Ve = "w-9 h-9 text-center border border-danger rounded-md bg-danger/5 transition-colors focus:outline-none focus:ring-2 focus:ring-danger/20 focus:border-danger disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50 text-sm font-semibold text-foreground", Se = (t) => /^\d$/.test(t), W = (t, r) => t?.replace(/\D/g, "").slice(0, r) || "", Q = m.forwardRef(
635
637
  ({
636
638
  value: t,
637
639
  onChange: r,
@@ -640,23 +642,23 @@ const pt = z(
640
642
  onPaste: n,
641
643
  disabled: o,
642
644
  error: d,
643
- secure: c,
644
- inputRef: i,
645
- index: l,
645
+ secure: l,
646
+ inputRef: c,
647
+ index: i,
646
648
  id: u
647
649
  }, p) => /* @__PURE__ */ e.jsx(
648
650
  "input",
649
651
  {
650
- ref: i,
652
+ ref: c,
651
653
  id: u,
652
654
  type: "text",
653
655
  inputMode: "numeric",
654
- pattern: c ? void 0 : "[0-9]*",
656
+ pattern: l ? void 0 : "[0-9]*",
655
657
  maxLength: 1,
656
- value: c ? t ? "•" : "" : t,
658
+ value: l ? t ? "•" : "" : t,
657
659
  onChange: (f) => {
658
- const m = f.target.value;
659
- (m === "" || Se(m)) && r(m);
660
+ const h = f.target.value;
661
+ (h === "" || Se(h)) && r(h);
660
662
  },
661
663
  onKeyDown: a,
662
664
  onFocus: s,
@@ -664,14 +666,14 @@ const pt = z(
664
666
  disabled: o,
665
667
  "aria-invalid": d,
666
668
  "aria-disabled": o,
667
- className: d ? Re : Ve,
669
+ className: d ? Ve : Re,
668
670
  autoComplete: "one-time-code",
669
- "data-testid": `pin-input-${l}`
671
+ "data-testid": `pin-input-${i}`
670
672
  }
671
673
  )
672
674
  );
673
675
  Q.displayName = "PinInput";
674
- const De = b.forwardRef(
676
+ const De = m.forwardRef(
675
677
  ({
676
678
  label: t,
677
679
  helperText: r,
@@ -680,60 +682,60 @@ const De = b.forwardRef(
680
682
  value: n,
681
683
  onChange: o,
682
684
  onComplete: d,
683
- digits: c = 6,
684
- className: i,
685
- id: l,
685
+ digits: l = 6,
686
+ className: c,
687
+ id: i,
686
688
  name: u,
687
689
  required: p,
688
690
  secure: f = !1,
689
- ...m
690
- }, h) => {
691
- const y = b.useId(), g = l || y, j = !!a, v = b.useRef([]), V = W(n, c), R = V.split("").concat(Array(c - V.length).fill("")), C = b.useCallback(
692
- (k) => {
693
- const w = W(k, c);
694
- o(w), w.length === c && d?.(w);
691
+ ...h
692
+ }, b) => {
693
+ const w = m.useId(), g = i || w, k = !!a, v = m.useRef([]), N = W(n, l), V = N.split("").concat(Array(l - N.length).fill("")), R = m.useCallback(
694
+ (j) => {
695
+ const y = W(j, l);
696
+ o(y), y.length === l && d?.(y);
695
697
  },
696
- [o, d, c]
697
- ), D = b.useCallback(
698
- (k, w) => {
699
- const I = [...R];
700
- I[k] = w;
701
- const S = I.join("").replace(/\s+$/, "");
702
- C(S), w && k < c - 1 && v.current[k + 1]?.focus();
698
+ [o, d, l]
699
+ ), S = m.useCallback(
700
+ (j, y) => {
701
+ const I = [...V];
702
+ I[j] = y;
703
+ const D = I.join("").replace(/\s+$/, "");
704
+ R(D), y && j < l - 1 && v.current[j + 1]?.focus();
703
705
  },
704
- [R, C, c]
705
- ), M = b.useCallback(
706
- (k, w) => {
707
- if (w.key === "Backspace") {
708
- if (!R[k] && k > 0) {
709
- w.preventDefault();
710
- const I = [...R];
711
- I[k - 1] = "";
712
- const S = I.join("").replace(/\s+$/, "");
713
- C(S), v.current[k - 1]?.focus();
714
- } else if (R[k]) {
715
- w.preventDefault();
716
- const I = [...R];
717
- I[k] = "";
718
- const S = I.join("").replace(/\s+$/, "");
719
- C(S);
706
+ [V, R, l]
707
+ ), E = m.useCallback(
708
+ (j, y) => {
709
+ if (y.key === "Backspace") {
710
+ if (!V[j] && j > 0) {
711
+ y.preventDefault();
712
+ const I = [...V];
713
+ I[j - 1] = "";
714
+ const D = I.join("").replace(/\s+$/, "");
715
+ R(D), v.current[j - 1]?.focus();
716
+ } else if (V[j]) {
717
+ y.preventDefault();
718
+ const I = [...V];
719
+ I[j] = "";
720
+ const D = I.join("").replace(/\s+$/, "");
721
+ R(D);
720
722
  }
721
- } else w.key === "ArrowLeft" && k > 0 ? (w.preventDefault(), v.current[k - 1]?.focus()) : w.key === "ArrowRight" && k < c - 1 && (w.preventDefault(), v.current[k + 1]?.focus());
723
+ } else y.key === "ArrowLeft" && j > 0 ? (y.preventDefault(), v.current[j - 1]?.focus()) : y.key === "ArrowRight" && j < l - 1 && (y.preventDefault(), v.current[j + 1]?.focus());
722
724
  },
723
- [R, C, c]
724
- ), A = b.useCallback(
725
- (k) => {
726
- k.preventDefault();
727
- const w = k.clipboardData.getData("text"), I = W(w, c);
725
+ [V, R, l]
726
+ ), z = m.useCallback(
727
+ (j) => {
728
+ j.preventDefault();
729
+ const y = j.clipboardData.getData("text"), I = W(y, l);
728
730
  if (I.length > 0) {
729
- C(I);
730
- const S = Math.min(I.length, c - 1);
731
- v.current[S]?.focus();
731
+ R(I);
732
+ const D = Math.min(I.length, l - 1);
733
+ v.current[D]?.focus();
732
734
  }
733
735
  },
734
- [C, c]
736
+ [R, l]
735
737
  );
736
- return /* @__PURE__ */ e.jsxs("div", { ref: h, className: x("w-full", i), ...m, children: [
738
+ return /* @__PURE__ */ e.jsxs("div", { ref: b, className: x("w-full", c), ...h, children: [
737
739
  t && /* @__PURE__ */ e.jsxs(
738
740
  "label",
739
741
  {
@@ -751,28 +753,28 @@ const De = b.forwardRef(
751
753
  className: "flex gap-2 justify-center",
752
754
  role: "group",
753
755
  "aria-labelledby": t ? `${g}-label` : void 0,
754
- "aria-describedby": j ? `${g}-error` : r ? `${g}-helper` : void 0,
755
- children: R.map((k, w) => /* @__PURE__ */ e.jsx(
756
+ "aria-describedby": k ? `${g}-error` : r ? `${g}-helper` : void 0,
757
+ children: V.map((j, y) => /* @__PURE__ */ e.jsx(
756
758
  Q,
757
759
  {
758
- value: k,
759
- onChange: (I) => D(w, I),
760
- onKeyDown: (I) => M(w, I),
760
+ value: j,
761
+ onChange: (I) => S(y, I),
762
+ onKeyDown: (I) => E(y, I),
761
763
  onFocus: () => {
762
- const I = v.current[w];
764
+ const I = v.current[y];
763
765
  I && I.select();
764
766
  },
765
- onPaste: A,
767
+ onPaste: z,
766
768
  disabled: s,
767
- error: j,
769
+ error: k,
768
770
  secure: f,
769
771
  inputRef: (I) => {
770
- v.current[w] = I;
772
+ v.current[y] = I;
771
773
  },
772
- index: w,
773
- id: `${g}-${w}`
774
+ index: y,
775
+ id: `${g}-${y}`
774
776
  },
775
- w
777
+ y
776
778
  ))
777
779
  }
778
780
  ),
@@ -781,11 +783,11 @@ const De = b.forwardRef(
781
783
  {
782
784
  type: "hidden",
783
785
  name: u,
784
- value: V,
786
+ value: N,
785
787
  required: p
786
788
  }
787
789
  ),
788
- j && /* @__PURE__ */ e.jsx(
790
+ k && /* @__PURE__ */ e.jsx(
789
791
  "div",
790
792
  {
791
793
  id: `${g}-error`,
@@ -794,7 +796,7 @@ const De = b.forwardRef(
794
796
  children: a
795
797
  }
796
798
  ),
797
- !j && r && /* @__PURE__ */ e.jsx("div", { id: `${g}-helper`, className: "mt-2 text-sm text-gray-600", children: r })
799
+ !k && r && /* @__PURE__ */ e.jsx("div", { id: `${g}-helper`, className: "mt-2 text-sm text-gray-600", children: r })
798
800
  ] });
799
801
  }
800
802
  );
@@ -840,8 +842,8 @@ function U(t, r = !1) {
840
842
  let n = (a ? t.slice(1) : t).replace(/[^\d.,]/g, "");
841
843
  const o = n.lastIndexOf(",");
842
844
  if (o !== -1) {
843
- const d = n.slice(0, o).replace(/,/g, ""), c = n.slice(o + 1).replace(/,/g, "");
844
- n = d + "," + c;
845
+ const d = n.slice(0, o).replace(/,/g, ""), l = n.slice(o + 1).replace(/,/g, "");
846
+ n = d + "," + l;
845
847
  }
846
848
  return n = n.replace(/\.{2,}/g, "."), (a ? "-" : "") + n;
847
849
  }
@@ -853,36 +855,36 @@ const mt = ({
853
855
  label: n,
854
856
  helperText: o,
855
857
  error: d,
856
- ...c
858
+ ...l
857
859
  }) => {
858
- const i = T(null), [l, u] = se(
860
+ const c = T(null), [i, u] = se(
859
861
  t === "" ? "" : String(t)
860
862
  );
861
863
  ze(t, u);
862
864
  const p = (f) => {
863
- const m = f.target.value, h = U(m, a);
864
- Oe(h, a) ? (u(h), r(h)) : f.preventDefault();
865
+ const h = f.target.value, b = U(h, a);
866
+ Oe(b, a) ? (u(b), r(b)) : f.preventDefault();
865
867
  };
866
868
  return /* @__PURE__ */ e.jsx(
867
- $,
869
+ M,
868
870
  {
869
- ref: i,
871
+ ref: c,
870
872
  type: "text",
871
873
  label: n,
872
- value: l,
874
+ value: i,
873
875
  onChange: p,
874
876
  error: d,
875
877
  helperText: o,
876
- placeholder: c.placeholder,
877
- leftContent: /* @__PURE__ */ e.jsx(P, { as: ce, color: "inherit", size: "sm" }),
878
+ placeholder: l.placeholder,
879
+ leftContent: /* @__PURE__ */ e.jsx($, { as: ce, color: "inherit", size: "sm" }),
878
880
  inputMode: "numeric",
879
881
  autoComplete: "off",
880
882
  pattern: "[0-9.,-]*",
881
883
  ...s,
882
- ...c
884
+ ...l
883
885
  }
884
886
  );
885
- }, Ee = N("space-y-2", {
887
+ }, Ee = C("space-y-2", {
886
888
  variants: {
887
889
  direction: {
888
890
  vertical: "space-y-2 space-x-0",
@@ -892,7 +894,7 @@ const mt = ({
892
894
  defaultVariants: {
893
895
  direction: "vertical"
894
896
  }
895
- }), Fe = N(
897
+ }), Me = C(
896
898
  "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",
897
899
  {
898
900
  variants: {
@@ -930,7 +932,7 @@ const mt = ({
930
932
  size: "md"
931
933
  }
932
934
  }
933
- ), Be = N(
935
+ ), Fe = C(
934
936
  "text-foreground cursor-pointer select-none",
935
937
  {
936
938
  variants: {
@@ -949,39 +951,39 @@ const mt = ({
949
951
  disabled: !1
950
952
  }
951
953
  }
952
- ), X = E(
954
+ ), X = F(
953
955
  null
954
- ), Me = () => {
955
- const t = F(X);
956
+ ), Be = () => {
957
+ const t = B(X);
956
958
  if (!t)
957
959
  throw new Error(
958
960
  "useRadioInputContext must be used within RadioInputContext"
959
961
  );
960
962
  return t;
961
- }, Ae = b.forwardRef(
962
- ({ children: t, description: r, className: a, disabled: s, id: n, value: o, ...d }, c) => {
963
- const i = Me(), l = b.useId(), u = n || l, p = s || i.disabled, f = i.error ? "danger" : i.variant || "primary";
963
+ }, Ae = m.forwardRef(
964
+ ({ children: t, description: r, className: a, disabled: s, id: n, value: o, ...d }, l) => {
965
+ const c = Be(), i = m.useId(), u = n || i, p = s || c.disabled, f = c.error ? "danger" : c.variant || "primary";
964
966
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
965
967
  /* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
966
968
  "input",
967
969
  {
968
- ref: c,
970
+ ref: l,
969
971
  type: "radio",
970
972
  id: u,
971
- name: i.name,
973
+ name: c.name,
972
974
  value: o,
973
975
  disabled: p,
974
976
  className: x(
975
- Fe({
977
+ Me({
976
978
  variant: f,
977
- size: i.size
979
+ size: c.size
978
980
  }),
979
981
  // Custom radio dot styling using ::before - centered positioning with size variants
980
982
  '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',
981
983
  // Size-specific radio dot dimensions
982
- i.size === "sm" && "before:w-[6px] before:h-[6px]",
983
- i.size === "md" && "before:w-[8px] before:h-[8px]",
984
- i.size === "lg" && "before:w-[10px] before:h-[10px]",
984
+ c.size === "sm" && "before:w-[6px] before:h-[6px]",
985
+ c.size === "md" && "before:w-[8px] before:h-[8px]",
986
+ c.size === "lg" && "before:w-[10px] before:h-[10px]",
985
987
  "checked:before:opacity-100",
986
988
  // Outline variants use colored radio dot
987
989
  f?.includes("outline") && "checked:before:bg-current",
@@ -995,8 +997,8 @@ const mt = ({
995
997
  "label",
996
998
  {
997
999
  htmlFor: u,
998
- className: Be({
999
- size: i.size,
1000
+ className: Fe({
1001
+ size: c.size,
1000
1002
  disabled: p
1001
1003
  }),
1002
1004
  children: t
@@ -1007,9 +1009,9 @@ const mt = ({
1007
1009
  {
1008
1010
  className: x(
1009
1011
  "text-gray-600 mt-1",
1010
- i.size === "sm" && "text-xs",
1011
- i.size === "md" && "text-xs",
1012
- i.size === "lg" && "text-sm",
1012
+ c.size === "sm" && "text-xs",
1013
+ c.size === "md" && "text-xs",
1014
+ c.size === "lg" && "text-sm",
1013
1015
  p && "opacity-50"
1014
1016
  ),
1015
1017
  children: r
@@ -1018,7 +1020,7 @@ const mt = ({
1018
1020
  ] })
1019
1021
  ] });
1020
1022
  }
1021
- ), We = b.forwardRef(
1023
+ ), We = m.forwardRef(
1022
1024
  ({
1023
1025
  variant: t = "primary",
1024
1026
  size: r = "md",
@@ -1027,28 +1029,28 @@ const mt = ({
1027
1029
  error: n,
1028
1030
  direction: o = "vertical",
1029
1031
  className: d,
1030
- disabled: c,
1031
- name: i,
1032
- children: l,
1032
+ disabled: l,
1033
+ name: c,
1034
+ children: i,
1033
1035
  ...u
1034
1036
  }, p) => {
1035
- const f = !!n, m = {
1037
+ const f = !!n, h = {
1036
1038
  variant: t,
1037
1039
  size: r,
1038
- disabled: c,
1040
+ disabled: l,
1039
1041
  error: f,
1040
- name: i
1042
+ name: c
1041
1043
  };
1042
- return /* @__PURE__ */ e.jsx(X.Provider, { value: m, children: /* @__PURE__ */ e.jsxs("div", { ref: p, className: x("w-full", d), ...u, children: [
1044
+ return /* @__PURE__ */ e.jsx(X.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: p, className: x("w-full", d), ...u, children: [
1043
1045
  a && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: a }),
1044
- /* @__PURE__ */ e.jsx("div", { className: Ee({ direction: o }), children: l }),
1046
+ /* @__PURE__ */ e.jsx("div", { className: Ee({ direction: o }), children: i }),
1045
1047
  f && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
1046
1048
  !f && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
1047
1049
  ] }) });
1048
1050
  }
1049
1051
  ), ht = Object.assign(We, {
1050
1052
  Option: Ae
1051
- }), bt = z(
1053
+ }), bt = O(
1052
1054
  ({
1053
1055
  autoComplete: t = "off",
1054
1056
  spellCheck: r = !1,
@@ -1058,11 +1060,11 @@ const mt = ({
1058
1060
  enterKeyHint: o = "search",
1059
1061
  "aria-label": d = "Search",
1060
1062
  // internal default, not in props
1061
- ...c
1062
- }, i) => /* @__PURE__ */ e.jsx(
1063
- $,
1063
+ ...l
1064
+ }, c) => /* @__PURE__ */ e.jsx(
1065
+ M,
1064
1066
  {
1065
- ref: i,
1067
+ ref: c,
1066
1068
  type: "search",
1067
1069
  inputMode: a,
1068
1070
  autoComplete: t,
@@ -1071,11 +1073,11 @@ const mt = ({
1071
1073
  maxLength: n,
1072
1074
  enterKeyHint: o,
1073
1075
  "aria-label": d,
1074
- leftContent: /* @__PURE__ */ e.jsx(P, { as: le, color: "inherit", size: "sm" }),
1075
- ...c
1076
+ leftContent: /* @__PURE__ */ e.jsx($, { as: le, color: "inherit", size: "sm" }),
1077
+ ...l
1076
1078
  }
1077
1079
  )
1078
- ), Le = N(
1080
+ ), Le = C(
1079
1081
  "block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:bg-gray-50 appearance-none bg-no-repeat bg-right pr-10",
1080
1082
  {
1081
1083
  variants: {
@@ -1089,11 +1091,11 @@ const mt = ({
1089
1091
  state: "default"
1090
1092
  }
1091
1093
  }
1092
- ), Y = b.forwardRef(({ value: t, children: r, ...a }, s) => /* @__PURE__ */ e.jsx("option", { ref: s, value: t, ...a, children: r }));
1094
+ ), Y = m.forwardRef(({ value: t, children: r, ...a }, s) => /* @__PURE__ */ e.jsx("option", { ref: s, value: t, ...a, children: r }));
1093
1095
  Y.displayName = "SelectOption";
1094
- const Z = b.forwardRef(({ label: t, children: r, ...a }, s) => /* @__PURE__ */ e.jsx("optgroup", { ref: s, label: t, ...a, children: r }));
1096
+ const Z = m.forwardRef(({ label: t, children: r, ...a }, s) => /* @__PURE__ */ e.jsx("optgroup", { ref: s, label: t, ...a, children: r }));
1095
1097
  Z.displayName = "SelectOptionGroup";
1096
- const ee = b.forwardRef(
1098
+ const ee = m.forwardRef(
1097
1099
  ({
1098
1100
  label: t,
1099
1101
  helperText: r,
@@ -1102,25 +1104,25 @@ const ee = b.forwardRef(
1102
1104
  disabled: n,
1103
1105
  readOnly: o,
1104
1106
  id: d,
1105
- required: c,
1106
- placeholder: i,
1107
- children: l,
1107
+ required: l,
1108
+ placeholder: c,
1109
+ children: i,
1108
1110
  onChange: u,
1109
1111
  ...p
1110
1112
  }, f) => {
1111
- const m = b.useId(), h = d || m, y = `${h}-helper`, g = `${h}-error`, j = !!a, v = b.useMemo(() => {
1112
- const V = [];
1113
- return j ? V.push(g) : r && V.push(y), V.length > 0 ? V.join(" ") : void 0;
1114
- }, [j, r, g, y]);
1113
+ const h = m.useId(), b = d || h, w = `${b}-helper`, g = `${b}-error`, k = !!a, v = m.useMemo(() => {
1114
+ const N = [];
1115
+ return k ? N.push(g) : r && N.push(w), N.length > 0 ? N.join(" ") : void 0;
1116
+ }, [k, r, g, w]);
1115
1117
  return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", s), children: [
1116
1118
  t && /* @__PURE__ */ e.jsxs(
1117
1119
  "label",
1118
1120
  {
1119
- htmlFor: h,
1121
+ htmlFor: b,
1120
1122
  className: "block text-sm font-medium text-foreground mb-2",
1121
1123
  children: [
1122
1124
  t,
1123
- c && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1125
+ l && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1124
1126
  ]
1125
1127
  }
1126
1128
  ),
@@ -1129,23 +1131,23 @@ const ee = b.forwardRef(
1129
1131
  "select",
1130
1132
  {
1131
1133
  ref: f,
1132
- id: h,
1133
- required: c,
1134
+ id: b,
1135
+ required: l,
1134
1136
  disabled: n || o,
1135
- "aria-invalid": j,
1137
+ "aria-invalid": k,
1136
1138
  "aria-describedby": v,
1137
- "aria-errormessage": j ? g : void 0,
1139
+ "aria-errormessage": k ? g : void 0,
1138
1140
  onChange: u,
1139
1141
  className: x(
1140
1142
  Le({
1141
- state: j ? "error" : o ? "readOnly" : "default"
1143
+ state: k ? "error" : o ? "readOnly" : "default"
1142
1144
  }),
1143
1145
  "h-9 pl-3"
1144
1146
  ),
1145
1147
  ...p,
1146
1148
  children: [
1147
- i && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: i }),
1148
- l
1149
+ c && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: c }),
1150
+ i
1149
1151
  ]
1150
1152
  }
1151
1153
  ),
@@ -1155,11 +1157,11 @@ const ee = b.forwardRef(
1155
1157
  className: x(
1156
1158
  "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-transform duration-200"
1157
1159
  ),
1158
- children: /* @__PURE__ */ e.jsx(P, { as: de, size: "sm", color: "gray", "aria-hidden": "true" })
1160
+ children: /* @__PURE__ */ e.jsx($, { as: de, size: "sm", color: "gray", "aria-hidden": "true" })
1159
1161
  }
1160
1162
  )
1161
1163
  ] }),
1162
- j && /* @__PURE__ */ e.jsx(
1164
+ k && /* @__PURE__ */ e.jsx(
1163
1165
  "div",
1164
1166
  {
1165
1167
  id: g,
@@ -1169,7 +1171,7 @@ const ee = b.forwardRef(
1169
1171
  children: a
1170
1172
  }
1171
1173
  ),
1172
- !j && r && /* @__PURE__ */ e.jsx("div", { id: y, className: "mt-1 text-sm text-gray-600", children: r })
1174
+ !k && r && /* @__PURE__ */ e.jsx("div", { id: w, className: "mt-1 text-sm text-gray-600", children: r })
1173
1175
  ] });
1174
1176
  }
1175
1177
  );
@@ -1177,7 +1179,7 @@ ee.displayName = "SelectInput";
1177
1179
  const gt = Object.assign(ee, {
1178
1180
  Option: Y,
1179
1181
  OptionGroup: Z
1180
- }), Te = N(
1182
+ }), Te = C(
1181
1183
  "flex gap-3 cursor-pointer border-b border-border select-none transition-colors",
1182
1184
  {
1183
1185
  variants: {
@@ -1206,7 +1208,7 @@ const gt = Object.assign(ee, {
1206
1208
  hideCheckbox: !1
1207
1209
  }
1208
1210
  }
1209
- ), qe = N(
1211
+ ), qe = C(
1210
1212
  "relative h-6 w-6 rounded border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 appearance-none bg-white border-primary/40 checked:bg-primary checked:border-primary focus:ring-primary/20",
1211
1213
  {
1212
1214
  variants: {
@@ -1224,7 +1226,7 @@ const gt = Object.assign(ee, {
1224
1226
  disabled: !1
1225
1227
  }
1226
1228
  }
1227
- ), Ge = z(
1229
+ ), Ge = O(
1228
1230
  ({
1229
1231
  value: t,
1230
1232
  children: r,
@@ -1233,10 +1235,10 @@ const gt = Object.assign(ee, {
1233
1235
  className: n,
1234
1236
  disabled: o,
1235
1237
  checkboxPlacement: d = "center",
1236
- hideCheckbox: c = !1,
1237
- ...i
1238
- }, l) => {
1239
- const u = B(), p = s || u, f = typeof r == "function" ? r(a) : r;
1238
+ hideCheckbox: l = !1,
1239
+ ...c
1240
+ }, i) => {
1241
+ const u = A(), p = s || u, f = typeof r == "function" ? r(a) : r;
1240
1242
  return /* @__PURE__ */ e.jsxs(
1241
1243
  "label",
1242
1244
  {
@@ -1246,7 +1248,7 @@ const gt = Object.assign(ee, {
1246
1248
  checked: !!a,
1247
1249
  disabled: !!o,
1248
1250
  checkboxPlacement: d,
1249
- hideCheckbox: c
1251
+ hideCheckbox: l
1250
1252
  }),
1251
1253
  n
1252
1254
  ),
@@ -1258,7 +1260,7 @@ const gt = Object.assign(ee, {
1258
1260
  /* @__PURE__ */ e.jsx(
1259
1261
  "input",
1260
1262
  {
1261
- ref: l,
1263
+ ref: i,
1262
1264
  id: p,
1263
1265
  type: "radio",
1264
1266
  value: t,
@@ -1267,10 +1269,10 @@ const gt = Object.assign(ee, {
1267
1269
  className: "sr-only",
1268
1270
  "aria-hidden": !0,
1269
1271
  "aria-checked": a,
1270
- ...i
1272
+ ...c
1271
1273
  }
1272
1274
  ),
1273
- !c && /* @__PURE__ */ e.jsx(
1275
+ !l && /* @__PURE__ */ e.jsx(
1274
1276
  "span",
1275
1277
  {
1276
1278
  className: x(
@@ -1294,7 +1296,7 @@ const gt = Object.assign(ee, {
1294
1296
  }
1295
1297
  );
1296
1298
  Ge.displayName = "SelectableSingleInput";
1297
- const Ke = N(
1299
+ const Ke = C(
1298
1300
  "flex gap-3 cursor-pointer border-b border-border select-none transition-colors",
1299
1301
  {
1300
1302
  variants: {
@@ -1323,7 +1325,7 @@ const Ke = N(
1323
1325
  hideCheckbox: !1
1324
1326
  }
1325
1327
  }
1326
- ), _e = N(
1328
+ ), _e = C(
1327
1329
  "relative h-6 w-6 rounded border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 appearance-none bg-white border-primary/40 checked:bg-primary checked:border-primary focus:ring-primary/20",
1328
1330
  {
1329
1331
  variants: {
@@ -1341,7 +1343,7 @@ const Ke = N(
1341
1343
  disabled: !1
1342
1344
  }
1343
1345
  }
1344
- ), He = z(
1346
+ ), He = O(
1345
1347
  ({
1346
1348
  value: t,
1347
1349
  children: r,
@@ -1350,10 +1352,10 @@ const Ke = N(
1350
1352
  className: n,
1351
1353
  disabled: o,
1352
1354
  checkboxPlacement: d = "center",
1353
- hideCheckbox: c = !1,
1354
- ...i
1355
- }, l) => {
1356
- const u = B(), p = s || u, f = typeof r == "function" ? r(a) : r;
1355
+ hideCheckbox: l = !1,
1356
+ ...c
1357
+ }, i) => {
1358
+ const u = A(), p = s || u, f = typeof r == "function" ? r(a) : r;
1357
1359
  return /* @__PURE__ */ e.jsxs(
1358
1360
  "label",
1359
1361
  {
@@ -1363,7 +1365,7 @@ const Ke = N(
1363
1365
  checked: !!a,
1364
1366
  disabled: !!o,
1365
1367
  checkboxPlacement: d,
1366
- hideCheckbox: c
1368
+ hideCheckbox: l
1367
1369
  }),
1368
1370
  n
1369
1371
  ),
@@ -1375,7 +1377,7 @@ const Ke = N(
1375
1377
  /* @__PURE__ */ e.jsx(
1376
1378
  "input",
1377
1379
  {
1378
- ref: l,
1380
+ ref: i,
1379
1381
  id: p,
1380
1382
  type: "checkbox",
1381
1383
  value: t,
@@ -1384,10 +1386,10 @@ const Ke = N(
1384
1386
  className: "sr-only",
1385
1387
  "aria-hidden": !0,
1386
1388
  "aria-checked": a,
1387
- ...i
1389
+ ...c
1388
1390
  }
1389
1391
  ),
1390
- !c && /* @__PURE__ */ e.jsx(
1392
+ !l && /* @__PURE__ */ e.jsx(
1391
1393
  "span",
1392
1394
  {
1393
1395
  className: x(
@@ -1411,7 +1413,7 @@ const Ke = N(
1411
1413
  }
1412
1414
  );
1413
1415
  He.displayName = "SelectableMultipleInput";
1414
- const Je = N(
1416
+ const Je = C(
1415
1417
  "relative inline-flex items-center h-5 w-10 rounded-full transition-colors duration-200 border border-transparent",
1416
1418
  {
1417
1419
  variants: {
@@ -1429,7 +1431,7 @@ const Je = N(
1429
1431
  checked: !1
1430
1432
  }
1431
1433
  }
1432
- ), Qe = N(
1434
+ ), Qe = C(
1433
1435
  "absolute h-4 w-4 rounded-full transition-transform duration-200",
1434
1436
  {
1435
1437
  variants: {
@@ -1465,7 +1467,7 @@ const Je = N(
1465
1467
  s && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1466
1468
  ]
1467
1469
  }
1468
- ) : null, Ze = b.forwardRef(
1470
+ ) : null, Ze = m.forwardRef(
1469
1471
  ({
1470
1472
  value: t,
1471
1473
  onChange: r,
@@ -1474,29 +1476,29 @@ const Je = N(
1474
1476
  required: n = !1,
1475
1477
  className: o,
1476
1478
  id: d,
1477
- ariaLabel: c,
1478
- ...i
1479
- }, l) => {
1480
- const u = b.useId(), p = d || u, f = t ?? !1, m = (h) => {
1481
- r?.(h.target.checked);
1479
+ ariaLabel: l,
1480
+ ...c
1481
+ }, i) => {
1482
+ const u = m.useId(), p = d || u, f = t ?? !1, h = (b) => {
1483
+ r?.(b.target.checked);
1482
1484
  };
1483
1485
  return /* @__PURE__ */ e.jsxs("div", { className: x("inline-flex items-center gap-2", o), children: [
1484
1486
  /* @__PURE__ */ e.jsxs("span", { className: "relative inline-flex items-center", children: [
1485
1487
  /* @__PURE__ */ e.jsx(
1486
1488
  "input",
1487
1489
  {
1488
- ref: l,
1490
+ ref: i,
1489
1491
  type: "checkbox",
1490
1492
  role: "switch",
1491
1493
  id: p,
1492
- "aria-label": c || a,
1494
+ "aria-label": l || a,
1493
1495
  "aria-checked": f,
1494
1496
  checked: f,
1495
1497
  disabled: s,
1496
1498
  required: n,
1497
- onChange: m,
1499
+ onChange: h,
1498
1500
  className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10 disabled:cursor-not-allowed",
1499
- ...i
1501
+ ...c
1500
1502
  }
1501
1503
  ),
1502
1504
  /* @__PURE__ */ e.jsx(Ue, { disabled: s, checked: f }),
@@ -1515,22 +1517,21 @@ const Je = N(
1515
1517
  }
1516
1518
  );
1517
1519
  Ze.displayName = "SwitchInput";
1518
- const et = N(
1519
- "block w-full rounded-md border bg-white text-foreground transition-colors focus:outline-none overflow-y-auto whitespace-pre-wrap break-words",
1520
+ const et = C(
1521
+ "block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:bg-gray-50 overflow-y-auto whitespace-pre-wrap break-words",
1520
1522
  {
1521
1523
  variants: {
1522
1524
  state: {
1523
- default: "border-primary/30 focus:ring-2 focus:ring-primary/20 focus:border-primary",
1524
- error: "border-danger bg-danger/5 focus:ring-2 focus:border-danger focus:ring-danger/20",
1525
- disabled: "opacity-50 pointer-events-none bg-gray-50 border-gray-300 cursor-not-allowed",
1526
- readOnly: "bg-gray-50 cursor-default focus:ring-0 border-gray-300 focus:border-gray-300"
1525
+ default: "border-primary/30 text-foreground focus:border-primary focus:ring-primary/20",
1526
+ error: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
1527
+ readOnly: "border-gray-300 bg-gray-50 text-foreground cursor-default focus:ring-0 focus:border-gray-300"
1527
1528
  }
1528
1529
  },
1529
1530
  defaultVariants: {
1530
1531
  state: "default"
1531
1532
  }
1532
1533
  }
1533
- ), tt = (t, r, a) => t ? "disabled" : r ? "readOnly" : a ? "error" : "default", rt = (t, r, a) => {
1534
+ ), tt = (t, r) => t ? "readOnly" : r ? "error" : "default", rt = (t, r, a) => {
1534
1535
  if (r || a) {
1535
1536
  t.preventDefault();
1536
1537
  return;
@@ -1541,9 +1542,9 @@ const et = N(
1541
1542
  n.deleteFromDocument();
1542
1543
  const o = n.getRangeAt(0), d = document.createTextNode(s);
1543
1544
  o.insertNode(d), o.setStartAfter(d), o.setEndAfter(d), n.removeAllRanges(), n.addRange(o);
1544
- const c = new Event("input", { bubbles: !0 });
1545
- t.currentTarget.dispatchEvent(c);
1546
- }, at = b.forwardRef(
1545
+ const l = new Event("input", { bubbles: !0 });
1546
+ t.currentTarget.dispatchEvent(l);
1547
+ }, at = m.forwardRef(
1547
1548
  ({
1548
1549
  label: t,
1549
1550
  helperText: r,
@@ -1552,94 +1553,94 @@ const et = N(
1552
1553
  disabled: n,
1553
1554
  readOnly: o,
1554
1555
  id: d,
1555
- value: c,
1556
- defaultValue: i,
1557
- onChange: l,
1556
+ value: l,
1557
+ defaultValue: c,
1558
+ onChange: i,
1558
1559
  placeholder: u,
1559
1560
  name: p,
1560
1561
  row: f = 3,
1561
- required: m,
1562
- onBlur: h,
1563
- onFocus: y,
1562
+ required: h,
1563
+ onBlur: b,
1564
+ onFocus: w,
1564
1565
  onKeyDown: g,
1565
- ...j
1566
+ ...k
1566
1567
  }, v) => {
1567
- const V = b.useId(), R = d || V, C = !!a, D = b.useRef(null), [M, A] = b.useState(i || ""), k = c !== void 0, w = k ? c : M;
1568
- b.useImperativeHandle(v, () => D.current), b.useEffect(() => {
1569
- D.current && D.current.textContent !== w && (D.current.textContent = w);
1570
- }, [w]);
1571
- const I = tt(n, o, C), S = !w && u, te = (O) => {
1572
- const L = O.currentTarget.textContent || "";
1573
- k || A(L), l?.(L);
1574
- }, re = (O) => {
1568
+ const N = m.useId(), V = d || N, R = !!a, S = m.useRef(null), [E, z] = m.useState(c || ""), j = l !== void 0, y = j ? l : E;
1569
+ m.useImperativeHandle(v, () => S.current), m.useEffect(() => {
1570
+ S.current && S.current.textContent !== y && (S.current.textContent = y);
1571
+ }, [y]);
1572
+ const I = tt(o, R), D = !y && u, te = (P) => {
1573
+ const L = P.currentTarget.textContent || "";
1574
+ j || z(L), i?.(L);
1575
+ }, re = (P) => {
1575
1576
  if (n || o) {
1576
- O.preventDefault();
1577
+ P.preventDefault();
1577
1578
  return;
1578
1579
  }
1579
- g?.(O);
1580
+ g?.(P);
1580
1581
  }, ae = () => {
1581
- D.current?.focus();
1582
+ S.current?.focus();
1582
1583
  };
1583
1584
  return /* @__PURE__ */ e.jsxs("div", { children: [
1584
1585
  t && /* @__PURE__ */ e.jsxs(
1585
1586
  "label",
1586
1587
  {
1587
- htmlFor: R,
1588
+ htmlFor: V,
1588
1589
  className: "block text-sm font-medium text-foreground mb-2 cursor-pointer",
1589
1590
  onClick: ae,
1590
1591
  children: [
1591
1592
  t,
1592
- m && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1593
+ h && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1593
1594
  ]
1594
1595
  }
1595
1596
  ),
1596
1597
  /* @__PURE__ */ e.jsx("div", { className: x("relative w-full", s), children: /* @__PURE__ */ e.jsx(
1597
1598
  "div",
1598
1599
  {
1599
- ref: D,
1600
- id: R,
1600
+ ref: S,
1601
+ id: V,
1601
1602
  role: "textbox",
1602
1603
  "aria-multiline": "true",
1603
- "aria-invalid": C,
1604
+ "aria-invalid": R,
1604
1605
  "aria-disabled": n,
1605
1606
  "aria-readonly": o,
1606
- "aria-required": m,
1607
+ "aria-required": h,
1607
1608
  "aria-label": typeof t == "string" ? t : void 0,
1608
1609
  contentEditable: !n && !o,
1609
1610
  "data-name": p,
1610
1611
  onInput: te,
1611
1612
  onKeyDown: re,
1612
- onPaste: (O) => rt(O, n, o),
1613
- onBlur: h,
1614
- onFocus: y,
1613
+ onPaste: (P) => rt(P, n, o),
1614
+ onBlur: b,
1615
+ onFocus: w,
1615
1616
  suppressContentEditableWarning: !0,
1616
1617
  style: { minHeight: `${f * 1.5 + 1}rem` },
1617
1618
  className: x(
1618
1619
  et({ state: I }),
1619
1620
  "px-3 py-2",
1620
- S && "empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400"
1621
+ D && "empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400"
1621
1622
  ),
1622
1623
  "data-placeholder": u,
1623
- ...j
1624
+ ...k
1624
1625
  }
1625
1626
  ) }),
1626
- C && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: a }),
1627
- !C && r && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: r })
1627
+ R && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: a }),
1628
+ !R && r && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: r })
1628
1629
  ] });
1629
1630
  }
1630
1631
  );
1631
1632
  at.displayName = "TextAreaInput";
1632
- const xt = z(function(r, a) {
1633
+ const xt = O(function(r, a) {
1633
1634
  const s = (n) => {
1634
1635
  r?.onChange?.(n.target.value);
1635
1636
  };
1636
1637
  return /* @__PURE__ */ e.jsx(
1637
- $,
1638
+ M,
1638
1639
  {
1639
1640
  type: "time",
1640
1641
  tabIndex: 0,
1641
1642
  "aria-hidden": "true",
1642
- leftContent: /* @__PURE__ */ e.jsx(P, { as: ue, color: "inherit", size: "sm" }),
1643
+ leftContent: /* @__PURE__ */ e.jsx($, { as: ue, color: "inherit", size: "sm" }),
1643
1644
  ref: a,
1644
1645
  ...r,
1645
1646
  onChange: s
@@ -1653,7 +1654,7 @@ export {
1653
1654
  De as P,
1654
1655
  ht as R,
1655
1656
  bt as S,
1656
- $ as T,
1657
+ M as T,
1657
1658
  dt as a,
1658
1659
  ut as b,
1659
1660
  mt as c,