@sakura-ui/forms 0.0.2 → 0.0.4

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 (35) hide show
  1. package/dist/index.cjs.js +20 -24
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.es.js +561 -375
  4. package/dist/index.es.js.map +1 -1
  5. package/package.json +6 -1
  6. package/dist/components/Checkbox.d.ts +0 -5
  7. package/dist/components/Checkbox.d.ts.map +0 -1
  8. package/dist/components/Radio.d.ts +0 -5
  9. package/dist/components/Radio.d.ts.map +0 -1
  10. package/dist/components/Select.d.ts +0 -5
  11. package/dist/components/Select.d.ts.map +0 -1
  12. package/dist/components/Text.d.ts +0 -5
  13. package/dist/components/Text.d.ts.map +0 -1
  14. package/dist/components/Textarea.d.ts +0 -5
  15. package/dist/components/Textarea.d.ts.map +0 -1
  16. package/dist/components/controlled/CheckboxGroup.d.ts +0 -9
  17. package/dist/components/controlled/CheckboxGroup.d.ts.map +0 -1
  18. package/dist/components/controlled/InputItem.d.ts +0 -5
  19. package/dist/components/controlled/InputItem.d.ts.map +0 -1
  20. package/dist/components/controlled/RadioGroup.d.ts +0 -9
  21. package/dist/components/controlled/RadioGroup.d.ts.map +0 -1
  22. package/dist/components/controlled/Select.d.ts +0 -6
  23. package/dist/components/controlled/Select.d.ts.map +0 -1
  24. package/dist/components/controlled/Text.d.ts +0 -6
  25. package/dist/components/controlled/Text.d.ts.map +0 -1
  26. package/dist/components/controlled/Textarea.d.ts +0 -6
  27. package/dist/components/controlled/Textarea.d.ts.map +0 -1
  28. package/dist/components/controlled/index.d.ts +0 -6
  29. package/dist/components/controlled/index.d.ts.map +0 -1
  30. package/dist/components/index.d.ts +0 -6
  31. package/dist/components/index.d.ts.map +0 -1
  32. package/dist/index.d.ts +0 -3
  33. package/dist/index.d.ts.map +0 -1
  34. package/dist/utils/index.d.ts +0 -2
  35. package/dist/utils/index.d.ts.map +0 -1
package/dist/index.es.js CHANGED
@@ -1,12 +1,12 @@
1
- import j from "react";
2
- var a = {}, sr = {
1
+ import g from "react";
2
+ var n = {}, ur = {
3
3
  get exports() {
4
- return a;
4
+ return n;
5
5
  },
6
- set exports(s) {
7
- a = s;
6
+ set exports(l) {
7
+ n = l;
8
8
  }
9
- }, $ = {};
9
+ }, A = {};
10
10
  /**
11
11
  * @license React
12
12
  * react-jsx-runtime.production.min.js
@@ -16,25 +16,25 @@ var a = {}, sr = {
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
18
  */
19
- var we;
20
- function lr() {
21
- if (we)
22
- return $;
23
- we = 1;
24
- var s = j, d = Symbol.for("react.element"), v = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, f = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
25
- function R(g, m, w) {
26
- var _, C = {}, S = null, Y = null;
27
- w !== void 0 && (S = "" + w), m.key !== void 0 && (S = "" + m.key), m.ref !== void 0 && (Y = m.ref);
28
- for (_ in m)
29
- u.call(m, _) && !h.hasOwnProperty(_) && (C[_] = m[_]);
30
- if (g && g.defaultProps)
31
- for (_ in m = g.defaultProps, m)
32
- C[_] === void 0 && (C[_] = m[_]);
33
- return { $$typeof: d, type: g, key: S, ref: Y, props: C, _owner: f.current };
19
+ var Te;
20
+ function cr() {
21
+ if (Te)
22
+ return A;
23
+ Te = 1;
24
+ var l = g, f = Symbol.for("react.element"), h = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, i = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
25
+ function v(d, u, j) {
26
+ var x, _ = {}, P = null, W = null;
27
+ j !== void 0 && (P = "" + j), u.key !== void 0 && (P = "" + u.key), u.ref !== void 0 && (W = u.ref);
28
+ for (x in u)
29
+ p.call(u, x) && !a.hasOwnProperty(x) && (_[x] = u[x]);
30
+ if (d && d.defaultProps)
31
+ for (x in u = d.defaultProps, u)
32
+ _[x] === void 0 && (_[x] = u[x]);
33
+ return { $$typeof: f, type: d, key: P, ref: W, props: _, _owner: i.current };
34
34
  }
35
- return $.Fragment = v, $.jsx = R, $.jsxs = R, $;
35
+ return A.Fragment = h, A.jsx = v, A.jsxs = v, A;
36
36
  }
37
- var W = {};
37
+ var q = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,91 +44,91 @@ var W = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var je;
48
- function cr() {
49
- return je || (je = 1, process.env.NODE_ENV !== "production" && function() {
50
- var s = j, d = Symbol.for("react.element"), v = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), g = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, Te = "@@iterator";
51
- function Ce(e) {
47
+ var Ce;
48
+ function dr() {
49
+ return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
50
+ var l = g, f = Symbol.for("react.element"), h = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), d = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), re = Symbol.iterator, Pe = "@@iterator";
51
+ function Ne(e) {
52
52
  if (e === null || typeof e != "object")
53
53
  return null;
54
- var r = Q && e[Q] || e[Te];
54
+ var r = re && e[re] || e[Pe];
55
55
  return typeof r == "function" ? r : null;
56
56
  }
57
- var N = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
- function y(e) {
57
+ var k = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
+ function E(e) {
59
59
  {
60
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
61
- t[n - 1] = arguments[n];
62
- Pe("error", e, t);
60
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
61
+ t[s - 1] = arguments[s];
62
+ Se("error", e, t);
63
63
  }
64
64
  }
65
- function Pe(e, r, t) {
65
+ function Se(e, r, t) {
66
66
  {
67
- var n = N.ReactDebugCurrentFrame, l = n.getStackAddendum();
68
- l !== "" && (r += "%s", t = t.concat([l]));
69
- var c = t.map(function(i) {
70
- return String(i);
67
+ var s = k.ReactDebugCurrentFrame, m = s.getStackAddendum();
68
+ m !== "" && (r += "%s", t = t.concat([m]));
69
+ var b = t.map(function(c) {
70
+ return String(c);
71
71
  });
72
- c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
72
+ b.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, b);
73
73
  }
74
74
  }
75
- var Oe = !1, Se = !1, ke = !1, Ne = !1, Fe = !1, ee;
76
- ee = Symbol.for("react.module.reference");
77
- function De(e) {
78
- return !!(typeof e == "string" || typeof e == "function" || e === u || e === h || Fe || e === f || e === w || e === _ || Ne || e === Y || Oe || Se || ke || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === C || e.$$typeof === R || e.$$typeof === g || e.$$typeof === m || // This needs to include all possible module reference object
75
+ var Oe = !1, Ie = !1, ke = !1, Fe = !1, De = !1, te;
76
+ te = Symbol.for("react.module.reference");
77
+ function $e(e) {
78
+ return !!(typeof e == "string" || typeof e == "function" || e === p || e === a || De || e === i || e === j || e === x || Fe || e === W || Oe || Ie || ke || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === d || e.$$typeof === u || // This needs to include all possible module reference object
79
79
  // types supported by any Flight configuration anywhere since
80
80
  // we don't know which Flight build this will end up being used
81
81
  // with.
82
- e.$$typeof === ee || e.getModuleId !== void 0));
82
+ e.$$typeof === te || e.getModuleId !== void 0));
83
83
  }
84
- function Ae(e, r, t) {
85
- var n = e.displayName;
86
- if (n)
87
- return n;
88
- var l = r.displayName || r.name || "";
89
- return l !== "" ? t + "(" + l + ")" : t;
84
+ function Me(e, r, t) {
85
+ var s = e.displayName;
86
+ if (s)
87
+ return s;
88
+ var m = r.displayName || r.name || "";
89
+ return m !== "" ? t + "(" + m + ")" : t;
90
90
  }
91
- function re(e) {
91
+ function ne(e) {
92
92
  return e.displayName || "Context";
93
93
  }
94
- function P(e) {
94
+ function N(e) {
95
95
  if (e == null)
96
96
  return null;
97
- if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
97
+ if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
98
98
  return e.displayName || e.name || null;
99
99
  if (typeof e == "string")
100
100
  return e;
101
101
  switch (e) {
102
- case u:
102
+ case p:
103
103
  return "Fragment";
104
- case v:
105
- return "Portal";
106
104
  case h:
105
+ return "Portal";
106
+ case a:
107
107
  return "Profiler";
108
- case f:
108
+ case i:
109
109
  return "StrictMode";
110
- case w:
110
+ case j:
111
111
  return "Suspense";
112
- case _:
112
+ case x:
113
113
  return "SuspenseList";
114
114
  }
115
115
  if (typeof e == "object")
116
116
  switch (e.$$typeof) {
117
- case g:
117
+ case d:
118
118
  var r = e;
119
- return re(r) + ".Consumer";
120
- case R:
119
+ return ne(r) + ".Consumer";
120
+ case v:
121
121
  var t = e;
122
- return re(t._context) + ".Provider";
123
- case m:
124
- return Ae(e, e.render, "ForwardRef");
125
- case C:
126
- var n = e.displayName || null;
127
- return n !== null ? n : P(e.type) || "Memo";
128
- case S: {
129
- var l = e, c = l._payload, i = l._init;
122
+ return ne(t._context) + ".Provider";
123
+ case u:
124
+ return Me(e, e.render, "ForwardRef");
125
+ case _:
126
+ var s = e.displayName || null;
127
+ return s !== null ? s : N(e.type) || "Memo";
128
+ case P: {
129
+ var m = e, b = m._payload, c = m._init;
130
130
  try {
131
- return P(i(c));
131
+ return N(c(b));
132
132
  } catch {
133
133
  return null;
134
134
  }
@@ -136,18 +136,18 @@ function cr() {
136
136
  }
137
137
  return null;
138
138
  }
139
- var k = Object.assign, A = 0, te, ne, ae, oe, ie, se, le;
140
- function ce() {
139
+ var O = Object.assign, $ = 0, ae, se, ie, oe, le, ue, ce;
140
+ function de() {
141
141
  }
142
- ce.__reactDisabledLog = !0;
143
- function Ie() {
142
+ de.__reactDisabledLog = !0;
143
+ function Ae() {
144
144
  {
145
- if (A === 0) {
146
- te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, se = console.groupCollapsed, le = console.groupEnd;
145
+ if ($ === 0) {
146
+ ae = console.log, se = console.info, ie = console.warn, oe = console.error, le = console.group, ue = console.groupCollapsed, ce = console.groupEnd;
147
147
  var e = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
150
- value: ce,
150
+ value: de,
151
151
  writable: !0
152
152
  };
153
153
  Object.defineProperties(console, {
@@ -160,138 +160,138 @@ function cr() {
160
160
  groupEnd: e
161
161
  });
162
162
  }
163
- A++;
163
+ $++;
164
164
  }
165
165
  }
166
- function $e() {
166
+ function qe() {
167
167
  {
168
- if (A--, A === 0) {
168
+ if ($--, $ === 0) {
169
169
  var e = {
170
170
  configurable: !0,
171
171
  enumerable: !0,
172
172
  writable: !0
173
173
  };
174
174
  Object.defineProperties(console, {
175
- log: k({}, e, {
176
- value: te
177
- }),
178
- info: k({}, e, {
179
- value: ne
180
- }),
181
- warn: k({}, e, {
175
+ log: O({}, e, {
182
176
  value: ae
183
177
  }),
184
- error: k({}, e, {
185
- value: oe
178
+ info: O({}, e, {
179
+ value: se
186
180
  }),
187
- group: k({}, e, {
181
+ warn: O({}, e, {
188
182
  value: ie
189
183
  }),
190
- groupCollapsed: k({}, e, {
191
- value: se
184
+ error: O({}, e, {
185
+ value: oe
192
186
  }),
193
- groupEnd: k({}, e, {
187
+ group: O({}, e, {
194
188
  value: le
189
+ }),
190
+ groupCollapsed: O({}, e, {
191
+ value: ue
192
+ }),
193
+ groupEnd: O({}, e, {
194
+ value: ce
195
195
  })
196
196
  });
197
197
  }
198
- A < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
198
+ $ < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
199
199
  }
200
200
  }
201
- var G = N.ReactCurrentDispatcher, q;
202
- function M(e, r, t) {
201
+ var G = k.ReactCurrentDispatcher, J;
202
+ function Y(e, r, t) {
203
203
  {
204
- if (q === void 0)
204
+ if (J === void 0)
205
205
  try {
206
206
  throw Error();
207
- } catch (l) {
208
- var n = l.stack.trim().match(/\n( *(at )?)/);
209
- q = n && n[1] || "";
207
+ } catch (m) {
208
+ var s = m.stack.trim().match(/\n( *(at )?)/);
209
+ J = s && s[1] || "";
210
210
  }
211
211
  return `
212
- ` + q + e;
212
+ ` + J + e;
213
213
  }
214
214
  }
215
- var J = !1, L;
215
+ var z = !1, L;
216
216
  {
217
217
  var We = typeof WeakMap == "function" ? WeakMap : Map;
218
218
  L = new We();
219
219
  }
220
- function ue(e, r) {
221
- if (!e || J)
220
+ function fe(e, r) {
221
+ if (!e || z)
222
222
  return "";
223
223
  {
224
224
  var t = L.get(e);
225
225
  if (t !== void 0)
226
226
  return t;
227
227
  }
228
- var n;
229
- J = !0;
230
- var l = Error.prepareStackTrace;
228
+ var s;
229
+ z = !0;
230
+ var m = Error.prepareStackTrace;
231
231
  Error.prepareStackTrace = void 0;
232
- var c;
233
- c = G.current, G.current = null, Ie();
232
+ var b;
233
+ b = G.current, G.current = null, Ae();
234
234
  try {
235
235
  if (r) {
236
- var i = function() {
236
+ var c = function() {
237
237
  throw Error();
238
238
  };
239
- if (Object.defineProperty(i.prototype, "props", {
239
+ if (Object.defineProperty(c.prototype, "props", {
240
240
  set: function() {
241
241
  throw Error();
242
242
  }
243
243
  }), typeof Reflect == "object" && Reflect.construct) {
244
244
  try {
245
- Reflect.construct(i, []);
246
- } catch (O) {
247
- n = O;
245
+ Reflect.construct(c, []);
246
+ } catch (S) {
247
+ s = S;
248
248
  }
249
- Reflect.construct(e, [], i);
249
+ Reflect.construct(e, [], c);
250
250
  } else {
251
251
  try {
252
- i.call();
253
- } catch (O) {
254
- n = O;
252
+ c.call();
253
+ } catch (S) {
254
+ s = S;
255
255
  }
256
- e.call(i.prototype);
256
+ e.call(c.prototype);
257
257
  }
258
258
  } else {
259
259
  try {
260
260
  throw Error();
261
- } catch (O) {
262
- n = O;
261
+ } catch (S) {
262
+ s = S;
263
263
  }
264
264
  e();
265
265
  }
266
- } catch (O) {
267
- if (O && n && typeof O.stack == "string") {
268
- for (var o = O.stack.split(`
269
- `), x = n.stack.split(`
270
- `), p = o.length - 1, b = x.length - 1; p >= 1 && b >= 0 && o[p] !== x[b]; )
271
- b--;
272
- for (; p >= 1 && b >= 0; p--, b--)
273
- if (o[p] !== x[b]) {
274
- if (p !== 1 || b !== 1)
266
+ } catch (S) {
267
+ if (S && s && typeof S.stack == "string") {
268
+ for (var o = S.stack.split(`
269
+ `), w = s.stack.split(`
270
+ `), R = o.length - 1, y = w.length - 1; R >= 1 && y >= 0 && o[R] !== w[y]; )
271
+ y--;
272
+ for (; R >= 1 && y >= 0; R--, y--)
273
+ if (o[R] !== w[y]) {
274
+ if (R !== 1 || y !== 1)
275
275
  do
276
- if (p--, b--, b < 0 || o[p] !== x[b]) {
277
- var E = `
278
- ` + o[p].replace(" at new ", " at ");
279
- return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, E), E;
276
+ if (R--, y--, y < 0 || o[R] !== w[y]) {
277
+ var C = `
278
+ ` + o[R].replace(" at new ", " at ");
279
+ return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, C), C;
280
280
  }
281
- while (p >= 1 && b >= 0);
281
+ while (R >= 1 && y >= 0);
282
282
  break;
283
283
  }
284
284
  }
285
285
  } finally {
286
- J = !1, G.current = c, $e(), Error.prepareStackTrace = l;
286
+ z = !1, G.current = b, qe(), Error.prepareStackTrace = m;
287
287
  }
288
- var D = e ? e.displayName || e.name : "", Ee = D ? M(D) : "";
289
- return typeof e == "function" && L.set(e, Ee), Ee;
288
+ var D = e ? e.displayName || e.name : "", je = D ? Y(D) : "";
289
+ return typeof e == "function" && L.set(e, je), je;
290
290
  }
291
291
  function Ye(e, r, t) {
292
- return ue(e, !1);
292
+ return fe(e, !1);
293
293
  }
294
- function Me(e) {
294
+ function Le(e) {
295
295
  var r = e.prototype;
296
296
  return !!(r && r.isReactComponent);
297
297
  }
@@ -299,90 +299,90 @@ function cr() {
299
299
  if (e == null)
300
300
  return "";
301
301
  if (typeof e == "function")
302
- return ue(e, Me(e));
302
+ return fe(e, Le(e));
303
303
  if (typeof e == "string")
304
- return M(e);
304
+ return Y(e);
305
305
  switch (e) {
306
- case w:
307
- return M("Suspense");
308
- case _:
309
- return M("SuspenseList");
306
+ case j:
307
+ return Y("Suspense");
308
+ case x:
309
+ return Y("SuspenseList");
310
310
  }
311
311
  if (typeof e == "object")
312
312
  switch (e.$$typeof) {
313
- case m:
313
+ case u:
314
314
  return Ye(e.render);
315
- case C:
315
+ case _:
316
316
  return V(e.type, r, t);
317
- case S: {
318
- var n = e, l = n._payload, c = n._init;
317
+ case P: {
318
+ var s = e, m = s._payload, b = s._init;
319
319
  try {
320
- return V(c(l), r, t);
320
+ return V(b(m), r, t);
321
321
  } catch {
322
322
  }
323
323
  }
324
324
  }
325
325
  return "";
326
326
  }
327
- var U = Object.prototype.hasOwnProperty, fe = {}, de = N.ReactDebugCurrentFrame;
327
+ var U = Object.prototype.hasOwnProperty, pe = {}, ve = k.ReactDebugCurrentFrame;
328
328
  function B(e) {
329
329
  if (e) {
330
330
  var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
331
- de.setExtraStackFrame(t);
331
+ ve.setExtraStackFrame(t);
332
332
  } else
333
- de.setExtraStackFrame(null);
333
+ ve.setExtraStackFrame(null);
334
334
  }
335
- function Le(e, r, t, n, l) {
335
+ function Ve(e, r, t, s, m) {
336
336
  {
337
- var c = Function.call.bind(U);
338
- for (var i in e)
339
- if (c(e, i)) {
337
+ var b = Function.call.bind(U);
338
+ for (var c in e)
339
+ if (b(e, c)) {
340
340
  var o = void 0;
341
341
  try {
342
- if (typeof e[i] != "function") {
343
- var x = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
- throw x.name = "Invariant Violation", x;
342
+ if (typeof e[c] != "function") {
343
+ var w = Error((s || "React class") + ": " + t + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
+ throw w.name = "Invariant Violation", w;
345
345
  }
346
- o = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
- } catch (p) {
348
- o = p;
346
+ o = e[c](r, c, s, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
+ } catch (R) {
348
+ o = R;
349
349
  }
350
- o && !(o instanceof Error) && (B(l), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof o), B(null)), o instanceof Error && !(o.message in fe) && (fe[o.message] = !0, B(l), y("Failed %s type: %s", t, o.message), B(null));
350
+ o && !(o instanceof Error) && (B(m), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", t, c, typeof o), B(null)), o instanceof Error && !(o.message in pe) && (pe[o.message] = !0, B(m), E("Failed %s type: %s", t, o.message), B(null));
351
351
  }
352
352
  }
353
353
  }
354
- var Ve = Array.isArray;
355
- function z(e) {
356
- return Ve(e);
354
+ var Ue = Array.isArray;
355
+ function K(e) {
356
+ return Ue(e);
357
357
  }
358
- function Ue(e) {
358
+ function Be(e) {
359
359
  {
360
360
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
361
361
  return t;
362
362
  }
363
363
  }
364
- function Be(e) {
364
+ function Ge(e) {
365
365
  try {
366
- return ve(e), !1;
366
+ return me(e), !1;
367
367
  } catch {
368
368
  return !0;
369
369
  }
370
370
  }
371
- function ve(e) {
371
+ function me(e) {
372
372
  return "" + e;
373
373
  }
374
- function pe(e) {
375
- if (Be(e))
376
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ue(e)), ve(e);
374
+ function he(e) {
375
+ if (Ge(e))
376
+ return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), me(e);
377
377
  }
378
- var I = N.ReactCurrentOwner, Ge = {
378
+ var M = k.ReactCurrentOwner, Je = {
379
379
  key: !0,
380
380
  ref: !0,
381
381
  __self: !0,
382
382
  __source: !0
383
- }, be, me, K;
384
- K = {};
385
- function qe(e) {
383
+ }, be, xe, H;
384
+ H = {};
385
+ function ze(e) {
386
386
  if (U.call(e, "ref")) {
387
387
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
388
388
  if (r && r.isReactWarning)
@@ -390,7 +390,7 @@ function cr() {
390
390
  }
391
391
  return e.ref !== void 0;
392
392
  }
393
- function Je(e) {
393
+ function Ke(e) {
394
394
  if (U.call(e, "key")) {
395
395
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
396
396
  if (r && r.isReactWarning)
@@ -398,16 +398,16 @@ function cr() {
398
398
  }
399
399
  return e.key !== void 0;
400
400
  }
401
- function ze(e, r) {
402
- if (typeof e.ref == "string" && I.current && r && I.current.stateNode !== r) {
403
- var t = P(I.current.type);
404
- K[t] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(I.current.type), e.ref), K[t] = !0);
401
+ function He(e, r) {
402
+ if (typeof e.ref == "string" && M.current && r && M.current.stateNode !== r) {
403
+ var t = N(M.current.type);
404
+ H[t] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', N(M.current.type), e.ref), H[t] = !0);
405
405
  }
406
406
  }
407
- function Ke(e, r) {
407
+ function Xe(e, r) {
408
408
  {
409
409
  var t = function() {
410
- be || (be = !0, y("%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://reactjs.org/link/special-props)", r));
410
+ be || (be = !0, E("%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://reactjs.org/link/special-props)", r));
411
411
  };
412
412
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
413
413
  get: t,
@@ -415,10 +415,10 @@ function cr() {
415
415
  });
416
416
  }
417
417
  }
418
- function He(e, r) {
418
+ function Ze(e, r) {
419
419
  {
420
420
  var t = function() {
421
- me || (me = !0, y("%s: `ref` 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://reactjs.org/link/special-props)", r));
421
+ xe || (xe = !0, E("%s: `ref` 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://reactjs.org/link/special-props)", r));
422
422
  };
423
423
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
424
424
  get: t,
@@ -426,17 +426,17 @@ function cr() {
426
426
  });
427
427
  }
428
428
  }
429
- var Xe = function(e, r, t, n, l, c, i) {
429
+ var Qe = function(e, r, t, s, m, b, c) {
430
430
  var o = {
431
431
  // This tag allows us to uniquely identify this as a React Element
432
- $$typeof: d,
432
+ $$typeof: f,
433
433
  // Built-in properties that belong on the element
434
434
  type: e,
435
435
  key: r,
436
436
  ref: t,
437
- props: i,
437
+ props: c,
438
438
  // Record the component responsible for creating this element.
439
- _owner: c
439
+ _owner: b
440
440
  };
441
441
  return o._store = {}, Object.defineProperty(o._store, "validated", {
442
442
  configurable: !1,
@@ -447,49 +447,49 @@ function cr() {
447
447
  configurable: !1,
448
448
  enumerable: !1,
449
449
  writable: !1,
450
- value: n
450
+ value: s
451
451
  }), Object.defineProperty(o, "_source", {
452
452
  configurable: !1,
453
453
  enumerable: !1,
454
454
  writable: !1,
455
- value: l
455
+ value: m
456
456
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
457
457
  };
458
- function Ze(e, r, t, n, l) {
458
+ function er(e, r, t, s, m) {
459
459
  {
460
- var c, i = {}, o = null, x = null;
461
- t !== void 0 && (pe(t), o = "" + t), Je(r) && (pe(r.key), o = "" + r.key), qe(r) && (x = r.ref, ze(r, l));
462
- for (c in r)
463
- U.call(r, c) && !Ge.hasOwnProperty(c) && (i[c] = r[c]);
460
+ var b, c = {}, o = null, w = null;
461
+ t !== void 0 && (he(t), o = "" + t), Ke(r) && (he(r.key), o = "" + r.key), ze(r) && (w = r.ref, He(r, m));
462
+ for (b in r)
463
+ U.call(r, b) && !Je.hasOwnProperty(b) && (c[b] = r[b]);
464
464
  if (e && e.defaultProps) {
465
- var p = e.defaultProps;
466
- for (c in p)
467
- i[c] === void 0 && (i[c] = p[c]);
465
+ var R = e.defaultProps;
466
+ for (b in R)
467
+ c[b] === void 0 && (c[b] = R[b]);
468
468
  }
469
- if (o || x) {
470
- var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
471
- o && Ke(i, b), x && He(i, b);
469
+ if (o || w) {
470
+ var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
471
+ o && Xe(c, y), w && Ze(c, y);
472
472
  }
473
- return Xe(e, o, x, l, n, I.current, i);
473
+ return Qe(e, o, w, m, s, M.current, c);
474
474
  }
475
475
  }
476
- var H = N.ReactCurrentOwner, he = N.ReactDebugCurrentFrame;
476
+ var X = k.ReactCurrentOwner, ge = k.ReactDebugCurrentFrame;
477
477
  function F(e) {
478
478
  if (e) {
479
479
  var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
480
- he.setExtraStackFrame(t);
480
+ ge.setExtraStackFrame(t);
481
481
  } else
482
- he.setExtraStackFrame(null);
482
+ ge.setExtraStackFrame(null);
483
483
  }
484
- var X;
485
- X = !1;
486
- function Z(e) {
487
- return typeof e == "object" && e !== null && e.$$typeof === d;
484
+ var Z;
485
+ Z = !1;
486
+ function Q(e) {
487
+ return typeof e == "object" && e !== null && e.$$typeof === f;
488
488
  }
489
- function ge() {
489
+ function Re() {
490
490
  {
491
- if (H.current) {
492
- var e = P(H.current.type);
491
+ if (X.current) {
492
+ var e = N(X.current.type);
493
493
  if (e)
494
494
  return `
495
495
 
@@ -498,7 +498,7 @@ Check the render method of \`` + e + "`.";
498
498
  return "";
499
499
  }
500
500
  }
501
- function Qe(e) {
501
+ function rr(e) {
502
502
  {
503
503
  if (e !== void 0) {
504
504
  var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
@@ -510,9 +510,9 @@ Check your code at ` + r + ":" + t + ".";
510
510
  }
511
511
  }
512
512
  var ye = {};
513
- function er(e) {
513
+ function tr(e) {
514
514
  {
515
- var r = ge();
515
+ var r = Re();
516
516
  if (!r) {
517
517
  var t = typeof e == "string" ? e : e.displayName || e.name;
518
518
  t && (r = `
@@ -522,39 +522,39 @@ Check the top-level render call using <` + t + ">.");
522
522
  return r;
523
523
  }
524
524
  }
525
- function xe(e, r) {
525
+ function _e(e, r) {
526
526
  {
527
527
  if (!e._store || e._store.validated || e.key != null)
528
528
  return;
529
529
  e._store.validated = !0;
530
- var t = er(r);
530
+ var t = tr(r);
531
531
  if (ye[t])
532
532
  return;
533
533
  ye[t] = !0;
534
- var n = "";
535
- e && e._owner && e._owner !== H.current && (n = " It was passed a child from " + P(e._owner.type) + "."), F(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), F(null);
534
+ var s = "";
535
+ e && e._owner && e._owner !== X.current && (s = " It was passed a child from " + N(e._owner.type) + "."), F(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, s), F(null);
536
536
  }
537
537
  }
538
- function Re(e, r) {
538
+ function Ee(e, r) {
539
539
  {
540
540
  if (typeof e != "object")
541
541
  return;
542
- if (z(e))
542
+ if (K(e))
543
543
  for (var t = 0; t < e.length; t++) {
544
- var n = e[t];
545
- Z(n) && xe(n, r);
544
+ var s = e[t];
545
+ Q(s) && _e(s, r);
546
546
  }
547
- else if (Z(e))
547
+ else if (Q(e))
548
548
  e._store && (e._store.validated = !0);
549
549
  else if (e) {
550
- var l = Ce(e);
551
- if (typeof l == "function" && l !== e.entries)
552
- for (var c = l.call(e), i; !(i = c.next()).done; )
553
- Z(i.value) && xe(i.value, r);
550
+ var m = Ne(e);
551
+ if (typeof m == "function" && m !== e.entries)
552
+ for (var b = m.call(e), c; !(c = b.next()).done; )
553
+ Q(c.value) && _e(c.value, r);
554
554
  }
555
555
  }
556
556
  }
557
- function rr(e) {
557
+ function nr(e) {
558
558
  {
559
559
  var r = e.type;
560
560
  if (r == null || typeof r == "string")
@@ -562,90 +562,97 @@ Check the top-level render call using <` + t + ">.");
562
562
  var t;
563
563
  if (typeof r == "function")
564
564
  t = r.propTypes;
565
- else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
565
+ else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
566
566
  // Inner props are checked in the reconciler.
567
- r.$$typeof === C))
567
+ r.$$typeof === _))
568
568
  t = r.propTypes;
569
569
  else
570
570
  return;
571
571
  if (t) {
572
- var n = P(r);
573
- Le(t, e.props, "prop", n, e);
574
- } else if (r.PropTypes !== void 0 && !X) {
575
- X = !0;
576
- var l = P(r);
577
- y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown");
572
+ var s = N(r);
573
+ Ve(t, e.props, "prop", s, e);
574
+ } else if (r.PropTypes !== void 0 && !Z) {
575
+ Z = !0;
576
+ var m = N(r);
577
+ E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
578
578
  }
579
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
579
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
580
580
  }
581
581
  }
582
- function tr(e) {
582
+ function ar(e) {
583
583
  {
584
584
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
585
- var n = r[t];
586
- if (n !== "children" && n !== "key") {
587
- F(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), F(null);
585
+ var s = r[t];
586
+ if (s !== "children" && s !== "key") {
587
+ F(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), F(null);
588
588
  break;
589
589
  }
590
590
  }
591
- e.ref !== null && (F(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
591
+ e.ref !== null && (F(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
592
592
  }
593
593
  }
594
- function _e(e, r, t, n, l, c) {
594
+ function we(e, r, t, s, m, b) {
595
595
  {
596
- var i = De(e);
597
- if (!i) {
596
+ var c = $e(e);
597
+ if (!c) {
598
598
  var o = "";
599
599
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
600
- var x = Qe(l);
601
- x ? o += x : o += ge();
602
- var p;
603
- e === null ? p = "null" : z(e) ? p = "array" : e !== void 0 && e.$$typeof === d ? (p = "<" + (P(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : p = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", p, o);
600
+ var w = rr(m);
601
+ w ? o += w : o += Re();
602
+ var R;
603
+ e === null ? R = "null" : K(e) ? R = "array" : e !== void 0 && e.$$typeof === f ? (R = "<" + (N(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, o);
604
604
  }
605
- var b = Ze(e, r, t, l, c);
606
- if (b == null)
607
- return b;
608
- if (i) {
609
- var E = r.children;
610
- if (E !== void 0)
611
- if (n)
612
- if (z(E)) {
613
- for (var D = 0; D < E.length; D++)
614
- Re(E[D], e);
615
- Object.freeze && Object.freeze(E);
605
+ var y = er(e, r, t, m, b);
606
+ if (y == null)
607
+ return y;
608
+ if (c) {
609
+ var C = r.children;
610
+ if (C !== void 0)
611
+ if (s)
612
+ if (K(C)) {
613
+ for (var D = 0; D < C.length; D++)
614
+ Ee(C[D], e);
615
+ Object.freeze && Object.freeze(C);
616
616
  } else
617
- y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
617
+ E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
618
618
  else
619
- Re(E, e);
619
+ Ee(C, e);
620
620
  }
621
- return e === u ? tr(b) : rr(b), b;
621
+ return e === p ? ar(y) : nr(y), y;
622
622
  }
623
623
  }
624
- function nr(e, r, t) {
625
- return _e(e, r, t, !0);
624
+ function sr(e, r, t) {
625
+ return we(e, r, t, !0);
626
626
  }
627
- function ar(e, r, t) {
628
- return _e(e, r, t, !1);
627
+ function ir(e, r, t) {
628
+ return we(e, r, t, !1);
629
629
  }
630
- var or = ar, ir = nr;
631
- W.Fragment = u, W.jsx = or, W.jsxs = ir;
632
- }()), W;
630
+ var or = ir, lr = sr;
631
+ q.Fragment = p, q.jsx = or, q.jsxs = lr;
632
+ }()), q;
633
633
  }
634
- (function(s) {
635
- process.env.NODE_ENV === "production" ? s.exports = lr() : s.exports = cr();
636
- })(sr);
637
- const T = (...s) => s.filter(Boolean).join(" "), ur = j.forwardRef(
638
- (s, d) => {
639
- const { className: v, children: u, ...f } = s, h = `
634
+ (function(l) {
635
+ process.env.NODE_ENV === "production" ? l.exports = cr() : l.exports = dr();
636
+ })(ur);
637
+ const T = (...l) => l.filter(Boolean).join(" "), I = g.createContext({
638
+ helperTextId: "",
639
+ errorMessageId: "",
640
+ isInvalid: !1,
641
+ isRequired: !1
642
+ }), fr = g.forwardRef(
643
+ (l, f) => {
644
+ const { className: h, children: p, ...i } = l, a = g.useContext(I);
645
+ a.isRequired && (i.required = !0), a.groupName && (i.name = a.groupName);
646
+ const v = `
640
647
  flex
641
648
  items-center
642
649
  text-sm
643
650
  cursor-pointer
644
651
  py-2
645
- `, R = `
652
+ `, d = `
646
653
  hidden
647
654
  peer
648
- `, g = `
655
+ `, u = `
649
656
  inline-block
650
657
  bg-clip-content
651
658
  w-6 h-6
@@ -658,38 +665,41 @@ const T = (...s) => s.filter(Boolean).join(" "), ur = j.forwardRef(
658
665
  peer-checked:bg-sea-600
659
666
  peer-checked:border-none
660
667
  `;
661
- return /* @__PURE__ */ a.jsx("div", { className: "inline-block", children: /* @__PURE__ */ a.jsxs("label", { htmlFor: f.id, className: T(h, v), children: [
662
- /* @__PURE__ */ a.jsx(
668
+ return /* @__PURE__ */ n.jsx("div", { className: "inline-block", children: /* @__PURE__ */ n.jsxs("label", { htmlFor: i.id, className: T(v, h), children: [
669
+ /* @__PURE__ */ n.jsx(
663
670
  "input",
664
671
  {
665
- className: R,
672
+ className: d,
666
673
  type: "checkbox",
667
- ...f,
668
- ref: d
674
+ "aria-describedby": a.helperTextId,
675
+ "aria-errormessage": a.errorMessageId,
676
+ ...i,
677
+ ref: f
669
678
  }
670
679
  ),
671
- /* @__PURE__ */ a.jsx("span", { className: g, children: /* @__PURE__ */ a.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", children: /* @__PURE__ */ a.jsx(
680
+ /* @__PURE__ */ n.jsx("span", { className: u, children: /* @__PURE__ */ n.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", children: /* @__PURE__ */ n.jsx(
672
681
  "path",
673
682
  {
674
683
  fill: "#fff",
675
684
  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"
676
685
  }
677
686
  ) }) }),
678
- u
687
+ p
679
688
  ] }) });
680
689
  }
681
- ), fr = j.forwardRef((s, d) => {
682
- const { className: v, children: u, ...f } = s, h = `
690
+ ), pr = g.forwardRef((l, f) => {
691
+ const { className: h, children: p, ...i } = l, a = g.useContext(I);
692
+ a.isRequired && (i.required = !0), a.groupName && (i.name = a.groupName);
693
+ const v = `
683
694
  flex
684
695
  items-center
685
696
  text-sm
686
697
  cursor-pointer
687
698
  py-2
688
- `, R = `
699
+ `, d = `
689
700
  hidden
690
701
  peer
691
- `, g = `
692
- inline-block
702
+ `, u = `
693
703
  bg-clip-content
694
704
  w-6 h-6
695
705
  ml-1
@@ -702,49 +712,71 @@ const T = (...s) => s.filter(Boolean).join(" "), ur = j.forwardRef(
702
712
  peer-checked:bg-sea-600
703
713
  peer-checked:border-sea-600
704
714
  `;
705
- return /* @__PURE__ */ a.jsx("div", { className: "inline-block", children: /* @__PURE__ */ a.jsxs("label", { htmlFor: f.id, className: T(h, v), children: [
706
- /* @__PURE__ */ a.jsx("input", { className: R, type: "radio", ...f, ref: d }),
707
- /* @__PURE__ */ a.jsx("span", { className: g }),
708
- u
715
+ return /* @__PURE__ */ n.jsx("div", { className: "inline-block", children: /* @__PURE__ */ n.jsxs("label", { htmlFor: i.id, className: T(v, h), children: [
716
+ /* @__PURE__ */ n.jsx(
717
+ "input",
718
+ {
719
+ className: d,
720
+ type: "radio",
721
+ "aria-describedby": a.helperTextId,
722
+ "aria-errormessage": a.errorMessageId,
723
+ ...i,
724
+ ref: f
725
+ }
726
+ ),
727
+ /* @__PURE__ */ n.jsx("span", { className: u }),
728
+ p
709
729
  ] }) });
710
- }), dr = j.forwardRef(
711
- (s, d) => {
712
- const { className: v, children: u, ...f } = s, h = `
730
+ }), vr = g.forwardRef(
731
+ (l, f) => {
732
+ const { className: h, children: p, ...i } = l, a = g.useContext(I);
733
+ a.isRequired && (i.required = !0);
734
+ const v = a.isInvalid ? "border-sun-800" : "border-sumi-900", d = `
713
735
  appearance-none
714
736
  text-base
715
737
  w-full
716
738
  bg-white-100
717
739
  border
718
740
  border-solid
719
- border-sumi-900
720
741
  py-4 px-4 pr-8
721
742
  rounded-[8px]
722
743
  focus:outline
723
744
  focus:outline-2
724
745
  focus:outline-wood-500
725
746
  `;
726
- return /* @__PURE__ */ a.jsxs("div", { className: "inline-block relative", children: [
727
- /* @__PURE__ */ a.jsx("select", { className: T(h, s.className), ...f, ref: d, children: u }),
728
- /* @__PURE__ */ a.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2", children: /* @__PURE__ */ a.jsx(
747
+ return /* @__PURE__ */ n.jsxs("div", { className: "inline-block relative", children: [
748
+ /* @__PURE__ */ n.jsx(
749
+ "select",
750
+ {
751
+ className: T(d, v, l.className),
752
+ "aria-describedby": a.helperTextId,
753
+ "aria-errormessage": a.errorMessageId,
754
+ ...i,
755
+ ref: f,
756
+ children: p
757
+ }
758
+ ),
759
+ /* @__PURE__ */ n.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2", children: /* @__PURE__ */ n.jsx(
729
760
  "svg",
730
761
  {
731
762
  xmlns: "http://www.w3.org/2000/svg",
732
763
  className: "fill-sumi-900",
733
764
  height: "24",
734
765
  width: "24",
735
- children: /* @__PURE__ */ a.jsx("path", { d: "M12 15.05 6.35 9.4 7.4 8.35l4.6 4.6 4.6-4.6 1.05 1.05Z" })
766
+ children: /* @__PURE__ */ n.jsx("path", { d: "M12 15.05 6.35 9.4 7.4 8.35l4.6 4.6 4.6-4.6 1.05 1.05Z" })
736
767
  }
737
768
  ) })
738
769
  ] });
739
770
  }
740
- ), vr = j.forwardRef(
741
- (s, d) => {
742
- const { className: v, ...u } = s, f = `
771
+ ), mr = g.forwardRef(
772
+ (l, f) => {
773
+ const { className: h, ...p } = l, i = g.useContext(I);
774
+ i.isRequired && (p.required = !0);
775
+ const a = i.isInvalid ? "border-sun-800" : "border-sumi-900", v = `
743
776
  p-4
744
777
  rounded-lg
745
778
  border
746
- border-solid
747
- border-sumi-900
779
+ border-solid
748
780
  focus:outline
749
781
  focus:outline-2
750
782
  focus:outline-wood-500
@@ -754,24 +786,27 @@ const T = (...s) => s.filter(Boolean).join(" "), ur = j.forwardRef(
754
786
  disabled:border-solid
755
787
  disabled:border-sumi-500
756
788
  `;
757
- return /* @__PURE__ */ a.jsx(
789
+ return /* @__PURE__ */ n.jsx(
758
790
  "input",
759
791
  {
760
792
  type: "text",
761
- className: T(f, v),
762
- ...u,
763
- ref: d
793
+ className: T(v, a, h),
794
+ "aria-describedby": i.helperTextId,
795
+ "aria-errormessage": i.errorMessageId,
796
+ ...p,
797
+ ref: f
764
798
  }
765
799
  );
766
800
  }
767
- ), pr = j.forwardRef(
768
- (s, d) => {
769
- const { className: v, children: u, ...f } = s, h = `
801
+ ), hr = g.forwardRef(
802
+ (l, f) => {
803
+ const { className: h, children: p, ...i } = l, a = g.useContext(I);
804
+ a.isRequired && (i.required = !0);
805
+ const v = a.isInvalid ? "border-sun-800" : "border-sumi-900", d = `
770
806
  p-4
771
807
  rounded-lg
772
808
  border
773
809
  border-solid
774
- border-sumi-900
775
810
  focus:outline
776
811
  focus:outline-2
777
812
  focus:outline-wood-500
@@ -781,64 +816,215 @@ const T = (...s) => s.filter(Boolean).join(" "), ur = j.forwardRef(
781
816
  disabled:border-solid
782
817
  disabled:border-sumi-500
783
818
  `;
784
- return /* @__PURE__ */ a.jsx("textarea", { className: T(h, v), ...f, ref: d, children: u });
785
- }
786
- ), mr = (s) => {
787
- const { items: d, onChange: v, label: u, className: f, ...h } = s, R = `checkbox_group_${Math.random()}`;
788
- return /* @__PURE__ */ a.jsxs("fieldset", { className: T("mb-4", f), ...h, children: [
789
- /* @__PURE__ */ a.jsx("legend", { children: u }),
790
- d.map(({ label: g, value: m }, w) => /* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsx(ur, { name: R, value: m, onChange: v, children: g }) }, w))
791
- ] });
792
- }, hr = (s) => {
793
- const { items: d, onChange: v, label: u, className: f, ...h } = s, R = `radio_group_${Math.random()}`;
794
- return /* @__PURE__ */ a.jsxs("fieldset", { className: T("mb-4", f), ...h, children: [
795
- /* @__PURE__ */ a.jsx("legend", { children: u }),
796
- d.map(({ label: g, value: m }, w) => /* @__PURE__ */ a.jsx("div", { children: /* @__PURE__ */ a.jsx(
797
- fr,
819
+ return /* @__PURE__ */ n.jsx(
820
+ "textarea",
798
821
  {
799
- name: R,
800
- value: m,
801
- onChange: v,
802
- defaultChecked: w === 0,
803
- children: g
822
+ className: T(d, v, h),
823
+ "aria-describedby": a.helperTextId,
824
+ "aria-errormessage": a.errorMessageId,
825
+ ...i,
826
+ ref: f,
827
+ children: p
804
828
  }
805
- ) }, w))
806
- ] });
807
- }, gr = j.forwardRef(
808
- (s, d) => {
809
- const { label: v, className: u, ...f } = s;
810
- return /* @__PURE__ */ a.jsx("div", { className: T("mb-4", u), children: /* @__PURE__ */ a.jsxs("label", { children: [
811
- /* @__PURE__ */ a.jsx("div", { className: "block mb-2", children: v }),
812
- /* @__PURE__ */ a.jsx(dr, { ref: d, ...f })
813
- ] }) });
829
+ );
814
830
  }
815
- ), yr = j.forwardRef(
816
- (s, d) => {
817
- const { label: v, className: u, ...f } = s;
818
- return /* @__PURE__ */ a.jsx("div", { className: T("mb-4", u), children: /* @__PURE__ */ a.jsxs("label", { children: [
819
- /* @__PURE__ */ a.jsx("div", { className: "block mb-2", children: v }),
820
- /* @__PURE__ */ a.jsx(vr, { ref: d, ...f })
821
- ] }) });
831
+ ), ee = g.forwardRef(
832
+ (l, f) => {
833
+ const h = g.useId(), {
834
+ labelText: p,
835
+ className: i,
836
+ helperText: a,
837
+ errorMessage: v,
838
+ isInvalid: d,
839
+ isRequired: u,
840
+ children: j,
841
+ ...x
842
+ } = l, _ = {
843
+ helperTextId: `helper-text-${h}`,
844
+ errorMessageId: `error-message-${h}`,
845
+ isInvalid: d ?? !1,
846
+ isRequired: u ?? !1
847
+ };
848
+ return /* @__PURE__ */ n.jsx(I.Provider, { value: _, children: /* @__PURE__ */ n.jsx("div", { className: T("mb-4", i), ref: f, ...x, children: /* @__PURE__ */ n.jsxs("label", { children: [
849
+ /* @__PURE__ */ n.jsxs("p", { className: T("block mb-2", d && "text-sun-800"), children: [
850
+ p,
851
+ u && /* @__PURE__ */ n.jsx("span", { className: "text-sun-800", children: " *" })
852
+ ] }),
853
+ j,
854
+ a && /* @__PURE__ */ n.jsx(
855
+ "p",
856
+ {
857
+ id: _.helperTextId,
858
+ className: "text-sm text-sumi-700 mt-2",
859
+ children: a
860
+ }
861
+ ),
862
+ d && /* @__PURE__ */ n.jsx(
863
+ "p",
864
+ {
865
+ id: _.errorMessageId,
866
+ className: T(
867
+ "text-sm text-sun-800",
868
+ a ? "mt-1" : "mt-2"
869
+ ),
870
+ children: v
871
+ }
872
+ )
873
+ ] }) }) });
822
874
  }
823
- ), xr = j.forwardRef(
824
- (s, d) => {
825
- const { label: v, className: u, ...f } = s;
826
- return /* @__PURE__ */ a.jsx("div", { className: T("mb-4", u), children: /* @__PURE__ */ a.jsxs("label", { children: [
827
- /* @__PURE__ */ a.jsx("div", { className: "block mb-2", children: v }),
828
- /* @__PURE__ */ a.jsx(pr, { ref: d, ...f })
829
- ] }) });
875
+ ), xr = g.forwardRef((l, f) => {
876
+ const h = g.useId(), {
877
+ labelText: p,
878
+ className: i,
879
+ helperText: a,
880
+ errorMessage: v,
881
+ isInvalid: d,
882
+ isRequired: u,
883
+ children: j,
884
+ ...x
885
+ } = l, P = {
886
+ groupName: x.name ?? `group-${h}`,
887
+ helperTextId: `helper-text-${h}`,
888
+ errorMessageId: `error-message-${h}`,
889
+ isInvalid: d ?? !1,
890
+ isRequired: u ?? !1
891
+ };
892
+ return /* @__PURE__ */ n.jsx(I.Provider, { value: P, children: /* @__PURE__ */ n.jsxs("fieldset", { className: T("mb-4", i), ref: f, ...x, children: [
893
+ /* @__PURE__ */ n.jsx("legend", { children: /* @__PURE__ */ n.jsxs("p", { className: T("block mb-2", d && "text-sun-800"), children: [
894
+ p,
895
+ u && /* @__PURE__ */ n.jsx("span", { className: "text-sun-800", children: " *" })
896
+ ] }) }),
897
+ j,
898
+ a && /* @__PURE__ */ n.jsx("p", { id: P.helperTextId, className: "text-sm text-sumi-700 mt-2", children: a }),
899
+ d && /* @__PURE__ */ n.jsx(
900
+ "p",
901
+ {
902
+ id: P.errorMessageId,
903
+ className: T("text-sm text-sun-800", a ? "mt-1" : "mt-2"),
904
+ children: v
905
+ }
906
+ )
907
+ ] }) });
908
+ }), gr = (l) => {
909
+ const f = g.useId(), { items: h, onChange: p, label: i, className: a, helperText: v, ...d } = l, u = `checkbox_group_${Math.random()}`;
910
+ return /* @__PURE__ */ n.jsxs(
911
+ "fieldset",
912
+ {
913
+ className: T("mb-4", a),
914
+ "aria-describedby": `helper-text-${f}`,
915
+ ...d,
916
+ children: [
917
+ /* @__PURE__ */ n.jsx("legend", { children: i }),
918
+ h.map(({ label: j, value: x }, _) => /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(fr, { name: u, value: x, onChange: p, children: j }) }, _)),
919
+ v && /* @__PURE__ */ n.jsx("p", { id: `helper-text-${f}`, className: "text-sm text-sumi-700", children: v })
920
+ ]
921
+ }
922
+ );
923
+ }, Rr = (l) => {
924
+ const f = g.useId(), { items: h, onChange: p, label: i, className: a, helperText: v, ...d } = l, u = `radio_group_${Math.random()}`;
925
+ return /* @__PURE__ */ n.jsxs(
926
+ "fieldset",
927
+ {
928
+ className: T("mb-4", a),
929
+ "aria-describedby": `helper-text-${f}`,
930
+ ...d,
931
+ children: [
932
+ /* @__PURE__ */ n.jsx("legend", { children: i }),
933
+ h.map(({ label: j, value: x }, _) => /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
934
+ pr,
935
+ {
936
+ name: u,
937
+ value: x,
938
+ onChange: p,
939
+ defaultChecked: _ === 0,
940
+ children: j
941
+ }
942
+ ) }, _)),
943
+ v && /* @__PURE__ */ n.jsx("p", { id: `helper-text-${f}`, className: "text-sm text-sumi-700", children: v })
944
+ ]
945
+ }
946
+ );
947
+ }, yr = g.forwardRef((l, f) => {
948
+ const {
949
+ className: h,
950
+ labelText: p,
951
+ helperText: i,
952
+ errorMessage: a,
953
+ isInvalid: v,
954
+ isRequired: d,
955
+ ...u
956
+ } = l;
957
+ return /* @__PURE__ */ n.jsx(
958
+ ee,
959
+ {
960
+ className: h,
961
+ labelText: p,
962
+ helperText: i,
963
+ errorMessage: a,
964
+ isInvalid: v,
965
+ isRequired: d,
966
+ children: /* @__PURE__ */ n.jsx(vr, { ref: f, ...u })
967
+ }
968
+ );
969
+ }), _r = g.forwardRef(
970
+ (l, f) => {
971
+ const {
972
+ className: h,
973
+ labelText: p,
974
+ helperText: i,
975
+ errorMessage: a,
976
+ isInvalid: v,
977
+ isRequired: d,
978
+ ...u
979
+ } = l;
980
+ return /* @__PURE__ */ n.jsx(
981
+ ee,
982
+ {
983
+ className: h,
984
+ labelText: p,
985
+ helperText: i,
986
+ errorMessage: a,
987
+ isInvalid: v,
988
+ isRequired: d,
989
+ children: /* @__PURE__ */ n.jsx(mr, { ref: f, ...u })
990
+ }
991
+ );
830
992
  }
831
- );
993
+ ), Er = g.forwardRef((l, f) => {
994
+ const {
995
+ className: h,
996
+ labelText: p,
997
+ helperText: i,
998
+ errorMessage: a,
999
+ isInvalid: v,
1000
+ isRequired: d,
1001
+ ...u
1002
+ } = l;
1003
+ return /* @__PURE__ */ n.jsx(
1004
+ ee,
1005
+ {
1006
+ className: h,
1007
+ labelText: p,
1008
+ helperText: i,
1009
+ errorMessage: a,
1010
+ isInvalid: v,
1011
+ isRequired: d,
1012
+ children: /* @__PURE__ */ n.jsx(hr, { ref: f, ...u })
1013
+ }
1014
+ );
1015
+ });
832
1016
  export {
833
- ur as Checkbox,
834
- mr as CheckboxGroup,
835
- fr as Radio,
836
- hr as RadioGroup,
837
- dr as Select,
838
- gr as SelectControl,
839
- vr as Text,
840
- yr as TextControl,
841
- pr as Textarea,
842
- xr as TextareaControl
1017
+ fr as Checkbox,
1018
+ gr as CheckboxGroup,
1019
+ xr as FieldsetControl,
1020
+ ee as LabelControl,
1021
+ pr as Radio,
1022
+ Rr as RadioGroup,
1023
+ vr as Select,
1024
+ yr as SelectControl,
1025
+ mr as Text,
1026
+ _r as TextControl,
1027
+ hr as Textarea,
1028
+ Er as TextareaControl
843
1029
  };
844
1030
  //# sourceMappingURL=index.es.js.map