@ctlyst.id/internal-ui 2.2.0 → 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 +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +395 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -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
|
|
@@ -3559,14 +3603,14 @@ var themeSelect = (theme6) => {
|
|
3559
3603
|
};
|
3560
3604
|
|
3561
3605
|
// src/components/select/components/select.tsx
|
3562
|
-
import { jsx as
|
3606
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
3563
3607
|
function Select2({
|
3564
3608
|
styles,
|
3565
3609
|
isError = false,
|
3566
3610
|
...rest
|
3567
3611
|
}) {
|
3568
3612
|
const { colorMode } = useColorMode3();
|
3569
|
-
return /* @__PURE__ */
|
3613
|
+
return /* @__PURE__ */ jsx52(
|
3570
3614
|
ReactSelect,
|
3571
3615
|
{
|
3572
3616
|
classNamePrefix: "react-select",
|
@@ -3581,14 +3625,14 @@ var select_default = Select2;
|
|
3581
3625
|
// src/components/select/components/select-async.tsx
|
3582
3626
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
3583
3627
|
import { AsyncPaginate } from "react-select-async-paginate";
|
3584
|
-
import { jsx as
|
3628
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
3585
3629
|
function SelectAsync({
|
3586
3630
|
styles,
|
3587
3631
|
isError = false,
|
3588
3632
|
...rest
|
3589
3633
|
}) {
|
3590
3634
|
const { colorMode } = useColorMode4();
|
3591
|
-
return /* @__PURE__ */
|
3635
|
+
return /* @__PURE__ */ jsx53(
|
3592
3636
|
AsyncPaginate,
|
3593
3637
|
{
|
3594
3638
|
classNamePrefix: "react-select",
|
@@ -3603,10 +3647,10 @@ var select_async_default = SelectAsync;
|
|
3603
3647
|
// src/components/select/components/select-async-creatable.tsx
|
3604
3648
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
3605
3649
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
3606
|
-
import { jsx as
|
3650
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
3607
3651
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3608
3652
|
const { colorMode } = useColorMode5();
|
3609
|
-
return /* @__PURE__ */
|
3653
|
+
return /* @__PURE__ */ jsx54(
|
3610
3654
|
ReactSelectAsyncCreatable,
|
3611
3655
|
{
|
3612
3656
|
classNamePrefix: "react-select",
|
@@ -3620,10 +3664,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3620
3664
|
// src/components/select/components/select-creatable.tsx
|
3621
3665
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
3622
3666
|
import ReactSelectCreatable from "react-select/creatable";
|
3623
|
-
import { jsx as
|
3667
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
3624
3668
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3625
3669
|
const { colorMode } = useColorMode6();
|
3626
|
-
return /* @__PURE__ */
|
3670
|
+
return /* @__PURE__ */ jsx55(
|
3627
3671
|
ReactSelectCreatable,
|
3628
3672
|
{
|
3629
3673
|
classNamePrefix: "react-select",
|
@@ -3638,7 +3682,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3638
3682
|
import { Checkbox as Checkbox3, Flex as Flex8, Text as Text14 } from "@chakra-ui/react";
|
3639
3683
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3640
3684
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3641
|
-
import { Fragment as Fragment6, jsx as
|
3685
|
+
import { Fragment as Fragment6, jsx as jsx56, jsxs as jsxs23 } from "react/jsx-runtime";
|
3642
3686
|
var CHECKBOX_STATE = {
|
3643
3687
|
UNCHECKED: 0,
|
3644
3688
|
INDETERMINATE: 1,
|
@@ -3686,7 +3730,7 @@ var InputOption = ({
|
|
3686
3730
|
style
|
3687
3731
|
};
|
3688
3732
|
return /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
3689
|
-
/* @__PURE__ */
|
3733
|
+
/* @__PURE__ */ jsx56(
|
3690
3734
|
ComponentRS.Option,
|
3691
3735
|
{
|
3692
3736
|
isMulti: true,
|
@@ -3707,7 +3751,7 @@ var InputOption = ({
|
|
3707
3751
|
"data-test-id": "CT_component_select-checkbox_options",
|
3708
3752
|
cursor: isDisabled ? "not-allowed" : "default",
|
3709
3753
|
children: [
|
3710
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
3754
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56(
|
3711
3755
|
Checkbox3,
|
3712
3756
|
{
|
3713
3757
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -3715,14 +3759,14 @@ var InputOption = ({
|
|
3715
3759
|
isDisabled,
|
3716
3760
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
3717
3761
|
}
|
3718
|
-
) : /* @__PURE__ */
|
3719
|
-
/* @__PURE__ */
|
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 })
|
3720
3764
|
]
|
3721
3765
|
}
|
3722
3766
|
)
|
3723
3767
|
}
|
3724
3768
|
),
|
3725
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
3769
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56("hr", {}) : null
|
3726
3770
|
] });
|
3727
3771
|
};
|
3728
3772
|
var SelectWithCheckboxBase = ({
|
@@ -3732,7 +3776,7 @@ var SelectWithCheckboxBase = ({
|
|
3732
3776
|
...rest
|
3733
3777
|
}) => {
|
3734
3778
|
const { colorMode } = useColorMode7();
|
3735
|
-
return /* @__PURE__ */
|
3779
|
+
return /* @__PURE__ */ jsx56(
|
3736
3780
|
ReactSelect2,
|
3737
3781
|
{
|
3738
3782
|
classNamePrefix: "react-select",
|
@@ -3751,7 +3795,7 @@ var SelectWithCheckboxBase = ({
|
|
3751
3795
|
var SelectCheckbox = (props) => {
|
3752
3796
|
const { isMulti, options, value, ...rest } = props;
|
3753
3797
|
const selectValue = value || [];
|
3754
|
-
return /* @__PURE__ */
|
3798
|
+
return /* @__PURE__ */ jsx56(
|
3755
3799
|
SelectWithCheckboxBase,
|
3756
3800
|
{
|
3757
3801
|
isMulti,
|
@@ -3762,7 +3806,7 @@ var SelectCheckbox = (props) => {
|
|
3762
3806
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
3763
3807
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
3764
3808
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
3765
|
-
return /* @__PURE__ */
|
3809
|
+
return /* @__PURE__ */ jsx56(InputOption, { ...optionProps, checkedState });
|
3766
3810
|
}
|
3767
3811
|
},
|
3768
3812
|
...rest
|
@@ -3773,10 +3817,10 @@ var select_with_checkbox_default = SelectCheckbox;
|
|
3773
3817
|
|
3774
3818
|
// src/components/switch/components/switch.tsx
|
3775
3819
|
import { chakra as chakra6, Flex as Flex9, forwardRef as forwardRef13, omitThemingProps as omitThemingProps2, useCheckbox as useCheckbox2, useMultiStyleConfig as useMultiStyleConfig2 } from "@chakra-ui/react";
|
3776
|
-
import { cx as
|
3820
|
+
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
3777
3821
|
import { Check, Close as Close4 } from "@ctlyst.id/internal-icon";
|
3778
3822
|
import { useMemo as useMemo4 } from "react";
|
3779
|
-
import { jsx as
|
3823
|
+
import { jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
|
3780
3824
|
var Switch = forwardRef13(function Switch2(props, ref) {
|
3781
3825
|
const styles = useMultiStyleConfig2("Switch", props);
|
3782
3826
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
@@ -3825,16 +3869,16 @@ var Switch = forwardRef13(function Switch2(props, ref) {
|
|
3825
3869
|
...getRootProps(),
|
3826
3870
|
display: "flex",
|
3827
3871
|
alignItems: "center",
|
3828
|
-
className:
|
3872
|
+
className: cx10("chakra-switch", props.className),
|
3829
3873
|
__css: containerStyles,
|
3830
3874
|
children: [
|
3831
|
-
/* @__PURE__ */
|
3875
|
+
/* @__PURE__ */ jsx57("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
3832
3876
|
/* @__PURE__ */ jsxs24(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
3833
3877
|
/* @__PURE__ */ jsxs24(Flex9, { gap: 2, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
3834
|
-
/* @__PURE__ */
|
3835
|
-
/* @__PURE__ */
|
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) })
|
3836
3880
|
] }),
|
3837
|
-
/* @__PURE__ */
|
3881
|
+
/* @__PURE__ */ jsx57(
|
3838
3882
|
chakra6.span,
|
3839
3883
|
{
|
3840
3884
|
__css: styles.thumb,
|
@@ -3844,7 +3888,7 @@ var Switch = forwardRef13(function Switch2(props, ref) {
|
|
3844
3888
|
}
|
3845
3889
|
)
|
3846
3890
|
] }),
|
3847
|
-
children && /* @__PURE__ */
|
3891
|
+
children && /* @__PURE__ */ jsx57(
|
3848
3892
|
chakra6.span,
|
3849
3893
|
{
|
3850
3894
|
className: "chakra-switch__label",
|
@@ -3881,13 +3925,13 @@ import {
|
|
3881
3925
|
|
3882
3926
|
// src/components/tabs/components/tab.tsx
|
3883
3927
|
import { Button as Button5, Flex as Flex10, forwardRef as forwardRef14, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
3884
|
-
import { jsx as
|
3928
|
+
import { jsx as jsx58, jsxs as jsxs25 } from "react/jsx-runtime";
|
3885
3929
|
var Tab = forwardRef14((props, ref) => {
|
3886
3930
|
var _a, _b;
|
3887
3931
|
const tabProps = useTab({ ...props, ref });
|
3888
3932
|
const isSelected = !!tabProps["aria-selected"];
|
3889
3933
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
3890
|
-
return /* @__PURE__ */
|
3934
|
+
return /* @__PURE__ */ jsx58(
|
3891
3935
|
Button5,
|
3892
3936
|
{
|
3893
3937
|
"data-test-id": props["data-test-id"],
|
@@ -3959,7 +4003,7 @@ import {
|
|
3959
4003
|
} from "@chakra-ui/react";
|
3960
4004
|
|
3961
4005
|
// src/components/text/index.ts
|
3962
|
-
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";
|
3963
4007
|
|
3964
4008
|
// src/components/tooltip/index.ts
|
3965
4009
|
import { Tooltip, TooltipProps } from "@chakra-ui/react";
|
@@ -3979,7 +4023,7 @@ var messages = {
|
|
3979
4023
|
};
|
3980
4024
|
|
3981
4025
|
// src/components/uploader/components/uploader.tsx
|
3982
|
-
import { jsx as
|
4026
|
+
import { jsx as jsx59, jsxs as jsxs26 } from "react/jsx-runtime";
|
3983
4027
|
var Uploader = ({
|
3984
4028
|
onHandleUploadFile,
|
3985
4029
|
onHandleRejections,
|
@@ -4040,11 +4084,11 @@ var Uploader = ({
|
|
4040
4084
|
...props,
|
4041
4085
|
...getRootProps(),
|
4042
4086
|
children: [
|
4043
|
-
/* @__PURE__ */
|
4044
|
-
isDragActive ? /* @__PURE__ */
|
4045
|
-
!multiple && isSelected && /* @__PURE__ */
|
4046
|
-
!isSelected && /* @__PURE__ */
|
4047
|
-
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 })
|
4048
4092
|
] })
|
4049
4093
|
]
|
4050
4094
|
}
|
@@ -4836,7 +4880,7 @@ var baseStyle5 = definePartsStyle4({
|
|
4836
4880
|
minWidth: 0,
|
4837
4881
|
outline: 0,
|
4838
4882
|
px: 2,
|
4839
|
-
py: 2
|
4883
|
+
py: 2,
|
4840
4884
|
paddingInlineStart: 2,
|
4841
4885
|
paddingInlineEnd: 2,
|
4842
4886
|
position: "relative",
|
@@ -5651,7 +5695,7 @@ import { useMemo as useMemo7 } from "react";
|
|
5651
5695
|
import axios from "axios";
|
5652
5696
|
import { createContext as createContext2, useContext, useEffect as useEffect3, useMemo as useMemo6, useRef as useRef2 } from "react";
|
5653
5697
|
import { ToastContainer } from "react-toastify";
|
5654
|
-
import { jsx as
|
5698
|
+
import { jsx as jsx60, jsxs as jsxs27 } from "react/jsx-runtime";
|
5655
5699
|
var ProviderContext = createContext2({
|
5656
5700
|
instance: void 0
|
5657
5701
|
});
|
@@ -5671,7 +5715,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
5671
5715
|
}, [requestInterceptors, responseInterceptors]);
|
5672
5716
|
const provider = useMemo6(() => ({ instance: instanceRef.current }), []);
|
5673
5717
|
return /* @__PURE__ */ jsxs27(ProviderContext.Provider, { value: provider, children: [
|
5674
|
-
/* @__PURE__ */
|
5718
|
+
/* @__PURE__ */ jsx60(ToastContainer, {}),
|
5675
5719
|
children
|
5676
5720
|
] });
|
5677
5721
|
};
|
@@ -5857,7 +5901,7 @@ export {
|
|
5857
5901
|
InputRightAddonProps,
|
5858
5902
|
InputRightElement2 as InputRightElement,
|
5859
5903
|
InputRightElementProps,
|
5860
|
-
|
5904
|
+
Link5 as Link,
|
5861
5905
|
LinkProps,
|
5862
5906
|
List,
|
5863
5907
|
ListIcon,
|
@@ -5883,6 +5927,7 @@ export {
|
|
5883
5927
|
ModalOverlayProps,
|
5884
5928
|
ModalProps,
|
5885
5929
|
multi_datepicker_month_default as MultiDatePickerMonth,
|
5930
|
+
NavItem,
|
5886
5931
|
navigation_bar_default as NavigationBar,
|
5887
5932
|
OrderedList,
|
5888
5933
|
pagination_default as Pagination,
|