@sakura-ui/forms 0.1.4 → 0.1.6
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/components/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +26 -23
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/FieldsetControl.d.ts +1 -1
- package/dist/components/FieldsetControl.d.ts.map +1 -1
- package/dist/components/FieldsetControl.js.map +1 -1
- package/dist/components/Input.d.ts +1 -1
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +1 -0
- package/dist/components/Input.js.map +1 -1
- package/dist/components/LabelControl.d.ts +1 -1
- package/dist/components/LabelControl.d.ts.map +1 -1
- package/dist/components/LabelControl.js.map +1 -1
- package/dist/components/Radio.d.ts +1 -1
- package/dist/components/Radio.d.ts.map +1 -1
- package/dist/components/Radio.js +25 -23
- package/dist/components/Radio.js.map +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +1 -0
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Textarea.d.ts +1 -1
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +1 -0
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/controlled/CheckboxGroup.d.ts +1 -1
- package/dist/components/controlled/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/controlled/CheckboxGroup.js.map +1 -1
- package/dist/components/controlled/RadioGroup.d.ts +1 -1
- package/dist/components/controlled/RadioGroup.d.ts.map +1 -1
- package/dist/components/controlled/RadioGroup.js.map +1 -1
- package/dist/components/controlled/SelectControl.d.ts +1 -1
- package/dist/components/controlled/SelectControl.d.ts.map +1 -1
- package/dist/components/controlled/SelectControl.js.map +1 -1
- package/dist/components/controlled/TextareaControl.d.ts +1 -1
- package/dist/components/controlled/TextareaControl.d.ts.map +1 -1
- package/dist/components/controlled/TextareaControl.js.map +1 -1
- package/dist/index.cjs.js +62 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +218 -217
- package/dist/index.es.js.map +1 -1
- package/package.json +9 -9
- package/LICENSE +0 -21
package/dist/index.es.js
CHANGED
|
@@ -14,16 +14,16 @@ function vr() {
|
|
|
14
14
|
if (Ne)
|
|
15
15
|
return W;
|
|
16
16
|
Ne = 1;
|
|
17
|
-
var p = y,
|
|
17
|
+
var p = y, h = Symbol.for("react.element"), m = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, i = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
18
|
function v(c, o, _) {
|
|
19
|
-
var
|
|
19
|
+
var b, g = {}, C = null, T = null;
|
|
20
20
|
_ !== void 0 && (C = "" + _), o.key !== void 0 && (C = "" + o.key), o.ref !== void 0 && (T = o.ref);
|
|
21
|
-
for (
|
|
22
|
-
f.call(o,
|
|
21
|
+
for (b in o)
|
|
22
|
+
f.call(o, b) && !a.hasOwnProperty(b) && (g[b] = o[b]);
|
|
23
23
|
if (c && c.defaultProps)
|
|
24
|
-
for (
|
|
25
|
-
g[
|
|
26
|
-
return { $$typeof:
|
|
24
|
+
for (b in o = c.defaultProps, o)
|
|
25
|
+
g[b] === void 0 && (g[b] = o[b]);
|
|
26
|
+
return { $$typeof: h, type: c, key: C, ref: T, props: g, _owner: i.current };
|
|
27
27
|
}
|
|
28
28
|
return W.Fragment = m, W.jsx = v, W.jsxs = v, W;
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ var Y = {};
|
|
|
40
40
|
var Pe;
|
|
41
41
|
function mr() {
|
|
42
42
|
return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var p = y,
|
|
43
|
+
var p = y, h = Symbol.for("react.element"), m = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), c = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), I = Symbol.iterator, ke = "@@iterator";
|
|
44
44
|
function Fe(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
@@ -68,7 +68,7 @@ function mr() {
|
|
|
68
68
|
var Ae = !1, Me = !1, $e = !1, qe = !1, We = !1, ne;
|
|
69
69
|
ne = Symbol.for("react.module.reference");
|
|
70
70
|
function Ye(e) {
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === f || e === a || We || e === i || e === _ || e ===
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === f || e === a || We || e === i || e === _ || e === b || qe || e === T || Ae || Me || $e || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === g || e.$$typeof === v || e.$$typeof === c || e.$$typeof === o || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
@@ -102,7 +102,7 @@ function mr() {
|
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case _:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case b:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
@@ -298,7 +298,7 @@ function mr() {
|
|
|
298
298
|
switch (e) {
|
|
299
299
|
case _:
|
|
300
300
|
return L("Suspense");
|
|
301
|
-
case
|
|
301
|
+
case b:
|
|
302
302
|
return L("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
@@ -317,13 +317,13 @@ function mr() {
|
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var B = Object.prototype.hasOwnProperty, me = {},
|
|
320
|
+
var B = Object.prototype.hasOwnProperty, me = {}, be = D.ReactDebugCurrentFrame;
|
|
321
321
|
function G(e) {
|
|
322
322
|
if (e) {
|
|
323
323
|
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
324
|
-
|
|
324
|
+
be.setExtraStackFrame(t);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
be.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
328
|
function ze(e, r, t, n, d) {
|
|
329
329
|
{
|
|
@@ -356,17 +356,17 @@ function mr() {
|
|
|
356
356
|
}
|
|
357
357
|
function Xe(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return he(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function he(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
367
|
function xe(e) {
|
|
368
368
|
if (Xe(e))
|
|
369
|
-
return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)),
|
|
369
|
+
return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), he(e);
|
|
370
370
|
}
|
|
371
371
|
var q = D.ReactCurrentOwner, Ze = {
|
|
372
372
|
key: !0,
|
|
@@ -422,7 +422,7 @@ function mr() {
|
|
|
422
422
|
var nr = function(e, r, t, n, d, x, u) {
|
|
423
423
|
var l = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof:
|
|
425
|
+
$$typeof: h,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
@@ -477,7 +477,7 @@ function mr() {
|
|
|
477
477
|
var Q;
|
|
478
478
|
Q = !1;
|
|
479
479
|
function ee(e) {
|
|
480
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
480
|
+
return typeof e == "object" && e !== null && e.$$typeof === h;
|
|
481
481
|
}
|
|
482
482
|
function Ee() {
|
|
483
483
|
{
|
|
@@ -593,7 +593,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
593
593
|
var w = ir(d);
|
|
594
594
|
w ? l += w : l += Ee();
|
|
595
595
|
var R;
|
|
596
|
-
e === null ? R = "null" : K(e) ? R = "array" : e !== void 0 && e.$$typeof ===
|
|
596
|
+
e === null ? R = "null" : K(e) ? R = "array" : e !== void 0 && e.$$typeof === h ? (R = "<" + (S(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, l);
|
|
597
597
|
}
|
|
598
598
|
var E = sr(e, r, t, d, x);
|
|
599
599
|
if (E == null)
|
|
@@ -631,100 +631,110 @@ const P = (...p) => p.filter(Boolean).join(" "), F = y.createContext({
|
|
|
631
631
|
errorMessageId: "",
|
|
632
632
|
isInvalid: !1,
|
|
633
633
|
isRequired: !1
|
|
634
|
-
}), Ie = y.forwardRef(
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
"
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
634
|
+
}), Ie = y.forwardRef(
|
|
635
|
+
(p, h) => {
|
|
636
|
+
const { className: m, children: f, ...i } = p, a = y.useContext(F);
|
|
637
|
+
a.isRequired && (i.required = !0), a.groupName && (i.name = a.groupName);
|
|
638
|
+
const v = `
|
|
639
|
+
inline-block
|
|
640
|
+
text-base
|
|
641
|
+
cursor-pointer
|
|
642
|
+
py-2
|
|
643
|
+
mr-4
|
|
644
|
+
`, c = `
|
|
645
|
+
peer
|
|
646
|
+
sr-only
|
|
647
|
+
`, o = `
|
|
648
|
+
bg-clip-content
|
|
649
|
+
w-6 h-6
|
|
650
|
+
ml-1
|
|
651
|
+
mr-2
|
|
652
|
+
rounded
|
|
653
|
+
border
|
|
654
|
+
border-solid
|
|
655
|
+
border-sumi-900
|
|
656
|
+
fill-transparent
|
|
657
|
+
peer-checked:fill-white-1000
|
|
658
|
+
peer-checked:bg-sea-600
|
|
659
|
+
peer-checked:border-none
|
|
660
|
+
peer-disabled:border-sumi-500
|
|
661
|
+
peer-focus-visible:ring-2
|
|
662
|
+
peer-focus-visible:ring-offset-2
|
|
663
|
+
peer-focus-visible:ring-wood-500
|
|
664
|
+
`;
|
|
665
|
+
return /* @__PURE__ */ s.jsx("label", { htmlFor: i.id, className: P(v, m), children: /* @__PURE__ */ s.jsxs("span", { className: "flex items-center", children: [
|
|
666
|
+
/* @__PURE__ */ s.jsx(
|
|
667
|
+
"input",
|
|
668
|
+
{
|
|
669
|
+
className: c,
|
|
670
|
+
type: "checkbox",
|
|
671
|
+
"aria-describedby": a.helperTextId,
|
|
672
|
+
"aria-errormessage": a.errorMessageId,
|
|
673
|
+
"aria-invalid": a.isInvalid ?? !1,
|
|
674
|
+
...i,
|
|
675
|
+
ref: h
|
|
676
|
+
}
|
|
677
|
+
),
|
|
678
|
+
/* @__PURE__ */ s.jsx("span", { className: o, children: /* @__PURE__ */ s.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", children: /* @__PURE__ */ s.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" }) }) }),
|
|
679
|
+
/* @__PURE__ */ s.jsx("span", { className: "peer-disabled:text-sumi-500", children: f })
|
|
680
|
+
] }) });
|
|
681
|
+
}
|
|
682
|
+
);
|
|
678
683
|
Ie.displayName = "Checkbox";
|
|
679
|
-
const Se = y.forwardRef(
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
})
|
|
684
|
+
const Se = y.forwardRef(
|
|
685
|
+
(p, h) => {
|
|
686
|
+
const { className: m, children: f, ...i } = p, a = y.useContext(F);
|
|
687
|
+
a.isRequired && (i.required = !0), a.groupName && (i.name = a.groupName);
|
|
688
|
+
const v = `
|
|
689
|
+
inline-block
|
|
690
|
+
text-base
|
|
691
|
+
cursor-pointer
|
|
692
|
+
py-2
|
|
693
|
+
mr-4
|
|
694
|
+
`, c = `
|
|
695
|
+
peer
|
|
696
|
+
sr-only
|
|
697
|
+
`, o = `
|
|
698
|
+
bg-clip-content
|
|
699
|
+
w-6 h-6
|
|
700
|
+
ml-1
|
|
701
|
+
mr-2
|
|
702
|
+
p-1
|
|
703
|
+
rounded-full
|
|
704
|
+
border
|
|
705
|
+
border-solid
|
|
706
|
+
border-sumi-900
|
|
707
|
+
peer-checked:bg-sea-600
|
|
708
|
+
peer-checked:border-sea-600
|
|
709
|
+
peer-disabled:border-sumi-500
|
|
710
|
+
peer-focus-visible:ring-2
|
|
711
|
+
peer-focus-visible:ring-offset-2
|
|
712
|
+
peer-focus-visible:ring-wood-500
|
|
713
|
+
`;
|
|
714
|
+
return /* @__PURE__ */ s.jsx("label", { htmlFor: i.id, className: P(v, m), children: /* @__PURE__ */ s.jsxs("span", { className: "flex items-center", children: [
|
|
715
|
+
/* @__PURE__ */ s.jsx(
|
|
716
|
+
"input",
|
|
717
|
+
{
|
|
718
|
+
className: c,
|
|
719
|
+
type: "radio",
|
|
720
|
+
"aria-describedby": a.helperTextId,
|
|
721
|
+
"aria-errormessage": a.errorMessageId,
|
|
722
|
+
"aria-invalid": a.isInvalid ?? !1,
|
|
723
|
+
...i,
|
|
724
|
+
ref: h
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
/* @__PURE__ */ s.jsx("span", { className: o }),
|
|
728
|
+
/* @__PURE__ */ s.jsx("span", { className: "peer-disabled:text-sumi-500", children: f })
|
|
729
|
+
] }) });
|
|
730
|
+
}
|
|
731
|
+
);
|
|
723
732
|
Se.displayName = "Radio";
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
733
|
+
const br = y.forwardRef(
|
|
734
|
+
(p, h) => {
|
|
735
|
+
const { className: m, children: f, ...i } = p, a = y.useContext(F);
|
|
736
|
+
a.isRequired && (i.required = !0);
|
|
737
|
+
const v = a.isInvalid ? "border-sun-800" : "border-sumi-900", c = `
|
|
728
738
|
peer
|
|
729
739
|
cursor-pointer
|
|
730
740
|
appearance-none
|
|
@@ -735,6 +745,7 @@ const hr = y.forwardRef((p, b) => {
|
|
|
735
745
|
border-solid
|
|
736
746
|
py-4 px-4 pr-8
|
|
737
747
|
rounded-[8px]
|
|
748
|
+
outline-offset-2
|
|
738
749
|
focus:outline
|
|
739
750
|
focus:outline-2
|
|
740
751
|
focus:outline-wood-500
|
|
@@ -748,30 +759,33 @@ const hr = y.forwardRef((p, b) => {
|
|
|
748
759
|
pointer-events-none
|
|
749
760
|
peer-disabled:fill-sumi-500
|
|
750
761
|
`;
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
762
|
+
return /* @__PURE__ */ s.jsxs("label", { className: "inline-block relative", children: [
|
|
763
|
+
/* @__PURE__ */ s.jsx(
|
|
764
|
+
"select",
|
|
765
|
+
{
|
|
766
|
+
id: i.id ?? a.id,
|
|
767
|
+
className: P(c, v, p.className),
|
|
768
|
+
"aria-describedby": a.helperTextId,
|
|
769
|
+
"aria-errormessage": a.errorMessageId,
|
|
770
|
+
"aria-invalid": a.isInvalid ?? !1,
|
|
771
|
+
...i,
|
|
772
|
+
ref: h,
|
|
773
|
+
children: f
|
|
774
|
+
}
|
|
775
|
+
),
|
|
776
|
+
/* @__PURE__ */ s.jsx("span", { className: o, children: /* @__PURE__ */ s.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", width: "24", children: /* @__PURE__ */ s.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" }) }) })
|
|
777
|
+
] });
|
|
778
|
+
}
|
|
779
|
+
), hr = y.forwardRef(
|
|
780
|
+
(p, h) => {
|
|
781
|
+
const { className: m, ...f } = p, i = y.useContext(F);
|
|
782
|
+
i.isRequired && (f.required = !0);
|
|
783
|
+
const a = i.isInvalid ? "border-sun-800" : "border-sumi-900", v = `
|
|
771
784
|
p-4
|
|
772
785
|
rounded-lg
|
|
773
786
|
border
|
|
774
787
|
border-solid
|
|
788
|
+
outline-offset-2
|
|
775
789
|
focus:outline
|
|
776
790
|
focus:outline-2
|
|
777
791
|
focus:outline-wood-500
|
|
@@ -779,31 +793,34 @@ const hr = y.forwardRef((p, b) => {
|
|
|
779
793
|
disabled:text-sumi-500
|
|
780
794
|
disabled:border-sumi-500
|
|
781
795
|
`;
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
796
|
+
return /* @__PURE__ */ s.jsx(
|
|
797
|
+
"input",
|
|
798
|
+
{
|
|
799
|
+
type: "text",
|
|
800
|
+
id: f.id ?? i.id,
|
|
801
|
+
className: P(v, a, m),
|
|
802
|
+
"aria-describedby": i.helperTextId,
|
|
803
|
+
"aria-errormessage": i.errorMessageId,
|
|
804
|
+
"aria-invalid": i.isInvalid ?? !1,
|
|
805
|
+
ref: h,
|
|
806
|
+
...f
|
|
807
|
+
}
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
);
|
|
811
|
+
hr.displayName = "Input";
|
|
812
|
+
const Oe = y.forwardRef(
|
|
813
|
+
(p, h) => {
|
|
814
|
+
const { className: m, children: f, onChange: i, maxLength: a, ...v } = p, [c, o] = y.useState(0), _ = (I) => {
|
|
815
|
+
i && i(I), o(I.target.value.length);
|
|
816
|
+
}, b = y.useContext(F);
|
|
817
|
+
b.isRequired && (v.required = !0);
|
|
818
|
+
const g = b.isInvalid ? "border-sun-800" : "border-sumi-900", C = c > (a || 0) ? "text-sun-800" : "text-sumi-700", T = `
|
|
803
819
|
p-4
|
|
804
820
|
rounded-lg
|
|
805
821
|
border
|
|
806
822
|
border-solid
|
|
823
|
+
outline-offset-2
|
|
807
824
|
focus:outline
|
|
808
825
|
focus:outline-2
|
|
809
826
|
focus:outline-wood-500
|
|
@@ -811,30 +828,31 @@ const Oe = y.forwardRef((p, b) => {
|
|
|
811
828
|
disabled:text-sumi-500
|
|
812
829
|
disabled:border-sumi-500
|
|
813
830
|
`;
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
831
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
832
|
+
/* @__PURE__ */ s.jsx(
|
|
833
|
+
"textarea",
|
|
834
|
+
{
|
|
835
|
+
id: v.id ?? b.id,
|
|
836
|
+
className: P(T, g, m),
|
|
837
|
+
"aria-describedby": b.helperTextId,
|
|
838
|
+
"aria-errormessage": b.errorMessageId,
|
|
839
|
+
"aria-invalid": b.isInvalid ?? !1,
|
|
840
|
+
onChange: _,
|
|
841
|
+
...v,
|
|
842
|
+
ref: h,
|
|
843
|
+
children: f
|
|
844
|
+
}
|
|
845
|
+
),
|
|
846
|
+
a ? /* @__PURE__ */ s.jsxs("p", { className: "text-sup text-sumi-700", children: [
|
|
847
|
+
/* @__PURE__ */ s.jsx("span", { className: C, children: c }),
|
|
848
|
+
"/",
|
|
849
|
+
/* @__PURE__ */ s.jsx("span", { children: a })
|
|
850
|
+
] }) : ""
|
|
851
|
+
] });
|
|
852
|
+
}
|
|
853
|
+
);
|
|
836
854
|
Oe.displayName = "Textarea";
|
|
837
|
-
const te = y.forwardRef((p,
|
|
855
|
+
const te = y.forwardRef((p, h) => {
|
|
838
856
|
const m = y.useId(), {
|
|
839
857
|
labelText: f,
|
|
840
858
|
className: i,
|
|
@@ -843,7 +861,7 @@ const te = y.forwardRef((p, b) => {
|
|
|
843
861
|
isInvalid: c,
|
|
844
862
|
isRequired: o,
|
|
845
863
|
children: _,
|
|
846
|
-
...
|
|
864
|
+
...b
|
|
847
865
|
} = p, g = {
|
|
848
866
|
id: p.htmlFor ?? `input-${m}`,
|
|
849
867
|
helperTextId: `helper-text-${m}`,
|
|
@@ -857,22 +875,15 @@ const te = y.forwardRef((p, b) => {
|
|
|
857
875
|
{
|
|
858
876
|
className: P("block mb-2 text-label", c && "text-sun-800"),
|
|
859
877
|
htmlFor: g.id,
|
|
860
|
-
ref:
|
|
861
|
-
...
|
|
878
|
+
ref: h,
|
|
879
|
+
...b,
|
|
862
880
|
children: [
|
|
863
881
|
f,
|
|
864
882
|
o && /* @__PURE__ */ s.jsx("span", { className: "text-sun-800", children: " *" })
|
|
865
883
|
]
|
|
866
884
|
}
|
|
867
885
|
),
|
|
868
|
-
a && /* @__PURE__ */ s.jsx(
|
|
869
|
-
"p",
|
|
870
|
-
{
|
|
871
|
-
id: g.helperTextId,
|
|
872
|
-
className: "text-sup text-sumi-700 mb-2",
|
|
873
|
-
children: a
|
|
874
|
-
}
|
|
875
|
-
),
|
|
886
|
+
a && /* @__PURE__ */ s.jsx("p", { id: g.helperTextId, className: "text-sup text-sumi-700 mb-2", children: a }),
|
|
876
887
|
_,
|
|
877
888
|
c && /* @__PURE__ */ s.jsx(
|
|
878
889
|
"p",
|
|
@@ -888,7 +899,7 @@ const te = y.forwardRef((p, b) => {
|
|
|
888
899
|
] }) });
|
|
889
900
|
});
|
|
890
901
|
te.displayName = "LabelControl";
|
|
891
|
-
const ae = y.forwardRef((p,
|
|
902
|
+
const ae = y.forwardRef((p, h) => {
|
|
892
903
|
const m = y.useId(), {
|
|
893
904
|
labelText: f,
|
|
894
905
|
className: i,
|
|
@@ -897,7 +908,7 @@ const ae = y.forwardRef((p, b) => {
|
|
|
897
908
|
isInvalid: c,
|
|
898
909
|
isRequired: o,
|
|
899
910
|
direction: _,
|
|
900
|
-
children:
|
|
911
|
+
children: b,
|
|
901
912
|
...g
|
|
902
913
|
} = p, T = {
|
|
903
914
|
groupName: g.name ?? `group-${m}`,
|
|
@@ -906,29 +917,19 @@ const ae = y.forwardRef((p, b) => {
|
|
|
906
917
|
isInvalid: c ?? !1,
|
|
907
918
|
isRequired: o ?? !1
|
|
908
919
|
}, I = _ ?? "flex-col";
|
|
909
|
-
return /* @__PURE__ */ s.jsx(F.Provider, { value: T, children: /* @__PURE__ */ s.jsxs("fieldset", { className: P("mb-4", i), ref:
|
|
920
|
+
return /* @__PURE__ */ s.jsx(F.Provider, { value: T, children: /* @__PURE__ */ s.jsxs("fieldset", { className: P("mb-4", i), ref: h, ...g, children: [
|
|
910
921
|
/* @__PURE__ */ s.jsx("legend", { children: /* @__PURE__ */ s.jsxs(
|
|
911
922
|
"p",
|
|
912
923
|
{
|
|
913
|
-
className: P(
|
|
914
|
-
"block mb-2 text-label",
|
|
915
|
-
c && "text-sun-800"
|
|
916
|
-
),
|
|
924
|
+
className: P("block mb-2 text-label", c && "text-sun-800"),
|
|
917
925
|
children: [
|
|
918
926
|
f,
|
|
919
927
|
o && /* @__PURE__ */ s.jsx("span", { className: "text-sun-800", children: " *" })
|
|
920
928
|
]
|
|
921
929
|
}
|
|
922
930
|
) }),
|
|
923
|
-
/* @__PURE__ */ s.jsx("div", { className: P("inline-flex", I), children:
|
|
924
|
-
a && /* @__PURE__ */ s.jsx(
|
|
925
|
-
"p",
|
|
926
|
-
{
|
|
927
|
-
id: T.helperTextId,
|
|
928
|
-
className: "text-sup text-sumi-700 mt-2",
|
|
929
|
-
children: a
|
|
930
|
-
}
|
|
931
|
-
),
|
|
931
|
+
/* @__PURE__ */ s.jsx("div", { className: P("inline-flex", I), children: b }),
|
|
932
|
+
a && /* @__PURE__ */ s.jsx("p", { id: T.helperTextId, className: "text-sup text-sumi-700 mt-2", children: a }),
|
|
932
933
|
c && /* @__PURE__ */ s.jsx(
|
|
933
934
|
"p",
|
|
934
935
|
{
|
|
@@ -943,7 +944,7 @@ const ae = y.forwardRef((p, b) => {
|
|
|
943
944
|
] }) });
|
|
944
945
|
});
|
|
945
946
|
ae.displayName = "FieldsetControl";
|
|
946
|
-
const xr = y.forwardRef((p,
|
|
947
|
+
const xr = y.forwardRef((p, h) => {
|
|
947
948
|
const {
|
|
948
949
|
items: m,
|
|
949
950
|
onChange: f,
|
|
@@ -953,7 +954,7 @@ const xr = y.forwardRef((p, b) => {
|
|
|
953
954
|
errorMessage: c,
|
|
954
955
|
isInvalid: o,
|
|
955
956
|
isRequired: _,
|
|
956
|
-
...
|
|
957
|
+
...b
|
|
957
958
|
} = p;
|
|
958
959
|
return /* @__PURE__ */ s.jsx(
|
|
959
960
|
ae,
|
|
@@ -964,14 +965,14 @@ const xr = y.forwardRef((p, b) => {
|
|
|
964
965
|
errorMessage: c,
|
|
965
966
|
isInvalid: o,
|
|
966
967
|
isRequired: _,
|
|
967
|
-
ref:
|
|
968
|
-
...
|
|
968
|
+
ref: h,
|
|
969
|
+
...b,
|
|
969
970
|
children: m.map(({ label: g, value: C }, T) => /* @__PURE__ */ s.jsx(Ie, { value: C, onChange: f, children: g }, T))
|
|
970
971
|
}
|
|
971
972
|
);
|
|
972
973
|
});
|
|
973
974
|
xr.displayName = "CheckboxGroup";
|
|
974
|
-
const gr = y.forwardRef((p,
|
|
975
|
+
const gr = y.forwardRef((p, h) => {
|
|
975
976
|
const {
|
|
976
977
|
items: m,
|
|
977
978
|
onChange: f,
|
|
@@ -981,7 +982,7 @@ const gr = y.forwardRef((p, b) => {
|
|
|
981
982
|
errorMessage: c,
|
|
982
983
|
isInvalid: o,
|
|
983
984
|
isRequired: _,
|
|
984
|
-
defaultValue:
|
|
985
|
+
defaultValue: b,
|
|
985
986
|
...g
|
|
986
987
|
} = p;
|
|
987
988
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -993,14 +994,14 @@ const gr = y.forwardRef((p, b) => {
|
|
|
993
994
|
errorMessage: c,
|
|
994
995
|
isInvalid: o,
|
|
995
996
|
isRequired: _,
|
|
996
|
-
ref:
|
|
997
|
+
ref: h,
|
|
997
998
|
...g,
|
|
998
999
|
children: m.map(({ label: C, value: T }, I) => /* @__PURE__ */ s.jsx(
|
|
999
1000
|
Se,
|
|
1000
1001
|
{
|
|
1001
1002
|
value: T,
|
|
1002
1003
|
onChange: f,
|
|
1003
|
-
defaultChecked:
|
|
1004
|
+
defaultChecked: b === T,
|
|
1004
1005
|
children: C
|
|
1005
1006
|
},
|
|
1006
1007
|
I
|
|
@@ -1009,7 +1010,7 @@ const gr = y.forwardRef((p, b) => {
|
|
|
1009
1010
|
);
|
|
1010
1011
|
});
|
|
1011
1012
|
gr.displayName = "RadioGroup";
|
|
1012
|
-
const yr = y.forwardRef((p,
|
|
1013
|
+
const yr = y.forwardRef((p, h) => {
|
|
1013
1014
|
const {
|
|
1014
1015
|
className: m,
|
|
1015
1016
|
labelText: f,
|
|
@@ -1028,12 +1029,12 @@ const yr = y.forwardRef((p, b) => {
|
|
|
1028
1029
|
errorMessage: a,
|
|
1029
1030
|
isInvalid: v,
|
|
1030
1031
|
isRequired: c,
|
|
1031
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1032
|
+
children: /* @__PURE__ */ s.jsx(br, { ref: h, ...o })
|
|
1032
1033
|
}
|
|
1033
1034
|
);
|
|
1034
1035
|
});
|
|
1035
1036
|
yr.displayName = "SelectControl";
|
|
1036
|
-
const Rr = y.forwardRef((p,
|
|
1037
|
+
const Rr = y.forwardRef((p, h) => {
|
|
1037
1038
|
const {
|
|
1038
1039
|
className: m,
|
|
1039
1040
|
labelText: f,
|
|
@@ -1052,7 +1053,7 @@ const Rr = y.forwardRef((p, b) => {
|
|
|
1052
1053
|
errorMessage: a,
|
|
1053
1054
|
isInvalid: v,
|
|
1054
1055
|
isRequired: c,
|
|
1055
|
-
children: /* @__PURE__ */ s.jsx(Oe, { ref:
|
|
1056
|
+
children: /* @__PURE__ */ s.jsx(Oe, { ref: h, ...o })
|
|
1056
1057
|
}
|
|
1057
1058
|
);
|
|
1058
1059
|
});
|
|
@@ -1061,11 +1062,11 @@ export {
|
|
|
1061
1062
|
Ie as Checkbox,
|
|
1062
1063
|
xr as CheckboxGroup,
|
|
1063
1064
|
ae as FieldsetControl,
|
|
1064
|
-
|
|
1065
|
+
hr as Input,
|
|
1065
1066
|
te as LabelControl,
|
|
1066
1067
|
Se as Radio,
|
|
1067
1068
|
gr as RadioGroup,
|
|
1068
|
-
|
|
1069
|
+
br as Select,
|
|
1069
1070
|
yr as SelectControl,
|
|
1070
1071
|
Oe as Textarea,
|
|
1071
1072
|
Rr as TextareaControl
|