@dimasbaguspm/versaur 0.0.60 → 0.0.62

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.
Files changed (33) hide show
  1. package/dist/js/forms/index.js +1 -1
  2. package/dist/js/{image-rectangle-CCvXv24a.js → image-rectangle-BwT5taeR.js} +694 -634
  3. package/dist/js/index.js +63 -61
  4. package/dist/js/layouts/index.js +1 -1
  5. package/dist/js/navigation/index.js +1 -1
  6. package/dist/js/overlays/index.js +2 -2
  7. package/dist/js/primitive/index.js +27 -25
  8. package/dist/js/{tabs-BQs53hHL.js → tabs-FDdFo4WV.js} +1 -1
  9. package/dist/js/{time-picker-input-Disd231b.js → time-picker-input-DMNSwm-p.js} +854 -642
  10. package/dist/js/tooltip-BGJUYNL0.js +625 -0
  11. package/dist/js/{top-bar-DMBbEIlR.js → top-bar-ChNgZEQx.js} +157 -187
  12. package/dist/types/forms/textarea-input/index.d.ts +1 -1
  13. package/dist/types/forms/textarea-input/textarea-input.atoms.d.ts +53 -0
  14. package/dist/types/forms/textarea-input/textarea-input.d.ts +1 -0
  15. package/dist/types/forms/textarea-input/types.d.ts +28 -0
  16. package/dist/types/forms/textarea-input/use-textarea-formatting.d.ts +21 -0
  17. package/dist/types/overlays/drawer/drawer.atoms.d.ts +2 -7
  18. package/dist/types/overlays/drawer/drawer.d.ts +1 -1
  19. package/dist/types/overlays/drawer/types.d.ts +1 -11
  20. package/dist/types/overlays/modal/modal.atoms.d.ts +1 -5
  21. package/dist/types/overlays/modal/types.d.ts +1 -2
  22. package/dist/types/primitive/formatted-text/formatted-text.d.ts +10 -0
  23. package/dist/types/primitive/formatted-text/index.d.ts +3 -0
  24. package/dist/types/primitive/formatted-text/types.d.ts +19 -0
  25. package/dist/types/primitive/heading/types.d.ts +9 -12
  26. package/dist/types/primitive/index.d.ts +1 -0
  27. package/dist/types/primitive/text/text.d.ts +6 -3
  28. package/dist/types/primitive/text/types.d.ts +10 -18
  29. package/dist/types/primitive/tile/tile.d.ts +7 -1
  30. package/dist/types/primitive/tile/types.d.ts +6 -1
  31. package/dist/utils/enforce-subpath-import.js +2 -0
  32. package/package.json +2 -1
  33. package/dist/js/tooltip-Dpx3TpR6.js +0 -693
@@ -1,10 +1,10 @@
1
- import { j as e } from "./jsx-runtime-C5mzlN2N.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 { c as C, a as x } from "./index-BDtz_hQY.js";
4
- import { I as $ } from "./image-rectangle-CCvXv24a.js";
5
- import { Calendar as oe, MailIcon as ie, Banknote as ce, SearchIcon as le, ChevronDown as de, Clock as ue } from "lucide-react";
1
+ import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
+ import p, { createContext as M, useContext as A, useId as T, forwardRef as $, useRef as G, useEffect as _, useState as K } from "react";
3
+ import { c as N, a as x } from "./index-BDtz_hQY.js";
4
+ import { I as P, l as xe, n as ye } from "./image-rectangle-BwT5taeR.js";
5
+ import { Calendar as we, MailIcon as ke, Banknote as ve, SearchIcon as je, ChevronDown as Ie, BoldIcon as Ce, ItalicIcon as Ne, UnderlineIcon as Se, StrikethroughIcon as Ve, Heading1Icon as Re, Heading2Icon as De, Heading3Icon as Le, ListOrderedIcon as Oe, ListIcon as ze, LinkIcon as $e, Clock as Ee } from "lucide-react";
6
6
  import "./snackbar-CTq4MLir.js";
7
- const fe = C("space-y-2", {
7
+ const Pe = N("space-y-2", {
8
8
  variants: {
9
9
  direction: {
10
10
  vertical: "space-y-2 space-x-0",
@@ -14,9 +14,9 @@ const fe = C("space-y-2", {
14
14
  defaultVariants: {
15
15
  direction: "vertical"
16
16
  }
17
- }), pe = C(
17
+ }), Fe = N(
18
18
  "relative h-4 w-4 rounded border cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed appearance-none bg-white border-primary/40 checked:bg-primary checked:border-primary focus:ring-primary/20"
19
- ), me = C(
19
+ ), Be = N(
20
20
  "text-sm text-foreground cursor-pointer select-none",
21
21
  {
22
22
  variants: {
@@ -29,45 +29,45 @@ const fe = C("space-y-2", {
29
29
  disabled: !1
30
30
  }
31
31
  }
32
- ), q = F(null), he = () => {
33
- const t = B(q);
34
- if (!t)
32
+ ), J = M(null), Me = () => {
33
+ const e = A(J);
34
+ if (!e)
35
35
  throw new Error("CheckboxOption must be used within CheckboxInput");
36
- return t;
37
- }, G = m.forwardRef(({ children: t, description: r, className: a, disabled: s, id: n, ...o }, d) => {
38
- const l = he(), c = m.useId(), i = n || c, u = s || l.disabled;
39
- return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
40
- /* @__PURE__ */ e.jsx("div", { className: "relative flex items-center mt-0.5", children: /* @__PURE__ */ e.jsx(
36
+ return e;
37
+ }, Q = p.forwardRef(({ children: e, description: r, className: n, disabled: s, id: a, ...i }, d) => {
38
+ const l = Me(), c = p.useId(), o = a || c, u = s || l.disabled;
39
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex items-start gap-2", children: [
40
+ /* @__PURE__ */ t.jsx("div", { className: "relative flex items-center mt-0.5", children: /* @__PURE__ */ t.jsx(
41
41
  "input",
42
42
  {
43
43
  ref: d,
44
44
  type: "checkbox",
45
- id: i,
45
+ id: o,
46
46
  disabled: u,
47
47
  className: x(
48
- pe(),
48
+ Fe(),
49
49
  // Custom checkmark styling using ::after - centered positioning
50
50
  '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',
51
51
  // Checkmark dimensions for md size (default)
52
52
  "after:w-[4px] after:h-[8px]",
53
53
  "checked:after:opacity-100",
54
- a
54
+ n
55
55
  ),
56
- ...o
56
+ ...i
57
57
  }
58
58
  ) }),
59
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
60
- /* @__PURE__ */ e.jsx(
59
+ /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
60
+ /* @__PURE__ */ t.jsx(
61
61
  "label",
62
62
  {
63
- htmlFor: i,
64
- className: me({
63
+ htmlFor: o,
64
+ className: Be({
65
65
  disabled: u
66
66
  }),
67
- children: t
67
+ children: e
68
68
  }
69
69
  ),
70
- r && /* @__PURE__ */ e.jsx(
70
+ r && /* @__PURE__ */ t.jsx(
71
71
  "div",
72
72
  {
73
73
  className: x(
@@ -80,53 +80,53 @@ const fe = C("space-y-2", {
80
80
  ] })
81
81
  ] });
82
82
  });
83
- G.displayName = "CheckboxOption";
84
- const K = m.forwardRef(
83
+ Q.displayName = "CheckboxOption";
84
+ const X = p.forwardRef(
85
85
  ({
86
- label: t,
86
+ label: e,
87
87
  helperText: r,
88
- error: a,
88
+ error: n,
89
89
  direction: s = "vertical",
90
- className: n,
91
- disabled: o,
90
+ className: a,
91
+ disabled: i,
92
92
  required: d,
93
93
  children: l,
94
94
  ...c
95
- }, i) => {
96
- const u = !!a, p = {
97
- disabled: o
95
+ }, o) => {
96
+ const u = !!n, m = {
97
+ disabled: i
98
98
  };
99
- return /* @__PURE__ */ e.jsx(q.Provider, { value: p, children: /* @__PURE__ */ e.jsxs(
99
+ return /* @__PURE__ */ t.jsx(J.Provider, { value: m, children: /* @__PURE__ */ t.jsxs(
100
100
  "fieldset",
101
101
  {
102
- ref: i,
103
- disabled: o,
104
- className: x("w-full border-0 p-0 m-0", n),
102
+ ref: o,
103
+ disabled: i,
104
+ className: x("w-full border-0 p-0 m-0", a),
105
105
  ...c,
106
106
  children: [
107
- t && /* @__PURE__ */ e.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3", children: [
108
- t,
109
- d && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
107
+ e && /* @__PURE__ */ t.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3", children: [
108
+ e,
109
+ d && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
110
110
  ] }),
111
- /* @__PURE__ */ e.jsx("div", { className: fe({ direction: s }), children: l }),
112
- u && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
113
- !u && r && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: r })
111
+ /* @__PURE__ */ t.jsx("div", { className: Pe({ direction: s }), children: l }),
112
+ u && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
113
+ !u && r && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: r })
114
114
  ]
115
115
  }
116
116
  ) });
117
117
  }
118
118
  );
119
- K.displayName = "CheckboxInput";
120
- const dt = Object.assign(K, {
121
- Option: G
122
- }), _ = F(null), be = () => {
123
- const t = B(_);
124
- if (!t)
119
+ X.displayName = "CheckboxInput";
120
+ const Ft = Object.assign(X, {
121
+ Option: Q
122
+ }), Y = M(null), Ae = () => {
123
+ const e = A(Y);
124
+ if (!e)
125
125
  throw new Error(
126
126
  "useChipSingleInputContext must be used within ChipSingleInputContext"
127
127
  );
128
- return t;
129
- }, ge = C(
128
+ return e;
129
+ }, Te = N(
130
130
  "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",
131
131
  {
132
132
  variants: {
@@ -140,35 +140,35 @@ const dt = Object.assign(K, {
140
140
  size: "md"
141
141
  }
142
142
  }
143
- ), xe = m.forwardRef(({ children: t, className: r, disabled: a, id: s, value: n, ...o }, d) => {
144
- 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) => {
145
- !f && !h && i.onChange?.(n), o.onChange?.(g);
143
+ ), qe = p.forwardRef(({ children: e, className: r, disabled: n, id: s, value: a, ...i }, d) => {
144
+ const { size: l = "md", maxWidth: c, ...o } = Ae(), u = T(), m = s || u, f = n || o.disabled, h = o.readOnly, b = o.value === a, w = (g) => {
145
+ !f && !h && o.onChange?.(a), i.onChange?.(g);
146
146
  };
147
- return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
148
- /* @__PURE__ */ e.jsx(
147
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
148
+ /* @__PURE__ */ t.jsx(
149
149
  "input",
150
150
  {
151
151
  ref: d,
152
152
  type: "radio",
153
- id: p,
154
- name: i.name,
155
- value: n,
153
+ id: m,
154
+ name: o.name,
155
+ value: a,
156
156
  checked: b,
157
157
  disabled: f,
158
158
  readOnly: h,
159
159
  onChange: w,
160
160
  className: "sr-only",
161
- ...o
161
+ ...i
162
162
  }
163
163
  ),
164
- /* @__PURE__ */ e.jsx(
164
+ /* @__PURE__ */ t.jsx(
165
165
  "label",
166
166
  {
167
- htmlFor: p,
167
+ htmlFor: m,
168
168
  "data-selected": b,
169
169
  style: c ? { maxWidth: c } : void 0,
170
170
  className: x(
171
- ge({
171
+ Te({
172
172
  size: l
173
173
  }),
174
174
  f && "opacity-50 cursor-not-allowed pointer-events-none",
@@ -176,75 +176,75 @@ const dt = Object.assign(K, {
176
176
  c && "overflow-hidden",
177
177
  r
178
178
  ),
179
- children: /* @__PURE__ */ e.jsx(
179
+ children: /* @__PURE__ */ t.jsx(
180
180
  "span",
181
181
  {
182
182
  className: x(
183
183
  "flex items-center gap-2",
184
184
  c && "truncate min-w-0"
185
185
  ),
186
- children: t
186
+ children: e
187
187
  }
188
188
  )
189
189
  }
190
190
  )
191
191
  ] });
192
- }), ye = O(
192
+ }), He = $(
193
193
  ({
194
- size: t = "md",
194
+ size: e = "md",
195
195
  label: r,
196
- required: a,
196
+ required: n,
197
197
  helperText: s,
198
- error: n,
199
- className: o,
198
+ error: a,
199
+ className: i,
200
200
  disabled: d,
201
201
  readOnly: l,
202
202
  maxWidth: c,
203
- name: i,
203
+ name: o,
204
204
  value: u,
205
- onChange: p,
205
+ onChange: m,
206
206
  children: f,
207
207
  ...h
208
208
  }, b) => {
209
- const w = !!n, g = {
210
- size: t,
209
+ const w = !!a, g = {
210
+ size: e,
211
211
  disabled: d,
212
212
  readOnly: l,
213
213
  error: w,
214
- name: i,
214
+ name: o,
215
215
  value: u,
216
216
  maxWidth: c,
217
- onChange: p
217
+ onChange: m
218
218
  };
219
- return /* @__PURE__ */ e.jsx(_.Provider, { value: g, children: /* @__PURE__ */ e.jsxs(
219
+ return /* @__PURE__ */ t.jsx(Y.Provider, { value: g, children: /* @__PURE__ */ t.jsxs(
220
220
  "fieldset",
221
221
  {
222
222
  ref: b,
223
- className: x("w-full border-0 p-0 m-0", o),
223
+ className: x("w-full border-0 p-0 m-0", i),
224
224
  disabled: d,
225
225
  ...h,
226
226
  children: [
227
- r && /* @__PURE__ */ e.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
227
+ r && /* @__PURE__ */ t.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
228
228
  r,
229
- a && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
229
+ n && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
230
230
  ] }),
231
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
232
- w && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
233
- !w && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
231
+ /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
232
+ w && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
233
+ !w && s && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
234
234
  ]
235
235
  }
236
236
  ) });
237
237
  }
238
- ), ut = Object.assign(ye, {
239
- Option: xe
240
- }), H = F(null), we = () => {
241
- const t = B(H);
242
- if (!t)
238
+ ), Bt = Object.assign(He, {
239
+ Option: qe
240
+ }), Z = M(null), We = () => {
241
+ const e = A(Z);
242
+ if (!e)
243
243
  throw new Error(
244
244
  "useChipMultipleInputContext must be used within ChipMultipleInputContext"
245
245
  );
246
- return t;
247
- }, ve = C(
246
+ return e;
247
+ }, Ue = N(
248
248
  "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",
249
249
  {
250
250
  variants: {
@@ -258,40 +258,40 @@ const dt = Object.assign(K, {
258
258
  size: "md"
259
259
  }
260
260
  }
261
- ), je = m.forwardRef(({ children: t, className: r, disabled: a, id: s, value: n, ...o }, d) => {
262
- 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) => {
261
+ ), Ge = p.forwardRef(({ children: e, className: r, disabled: n, id: s, value: a, ...i }, d) => {
262
+ const { size: l = "md", maxWidth: c, ...o } = We(), u = T(), m = s || u, f = n || o.disabled, h = o.readOnly, b = o.value?.includes(a) ?? !1, w = (g) => {
263
263
  if (!f && !h) {
264
- const k = i.value || [];
265
- let v;
266
- b ? v = k.filter((N) => N !== n) : v = [...k, n], i.onChange?.(v);
264
+ const y = o.value || [];
265
+ let k;
266
+ b ? k = y.filter((C) => C !== a) : k = [...y, a], o.onChange?.(k);
267
267
  }
268
- o.onChange?.(g);
268
+ i.onChange?.(g);
269
269
  };
270
- return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
271
- /* @__PURE__ */ e.jsx(
270
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
271
+ /* @__PURE__ */ t.jsx(
272
272
  "input",
273
273
  {
274
274
  ref: d,
275
275
  type: "checkbox",
276
- id: p,
277
- name: `${i.name}[]`,
278
- value: n,
276
+ id: m,
277
+ name: `${o.name}[]`,
278
+ value: a,
279
279
  checked: b,
280
280
  disabled: f,
281
281
  readOnly: h,
282
282
  onChange: w,
283
283
  className: "sr-only",
284
- ...o
284
+ ...i
285
285
  }
286
286
  ),
287
- /* @__PURE__ */ e.jsx(
287
+ /* @__PURE__ */ t.jsx(
288
288
  "label",
289
289
  {
290
- htmlFor: p,
290
+ htmlFor: m,
291
291
  "data-selected": b,
292
292
  style: c ? { maxWidth: c } : void 0,
293
293
  className: x(
294
- ve({
294
+ Ue({
295
295
  size: l
296
296
  }),
297
297
  f && "opacity-50 cursor-not-allowed pointer-events-none",
@@ -299,68 +299,68 @@ const dt = Object.assign(K, {
299
299
  c && "overflow-hidden",
300
300
  r
301
301
  ),
302
- children: /* @__PURE__ */ e.jsx(
302
+ children: /* @__PURE__ */ t.jsx(
303
303
  "span",
304
304
  {
305
305
  className: x(
306
306
  "flex items-center gap-2",
307
307
  c && "truncate min-w-0"
308
308
  ),
309
- children: t
309
+ children: e
310
310
  }
311
311
  )
312
312
  }
313
313
  )
314
314
  ] });
315
- }), ke = O(
315
+ }), _e = $(
316
316
  ({
317
- size: t = "md",
317
+ size: e = "md",
318
318
  label: r,
319
- required: a,
319
+ required: n,
320
320
  helperText: s,
321
- error: n,
322
- className: o,
321
+ error: a,
322
+ className: i,
323
323
  disabled: d,
324
324
  readOnly: l,
325
325
  maxWidth: c,
326
- name: i,
326
+ name: o,
327
327
  value: u = [],
328
- onChange: p,
328
+ onChange: m,
329
329
  children: f,
330
330
  ...h
331
331
  }, b) => {
332
- const w = !!n, g = {
333
- size: t,
332
+ const w = !!a, g = {
333
+ size: e,
334
334
  disabled: d,
335
335
  readOnly: l,
336
336
  error: w,
337
- name: i,
337
+ name: o,
338
338
  value: u,
339
339
  maxWidth: c,
340
- onChange: p
340
+ onChange: m
341
341
  };
342
- return /* @__PURE__ */ e.jsx(H.Provider, { value: g, children: /* @__PURE__ */ e.jsxs(
342
+ return /* @__PURE__ */ t.jsx(Z.Provider, { value: g, children: /* @__PURE__ */ t.jsxs(
343
343
  "fieldset",
344
344
  {
345
345
  ref: b,
346
- className: x("w-full border-0 p-0 m-0", o),
346
+ className: x("w-full border-0 p-0 m-0", i),
347
347
  disabled: d,
348
348
  ...h,
349
349
  children: [
350
- r && /* @__PURE__ */ e.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
350
+ r && /* @__PURE__ */ t.jsxs("legend", { className: "block text-sm font-medium text-foreground mb-3 float-none w-auto", children: [
351
351
  r,
352
- a && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
352
+ n && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
353
353
  ] }),
354
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
355
- w && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
356
- !w && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
354
+ /* @__PURE__ */ t.jsx("div", { className: "flex flex-wrap gap-2", children: f }),
355
+ w && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
356
+ !w && s && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
357
357
  ]
358
358
  }
359
359
  ) });
360
360
  }
361
- ), ft = Object.assign(ke, {
362
- Option: je
363
- }), Ie = C(
361
+ ), Mt = Object.assign(_e, {
362
+ Option: Ge
363
+ }), Ke = N(
364
364
  "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",
365
365
  {
366
366
  variants: {
@@ -374,41 +374,41 @@ const dt = Object.assign(K, {
374
374
  state: "default"
375
375
  }
376
376
  }
377
- ), J = m.forwardRef(
377
+ ), ee = p.forwardRef(
378
378
  ({
379
- label: t,
379
+ label: e,
380
380
  leftContent: r,
381
- rightContent: a,
381
+ rightContent: n,
382
382
  helperText: s,
383
- error: n,
384
- className: o,
383
+ error: a,
384
+ className: i,
385
385
  disabled: d,
386
386
  id: l,
387
387
  required: c,
388
- value: i,
388
+ value: o,
389
389
  displayValue: u,
390
- placeholder: p = "",
390
+ placeholder: m = "",
391
391
  name: f,
392
392
  ...h
393
393
  }, b) => {
394
- 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(() => {
395
- const z = [];
396
- return N ? z.push(v) : s && z.push(k), z.length > 0 ? z.join(" ") : void 0;
397
- }, [N, s, v, k]);
398
- return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", o), children: [
399
- t && /* @__PURE__ */ e.jsxs(
394
+ const w = p.useId(), g = l || w, y = `${g}-helper`, k = `${g}-error`, C = !!a, S = p.useMemo(() => u && u !== "" ? u : m, [u, m]), D = p.useMemo(() => o == null ? "" : typeof o == "string" || typeof o == "number" || typeof o == "boolean" ? String(o) : Array.isArray(o) || typeof o == "object" ? JSON.stringify(o) : String(o), [o]), E = u !== void 0 && u !== "", z = p.useMemo(() => {
395
+ const V = [];
396
+ return C ? V.push(k) : s && V.push(y), V.length > 0 ? V.join(" ") : void 0;
397
+ }, [C, s, k, y]);
398
+ return /* @__PURE__ */ t.jsxs("div", { className: x("w-full", i), children: [
399
+ e && /* @__PURE__ */ t.jsxs(
400
400
  "label",
401
401
  {
402
402
  htmlFor: g,
403
403
  className: "block text-sm font-medium text-foreground mb-2",
404
404
  children: [
405
- t,
406
- c && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
405
+ e,
406
+ c && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
407
407
  ]
408
408
  }
409
409
  ),
410
- /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
411
- r && /* @__PURE__ */ e.jsx(
410
+ /* @__PURE__ */ t.jsxs("div", { className: "relative w-full", children: [
411
+ r && /* @__PURE__ */ t.jsx(
412
412
  "span",
413
413
  {
414
414
  className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5 z-10",
@@ -417,103 +417,103 @@ const dt = Object.assign(K, {
417
417
  children: r
418
418
  }
419
419
  ),
420
- /* @__PURE__ */ e.jsx(
420
+ /* @__PURE__ */ t.jsx(
421
421
  "button",
422
422
  {
423
423
  ref: b,
424
424
  id: g,
425
425
  type: "button",
426
426
  disabled: d,
427
- "aria-invalid": N || void 0,
428
- "aria-describedby": E,
429
- "aria-errormessage": N ? v : void 0,
427
+ "aria-invalid": C || void 0,
428
+ "aria-describedby": z,
429
+ "aria-errormessage": C ? k : void 0,
430
430
  "aria-required": c || void 0,
431
431
  className: x(
432
- Ie({
433
- state: N ? "error" : "default"
432
+ Ke({
433
+ state: C ? "error" : "default"
434
434
  }),
435
435
  r ? "pl-9" : "pl-3",
436
- a ? "pr-9" : "pr-3",
436
+ n ? "pr-9" : "pr-3",
437
437
  "h-9",
438
- !S && "text-gray-400"
438
+ !E && "text-gray-400"
439
439
  ),
440
440
  ...h,
441
- children: V
441
+ children: S
442
442
  }
443
443
  ),
444
- a && /* @__PURE__ */ e.jsx(
444
+ n && /* @__PURE__ */ t.jsx(
445
445
  "span",
446
446
  {
447
447
  className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5 z-10",
448
448
  "aria-hidden": "true",
449
449
  "data-testid": "right-content",
450
- children: a
450
+ children: n
451
451
  }
452
452
  ),
453
- f && /* @__PURE__ */ e.jsx(
453
+ f && /* @__PURE__ */ t.jsx(
454
454
  "input",
455
455
  {
456
456
  type: "hidden",
457
457
  name: f,
458
- value: R,
458
+ value: D,
459
459
  readOnly: !0,
460
460
  "data-testid": "hidden-input"
461
461
  }
462
462
  )
463
463
  ] }),
464
- N && /* @__PURE__ */ e.jsx(
464
+ C && /* @__PURE__ */ t.jsx(
465
465
  "div",
466
466
  {
467
- id: v,
467
+ id: k,
468
468
  className: "mt-1 text-sm text-danger",
469
469
  role: "alert",
470
470
  "aria-live": "polite",
471
- children: n
471
+ children: a
472
472
  }
473
473
  ),
474
- !N && s && /* @__PURE__ */ e.jsx("div", { id: k, className: "mt-1 text-sm text-gray-600", children: s })
474
+ !C && s && /* @__PURE__ */ t.jsx("div", { id: y, className: "mt-1 text-sm text-gray-600", children: s })
475
475
  ] });
476
476
  }
477
477
  );
478
- J.displayName = "TextInputAsButton";
479
- function Ne(t) {
480
- if (!t) return "";
481
- const r = new Date(t);
482
- return isNaN(r.getTime()) ? t : r.toLocaleDateString(void 0, {
478
+ ee.displayName = "TextInputAsButton";
479
+ function Je(e) {
480
+ if (!e) return "";
481
+ const r = new Date(e);
482
+ return isNaN(r.getTime()) ? e : r.toLocaleDateString(void 0, {
483
483
  year: "numeric",
484
484
  month: "short",
485
485
  day: "numeric"
486
486
  });
487
487
  }
488
- const pt = m.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...l }, c) {
489
- const i = T(null), u = (b) => {
490
- i.current = b, typeof c == "function" ? c(b) : c && typeof c == "object" && (c.current = b);
491
- }, p = () => {
492
- i.current && (typeof i.current.showPicker == "function" ? i.current.showPicker() : i.current.focus());
488
+ const At = p.forwardRef(function({ value: r = "", onChange: n, label: s, formatter: a, min: i, max: d, ...l }, c) {
489
+ const o = G(null), u = (b) => {
490
+ o.current = b, typeof c == "function" ? c(b) : c && typeof c == "object" && (c.current = b);
491
+ }, m = () => {
492
+ o.current && (typeof o.current.showPicker == "function" ? o.current.showPicker() : o.current.focus());
493
493
  }, f = (b) => {
494
- a(b.target.value);
495
- }, h = (n ?? Ne)(r);
496
- return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
497
- /* @__PURE__ */ e.jsx(
498
- J,
494
+ n(b.target.value);
495
+ }, h = (a ?? Je)(r);
496
+ return /* @__PURE__ */ t.jsxs("div", { className: "relative", children: [
497
+ /* @__PURE__ */ t.jsx(
498
+ ee,
499
499
  {
500
- onClick: p,
500
+ onClick: m,
501
501
  value: r,
502
502
  displayValue: h,
503
503
  label: s,
504
- leftContent: /* @__PURE__ */ e.jsx($, { as: oe, color: "inherit", size: "sm" }),
504
+ leftContent: /* @__PURE__ */ t.jsx(P, { as: we, color: "inherit", size: "sm" }),
505
505
  "data-testid": "date-single-picker-visible-input",
506
506
  ...l
507
507
  }
508
508
  ),
509
- /* @__PURE__ */ e.jsx(
509
+ /* @__PURE__ */ t.jsx(
510
510
  "input",
511
511
  {
512
512
  ref: u,
513
513
  type: "date",
514
514
  value: r,
515
515
  onChange: f,
516
- min: o,
516
+ min: i,
517
517
  max: d,
518
518
  className: "sr-only absolute opacity-0 h-0 w-0 pointer-events-none",
519
519
  tabIndex: -1,
@@ -521,7 +521,7 @@ const pt = m.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
521
521
  }
522
522
  )
523
523
  ] });
524
- }), Ce = C(
524
+ }), Qe = N(
525
525
  "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",
526
526
  {
527
527
  variants: {
@@ -535,38 +535,38 @@ const pt = m.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
535
535
  state: "default"
536
536
  }
537
537
  }
538
- ), M = m.forwardRef(
538
+ ), F = p.forwardRef(
539
539
  ({
540
- label: t,
540
+ label: e,
541
541
  leftContent: r,
542
- rightContent: a,
542
+ rightContent: n,
543
543
  helperText: s,
544
- error: n,
545
- className: o,
544
+ error: a,
545
+ className: i,
546
546
  disabled: d,
547
547
  readOnly: l,
548
548
  id: c,
549
- required: i,
549
+ required: o,
550
550
  ...u
551
- }, p) => {
552
- const f = m.useId(), h = c || f, b = `${h}-helper`, w = `${h}-error`, g = !!n, k = m.useMemo(() => {
553
- const v = [];
554
- return g ? v.push(w) : s && v.push(b), v.length > 0 ? v.join(" ") : void 0;
551
+ }, m) => {
552
+ const f = p.useId(), h = c || f, b = `${h}-helper`, w = `${h}-error`, g = !!a, y = p.useMemo(() => {
553
+ const k = [];
554
+ return g ? k.push(w) : s && k.push(b), k.length > 0 ? k.join(" ") : void 0;
555
555
  }, [g, s, w, b]);
556
- return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", o), children: [
557
- t && /* @__PURE__ */ e.jsxs(
556
+ return /* @__PURE__ */ t.jsxs("div", { className: x("w-full", i), children: [
557
+ e && /* @__PURE__ */ t.jsxs(
558
558
  "label",
559
559
  {
560
560
  htmlFor: h,
561
561
  className: "block text-sm font-medium text-foreground mb-2",
562
562
  children: [
563
- t,
564
- i && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
563
+ e,
564
+ o && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
565
565
  ]
566
566
  }
567
567
  ),
568
- /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
569
- r && /* @__PURE__ */ e.jsx(
568
+ /* @__PURE__ */ t.jsxs("div", { className: "relative w-full", children: [
569
+ r && /* @__PURE__ */ t.jsx(
570
570
  "span",
571
571
  {
572
572
  className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
@@ -575,79 +575,79 @@ const pt = m.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
575
575
  children: r
576
576
  }
577
577
  ),
578
- /* @__PURE__ */ e.jsx(
578
+ /* @__PURE__ */ t.jsx(
579
579
  "input",
580
580
  {
581
- ref: p,
581
+ ref: m,
582
582
  id: h,
583
- required: i,
583
+ required: o,
584
584
  disabled: d,
585
585
  readOnly: l,
586
586
  "aria-invalid": g,
587
- "aria-describedby": k,
587
+ "aria-describedby": y,
588
588
  "aria-errormessage": g ? w : void 0,
589
589
  className: x(
590
- Ce({
590
+ Qe({
591
591
  state: g ? "error" : l ? "readOnly" : "default"
592
592
  }),
593
593
  r ? "pl-9" : "pl-3",
594
- a ? "pr-9" : "pr-3",
594
+ n ? "pr-9" : "pr-3",
595
595
  "h-9"
596
596
  ),
597
597
  ...u
598
598
  }
599
599
  ),
600
- a && /* @__PURE__ */ e.jsx(
600
+ n && /* @__PURE__ */ t.jsx(
601
601
  "span",
602
602
  {
603
603
  className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
604
604
  "aria-hidden": "true",
605
605
  "data-testid": "right-content",
606
- children: a
606
+ children: n
607
607
  }
608
608
  )
609
609
  ] }),
610
- g && /* @__PURE__ */ e.jsx(
610
+ g && /* @__PURE__ */ t.jsx(
611
611
  "div",
612
612
  {
613
613
  id: w,
614
614
  className: "mt-1 text-sm text-danger",
615
615
  role: "alert",
616
616
  "aria-live": "polite",
617
- children: n
617
+ children: a
618
618
  }
619
619
  ),
620
- !g && s && /* @__PURE__ */ e.jsx("div", { id: b, className: "mt-1 text-sm text-gray-600", children: s })
620
+ !g && s && /* @__PURE__ */ t.jsx("div", { id: b, className: "mt-1 text-sm text-gray-600", children: s })
621
621
  ] });
622
622
  }
623
623
  );
624
- M.displayName = "TextInput";
625
- const mt = O(
626
- (t, r) => /* @__PURE__ */ e.jsx(
627
- M,
624
+ F.displayName = "TextInput";
625
+ const Tt = $(
626
+ (e, r) => /* @__PURE__ */ t.jsx(
627
+ F,
628
628
  {
629
- ...t,
629
+ ...e,
630
630
  ref: r,
631
631
  type: "email",
632
632
  autoComplete: "email",
633
633
  inputMode: "email",
634
- leftContent: /* @__PURE__ */ e.jsx($, { as: ie, color: "inherit", size: "sm" })
634
+ leftContent: /* @__PURE__ */ t.jsx(P, { as: ke, color: "inherit", size: "sm" })
635
635
  }
636
636
  )
637
- ), 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(
637
+ ), Xe = "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", Ye = "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", Ze = (e) => /^\d$/.test(e), q = (e, r) => e?.replace(/\D/g, "").slice(0, r) || "", te = p.forwardRef(
638
638
  ({
639
- value: t,
639
+ value: e,
640
640
  onChange: r,
641
- onKeyDown: a,
641
+ onKeyDown: n,
642
642
  onFocus: s,
643
- onPaste: n,
644
- disabled: o,
643
+ onPaste: a,
644
+ disabled: i,
645
645
  error: d,
646
646
  secure: l,
647
647
  inputRef: c,
648
- index: i,
648
+ index: o,
649
649
  id: u
650
- }, p) => /* @__PURE__ */ e.jsx(
650
+ }, m) => /* @__PURE__ */ t.jsx(
651
651
  "input",
652
652
  {
653
653
  ref: c,
@@ -656,228 +656,228 @@ const mt = O(
656
656
  inputMode: "numeric",
657
657
  pattern: l ? void 0 : "[0-9]*",
658
658
  maxLength: 1,
659
- value: l ? t ? "•" : "" : t,
659
+ value: l ? e ? "•" : "" : e,
660
660
  onChange: (f) => {
661
661
  const h = f.target.value;
662
- (h === "" || Se(h)) && r(h);
662
+ (h === "" || Ze(h)) && r(h);
663
663
  },
664
- onKeyDown: a,
664
+ onKeyDown: n,
665
665
  onFocus: s,
666
- onPaste: n,
667
- disabled: o,
666
+ onPaste: a,
667
+ disabled: i,
668
668
  "aria-invalid": d,
669
- "aria-disabled": o,
670
- className: d ? Ve : Re,
669
+ "aria-disabled": i,
670
+ className: d ? Ye : Xe,
671
671
  autoComplete: "one-time-code",
672
- "data-testid": `pin-input-${i}`
672
+ "data-testid": `pin-input-${o}`
673
673
  }
674
674
  )
675
675
  );
676
- Q.displayName = "PinInput";
677
- const De = m.forwardRef(
676
+ te.displayName = "PinInput";
677
+ const et = p.forwardRef(
678
678
  ({
679
- label: t,
679
+ label: e,
680
680
  helperText: r,
681
- error: a,
681
+ error: n,
682
682
  disabled: s,
683
- value: n,
684
- onChange: o,
683
+ value: a,
684
+ onChange: i,
685
685
  onComplete: d,
686
686
  digits: l = 6,
687
687
  className: c,
688
- id: i,
688
+ id: o,
689
689
  name: u,
690
- required: p,
690
+ required: m,
691
691
  secure: f = !1,
692
692
  ...h
693
693
  }, b) => {
694
- 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(
695
- (j) => {
696
- const y = W(j, l);
697
- o(y), y.length === l && d?.(y);
694
+ const w = p.useId(), g = o || w, y = !!n, k = p.useRef([]), C = q(a, l), S = C.split("").concat(Array(l - C.length).fill("")), D = p.useCallback(
695
+ (I) => {
696
+ const v = q(I, l);
697
+ i(v), v.length === l && d?.(v);
698
698
  },
699
- [o, d, l]
700
- ), S = m.useCallback(
701
- (j, y) => {
702
- const I = [...V];
703
- I[j] = y;
704
- const D = I.join("").replace(/\s+$/, "");
705
- R(D), y && j < l - 1 && v.current[j + 1]?.focus();
699
+ [i, d, l]
700
+ ), E = p.useCallback(
701
+ (I, v) => {
702
+ const j = [...S];
703
+ j[I] = v;
704
+ const L = j.join("").replace(/\s+$/, "");
705
+ D(L), v && I < l - 1 && k.current[I + 1]?.focus();
706
706
  },
707
- [V, R, l]
708
- ), E = m.useCallback(
709
- (j, y) => {
710
- if (y.key === "Backspace") {
711
- if (!V[j] && j > 0) {
712
- y.preventDefault();
713
- const I = [...V];
714
- I[j - 1] = "";
715
- const D = I.join("").replace(/\s+$/, "");
716
- R(D), v.current[j - 1]?.focus();
717
- } else if (V[j]) {
718
- y.preventDefault();
719
- const I = [...V];
720
- I[j] = "";
721
- const D = I.join("").replace(/\s+$/, "");
722
- R(D);
707
+ [S, D, l]
708
+ ), z = p.useCallback(
709
+ (I, v) => {
710
+ if (v.key === "Backspace") {
711
+ if (!S[I] && I > 0) {
712
+ v.preventDefault();
713
+ const j = [...S];
714
+ j[I - 1] = "";
715
+ const L = j.join("").replace(/\s+$/, "");
716
+ D(L), k.current[I - 1]?.focus();
717
+ } else if (S[I]) {
718
+ v.preventDefault();
719
+ const j = [...S];
720
+ j[I] = "";
721
+ const L = j.join("").replace(/\s+$/, "");
722
+ D(L);
723
723
  }
724
- } 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());
724
+ } else v.key === "ArrowLeft" && I > 0 ? (v.preventDefault(), k.current[I - 1]?.focus()) : v.key === "ArrowRight" && I < l - 1 && (v.preventDefault(), k.current[I + 1]?.focus());
725
725
  },
726
- [V, R, l]
727
- ), z = m.useCallback(
728
- (j) => {
729
- j.preventDefault();
730
- const y = j.clipboardData.getData("text"), I = W(y, l);
731
- if (I.length > 0) {
732
- R(I);
733
- const D = Math.min(I.length, l - 1);
734
- v.current[D]?.focus();
726
+ [S, D, l]
727
+ ), V = p.useCallback(
728
+ (I) => {
729
+ I.preventDefault();
730
+ const v = I.clipboardData.getData("text"), j = q(v, l);
731
+ if (j.length > 0) {
732
+ D(j);
733
+ const L = Math.min(j.length, l - 1);
734
+ k.current[L]?.focus();
735
735
  }
736
736
  },
737
- [R, l]
737
+ [D, l]
738
738
  );
739
- return /* @__PURE__ */ e.jsxs("div", { ref: b, className: x("w-full", c), ...h, children: [
740
- t && /* @__PURE__ */ e.jsxs(
739
+ return /* @__PURE__ */ t.jsxs("div", { ref: b, className: x("w-full", c), ...h, children: [
740
+ e && /* @__PURE__ */ t.jsxs(
741
741
  "label",
742
742
  {
743
743
  htmlFor: `${g}-0`,
744
744
  className: "block text-sm font-medium text-foreground mb-2",
745
745
  children: [
746
- t,
747
- p && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
746
+ e,
747
+ m && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
748
748
  ]
749
749
  }
750
750
  ),
751
- /* @__PURE__ */ e.jsx(
751
+ /* @__PURE__ */ t.jsx(
752
752
  "div",
753
753
  {
754
754
  className: "flex gap-2 justify-center",
755
755
  role: "group",
756
- "aria-labelledby": t ? `${g}-label` : void 0,
757
- "aria-describedby": k ? `${g}-error` : r ? `${g}-helper` : void 0,
758
- children: V.map((j, y) => /* @__PURE__ */ e.jsx(
759
- Q,
756
+ "aria-labelledby": e ? `${g}-label` : void 0,
757
+ "aria-describedby": y ? `${g}-error` : r ? `${g}-helper` : void 0,
758
+ children: S.map((I, v) => /* @__PURE__ */ t.jsx(
759
+ te,
760
760
  {
761
- value: j,
762
- onChange: (I) => S(y, I),
763
- onKeyDown: (I) => E(y, I),
761
+ value: I,
762
+ onChange: (j) => E(v, j),
763
+ onKeyDown: (j) => z(v, j),
764
764
  onFocus: () => {
765
- const I = v.current[y];
766
- I && I.select();
765
+ const j = k.current[v];
766
+ j && j.select();
767
767
  },
768
- onPaste: z,
768
+ onPaste: V,
769
769
  disabled: s,
770
- error: k,
770
+ error: y,
771
771
  secure: f,
772
- inputRef: (I) => {
773
- v.current[y] = I;
772
+ inputRef: (j) => {
773
+ k.current[v] = j;
774
774
  },
775
- index: y,
776
- id: `${g}-${y}`
775
+ index: v,
776
+ id: `${g}-${v}`
777
777
  },
778
- y
778
+ v
779
779
  ))
780
780
  }
781
781
  ),
782
- u && /* @__PURE__ */ e.jsx(
782
+ u && /* @__PURE__ */ t.jsx(
783
783
  "input",
784
784
  {
785
785
  type: "hidden",
786
786
  name: u,
787
- value: N,
788
- required: p
787
+ value: C,
788
+ required: m
789
789
  }
790
790
  ),
791
- k && /* @__PURE__ */ e.jsx(
791
+ y && /* @__PURE__ */ t.jsx(
792
792
  "div",
793
793
  {
794
794
  id: `${g}-error`,
795
795
  className: "mt-2 text-sm text-danger",
796
796
  role: "alert",
797
- children: a
797
+ children: n
798
798
  }
799
799
  ),
800
- !k && r && /* @__PURE__ */ e.jsx("div", { id: `${g}-helper`, className: "mt-2 text-sm text-gray-600", children: r })
800
+ !y && r && /* @__PURE__ */ t.jsx("div", { id: `${g}-helper`, className: "mt-2 text-sm text-gray-600", children: r })
801
801
  ] });
802
802
  }
803
803
  );
804
- De.displayName = "PinField";
805
- function ze(t, r) {
806
- ne(() => {
807
- typeof t == "number" && !isNaN(t) ? r(`${t}`) : t === "" || t === null || t === void 0 ? r("") : typeof t == "string" && r(t);
808
- }, [t, r]);
804
+ et.displayName = "PinField";
805
+ function tt(e, r) {
806
+ _(() => {
807
+ typeof e == "number" && !isNaN(e) ? r(`${e}`) : e === "" || e === null || e === void 0 ? r("") : typeof e == "string" && r(e);
808
+ }, [e, r]);
809
809
  }
810
- function Oe(t, r = !1) {
811
- if (t === "" || t === "-" && r) return !0;
812
- const a = r && t.startsWith("-") ? t.slice(1) : t;
813
- if (r && t.startsWith("-") && a === "") return !0;
814
- if (a.startsWith(".") || a.startsWith(",") || !/^[\d.,]+$/.test(a)) return !1;
815
- const s = a.split(",");
810
+ function rt(e, r = !1) {
811
+ if (e === "" || e === "-" && r) return !0;
812
+ const n = r && e.startsWith("-") ? e.slice(1) : e;
813
+ if (r && e.startsWith("-") && n === "") return !0;
814
+ if (n.startsWith(".") || n.startsWith(",") || !/^[\d.,]+$/.test(n)) return !1;
815
+ const s = n.split(",");
816
816
  if (s.length > 2) return !1;
817
- const n = s[0], o = s[1];
818
- return !(n === "" || !Pe(n) || o !== void 0 && o !== "" && !$e(o));
817
+ const a = s[0], i = s[1];
818
+ return !(a === "" || !nt(a) || i !== void 0 && i !== "" && !at(i));
819
819
  }
820
- function Pe(t) {
821
- if (t === "") return !1;
822
- if (!t.includes("."))
823
- return /^\d+$/.test(t);
824
- const r = t.split(".");
820
+ function nt(e) {
821
+ if (e === "") return !1;
822
+ if (!e.includes("."))
823
+ return /^\d+$/.test(e);
824
+ const r = e.split(".");
825
825
  if (r[0] === "" || !/^\d{1,3}$/.test(r[0])) return !1;
826
- for (let a = 1; a < r.length; a++) {
827
- const s = r[a];
828
- if (a === r.length - 1) {
826
+ for (let n = 1; n < r.length; n++) {
827
+ const s = r[n];
828
+ if (n === r.length - 1) {
829
829
  if (s !== "" && !/^\d{1,3}$/.test(s)) return !1;
830
830
  } else if (!/^\d{3}$/.test(s)) return !1;
831
831
  }
832
832
  return !0;
833
833
  }
834
- function $e(t) {
835
- return /^\d{1,2}$/.test(t);
834
+ function at(e) {
835
+ return /^\d{1,2}$/.test(e);
836
836
  }
837
- function U(t, r = !1) {
838
- if (t === "") return "";
839
- const a = t.startsWith("-");
840
- if (a && !r)
841
- return U(t.slice(1), !1);
842
- if (a && t.length === 1) return "-";
843
- let n = (a ? t.slice(1) : t).replace(/[^\d.,]/g, "");
844
- const o = n.lastIndexOf(",");
845
- if (o !== -1) {
846
- const d = n.slice(0, o).replace(/,/g, ""), l = n.slice(o + 1).replace(/,/g, "");
847
- n = d + "," + l;
837
+ function re(e, r = !1) {
838
+ if (e === "") return "";
839
+ const n = e.startsWith("-");
840
+ if (n && !r)
841
+ return re(e.slice(1), !1);
842
+ if (n && e.length === 1) return "-";
843
+ let a = (n ? e.slice(1) : e).replace(/[^\d.,]/g, "");
844
+ const i = a.lastIndexOf(",");
845
+ if (i !== -1) {
846
+ const d = a.slice(0, i).replace(/,/g, ""), l = a.slice(i + 1).replace(/,/g, "");
847
+ a = d + "," + l;
848
848
  }
849
- return n = n.replace(/\.{2,}/g, "."), (a ? "-" : "") + n;
849
+ return a = a.replace(/\.{2,}/g, "."), (n ? "-" : "") + a;
850
850
  }
851
- const ht = ({
852
- value: t,
851
+ const qt = ({
852
+ value: e,
853
853
  onChange: r,
854
- allowNegative: a = !1,
854
+ allowNegative: n = !1,
855
855
  inputProps: s,
856
- label: n,
857
- helperText: o,
856
+ label: a,
857
+ helperText: i,
858
858
  error: d,
859
859
  ...l
860
860
  }) => {
861
- const c = T(null), [i, u] = se(
862
- t === "" ? "" : String(t)
861
+ const c = G(null), [o, u] = K(
862
+ e === "" ? "" : String(e)
863
863
  );
864
- ze(t, u);
865
- const p = (f) => {
866
- const h = f.target.value, b = U(h, a);
867
- Oe(b, a) ? (u(b), r(b)) : f.preventDefault();
864
+ tt(e, u);
865
+ const m = (f) => {
866
+ const h = f.target.value, b = re(h, n);
867
+ rt(b, n) ? (u(b), r(b)) : f.preventDefault();
868
868
  };
869
- return /* @__PURE__ */ e.jsx(
870
- M,
869
+ return /* @__PURE__ */ t.jsx(
870
+ F,
871
871
  {
872
872
  ref: c,
873
873
  type: "text",
874
- label: n,
875
- value: i,
876
- onChange: p,
874
+ label: a,
875
+ value: o,
876
+ onChange: m,
877
877
  error: d,
878
- helperText: o,
878
+ helperText: i,
879
879
  placeholder: l.placeholder,
880
- leftContent: /* @__PURE__ */ e.jsx($, { as: ce, color: "inherit", size: "sm" }),
880
+ leftContent: /* @__PURE__ */ t.jsx(P, { as: ve, color: "inherit", size: "sm" }),
881
881
  inputMode: "numeric",
882
882
  autoComplete: "off",
883
883
  pattern: "[0-9.,-]*",
@@ -885,7 +885,7 @@ const ht = ({
885
885
  ...l
886
886
  }
887
887
  );
888
- }, Ee = C("space-y-2", {
888
+ }, st = N("space-y-2", {
889
889
  variants: {
890
890
  direction: {
891
891
  vertical: "space-y-2 space-x-0",
@@ -895,7 +895,7 @@ const ht = ({
895
895
  defaultVariants: {
896
896
  direction: "vertical"
897
897
  }
898
- }), Me = C(
898
+ }), ot = N(
899
899
  "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",
900
900
  {
901
901
  variants: {
@@ -933,7 +933,7 @@ const ht = ({
933
933
  size: "md"
934
934
  }
935
935
  }
936
- ), Fe = C(
936
+ ), it = N(
937
937
  "text-foreground cursor-pointer select-none",
938
938
  {
939
939
  variants: {
@@ -952,30 +952,30 @@ const ht = ({
952
952
  disabled: !1
953
953
  }
954
954
  }
955
- ), X = F(
955
+ ), ne = M(
956
956
  null
957
- ), Be = () => {
958
- const t = B(X);
959
- if (!t)
957
+ ), ct = () => {
958
+ const e = A(ne);
959
+ if (!e)
960
960
  throw new Error(
961
961
  "useRadioInputContext must be used within RadioInputContext"
962
962
  );
963
- return t;
964
- }, Ae = m.forwardRef(
965
- ({ children: t, description: r, className: a, disabled: s, id: n, value: o, ...d }, l) => {
966
- const c = Be(), i = m.useId(), u = n || i, p = s || c.disabled, f = c.error ? "danger" : c.variant || "primary";
967
- return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
968
- /* @__PURE__ */ e.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ e.jsx(
963
+ return e;
964
+ }, lt = p.forwardRef(
965
+ ({ children: e, description: r, className: n, disabled: s, id: a, value: i, ...d }, l) => {
966
+ const c = ct(), o = p.useId(), u = a || o, m = s || c.disabled, f = c.error ? "danger" : c.variant || "primary";
967
+ return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
968
+ /* @__PURE__ */ t.jsx("div", { className: "relative flex items-center", children: /* @__PURE__ */ t.jsx(
969
969
  "input",
970
970
  {
971
971
  ref: l,
972
972
  type: "radio",
973
973
  id: u,
974
974
  name: c.name,
975
- value: o,
976
- disabled: p,
975
+ value: i,
976
+ disabled: m,
977
977
  className: x(
978
- Me({
978
+ ot({
979
979
  variant: f,
980
980
  size: c.size
981
981
  }),
@@ -988,24 +988,24 @@ const ht = ({
988
988
  "checked:before:opacity-100",
989
989
  // Outline variants use colored radio dot
990
990
  f?.includes("outline") && "checked:before:bg-current",
991
- a
991
+ n
992
992
  ),
993
993
  ...d
994
994
  }
995
995
  ) }),
996
- /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
997
- /* @__PURE__ */ e.jsx(
996
+ /* @__PURE__ */ t.jsxs("div", { className: "flex-1", children: [
997
+ /* @__PURE__ */ t.jsx(
998
998
  "label",
999
999
  {
1000
1000
  htmlFor: u,
1001
- className: Fe({
1001
+ className: it({
1002
1002
  size: c.size,
1003
- disabled: p
1003
+ disabled: m
1004
1004
  }),
1005
- children: t
1005
+ children: e
1006
1006
  }
1007
1007
  ),
1008
- r && /* @__PURE__ */ e.jsx(
1008
+ r && /* @__PURE__ */ t.jsx(
1009
1009
  "div",
1010
1010
  {
1011
1011
  className: x(
@@ -1013,7 +1013,7 @@ const ht = ({
1013
1013
  c.size === "sm" && "text-xs",
1014
1014
  c.size === "md" && "text-xs",
1015
1015
  c.size === "lg" && "text-sm",
1016
- p && "opacity-50"
1016
+ m && "opacity-50"
1017
1017
  ),
1018
1018
  children: r
1019
1019
  }
@@ -1021,64 +1021,64 @@ const ht = ({
1021
1021
  ] })
1022
1022
  ] });
1023
1023
  }
1024
- ), We = m.forwardRef(
1024
+ ), dt = p.forwardRef(
1025
1025
  ({
1026
- variant: t = "primary",
1026
+ variant: e = "primary",
1027
1027
  size: r = "md",
1028
- label: a,
1028
+ label: n,
1029
1029
  helperText: s,
1030
- error: n,
1031
- direction: o = "vertical",
1030
+ error: a,
1031
+ direction: i = "vertical",
1032
1032
  className: d,
1033
1033
  disabled: l,
1034
1034
  name: c,
1035
- children: i,
1035
+ children: o,
1036
1036
  ...u
1037
- }, p) => {
1038
- const f = !!n, h = {
1039
- variant: t,
1037
+ }, m) => {
1038
+ const f = !!a, h = {
1039
+ variant: e,
1040
1040
  size: r,
1041
1041
  disabled: l,
1042
1042
  error: f,
1043
1043
  name: c
1044
1044
  };
1045
- return /* @__PURE__ */ e.jsx(X.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: p, className: x("w-full", d), ...u, children: [
1046
- a && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: a }),
1047
- /* @__PURE__ */ e.jsx("div", { className: Ee({ direction: o }), children: i }),
1048
- f && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: n }),
1049
- !f && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
1045
+ return /* @__PURE__ */ t.jsx(ne.Provider, { value: h, children: /* @__PURE__ */ t.jsxs("div", { ref: m, className: x("w-full", d), ...u, children: [
1046
+ n && /* @__PURE__ */ t.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: n }),
1047
+ /* @__PURE__ */ t.jsx("div", { className: st({ direction: i }), children: o }),
1048
+ f && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: a }),
1049
+ !f && s && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
1050
1050
  ] }) });
1051
1051
  }
1052
- ), bt = Object.assign(We, {
1053
- Option: Ae
1054
- }), gt = O(
1052
+ ), Ht = Object.assign(dt, {
1053
+ Option: lt
1054
+ }), Wt = $(
1055
1055
  ({
1056
- autoComplete: t = "off",
1056
+ autoComplete: e = "off",
1057
1057
  spellCheck: r = !1,
1058
- inputMode: a = "search",
1058
+ inputMode: n = "search",
1059
1059
  placeholder: s = "Search...",
1060
- maxLength: n = 256,
1061
- enterKeyHint: o = "search",
1060
+ maxLength: a = 256,
1061
+ enterKeyHint: i = "search",
1062
1062
  "aria-label": d = "Search",
1063
1063
  // internal default, not in props
1064
1064
  ...l
1065
- }, c) => /* @__PURE__ */ e.jsx(
1066
- M,
1065
+ }, c) => /* @__PURE__ */ t.jsx(
1066
+ F,
1067
1067
  {
1068
1068
  ref: c,
1069
1069
  type: "search",
1070
- inputMode: a,
1071
- autoComplete: t,
1070
+ inputMode: n,
1071
+ autoComplete: e,
1072
1072
  spellCheck: r,
1073
1073
  placeholder: s,
1074
- maxLength: n,
1075
- enterKeyHint: o,
1074
+ maxLength: a,
1075
+ enterKeyHint: i,
1076
1076
  "aria-label": d,
1077
- leftContent: /* @__PURE__ */ e.jsx($, { as: le, color: "inherit", size: "sm" }),
1077
+ leftContent: /* @__PURE__ */ t.jsx(P, { as: je, color: "inherit", size: "sm" }),
1078
1078
  ...l
1079
1079
  }
1080
1080
  )
1081
- ), Le = C(
1081
+ ), ut = N(
1082
1082
  "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",
1083
1083
  {
1084
1084
  variants: {
@@ -1092,95 +1092,95 @@ const ht = ({
1092
1092
  state: "default"
1093
1093
  }
1094
1094
  }
1095
- ), Y = m.forwardRef(({ value: t, children: r, ...a }, s) => /* @__PURE__ */ e.jsx("option", { ref: s, value: t, ...a, children: r }));
1096
- Y.displayName = "SelectOption";
1097
- const Z = m.forwardRef(({ label: t, children: r, ...a }, s) => /* @__PURE__ */ e.jsx("optgroup", { ref: s, label: t, ...a, children: r }));
1098
- Z.displayName = "SelectOptionGroup";
1099
- const ee = m.forwardRef(
1095
+ ), ae = p.forwardRef(({ value: e, children: r, ...n }, s) => /* @__PURE__ */ t.jsx("option", { ref: s, value: e, ...n, children: r }));
1096
+ ae.displayName = "SelectOption";
1097
+ const se = p.forwardRef(({ label: e, children: r, ...n }, s) => /* @__PURE__ */ t.jsx("optgroup", { ref: s, label: e, ...n, children: r }));
1098
+ se.displayName = "SelectOptionGroup";
1099
+ const oe = p.forwardRef(
1100
1100
  ({
1101
- label: t,
1101
+ label: e,
1102
1102
  helperText: r,
1103
- error: a,
1103
+ error: n,
1104
1104
  className: s,
1105
- disabled: n,
1106
- readOnly: o,
1105
+ disabled: a,
1106
+ readOnly: i,
1107
1107
  id: d,
1108
1108
  required: l,
1109
1109
  placeholder: c,
1110
- children: i,
1110
+ children: o,
1111
1111
  onChange: u,
1112
- ...p
1112
+ ...m
1113
1113
  }, f) => {
1114
- const h = m.useId(), b = d || h, w = `${b}-helper`, g = `${b}-error`, k = !!a, v = m.useMemo(() => {
1115
- const N = [];
1116
- return k ? N.push(g) : r && N.push(w), N.length > 0 ? N.join(" ") : void 0;
1117
- }, [k, r, g, w]);
1118
- return /* @__PURE__ */ e.jsxs("div", { className: x("w-full", s), children: [
1119
- t && /* @__PURE__ */ e.jsxs(
1114
+ const h = p.useId(), b = d || h, w = `${b}-helper`, g = `${b}-error`, y = !!n, k = p.useMemo(() => {
1115
+ const C = [];
1116
+ return y ? C.push(g) : r && C.push(w), C.length > 0 ? C.join(" ") : void 0;
1117
+ }, [y, r, g, w]);
1118
+ return /* @__PURE__ */ t.jsxs("div", { className: x("w-full", s), children: [
1119
+ e && /* @__PURE__ */ t.jsxs(
1120
1120
  "label",
1121
1121
  {
1122
1122
  htmlFor: b,
1123
1123
  className: "block text-sm font-medium text-foreground mb-2",
1124
1124
  children: [
1125
- t,
1126
- l && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1125
+ e,
1126
+ l && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1127
1127
  ]
1128
1128
  }
1129
1129
  ),
1130
- /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
1131
- /* @__PURE__ */ e.jsxs(
1130
+ /* @__PURE__ */ t.jsxs("div", { className: "relative w-full", children: [
1131
+ /* @__PURE__ */ t.jsxs(
1132
1132
  "select",
1133
1133
  {
1134
1134
  ref: f,
1135
1135
  id: b,
1136
1136
  required: l,
1137
- disabled: n || o,
1138
- "aria-invalid": k,
1139
- "aria-describedby": v,
1140
- "aria-errormessage": k ? g : void 0,
1137
+ disabled: a || i,
1138
+ "aria-invalid": y,
1139
+ "aria-describedby": k,
1140
+ "aria-errormessage": y ? g : void 0,
1141
1141
  onChange: u,
1142
1142
  className: x(
1143
- Le({
1144
- state: k ? "error" : o ? "readOnly" : "default"
1143
+ ut({
1144
+ state: y ? "error" : i ? "readOnly" : "default"
1145
1145
  }),
1146
1146
  "h-9 pl-3"
1147
1147
  ),
1148
- ...p,
1148
+ ...m,
1149
1149
  children: [
1150
- c && /* @__PURE__ */ e.jsx("option", { value: "", disabled: !0, hidden: !0, children: c }),
1151
- i
1150
+ c && /* @__PURE__ */ t.jsx("option", { value: "", disabled: !0, hidden: !0, children: c }),
1151
+ o
1152
1152
  ]
1153
1153
  }
1154
1154
  ),
1155
- /* @__PURE__ */ e.jsx(
1155
+ /* @__PURE__ */ t.jsx(
1156
1156
  "div",
1157
1157
  {
1158
1158
  className: x(
1159
1159
  "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none transition-transform duration-200"
1160
1160
  ),
1161
- children: /* @__PURE__ */ e.jsx($, { as: de, size: "sm", color: "gray", "aria-hidden": "true" })
1161
+ children: /* @__PURE__ */ t.jsx(P, { as: Ie, size: "sm", color: "gray", "aria-hidden": "true" })
1162
1162
  }
1163
1163
  )
1164
1164
  ] }),
1165
- k && /* @__PURE__ */ e.jsx(
1165
+ y && /* @__PURE__ */ t.jsx(
1166
1166
  "div",
1167
1167
  {
1168
1168
  id: g,
1169
1169
  className: "mt-1 text-sm text-danger",
1170
1170
  role: "alert",
1171
1171
  "aria-live": "polite",
1172
- children: a
1172
+ children: n
1173
1173
  }
1174
1174
  ),
1175
- !k && r && /* @__PURE__ */ e.jsx("div", { id: w, className: "mt-1 text-sm text-gray-600", children: r })
1175
+ !y && r && /* @__PURE__ */ t.jsx("div", { id: w, className: "mt-1 text-sm text-gray-600", children: r })
1176
1176
  ] });
1177
1177
  }
1178
1178
  );
1179
- ee.displayName = "SelectInput";
1180
- const xt = Object.assign(ee, {
1181
- Option: Y,
1182
- OptionGroup: Z
1183
- }), Te = C(
1179
+ oe.displayName = "SelectInput";
1180
+ const Ut = Object.assign(oe, {
1181
+ Option: ae,
1182
+ OptionGroup: se
1183
+ }), ft = N(
1184
1184
  "flex gap-3 cursor-pointer border-b border-border select-none transition-colors",
1185
1185
  {
1186
1186
  variants: {
@@ -1209,7 +1209,7 @@ const xt = Object.assign(ee, {
1209
1209
  hideCheckbox: !1
1210
1210
  }
1211
1211
  }
1212
- ), qe = C(
1212
+ ), mt = N(
1213
1213
  "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",
1214
1214
  {
1215
1215
  variants: {
@@ -1227,77 +1227,77 @@ const xt = Object.assign(ee, {
1227
1227
  disabled: !1
1228
1228
  }
1229
1229
  }
1230
- ), Ge = O(
1230
+ ), pt = $(
1231
1231
  ({
1232
- value: t,
1232
+ value: e,
1233
1233
  children: r,
1234
- checked: a,
1234
+ checked: n,
1235
1235
  id: s,
1236
- className: n,
1237
- disabled: o,
1236
+ className: a,
1237
+ disabled: i,
1238
1238
  checkboxPlacement: d = "center",
1239
1239
  hideCheckbox: l = !1,
1240
1240
  ...c
1241
- }, i) => {
1242
- const u = A(), p = s || u, f = typeof r == "function" ? r(a) : r;
1243
- return /* @__PURE__ */ e.jsxs(
1241
+ }, o) => {
1242
+ const u = T(), m = s || u, f = typeof r == "function" ? r(n) : r;
1243
+ return /* @__PURE__ */ t.jsxs(
1244
1244
  "label",
1245
1245
  {
1246
- htmlFor: p,
1246
+ htmlFor: m,
1247
1247
  className: x(
1248
- Te({
1249
- checked: !!a,
1250
- disabled: !!o,
1248
+ ft({
1249
+ checked: !!n,
1250
+ disabled: !!i,
1251
1251
  checkboxPlacement: d,
1252
1252
  hideCheckbox: l
1253
1253
  }),
1254
- n
1254
+ a
1255
1255
  ),
1256
- "aria-checked": a,
1256
+ "aria-checked": n,
1257
1257
  role: "radio",
1258
- "aria-label": `Select ${t}`,
1259
- tabIndex: o ? -1 : 0,
1258
+ "aria-label": `Select ${e}`,
1259
+ tabIndex: i ? -1 : 0,
1260
1260
  children: [
1261
- /* @__PURE__ */ e.jsx(
1261
+ /* @__PURE__ */ t.jsx(
1262
1262
  "input",
1263
1263
  {
1264
- ref: i,
1265
- id: p,
1264
+ ref: o,
1265
+ id: m,
1266
1266
  type: "radio",
1267
- value: t,
1268
- checked: a,
1269
- disabled: o,
1267
+ value: e,
1268
+ checked: n,
1269
+ disabled: i,
1270
1270
  className: "sr-only",
1271
1271
  "aria-hidden": !0,
1272
- "aria-checked": a,
1272
+ "aria-checked": n,
1273
1273
  ...c
1274
1274
  }
1275
1275
  ),
1276
- !l && /* @__PURE__ */ e.jsx(
1276
+ !l && /* @__PURE__ */ t.jsx(
1277
1277
  "span",
1278
1278
  {
1279
1279
  className: x(
1280
- qe({
1281
- checked: !!a,
1282
- disabled: !!o
1280
+ mt({
1281
+ checked: !!n,
1282
+ disabled: !!i
1283
1283
  }),
1284
1284
  // Custom checkmark styling using ::after - centered positioning
1285
1285
  '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',
1286
1286
  // Checkmark dimensions scaled up for h-6 w-6 size
1287
1287
  "after:w-[6px] after:h-[12px]",
1288
- a && "after:opacity-100"
1288
+ n && "after:opacity-100"
1289
1289
  ),
1290
1290
  "aria-hidden": "true"
1291
1291
  }
1292
1292
  ),
1293
- /* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1293
+ /* @__PURE__ */ t.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1294
1294
  ]
1295
1295
  }
1296
1296
  );
1297
1297
  }
1298
1298
  );
1299
- Ge.displayName = "SelectableSingleInput";
1300
- const Ke = C(
1299
+ pt.displayName = "SelectableSingleInput";
1300
+ const ht = N(
1301
1301
  "flex gap-3 cursor-pointer border-b border-border select-none transition-colors",
1302
1302
  {
1303
1303
  variants: {
@@ -1326,7 +1326,7 @@ const Ke = C(
1326
1326
  hideCheckbox: !1
1327
1327
  }
1328
1328
  }
1329
- ), _e = C(
1329
+ ), bt = N(
1330
1330
  "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",
1331
1331
  {
1332
1332
  variants: {
@@ -1344,77 +1344,77 @@ const Ke = C(
1344
1344
  disabled: !1
1345
1345
  }
1346
1346
  }
1347
- ), He = O(
1347
+ ), gt = $(
1348
1348
  ({
1349
- value: t,
1349
+ value: e,
1350
1350
  children: r,
1351
- checked: a,
1351
+ checked: n,
1352
1352
  id: s,
1353
- className: n,
1354
- disabled: o,
1353
+ className: a,
1354
+ disabled: i,
1355
1355
  checkboxPlacement: d = "center",
1356
1356
  hideCheckbox: l = !1,
1357
1357
  ...c
1358
- }, i) => {
1359
- const u = A(), p = s || u, f = typeof r == "function" ? r(a) : r;
1360
- return /* @__PURE__ */ e.jsxs(
1358
+ }, o) => {
1359
+ const u = T(), m = s || u, f = typeof r == "function" ? r(n) : r;
1360
+ return /* @__PURE__ */ t.jsxs(
1361
1361
  "label",
1362
1362
  {
1363
- htmlFor: p,
1363
+ htmlFor: m,
1364
1364
  className: x(
1365
- Ke({
1366
- checked: !!a,
1367
- disabled: !!o,
1365
+ ht({
1366
+ checked: !!n,
1367
+ disabled: !!i,
1368
1368
  checkboxPlacement: d,
1369
1369
  hideCheckbox: l
1370
1370
  }),
1371
- n
1371
+ a
1372
1372
  ),
1373
- "aria-checked": a,
1373
+ "aria-checked": n,
1374
1374
  role: "checkbox",
1375
- "aria-label": `Select ${t}`,
1376
- tabIndex: o ? -1 : 0,
1375
+ "aria-label": `Select ${e}`,
1376
+ tabIndex: i ? -1 : 0,
1377
1377
  children: [
1378
- /* @__PURE__ */ e.jsx(
1378
+ /* @__PURE__ */ t.jsx(
1379
1379
  "input",
1380
1380
  {
1381
- ref: i,
1382
- id: p,
1381
+ ref: o,
1382
+ id: m,
1383
1383
  type: "checkbox",
1384
- value: t,
1385
- checked: a,
1386
- disabled: o,
1384
+ value: e,
1385
+ checked: n,
1386
+ disabled: i,
1387
1387
  className: "sr-only",
1388
1388
  "aria-hidden": !0,
1389
- "aria-checked": a,
1389
+ "aria-checked": n,
1390
1390
  ...c
1391
1391
  }
1392
1392
  ),
1393
- !l && /* @__PURE__ */ e.jsx(
1393
+ !l && /* @__PURE__ */ t.jsx(
1394
1394
  "span",
1395
1395
  {
1396
1396
  className: x(
1397
- _e({
1398
- checked: !!a,
1399
- disabled: !!o
1397
+ bt({
1398
+ checked: !!n,
1399
+ disabled: !!i
1400
1400
  }),
1401
1401
  // Custom checkmark styling using ::after - centered positioning
1402
1402
  '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',
1403
1403
  // Checkmark dimensions scaled up for h-6 w-6 size
1404
1404
  "after:w-[6px] after:h-[12px]",
1405
- a && "after:opacity-100"
1405
+ n && "after:opacity-100"
1406
1406
  ),
1407
1407
  "aria-hidden": "true"
1408
1408
  }
1409
1409
  ),
1410
- /* @__PURE__ */ e.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1410
+ /* @__PURE__ */ t.jsx("span", { className: "flex-1 min-w-0 text-base text-foreground", children: f })
1411
1411
  ]
1412
1412
  }
1413
1413
  );
1414
1414
  }
1415
1415
  );
1416
- He.displayName = "SelectableMultipleInput";
1417
- const Je = C(
1416
+ gt.displayName = "SelectableMultipleInput";
1417
+ const xt = N(
1418
1418
  "relative inline-flex items-center h-5 w-10 rounded-full transition-colors duration-200 border border-transparent",
1419
1419
  {
1420
1420
  variants: {
@@ -1432,7 +1432,7 @@ const Je = C(
1432
1432
  checked: !1
1433
1433
  }
1434
1434
  }
1435
- ), Qe = C(
1435
+ ), yt = N(
1436
1436
  "absolute h-4 w-4 rounded-full transition-transform duration-200",
1437
1437
  {
1438
1438
  variants: {
@@ -1445,80 +1445,80 @@ const Je = C(
1445
1445
  checked: !1
1446
1446
  }
1447
1447
  }
1448
- ), Ue = ({ disabled: t = !1, checked: r = !1, className: a }) => /* @__PURE__ */ e.jsx(
1448
+ ), wt = ({ disabled: e = !1, checked: r = !1, className: n }) => /* @__PURE__ */ t.jsx(
1449
1449
  "span",
1450
1450
  {
1451
1451
  className: x(
1452
- Je({ disabled: t, checked: r }),
1452
+ xt({ disabled: e, checked: r }),
1453
1453
  "pointer-events-none",
1454
- a
1454
+ n
1455
1455
  ),
1456
1456
  "aria-hidden": "true"
1457
1457
  }
1458
- ), 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(
1458
+ ), kt = ({ checked: e = !1 }) => /* @__PURE__ */ t.jsx("span", { className: x(yt({ checked: e })), "aria-hidden": "true" }), vt = ({ label: e, htmlFor: r, disabled: n = !1, required: s = !1 }) => e ? /* @__PURE__ */ t.jsxs(
1459
1459
  "label",
1460
1460
  {
1461
1461
  htmlFor: r,
1462
1462
  className: x(
1463
1463
  "text-sm select-none font-medium text-foreground",
1464
- a && "opacity-50 cursor-not-allowed"
1464
+ n && "opacity-50 cursor-not-allowed"
1465
1465
  ),
1466
1466
  children: [
1467
- t,
1468
- s && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1467
+ e,
1468
+ s && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1469
1469
  ]
1470
1470
  }
1471
- ) : null, Ze = m.forwardRef(
1471
+ ) : null, jt = p.forwardRef(
1472
1472
  ({
1473
- value: t,
1473
+ value: e,
1474
1474
  onChange: r,
1475
- label: a,
1475
+ label: n,
1476
1476
  disabled: s = !1,
1477
- required: n = !1,
1478
- className: o,
1477
+ required: a = !1,
1478
+ className: i,
1479
1479
  id: d,
1480
1480
  ariaLabel: l,
1481
1481
  ...c
1482
- }, i) => {
1483
- const u = m.useId(), p = d || u, f = t ?? !1, h = (b) => {
1482
+ }, o) => {
1483
+ const u = p.useId(), m = d || u, f = e ?? !1, h = (b) => {
1484
1484
  r?.(b.target.checked);
1485
1485
  };
1486
- return /* @__PURE__ */ e.jsxs("div", { className: x("inline-flex items-center gap-2", o), children: [
1487
- /* @__PURE__ */ e.jsxs("span", { className: "relative inline-flex items-center", children: [
1488
- /* @__PURE__ */ e.jsx(
1486
+ return /* @__PURE__ */ t.jsxs("div", { className: x("inline-flex items-center gap-2", i), children: [
1487
+ /* @__PURE__ */ t.jsxs("span", { className: "relative inline-flex items-center", children: [
1488
+ /* @__PURE__ */ t.jsx(
1489
1489
  "input",
1490
1490
  {
1491
- ref: i,
1491
+ ref: o,
1492
1492
  type: "checkbox",
1493
1493
  role: "switch",
1494
- id: p,
1495
- "aria-label": l || a,
1494
+ id: m,
1495
+ "aria-label": l || n,
1496
1496
  "aria-checked": f,
1497
1497
  checked: f,
1498
1498
  disabled: s,
1499
- required: n,
1499
+ required: a,
1500
1500
  onChange: h,
1501
1501
  className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10 disabled:cursor-not-allowed",
1502
1502
  ...c
1503
1503
  }
1504
1504
  ),
1505
- /* @__PURE__ */ e.jsx(Ue, { disabled: s, checked: f }),
1506
- /* @__PURE__ */ e.jsx(Xe, { checked: f })
1505
+ /* @__PURE__ */ t.jsx(wt, { disabled: s, checked: f }),
1506
+ /* @__PURE__ */ t.jsx(kt, { checked: f })
1507
1507
  ] }),
1508
- /* @__PURE__ */ e.jsx(
1509
- Ye,
1508
+ /* @__PURE__ */ t.jsx(
1509
+ vt,
1510
1510
  {
1511
- label: a,
1512
- htmlFor: p,
1511
+ label: n,
1512
+ htmlFor: m,
1513
1513
  disabled: s,
1514
- required: n
1514
+ required: a
1515
1515
  }
1516
1516
  )
1517
1517
  ] });
1518
1518
  }
1519
1519
  );
1520
- Ze.displayName = "SwitchInput";
1521
- const et = C(
1520
+ jt.displayName = "SwitchInput";
1521
+ const It = N(
1522
1522
  "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",
1523
1523
  {
1524
1524
  variants: {
@@ -1532,138 +1532,350 @@ const et = C(
1532
1532
  state: "default"
1533
1533
  }
1534
1534
  }
1535
- ), tt = (t, r) => t ? "readOnly" : r ? "error" : "default", rt = (t, r, a) => {
1536
- if (r || a) {
1537
- t.preventDefault();
1535
+ ), Ct = (e, r) => e ? "readOnly" : r ? "error" : "default", Nt = (e, r, n) => {
1536
+ if (!e) return;
1537
+ (n ? e.innerHTML : e.textContent) !== r && (n ? e.innerHTML = r : e.textContent = r);
1538
+ }, St = (e, r) => r ? e.innerHTML : e.textContent || "", Vt = (e, r, n) => {
1539
+ if (r || n) {
1540
+ e.preventDefault();
1538
1541
  return;
1539
1542
  }
1540
- t.preventDefault();
1541
- const s = t.clipboardData.getData("text/plain"), n = window.getSelection();
1542
- if (!n || !n.rangeCount) return;
1543
- n.deleteFromDocument();
1544
- const o = n.getRangeAt(0), d = document.createTextNode(s);
1545
- o.insertNode(d), o.setStartAfter(d), o.setEndAfter(d), n.removeAllRanges(), n.addRange(o);
1543
+ e.preventDefault();
1544
+ const s = e.clipboardData.getData("text/plain"), a = window.getSelection();
1545
+ if (!a || !a.rangeCount) return;
1546
+ a.deleteFromDocument();
1547
+ const i = a.getRangeAt(0), d = document.createTextNode(s);
1548
+ i.insertNode(d), i.setStartAfter(d), i.setEndAfter(d), a.removeAllRanges(), a.addRange(i);
1546
1549
  const l = new Event("input", { bubbles: !0 });
1547
- t.currentTarget.dispatchEvent(l);
1548
- }, at = m.forwardRef(
1550
+ e.currentTarget.dispatchEvent(l);
1551
+ }, H = (e, r) => {
1552
+ switch (e) {
1553
+ case "bold":
1554
+ document.execCommand("bold", !1);
1555
+ break;
1556
+ case "italic":
1557
+ document.execCommand("italic", !1);
1558
+ break;
1559
+ case "underline":
1560
+ document.execCommand("underline", !1);
1561
+ break;
1562
+ case "strikethrough":
1563
+ document.execCommand("strikeThrough", !1);
1564
+ break;
1565
+ case "h1":
1566
+ document.execCommand("formatBlock", !1, "<h1>");
1567
+ break;
1568
+ case "h2":
1569
+ document.execCommand("formatBlock", !1, "<h2>");
1570
+ break;
1571
+ case "h3":
1572
+ document.execCommand("formatBlock", !1, "<h3>");
1573
+ break;
1574
+ case "orderedList":
1575
+ document.execCommand("insertOrderedList", !1);
1576
+ break;
1577
+ case "unorderedList":
1578
+ document.execCommand("insertUnorderedList", !1);
1579
+ break;
1580
+ case "link":
1581
+ if (r) {
1582
+ const n = window.getSelection();
1583
+ if (!!n && n.toString().length > 0)
1584
+ document.execCommand("createLink", !1, r);
1585
+ else {
1586
+ const a = r.replace(/"/g, "%22");
1587
+ document.execCommand(
1588
+ "insertHTML",
1589
+ !1,
1590
+ `<a href="${a}" target="_blank" rel="noopener noreferrer">${r}</a>`
1591
+ );
1592
+ }
1593
+ } else
1594
+ document.execCommand("unlink", !1);
1595
+ break;
1596
+ }
1597
+ }, O = (e) => {
1598
+ switch (e) {
1599
+ case "bold":
1600
+ return document.queryCommandState("bold");
1601
+ case "italic":
1602
+ return document.queryCommandState("italic");
1603
+ case "underline":
1604
+ return document.queryCommandState("underline");
1605
+ case "strikethrough":
1606
+ return document.queryCommandState("strikeThrough");
1607
+ case "h1": {
1608
+ const r = document.queryCommandValue("formatBlock") || "";
1609
+ return String(r).replace(/<|>|\//g, "").toLowerCase() === "h1";
1610
+ }
1611
+ case "h2": {
1612
+ const r = document.queryCommandValue("formatBlock") || "";
1613
+ return String(r).replace(/<|>|\//g, "").toLowerCase() === "h2";
1614
+ }
1615
+ case "h3": {
1616
+ const r = document.queryCommandValue("formatBlock") || "";
1617
+ return String(r).replace(/<|>|\//g, "").toLowerCase() === "h3";
1618
+ }
1619
+ case "orderedList":
1620
+ return document.queryCommandState("insertOrderedList");
1621
+ case "unorderedList":
1622
+ return document.queryCommandState("insertUnorderedList");
1623
+ case "link":
1624
+ return document.queryCommandState("createLink");
1625
+ default:
1626
+ return !1;
1627
+ }
1628
+ }, U = () => ({
1629
+ bold: O("bold"),
1630
+ italic: O("italic"),
1631
+ underline: O("underline"),
1632
+ strikethrough: O("strikethrough"),
1633
+ h1: O("h1"),
1634
+ h2: O("h2"),
1635
+ h3: O("h3"),
1636
+ orderedList: O("orderedList"),
1637
+ unorderedList: O("unorderedList"),
1638
+ link: O("link")
1639
+ }), ie = p.forwardRef(({ format: e, isActive: r, icon: n, label: s, disabled: a, onClick: i }, d) => {
1640
+ const l = (c) => {
1641
+ c.preventDefault(), i(e);
1642
+ };
1643
+ return /* @__PURE__ */ t.jsx(
1644
+ xe,
1645
+ {
1646
+ ref: d,
1647
+ as: n,
1648
+ "aria-label": s,
1649
+ "aria-pressed": r,
1650
+ variant: r ? "primary" : "ghost",
1651
+ size: "sm",
1652
+ shape: "rounded",
1653
+ disabled: a,
1654
+ onClick: l,
1655
+ onMouseDown: (c) => c.preventDefault(),
1656
+ className: x(
1657
+ "transition-all w-8 h-8 flex items-center justify-center",
1658
+ r && "bg-primary text-white",
1659
+ !r && "hover:bg-ghost-soft"
1660
+ )
1661
+ }
1662
+ );
1663
+ });
1664
+ ie.displayName = "TextAreaInputToolbarButton";
1665
+ const ce = p.forwardRef(({ children: e, className: r }, n) => /* @__PURE__ */ t.jsx(
1666
+ "div",
1667
+ {
1668
+ ref: n,
1669
+ role: "toolbar",
1670
+ "aria-label": "Text formatting toolbar",
1671
+ className: x(
1672
+ // allow wrapping on small screens, consistent gaps and padding
1673
+ "flex flex-wrap items-center gap-2 p-2 border-b border-border bg-neutral-soft rounded-t-md",
1674
+ r
1675
+ ),
1676
+ children: e
1677
+ }
1678
+ ));
1679
+ ce.displayName = "TextAreaInputToolbar";
1680
+ const Rt = (e, r) => {
1681
+ const [n, s] = K(U()), a = () => {
1682
+ const o = U();
1683
+ s(o);
1684
+ }, i = (o) => {
1685
+ r.current?.focus(), o === "link" ? d() : H(o), a(), l();
1686
+ }, d = () => {
1687
+ const o = window.prompt("Enter URL:");
1688
+ if (!o) {
1689
+ H("link");
1690
+ return;
1691
+ }
1692
+ const u = window.getSelection();
1693
+ if (!!u && u.toString().length > 0)
1694
+ H("link", o);
1695
+ else {
1696
+ const f = window.prompt("Enter link text (optional):") || o, h = o.replace(/"/g, "%22");
1697
+ document.execCommand(
1698
+ "insertHTML",
1699
+ !1,
1700
+ `<a href="${h}" target="_blank" rel="noopener noreferrer">${f}</a>`
1701
+ );
1702
+ }
1703
+ }, l = () => {
1704
+ if (r.current) {
1705
+ const o = new Event("input", { bubbles: !0 });
1706
+ r.current.dispatchEvent(o);
1707
+ }
1708
+ }, c = () => {
1709
+ e && r.current?.contains(document.activeElement) && a();
1710
+ };
1711
+ return _(() => {
1712
+ if (e)
1713
+ return document.addEventListener("selectionchange", c), () => {
1714
+ document.removeEventListener("selectionchange", c);
1715
+ };
1716
+ }, [e]), {
1717
+ formatState: n,
1718
+ handleFormatClick: i
1719
+ };
1720
+ }, Dt = p.forwardRef(
1549
1721
  ({
1550
- label: t,
1722
+ label: e,
1551
1723
  helperText: r,
1552
- error: a,
1724
+ error: n,
1553
1725
  className: s,
1554
- disabled: n,
1555
- readOnly: o,
1726
+ disabled: a,
1727
+ readOnly: i,
1556
1728
  id: d,
1557
1729
  value: l,
1558
1730
  defaultValue: c,
1559
- onChange: i,
1731
+ onChange: o,
1560
1732
  placeholder: u,
1561
- name: p,
1733
+ name: m,
1562
1734
  row: f = 3,
1563
1735
  required: h,
1564
1736
  onBlur: b,
1565
1737
  onFocus: w,
1566
1738
  onKeyDown: g,
1567
- ...k
1568
- }, v) => {
1569
- 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;
1570
- m.useImperativeHandle(v, () => S.current), m.useEffect(() => {
1571
- S.current && S.current.textContent !== y && (S.current.textContent = y);
1572
- }, [y]);
1573
- const I = tt(o, R), D = !y && u, te = (P) => {
1574
- const L = P.currentTarget.textContent || "";
1575
- j || z(L), i?.(L);
1576
- }, re = (P) => {
1577
- if (n || o) {
1578
- P.preventDefault();
1739
+ showToolbar: y = !1,
1740
+ allowedFormats: k,
1741
+ ...C
1742
+ }, S) => {
1743
+ const D = p.useId(), E = d || D, z = !!n, V = p.useRef(null), [I, v] = p.useState(c || ""), j = l !== void 0, L = j ? l : I, { formatState: le, handleFormatClick: de } = Rt(
1744
+ y,
1745
+ V
1746
+ );
1747
+ p.useImperativeHandle(S, () => V.current), p.useEffect(() => {
1748
+ Nt(V.current, L, y);
1749
+ }, [L, y]);
1750
+ const ue = Ct(i, z), fe = !L && u, me = (R) => {
1751
+ const B = St(R.currentTarget, y);
1752
+ j || v(B), o?.(B);
1753
+ }, pe = (R) => {
1754
+ if (a || i) {
1755
+ R.preventDefault();
1579
1756
  return;
1580
1757
  }
1581
- g?.(P);
1582
- }, ae = () => {
1583
- S.current?.focus();
1584
- };
1585
- return /* @__PURE__ */ e.jsxs("div", { children: [
1586
- t && /* @__PURE__ */ e.jsxs(
1758
+ g?.(R);
1759
+ }, he = () => {
1760
+ V.current?.focus();
1761
+ }, W = [
1762
+ { format: "bold", icon: Ce, label: "Bold" },
1763
+ { format: "italic", icon: Ne, label: "Italic" },
1764
+ { format: "underline", icon: Se, label: "Underline" },
1765
+ {
1766
+ format: "strikethrough",
1767
+ icon: Ve,
1768
+ label: "Strikethrough"
1769
+ },
1770
+ { format: "h1", icon: Re, label: "Heading 1" },
1771
+ { format: "h2", icon: De, label: "Heading 2" },
1772
+ { format: "h3", icon: Le, label: "Heading 3" },
1773
+ { format: "orderedList", icon: Oe, label: "Ordered List" },
1774
+ { format: "unorderedList", icon: ze, label: "Unordered List" },
1775
+ { format: "link", icon: $e, label: "Link" }
1776
+ ], be = k ? W.filter((R) => k.includes(R.format)) : W;
1777
+ return /* @__PURE__ */ t.jsxs("div", { children: [
1778
+ e && /* @__PURE__ */ t.jsxs(
1587
1779
  "label",
1588
1780
  {
1589
- htmlFor: V,
1781
+ htmlFor: E,
1590
1782
  className: "block text-sm font-medium text-foreground mb-2 cursor-pointer",
1591
- onClick: ae,
1783
+ onClick: he,
1592
1784
  children: [
1593
- t,
1594
- h && /* @__PURE__ */ e.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1785
+ e,
1786
+ h && /* @__PURE__ */ t.jsx("span", { className: "text-danger ml-1", "aria-label": "required", children: "*" })
1595
1787
  ]
1596
1788
  }
1597
1789
  ),
1598
- /* @__PURE__ */ e.jsx("div", { className: x("relative w-full", s), children: /* @__PURE__ */ e.jsx(
1599
- "div",
1600
- {
1601
- ref: S,
1602
- id: V,
1603
- role: "textbox",
1604
- "aria-multiline": "true",
1605
- "aria-invalid": R,
1606
- "aria-disabled": n,
1607
- "aria-readonly": o,
1608
- "aria-required": h,
1609
- "aria-label": typeof t == "string" ? t : void 0,
1610
- contentEditable: !n && !o,
1611
- "data-name": p,
1612
- onInput: te,
1613
- onKeyDown: re,
1614
- onPaste: (P) => rt(P, n, o),
1615
- onBlur: b,
1616
- onFocus: w,
1617
- suppressContentEditableWarning: !0,
1618
- style: { minHeight: `${f * 1.5 + 1}rem` },
1619
- className: x(
1620
- et({ state: I }),
1621
- "px-3 py-2",
1622
- D && "empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400"
1623
- ),
1624
- "data-placeholder": u,
1625
- ...k
1626
- }
1627
- ) }),
1628
- R && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: a }),
1629
- !R && r && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-gray-600", children: r })
1790
+ /* @__PURE__ */ t.jsxs("div", { className: x("relative w-full", s), children: [
1791
+ y && /* @__PURE__ */ t.jsx(ce, { children: be.map(({ format: R, icon: B, label: ge }) => /* @__PURE__ */ t.jsx(
1792
+ ie,
1793
+ {
1794
+ format: R,
1795
+ icon: B,
1796
+ label: ge,
1797
+ isActive: le[R],
1798
+ disabled: a || i,
1799
+ onClick: de
1800
+ },
1801
+ R
1802
+ )) }),
1803
+ /* @__PURE__ */ t.jsx(
1804
+ "div",
1805
+ {
1806
+ ref: V,
1807
+ id: E,
1808
+ role: "textbox",
1809
+ "aria-multiline": "true",
1810
+ "aria-invalid": z,
1811
+ "aria-disabled": a,
1812
+ "aria-readonly": i,
1813
+ "aria-required": h,
1814
+ "aria-label": typeof e == "string" ? e : void 0,
1815
+ contentEditable: !a && !i,
1816
+ "data-name": m,
1817
+ onInput: me,
1818
+ onKeyDown: pe,
1819
+ onPaste: (R) => !y && Vt(R, a, i),
1820
+ onBlur: b,
1821
+ onFocus: w,
1822
+ suppressContentEditableWarning: !0,
1823
+ style: {
1824
+ minHeight: `${f * 1.5 + 1}rem`,
1825
+ maxHeight: `${f * 1.5 + 1}rem`
1826
+ },
1827
+ className: x(
1828
+ It({ state: ue }),
1829
+ "px-3 py-2",
1830
+ y && "rounded-t-none",
1831
+ fe && "empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400",
1832
+ // Apply shared formatting styles when toolbar is enabled
1833
+ y && ye
1834
+ ),
1835
+ "data-placeholder": u,
1836
+ ...C
1837
+ }
1838
+ )
1839
+ ] }),
1840
+ z && /* @__PURE__ */ t.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: n }),
1841
+ !z && r && /* @__PURE__ */ t.jsx("div", { className: "mt-1 text-sm text-gray-600", children: r })
1630
1842
  ] });
1631
1843
  }
1632
1844
  );
1633
- at.displayName = "TextAreaInput";
1634
- const yt = O(function(r, a) {
1635
- const s = (n) => {
1636
- r?.onChange?.(n.target.value);
1845
+ Dt.displayName = "TextAreaInput";
1846
+ const Gt = $(function(r, n) {
1847
+ const s = (a) => {
1848
+ r?.onChange?.(a.target.value);
1637
1849
  };
1638
- return /* @__PURE__ */ e.jsx(
1639
- M,
1850
+ return /* @__PURE__ */ t.jsx(
1851
+ F,
1640
1852
  {
1641
1853
  type: "time",
1642
1854
  tabIndex: 0,
1643
1855
  "aria-hidden": "true",
1644
- leftContent: /* @__PURE__ */ e.jsx($, { as: ue, color: "inherit", size: "sm" }),
1645
- ref: a,
1856
+ leftContent: /* @__PURE__ */ t.jsx(P, { as: Ee, color: "inherit", size: "sm" }),
1857
+ ref: n,
1646
1858
  ...r,
1647
1859
  onChange: s
1648
1860
  }
1649
1861
  );
1650
1862
  });
1651
1863
  export {
1652
- dt as C,
1653
- pt as D,
1654
- mt as E,
1655
- De as P,
1656
- bt as R,
1657
- gt as S,
1658
- M as T,
1659
- ut as a,
1660
- ft as b,
1661
- ht as c,
1662
- xt as d,
1663
- Ge as e,
1664
- He as f,
1665
- Ze as g,
1666
- J as h,
1667
- at as i,
1668
- yt as j
1864
+ Ft as C,
1865
+ At as D,
1866
+ Tt as E,
1867
+ et as P,
1868
+ Ht as R,
1869
+ Wt as S,
1870
+ F as T,
1871
+ Bt as a,
1872
+ Mt as b,
1873
+ qt as c,
1874
+ Ut as d,
1875
+ pt as e,
1876
+ gt as f,
1877
+ jt as g,
1878
+ ee as h,
1879
+ Dt as i,
1880
+ Gt as j
1669
1881
  };