@ctlyst.id/internal-ui 3.1.0 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +598 -573
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -246
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/index.css +0 -50
- package/dist/index.css.map +0 -1
- package/dist/poppins-latin-400-normal-SFWTNBQB.woff2 +0 -0
- package/dist/poppins-latin-400-normal-ZPTYLX7I.woff +0 -0
- package/dist/poppins-latin-ext-400-normal-7PFKV6Y5.woff +0 -0
- package/dist/poppins-latin-ext-400-normal-K3FV5HAI.woff2 +0 -0
package/dist/index.mjs
CHANGED
@@ -2513,8 +2513,8 @@ import { Box as Box15, Image as Image2, useColorModeValue as useColorModeValue2
|
|
2513
2513
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
2514
2514
|
var Logo = ({ url, imageUrl, height }) => {
|
2515
2515
|
if (url)
|
2516
|
-
return /* @__PURE__ */ jsx33(Box15, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ jsx33(Image2, { w: "
|
2517
|
-
return /* @__PURE__ */ jsx33(Image2, { w: "
|
2516
|
+
return /* @__PURE__ */ jsx33(Box15, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ jsx33(Image2, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" }) });
|
2517
|
+
return /* @__PURE__ */ jsx33(Image2, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" });
|
2518
2518
|
};
|
2519
2519
|
var XMSLogo = () => /* @__PURE__ */ jsx33(
|
2520
2520
|
Image2,
|
@@ -2542,11 +2542,11 @@ import {
|
|
2542
2542
|
Box as Box16,
|
2543
2543
|
Flex as Flex5,
|
2544
2544
|
HStack as HStack2,
|
2545
|
-
Popover,
|
2546
|
-
PopoverArrow,
|
2547
|
-
PopoverBody,
|
2548
|
-
PopoverContent,
|
2549
|
-
PopoverTrigger,
|
2545
|
+
Popover as Popover2,
|
2546
|
+
PopoverArrow as PopoverArrow2,
|
2547
|
+
PopoverBody as PopoverBody2,
|
2548
|
+
PopoverContent as PopoverContent2,
|
2549
|
+
PopoverTrigger as PopoverTrigger2,
|
2550
2550
|
Text as Text8,
|
2551
2551
|
useDisclosure,
|
2552
2552
|
VStack as VStack2
|
@@ -2598,13 +2598,48 @@ NavItem.defaultProps = {
|
|
2598
2598
|
"data-test-id": void 0
|
2599
2599
|
};
|
2600
2600
|
|
2601
|
+
// src/components/tooltip/components/tooltip.tsx
|
2602
|
+
import {
|
2603
|
+
Popover,
|
2604
|
+
PopoverArrow,
|
2605
|
+
PopoverBody,
|
2606
|
+
PopoverContent,
|
2607
|
+
PopoverTrigger,
|
2608
|
+
Portal,
|
2609
|
+
Tooltip as ChakraTooltip
|
2610
|
+
} from "@chakra-ui/react";
|
2611
|
+
import { jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
|
2612
|
+
var Tooltip = (props) => {
|
2613
|
+
const { children, bg = "neutral.700", textStyle = "text.sm", color: color2 = "white", width } = props;
|
2614
|
+
const content = /* @__PURE__ */ jsxs14(
|
2615
|
+
PopoverContent,
|
2616
|
+
{
|
2617
|
+
border: "none",
|
2618
|
+
bg,
|
2619
|
+
textStyle,
|
2620
|
+
width,
|
2621
|
+
ml: 1,
|
2622
|
+
placeItems: "center",
|
2623
|
+
borderRadius: props.borderRadius,
|
2624
|
+
children: [
|
2625
|
+
props.hasArrow && /* @__PURE__ */ jsx35(PopoverArrow, { color: color2, bg, shadow: "none" }),
|
2626
|
+
/* @__PURE__ */ jsx35(PopoverBody, { color: color2, ...props, children: props.label })
|
2627
|
+
]
|
2628
|
+
}
|
2629
|
+
);
|
2630
|
+
return props.isInteractive === true ? /* @__PURE__ */ jsxs14(Popover, { trigger: "hover", placement: props.placement, ...props.popoverProps, children: [
|
2631
|
+
/* @__PURE__ */ jsx35(PopoverTrigger, { children }),
|
2632
|
+
props.portal ? /* @__PURE__ */ jsx35(Portal, { children: content }) : content
|
2633
|
+
] }) : /* @__PURE__ */ jsx35(ChakraTooltip, { ...props, children });
|
2634
|
+
};
|
2635
|
+
|
2601
2636
|
// src/components/header/components/profile.tsx
|
2602
|
-
import { Fragment as Fragment3, jsx as
|
2637
|
+
import { Fragment as Fragment3, jsx as jsx36, jsxs as jsxs15 } from "react/jsx-runtime";
|
2603
2638
|
var Profile = ({ color: color2, brandColor, data, badgeStyle, children, onLogout, ...props }) => {
|
2604
2639
|
var _a;
|
2605
2640
|
const { isOpen, onToggle, onClose } = useDisclosure();
|
2606
|
-
return /* @__PURE__ */
|
2607
|
-
/* @__PURE__ */
|
2641
|
+
return /* @__PURE__ */ jsxs15(Popover2, { placement: "bottom-end", isOpen, onClose, children: [
|
2642
|
+
/* @__PURE__ */ jsx36(
|
2608
2643
|
Box16,
|
2609
2644
|
{
|
2610
2645
|
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
@@ -2621,13 +2656,13 @@ var Profile = ({ color: color2, brandColor, data, badgeStyle, children, onLogout
|
|
2621
2656
|
onClick: onToggle,
|
2622
2657
|
color: color2,
|
2623
2658
|
...props,
|
2624
|
-
children: /* @__PURE__ */
|
2625
|
-
/* @__PURE__ */
|
2626
|
-
/* @__PURE__ */
|
2627
|
-
/* @__PURE__ */
|
2628
|
-
(data == null ? void 0 : data.userRole) && /* @__PURE__ */
|
2629
|
-
/* @__PURE__ */
|
2630
|
-
/* @__PURE__ */
|
2659
|
+
children: /* @__PURE__ */ jsxs15(HStack2, { children: [
|
2660
|
+
/* @__PURE__ */ jsxs15(VStack2, { alignItems: "flex-end", spacing: "0", ml: "2", color: color2, children: [
|
2661
|
+
/* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
2662
|
+
/* @__PURE__ */ jsxs15(Flex5, { alignItems: "center", children: [
|
2663
|
+
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
2664
|
+
/* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
2665
|
+
/* @__PURE__ */ jsx36(
|
2631
2666
|
Box16,
|
2632
2667
|
{
|
2633
2668
|
className: "catalyst_header-profile-divider",
|
@@ -2638,36 +2673,54 @@ var Profile = ({ color: color2, brandColor, data, badgeStyle, children, onLogout
|
|
2638
2673
|
}
|
2639
2674
|
)
|
2640
2675
|
] }),
|
2641
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */
|
2642
|
-
/* @__PURE__ */
|
2643
|
-
data.office.length > 1 && /* @__PURE__ */
|
2644
|
-
|
2676
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ jsxs15(Flex5, { align: "center", justify: "center", children: [
|
2677
|
+
/* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", children: data.office[0] }),
|
2678
|
+
data.office.length > 1 && /* @__PURE__ */ jsx36(
|
2679
|
+
Tooltip,
|
2645
2680
|
{
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2649
|
-
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
|
2654
|
-
|
2655
|
-
|
2656
|
-
|
2681
|
+
isInteractive: true,
|
2682
|
+
hasArrow: true,
|
2683
|
+
p: "2",
|
2684
|
+
label: /* @__PURE__ */ jsxs15(Box16, { children: [
|
2685
|
+
/* @__PURE__ */ jsx36(Text8, { children: "Akses Office:" }),
|
2686
|
+
/* @__PURE__ */ jsx36(Text8, { children: data.office.sort().join(", ") })
|
2687
|
+
] }),
|
2688
|
+
textAlign: "left",
|
2689
|
+
placement: "bottom-end",
|
2690
|
+
popoverProps: {
|
2691
|
+
offset: [10, 8]
|
2692
|
+
},
|
2693
|
+
width: 186,
|
2694
|
+
children: /* @__PURE__ */ jsx36(Box16, { display: "flex", children: /* @__PURE__ */ jsxs15(
|
2695
|
+
badge_default,
|
2696
|
+
{
|
2697
|
+
ml: "1",
|
2698
|
+
pill: true,
|
2699
|
+
variant: "neutral-light",
|
2700
|
+
boxSize: "4.5",
|
2701
|
+
justifyContent: "center",
|
2702
|
+
p: "0.5",
|
2703
|
+
...badgeStyle,
|
2704
|
+
children: [
|
2705
|
+
data.office.length - 1,
|
2706
|
+
"+"
|
2707
|
+
]
|
2708
|
+
}
|
2709
|
+
) })
|
2657
2710
|
}
|
2658
2711
|
)
|
2659
|
-
] }) : /* @__PURE__ */
|
2712
|
+
] }) : /* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
2660
2713
|
] })
|
2661
2714
|
] }),
|
2662
|
-
/* @__PURE__ */
|
2715
|
+
/* @__PURE__ */ jsx36(PopoverTrigger2, { children: /* @__PURE__ */ jsx36(Box16, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ jsx36(Avatar, { size: "sm", bg: brandColor, color: "white", name: (_a = data == null ? void 0 : data.name) != null ? _a : data == null ? void 0 : data.email }) }) })
|
2663
2716
|
] })
|
2664
2717
|
}
|
2665
2718
|
),
|
2666
|
-
children || /* @__PURE__ */
|
2667
|
-
/* @__PURE__ */
|
2668
|
-
/* @__PURE__ */
|
2669
|
-
/* @__PURE__ */
|
2670
|
-
/* @__PURE__ */
|
2719
|
+
children || /* @__PURE__ */ jsxs15(PopoverContent2, { bg: "white", maxW: 200, children: [
|
2720
|
+
/* @__PURE__ */ jsx36(PopoverArrow2, { bg: "white" }),
|
2721
|
+
/* @__PURE__ */ jsx36(PopoverBody2, { py: "1", px: "0", children: /* @__PURE__ */ jsx36(NavItem, { "data-test-id": "CTA_Navbar_logout-button", onClick: onLogout, rounded: "none", px: "4", children: /* @__PURE__ */ jsxs15(Box16, { display: "flex", alignItems: "center", children: [
|
2722
|
+
/* @__PURE__ */ jsx36(FiPower, {}),
|
2723
|
+
/* @__PURE__ */ jsx36(Text8, { ml: "2", children: "Logout" })
|
2671
2724
|
] }) }) })
|
2672
2725
|
] })
|
2673
2726
|
] });
|
@@ -2682,10 +2735,10 @@ Profile.defaultProps = {
|
|
2682
2735
|
// src/components/header/components/switch-mode.tsx
|
2683
2736
|
import { Box as Box17, useColorMode as useColorMode2 } from "@chakra-ui/react";
|
2684
2737
|
import { FiMoon, FiSun } from "react-icons/fi";
|
2685
|
-
import { jsx as
|
2738
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
2686
2739
|
var SwitchMode = () => {
|
2687
2740
|
const { colorMode, toggleColorMode } = useColorMode2();
|
2688
|
-
return /* @__PURE__ */
|
2741
|
+
return /* @__PURE__ */ jsx37(Box17, { "data-test-id": "rhYuTDCiWkFqr96upiEEh", mx: 5, onClick: toggleColorMode, cursor: "pointer", children: colorMode === "light" ? /* @__PURE__ */ jsx37(FiMoon, { size: 20 }) : /* @__PURE__ */ jsx37(FiSun, { size: 20 }) });
|
2689
2742
|
};
|
2690
2743
|
var switch_mode_default = SwitchMode;
|
2691
2744
|
|
@@ -2705,15 +2758,15 @@ function environmentName(env2) {
|
|
2705
2758
|
}
|
2706
2759
|
|
2707
2760
|
// src/components/header/components/version.tsx
|
2708
|
-
import { Fragment as Fragment4, jsx as
|
2761
|
+
import { Fragment as Fragment4, jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
2709
2762
|
var Version = ({
|
2710
2763
|
hideEnv,
|
2711
2764
|
version,
|
2712
2765
|
environment,
|
2713
2766
|
onOpenModalRelease,
|
2714
2767
|
versionStyle
|
2715
|
-
}) => /* @__PURE__ */
|
2716
|
-
typeof version === "string" ? /* @__PURE__ */
|
2768
|
+
}) => /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
2769
|
+
typeof version === "string" ? /* @__PURE__ */ jsx38(
|
2717
2770
|
badge_default,
|
2718
2771
|
{
|
2719
2772
|
"data-test-id": "CTA_header-version-badge",
|
@@ -2727,7 +2780,7 @@ var Version = ({
|
|
2727
2780
|
children: version
|
2728
2781
|
}
|
2729
2782
|
) : version,
|
2730
|
-
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */
|
2783
|
+
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ jsx38(
|
2731
2784
|
Box18,
|
2732
2785
|
{
|
2733
2786
|
background: "primary.50",
|
@@ -2750,7 +2803,7 @@ Version.defaultProps = {
|
|
2750
2803
|
};
|
2751
2804
|
|
2752
2805
|
// src/components/header/components/header.tsx
|
2753
|
-
import { jsx as
|
2806
|
+
import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
|
2754
2807
|
var Header = ({
|
2755
2808
|
brandColor,
|
2756
2809
|
data,
|
@@ -2768,7 +2821,7 @@ var Header = ({
|
|
2768
2821
|
bg = "white",
|
2769
2822
|
versionStyle,
|
2770
2823
|
...props
|
2771
|
-
}) => /* @__PURE__ */
|
2824
|
+
}) => /* @__PURE__ */ jsx39(Flex6, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ jsxs17(
|
2772
2825
|
Flex6,
|
2773
2826
|
{
|
2774
2827
|
h: "auto",
|
@@ -2777,13 +2830,13 @@ var Header = ({
|
|
2777
2830
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
2778
2831
|
pos: "relative",
|
2779
2832
|
children: [
|
2780
|
-
mainLogo && /* @__PURE__ */
|
2781
|
-
/* @__PURE__ */
|
2833
|
+
mainLogo && /* @__PURE__ */ jsxs17(Flex6, { alignItems: "center", children: [
|
2834
|
+
/* @__PURE__ */ jsx39(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
2782
2835
|
children && children
|
2783
2836
|
] }),
|
2784
|
-
centerLogo && /* @__PURE__ */
|
2785
|
-
/* @__PURE__ */
|
2786
|
-
/* @__PURE__ */
|
2837
|
+
centerLogo && /* @__PURE__ */ jsxs17(HStack3, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
2838
|
+
/* @__PURE__ */ jsx39(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
2839
|
+
/* @__PURE__ */ jsx39(
|
2787
2840
|
Version,
|
2788
2841
|
{
|
2789
2842
|
hideEnv,
|
@@ -2794,9 +2847,9 @@ var Header = ({
|
|
2794
2847
|
}
|
2795
2848
|
)
|
2796
2849
|
] }),
|
2797
|
-
profile || /* @__PURE__ */
|
2798
|
-
!hideSwitchMode && /* @__PURE__ */
|
2799
|
-
/* @__PURE__ */
|
2850
|
+
profile || /* @__PURE__ */ jsxs17(Flex6, { alignItems: "center", children: [
|
2851
|
+
!hideSwitchMode && /* @__PURE__ */ jsx39(switch_mode_default, {}),
|
2852
|
+
/* @__PURE__ */ jsx39(Profile, { color: props.color, brandColor, data, onLogout })
|
2800
2853
|
] })
|
2801
2854
|
]
|
2802
2855
|
}
|
@@ -2819,9 +2872,9 @@ Header.defaultProps = {
|
|
2819
2872
|
|
2820
2873
|
// src/components/header/components/navbar.tsx
|
2821
2874
|
import { Flex as Flex7 } from "@chakra-ui/react";
|
2822
|
-
import { jsx as
|
2875
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
2823
2876
|
var Navbar = ({ bg = "white", children, ...props }) => {
|
2824
|
-
return /* @__PURE__ */
|
2877
|
+
return /* @__PURE__ */ jsx40(
|
2825
2878
|
Flex7,
|
2826
2879
|
{
|
2827
2880
|
minH: "15",
|
@@ -2877,12 +2930,12 @@ import { List, ListIcon, ListItem, ListItemProps, ListProps, OrderedList, Unorde
|
|
2877
2930
|
// src/components/modal/components/modal-back-button.tsx
|
2878
2931
|
import { ChevronLeftIcon } from "@chakra-ui/icons";
|
2879
2932
|
import { IconButton as IconButton5 } from "@chakra-ui/react";
|
2880
|
-
import { jsx as
|
2933
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
2881
2934
|
var ModalBackButton = ({ onClick }) => {
|
2882
|
-
return /* @__PURE__ */
|
2935
|
+
return /* @__PURE__ */ jsx41(
|
2883
2936
|
IconButton5,
|
2884
2937
|
{
|
2885
|
-
icon: /* @__PURE__ */
|
2938
|
+
icon: /* @__PURE__ */ jsx41(ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
2886
2939
|
size: "sm",
|
2887
2940
|
minW: "6",
|
2888
2941
|
h: "6",
|
@@ -2947,10 +3000,10 @@ import {
|
|
2947
3000
|
Button as Button3,
|
2948
3001
|
Flex as Flex9,
|
2949
3002
|
Link as Link3,
|
2950
|
-
Popover as
|
2951
|
-
PopoverContent as
|
2952
|
-
PopoverTrigger as
|
2953
|
-
Portal,
|
3003
|
+
Popover as Popover3,
|
3004
|
+
PopoverContent as PopoverContent3,
|
3005
|
+
PopoverTrigger as PopoverTrigger3,
|
3006
|
+
Portal as Portal2,
|
2954
3007
|
Text as Text9,
|
2955
3008
|
useColorModeValue as useColorModeValue3
|
2956
3009
|
} from "@chakra-ui/react";
|
@@ -2959,26 +3012,26 @@ import { css as css3 } from "@emotion/react";
|
|
2959
3012
|
|
2960
3013
|
// src/components/navigation/components/mapping-icon.tsx
|
2961
3014
|
import * as Icon4 from "@ctlyst.id/internal-icon";
|
2962
|
-
import { jsx as
|
3015
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
2963
3016
|
var mappingIcon = /* @__PURE__ */ new Map([
|
2964
|
-
["Order", /* @__PURE__ */
|
2965
|
-
["Fulfillment", /* @__PURE__ */
|
2966
|
-
["Transfer Stock", /* @__PURE__ */
|
2967
|
-
["Stock", /* @__PURE__ */
|
2968
|
-
["Product Database", /* @__PURE__ */
|
2969
|
-
["Purchasing", /* @__PURE__ */
|
2970
|
-
["Reseller", /* @__PURE__ */
|
2971
|
-
["Retur", /* @__PURE__ */
|
2972
|
-
["Other", /* @__PURE__ */
|
2973
|
-
["Content", /* @__PURE__ */
|
2974
|
-
["Customer", /* @__PURE__ */
|
2975
|
-
["Voucher", /* @__PURE__ */
|
3017
|
+
["Order", /* @__PURE__ */ jsx42(Icon4.ShoppingBag, { size: 4, color: "inherit" }, "order")],
|
3018
|
+
["Fulfillment", /* @__PURE__ */ jsx42(Icon4.ShoppingCart, { size: 4, color: "inherit" }, "fullfilment")],
|
3019
|
+
["Transfer Stock", /* @__PURE__ */ jsx42(Icon4.Repeat, { size: 4, color: "inherit" }, "transfer-stock")],
|
3020
|
+
["Stock", /* @__PURE__ */ jsx42(Icon4.Box, { size: 4, color: "inherit" }, "stock")],
|
3021
|
+
["Product Database", /* @__PURE__ */ jsx42(Icon4.Layers, { size: 4, color: "inherit" }, "product-database")],
|
3022
|
+
["Purchasing", /* @__PURE__ */ jsx42(Icon4.DollarSign, { size: 4, color: "inherit" }, "purchasing")],
|
3023
|
+
["Reseller", /* @__PURE__ */ jsx42(Icon4.Users, { size: 4, color: "inherit" }, "reseller")],
|
3024
|
+
["Retur", /* @__PURE__ */ jsx42(Icon4.RotateCcw, { size: 4, color: "inherit" }, "retur")],
|
3025
|
+
["Other", /* @__PURE__ */ jsx42(Icon4.Settings, { size: 4, color: "inherit" }, "other")],
|
3026
|
+
["Content", /* @__PURE__ */ jsx42(Icon4.Layout, { size: 4, color: "inherit" }, "content")],
|
3027
|
+
["Customer", /* @__PURE__ */ jsx42(Icon4.HelpCircle, { size: 4, color: "inherit" }, "content")],
|
3028
|
+
["Voucher", /* @__PURE__ */ jsx42(Icon4.Gift, { size: 4, color: "inherit" }, "content")]
|
2976
3029
|
]);
|
2977
3030
|
|
2978
3031
|
// src/components/navigation/components/navigation.tsx
|
2979
|
-
import { Fragment as Fragment5, jsx as
|
3032
|
+
import { Fragment as Fragment5, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
2980
3033
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
2981
|
-
return /* @__PURE__ */
|
3034
|
+
return /* @__PURE__ */ jsx43(Box21, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ jsx43(
|
2982
3035
|
Flex9,
|
2983
3036
|
{
|
2984
3037
|
bg: "white",
|
@@ -2993,8 +3046,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2993
3046
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
2994
3047
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
2995
3048
|
const activeBg = isActive ? "primary.500" : void 0;
|
2996
|
-
return /* @__PURE__ */
|
2997
|
-
/* @__PURE__ */
|
3049
|
+
return /* @__PURE__ */ jsx43(Popover3, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
3050
|
+
/* @__PURE__ */ jsx43(PopoverTrigger3, { children: /* @__PURE__ */ jsx43(
|
2998
3051
|
Button3,
|
2999
3052
|
{
|
3000
3053
|
h: 7.5,
|
@@ -3008,12 +3061,12 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3008
3061
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
3009
3062
|
color: isActive ? "primary.50" : "black.high",
|
3010
3063
|
leftIcon: mappingIcon.get(navigation.title),
|
3011
|
-
rightIcon: /* @__PURE__ */
|
3064
|
+
rightIcon: /* @__PURE__ */ jsx43(Icon5.ChevronDown, { size: 4, color: "inherit" }),
|
3012
3065
|
children: navigation.title
|
3013
3066
|
}
|
3014
3067
|
) }),
|
3015
|
-
navigation.children && /* @__PURE__ */
|
3016
|
-
|
3068
|
+
navigation.children && /* @__PURE__ */ jsx43(Portal2, { children: /* @__PURE__ */ jsx43(Box21, { zIndex: "popover", children: /* @__PURE__ */ jsx43(
|
3069
|
+
PopoverContent3,
|
3017
3070
|
{
|
3018
3071
|
bg: useColorModeValue3("white", "ebony-clay.800"),
|
3019
3072
|
maxW: 250,
|
@@ -3024,7 +3077,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3024
3077
|
const link = navHost ? `${navHost}${navLink}` : navLink;
|
3025
3078
|
const isLocalLink = host === navHost;
|
3026
3079
|
const isActiveSub = activePath === navLink;
|
3027
|
-
return /* @__PURE__ */
|
3080
|
+
return /* @__PURE__ */ jsx43(
|
3028
3081
|
Link3,
|
3029
3082
|
{
|
3030
3083
|
as: isLocalLink ? as : void 0,
|
@@ -3032,7 +3085,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3032
3085
|
_hover: {
|
3033
3086
|
textDecoration: "none"
|
3034
3087
|
},
|
3035
|
-
children: /* @__PURE__ */
|
3088
|
+
children: /* @__PURE__ */ jsxs18(
|
3036
3089
|
Box21,
|
3037
3090
|
{
|
3038
3091
|
display: "flex",
|
@@ -3056,8 +3109,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3056
3109
|
py: 4,
|
3057
3110
|
children: [
|
3058
3111
|
mappingIcon.get(navigation.title),
|
3059
|
-
/* @__PURE__ */
|
3060
|
-
isActiveSub && /* @__PURE__ */
|
3112
|
+
/* @__PURE__ */ jsx43(Text9, { fontSize: "text.sm", ml: 3, children: title }),
|
3113
|
+
isActiveSub && /* @__PURE__ */ jsx43(
|
3061
3114
|
Box21,
|
3062
3115
|
{
|
3063
3116
|
width: 0.5,
|
@@ -3091,9 +3144,9 @@ Navigation.defaultProps = {
|
|
3091
3144
|
var navigation_default = Navigation;
|
3092
3145
|
|
3093
3146
|
// src/components/navigation/components/navigation-bar.tsx
|
3094
|
-
import { Box as Box22, Button as Button4, Flex as Flex10, Link as Link4, Popover as
|
3147
|
+
import { Box as Box22, Button as Button4, Flex as Flex10, Link as Link4, Popover as Popover4, PopoverContent as PopoverContent4, PopoverTrigger as PopoverTrigger4, Text as Text10 } from "@chakra-ui/react";
|
3095
3148
|
import * as Icon6 from "@ctlyst.id/internal-icon";
|
3096
|
-
import { Fragment as Fragment6, jsx as
|
3149
|
+
import { Fragment as Fragment6, jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
3097
3150
|
var NavigationBar = ({
|
3098
3151
|
navigations,
|
3099
3152
|
isFetched,
|
@@ -3108,7 +3161,7 @@ var NavigationBar = ({
|
|
3108
3161
|
}
|
3109
3162
|
return subMenu.navHost + subMenu.navLink;
|
3110
3163
|
};
|
3111
|
-
return /* @__PURE__ */
|
3164
|
+
return /* @__PURE__ */ jsx44(Box22, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ jsx44(
|
3112
3165
|
Flex10,
|
3113
3166
|
{
|
3114
3167
|
bg: "white",
|
@@ -3125,8 +3178,8 @@ var NavigationBar = ({
|
|
3125
3178
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
3126
3179
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
3127
3180
|
const activeBg = isActive ? "primary.500" : void 0;
|
3128
|
-
return /* @__PURE__ */
|
3129
|
-
/* @__PURE__ */
|
3181
|
+
return /* @__PURE__ */ jsx44(Popover4, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs19(Fragment6, { children: [
|
3182
|
+
/* @__PURE__ */ jsx44(PopoverTrigger4, { children: /* @__PURE__ */ jsx44(
|
3130
3183
|
Button4,
|
3131
3184
|
{
|
3132
3185
|
h: 7.5,
|
@@ -3140,11 +3193,11 @@ var NavigationBar = ({
|
|
3140
3193
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
3141
3194
|
color: isActive ? "primary.50" : "black.high",
|
3142
3195
|
leftIcon: mappingIcon2.get(item.title),
|
3143
|
-
rightIcon: /* @__PURE__ */
|
3196
|
+
rightIcon: /* @__PURE__ */ jsx44(Icon6.ChevronDown, { size: 4, color: "inherit" }),
|
3144
3197
|
children: item.title
|
3145
3198
|
}
|
3146
3199
|
) }),
|
3147
|
-
item.children && /* @__PURE__ */
|
3200
|
+
item.children && /* @__PURE__ */ jsx44(PopoverContent4, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ jsxs19(
|
3148
3201
|
Link4,
|
3149
3202
|
{
|
3150
3203
|
href: urlMenu(subMenu),
|
@@ -3162,7 +3215,7 @@ var NavigationBar = ({
|
|
3162
3215
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
3163
3216
|
children: [
|
3164
3217
|
mappingIcon2.get(item.title),
|
3165
|
-
/* @__PURE__ */
|
3218
|
+
/* @__PURE__ */ jsx44(Text10, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
3166
3219
|
]
|
3167
3220
|
},
|
3168
3221
|
subMenu.id
|
@@ -3183,13 +3236,13 @@ import { Box as Box23, Text as Text11, useColorModeValue as useColorModeValue5 }
|
|
3183
3236
|
|
3184
3237
|
// src/components/pagination/components/pagination-button.tsx
|
3185
3238
|
import { Button as Button5, forwardRef as forwardRef9, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
|
3186
|
-
import { jsx as
|
3239
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
3187
3240
|
var PaginationButton = forwardRef9(({ className, style, isActive, children, ...rest }, ref) => {
|
3188
3241
|
const btnBg = useColorModeValue4("neutral.300", "mirage.900");
|
3189
3242
|
const btnColor = useColorModeValue4("black.high", "primary.300");
|
3190
3243
|
const btnNotActiveBg = useColorModeValue4("secondary.50", "primary.500");
|
3191
3244
|
const btnNotActiveColor = useColorModeValue4("primary.500", "white");
|
3192
|
-
return /* @__PURE__ */
|
3245
|
+
return /* @__PURE__ */ jsx45(
|
3193
3246
|
Button5,
|
3194
3247
|
{
|
3195
3248
|
"data-test-id": "Pagination-Button",
|
@@ -3228,15 +3281,15 @@ var pagination_button_default = PaginationButton;
|
|
3228
3281
|
|
3229
3282
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
3230
3283
|
import { VisuallyHidden } from "@chakra-ui/react";
|
3231
|
-
import { jsx as
|
3284
|
+
import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
3232
3285
|
var PaginationButtonTrigger = ({
|
3233
3286
|
color: color2,
|
3234
3287
|
isDisabled,
|
3235
3288
|
onClick,
|
3236
3289
|
visuallyHidden,
|
3237
3290
|
icon
|
3238
|
-
}) => /* @__PURE__ */
|
3239
|
-
/* @__PURE__ */
|
3291
|
+
}) => /* @__PURE__ */ jsxs20(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color: color2, isDisabled, onClick, children: [
|
3292
|
+
/* @__PURE__ */ jsx46(VisuallyHidden, { children: visuallyHidden }),
|
3240
3293
|
icon
|
3241
3294
|
] });
|
3242
3295
|
PaginationButtonTrigger.defaultProps = {
|
@@ -3249,7 +3302,7 @@ PaginationButtonTrigger.defaultProps = {
|
|
3249
3302
|
var pagination_button_trigger_default = PaginationButtonTrigger;
|
3250
3303
|
|
3251
3304
|
// src/components/pagination/components/pagination.tsx
|
3252
|
-
import { jsx as
|
3305
|
+
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
3253
3306
|
var Pagination = ({ className, current, total, onSelect }) => {
|
3254
3307
|
const btnColorDisabled = useColorModeValue5("secondary.100", "primary.500");
|
3255
3308
|
const btnColor = useColorModeValue5("primary.500", "secondary.100");
|
@@ -3279,8 +3332,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3279
3332
|
}
|
3280
3333
|
return pageButtons;
|
3281
3334
|
};
|
3282
|
-
return /* @__PURE__ */
|
3283
|
-
/* @__PURE__ */
|
3335
|
+
return /* @__PURE__ */ jsxs21(Box23, { className, display: "inline-flex", alignItems: "center", children: [
|
3336
|
+
/* @__PURE__ */ jsx47(Box23, { mr: 1, children: /* @__PURE__ */ jsx47(
|
3284
3337
|
pagination_button_trigger_default,
|
3285
3338
|
{
|
3286
3339
|
"data-test-id": "Pagination-Button",
|
@@ -3288,11 +3341,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3288
3341
|
isDisabled: disabledPrevious,
|
3289
3342
|
onClick: () => handleSelectPage(1),
|
3290
3343
|
visuallyHidden: "First Page",
|
3291
|
-
icon: /* @__PURE__ */
|
3344
|
+
icon: /* @__PURE__ */ jsx47(ArrowLeftIcon, { width: 2 })
|
3292
3345
|
}
|
3293
3346
|
) }),
|
3294
|
-
/* @__PURE__ */
|
3295
|
-
/* @__PURE__ */
|
3347
|
+
/* @__PURE__ */ jsxs21(Box23, { bg: "neutral.300", borderRadius: "full", children: [
|
3348
|
+
/* @__PURE__ */ jsx47(
|
3296
3349
|
pagination_button_trigger_default,
|
3297
3350
|
{
|
3298
3351
|
"data-test-id": "Pagination-Button",
|
@@ -3300,22 +3353,22 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3300
3353
|
isDisabled: disabledPrevious,
|
3301
3354
|
onClick: () => handleSelectPage(current - 1),
|
3302
3355
|
visuallyHidden: "Previous Page",
|
3303
|
-
icon: /* @__PURE__ */
|
3356
|
+
icon: /* @__PURE__ */ jsx47(ChevronLeftIcon2, {})
|
3304
3357
|
}
|
3305
3358
|
),
|
3306
3359
|
generatePages().map((page) => {
|
3307
|
-
return /* @__PURE__ */
|
3360
|
+
return /* @__PURE__ */ jsx47(
|
3308
3361
|
pagination_button_default,
|
3309
3362
|
{
|
3310
3363
|
"data-test-id": "Pagination-Button",
|
3311
3364
|
isActive: page === current,
|
3312
3365
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
3313
|
-
children: /* @__PURE__ */
|
3366
|
+
children: /* @__PURE__ */ jsx47(Text11, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
3314
3367
|
},
|
3315
3368
|
page
|
3316
3369
|
);
|
3317
3370
|
}),
|
3318
|
-
/* @__PURE__ */
|
3371
|
+
/* @__PURE__ */ jsx47(
|
3319
3372
|
pagination_button_trigger_default,
|
3320
3373
|
{
|
3321
3374
|
"data-test-id": "Pagination-Button",
|
@@ -3323,11 +3376,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3323
3376
|
isDisabled: disabledNext,
|
3324
3377
|
onClick: () => handleSelectPage(current + 1),
|
3325
3378
|
visuallyHidden: "Next Page",
|
3326
|
-
icon: /* @__PURE__ */
|
3379
|
+
icon: /* @__PURE__ */ jsx47(ChevronRightIcon, {})
|
3327
3380
|
}
|
3328
3381
|
)
|
3329
3382
|
] }),
|
3330
|
-
/* @__PURE__ */
|
3383
|
+
/* @__PURE__ */ jsx47(Box23, { ml: 1, children: /* @__PURE__ */ jsx47(
|
3331
3384
|
pagination_button_trigger_default,
|
3332
3385
|
{
|
3333
3386
|
"data-test-id": "Pagination-Button",
|
@@ -3335,7 +3388,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3335
3388
|
isDisabled: disabledNext,
|
3336
3389
|
onClick: () => handleSelectPage(total),
|
3337
3390
|
visuallyHidden: "Last Page",
|
3338
|
-
icon: /* @__PURE__ */
|
3391
|
+
icon: /* @__PURE__ */ jsx47(ArrowRightIcon, { width: 2 })
|
3339
3392
|
}
|
3340
3393
|
) })
|
3341
3394
|
] });
|
@@ -3349,7 +3402,7 @@ var pagination_default = Pagination;
|
|
3349
3402
|
|
3350
3403
|
// src/components/pagination/components/pagination-detail.tsx
|
3351
3404
|
import { Text as Text12 } from "@chakra-ui/react";
|
3352
|
-
import { jsx as
|
3405
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
3353
3406
|
var PaginationDetail = ({
|
3354
3407
|
page,
|
3355
3408
|
limit,
|
@@ -3359,7 +3412,7 @@ var PaginationDetail = ({
|
|
3359
3412
|
lineHeight = 18,
|
3360
3413
|
...rest
|
3361
3414
|
}) => {
|
3362
|
-
return /* @__PURE__ */
|
3415
|
+
return /* @__PURE__ */ jsx48(Text12, { scale: scale2, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
3363
3416
|
};
|
3364
3417
|
var pagination_detail_default = PaginationDetail;
|
3365
3418
|
|
@@ -3367,7 +3420,7 @@ var pagination_detail_default = PaginationDetail;
|
|
3367
3420
|
import { Box as Box24, Select, Text as Text13, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
|
3368
3421
|
import * as React9 from "react";
|
3369
3422
|
import { FiChevronDown } from "react-icons/fi";
|
3370
|
-
import { jsx as
|
3423
|
+
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
3371
3424
|
var PaginationFilter = ({
|
3372
3425
|
limit,
|
3373
3426
|
label = "Baris per halaman:",
|
@@ -3376,9 +3429,9 @@ var PaginationFilter = ({
|
|
3376
3429
|
...rest
|
3377
3430
|
}) => {
|
3378
3431
|
const [value, setValue] = React9.useState(limit);
|
3379
|
-
return /* @__PURE__ */
|
3380
|
-
/* @__PURE__ */
|
3381
|
-
/* @__PURE__ */
|
3432
|
+
return /* @__PURE__ */ jsxs22(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
3433
|
+
/* @__PURE__ */ jsx49(Text13, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue6("neutral.900", "white"), ...rest, children: label }),
|
3434
|
+
/* @__PURE__ */ jsx49(
|
3382
3435
|
Select,
|
3383
3436
|
{
|
3384
3437
|
textAlign: "center",
|
@@ -3387,7 +3440,7 @@ var PaginationFilter = ({
|
|
3387
3440
|
border: "none",
|
3388
3441
|
boxShadow: "none",
|
3389
3442
|
width: 18,
|
3390
|
-
icon: /* @__PURE__ */
|
3443
|
+
icon: /* @__PURE__ */ jsx49(FiChevronDown, {}),
|
3391
3444
|
_focusVisible: { boxShadow: "none" },
|
3392
3445
|
onChange: (e) => {
|
3393
3446
|
const numberValue = Number(e.target.value);
|
@@ -3396,7 +3449,7 @@ var PaginationFilter = ({
|
|
3396
3449
|
},
|
3397
3450
|
value,
|
3398
3451
|
children: items.map((item) => {
|
3399
|
-
return /* @__PURE__ */
|
3452
|
+
return /* @__PURE__ */ jsx49("option", { value: item, children: item }, item);
|
3400
3453
|
})
|
3401
3454
|
}
|
3402
3455
|
)
|
@@ -3427,22 +3480,22 @@ import {
|
|
3427
3480
|
|
3428
3481
|
// src/components/popover/index.ts
|
3429
3482
|
import {
|
3430
|
-
Popover as
|
3483
|
+
Popover as Popover5,
|
3431
3484
|
PopoverAnchor,
|
3432
|
-
PopoverArrow as
|
3485
|
+
PopoverArrow as PopoverArrow3,
|
3433
3486
|
PopoverArrowProps,
|
3434
|
-
PopoverBody as
|
3487
|
+
PopoverBody as PopoverBody3,
|
3435
3488
|
PopoverBodyProps,
|
3436
3489
|
PopoverCloseButton,
|
3437
|
-
PopoverContent as
|
3490
|
+
PopoverContent as PopoverContent5,
|
3438
3491
|
PopoverContentProps,
|
3439
3492
|
PopoverFooter,
|
3440
3493
|
PopoverFooterProps,
|
3441
3494
|
PopoverHeader,
|
3442
3495
|
PopoverHeaderProps,
|
3443
3496
|
PopoverProps,
|
3444
|
-
PopoverTrigger as
|
3445
|
-
Portal as
|
3497
|
+
PopoverTrigger as PopoverTrigger5,
|
3498
|
+
Portal as Portal3,
|
3446
3499
|
PortalProps
|
3447
3500
|
} from "@chakra-ui/react";
|
3448
3501
|
|
@@ -3459,12 +3512,12 @@ import {
|
|
3459
3512
|
|
3460
3513
|
// src/components/radio/components/radio.tsx
|
3461
3514
|
import { Box as Box25, Radio as ChakraRadio, Text as Text14 } from "@chakra-ui/react";
|
3462
|
-
import { jsx as
|
3515
|
+
import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
|
3463
3516
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
3464
3517
|
const variant = isError ? "errors" : "unstyled";
|
3465
|
-
return /* @__PURE__ */
|
3466
|
-
/* @__PURE__ */
|
3467
|
-
isError && errorText ? /* @__PURE__ */
|
3518
|
+
return /* @__PURE__ */ jsxs23(Box25, { children: [
|
3519
|
+
/* @__PURE__ */ jsx50(Box25, { display: "flex", children: /* @__PURE__ */ jsx50(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx50(Text14, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
3520
|
+
isError && errorText ? /* @__PURE__ */ jsx50(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx50(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ jsx50(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx50(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
3468
3521
|
] });
|
3469
3522
|
};
|
3470
3523
|
Radio.displayName = "Radio";
|
@@ -3476,7 +3529,7 @@ Radio.defaultProps = {
|
|
3476
3529
|
|
3477
3530
|
// src/components/radio/components/radio-group.tsx
|
3478
3531
|
import { Box as Box26, RadioGroup as ChakraRadioGroup, Stack as Stack3 } from "@chakra-ui/react";
|
3479
|
-
import { jsx as
|
3532
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
3480
3533
|
var RadioGroup = ({
|
3481
3534
|
children,
|
3482
3535
|
label,
|
@@ -3485,7 +3538,7 @@ var RadioGroup = ({
|
|
3485
3538
|
errorMessage,
|
3486
3539
|
...props
|
3487
3540
|
}) => {
|
3488
|
-
return /* @__PURE__ */
|
3541
|
+
return /* @__PURE__ */ jsx51(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ jsx51(Box26, { mt: "2", mb: "1", children: /* @__PURE__ */ jsx51(ChakraRadioGroup, { ...props, children: /* @__PURE__ */ jsx51(Stack3, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
3489
3542
|
};
|
3490
3543
|
RadioGroup.displayName = "RadioGroup";
|
3491
3544
|
RadioGroup.defaultProps = {
|
@@ -3508,9 +3561,9 @@ import {
|
|
3508
3561
|
// src/components/rating/components/rating.tsx
|
3509
3562
|
import { Grid as Grid2 } from "@chakra-ui/react";
|
3510
3563
|
import { Rating as RatingIcon } from "@ctlyst.id/internal-icon";
|
3511
|
-
import { jsx as
|
3564
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
3512
3565
|
var Rating = ({ value }) => {
|
3513
|
-
return /* @__PURE__ */
|
3566
|
+
return /* @__PURE__ */ jsx52(Grid2, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx52(RatingIcon, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
3514
3567
|
};
|
3515
3568
|
var rating_default = Rating;
|
3516
3569
|
|
@@ -3866,14 +3919,14 @@ var themeSelect = (theme5) => {
|
|
3866
3919
|
};
|
3867
3920
|
|
3868
3921
|
// src/components/select/components/select.tsx
|
3869
|
-
import { jsx as
|
3922
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
3870
3923
|
function Select2({
|
3871
3924
|
styles,
|
3872
3925
|
isError = false,
|
3873
3926
|
...rest
|
3874
3927
|
}) {
|
3875
3928
|
const { colorMode } = useColorMode3();
|
3876
|
-
return /* @__PURE__ */
|
3929
|
+
return /* @__PURE__ */ jsx53(
|
3877
3930
|
ReactSelect,
|
3878
3931
|
{
|
3879
3932
|
classNamePrefix: "react-select",
|
@@ -3888,14 +3941,14 @@ var select_default = Select2;
|
|
3888
3941
|
// src/components/select/components/select-async.tsx
|
3889
3942
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
3890
3943
|
import { AsyncPaginate } from "react-select-async-paginate";
|
3891
|
-
import { jsx as
|
3944
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
3892
3945
|
function SelectAsync({
|
3893
3946
|
styles,
|
3894
3947
|
isError = false,
|
3895
3948
|
...rest
|
3896
3949
|
}) {
|
3897
3950
|
const { colorMode } = useColorMode4();
|
3898
|
-
return /* @__PURE__ */
|
3951
|
+
return /* @__PURE__ */ jsx54(
|
3899
3952
|
AsyncPaginate,
|
3900
3953
|
{
|
3901
3954
|
classNamePrefix: "react-select",
|
@@ -3910,10 +3963,10 @@ var select_async_default = SelectAsync;
|
|
3910
3963
|
// src/components/select/components/select-async-creatable.tsx
|
3911
3964
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
3912
3965
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
3913
|
-
import { jsx as
|
3966
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
3914
3967
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3915
3968
|
const { colorMode } = useColorMode5();
|
3916
|
-
return /* @__PURE__ */
|
3969
|
+
return /* @__PURE__ */ jsx55(
|
3917
3970
|
ReactSelectAsyncCreatable,
|
3918
3971
|
{
|
3919
3972
|
classNamePrefix: "react-select",
|
@@ -3927,10 +3980,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3927
3980
|
// src/components/select/components/select-creatable.tsx
|
3928
3981
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
3929
3982
|
import ReactSelectCreatable from "react-select/creatable";
|
3930
|
-
import { jsx as
|
3983
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
3931
3984
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3932
3985
|
const { colorMode } = useColorMode6();
|
3933
|
-
return /* @__PURE__ */
|
3986
|
+
return /* @__PURE__ */ jsx56(
|
3934
3987
|
ReactSelectCreatable,
|
3935
3988
|
{
|
3936
3989
|
classNamePrefix: "react-select",
|
@@ -3945,7 +3998,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3945
3998
|
import { Checkbox as Checkbox3, Flex as Flex11, Text as Text15 } from "@chakra-ui/react";
|
3946
3999
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3947
4000
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3948
|
-
import { Fragment as Fragment7, jsx as
|
4001
|
+
import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
|
3949
4002
|
var CHECKBOX_STATE = {
|
3950
4003
|
UNCHECKED: 0,
|
3951
4004
|
INDETERMINATE: 1,
|
@@ -3992,8 +4045,8 @@ var InputOption = ({
|
|
3992
4045
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
3993
4046
|
style
|
3994
4047
|
};
|
3995
|
-
return /* @__PURE__ */
|
3996
|
-
/* @__PURE__ */
|
4048
|
+
return /* @__PURE__ */ jsxs24(Fragment7, { children: [
|
4049
|
+
/* @__PURE__ */ jsx57(
|
3997
4050
|
ComponentRS.Option,
|
3998
4051
|
{
|
3999
4052
|
isMulti: true,
|
@@ -4004,7 +4057,7 @@ var InputOption = ({
|
|
4004
4057
|
getStyles,
|
4005
4058
|
innerProps: props,
|
4006
4059
|
...rest,
|
4007
|
-
children: /* @__PURE__ */
|
4060
|
+
children: /* @__PURE__ */ jsxs24(
|
4008
4061
|
Flex11,
|
4009
4062
|
{
|
4010
4063
|
alignItems: "center",
|
@@ -4014,7 +4067,7 @@ var InputOption = ({
|
|
4014
4067
|
"data-test-id": "CT_component_select-checkbox_options",
|
4015
4068
|
cursor: isDisabled ? "not-allowed" : "default",
|
4016
4069
|
children: [
|
4017
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4070
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx57(
|
4018
4071
|
Checkbox3,
|
4019
4072
|
{
|
4020
4073
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -4022,14 +4075,14 @@ var InputOption = ({
|
|
4022
4075
|
isDisabled,
|
4023
4076
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
4024
4077
|
}
|
4025
|
-
) : /* @__PURE__ */
|
4026
|
-
/* @__PURE__ */
|
4078
|
+
) : /* @__PURE__ */ jsx57(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
|
4079
|
+
/* @__PURE__ */ jsx57(Text15, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
4027
4080
|
]
|
4028
4081
|
}
|
4029
4082
|
)
|
4030
4083
|
}
|
4031
4084
|
),
|
4032
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4085
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx57("hr", {}) : null
|
4033
4086
|
] });
|
4034
4087
|
};
|
4035
4088
|
var SelectWithCheckboxBase = ({
|
@@ -4039,7 +4092,7 @@ var SelectWithCheckboxBase = ({
|
|
4039
4092
|
...rest
|
4040
4093
|
}) => {
|
4041
4094
|
const { colorMode } = useColorMode7();
|
4042
|
-
return /* @__PURE__ */
|
4095
|
+
return /* @__PURE__ */ jsx57(
|
4043
4096
|
ReactSelect2,
|
4044
4097
|
{
|
4045
4098
|
classNamePrefix: "react-select",
|
@@ -4058,7 +4111,7 @@ var SelectWithCheckboxBase = ({
|
|
4058
4111
|
var SelectCheckbox = (props) => {
|
4059
4112
|
const { isMulti, options, value, ...rest } = props;
|
4060
4113
|
const selectValue = value || [];
|
4061
|
-
return /* @__PURE__ */
|
4114
|
+
return /* @__PURE__ */ jsx57(
|
4062
4115
|
SelectWithCheckboxBase,
|
4063
4116
|
{
|
4064
4117
|
isMulti,
|
@@ -4069,7 +4122,7 @@ var SelectCheckbox = (props) => {
|
|
4069
4122
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
4070
4123
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
4071
4124
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
4072
|
-
return /* @__PURE__ */
|
4125
|
+
return /* @__PURE__ */ jsx57(InputOption, { ...optionProps, checkedState });
|
4073
4126
|
}
|
4074
4127
|
},
|
4075
4128
|
...rest
|
@@ -10960,10 +11013,10 @@ var AnimatePresence = function(_a) {
|
|
10960
11013
|
};
|
10961
11014
|
|
10962
11015
|
// src/components/sidebar/components/sidebar.tsx
|
10963
|
-
import { jsx as
|
11016
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
10964
11017
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
10965
11018
|
const { width = "220px" } = props;
|
10966
|
-
return /* @__PURE__ */
|
11019
|
+
return /* @__PURE__ */ jsx58(
|
10967
11020
|
Flex12,
|
10968
11021
|
{
|
10969
11022
|
position: "relative",
|
@@ -10986,9 +11039,9 @@ Sidebar.displayName = "Sidebar";
|
|
10986
11039
|
// src/components/sidebar/components/sidebar-header.tsx
|
10987
11040
|
import { Box as Box27, Flex as Flex13, Text as Text16 } from "@chakra-ui/react";
|
10988
11041
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
10989
|
-
import { jsx as
|
11042
|
+
import { jsx as jsx59, jsxs as jsxs25 } from "react/jsx-runtime";
|
10990
11043
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
10991
|
-
return /* @__PURE__ */
|
11044
|
+
return /* @__PURE__ */ jsx59(
|
10992
11045
|
Box27,
|
10993
11046
|
{
|
10994
11047
|
px: "2",
|
@@ -10998,7 +11051,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
10998
11051
|
_hover: {
|
10999
11052
|
color: "primary.500"
|
11000
11053
|
},
|
11001
|
-
children: /* @__PURE__ */
|
11054
|
+
children: /* @__PURE__ */ jsxs25(
|
11002
11055
|
Flex13,
|
11003
11056
|
{
|
11004
11057
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
@@ -11008,7 +11061,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
11008
11061
|
onClick: () => setCollapse(!isCollapse),
|
11009
11062
|
cursor: "pointer",
|
11010
11063
|
children: [
|
11011
|
-
/* @__PURE__ */
|
11064
|
+
/* @__PURE__ */ jsx59(
|
11012
11065
|
Box27,
|
11013
11066
|
{
|
11014
11067
|
as: motion.div,
|
@@ -11017,10 +11070,10 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
11017
11070
|
transition: "ease-in-out",
|
11018
11071
|
transitionDuration: "1ms",
|
11019
11072
|
"aria-label": "toggle sidebar",
|
11020
|
-
children: /* @__PURE__ */
|
11073
|
+
children: /* @__PURE__ */ jsx59(ArrowRight, { size: 4, color: "inherit" })
|
11021
11074
|
}
|
11022
11075
|
),
|
11023
|
-
/* @__PURE__ */
|
11076
|
+
/* @__PURE__ */ jsx59(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx59(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx59(
|
11024
11077
|
Text16,
|
11025
11078
|
{
|
11026
11079
|
as: motion.div,
|
@@ -11053,41 +11106,36 @@ import {
|
|
11053
11106
|
AccordionItem as AccordionItem2,
|
11054
11107
|
AccordionPanel as AccordionPanel2,
|
11055
11108
|
Box as Box28,
|
11056
|
-
Popover as
|
11057
|
-
PopoverBody as
|
11058
|
-
PopoverContent as
|
11109
|
+
Popover as Popover6,
|
11110
|
+
PopoverBody as PopoverBody4,
|
11111
|
+
PopoverContent as PopoverContent6,
|
11059
11112
|
PopoverHeader as PopoverHeader2,
|
11060
|
-
PopoverTrigger as
|
11061
|
-
Portal as
|
11113
|
+
PopoverTrigger as PopoverTrigger6,
|
11114
|
+
Portal as Portal4,
|
11062
11115
|
Text as Text17
|
11063
11116
|
} from "@chakra-ui/react";
|
11064
11117
|
import * as Icon7 from "@ctlyst.id/internal-icon";
|
11065
|
-
import { Fragment as Fragment9, jsx as
|
11118
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs26 } from "react/jsx-runtime";
|
11066
11119
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
11067
|
-
return /* @__PURE__ */
|
11068
|
-
|
11069
|
-
|
11070
|
-
isActive = item.navLink === active;
|
11071
|
-
} else {
|
11072
|
-
isActive = active == null ? void 0 : active.includes(item.navLink);
|
11073
|
-
}
|
11074
|
-
return /* @__PURE__ */ jsx59(AccordionItem2, { mt: "4", children: ({ isExpanded }) => {
|
11120
|
+
return /* @__PURE__ */ jsx60(Box28, { as: motion.div, animate: { padding: isCollapse ? "8px 16px" : "8px" }, children: /* @__PURE__ */ jsx60(Accordion2, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
11121
|
+
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
11122
|
+
return /* @__PURE__ */ jsx60(AccordionItem2, { mt: "4", children: ({ isExpanded }) => {
|
11075
11123
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
11076
11124
|
const noChild = !item.children.length;
|
11077
11125
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
11078
|
-
return /* @__PURE__ */
|
11079
|
-
/* @__PURE__ */
|
11126
|
+
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
11127
|
+
/* @__PURE__ */ jsx60(Popover6, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
11080
11128
|
const activeOption = isOpen ? "primary.50" : "white";
|
11081
11129
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
11082
11130
|
const activeParent = isActive ? backgroundColor : activeOption;
|
11083
|
-
return /* @__PURE__ */
|
11084
|
-
/* @__PURE__ */
|
11131
|
+
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
11132
|
+
/* @__PURE__ */ jsx60(PopoverTrigger6, { children: /* @__PURE__ */ jsx60(
|
11085
11133
|
AccordionButton2,
|
11086
11134
|
{
|
11087
11135
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
11088
11136
|
p: "0",
|
11089
11137
|
h: "fit-content",
|
11090
|
-
children: /* @__PURE__ */
|
11138
|
+
children: /* @__PURE__ */ jsxs26(
|
11091
11139
|
NavItem,
|
11092
11140
|
{
|
11093
11141
|
as: motion.div,
|
@@ -11099,8 +11147,8 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11099
11147
|
position: "relative",
|
11100
11148
|
...itemStyles,
|
11101
11149
|
children: [
|
11102
|
-
mappingIcon2 && /* @__PURE__ */
|
11103
|
-
!isCollapse && /* @__PURE__ */
|
11150
|
+
mappingIcon2 && /* @__PURE__ */ jsx60(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11151
|
+
!isCollapse && /* @__PURE__ */ jsxs26(
|
11104
11152
|
Box28,
|
11105
11153
|
{
|
11106
11154
|
display: "flex",
|
@@ -11114,15 +11162,15 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11114
11162
|
animate: { opacity: 1, x: 0 },
|
11115
11163
|
exit: { opacity: 0, x: 16 },
|
11116
11164
|
children: [
|
11117
|
-
/* @__PURE__ */
|
11118
|
-
!!item.children.length && /* @__PURE__ */
|
11165
|
+
/* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx60(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
11166
|
+
!!item.children.length && /* @__PURE__ */ jsx60(
|
11119
11167
|
Box28,
|
11120
11168
|
{
|
11121
11169
|
display: "flex",
|
11122
11170
|
boxSize: "3",
|
11123
11171
|
as: motion.div,
|
11124
11172
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
11125
|
-
children: /* @__PURE__ */
|
11173
|
+
children: /* @__PURE__ */ jsx60(Icon7.ChevronDown, { size: 3 })
|
11126
11174
|
}
|
11127
11175
|
)
|
11128
11176
|
]
|
@@ -11135,12 +11183,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11135
11183
|
},
|
11136
11184
|
item.id
|
11137
11185
|
) }, item.id),
|
11138
|
-
isOpenOptions && /* @__PURE__ */
|
11139
|
-
/* @__PURE__ */
|
11186
|
+
isOpenOptions && /* @__PURE__ */ jsx60(Portal4, { children: item.children.length > 0 ? /* @__PURE__ */ jsxs26(PopoverContent6, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
11187
|
+
/* @__PURE__ */ jsx60(PopoverHeader2, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ jsxs26(Box28, { display: "flex", alignItems: "center", children: [
|
11140
11188
|
mappingIcon2.get(item.icon || ""),
|
11141
|
-
/* @__PURE__ */
|
11189
|
+
/* @__PURE__ */ jsx60(Box28, { as: "span", ml: "2", children: item.title })
|
11142
11190
|
] }) }),
|
11143
|
-
!!item.children.length && /* @__PURE__ */
|
11191
|
+
!!item.children.length && /* @__PURE__ */ jsx60(PopoverBody4, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx60(
|
11144
11192
|
NavItem,
|
11145
11193
|
{
|
11146
11194
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -11156,7 +11204,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11156
11204
|
},
|
11157
11205
|
submenu.id
|
11158
11206
|
)) })
|
11159
|
-
] }) : isCollapse && /* @__PURE__ */
|
11207
|
+
] }) : isCollapse && /* @__PURE__ */ jsx60(PopoverContent6, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx60(PopoverBody4, { py: "1", px: "0", children: /* @__PURE__ */ jsxs26(
|
11160
11208
|
NavItem,
|
11161
11209
|
{
|
11162
11210
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -11169,15 +11217,15 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11169
11217
|
rounded: "none",
|
11170
11218
|
...itemStyles,
|
11171
11219
|
children: [
|
11172
|
-
mappingIcon2 && /* @__PURE__ */
|
11173
|
-
/* @__PURE__ */
|
11220
|
+
mappingIcon2 && /* @__PURE__ */ jsx60(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11221
|
+
/* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx60(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
11174
11222
|
]
|
11175
11223
|
},
|
11176
11224
|
item.id
|
11177
11225
|
) }) }) })
|
11178
11226
|
] });
|
11179
11227
|
} }, item.id),
|
11180
|
-
!isCollapse && /* @__PURE__ */
|
11228
|
+
!isCollapse && /* @__PURE__ */ jsx60(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx60(
|
11181
11229
|
NavItem,
|
11182
11230
|
{
|
11183
11231
|
mt: "1",
|
@@ -11205,7 +11253,7 @@ import { chakra as chakra6, Flex as Flex14, forwardRef as forwardRef11, omitThem
|
|
11205
11253
|
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
11206
11254
|
import { Check as Check2, Close as Close4 } from "@ctlyst.id/internal-icon";
|
11207
11255
|
import { useMemo as useMemo7 } from "react";
|
11208
|
-
import { jsx as
|
11256
|
+
import { jsx as jsx61, jsxs as jsxs27 } from "react/jsx-runtime";
|
11209
11257
|
var Switch = forwardRef11(function Switch2(props, ref) {
|
11210
11258
|
const styles = useMultiStyleConfig2("Switch", props);
|
11211
11259
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
@@ -11248,7 +11296,7 @@ var Switch = forwardRef11(function Switch2(props, ref) {
|
|
11248
11296
|
};
|
11249
11297
|
return iconSize[value];
|
11250
11298
|
};
|
11251
|
-
return /* @__PURE__ */
|
11299
|
+
return /* @__PURE__ */ jsxs27(
|
11252
11300
|
chakra6.label,
|
11253
11301
|
{
|
11254
11302
|
...getRootProps(),
|
@@ -11257,13 +11305,13 @@ var Switch = forwardRef11(function Switch2(props, ref) {
|
|
11257
11305
|
className: cx10("chakra-switch", props.className),
|
11258
11306
|
__css: containerStyles,
|
11259
11307
|
children: [
|
11260
|
-
/* @__PURE__ */
|
11261
|
-
/* @__PURE__ */
|
11262
|
-
/* @__PURE__ */
|
11263
|
-
/* @__PURE__ */
|
11264
|
-
/* @__PURE__ */
|
11308
|
+
/* @__PURE__ */ jsx61("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
11309
|
+
/* @__PURE__ */ jsxs27(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
11310
|
+
/* @__PURE__ */ jsxs27(Flex14, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
11311
|
+
/* @__PURE__ */ jsx61(Check2, { color: "white", size: getIconSize(props.size) }),
|
11312
|
+
/* @__PURE__ */ jsx61(Close4, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
11265
11313
|
] }),
|
11266
|
-
/* @__PURE__ */
|
11314
|
+
/* @__PURE__ */ jsx61(
|
11267
11315
|
chakra6.span,
|
11268
11316
|
{
|
11269
11317
|
__css: styles.thumb,
|
@@ -11273,7 +11321,7 @@ var Switch = forwardRef11(function Switch2(props, ref) {
|
|
11273
11321
|
}
|
11274
11322
|
)
|
11275
11323
|
] }),
|
11276
|
-
children && /* @__PURE__ */
|
11324
|
+
children && /* @__PURE__ */ jsx61(
|
11277
11325
|
chakra6.span,
|
11278
11326
|
{
|
11279
11327
|
className: "chakra-switch__label",
|
@@ -11311,13 +11359,13 @@ import {
|
|
11311
11359
|
|
11312
11360
|
// src/components/tabs/components/tab.tsx
|
11313
11361
|
import { Button as Button6, Flex as Flex15, forwardRef as forwardRef12, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
11314
|
-
import { jsx as
|
11362
|
+
import { jsx as jsx62, jsxs as jsxs28 } from "react/jsx-runtime";
|
11315
11363
|
var Tab = forwardRef12((props, ref) => {
|
11316
11364
|
var _a, _b;
|
11317
11365
|
const tabProps = useTab({ ...props, ref });
|
11318
11366
|
const isSelected = !!tabProps["aria-selected"];
|
11319
11367
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
11320
|
-
return /* @__PURE__ */
|
11368
|
+
return /* @__PURE__ */ jsx62(
|
11321
11369
|
Button6,
|
11322
11370
|
{
|
11323
11371
|
"data-test-id": props["data-test-id"],
|
@@ -11343,7 +11391,7 @@ var Tab = forwardRef12((props, ref) => {
|
|
11343
11391
|
},
|
11344
11392
|
__css: styles.tab,
|
11345
11393
|
...tabProps,
|
11346
|
-
children: /* @__PURE__ */
|
11394
|
+
children: /* @__PURE__ */ jsxs28(Flex15, { alignItems: "center", children: [
|
11347
11395
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
11348
11396
|
tabProps.children,
|
11349
11397
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -11397,9 +11445,9 @@ import { Bounce, toast } from "react-toastify";
|
|
11397
11445
|
|
11398
11446
|
// src/components/toast/components/styles.tsx
|
11399
11447
|
import { Global as Global2 } from "@emotion/react";
|
11400
|
-
import { jsx as
|
11448
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
11401
11449
|
var Styles2 = () => {
|
11402
|
-
return /* @__PURE__ */
|
11450
|
+
return /* @__PURE__ */ jsx63(
|
11403
11451
|
Global2,
|
11404
11452
|
{
|
11405
11453
|
styles: `
|
@@ -11431,7 +11479,7 @@ var Styles2 = () => {
|
|
11431
11479
|
var styles_default2 = Styles2;
|
11432
11480
|
|
11433
11481
|
// src/components/toast/components/toast.tsx
|
11434
|
-
import { Fragment as Fragment10, jsx as
|
11482
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs29 } from "react/jsx-runtime";
|
11435
11483
|
var DEFAULT_OPTIONS = {
|
11436
11484
|
position: "top-right",
|
11437
11485
|
autoClose: 5e3,
|
@@ -11462,14 +11510,14 @@ var useToast = () => {
|
|
11462
11510
|
"success.500"
|
11463
11511
|
]);
|
11464
11512
|
const content = (icon, message, link) => {
|
11465
|
-
return /* @__PURE__ */
|
11466
|
-
/* @__PURE__ */
|
11467
|
-
/* @__PURE__ */
|
11468
|
-
/* @__PURE__ */
|
11469
|
-
icon && /* @__PURE__ */
|
11470
|
-
/* @__PURE__ */
|
11513
|
+
return /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
11514
|
+
/* @__PURE__ */ jsx64(styles_default2, {}),
|
11515
|
+
/* @__PURE__ */ jsxs29(Flex16, { justifyContent: "space-between", alignItems: "center", gap: 4, children: [
|
11516
|
+
/* @__PURE__ */ jsxs29(Flex16, { alignItems: "center", children: [
|
11517
|
+
icon && /* @__PURE__ */ jsx64(chakra7.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
11518
|
+
/* @__PURE__ */ jsx64(chakra7.span, { noOfLines: 2, children: message })
|
11471
11519
|
] }),
|
11472
|
-
link && /* @__PURE__ */
|
11520
|
+
link && /* @__PURE__ */ jsx64(
|
11473
11521
|
Link6,
|
11474
11522
|
{
|
11475
11523
|
href: link.url,
|
@@ -11547,29 +11595,6 @@ var useToast = () => {
|
|
11547
11595
|
// src/components/toast/index.ts
|
11548
11596
|
import { ToastContainer } from "react-toastify";
|
11549
11597
|
|
11550
|
-
// src/components/tooltip/components/tooltip.tsx
|
11551
|
-
import {
|
11552
|
-
Popover as Popover6,
|
11553
|
-
PopoverArrow as PopoverArrow3,
|
11554
|
-
PopoverBody as PopoverBody4,
|
11555
|
-
PopoverContent as PopoverContent6,
|
11556
|
-
PopoverTrigger as PopoverTrigger6,
|
11557
|
-
Portal as Portal4,
|
11558
|
-
Tooltip as ChakraTooltip
|
11559
|
-
} from "@chakra-ui/react";
|
11560
|
-
import { jsx as jsx64, jsxs as jsxs29 } from "react/jsx-runtime";
|
11561
|
-
var Tooltip = (props) => {
|
11562
|
-
const { children, bg = "neutral.700", textStyle = "text.sm", color: color2 = "white" } = props;
|
11563
|
-
const content = /* @__PURE__ */ jsxs29(PopoverContent6, { border: "none", bg, textStyle, borderRadius: props.borderRadius, children: [
|
11564
|
-
props.hasArrow && /* @__PURE__ */ jsx64(PopoverArrow3, { color: color2, bg }),
|
11565
|
-
/* @__PURE__ */ jsx64(PopoverBody4, { color: color2, ...props, children: props.label })
|
11566
|
-
] });
|
11567
|
-
return props.isInteractive === true ? /* @__PURE__ */ jsxs29(Popover6, { trigger: "hover", placement: props.placement, children: [
|
11568
|
-
/* @__PURE__ */ jsx64(PopoverTrigger6, { children }),
|
11569
|
-
props.portal ? /* @__PURE__ */ jsx64(Portal4, { children: content }) : content
|
11570
|
-
] }) : /* @__PURE__ */ jsx64(ChakraTooltip, { ...props, children });
|
11571
|
-
};
|
11572
|
-
|
11573
11598
|
// src/components/uploader/components/uploader.tsx
|
11574
11599
|
import {
|
11575
11600
|
Box as Box29,
|
@@ -13783,22 +13808,22 @@ export {
|
|
13783
13808
|
PinInputFieldProps,
|
13784
13809
|
PinInputProps,
|
13785
13810
|
PinInputProvider,
|
13786
|
-
|
13811
|
+
Popover5 as Popover,
|
13787
13812
|
PopoverAnchor,
|
13788
|
-
|
13813
|
+
PopoverArrow3 as PopoverArrow,
|
13789
13814
|
PopoverArrowProps,
|
13790
|
-
|
13815
|
+
PopoverBody3 as PopoverBody,
|
13791
13816
|
PopoverBodyProps,
|
13792
13817
|
PopoverCloseButton,
|
13793
|
-
|
13818
|
+
PopoverContent5 as PopoverContent,
|
13794
13819
|
PopoverContentProps,
|
13795
13820
|
PopoverFooter,
|
13796
13821
|
PopoverFooterProps,
|
13797
13822
|
PopoverHeader,
|
13798
13823
|
PopoverHeaderProps,
|
13799
13824
|
PopoverProps,
|
13800
|
-
|
13801
|
-
|
13825
|
+
PopoverTrigger5 as PopoverTrigger,
|
13826
|
+
Portal3 as Portal,
|
13802
13827
|
PortalProps,
|
13803
13828
|
Profile,
|
13804
13829
|
Progress,
|