@ctlyst.id/internal-ui 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +503 -443
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +253 -194
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -673,89 +673,94 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
673
673
|
leftHelperText,
|
674
674
|
rightHelperText,
|
675
675
|
isRequired,
|
676
|
-
children: /* @__PURE__ */ jsx20(
|
677
|
-
|
676
|
+
children: /* @__PURE__ */ jsx20(
|
677
|
+
Box9,
|
678
678
|
{
|
679
|
-
|
679
|
+
transition: "all 0.15s",
|
680
|
+
boxShadow: "none",
|
680
681
|
borderRadius: "sm",
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
682
|
+
border: "1px solid",
|
683
|
+
borderColor: outlineColor,
|
684
|
+
_focusWithin: {
|
685
|
+
borderColor: focusColor
|
686
|
+
},
|
687
|
+
children: /* @__PURE__ */ jsxs6(
|
688
|
+
InputGroup,
|
689
|
+
{
|
690
|
+
size: size2,
|
691
|
+
borderRadius: "sm",
|
692
|
+
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
693
|
+
cursor: isDisabled ? "not-allowed" : "default",
|
694
|
+
children: [
|
695
|
+
addOnLeft,
|
696
|
+
/* @__PURE__ */ jsx20(
|
697
|
+
ChakraInput,
|
698
|
+
{
|
699
|
+
ref,
|
700
|
+
type: inputType,
|
701
|
+
value,
|
702
|
+
isDisabled,
|
703
|
+
isSuccess,
|
704
|
+
...inputProps,
|
705
|
+
fontSize
|
706
|
+
}
|
707
|
+
),
|
708
|
+
(withClear || isLoading || type === "password") && /* @__PURE__ */ jsxs6(
|
709
|
+
Box9,
|
710
|
+
{
|
711
|
+
"data-test-id": "CT_Component_ClearInput",
|
712
|
+
display: "flex",
|
713
|
+
alignItems: "center",
|
714
|
+
justifyContent: "center",
|
715
|
+
width: "16px",
|
716
|
+
mr: "10px",
|
717
|
+
children: [
|
718
|
+
withClear && !isLoading && /* @__PURE__ */ jsx20(
|
719
|
+
Box9,
|
720
|
+
{
|
721
|
+
display: "flex",
|
722
|
+
justifyContent: "center",
|
723
|
+
onClick: !isDisabled ? onClear : void 0,
|
724
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
725
|
+
children: /* @__PURE__ */ jsx20(Close3, { size: 4, color: iconColor })
|
726
|
+
}
|
727
|
+
),
|
728
|
+
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */ jsx20(
|
729
|
+
Box9,
|
730
|
+
{
|
731
|
+
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
732
|
+
onClick: () => {
|
733
|
+
if (!isDisabled) setIsShowPassword(true);
|
734
|
+
},
|
735
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
736
|
+
display: "flex",
|
737
|
+
justifyContent: "center",
|
738
|
+
children: /* @__PURE__ */ jsx20(EyeOff, { size: 4, color: iconColor })
|
739
|
+
}
|
740
|
+
),
|
741
|
+
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */ jsx20(
|
742
|
+
Box9,
|
743
|
+
{
|
744
|
+
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
745
|
+
onClick: () => {
|
746
|
+
if (!isDisabled) setIsShowPassword(false);
|
747
|
+
},
|
748
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
749
|
+
display: "flex",
|
750
|
+
justifyContent: "center",
|
751
|
+
children: /* @__PURE__ */ jsx20(Eye2, { size: 4, color: iconColor })
|
752
|
+
}
|
753
|
+
),
|
754
|
+
isLoading && /* @__PURE__ */ jsx20(loader_default, { size: "sm" })
|
755
|
+
]
|
756
|
+
}
|
757
|
+
),
|
758
|
+
addOnRight
|
759
|
+
]
|
760
|
+
}
|
761
|
+
)
|
757
762
|
}
|
758
|
-
)
|
763
|
+
)
|
759
764
|
}
|
760
765
|
);
|
761
766
|
});
|
@@ -822,12 +827,6 @@ var Counter = ({
|
|
822
827
|
helperText = "",
|
823
828
|
isReadOnly = false
|
824
829
|
}) => {
|
825
|
-
const getFieldSize = () => {
|
826
|
-
if (size2 === "xl") return "lg";
|
827
|
-
if (size2 === "lg") return "md";
|
828
|
-
if (size2 === "md") return "sm";
|
829
|
-
return "xs";
|
830
|
-
};
|
831
830
|
const decrement = () => {
|
832
831
|
onChange(value - 1);
|
833
832
|
};
|
@@ -858,7 +857,7 @@ var Counter = ({
|
|
858
857
|
isError,
|
859
858
|
isDisabled: disabled || max === 0,
|
860
859
|
textAlign: "center",
|
861
|
-
size:
|
860
|
+
size: size2,
|
862
861
|
min,
|
863
862
|
max,
|
864
863
|
onChange: handleChange,
|
@@ -2400,7 +2399,7 @@ function environmentName(env) {
|
|
2400
2399
|
|
2401
2400
|
// src/components/header/components/version.tsx
|
2402
2401
|
import { Fragment as Fragment3, jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
2403
|
-
var Version = ({ hideEnv, version, environment, onOpenModalRelease }) => /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
2402
|
+
var Version = ({ hideEnv, version, environment, onOpenModalRelease, versionStyle }) => /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
2404
2403
|
version && /* @__PURE__ */ jsx33(
|
2405
2404
|
badge_default,
|
2406
2405
|
{
|
@@ -2409,6 +2408,7 @@ var Version = ({ hideEnv, version, environment, onOpenModalRelease }) => /* @__P
|
|
2409
2408
|
variant: "neutral-light",
|
2410
2409
|
onClick: onOpenModalRelease,
|
2411
2410
|
cursor: onOpenModalRelease ? "pointer" : "auto",
|
2411
|
+
...versionStyle,
|
2412
2412
|
children: version
|
2413
2413
|
}
|
2414
2414
|
),
|
@@ -2430,7 +2430,8 @@ Version.defaultProps = {
|
|
2430
2430
|
hideEnv: false,
|
2431
2431
|
environment: void 0,
|
2432
2432
|
version: void 0,
|
2433
|
-
onOpenModalRelease: void 0
|
2433
|
+
onOpenModalRelease: void 0,
|
2434
|
+
versionStyle: void 0
|
2434
2435
|
};
|
2435
2436
|
var version_default = Version;
|
2436
2437
|
|
@@ -2451,6 +2452,7 @@ var Header = ({
|
|
2451
2452
|
children,
|
2452
2453
|
profile,
|
2453
2454
|
bg = "white",
|
2455
|
+
versionStyle,
|
2454
2456
|
...props
|
2455
2457
|
}) => /* @__PURE__ */ jsx34(Flex4, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ jsxs16(Flex4, { h: "auto", w: "full", alignItems: "center", justifyContent: profile ? "flex-end" : "space-between", pos: "relative", children: [
|
2456
2458
|
mainLogo && /* @__PURE__ */ jsxs16(Flex4, { alignItems: "center", children: [
|
@@ -2465,7 +2467,8 @@ var Header = ({
|
|
2465
2467
|
hideEnv,
|
2466
2468
|
version: data == null ? void 0 : data.version,
|
2467
2469
|
environment: data == null ? void 0 : data.environment,
|
2468
|
-
onOpenModalRelease
|
2470
|
+
onOpenModalRelease,
|
2471
|
+
versionStyle
|
2469
2472
|
}
|
2470
2473
|
)
|
2471
2474
|
] }),
|
@@ -2486,7 +2489,8 @@ Header.defaultProps = {
|
|
2486
2489
|
centerLogoSize: void 0,
|
2487
2490
|
hideEnv: false,
|
2488
2491
|
urlLogo: void 0,
|
2489
|
-
profile: void 0
|
2492
|
+
profile: void 0,
|
2493
|
+
versionStyle: void 0
|
2490
2494
|
};
|
2491
2495
|
var header_default = Header;
|
2492
2496
|
|
@@ -2655,12 +2659,56 @@ import {
|
|
2655
2659
|
useModalStyles
|
2656
2660
|
} from "@chakra-ui/react";
|
2657
2661
|
|
2662
|
+
// src/components/nav-item/components/nav-item.tsx
|
2663
|
+
import { Link as Link2 } from "@chakra-ui/react";
|
2664
|
+
import { cx as cx9 } from "@chakra-ui/shared-utils";
|
2665
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
2666
|
+
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
2667
|
+
return /* @__PURE__ */ jsx40(
|
2668
|
+
Link2,
|
2669
|
+
{
|
2670
|
+
"data-test-id": "7quRuVrffI7_tnCF4jUSV",
|
2671
|
+
opacity: isDisabled ? "0.3" : "initial",
|
2672
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
2673
|
+
h: "7.5",
|
2674
|
+
display: "flex",
|
2675
|
+
justifyContent: "space-between",
|
2676
|
+
alignItems: "center",
|
2677
|
+
w: "full",
|
2678
|
+
p: "2",
|
2679
|
+
pl: isChild ? "7" : "2",
|
2680
|
+
color: isActive ? "primary.500" : "black.high",
|
2681
|
+
bg: isActive ? "primary.100" : "white",
|
2682
|
+
className: cx9("catalyst-nav-item", props.className),
|
2683
|
+
textStyle: "text.xs",
|
2684
|
+
fontWeight: isActive ? "semibold" : "regular",
|
2685
|
+
rounded: "sm",
|
2686
|
+
_active: isDisabled ? {} : {
|
2687
|
+
bg: "primary.100"
|
2688
|
+
},
|
2689
|
+
_hover: isDisabled ? {} : {
|
2690
|
+
textDecoration: "none",
|
2691
|
+
bg: isActive ? "primary.100" : "primary.50"
|
2692
|
+
},
|
2693
|
+
...props,
|
2694
|
+
onClick: isDisabled ? void 0 : props.onClick,
|
2695
|
+
children
|
2696
|
+
}
|
2697
|
+
);
|
2698
|
+
};
|
2699
|
+
NavItem.displayName = "NavItem";
|
2700
|
+
NavItem.defaultProps = {
|
2701
|
+
isActive: false,
|
2702
|
+
isChild: false,
|
2703
|
+
isDisabled: false
|
2704
|
+
};
|
2705
|
+
|
2658
2706
|
// src/components/navigation/components/navigation.tsx
|
2659
2707
|
import {
|
2660
2708
|
Box as Box21,
|
2661
2709
|
Button as Button2,
|
2662
2710
|
Flex as Flex6,
|
2663
|
-
Link as
|
2711
|
+
Link as Link3,
|
2664
2712
|
Popover as Popover2,
|
2665
2713
|
PopoverContent as PopoverContent2,
|
2666
2714
|
PopoverTrigger as PopoverTrigger2,
|
@@ -2673,26 +2721,26 @@ import { css as css3 } from "@emotion/react";
|
|
2673
2721
|
|
2674
2722
|
// src/components/navigation/components/mapping-icon.tsx
|
2675
2723
|
import * as Icon2 from "@ctlyst.id/internal-icon";
|
2676
|
-
import { jsx as
|
2724
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
2677
2725
|
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__ */
|
2726
|
+
["Order", /* @__PURE__ */ jsx41(Icon2.ShoppingBag, { size: 4, color: "inherit" }, "order")],
|
2727
|
+
["Fulfillment", /* @__PURE__ */ jsx41(Icon2.ShoppingCart, { size: 4, color: "inherit" }, "fullfilment")],
|
2728
|
+
["Transfer Stock", /* @__PURE__ */ jsx41(Icon2.Repeat, { size: 4, color: "inherit" }, "transfer-stock")],
|
2729
|
+
["Stock", /* @__PURE__ */ jsx41(Icon2.Box, { size: 4, color: "inherit" }, "stock")],
|
2730
|
+
["Product Database", /* @__PURE__ */ jsx41(Icon2.Layers, { size: 4, color: "inherit" }, "product-database")],
|
2731
|
+
["Purchasing", /* @__PURE__ */ jsx41(Icon2.DollarSign, { size: 4, color: "inherit" }, "purchasing")],
|
2732
|
+
["Reseller", /* @__PURE__ */ jsx41(Icon2.Users, { size: 4, color: "inherit" }, "reseller")],
|
2733
|
+
["Retur", /* @__PURE__ */ jsx41(Icon2.RotateCcw, { size: 4, color: "inherit" }, "retur")],
|
2734
|
+
["Other", /* @__PURE__ */ jsx41(Icon2.Settings, { size: 4, color: "inherit" }, "other")],
|
2735
|
+
["Content", /* @__PURE__ */ jsx41(Icon2.Layout, { size: 4, color: "inherit" }, "content")],
|
2736
|
+
["Customer", /* @__PURE__ */ jsx41(Icon2.HelpCircle, { size: 4, color: "inherit" }, "content")],
|
2737
|
+
["Voucher", /* @__PURE__ */ jsx41(Icon2.Gift, { size: 4, color: "inherit" }, "content")]
|
2690
2738
|
]);
|
2691
2739
|
|
2692
2740
|
// src/components/navigation/components/navigation.tsx
|
2693
|
-
import { Fragment as Fragment4, jsx as
|
2741
|
+
import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
2694
2742
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
2695
|
-
return /* @__PURE__ */
|
2743
|
+
return /* @__PURE__ */ jsx42(Box21, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ jsx42(
|
2696
2744
|
Flex6,
|
2697
2745
|
{
|
2698
2746
|
bg: "white",
|
@@ -2707,8 +2755,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2707
2755
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
2708
2756
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
2709
2757
|
const activeBg = isActive ? "primary.500" : void 0;
|
2710
|
-
return /* @__PURE__ */
|
2711
|
-
/* @__PURE__ */
|
2758
|
+
return /* @__PURE__ */ jsx42(Popover2, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
2759
|
+
/* @__PURE__ */ jsx42(PopoverTrigger2, { children: /* @__PURE__ */ jsx42(
|
2712
2760
|
Button2,
|
2713
2761
|
{
|
2714
2762
|
h: 7.5,
|
@@ -2722,11 +2770,11 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2722
2770
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
2723
2771
|
color: isActive ? "primary.50" : "black.high",
|
2724
2772
|
leftIcon: mappingIcon.get(navigation.title),
|
2725
|
-
rightIcon: /* @__PURE__ */
|
2773
|
+
rightIcon: /* @__PURE__ */ jsx42(Icon3.ChevronDown, { size: 4, color: "inherit" }),
|
2726
2774
|
children: navigation.title
|
2727
2775
|
}
|
2728
2776
|
) }),
|
2729
|
-
navigation.children && /* @__PURE__ */
|
2777
|
+
navigation.children && /* @__PURE__ */ jsx42(Portal, { children: /* @__PURE__ */ jsx42(Box21, { zIndex: "popover", children: /* @__PURE__ */ jsx42(
|
2730
2778
|
PopoverContent2,
|
2731
2779
|
{
|
2732
2780
|
bg: useColorModeValue8("white", "ebony-clay.800"),
|
@@ -2738,8 +2786,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2738
2786
|
const link = navHost ? `${navHost}${navLink}` : navLink;
|
2739
2787
|
const isLocalLink = host === navHost;
|
2740
2788
|
const isActiveSub = activePath === navLink;
|
2741
|
-
return /* @__PURE__ */
|
2742
|
-
|
2789
|
+
return /* @__PURE__ */ jsx42(
|
2790
|
+
Link3,
|
2743
2791
|
{
|
2744
2792
|
as: isLocalLink ? as : void 0,
|
2745
2793
|
href: link,
|
@@ -2770,8 +2818,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2770
2818
|
py: 4,
|
2771
2819
|
children: [
|
2772
2820
|
mappingIcon.get(navigation.title),
|
2773
|
-
/* @__PURE__ */
|
2774
|
-
isActiveSub && /* @__PURE__ */
|
2821
|
+
/* @__PURE__ */ jsx42(Text8, { fontSize: "text.sm", ml: 3, children: title }),
|
2822
|
+
isActiveSub && /* @__PURE__ */ jsx42(
|
2775
2823
|
Box21,
|
2776
2824
|
{
|
2777
2825
|
width: 0.5,
|
@@ -2805,9 +2853,9 @@ Navigation.defaultProps = {
|
|
2805
2853
|
var navigation_default = Navigation;
|
2806
2854
|
|
2807
2855
|
// src/components/navigation/components/navigation-bar.tsx
|
2808
|
-
import { Box as Box22, Button as Button3, Flex as Flex7, Link as
|
2856
|
+
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
2857
|
import * as Icon4 from "@ctlyst.id/internal-icon";
|
2810
|
-
import { Fragment as Fragment5, jsx as
|
2858
|
+
import { Fragment as Fragment5, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
2811
2859
|
var NavigationBar = ({
|
2812
2860
|
navigations,
|
2813
2861
|
isFetched,
|
@@ -2822,7 +2870,7 @@ var NavigationBar = ({
|
|
2822
2870
|
}
|
2823
2871
|
return subMenu.navHost + subMenu.navLink;
|
2824
2872
|
};
|
2825
|
-
return /* @__PURE__ */
|
2873
|
+
return /* @__PURE__ */ jsx43(Box22, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ jsx43(
|
2826
2874
|
Flex7,
|
2827
2875
|
{
|
2828
2876
|
bg: "white",
|
@@ -2839,8 +2887,8 @@ var NavigationBar = ({
|
|
2839
2887
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
2840
2888
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
2841
2889
|
const activeBg = isActive ? "primary.500" : void 0;
|
2842
|
-
return /* @__PURE__ */
|
2843
|
-
/* @__PURE__ */
|
2890
|
+
return /* @__PURE__ */ jsx43(Popover3, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
2891
|
+
/* @__PURE__ */ jsx43(PopoverTrigger3, { children: /* @__PURE__ */ jsx43(
|
2844
2892
|
Button3,
|
2845
2893
|
{
|
2846
2894
|
h: 7.5,
|
@@ -2854,12 +2902,12 @@ var NavigationBar = ({
|
|
2854
2902
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
2855
2903
|
color: isActive ? "primary.50" : "black.high",
|
2856
2904
|
leftIcon: mappingIcon2.get(item.title),
|
2857
|
-
rightIcon: /* @__PURE__ */
|
2905
|
+
rightIcon: /* @__PURE__ */ jsx43(Icon4.ChevronDown, { size: 4, color: "inherit" }),
|
2858
2906
|
children: item.title
|
2859
2907
|
}
|
2860
2908
|
) }),
|
2861
|
-
item.children && /* @__PURE__ */
|
2862
|
-
|
2909
|
+
item.children && /* @__PURE__ */ jsx43(PopoverContent3, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ jsxs18(
|
2910
|
+
Link4,
|
2863
2911
|
{
|
2864
2912
|
href: urlMenu(subMenu),
|
2865
2913
|
display: "flex",
|
@@ -2876,7 +2924,7 @@ var NavigationBar = ({
|
|
2876
2924
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
2877
2925
|
children: [
|
2878
2926
|
mappingIcon2.get(item.title),
|
2879
|
-
/* @__PURE__ */
|
2927
|
+
/* @__PURE__ */ jsx43(Text9, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
2880
2928
|
]
|
2881
2929
|
},
|
2882
2930
|
subMenu.id
|
@@ -2897,13 +2945,13 @@ import { Box as Box23, Text as Text10, useColorModeValue as useColorModeValue10
|
|
2897
2945
|
|
2898
2946
|
// src/components/pagination/components/pagination-button.tsx
|
2899
2947
|
import { Button as Button4, forwardRef as forwardRef12, useColorModeValue as useColorModeValue9 } from "@chakra-ui/react";
|
2900
|
-
import { jsx as
|
2948
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
2901
2949
|
var PaginationButton = forwardRef12(({ className, style, isActive, children, ...rest }, ref) => {
|
2902
2950
|
const btnBg = useColorModeValue9("neutral.300", "mirage.900");
|
2903
2951
|
const btnColor = useColorModeValue9("black.high", "primary.300");
|
2904
2952
|
const btnNotActiveBg = useColorModeValue9("secondary.50", "primary.500");
|
2905
2953
|
const btnNotActiveColor = useColorModeValue9("primary.500", "white");
|
2906
|
-
return /* @__PURE__ */
|
2954
|
+
return /* @__PURE__ */ jsx44(
|
2907
2955
|
Button4,
|
2908
2956
|
{
|
2909
2957
|
"data-test-id": "Pagination-Button",
|
@@ -2942,7 +2990,7 @@ var pagination_button_default = PaginationButton;
|
|
2942
2990
|
|
2943
2991
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
2944
2992
|
import { VisuallyHidden } from "@chakra-ui/react";
|
2945
|
-
import { jsx as
|
2993
|
+
import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
|
2946
2994
|
var PaginationButtonTrigger = ({
|
2947
2995
|
color,
|
2948
2996
|
isDisabled,
|
@@ -2950,7 +2998,7 @@ var PaginationButtonTrigger = ({
|
|
2950
2998
|
visuallyHidden,
|
2951
2999
|
icon
|
2952
3000
|
}) => /* @__PURE__ */ jsxs19(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
2953
|
-
/* @__PURE__ */
|
3001
|
+
/* @__PURE__ */ jsx45(VisuallyHidden, { children: visuallyHidden }),
|
2954
3002
|
icon
|
2955
3003
|
] });
|
2956
3004
|
PaginationButtonTrigger.defaultProps = {
|
@@ -2963,7 +3011,7 @@ PaginationButtonTrigger.defaultProps = {
|
|
2963
3011
|
var pagination_button_trigger_default = PaginationButtonTrigger;
|
2964
3012
|
|
2965
3013
|
// src/components/pagination/components/pagination.tsx
|
2966
|
-
import { jsx as
|
3014
|
+
import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
2967
3015
|
var Pagination = ({ className, current, total, onSelect }) => {
|
2968
3016
|
const btnColorDisabled = useColorModeValue10("secondary.100", "primary.500");
|
2969
3017
|
const btnColor = useColorModeValue10("primary.500", "secondary.100");
|
@@ -2994,7 +3042,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
2994
3042
|
return pageButtons;
|
2995
3043
|
};
|
2996
3044
|
return /* @__PURE__ */ jsxs20(Box23, { className, display: "inline-flex", alignItems: "center", children: [
|
2997
|
-
/* @__PURE__ */
|
3045
|
+
/* @__PURE__ */ jsx46(Box23, { mr: 1, children: /* @__PURE__ */ jsx46(
|
2998
3046
|
pagination_button_trigger_default,
|
2999
3047
|
{
|
3000
3048
|
"data-test-id": "Pagination-Button",
|
@@ -3002,11 +3050,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3002
3050
|
isDisabled: disabledPrevious,
|
3003
3051
|
onClick: () => handleSelectPage(1),
|
3004
3052
|
visuallyHidden: "First Page",
|
3005
|
-
icon: /* @__PURE__ */
|
3053
|
+
icon: /* @__PURE__ */ jsx46(ArrowLeftIcon, { width: 2 })
|
3006
3054
|
}
|
3007
3055
|
) }),
|
3008
3056
|
/* @__PURE__ */ jsxs20(Box23, { bg: "neutral.300", borderRadius: "full", children: [
|
3009
|
-
/* @__PURE__ */
|
3057
|
+
/* @__PURE__ */ jsx46(
|
3010
3058
|
pagination_button_trigger_default,
|
3011
3059
|
{
|
3012
3060
|
"data-test-id": "Pagination-Button",
|
@@ -3014,22 +3062,22 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3014
3062
|
isDisabled: disabledPrevious,
|
3015
3063
|
onClick: () => handleSelectPage(current - 1),
|
3016
3064
|
visuallyHidden: "Previous Page",
|
3017
|
-
icon: /* @__PURE__ */
|
3065
|
+
icon: /* @__PURE__ */ jsx46(ChevronLeftIcon2, {})
|
3018
3066
|
}
|
3019
3067
|
),
|
3020
3068
|
generatePages().map((page) => {
|
3021
|
-
return /* @__PURE__ */
|
3069
|
+
return /* @__PURE__ */ jsx46(
|
3022
3070
|
pagination_button_default,
|
3023
3071
|
{
|
3024
3072
|
"data-test-id": "Pagination-Button",
|
3025
3073
|
isActive: page === current,
|
3026
3074
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
3027
|
-
children: /* @__PURE__ */
|
3075
|
+
children: /* @__PURE__ */ jsx46(Text10, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
3028
3076
|
},
|
3029
3077
|
page
|
3030
3078
|
);
|
3031
3079
|
}),
|
3032
|
-
/* @__PURE__ */
|
3080
|
+
/* @__PURE__ */ jsx46(
|
3033
3081
|
pagination_button_trigger_default,
|
3034
3082
|
{
|
3035
3083
|
"data-test-id": "Pagination-Button",
|
@@ -3037,11 +3085,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3037
3085
|
isDisabled: disabledNext,
|
3038
3086
|
onClick: () => handleSelectPage(current + 1),
|
3039
3087
|
visuallyHidden: "Next Page",
|
3040
|
-
icon: /* @__PURE__ */
|
3088
|
+
icon: /* @__PURE__ */ jsx46(ChevronRightIcon, {})
|
3041
3089
|
}
|
3042
3090
|
)
|
3043
3091
|
] }),
|
3044
|
-
/* @__PURE__ */
|
3092
|
+
/* @__PURE__ */ jsx46(Box23, { ml: 1, children: /* @__PURE__ */ jsx46(
|
3045
3093
|
pagination_button_trigger_default,
|
3046
3094
|
{
|
3047
3095
|
"data-test-id": "Pagination-Button",
|
@@ -3049,7 +3097,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3049
3097
|
isDisabled: disabledNext,
|
3050
3098
|
onClick: () => handleSelectPage(total),
|
3051
3099
|
visuallyHidden: "Last Page",
|
3052
|
-
icon: /* @__PURE__ */
|
3100
|
+
icon: /* @__PURE__ */ jsx46(ArrowRightIcon, { width: 2 })
|
3053
3101
|
}
|
3054
3102
|
) })
|
3055
3103
|
] });
|
@@ -3063,7 +3111,7 @@ var pagination_default = Pagination;
|
|
3063
3111
|
|
3064
3112
|
// src/components/pagination/components/pagination-detail.tsx
|
3065
3113
|
import { Text as Text11 } from "@chakra-ui/react";
|
3066
|
-
import { jsx as
|
3114
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
3067
3115
|
var PaginationDetail = ({
|
3068
3116
|
page,
|
3069
3117
|
limit,
|
@@ -3073,7 +3121,7 @@ var PaginationDetail = ({
|
|
3073
3121
|
lineHeight = 18,
|
3074
3122
|
...rest
|
3075
3123
|
}) => {
|
3076
|
-
return /* @__PURE__ */
|
3124
|
+
return /* @__PURE__ */ jsx47(Text11, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
3077
3125
|
};
|
3078
3126
|
var pagination_detail_default = PaginationDetail;
|
3079
3127
|
|
@@ -3081,7 +3129,7 @@ var pagination_detail_default = PaginationDetail;
|
|
3081
3129
|
import { Box as Box24, Select, Text as Text12, useColorModeValue as useColorModeValue11 } from "@chakra-ui/react";
|
3082
3130
|
import * as React13 from "react";
|
3083
3131
|
import { FiChevronDown } from "react-icons/fi";
|
3084
|
-
import { jsx as
|
3132
|
+
import { jsx as jsx48, jsxs as jsxs21 } from "react/jsx-runtime";
|
3085
3133
|
var PaginationFilter = ({
|
3086
3134
|
limit,
|
3087
3135
|
label = "Baris per halaman:",
|
@@ -3091,8 +3139,8 @@ var PaginationFilter = ({
|
|
3091
3139
|
}) => {
|
3092
3140
|
const [value, setValue] = React13.useState(limit);
|
3093
3141
|
return /* @__PURE__ */ jsxs21(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
3094
|
-
/* @__PURE__ */
|
3095
|
-
/* @__PURE__ */
|
3142
|
+
/* @__PURE__ */ jsx48(Text12, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue11("neutral.900", "white"), ...rest, children: label }),
|
3143
|
+
/* @__PURE__ */ jsx48(
|
3096
3144
|
Select,
|
3097
3145
|
{
|
3098
3146
|
textAlign: "center",
|
@@ -3101,7 +3149,7 @@ var PaginationFilter = ({
|
|
3101
3149
|
border: "none",
|
3102
3150
|
boxShadow: "none",
|
3103
3151
|
width: 18,
|
3104
|
-
icon: /* @__PURE__ */
|
3152
|
+
icon: /* @__PURE__ */ jsx48(FiChevronDown, {}),
|
3105
3153
|
_focusVisible: { boxShadow: "none" },
|
3106
3154
|
onChange: (e) => {
|
3107
3155
|
const numberValue = Number(e.target.value);
|
@@ -3110,7 +3158,7 @@ var PaginationFilter = ({
|
|
3110
3158
|
},
|
3111
3159
|
value,
|
3112
3160
|
children: items.map((item) => {
|
3113
|
-
return /* @__PURE__ */
|
3161
|
+
return /* @__PURE__ */ jsx48("option", { value: item, children: item }, item);
|
3114
3162
|
})
|
3115
3163
|
}
|
3116
3164
|
)
|
@@ -3145,7 +3193,7 @@ import {
|
|
3145
3193
|
|
3146
3194
|
// src/components/radio/components/radio.tsx
|
3147
3195
|
import { Box as Box25, Radio as ChakraRadio, Text as Text13 } from "@chakra-ui/react";
|
3148
|
-
import { jsx as
|
3196
|
+
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
3149
3197
|
var Radio = ({
|
3150
3198
|
isError = false,
|
3151
3199
|
helpText = "",
|
@@ -3156,8 +3204,8 @@ var Radio = ({
|
|
3156
3204
|
}) => {
|
3157
3205
|
const variant = isError ? "errors" : "unstyled";
|
3158
3206
|
return /* @__PURE__ */ jsxs22(Box25, { children: [
|
3159
|
-
/* @__PURE__ */
|
3160
|
-
/* @__PURE__ */
|
3207
|
+
/* @__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 }) }) }),
|
3208
|
+
/* @__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
3209
|
] });
|
3162
3210
|
};
|
3163
3211
|
Radio.displayName = "Radio";
|
@@ -3169,7 +3217,7 @@ Radio.defaultProps = {
|
|
3169
3217
|
|
3170
3218
|
// src/components/radio/components/radio-group.tsx
|
3171
3219
|
import { Box as Box26, RadioGroup as ChakraRadioGroup, Stack as Stack3 } from "@chakra-ui/react";
|
3172
|
-
import { jsx as
|
3220
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
3173
3221
|
var RadioGroup = ({
|
3174
3222
|
children,
|
3175
3223
|
label,
|
@@ -3178,7 +3226,7 @@ var RadioGroup = ({
|
|
3178
3226
|
errorMessage,
|
3179
3227
|
...props
|
3180
3228
|
}) => {
|
3181
|
-
return /* @__PURE__ */
|
3229
|
+
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
3230
|
};
|
3183
3231
|
RadioGroup.displayName = "RadioGroup";
|
3184
3232
|
RadioGroup.defaultProps = {
|
@@ -3201,9 +3249,9 @@ import {
|
|
3201
3249
|
// src/components/rating/components/rating.tsx
|
3202
3250
|
import { Grid as Grid2 } from "@chakra-ui/react";
|
3203
3251
|
import { Rating as RatingIcon } from "@ctlyst.id/internal-icon";
|
3204
|
-
import { jsx as
|
3252
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
3205
3253
|
var Rating = ({ value }) => {
|
3206
|
-
return /* @__PURE__ */
|
3254
|
+
return /* @__PURE__ */ jsx51(Grid2, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx51(RatingIcon, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
3207
3255
|
};
|
3208
3256
|
var rating_default = Rating;
|
3209
3257
|
|
@@ -3559,14 +3607,14 @@ var themeSelect = (theme6) => {
|
|
3559
3607
|
};
|
3560
3608
|
|
3561
3609
|
// src/components/select/components/select.tsx
|
3562
|
-
import { jsx as
|
3610
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
3563
3611
|
function Select2({
|
3564
3612
|
styles,
|
3565
3613
|
isError = false,
|
3566
3614
|
...rest
|
3567
3615
|
}) {
|
3568
3616
|
const { colorMode } = useColorMode3();
|
3569
|
-
return /* @__PURE__ */
|
3617
|
+
return /* @__PURE__ */ jsx52(
|
3570
3618
|
ReactSelect,
|
3571
3619
|
{
|
3572
3620
|
classNamePrefix: "react-select",
|
@@ -3581,14 +3629,14 @@ var select_default = Select2;
|
|
3581
3629
|
// src/components/select/components/select-async.tsx
|
3582
3630
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
3583
3631
|
import { AsyncPaginate } from "react-select-async-paginate";
|
3584
|
-
import { jsx as
|
3632
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
3585
3633
|
function SelectAsync({
|
3586
3634
|
styles,
|
3587
3635
|
isError = false,
|
3588
3636
|
...rest
|
3589
3637
|
}) {
|
3590
3638
|
const { colorMode } = useColorMode4();
|
3591
|
-
return /* @__PURE__ */
|
3639
|
+
return /* @__PURE__ */ jsx53(
|
3592
3640
|
AsyncPaginate,
|
3593
3641
|
{
|
3594
3642
|
classNamePrefix: "react-select",
|
@@ -3603,10 +3651,10 @@ var select_async_default = SelectAsync;
|
|
3603
3651
|
// src/components/select/components/select-async-creatable.tsx
|
3604
3652
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
3605
3653
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
3606
|
-
import { jsx as
|
3654
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
3607
3655
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3608
3656
|
const { colorMode } = useColorMode5();
|
3609
|
-
return /* @__PURE__ */
|
3657
|
+
return /* @__PURE__ */ jsx54(
|
3610
3658
|
ReactSelectAsyncCreatable,
|
3611
3659
|
{
|
3612
3660
|
classNamePrefix: "react-select",
|
@@ -3620,10 +3668,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3620
3668
|
// src/components/select/components/select-creatable.tsx
|
3621
3669
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
3622
3670
|
import ReactSelectCreatable from "react-select/creatable";
|
3623
|
-
import { jsx as
|
3671
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
3624
3672
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3625
3673
|
const { colorMode } = useColorMode6();
|
3626
|
-
return /* @__PURE__ */
|
3674
|
+
return /* @__PURE__ */ jsx55(
|
3627
3675
|
ReactSelectCreatable,
|
3628
3676
|
{
|
3629
3677
|
classNamePrefix: "react-select",
|
@@ -3638,7 +3686,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3638
3686
|
import { Checkbox as Checkbox3, Flex as Flex8, Text as Text14 } from "@chakra-ui/react";
|
3639
3687
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3640
3688
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3641
|
-
import { Fragment as Fragment6, jsx as
|
3689
|
+
import { Fragment as Fragment6, jsx as jsx56, jsxs as jsxs23 } from "react/jsx-runtime";
|
3642
3690
|
var CHECKBOX_STATE = {
|
3643
3691
|
UNCHECKED: 0,
|
3644
3692
|
INDETERMINATE: 1,
|
@@ -3686,7 +3734,7 @@ var InputOption = ({
|
|
3686
3734
|
style
|
3687
3735
|
};
|
3688
3736
|
return /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
3689
|
-
/* @__PURE__ */
|
3737
|
+
/* @__PURE__ */ jsx56(
|
3690
3738
|
ComponentRS.Option,
|
3691
3739
|
{
|
3692
3740
|
isMulti: true,
|
@@ -3707,7 +3755,7 @@ var InputOption = ({
|
|
3707
3755
|
"data-test-id": "CT_component_select-checkbox_options",
|
3708
3756
|
cursor: isDisabled ? "not-allowed" : "default",
|
3709
3757
|
children: [
|
3710
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
3758
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56(
|
3711
3759
|
Checkbox3,
|
3712
3760
|
{
|
3713
3761
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -3715,14 +3763,14 @@ var InputOption = ({
|
|
3715
3763
|
isDisabled,
|
3716
3764
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
3717
3765
|
}
|
3718
|
-
) : /* @__PURE__ */
|
3719
|
-
/* @__PURE__ */
|
3766
|
+
) : /* @__PURE__ */ jsx56(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
|
3767
|
+
/* @__PURE__ */ jsx56(Text14, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
3720
3768
|
]
|
3721
3769
|
}
|
3722
3770
|
)
|
3723
3771
|
}
|
3724
3772
|
),
|
3725
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
3773
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56("hr", {}) : null
|
3726
3774
|
] });
|
3727
3775
|
};
|
3728
3776
|
var SelectWithCheckboxBase = ({
|
@@ -3732,7 +3780,7 @@ var SelectWithCheckboxBase = ({
|
|
3732
3780
|
...rest
|
3733
3781
|
}) => {
|
3734
3782
|
const { colorMode } = useColorMode7();
|
3735
|
-
return /* @__PURE__ */
|
3783
|
+
return /* @__PURE__ */ jsx56(
|
3736
3784
|
ReactSelect2,
|
3737
3785
|
{
|
3738
3786
|
classNamePrefix: "react-select",
|
@@ -3751,7 +3799,7 @@ var SelectWithCheckboxBase = ({
|
|
3751
3799
|
var SelectCheckbox = (props) => {
|
3752
3800
|
const { isMulti, options, value, ...rest } = props;
|
3753
3801
|
const selectValue = value || [];
|
3754
|
-
return /* @__PURE__ */
|
3802
|
+
return /* @__PURE__ */ jsx56(
|
3755
3803
|
SelectWithCheckboxBase,
|
3756
3804
|
{
|
3757
3805
|
isMulti,
|
@@ -3762,7 +3810,7 @@ var SelectCheckbox = (props) => {
|
|
3762
3810
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
3763
3811
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
3764
3812
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
3765
|
-
return /* @__PURE__ */
|
3813
|
+
return /* @__PURE__ */ jsx56(InputOption, { ...optionProps, checkedState });
|
3766
3814
|
}
|
3767
3815
|
},
|
3768
3816
|
...rest
|
@@ -3773,10 +3821,10 @@ var select_with_checkbox_default = SelectCheckbox;
|
|
3773
3821
|
|
3774
3822
|
// src/components/switch/components/switch.tsx
|
3775
3823
|
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
|
3824
|
+
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
3777
3825
|
import { Check, Close as Close4 } from "@ctlyst.id/internal-icon";
|
3778
3826
|
import { useMemo as useMemo4 } from "react";
|
3779
|
-
import { jsx as
|
3827
|
+
import { jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
|
3780
3828
|
var Switch = forwardRef13(function Switch2(props, ref) {
|
3781
3829
|
const styles = useMultiStyleConfig2("Switch", props);
|
3782
3830
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
@@ -3825,16 +3873,16 @@ var Switch = forwardRef13(function Switch2(props, ref) {
|
|
3825
3873
|
...getRootProps(),
|
3826
3874
|
display: "flex",
|
3827
3875
|
alignItems: "center",
|
3828
|
-
className:
|
3876
|
+
className: cx10("chakra-switch", props.className),
|
3829
3877
|
__css: containerStyles,
|
3830
3878
|
children: [
|
3831
|
-
/* @__PURE__ */
|
3879
|
+
/* @__PURE__ */ jsx57("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
3832
3880
|
/* @__PURE__ */ jsxs24(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
3833
3881
|
/* @__PURE__ */ jsxs24(Flex9, { gap: 2, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
3834
|
-
/* @__PURE__ */
|
3835
|
-
/* @__PURE__ */
|
3882
|
+
/* @__PURE__ */ jsx57(Check, { color: "white", size: getIconSize(props.size) }),
|
3883
|
+
/* @__PURE__ */ jsx57(Close4, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
3836
3884
|
] }),
|
3837
|
-
/* @__PURE__ */
|
3885
|
+
/* @__PURE__ */ jsx57(
|
3838
3886
|
chakra6.span,
|
3839
3887
|
{
|
3840
3888
|
__css: styles.thumb,
|
@@ -3844,7 +3892,7 @@ var Switch = forwardRef13(function Switch2(props, ref) {
|
|
3844
3892
|
}
|
3845
3893
|
)
|
3846
3894
|
] }),
|
3847
|
-
children && /* @__PURE__ */
|
3895
|
+
children && /* @__PURE__ */ jsx57(
|
3848
3896
|
chakra6.span,
|
3849
3897
|
{
|
3850
3898
|
className: "chakra-switch__label",
|
@@ -3881,13 +3929,13 @@ import {
|
|
3881
3929
|
|
3882
3930
|
// src/components/tabs/components/tab.tsx
|
3883
3931
|
import { Button as Button5, Flex as Flex10, forwardRef as forwardRef14, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
3884
|
-
import { jsx as
|
3932
|
+
import { jsx as jsx58, jsxs as jsxs25 } from "react/jsx-runtime";
|
3885
3933
|
var Tab = forwardRef14((props, ref) => {
|
3886
3934
|
var _a, _b;
|
3887
3935
|
const tabProps = useTab({ ...props, ref });
|
3888
3936
|
const isSelected = !!tabProps["aria-selected"];
|
3889
3937
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
3890
|
-
return /* @__PURE__ */
|
3938
|
+
return /* @__PURE__ */ jsx58(
|
3891
3939
|
Button5,
|
3892
3940
|
{
|
3893
3941
|
"data-test-id": props["data-test-id"],
|
@@ -3959,7 +4007,7 @@ import {
|
|
3959
4007
|
} from "@chakra-ui/react";
|
3960
4008
|
|
3961
4009
|
// src/components/text/index.ts
|
3962
|
-
import { Code, CodeProps, Heading, HeadingProps, Link as
|
4010
|
+
import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text15, TextProps } from "@chakra-ui/react";
|
3963
4011
|
|
3964
4012
|
// src/components/tooltip/index.ts
|
3965
4013
|
import { Tooltip, TooltipProps } from "@chakra-ui/react";
|
@@ -3979,7 +4027,7 @@ var messages = {
|
|
3979
4027
|
};
|
3980
4028
|
|
3981
4029
|
// src/components/uploader/components/uploader.tsx
|
3982
|
-
import { jsx as
|
4030
|
+
import { jsx as jsx59, jsxs as jsxs26 } from "react/jsx-runtime";
|
3983
4031
|
var Uploader = ({
|
3984
4032
|
onHandleUploadFile,
|
3985
4033
|
onHandleRejections,
|
@@ -4040,11 +4088,11 @@ var Uploader = ({
|
|
4040
4088
|
...props,
|
4041
4089
|
...getRootProps(),
|
4042
4090
|
children: [
|
4043
|
-
/* @__PURE__ */
|
4044
|
-
isDragActive ? /* @__PURE__ */
|
4045
|
-
!multiple && isSelected && /* @__PURE__ */
|
4046
|
-
!isSelected && /* @__PURE__ */
|
4047
|
-
isSelected ? /* @__PURE__ */
|
4091
|
+
/* @__PURE__ */ jsx59("input", { ...getInputProps() }),
|
4092
|
+
isDragActive ? /* @__PURE__ */ jsx59(Text16, { children: messages.dragActive }) : /* @__PURE__ */ jsxs26(Flex11, { flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : "primary.500", children: [
|
4093
|
+
!multiple && isSelected && /* @__PURE__ */ jsx59(Heading2, { fontWeight: 400, fontSize: "18px", lineHeight: 28, color: "black.high", mb: 2, children: selectedFirstFile == null ? void 0 : selectedFirstFile.name }),
|
4094
|
+
!isSelected && /* @__PURE__ */ jsx59(Heading2, { fontWeight: 400, fontSize: "18px", lineHeight: 28, mb: 2, children: messages.uploadFile }),
|
4095
|
+
isSelected ? /* @__PURE__ */ jsx59(Text16, { children: messages.dragReplace }) : /* @__PURE__ */ jsx59(Text16, { children: messages.dragInActive })
|
4048
4096
|
] })
|
4049
4097
|
]
|
4050
4098
|
}
|
@@ -4836,7 +4884,7 @@ var baseStyle5 = definePartsStyle4({
|
|
4836
4884
|
minWidth: 0,
|
4837
4885
|
outline: 0,
|
4838
4886
|
px: 2,
|
4839
|
-
py: 2
|
4887
|
+
py: 2,
|
4840
4888
|
paddingInlineStart: 2,
|
4841
4889
|
paddingInlineEnd: 2,
|
4842
4890
|
position: "relative",
|
@@ -4857,19 +4905,25 @@ var baseStyle5 = definePartsStyle4({
|
|
4857
4905
|
});
|
4858
4906
|
var size = {
|
4859
4907
|
lg: defineStyle3({
|
4860
|
-
|
4908
|
+
textStyle: "text.lg",
|
4861
4909
|
h: 12,
|
4862
4910
|
borderRadius: "sm"
|
4863
4911
|
}),
|
4864
4912
|
md: defineStyle3({
|
4865
|
-
|
4913
|
+
textStyle: "text.md",
|
4866
4914
|
h: 10,
|
4867
4915
|
borderRadius: "sm"
|
4868
4916
|
}),
|
4869
4917
|
sm: defineStyle3({
|
4870
|
-
|
4918
|
+
textStyle: "text.sm",
|
4871
4919
|
h: 9.5,
|
4872
4920
|
borderRadius: "sm"
|
4921
|
+
}),
|
4922
|
+
xs: defineStyle3({
|
4923
|
+
textStyle: "text.sm",
|
4924
|
+
p: 1,
|
4925
|
+
h: 5.5,
|
4926
|
+
borderRadius: "sm"
|
4873
4927
|
})
|
4874
4928
|
};
|
4875
4929
|
var sizes2 = {
|
@@ -4884,6 +4938,10 @@ var sizes2 = {
|
|
4884
4938
|
sm: definePartsStyle4({
|
4885
4939
|
field: size.sm,
|
4886
4940
|
addon: size.sm
|
4941
|
+
}),
|
4942
|
+
xs: definePartsStyle4({
|
4943
|
+
field: size.xs,
|
4944
|
+
addon: size.xs
|
4887
4945
|
})
|
4888
4946
|
};
|
4889
4947
|
var outline = definePartsStyle4((props) => {
|
@@ -5651,7 +5709,7 @@ import { useMemo as useMemo7 } from "react";
|
|
5651
5709
|
import axios from "axios";
|
5652
5710
|
import { createContext as createContext2, useContext, useEffect as useEffect3, useMemo as useMemo6, useRef as useRef2 } from "react";
|
5653
5711
|
import { ToastContainer } from "react-toastify";
|
5654
|
-
import { jsx as
|
5712
|
+
import { jsx as jsx60, jsxs as jsxs27 } from "react/jsx-runtime";
|
5655
5713
|
var ProviderContext = createContext2({
|
5656
5714
|
instance: void 0
|
5657
5715
|
});
|
@@ -5671,7 +5729,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
5671
5729
|
}, [requestInterceptors, responseInterceptors]);
|
5672
5730
|
const provider = useMemo6(() => ({ instance: instanceRef.current }), []);
|
5673
5731
|
return /* @__PURE__ */ jsxs27(ProviderContext.Provider, { value: provider, children: [
|
5674
|
-
/* @__PURE__ */
|
5732
|
+
/* @__PURE__ */ jsx60(ToastContainer, {}),
|
5675
5733
|
children
|
5676
5734
|
] });
|
5677
5735
|
};
|
@@ -5857,7 +5915,7 @@ export {
|
|
5857
5915
|
InputRightAddonProps,
|
5858
5916
|
InputRightElement2 as InputRightElement,
|
5859
5917
|
InputRightElementProps,
|
5860
|
-
|
5918
|
+
Link5 as Link,
|
5861
5919
|
LinkProps,
|
5862
5920
|
List,
|
5863
5921
|
ListIcon,
|
@@ -5883,6 +5941,7 @@ export {
|
|
5883
5941
|
ModalOverlayProps,
|
5884
5942
|
ModalProps,
|
5885
5943
|
multi_datepicker_month_default as MultiDatePickerMonth,
|
5944
|
+
NavItem,
|
5886
5945
|
navigation_bar_default as NavigationBar,
|
5887
5946
|
OrderedList,
|
5888
5947
|
pagination_default as Pagination,
|