@ctlyst.id/internal-ui 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +369 -302
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +170 -107
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1083,7 +1083,7 @@ var DataTable = React5.forwardRef(
|
|
1083
1083
|
React5.useImperativeHandle(ref, () => ({
|
1084
1084
|
toggleAllRowsSelected
|
1085
1085
|
}));
|
1086
|
-
return /* @__PURE__ */ jsx24(Box11, { overflowX: "auto", position: "relative", maxW: "100%",
|
1086
|
+
return /* @__PURE__ */ jsx24(Box11, { overflowX: "auto", position: "relative", maxW: "100%", w: "full", ...container, children: isLoading ? /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
1087
1087
|
/* @__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, index) => /* @__PURE__ */ jsx24(
|
1088
1088
|
Th,
|
1089
1089
|
{
|
@@ -1103,49 +1103,56 @@ var DataTable = React5.forwardRef(
|
|
1103
1103
|
},
|
1104
1104
|
header.id
|
1105
1105
|
)) }, headerGroup.id)) }),
|
1106
|
-
/* @__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: "
|
1106
|
+
/* @__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: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i) }, i)) }, num)) })
|
1107
1107
|
] }) : /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, children: [
|
1108
|
-
/* @__PURE__ */ jsx24(
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
{
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
children: /* @__PURE__ */ jsxs8(
|
1118
|
-
Flex2,
|
1108
|
+
/* @__PURE__ */ jsx24(
|
1109
|
+
Thead,
|
1110
|
+
{
|
1111
|
+
maxH: "50px",
|
1112
|
+
...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
|
1113
|
+
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, index) => {
|
1114
|
+
var _a;
|
1115
|
+
return /* @__PURE__ */ jsx24(
|
1116
|
+
Th,
|
1119
1117
|
{
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1118
|
+
colSpan: header.colSpan,
|
1119
|
+
sx: getCommonPinningStyles(header.column),
|
1120
|
+
width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
|
1121
|
+
...styles == null ? void 0 : styles.tableColumnHeader,
|
1122
|
+
children: /* @__PURE__ */ jsxs8(
|
1123
|
+
Flex2,
|
1124
|
+
{
|
1125
|
+
backgroundColor: "white",
|
1126
|
+
height: "100%",
|
1127
|
+
"data-test-id": `CT_Container_TableHeader_${header.id}`,
|
1128
|
+
textTransform: "capitalize",
|
1129
|
+
userSelect: "none",
|
1130
|
+
align: "center",
|
1131
|
+
gap: 2,
|
1132
|
+
children: [
|
1133
|
+
/* @__PURE__ */ jsx24(Text4, { children: flexRender(header.column.columnDef.header, header.getContext()) }),
|
1134
|
+
/* @__PURE__ */ jsx24(
|
1135
|
+
Box11,
|
1136
|
+
{
|
1137
|
+
as: "span",
|
1138
|
+
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1139
|
+
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1140
|
+
onClick: header.column.getToggleSortingHandler(),
|
1141
|
+
children: (_a = header.column.getCanSort() && {
|
1142
|
+
asc: /* @__PURE__ */ jsx24(ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1143
|
+
desc: /* @__PURE__ */ jsx24(ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1144
|
+
}[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */ jsx24(Box11, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ jsx24(UpDownIcon, { color: "neutral.500" }) })
|
1145
|
+
}
|
1146
|
+
)
|
1147
|
+
]
|
1148
|
+
}
|
1149
|
+
)
|
1150
|
+
},
|
1151
|
+
header.id
|
1152
|
+
);
|
1153
|
+
}) }, headerGroup.id))
|
1154
|
+
}
|
1155
|
+
),
|
1149
1156
|
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
|
1150
1157
|
const trRef = useRef();
|
1151
1158
|
return /* @__PURE__ */ jsx24(
|
@@ -2557,36 +2564,45 @@ import {
|
|
2557
2564
|
Portal,
|
2558
2565
|
Tooltip as ChakraTooltip
|
2559
2566
|
} from "@chakra-ui/react";
|
2560
|
-
import { jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
|
2567
|
+
import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs14 } from "react/jsx-runtime";
|
2561
2568
|
var Tooltip = (props) => {
|
2562
|
-
const {
|
2563
|
-
|
2569
|
+
const {
|
2570
|
+
children,
|
2571
|
+
bg = "neutral.700",
|
2572
|
+
textStyle = "text.sm",
|
2573
|
+
color = "white",
|
2574
|
+
width,
|
2575
|
+
borderRadius = 4,
|
2576
|
+
fontWeight = "400"
|
2577
|
+
} = props;
|
2578
|
+
const content = ({ onClose }) => /* @__PURE__ */ jsxs14(
|
2564
2579
|
PopoverContent,
|
2565
2580
|
{
|
2566
2581
|
"data-test-id": "",
|
2567
2582
|
border: "none",
|
2568
2583
|
bg,
|
2569
|
-
rounded,
|
2570
|
-
ml: 1,
|
2571
2584
|
textStyle,
|
2572
2585
|
width,
|
2573
2586
|
placeItems: "center",
|
2574
|
-
borderRadius
|
2575
|
-
onClick: (e) =>
|
2587
|
+
borderRadius,
|
2588
|
+
onClick: (e) => {
|
2589
|
+
e.stopPropagation();
|
2590
|
+
onClose();
|
2591
|
+
},
|
2576
2592
|
children: [
|
2577
2593
|
props.hasArrow && /* @__PURE__ */ jsx35(PopoverArrow, { color, bg, shadow: "none" }),
|
2578
|
-
/* @__PURE__ */ jsx35(PopoverBody, { color, ...props, children: props.label })
|
2594
|
+
/* @__PURE__ */ jsx35(PopoverBody, { color, ...props, fontWeight, children: props.label })
|
2579
2595
|
]
|
2580
2596
|
}
|
2581
2597
|
);
|
2582
|
-
return props.isInteractive === true ? /* @__PURE__ */
|
2598
|
+
return props.isInteractive === true ? /* @__PURE__ */ jsx35(Popover, { trigger: "hover", placement: props.placement, ...props.popoverProps, children: ({ onClose }) => /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
2583
2599
|
/* @__PURE__ */ jsx35(PopoverTrigger, { children }),
|
2584
|
-
props.portal ? /* @__PURE__ */ jsx35(Portal, { children: content }) : content
|
2585
|
-
] }) : /* @__PURE__ */ jsx35(ChakraTooltip, { ...props, children });
|
2600
|
+
props.portal ? /* @__PURE__ */ jsx35(Portal, { children: content({ onClose }) }) : content({ onClose })
|
2601
|
+
] }) }) : /* @__PURE__ */ jsx35(ChakraTooltip, { ...props, children });
|
2586
2602
|
};
|
2587
2603
|
|
2588
2604
|
// src/components/header/components/profile.tsx
|
2589
|
-
import { Fragment as
|
2605
|
+
import { Fragment as Fragment4, jsx as jsx36, jsxs as jsxs15 } from "react/jsx-runtime";
|
2590
2606
|
var Profile = ({
|
2591
2607
|
color,
|
2592
2608
|
brandColor,
|
@@ -2621,7 +2637,7 @@ var Profile = ({
|
|
2621
2637
|
/* @__PURE__ */ jsxs15(VStack2, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
|
2622
2638
|
/* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
2623
2639
|
/* @__PURE__ */ jsxs15(Flex5, { alignItems: "center", children: [
|
2624
|
-
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs15(
|
2640
|
+
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
2625
2641
|
/* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
2626
2642
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ jsx36(
|
2627
2643
|
Box16,
|
@@ -2648,18 +2664,19 @@ var Profile = ({
|
|
2648
2664
|
] }),
|
2649
2665
|
textAlign: "left",
|
2650
2666
|
placement: "bottom-end",
|
2667
|
+
cursor: "text",
|
2668
|
+
portal: true,
|
2651
2669
|
popoverProps: {
|
2652
2670
|
offset: [10, 8]
|
2653
2671
|
},
|
2654
2672
|
width: 300,
|
2655
2673
|
...officeContainer,
|
2656
|
-
children: /* @__PURE__ */ jsx36(Box16, {
|
2674
|
+
children: /* @__PURE__ */ jsx36(Box16, { ml: 1, children: /* @__PURE__ */ jsxs15(
|
2657
2675
|
badge_default,
|
2658
2676
|
{
|
2659
|
-
|
2660
|
-
pill: true,
|
2677
|
+
rounded: "full",
|
2661
2678
|
variant: "neutral-light",
|
2662
|
-
boxSize: "
|
2679
|
+
boxSize: "5",
|
2663
2680
|
justifyContent: "center",
|
2664
2681
|
p: "0.5",
|
2665
2682
|
...badgeStyle,
|
@@ -2720,14 +2737,14 @@ function environmentName(env) {
|
|
2720
2737
|
}
|
2721
2738
|
|
2722
2739
|
// src/components/header/components/version.tsx
|
2723
|
-
import { Fragment as
|
2740
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
2724
2741
|
var Version = ({
|
2725
2742
|
hideEnv,
|
2726
2743
|
version,
|
2727
2744
|
environment,
|
2728
2745
|
onOpenModalRelease,
|
2729
2746
|
versionStyle
|
2730
|
-
}) => /* @__PURE__ */ jsxs16(
|
2747
|
+
}) => /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
2731
2748
|
typeof version === "string" ? /* @__PURE__ */ jsx38(
|
2732
2749
|
badge_default,
|
2733
2750
|
{
|
@@ -2991,7 +3008,7 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
2991
3008
|
]);
|
2992
3009
|
|
2993
3010
|
// src/components/navigation/components/navigation.tsx
|
2994
|
-
import { Fragment as
|
3011
|
+
import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
|
2995
3012
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
2996
3013
|
return /* @__PURE__ */ jsx43(Box21, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ jsx43(
|
2997
3014
|
Flex9,
|
@@ -3008,7 +3025,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3008
3025
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
3009
3026
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
3010
3027
|
const activeBg = isActive ? "primary.500" : void 0;
|
3011
|
-
return /* @__PURE__ */ jsx43(Popover3, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs18(
|
3028
|
+
return /* @__PURE__ */ jsx43(Popover3, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
3012
3029
|
/* @__PURE__ */ jsx43(PopoverTrigger3, { children: /* @__PURE__ */ jsx43(
|
3013
3030
|
Button3,
|
3014
3031
|
{
|
@@ -3108,7 +3125,7 @@ var navigation_default = Navigation;
|
|
3108
3125
|
// src/components/navigation/components/navigation-bar.tsx
|
3109
3126
|
import { Box as Box22, Button as Button4, Flex as Flex10, Link as Link4, Popover as Popover4, PopoverContent as PopoverContent4, PopoverTrigger as PopoverTrigger4, Text as Text10 } from "@chakra-ui/react";
|
3110
3127
|
import * as Icon6 from "@ctlyst.id/internal-icon";
|
3111
|
-
import { Fragment as
|
3128
|
+
import { Fragment as Fragment7, jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
3112
3129
|
var NavigationBar = ({
|
3113
3130
|
navigations,
|
3114
3131
|
isFetched,
|
@@ -3140,7 +3157,7 @@ var NavigationBar = ({
|
|
3140
3157
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
3141
3158
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
3142
3159
|
const activeBg = isActive ? "primary.500" : void 0;
|
3143
|
-
return /* @__PURE__ */ jsx44(Popover4, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs19(
|
3160
|
+
return /* @__PURE__ */ jsx44(Popover4, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
3144
3161
|
/* @__PURE__ */ jsx44(PopoverTrigger4, { children: /* @__PURE__ */ jsx44(
|
3145
3162
|
Button4,
|
3146
3163
|
{
|
@@ -3530,8 +3547,10 @@ var Rating = ({ value }) => {
|
|
3530
3547
|
var rating_default = Rating;
|
3531
3548
|
|
3532
3549
|
// src/components/select/components/select.tsx
|
3550
|
+
import { Badge as Badge2, Flex as Flex11 } from "@chakra-ui/react";
|
3533
3551
|
import { useColorMode as useColorMode3 } from "@chakra-ui/system";
|
3534
|
-
import
|
3552
|
+
import * as Icon7 from "@ctlyst.id/internal-icon";
|
3553
|
+
import ReactSelect, { components as componentRS } from "react-select";
|
3535
3554
|
|
3536
3555
|
// src/config/theme/foundations/shadows.ts
|
3537
3556
|
import { theme } from "@chakra-ui/react";
|
@@ -3838,10 +3857,10 @@ function selectStyles(colorMode, _isError) {
|
|
3838
3857
|
return { ...base, ...selectStyle };
|
3839
3858
|
},
|
3840
3859
|
dropdownIndicator: (base) => {
|
3841
|
-
return { ...base, ...selectStyle };
|
3860
|
+
return { ...base, ...selectStyle, color: "var(--chakra-colors-neutral-400)" };
|
3842
3861
|
},
|
3843
3862
|
indicatorSeparator: (base) => {
|
3844
|
-
return { ...base,
|
3863
|
+
return { ...base, background: "var(--chakra-colors-neutral-400)", borderRadius: 10 };
|
3845
3864
|
},
|
3846
3865
|
placeholder: (base) => {
|
3847
3866
|
return { ...base, ...selectStyle, color: "var(--chakra-colors-black-low)" };
|
@@ -3856,13 +3875,15 @@ function selectStyles(colorMode, _isError) {
|
|
3856
3875
|
multiValueLabel: (base) => ({
|
3857
3876
|
...base,
|
3858
3877
|
borderRadius: 4,
|
3859
|
-
fontWeight: "bold"
|
3878
|
+
fontWeight: "bold",
|
3879
|
+
padding: 0,
|
3880
|
+
paddingLeft: 0
|
3860
3881
|
}),
|
3861
3882
|
multiValueRemove: (base) => ({
|
3862
3883
|
...base,
|
3863
3884
|
color: "var(--chakra-colors-neutral-900)",
|
3864
3885
|
":hover": {
|
3865
|
-
backgroundColor: "
|
3886
|
+
backgroundColor: "transparent"
|
3866
3887
|
}
|
3867
3888
|
})
|
3868
3889
|
};
|
@@ -3882,19 +3903,40 @@ var themeSelect = (theme5) => {
|
|
3882
3903
|
|
3883
3904
|
// src/components/select/components/select.tsx
|
3884
3905
|
import { jsx as jsx53 } from "react/jsx-runtime";
|
3906
|
+
function DropdownIndicator(props) {
|
3907
|
+
return /* @__PURE__ */ jsx53(componentRS.DropdownIndicator, { ...props, children: /* @__PURE__ */ jsx53(Icon7.ChevronDown, { size: 4, color: "neutral.400" }) });
|
3908
|
+
}
|
3909
|
+
function ClearIndicator(props) {
|
3910
|
+
const { hasValue } = props;
|
3911
|
+
return /* @__PURE__ */ jsx53(componentRS.ClearIndicator, { ...props, children: /* @__PURE__ */ jsx53(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
3912
|
+
}
|
3913
|
+
function MultiValue(props) {
|
3914
|
+
return /* @__PURE__ */ jsx53(componentRS.MultiValue, { ...props, children: /* @__PURE__ */ jsx53(Badge2, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
3915
|
+
}
|
3916
|
+
function MultiValueRemove(props) {
|
3917
|
+
return /* @__PURE__ */ jsx53(componentRS.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx53(Flex11, { align: "center", justify: "center", children: /* @__PURE__ */ jsx53(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
3918
|
+
}
|
3885
3919
|
function Select2({
|
3886
3920
|
styles,
|
3887
3921
|
isError = false,
|
3888
3922
|
...rest
|
3889
3923
|
}) {
|
3890
3924
|
const { colorMode } = useColorMode3();
|
3925
|
+
const { components } = rest;
|
3891
3926
|
return /* @__PURE__ */ jsx53(
|
3892
3927
|
ReactSelect,
|
3893
3928
|
{
|
3894
3929
|
classNamePrefix: "react-select",
|
3895
|
-
|
3930
|
+
components: {
|
3931
|
+
DropdownIndicator,
|
3932
|
+
ClearIndicator,
|
3933
|
+
MultiValue,
|
3934
|
+
MultiValueRemove,
|
3935
|
+
...components
|
3936
|
+
},
|
3896
3937
|
styles: { ...selectStyles(colorMode, isError) },
|
3897
|
-
theme: themeSelect
|
3938
|
+
theme: themeSelect,
|
3939
|
+
...rest
|
3898
3940
|
}
|
3899
3941
|
);
|
3900
3942
|
}
|
@@ -3914,6 +3956,10 @@ function SelectAsync({
|
|
3914
3956
|
AsyncPaginate,
|
3915
3957
|
{
|
3916
3958
|
classNamePrefix: "react-select",
|
3959
|
+
components: {
|
3960
|
+
DropdownIndicator,
|
3961
|
+
ClearIndicator
|
3962
|
+
},
|
3917
3963
|
...rest,
|
3918
3964
|
styles: { ...selectStyles(colorMode, isError), ...styles },
|
3919
3965
|
theme: themeSelect
|
@@ -3932,6 +3978,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3932
3978
|
ReactSelectAsyncCreatable,
|
3933
3979
|
{
|
3934
3980
|
classNamePrefix: "react-select",
|
3981
|
+
components: {
|
3982
|
+
DropdownIndicator,
|
3983
|
+
ClearIndicator
|
3984
|
+
},
|
3935
3985
|
...rest,
|
3936
3986
|
styles: { ...selectStyles(colorMode, isError), ...styles },
|
3937
3987
|
theme: themeSelect
|
@@ -3949,6 +3999,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3949
3999
|
ReactSelectCreatable,
|
3950
4000
|
{
|
3951
4001
|
classNamePrefix: "react-select",
|
4002
|
+
components: {
|
4003
|
+
DropdownIndicator,
|
4004
|
+
ClearIndicator
|
4005
|
+
},
|
3952
4006
|
...rest,
|
3953
4007
|
styles: { ...selectStyles(colorMode, isError), ...styles },
|
3954
4008
|
theme: themeSelect
|
@@ -3957,10 +4011,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3957
4011
|
}
|
3958
4012
|
|
3959
4013
|
// src/components/select/components/select-with-checkbox.tsx
|
3960
|
-
import { Checkbox as Checkbox3, Flex as
|
4014
|
+
import { Checkbox as Checkbox3, Flex as Flex12, Text as Text15 } from "@chakra-ui/react";
|
3961
4015
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
3962
4016
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
3963
|
-
import { Fragment as
|
4017
|
+
import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
|
3964
4018
|
var CHECKBOX_STATE = {
|
3965
4019
|
UNCHECKED: 0,
|
3966
4020
|
INDETERMINATE: 1,
|
@@ -4007,7 +4061,7 @@ var InputOption = ({
|
|
4007
4061
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
4008
4062
|
style
|
4009
4063
|
};
|
4010
|
-
return /* @__PURE__ */ jsxs24(
|
4064
|
+
return /* @__PURE__ */ jsxs24(Fragment8, { children: [
|
4011
4065
|
/* @__PURE__ */ jsx57(
|
4012
4066
|
ComponentRS.Option,
|
4013
4067
|
{
|
@@ -4020,7 +4074,7 @@ var InputOption = ({
|
|
4020
4074
|
innerProps: props,
|
4021
4075
|
...rest,
|
4022
4076
|
children: /* @__PURE__ */ jsxs24(
|
4023
|
-
|
4077
|
+
Flex12,
|
4024
4078
|
{
|
4025
4079
|
alignItems: "center",
|
4026
4080
|
width: "100%",
|
@@ -4071,7 +4125,7 @@ var SelectWithCheckboxBase = ({
|
|
4071
4125
|
);
|
4072
4126
|
};
|
4073
4127
|
var SelectCheckbox = (props) => {
|
4074
|
-
const { isMulti, options, value, ...rest } = props;
|
4128
|
+
const { isMulti, options, value, components, ...rest } = props;
|
4075
4129
|
const selectValue = value || [];
|
4076
4130
|
return /* @__PURE__ */ jsx57(
|
4077
4131
|
SelectWithCheckboxBase,
|
@@ -4079,6 +4133,11 @@ var SelectCheckbox = (props) => {
|
|
4079
4133
|
isMulti,
|
4080
4134
|
options,
|
4081
4135
|
components: {
|
4136
|
+
DropdownIndicator,
|
4137
|
+
ClearIndicator,
|
4138
|
+
MultiValue,
|
4139
|
+
MultiValueRemove,
|
4140
|
+
...components,
|
4082
4141
|
Option: (optionProps) => {
|
4083
4142
|
const { isSelected, data } = optionProps;
|
4084
4143
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
@@ -4094,13 +4153,13 @@ var SelectCheckbox = (props) => {
|
|
4094
4153
|
var select_with_checkbox_default = SelectCheckbox;
|
4095
4154
|
|
4096
4155
|
// src/components/sidebar/components/sidebar.tsx
|
4097
|
-
import { Flex as
|
4156
|
+
import { Flex as Flex13 } from "@chakra-ui/react";
|
4098
4157
|
import { motion } from "framer-motion";
|
4099
4158
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
4100
4159
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
4101
4160
|
const { width = "220px" } = props;
|
4102
4161
|
return /* @__PURE__ */ jsx58(
|
4103
|
-
|
4162
|
+
Flex13,
|
4104
4163
|
{
|
4105
4164
|
position: "relative",
|
4106
4165
|
as: motion.div,
|
@@ -4120,7 +4179,7 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
4120
4179
|
Sidebar.displayName = "Sidebar";
|
4121
4180
|
|
4122
4181
|
// src/components/sidebar/components/sidebar-header.tsx
|
4123
|
-
import { Box as Box27, Flex as
|
4182
|
+
import { Box as Box27, Flex as Flex14, Text as Text16 } from "@chakra-ui/react";
|
4124
4183
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
4125
4184
|
import { AnimatePresence, motion as motion2 } from "framer-motion";
|
4126
4185
|
import { jsx as jsx59, jsxs as jsxs25 } from "react/jsx-runtime";
|
@@ -4136,7 +4195,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
4136
4195
|
color: "primary.500"
|
4137
4196
|
},
|
4138
4197
|
children: /* @__PURE__ */ jsxs25(
|
4139
|
-
|
4198
|
+
Flex14,
|
4140
4199
|
{
|
4141
4200
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
4142
4201
|
direction: "row",
|
@@ -4198,9 +4257,9 @@ import {
|
|
4198
4257
|
Portal as Portal4,
|
4199
4258
|
Text as Text17
|
4200
4259
|
} from "@chakra-ui/react";
|
4201
|
-
import * as
|
4260
|
+
import * as Icon8 from "@ctlyst.id/internal-icon";
|
4202
4261
|
import { motion as motion3 } from "framer-motion";
|
4203
|
-
import { Fragment as
|
4262
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs26 } from "react/jsx-runtime";
|
4204
4263
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
4205
4264
|
return /* @__PURE__ */ jsx60(Box28, { as: motion3.div, animate: { padding: isCollapse ? "8px 16px" : "8px" }, children: /* @__PURE__ */ jsx60(Accordion2, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
4206
4265
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
@@ -4208,12 +4267,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
4208
4267
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
4209
4268
|
const noChild = !item.children.length;
|
4210
4269
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
4211
|
-
return /* @__PURE__ */ jsxs26(
|
4270
|
+
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
4212
4271
|
/* @__PURE__ */ jsx60(Popover6, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
4213
4272
|
const activeOption = isOpen ? "primary.50" : "white";
|
4214
4273
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
4215
4274
|
const activeParent = isActive ? backgroundColor : activeOption;
|
4216
|
-
return /* @__PURE__ */ jsxs26(
|
4275
|
+
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
4217
4276
|
/* @__PURE__ */ jsx60(PopoverTrigger6, { children: /* @__PURE__ */ jsx60(
|
4218
4277
|
AccordionButton2,
|
4219
4278
|
{
|
@@ -4255,7 +4314,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
4255
4314
|
boxSize: "3",
|
4256
4315
|
as: motion3.div,
|
4257
4316
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
4258
|
-
children: /* @__PURE__ */ jsx60(
|
4317
|
+
children: /* @__PURE__ */ jsx60(Icon8.ChevronDown, { size: 3 })
|
4259
4318
|
}
|
4260
4319
|
)
|
4261
4320
|
]
|
@@ -4334,9 +4393,9 @@ SidebarMenu.defaultProps = {
|
|
4334
4393
|
};
|
4335
4394
|
|
4336
4395
|
// src/components/switch/components/switch.tsx
|
4337
|
-
import { chakra as chakra6, Flex as
|
4396
|
+
import { chakra as chakra6, Flex as Flex15, forwardRef as forwardRef10, omitThemingProps as omitThemingProps2, useCheckbox as useCheckbox3, useMultiStyleConfig as useMultiStyleConfig2 } from "@chakra-ui/react";
|
4338
4397
|
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
4339
|
-
import { Check as Check2, Close as
|
4398
|
+
import { Check as Check2, Close as Close5 } from "@ctlyst.id/internal-icon";
|
4340
4399
|
import { useMemo as useMemo3 } from "react";
|
4341
4400
|
import { jsx as jsx61, jsxs as jsxs27 } from "react/jsx-runtime";
|
4342
4401
|
var Switch = forwardRef10(function Switch2(props, ref) {
|
@@ -4392,9 +4451,9 @@ var Switch = forwardRef10(function Switch2(props, ref) {
|
|
4392
4451
|
children: [
|
4393
4452
|
/* @__PURE__ */ jsx61("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
4394
4453
|
/* @__PURE__ */ jsxs27(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
4395
|
-
/* @__PURE__ */ jsxs27(
|
4454
|
+
/* @__PURE__ */ jsxs27(Flex15, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
4396
4455
|
/* @__PURE__ */ jsx61(Check2, { color: "white", size: getIconSize(props.size) }),
|
4397
|
-
/* @__PURE__ */ jsx61(
|
4456
|
+
/* @__PURE__ */ jsx61(Close5, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
4398
4457
|
] }),
|
4399
4458
|
/* @__PURE__ */ jsx61(
|
4400
4459
|
chakra6.span,
|
@@ -4443,7 +4502,7 @@ import {
|
|
4443
4502
|
} from "@chakra-ui/react";
|
4444
4503
|
|
4445
4504
|
// src/components/tabs/components/tab.tsx
|
4446
|
-
import { Button as Button6, Flex as
|
4505
|
+
import { Button as Button6, Flex as Flex16, forwardRef as forwardRef11, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
4447
4506
|
import { jsx as jsx62, jsxs as jsxs28 } from "react/jsx-runtime";
|
4448
4507
|
var Tab = forwardRef11((props, ref) => {
|
4449
4508
|
var _a, _b;
|
@@ -4476,7 +4535,7 @@ var Tab = forwardRef11((props, ref) => {
|
|
4476
4535
|
},
|
4477
4536
|
__css: styles.tab,
|
4478
4537
|
...tabProps,
|
4479
|
-
children: /* @__PURE__ */ jsxs28(
|
4538
|
+
children: /* @__PURE__ */ jsxs28(Flex16, { alignItems: "center", children: [
|
4480
4539
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
4481
4540
|
tabProps.children,
|
4482
4541
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -4525,7 +4584,7 @@ import {
|
|
4525
4584
|
import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text18, TextProps } from "@chakra-ui/react";
|
4526
4585
|
|
4527
4586
|
// src/components/toast/components/toast.tsx
|
4528
|
-
import { chakra as chakra7, Flex as
|
4587
|
+
import { chakra as chakra7, Flex as Flex17, Link as Link6, useToken } from "@chakra-ui/react";
|
4529
4588
|
import { Bounce, toast } from "react-toastify";
|
4530
4589
|
|
4531
4590
|
// src/components/toast/components/styles.tsx
|
@@ -4564,7 +4623,7 @@ var Styles2 = () => {
|
|
4564
4623
|
var styles_default2 = Styles2;
|
4565
4624
|
|
4566
4625
|
// src/components/toast/components/toast.tsx
|
4567
|
-
import { Fragment as
|
4626
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs29 } from "react/jsx-runtime";
|
4568
4627
|
var DEFAULT_OPTIONS = {
|
4569
4628
|
position: "top-right",
|
4570
4629
|
autoClose: 5e3,
|
@@ -4595,10 +4654,10 @@ var useToast = () => {
|
|
4595
4654
|
"success.500"
|
4596
4655
|
]);
|
4597
4656
|
const content = (icon, message, link) => {
|
4598
|
-
return /* @__PURE__ */ jsxs29(
|
4657
|
+
return /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
4599
4658
|
/* @__PURE__ */ jsx64(styles_default2, {}),
|
4600
|
-
/* @__PURE__ */ jsxs29(
|
4601
|
-
/* @__PURE__ */ jsxs29(
|
4659
|
+
/* @__PURE__ */ jsxs29(Flex17, { justifyContent: "space-between", alignItems: "center", gap: 4, children: [
|
4660
|
+
/* @__PURE__ */ jsxs29(Flex17, { alignItems: "center", children: [
|
4602
4661
|
icon && /* @__PURE__ */ jsx64(chakra7.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
4603
4662
|
/* @__PURE__ */ jsx64(chakra7.span, { noOfLines: 2, children: message })
|
4604
4663
|
] }),
|
@@ -4684,7 +4743,7 @@ import { ToastContainer } from "react-toastify";
|
|
4684
4743
|
import {
|
4685
4744
|
Box as Box29,
|
4686
4745
|
Button as Button7,
|
4687
|
-
Flex as
|
4746
|
+
Flex as Flex18,
|
4688
4747
|
FormControl as FormControl4,
|
4689
4748
|
FormLabel as FormLabel4,
|
4690
4749
|
Heading as Heading2,
|
@@ -4725,7 +4784,7 @@ var concatList = (list) => {
|
|
4725
4784
|
var formatValidationMessage = (extension) => `Foto harus dalam format ${concatList(extension.map((ext) => `.${ext}`))}.`;
|
4726
4785
|
|
4727
4786
|
// src/components/uploader/components/uploader.tsx
|
4728
|
-
import { Fragment as
|
4787
|
+
import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs30 } from "react/jsx-runtime";
|
4729
4788
|
import { createElement } from "react";
|
4730
4789
|
var Uploader = ({
|
4731
4790
|
onHandleUploadFile,
|
@@ -4844,13 +4903,13 @@ var Uploader = ({
|
|
4844
4903
|
return /* @__PURE__ */ jsxs30(FormControl4, { isRequired, children: [
|
4845
4904
|
label && typeof label === "string" ? (
|
4846
4905
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
4847
|
-
/* @__PURE__ */ jsxs30(FormLabel4, { requiredIndicator: /* @__PURE__ */ jsx65(
|
4906
|
+
/* @__PURE__ */ jsxs30(FormLabel4, { requiredIndicator: /* @__PURE__ */ jsx65(Fragment11, {}), fontSize: "text.sm", children: [
|
4848
4907
|
isRequired && /* @__PURE__ */ jsx65(RequiredIndicator2, { mr: 1, ml: 0 }),
|
4849
4908
|
label
|
4850
4909
|
] })
|
4851
4910
|
) : label,
|
4852
4911
|
/* @__PURE__ */ jsxs30(
|
4853
|
-
|
4912
|
+
Flex18,
|
4854
4913
|
{
|
4855
4914
|
minH: containerHeight,
|
4856
4915
|
maxW: !isSmall ? "full" : "120px",
|
@@ -4886,7 +4945,7 @@ var Uploader = ({
|
|
4886
4945
|
}
|
4887
4946
|
) }),
|
4888
4947
|
filePreview && /* @__PURE__ */ jsx65(Box29, { w: "full", children: /* @__PURE__ */ jsx65(
|
4889
|
-
|
4948
|
+
Flex18,
|
4890
4949
|
{
|
4891
4950
|
position: "relative",
|
4892
4951
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
@@ -4903,7 +4962,7 @@ var Uploader = ({
|
|
4903
4962
|
)
|
4904
4963
|
}
|
4905
4964
|
) }),
|
4906
|
-
!filePreview && /* @__PURE__ */ jsxs30(
|
4965
|
+
!filePreview && /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
4907
4966
|
/* @__PURE__ */ jsx65(
|
4908
4967
|
"input",
|
4909
4968
|
{
|
@@ -4911,7 +4970,7 @@ var Uploader = ({
|
|
4911
4970
|
...getInputProps()
|
4912
4971
|
}
|
4913
4972
|
),
|
4914
|
-
isDragActive ? /* @__PURE__ */ jsx65(Text19, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs30(
|
4973
|
+
isDragActive ? /* @__PURE__ */ jsx65(Text19, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs30(Flex18, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
4915
4974
|
size2 === "sm" && /* @__PURE__ */ jsx65(Plus, { size: 6, color }),
|
4916
4975
|
/* @__PURE__ */ jsxs30(Box29, { children: [
|
4917
4976
|
!filePreview && /* @__PURE__ */ jsx65(
|
@@ -4931,7 +4990,7 @@ var Uploader = ({
|
|
4931
4990
|
]
|
4932
4991
|
}
|
4933
4992
|
),
|
4934
|
-
filePreview && !isSmall && /* @__PURE__ */ jsxs30(
|
4993
|
+
filePreview && !isSmall && /* @__PURE__ */ jsxs30(Flex18, { align: "center", justify: "center", my: 2, children: [
|
4935
4994
|
/* @__PURE__ */ createElement(
|
4936
4995
|
"input",
|
4937
4996
|
{
|
@@ -5215,7 +5274,7 @@ var alertTheme = defineMultiStyleConfig2({
|
|
5215
5274
|
var alert_default = alertTheme;
|
5216
5275
|
|
5217
5276
|
// src/config/theme/components/badge.ts
|
5218
|
-
var
|
5277
|
+
var Badge3 = {
|
5219
5278
|
baseStyle: {
|
5220
5279
|
h: "fit-content",
|
5221
5280
|
display: "inline-block",
|
@@ -5289,7 +5348,7 @@ var Badge2 = {
|
|
5289
5348
|
variant: "primary-solid"
|
5290
5349
|
}
|
5291
5350
|
};
|
5292
|
-
var badge_default2 =
|
5351
|
+
var badge_default2 = Badge3;
|
5293
5352
|
|
5294
5353
|
// src/config/theme/components/button.ts
|
5295
5354
|
import { defineStyleConfig } from "@chakra-ui/styled-system";
|
@@ -6779,6 +6838,7 @@ export {
|
|
6779
6838
|
CheckboxIconProps,
|
6780
6839
|
CheckboxState,
|
6781
6840
|
chips_default as Chips,
|
6841
|
+
ClearIndicator,
|
6782
6842
|
CloseButton,
|
6783
6843
|
CloseButtonProps,
|
6784
6844
|
Code,
|
@@ -6806,6 +6866,7 @@ export {
|
|
6806
6866
|
ModalHeader3 as DrawerHeader,
|
6807
6867
|
ModalOverlay3 as DrawerOverlay,
|
6808
6868
|
DrawerProps,
|
6869
|
+
DropdownIndicator,
|
6809
6870
|
empty_state_default as EmptyState,
|
6810
6871
|
Fade,
|
6811
6872
|
FadeProps,
|
@@ -6879,6 +6940,8 @@ export {
|
|
6879
6940
|
ModalOverlayProps,
|
6880
6941
|
ModalProps,
|
6881
6942
|
multi_datepicker_month_default as MultiDatePickerMonth,
|
6943
|
+
MultiValue,
|
6944
|
+
MultiValueRemove,
|
6882
6945
|
NavItem,
|
6883
6946
|
Navbar,
|
6884
6947
|
navigation_bar_default as NavigationBar,
|