@ctlyst.id/internal-ui 2.3.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +50 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +202 -41
- package/dist/index.d.ts +202 -41
- package/dist/index.js +1749 -1330
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1493 -1062
- package/dist/index.mjs.map +1 -1
- package/dist/poppins-latin-400-normal-SFWTNBQB.woff2 +0 -0
- package/dist/poppins-latin-400-normal-ZPTYLX7I.woff +0 -0
- package/dist/poppins-latin-ext-400-normal-7PFKV6Y5.woff +0 -0
- package/dist/poppins-latin-ext-400-normal-K3FV5HAI.woff2 +0 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -65,9 +65,9 @@ var AccordionEye = ({ position = "left" }) => {
|
|
65
65
|
return /* @__PURE__ */ jsx(
|
66
66
|
Box,
|
67
67
|
{
|
68
|
+
boxSize: 4,
|
68
69
|
className: "eye-icon",
|
69
|
-
|
70
|
-
...position === "right" ? { position: "absolute", right: 4, zIndex: 2 } : {},
|
70
|
+
...position === "right" ? { position: "relative", zIndex: 2, display: "none" } : {},
|
71
71
|
children: /* @__PURE__ */ jsx(Eye, { size: 4 })
|
72
72
|
}
|
73
73
|
);
|
@@ -245,6 +245,7 @@ function AlertAction({ children, className }) {
|
|
245
245
|
className: cx2("chakra-alert__action", className),
|
246
246
|
variant: "link",
|
247
247
|
fontWeight: "semibold",
|
248
|
+
textStyle: "text.xs",
|
248
249
|
__css: css4,
|
249
250
|
children
|
250
251
|
}
|
@@ -344,14 +345,15 @@ AlertTitle.displayName = "AlertTitle";
|
|
344
345
|
// src/components/anchor/components/anchor.tsx
|
345
346
|
import { Link } from "@chakra-ui/react";
|
346
347
|
import { cx as cx7 } from "@chakra-ui/shared-utils";
|
347
|
-
import {
|
348
|
-
var Anchor = ({ children,
|
349
|
-
return /* @__PURE__ */
|
348
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
349
|
+
var Anchor = ({ children, isActive, isChild, ...props }) => {
|
350
|
+
return /* @__PURE__ */ jsx12(
|
350
351
|
Link,
|
351
352
|
{
|
352
353
|
display: "inline-block",
|
353
354
|
w: "full",
|
354
355
|
p: "4",
|
356
|
+
textStyle: "text.md",
|
355
357
|
pl: isChild ? "10" : "4",
|
356
358
|
borderLeft: "1px solid",
|
357
359
|
borderLeftColor: isActive ? "primary.500" : "neutral.400",
|
@@ -362,28 +364,22 @@ var Anchor = ({ children, leftIcon, rightIcon, isActive, isChild, ...props }) =>
|
|
362
364
|
textDecoration: "none"
|
363
365
|
},
|
364
366
|
...props,
|
365
|
-
children
|
366
|
-
leftIcon && leftIcon,
|
367
|
-
children,
|
368
|
-
rightIcon && rightIcon
|
369
|
-
]
|
367
|
+
children
|
370
368
|
}
|
371
369
|
);
|
372
370
|
};
|
373
371
|
Anchor.displayName = "Anchor";
|
374
372
|
Anchor.defaultProps = {
|
375
|
-
leftIcon: void 0,
|
376
|
-
rightIcon: void 0,
|
377
373
|
isActive: false,
|
378
374
|
isChild: false
|
379
375
|
};
|
380
376
|
|
381
377
|
// src/components/badge/components/badge.tsx
|
382
378
|
import { Badge as BadgeChakra } from "@chakra-ui/react";
|
383
|
-
import { jsx as
|
379
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
384
380
|
var Badge = (props) => {
|
385
381
|
const { children, pill, ...rest } = props;
|
386
|
-
return /* @__PURE__ */
|
382
|
+
return /* @__PURE__ */ jsx13(
|
387
383
|
BadgeChakra,
|
388
384
|
{
|
389
385
|
borderRadius: pill ? "xl" : "sm",
|
@@ -402,55 +398,63 @@ Badge.defaultProps = {
|
|
402
398
|
var badge_default = Badge;
|
403
399
|
|
404
400
|
// src/components/breadcrumb/components/bread-crumb.tsx
|
405
|
-
import { Box as Box4, Breadcrumb, BreadcrumbItem, BreadcrumbLink,
|
406
|
-
import {
|
407
|
-
|
408
|
-
// src/components/button/index.ts
|
409
|
-
import {
|
410
|
-
ButtonGroup,
|
411
|
-
ButtonGroupProps,
|
412
|
-
CloseButton,
|
413
|
-
CloseButtonProps,
|
414
|
-
IconButton,
|
415
|
-
IconButtonProps
|
416
|
-
} from "@chakra-ui/react";
|
417
|
-
|
418
|
-
// src/components/breadcrumb/components/bread-crumb.tsx
|
419
|
-
import { jsx as jsx13, jsxs as jsxs2 } from "react/jsx-runtime";
|
401
|
+
import { Box as Box4, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Flex, IconButton, Text } from "@chakra-ui/react";
|
402
|
+
import { ChevronLeft, ChevronsRight, Home } from "@ctlyst.id/internal-icon";
|
403
|
+
import { jsx as jsx14, jsxs } from "react/jsx-runtime";
|
420
404
|
var BreadCrumb = (props) => {
|
421
405
|
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton } = props;
|
422
|
-
|
423
|
-
return /* @__PURE__ */ jsxs2(
|
406
|
+
return /* @__PURE__ */ jsxs(
|
424
407
|
Box4,
|
425
408
|
{
|
426
|
-
"data-test-id": "
|
409
|
+
"data-test-id": "CT_component_breadcrumb",
|
427
410
|
className,
|
428
411
|
display: "flex",
|
429
412
|
justifyContent: "space-between",
|
430
413
|
alignItems: "center",
|
431
414
|
paddingY: 2,
|
432
415
|
children: [
|
433
|
-
/* @__PURE__ */
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
416
|
+
/* @__PURE__ */ jsxs(Box4, { display: "flex", alignItems: "center", children: [
|
417
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", children: [
|
418
|
+
backButton && /* @__PURE__ */ jsx14(
|
419
|
+
IconButton,
|
420
|
+
{
|
421
|
+
"data-test-id": "",
|
422
|
+
border: "1px solid",
|
423
|
+
borderColor: "neutral.100",
|
424
|
+
size: "sm",
|
425
|
+
minH: "9",
|
426
|
+
minW: "9",
|
427
|
+
bg: "white",
|
428
|
+
variant: "ghost",
|
429
|
+
"aria-label": "Edit",
|
430
|
+
icon: /* @__PURE__ */ jsx14(ChevronLeft, { size: 5 })
|
431
|
+
}
|
432
|
+
),
|
433
|
+
/* @__PURE__ */ jsx14(Text, { pr: "2", textStyle: "heading.6", color: "neutral.700", children: title })
|
434
|
+
] }),
|
435
|
+
/* @__PURE__ */ jsx14(Box4, { h: "5.5", borderLeft: "1px solid", borderColor: "neutral.600" }),
|
436
|
+
/* @__PURE__ */ jsxs(
|
438
437
|
Breadcrumb,
|
439
438
|
{
|
440
|
-
|
439
|
+
alignItems: "center",
|
440
|
+
separator: /* @__PURE__ */ jsx14(Box4, { boxSize: "3.5", children: /* @__PURE__ */ jsx14(ChevronsRight, { color: "neutral.600", size: 3.5 }) }),
|
441
441
|
pl: "2",
|
442
442
|
pr: "4",
|
443
443
|
spacing: spacing2,
|
444
|
-
sx: { ol: { display: "flex", alignItems: "center" } },
|
445
|
-
display: "flex",
|
446
|
-
alignItems: "center",
|
447
|
-
className: "breadcrumb-wrapper",
|
448
444
|
children: [
|
449
|
-
/* @__PURE__ */
|
450
|
-
parents == null ? void 0 : parents.map((val) => /* @__PURE__ */ jsx13(BreadcrumbItem, { children: /* @__PURE__ */ jsx13(
|
445
|
+
/* @__PURE__ */ jsx14(BreadcrumbItem, { children: /* @__PURE__ */ jsx14(
|
451
446
|
BreadcrumbLink,
|
452
447
|
{
|
453
|
-
|
448
|
+
alignItems: "center",
|
449
|
+
href: !disableHome ? "/" : void 0,
|
450
|
+
style: { ...disableHome && { cursor: "default" } },
|
451
|
+
children: /* @__PURE__ */ jsx14(Box4, { boxSize: "3.5", children: /* @__PURE__ */ jsx14(Home, { size: 3.5, color: "primary.500" }) })
|
452
|
+
}
|
453
|
+
) }),
|
454
|
+
parents == null ? void 0 : parents.map((val) => /* @__PURE__ */ jsx14(BreadcrumbItem, { children: /* @__PURE__ */ jsx14(
|
455
|
+
BreadcrumbLink,
|
456
|
+
{
|
457
|
+
"data-test-id": "",
|
454
458
|
href: !val.disable ? val.link : void 0,
|
455
459
|
onClick: val.onClick,
|
456
460
|
style: {
|
@@ -459,15 +463,15 @@ var BreadCrumb = (props) => {
|
|
459
463
|
}
|
460
464
|
},
|
461
465
|
_hover: { textDecoration: "none" },
|
462
|
-
children: /* @__PURE__ */
|
466
|
+
children: /* @__PURE__ */ jsx14(Text, { color: val.disable ? "neutral.600" : "primary.500", textStyle: "text.sm", children: val.name })
|
463
467
|
}
|
464
468
|
) }, val.name)),
|
465
|
-
/* @__PURE__ */
|
469
|
+
/* @__PURE__ */ jsx14(BreadcrumbItem, { children: /* @__PURE__ */ jsx14(BreadcrumbLink, { _hover: { textDecor: "none", cursor: "default" }, children: /* @__PURE__ */ jsx14(Text, { color: "neutral.600", textStyle: "text.sm", children: title }) }) })
|
466
470
|
]
|
467
471
|
}
|
468
472
|
)
|
469
473
|
] }),
|
470
|
-
children && /* @__PURE__ */
|
474
|
+
children && /* @__PURE__ */ jsx14(Box4, { children })
|
471
475
|
]
|
472
476
|
}
|
473
477
|
);
|
@@ -482,13 +486,23 @@ BreadCrumb.defaultProps = {
|
|
482
486
|
};
|
483
487
|
var bread_crumb_default = BreadCrumb;
|
484
488
|
|
489
|
+
// src/components/button/index.ts
|
490
|
+
import {
|
491
|
+
ButtonGroup,
|
492
|
+
ButtonGroupProps,
|
493
|
+
CloseButton,
|
494
|
+
CloseButtonProps,
|
495
|
+
IconButton as IconButton2,
|
496
|
+
IconButtonProps
|
497
|
+
} from "@chakra-ui/react";
|
498
|
+
|
485
499
|
// src/components/card/components/card.tsx
|
486
500
|
import { Card, useStyleConfig as useStyleConfig2 } from "@chakra-ui/react";
|
487
501
|
import { forwardRef as forwardRef6 } from "react";
|
488
|
-
import { jsx as
|
502
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
489
503
|
var CardCustom = forwardRef6(({ children, ...rest }, ref) => {
|
490
504
|
const styles = useStyleConfig2("Card", rest);
|
491
|
-
return /* @__PURE__ */
|
505
|
+
return /* @__PURE__ */ jsx15(Card, { __css: styles, backgroundColor: "white.high", ref, ...rest, children });
|
492
506
|
});
|
493
507
|
CardCustom.defaultProps = {
|
494
508
|
withShadow: true,
|
@@ -497,22 +511,36 @@ CardCustom.defaultProps = {
|
|
497
511
|
var card_default = CardCustom;
|
498
512
|
|
499
513
|
// src/components/checkbox/components/checkbox.tsx
|
500
|
-
import { Box as Box5, Checkbox, forwardRef as forwardRef7, Text as Text2 } from "@chakra-ui/react";
|
501
|
-
import
|
514
|
+
import { Box as Box5, Checkbox, forwardRef as forwardRef7, Text as Text2, useCheckbox } from "@chakra-ui/react";
|
515
|
+
import * as Icon from "@ctlyst.id/internal-icon";
|
516
|
+
import { jsx as jsx16, jsxs as jsxs2 } from "react/jsx-runtime";
|
502
517
|
var CheckboxComponent = forwardRef7(
|
503
|
-
({ isError = false, helpText
|
518
|
+
({ isError = false, helpText, errorText, boxProps, children, isDisabled, ...rest }, ref) => {
|
519
|
+
const { state } = useCheckbox(rest);
|
504
520
|
const variant = isError ? "errors" : "unstyled";
|
505
|
-
return /* @__PURE__ */
|
506
|
-
/* @__PURE__ */
|
507
|
-
|
521
|
+
return /* @__PURE__ */ jsxs2(Box5, { children: [
|
522
|
+
/* @__PURE__ */ jsx16(Box5, { display: "flex", ...boxProps, children: /* @__PURE__ */ jsx16(
|
523
|
+
Checkbox,
|
524
|
+
{
|
525
|
+
variant,
|
526
|
+
ref,
|
527
|
+
...rest,
|
528
|
+
isDisabled,
|
529
|
+
color: "white",
|
530
|
+
icon: state.isIndeterminate ? /* @__PURE__ */ jsx16(Icon.MinusLine, { size: 3, color: "inherit" }) : /* @__PURE__ */ jsx16(Icon.Check, { size: 3, color: "inherit" }),
|
531
|
+
children: children && /* @__PURE__ */ jsx16(Text2, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children })
|
532
|
+
}
|
533
|
+
) }),
|
534
|
+
(isError && errorText || helpText) && /* @__PURE__ */ jsx16(Box5, { mt: "1", ml: "6", children: isError ? /* @__PURE__ */ jsx16(Text2, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ jsx16(Text2, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
|
508
535
|
] });
|
509
536
|
}
|
510
537
|
);
|
538
|
+
CheckboxComponent.displayName = "Checkbox";
|
511
539
|
CheckboxComponent.defaultProps = {
|
512
540
|
isError: false,
|
513
|
-
helpText:
|
514
|
-
errorText:
|
515
|
-
boxProps:
|
541
|
+
helpText: void 0,
|
542
|
+
errorText: void 0,
|
543
|
+
boxProps: void 0
|
516
544
|
};
|
517
545
|
var checkbox_default = CheckboxComponent;
|
518
546
|
|
@@ -521,7 +549,7 @@ import { Box as Box7, CheckboxGroup, Stack } from "@chakra-ui/react";
|
|
521
549
|
|
522
550
|
// src/components/field/components/field.tsx
|
523
551
|
import { Box as Box6, FormControl, FormErrorMessage, FormHelperText, FormLabel } from "@chakra-ui/react";
|
524
|
-
import { jsx as
|
552
|
+
import { jsx as jsx17, jsxs as jsxs3 } from "react/jsx-runtime";
|
525
553
|
var Field = (props) => {
|
526
554
|
const {
|
527
555
|
label,
|
@@ -545,15 +573,15 @@ var Field = (props) => {
|
|
545
573
|
};
|
546
574
|
const helperColor = getHelperColor();
|
547
575
|
const justifyHelper = getJustifyContentHelper();
|
548
|
-
return /* @__PURE__ */
|
549
|
-
label && (typeof label === "string" ? /* @__PURE__ */
|
550
|
-
isRequired && /* @__PURE__ */
|
576
|
+
return /* @__PURE__ */ jsxs3(FormControl, { isInvalid: isError, ...boxProps, children: [
|
577
|
+
label && (typeof label === "string" ? /* @__PURE__ */ jsxs3(FormLabel, { mb: 1, fontSize: "text.sm", requiredIndicator: void 0, children: [
|
578
|
+
isRequired && /* @__PURE__ */ jsx17(Box6, { as: "span", color: "danger.500", ml: 0, mr: 1, children: "*" }),
|
551
579
|
label
|
552
580
|
] }) : label),
|
553
581
|
children,
|
554
|
-
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */
|
555
|
-
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */
|
556
|
-
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */
|
582
|
+
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ jsxs3(Box6, { display: "flex", width: "full", justifyContent: justifyHelper, children: [
|
583
|
+
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */ jsx17(FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: leftHelperText }) : leftHelperText) : typeof errorMessage === "string" ? /* @__PURE__ */ jsx17(FormErrorMessage, { fontSize: "text.xs", color: "danger.500", mt: 1, children: errorMessage }) : errorMessage,
|
584
|
+
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */ jsx17(FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: rightHelperText }) : rightHelperText)
|
557
585
|
] })
|
558
586
|
] });
|
559
587
|
};
|
@@ -570,10 +598,10 @@ Field.defaultProps = {
|
|
570
598
|
var field_default = Field;
|
571
599
|
|
572
600
|
// src/components/checkbox/components/checkbox-group.tsx
|
573
|
-
import { jsx as
|
601
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
574
602
|
function CheckboxGroupComponent(props) {
|
575
603
|
const { children, label, helpText, isError, errorMessage, ...rest } = props;
|
576
|
-
return /* @__PURE__ */
|
604
|
+
return /* @__PURE__ */ jsx18(field_default, { ...rest, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ jsx18(Box7, { mt: "2", mb: "1", children: /* @__PURE__ */ jsx18(CheckboxGroup, { ...rest, children: /* @__PURE__ */ jsx18(Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
577
605
|
}
|
578
606
|
CheckboxGroupComponent.defaultProps = {
|
579
607
|
helpText: "",
|
@@ -589,7 +617,7 @@ import {
|
|
589
617
|
CheckboxIcon,
|
590
618
|
CheckboxIconProps,
|
591
619
|
CheckboxState,
|
592
|
-
useCheckbox,
|
620
|
+
useCheckbox as useCheckbox2,
|
593
621
|
useCheckboxGroup,
|
594
622
|
UseCheckboxGroupProps,
|
595
623
|
UseCheckboxGroupReturn,
|
@@ -598,55 +626,55 @@ import {
|
|
598
626
|
} from "@chakra-ui/react";
|
599
627
|
|
600
628
|
// src/components/chips/components/chips.tsx
|
601
|
-
import {
|
602
|
-
import {
|
603
|
-
|
604
|
-
import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
605
|
-
var Chips = ({ children, ...rest }) => {
|
629
|
+
import { Tag, TagCloseButton, TagLabel } from "@chakra-ui/react";
|
630
|
+
import { jsx as jsx19, jsxs as jsxs4 } from "react/jsx-runtime";
|
631
|
+
var Chips = ({ label, size: size2, onClick, ...rest }) => {
|
606
632
|
const { isActive, isDisabled, onClose } = rest;
|
607
|
-
const
|
608
|
-
const
|
609
|
-
if (
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
633
|
+
const variant = isDisabled ? "disabled" : "outline";
|
634
|
+
const handleClose = (e) => {
|
635
|
+
if (onClose) {
|
636
|
+
e.stopPropagation();
|
637
|
+
onClose();
|
638
|
+
}
|
639
|
+
};
|
640
|
+
return /* @__PURE__ */ jsxs4(
|
641
|
+
Tag,
|
642
|
+
{
|
643
|
+
"data-test-id": "",
|
644
|
+
onClick,
|
645
|
+
size: size2,
|
646
|
+
borderRadius: "full",
|
647
|
+
variant: isActive ? "solid" : variant,
|
648
|
+
children: [
|
649
|
+
/* @__PURE__ */ jsx19(TagLabel, { children: label }),
|
650
|
+
onClose && /* @__PURE__ */ jsx19(TagCloseButton, { "data-test-id": "", onClick: handleClose })
|
651
|
+
]
|
652
|
+
},
|
653
|
+
size2
|
654
|
+
);
|
628
655
|
};
|
629
656
|
Chips.defaultProps = {
|
630
657
|
isDisabled: false,
|
631
658
|
isActive: false,
|
632
659
|
onClose: void 0,
|
633
|
-
|
660
|
+
label: void 0,
|
634
661
|
size: "sm"
|
635
662
|
};
|
636
663
|
var chips_default = Chips;
|
637
664
|
|
638
665
|
// src/components/counter/components/counter.tsx
|
639
|
-
import { Box as
|
666
|
+
import { Box as Box10, HStack, IconButton as IconButton3, Text as Text3 } from "@chakra-ui/react";
|
667
|
+
import { useCallback } from "react";
|
640
668
|
import { FiMinus, FiPlus } from "react-icons/fi";
|
641
669
|
|
642
670
|
// src/components/form/components/input-addon.tsx
|
643
671
|
import { InputLeftAddon, InputRightAddon } from "@chakra-ui/react";
|
644
|
-
import { jsx as
|
672
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
645
673
|
var InputAddonLeft = ({ children, ...props }) => {
|
646
|
-
return /* @__PURE__ */
|
674
|
+
return /* @__PURE__ */ jsx20(InputLeftAddon, { backgroundColor: "neutral.200", px: 3, py: 2.5, style: { border: 0, marginInlineEnd: 0 }, ...props, children });
|
647
675
|
};
|
648
676
|
var InputAddonRight = ({ children, ...props }) => {
|
649
|
-
return /* @__PURE__ */
|
677
|
+
return /* @__PURE__ */ jsx20(
|
650
678
|
InputRightAddon,
|
651
679
|
{
|
652
680
|
backgroundColor: "neutral.200",
|
@@ -664,11 +692,11 @@ import { InputLeftElement } from "@chakra-ui/react";
|
|
664
692
|
import { InputRightElement } from "@chakra-ui/react";
|
665
693
|
|
666
694
|
// src/components/form/components/input-field.tsx
|
667
|
-
import { Box as
|
668
|
-
import { Close as
|
669
|
-
import
|
670
|
-
import { jsx as
|
671
|
-
var InputField =
|
695
|
+
import { Box as Box8, Input as ChakraInput, InputGroup } from "@chakra-ui/react";
|
696
|
+
import { Close as Close2, Eye as Eye2, EyeOff } from "@ctlyst.id/internal-icon";
|
697
|
+
import React2, { useMemo, useState } from "react";
|
698
|
+
import { jsx as jsx21, jsxs as jsxs5 } from "react/jsx-runtime";
|
699
|
+
var InputField = React2.forwardRef((props, ref) => {
|
672
700
|
const {
|
673
701
|
value,
|
674
702
|
type,
|
@@ -702,20 +730,20 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
702
730
|
};
|
703
731
|
};
|
704
732
|
const [isShowPassword, setIsShowPassword] = useState(false);
|
705
|
-
const inputType =
|
733
|
+
const inputType = useMemo(() => {
|
706
734
|
return type === "password" && isShowPassword ? "text" : type;
|
707
735
|
}, [isShowPassword, type]);
|
708
|
-
const fontSize =
|
736
|
+
const fontSize = useMemo(() => {
|
709
737
|
if (type === "password") {
|
710
738
|
if (!isShowPassword && value) return "text.xl";
|
711
739
|
}
|
712
740
|
return "text.sm";
|
713
741
|
}, [isShowPassword, type, value]);
|
714
|
-
const iconColor =
|
742
|
+
const iconColor = useMemo(() => {
|
715
743
|
return isDisabled ? "black.low" : "black.medium";
|
716
744
|
}, [isDisabled]);
|
717
745
|
const { outlineColor, focusColor } = getProperties();
|
718
|
-
return /* @__PURE__ */
|
746
|
+
return /* @__PURE__ */ jsx21(
|
719
747
|
field_default,
|
720
748
|
{
|
721
749
|
label,
|
@@ -725,8 +753,8 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
725
753
|
leftHelperText,
|
726
754
|
rightHelperText,
|
727
755
|
isRequired,
|
728
|
-
children: /* @__PURE__ */
|
729
|
-
|
756
|
+
children: /* @__PURE__ */ jsx21(
|
757
|
+
Box8,
|
730
758
|
{
|
731
759
|
transition: "all 0.15s",
|
732
760
|
boxShadow: "none",
|
@@ -736,7 +764,7 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
736
764
|
_focusWithin: {
|
737
765
|
borderColor: focusColor
|
738
766
|
},
|
739
|
-
children: /* @__PURE__ */
|
767
|
+
children: /* @__PURE__ */ jsxs5(
|
740
768
|
InputGroup,
|
741
769
|
{
|
742
770
|
size: size2,
|
@@ -745,7 +773,7 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
745
773
|
cursor: isDisabled ? "not-allowed" : "default",
|
746
774
|
children: [
|
747
775
|
addOnLeft,
|
748
|
-
/* @__PURE__ */
|
776
|
+
/* @__PURE__ */ jsx21(
|
749
777
|
ChakraInput,
|
750
778
|
{
|
751
779
|
ref,
|
@@ -757,8 +785,8 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
757
785
|
fontSize
|
758
786
|
}
|
759
787
|
),
|
760
|
-
(withClear || isLoading || type === "password") && /* @__PURE__ */
|
761
|
-
|
788
|
+
(withClear || isLoading || type === "password") && /* @__PURE__ */ jsxs5(
|
789
|
+
Box8,
|
762
790
|
{
|
763
791
|
"data-test-id": "CT_Component_ClearInput",
|
764
792
|
display: "flex",
|
@@ -767,18 +795,18 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
767
795
|
width: "16px",
|
768
796
|
mr: "10px",
|
769
797
|
children: [
|
770
|
-
withClear && !isLoading && /* @__PURE__ */
|
771
|
-
|
798
|
+
withClear && !isLoading && /* @__PURE__ */ jsx21(
|
799
|
+
Box8,
|
772
800
|
{
|
773
801
|
display: "flex",
|
774
802
|
justifyContent: "center",
|
775
803
|
onClick: !isDisabled ? onClear : void 0,
|
776
804
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
777
|
-
children: /* @__PURE__ */
|
805
|
+
children: /* @__PURE__ */ jsx21(Close2, { size: 4, color: iconColor })
|
778
806
|
}
|
779
807
|
),
|
780
|
-
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */
|
781
|
-
|
808
|
+
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */ jsx21(
|
809
|
+
Box8,
|
782
810
|
{
|
783
811
|
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
784
812
|
onClick: () => {
|
@@ -787,11 +815,11 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
787
815
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
788
816
|
display: "flex",
|
789
817
|
justifyContent: "center",
|
790
|
-
children: /* @__PURE__ */
|
818
|
+
children: /* @__PURE__ */ jsx21(EyeOff, { size: 4, color: iconColor })
|
791
819
|
}
|
792
820
|
),
|
793
|
-
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */
|
794
|
-
|
821
|
+
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */ jsx21(
|
822
|
+
Box8,
|
795
823
|
{
|
796
824
|
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
797
825
|
onClick: () => {
|
@@ -800,10 +828,10 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
800
828
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
801
829
|
display: "flex",
|
802
830
|
justifyContent: "center",
|
803
|
-
children: /* @__PURE__ */
|
831
|
+
children: /* @__PURE__ */ jsx21(Eye2, { size: 4, color: iconColor })
|
804
832
|
}
|
805
833
|
),
|
806
|
-
isLoading && /* @__PURE__ */
|
834
|
+
isLoading && /* @__PURE__ */ jsx21(loader_default, { size: "sm" })
|
807
835
|
]
|
808
836
|
}
|
809
837
|
),
|
@@ -827,14 +855,14 @@ InputField.defaultProps = {
|
|
827
855
|
var input_field_default = InputField;
|
828
856
|
|
829
857
|
// src/components/form/components/textarea.tsx
|
830
|
-
import { Box as
|
831
|
-
import
|
832
|
-
import { jsx as
|
833
|
-
var TextareaField =
|
858
|
+
import { Box as Box9, Textarea as ChakraTextarea } from "@chakra-ui/react";
|
859
|
+
import React3 from "react";
|
860
|
+
import { jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
|
861
|
+
var TextareaField = React3.forwardRef((props, ref) => {
|
834
862
|
const { value, isLoading, ...inputProps } = props;
|
835
|
-
return /* @__PURE__ */
|
836
|
-
/* @__PURE__ */
|
837
|
-
isLoading && /* @__PURE__ */
|
863
|
+
return /* @__PURE__ */ jsx22(field_default, { ...inputProps, children: /* @__PURE__ */ jsxs6(Box9, { position: "relative", children: [
|
864
|
+
/* @__PURE__ */ jsx22(ChakraTextarea, { ref, value, ...inputProps }),
|
865
|
+
isLoading && /* @__PURE__ */ jsx22(Box9, { zIndex: 999, top: 2, right: 2, position: "absolute", children: /* @__PURE__ */ jsx22(loader_default, { size: "sm" }) })
|
838
866
|
] }) });
|
839
867
|
});
|
840
868
|
TextareaField.defaultProps = {
|
@@ -866,7 +894,7 @@ import {
|
|
866
894
|
} from "@chakra-ui/react";
|
867
895
|
|
868
896
|
// src/components/counter/components/counter.tsx
|
869
|
-
import { jsx as
|
897
|
+
import { jsx as jsx23, jsxs as jsxs7 } from "react/jsx-runtime";
|
870
898
|
var Counter = ({
|
871
899
|
value,
|
872
900
|
size: size2 = "xs",
|
@@ -874,7 +902,7 @@ var Counter = ({
|
|
874
902
|
max = 9999,
|
875
903
|
onChange,
|
876
904
|
isError = false,
|
877
|
-
disabled = false,
|
905
|
+
disabled: disabled2 = false,
|
878
906
|
error = "",
|
879
907
|
helperText = "",
|
880
908
|
isReadOnly = false
|
@@ -885,52 +913,62 @@ var Counter = ({
|
|
885
913
|
const increment = () => {
|
886
914
|
onChange(value + 1);
|
887
915
|
};
|
888
|
-
const
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
916
|
+
const handleChangeInput = useCallback(
|
917
|
+
(e) => {
|
918
|
+
const inputValue = e.target.value;
|
919
|
+
const cleanedInputValue = inputValue.replace(/^0+/, "") || "0";
|
920
|
+
const parsedValue = parseInt(cleanedInputValue, 10);
|
921
|
+
const newValue = Math.max(Math.min(parsedValue, max), min);
|
922
|
+
e.target.value = newValue.toString();
|
923
|
+
onChange(newValue);
|
924
|
+
},
|
925
|
+
[onChange, max, min]
|
926
|
+
);
|
927
|
+
return /* @__PURE__ */ jsxs7(Box10, { children: [
|
928
|
+
/* @__PURE__ */ jsxs7(HStack, { gap: "1", children: [
|
929
|
+
/* @__PURE__ */ jsx23(
|
930
|
+
IconButton3,
|
895
931
|
{
|
896
932
|
"aria-label": "minus",
|
897
933
|
"data-test-id": "CT_Component_Counter_decrement",
|
898
934
|
onClick: decrement,
|
899
|
-
isDisabled:
|
935
|
+
isDisabled: disabled2 || +value <= min,
|
900
936
|
size: size2,
|
901
|
-
icon: /* @__PURE__ */
|
937
|
+
icon: /* @__PURE__ */ jsx23(FiMinus, {})
|
902
938
|
}
|
903
939
|
),
|
904
|
-
/* @__PURE__ */
|
940
|
+
/* @__PURE__ */ jsx23(
|
905
941
|
input_field_default,
|
906
942
|
{
|
907
943
|
"data-test-id": "CT_Component_Counter_input",
|
908
944
|
value,
|
909
945
|
isError,
|
910
|
-
isDisabled:
|
946
|
+
isDisabled: disabled2 || max === 0,
|
911
947
|
textAlign: "center",
|
912
948
|
size: size2,
|
913
949
|
min,
|
914
950
|
max,
|
915
|
-
onChange:
|
951
|
+
onChange: handleChangeInput,
|
916
952
|
isReadOnly,
|
917
|
-
width:
|
918
|
-
type: "number"
|
953
|
+
width: 11.5,
|
954
|
+
type: "number",
|
955
|
+
onFocus: (e) => e.target.select(),
|
956
|
+
borderColor: isError ? "danger.500" : "neutral.400"
|
919
957
|
}
|
920
958
|
),
|
921
|
-
/* @__PURE__ */
|
922
|
-
|
959
|
+
/* @__PURE__ */ jsx23(
|
960
|
+
IconButton3,
|
923
961
|
{
|
924
962
|
"aria-label": "plus",
|
925
963
|
"data-test-id": "CT_Component_Counter_decrement",
|
926
964
|
onClick: increment,
|
927
|
-
isDisabled:
|
965
|
+
isDisabled: disabled2 || +value >= max,
|
928
966
|
size: size2,
|
929
|
-
icon: /* @__PURE__ */
|
967
|
+
icon: /* @__PURE__ */ jsx23(FiPlus, {})
|
930
968
|
}
|
931
969
|
)
|
932
970
|
] }),
|
933
|
-
!isError ? /* @__PURE__ */
|
971
|
+
!isError ? /* @__PURE__ */ jsx23(Text3, { mt: 1, color: "black.medium", textStyle: "text.xs", children: helperText }) : /* @__PURE__ */ jsx23(Text3, { mt: 1, color: "danger.500", textStyle: "text.xs", children: error })
|
934
972
|
] });
|
935
973
|
};
|
936
974
|
var counter_default = Counter;
|
@@ -938,9 +976,9 @@ var counter_default = Counter;
|
|
938
976
|
// src/components/data-table/components/data-table.tsx
|
939
977
|
import { ChevronDownIcon, ChevronUpIcon, UpDownIcon } from "@chakra-ui/icons";
|
940
978
|
import {
|
941
|
-
Box as
|
979
|
+
Box as Box11,
|
942
980
|
Checkbox as Checkbox2,
|
943
|
-
Flex,
|
981
|
+
Flex as Flex2,
|
944
982
|
Skeleton as Skeleton2,
|
945
983
|
Table,
|
946
984
|
Tbody,
|
@@ -955,7 +993,7 @@ import { css } from "@emotion/react";
|
|
955
993
|
import { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
956
994
|
import * as React5 from "react";
|
957
995
|
import { useRef } from "react";
|
958
|
-
import { jsx as
|
996
|
+
import { jsx as jsx24, jsxs as jsxs8 } from "react/jsx-runtime";
|
959
997
|
var getCommonPinningStyles = (column) => {
|
960
998
|
const isPinned = column.getIsPinned();
|
961
999
|
const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
|
@@ -1014,7 +1052,7 @@ var useDataTable = ({
|
|
1014
1052
|
{
|
1015
1053
|
id: "select",
|
1016
1054
|
size: 32,
|
1017
|
-
header: ({ table: table2 }) => /* @__PURE__ */
|
1055
|
+
header: ({ table: table2 }) => /* @__PURE__ */ jsx24(
|
1018
1056
|
Checkbox2,
|
1019
1057
|
{
|
1020
1058
|
"data-test-id": "select-header-data-table",
|
@@ -1025,7 +1063,7 @@ var useDataTable = ({
|
|
1025
1063
|
}
|
1026
1064
|
}
|
1027
1065
|
),
|
1028
|
-
cell: ({ row }) => /* @__PURE__ */
|
1066
|
+
cell: ({ row }) => /* @__PURE__ */ jsx24(
|
1029
1067
|
Checkbox2,
|
1030
1068
|
{
|
1031
1069
|
"data-test-id": `select-data-table-${row.index}`,
|
@@ -1087,22 +1125,22 @@ var useDataTable = ({
|
|
1087
1125
|
generateColumn
|
1088
1126
|
};
|
1089
1127
|
};
|
1090
|
-
var DataTable = React5.forwardRef(
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
isLoading
|
1098
|
-
/* @__PURE__ */
|
1128
|
+
var DataTable = React5.forwardRef(
|
1129
|
+
(props, ref) => {
|
1130
|
+
const { isLoading, styles, headerSticky, onRowClick, container } = props;
|
1131
|
+
const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1132
|
+
React5.useImperativeHandle(ref, () => ({
|
1133
|
+
toggleAllRowsSelected
|
1134
|
+
}));
|
1135
|
+
return /* @__PURE__ */ jsx24(Box11, { overflowX: "auto", position: "relative", maxW: "100%", minH: 400, w: "full", ...container, children: isLoading ? /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
1136
|
+
/* @__PURE__ */ jsx24(Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx24(Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index2) => /* @__PURE__ */ jsx24(
|
1099
1137
|
Th,
|
1100
1138
|
{
|
1101
1139
|
colSpan: header.colSpan,
|
1102
1140
|
width: `${header.getSize() + (index2 === 0 || index2 === headerGroup.headers.length - 1 ? 16 : 0)}px`,
|
1103
1141
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1104
|
-
children: /* @__PURE__ */
|
1105
|
-
|
1142
|
+
children: /* @__PURE__ */ jsx24(
|
1143
|
+
Flex2,
|
1106
1144
|
{
|
1107
1145
|
"data-test-id": "CT_component_data-table_loader",
|
1108
1146
|
textTransform: "capitalize",
|
@@ -1114,20 +1152,19 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1114
1152
|
},
|
1115
1153
|
header.id
|
1116
1154
|
)) }, headerGroup.id)) }),
|
1117
|
-
/* @__PURE__ */
|
1118
|
-
] }),
|
1119
|
-
|
1120
|
-
/* @__PURE__ */ jsx23(Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx23(Tr, { bg: useColorModeValue("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index2) => {
|
1155
|
+
/* @__PURE__ */ jsx24(Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ jsx24(Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ jsx24(Td, { width: 210, children: /* @__PURE__ */ jsx24(Skeleton2, { startColor: "gray.50", endColor: "gray.100", h: "30px", w: "100%" }, i) }, i)) }, num)) })
|
1156
|
+
] }) : /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, children: [
|
1157
|
+
/* @__PURE__ */ jsx24(Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx24(Tr, { bg: useColorModeValue("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index2) => {
|
1121
1158
|
var _a;
|
1122
|
-
return /* @__PURE__ */
|
1159
|
+
return /* @__PURE__ */ jsx24(
|
1123
1160
|
Th,
|
1124
1161
|
{
|
1125
1162
|
colSpan: header.colSpan,
|
1126
1163
|
sx: getCommonPinningStyles(header.column),
|
1127
1164
|
width: `${header.getSize() + (index2 === 0 || index2 === headerGroup.headers.length - 1 ? 16 : 0)}px`,
|
1128
1165
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1129
|
-
children: /* @__PURE__ */
|
1130
|
-
|
1166
|
+
children: /* @__PURE__ */ jsxs8(
|
1167
|
+
Flex2,
|
1131
1168
|
{
|
1132
1169
|
backgroundColor: "white",
|
1133
1170
|
height: "100%",
|
@@ -1137,18 +1174,18 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1137
1174
|
align: "center",
|
1138
1175
|
gap: 2,
|
1139
1176
|
children: [
|
1140
|
-
/* @__PURE__ */
|
1141
|
-
/* @__PURE__ */
|
1142
|
-
|
1177
|
+
/* @__PURE__ */ jsx24(Text4, { children: flexRender(header.column.columnDef.header, header.getContext()) }),
|
1178
|
+
/* @__PURE__ */ jsx24(
|
1179
|
+
Box11,
|
1143
1180
|
{
|
1144
1181
|
as: "span",
|
1145
1182
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1146
1183
|
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1147
1184
|
onClick: header.column.getToggleSortingHandler(),
|
1148
1185
|
children: (_a = header.column.getCanSort() && {
|
1149
|
-
asc: /* @__PURE__ */
|
1150
|
-
desc: /* @__PURE__ */
|
1151
|
-
}[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */
|
1186
|
+
asc: /* @__PURE__ */ jsx24(ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1187
|
+
desc: /* @__PURE__ */ jsx24(ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1188
|
+
}[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */ jsx24(UpDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1152
1189
|
}
|
1153
1190
|
)
|
1154
1191
|
]
|
@@ -1158,9 +1195,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1158
1195
|
header.id
|
1159
1196
|
);
|
1160
1197
|
}) }, headerGroup.id)) }),
|
1161
|
-
/* @__PURE__ */
|
1198
|
+
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
|
1162
1199
|
const trRef = useRef();
|
1163
|
-
return /* @__PURE__ */
|
1200
|
+
return /* @__PURE__ */ jsx24(
|
1164
1201
|
Tr,
|
1165
1202
|
{
|
1166
1203
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
@@ -1168,12 +1205,12 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1168
1205
|
ref: trRef,
|
1169
1206
|
...styles == null ? void 0 : styles.tableRow,
|
1170
1207
|
css: css`
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1208
|
+
&:last-child {
|
1209
|
+
td {
|
1210
|
+
border-bottom: none;
|
1211
|
+
}
|
1212
|
+
}
|
1213
|
+
`,
|
1177
1214
|
onMouseDown: () => {
|
1178
1215
|
var _a;
|
1179
1216
|
(_a = trRef.current) == null ? void 0 : _a.setAttribute("data-active", "true");
|
@@ -1187,53 +1224,42 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1187
1224
|
onRowClick(row.original);
|
1188
1225
|
}
|
1189
1226
|
},
|
1190
|
-
children: row.getVisibleCells().map((cell) =>
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
{
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
e.stopPropagation()
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1227
|
+
children: row.getVisibleCells().map((cell) => {
|
1228
|
+
var _a, _b;
|
1229
|
+
const isDisabled = (_b = (_a = cell.row.original) == null ? void 0 : _a.disabled) == null ? void 0 : _b[cell.column.id];
|
1230
|
+
return /* @__PURE__ */ jsx24(
|
1231
|
+
Td,
|
1232
|
+
{
|
1233
|
+
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1234
|
+
fontSize: "text.sm",
|
1235
|
+
sx: getCommonPinningStyles(cell.column),
|
1236
|
+
...styles == null ? void 0 : styles.tableCell,
|
1237
|
+
children: /* @__PURE__ */ jsx24(Flex2, { height: "100%", align: "center", opacity: isDisabled ? 0.5 : 1, children: /* @__PURE__ */ jsx24(
|
1238
|
+
Flex2,
|
1239
|
+
{
|
1240
|
+
tabIndex: 0,
|
1241
|
+
display: "inline-flex",
|
1242
|
+
cursor: "auto",
|
1243
|
+
"data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
|
1244
|
+
onMouseUp: (e) => e.stopPropagation(),
|
1245
|
+
onMouseDown: (e) => e.stopPropagation(),
|
1246
|
+
onClick: (e) => {
|
1247
|
+
e.stopPropagation();
|
1248
|
+
},
|
1249
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
1250
|
+
}
|
1251
|
+
) })
|
1252
|
+
},
|
1253
|
+
cell.id
|
1254
|
+
);
|
1255
|
+
})
|
1216
1256
|
},
|
1217
1257
|
row.id
|
1218
1258
|
);
|
1219
1259
|
}) })
|
1220
|
-
] })
|
1221
|
-
|
1222
|
-
|
1223
|
-
DataTable.defaultProps = {
|
1224
|
-
container: void 0,
|
1225
|
-
withSelectedRow: false,
|
1226
|
-
styles: void 0,
|
1227
|
-
isLoading: void 0,
|
1228
|
-
onSelectedRow: void 0,
|
1229
|
-
onSort: void 0,
|
1230
|
-
manualSorting: false,
|
1231
|
-
sortingState: [],
|
1232
|
-
sortDescFirst: false,
|
1233
|
-
headerSticky: false,
|
1234
|
-
onRowClick: void 0,
|
1235
|
-
columnPinning: void 0
|
1236
|
-
};
|
1260
|
+
] }) });
|
1261
|
+
}
|
1262
|
+
);
|
1237
1263
|
var data_table_default = DataTable;
|
1238
1264
|
|
1239
1265
|
// src/components/datepicker/components/datepicker.tsx
|
@@ -1242,21 +1268,21 @@ import {
|
|
1242
1268
|
FormErrorMessage as FormErrorMessage3,
|
1243
1269
|
FormHelperText as FormHelperText3,
|
1244
1270
|
FormLabel as FormLabel3,
|
1245
|
-
IconButton as
|
1271
|
+
IconButton as IconButton4,
|
1246
1272
|
InputGroup as InputGroup4,
|
1247
1273
|
InputRightElement as InputRightElement3
|
1248
1274
|
} from "@chakra-ui/react";
|
1249
1275
|
import { cx as cx8 } from "@chakra-ui/shared-utils";
|
1250
|
-
import { Calendar, Close as
|
1276
|
+
import { Calendar, Close as Close3 } from "@ctlyst.id/internal-icon";
|
1251
1277
|
import ReactDatePicker from "react-datepicker";
|
1252
1278
|
|
1253
1279
|
// src/components/datepicker/components/styles.tsx
|
1254
1280
|
import { useColorMode } from "@chakra-ui/system";
|
1255
1281
|
import { Global } from "@emotion/react";
|
1256
|
-
import { jsx as
|
1282
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
1257
1283
|
var Styles = ({ showHeader }) => {
|
1258
1284
|
const { colorMode } = useColorMode();
|
1259
|
-
return /* @__PURE__ */
|
1285
|
+
return /* @__PURE__ */ jsx25(
|
1260
1286
|
Global,
|
1261
1287
|
{
|
1262
1288
|
styles: `
|
@@ -2103,9 +2129,9 @@ var Styles = ({ showHeader }) => {
|
|
2103
2129
|
var styles_default = Styles;
|
2104
2130
|
|
2105
2131
|
// src/components/datepicker/components/time-input.tsx
|
2106
|
-
import { Flex as
|
2132
|
+
import { Flex as Flex3, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as Text5 } from "@chakra-ui/react";
|
2107
2133
|
import React6 from "react";
|
2108
|
-
import { jsx as
|
2134
|
+
import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
2109
2135
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
2110
2136
|
const [time, setTime] = React6.useState(value || "00:00");
|
2111
2137
|
const handleChange = (e) => {
|
@@ -2113,10 +2139,10 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
2113
2139
|
setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
|
2114
2140
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
2115
2141
|
};
|
2116
|
-
return /* @__PURE__ */
|
2117
|
-
/* @__PURE__ */
|
2118
|
-
/* @__PURE__ */
|
2119
|
-
/* @__PURE__ */
|
2142
|
+
return /* @__PURE__ */ jsxs9(Flex3, { flexDir: "column", p: 4, pt: 0, children: [
|
2143
|
+
/* @__PURE__ */ jsx26(Text5, { mb: 2, children: label }),
|
2144
|
+
/* @__PURE__ */ jsxs9(InputGroup3, { alignItems: "center", borderColor: "neutral.400", children: [
|
2145
|
+
/* @__PURE__ */ jsx26(
|
2120
2146
|
Input,
|
2121
2147
|
{
|
2122
2148
|
onChange: handleChange,
|
@@ -2132,7 +2158,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
2132
2158
|
}
|
2133
2159
|
}
|
2134
2160
|
),
|
2135
|
-
rightAddon && /* @__PURE__ */
|
2161
|
+
rightAddon && /* @__PURE__ */ jsx26(InputRightAddon3, { children: rightAddon })
|
2136
2162
|
] })
|
2137
2163
|
] });
|
2138
2164
|
};
|
@@ -2146,7 +2172,7 @@ TimeInput.defaultProps = {
|
|
2146
2172
|
var time_input_default = TimeInput;
|
2147
2173
|
|
2148
2174
|
// src/components/datepicker/components/datepicker.tsx
|
2149
|
-
import { Fragment, jsx as
|
2175
|
+
import { Fragment, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
2150
2176
|
var Datepicker = ({
|
2151
2177
|
id: id2,
|
2152
2178
|
label,
|
@@ -2170,19 +2196,19 @@ var Datepicker = ({
|
|
2170
2196
|
return {
|
2171
2197
|
timeInputLabel: "",
|
2172
2198
|
showTimeInput: true,
|
2173
|
-
customTimeInput: /* @__PURE__ */
|
2199
|
+
customTimeInput: /* @__PURE__ */ jsx27(time_input_default, {})
|
2174
2200
|
};
|
2175
2201
|
};
|
2176
2202
|
const hasMultipleMonthShow = ((_b = props == null ? void 0 : props.monthsShown) != null ? _b : 1) < 2;
|
2177
|
-
const component = /* @__PURE__ */
|
2178
|
-
/* @__PURE__ */
|
2179
|
-
/* @__PURE__ */
|
2203
|
+
const component = /* @__PURE__ */ jsxs10(Fragment, { children: [
|
2204
|
+
/* @__PURE__ */ jsx27(styles_default, { showHeader: !hasMultipleMonthShow }),
|
2205
|
+
/* @__PURE__ */ jsx27(
|
2180
2206
|
ReactDatePicker,
|
2181
2207
|
{
|
2182
2208
|
id: id2,
|
2183
2209
|
name,
|
2184
2210
|
selected,
|
2185
|
-
customInput: /* @__PURE__ */
|
2211
|
+
customInput: /* @__PURE__ */ jsx27(input_field_default, { autoComplete: "off" }),
|
2186
2212
|
showPopperArrow: false,
|
2187
2213
|
calendarClassName: cx8({ inline: props.inline }),
|
2188
2214
|
dropdownMode: "select",
|
@@ -2199,14 +2225,14 @@ var Datepicker = ({
|
|
2199
2225
|
if (props.inline) {
|
2200
2226
|
return component;
|
2201
2227
|
}
|
2202
|
-
return /* @__PURE__ */
|
2203
|
-
label && /* @__PURE__ */
|
2204
|
-
/* @__PURE__ */
|
2228
|
+
return /* @__PURE__ */ jsxs10(FormControl3, { isRequired, "data-test-id": "CT_Component_datepicker_wrapper", isInvalid: isError, children: [
|
2229
|
+
label && /* @__PURE__ */ jsx27(FormLabel3, { fontSize: "text.sm", children: label }),
|
2230
|
+
/* @__PURE__ */ jsxs10(InputGroup4, { children: [
|
2205
2231
|
component,
|
2206
|
-
/* @__PURE__ */
|
2207
|
-
/* @__PURE__ */
|
2208
|
-
value && /* @__PURE__ */
|
2209
|
-
|
2232
|
+
/* @__PURE__ */ jsxs10(InputRightElement3, { alignSelf: "center", bottom: 0, flexDir: "row-reverse", width: "auto", mr: 2, gap: 2, children: [
|
2233
|
+
/* @__PURE__ */ jsx27(Calendar, { size: 4, color: "neutral.400" }),
|
2234
|
+
value && /* @__PURE__ */ jsx27(
|
2235
|
+
IconButton4,
|
2210
2236
|
{
|
2211
2237
|
"data-test-id": "H0rseVCzGIaqoLho-EPbu",
|
2212
2238
|
display: "flex",
|
@@ -2217,12 +2243,12 @@ var Datepicker = ({
|
|
2217
2243
|
cursor: "pointer",
|
2218
2244
|
size: "sm",
|
2219
2245
|
minW: "unset",
|
2220
|
-
icon: /* @__PURE__ */
|
2246
|
+
icon: /* @__PURE__ */ jsx27(Close3, { size: 4, color: "neutral.600" })
|
2221
2247
|
}
|
2222
2248
|
)
|
2223
2249
|
] })
|
2224
2250
|
] }),
|
2225
|
-
!isError ? /* @__PURE__ */
|
2251
|
+
!isError ? /* @__PURE__ */ jsx27(FormHelperText3, { fontSize: "text.xs", mt: 1, children: helperText }) : /* @__PURE__ */ jsx27(FormErrorMessage3, { fontSize: "text.xs", mt: 1, children: error })
|
2226
2252
|
] });
|
2227
2253
|
};
|
2228
2254
|
Datepicker.defaultProps = {
|
@@ -2240,14 +2266,14 @@ Datepicker.defaultProps = {
|
|
2240
2266
|
var datepicker_default = Datepicker;
|
2241
2267
|
|
2242
2268
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
2243
|
-
import { Box as
|
2269
|
+
import { Box as Box12, Input as Input2 } from "@chakra-ui/react";
|
2244
2270
|
import { css as css2 } from "@emotion/react";
|
2245
2271
|
import React7 from "react";
|
2246
|
-
import { jsx as
|
2272
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
2247
2273
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
2248
2274
|
const [date, setDate] = React7.useState(null);
|
2249
|
-
return /* @__PURE__ */
|
2250
|
-
|
2275
|
+
return /* @__PURE__ */ jsx28(
|
2276
|
+
Box12,
|
2251
2277
|
{
|
2252
2278
|
fontSize: "12px",
|
2253
2279
|
lineHeight: "18px",
|
@@ -2261,7 +2287,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
2261
2287
|
width: 58px;
|
2262
2288
|
}
|
2263
2289
|
`,
|
2264
|
-
children: /* @__PURE__ */
|
2290
|
+
children: /* @__PURE__ */ jsx28(
|
2265
2291
|
Input2,
|
2266
2292
|
{
|
2267
2293
|
"data-test-id": props["data-test-id"],
|
@@ -2299,11 +2325,11 @@ DatePickerMonth.defaultProps = {
|
|
2299
2325
|
var datepicker_month_default = DatePickerMonth;
|
2300
2326
|
|
2301
2327
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
2302
|
-
import { Box as
|
2328
|
+
import { Box as Box13 } from "@chakra-ui/react";
|
2303
2329
|
import styled from "@emotion/styled";
|
2304
2330
|
import React8 from "react";
|
2305
|
-
import { jsx as
|
2306
|
-
var MultiDateWrapper = styled(
|
2331
|
+
import { jsx as jsx29, jsxs as jsxs11 } from "react/jsx-runtime";
|
2332
|
+
var MultiDateWrapper = styled(Box13)`
|
2307
2333
|
display: flex;
|
2308
2334
|
align-items: center;
|
2309
2335
|
width: fit-content;
|
@@ -2319,8 +2345,8 @@ var MultiDatePickerMonth = ({
|
|
2319
2345
|
max = "2020-12-31"
|
2320
2346
|
}) => {
|
2321
2347
|
const [date, setDate] = React8.useState([null, null]);
|
2322
|
-
return /* @__PURE__ */
|
2323
|
-
/* @__PURE__ */
|
2348
|
+
return /* @__PURE__ */ jsxs11(MultiDateWrapper, { isError, children: [
|
2349
|
+
/* @__PURE__ */ jsx29(
|
2324
2350
|
datepicker_month_default,
|
2325
2351
|
{
|
2326
2352
|
"data-test-id": "CT_DatePickerMonth_StartDate",
|
@@ -2332,8 +2358,8 @@ var MultiDatePickerMonth = ({
|
|
2332
2358
|
max
|
2333
2359
|
}
|
2334
2360
|
),
|
2335
|
-
/* @__PURE__ */
|
2336
|
-
/* @__PURE__ */
|
2361
|
+
/* @__PURE__ */ jsx29(Box13, { children: "-" }),
|
2362
|
+
/* @__PURE__ */ jsx29(
|
2337
2363
|
datepicker_month_default,
|
2338
2364
|
{
|
2339
2365
|
"data-test-id": "CT_DatePickerMonth_EndDate",
|
@@ -2356,7 +2382,7 @@ var multi_datepicker_month_default = MultiDatePickerMonth;
|
|
2356
2382
|
|
2357
2383
|
// src/components/dialog/components/dialog.tsx
|
2358
2384
|
import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text as Text6 } from "@chakra-ui/react";
|
2359
|
-
import { jsx as
|
2385
|
+
import { jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
|
2360
2386
|
var Dialog = ({
|
2361
2387
|
title,
|
2362
2388
|
content,
|
@@ -2366,12 +2392,12 @@ var Dialog = ({
|
|
2366
2392
|
isOverlayClickable,
|
2367
2393
|
...props
|
2368
2394
|
}) => {
|
2369
|
-
return /* @__PURE__ */
|
2370
|
-
isModalOverlay && /* @__PURE__ */
|
2371
|
-
/* @__PURE__ */
|
2372
|
-
/* @__PURE__ */
|
2373
|
-
/* @__PURE__ */
|
2374
|
-
/* @__PURE__ */
|
2395
|
+
return /* @__PURE__ */ jsxs12(Modal, { ...props, children: [
|
2396
|
+
isModalOverlay && /* @__PURE__ */ jsx30(ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
2397
|
+
/* @__PURE__ */ jsxs12(ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
2398
|
+
/* @__PURE__ */ jsx30(ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ jsx30(Text6, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
2399
|
+
/* @__PURE__ */ jsx30(ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
2400
|
+
/* @__PURE__ */ jsx30(ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
2375
2401
|
] })
|
2376
2402
|
] });
|
2377
2403
|
};
|
@@ -2383,133 +2409,125 @@ Dialog.defaultProps = {
|
|
2383
2409
|
var dialog_default = Dialog;
|
2384
2410
|
|
2385
2411
|
// src/components/empty-state/components/empty-state.tsx
|
2386
|
-
import * as
|
2412
|
+
import * as Icon2 from "@ctlyst.id/internal-icon";
|
2387
2413
|
|
2388
2414
|
// src/components/empty-state/components/layout.tsx
|
2389
|
-
import { Box as
|
2390
|
-
import { jsx as
|
2391
|
-
var
|
2392
|
-
icon,
|
2393
|
-
title,
|
2394
|
-
description,
|
2395
|
-
buttonText,
|
2396
|
-
maxW = 320,
|
2397
|
-
onClick
|
2398
|
-
}) => {
|
2415
|
+
import { Box as Box14, Button as Button2, Flex as Flex4, Text as Text7, VStack } from "@chakra-ui/react";
|
2416
|
+
import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
|
2417
|
+
var EmptyState = (props) => {
|
2418
|
+
const { icon, title, description, buttonText, onClick } = props;
|
2399
2419
|
const handleClick = () => {
|
2400
2420
|
if (onClick) {
|
2401
2421
|
onClick();
|
2402
2422
|
}
|
2403
2423
|
};
|
2404
|
-
return /* @__PURE__ */
|
2424
|
+
return /* @__PURE__ */ jsx31(Flex4, { align: "center", justify: "center", children: /* @__PURE__ */ jsxs13(VStack, { textAlign: "center", children: [
|
2405
2425
|
icon,
|
2406
|
-
/* @__PURE__ */
|
2407
|
-
/* @__PURE__ */
|
2408
|
-
/* @__PURE__ */
|
2426
|
+
/* @__PURE__ */ jsxs13(VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
|
2427
|
+
/* @__PURE__ */ jsx31(Text7, { textStyle: "text.lg", fontWeight: "bold", children: title }),
|
2428
|
+
/* @__PURE__ */ jsx31(Text7, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
|
2409
2429
|
] }),
|
2410
|
-
buttonText && /* @__PURE__ */
|
2430
|
+
buttonText && /* @__PURE__ */ jsx31(Box14, { mt: 3, children: /* @__PURE__ */ jsx31(Button2, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
|
2411
2431
|
] }) });
|
2412
2432
|
};
|
2413
|
-
var layout_default =
|
2433
|
+
var layout_default = EmptyState;
|
2414
2434
|
|
2415
2435
|
// src/components/empty-state/components/empty-state.tsx
|
2416
|
-
import { jsx as
|
2417
|
-
var
|
2418
|
-
|
2419
|
-
|
2420
|
-
|
2421
|
-
|
2422
|
-
|
2423
|
-
|
2424
|
-
}
|
2425
|
-
);
|
2426
|
-
};
|
2427
|
-
var EmptyStatePage = () => {
|
2428
|
-
return /* @__PURE__ */ jsx31(
|
2429
|
-
layout_default,
|
2430
|
-
{
|
2431
|
-
title: "Halaman tidak ditemukan",
|
2432
|
-
description: "Halaman yang dituju mungkin telah berubah atau dihapus.",
|
2433
|
-
icon: /* @__PURE__ */ jsx31(Icon.Img404, { size: 110 }),
|
2434
|
-
buttonText: "Kembali ke Home",
|
2435
|
-
maxW: 220
|
2436
|
-
}
|
2437
|
-
);
|
2436
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
2437
|
+
var EmptyStateData = ({
|
2438
|
+
title = "Belum ada data",
|
2439
|
+
description = "Jika data tersedia, akan tampil di sini.",
|
2440
|
+
icon = /* @__PURE__ */ jsx32(Icon2.ImgFolder, { size: 110 }),
|
2441
|
+
...rest
|
2442
|
+
}) => {
|
2443
|
+
return /* @__PURE__ */ jsx32(layout_default, { title, description, icon, ...rest });
|
2438
2444
|
};
|
2439
|
-
var
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
);
|
2445
|
+
var EmptyStatePage = ({
|
2446
|
+
title = "Halaman tidak ditemukan",
|
2447
|
+
description = "Halaman yang dituju mungkin\n telah berubah atau dihapus.",
|
2448
|
+
icon = /* @__PURE__ */ jsx32(Icon2.Img404, { size: 110 }),
|
2449
|
+
buttonText = "Kembali ke Home",
|
2450
|
+
...rest
|
2451
|
+
}) => {
|
2452
|
+
return /* @__PURE__ */ jsx32(layout_default, { title, description, icon, buttonText, ...rest });
|
2448
2453
|
};
|
2449
|
-
var
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
maxW: 300
|
2457
|
-
}
|
2458
|
-
);
|
2454
|
+
var EmptyStateFilter = ({
|
2455
|
+
title = "Halaman filter tidak ditemukan",
|
2456
|
+
description = "Coba ubah atau reset filter.",
|
2457
|
+
icon = /* @__PURE__ */ jsx32(Icon2.ImgNotFound, { size: 110 }),
|
2458
|
+
...rest
|
2459
|
+
}) => {
|
2460
|
+
return /* @__PURE__ */ jsx32(layout_default, { title, description, icon, ...rest });
|
2459
2461
|
};
|
2460
|
-
var
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
|
2466
|
-
|
2467
|
-
buttonText: "Coba Lagi",
|
2468
|
-
maxW: 250
|
2469
|
-
}
|
2470
|
-
);
|
2462
|
+
var EmptyStateSearch = ({
|
2463
|
+
title = "Pencarian tidak ditemukan",
|
2464
|
+
description = "Keyword yang dicari tidak ditemukan.\n Coba gunakan keyword lainnya.",
|
2465
|
+
icon = /* @__PURE__ */ jsx32(Icon2.ImgNotFound, { size: 110 }),
|
2466
|
+
...rest
|
2467
|
+
}) => {
|
2468
|
+
return /* @__PURE__ */ jsx32(layout_default, { title, description, icon, ...rest });
|
2471
2469
|
};
|
2472
|
-
var
|
2473
|
-
|
2474
|
-
|
2475
|
-
|
2476
|
-
|
2477
|
-
|
2478
|
-
|
2479
|
-
}
|
2480
|
-
);
|
2470
|
+
var EmptyStateNoConnection = ({
|
2471
|
+
title = "Koneksi terputus",
|
2472
|
+
description = "Silakan cek koneksi internet Anda\n dan coba lagi.",
|
2473
|
+
icon = /* @__PURE__ */ jsx32(Icon2.ImgLostConnection, { size: 110 }),
|
2474
|
+
...rest
|
2475
|
+
}) => {
|
2476
|
+
return /* @__PURE__ */ jsx32(layout_default, { title, description, icon, ...rest });
|
2481
2477
|
};
|
2482
|
-
var
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
2486
|
-
|
2487
|
-
|
2488
|
-
|
2489
|
-
maxW: 400,
|
2490
|
-
buttonText: "Kembali ke Home"
|
2491
|
-
}
|
2492
|
-
);
|
2478
|
+
var EmptyStateMaintenance = ({
|
2479
|
+
title = "Sistem sedang dalam perbaikan",
|
2480
|
+
description = "Maaf, sistem kami sedang dalam perbaikan.\n Kami akan segera kembali.",
|
2481
|
+
icon = /* @__PURE__ */ jsx32(Icon2.ImgWarning, { size: 110 }),
|
2482
|
+
...rest
|
2483
|
+
}) => {
|
2484
|
+
return /* @__PURE__ */ jsx32(layout_default, { title, description, icon, ...rest });
|
2493
2485
|
};
|
2494
|
-
|
2495
|
-
|
2496
|
-
|
2497
|
-
|
2498
|
-
|
2499
|
-
|
2500
|
-
|
2486
|
+
var EmptyStateNotAuthorize = ({
|
2487
|
+
title = "Halaman tidak dapat diakses",
|
2488
|
+
description = "Anda tidak memiliki izin untuk mengakses halaman ini.",
|
2489
|
+
icon = /* @__PURE__ */ jsx32(Icon2.ImgWarning, { size: 110 }),
|
2490
|
+
buttonText = "Kembali ke Home",
|
2491
|
+
...rest
|
2492
|
+
}) => {
|
2493
|
+
return /* @__PURE__ */ jsx32(layout_default, { title, description, icon, ...rest, buttonText });
|
2494
|
+
};
|
2495
|
+
var EmptyState2 = layout_default;
|
2496
|
+
EmptyState2.Data = EmptyStateData;
|
2497
|
+
EmptyState2.Page = EmptyStatePage;
|
2498
|
+
EmptyState2.Filter = EmptyStateFilter;
|
2499
|
+
EmptyState2.Search = EmptyStateSearch;
|
2500
|
+
EmptyState2.NoConnection = EmptyStateNoConnection;
|
2501
|
+
EmptyState2.Maintenance = EmptyStateMaintenance;
|
2502
|
+
EmptyState2.NotAuthorize = EmptyStateNotAuthorize;
|
2503
|
+
var empty_state_default = EmptyState2;
|
2501
2504
|
|
2502
2505
|
// src/components/header/components/header.tsx
|
2503
|
-
import { Flex as
|
2506
|
+
import { Flex as Flex6, HStack as HStack3 } from "@chakra-ui/react";
|
2504
2507
|
|
2505
2508
|
// src/components/header/components/logo.tsx
|
2506
|
-
import { Box as
|
2507
|
-
import { jsx as
|
2509
|
+
import { Box as Box15, Image as Image2, useColorModeValue as useColorModeValue2 } from "@chakra-ui/react";
|
2510
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
2508
2511
|
var Logo = ({ url, imageUrl, height }) => {
|
2509
2512
|
if (url)
|
2510
|
-
return /* @__PURE__ */
|
2511
|
-
return /* @__PURE__ */
|
2513
|
+
return /* @__PURE__ */ jsx33(Box15, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ jsx33(Image2, { w: "100%", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl }) });
|
2514
|
+
return /* @__PURE__ */ jsx33(Image2, { w: "100%", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl });
|
2512
2515
|
};
|
2516
|
+
var XMSLogo = () => /* @__PURE__ */ jsx33(
|
2517
|
+
Image2,
|
2518
|
+
{
|
2519
|
+
height: 8,
|
2520
|
+
src: useColorModeValue2("https://assets.voila.id/xms/logo-xms.jpg", "https://assets.voila.id/xms/logo-xms-dark.png")
|
2521
|
+
}
|
2522
|
+
);
|
2523
|
+
var VoilaLogo = () => /* @__PURE__ */ jsx33(
|
2524
|
+
Image2,
|
2525
|
+
{
|
2526
|
+
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
2527
|
+
filter: useColorModeValue2("none", "invert(1)"),
|
2528
|
+
maxW: 24
|
2529
|
+
}
|
2530
|
+
);
|
2513
2531
|
Logo.defaultProps = {
|
2514
2532
|
url: void 0,
|
2515
2533
|
height: void 0
|
@@ -2518,8 +2536,8 @@ Logo.defaultProps = {
|
|
2518
2536
|
// src/components/header/components/profile.tsx
|
2519
2537
|
import {
|
2520
2538
|
Avatar,
|
2521
|
-
Box as
|
2522
|
-
Flex as
|
2539
|
+
Box as Box16,
|
2540
|
+
Flex as Flex5,
|
2523
2541
|
HStack as HStack2,
|
2524
2542
|
Popover,
|
2525
2543
|
PopoverArrow,
|
@@ -2527,78 +2545,127 @@ import {
|
|
2527
2545
|
PopoverContent,
|
2528
2546
|
PopoverTrigger,
|
2529
2547
|
Text as Text8,
|
2530
|
-
useColorModeValue as useColorModeValue3,
|
2531
2548
|
useDisclosure,
|
2532
2549
|
VStack as VStack2
|
2533
2550
|
} from "@chakra-ui/react";
|
2534
2551
|
import { FiPower } from "react-icons/fi";
|
2535
|
-
|
2536
|
-
|
2552
|
+
|
2553
|
+
// src/components/nav-item/components/nav-item.tsx
|
2554
|
+
import { Link as Link2 } from "@chakra-ui/react";
|
2555
|
+
import { cx as cx9 } from "@chakra-ui/shared-utils";
|
2556
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
2557
|
+
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
2558
|
+
return /* @__PURE__ */ jsx34(
|
2559
|
+
Link2,
|
2560
|
+
{
|
2561
|
+
"data-test-id": props["data-test-id"],
|
2562
|
+
opacity: isDisabled ? "0.3" : "initial",
|
2563
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
2564
|
+
h: "7.5",
|
2565
|
+
display: "flex",
|
2566
|
+
justifyContent: "space-between",
|
2567
|
+
alignItems: "center",
|
2568
|
+
w: "full",
|
2569
|
+
p: "2",
|
2570
|
+
pl: isChild ? "7" : "2",
|
2571
|
+
color: isActive ? "primary.500" : "black.high",
|
2572
|
+
bg: isActive ? "primary.100" : "white",
|
2573
|
+
className: cx9("catalyst-nav-item", props.className),
|
2574
|
+
textStyle: "text.xs",
|
2575
|
+
fontWeight: isActive ? "semibold" : "regular",
|
2576
|
+
rounded: "sm",
|
2577
|
+
_active: isDisabled ? {} : {
|
2578
|
+
bg: "primary.100"
|
2579
|
+
},
|
2580
|
+
_hover: isDisabled ? {} : {
|
2581
|
+
textDecoration: "none",
|
2582
|
+
bg: isActive ? "primary.100" : "primary.50"
|
2583
|
+
},
|
2584
|
+
...props,
|
2585
|
+
onClick: isDisabled ? void 0 : props.onClick,
|
2586
|
+
children
|
2587
|
+
}
|
2588
|
+
);
|
2589
|
+
};
|
2590
|
+
NavItem.displayName = "NavItem";
|
2591
|
+
NavItem.defaultProps = {
|
2592
|
+
isActive: false,
|
2593
|
+
isChild: false,
|
2594
|
+
isDisabled: false,
|
2595
|
+
"data-test-id": void 0
|
2596
|
+
};
|
2597
|
+
|
2598
|
+
// src/components/header/components/profile.tsx
|
2599
|
+
import { Fragment as Fragment2, jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
|
2600
|
+
var Profile = ({ color: color2, brandColor, data, badgeStyle, children, onLogout, ...props }) => {
|
2537
2601
|
var _a;
|
2538
2602
|
const { isOpen, onToggle, onClose } = useDisclosure();
|
2539
|
-
return /* @__PURE__ */
|
2540
|
-
/* @__PURE__ */
|
2541
|
-
|
2603
|
+
return /* @__PURE__ */ jsxs14(Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
2604
|
+
/* @__PURE__ */ jsx35(
|
2605
|
+
Box16,
|
2542
2606
|
{
|
2543
|
-
"data-test-id": "
|
2607
|
+
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
2544
2608
|
as: "button",
|
2545
2609
|
cursor: "pointer",
|
2546
|
-
|
2547
|
-
_hover: {
|
2548
|
-
|
2610
|
+
w: "fit-content",
|
2611
|
+
_hover: {
|
2612
|
+
textDecor: "none",
|
2613
|
+
".catalyst-header-avatar": {
|
2614
|
+
border: "2px solid",
|
2615
|
+
borderColor: "primary.100"
|
2616
|
+
}
|
2617
|
+
},
|
2549
2618
|
onClick: onToggle,
|
2550
2619
|
color: color2,
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
2554
|
-
/* @__PURE__ */
|
2555
|
-
|
2556
|
-
|
2557
|
-
|
2558
|
-
/* @__PURE__ */
|
2559
|
-
|
2560
|
-
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2620
|
+
...props,
|
2621
|
+
children: /* @__PURE__ */ jsxs14(HStack2, { children: [
|
2622
|
+
/* @__PURE__ */ jsxs14(VStack2, { alignItems: "flex-end", spacing: "0", ml: "2", color: color2, children: [
|
2623
|
+
/* @__PURE__ */ jsx35(Text8, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
2624
|
+
/* @__PURE__ */ jsxs14(Flex5, { alignItems: "center", children: [
|
2625
|
+
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
2626
|
+
/* @__PURE__ */ jsx35(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
2627
|
+
/* @__PURE__ */ jsx35(
|
2628
|
+
Box16,
|
2629
|
+
{
|
2630
|
+
className: "catalyst_header-profile-divider",
|
2631
|
+
h: "3",
|
2632
|
+
mx: "1",
|
2633
|
+
borderLeft: "1px solid",
|
2634
|
+
borderColor: "neutral.400"
|
2635
|
+
}
|
2636
|
+
)
|
2637
|
+
] }),
|
2638
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
2639
|
+
/* @__PURE__ */ jsx35(Text8, { textStyle: "text.xs", children: data.office[0] }),
|
2640
|
+
data.office.length > 1 && /* @__PURE__ */ jsxs14(
|
2641
|
+
badge_default,
|
2642
|
+
{
|
2643
|
+
ml: "1",
|
2644
|
+
pill: true,
|
2645
|
+
variant: "neutral-light",
|
2646
|
+
boxSize: "4.5",
|
2647
|
+
justifyContent: "center",
|
2648
|
+
p: "0.5",
|
2649
|
+
...badgeStyle,
|
2650
|
+
children: [
|
2651
|
+
data.office.length - 1,
|
2652
|
+
"+"
|
2653
|
+
]
|
2654
|
+
}
|
2655
|
+
)
|
2656
|
+
] }) : /* @__PURE__ */ jsx35(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
2564
2657
|
] })
|
2565
2658
|
] }),
|
2566
|
-
/* @__PURE__ */
|
2567
|
-
Avatar,
|
2568
|
-
{
|
2569
|
-
size: "sm",
|
2570
|
-
bg: brandColor,
|
2571
|
-
color: "white",
|
2572
|
-
name: (_a = data == null ? void 0 : data.name) != null ? _a : data == null ? void 0 : data.email,
|
2573
|
-
border: "2px solid",
|
2574
|
-
_hover: {
|
2575
|
-
borderColor: "primary.50"
|
2576
|
-
}
|
2577
|
-
}
|
2578
|
-
) })
|
2659
|
+
/* @__PURE__ */ jsx35(PopoverTrigger, { children: /* @__PURE__ */ jsx35(Box16, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ jsx35(Avatar, { size: "sm", bg: brandColor, color: "white", name: (_a = data == null ? void 0 : data.name) != null ? _a : data == null ? void 0 : data.email }) }) })
|
2579
2660
|
] })
|
2580
2661
|
}
|
2581
2662
|
),
|
2582
|
-
/* @__PURE__ */
|
2583
|
-
/* @__PURE__ */
|
2584
|
-
/* @__PURE__ */
|
2585
|
-
|
2586
|
-
{
|
2587
|
-
|
2588
|
-
alignItems: "center",
|
2589
|
-
px: 3,
|
2590
|
-
py: 2,
|
2591
|
-
borderRadius: "sm",
|
2592
|
-
cursor: "pointer",
|
2593
|
-
_hover: { bg: useColorModeValue3("primary.500", "mirage.900"), color: "white" },
|
2594
|
-
onClick: onLogout,
|
2595
|
-
textStyle: "text.xs",
|
2596
|
-
children: [
|
2597
|
-
/* @__PURE__ */ jsx33(FiPower, {}),
|
2598
|
-
/* @__PURE__ */ jsx33(Text8, { ml: 2, children: "Logout" })
|
2599
|
-
]
|
2600
|
-
}
|
2601
|
-
) })
|
2663
|
+
children || /* @__PURE__ */ jsxs14(PopoverContent, { bg: "white", maxW: 200, children: [
|
2664
|
+
/* @__PURE__ */ jsx35(PopoverArrow, { bg: "white" }),
|
2665
|
+
/* @__PURE__ */ jsx35(PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ jsx35(NavItem, { "data-test-id": "CTA_Navbar_logout-button", onClick: onLogout, rounded: "none", px: "4", children: /* @__PURE__ */ jsxs14(Box16, { display: "flex", alignItems: "center", children: [
|
2666
|
+
/* @__PURE__ */ jsx35(FiPower, {}),
|
2667
|
+
/* @__PURE__ */ jsx35(Text8, { ml: "2", children: "Logout" })
|
2668
|
+
] }) }) })
|
2602
2669
|
] })
|
2603
2670
|
] });
|
2604
2671
|
};
|
@@ -2606,22 +2673,21 @@ Profile.defaultProps = {
|
|
2606
2673
|
brandColor: "primary.500",
|
2607
2674
|
data: void 0,
|
2608
2675
|
onLogout: void 0,
|
2609
|
-
|
2676
|
+
badgeStyle: void 0
|
2610
2677
|
};
|
2611
|
-
var profile_default = Profile;
|
2612
2678
|
|
2613
2679
|
// src/components/header/components/switch-mode.tsx
|
2614
|
-
import { Box as
|
2680
|
+
import { Box as Box17, useColorMode as useColorMode2 } from "@chakra-ui/react";
|
2615
2681
|
import { FiMoon, FiSun } from "react-icons/fi";
|
2616
|
-
import { jsx as
|
2682
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
2617
2683
|
var SwitchMode = () => {
|
2618
2684
|
const { colorMode, toggleColorMode } = useColorMode2();
|
2619
|
-
return /* @__PURE__ */
|
2685
|
+
return /* @__PURE__ */ jsx36(Box17, { "data-test-id": "rhYuTDCiWkFqr96upiEEh", mx: 5, onClick: toggleColorMode, cursor: "pointer", children: colorMode === "light" ? /* @__PURE__ */ jsx36(FiMoon, { size: 20 }) : /* @__PURE__ */ jsx36(FiSun, { size: 20 }) });
|
2620
2686
|
};
|
2621
2687
|
var switch_mode_default = SwitchMode;
|
2622
2688
|
|
2623
2689
|
// src/components/header/components/version.tsx
|
2624
|
-
import { Box as
|
2690
|
+
import { Box as Box18 } from "@chakra-ui/react";
|
2625
2691
|
|
2626
2692
|
// src/components/header/utils/formatter.ts
|
2627
2693
|
function environmentName(env2) {
|
@@ -2636,22 +2702,30 @@ function environmentName(env2) {
|
|
2636
2702
|
}
|
2637
2703
|
|
2638
2704
|
// src/components/header/components/version.tsx
|
2639
|
-
import { Fragment as Fragment3, jsx as
|
2640
|
-
var Version = ({
|
2641
|
-
|
2705
|
+
import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
2706
|
+
var Version = ({
|
2707
|
+
hideEnv,
|
2708
|
+
version,
|
2709
|
+
environment,
|
2710
|
+
onOpenModalRelease,
|
2711
|
+
versionStyle
|
2712
|
+
}) => /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
2713
|
+
typeof version === "string" ? /* @__PURE__ */ jsx37(
|
2642
2714
|
badge_default,
|
2643
2715
|
{
|
2716
|
+
"data-test-id": "CTA_header-version-badge",
|
2644
2717
|
fontSize: "8px",
|
2645
|
-
"data-test-id": "dzl3esjhCphobaaIXpiUE",
|
2646
2718
|
variant: "neutral-light",
|
2719
|
+
px: "2",
|
2720
|
+
py: "px",
|
2647
2721
|
onClick: onOpenModalRelease,
|
2648
2722
|
cursor: onOpenModalRelease ? "pointer" : "auto",
|
2649
2723
|
...versionStyle,
|
2650
2724
|
children: version
|
2651
2725
|
}
|
2652
|
-
),
|
2653
|
-
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */
|
2654
|
-
|
2726
|
+
) : version,
|
2727
|
+
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ jsx37(
|
2728
|
+
Box18,
|
2655
2729
|
{
|
2656
2730
|
background: "primary.50",
|
2657
2731
|
color: "primary.500",
|
@@ -2671,10 +2745,9 @@ Version.defaultProps = {
|
|
2671
2745
|
onOpenModalRelease: void 0,
|
2672
2746
|
versionStyle: void 0
|
2673
2747
|
};
|
2674
|
-
var version_default = Version;
|
2675
2748
|
|
2676
2749
|
// src/components/header/components/header.tsx
|
2677
|
-
import { jsx as
|
2750
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
2678
2751
|
var Header = ({
|
2679
2752
|
brandColor,
|
2680
2753
|
data,
|
@@ -2692,8 +2765,8 @@ var Header = ({
|
|
2692
2765
|
bg = "white",
|
2693
2766
|
versionStyle,
|
2694
2767
|
...props
|
2695
|
-
}) => /* @__PURE__ */
|
2696
|
-
|
2768
|
+
}) => /* @__PURE__ */ jsx38(Flex6, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ jsxs16(
|
2769
|
+
Flex6,
|
2697
2770
|
{
|
2698
2771
|
h: "auto",
|
2699
2772
|
w: "full",
|
@@ -2701,14 +2774,14 @@ var Header = ({
|
|
2701
2774
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
2702
2775
|
pos: "relative",
|
2703
2776
|
children: [
|
2704
|
-
mainLogo && /* @__PURE__ */
|
2705
|
-
/* @__PURE__ */
|
2777
|
+
mainLogo && /* @__PURE__ */ jsxs16(Flex6, { alignItems: "center", children: [
|
2778
|
+
/* @__PURE__ */ jsx38(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
2706
2779
|
children && children
|
2707
2780
|
] }),
|
2708
|
-
centerLogo && /* @__PURE__ */
|
2709
|
-
/* @__PURE__ */
|
2710
|
-
/* @__PURE__ */
|
2711
|
-
|
2781
|
+
centerLogo && /* @__PURE__ */ jsxs16(HStack3, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
2782
|
+
/* @__PURE__ */ jsx38(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
2783
|
+
/* @__PURE__ */ jsx38(
|
2784
|
+
Version,
|
2712
2785
|
{
|
2713
2786
|
hideEnv,
|
2714
2787
|
version: data == null ? void 0 : data.version,
|
@@ -2718,9 +2791,9 @@ var Header = ({
|
|
2718
2791
|
}
|
2719
2792
|
)
|
2720
2793
|
] }),
|
2721
|
-
profile || /* @__PURE__ */
|
2722
|
-
!hideSwitchMode && /* @__PURE__ */
|
2723
|
-
/* @__PURE__ */
|
2794
|
+
profile || /* @__PURE__ */ jsxs16(Flex6, { alignItems: "center", children: [
|
2795
|
+
!hideSwitchMode && /* @__PURE__ */ jsx38(switch_mode_default, {}),
|
2796
|
+
/* @__PURE__ */ jsx38(Profile, { color: props.color, brandColor, data, onLogout })
|
2724
2797
|
] })
|
2725
2798
|
]
|
2726
2799
|
}
|
@@ -2740,21 +2813,44 @@ Header.defaultProps = {
|
|
2740
2813
|
profile: void 0,
|
2741
2814
|
versionStyle: void 0
|
2742
2815
|
};
|
2743
|
-
|
2816
|
+
|
2817
|
+
// src/components/header/components/navbar.tsx
|
2818
|
+
import { Flex as Flex7 } from "@chakra-ui/react";
|
2819
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
2820
|
+
var Navbar = ({ bg = "white", children, ...props }) => {
|
2821
|
+
return /* @__PURE__ */ jsx39(
|
2822
|
+
Flex7,
|
2823
|
+
{
|
2824
|
+
minH: "15",
|
2825
|
+
h: "15",
|
2826
|
+
w: "full",
|
2827
|
+
bg,
|
2828
|
+
shadow: "raised",
|
2829
|
+
px: 6,
|
2830
|
+
py: 2,
|
2831
|
+
alignItems: "center",
|
2832
|
+
position: "relative",
|
2833
|
+
justifyContent: "space-between",
|
2834
|
+
...props,
|
2835
|
+
children
|
2836
|
+
}
|
2837
|
+
);
|
2838
|
+
};
|
2839
|
+
Navbar.displayName = "Navbar";
|
2744
2840
|
|
2745
2841
|
// src/components/image/index.ts
|
2746
|
-
import { Icon as
|
2842
|
+
import { Icon as Icon3, IconProps, Image as Image3, ImageProps } from "@chakra-ui/react";
|
2747
2843
|
|
2748
2844
|
// src/components/layouting/index.ts
|
2749
2845
|
import {
|
2750
|
-
Box as
|
2846
|
+
Box as Box19,
|
2751
2847
|
BoxProps,
|
2752
2848
|
Center,
|
2753
2849
|
Container,
|
2754
2850
|
ContainerProps,
|
2755
2851
|
Divider,
|
2756
2852
|
DividerProps,
|
2757
|
-
Flex as
|
2853
|
+
Flex as Flex8,
|
2758
2854
|
FlexProps,
|
2759
2855
|
Grid,
|
2760
2856
|
GridItem,
|
@@ -2777,13 +2873,13 @@ import { List, ListIcon, ListItem, ListItemProps, ListProps, OrderedList, Unorde
|
|
2777
2873
|
|
2778
2874
|
// src/components/modal/components/modal-back-button.tsx
|
2779
2875
|
import { ChevronLeftIcon } from "@chakra-ui/icons";
|
2780
|
-
import { IconButton as
|
2781
|
-
import { jsx as
|
2876
|
+
import { IconButton as IconButton5 } from "@chakra-ui/react";
|
2877
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
2782
2878
|
var ModalBackButton = ({ onClick }) => {
|
2783
|
-
return /* @__PURE__ */
|
2784
|
-
|
2879
|
+
return /* @__PURE__ */ jsx40(
|
2880
|
+
IconButton5,
|
2785
2881
|
{
|
2786
|
-
icon: /* @__PURE__ */
|
2882
|
+
icon: /* @__PURE__ */ jsx40(ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
2787
2883
|
size: "sm",
|
2788
2884
|
minW: "6",
|
2789
2885
|
h: "6",
|
@@ -2801,20 +2897,20 @@ var ModalBackButton = ({ onClick }) => {
|
|
2801
2897
|
var modal_back_button_default = ModalBackButton;
|
2802
2898
|
|
2803
2899
|
// src/components/modal/components/modal-body.tsx
|
2804
|
-
import { ModalBody as ChakraModalBody, useColorModeValue as
|
2900
|
+
import { ModalBody as ChakraModalBody, useColorModeValue as useColorModeValue3 } from "@chakra-ui/react";
|
2805
2901
|
import React9 from "react";
|
2806
|
-
import { jsx as
|
2902
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
2807
2903
|
var ModalBody2 = React9.forwardRef(({ children, ...rest }, ref) => {
|
2808
|
-
return /* @__PURE__ */
|
2904
|
+
return /* @__PURE__ */ jsx41(ChakraModalBody, { px: 4, py: 2, ref, background: useColorModeValue3("white", "mirage.900"), ...rest, children });
|
2809
2905
|
});
|
2810
2906
|
var modal_body_default = ModalBody2;
|
2811
2907
|
|
2812
2908
|
// src/components/modal/components/modal-close-button.tsx
|
2813
|
-
import { ModalCloseButton as ChakraModalCloseButton, useColorModeValue as
|
2909
|
+
import { ModalCloseButton as ChakraModalCloseButton, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
|
2814
2910
|
import { forwardRef as forwardRef9 } from "react";
|
2815
|
-
import { jsx as
|
2911
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
2816
2912
|
var ModalCloseButton = forwardRef9((props, ref) => {
|
2817
|
-
return /* @__PURE__ */
|
2913
|
+
return /* @__PURE__ */ jsx42(
|
2818
2914
|
ChakraModalCloseButton,
|
2819
2915
|
{
|
2820
2916
|
ref,
|
@@ -2822,7 +2918,7 @@ var ModalCloseButton = forwardRef9((props, ref) => {
|
|
2822
2918
|
right: 2,
|
2823
2919
|
size: "sm",
|
2824
2920
|
"data-test-id": "modal-close-button",
|
2825
|
-
background:
|
2921
|
+
background: useColorModeValue4("neutral.50", "mirage.900"),
|
2826
2922
|
...props
|
2827
2923
|
}
|
2828
2924
|
);
|
@@ -2830,15 +2926,15 @@ var ModalCloseButton = forwardRef9((props, ref) => {
|
|
2830
2926
|
var modal_close_button_default = ModalCloseButton;
|
2831
2927
|
|
2832
2928
|
// src/components/modal/components/modal-footer.tsx
|
2833
|
-
import { ModalFooter as ChakraModalFooter, useColorModeValue as
|
2929
|
+
import { ModalFooter as ChakraModalFooter, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
|
2834
2930
|
import { forwardRef as forwardRef10 } from "react";
|
2835
|
-
import { jsx as
|
2931
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
2836
2932
|
var ModalFooter2 = forwardRef10(({ children, ...rest }, ref) => {
|
2837
|
-
return /* @__PURE__ */
|
2933
|
+
return /* @__PURE__ */ jsx43(
|
2838
2934
|
ChakraModalFooter,
|
2839
2935
|
{
|
2840
2936
|
ref,
|
2841
|
-
background:
|
2937
|
+
background: useColorModeValue5("neutral.200", "mirage.900"),
|
2842
2938
|
borderBottomRadius: "sm",
|
2843
2939
|
...rest,
|
2844
2940
|
children
|
@@ -2848,15 +2944,15 @@ var ModalFooter2 = forwardRef10(({ children, ...rest }, ref) => {
|
|
2848
2944
|
var modal_footer_default = ModalFooter2;
|
2849
2945
|
|
2850
2946
|
// src/components/modal/components/modal-header.tsx
|
2851
|
-
import { ModalHeader as ChakraModalHeader, useColorModeValue as
|
2947
|
+
import { ModalHeader as ChakraModalHeader, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
|
2852
2948
|
import { forwardRef as forwardRef11 } from "react";
|
2853
|
-
import { jsx as
|
2949
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
2854
2950
|
var ModalHeader2 = forwardRef11(({ children, ...rest }, ref) => {
|
2855
|
-
return /* @__PURE__ */
|
2951
|
+
return /* @__PURE__ */ jsx44(
|
2856
2952
|
ChakraModalHeader,
|
2857
2953
|
{
|
2858
2954
|
ref,
|
2859
|
-
background:
|
2955
|
+
background: useColorModeValue6("neutral.200", "mirage.900"),
|
2860
2956
|
borderTopRadius: "sm",
|
2861
2957
|
fontSize: "text.lg",
|
2862
2958
|
fontWeight: "400",
|
@@ -2907,90 +3003,45 @@ import {
|
|
2907
3003
|
useModalStyles
|
2908
3004
|
} from "@chakra-ui/react";
|
2909
3005
|
|
2910
|
-
// src/components/nav-item/components/nav-item.tsx
|
2911
|
-
import { Link as Link2 } from "@chakra-ui/react";
|
2912
|
-
import { cx as cx9 } from "@chakra-ui/shared-utils";
|
2913
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
2914
|
-
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
2915
|
-
return /* @__PURE__ */ jsx42(
|
2916
|
-
Link2,
|
2917
|
-
{
|
2918
|
-
"data-test-id": props["data-test-id"],
|
2919
|
-
opacity: isDisabled ? "0.3" : "initial",
|
2920
|
-
cursor: isDisabled ? "not-allowed" : "pointer",
|
2921
|
-
h: "7.5",
|
2922
|
-
display: "flex",
|
2923
|
-
justifyContent: "space-between",
|
2924
|
-
alignItems: "center",
|
2925
|
-
w: "full",
|
2926
|
-
p: "2",
|
2927
|
-
pl: isChild ? "7" : "2",
|
2928
|
-
color: isActive ? "primary.500" : "black.high",
|
2929
|
-
bg: isActive ? "primary.100" : "white",
|
2930
|
-
className: cx9("catalyst-nav-item", props.className),
|
2931
|
-
textStyle: "text.xs",
|
2932
|
-
fontWeight: isActive ? "semibold" : "regular",
|
2933
|
-
rounded: "sm",
|
2934
|
-
_active: isDisabled ? {} : {
|
2935
|
-
bg: "primary.100"
|
2936
|
-
},
|
2937
|
-
_hover: isDisabled ? {} : {
|
2938
|
-
textDecoration: "none",
|
2939
|
-
bg: isActive ? "primary.100" : "primary.50"
|
2940
|
-
},
|
2941
|
-
...props,
|
2942
|
-
onClick: isDisabled ? void 0 : props.onClick,
|
2943
|
-
children
|
2944
|
-
}
|
2945
|
-
);
|
2946
|
-
};
|
2947
|
-
NavItem.displayName = "NavItem";
|
2948
|
-
NavItem.defaultProps = {
|
2949
|
-
isActive: false,
|
2950
|
-
isChild: false,
|
2951
|
-
isDisabled: false,
|
2952
|
-
"data-test-id": void 0
|
2953
|
-
};
|
2954
|
-
|
2955
3006
|
// src/components/navigation/components/navigation.tsx
|
2956
3007
|
import {
|
2957
|
-
Box as
|
3008
|
+
Box as Box21,
|
2958
3009
|
Button as Button3,
|
2959
|
-
Flex as
|
3010
|
+
Flex as Flex9,
|
2960
3011
|
Link as Link3,
|
2961
3012
|
Popover as Popover2,
|
2962
3013
|
PopoverContent as PopoverContent2,
|
2963
3014
|
PopoverTrigger as PopoverTrigger2,
|
2964
3015
|
Portal,
|
2965
3016
|
Text as Text9,
|
2966
|
-
useColorModeValue as
|
3017
|
+
useColorModeValue as useColorModeValue7
|
2967
3018
|
} from "@chakra-ui/react";
|
2968
|
-
import * as
|
3019
|
+
import * as Icon5 from "@ctlyst.id/internal-icon";
|
2969
3020
|
import { css as css3 } from "@emotion/react";
|
2970
3021
|
|
2971
3022
|
// src/components/navigation/components/mapping-icon.tsx
|
2972
|
-
import * as
|
2973
|
-
import { jsx as
|
3023
|
+
import * as Icon4 from "@ctlyst.id/internal-icon";
|
3024
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
2974
3025
|
var mappingIcon = /* @__PURE__ */ new Map([
|
2975
|
-
["Order", /* @__PURE__ */
|
2976
|
-
["Fulfillment", /* @__PURE__ */
|
2977
|
-
["Transfer Stock", /* @__PURE__ */
|
2978
|
-
["Stock", /* @__PURE__ */
|
2979
|
-
["Product Database", /* @__PURE__ */
|
2980
|
-
["Purchasing", /* @__PURE__ */
|
2981
|
-
["Reseller", /* @__PURE__ */
|
2982
|
-
["Retur", /* @__PURE__ */
|
2983
|
-
["Other", /* @__PURE__ */
|
2984
|
-
["Content", /* @__PURE__ */
|
2985
|
-
["Customer", /* @__PURE__ */
|
2986
|
-
["Voucher", /* @__PURE__ */
|
3026
|
+
["Order", /* @__PURE__ */ jsx45(Icon4.ShoppingBag, { size: 4, color: "inherit" }, "order")],
|
3027
|
+
["Fulfillment", /* @__PURE__ */ jsx45(Icon4.ShoppingCart, { size: 4, color: "inherit" }, "fullfilment")],
|
3028
|
+
["Transfer Stock", /* @__PURE__ */ jsx45(Icon4.Repeat, { size: 4, color: "inherit" }, "transfer-stock")],
|
3029
|
+
["Stock", /* @__PURE__ */ jsx45(Icon4.Box, { size: 4, color: "inherit" }, "stock")],
|
3030
|
+
["Product Database", /* @__PURE__ */ jsx45(Icon4.Layers, { size: 4, color: "inherit" }, "product-database")],
|
3031
|
+
["Purchasing", /* @__PURE__ */ jsx45(Icon4.DollarSign, { size: 4, color: "inherit" }, "purchasing")],
|
3032
|
+
["Reseller", /* @__PURE__ */ jsx45(Icon4.Users, { size: 4, color: "inherit" }, "reseller")],
|
3033
|
+
["Retur", /* @__PURE__ */ jsx45(Icon4.RotateCcw, { size: 4, color: "inherit" }, "retur")],
|
3034
|
+
["Other", /* @__PURE__ */ jsx45(Icon4.Settings, { size: 4, color: "inherit" }, "other")],
|
3035
|
+
["Content", /* @__PURE__ */ jsx45(Icon4.Layout, { size: 4, color: "inherit" }, "content")],
|
3036
|
+
["Customer", /* @__PURE__ */ jsx45(Icon4.HelpCircle, { size: 4, color: "inherit" }, "content")],
|
3037
|
+
["Voucher", /* @__PURE__ */ jsx45(Icon4.Gift, { size: 4, color: "inherit" }, "content")]
|
2987
3038
|
]);
|
2988
3039
|
|
2989
3040
|
// src/components/navigation/components/navigation.tsx
|
2990
|
-
import { Fragment as Fragment4, jsx as
|
3041
|
+
import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
|
2991
3042
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
2992
|
-
return /* @__PURE__ */
|
2993
|
-
|
3043
|
+
return /* @__PURE__ */ jsx46(Box21, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ jsx46(
|
3044
|
+
Flex9,
|
2994
3045
|
{
|
2995
3046
|
bg: "white",
|
2996
3047
|
w: "full",
|
@@ -3004,8 +3055,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3004
3055
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
3005
3056
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
3006
3057
|
const activeBg = isActive ? "primary.500" : void 0;
|
3007
|
-
return /* @__PURE__ */
|
3008
|
-
/* @__PURE__ */
|
3058
|
+
return /* @__PURE__ */ jsx46(Popover2, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
3059
|
+
/* @__PURE__ */ jsx46(PopoverTrigger2, { children: /* @__PURE__ */ jsx46(
|
3009
3060
|
Button3,
|
3010
3061
|
{
|
3011
3062
|
h: 7.5,
|
@@ -3019,14 +3070,14 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3019
3070
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
3020
3071
|
color: isActive ? "primary.50" : "black.high",
|
3021
3072
|
leftIcon: mappingIcon.get(navigation.title),
|
3022
|
-
rightIcon: /* @__PURE__ */
|
3073
|
+
rightIcon: /* @__PURE__ */ jsx46(Icon5.ChevronDown, { size: 4, color: "inherit" }),
|
3023
3074
|
children: navigation.title
|
3024
3075
|
}
|
3025
3076
|
) }),
|
3026
|
-
navigation.children && /* @__PURE__ */
|
3077
|
+
navigation.children && /* @__PURE__ */ jsx46(Portal, { children: /* @__PURE__ */ jsx46(Box21, { zIndex: "popover", children: /* @__PURE__ */ jsx46(
|
3027
3078
|
PopoverContent2,
|
3028
3079
|
{
|
3029
|
-
bg:
|
3080
|
+
bg: useColorModeValue7("white", "ebony-clay.800"),
|
3030
3081
|
maxW: 250,
|
3031
3082
|
border: "none",
|
3032
3083
|
borderRadius: "md",
|
@@ -3035,7 +3086,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3035
3086
|
const link = navHost ? `${navHost}${navLink}` : navLink;
|
3036
3087
|
const isLocalLink = host === navHost;
|
3037
3088
|
const isActiveSub = activePath === navLink;
|
3038
|
-
return /* @__PURE__ */
|
3089
|
+
return /* @__PURE__ */ jsx46(
|
3039
3090
|
Link3,
|
3040
3091
|
{
|
3041
3092
|
as: isLocalLink ? as : void 0,
|
@@ -3043,8 +3094,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3043
3094
|
_hover: {
|
3044
3095
|
textDecoration: "none"
|
3045
3096
|
},
|
3046
|
-
children: /* @__PURE__ */
|
3047
|
-
|
3097
|
+
children: /* @__PURE__ */ jsxs17(
|
3098
|
+
Box21,
|
3048
3099
|
{
|
3049
3100
|
display: "flex",
|
3050
3101
|
position: "relative",
|
@@ -3052,8 +3103,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3052
3103
|
cursor: "pointer",
|
3053
3104
|
transition: "padding 0.35s ease 0s",
|
3054
3105
|
_hover: {
|
3055
|
-
backgroundColor:
|
3056
|
-
color:
|
3106
|
+
backgroundColor: useColorModeValue7("dove-gray.50", "mirage.900"),
|
3107
|
+
color: useColorModeValue7("primary.500", "dove-gray.600"),
|
3057
3108
|
px: 5,
|
3058
3109
|
py: 4,
|
3059
3110
|
_first: { borderTopRadius: "md" },
|
@@ -3067,9 +3118,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3067
3118
|
py: 4,
|
3068
3119
|
children: [
|
3069
3120
|
mappingIcon.get(navigation.title),
|
3070
|
-
/* @__PURE__ */
|
3071
|
-
isActiveSub && /* @__PURE__ */
|
3072
|
-
|
3121
|
+
/* @__PURE__ */ jsx46(Text9, { fontSize: "text.sm", ml: 3, children: title }),
|
3122
|
+
isActiveSub && /* @__PURE__ */ jsx46(
|
3123
|
+
Box21,
|
3073
3124
|
{
|
3074
3125
|
width: 0.5,
|
3075
3126
|
height: 8,
|
@@ -3102,9 +3153,9 @@ Navigation.defaultProps = {
|
|
3102
3153
|
var navigation_default = Navigation;
|
3103
3154
|
|
3104
3155
|
// src/components/navigation/components/navigation-bar.tsx
|
3105
|
-
import { Box as
|
3106
|
-
import * as
|
3107
|
-
import { Fragment as Fragment5, jsx as
|
3156
|
+
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
|
+
import * as Icon6 from "@ctlyst.id/internal-icon";
|
3158
|
+
import { Fragment as Fragment5, jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
|
3108
3159
|
var NavigationBar = ({
|
3109
3160
|
navigations,
|
3110
3161
|
isFetched,
|
@@ -3119,8 +3170,8 @@ var NavigationBar = ({
|
|
3119
3170
|
}
|
3120
3171
|
return subMenu.navHost + subMenu.navLink;
|
3121
3172
|
};
|
3122
|
-
return /* @__PURE__ */
|
3123
|
-
|
3173
|
+
return /* @__PURE__ */ jsx47(Box22, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ jsx47(
|
3174
|
+
Flex10,
|
3124
3175
|
{
|
3125
3176
|
bg: "white",
|
3126
3177
|
w: "full",
|
@@ -3136,8 +3187,8 @@ var NavigationBar = ({
|
|
3136
3187
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
3137
3188
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
3138
3189
|
const activeBg = isActive ? "primary.500" : void 0;
|
3139
|
-
return /* @__PURE__ */
|
3140
|
-
/* @__PURE__ */
|
3190
|
+
return /* @__PURE__ */ jsx47(Popover3, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
3191
|
+
/* @__PURE__ */ jsx47(PopoverTrigger3, { children: /* @__PURE__ */ jsx47(
|
3141
3192
|
Button4,
|
3142
3193
|
{
|
3143
3194
|
h: 7.5,
|
@@ -3151,11 +3202,11 @@ var NavigationBar = ({
|
|
3151
3202
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
3152
3203
|
color: isActive ? "primary.50" : "black.high",
|
3153
3204
|
leftIcon: mappingIcon2.get(item.title),
|
3154
|
-
rightIcon: /* @__PURE__ */
|
3205
|
+
rightIcon: /* @__PURE__ */ jsx47(Icon6.ChevronDown, { size: 4, color: "inherit" }),
|
3155
3206
|
children: item.title
|
3156
3207
|
}
|
3157
3208
|
) }),
|
3158
|
-
item.children && /* @__PURE__ */
|
3209
|
+
item.children && /* @__PURE__ */ jsx47(PopoverContent3, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ jsxs18(
|
3159
3210
|
Link4,
|
3160
3211
|
{
|
3161
3212
|
href: urlMenu(subMenu),
|
@@ -3173,7 +3224,7 @@ var NavigationBar = ({
|
|
3173
3224
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
3174
3225
|
children: [
|
3175
3226
|
mappingIcon2.get(item.title),
|
3176
|
-
/* @__PURE__ */
|
3227
|
+
/* @__PURE__ */ jsx47(Text10, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
3177
3228
|
]
|
3178
3229
|
},
|
3179
3230
|
subMenu.id
|
@@ -3190,17 +3241,17 @@ var navigation_bar_default = NavigationBar;
|
|
3190
3241
|
|
3191
3242
|
// src/components/pagination/components/pagination.tsx
|
3192
3243
|
import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon } from "@chakra-ui/icons";
|
3193
|
-
import { Box as
|
3244
|
+
import { Box as Box23, Text as Text11, useColorModeValue as useColorModeValue9 } from "@chakra-ui/react";
|
3194
3245
|
|
3195
3246
|
// src/components/pagination/components/pagination-button.tsx
|
3196
|
-
import { Button as Button5, forwardRef as forwardRef12, useColorModeValue as
|
3197
|
-
import { jsx as
|
3247
|
+
import { Button as Button5, forwardRef as forwardRef12, useColorModeValue as useColorModeValue8 } from "@chakra-ui/react";
|
3248
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
3198
3249
|
var PaginationButton = forwardRef12(({ className, style, isActive, children, ...rest }, ref) => {
|
3199
|
-
const btnBg =
|
3200
|
-
const btnColor =
|
3201
|
-
const btnNotActiveBg =
|
3202
|
-
const btnNotActiveColor =
|
3203
|
-
return /* @__PURE__ */
|
3250
|
+
const btnBg = useColorModeValue8("neutral.300", "mirage.900");
|
3251
|
+
const btnColor = useColorModeValue8("black.high", "primary.300");
|
3252
|
+
const btnNotActiveBg = useColorModeValue8("secondary.50", "primary.500");
|
3253
|
+
const btnNotActiveColor = useColorModeValue8("primary.500", "white");
|
3254
|
+
return /* @__PURE__ */ jsx48(
|
3204
3255
|
Button5,
|
3205
3256
|
{
|
3206
3257
|
"data-test-id": "Pagination-Button",
|
@@ -3222,7 +3273,7 @@ var PaginationButton = forwardRef12(({ className, style, isActive, children, ...
|
|
3222
3273
|
color: btnNotActiveColor
|
3223
3274
|
} : {},
|
3224
3275
|
_disabled: {
|
3225
|
-
background:
|
3276
|
+
background: useColorModeValue8("neutral.300", "mirage.900"),
|
3226
3277
|
color: "neutral.600",
|
3227
3278
|
pointerEvents: "none"
|
3228
3279
|
},
|
@@ -3239,15 +3290,15 @@ var pagination_button_default = PaginationButton;
|
|
3239
3290
|
|
3240
3291
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
3241
3292
|
import { VisuallyHidden } from "@chakra-ui/react";
|
3242
|
-
import { jsx as
|
3293
|
+
import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
|
3243
3294
|
var PaginationButtonTrigger = ({
|
3244
3295
|
color: color2,
|
3245
3296
|
isDisabled,
|
3246
3297
|
onClick,
|
3247
3298
|
visuallyHidden,
|
3248
3299
|
icon
|
3249
|
-
}) => /* @__PURE__ */
|
3250
|
-
/* @__PURE__ */
|
3300
|
+
}) => /* @__PURE__ */ jsxs19(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color: color2, isDisabled, onClick, children: [
|
3301
|
+
/* @__PURE__ */ jsx49(VisuallyHidden, { children: visuallyHidden }),
|
3251
3302
|
icon
|
3252
3303
|
] });
|
3253
3304
|
PaginationButtonTrigger.defaultProps = {
|
@@ -3260,10 +3311,10 @@ PaginationButtonTrigger.defaultProps = {
|
|
3260
3311
|
var pagination_button_trigger_default = PaginationButtonTrigger;
|
3261
3312
|
|
3262
3313
|
// src/components/pagination/components/pagination.tsx
|
3263
|
-
import { jsx as
|
3314
|
+
import { jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
|
3264
3315
|
var Pagination = ({ className, current, total, onSelect }) => {
|
3265
|
-
const btnColorDisabled =
|
3266
|
-
const btnColor =
|
3316
|
+
const btnColorDisabled = useColorModeValue9("secondary.100", "primary.500");
|
3317
|
+
const btnColor = useColorModeValue9("primary.500", "secondary.100");
|
3267
3318
|
const disabledPrevious = current === 1;
|
3268
3319
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
3269
3320
|
const disabledNext = current === total;
|
@@ -3290,8 +3341,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3290
3341
|
}
|
3291
3342
|
return pageButtons;
|
3292
3343
|
};
|
3293
|
-
return /* @__PURE__ */
|
3294
|
-
/* @__PURE__ */
|
3344
|
+
return /* @__PURE__ */ jsxs20(Box23, { className, display: "inline-flex", alignItems: "center", children: [
|
3345
|
+
/* @__PURE__ */ jsx50(Box23, { mr: 1, children: /* @__PURE__ */ jsx50(
|
3295
3346
|
pagination_button_trigger_default,
|
3296
3347
|
{
|
3297
3348
|
"data-test-id": "Pagination-Button",
|
@@ -3299,11 +3350,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3299
3350
|
isDisabled: disabledPrevious,
|
3300
3351
|
onClick: () => handleSelectPage(1),
|
3301
3352
|
visuallyHidden: "First Page",
|
3302
|
-
icon: /* @__PURE__ */
|
3353
|
+
icon: /* @__PURE__ */ jsx50(ArrowLeftIcon, { width: 2 })
|
3303
3354
|
}
|
3304
3355
|
) }),
|
3305
|
-
/* @__PURE__ */
|
3306
|
-
/* @__PURE__ */
|
3356
|
+
/* @__PURE__ */ jsxs20(Box23, { bg: "neutral.300", borderRadius: "full", children: [
|
3357
|
+
/* @__PURE__ */ jsx50(
|
3307
3358
|
pagination_button_trigger_default,
|
3308
3359
|
{
|
3309
3360
|
"data-test-id": "Pagination-Button",
|
@@ -3311,22 +3362,22 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3311
3362
|
isDisabled: disabledPrevious,
|
3312
3363
|
onClick: () => handleSelectPage(current - 1),
|
3313
3364
|
visuallyHidden: "Previous Page",
|
3314
|
-
icon: /* @__PURE__ */
|
3365
|
+
icon: /* @__PURE__ */ jsx50(ChevronLeftIcon2, {})
|
3315
3366
|
}
|
3316
3367
|
),
|
3317
3368
|
generatePages().map((page) => {
|
3318
|
-
return /* @__PURE__ */
|
3369
|
+
return /* @__PURE__ */ jsx50(
|
3319
3370
|
pagination_button_default,
|
3320
3371
|
{
|
3321
3372
|
"data-test-id": "Pagination-Button",
|
3322
3373
|
isActive: page === current,
|
3323
3374
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
3324
|
-
children: /* @__PURE__ */
|
3375
|
+
children: /* @__PURE__ */ jsx50(Text11, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
3325
3376
|
},
|
3326
3377
|
page
|
3327
3378
|
);
|
3328
3379
|
}),
|
3329
|
-
/* @__PURE__ */
|
3380
|
+
/* @__PURE__ */ jsx50(
|
3330
3381
|
pagination_button_trigger_default,
|
3331
3382
|
{
|
3332
3383
|
"data-test-id": "Pagination-Button",
|
@@ -3334,11 +3385,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3334
3385
|
isDisabled: disabledNext,
|
3335
3386
|
onClick: () => handleSelectPage(current + 1),
|
3336
3387
|
visuallyHidden: "Next Page",
|
3337
|
-
icon: /* @__PURE__ */
|
3388
|
+
icon: /* @__PURE__ */ jsx50(ChevronRightIcon, {})
|
3338
3389
|
}
|
3339
3390
|
)
|
3340
3391
|
] }),
|
3341
|
-
/* @__PURE__ */
|
3392
|
+
/* @__PURE__ */ jsx50(Box23, { ml: 1, children: /* @__PURE__ */ jsx50(
|
3342
3393
|
pagination_button_trigger_default,
|
3343
3394
|
{
|
3344
3395
|
"data-test-id": "Pagination-Button",
|
@@ -3346,7 +3397,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3346
3397
|
isDisabled: disabledNext,
|
3347
3398
|
onClick: () => handleSelectPage(total),
|
3348
3399
|
visuallyHidden: "Last Page",
|
3349
|
-
icon: /* @__PURE__ */
|
3400
|
+
icon: /* @__PURE__ */ jsx50(ArrowRightIcon, { width: 2 })
|
3350
3401
|
}
|
3351
3402
|
) })
|
3352
3403
|
] });
|
@@ -3360,7 +3411,7 @@ var pagination_default = Pagination;
|
|
3360
3411
|
|
3361
3412
|
// src/components/pagination/components/pagination-detail.tsx
|
3362
3413
|
import { Text as Text12 } from "@chakra-ui/react";
|
3363
|
-
import { jsx as
|
3414
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
3364
3415
|
var PaginationDetail = ({
|
3365
3416
|
page,
|
3366
3417
|
limit,
|
@@ -3370,15 +3421,15 @@ var PaginationDetail = ({
|
|
3370
3421
|
lineHeight = 18,
|
3371
3422
|
...rest
|
3372
3423
|
}) => {
|
3373
|
-
return /* @__PURE__ */
|
3424
|
+
return /* @__PURE__ */ jsx51(Text12, { scale: scale2, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
3374
3425
|
};
|
3375
3426
|
var pagination_detail_default = PaginationDetail;
|
3376
3427
|
|
3377
3428
|
// src/components/pagination/components/pagination-filter.tsx
|
3378
|
-
import { Box as
|
3429
|
+
import { Box as Box24, Select, Text as Text13, useColorModeValue as useColorModeValue10 } from "@chakra-ui/react";
|
3379
3430
|
import * as React13 from "react";
|
3380
3431
|
import { FiChevronDown } from "react-icons/fi";
|
3381
|
-
import { jsx as
|
3432
|
+
import { jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
|
3382
3433
|
var PaginationFilter = ({
|
3383
3434
|
limit,
|
3384
3435
|
label = "Baris per halaman:",
|
@@ -3387,9 +3438,9 @@ var PaginationFilter = ({
|
|
3387
3438
|
...rest
|
3388
3439
|
}) => {
|
3389
3440
|
const [value, setValue] = React13.useState(limit);
|
3390
|
-
return /* @__PURE__ */
|
3391
|
-
/* @__PURE__ */
|
3392
|
-
/* @__PURE__ */
|
3441
|
+
return /* @__PURE__ */ jsxs21(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
3442
|
+
/* @__PURE__ */ jsx52(Text13, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue10("neutral.900", "white"), ...rest, children: label }),
|
3443
|
+
/* @__PURE__ */ jsx52(
|
3393
3444
|
Select,
|
3394
3445
|
{
|
3395
3446
|
textAlign: "center",
|
@@ -3398,7 +3449,7 @@ var PaginationFilter = ({
|
|
3398
3449
|
border: "none",
|
3399
3450
|
boxShadow: "none",
|
3400
3451
|
width: 18,
|
3401
|
-
icon: /* @__PURE__ */
|
3452
|
+
icon: /* @__PURE__ */ jsx52(FiChevronDown, {}),
|
3402
3453
|
_focusVisible: { boxShadow: "none" },
|
3403
3454
|
onChange: (e) => {
|
3404
3455
|
const numberValue = Number(e.target.value);
|
@@ -3407,7 +3458,7 @@ var PaginationFilter = ({
|
|
3407
3458
|
},
|
3408
3459
|
value,
|
3409
3460
|
children: items.map((item) => {
|
3410
|
-
return /* @__PURE__ */
|
3461
|
+
return /* @__PURE__ */ jsx52("option", { value: item, children: item }, item);
|
3411
3462
|
})
|
3412
3463
|
}
|
3413
3464
|
)
|
@@ -3441,32 +3492,25 @@ import {
|
|
3441
3492
|
} from "@chakra-ui/react";
|
3442
3493
|
|
3443
3494
|
// src/components/radio/components/radio.tsx
|
3444
|
-
import { Box as
|
3445
|
-
import { jsx as
|
3446
|
-
var Radio = ({
|
3447
|
-
isError = false,
|
3448
|
-
helpText = "",
|
3449
|
-
errorText = "",
|
3450
|
-
children,
|
3451
|
-
isDisabled,
|
3452
|
-
...rest
|
3453
|
-
}) => {
|
3495
|
+
import { Box as Box25, Radio as ChakraRadio, Text as Text14 } from "@chakra-ui/react";
|
3496
|
+
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
3497
|
+
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
3454
3498
|
const variant = isError ? "errors" : "unstyled";
|
3455
|
-
return /* @__PURE__ */
|
3456
|
-
/* @__PURE__ */
|
3457
|
-
/* @__PURE__ */
|
3499
|
+
return /* @__PURE__ */ jsxs22(Box25, { children: [
|
3500
|
+
/* @__PURE__ */ jsx53(Box25, { display: "flex", children: /* @__PURE__ */ jsx53(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx53(Text14, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
3501
|
+
isError && errorText ? /* @__PURE__ */ jsx53(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx53(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ jsx53(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx53(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
3458
3502
|
] });
|
3459
3503
|
};
|
3460
3504
|
Radio.displayName = "Radio";
|
3461
3505
|
Radio.defaultProps = {
|
3462
3506
|
isError: false,
|
3463
|
-
helpText:
|
3464
|
-
errorText:
|
3507
|
+
helpText: void 0,
|
3508
|
+
errorText: void 0
|
3465
3509
|
};
|
3466
3510
|
|
3467
3511
|
// src/components/radio/components/radio-group.tsx
|
3468
|
-
import { Box as
|
3469
|
-
import { jsx as
|
3512
|
+
import { Box as Box26, RadioGroup as ChakraRadioGroup, Stack as Stack3 } from "@chakra-ui/react";
|
3513
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
3470
3514
|
var RadioGroup = ({
|
3471
3515
|
children,
|
3472
3516
|
label,
|
@@ -3475,7 +3519,7 @@ var RadioGroup = ({
|
|
3475
3519
|
errorMessage,
|
3476
3520
|
...props
|
3477
3521
|
}) => {
|
3478
|
-
return /* @__PURE__ */
|
3522
|
+
return /* @__PURE__ */ jsx54(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ jsx54(Box26, { mt: "2", mb: "1", children: /* @__PURE__ */ jsx54(ChakraRadioGroup, { ...props, children: /* @__PURE__ */ jsx54(Stack3, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
3479
3523
|
};
|
3480
3524
|
RadioGroup.displayName = "RadioGroup";
|
3481
3525
|
RadioGroup.defaultProps = {
|
@@ -3498,9 +3542,9 @@ import {
|
|
3498
3542
|
// src/components/rating/components/rating.tsx
|
3499
3543
|
import { Grid as Grid2 } from "@chakra-ui/react";
|
3500
3544
|
import { Rating as RatingIcon } from "@ctlyst.id/internal-icon";
|
3501
|
-
import { jsx as
|
3545
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
3502
3546
|
var Rating = ({ value }) => {
|
3503
|
-
return /* @__PURE__ */
|
3547
|
+
return /* @__PURE__ */ jsx55(Grid2, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx55(RatingIcon, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
3504
3548
|
};
|
3505
3549
|
var rating_default = Rating;
|
3506
3550
|
|
@@ -3509,16 +3553,16 @@ import { useColorMode as useColorMode3 } from "@chakra-ui/system";
|
|
3509
3553
|
import ReactSelect from "react-select";
|
3510
3554
|
|
3511
3555
|
// src/config/theme/foundations/shadows.ts
|
3512
|
-
import { theme
|
3556
|
+
import { theme } from "@chakra-ui/react";
|
3513
3557
|
var shadows = {
|
3514
|
-
...
|
3558
|
+
...theme.shadows,
|
3515
3559
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
3516
3560
|
};
|
3517
3561
|
|
3518
3562
|
// src/config/theme/foundations/sizes.ts
|
3519
|
-
import { theme as
|
3563
|
+
import { theme as theme2 } from "@chakra-ui/react";
|
3520
3564
|
var sizes = {
|
3521
|
-
...
|
3565
|
+
...theme2.sizes,
|
3522
3566
|
4.5: "1.125rem",
|
3523
3567
|
9.5: "2.375rem",
|
3524
3568
|
18: "4.5rem",
|
@@ -3528,9 +3572,9 @@ var sizes = {
|
|
3528
3572
|
};
|
3529
3573
|
|
3530
3574
|
// src/config/theme/foundations/spacing.ts
|
3531
|
-
import { theme as
|
3575
|
+
import { theme as theme3 } from "@chakra-ui/react";
|
3532
3576
|
var spacing = {
|
3533
|
-
...
|
3577
|
+
...theme3.space,
|
3534
3578
|
4.5: "1.125rem",
|
3535
3579
|
9.5: "2.375rem",
|
3536
3580
|
18: "4.5rem",
|
@@ -3842,11 +3886,11 @@ function selectStyles(colorMode, _isError) {
|
|
3842
3886
|
})
|
3843
3887
|
};
|
3844
3888
|
}
|
3845
|
-
var themeSelect = (
|
3889
|
+
var themeSelect = (theme5) => {
|
3846
3890
|
return {
|
3847
|
-
...
|
3891
|
+
...theme5,
|
3848
3892
|
colors: {
|
3849
|
-
...
|
3893
|
+
...theme5.colors,
|
3850
3894
|
primary: "var(--chakra-colors-primary-100)",
|
3851
3895
|
primary25: "var(--chakra-colors-primary-50)",
|
3852
3896
|
primary50: "var(--chakra-colors-primary-100)",
|
@@ -3856,14 +3900,14 @@ var themeSelect = (theme6) => {
|
|
3856
3900
|
};
|
3857
3901
|
|
3858
3902
|
// src/components/select/components/select.tsx
|
3859
|
-
import { jsx as
|
3903
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
3860
3904
|
function Select2({
|
3861
3905
|
styles,
|
3862
3906
|
isError = false,
|
3863
3907
|
...rest
|
3864
3908
|
}) {
|
3865
3909
|
const { colorMode } = useColorMode3();
|
3866
|
-
return /* @__PURE__ */
|
3910
|
+
return /* @__PURE__ */ jsx56(
|
3867
3911
|
ReactSelect,
|
3868
3912
|
{
|
3869
3913
|
classNamePrefix: "react-select",
|
@@ -3878,14 +3922,14 @@ var select_default = Select2;
|
|
3878
3922
|
// src/components/select/components/select-async.tsx
|
3879
3923
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
3880
3924
|
import { AsyncPaginate } from "react-select-async-paginate";
|
3881
|
-
import { jsx as
|
3925
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
3882
3926
|
function SelectAsync({
|
3883
3927
|
styles,
|
3884
3928
|
isError = false,
|
3885
3929
|
...rest
|
3886
3930
|
}) {
|
3887
3931
|
const { colorMode } = useColorMode4();
|
3888
|
-
return /* @__PURE__ */
|
3932
|
+
return /* @__PURE__ */ jsx57(
|
3889
3933
|
AsyncPaginate,
|
3890
3934
|
{
|
3891
3935
|
classNamePrefix: "react-select",
|
@@ -3900,10 +3944,10 @@ var select_async_default = SelectAsync;
|
|
3900
3944
|
// src/components/select/components/select-async-creatable.tsx
|
3901
3945
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
3902
3946
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
3903
|
-
import { jsx as
|
3947
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
3904
3948
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3905
3949
|
const { colorMode } = useColorMode5();
|
3906
|
-
return /* @__PURE__ */
|
3950
|
+
return /* @__PURE__ */ jsx58(
|
3907
3951
|
ReactSelectAsyncCreatable,
|
3908
3952
|
{
|
3909
3953
|
classNamePrefix: "react-select",
|
@@ -3917,10 +3961,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3917
3961
|
// src/components/select/components/select-creatable.tsx
|
3918
3962
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
3919
3963
|
import ReactSelectCreatable from "react-select/creatable";
|
3920
|
-
import { jsx as
|
3964
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
3921
3965
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3922
3966
|
const { colorMode } = useColorMode6();
|
3923
|
-
return /* @__PURE__ */
|
3967
|
+
return /* @__PURE__ */ jsx59(
|
3924
3968
|
ReactSelectCreatable,
|
3925
3969
|
{
|
3926
3970
|
classNamePrefix: "react-select",
|
@@ -3932,10 +3976,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3932
3976
|
}
|
3933
3977
|
|
3934
3978
|
// src/components/select/components/select-with-checkbox.tsx
|
3935
|
-
import { Checkbox as Checkbox3, Flex as
|
3979
|
+
import { Checkbox as Checkbox3, Flex as Flex11, Text as Text15 } from "@chakra-ui/react";
|
3936
3980
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3937
3981
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3938
|
-
import { Fragment as Fragment6, jsx as
|
3982
|
+
import { Fragment as Fragment6, jsx as jsx60, jsxs as jsxs23 } from "react/jsx-runtime";
|
3939
3983
|
var CHECKBOX_STATE = {
|
3940
3984
|
UNCHECKED: 0,
|
3941
3985
|
INDETERMINATE: 1,
|
@@ -3982,8 +4026,8 @@ var InputOption = ({
|
|
3982
4026
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
3983
4027
|
style
|
3984
4028
|
};
|
3985
|
-
return /* @__PURE__ */
|
3986
|
-
/* @__PURE__ */
|
4029
|
+
return /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
4030
|
+
/* @__PURE__ */ jsx60(
|
3987
4031
|
ComponentRS.Option,
|
3988
4032
|
{
|
3989
4033
|
isMulti: true,
|
@@ -3994,8 +4038,8 @@ var InputOption = ({
|
|
3994
4038
|
getStyles,
|
3995
4039
|
innerProps: props,
|
3996
4040
|
...rest,
|
3997
|
-
children: /* @__PURE__ */
|
3998
|
-
|
4041
|
+
children: /* @__PURE__ */ jsxs23(
|
4042
|
+
Flex11,
|
3999
4043
|
{
|
4000
4044
|
alignItems: "center",
|
4001
4045
|
width: "100%",
|
@@ -4004,7 +4048,7 @@ var InputOption = ({
|
|
4004
4048
|
"data-test-id": "CT_component_select-checkbox_options",
|
4005
4049
|
cursor: isDisabled ? "not-allowed" : "default",
|
4006
4050
|
children: [
|
4007
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4051
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx60(
|
4008
4052
|
Checkbox3,
|
4009
4053
|
{
|
4010
4054
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -4012,14 +4056,14 @@ var InputOption = ({
|
|
4012
4056
|
isDisabled,
|
4013
4057
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
4014
4058
|
}
|
4015
|
-
) : /* @__PURE__ */
|
4016
|
-
/* @__PURE__ */
|
4059
|
+
) : /* @__PURE__ */ jsx60(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
|
4060
|
+
/* @__PURE__ */ jsx60(Text15, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
4017
4061
|
]
|
4018
4062
|
}
|
4019
4063
|
)
|
4020
4064
|
}
|
4021
4065
|
),
|
4022
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4066
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx60("hr", {}) : null
|
4023
4067
|
] });
|
4024
4068
|
};
|
4025
4069
|
var SelectWithCheckboxBase = ({
|
@@ -4029,7 +4073,7 @@ var SelectWithCheckboxBase = ({
|
|
4029
4073
|
...rest
|
4030
4074
|
}) => {
|
4031
4075
|
const { colorMode } = useColorMode7();
|
4032
|
-
return /* @__PURE__ */
|
4076
|
+
return /* @__PURE__ */ jsx60(
|
4033
4077
|
ReactSelect2,
|
4034
4078
|
{
|
4035
4079
|
classNamePrefix: "react-select",
|
@@ -4048,7 +4092,7 @@ var SelectWithCheckboxBase = ({
|
|
4048
4092
|
var SelectCheckbox = (props) => {
|
4049
4093
|
const { isMulti, options, value, ...rest } = props;
|
4050
4094
|
const selectValue = value || [];
|
4051
|
-
return /* @__PURE__ */
|
4095
|
+
return /* @__PURE__ */ jsx60(
|
4052
4096
|
SelectWithCheckboxBase,
|
4053
4097
|
{
|
4054
4098
|
isMulti,
|
@@ -4059,7 +4103,7 @@ var SelectCheckbox = (props) => {
|
|
4059
4103
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
4060
4104
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
4061
4105
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
4062
|
-
return /* @__PURE__ */
|
4106
|
+
return /* @__PURE__ */ jsx60(InputOption, { ...optionProps, checkedState });
|
4063
4107
|
}
|
4064
4108
|
},
|
4065
4109
|
...rest
|
@@ -4069,7 +4113,7 @@ var SelectCheckbox = (props) => {
|
|
4069
4113
|
var select_with_checkbox_default = SelectCheckbox;
|
4070
4114
|
|
4071
4115
|
// src/components/sidebar/components/sidebar.tsx
|
4072
|
-
import { Flex as
|
4116
|
+
import { Flex as Flex12 } from "@chakra-ui/react";
|
4073
4117
|
|
4074
4118
|
// ../../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/render/dom/motion.mjs
|
4075
4119
|
import { __assign as __assign25 } from "tslib";
|
@@ -4288,7 +4332,7 @@ function useVisualElement(Component, visualState, props, createVisualElement) {
|
|
4288
4332
|
}
|
4289
4333
|
|
4290
4334
|
// ../../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/utils/use-motion-ref.mjs
|
4291
|
-
import { useCallback } from "react";
|
4335
|
+
import { useCallback as useCallback2 } from "react";
|
4292
4336
|
|
4293
4337
|
// ../../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/is-ref-object.mjs
|
4294
4338
|
function isRefObject(ref) {
|
@@ -4297,7 +4341,7 @@ function isRefObject(ref) {
|
|
4297
4341
|
|
4298
4342
|
// ../../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/utils/use-motion-ref.mjs
|
4299
4343
|
function useMotionRef(visualState, visualElement2, externalRef) {
|
4300
|
-
return
|
4344
|
+
return useCallback2(
|
4301
4345
|
function(instance) {
|
4302
4346
|
var _a;
|
4303
4347
|
instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));
|
@@ -4322,7 +4366,7 @@ function useMotionRef(visualState, visualElement2, externalRef) {
|
|
4322
4366
|
}
|
4323
4367
|
|
4324
4368
|
// ../../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/context/MotionContext/create.mjs
|
4325
|
-
import { useMemo as
|
4369
|
+
import { useMemo as useMemo3, useContext as useContext5 } from "react";
|
4326
4370
|
|
4327
4371
|
// ../../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/render/utils/variants.mjs
|
4328
4372
|
function isVariantLabels(v) {
|
@@ -4391,7 +4435,7 @@ function getCurrentTreeVariants(props, context) {
|
|
4391
4435
|
// ../../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/context/MotionContext/create.mjs
|
4392
4436
|
function useCreateMotionContext(props) {
|
4393
4437
|
var _a = getCurrentTreeVariants(props, useContext5(MotionContext)), initial = _a.initial, animate3 = _a.animate;
|
4394
|
-
return
|
4438
|
+
return useMemo3(function() {
|
4395
4439
|
return { initial, animate: animate3 };
|
4396
4440
|
}, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate3)]);
|
4397
4441
|
}
|
@@ -4627,7 +4671,7 @@ import { createElement as createElement3 } from "react";
|
|
4627
4671
|
|
4628
4672
|
// ../../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/render/html/use-props.mjs
|
4629
4673
|
import { __assign as __assign4 } from "tslib";
|
4630
|
-
import { useMemo as
|
4674
|
+
import { useMemo as useMemo4 } from "react";
|
4631
4675
|
|
4632
4676
|
// ../../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/projection/styles/scale-correction.mjs
|
4633
4677
|
var scaleCorrectors = {};
|
@@ -5035,7 +5079,7 @@ function copyRawValuesOnly(target, source, props) {
|
|
5035
5079
|
}
|
5036
5080
|
function useInitialMotionValues(_a, visualState, isStatic) {
|
5037
5081
|
var transformTemplate = _a.transformTemplate;
|
5038
|
-
return
|
5082
|
+
return useMemo4(function() {
|
5039
5083
|
var state = createHtmlRenderState();
|
5040
5084
|
buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);
|
5041
5085
|
var vars = state.vars, style = state.style;
|
@@ -5155,7 +5199,7 @@ function filterProps(props, isDom, forwardMotionProps) {
|
|
5155
5199
|
|
5156
5200
|
// ../../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/render/svg/use-props.mjs
|
5157
5201
|
import { __assign as __assign6 } from "tslib";
|
5158
|
-
import { useMemo as
|
5202
|
+
import { useMemo as useMemo5 } from "react";
|
5159
5203
|
|
5160
5204
|
// ../../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/render/svg/utils/build-attrs.mjs
|
5161
5205
|
import { __rest } from "tslib";
|
@@ -5229,7 +5273,7 @@ var createSvgRenderState = function() {
|
|
5229
5273
|
|
5230
5274
|
// ../../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/render/svg/use-props.mjs
|
5231
5275
|
function useSVGProps(props, visualState) {
|
5232
|
-
var visualProps =
|
5276
|
+
var visualProps = useMemo5(function() {
|
5233
5277
|
var state = createSvgRenderState();
|
5234
5278
|
buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);
|
5235
5279
|
return __assign6(__assign6({}, state.attrs), { style: __assign6({}, state.style) });
|
@@ -10762,7 +10806,7 @@ import { useContext as useContext13, useRef as useRef8, cloneElement, Children,
|
|
10762
10806
|
|
10763
10807
|
// ../../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
|
10764
10808
|
import { __read as __read19 } from "tslib";
|
10765
|
-
import { useState as useState5, useCallback as
|
10809
|
+
import { useState as useState5, useCallback as useCallback3 } from "react";
|
10766
10810
|
|
10767
10811
|
// ../../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-is-mounted.mjs
|
10768
10812
|
import { useRef as useRef7 } from "react";
|
@@ -10781,10 +10825,10 @@ function useIsMounted() {
|
|
10781
10825
|
function useForceUpdate() {
|
10782
10826
|
var isMounted = useIsMounted();
|
10783
10827
|
var _a = __read19(useState5(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];
|
10784
|
-
var forceRender =
|
10828
|
+
var forceRender = useCallback3(function() {
|
10785
10829
|
isMounted.current && setForcedRenderCount(forcedRenderCount + 1);
|
10786
10830
|
}, [forcedRenderCount]);
|
10787
|
-
var deferredForceRender =
|
10831
|
+
var deferredForceRender = useCallback3(function() {
|
10788
10832
|
return es_default.postRender(forceRender);
|
10789
10833
|
}, [forceRender]);
|
10790
10834
|
return [deferredForceRender, forcedRenderCount];
|
@@ -10793,12 +10837,12 @@ function useForceUpdate() {
|
|
10793
10837
|
// ../../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
|
10794
10838
|
import { __values } from "tslib";
|
10795
10839
|
import * as React16 from "react";
|
10796
|
-
import { useMemo as
|
10840
|
+
import { useMemo as useMemo6 } from "react";
|
10797
10841
|
var PresenceChild = function(_a) {
|
10798
10842
|
var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;
|
10799
10843
|
var presenceChildren = useConstant(newChildrenMap);
|
10800
10844
|
var id2 = useId();
|
10801
|
-
var context =
|
10845
|
+
var context = useMemo6(
|
10802
10846
|
function() {
|
10803
10847
|
return {
|
10804
10848
|
id: id2,
|
@@ -10840,7 +10884,7 @@ var PresenceChild = function(_a) {
|
|
10840
10884
|
*/
|
10841
10885
|
presenceAffectsLayout ? void 0 : [isPresent]
|
10842
10886
|
);
|
10843
|
-
|
10887
|
+
useMemo6(function() {
|
10844
10888
|
presenceChildren.forEach(function(_, key) {
|
10845
10889
|
return presenceChildren.set(key, false);
|
10846
10890
|
});
|
@@ -10950,10 +10994,10 @@ var AnimatePresence = function(_a) {
|
|
10950
10994
|
};
|
10951
10995
|
|
10952
10996
|
// src/components/sidebar/components/sidebar.tsx
|
10953
|
-
import { jsx as
|
10997
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
10954
10998
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
10955
|
-
return /* @__PURE__ */
|
10956
|
-
|
10999
|
+
return /* @__PURE__ */ jsx61(
|
11000
|
+
Flex12,
|
10957
11001
|
{
|
10958
11002
|
position: "relative",
|
10959
11003
|
as: motion.div,
|
@@ -10973,12 +11017,12 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
10973
11017
|
Sidebar.displayName = "Sidebar";
|
10974
11018
|
|
10975
11019
|
// src/components/sidebar/components/sidebar-header.tsx
|
10976
|
-
import { Box as
|
11020
|
+
import { Box as Box27, Flex as Flex13, Text as Text16 } from "@chakra-ui/react";
|
10977
11021
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
10978
|
-
import { jsx as
|
10979
|
-
var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
10980
|
-
return /* @__PURE__ */
|
10981
|
-
|
11022
|
+
import { jsx as jsx62, jsxs as jsxs24 } from "react/jsx-runtime";
|
11023
|
+
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
11024
|
+
return /* @__PURE__ */ jsx62(
|
11025
|
+
Box27,
|
10982
11026
|
{
|
10983
11027
|
px: "2",
|
10984
11028
|
color: "neutral.900",
|
@@ -10987,8 +11031,8 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
10987
11031
|
_hover: {
|
10988
11032
|
color: "primary.500"
|
10989
11033
|
},
|
10990
|
-
children: /* @__PURE__ */
|
10991
|
-
|
11034
|
+
children: /* @__PURE__ */ jsxs24(
|
11035
|
+
Flex13,
|
10992
11036
|
{
|
10993
11037
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
10994
11038
|
direction: "row",
|
@@ -10997,20 +11041,19 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
10997
11041
|
onClick: () => setCollapse(!isCollapse),
|
10998
11042
|
cursor: "pointer",
|
10999
11043
|
children: [
|
11000
|
-
/* @__PURE__ */
|
11001
|
-
|
11044
|
+
/* @__PURE__ */ jsx62(
|
11045
|
+
Box27,
|
11002
11046
|
{
|
11003
11047
|
as: motion.div,
|
11004
11048
|
boxSize: "4",
|
11005
11049
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
11006
11050
|
transition: "ease-in-out",
|
11007
11051
|
transitionDuration: "1ms",
|
11008
|
-
"data-test-id": "SWqE2JTMkS4Pj_2tdwy8O",
|
11009
11052
|
"aria-label": "toggle sidebar",
|
11010
|
-
children: /* @__PURE__ */
|
11053
|
+
children: /* @__PURE__ */ jsx62(ArrowRight, { size: 4, color: "inherit" })
|
11011
11054
|
}
|
11012
11055
|
),
|
11013
|
-
/* @__PURE__ */
|
11056
|
+
/* @__PURE__ */ jsx62(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx62(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx62(
|
11014
11057
|
Text16,
|
11015
11058
|
{
|
11016
11059
|
as: motion.div,
|
@@ -11021,7 +11064,7 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
11021
11064
|
animate: { opacity: 1, x: 0 },
|
11022
11065
|
exit: { opacity: 0, x: 16 },
|
11023
11066
|
transition: "10ms linear",
|
11024
|
-
children:
|
11067
|
+
children: title
|
11025
11068
|
}
|
11026
11069
|
) }) })
|
11027
11070
|
]
|
@@ -11030,15 +11073,18 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
11030
11073
|
}
|
11031
11074
|
);
|
11032
11075
|
};
|
11076
|
+
SidebarHeader.displayName = "SidebarHeader";
|
11077
|
+
SidebarHeader.defaultProps = {
|
11078
|
+
title: "Sembunyikan menu"
|
11079
|
+
};
|
11033
11080
|
|
11034
11081
|
// src/components/sidebar/components/sidebar-menu.tsx
|
11035
11082
|
import {
|
11036
11083
|
Accordion as Accordion2,
|
11037
11084
|
AccordionButton as AccordionButton2,
|
11038
|
-
AccordionIcon as AccordionIcon2,
|
11039
11085
|
AccordionItem as AccordionItem2,
|
11040
11086
|
AccordionPanel as AccordionPanel2,
|
11041
|
-
Box as
|
11087
|
+
Box as Box28,
|
11042
11088
|
Popover as Popover5,
|
11043
11089
|
PopoverBody as PopoverBody3,
|
11044
11090
|
PopoverContent as PopoverContent5,
|
@@ -11047,118 +11093,122 @@ import {
|
|
11047
11093
|
Portal as Portal3,
|
11048
11094
|
Text as Text17
|
11049
11095
|
} from "@chakra-ui/react";
|
11050
|
-
import
|
11096
|
+
import * as Icon7 from "@ctlyst.id/internal-icon";
|
11097
|
+
import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs25 } from "react/jsx-runtime";
|
11051
11098
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
11052
|
-
return /* @__PURE__ */
|
11053
|
-
|
11054
|
-
|
11055
|
-
const activeOption = isOpen ? "primary.50" : "white";
|
11056
|
-
const backgroundColor = isOpen ? "primary.50" : "primary.100";
|
11057
|
-
const activeParent = isActive ? backgroundColor : activeOption;
|
11099
|
+
return /* @__PURE__ */ jsx63(Box28, { as: motion.div, animate: { padding: isCollapse ? "8px 16px" : "8px" }, children: /* @__PURE__ */ jsx63(Accordion2, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
11100
|
+
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
11101
|
+
return /* @__PURE__ */ jsx63(AccordionItem2, { mt: "4", children: ({ isExpanded }) => {
|
11058
11102
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
11059
|
-
|
11060
|
-
|
11061
|
-
|
11062
|
-
|
11063
|
-
|
11064
|
-
|
11065
|
-
|
11066
|
-
|
11103
|
+
const noChild = !item.children.length;
|
11104
|
+
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
11105
|
+
return /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
11106
|
+
/* @__PURE__ */ jsx63(Popover5, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
11107
|
+
const activeOption = isOpen ? "primary.50" : "white";
|
11108
|
+
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
11109
|
+
const activeParent = isActive ? backgroundColor : activeOption;
|
11110
|
+
return /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
11111
|
+
/* @__PURE__ */ jsx63(PopoverTrigger5, { children: /* @__PURE__ */ jsx63(
|
11112
|
+
AccordionButton2,
|
11113
|
+
{
|
11114
|
+
"data-test-id": `CTA_button-accordion-${item.title}`,
|
11115
|
+
p: "0",
|
11116
|
+
h: "fit-content",
|
11117
|
+
children: /* @__PURE__ */ jsxs25(
|
11118
|
+
NavItem,
|
11119
|
+
{
|
11120
|
+
as: motion.div,
|
11121
|
+
justifyContent: isCollapse ? "center" : "space-between",
|
11122
|
+
isActive,
|
11123
|
+
bg: activeParent,
|
11124
|
+
"data-test-id": `CTA_nav-item-${item.title}`,
|
11125
|
+
onClick: () => setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink),
|
11126
|
+
position: "relative",
|
11127
|
+
...itemStyles,
|
11128
|
+
children: [
|
11129
|
+
mappingIcon2 && /* @__PURE__ */ jsx63(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11130
|
+
!isCollapse && /* @__PURE__ */ jsxs25(
|
11131
|
+
Box28,
|
11132
|
+
{
|
11133
|
+
display: "flex",
|
11134
|
+
w: "full",
|
11135
|
+
alignItems: "center",
|
11136
|
+
justifyContent: "space-between",
|
11137
|
+
ml: "2",
|
11138
|
+
as: motion.div,
|
11139
|
+
transition: "20ms ease-in",
|
11140
|
+
initial: { opacity: 0, x: 24 },
|
11141
|
+
animate: { opacity: 1, x: 0 },
|
11142
|
+
exit: { opacity: 0, x: 16 },
|
11143
|
+
children: [
|
11144
|
+
/* @__PURE__ */ jsx63(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx63(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
11145
|
+
!!item.children.length && /* @__PURE__ */ jsx63(
|
11146
|
+
Box28,
|
11147
|
+
{
|
11148
|
+
display: "flex",
|
11149
|
+
boxSize: "3",
|
11150
|
+
as: motion.div,
|
11151
|
+
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
11152
|
+
children: /* @__PURE__ */ jsx63(Icon7.ChevronDown, { size: 3 })
|
11153
|
+
}
|
11154
|
+
)
|
11155
|
+
]
|
11156
|
+
}
|
11157
|
+
)
|
11158
|
+
]
|
11159
|
+
},
|
11160
|
+
item.id
|
11161
|
+
)
|
11162
|
+
},
|
11163
|
+
item.id
|
11164
|
+
) }, item.id),
|
11165
|
+
isOpenOptions && /* @__PURE__ */ jsx63(Portal3, { children: item.children.length > 0 ? /* @__PURE__ */ jsxs25(PopoverContent5, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
11166
|
+
/* @__PURE__ */ jsx63(PopoverHeader2, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ jsxs25(Box28, { display: "flex", alignItems: "center", children: [
|
11167
|
+
mappingIcon2.get(item.icon || ""),
|
11168
|
+
/* @__PURE__ */ jsx63(Box28, { as: "span", ml: "2", children: item.title })
|
11169
|
+
] }) }),
|
11170
|
+
!!item.children.length && /* @__PURE__ */ jsx63(PopoverBody3, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx63(
|
11171
|
+
NavItem,
|
11172
|
+
{
|
11173
|
+
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
11174
|
+
isChild: true,
|
11175
|
+
isActive: active === submenu.navLink,
|
11176
|
+
onClick: () => {
|
11177
|
+
setActive(submenu.navLink);
|
11178
|
+
onClose();
|
11179
|
+
},
|
11180
|
+
rounded: "none",
|
11181
|
+
...itemStyles,
|
11182
|
+
children: submenu.title
|
11183
|
+
},
|
11184
|
+
submenu.id
|
11185
|
+
)) })
|
11186
|
+
] }) : isCollapse && /* @__PURE__ */ jsx63(PopoverContent5, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx63(PopoverBody3, { py: "1", px: "0", children: /* @__PURE__ */ jsxs25(
|
11067
11187
|
NavItem,
|
11068
11188
|
{
|
11069
|
-
|
11070
|
-
justifyContent:
|
11071
|
-
isActive,
|
11072
|
-
|
11073
|
-
|
11074
|
-
|
11075
|
-
|
11189
|
+
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
11190
|
+
justifyContent: "flex-start",
|
11191
|
+
isActive: active === item.navLink,
|
11192
|
+
onClick: () => {
|
11193
|
+
setActive(item.navLink);
|
11194
|
+
onClose();
|
11195
|
+
},
|
11196
|
+
rounded: "none",
|
11076
11197
|
...itemStyles,
|
11077
11198
|
children: [
|
11078
|
-
mappingIcon2 && /* @__PURE__ */
|
11079
|
-
|
11080
|
-
Box29,
|
11081
|
-
{
|
11082
|
-
display: "flex",
|
11083
|
-
w: "full",
|
11084
|
-
alignItems: "center",
|
11085
|
-
justifyContent: "space-between",
|
11086
|
-
ml: "2",
|
11087
|
-
as: motion.div,
|
11088
|
-
transition: "20ms ease-in",
|
11089
|
-
initial: { opacity: 0, x: 24 },
|
11090
|
-
animate: { opacity: 1, x: 0 },
|
11091
|
-
exit: { opacity: 0, x: 16 },
|
11092
|
-
children: [
|
11093
|
-
/* @__PURE__ */ jsx61(Box29, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx61(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
11094
|
-
!!item.children.length && /* @__PURE__ */ jsx61(Box29, { children: /* @__PURE__ */ jsx61(AccordionIcon2, { boxSize: "3.5" }) })
|
11095
|
-
]
|
11096
|
-
}
|
11097
|
-
)
|
11199
|
+
mappingIcon2 && /* @__PURE__ */ jsx63(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11200
|
+
/* @__PURE__ */ jsx63(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx63(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
11098
11201
|
]
|
11099
11202
|
},
|
11100
11203
|
item.id
|
11101
|
-
)
|
11102
|
-
}
|
11103
|
-
|
11104
|
-
|
11105
|
-
isOpenOptions && /* @__PURE__ */ jsx61(Portal3, { children: item.children.length > 0 ? /* @__PURE__ */ jsxs26(PopoverContent5, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
11106
|
-
/* @__PURE__ */ jsx61(PopoverHeader2, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ jsxs26(Box29, { display: "flex", alignItems: "center", children: [
|
11107
|
-
mappingIcon2.get(item.icon || ""),
|
11108
|
-
/* @__PURE__ */ jsx61(Box29, { as: "span", ml: "2", children: item.title })
|
11109
|
-
] }) }),
|
11110
|
-
!!item.children.length && /* @__PURE__ */ jsx61(PopoverBody3, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx61(
|
11111
|
-
NavItem,
|
11112
|
-
{
|
11113
|
-
"data-test-id": "2vqeuJQ2ml0uLZJ0xNNn-",
|
11114
|
-
isChild: true,
|
11115
|
-
isActive: active === submenu.navLink,
|
11116
|
-
onClick: () => {
|
11117
|
-
setActive(submenu.navLink);
|
11118
|
-
onClose();
|
11119
|
-
},
|
11120
|
-
rounded: "none",
|
11121
|
-
...itemStyles,
|
11122
|
-
children: submenu.title
|
11123
|
-
},
|
11124
|
-
submenu.id
|
11125
|
-
)) })
|
11126
|
-
] }) : isCollapse && /* @__PURE__ */ jsx61(PopoverContent5, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx61(PopoverBody3, { py: "1", px: "0", children: /* @__PURE__ */ jsxs26(
|
11127
|
-
NavItem,
|
11128
|
-
{
|
11129
|
-
"data-test-id": "2vqeuJQ2ml0uLZJ0xNNn-",
|
11130
|
-
justifyContent: "flex-start",
|
11131
|
-
isActive: active === item.navLink,
|
11132
|
-
onClick: () => {
|
11133
|
-
setActive(item.navLink);
|
11134
|
-
onClose();
|
11135
|
-
},
|
11136
|
-
rounded: "none",
|
11137
|
-
...itemStyles,
|
11138
|
-
children: [
|
11139
|
-
mappingIcon2 && /* @__PURE__ */ jsx61(Box29, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11140
|
-
/* @__PURE__ */ jsx61(Box29, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx61(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
11141
|
-
]
|
11142
|
-
},
|
11143
|
-
item.id
|
11144
|
-
) }) }) })
|
11145
|
-
] });
|
11146
|
-
} }, item.id),
|
11147
|
-
!isCollapse && /* @__PURE__ */ jsx61(
|
11148
|
-
AccordionPanel2,
|
11149
|
-
{
|
11150
|
-
mt: "1",
|
11151
|
-
p: "0",
|
11152
|
-
as: motion.div,
|
11153
|
-
transition: "50ms linear 100s",
|
11154
|
-
initial: { opacity: 0, y: 60 },
|
11155
|
-
animate: { opacity: 1, y: 0 },
|
11156
|
-
exit: { opacity: 0, y: 16 },
|
11157
|
-
children: item.children.map((submenu) => /* @__PURE__ */ jsx61(
|
11204
|
+
) }) }) })
|
11205
|
+
] });
|
11206
|
+
} }, item.id),
|
11207
|
+
!isCollapse && /* @__PURE__ */ jsx63(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx63(
|
11158
11208
|
NavItem,
|
11159
11209
|
{
|
11160
11210
|
mt: "1",
|
11161
|
-
"data-test-id":
|
11211
|
+
"data-test-id": `CTA_Sidebar-accordion-item-${submenu.id}`,
|
11162
11212
|
isActive: active === submenu.navLink,
|
11163
11213
|
isChild: true,
|
11164
11214
|
...itemStyles,
|
@@ -11166,10 +11216,10 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11166
11216
|
children: submenu.title
|
11167
11217
|
},
|
11168
11218
|
submenu.id
|
11169
|
-
))
|
11170
|
-
}
|
11171
|
-
)
|
11172
|
-
|
11219
|
+
)) })
|
11220
|
+
] });
|
11221
|
+
} }, item.id);
|
11222
|
+
}) }) });
|
11173
11223
|
};
|
11174
11224
|
SidebarMenu.displayName = "SidebarMenu";
|
11175
11225
|
SidebarMenu.defaultProps = {
|
@@ -11178,16 +11228,16 @@ SidebarMenu.defaultProps = {
|
|
11178
11228
|
};
|
11179
11229
|
|
11180
11230
|
// src/components/switch/components/switch.tsx
|
11181
|
-
import { chakra as chakra6, Flex as
|
11231
|
+
import { chakra as chakra6, Flex as Flex14, forwardRef as forwardRef14, omitThemingProps as omitThemingProps2, useCheckbox as useCheckbox3, useMultiStyleConfig as useMultiStyleConfig2 } from "@chakra-ui/react";
|
11182
11232
|
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
11183
|
-
import { Check, Close as
|
11184
|
-
import { useMemo as
|
11185
|
-
import { jsx as
|
11233
|
+
import { Check as Check2, Close as Close4 } from "@ctlyst.id/internal-icon";
|
11234
|
+
import { useMemo as useMemo7 } from "react";
|
11235
|
+
import { jsx as jsx64, jsxs as jsxs26 } from "react/jsx-runtime";
|
11186
11236
|
var Switch = forwardRef14(function Switch2(props, ref) {
|
11187
11237
|
const styles = useMultiStyleConfig2("Switch", props);
|
11188
11238
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
11189
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } =
|
11190
|
-
const containerStyles =
|
11239
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = useCheckbox3(ownProps);
|
11240
|
+
const containerStyles = useMemo7(
|
11191
11241
|
() => ({
|
11192
11242
|
display: "inline-block",
|
11193
11243
|
position: "relative",
|
@@ -11197,7 +11247,7 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11197
11247
|
}),
|
11198
11248
|
[styles.container]
|
11199
11249
|
);
|
11200
|
-
const trackStyles =
|
11250
|
+
const trackStyles = useMemo7(
|
11201
11251
|
() => ({
|
11202
11252
|
display: "inline-flex",
|
11203
11253
|
flexShrink: 0,
|
@@ -11209,7 +11259,7 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11209
11259
|
}),
|
11210
11260
|
[styles.track]
|
11211
11261
|
);
|
11212
|
-
const labelStyles =
|
11262
|
+
const labelStyles = useMemo7(
|
11213
11263
|
() => ({
|
11214
11264
|
userSelect: "none",
|
11215
11265
|
marginStart: spacing2,
|
@@ -11225,7 +11275,7 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11225
11275
|
};
|
11226
11276
|
return iconSize[value];
|
11227
11277
|
};
|
11228
|
-
return /* @__PURE__ */
|
11278
|
+
return /* @__PURE__ */ jsxs26(
|
11229
11279
|
chakra6.label,
|
11230
11280
|
{
|
11231
11281
|
...getRootProps(),
|
@@ -11234,13 +11284,13 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11234
11284
|
className: cx10("chakra-switch", props.className),
|
11235
11285
|
__css: containerStyles,
|
11236
11286
|
children: [
|
11237
|
-
/* @__PURE__ */
|
11238
|
-
/* @__PURE__ */
|
11239
|
-
/* @__PURE__ */
|
11240
|
-
/* @__PURE__ */
|
11241
|
-
/* @__PURE__ */
|
11287
|
+
/* @__PURE__ */ jsx64("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
11288
|
+
/* @__PURE__ */ jsxs26(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
11289
|
+
/* @__PURE__ */ jsxs26(Flex14, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
11290
|
+
/* @__PURE__ */ jsx64(Check2, { color: "white", size: getIconSize(props.size) }),
|
11291
|
+
/* @__PURE__ */ jsx64(Close4, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
11242
11292
|
] }),
|
11243
|
-
/* @__PURE__ */
|
11293
|
+
/* @__PURE__ */ jsx64(
|
11244
11294
|
chakra6.span,
|
11245
11295
|
{
|
11246
11296
|
__css: styles.thumb,
|
@@ -11250,11 +11300,12 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11250
11300
|
}
|
11251
11301
|
)
|
11252
11302
|
] }),
|
11253
|
-
children && /* @__PURE__ */
|
11303
|
+
children && /* @__PURE__ */ jsx64(
|
11254
11304
|
chakra6.span,
|
11255
11305
|
{
|
11256
11306
|
className: "chakra-switch__label",
|
11257
11307
|
color: state.isDisabled ? "black.low" : "black.high",
|
11308
|
+
cursor: "pointer",
|
11258
11309
|
...getLabelProps(),
|
11259
11310
|
__css: labelStyles,
|
11260
11311
|
children
|
@@ -11286,14 +11337,14 @@ import {
|
|
11286
11337
|
} from "@chakra-ui/react";
|
11287
11338
|
|
11288
11339
|
// src/components/tabs/components/tab.tsx
|
11289
|
-
import { Button as Button6, Flex as
|
11290
|
-
import { jsx as
|
11340
|
+
import { Button as Button6, Flex as Flex15, forwardRef as forwardRef15, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
11341
|
+
import { jsx as jsx65, jsxs as jsxs27 } from "react/jsx-runtime";
|
11291
11342
|
var Tab = forwardRef15((props, ref) => {
|
11292
11343
|
var _a, _b;
|
11293
11344
|
const tabProps = useTab({ ...props, ref });
|
11294
11345
|
const isSelected = !!tabProps["aria-selected"];
|
11295
11346
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
11296
|
-
return /* @__PURE__ */
|
11347
|
+
return /* @__PURE__ */ jsx65(
|
11297
11348
|
Button6,
|
11298
11349
|
{
|
11299
11350
|
"data-test-id": props["data-test-id"],
|
@@ -11319,7 +11370,7 @@ var Tab = forwardRef15((props, ref) => {
|
|
11319
11370
|
},
|
11320
11371
|
__css: styles.tab,
|
11321
11372
|
...tabProps,
|
11322
|
-
children: /* @__PURE__ */
|
11373
|
+
children: /* @__PURE__ */ jsxs27(Flex15, { alignItems: "center", children: [
|
11323
11374
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
11324
11375
|
tabProps.children,
|
11325
11376
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -11367,12 +11418,188 @@ import {
|
|
11367
11418
|
// src/components/text/index.ts
|
11368
11419
|
import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text18, TextProps } from "@chakra-ui/react";
|
11369
11420
|
|
11370
|
-
// src/components/
|
11371
|
-
import
|
11421
|
+
// src/components/toast/components/toast.tsx
|
11422
|
+
import "react-toastify/dist/ReactToastify.css";
|
11423
|
+
import { chakra as chakra7, Flex as Flex16, Link as Link6, useToken } from "@chakra-ui/react";
|
11424
|
+
import { Bounce, toast } from "react-toastify";
|
11425
|
+
import { jsx as jsx66, jsxs as jsxs28 } from "react/jsx-runtime";
|
11426
|
+
var toastStyles = `
|
11427
|
+
.Toastify__toast-container {
|
11428
|
+
width: 380px;
|
11429
|
+
}
|
11430
|
+
|
11431
|
+
.container-toast {
|
11432
|
+
height: 64px;
|
11433
|
+
width: 380px;
|
11434
|
+
border-radius: 4px;
|
11435
|
+
font-family: Poppins;
|
11436
|
+
}
|
11437
|
+
|
11438
|
+
@media (max-width: 480px) {
|
11439
|
+
.container-toast {
|
11440
|
+
margin: 16px !important;
|
11441
|
+
width: calc(100% - 32px); /* Adjust width to fit within the margin */
|
11442
|
+
}
|
11443
|
+
|
11444
|
+
.Toastify__toast-container {
|
11445
|
+
width: 100%;
|
11446
|
+
}
|
11447
|
+
}
|
11448
|
+
`;
|
11449
|
+
var styleSheet = document.createElement("style");
|
11450
|
+
styleSheet.innerText = toastStyles;
|
11451
|
+
document.head.appendChild(styleSheet);
|
11452
|
+
var DEFAULT_OPTIONS = {
|
11453
|
+
position: "top-right",
|
11454
|
+
autoClose: 5e3,
|
11455
|
+
hideProgressBar: false,
|
11456
|
+
closeOnClick: true,
|
11457
|
+
pauseOnHover: true,
|
11458
|
+
draggable: true,
|
11459
|
+
icon: false,
|
11460
|
+
theme: "colored",
|
11461
|
+
closeButton: false,
|
11462
|
+
className: "container-toast",
|
11463
|
+
transition: Bounce
|
11464
|
+
};
|
11465
|
+
var renderIcon = (icon, type) => {
|
11466
|
+
const iconProps = { theme: "colored", type };
|
11467
|
+
if (typeof icon === "function") {
|
11468
|
+
return icon(iconProps);
|
11469
|
+
}
|
11470
|
+
return icon;
|
11471
|
+
};
|
11472
|
+
var useToast = () => {
|
11473
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = useToken("colors", [
|
11474
|
+
"primary.500",
|
11475
|
+
"neutral.500",
|
11476
|
+
"info.500",
|
11477
|
+
"danger.500",
|
11478
|
+
"warning.500",
|
11479
|
+
"success.500"
|
11480
|
+
]);
|
11481
|
+
const content = (icon, message, link) => {
|
11482
|
+
return /* @__PURE__ */ jsxs28(Flex16, { justifyContent: "space-between", alignItems: "center", gap: 4, children: [
|
11483
|
+
/* @__PURE__ */ jsxs28(Flex16, { alignItems: "center", children: [
|
11484
|
+
icon && /* @__PURE__ */ jsx66(chakra7.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
11485
|
+
/* @__PURE__ */ jsx66(chakra7.span, { noOfLines: 2, children: message })
|
11486
|
+
] }),
|
11487
|
+
link && /* @__PURE__ */ jsx66(
|
11488
|
+
Link6,
|
11489
|
+
{
|
11490
|
+
href: link.url,
|
11491
|
+
textDecoration: "underline",
|
11492
|
+
minW: "max-content",
|
11493
|
+
textAlign: "right",
|
11494
|
+
textStyle: "text.sm",
|
11495
|
+
fontWeight: "semibold",
|
11496
|
+
children: link.label
|
11497
|
+
}
|
11498
|
+
)
|
11499
|
+
] });
|
11500
|
+
};
|
11501
|
+
return {
|
11502
|
+
primary: (message, options) => {
|
11503
|
+
const { icon, link, ...restOptions } = options || {};
|
11504
|
+
toast.success(content(icon, message, link), {
|
11505
|
+
...DEFAULT_OPTIONS,
|
11506
|
+
...restOptions,
|
11507
|
+
style: { backgroundColor: primary500 }
|
11508
|
+
});
|
11509
|
+
},
|
11510
|
+
neutral: (message, options) => {
|
11511
|
+
const { icon, link, ...restOptions } = options || {};
|
11512
|
+
toast.success(content(icon, message, link), {
|
11513
|
+
...DEFAULT_OPTIONS,
|
11514
|
+
...restOptions,
|
11515
|
+
style: { backgroundColor: neutral500 }
|
11516
|
+
});
|
11517
|
+
},
|
11518
|
+
success: (message, options) => {
|
11519
|
+
const { icon, link, ...restOptions } = options || {};
|
11520
|
+
toast.success(content(icon, message, link), {
|
11521
|
+
...DEFAULT_OPTIONS,
|
11522
|
+
...restOptions,
|
11523
|
+
style: { backgroundColor: success500 }
|
11524
|
+
});
|
11525
|
+
},
|
11526
|
+
error: (message, options) => {
|
11527
|
+
const { icon, link, ...restOptions } = options || {};
|
11528
|
+
toast.error(content(icon, message, link), {
|
11529
|
+
...DEFAULT_OPTIONS,
|
11530
|
+
...restOptions,
|
11531
|
+
style: { backgroundColor: danger500 }
|
11532
|
+
});
|
11533
|
+
},
|
11534
|
+
warning: (message, options) => {
|
11535
|
+
const { icon, link, ...restOptions } = options || {};
|
11536
|
+
toast.warning(content(icon, message, link), {
|
11537
|
+
...DEFAULT_OPTIONS,
|
11538
|
+
...restOptions,
|
11539
|
+
style: { backgroundColor: warning500 }
|
11540
|
+
});
|
11541
|
+
},
|
11542
|
+
info: (message, options) => {
|
11543
|
+
const { icon, link, ...restOptions } = options || {};
|
11544
|
+
toast.info(content(icon, message, link), {
|
11545
|
+
...DEFAULT_OPTIONS,
|
11546
|
+
...restOptions,
|
11547
|
+
style: { backgroundColor: info500 }
|
11548
|
+
});
|
11549
|
+
},
|
11550
|
+
custom: (message, options) => {
|
11551
|
+
const { icon, link, style, ...restOptions } = options || {};
|
11552
|
+
toast.info(content(icon, message, link), {
|
11553
|
+
...DEFAULT_OPTIONS,
|
11554
|
+
...restOptions,
|
11555
|
+
style: { backgroundColor: style == null ? void 0 : style.backgroundColor, color: style == null ? void 0 : style.color }
|
11556
|
+
});
|
11557
|
+
}
|
11558
|
+
};
|
11559
|
+
};
|
11560
|
+
|
11561
|
+
// src/components/toast/index.ts
|
11562
|
+
import { ToastContainer } from "react-toastify";
|
11563
|
+
|
11564
|
+
// src/components/tooltip/components/tooltip.tsx
|
11565
|
+
import {
|
11566
|
+
Popover as Popover6,
|
11567
|
+
PopoverArrow as PopoverArrow3,
|
11568
|
+
PopoverBody as PopoverBody4,
|
11569
|
+
PopoverContent as PopoverContent6,
|
11570
|
+
PopoverTrigger as PopoverTrigger6,
|
11571
|
+
Portal as Portal4,
|
11572
|
+
Tooltip as ChakraTooltip
|
11573
|
+
} from "@chakra-ui/react";
|
11574
|
+
import { jsx as jsx67, jsxs as jsxs29 } from "react/jsx-runtime";
|
11575
|
+
var Tooltip = (props) => {
|
11576
|
+
const { children, bg = "neutral.700", textStyle = "text.sm", color: color2 = "white" } = props;
|
11577
|
+
const content = /* @__PURE__ */ jsxs29(PopoverContent6, { border: "none", bg, textStyle, borderRadius: props.borderRadius, children: [
|
11578
|
+
props.hasArrow && /* @__PURE__ */ jsx67(PopoverArrow3, { color: color2, bg }),
|
11579
|
+
/* @__PURE__ */ jsx67(PopoverBody4, { color: color2, ...props, children: props.label })
|
11580
|
+
] });
|
11581
|
+
return props.isInteractive === true ? /* @__PURE__ */ jsxs29(Popover6, { trigger: "hover", placement: props.placement, children: [
|
11582
|
+
/* @__PURE__ */ jsx67(PopoverTrigger6, { children }),
|
11583
|
+
props.portal ? /* @__PURE__ */ jsx67(Portal4, { children: content }) : content
|
11584
|
+
] }) : /* @__PURE__ */ jsx67(ChakraTooltip, { ...props, children });
|
11585
|
+
};
|
11372
11586
|
|
11373
11587
|
// src/components/uploader/components/uploader.tsx
|
11374
|
-
import {
|
11375
|
-
|
11588
|
+
import {
|
11589
|
+
Box as Box29,
|
11590
|
+
Button as Button7,
|
11591
|
+
Flex as Flex17,
|
11592
|
+
FormControl as FormControl4,
|
11593
|
+
FormLabel as FormLabel4,
|
11594
|
+
Heading as Heading2,
|
11595
|
+
Image as ChakraImage,
|
11596
|
+
ListItem as ListItem2,
|
11597
|
+
RequiredIndicator as RequiredIndicator2,
|
11598
|
+
Text as Text19,
|
11599
|
+
UnorderedList as UnorderedList2
|
11600
|
+
} from "@chakra-ui/react";
|
11601
|
+
import { Close as X, Plus } from "@ctlyst.id/internal-icon";
|
11602
|
+
import { useCallback as useCallback4, useEffect as useEffect12, useRef as useRef9, useState as useState6 } from "react";
|
11376
11603
|
import { useDropzone } from "react-dropzone";
|
11377
11604
|
|
11378
11605
|
// src/components/uploader/constants.ts
|
@@ -11383,87 +11610,261 @@ var messages = {
|
|
11383
11610
|
replaceFile: "Ganti File",
|
11384
11611
|
uploadFile: "Upload File"
|
11385
11612
|
};
|
11613
|
+
var IMG_EXT = {
|
11614
|
+
jpg: "jpg",
|
11615
|
+
jpeg: "jpeg",
|
11616
|
+
png: "png",
|
11617
|
+
gif: "gif"
|
11618
|
+
};
|
11619
|
+
var DEFAULT_IMAGE_MIME_TYPE = [IMG_EXT.jpg, IMG_EXT.jpeg, IMG_EXT.png, IMG_EXT.gif];
|
11620
|
+
var concatList = (list) => {
|
11621
|
+
let _concatedList = "";
|
11622
|
+
if (list.length > 1) {
|
11623
|
+
_concatedList = `${list.slice(0, -1).join(", ")} dan ${list[list.length - 1]}`;
|
11624
|
+
} else {
|
11625
|
+
_concatedList = list[0];
|
11626
|
+
}
|
11627
|
+
return _concatedList;
|
11628
|
+
};
|
11629
|
+
var formatValidationMessage = (extension) => `Foto harus dalam format ${concatList(extension.map((ext) => `.${ext}`))}.`;
|
11386
11630
|
|
11387
11631
|
// src/components/uploader/components/uploader.tsx
|
11388
|
-
import { jsx as
|
11632
|
+
import { Fragment as Fragment9, jsx as jsx68, jsxs as jsxs30 } from "react/jsx-runtime";
|
11633
|
+
import { createElement as createElement6 } from "react";
|
11389
11634
|
var Uploader = ({
|
11390
11635
|
onHandleUploadFile,
|
11391
11636
|
onHandleRejections,
|
11392
|
-
|
11393
|
-
|
11394
|
-
|
11395
|
-
|
11396
|
-
|
11397
|
-
|
11637
|
+
dragActiveText,
|
11638
|
+
dragInActiveText,
|
11639
|
+
dragReplaceText,
|
11640
|
+
changeFileText,
|
11641
|
+
uploadFileText,
|
11642
|
+
helperText,
|
11643
|
+
label,
|
11644
|
+
isRequired,
|
11645
|
+
isDisabled,
|
11646
|
+
dimension,
|
11647
|
+
acceptFormat = {
|
11648
|
+
validate: DEFAULT_IMAGE_MIME_TYPE
|
11649
|
+
},
|
11650
|
+
maxFileSize,
|
11651
|
+
customValidation,
|
11652
|
+
value,
|
11653
|
+
isShowCloseButton = true,
|
11654
|
+
isClosableToast,
|
11655
|
+
testId,
|
11656
|
+
isError,
|
11657
|
+
errorText,
|
11658
|
+
isShowReupload = true,
|
11659
|
+
size: size2 = "lg",
|
11398
11660
|
...props
|
11399
11661
|
}) => {
|
11400
|
-
const
|
11401
|
-
const [
|
11402
|
-
const
|
11403
|
-
|
11404
|
-
|
11405
|
-
|
11406
|
-
|
11407
|
-
|
11408
|
-
|
11662
|
+
const inputRef = useRef9(null);
|
11663
|
+
const [filePreview, setFilePreview] = useState6();
|
11664
|
+
const toast2 = useToast();
|
11665
|
+
const handleRejection = useCallback4(
|
11666
|
+
(message, file, image) => {
|
11667
|
+
if (onHandleRejections) {
|
11668
|
+
onHandleRejections(file, image);
|
11669
|
+
}
|
11670
|
+
return toast2.error(message, {
|
11671
|
+
closeButton: isClosableToast
|
11672
|
+
});
|
11673
|
+
},
|
11674
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
11675
|
+
[onHandleRejections]
|
11676
|
+
);
|
11677
|
+
const onDrop = useCallback4(
|
11678
|
+
(files) => {
|
11679
|
+
var _a;
|
11680
|
+
const file = files[0];
|
11681
|
+
const fileFormat = file.name.split(".").pop();
|
11682
|
+
if (!(acceptFormat == null ? void 0 : acceptFormat.validate.includes(fileFormat))) {
|
11683
|
+
return handleRejection((_a = acceptFormat.message) != null ? _a : formatValidationMessage(acceptFormat.validate), file, null);
|
11684
|
+
}
|
11685
|
+
const imageUrl = URL.createObjectURL(file);
|
11686
|
+
const img = new Image();
|
11687
|
+
img.src = imageUrl;
|
11688
|
+
img.onload = () => {
|
11689
|
+
var _a2;
|
11690
|
+
const imgWidth = img.width;
|
11691
|
+
const imgheight = img.height;
|
11692
|
+
if (customValidation && customValidation(file, img) !== null) {
|
11693
|
+
return handleRejection(customValidation(file, img), file, img);
|
11409
11694
|
}
|
11410
|
-
|
11695
|
+
if (!acceptFormat.validate.includes(fileFormat)) {
|
11696
|
+
return handleRejection((_a2 = acceptFormat.message) != null ? _a2 : formatValidationMessage(acceptFormat.validate), file, img);
|
11697
|
+
}
|
11698
|
+
if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {
|
11699
|
+
return handleRejection(dimension.message, file, img);
|
11700
|
+
}
|
11701
|
+
if (maxFileSize && file.size > maxFileSize.validate) {
|
11702
|
+
return handleRejection(maxFileSize.message, file, null);
|
11703
|
+
}
|
11704
|
+
onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, img);
|
11705
|
+
setFilePreview(URL.createObjectURL(file));
|
11706
|
+
return null;
|
11707
|
+
};
|
11708
|
+
return null;
|
11411
11709
|
},
|
11412
|
-
[
|
11710
|
+
[acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
|
11413
11711
|
);
|
11414
|
-
const { getRootProps, getInputProps, isDragActive: isDragActive2,
|
11712
|
+
const { getRootProps, getInputProps, isDragActive: isDragActive2, acceptedFiles } = useDropzone({
|
11415
11713
|
onDrop,
|
11416
|
-
|
11417
|
-
|
11418
|
-
|
11419
|
-
|
11714
|
+
maxFiles: 1,
|
11715
|
+
noClick: isDisabled,
|
11716
|
+
disabled: !!filePreview,
|
11717
|
+
noDrag: isDisabled
|
11420
11718
|
});
|
11421
|
-
|
11422
|
-
if (
|
11423
|
-
|
11424
|
-
}
|
11425
|
-
|
11426
|
-
|
11427
|
-
|
11428
|
-
|
11429
|
-
|
11430
|
-
|
11431
|
-
|
11432
|
-
|
11433
|
-
|
11434
|
-
|
11435
|
-
|
11436
|
-
|
11437
|
-
|
11438
|
-
|
11719
|
+
const renderHelperText = () => {
|
11720
|
+
if (Array.isArray(helperText)) {
|
11721
|
+
return /* @__PURE__ */ jsx68(UnorderedList2, { pl: 2, fontSize: 12, color: "gray.600", "data-test-id": "CT_component_base-image-uploader_helperText", children: helperText.map((text2) => /* @__PURE__ */ jsx68(ListItem2, { children: text2 }, text2)) });
|
11722
|
+
}
|
11723
|
+
return helperText;
|
11724
|
+
};
|
11725
|
+
const renderErrorText = (text2) => /* @__PURE__ */ jsx68(Box29, { mb: 2, children: /* @__PURE__ */ jsx68(Text19, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
11726
|
+
const handleRemove = (e) => {
|
11727
|
+
e.stopPropagation();
|
11728
|
+
setFilePreview(void 0);
|
11729
|
+
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
11730
|
+
acceptedFiles.pop();
|
11731
|
+
};
|
11732
|
+
useEffect12(() => {
|
11733
|
+
if (value) {
|
11734
|
+
if (typeof value === "string") {
|
11735
|
+
setFilePreview(value);
|
11736
|
+
} else {
|
11737
|
+
setFilePreview(URL.createObjectURL(value));
|
11738
|
+
}
|
11739
|
+
} else {
|
11740
|
+
setFilePreview(void 0);
|
11741
|
+
acceptedFiles.pop();
|
11742
|
+
}
|
11743
|
+
}, [value]);
|
11744
|
+
const isSmall = size2 === "sm";
|
11745
|
+
const color2 = isDisabled ? "neutral.500" : "primary.500";
|
11746
|
+
const containerHeight = !isSmall ? "160px" : "120px";
|
11747
|
+
const cursorType = filePreview ? "initial" : "pointer";
|
11748
|
+
return /* @__PURE__ */ jsxs30(FormControl4, { isRequired, children: [
|
11749
|
+
label && typeof label === "string" ? (
|
11750
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
11751
|
+
/* @__PURE__ */ jsxs30(FormLabel4, { requiredIndicator: /* @__PURE__ */ jsx68(Fragment9, {}), fontSize: "text.sm", children: [
|
11752
|
+
isRequired && /* @__PURE__ */ jsx68(RequiredIndicator2, { mr: 1, ml: 0 }),
|
11753
|
+
label
|
11754
|
+
] })
|
11755
|
+
) : label,
|
11756
|
+
/* @__PURE__ */ jsxs30(
|
11757
|
+
Flex17,
|
11439
11758
|
{
|
11440
|
-
minH:
|
11759
|
+
minH: containerHeight,
|
11760
|
+
maxW: !isSmall ? "full" : "120px",
|
11761
|
+
mb: 2,
|
11762
|
+
bg: "white",
|
11441
11763
|
border: "1px dashed",
|
11442
|
-
|
11764
|
+
rounded: "sm",
|
11765
|
+
borderColor: isError ? "danger.500" : color2,
|
11443
11766
|
alignItems: "center",
|
11444
11767
|
justifyContent: "center",
|
11445
|
-
cursor: "
|
11768
|
+
cursor: isDisabled ? "not-allowed" : cursorType,
|
11769
|
+
pos: "relative",
|
11770
|
+
_hover: { bg: !filePreview && !isDisabled ? "primary.50" : "" },
|
11446
11771
|
...props,
|
11447
11772
|
...getRootProps(),
|
11448
11773
|
children: [
|
11449
|
-
/* @__PURE__ */
|
11450
|
-
|
11451
|
-
|
11452
|
-
|
11453
|
-
|
11774
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ jsx68(Box29, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ jsx68(
|
11775
|
+
Button7,
|
11776
|
+
{
|
11777
|
+
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
11778
|
+
"aria-label": "remove-image",
|
11779
|
+
rounded: "full",
|
11780
|
+
variant: "icon",
|
11781
|
+
bg: "neutral.600",
|
11782
|
+
_hover: { bg: "neutral.700" },
|
11783
|
+
size: "sm",
|
11784
|
+
h: "20px",
|
11785
|
+
w: "20px",
|
11786
|
+
border: "none",
|
11787
|
+
zIndex: 1,
|
11788
|
+
onClick: handleRemove,
|
11789
|
+
children: /* @__PURE__ */ jsx68(X, { size: 3, color: "white" })
|
11790
|
+
}
|
11791
|
+
) }),
|
11792
|
+
filePreview && /* @__PURE__ */ jsx68(Box29, { w: "full", children: /* @__PURE__ */ jsx68(
|
11793
|
+
Flex17,
|
11794
|
+
{
|
11795
|
+
position: "relative",
|
11796
|
+
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
11797
|
+
justify: "center",
|
11798
|
+
align: "center",
|
11799
|
+
children: /* @__PURE__ */ jsx68(
|
11800
|
+
ChakraImage,
|
11801
|
+
{
|
11802
|
+
h: size2 === "lg" ? "120" : "100",
|
11803
|
+
src: filePreview,
|
11804
|
+
alt: "uploader-preview",
|
11805
|
+
objectFit: "contain"
|
11806
|
+
}
|
11807
|
+
)
|
11808
|
+
}
|
11809
|
+
) }),
|
11810
|
+
!filePreview && /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
11811
|
+
/* @__PURE__ */ jsx68(
|
11812
|
+
"input",
|
11813
|
+
{
|
11814
|
+
"data-test-id": `CT_component_base-image-uploader_input-file${testId ? `_${testId}` : ""}`,
|
11815
|
+
...getInputProps()
|
11816
|
+
}
|
11817
|
+
),
|
11818
|
+
isDragActive2 ? /* @__PURE__ */ jsx68(Text19, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs30(Flex17, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color2, children: [
|
11819
|
+
size2 === "sm" && /* @__PURE__ */ jsx68(Plus, { size: 6, color: color2 }),
|
11820
|
+
/* @__PURE__ */ jsxs30(Box29, { children: [
|
11821
|
+
!filePreview && /* @__PURE__ */ jsx68(
|
11822
|
+
Heading2,
|
11823
|
+
{
|
11824
|
+
fontWeight: "400",
|
11825
|
+
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
11826
|
+
mb: size2 === "sm" ? "0" : "2",
|
11827
|
+
textAlign: "center",
|
11828
|
+
children: uploadFileText && size2 === "lg" ? messages.uploadFile : "Upload"
|
11829
|
+
}
|
11830
|
+
),
|
11831
|
+
size2 === "lg" && /* @__PURE__ */ jsx68(Text19, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
11832
|
+
] })
|
11833
|
+
] })
|
11454
11834
|
] })
|
11455
11835
|
]
|
11456
11836
|
}
|
11457
11837
|
),
|
11458
|
-
|
11838
|
+
filePreview && !isSmall && /* @__PURE__ */ jsxs30(Flex17, { align: "center", justify: "center", my: 2, children: [
|
11839
|
+
/* @__PURE__ */ createElement6(
|
11840
|
+
"input",
|
11841
|
+
{
|
11842
|
+
...getInputProps(),
|
11843
|
+
key: Math.random(),
|
11844
|
+
ref: inputRef,
|
11845
|
+
accept: "image/*",
|
11846
|
+
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
11847
|
+
}
|
11848
|
+
),
|
11849
|
+
isShowReupload && /* @__PURE__ */ jsx68(
|
11850
|
+
Button7,
|
11851
|
+
{
|
11852
|
+
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
11853
|
+
type: "button",
|
11854
|
+
size: "sm",
|
11855
|
+
variant: "outline",
|
11856
|
+
onClick: () => {
|
11857
|
+
var _a;
|
11858
|
+
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.click();
|
11859
|
+
},
|
11860
|
+
children: "Ubah Foto"
|
11861
|
+
}
|
11862
|
+
)
|
11863
|
+
] }),
|
11864
|
+
renderErrorText(errorText),
|
11865
|
+
renderHelperText()
|
11459
11866
|
] });
|
11460
11867
|
};
|
11461
|
-
Uploader.defaultProps = {
|
11462
|
-
onHandleUploadFile: void 0,
|
11463
|
-
onHandleRejections: void 0,
|
11464
|
-
renderError: void 0,
|
11465
|
-
selected: false
|
11466
|
-
};
|
11467
11868
|
var uploader_default = Uploader;
|
11468
11869
|
|
11469
11870
|
// src/components/index.ts
|
@@ -11525,7 +11926,6 @@ __export(components_exports, {
|
|
11525
11926
|
Button: () => button_default2,
|
11526
11927
|
Card: () => card_default2,
|
11527
11928
|
Checkbox: () => checkbox_default2,
|
11528
|
-
Chips: () => chips_default2,
|
11529
11929
|
FormLabel: () => form_label_default,
|
11530
11930
|
Input: () => input_default,
|
11531
11931
|
LoaderStyle: () => loader_default2,
|
@@ -11535,6 +11935,7 @@ __export(components_exports, {
|
|
11535
11935
|
Switch: () => switch_default2,
|
11536
11936
|
Table: () => table_default,
|
11537
11937
|
Tabs: () => tabs_default,
|
11938
|
+
Tag: () => chips_default2,
|
11538
11939
|
Textarea: () => textarea_default2,
|
11539
11940
|
Tooltip: () => tooltip_default
|
11540
11941
|
});
|
@@ -11553,6 +11954,9 @@ var baseStyleButton = defineStyle({
|
|
11553
11954
|
gap: 4,
|
11554
11955
|
fontSize: "text.md",
|
11555
11956
|
bg: "neutral.50",
|
11957
|
+
_expanded: {
|
11958
|
+
bg: "neutral.100"
|
11959
|
+
},
|
11556
11960
|
_focusVisible: {
|
11557
11961
|
bg: "neutral.100"
|
11558
11962
|
},
|
@@ -11581,7 +11985,9 @@ var baseStylePanel = defineStyle({
|
|
11581
11985
|
pb: "5"
|
11582
11986
|
});
|
11583
11987
|
var baseStyleIcon = defineStyle({
|
11584
|
-
fontSize: "1.25em"
|
11988
|
+
fontSize: "1.25em",
|
11989
|
+
boxSize: 6,
|
11990
|
+
p: 1
|
11585
11991
|
});
|
11586
11992
|
var baseStyle = definePartsStyle({
|
11587
11993
|
container: baseStyleContainer,
|
@@ -11594,7 +12000,11 @@ var collapseStyleButton = defineStyle({
|
|
11594
12000
|
borderRadius: "sm",
|
11595
12001
|
borderWidth: "1px",
|
11596
12002
|
borderStyle: "solid",
|
11597
|
-
borderColor: "neutral.300"
|
12003
|
+
borderColor: "neutral.300",
|
12004
|
+
bg: "neutral.50",
|
12005
|
+
_expanded: {
|
12006
|
+
bg: "neutral.50"
|
12007
|
+
}
|
11598
12008
|
});
|
11599
12009
|
var collapseStylePanel = defineStyle({
|
11600
12010
|
py: 0,
|
@@ -11671,7 +12081,7 @@ var baseStyle2 = definePartsStyle2((props) => {
|
|
11671
12081
|
function getBg(props) {
|
11672
12082
|
const { colorScheme: c2 } = props;
|
11673
12083
|
return {
|
11674
|
-
light: c2 === "neutral" ? `colors.${c2}.
|
12084
|
+
light: c2 === "neutral" ? `colors.${c2}.200` : `colors.${c2}.50`
|
11675
12085
|
};
|
11676
12086
|
}
|
11677
12087
|
var variantLight = definePartsStyle2((props) => {
|
@@ -11679,7 +12089,7 @@ var variantLight = definePartsStyle2((props) => {
|
|
11679
12089
|
const bg = getBg(props);
|
11680
12090
|
return {
|
11681
12091
|
container: {
|
11682
|
-
[$fg.variable]: `colors.${c2}.700`,
|
12092
|
+
[$fg.variable]: c2 === "neutral" ? `colors.black.high` : `colors.${c2}.700`,
|
11683
12093
|
[$bg.variable]: bg.light,
|
11684
12094
|
color: $fg.reference
|
11685
12095
|
}
|
@@ -11711,6 +12121,7 @@ var alert_default = alertTheme;
|
|
11711
12121
|
// src/config/theme/components/badge.ts
|
11712
12122
|
var Badge2 = {
|
11713
12123
|
baseStyle: {
|
12124
|
+
h: "fit-content",
|
11714
12125
|
display: "inline-block",
|
11715
12126
|
fontSize: "text.xs",
|
11716
12127
|
fontWeight: "semibold",
|
@@ -11786,7 +12197,7 @@ var badge_default2 = Badge2;
|
|
11786
12197
|
|
11787
12198
|
// src/config/theme/components/button.ts
|
11788
12199
|
import { defineStyleConfig } from "@chakra-ui/styled-system";
|
11789
|
-
var
|
12200
|
+
var Button8 = defineStyleConfig({
|
11790
12201
|
// The styles all button have in common
|
11791
12202
|
baseStyle: {
|
11792
12203
|
fontSize: "body.1",
|
@@ -12041,7 +12452,7 @@ var Button7 = defineStyleConfig({
|
|
12041
12452
|
colorScheme: "primary"
|
12042
12453
|
}
|
12043
12454
|
});
|
12044
|
-
var button_default2 =
|
12455
|
+
var button_default2 = Button8;
|
12045
12456
|
|
12046
12457
|
// src/config/theme/components/card.ts
|
12047
12458
|
import { defineStyleConfig as defineStyleConfig2 } from "@chakra-ui/styled-system";
|
@@ -12158,85 +12569,102 @@ var Checkbox4 = defineMultiStyleConfig3({
|
|
12158
12569
|
var checkbox_default2 = Checkbox4;
|
12159
12570
|
|
12160
12571
|
// src/config/theme/components/chips.ts
|
12161
|
-
import {
|
12162
|
-
|
12163
|
-
|
12164
|
-
|
12165
|
-
|
12166
|
-
|
12167
|
-
|
12168
|
-
|
12169
|
-
|
12170
|
-
|
12171
|
-
|
12172
|
-
|
12173
|
-
|
12174
|
-
|
12175
|
-
|
12176
|
-
|
12177
|
-
|
12178
|
-
|
12179
|
-
|
12180
|
-
|
12181
|
-
|
12182
|
-
|
12183
|
-
|
12184
|
-
|
12185
|
-
|
12186
|
-
|
12187
|
-
|
12188
|
-
|
12189
|
-
|
12190
|
-
|
12191
|
-
|
12192
|
-
|
12193
|
-
|
12194
|
-
|
12195
|
-
|
12196
|
-
|
12197
|
-
|
12198
|
-
|
12199
|
-
|
12200
|
-
|
12572
|
+
import { tagAnatomy } from "@chakra-ui/anatomy";
|
12573
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers4 } from "@chakra-ui/react";
|
12574
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = createMultiStyleConfigHelpers4(tagAnatomy.keys);
|
12575
|
+
var baseStyle4 = definePartsStyle4({
|
12576
|
+
container: {
|
12577
|
+
px: 3,
|
12578
|
+
py: 1,
|
12579
|
+
color: "primary.500",
|
12580
|
+
userSelect: "none",
|
12581
|
+
boxShadow: "none",
|
12582
|
+
border: "1px solid",
|
12583
|
+
borderColor: "primary.500",
|
12584
|
+
bg: "transparent",
|
12585
|
+
cursor: "pointer",
|
12586
|
+
fontWeight: 400
|
12587
|
+
}
|
12588
|
+
});
|
12589
|
+
var solid = definePartsStyle4({
|
12590
|
+
container: {
|
12591
|
+
bg: "primary.500",
|
12592
|
+
color: "white"
|
12593
|
+
},
|
12594
|
+
closeButton: {
|
12595
|
+
color: "white",
|
12596
|
+
opacity: 1
|
12597
|
+
}
|
12598
|
+
});
|
12599
|
+
var outline = definePartsStyle4({
|
12600
|
+
container: {
|
12601
|
+
bg: "transparent",
|
12602
|
+
_hover: {
|
12603
|
+
bg: "primary.50"
|
12604
|
+
}
|
12605
|
+
},
|
12606
|
+
closeButton: {
|
12607
|
+
color: "primary.500",
|
12608
|
+
opacity: 1
|
12609
|
+
}
|
12610
|
+
});
|
12611
|
+
var disabled = definePartsStyle4({
|
12612
|
+
container: {
|
12613
|
+
bg: "neutral.200",
|
12614
|
+
color: "black.low",
|
12615
|
+
borderColor: "neutral.200",
|
12616
|
+
cursor: "not-allowed",
|
12617
|
+
_hover: {
|
12618
|
+
bg: "neutral.200"
|
12201
12619
|
}
|
12202
|
-
return {
|
12203
|
-
...chipsProps
|
12204
|
-
};
|
12205
12620
|
},
|
12621
|
+
closeButton: {
|
12622
|
+
color: "neutral.500",
|
12623
|
+
opacity: 1
|
12624
|
+
}
|
12625
|
+
});
|
12626
|
+
var Tag2 = defineMultiStyleConfig4({
|
12627
|
+
baseStyle: baseStyle4,
|
12206
12628
|
sizes: {
|
12207
12629
|
sm: {
|
12208
|
-
|
12630
|
+
container: {
|
12631
|
+
textStyle: "text.sm"
|
12632
|
+
}
|
12209
12633
|
},
|
12210
12634
|
md: {
|
12211
|
-
|
12212
|
-
|
12635
|
+
container: {
|
12636
|
+
textStyle: "text.md",
|
12637
|
+
py: 2
|
12638
|
+
}
|
12213
12639
|
}
|
12214
12640
|
},
|
12215
|
-
|
12216
|
-
|
12641
|
+
variants: {
|
12642
|
+
solid,
|
12643
|
+
outline,
|
12644
|
+
disabled
|
12217
12645
|
}
|
12218
12646
|
});
|
12219
|
-
var chips_default2 =
|
12647
|
+
var chips_default2 = Tag2;
|
12220
12648
|
|
12221
12649
|
// src/config/theme/components/form-label.ts
|
12222
|
-
import { defineStyle as defineStyle2, defineStyleConfig as
|
12223
|
-
var
|
12650
|
+
import { defineStyle as defineStyle2, defineStyleConfig as defineStyleConfig3 } from "@chakra-ui/styled-system";
|
12651
|
+
var baseStyle5 = defineStyle2({
|
12224
12652
|
fontSize: "field.sm",
|
12225
12653
|
fontWeight: "normal",
|
12226
12654
|
marginEnd: 1,
|
12227
12655
|
mb: 1
|
12228
12656
|
});
|
12229
|
-
var
|
12230
|
-
baseStyle:
|
12657
|
+
var FormLabel5 = defineStyleConfig3({
|
12658
|
+
baseStyle: baseStyle5
|
12231
12659
|
});
|
12232
|
-
var form_label_default =
|
12660
|
+
var form_label_default = FormLabel5;
|
12233
12661
|
|
12234
12662
|
// src/config/theme/components/input.ts
|
12235
12663
|
import { inputAnatomy as parts3 } from "@chakra-ui/anatomy";
|
12236
|
-
import { createMultiStyleConfigHelpers as
|
12664
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers5, defineStyle as defineStyle3 } from "@chakra-ui/styled-system";
|
12237
12665
|
import { mode } from "@chakra-ui/theme-tools";
|
12238
|
-
var { definePartsStyle:
|
12239
|
-
var
|
12666
|
+
var { definePartsStyle: definePartsStyle5, defineMultiStyleConfig: defineMultiStyleConfig5 } = createMultiStyleConfigHelpers5(parts3.keys);
|
12667
|
+
var baseStyle6 = definePartsStyle5({
|
12240
12668
|
field: {
|
12241
12669
|
width: "100%",
|
12242
12670
|
minWidth: 0,
|
@@ -12285,24 +12713,24 @@ var size = {
|
|
12285
12713
|
})
|
12286
12714
|
};
|
12287
12715
|
var sizes2 = {
|
12288
|
-
lg:
|
12716
|
+
lg: definePartsStyle5({
|
12289
12717
|
field: size.lg,
|
12290
12718
|
addon: size.lg
|
12291
12719
|
}),
|
12292
|
-
md:
|
12720
|
+
md: definePartsStyle5({
|
12293
12721
|
field: size.md,
|
12294
12722
|
addon: size.md
|
12295
12723
|
}),
|
12296
|
-
sm:
|
12724
|
+
sm: definePartsStyle5({
|
12297
12725
|
field: size.sm,
|
12298
12726
|
addon: size.sm
|
12299
12727
|
}),
|
12300
|
-
xs:
|
12728
|
+
xs: definePartsStyle5({
|
12301
12729
|
field: size.xs,
|
12302
12730
|
addon: size.xs
|
12303
12731
|
})
|
12304
12732
|
};
|
12305
|
-
var
|
12733
|
+
var outline2 = definePartsStyle5((props) => {
|
12306
12734
|
const field2 = {
|
12307
12735
|
border: 0,
|
12308
12736
|
outline: 0,
|
@@ -12323,7 +12751,7 @@ var outline = definePartsStyle4((props) => {
|
|
12323
12751
|
field: field2
|
12324
12752
|
};
|
12325
12753
|
});
|
12326
|
-
var unstyled2 =
|
12754
|
+
var unstyled2 = definePartsStyle5({
|
12327
12755
|
field: {
|
12328
12756
|
bg: "transparent",
|
12329
12757
|
px: "0",
|
@@ -12336,11 +12764,11 @@ var unstyled2 = definePartsStyle4({
|
|
12336
12764
|
}
|
12337
12765
|
});
|
12338
12766
|
var variants3 = {
|
12339
|
-
outline,
|
12767
|
+
outline: outline2,
|
12340
12768
|
unstyled: unstyled2
|
12341
12769
|
};
|
12342
|
-
var Input3 =
|
12343
|
-
baseStyle:
|
12770
|
+
var Input3 = defineMultiStyleConfig5({
|
12771
|
+
baseStyle: baseStyle6,
|
12344
12772
|
sizes: sizes2,
|
12345
12773
|
variants: variants3,
|
12346
12774
|
defaultProps: {
|
@@ -12351,7 +12779,7 @@ var Input3 = defineMultiStyleConfig4({
|
|
12351
12779
|
var input_default = Input3;
|
12352
12780
|
|
12353
12781
|
// src/config/theme/components/loader.ts
|
12354
|
-
import { defineStyleConfig as
|
12782
|
+
import { defineStyleConfig as defineStyleConfig4 } from "@chakra-ui/styled-system";
|
12355
12783
|
import { keyframes as keyframes3 } from "@emotion/react";
|
12356
12784
|
var rotate = keyframes3({
|
12357
12785
|
"0%": {
|
@@ -12383,7 +12811,7 @@ var getLoaderColor = (color2) => {
|
|
12383
12811
|
if (color2 === "warning") return "var(--chakra-colors-warning-700)";
|
12384
12812
|
return backgroundColor;
|
12385
12813
|
};
|
12386
|
-
var LoaderStyle =
|
12814
|
+
var LoaderStyle = defineStyleConfig4({
|
12387
12815
|
baseStyle: (props) => {
|
12388
12816
|
const colors = getLoaderColor(props.color);
|
12389
12817
|
return {
|
@@ -12468,8 +12896,8 @@ var LoaderStyle = defineStyleConfig5({
|
|
12468
12896
|
var loader_default2 = LoaderStyle;
|
12469
12897
|
|
12470
12898
|
// src/config/theme/components/modal.ts
|
12471
|
-
import { defineStyleConfig as
|
12472
|
-
var Modal3 =
|
12899
|
+
import { defineStyleConfig as defineStyleConfig5 } from "@chakra-ui/styled-system";
|
12900
|
+
var Modal3 = defineStyleConfig5({
|
12473
12901
|
sizes: {
|
12474
12902
|
sm: { dialog: { minW: 400 } },
|
12475
12903
|
md: { dialog: { minW: 600 } },
|
@@ -12483,28 +12911,28 @@ var modal_default = Modal3;
|
|
12483
12911
|
|
12484
12912
|
// src/config/theme/components/popover.ts
|
12485
12913
|
import { popoverAnatomy as parts4 } from "@chakra-ui/anatomy";
|
12486
|
-
import { createMultiStyleConfigHelpers as
|
12487
|
-
var { definePartsStyle:
|
12488
|
-
var
|
12914
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers6 } from "@chakra-ui/react";
|
12915
|
+
var { definePartsStyle: definePartsStyle6, defineMultiStyleConfig: defineMultiStyleConfig6 } = createMultiStyleConfigHelpers6(parts4.keys);
|
12916
|
+
var baseStyle7 = definePartsStyle6({
|
12489
12917
|
content: {
|
12490
12918
|
bg: "white"
|
12491
12919
|
}
|
12492
12920
|
});
|
12493
|
-
var popoverTheme =
|
12921
|
+
var popoverTheme = defineMultiStyleConfig6({ baseStyle: baseStyle7 });
|
12494
12922
|
var popover_default = popoverTheme;
|
12495
12923
|
|
12496
12924
|
// src/config/theme/components/radio.ts
|
12497
12925
|
import { radioAnatomy } from "@chakra-ui/anatomy";
|
12498
|
-
import { createMultiStyleConfigHelpers as
|
12499
|
-
var { definePartsStyle:
|
12500
|
-
var
|
12926
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers7 } from "@chakra-ui/react";
|
12927
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = createMultiStyleConfigHelpers7(radioAnatomy.keys);
|
12928
|
+
var baseStyle8 = definePartsStyle7({
|
12501
12929
|
control: {
|
12502
12930
|
border: "1px solid",
|
12503
|
-
width:
|
12504
|
-
height:
|
12931
|
+
width: 4,
|
12932
|
+
height: 4
|
12505
12933
|
},
|
12506
12934
|
label: {
|
12507
|
-
marginLeft:
|
12935
|
+
marginLeft: 2,
|
12508
12936
|
textStyle: "text.sm",
|
12509
12937
|
color: "black.high",
|
12510
12938
|
_disabled: {
|
@@ -12513,15 +12941,15 @@ var baseStyle7 = definePartsStyle6({
|
|
12513
12941
|
}
|
12514
12942
|
}
|
12515
12943
|
});
|
12516
|
-
var errors2 =
|
12944
|
+
var errors2 = definePartsStyle7({
|
12517
12945
|
control: {
|
12518
12946
|
borderColor: "danger.500",
|
12519
12947
|
_checked: {
|
12520
12948
|
borderColor: "danger.500",
|
12521
12949
|
bg: "white",
|
12522
12950
|
_before: {
|
12523
|
-
h:
|
12524
|
-
w:
|
12951
|
+
h: 2.5,
|
12952
|
+
w: 2.5,
|
12525
12953
|
bg: "danger.500"
|
12526
12954
|
},
|
12527
12955
|
_hover: {
|
@@ -12532,8 +12960,8 @@ var errors2 = definePartsStyle6({
|
|
12532
12960
|
borderColor: "danger.500",
|
12533
12961
|
bg: "white.high",
|
12534
12962
|
_before: {
|
12535
|
-
h:
|
12536
|
-
w:
|
12963
|
+
h: 2.5,
|
12964
|
+
w: 2.5,
|
12537
12965
|
bg: "primary.500",
|
12538
12966
|
opacity: 0.3
|
12539
12967
|
}
|
@@ -12545,31 +12973,31 @@ var errors2 = definePartsStyle6({
|
|
12545
12973
|
}
|
12546
12974
|
},
|
12547
12975
|
label: {
|
12548
|
-
|
12976
|
+
textStyle: "text.sm"
|
12549
12977
|
}
|
12550
12978
|
});
|
12551
|
-
var unstyled3 =
|
12979
|
+
var unstyled3 = definePartsStyle7({
|
12552
12980
|
control: {
|
12553
12981
|
borderColor: "neutral.600",
|
12554
12982
|
_checked: {
|
12555
12983
|
borderColor: "primary.500",
|
12556
12984
|
bg: "white",
|
12557
12985
|
_before: {
|
12558
|
-
h:
|
12559
|
-
w:
|
12986
|
+
h: 2.5,
|
12987
|
+
w: 2.5,
|
12560
12988
|
bg: "primary.500"
|
12561
12989
|
},
|
12562
12990
|
_hover: {
|
12563
12991
|
borderColor: "primary.500",
|
12564
|
-
bg: "
|
12992
|
+
bg: "transparent"
|
12565
12993
|
},
|
12566
12994
|
_disabled: {
|
12567
12995
|
borderColor: "primary.500",
|
12568
12996
|
bg: "white.high",
|
12569
12997
|
opacity: 0.3,
|
12570
12998
|
_before: {
|
12571
|
-
h:
|
12572
|
-
w:
|
12999
|
+
h: 2.5,
|
13000
|
+
w: 2.5,
|
12573
13001
|
bg: "primary.500"
|
12574
13002
|
}
|
12575
13003
|
}
|
@@ -12580,15 +13008,15 @@ var unstyled3 = definePartsStyle6({
|
|
12580
13008
|
}
|
12581
13009
|
},
|
12582
13010
|
label: {
|
12583
|
-
|
13011
|
+
textStyle: "text.sm"
|
12584
13012
|
}
|
12585
13013
|
});
|
12586
13014
|
var variants4 = {
|
12587
13015
|
errors: errors2,
|
12588
13016
|
unstyled: unstyled3
|
12589
13017
|
};
|
12590
|
-
var Radio2 =
|
12591
|
-
baseStyle:
|
13018
|
+
var Radio2 = defineMultiStyleConfig7({
|
13019
|
+
baseStyle: baseStyle8,
|
12592
13020
|
variants: variants4,
|
12593
13021
|
defaultProps: {
|
12594
13022
|
variant: "unstyled"
|
@@ -12598,9 +13026,9 @@ var radio_default = Radio2;
|
|
12598
13026
|
|
12599
13027
|
// src/config/theme/components/switch.ts
|
12600
13028
|
import { switchAnatomy as parts5 } from "@chakra-ui/anatomy";
|
12601
|
-
import { createMultiStyleConfigHelpers as
|
13029
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers8, defineStyle as defineStyle4 } from "@chakra-ui/styled-system";
|
12602
13030
|
import { calc, cssVar as cssVar2 } from "@chakra-ui/theme-tools";
|
12603
|
-
var { defineMultiStyleConfig:
|
13031
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig8, definePartsStyle: definePartsStyle8 } = createMultiStyleConfigHelpers8(parts5.keys);
|
12604
13032
|
var $width = cssVar2("switch-track-width");
|
12605
13033
|
var $height = cssVar2("switch-track-height");
|
12606
13034
|
var $diff = cssVar2("switch-track-diff");
|
@@ -12617,7 +13045,7 @@ var baseStyleThumb = defineStyle4({
|
|
12617
13045
|
transform: `translateX(${$translateX.reference})`
|
12618
13046
|
}
|
12619
13047
|
});
|
12620
|
-
var
|
13048
|
+
var baseStyle9 = definePartsStyle8(() => ({
|
12621
13049
|
container: {
|
12622
13050
|
[$diff.variable]: diffValue,
|
12623
13051
|
[$translateX.variable]: $diff.reference,
|
@@ -12642,17 +13070,17 @@ var baseStyle8 = definePartsStyle7(() => ({
|
|
12642
13070
|
thumb: baseStyleThumb
|
12643
13071
|
}));
|
12644
13072
|
var sizes3 = {
|
12645
|
-
sm:
|
13073
|
+
sm: definePartsStyle8({
|
12646
13074
|
container: {
|
12647
13075
|
[$width.variable]: "1.875rem",
|
12648
|
-
[$height.variable]: "0.
|
13076
|
+
[$height.variable]: "0.8rem"
|
12649
13077
|
},
|
12650
13078
|
thumb: {
|
12651
|
-
[$width.variable]: "0.
|
12652
|
-
[$height.variable]: "0.
|
13079
|
+
[$width.variable]: "0.8rem",
|
13080
|
+
[$height.variable]: "0.8rem"
|
12653
13081
|
}
|
12654
13082
|
}),
|
12655
|
-
md:
|
13083
|
+
md: definePartsStyle8({
|
12656
13084
|
container: {
|
12657
13085
|
[$width.variable]: "2.375rem",
|
12658
13086
|
[$height.variable]: "1rem"
|
@@ -12662,7 +13090,7 @@ var sizes3 = {
|
|
12662
13090
|
[$height.variable]: "1rem"
|
12663
13091
|
}
|
12664
13092
|
}),
|
12665
|
-
lg:
|
13093
|
+
lg: definePartsStyle8({
|
12666
13094
|
container: {
|
12667
13095
|
[$width.variable]: "3.25rem",
|
12668
13096
|
[$height.variable]: "1.375rem"
|
@@ -12673,8 +13101,8 @@ var sizes3 = {
|
|
12673
13101
|
}
|
12674
13102
|
})
|
12675
13103
|
};
|
12676
|
-
var Switch3 =
|
12677
|
-
baseStyle:
|
13104
|
+
var Switch3 = defineMultiStyleConfig8({
|
13105
|
+
baseStyle: baseStyle9,
|
12678
13106
|
sizes: sizes3,
|
12679
13107
|
defaultProps: {
|
12680
13108
|
size: "md"
|
@@ -12684,16 +13112,33 @@ var switch_default2 = Switch3;
|
|
12684
13112
|
|
12685
13113
|
// src/config/theme/components/table.ts
|
12686
13114
|
import { tableAnatomy as parts6 } from "@chakra-ui/anatomy";
|
12687
|
-
import { createMultiStyleConfigHelpers as
|
13115
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers9, defineStyle as defineStyle5 } from "@chakra-ui/styled-system";
|
12688
13116
|
import { mode as mode2 } from "@chakra-ui/theme-tools";
|
12689
|
-
var { defineMultiStyleConfig:
|
12690
|
-
var
|
13117
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig9, definePartsStyle: definePartsStyle9 } = createMultiStyleConfigHelpers9(parts6.keys);
|
13118
|
+
var baseStyle10 = definePartsStyle9({
|
12691
13119
|
table: {
|
12692
13120
|
fontVariantNumeric: "lining-nums tabular-nums",
|
12693
13121
|
borderCollapse: "separate",
|
12694
13122
|
borderSpacing: 0,
|
12695
13123
|
width: "full",
|
12696
|
-
tableLayout: "fixed"
|
13124
|
+
tableLayout: "fixed",
|
13125
|
+
"&:not([data-loading=true])": {
|
13126
|
+
tbody: {
|
13127
|
+
tr: {
|
13128
|
+
cursor: "pointer",
|
13129
|
+
_hover: {
|
13130
|
+
td: {
|
13131
|
+
backgroundColor: "neutral.200"
|
13132
|
+
}
|
13133
|
+
},
|
13134
|
+
'&[data-active="true"]': {
|
13135
|
+
td: {
|
13136
|
+
backgroundColor: "neutral.100"
|
13137
|
+
}
|
13138
|
+
}
|
13139
|
+
}
|
13140
|
+
}
|
13141
|
+
}
|
12697
13142
|
},
|
12698
13143
|
th: {
|
12699
13144
|
fontFamily: "heading",
|
@@ -12702,7 +13147,7 @@ var baseStyle9 = definePartsStyle8({
|
|
12702
13147
|
letterSpacing: "normal",
|
12703
13148
|
textAlign: "start",
|
12704
13149
|
height: "50px",
|
12705
|
-
color:
|
13150
|
+
color: "black.high",
|
12706
13151
|
fontSize: "text.sm",
|
12707
13152
|
lineHeight: "18px",
|
12708
13153
|
backgroundColor: "neutral.50",
|
@@ -12713,27 +13158,6 @@ var baseStyle9 = definePartsStyle8({
|
|
12713
13158
|
pr: 6
|
12714
13159
|
}
|
12715
13160
|
},
|
12716
|
-
tbody: {
|
12717
|
-
tr: {
|
12718
|
-
cursor: "pointer",
|
12719
|
-
_hover: {
|
12720
|
-
td: {
|
12721
|
-
backgroundColor: "neutral.200",
|
12722
|
-
"&>div": {
|
12723
|
-
backgroundColor: "neutral.200"
|
12724
|
-
}
|
12725
|
-
}
|
12726
|
-
},
|
12727
|
-
'&[data-active="true"]': {
|
12728
|
-
td: {
|
12729
|
-
backgroundColor: "neutral.100",
|
12730
|
-
"&>div": {
|
12731
|
-
backgroundColor: "neutral.200"
|
12732
|
-
}
|
12733
|
-
}
|
12734
|
-
}
|
12735
|
-
}
|
12736
|
-
},
|
12737
13161
|
td: {
|
12738
13162
|
// backgroundColor: 'neutral.50',
|
12739
13163
|
textAlign: "start",
|
@@ -12760,11 +13184,11 @@ var numericStyles = defineStyle5({
|
|
12760
13184
|
textAlign: "end"
|
12761
13185
|
}
|
12762
13186
|
});
|
12763
|
-
var variantSimple =
|
13187
|
+
var variantSimple = definePartsStyle9((props) => {
|
12764
13188
|
const { colorScheme: c2 } = props;
|
12765
13189
|
return {
|
12766
13190
|
th: {
|
12767
|
-
color:
|
13191
|
+
color: "black.high",
|
12768
13192
|
borderBottom: "1px",
|
12769
13193
|
borderColor: mode2(`${c2}.100`, `${c2}.700`)(props),
|
12770
13194
|
...numericStyles
|
@@ -12786,11 +13210,11 @@ var variantSimple = definePartsStyle8((props) => {
|
|
12786
13210
|
}
|
12787
13211
|
};
|
12788
13212
|
});
|
12789
|
-
var variantStripe =
|
13213
|
+
var variantStripe = definePartsStyle9((props) => {
|
12790
13214
|
const { colorScheme: c2 } = props;
|
12791
13215
|
return {
|
12792
13216
|
th: {
|
12793
|
-
color:
|
13217
|
+
color: "black.high",
|
12794
13218
|
borderBottom: "1px",
|
12795
13219
|
borderColor: mode2(`${c2}.100`, `${c2}.700`)(props),
|
12796
13220
|
...numericStyles
|
@@ -12831,7 +13255,7 @@ var variants5 = {
|
|
12831
13255
|
unstyled: defineStyle5({})
|
12832
13256
|
};
|
12833
13257
|
var sizes4 = {
|
12834
|
-
sm:
|
13258
|
+
sm: definePartsStyle9({
|
12835
13259
|
th: {
|
12836
13260
|
px: "2",
|
12837
13261
|
py: "4",
|
@@ -12850,7 +13274,7 @@ var sizes4 = {
|
|
12850
13274
|
fontSize: "xs"
|
12851
13275
|
}
|
12852
13276
|
}),
|
12853
|
-
md:
|
13277
|
+
md: definePartsStyle9({
|
12854
13278
|
th: {
|
12855
13279
|
px: "2",
|
12856
13280
|
py: "4",
|
@@ -12868,7 +13292,7 @@ var sizes4 = {
|
|
12868
13292
|
fontSize: "sm"
|
12869
13293
|
}
|
12870
13294
|
}),
|
12871
|
-
lg:
|
13295
|
+
lg: definePartsStyle9({
|
12872
13296
|
th: {
|
12873
13297
|
px: "2",
|
12874
13298
|
py: "4",
|
@@ -12887,8 +13311,8 @@ var sizes4 = {
|
|
12887
13311
|
}
|
12888
13312
|
})
|
12889
13313
|
};
|
12890
|
-
var tableTheme =
|
12891
|
-
baseStyle:
|
13314
|
+
var tableTheme = defineMultiStyleConfig9({
|
13315
|
+
baseStyle: baseStyle10,
|
12892
13316
|
variants: variants5,
|
12893
13317
|
sizes: sizes4,
|
12894
13318
|
defaultProps: {
|
@@ -12901,9 +13325,9 @@ var table_default = tableTheme;
|
|
12901
13325
|
|
12902
13326
|
// src/config/theme/components/tabs.ts
|
12903
13327
|
import { tabsAnatomy as parts7 } from "@chakra-ui/anatomy";
|
12904
|
-
import { createMultiStyleConfigHelpers as
|
12905
|
-
var { defineMultiStyleConfig:
|
12906
|
-
var variantLine =
|
13328
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers10 } from "@chakra-ui/styled-system";
|
13329
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig10, definePartsStyle: definePartsStyle10 } = createMultiStyleConfigHelpers10(parts7.keys);
|
13330
|
+
var variantLine = definePartsStyle10((props) => {
|
12907
13331
|
const { orientation } = props;
|
12908
13332
|
const isVertical = orientation === "vertical";
|
12909
13333
|
const borderProp = isVertical ? "borderStart" : "borderBottom";
|
@@ -12915,17 +13339,17 @@ var variantLine = definePartsStyle9((props) => {
|
|
12915
13339
|
},
|
12916
13340
|
tab: {
|
12917
13341
|
[borderProp]: "1px solid",
|
12918
|
-
borderColor: "
|
13342
|
+
borderColor: "neutral.400",
|
12919
13343
|
[marginProp]: "-1px"
|
12920
13344
|
}
|
12921
13345
|
};
|
12922
13346
|
});
|
12923
|
-
var variantUnstyled =
|
13347
|
+
var variantUnstyled = definePartsStyle10({});
|
12924
13348
|
var variants6 = {
|
12925
13349
|
line: variantLine,
|
12926
13350
|
unstyled: variantUnstyled
|
12927
13351
|
};
|
12928
|
-
var tabsTheme =
|
13352
|
+
var tabsTheme = defineMultiStyleConfig10({
|
12929
13353
|
variants: variants6,
|
12930
13354
|
defaultProps: {
|
12931
13355
|
size: "md",
|
@@ -12935,7 +13359,7 @@ var tabsTheme = defineMultiStyleConfig9({
|
|
12935
13359
|
var tabs_default = tabsTheme;
|
12936
13360
|
|
12937
13361
|
// src/config/theme/components/textarea.ts
|
12938
|
-
import { defineStyle as defineStyle6, defineStyleConfig as
|
13362
|
+
import { defineStyle as defineStyle6, defineStyleConfig as defineStyleConfig6 } from "@chakra-ui/react";
|
12939
13363
|
var getProps = (props) => {
|
12940
13364
|
const { isError, isSuccess, isDisabled } = props;
|
12941
13365
|
let borderColor = "neutral.400";
|
@@ -12955,7 +13379,7 @@ var getProps = (props) => {
|
|
12955
13379
|
borderColor
|
12956
13380
|
};
|
12957
13381
|
};
|
12958
|
-
var
|
13382
|
+
var outline3 = defineStyle6((props) => {
|
12959
13383
|
const { focusBorderColor, borderColor } = getProps(props);
|
12960
13384
|
return {
|
12961
13385
|
background: "white.high",
|
@@ -12999,8 +13423,8 @@ var outline2 = defineStyle6((props) => {
|
|
12999
13423
|
}
|
13000
13424
|
};
|
13001
13425
|
});
|
13002
|
-
var Textarea =
|
13003
|
-
variants: { outline:
|
13426
|
+
var Textarea = defineStyleConfig6({
|
13427
|
+
variants: { outline: outline3 },
|
13004
13428
|
defaultProps: {
|
13005
13429
|
variant: "outline"
|
13006
13430
|
}
|
@@ -13008,14 +13432,15 @@ var Textarea = defineStyleConfig7({
|
|
13008
13432
|
var textarea_default2 = Textarea;
|
13009
13433
|
|
13010
13434
|
// src/config/theme/components/tooltip.ts
|
13011
|
-
import { cssVar as cssVar3, defineStyleConfig as
|
13435
|
+
import { cssVar as cssVar3, defineStyleConfig as defineStyleConfig7 } from "@chakra-ui/react";
|
13012
13436
|
var $arrowBg = cssVar3("popper-arrow-bg");
|
13013
|
-
var
|
13437
|
+
var baseStyle11 = {
|
13014
13438
|
bg: "neutral.700",
|
13439
|
+
textStyle: "text.sm",
|
13015
13440
|
fontSize: "text.sm",
|
13016
13441
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
13017
13442
|
};
|
13018
|
-
var Tooltip2 =
|
13443
|
+
var Tooltip2 = defineStyleConfig7({ baseStyle: baseStyle11 });
|
13019
13444
|
var tooltip_default = Tooltip2;
|
13020
13445
|
|
13021
13446
|
// src/config/theme/themeConfiguration.ts
|
@@ -13041,7 +13466,7 @@ var getTheme = (foundations) => {
|
|
13041
13466
|
config
|
13042
13467
|
});
|
13043
13468
|
};
|
13044
|
-
var
|
13469
|
+
var theme4 = extendTheme({
|
13045
13470
|
components: {
|
13046
13471
|
...components_exports
|
13047
13472
|
},
|
@@ -13061,13 +13486,13 @@ var theme5 = extendTheme({
|
|
13061
13486
|
|
13062
13487
|
// src/hooks/useFetcher.ts
|
13063
13488
|
import axios2 from "axios";
|
13064
|
-
import { useMemo as
|
13489
|
+
import { useMemo as useMemo9 } from "react";
|
13065
13490
|
|
13066
13491
|
// src/provider/components/provider.tsx
|
13067
13492
|
import axios from "axios";
|
13068
|
-
import { createContext as createContext8, useContext as useContext14, useEffect as useEffect13, useMemo as
|
13069
|
-
import { ToastContainer } from "react-toastify";
|
13070
|
-
import { jsx as
|
13493
|
+
import { createContext as createContext8, useContext as useContext14, useEffect as useEffect13, useMemo as useMemo8, useRef as useRef10 } from "react";
|
13494
|
+
import { ToastContainer as ToastContainer2 } from "react-toastify";
|
13495
|
+
import { jsx as jsx69, jsxs as jsxs31 } from "react/jsx-runtime";
|
13071
13496
|
var ProviderContext = createContext8({
|
13072
13497
|
instance: void 0
|
13073
13498
|
});
|
@@ -13076,7 +13501,7 @@ var useInternalUI = () => {
|
|
13076
13501
|
return { instance };
|
13077
13502
|
};
|
13078
13503
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
13079
|
-
const instanceRef =
|
13504
|
+
const instanceRef = useRef10(axios.create(config2));
|
13080
13505
|
useEffect13(() => {
|
13081
13506
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
13082
13507
|
instanceRef.current.interceptors.request.use(interceptor);
|
@@ -13085,9 +13510,9 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
13085
13510
|
instanceRef.current.interceptors.response.use(interceptor);
|
13086
13511
|
});
|
13087
13512
|
}, [requestInterceptors, responseInterceptors]);
|
13088
|
-
const provider =
|
13089
|
-
return /* @__PURE__ */
|
13090
|
-
/* @__PURE__ */
|
13513
|
+
const provider = useMemo8(() => ({ instance: instanceRef.current }), []);
|
13514
|
+
return /* @__PURE__ */ jsxs31(ProviderContext.Provider, { value: provider, children: [
|
13515
|
+
/* @__PURE__ */ jsx69(ToastContainer2, {}),
|
13091
13516
|
children
|
13092
13517
|
] });
|
13093
13518
|
};
|
@@ -13106,7 +13531,7 @@ import {
|
|
13106
13531
|
// src/hooks/useFetcher.ts
|
13107
13532
|
function useFetcher() {
|
13108
13533
|
const { instance } = useInternalUI();
|
13109
|
-
const axiosInstance =
|
13534
|
+
const axiosInstance = useMemo9(() => instance || axios2, [instance]);
|
13110
13535
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
13111
13536
|
const response = await axiosInstance.request({
|
13112
13537
|
data,
|
@@ -13130,7 +13555,7 @@ import {
|
|
13130
13555
|
useBoolean,
|
13131
13556
|
useClipboard,
|
13132
13557
|
useColorMode as useColorMode8,
|
13133
|
-
useColorModeValue as
|
13558
|
+
useColorModeValue as useColorModeValue11,
|
13134
13559
|
useConst,
|
13135
13560
|
useControllableProp,
|
13136
13561
|
useControllableState,
|
@@ -13181,7 +13606,7 @@ export {
|
|
13181
13606
|
AvatarGroupProps,
|
13182
13607
|
AvatarProps,
|
13183
13608
|
badge_default as Badge,
|
13184
|
-
|
13609
|
+
Box19 as Box,
|
13185
13610
|
BoxProps,
|
13186
13611
|
bread_crumb_default as BreadCrumb,
|
13187
13612
|
button_default as Button,
|
@@ -13229,11 +13654,10 @@ export {
|
|
13229
13654
|
ModalOverlay3 as DrawerOverlay,
|
13230
13655
|
DrawerProps,
|
13231
13656
|
empty_state_default as EmptyState,
|
13232
|
-
layout_default as EmptyStateLayout,
|
13233
13657
|
Fade,
|
13234
13658
|
FadeProps,
|
13235
13659
|
field_default as Field,
|
13236
|
-
|
13660
|
+
Flex8 as Flex,
|
13237
13661
|
FlexProps,
|
13238
13662
|
FormControl2 as FormControl,
|
13239
13663
|
FormControlProps,
|
@@ -13246,16 +13670,16 @@ export {
|
|
13246
13670
|
GridItemProps,
|
13247
13671
|
GridProps,
|
13248
13672
|
HStack4 as HStack,
|
13249
|
-
|
13673
|
+
Header,
|
13250
13674
|
Heading,
|
13251
13675
|
HeadingProps,
|
13252
13676
|
Hide,
|
13253
13677
|
HideProps,
|
13254
|
-
|
13255
|
-
IconButton,
|
13678
|
+
Icon3 as Icon,
|
13679
|
+
IconButton2 as IconButton,
|
13256
13680
|
IconButtonProps,
|
13257
13681
|
IconProps,
|
13258
|
-
|
13682
|
+
Image3 as Image,
|
13259
13683
|
ImageProps,
|
13260
13684
|
Img,
|
13261
13685
|
ImgProps,
|
@@ -13283,6 +13707,7 @@ export {
|
|
13283
13707
|
ListItemProps,
|
13284
13708
|
ListProps,
|
13285
13709
|
loader_default as Loader,
|
13710
|
+
Logo,
|
13286
13711
|
navigation_default as MainMenu,
|
13287
13712
|
Modal2 as Modal,
|
13288
13713
|
modal_back_button_default as ModalBackButton,
|
@@ -13302,6 +13727,7 @@ export {
|
|
13302
13727
|
ModalProps,
|
13303
13728
|
multi_datepicker_month_default as MultiDatePickerMonth,
|
13304
13729
|
NavItem,
|
13730
|
+
Navbar,
|
13305
13731
|
navigation_bar_default as NavigationBar,
|
13306
13732
|
OrderedList,
|
13307
13733
|
pagination_default as Pagination,
|
@@ -13324,6 +13750,7 @@ export {
|
|
13324
13750
|
PopoverTrigger4 as PopoverTrigger,
|
13325
13751
|
Portal2 as Portal,
|
13326
13752
|
PortalProps,
|
13753
|
+
Profile,
|
13327
13754
|
provider_default as Provider,
|
13328
13755
|
ProviderContext,
|
13329
13756
|
Radio,
|
@@ -13391,8 +13818,8 @@ export {
|
|
13391
13818
|
Th2 as Th,
|
13392
13819
|
Thead2 as Thead,
|
13393
13820
|
ThemeTypings,
|
13821
|
+
ToastContainer,
|
13394
13822
|
Tooltip,
|
13395
|
-
TooltipProps,
|
13396
13823
|
Tr2 as Tr,
|
13397
13824
|
UnorderedList,
|
13398
13825
|
uploader_default as Uploader,
|
@@ -13423,17 +13850,20 @@ export {
|
|
13423
13850
|
UseTabsProps,
|
13424
13851
|
UseTabsReturn,
|
13425
13852
|
VStack3 as VStack,
|
13853
|
+
Version,
|
13426
13854
|
VisuallyHidden2 as VisuallyHidden,
|
13427
13855
|
VisuallyHiddenInput,
|
13856
|
+
VoilaLogo,
|
13428
13857
|
Wrap,
|
13429
13858
|
WrapItem,
|
13430
13859
|
WrapItemProps,
|
13431
13860
|
WrapProps,
|
13861
|
+
XMSLogo,
|
13432
13862
|
extendTheme2 as extendTheme,
|
13433
13863
|
forwardRef16 as forwardRef,
|
13434
13864
|
getSelectAllCheckboxState,
|
13435
13865
|
getTheme,
|
13436
|
-
|
13866
|
+
theme4 as theme,
|
13437
13867
|
useAccordion,
|
13438
13868
|
useAccordionContext,
|
13439
13869
|
useAccordionItem,
|
@@ -13442,12 +13872,12 @@ export {
|
|
13442
13872
|
useAlertStyles,
|
13443
13873
|
useBoolean,
|
13444
13874
|
useBreakpoint,
|
13445
|
-
useCheckbox,
|
13875
|
+
useCheckbox2 as useCheckbox,
|
13446
13876
|
useCheckboxGroup,
|
13447
13877
|
useClipboard,
|
13448
13878
|
useColorMode8 as useColorMode,
|
13449
13879
|
useColorModePreference,
|
13450
|
-
|
13880
|
+
useColorModeValue11 as useColorModeValue,
|
13451
13881
|
useConst,
|
13452
13882
|
useControllableProp,
|
13453
13883
|
useControllableState,
|
@@ -13480,6 +13910,7 @@ export {
|
|
13480
13910
|
useTabsDescendantsContext,
|
13481
13911
|
useTabsStyles,
|
13482
13912
|
useTheme,
|
13913
|
+
useToast,
|
13483
13914
|
useToken2 as useToken
|
13484
13915
|
};
|
13485
13916
|
//# sourceMappingURL=index.mjs.map
|