@idds/react 1.1.91 → 1.1.92
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 +2 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +429 -107
- package/dist/index.umd.js +2 -2
- package/dist/types/components/Drawer.d.ts.map +1 -1
- package/dist/types/components/PasswordInput.d.ts.map +1 -1
- package/dist/types/components/SingleFileUpload.d.ts +55 -0
- package/dist/types/components/SingleFileUpload.d.ts.map +1 -0
- package/dist/types/components/Stepper.d.ts +3 -1
- package/dist/types/components/Stepper.d.ts.map +1 -1
- package/dist/types/components/Toggle.d.ts +1 -1
- package/dist/types/components/Toggle.d.ts.map +1 -1
- package/dist/types/components/Tooltip.d.ts +4 -7
- package/dist/types/components/Tooltip.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -776,176 +776,200 @@ const createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
|
|
|
776
776
|
* This source code is licensed under the MIT license.
|
|
777
777
|
* See the LICENSE file in the root directory of this source tree.
|
|
778
778
|
*/
|
|
779
|
-
const __iconNode$
|
|
780
|
-
const IconAddressBook = createReactComponent("outline", "address-book", "AddressBook", __iconNode$
|
|
779
|
+
const __iconNode$v = [["path", { "d": "M20 6v12a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2z", "key": "svg-0" }], ["path", { "d": "M10 16h6", "key": "svg-1" }], ["path", { "d": "M13 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", "key": "svg-2" }], ["path", { "d": "M4 8h3", "key": "svg-3" }], ["path", { "d": "M4 12h3", "key": "svg-4" }], ["path", { "d": "M4 16h3", "key": "svg-5" }]];
|
|
780
|
+
const IconAddressBook = createReactComponent("outline", "address-book", "AddressBook", __iconNode$v);
|
|
781
781
|
/**
|
|
782
782
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
783
783
|
*
|
|
784
784
|
* This source code is licensed under the MIT license.
|
|
785
785
|
* See the LICENSE file in the root directory of this source tree.
|
|
786
786
|
*/
|
|
787
|
-
const __iconNode$
|
|
788
|
-
const IconAlertCircle = createReactComponent("outline", "alert-circle", "AlertCircle", __iconNode$
|
|
787
|
+
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" }]];
|
|
788
|
+
const IconAlertCircle = createReactComponent("outline", "alert-circle", "AlertCircle", __iconNode$u);
|
|
789
789
|
/**
|
|
790
790
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
791
791
|
*
|
|
792
792
|
* This source code is licensed under the MIT license.
|
|
793
793
|
* See the LICENSE file in the root directory of this source tree.
|
|
794
794
|
*/
|
|
795
|
-
const __iconNode$
|
|
796
|
-
const IconAlertTriangle = createReactComponent("outline", "alert-triangle", "AlertTriangle", __iconNode$
|
|
795
|
+
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" }]];
|
|
796
|
+
const IconAlertTriangle = createReactComponent("outline", "alert-triangle", "AlertTriangle", __iconNode$t);
|
|
797
797
|
/**
|
|
798
798
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
799
799
|
*
|
|
800
800
|
* This source code is licensed under the MIT license.
|
|
801
801
|
* See the LICENSE file in the root directory of this source tree.
|
|
802
802
|
*/
|
|
803
|
-
const __iconNode$
|
|
804
|
-
const IconArrowNarrowDown = createReactComponent("outline", "arrow-narrow-down", "ArrowNarrowDown", __iconNode$
|
|
803
|
+
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" }]];
|
|
804
|
+
const IconArrowNarrowDown = createReactComponent("outline", "arrow-narrow-down", "ArrowNarrowDown", __iconNode$s);
|
|
805
805
|
/**
|
|
806
806
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
807
807
|
*
|
|
808
808
|
* This source code is licensed under the MIT license.
|
|
809
809
|
* See the LICENSE file in the root directory of this source tree.
|
|
810
810
|
*/
|
|
811
|
-
const __iconNode$
|
|
812
|
-
const IconArrowNarrowUp = createReactComponent("outline", "arrow-narrow-up", "ArrowNarrowUp", __iconNode$
|
|
811
|
+
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" }]];
|
|
812
|
+
const IconArrowNarrowUp = createReactComponent("outline", "arrow-narrow-up", "ArrowNarrowUp", __iconNode$r);
|
|
813
813
|
/**
|
|
814
814
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
815
815
|
*
|
|
816
816
|
* This source code is licensed under the MIT license.
|
|
817
817
|
* See the LICENSE file in the root directory of this source tree.
|
|
818
818
|
*/
|
|
819
|
-
const __iconNode$
|
|
820
|
-
const IconCalendar = createReactComponent("outline", "calendar", "Calendar", __iconNode$
|
|
819
|
+
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" }]];
|
|
820
|
+
const IconCalendar = createReactComponent("outline", "calendar", "Calendar", __iconNode$q);
|
|
821
821
|
/**
|
|
822
822
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
823
823
|
*
|
|
824
824
|
* This source code is licensed under the MIT license.
|
|
825
825
|
* See the LICENSE file in the root directory of this source tree.
|
|
826
826
|
*/
|
|
827
|
-
const __iconNode$
|
|
828
|
-
const IconCheck = createReactComponent("outline", "check", "Check", __iconNode$
|
|
827
|
+
const __iconNode$p = [["path", { "d": "M5 12l5 5l10 -10", "key": "svg-0" }]];
|
|
828
|
+
const IconCheck = createReactComponent("outline", "check", "Check", __iconNode$p);
|
|
829
829
|
/**
|
|
830
830
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
831
831
|
*
|
|
832
832
|
* This source code is licensed under the MIT license.
|
|
833
833
|
* See the LICENSE file in the root directory of this source tree.
|
|
834
834
|
*/
|
|
835
|
-
const __iconNode$
|
|
836
|
-
const IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode$
|
|
835
|
+
const __iconNode$o = [["path", { "d": "M6 9l6 6l6 -6", "key": "svg-0" }]];
|
|
836
|
+
const IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode$o);
|
|
837
837
|
/**
|
|
838
838
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
839
839
|
*
|
|
840
840
|
* This source code is licensed under the MIT license.
|
|
841
841
|
* See the LICENSE file in the root directory of this source tree.
|
|
842
842
|
*/
|
|
843
|
-
const __iconNode$
|
|
844
|
-
const IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode$
|
|
843
|
+
const __iconNode$n = [["path", { "d": "M15 6l-6 6l6 6", "key": "svg-0" }]];
|
|
844
|
+
const IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode$n);
|
|
845
845
|
/**
|
|
846
846
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
847
847
|
*
|
|
848
848
|
* This source code is licensed under the MIT license.
|
|
849
849
|
* See the LICENSE file in the root directory of this source tree.
|
|
850
850
|
*/
|
|
851
|
-
const __iconNode$
|
|
852
|
-
const IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode$
|
|
851
|
+
const __iconNode$m = [["path", { "d": "M9 6l6 6l-6 6", "key": "svg-0" }]];
|
|
852
|
+
const IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode$m);
|
|
853
853
|
/**
|
|
854
854
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
855
855
|
*
|
|
856
856
|
* This source code is licensed under the MIT license.
|
|
857
857
|
* See the LICENSE file in the root directory of this source tree.
|
|
858
858
|
*/
|
|
859
|
-
const __iconNode$
|
|
860
|
-
const IconChevronUp = createReactComponent("outline", "chevron-up", "ChevronUp", __iconNode$
|
|
859
|
+
const __iconNode$l = [["path", { "d": "M6 15l6 -6l6 6", "key": "svg-0" }]];
|
|
860
|
+
const IconChevronUp = createReactComponent("outline", "chevron-up", "ChevronUp", __iconNode$l);
|
|
861
861
|
/**
|
|
862
862
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
863
863
|
*
|
|
864
864
|
* This source code is licensed under the MIT license.
|
|
865
865
|
* See the LICENSE file in the root directory of this source tree.
|
|
866
866
|
*/
|
|
867
|
-
const __iconNode$
|
|
868
|
-
const IconChevronsLeft = createReactComponent("outline", "chevrons-left", "ChevronsLeft", __iconNode$
|
|
867
|
+
const __iconNode$k = [["path", { "d": "M11 7l-5 5l5 5", "key": "svg-0" }], ["path", { "d": "M17 7l-5 5l5 5", "key": "svg-1" }]];
|
|
868
|
+
const IconChevronsLeft = createReactComponent("outline", "chevrons-left", "ChevronsLeft", __iconNode$k);
|
|
869
869
|
/**
|
|
870
870
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
871
871
|
*
|
|
872
872
|
* This source code is licensed under the MIT license.
|
|
873
873
|
* See the LICENSE file in the root directory of this source tree.
|
|
874
874
|
*/
|
|
875
|
-
const __iconNode$
|
|
876
|
-
const IconChevronsRight = createReactComponent("outline", "chevrons-right", "ChevronsRight", __iconNode$
|
|
875
|
+
const __iconNode$j = [["path", { "d": "M7 7l5 5l-5 5", "key": "svg-0" }], ["path", { "d": "M13 7l5 5l-5 5", "key": "svg-1" }]];
|
|
876
|
+
const IconChevronsRight = createReactComponent("outline", "chevrons-right", "ChevronsRight", __iconNode$j);
|
|
877
877
|
/**
|
|
878
878
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
879
879
|
*
|
|
880
880
|
* This source code is licensed under the MIT license.
|
|
881
881
|
* See the LICENSE file in the root directory of this source tree.
|
|
882
882
|
*/
|
|
883
|
-
const __iconNode$
|
|
884
|
-
const IconCircleCheck = createReactComponent("outline", "circle-check", "CircleCheck", __iconNode$
|
|
883
|
+
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" }]];
|
|
884
|
+
const IconCircleCheck = createReactComponent("outline", "circle-check", "CircleCheck", __iconNode$i);
|
|
885
885
|
/**
|
|
886
886
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
887
887
|
*
|
|
888
888
|
* This source code is licensed under the MIT license.
|
|
889
889
|
* See the LICENSE file in the root directory of this source tree.
|
|
890
890
|
*/
|
|
891
|
-
const __iconNode$
|
|
892
|
-
const IconClock = createReactComponent("outline", "clock", "Clock", __iconNode$
|
|
891
|
+
const __iconNode$h = [["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" }]];
|
|
892
|
+
const IconClock = createReactComponent("outline", "clock", "Clock", __iconNode$h);
|
|
893
893
|
/**
|
|
894
894
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
895
895
|
*
|
|
896
896
|
* This source code is licensed under the MIT license.
|
|
897
897
|
* See the LICENSE file in the root directory of this source tree.
|
|
898
898
|
*/
|
|
899
|
-
const __iconNode$
|
|
900
|
-
const IconDotsVertical = createReactComponent("outline", "dots-vertical", "DotsVertical", __iconNode$
|
|
899
|
+
const __iconNode$g = [["path", { "d": "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "key": "svg-0" }], ["path", { "d": "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "key": "svg-1" }], ["path", { "d": "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "key": "svg-2" }]];
|
|
900
|
+
const IconDotsVertical = createReactComponent("outline", "dots-vertical", "DotsVertical", __iconNode$g);
|
|
901
901
|
/**
|
|
902
902
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
903
903
|
*
|
|
904
904
|
* This source code is licensed under the MIT license.
|
|
905
905
|
* See the LICENSE file in the root directory of this source tree.
|
|
906
906
|
*/
|
|
907
|
-
const __iconNode$
|
|
908
|
-
const IconEyeOff = createReactComponent("outline", "eye-off", "EyeOff", __iconNode$
|
|
907
|
+
const __iconNode$f = [["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" }]];
|
|
908
|
+
const IconEyeOff = createReactComponent("outline", "eye-off", "EyeOff", __iconNode$f);
|
|
909
909
|
/**
|
|
910
910
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
911
911
|
*
|
|
912
912
|
* This source code is licensed under the MIT license.
|
|
913
913
|
* See the LICENSE file in the root directory of this source tree.
|
|
914
914
|
*/
|
|
915
|
-
const __iconNode$
|
|
916
|
-
const IconEye = createReactComponent("outline", "eye", "Eye", __iconNode$
|
|
915
|
+
const __iconNode$e = [["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" }]];
|
|
916
|
+
const IconEye = createReactComponent("outline", "eye", "Eye", __iconNode$e);
|
|
917
917
|
/**
|
|
918
918
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
919
919
|
*
|
|
920
920
|
* This source code is licensed under the MIT license.
|
|
921
921
|
* See the LICENSE file in the root directory of this source tree.
|
|
922
922
|
*/
|
|
923
|
-
const __iconNode$
|
|
924
|
-
const
|
|
923
|
+
const __iconNode$d = [["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" }]];
|
|
924
|
+
const IconFileTypePdf = createReactComponent("outline", "file-type-pdf", "FileTypePdf", __iconNode$d);
|
|
925
925
|
/**
|
|
926
926
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
927
927
|
*
|
|
928
928
|
* This source code is licensed under the MIT license.
|
|
929
929
|
* See the LICENSE file in the root directory of this source tree.
|
|
930
930
|
*/
|
|
931
|
-
const __iconNode$
|
|
932
|
-
const
|
|
931
|
+
const __iconNode$c = [["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" }]];
|
|
932
|
+
const IconFile = createReactComponent("outline", "file", "File", __iconNode$c);
|
|
933
933
|
/**
|
|
934
934
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
935
935
|
*
|
|
936
936
|
* This source code is licensed under the MIT license.
|
|
937
937
|
* See the LICENSE file in the root directory of this source tree.
|
|
938
938
|
*/
|
|
939
|
-
const __iconNode$
|
|
940
|
-
const
|
|
939
|
+
const __iconNode$b = [["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" }]];
|
|
940
|
+
const IconInfoCircle = createReactComponent("outline", "info-circle", "InfoCircle", __iconNode$b);
|
|
941
941
|
/**
|
|
942
942
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
943
943
|
*
|
|
944
944
|
* This source code is licensed under the MIT license.
|
|
945
945
|
* See the LICENSE file in the root directory of this source tree.
|
|
946
946
|
*/
|
|
947
|
-
const __iconNode$
|
|
948
|
-
const
|
|
947
|
+
const __iconNode$a = [["path", { "d": "M12 3a9 9 0 1 0 9 9", "key": "svg-0" }]];
|
|
948
|
+
const IconLoader2 = createReactComponent("outline", "loader-2", "Loader2", __iconNode$a);
|
|
949
|
+
/**
|
|
950
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
951
|
+
*
|
|
952
|
+
* This source code is licensed under the MIT license.
|
|
953
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
954
|
+
*/
|
|
955
|
+
const __iconNode$9 = [["path", { "d": "M5 12l14 0", "key": "svg-0" }]];
|
|
956
|
+
const IconMinus = createReactComponent("outline", "minus", "Minus", __iconNode$9);
|
|
957
|
+
/**
|
|
958
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
959
|
+
*
|
|
960
|
+
* This source code is licensed under the MIT license.
|
|
961
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
962
|
+
*/
|
|
963
|
+
const __iconNode$8 = [["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" }]];
|
|
964
|
+
const IconMoon = createReactComponent("outline", "moon", "Moon", __iconNode$8);
|
|
965
|
+
/**
|
|
966
|
+
* @license @tabler/icons-react v3.35.0 - MIT
|
|
967
|
+
*
|
|
968
|
+
* This source code is licensed under the MIT license.
|
|
969
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
970
|
+
*/
|
|
971
|
+
const __iconNode$7 = [["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" }]];
|
|
972
|
+
const IconPhoto = createReactComponent("outline", "photo", "Photo", __iconNode$7);
|
|
949
973
|
/**
|
|
950
974
|
* @license @tabler/icons-react v3.35.0 - MIT
|
|
951
975
|
*
|
|
@@ -1461,7 +1485,8 @@ function Stepper({
|
|
|
1461
1485
|
currentStep,
|
|
1462
1486
|
orientation = "horizontal",
|
|
1463
1487
|
className,
|
|
1464
|
-
onStepClick
|
|
1488
|
+
onStepClick,
|
|
1489
|
+
errorSteps = []
|
|
1465
1490
|
}) {
|
|
1466
1491
|
const isHorizontal = orientation === "horizontal";
|
|
1467
1492
|
return /* @__PURE__ */ jsx(
|
|
@@ -1479,13 +1504,15 @@ function Stepper({
|
|
|
1479
1504
|
const isCompleted = index < currentStep;
|
|
1480
1505
|
const isActive = index === currentStep;
|
|
1481
1506
|
const isDisabled = step.disabled;
|
|
1507
|
+
const isError = errorSteps.includes(index);
|
|
1482
1508
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1483
1509
|
/* @__PURE__ */ jsxs(
|
|
1484
1510
|
"div",
|
|
1485
1511
|
{
|
|
1486
1512
|
className: clsx("ina-stepper__item", {
|
|
1487
|
-
"ina-stepper__item--completed": isCompleted,
|
|
1488
|
-
"ina-stepper__item--active": isActive,
|
|
1513
|
+
"ina-stepper__item--completed": isCompleted && !isError,
|
|
1514
|
+
"ina-stepper__item--active": isActive && !isError,
|
|
1515
|
+
"ina-stepper__item--error": isError,
|
|
1489
1516
|
"ina-stepper__item--disabled": isDisabled,
|
|
1490
1517
|
"ina-stepper__item--clickable": onStepClick && !isDisabled
|
|
1491
1518
|
}),
|
|
@@ -1519,7 +1546,7 @@ function Stepper({
|
|
|
1519
1546
|
"div",
|
|
1520
1547
|
{
|
|
1521
1548
|
className: clsx("ina-stepper__separator", {
|
|
1522
|
-
"ina-stepper__separator--completed": isCompleted
|
|
1549
|
+
"ina-stepper__separator--completed": isCompleted && !isError
|
|
1523
1550
|
})
|
|
1524
1551
|
}
|
|
1525
1552
|
)
|
|
@@ -2887,6 +2914,321 @@ function FileUpload({
|
|
|
2887
2914
|
] }, index)) })
|
|
2888
2915
|
] });
|
|
2889
2916
|
}
|
|
2917
|
+
function SingleFileUpload({
|
|
2918
|
+
title = "Unggah File",
|
|
2919
|
+
description = "Description",
|
|
2920
|
+
accept = "",
|
|
2921
|
+
maxSize = 0,
|
|
2922
|
+
allowedExtensions,
|
|
2923
|
+
validateMagicNumber: validateMagicNumber$1 = true,
|
|
2924
|
+
disabled = false,
|
|
2925
|
+
className = "",
|
|
2926
|
+
progress: externalProgress,
|
|
2927
|
+
status: externalStatus,
|
|
2928
|
+
onChange,
|
|
2929
|
+
onRemove
|
|
2930
|
+
}) {
|
|
2931
|
+
const fileInputRef = useRef(null);
|
|
2932
|
+
const [file, setFile] = useState(null);
|
|
2933
|
+
const [internalProgress, setInternalProgress] = useState(0);
|
|
2934
|
+
const [internalStatus, setInternalStatus] = useState("idle");
|
|
2935
|
+
const [isActive, setIsActive] = useState(false);
|
|
2936
|
+
const progress = externalProgress !== void 0 ? externalProgress : internalProgress;
|
|
2937
|
+
const status = externalStatus !== void 0 ? externalStatus : internalStatus;
|
|
2938
|
+
const triggerFileInput = useCallback(() => {
|
|
2939
|
+
var _a;
|
|
2940
|
+
if (disabled || file) return;
|
|
2941
|
+
(_a = fileInputRef.current) == null ? void 0 : _a.click();
|
|
2942
|
+
}, [disabled, file]);
|
|
2943
|
+
const handleFileChange = useCallback(
|
|
2944
|
+
async (event) => {
|
|
2945
|
+
var _a;
|
|
2946
|
+
const selectedFile = (_a = event.target.files) == null ? void 0 : _a[0];
|
|
2947
|
+
if (!selectedFile) return;
|
|
2948
|
+
const sanitizedFileName = sanitizeFileName(selectedFile.name);
|
|
2949
|
+
if (sanitizedFileName !== selectedFile.name) {
|
|
2950
|
+
const errorResult = {
|
|
2951
|
+
isValid: false,
|
|
2952
|
+
error: "Nama file mengandung karakter yang tidak diizinkan",
|
|
2953
|
+
file: selectedFile
|
|
2954
|
+
};
|
|
2955
|
+
setFile(null);
|
|
2956
|
+
setInternalStatus("error");
|
|
2957
|
+
onChange == null ? void 0 : onChange(null, errorResult);
|
|
2958
|
+
if (fileInputRef.current) {
|
|
2959
|
+
fileInputRef.current.value = "";
|
|
2960
|
+
}
|
|
2961
|
+
return;
|
|
2962
|
+
}
|
|
2963
|
+
if (allowedExtensions && allowedExtensions.length > 0) {
|
|
2964
|
+
const fileName = selectedFile.name.toLowerCase();
|
|
2965
|
+
const extension = fileName.substring(fileName.lastIndexOf(".") + 1);
|
|
2966
|
+
if (!allowedExtensions.includes(extension.toLowerCase())) {
|
|
2967
|
+
const errorResult = {
|
|
2968
|
+
isValid: false,
|
|
2969
|
+
error: `Ekstensi file harus: ${allowedExtensions.join(", ")}`,
|
|
2970
|
+
file: selectedFile
|
|
2971
|
+
};
|
|
2972
|
+
setFile(null);
|
|
2973
|
+
setInternalStatus("error");
|
|
2974
|
+
onChange == null ? void 0 : onChange(null, errorResult);
|
|
2975
|
+
if (fileInputRef.current) {
|
|
2976
|
+
fileInputRef.current.value = "";
|
|
2977
|
+
}
|
|
2978
|
+
return;
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
const validation = validateFile(selectedFile, {
|
|
2982
|
+
allowedTypes: accept || void 0,
|
|
2983
|
+
maxSize: maxSize || void 0,
|
|
2984
|
+
validateExtension: true
|
|
2985
|
+
});
|
|
2986
|
+
if (!validation.isValid) {
|
|
2987
|
+
setFile(null);
|
|
2988
|
+
setInternalStatus("error");
|
|
2989
|
+
onChange == null ? void 0 : onChange(null, validation);
|
|
2990
|
+
if (fileInputRef.current) {
|
|
2991
|
+
fileInputRef.current.value = "";
|
|
2992
|
+
}
|
|
2993
|
+
return;
|
|
2994
|
+
}
|
|
2995
|
+
if (validateMagicNumber$1 && selectedFile.type) {
|
|
2996
|
+
const magicValidation = await validateMagicNumber(
|
|
2997
|
+
selectedFile,
|
|
2998
|
+
selectedFile.type
|
|
2999
|
+
);
|
|
3000
|
+
if (!magicValidation.isValid) {
|
|
3001
|
+
const errorResult = {
|
|
3002
|
+
isValid: false,
|
|
3003
|
+
error: magicValidation.error || "File signature tidak valid",
|
|
3004
|
+
file: selectedFile
|
|
3005
|
+
};
|
|
3006
|
+
setFile(null);
|
|
3007
|
+
setInternalStatus("error");
|
|
3008
|
+
onChange == null ? void 0 : onChange(null, errorResult);
|
|
3009
|
+
if (fileInputRef.current) {
|
|
3010
|
+
fileInputRef.current.value = "";
|
|
3011
|
+
}
|
|
3012
|
+
return;
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
setFile(selectedFile);
|
|
3016
|
+
setInternalStatus("success");
|
|
3017
|
+
onChange == null ? void 0 : onChange(selectedFile, null);
|
|
3018
|
+
if (fileInputRef.current) {
|
|
3019
|
+
fileInputRef.current.value = "";
|
|
3020
|
+
}
|
|
3021
|
+
},
|
|
3022
|
+
[accept, maxSize, allowedExtensions, validateMagicNumber$1, onChange]
|
|
3023
|
+
);
|
|
3024
|
+
const handleRemove = useCallback(() => {
|
|
3025
|
+
setFile(null);
|
|
3026
|
+
setInternalProgress(0);
|
|
3027
|
+
setInternalStatus("idle");
|
|
3028
|
+
setIsActive(false);
|
|
3029
|
+
if (fileInputRef.current) {
|
|
3030
|
+
fileInputRef.current.value = "";
|
|
3031
|
+
}
|
|
3032
|
+
onRemove == null ? void 0 : onRemove();
|
|
3033
|
+
onChange == null ? void 0 : onChange(null, null);
|
|
3034
|
+
}, [onRemove, onChange]);
|
|
3035
|
+
const handleClick = useCallback(() => {
|
|
3036
|
+
if (disabled || file) return;
|
|
3037
|
+
triggerFileInput();
|
|
3038
|
+
}, [disabled, file, triggerFileInput]);
|
|
3039
|
+
const handleFocus = useCallback(() => {
|
|
3040
|
+
if (disabled || file) return;
|
|
3041
|
+
setIsActive(true);
|
|
3042
|
+
}, [disabled, file]);
|
|
3043
|
+
const handleBlur = useCallback(() => {
|
|
3044
|
+
setIsActive(false);
|
|
3045
|
+
}, []);
|
|
3046
|
+
const handleDragOver = useCallback(
|
|
3047
|
+
(e) => {
|
|
3048
|
+
if (disabled || file) return;
|
|
3049
|
+
e.preventDefault();
|
|
3050
|
+
e.stopPropagation();
|
|
3051
|
+
setIsActive(true);
|
|
3052
|
+
},
|
|
3053
|
+
[disabled, file]
|
|
3054
|
+
);
|
|
3055
|
+
const handleDragLeave = useCallback(
|
|
3056
|
+
(e) => {
|
|
3057
|
+
if (disabled || file) return;
|
|
3058
|
+
e.preventDefault();
|
|
3059
|
+
e.stopPropagation();
|
|
3060
|
+
setIsActive(false);
|
|
3061
|
+
},
|
|
3062
|
+
[disabled, file]
|
|
3063
|
+
);
|
|
3064
|
+
const handleDrop = useCallback(
|
|
3065
|
+
async (e) => {
|
|
3066
|
+
if (disabled || file) return;
|
|
3067
|
+
e.preventDefault();
|
|
3068
|
+
e.stopPropagation();
|
|
3069
|
+
setIsActive(false);
|
|
3070
|
+
const droppedFile = e.dataTransfer.files[0];
|
|
3071
|
+
if (!droppedFile) return;
|
|
3072
|
+
const sanitizedFileName = sanitizeFileName(droppedFile.name);
|
|
3073
|
+
if (sanitizedFileName !== droppedFile.name) {
|
|
3074
|
+
const errorResult = {
|
|
3075
|
+
isValid: false,
|
|
3076
|
+
error: "Nama file mengandung karakter yang tidak diizinkan",
|
|
3077
|
+
file: droppedFile
|
|
3078
|
+
};
|
|
3079
|
+
setFile(null);
|
|
3080
|
+
setInternalStatus("error");
|
|
3081
|
+
onChange == null ? void 0 : onChange(null, errorResult);
|
|
3082
|
+
return;
|
|
3083
|
+
}
|
|
3084
|
+
if (allowedExtensions && allowedExtensions.length > 0) {
|
|
3085
|
+
const fileName = droppedFile.name.toLowerCase();
|
|
3086
|
+
const extension = fileName.substring(fileName.lastIndexOf(".") + 1);
|
|
3087
|
+
if (!allowedExtensions.includes(extension.toLowerCase())) {
|
|
3088
|
+
const errorResult = {
|
|
3089
|
+
isValid: false,
|
|
3090
|
+
error: `Ekstensi file harus: ${allowedExtensions.join(", ")}`,
|
|
3091
|
+
file: droppedFile
|
|
3092
|
+
};
|
|
3093
|
+
setFile(null);
|
|
3094
|
+
setInternalStatus("error");
|
|
3095
|
+
onChange == null ? void 0 : onChange(null, errorResult);
|
|
3096
|
+
return;
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
const validation = validateFile(droppedFile, {
|
|
3100
|
+
allowedTypes: accept || void 0,
|
|
3101
|
+
maxSize: maxSize || void 0,
|
|
3102
|
+
validateExtension: true
|
|
3103
|
+
});
|
|
3104
|
+
if (!validation.isValid) {
|
|
3105
|
+
setFile(null);
|
|
3106
|
+
setInternalStatus("error");
|
|
3107
|
+
onChange == null ? void 0 : onChange(null, validation);
|
|
3108
|
+
return;
|
|
3109
|
+
}
|
|
3110
|
+
if (validateMagicNumber$1 && droppedFile.type) {
|
|
3111
|
+
const magicValidation = await validateMagicNumber(
|
|
3112
|
+
droppedFile,
|
|
3113
|
+
droppedFile.type
|
|
3114
|
+
);
|
|
3115
|
+
if (!magicValidation.isValid) {
|
|
3116
|
+
const errorResult = {
|
|
3117
|
+
isValid: false,
|
|
3118
|
+
error: magicValidation.error || "File signature tidak valid",
|
|
3119
|
+
file: droppedFile
|
|
3120
|
+
};
|
|
3121
|
+
setFile(null);
|
|
3122
|
+
setInternalStatus("error");
|
|
3123
|
+
onChange == null ? void 0 : onChange(null, errorResult);
|
|
3124
|
+
return;
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
setFile(droppedFile);
|
|
3128
|
+
setInternalStatus("success");
|
|
3129
|
+
onChange == null ? void 0 : onChange(droppedFile, null);
|
|
3130
|
+
},
|
|
3131
|
+
[
|
|
3132
|
+
disabled,
|
|
3133
|
+
file,
|
|
3134
|
+
accept,
|
|
3135
|
+
maxSize,
|
|
3136
|
+
allowedExtensions,
|
|
3137
|
+
validateMagicNumber$1,
|
|
3138
|
+
onChange
|
|
3139
|
+
]
|
|
3140
|
+
);
|
|
3141
|
+
const getFileIcon = () => {
|
|
3142
|
+
if (!file) return null;
|
|
3143
|
+
const fileType = file.type;
|
|
3144
|
+
const fileName = file.name.toLowerCase();
|
|
3145
|
+
if (fileType === "application/pdf" || fileName.endsWith(".pdf")) {
|
|
3146
|
+
return /* @__PURE__ */ jsx(IconFileTypePdf, { size: 16 });
|
|
3147
|
+
}
|
|
3148
|
+
if (fileType.startsWith("image/")) {
|
|
3149
|
+
return /* @__PURE__ */ jsx(IconPhoto, { size: 16 });
|
|
3150
|
+
}
|
|
3151
|
+
return /* @__PURE__ */ jsx(IconFile, { size: 16 });
|
|
3152
|
+
};
|
|
3153
|
+
const containerClasses = clsx("ina-single-file-upload__container", {
|
|
3154
|
+
"ina-single-file-upload__container--active": isActive && !disabled && !file,
|
|
3155
|
+
"ina-single-file-upload__container--disabled": disabled
|
|
3156
|
+
});
|
|
3157
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx("ina-single-file-upload", className), children: [
|
|
3158
|
+
/* @__PURE__ */ jsx(
|
|
3159
|
+
"input",
|
|
3160
|
+
{
|
|
3161
|
+
ref: fileInputRef,
|
|
3162
|
+
type: "file",
|
|
3163
|
+
accept,
|
|
3164
|
+
disabled,
|
|
3165
|
+
className: "ina-single-file-upload__input",
|
|
3166
|
+
onChange: handleFileChange
|
|
3167
|
+
}
|
|
3168
|
+
),
|
|
3169
|
+
/* @__PURE__ */ jsxs(
|
|
3170
|
+
"div",
|
|
3171
|
+
{
|
|
3172
|
+
className: containerClasses,
|
|
3173
|
+
onClick: handleClick,
|
|
3174
|
+
onFocus: handleFocus,
|
|
3175
|
+
onBlur: handleBlur,
|
|
3176
|
+
onDragOver: handleDragOver,
|
|
3177
|
+
onDragLeave: handleDragLeave,
|
|
3178
|
+
onDrop: handleDrop,
|
|
3179
|
+
tabIndex: disabled || file ? -1 : 0,
|
|
3180
|
+
role: "button",
|
|
3181
|
+
"aria-label": file ? `File: ${file.name}` : "Upload file",
|
|
3182
|
+
children: [
|
|
3183
|
+
!file && status === "idle" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3184
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default", children: /* @__PURE__ */ jsx(IconUpload, { size: 24 }) }),
|
|
3185
|
+
/* @__PURE__ */ jsxs("div", { className: "ina-single-file-upload__content", children: [
|
|
3186
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__title", children: title }),
|
|
3187
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__description", children: description })
|
|
3188
|
+
] })
|
|
3189
|
+
] }),
|
|
3190
|
+
!file && status === "uploading" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3191
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--default", children: /* @__PURE__ */ jsx(IconUpload, { size: 24 }) }),
|
|
3192
|
+
/* @__PURE__ */ jsxs("div", { className: "ina-single-file-upload__progress", children: [
|
|
3193
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__progress-bar", children: /* @__PURE__ */ jsx(
|
|
3194
|
+
"div",
|
|
3195
|
+
{
|
|
3196
|
+
className: "ina-single-file-upload__progress-fill",
|
|
3197
|
+
style: { width: `${progress}%` }
|
|
3198
|
+
}
|
|
3199
|
+
) }),
|
|
3200
|
+
/* @__PURE__ */ jsxs("div", { className: "ina-single-file-upload__progress-text", children: [
|
|
3201
|
+
"Uploading... ",
|
|
3202
|
+
progress,
|
|
3203
|
+
"%"
|
|
3204
|
+
] })
|
|
3205
|
+
] })
|
|
3206
|
+
] }),
|
|
3207
|
+
file && status === "success" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3208
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__icon-wrapper ina-single-file-upload__icon-wrapper--file", children: getFileIcon() }),
|
|
3209
|
+
/* @__PURE__ */ jsxs("div", { className: "ina-single-file-upload__content", children: [
|
|
3210
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__title", children: file.name }),
|
|
3211
|
+
/* @__PURE__ */ jsx("div", { className: "ina-single-file-upload__description", children: description })
|
|
3212
|
+
] }),
|
|
3213
|
+
/* @__PURE__ */ jsx(
|
|
3214
|
+
"button",
|
|
3215
|
+
{
|
|
3216
|
+
type: "button",
|
|
3217
|
+
className: "ina-single-file-upload__delete-button",
|
|
3218
|
+
onClick: (e) => {
|
|
3219
|
+
e.stopPropagation();
|
|
3220
|
+
handleRemove();
|
|
3221
|
+
},
|
|
3222
|
+
"aria-label": "Remove file",
|
|
3223
|
+
children: /* @__PURE__ */ jsx(IconTrash, { size: 20 })
|
|
3224
|
+
}
|
|
3225
|
+
)
|
|
3226
|
+
] })
|
|
3227
|
+
]
|
|
3228
|
+
}
|
|
3229
|
+
)
|
|
3230
|
+
] });
|
|
3231
|
+
}
|
|
2890
3232
|
function FieldInputTable({
|
|
2891
3233
|
value,
|
|
2892
3234
|
onChange,
|
|
@@ -3545,7 +3887,7 @@ function PasswordInput({
|
|
|
3545
3887
|
className: clsx(
|
|
3546
3888
|
"ina-password-input__wrapper",
|
|
3547
3889
|
`ina-password-input__wrapper--size-${size}`,
|
|
3548
|
-
`ina-password-input__wrapper
|
|
3890
|
+
status !== "neutral" && `ina-password-input__wrapper--${status}`,
|
|
3549
3891
|
disabled && "ina-password-input__wrapper--disabled"
|
|
3550
3892
|
),
|
|
3551
3893
|
children: [
|
|
@@ -3587,32 +3929,23 @@ function PasswordInput({
|
|
|
3587
3929
|
]
|
|
3588
3930
|
}
|
|
3589
3931
|
),
|
|
3590
|
-
bottomText && /* @__PURE__ */ jsxs(
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
children: [
|
|
3598
|
-
/* @__PURE__ */ jsx(
|
|
3599
|
-
"div",
|
|
3600
|
-
{
|
|
3601
|
-
className: clsx(
|
|
3602
|
-
"ina-password-input__helper-text",
|
|
3603
|
-
`ina-password-input__helper-text--${status}`
|
|
3604
|
-
),
|
|
3605
|
-
children: bottomText
|
|
3606
|
-
}
|
|
3932
|
+
bottomText && /* @__PURE__ */ jsxs("div", { className: "ina-password-input__status-area", children: [
|
|
3933
|
+
/* @__PURE__ */ jsx(
|
|
3934
|
+
"div",
|
|
3935
|
+
{
|
|
3936
|
+
className: clsx(
|
|
3937
|
+
"ina-password-input__status-message",
|
|
3938
|
+
status !== "neutral" && `ina-password-input__status-message--${status}`
|
|
3607
3939
|
),
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3940
|
+
children: bottomText
|
|
3941
|
+
}
|
|
3942
|
+
),
|
|
3943
|
+
showCharCount && maxLength != null && /* @__PURE__ */ jsxs("div", { className: "ina-password-input__character-count", children: [
|
|
3944
|
+
inner.length,
|
|
3945
|
+
"/",
|
|
3946
|
+
maxLength
|
|
3947
|
+
] })
|
|
3948
|
+
] })
|
|
3616
3949
|
] });
|
|
3617
3950
|
}
|
|
3618
3951
|
function PhoneInput({
|
|
@@ -4120,7 +4453,7 @@ function Drawer({
|
|
|
4120
4453
|
position = "right",
|
|
4121
4454
|
closeOnBackdrop = true,
|
|
4122
4455
|
className = "",
|
|
4123
|
-
width = "
|
|
4456
|
+
width = "sm",
|
|
4124
4457
|
title,
|
|
4125
4458
|
children
|
|
4126
4459
|
}) {
|
|
@@ -5396,8 +5729,7 @@ function Tooltip({
|
|
|
5396
5729
|
title,
|
|
5397
5730
|
description,
|
|
5398
5731
|
image,
|
|
5399
|
-
|
|
5400
|
-
actions,
|
|
5732
|
+
content,
|
|
5401
5733
|
children,
|
|
5402
5734
|
customContent,
|
|
5403
5735
|
variant = "basic",
|
|
@@ -5463,14 +5795,10 @@ function Tooltip({
|
|
|
5463
5795
|
`ina-tooltip--variant-${variant}`,
|
|
5464
5796
|
{
|
|
5465
5797
|
"ina-tooltip__content--visible": visible,
|
|
5466
|
-
"ina-tooltip__content--hidden": !visible
|
|
5798
|
+
"ina-tooltip__content--hidden": !visible,
|
|
5799
|
+
"ina-tooltip__content--show-arrow": showArrow
|
|
5467
5800
|
}
|
|
5468
5801
|
);
|
|
5469
|
-
const arrowClasses = clsx(
|
|
5470
|
-
"ina-tooltip__arrow",
|
|
5471
|
-
`ina-tooltip__arrow--placement-${finalPlacement}`,
|
|
5472
|
-
`ina-tooltip__arrow--variant-${variant}`
|
|
5473
|
-
);
|
|
5474
5802
|
const renderContent = () => {
|
|
5475
5803
|
if (variant === "custom") {
|
|
5476
5804
|
return customContent || null;
|
|
@@ -5486,8 +5814,11 @@ function Tooltip({
|
|
|
5486
5814
|
className: "ina-tooltip__close",
|
|
5487
5815
|
onClick: (e) => {
|
|
5488
5816
|
e.stopPropagation();
|
|
5817
|
+
window.clearTimeout(leaveTimeout.current);
|
|
5818
|
+
window.clearTimeout(enterTimeout.current);
|
|
5819
|
+
setVisible(false);
|
|
5820
|
+
setFinalPlacement(placement);
|
|
5489
5821
|
onClose();
|
|
5490
|
-
hide();
|
|
5491
5822
|
},
|
|
5492
5823
|
"aria-label": "Close tooltip",
|
|
5493
5824
|
children: /* @__PURE__ */ jsx(IconX, { size: 16 })
|
|
@@ -5497,16 +5828,7 @@ function Tooltip({
|
|
|
5497
5828
|
/* @__PURE__ */ jsxs("div", { className: "ina-tooltip__content-section", children: [
|
|
5498
5829
|
title && /* @__PURE__ */ jsx("div", { className: "ina-tooltip__title", children: title }),
|
|
5499
5830
|
description && /* @__PURE__ */ jsx("div", { className: "ina-tooltip__description", children: description }),
|
|
5500
|
-
|
|
5501
|
-
"div",
|
|
5502
|
-
{
|
|
5503
|
-
className: clsx("ina-tooltip__pagination-dot", {
|
|
5504
|
-
"ina-tooltip__pagination-dot--active": i2 + 1 === pagination.current
|
|
5505
|
-
})
|
|
5506
|
-
},
|
|
5507
|
-
i2
|
|
5508
|
-
)) }),
|
|
5509
|
-
actions && actions.length > 0 && /* @__PURE__ */ jsx("div", { className: "ina-tooltip__actions", children: actions.map((action, index) => /* @__PURE__ */ jsx("div", { className: "ina-tooltip__action", children: action }, index)) })
|
|
5831
|
+
content && /* @__PURE__ */ jsx("div", { className: "ina-tooltip__custom-content", children: content })
|
|
5510
5832
|
] })
|
|
5511
5833
|
] });
|
|
5512
5834
|
};
|
|
@@ -5515,23 +5837,21 @@ function Tooltip({
|
|
|
5515
5837
|
{
|
|
5516
5838
|
ref: triggerRef,
|
|
5517
5839
|
className: tooltipContainerClasses,
|
|
5840
|
+
"data-hover": visible ? "true" : void 0,
|
|
5518
5841
|
onMouseEnter: show,
|
|
5519
5842
|
onMouseLeave: hide,
|
|
5520
5843
|
onFocus: show,
|
|
5521
5844
|
onBlur: hide,
|
|
5522
5845
|
children: [
|
|
5523
5846
|
children,
|
|
5524
|
-
visible && /* @__PURE__ */
|
|
5847
|
+
visible && /* @__PURE__ */ jsx(
|
|
5525
5848
|
"div",
|
|
5526
5849
|
{
|
|
5527
5850
|
ref: tooltipRef,
|
|
5528
5851
|
className: tooltipContentClasses,
|
|
5529
5852
|
onMouseEnter: show,
|
|
5530
5853
|
onMouseLeave: hide,
|
|
5531
|
-
children:
|
|
5532
|
-
renderContent(),
|
|
5533
|
-
showArrow && /* @__PURE__ */ jsx("div", { className: arrowClasses })
|
|
5534
|
-
]
|
|
5854
|
+
children: renderContent()
|
|
5535
5855
|
}
|
|
5536
5856
|
)
|
|
5537
5857
|
]
|
|
@@ -7633,18 +7953,17 @@ function YearPicker({
|
|
|
7633
7953
|
let bottom = void 0;
|
|
7634
7954
|
let maxHeight = "400px";
|
|
7635
7955
|
if (spaceBelow < panelRect.height && spaceAbove > spaceBelow) {
|
|
7636
|
-
bottom =
|
|
7956
|
+
bottom = triggerRect.height + 4;
|
|
7637
7957
|
top = void 0;
|
|
7638
7958
|
maxHeight = `${Math.min(spaceAbove - 10, 400)}px`;
|
|
7639
7959
|
} else {
|
|
7640
|
-
top = triggerRect.
|
|
7960
|
+
top = triggerRect.height + 4;
|
|
7641
7961
|
bottom = void 0;
|
|
7642
7962
|
maxHeight = `${Math.min(spaceBelow - 10, 400)}px`;
|
|
7643
7963
|
}
|
|
7644
7964
|
const maxWidth = `${Math.min(panelWidthValue, viewportWidth - 16)}px`;
|
|
7645
7965
|
setPanelStyle({
|
|
7646
|
-
position: "
|
|
7647
|
-
// Use fixed to escape DatePicker panel stacking context
|
|
7966
|
+
position: "absolute",
|
|
7648
7967
|
top: top !== void 0 ? `${top}px` : void 0,
|
|
7649
7968
|
bottom: bottom !== void 0 ? `${bottom}px` : void 0,
|
|
7650
7969
|
left: left !== void 0 ? `${left}px` : void 0,
|
|
@@ -7989,18 +8308,17 @@ function MonthPicker({
|
|
|
7989
8308
|
let bottom = void 0;
|
|
7990
8309
|
let maxHeight = "300px";
|
|
7991
8310
|
if (spaceBelow < panelRect.height && spaceAbove > spaceBelow) {
|
|
7992
|
-
bottom =
|
|
8311
|
+
bottom = triggerRect.height + 4;
|
|
7993
8312
|
top = void 0;
|
|
7994
8313
|
maxHeight = `${Math.min(spaceAbove - 10, 300)}px`;
|
|
7995
8314
|
} else {
|
|
7996
|
-
top = triggerRect.
|
|
8315
|
+
top = triggerRect.height + 4;
|
|
7997
8316
|
bottom = void 0;
|
|
7998
8317
|
maxHeight = `${Math.min(spaceBelow - 10, 300)}px`;
|
|
7999
8318
|
}
|
|
8000
8319
|
const maxWidth = `${Math.min(panelWidthValue, viewportWidth - 16)}px`;
|
|
8001
8320
|
setPanelStyle({
|
|
8002
|
-
position: "
|
|
8003
|
-
// Use fixed to escape DatePicker panel stacking context
|
|
8321
|
+
position: "absolute",
|
|
8004
8322
|
top: top !== void 0 ? `${top}px` : void 0,
|
|
8005
8323
|
bottom: bottom !== void 0 ? `${bottom}px` : void 0,
|
|
8006
8324
|
left: left !== void 0 ? `${left}px` : void 0,
|
|
@@ -9653,6 +9971,7 @@ export {
|
|
|
9653
9971
|
ProgressBar,
|
|
9654
9972
|
RadioInput,
|
|
9655
9973
|
SelectDropdown,
|
|
9974
|
+
SingleFileUpload,
|
|
9656
9975
|
Skeleton,
|
|
9657
9976
|
Spinner,
|
|
9658
9977
|
Stepper,
|
|
@@ -9675,6 +9994,7 @@ export {
|
|
|
9675
9994
|
containsDangerousPatterns,
|
|
9676
9995
|
decodeHtmlEntities,
|
|
9677
9996
|
encodeHtmlEntities,
|
|
9997
|
+
formatFileSize,
|
|
9678
9998
|
formattingThousand,
|
|
9679
9999
|
getAvailableBrands,
|
|
9680
10000
|
getCookie,
|
|
@@ -9700,5 +10020,7 @@ export {
|
|
|
9700
10020
|
useConfirmation,
|
|
9701
10021
|
useForm,
|
|
9702
10022
|
useToast,
|
|
10023
|
+
validateFile,
|
|
10024
|
+
validateMagicNumber as validateFileMagicNumber,
|
|
9703
10025
|
validateInput
|
|
9704
10026
|
};
|