@sakura-ui/sakura-ui 0.1.13 → 0.1.14
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/README.md +3 -3
- package/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/config/src/index.ts +47 -48
- package/packages/core/.eslintrc.json +25 -0
- package/packages/core/coverage/coverage-final.json +2699 -14
- package/packages/core/coverage/lcov-report/base.css +261 -123
- package/packages/core/coverage/lcov-report/block-navigation.js +68 -70
- package/packages/core/coverage/lcov-report/index.html +198 -128
- package/packages/core/coverage/lcov-report/prettify.css +101 -1
- package/packages/core/coverage/lcov-report/prettify.js +1003 -1
- package/packages/core/coverage/lcov-report/sorter.js +169 -174
- package/packages/core/coverage/lcov-report/src/components/Button.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/Card.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/Code.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/Heading.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/Icon.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/IconButton.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/InfoCard.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/Link.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/List.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/Pre.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/Table.tsx.html +70 -68
- package/packages/core/coverage/lcov-report/src/components/index.html +369 -254
- package/packages/core/coverage/lcov-report/src/components/index.ts.html +70 -68
- package/packages/core/coverage/lcov-report/src/index.html +159 -99
- package/packages/core/coverage/lcov-report/src/index.ts.html +70 -68
- package/packages/core/coverage/lcov-report/src/utils/class.ts.html +70 -68
- package/packages/core/coverage/lcov-report/src/utils/index.html +159 -99
- package/packages/core/package.json +12 -2
- package/packages/core/src/components/Button.tsx +31 -31
- package/packages/core/src/components/Card.tsx +12 -14
- package/packages/core/src/components/Code.tsx +1 -1
- package/packages/core/src/components/Faq.tsx +82 -0
- package/packages/core/src/components/Heading.tsx +42 -30
- package/packages/core/src/components/Icon.tsx +1 -4
- package/packages/core/src/components/IconButton.tsx +78 -68
- package/packages/core/src/components/InfoCard.tsx +4 -5
- package/packages/core/src/components/Link.tsx +23 -24
- package/packages/core/src/components/List.tsx +3 -3
- package/packages/core/src/components/Pre.tsx +1 -1
- package/packages/core/src/components/Table.tsx +7 -9
- package/packages/core/src/components/index.ts +1 -0
- package/packages/core/src/index.ts +3 -0
- package/packages/forms/dist/components/Checkbox.d.ts +1 -1
- package/packages/forms/dist/components/Checkbox.d.ts.map +1 -1
- package/packages/forms/dist/components/Checkbox.js.map +1 -1
- package/packages/forms/dist/components/FieldsetControl.d.ts +1 -1
- package/packages/forms/dist/components/FieldsetControl.d.ts.map +1 -1
- package/packages/forms/dist/components/FieldsetControl.js +1 -1
- package/packages/forms/dist/components/FieldsetControl.js.map +1 -1
- package/packages/forms/dist/components/Input.d.ts +1 -1
- package/packages/forms/dist/components/Input.d.ts.map +1 -1
- package/packages/forms/dist/components/Input.js.map +1 -1
- package/packages/forms/dist/components/LabelControl.d.ts +1 -1
- package/packages/forms/dist/components/LabelControl.d.ts.map +1 -1
- package/packages/forms/dist/components/LabelControl.js +1 -1
- package/packages/forms/dist/components/LabelControl.js.map +1 -1
- package/packages/forms/dist/components/Radio.d.ts +1 -1
- package/packages/forms/dist/components/Radio.d.ts.map +1 -1
- package/packages/forms/dist/components/Radio.js.map +1 -1
- package/packages/forms/dist/components/Select.d.ts +1 -1
- package/packages/forms/dist/components/Select.d.ts.map +1 -1
- package/packages/forms/dist/components/Select.js.map +1 -1
- package/packages/forms/dist/components/Textarea.d.ts +1 -1
- package/packages/forms/dist/components/Textarea.d.ts.map +1 -1
- package/packages/forms/dist/components/Textarea.js +1 -1
- package/packages/forms/dist/components/Textarea.js.map +1 -1
- package/packages/forms/dist/components/controlled/CheckboxGroup.d.ts +1 -1
- package/packages/forms/dist/components/controlled/CheckboxGroup.d.ts.map +1 -1
- package/packages/forms/dist/components/controlled/CheckboxGroup.js.map +1 -1
- package/packages/forms/dist/components/controlled/RadioGroup.d.ts +1 -1
- package/packages/forms/dist/components/controlled/RadioGroup.d.ts.map +1 -1
- package/packages/forms/dist/components/controlled/RadioGroup.js.map +1 -1
- package/packages/forms/dist/components/controlled/SelectControl.d.ts +1 -1
- package/packages/forms/dist/components/controlled/SelectControl.d.ts.map +1 -1
- package/packages/forms/dist/components/controlled/SelectControl.js.map +1 -1
- package/packages/forms/dist/components/controlled/TextareaControl.d.ts +1 -1
- package/packages/forms/dist/components/controlled/TextareaControl.d.ts.map +1 -1
- package/packages/forms/dist/components/controlled/TextareaControl.js.map +1 -1
- package/packages/forms/dist/index.cjs.js +1 -1
- package/packages/forms/dist/index.cjs.js.map +1 -1
- package/packages/forms/dist/index.es.js +123 -116
- package/packages/forms/dist/index.es.js.map +1 -1
- package/packages/forms/package.json +1 -1
- package/packages/forms/src/components/Checkbox.tsx +35 -36
- package/packages/forms/src/components/FieldsetControl.tsx +57 -58
- package/packages/forms/src/components/Input.tsx +23 -24
- package/packages/forms/src/components/LabelControl.tsx +54 -52
- package/packages/forms/src/components/Radio.tsx +32 -33
- package/packages/forms/src/components/Select.tsx +32 -33
- package/packages/forms/src/components/Textarea.tsx +42 -43
- package/packages/forms/src/components/controlled/CheckboxGroup.tsx +36 -34
- package/packages/forms/src/components/controlled/RadioGroup.tsx +1 -1
- package/packages/forms/src/components/controlled/SelectControl.tsx +26 -24
- package/packages/forms/src/components/controlled/TextareaControl.tsx +26 -24
|
@@ -631,10 +631,11 @@ 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
|
-
|
|
634
|
+
}), Ie = y.forwardRef(
|
|
635
|
+
(p, b) => {
|
|
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 = `
|
|
638
639
|
inline-block
|
|
639
640
|
text-base
|
|
640
641
|
cursor-pointer
|
|
@@ -658,28 +659,30 @@ const P = (...p) => p.filter(Boolean).join(" "), F = y.createContext({
|
|
|
658
659
|
peer-checked:border-none
|
|
659
660
|
peer-disabled:border-sumi-500
|
|
660
661
|
`;
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}
|
|
662
|
+
return /* @__PURE__ */ s.jsx("label", { htmlFor: i.id, className: P(v, m), children: /* @__PURE__ */ s.jsxs("span", { className: "flex items-center", children: [
|
|
663
|
+
/* @__PURE__ */ s.jsx(
|
|
664
|
+
"input",
|
|
665
|
+
{
|
|
666
|
+
className: c,
|
|
667
|
+
type: "checkbox",
|
|
668
|
+
"aria-describedby": a.helperTextId,
|
|
669
|
+
"aria-errormessage": a.errorMessageId,
|
|
670
|
+
"aria-invalid": a.isInvalid ?? !1,
|
|
671
|
+
...i,
|
|
672
|
+
ref: b
|
|
673
|
+
}
|
|
674
|
+
),
|
|
675
|
+
/* @__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" }) }) }),
|
|
676
|
+
/* @__PURE__ */ s.jsx("span", { className: "peer-disabled:text-sumi-500", children: f })
|
|
677
|
+
] }) });
|
|
678
|
+
}
|
|
679
|
+
);
|
|
678
680
|
Ie.displayName = "Checkbox";
|
|
679
|
-
const Se = y.forwardRef(
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
const Se = y.forwardRef(
|
|
682
|
+
(p, b) => {
|
|
683
|
+
const { className: m, children: f, ...i } = p, a = y.useContext(F);
|
|
684
|
+
a.isRequired && (i.required = !0), a.groupName && (i.name = a.groupName);
|
|
685
|
+
const v = `
|
|
683
686
|
inline-block
|
|
684
687
|
text-base
|
|
685
688
|
cursor-pointer
|
|
@@ -703,28 +706,30 @@ const Se = y.forwardRef((p, b) => {
|
|
|
703
706
|
peer-checked:border-sea-600
|
|
704
707
|
peer-disabled:border-sumi-500
|
|
705
708
|
`;
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
709
|
+
return /* @__PURE__ */ s.jsx("label", { htmlFor: i.id, className: P(v, m), children: /* @__PURE__ */ s.jsxs("span", { className: "flex items-center", children: [
|
|
710
|
+
/* @__PURE__ */ s.jsx(
|
|
711
|
+
"input",
|
|
712
|
+
{
|
|
713
|
+
className: c,
|
|
714
|
+
type: "radio",
|
|
715
|
+
"aria-describedby": a.helperTextId,
|
|
716
|
+
"aria-errormessage": a.errorMessageId,
|
|
717
|
+
"aria-invalid": a.isInvalid ?? !1,
|
|
718
|
+
...i,
|
|
719
|
+
ref: b
|
|
720
|
+
}
|
|
721
|
+
),
|
|
722
|
+
/* @__PURE__ */ s.jsx("span", { className: o }),
|
|
723
|
+
/* @__PURE__ */ s.jsx("span", { className: "peer-disabled:text-sumi-500", children: f })
|
|
724
|
+
] }) });
|
|
725
|
+
}
|
|
726
|
+
);
|
|
723
727
|
Se.displayName = "Radio";
|
|
724
|
-
const hr = y.forwardRef(
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
+
const hr = y.forwardRef(
|
|
729
|
+
(p, b) => {
|
|
730
|
+
const { className: m, children: f, ...i } = p, a = y.useContext(F);
|
|
731
|
+
a.isRequired && (i.required = !0);
|
|
732
|
+
const v = a.isInvalid ? "border-sun-800" : "border-sumi-900", c = `
|
|
728
733
|
peer
|
|
729
734
|
cursor-pointer
|
|
730
735
|
appearance-none
|
|
@@ -748,26 +753,28 @@ const hr = y.forwardRef((p, b) => {
|
|
|
748
753
|
pointer-events-none
|
|
749
754
|
peer-disabled:fill-sumi-500
|
|
750
755
|
`;
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
756
|
+
return /* @__PURE__ */ s.jsxs("label", { className: "inline-block relative", children: [
|
|
757
|
+
/* @__PURE__ */ s.jsx(
|
|
758
|
+
"select",
|
|
759
|
+
{
|
|
760
|
+
id: i.id ?? a.id,
|
|
761
|
+
className: P(c, v, p.className),
|
|
762
|
+
"aria-describedby": a.helperTextId,
|
|
763
|
+
"aria-errormessage": a.errorMessageId,
|
|
764
|
+
"aria-invalid": a.isInvalid ?? !1,
|
|
765
|
+
...i,
|
|
766
|
+
ref: b,
|
|
767
|
+
children: f
|
|
768
|
+
}
|
|
769
|
+
),
|
|
770
|
+
/* @__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" }) }) })
|
|
771
|
+
] });
|
|
772
|
+
}
|
|
773
|
+
), br = y.forwardRef(
|
|
774
|
+
(p, b) => {
|
|
775
|
+
const { className: m, ...f } = p, i = y.useContext(F);
|
|
776
|
+
i.isRequired && (f.required = !0);
|
|
777
|
+
const a = i.isInvalid ? "border-sun-800" : "border-sumi-900", v = `
|
|
771
778
|
p-4
|
|
772
779
|
rounded-lg
|
|
773
780
|
border
|
|
@@ -779,27 +786,29 @@ const hr = y.forwardRef((p, b) => {
|
|
|
779
786
|
disabled:text-sumi-500
|
|
780
787
|
disabled:border-sumi-500
|
|
781
788
|
`;
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
}
|
|
789
|
+
return /* @__PURE__ */ s.jsx(
|
|
790
|
+
"input",
|
|
791
|
+
{
|
|
792
|
+
type: "text",
|
|
793
|
+
id: f.id ?? i.id,
|
|
794
|
+
className: P(v, a, m),
|
|
795
|
+
"aria-describedby": i.helperTextId,
|
|
796
|
+
"aria-errormessage": i.errorMessageId,
|
|
797
|
+
"aria-invalid": i.isInvalid ?? !1,
|
|
798
|
+
ref: b,
|
|
799
|
+
...f
|
|
800
|
+
}
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
);
|
|
796
804
|
br.displayName = "Input";
|
|
797
|
-
const Oe = y.forwardRef(
|
|
798
|
-
|
|
799
|
-
i
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
805
|
+
const Oe = y.forwardRef(
|
|
806
|
+
(p, b) => {
|
|
807
|
+
const { className: m, children: f, onChange: i, maxLength: a, ...v } = p, [c, o] = y.useState(0), _ = (I) => {
|
|
808
|
+
i && i(I), o(I.target.value.length);
|
|
809
|
+
}, h = y.useContext(F);
|
|
810
|
+
h.isRequired && (v.required = !0);
|
|
811
|
+
const g = h.isInvalid ? "border-sun-800" : "border-sumi-900", C = c > (a || 0) ? "text-sun-800" : "text-sumi-700", T = `
|
|
803
812
|
p-4
|
|
804
813
|
rounded-lg
|
|
805
814
|
border
|
|
@@ -811,28 +820,29 @@ const Oe = y.forwardRef((p, b) => {
|
|
|
811
820
|
disabled:text-sumi-500
|
|
812
821
|
disabled:border-sumi-500
|
|
813
822
|
`;
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
823
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
824
|
+
/* @__PURE__ */ s.jsx(
|
|
825
|
+
"textarea",
|
|
826
|
+
{
|
|
827
|
+
id: v.id ?? h.id,
|
|
828
|
+
className: P(T, g, m),
|
|
829
|
+
"aria-describedby": h.helperTextId,
|
|
830
|
+
"aria-errormessage": h.errorMessageId,
|
|
831
|
+
"aria-invalid": h.isInvalid ?? !1,
|
|
832
|
+
onChange: _,
|
|
833
|
+
...v,
|
|
834
|
+
ref: b,
|
|
835
|
+
children: f
|
|
836
|
+
}
|
|
837
|
+
),
|
|
838
|
+
a ? /* @__PURE__ */ s.jsxs("p", { className: "text-sup text-sumi-700", children: [
|
|
839
|
+
/* @__PURE__ */ s.jsx("span", { className: C, children: c }),
|
|
840
|
+
"/",
|
|
841
|
+
/* @__PURE__ */ s.jsx("span", { children: a })
|
|
842
|
+
] }) : ""
|
|
843
|
+
] });
|
|
844
|
+
}
|
|
845
|
+
);
|
|
836
846
|
Oe.displayName = "Textarea";
|
|
837
847
|
const te = y.forwardRef((p, b) => {
|
|
838
848
|
const m = y.useId(), {
|
|
@@ -865,14 +875,14 @@ const te = y.forwardRef((p, b) => {
|
|
|
865
875
|
]
|
|
866
876
|
}
|
|
867
877
|
),
|
|
868
|
-
a && /* @__PURE__ */ s.jsx("p", { id: g.helperTextId, className: "text-
|
|
878
|
+
a && /* @__PURE__ */ s.jsx("p", { id: g.helperTextId, className: "text-sup text-sumi-700 mb-2", children: a }),
|
|
869
879
|
_,
|
|
870
880
|
c && /* @__PURE__ */ s.jsx(
|
|
871
881
|
"p",
|
|
872
882
|
{
|
|
873
883
|
id: g.errorMessageId,
|
|
874
884
|
className: P(
|
|
875
|
-
"text-
|
|
885
|
+
"text-sup text-sun-800",
|
|
876
886
|
a ? "mt-1" : "mt-2"
|
|
877
887
|
),
|
|
878
888
|
children: v
|
|
@@ -903,10 +913,7 @@ const ae = y.forwardRef((p, b) => {
|
|
|
903
913
|
/* @__PURE__ */ s.jsx("legend", { children: /* @__PURE__ */ s.jsxs(
|
|
904
914
|
"p",
|
|
905
915
|
{
|
|
906
|
-
className: P(
|
|
907
|
-
"block mb-2 text-label",
|
|
908
|
-
c && "text-sun-800"
|
|
909
|
-
),
|
|
916
|
+
className: P("block mb-2 text-label", c && "text-sun-800"),
|
|
910
917
|
children: [
|
|
911
918
|
f,
|
|
912
919
|
o && /* @__PURE__ */ s.jsx("span", { className: "text-sun-800", children: " *" })
|
|
@@ -914,13 +921,13 @@ const ae = y.forwardRef((p, b) => {
|
|
|
914
921
|
}
|
|
915
922
|
) }),
|
|
916
923
|
/* @__PURE__ */ s.jsx("div", { className: P("inline-flex", I), children: h }),
|
|
917
|
-
a && /* @__PURE__ */ s.jsx("p", { id: T.helperTextId, className: "text-
|
|
924
|
+
a && /* @__PURE__ */ s.jsx("p", { id: T.helperTextId, className: "text-sup text-sumi-700 mt-2", children: a }),
|
|
918
925
|
c && /* @__PURE__ */ s.jsx(
|
|
919
926
|
"p",
|
|
920
927
|
{
|
|
921
928
|
id: T.errorMessageId,
|
|
922
929
|
className: P(
|
|
923
|
-
"text-
|
|
930
|
+
"text-sup text-sun-800",
|
|
924
931
|
a ? "mt-1" : "mt-2"
|
|
925
932
|
),
|
|
926
933
|
children: v
|