@ctlyst.id/internal-ui 5.5.7 → 5.6.1
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.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +413 -361
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
@@ -1328,16 +1328,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1328
1328
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
1329
1329
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
1330
1330
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1331
|
-
children: /* @__PURE__ */ jsx24(
|
1332
|
-
Flex2,
|
1333
|
-
{
|
1334
|
-
"data-test-id": "CT_component_data-table_loader",
|
1335
|
-
textTransform: "capitalize",
|
1336
|
-
align: "center",
|
1337
|
-
gap: 2,
|
1338
|
-
children: flexRender(header.column.columnDef.header, header.getContext())
|
1339
|
-
}
|
1340
|
-
)
|
1331
|
+
children: /* @__PURE__ */ jsx24(Flex2, { "data-test-id": "CT_component_data-table_loader", align: "center", gap: 2, children: flexRender(header.column.columnDef.header, header.getContext()) })
|
1341
1332
|
},
|
1342
1333
|
header.id
|
1343
1334
|
)) }, headerGroup.id)) }),
|
@@ -1377,7 +1368,6 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1377
1368
|
backgroundColor: "white",
|
1378
1369
|
height: "100%",
|
1379
1370
|
"data-test-id": `CT_Container_TableHeader_${header.id}`,
|
1380
|
-
textTransform: "capitalize",
|
1381
1371
|
userSelect: "none",
|
1382
1372
|
align: "center",
|
1383
1373
|
gap: 2,
|
@@ -4411,6 +4401,60 @@ import { useColorMode as useColorMode2 } from "@chakra-ui/system";
|
|
4411
4401
|
import * as Icon7 from "@ctlyst.id/internal-icon";
|
4412
4402
|
import ReactSelect, { components as componentRS } from "react-select";
|
4413
4403
|
|
4404
|
+
// src/components/select/components/menu-list-virtualized.tsx
|
4405
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
4406
|
+
import { useRef as useRef3 } from "react";
|
4407
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
4408
|
+
var MenuListVirtualized = (props) => {
|
4409
|
+
const { children, estimateSize, overscan, ...virtualizerProps } = props;
|
4410
|
+
const childrenArr = Array.isArray(children) ? children : [children];
|
4411
|
+
const itemCount = childrenArr.length;
|
4412
|
+
const parentRef = useRef3(null);
|
4413
|
+
const rowVirtualizer = useVirtualizer({
|
4414
|
+
count: itemCount,
|
4415
|
+
getScrollElement: () => parentRef.current,
|
4416
|
+
estimateSize: estimateSize || (() => 42),
|
4417
|
+
overscan: overscan || 5,
|
4418
|
+
...virtualizerProps
|
4419
|
+
});
|
4420
|
+
return /* @__PURE__ */ jsx54(
|
4421
|
+
"div",
|
4422
|
+
{
|
4423
|
+
ref: parentRef,
|
4424
|
+
style: {
|
4425
|
+
height: `300px`,
|
4426
|
+
width: `100%`,
|
4427
|
+
overflow: "auto"
|
4428
|
+
},
|
4429
|
+
children: /* @__PURE__ */ jsx54(
|
4430
|
+
"div",
|
4431
|
+
{
|
4432
|
+
style: {
|
4433
|
+
height: `${rowVirtualizer.getTotalSize()}px`,
|
4434
|
+
width: "100%",
|
4435
|
+
position: "relative"
|
4436
|
+
},
|
4437
|
+
children: rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ jsx54(
|
4438
|
+
"div",
|
4439
|
+
{
|
4440
|
+
style: {
|
4441
|
+
position: "absolute",
|
4442
|
+
top: 0,
|
4443
|
+
left: 0,
|
4444
|
+
width: "100%",
|
4445
|
+
height: `${virtualRow.size}px`,
|
4446
|
+
transform: `translateY(${virtualRow.start}px)`
|
4447
|
+
},
|
4448
|
+
children: childrenArr[virtualRow.index]
|
4449
|
+
},
|
4450
|
+
virtualRow.index
|
4451
|
+
))
|
4452
|
+
}
|
4453
|
+
)
|
4454
|
+
}
|
4455
|
+
);
|
4456
|
+
};
|
4457
|
+
|
4414
4458
|
// src/config/theme/foundations/shadows.ts
|
4415
4459
|
import { theme } from "@chakra-ui/react";
|
4416
4460
|
var shadows = {
|
@@ -4783,22 +4827,22 @@ var themeSelect = (theme5) => {
|
|
4783
4827
|
};
|
4784
4828
|
|
4785
4829
|
// src/components/select/components/select.tsx
|
4786
|
-
import { jsx as
|
4830
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
4787
4831
|
function DropdownIndicator(props) {
|
4788
|
-
return /* @__PURE__ */
|
4832
|
+
return /* @__PURE__ */ jsx55(componentRS.DropdownIndicator, { ...props, children: /* @__PURE__ */ jsx55(Icon7.ChevronDown, { size: 4, color: "neutral.400" }) });
|
4789
4833
|
}
|
4790
4834
|
function ClearIndicator(props) {
|
4791
4835
|
const { hasValue } = props;
|
4792
|
-
return /* @__PURE__ */
|
4836
|
+
return /* @__PURE__ */ jsx55(componentRS.ClearIndicator, { ...props, children: /* @__PURE__ */ jsx55(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
4793
4837
|
}
|
4794
4838
|
function MultiValue(props) {
|
4795
|
-
return /* @__PURE__ */
|
4839
|
+
return /* @__PURE__ */ jsx55(componentRS.MultiValue, { ...props, children: /* @__PURE__ */ jsx55(Badge2, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4796
4840
|
}
|
4797
4841
|
function MultiValueRemove(props) {
|
4798
|
-
return /* @__PURE__ */
|
4842
|
+
return /* @__PURE__ */ jsx55(componentRS.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx55(Flex11, { align: "center", justify: "center", children: /* @__PURE__ */ jsx55(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
4799
4843
|
}
|
4800
4844
|
function NoOptionsMessage(props) {
|
4801
|
-
return /* @__PURE__ */
|
4845
|
+
return /* @__PURE__ */ jsx55(Center2, { textStyle: "text.xs", py: "1.5", color: "black.medium", children: (props == null ? void 0 : props.options.length) === 0 ? "Opsi tidak tersedia" : "Hasil tidak ditemukan" });
|
4802
4846
|
}
|
4803
4847
|
function Select2({
|
4804
4848
|
styles,
|
@@ -4806,8 +4850,9 @@ function Select2({
|
|
4806
4850
|
...rest
|
4807
4851
|
}) {
|
4808
4852
|
const { colorMode } = useColorMode2();
|
4809
|
-
const { components, value, onChange } = rest;
|
4810
|
-
|
4853
|
+
const { components, value, onChange, virtualized } = rest;
|
4854
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ jsx55(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
4855
|
+
return /* @__PURE__ */ jsx55(
|
4811
4856
|
ReactSelect,
|
4812
4857
|
{
|
4813
4858
|
"data-test-id": "",
|
@@ -4818,6 +4863,9 @@ function Select2({
|
|
4818
4863
|
MultiValue,
|
4819
4864
|
MultiValueRemove,
|
4820
4865
|
NoOptionsMessage,
|
4866
|
+
...virtualized ? {
|
4867
|
+
MenuList: renderMenuListVirtualized
|
4868
|
+
} : {},
|
4821
4869
|
...components
|
4822
4870
|
},
|
4823
4871
|
value,
|
@@ -4834,7 +4882,7 @@ var select_default = Select2;
|
|
4834
4882
|
// src/components/select/components/select-async.tsx
|
4835
4883
|
import { useColorMode as useColorMode3 } from "@chakra-ui/system";
|
4836
4884
|
import { AsyncPaginate } from "react-select-async-paginate";
|
4837
|
-
import { jsx as
|
4885
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
4838
4886
|
function SelectAsync({
|
4839
4887
|
styles,
|
4840
4888
|
isError = false,
|
@@ -4842,7 +4890,7 @@ function SelectAsync({
|
|
4842
4890
|
}) {
|
4843
4891
|
const { colorMode } = useColorMode3();
|
4844
4892
|
const { components } = rest;
|
4845
|
-
return /* @__PURE__ */
|
4893
|
+
return /* @__PURE__ */ jsx56(
|
4846
4894
|
AsyncPaginate,
|
4847
4895
|
{
|
4848
4896
|
classNamePrefix: "react-select",
|
@@ -4864,10 +4912,10 @@ var select_async_default = SelectAsync;
|
|
4864
4912
|
// src/components/select/components/select-async-creatable.tsx
|
4865
4913
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
4866
4914
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
4867
|
-
import { jsx as
|
4915
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
4868
4916
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
4869
4917
|
const { colorMode } = useColorMode4();
|
4870
|
-
return /* @__PURE__ */
|
4918
|
+
return /* @__PURE__ */ jsx57(
|
4871
4919
|
ReactSelectAsyncCreatable,
|
4872
4920
|
{
|
4873
4921
|
classNamePrefix: "react-select",
|
@@ -4887,10 +4935,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
4887
4935
|
// src/components/select/components/select-creatable.tsx
|
4888
4936
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
4889
4937
|
import ReactSelectCreatable from "react-select/creatable";
|
4890
|
-
import { jsx as
|
4938
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
4891
4939
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
4892
4940
|
const { colorMode } = useColorMode5();
|
4893
|
-
return /* @__PURE__ */
|
4941
|
+
return /* @__PURE__ */ jsx58(
|
4894
4942
|
ReactSelectCreatable,
|
4895
4943
|
{
|
4896
4944
|
classNamePrefix: "react-select",
|
@@ -4911,7 +4959,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
4911
4959
|
import { Checkbox as Checkbox2, Flex as Flex12, Text as Text14 } from "@chakra-ui/react";
|
4912
4960
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
4913
4961
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
4914
|
-
import { Fragment as Fragment8, jsx as
|
4962
|
+
import { Fragment as Fragment8, jsx as jsx59, jsxs as jsxs24 } from "react/jsx-runtime";
|
4915
4963
|
var CHECKBOX_STATE = {
|
4916
4964
|
UNCHECKED: 0,
|
4917
4965
|
INDETERMINATE: 1,
|
@@ -4959,7 +5007,7 @@ var InputOption = ({
|
|
4959
5007
|
style
|
4960
5008
|
};
|
4961
5009
|
return /* @__PURE__ */ jsxs24(Fragment8, { children: [
|
4962
|
-
/* @__PURE__ */
|
5010
|
+
/* @__PURE__ */ jsx59(
|
4963
5011
|
ComponentRS.Option,
|
4964
5012
|
{
|
4965
5013
|
isMulti: true,
|
@@ -4979,7 +5027,7 @@ var InputOption = ({
|
|
4979
5027
|
"data-test-id": "CT_component_select-checkbox_options",
|
4980
5028
|
cursor: isDisabled ? "not-allowed" : "default",
|
4981
5029
|
children: [
|
4982
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
5030
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx59(
|
4983
5031
|
Checkbox2,
|
4984
5032
|
{
|
4985
5033
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -4989,7 +5037,7 @@ var InputOption = ({
|
|
4989
5037
|
"data-test-id": "CT_component_select-checkbox_select-all-option",
|
4990
5038
|
isInvalid: false
|
4991
5039
|
}
|
4992
|
-
) : /* @__PURE__ */
|
5040
|
+
) : /* @__PURE__ */ jsx59(
|
4993
5041
|
Checkbox2,
|
4994
5042
|
{
|
4995
5043
|
pointerEvents: "none",
|
@@ -4998,13 +5046,13 @@ var InputOption = ({
|
|
4998
5046
|
isInvalid: false
|
4999
5047
|
}
|
5000
5048
|
),
|
5001
|
-
/* @__PURE__ */
|
5049
|
+
/* @__PURE__ */ jsx59(Text14, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
5002
5050
|
]
|
5003
5051
|
}
|
5004
5052
|
)
|
5005
5053
|
}
|
5006
5054
|
),
|
5007
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
5055
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx59("hr", {}) : null
|
5008
5056
|
] });
|
5009
5057
|
};
|
5010
5058
|
var SelectWithCheckboxBase = ({
|
@@ -5017,7 +5065,7 @@ var SelectWithCheckboxBase = ({
|
|
5017
5065
|
...rest
|
5018
5066
|
}) => {
|
5019
5067
|
const { colorMode } = useColorMode6();
|
5020
|
-
return /* @__PURE__ */
|
5068
|
+
return /* @__PURE__ */ jsx59(
|
5021
5069
|
ReactSelect2,
|
5022
5070
|
{
|
5023
5071
|
"data-test-id": "",
|
@@ -5036,8 +5084,9 @@ var SelectWithCheckboxBase = ({
|
|
5036
5084
|
);
|
5037
5085
|
};
|
5038
5086
|
var SelectCheckbox = (props) => {
|
5039
|
-
const { isMulti, options, value, components, ...rest } = props;
|
5087
|
+
const { isMulti, options, value, components, virtualized, ...rest } = props;
|
5040
5088
|
const selectValue = value || [];
|
5089
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ jsx59(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5041
5090
|
const defaultComponents = {
|
5042
5091
|
DropdownIndicator,
|
5043
5092
|
ClearIndicator,
|
@@ -5049,10 +5098,10 @@ var SelectCheckbox = (props) => {
|
|
5049
5098
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
5050
5099
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
5051
5100
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
5052
|
-
return /* @__PURE__ */
|
5101
|
+
return /* @__PURE__ */ jsx59(InputOption, { ...optionProps, checkedState });
|
5053
5102
|
}
|
5054
5103
|
};
|
5055
|
-
return /* @__PURE__ */
|
5104
|
+
return /* @__PURE__ */ jsx59(
|
5056
5105
|
SelectWithCheckboxBase,
|
5057
5106
|
{
|
5058
5107
|
"data-test-id": "",
|
@@ -5061,6 +5110,9 @@ var SelectCheckbox = (props) => {
|
|
5061
5110
|
value,
|
5062
5111
|
components: {
|
5063
5112
|
...defaultComponents,
|
5113
|
+
...virtualized ? {
|
5114
|
+
MenuList: renderMenuListVirtualized
|
5115
|
+
} : {},
|
5064
5116
|
...components
|
5065
5117
|
},
|
5066
5118
|
...rest
|
@@ -5072,10 +5124,10 @@ var select_with_checkbox_default = SelectCheckbox;
|
|
5072
5124
|
// src/components/sidebar/components/sidebar.tsx
|
5073
5125
|
import { Flex as Flex13 } from "@chakra-ui/react";
|
5074
5126
|
import { motion } from "framer-motion";
|
5075
|
-
import { jsx as
|
5127
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
5076
5128
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5077
5129
|
const { width = "220px" } = props;
|
5078
|
-
return /* @__PURE__ */
|
5130
|
+
return /* @__PURE__ */ jsx60(
|
5079
5131
|
Flex13,
|
5080
5132
|
{
|
5081
5133
|
position: "relative",
|
@@ -5099,9 +5151,9 @@ Sidebar.displayName = "Sidebar";
|
|
5099
5151
|
import { Box as Box27, Flex as Flex14, Text as Text15 } from "@chakra-ui/react";
|
5100
5152
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
5101
5153
|
import { AnimatePresence, motion as motion2 } from "framer-motion";
|
5102
|
-
import { jsx as
|
5154
|
+
import { jsx as jsx61, jsxs as jsxs25 } from "react/jsx-runtime";
|
5103
5155
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5104
|
-
return /* @__PURE__ */
|
5156
|
+
return /* @__PURE__ */ jsx61(
|
5105
5157
|
Box27,
|
5106
5158
|
{
|
5107
5159
|
px: "2",
|
@@ -5121,7 +5173,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5121
5173
|
onClick: () => setCollapse(!isCollapse),
|
5122
5174
|
cursor: "pointer",
|
5123
5175
|
children: [
|
5124
|
-
/* @__PURE__ */
|
5176
|
+
/* @__PURE__ */ jsx61(
|
5125
5177
|
Box27,
|
5126
5178
|
{
|
5127
5179
|
as: motion2.div,
|
@@ -5130,10 +5182,10 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5130
5182
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
5131
5183
|
transitionTimingFunction: "linear",
|
5132
5184
|
"aria-label": "toggle sidebar",
|
5133
|
-
children: /* @__PURE__ */
|
5185
|
+
children: /* @__PURE__ */ jsx61(ArrowRight, { size: 4, color: "inherit" })
|
5134
5186
|
}
|
5135
5187
|
),
|
5136
|
-
/* @__PURE__ */
|
5188
|
+
/* @__PURE__ */ jsx61(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx61(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx61(
|
5137
5189
|
Text15,
|
5138
5190
|
{
|
5139
5191
|
as: motion2.div,
|
@@ -5177,28 +5229,28 @@ import {
|
|
5177
5229
|
} from "@chakra-ui/react";
|
5178
5230
|
import * as Icon8 from "@ctlyst.id/internal-icon";
|
5179
5231
|
import { motion as motion3 } from "framer-motion";
|
5180
|
-
import { Fragment as Fragment9, jsx as
|
5232
|
+
import { Fragment as Fragment9, jsx as jsx62, jsxs as jsxs26 } from "react/jsx-runtime";
|
5181
5233
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5182
|
-
return /* @__PURE__ */
|
5234
|
+
return /* @__PURE__ */ jsx62(
|
5183
5235
|
Box28,
|
5184
5236
|
{
|
5185
5237
|
as: motion3.div,
|
5186
5238
|
transitionTimingFunction: "linear",
|
5187
5239
|
initial: { padding: "8px" },
|
5188
5240
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5189
|
-
children: /* @__PURE__ */
|
5241
|
+
children: /* @__PURE__ */ jsx62(Accordion2, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5190
5242
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5191
|
-
return /* @__PURE__ */
|
5243
|
+
return /* @__PURE__ */ jsx62(AccordionItem2, { mt: "4", children: ({ isExpanded }) => {
|
5192
5244
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5193
5245
|
const noChild = !item.children.length;
|
5194
5246
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5195
5247
|
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
5196
|
-
/* @__PURE__ */
|
5248
|
+
/* @__PURE__ */ jsx62(Popover6, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5197
5249
|
const activeOption = isOpen ? "primary.50" : "white";
|
5198
5250
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5199
5251
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5200
5252
|
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
5201
|
-
/* @__PURE__ */
|
5253
|
+
/* @__PURE__ */ jsx62(PopoverTrigger6, { children: /* @__PURE__ */ jsx62(
|
5202
5254
|
AccordionButton2,
|
5203
5255
|
{
|
5204
5256
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
@@ -5217,7 +5269,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5217
5269
|
position: "relative",
|
5218
5270
|
...itemStyles,
|
5219
5271
|
children: [
|
5220
|
-
mappingIcon2 && /* @__PURE__ */
|
5272
|
+
mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5221
5273
|
!isCollapse && /* @__PURE__ */ jsxs26(
|
5222
5274
|
Box28,
|
5223
5275
|
{
|
@@ -5233,8 +5285,8 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5233
5285
|
animate: { opacity: 1, x: 0 },
|
5234
5286
|
exit: { opacity: 0, x: 16 },
|
5235
5287
|
children: [
|
5236
|
-
/* @__PURE__ */
|
5237
|
-
!!item.children.length && /* @__PURE__ */
|
5288
|
+
/* @__PURE__ */ jsx62(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx62(Text16, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5289
|
+
!!item.children.length && /* @__PURE__ */ jsx62(
|
5238
5290
|
Box28,
|
5239
5291
|
{
|
5240
5292
|
display: "flex",
|
@@ -5242,7 +5294,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5242
5294
|
as: motion3.div,
|
5243
5295
|
transitionTimingFunction: "linear",
|
5244
5296
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
5245
|
-
children: /* @__PURE__ */
|
5297
|
+
children: /* @__PURE__ */ jsx62(Icon8.ChevronDown, { size: 3 })
|
5246
5298
|
}
|
5247
5299
|
)
|
5248
5300
|
]
|
@@ -5255,12 +5307,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5255
5307
|
},
|
5256
5308
|
item.id
|
5257
5309
|
) }, item.id),
|
5258
|
-
isOpenOptions && /* @__PURE__ */
|
5259
|
-
/* @__PURE__ */
|
5310
|
+
isOpenOptions && /* @__PURE__ */ jsx62(Portal4, { children: item.children.length > 0 ? /* @__PURE__ */ jsxs26(PopoverContent6, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5311
|
+
/* @__PURE__ */ jsx62(PopoverHeader2, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ jsxs26(Box28, { display: "flex", alignItems: "center", children: [
|
5260
5312
|
mappingIcon2.get(item.icon || ""),
|
5261
|
-
/* @__PURE__ */
|
5313
|
+
/* @__PURE__ */ jsx62(Box28, { as: "span", ml: "2", children: item.title })
|
5262
5314
|
] }) }),
|
5263
|
-
!!item.children.length && /* @__PURE__ */
|
5315
|
+
!!item.children.length && /* @__PURE__ */ jsx62(PopoverBody4, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx62(
|
5264
5316
|
NavItem,
|
5265
5317
|
{
|
5266
5318
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5276,7 +5328,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5276
5328
|
},
|
5277
5329
|
submenu.id
|
5278
5330
|
)) })
|
5279
|
-
] }) : isCollapse && /* @__PURE__ */
|
5331
|
+
] }) : isCollapse && /* @__PURE__ */ jsx62(PopoverContent6, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx62(PopoverBody4, { py: "1", px: "0", children: /* @__PURE__ */ jsxs26(
|
5280
5332
|
NavItem,
|
5281
5333
|
{
|
5282
5334
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5289,22 +5341,22 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5289
5341
|
rounded: "none",
|
5290
5342
|
...itemStyles,
|
5291
5343
|
children: [
|
5292
|
-
mappingIcon2 && /* @__PURE__ */
|
5293
|
-
/* @__PURE__ */
|
5344
|
+
mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5345
|
+
/* @__PURE__ */ jsx62(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx62(Text16, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5294
5346
|
]
|
5295
5347
|
},
|
5296
5348
|
item.id
|
5297
5349
|
) }) }) })
|
5298
5350
|
] });
|
5299
5351
|
} }, item.id),
|
5300
|
-
!isCollapse && /* @__PURE__ */
|
5352
|
+
!isCollapse && /* @__PURE__ */ jsx62(
|
5301
5353
|
Fade,
|
5302
5354
|
{
|
5303
5355
|
in: true,
|
5304
5356
|
transition: {
|
5305
5357
|
enter: { duration: 0.5 }
|
5306
5358
|
},
|
5307
|
-
children: /* @__PURE__ */
|
5359
|
+
children: /* @__PURE__ */ jsx62(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx62(
|
5308
5360
|
NavItem,
|
5309
5361
|
{
|
5310
5362
|
mt: "1",
|
@@ -5336,7 +5388,7 @@ import { chakra as chakra6, Flex as Flex15, forwardRef as forwardRef11, omitThem
|
|
5336
5388
|
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
5337
5389
|
import { Check as Check2, Close as Close5 } from "@ctlyst.id/internal-icon";
|
5338
5390
|
import { useMemo as useMemo3 } from "react";
|
5339
|
-
import { jsx as
|
5391
|
+
import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
|
5340
5392
|
var Switch = forwardRef11(function Switch2(props, ref) {
|
5341
5393
|
const styles = useMultiStyleConfig2("Switch", props);
|
5342
5394
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
@@ -5388,13 +5440,13 @@ var Switch = forwardRef11(function Switch2(props, ref) {
|
|
5388
5440
|
className: cx10("chakra-switch", props.className),
|
5389
5441
|
__css: containerStyles,
|
5390
5442
|
children: [
|
5391
|
-
/* @__PURE__ */
|
5443
|
+
/* @__PURE__ */ jsx63("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5392
5444
|
/* @__PURE__ */ jsxs27(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5393
5445
|
/* @__PURE__ */ jsxs27(Flex15, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5394
|
-
/* @__PURE__ */
|
5395
|
-
/* @__PURE__ */
|
5446
|
+
/* @__PURE__ */ jsx63(Check2, { color: "white", size: getIconSize(props.size) }),
|
5447
|
+
/* @__PURE__ */ jsx63(Close5, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5396
5448
|
] }),
|
5397
|
-
/* @__PURE__ */
|
5449
|
+
/* @__PURE__ */ jsx63(
|
5398
5450
|
chakra6.span,
|
5399
5451
|
{
|
5400
5452
|
__css: styles.thumb,
|
@@ -5404,7 +5456,7 @@ var Switch = forwardRef11(function Switch2(props, ref) {
|
|
5404
5456
|
}
|
5405
5457
|
)
|
5406
5458
|
] }),
|
5407
|
-
children && /* @__PURE__ */
|
5459
|
+
children && /* @__PURE__ */ jsx63(
|
5408
5460
|
chakra6.span,
|
5409
5461
|
{
|
5410
5462
|
className: "chakra-switch__label",
|
@@ -5442,13 +5494,13 @@ import {
|
|
5442
5494
|
|
5443
5495
|
// src/components/tabs/components/tab.tsx
|
5444
5496
|
import { Button as Button6, Flex as Flex16, forwardRef as forwardRef12, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
5445
|
-
import { jsx as
|
5497
|
+
import { jsx as jsx64, jsxs as jsxs28 } from "react/jsx-runtime";
|
5446
5498
|
var Tab = forwardRef12((props, ref) => {
|
5447
5499
|
var _a, _b;
|
5448
5500
|
const tabProps = useTab({ ...props, ref });
|
5449
5501
|
const isSelected = !!tabProps["aria-selected"];
|
5450
5502
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
5451
|
-
return /* @__PURE__ */
|
5503
|
+
return /* @__PURE__ */ jsx64(
|
5452
5504
|
Button6,
|
5453
5505
|
{
|
5454
5506
|
"data-test-id": props["data-test-id"],
|
@@ -5533,14 +5585,14 @@ import { marry } from "@zamiru/timescape";
|
|
5533
5585
|
import {
|
5534
5586
|
useEffect as useEffect2,
|
5535
5587
|
useLayoutEffect,
|
5536
|
-
useRef as
|
5588
|
+
useRef as useRef4,
|
5537
5589
|
useState as useState4
|
5538
5590
|
} from "react";
|
5539
5591
|
var useTimescape = (options = {}) => {
|
5540
5592
|
var _a;
|
5541
5593
|
const { date, onChangeDate, ...rest } = options;
|
5542
5594
|
const [manager] = useState4(() => new TimescapeManager(date, rest));
|
5543
|
-
const onChangeDateRef =
|
5595
|
+
const onChangeDateRef = useRef4(onChangeDate);
|
5544
5596
|
useLayoutEffect(() => {
|
5545
5597
|
onChangeDateRef.current = onChangeDate;
|
5546
5598
|
}, [onChangeDate]);
|
@@ -5604,7 +5656,7 @@ var useTimescape = (options = {}) => {
|
|
5604
5656
|
};
|
5605
5657
|
|
5606
5658
|
// src/components/time-input/components/index.tsx
|
5607
|
-
import { Fragment as Fragment10, jsx as
|
5659
|
+
import { Fragment as Fragment10, jsx as jsx65, jsxs as jsxs29 } from "react/jsx-runtime";
|
5608
5660
|
var timeDigitFormat = (number) => {
|
5609
5661
|
if (number.toString().length === 1) {
|
5610
5662
|
return `0${number}`;
|
@@ -5629,7 +5681,7 @@ var timeFromString = (timeString) => {
|
|
5629
5681
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5630
5682
|
};
|
5631
5683
|
var InputTimeArea = forwardRef13((props, ref) => {
|
5632
|
-
return /* @__PURE__ */
|
5684
|
+
return /* @__PURE__ */ jsx65(
|
5633
5685
|
Input3,
|
5634
5686
|
{
|
5635
5687
|
_focusWithin: {
|
@@ -5705,7 +5757,7 @@ var TimeInput2 = forwardRef13(
|
|
5705
5757
|
};
|
5706
5758
|
};
|
5707
5759
|
const { outlineColor, focusColor } = getProperties();
|
5708
|
-
return /* @__PURE__ */
|
5760
|
+
return /* @__PURE__ */ jsx65(Box29, { ...boxProps, ...rootProps, children: /* @__PURE__ */ jsx65(
|
5709
5761
|
field_default,
|
5710
5762
|
{
|
5711
5763
|
isError,
|
@@ -5714,7 +5766,7 @@ var TimeInput2 = forwardRef13(
|
|
5714
5766
|
errorMessage,
|
5715
5767
|
isDisabled,
|
5716
5768
|
isSuccess,
|
5717
|
-
children: /* @__PURE__ */
|
5769
|
+
children: /* @__PURE__ */ jsx65(
|
5718
5770
|
Box29,
|
5719
5771
|
{
|
5720
5772
|
transition: "all 0.15s",
|
@@ -5736,16 +5788,16 @@ var TimeInput2 = forwardRef13(
|
|
5736
5788
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5737
5789
|
children: [
|
5738
5790
|
/* @__PURE__ */ jsxs29(Flex17, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5739
|
-
/* @__PURE__ */
|
5740
|
-
/* @__PURE__ */
|
5741
|
-
/* @__PURE__ */
|
5791
|
+
/* @__PURE__ */ jsx65(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5792
|
+
/* @__PURE__ */ jsx65("span", { children: ":" }),
|
5793
|
+
/* @__PURE__ */ jsx65(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
5742
5794
|
seconds && /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
5743
|
-
/* @__PURE__ */
|
5744
|
-
/* @__PURE__ */
|
5795
|
+
/* @__PURE__ */ jsx65("span", { children: ":" }),
|
5796
|
+
/* @__PURE__ */ jsx65(InputTimeArea, { ...getInputProps("seconds") })
|
5745
5797
|
] }),
|
5746
|
-
options.hour12 && /* @__PURE__ */
|
5798
|
+
options.hour12 && /* @__PURE__ */ jsx65(Input3, { p: 0, ...getInputProps("am/pm") })
|
5747
5799
|
] }),
|
5748
|
-
/* @__PURE__ */
|
5800
|
+
/* @__PURE__ */ jsx65(Clock, { color: "neutral.400", size: 4 }),
|
5749
5801
|
addOnRight
|
5750
5802
|
]
|
5751
5803
|
}
|
@@ -5764,9 +5816,9 @@ import { Bounce, toast } from "react-toastify";
|
|
5764
5816
|
|
5765
5817
|
// src/components/toast/components/styles.tsx
|
5766
5818
|
import { Global as Global2 } from "@emotion/react";
|
5767
|
-
import { jsx as
|
5819
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
5768
5820
|
var Styles2 = () => {
|
5769
|
-
return /* @__PURE__ */
|
5821
|
+
return /* @__PURE__ */ jsx66(
|
5770
5822
|
Global2,
|
5771
5823
|
{
|
5772
5824
|
styles: `
|
@@ -5801,10 +5853,10 @@ var Styles2 = () => {
|
|
5801
5853
|
var styles_default2 = Styles2;
|
5802
5854
|
|
5803
5855
|
// src/components/toast/components/toast.tsx
|
5804
|
-
import { Fragment as Fragment11, jsx as
|
5856
|
+
import { Fragment as Fragment11, jsx as jsx67, jsxs as jsxs30 } from "react/jsx-runtime";
|
5805
5857
|
var CustomCloseButton = (props) => {
|
5806
5858
|
const { closeToast } = props;
|
5807
|
-
return /* @__PURE__ */
|
5859
|
+
return /* @__PURE__ */ jsx67(Box30, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: () => closeToast(), children: /* @__PURE__ */ jsx67(Close6, { size: 4, color: "white" }) });
|
5808
5860
|
};
|
5809
5861
|
var DEFAULT_OPTIONS = {
|
5810
5862
|
position: "top-right",
|
@@ -5837,13 +5889,13 @@ var useToast = () => {
|
|
5837
5889
|
]);
|
5838
5890
|
const content = (icon, message, link) => {
|
5839
5891
|
return /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
5840
|
-
/* @__PURE__ */
|
5892
|
+
/* @__PURE__ */ jsx67(styles_default2, {}),
|
5841
5893
|
/* @__PURE__ */ jsxs30(Flex18, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
|
5842
5894
|
/* @__PURE__ */ jsxs30(Flex18, { alignItems: "center", children: [
|
5843
|
-
icon && /* @__PURE__ */
|
5844
|
-
/* @__PURE__ */
|
5895
|
+
icon && /* @__PURE__ */ jsx67(chakra7.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
5896
|
+
/* @__PURE__ */ jsx67(chakra7.span, { noOfLines: 2, children: message })
|
5845
5897
|
] }),
|
5846
|
-
link && /* @__PURE__ */
|
5898
|
+
link && /* @__PURE__ */ jsx67(
|
5847
5899
|
Link6,
|
5848
5900
|
{
|
5849
5901
|
as: link.as,
|
@@ -6025,7 +6077,7 @@ var defaultOnHandleRejections = (fileRejection, config2, handleRejection) => {
|
|
6025
6077
|
};
|
6026
6078
|
|
6027
6079
|
// src/components/uploader/components/uploader.tsx
|
6028
|
-
import { Fragment as Fragment12, jsx as
|
6080
|
+
import { Fragment as Fragment12, jsx as jsx68, jsxs as jsxs31 } from "react/jsx-runtime";
|
6029
6081
|
var Uploader = ({
|
6030
6082
|
onHandleUploadFile,
|
6031
6083
|
onHandleRejections,
|
@@ -6158,20 +6210,20 @@ var Uploader = ({
|
|
6158
6210
|
});
|
6159
6211
|
const renderHelperText = () => {
|
6160
6212
|
if (Array.isArray(helperText)) {
|
6161
|
-
return /* @__PURE__ */
|
6213
|
+
return /* @__PURE__ */ jsx68(
|
6162
6214
|
UnorderedList2,
|
6163
6215
|
{
|
6164
6216
|
pl: 2,
|
6165
6217
|
fontSize: 12,
|
6166
6218
|
color: "black.medium",
|
6167
6219
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6168
|
-
children: helperText.map((text2) => /* @__PURE__ */
|
6220
|
+
children: helperText.map((text2) => /* @__PURE__ */ jsx68(ListItem2, { children: text2 }, text2))
|
6169
6221
|
}
|
6170
6222
|
);
|
6171
6223
|
}
|
6172
6224
|
return helperText;
|
6173
6225
|
};
|
6174
|
-
const renderErrorText = (text2) => /* @__PURE__ */
|
6226
|
+
const renderErrorText = (text2) => /* @__PURE__ */ jsx68(Box31, { mb: 2, children: /* @__PURE__ */ jsx68(Text18, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6175
6227
|
const handleRemove = (e) => {
|
6176
6228
|
e.stopPropagation();
|
6177
6229
|
setFilePreview(void 0);
|
@@ -6205,8 +6257,8 @@ var Uploader = ({
|
|
6205
6257
|
return /* @__PURE__ */ jsxs31(FormControl4, { isRequired, children: [
|
6206
6258
|
label && typeof label === "string" ? (
|
6207
6259
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6208
|
-
/* @__PURE__ */ jsxs31(FormLabel3, { requiredIndicator: /* @__PURE__ */
|
6209
|
-
isRequired && /* @__PURE__ */
|
6260
|
+
/* @__PURE__ */ jsxs31(FormLabel3, { requiredIndicator: /* @__PURE__ */ jsx68(Fragment12, {}), fontSize: "text.sm", children: [
|
6261
|
+
isRequired && /* @__PURE__ */ jsx68(RequiredIndicator2, { mr: 1, ml: 0 }),
|
6210
6262
|
label
|
6211
6263
|
] })
|
6212
6264
|
) : label,
|
@@ -6228,7 +6280,7 @@ var Uploader = ({
|
|
6228
6280
|
...props,
|
6229
6281
|
...getRootProps(),
|
6230
6282
|
children: [
|
6231
|
-
filePreview && isShowCloseButton && /* @__PURE__ */
|
6283
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ jsx68(Box31, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ jsx68(
|
6232
6284
|
Button7,
|
6233
6285
|
{
|
6234
6286
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
@@ -6243,17 +6295,17 @@ var Uploader = ({
|
|
6243
6295
|
border: "none",
|
6244
6296
|
zIndex: 1,
|
6245
6297
|
onClick: handleRemove,
|
6246
|
-
children: /* @__PURE__ */
|
6298
|
+
children: /* @__PURE__ */ jsx68(X, { size: 3, color: "white" })
|
6247
6299
|
}
|
6248
6300
|
) }),
|
6249
|
-
filePreview && /* @__PURE__ */
|
6301
|
+
filePreview && /* @__PURE__ */ jsx68(Box31, { w: "full", children: /* @__PURE__ */ jsx68(
|
6250
6302
|
Flex19,
|
6251
6303
|
{
|
6252
6304
|
position: "relative",
|
6253
6305
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6254
6306
|
justify: "center",
|
6255
6307
|
align: "center",
|
6256
|
-
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */
|
6308
|
+
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ jsx68(
|
6257
6309
|
ChakraImage,
|
6258
6310
|
{
|
6259
6311
|
h: size2 === "lg" ? "120" : "100",
|
@@ -6261,13 +6313,13 @@ var Uploader = ({
|
|
6261
6313
|
alt: "uploader-preview",
|
6262
6314
|
objectFit: "contain"
|
6263
6315
|
}
|
6264
|
-
) : /* @__PURE__ */
|
6316
|
+
) : /* @__PURE__ */ jsx68(Text18, { noOfLines: 3, mx: 2, textAlign: "center", children: filePreview })
|
6265
6317
|
}
|
6266
6318
|
) }),
|
6267
|
-
!filePreview && /* @__PURE__ */
|
6268
|
-
size2 === "sm" && /* @__PURE__ */
|
6319
|
+
!filePreview && /* @__PURE__ */ jsx68(Fragment12, { children: isDragActive ? /* @__PURE__ */ jsx68(Text18, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs31(Flex19, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6320
|
+
size2 === "sm" && /* @__PURE__ */ jsx68(Plus, { size: 6, color }),
|
6269
6321
|
/* @__PURE__ */ jsxs31(Box31, { children: [
|
6270
|
-
!filePreview && /* @__PURE__ */
|
6322
|
+
!filePreview && /* @__PURE__ */ jsx68(
|
6271
6323
|
Heading2,
|
6272
6324
|
{
|
6273
6325
|
fontWeight: "400",
|
@@ -6277,20 +6329,20 @@ var Uploader = ({
|
|
6277
6329
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6278
6330
|
}
|
6279
6331
|
),
|
6280
|
-
size2 === "lg" && /* @__PURE__ */
|
6332
|
+
size2 === "lg" && /* @__PURE__ */ jsx68(Text18, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6281
6333
|
] })
|
6282
6334
|
] }) })
|
6283
6335
|
]
|
6284
6336
|
}
|
6285
6337
|
),
|
6286
|
-
/* @__PURE__ */
|
6338
|
+
/* @__PURE__ */ jsx68(
|
6287
6339
|
"input",
|
6288
6340
|
{
|
6289
6341
|
...getInputProps(),
|
6290
6342
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6291
6343
|
}
|
6292
6344
|
),
|
6293
|
-
filePreview && !isSmall && /* @__PURE__ */
|
6345
|
+
filePreview && !isSmall && /* @__PURE__ */ jsx68(Flex19, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ jsx68(
|
6294
6346
|
Button7,
|
6295
6347
|
{
|
6296
6348
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
@@ -7671,7 +7723,7 @@ var baseStyle11 = definePartsStyle10({
|
|
7671
7723
|
th: {
|
7672
7724
|
fontFamily: "heading",
|
7673
7725
|
fontWeight: "semibold",
|
7674
|
-
textTransform: "
|
7726
|
+
textTransform: "capitalize",
|
7675
7727
|
letterSpacing: "normal",
|
7676
7728
|
textAlign: "start",
|
7677
7729
|
height: "50px",
|
@@ -8031,9 +8083,9 @@ import { useMemo as useMemo5 } from "react";
|
|
8031
8083
|
|
8032
8084
|
// src/provider/components/provider.tsx
|
8033
8085
|
import axios from "axios";
|
8034
|
-
import { createContext as createContext2, useContext, useEffect as useEffect5, useMemo as useMemo4, useRef as
|
8086
|
+
import { createContext as createContext2, useContext, useEffect as useEffect5, useMemo as useMemo4, useRef as useRef5 } from "react";
|
8035
8087
|
import { ToastContainer as ToastContainer2 } from "react-toastify";
|
8036
|
-
import { jsx as
|
8088
|
+
import { jsx as jsx69, jsxs as jsxs32 } from "react/jsx-runtime";
|
8037
8089
|
var ProviderContext = createContext2({
|
8038
8090
|
instance: void 0
|
8039
8091
|
});
|
@@ -8042,7 +8094,7 @@ var useInternalUI = () => {
|
|
8042
8094
|
return { instance };
|
8043
8095
|
};
|
8044
8096
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
8045
|
-
const instanceRef =
|
8097
|
+
const instanceRef = useRef5(axios.create(config2));
|
8046
8098
|
useEffect5(() => {
|
8047
8099
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
8048
8100
|
instanceRef.current.interceptors.request.use(interceptor);
|
@@ -8053,7 +8105,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
8053
8105
|
}, [requestInterceptors, responseInterceptors]);
|
8054
8106
|
const provider = useMemo4(() => ({ instance: instanceRef.current }), []);
|
8055
8107
|
return /* @__PURE__ */ jsxs32(ProviderContext.Provider, { value: provider, children: [
|
8056
|
-
/* @__PURE__ */
|
8108
|
+
/* @__PURE__ */ jsx69(ToastContainer2, {}),
|
8057
8109
|
children
|
8058
8110
|
] });
|
8059
8111
|
};
|