@ctlyst.id/internal-ui 2.3.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.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 +1864 -1377
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1595 -1095
- 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 +2 -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
|
-
|
445
|
+
/* @__PURE__ */ jsx14(BreadcrumbItem, { children: /* @__PURE__ */ jsx14(
|
446
|
+
BreadcrumbLink,
|
447
|
+
{
|
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(
|
451
455
|
BreadcrumbLink,
|
452
456
|
{
|
453
|
-
"data-test-id": "
|
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,20 +1268,21 @@ import {
|
|
1242
1268
|
FormErrorMessage as FormErrorMessage3,
|
1243
1269
|
FormHelperText as FormHelperText3,
|
1244
1270
|
FormLabel as FormLabel3,
|
1271
|
+
IconButton as IconButton4,
|
1245
1272
|
InputGroup as InputGroup4,
|
1246
1273
|
InputRightElement as InputRightElement3
|
1247
1274
|
} from "@chakra-ui/react";
|
1248
1275
|
import { cx as cx8 } from "@chakra-ui/shared-utils";
|
1276
|
+
import { Calendar, Close as Close3 } from "@ctlyst.id/internal-icon";
|
1249
1277
|
import ReactDatePicker from "react-datepicker";
|
1250
|
-
import { FiCalendar, FiX } from "react-icons/fi";
|
1251
1278
|
|
1252
1279
|
// src/components/datepicker/components/styles.tsx
|
1253
1280
|
import { useColorMode } from "@chakra-ui/system";
|
1254
1281
|
import { Global } from "@emotion/react";
|
1255
|
-
import { jsx as
|
1256
|
-
var Styles = () => {
|
1282
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
1283
|
+
var Styles = ({ showHeader }) => {
|
1257
1284
|
const { colorMode } = useColorMode();
|
1258
|
-
return /* @__PURE__ */
|
1285
|
+
return /* @__PURE__ */ jsx25(
|
1259
1286
|
Global,
|
1260
1287
|
{
|
1261
1288
|
styles: `
|
@@ -1333,8 +1360,7 @@ var Styles = () => {
|
|
1333
1360
|
}
|
1334
1361
|
|
1335
1362
|
.react-datepicker {
|
1336
|
-
font-family:
|
1337
|
-
font-size: 0.75;
|
1363
|
+
font-family: Poppins;
|
1338
1364
|
background-color: ${colorMode === "light" ? "#ffffff" : "#283046"};
|
1339
1365
|
color: ${colorMode === "light" ? "#000" : "#d0d1d2"};
|
1340
1366
|
filter: drop-shadow(0px 3px 10px rgba(0, 0, 0, 0.08));
|
@@ -1394,9 +1420,9 @@ var Styles = () => {
|
|
1394
1420
|
|
1395
1421
|
.react-datepicker__header {
|
1396
1422
|
text-align: center;
|
1397
|
-
background-color:
|
1423
|
+
background-color: '#ffffff';
|
1398
1424
|
border-top-left-radius: 0.3rem;
|
1399
|
-
padding:
|
1425
|
+
padding-top:16px;
|
1400
1426
|
position: relative;
|
1401
1427
|
}
|
1402
1428
|
.react-datepicker__header--time {
|
@@ -1429,9 +1455,11 @@ var Styles = () => {
|
|
1429
1455
|
.react-datepicker__current-month,
|
1430
1456
|
.react-datepicker-time__header,
|
1431
1457
|
.react-datepicker-year-header {
|
1458
|
+
display:${showHeader ? "block" : "none"};
|
1432
1459
|
margin-top: 0;
|
1433
1460
|
color: ${colorMode === "light" ? "#111111" : "#d0d1d2"};
|
1434
|
-
font-size:
|
1461
|
+
font-size:14px;
|
1462
|
+
font-weight:600;
|
1435
1463
|
}
|
1436
1464
|
|
1437
1465
|
.react-datepicker-time__header {
|
@@ -1448,7 +1476,7 @@ var Styles = () => {
|
|
1448
1476
|
text-align: center;
|
1449
1477
|
cursor: pointer;
|
1450
1478
|
position: absolute;
|
1451
|
-
top:
|
1479
|
+
top: 10px;
|
1452
1480
|
padding: 0;
|
1453
1481
|
border: none;
|
1454
1482
|
z-index: 1;
|
@@ -1458,10 +1486,14 @@ var Styles = () => {
|
|
1458
1486
|
overflow: hidden;
|
1459
1487
|
}
|
1460
1488
|
.react-datepicker__navigation--previous {
|
1461
|
-
left:
|
1489
|
+
left: 22px;
|
1490
|
+
border:1px solid var(--chakra-colors-neutral-400);
|
1491
|
+
border-radius:4px;
|
1462
1492
|
}
|
1463
1493
|
.react-datepicker__navigation--next {
|
1464
|
-
right:
|
1494
|
+
right: 22px;
|
1495
|
+
border:1px solid var(--chakra-colors-neutral-400);
|
1496
|
+
border-radius:4px;
|
1465
1497
|
}
|
1466
1498
|
.react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {
|
1467
1499
|
right: 85px;
|
@@ -1494,14 +1526,14 @@ var Styles = () => {
|
|
1494
1526
|
}
|
1495
1527
|
.react-datepicker__navigation-icon--next::before {
|
1496
1528
|
transform: rotate(45deg);
|
1497
|
-
left: -
|
1529
|
+
left: -4px;
|
1498
1530
|
}
|
1499
1531
|
.react-datepicker__navigation-icon--previous {
|
1500
1532
|
right: -2px;
|
1501
1533
|
}
|
1502
1534
|
.react-datepicker__navigation-icon--previous::before {
|
1503
1535
|
transform: rotate(225deg);
|
1504
|
-
right: -
|
1536
|
+
right: -4px;
|
1505
1537
|
}
|
1506
1538
|
|
1507
1539
|
.react-datepicker__month-container {
|
@@ -1525,7 +1557,7 @@ var Styles = () => {
|
|
1525
1557
|
}
|
1526
1558
|
|
1527
1559
|
.react-datepicker__month {
|
1528
|
-
|
1560
|
+
padding: 0 1rem 1rem 1rem;
|
1529
1561
|
text-align: center;
|
1530
1562
|
}
|
1531
1563
|
.react-datepicker__month .react-datepicker__month-text,
|
@@ -1649,17 +1681,20 @@ var Styles = () => {
|
|
1649
1681
|
|
1650
1682
|
.react-datepicker__day-names {
|
1651
1683
|
margin-bottom: 0px;
|
1684
|
+
margin-top: 8px;
|
1652
1685
|
}
|
1653
1686
|
|
1654
1687
|
.react-datepicker__day-name,
|
1655
1688
|
.react-datepicker__day,
|
1656
1689
|
.react-datepicker__time-name {
|
1657
|
-
|
1690
|
+
colors: #000;
|
1658
1691
|
display: inline-block;
|
1659
|
-
width:
|
1660
|
-
line-height:
|
1692
|
+
width: 2.25rem;
|
1693
|
+
line-height: 2.25rem;
|
1661
1694
|
text-align: center;
|
1662
|
-
|
1695
|
+
}
|
1696
|
+
.react-datepicker__day-name{
|
1697
|
+
color:var(--chakra-colors-black-medium)
|
1663
1698
|
}
|
1664
1699
|
|
1665
1700
|
.react-datepicker__month--selected, .react-datepicker__month--in-selecting-range, .react-datepicker__month--in-range,
|
@@ -1697,8 +1732,8 @@ var Styles = () => {
|
|
1697
1732
|
.react-datepicker__month-text:hover,
|
1698
1733
|
.react-datepicker__quarter-text:hover,
|
1699
1734
|
.react-datepicker__year-text:hover {
|
1700
|
-
border-radius:
|
1701
|
-
background-color:
|
1735
|
+
border-radius: 2rem;
|
1736
|
+
background-color: var(--chakra-colors-neutral-200);
|
1702
1737
|
}
|
1703
1738
|
.react-datepicker__day--highlighted,
|
1704
1739
|
.react-datepicker__month-text--highlighted,
|
@@ -1736,8 +1771,8 @@ var Styles = () => {
|
|
1736
1771
|
.react-datepicker__year-text--selected,
|
1737
1772
|
.react-datepicker__year-text--in-selecting-range,
|
1738
1773
|
.react-datepicker__year-text--in-range {
|
1739
|
-
border-radius:
|
1740
|
-
background-color:
|
1774
|
+
border-radius: var(--chakra-radii-2xl);
|
1775
|
+
background-color: var(--chakra-colors-primary-500);
|
1741
1776
|
color: #fff;
|
1742
1777
|
}
|
1743
1778
|
.react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,
|
@@ -1750,13 +1785,13 @@ var Styles = () => {
|
|
1750
1785
|
.react-datepicker__year-text--selected:hover,
|
1751
1786
|
.react-datepicker__year-text--in-selecting-range:hover,
|
1752
1787
|
.react-datepicker__year-text--in-range:hover {
|
1753
|
-
background-color:
|
1788
|
+
background-color: var(--chakra-colors-primary-500);
|
1754
1789
|
}
|
1755
1790
|
.react-datepicker__day--keyboard-selected,
|
1756
1791
|
.react-datepicker__month-text--keyboard-selected,
|
1757
1792
|
.react-datepicker__quarter-text--keyboard-selected,
|
1758
1793
|
.react-datepicker__year-text--keyboard-selected {
|
1759
|
-
border-radius:
|
1794
|
+
border-radius: 2rem;
|
1760
1795
|
background-color: ${colorMode === "light" ? "#075331" : "#131620"};
|
1761
1796
|
color: #fff;
|
1762
1797
|
}
|
@@ -1782,7 +1817,7 @@ var Styles = () => {
|
|
1782
1817
|
.react-datepicker__month-text--in-range,
|
1783
1818
|
.react-datepicker__quarter-text--in-range,
|
1784
1819
|
.react-datepicker__year-text--in-range) {
|
1785
|
-
background-color:
|
1820
|
+
background-color: var(--chakra-colors-primary-50);
|
1786
1821
|
color: ${colorMode === "light" ? "#000" : "#d0d1d2"};
|
1787
1822
|
}
|
1788
1823
|
.react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
|
@@ -1868,7 +1903,7 @@ var Styles = () => {
|
|
1868
1903
|
|
1869
1904
|
}
|
1870
1905
|
.react-datepicker__header:not(.react-datepicker__header--has-time-select) {
|
1871
|
-
background:
|
1906
|
+
background:var(--chakra-colors-neutral-50);
|
1872
1907
|
|
1873
1908
|
border-top-left-radius: 8px;
|
1874
1909
|
border-top-right-radius: 8px;
|
@@ -2022,12 +2057,12 @@ var Styles = () => {
|
|
2022
2057
|
}
|
2023
2058
|
.react-datepicker__day.react-datepicker__day--in-range {
|
2024
2059
|
border-radius: 0;
|
2025
|
-
background:
|
2026
|
-
color: #
|
2060
|
+
background: var(--chakra-colors-primary-50);
|
2061
|
+
color: #111111;
|
2027
2062
|
}
|
2028
2063
|
.react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range,
|
2029
2064
|
.react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {
|
2030
|
-
background:
|
2065
|
+
background: var(--chakra-colors-primary-500);
|
2031
2066
|
color: #fff;
|
2032
2067
|
}
|
2033
2068
|
.react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range {
|
@@ -2047,18 +2082,45 @@ var Styles = () => {
|
|
2047
2082
|
background-color: inherit;
|
2048
2083
|
}
|
2049
2084
|
.react-datepicker__day--keyboard-selected, .react-datepicker__day--keyboard-selected:hover {
|
2050
|
-
background-color:
|
2085
|
+
background-color: var(--chakra-colors-primary-50);
|
2051
2086
|
color: inherit;
|
2052
2087
|
}
|
2053
2088
|
.react-datepicker__day--today, .react-datepicker__day--today:hover {
|
2054
|
-
|
2089
|
+
border-radius: 2rem;
|
2090
|
+
border-color: var(--chakra-colors-primary-500);
|
2091
|
+
border-width: 1px;
|
2092
|
+
line-height: 34px;
|
2055
2093
|
}
|
2056
|
-
.react-datepicker__day--today:hover {
|
2057
|
-
background:
|
2094
|
+
.react-datepicker__day--today:hover:not(.react-datepicker__day--in-range) {
|
2095
|
+
background: var(--chakra-colors-neutral-200);
|
2096
|
+
border-color:transparent;
|
2097
|
+
color:var(--chakra-colors-black-high);
|
2058
2098
|
}
|
2059
2099
|
.react-datepicker__day--selected.react-datepicker__day--today {
|
2060
2100
|
color: white;
|
2061
|
-
background:
|
2101
|
+
background: var(--chakra-colors-primary-500);
|
2102
|
+
}
|
2103
|
+
.react-datepicker__aria-live {
|
2104
|
+
position: absolute;
|
2105
|
+
clip-path: circle(0);
|
2106
|
+
border: 0;
|
2107
|
+
height: 1px;
|
2108
|
+
margin: -1px;
|
2109
|
+
overflow: hidden;
|
2110
|
+
padding: 0;
|
2111
|
+
width: 1px;
|
2112
|
+
white-space: nowrap;
|
2113
|
+
}
|
2114
|
+
.react-datepicker__day.react-datepicker__day--in-range.react-datepicker__day--today{
|
2115
|
+
border-radius:0px;
|
2116
|
+
border-color:transparent;
|
2117
|
+
background-color:var(--chakra-colors-primary-50);
|
2118
|
+
}
|
2119
|
+
.react-datepicker__month-select,.react-datepicker__year-select {
|
2120
|
+
background-color:transparent;
|
2121
|
+
font-size:14px;
|
2122
|
+
font-weight:600;
|
2123
|
+
text-align:center;
|
2062
2124
|
}
|
2063
2125
|
`
|
2064
2126
|
}
|
@@ -2067,9 +2129,9 @@ var Styles = () => {
|
|
2067
2129
|
var styles_default = Styles;
|
2068
2130
|
|
2069
2131
|
// src/components/datepicker/components/time-input.tsx
|
2070
|
-
import { Flex as
|
2132
|
+
import { Flex as Flex3, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as Text5 } from "@chakra-ui/react";
|
2071
2133
|
import React6 from "react";
|
2072
|
-
import { jsx as
|
2134
|
+
import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
2073
2135
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
2074
2136
|
const [time, setTime] = React6.useState(value || "00:00");
|
2075
2137
|
const handleChange = (e) => {
|
@@ -2077,11 +2139,26 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
2077
2139
|
setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
|
2078
2140
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
2079
2141
|
};
|
2080
|
-
return /* @__PURE__ */
|
2081
|
-
/* @__PURE__ */
|
2082
|
-
/* @__PURE__ */
|
2083
|
-
/* @__PURE__ */
|
2084
|
-
|
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(
|
2146
|
+
Input,
|
2147
|
+
{
|
2148
|
+
onChange: handleChange,
|
2149
|
+
type: "time",
|
2150
|
+
value: time,
|
2151
|
+
"data-test-id": "CT_Component_datepicker_input_time",
|
2152
|
+
flex: 1,
|
2153
|
+
borderRadius: "sm",
|
2154
|
+
border: "1px solid",
|
2155
|
+
borderColor: "inherit",
|
2156
|
+
_focusWithin: {
|
2157
|
+
borderColor: "primary.500"
|
2158
|
+
}
|
2159
|
+
}
|
2160
|
+
),
|
2161
|
+
rightAddon && /* @__PURE__ */ jsx26(InputRightAddon3, { children: rightAddon })
|
2085
2162
|
] })
|
2086
2163
|
] });
|
2087
2164
|
};
|
@@ -2095,7 +2172,7 @@ TimeInput.defaultProps = {
|
|
2095
2172
|
var time_input_default = TimeInput;
|
2096
2173
|
|
2097
2174
|
// src/components/datepicker/components/datepicker.tsx
|
2098
|
-
import { Fragment, jsx as
|
2175
|
+
import { Fragment, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
2099
2176
|
var Datepicker = ({
|
2100
2177
|
id: id2,
|
2101
2178
|
label,
|
@@ -2111,31 +2188,35 @@ var Datepicker = ({
|
|
2111
2188
|
shortMonth,
|
2112
2189
|
...props
|
2113
2190
|
}) => {
|
2114
|
-
var _a;
|
2191
|
+
var _a, _b;
|
2115
2192
|
const selected = value ? new Date(value) : void 0;
|
2116
|
-
const dateFormat = ((_a = props.dateFormat) != null ? _a : withTime) ? "
|
2193
|
+
const dateFormat = ((_a = props.dateFormat) != null ? _a : withTime) ? "dd MMMM yyyy, HH:mm" : "dd MMMM yyyy";
|
2117
2194
|
const getTimeProps = () => {
|
2118
2195
|
if (!withTime) return {};
|
2119
2196
|
return {
|
2120
2197
|
timeInputLabel: "",
|
2121
2198
|
showTimeInput: true,
|
2122
|
-
customTimeInput: /* @__PURE__ */
|
2199
|
+
customTimeInput: /* @__PURE__ */ jsx27(time_input_default, {})
|
2123
2200
|
};
|
2124
2201
|
};
|
2125
|
-
const
|
2126
|
-
|
2127
|
-
/* @__PURE__ */
|
2202
|
+
const hasMultipleMonthShow = ((_b = props == null ? void 0 : props.monthsShown) != null ? _b : 1) < 2;
|
2203
|
+
const component = /* @__PURE__ */ jsxs10(Fragment, { children: [
|
2204
|
+
/* @__PURE__ */ jsx27(styles_default, { showHeader: !hasMultipleMonthShow }),
|
2205
|
+
/* @__PURE__ */ jsx27(
|
2128
2206
|
ReactDatePicker,
|
2129
2207
|
{
|
2130
2208
|
id: id2,
|
2131
2209
|
name,
|
2132
2210
|
selected,
|
2133
|
-
customInput: /* @__PURE__ */
|
2134
|
-
dateFormat,
|
2211
|
+
customInput: /* @__PURE__ */ jsx27(input_field_default, { autoComplete: "off" }),
|
2135
2212
|
showPopperArrow: false,
|
2136
2213
|
calendarClassName: cx8({ inline: props.inline }),
|
2137
|
-
|
2214
|
+
dropdownMode: "select",
|
2215
|
+
showMonthDropdown: hasMultipleMonthShow,
|
2216
|
+
showYearDropdown: hasMultipleMonthShow,
|
2217
|
+
shouldCloseOnSelect: !(props.selectsRange || withTime),
|
2138
2218
|
useShortMonthInDropdown: showMonth ? shortMonth : false,
|
2219
|
+
dateFormat,
|
2139
2220
|
...getTimeProps(),
|
2140
2221
|
...props
|
2141
2222
|
}
|
@@ -2144,16 +2225,30 @@ var Datepicker = ({
|
|
2144
2225
|
if (props.inline) {
|
2145
2226
|
return component;
|
2146
2227
|
}
|
2147
|
-
return /* @__PURE__ */
|
2148
|
-
label && /* @__PURE__ */
|
2149
|
-
/* @__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: [
|
2150
2231
|
component,
|
2151
|
-
/* @__PURE__ */
|
2152
|
-
|
2153
|
-
value && /* @__PURE__ */
|
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,
|
2236
|
+
{
|
2237
|
+
"data-test-id": "H0rseVCzGIaqoLho-EPbu",
|
2238
|
+
display: "flex",
|
2239
|
+
alignItems: "center",
|
2240
|
+
variant: "unstyled",
|
2241
|
+
"aria-label": "Remove",
|
2242
|
+
onClick: onClear,
|
2243
|
+
cursor: "pointer",
|
2244
|
+
size: "sm",
|
2245
|
+
minW: "unset",
|
2246
|
+
icon: /* @__PURE__ */ jsx27(Close3, { size: 4, color: "neutral.600" })
|
2247
|
+
}
|
2248
|
+
)
|
2154
2249
|
] })
|
2155
2250
|
] }),
|
2156
|
-
!isError ? /* @__PURE__ */
|
2251
|
+
!isError ? /* @__PURE__ */ jsx27(FormHelperText3, { fontSize: "text.xs", mt: 1, children: helperText }) : /* @__PURE__ */ jsx27(FormErrorMessage3, { fontSize: "text.xs", mt: 1, children: error })
|
2157
2252
|
] });
|
2158
2253
|
};
|
2159
2254
|
Datepicker.defaultProps = {
|
@@ -2171,14 +2266,14 @@ Datepicker.defaultProps = {
|
|
2171
2266
|
var datepicker_default = Datepicker;
|
2172
2267
|
|
2173
2268
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
2174
|
-
import { Box as
|
2269
|
+
import { Box as Box12, Input as Input2 } from "@chakra-ui/react";
|
2175
2270
|
import { css as css2 } from "@emotion/react";
|
2176
2271
|
import React7 from "react";
|
2177
|
-
import { jsx as
|
2272
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
2178
2273
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
2179
2274
|
const [date, setDate] = React7.useState(null);
|
2180
|
-
return /* @__PURE__ */
|
2181
|
-
|
2275
|
+
return /* @__PURE__ */ jsx28(
|
2276
|
+
Box12,
|
2182
2277
|
{
|
2183
2278
|
fontSize: "12px",
|
2184
2279
|
lineHeight: "18px",
|
@@ -2192,7 +2287,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
2192
2287
|
width: 58px;
|
2193
2288
|
}
|
2194
2289
|
`,
|
2195
|
-
children: /* @__PURE__ */
|
2290
|
+
children: /* @__PURE__ */ jsx28(
|
2196
2291
|
Input2,
|
2197
2292
|
{
|
2198
2293
|
"data-test-id": props["data-test-id"],
|
@@ -2230,11 +2325,11 @@ DatePickerMonth.defaultProps = {
|
|
2230
2325
|
var datepicker_month_default = DatePickerMonth;
|
2231
2326
|
|
2232
2327
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
2233
|
-
import { Box as
|
2328
|
+
import { Box as Box13 } from "@chakra-ui/react";
|
2234
2329
|
import styled from "@emotion/styled";
|
2235
2330
|
import React8 from "react";
|
2236
|
-
import { jsx as
|
2237
|
-
var MultiDateWrapper = styled(
|
2331
|
+
import { jsx as jsx29, jsxs as jsxs11 } from "react/jsx-runtime";
|
2332
|
+
var MultiDateWrapper = styled(Box13)`
|
2238
2333
|
display: flex;
|
2239
2334
|
align-items: center;
|
2240
2335
|
width: fit-content;
|
@@ -2250,8 +2345,8 @@ var MultiDatePickerMonth = ({
|
|
2250
2345
|
max = "2020-12-31"
|
2251
2346
|
}) => {
|
2252
2347
|
const [date, setDate] = React8.useState([null, null]);
|
2253
|
-
return /* @__PURE__ */
|
2254
|
-
/* @__PURE__ */
|
2348
|
+
return /* @__PURE__ */ jsxs11(MultiDateWrapper, { isError, children: [
|
2349
|
+
/* @__PURE__ */ jsx29(
|
2255
2350
|
datepicker_month_default,
|
2256
2351
|
{
|
2257
2352
|
"data-test-id": "CT_DatePickerMonth_StartDate",
|
@@ -2263,8 +2358,8 @@ var MultiDatePickerMonth = ({
|
|
2263
2358
|
max
|
2264
2359
|
}
|
2265
2360
|
),
|
2266
|
-
/* @__PURE__ */
|
2267
|
-
/* @__PURE__ */
|
2361
|
+
/* @__PURE__ */ jsx29(Box13, { children: "-" }),
|
2362
|
+
/* @__PURE__ */ jsx29(
|
2268
2363
|
datepicker_month_default,
|
2269
2364
|
{
|
2270
2365
|
"data-test-id": "CT_DatePickerMonth_EndDate",
|
@@ -2287,7 +2382,7 @@ var multi_datepicker_month_default = MultiDatePickerMonth;
|
|
2287
2382
|
|
2288
2383
|
// src/components/dialog/components/dialog.tsx
|
2289
2384
|
import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text as Text6 } from "@chakra-ui/react";
|
2290
|
-
import { jsx as
|
2385
|
+
import { jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
|
2291
2386
|
var Dialog = ({
|
2292
2387
|
title,
|
2293
2388
|
content,
|
@@ -2297,12 +2392,12 @@ var Dialog = ({
|
|
2297
2392
|
isOverlayClickable,
|
2298
2393
|
...props
|
2299
2394
|
}) => {
|
2300
|
-
return /* @__PURE__ */
|
2301
|
-
isModalOverlay && /* @__PURE__ */
|
2302
|
-
/* @__PURE__ */
|
2303
|
-
/* @__PURE__ */
|
2304
|
-
/* @__PURE__ */
|
2305
|
-
/* @__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 })
|
2306
2401
|
] })
|
2307
2402
|
] });
|
2308
2403
|
};
|
@@ -2314,133 +2409,125 @@ Dialog.defaultProps = {
|
|
2314
2409
|
var dialog_default = Dialog;
|
2315
2410
|
|
2316
2411
|
// src/components/empty-state/components/empty-state.tsx
|
2317
|
-
import * as
|
2412
|
+
import * as Icon2 from "@ctlyst.id/internal-icon";
|
2318
2413
|
|
2319
2414
|
// src/components/empty-state/components/layout.tsx
|
2320
|
-
import { Box as
|
2321
|
-
import { jsx as
|
2322
|
-
var
|
2323
|
-
icon,
|
2324
|
-
title,
|
2325
|
-
description,
|
2326
|
-
buttonText,
|
2327
|
-
maxW = 320,
|
2328
|
-
onClick
|
2329
|
-
}) => {
|
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;
|
2330
2419
|
const handleClick = () => {
|
2331
2420
|
if (onClick) {
|
2332
2421
|
onClick();
|
2333
2422
|
}
|
2334
2423
|
};
|
2335
|
-
return /* @__PURE__ */
|
2424
|
+
return /* @__PURE__ */ jsx31(Flex4, { align: "center", justify: "center", children: /* @__PURE__ */ jsxs13(VStack, { textAlign: "center", children: [
|
2336
2425
|
icon,
|
2337
|
-
/* @__PURE__ */
|
2338
|
-
/* @__PURE__ */
|
2339
|
-
/* @__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 })
|
2340
2429
|
] }),
|
2341
|
-
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 }) })
|
2342
2431
|
] }) });
|
2343
2432
|
};
|
2344
|
-
var layout_default =
|
2433
|
+
var layout_default = EmptyState;
|
2345
2434
|
|
2346
2435
|
// src/components/empty-state/components/empty-state.tsx
|
2347
|
-
import { jsx as
|
2348
|
-
var
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
|
2355
|
-
}
|
2356
|
-
);
|
2357
|
-
};
|
2358
|
-
var EmptyStatePage = () => {
|
2359
|
-
return /* @__PURE__ */ jsx31(
|
2360
|
-
layout_default,
|
2361
|
-
{
|
2362
|
-
title: "Halaman tidak ditemukan",
|
2363
|
-
description: "Halaman yang dituju mungkin telah berubah atau dihapus.",
|
2364
|
-
icon: /* @__PURE__ */ jsx31(Icon.Img404, { size: 110 }),
|
2365
|
-
buttonText: "Kembali ke Home",
|
2366
|
-
maxW: 220
|
2367
|
-
}
|
2368
|
-
);
|
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 });
|
2369
2444
|
};
|
2370
|
-
var
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
);
|
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 });
|
2379
2453
|
};
|
2380
|
-
var
|
2381
|
-
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2387
|
-
maxW: 300
|
2388
|
-
}
|
2389
|
-
);
|
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 });
|
2390
2461
|
};
|
2391
|
-
var
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
buttonText: "Coba Lagi",
|
2399
|
-
maxW: 250
|
2400
|
-
}
|
2401
|
-
);
|
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 });
|
2402
2469
|
};
|
2403
|
-
var
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
}
|
2411
|
-
);
|
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 });
|
2412
2477
|
};
|
2413
|
-
var
|
2414
|
-
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
|
-
|
2420
|
-
maxW: 400,
|
2421
|
-
buttonText: "Kembali ke Home"
|
2422
|
-
}
|
2423
|
-
);
|
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 });
|
2424
2485
|
};
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2431
|
-
|
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;
|
2432
2504
|
|
2433
2505
|
// src/components/header/components/header.tsx
|
2434
|
-
import { Flex as
|
2506
|
+
import { Flex as Flex6, HStack as HStack3 } from "@chakra-ui/react";
|
2435
2507
|
|
2436
2508
|
// src/components/header/components/logo.tsx
|
2437
|
-
import { Box as
|
2438
|
-
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";
|
2439
2511
|
var Logo = ({ url, imageUrl, height }) => {
|
2440
2512
|
if (url)
|
2441
|
-
return /* @__PURE__ */
|
2442
|
-
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 });
|
2443
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
|
+
);
|
2444
2531
|
Logo.defaultProps = {
|
2445
2532
|
url: void 0,
|
2446
2533
|
height: void 0
|
@@ -2449,8 +2536,8 @@ Logo.defaultProps = {
|
|
2449
2536
|
// src/components/header/components/profile.tsx
|
2450
2537
|
import {
|
2451
2538
|
Avatar,
|
2452
|
-
Box as
|
2453
|
-
Flex as
|
2539
|
+
Box as Box16,
|
2540
|
+
Flex as Flex5,
|
2454
2541
|
HStack as HStack2,
|
2455
2542
|
Popover,
|
2456
2543
|
PopoverArrow,
|
@@ -2458,78 +2545,127 @@ import {
|
|
2458
2545
|
PopoverContent,
|
2459
2546
|
PopoverTrigger,
|
2460
2547
|
Text as Text8,
|
2461
|
-
useColorModeValue as useColorModeValue3,
|
2462
2548
|
useDisclosure,
|
2463
2549
|
VStack as VStack2
|
2464
2550
|
} from "@chakra-ui/react";
|
2465
2551
|
import { FiPower } from "react-icons/fi";
|
2466
|
-
|
2467
|
-
|
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 }) => {
|
2468
2601
|
var _a;
|
2469
2602
|
const { isOpen, onToggle, onClose } = useDisclosure();
|
2470
|
-
return /* @__PURE__ */
|
2471
|
-
/* @__PURE__ */
|
2472
|
-
|
2603
|
+
return /* @__PURE__ */ jsxs14(Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
2604
|
+
/* @__PURE__ */ jsx35(
|
2605
|
+
Box16,
|
2473
2606
|
{
|
2474
|
-
"data-test-id": "
|
2607
|
+
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
2475
2608
|
as: "button",
|
2476
2609
|
cursor: "pointer",
|
2477
|
-
|
2478
|
-
_hover: {
|
2479
|
-
|
2610
|
+
w: "fit-content",
|
2611
|
+
_hover: {
|
2612
|
+
textDecor: "none",
|
2613
|
+
".catalyst-header-avatar": {
|
2614
|
+
border: "2px solid",
|
2615
|
+
borderColor: "primary.100"
|
2616
|
+
}
|
2617
|
+
},
|
2480
2618
|
onClick: onToggle,
|
2481
2619
|
color: color2,
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
2485
|
-
/* @__PURE__ */
|
2486
|
-
|
2487
|
-
|
2488
|
-
|
2489
|
-
/* @__PURE__ */
|
2490
|
-
|
2491
|
-
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
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" })
|
2495
2657
|
] })
|
2496
2658
|
] }),
|
2497
|
-
/* @__PURE__ */
|
2498
|
-
Avatar,
|
2499
|
-
{
|
2500
|
-
size: "sm",
|
2501
|
-
bg: brandColor,
|
2502
|
-
color: "white",
|
2503
|
-
name: (_a = data == null ? void 0 : data.name) != null ? _a : data == null ? void 0 : data.email,
|
2504
|
-
border: "2px solid",
|
2505
|
-
_hover: {
|
2506
|
-
borderColor: "primary.50"
|
2507
|
-
}
|
2508
|
-
}
|
2509
|
-
) })
|
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 }) }) })
|
2510
2660
|
] })
|
2511
2661
|
}
|
2512
2662
|
),
|
2513
|
-
/* @__PURE__ */
|
2514
|
-
/* @__PURE__ */
|
2515
|
-
/* @__PURE__ */
|
2516
|
-
|
2517
|
-
{
|
2518
|
-
|
2519
|
-
alignItems: "center",
|
2520
|
-
px: 3,
|
2521
|
-
py: 2,
|
2522
|
-
borderRadius: "sm",
|
2523
|
-
cursor: "pointer",
|
2524
|
-
_hover: { bg: useColorModeValue3("primary.500", "mirage.900"), color: "white" },
|
2525
|
-
onClick: onLogout,
|
2526
|
-
textStyle: "text.xs",
|
2527
|
-
children: [
|
2528
|
-
/* @__PURE__ */ jsx33(FiPower, {}),
|
2529
|
-
/* @__PURE__ */ jsx33(Text8, { ml: 2, children: "Logout" })
|
2530
|
-
]
|
2531
|
-
}
|
2532
|
-
) })
|
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
|
+
] }) }) })
|
2533
2669
|
] })
|
2534
2670
|
] });
|
2535
2671
|
};
|
@@ -2537,22 +2673,21 @@ Profile.defaultProps = {
|
|
2537
2673
|
brandColor: "primary.500",
|
2538
2674
|
data: void 0,
|
2539
2675
|
onLogout: void 0,
|
2540
|
-
|
2676
|
+
badgeStyle: void 0
|
2541
2677
|
};
|
2542
|
-
var profile_default = Profile;
|
2543
2678
|
|
2544
2679
|
// src/components/header/components/switch-mode.tsx
|
2545
|
-
import { Box as
|
2680
|
+
import { Box as Box17, useColorMode as useColorMode2 } from "@chakra-ui/react";
|
2546
2681
|
import { FiMoon, FiSun } from "react-icons/fi";
|
2547
|
-
import { jsx as
|
2682
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
2548
2683
|
var SwitchMode = () => {
|
2549
2684
|
const { colorMode, toggleColorMode } = useColorMode2();
|
2550
|
-
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 }) });
|
2551
2686
|
};
|
2552
2687
|
var switch_mode_default = SwitchMode;
|
2553
2688
|
|
2554
2689
|
// src/components/header/components/version.tsx
|
2555
|
-
import { Box as
|
2690
|
+
import { Box as Box18 } from "@chakra-ui/react";
|
2556
2691
|
|
2557
2692
|
// src/components/header/utils/formatter.ts
|
2558
2693
|
function environmentName(env2) {
|
@@ -2567,22 +2702,30 @@ function environmentName(env2) {
|
|
2567
2702
|
}
|
2568
2703
|
|
2569
2704
|
// src/components/header/components/version.tsx
|
2570
|
-
import { Fragment as Fragment3, jsx as
|
2571
|
-
var Version = ({
|
2572
|
-
|
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(
|
2573
2714
|
badge_default,
|
2574
2715
|
{
|
2716
|
+
"data-test-id": "CTA_header-version-badge",
|
2575
2717
|
fontSize: "8px",
|
2576
|
-
"data-test-id": "dzl3esjhCphobaaIXpiUE",
|
2577
2718
|
variant: "neutral-light",
|
2719
|
+
px: "2",
|
2720
|
+
py: "px",
|
2578
2721
|
onClick: onOpenModalRelease,
|
2579
2722
|
cursor: onOpenModalRelease ? "pointer" : "auto",
|
2580
2723
|
...versionStyle,
|
2581
2724
|
children: version
|
2582
2725
|
}
|
2583
|
-
),
|
2584
|
-
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */
|
2585
|
-
|
2726
|
+
) : version,
|
2727
|
+
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ jsx37(
|
2728
|
+
Box18,
|
2586
2729
|
{
|
2587
2730
|
background: "primary.50",
|
2588
2731
|
color: "primary.500",
|
@@ -2602,10 +2745,9 @@ Version.defaultProps = {
|
|
2602
2745
|
onOpenModalRelease: void 0,
|
2603
2746
|
versionStyle: void 0
|
2604
2747
|
};
|
2605
|
-
var version_default = Version;
|
2606
2748
|
|
2607
2749
|
// src/components/header/components/header.tsx
|
2608
|
-
import { jsx as
|
2750
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
2609
2751
|
var Header = ({
|
2610
2752
|
brandColor,
|
2611
2753
|
data,
|
@@ -2623,8 +2765,8 @@ var Header = ({
|
|
2623
2765
|
bg = "white",
|
2624
2766
|
versionStyle,
|
2625
2767
|
...props
|
2626
|
-
}) => /* @__PURE__ */
|
2627
|
-
|
2768
|
+
}) => /* @__PURE__ */ jsx38(Flex6, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ jsxs16(
|
2769
|
+
Flex6,
|
2628
2770
|
{
|
2629
2771
|
h: "auto",
|
2630
2772
|
w: "full",
|
@@ -2632,14 +2774,14 @@ var Header = ({
|
|
2632
2774
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
2633
2775
|
pos: "relative",
|
2634
2776
|
children: [
|
2635
|
-
mainLogo && /* @__PURE__ */
|
2636
|
-
/* @__PURE__ */
|
2777
|
+
mainLogo && /* @__PURE__ */ jsxs16(Flex6, { alignItems: "center", children: [
|
2778
|
+
/* @__PURE__ */ jsx38(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
2637
2779
|
children && children
|
2638
2780
|
] }),
|
2639
|
-
centerLogo && /* @__PURE__ */
|
2640
|
-
/* @__PURE__ */
|
2641
|
-
/* @__PURE__ */
|
2642
|
-
|
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,
|
2643
2785
|
{
|
2644
2786
|
hideEnv,
|
2645
2787
|
version: data == null ? void 0 : data.version,
|
@@ -2649,9 +2791,9 @@ var Header = ({
|
|
2649
2791
|
}
|
2650
2792
|
)
|
2651
2793
|
] }),
|
2652
|
-
profile || /* @__PURE__ */
|
2653
|
-
!hideSwitchMode && /* @__PURE__ */
|
2654
|
-
/* @__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 })
|
2655
2797
|
] })
|
2656
2798
|
]
|
2657
2799
|
}
|
@@ -2671,21 +2813,44 @@ Header.defaultProps = {
|
|
2671
2813
|
profile: void 0,
|
2672
2814
|
versionStyle: void 0
|
2673
2815
|
};
|
2674
|
-
|
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";
|
2675
2840
|
|
2676
2841
|
// src/components/image/index.ts
|
2677
|
-
import { Icon as
|
2842
|
+
import { Icon as Icon3, IconProps, Image as Image3, ImageProps } from "@chakra-ui/react";
|
2678
2843
|
|
2679
2844
|
// src/components/layouting/index.ts
|
2680
2845
|
import {
|
2681
|
-
Box as
|
2846
|
+
Box as Box19,
|
2682
2847
|
BoxProps,
|
2683
2848
|
Center,
|
2684
2849
|
Container,
|
2685
2850
|
ContainerProps,
|
2686
2851
|
Divider,
|
2687
2852
|
DividerProps,
|
2688
|
-
Flex as
|
2853
|
+
Flex as Flex8,
|
2689
2854
|
FlexProps,
|
2690
2855
|
Grid,
|
2691
2856
|
GridItem,
|
@@ -2708,13 +2873,13 @@ import { List, ListIcon, ListItem, ListItemProps, ListProps, OrderedList, Unorde
|
|
2708
2873
|
|
2709
2874
|
// src/components/modal/components/modal-back-button.tsx
|
2710
2875
|
import { ChevronLeftIcon } from "@chakra-ui/icons";
|
2711
|
-
import { IconButton as
|
2712
|
-
import { jsx as
|
2876
|
+
import { IconButton as IconButton5 } from "@chakra-ui/react";
|
2877
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
2713
2878
|
var ModalBackButton = ({ onClick }) => {
|
2714
|
-
return /* @__PURE__ */
|
2715
|
-
|
2879
|
+
return /* @__PURE__ */ jsx40(
|
2880
|
+
IconButton5,
|
2716
2881
|
{
|
2717
|
-
icon: /* @__PURE__ */
|
2882
|
+
icon: /* @__PURE__ */ jsx40(ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
2718
2883
|
size: "sm",
|
2719
2884
|
minW: "6",
|
2720
2885
|
h: "6",
|
@@ -2732,20 +2897,20 @@ var ModalBackButton = ({ onClick }) => {
|
|
2732
2897
|
var modal_back_button_default = ModalBackButton;
|
2733
2898
|
|
2734
2899
|
// src/components/modal/components/modal-body.tsx
|
2735
|
-
import { ModalBody as ChakraModalBody, useColorModeValue as
|
2900
|
+
import { ModalBody as ChakraModalBody, useColorModeValue as useColorModeValue3 } from "@chakra-ui/react";
|
2736
2901
|
import React9 from "react";
|
2737
|
-
import { jsx as
|
2902
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
2738
2903
|
var ModalBody2 = React9.forwardRef(({ children, ...rest }, ref) => {
|
2739
|
-
return /* @__PURE__ */
|
2904
|
+
return /* @__PURE__ */ jsx41(ChakraModalBody, { px: 4, py: 2, ref, background: useColorModeValue3("white", "mirage.900"), ...rest, children });
|
2740
2905
|
});
|
2741
2906
|
var modal_body_default = ModalBody2;
|
2742
2907
|
|
2743
2908
|
// src/components/modal/components/modal-close-button.tsx
|
2744
|
-
import { ModalCloseButton as ChakraModalCloseButton, useColorModeValue as
|
2909
|
+
import { ModalCloseButton as ChakraModalCloseButton, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
|
2745
2910
|
import { forwardRef as forwardRef9 } from "react";
|
2746
|
-
import { jsx as
|
2911
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
2747
2912
|
var ModalCloseButton = forwardRef9((props, ref) => {
|
2748
|
-
return /* @__PURE__ */
|
2913
|
+
return /* @__PURE__ */ jsx42(
|
2749
2914
|
ChakraModalCloseButton,
|
2750
2915
|
{
|
2751
2916
|
ref,
|
@@ -2753,7 +2918,7 @@ var ModalCloseButton = forwardRef9((props, ref) => {
|
|
2753
2918
|
right: 2,
|
2754
2919
|
size: "sm",
|
2755
2920
|
"data-test-id": "modal-close-button",
|
2756
|
-
background:
|
2921
|
+
background: useColorModeValue4("neutral.50", "mirage.900"),
|
2757
2922
|
...props
|
2758
2923
|
}
|
2759
2924
|
);
|
@@ -2761,15 +2926,15 @@ var ModalCloseButton = forwardRef9((props, ref) => {
|
|
2761
2926
|
var modal_close_button_default = ModalCloseButton;
|
2762
2927
|
|
2763
2928
|
// src/components/modal/components/modal-footer.tsx
|
2764
|
-
import { ModalFooter as ChakraModalFooter, useColorModeValue as
|
2929
|
+
import { ModalFooter as ChakraModalFooter, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
|
2765
2930
|
import { forwardRef as forwardRef10 } from "react";
|
2766
|
-
import { jsx as
|
2931
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
2767
2932
|
var ModalFooter2 = forwardRef10(({ children, ...rest }, ref) => {
|
2768
|
-
return /* @__PURE__ */
|
2933
|
+
return /* @__PURE__ */ jsx43(
|
2769
2934
|
ChakraModalFooter,
|
2770
2935
|
{
|
2771
2936
|
ref,
|
2772
|
-
background:
|
2937
|
+
background: useColorModeValue5("neutral.200", "mirage.900"),
|
2773
2938
|
borderBottomRadius: "sm",
|
2774
2939
|
...rest,
|
2775
2940
|
children
|
@@ -2779,15 +2944,15 @@ var ModalFooter2 = forwardRef10(({ children, ...rest }, ref) => {
|
|
2779
2944
|
var modal_footer_default = ModalFooter2;
|
2780
2945
|
|
2781
2946
|
// src/components/modal/components/modal-header.tsx
|
2782
|
-
import { ModalHeader as ChakraModalHeader, useColorModeValue as
|
2947
|
+
import { ModalHeader as ChakraModalHeader, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
|
2783
2948
|
import { forwardRef as forwardRef11 } from "react";
|
2784
|
-
import { jsx as
|
2949
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
2785
2950
|
var ModalHeader2 = forwardRef11(({ children, ...rest }, ref) => {
|
2786
|
-
return /* @__PURE__ */
|
2951
|
+
return /* @__PURE__ */ jsx44(
|
2787
2952
|
ChakraModalHeader,
|
2788
2953
|
{
|
2789
2954
|
ref,
|
2790
|
-
background:
|
2955
|
+
background: useColorModeValue6("neutral.200", "mirage.900"),
|
2791
2956
|
borderTopRadius: "sm",
|
2792
2957
|
fontSize: "text.lg",
|
2793
2958
|
fontWeight: "400",
|
@@ -2838,90 +3003,45 @@ import {
|
|
2838
3003
|
useModalStyles
|
2839
3004
|
} from "@chakra-ui/react";
|
2840
3005
|
|
2841
|
-
// src/components/nav-item/components/nav-item.tsx
|
2842
|
-
import { Link as Link2 } from "@chakra-ui/react";
|
2843
|
-
import { cx as cx9 } from "@chakra-ui/shared-utils";
|
2844
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
2845
|
-
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
2846
|
-
return /* @__PURE__ */ jsx42(
|
2847
|
-
Link2,
|
2848
|
-
{
|
2849
|
-
"data-test-id": props["data-test-id"],
|
2850
|
-
opacity: isDisabled ? "0.3" : "initial",
|
2851
|
-
cursor: isDisabled ? "not-allowed" : "pointer",
|
2852
|
-
h: "7.5",
|
2853
|
-
display: "flex",
|
2854
|
-
justifyContent: "space-between",
|
2855
|
-
alignItems: "center",
|
2856
|
-
w: "full",
|
2857
|
-
p: "2",
|
2858
|
-
pl: isChild ? "7" : "2",
|
2859
|
-
color: isActive ? "primary.500" : "black.high",
|
2860
|
-
bg: isActive ? "primary.100" : "white",
|
2861
|
-
className: cx9("catalyst-nav-item", props.className),
|
2862
|
-
textStyle: "text.xs",
|
2863
|
-
fontWeight: isActive ? "semibold" : "regular",
|
2864
|
-
rounded: "sm",
|
2865
|
-
_active: isDisabled ? {} : {
|
2866
|
-
bg: "primary.100"
|
2867
|
-
},
|
2868
|
-
_hover: isDisabled ? {} : {
|
2869
|
-
textDecoration: "none",
|
2870
|
-
bg: isActive ? "primary.100" : "primary.50"
|
2871
|
-
},
|
2872
|
-
...props,
|
2873
|
-
onClick: isDisabled ? void 0 : props.onClick,
|
2874
|
-
children
|
2875
|
-
}
|
2876
|
-
);
|
2877
|
-
};
|
2878
|
-
NavItem.displayName = "NavItem";
|
2879
|
-
NavItem.defaultProps = {
|
2880
|
-
isActive: false,
|
2881
|
-
isChild: false,
|
2882
|
-
isDisabled: false,
|
2883
|
-
"data-test-id": void 0
|
2884
|
-
};
|
2885
|
-
|
2886
3006
|
// src/components/navigation/components/navigation.tsx
|
2887
3007
|
import {
|
2888
|
-
Box as
|
3008
|
+
Box as Box21,
|
2889
3009
|
Button as Button3,
|
2890
|
-
Flex as
|
3010
|
+
Flex as Flex9,
|
2891
3011
|
Link as Link3,
|
2892
3012
|
Popover as Popover2,
|
2893
3013
|
PopoverContent as PopoverContent2,
|
2894
3014
|
PopoverTrigger as PopoverTrigger2,
|
2895
3015
|
Portal,
|
2896
3016
|
Text as Text9,
|
2897
|
-
useColorModeValue as
|
3017
|
+
useColorModeValue as useColorModeValue7
|
2898
3018
|
} from "@chakra-ui/react";
|
2899
|
-
import * as
|
3019
|
+
import * as Icon5 from "@ctlyst.id/internal-icon";
|
2900
3020
|
import { css as css3 } from "@emotion/react";
|
2901
3021
|
|
2902
3022
|
// src/components/navigation/components/mapping-icon.tsx
|
2903
|
-
import * as
|
2904
|
-
import { jsx as
|
3023
|
+
import * as Icon4 from "@ctlyst.id/internal-icon";
|
3024
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
2905
3025
|
var mappingIcon = /* @__PURE__ */ new Map([
|
2906
|
-
["Order", /* @__PURE__ */
|
2907
|
-
["Fulfillment", /* @__PURE__ */
|
2908
|
-
["Transfer Stock", /* @__PURE__ */
|
2909
|
-
["Stock", /* @__PURE__ */
|
2910
|
-
["Product Database", /* @__PURE__ */
|
2911
|
-
["Purchasing", /* @__PURE__ */
|
2912
|
-
["Reseller", /* @__PURE__ */
|
2913
|
-
["Retur", /* @__PURE__ */
|
2914
|
-
["Other", /* @__PURE__ */
|
2915
|
-
["Content", /* @__PURE__ */
|
2916
|
-
["Customer", /* @__PURE__ */
|
2917
|
-
["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")]
|
2918
3038
|
]);
|
2919
3039
|
|
2920
3040
|
// src/components/navigation/components/navigation.tsx
|
2921
|
-
import { Fragment as Fragment4, jsx as
|
3041
|
+
import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
|
2922
3042
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
2923
|
-
return /* @__PURE__ */
|
2924
|
-
|
3043
|
+
return /* @__PURE__ */ jsx46(Box21, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ jsx46(
|
3044
|
+
Flex9,
|
2925
3045
|
{
|
2926
3046
|
bg: "white",
|
2927
3047
|
w: "full",
|
@@ -2935,8 +3055,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2935
3055
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
2936
3056
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
2937
3057
|
const activeBg = isActive ? "primary.500" : void 0;
|
2938
|
-
return /* @__PURE__ */
|
2939
|
-
/* @__PURE__ */
|
3058
|
+
return /* @__PURE__ */ jsx46(Popover2, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
3059
|
+
/* @__PURE__ */ jsx46(PopoverTrigger2, { children: /* @__PURE__ */ jsx46(
|
2940
3060
|
Button3,
|
2941
3061
|
{
|
2942
3062
|
h: 7.5,
|
@@ -2950,14 +3070,14 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2950
3070
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
2951
3071
|
color: isActive ? "primary.50" : "black.high",
|
2952
3072
|
leftIcon: mappingIcon.get(navigation.title),
|
2953
|
-
rightIcon: /* @__PURE__ */
|
3073
|
+
rightIcon: /* @__PURE__ */ jsx46(Icon5.ChevronDown, { size: 4, color: "inherit" }),
|
2954
3074
|
children: navigation.title
|
2955
3075
|
}
|
2956
3076
|
) }),
|
2957
|
-
navigation.children && /* @__PURE__ */
|
3077
|
+
navigation.children && /* @__PURE__ */ jsx46(Portal, { children: /* @__PURE__ */ jsx46(Box21, { zIndex: "popover", children: /* @__PURE__ */ jsx46(
|
2958
3078
|
PopoverContent2,
|
2959
3079
|
{
|
2960
|
-
bg:
|
3080
|
+
bg: useColorModeValue7("white", "ebony-clay.800"),
|
2961
3081
|
maxW: 250,
|
2962
3082
|
border: "none",
|
2963
3083
|
borderRadius: "md",
|
@@ -2966,7 +3086,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2966
3086
|
const link = navHost ? `${navHost}${navLink}` : navLink;
|
2967
3087
|
const isLocalLink = host === navHost;
|
2968
3088
|
const isActiveSub = activePath === navLink;
|
2969
|
-
return /* @__PURE__ */
|
3089
|
+
return /* @__PURE__ */ jsx46(
|
2970
3090
|
Link3,
|
2971
3091
|
{
|
2972
3092
|
as: isLocalLink ? as : void 0,
|
@@ -2974,8 +3094,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2974
3094
|
_hover: {
|
2975
3095
|
textDecoration: "none"
|
2976
3096
|
},
|
2977
|
-
children: /* @__PURE__ */
|
2978
|
-
|
3097
|
+
children: /* @__PURE__ */ jsxs17(
|
3098
|
+
Box21,
|
2979
3099
|
{
|
2980
3100
|
display: "flex",
|
2981
3101
|
position: "relative",
|
@@ -2983,8 +3103,8 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2983
3103
|
cursor: "pointer",
|
2984
3104
|
transition: "padding 0.35s ease 0s",
|
2985
3105
|
_hover: {
|
2986
|
-
backgroundColor:
|
2987
|
-
color:
|
3106
|
+
backgroundColor: useColorModeValue7("dove-gray.50", "mirage.900"),
|
3107
|
+
color: useColorModeValue7("primary.500", "dove-gray.600"),
|
2988
3108
|
px: 5,
|
2989
3109
|
py: 4,
|
2990
3110
|
_first: { borderTopRadius: "md" },
|
@@ -2998,9 +3118,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2998
3118
|
py: 4,
|
2999
3119
|
children: [
|
3000
3120
|
mappingIcon.get(navigation.title),
|
3001
|
-
/* @__PURE__ */
|
3002
|
-
isActiveSub && /* @__PURE__ */
|
3003
|
-
|
3121
|
+
/* @__PURE__ */ jsx46(Text9, { fontSize: "text.sm", ml: 3, children: title }),
|
3122
|
+
isActiveSub && /* @__PURE__ */ jsx46(
|
3123
|
+
Box21,
|
3004
3124
|
{
|
3005
3125
|
width: 0.5,
|
3006
3126
|
height: 8,
|
@@ -3033,9 +3153,9 @@ Navigation.defaultProps = {
|
|
3033
3153
|
var navigation_default = Navigation;
|
3034
3154
|
|
3035
3155
|
// src/components/navigation/components/navigation-bar.tsx
|
3036
|
-
import { Box as
|
3037
|
-
import * as
|
3038
|
-
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";
|
3039
3159
|
var NavigationBar = ({
|
3040
3160
|
navigations,
|
3041
3161
|
isFetched,
|
@@ -3050,8 +3170,8 @@ var NavigationBar = ({
|
|
3050
3170
|
}
|
3051
3171
|
return subMenu.navHost + subMenu.navLink;
|
3052
3172
|
};
|
3053
|
-
return /* @__PURE__ */
|
3054
|
-
|
3173
|
+
return /* @__PURE__ */ jsx47(Box22, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ jsx47(
|
3174
|
+
Flex10,
|
3055
3175
|
{
|
3056
3176
|
bg: "white",
|
3057
3177
|
w: "full",
|
@@ -3067,8 +3187,8 @@ var NavigationBar = ({
|
|
3067
3187
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
3068
3188
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
3069
3189
|
const activeBg = isActive ? "primary.500" : void 0;
|
3070
|
-
return /* @__PURE__ */
|
3071
|
-
/* @__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(
|
3072
3192
|
Button4,
|
3073
3193
|
{
|
3074
3194
|
h: 7.5,
|
@@ -3082,11 +3202,11 @@ var NavigationBar = ({
|
|
3082
3202
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
3083
3203
|
color: isActive ? "primary.50" : "black.high",
|
3084
3204
|
leftIcon: mappingIcon2.get(item.title),
|
3085
|
-
rightIcon: /* @__PURE__ */
|
3205
|
+
rightIcon: /* @__PURE__ */ jsx47(Icon6.ChevronDown, { size: 4, color: "inherit" }),
|
3086
3206
|
children: item.title
|
3087
3207
|
}
|
3088
3208
|
) }),
|
3089
|
-
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(
|
3090
3210
|
Link4,
|
3091
3211
|
{
|
3092
3212
|
href: urlMenu(subMenu),
|
@@ -3104,7 +3224,7 @@ var NavigationBar = ({
|
|
3104
3224
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
3105
3225
|
children: [
|
3106
3226
|
mappingIcon2.get(item.title),
|
3107
|
-
/* @__PURE__ */
|
3227
|
+
/* @__PURE__ */ jsx47(Text10, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
3108
3228
|
]
|
3109
3229
|
},
|
3110
3230
|
subMenu.id
|
@@ -3121,17 +3241,17 @@ var navigation_bar_default = NavigationBar;
|
|
3121
3241
|
|
3122
3242
|
// src/components/pagination/components/pagination.tsx
|
3123
3243
|
import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon } from "@chakra-ui/icons";
|
3124
|
-
import { Box as
|
3244
|
+
import { Box as Box23, Text as Text11, useColorModeValue as useColorModeValue9 } from "@chakra-ui/react";
|
3125
3245
|
|
3126
3246
|
// src/components/pagination/components/pagination-button.tsx
|
3127
|
-
import { Button as Button5, forwardRef as forwardRef12, useColorModeValue as
|
3128
|
-
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";
|
3129
3249
|
var PaginationButton = forwardRef12(({ className, style, isActive, children, ...rest }, ref) => {
|
3130
|
-
const btnBg =
|
3131
|
-
const btnColor =
|
3132
|
-
const btnNotActiveBg =
|
3133
|
-
const btnNotActiveColor =
|
3134
|
-
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(
|
3135
3255
|
Button5,
|
3136
3256
|
{
|
3137
3257
|
"data-test-id": "Pagination-Button",
|
@@ -3153,7 +3273,7 @@ var PaginationButton = forwardRef12(({ className, style, isActive, children, ...
|
|
3153
3273
|
color: btnNotActiveColor
|
3154
3274
|
} : {},
|
3155
3275
|
_disabled: {
|
3156
|
-
background:
|
3276
|
+
background: useColorModeValue8("neutral.300", "mirage.900"),
|
3157
3277
|
color: "neutral.600",
|
3158
3278
|
pointerEvents: "none"
|
3159
3279
|
},
|
@@ -3170,15 +3290,15 @@ var pagination_button_default = PaginationButton;
|
|
3170
3290
|
|
3171
3291
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
3172
3292
|
import { VisuallyHidden } from "@chakra-ui/react";
|
3173
|
-
import { jsx as
|
3293
|
+
import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
|
3174
3294
|
var PaginationButtonTrigger = ({
|
3175
3295
|
color: color2,
|
3176
3296
|
isDisabled,
|
3177
3297
|
onClick,
|
3178
3298
|
visuallyHidden,
|
3179
3299
|
icon
|
3180
|
-
}) => /* @__PURE__ */
|
3181
|
-
/* @__PURE__ */
|
3300
|
+
}) => /* @__PURE__ */ jsxs19(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color: color2, isDisabled, onClick, children: [
|
3301
|
+
/* @__PURE__ */ jsx49(VisuallyHidden, { children: visuallyHidden }),
|
3182
3302
|
icon
|
3183
3303
|
] });
|
3184
3304
|
PaginationButtonTrigger.defaultProps = {
|
@@ -3191,10 +3311,10 @@ PaginationButtonTrigger.defaultProps = {
|
|
3191
3311
|
var pagination_button_trigger_default = PaginationButtonTrigger;
|
3192
3312
|
|
3193
3313
|
// src/components/pagination/components/pagination.tsx
|
3194
|
-
import { jsx as
|
3314
|
+
import { jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
|
3195
3315
|
var Pagination = ({ className, current, total, onSelect }) => {
|
3196
|
-
const btnColorDisabled =
|
3197
|
-
const btnColor =
|
3316
|
+
const btnColorDisabled = useColorModeValue9("secondary.100", "primary.500");
|
3317
|
+
const btnColor = useColorModeValue9("primary.500", "secondary.100");
|
3198
3318
|
const disabledPrevious = current === 1;
|
3199
3319
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
3200
3320
|
const disabledNext = current === total;
|
@@ -3221,8 +3341,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3221
3341
|
}
|
3222
3342
|
return pageButtons;
|
3223
3343
|
};
|
3224
|
-
return /* @__PURE__ */
|
3225
|
-
/* @__PURE__ */
|
3344
|
+
return /* @__PURE__ */ jsxs20(Box23, { className, display: "inline-flex", alignItems: "center", children: [
|
3345
|
+
/* @__PURE__ */ jsx50(Box23, { mr: 1, children: /* @__PURE__ */ jsx50(
|
3226
3346
|
pagination_button_trigger_default,
|
3227
3347
|
{
|
3228
3348
|
"data-test-id": "Pagination-Button",
|
@@ -3230,11 +3350,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3230
3350
|
isDisabled: disabledPrevious,
|
3231
3351
|
onClick: () => handleSelectPage(1),
|
3232
3352
|
visuallyHidden: "First Page",
|
3233
|
-
icon: /* @__PURE__ */
|
3353
|
+
icon: /* @__PURE__ */ jsx50(ArrowLeftIcon, { width: 2 })
|
3234
3354
|
}
|
3235
3355
|
) }),
|
3236
|
-
/* @__PURE__ */
|
3237
|
-
/* @__PURE__ */
|
3356
|
+
/* @__PURE__ */ jsxs20(Box23, { bg: "neutral.300", borderRadius: "full", children: [
|
3357
|
+
/* @__PURE__ */ jsx50(
|
3238
3358
|
pagination_button_trigger_default,
|
3239
3359
|
{
|
3240
3360
|
"data-test-id": "Pagination-Button",
|
@@ -3242,22 +3362,22 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3242
3362
|
isDisabled: disabledPrevious,
|
3243
3363
|
onClick: () => handleSelectPage(current - 1),
|
3244
3364
|
visuallyHidden: "Previous Page",
|
3245
|
-
icon: /* @__PURE__ */
|
3365
|
+
icon: /* @__PURE__ */ jsx50(ChevronLeftIcon2, {})
|
3246
3366
|
}
|
3247
3367
|
),
|
3248
3368
|
generatePages().map((page) => {
|
3249
|
-
return /* @__PURE__ */
|
3369
|
+
return /* @__PURE__ */ jsx50(
|
3250
3370
|
pagination_button_default,
|
3251
3371
|
{
|
3252
3372
|
"data-test-id": "Pagination-Button",
|
3253
3373
|
isActive: page === current,
|
3254
3374
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
3255
|
-
children: /* @__PURE__ */
|
3375
|
+
children: /* @__PURE__ */ jsx50(Text11, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
3256
3376
|
},
|
3257
3377
|
page
|
3258
3378
|
);
|
3259
3379
|
}),
|
3260
|
-
/* @__PURE__ */
|
3380
|
+
/* @__PURE__ */ jsx50(
|
3261
3381
|
pagination_button_trigger_default,
|
3262
3382
|
{
|
3263
3383
|
"data-test-id": "Pagination-Button",
|
@@ -3265,11 +3385,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3265
3385
|
isDisabled: disabledNext,
|
3266
3386
|
onClick: () => handleSelectPage(current + 1),
|
3267
3387
|
visuallyHidden: "Next Page",
|
3268
|
-
icon: /* @__PURE__ */
|
3388
|
+
icon: /* @__PURE__ */ jsx50(ChevronRightIcon, {})
|
3269
3389
|
}
|
3270
3390
|
)
|
3271
3391
|
] }),
|
3272
|
-
/* @__PURE__ */
|
3392
|
+
/* @__PURE__ */ jsx50(Box23, { ml: 1, children: /* @__PURE__ */ jsx50(
|
3273
3393
|
pagination_button_trigger_default,
|
3274
3394
|
{
|
3275
3395
|
"data-test-id": "Pagination-Button",
|
@@ -3277,7 +3397,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3277
3397
|
isDisabled: disabledNext,
|
3278
3398
|
onClick: () => handleSelectPage(total),
|
3279
3399
|
visuallyHidden: "Last Page",
|
3280
|
-
icon: /* @__PURE__ */
|
3400
|
+
icon: /* @__PURE__ */ jsx50(ArrowRightIcon, { width: 2 })
|
3281
3401
|
}
|
3282
3402
|
) })
|
3283
3403
|
] });
|
@@ -3291,7 +3411,7 @@ var pagination_default = Pagination;
|
|
3291
3411
|
|
3292
3412
|
// src/components/pagination/components/pagination-detail.tsx
|
3293
3413
|
import { Text as Text12 } from "@chakra-ui/react";
|
3294
|
-
import { jsx as
|
3414
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
3295
3415
|
var PaginationDetail = ({
|
3296
3416
|
page,
|
3297
3417
|
limit,
|
@@ -3301,15 +3421,15 @@ var PaginationDetail = ({
|
|
3301
3421
|
lineHeight = 18,
|
3302
3422
|
...rest
|
3303
3423
|
}) => {
|
3304
|
-
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` });
|
3305
3425
|
};
|
3306
3426
|
var pagination_detail_default = PaginationDetail;
|
3307
3427
|
|
3308
3428
|
// src/components/pagination/components/pagination-filter.tsx
|
3309
|
-
import { Box as
|
3429
|
+
import { Box as Box24, Select, Text as Text13, useColorModeValue as useColorModeValue10 } from "@chakra-ui/react";
|
3310
3430
|
import * as React13 from "react";
|
3311
3431
|
import { FiChevronDown } from "react-icons/fi";
|
3312
|
-
import { jsx as
|
3432
|
+
import { jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
|
3313
3433
|
var PaginationFilter = ({
|
3314
3434
|
limit,
|
3315
3435
|
label = "Baris per halaman:",
|
@@ -3318,9 +3438,9 @@ var PaginationFilter = ({
|
|
3318
3438
|
...rest
|
3319
3439
|
}) => {
|
3320
3440
|
const [value, setValue] = React13.useState(limit);
|
3321
|
-
return /* @__PURE__ */
|
3322
|
-
/* @__PURE__ */
|
3323
|
-
/* @__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(
|
3324
3444
|
Select,
|
3325
3445
|
{
|
3326
3446
|
textAlign: "center",
|
@@ -3329,7 +3449,7 @@ var PaginationFilter = ({
|
|
3329
3449
|
border: "none",
|
3330
3450
|
boxShadow: "none",
|
3331
3451
|
width: 18,
|
3332
|
-
icon: /* @__PURE__ */
|
3452
|
+
icon: /* @__PURE__ */ jsx52(FiChevronDown, {}),
|
3333
3453
|
_focusVisible: { boxShadow: "none" },
|
3334
3454
|
onChange: (e) => {
|
3335
3455
|
const numberValue = Number(e.target.value);
|
@@ -3338,7 +3458,7 @@ var PaginationFilter = ({
|
|
3338
3458
|
},
|
3339
3459
|
value,
|
3340
3460
|
children: items.map((item) => {
|
3341
|
-
return /* @__PURE__ */
|
3461
|
+
return /* @__PURE__ */ jsx52("option", { value: item, children: item }, item);
|
3342
3462
|
})
|
3343
3463
|
}
|
3344
3464
|
)
|
@@ -3372,32 +3492,25 @@ import {
|
|
3372
3492
|
} from "@chakra-ui/react";
|
3373
3493
|
|
3374
3494
|
// src/components/radio/components/radio.tsx
|
3375
|
-
import { Box as
|
3376
|
-
import { jsx as
|
3377
|
-
var Radio = ({
|
3378
|
-
isError = false,
|
3379
|
-
helpText = "",
|
3380
|
-
errorText = "",
|
3381
|
-
children,
|
3382
|
-
isDisabled,
|
3383
|
-
...rest
|
3384
|
-
}) => {
|
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 }) => {
|
3385
3498
|
const variant = isError ? "errors" : "unstyled";
|
3386
|
-
return /* @__PURE__ */
|
3387
|
-
/* @__PURE__ */
|
3388
|
-
/* @__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
|
3389
3502
|
] });
|
3390
3503
|
};
|
3391
3504
|
Radio.displayName = "Radio";
|
3392
3505
|
Radio.defaultProps = {
|
3393
3506
|
isError: false,
|
3394
|
-
helpText:
|
3395
|
-
errorText:
|
3507
|
+
helpText: void 0,
|
3508
|
+
errorText: void 0
|
3396
3509
|
};
|
3397
3510
|
|
3398
3511
|
// src/components/radio/components/radio-group.tsx
|
3399
|
-
import { Box as
|
3400
|
-
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";
|
3401
3514
|
var RadioGroup = ({
|
3402
3515
|
children,
|
3403
3516
|
label,
|
@@ -3406,7 +3519,7 @@ var RadioGroup = ({
|
|
3406
3519
|
errorMessage,
|
3407
3520
|
...props
|
3408
3521
|
}) => {
|
3409
|
-
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 }) }) }) });
|
3410
3523
|
};
|
3411
3524
|
RadioGroup.displayName = "RadioGroup";
|
3412
3525
|
RadioGroup.defaultProps = {
|
@@ -3429,9 +3542,9 @@ import {
|
|
3429
3542
|
// src/components/rating/components/rating.tsx
|
3430
3543
|
import { Grid as Grid2 } from "@chakra-ui/react";
|
3431
3544
|
import { Rating as RatingIcon } from "@ctlyst.id/internal-icon";
|
3432
|
-
import { jsx as
|
3545
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
3433
3546
|
var Rating = ({ value }) => {
|
3434
|
-
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 })) });
|
3435
3548
|
};
|
3436
3549
|
var rating_default = Rating;
|
3437
3550
|
|
@@ -3440,16 +3553,16 @@ import { useColorMode as useColorMode3 } from "@chakra-ui/system";
|
|
3440
3553
|
import ReactSelect from "react-select";
|
3441
3554
|
|
3442
3555
|
// src/config/theme/foundations/shadows.ts
|
3443
|
-
import { theme
|
3556
|
+
import { theme } from "@chakra-ui/react";
|
3444
3557
|
var shadows = {
|
3445
|
-
...
|
3558
|
+
...theme.shadows,
|
3446
3559
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
3447
3560
|
};
|
3448
3561
|
|
3449
3562
|
// src/config/theme/foundations/sizes.ts
|
3450
|
-
import { theme as
|
3563
|
+
import { theme as theme2 } from "@chakra-ui/react";
|
3451
3564
|
var sizes = {
|
3452
|
-
...
|
3565
|
+
...theme2.sizes,
|
3453
3566
|
4.5: "1.125rem",
|
3454
3567
|
9.5: "2.375rem",
|
3455
3568
|
18: "4.5rem",
|
@@ -3459,9 +3572,9 @@ var sizes = {
|
|
3459
3572
|
};
|
3460
3573
|
|
3461
3574
|
// src/config/theme/foundations/spacing.ts
|
3462
|
-
import { theme as
|
3575
|
+
import { theme as theme3 } from "@chakra-ui/react";
|
3463
3576
|
var spacing = {
|
3464
|
-
...
|
3577
|
+
...theme3.space,
|
3465
3578
|
4.5: "1.125rem",
|
3466
3579
|
9.5: "2.375rem",
|
3467
3580
|
18: "4.5rem",
|
@@ -3773,11 +3886,11 @@ function selectStyles(colorMode, _isError) {
|
|
3773
3886
|
})
|
3774
3887
|
};
|
3775
3888
|
}
|
3776
|
-
var themeSelect = (
|
3889
|
+
var themeSelect = (theme5) => {
|
3777
3890
|
return {
|
3778
|
-
...
|
3891
|
+
...theme5,
|
3779
3892
|
colors: {
|
3780
|
-
...
|
3893
|
+
...theme5.colors,
|
3781
3894
|
primary: "var(--chakra-colors-primary-100)",
|
3782
3895
|
primary25: "var(--chakra-colors-primary-50)",
|
3783
3896
|
primary50: "var(--chakra-colors-primary-100)",
|
@@ -3787,14 +3900,14 @@ var themeSelect = (theme6) => {
|
|
3787
3900
|
};
|
3788
3901
|
|
3789
3902
|
// src/components/select/components/select.tsx
|
3790
|
-
import { jsx as
|
3903
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
3791
3904
|
function Select2({
|
3792
3905
|
styles,
|
3793
3906
|
isError = false,
|
3794
3907
|
...rest
|
3795
3908
|
}) {
|
3796
3909
|
const { colorMode } = useColorMode3();
|
3797
|
-
return /* @__PURE__ */
|
3910
|
+
return /* @__PURE__ */ jsx56(
|
3798
3911
|
ReactSelect,
|
3799
3912
|
{
|
3800
3913
|
classNamePrefix: "react-select",
|
@@ -3809,14 +3922,14 @@ var select_default = Select2;
|
|
3809
3922
|
// src/components/select/components/select-async.tsx
|
3810
3923
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
3811
3924
|
import { AsyncPaginate } from "react-select-async-paginate";
|
3812
|
-
import { jsx as
|
3925
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
3813
3926
|
function SelectAsync({
|
3814
3927
|
styles,
|
3815
3928
|
isError = false,
|
3816
3929
|
...rest
|
3817
3930
|
}) {
|
3818
3931
|
const { colorMode } = useColorMode4();
|
3819
|
-
return /* @__PURE__ */
|
3932
|
+
return /* @__PURE__ */ jsx57(
|
3820
3933
|
AsyncPaginate,
|
3821
3934
|
{
|
3822
3935
|
classNamePrefix: "react-select",
|
@@ -3831,10 +3944,10 @@ var select_async_default = SelectAsync;
|
|
3831
3944
|
// src/components/select/components/select-async-creatable.tsx
|
3832
3945
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
3833
3946
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
3834
|
-
import { jsx as
|
3947
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
3835
3948
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3836
3949
|
const { colorMode } = useColorMode5();
|
3837
|
-
return /* @__PURE__ */
|
3950
|
+
return /* @__PURE__ */ jsx58(
|
3838
3951
|
ReactSelectAsyncCreatable,
|
3839
3952
|
{
|
3840
3953
|
classNamePrefix: "react-select",
|
@@ -3848,10 +3961,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3848
3961
|
// src/components/select/components/select-creatable.tsx
|
3849
3962
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
3850
3963
|
import ReactSelectCreatable from "react-select/creatable";
|
3851
|
-
import { jsx as
|
3964
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
3852
3965
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3853
3966
|
const { colorMode } = useColorMode6();
|
3854
|
-
return /* @__PURE__ */
|
3967
|
+
return /* @__PURE__ */ jsx59(
|
3855
3968
|
ReactSelectCreatable,
|
3856
3969
|
{
|
3857
3970
|
classNamePrefix: "react-select",
|
@@ -3863,10 +3976,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3863
3976
|
}
|
3864
3977
|
|
3865
3978
|
// src/components/select/components/select-with-checkbox.tsx
|
3866
|
-
import { Checkbox as Checkbox3, Flex as
|
3979
|
+
import { Checkbox as Checkbox3, Flex as Flex11, Text as Text15 } from "@chakra-ui/react";
|
3867
3980
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3868
3981
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3869
|
-
import { Fragment as Fragment6, jsx as
|
3982
|
+
import { Fragment as Fragment6, jsx as jsx60, jsxs as jsxs23 } from "react/jsx-runtime";
|
3870
3983
|
var CHECKBOX_STATE = {
|
3871
3984
|
UNCHECKED: 0,
|
3872
3985
|
INDETERMINATE: 1,
|
@@ -3913,8 +4026,8 @@ var InputOption = ({
|
|
3913
4026
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
3914
4027
|
style
|
3915
4028
|
};
|
3916
|
-
return /* @__PURE__ */
|
3917
|
-
/* @__PURE__ */
|
4029
|
+
return /* @__PURE__ */ jsxs23(Fragment6, { children: [
|
4030
|
+
/* @__PURE__ */ jsx60(
|
3918
4031
|
ComponentRS.Option,
|
3919
4032
|
{
|
3920
4033
|
isMulti: true,
|
@@ -3925,8 +4038,8 @@ var InputOption = ({
|
|
3925
4038
|
getStyles,
|
3926
4039
|
innerProps: props,
|
3927
4040
|
...rest,
|
3928
|
-
children: /* @__PURE__ */
|
3929
|
-
|
4041
|
+
children: /* @__PURE__ */ jsxs23(
|
4042
|
+
Flex11,
|
3930
4043
|
{
|
3931
4044
|
alignItems: "center",
|
3932
4045
|
width: "100%",
|
@@ -3935,7 +4048,7 @@ var InputOption = ({
|
|
3935
4048
|
"data-test-id": "CT_component_select-checkbox_options",
|
3936
4049
|
cursor: isDisabled ? "not-allowed" : "default",
|
3937
4050
|
children: [
|
3938
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4051
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx60(
|
3939
4052
|
Checkbox3,
|
3940
4053
|
{
|
3941
4054
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -3943,14 +4056,14 @@ var InputOption = ({
|
|
3943
4056
|
isDisabled,
|
3944
4057
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
3945
4058
|
}
|
3946
|
-
) : /* @__PURE__ */
|
3947
|
-
/* @__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 })
|
3948
4061
|
]
|
3949
4062
|
}
|
3950
4063
|
)
|
3951
4064
|
}
|
3952
4065
|
),
|
3953
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
4066
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx60("hr", {}) : null
|
3954
4067
|
] });
|
3955
4068
|
};
|
3956
4069
|
var SelectWithCheckboxBase = ({
|
@@ -3960,7 +4073,7 @@ var SelectWithCheckboxBase = ({
|
|
3960
4073
|
...rest
|
3961
4074
|
}) => {
|
3962
4075
|
const { colorMode } = useColorMode7();
|
3963
|
-
return /* @__PURE__ */
|
4076
|
+
return /* @__PURE__ */ jsx60(
|
3964
4077
|
ReactSelect2,
|
3965
4078
|
{
|
3966
4079
|
classNamePrefix: "react-select",
|
@@ -3979,7 +4092,7 @@ var SelectWithCheckboxBase = ({
|
|
3979
4092
|
var SelectCheckbox = (props) => {
|
3980
4093
|
const { isMulti, options, value, ...rest } = props;
|
3981
4094
|
const selectValue = value || [];
|
3982
|
-
return /* @__PURE__ */
|
4095
|
+
return /* @__PURE__ */ jsx60(
|
3983
4096
|
SelectWithCheckboxBase,
|
3984
4097
|
{
|
3985
4098
|
isMulti,
|
@@ -3990,7 +4103,7 @@ var SelectCheckbox = (props) => {
|
|
3990
4103
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
3991
4104
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
3992
4105
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
3993
|
-
return /* @__PURE__ */
|
4106
|
+
return /* @__PURE__ */ jsx60(InputOption, { ...optionProps, checkedState });
|
3994
4107
|
}
|
3995
4108
|
},
|
3996
4109
|
...rest
|
@@ -4000,7 +4113,7 @@ var SelectCheckbox = (props) => {
|
|
4000
4113
|
var select_with_checkbox_default = SelectCheckbox;
|
4001
4114
|
|
4002
4115
|
// src/components/sidebar/components/sidebar.tsx
|
4003
|
-
import { Flex as
|
4116
|
+
import { Flex as Flex12 } from "@chakra-ui/react";
|
4004
4117
|
|
4005
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
|
4006
4119
|
import { __assign as __assign25 } from "tslib";
|
@@ -4219,7 +4332,7 @@ function useVisualElement(Component, visualState, props, createVisualElement) {
|
|
4219
4332
|
}
|
4220
4333
|
|
4221
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
|
4222
|
-
import { useCallback } from "react";
|
4335
|
+
import { useCallback as useCallback2 } from "react";
|
4223
4336
|
|
4224
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
|
4225
4338
|
function isRefObject(ref) {
|
@@ -4228,7 +4341,7 @@ function isRefObject(ref) {
|
|
4228
4341
|
|
4229
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
|
4230
4343
|
function useMotionRef(visualState, visualElement2, externalRef) {
|
4231
|
-
return
|
4344
|
+
return useCallback2(
|
4232
4345
|
function(instance) {
|
4233
4346
|
var _a;
|
4234
4347
|
instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));
|
@@ -4253,7 +4366,7 @@ function useMotionRef(visualState, visualElement2, externalRef) {
|
|
4253
4366
|
}
|
4254
4367
|
|
4255
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
|
4256
|
-
import { useMemo as
|
4369
|
+
import { useMemo as useMemo3, useContext as useContext5 } from "react";
|
4257
4370
|
|
4258
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
|
4259
4372
|
function isVariantLabels(v) {
|
@@ -4322,7 +4435,7 @@ function getCurrentTreeVariants(props, context) {
|
|
4322
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
|
4323
4436
|
function useCreateMotionContext(props) {
|
4324
4437
|
var _a = getCurrentTreeVariants(props, useContext5(MotionContext)), initial = _a.initial, animate3 = _a.animate;
|
4325
|
-
return
|
4438
|
+
return useMemo3(function() {
|
4326
4439
|
return { initial, animate: animate3 };
|
4327
4440
|
}, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate3)]);
|
4328
4441
|
}
|
@@ -4558,7 +4671,7 @@ import { createElement as createElement3 } from "react";
|
|
4558
4671
|
|
4559
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
|
4560
4673
|
import { __assign as __assign4 } from "tslib";
|
4561
|
-
import { useMemo as
|
4674
|
+
import { useMemo as useMemo4 } from "react";
|
4562
4675
|
|
4563
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
|
4564
4677
|
var scaleCorrectors = {};
|
@@ -4966,7 +5079,7 @@ function copyRawValuesOnly(target, source, props) {
|
|
4966
5079
|
}
|
4967
5080
|
function useInitialMotionValues(_a, visualState, isStatic) {
|
4968
5081
|
var transformTemplate = _a.transformTemplate;
|
4969
|
-
return
|
5082
|
+
return useMemo4(function() {
|
4970
5083
|
var state = createHtmlRenderState();
|
4971
5084
|
buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);
|
4972
5085
|
var vars = state.vars, style = state.style;
|
@@ -5086,7 +5199,7 @@ function filterProps(props, isDom, forwardMotionProps) {
|
|
5086
5199
|
|
5087
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
|
5088
5201
|
import { __assign as __assign6 } from "tslib";
|
5089
|
-
import { useMemo as
|
5202
|
+
import { useMemo as useMemo5 } from "react";
|
5090
5203
|
|
5091
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
|
5092
5205
|
import { __rest } from "tslib";
|
@@ -5160,7 +5273,7 @@ var createSvgRenderState = function() {
|
|
5160
5273
|
|
5161
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
|
5162
5275
|
function useSVGProps(props, visualState) {
|
5163
|
-
var visualProps =
|
5276
|
+
var visualProps = useMemo5(function() {
|
5164
5277
|
var state = createSvgRenderState();
|
5165
5278
|
buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);
|
5166
5279
|
return __assign6(__assign6({}, state.attrs), { style: __assign6({}, state.style) });
|
@@ -10693,7 +10806,7 @@ import { useContext as useContext13, useRef as useRef8, cloneElement, Children,
|
|
10693
10806
|
|
10694
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
|
10695
10808
|
import { __read as __read19 } from "tslib";
|
10696
|
-
import { useState as useState5, useCallback as
|
10809
|
+
import { useState as useState5, useCallback as useCallback3 } from "react";
|
10697
10810
|
|
10698
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
|
10699
10812
|
import { useRef as useRef7 } from "react";
|
@@ -10712,10 +10825,10 @@ function useIsMounted() {
|
|
10712
10825
|
function useForceUpdate() {
|
10713
10826
|
var isMounted = useIsMounted();
|
10714
10827
|
var _a = __read19(useState5(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];
|
10715
|
-
var forceRender =
|
10828
|
+
var forceRender = useCallback3(function() {
|
10716
10829
|
isMounted.current && setForcedRenderCount(forcedRenderCount + 1);
|
10717
10830
|
}, [forcedRenderCount]);
|
10718
|
-
var deferredForceRender =
|
10831
|
+
var deferredForceRender = useCallback3(function() {
|
10719
10832
|
return es_default.postRender(forceRender);
|
10720
10833
|
}, [forceRender]);
|
10721
10834
|
return [deferredForceRender, forcedRenderCount];
|
@@ -10724,12 +10837,12 @@ function useForceUpdate() {
|
|
10724
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
|
10725
10838
|
import { __values } from "tslib";
|
10726
10839
|
import * as React16 from "react";
|
10727
|
-
import { useMemo as
|
10840
|
+
import { useMemo as useMemo6 } from "react";
|
10728
10841
|
var PresenceChild = function(_a) {
|
10729
10842
|
var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;
|
10730
10843
|
var presenceChildren = useConstant(newChildrenMap);
|
10731
10844
|
var id2 = useId();
|
10732
|
-
var context =
|
10845
|
+
var context = useMemo6(
|
10733
10846
|
function() {
|
10734
10847
|
return {
|
10735
10848
|
id: id2,
|
@@ -10771,7 +10884,7 @@ var PresenceChild = function(_a) {
|
|
10771
10884
|
*/
|
10772
10885
|
presenceAffectsLayout ? void 0 : [isPresent]
|
10773
10886
|
);
|
10774
|
-
|
10887
|
+
useMemo6(function() {
|
10775
10888
|
presenceChildren.forEach(function(_, key) {
|
10776
10889
|
return presenceChildren.set(key, false);
|
10777
10890
|
});
|
@@ -10881,10 +10994,10 @@ var AnimatePresence = function(_a) {
|
|
10881
10994
|
};
|
10882
10995
|
|
10883
10996
|
// src/components/sidebar/components/sidebar.tsx
|
10884
|
-
import { jsx as
|
10997
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
10885
10998
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
10886
|
-
return /* @__PURE__ */
|
10887
|
-
|
10999
|
+
return /* @__PURE__ */ jsx61(
|
11000
|
+
Flex12,
|
10888
11001
|
{
|
10889
11002
|
position: "relative",
|
10890
11003
|
as: motion.div,
|
@@ -10904,12 +11017,12 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
10904
11017
|
Sidebar.displayName = "Sidebar";
|
10905
11018
|
|
10906
11019
|
// src/components/sidebar/components/sidebar-header.tsx
|
10907
|
-
import { Box as
|
11020
|
+
import { Box as Box27, Flex as Flex13, Text as Text16 } from "@chakra-ui/react";
|
10908
11021
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
10909
|
-
import { jsx as
|
10910
|
-
var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
10911
|
-
return /* @__PURE__ */
|
10912
|
-
|
11022
|
+
import { jsx as jsx62, jsxs as jsxs24 } from "react/jsx-runtime";
|
11023
|
+
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
11024
|
+
return /* @__PURE__ */ jsx62(
|
11025
|
+
Box27,
|
10913
11026
|
{
|
10914
11027
|
px: "2",
|
10915
11028
|
color: "neutral.900",
|
@@ -10918,8 +11031,8 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
10918
11031
|
_hover: {
|
10919
11032
|
color: "primary.500"
|
10920
11033
|
},
|
10921
|
-
children: /* @__PURE__ */
|
10922
|
-
|
11034
|
+
children: /* @__PURE__ */ jsxs24(
|
11035
|
+
Flex13,
|
10923
11036
|
{
|
10924
11037
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
10925
11038
|
direction: "row",
|
@@ -10928,20 +11041,19 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
10928
11041
|
onClick: () => setCollapse(!isCollapse),
|
10929
11042
|
cursor: "pointer",
|
10930
11043
|
children: [
|
10931
|
-
/* @__PURE__ */
|
10932
|
-
|
11044
|
+
/* @__PURE__ */ jsx62(
|
11045
|
+
Box27,
|
10933
11046
|
{
|
10934
11047
|
as: motion.div,
|
10935
11048
|
boxSize: "4",
|
10936
11049
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
10937
11050
|
transition: "ease-in-out",
|
10938
11051
|
transitionDuration: "1ms",
|
10939
|
-
"data-test-id": "SWqE2JTMkS4Pj_2tdwy8O",
|
10940
11052
|
"aria-label": "toggle sidebar",
|
10941
|
-
children: /* @__PURE__ */
|
11053
|
+
children: /* @__PURE__ */ jsx62(ArrowRight, { size: 4, color: "inherit" })
|
10942
11054
|
}
|
10943
11055
|
),
|
10944
|
-
/* @__PURE__ */
|
11056
|
+
/* @__PURE__ */ jsx62(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx62(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx62(
|
10945
11057
|
Text16,
|
10946
11058
|
{
|
10947
11059
|
as: motion.div,
|
@@ -10952,7 +11064,7 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
10952
11064
|
animate: { opacity: 1, x: 0 },
|
10953
11065
|
exit: { opacity: 0, x: 16 },
|
10954
11066
|
transition: "10ms linear",
|
10955
|
-
children:
|
11067
|
+
children: title
|
10956
11068
|
}
|
10957
11069
|
) }) })
|
10958
11070
|
]
|
@@ -10961,15 +11073,18 @@ var SidebarHeader = ({ isCollapse, setCollapse }) => {
|
|
10961
11073
|
}
|
10962
11074
|
);
|
10963
11075
|
};
|
11076
|
+
SidebarHeader.displayName = "SidebarHeader";
|
11077
|
+
SidebarHeader.defaultProps = {
|
11078
|
+
title: "Sembunyikan menu"
|
11079
|
+
};
|
10964
11080
|
|
10965
11081
|
// src/components/sidebar/components/sidebar-menu.tsx
|
10966
11082
|
import {
|
10967
11083
|
Accordion as Accordion2,
|
10968
11084
|
AccordionButton as AccordionButton2,
|
10969
|
-
AccordionIcon as AccordionIcon2,
|
10970
11085
|
AccordionItem as AccordionItem2,
|
10971
11086
|
AccordionPanel as AccordionPanel2,
|
10972
|
-
Box as
|
11087
|
+
Box as Box28,
|
10973
11088
|
Popover as Popover5,
|
10974
11089
|
PopoverBody as PopoverBody3,
|
10975
11090
|
PopoverContent as PopoverContent5,
|
@@ -10978,118 +11093,122 @@ import {
|
|
10978
11093
|
Portal as Portal3,
|
10979
11094
|
Text as Text17
|
10980
11095
|
} from "@chakra-ui/react";
|
10981
|
-
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";
|
10982
11098
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
10983
|
-
return /* @__PURE__ */
|
10984
|
-
|
10985
|
-
|
10986
|
-
const activeOption = isOpen ? "primary.50" : "white";
|
10987
|
-
const backgroundColor = isOpen ? "primary.50" : "primary.100";
|
10988
|
-
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 }) => {
|
10989
11102
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
10990
|
-
|
10991
|
-
|
10992
|
-
|
10993
|
-
|
10994
|
-
|
10995
|
-
|
10996
|
-
|
10997
|
-
|
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(
|
10998
11187
|
NavItem,
|
10999
11188
|
{
|
11000
|
-
|
11001
|
-
justifyContent:
|
11002
|
-
isActive,
|
11003
|
-
|
11004
|
-
|
11005
|
-
|
11006
|
-
|
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",
|
11007
11197
|
...itemStyles,
|
11008
11198
|
children: [
|
11009
|
-
mappingIcon2 && /* @__PURE__ */
|
11010
|
-
|
11011
|
-
Box29,
|
11012
|
-
{
|
11013
|
-
display: "flex",
|
11014
|
-
w: "full",
|
11015
|
-
alignItems: "center",
|
11016
|
-
justifyContent: "space-between",
|
11017
|
-
ml: "2",
|
11018
|
-
as: motion.div,
|
11019
|
-
transition: "20ms ease-in",
|
11020
|
-
initial: { opacity: 0, x: 24 },
|
11021
|
-
animate: { opacity: 1, x: 0 },
|
11022
|
-
exit: { opacity: 0, x: 16 },
|
11023
|
-
children: [
|
11024
|
-
/* @__PURE__ */ jsx61(Box29, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx61(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
11025
|
-
!!item.children.length && /* @__PURE__ */ jsx61(Box29, { children: /* @__PURE__ */ jsx61(AccordionIcon2, { boxSize: "3.5" }) })
|
11026
|
-
]
|
11027
|
-
}
|
11028
|
-
)
|
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 }) })
|
11029
11201
|
]
|
11030
11202
|
},
|
11031
11203
|
item.id
|
11032
|
-
)
|
11033
|
-
}
|
11034
|
-
|
11035
|
-
|
11036
|
-
isOpenOptions && /* @__PURE__ */ jsx61(Portal3, { children: item.children.length > 0 ? /* @__PURE__ */ jsxs26(PopoverContent5, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
11037
|
-
/* @__PURE__ */ jsx61(PopoverHeader2, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ jsxs26(Box29, { display: "flex", alignItems: "center", children: [
|
11038
|
-
mappingIcon2.get(item.icon || ""),
|
11039
|
-
/* @__PURE__ */ jsx61(Box29, { as: "span", ml: "2", children: item.title })
|
11040
|
-
] }) }),
|
11041
|
-
!!item.children.length && /* @__PURE__ */ jsx61(PopoverBody3, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx61(
|
11042
|
-
NavItem,
|
11043
|
-
{
|
11044
|
-
"data-test-id": "2vqeuJQ2ml0uLZJ0xNNn-",
|
11045
|
-
isChild: true,
|
11046
|
-
isActive: active === submenu.navLink,
|
11047
|
-
onClick: () => {
|
11048
|
-
setActive(submenu.navLink);
|
11049
|
-
onClose();
|
11050
|
-
},
|
11051
|
-
rounded: "none",
|
11052
|
-
...itemStyles,
|
11053
|
-
children: submenu.title
|
11054
|
-
},
|
11055
|
-
submenu.id
|
11056
|
-
)) })
|
11057
|
-
] }) : isCollapse && /* @__PURE__ */ jsx61(PopoverContent5, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx61(PopoverBody3, { py: "1", px: "0", children: /* @__PURE__ */ jsxs26(
|
11058
|
-
NavItem,
|
11059
|
-
{
|
11060
|
-
"data-test-id": "2vqeuJQ2ml0uLZJ0xNNn-",
|
11061
|
-
justifyContent: "flex-start",
|
11062
|
-
isActive: active === item.navLink,
|
11063
|
-
onClick: () => {
|
11064
|
-
setActive(item.navLink);
|
11065
|
-
onClose();
|
11066
|
-
},
|
11067
|
-
rounded: "none",
|
11068
|
-
...itemStyles,
|
11069
|
-
children: [
|
11070
|
-
mappingIcon2 && /* @__PURE__ */ jsx61(Box29, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
11071
|
-
/* @__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 }) })
|
11072
|
-
]
|
11073
|
-
},
|
11074
|
-
item.id
|
11075
|
-
) }) }) })
|
11076
|
-
] });
|
11077
|
-
} }, item.id),
|
11078
|
-
!isCollapse && /* @__PURE__ */ jsx61(
|
11079
|
-
AccordionPanel2,
|
11080
|
-
{
|
11081
|
-
mt: "1",
|
11082
|
-
p: "0",
|
11083
|
-
as: motion.div,
|
11084
|
-
transition: "50ms linear 100s",
|
11085
|
-
initial: { opacity: 0, y: 60 },
|
11086
|
-
animate: { opacity: 1, y: 0 },
|
11087
|
-
exit: { opacity: 0, y: 16 },
|
11088
|
-
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(
|
11089
11208
|
NavItem,
|
11090
11209
|
{
|
11091
11210
|
mt: "1",
|
11092
|
-
"data-test-id":
|
11211
|
+
"data-test-id": `CTA_Sidebar-accordion-item-${submenu.id}`,
|
11093
11212
|
isActive: active === submenu.navLink,
|
11094
11213
|
isChild: true,
|
11095
11214
|
...itemStyles,
|
@@ -11097,10 +11216,10 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
11097
11216
|
children: submenu.title
|
11098
11217
|
},
|
11099
11218
|
submenu.id
|
11100
|
-
))
|
11101
|
-
}
|
11102
|
-
)
|
11103
|
-
|
11219
|
+
)) })
|
11220
|
+
] });
|
11221
|
+
} }, item.id);
|
11222
|
+
}) }) });
|
11104
11223
|
};
|
11105
11224
|
SidebarMenu.displayName = "SidebarMenu";
|
11106
11225
|
SidebarMenu.defaultProps = {
|
@@ -11109,16 +11228,16 @@ SidebarMenu.defaultProps = {
|
|
11109
11228
|
};
|
11110
11229
|
|
11111
11230
|
// src/components/switch/components/switch.tsx
|
11112
|
-
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";
|
11113
11232
|
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
11114
|
-
import { Check, Close as Close4 } from "@ctlyst.id/internal-icon";
|
11115
|
-
import { useMemo as
|
11116
|
-
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";
|
11117
11236
|
var Switch = forwardRef14(function Switch2(props, ref) {
|
11118
11237
|
const styles = useMultiStyleConfig2("Switch", props);
|
11119
11238
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
11120
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } =
|
11121
|
-
const containerStyles =
|
11239
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = useCheckbox3(ownProps);
|
11240
|
+
const containerStyles = useMemo7(
|
11122
11241
|
() => ({
|
11123
11242
|
display: "inline-block",
|
11124
11243
|
position: "relative",
|
@@ -11128,7 +11247,7 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11128
11247
|
}),
|
11129
11248
|
[styles.container]
|
11130
11249
|
);
|
11131
|
-
const trackStyles =
|
11250
|
+
const trackStyles = useMemo7(
|
11132
11251
|
() => ({
|
11133
11252
|
display: "inline-flex",
|
11134
11253
|
flexShrink: 0,
|
@@ -11140,7 +11259,7 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11140
11259
|
}),
|
11141
11260
|
[styles.track]
|
11142
11261
|
);
|
11143
|
-
const labelStyles =
|
11262
|
+
const labelStyles = useMemo7(
|
11144
11263
|
() => ({
|
11145
11264
|
userSelect: "none",
|
11146
11265
|
marginStart: spacing2,
|
@@ -11156,7 +11275,7 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11156
11275
|
};
|
11157
11276
|
return iconSize[value];
|
11158
11277
|
};
|
11159
|
-
return /* @__PURE__ */
|
11278
|
+
return /* @__PURE__ */ jsxs26(
|
11160
11279
|
chakra6.label,
|
11161
11280
|
{
|
11162
11281
|
...getRootProps(),
|
@@ -11165,13 +11284,13 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11165
11284
|
className: cx10("chakra-switch", props.className),
|
11166
11285
|
__css: containerStyles,
|
11167
11286
|
children: [
|
11168
|
-
/* @__PURE__ */
|
11169
|
-
/* @__PURE__ */
|
11170
|
-
/* @__PURE__ */
|
11171
|
-
/* @__PURE__ */
|
11172
|
-
/* @__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) })
|
11173
11292
|
] }),
|
11174
|
-
/* @__PURE__ */
|
11293
|
+
/* @__PURE__ */ jsx64(
|
11175
11294
|
chakra6.span,
|
11176
11295
|
{
|
11177
11296
|
__css: styles.thumb,
|
@@ -11181,11 +11300,12 @@ var Switch = forwardRef14(function Switch2(props, ref) {
|
|
11181
11300
|
}
|
11182
11301
|
)
|
11183
11302
|
] }),
|
11184
|
-
children && /* @__PURE__ */
|
11303
|
+
children && /* @__PURE__ */ jsx64(
|
11185
11304
|
chakra6.span,
|
11186
11305
|
{
|
11187
11306
|
className: "chakra-switch__label",
|
11188
11307
|
color: state.isDisabled ? "black.low" : "black.high",
|
11308
|
+
cursor: "pointer",
|
11189
11309
|
...getLabelProps(),
|
11190
11310
|
__css: labelStyles,
|
11191
11311
|
children
|
@@ -11217,14 +11337,14 @@ import {
|
|
11217
11337
|
} from "@chakra-ui/react";
|
11218
11338
|
|
11219
11339
|
// src/components/tabs/components/tab.tsx
|
11220
|
-
import { Button as Button6, Flex as
|
11221
|
-
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";
|
11222
11342
|
var Tab = forwardRef15((props, ref) => {
|
11223
11343
|
var _a, _b;
|
11224
11344
|
const tabProps = useTab({ ...props, ref });
|
11225
11345
|
const isSelected = !!tabProps["aria-selected"];
|
11226
11346
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
11227
|
-
return /* @__PURE__ */
|
11347
|
+
return /* @__PURE__ */ jsx65(
|
11228
11348
|
Button6,
|
11229
11349
|
{
|
11230
11350
|
"data-test-id": props["data-test-id"],
|
@@ -11250,7 +11370,7 @@ var Tab = forwardRef15((props, ref) => {
|
|
11250
11370
|
},
|
11251
11371
|
__css: styles.tab,
|
11252
11372
|
...tabProps,
|
11253
|
-
children: /* @__PURE__ */
|
11373
|
+
children: /* @__PURE__ */ jsxs27(Flex15, { alignItems: "center", children: [
|
11254
11374
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
11255
11375
|
tabProps.children,
|
11256
11376
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -11298,12 +11418,188 @@ import {
|
|
11298
11418
|
// src/components/text/index.ts
|
11299
11419
|
import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text18, TextProps } from "@chakra-ui/react";
|
11300
11420
|
|
11301
|
-
// src/components/
|
11302
|
-
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
|
+
};
|
11303
11586
|
|
11304
11587
|
// src/components/uploader/components/uploader.tsx
|
11305
|
-
import {
|
11306
|
-
|
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";
|
11307
11603
|
import { useDropzone } from "react-dropzone";
|
11308
11604
|
|
11309
11605
|
// src/components/uploader/constants.ts
|
@@ -11314,87 +11610,261 @@ var messages = {
|
|
11314
11610
|
replaceFile: "Ganti File",
|
11315
11611
|
uploadFile: "Upload File"
|
11316
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}`))}.`;
|
11317
11630
|
|
11318
11631
|
// src/components/uploader/components/uploader.tsx
|
11319
|
-
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";
|
11320
11634
|
var Uploader = ({
|
11321
11635
|
onHandleUploadFile,
|
11322
11636
|
onHandleRejections,
|
11323
|
-
|
11324
|
-
|
11325
|
-
|
11326
|
-
|
11327
|
-
|
11328
|
-
|
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",
|
11329
11660
|
...props
|
11330
11661
|
}) => {
|
11331
|
-
const
|
11332
|
-
const [
|
11333
|
-
const
|
11334
|
-
|
11335
|
-
|
11336
|
-
|
11337
|
-
|
11338
|
-
|
11339
|
-
|
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);
|
11340
11694
|
}
|
11341
|
-
|
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;
|
11342
11709
|
},
|
11343
|
-
[
|
11710
|
+
[acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
|
11344
11711
|
);
|
11345
|
-
const { getRootProps, getInputProps, isDragActive: isDragActive2,
|
11712
|
+
const { getRootProps, getInputProps, isDragActive: isDragActive2, acceptedFiles } = useDropzone({
|
11346
11713
|
onDrop,
|
11347
|
-
|
11348
|
-
|
11349
|
-
|
11350
|
-
|
11714
|
+
maxFiles: 1,
|
11715
|
+
noClick: isDisabled,
|
11716
|
+
disabled: !!filePreview,
|
11717
|
+
noDrag: isDisabled
|
11351
11718
|
});
|
11352
|
-
|
11353
|
-
if (
|
11354
|
-
|
11355
|
-
}
|
11356
|
-
|
11357
|
-
|
11358
|
-
|
11359
|
-
|
11360
|
-
|
11361
|
-
|
11362
|
-
|
11363
|
-
|
11364
|
-
|
11365
|
-
|
11366
|
-
|
11367
|
-
|
11368
|
-
|
11369
|
-
|
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,
|
11370
11758
|
{
|
11371
|
-
minH:
|
11759
|
+
minH: containerHeight,
|
11760
|
+
maxW: !isSmall ? "full" : "120px",
|
11761
|
+
mb: 2,
|
11762
|
+
bg: "white",
|
11372
11763
|
border: "1px dashed",
|
11373
|
-
|
11764
|
+
rounded: "sm",
|
11765
|
+
borderColor: isError ? "danger.500" : color2,
|
11374
11766
|
alignItems: "center",
|
11375
11767
|
justifyContent: "center",
|
11376
|
-
cursor: "
|
11768
|
+
cursor: isDisabled ? "not-allowed" : cursorType,
|
11769
|
+
pos: "relative",
|
11770
|
+
_hover: { bg: !filePreview && !isDisabled ? "primary.50" : "" },
|
11377
11771
|
...props,
|
11378
11772
|
...getRootProps(),
|
11379
11773
|
children: [
|
11380
|
-
/* @__PURE__ */
|
11381
|
-
|
11382
|
-
|
11383
|
-
|
11384
|
-
|
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
|
+
] })
|
11385
11834
|
] })
|
11386
11835
|
]
|
11387
11836
|
}
|
11388
11837
|
),
|
11389
|
-
|
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()
|
11390
11866
|
] });
|
11391
11867
|
};
|
11392
|
-
Uploader.defaultProps = {
|
11393
|
-
onHandleUploadFile: void 0,
|
11394
|
-
onHandleRejections: void 0,
|
11395
|
-
renderError: void 0,
|
11396
|
-
selected: false
|
11397
|
-
};
|
11398
11868
|
var uploader_default = Uploader;
|
11399
11869
|
|
11400
11870
|
// src/components/index.ts
|
@@ -11456,7 +11926,6 @@ __export(components_exports, {
|
|
11456
11926
|
Button: () => button_default2,
|
11457
11927
|
Card: () => card_default2,
|
11458
11928
|
Checkbox: () => checkbox_default2,
|
11459
|
-
Chips: () => chips_default2,
|
11460
11929
|
FormLabel: () => form_label_default,
|
11461
11930
|
Input: () => input_default,
|
11462
11931
|
LoaderStyle: () => loader_default2,
|
@@ -11466,6 +11935,7 @@ __export(components_exports, {
|
|
11466
11935
|
Switch: () => switch_default2,
|
11467
11936
|
Table: () => table_default,
|
11468
11937
|
Tabs: () => tabs_default,
|
11938
|
+
Tag: () => chips_default2,
|
11469
11939
|
Textarea: () => textarea_default2,
|
11470
11940
|
Tooltip: () => tooltip_default
|
11471
11941
|
});
|
@@ -11484,6 +11954,9 @@ var baseStyleButton = defineStyle({
|
|
11484
11954
|
gap: 4,
|
11485
11955
|
fontSize: "text.md",
|
11486
11956
|
bg: "neutral.50",
|
11957
|
+
_expanded: {
|
11958
|
+
bg: "neutral.100"
|
11959
|
+
},
|
11487
11960
|
_focusVisible: {
|
11488
11961
|
bg: "neutral.100"
|
11489
11962
|
},
|
@@ -11512,7 +11985,9 @@ var baseStylePanel = defineStyle({
|
|
11512
11985
|
pb: "5"
|
11513
11986
|
});
|
11514
11987
|
var baseStyleIcon = defineStyle({
|
11515
|
-
fontSize: "1.25em"
|
11988
|
+
fontSize: "1.25em",
|
11989
|
+
boxSize: 6,
|
11990
|
+
p: 1
|
11516
11991
|
});
|
11517
11992
|
var baseStyle = definePartsStyle({
|
11518
11993
|
container: baseStyleContainer,
|
@@ -11525,7 +12000,11 @@ var collapseStyleButton = defineStyle({
|
|
11525
12000
|
borderRadius: "sm",
|
11526
12001
|
borderWidth: "1px",
|
11527
12002
|
borderStyle: "solid",
|
11528
|
-
borderColor: "neutral.300"
|
12003
|
+
borderColor: "neutral.300",
|
12004
|
+
bg: "neutral.50",
|
12005
|
+
_expanded: {
|
12006
|
+
bg: "neutral.50"
|
12007
|
+
}
|
11529
12008
|
});
|
11530
12009
|
var collapseStylePanel = defineStyle({
|
11531
12010
|
py: 0,
|
@@ -11602,7 +12081,7 @@ var baseStyle2 = definePartsStyle2((props) => {
|
|
11602
12081
|
function getBg(props) {
|
11603
12082
|
const { colorScheme: c2 } = props;
|
11604
12083
|
return {
|
11605
|
-
light: c2 === "neutral" ? `colors.${c2}.
|
12084
|
+
light: c2 === "neutral" ? `colors.${c2}.200` : `colors.${c2}.50`
|
11606
12085
|
};
|
11607
12086
|
}
|
11608
12087
|
var variantLight = definePartsStyle2((props) => {
|
@@ -11610,7 +12089,7 @@ var variantLight = definePartsStyle2((props) => {
|
|
11610
12089
|
const bg = getBg(props);
|
11611
12090
|
return {
|
11612
12091
|
container: {
|
11613
|
-
[$fg.variable]: `colors.${c2}.700`,
|
12092
|
+
[$fg.variable]: c2 === "neutral" ? `colors.black.high` : `colors.${c2}.700`,
|
11614
12093
|
[$bg.variable]: bg.light,
|
11615
12094
|
color: $fg.reference
|
11616
12095
|
}
|
@@ -11642,6 +12121,7 @@ var alert_default = alertTheme;
|
|
11642
12121
|
// src/config/theme/components/badge.ts
|
11643
12122
|
var Badge2 = {
|
11644
12123
|
baseStyle: {
|
12124
|
+
h: "fit-content",
|
11645
12125
|
display: "inline-block",
|
11646
12126
|
fontSize: "text.xs",
|
11647
12127
|
fontWeight: "semibold",
|
@@ -11717,7 +12197,7 @@ var badge_default2 = Badge2;
|
|
11717
12197
|
|
11718
12198
|
// src/config/theme/components/button.ts
|
11719
12199
|
import { defineStyleConfig } from "@chakra-ui/styled-system";
|
11720
|
-
var
|
12200
|
+
var Button8 = defineStyleConfig({
|
11721
12201
|
// The styles all button have in common
|
11722
12202
|
baseStyle: {
|
11723
12203
|
fontSize: "body.1",
|
@@ -11972,7 +12452,7 @@ var Button7 = defineStyleConfig({
|
|
11972
12452
|
colorScheme: "primary"
|
11973
12453
|
}
|
11974
12454
|
});
|
11975
|
-
var button_default2 =
|
12455
|
+
var button_default2 = Button8;
|
11976
12456
|
|
11977
12457
|
// src/config/theme/components/card.ts
|
11978
12458
|
import { defineStyleConfig as defineStyleConfig2 } from "@chakra-ui/styled-system";
|
@@ -12089,85 +12569,102 @@ var Checkbox4 = defineMultiStyleConfig3({
|
|
12089
12569
|
var checkbox_default2 = Checkbox4;
|
12090
12570
|
|
12091
12571
|
// src/config/theme/components/chips.ts
|
12092
|
-
import {
|
12093
|
-
|
12094
|
-
|
12095
|
-
|
12096
|
-
|
12097
|
-
|
12098
|
-
|
12099
|
-
|
12100
|
-
|
12101
|
-
|
12102
|
-
|
12103
|
-
|
12104
|
-
|
12105
|
-
|
12106
|
-
|
12107
|
-
|
12108
|
-
|
12109
|
-
|
12110
|
-
|
12111
|
-
|
12112
|
-
|
12113
|
-
|
12114
|
-
|
12115
|
-
|
12116
|
-
|
12117
|
-
|
12118
|
-
|
12119
|
-
|
12120
|
-
|
12121
|
-
|
12122
|
-
|
12123
|
-
|
12124
|
-
|
12125
|
-
|
12126
|
-
|
12127
|
-
|
12128
|
-
|
12129
|
-
|
12130
|
-
|
12131
|
-
|
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"
|
12132
12619
|
}
|
12133
|
-
return {
|
12134
|
-
...chipsProps
|
12135
|
-
};
|
12136
12620
|
},
|
12621
|
+
closeButton: {
|
12622
|
+
color: "neutral.500",
|
12623
|
+
opacity: 1
|
12624
|
+
}
|
12625
|
+
});
|
12626
|
+
var Tag2 = defineMultiStyleConfig4({
|
12627
|
+
baseStyle: baseStyle4,
|
12137
12628
|
sizes: {
|
12138
12629
|
sm: {
|
12139
|
-
|
12630
|
+
container: {
|
12631
|
+
textStyle: "text.sm"
|
12632
|
+
}
|
12140
12633
|
},
|
12141
12634
|
md: {
|
12142
|
-
|
12143
|
-
|
12635
|
+
container: {
|
12636
|
+
textStyle: "text.md",
|
12637
|
+
py: 2
|
12638
|
+
}
|
12144
12639
|
}
|
12145
12640
|
},
|
12146
|
-
|
12147
|
-
|
12641
|
+
variants: {
|
12642
|
+
solid,
|
12643
|
+
outline,
|
12644
|
+
disabled
|
12148
12645
|
}
|
12149
12646
|
});
|
12150
|
-
var chips_default2 =
|
12647
|
+
var chips_default2 = Tag2;
|
12151
12648
|
|
12152
12649
|
// src/config/theme/components/form-label.ts
|
12153
|
-
import { defineStyle as defineStyle2, defineStyleConfig as
|
12154
|
-
var
|
12650
|
+
import { defineStyle as defineStyle2, defineStyleConfig as defineStyleConfig3 } from "@chakra-ui/styled-system";
|
12651
|
+
var baseStyle5 = defineStyle2({
|
12155
12652
|
fontSize: "field.sm",
|
12156
12653
|
fontWeight: "normal",
|
12157
12654
|
marginEnd: 1,
|
12158
12655
|
mb: 1
|
12159
12656
|
});
|
12160
|
-
var
|
12161
|
-
baseStyle:
|
12657
|
+
var FormLabel5 = defineStyleConfig3({
|
12658
|
+
baseStyle: baseStyle5
|
12162
12659
|
});
|
12163
|
-
var form_label_default =
|
12660
|
+
var form_label_default = FormLabel5;
|
12164
12661
|
|
12165
12662
|
// src/config/theme/components/input.ts
|
12166
12663
|
import { inputAnatomy as parts3 } from "@chakra-ui/anatomy";
|
12167
|
-
import { createMultiStyleConfigHelpers as
|
12664
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers5, defineStyle as defineStyle3 } from "@chakra-ui/styled-system";
|
12168
12665
|
import { mode } from "@chakra-ui/theme-tools";
|
12169
|
-
var { definePartsStyle:
|
12170
|
-
var
|
12666
|
+
var { definePartsStyle: definePartsStyle5, defineMultiStyleConfig: defineMultiStyleConfig5 } = createMultiStyleConfigHelpers5(parts3.keys);
|
12667
|
+
var baseStyle6 = definePartsStyle5({
|
12171
12668
|
field: {
|
12172
12669
|
width: "100%",
|
12173
12670
|
minWidth: 0,
|
@@ -12216,24 +12713,24 @@ var size = {
|
|
12216
12713
|
})
|
12217
12714
|
};
|
12218
12715
|
var sizes2 = {
|
12219
|
-
lg:
|
12716
|
+
lg: definePartsStyle5({
|
12220
12717
|
field: size.lg,
|
12221
12718
|
addon: size.lg
|
12222
12719
|
}),
|
12223
|
-
md:
|
12720
|
+
md: definePartsStyle5({
|
12224
12721
|
field: size.md,
|
12225
12722
|
addon: size.md
|
12226
12723
|
}),
|
12227
|
-
sm:
|
12724
|
+
sm: definePartsStyle5({
|
12228
12725
|
field: size.sm,
|
12229
12726
|
addon: size.sm
|
12230
12727
|
}),
|
12231
|
-
xs:
|
12728
|
+
xs: definePartsStyle5({
|
12232
12729
|
field: size.xs,
|
12233
12730
|
addon: size.xs
|
12234
12731
|
})
|
12235
12732
|
};
|
12236
|
-
var
|
12733
|
+
var outline2 = definePartsStyle5((props) => {
|
12237
12734
|
const field2 = {
|
12238
12735
|
border: 0,
|
12239
12736
|
outline: 0,
|
@@ -12254,7 +12751,7 @@ var outline = definePartsStyle4((props) => {
|
|
12254
12751
|
field: field2
|
12255
12752
|
};
|
12256
12753
|
});
|
12257
|
-
var unstyled2 =
|
12754
|
+
var unstyled2 = definePartsStyle5({
|
12258
12755
|
field: {
|
12259
12756
|
bg: "transparent",
|
12260
12757
|
px: "0",
|
@@ -12267,11 +12764,11 @@ var unstyled2 = definePartsStyle4({
|
|
12267
12764
|
}
|
12268
12765
|
});
|
12269
12766
|
var variants3 = {
|
12270
|
-
outline,
|
12767
|
+
outline: outline2,
|
12271
12768
|
unstyled: unstyled2
|
12272
12769
|
};
|
12273
|
-
var Input3 =
|
12274
|
-
baseStyle:
|
12770
|
+
var Input3 = defineMultiStyleConfig5({
|
12771
|
+
baseStyle: baseStyle6,
|
12275
12772
|
sizes: sizes2,
|
12276
12773
|
variants: variants3,
|
12277
12774
|
defaultProps: {
|
@@ -12282,7 +12779,7 @@ var Input3 = defineMultiStyleConfig4({
|
|
12282
12779
|
var input_default = Input3;
|
12283
12780
|
|
12284
12781
|
// src/config/theme/components/loader.ts
|
12285
|
-
import { defineStyleConfig as
|
12782
|
+
import { defineStyleConfig as defineStyleConfig4 } from "@chakra-ui/styled-system";
|
12286
12783
|
import { keyframes as keyframes3 } from "@emotion/react";
|
12287
12784
|
var rotate = keyframes3({
|
12288
12785
|
"0%": {
|
@@ -12314,7 +12811,7 @@ var getLoaderColor = (color2) => {
|
|
12314
12811
|
if (color2 === "warning") return "var(--chakra-colors-warning-700)";
|
12315
12812
|
return backgroundColor;
|
12316
12813
|
};
|
12317
|
-
var LoaderStyle =
|
12814
|
+
var LoaderStyle = defineStyleConfig4({
|
12318
12815
|
baseStyle: (props) => {
|
12319
12816
|
const colors = getLoaderColor(props.color);
|
12320
12817
|
return {
|
@@ -12399,8 +12896,8 @@ var LoaderStyle = defineStyleConfig5({
|
|
12399
12896
|
var loader_default2 = LoaderStyle;
|
12400
12897
|
|
12401
12898
|
// src/config/theme/components/modal.ts
|
12402
|
-
import { defineStyleConfig as
|
12403
|
-
var Modal3 =
|
12899
|
+
import { defineStyleConfig as defineStyleConfig5 } from "@chakra-ui/styled-system";
|
12900
|
+
var Modal3 = defineStyleConfig5({
|
12404
12901
|
sizes: {
|
12405
12902
|
sm: { dialog: { minW: 400 } },
|
12406
12903
|
md: { dialog: { minW: 600 } },
|
@@ -12414,28 +12911,28 @@ var modal_default = Modal3;
|
|
12414
12911
|
|
12415
12912
|
// src/config/theme/components/popover.ts
|
12416
12913
|
import { popoverAnatomy as parts4 } from "@chakra-ui/anatomy";
|
12417
|
-
import { createMultiStyleConfigHelpers as
|
12418
|
-
var { definePartsStyle:
|
12419
|
-
var
|
12914
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers6 } from "@chakra-ui/react";
|
12915
|
+
var { definePartsStyle: definePartsStyle6, defineMultiStyleConfig: defineMultiStyleConfig6 } = createMultiStyleConfigHelpers6(parts4.keys);
|
12916
|
+
var baseStyle7 = definePartsStyle6({
|
12420
12917
|
content: {
|
12421
12918
|
bg: "white"
|
12422
12919
|
}
|
12423
12920
|
});
|
12424
|
-
var popoverTheme =
|
12921
|
+
var popoverTheme = defineMultiStyleConfig6({ baseStyle: baseStyle7 });
|
12425
12922
|
var popover_default = popoverTheme;
|
12426
12923
|
|
12427
12924
|
// src/config/theme/components/radio.ts
|
12428
12925
|
import { radioAnatomy } from "@chakra-ui/anatomy";
|
12429
|
-
import { createMultiStyleConfigHelpers as
|
12430
|
-
var { definePartsStyle:
|
12431
|
-
var
|
12926
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers7 } from "@chakra-ui/react";
|
12927
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = createMultiStyleConfigHelpers7(radioAnatomy.keys);
|
12928
|
+
var baseStyle8 = definePartsStyle7({
|
12432
12929
|
control: {
|
12433
12930
|
border: "1px solid",
|
12434
|
-
width:
|
12435
|
-
height:
|
12931
|
+
width: 4,
|
12932
|
+
height: 4
|
12436
12933
|
},
|
12437
12934
|
label: {
|
12438
|
-
marginLeft:
|
12935
|
+
marginLeft: 2,
|
12439
12936
|
textStyle: "text.sm",
|
12440
12937
|
color: "black.high",
|
12441
12938
|
_disabled: {
|
@@ -12444,15 +12941,15 @@ var baseStyle7 = definePartsStyle6({
|
|
12444
12941
|
}
|
12445
12942
|
}
|
12446
12943
|
});
|
12447
|
-
var errors2 =
|
12944
|
+
var errors2 = definePartsStyle7({
|
12448
12945
|
control: {
|
12449
12946
|
borderColor: "danger.500",
|
12450
12947
|
_checked: {
|
12451
12948
|
borderColor: "danger.500",
|
12452
12949
|
bg: "white",
|
12453
12950
|
_before: {
|
12454
|
-
h:
|
12455
|
-
w:
|
12951
|
+
h: 2.5,
|
12952
|
+
w: 2.5,
|
12456
12953
|
bg: "danger.500"
|
12457
12954
|
},
|
12458
12955
|
_hover: {
|
@@ -12463,8 +12960,8 @@ var errors2 = definePartsStyle6({
|
|
12463
12960
|
borderColor: "danger.500",
|
12464
12961
|
bg: "white.high",
|
12465
12962
|
_before: {
|
12466
|
-
h:
|
12467
|
-
w:
|
12963
|
+
h: 2.5,
|
12964
|
+
w: 2.5,
|
12468
12965
|
bg: "primary.500",
|
12469
12966
|
opacity: 0.3
|
12470
12967
|
}
|
@@ -12476,31 +12973,31 @@ var errors2 = definePartsStyle6({
|
|
12476
12973
|
}
|
12477
12974
|
},
|
12478
12975
|
label: {
|
12479
|
-
|
12976
|
+
textStyle: "text.sm"
|
12480
12977
|
}
|
12481
12978
|
});
|
12482
|
-
var unstyled3 =
|
12979
|
+
var unstyled3 = definePartsStyle7({
|
12483
12980
|
control: {
|
12484
12981
|
borderColor: "neutral.600",
|
12485
12982
|
_checked: {
|
12486
12983
|
borderColor: "primary.500",
|
12487
12984
|
bg: "white",
|
12488
12985
|
_before: {
|
12489
|
-
h:
|
12490
|
-
w:
|
12986
|
+
h: 2.5,
|
12987
|
+
w: 2.5,
|
12491
12988
|
bg: "primary.500"
|
12492
12989
|
},
|
12493
12990
|
_hover: {
|
12494
12991
|
borderColor: "primary.500",
|
12495
|
-
bg: "
|
12992
|
+
bg: "transparent"
|
12496
12993
|
},
|
12497
12994
|
_disabled: {
|
12498
12995
|
borderColor: "primary.500",
|
12499
12996
|
bg: "white.high",
|
12500
12997
|
opacity: 0.3,
|
12501
12998
|
_before: {
|
12502
|
-
h:
|
12503
|
-
w:
|
12999
|
+
h: 2.5,
|
13000
|
+
w: 2.5,
|
12504
13001
|
bg: "primary.500"
|
12505
13002
|
}
|
12506
13003
|
}
|
@@ -12511,15 +13008,15 @@ var unstyled3 = definePartsStyle6({
|
|
12511
13008
|
}
|
12512
13009
|
},
|
12513
13010
|
label: {
|
12514
|
-
|
13011
|
+
textStyle: "text.sm"
|
12515
13012
|
}
|
12516
13013
|
});
|
12517
13014
|
var variants4 = {
|
12518
13015
|
errors: errors2,
|
12519
13016
|
unstyled: unstyled3
|
12520
13017
|
};
|
12521
|
-
var Radio2 =
|
12522
|
-
baseStyle:
|
13018
|
+
var Radio2 = defineMultiStyleConfig7({
|
13019
|
+
baseStyle: baseStyle8,
|
12523
13020
|
variants: variants4,
|
12524
13021
|
defaultProps: {
|
12525
13022
|
variant: "unstyled"
|
@@ -12529,9 +13026,9 @@ var radio_default = Radio2;
|
|
12529
13026
|
|
12530
13027
|
// src/config/theme/components/switch.ts
|
12531
13028
|
import { switchAnatomy as parts5 } from "@chakra-ui/anatomy";
|
12532
|
-
import { createMultiStyleConfigHelpers as
|
13029
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers8, defineStyle as defineStyle4 } from "@chakra-ui/styled-system";
|
12533
13030
|
import { calc, cssVar as cssVar2 } from "@chakra-ui/theme-tools";
|
12534
|
-
var { defineMultiStyleConfig:
|
13031
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig8, definePartsStyle: definePartsStyle8 } = createMultiStyleConfigHelpers8(parts5.keys);
|
12535
13032
|
var $width = cssVar2("switch-track-width");
|
12536
13033
|
var $height = cssVar2("switch-track-height");
|
12537
13034
|
var $diff = cssVar2("switch-track-diff");
|
@@ -12548,7 +13045,7 @@ var baseStyleThumb = defineStyle4({
|
|
12548
13045
|
transform: `translateX(${$translateX.reference})`
|
12549
13046
|
}
|
12550
13047
|
});
|
12551
|
-
var
|
13048
|
+
var baseStyle9 = definePartsStyle8(() => ({
|
12552
13049
|
container: {
|
12553
13050
|
[$diff.variable]: diffValue,
|
12554
13051
|
[$translateX.variable]: $diff.reference,
|
@@ -12573,17 +13070,17 @@ var baseStyle8 = definePartsStyle7(() => ({
|
|
12573
13070
|
thumb: baseStyleThumb
|
12574
13071
|
}));
|
12575
13072
|
var sizes3 = {
|
12576
|
-
sm:
|
13073
|
+
sm: definePartsStyle8({
|
12577
13074
|
container: {
|
12578
13075
|
[$width.variable]: "1.875rem",
|
12579
|
-
[$height.variable]: "0.
|
13076
|
+
[$height.variable]: "0.8rem"
|
12580
13077
|
},
|
12581
13078
|
thumb: {
|
12582
|
-
[$width.variable]: "0.
|
12583
|
-
[$height.variable]: "0.
|
13079
|
+
[$width.variable]: "0.8rem",
|
13080
|
+
[$height.variable]: "0.8rem"
|
12584
13081
|
}
|
12585
13082
|
}),
|
12586
|
-
md:
|
13083
|
+
md: definePartsStyle8({
|
12587
13084
|
container: {
|
12588
13085
|
[$width.variable]: "2.375rem",
|
12589
13086
|
[$height.variable]: "1rem"
|
@@ -12593,7 +13090,7 @@ var sizes3 = {
|
|
12593
13090
|
[$height.variable]: "1rem"
|
12594
13091
|
}
|
12595
13092
|
}),
|
12596
|
-
lg:
|
13093
|
+
lg: definePartsStyle8({
|
12597
13094
|
container: {
|
12598
13095
|
[$width.variable]: "3.25rem",
|
12599
13096
|
[$height.variable]: "1.375rem"
|
@@ -12604,8 +13101,8 @@ var sizes3 = {
|
|
12604
13101
|
}
|
12605
13102
|
})
|
12606
13103
|
};
|
12607
|
-
var Switch3 =
|
12608
|
-
baseStyle:
|
13104
|
+
var Switch3 = defineMultiStyleConfig8({
|
13105
|
+
baseStyle: baseStyle9,
|
12609
13106
|
sizes: sizes3,
|
12610
13107
|
defaultProps: {
|
12611
13108
|
size: "md"
|
@@ -12615,16 +13112,33 @@ var switch_default2 = Switch3;
|
|
12615
13112
|
|
12616
13113
|
// src/config/theme/components/table.ts
|
12617
13114
|
import { tableAnatomy as parts6 } from "@chakra-ui/anatomy";
|
12618
|
-
import { createMultiStyleConfigHelpers as
|
13115
|
+
import { createMultiStyleConfigHelpers as createMultiStyleConfigHelpers9, defineStyle as defineStyle5 } from "@chakra-ui/styled-system";
|
12619
13116
|
import { mode as mode2 } from "@chakra-ui/theme-tools";
|
12620
|
-
var { defineMultiStyleConfig:
|
12621
|
-
var
|
13117
|
+
var { defineMultiStyleConfig: defineMultiStyleConfig9, definePartsStyle: definePartsStyle9 } = createMultiStyleConfigHelpers9(parts6.keys);
|
13118
|
+
var baseStyle10 = definePartsStyle9({
|
12622
13119
|
table: {
|
12623
13120
|
fontVariantNumeric: "lining-nums tabular-nums",
|
12624
13121
|
borderCollapse: "separate",
|
12625
13122
|
borderSpacing: 0,
|
12626
13123
|
width: "full",
|
12627
|
-
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
|
+
}
|
12628
13142
|
},
|
12629
13143
|
th: {
|
12630
13144
|
fontFamily: "heading",
|
@@ -12633,7 +13147,7 @@ var baseStyle9 = definePartsStyle8({
|
|
12633
13147
|
letterSpacing: "normal",
|
12634
13148
|
textAlign: "start",
|
12635
13149
|
height: "50px",
|
12636
|
-
color:
|
13150
|
+
color: "black.high",
|
12637
13151
|
fontSize: "text.sm",
|
12638
13152
|
lineHeight: "18px",
|
12639
13153
|
backgroundColor: "neutral.50",
|
@@ -12644,27 +13158,6 @@ var baseStyle9 = definePartsStyle8({
|
|
12644
13158
|
pr: 6
|
12645
13159
|
}
|
12646
13160
|
},
|
12647
|
-
tbody: {
|
12648
|
-
tr: {
|
12649
|
-
cursor: "pointer",
|
12650
|
-
_hover: {
|
12651
|
-
td: {
|
12652
|
-
backgroundColor: "neutral.200",
|
12653
|
-
"&>div": {
|
12654
|
-
backgroundColor: "neutral.200"
|
12655
|
-
}
|
12656
|
-
}
|
12657
|
-
},
|
12658
|
-
'&[data-active="true"]': {
|
12659
|
-
td: {
|
12660
|
-
backgroundColor: "neutral.100",
|
12661
|
-
"&>div": {
|
12662
|
-
backgroundColor: "neutral.200"
|
12663
|
-
}
|
12664
|
-
}
|
12665
|
-
}
|
12666
|
-
}
|
12667
|
-
},
|
12668
13161
|
td: {
|
12669
13162
|
// backgroundColor: 'neutral.50',
|
12670
13163
|
textAlign: "start",
|
@@ -12691,11 +13184,11 @@ var numericStyles = defineStyle5({
|
|
12691
13184
|
textAlign: "end"
|
12692
13185
|
}
|
12693
13186
|
});
|
12694
|
-
var variantSimple =
|
13187
|
+
var variantSimple = definePartsStyle9((props) => {
|
12695
13188
|
const { colorScheme: c2 } = props;
|
12696
13189
|
return {
|
12697
13190
|
th: {
|
12698
|
-
color:
|
13191
|
+
color: "black.high",
|
12699
13192
|
borderBottom: "1px",
|
12700
13193
|
borderColor: mode2(`${c2}.100`, `${c2}.700`)(props),
|
12701
13194
|
...numericStyles
|
@@ -12717,11 +13210,11 @@ var variantSimple = definePartsStyle8((props) => {
|
|
12717
13210
|
}
|
12718
13211
|
};
|
12719
13212
|
});
|
12720
|
-
var variantStripe =
|
13213
|
+
var variantStripe = definePartsStyle9((props) => {
|
12721
13214
|
const { colorScheme: c2 } = props;
|
12722
13215
|
return {
|
12723
13216
|
th: {
|
12724
|
-
color:
|
13217
|
+
color: "black.high",
|
12725
13218
|
borderBottom: "1px",
|
12726
13219
|
borderColor: mode2(`${c2}.100`, `${c2}.700`)(props),
|
12727
13220
|
...numericStyles
|
@@ -12762,7 +13255,7 @@ var variants5 = {
|
|
12762
13255
|
unstyled: defineStyle5({})
|
12763
13256
|
};
|
12764
13257
|
var sizes4 = {
|
12765
|
-
sm:
|
13258
|
+
sm: definePartsStyle9({
|
12766
13259
|
th: {
|
12767
13260
|
px: "2",
|
12768
13261
|
py: "4",
|
@@ -12781,7 +13274,7 @@ var sizes4 = {
|
|
12781
13274
|
fontSize: "xs"
|
12782
13275
|
}
|
12783
13276
|
}),
|
12784
|
-
md:
|
13277
|
+
md: definePartsStyle9({
|
12785
13278
|
th: {
|
12786
13279
|
px: "2",
|
12787
13280
|
py: "4",
|
@@ -12799,7 +13292,7 @@ var sizes4 = {
|
|
12799
13292
|
fontSize: "sm"
|
12800
13293
|
}
|
12801
13294
|
}),
|
12802
|
-
lg:
|
13295
|
+
lg: definePartsStyle9({
|
12803
13296
|
th: {
|
12804
13297
|
px: "2",
|
12805
13298
|
py: "4",
|
@@ -12818,8 +13311,8 @@ var sizes4 = {
|
|
12818
13311
|
}
|
12819
13312
|
})
|
12820
13313
|
};
|
12821
|
-
var tableTheme =
|
12822
|
-
baseStyle:
|
13314
|
+
var tableTheme = defineMultiStyleConfig9({
|
13315
|
+
baseStyle: baseStyle10,
|
12823
13316
|
variants: variants5,
|
12824
13317
|
sizes: sizes4,
|
12825
13318
|
defaultProps: {
|
@@ -12832,9 +13325,9 @@ var table_default = tableTheme;
|
|
12832
13325
|
|
12833
13326
|
// src/config/theme/components/tabs.ts
|
12834
13327
|
import { tabsAnatomy as parts7 } from "@chakra-ui/anatomy";
|
12835
|
-
import { createMultiStyleConfigHelpers as
|
12836
|
-
var { defineMultiStyleConfig:
|
12837
|
-
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) => {
|
12838
13331
|
const { orientation } = props;
|
12839
13332
|
const isVertical = orientation === "vertical";
|
12840
13333
|
const borderProp = isVertical ? "borderStart" : "borderBottom";
|
@@ -12846,17 +13339,17 @@ var variantLine = definePartsStyle9((props) => {
|
|
12846
13339
|
},
|
12847
13340
|
tab: {
|
12848
13341
|
[borderProp]: "1px solid",
|
12849
|
-
borderColor: "
|
13342
|
+
borderColor: "neutral.400",
|
12850
13343
|
[marginProp]: "-1px"
|
12851
13344
|
}
|
12852
13345
|
};
|
12853
13346
|
});
|
12854
|
-
var variantUnstyled =
|
13347
|
+
var variantUnstyled = definePartsStyle10({});
|
12855
13348
|
var variants6 = {
|
12856
13349
|
line: variantLine,
|
12857
13350
|
unstyled: variantUnstyled
|
12858
13351
|
};
|
12859
|
-
var tabsTheme =
|
13352
|
+
var tabsTheme = defineMultiStyleConfig10({
|
12860
13353
|
variants: variants6,
|
12861
13354
|
defaultProps: {
|
12862
13355
|
size: "md",
|
@@ -12866,7 +13359,7 @@ var tabsTheme = defineMultiStyleConfig9({
|
|
12866
13359
|
var tabs_default = tabsTheme;
|
12867
13360
|
|
12868
13361
|
// src/config/theme/components/textarea.ts
|
12869
|
-
import { defineStyle as defineStyle6, defineStyleConfig as
|
13362
|
+
import { defineStyle as defineStyle6, defineStyleConfig as defineStyleConfig6 } from "@chakra-ui/react";
|
12870
13363
|
var getProps = (props) => {
|
12871
13364
|
const { isError, isSuccess, isDisabled } = props;
|
12872
13365
|
let borderColor = "neutral.400";
|
@@ -12886,7 +13379,7 @@ var getProps = (props) => {
|
|
12886
13379
|
borderColor
|
12887
13380
|
};
|
12888
13381
|
};
|
12889
|
-
var
|
13382
|
+
var outline3 = defineStyle6((props) => {
|
12890
13383
|
const { focusBorderColor, borderColor } = getProps(props);
|
12891
13384
|
return {
|
12892
13385
|
background: "white.high",
|
@@ -12930,8 +13423,8 @@ var outline2 = defineStyle6((props) => {
|
|
12930
13423
|
}
|
12931
13424
|
};
|
12932
13425
|
});
|
12933
|
-
var Textarea =
|
12934
|
-
variants: { outline:
|
13426
|
+
var Textarea = defineStyleConfig6({
|
13427
|
+
variants: { outline: outline3 },
|
12935
13428
|
defaultProps: {
|
12936
13429
|
variant: "outline"
|
12937
13430
|
}
|
@@ -12939,14 +13432,15 @@ var Textarea = defineStyleConfig7({
|
|
12939
13432
|
var textarea_default2 = Textarea;
|
12940
13433
|
|
12941
13434
|
// src/config/theme/components/tooltip.ts
|
12942
|
-
import { cssVar as cssVar3, defineStyleConfig as
|
13435
|
+
import { cssVar as cssVar3, defineStyleConfig as defineStyleConfig7 } from "@chakra-ui/react";
|
12943
13436
|
var $arrowBg = cssVar3("popper-arrow-bg");
|
12944
|
-
var
|
13437
|
+
var baseStyle11 = {
|
12945
13438
|
bg: "neutral.700",
|
13439
|
+
textStyle: "text.sm",
|
12946
13440
|
fontSize: "text.sm",
|
12947
13441
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
12948
13442
|
};
|
12949
|
-
var Tooltip2 =
|
13443
|
+
var Tooltip2 = defineStyleConfig7({ baseStyle: baseStyle11 });
|
12950
13444
|
var tooltip_default = Tooltip2;
|
12951
13445
|
|
12952
13446
|
// src/config/theme/themeConfiguration.ts
|
@@ -12972,7 +13466,7 @@ var getTheme = (foundations) => {
|
|
12972
13466
|
config
|
12973
13467
|
});
|
12974
13468
|
};
|
12975
|
-
var
|
13469
|
+
var theme4 = extendTheme({
|
12976
13470
|
components: {
|
12977
13471
|
...components_exports
|
12978
13472
|
},
|
@@ -12992,13 +13486,13 @@ var theme5 = extendTheme({
|
|
12992
13486
|
|
12993
13487
|
// src/hooks/useFetcher.ts
|
12994
13488
|
import axios2 from "axios";
|
12995
|
-
import { useMemo as
|
13489
|
+
import { useMemo as useMemo9 } from "react";
|
12996
13490
|
|
12997
13491
|
// src/provider/components/provider.tsx
|
12998
13492
|
import axios from "axios";
|
12999
|
-
import { createContext as createContext8, useContext as useContext14, useEffect as useEffect13, useMemo as
|
13000
|
-
import { ToastContainer } from "react-toastify";
|
13001
|
-
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";
|
13002
13496
|
var ProviderContext = createContext8({
|
13003
13497
|
instance: void 0
|
13004
13498
|
});
|
@@ -13007,7 +13501,7 @@ var useInternalUI = () => {
|
|
13007
13501
|
return { instance };
|
13008
13502
|
};
|
13009
13503
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
13010
|
-
const instanceRef =
|
13504
|
+
const instanceRef = useRef10(axios.create(config2));
|
13011
13505
|
useEffect13(() => {
|
13012
13506
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
13013
13507
|
instanceRef.current.interceptors.request.use(interceptor);
|
@@ -13016,9 +13510,9 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
13016
13510
|
instanceRef.current.interceptors.response.use(interceptor);
|
13017
13511
|
});
|
13018
13512
|
}, [requestInterceptors, responseInterceptors]);
|
13019
|
-
const provider =
|
13020
|
-
return /* @__PURE__ */
|
13021
|
-
/* @__PURE__ */
|
13513
|
+
const provider = useMemo8(() => ({ instance: instanceRef.current }), []);
|
13514
|
+
return /* @__PURE__ */ jsxs31(ProviderContext.Provider, { value: provider, children: [
|
13515
|
+
/* @__PURE__ */ jsx69(ToastContainer2, {}),
|
13022
13516
|
children
|
13023
13517
|
] });
|
13024
13518
|
};
|
@@ -13037,7 +13531,7 @@ import {
|
|
13037
13531
|
// src/hooks/useFetcher.ts
|
13038
13532
|
function useFetcher() {
|
13039
13533
|
const { instance } = useInternalUI();
|
13040
|
-
const axiosInstance =
|
13534
|
+
const axiosInstance = useMemo9(() => instance || axios2, [instance]);
|
13041
13535
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
13042
13536
|
const response = await axiosInstance.request({
|
13043
13537
|
data,
|
@@ -13061,7 +13555,7 @@ import {
|
|
13061
13555
|
useBoolean,
|
13062
13556
|
useClipboard,
|
13063
13557
|
useColorMode as useColorMode8,
|
13064
|
-
useColorModeValue as
|
13558
|
+
useColorModeValue as useColorModeValue11,
|
13065
13559
|
useConst,
|
13066
13560
|
useControllableProp,
|
13067
13561
|
useControllableState,
|
@@ -13112,7 +13606,7 @@ export {
|
|
13112
13606
|
AvatarGroupProps,
|
13113
13607
|
AvatarProps,
|
13114
13608
|
badge_default as Badge,
|
13115
|
-
|
13609
|
+
Box19 as Box,
|
13116
13610
|
BoxProps,
|
13117
13611
|
bread_crumb_default as BreadCrumb,
|
13118
13612
|
button_default as Button,
|
@@ -13160,11 +13654,10 @@ export {
|
|
13160
13654
|
ModalOverlay3 as DrawerOverlay,
|
13161
13655
|
DrawerProps,
|
13162
13656
|
empty_state_default as EmptyState,
|
13163
|
-
layout_default as EmptyStateLayout,
|
13164
13657
|
Fade,
|
13165
13658
|
FadeProps,
|
13166
13659
|
field_default as Field,
|
13167
|
-
|
13660
|
+
Flex8 as Flex,
|
13168
13661
|
FlexProps,
|
13169
13662
|
FormControl2 as FormControl,
|
13170
13663
|
FormControlProps,
|
@@ -13177,16 +13670,16 @@ export {
|
|
13177
13670
|
GridItemProps,
|
13178
13671
|
GridProps,
|
13179
13672
|
HStack4 as HStack,
|
13180
|
-
|
13673
|
+
Header,
|
13181
13674
|
Heading,
|
13182
13675
|
HeadingProps,
|
13183
13676
|
Hide,
|
13184
13677
|
HideProps,
|
13185
|
-
|
13186
|
-
IconButton,
|
13678
|
+
Icon3 as Icon,
|
13679
|
+
IconButton2 as IconButton,
|
13187
13680
|
IconButtonProps,
|
13188
13681
|
IconProps,
|
13189
|
-
|
13682
|
+
Image3 as Image,
|
13190
13683
|
ImageProps,
|
13191
13684
|
Img,
|
13192
13685
|
ImgProps,
|
@@ -13214,6 +13707,7 @@ export {
|
|
13214
13707
|
ListItemProps,
|
13215
13708
|
ListProps,
|
13216
13709
|
loader_default as Loader,
|
13710
|
+
Logo,
|
13217
13711
|
navigation_default as MainMenu,
|
13218
13712
|
Modal2 as Modal,
|
13219
13713
|
modal_back_button_default as ModalBackButton,
|
@@ -13233,6 +13727,7 @@ export {
|
|
13233
13727
|
ModalProps,
|
13234
13728
|
multi_datepicker_month_default as MultiDatePickerMonth,
|
13235
13729
|
NavItem,
|
13730
|
+
Navbar,
|
13236
13731
|
navigation_bar_default as NavigationBar,
|
13237
13732
|
OrderedList,
|
13238
13733
|
pagination_default as Pagination,
|
@@ -13255,6 +13750,7 @@ export {
|
|
13255
13750
|
PopoverTrigger4 as PopoverTrigger,
|
13256
13751
|
Portal2 as Portal,
|
13257
13752
|
PortalProps,
|
13753
|
+
Profile,
|
13258
13754
|
provider_default as Provider,
|
13259
13755
|
ProviderContext,
|
13260
13756
|
Radio,
|
@@ -13322,8 +13818,8 @@ export {
|
|
13322
13818
|
Th2 as Th,
|
13323
13819
|
Thead2 as Thead,
|
13324
13820
|
ThemeTypings,
|
13821
|
+
ToastContainer,
|
13325
13822
|
Tooltip,
|
13326
|
-
TooltipProps,
|
13327
13823
|
Tr2 as Tr,
|
13328
13824
|
UnorderedList,
|
13329
13825
|
uploader_default as Uploader,
|
@@ -13354,17 +13850,20 @@ export {
|
|
13354
13850
|
UseTabsProps,
|
13355
13851
|
UseTabsReturn,
|
13356
13852
|
VStack3 as VStack,
|
13853
|
+
Version,
|
13357
13854
|
VisuallyHidden2 as VisuallyHidden,
|
13358
13855
|
VisuallyHiddenInput,
|
13856
|
+
VoilaLogo,
|
13359
13857
|
Wrap,
|
13360
13858
|
WrapItem,
|
13361
13859
|
WrapItemProps,
|
13362
13860
|
WrapProps,
|
13861
|
+
XMSLogo,
|
13363
13862
|
extendTheme2 as extendTheme,
|
13364
13863
|
forwardRef16 as forwardRef,
|
13365
13864
|
getSelectAllCheckboxState,
|
13366
13865
|
getTheme,
|
13367
|
-
|
13866
|
+
theme4 as theme,
|
13368
13867
|
useAccordion,
|
13369
13868
|
useAccordionContext,
|
13370
13869
|
useAccordionItem,
|
@@ -13373,12 +13872,12 @@ export {
|
|
13373
13872
|
useAlertStyles,
|
13374
13873
|
useBoolean,
|
13375
13874
|
useBreakpoint,
|
13376
|
-
useCheckbox,
|
13875
|
+
useCheckbox2 as useCheckbox,
|
13377
13876
|
useCheckboxGroup,
|
13378
13877
|
useClipboard,
|
13379
13878
|
useColorMode8 as useColorMode,
|
13380
13879
|
useColorModePreference,
|
13381
|
-
|
13880
|
+
useColorModeValue11 as useColorModeValue,
|
13382
13881
|
useConst,
|
13383
13882
|
useControllableProp,
|
13384
13883
|
useControllableState,
|
@@ -13411,6 +13910,7 @@ export {
|
|
13411
13910
|
useTabsDescendantsContext,
|
13412
13911
|
useTabsStyles,
|
13413
13912
|
useTheme,
|
13913
|
+
useToast,
|
13414
13914
|
useToken2 as useToken
|
13415
13915
|
};
|
13416
13916
|
//# sourceMappingURL=index.mjs.map
|