@ctlyst.id/internal-ui 3.1.7 → 3.1.9
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.js +558 -547
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -83
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -926,24 +926,10 @@ var counter_default = Counter;
|
|
|
926
926
|
|
|
927
927
|
// src/components/data-table/components/data-table.tsx
|
|
928
928
|
import { ChevronDownIcon, ChevronUpIcon, UpDownIcon } from "@chakra-ui/icons";
|
|
929
|
-
import {
|
|
930
|
-
Box as Box11,
|
|
931
|
-
Checkbox as Checkbox2,
|
|
932
|
-
Flex as Flex2,
|
|
933
|
-
Skeleton as Skeleton2,
|
|
934
|
-
Table,
|
|
935
|
-
Tbody,
|
|
936
|
-
Td,
|
|
937
|
-
Text as Text4,
|
|
938
|
-
Th,
|
|
939
|
-
Thead,
|
|
940
|
-
Tr,
|
|
941
|
-
useColorModeValue
|
|
942
|
-
} from "@chakra-ui/react";
|
|
929
|
+
import { Box as Box11, Checkbox as Checkbox2, Flex as Flex2, Skeleton as Skeleton2, Table, Tbody, Td, Th, Thead, Tr, useColorModeValue } from "@chakra-ui/react";
|
|
943
930
|
import { css } from "@emotion/react";
|
|
944
931
|
import { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
945
932
|
import * as React5 from "react";
|
|
946
|
-
import { useRef } from "react";
|
|
947
933
|
import { jsx as jsx24, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
948
934
|
var isCellDisabled = (row, cellId) => {
|
|
949
935
|
if (row.disabled) {
|
|
@@ -1135,7 +1121,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1135
1121
|
align: "center",
|
|
1136
1122
|
gap: 2,
|
|
1137
1123
|
children: [
|
|
1138
|
-
|
|
1124
|
+
flexRender(header.column.columnDef.header, header.getContext()),
|
|
1139
1125
|
/* @__PURE__ */ jsx24(
|
|
1140
1126
|
Box11,
|
|
1141
1127
|
{
|
|
@@ -1159,13 +1145,11 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1159
1145
|
}
|
|
1160
1146
|
),
|
|
1161
1147
|
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
|
|
1162
|
-
const trRef = useRef();
|
|
1163
1148
|
return /* @__PURE__ */ jsx24(
|
|
1164
1149
|
Tr,
|
|
1165
1150
|
{
|
|
1166
1151
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
|
1167
1152
|
tabindex: "0",
|
|
1168
|
-
ref: trRef,
|
|
1169
1153
|
...styles == null ? void 0 : styles.tableRow,
|
|
1170
1154
|
css: css`
|
|
1171
1155
|
&:last-child {
|
|
@@ -1174,13 +1158,13 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1174
1158
|
}
|
|
1175
1159
|
}
|
|
1176
1160
|
`,
|
|
1177
|
-
onMouseDown: () => {
|
|
1161
|
+
onMouseDown: (e) => {
|
|
1178
1162
|
var _a;
|
|
1179
|
-
(_a =
|
|
1163
|
+
(_a = e.currentTarget) == null ? void 0 : _a.setAttribute("data-active", "true");
|
|
1180
1164
|
},
|
|
1181
|
-
onMouseUp: () => {
|
|
1165
|
+
onMouseUp: (e) => {
|
|
1182
1166
|
var _a;
|
|
1183
|
-
(_a =
|
|
1167
|
+
(_a = e.currentTarget) == null ? void 0 : _a.removeAttribute("data-active");
|
|
1184
1168
|
},
|
|
1185
1169
|
onClick: () => {
|
|
1186
1170
|
if (onRowClick) {
|
|
@@ -2090,7 +2074,7 @@ var Styles = ({ showHeader }) => {
|
|
|
2090
2074
|
var styles_default = Styles;
|
|
2091
2075
|
|
|
2092
2076
|
// src/components/datepicker/components/time-input.tsx
|
|
2093
|
-
import { Flex as Flex3, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as
|
|
2077
|
+
import { Flex as Flex3, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as Text4 } from "@chakra-ui/react";
|
|
2094
2078
|
import React6 from "react";
|
|
2095
2079
|
import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2096
2080
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
@@ -2101,7 +2085,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
|
2101
2085
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
|
2102
2086
|
};
|
|
2103
2087
|
return /* @__PURE__ */ jsxs9(Flex3, { flexDir: "column", p: 4, pt: 0, children: [
|
|
2104
|
-
/* @__PURE__ */ jsx26(
|
|
2088
|
+
/* @__PURE__ */ jsx26(Text4, { mb: 2, children: label }),
|
|
2105
2089
|
/* @__PURE__ */ jsxs9(InputGroup3, { alignItems: "center", borderColor: "neutral.400", children: [
|
|
2106
2090
|
/* @__PURE__ */ jsx26(
|
|
2107
2091
|
Input,
|
|
@@ -2342,7 +2326,7 @@ MultiDatePickerMonth.defaultProps = {
|
|
|
2342
2326
|
var multi_datepicker_month_default = MultiDatePickerMonth;
|
|
2343
2327
|
|
|
2344
2328
|
// src/components/dialog/components/dialog.tsx
|
|
2345
|
-
import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text as
|
|
2329
|
+
import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text as Text5 } from "@chakra-ui/react";
|
|
2346
2330
|
import { jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2347
2331
|
var Dialog = ({
|
|
2348
2332
|
title,
|
|
@@ -2356,7 +2340,7 @@ var Dialog = ({
|
|
|
2356
2340
|
return /* @__PURE__ */ jsxs12(Modal, { ...props, children: [
|
|
2357
2341
|
isModalOverlay && /* @__PURE__ */ jsx30(ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
|
2358
2342
|
/* @__PURE__ */ jsxs12(ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
|
2359
|
-
/* @__PURE__ */ jsx30(ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ jsx30(
|
|
2343
|
+
/* @__PURE__ */ jsx30(ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ jsx30(Text5, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
|
2360
2344
|
/* @__PURE__ */ jsx30(ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
|
2361
2345
|
/* @__PURE__ */ jsx30(ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
|
2362
2346
|
] })
|
|
@@ -2373,7 +2357,7 @@ var dialog_default = Dialog;
|
|
|
2373
2357
|
import * as Icon2 from "@ctlyst.id/internal-icon";
|
|
2374
2358
|
|
|
2375
2359
|
// src/components/empty-state/components/layout.tsx
|
|
2376
|
-
import { Box as Box14, Button as Button2, Flex as Flex4, Text as
|
|
2360
|
+
import { Box as Box14, Button as Button2, Flex as Flex4, Text as Text6, VStack } from "@chakra-ui/react";
|
|
2377
2361
|
import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2378
2362
|
var EmptyState = (props) => {
|
|
2379
2363
|
const { icon, title, description, buttonText, onClick } = props;
|
|
@@ -2385,8 +2369,8 @@ var EmptyState = (props) => {
|
|
|
2385
2369
|
return /* @__PURE__ */ jsx31(Flex4, { align: "center", justify: "center", children: /* @__PURE__ */ jsxs13(VStack, { textAlign: "center", children: [
|
|
2386
2370
|
icon,
|
|
2387
2371
|
/* @__PURE__ */ jsxs13(VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
|
|
2388
|
-
/* @__PURE__ */ jsx31(
|
|
2389
|
-
/* @__PURE__ */ jsx31(
|
|
2372
|
+
/* @__PURE__ */ jsx31(Text6, { textStyle: "text.lg", fontWeight: "bold", children: title }),
|
|
2373
|
+
/* @__PURE__ */ jsx31(Text6, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
|
|
2390
2374
|
] }),
|
|
2391
2375
|
buttonText && /* @__PURE__ */ jsx31(Box14, { mt: 3, children: /* @__PURE__ */ jsx31(Button2, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
|
|
2392
2376
|
] }) });
|
|
@@ -2506,7 +2490,7 @@ import {
|
|
|
2506
2490
|
PopoverBody as PopoverBody2,
|
|
2507
2491
|
PopoverContent as PopoverContent2,
|
|
2508
2492
|
PopoverTrigger as PopoverTrigger2,
|
|
2509
|
-
Text as
|
|
2493
|
+
Text as Text7,
|
|
2510
2494
|
useDisclosure,
|
|
2511
2495
|
VStack as VStack2
|
|
2512
2496
|
} from "@chakra-ui/react";
|
|
@@ -2638,10 +2622,10 @@ var Profile = ({
|
|
|
2638
2622
|
...props,
|
|
2639
2623
|
children: /* @__PURE__ */ jsxs15(HStack2, { children: [
|
|
2640
2624
|
/* @__PURE__ */ jsxs15(VStack2, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
|
|
2641
|
-
/* @__PURE__ */ jsx36(
|
|
2625
|
+
/* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
|
2642
2626
|
/* @__PURE__ */ jsxs15(Flex5, { alignItems: "center", children: [
|
|
2643
2627
|
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2644
|
-
/* @__PURE__ */ jsx36(
|
|
2628
|
+
/* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
|
2645
2629
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ jsx36(
|
|
2646
2630
|
Box16,
|
|
2647
2631
|
{
|
|
@@ -2654,7 +2638,7 @@ var Profile = ({
|
|
|
2654
2638
|
)
|
|
2655
2639
|
] }),
|
|
2656
2640
|
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ jsxs15(Flex5, { align: "center", justify: "center", children: [
|
|
2657
|
-
/* @__PURE__ */ jsx36(
|
|
2641
|
+
/* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", children: data.office[0] }),
|
|
2658
2642
|
data.office.length > 1 && /* @__PURE__ */ jsx36(
|
|
2659
2643
|
Tooltip,
|
|
2660
2644
|
{
|
|
@@ -2662,8 +2646,8 @@ var Profile = ({
|
|
|
2662
2646
|
hasArrow: true,
|
|
2663
2647
|
p: "2",
|
|
2664
2648
|
label: /* @__PURE__ */ jsxs15(Box16, { children: [
|
|
2665
|
-
/* @__PURE__ */ jsx36(
|
|
2666
|
-
/* @__PURE__ */ jsx36(
|
|
2649
|
+
/* @__PURE__ */ jsx36(Text7, { children: "Akses Office:" }),
|
|
2650
|
+
/* @__PURE__ */ jsx36(Text7, { children: data.office.sort().join(", ") })
|
|
2667
2651
|
] }),
|
|
2668
2652
|
textAlign: "left",
|
|
2669
2653
|
placement: "bottom-end",
|
|
@@ -2691,7 +2675,7 @@ var Profile = ({
|
|
|
2691
2675
|
) })
|
|
2692
2676
|
}
|
|
2693
2677
|
)
|
|
2694
|
-
] }) : /* @__PURE__ */ jsx36(
|
|
2678
|
+
] }) : /* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
|
2695
2679
|
] })
|
|
2696
2680
|
] }),
|
|
2697
2681
|
/* @__PURE__ */ jsx36(PopoverTrigger2, { children: /* @__PURE__ */ jsx36(Box16, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ jsx36(Avatar, { size: "sm", bg: brandColor, color: "white", name: (_b = data == null ? void 0 : data.name) != null ? _b : data == null ? void 0 : data.email }) }) })
|
|
@@ -2702,7 +2686,7 @@ var Profile = ({
|
|
|
2702
2686
|
/* @__PURE__ */ jsx36(PopoverArrow2, { bg: "white" }),
|
|
2703
2687
|
/* @__PURE__ */ jsx36(PopoverBody2, { py: "1", px: "0", children: /* @__PURE__ */ jsx36(NavItem, { "data-test-id": "CTA_Navbar_logout-button", onClick: onLogout, rounded: "none", px: "4", children: /* @__PURE__ */ jsxs15(Box16, { display: "flex", alignItems: "center", children: [
|
|
2704
2688
|
/* @__PURE__ */ jsx36(FiPower, {}),
|
|
2705
|
-
/* @__PURE__ */ jsx36(
|
|
2689
|
+
/* @__PURE__ */ jsx36(Text7, { ml: "2", children: "Logout" })
|
|
2706
2690
|
] }) }) })
|
|
2707
2691
|
] })
|
|
2708
2692
|
] });
|
|
@@ -2986,7 +2970,7 @@ import {
|
|
|
2986
2970
|
PopoverContent as PopoverContent3,
|
|
2987
2971
|
PopoverTrigger as PopoverTrigger3,
|
|
2988
2972
|
Portal as Portal2,
|
|
2989
|
-
Text as
|
|
2973
|
+
Text as Text8,
|
|
2990
2974
|
useColorModeValue as useColorModeValue3
|
|
2991
2975
|
} from "@chakra-ui/react";
|
|
2992
2976
|
import * as Icon5 from "@ctlyst.id/internal-icon";
|
|
@@ -3091,7 +3075,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
|
3091
3075
|
py: 4,
|
|
3092
3076
|
children: [
|
|
3093
3077
|
mappingIcon.get(navigation.title),
|
|
3094
|
-
/* @__PURE__ */ jsx43(
|
|
3078
|
+
/* @__PURE__ */ jsx43(Text8, { fontSize: "text.sm", ml: 3, children: title }),
|
|
3095
3079
|
isActiveSub && /* @__PURE__ */ jsx43(
|
|
3096
3080
|
Box21,
|
|
3097
3081
|
{
|
|
@@ -3126,7 +3110,7 @@ Navigation.defaultProps = {
|
|
|
3126
3110
|
var navigation_default = Navigation;
|
|
3127
3111
|
|
|
3128
3112
|
// src/components/navigation/components/navigation-bar.tsx
|
|
3129
|
-
import { Box as Box22, Button as Button4, Flex as Flex10, Link as Link4, Popover as Popover4, PopoverContent as PopoverContent4, PopoverTrigger as PopoverTrigger4, Text as
|
|
3113
|
+
import { Box as Box22, Button as Button4, Flex as Flex10, Link as Link4, Popover as Popover4, PopoverContent as PopoverContent4, PopoverTrigger as PopoverTrigger4, Text as Text9 } from "@chakra-ui/react";
|
|
3130
3114
|
import * as Icon6 from "@ctlyst.id/internal-icon";
|
|
3131
3115
|
import { Fragment as Fragment7, jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3132
3116
|
var NavigationBar = ({
|
|
@@ -3197,7 +3181,7 @@ var NavigationBar = ({
|
|
|
3197
3181
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
|
3198
3182
|
children: [
|
|
3199
3183
|
mappingIcon2.get(item.title),
|
|
3200
|
-
/* @__PURE__ */ jsx44(
|
|
3184
|
+
/* @__PURE__ */ jsx44(Text9, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
|
3201
3185
|
]
|
|
3202
3186
|
},
|
|
3203
3187
|
subMenu.id
|
|
@@ -3214,7 +3198,7 @@ var navigation_bar_default = NavigationBar;
|
|
|
3214
3198
|
|
|
3215
3199
|
// src/components/pagination/components/pagination.tsx
|
|
3216
3200
|
import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon } from "@chakra-ui/icons";
|
|
3217
|
-
import { Box as Box23, Text as
|
|
3201
|
+
import { Box as Box23, Text as Text10, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
|
|
3218
3202
|
|
|
3219
3203
|
// src/components/pagination/components/pagination-button.tsx
|
|
3220
3204
|
import { Button as Button5, forwardRef as forwardRef9, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
|
|
@@ -3345,7 +3329,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
|
3345
3329
|
"data-test-id": "Pagination-Button",
|
|
3346
3330
|
isActive: page === current,
|
|
3347
3331
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
|
3348
|
-
children: /* @__PURE__ */ jsx47(
|
|
3332
|
+
children: /* @__PURE__ */ jsx47(Text10, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
|
3349
3333
|
},
|
|
3350
3334
|
page
|
|
3351
3335
|
);
|
|
@@ -3383,7 +3367,7 @@ Pagination.displayName = "Pagination";
|
|
|
3383
3367
|
var pagination_default = Pagination;
|
|
3384
3368
|
|
|
3385
3369
|
// src/components/pagination/components/pagination-detail.tsx
|
|
3386
|
-
import { Text as
|
|
3370
|
+
import { Text as Text11 } from "@chakra-ui/react";
|
|
3387
3371
|
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3388
3372
|
var PaginationDetail = ({
|
|
3389
3373
|
page,
|
|
@@ -3394,12 +3378,12 @@ var PaginationDetail = ({
|
|
|
3394
3378
|
lineHeight = 18,
|
|
3395
3379
|
...rest
|
|
3396
3380
|
}) => {
|
|
3397
|
-
return /* @__PURE__ */ jsx48(
|
|
3381
|
+
return /* @__PURE__ */ jsx48(Text11, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
|
3398
3382
|
};
|
|
3399
3383
|
var pagination_detail_default = PaginationDetail;
|
|
3400
3384
|
|
|
3401
3385
|
// src/components/pagination/components/pagination-filter.tsx
|
|
3402
|
-
import { Box as Box24, Select, Text as
|
|
3386
|
+
import { Box as Box24, Select, Text as Text12, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
|
|
3403
3387
|
import * as React9 from "react";
|
|
3404
3388
|
import { FiChevronDown } from "react-icons/fi";
|
|
3405
3389
|
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -3412,7 +3396,7 @@ var PaginationFilter = ({
|
|
|
3412
3396
|
}) => {
|
|
3413
3397
|
const [value, setValue] = React9.useState(limit);
|
|
3414
3398
|
return /* @__PURE__ */ jsxs22(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
|
3415
|
-
/* @__PURE__ */ jsx49(
|
|
3399
|
+
/* @__PURE__ */ jsx49(Text12, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue6("neutral.900", "white"), ...rest, children: label }),
|
|
3416
3400
|
/* @__PURE__ */ jsx49(
|
|
3417
3401
|
Select,
|
|
3418
3402
|
{
|
|
@@ -3493,13 +3477,13 @@ import {
|
|
|
3493
3477
|
} from "@chakra-ui/react";
|
|
3494
3478
|
|
|
3495
3479
|
// src/components/radio/components/radio.tsx
|
|
3496
|
-
import { Box as Box25, Radio as ChakraRadio, Text as
|
|
3480
|
+
import { Box as Box25, Radio as ChakraRadio, Text as Text13 } from "@chakra-ui/react";
|
|
3497
3481
|
import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3498
3482
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
|
3499
3483
|
const variant = isError ? "errors" : "unstyled";
|
|
3500
3484
|
return /* @__PURE__ */ jsxs23(Box25, { children: [
|
|
3501
|
-
/* @__PURE__ */ jsx50(Box25, { display: "flex", children: /* @__PURE__ */ jsx50(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx50(
|
|
3502
|
-
isError && errorText ? /* @__PURE__ */ jsx50(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx50(
|
|
3485
|
+
/* @__PURE__ */ jsx50(Box25, { display: "flex", children: /* @__PURE__ */ jsx50(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx50(Text13, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
|
3486
|
+
isError && errorText ? /* @__PURE__ */ jsx50(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx50(Text13, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ jsx50(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx50(Text13, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
|
3503
3487
|
] });
|
|
3504
3488
|
};
|
|
3505
3489
|
Radio.displayName = "Radio";
|
|
@@ -3868,6 +3852,9 @@ function selectStyles(colorMode, _isError) {
|
|
|
3868
3852
|
placeholder: (base) => {
|
|
3869
3853
|
return { ...base, ...selectStyle, color: "var(--chakra-colors-black-low)" };
|
|
3870
3854
|
},
|
|
3855
|
+
clearIndicator: (base) => {
|
|
3856
|
+
return { ...base, cursor: "pointer" };
|
|
3857
|
+
},
|
|
3871
3858
|
multiValue: (base) => {
|
|
3872
3859
|
return {
|
|
3873
3860
|
...base,
|
|
@@ -3925,10 +3912,11 @@ function Select2({
|
|
|
3925
3912
|
...rest
|
|
3926
3913
|
}) {
|
|
3927
3914
|
const { colorMode } = useColorMode3();
|
|
3928
|
-
const { components } = rest;
|
|
3915
|
+
const { components, value, onChange } = rest;
|
|
3929
3916
|
return /* @__PURE__ */ jsx53(
|
|
3930
3917
|
ReactSelect,
|
|
3931
3918
|
{
|
|
3919
|
+
"data-test-id": "",
|
|
3932
3920
|
classNamePrefix: "react-select",
|
|
3933
3921
|
components: {
|
|
3934
3922
|
DropdownIndicator,
|
|
@@ -3937,6 +3925,8 @@ function Select2({
|
|
|
3937
3925
|
MultiValueRemove,
|
|
3938
3926
|
...components
|
|
3939
3927
|
},
|
|
3928
|
+
value,
|
|
3929
|
+
onChange,
|
|
3940
3930
|
styles: { ...selectStyles(colorMode, isError) },
|
|
3941
3931
|
theme: themeSelect,
|
|
3942
3932
|
...rest
|
|
@@ -4014,7 +4004,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
|
4014
4004
|
}
|
|
4015
4005
|
|
|
4016
4006
|
// src/components/select/components/select-with-checkbox.tsx
|
|
4017
|
-
import { Checkbox as Checkbox3, Flex as Flex12, Text as
|
|
4007
|
+
import { Checkbox as Checkbox3, Flex as Flex12, Text as Text14 } from "@chakra-ui/react";
|
|
4018
4008
|
import { useColorMode as useColorMode7 } from "@chakra-ui/system";
|
|
4019
4009
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
|
4020
4010
|
import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
@@ -4095,7 +4085,7 @@ var InputOption = ({
|
|
|
4095
4085
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
|
4096
4086
|
}
|
|
4097
4087
|
) : /* @__PURE__ */ jsx57(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
|
|
4098
|
-
/* @__PURE__ */ jsx57(
|
|
4088
|
+
/* @__PURE__ */ jsx57(Text14, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
|
4099
4089
|
]
|
|
4100
4090
|
}
|
|
4101
4091
|
)
|
|
@@ -4108,21 +4098,24 @@ var SelectWithCheckboxBase = ({
|
|
|
4108
4098
|
isError = false,
|
|
4109
4099
|
components,
|
|
4110
4100
|
options,
|
|
4101
|
+
onChange,
|
|
4102
|
+
value,
|
|
4111
4103
|
...rest
|
|
4112
4104
|
}) => {
|
|
4113
4105
|
const { colorMode } = useColorMode7();
|
|
4114
4106
|
return /* @__PURE__ */ jsx57(
|
|
4115
4107
|
ReactSelect2,
|
|
4116
4108
|
{
|
|
4109
|
+
"data-test-id": "",
|
|
4117
4110
|
classNamePrefix: "react-select",
|
|
4118
4111
|
options,
|
|
4112
|
+
value,
|
|
4113
|
+
onChange,
|
|
4119
4114
|
styles: { ...selectStyles(colorMode, !!isError) },
|
|
4120
4115
|
theme: themeSelect,
|
|
4121
4116
|
closeMenuOnSelect: false,
|
|
4122
4117
|
hideSelectedOptions: false,
|
|
4123
|
-
components
|
|
4124
|
-
...components
|
|
4125
|
-
},
|
|
4118
|
+
components,
|
|
4126
4119
|
...rest
|
|
4127
4120
|
}
|
|
4128
4121
|
);
|
|
@@ -4130,24 +4123,29 @@ var SelectWithCheckboxBase = ({
|
|
|
4130
4123
|
var SelectCheckbox = (props) => {
|
|
4131
4124
|
const { isMulti, options, value, components, ...rest } = props;
|
|
4132
4125
|
const selectValue = value || [];
|
|
4126
|
+
const defaultComponents = {
|
|
4127
|
+
DropdownIndicator,
|
|
4128
|
+
ClearIndicator,
|
|
4129
|
+
MultiValue,
|
|
4130
|
+
MultiValueRemove,
|
|
4131
|
+
Option: (optionProps) => {
|
|
4132
|
+
const { isSelected, data } = optionProps;
|
|
4133
|
+
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
|
4134
|
+
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
|
4135
|
+
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
|
4136
|
+
return /* @__PURE__ */ jsx57(InputOption, { ...optionProps, checkedState });
|
|
4137
|
+
}
|
|
4138
|
+
};
|
|
4133
4139
|
return /* @__PURE__ */ jsx57(
|
|
4134
4140
|
SelectWithCheckboxBase,
|
|
4135
4141
|
{
|
|
4142
|
+
"data-test-id": "",
|
|
4136
4143
|
isMulti,
|
|
4137
4144
|
options,
|
|
4145
|
+
value,
|
|
4138
4146
|
components: {
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
MultiValue,
|
|
4142
|
-
MultiValueRemove,
|
|
4143
|
-
...components,
|
|
4144
|
-
Option: (optionProps) => {
|
|
4145
|
-
const { isSelected, data } = optionProps;
|
|
4146
|
-
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
|
4147
|
-
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
|
4148
|
-
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
|
4149
|
-
return /* @__PURE__ */ jsx57(InputOption, { ...optionProps, checkedState });
|
|
4150
|
-
}
|
|
4147
|
+
...defaultComponents,
|
|
4148
|
+
...components
|
|
4151
4149
|
},
|
|
4152
4150
|
...rest
|
|
4153
4151
|
}
|
|
@@ -4182,7 +4180,7 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
|
4182
4180
|
Sidebar.displayName = "Sidebar";
|
|
4183
4181
|
|
|
4184
4182
|
// src/components/sidebar/components/sidebar-header.tsx
|
|
4185
|
-
import { Box as Box27, Flex as Flex14, Text as
|
|
4183
|
+
import { Box as Box27, Flex as Flex14, Text as Text15 } from "@chakra-ui/react";
|
|
4186
4184
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
|
4187
4185
|
import { AnimatePresence, motion as motion2 } from "framer-motion";
|
|
4188
4186
|
import { jsx as jsx59, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
@@ -4220,7 +4218,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
|
4220
4218
|
}
|
|
4221
4219
|
),
|
|
4222
4220
|
/* @__PURE__ */ jsx59(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx59(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx59(
|
|
4223
|
-
|
|
4221
|
+
Text15,
|
|
4224
4222
|
{
|
|
4225
4223
|
as: motion2.div,
|
|
4226
4224
|
w: "max-content",
|
|
@@ -4258,7 +4256,7 @@ import {
|
|
|
4258
4256
|
PopoverHeader as PopoverHeader2,
|
|
4259
4257
|
PopoverTrigger as PopoverTrigger6,
|
|
4260
4258
|
Portal as Portal4,
|
|
4261
|
-
Text as
|
|
4259
|
+
Text as Text16
|
|
4262
4260
|
} from "@chakra-ui/react";
|
|
4263
4261
|
import * as Icon8 from "@ctlyst.id/internal-icon";
|
|
4264
4262
|
import { motion as motion3 } from "framer-motion";
|
|
@@ -4309,7 +4307,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
4309
4307
|
animate: { opacity: 1, x: 0 },
|
|
4310
4308
|
exit: { opacity: 0, x: 16 },
|
|
4311
4309
|
children: [
|
|
4312
|
-
/* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx60(
|
|
4310
|
+
/* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx60(Text16, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
|
4313
4311
|
!!item.children.length && /* @__PURE__ */ jsx60(
|
|
4314
4312
|
Box28,
|
|
4315
4313
|
{
|
|
@@ -4365,7 +4363,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
4365
4363
|
...itemStyles,
|
|
4366
4364
|
children: [
|
|
4367
4365
|
mappingIcon2 && /* @__PURE__ */ jsx60(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
|
4368
|
-
/* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx60(
|
|
4366
|
+
/* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx60(Text16, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
|
4369
4367
|
]
|
|
4370
4368
|
},
|
|
4371
4369
|
item.id
|
|
@@ -4584,7 +4582,7 @@ import {
|
|
|
4584
4582
|
} from "@chakra-ui/react";
|
|
4585
4583
|
|
|
4586
4584
|
// src/components/text/index.ts
|
|
4587
|
-
import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as
|
|
4585
|
+
import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text17, TextProps } from "@chakra-ui/react";
|
|
4588
4586
|
|
|
4589
4587
|
// src/components/toast/components/toast.tsx
|
|
4590
4588
|
import { chakra as chakra7, Flex as Flex17, Link as Link6, useToken } from "@chakra-ui/react";
|
|
@@ -4753,11 +4751,11 @@ import {
|
|
|
4753
4751
|
Image as ChakraImage,
|
|
4754
4752
|
ListItem as ListItem2,
|
|
4755
4753
|
RequiredIndicator as RequiredIndicator2,
|
|
4756
|
-
Text as
|
|
4754
|
+
Text as Text18,
|
|
4757
4755
|
UnorderedList as UnorderedList2
|
|
4758
4756
|
} from "@chakra-ui/react";
|
|
4759
4757
|
import { Close as X, Plus } from "@ctlyst.id/internal-icon";
|
|
4760
|
-
import { useCallback as useCallback2, useEffect as useEffect2, useRef
|
|
4758
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useRef, useState as useState4 } from "react";
|
|
4761
4759
|
import { useDropzone } from "react-dropzone";
|
|
4762
4760
|
|
|
4763
4761
|
// src/components/uploader/constants.ts
|
|
@@ -4817,7 +4815,7 @@ var Uploader = ({
|
|
|
4817
4815
|
size: size2 = "lg",
|
|
4818
4816
|
...props
|
|
4819
4817
|
}) => {
|
|
4820
|
-
const inputRef =
|
|
4818
|
+
const inputRef = useRef(null);
|
|
4821
4819
|
const [filePreview, setFilePreview] = useState4();
|
|
4822
4820
|
const toast2 = useToast();
|
|
4823
4821
|
const handleRejection = useCallback2(
|
|
@@ -4880,7 +4878,7 @@ var Uploader = ({
|
|
|
4880
4878
|
}
|
|
4881
4879
|
return helperText;
|
|
4882
4880
|
};
|
|
4883
|
-
const renderErrorText = (text2) => /* @__PURE__ */ jsx65(Box29, { mb: 2, children: /* @__PURE__ */ jsx65(
|
|
4881
|
+
const renderErrorText = (text2) => /* @__PURE__ */ jsx65(Box29, { mb: 2, children: /* @__PURE__ */ jsx65(Text18, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
|
4884
4882
|
const handleRemove = (e) => {
|
|
4885
4883
|
e.stopPropagation();
|
|
4886
4884
|
setFilePreview(void 0);
|
|
@@ -4973,7 +4971,7 @@ var Uploader = ({
|
|
|
4973
4971
|
...getInputProps()
|
|
4974
4972
|
}
|
|
4975
4973
|
),
|
|
4976
|
-
isDragActive ? /* @__PURE__ */ jsx65(
|
|
4974
|
+
isDragActive ? /* @__PURE__ */ jsx65(Text18, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs30(Flex18, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
|
4977
4975
|
size2 === "sm" && /* @__PURE__ */ jsx65(Plus, { size: 6, color }),
|
|
4978
4976
|
/* @__PURE__ */ jsxs30(Box29, { children: [
|
|
4979
4977
|
!filePreview && /* @__PURE__ */ jsx65(
|
|
@@ -4986,7 +4984,7 @@ var Uploader = ({
|
|
|
4986
4984
|
children: uploadFileText && size2 === "lg" ? messages.uploadFile : "Upload"
|
|
4987
4985
|
}
|
|
4988
4986
|
),
|
|
4989
|
-
size2 === "lg" && /* @__PURE__ */ jsx65(
|
|
4987
|
+
size2 === "lg" && /* @__PURE__ */ jsx65(Text18, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
|
4990
4988
|
] })
|
|
4991
4989
|
] })
|
|
4992
4990
|
] })
|
|
@@ -6705,7 +6703,7 @@ import { useMemo as useMemo5 } from "react";
|
|
|
6705
6703
|
|
|
6706
6704
|
// src/provider/components/provider.tsx
|
|
6707
6705
|
import axios from "axios";
|
|
6708
|
-
import { createContext as createContext2, useContext, useEffect as useEffect3, useMemo as useMemo4, useRef as
|
|
6706
|
+
import { createContext as createContext2, useContext, useEffect as useEffect3, useMemo as useMemo4, useRef as useRef2 } from "react";
|
|
6709
6707
|
import { ToastContainer as ToastContainer2 } from "react-toastify";
|
|
6710
6708
|
import { jsx as jsx66, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6711
6709
|
var ProviderContext = createContext2({
|
|
@@ -6716,7 +6714,7 @@ var useInternalUI = () => {
|
|
|
6716
6714
|
return { instance };
|
|
6717
6715
|
};
|
|
6718
6716
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
|
6719
|
-
const instanceRef =
|
|
6717
|
+
const instanceRef = useRef2(axios.create(config2));
|
|
6720
6718
|
useEffect3(() => {
|
|
6721
6719
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
|
6722
6720
|
instanceRef.current.interceptors.request.use(interceptor);
|
|
@@ -7044,7 +7042,7 @@ export {
|
|
|
7044
7042
|
TabsProvider,
|
|
7045
7043
|
Tbody2 as Tbody,
|
|
7046
7044
|
Td2 as Td,
|
|
7047
|
-
|
|
7045
|
+
Text17 as Text,
|
|
7048
7046
|
TextProps,
|
|
7049
7047
|
textarea_default as TextareaField,
|
|
7050
7048
|
Th2 as Th,
|