@ctlyst.id/internal-ui 2.1.20 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +567 -354
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +333 -124
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
@@ -2655,12 +2655,56 @@ import {
|
|
2655
2655
|
useModalStyles
|
2656
2656
|
} from "@chakra-ui/react";
|
2657
2657
|
|
2658
|
+
// src/components/nav-item/components/nav-item.tsx
|
2659
|
+
import { Link as Link2 } from "@chakra-ui/react";
|
2660
|
+
import { cx as cx9 } from "@chakra-ui/shared-utils";
|
2661
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
2662
|
+
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
2663
|
+
return /* @__PURE__ */ jsx40(
|
2664
|
+
Link2,
|
2665
|
+
{
|
2666
|
+
"data-test-id": "7quRuVrffI7_tnCF4jUSV",
|
2667
|
+
opacity: isDisabled ? "0.3" : "initial",
|
2668
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
2669
|
+
h: "7.5",
|
2670
|
+
display: "flex",
|
2671
|
+
justifyContent: "space-between",
|
2672
|
+
alignItems: "center",
|
2673
|
+
w: "full",
|
2674
|
+
p: "2",
|
2675
|
+
pl: isChild ? "7" : "2",
|
2676
|
+
color: isActive ? "primary.500" : "black.high",
|
2677
|
+
bg: isActive ? "primary.100" : "white",
|
2678
|
+
className: cx9("catalyst-nav-item", props.className),
|
2679
|
+
textStyle: "text.xs",
|
2680
|
+
fontWeight: isActive ? "semibold" : "regular",
|
2681
|
+
rounded: "sm",
|
2682
|
+
_active: isDisabled ? {} : {
|
2683
|
+
bg: "primary.100"
|
2684
|
+
},
|
2685
|
+
_hover: isDisabled ? {} : {
|
2686
|
+
textDecoration: "none",
|
2687
|
+
bg: isActive ? "primary.100" : "primary.50"
|
2688
|
+
},
|
2689
|
+
...props,
|
2690
|
+
onClick: isDisabled ? void 0 : props.onClick,
|
2691
|
+
children
|
2692
|
+
}
|
2693
|
+
);
|
2694
|
+
};
|
2695
|
+
NavItem.displayName = "NavItem";
|
2696
|
+
NavItem.defaultProps = {
|
2697
|
+
isActive: false,
|
2698
|
+
isChild: false,
|
2699
|
+
isDisabled: false
|
2700
|
+
};
|
2701
|
+
|
2658
2702
|
// src/components/navigation/components/navigation.tsx
|
2659
2703
|
import {
|
2660
2704
|
Box as Box21,
|
2661
2705
|
Button as Button2,
|
2662
2706
|
Flex as Flex6,
|
2663
|
-
Link as
|
2707
|
+
Link as Link3,
|
2664
2708
|
Popover as Popover2,
|
2665
2709
|
PopoverContent as PopoverContent2,
|
2666
2710
|
PopoverTrigger as PopoverTrigger2,
|
@@ -2673,26 +2717,26 @@ import { css as css3 } from "@emotion/react";
|
|
2673
2717
|
|
2674
2718
|
// src/components/navigation/components/mapping-icon.tsx
|
2675
2719
|
import * as Icon2 from "@ctlyst.id/internal-icon";
|
2676
|
-
import { jsx as
|
2720
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
2677
2721
|
var mappingIcon = /* @__PURE__ */ new Map([
|
2678
|
-
["Order", /* @__PURE__ */
|
2679
|
-
["Fulfillment", /* @__PURE__ */
|
2680
|
-
["Transfer Stock", /* @__PURE__ */
|
2681
|
-
["Stock", /* @__PURE__ */
|
2682
|
-
["Product Database", /* @__PURE__ */
|
2683
|
-
["Purchasing", /* @__PURE__ */
|
2684
|
-
["Reseller", /* @__PURE__ */
|
2685
|
-
["Retur", /* @__PURE__ */
|
2686
|
-
["Other", /* @__PURE__ */
|
2687
|
-
["Content", /* @__PURE__ */
|
2688
|
-
["Customer", /* @__PURE__ */
|
2689
|
-
["Voucher", /* @__PURE__ */
|
2722
|
+
["Order", /* @__PURE__ */ jsx41(Icon2.ShoppingBag, { size: 4, color: "inherit" }, "order")],
|
2723
|
+
["Fulfillment", /* @__PURE__ */ jsx41(Icon2.ShoppingCart, { size: 4, color: "inherit" }, "fullfilment")],
|
2724
|
+
["Transfer Stock", /* @__PURE__ */ jsx41(Icon2.Repeat, { size: 4, color: "inherit" }, "transfer-stock")],
|
2725
|
+
["Stock", /* @__PURE__ */ jsx41(Icon2.Box, { size: 4, color: "inherit" }, "stock")],
|
2726
|
+
["Product Database", /* @__PURE__ */ jsx41(Icon2.Layers, { size: 4, color: "inherit" }, "product-database")],
|
2727
|
+
["Purchasing", /* @__PURE__ */ jsx41(Icon2.DollarSign, { size: 4, color: "inherit" }, "purchasing")],
|
2728
|
+
["Reseller", /* @__PURE__ */ jsx41(Icon2.Users, { size: 4, color: "inherit" }, "reseller")],
|
2729
|
+
["Retur", /* @__PURE__ */ jsx41(Icon2.RotateCcw, { size: 4, color: "inherit" }, "retur")],
|
2730
|
+
["Other", /* @__PURE__ */ jsx41(Icon2.Settings, { size: 4, color: "inherit" }, "other")],
|
2731
|
+
["Content", /* @__PURE__ */ jsx41(Icon2.Layout, { size: 4, color: "inherit" }, "content")],
|
2732
|
+
["Customer", /* @__PURE__ */ jsx41(Icon2.HelpCircle, { size: 4, color: "inherit" }, "content")],
|
2733
|
+
["Voucher", /* @__PURE__ */ jsx41(Icon2.Gift, { size: 4, color: "inherit" }, "content")]
|
2690
2734
|
]);
|
2691
2735
|
|
2692
2736
|
// src/components/navigation/components/navigation.tsx
|
2693
|
-
import { Fragment as Fragment4, jsx as
|
2737
|
+
import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
2694
2738
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
2695
|
-
return /* @__PURE__ */
|
2739
|
+
return /* @__PURE__ */ jsx42(Box21, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ jsx42(
|
2696
2740
|
Flex6,
|
2697
2741
|
{
|
2698
2742
|
bg: "white",
|
@@ -2707,8 +2751,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2707
2751
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
2708
2752
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
2709
2753
|
const activeBg = isActive ? "primary.500" : void 0;
|
2710
|
-
return /* @__PURE__ */
|
2711
|
-
/* @__PURE__ */
|
2754
|
+
return /* @__PURE__ */ jsx42(Popover2, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
2755
|
+
/* @__PURE__ */ jsx42(PopoverTrigger2, { children: /* @__PURE__ */ jsx42(
|
2712
2756
|
Button2,
|
2713
2757
|
{
|
2714
2758
|
h: 7.5,
|
@@ -2722,11 +2766,11 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2722
2766
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
2723
2767
|
color: isActive ? "primary.50" : "black.high",
|
2724
2768
|
leftIcon: mappingIcon.get(navigation.title),
|
2725
|
-
rightIcon: /* @__PURE__ */
|
2769
|
+
rightIcon: /* @__PURE__ */ jsx42(Icon3.ChevronDown, { size: 4, color: "inherit" }),
|
2726
2770
|
children: navigation.title
|
2727
2771
|
}
|
2728
2772
|
) }),
|
2729
|
-
navigation.children && /* @__PURE__ */
|
2773
|
+
navigation.children && /* @__PURE__ */ jsx42(Portal, { children: /* @__PURE__ */ jsx42(Box21, { zIndex: "popover", children: /* @__PURE__ */ jsx42(
|
2730
2774
|
PopoverContent2,
|
2731
2775
|
{
|
2732
2776
|
bg: useColorModeValue8("white", "ebony-clay.800"),
|
@@ -2738,8 +2782,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2738
2782
|
const link = navHost ? `${navHost}${navLink}` : navLink;
|
2739
2783
|
const isLocalLink = host === navHost;
|
2740
2784
|
const isActiveSub = activePath === navLink;
|
2741
|
-
return /* @__PURE__ */
|
2742
|
-
|
2785
|
+
return /* @__PURE__ */ jsx42(
|
2786
|
+
Link3,
|
2743
2787
|
{
|
2744
2788
|
as: isLocalLink ? as : void 0,
|
2745
2789
|
href: link,
|
@@ -2770,8 +2814,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2770
2814
|
py: 4,
|
2771
2815
|
children: [
|
2772
2816
|
mappingIcon.get(navigation.title),
|
2773
|
-
/* @__PURE__ */
|
2774
|
-
isActiveSub && /* @__PURE__ */
|
2817
|
+
/* @__PURE__ */ jsx42(Text8, { fontSize: "text.sm", ml: 3, children: title }),
|
2818
|
+
isActiveSub && /* @__PURE__ */ jsx42(
|
2775
2819
|
Box21,
|
2776
2820
|
{
|
2777
2821
|
width: 0.5,
|
@@ -2805,9 +2849,9 @@ Navigation.defaultProps = {
|
|
2805
2849
|
var navigation_default = Navigation;
|
2806
2850
|
|
2807
2851
|
// src/components/navigation/components/navigation-bar.tsx
|
2808
|
-
import { Box as Box22, Button as Button3, Flex as Flex7, Link as
|
2852
|
+
import { Box as Box22, Button as Button3, Flex as Flex7, Link as Link4, Popover as Popover3, PopoverContent as PopoverContent3, PopoverTrigger as PopoverTrigger3, Text as Text9 } from "@chakra-ui/react";
|
2809
2853
|
import * as Icon4 from "@ctlyst.id/internal-icon";
|
2810
|
-
import { Fragment as Fragment5, jsx as
|
2854
|
+
import { Fragment as Fragment5, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
2811
2855
|
var NavigationBar = ({
|
2812
2856
|
navigations,
|
2813
2857
|
isFetched,
|
@@ -2822,7 +2866,7 @@ var NavigationBar = ({
|
|
2822
2866
|
}
|
2823
2867
|
return subMenu.navHost + subMenu.navLink;
|
2824
2868
|
};
|
2825
|
-
return /* @__PURE__ */
|
2869
|
+
return /* @__PURE__ */ jsx43(Box22, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ jsx43(
|
2826
2870
|
Flex7,
|
2827
2871
|
{
|
2828
2872
|
bg: "white",
|
@@ -2839,8 +2883,8 @@ var NavigationBar = ({
|
|
2839
2883
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
2840
2884
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
2841
2885
|
const activeBg = isActive ? "primary.500" : void 0;
|
2842
|
-
return /* @__PURE__ */
|
2843
|
-
/* @__PURE__ */
|
2886
|
+
return /* @__PURE__ */ jsx43(Popover3, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
2887
|
+
/* @__PURE__ */ jsx43(PopoverTrigger3, { children: /* @__PURE__ */ jsx43(
|
2844
2888
|
Button3,
|
2845
2889
|
{
|
2846
2890
|
h: 7.5,
|
@@ -2854,12 +2898,12 @@ var NavigationBar = ({
|
|
2854
2898
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
2855
2899
|
color: isActive ? "primary.50" : "black.high",
|
2856
2900
|
leftIcon: mappingIcon2.get(item.title),
|
2857
|
-
rightIcon: /* @__PURE__ */
|
2901
|
+
rightIcon: /* @__PURE__ */ jsx43(Icon4.ChevronDown, { size: 4, color: "inherit" }),
|
2858
2902
|
children: item.title
|
2859
2903
|
}
|
2860
2904
|
) }),
|
2861
|
-
item.children && /* @__PURE__ */
|
2862
|
-
|
2905
|
+
item.children && /* @__PURE__ */ jsx43(PopoverContent3, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ jsxs18(
|
2906
|
+
Link4,
|
2863
2907
|
{
|
2864
2908
|
href: urlMenu(subMenu),
|
2865
2909
|
display: "flex",
|
@@ -2876,7 +2920,7 @@ var NavigationBar = ({
|
|
2876
2920
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
2877
2921
|
children: [
|
2878
2922
|
mappingIcon2.get(item.title),
|
2879
|
-
/* @__PURE__ */
|
2923
|
+
/* @__PURE__ */ jsx43(Text9, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
2880
2924
|
]
|
2881
2925
|
},
|
2882
2926
|
subMenu.id
|
@@ -2897,13 +2941,13 @@ import { Box as Box23, Text as Text10, useColorModeValue as useColorModeValue10
|
|
2897
2941
|
|
2898
2942
|
// src/components/pagination/components/pagination-button.tsx
|
2899
2943
|
import { Button as Button4, forwardRef as forwardRef12, useColorModeValue as useColorModeValue9 } from "@chakra-ui/react";
|
2900
|
-
import { jsx as
|
2944
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
2901
2945
|
var PaginationButton = forwardRef12(({ className, style, isActive, children, ...rest }, ref) => {
|
2902
2946
|
const btnBg = useColorModeValue9("neutral.300", "mirage.900");
|
2903
2947
|
const btnColor = useColorModeValue9("black.high", "primary.300");
|
2904
2948
|
const btnNotActiveBg = useColorModeValue9("secondary.50", "primary.500");
|
2905
2949
|
const btnNotActiveColor = useColorModeValue9("primary.500", "white");
|
2906
|
-
return /* @__PURE__ */
|
2950
|
+
return /* @__PURE__ */ jsx44(
|
2907
2951
|
Button4,
|
2908
2952
|
{
|
2909
2953
|
"data-test-id": "Pagination-Button",
|
@@ -2942,7 +2986,7 @@ var pagination_button_default = PaginationButton;
|
|
2942
2986
|
|
2943
2987
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
2944
2988
|
import { VisuallyHidden } from "@chakra-ui/react";
|
2945
|
-
import { jsx as
|
2989
|
+
import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
|
2946
2990
|
var PaginationButtonTrigger = ({
|
2947
2991
|
color,
|
2948
2992
|
isDisabled,
|
@@ -2950,7 +2994,7 @@ var PaginationButtonTrigger = ({
|
|
2950
2994
|
visuallyHidden,
|
2951
2995
|
icon
|
2952
2996
|
}) => /* @__PURE__ */ jsxs19(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
2953
|
-
/* @__PURE__ */
|
2997
|
+
/* @__PURE__ */ jsx45(VisuallyHidden, { children: visuallyHidden }),
|
2954
2998
|
icon
|
2955
2999
|
] });
|
2956
3000
|
PaginationButtonTrigger.defaultProps = {
|
@@ -2963,7 +3007,7 @@ PaginationButtonTrigger.defaultProps = {
|
|
2963
3007
|
var pagination_button_trigger_default = PaginationButtonTrigger;
|
2964
3008
|
|
2965
3009
|
// src/components/pagination/components/pagination.tsx
|
2966
|
-
import { jsx as
|
3010
|
+
import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
2967
3011
|
var Pagination = ({ className, current, total, onSelect }) => {
|
2968
3012
|
const btnColorDisabled = useColorModeValue10("secondary.100", "primary.500");
|
2969
3013
|
const btnColor = useColorModeValue10("primary.500", "secondary.100");
|
@@ -2994,7 +3038,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
2994
3038
|
return pageButtons;
|
2995
3039
|
};
|
2996
3040
|
return /* @__PURE__ */ jsxs20(Box23, { className, display: "inline-flex", alignItems: "center", children: [
|
2997
|
-
/* @__PURE__ */
|
3041
|
+
/* @__PURE__ */ jsx46(Box23, { mr: 1, children: /* @__PURE__ */ jsx46(
|
2998
3042
|
pagination_button_trigger_default,
|
2999
3043
|
{
|
3000
3044
|
"data-test-id": "Pagination-Button",
|
@@ -3002,11 +3046,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3002
3046
|
isDisabled: disabledPrevious,
|
3003
3047
|
onClick: () => handleSelectPage(1),
|
3004
3048
|
visuallyHidden: "First Page",
|
3005
|
-
icon: /* @__PURE__ */
|
3049
|
+
icon: /* @__PURE__ */ jsx46(ArrowLeftIcon, { width: 2 })
|
3006
3050
|
}
|
3007
3051
|
) }),
|
3008
3052
|
/* @__PURE__ */ jsxs20(Box23, { bg: "neutral.300", borderRadius: "full", children: [
|
3009
|
-
/* @__PURE__ */
|
3053
|
+
/* @__PURE__ */ jsx46(
|
3010
3054
|
pagination_button_trigger_default,
|
3011
3055
|
{
|
3012
3056
|
"data-test-id": "Pagination-Button",
|
@@ -3014,22 +3058,22 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3014
3058
|
isDisabled: disabledPrevious,
|
3015
3059
|
onClick: () => handleSelectPage(current - 1),
|
3016
3060
|
visuallyHidden: "Previous Page",
|
3017
|
-
icon: /* @__PURE__ */
|
3061
|
+
icon: /* @__PURE__ */ jsx46(ChevronLeftIcon2, {})
|
3018
3062
|
}
|
3019
3063
|
),
|
3020
3064
|
generatePages().map((page) => {
|
3021
|
-
return /* @__PURE__ */
|
3065
|
+
return /* @__PURE__ */ jsx46(
|
3022
3066
|
pagination_button_default,
|
3023
3067
|
{
|
3024
3068
|
"data-test-id": "Pagination-Button",
|
3025
3069
|
isActive: page === current,
|
3026
3070
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
3027
|
-
children: /* @__PURE__ */
|
3071
|
+
children: /* @__PURE__ */ jsx46(Text10, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
3028
3072
|
},
|
3029
3073
|
page
|
3030
3074
|
);
|
3031
3075
|
}),
|
3032
|
-
/* @__PURE__ */
|
3076
|
+
/* @__PURE__ */ jsx46(
|
3033
3077
|
pagination_button_trigger_default,
|
3034
3078
|
{
|
3035
3079
|
"data-test-id": "Pagination-Button",
|
@@ -3037,11 +3081,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3037
3081
|
isDisabled: disabledNext,
|
3038
3082
|
onClick: () => handleSelectPage(current + 1),
|
3039
3083
|
visuallyHidden: "Next Page",
|
3040
|
-
icon: /* @__PURE__ */
|
3084
|
+
icon: /* @__PURE__ */ jsx46(ChevronRightIcon, {})
|
3041
3085
|
}
|
3042
3086
|
)
|
3043
3087
|
] }),
|
3044
|
-
/* @__PURE__ */
|
3088
|
+
/* @__PURE__ */ jsx46(Box23, { ml: 1, children: /* @__PURE__ */ jsx46(
|
3045
3089
|
pagination_button_trigger_default,
|
3046
3090
|
{
|
3047
3091
|
"data-test-id": "Pagination-Button",
|
@@ -3049,7 +3093,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3049
3093
|
isDisabled: disabledNext,
|
3050
3094
|
onClick: () => handleSelectPage(total),
|
3051
3095
|
visuallyHidden: "Last Page",
|
3052
|
-
icon: /* @__PURE__ */
|
3096
|
+
icon: /* @__PURE__ */ jsx46(ArrowRightIcon, { width: 2 })
|
3053
3097
|
}
|
3054
3098
|
) })
|
3055
3099
|
] });
|
@@ -3063,7 +3107,7 @@ var pagination_default = Pagination;
|
|
3063
3107
|
|
3064
3108
|
// src/components/pagination/components/pagination-detail.tsx
|
3065
3109
|
import { Text as Text11 } from "@chakra-ui/react";
|
3066
|
-
import { jsx as
|
3110
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
3067
3111
|
var PaginationDetail = ({
|
3068
3112
|
page,
|
3069
3113
|
limit,
|
@@ -3073,7 +3117,7 @@ var PaginationDetail = ({
|
|
3073
3117
|
lineHeight = 18,
|
3074
3118
|
...rest
|
3075
3119
|
}) => {
|
3076
|
-
return /* @__PURE__ */
|
3120
|
+
return /* @__PURE__ */ jsx47(Text11, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
3077
3121
|
};
|
3078
3122
|
var pagination_detail_default = PaginationDetail;
|
3079
3123
|
|
@@ -3081,7 +3125,7 @@ var pagination_detail_default = PaginationDetail;
|
|
3081
3125
|
import { Box as Box24, Select, Text as Text12, useColorModeValue as useColorModeValue11 } from "@chakra-ui/react";
|
3082
3126
|
import * as React13 from "react";
|
3083
3127
|
import { FiChevronDown } from "react-icons/fi";
|
3084
|
-
import { jsx as
|
3128
|
+
import { jsx as jsx48, jsxs as jsxs21 } from "react/jsx-runtime";
|
3085
3129
|
var PaginationFilter = ({
|
3086
3130
|
limit,
|
3087
3131
|
label = "Baris per halaman:",
|
@@ -3091,8 +3135,8 @@ var PaginationFilter = ({
|
|
3091
3135
|
}) => {
|
3092
3136
|
const [value, setValue] = React13.useState(limit);
|
3093
3137
|
return /* @__PURE__ */ jsxs21(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
3094
|
-
/* @__PURE__ */
|
3095
|
-
/* @__PURE__ */
|
3138
|
+
/* @__PURE__ */ jsx48(Text12, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue11("neutral.900", "white"), ...rest, children: label }),
|
3139
|
+
/* @__PURE__ */ jsx48(
|
3096
3140
|
Select,
|
3097
3141
|
{
|
3098
3142
|
textAlign: "center",
|
@@ -3101,7 +3145,7 @@ var PaginationFilter = ({
|
|
3101
3145
|
border: "none",
|
3102
3146
|
boxShadow: "none",
|
3103
3147
|
width: 18,
|
3104
|
-
icon: /* @__PURE__ */
|
3148
|
+
icon: /* @__PURE__ */ jsx48(FiChevronDown, {}),
|
3105
3149
|
_focusVisible: { boxShadow: "none" },
|
3106
3150
|
onChange: (e) => {
|
3107
3151
|
const numberValue = Number(e.target.value);
|
@@ -3110,7 +3154,7 @@ var PaginationFilter = ({
|
|
3110
3154
|
},
|
3111
3155
|
value,
|
3112
3156
|
children: items.map((item) => {
|
3113
|
-
return /* @__PURE__ */
|
3157
|
+
return /* @__PURE__ */ jsx48("option", { value: item, children: item }, item);
|
3114
3158
|
})
|
3115
3159
|
}
|
3116
3160
|
)
|
@@ -3145,7 +3189,7 @@ import {
|
|
3145
3189
|
|
3146
3190
|
// src/components/radio/components/radio.tsx
|
3147
3191
|
import { Box as Box25, Radio as ChakraRadio, Text as Text13 } from "@chakra-ui/react";
|
3148
|
-
import { jsx as
|
3192
|
+
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
3149
3193
|
var Radio = ({
|
3150
3194
|
isError = false,
|
3151
3195
|
helpText = "",
|
@@ -3156,8 +3200,8 @@ var Radio = ({
|
|
3156
3200
|
}) => {
|
3157
3201
|
const variant = isError ? "errors" : "unstyled";
|
3158
3202
|
return /* @__PURE__ */ jsxs22(Box25, { children: [
|
3159
|
-
/* @__PURE__ */
|
3160
|
-
/* @__PURE__ */
|
3203
|
+
/* @__PURE__ */ jsx49(Box25, { display: "flex", children: /* @__PURE__ */ jsx49(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx49(Text13, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
3204
|
+
/* @__PURE__ */ jsx49(Box25, { mt: "5px", ml: "24px", children: isError ? /* @__PURE__ */ jsx49(Text13, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ jsx49(Text13, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
|
3161
3205
|
] });
|
3162
3206
|
};
|
3163
3207
|
Radio.displayName = "Radio";
|
@@ -3169,7 +3213,7 @@ Radio.defaultProps = {
|
|
3169
3213
|
|
3170
3214
|
// src/components/radio/components/radio-group.tsx
|
3171
3215
|
import { Box as Box26, RadioGroup as ChakraRadioGroup, Stack as Stack3 } from "@chakra-ui/react";
|
3172
|
-
import { jsx as
|
3216
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
3173
3217
|
var RadioGroup = ({
|
3174
3218
|
children,
|
3175
3219
|
label,
|
@@ -3178,7 +3222,7 @@ var RadioGroup = ({
|
|
3178
3222
|
errorMessage,
|
3179
3223
|
...props
|
3180
3224
|
}) => {
|
3181
|
-
return /* @__PURE__ */
|
3225
|
+
return /* @__PURE__ */ jsx50(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ jsx50(Box26, { mt: "12px", children: /* @__PURE__ */ jsx50(ChakraRadioGroup, { ...props, children: /* @__PURE__ */ jsx50(Stack3, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
3182
3226
|
};
|
3183
3227
|
RadioGroup.displayName = "RadioGroup";
|
3184
3228
|
RadioGroup.defaultProps = {
|
@@ -3201,9 +3245,9 @@ import {
|
|
3201
3245
|
// src/components/rating/components/rating.tsx
|
3202
3246
|
import { Grid as Grid2 } from "@chakra-ui/react";
|
3203
3247
|
import { Rating as RatingIcon } from "@ctlyst.id/internal-icon";
|
3204
|
-
import { jsx as
|
3248
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
3205
3249
|
var Rating = ({ value }) => {
|
3206
|
-
return /* @__PURE__ */
|
3250
|
+
return /* @__PURE__ */ jsx51(Grid2, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx51(RatingIcon, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
3207
3251
|
};
|
3208
3252
|
var rating_default = Rating;
|
3209
3253
|
|
@@ -3478,13 +3522,13 @@ var selectStyle = {
|
|
3478
3522
|
};
|
3479
3523
|
function selectStyles(colorMode, _isError) {
|
3480
3524
|
return {
|
3481
|
-
control: (base, {
|
3525
|
+
control: (base, { isFocused }) => {
|
3482
3526
|
const style = {
|
3483
3527
|
...base,
|
3484
3528
|
flexWrap: "nowrap",
|
3485
3529
|
borderColor: isFocused ? "var(--chakra-colors-primary-500)" : "var(--chakra-colors-neutral-400)",
|
3486
3530
|
boxShadow: "none",
|
3487
|
-
color:
|
3531
|
+
color: "var(--chakra-colors-black-low)",
|
3488
3532
|
"&:hover": {
|
3489
3533
|
borderColor: _isError ? "" : isFocused ? "var(--chakra-colors-primary-500)" : "var(--chakra-colors-neutral-500)"
|
3490
3534
|
}
|
@@ -3502,23 +3546,47 @@ function selectStyles(colorMode, _isError) {
|
|
3502
3546
|
...selectStyle,
|
3503
3547
|
color: "var(--chakra-colors-neutral-900)"
|
3504
3548
|
}),
|
3505
|
-
menu: (base) =>
|
3506
|
-
|
3507
|
-
|
3508
|
-
|
3509
|
-
|
3510
|
-
|
3511
|
-
|
3512
|
-
|
3513
|
-
|
3549
|
+
menu: (base) => {
|
3550
|
+
return {
|
3551
|
+
...base,
|
3552
|
+
...selectStyle,
|
3553
|
+
zIndex: 5
|
3554
|
+
};
|
3555
|
+
},
|
3556
|
+
singleValue: (base) => {
|
3557
|
+
return { ...base, ...selectStyle };
|
3558
|
+
},
|
3559
|
+
input: (base) => {
|
3560
|
+
return { ...base, ...selectStyle };
|
3561
|
+
},
|
3562
|
+
dropdownIndicator: (base) => {
|
3563
|
+
return { ...base, ...selectStyle };
|
3564
|
+
},
|
3565
|
+
indicatorSeparator: (base) => {
|
3566
|
+
return { ...base, ...selectStyle };
|
3514
3567
|
},
|
3515
|
-
singleValue: (base) => colorMode === "dark" ? { ...base, ...selectStyle, color: "white" } : { ...base, ...selectStyle },
|
3516
|
-
input: (base) => colorMode === "dark" ? { ...base, ...selectStyle, color: "white" } : { ...base, ...selectStyle },
|
3517
|
-
dropdownIndicator: (base) => colorMode === "dark" ? { ...base, ...selectStyle, color: "secondary.500" } : { ...base, ...selectStyle },
|
3518
|
-
indicatorSeparator: (base) => colorMode === "dark" ? { ...base, ...selectStyle, backgroundColor: "secondary.500" } : { ...base, ...selectStyle },
|
3519
3568
|
placeholder: (base) => {
|
3520
|
-
return { ...base, ...selectStyle, color: "black
|
3521
|
-
}
|
3569
|
+
return { ...base, ...selectStyle, color: "var(--chakra-colors-black-low)" };
|
3570
|
+
},
|
3571
|
+
multiValue: (base) => {
|
3572
|
+
return {
|
3573
|
+
...base,
|
3574
|
+
borderRadius: 4,
|
3575
|
+
backgroundColor: "var(--chakra-colors-neutral-200)"
|
3576
|
+
};
|
3577
|
+
},
|
3578
|
+
multiValueLabel: (base) => ({
|
3579
|
+
...base,
|
3580
|
+
borderRadius: 4,
|
3581
|
+
fontWeight: "bold"
|
3582
|
+
}),
|
3583
|
+
multiValueRemove: (base) => ({
|
3584
|
+
...base,
|
3585
|
+
color: "var(--chakra-colors-neutral-900)",
|
3586
|
+
":hover": {
|
3587
|
+
backgroundColor: "var(--chakra-colors-neutral-300)"
|
3588
|
+
}
|
3589
|
+
})
|
3522
3590
|
};
|
3523
3591
|
}
|
3524
3592
|
var themeSelect = (theme6) => {
|
@@ -3535,14 +3603,14 @@ var themeSelect = (theme6) => {
|
|
3535
3603
|
};
|
3536
3604
|
|
3537
3605
|
// src/components/select/components/select.tsx
|
3538
|
-
import { jsx as
|
3606
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
3539
3607
|
function Select2({
|
3540
3608
|
styles,
|
3541
3609
|
isError = false,
|
3542
3610
|
...rest
|
3543
3611
|
}) {
|
3544
3612
|
const { colorMode } = useColorMode3();
|
3545
|
-
return /* @__PURE__ */
|
3613
|
+
return /* @__PURE__ */ jsx52(
|
3546
3614
|
ReactSelect,
|
3547
3615
|
{
|
3548
3616
|
classNamePrefix: "react-select",
|
@@ -3557,14 +3625,14 @@ var select_default = Select2;
|
|
3557
3625
|
// src/components/select/components/select-async.tsx
|
3558
3626
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
3559
3627
|
import { AsyncPaginate } from "react-select-async-paginate";
|
3560
|
-
import { jsx as
|
3628
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
3561
3629
|
function SelectAsync({
|
3562
3630
|
styles,
|
3563
3631
|
isError = false,
|
3564
3632
|
...rest
|
3565
3633
|
}) {
|
3566
3634
|
const { colorMode } = useColorMode4();
|
3567
|
-
return /* @__PURE__ */
|
3635
|
+
return /* @__PURE__ */ jsx53(
|
3568
3636
|
AsyncPaginate,
|
3569
3637
|
{
|
3570
3638
|
classNamePrefix: "react-select",
|
@@ -3579,10 +3647,10 @@ var select_async_default = SelectAsync;
|
|
3579
3647
|
// src/components/select/components/select-async-creatable.tsx
|
3580
3648
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
3581
3649
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
3582
|
-
import { jsx as
|
3650
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
3583
3651
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3584
3652
|
const { colorMode } = useColorMode5();
|
3585
|
-
return /* @__PURE__ */
|
3653
|
+
return /* @__PURE__ */ jsx54(
|
3586
3654
|
ReactSelectAsyncCreatable,
|
3587
3655
|
{
|
3588
3656
|
classNamePrefix: "react-select",
|
@@ -3596,10 +3664,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3596
3664
|
// src/components/select/components/select-creatable.tsx
|
3597
3665
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
3598
3666
|
import ReactSelectCreatable from "react-select/creatable";
|
3599
|
-
import { jsx as
|
3667
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
3600
3668
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3601
3669
|
const { colorMode } = useColorMode6();
|
3602
|
-
return /* @__PURE__ */
|
3670
|
+
return /* @__PURE__ */ jsx55(
|
3603
3671
|
ReactSelectCreatable,
|
3604
3672
|
{
|
3605
3673
|
classNamePrefix: "react-select",
|
@@ -3610,12 +3678,149 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3610
3678
|
);
|
3611
3679
|
}
|
3612
3680
|
|
3681
|
+
// src/components/select/components/select-with-checkbox.tsx
|
3682
|
+
import { Checkbox as Checkbox3, Flex as Flex8, Text as Text14 } from "@chakra-ui/react";
|
3683
|
+
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3684
|
+
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3685
|
+
import { Fragment as Fragment6, jsx as jsx56, jsxs as jsxs23 } from "react/jsx-runtime";
|
3686
|
+
var CHECKBOX_STATE = {
|
3687
|
+
UNCHECKED: 0,
|
3688
|
+
INDETERMINATE: 1,
|
3689
|
+
CHECKED: 2
|
3690
|
+
};
|
3691
|
+
var getSelectAllCheckboxState = (totalSelected, totalOption) => {
|
3692
|
+
if (totalSelected < 0 || totalOption < 0) {
|
3693
|
+
throw new Error("value less than 0");
|
3694
|
+
}
|
3695
|
+
if (totalSelected > totalOption) {
|
3696
|
+
throw new Error("totalSelected couldn't be more than totalOption");
|
3697
|
+
}
|
3698
|
+
if (totalSelected === 0) {
|
3699
|
+
return CHECKBOX_STATE.UNCHECKED;
|
3700
|
+
}
|
3701
|
+
if (totalSelected < totalOption) {
|
3702
|
+
return CHECKBOX_STATE.INDETERMINATE;
|
3703
|
+
}
|
3704
|
+
if (totalSelected === totalOption) {
|
3705
|
+
return CHECKBOX_STATE.CHECKED;
|
3706
|
+
}
|
3707
|
+
return CHECKBOX_STATE.UNCHECKED;
|
3708
|
+
};
|
3709
|
+
var InputOption = ({
|
3710
|
+
getStyles,
|
3711
|
+
isDisabled,
|
3712
|
+
isFocused,
|
3713
|
+
isSelected,
|
3714
|
+
children,
|
3715
|
+
innerProps,
|
3716
|
+
data,
|
3717
|
+
checkedState,
|
3718
|
+
isMulti,
|
3719
|
+
...rest
|
3720
|
+
}) => {
|
3721
|
+
const style = {
|
3722
|
+
alignItems: "center",
|
3723
|
+
color: "inherit",
|
3724
|
+
display: "flex "
|
3725
|
+
};
|
3726
|
+
const props = {
|
3727
|
+
...innerProps,
|
3728
|
+
"aria-disabled": isDisabled,
|
3729
|
+
onClick: isDisabled ? void 0 : innerProps.onClick,
|
3730
|
+
style
|
3731
|
+
};
|
3732
|
+
return /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
3733
|
+
/* @__PURE__ */ jsx56(
|
3734
|
+
ComponentRS.Option,
|
3735
|
+
{
|
3736
|
+
isMulti: true,
|
3737
|
+
data,
|
3738
|
+
isDisabled,
|
3739
|
+
isFocused,
|
3740
|
+
isSelected,
|
3741
|
+
getStyles,
|
3742
|
+
innerProps: props,
|
3743
|
+
...rest,
|
3744
|
+
children: /* @__PURE__ */ jsxs23(
|
3745
|
+
Flex8,
|
3746
|
+
{
|
3747
|
+
alignItems: "center",
|
3748
|
+
width: "100%",
|
3749
|
+
mb: "3px",
|
3750
|
+
gap: 2,
|
3751
|
+
"data-test-id": "CT_component_select-checkbox_options",
|
3752
|
+
cursor: isDisabled ? "not-allowed" : "default",
|
3753
|
+
children: [
|
3754
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56(
|
3755
|
+
Checkbox3,
|
3756
|
+
{
|
3757
|
+
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
3758
|
+
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
3759
|
+
isDisabled,
|
3760
|
+
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
3761
|
+
}
|
3762
|
+
) : /* @__PURE__ */ jsx56(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
|
3763
|
+
/* @__PURE__ */ jsx56(Text14, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
3764
|
+
]
|
3765
|
+
}
|
3766
|
+
)
|
3767
|
+
}
|
3768
|
+
),
|
3769
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56("hr", {}) : null
|
3770
|
+
] });
|
3771
|
+
};
|
3772
|
+
var SelectWithCheckboxBase = ({
|
3773
|
+
isError = false,
|
3774
|
+
components,
|
3775
|
+
options,
|
3776
|
+
...rest
|
3777
|
+
}) => {
|
3778
|
+
const { colorMode } = useColorMode7();
|
3779
|
+
return /* @__PURE__ */ jsx56(
|
3780
|
+
ReactSelect2,
|
3781
|
+
{
|
3782
|
+
classNamePrefix: "react-select",
|
3783
|
+
options,
|
3784
|
+
styles: { ...selectStyles(colorMode, !!isError) },
|
3785
|
+
theme: themeSelect,
|
3786
|
+
closeMenuOnSelect: false,
|
3787
|
+
hideSelectedOptions: false,
|
3788
|
+
components: {
|
3789
|
+
...components
|
3790
|
+
},
|
3791
|
+
...rest
|
3792
|
+
}
|
3793
|
+
);
|
3794
|
+
};
|
3795
|
+
var SelectCheckbox = (props) => {
|
3796
|
+
const { isMulti, options, value, ...rest } = props;
|
3797
|
+
const selectValue = value || [];
|
3798
|
+
return /* @__PURE__ */ jsx56(
|
3799
|
+
SelectWithCheckboxBase,
|
3800
|
+
{
|
3801
|
+
isMulti,
|
3802
|
+
options,
|
3803
|
+
components: {
|
3804
|
+
Option: (optionProps) => {
|
3805
|
+
const { isSelected, data } = optionProps;
|
3806
|
+
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
3807
|
+
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
3808
|
+
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
3809
|
+
return /* @__PURE__ */ jsx56(InputOption, { ...optionProps, checkedState });
|
3810
|
+
}
|
3811
|
+
},
|
3812
|
+
...rest
|
3813
|
+
}
|
3814
|
+
);
|
3815
|
+
};
|
3816
|
+
var select_with_checkbox_default = SelectCheckbox;
|
3817
|
+
|
3613
3818
|
// src/components/switch/components/switch.tsx
|
3614
|
-
import { chakra as chakra6, Flex as
|
3615
|
-
import { cx as
|
3819
|
+
import { chakra as chakra6, Flex as Flex9, forwardRef as forwardRef13, omitThemingProps as omitThemingProps2, useCheckbox as useCheckbox2, useMultiStyleConfig as useMultiStyleConfig2 } from "@chakra-ui/react";
|
3820
|
+
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
3616
3821
|
import { Check, Close as Close4 } from "@ctlyst.id/internal-icon";
|
3617
3822
|
import { useMemo as useMemo4 } from "react";
|
3618
|
-
import { jsx as
|
3823
|
+
import { jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
|
3619
3824
|
var Switch = forwardRef13(function Switch2(props, ref) {
|
3620
3825
|
const styles = useMultiStyleConfig2("Switch", props);
|
3621
3826
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
@@ -3658,22 +3863,22 @@ var Switch = forwardRef13(function Switch2(props, ref) {
|
|
3658
3863
|
};
|
3659
3864
|
return iconSize[value];
|
3660
3865
|
};
|
3661
|
-
return /* @__PURE__ */
|
3866
|
+
return /* @__PURE__ */ jsxs24(
|
3662
3867
|
chakra6.label,
|
3663
3868
|
{
|
3664
3869
|
...getRootProps(),
|
3665
3870
|
display: "flex",
|
3666
3871
|
alignItems: "center",
|
3667
|
-
className:
|
3872
|
+
className: cx10("chakra-switch", props.className),
|
3668
3873
|
__css: containerStyles,
|
3669
3874
|
children: [
|
3670
|
-
/* @__PURE__ */
|
3671
|
-
/* @__PURE__ */
|
3672
|
-
/* @__PURE__ */
|
3673
|
-
/* @__PURE__ */
|
3674
|
-
/* @__PURE__ */
|
3875
|
+
/* @__PURE__ */ jsx57("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
3876
|
+
/* @__PURE__ */ jsxs24(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
3877
|
+
/* @__PURE__ */ jsxs24(Flex9, { gap: 2, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
3878
|
+
/* @__PURE__ */ jsx57(Check, { color: "white", size: getIconSize(props.size) }),
|
3879
|
+
/* @__PURE__ */ jsx57(Close4, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
3675
3880
|
] }),
|
3676
|
-
/* @__PURE__ */
|
3881
|
+
/* @__PURE__ */ jsx57(
|
3677
3882
|
chakra6.span,
|
3678
3883
|
{
|
3679
3884
|
__css: styles.thumb,
|
@@ -3683,7 +3888,7 @@ var Switch = forwardRef13(function Switch2(props, ref) {
|
|
3683
3888
|
}
|
3684
3889
|
)
|
3685
3890
|
] }),
|
3686
|
-
children && /* @__PURE__ */
|
3891
|
+
children && /* @__PURE__ */ jsx57(
|
3687
3892
|
chakra6.span,
|
3688
3893
|
{
|
3689
3894
|
className: "chakra-switch__label",
|
@@ -3719,14 +3924,14 @@ import {
|
|
3719
3924
|
} from "@chakra-ui/react";
|
3720
3925
|
|
3721
3926
|
// src/components/tabs/components/tab.tsx
|
3722
|
-
import { Button as Button5, Flex as
|
3723
|
-
import { jsx as
|
3927
|
+
import { Button as Button5, Flex as Flex10, forwardRef as forwardRef14, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
3928
|
+
import { jsx as jsx58, jsxs as jsxs25 } from "react/jsx-runtime";
|
3724
3929
|
var Tab = forwardRef14((props, ref) => {
|
3725
3930
|
var _a, _b;
|
3726
3931
|
const tabProps = useTab({ ...props, ref });
|
3727
3932
|
const isSelected = !!tabProps["aria-selected"];
|
3728
3933
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
3729
|
-
return /* @__PURE__ */
|
3934
|
+
return /* @__PURE__ */ jsx58(
|
3730
3935
|
Button5,
|
3731
3936
|
{
|
3732
3937
|
"data-test-id": props["data-test-id"],
|
@@ -3752,7 +3957,7 @@ var Tab = forwardRef14((props, ref) => {
|
|
3752
3957
|
},
|
3753
3958
|
__css: styles.tab,
|
3754
3959
|
...tabProps,
|
3755
|
-
children: /* @__PURE__ */
|
3960
|
+
children: /* @__PURE__ */ jsxs25(Flex10, { alignItems: "center", children: [
|
3756
3961
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
3757
3962
|
tabProps.children,
|
3758
3963
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -3798,13 +4003,13 @@ import {
|
|
3798
4003
|
} from "@chakra-ui/react";
|
3799
4004
|
|
3800
4005
|
// src/components/text/index.ts
|
3801
|
-
import { Code, CodeProps, Heading, HeadingProps, Link as
|
4006
|
+
import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text15, TextProps } from "@chakra-ui/react";
|
3802
4007
|
|
3803
4008
|
// src/components/tooltip/index.ts
|
3804
4009
|
import { Tooltip, TooltipProps } from "@chakra-ui/react";
|
3805
4010
|
|
3806
4011
|
// src/components/uploader/components/uploader.tsx
|
3807
|
-
import { Flex as
|
4012
|
+
import { Flex as Flex11, Heading as Heading2, Stack as Stack4, Text as Text16 } from "@chakra-ui/react";
|
3808
4013
|
import * as React15 from "react";
|
3809
4014
|
import { useDropzone } from "react-dropzone";
|
3810
4015
|
|
@@ -3818,7 +4023,7 @@ var messages = {
|
|
3818
4023
|
};
|
3819
4024
|
|
3820
4025
|
// src/components/uploader/components/uploader.tsx
|
3821
|
-
import { jsx as
|
4026
|
+
import { jsx as jsx59, jsxs as jsxs26 } from "react/jsx-runtime";
|
3822
4027
|
var Uploader = ({
|
3823
4028
|
onHandleUploadFile,
|
3824
4029
|
onHandleRejections,
|
@@ -3866,9 +4071,9 @@ var Uploader = ({
|
|
3866
4071
|
React15.useEffect(() => {
|
3867
4072
|
setIsSelected(selected != null ? selected : false);
|
3868
4073
|
}, [selected]);
|
3869
|
-
return /* @__PURE__ */
|
3870
|
-
/* @__PURE__ */
|
3871
|
-
|
4074
|
+
return /* @__PURE__ */ jsxs26(Stack4, { direction: "column", children: [
|
4075
|
+
/* @__PURE__ */ jsxs26(
|
4076
|
+
Flex11,
|
3872
4077
|
{
|
3873
4078
|
minH: 200,
|
3874
4079
|
border: "1px dashed",
|
@@ -3879,11 +4084,11 @@ var Uploader = ({
|
|
3879
4084
|
...props,
|
3880
4085
|
...getRootProps(),
|
3881
4086
|
children: [
|
3882
|
-
/* @__PURE__ */
|
3883
|
-
isDragActive ? /* @__PURE__ */
|
3884
|
-
!multiple && isSelected && /* @__PURE__ */
|
3885
|
-
!isSelected && /* @__PURE__ */
|
3886
|
-
isSelected ? /* @__PURE__ */
|
4087
|
+
/* @__PURE__ */ jsx59("input", { ...getInputProps() }),
|
4088
|
+
isDragActive ? /* @__PURE__ */ jsx59(Text16, { children: messages.dragActive }) : /* @__PURE__ */ jsxs26(Flex11, { flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : "primary.500", children: [
|
4089
|
+
!multiple && isSelected && /* @__PURE__ */ jsx59(Heading2, { fontWeight: 400, fontSize: "18px", lineHeight: 28, color: "black.high", mb: 2, children: selectedFirstFile == null ? void 0 : selectedFirstFile.name }),
|
4090
|
+
!isSelected && /* @__PURE__ */ jsx59(Heading2, { fontWeight: 400, fontSize: "18px", lineHeight: 28, mb: 2, children: messages.uploadFile }),
|
4091
|
+
isSelected ? /* @__PURE__ */ jsx59(Text16, { children: messages.dragReplace }) : /* @__PURE__ */ jsx59(Text16, { children: messages.dragInActive })
|
3887
4092
|
] })
|
3888
4093
|
]
|
3889
4094
|
}
|
@@ -4581,14 +4786,14 @@ var variants2 = {
|
|
4581
4786
|
errors,
|
4582
4787
|
unstyled
|
4583
4788
|
};
|
4584
|
-
var
|
4789
|
+
var Checkbox4 = defineMultiStyleConfig3({
|
4585
4790
|
baseStyle: baseStyle3,
|
4586
4791
|
variants: variants2,
|
4587
4792
|
defaultProps: {
|
4588
4793
|
variant: "unstyled"
|
4589
4794
|
}
|
4590
4795
|
});
|
4591
|
-
var checkbox_default2 =
|
4796
|
+
var checkbox_default2 = Checkbox4;
|
4592
4797
|
|
4593
4798
|
// src/config/theme/components/chips.ts
|
4594
4799
|
import { defineStyleConfig as defineStyleConfig3 } from "@chakra-ui/styled-system";
|
@@ -4675,7 +4880,7 @@ var baseStyle5 = definePartsStyle4({
|
|
4675
4880
|
minWidth: 0,
|
4676
4881
|
outline: 0,
|
4677
4882
|
px: 2,
|
4678
|
-
py: 2
|
4883
|
+
py: 2,
|
4679
4884
|
paddingInlineStart: 2,
|
4680
4885
|
paddingInlineEnd: 2,
|
4681
4886
|
position: "relative",
|
@@ -5490,7 +5695,7 @@ import { useMemo as useMemo7 } from "react";
|
|
5490
5695
|
import axios from "axios";
|
5491
5696
|
import { createContext as createContext2, useContext, useEffect as useEffect3, useMemo as useMemo6, useRef as useRef2 } from "react";
|
5492
5697
|
import { ToastContainer } from "react-toastify";
|
5493
|
-
import { jsx as
|
5698
|
+
import { jsx as jsx60, jsxs as jsxs27 } from "react/jsx-runtime";
|
5494
5699
|
var ProviderContext = createContext2({
|
5495
5700
|
instance: void 0
|
5496
5701
|
});
|
@@ -5509,8 +5714,8 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
5509
5714
|
});
|
5510
5715
|
}, [requestInterceptors, responseInterceptors]);
|
5511
5716
|
const provider = useMemo6(() => ({ instance: instanceRef.current }), []);
|
5512
|
-
return /* @__PURE__ */
|
5513
|
-
/* @__PURE__ */
|
5717
|
+
return /* @__PURE__ */ jsxs27(ProviderContext.Provider, { value: provider, children: [
|
5718
|
+
/* @__PURE__ */ jsx60(ToastContainer, {}),
|
5514
5719
|
children
|
5515
5720
|
] });
|
5516
5721
|
};
|
@@ -5552,7 +5757,7 @@ function useFetcher() {
|
|
5552
5757
|
import {
|
5553
5758
|
useBoolean,
|
5554
5759
|
useClipboard,
|
5555
|
-
useColorMode as
|
5760
|
+
useColorMode as useColorMode8,
|
5556
5761
|
useColorModeValue as useColorModeValue12,
|
5557
5762
|
useConst,
|
5558
5763
|
useControllableProp,
|
@@ -5610,6 +5815,7 @@ export {
|
|
5610
5815
|
button_default as Button,
|
5611
5816
|
ButtonGroup,
|
5612
5817
|
ButtonGroupProps,
|
5818
|
+
CHECKBOX_STATE,
|
5613
5819
|
card_default as Card,
|
5614
5820
|
Center,
|
5615
5821
|
ChakraProvider,
|
@@ -5695,7 +5901,7 @@ export {
|
|
5695
5901
|
InputRightAddonProps,
|
5696
5902
|
InputRightElement2 as InputRightElement,
|
5697
5903
|
InputRightElementProps,
|
5698
|
-
|
5904
|
+
Link5 as Link,
|
5699
5905
|
LinkProps,
|
5700
5906
|
List,
|
5701
5907
|
ListIcon,
|
@@ -5721,6 +5927,7 @@ export {
|
|
5721
5927
|
ModalOverlayProps,
|
5722
5928
|
ModalProps,
|
5723
5929
|
multi_datepicker_month_default as MultiDatePickerMonth,
|
5930
|
+
NavItem,
|
5724
5931
|
navigation_bar_default as NavigationBar,
|
5725
5932
|
OrderedList,
|
5726
5933
|
pagination_default as Pagination,
|
@@ -5756,6 +5963,7 @@ export {
|
|
5756
5963
|
select_default as Select,
|
5757
5964
|
select_async_default as SelectAsync,
|
5758
5965
|
SelectAsyncCreatable,
|
5966
|
+
select_with_checkbox_default as SelectCheckBox,
|
5759
5967
|
SelectCreatable,
|
5760
5968
|
Show,
|
5761
5969
|
ShowProps,
|
@@ -5800,7 +6008,7 @@ export {
|
|
5800
6008
|
TabsProvider,
|
5801
6009
|
Tbody2 as Tbody,
|
5802
6010
|
Td2 as Td,
|
5803
|
-
|
6011
|
+
Text15 as Text,
|
5804
6012
|
TextProps,
|
5805
6013
|
textarea_default as TextareaField,
|
5806
6014
|
Th2 as Th,
|
@@ -5846,6 +6054,7 @@ export {
|
|
5846
6054
|
WrapProps,
|
5847
6055
|
extendTheme2 as extendTheme,
|
5848
6056
|
forwardRef15 as forwardRef,
|
6057
|
+
getSelectAllCheckboxState,
|
5849
6058
|
getTheme,
|
5850
6059
|
theme5 as theme,
|
5851
6060
|
useAccordion,
|
@@ -5859,7 +6068,7 @@ export {
|
|
5859
6068
|
useCheckbox,
|
5860
6069
|
useCheckboxGroup,
|
5861
6070
|
useClipboard,
|
5862
|
-
|
6071
|
+
useColorMode8 as useColorMode,
|
5863
6072
|
useColorModePreference,
|
5864
6073
|
useColorModeValue12 as useColorModeValue,
|
5865
6074
|
useConst,
|