@sakura-ui/sakura-ui 0.1.13 → 0.1.16

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 (96) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/packages/config/package.json +1 -1
  4. package/packages/config/src/index.ts +47 -48
  5. package/packages/core/.eslintrc.json +25 -0
  6. package/packages/core/coverage/coverage-final.json +2699 -14
  7. package/packages/core/coverage/lcov-report/base.css +261 -123
  8. package/packages/core/coverage/lcov-report/block-navigation.js +68 -70
  9. package/packages/core/coverage/lcov-report/index.html +198 -128
  10. package/packages/core/coverage/lcov-report/prettify.css +101 -1
  11. package/packages/core/coverage/lcov-report/prettify.js +1003 -1
  12. package/packages/core/coverage/lcov-report/sorter.js +169 -174
  13. package/packages/core/coverage/lcov-report/src/components/Button.tsx.html +70 -68
  14. package/packages/core/coverage/lcov-report/src/components/Card.tsx.html +70 -68
  15. package/packages/core/coverage/lcov-report/src/components/Code.tsx.html +70 -68
  16. package/packages/core/coverage/lcov-report/src/components/Heading.tsx.html +70 -68
  17. package/packages/core/coverage/lcov-report/src/components/Icon.tsx.html +70 -68
  18. package/packages/core/coverage/lcov-report/src/components/IconButton.tsx.html +70 -68
  19. package/packages/core/coverage/lcov-report/src/components/InfoCard.tsx.html +70 -68
  20. package/packages/core/coverage/lcov-report/src/components/Link.tsx.html +70 -68
  21. package/packages/core/coverage/lcov-report/src/components/List.tsx.html +70 -68
  22. package/packages/core/coverage/lcov-report/src/components/Pre.tsx.html +70 -68
  23. package/packages/core/coverage/lcov-report/src/components/Table.tsx.html +70 -68
  24. package/packages/core/coverage/lcov-report/src/components/index.html +369 -254
  25. package/packages/core/coverage/lcov-report/src/components/index.ts.html +70 -68
  26. package/packages/core/coverage/lcov-report/src/index.html +159 -99
  27. package/packages/core/coverage/lcov-report/src/index.ts.html +70 -68
  28. package/packages/core/coverage/lcov-report/src/utils/class.ts.html +70 -68
  29. package/packages/core/coverage/lcov-report/src/utils/index.html +159 -99
  30. package/packages/core/package.json +12 -2
  31. package/packages/core/src/components/Button.tsx +31 -31
  32. package/packages/core/src/components/Card.tsx +12 -14
  33. package/packages/core/src/components/Code.tsx +1 -1
  34. package/packages/core/src/components/Faq.tsx +84 -0
  35. package/packages/core/src/components/Heading.tsx +42 -30
  36. package/packages/core/src/components/Icon.tsx +1 -4
  37. package/packages/core/src/components/IconButton.tsx +78 -68
  38. package/packages/core/src/components/InfoCard.tsx +4 -5
  39. package/packages/core/src/components/Link.tsx +23 -24
  40. package/packages/core/src/components/List.tsx +3 -3
  41. package/packages/core/src/components/Pre.tsx +1 -1
  42. package/packages/core/src/components/Table.tsx +7 -9
  43. package/packages/core/src/components/index.ts +1 -0
  44. package/packages/core/src/index.ts +3 -0
  45. package/packages/forms/dist/components/Checkbox.d.ts +1 -1
  46. package/packages/forms/dist/components/Checkbox.d.ts.map +1 -1
  47. package/packages/forms/dist/components/Checkbox.js.map +1 -1
  48. package/packages/forms/dist/components/FieldsetControl.d.ts +1 -1
  49. package/packages/forms/dist/components/FieldsetControl.d.ts.map +1 -1
  50. package/packages/forms/dist/components/FieldsetControl.js +1 -1
  51. package/packages/forms/dist/components/FieldsetControl.js.map +1 -1
  52. package/packages/forms/dist/components/Input.d.ts +1 -1
  53. package/packages/forms/dist/components/Input.d.ts.map +1 -1
  54. package/packages/forms/dist/components/Input.js.map +1 -1
  55. package/packages/forms/dist/components/LabelControl.d.ts +1 -1
  56. package/packages/forms/dist/components/LabelControl.d.ts.map +1 -1
  57. package/packages/forms/dist/components/LabelControl.js +1 -1
  58. package/packages/forms/dist/components/LabelControl.js.map +1 -1
  59. package/packages/forms/dist/components/Radio.d.ts +1 -1
  60. package/packages/forms/dist/components/Radio.d.ts.map +1 -1
  61. package/packages/forms/dist/components/Radio.js.map +1 -1
  62. package/packages/forms/dist/components/Select.d.ts +1 -1
  63. package/packages/forms/dist/components/Select.d.ts.map +1 -1
  64. package/packages/forms/dist/components/Select.js.map +1 -1
  65. package/packages/forms/dist/components/Textarea.d.ts +1 -1
  66. package/packages/forms/dist/components/Textarea.d.ts.map +1 -1
  67. package/packages/forms/dist/components/Textarea.js +1 -1
  68. package/packages/forms/dist/components/Textarea.js.map +1 -1
  69. package/packages/forms/dist/components/controlled/CheckboxGroup.d.ts +1 -1
  70. package/packages/forms/dist/components/controlled/CheckboxGroup.d.ts.map +1 -1
  71. package/packages/forms/dist/components/controlled/CheckboxGroup.js.map +1 -1
  72. package/packages/forms/dist/components/controlled/RadioGroup.d.ts +1 -1
  73. package/packages/forms/dist/components/controlled/RadioGroup.d.ts.map +1 -1
  74. package/packages/forms/dist/components/controlled/RadioGroup.js.map +1 -1
  75. package/packages/forms/dist/components/controlled/SelectControl.d.ts +1 -1
  76. package/packages/forms/dist/components/controlled/SelectControl.d.ts.map +1 -1
  77. package/packages/forms/dist/components/controlled/SelectControl.js.map +1 -1
  78. package/packages/forms/dist/components/controlled/TextareaControl.d.ts +1 -1
  79. package/packages/forms/dist/components/controlled/TextareaControl.d.ts.map +1 -1
  80. package/packages/forms/dist/components/controlled/TextareaControl.js.map +1 -1
  81. package/packages/forms/dist/index.cjs.js +1 -1
  82. package/packages/forms/dist/index.cjs.js.map +1 -1
  83. package/packages/forms/dist/index.es.js +123 -116
  84. package/packages/forms/dist/index.es.js.map +1 -1
  85. package/packages/forms/package.json +1 -1
  86. package/packages/forms/src/components/Checkbox.tsx +35 -36
  87. package/packages/forms/src/components/FieldsetControl.tsx +57 -58
  88. package/packages/forms/src/components/Input.tsx +23 -24
  89. package/packages/forms/src/components/LabelControl.tsx +54 -52
  90. package/packages/forms/src/components/Radio.tsx +32 -33
  91. package/packages/forms/src/components/Select.tsx +32 -33
  92. package/packages/forms/src/components/Textarea.tsx +42 -43
  93. package/packages/forms/src/components/controlled/CheckboxGroup.tsx +36 -34
  94. package/packages/forms/src/components/controlled/RadioGroup.tsx +1 -1
  95. package/packages/forms/src/components/controlled/SelectControl.tsx +26 -24
  96. 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((p, b) => {
635
- const { className: m, children: f, ...i } = p, a = y.useContext(F);
636
- a.isRequired && (i.required = !0), a.groupName && (i.name = a.groupName);
637
- const v = `
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
- return /* @__PURE__ */ s.jsx("label", { htmlFor: i.id, className: P(v, m), children: /* @__PURE__ */ s.jsxs("span", { className: "flex items-center", children: [
662
- /* @__PURE__ */ s.jsx(
663
- "input",
664
- {
665
- className: c,
666
- type: "checkbox",
667
- "aria-describedby": a.helperTextId,
668
- "aria-errormessage": a.errorMessageId,
669
- "aria-invalid": a.isInvalid ?? !1,
670
- ...i,
671
- ref: b
672
- }
673
- ),
674
- /* @__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" }) }) }),
675
- /* @__PURE__ */ s.jsx("span", { className: "peer-disabled:text-sumi-500", children: f })
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((p, b) => {
680
- const { className: m, children: f, ...i } = p, a = y.useContext(F);
681
- a.isRequired && (i.required = !0), a.groupName && (i.name = a.groupName);
682
- const v = `
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
- return /* @__PURE__ */ s.jsx("label", { htmlFor: i.id, className: P(v, m), children: /* @__PURE__ */ s.jsxs("span", { className: "flex items-center", children: [
707
- /* @__PURE__ */ s.jsx(
708
- "input",
709
- {
710
- className: c,
711
- type: "radio",
712
- "aria-describedby": a.helperTextId,
713
- "aria-errormessage": a.errorMessageId,
714
- "aria-invalid": a.isInvalid ?? !1,
715
- ...i,
716
- ref: b
717
- }
718
- ),
719
- /* @__PURE__ */ s.jsx("span", { className: o }),
720
- /* @__PURE__ */ s.jsx("span", { className: "peer-disabled:text-sumi-500", children: f })
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((p, b) => {
725
- const { className: m, children: f, ...i } = p, a = y.useContext(F);
726
- a.isRequired && (i.required = !0);
727
- const v = a.isInvalid ? "border-sun-800" : "border-sumi-900", c = `
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
- return /* @__PURE__ */ s.jsxs("label", { className: "inline-block relative", children: [
752
- /* @__PURE__ */ s.jsx(
753
- "select",
754
- {
755
- id: i.id ?? a.id,
756
- className: P(c, v, p.className),
757
- "aria-describedby": a.helperTextId,
758
- "aria-errormessage": a.errorMessageId,
759
- "aria-invalid": a.isInvalid ?? !1,
760
- ...i,
761
- ref: b,
762
- children: f
763
- }
764
- ),
765
- /* @__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" }) }) })
766
- ] });
767
- }), br = y.forwardRef((p, b) => {
768
- const { className: m, ...f } = p, i = y.useContext(F);
769
- i.isRequired && (f.required = !0);
770
- const a = i.isInvalid ? "border-sun-800" : "border-sumi-900", v = `
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
- return /* @__PURE__ */ s.jsx(
783
- "input",
784
- {
785
- type: "text",
786
- id: f.id ?? i.id,
787
- className: P(v, a, m),
788
- "aria-describedby": i.helperTextId,
789
- "aria-errormessage": i.errorMessageId,
790
- "aria-invalid": i.isInvalid ?? !1,
791
- ref: b,
792
- ...f
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((p, b) => {
798
- const { className: m, children: f, onChange: i, maxLength: a, ...v } = p, [c, o] = y.useState(0), _ = (I) => {
799
- i && i(I), o(I.target.value.length);
800
- }, h = y.useContext(F);
801
- h.isRequired && (v.required = !0);
802
- const g = h.isInvalid ? "border-sun-800" : "border-sumi-900", C = c > (a || 0) ? "text-sun-800" : "text-sumi-700", T = `
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
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
815
- /* @__PURE__ */ s.jsx(
816
- "textarea",
817
- {
818
- id: v.id ?? h.id,
819
- className: P(T, g, m),
820
- "aria-describedby": h.helperTextId,
821
- "aria-errormessage": h.errorMessageId,
822
- "aria-invalid": h.isInvalid ?? !1,
823
- onChange: _,
824
- ...v,
825
- ref: b,
826
- children: f
827
- }
828
- ),
829
- a ? /* @__PURE__ */ s.jsxs("p", { className: "text-xs text-sumi-700", children: [
830
- /* @__PURE__ */ s.jsx("span", { className: C, children: c }),
831
- "/",
832
- /* @__PURE__ */ s.jsx("span", { children: a })
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-xs text-sumi-700 mb-2", children: a }),
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-xs text-sun-800",
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-xs text-sumi-700 mt-2", children: a }),
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-xs text-sun-800",
930
+ "text-sup text-sun-800",
924
931
  a ? "mt-1" : "mt-2"
925
932
  ),
926
933
  children: v