@ctlyst.id/internal-ui 3.1.6 → 3.1.8

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.mjs CHANGED
@@ -926,25 +926,18 @@ 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
933
  import { useRef } from "react";
947
934
  import { jsx as jsx24, jsxs as jsxs8 } from "react/jsx-runtime";
935
+ var isCellDisabled = (row, cellId) => {
936
+ if (row.disabled) {
937
+ return row.disabled[cellId];
938
+ }
939
+ return false;
940
+ };
948
941
  var getCommonPinningStyles = (column) => {
949
942
  const isPinned = column.getIsPinned();
950
943
  const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
@@ -1076,148 +1069,145 @@ var useDataTable = ({
1076
1069
  generateColumn
1077
1070
  };
1078
1071
  };
1079
- var DataTable = React5.forwardRef(
1080
- (props, ref) => {
1081
- const { isLoading, styles, headerSticky, onRowClick, container } = props;
1082
- const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
1083
- React5.useImperativeHandle(ref, () => ({
1084
- toggleAllRowsSelected
1085
- }));
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
- /* @__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
- Th,
1089
- {
1090
- colSpan: header.colSpan,
1091
- width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
1092
- ...styles == null ? void 0 : styles.tableColumnHeader,
1093
- children: /* @__PURE__ */ jsx24(
1094
- Flex2,
1072
+ var DataTable = React5.forwardRef((props, ref) => {
1073
+ const { isLoading, styles, headerSticky, onRowClick, container } = props;
1074
+ const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
1075
+ React5.useImperativeHandle(ref, () => ({
1076
+ toggleAllRowsSelected
1077
+ }));
1078
+ 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: [
1079
+ /* @__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(
1080
+ Th,
1081
+ {
1082
+ colSpan: header.colSpan,
1083
+ width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
1084
+ ...styles == null ? void 0 : styles.tableColumnHeader,
1085
+ children: /* @__PURE__ */ jsx24(
1086
+ Flex2,
1087
+ {
1088
+ "data-test-id": "CT_component_data-table_loader",
1089
+ textTransform: "capitalize",
1090
+ align: "center",
1091
+ gap: 2,
1092
+ children: flexRender(header.column.columnDef.header, header.getContext())
1093
+ }
1094
+ )
1095
+ },
1096
+ header.id
1097
+ )) }, headerGroup.id)) }),
1098
+ /* @__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)) })
1099
+ ] }) : /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, children: [
1100
+ /* @__PURE__ */ jsx24(
1101
+ Thead,
1102
+ {
1103
+ maxH: "50px",
1104
+ ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
1105
+ 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) => {
1106
+ var _a;
1107
+ return /* @__PURE__ */ jsx24(
1108
+ Th,
1095
1109
  {
1096
- "data-test-id": "CT_component_data-table_loader",
1097
- textTransform: "capitalize",
1098
- align: "center",
1099
- gap: 2,
1100
- children: flexRender(header.column.columnDef.header, header.getContext())
1101
- }
1102
- )
1103
- },
1104
- header.id
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: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i) }, i)) }, num)) })
1107
- ] }) : /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, children: [
1108
- /* @__PURE__ */ jsx24(
1109
- Thead,
1110
+ colSpan: header.colSpan,
1111
+ sx: getCommonPinningStyles(header.column),
1112
+ width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
1113
+ ...styles == null ? void 0 : styles.tableColumnHeader,
1114
+ children: /* @__PURE__ */ jsxs8(
1115
+ Flex2,
1116
+ {
1117
+ backgroundColor: "white",
1118
+ height: "100%",
1119
+ "data-test-id": `CT_Container_TableHeader_${header.id}`,
1120
+ textTransform: "capitalize",
1121
+ userSelect: "none",
1122
+ align: "center",
1123
+ gap: 2,
1124
+ children: [
1125
+ flexRender(header.column.columnDef.header, header.getContext()),
1126
+ /* @__PURE__ */ jsx24(
1127
+ Box11,
1128
+ {
1129
+ as: "span",
1130
+ cursor: header.column.getCanSort() ? "pointer" : "default",
1131
+ "data-test-id": `CT_Container_SortingIcon_${header.id}`,
1132
+ onClick: header.column.getToggleSortingHandler(),
1133
+ children: (_a = header.column.getCanSort() && {
1134
+ asc: /* @__PURE__ */ jsx24(ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
1135
+ desc: /* @__PURE__ */ jsx24(ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
1136
+ }[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */ jsx24(Box11, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ jsx24(UpDownIcon, { color: "neutral.500" }) })
1137
+ }
1138
+ )
1139
+ ]
1140
+ }
1141
+ )
1142
+ },
1143
+ header.id
1144
+ );
1145
+ }) }, headerGroup.id))
1146
+ }
1147
+ ),
1148
+ /* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
1149
+ const trRef = useRef();
1150
+ return /* @__PURE__ */ jsx24(
1151
+ Tr,
1110
1152
  {
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) => {
1153
+ "data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
1154
+ tabindex: "0",
1155
+ ref: trRef,
1156
+ ...styles == null ? void 0 : styles.tableRow,
1157
+ css: css`
1158
+ &:last-child {
1159
+ td {
1160
+ border-bottom: none;
1161
+ }
1162
+ }
1163
+ `,
1164
+ onMouseDown: () => {
1114
1165
  var _a;
1166
+ (_a = trRef.current) == null ? void 0 : _a.setAttribute("data-active", "true");
1167
+ },
1168
+ onMouseUp: () => {
1169
+ var _a;
1170
+ (_a = trRef.current) == null ? void 0 : _a.removeAttribute("data-active");
1171
+ },
1172
+ onClick: () => {
1173
+ if (onRowClick) {
1174
+ onRowClick(row.original);
1175
+ }
1176
+ },
1177
+ children: row.getVisibleCells().map((cell) => {
1178
+ const isDisabled = isCellDisabled(row.original, cell.column.id);
1115
1179
  return /* @__PURE__ */ jsx24(
1116
- Th,
1180
+ Td,
1117
1181
  {
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(
1182
+ "data-test-id": `CT_Component_TableCell_${cell.id}`,
1183
+ fontSize: "text.sm",
1184
+ sx: getCommonPinningStyles(cell.column),
1185
+ ...styles == null ? void 0 : styles.tableCell,
1186
+ children: /* @__PURE__ */ jsx24(Flex2, { height: "100%", align: "center", opacity: isDisabled ? 0.5 : 1, children: /* @__PURE__ */ jsx24(
1123
1187
  Flex2,
1124
1188
  {
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
- ]
1189
+ tabIndex: 0,
1190
+ display: "inline-flex",
1191
+ cursor: "auto",
1192
+ "data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
1193
+ onMouseUp: (e) => e.stopPropagation(),
1194
+ onMouseDown: (e) => e.stopPropagation(),
1195
+ onClick: (e) => {
1196
+ e.stopPropagation();
1197
+ },
1198
+ children: flexRender(cell.column.columnDef.cell, cell.getContext())
1148
1199
  }
1149
- )
1200
+ ) })
1150
1201
  },
1151
- header.id
1202
+ cell.id
1152
1203
  );
1153
- }) }, headerGroup.id))
1154
- }
1155
- ),
1156
- /* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
1157
- const trRef = useRef();
1158
- return /* @__PURE__ */ jsx24(
1159
- Tr,
1160
- {
1161
- "data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
1162
- tabindex: "0",
1163
- ref: trRef,
1164
- ...styles == null ? void 0 : styles.tableRow,
1165
- css: css`
1166
- &:last-child {
1167
- td {
1168
- border-bottom: none;
1169
- }
1170
- }
1171
- `,
1172
- onMouseDown: () => {
1173
- var _a;
1174
- (_a = trRef.current) == null ? void 0 : _a.setAttribute("data-active", "true");
1175
- },
1176
- onMouseUp: () => {
1177
- var _a;
1178
- (_a = trRef.current) == null ? void 0 : _a.removeAttribute("data-active");
1179
- },
1180
- onClick: () => {
1181
- if (onRowClick) {
1182
- onRowClick(row.original);
1183
- }
1184
- },
1185
- children: row.getVisibleCells().map((cell) => {
1186
- var _a, _b;
1187
- const isDisabled = (_b = (_a = cell.row.original) == null ? void 0 : _a.disabled) == null ? void 0 : _b[cell.column.id];
1188
- return /* @__PURE__ */ jsx24(
1189
- Td,
1190
- {
1191
- "data-test-id": `CT_Component_TableCell_${cell.id}`,
1192
- fontSize: "text.sm",
1193
- sx: getCommonPinningStyles(cell.column),
1194
- ...styles == null ? void 0 : styles.tableCell,
1195
- children: /* @__PURE__ */ jsx24(Flex2, { height: "100%", align: "center", opacity: isDisabled ? 0.5 : 1, children: /* @__PURE__ */ jsx24(
1196
- Flex2,
1197
- {
1198
- tabIndex: 0,
1199
- display: "inline-flex",
1200
- cursor: "auto",
1201
- "data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
1202
- onMouseUp: (e) => e.stopPropagation(),
1203
- onMouseDown: (e) => e.stopPropagation(),
1204
- onClick: (e) => {
1205
- e.stopPropagation();
1206
- },
1207
- children: flexRender(cell.column.columnDef.cell, cell.getContext())
1208
- }
1209
- ) })
1210
- },
1211
- cell.id
1212
- );
1213
- })
1214
- },
1215
- row.id
1216
- );
1217
- }) })
1218
- ] }) });
1219
- }
1220
- );
1204
+ })
1205
+ },
1206
+ row.id
1207
+ );
1208
+ }) })
1209
+ ] }) });
1210
+ });
1221
1211
  var data_table_default = DataTable;
1222
1212
 
1223
1213
  // src/components/datepicker/components/datepicker.tsx
@@ -2087,7 +2077,7 @@ var Styles = ({ showHeader }) => {
2087
2077
  var styles_default = Styles;
2088
2078
 
2089
2079
  // src/components/datepicker/components/time-input.tsx
2090
- import { Flex as Flex3, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as Text5 } from "@chakra-ui/react";
2080
+ import { Flex as Flex3, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as Text4 } from "@chakra-ui/react";
2091
2081
  import React6 from "react";
2092
2082
  import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
2093
2083
  var TimeInput = ({ value, onChange, label, rightAddon }) => {
@@ -2098,7 +2088,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
2098
2088
  if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
2099
2089
  };
2100
2090
  return /* @__PURE__ */ jsxs9(Flex3, { flexDir: "column", p: 4, pt: 0, children: [
2101
- /* @__PURE__ */ jsx26(Text5, { mb: 2, children: label }),
2091
+ /* @__PURE__ */ jsx26(Text4, { mb: 2, children: label }),
2102
2092
  /* @__PURE__ */ jsxs9(InputGroup3, { alignItems: "center", borderColor: "neutral.400", children: [
2103
2093
  /* @__PURE__ */ jsx26(
2104
2094
  Input,
@@ -2339,7 +2329,7 @@ MultiDatePickerMonth.defaultProps = {
2339
2329
  var multi_datepicker_month_default = MultiDatePickerMonth;
2340
2330
 
2341
2331
  // src/components/dialog/components/dialog.tsx
2342
- import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text as Text6 } from "@chakra-ui/react";
2332
+ import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text as Text5 } from "@chakra-ui/react";
2343
2333
  import { jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
2344
2334
  var Dialog = ({
2345
2335
  title,
@@ -2353,7 +2343,7 @@ var Dialog = ({
2353
2343
  return /* @__PURE__ */ jsxs12(Modal, { ...props, children: [
2354
2344
  isModalOverlay && /* @__PURE__ */ jsx30(ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
2355
2345
  /* @__PURE__ */ jsxs12(ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
2356
- /* @__PURE__ */ jsx30(ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ jsx30(Text6, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
2346
+ /* @__PURE__ */ jsx30(ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ jsx30(Text5, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
2357
2347
  /* @__PURE__ */ jsx30(ModalBody, { p: 4, textStyle: "text.md", children: content }),
2358
2348
  /* @__PURE__ */ jsx30(ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
2359
2349
  ] })
@@ -2370,7 +2360,7 @@ var dialog_default = Dialog;
2370
2360
  import * as Icon2 from "@ctlyst.id/internal-icon";
2371
2361
 
2372
2362
  // src/components/empty-state/components/layout.tsx
2373
- import { Box as Box14, Button as Button2, Flex as Flex4, Text as Text7, VStack } from "@chakra-ui/react";
2363
+ import { Box as Box14, Button as Button2, Flex as Flex4, Text as Text6, VStack } from "@chakra-ui/react";
2374
2364
  import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
2375
2365
  var EmptyState = (props) => {
2376
2366
  const { icon, title, description, buttonText, onClick } = props;
@@ -2382,8 +2372,8 @@ var EmptyState = (props) => {
2382
2372
  return /* @__PURE__ */ jsx31(Flex4, { align: "center", justify: "center", children: /* @__PURE__ */ jsxs13(VStack, { textAlign: "center", children: [
2383
2373
  icon,
2384
2374
  /* @__PURE__ */ jsxs13(VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
2385
- /* @__PURE__ */ jsx31(Text7, { textStyle: "text.lg", fontWeight: "bold", children: title }),
2386
- /* @__PURE__ */ jsx31(Text7, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
2375
+ /* @__PURE__ */ jsx31(Text6, { textStyle: "text.lg", fontWeight: "bold", children: title }),
2376
+ /* @__PURE__ */ jsx31(Text6, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
2387
2377
  ] }),
2388
2378
  buttonText && /* @__PURE__ */ jsx31(Box14, { mt: 3, children: /* @__PURE__ */ jsx31(Button2, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
2389
2379
  ] }) });
@@ -2503,7 +2493,7 @@ import {
2503
2493
  PopoverBody as PopoverBody2,
2504
2494
  PopoverContent as PopoverContent2,
2505
2495
  PopoverTrigger as PopoverTrigger2,
2506
- Text as Text8,
2496
+ Text as Text7,
2507
2497
  useDisclosure,
2508
2498
  VStack as VStack2
2509
2499
  } from "@chakra-ui/react";
@@ -2635,10 +2625,10 @@ var Profile = ({
2635
2625
  ...props,
2636
2626
  children: /* @__PURE__ */ jsxs15(HStack2, { children: [
2637
2627
  /* @__PURE__ */ jsxs15(VStack2, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
2638
- /* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
2628
+ /* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
2639
2629
  /* @__PURE__ */ jsxs15(Flex5, { alignItems: "center", children: [
2640
2630
  (data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsxs15(Fragment4, { children: [
2641
- /* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
2631
+ /* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
2642
2632
  !!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ jsx36(
2643
2633
  Box16,
2644
2634
  {
@@ -2651,7 +2641,7 @@ var Profile = ({
2651
2641
  )
2652
2642
  ] }),
2653
2643
  typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ jsxs15(Flex5, { align: "center", justify: "center", children: [
2654
- /* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", children: data.office[0] }),
2644
+ /* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", children: data.office[0] }),
2655
2645
  data.office.length > 1 && /* @__PURE__ */ jsx36(
2656
2646
  Tooltip,
2657
2647
  {
@@ -2659,8 +2649,8 @@ var Profile = ({
2659
2649
  hasArrow: true,
2660
2650
  p: "2",
2661
2651
  label: /* @__PURE__ */ jsxs15(Box16, { children: [
2662
- /* @__PURE__ */ jsx36(Text8, { children: "Akses Office:" }),
2663
- /* @__PURE__ */ jsx36(Text8, { children: data.office.sort().join(", ") })
2652
+ /* @__PURE__ */ jsx36(Text7, { children: "Akses Office:" }),
2653
+ /* @__PURE__ */ jsx36(Text7, { children: data.office.sort().join(", ") })
2664
2654
  ] }),
2665
2655
  textAlign: "left",
2666
2656
  placement: "bottom-end",
@@ -2688,7 +2678,7 @@ var Profile = ({
2688
2678
  ) })
2689
2679
  }
2690
2680
  )
2691
- ] }) : /* @__PURE__ */ jsx36(Text8, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
2681
+ ] }) : /* @__PURE__ */ jsx36(Text7, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
2692
2682
  ] })
2693
2683
  ] }),
2694
2684
  /* @__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 }) }) })
@@ -2699,7 +2689,7 @@ var Profile = ({
2699
2689
  /* @__PURE__ */ jsx36(PopoverArrow2, { bg: "white" }),
2700
2690
  /* @__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: [
2701
2691
  /* @__PURE__ */ jsx36(FiPower, {}),
2702
- /* @__PURE__ */ jsx36(Text8, { ml: "2", children: "Logout" })
2692
+ /* @__PURE__ */ jsx36(Text7, { ml: "2", children: "Logout" })
2703
2693
  ] }) }) })
2704
2694
  ] })
2705
2695
  ] });
@@ -2983,7 +2973,7 @@ import {
2983
2973
  PopoverContent as PopoverContent3,
2984
2974
  PopoverTrigger as PopoverTrigger3,
2985
2975
  Portal as Portal2,
2986
- Text as Text9,
2976
+ Text as Text8,
2987
2977
  useColorModeValue as useColorModeValue3
2988
2978
  } from "@chakra-ui/react";
2989
2979
  import * as Icon5 from "@ctlyst.id/internal-icon";
@@ -3088,7 +3078,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
3088
3078
  py: 4,
3089
3079
  children: [
3090
3080
  mappingIcon.get(navigation.title),
3091
- /* @__PURE__ */ jsx43(Text9, { fontSize: "text.sm", ml: 3, children: title }),
3081
+ /* @__PURE__ */ jsx43(Text8, { fontSize: "text.sm", ml: 3, children: title }),
3092
3082
  isActiveSub && /* @__PURE__ */ jsx43(
3093
3083
  Box21,
3094
3084
  {
@@ -3123,7 +3113,7 @@ Navigation.defaultProps = {
3123
3113
  var navigation_default = Navigation;
3124
3114
 
3125
3115
  // src/components/navigation/components/navigation-bar.tsx
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";
3116
+ 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";
3127
3117
  import * as Icon6 from "@ctlyst.id/internal-icon";
3128
3118
  import { Fragment as Fragment7, jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
3129
3119
  var NavigationBar = ({
@@ -3194,7 +3184,7 @@ var NavigationBar = ({
3194
3184
  "data-test-id": `CT_component_navigation_link-${item.id}`,
3195
3185
  children: [
3196
3186
  mappingIcon2.get(item.title),
3197
- /* @__PURE__ */ jsx44(Text10, { textStyle: "text-sm", ml: 3, children: subMenu.title })
3187
+ /* @__PURE__ */ jsx44(Text9, { textStyle: "text-sm", ml: 3, children: subMenu.title })
3198
3188
  ]
3199
3189
  },
3200
3190
  subMenu.id
@@ -3211,7 +3201,7 @@ var navigation_bar_default = NavigationBar;
3211
3201
 
3212
3202
  // src/components/pagination/components/pagination.tsx
3213
3203
  import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon } from "@chakra-ui/icons";
3214
- import { Box as Box23, Text as Text11, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
3204
+ import { Box as Box23, Text as Text10, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
3215
3205
 
3216
3206
  // src/components/pagination/components/pagination-button.tsx
3217
3207
  import { Button as Button5, forwardRef as forwardRef9, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
@@ -3342,7 +3332,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
3342
3332
  "data-test-id": "Pagination-Button",
3343
3333
  isActive: page === current,
3344
3334
  onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
3345
- children: /* @__PURE__ */ jsx47(Text11, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
3335
+ children: /* @__PURE__ */ jsx47(Text10, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
3346
3336
  },
3347
3337
  page
3348
3338
  );
@@ -3380,7 +3370,7 @@ Pagination.displayName = "Pagination";
3380
3370
  var pagination_default = Pagination;
3381
3371
 
3382
3372
  // src/components/pagination/components/pagination-detail.tsx
3383
- import { Text as Text12 } from "@chakra-ui/react";
3373
+ import { Text as Text11 } from "@chakra-ui/react";
3384
3374
  import { jsx as jsx48 } from "react/jsx-runtime";
3385
3375
  var PaginationDetail = ({
3386
3376
  page,
@@ -3391,12 +3381,12 @@ var PaginationDetail = ({
3391
3381
  lineHeight = 18,
3392
3382
  ...rest
3393
3383
  }) => {
3394
- return /* @__PURE__ */ jsx48(Text12, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
3384
+ return /* @__PURE__ */ jsx48(Text11, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
3395
3385
  };
3396
3386
  var pagination_detail_default = PaginationDetail;
3397
3387
 
3398
3388
  // src/components/pagination/components/pagination-filter.tsx
3399
- import { Box as Box24, Select, Text as Text13, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
3389
+ import { Box as Box24, Select, Text as Text12, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
3400
3390
  import * as React9 from "react";
3401
3391
  import { FiChevronDown } from "react-icons/fi";
3402
3392
  import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
@@ -3409,7 +3399,7 @@ var PaginationFilter = ({
3409
3399
  }) => {
3410
3400
  const [value, setValue] = React9.useState(limit);
3411
3401
  return /* @__PURE__ */ jsxs22(Box24, { display: "flex", flexDirection: "row", alignItems: "center", children: [
3412
- /* @__PURE__ */ jsx49(Text13, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue6("neutral.900", "white"), ...rest, children: label }),
3402
+ /* @__PURE__ */ jsx49(Text12, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue6("neutral.900", "white"), ...rest, children: label }),
3413
3403
  /* @__PURE__ */ jsx49(
3414
3404
  Select,
3415
3405
  {
@@ -3490,13 +3480,13 @@ import {
3490
3480
  } from "@chakra-ui/react";
3491
3481
 
3492
3482
  // src/components/radio/components/radio.tsx
3493
- import { Box as Box25, Radio as ChakraRadio, Text as Text14 } from "@chakra-ui/react";
3483
+ import { Box as Box25, Radio as ChakraRadio, Text as Text13 } from "@chakra-ui/react";
3494
3484
  import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
3495
3485
  var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
3496
3486
  const variant = isError ? "errors" : "unstyled";
3497
3487
  return /* @__PURE__ */ jsxs23(Box25, { children: [
3498
- /* @__PURE__ */ jsx50(Box25, { display: "flex", children: /* @__PURE__ */ jsx50(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx50(Text14, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
3499
- isError && errorText ? /* @__PURE__ */ jsx50(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx50(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ jsx50(Box25, { mt: "2", ml: "6", children: /* @__PURE__ */ jsx50(Text14, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
3488
+ /* @__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 }) }) }),
3489
+ 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
3500
3490
  ] });
3501
3491
  };
3502
3492
  Radio.displayName = "Radio";
@@ -4011,7 +4001,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
4011
4001
  }
4012
4002
 
4013
4003
  // src/components/select/components/select-with-checkbox.tsx
4014
- import { Checkbox as Checkbox3, Flex as Flex12, Text as Text15 } from "@chakra-ui/react";
4004
+ import { Checkbox as Checkbox3, Flex as Flex12, Text as Text14 } from "@chakra-ui/react";
4015
4005
  import { useColorMode as useColorMode7 } from "@chakra-ui/system";
4016
4006
  import ReactSelect2, { components as ComponentRS } from "react-select";
4017
4007
  import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs24 } from "react/jsx-runtime";
@@ -4092,7 +4082,7 @@ var InputOption = ({
4092
4082
  "data-test-id": "CT_component_select-checkbox_select-all-option"
4093
4083
  }
4094
4084
  ) : /* @__PURE__ */ jsx57(Checkbox3, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
4095
- /* @__PURE__ */ jsx57(Text15, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
4085
+ /* @__PURE__ */ jsx57(Text14, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
4096
4086
  ]
4097
4087
  }
4098
4088
  )
@@ -4179,7 +4169,7 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
4179
4169
  Sidebar.displayName = "Sidebar";
4180
4170
 
4181
4171
  // src/components/sidebar/components/sidebar-header.tsx
4182
- import { Box as Box27, Flex as Flex14, Text as Text16 } from "@chakra-ui/react";
4172
+ import { Box as Box27, Flex as Flex14, Text as Text15 } from "@chakra-ui/react";
4183
4173
  import { ArrowRight } from "@ctlyst.id/internal-icon";
4184
4174
  import { AnimatePresence, motion as motion2 } from "framer-motion";
4185
4175
  import { jsx as jsx59, jsxs as jsxs25 } from "react/jsx-runtime";
@@ -4217,7 +4207,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
4217
4207
  }
4218
4208
  ),
4219
4209
  /* @__PURE__ */ jsx59(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx59(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx59(
4220
- Text16,
4210
+ Text15,
4221
4211
  {
4222
4212
  as: motion2.div,
4223
4213
  w: "max-content",
@@ -4255,7 +4245,7 @@ import {
4255
4245
  PopoverHeader as PopoverHeader2,
4256
4246
  PopoverTrigger as PopoverTrigger6,
4257
4247
  Portal as Portal4,
4258
- Text as Text17
4248
+ Text as Text16
4259
4249
  } from "@chakra-ui/react";
4260
4250
  import * as Icon8 from "@ctlyst.id/internal-icon";
4261
4251
  import { motion as motion3 } from "framer-motion";
@@ -4306,7 +4296,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
4306
4296
  animate: { opacity: 1, x: 0 },
4307
4297
  exit: { opacity: 0, x: 16 },
4308
4298
  children: [
4309
- /* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx60(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
4299
+ /* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx60(Text16, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
4310
4300
  !!item.children.length && /* @__PURE__ */ jsx60(
4311
4301
  Box28,
4312
4302
  {
@@ -4362,7 +4352,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
4362
4352
  ...itemStyles,
4363
4353
  children: [
4364
4354
  mappingIcon2 && /* @__PURE__ */ jsx60(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
4365
- /* @__PURE__ */ jsx60(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx60(Text17, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
4355
+ /* @__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 }) })
4366
4356
  ]
4367
4357
  },
4368
4358
  item.id
@@ -4581,7 +4571,7 @@ import {
4581
4571
  } from "@chakra-ui/react";
4582
4572
 
4583
4573
  // src/components/text/index.ts
4584
- import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text18, TextProps } from "@chakra-ui/react";
4574
+ import { Code, CodeProps, Heading, HeadingProps, Link as Link5, LinkProps, Text as Text17, TextProps } from "@chakra-ui/react";
4585
4575
 
4586
4576
  // src/components/toast/components/toast.tsx
4587
4577
  import { chakra as chakra7, Flex as Flex17, Link as Link6, useToken } from "@chakra-ui/react";
@@ -4750,7 +4740,7 @@ import {
4750
4740
  Image as ChakraImage,
4751
4741
  ListItem as ListItem2,
4752
4742
  RequiredIndicator as RequiredIndicator2,
4753
- Text as Text19,
4743
+ Text as Text18,
4754
4744
  UnorderedList as UnorderedList2
4755
4745
  } from "@chakra-ui/react";
4756
4746
  import { Close as X, Plus } from "@ctlyst.id/internal-icon";
@@ -4877,7 +4867,7 @@ var Uploader = ({
4877
4867
  }
4878
4868
  return helperText;
4879
4869
  };
4880
- const renderErrorText = (text2) => /* @__PURE__ */ jsx65(Box29, { mb: 2, children: /* @__PURE__ */ jsx65(Text19, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
4870
+ const renderErrorText = (text2) => /* @__PURE__ */ jsx65(Box29, { mb: 2, children: /* @__PURE__ */ jsx65(Text18, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
4881
4871
  const handleRemove = (e) => {
4882
4872
  e.stopPropagation();
4883
4873
  setFilePreview(void 0);
@@ -4970,7 +4960,7 @@ var Uploader = ({
4970
4960
  ...getInputProps()
4971
4961
  }
4972
4962
  ),
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: [
4963
+ 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: [
4974
4964
  size2 === "sm" && /* @__PURE__ */ jsx65(Plus, { size: 6, color }),
4975
4965
  /* @__PURE__ */ jsxs30(Box29, { children: [
4976
4966
  !filePreview && /* @__PURE__ */ jsx65(
@@ -4983,7 +4973,7 @@ var Uploader = ({
4983
4973
  children: uploadFileText && size2 === "lg" ? messages.uploadFile : "Upload"
4984
4974
  }
4985
4975
  ),
4986
- size2 === "lg" && /* @__PURE__ */ jsx65(Text19, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
4976
+ size2 === "lg" && /* @__PURE__ */ jsx65(Text18, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
4987
4977
  ] })
4988
4978
  ] })
4989
4979
  ] })
@@ -7041,7 +7031,7 @@ export {
7041
7031
  TabsProvider,
7042
7032
  Tbody2 as Tbody,
7043
7033
  Td2 as Td,
7044
- Text18 as Text,
7034
+ Text17 as Text,
7045
7035
  TextProps,
7046
7036
  textarea_default as TextareaField,
7047
7037
  Th2 as Th,
@@ -7095,7 +7085,10 @@ export {
7095
7085
  forwardRef12 as forwardRef,
7096
7086
  getSelectAllCheckboxState,
7097
7087
  getTheme,
7088
+ isCellDisabled,
7089
+ selectStyles,
7098
7090
  theme4 as theme,
7091
+ themeSelect,
7099
7092
  useAccordion,
7100
7093
  useAccordionContext,
7101
7094
  useAccordionItem,