@sakura-ui/forms 0.4.0-beta.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,19 +1,10 @@
1
- import y from "react";
2
- var k = { exports: {} }, I = {};
3
- /**
4
- * @license React
5
- * react-jsx-runtime.production.js
6
- *
7
- * Copyright (c) Meta Platforms, Inc. and affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
- var B;
13
- function pe() {
14
- if (B) return I;
15
- B = 1;
16
- var r = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
1
+ import R from "react";
2
+ var I = { exports: {} }, E = {};
3
+ var W;
4
+ function fe() {
5
+ if (W) return E;
6
+ W = 1;
7
+ var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), i = /* @__PURE__ */ Symbol.for("react.fragment");
17
8
  function c(n, a, s) {
18
9
  var o = null;
19
10
  if (s !== void 0 && (o = "" + s), a.key !== void 0 && (o = "" + a.key), "key" in a) {
@@ -29,56 +20,47 @@ function pe() {
29
20
  props: s
30
21
  };
31
22
  }
32
- return I.Fragment = i, I.jsx = c, I.jsxs = c, I;
23
+ return E.Fragment = i, E.jsx = c, E.jsxs = c, E;
33
24
  }
34
25
  var _ = {};
35
- /**
36
- * @license React
37
- * react-jsx-runtime.development.js
38
- *
39
- * Copyright (c) Meta Platforms, Inc. and affiliates.
40
- *
41
- * This source code is licensed under the MIT license found in the
42
- * LICENSE file in the root directory of this source tree.
43
- */
44
- var U;
45
- function be() {
46
- return U || (U = 1, process.env.NODE_ENV !== "production" && function() {
26
+ var B;
27
+ function pe() {
28
+ return B || (B = 1, process.env.NODE_ENV !== "production" && (function() {
47
29
  function r(e) {
48
30
  if (e == null) return null;
49
31
  if (typeof e == "function")
50
- return e.$$typeof === ce ? null : e.displayName || e.name || null;
32
+ return e.$$typeof === de ? null : e.displayName || e.name || null;
51
33
  if (typeof e == "string") return e;
52
34
  switch (e) {
53
- case P:
35
+ case k:
54
36
  return "Fragment";
55
- case se:
56
- return "Profiler";
57
37
  case re:
38
+ return "Profiler";
39
+ case ee:
58
40
  return "StrictMode";
59
- case oe:
41
+ case ae:
60
42
  return "Suspense";
61
- case ie:
43
+ case oe:
62
44
  return "SuspenseList";
63
- case de:
45
+ case ne:
64
46
  return "Activity";
65
47
  }
66
48
  if (typeof e == "object")
67
49
  switch (typeof e.tag == "number" && console.error(
68
50
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
51
  ), e.$$typeof) {
70
- case ee:
52
+ case K:
71
53
  return "Portal";
72
- case le:
73
- return (e.displayName || "Context") + ".Provider";
74
54
  case te:
55
+ return e.displayName || "Context";
56
+ case se:
75
57
  return (e._context.displayName || "Context") + ".Consumer";
76
- case ae:
58
+ case le:
77
59
  var l = e.render;
78
60
  return e = e.displayName, e || (e = l.displayName || l.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
- case ne:
61
+ case ie:
80
62
  return l = e.displayName || null, l !== null ? l : r(e.type) || "Memo";
81
- case M:
63
+ case P:
82
64
  l = e._payload, e = e._init;
83
65
  try {
84
66
  return r(e(l));
@@ -99,17 +81,17 @@ function be() {
99
81
  }
100
82
  if (l) {
101
83
  l = console;
102
- var p = l.error, m = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
84
+ var p = l.error, b = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
85
  return p.call(
104
86
  l,
105
87
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- m
88
+ b
107
89
  ), i(e);
108
90
  }
109
91
  }
110
92
  function n(e) {
111
- if (e === P) return "<>";
112
- if (typeof e == "object" && e !== null && e.$$typeof === M)
93
+ if (e === k) return "<>";
94
+ if (typeof e == "object" && e !== null && e.$$typeof === P)
113
95
  return "<...>";
114
96
  try {
115
97
  var l = r(e);
@@ -126,7 +108,7 @@ function be() {
126
108
  return Error("react-stack-top-frame");
127
109
  }
128
110
  function o(e) {
129
- if (F.call(e, "key")) {
111
+ if (M.call(e, "key")) {
130
112
  var l = Object.getOwnPropertyDescriptor(e, "key").get;
131
113
  if (l && l.isReactWarning) return !1;
132
114
  }
@@ -134,7 +116,7 @@ function be() {
134
116
  }
135
117
  function u(e, l) {
136
118
  function p() {
137
- Y || (Y = !0, console.error(
119
+ F || (F = !0, console.error(
138
120
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
121
  l
140
122
  ));
@@ -146,18 +128,19 @@ function be() {
146
128
  }
147
129
  function d() {
148
130
  var e = r(this.type);
149
- return z[e] || (z[e] = !0, console.error(
131
+ return Y[e] || (Y[e] = !0, console.error(
150
132
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
133
  )), e = this.props.ref, e !== void 0 ? e : null;
152
134
  }
153
- function b(e, l, p, m, j, N, A, O) {
154
- return p = N.ref, e = {
155
- $$typeof: R,
135
+ function x(e, l, p, b, w, A) {
136
+ var m = p.ref;
137
+ return e = {
138
+ $$typeof: q,
156
139
  type: e,
157
140
  key: l,
158
- props: N,
159
- _owner: j
160
- }, (p !== void 0 ? p : null) !== null ? Object.defineProperty(e, "ref", {
141
+ props: p,
142
+ _owner: b
143
+ }, (m !== void 0 ? m : null) !== null ? Object.defineProperty(e, "ref", {
161
144
  enumerable: !1,
162
145
  get: d
163
146
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
@@ -174,113 +157,110 @@ function be() {
174
157
  configurable: !1,
175
158
  enumerable: !1,
176
159
  writable: !0,
177
- value: A
160
+ value: w
178
161
  }), Object.defineProperty(e, "_debugTask", {
179
162
  configurable: !1,
180
163
  enumerable: !1,
181
164
  writable: !0,
182
- value: O
165
+ value: A
183
166
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
184
167
  }
185
- function f(e, l, p, m, j, N, A, O) {
186
- var g = l.children;
187
- if (g !== void 0)
188
- if (m)
189
- if (ue(g)) {
190
- for (m = 0; m < g.length; m++)
191
- h(g[m]);
192
- Object.freeze && Object.freeze(g);
168
+ function f(e, l, p, b, w, A) {
169
+ var m = l.children;
170
+ if (m !== void 0)
171
+ if (b)
172
+ if (ce(m)) {
173
+ for (b = 0; b < m.length; b++)
174
+ g(m[b]);
175
+ Object.freeze && Object.freeze(m);
193
176
  } else
194
177
  console.error(
195
178
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
196
179
  );
197
- else h(g);
198
- if (F.call(l, "key")) {
199
- g = r(e);
200
- var w = Object.keys(l).filter(function(fe) {
201
- return fe !== "key";
180
+ else g(m);
181
+ if (M.call(l, "key")) {
182
+ m = r(e);
183
+ var j = Object.keys(l).filter(function(ue) {
184
+ return ue !== "key";
202
185
  });
203
- m = 0 < w.length ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}", W[g + m] || (w = 0 < w.length ? "{" + w.join(": ..., ") + ": ...}" : "{}", console.error(
186
+ b = 0 < j.length ? "{key: someKey, " + j.join(": ..., ") + ": ...}" : "{key: someKey}", L[m + b] || (j = 0 < j.length ? "{" + j.join(": ..., ") + ": ...}" : "{}", console.error(
204
187
  `A props object containing a "key" prop is being spread into JSX:
205
188
  let props = %s;
206
189
  <%s {...props} />
207
190
  React keys must be passed directly to JSX without using spread:
208
191
  let props = %s;
209
192
  <%s key={someKey} {...props} />`,
193
+ b,
210
194
  m,
211
- g,
212
- w,
213
- g
214
- ), W[g + m] = !0);
195
+ j,
196
+ m
197
+ ), L[m + b] = !0);
215
198
  }
216
- if (g = null, p !== void 0 && (c(p), g = "" + p), o(l) && (c(l.key), g = "" + l.key), "key" in l) {
199
+ if (m = null, p !== void 0 && (c(p), m = "" + p), o(l) && (c(l.key), m = "" + l.key), "key" in l) {
217
200
  p = {};
218
- for (var $ in l)
219
- $ !== "key" && (p[$] = l[$]);
201
+ for (var O in l)
202
+ O !== "key" && (p[O] = l[O]);
220
203
  } else p = l;
221
- return g && u(
204
+ return m && u(
222
205
  p,
223
206
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
224
- ), b(
207
+ ), x(
225
208
  e,
226
- g,
227
- N,
228
- j,
229
- a(),
209
+ m,
230
210
  p,
231
- A,
232
- O
211
+ a(),
212
+ w,
213
+ A
233
214
  );
234
215
  }
216
+ function g(e) {
217
+ h(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === P && (e._payload.status === "fulfilled" ? h(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
+ }
235
219
  function h(e) {
236
- typeof e == "object" && e !== null && e.$$typeof === R && e._store && (e._store.validated = 1);
220
+ return typeof e == "object" && e !== null && e.$$typeof === q;
237
221
  }
238
- var x = y, R = Symbol.for("react.transitional.element"), ee = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), re = Symbol.for("react.strict_mode"), se = Symbol.for("react.profiler"), te = Symbol.for("react.consumer"), le = Symbol.for("react.context"), ae = Symbol.for("react.forward_ref"), oe = Symbol.for("react.suspense"), ie = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), C = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, ue = Array.isArray, S = console.createTask ? console.createTask : function() {
222
+ var v = R, q = /* @__PURE__ */ Symbol.for("react.transitional.element"), K = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), ee = /* @__PURE__ */ Symbol.for("react.strict_mode"), re = /* @__PURE__ */ Symbol.for("react.profiler"), se = /* @__PURE__ */ Symbol.for("react.consumer"), te = /* @__PURE__ */ Symbol.for("react.context"), le = /* @__PURE__ */ Symbol.for("react.forward_ref"), ae = /* @__PURE__ */ Symbol.for("react.suspense"), oe = /* @__PURE__ */ Symbol.for("react.suspense_list"), ie = /* @__PURE__ */ Symbol.for("react.memo"), P = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), de = /* @__PURE__ */ Symbol.for("react.client.reference"), C = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, ce = Array.isArray, S = console.createTask ? console.createTask : function() {
239
223
  return null;
240
224
  };
241
- x = {
225
+ v = {
242
226
  react_stack_bottom_frame: function(e) {
243
227
  return e();
244
228
  }
245
229
  };
246
- var Y, z = {}, D = x.react_stack_bottom_frame.bind(
247
- x,
230
+ var F, Y = {}, z = v.react_stack_bottom_frame.bind(
231
+ v,
248
232
  s
249
- )(), L = S(n(s)), W = {};
250
- _.Fragment = P, _.jsx = function(e, l, p, m, j) {
251
- var N = 1e4 > C.recentlyCreatedOwnerStacks++;
233
+ )(), D = S(n(s)), L = {};
234
+ _.Fragment = k, _.jsx = function(e, l, p) {
235
+ var b = 1e4 > C.recentlyCreatedOwnerStacks++;
252
236
  return f(
253
237
  e,
254
238
  l,
255
239
  p,
256
240
  !1,
257
- m,
258
- j,
259
- N ? Error("react-stack-top-frame") : D,
260
- N ? S(n(e)) : L
241
+ b ? Error("react-stack-top-frame") : z,
242
+ b ? S(n(e)) : D
261
243
  );
262
- }, _.jsxs = function(e, l, p, m, j) {
263
- var N = 1e4 > C.recentlyCreatedOwnerStacks++;
244
+ }, _.jsxs = function(e, l, p) {
245
+ var b = 1e4 > C.recentlyCreatedOwnerStacks++;
264
246
  return f(
265
247
  e,
266
248
  l,
267
249
  p,
268
250
  !0,
269
- m,
270
- j,
271
- N ? Error("react-stack-top-frame") : D,
272
- N ? S(n(e)) : L
251
+ b ? Error("react-stack-top-frame") : z,
252
+ b ? S(n(e)) : D
273
253
  );
274
254
  };
275
- }()), _;
255
+ })()), _;
276
256
  }
277
- var G;
278
- function xe() {
279
- return G || (G = 1, process.env.NODE_ENV === "production" ? k.exports = pe() : k.exports = be()), k.exports;
257
+ var U;
258
+ function be() {
259
+ return U || (U = 1, process.env.NODE_ENV === "production" ? I.exports = fe() : I.exports = pe()), I.exports;
280
260
  }
281
- var t = xe();
282
- const v = (...r) => r.filter(Boolean).join(" ");
283
- var T;
261
+ var t = be();
262
+ const y = (...r) => r.filter(Boolean).join(" ");
263
+ var N;
284
264
  ((r) => {
285
265
  r.clickable = `
286
266
  px-2
@@ -294,7 +274,6 @@ var T;
294
274
  bg-yellow-50
295
275
  `;
296
276
  const i = `
297
- focus-visible:outline
298
277
  focus-visible:outline-4
299
278
  focus-visible:outline-black
300
279
  focus-visible:ring-yellow-300
@@ -313,7 +292,7 @@ var T;
313
292
  focus-visible:ring-[calc(2/16*1rem)]
314
293
  `, r.focusRounded = `
315
294
  ${r.focusRect}
316
- focus-visible:rounded
295
+ focus-visible:rounded-sm
317
296
  `, r.focusCard = `
318
297
  ${r.focusRect}
319
298
  focus-visible:rounded-2xl
@@ -323,7 +302,7 @@ var T;
323
302
  focus-visible:bg-yellow-300
324
303
  `, r.focusRoundedWithBg = `
325
304
  ${r.focusRectWithBg}
326
- focus-visible:rounded
305
+ focus-visible:rounded-sm
327
306
  `, r.hoverUnderline = `
328
307
  hover:underline
329
308
  hover:underline-offset-[calc(3/16*1rem)]
@@ -354,7 +333,6 @@ var T;
354
333
  left-0
355
334
  `, ((c) => {
356
335
  c.focus = `
357
- peer-focus-visible:outline
358
336
  peer-focus-visible:outline-4
359
337
  peer-focus-visible:outline-black
360
338
  peer-focus-visible:ring-yellow-300
@@ -364,13 +342,13 @@ var T;
364
342
  peer-focus-visible:ring-[calc(2/16*1rem)]
365
343
  `;
366
344
  })(r.Peer || (r.Peer = {}));
367
- })(T || (T = {}));
368
- const E = y.createContext({
345
+ })(N || (N = {}));
346
+ const T = R.createContext({
369
347
  helperTextId: "",
370
348
  errorMessageId: "",
371
349
  isInvalid: !1,
372
350
  isRequired: !1
373
- }), J = `
351
+ }), G = `
374
352
  bg-white
375
353
  border
376
354
  border-solid
@@ -379,7 +357,7 @@ const E = y.createContext({
379
357
  disabled:text-solid-gray-500
380
358
  disabled:border-solid-gray-500
381
359
  aria-invalid:border-red-800
382
- ${T.focusRect}
360
+ ${N.focusRect}
383
361
  `, V = {
384
362
  // 16(p-4) * 2 + 22(text-label * leading-snug) + boader * 2 = 56px
385
363
  lg: `
@@ -404,13 +382,13 @@ const E = y.createContext({
404
382
  rounded-md
405
383
  leading-snug
406
384
  `
407
- }, H = `
385
+ }, J = `
408
386
  inline-block
409
387
  cursor-pointer
410
388
  border
411
389
  border-solid
412
390
  border-transparent
413
- `, X = {
391
+ `, H = {
414
392
  // 16(p-4) * 2 + 22(text-label * leading-snug) + boader(transparent) * 2 = 56px
415
393
  lg: `
416
394
  pr-8
@@ -432,21 +410,21 @@ const E = y.createContext({
432
410
  text-label
433
411
  leading-snug
434
412
  `
435
- }, Z = {
413
+ }, X = {
436
414
  lg: "w-[22px] h-[22px] mr-2",
437
415
  md: "w-[18px] h-[18px] mr-1.5",
438
416
  sm: "w-[18px] h-[18px] mr-1"
439
- }, Q = (r) => {
440
- const { id: i, className: c, size: n = "lg", children: a, ...s } = r, o = y.useId(), u = i || o, d = y.useContext(E);
417
+ }, Z = (r) => {
418
+ const { id: i, className: c, size: n = "lg", children: a, ...s } = r, o = R.useId(), u = i || o, d = R.useContext(T);
441
419
  d.isRequired && (s.required = !0), d.groupName && (s.name = d.groupName);
442
- const b = {
420
+ const x = {
443
421
  lg: 22 / 24,
444
422
  md: 18 / 24,
445
423
  sm: 18 / 24
446
424
  }, f = `
447
425
  peer
448
426
  sr-only
449
- `, h = `
427
+ `, g = `
450
428
  bg-clip-content
451
429
  rounded-sm
452
430
  border
@@ -457,15 +435,15 @@ const E = y.createContext({
457
435
  peer-checked:bg-blue-600
458
436
  peer-checked:border-none
459
437
  peer-disabled:border-solid-gray-500
460
- ${T.Peer.focusRect}
438
+ ${N.Peer.focusRect}
461
439
  `;
462
440
  return /* @__PURE__ */ t.jsx(
463
441
  "label",
464
442
  {
465
443
  htmlFor: u,
466
- className: v(
467
- H,
468
- X[n],
444
+ className: y(
445
+ J,
446
+ H[n],
469
447
  c
470
448
  ),
471
449
  children: /* @__PURE__ */ t.jsxs("span", { className: "flex items-center", children: [
@@ -482,7 +460,7 @@ const E = y.createContext({
482
460
  ...s
483
461
  }
484
462
  ),
485
- /* @__PURE__ */ t.jsx("span", { className: v(h, Z[n]), children: /* @__PURE__ */ t.jsx(
463
+ /* @__PURE__ */ t.jsx("span", { className: y(g, X[n]), children: /* @__PURE__ */ t.jsx(
486
464
  "svg",
487
465
  {
488
466
  xmlns: "http://www.w3.org/2000/svg",
@@ -490,7 +468,7 @@ const E = y.createContext({
490
468
  width: "24",
491
469
  height: "24",
492
470
  viewBox: "0 0 24 24",
493
- children: /* @__PURE__ */ t.jsx("g", { transform: `scale(${b[n]} ${b[n]})`, children: /* @__PURE__ */ t.jsx("path", { d: "m9.55 17.65-5.325-5.325 1.05-1.075 4.275 4.275 9.175-9.175 1.05 1.075Z" }) })
471
+ children: /* @__PURE__ */ t.jsx("g", { transform: `scale(${x[n]} ${x[n]})`, children: /* @__PURE__ */ t.jsx("path", { d: "m9.55 17.65-5.325-5.325 1.05-1.075 4.275 4.275 9.175-9.175 1.05 1.075Z" }) })
494
472
  }
495
473
  ) }),
496
474
  /* @__PURE__ */ t.jsx("span", { className: "peer-disabled:text-solid-gray-500", children: a })
@@ -498,11 +476,11 @@ const E = y.createContext({
498
476
  }
499
477
  );
500
478
  };
501
- Q.displayName = "Checkbox";
502
- const K = (r) => {
503
- const { id: i, className: c, size: n = "lg", children: a, ...s } = r, o = y.useId(), u = i || o, d = y.useContext(E);
479
+ Z.displayName = "Checkbox";
480
+ const Q = (r) => {
481
+ const { id: i, className: c, size: n = "lg", children: a, ...s } = r, o = R.useId(), u = i || o, d = R.useContext(T);
504
482
  d.isRequired && (s.required = !0), d.groupName && (s.name = d.groupName);
505
- const b = `
483
+ const x = `
506
484
  peer
507
485
  sr-only
508
486
  `, f = `
@@ -514,8 +492,8 @@ const K = (r) => {
514
492
  peer-checked:bg-blue-600
515
493
  peer-checked:border-blue-600
516
494
  peer-disabled:border-solid-gray-500
517
- ${T.Peer.focusRect}
518
- `, h = {
495
+ ${N.Peer.focusRect}
496
+ `, g = {
519
497
  lg: "p-1",
520
498
  md: "p-[3px]",
521
499
  sm: "p-[3px]"
@@ -524,9 +502,9 @@ const K = (r) => {
524
502
  "label",
525
503
  {
526
504
  htmlFor: u,
527
- className: v(
528
- H,
529
- X[n],
505
+ className: y(
506
+ J,
507
+ H[n],
530
508
  c
531
509
  ),
532
510
  children: /* @__PURE__ */ t.jsxs("span", { className: "flex items-center", children: [
@@ -534,7 +512,7 @@ const K = (r) => {
534
512
  "input",
535
513
  {
536
514
  id: u,
537
- className: b,
515
+ className: x,
538
516
  type: "radio",
539
517
  "aria-describedby": d.helperTextId,
540
518
  "aria-errormessage": d.errorMessageId,
@@ -547,7 +525,7 @@ const K = (r) => {
547
525
  "span",
548
526
  {
549
527
  "aria-hidden": !0,
550
- className: v(f, h[n], Z[n])
528
+ className: y(f, g[n], X[n])
551
529
  }
552
530
  ),
553
531
  /* @__PURE__ */ t.jsx("span", { className: "peer-disabled:text-solid-gray-500", children: a })
@@ -555,22 +533,22 @@ const K = (r) => {
555
533
  }
556
534
  );
557
535
  };
558
- K.displayName = "Radio";
536
+ Q.displayName = "Radio";
559
537
  const me = (r) => {
560
- const { id: i, className: c, size: n = "lg", children: a, ...s } = r, o = y.useContext(E);
538
+ const { id: i, className: c, size: n = "lg", children: a, ...s } = r, o = R.useContext(T);
561
539
  return o.isRequired && (s.required = !0), /* @__PURE__ */ t.jsxs("div", { className: "inline-block relative", children: [
562
540
  /* @__PURE__ */ t.jsx(
563
541
  "select",
564
542
  {
565
543
  id: i || o.id,
566
- className: v(
544
+ className: y(
567
545
  `
568
546
  !pr-8
569
547
  peer
570
548
  cursor-pointer
571
549
  appearance-none
572
550
  `,
573
- J,
551
+ G,
574
552
  V[n],
575
553
  c
576
554
  ),
@@ -615,8 +593,8 @@ const me = (r) => {
615
593
  ] });
616
594
  };
617
595
  me.displayName = "Select";
618
- const ge = (r) => {
619
- const { id: i, className: c, size: n = "lg", ...a } = r, s = y.useContext(E);
596
+ const xe = (r) => {
597
+ const { id: i, className: c, size: n = "lg", ...a } = r, s = R.useContext(T);
620
598
  s.isRequired && (a.required = !0);
621
599
  const o = `
622
600
  file:mr-2
@@ -649,9 +627,9 @@ const ge = (r) => {
649
627
  rounded-lg
650
628
  outline-offset-2
651
629
  aria-invalid:text-red-800
652
- ${T.hoverUnderline}
653
- ${T.focusRounded}
654
- `, b = {
630
+ ${N.hoverUnderline}
631
+ ${N.focusRounded}
632
+ `, x = {
655
633
  // 16(p-4) * 2 + 22(text-button * leading-snug) + boader * 2 = 56px
656
634
  lg: `
657
635
  file:p-4
@@ -676,32 +654,36 @@ const ge = (r) => {
676
654
  file:leading-snug
677
655
  `
678
656
  };
679
- return /* @__PURE__ */ t.jsx(
680
- "input",
681
- {
682
- type: "file",
683
- id: i || s.id,
684
- className: v(o, u, b[n], d, c),
685
- "aria-describedby": s.helperTextId,
686
- "aria-errormessage": s.errorMessageId,
687
- "aria-invalid": s.isInvalid ?? !1,
688
- "aria-required": s.isRequired ?? !1,
689
- role: "button",
690
- "aria-label": "File Upload",
691
- ...a
692
- }
657
+ return (
658
+ // biome-ignore lint/a11y/useAriaPropsSupportedByRole: see the TODO above
659
+ // biome-ignore lint/a11y/useSemanticElements: see the TODO above
660
+ /* @__PURE__ */ t.jsx(
661
+ "input",
662
+ {
663
+ type: "file",
664
+ id: i || s.id,
665
+ className: y(o, u, x[n], d, c),
666
+ "aria-describedby": s.helperTextId,
667
+ "aria-errormessage": s.errorMessageId,
668
+ "aria-invalid": s.isInvalid ?? !1,
669
+ "aria-required": s.isRequired ?? !1,
670
+ role: "button",
671
+ "aria-label": "File Upload",
672
+ ...a
673
+ }
674
+ )
693
675
  );
694
676
  };
695
- ge.displayName = "FileInput";
696
- const he = (r) => {
697
- const { id: i, className: c, size: n = "lg", ...a } = r, s = y.useContext(E);
677
+ xe.displayName = "FileInput";
678
+ const ge = (r) => {
679
+ const { id: i, className: c, size: n = "lg", ...a } = r, s = R.useContext(T);
698
680
  return s.isRequired && (a.required = !0), /* @__PURE__ */ t.jsx(
699
681
  "input",
700
682
  {
701
683
  type: "text",
702
684
  id: i || s.id,
703
- className: v(
704
- J,
685
+ className: y(
686
+ G,
705
687
  V[n],
706
688
  c
707
689
  ),
@@ -713,13 +695,13 @@ const he = (r) => {
713
695
  }
714
696
  );
715
697
  };
716
- he.displayName = "Input";
717
- const ve = (r) => {
718
- const { id: i, className: c, children: n, onChange: a, maxLength: s, ...o } = r, [u, d] = y.useState(0), b = (R) => {
719
- a && a(R), d(R.target.value.length);
720
- }, f = y.useContext(E);
698
+ ge.displayName = "Input";
699
+ const he = (r) => {
700
+ const { id: i, className: c, children: n, onChange: a, maxLength: s, ...o } = r, [u, d] = R.useState(0), x = (v) => {
701
+ a && a(v), d(v.target.value.length);
702
+ }, f = R.useContext(T);
721
703
  f.isRequired && (o.required = !0);
722
- const h = u > (s || 0) ? "text-red-800" : "text-solid-gray-700", x = `
704
+ const g = u > (s || 0) ? "text-red-800" : "text-solid-gray-700", h = `
723
705
  p-4
724
706
  text-label
725
707
  rounded-lg
@@ -730,33 +712,33 @@ const ve = (r) => {
730
712
  disabled:text-solid-gray-500
731
713
  disabled:border-solid-gray-500
732
714
  aria-invalid:border-red-800
733
- ${T.focusRect}
715
+ ${N.focusRect}
734
716
  `;
735
717
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
736
718
  /* @__PURE__ */ t.jsx(
737
719
  "textarea",
738
720
  {
739
721
  id: i || f.id,
740
- className: v(x, c),
722
+ className: y(h, c),
741
723
  "aria-describedby": f.helperTextId,
742
724
  "aria-errormessage": f.errorMessageId,
743
725
  "aria-invalid": f.isInvalid ?? !1,
744
726
  "aria-required": f.isRequired ?? !1,
745
- onChange: b,
727
+ onChange: x,
746
728
  ...o,
747
729
  children: n
748
730
  }
749
731
  ),
750
732
  s ? /* @__PURE__ */ t.jsxs("p", { className: "text-label text-solid-gray-700", children: [
751
- /* @__PURE__ */ t.jsx("span", { className: h, children: u }),
733
+ /* @__PURE__ */ t.jsx("span", { className: g, children: u }),
752
734
  "/",
753
735
  /* @__PURE__ */ t.jsx("span", { children: s })
754
736
  ] }) : ""
755
737
  ] });
756
738
  };
757
- ve.displayName = "Textarea";
758
- const ye = (r) => {
759
- const i = y.useId(), {
739
+ he.displayName = "Textarea";
740
+ const ve = (r) => {
741
+ const i = R.useId(), {
760
742
  labelText: c,
761
743
  className: n,
762
744
  helperText: a,
@@ -764,7 +746,7 @@ const ye = (r) => {
764
746
  isInvalid: o,
765
747
  isRequired: u,
766
748
  children: d,
767
- ...b
749
+ ...x
768
750
  } = r, f = {
769
751
  id: r.htmlFor ?? `input-${i}`,
770
752
  helperTextId: `helper-text-${i}`,
@@ -772,13 +754,13 @@ const ye = (r) => {
772
754
  isInvalid: o ?? !1,
773
755
  isRequired: u ?? !1
774
756
  };
775
- return /* @__PURE__ */ t.jsx(E.Provider, { value: f, children: /* @__PURE__ */ t.jsxs("div", { className: v("flex flex-col items-start gap-2", n), children: [
757
+ return /* @__PURE__ */ t.jsx(T.Provider, { value: f, children: /* @__PURE__ */ t.jsxs("div", { className: y("flex flex-col items-start gap-2", n), children: [
776
758
  /* @__PURE__ */ t.jsxs(
777
759
  "label",
778
760
  {
779
- className: v("block text-label", o && "text-red-800"),
761
+ className: y("block text-label", o && "text-red-800"),
780
762
  htmlFor: f.id,
781
- ...b,
763
+ ...x,
782
764
  children: [
783
765
  c,
784
766
  u && /* @__PURE__ */ t.jsx("span", { className: "text-label text-red-800", children: " *" })
@@ -794,9 +776,9 @@ const ye = (r) => {
794
776
  `, children: s })
795
777
  ] }) });
796
778
  };
797
- ye.displayName = "LabelControl";
798
- const q = (r) => {
799
- const i = y.useId(), {
779
+ ve.displayName = "LabelControl";
780
+ const $ = (r) => {
781
+ const i = R.useId(), {
800
782
  labelText: c,
801
783
  className: n,
802
784
  helperText: a,
@@ -804,34 +786,34 @@ const q = (r) => {
804
786
  isInvalid: o,
805
787
  isRequired: u,
806
788
  direction: d,
807
- children: b,
789
+ children: x,
808
790
  ...f
809
- } = r, x = {
791
+ } = r, h = {
810
792
  groupName: f.name ?? `group-${i}`,
811
793
  helperTextId: `helper-text-${i}`,
812
794
  errorMessageId: `error-message-${i}`,
813
795
  isInvalid: o ?? !1,
814
796
  isRequired: u ?? !1
815
- }, R = d ?? "flex-col";
816
- return /* @__PURE__ */ t.jsx(E.Provider, { value: x, children: /* @__PURE__ */ t.jsxs(
797
+ }, v = d ?? "flex-col";
798
+ return /* @__PURE__ */ t.jsx(T.Provider, { value: h, children: /* @__PURE__ */ t.jsxs(
817
799
  "fieldset",
818
800
  {
819
- className: v("flex flex-col items-start gap-2", n),
801
+ className: y("flex flex-col items-start gap-2", n),
820
802
  ...f,
821
803
  children: [
822
- /* @__PURE__ */ t.jsx("legend", { children: /* @__PURE__ */ t.jsxs("p", { className: v("block text-label", o && "text-red-800"), children: [
804
+ /* @__PURE__ */ t.jsx("legend", { children: /* @__PURE__ */ t.jsxs("p", { className: y("block text-label", o && "text-red-800"), children: [
823
805
  c,
824
806
  u && /* @__PURE__ */ t.jsx("span", { className: "text-red-800", children: " *" })
825
807
  ] }) }),
826
- /* @__PURE__ */ t.jsx("div", { className: v("inline-flex", R), children: b }),
827
- a && /* @__PURE__ */ t.jsx("p", { id: x.helperTextId, className: "text-sup text-solid-gray-700", children: a }),
828
- o && /* @__PURE__ */ t.jsx("p", { id: x.errorMessageId, className: "text-label text-red-800", children: s })
808
+ /* @__PURE__ */ t.jsx("div", { className: y("inline-flex", v), children: x }),
809
+ a && /* @__PURE__ */ t.jsx("p", { id: h.helperTextId, className: "text-sup text-solid-gray-700", children: a }),
810
+ o && /* @__PURE__ */ t.jsx("p", { id: h.errorMessageId, className: "text-label text-red-800", children: s })
829
811
  ]
830
812
  }
831
813
  ) });
832
814
  };
833
- q.displayName = "FieldsetControl";
834
- const Re = (r) => {
815
+ $.displayName = "FieldsetControl";
816
+ const ye = (r) => {
835
817
  const {
836
818
  items: i,
837
819
  onChange: c,
@@ -841,11 +823,11 @@ const Re = (r) => {
841
823
  errorMessage: o,
842
824
  isInvalid: u,
843
825
  isRequired: d,
844
- size: b,
826
+ size: x,
845
827
  ...f
846
828
  } = r;
847
829
  return /* @__PURE__ */ t.jsx(
848
- q,
830
+ $,
849
831
  {
850
832
  className: n,
851
833
  labelText: a,
@@ -854,21 +836,21 @@ const Re = (r) => {
854
836
  isInvalid: u,
855
837
  isRequired: d,
856
838
  ...f,
857
- children: i.map(({ label: h, value: x }) => /* @__PURE__ */ t.jsx(
858
- Q,
839
+ children: i.map(({ label: g, value: h }) => /* @__PURE__ */ t.jsx(
840
+ Z,
859
841
  {
860
- size: b,
861
- value: x,
842
+ size: x,
843
+ value: h,
862
844
  onChange: c,
863
- children: h
845
+ children: g
864
846
  },
865
- `${h}-${x}`
847
+ `${g}-${h}`
866
848
  ))
867
849
  }
868
850
  );
869
851
  };
870
- Re.displayName = "CheckboxGroup";
871
- const Ne = (r) => {
852
+ ye.displayName = "CheckboxGroup";
853
+ const Re = (r) => {
872
854
  const {
873
855
  items: i,
874
856
  onChange: c,
@@ -878,12 +860,12 @@ const Ne = (r) => {
878
860
  errorMessage: o,
879
861
  isInvalid: u,
880
862
  isRequired: d,
881
- defaultValue: b,
863
+ defaultValue: x,
882
864
  size: f,
883
- ...h
865
+ ...g
884
866
  } = r;
885
867
  return /* @__PURE__ */ t.jsx(
886
- q,
868
+ $,
887
869
  {
888
870
  className: n,
889
871
  labelText: a,
@@ -891,31 +873,31 @@ const Ne = (r) => {
891
873
  errorMessage: o,
892
874
  isInvalid: u,
893
875
  isRequired: d,
894
- ...h,
895
- children: i.map(({ label: x, value: R }) => /* @__PURE__ */ t.jsx(
896
- K,
876
+ ...g,
877
+ children: i.map(({ label: h, value: v }) => /* @__PURE__ */ t.jsx(
878
+ Q,
897
879
  {
898
880
  size: f,
899
- value: R,
881
+ value: v,
900
882
  onChange: c,
901
- defaultChecked: b === R,
902
- children: x
883
+ defaultChecked: x === v,
884
+ children: h
903
885
  },
904
- `${x}-${R}`
886
+ `${h}-${v}`
905
887
  ))
906
888
  }
907
889
  );
908
890
  };
909
- Ne.displayName = "RadioGroup";
891
+ Re.displayName = "RadioGroup";
910
892
  export {
911
- Q as Checkbox,
912
- Re as CheckboxGroup,
913
- q as FieldsetControl,
914
- ge as FileInput,
915
- he as Input,
916
- ye as LabelControl,
917
- K as Radio,
918
- Ne as RadioGroup,
893
+ Z as Checkbox,
894
+ ye as CheckboxGroup,
895
+ $ as FieldsetControl,
896
+ xe as FileInput,
897
+ ge as Input,
898
+ ve as LabelControl,
899
+ Q as Radio,
900
+ Re as RadioGroup,
919
901
  me as Select,
920
- ve as Textarea
902
+ he as Textarea
921
903
  };