@ctlyst.id/internal-ui 3.0.2 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +4 -11
- package/dist/index.d.ts +4 -11
- package/dist/index.js +762 -723
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +412 -367
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
@@ -400,9 +400,9 @@ var badge_default = Badge;
|
|
400
400
|
// src/components/breadcrumb/components/bread-crumb.tsx
|
401
401
|
import { Box as Box4, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Flex, IconButton, Text } from "@chakra-ui/react";
|
402
402
|
import { ChevronLeft, ChevronsRight, Home } from "@ctlyst.id/internal-icon";
|
403
|
-
import { jsx as jsx14, jsxs } from "react/jsx-runtime";
|
403
|
+
import { Fragment, jsx as jsx14, jsxs } from "react/jsx-runtime";
|
404
404
|
var BreadCrumb = (props) => {
|
405
|
-
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton } = props;
|
405
|
+
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton, hideTitle } = props;
|
406
406
|
return /* @__PURE__ */ jsxs(
|
407
407
|
Box4,
|
408
408
|
{
|
@@ -414,25 +414,27 @@ var BreadCrumb = (props) => {
|
|
414
414
|
paddingY: 2,
|
415
415
|
children: [
|
416
416
|
/* @__PURE__ */ jsxs(Box4, { display: "flex", alignItems: "center", children: [
|
417
|
-
/* @__PURE__ */ jsxs(
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
417
|
+
!hideTitle && /* @__PURE__ */ jsxs(Fragment, { children: [
|
418
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", children: [
|
419
|
+
backButton && /* @__PURE__ */ jsx14(
|
420
|
+
IconButton,
|
421
|
+
{
|
422
|
+
"data-test-id": "",
|
423
|
+
border: "1px solid",
|
424
|
+
borderColor: "neutral.100",
|
425
|
+
size: "sm",
|
426
|
+
minH: "9",
|
427
|
+
minW: "9",
|
428
|
+
bg: "white",
|
429
|
+
variant: "ghost",
|
430
|
+
"aria-label": "Edit",
|
431
|
+
icon: /* @__PURE__ */ jsx14(ChevronLeft, { size: 5 })
|
432
|
+
}
|
433
|
+
),
|
434
|
+
/* @__PURE__ */ jsx14(Text, { pr: "2", textStyle: "heading.6", color: "neutral.700", children: title })
|
435
|
+
] }),
|
436
|
+
/* @__PURE__ */ jsx14(Box4, { h: "5.5", borderLeft: "1px solid", borderColor: "neutral.600" })
|
434
437
|
] }),
|
435
|
-
/* @__PURE__ */ jsx14(Box4, { h: "5.5", borderLeft: "1px solid", borderColor: "neutral.600" }),
|
436
438
|
/* @__PURE__ */ jsxs(
|
437
439
|
Breadcrumb,
|
438
440
|
{
|
@@ -482,7 +484,8 @@ BreadCrumb.defaultProps = {
|
|
482
484
|
className: void 0,
|
483
485
|
disableHome: void 0,
|
484
486
|
spacing: 2,
|
485
|
-
backButton: void 0
|
487
|
+
backButton: void 0,
|
488
|
+
hideTitle: false
|
486
489
|
};
|
487
490
|
var bread_crumb_default = BreadCrumb;
|
488
491
|
|
@@ -2172,7 +2175,7 @@ TimeInput.defaultProps = {
|
|
2172
2175
|
var time_input_default = TimeInput;
|
2173
2176
|
|
2174
2177
|
// src/components/datepicker/components/datepicker.tsx
|
2175
|
-
import { Fragment, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
2178
|
+
import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
2176
2179
|
var Datepicker = ({
|
2177
2180
|
id: id2,
|
2178
2181
|
label,
|
@@ -2200,7 +2203,7 @@ var Datepicker = ({
|
|
2200
2203
|
};
|
2201
2204
|
};
|
2202
2205
|
const hasMultipleMonthShow = ((_b = props == null ? void 0 : props.monthsShown) != null ? _b : 1) < 2;
|
2203
|
-
const component = /* @__PURE__ */ jsxs10(
|
2206
|
+
const component = /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
2204
2207
|
/* @__PURE__ */ jsx27(styles_default, { showHeader: !hasMultipleMonthShow }),
|
2205
2208
|
/* @__PURE__ */ jsx27(
|
2206
2209
|
ReactDatePicker,
|
@@ -2510,8 +2513,8 @@ import { Box as Box15, Image as Image2, useColorModeValue as useColorModeValue2
|
|
2510
2513
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
2511
2514
|
var Logo = ({ url, imageUrl, height }) => {
|
2512
2515
|
if (url)
|
2513
|
-
return /* @__PURE__ */ jsx33(Box15, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ jsx33(Image2, { w: "
|
2514
|
-
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" });
|
2515
2518
|
};
|
2516
2519
|
var XMSLogo = () => /* @__PURE__ */ jsx33(
|
2517
2520
|
Image2,
|
@@ -2596,7 +2599,7 @@ NavItem.defaultProps = {
|
|
2596
2599
|
};
|
2597
2600
|
|
2598
2601
|
// src/components/header/components/profile.tsx
|
2599
|
-
import { Fragment as
|
2602
|
+
import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
|
2600
2603
|
var Profile = ({ color: color2, brandColor, data, badgeStyle, children, onLogout, ...props }) => {
|
2601
2604
|
var _a;
|
2602
2605
|
const { isOpen, onToggle, onClose } = useDisclosure();
|
@@ -2622,7 +2625,7 @@ var Profile = ({ color: color2, brandColor, data, badgeStyle, children, onLogout
|
|
2622
2625
|
/* @__PURE__ */ jsxs14(VStack2, { alignItems: "flex-end", spacing: "0", ml: "2", color: color2, children: [
|
2623
2626
|
/* @__PURE__ */ jsx35(Text8, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
2624
2627
|
/* @__PURE__ */ jsxs14(Flex5, { alignItems: "center", children: [
|
2625
|
-
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs14(
|
2628
|
+
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
2626
2629
|
/* @__PURE__ */ jsx35(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
2627
2630
|
/* @__PURE__ */ jsx35(
|
2628
2631
|
Box16,
|
@@ -2635,7 +2638,7 @@ var Profile = ({ color: color2, brandColor, data, badgeStyle, children, onLogout
|
|
2635
2638
|
}
|
2636
2639
|
)
|
2637
2640
|
] }),
|
2638
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ jsxs14(
|
2641
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
2639
2642
|
/* @__PURE__ */ jsx35(Text8, { textStyle: "text.xs", children: data.office[0] }),
|
2640
2643
|
data.office.length > 1 && /* @__PURE__ */ jsxs14(
|
2641
2644
|
badge_default,
|
@@ -2702,14 +2705,14 @@ function environmentName(env2) {
|
|
2702
2705
|
}
|
2703
2706
|
|
2704
2707
|
// src/components/header/components/version.tsx
|
2705
|
-
import { Fragment as
|
2708
|
+
import { Fragment as Fragment4, jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
2706
2709
|
var Version = ({
|
2707
2710
|
hideEnv,
|
2708
2711
|
version,
|
2709
2712
|
environment,
|
2710
2713
|
onOpenModalRelease,
|
2711
2714
|
versionStyle
|
2712
|
-
}) => /* @__PURE__ */ jsxs15(
|
2715
|
+
}) => /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
2713
2716
|
typeof version === "string" ? /* @__PURE__ */ jsx37(
|
2714
2717
|
badge_default,
|
2715
2718
|
{
|
@@ -2896,101 +2899,36 @@ var ModalBackButton = ({ onClick }) => {
|
|
2896
2899
|
};
|
2897
2900
|
var modal_back_button_default = ModalBackButton;
|
2898
2901
|
|
2899
|
-
// src/components/modal/components/modal-body.tsx
|
2900
|
-
import { ModalBody as ChakraModalBody, useColorModeValue as useColorModeValue3 } from "@chakra-ui/react";
|
2901
|
-
import React9 from "react";
|
2902
|
-
import { jsx as jsx41 } from "react/jsx-runtime";
|
2903
|
-
var ModalBody2 = React9.forwardRef(({ children, ...rest }, ref) => {
|
2904
|
-
return /* @__PURE__ */ jsx41(ChakraModalBody, { px: 4, py: 2, ref, background: useColorModeValue3("white", "mirage.900"), ...rest, children });
|
2905
|
-
});
|
2906
|
-
var modal_body_default = ModalBody2;
|
2907
|
-
|
2908
|
-
// src/components/modal/components/modal-close-button.tsx
|
2909
|
-
import { ModalCloseButton as ChakraModalCloseButton, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
|
2910
|
-
import { forwardRef as forwardRef9 } from "react";
|
2911
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
2912
|
-
var ModalCloseButton = forwardRef9((props, ref) => {
|
2913
|
-
return /* @__PURE__ */ jsx42(
|
2914
|
-
ChakraModalCloseButton,
|
2915
|
-
{
|
2916
|
-
ref,
|
2917
|
-
top: 2,
|
2918
|
-
right: 2,
|
2919
|
-
size: "sm",
|
2920
|
-
"data-test-id": "modal-close-button",
|
2921
|
-
background: useColorModeValue4("neutral.50", "mirage.900"),
|
2922
|
-
...props
|
2923
|
-
}
|
2924
|
-
);
|
2925
|
-
});
|
2926
|
-
var modal_close_button_default = ModalCloseButton;
|
2927
|
-
|
2928
|
-
// src/components/modal/components/modal-footer.tsx
|
2929
|
-
import { ModalFooter as ChakraModalFooter, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
|
2930
|
-
import { forwardRef as forwardRef10 } from "react";
|
2931
|
-
import { jsx as jsx43 } from "react/jsx-runtime";
|
2932
|
-
var ModalFooter2 = forwardRef10(({ children, ...rest }, ref) => {
|
2933
|
-
return /* @__PURE__ */ jsx43(
|
2934
|
-
ChakraModalFooter,
|
2935
|
-
{
|
2936
|
-
ref,
|
2937
|
-
background: useColorModeValue5("neutral.200", "mirage.900"),
|
2938
|
-
borderBottomRadius: "sm",
|
2939
|
-
...rest,
|
2940
|
-
children
|
2941
|
-
}
|
2942
|
-
);
|
2943
|
-
});
|
2944
|
-
var modal_footer_default = ModalFooter2;
|
2945
|
-
|
2946
|
-
// src/components/modal/components/modal-header.tsx
|
2947
|
-
import { ModalHeader as ChakraModalHeader, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
|
2948
|
-
import { forwardRef as forwardRef11 } from "react";
|
2949
|
-
import { jsx as jsx44 } from "react/jsx-runtime";
|
2950
|
-
var ModalHeader2 = forwardRef11(({ children, ...rest }, ref) => {
|
2951
|
-
return /* @__PURE__ */ jsx44(
|
2952
|
-
ChakraModalHeader,
|
2953
|
-
{
|
2954
|
-
ref,
|
2955
|
-
background: useColorModeValue6("neutral.200", "mirage.900"),
|
2956
|
-
borderTopRadius: "sm",
|
2957
|
-
fontSize: "text.lg",
|
2958
|
-
fontWeight: "400",
|
2959
|
-
px: 4,
|
2960
|
-
py: 2,
|
2961
|
-
...rest,
|
2962
|
-
children
|
2963
|
-
}
|
2964
|
-
);
|
2965
|
-
});
|
2966
|
-
var modal_header_default = ModalHeader2;
|
2967
|
-
|
2968
2902
|
// src/components/modal/index.ts
|
2969
2903
|
import {
|
2970
2904
|
AlertDialog,
|
2971
|
-
ModalBody as
|
2972
|
-
ModalCloseButton
|
2905
|
+
ModalBody as ModalBody2,
|
2906
|
+
ModalCloseButton,
|
2973
2907
|
AlertDialogContent,
|
2974
|
-
ModalFooter as
|
2975
|
-
ModalHeader as
|
2908
|
+
ModalFooter as ModalFooter2,
|
2909
|
+
ModalHeader as ModalHeader2,
|
2976
2910
|
ModalOverlay as ModalOverlay2,
|
2977
2911
|
AlertDialogProps,
|
2978
2912
|
Drawer,
|
2979
|
-
ModalBody as
|
2980
|
-
ModalCloseButton as
|
2913
|
+
ModalBody as ModalBody3,
|
2914
|
+
ModalCloseButton as ModalCloseButton2,
|
2981
2915
|
DrawerContent,
|
2982
2916
|
DrawerContentProps,
|
2983
|
-
ModalFooter as
|
2984
|
-
ModalHeader as
|
2917
|
+
ModalFooter as ModalFooter3,
|
2918
|
+
ModalHeader as ModalHeader3,
|
2985
2919
|
ModalOverlay as ModalOverlay3,
|
2986
2920
|
DrawerProps,
|
2987
2921
|
Modal as Modal2,
|
2922
|
+
ModalBody as ModalBody4,
|
2988
2923
|
ModalBodyProps,
|
2924
|
+
ModalCloseButton as ModalCloseButton3,
|
2989
2925
|
ModalContent as ModalContent2,
|
2990
2926
|
ModalContentProps,
|
2991
2927
|
ModalContextProvider,
|
2992
2928
|
ModalFocusScope,
|
2929
|
+
ModalFooter as ModalFooter4,
|
2993
2930
|
ModalFooterProps,
|
2931
|
+
ModalHeader as ModalHeader4,
|
2994
2932
|
ModalHeaderProps,
|
2995
2933
|
ModalOverlay as ModalOverlay4,
|
2996
2934
|
ModalOverlayProps,
|
@@ -3014,33 +2952,33 @@ import {
|
|
3014
2952
|
PopoverTrigger as PopoverTrigger2,
|
3015
2953
|
Portal,
|
3016
2954
|
Text as Text9,
|
3017
|
-
useColorModeValue as
|
2955
|
+
useColorModeValue as useColorModeValue3
|
3018
2956
|
} from "@chakra-ui/react";
|
3019
2957
|
import * as Icon5 from "@ctlyst.id/internal-icon";
|
3020
2958
|
import { css as css3 } from "@emotion/react";
|
3021
2959
|
|
3022
2960
|
// src/components/navigation/components/mapping-icon.tsx
|
3023
2961
|
import * as Icon4 from "@ctlyst.id/internal-icon";
|
3024
|
-
import { jsx as
|
2962
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
3025
2963
|
var mappingIcon = /* @__PURE__ */ new Map([
|
3026
|
-
["Order", /* @__PURE__ */
|
3027
|
-
["Fulfillment", /* @__PURE__ */
|
3028
|
-
["Transfer Stock", /* @__PURE__ */
|
3029
|
-
["Stock", /* @__PURE__ */
|
3030
|
-
["Product Database", /* @__PURE__ */
|
3031
|
-
["Purchasing", /* @__PURE__ */
|
3032
|
-
["Reseller", /* @__PURE__ */
|
3033
|
-
["Retur", /* @__PURE__ */
|
3034
|
-
["Other", /* @__PURE__ */
|
3035
|
-
["Content", /* @__PURE__ */
|
3036
|
-
["Customer", /* @__PURE__ */
|
3037
|
-
["Voucher", /* @__PURE__ */
|
2964
|
+
["Order", /* @__PURE__ */ jsx41(Icon4.ShoppingBag, { size: 4, color: "inherit" }, "order")],
|
2965
|
+
["Fulfillment", /* @__PURE__ */ jsx41(Icon4.ShoppingCart, { size: 4, color: "inherit" }, "fullfilment")],
|
2966
|
+
["Transfer Stock", /* @__PURE__ */ jsx41(Icon4.Repeat, { size: 4, color: "inherit" }, "transfer-stock")],
|
2967
|
+
["Stock", /* @__PURE__ */ jsx41(Icon4.Box, { size: 4, color: "inherit" }, "stock")],
|
2968
|
+
["Product Database", /* @__PURE__ */ jsx41(Icon4.Layers, { size: 4, color: "inherit" }, "product-database")],
|
2969
|
+
["Purchasing", /* @__PURE__ */ jsx41(Icon4.DollarSign, { size: 4, color: "inherit" }, "purchasing")],
|
2970
|
+
["Reseller", /* @__PURE__ */ jsx41(Icon4.Users, { size: 4, color: "inherit" }, "reseller")],
|
2971
|
+
["Retur", /* @__PURE__ */ jsx41(Icon4.RotateCcw, { size: 4, color: "inherit" }, "retur")],
|
2972
|
+
["Other", /* @__PURE__ */ jsx41(Icon4.Settings, { size: 4, color: "inherit" }, "other")],
|
2973
|
+
["Content", /* @__PURE__ */ jsx41(Icon4.Layout, { size: 4, color: "inherit" }, "content")],
|
2974
|
+
["Customer", /* @__PURE__ */ jsx41(Icon4.HelpCircle, { size: 4, color: "inherit" }, "content")],
|
2975
|
+
["Voucher", /* @__PURE__ */ jsx41(Icon4.Gift, { size: 4, color: "inherit" }, "content")]
|
3038
2976
|
]);
|
3039
2977
|
|
3040
2978
|
// src/components/navigation/components/navigation.tsx
|
3041
|
-
import { Fragment as
|
2979
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs17 } from "react/jsx-runtime";
|
3042
2980
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
3043
|
-
return /* @__PURE__ */
|
2981
|
+
return /* @__PURE__ */ jsx42(Box21, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ jsx42(
|
3044
2982
|
Flex9,
|
3045
2983
|
{
|
3046
2984
|
bg: "white",
|
@@ -3055,8 +2993,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3055
2993
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
3056
2994
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
3057
2995
|
const activeBg = isActive ? "primary.500" : void 0;
|
3058
|
-
return /* @__PURE__ */
|
3059
|
-
/* @__PURE__ */
|
2996
|
+
return /* @__PURE__ */ jsx42(Popover2, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
2997
|
+
/* @__PURE__ */ jsx42(PopoverTrigger2, { children: /* @__PURE__ */ jsx42(
|
3060
2998
|
Button3,
|
3061
2999
|
{
|
3062
3000
|
h: 7.5,
|
@@ -3070,14 +3008,14 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3070
3008
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
3071
3009
|
color: isActive ? "primary.50" : "black.high",
|
3072
3010
|
leftIcon: mappingIcon.get(navigation.title),
|
3073
|
-
rightIcon: /* @__PURE__ */
|
3011
|
+
rightIcon: /* @__PURE__ */ jsx42(Icon5.ChevronDown, { size: 4, color: "inherit" }),
|
3074
3012
|
children: navigation.title
|
3075
3013
|
}
|
3076
3014
|
) }),
|
3077
|
-
navigation.children && /* @__PURE__ */
|
3015
|
+
navigation.children && /* @__PURE__ */ jsx42(Portal, { children: /* @__PURE__ */ jsx42(Box21, { zIndex: "popover", children: /* @__PURE__ */ jsx42(
|
3078
3016
|
PopoverContent2,
|
3079
3017
|
{
|
3080
|
-
bg:
|
3018
|
+
bg: useColorModeValue3("white", "ebony-clay.800"),
|
3081
3019
|
maxW: 250,
|
3082
3020
|
border: "none",
|
3083
3021
|
borderRadius: "md",
|
@@ -3086,7 +3024,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3086
3024
|
const link = navHost ? `${navHost}${navLink}` : navLink;
|
3087
3025
|
const isLocalLink = host === navHost;
|
3088
3026
|
const isActiveSub = activePath === navLink;
|
3089
|
-
return /* @__PURE__ */
|
3027
|
+
return /* @__PURE__ */ jsx42(
|
3090
3028
|
Link3,
|
3091
3029
|
{
|
3092
3030
|
as: isLocalLink ? as : void 0,
|
@@ -3103,8 +3041,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3103
3041
|
cursor: "pointer",
|
3104
3042
|
transition: "padding 0.35s ease 0s",
|
3105
3043
|
_hover: {
|
3106
|
-
backgroundColor:
|
3107
|
-
color:
|
3044
|
+
backgroundColor: useColorModeValue3("dove-gray.50", "mirage.900"),
|
3045
|
+
color: useColorModeValue3("primary.500", "dove-gray.600"),
|
3108
3046
|
px: 5,
|
3109
3047
|
py: 4,
|
3110
3048
|
_first: { borderTopRadius: "md" },
|
@@ -3118,8 +3056,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3118
3056
|
py: 4,
|
3119
3057
|
children: [
|
3120
3058
|
mappingIcon.get(navigation.title),
|
3121
|
-
/* @__PURE__ */
|
3122
|
-
isActiveSub && /* @__PURE__ */
|
3059
|
+
/* @__PURE__ */ jsx42(Text9, { fontSize: "text.sm", ml: 3, children: title }),
|
3060
|
+
isActiveSub && /* @__PURE__ */ jsx42(
|
3123
3061
|
Box21,
|
3124
3062
|
{
|
3125
3063
|
width: 0.5,
|
@@ -3155,7 +3093,7 @@ var navigation_default = Navigation;
|
|
3155
3093
|
// src/components/navigation/components/navigation-bar.tsx
|
3156
3094
|
import { Box as Box22, Button as Button4, Flex as Flex10, Link as Link4, Popover as Popover3, PopoverContent as PopoverContent3, PopoverTrigger as PopoverTrigger3, Text as Text10 } from "@chakra-ui/react";
|
3157
3095
|
import * as Icon6 from "@ctlyst.id/internal-icon";
|
3158
|
-
import { Fragment as
|
3096
|
+
import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
3159
3097
|
var NavigationBar = ({
|
3160
3098
|
navigations,
|
3161
3099
|
isFetched,
|
@@ -3170,7 +3108,7 @@ var NavigationBar = ({
|
|
3170
3108
|
}
|
3171
3109
|
return subMenu.navHost + subMenu.navLink;
|
3172
3110
|
};
|
3173
|
-
return /* @__PURE__ */
|
3111
|
+
return /* @__PURE__ */ jsx43(Box22, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ jsx43(
|
3174
3112
|
Flex10,
|
3175
3113
|
{
|
3176
3114
|
bg: "white",
|
@@ -3187,8 +3125,8 @@ var NavigationBar = ({
|
|
3187
3125
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
3188
3126
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
3189
3127
|
const activeBg = isActive ? "primary.500" : void 0;
|
3190
|
-
return /* @__PURE__ */
|
3191
|
-
/* @__PURE__ */
|
3128
|
+
return /* @__PURE__ */ jsx43(Popover3, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
3129
|
+
/* @__PURE__ */ jsx43(PopoverTrigger3, { children: /* @__PURE__ */ jsx43(
|
3192
3130
|
Button4,
|
3193
3131
|
{
|
3194
3132
|
h: 7.5,
|
@@ -3202,11 +3140,11 @@ var NavigationBar = ({
|
|
3202
3140
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
3203
3141
|
color: isActive ? "primary.50" : "black.high",
|
3204
3142
|
leftIcon: mappingIcon2.get(item.title),
|
3205
|
-
rightIcon: /* @__PURE__ */
|
3143
|
+
rightIcon: /* @__PURE__ */ jsx43(Icon6.ChevronDown, { size: 4, color: "inherit" }),
|
3206
3144
|
children: item.title
|
3207
3145
|
}
|
3208
3146
|
) }),
|
3209
|
-
item.children && /* @__PURE__ */
|
3147
|
+
item.children && /* @__PURE__ */ jsx43(PopoverContent3, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ jsxs18(
|
3210
3148
|
Link4,
|
3211
3149
|
{
|
3212
3150
|
href: urlMenu(subMenu),
|
@@ -3224,7 +3162,7 @@ var NavigationBar = ({
|
|
3224
3162
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
3225
3163
|
children: [
|
3226
3164
|
mappingIcon2.get(item.title),
|
3227
|
-
/* @__PURE__ */
|
3165
|
+
/* @__PURE__ */ jsx43(Text10, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
3228
3166
|
]
|
3229
3167
|
},
|
3230
3168
|
subMenu.id
|
@@ -3241,17 +3179,17 @@ var navigation_bar_default = NavigationBar;
|
|
3241
3179
|
|
3242
3180
|
// src/components/pagination/components/pagination.tsx
|
3243
3181
|
import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon } from "@chakra-ui/icons";
|
3244
|
-
import { Box as Box23, Text as Text11, useColorModeValue as
|
3182
|
+
import { Box as Box23, Text as Text11, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
|
3245
3183
|
|
3246
3184
|
// src/components/pagination/components/pagination-button.tsx
|
3247
|
-
import { Button as Button5, forwardRef as
|
3248
|
-
import { jsx as
|
3249
|
-
var PaginationButton =
|
3250
|
-
const btnBg =
|
3251
|
-
const btnColor =
|
3252
|
-
const btnNotActiveBg =
|
3253
|
-
const btnNotActiveColor =
|
3254
|
-
return /* @__PURE__ */
|
3185
|
+
import { Button as Button5, forwardRef as forwardRef9, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
|
3186
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
3187
|
+
var PaginationButton = forwardRef9(({ className, style, isActive, children, ...rest }, ref) => {
|
3188
|
+
const btnBg = useColorModeValue4("neutral.300", "mirage.900");
|
3189
|
+
const btnColor = useColorModeValue4("black.high", "primary.300");
|
3190
|
+
const btnNotActiveBg = useColorModeValue4("secondary.50", "primary.500");
|
3191
|
+
const btnNotActiveColor = useColorModeValue4("primary.500", "white");
|
3192
|
+
return /* @__PURE__ */ jsx44(
|
3255
3193
|
Button5,
|
3256
3194
|
{
|
3257
3195
|
"data-test-id": "Pagination-Button",
|
@@ -3273,7 +3211,7 @@ var PaginationButton = forwardRef12(({ className, style, isActive, children, ...
|
|
3273
3211
|
color: btnNotActiveColor
|
3274
3212
|
} : {},
|
3275
3213
|
_disabled: {
|
3276
|
-
background:
|
3214
|
+
background: useColorModeValue4("neutral.300", "mirage.900"),
|
3277
3215
|
color: "neutral.600",
|
3278
3216
|
pointerEvents: "none"
|
3279
3217
|
},
|
@@ -3290,7 +3228,7 @@ var pagination_button_default = PaginationButton;
|
|
3290
3228
|
|
3291
3229
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
3292
3230
|
import { VisuallyHidden } from "@chakra-ui/react";
|
3293
|
-
import { jsx as
|
3231
|
+
import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
|
3294
3232
|
var PaginationButtonTrigger = ({
|
3295
3233
|
color: color2,
|
3296
3234
|
isDisabled,
|
@@ -3298,7 +3236,7 @@ var PaginationButtonTrigger = ({
|
|
3298
3236
|
visuallyHidden,
|
3299
3237
|
icon
|
3300
3238
|
}) => /* @__PURE__ */ jsxs19(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color: color2, isDisabled, onClick, children: [
|
3301
|
-
/* @__PURE__ */
|
3239
|
+
/* @__PURE__ */ jsx45(VisuallyHidden, { children: visuallyHidden }),
|
3302
3240
|
icon
|
3303
3241
|
] });
|
3304
3242
|
PaginationButtonTrigger.defaultProps = {
|
@@ -3311,10 +3249,10 @@ PaginationButtonTrigger.defaultProps = {
|
|
3311
3249
|
var pagination_button_trigger_default = PaginationButtonTrigger;
|
3312
3250
|
|
3313
3251
|
// src/components/pagination/components/pagination.tsx
|
3314
|
-
import { jsx as
|
3252
|
+
import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
3315
3253
|
var Pagination = ({ className, current, total, onSelect }) => {
|
3316
|
-
const btnColorDisabled =
|
3317
|
-
const btnColor =
|
3254
|
+
const btnColorDisabled = useColorModeValue5("secondary.100", "primary.500");
|
3255
|
+
const btnColor = useColorModeValue5("primary.500", "secondary.100");
|
3318
3256
|
const disabledPrevious = current === 1;
|
3319
3257
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
3320
3258
|
const disabledNext = current === total;
|
@@ -3342,7 +3280,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3342
3280
|
return pageButtons;
|
3343
3281
|
};
|
3344
3282
|
return /* @__PURE__ */ jsxs20(Box23, { className, display: "inline-flex", alignItems: "center", children: [
|
3345
|
-
/* @__PURE__ */
|
3283
|
+
/* @__PURE__ */ jsx46(Box23, { mr: 1, children: /* @__PURE__ */ jsx46(
|
3346
3284
|
pagination_button_trigger_default,
|
3347
3285
|
{
|
3348
3286
|
"data-test-id": "Pagination-Button",
|
@@ -3350,11 +3288,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3350
3288
|
isDisabled: disabledPrevious,
|
3351
3289
|
onClick: () => handleSelectPage(1),
|
3352
3290
|
visuallyHidden: "First Page",
|
3353
|
-
icon: /* @__PURE__ */
|
3291
|
+
icon: /* @__PURE__ */ jsx46(ArrowLeftIcon, { width: 2 })
|
3354
3292
|
}
|
3355
3293
|
) }),
|
3356
3294
|
/* @__PURE__ */ jsxs20(Box23, { bg: "neutral.300", borderRadius: "full", children: [
|
3357
|
-
/* @__PURE__ */
|
3295
|
+
/* @__PURE__ */ jsx46(
|
3358
3296
|
pagination_button_trigger_default,
|
3359
3297
|
{
|
3360
3298
|
"data-test-id": "Pagination-Button",
|
@@ -3362,22 +3300,22 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3362
3300
|
isDisabled: disabledPrevious,
|
3363
3301
|
onClick: () => handleSelectPage(current - 1),
|
3364
3302
|
visuallyHidden: "Previous Page",
|
3365
|
-
icon: /* @__PURE__ */
|
3303
|
+
icon: /* @__PURE__ */ jsx46(ChevronLeftIcon2, {})
|
3366
3304
|
}
|
3367
3305
|
),
|
3368
3306
|
generatePages().map((page) => {
|
3369
|
-
return /* @__PURE__ */
|
3307
|
+
return /* @__PURE__ */ jsx46(
|
3370
3308
|
pagination_button_default,
|
3371
3309
|
{
|
3372
3310
|
"data-test-id": "Pagination-Button",
|
3373
3311
|
isActive: page === current,
|
3374
3312
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
3375
|
-
children: /* @__PURE__ */
|
3313
|
+
children: /* @__PURE__ */ jsx46(Text11, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
3376
3314
|
},
|
3377
3315
|
page
|
3378
3316
|
);
|
3379
3317
|
}),
|
3380
|
-
/* @__PURE__ */
|
3318
|
+
/* @__PURE__ */ jsx46(
|
3381
3319
|
pagination_button_trigger_default,
|
3382
3320
|
{
|
3383
3321
|
"data-test-id": "Pagination-Button",
|
@@ -3385,11 +3323,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3385
3323
|
isDisabled: disabledNext,
|
3386
3324
|
onClick: () => handleSelectPage(current + 1),
|
3387
3325
|
visuallyHidden: "Next Page",
|
3388
|
-
icon: /* @__PURE__ */
|
3326
|
+
icon: /* @__PURE__ */ jsx46(ChevronRightIcon, {})
|
3389
3327
|
}
|
3390
3328
|
)
|
3391
3329
|
] }),
|
3392
|
-
/* @__PURE__ */
|
3330
|
+
/* @__PURE__ */ jsx46(Box23, { ml: 1, children: /* @__PURE__ */ jsx46(
|
3393
3331
|
pagination_button_trigger_default,
|
3394
3332
|
{
|
3395
3333
|
"data-test-id": "Pagination-Button",
|
@@ -3397,7 +3335,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3397
3335
|
isDisabled: disabledNext,
|
3398
3336
|
onClick: () => handleSelectPage(total),
|
3399
3337
|
visuallyHidden: "Last Page",
|
3400
|
-
icon: /* @__PURE__ */
|
3338
|
+
icon: /* @__PURE__ */ jsx46(ArrowRightIcon, { width: 2 })
|
3401
3339
|
}
|
3402
3340
|
) })
|
3403
3341
|
] });
|
@@ -3411,7 +3349,7 @@ var pagination_default = Pagination;
|
|
3411
3349
|
|
3412
3350
|
// src/components/pagination/components/pagination-detail.tsx
|
3413
3351
|
import { Text as Text12 } from "@chakra-ui/react";
|
3414
|
-
import { jsx as
|
3352
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
3415
3353
|
var PaginationDetail = ({
|
3416
3354
|
page,
|
3417
3355
|
limit,
|
@@ -3421,15 +3359,15 @@ var PaginationDetail = ({
|
|
3421
3359
|
lineHeight = 18,
|
3422
3360
|
...rest
|
3423
3361
|
}) => {
|
3424
|
-
return /* @__PURE__ */
|
3362
|
+
return /* @__PURE__ */ jsx47(Text12, { scale: scale2, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
3425
3363
|
};
|
3426
3364
|
var pagination_detail_default = PaginationDetail;
|
3427
3365
|
|
3428
3366
|
// src/components/pagination/components/pagination-filter.tsx
|
3429
|
-
import { Box as Box24, Select, Text as Text13, useColorModeValue as
|
3430
|
-
import * as
|
3367
|
+
import { Box as Box24, Select, Text as Text13, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
|
3368
|
+
import * as React9 from "react";
|
3431
3369
|
import { FiChevronDown } from "react-icons/fi";
|
3432
|
-
import { jsx as
|
3370
|
+
import { jsx as jsx48, jsxs as jsxs21 } from "react/jsx-runtime";
|
3433
3371
|
var PaginationFilter = ({
|
3434
3372
|
limit,
|
3435
3373
|
label = "Baris per halaman:",
|
@@ -3437,10 +3375,10 @@ var PaginationFilter = ({
|
|
3437
3375
|
onChange,
|
3438
3376
|
...rest
|
3439
3377
|
}) => {
|
3440
|
-
const [value, setValue] =
|
3378
|
+
const [value, setValue] = React9.useState(limit);
|
3441
3379
|
return /* @__PURE__ */ jsxs21(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
3442
|
-
/* @__PURE__ */
|
3443
|
-
/* @__PURE__ */
|
3380
|
+
/* @__PURE__ */ jsx48(Text13, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue6("neutral.900", "white"), ...rest, children: label }),
|
3381
|
+
/* @__PURE__ */ jsx48(
|
3444
3382
|
Select,
|
3445
3383
|
{
|
3446
3384
|
textAlign: "center",
|
@@ -3449,7 +3387,7 @@ var PaginationFilter = ({
|
|
3449
3387
|
border: "none",
|
3450
3388
|
boxShadow: "none",
|
3451
3389
|
width: 18,
|
3452
|
-
icon: /* @__PURE__ */
|
3390
|
+
icon: /* @__PURE__ */ jsx48(FiChevronDown, {}),
|
3453
3391
|
_focusVisible: { boxShadow: "none" },
|
3454
3392
|
onChange: (e) => {
|
3455
3393
|
const numberValue = Number(e.target.value);
|
@@ -3458,7 +3396,7 @@ var PaginationFilter = ({
|
|
3458
3396
|
},
|
3459
3397
|
value,
|
3460
3398
|
children: items.map((item) => {
|
3461
|
-
return /* @__PURE__ */
|
3399
|
+
return /* @__PURE__ */ jsx48("option", { value: item, children: item }, item);
|
3462
3400
|
})
|
3463
3401
|
}
|
3464
3402
|
)
|
@@ -3470,6 +3408,23 @@ PaginationFilter.defaultProps = {
|
|
3470
3408
|
};
|
3471
3409
|
var pagination_filter_default = PaginationFilter;
|
3472
3410
|
|
3411
|
+
// src/components/pin-input/index.ts
|
3412
|
+
import {
|
3413
|
+
PinInput,
|
3414
|
+
PinInputContext,
|
3415
|
+
PinInputDescendantsProvider,
|
3416
|
+
PinInputField,
|
3417
|
+
PinInputFieldProps,
|
3418
|
+
PinInputProps,
|
3419
|
+
PinInputProvider,
|
3420
|
+
usePinInput,
|
3421
|
+
usePinInputContext,
|
3422
|
+
usePinInputField,
|
3423
|
+
UsePinInputFieldProps,
|
3424
|
+
UsePinInputProps,
|
3425
|
+
UsePinInputReturn
|
3426
|
+
} from "@chakra-ui/react";
|
3427
|
+
|
3473
3428
|
// src/components/popover/index.ts
|
3474
3429
|
import {
|
3475
3430
|
Popover as Popover4,
|
@@ -3491,14 +3446,25 @@ import {
|
|
3491
3446
|
PortalProps
|
3492
3447
|
} from "@chakra-ui/react";
|
3493
3448
|
|
3449
|
+
// src/components/progress/index.ts
|
3450
|
+
import {
|
3451
|
+
Progress,
|
3452
|
+
ProgressFilledTrackProps,
|
3453
|
+
ProgressLabel,
|
3454
|
+
ProgressLabelProps,
|
3455
|
+
ProgressProps,
|
3456
|
+
ProgressTrackProps,
|
3457
|
+
useProgressStyles
|
3458
|
+
} from "@chakra-ui/react";
|
3459
|
+
|
3494
3460
|
// src/components/radio/components/radio.tsx
|
3495
3461
|
import { Box as Box25, Radio as ChakraRadio, Text as Text14 } from "@chakra-ui/react";
|
3496
|
-
import { jsx as
|
3462
|
+
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
3497
3463
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
3498
3464
|
const variant = isError ? "errors" : "unstyled";
|
3499
3465
|
return /* @__PURE__ */ jsxs22(Box25, { children: [
|
3500
|
-
/* @__PURE__ */
|
3501
|
-
isError && errorText ? /* @__PURE__ */
|
3466
|
+
/* @__PURE__ */ jsx49(Box25, { display: "flex", children: /* @__PURE__ */ jsx49(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx49(Text14, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
3467
|
+
isError && errorText ? /* @__PURE__ */ jsx49(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx49(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ jsx49(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx49(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
3502
3468
|
] });
|
3503
3469
|
};
|
3504
3470
|
Radio.displayName = "Radio";
|
@@ -3510,7 +3476,7 @@ Radio.defaultProps = {
|
|
3510
3476
|
|
3511
3477
|
// src/components/radio/components/radio-group.tsx
|
3512
3478
|
import { Box as Box26, RadioGroup as ChakraRadioGroup, Stack as Stack3 } from "@chakra-ui/react";
|
3513
|
-
import { jsx as
|
3479
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
3514
3480
|
var RadioGroup = ({
|
3515
3481
|
children,
|
3516
3482
|
label,
|
@@ -3519,7 +3485,7 @@ var RadioGroup = ({
|
|
3519
3485
|
errorMessage,
|
3520
3486
|
...props
|
3521
3487
|
}) => {
|
3522
|
-
return /* @__PURE__ */
|
3488
|
+
return /* @__PURE__ */ jsx50(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ jsx50(Box26, { mt: "2", mb: "1", children: /* @__PURE__ */ jsx50(ChakraRadioGroup, { ...props, children: /* @__PURE__ */ jsx50(Stack3, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
3523
3489
|
};
|
3524
3490
|
RadioGroup.displayName = "RadioGroup";
|
3525
3491
|
RadioGroup.defaultProps = {
|
@@ -3542,9 +3508,9 @@ import {
|
|
3542
3508
|
// src/components/rating/components/rating.tsx
|
3543
3509
|
import { Grid as Grid2 } from "@chakra-ui/react";
|
3544
3510
|
import { Rating as RatingIcon } from "@ctlyst.id/internal-icon";
|
3545
|
-
import { jsx as
|
3511
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
3546
3512
|
var Rating = ({ value }) => {
|
3547
|
-
return /* @__PURE__ */
|
3513
|
+
return /* @__PURE__ */ jsx51(Grid2, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx51(RatingIcon, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
3548
3514
|
};
|
3549
3515
|
var rating_default = Rating;
|
3550
3516
|
|
@@ -3900,14 +3866,14 @@ var themeSelect = (theme5) => {
|
|
3900
3866
|
};
|
3901
3867
|
|
3902
3868
|
// src/components/select/components/select.tsx
|
3903
|
-
import { jsx as
|
3869
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
3904
3870
|
function Select2({
|
3905
3871
|
styles,
|
3906
3872
|
isError = false,
|
3907
3873
|
...rest
|
3908
3874
|
}) {
|
3909
3875
|
const { colorMode } = useColorMode3();
|
3910
|
-
return /* @__PURE__ */
|
3876
|
+
return /* @__PURE__ */ jsx52(
|
3911
3877
|
ReactSelect,
|
3912
3878
|
{
|
3913
3879
|
classNamePrefix: "react-select",
|
@@ -3922,14 +3888,14 @@ var select_default = Select2;
|
|
3922
3888
|
// src/components/select/components/select-async.tsx
|
3923
3889
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
3924
3890
|
import { AsyncPaginate } from "react-select-async-paginate";
|
3925
|
-
import { jsx as
|
3891
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
3926
3892
|
function SelectAsync({
|
3927
3893
|
styles,
|
3928
3894
|
isError = false,
|
3929
3895
|
...rest
|
3930
3896
|
}) {
|
3931
3897
|
const { colorMode } = useColorMode4();
|
3932
|
-
return /* @__PURE__ */
|
3898
|
+
return /* @__PURE__ */ jsx53(
|
3933
3899
|
AsyncPaginate,
|
3934
3900
|
{
|
3935
3901
|
classNamePrefix: "react-select",
|
@@ -3944,10 +3910,10 @@ var select_async_default = SelectAsync;
|
|
3944
3910
|
// src/components/select/components/select-async-creatable.tsx
|
3945
3911
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
3946
3912
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
3947
|
-
import { jsx as
|
3913
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
3948
3914
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3949
3915
|
const { colorMode } = useColorMode5();
|
3950
|
-
return /* @__PURE__ */
|
3916
|
+
return /* @__PURE__ */ jsx54(
|
3951
3917
|
ReactSelectAsyncCreatable,
|
3952
3918
|
{
|
3953
3919
|
classNamePrefix: "react-select",
|
@@ -3961,10 +3927,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3961
3927
|
// src/components/select/components/select-creatable.tsx
|
3962
3928
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
3963
3929
|
import ReactSelectCreatable from "react-select/creatable";
|
3964
|
-
import { jsx as
|
3930
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
3965
3931
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3966
3932
|
const { colorMode } = useColorMode6();
|
3967
|
-
return /* @__PURE__ */
|
3933
|
+
return /* @__PURE__ */ jsx55(
|
3968
3934
|
ReactSelectCreatable,
|
3969
3935
|
{
|
3970
3936
|
classNamePrefix: "react-select",
|
@@ -3979,7 +3945,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3979
3945
|
import { Checkbox as Checkbox3, Flex as Flex11, Text as Text15 } from "@chakra-ui/react";
|
3980
3946
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3981
3947
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3982
|
-
import { Fragment as
|
3948
|
+
import { Fragment as Fragment7, jsx as jsx56, jsxs as jsxs23 } from "react/jsx-runtime";
|
3983
3949
|
var CHECKBOX_STATE = {
|
3984
3950
|
UNCHECKED: 0,
|
3985
3951
|
INDETERMINATE: 1,
|
@@ -4026,8 +3992,8 @@ var InputOption = ({
|
|
4026
3992
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
4027
3993
|
style
|
4028
3994
|
};
|
4029
|
-
return /* @__PURE__ */ jsxs23(
|
4030
|
-
/* @__PURE__ */
|
3995
|
+
return /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
3996
|
+
/* @__PURE__ */ jsx56(
|
4031
3997
|
ComponentRS.Option,
|
4032
3998
|
{
|
4033
3999
|
isMulti: true,
|
@@ -4048,7 +4014,7 @@ var InputOption = ({
|
|
4048
4014
|
"data-test-id": "CT_component_select-checkbox_options",
|
4049
4015
|
cursor: isDisabled ? "not-allowed" : "default",
|
4050
4016
|
children: [
|
4051
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4017
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56(
|
4052
4018
|
Checkbox3,
|
4053
4019
|
{
|
4054
4020
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -4056,14 +4022,14 @@ var InputOption = ({
|
|
4056
4022
|
isDisabled,
|
4057
4023
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
4058
4024
|
}
|
4059
|
-
) : /* @__PURE__ */
|
4060
|
-
/* @__PURE__ */
|
4025
|
+
) : /* @__PURE__ */ jsx56(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
|
4026
|
+
/* @__PURE__ */ jsx56(Text15, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
4061
4027
|
]
|
4062
4028
|
}
|
4063
4029
|
)
|
4064
4030
|
}
|
4065
4031
|
),
|
4066
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4032
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx56("hr", {}) : null
|
4067
4033
|
] });
|
4068
4034
|
};
|
4069
4035
|
var SelectWithCheckboxBase = ({
|
@@ -4073,7 +4039,7 @@ var SelectWithCheckboxBase = ({
|
|
4073
4039
|
...rest
|
4074
4040
|
}) => {
|
4075
4041
|
const { colorMode } = useColorMode7();
|
4076
|
-
return /* @__PURE__ */
|
4042
|
+
return /* @__PURE__ */ jsx56(
|
4077
4043
|
ReactSelect2,
|
4078
4044
|
{
|
4079
4045
|
classNamePrefix: "react-select",
|
@@ -4092,7 +4058,7 @@ var SelectWithCheckboxBase = ({
|
|
4092
4058
|
var SelectCheckbox = (props) => {
|
4093
4059
|
const { isMulti, options, value, ...rest } = props;
|
4094
4060
|
const selectValue = value || [];
|
4095
|
-
return /* @__PURE__ */
|
4061
|
+
return /* @__PURE__ */ jsx56(
|
4096
4062
|
SelectWithCheckboxBase,
|
4097
4063
|
{
|
4098
4064
|
isMulti,
|
@@ -4103,7 +4069,7 @@ var SelectCheckbox = (props) => {
|
|
4103
4069
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
4104
4070
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
4105
4071
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
4106
|
-
return /* @__PURE__ */
|
4072
|
+
return /* @__PURE__ */ jsx56(InputOption, { ...optionProps, checkedState });
|
4107
4073
|
}
|
4108
4074
|
},
|
4109
4075
|
...rest
|
@@ -4120,12 +4086,12 @@ import { __assign as __assign25 } from "tslib";
|
|
4120
4086
|
|
4121
4087
|
// ../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/index.mjs
|
4122
4088
|
import { __assign as __assign2 } from "tslib";
|
4123
|
-
import * as
|
4124
|
-
import { forwardRef as
|
4089
|
+
import * as React11 from "react";
|
4090
|
+
import { forwardRef as forwardRef10, useContext as useContext7 } from "react";
|
4125
4091
|
|
4126
4092
|
// ../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/use-features.mjs
|
4127
4093
|
import { __assign } from "tslib";
|
4128
|
-
import * as
|
4094
|
+
import * as React10 from "react";
|
4129
4095
|
import { useContext } from "react";
|
4130
4096
|
|
4131
4097
|
// ../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/process.mjs
|
@@ -4220,7 +4186,7 @@ function useFeatures(props, visualElement2, preloadedFeatures) {
|
|
4220
4186
|
var name_1 = featureNames[i];
|
4221
4187
|
var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component;
|
4222
4188
|
if (isEnabled(props) && Component) {
|
4223
|
-
features.push(
|
4189
|
+
features.push(React10.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement2 })));
|
4224
4190
|
}
|
4225
4191
|
}
|
4226
4192
|
return features;
|
@@ -4563,14 +4529,14 @@ function createMotionComponent(_a) {
|
|
4563
4529
|
useProjection(projectionId, props, context.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
|
4564
4530
|
features = useFeatures(props, context.visualElement, preloadedFeatures);
|
4565
4531
|
}
|
4566
|
-
return
|
4532
|
+
return React11.createElement(
|
4567
4533
|
VisualElementHandler,
|
4568
4534
|
{ visualElement: context.visualElement, props: __assign2(__assign2({}, config2), props) },
|
4569
4535
|
features,
|
4570
|
-
|
4536
|
+
React11.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config2.isStatic, context.visualElement))
|
4571
4537
|
);
|
4572
4538
|
}
|
4573
|
-
return
|
4539
|
+
return forwardRef10(MotionComponent);
|
4574
4540
|
}
|
4575
4541
|
function useLayoutId(_a) {
|
4576
4542
|
var _b;
|
@@ -10801,7 +10767,7 @@ var motion = /* @__PURE__ */ createMotionProxy(function(Component, config2) {
|
|
10801
10767
|
|
10802
10768
|
// ../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
|
10803
10769
|
import { __read as __read20, __spreadArray as __spreadArray8 } from "tslib";
|
10804
|
-
import * as
|
10770
|
+
import * as React13 from "react";
|
10805
10771
|
import { useContext as useContext13, useRef as useRef8, cloneElement, Children, isValidElement } from "react";
|
10806
10772
|
|
10807
10773
|
// ../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-force-update.mjs
|
@@ -10836,7 +10802,7 @@ function useForceUpdate() {
|
|
10836
10802
|
|
10837
10803
|
// ../../node_modules/.pnpm/framer-motion@6.5.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs
|
10838
10804
|
import { __values } from "tslib";
|
10839
|
-
import * as
|
10805
|
+
import * as React12 from "react";
|
10840
10806
|
import { useMemo as useMemo6 } from "react";
|
10841
10807
|
var PresenceChild = function(_a) {
|
10842
10808
|
var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;
|
@@ -10889,10 +10855,10 @@ var PresenceChild = function(_a) {
|
|
10889
10855
|
return presenceChildren.set(key, false);
|
10890
10856
|
});
|
10891
10857
|
}, [isPresent]);
|
10892
|
-
|
10858
|
+
React12.useEffect(function() {
|
10893
10859
|
!isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());
|
10894
10860
|
}, [isPresent]);
|
10895
|
-
return
|
10861
|
+
return React12.createElement(PresenceContext.Provider, { value: context }, children);
|
10896
10862
|
};
|
10897
10863
|
function newChildrenMap() {
|
10898
10864
|
return /* @__PURE__ */ new Map();
|
@@ -10940,8 +10906,8 @@ var AnimatePresence = function(_a) {
|
|
10940
10906
|
exiting.clear();
|
10941
10907
|
});
|
10942
10908
|
if (isInitialRender.current) {
|
10943
|
-
return
|
10944
|
-
return
|
10909
|
+
return React13.createElement(React13.Fragment, null, childrenToRender.map(function(child) {
|
10910
|
+
return React13.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? void 0 : false, presenceAffectsLayout }, child);
|
10945
10911
|
}));
|
10946
10912
|
}
|
10947
10913
|
childrenToRender = __spreadArray8([], __read20(childrenToRender), false);
|
@@ -10979,35 +10945,36 @@ var AnimatePresence = function(_a) {
|
|
10979
10945
|
onExitComplete && onExitComplete();
|
10980
10946
|
}
|
10981
10947
|
};
|
10982
|
-
childrenToRender.splice(insertionIndex, 0,
|
10948
|
+
childrenToRender.splice(insertionIndex, 0, React13.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom, presenceAffectsLayout }, child));
|
10983
10949
|
});
|
10984
10950
|
childrenToRender = childrenToRender.map(function(child) {
|
10985
10951
|
var key2 = child.key;
|
10986
|
-
return exiting.has(key2) ? child :
|
10952
|
+
return exiting.has(key2) ? child : React13.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout }, child);
|
10987
10953
|
});
|
10988
10954
|
if (env !== "production" && exitBeforeEnter && childrenToRender.length > 1) {
|
10989
10955
|
console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.");
|
10990
10956
|
}
|
10991
|
-
return
|
10957
|
+
return React13.createElement(React13.Fragment, null, exiting.size ? childrenToRender : childrenToRender.map(function(child) {
|
10992
10958
|
return cloneElement(child);
|
10993
10959
|
}));
|
10994
10960
|
};
|
10995
10961
|
|
10996
10962
|
// src/components/sidebar/components/sidebar.tsx
|
10997
|
-
import { jsx as
|
10963
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
10998
10964
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
10999
|
-
|
10965
|
+
const { width = "220px" } = props;
|
10966
|
+
return /* @__PURE__ */ jsx57(
|
11000
10967
|
Flex12,
|
11001
10968
|
{
|
11002
10969
|
position: "relative",
|
11003
10970
|
as: motion.div,
|
11004
|
-
w:
|
10971
|
+
w: width,
|
11005
10972
|
bg: "pureWhite",
|
11006
10973
|
h: props.h,
|
11007
10974
|
flexDirection: "column",
|
11008
10975
|
overflow: "hidden",
|
11009
10976
|
shadow: "raised",
|
11010
|
-
animate: { width: isCollapse ? "62px" :
|
10977
|
+
animate: { width: isCollapse ? "62px" : width },
|
11011
10978
|
transition: "10ms linear",
|
11012
10979
|
...props,
|
11013
10980
|
children
|
@@ -11019,9 +10986,9 @@ Sidebar.displayName = "Sidebar";
|
|
11019
10986
|
// src/components/sidebar/components/sidebar-header.tsx
|
11020
10987
|
import { Box as Box27, Flex as Flex13, Text as Text16 } from "@chakra-ui/react";
|
11021
10988
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
11022
|
-
import { jsx as
|
10989
|
+
import { jsx as jsx58, jsxs as jsxs24 } from "react/jsx-runtime";
|
11023
10990
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
11024
|
-
return /* @__PURE__ */
|
10991
|
+
return /* @__PURE__ */ jsx58(
|
11025
10992
|
Box27,
|
11026
10993
|
{
|
11027
10994
|
px: "2",
|
@@ -11041,7 +11008,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
11041
11008
|
onClick: () => setCollapse(!isCollapse),
|
11042
11009
|
cursor: "pointer",
|
11043
11010
|
children: [
|
11044
|
-
/* @__PURE__ */
|
11011
|
+
/* @__PURE__ */ jsx58(
|
11045
11012
|
Box27,
|
11046
11013
|
{
|
11047
11014
|
as: motion.div,
|
@@ -11050,10 +11017,10 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
11050
11017
|
transition: "ease-in-out",
|
11051
11018
|
transitionDuration: "1ms",
|
11052
11019
|
"aria-label": "toggle sidebar",
|
11053
|
-
children: /* @__PURE__ */
|
11020
|
+
children: /* @__PURE__ */ jsx58(ArrowRight, { size: 4, color: "inherit" })
|
11054
11021
|
}
|
11055
11022
|
),
|
11056
|
-
/* @__PURE__ */
|
11023
|
+
/* @__PURE__ */ jsx58(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx58(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx58(
|
11057
11024
|
Text16,
|
11058
11025
|
{
|
11059
11026
|
as: motion.div,
|
@@ -11064,6 +11031,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
11064
11031
|
animate: { opacity: 1, x: 0 },
|
11065
11032
|
exit: { opacity: 0, x: 16 },
|
11066
11033
|
transition: "10ms linear",
|
11034
|
+
userSelect: "none",
|
11067
11035
|
children: title
|
11068
11036
|
}
|
11069
11037
|
) }) })
|
@@ -11094,21 +11062,21 @@ import {
|
|
11094
11062
|
Text as Text17
|
11095
11063
|
} from "@chakra-ui/react";
|
11096
11064
|
import * as Icon7 from "@ctlyst.id/internal-icon";
|
11097
|
-
import { Fragment as
|
11065
|
+
import { Fragment as Fragment9, jsx as jsx59, jsxs as jsxs25 } from "react/jsx-runtime";
|
11098
11066
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
11099
|
-
return /* @__PURE__ */
|
11067
|
+
return /* @__PURE__ */ jsx59(Box28, { as: motion.div, animate: { padding: isCollapse ? "8px 16px" : "8px" }, children: /* @__PURE__ */ jsx59(Accordion2, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
11100
11068
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
11101
|
-
return /* @__PURE__ */
|
11069
|
+
return /* @__PURE__ */ jsx59(AccordionItem2, { mt: "4", children: ({ isExpanded }) => {
|
11102
11070
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
11103
11071
|
const noChild = !item.children.length;
|
11104
11072
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
11105
|
-
return /* @__PURE__ */ jsxs25(
|
11106
|
-
/* @__PURE__ */
|
11073
|
+
return /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
11074
|
+
/* @__PURE__ */ jsx59(Popover5, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
11107
11075
|
const activeOption = isOpen ? "primary.50" : "white";
|
11108
11076
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
11109
11077
|
const activeParent = isActive ? backgroundColor : activeOption;
|
11110
|
-
return /* @__PURE__ */ jsxs25(
|
11111
|
-
/* @__PURE__ */
|
11078
|
+
return /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
11079
|
+
/* @__PURE__ */ jsx59(PopoverTrigger5, { children: /* @__PURE__ */ jsx59(
|
11112
11080
|
AccordionButton2,
|
11113
11081
|
{
|
11114
11082
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
@@ -11126,7 +11094,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11126
11094
|
position: "relative",
|
11127
11095
|
...itemStyles,
|
11128
11096
|
children: [
|
11129
|
-
mappingIcon2 && /* @__PURE__ */
|
11097
|
+
mappingIcon2 && /* @__PURE__ */ jsx59(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11130
11098
|
!isCollapse && /* @__PURE__ */ jsxs25(
|
11131
11099
|
Box28,
|
11132
11100
|
{
|
@@ -11141,15 +11109,15 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11141
11109
|
animate: { opacity: 1, x: 0 },
|
11142
11110
|
exit: { opacity: 0, x: 16 },
|
11143
11111
|
children: [
|
11144
|
-
/* @__PURE__ */
|
11145
|
-
!!item.children.length && /* @__PURE__ */
|
11112
|
+
/* @__PURE__ */ jsx59(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx59(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
11113
|
+
!!item.children.length && /* @__PURE__ */ jsx59(
|
11146
11114
|
Box28,
|
11147
11115
|
{
|
11148
11116
|
display: "flex",
|
11149
11117
|
boxSize: "3",
|
11150
11118
|
as: motion.div,
|
11151
11119
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
11152
|
-
children: /* @__PURE__ */
|
11120
|
+
children: /* @__PURE__ */ jsx59(Icon7.ChevronDown, { size: 3 })
|
11153
11121
|
}
|
11154
11122
|
)
|
11155
11123
|
]
|
@@ -11162,12 +11130,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11162
11130
|
},
|
11163
11131
|
item.id
|
11164
11132
|
) }, item.id),
|
11165
|
-
isOpenOptions && /* @__PURE__ */
|
11166
|
-
/* @__PURE__ */
|
11133
|
+
isOpenOptions && /* @__PURE__ */ jsx59(Portal3, { children: item.children.length > 0 ? /* @__PURE__ */ jsxs25(PopoverContent5, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
11134
|
+
/* @__PURE__ */ jsx59(PopoverHeader2, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ jsxs25(Box28, { display: "flex", alignItems: "center", children: [
|
11167
11135
|
mappingIcon2.get(item.icon || ""),
|
11168
|
-
/* @__PURE__ */
|
11136
|
+
/* @__PURE__ */ jsx59(Box28, { as: "span", ml: "2", children: item.title })
|
11169
11137
|
] }) }),
|
11170
|
-
!!item.children.length && /* @__PURE__ */
|
11138
|
+
!!item.children.length && /* @__PURE__ */ jsx59(PopoverBody3, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx59(
|
11171
11139
|
NavItem,
|
11172
11140
|
{
|
11173
11141
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -11183,7 +11151,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11183
11151
|
},
|
11184
11152
|
submenu.id
|
11185
11153
|
)) })
|
11186
|
-
] }) : isCollapse && /* @__PURE__ */
|
11154
|
+
] }) : isCollapse && /* @__PURE__ */ jsx59(PopoverContent5, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx59(PopoverBody3, { py: "1", px: "0", children: /* @__PURE__ */ jsxs25(
|
11187
11155
|
NavItem,
|
11188
11156
|
{
|
11189
11157
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -11196,15 +11164,15 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11196
11164
|
rounded: "none",
|
11197
11165
|
...itemStyles,
|
11198
11166
|
children: [
|
11199
|
-
mappingIcon2 && /* @__PURE__ */
|
11200
|
-
/* @__PURE__ */
|
11167
|
+
mappingIcon2 && /* @__PURE__ */ jsx59(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11168
|
+
/* @__PURE__ */ jsx59(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx59(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
11201
11169
|
]
|
11202
11170
|
},
|
11203
11171
|
item.id
|
11204
11172
|
) }) }) })
|
11205
11173
|
] });
|
11206
11174
|
} }, item.id),
|
11207
|
-
!isCollapse && /* @__PURE__ */
|
11175
|
+
!isCollapse && /* @__PURE__ */ jsx59(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx59(
|
11208
11176
|
NavItem,
|
11209
11177
|
{
|
11210
11178
|
mt: "1",
|
@@ -11228,12 +11196,12 @@ SidebarMenu.defaultProps = {
|
|
11228
11196
|
};
|
11229
11197
|
|
11230
11198
|
// src/components/switch/components/switch.tsx
|
11231
|
-
import { chakra as chakra6, Flex as Flex14, forwardRef as
|
11199
|
+
import { chakra as chakra6, Flex as Flex14, forwardRef as forwardRef11, omitThemingProps as omitThemingProps2, useCheckbox as useCheckbox3, useMultiStyleConfig as useMultiStyleConfig2 } from "@chakra-ui/react";
|
11232
11200
|
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
11233
11201
|
import { Check as Check2, Close as Close4 } from "@ctlyst.id/internal-icon";
|
11234
11202
|
import { useMemo as useMemo7 } from "react";
|
11235
|
-
import { jsx as
|
11236
|
-
var Switch =
|
11203
|
+
import { jsx as jsx60, jsxs as jsxs26 } from "react/jsx-runtime";
|
11204
|
+
var Switch = forwardRef11(function Switch2(props, ref) {
|
11237
11205
|
const styles = useMultiStyleConfig2("Switch", props);
|
11238
11206
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
11239
11207
|
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = useCheckbox3(ownProps);
|
@@ -11284,13 +11252,13 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11284
11252
|
className: cx10("chakra-switch", props.className),
|
11285
11253
|
__css: containerStyles,
|
11286
11254
|
children: [
|
11287
|
-
/* @__PURE__ */
|
11255
|
+
/* @__PURE__ */ jsx60("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
11288
11256
|
/* @__PURE__ */ jsxs26(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
11289
11257
|
/* @__PURE__ */ jsxs26(Flex14, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
11290
|
-
/* @__PURE__ */
|
11291
|
-
/* @__PURE__ */
|
11258
|
+
/* @__PURE__ */ jsx60(Check2, { color: "white", size: getIconSize(props.size) }),
|
11259
|
+
/* @__PURE__ */ jsx60(Close4, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
11292
11260
|
] }),
|
11293
|
-
/* @__PURE__ */
|
11261
|
+
/* @__PURE__ */ jsx60(
|
11294
11262
|
chakra6.span,
|
11295
11263
|
{
|
11296
11264
|
__css: styles.thumb,
|
@@ -11300,7 +11268,7 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11300
11268
|
}
|
11301
11269
|
)
|
11302
11270
|
] }),
|
11303
|
-
children && /* @__PURE__ */
|
11271
|
+
children && /* @__PURE__ */ jsx60(
|
11304
11272
|
chakra6.span,
|
11305
11273
|
{
|
11306
11274
|
className: "chakra-switch__label",
|
@@ -11337,14 +11305,14 @@ import {
|
|
11337
11305
|
} from "@chakra-ui/react";
|
11338
11306
|
|
11339
11307
|
// src/components/tabs/components/tab.tsx
|
11340
|
-
import { Button as Button6, Flex as Flex15, forwardRef as
|
11341
|
-
import { jsx as
|
11342
|
-
var Tab =
|
11308
|
+
import { Button as Button6, Flex as Flex15, forwardRef as forwardRef12, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
11309
|
+
import { jsx as jsx61, jsxs as jsxs27 } from "react/jsx-runtime";
|
11310
|
+
var Tab = forwardRef12((props, ref) => {
|
11343
11311
|
var _a, _b;
|
11344
11312
|
const tabProps = useTab({ ...props, ref });
|
11345
11313
|
const isSelected = !!tabProps["aria-selected"];
|
11346
11314
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
11347
|
-
return /* @__PURE__ */
|
11315
|
+
return /* @__PURE__ */ jsx61(
|
11348
11316
|
Button6,
|
11349
11317
|
{
|
11350
11318
|
"data-test-id": props["data-test-id"],
|
@@ -11424,9 +11392,9 @@ import { Bounce, toast } from "react-toastify";
|
|
11424
11392
|
|
11425
11393
|
// src/components/toast/components/styles.tsx
|
11426
11394
|
import { Global as Global2 } from "@emotion/react";
|
11427
|
-
import { jsx as
|
11395
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
11428
11396
|
var Styles2 = () => {
|
11429
|
-
return /* @__PURE__ */
|
11397
|
+
return /* @__PURE__ */ jsx62(
|
11430
11398
|
Global2,
|
11431
11399
|
{
|
11432
11400
|
styles: `
|
@@ -11458,7 +11426,7 @@ var Styles2 = () => {
|
|
11458
11426
|
var styles_default2 = Styles2;
|
11459
11427
|
|
11460
11428
|
// src/components/toast/components/toast.tsx
|
11461
|
-
import { Fragment as
|
11429
|
+
import { Fragment as Fragment10, jsx as jsx63, jsxs as jsxs28 } from "react/jsx-runtime";
|
11462
11430
|
var DEFAULT_OPTIONS = {
|
11463
11431
|
position: "top-right",
|
11464
11432
|
autoClose: 5e3,
|
@@ -11489,14 +11457,14 @@ var useToast = () => {
|
|
11489
11457
|
"success.500"
|
11490
11458
|
]);
|
11491
11459
|
const content = (icon, message, link) => {
|
11492
|
-
return /* @__PURE__ */ jsxs28(
|
11493
|
-
/* @__PURE__ */
|
11460
|
+
return /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
11461
|
+
/* @__PURE__ */ jsx63(styles_default2, {}),
|
11494
11462
|
/* @__PURE__ */ jsxs28(Flex16, { justifyContent: "space-between", alignItems: "center", gap: 4, children: [
|
11495
11463
|
/* @__PURE__ */ jsxs28(Flex16, { alignItems: "center", children: [
|
11496
|
-
icon && /* @__PURE__ */
|
11497
|
-
/* @__PURE__ */
|
11464
|
+
icon && /* @__PURE__ */ jsx63(chakra7.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
11465
|
+
/* @__PURE__ */ jsx63(chakra7.span, { noOfLines: 2, children: message })
|
11498
11466
|
] }),
|
11499
|
-
link && /* @__PURE__ */
|
11467
|
+
link && /* @__PURE__ */ jsx63(
|
11500
11468
|
Link6,
|
11501
11469
|
{
|
11502
11470
|
href: link.url,
|
@@ -11584,17 +11552,17 @@ import {
|
|
11584
11552
|
Portal as Portal4,
|
11585
11553
|
Tooltip as ChakraTooltip
|
11586
11554
|
} from "@chakra-ui/react";
|
11587
|
-
import { jsx as
|
11555
|
+
import { jsx as jsx64, jsxs as jsxs29 } from "react/jsx-runtime";
|
11588
11556
|
var Tooltip = (props) => {
|
11589
11557
|
const { children, bg = "neutral.700", textStyle = "text.sm", color: color2 = "white" } = props;
|
11590
11558
|
const content = /* @__PURE__ */ jsxs29(PopoverContent6, { border: "none", bg, textStyle, borderRadius: props.borderRadius, children: [
|
11591
|
-
props.hasArrow && /* @__PURE__ */
|
11592
|
-
/* @__PURE__ */
|
11559
|
+
props.hasArrow && /* @__PURE__ */ jsx64(PopoverArrow3, { color: color2, bg }),
|
11560
|
+
/* @__PURE__ */ jsx64(PopoverBody4, { color: color2, ...props, children: props.label })
|
11593
11561
|
] });
|
11594
11562
|
return props.isInteractive === true ? /* @__PURE__ */ jsxs29(Popover6, { trigger: "hover", placement: props.placement, children: [
|
11595
|
-
/* @__PURE__ */
|
11596
|
-
props.portal ? /* @__PURE__ */
|
11597
|
-
] }) : /* @__PURE__ */
|
11563
|
+
/* @__PURE__ */ jsx64(PopoverTrigger6, { children }),
|
11564
|
+
props.portal ? /* @__PURE__ */ jsx64(Portal4, { children: content }) : content
|
11565
|
+
] }) : /* @__PURE__ */ jsx64(ChakraTooltip, { ...props, children });
|
11598
11566
|
};
|
11599
11567
|
|
11600
11568
|
// src/components/uploader/components/uploader.tsx
|
@@ -11642,7 +11610,7 @@ var concatList = (list) => {
|
|
11642
11610
|
var formatValidationMessage = (extension) => `Foto harus dalam format ${concatList(extension.map((ext) => `.${ext}`))}.`;
|
11643
11611
|
|
11644
11612
|
// src/components/uploader/components/uploader.tsx
|
11645
|
-
import { Fragment as
|
11613
|
+
import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs30 } from "react/jsx-runtime";
|
11646
11614
|
import { createElement as createElement6 } from "react";
|
11647
11615
|
var Uploader = ({
|
11648
11616
|
onHandleUploadFile,
|
@@ -11731,11 +11699,11 @@ var Uploader = ({
|
|
11731
11699
|
});
|
11732
11700
|
const renderHelperText = () => {
|
11733
11701
|
if (Array.isArray(helperText)) {
|
11734
|
-
return /* @__PURE__ */
|
11702
|
+
return /* @__PURE__ */ jsx65(UnorderedList2, { pl: 2, fontSize: 12, color: "gray.600", "data-test-id": "CT_component_base-image-uploader_helperText", children: helperText.map((text2) => /* @__PURE__ */ jsx65(ListItem2, { children: text2 }, text2)) });
|
11735
11703
|
}
|
11736
11704
|
return helperText;
|
11737
11705
|
};
|
11738
|
-
const renderErrorText = (text2) => /* @__PURE__ */
|
11706
|
+
const renderErrorText = (text2) => /* @__PURE__ */ jsx65(Box29, { mb: 2, children: /* @__PURE__ */ jsx65(Text19, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
11739
11707
|
const handleRemove = (e) => {
|
11740
11708
|
e.stopPropagation();
|
11741
11709
|
setFilePreview(void 0);
|
@@ -11761,8 +11729,8 @@ var Uploader = ({
|
|
11761
11729
|
return /* @__PURE__ */ jsxs30(FormControl4, { isRequired, children: [
|
11762
11730
|
label && typeof label === "string" ? (
|
11763
11731
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
11764
|
-
/* @__PURE__ */ jsxs30(FormLabel4, { requiredIndicator: /* @__PURE__ */
|
11765
|
-
isRequired && /* @__PURE__ */
|
11732
|
+
/* @__PURE__ */ jsxs30(FormLabel4, { requiredIndicator: /* @__PURE__ */ jsx65(Fragment11, {}), fontSize: "text.sm", children: [
|
11733
|
+
isRequired && /* @__PURE__ */ jsx65(RequiredIndicator2, { mr: 1, ml: 0 }),
|
11766
11734
|
label
|
11767
11735
|
] })
|
11768
11736
|
) : label,
|
@@ -11784,7 +11752,7 @@ var Uploader = ({
|
|
11784
11752
|
...props,
|
11785
11753
|
...getRootProps(),
|
11786
11754
|
children: [
|
11787
|
-
filePreview && isShowCloseButton && /* @__PURE__ */
|
11755
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ jsx65(Box29, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ jsx65(
|
11788
11756
|
Button7,
|
11789
11757
|
{
|
11790
11758
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
@@ -11799,17 +11767,17 @@ var Uploader = ({
|
|
11799
11767
|
border: "none",
|
11800
11768
|
zIndex: 1,
|
11801
11769
|
onClick: handleRemove,
|
11802
|
-
children: /* @__PURE__ */
|
11770
|
+
children: /* @__PURE__ */ jsx65(X, { size: 3, color: "white" })
|
11803
11771
|
}
|
11804
11772
|
) }),
|
11805
|
-
filePreview && /* @__PURE__ */
|
11773
|
+
filePreview && /* @__PURE__ */ jsx65(Box29, { w: "full", children: /* @__PURE__ */ jsx65(
|
11806
11774
|
Flex17,
|
11807
11775
|
{
|
11808
11776
|
position: "relative",
|
11809
11777
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
11810
11778
|
justify: "center",
|
11811
11779
|
align: "center",
|
11812
|
-
children: /* @__PURE__ */
|
11780
|
+
children: /* @__PURE__ */ jsx65(
|
11813
11781
|
ChakraImage,
|
11814
11782
|
{
|
11815
11783
|
h: size2 === "lg" ? "120" : "100",
|
@@ -11820,18 +11788,18 @@ var Uploader = ({
|
|
11820
11788
|
)
|
11821
11789
|
}
|
11822
11790
|
) }),
|
11823
|
-
!filePreview && /* @__PURE__ */ jsxs30(
|
11824
|
-
/* @__PURE__ */
|
11791
|
+
!filePreview && /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
11792
|
+
/* @__PURE__ */ jsx65(
|
11825
11793
|
"input",
|
11826
11794
|
{
|
11827
11795
|
"data-test-id": `CT_component_base-image-uploader_input-file${testId ? `_${testId}` : ""}`,
|
11828
11796
|
...getInputProps()
|
11829
11797
|
}
|
11830
11798
|
),
|
11831
|
-
isDragActive2 ? /* @__PURE__ */
|
11832
|
-
size2 === "sm" && /* @__PURE__ */
|
11799
|
+
isDragActive2 ? /* @__PURE__ */ jsx65(Text19, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs30(Flex17, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color2, children: [
|
11800
|
+
size2 === "sm" && /* @__PURE__ */ jsx65(Plus, { size: 6, color: color2 }),
|
11833
11801
|
/* @__PURE__ */ jsxs30(Box29, { children: [
|
11834
|
-
!filePreview && /* @__PURE__ */
|
11802
|
+
!filePreview && /* @__PURE__ */ jsx65(
|
11835
11803
|
Heading2,
|
11836
11804
|
{
|
11837
11805
|
fontWeight: "400",
|
@@ -11841,7 +11809,7 @@ var Uploader = ({
|
|
11841
11809
|
children: uploadFileText && size2 === "lg" ? messages.uploadFile : "Upload"
|
11842
11810
|
}
|
11843
11811
|
),
|
11844
|
-
size2 === "lg" && /* @__PURE__ */
|
11812
|
+
size2 === "lg" && /* @__PURE__ */ jsx65(Text19, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
11845
11813
|
] })
|
11846
11814
|
] })
|
11847
11815
|
] })
|
@@ -11859,7 +11827,7 @@ var Uploader = ({
|
|
11859
11827
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
11860
11828
|
}
|
11861
11829
|
),
|
11862
|
-
isShowReupload && /* @__PURE__ */
|
11830
|
+
isShowReupload && /* @__PURE__ */ jsx65(
|
11863
11831
|
Button7,
|
11864
11832
|
{
|
11865
11833
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
@@ -12252,7 +12220,7 @@ var Button8 = defineStyleConfig({
|
|
12252
12220
|
fontSize: "text.md",
|
12253
12221
|
h: 9,
|
12254
12222
|
px: 3,
|
12255
|
-
py:
|
12223
|
+
py: 2
|
12256
12224
|
};
|
12257
12225
|
const icon = {
|
12258
12226
|
h: 9,
|
@@ -12435,6 +12403,10 @@ var Button8 = defineStyleConfig({
|
|
12435
12403
|
}
|
12436
12404
|
}
|
12437
12405
|
},
|
12406
|
+
outline: {
|
12407
|
+
bg: "transparent",
|
12408
|
+
color: "primary.500"
|
12409
|
+
},
|
12438
12410
|
icon: {
|
12439
12411
|
bg: "neutral.50",
|
12440
12412
|
minW: 0,
|
@@ -12909,36 +12881,88 @@ var LoaderStyle = defineStyleConfig4({
|
|
12909
12881
|
var loader_default2 = LoaderStyle;
|
12910
12882
|
|
12911
12883
|
// src/config/theme/components/modal.ts
|
12912
|
-
import {
|
12913
|
-
|
12914
|
-
|
12915
|
-
|
12916
|
-
|
12917
|
-
|
12884
|
+
import { modalAnatomy as parts4 } from "@chakra-ui/anatomy";
|
12885
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers6, defineStyle as defineStyle4 } from "@chakra-ui/styled-system";
|
12886
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig6, definePartsStyle: definePartsStyle6 } = createMultiStyleConfigHelpers6(parts4.keys);
|
12887
|
+
var baseStyleHeader = defineStyle4({
|
12888
|
+
borderTopRadius: "sm",
|
12889
|
+
bg: "neutral.200",
|
12890
|
+
px: 4,
|
12891
|
+
py: 2,
|
12892
|
+
fontSize: "text.lg",
|
12893
|
+
fontWeight: "normal",
|
12894
|
+
lineHeight: 24,
|
12895
|
+
textStyle: "text.lg"
|
12896
|
+
});
|
12897
|
+
var baseStyleCloseButton = defineStyle4({
|
12898
|
+
p: 1,
|
12899
|
+
top: 2,
|
12900
|
+
right: 2,
|
12901
|
+
bg: "white",
|
12902
|
+
fontSize: "9px",
|
12903
|
+
w: 6,
|
12904
|
+
h: 6,
|
12905
|
+
borderRadius: "sm"
|
12906
|
+
});
|
12907
|
+
var baseStyleBody = defineStyle4({
|
12908
|
+
bg: "white",
|
12909
|
+
p: 4
|
12910
|
+
});
|
12911
|
+
var baseStyleFooter = defineStyle4({
|
12912
|
+
p: 4,
|
12913
|
+
bg: "neutral.200",
|
12914
|
+
borderBottomRadius: "sm"
|
12915
|
+
});
|
12916
|
+
var baseStyle7 = definePartsStyle6({
|
12917
|
+
header: baseStyleHeader,
|
12918
|
+
closeButton: baseStyleCloseButton,
|
12919
|
+
body: baseStyleBody,
|
12920
|
+
footer: baseStyleFooter
|
12921
|
+
});
|
12922
|
+
var sizes3 = {
|
12923
|
+
sm: {
|
12924
|
+
dialog: { minW: 400 },
|
12925
|
+
closeButton: {
|
12926
|
+
size: "sm"
|
12927
|
+
}
|
12918
12928
|
},
|
12919
|
-
|
12920
|
-
|
12929
|
+
md: {
|
12930
|
+
dialog: { minW: 600 },
|
12931
|
+
closeButton: {
|
12932
|
+
size: "sm"
|
12933
|
+
}
|
12934
|
+
},
|
12935
|
+
lg: {
|
12936
|
+
dialog: { minW: 800 },
|
12937
|
+
closeButton: {
|
12938
|
+
size: "xl"
|
12939
|
+
}
|
12921
12940
|
}
|
12941
|
+
};
|
12942
|
+
var modalTheme = defineMultiStyleConfig6({
|
12943
|
+
baseStyle: baseStyle7,
|
12944
|
+
sizes: sizes3,
|
12945
|
+
defaultProps: { size: "md" }
|
12922
12946
|
});
|
12923
|
-
var modal_default =
|
12947
|
+
var modal_default = modalTheme;
|
12924
12948
|
|
12925
12949
|
// src/config/theme/components/popover.ts
|
12926
|
-
import { popoverAnatomy as
|
12927
|
-
import { createMultiStyleConfigHelpers as
|
12928
|
-
var { definePartsStyle:
|
12929
|
-
var
|
12950
|
+
import { popoverAnatomy as parts5 } from "@chakra-ui/anatomy";
|
12951
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers7 } from "@chakra-ui/react";
|
12952
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = createMultiStyleConfigHelpers7(parts5.keys);
|
12953
|
+
var baseStyle8 = definePartsStyle7({
|
12930
12954
|
content: {
|
12931
12955
|
bg: "white"
|
12932
12956
|
}
|
12933
12957
|
});
|
12934
|
-
var popoverTheme =
|
12958
|
+
var popoverTheme = defineMultiStyleConfig7({ baseStyle: baseStyle8 });
|
12935
12959
|
var popover_default = popoverTheme;
|
12936
12960
|
|
12937
12961
|
// src/config/theme/components/radio.ts
|
12938
12962
|
import { radioAnatomy } from "@chakra-ui/anatomy";
|
12939
|
-
import { createMultiStyleConfigHelpers as
|
12940
|
-
var { definePartsStyle:
|
12941
|
-
var
|
12963
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers8 } from "@chakra-ui/react";
|
12964
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = createMultiStyleConfigHelpers8(radioAnatomy.keys);
|
12965
|
+
var baseStyle9 = definePartsStyle8({
|
12942
12966
|
control: {
|
12943
12967
|
border: "1px solid",
|
12944
12968
|
width: 4,
|
@@ -12954,7 +12978,7 @@ var baseStyle8 = definePartsStyle7({
|
|
12954
12978
|
}
|
12955
12979
|
}
|
12956
12980
|
});
|
12957
|
-
var errors2 =
|
12981
|
+
var errors2 = definePartsStyle8({
|
12958
12982
|
control: {
|
12959
12983
|
borderColor: "danger.500",
|
12960
12984
|
_checked: {
|
@@ -12989,7 +13013,7 @@ var errors2 = definePartsStyle7({
|
|
12989
13013
|
textStyle: "text.sm"
|
12990
13014
|
}
|
12991
13015
|
});
|
12992
|
-
var unstyled3 =
|
13016
|
+
var unstyled3 = definePartsStyle8({
|
12993
13017
|
control: {
|
12994
13018
|
borderColor: "neutral.600",
|
12995
13019
|
_checked: {
|
@@ -13028,8 +13052,8 @@ var variants4 = {
|
|
13028
13052
|
errors: errors2,
|
13029
13053
|
unstyled: unstyled3
|
13030
13054
|
};
|
13031
|
-
var Radio2 =
|
13032
|
-
baseStyle:
|
13055
|
+
var Radio2 = defineMultiStyleConfig8({
|
13056
|
+
baseStyle: baseStyle9,
|
13033
13057
|
variants: variants4,
|
13034
13058
|
defaultProps: {
|
13035
13059
|
variant: "unstyled"
|
@@ -13038,16 +13062,16 @@ var Radio2 = defineMultiStyleConfig7({
|
|
13038
13062
|
var radio_default = Radio2;
|
13039
13063
|
|
13040
13064
|
// src/config/theme/components/switch.ts
|
13041
|
-
import { switchAnatomy as
|
13042
|
-
import { createMultiStyleConfigHelpers as
|
13065
|
+
import { switchAnatomy as parts6 } from "@chakra-ui/anatomy";
|
13066
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers9, defineStyle as defineStyle5 } from "@chakra-ui/styled-system";
|
13043
13067
|
import { calc, cssVar as cssVar2 } from "@chakra-ui/theme-tools";
|
13044
|
-
var { defineMultiStyleConfig:
|
13068
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig9, definePartsStyle: definePartsStyle9 } = createMultiStyleConfigHelpers9(parts6.keys);
|
13045
13069
|
var $width = cssVar2("switch-track-width");
|
13046
13070
|
var $height = cssVar2("switch-track-height");
|
13047
13071
|
var $diff = cssVar2("switch-track-diff");
|
13048
13072
|
var diffValue = calc.subtract($width, $height);
|
13049
13073
|
var $translateX = cssVar2("switch-thumb-x");
|
13050
|
-
var baseStyleThumb =
|
13074
|
+
var baseStyleThumb = defineStyle5({
|
13051
13075
|
bg: "white",
|
13052
13076
|
transitionProperty: "transform",
|
13053
13077
|
transitionDuration: "normal",
|
@@ -13058,7 +13082,7 @@ var baseStyleThumb = defineStyle4({
|
|
13058
13082
|
transform: `translateX(${$translateX.reference})`
|
13059
13083
|
}
|
13060
13084
|
});
|
13061
|
-
var
|
13085
|
+
var baseStyle10 = definePartsStyle9(() => ({
|
13062
13086
|
container: {
|
13063
13087
|
[$diff.variable]: diffValue,
|
13064
13088
|
[$translateX.variable]: $diff.reference,
|
@@ -13082,8 +13106,8 @@ var baseStyle9 = definePartsStyle8(() => ({
|
|
13082
13106
|
},
|
13083
13107
|
thumb: baseStyleThumb
|
13084
13108
|
}));
|
13085
|
-
var
|
13086
|
-
sm:
|
13109
|
+
var sizes4 = {
|
13110
|
+
sm: definePartsStyle9({
|
13087
13111
|
container: {
|
13088
13112
|
[$width.variable]: "1.875rem",
|
13089
13113
|
[$height.variable]: "0.8rem"
|
@@ -13093,7 +13117,7 @@ var sizes3 = {
|
|
13093
13117
|
[$height.variable]: "0.8rem"
|
13094
13118
|
}
|
13095
13119
|
}),
|
13096
|
-
md:
|
13120
|
+
md: definePartsStyle9({
|
13097
13121
|
container: {
|
13098
13122
|
[$width.variable]: "2.375rem",
|
13099
13123
|
[$height.variable]: "1rem"
|
@@ -13103,7 +13127,7 @@ var sizes3 = {
|
|
13103
13127
|
[$height.variable]: "1rem"
|
13104
13128
|
}
|
13105
13129
|
}),
|
13106
|
-
lg:
|
13130
|
+
lg: definePartsStyle9({
|
13107
13131
|
container: {
|
13108
13132
|
[$width.variable]: "3.25rem",
|
13109
13133
|
[$height.variable]: "1.375rem"
|
@@ -13114,9 +13138,9 @@ var sizes3 = {
|
|
13114
13138
|
}
|
13115
13139
|
})
|
13116
13140
|
};
|
13117
|
-
var Switch3 =
|
13118
|
-
baseStyle:
|
13119
|
-
sizes:
|
13141
|
+
var Switch3 = defineMultiStyleConfig9({
|
13142
|
+
baseStyle: baseStyle10,
|
13143
|
+
sizes: sizes4,
|
13120
13144
|
defaultProps: {
|
13121
13145
|
size: "md"
|
13122
13146
|
}
|
@@ -13124,11 +13148,11 @@ var Switch3 = defineMultiStyleConfig8({
|
|
13124
13148
|
var switch_default2 = Switch3;
|
13125
13149
|
|
13126
13150
|
// src/config/theme/components/table.ts
|
13127
|
-
import { tableAnatomy as
|
13128
|
-
import { createMultiStyleConfigHelpers as
|
13151
|
+
import { tableAnatomy as parts7 } from "@chakra-ui/anatomy";
|
13152
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers10, defineStyle as defineStyle6 } from "@chakra-ui/styled-system";
|
13129
13153
|
import { mode as mode2 } from "@chakra-ui/theme-tools";
|
13130
|
-
var { defineMultiStyleConfig:
|
13131
|
-
var
|
13154
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig10, definePartsStyle: definePartsStyle10 } = createMultiStyleConfigHelpers10(parts7.keys);
|
13155
|
+
var baseStyle11 = definePartsStyle10({
|
13132
13156
|
table: {
|
13133
13157
|
fontVariantNumeric: "lining-nums tabular-nums",
|
13134
13158
|
borderCollapse: "separate",
|
@@ -13192,12 +13216,12 @@ var baseStyle10 = definePartsStyle9({
|
|
13192
13216
|
fontWeight: "medium"
|
13193
13217
|
}
|
13194
13218
|
});
|
13195
|
-
var numericStyles =
|
13219
|
+
var numericStyles = defineStyle6({
|
13196
13220
|
"&[data-is-numeric=true]": {
|
13197
13221
|
textAlign: "end"
|
13198
13222
|
}
|
13199
13223
|
});
|
13200
|
-
var variantSimple =
|
13224
|
+
var variantSimple = definePartsStyle10((props) => {
|
13201
13225
|
const { colorScheme: c2 } = props;
|
13202
13226
|
return {
|
13203
13227
|
th: {
|
@@ -13223,7 +13247,7 @@ var variantSimple = definePartsStyle9((props) => {
|
|
13223
13247
|
}
|
13224
13248
|
};
|
13225
13249
|
});
|
13226
|
-
var variantStripe =
|
13250
|
+
var variantStripe = definePartsStyle10((props) => {
|
13227
13251
|
const { colorScheme: c2 } = props;
|
13228
13252
|
return {
|
13229
13253
|
th: {
|
@@ -13265,10 +13289,10 @@ var variantStripe = definePartsStyle9((props) => {
|
|
13265
13289
|
var variants5 = {
|
13266
13290
|
simple: variantSimple,
|
13267
13291
|
striped: variantStripe,
|
13268
|
-
unstyled:
|
13292
|
+
unstyled: defineStyle6({})
|
13269
13293
|
};
|
13270
|
-
var
|
13271
|
-
sm:
|
13294
|
+
var sizes5 = {
|
13295
|
+
sm: definePartsStyle10({
|
13272
13296
|
th: {
|
13273
13297
|
px: "2",
|
13274
13298
|
py: "4",
|
@@ -13287,7 +13311,7 @@ var sizes4 = {
|
|
13287
13311
|
fontSize: "xs"
|
13288
13312
|
}
|
13289
13313
|
}),
|
13290
|
-
md:
|
13314
|
+
md: definePartsStyle10({
|
13291
13315
|
th: {
|
13292
13316
|
px: "2",
|
13293
13317
|
py: "4",
|
@@ -13305,7 +13329,7 @@ var sizes4 = {
|
|
13305
13329
|
fontSize: "sm"
|
13306
13330
|
}
|
13307
13331
|
}),
|
13308
|
-
lg:
|
13332
|
+
lg: definePartsStyle10({
|
13309
13333
|
th: {
|
13310
13334
|
px: "2",
|
13311
13335
|
py: "4",
|
@@ -13324,10 +13348,10 @@ var sizes4 = {
|
|
13324
13348
|
}
|
13325
13349
|
})
|
13326
13350
|
};
|
13327
|
-
var tableTheme =
|
13328
|
-
baseStyle:
|
13351
|
+
var tableTheme = defineMultiStyleConfig10({
|
13352
|
+
baseStyle: baseStyle11,
|
13329
13353
|
variants: variants5,
|
13330
|
-
sizes:
|
13354
|
+
sizes: sizes5,
|
13331
13355
|
defaultProps: {
|
13332
13356
|
variant: "simple",
|
13333
13357
|
size: "md",
|
@@ -13337,10 +13361,10 @@ var tableTheme = defineMultiStyleConfig9({
|
|
13337
13361
|
var table_default = tableTheme;
|
13338
13362
|
|
13339
13363
|
// src/config/theme/components/tabs.ts
|
13340
|
-
import { tabsAnatomy as
|
13341
|
-
import { createMultiStyleConfigHelpers as
|
13342
|
-
var { defineMultiStyleConfig:
|
13343
|
-
var variantLine =
|
13364
|
+
import { tabsAnatomy as parts8 } from "@chakra-ui/anatomy";
|
13365
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers11 } from "@chakra-ui/styled-system";
|
13366
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig11, definePartsStyle: definePartsStyle11 } = createMultiStyleConfigHelpers11(parts8.keys);
|
13367
|
+
var variantLine = definePartsStyle11((props) => {
|
13344
13368
|
const { orientation } = props;
|
13345
13369
|
const isVertical = orientation === "vertical";
|
13346
13370
|
const borderProp = isVertical ? "borderStart" : "borderBottom";
|
@@ -13357,12 +13381,12 @@ var variantLine = definePartsStyle10((props) => {
|
|
13357
13381
|
}
|
13358
13382
|
};
|
13359
13383
|
});
|
13360
|
-
var variantUnstyled =
|
13384
|
+
var variantUnstyled = definePartsStyle11({});
|
13361
13385
|
var variants6 = {
|
13362
13386
|
line: variantLine,
|
13363
13387
|
unstyled: variantUnstyled
|
13364
13388
|
};
|
13365
|
-
var tabsTheme =
|
13389
|
+
var tabsTheme = defineMultiStyleConfig11({
|
13366
13390
|
variants: variants6,
|
13367
13391
|
defaultProps: {
|
13368
13392
|
size: "md",
|
@@ -13372,7 +13396,7 @@ var tabsTheme = defineMultiStyleConfig10({
|
|
13372
13396
|
var tabs_default = tabsTheme;
|
13373
13397
|
|
13374
13398
|
// src/config/theme/components/textarea.ts
|
13375
|
-
import { defineStyle as
|
13399
|
+
import { defineStyle as defineStyle7, defineStyleConfig as defineStyleConfig5 } from "@chakra-ui/react";
|
13376
13400
|
var getProps = (props) => {
|
13377
13401
|
const { isError, isSuccess, isDisabled } = props;
|
13378
13402
|
let borderColor = "neutral.400";
|
@@ -13392,7 +13416,7 @@ var getProps = (props) => {
|
|
13392
13416
|
borderColor
|
13393
13417
|
};
|
13394
13418
|
};
|
13395
|
-
var outline3 =
|
13419
|
+
var outline3 = defineStyle7((props) => {
|
13396
13420
|
const { focusBorderColor, borderColor } = getProps(props);
|
13397
13421
|
return {
|
13398
13422
|
background: "white.high",
|
@@ -13436,7 +13460,7 @@ var outline3 = defineStyle6((props) => {
|
|
13436
13460
|
}
|
13437
13461
|
};
|
13438
13462
|
});
|
13439
|
-
var Textarea =
|
13463
|
+
var Textarea = defineStyleConfig5({
|
13440
13464
|
variants: { outline: outline3 },
|
13441
13465
|
defaultProps: {
|
13442
13466
|
variant: "outline"
|
@@ -13445,15 +13469,15 @@ var Textarea = defineStyleConfig6({
|
|
13445
13469
|
var textarea_default2 = Textarea;
|
13446
13470
|
|
13447
13471
|
// src/config/theme/components/tooltip.ts
|
13448
|
-
import { cssVar as cssVar3, defineStyleConfig as
|
13472
|
+
import { cssVar as cssVar3, defineStyleConfig as defineStyleConfig6 } from "@chakra-ui/react";
|
13449
13473
|
var $arrowBg = cssVar3("popper-arrow-bg");
|
13450
|
-
var
|
13474
|
+
var baseStyle12 = {
|
13451
13475
|
bg: "neutral.700",
|
13452
13476
|
textStyle: "text.sm",
|
13453
13477
|
fontSize: "text.sm",
|
13454
13478
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
13455
13479
|
};
|
13456
|
-
var Tooltip2 =
|
13480
|
+
var Tooltip2 = defineStyleConfig6({ baseStyle: baseStyle12 });
|
13457
13481
|
var tooltip_default = Tooltip2;
|
13458
13482
|
|
13459
13483
|
// src/config/theme/themeConfiguration.ts
|
@@ -13469,12 +13493,13 @@ var getTheme = (foundations) => {
|
|
13469
13493
|
...components_exports
|
13470
13494
|
},
|
13471
13495
|
styles: {
|
13472
|
-
global: {
|
13496
|
+
global: () => ({
|
13473
13497
|
body: {
|
13498
|
+
background: "bg-default",
|
13474
13499
|
fontSize: "text.sm",
|
13475
13500
|
color: "black.high"
|
13476
13501
|
}
|
13477
|
-
}
|
13502
|
+
})
|
13478
13503
|
},
|
13479
13504
|
config
|
13480
13505
|
});
|
@@ -13505,7 +13530,7 @@ import { useMemo as useMemo9 } from "react";
|
|
13505
13530
|
import axios from "axios";
|
13506
13531
|
import { createContext as createContext8, useContext as useContext14, useEffect as useEffect13, useMemo as useMemo8, useRef as useRef10 } from "react";
|
13507
13532
|
import { ToastContainer as ToastContainer2 } from "react-toastify";
|
13508
|
-
import { jsx as
|
13533
|
+
import { jsx as jsx66, jsxs as jsxs31 } from "react/jsx-runtime";
|
13509
13534
|
var ProviderContext = createContext8({
|
13510
13535
|
instance: void 0
|
13511
13536
|
});
|
@@ -13525,7 +13550,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
13525
13550
|
}, [requestInterceptors, responseInterceptors]);
|
13526
13551
|
const provider = useMemo8(() => ({ instance: instanceRef.current }), []);
|
13527
13552
|
return /* @__PURE__ */ jsxs31(ProviderContext.Provider, { value: provider, children: [
|
13528
|
-
/* @__PURE__ */
|
13553
|
+
/* @__PURE__ */ jsx66(ToastContainer2, {}),
|
13529
13554
|
children
|
13530
13555
|
] });
|
13531
13556
|
};
|
@@ -13568,7 +13593,7 @@ import {
|
|
13568
13593
|
useBoolean,
|
13569
13594
|
useClipboard,
|
13570
13595
|
useColorMode as useColorMode8,
|
13571
|
-
useColorModeValue as
|
13596
|
+
useColorModeValue as useColorModeValue7,
|
13572
13597
|
useConst,
|
13573
13598
|
useControllableProp,
|
13574
13599
|
useControllableState,
|
@@ -13582,7 +13607,7 @@ import {
|
|
13582
13607
|
} from "@chakra-ui/react";
|
13583
13608
|
|
13584
13609
|
// src/index.ts
|
13585
|
-
import { extendTheme as extendTheme2, forwardRef as
|
13610
|
+
import { extendTheme as extendTheme2, forwardRef as forwardRef13 } from "@chakra-ui/react";
|
13586
13611
|
export {
|
13587
13612
|
Accordion,
|
13588
13613
|
AccordionButton,
|
@@ -13602,11 +13627,11 @@ export {
|
|
13602
13627
|
AlertClose,
|
13603
13628
|
AlertDescription,
|
13604
13629
|
AlertDialog,
|
13605
|
-
|
13606
|
-
|
13630
|
+
ModalBody2 as AlertDialogBody,
|
13631
|
+
ModalCloseButton as AlertDialogCloseButton,
|
13607
13632
|
AlertDialogContent,
|
13608
|
-
|
13609
|
-
|
13633
|
+
ModalFooter2 as AlertDialogFooter,
|
13634
|
+
ModalHeader2 as AlertDialogHeader,
|
13610
13635
|
ModalOverlay2 as AlertDialogOverlay,
|
13611
13636
|
AlertDialogProps,
|
13612
13637
|
AlertIcon,
|
@@ -13658,12 +13683,12 @@ export {
|
|
13658
13683
|
Divider,
|
13659
13684
|
DividerProps,
|
13660
13685
|
Drawer,
|
13661
|
-
|
13662
|
-
|
13686
|
+
ModalBody3 as DrawerBody,
|
13687
|
+
ModalCloseButton2 as DrawerCloseButton,
|
13663
13688
|
DrawerContent,
|
13664
13689
|
DrawerContentProps,
|
13665
|
-
|
13666
|
-
|
13690
|
+
ModalFooter3 as DrawerFooter,
|
13691
|
+
ModalHeader3 as DrawerHeader,
|
13667
13692
|
ModalOverlay3 as DrawerOverlay,
|
13668
13693
|
DrawerProps,
|
13669
13694
|
empty_state_default as EmptyState,
|
@@ -13724,16 +13749,16 @@ export {
|
|
13724
13749
|
navigation_default as MainMenu,
|
13725
13750
|
Modal2 as Modal,
|
13726
13751
|
modal_back_button_default as ModalBackButton,
|
13727
|
-
|
13752
|
+
ModalBody4 as ModalBody,
|
13728
13753
|
ModalBodyProps,
|
13729
|
-
|
13754
|
+
ModalCloseButton3 as ModalCloseButton,
|
13730
13755
|
ModalContent2 as ModalContent,
|
13731
13756
|
ModalContentProps,
|
13732
13757
|
ModalContextProvider,
|
13733
13758
|
ModalFocusScope,
|
13734
|
-
|
13759
|
+
ModalFooter4 as ModalFooter,
|
13735
13760
|
ModalFooterProps,
|
13736
|
-
|
13761
|
+
ModalHeader4 as ModalHeader,
|
13737
13762
|
ModalHeaderProps,
|
13738
13763
|
ModalOverlay4 as ModalOverlay,
|
13739
13764
|
ModalOverlayProps,
|
@@ -13746,6 +13771,13 @@ export {
|
|
13746
13771
|
pagination_default as Pagination,
|
13747
13772
|
pagination_detail_default as PaginationDetail,
|
13748
13773
|
pagination_filter_default as PaginationFilter,
|
13774
|
+
PinInput,
|
13775
|
+
PinInputContext,
|
13776
|
+
PinInputDescendantsProvider,
|
13777
|
+
PinInputField,
|
13778
|
+
PinInputFieldProps,
|
13779
|
+
PinInputProps,
|
13780
|
+
PinInputProvider,
|
13749
13781
|
Popover4 as Popover,
|
13750
13782
|
PopoverAnchor,
|
13751
13783
|
PopoverArrow2 as PopoverArrow,
|
@@ -13764,6 +13796,12 @@ export {
|
|
13764
13796
|
Portal2 as Portal,
|
13765
13797
|
PortalProps,
|
13766
13798
|
Profile,
|
13799
|
+
Progress,
|
13800
|
+
ProgressFilledTrackProps,
|
13801
|
+
ProgressLabel,
|
13802
|
+
ProgressLabelProps,
|
13803
|
+
ProgressProps,
|
13804
|
+
ProgressTrackProps,
|
13767
13805
|
provider_default as Provider,
|
13768
13806
|
ProviderContext,
|
13769
13807
|
Radio,
|
@@ -13851,6 +13889,9 @@ export {
|
|
13851
13889
|
UseMediaQueryOptions,
|
13852
13890
|
UseModalProps,
|
13853
13891
|
UseModalReturn,
|
13892
|
+
UsePinInputFieldProps,
|
13893
|
+
UsePinInputProps,
|
13894
|
+
UsePinInputReturn,
|
13854
13895
|
UseQueryProps,
|
13855
13896
|
UseRadioGroupReturn,
|
13856
13897
|
UseRadioProps,
|
@@ -13873,7 +13914,7 @@ export {
|
|
13873
13914
|
WrapProps,
|
13874
13915
|
XMSLogo,
|
13875
13916
|
extendTheme2 as extendTheme,
|
13876
|
-
|
13917
|
+
forwardRef13 as forwardRef,
|
13877
13918
|
getSelectAllCheckboxState,
|
13878
13919
|
getTheme,
|
13879
13920
|
theme4 as theme,
|
@@ -13890,7 +13931,7 @@ export {
|
|
13890
13931
|
useClipboard,
|
13891
13932
|
useColorMode8 as useColorMode,
|
13892
13933
|
useColorModePreference,
|
13893
|
-
|
13934
|
+
useColorModeValue7 as useColorModeValue,
|
13894
13935
|
useConst,
|
13895
13936
|
useControllableProp,
|
13896
13937
|
useControllableState,
|
@@ -13906,6 +13947,10 @@ export {
|
|
13906
13947
|
useModalContext,
|
13907
13948
|
useModalStyles,
|
13908
13949
|
useOutsideClick,
|
13950
|
+
usePinInput,
|
13951
|
+
usePinInputContext,
|
13952
|
+
usePinInputField,
|
13953
|
+
useProgressStyles,
|
13909
13954
|
useQuery,
|
13910
13955
|
useRadio,
|
13911
13956
|
useRadioGroup,
|