@idds/react 1.5.45 → 1.5.47
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.cjs.js +1 -20
- package/dist/index.css +1 -1
- package/dist/index.es.js +942 -443
- package/dist/index.umd.js +1 -20
- package/dist/types/components/Alert.d.ts.map +1 -1
- package/dist/types/components/Checkbox.d.ts.map +1 -1
- package/dist/types/components/DatePicker.d.ts.map +1 -1
- package/dist/types/components/FieldInputTable.d.ts.map +1 -1
- package/dist/types/components/FileUpload.d.ts.map +1 -1
- package/dist/types/components/InputSearch.d.ts.map +1 -1
- package/dist/types/components/MonthPicker.d.ts.map +1 -1
- package/dist/types/components/Pagination.d.ts.map +1 -1
- package/dist/types/components/PasswordInput.d.ts.map +1 -1
- package/dist/types/components/SelectDropdown.d.ts.map +1 -1
- package/dist/types/components/SingleFileUpload.d.ts.map +1 -1
- package/dist/types/components/Table.d.ts.map +1 -1
- package/dist/types/components/ThemeToggle.d.ts.map +1 -1
- package/dist/types/components/TimePicker.d.ts.map +1 -1
- package/dist/types/components/Toast.d.ts.map +1 -1
- package/dist/types/components/YearPicker.d.ts.map +1 -1
- package/dist/types/icons/Icon3dCubeSphere.d.ts +7 -0
- package/dist/types/icons/Icon3dCubeSphere.d.ts.map +1 -0
- package/dist/types/icons/IconAlertCircle.d.ts +7 -0
- package/dist/types/icons/IconAlertCircle.d.ts.map +1 -0
- package/dist/types/icons/IconAlertTriangle.d.ts +7 -0
- package/dist/types/icons/IconAlertTriangle.d.ts.map +1 -0
- package/dist/types/icons/IconArrowNarrowDown.d.ts +7 -0
- package/dist/types/icons/IconArrowNarrowDown.d.ts.map +1 -0
- package/dist/types/icons/IconArrowNarrowUp.d.ts +7 -0
- package/dist/types/icons/IconArrowNarrowUp.d.ts.map +1 -0
- package/dist/types/icons/IconCalendar.d.ts +7 -0
- package/dist/types/icons/IconCalendar.d.ts.map +1 -0
- package/dist/types/icons/IconCaretDown.d.ts +7 -0
- package/dist/types/icons/IconCaretDown.d.ts.map +1 -0
- package/dist/types/icons/IconCaretUp.d.ts +7 -0
- package/dist/types/icons/IconCaretUp.d.ts.map +1 -0
- package/dist/types/icons/IconCheck.d.ts +7 -0
- package/dist/types/icons/IconCheck.d.ts.map +1 -0
- package/dist/types/icons/IconChevronDown.d.ts +7 -0
- package/dist/types/icons/IconChevronDown.d.ts.map +1 -0
- package/dist/types/icons/IconChevronLeft.d.ts +7 -0
- package/dist/types/icons/IconChevronLeft.d.ts.map +1 -0
- package/dist/types/icons/IconChevronRight.d.ts +7 -0
- package/dist/types/icons/IconChevronRight.d.ts.map +1 -0
- package/dist/types/icons/IconChevronUp.d.ts +7 -0
- package/dist/types/icons/IconChevronUp.d.ts.map +1 -0
- package/dist/types/icons/IconChevronsLeft.d.ts +7 -0
- package/dist/types/icons/IconChevronsLeft.d.ts.map +1 -0
- package/dist/types/icons/IconChevronsRight.d.ts +7 -0
- package/dist/types/icons/IconChevronsRight.d.ts.map +1 -0
- package/dist/types/icons/IconCircleCheck.d.ts +7 -0
- package/dist/types/icons/IconCircleCheck.d.ts.map +1 -0
- package/dist/types/icons/IconCircleX.d.ts +7 -0
- package/dist/types/icons/IconCircleX.d.ts.map +1 -0
- package/dist/types/icons/IconClock.d.ts +7 -0
- package/dist/types/icons/IconClock.d.ts.map +1 -0
- package/dist/types/icons/IconEye.d.ts +7 -0
- package/dist/types/icons/IconEye.d.ts.map +1 -0
- package/dist/types/icons/IconEyeOff.d.ts +7 -0
- package/dist/types/icons/IconEyeOff.d.ts.map +1 -0
- package/dist/types/icons/IconFile.d.ts +7 -0
- package/dist/types/icons/IconFile.d.ts.map +1 -0
- package/dist/types/icons/IconFileTypePdf.d.ts +7 -0
- package/dist/types/icons/IconFileTypePdf.d.ts.map +1 -0
- package/dist/types/icons/IconHome.d.ts +7 -0
- package/dist/types/icons/IconHome.d.ts.map +1 -0
- package/dist/types/icons/IconInfoCircle.d.ts +7 -0
- package/dist/types/icons/IconInfoCircle.d.ts.map +1 -0
- package/dist/types/icons/IconLogout.d.ts +7 -0
- package/dist/types/icons/IconLogout.d.ts.map +1 -0
- package/dist/types/icons/IconMap.d.ts +7 -0
- package/dist/types/icons/IconMap.d.ts.map +1 -0
- package/dist/types/icons/IconMenu2.d.ts +7 -0
- package/dist/types/icons/IconMenu2.d.ts.map +1 -0
- package/dist/types/icons/IconMinus.d.ts +7 -0
- package/dist/types/icons/IconMinus.d.ts.map +1 -0
- package/dist/types/icons/IconMoon.d.ts +7 -0
- package/dist/types/icons/IconMoon.d.ts.map +1 -0
- package/dist/types/icons/IconPhoto.d.ts +7 -0
- package/dist/types/icons/IconPhoto.d.ts.map +1 -0
- package/dist/types/icons/IconRotateClockwise.d.ts +7 -0
- package/dist/types/icons/IconRotateClockwise.d.ts.map +1 -0
- package/dist/types/icons/IconSearch.d.ts +7 -0
- package/dist/types/icons/IconSearch.d.ts.map +1 -0
- package/dist/types/icons/IconSettings.d.ts +7 -0
- package/dist/types/icons/IconSettings.d.ts.map +1 -0
- package/dist/types/icons/IconSquare.d.ts +7 -0
- package/dist/types/icons/IconSquare.d.ts.map +1 -0
- package/dist/types/icons/IconSquareCheck.d.ts +7 -0
- package/dist/types/icons/IconSquareCheck.d.ts.map +1 -0
- package/dist/types/icons/IconSun.d.ts +7 -0
- package/dist/types/icons/IconSun.d.ts.map +1 -0
- package/dist/types/icons/IconTrash.d.ts +7 -0
- package/dist/types/icons/IconTrash.d.ts.map +1 -0
- package/dist/types/icons/IconUpload.d.ts +7 -0
- package/dist/types/icons/IconUpload.d.ts.map +1 -0
- package/dist/types/icons/IconUser.d.ts +7 -0
- package/dist/types/icons/IconUser.d.ts.map +1 -0
- package/dist/types/icons/IconX.d.ts +7 -0
- package/dist/types/icons/IconX.d.ts.map +1 -0
- package/package.json +2 -3
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React, { createContext, useRef, useState, useCallback, useMemo, useContext, useId, useEffect, forwardRef,
|
|
2
|
+
import React, { createContext, useRef, useState, useCallback, useMemo, useContext, useId, useEffect, forwardRef, useImperativeHandle, Fragment as Fragment$1 } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
4
|
const iddsColorTokens = {
|
|
5
5
|
// Neutral Colors
|
|
@@ -816,313 +816,27 @@ function Accordion(props) {
|
|
|
816
816
|
)
|
|
817
817
|
] });
|
|
818
818
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
},
|
|
837
|
-
filled: {
|
|
838
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
839
|
-
width: 24,
|
|
840
|
-
height: 24,
|
|
841
|
-
viewBox: "0 0 24 24",
|
|
842
|
-
fill: "currentColor",
|
|
843
|
-
stroke: "none"
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
/**
|
|
847
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
848
|
-
*
|
|
849
|
-
* This source code is licensed under the MIT license.
|
|
850
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
851
|
-
*/
|
|
852
|
-
const createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
853
|
-
const Component = forwardRef(
|
|
854
|
-
({ color = "currentColor", size = 24, stroke = 2, title, className, children, ...rest }, ref) => createElement(
|
|
855
|
-
"svg",
|
|
856
|
-
{
|
|
857
|
-
ref,
|
|
858
|
-
...defaultAttributes[type],
|
|
859
|
-
width: size,
|
|
860
|
-
height: size,
|
|
861
|
-
className: [`tabler-icon`, `tabler-icon-${iconName}`, className].join(" "),
|
|
862
|
-
...{
|
|
863
|
-
strokeWidth: stroke,
|
|
864
|
-
stroke: color
|
|
865
|
-
},
|
|
866
|
-
...rest
|
|
867
|
-
},
|
|
868
|
-
[
|
|
869
|
-
title && createElement("title", { key: "svg-title" }, title),
|
|
870
|
-
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
871
|
-
...Array.isArray(children) ? children : [children]
|
|
819
|
+
const IconChevronUp = ({ size = 24, stroke = 2, ...props }) => {
|
|
820
|
+
return /* @__PURE__ */ jsxs(
|
|
821
|
+
"svg",
|
|
822
|
+
{
|
|
823
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
824
|
+
width: size,
|
|
825
|
+
height: size,
|
|
826
|
+
viewBox: "0 0 24 24",
|
|
827
|
+
fill: "none",
|
|
828
|
+
stroke: "currentColor",
|
|
829
|
+
strokeWidth: stroke,
|
|
830
|
+
strokeLinecap: "round",
|
|
831
|
+
strokeLinejoin: "round",
|
|
832
|
+
...props,
|
|
833
|
+
children: [
|
|
834
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
835
|
+
/* @__PURE__ */ jsx("path", { d: "M6 15l6 -6l6 6" })
|
|
872
836
|
]
|
|
873
|
-
|
|
837
|
+
}
|
|
874
838
|
);
|
|
875
|
-
Component.displayName = `${iconNamePascal}`;
|
|
876
|
-
return Component;
|
|
877
839
|
};
|
|
878
|
-
/**
|
|
879
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
880
|
-
*
|
|
881
|
-
* This source code is licensed under the MIT license.
|
|
882
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
883
|
-
*/
|
|
884
|
-
const __iconNode$u = [["path", { "d": "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "key": "svg-0" }], ["path", { "d": "M12 8v4", "key": "svg-1" }], ["path", { "d": "M12 16h.01", "key": "svg-2" }]];
|
|
885
|
-
const IconAlertCircle = createReactComponent("outline", "alert-circle", "AlertCircle", __iconNode$u);
|
|
886
|
-
/**
|
|
887
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
888
|
-
*
|
|
889
|
-
* This source code is licensed under the MIT license.
|
|
890
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
891
|
-
*/
|
|
892
|
-
const __iconNode$t = [["path", { "d": "M12 9v4", "key": "svg-0" }], ["path", { "d": "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z", "key": "svg-1" }], ["path", { "d": "M12 16h.01", "key": "svg-2" }]];
|
|
893
|
-
const IconAlertTriangle = createReactComponent("outline", "alert-triangle", "AlertTriangle", __iconNode$t);
|
|
894
|
-
/**
|
|
895
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
896
|
-
*
|
|
897
|
-
* This source code is licensed under the MIT license.
|
|
898
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
899
|
-
*/
|
|
900
|
-
const __iconNode$s = [["path", { "d": "M12 5l0 14", "key": "svg-0" }], ["path", { "d": "M16 15l-4 4", "key": "svg-1" }], ["path", { "d": "M8 15l4 4", "key": "svg-2" }]];
|
|
901
|
-
const IconArrowNarrowDown = createReactComponent("outline", "arrow-narrow-down", "ArrowNarrowDown", __iconNode$s);
|
|
902
|
-
/**
|
|
903
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
904
|
-
*
|
|
905
|
-
* This source code is licensed under the MIT license.
|
|
906
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
907
|
-
*/
|
|
908
|
-
const __iconNode$r = [["path", { "d": "M12 5l0 14", "key": "svg-0" }], ["path", { "d": "M16 9l-4 -4", "key": "svg-1" }], ["path", { "d": "M8 9l4 -4", "key": "svg-2" }]];
|
|
909
|
-
const IconArrowNarrowUp = createReactComponent("outline", "arrow-narrow-up", "ArrowNarrowUp", __iconNode$r);
|
|
910
|
-
/**
|
|
911
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
912
|
-
*
|
|
913
|
-
* This source code is licensed under the MIT license.
|
|
914
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
915
|
-
*/
|
|
916
|
-
const __iconNode$q = [["path", { "d": "M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z", "key": "svg-0" }], ["path", { "d": "M16 3v4", "key": "svg-1" }], ["path", { "d": "M8 3v4", "key": "svg-2" }], ["path", { "d": "M4 11h16", "key": "svg-3" }], ["path", { "d": "M11 15h1", "key": "svg-4" }], ["path", { "d": "M12 15v3", "key": "svg-5" }]];
|
|
917
|
-
const IconCalendar = createReactComponent("outline", "calendar", "Calendar", __iconNode$q);
|
|
918
|
-
/**
|
|
919
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
920
|
-
*
|
|
921
|
-
* This source code is licensed under the MIT license.
|
|
922
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
923
|
-
*/
|
|
924
|
-
const __iconNode$p = [["path", { "d": "M5 12l5 5l10 -10", "key": "svg-0" }]];
|
|
925
|
-
const IconCheck = createReactComponent("outline", "check", "Check", __iconNode$p);
|
|
926
|
-
/**
|
|
927
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
928
|
-
*
|
|
929
|
-
* This source code is licensed under the MIT license.
|
|
930
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
931
|
-
*/
|
|
932
|
-
const __iconNode$o = [["path", { "d": "M6 9l6 6l6 -6", "key": "svg-0" }]];
|
|
933
|
-
const IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode$o);
|
|
934
|
-
/**
|
|
935
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
936
|
-
*
|
|
937
|
-
* This source code is licensed under the MIT license.
|
|
938
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
939
|
-
*/
|
|
940
|
-
const __iconNode$n = [["path", { "d": "M15 6l-6 6l6 6", "key": "svg-0" }]];
|
|
941
|
-
const IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode$n);
|
|
942
|
-
/**
|
|
943
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
944
|
-
*
|
|
945
|
-
* This source code is licensed under the MIT license.
|
|
946
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
947
|
-
*/
|
|
948
|
-
const __iconNode$m = [["path", { "d": "M9 6l6 6l-6 6", "key": "svg-0" }]];
|
|
949
|
-
const IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode$m);
|
|
950
|
-
/**
|
|
951
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
952
|
-
*
|
|
953
|
-
* This source code is licensed under the MIT license.
|
|
954
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
955
|
-
*/
|
|
956
|
-
const __iconNode$l = [["path", { "d": "M6 15l6 -6l6 6", "key": "svg-0" }]];
|
|
957
|
-
const IconChevronUp = createReactComponent("outline", "chevron-up", "ChevronUp", __iconNode$l);
|
|
958
|
-
/**
|
|
959
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
960
|
-
*
|
|
961
|
-
* This source code is licensed under the MIT license.
|
|
962
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
963
|
-
*/
|
|
964
|
-
const __iconNode$k = [["path", { "d": "M11 7l-5 5l5 5", "key": "svg-0" }], ["path", { "d": "M17 7l-5 5l5 5", "key": "svg-1" }]];
|
|
965
|
-
const IconChevronsLeft = createReactComponent("outline", "chevrons-left", "ChevronsLeft", __iconNode$k);
|
|
966
|
-
/**
|
|
967
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
968
|
-
*
|
|
969
|
-
* This source code is licensed under the MIT license.
|
|
970
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
971
|
-
*/
|
|
972
|
-
const __iconNode$j = [["path", { "d": "M7 7l5 5l-5 5", "key": "svg-0" }], ["path", { "d": "M13 7l5 5l-5 5", "key": "svg-1" }]];
|
|
973
|
-
const IconChevronsRight = createReactComponent("outline", "chevrons-right", "ChevronsRight", __iconNode$j);
|
|
974
|
-
/**
|
|
975
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
976
|
-
*
|
|
977
|
-
* This source code is licensed under the MIT license.
|
|
978
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
979
|
-
*/
|
|
980
|
-
const __iconNode$i = [["path", { "d": "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "key": "svg-0" }], ["path", { "d": "M9 12l2 2l4 -4", "key": "svg-1" }]];
|
|
981
|
-
const IconCircleCheck = createReactComponent("outline", "circle-check", "CircleCheck", __iconNode$i);
|
|
982
|
-
/**
|
|
983
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
984
|
-
*
|
|
985
|
-
* This source code is licensed under the MIT license.
|
|
986
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
987
|
-
*/
|
|
988
|
-
const __iconNode$h = [["path", { "d": "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "key": "svg-0" }], ["path", { "d": "M10 10l4 4m0 -4l-4 4", "key": "svg-1" }]];
|
|
989
|
-
const IconCircleX = createReactComponent("outline", "circle-x", "CircleX", __iconNode$h);
|
|
990
|
-
/**
|
|
991
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
992
|
-
*
|
|
993
|
-
* This source code is licensed under the MIT license.
|
|
994
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
995
|
-
*/
|
|
996
|
-
const __iconNode$g = [["path", { "d": "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "key": "svg-0" }], ["path", { "d": "M12 7v5l3 3", "key": "svg-1" }]];
|
|
997
|
-
const IconClock = createReactComponent("outline", "clock", "Clock", __iconNode$g);
|
|
998
|
-
/**
|
|
999
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1000
|
-
*
|
|
1001
|
-
* This source code is licensed under the MIT license.
|
|
1002
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1003
|
-
*/
|
|
1004
|
-
const __iconNode$f = [["path", { "d": "M6 17.6l-2 -1.1v-2.5", "key": "svg-0" }], ["path", { "d": "M4 10v-2.5l2 -1.1", "key": "svg-1" }], ["path", { "d": "M10 4.1l2 -1.1l2 1.1", "key": "svg-2" }], ["path", { "d": "M18 6.4l2 1.1v2.5", "key": "svg-3" }], ["path", { "d": "M20 14v2.5l-2 1.12", "key": "svg-4" }], ["path", { "d": "M14 19.9l-2 1.1l-2 -1.1", "key": "svg-5" }], ["path", { "d": "M12 12l2 -1.1", "key": "svg-6" }], ["path", { "d": "M18 8.6l2 -1.1", "key": "svg-7" }], ["path", { "d": "M12 12l0 2.5", "key": "svg-8" }], ["path", { "d": "M12 18.5l0 2.5", "key": "svg-9" }], ["path", { "d": "M12 12l-2 -1.12", "key": "svg-10" }], ["path", { "d": "M6 8.6l-2 -1.1", "key": "svg-11" }]];
|
|
1005
|
-
const IconCube3dSphere = createReactComponent("outline", "cube-3d-sphere", "Cube3dSphere", __iconNode$f);
|
|
1006
|
-
/**
|
|
1007
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1008
|
-
*
|
|
1009
|
-
* This source code is licensed under the MIT license.
|
|
1010
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1011
|
-
*/
|
|
1012
|
-
const __iconNode$e = [["path", { "d": "M10.585 10.587a2 2 0 0 0 2.829 2.828", "key": "svg-0" }], ["path", { "d": "M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87", "key": "svg-1" }], ["path", { "d": "M3 3l18 18", "key": "svg-2" }]];
|
|
1013
|
-
const IconEyeOff = createReactComponent("outline", "eye-off", "EyeOff", __iconNode$e);
|
|
1014
|
-
/**
|
|
1015
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1016
|
-
*
|
|
1017
|
-
* This source code is licensed under the MIT license.
|
|
1018
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1019
|
-
*/
|
|
1020
|
-
const __iconNode$d = [["path", { "d": "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0", "key": "svg-0" }], ["path", { "d": "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6", "key": "svg-1" }]];
|
|
1021
|
-
const IconEye = createReactComponent("outline", "eye", "Eye", __iconNode$d);
|
|
1022
|
-
/**
|
|
1023
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1024
|
-
*
|
|
1025
|
-
* This source code is licensed under the MIT license.
|
|
1026
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1027
|
-
*/
|
|
1028
|
-
const __iconNode$c = [["path", { "d": "M14 3v4a1 1 0 0 0 1 1h4", "key": "svg-0" }], ["path", { "d": "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4", "key": "svg-1" }], ["path", { "d": "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6", "key": "svg-2" }], ["path", { "d": "M17 18h2", "key": "svg-3" }], ["path", { "d": "M20 15h-3v6", "key": "svg-4" }], ["path", { "d": "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z", "key": "svg-5" }]];
|
|
1029
|
-
const IconFileTypePdf = createReactComponent("outline", "file-type-pdf", "FileTypePdf", __iconNode$c);
|
|
1030
|
-
/**
|
|
1031
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1032
|
-
*
|
|
1033
|
-
* This source code is licensed under the MIT license.
|
|
1034
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1035
|
-
*/
|
|
1036
|
-
const __iconNode$b = [["path", { "d": "M14 3v4a1 1 0 0 0 1 1h4", "key": "svg-0" }], ["path", { "d": "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z", "key": "svg-1" }]];
|
|
1037
|
-
const IconFile = createReactComponent("outline", "file", "File", __iconNode$b);
|
|
1038
|
-
/**
|
|
1039
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1040
|
-
*
|
|
1041
|
-
* This source code is licensed under the MIT license.
|
|
1042
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1043
|
-
*/
|
|
1044
|
-
const __iconNode$a = [["path", { "d": "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "key": "svg-0" }], ["path", { "d": "M12 9h.01", "key": "svg-1" }], ["path", { "d": "M11 12h1v4h1", "key": "svg-2" }]];
|
|
1045
|
-
const IconInfoCircle = createReactComponent("outline", "info-circle", "InfoCircle", __iconNode$a);
|
|
1046
|
-
/**
|
|
1047
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1048
|
-
*
|
|
1049
|
-
* This source code is licensed under the MIT license.
|
|
1050
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1051
|
-
*/
|
|
1052
|
-
const __iconNode$9 = [["path", { "d": "M12 3a9 9 0 1 0 9 9", "key": "svg-0" }]];
|
|
1053
|
-
const IconLoader2 = createReactComponent("outline", "loader-2", "Loader2", __iconNode$9);
|
|
1054
|
-
/**
|
|
1055
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1056
|
-
*
|
|
1057
|
-
* This source code is licensed under the MIT license.
|
|
1058
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1059
|
-
*/
|
|
1060
|
-
const __iconNode$8 = [["path", { "d": "M5 12l14 0", "key": "svg-0" }]];
|
|
1061
|
-
const IconMinus = createReactComponent("outline", "minus", "Minus", __iconNode$8);
|
|
1062
|
-
/**
|
|
1063
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1064
|
-
*
|
|
1065
|
-
* This source code is licensed under the MIT license.
|
|
1066
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1067
|
-
*/
|
|
1068
|
-
const __iconNode$7 = [["path", { "d": "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z", "key": "svg-0" }]];
|
|
1069
|
-
const IconMoon = createReactComponent("outline", "moon", "Moon", __iconNode$7);
|
|
1070
|
-
/**
|
|
1071
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1072
|
-
*
|
|
1073
|
-
* This source code is licensed under the MIT license.
|
|
1074
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1075
|
-
*/
|
|
1076
|
-
const __iconNode$6 = [["path", { "d": "M15 8h.01", "key": "svg-0" }], ["path", { "d": "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z", "key": "svg-1" }], ["path", { "d": "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5", "key": "svg-2" }], ["path", { "d": "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3", "key": "svg-3" }]];
|
|
1077
|
-
const IconPhoto = createReactComponent("outline", "photo", "Photo", __iconNode$6);
|
|
1078
|
-
/**
|
|
1079
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1080
|
-
*
|
|
1081
|
-
* This source code is licensed under the MIT license.
|
|
1082
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1083
|
-
*/
|
|
1084
|
-
const __iconNode$5 = [["path", { "d": "M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5", "key": "svg-0" }]];
|
|
1085
|
-
const IconRotateClockwise = createReactComponent("outline", "rotate-clockwise", "RotateClockwise", __iconNode$5);
|
|
1086
|
-
/**
|
|
1087
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1088
|
-
*
|
|
1089
|
-
* This source code is licensed under the MIT license.
|
|
1090
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1091
|
-
*/
|
|
1092
|
-
const __iconNode$4 = [["path", { "d": "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", "key": "svg-0" }], ["path", { "d": "M21 21l-6 -6", "key": "svg-1" }]];
|
|
1093
|
-
const IconSearch = createReactComponent("outline", "search", "Search", __iconNode$4);
|
|
1094
|
-
/**
|
|
1095
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1096
|
-
*
|
|
1097
|
-
* This source code is licensed under the MIT license.
|
|
1098
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1099
|
-
*/
|
|
1100
|
-
const __iconNode$3 = [["path", { "d": "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", "key": "svg-0" }], ["path", { "d": "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7", "key": "svg-1" }]];
|
|
1101
|
-
const IconSun = createReactComponent("outline", "sun", "Sun", __iconNode$3);
|
|
1102
|
-
/**
|
|
1103
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1104
|
-
*
|
|
1105
|
-
* This source code is licensed under the MIT license.
|
|
1106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1107
|
-
*/
|
|
1108
|
-
const __iconNode$2 = [["path", { "d": "M4 7l16 0", "key": "svg-0" }], ["path", { "d": "M10 11l0 6", "key": "svg-1" }], ["path", { "d": "M14 11l0 6", "key": "svg-2" }], ["path", { "d": "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12", "key": "svg-3" }], ["path", { "d": "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3", "key": "svg-4" }]];
|
|
1109
|
-
const IconTrash = createReactComponent("outline", "trash", "Trash", __iconNode$2);
|
|
1110
|
-
/**
|
|
1111
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1112
|
-
*
|
|
1113
|
-
* This source code is licensed under the MIT license.
|
|
1114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1115
|
-
*/
|
|
1116
|
-
const __iconNode$1 = [["path", { "d": "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2", "key": "svg-0" }], ["path", { "d": "M7 9l5 -5l5 5", "key": "svg-1" }], ["path", { "d": "M12 4l0 12", "key": "svg-2" }]];
|
|
1117
|
-
const IconUpload = createReactComponent("outline", "upload", "Upload", __iconNode$1);
|
|
1118
|
-
/**
|
|
1119
|
-
* @license @tabler/icons-react v3.35.0 - MIT
|
|
1120
|
-
*
|
|
1121
|
-
* This source code is licensed under the MIT license.
|
|
1122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1123
|
-
*/
|
|
1124
|
-
const __iconNode = [["path", { "d": "M18 6l-12 12", "key": "svg-0" }], ["path", { "d": "M6 6l12 12", "key": "svg-1" }]];
|
|
1125
|
-
const IconX = createReactComponent("outline", "x", "X", __iconNode);
|
|
1126
840
|
function AccordionCard({
|
|
1127
841
|
title,
|
|
1128
842
|
children,
|
|
@@ -1283,6 +997,149 @@ const ActionDropdown = forwardRef(
|
|
|
1283
997
|
}
|
|
1284
998
|
);
|
|
1285
999
|
ActionDropdown.displayName = "ActionDropdown";
|
|
1000
|
+
const IconCheck = ({ size = 24, stroke = 2, ...props }) => {
|
|
1001
|
+
return /* @__PURE__ */ jsxs(
|
|
1002
|
+
"svg",
|
|
1003
|
+
{
|
|
1004
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1005
|
+
width: size,
|
|
1006
|
+
height: size,
|
|
1007
|
+
viewBox: "0 0 24 24",
|
|
1008
|
+
fill: "none",
|
|
1009
|
+
stroke: "currentColor",
|
|
1010
|
+
strokeWidth: stroke,
|
|
1011
|
+
strokeLinecap: "round",
|
|
1012
|
+
strokeLinejoin: "round",
|
|
1013
|
+
...props,
|
|
1014
|
+
children: [
|
|
1015
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1016
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12l5 5l10 -10" })
|
|
1017
|
+
]
|
|
1018
|
+
}
|
|
1019
|
+
);
|
|
1020
|
+
};
|
|
1021
|
+
const IconInfoCircle = ({ size = 24, stroke = 2, ...props }) => {
|
|
1022
|
+
return /* @__PURE__ */ jsxs(
|
|
1023
|
+
"svg",
|
|
1024
|
+
{
|
|
1025
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1026
|
+
width: size,
|
|
1027
|
+
height: size,
|
|
1028
|
+
viewBox: "0 0 24 24",
|
|
1029
|
+
fill: "none",
|
|
1030
|
+
stroke: "currentColor",
|
|
1031
|
+
strokeWidth: stroke,
|
|
1032
|
+
strokeLinecap: "round",
|
|
1033
|
+
strokeLinejoin: "round",
|
|
1034
|
+
...props,
|
|
1035
|
+
children: [
|
|
1036
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1037
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" }),
|
|
1038
|
+
/* @__PURE__ */ jsx("path", { d: "M12 9h.01" }),
|
|
1039
|
+
/* @__PURE__ */ jsx("path", { d: "M11 12h1v4h1" })
|
|
1040
|
+
]
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
};
|
|
1044
|
+
const IconAlertTriangle = ({ size = 24, stroke = 2, ...props }) => {
|
|
1045
|
+
return /* @__PURE__ */ jsxs(
|
|
1046
|
+
"svg",
|
|
1047
|
+
{
|
|
1048
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1049
|
+
width: size,
|
|
1050
|
+
height: size,
|
|
1051
|
+
viewBox: "0 0 24 24",
|
|
1052
|
+
fill: "none",
|
|
1053
|
+
stroke: "currentColor",
|
|
1054
|
+
strokeWidth: stroke,
|
|
1055
|
+
strokeLinecap: "round",
|
|
1056
|
+
strokeLinejoin: "round",
|
|
1057
|
+
...props,
|
|
1058
|
+
children: [
|
|
1059
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1060
|
+
/* @__PURE__ */ jsx("path", { d: "M12 9v4" }),
|
|
1061
|
+
/* @__PURE__ */ jsx("path", { d: "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z" }),
|
|
1062
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16h.01" })
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
);
|
|
1066
|
+
};
|
|
1067
|
+
const IconX = ({ size = 24, stroke = 2, ...props }) => {
|
|
1068
|
+
return /* @__PURE__ */ jsxs(
|
|
1069
|
+
"svg",
|
|
1070
|
+
{
|
|
1071
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1072
|
+
width: size,
|
|
1073
|
+
height: size,
|
|
1074
|
+
viewBox: "0 0 24 24",
|
|
1075
|
+
fill: "none",
|
|
1076
|
+
stroke: "currentColor",
|
|
1077
|
+
strokeWidth: stroke,
|
|
1078
|
+
strokeLinecap: "round",
|
|
1079
|
+
strokeLinejoin: "round",
|
|
1080
|
+
...props,
|
|
1081
|
+
children: [
|
|
1082
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1083
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6l-12 12" }),
|
|
1084
|
+
/* @__PURE__ */ jsx("path", { d: "M6 6l12 12" })
|
|
1085
|
+
]
|
|
1086
|
+
}
|
|
1087
|
+
);
|
|
1088
|
+
};
|
|
1089
|
+
const IconAlertCircle = ({ size = 24, stroke = 2, ...props }) => {
|
|
1090
|
+
return /* @__PURE__ */ jsxs(
|
|
1091
|
+
"svg",
|
|
1092
|
+
{
|
|
1093
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1094
|
+
width: size,
|
|
1095
|
+
height: size,
|
|
1096
|
+
viewBox: "0 0 24 24",
|
|
1097
|
+
fill: "none",
|
|
1098
|
+
stroke: "currentColor",
|
|
1099
|
+
strokeWidth: stroke,
|
|
1100
|
+
strokeLinecap: "round",
|
|
1101
|
+
strokeLinejoin: "round",
|
|
1102
|
+
...props,
|
|
1103
|
+
children: [
|
|
1104
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1105
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" }),
|
|
1106
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8v4" }),
|
|
1107
|
+
/* @__PURE__ */ jsx("path", { d: "M12 16h.01" })
|
|
1108
|
+
]
|
|
1109
|
+
}
|
|
1110
|
+
);
|
|
1111
|
+
};
|
|
1112
|
+
const Icon3dCubeSphere = ({ size = 24, stroke = 2, ...props }) => {
|
|
1113
|
+
return /* @__PURE__ */ jsxs(
|
|
1114
|
+
"svg",
|
|
1115
|
+
{
|
|
1116
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1117
|
+
width: size,
|
|
1118
|
+
height: size,
|
|
1119
|
+
viewBox: "0 0 24 24",
|
|
1120
|
+
fill: "none",
|
|
1121
|
+
stroke: "currentColor",
|
|
1122
|
+
strokeWidth: stroke,
|
|
1123
|
+
strokeLinecap: "round",
|
|
1124
|
+
strokeLinejoin: "round",
|
|
1125
|
+
...props,
|
|
1126
|
+
children: [
|
|
1127
|
+
/* @__PURE__ */ jsx("path", { d: "M6 17.6l-2 -1.1v-2.5" }),
|
|
1128
|
+
/* @__PURE__ */ jsx("path", { d: "M4 10v-2.5l2 -1.1" }),
|
|
1129
|
+
/* @__PURE__ */ jsx("path", { d: "M10 4.1l2 -1.1l2 1.1" }),
|
|
1130
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6.4l2 1.1v2.5" }),
|
|
1131
|
+
/* @__PURE__ */ jsx("path", { d: "M20 14v2.5l-2 1.12" }),
|
|
1132
|
+
/* @__PURE__ */ jsx("path", { d: "M14 19.9l-2 1.1l-2 -1.1" }),
|
|
1133
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12l2 -1.1" }),
|
|
1134
|
+
/* @__PURE__ */ jsx("path", { d: "M18 8.6l2 -1.1" }),
|
|
1135
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12l0 2.5" }),
|
|
1136
|
+
/* @__PURE__ */ jsx("path", { d: "M12 18.5l0 2.5" }),
|
|
1137
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12l-2 -1.12" }),
|
|
1138
|
+
/* @__PURE__ */ jsx("path", { d: "M6 8.6l-2 -1.1" })
|
|
1139
|
+
]
|
|
1140
|
+
}
|
|
1141
|
+
);
|
|
1142
|
+
};
|
|
1286
1143
|
function Alert(props) {
|
|
1287
1144
|
const {
|
|
1288
1145
|
variant = "info",
|
|
@@ -1295,7 +1152,7 @@ function Alert(props) {
|
|
|
1295
1152
|
className = ""
|
|
1296
1153
|
} = props;
|
|
1297
1154
|
const ICON_MAP = {
|
|
1298
|
-
neutral: /* @__PURE__ */ jsx(
|
|
1155
|
+
neutral: /* @__PURE__ */ jsx(Icon3dCubeSphere, { size: 20 }),
|
|
1299
1156
|
info: /* @__PURE__ */ jsx(IconInfoCircle, { size: 20 }),
|
|
1300
1157
|
success: /* @__PURE__ */ jsx(IconCheck, { size: 20 }),
|
|
1301
1158
|
caution: /* @__PURE__ */ jsx(IconAlertTriangle, { size: 20 }),
|
|
@@ -1527,6 +1384,27 @@ function Card({
|
|
|
1527
1384
|
variant === "horizontal" && finalMediaPosition === "right" && renderMedia()
|
|
1528
1385
|
] });
|
|
1529
1386
|
}
|
|
1387
|
+
const IconChevronRight = ({ size = 24, stroke = 2, ...props }) => {
|
|
1388
|
+
return /* @__PURE__ */ jsxs(
|
|
1389
|
+
"svg",
|
|
1390
|
+
{
|
|
1391
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1392
|
+
width: size,
|
|
1393
|
+
height: size,
|
|
1394
|
+
viewBox: "0 0 24 24",
|
|
1395
|
+
fill: "none",
|
|
1396
|
+
stroke: "currentColor",
|
|
1397
|
+
strokeWidth: stroke,
|
|
1398
|
+
strokeLinecap: "round",
|
|
1399
|
+
strokeLinejoin: "round",
|
|
1400
|
+
...props,
|
|
1401
|
+
children: [
|
|
1402
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1403
|
+
/* @__PURE__ */ jsx("path", { d: "M9 6l6 6l-6 6" })
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
);
|
|
1407
|
+
};
|
|
1530
1408
|
function Breadcrumb({
|
|
1531
1409
|
items,
|
|
1532
1410
|
separator = /* @__PURE__ */ jsx(IconChevronRight, { size: 14 }),
|
|
@@ -1767,6 +1645,27 @@ function CircleProgressBar({
|
|
|
1767
1645
|
}
|
|
1768
1646
|
) });
|
|
1769
1647
|
}
|
|
1648
|
+
const IconMinus = ({ size = 24, stroke = 2, ...props }) => {
|
|
1649
|
+
return /* @__PURE__ */ jsxs(
|
|
1650
|
+
"svg",
|
|
1651
|
+
{
|
|
1652
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1653
|
+
width: size,
|
|
1654
|
+
height: size,
|
|
1655
|
+
viewBox: "0 0 24 24",
|
|
1656
|
+
fill: "none",
|
|
1657
|
+
stroke: "currentColor",
|
|
1658
|
+
strokeWidth: stroke,
|
|
1659
|
+
strokeLinecap: "round",
|
|
1660
|
+
strokeLinejoin: "round",
|
|
1661
|
+
...props,
|
|
1662
|
+
children: [
|
|
1663
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
1664
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12l14 0" })
|
|
1665
|
+
]
|
|
1666
|
+
}
|
|
1667
|
+
);
|
|
1668
|
+
};
|
|
1770
1669
|
function Checkbox({
|
|
1771
1670
|
id,
|
|
1772
1671
|
label,
|
|
@@ -1829,67 +1728,69 @@ function Checkbox({
|
|
|
1829
1728
|
] });
|
|
1830
1729
|
}
|
|
1831
1730
|
function c(e, u, c2, i2) {
|
|
1832
|
-
var
|
|
1833
|
-
|
|
1834
|
-
var
|
|
1731
|
+
var l2 = this, a = useRef(null), o = useRef(0), f = useRef(0), v = useRef(null), d = useRef([]), m = useRef(), s = useRef(), g = useRef(e), h = useRef(true), x = useRef(), E = useRef();
|
|
1732
|
+
g.current = e;
|
|
1733
|
+
var b = "undefined" != typeof window, p = !u && 0 !== u && b;
|
|
1835
1734
|
if ("function" != typeof e) throw new TypeError("Expected a function");
|
|
1836
1735
|
u = +u || 0;
|
|
1837
|
-
var
|
|
1838
|
-
useEffect(function() {
|
|
1839
|
-
return w.current = true, function() {
|
|
1840
|
-
w.current = false;
|
|
1841
|
-
};
|
|
1842
|
-
}, []);
|
|
1843
|
-
var T = useMemo(function() {
|
|
1736
|
+
var y = !!(c2 = c2 || {}).leading, w = !("trailing" in c2) || !!c2.trailing, O = !!c2.flushOnExit && w, F = "maxWait" in c2, L = "debounceOnServer" in c2 && !!c2.debounceOnServer, A = F ? Math.max(+c2.maxWait || 0, u) : null, D = useMemo(function() {
|
|
1844
1737
|
var r2 = function(r3) {
|
|
1845
|
-
var n2 =
|
|
1846
|
-
return
|
|
1738
|
+
var n2 = d.current, t2 = m.current;
|
|
1739
|
+
return d.current = m.current = null, o.current = r3, f.current = f.current || r3, s.current = g.current.apply(t2, n2);
|
|
1847
1740
|
}, n = function(r3, n2) {
|
|
1848
|
-
|
|
1741
|
+
p && cancelAnimationFrame(v.current), v.current = p ? requestAnimationFrame(r3) : setTimeout(r3, n2);
|
|
1849
1742
|
}, t = function(r3) {
|
|
1850
|
-
if (!
|
|
1851
|
-
var n2 = r3 -
|
|
1852
|
-
return !
|
|
1743
|
+
if (!h.current) return false;
|
|
1744
|
+
var n2 = r3 - a.current;
|
|
1745
|
+
return !a.current || n2 >= u || n2 < 0 || F && r3 - o.current >= A;
|
|
1853
1746
|
}, e2 = function(n2) {
|
|
1854
|
-
return v.current = null,
|
|
1747
|
+
return v.current = null, w && d.current ? r2(n2) : (d.current = m.current = null, s.current);
|
|
1855
1748
|
}, c3 = function r3() {
|
|
1856
1749
|
var c4 = Date.now();
|
|
1857
|
-
if (
|
|
1858
|
-
if (
|
|
1859
|
-
var i3 = u - (c4 -
|
|
1860
|
-
n(r3,
|
|
1750
|
+
if (y && f.current === o.current && D2(), t(c4)) return e2(c4);
|
|
1751
|
+
if (h.current) {
|
|
1752
|
+
var i3 = u - (c4 - a.current), l3 = F ? Math.min(i3, A - (c4 - o.current)) : i3;
|
|
1753
|
+
n(r3, l3);
|
|
1861
1754
|
}
|
|
1862
|
-
},
|
|
1755
|
+
}, D2 = function() {
|
|
1863
1756
|
i2 && i2({});
|
|
1864
|
-
},
|
|
1865
|
-
if (
|
|
1866
|
-
var e3 = Date.now(),
|
|
1867
|
-
if (
|
|
1868
|
-
|
|
1869
|
-
|
|
1757
|
+
}, S = function() {
|
|
1758
|
+
if (b || L) {
|
|
1759
|
+
var e3, i3 = Date.now(), f2 = t(i3);
|
|
1760
|
+
if (d.current = [].slice.call(arguments), m.current = l2, a.current = i3, O && !x.current && (x.current = function() {
|
|
1761
|
+
var r3;
|
|
1762
|
+
"hidden" === (null == (r3 = global.document) ? void 0 : r3.visibilityState) && E.current.flush();
|
|
1763
|
+
}, null == (e3 = global.document) || null == e3.addEventListener || e3.addEventListener("visibilitychange", x.current)), f2) {
|
|
1764
|
+
if (!v.current && h.current) return o.current = a.current, n(c3, u), y ? r2(a.current) : s.current;
|
|
1765
|
+
if (F) return n(c3, u), r2(a.current);
|
|
1870
1766
|
}
|
|
1871
|
-
return v.current || n(c3, u),
|
|
1767
|
+
return v.current || n(c3, u), s.current;
|
|
1872
1768
|
}
|
|
1873
1769
|
};
|
|
1874
|
-
return
|
|
1770
|
+
return S.cancel = function() {
|
|
1875
1771
|
var r3 = v.current;
|
|
1876
|
-
r3 && (
|
|
1877
|
-
},
|
|
1772
|
+
r3 && (p ? cancelAnimationFrame(v.current) : clearTimeout(v.current)), o.current = 0, d.current = a.current = m.current = v.current = null, r3 && i2 && i2({});
|
|
1773
|
+
}, S.isPending = function() {
|
|
1878
1774
|
return !!v.current;
|
|
1879
|
-
},
|
|
1880
|
-
return v.current ? e2(Date.now()) :
|
|
1881
|
-
},
|
|
1882
|
-
}, [
|
|
1883
|
-
return
|
|
1775
|
+
}, S.flush = function() {
|
|
1776
|
+
return v.current ? e2(Date.now()) : s.current;
|
|
1777
|
+
}, S;
|
|
1778
|
+
}, [y, F, u, A, w, O, p, b, L, i2]);
|
|
1779
|
+
return E.current = D, useEffect(function() {
|
|
1780
|
+
return h.current = true, function() {
|
|
1781
|
+
var r2;
|
|
1782
|
+
O && E.current.flush(), x.current && (null == (r2 = global.document) || null == r2.removeEventListener || r2.removeEventListener("visibilitychange", x.current), x.current = null), h.current = false;
|
|
1783
|
+
};
|
|
1784
|
+
}, [O]), D;
|
|
1884
1785
|
}
|
|
1885
1786
|
function i(r2, n) {
|
|
1886
1787
|
return r2 === n;
|
|
1887
1788
|
}
|
|
1888
|
-
function
|
|
1889
|
-
var
|
|
1890
|
-
|
|
1891
|
-
}, [
|
|
1892
|
-
return
|
|
1789
|
+
function l(n, t, l2) {
|
|
1790
|
+
var a = i, o = useRef(n), f = useState({})[1], v = c(useCallback(function(r2) {
|
|
1791
|
+
o.current = r2, f({});
|
|
1792
|
+
}, [f]), t, l2, f), d = useRef(n);
|
|
1793
|
+
return a(d.current, n) || (v(n), d.current = n), [o.current, v];
|
|
1893
1794
|
}
|
|
1894
1795
|
const HTML_ENTITIES = {
|
|
1895
1796
|
"&": "&",
|
|
@@ -2139,7 +2040,7 @@ function TextField({
|
|
|
2139
2040
|
return value;
|
|
2140
2041
|
};
|
|
2141
2042
|
const [inner, setInner] = useState(getInitialValue());
|
|
2142
|
-
const [debounced] =
|
|
2043
|
+
const [debounced] = l(inner, debounce);
|
|
2143
2044
|
const isFirstRun = useRef(true);
|
|
2144
2045
|
useEffect(() => {
|
|
2145
2046
|
let newValue = value;
|
|
@@ -2368,6 +2269,27 @@ function Divider({
|
|
|
2368
2269
|
);
|
|
2369
2270
|
return /* @__PURE__ */ jsx("hr", { className: dividerClasses });
|
|
2370
2271
|
}
|
|
2272
|
+
const IconChevronDown = ({ size = 24, stroke = 2, ...props }) => {
|
|
2273
|
+
return /* @__PURE__ */ jsxs(
|
|
2274
|
+
"svg",
|
|
2275
|
+
{
|
|
2276
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2277
|
+
width: size,
|
|
2278
|
+
height: size,
|
|
2279
|
+
viewBox: "0 0 24 24",
|
|
2280
|
+
fill: "none",
|
|
2281
|
+
stroke: "currentColor",
|
|
2282
|
+
strokeWidth: stroke,
|
|
2283
|
+
strokeLinecap: "round",
|
|
2284
|
+
strokeLinejoin: "round",
|
|
2285
|
+
...props,
|
|
2286
|
+
children: [
|
|
2287
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
2288
|
+
/* @__PURE__ */ jsx("path", { d: "M6 9l6 6l6 -6" })
|
|
2289
|
+
]
|
|
2290
|
+
}
|
|
2291
|
+
);
|
|
2292
|
+
};
|
|
2371
2293
|
function BasicDropdown({
|
|
2372
2294
|
trigger,
|
|
2373
2295
|
content,
|
|
@@ -2479,6 +2401,54 @@ function BasicDropdown({
|
|
|
2479
2401
|
)
|
|
2480
2402
|
] });
|
|
2481
2403
|
}
|
|
2404
|
+
const IconUpload = ({ size = 24, stroke = 2, ...props }) => {
|
|
2405
|
+
return /* @__PURE__ */ jsxs(
|
|
2406
|
+
"svg",
|
|
2407
|
+
{
|
|
2408
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2409
|
+
width: size,
|
|
2410
|
+
height: size,
|
|
2411
|
+
viewBox: "0 0 24 24",
|
|
2412
|
+
fill: "none",
|
|
2413
|
+
stroke: "currentColor",
|
|
2414
|
+
strokeWidth: stroke,
|
|
2415
|
+
strokeLinecap: "round",
|
|
2416
|
+
strokeLinejoin: "round",
|
|
2417
|
+
...props,
|
|
2418
|
+
children: [
|
|
2419
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
2420
|
+
/* @__PURE__ */ jsx("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }),
|
|
2421
|
+
/* @__PURE__ */ jsx("path", { d: "M7 9l5 -5l5 5" }),
|
|
2422
|
+
/* @__PURE__ */ jsx("path", { d: "M12 4l0 12" })
|
|
2423
|
+
]
|
|
2424
|
+
}
|
|
2425
|
+
);
|
|
2426
|
+
};
|
|
2427
|
+
const IconTrash = ({ size = 24, stroke = 2, ...props }) => {
|
|
2428
|
+
return /* @__PURE__ */ jsxs(
|
|
2429
|
+
"svg",
|
|
2430
|
+
{
|
|
2431
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2432
|
+
width: size,
|
|
2433
|
+
height: size,
|
|
2434
|
+
viewBox: "0 0 24 24",
|
|
2435
|
+
fill: "none",
|
|
2436
|
+
stroke: "currentColor",
|
|
2437
|
+
strokeWidth: stroke,
|
|
2438
|
+
strokeLinecap: "round",
|
|
2439
|
+
strokeLinejoin: "round",
|
|
2440
|
+
...props,
|
|
2441
|
+
children: [
|
|
2442
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
2443
|
+
/* @__PURE__ */ jsx("path", { d: "M4 7l16 0" }),
|
|
2444
|
+
/* @__PURE__ */ jsx("path", { d: "M10 11l0 6" }),
|
|
2445
|
+
/* @__PURE__ */ jsx("path", { d: "M14 11l0 6" }),
|
|
2446
|
+
/* @__PURE__ */ jsx("path", { d: "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" }),
|
|
2447
|
+
/* @__PURE__ */ jsx("path", { d: "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" })
|
|
2448
|
+
]
|
|
2449
|
+
}
|
|
2450
|
+
);
|
|
2451
|
+
};
|
|
2482
2452
|
const ALLOWED_MIME_TYPES = {
|
|
2483
2453
|
// Documents
|
|
2484
2454
|
"application/pdf": [".pdf"],
|
|
@@ -2722,6 +2692,71 @@ async function validateMagicNumber(file, expectedMimeType) {
|
|
|
2722
2692
|
reader.readAsArrayBuffer(file.slice(0, HEADER_BYTES));
|
|
2723
2693
|
});
|
|
2724
2694
|
}
|
|
2695
|
+
const IconRotateClockwise = ({ size = 24, stroke = 2, ...props }) => {
|
|
2696
|
+
return /* @__PURE__ */ jsxs(
|
|
2697
|
+
"svg",
|
|
2698
|
+
{
|
|
2699
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2700
|
+
width: size,
|
|
2701
|
+
height: size,
|
|
2702
|
+
viewBox: "0 0 24 24",
|
|
2703
|
+
fill: "none",
|
|
2704
|
+
stroke: "currentColor",
|
|
2705
|
+
strokeWidth: stroke,
|
|
2706
|
+
strokeLinecap: "round",
|
|
2707
|
+
strokeLinejoin: "round",
|
|
2708
|
+
...props,
|
|
2709
|
+
children: [
|
|
2710
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
2711
|
+
/* @__PURE__ */ jsx("path", { d: "M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5" })
|
|
2712
|
+
]
|
|
2713
|
+
}
|
|
2714
|
+
);
|
|
2715
|
+
};
|
|
2716
|
+
const IconCircleX = ({ size = 24, stroke = 2, ...props }) => {
|
|
2717
|
+
return /* @__PURE__ */ jsxs(
|
|
2718
|
+
"svg",
|
|
2719
|
+
{
|
|
2720
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2721
|
+
width: size,
|
|
2722
|
+
height: size,
|
|
2723
|
+
viewBox: "0 0 24 24",
|
|
2724
|
+
fill: "none",
|
|
2725
|
+
stroke: "currentColor",
|
|
2726
|
+
strokeWidth: stroke,
|
|
2727
|
+
strokeLinecap: "round",
|
|
2728
|
+
strokeLinejoin: "round",
|
|
2729
|
+
...props,
|
|
2730
|
+
children: [
|
|
2731
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
2732
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
|
|
2733
|
+
/* @__PURE__ */ jsx("path", { d: "M10 10l4 4m0 -4l-4 4" })
|
|
2734
|
+
]
|
|
2735
|
+
}
|
|
2736
|
+
);
|
|
2737
|
+
};
|
|
2738
|
+
const IconCircleCheck = ({ size = 24, stroke = 2, ...props }) => {
|
|
2739
|
+
return /* @__PURE__ */ jsxs(
|
|
2740
|
+
"svg",
|
|
2741
|
+
{
|
|
2742
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2743
|
+
width: size,
|
|
2744
|
+
height: size,
|
|
2745
|
+
viewBox: "0 0 24 24",
|
|
2746
|
+
fill: "none",
|
|
2747
|
+
stroke: "currentColor",
|
|
2748
|
+
strokeWidth: stroke,
|
|
2749
|
+
strokeLinecap: "round",
|
|
2750
|
+
strokeLinejoin: "round",
|
|
2751
|
+
...props,
|
|
2752
|
+
children: [
|
|
2753
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
2754
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }),
|
|
2755
|
+
/* @__PURE__ */ jsx("path", { d: "M9 12l2 2l4 -4" })
|
|
2756
|
+
]
|
|
2757
|
+
}
|
|
2758
|
+
);
|
|
2759
|
+
};
|
|
2725
2760
|
function FileUpload({
|
|
2726
2761
|
label,
|
|
2727
2762
|
title = "Unggah File",
|
|
@@ -2995,7 +3030,7 @@ function FileUpload({
|
|
|
2995
3030
|
children: [
|
|
2996
3031
|
/* @__PURE__ */ jsxs("div", { className: "ina-file-upload__file-indicator", children: [
|
|
2997
3032
|
uploadedFile.status === "uploading" && /* @__PURE__ */ jsx("div", { className: "ina-file-upload__file-icon-wrapper ina-file-upload__file-icon-wrapper--uploading", children: /* @__PURE__ */ jsx(
|
|
2998
|
-
|
|
3033
|
+
IconRotateClockwise,
|
|
2999
3034
|
{
|
|
3000
3035
|
size: 20,
|
|
3001
3036
|
className: "ina-file-upload__file-icon--spinning"
|
|
@@ -3113,6 +3148,78 @@ function FileUpload({
|
|
|
3113
3148
|
] }, index)) })
|
|
3114
3149
|
] });
|
|
3115
3150
|
}
|
|
3151
|
+
const IconFile = ({ size = 24, stroke = 2, ...props }) => {
|
|
3152
|
+
return /* @__PURE__ */ jsxs(
|
|
3153
|
+
"svg",
|
|
3154
|
+
{
|
|
3155
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3156
|
+
width: size,
|
|
3157
|
+
height: size,
|
|
3158
|
+
viewBox: "0 0 24 24",
|
|
3159
|
+
fill: "none",
|
|
3160
|
+
stroke: "currentColor",
|
|
3161
|
+
strokeWidth: stroke,
|
|
3162
|
+
strokeLinecap: "round",
|
|
3163
|
+
strokeLinejoin: "round",
|
|
3164
|
+
...props,
|
|
3165
|
+
children: [
|
|
3166
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
3167
|
+
/* @__PURE__ */ jsx("path", { d: "M14 3v4a1 1 0 0 0 1 1h4" }),
|
|
3168
|
+
/* @__PURE__ */ jsx("path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" })
|
|
3169
|
+
]
|
|
3170
|
+
}
|
|
3171
|
+
);
|
|
3172
|
+
};
|
|
3173
|
+
const IconFileTypePdf = ({ size = 24, stroke = 2, ...props }) => {
|
|
3174
|
+
return /* @__PURE__ */ jsxs(
|
|
3175
|
+
"svg",
|
|
3176
|
+
{
|
|
3177
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3178
|
+
width: size,
|
|
3179
|
+
height: size,
|
|
3180
|
+
viewBox: "0 0 24 24",
|
|
3181
|
+
fill: "none",
|
|
3182
|
+
stroke: "currentColor",
|
|
3183
|
+
strokeWidth: stroke,
|
|
3184
|
+
strokeLinecap: "round",
|
|
3185
|
+
strokeLinejoin: "round",
|
|
3186
|
+
...props,
|
|
3187
|
+
children: [
|
|
3188
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
3189
|
+
/* @__PURE__ */ jsx("path", { d: "M14 3v4a1 1 0 0 0 1 1h4" }),
|
|
3190
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" }),
|
|
3191
|
+
/* @__PURE__ */ jsx("path", { d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6" }),
|
|
3192
|
+
/* @__PURE__ */ jsx("path", { d: "M17 18h2" }),
|
|
3193
|
+
/* @__PURE__ */ jsx("path", { d: "M20 15h-3v6" }),
|
|
3194
|
+
/* @__PURE__ */ jsx("path", { d: "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" })
|
|
3195
|
+
]
|
|
3196
|
+
}
|
|
3197
|
+
);
|
|
3198
|
+
};
|
|
3199
|
+
const IconPhoto = ({ size = 24, stroke = 2, ...props }) => {
|
|
3200
|
+
return /* @__PURE__ */ jsxs(
|
|
3201
|
+
"svg",
|
|
3202
|
+
{
|
|
3203
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3204
|
+
width: size,
|
|
3205
|
+
height: size,
|
|
3206
|
+
viewBox: "0 0 24 24",
|
|
3207
|
+
fill: "none",
|
|
3208
|
+
stroke: "currentColor",
|
|
3209
|
+
strokeWidth: stroke,
|
|
3210
|
+
strokeLinecap: "round",
|
|
3211
|
+
strokeLinejoin: "round",
|
|
3212
|
+
...props,
|
|
3213
|
+
children: [
|
|
3214
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
3215
|
+
/* @__PURE__ */ jsx("path", { d: "M15 8h.01" }),
|
|
3216
|
+
/* @__PURE__ */ jsx("path", { d: "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12" }),
|
|
3217
|
+
/* @__PURE__ */ jsx("path", { d: "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5" }),
|
|
3218
|
+
/* @__PURE__ */ jsx("path", { d: "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3" })
|
|
3219
|
+
]
|
|
3220
|
+
}
|
|
3221
|
+
);
|
|
3222
|
+
};
|
|
3116
3223
|
function SingleFileUpload({
|
|
3117
3224
|
title = "Unggah File",
|
|
3118
3225
|
description = "Description",
|
|
@@ -3511,6 +3618,28 @@ function FieldInputTable({
|
|
|
3511
3618
|
] })
|
|
3512
3619
|
] });
|
|
3513
3620
|
}
|
|
3621
|
+
const IconSearch = ({ size = 24, stroke = 2, ...props }) => {
|
|
3622
|
+
return /* @__PURE__ */ jsxs(
|
|
3623
|
+
"svg",
|
|
3624
|
+
{
|
|
3625
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3626
|
+
width: size,
|
|
3627
|
+
height: size,
|
|
3628
|
+
viewBox: "0 0 24 24",
|
|
3629
|
+
fill: "none",
|
|
3630
|
+
stroke: "currentColor",
|
|
3631
|
+
strokeWidth: stroke,
|
|
3632
|
+
strokeLinecap: "round",
|
|
3633
|
+
strokeLinejoin: "round",
|
|
3634
|
+
...props,
|
|
3635
|
+
children: [
|
|
3636
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
3637
|
+
/* @__PURE__ */ jsx("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }),
|
|
3638
|
+
/* @__PURE__ */ jsx("path", { d: "M21 21l-6 -6" })
|
|
3639
|
+
]
|
|
3640
|
+
}
|
|
3641
|
+
);
|
|
3642
|
+
};
|
|
3514
3643
|
function onlyDecimalNumber(event, ...ignore) {
|
|
3515
3644
|
const ASCIICode = event.which ? event.which : event.keyCode;
|
|
3516
3645
|
const key = event.key;
|
|
@@ -3586,7 +3715,7 @@ function InputSearch({
|
|
|
3586
3715
|
disabled = false
|
|
3587
3716
|
}) {
|
|
3588
3717
|
const [inputValue, setInputValue] = useState(value);
|
|
3589
|
-
const [debouncedValue] =
|
|
3718
|
+
const [debouncedValue] = l(inputValue, debounce);
|
|
3590
3719
|
const handleChangeInput = (event) => {
|
|
3591
3720
|
const { value: newValue } = event.target;
|
|
3592
3721
|
if (onlyAlphanumeric(newValue) || newValue === "") {
|
|
@@ -3803,6 +3932,71 @@ function Modal({
|
|
|
3803
3932
|
);
|
|
3804
3933
|
return createPortal(modal, portalTarget);
|
|
3805
3934
|
}
|
|
3935
|
+
const IconChevronLeft = ({ size = 24, stroke = 2, ...props }) => {
|
|
3936
|
+
return /* @__PURE__ */ jsxs(
|
|
3937
|
+
"svg",
|
|
3938
|
+
{
|
|
3939
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3940
|
+
width: size,
|
|
3941
|
+
height: size,
|
|
3942
|
+
viewBox: "0 0 24 24",
|
|
3943
|
+
fill: "none",
|
|
3944
|
+
stroke: "currentColor",
|
|
3945
|
+
strokeWidth: stroke,
|
|
3946
|
+
strokeLinecap: "round",
|
|
3947
|
+
strokeLinejoin: "round",
|
|
3948
|
+
...props,
|
|
3949
|
+
children: [
|
|
3950
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
3951
|
+
/* @__PURE__ */ jsx("path", { d: "M15 6l-6 6l6 6" })
|
|
3952
|
+
]
|
|
3953
|
+
}
|
|
3954
|
+
);
|
|
3955
|
+
};
|
|
3956
|
+
const IconChevronsLeft = ({ size = 24, stroke = 2, ...props }) => {
|
|
3957
|
+
return /* @__PURE__ */ jsxs(
|
|
3958
|
+
"svg",
|
|
3959
|
+
{
|
|
3960
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3961
|
+
width: size,
|
|
3962
|
+
height: size,
|
|
3963
|
+
viewBox: "0 0 24 24",
|
|
3964
|
+
fill: "none",
|
|
3965
|
+
stroke: "currentColor",
|
|
3966
|
+
strokeWidth: stroke,
|
|
3967
|
+
strokeLinecap: "round",
|
|
3968
|
+
strokeLinejoin: "round",
|
|
3969
|
+
...props,
|
|
3970
|
+
children: [
|
|
3971
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
3972
|
+
/* @__PURE__ */ jsx("path", { d: "M11 7l-5 5l5 5" }),
|
|
3973
|
+
/* @__PURE__ */ jsx("path", { d: "M17 7l-5 5l5 5" })
|
|
3974
|
+
]
|
|
3975
|
+
}
|
|
3976
|
+
);
|
|
3977
|
+
};
|
|
3978
|
+
const IconChevronsRight = ({ size = 24, stroke = 2, ...props }) => {
|
|
3979
|
+
return /* @__PURE__ */ jsxs(
|
|
3980
|
+
"svg",
|
|
3981
|
+
{
|
|
3982
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3983
|
+
width: size,
|
|
3984
|
+
height: size,
|
|
3985
|
+
viewBox: "0 0 24 24",
|
|
3986
|
+
fill: "none",
|
|
3987
|
+
stroke: "currentColor",
|
|
3988
|
+
strokeWidth: stroke,
|
|
3989
|
+
strokeLinecap: "round",
|
|
3990
|
+
strokeLinejoin: "round",
|
|
3991
|
+
...props,
|
|
3992
|
+
children: [
|
|
3993
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
3994
|
+
/* @__PURE__ */ jsx("path", { d: "M7 7l5 5l-5 5" }),
|
|
3995
|
+
/* @__PURE__ */ jsx("path", { d: "M13 7l5 5l-5 5" })
|
|
3996
|
+
]
|
|
3997
|
+
}
|
|
3998
|
+
);
|
|
3999
|
+
};
|
|
3806
4000
|
function Pagination({
|
|
3807
4001
|
currentPage,
|
|
3808
4002
|
totalPages,
|
|
@@ -4083,6 +4277,51 @@ function TableProgressBar({
|
|
|
4083
4277
|
}
|
|
4084
4278
|
) });
|
|
4085
4279
|
}
|
|
4280
|
+
const IconEye = ({ size = 24, stroke = 2, ...props }) => {
|
|
4281
|
+
return /* @__PURE__ */ jsxs(
|
|
4282
|
+
"svg",
|
|
4283
|
+
{
|
|
4284
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4285
|
+
width: size,
|
|
4286
|
+
height: size,
|
|
4287
|
+
viewBox: "0 0 24 24",
|
|
4288
|
+
fill: "none",
|
|
4289
|
+
stroke: "currentColor",
|
|
4290
|
+
strokeWidth: stroke,
|
|
4291
|
+
strokeLinecap: "round",
|
|
4292
|
+
strokeLinejoin: "round",
|
|
4293
|
+
...props,
|
|
4294
|
+
children: [
|
|
4295
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
4296
|
+
/* @__PURE__ */ jsx("path", { d: "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" }),
|
|
4297
|
+
/* @__PURE__ */ jsx("path", { d: "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" })
|
|
4298
|
+
]
|
|
4299
|
+
}
|
|
4300
|
+
);
|
|
4301
|
+
};
|
|
4302
|
+
const IconEyeOff = ({ size = 24, stroke = 2, ...props }) => {
|
|
4303
|
+
return /* @__PURE__ */ jsxs(
|
|
4304
|
+
"svg",
|
|
4305
|
+
{
|
|
4306
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4307
|
+
width: size,
|
|
4308
|
+
height: size,
|
|
4309
|
+
viewBox: "0 0 24 24",
|
|
4310
|
+
fill: "none",
|
|
4311
|
+
stroke: "currentColor",
|
|
4312
|
+
strokeWidth: stroke,
|
|
4313
|
+
strokeLinecap: "round",
|
|
4314
|
+
strokeLinejoin: "round",
|
|
4315
|
+
...props,
|
|
4316
|
+
children: [
|
|
4317
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
4318
|
+
/* @__PURE__ */ jsx("path", { d: "M10.585 10.587a2 2 0 0 0 2.829 2.828" }),
|
|
4319
|
+
/* @__PURE__ */ jsx("path", { d: "M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87" }),
|
|
4320
|
+
/* @__PURE__ */ jsx("path", { d: "M3 3l18 18" })
|
|
4321
|
+
]
|
|
4322
|
+
}
|
|
4323
|
+
);
|
|
4324
|
+
};
|
|
4086
4325
|
function PasswordInput({
|
|
4087
4326
|
value,
|
|
4088
4327
|
onChange,
|
|
@@ -4104,7 +4343,7 @@ function PasswordInput({
|
|
|
4104
4343
|
}) {
|
|
4105
4344
|
const [inner, setInner] = useState(value);
|
|
4106
4345
|
const [show, setShow] = useState(false);
|
|
4107
|
-
const [debounced] =
|
|
4346
|
+
const [debounced] = l(inner, debounce);
|
|
4108
4347
|
const isFirstRun = useRef(true);
|
|
4109
4348
|
useEffect(() => {
|
|
4110
4349
|
setInner(value);
|
|
@@ -5826,7 +6065,13 @@ const SelectDropdown = ({
|
|
|
5826
6065
|
}),
|
|
5827
6066
|
filteredOptions.length === 0 && !loading && /* @__PURE__ */ jsx("div", { className: "ina-select-dropdown__empty", children: "No results" }),
|
|
5828
6067
|
loading && /* @__PURE__ */ jsxs("div", { className: "ina-select-dropdown__loading", children: [
|
|
5829
|
-
/* @__PURE__ */ jsx("div", { className: "ina-select-dropdown__loading-spinner", children: /* @__PURE__ */ jsx(
|
|
6068
|
+
/* @__PURE__ */ jsx("div", { className: "ina-select-dropdown__loading-spinner", children: /* @__PURE__ */ jsx(
|
|
6069
|
+
IconRotateClockwise,
|
|
6070
|
+
{
|
|
6071
|
+
size: 20,
|
|
6072
|
+
className: "ina-select-dropdown__loading-icon--spinning"
|
|
6073
|
+
}
|
|
6074
|
+
) }),
|
|
5830
6075
|
/* @__PURE__ */ jsx("span", { className: "ina-select-dropdown__loading-text", children: "Loading..." })
|
|
5831
6076
|
] })
|
|
5832
6077
|
]
|
|
@@ -6030,6 +6275,52 @@ function Spinner({
|
|
|
6030
6275
|
] })
|
|
6031
6276
|
] });
|
|
6032
6277
|
}
|
|
6278
|
+
const IconArrowNarrowUp = ({ size = 24, stroke = 2, ...props }) => {
|
|
6279
|
+
return /* @__PURE__ */ jsxs(
|
|
6280
|
+
"svg",
|
|
6281
|
+
{
|
|
6282
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6283
|
+
width: size,
|
|
6284
|
+
height: size,
|
|
6285
|
+
viewBox: "0 0 24 24",
|
|
6286
|
+
fill: "none",
|
|
6287
|
+
stroke: "currentColor",
|
|
6288
|
+
strokeWidth: stroke,
|
|
6289
|
+
strokeLinecap: "round",
|
|
6290
|
+
strokeLinejoin: "round",
|
|
6291
|
+
...props,
|
|
6292
|
+
children: [
|
|
6293
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
6294
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5l0 14" }),
|
|
6295
|
+
/* @__PURE__ */ jsx("path", { d: "M16 9l-4 -4" }),
|
|
6296
|
+
/* @__PURE__ */ jsx("path", { d: "M8 9l4 -4" })
|
|
6297
|
+
]
|
|
6298
|
+
}
|
|
6299
|
+
);
|
|
6300
|
+
};
|
|
6301
|
+
const IconArrowNarrowDown = ({ size = 24, stroke = 2, ...props }) => {
|
|
6302
|
+
return /* @__PURE__ */ jsxs(
|
|
6303
|
+
"svg",
|
|
6304
|
+
{
|
|
6305
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6306
|
+
width: size,
|
|
6307
|
+
height: size,
|
|
6308
|
+
viewBox: "0 0 24 24",
|
|
6309
|
+
fill: "none",
|
|
6310
|
+
stroke: "currentColor",
|
|
6311
|
+
strokeWidth: stroke,
|
|
6312
|
+
strokeLinecap: "round",
|
|
6313
|
+
strokeLinejoin: "round",
|
|
6314
|
+
...props,
|
|
6315
|
+
children: [
|
|
6316
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
6317
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5l0 14" }),
|
|
6318
|
+
/* @__PURE__ */ jsx("path", { d: "M16 15l-4 4" }),
|
|
6319
|
+
/* @__PURE__ */ jsx("path", { d: "M8 15l4 4" })
|
|
6320
|
+
]
|
|
6321
|
+
}
|
|
6322
|
+
);
|
|
6323
|
+
};
|
|
6033
6324
|
function Table({
|
|
6034
6325
|
columns,
|
|
6035
6326
|
fetchData,
|
|
@@ -6436,7 +6727,7 @@ function TextArea({
|
|
|
6436
6727
|
return value;
|
|
6437
6728
|
};
|
|
6438
6729
|
const [inner, setInner] = useState(getInitialValue());
|
|
6439
|
-
const [debounced] =
|
|
6730
|
+
const [debounced] = l(inner, debounce);
|
|
6440
6731
|
const isFirst = useRef(true);
|
|
6441
6732
|
const taRef = useRef(null);
|
|
6442
6733
|
const [rows, setRows] = useState(minRows);
|
|
@@ -6717,6 +7008,28 @@ function OneTimePassword({
|
|
|
6717
7008
|
)
|
|
6718
7009
|
] });
|
|
6719
7010
|
}
|
|
7011
|
+
const IconClock = ({ size = 24, stroke = 2, ...props }) => {
|
|
7012
|
+
return /* @__PURE__ */ jsxs(
|
|
7013
|
+
"svg",
|
|
7014
|
+
{
|
|
7015
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7016
|
+
width: size,
|
|
7017
|
+
height: size,
|
|
7018
|
+
viewBox: "0 0 24 24",
|
|
7019
|
+
fill: "none",
|
|
7020
|
+
stroke: "currentColor",
|
|
7021
|
+
strokeWidth: stroke,
|
|
7022
|
+
strokeLinecap: "round",
|
|
7023
|
+
strokeLinejoin: "round",
|
|
7024
|
+
...props,
|
|
7025
|
+
children: [
|
|
7026
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
7027
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" }),
|
|
7028
|
+
/* @__PURE__ */ jsx("path", { d: "M12 7v5l3 3" })
|
|
7029
|
+
]
|
|
7030
|
+
}
|
|
7031
|
+
);
|
|
7032
|
+
};
|
|
6720
7033
|
const TimePicker = forwardRef(
|
|
6721
7034
|
({
|
|
6722
7035
|
defaultValue = "",
|
|
@@ -7442,6 +7755,49 @@ function Tooltip({
|
|
|
7442
7755
|
/* @__PURE__ */ jsx("div", { className: contentClasses, role: "tooltip", children: renderContent() })
|
|
7443
7756
|
] });
|
|
7444
7757
|
}
|
|
7758
|
+
const IconSun = ({ size = 24, stroke = 2, ...props }) => {
|
|
7759
|
+
return /* @__PURE__ */ jsxs(
|
|
7760
|
+
"svg",
|
|
7761
|
+
{
|
|
7762
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7763
|
+
width: size,
|
|
7764
|
+
height: size,
|
|
7765
|
+
viewBox: "0 0 24 24",
|
|
7766
|
+
fill: "none",
|
|
7767
|
+
stroke: "currentColor",
|
|
7768
|
+
strokeWidth: stroke,
|
|
7769
|
+
strokeLinecap: "round",
|
|
7770
|
+
strokeLinejoin: "round",
|
|
7771
|
+
...props,
|
|
7772
|
+
children: [
|
|
7773
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
7774
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" }),
|
|
7775
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7" })
|
|
7776
|
+
]
|
|
7777
|
+
}
|
|
7778
|
+
);
|
|
7779
|
+
};
|
|
7780
|
+
const IconMoon = ({ size = 24, stroke = 2, ...props }) => {
|
|
7781
|
+
return /* @__PURE__ */ jsxs(
|
|
7782
|
+
"svg",
|
|
7783
|
+
{
|
|
7784
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7785
|
+
width: size,
|
|
7786
|
+
height: size,
|
|
7787
|
+
viewBox: "0 0 24 24",
|
|
7788
|
+
fill: "none",
|
|
7789
|
+
stroke: "currentColor",
|
|
7790
|
+
strokeWidth: stroke,
|
|
7791
|
+
strokeLinecap: "round",
|
|
7792
|
+
strokeLinejoin: "round",
|
|
7793
|
+
...props,
|
|
7794
|
+
children: [
|
|
7795
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
7796
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" })
|
|
7797
|
+
]
|
|
7798
|
+
}
|
|
7799
|
+
);
|
|
7800
|
+
};
|
|
7445
7801
|
function ThemeToggle({
|
|
7446
7802
|
className = "",
|
|
7447
7803
|
size = "md",
|
|
@@ -7625,25 +7981,23 @@ var isPlainObject = (tempObject) => {
|
|
|
7625
7981
|
};
|
|
7626
7982
|
var isWeb = typeof window !== "undefined" && typeof window.HTMLElement !== "undefined" && typeof document !== "undefined";
|
|
7627
7983
|
function cloneObject(data) {
|
|
7628
|
-
let copy;
|
|
7629
|
-
const isArray = Array.isArray(data);
|
|
7630
|
-
const isFileListInstance = typeof FileList !== "undefined" ? data instanceof FileList : false;
|
|
7631
7984
|
if (data instanceof Date) {
|
|
7632
|
-
|
|
7633
|
-
}
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
copy[key] = cloneObject(data[key]);
|
|
7641
|
-
}
|
|
7642
|
-
}
|
|
7643
|
-
}
|
|
7644
|
-
} else {
|
|
7985
|
+
return new Date(data);
|
|
7986
|
+
}
|
|
7987
|
+
const isFileListInstance = typeof FileList !== "undefined" && data instanceof FileList;
|
|
7988
|
+
if (isWeb && (data instanceof Blob || isFileListInstance)) {
|
|
7989
|
+
return data;
|
|
7990
|
+
}
|
|
7991
|
+
const isArray = Array.isArray(data);
|
|
7992
|
+
if (!isArray && !(isObject(data) && isPlainObject(data))) {
|
|
7645
7993
|
return data;
|
|
7646
7994
|
}
|
|
7995
|
+
const copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
|
|
7996
|
+
for (const key in data) {
|
|
7997
|
+
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
|
7998
|
+
copy[key] = cloneObject(data[key]);
|
|
7999
|
+
}
|
|
8000
|
+
}
|
|
7647
8001
|
return copy;
|
|
7648
8002
|
}
|
|
7649
8003
|
var isKey = (value) => /^\w*$/.test(value);
|
|
@@ -7658,6 +8012,7 @@ var get = (object, path, defaultValue) => {
|
|
|
7658
8012
|
return isUndefined(result) || result === object ? isUndefined(object[path]) ? defaultValue : object[path] : result;
|
|
7659
8013
|
};
|
|
7660
8014
|
var isBoolean = (value) => typeof value === "boolean";
|
|
8015
|
+
var isFunction = (value) => typeof value === "function";
|
|
7661
8016
|
var set = (object, path, value) => {
|
|
7662
8017
|
let index = -1;
|
|
7663
8018
|
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
@@ -7698,13 +8053,9 @@ const INPUT_VALIDATION_RULES = {
|
|
|
7698
8053
|
required: "required",
|
|
7699
8054
|
validate: "validate"
|
|
7700
8055
|
};
|
|
7701
|
-
const
|
|
7702
|
-
|
|
7703
|
-
const
|
|
7704
|
-
const FormProvider$1 = (props) => {
|
|
7705
|
-
const { children, ...data } = props;
|
|
7706
|
-
return React.createElement(HookFormContext.Provider, { value: data }, children);
|
|
7707
|
-
};
|
|
8056
|
+
const HookFormControlContext = React.createContext(null);
|
|
8057
|
+
HookFormControlContext.displayName = "HookFormControlContext";
|
|
8058
|
+
const useFormControlContext = () => React.useContext(HookFormControlContext);
|
|
7708
8059
|
var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
|
|
7709
8060
|
const result = {
|
|
7710
8061
|
defaultValues: control._defaultValues
|
|
@@ -7725,8 +8076,8 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
|
|
|
7725
8076
|
};
|
|
7726
8077
|
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
7727
8078
|
function useFormState(props) {
|
|
7728
|
-
const
|
|
7729
|
-
const { control =
|
|
8079
|
+
const formControl = useFormControlContext();
|
|
8080
|
+
const { control = formControl, disabled, name, exact } = props || {};
|
|
7730
8081
|
const [formState, updateFormState] = React.useState(control._formState);
|
|
7731
8082
|
const _localProxyFormState = React.useRef({
|
|
7732
8083
|
isDirty: false,
|
|
@@ -7769,10 +8120,10 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
|
|
|
7769
8120
|
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
7770
8121
|
function deepEqual(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
|
|
7771
8122
|
if (isPrimitive(object1) || isPrimitive(object2)) {
|
|
7772
|
-
return object1
|
|
8123
|
+
return Object.is(object1, object2);
|
|
7773
8124
|
}
|
|
7774
8125
|
if (isDateObject(object1) && isDateObject(object2)) {
|
|
7775
|
-
return object1.getTime()
|
|
8126
|
+
return Object.is(object1.getTime(), object2.getTime());
|
|
7776
8127
|
}
|
|
7777
8128
|
const keys1 = Object.keys(object1);
|
|
7778
8129
|
const keys2 = Object.keys(object2);
|
|
@@ -7791,7 +8142,7 @@ function deepEqual(object1, object2, _internal_visited = /* @__PURE__ */ new Wea
|
|
|
7791
8142
|
}
|
|
7792
8143
|
if (key !== "ref") {
|
|
7793
8144
|
const val2 = object2[key];
|
|
7794
|
-
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual(val1, val2, _internal_visited) : val1
|
|
8145
|
+
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual(val1, val2, _internal_visited) : !Object.is(val1, val2)) {
|
|
7795
8146
|
return false;
|
|
7796
8147
|
}
|
|
7797
8148
|
}
|
|
@@ -7799,53 +8150,81 @@ function deepEqual(object1, object2, _internal_visited = /* @__PURE__ */ new Wea
|
|
|
7799
8150
|
return true;
|
|
7800
8151
|
}
|
|
7801
8152
|
function useWatch(props) {
|
|
7802
|
-
const
|
|
7803
|
-
const { control =
|
|
8153
|
+
const formControl = useFormControlContext();
|
|
8154
|
+
const { control = formControl, name, defaultValue, disabled, exact, compute } = props || {};
|
|
7804
8155
|
const _defaultValue = React.useRef(defaultValue);
|
|
7805
8156
|
const _compute = React.useRef(compute);
|
|
7806
8157
|
const _computeFormValues = React.useRef(void 0);
|
|
8158
|
+
const _prevControl = React.useRef(control);
|
|
8159
|
+
const _prevName = React.useRef(name);
|
|
7807
8160
|
_compute.current = compute;
|
|
7808
|
-
const
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
}
|
|
7825
|
-
} else {
|
|
7826
|
-
updateValue(formValues);
|
|
8161
|
+
const [value, updateValue] = React.useState(() => {
|
|
8162
|
+
const defaultValue2 = control._getWatch(name, _defaultValue.current);
|
|
8163
|
+
return _compute.current ? _compute.current(defaultValue2) : defaultValue2;
|
|
8164
|
+
});
|
|
8165
|
+
const getCurrentOutput = React.useCallback((values) => {
|
|
8166
|
+
const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
|
|
8167
|
+
return _compute.current ? _compute.current(formValues) : formValues;
|
|
8168
|
+
}, [control._formValues, control._names, name]);
|
|
8169
|
+
const refreshValue = React.useCallback((values) => {
|
|
8170
|
+
if (!disabled) {
|
|
8171
|
+
const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
|
|
8172
|
+
if (_compute.current) {
|
|
8173
|
+
const computedFormValues = _compute.current(formValues);
|
|
8174
|
+
if (!deepEqual(computedFormValues, _computeFormValues.current)) {
|
|
8175
|
+
updateValue(computedFormValues);
|
|
8176
|
+
_computeFormValues.current = computedFormValues;
|
|
7827
8177
|
}
|
|
8178
|
+
} else {
|
|
8179
|
+
updateValue(formValues);
|
|
7828
8180
|
}
|
|
7829
8181
|
}
|
|
7830
|
-
}
|
|
8182
|
+
}, [control._formValues, control._names, disabled, name]);
|
|
8183
|
+
useIsomorphicLayoutEffect(() => {
|
|
8184
|
+
if (_prevControl.current !== control || !deepEqual(_prevName.current, name)) {
|
|
8185
|
+
_prevControl.current = control;
|
|
8186
|
+
_prevName.current = name;
|
|
8187
|
+
refreshValue();
|
|
8188
|
+
}
|
|
8189
|
+
return control._subscribe({
|
|
8190
|
+
name,
|
|
8191
|
+
formState: {
|
|
8192
|
+
values: true
|
|
8193
|
+
},
|
|
8194
|
+
exact,
|
|
8195
|
+
callback: (formState) => {
|
|
8196
|
+
refreshValue(formState.values);
|
|
8197
|
+
}
|
|
8198
|
+
});
|
|
8199
|
+
}, [control, exact, name, refreshValue]);
|
|
7831
8200
|
React.useEffect(() => control._removeUnmounted());
|
|
7832
|
-
|
|
8201
|
+
const controlChanged = _prevControl.current !== control;
|
|
8202
|
+
const prevName = _prevName.current;
|
|
8203
|
+
const computedOutput = React.useMemo(() => {
|
|
8204
|
+
if (disabled) {
|
|
8205
|
+
return null;
|
|
8206
|
+
}
|
|
8207
|
+
const nameChanged = !controlChanged && !deepEqual(prevName, name);
|
|
8208
|
+
const shouldReturnImmediate = controlChanged || nameChanged;
|
|
8209
|
+
return shouldReturnImmediate ? getCurrentOutput() : null;
|
|
8210
|
+
}, [disabled, controlChanged, name, prevName, getCurrentOutput]);
|
|
8211
|
+
return computedOutput !== null ? computedOutput : value;
|
|
7833
8212
|
}
|
|
7834
8213
|
function useController(props) {
|
|
7835
|
-
const
|
|
7836
|
-
const { name, disabled, control =
|
|
8214
|
+
const formControl = useFormControlContext();
|
|
8215
|
+
const { name, disabled, control = formControl, shouldUnregister, defaultValue, exact = true } = props;
|
|
7837
8216
|
const isArrayField = isNameInFieldArray(control._names.array, name);
|
|
7838
8217
|
const defaultValueMemo = React.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
|
|
7839
8218
|
const value = useWatch({
|
|
7840
8219
|
control,
|
|
7841
8220
|
name,
|
|
7842
8221
|
defaultValue: defaultValueMemo,
|
|
7843
|
-
exact
|
|
8222
|
+
exact
|
|
7844
8223
|
});
|
|
7845
8224
|
const formState = useFormState({
|
|
7846
8225
|
control,
|
|
7847
8226
|
name,
|
|
7848
|
-
exact
|
|
8227
|
+
exact
|
|
7849
8228
|
});
|
|
7850
8229
|
const _props = React.useRef(props);
|
|
7851
8230
|
const _previousNameRef = React.useRef(void 0);
|
|
@@ -7893,12 +8272,12 @@ function useController(props) {
|
|
|
7893
8272
|
}), [name, control._formValues]);
|
|
7894
8273
|
const ref = React.useCallback((elm) => {
|
|
7895
8274
|
const field2 = get(control._fields, name);
|
|
7896
|
-
if (field2 && elm) {
|
|
8275
|
+
if (field2 && field2._f && elm) {
|
|
7897
8276
|
field2._f.ref = {
|
|
7898
|
-
focus: () => elm.focus && elm.focus(),
|
|
7899
|
-
select: () => elm.select && elm.select(),
|
|
7900
|
-
setCustomValidity: (message) => elm.setCustomValidity(message),
|
|
7901
|
-
reportValidity: () => elm.reportValidity()
|
|
8277
|
+
focus: () => isFunction(elm.focus) && elm.focus(),
|
|
8278
|
+
select: () => isFunction(elm.select) && elm.select(),
|
|
8279
|
+
setCustomValidity: (message) => isFunction(elm.setCustomValidity) && elm.setCustomValidity(message),
|
|
8280
|
+
reportValidity: () => isFunction(elm.reportValidity) && elm.reportValidity()
|
|
7902
8281
|
};
|
|
7903
8282
|
}
|
|
7904
8283
|
}, [control._fields, name]);
|
|
@@ -7953,6 +8332,50 @@ function useController(props) {
|
|
|
7953
8332
|
}), [field, formState, fieldState]);
|
|
7954
8333
|
}
|
|
7955
8334
|
const Controller = (props) => props.render(useController(props));
|
|
8335
|
+
const HookFormContext = React.createContext(null);
|
|
8336
|
+
HookFormContext.displayName = "HookFormContext";
|
|
8337
|
+
const FormProvider$1 = (props) => {
|
|
8338
|
+
const { children, watch, getValues, getFieldState, setError, clearErrors, setValue, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe } = props;
|
|
8339
|
+
return React.createElement(
|
|
8340
|
+
HookFormContext.Provider,
|
|
8341
|
+
{ value: React.useMemo(() => ({
|
|
8342
|
+
watch,
|
|
8343
|
+
getValues,
|
|
8344
|
+
getFieldState,
|
|
8345
|
+
setError,
|
|
8346
|
+
clearErrors,
|
|
8347
|
+
setValue,
|
|
8348
|
+
trigger,
|
|
8349
|
+
formState,
|
|
8350
|
+
resetField,
|
|
8351
|
+
reset,
|
|
8352
|
+
handleSubmit,
|
|
8353
|
+
unregister,
|
|
8354
|
+
control,
|
|
8355
|
+
register,
|
|
8356
|
+
setFocus,
|
|
8357
|
+
subscribe
|
|
8358
|
+
}), [
|
|
8359
|
+
clearErrors,
|
|
8360
|
+
control,
|
|
8361
|
+
formState,
|
|
8362
|
+
getFieldState,
|
|
8363
|
+
getValues,
|
|
8364
|
+
handleSubmit,
|
|
8365
|
+
register,
|
|
8366
|
+
reset,
|
|
8367
|
+
resetField,
|
|
8368
|
+
setError,
|
|
8369
|
+
setFocus,
|
|
8370
|
+
setValue,
|
|
8371
|
+
subscribe,
|
|
8372
|
+
trigger,
|
|
8373
|
+
unregister,
|
|
8374
|
+
watch
|
|
8375
|
+
]) },
|
|
8376
|
+
React.createElement(HookFormControlContext.Provider, { value: control }, children)
|
|
8377
|
+
);
|
|
8378
|
+
};
|
|
7956
8379
|
var appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria ? {
|
|
7957
8380
|
...errors[name],
|
|
7958
8381
|
types: {
|
|
@@ -8008,7 +8431,6 @@ function extractFormValues(fieldsState, formValues) {
|
|
|
8008
8431
|
}
|
|
8009
8432
|
var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
|
|
8010
8433
|
var isFileInput = (element) => element.type === "file";
|
|
8011
|
-
var isFunction = (value) => typeof value === "function";
|
|
8012
8434
|
var isHTMLElement = (value) => {
|
|
8013
8435
|
if (!isWeb) {
|
|
8014
8436
|
return false;
|
|
@@ -8062,10 +8484,11 @@ function isTraversable(value) {
|
|
|
8062
8484
|
}
|
|
8063
8485
|
function markFieldsDirty(data, fields = {}) {
|
|
8064
8486
|
for (const key in data) {
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8487
|
+
const value = data[key];
|
|
8488
|
+
if (isTraversable(value)) {
|
|
8489
|
+
fields[key] = Array.isArray(value) ? [] : {};
|
|
8490
|
+
markFieldsDirty(value, fields[key]);
|
|
8491
|
+
} else if (!isUndefined(value)) {
|
|
8069
8492
|
fields[key] = true;
|
|
8070
8493
|
}
|
|
8071
8494
|
}
|
|
@@ -8076,14 +8499,16 @@ function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
|
|
|
8076
8499
|
dirtyFieldsFromValues = markFieldsDirty(formValues);
|
|
8077
8500
|
}
|
|
8078
8501
|
for (const key in data) {
|
|
8079
|
-
|
|
8502
|
+
const value = data[key];
|
|
8503
|
+
if (isTraversable(value)) {
|
|
8080
8504
|
if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
|
|
8081
|
-
dirtyFieldsFromValues[key] = markFieldsDirty(
|
|
8505
|
+
dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {});
|
|
8082
8506
|
} else {
|
|
8083
|
-
getDirtyFields(
|
|
8507
|
+
getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
|
|
8084
8508
|
}
|
|
8085
8509
|
} else {
|
|
8086
|
-
|
|
8510
|
+
const formValue = formValues[key];
|
|
8511
|
+
dirtyFieldsFromValues[key] = !deepEqual(value, formValue);
|
|
8087
8512
|
}
|
|
8088
8513
|
}
|
|
8089
8514
|
return dirtyFieldsFromValues;
|
|
@@ -8435,7 +8860,8 @@ function createFormControl(props = {}) {
|
|
|
8435
8860
|
let _state = {
|
|
8436
8861
|
action: false,
|
|
8437
8862
|
mount: false,
|
|
8438
|
-
watch: false
|
|
8863
|
+
watch: false,
|
|
8864
|
+
keepIsValid: false
|
|
8439
8865
|
};
|
|
8440
8866
|
let _names = {
|
|
8441
8867
|
mount: /* @__PURE__ */ new Set(),
|
|
@@ -8446,7 +8872,7 @@ function createFormControl(props = {}) {
|
|
|
8446
8872
|
};
|
|
8447
8873
|
let delayErrorCallback;
|
|
8448
8874
|
let timer = 0;
|
|
8449
|
-
const
|
|
8875
|
+
const defaultProxyFormState = {
|
|
8450
8876
|
isDirty: false,
|
|
8451
8877
|
dirtyFields: false,
|
|
8452
8878
|
validatingFields: false,
|
|
@@ -8455,6 +8881,9 @@ function createFormControl(props = {}) {
|
|
|
8455
8881
|
isValid: false,
|
|
8456
8882
|
errors: false
|
|
8457
8883
|
};
|
|
8884
|
+
const _proxyFormState = {
|
|
8885
|
+
...defaultProxyFormState
|
|
8886
|
+
};
|
|
8458
8887
|
let _proxySubscribeFormState = {
|
|
8459
8888
|
..._proxyFormState
|
|
8460
8889
|
};
|
|
@@ -8468,8 +8897,17 @@ function createFormControl(props = {}) {
|
|
|
8468
8897
|
timer = setTimeout(callback, wait);
|
|
8469
8898
|
};
|
|
8470
8899
|
const _setValid = async (shouldUpdateValid) => {
|
|
8900
|
+
if (_state.keepIsValid) {
|
|
8901
|
+
return;
|
|
8902
|
+
}
|
|
8471
8903
|
if (!_options.disabled && (_proxyFormState.isValid || _proxySubscribeFormState.isValid || shouldUpdateValid)) {
|
|
8472
|
-
|
|
8904
|
+
let isValid;
|
|
8905
|
+
if (_options.resolver) {
|
|
8906
|
+
isValid = isEmptyObject((await _runSchema()).errors);
|
|
8907
|
+
_updateIsValidating();
|
|
8908
|
+
} else {
|
|
8909
|
+
isValid = await executeBuiltInValidation(_fields, true);
|
|
8910
|
+
}
|
|
8473
8911
|
if (isValid !== _formState.isValid) {
|
|
8474
8912
|
_subjects.state.next({
|
|
8475
8913
|
isValid
|
|
@@ -8538,7 +8976,7 @@ function createFormControl(props = {}) {
|
|
|
8538
8976
|
if (field) {
|
|
8539
8977
|
const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
|
|
8540
8978
|
isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
|
|
8541
|
-
_state.mount && _setValid();
|
|
8979
|
+
_state.mount && !_state.action && _setValid();
|
|
8542
8980
|
}
|
|
8543
8981
|
};
|
|
8544
8982
|
const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
|
|
@@ -8600,11 +9038,11 @@ function createFormControl(props = {}) {
|
|
|
8600
9038
|
const _runSchema = async (name) => {
|
|
8601
9039
|
_updateIsValidating(name, true);
|
|
8602
9040
|
const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));
|
|
8603
|
-
_updateIsValidating(name);
|
|
8604
9041
|
return result;
|
|
8605
9042
|
};
|
|
8606
9043
|
const executeSchemaAndUpdateState = async (names) => {
|
|
8607
9044
|
const { errors } = await _runSchema(names);
|
|
9045
|
+
_updateIsValidating(names);
|
|
8608
9046
|
if (names) {
|
|
8609
9047
|
for (const name of names) {
|
|
8610
9048
|
const error = get(errors, name);
|
|
@@ -8634,7 +9072,7 @@ function createFormControl(props = {}) {
|
|
|
8634
9072
|
}
|
|
8635
9073
|
if (fieldError[_f.name]) {
|
|
8636
9074
|
context.valid = false;
|
|
8637
|
-
if (shouldOnlyCheckValid) {
|
|
9075
|
+
if (shouldOnlyCheckValid || props.shouldUseNativeValidation) {
|
|
8638
9076
|
break;
|
|
8639
9077
|
}
|
|
8640
9078
|
}
|
|
@@ -8728,11 +9166,18 @@ function createFormControl(props = {}) {
|
|
|
8728
9166
|
} else {
|
|
8729
9167
|
field && !field._f && !isNullOrUndefined(cloneValue) ? setValues(name, cloneValue, options) : setFieldValue(name, cloneValue, options);
|
|
8730
9168
|
}
|
|
8731
|
-
isWatched(name, _names)
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
9169
|
+
if (isWatched(name, _names)) {
|
|
9170
|
+
_subjects.state.next({
|
|
9171
|
+
..._formState,
|
|
9172
|
+
name,
|
|
9173
|
+
values: cloneObject(_formValues)
|
|
9174
|
+
});
|
|
9175
|
+
} else {
|
|
9176
|
+
_subjects.state.next({
|
|
9177
|
+
name: _state.mount ? name : void 0,
|
|
9178
|
+
values: cloneObject(_formValues)
|
|
9179
|
+
});
|
|
9180
|
+
}
|
|
8736
9181
|
};
|
|
8737
9182
|
const onChange = async (event) => {
|
|
8738
9183
|
_state.mount = true;
|
|
@@ -8783,6 +9228,7 @@ function createFormControl(props = {}) {
|
|
|
8783
9228
|
!isBlurEvent && watched && _subjects.state.next({ ..._formState });
|
|
8784
9229
|
if (_options.resolver) {
|
|
8785
9230
|
const { errors } = await _runSchema([name]);
|
|
9231
|
+
_updateIsValidating([name]);
|
|
8786
9232
|
_updateIsFieldValueUpdated(fieldValue);
|
|
8787
9233
|
if (isFieldValueUpdated) {
|
|
8788
9234
|
const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);
|
|
@@ -8903,7 +9349,10 @@ function createFormControl(props = {}) {
|
|
|
8903
9349
|
};
|
|
8904
9350
|
return _subscribe({
|
|
8905
9351
|
...props2,
|
|
8906
|
-
formState:
|
|
9352
|
+
formState: {
|
|
9353
|
+
...defaultProxyFormState,
|
|
9354
|
+
...props2.formState
|
|
9355
|
+
}
|
|
8907
9356
|
});
|
|
8908
9357
|
};
|
|
8909
9358
|
const unregister = (name, options = {}) => {
|
|
@@ -8931,7 +9380,11 @@ function createFormControl(props = {}) {
|
|
|
8931
9380
|
};
|
|
8932
9381
|
const _setDisabledField = ({ disabled, name }) => {
|
|
8933
9382
|
if (isBoolean(disabled) && _state.mount || !!disabled || _names.disabled.has(name)) {
|
|
9383
|
+
const wasDisabled = _names.disabled.has(name);
|
|
9384
|
+
const isDisabled = !!disabled;
|
|
9385
|
+
const disabledStateChanged = wasDisabled !== isDisabled;
|
|
8934
9386
|
disabled ? _names.disabled.add(name) : _names.disabled.delete(name);
|
|
9387
|
+
disabledStateChanged && _state.mount && !_state.action && _setValid();
|
|
8935
9388
|
}
|
|
8936
9389
|
};
|
|
8937
9390
|
const register = (name, options = {}) => {
|
|
@@ -9031,6 +9484,7 @@ function createFormControl(props = {}) {
|
|
|
9031
9484
|
});
|
|
9032
9485
|
if (_options.resolver) {
|
|
9033
9486
|
const { errors, values } = await _runSchema();
|
|
9487
|
+
_updateIsValidating();
|
|
9034
9488
|
_formState.errors = errors;
|
|
9035
9489
|
fieldValues = cloneObject(values);
|
|
9036
9490
|
} else {
|
|
@@ -9106,7 +9560,14 @@ function createFormControl(props = {}) {
|
|
|
9106
9560
|
...Object.keys(getDirtyFields(_defaultValues, _formValues))
|
|
9107
9561
|
]);
|
|
9108
9562
|
for (const fieldName of Array.from(fieldsToCheck)) {
|
|
9109
|
-
get(_formState.dirtyFields, fieldName)
|
|
9563
|
+
const isDirty = get(_formState.dirtyFields, fieldName);
|
|
9564
|
+
const existingValue = get(_formValues, fieldName);
|
|
9565
|
+
const newValue = get(values, fieldName);
|
|
9566
|
+
if (isDirty && !isUndefined(existingValue)) {
|
|
9567
|
+
set(values, fieldName, existingValue);
|
|
9568
|
+
} else if (!isDirty && !isUndefined(newValue)) {
|
|
9569
|
+
setValue(fieldName, newValue);
|
|
9570
|
+
}
|
|
9110
9571
|
}
|
|
9111
9572
|
} else {
|
|
9112
9573
|
if (isWeb && isUndefined(formValues)) {
|
|
@@ -9149,8 +9610,13 @@ function createFormControl(props = {}) {
|
|
|
9149
9610
|
watchAll: false,
|
|
9150
9611
|
focus: ""
|
|
9151
9612
|
};
|
|
9152
|
-
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues;
|
|
9613
|
+
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
|
|
9153
9614
|
_state.watch = !!_options.shouldUnregister;
|
|
9615
|
+
_state.keepIsValid = !!keepStateOptions.keepIsValid;
|
|
9616
|
+
_state.action = false;
|
|
9617
|
+
if (!keepStateOptions.keepErrors) {
|
|
9618
|
+
_formState.errors = {};
|
|
9619
|
+
}
|
|
9154
9620
|
_subjects.state.next({
|
|
9155
9621
|
submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
|
|
9156
9622
|
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual(formValues, _defaultValues)),
|
|
@@ -9163,15 +9629,17 @@ function createFormControl(props = {}) {
|
|
|
9163
9629
|
defaultValues: _defaultValues
|
|
9164
9630
|
});
|
|
9165
9631
|
};
|
|
9166
|
-
const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues) ? formValues(_formValues) : formValues, keepStateOptions);
|
|
9632
|
+
const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues) ? formValues(_formValues) : formValues, { ..._options.resetOptions, ...keepStateOptions });
|
|
9167
9633
|
const setFocus = (name, options = {}) => {
|
|
9168
9634
|
const field = get(_fields, name);
|
|
9169
9635
|
const fieldReference = field && field._f;
|
|
9170
9636
|
if (fieldReference) {
|
|
9171
9637
|
const fieldRef = fieldReference.refs ? fieldReference.refs[0] : fieldReference.ref;
|
|
9172
9638
|
if (fieldRef.focus) {
|
|
9173
|
-
|
|
9174
|
-
|
|
9639
|
+
setTimeout(() => {
|
|
9640
|
+
fieldRef.focus();
|
|
9641
|
+
options.shouldSelect && isFunction(fieldRef.select) && fieldRef.select();
|
|
9642
|
+
});
|
|
9175
9643
|
}
|
|
9176
9644
|
}
|
|
9177
9645
|
};
|
|
@@ -9196,6 +9664,7 @@ function createFormControl(props = {}) {
|
|
|
9196
9664
|
setError,
|
|
9197
9665
|
_subscribe,
|
|
9198
9666
|
_runSchema,
|
|
9667
|
+
_updateIsValidating,
|
|
9199
9668
|
_focusError,
|
|
9200
9669
|
_getWatch,
|
|
9201
9670
|
_getDirty,
|
|
@@ -9347,11 +9816,15 @@ function useForm$1(props = {}) {
|
|
|
9347
9816
|
}
|
|
9348
9817
|
}, [control, formState.isDirty]);
|
|
9349
9818
|
React.useEffect(() => {
|
|
9819
|
+
var _a;
|
|
9350
9820
|
if (props.values && !deepEqual(props.values, _values.current)) {
|
|
9351
9821
|
control._reset(props.values, {
|
|
9352
9822
|
keepFieldsRef: true,
|
|
9353
9823
|
...control._options.resetOptions
|
|
9354
9824
|
});
|
|
9825
|
+
if (!((_a = control._options.resetOptions) === null || _a === void 0 ? void 0 : _a.keepIsValid)) {
|
|
9826
|
+
control._setValid();
|
|
9827
|
+
}
|
|
9355
9828
|
_values.current = props.values;
|
|
9356
9829
|
updateFormState((state) => ({ ...state }));
|
|
9357
9830
|
} else {
|
|
@@ -9369,7 +9842,7 @@ function useForm$1(props = {}) {
|
|
|
9369
9842
|
}
|
|
9370
9843
|
control._removeUnmounted();
|
|
9371
9844
|
});
|
|
9372
|
-
_formControl.current.formState = getProxyFormState(formState, control);
|
|
9845
|
+
_formControl.current.formState = React.useMemo(() => getProxyFormState(formState, control), [control, formState]);
|
|
9373
9846
|
return _formControl.current;
|
|
9374
9847
|
}
|
|
9375
9848
|
function useForm(options) {
|
|
@@ -9390,6 +9863,32 @@ function FormField({
|
|
|
9390
9863
|
}
|
|
9391
9864
|
);
|
|
9392
9865
|
}
|
|
9866
|
+
const IconCalendar = ({ size = 24, stroke = 2, ...props }) => {
|
|
9867
|
+
return /* @__PURE__ */ jsxs(
|
|
9868
|
+
"svg",
|
|
9869
|
+
{
|
|
9870
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9871
|
+
width: size,
|
|
9872
|
+
height: size,
|
|
9873
|
+
viewBox: "0 0 24 24",
|
|
9874
|
+
fill: "none",
|
|
9875
|
+
stroke: "currentColor",
|
|
9876
|
+
strokeWidth: stroke,
|
|
9877
|
+
strokeLinecap: "round",
|
|
9878
|
+
strokeLinejoin: "round",
|
|
9879
|
+
...props,
|
|
9880
|
+
children: [
|
|
9881
|
+
/* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
|
9882
|
+
/* @__PURE__ */ jsx("path", { d: "M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z" }),
|
|
9883
|
+
/* @__PURE__ */ jsx("path", { d: "M16 3v4" }),
|
|
9884
|
+
/* @__PURE__ */ jsx("path", { d: "M8 3v4" }),
|
|
9885
|
+
/* @__PURE__ */ jsx("path", { d: "M4 11h16" }),
|
|
9886
|
+
/* @__PURE__ */ jsx("path", { d: "M11 15h1" }),
|
|
9887
|
+
/* @__PURE__ */ jsx("path", { d: "M12 15v3" })
|
|
9888
|
+
]
|
|
9889
|
+
}
|
|
9890
|
+
);
|
|
9891
|
+
};
|
|
9393
9892
|
function YearPicker({
|
|
9394
9893
|
value,
|
|
9395
9894
|
defaultValue,
|
|
@@ -11128,8 +11627,8 @@ function MultipleChoiceGrid({
|
|
|
11128
11627
|
disabled = false,
|
|
11129
11628
|
name = "multiple-choice-grid"
|
|
11130
11629
|
}) {
|
|
11131
|
-
const sortedColumns = [...columns].sort((
|
|
11132
|
-
const sortedRows = [...rows].sort((
|
|
11630
|
+
const sortedColumns = [...columns].sort((a, b) => a.order - b.order);
|
|
11631
|
+
const sortedRows = [...rows].sort((a, b) => a.order - b.order);
|
|
11133
11632
|
const handleSelection = useCallback(
|
|
11134
11633
|
(rowId, columnId) => {
|
|
11135
11634
|
if (disabled) return;
|