@dimasbaguspm/versaur 0.0.52 → 0.0.54

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 t, a as y } from "./index-DOdDlCoL.js";
2
- import b, { createContext as E, useContext as F, useId as M, forwardRef as P, useRef as T, useEffect as ae, useState as ne } from "react";
3
- import { I as O } from "./image-rectangle-K9jmTTED.js";
4
- import { Calendar as se, MailIcon as oe, Banknote as ie, SearchIcon as ce, ChevronDown as le, Clock as de } from "lucide-react";
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";
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 ue = N("space-y-2", {
6
+ const fe = N("space-y-2", {
7
7
  variants: {
8
8
  direction: {
9
9
  vertical: "space-y-2 space-x-0",
@@ -13,9 +13,9 @@ const ue = N("space-y-2", {
13
13
  defaultVariants: {
14
14
  direction: "vertical"
15
15
  }
16
- }), fe = N(
16
+ }), pe = N(
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
- ), pe = N(
18
+ ), me = N(
19
19
  "text-sm text-foreground cursor-pointer select-none",
20
20
  {
21
21
  variants: {
@@ -28,23 +28,23 @@ const ue = N("space-y-2", {
28
28
  disabled: !1
29
29
  }
30
30
  }
31
- ), G = E(null), me = () => {
32
- const e = F(G);
33
- if (!e)
31
+ ), q = E(null), he = () => {
32
+ const t = F(q);
33
+ if (!t)
34
34
  throw new Error("CheckboxOption must be used within CheckboxInput");
35
- return e;
36
- }, q = b.forwardRef(({ children: e, description: r, className: a, disabled: s, id: n, ...o }, d) => {
37
- const i = me(), c = b.useId(), l = n || c, u = s || i.disabled;
38
- return /* @__PURE__ */ t.jsxs("div", { className: "flex items-start gap-2", children: [
39
- /* @__PURE__ */ t.jsx("div", { className: "relative flex items-center mt-0.5", children: /* @__PURE__ */ t.jsx(
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;
38
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
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
44
  id: l,
45
45
  disabled: u,
46
- className: y(
47
- fe(),
46
+ className: x(
47
+ pe(),
48
48
  // Custom checkmark styling using ::after - centered positioning
49
49
  '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',
50
50
  // Checkmark dimensions for md size (default)
@@ -55,21 +55,21 @@ const ue = N("space-y-2", {
55
55
  ...o
56
56
  }
57
57
  ) }),
58
- /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
59
- /* @__PURE__ */ t.jsx(
58
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
59
+ /* @__PURE__ */ e.jsx(
60
60
  "label",
61
61
  {
62
62
  htmlFor: l,
63
- className: pe({
63
+ className: me({
64
64
  disabled: u
65
65
  }),
66
- children: e
66
+ children: t
67
67
  }
68
68
  ),
69
- r && /* @__PURE__ */ t.jsx(
69
+ r && /* @__PURE__ */ e.jsx(
70
70
  "div",
71
71
  {
72
- className: y(
72
+ className: x(
73
73
  "text-xs text-gray-600 mt-1",
74
74
  u && "opacity-50"
75
75
  ),
@@ -79,53 +79,53 @@ const ue = N("space-y-2", {
79
79
  ] })
80
80
  ] });
81
81
  });
82
- q.displayName = "CheckboxOption";
82
+ G.displayName = "CheckboxOption";
83
83
  const K = b.forwardRef(
84
84
  ({
85
- label: e,
85
+ label: t,
86
86
  helperText: r,
87
87
  error: a,
88
88
  direction: s = "vertical",
89
89
  className: n,
90
90
  disabled: o,
91
91
  required: d,
92
- children: i,
93
- ...c
92
+ children: c,
93
+ ...i
94
94
  }, l) => {
95
95
  const u = !!a, p = {
96
96
  disabled: o
97
97
  };
98
- return /* @__PURE__ */ t.jsx(G.Provider, { value: p, children: /* @__PURE__ */ t.jsxs(
98
+ return /* @__PURE__ */ e.jsx(q.Provider, { value: p, children: /* @__PURE__ */ e.jsxs(
99
99
  "fieldset",
100
100
  {
101
101
  ref: l,
102
102
  disabled: o,
103
- className: y("w-full border-0 p-0 m-0", n),
104
- ...c,
103
+ className: x("w-full border-0 p-0 m-0", n),
104
+ ...i,
105
105
  children: [
106
- e && /* @__PURE__ */ t.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3", children: [
107
- e,
108
- d && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
106
+ t && /* @__PURE__ */ e.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3", children: [
107
+ t,
108
+ d && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
109
109
  ] }),
110
- /* @__PURE__ */ t.jsx("div", { className: ue({ direction: s }), children: i }),
111
- u && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
112
- !u && r && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: r })
110
+ /* @__PURE__ */ e.jsx("div", { className: fe({ direction: s }), children: c }),
111
+ u && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
112
+ !u && r && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: r })
113
113
  ]
114
114
  }
115
115
  ) });
116
116
  }
117
117
  );
118
118
  K.displayName = "CheckboxInput";
119
- const it = Object.assign(K, {
120
- Option: q
121
- }), _ = E(null), he = () => {
122
- const e = F(_);
123
- if (!e)
119
+ const lt = Object.assign(K, {
120
+ Option: G
121
+ }), _ = E(null), be = () => {
122
+ const t = F(_);
123
+ if (!t)
124
124
  throw new Error(
125
125
  "useChipSingleInputContext must be used within ChipSingleInputContext"
126
126
  );
127
- return e;
128
- }, be = N(
127
+ return t;
128
+ }, ge = N(
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,12 +139,12 @@ const it = Object.assign(K, {
139
139
  size: "md"
140
140
  }
141
141
  }
142
- ), ge = b.forwardRef(({ children: e, className: r, disabled: a, id: s, value: n, ...o }, d) => {
143
- const { size: i = "md", maxWidth: c, ...l } = he(), u = M(), p = s || u, f = a || l.disabled, m = l.readOnly, h = l.value === n, w = (g) => {
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
144
  !f && !m && l.onChange?.(n), o.onChange?.(g);
145
145
  };
146
- return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
147
- /* @__PURE__ */ t.jsx(
146
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
147
+ /* @__PURE__ */ e.jsx(
148
148
  "input",
149
149
  {
150
150
  ref: d,
@@ -155,95 +155,95 @@ const it = Object.assign(K, {
155
155
  checked: h,
156
156
  disabled: f,
157
157
  readOnly: m,
158
- onChange: w,
158
+ onChange: y,
159
159
  className: "sr-only",
160
160
  ...o
161
161
  }
162
162
  ),
163
- /* @__PURE__ */ t.jsx(
163
+ /* @__PURE__ */ e.jsx(
164
164
  "label",
165
165
  {
166
166
  htmlFor: p,
167
167
  "data-selected": h,
168
- style: c ? { maxWidth: c } : void 0,
169
- className: y(
170
- be({
171
- size: i
168
+ style: i ? { maxWidth: i } : void 0,
169
+ className: x(
170
+ ge({
171
+ size: c
172
172
  }),
173
173
  f && "opacity-50 cursor-not-allowed pointer-events-none",
174
174
  m && "cursor-default pointer-events-none",
175
- c && "overflow-hidden",
175
+ i && "overflow-hidden",
176
176
  r
177
177
  ),
178
- children: /* @__PURE__ */ t.jsx(
178
+ children: /* @__PURE__ */ e.jsx(
179
179
  "span",
180
180
  {
181
- className: y(
181
+ className: x(
182
182
  "flex items-center gap-2",
183
- c && "truncate min-w-0"
183
+ i && "truncate min-w-0"
184
184
  ),
185
- children: e
185
+ children: t
186
186
  }
187
187
  )
188
188
  }
189
189
  )
190
190
  ] });
191
- }), xe = P(
191
+ }), ye = z(
192
192
  ({
193
- size: e = "md",
193
+ size: t = "md",
194
194
  label: r,
195
195
  required: a,
196
196
  helperText: s,
197
197
  error: n,
198
198
  className: o,
199
199
  disabled: d,
200
- readOnly: i,
201
- maxWidth: c,
200
+ readOnly: c,
201
+ maxWidth: i,
202
202
  name: l,
203
203
  value: u,
204
204
  onChange: p,
205
205
  children: f,
206
206
  ...m
207
207
  }, h) => {
208
- const w = !!n, g = {
209
- size: e,
208
+ const y = !!n, g = {
209
+ size: t,
210
210
  disabled: d,
211
- readOnly: i,
212
- error: w,
211
+ readOnly: c,
212
+ error: y,
213
213
  name: l,
214
214
  value: u,
215
- maxWidth: c,
215
+ maxWidth: i,
216
216
  onChange: p
217
217
  };
218
- return /* @__PURE__ */ t.jsx(_.Provider, { value: g, children: /* @__PURE__ */ t.jsxs(
218
+ return /* @__PURE__ */ e.jsx(_.Provider, { value: g, children: /* @__PURE__ */ e.jsxs(
219
219
  "fieldset",
220
220
  {
221
221
  ref: h,
222
- className: y("w-full border-0 p-0 m-0", o),
222
+ className: x("w-full border-0 p-0 m-0", o),
223
223
  disabled: d,
224
224
  ...m,
225
225
  children: [
226
- r && /* @__PURE__ */ t.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
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
- a && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
228
+ a && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
229
229
  ] }),
230
- /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
231
- w && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
232
- !w && s && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
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 })
233
233
  ]
234
234
  }
235
235
  ) });
236
236
  }
237
- ), ct = Object.assign(xe, {
238
- Option: ge
239
- }), H = E(null), ye = () => {
240
- const e = F(H);
241
- if (!e)
237
+ ), dt = Object.assign(ye, {
238
+ Option: xe
239
+ }), H = E(null), we = () => {
240
+ const t = F(H);
241
+ if (!t)
242
242
  throw new Error(
243
243
  "useChipMultipleInputContext must be used within ChipMultipleInputContext"
244
244
  );
245
- return e;
246
- }, we = N(
245
+ return t;
246
+ }, ve = N(
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,17 +257,17 @@ const it = Object.assign(K, {
257
257
  size: "md"
258
258
  }
259
259
  }
260
- ), ve = b.forwardRef(({ children: e, className: r, disabled: a, id: s, value: n, ...o }, d) => {
261
- const { size: i = "md", maxWidth: c, ...l } = ye(), u = M(), p = s || u, f = a || l.disabled, m = l.readOnly, h = l.value?.includes(n) ?? !1, w = (g) => {
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
262
  if (!f && !m) {
263
- const I = l.value || [];
264
- let k;
265
- h ? k = I.filter((C) => C !== n) : k = [...I, n], l.onChange?.(k);
263
+ const j = l.value || [];
264
+ let v;
265
+ h ? v = j.filter((V) => V !== n) : v = [...j, n], l.onChange?.(v);
266
266
  }
267
267
  o.onChange?.(g);
268
268
  };
269
- return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
270
- /* @__PURE__ */ t.jsx(
269
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
270
+ /* @__PURE__ */ e.jsx(
271
271
  "input",
272
272
  {
273
273
  ref: d,
@@ -278,93 +278,93 @@ const it = Object.assign(K, {
278
278
  checked: h,
279
279
  disabled: f,
280
280
  readOnly: m,
281
- onChange: w,
281
+ onChange: y,
282
282
  className: "sr-only",
283
283
  ...o
284
284
  }
285
285
  ),
286
- /* @__PURE__ */ t.jsx(
286
+ /* @__PURE__ */ e.jsx(
287
287
  "label",
288
288
  {
289
289
  htmlFor: p,
290
290
  "data-selected": h,
291
- style: c ? { maxWidth: c } : void 0,
292
- className: y(
293
- we({
294
- size: i
291
+ style: i ? { maxWidth: i } : void 0,
292
+ className: x(
293
+ ve({
294
+ size: c
295
295
  }),
296
296
  f && "opacity-50 cursor-not-allowed pointer-events-none",
297
297
  m && "cursor-default pointer-events-none",
298
- c && "overflow-hidden",
298
+ i && "overflow-hidden",
299
299
  r
300
300
  ),
301
- children: /* @__PURE__ */ t.jsx(
301
+ children: /* @__PURE__ */ e.jsx(
302
302
  "span",
303
303
  {
304
- className: y(
304
+ className: x(
305
305
  "flex items-center gap-2",
306
- c && "truncate min-w-0"
306
+ i && "truncate min-w-0"
307
307
  ),
308
- children: e
308
+ children: t
309
309
  }
310
310
  )
311
311
  }
312
312
  )
313
313
  ] });
314
- }), je = P(
314
+ }), ke = z(
315
315
  ({
316
- size: e = "md",
316
+ size: t = "md",
317
317
  label: r,
318
318
  required: a,
319
319
  helperText: s,
320
320
  error: n,
321
321
  className: o,
322
322
  disabled: d,
323
- readOnly: i,
324
- maxWidth: c,
323
+ readOnly: c,
324
+ maxWidth: i,
325
325
  name: l,
326
326
  value: u = [],
327
327
  onChange: p,
328
328
  children: f,
329
329
  ...m
330
330
  }, h) => {
331
- const w = !!n, g = {
332
- size: e,
331
+ const y = !!n, g = {
332
+ size: t,
333
333
  disabled: d,
334
- readOnly: i,
335
- error: w,
334
+ readOnly: c,
335
+ error: y,
336
336
  name: l,
337
337
  value: u,
338
- maxWidth: c,
338
+ maxWidth: i,
339
339
  onChange: p
340
340
  };
341
- return /* @__PURE__ */ t.jsx(H.Provider, { value: g, children: /* @__PURE__ */ t.jsxs(
341
+ return /* @__PURE__ */ e.jsx(H.Provider, { value: g, children: /* @__PURE__ */ e.jsxs(
342
342
  "fieldset",
343
343
  {
344
344
  ref: h,
345
- className: y("w-full border-0 p-0 m-0", o),
345
+ className: x("w-full border-0 p-0 m-0", o),
346
346
  disabled: d,
347
347
  ...m,
348
348
  children: [
349
- r && /* @__PURE__ */ t.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
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
- a && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
351
+ a && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
352
352
  ] }),
353
- /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
354
- w && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
355
- !w && s && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
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 })
356
356
  ]
357
357
  }
358
358
  ) });
359
359
  }
360
- ), lt = Object.assign(je, {
361
- Option: ve
362
- }), ke = N(
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",
360
+ ), ut = Object.assign(ke, {
361
+ Option: je
362
+ }), Ie = N(
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: {
366
366
  state: {
367
- default: "border-primary/30 text-foreground focus:border-primary focus:ring-primary/20",
367
+ default: "border-primary/30 text-foreground focus:border-primary focus:ring-primary/20 hover:border-primary/50",
368
368
  error: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
369
369
  readOnly: "border-gray-300 bg-gray-50 text-foreground cursor-default focus:ring-0 focus:border-gray-300"
370
370
  }
@@ -373,134 +373,137 @@ const it = Object.assign(K, {
373
373
  state: "default"
374
374
  }
375
375
  }
376
- ), $ = b.forwardRef(
376
+ ), J = b.forwardRef(
377
377
  ({
378
- label: e,
378
+ label: t,
379
379
  leftContent: r,
380
380
  rightContent: a,
381
381
  helperText: s,
382
382
  error: n,
383
383
  className: o,
384
384
  disabled: d,
385
- readOnly: i,
386
385
  id: c,
387
- required: l,
388
- ...u
389
- }, p) => {
390
- const f = b.useId(), m = c || f, h = `${m}-helper`, w = `${m}-error`, g = !!n, I = b.useMemo(() => {
391
- const k = [];
392
- return g ? k.push(w) : s && k.push(h), k.length > 0 ? k.join(" ") : void 0;
393
- }, [g, s, w, h]);
394
- return /* @__PURE__ */ t.jsxs("div", { className: y("w-full", o), children: [
395
- e && /* @__PURE__ */ t.jsxs(
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]);
396
+ return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", o), children: [
397
+ t && /* @__PURE__ */ e.jsxs(
396
398
  "label",
397
399
  {
398
- htmlFor: m,
400
+ htmlFor: y,
399
401
  className: "block text-sm font-medium text-foreground mb-2",
400
402
  children: [
401
- e,
402
- l && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
403
+ t,
404
+ i && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
403
405
  ]
404
406
  }
405
407
  ),
406
- /* @__PURE__ */ t.jsxs("div", { className: "relative w-full", children: [
407
- r && /* @__PURE__ */ t.jsx(
408
+ /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
409
+ r && /* @__PURE__ */ e.jsx(
408
410
  "span",
409
411
  {
410
- className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
412
+ className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5 z-10",
411
413
  "aria-hidden": "true",
412
414
  "data-testid": "left-content",
413
415
  children: r
414
416
  }
415
417
  ),
416
- /* @__PURE__ */ t.jsx(
417
- "input",
418
+ /* @__PURE__ */ e.jsx(
419
+ "button",
418
420
  {
419
- ref: p,
420
- id: m,
421
- required: l,
421
+ ref: m,
422
+ id: y,
423
+ type: "button",
422
424
  disabled: d,
423
- readOnly: i,
424
- "aria-invalid": g,
425
- "aria-describedby": I,
426
- "aria-errormessage": g ? w : void 0,
427
- className: y(
428
- ke({
429
- state: g ? "error" : i ? "readOnly" : "default"
425
+ "aria-invalid": v || void 0,
426
+ "aria-describedby": R,
427
+ "aria-errormessage": v ? j : void 0,
428
+ "aria-required": i || void 0,
429
+ className: x(
430
+ Ie({
431
+ state: v ? "error" : "default"
430
432
  }),
431
433
  r ? "pl-9" : "pl-3",
432
434
  a ? "pr-9" : "pr-3",
433
- "h-9"
435
+ "h-9",
436
+ !l && "text-gray-400"
434
437
  ),
435
- ...u
438
+ ...f,
439
+ children: V
436
440
  }
437
441
  ),
438
- a && /* @__PURE__ */ t.jsx(
442
+ a && /* @__PURE__ */ e.jsx(
439
443
  "span",
440
444
  {
441
- className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
445
+ className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5 z-10",
442
446
  "aria-hidden": "true",
443
447
  "data-testid": "right-content",
444
448
  children: a
445
449
  }
450
+ ),
451
+ p && /* @__PURE__ */ e.jsx(
452
+ "input",
453
+ {
454
+ type: "hidden",
455
+ name: p,
456
+ value: l,
457
+ readOnly: !0,
458
+ "data-testid": "hidden-input"
459
+ }
446
460
  )
447
461
  ] }),
448
- g && /* @__PURE__ */ t.jsx(
462
+ v && /* @__PURE__ */ e.jsx(
449
463
  "div",
450
464
  {
451
- id: w,
465
+ id: j,
452
466
  className: "mt-1 text-sm text-danger",
453
467
  role: "alert",
454
468
  "aria-live": "polite",
455
469
  children: n
456
470
  }
457
471
  ),
458
- !g && s && /* @__PURE__ */ t.jsx("div", { id: h, className: "mt-1 text-sm text-gray-600", children: s })
472
+ !v && s && /* @__PURE__ */ e.jsx("div", { id: g, className: "mt-1 text-sm text-gray-600", children: s })
459
473
  ] });
460
474
  }
461
475
  );
462
- $.displayName = "TextInput";
463
- function Ie(e) {
464
- if (!e) return "";
465
- const r = new Date(e);
466
- return isNaN(r.getTime()) ? e : r.toLocaleDateString(void 0, {
476
+ J.displayName = "TextInputAsButton";
477
+ function Ne(t) {
478
+ if (!t) return "";
479
+ const r = new Date(t);
480
+ return isNaN(r.getTime()) ? t : r.toLocaleDateString(void 0, {
467
481
  year: "numeric",
468
482
  month: "short",
469
483
  day: "numeric"
470
484
  });
471
485
  }
472
- const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...i }, c) {
486
+ const ft = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...c }, i) {
473
487
  const l = T(null), u = (h) => {
474
- l.current = h, typeof c == "function" ? c(h) : c && typeof c == "object" && (c.current = h);
488
+ l.current = h, typeof i == "function" ? i(h) : i && typeof i == "object" && (i.current = h);
475
489
  }, p = () => {
476
490
  l.current && (typeof l.current.showPicker == "function" ? l.current.showPicker() : l.current.focus());
477
491
  }, f = (h) => {
478
492
  a(h.target.value);
479
- }, m = (n ?? Ie)(r);
480
- return /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
481
- /* @__PURE__ */ t.jsx(
482
- "div",
493
+ }, m = (n ?? Ne)(r);
494
+ return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
495
+ /* @__PURE__ */ e.jsx(
496
+ J,
483
497
  {
484
498
  onClick: p,
485
- className: "cursor-pointer",
486
- role: "presentation",
487
- children: /* @__PURE__ */ t.jsx(
488
- $,
489
- {
490
- inert: !0,
491
- type: "text",
492
- value: m,
493
- label: s,
494
- readOnly: !0,
495
- "aria-hidden": "true",
496
- leftContent: /* @__PURE__ */ t.jsx(O, { as: se, color: "inherit", size: "sm" }),
497
- "data-testid": "date-single-picker-visible-input",
498
- ...i
499
- }
500
- )
499
+ value: m,
500
+ label: s,
501
+ leftContent: /* @__PURE__ */ e.jsx(P, { as: oe, color: "inherit", size: "sm" }),
502
+ "data-testid": "date-single-picker-visible-input",
503
+ ...c
501
504
  }
502
505
  ),
503
- /* @__PURE__ */ t.jsx(
506
+ /* @__PURE__ */ e.jsx(
504
507
  "input",
505
508
  {
506
509
  ref: u,
@@ -515,44 +518,145 @@ const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
515
518
  }
516
519
  )
517
520
  ] });
518
- }), ut = P(
519
- (e, r) => /* @__PURE__ */ t.jsx(
521
+ }), Ce = N(
522
+ "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
+ {
524
+ variants: {
525
+ state: {
526
+ default: "border-primary/30 text-foreground focus:border-primary focus:ring-primary/20",
527
+ error: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
528
+ readOnly: "border-gray-300 bg-gray-50 text-foreground cursor-default focus:ring-0 focus:border-gray-300"
529
+ }
530
+ },
531
+ defaultVariants: {
532
+ state: "default"
533
+ }
534
+ }
535
+ ), $ = b.forwardRef(
536
+ ({
537
+ label: t,
538
+ leftContent: r,
539
+ rightContent: a,
540
+ helperText: s,
541
+ error: n,
542
+ className: o,
543
+ disabled: d,
544
+ readOnly: c,
545
+ id: i,
546
+ required: l,
547
+ ...u
548
+ }, p) => {
549
+ const f = b.useId(), m = i || f, h = `${m}-helper`, y = `${m}-error`, g = !!n, j = b.useMemo(() => {
550
+ 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 /* @__PURE__ */ e.jsxs("div", { className: x("w-full", o), children: [
554
+ t && /* @__PURE__ */ e.jsxs(
555
+ "label",
556
+ {
557
+ htmlFor: m,
558
+ className: "block text-sm font-medium text-foreground mb-2",
559
+ children: [
560
+ t,
561
+ l && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
562
+ ]
563
+ }
564
+ ),
565
+ /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
566
+ r && /* @__PURE__ */ e.jsx(
567
+ "span",
568
+ {
569
+ className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
570
+ "aria-hidden": "true",
571
+ "data-testid": "left-content",
572
+ children: r
573
+ }
574
+ ),
575
+ /* @__PURE__ */ e.jsx(
576
+ "input",
577
+ {
578
+ ref: p,
579
+ id: m,
580
+ required: l,
581
+ disabled: d,
582
+ readOnly: c,
583
+ "aria-invalid": g,
584
+ "aria-describedby": j,
585
+ "aria-errormessage": g ? y : void 0,
586
+ className: x(
587
+ Ce({
588
+ state: g ? "error" : c ? "readOnly" : "default"
589
+ }),
590
+ r ? "pl-9" : "pl-3",
591
+ a ? "pr-9" : "pr-3",
592
+ "h-9"
593
+ ),
594
+ ...u
595
+ }
596
+ ),
597
+ a && /* @__PURE__ */ e.jsx(
598
+ "span",
599
+ {
600
+ className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
601
+ "aria-hidden": "true",
602
+ "data-testid": "right-content",
603
+ children: a
604
+ }
605
+ )
606
+ ] }),
607
+ g && /* @__PURE__ */ e.jsx(
608
+ "div",
609
+ {
610
+ id: y,
611
+ className: "mt-1 text-sm text-danger",
612
+ role: "alert",
613
+ "aria-live": "polite",
614
+ children: n
615
+ }
616
+ ),
617
+ !g && s && /* @__PURE__ */ e.jsx("div", { id: h, className: "mt-1 text-sm text-gray-600", children: s })
618
+ ] });
619
+ }
620
+ );
621
+ $.displayName = "TextInput";
622
+ const pt = z(
623
+ (t, r) => /* @__PURE__ */ e.jsx(
520
624
  $,
521
625
  {
522
- ...e,
626
+ ...t,
523
627
  ref: r,
524
628
  type: "email",
525
629
  autoComplete: "email",
526
630
  inputMode: "email",
527
- leftContent: /* @__PURE__ */ t.jsx(O, { as: oe, color: "inherit", size: "sm" })
631
+ leftContent: /* @__PURE__ */ e.jsx(P, { as: ie, color: "inherit", size: "sm" })
528
632
  }
529
633
  )
530
- ), Ne = "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", Ce = "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", Re = (e) => /^\d$/.test(e), W = (e, r) => e?.replace(/\D/g, "").slice(0, r) || "", J = b.forwardRef(
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(
531
635
  ({
532
- value: e,
636
+ value: t,
533
637
  onChange: r,
534
638
  onKeyDown: a,
535
639
  onFocus: s,
536
640
  onPaste: n,
537
641
  disabled: o,
538
642
  error: d,
539
- secure: i,
540
- inputRef: c,
643
+ secure: c,
644
+ inputRef: i,
541
645
  index: l,
542
646
  id: u
543
- }, p) => /* @__PURE__ */ t.jsx(
647
+ }, p) => /* @__PURE__ */ e.jsx(
544
648
  "input",
545
649
  {
546
- ref: c,
650
+ ref: i,
547
651
  id: u,
548
652
  type: "text",
549
653
  inputMode: "numeric",
550
- pattern: i ? void 0 : "[0-9]*",
654
+ pattern: c ? void 0 : "[0-9]*",
551
655
  maxLength: 1,
552
- value: i ? e ? "•" : "" : e,
656
+ value: c ? t ? "•" : "" : t,
553
657
  onChange: (f) => {
554
658
  const m = f.target.value;
555
- (m === "" || Re(m)) && r(m);
659
+ (m === "" || Se(m)) && r(m);
556
660
  },
557
661
  onKeyDown: a,
558
662
  onFocus: s,
@@ -560,128 +664,128 @@ const dt = b.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
560
664
  disabled: o,
561
665
  "aria-invalid": d,
562
666
  "aria-disabled": o,
563
- className: d ? Ce : Ne,
667
+ className: d ? Re : Ve,
564
668
  autoComplete: "one-time-code",
565
669
  "data-testid": `pin-input-${l}`
566
670
  }
567
671
  )
568
672
  );
569
- J.displayName = "PinInput";
570
- const Ve = b.forwardRef(
673
+ Q.displayName = "PinInput";
674
+ const De = b.forwardRef(
571
675
  ({
572
- label: e,
676
+ label: t,
573
677
  helperText: r,
574
678
  error: a,
575
679
  disabled: s,
576
680
  value: n,
577
681
  onChange: o,
578
682
  onComplete: d,
579
- digits: i = 6,
580
- className: c,
683
+ digits: c = 6,
684
+ className: i,
581
685
  id: l,
582
686
  name: u,
583
687
  required: p,
584
688
  secure: f = !1,
585
689
  ...m
586
690
  }, h) => {
587
- const w = b.useId(), g = l || w, I = !!a, k = b.useRef([]), C = W(n, i), V = C.split("").concat(Array(i - C.length).fill("")), R = b.useCallback(
588
- (v) => {
589
- const x = W(v, i);
590
- o(x), x.length === i && d?.(x);
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);
591
695
  },
592
- [o, d, i]
696
+ [o, d, c]
593
697
  ), D = b.useCallback(
594
- (v, x) => {
595
- const j = [...V];
596
- j[v] = x;
597
- const S = j.join("").replace(/\s+$/, "");
598
- R(S), x && v < i - 1 && k.current[v + 1]?.focus();
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();
599
703
  },
600
- [V, R, i]
601
- ), B = b.useCallback(
602
- (v, x) => {
603
- if (x.key === "Backspace") {
604
- if (!V[v] && v > 0) {
605
- x.preventDefault();
606
- const j = [...V];
607
- j[v - 1] = "";
608
- const S = j.join("").replace(/\s+$/, "");
609
- R(S), k.current[v - 1]?.focus();
610
- } else if (V[v]) {
611
- x.preventDefault();
612
- const j = [...V];
613
- j[v] = "";
614
- const S = j.join("").replace(/\s+$/, "");
615
- R(S);
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);
616
720
  }
617
- } else x.key === "ArrowLeft" && v > 0 ? (x.preventDefault(), k.current[v - 1]?.focus()) : x.key === "ArrowRight" && v < i - 1 && (x.preventDefault(), k.current[v + 1]?.focus());
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());
618
722
  },
619
- [V, R, i]
723
+ [R, C, c]
620
724
  ), A = b.useCallback(
621
- (v) => {
622
- v.preventDefault();
623
- const x = v.clipboardData.getData("text"), j = W(x, i);
624
- if (j.length > 0) {
625
- R(j);
626
- const S = Math.min(j.length, i - 1);
627
- k.current[S]?.focus();
725
+ (k) => {
726
+ k.preventDefault();
727
+ const w = k.clipboardData.getData("text"), I = W(w, c);
728
+ if (I.length > 0) {
729
+ C(I);
730
+ const S = Math.min(I.length, c - 1);
731
+ v.current[S]?.focus();
628
732
  }
629
733
  },
630
- [R, i]
734
+ [C, c]
631
735
  );
632
- return /* @__PURE__ */ t.jsxs("div", { ref: h, className: y("w-full", c), ...m, children: [
633
- e && /* @__PURE__ */ t.jsxs(
736
+ return /* @__PURE__ */ e.jsxs("div", { ref: h, className: x("w-full", i), ...m, children: [
737
+ t && /* @__PURE__ */ e.jsxs(
634
738
  "label",
635
739
  {
636
740
  htmlFor: `${g}-0`,
637
741
  className: "block text-sm font-medium text-foreground mb-2",
638
742
  children: [
639
- e,
640
- p && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
743
+ t,
744
+ p && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
641
745
  ]
642
746
  }
643
747
  ),
644
- /* @__PURE__ */ t.jsx(
748
+ /* @__PURE__ */ e.jsx(
645
749
  "div",
646
750
  {
647
751
  className: "flex gap-2 justify-center",
648
752
  role: "group",
649
- "aria-labelledby": e ? `${g}-label` : void 0,
650
- "aria-describedby": I ? `${g}-error` : r ? `${g}-helper` : void 0,
651
- children: V.map((v, x) => /* @__PURE__ */ t.jsx(
652
- J,
753
+ "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
+ Q,
653
757
  {
654
- value: v,
655
- onChange: (j) => D(x, j),
656
- onKeyDown: (j) => B(x, j),
758
+ value: k,
759
+ onChange: (I) => D(w, I),
760
+ onKeyDown: (I) => M(w, I),
657
761
  onFocus: () => {
658
- const j = k.current[x];
659
- j && j.select();
762
+ const I = v.current[w];
763
+ I && I.select();
660
764
  },
661
765
  onPaste: A,
662
766
  disabled: s,
663
- error: I,
767
+ error: j,
664
768
  secure: f,
665
- inputRef: (j) => {
666
- k.current[x] = j;
769
+ inputRef: (I) => {
770
+ v.current[w] = I;
667
771
  },
668
- index: x,
669
- id: `${g}-${x}`
772
+ index: w,
773
+ id: `${g}-${w}`
670
774
  },
671
- x
775
+ w
672
776
  ))
673
777
  }
674
778
  ),
675
- u && /* @__PURE__ */ t.jsx(
779
+ u && /* @__PURE__ */ e.jsx(
676
780
  "input",
677
781
  {
678
782
  type: "hidden",
679
783
  name: u,
680
- value: C,
784
+ value: V,
681
785
  required: p
682
786
  }
683
787
  ),
684
- I && /* @__PURE__ */ t.jsx(
788
+ j && /* @__PURE__ */ e.jsx(
685
789
  "div",
686
790
  {
687
791
  id: `${g}-error`,
@@ -690,31 +794,31 @@ const Ve = b.forwardRef(
690
794
  children: a
691
795
  }
692
796
  ),
693
- !I && r && /* @__PURE__ */ t.jsx("div", { id: `${g}-helper`, className: "mt-2 text-sm text-gray-600", children: r })
797
+ !j && r && /* @__PURE__ */ e.jsx("div", { id: `${g}-helper`, className: "mt-2 text-sm text-gray-600", children: r })
694
798
  ] });
695
799
  }
696
800
  );
697
- Ve.displayName = "PinField";
698
- function Se(e, r) {
699
- ae(() => {
700
- typeof e == "number" && !isNaN(e) ? r(`${e}`) : e === "" || e === null || e === void 0 ? r("") : typeof e == "string" && r(e);
701
- }, [e, r]);
801
+ De.displayName = "PinField";
802
+ function ze(t, r) {
803
+ ne(() => {
804
+ typeof t == "number" && !isNaN(t) ? r(`${t}`) : t === "" || t === null || t === void 0 ? r("") : typeof t == "string" && r(t);
805
+ }, [t, r]);
702
806
  }
703
- function De(e, r = !1) {
704
- if (e === "" || e === "-" && r) return !0;
705
- const a = r && e.startsWith("-") ? e.slice(1) : e;
706
- if (r && e.startsWith("-") && a === "") return !0;
807
+ function Oe(t, r = !1) {
808
+ if (t === "" || t === "-" && r) return !0;
809
+ const a = r && t.startsWith("-") ? t.slice(1) : t;
810
+ if (r && t.startsWith("-") && a === "") return !0;
707
811
  if (a.startsWith(".") || a.startsWith(",") || !/^[\d.,]+$/.test(a)) return !1;
708
812
  const s = a.split(",");
709
813
  if (s.length > 2) return !1;
710
814
  const n = s[0], o = s[1];
711
- return !(n === "" || !Pe(n) || o !== void 0 && o !== "" && !ze(o));
815
+ return !(n === "" || !Pe(n) || o !== void 0 && o !== "" && !$e(o));
712
816
  }
713
- function Pe(e) {
714
- if (e === "") return !1;
715
- if (!e.includes("."))
716
- return /^\d+$/.test(e);
717
- const r = e.split(".");
817
+ function Pe(t) {
818
+ if (t === "") return !1;
819
+ if (!t.includes("."))
820
+ return /^\d+$/.test(t);
821
+ const r = t.split(".");
718
822
  if (r[0] === "" || !/^\d{1,3}$/.test(r[0])) return !1;
719
823
  for (let a = 1; a < r.length; a++) {
720
824
  const s = r[a];
@@ -724,61 +828,61 @@ function Pe(e) {
724
828
  }
725
829
  return !0;
726
830
  }
727
- function ze(e) {
728
- return /^\d{1,2}$/.test(e);
831
+ function $e(t) {
832
+ return /^\d{1,2}$/.test(t);
729
833
  }
730
- function Q(e, r = !1) {
731
- if (e === "") return "";
732
- const a = e.startsWith("-");
834
+ function U(t, r = !1) {
835
+ if (t === "") return "";
836
+ const a = t.startsWith("-");
733
837
  if (a && !r)
734
- return Q(e.slice(1), !1);
735
- if (a && e.length === 1) return "-";
736
- let n = (a ? e.slice(1) : e).replace(/[^\d.,]/g, "");
838
+ return U(t.slice(1), !1);
839
+ if (a && t.length === 1) return "-";
840
+ let n = (a ? t.slice(1) : t).replace(/[^\d.,]/g, "");
737
841
  const o = n.lastIndexOf(",");
738
842
  if (o !== -1) {
739
- const d = n.slice(0, o).replace(/,/g, ""), i = n.slice(o + 1).replace(/,/g, "");
740
- n = d + "," + i;
843
+ const d = n.slice(0, o).replace(/,/g, ""), c = n.slice(o + 1).replace(/,/g, "");
844
+ n = d + "," + c;
741
845
  }
742
846
  return n = n.replace(/\.{2,}/g, "."), (a ? "-" : "") + n;
743
847
  }
744
- const ft = ({
745
- value: e,
848
+ const mt = ({
849
+ value: t,
746
850
  onChange: r,
747
851
  allowNegative: a = !1,
748
852
  inputProps: s,
749
853
  label: n,
750
854
  helperText: o,
751
855
  error: d,
752
- ...i
856
+ ...c
753
857
  }) => {
754
- const c = T(null), [l, u] = ne(
755
- e === "" ? "" : String(e)
858
+ const i = T(null), [l, u] = se(
859
+ t === "" ? "" : String(t)
756
860
  );
757
- Se(e, u);
861
+ ze(t, u);
758
862
  const p = (f) => {
759
- const m = f.target.value, h = Q(m, a);
760
- De(h, a) ? (u(h), r(h)) : f.preventDefault();
863
+ const m = f.target.value, h = U(m, a);
864
+ Oe(h, a) ? (u(h), r(h)) : f.preventDefault();
761
865
  };
762
- return /* @__PURE__ */ t.jsx(
866
+ return /* @__PURE__ */ e.jsx(
763
867
  $,
764
868
  {
765
- ref: c,
869
+ ref: i,
766
870
  type: "text",
767
871
  label: n,
768
872
  value: l,
769
873
  onChange: p,
770
874
  error: d,
771
875
  helperText: o,
772
- placeholder: i.placeholder,
773
- leftContent: /* @__PURE__ */ t.jsx(O, { as: ie, color: "inherit", size: "sm" }),
876
+ placeholder: c.placeholder,
877
+ leftContent: /* @__PURE__ */ e.jsx(P, { as: ce, color: "inherit", size: "sm" }),
774
878
  inputMode: "numeric",
775
879
  autoComplete: "off",
776
880
  pattern: "[0-9.,-]*",
777
881
  ...s,
778
- ...i
882
+ ...c
779
883
  }
780
884
  );
781
- }, Oe = N("space-y-2", {
885
+ }, Ee = N("space-y-2", {
782
886
  variants: {
783
887
  direction: {
784
888
  vertical: "space-y-2 space-x-0",
@@ -788,7 +892,7 @@ const ft = ({
788
892
  defaultVariants: {
789
893
  direction: "vertical"
790
894
  }
791
- }), $e = N(
895
+ }), Fe = N(
792
896
  "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",
793
897
  {
794
898
  variants: {
@@ -826,7 +930,7 @@ const ft = ({
826
930
  size: "md"
827
931
  }
828
932
  }
829
- ), Ee = N(
933
+ ), Be = N(
830
934
  "text-foreground cursor-pointer select-none",
831
935
  {
832
936
  variants: {
@@ -845,39 +949,39 @@ const ft = ({
845
949
  disabled: !1
846
950
  }
847
951
  }
848
- ), U = E(
952
+ ), X = E(
849
953
  null
850
- ), Fe = () => {
851
- const e = F(U);
852
- if (!e)
954
+ ), Me = () => {
955
+ const t = F(X);
956
+ if (!t)
853
957
  throw new Error(
854
958
  "useRadioInputContext must be used within RadioInputContext"
855
959
  );
856
- return e;
857
- }, Me = b.forwardRef(
858
- ({ children: e, description: r, className: a, disabled: s, id: n, value: o, ...d }, i) => {
859
- const c = Fe(), l = b.useId(), u = n || l, p = s || c.disabled, f = c.error ? "danger" : c.variant || "primary";
860
- return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
861
- /* @__PURE__ */ t.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ t.jsx(
960
+ 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";
964
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
965
+ /* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
862
966
  "input",
863
967
  {
864
- ref: i,
968
+ ref: c,
865
969
  type: "radio",
866
970
  id: u,
867
- name: c.name,
971
+ name: i.name,
868
972
  value: o,
869
973
  disabled: p,
870
- className: y(
871
- $e({
974
+ className: x(
975
+ Fe({
872
976
  variant: f,
873
- size: c.size
977
+ size: i.size
874
978
  }),
875
979
  // Custom radio dot styling using ::before - centered positioning with size variants
876
980
  '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',
877
981
  // Size-specific radio dot dimensions
878
- c.size === "sm" && "before:w-[6px] before:h-[6px]",
879
- c.size === "md" && "before:w-[8px] before:h-[8px]",
880
- c.size === "lg" && "before:w-[10px] before:h-[10px]",
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]",
881
985
  "checked:before:opacity-100",
882
986
  // Outline variants use colored radio dot
883
987
  f?.includes("outline") && "checked:before:bg-current",
@@ -886,26 +990,26 @@ const ft = ({
886
990
  ...d
887
991
  }
888
992
  ) }),
889
- /* @__PURE__ */ t.jsxs("div", { className: "flex-1", children: [
890
- /* @__PURE__ */ t.jsx(
993
+ /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
994
+ /* @__PURE__ */ e.jsx(
891
995
  "label",
892
996
  {
893
997
  htmlFor: u,
894
- className: Ee({
895
- size: c.size,
998
+ className: Be({
999
+ size: i.size,
896
1000
  disabled: p
897
1001
  }),
898
- children: e
1002
+ children: t
899
1003
  }
900
1004
  ),
901
- r && /* @__PURE__ */ t.jsx(
1005
+ r && /* @__PURE__ */ e.jsx(
902
1006
  "div",
903
1007
  {
904
- className: y(
1008
+ className: x(
905
1009
  "text-gray-600 mt-1",
906
- c.size === "sm" && "text-xs",
907
- c.size === "md" && "text-xs",
908
- c.size === "lg" && "text-sm",
1010
+ i.size === "sm" && "text-xs",
1011
+ i.size === "md" && "text-xs",
1012
+ i.size === "lg" && "text-sm",
909
1013
  p && "opacity-50"
910
1014
  ),
911
1015
  children: r
@@ -914,39 +1018,39 @@ const ft = ({
914
1018
  ] })
915
1019
  ] });
916
1020
  }
917
- ), Be = b.forwardRef(
1021
+ ), We = b.forwardRef(
918
1022
  ({
919
- variant: e = "primary",
1023
+ variant: t = "primary",
920
1024
  size: r = "md",
921
1025
  label: a,
922
1026
  helperText: s,
923
1027
  error: n,
924
1028
  direction: o = "vertical",
925
1029
  className: d,
926
- disabled: i,
927
- name: c,
1030
+ disabled: c,
1031
+ name: i,
928
1032
  children: l,
929
1033
  ...u
930
1034
  }, p) => {
931
1035
  const f = !!n, m = {
932
- variant: e,
1036
+ variant: t,
933
1037
  size: r,
934
- disabled: i,
1038
+ disabled: c,
935
1039
  error: f,
936
- name: c
1040
+ name: i
937
1041
  };
938
- return /* @__PURE__ */ t.jsx(U.Provider, { value: m, children: /* @__PURE__ */ t.jsxs("div", { ref: p, className: y("w-full", d), ...u, children: [
939
- a && /* @__PURE__ */ t.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: a }),
940
- /* @__PURE__ */ t.jsx("div", { className: Oe({ direction: o }), children: l }),
941
- f && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
942
- !f && s && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
1042
+ return /* @__PURE__ */ e.jsx(X.Provider, { value: m, children: /* @__PURE__ */ e.jsxs("div", { ref: p, className: x("w-full", d), ...u, children: [
1043
+ 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 }),
1045
+ f && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
1046
+ !f && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
943
1047
  ] }) });
944
1048
  }
945
- ), pt = Object.assign(Be, {
946
- Option: Me
947
- }), mt = P(
1049
+ ), ht = Object.assign(We, {
1050
+ Option: Ae
1051
+ }), bt = z(
948
1052
  ({
949
- autoComplete: e = "off",
1053
+ autoComplete: t = "off",
950
1054
  spellCheck: r = !1,
951
1055
  inputMode: a = "search",
952
1056
  placeholder: s = "Search...",
@@ -954,24 +1058,24 @@ const ft = ({
954
1058
  enterKeyHint: o = "search",
955
1059
  "aria-label": d = "Search",
956
1060
  // internal default, not in props
957
- ...i
958
- }, c) => /* @__PURE__ */ t.jsx(
1061
+ ...c
1062
+ }, i) => /* @__PURE__ */ e.jsx(
959
1063
  $,
960
1064
  {
961
- ref: c,
1065
+ ref: i,
962
1066
  type: "search",
963
1067
  inputMode: a,
964
- autoComplete: e,
1068
+ autoComplete: t,
965
1069
  spellCheck: r,
966
1070
  placeholder: s,
967
1071
  maxLength: n,
968
1072
  enterKeyHint: o,
969
1073
  "aria-label": d,
970
- leftContent: /* @__PURE__ */ t.jsx(O, { as: ce, color: "inherit", size: "sm" }),
971
- ...i
1074
+ leftContent: /* @__PURE__ */ e.jsx(P, { as: le, color: "inherit", size: "sm" }),
1075
+ ...c
972
1076
  }
973
1077
  )
974
- ), Ae = N(
1078
+ ), Le = N(
975
1079
  "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",
976
1080
  {
977
1081
  variants: {
@@ -985,77 +1089,77 @@ const ft = ({
985
1089
  state: "default"
986
1090
  }
987
1091
  }
988
- ), X = b.forwardRef(({ value: e, children: r, ...a }, s) => /* @__PURE__ */ t.jsx("option", { ref: s, value: e, ...a, children: r }));
989
- X.displayName = "SelectOption";
990
- const Y = b.forwardRef(({ label: e, children: r, ...a }, s) => /* @__PURE__ */ t.jsx("optgroup", { ref: s, label: e, ...a, children: r }));
991
- Y.displayName = "SelectOptionGroup";
992
- const Z = b.forwardRef(
1092
+ ), Y = b.forwardRef(({ value: t, children: r, ...a }, s) => /* @__PURE__ */ e.jsx("option", { ref: s, value: t, ...a, children: r }));
1093
+ 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 }));
1095
+ Z.displayName = "SelectOptionGroup";
1096
+ const ee = b.forwardRef(
993
1097
  ({
994
- label: e,
1098
+ label: t,
995
1099
  helperText: r,
996
1100
  error: a,
997
1101
  className: s,
998
1102
  disabled: n,
999
1103
  readOnly: o,
1000
1104
  id: d,
1001
- required: i,
1002
- placeholder: c,
1105
+ required: c,
1106
+ placeholder: i,
1003
1107
  children: l,
1004
1108
  onChange: u,
1005
1109
  ...p
1006
1110
  }, f) => {
1007
- const m = b.useId(), h = d || m, w = `${h}-helper`, g = `${h}-error`, I = !!a, k = b.useMemo(() => {
1008
- const C = [];
1009
- return I ? C.push(g) : r && C.push(w), C.length > 0 ? C.join(" ") : void 0;
1010
- }, [I, r, g, w]);
1011
- return /* @__PURE__ */ t.jsxs("div", { className: y("w-full", s), children: [
1012
- e && /* @__PURE__ */ t.jsxs(
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]);
1115
+ return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", s), children: [
1116
+ t && /* @__PURE__ */ e.jsxs(
1013
1117
  "label",
1014
1118
  {
1015
1119
  htmlFor: h,
1016
1120
  className: "block text-sm font-medium text-foreground mb-2",
1017
1121
  children: [
1018
- e,
1019
- i && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1122
+ t,
1123
+ c && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1020
1124
  ]
1021
1125
  }
1022
1126
  ),
1023
- /* @__PURE__ */ t.jsxs("div", { className: "relative w-full", children: [
1024
- /* @__PURE__ */ t.jsxs(
1127
+ /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
1128
+ /* @__PURE__ */ e.jsxs(
1025
1129
  "select",
1026
1130
  {
1027
1131
  ref: f,
1028
1132
  id: h,
1029
- required: i,
1133
+ required: c,
1030
1134
  disabled: n || o,
1031
- "aria-invalid": I,
1032
- "aria-describedby": k,
1033
- "aria-errormessage": I ? g : void 0,
1135
+ "aria-invalid": j,
1136
+ "aria-describedby": v,
1137
+ "aria-errormessage": j ? g : void 0,
1034
1138
  onChange: u,
1035
- className: y(
1036
- Ae({
1037
- state: I ? "error" : o ? "readOnly" : "default"
1139
+ className: x(
1140
+ Le({
1141
+ state: j ? "error" : o ? "readOnly" : "default"
1038
1142
  }),
1039
1143
  "h-9 pl-3"
1040
1144
  ),
1041
1145
  ...p,
1042
1146
  children: [
1043
- c && /* @__PURE__ */ t.jsx("option", { value: "", disabled: !0, hidden: !0, children: c }),
1147
+ i && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: i }),
1044
1148
  l
1045
1149
  ]
1046
1150
  }
1047
1151
  ),
1048
- /* @__PURE__ */ t.jsx(
1152
+ /* @__PURE__ */ e.jsx(
1049
1153
  "div",
1050
1154
  {
1051
- className: y(
1155
+ className: x(
1052
1156
  "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-transform duration-200"
1053
1157
  ),
1054
- children: /* @__PURE__ */ t.jsx(O, { as: le, size: "sm", color: "gray", "aria-hidden": "true" })
1158
+ children: /* @__PURE__ */ e.jsx(P, { as: de, size: "sm", color: "gray", "aria-hidden": "true" })
1055
1159
  }
1056
1160
  )
1057
1161
  ] }),
1058
- I && /* @__PURE__ */ t.jsx(
1162
+ j && /* @__PURE__ */ e.jsx(
1059
1163
  "div",
1060
1164
  {
1061
1165
  id: g,
@@ -1065,15 +1169,15 @@ const Z = b.forwardRef(
1065
1169
  children: a
1066
1170
  }
1067
1171
  ),
1068
- !I && r && /* @__PURE__ */ t.jsx("div", { id: w, className: "mt-1 text-sm text-gray-600", children: r })
1172
+ !j && r && /* @__PURE__ */ e.jsx("div", { id: y, className: "mt-1 text-sm text-gray-600", children: r })
1069
1173
  ] });
1070
1174
  }
1071
1175
  );
1072
- Z.displayName = "SelectInput";
1073
- const ht = Object.assign(Z, {
1074
- Option: X,
1075
- OptionGroup: Y
1076
- }), We = N(
1176
+ ee.displayName = "SelectInput";
1177
+ const gt = Object.assign(ee, {
1178
+ Option: Y,
1179
+ OptionGroup: Z
1180
+ }), Te = N(
1077
1181
  "flex gap-3 cursor-pointer border-b border-border select-none transition-colors",
1078
1182
  {
1079
1183
  variants: {
@@ -1102,7 +1206,7 @@ const ht = Object.assign(Z, {
1102
1206
  hideCheckbox: !1
1103
1207
  }
1104
1208
  }
1105
- ), Le = N(
1209
+ ), qe = N(
1106
1210
  "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",
1107
1211
  {
1108
1212
  variants: {
@@ -1120,57 +1224,57 @@ const ht = Object.assign(Z, {
1120
1224
  disabled: !1
1121
1225
  }
1122
1226
  }
1123
- ), Te = P(
1227
+ ), Ge = z(
1124
1228
  ({
1125
- value: e,
1229
+ value: t,
1126
1230
  children: r,
1127
1231
  checked: a,
1128
1232
  id: s,
1129
1233
  className: n,
1130
1234
  disabled: o,
1131
1235
  checkboxPlacement: d = "center",
1132
- hideCheckbox: i = !1,
1133
- ...c
1236
+ hideCheckbox: c = !1,
1237
+ ...i
1134
1238
  }, l) => {
1135
- const u = M(), p = s || u, f = typeof r == "function" ? r(a) : r;
1136
- return /* @__PURE__ */ t.jsxs(
1239
+ const u = B(), p = s || u, f = typeof r == "function" ? r(a) : r;
1240
+ return /* @__PURE__ */ e.jsxs(
1137
1241
  "label",
1138
1242
  {
1139
1243
  htmlFor: p,
1140
- className: y(
1141
- We({
1244
+ className: x(
1245
+ Te({
1142
1246
  checked: !!a,
1143
1247
  disabled: !!o,
1144
1248
  checkboxPlacement: d,
1145
- hideCheckbox: i
1249
+ hideCheckbox: c
1146
1250
  }),
1147
1251
  n
1148
1252
  ),
1149
1253
  "aria-checked": a,
1150
1254
  role: "radio",
1151
- "aria-label": `Select ${e}`,
1255
+ "aria-label": `Select ${t}`,
1152
1256
  tabIndex: o ? -1 : 0,
1153
1257
  children: [
1154
- /* @__PURE__ */ t.jsx(
1258
+ /* @__PURE__ */ e.jsx(
1155
1259
  "input",
1156
1260
  {
1157
1261
  ref: l,
1158
1262
  id: p,
1159
1263
  type: "radio",
1160
- value: e,
1264
+ value: t,
1161
1265
  checked: a,
1162
1266
  disabled: o,
1163
1267
  className: "sr-only",
1164
1268
  "aria-hidden": !0,
1165
1269
  "aria-checked": a,
1166
- ...c
1270
+ ...i
1167
1271
  }
1168
1272
  ),
1169
- !i && /* @__PURE__ */ t.jsx(
1273
+ !c && /* @__PURE__ */ e.jsx(
1170
1274
  "span",
1171
1275
  {
1172
- className: y(
1173
- Le({
1276
+ className: x(
1277
+ qe({
1174
1278
  checked: !!a,
1175
1279
  disabled: !!o
1176
1280
  }),
@@ -1183,14 +1287,14 @@ const ht = Object.assign(Z, {
1183
1287
  "aria-hidden": "true"
1184
1288
  }
1185
1289
  ),
1186
- /* @__PURE__ */ t.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1290
+ /* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1187
1291
  ]
1188
1292
  }
1189
1293
  );
1190
1294
  }
1191
1295
  );
1192
- Te.displayName = "SelectableSingleInput";
1193
- const Ge = N(
1296
+ Ge.displayName = "SelectableSingleInput";
1297
+ const Ke = N(
1194
1298
  "flex gap-3 cursor-pointer border-b border-border select-none transition-colors",
1195
1299
  {
1196
1300
  variants: {
@@ -1219,7 +1323,7 @@ const Ge = N(
1219
1323
  hideCheckbox: !1
1220
1324
  }
1221
1325
  }
1222
- ), qe = N(
1326
+ ), _e = N(
1223
1327
  "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",
1224
1328
  {
1225
1329
  variants: {
@@ -1237,57 +1341,57 @@ const Ge = N(
1237
1341
  disabled: !1
1238
1342
  }
1239
1343
  }
1240
- ), Ke = P(
1344
+ ), He = z(
1241
1345
  ({
1242
- value: e,
1346
+ value: t,
1243
1347
  children: r,
1244
1348
  checked: a,
1245
1349
  id: s,
1246
1350
  className: n,
1247
1351
  disabled: o,
1248
1352
  checkboxPlacement: d = "center",
1249
- hideCheckbox: i = !1,
1250
- ...c
1353
+ hideCheckbox: c = !1,
1354
+ ...i
1251
1355
  }, l) => {
1252
- const u = M(), p = s || u, f = typeof r == "function" ? r(a) : r;
1253
- return /* @__PURE__ */ t.jsxs(
1356
+ const u = B(), p = s || u, f = typeof r == "function" ? r(a) : r;
1357
+ return /* @__PURE__ */ e.jsxs(
1254
1358
  "label",
1255
1359
  {
1256
1360
  htmlFor: p,
1257
- className: y(
1258
- Ge({
1361
+ className: x(
1362
+ Ke({
1259
1363
  checked: !!a,
1260
1364
  disabled: !!o,
1261
1365
  checkboxPlacement: d,
1262
- hideCheckbox: i
1366
+ hideCheckbox: c
1263
1367
  }),
1264
1368
  n
1265
1369
  ),
1266
1370
  "aria-checked": a,
1267
1371
  role: "checkbox",
1268
- "aria-label": `Select ${e}`,
1372
+ "aria-label": `Select ${t}`,
1269
1373
  tabIndex: o ? -1 : 0,
1270
1374
  children: [
1271
- /* @__PURE__ */ t.jsx(
1375
+ /* @__PURE__ */ e.jsx(
1272
1376
  "input",
1273
1377
  {
1274
1378
  ref: l,
1275
1379
  id: p,
1276
1380
  type: "checkbox",
1277
- value: e,
1381
+ value: t,
1278
1382
  checked: a,
1279
1383
  disabled: o,
1280
1384
  className: "sr-only",
1281
1385
  "aria-hidden": !0,
1282
1386
  "aria-checked": a,
1283
- ...c
1387
+ ...i
1284
1388
  }
1285
1389
  ),
1286
- !i && /* @__PURE__ */ t.jsx(
1390
+ !c && /* @__PURE__ */ e.jsx(
1287
1391
  "span",
1288
1392
  {
1289
- className: y(
1290
- qe({
1393
+ className: x(
1394
+ _e({
1291
1395
  checked: !!a,
1292
1396
  disabled: !!o
1293
1397
  }),
@@ -1300,14 +1404,14 @@ const Ge = N(
1300
1404
  "aria-hidden": "true"
1301
1405
  }
1302
1406
  ),
1303
- /* @__PURE__ */ t.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1407
+ /* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1304
1408
  ]
1305
1409
  }
1306
1410
  );
1307
1411
  }
1308
1412
  );
1309
- Ke.displayName = "SelectableMultipleInput";
1310
- const _e = N(
1413
+ He.displayName = "SelectableMultipleInput";
1414
+ const Je = N(
1311
1415
  "relative inline-flex items-center h-5 w-10 rounded-full transition-colors duration-200 border border-transparent",
1312
1416
  {
1313
1417
  variants: {
@@ -1325,7 +1429,7 @@ const _e = N(
1325
1429
  checked: !1
1326
1430
  }
1327
1431
  }
1328
- ), He = N(
1432
+ ), Qe = N(
1329
1433
  "absolute h-4 w-4 rounded-full transition-transform duration-200",
1330
1434
  {
1331
1435
  variants: {
@@ -1338,68 +1442,68 @@ const _e = N(
1338
1442
  checked: !1
1339
1443
  }
1340
1444
  }
1341
- ), Je = ({ disabled: e = !1, checked: r = !1, className: a }) => /* @__PURE__ */ t.jsx(
1445
+ ), Ue = ({ disabled: t = !1, checked: r = !1, className: a }) => /* @__PURE__ */ e.jsx(
1342
1446
  "span",
1343
1447
  {
1344
- className: y(
1345
- _e({ disabled: e, checked: r }),
1448
+ className: x(
1449
+ Je({ disabled: t, checked: r }),
1346
1450
  "pointer-events-none",
1347
1451
  a
1348
1452
  ),
1349
1453
  "aria-hidden": "true"
1350
1454
  }
1351
- ), Qe = ({ checked: e = !1 }) => /* @__PURE__ */ t.jsx("span", { className: y(He({ checked: e })), "aria-hidden": "true" }), Ue = ({ label: e, htmlFor: r, disabled: a = !1, required: s = !1 }) => e ? /* @__PURE__ */ t.jsxs(
1455
+ ), Xe = ({ checked: t = !1 }) => /* @__PURE__ */ e.jsx("span", { className: x(Qe({ checked: t })), "aria-hidden": "true" }), Ye = ({ label: t, htmlFor: r, disabled: a = !1, required: s = !1 }) => t ? /* @__PURE__ */ e.jsxs(
1352
1456
  "label",
1353
1457
  {
1354
1458
  htmlFor: r,
1355
- className: y(
1459
+ className: x(
1356
1460
  "text-sm select-none font-medium text-foreground",
1357
1461
  a && "opacity-50 cursor-not-allowed"
1358
1462
  ),
1359
1463
  children: [
1360
- e,
1361
- s && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1464
+ t,
1465
+ s && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1362
1466
  ]
1363
1467
  }
1364
- ) : null, Xe = b.forwardRef(
1468
+ ) : null, Ze = b.forwardRef(
1365
1469
  ({
1366
- value: e,
1470
+ value: t,
1367
1471
  onChange: r,
1368
1472
  label: a,
1369
1473
  disabled: s = !1,
1370
1474
  required: n = !1,
1371
1475
  className: o,
1372
1476
  id: d,
1373
- ariaLabel: i,
1374
- ...c
1477
+ ariaLabel: c,
1478
+ ...i
1375
1479
  }, l) => {
1376
- const u = b.useId(), p = d || u, f = e ?? !1, m = (h) => {
1480
+ const u = b.useId(), p = d || u, f = t ?? !1, m = (h) => {
1377
1481
  r?.(h.target.checked);
1378
1482
  };
1379
- return /* @__PURE__ */ t.jsxs("div", { className: y("inline-flex items-center gap-2", o), children: [
1380
- /* @__PURE__ */ t.jsxs("span", { className: "relative inline-flex items-center", children: [
1381
- /* @__PURE__ */ t.jsx(
1483
+ return /* @__PURE__ */ e.jsxs("div", { className: x("inline-flex items-center gap-2", o), children: [
1484
+ /* @__PURE__ */ e.jsxs("span", { className: "relative inline-flex items-center", children: [
1485
+ /* @__PURE__ */ e.jsx(
1382
1486
  "input",
1383
1487
  {
1384
1488
  ref: l,
1385
1489
  type: "checkbox",
1386
1490
  role: "switch",
1387
1491
  id: p,
1388
- "aria-label": i || a,
1492
+ "aria-label": c || a,
1389
1493
  "aria-checked": f,
1390
1494
  checked: f,
1391
1495
  disabled: s,
1392
1496
  required: n,
1393
1497
  onChange: m,
1394
1498
  className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10 disabled:cursor-not-allowed",
1395
- ...c
1499
+ ...i
1396
1500
  }
1397
1501
  ),
1398
- /* @__PURE__ */ t.jsx(Je, { disabled: s, checked: f }),
1399
- /* @__PURE__ */ t.jsx(Qe, { checked: f })
1502
+ /* @__PURE__ */ e.jsx(Ue, { disabled: s, checked: f }),
1503
+ /* @__PURE__ */ e.jsx(Xe, { checked: f })
1400
1504
  ] }),
1401
- /* @__PURE__ */ t.jsx(
1402
- Ue,
1505
+ /* @__PURE__ */ e.jsx(
1506
+ Ye,
1403
1507
  {
1404
1508
  label: a,
1405
1509
  htmlFor: p,
@@ -1410,8 +1514,8 @@ const _e = N(
1410
1514
  ] });
1411
1515
  }
1412
1516
  );
1413
- Xe.displayName = "SwitchInput";
1414
- const Ye = N(
1517
+ Ze.displayName = "SwitchInput";
1518
+ const et = N(
1415
1519
  "block w-full rounded-md border bg-white text-foreground transition-colors focus:outline-none overflow-y-auto whitespace-pre-wrap break-words",
1416
1520
  {
1417
1521
  variants: {
@@ -1426,116 +1530,116 @@ const Ye = N(
1426
1530
  state: "default"
1427
1531
  }
1428
1532
  }
1429
- ), Ze = (e, r, a) => e ? "disabled" : r ? "readOnly" : a ? "error" : "default", et = (e, r, a) => {
1533
+ ), tt = (t, r, a) => t ? "disabled" : r ? "readOnly" : a ? "error" : "default", rt = (t, r, a) => {
1430
1534
  if (r || a) {
1431
- e.preventDefault();
1535
+ t.preventDefault();
1432
1536
  return;
1433
1537
  }
1434
- e.preventDefault();
1435
- const s = e.clipboardData.getData("text/plain"), n = window.getSelection();
1538
+ t.preventDefault();
1539
+ const s = t.clipboardData.getData("text/plain"), n = window.getSelection();
1436
1540
  if (!n || !n.rangeCount) return;
1437
1541
  n.deleteFromDocument();
1438
1542
  const o = n.getRangeAt(0), d = document.createTextNode(s);
1439
1543
  o.insertNode(d), o.setStartAfter(d), o.setEndAfter(d), n.removeAllRanges(), n.addRange(o);
1440
- const i = new Event("input", { bubbles: !0 });
1441
- e.currentTarget.dispatchEvent(i);
1442
- }, tt = b.forwardRef(
1544
+ const c = new Event("input", { bubbles: !0 });
1545
+ t.currentTarget.dispatchEvent(c);
1546
+ }, at = b.forwardRef(
1443
1547
  ({
1444
- label: e,
1548
+ label: t,
1445
1549
  helperText: r,
1446
1550
  error: a,
1447
1551
  className: s,
1448
1552
  disabled: n,
1449
1553
  readOnly: o,
1450
1554
  id: d,
1451
- value: i,
1452
- defaultValue: c,
1555
+ value: c,
1556
+ defaultValue: i,
1453
1557
  onChange: l,
1454
1558
  placeholder: u,
1455
1559
  name: p,
1456
1560
  row: f = 3,
1457
1561
  required: m,
1458
1562
  onBlur: h,
1459
- onFocus: w,
1563
+ onFocus: y,
1460
1564
  onKeyDown: g,
1461
- ...I
1462
- }, k) => {
1463
- const C = b.useId(), V = d || C, R = !!a, D = b.useRef(null), [B, A] = b.useState(c || ""), v = i !== void 0, x = v ? i : B;
1464
- b.useImperativeHandle(k, () => D.current), b.useEffect(() => {
1465
- D.current && D.current.textContent !== x && (D.current.textContent = x);
1466
- }, [x]);
1467
- const j = Ze(n, o, R), S = !x && u, ee = (z) => {
1468
- const L = z.currentTarget.textContent || "";
1469
- v || A(L), l?.(L);
1470
- }, te = (z) => {
1565
+ ...j
1566
+ }, 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) => {
1471
1575
  if (n || o) {
1472
- z.preventDefault();
1576
+ O.preventDefault();
1473
1577
  return;
1474
1578
  }
1475
- g?.(z);
1476
- }, re = () => {
1579
+ g?.(O);
1580
+ }, ae = () => {
1477
1581
  D.current?.focus();
1478
1582
  };
1479
- return /* @__PURE__ */ t.jsxs("div", { children: [
1480
- e && /* @__PURE__ */ t.jsxs(
1583
+ return /* @__PURE__ */ e.jsxs("div", { children: [
1584
+ t && /* @__PURE__ */ e.jsxs(
1481
1585
  "label",
1482
1586
  {
1483
- htmlFor: V,
1587
+ htmlFor: R,
1484
1588
  className: "block text-sm font-medium text-foreground mb-2 cursor-pointer",
1485
- onClick: re,
1589
+ onClick: ae,
1486
1590
  children: [
1487
- e,
1488
- m && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1591
+ t,
1592
+ m && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1489
1593
  ]
1490
1594
  }
1491
1595
  ),
1492
- /* @__PURE__ */ t.jsx("div", { className: y("relative w-full", s), children: /* @__PURE__ */ t.jsx(
1596
+ /* @__PURE__ */ e.jsx("div", { className: x("relative w-full", s), children: /* @__PURE__ */ e.jsx(
1493
1597
  "div",
1494
1598
  {
1495
1599
  ref: D,
1496
- id: V,
1600
+ id: R,
1497
1601
  role: "textbox",
1498
1602
  "aria-multiline": "true",
1499
- "aria-invalid": R,
1603
+ "aria-invalid": C,
1500
1604
  "aria-disabled": n,
1501
1605
  "aria-readonly": o,
1502
1606
  "aria-required": m,
1503
- "aria-label": typeof e == "string" ? e : void 0,
1607
+ "aria-label": typeof t == "string" ? t : void 0,
1504
1608
  contentEditable: !n && !o,
1505
1609
  "data-name": p,
1506
- onInput: ee,
1507
- onKeyDown: te,
1508
- onPaste: (z) => et(z, n, o),
1610
+ onInput: te,
1611
+ onKeyDown: re,
1612
+ onPaste: (O) => rt(O, n, o),
1509
1613
  onBlur: h,
1510
- onFocus: w,
1614
+ onFocus: y,
1511
1615
  suppressContentEditableWarning: !0,
1512
1616
  style: { minHeight: `${f * 1.5 + 1}rem` },
1513
- className: y(
1514
- Ye({ state: j }),
1617
+ className: x(
1618
+ et({ state: I }),
1515
1619
  "px-3 py-2",
1516
1620
  S && "empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400"
1517
1621
  ),
1518
1622
  "data-placeholder": u,
1519
- ...I
1623
+ ...j
1520
1624
  }
1521
1625
  ) }),
1522
- R && /* @__PURE__ */ t.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: a }),
1523
- !R && r && /* @__PURE__ */ t.jsx("div", { className: "mt-1 text-sm text-gray-600", children: r })
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 })
1524
1628
  ] });
1525
1629
  }
1526
1630
  );
1527
- tt.displayName = "TextAreaInput";
1528
- const bt = P(function(r, a) {
1631
+ at.displayName = "TextAreaInput";
1632
+ const xt = z(function(r, a) {
1529
1633
  const s = (n) => {
1530
1634
  r?.onChange?.(n.target.value);
1531
1635
  };
1532
- return /* @__PURE__ */ t.jsx(
1636
+ return /* @__PURE__ */ e.jsx(
1533
1637
  $,
1534
1638
  {
1535
1639
  type: "time",
1536
1640
  tabIndex: 0,
1537
1641
  "aria-hidden": "true",
1538
- leftContent: /* @__PURE__ */ t.jsx(O, { as: de, color: "inherit", size: "sm" }),
1642
+ leftContent: /* @__PURE__ */ e.jsx(P, { as: ue, color: "inherit", size: "sm" }),
1539
1643
  ref: a,
1540
1644
  ...r,
1541
1645
  onChange: s
@@ -1543,20 +1647,21 @@ const bt = P(function(r, a) {
1543
1647
  );
1544
1648
  });
1545
1649
  export {
1546
- it as C,
1547
- dt as D,
1548
- ut as E,
1549
- Ve as P,
1550
- pt as R,
1551
- mt as S,
1650
+ lt as C,
1651
+ ft as D,
1652
+ pt as E,
1653
+ De as P,
1654
+ ht as R,
1655
+ bt as S,
1552
1656
  $ as T,
1553
- ct as a,
1554
- lt as b,
1555
- ft as c,
1556
- ht as d,
1557
- Te as e,
1558
- Ke as f,
1559
- Xe as g,
1560
- tt as h,
1561
- bt as i
1657
+ dt as a,
1658
+ ut as b,
1659
+ mt as c,
1660
+ gt as d,
1661
+ Ge as e,
1662
+ He as f,
1663
+ Ze as g,
1664
+ J as h,
1665
+ at as i,
1666
+ xt as j
1562
1667
  };