@sio-group/form-react 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -561,67 +561,9 @@ var Checkbox = ({
561
561
  // src/components/Fields/Input/Input.tsx
562
562
  import { memo as memo2, useMemo } from "react";
563
563
 
564
- // src/components/Button/index.tsx
565
- import React2 from "react";
566
- import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
567
- var ButtonComponent = ({
568
- type = "button",
569
- label,
570
- onClick,
571
- variant = "primary",
572
- color = "default",
573
- size = "md",
574
- block = false,
575
- loading = false,
576
- disabled = false,
577
- className = "",
578
- ariaLabel = "",
579
- style = {},
580
- children
581
- }) => {
582
- const isDisabled = disabled || loading;
583
- const handleClick = (e) => {
584
- if (isDisabled) {
585
- e.preventDefault();
586
- return;
587
- }
588
- onClick?.(e);
589
- };
590
- const buttonClasses = [
591
- "btn",
592
- `btn--${variant}`,
593
- `btn--${size}`,
594
- `btn--${color}`,
595
- block && "btn--block",
596
- loading && "btn--loading",
597
- isDisabled && "btn--disabled",
598
- className
599
- ].filter(Boolean).join(" ");
600
- return /* @__PURE__ */ jsx4(
601
- "button",
602
- {
603
- type,
604
- onClick: handleClick,
605
- className: buttonClasses,
606
- style,
607
- disabled: isDisabled,
608
- "aria-label": ariaLabel || label,
609
- "aria-busy": loading,
610
- "aria-disabled": isDisabled,
611
- children: loading ? /* @__PURE__ */ jsxs3(Fragment, { children: [
612
- /* @__PURE__ */ jsx4("span", { className: "btn__spinner", "aria-hidden": "true", children: /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx4("circle", { cx: "10", cy: "10", r: "8" }) }) }),
613
- /* @__PURE__ */ jsx4("span", { className: "btn__loading-text", children: "Processing..." })
614
- ] }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
615
- children,
616
- label
617
- ] })
618
- }
619
- );
620
- };
621
- var Button = React2.memo(ButtonComponent);
622
-
623
564
  // src/components/Fields/Input/NumberInput/index.tsx
624
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
565
+ import { Button } from "@sio-group/ui-core";
566
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
625
567
  var NumberInput = ({
626
568
  value,
627
569
  min,
@@ -677,7 +619,7 @@ var NumberInput = ({
677
619
  }
678
620
  onChange(value2);
679
621
  };
680
- return /* @__PURE__ */ jsxs4(
622
+ return /* @__PURE__ */ jsxs3(
681
623
  InputWrapper_default,
682
624
  {
683
625
  type,
@@ -693,7 +635,7 @@ var NumberInput = ({
693
635
  className,
694
636
  style,
695
637
  children: [
696
- spinner && spinner === "horizontal" && /* @__PURE__ */ jsx5(
638
+ spinner && spinner === "horizontal" && /* @__PURE__ */ jsx4(
697
639
  Button,
698
640
  {
699
641
  type: "button",
@@ -705,8 +647,8 @@ var NumberInput = ({
705
647
  label: "-"
706
648
  }
707
649
  ),
708
- /* @__PURE__ */ jsx5(Icon, { icon }),
709
- /* @__PURE__ */ jsx5(
650
+ /* @__PURE__ */ jsx4(Icon, { icon }),
651
+ /* @__PURE__ */ jsx4(
710
652
  "input",
711
653
  {
712
654
  type: "number",
@@ -739,7 +681,7 @@ var NumberInput = ({
739
681
  style: spinner && spinner === "horizontal" ? { textAlign: "center" } : {}
740
682
  }
741
683
  ),
742
- spinner && (spinner === "horizontal" ? /* @__PURE__ */ jsx5(
684
+ spinner && (spinner === "horizontal" ? /* @__PURE__ */ jsx4(
743
685
  Button,
744
686
  {
745
687
  type: "button",
@@ -750,8 +692,8 @@ var NumberInput = ({
750
692
  "aria-label": "Increase value",
751
693
  label: "+"
752
694
  }
753
- ) : /* @__PURE__ */ jsxs4("div", { className: "form-field__spinner", "aria-hidden": "true", children: [
754
- /* @__PURE__ */ jsx5(
695
+ ) : /* @__PURE__ */ jsxs3("div", { className: "form-field__spinner", "aria-hidden": "true", children: [
696
+ /* @__PURE__ */ jsx4(
755
697
  Button,
756
698
  {
757
699
  type: "button",
@@ -761,7 +703,7 @@ var NumberInput = ({
761
703
  label: "\u25B2"
762
704
  }
763
705
  ),
764
- /* @__PURE__ */ jsx5(
706
+ /* @__PURE__ */ jsx4(
765
707
  Button,
766
708
  {
767
709
  type: "button",
@@ -778,7 +720,7 @@ var NumberInput = ({
778
720
  };
779
721
 
780
722
  // src/components/Fields/Input/RangeInput/index.tsx
781
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
723
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
782
724
  var RangeInput = ({
783
725
  value,
784
726
  min,
@@ -805,7 +747,7 @@ var RangeInput = ({
805
747
  className,
806
748
  style
807
749
  }) => {
808
- return /* @__PURE__ */ jsxs5(
750
+ return /* @__PURE__ */ jsxs4(
809
751
  InputWrapper_default,
810
752
  {
811
753
  type,
@@ -821,9 +763,9 @@ var RangeInput = ({
821
763
  className,
822
764
  style,
823
765
  children: [
824
- /* @__PURE__ */ jsx6(Icon, { icon }),
825
- showValue && /* @__PURE__ */ jsx6("span", { className: "form-field__range-value", children: Number(value) }),
826
- /* @__PURE__ */ jsx6(
766
+ /* @__PURE__ */ jsx5(Icon, { icon }),
767
+ showValue && /* @__PURE__ */ jsx5("span", { className: "form-field__range-value", children: Number(value) }),
768
+ /* @__PURE__ */ jsx5(
827
769
  "input",
828
770
  {
829
771
  type,
@@ -857,110 +799,111 @@ var RangeInput = ({
857
799
 
858
800
  // src/components/Fields/Input/DateInput/index.tsx
859
801
  import { useRef } from "react";
802
+ import { Button as Button2 } from "@sio-group/ui-core";
860
803
 
861
804
  // src/utils/custom-icons.tsx
862
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
805
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
863
806
  var CustomIcons = {
864
- Date: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
865
- /* @__PURE__ */ jsx7("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2", stroke: "currentColor", fill: "none" }),
866
- /* @__PURE__ */ jsx7("line", { x1: "8", y1: "2", x2: "8", y2: "6", stroke: "currentColor" }),
867
- /* @__PURE__ */ jsx7("line", { x1: "16", y1: "2", x2: "16", y2: "6", stroke: "currentColor" }),
868
- /* @__PURE__ */ jsx7("line", { x1: "3", y1: "10", x2: "21", y2: "10", stroke: "currentColor" })
807
+ Date: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
808
+ /* @__PURE__ */ jsx6("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2", stroke: "currentColor", fill: "none" }),
809
+ /* @__PURE__ */ jsx6("line", { x1: "8", y1: "2", x2: "8", y2: "6", stroke: "currentColor" }),
810
+ /* @__PURE__ */ jsx6("line", { x1: "16", y1: "2", x2: "16", y2: "6", stroke: "currentColor" }),
811
+ /* @__PURE__ */ jsx6("line", { x1: "3", y1: "10", x2: "21", y2: "10", stroke: "currentColor" })
869
812
  ] }),
870
- Time: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
871
- /* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "10" }),
872
- /* @__PURE__ */ jsx7("polyline", { points: "12 6 12 12 16 14" }),
873
- /* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", fillOpacity: "0.3", stroke: "none" })
813
+ Time: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
814
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "10" }),
815
+ /* @__PURE__ */ jsx6("polyline", { points: "12 6 12 12 16 14" }),
816
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", fillOpacity: "0.3", stroke: "none" })
874
817
  ] }),
875
- DateTime: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
876
- /* @__PURE__ */ jsx7("rect", { x: "2", y: "3", width: "14", height: "14", rx: "2", ry: "2" }),
877
- /* @__PURE__ */ jsx7("line", { x1: "5", y1: "2", x2: "5", y2: "5" }),
878
- /* @__PURE__ */ jsx7("line", { x1: "13", y1: "2", x2: "13", y2: "5" }),
879
- /* @__PURE__ */ jsx7("line", { x1: "2", y1: "7", x2: "16", y2: "7" }),
880
- /* @__PURE__ */ jsx7("circle", { cx: "19", cy: "15", r: "4" }),
881
- /* @__PURE__ */ jsx7("polyline", { points: "19 13 19 15 21 16" })
818
+ DateTime: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
819
+ /* @__PURE__ */ jsx6("rect", { x: "2", y: "3", width: "14", height: "14", rx: "2", ry: "2" }),
820
+ /* @__PURE__ */ jsx6("line", { x1: "5", y1: "2", x2: "5", y2: "5" }),
821
+ /* @__PURE__ */ jsx6("line", { x1: "13", y1: "2", x2: "13", y2: "5" }),
822
+ /* @__PURE__ */ jsx6("line", { x1: "2", y1: "7", x2: "16", y2: "7" }),
823
+ /* @__PURE__ */ jsx6("circle", { cx: "19", cy: "15", r: "4" }),
824
+ /* @__PURE__ */ jsx6("polyline", { points: "19 13 19 15 21 16" })
882
825
  ] }),
883
- FileUpload: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
884
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
885
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
886
- /* @__PURE__ */ jsx7("path", { d: "M12 12v6m0-6 2 2m-2-2-2 2" })
826
+ FileUpload: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
827
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
828
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
829
+ /* @__PURE__ */ jsx6("path", { d: "M12 12v6m0-6 2 2m-2-2-2 2" })
887
830
  ] }),
888
- CloudUpload: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
889
- /* @__PURE__ */ jsx7("path", { d: "M12 16v-6m0 0-2 2m2-2 2 2" }),
890
- /* @__PURE__ */ jsx7("path", { d: "M16 16h3a4 4 0 0 0 0-8h-1.5A5.5 5.5 0 0 0 7 9a5 5 0 0 0-1 9.8" })
831
+ CloudUpload: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
832
+ /* @__PURE__ */ jsx6("path", { d: "M12 16v-6m0 0-2 2m2-2 2 2" }),
833
+ /* @__PURE__ */ jsx6("path", { d: "M16 16h3a4 4 0 0 0 0-8h-1.5A5.5 5.5 0 0 0 7 9a5 5 0 0 0-1 9.8" })
891
834
  ] }),
892
- TrashIcon: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
893
- /* @__PURE__ */ jsx7("path", { d: "M3 6h18" }),
894
- /* @__PURE__ */ jsx7("rect", { x: "6", y: "6", width: "12", height: "14", rx: "1", ry: "1" }),
895
- /* @__PURE__ */ jsx7("path", { d: "M9 3h6" }),
896
- /* @__PURE__ */ jsx7("path", { d: "M10 3v3M14 3v3" }),
897
- /* @__PURE__ */ jsx7("line", { x1: "10", y1: "10", x2: "10", y2: "16" }),
898
- /* @__PURE__ */ jsx7("line", { x1: "14", y1: "10", x2: "14", y2: "16" })
835
+ TrashIcon: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
836
+ /* @__PURE__ */ jsx6("path", { d: "M3 6h18" }),
837
+ /* @__PURE__ */ jsx6("rect", { x: "6", y: "6", width: "12", height: "14", rx: "1", ry: "1" }),
838
+ /* @__PURE__ */ jsx6("path", { d: "M9 3h6" }),
839
+ /* @__PURE__ */ jsx6("path", { d: "M10 3v3M14 3v3" }),
840
+ /* @__PURE__ */ jsx6("line", { x1: "10", y1: "10", x2: "10", y2: "16" }),
841
+ /* @__PURE__ */ jsx6("line", { x1: "14", y1: "10", x2: "14", y2: "16" })
899
842
  ] }),
900
- SimpleTrashIcon: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
901
- /* @__PURE__ */ jsx7("path", { d: "M3 6h18" }),
902
- /* @__PURE__ */ jsx7("rect", { x: "6", y: "8", width: "12", height: "12", rx: "1", ry: "1" }),
903
- /* @__PURE__ */ jsx7("path", { d: "M9 4h6" })
843
+ SimpleTrashIcon: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
844
+ /* @__PURE__ */ jsx6("path", { d: "M3 6h18" }),
845
+ /* @__PURE__ */ jsx6("rect", { x: "6", y: "8", width: "12", height: "12", rx: "1", ry: "1" }),
846
+ /* @__PURE__ */ jsx6("path", { d: "M9 4h6" })
904
847
  ] }),
905
- DeleteTrashIcon: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
906
- /* @__PURE__ */ jsx7("path", { d: "M3 6h18" }),
907
- /* @__PURE__ */ jsx7("rect", { x: "6", y: "6", width: "12", height: "14", rx: "1", ry: "1" }),
908
- /* @__PURE__ */ jsx7("path", { d: "M9 3h6" }),
909
- /* @__PURE__ */ jsx7("path", { d: "M10 3v3M14 3v3" }),
910
- /* @__PURE__ */ jsx7("line", { x1: "9", y1: "10", x2: "15", y2: "16" }),
911
- /* @__PURE__ */ jsx7("line", { x1: "15", y1: "10", x2: "9", y2: "16" })
848
+ DeleteTrashIcon: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
849
+ /* @__PURE__ */ jsx6("path", { d: "M3 6h18" }),
850
+ /* @__PURE__ */ jsx6("rect", { x: "6", y: "6", width: "12", height: "14", rx: "1", ry: "1" }),
851
+ /* @__PURE__ */ jsx6("path", { d: "M9 3h6" }),
852
+ /* @__PURE__ */ jsx6("path", { d: "M10 3v3M14 3v3" }),
853
+ /* @__PURE__ */ jsx6("line", { x1: "9", y1: "10", x2: "15", y2: "16" }),
854
+ /* @__PURE__ */ jsx6("line", { x1: "15", y1: "10", x2: "9", y2: "16" })
912
855
  ] }),
913
- FileIcon: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
914
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
915
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" })
856
+ FileIcon: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
857
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
858
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" })
916
859
  ] }),
917
- Word: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
918
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
919
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
920
- /* @__PURE__ */ jsx7("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
921
- /* @__PURE__ */ jsx7("line", { x1: "8", y1: "16", x2: "16", y2: "16" }),
922
- /* @__PURE__ */ jsx7("line", { x1: "8", y1: "19", x2: "13", y2: "19" })
860
+ Word: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
861
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
862
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
863
+ /* @__PURE__ */ jsx6("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
864
+ /* @__PURE__ */ jsx6("line", { x1: "8", y1: "16", x2: "16", y2: "16" }),
865
+ /* @__PURE__ */ jsx6("line", { x1: "8", y1: "19", x2: "13", y2: "19" })
923
866
  ] }),
924
- Excel: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
925
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
926
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
927
- /* @__PURE__ */ jsx7("rect", { x: "7", y: "12", width: "10", height: "7", rx: "1" }),
928
- /* @__PURE__ */ jsx7("line", { x1: "7", y1: "15.5", x2: "17", y2: "15.5" }),
929
- /* @__PURE__ */ jsx7("line", { x1: "11.5", y1: "12", x2: "11.5", y2: "19" })
867
+ Excel: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
868
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
869
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
870
+ /* @__PURE__ */ jsx6("rect", { x: "7", y: "12", width: "10", height: "7", rx: "1" }),
871
+ /* @__PURE__ */ jsx6("line", { x1: "7", y1: "15.5", x2: "17", y2: "15.5" }),
872
+ /* @__PURE__ */ jsx6("line", { x1: "11.5", y1: "12", x2: "11.5", y2: "19" })
930
873
  ] }),
931
- PowerPoint: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
932
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
933
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
934
- /* @__PURE__ */ jsx7("rect", { x: "7", y: "12", width: "10", height: "7", rx: "1" }),
935
- /* @__PURE__ */ jsx7("path", { d: "M9 17l2-3 2 2 2-3" })
874
+ PowerPoint: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
875
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
876
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
877
+ /* @__PURE__ */ jsx6("rect", { x: "7", y: "12", width: "10", height: "7", rx: "1" }),
878
+ /* @__PURE__ */ jsx6("path", { d: "M9 17l2-3 2 2 2-3" })
936
879
  ] }),
937
- Pdf: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
938
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
939
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
940
- /* @__PURE__ */ jsx7("rect", { x: "7", y: "14", width: "10", height: "4", rx: "1" })
880
+ Pdf: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
881
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
882
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
883
+ /* @__PURE__ */ jsx6("rect", { x: "7", y: "14", width: "10", height: "4", rx: "1" })
941
884
  ] }),
942
- Image: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
943
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
944
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
945
- /* @__PURE__ */ jsx7("circle", { cx: "9", cy: "13", r: "1.5" }),
946
- /* @__PURE__ */ jsx7("path", { d: "M7 18l3-3 2 2 3-3 2 4" })
885
+ Image: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
886
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
887
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
888
+ /* @__PURE__ */ jsx6("circle", { cx: "9", cy: "13", r: "1.5" }),
889
+ /* @__PURE__ */ jsx6("path", { d: "M7 18l3-3 2 2 3-3 2 4" })
947
890
  ] }),
948
- Audio: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
949
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
950
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
951
- /* @__PURE__ */ jsx7("path", { d: "M8 16v-2" }),
952
- /* @__PURE__ */ jsx7("path", { d: "M10 17v-4" }),
953
- /* @__PURE__ */ jsx7("path", { d: "M12 18v-6" }),
954
- /* @__PURE__ */ jsx7("path", { d: "M14 17v-4" }),
955
- /* @__PURE__ */ jsx7("path", { d: "M16 16v-2" })
891
+ Audio: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
892
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
893
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
894
+ /* @__PURE__ */ jsx6("path", { d: "M8 16v-2" }),
895
+ /* @__PURE__ */ jsx6("path", { d: "M10 17v-4" }),
896
+ /* @__PURE__ */ jsx6("path", { d: "M12 18v-6" }),
897
+ /* @__PURE__ */ jsx6("path", { d: "M14 17v-4" }),
898
+ /* @__PURE__ */ jsx6("path", { d: "M16 16v-2" })
956
899
  ] }),
957
- Video: () => /* @__PURE__ */ jsxs6("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
958
- /* @__PURE__ */ jsx7("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
959
- /* @__PURE__ */ jsx7("polyline", { points: "13 2 13 9 20 9" }),
960
- /* @__PURE__ */ jsx7("rect", { x: "7", y: "12", width: "8", height: "6", rx: "1" }),
961
- /* @__PURE__ */ jsx7("polygon", { points: "11 14 14 15 11 16" })
900
+ Video: () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
901
+ /* @__PURE__ */ jsx6("path", { d: "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }),
902
+ /* @__PURE__ */ jsx6("polyline", { points: "13 2 13 9 20 9" }),
903
+ /* @__PURE__ */ jsx6("rect", { x: "7", y: "12", width: "8", height: "6", rx: "1" }),
904
+ /* @__PURE__ */ jsx6("polygon", { points: "11 14 14 15 11 16" })
962
905
  ] }),
963
- Globe: () => /* @__PURE__ */ jsxs6(
906
+ Globe: () => /* @__PURE__ */ jsxs5(
964
907
  "svg",
965
908
  {
966
909
  width: "20",
@@ -972,16 +915,16 @@ var CustomIcons = {
972
915
  strokeLinecap: "round",
973
916
  strokeLinejoin: "round",
974
917
  children: [
975
- /* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "10" }),
976
- /* @__PURE__ */ jsx7("path", { d: "M2 12h20" }),
977
- /* @__PURE__ */ jsx7("path", { d: "M12 2a15.3 15.3 0 0 1 0 20 15.3 15.3 0 0 1 0-20z" })
918
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "10" }),
919
+ /* @__PURE__ */ jsx6("path", { d: "M2 12h20" }),
920
+ /* @__PURE__ */ jsx6("path", { d: "M12 2a15.3 15.3 0 0 1 0 20 15.3 15.3 0 0 1 0-20z" })
978
921
  ]
979
922
  }
980
923
  )
981
924
  };
982
925
 
983
926
  // src/components/Fields/Input/DateInput/index.tsx
984
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
927
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
985
928
  var DateInput = ({
986
929
  value,
987
930
  min,
@@ -1016,7 +959,7 @@ var DateInput = ({
1016
959
  }
1017
960
  }
1018
961
  };
1019
- return /* @__PURE__ */ jsxs7(
962
+ return /* @__PURE__ */ jsxs6(
1020
963
  InputWrapper_default,
1021
964
  {
1022
965
  type,
@@ -1032,8 +975,8 @@ var DateInput = ({
1032
975
  className,
1033
976
  style,
1034
977
  children: [
1035
- /* @__PURE__ */ jsx8(Icon, { icon }),
1036
- /* @__PURE__ */ jsx8(
978
+ /* @__PURE__ */ jsx7(Icon, { icon }),
979
+ /* @__PURE__ */ jsx7(
1037
980
  "input",
1038
981
  {
1039
982
  ref: inputRef,
@@ -1059,8 +1002,8 @@ var DateInput = ({
1059
1002
  "aria-label": label || placeholder
1060
1003
  }
1061
1004
  ),
1062
- /* @__PURE__ */ jsx8(
1063
- Button,
1005
+ /* @__PURE__ */ jsx7(
1006
+ Button2,
1064
1007
  {
1065
1008
  className: "form-field__action",
1066
1009
  type: "button",
@@ -1077,6 +1020,7 @@ var DateInput = ({
1077
1020
 
1078
1021
  // src/components/Fields/Input/FileInput/index.tsx
1079
1022
  import { isValidFile } from "@sio-group/form-validation";
1023
+ import { Button as Button3 } from "@sio-group/ui-core";
1080
1024
 
1081
1025
  // src/utils/get-accept-string.ts
1082
1026
  var getAccept = (accept) => {
@@ -1164,7 +1108,7 @@ var FileTypeIcon = (mime) => {
1164
1108
  };
1165
1109
 
1166
1110
  // src/components/Fields/Input/FileInput/index.tsx
1167
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1111
+ import { Fragment, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1168
1112
  var FileInput = ({
1169
1113
  value,
1170
1114
  onChange,
@@ -1226,8 +1170,8 @@ var FileInput = ({
1226
1170
  onChange(fileList);
1227
1171
  if (onError) onError(errorList ?? []);
1228
1172
  };
1229
- return /* @__PURE__ */ jsxs8(Fragment2, { children: [
1230
- /* @__PURE__ */ jsxs8(
1173
+ return /* @__PURE__ */ jsxs7(Fragment, { children: [
1174
+ /* @__PURE__ */ jsxs7(
1231
1175
  InputWrapper_default,
1232
1176
  {
1233
1177
  type,
@@ -1243,8 +1187,8 @@ var FileInput = ({
1243
1187
  className,
1244
1188
  style,
1245
1189
  children: [
1246
- /* @__PURE__ */ jsx9(Icon, { icon }),
1247
- /* @__PURE__ */ jsx9(
1190
+ /* @__PURE__ */ jsx8(Icon, { icon }),
1191
+ /* @__PURE__ */ jsx8(
1248
1192
  "input",
1249
1193
  {
1250
1194
  type,
@@ -1268,8 +1212,8 @@ var FileInput = ({
1268
1212
  multiple
1269
1213
  }
1270
1214
  ),
1271
- /* @__PURE__ */ jsx9(
1272
- Button,
1215
+ /* @__PURE__ */ jsx8(
1216
+ Button3,
1273
1217
  {
1274
1218
  className: "form-field__action",
1275
1219
  type: "button",
@@ -1285,16 +1229,16 @@ var FileInput = ({
1285
1229
  ]
1286
1230
  }
1287
1231
  ),
1288
- currentFiles.length !== 0 && /* @__PURE__ */ jsxs8("div", { className: "form-field__upload-file-section", children: [
1289
- currentFiles.map((file, index) => /* @__PURE__ */ jsxs8("div", { className: "form-field__upload-file", children: [
1290
- /* @__PURE__ */ jsxs8("div", { className: "form-field__upload-file-label", children: [
1232
+ currentFiles.length !== 0 && /* @__PURE__ */ jsxs7("div", { className: "form-field__upload-file-section", children: [
1233
+ currentFiles.map((file, index) => /* @__PURE__ */ jsxs7("div", { className: "form-field__upload-file", children: [
1234
+ /* @__PURE__ */ jsxs7("div", { className: "form-field__upload-file-label", children: [
1291
1235
  FileTypeIcon(file.type || "text/uri-list"),
1292
- /* @__PURE__ */ jsxs8("span", { children: [
1236
+ /* @__PURE__ */ jsxs7("span", { children: [
1293
1237
  file.name,
1294
1238
  file.size ? ` (${getFileSize(file.size)})` : ""
1295
1239
  ] })
1296
1240
  ] }),
1297
- /* @__PURE__ */ jsx9("div", { className: "form-field__upload-file__buttons", children: /* @__PURE__ */ jsx9(
1241
+ /* @__PURE__ */ jsx8("div", { className: "form-field__upload-file__buttons", children: /* @__PURE__ */ jsx8(
1298
1242
  "button",
1299
1243
  {
1300
1244
  type: "button",
@@ -1304,7 +1248,7 @@ var FileInput = ({
1304
1248
  }
1305
1249
  ) })
1306
1250
  ] }, index)),
1307
- /* @__PURE__ */ jsx9("div", { className: "form-field__upload-buttons", children: /* @__PURE__ */ jsxs8(
1251
+ /* @__PURE__ */ jsx8("div", { className: "form-field__upload-buttons", children: /* @__PURE__ */ jsxs7(
1308
1252
  "button",
1309
1253
  {
1310
1254
  type: "button",
@@ -1312,7 +1256,7 @@ var FileInput = ({
1312
1256
  onClick: handleRemoveAll,
1313
1257
  children: [
1314
1258
  CustomIcons.TrashIcon(),
1315
- /* @__PURE__ */ jsx9("span", { children: "Verwijder alles" })
1259
+ /* @__PURE__ */ jsx8("span", { children: "Verwijder alles" })
1316
1260
  ]
1317
1261
  }
1318
1262
  ) })
@@ -1321,7 +1265,7 @@ var FileInput = ({
1321
1265
  };
1322
1266
 
1323
1267
  // src/components/Fields/Input/TextInput/index.tsx
1324
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1268
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1325
1269
  var TextInput = ({
1326
1270
  value,
1327
1271
  onChange,
@@ -1344,7 +1288,7 @@ var TextInput = ({
1344
1288
  className,
1345
1289
  style
1346
1290
  }) => {
1347
- return /* @__PURE__ */ jsxs9(
1291
+ return /* @__PURE__ */ jsxs8(
1348
1292
  InputWrapper_default,
1349
1293
  {
1350
1294
  type,
@@ -1360,8 +1304,8 @@ var TextInput = ({
1360
1304
  className,
1361
1305
  style,
1362
1306
  children: [
1363
- /* @__PURE__ */ jsx10(Icon, { icon }),
1364
- /* @__PURE__ */ jsx10(
1307
+ /* @__PURE__ */ jsx9(Icon, { icon }),
1308
+ /* @__PURE__ */ jsx9(
1365
1309
  "input",
1366
1310
  {
1367
1311
  type,
@@ -1389,24 +1333,24 @@ var TextInput = ({
1389
1333
  };
1390
1334
 
1391
1335
  // src/components/Fields/Input/Input.tsx
1392
- import { jsx as jsx11 } from "react/jsx-runtime";
1336
+ import { jsx as jsx10 } from "react/jsx-runtime";
1393
1337
  var Input = memo2(
1394
1338
  (props) => {
1395
1339
  const { type = "text" } = props;
1396
1340
  return useMemo(() => {
1397
1341
  switch (props.type) {
1398
1342
  case "number":
1399
- return /* @__PURE__ */ jsx11(NumberInput, { ...props });
1343
+ return /* @__PURE__ */ jsx10(NumberInput, { ...props });
1400
1344
  case "range":
1401
- return /* @__PURE__ */ jsx11(RangeInput, { ...props });
1345
+ return /* @__PURE__ */ jsx10(RangeInput, { ...props });
1402
1346
  case "date":
1403
1347
  case "time":
1404
1348
  case "datetime-local":
1405
- return /* @__PURE__ */ jsx11(DateInput, { ...props });
1349
+ return /* @__PURE__ */ jsx10(DateInput, { ...props });
1406
1350
  case "file":
1407
- return /* @__PURE__ */ jsx11(FileInput, { ...props });
1351
+ return /* @__PURE__ */ jsx10(FileInput, { ...props });
1408
1352
  case "hidden":
1409
- return /* @__PURE__ */ jsx11(
1353
+ return /* @__PURE__ */ jsx10(
1410
1354
  "input",
1411
1355
  {
1412
1356
  type: props.type,
@@ -1416,14 +1360,14 @@ var Input = memo2(
1416
1360
  }
1417
1361
  );
1418
1362
  default:
1419
- return /* @__PURE__ */ jsx11(TextInput, { ...props });
1363
+ return /* @__PURE__ */ jsx10(TextInput, { ...props });
1420
1364
  }
1421
1365
  }, [type, props]);
1422
1366
  }
1423
1367
  );
1424
1368
 
1425
1369
  // src/components/Fields/Radio/index.tsx
1426
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1370
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1427
1371
  var Radio = ({
1428
1372
  value,
1429
1373
  onChange,
@@ -1445,7 +1389,7 @@ var Radio = ({
1445
1389
  className,
1446
1390
  style
1447
1391
  }) => {
1448
- return /* @__PURE__ */ jsxs10(
1392
+ return /* @__PURE__ */ jsxs9(
1449
1393
  InputWrapper_default,
1450
1394
  {
1451
1395
  type,
@@ -1461,16 +1405,16 @@ var Radio = ({
1461
1405
  style,
1462
1406
  hideLayout: true,
1463
1407
  children: [
1464
- /* @__PURE__ */ jsx12(Icon, { icon }),
1408
+ /* @__PURE__ */ jsx11(Icon, { icon }),
1465
1409
  options.filter((option) => typeof option === "string" || !option.hide).map((option) => {
1466
1410
  const opt = typeof option === "string" ? { value: option, label: option } : option;
1467
- return /* @__PURE__ */ jsxs10(
1411
+ return /* @__PURE__ */ jsxs9(
1468
1412
  "label",
1469
1413
  {
1470
1414
  htmlFor: `${id}-${opt.value}`,
1471
1415
  className: value === opt.value ? "form-field--has-value" : "",
1472
1416
  children: [
1473
- /* @__PURE__ */ jsx12(
1417
+ /* @__PURE__ */ jsx11(
1474
1418
  "input",
1475
1419
  {
1476
1420
  name,
@@ -1486,7 +1430,7 @@ var Radio = ({
1486
1430
  disabled: opt.disabled || disabled
1487
1431
  }
1488
1432
  ),
1489
- /* @__PURE__ */ jsx12("div", { children: opt.label })
1433
+ /* @__PURE__ */ jsx11("div", { children: opt.label })
1490
1434
  ]
1491
1435
  },
1492
1436
  opt.value
@@ -1498,7 +1442,7 @@ var Radio = ({
1498
1442
  };
1499
1443
 
1500
1444
  // src/components/Fields/Select/index.tsx
1501
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1445
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1502
1446
  var Select = ({
1503
1447
  value,
1504
1448
  onChange,
@@ -1525,13 +1469,13 @@ var Select = ({
1525
1469
  }) => {
1526
1470
  const renderOption = (option) => {
1527
1471
  if (typeof option === "string") {
1528
- return /* @__PURE__ */ jsx13("option", { value: option, children: option }, option);
1472
+ return /* @__PURE__ */ jsx12("option", { value: option, children: option }, option);
1529
1473
  }
1530
1474
  if ("options" in option) {
1531
- return /* @__PURE__ */ jsx13("optgroup", { label: option.label, children: option.options.map(renderOption) }, option.label);
1475
+ return /* @__PURE__ */ jsx12("optgroup", { label: option.label, children: option.options.map(renderOption) }, option.label);
1532
1476
  }
1533
1477
  if (option.hide) return null;
1534
- return /* @__PURE__ */ jsx13(
1478
+ return /* @__PURE__ */ jsx12(
1535
1479
  "option",
1536
1480
  {
1537
1481
  value: option.value,
@@ -1541,7 +1485,7 @@ var Select = ({
1541
1485
  option.value
1542
1486
  );
1543
1487
  };
1544
- return /* @__PURE__ */ jsxs11(
1488
+ return /* @__PURE__ */ jsxs10(
1545
1489
  InputWrapper_default,
1546
1490
  {
1547
1491
  type,
@@ -1557,8 +1501,8 @@ var Select = ({
1557
1501
  className: `${className ?? ""} ${multiple ? "form-field__select-multiple" : "form-field__select-single"}`,
1558
1502
  style,
1559
1503
  children: [
1560
- /* @__PURE__ */ jsx13(Icon, { icon }),
1561
- /* @__PURE__ */ jsxs11(
1504
+ /* @__PURE__ */ jsx12(Icon, { icon }),
1505
+ /* @__PURE__ */ jsxs10(
1562
1506
  "select",
1563
1507
  {
1564
1508
  name,
@@ -1584,7 +1528,7 @@ var Select = ({
1584
1528
  multiple,
1585
1529
  "aria-label": label || placeholder,
1586
1530
  children: [
1587
- placeholder && /* @__PURE__ */ jsxs11("option", { value: "", selected: true, disabled: true, children: [
1531
+ placeholder && /* @__PURE__ */ jsxs10("option", { value: "", selected: true, disabled: true, children: [
1588
1532
  placeholder,
1589
1533
  !label && required ? " *" : ""
1590
1534
  ] }),
@@ -1598,7 +1542,7 @@ var Select = ({
1598
1542
  };
1599
1543
 
1600
1544
  // src/components/Fields/Textarea/index.tsx
1601
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1545
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1602
1546
  var Textarea = ({
1603
1547
  value,
1604
1548
  onChange,
@@ -1623,7 +1567,7 @@ var Textarea = ({
1623
1567
  className,
1624
1568
  style
1625
1569
  }) => {
1626
- return /* @__PURE__ */ jsxs12(
1570
+ return /* @__PURE__ */ jsxs11(
1627
1571
  InputWrapper_default,
1628
1572
  {
1629
1573
  type,
@@ -1639,8 +1583,8 @@ var Textarea = ({
1639
1583
  className,
1640
1584
  style,
1641
1585
  children: [
1642
- /* @__PURE__ */ jsx14(Icon, { icon }),
1643
- /* @__PURE__ */ jsx14(
1586
+ /* @__PURE__ */ jsx13(Icon, { icon }),
1587
+ /* @__PURE__ */ jsx13(
1644
1588
  "textarea",
1645
1589
  {
1646
1590
  name,
@@ -1668,76 +1612,12 @@ var Textarea = ({
1668
1612
  );
1669
1613
  };
1670
1614
 
1671
- // src/components/Link/index.tsx
1672
- import React4 from "react";
1673
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
1674
- var LinkComponent = ({
1675
- label,
1676
- to = "#",
1677
- onClick,
1678
- color = "default",
1679
- size = "md",
1680
- block = false,
1681
- loading = false,
1682
- disabled = false,
1683
- className = "",
1684
- ariaLabel = "",
1685
- navigate,
1686
- external = false,
1687
- style = {},
1688
- children
1689
- }) => {
1690
- const isDisabled = disabled || loading;
1691
- const isExternal = external || /^(https?:|mailto:|tel:|ftp:)/.test(to);
1692
- const handleClick = (e) => {
1693
- if (isDisabled) {
1694
- e.preventDefault();
1695
- return;
1696
- }
1697
- onClick?.(e);
1698
- if (!isExternal && navigate) {
1699
- e.preventDefault();
1700
- navigate();
1701
- }
1702
- };
1703
- const linkClasses = [
1704
- "link",
1705
- `link--${color}`,
1706
- `btn--${size}`,
1707
- block && "link--block",
1708
- loading && "link--loading",
1709
- isDisabled && "link--disabled",
1710
- className
1711
- ].filter(Boolean).join(" ");
1712
- return /* @__PURE__ */ jsx15(
1713
- "a",
1714
- {
1715
- href: isDisabled ? void 0 : to,
1716
- onClick: handleClick,
1717
- className: linkClasses,
1718
- style,
1719
- "aria-label": ariaLabel || label,
1720
- "aria-busy": loading,
1721
- "aria-disabled": isDisabled,
1722
- target: isExternal ? "_blank" : void 0,
1723
- rel: isExternal ? "noopener noreferrer" : void 0,
1724
- children: loading ? /* @__PURE__ */ jsxs13(Fragment3, { children: [
1725
- /* @__PURE__ */ jsx15("span", { className: "btn__spinner", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("svg", { viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx15("circle", { cx: "10", cy: "10", r: "8" }) }) }),
1726
- /* @__PURE__ */ jsx15("span", { className: "btn__loading-text", children: "Processing..." })
1727
- ] }) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
1728
- children,
1729
- label && /* @__PURE__ */ jsx15("span", { className: "btn__label", children: label })
1730
- ] })
1731
- }
1732
- );
1733
- };
1734
- var Link = React4.memo(LinkComponent);
1735
-
1736
1615
  // src/components/Form.tsx
1737
- import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
1616
+ import { Link, Button as Button4 } from "@sio-group/ui-core";
1617
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1738
1618
  import { createElement } from "react";
1739
- var DefaultContainer = ({ children }) => /* @__PURE__ */ jsx16("div", { children });
1740
- var DefaultButtonContainer = ({ children }) => /* @__PURE__ */ jsx16("div", { className: "btn-group", children });
1619
+ var DefaultContainer = ({ children }) => /* @__PURE__ */ jsx14("div", { children });
1620
+ var DefaultButtonContainer = ({ children }) => /* @__PURE__ */ jsx14("div", { className: "btn-group", children });
1741
1621
  var Form = ({
1742
1622
  fields,
1743
1623
  layout = [],
@@ -1784,7 +1664,7 @@ var Form = ({
1784
1664
  case "hidden":
1785
1665
  return /* @__PURE__ */ createElement(Input, { ...register(field.name, field, renderLayout), key: field.name });
1786
1666
  default:
1787
- return /* @__PURE__ */ jsxs14("div", { children: [
1667
+ return /* @__PURE__ */ jsxs12("div", { children: [
1788
1668
  field.type,
1789
1669
  " to implement"
1790
1670
  ] }, field.name);
@@ -1796,7 +1676,7 @@ var Form = ({
1796
1676
  const content = target.map((element) => {
1797
1677
  if ("fields" in element) {
1798
1678
  const classes = getColumnClasses(element.layout, element.layout?.className);
1799
- return /* @__PURE__ */ jsx16(
1679
+ return /* @__PURE__ */ jsx14(
1800
1680
  "div",
1801
1681
  {
1802
1682
  className: classes,
@@ -1811,7 +1691,7 @@ var Form = ({
1811
1691
  }
1812
1692
  return loadElement(element, hasLayout);
1813
1693
  });
1814
- return hasLayout ? /* @__PURE__ */ jsx16("div", { className: "sio-row", children: content }) : content;
1694
+ return hasLayout ? /* @__PURE__ */ jsx14("div", { className: "sio-row", children: content }) : content;
1815
1695
  };
1816
1696
  const fieldMap = useMemo2(() => {
1817
1697
  const map = /* @__PURE__ */ new Map();
@@ -1827,12 +1707,12 @@ var Form = ({
1827
1707
  reset();
1828
1708
  };
1829
1709
  const renderButton = (props, i) => {
1830
- return props.type === "link" ? /* @__PURE__ */ createElement(Link, { ...props, key: i }) : /* @__PURE__ */ createElement(Button, { ...props, key: i });
1710
+ return props.type === "link" ? /* @__PURE__ */ createElement(Link, { ...props, key: i }) : /* @__PURE__ */ createElement(Button4, { ...props, key: i });
1831
1711
  };
1832
1712
  const renderButtons = () => {
1833
- return submitShow || cancelShow || buttons.length ? /* @__PURE__ */ jsxs14(ButtonContainer, { children: [
1834
- submitShow && /* @__PURE__ */ jsx16(
1835
- Button,
1713
+ return submitShow || cancelShow || buttons.length ? /* @__PURE__ */ jsxs12(ButtonContainer, { children: [
1714
+ submitShow && /* @__PURE__ */ jsx14(
1715
+ Button4,
1836
1716
  {
1837
1717
  type: "submit",
1838
1718
  onClick: handleSubmit,
@@ -1842,32 +1722,29 @@ var Form = ({
1842
1722
  disabled: !isValid() || !extraValidation(getValues())
1843
1723
  }
1844
1724
  ),
1845
- cancelShow && /* @__PURE__ */ jsx16(
1846
- Button,
1725
+ cancelShow && /* @__PURE__ */ jsx14(
1726
+ Button4,
1847
1727
  {
1848
1728
  type: "button",
1849
1729
  onClick: handleCancel,
1850
1730
  variant: "secondary",
1851
- label: cancelLabel,
1852
- disabled: !isDirty()
1731
+ label: cancelLabel
1853
1732
  }
1854
1733
  ),
1855
1734
  buttons?.map(renderButton)
1856
1735
  ] }) : null;
1857
1736
  };
1858
- return /* @__PURE__ */ jsxs14("form", { className, style, noValidate: true, children: [
1859
- /* @__PURE__ */ jsx16(Container, { children: renderFields() }),
1737
+ return /* @__PURE__ */ jsxs12("form", { className, style, noValidate: true, children: [
1738
+ /* @__PURE__ */ jsx14(Container, { children: renderFields() }),
1860
1739
  renderButtons()
1861
1740
  ] });
1862
1741
  };
1863
1742
  export {
1864
- Button,
1865
1743
  Checkbox,
1866
1744
  DateInput,
1867
1745
  FileInput,
1868
1746
  Form,
1869
1747
  Input,
1870
- Link,
1871
1748
  NumberInput,
1872
1749
  Radio,
1873
1750
  RangeInput,