@ctlyst.id/internal-ui 5.5.7 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +411 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
@@ -56,12 +56,12 @@ __export(src_exports, {
|
|
56
56
|
AlertIcon: () => AlertIcon,
|
57
57
|
AlertTitle: () => AlertTitle,
|
58
58
|
Anchor: () => Anchor,
|
59
|
-
Avatar: () =>
|
60
|
-
AvatarBadge: () =>
|
61
|
-
AvatarBadgeProps: () =>
|
62
|
-
AvatarGroup: () =>
|
63
|
-
AvatarGroupProps: () =>
|
64
|
-
AvatarProps: () =>
|
59
|
+
Avatar: () => import_react98.Avatar,
|
60
|
+
AvatarBadge: () => import_react98.AvatarBadge,
|
61
|
+
AvatarBadgeProps: () => import_react98.AvatarBadgeProps,
|
62
|
+
AvatarGroup: () => import_react98.AvatarGroup,
|
63
|
+
AvatarGroupProps: () => import_react98.AvatarGroupProps,
|
64
|
+
AvatarProps: () => import_react98.AvatarProps,
|
65
65
|
Badge: () => badge_default,
|
66
66
|
Box: () => import_react55.Box,
|
67
67
|
BoxProps: () => import_react55.BoxProps,
|
@@ -72,9 +72,9 @@ __export(src_exports, {
|
|
72
72
|
CHECKBOX_STATE: () => CHECKBOX_STATE,
|
73
73
|
Card: () => card_default,
|
74
74
|
Center: () => import_react55.Center,
|
75
|
-
ChakraProvider: () =>
|
76
|
-
ChakraProviderProps: () =>
|
77
|
-
ChakraTable: () =>
|
75
|
+
ChakraProvider: () => import_react108.ChakraProvider,
|
76
|
+
ChakraProviderProps: () => import_react108.ChakraProviderProps,
|
77
|
+
ChakraTable: () => import_react87.Table,
|
78
78
|
Checkbox: () => checkbox_default,
|
79
79
|
CheckboxGroup: () => checkbox_group_default,
|
80
80
|
CheckboxGroupContext: () => import_react17.CheckboxGroupContext,
|
@@ -86,13 +86,13 @@ __export(src_exports, {
|
|
86
86
|
ClearIndicator: () => ClearIndicator,
|
87
87
|
CloseButton: () => import_react10.CloseButton,
|
88
88
|
CloseButtonProps: () => import_react10.CloseButtonProps,
|
89
|
-
Code: () =>
|
90
|
-
CodeProps: () =>
|
91
|
-
Collapse: () =>
|
92
|
-
CollapseProps: () =>
|
93
|
-
ColorMode: () =>
|
94
|
-
ColorModeScript: () =>
|
95
|
-
ColorModeScriptProps: () =>
|
89
|
+
Code: () => import_react90.Code,
|
90
|
+
CodeProps: () => import_react90.CodeProps,
|
91
|
+
Collapse: () => import_react98.Collapse,
|
92
|
+
CollapseProps: () => import_react98.CollapseProps,
|
93
|
+
ColorMode: () => import_react108.ColorMode,
|
94
|
+
ColorModeScript: () => import_react108.ColorModeScript,
|
95
|
+
ColorModeScriptProps: () => import_react108.ColorModeScriptProps,
|
96
96
|
Container: () => import_react55.Container,
|
97
97
|
ContainerProps: () => import_react55.ContainerProps,
|
98
98
|
Counter: () => counter_default,
|
@@ -117,8 +117,8 @@ __export(src_exports, {
|
|
117
117
|
EXCEL_EXT: () => EXCEL_EXT,
|
118
118
|
EmptyState: () => empty_state_default,
|
119
119
|
ErrorCode: () => error_code_default,
|
120
|
-
Fade: () =>
|
121
|
-
FadeProps: () =>
|
120
|
+
Fade: () => import_react98.Fade,
|
121
|
+
FadeProps: () => import_react98.FadeProps,
|
122
122
|
Field: () => field_default,
|
123
123
|
Flex: () => import_react55.Flex,
|
124
124
|
FlexProps: () => import_react55.FlexProps,
|
@@ -134,10 +134,10 @@ __export(src_exports, {
|
|
134
134
|
GridProps: () => import_react55.GridProps,
|
135
135
|
HStack: () => import_react55.HStack,
|
136
136
|
Header: () => Header,
|
137
|
-
Heading: () =>
|
138
|
-
HeadingProps: () =>
|
139
|
-
Hide: () =>
|
140
|
-
HideProps: () =>
|
137
|
+
Heading: () => import_react90.Heading,
|
138
|
+
HeadingProps: () => import_react90.HeadingProps,
|
139
|
+
Hide: () => import_react98.Hide,
|
140
|
+
HideProps: () => import_react98.HideProps,
|
141
141
|
IMG_EXT: () => IMG_EXT,
|
142
142
|
Icon: () => import_react54.Icon,
|
143
143
|
IconButton: () => import_react10.IconButton,
|
@@ -145,8 +145,8 @@ __export(src_exports, {
|
|
145
145
|
IconProps: () => import_react54.IconProps,
|
146
146
|
Image: () => import_react54.Image,
|
147
147
|
ImageProps: () => import_react54.ImageProps,
|
148
|
-
Img: () =>
|
149
|
-
ImgProps: () =>
|
148
|
+
Img: () => import_react98.Img,
|
149
|
+
ImgProps: () => import_react98.ImgProps,
|
150
150
|
InputAddonLeft: () => InputAddonLeft,
|
151
151
|
InputAddonRight: () => InputAddonRight,
|
152
152
|
InputElementLeft: () => import_react20.InputLeftElement,
|
@@ -163,8 +163,8 @@ __export(src_exports, {
|
|
163
163
|
InputRightAddonProps: () => import_react26.InputRightAddonProps,
|
164
164
|
InputRightElement: () => import_react26.InputRightElement,
|
165
165
|
InputRightElementProps: () => import_react26.InputRightElementProps,
|
166
|
-
Link: () =>
|
167
|
-
LinkProps: () =>
|
166
|
+
Link: () => import_react90.Link,
|
167
|
+
LinkProps: () => import_react90.LinkProps,
|
168
168
|
List: () => import_react56.List,
|
169
169
|
ListIcon: () => import_react56.ListIcon,
|
170
170
|
ListItem: () => import_react56.ListItem,
|
@@ -240,101 +240,101 @@ __export(src_exports, {
|
|
240
240
|
Rating: () => rating_default,
|
241
241
|
RequiredIndicator: () => import_react26.RequiredIndicator,
|
242
242
|
RequiredIndicatorProps: () => import_react26.RequiredIndicatorProps,
|
243
|
-
ScaleFade: () =>
|
244
|
-
ScaleFadeProps: () =>
|
243
|
+
ScaleFade: () => import_react98.ScaleFade,
|
244
|
+
ScaleFadeProps: () => import_react98.ScaleFadeProps,
|
245
245
|
Select: () => select_default,
|
246
246
|
SelectAsync: () => select_async_default,
|
247
247
|
SelectAsyncCreatable: () => SelectAsyncCreatable,
|
248
248
|
SelectCheckBox: () => select_with_checkbox_default,
|
249
249
|
SelectCreatable: () => SelectCreatable,
|
250
|
-
Show: () =>
|
251
|
-
ShowProps: () =>
|
250
|
+
Show: () => import_react98.Show,
|
251
|
+
ShowProps: () => import_react98.ShowProps,
|
252
252
|
Sidebar: () => Sidebar,
|
253
253
|
SidebarHeader: () => SidebarHeader,
|
254
254
|
SidebarMenu: () => SidebarMenu,
|
255
255
|
SimpleGrid: () => import_react55.SimpleGrid,
|
256
256
|
Skeleton: () => import_react5.Skeleton,
|
257
|
-
Slide: () =>
|
258
|
-
SlideFade: () =>
|
259
|
-
SlideFadeProps: () =>
|
260
|
-
SlideProps: () =>
|
257
|
+
Slide: () => import_react98.Slide,
|
258
|
+
SlideFade: () => import_react98.SlideFade,
|
259
|
+
SlideFadeProps: () => import_react98.SlideFadeProps,
|
260
|
+
SlideProps: () => import_react98.SlideProps,
|
261
261
|
Spacer: () => import_react55.Spacer,
|
262
262
|
Stack: () => import_react55.Stack,
|
263
263
|
StackProps: () => import_react55.StackProps,
|
264
|
-
Step: () =>
|
265
|
-
StepDescription: () =>
|
266
|
-
StepIcon: () =>
|
267
|
-
StepIndicator: () =>
|
268
|
-
StepNumber: () =>
|
269
|
-
StepSeparator: () =>
|
270
|
-
StepStatus: () =>
|
271
|
-
StepTitle: () =>
|
272
|
-
Stepper: () =>
|
264
|
+
Step: () => import_react98.Step,
|
265
|
+
StepDescription: () => import_react98.StepDescription,
|
266
|
+
StepIcon: () => import_react98.StepIcon,
|
267
|
+
StepIndicator: () => import_react98.StepIndicator,
|
268
|
+
StepNumber: () => import_react98.StepNumber,
|
269
|
+
StepSeparator: () => import_react98.StepSeparator,
|
270
|
+
StepStatus: () => import_react98.StepStatus,
|
271
|
+
StepTitle: () => import_react98.StepTitle,
|
272
|
+
Stepper: () => import_react98.Stepper,
|
273
273
|
Switch: () => switch_default,
|
274
274
|
Tab: () => tab_default,
|
275
|
-
TabIndicator: () =>
|
276
|
-
TabIndicatorProps: () =>
|
277
|
-
TabList: () =>
|
278
|
-
TabListProps: () =>
|
279
|
-
TabPanel: () =>
|
280
|
-
TabPanelProps: () =>
|
281
|
-
TabPanels: () =>
|
282
|
-
TabPanelsProps: () =>
|
283
|
-
TabProps: () =>
|
284
|
-
TableBodyProps: () =>
|
285
|
-
TableCellProps: () =>
|
286
|
-
TableColumnHeaderProps: () =>
|
287
|
-
TableHeadProps: () =>
|
288
|
-
TableProps: () =>
|
289
|
-
TableRowProps: () =>
|
290
|
-
Tabs: () =>
|
291
|
-
TabsDescendantsProvider: () =>
|
292
|
-
TabsProps: () =>
|
293
|
-
TabsProvider: () =>
|
294
|
-
Tbody: () =>
|
295
|
-
Td: () =>
|
296
|
-
Text: () =>
|
297
|
-
TextProps: () =>
|
275
|
+
TabIndicator: () => import_react89.TabIndicator,
|
276
|
+
TabIndicatorProps: () => import_react89.TabIndicatorProps,
|
277
|
+
TabList: () => import_react89.TabList,
|
278
|
+
TabListProps: () => import_react89.TabListProps,
|
279
|
+
TabPanel: () => import_react89.TabPanel,
|
280
|
+
TabPanelProps: () => import_react89.TabPanelProps,
|
281
|
+
TabPanels: () => import_react89.TabPanels,
|
282
|
+
TabPanelsProps: () => import_react89.TabPanelsProps,
|
283
|
+
TabProps: () => import_react89.TabProps,
|
284
|
+
TableBodyProps: () => import_react87.TableBodyProps,
|
285
|
+
TableCellProps: () => import_react87.TableCellProps,
|
286
|
+
TableColumnHeaderProps: () => import_react87.TableColumnHeaderProps,
|
287
|
+
TableHeadProps: () => import_react87.TableHeadProps,
|
288
|
+
TableProps: () => import_react87.TableProps,
|
289
|
+
TableRowProps: () => import_react87.TableRowProps,
|
290
|
+
Tabs: () => import_react89.Tabs,
|
291
|
+
TabsDescendantsProvider: () => import_react89.TabsDescendantsProvider,
|
292
|
+
TabsProps: () => import_react89.TabsProps,
|
293
|
+
TabsProvider: () => import_react89.TabsProvider,
|
294
|
+
Tbody: () => import_react87.Tbody,
|
295
|
+
Td: () => import_react87.Td,
|
296
|
+
Text: () => import_react90.Text,
|
297
|
+
TextProps: () => import_react90.TextProps,
|
298
298
|
TextareaField: () => textarea_default,
|
299
|
-
Th: () =>
|
300
|
-
Thead: () =>
|
299
|
+
Th: () => import_react87.Th,
|
300
|
+
Thead: () => import_react87.Thead,
|
301
301
|
ThemeTypings: () => import_styled_system12.ThemeTypings,
|
302
302
|
Time: () => Time,
|
303
303
|
TimeInput: () => TimeInput2,
|
304
304
|
ToastContainer: () => import_react_toastify2.ToastContainer,
|
305
305
|
Tooltip: () => Tooltip,
|
306
|
-
Tr: () =>
|
306
|
+
Tr: () => import_react87.Tr,
|
307
307
|
UnorderedList: () => import_react56.UnorderedList,
|
308
308
|
Uploader: () => uploader_default,
|
309
|
-
UseBreakpointOptions: () =>
|
309
|
+
UseBreakpointOptions: () => import_react98.UseBreakpointOptions,
|
310
310
|
UseCheckboxGroupProps: () => import_react17.UseCheckboxGroupProps,
|
311
311
|
UseCheckboxGroupReturn: () => import_react17.UseCheckboxGroupReturn,
|
312
312
|
UseCheckboxProps: () => import_react17.UseCheckboxProps,
|
313
313
|
UseCheckboxReturn: () => import_react17.UseCheckboxReturn,
|
314
|
-
UseDisclosureProps: () =>
|
315
|
-
UseImageProps: () =>
|
316
|
-
UseImageReturn: () =>
|
317
|
-
UseMediaQueryOptions: () =>
|
314
|
+
UseDisclosureProps: () => import_react110.UseDisclosureProps,
|
315
|
+
UseImageProps: () => import_react98.UseImageProps,
|
316
|
+
UseImageReturn: () => import_react98.UseImageReturn,
|
317
|
+
UseMediaQueryOptions: () => import_react98.UseMediaQueryOptions,
|
318
318
|
UseModalProps: () => import_react58.UseModalProps,
|
319
319
|
UseModalReturn: () => import_react58.UseModalReturn,
|
320
320
|
UsePinInputFieldProps: () => import_react67.UsePinInputFieldProps,
|
321
321
|
UsePinInputProps: () => import_react67.UsePinInputProps,
|
322
322
|
UsePinInputReturn: () => import_react67.UsePinInputReturn,
|
323
|
-
UseQueryProps: () =>
|
323
|
+
UseQueryProps: () => import_react98.UseQueryProps,
|
324
324
|
UseRadioGroupReturn: () => import_react74.UseRadioGroupReturn,
|
325
325
|
UseRadioProps: () => import_react74.UseRadioProps,
|
326
326
|
UseRadioReturn: () => import_react74.UseRadioReturn,
|
327
|
-
UseTabListProps: () =>
|
328
|
-
UseTabListReturn: () =>
|
329
|
-
UseTabOptions: () =>
|
330
|
-
UseTabPanelsProps: () =>
|
331
|
-
UseTabProps: () =>
|
332
|
-
UseTabsProps: () =>
|
333
|
-
UseTabsReturn: () =>
|
327
|
+
UseTabListProps: () => import_react89.UseTabListProps,
|
328
|
+
UseTabListReturn: () => import_react89.UseTabListReturn,
|
329
|
+
UseTabOptions: () => import_react89.UseTabOptions,
|
330
|
+
UseTabPanelsProps: () => import_react89.UseTabPanelsProps,
|
331
|
+
UseTabProps: () => import_react89.UseTabProps,
|
332
|
+
UseTabsProps: () => import_react89.UseTabsProps,
|
333
|
+
UseTabsReturn: () => import_react89.UseTabsReturn,
|
334
334
|
VStack: () => import_react55.VStack,
|
335
335
|
Version: () => Version,
|
336
|
-
VisuallyHidden: () =>
|
337
|
-
VisuallyHiddenInput: () =>
|
336
|
+
VisuallyHidden: () => import_react98.VisuallyHidden,
|
337
|
+
VisuallyHiddenInput: () => import_react98.VisuallyHiddenInput,
|
338
338
|
VoilaLogo: () => VoilaLogo,
|
339
339
|
Wrap: () => import_react55.Wrap,
|
340
340
|
WrapItem: () => import_react55.WrapItem,
|
@@ -345,9 +345,9 @@ __export(src_exports, {
|
|
345
345
|
createExtendTheme: () => createExtendTheme,
|
346
346
|
defaultOnHandleRejections: () => defaultOnHandleRejections,
|
347
347
|
dimensionValidator: () => dimensionValidator,
|
348
|
-
extendTheme: () =>
|
348
|
+
extendTheme: () => import_react111.extendTheme,
|
349
349
|
formatValidationMessage: () => formatValidationMessage,
|
350
|
-
forwardRef: () =>
|
350
|
+
forwardRef: () => import_react111.forwardRef,
|
351
351
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
352
352
|
getTheme: () => getTheme,
|
353
353
|
id: () => id,
|
@@ -364,53 +364,53 @@ __export(src_exports, {
|
|
364
364
|
useAccordionItemState: () => import_react3.useAccordionItemState,
|
365
365
|
useAccordionStyles: () => import_react3.useAccordionStyles,
|
366
366
|
useAlertStyles: () => useAlertStyles,
|
367
|
-
useBoolean: () =>
|
368
|
-
useBreakpoint: () =>
|
367
|
+
useBoolean: () => import_react110.useBoolean,
|
368
|
+
useBreakpoint: () => import_react98.useBreakpoint,
|
369
369
|
useCheckbox: () => import_react17.useCheckbox,
|
370
370
|
useCheckboxGroup: () => import_react17.useCheckboxGroup,
|
371
|
-
useClipboard: () =>
|
372
|
-
useColorMode: () =>
|
373
|
-
useColorModePreference: () =>
|
374
|
-
useColorModeValue: () =>
|
375
|
-
useConst: () =>
|
376
|
-
useControllableProp: () =>
|
377
|
-
useControllableState: () =>
|
371
|
+
useClipboard: () => import_react110.useClipboard,
|
372
|
+
useColorMode: () => import_react110.useColorMode,
|
373
|
+
useColorModePreference: () => import_react98.useColorModePreference,
|
374
|
+
useColorModeValue: () => import_react110.useColorModeValue,
|
375
|
+
useConst: () => import_react110.useConst,
|
376
|
+
useControllableProp: () => import_react110.useControllableProp,
|
377
|
+
useControllableState: () => import_react110.useControllableState,
|
378
378
|
useDataTable: () => useDataTable,
|
379
|
-
useDimensions: () =>
|
380
|
-
useDisclosure: () =>
|
379
|
+
useDimensions: () => import_react110.useDimensions,
|
380
|
+
useDisclosure: () => import_react110.useDisclosure,
|
381
381
|
useDrawerContext: () => import_react58.useDrawerContext,
|
382
382
|
useFetcher: () => useFetcher,
|
383
|
-
useImage: () =>
|
383
|
+
useImage: () => import_react98.useImage,
|
384
384
|
useInternalUI: () => useInternalUI,
|
385
|
-
useMergeRefs: () =>
|
385
|
+
useMergeRefs: () => import_react110.useMergeRefs,
|
386
386
|
useModal: () => import_react58.useModal,
|
387
387
|
useModalContext: () => import_react58.useModalContext,
|
388
388
|
useModalStyles: () => import_react58.useModalStyles,
|
389
|
-
useOutsideClick: () =>
|
389
|
+
useOutsideClick: () => import_react110.useOutsideClick,
|
390
390
|
usePinInput: () => import_react67.usePinInput,
|
391
391
|
usePinInputContext: () => import_react67.usePinInputContext,
|
392
392
|
usePinInputField: () => import_react67.usePinInputField,
|
393
393
|
useProgressStyles: () => import_react71.useProgressStyles,
|
394
|
-
useQuery: () =>
|
394
|
+
useQuery: () => import_react98.useQuery,
|
395
395
|
useRadio: () => import_react74.useRadio,
|
396
396
|
useRadioGroup: () => import_react74.useRadioGroup,
|
397
397
|
useRadioGroupContext: () => import_react74.useRadioGroupContext,
|
398
398
|
useSelectTable: () => useSelectTable,
|
399
|
-
useSteps: () =>
|
400
|
-
useTab: () =>
|
401
|
-
useTabIndicator: () =>
|
402
|
-
useTabList: () =>
|
403
|
-
useTabPanel: () =>
|
404
|
-
useTabPanels: () =>
|
405
|
-
useTabs: () =>
|
406
|
-
useTabsContext: () =>
|
407
|
-
useTabsDescendant: () =>
|
408
|
-
useTabsDescendants: () =>
|
409
|
-
useTabsDescendantsContext: () =>
|
410
|
-
useTabsStyles: () =>
|
411
|
-
useTheme: () =>
|
399
|
+
useSteps: () => import_react98.useSteps,
|
400
|
+
useTab: () => import_react89.useTab,
|
401
|
+
useTabIndicator: () => import_react89.useTabIndicator,
|
402
|
+
useTabList: () => import_react89.useTabList,
|
403
|
+
useTabPanel: () => import_react89.useTabPanel,
|
404
|
+
useTabPanels: () => import_react89.useTabPanels,
|
405
|
+
useTabs: () => import_react89.useTabs,
|
406
|
+
useTabsContext: () => import_react89.useTabsContext,
|
407
|
+
useTabsDescendant: () => import_react89.useTabsDescendant,
|
408
|
+
useTabsDescendants: () => import_react89.useTabsDescendants,
|
409
|
+
useTabsDescendantsContext: () => import_react89.useTabsDescendantsContext,
|
410
|
+
useTabsStyles: () => import_react89.useTabsStyles,
|
411
|
+
useTheme: () => import_react110.useTheme,
|
412
412
|
useToast: () => useToast,
|
413
|
-
useToken: () =>
|
413
|
+
useToken: () => import_react110.useToken
|
414
414
|
});
|
415
415
|
module.exports = __toCommonJS(src_exports);
|
416
416
|
|
@@ -4620,22 +4620,76 @@ var Rating = ({ value }) => {
|
|
4620
4620
|
var rating_default = Rating;
|
4621
4621
|
|
4622
4622
|
// src/components/select/components/select.tsx
|
4623
|
-
var
|
4623
|
+
var import_react80 = require("@chakra-ui/react");
|
4624
4624
|
var import_system6 = require("@chakra-ui/system");
|
4625
4625
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4626
4626
|
var import_react_select = __toESM(require("react-select"));
|
4627
4627
|
|
4628
|
+
// src/components/select/components/menu-list-virtualized.tsx
|
4629
|
+
var import_react_virtual = require("@tanstack/react-virtual");
|
4630
|
+
var import_react76 = require("react");
|
4631
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
4632
|
+
var MenuListVirtualized = (props) => {
|
4633
|
+
const { children, estimateSize, overscan, ...virtualizerProps } = props;
|
4634
|
+
const childrenArr = Array.isArray(children) ? children : [children];
|
4635
|
+
const itemCount = childrenArr.length;
|
4636
|
+
const parentRef = (0, import_react76.useRef)(null);
|
4637
|
+
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
4638
|
+
count: itemCount,
|
4639
|
+
getScrollElement: () => parentRef.current,
|
4640
|
+
estimateSize: estimateSize || (() => 42),
|
4641
|
+
overscan: overscan || 5,
|
4642
|
+
...virtualizerProps
|
4643
|
+
});
|
4644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4645
|
+
"div",
|
4646
|
+
{
|
4647
|
+
ref: parentRef,
|
4648
|
+
style: {
|
4649
|
+
height: `300px`,
|
4650
|
+
width: `100%`,
|
4651
|
+
overflow: "auto"
|
4652
|
+
},
|
4653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4654
|
+
"div",
|
4655
|
+
{
|
4656
|
+
style: {
|
4657
|
+
height: `${rowVirtualizer.getTotalSize()}px`,
|
4658
|
+
width: "100%",
|
4659
|
+
position: "relative"
|
4660
|
+
},
|
4661
|
+
children: rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4662
|
+
"div",
|
4663
|
+
{
|
4664
|
+
style: {
|
4665
|
+
position: "absolute",
|
4666
|
+
top: 0,
|
4667
|
+
left: 0,
|
4668
|
+
width: "100%",
|
4669
|
+
height: `${virtualRow.size}px`,
|
4670
|
+
transform: `translateY(${virtualRow.start}px)`
|
4671
|
+
},
|
4672
|
+
children: childrenArr[virtualRow.index]
|
4673
|
+
},
|
4674
|
+
virtualRow.index
|
4675
|
+
))
|
4676
|
+
}
|
4677
|
+
)
|
4678
|
+
}
|
4679
|
+
);
|
4680
|
+
};
|
4681
|
+
|
4628
4682
|
// src/config/theme/foundations/shadows.ts
|
4629
|
-
var
|
4683
|
+
var import_react77 = require("@chakra-ui/react");
|
4630
4684
|
var shadows = {
|
4631
|
-
...
|
4685
|
+
...import_react77.theme.shadows,
|
4632
4686
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4633
4687
|
};
|
4634
4688
|
|
4635
4689
|
// src/config/theme/foundations/sizes.ts
|
4636
|
-
var
|
4690
|
+
var import_react78 = require("@chakra-ui/react");
|
4637
4691
|
var sizes = {
|
4638
|
-
...
|
4692
|
+
...import_react78.theme.sizes,
|
4639
4693
|
4.5: "1.125rem",
|
4640
4694
|
9.5: "2.375rem",
|
4641
4695
|
18: "4.5rem",
|
@@ -4645,9 +4699,9 @@ var sizes = {
|
|
4645
4699
|
};
|
4646
4700
|
|
4647
4701
|
// src/config/theme/foundations/spacing.ts
|
4648
|
-
var
|
4702
|
+
var import_react79 = require("@chakra-ui/react");
|
4649
4703
|
var spacing = {
|
4650
|
-
...
|
4704
|
+
...import_react79.theme.space,
|
4651
4705
|
4.5: "1.125rem",
|
4652
4706
|
9.5: "2.375rem",
|
4653
4707
|
18: "4.5rem",
|
@@ -4997,22 +5051,22 @@ var themeSelect = (theme5) => {
|
|
4997
5051
|
};
|
4998
5052
|
|
4999
5053
|
// src/components/select/components/select.tsx
|
5000
|
-
var
|
5054
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
5001
5055
|
function DropdownIndicator(props) {
|
5002
|
-
return /* @__PURE__ */ (0,
|
5056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.DropdownIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.ChevronDown, { size: 4, color: "neutral.400" }) });
|
5003
5057
|
}
|
5004
5058
|
function ClearIndicator(props) {
|
5005
5059
|
const { hasValue } = props;
|
5006
|
-
return /* @__PURE__ */ (0,
|
5060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.ClearIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
5007
5061
|
}
|
5008
5062
|
function MultiValue(props) {
|
5009
|
-
return /* @__PURE__ */ (0,
|
5063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react80.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
5010
5064
|
}
|
5011
5065
|
function MultiValueRemove(props) {
|
5012
|
-
return /* @__PURE__ */ (0,
|
5066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react80.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
5013
5067
|
}
|
5014
5068
|
function NoOptionsMessage(props) {
|
5015
|
-
return /* @__PURE__ */ (0,
|
5069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react80.Center, { textStyle: "text.xs", py: "1.5", color: "black.medium", children: (props == null ? void 0 : props.options.length) === 0 ? "Opsi tidak tersedia" : "Hasil tidak ditemukan" });
|
5016
5070
|
}
|
5017
5071
|
function Select2({
|
5018
5072
|
styles,
|
@@ -5020,8 +5074,9 @@ function Select2({
|
|
5020
5074
|
...rest
|
5021
5075
|
}) {
|
5022
5076
|
const { colorMode } = (0, import_system6.useColorMode)();
|
5023
|
-
const { components, value, onChange } = rest;
|
5024
|
-
|
5077
|
+
const { components, value, onChange, virtualized } = rest;
|
5078
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
5025
5080
|
import_react_select.default,
|
5026
5081
|
{
|
5027
5082
|
"data-test-id": "",
|
@@ -5032,6 +5087,9 @@ function Select2({
|
|
5032
5087
|
MultiValue,
|
5033
5088
|
MultiValueRemove,
|
5034
5089
|
NoOptionsMessage,
|
5090
|
+
...virtualized ? {
|
5091
|
+
MenuList: renderMenuListVirtualized
|
5092
|
+
} : {},
|
5035
5093
|
...components
|
5036
5094
|
},
|
5037
5095
|
value,
|
@@ -5048,7 +5106,7 @@ var select_default = Select2;
|
|
5048
5106
|
// src/components/select/components/select-async.tsx
|
5049
5107
|
var import_system7 = require("@chakra-ui/system");
|
5050
5108
|
var import_react_select_async_paginate = require("react-select-async-paginate");
|
5051
|
-
var
|
5109
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
5052
5110
|
function SelectAsync({
|
5053
5111
|
styles,
|
5054
5112
|
isError = false,
|
@@ -5056,7 +5114,7 @@ function SelectAsync({
|
|
5056
5114
|
}) {
|
5057
5115
|
const { colorMode } = (0, import_system7.useColorMode)();
|
5058
5116
|
const { components } = rest;
|
5059
|
-
return /* @__PURE__ */ (0,
|
5117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
5060
5118
|
import_react_select_async_paginate.AsyncPaginate,
|
5061
5119
|
{
|
5062
5120
|
classNamePrefix: "react-select",
|
@@ -5078,10 +5136,10 @@ var select_async_default = SelectAsync;
|
|
5078
5136
|
// src/components/select/components/select-async-creatable.tsx
|
5079
5137
|
var import_system8 = require("@chakra-ui/system");
|
5080
5138
|
var import_async_creatable = __toESM(require("react-select/async-creatable"));
|
5081
|
-
var
|
5139
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
5082
5140
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
5083
5141
|
const { colorMode } = (0, import_system8.useColorMode)();
|
5084
|
-
return /* @__PURE__ */ (0,
|
5142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5085
5143
|
import_async_creatable.default,
|
5086
5144
|
{
|
5087
5145
|
classNamePrefix: "react-select",
|
@@ -5101,10 +5159,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
5101
5159
|
// src/components/select/components/select-creatable.tsx
|
5102
5160
|
var import_system9 = require("@chakra-ui/system");
|
5103
5161
|
var import_creatable = __toESM(require("react-select/creatable"));
|
5104
|
-
var
|
5162
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5105
5163
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
5106
5164
|
const { colorMode } = (0, import_system9.useColorMode)();
|
5107
|
-
return /* @__PURE__ */ (0,
|
5165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5108
5166
|
import_creatable.default,
|
5109
5167
|
{
|
5110
5168
|
classNamePrefix: "react-select",
|
@@ -5122,10 +5180,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
5122
5180
|
}
|
5123
5181
|
|
5124
5182
|
// src/components/select/components/select-with-checkbox.tsx
|
5125
|
-
var
|
5183
|
+
var import_react81 = require("@chakra-ui/react");
|
5126
5184
|
var import_system10 = require("@chakra-ui/system");
|
5127
5185
|
var import_react_select2 = __toESM(require("react-select"));
|
5128
|
-
var
|
5186
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5129
5187
|
var CHECKBOX_STATE = {
|
5130
5188
|
UNCHECKED: 0,
|
5131
5189
|
INDETERMINATE: 1,
|
@@ -5172,8 +5230,8 @@ var InputOption = ({
|
|
5172
5230
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
5173
5231
|
style
|
5174
5232
|
};
|
5175
|
-
return /* @__PURE__ */ (0,
|
5176
|
-
/* @__PURE__ */ (0,
|
5233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
5234
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5177
5235
|
import_react_select2.components.Option,
|
5178
5236
|
{
|
5179
5237
|
isMulti: true,
|
@@ -5184,8 +5242,8 @@ var InputOption = ({
|
|
5184
5242
|
getStyles,
|
5185
5243
|
innerProps: props,
|
5186
5244
|
...rest,
|
5187
|
-
children: /* @__PURE__ */ (0,
|
5188
|
-
|
5245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5246
|
+
import_react81.Flex,
|
5189
5247
|
{
|
5190
5248
|
alignItems: "center",
|
5191
5249
|
width: "100%",
|
@@ -5193,8 +5251,8 @@ var InputOption = ({
|
|
5193
5251
|
"data-test-id": "CT_component_select-checkbox_options",
|
5194
5252
|
cursor: isDisabled ? "not-allowed" : "default",
|
5195
5253
|
children: [
|
5196
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5197
|
-
|
5254
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5255
|
+
import_react81.Checkbox,
|
5198
5256
|
{
|
5199
5257
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
5200
5258
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -5203,8 +5261,8 @@ var InputOption = ({
|
|
5203
5261
|
"data-test-id": "CT_component_select-checkbox_select-all-option",
|
5204
5262
|
isInvalid: false
|
5205
5263
|
}
|
5206
|
-
) : /* @__PURE__ */ (0,
|
5207
|
-
|
5264
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5265
|
+
import_react81.Checkbox,
|
5208
5266
|
{
|
5209
5267
|
pointerEvents: "none",
|
5210
5268
|
isChecked: isSelected,
|
@@ -5212,13 +5270,13 @@ var InputOption = ({
|
|
5212
5270
|
isInvalid: false
|
5213
5271
|
}
|
5214
5272
|
),
|
5215
|
-
/* @__PURE__ */ (0,
|
5273
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react81.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
5216
5274
|
]
|
5217
5275
|
}
|
5218
5276
|
)
|
5219
5277
|
}
|
5220
5278
|
),
|
5221
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5279
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("hr", {}) : null
|
5222
5280
|
] });
|
5223
5281
|
};
|
5224
5282
|
var SelectWithCheckboxBase = ({
|
@@ -5231,7 +5289,7 @@ var SelectWithCheckboxBase = ({
|
|
5231
5289
|
...rest
|
5232
5290
|
}) => {
|
5233
5291
|
const { colorMode } = (0, import_system10.useColorMode)();
|
5234
|
-
return /* @__PURE__ */ (0,
|
5292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5235
5293
|
import_react_select2.default,
|
5236
5294
|
{
|
5237
5295
|
"data-test-id": "",
|
@@ -5250,8 +5308,9 @@ var SelectWithCheckboxBase = ({
|
|
5250
5308
|
);
|
5251
5309
|
};
|
5252
5310
|
var SelectCheckbox = (props) => {
|
5253
|
-
const { isMulti, options, value, components, ...rest } = props;
|
5311
|
+
const { isMulti, options, value, components, virtualized, ...rest } = props;
|
5254
5312
|
const selectValue = value || [];
|
5313
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5255
5314
|
const defaultComponents = {
|
5256
5315
|
DropdownIndicator,
|
5257
5316
|
ClearIndicator,
|
@@ -5263,10 +5322,10 @@ var SelectCheckbox = (props) => {
|
|
5263
5322
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
5264
5323
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
5265
5324
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
5266
|
-
return /* @__PURE__ */ (0,
|
5325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InputOption, { ...optionProps, checkedState });
|
5267
5326
|
}
|
5268
5327
|
};
|
5269
|
-
return /* @__PURE__ */ (0,
|
5328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5270
5329
|
SelectWithCheckboxBase,
|
5271
5330
|
{
|
5272
5331
|
"data-test-id": "",
|
@@ -5275,6 +5334,9 @@ var SelectCheckbox = (props) => {
|
|
5275
5334
|
value,
|
5276
5335
|
components: {
|
5277
5336
|
...defaultComponents,
|
5337
|
+
...virtualized ? {
|
5338
|
+
MenuList: renderMenuListVirtualized
|
5339
|
+
} : {},
|
5278
5340
|
...components
|
5279
5341
|
},
|
5280
5342
|
...rest
|
@@ -5284,13 +5346,13 @@ var SelectCheckbox = (props) => {
|
|
5284
5346
|
var select_with_checkbox_default = SelectCheckbox;
|
5285
5347
|
|
5286
5348
|
// src/components/sidebar/components/sidebar.tsx
|
5287
|
-
var
|
5349
|
+
var import_react82 = require("@chakra-ui/react");
|
5288
5350
|
var import_framer_motion = require("framer-motion");
|
5289
|
-
var
|
5351
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5290
5352
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5291
5353
|
const { width = "220px" } = props;
|
5292
|
-
return /* @__PURE__ */ (0,
|
5293
|
-
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5355
|
+
import_react82.Flex,
|
5294
5356
|
{
|
5295
5357
|
position: "relative",
|
5296
5358
|
as: import_framer_motion.motion.div,
|
@@ -5310,13 +5372,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5310
5372
|
Sidebar.displayName = "Sidebar";
|
5311
5373
|
|
5312
5374
|
// src/components/sidebar/components/sidebar-header.tsx
|
5313
|
-
var
|
5375
|
+
var import_react83 = require("@chakra-ui/react");
|
5314
5376
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5315
5377
|
var import_framer_motion2 = require("framer-motion");
|
5316
|
-
var
|
5378
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5317
5379
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5318
|
-
return /* @__PURE__ */ (0,
|
5319
|
-
|
5380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5381
|
+
import_react83.Box,
|
5320
5382
|
{
|
5321
5383
|
px: "2",
|
5322
5384
|
color: "neutral.900",
|
@@ -5325,8 +5387,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5325
5387
|
_hover: {
|
5326
5388
|
color: "primary.500"
|
5327
5389
|
},
|
5328
|
-
children: /* @__PURE__ */ (0,
|
5329
|
-
|
5390
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5391
|
+
import_react83.Flex,
|
5330
5392
|
{
|
5331
5393
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5332
5394
|
direction: "row",
|
@@ -5335,8 +5397,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5335
5397
|
onClick: () => setCollapse(!isCollapse),
|
5336
5398
|
cursor: "pointer",
|
5337
5399
|
children: [
|
5338
|
-
/* @__PURE__ */ (0,
|
5339
|
-
|
5400
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5401
|
+
import_react83.Box,
|
5340
5402
|
{
|
5341
5403
|
as: import_framer_motion2.motion.div,
|
5342
5404
|
boxSize: "4",
|
@@ -5344,11 +5406,11 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5344
5406
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
5345
5407
|
transitionTimingFunction: "linear",
|
5346
5408
|
"aria-label": "toggle sidebar",
|
5347
|
-
children: /* @__PURE__ */ (0,
|
5409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5348
5410
|
}
|
5349
5411
|
),
|
5350
|
-
/* @__PURE__ */ (0,
|
5351
|
-
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5413
|
+
import_react83.Text,
|
5352
5414
|
{
|
5353
5415
|
as: import_framer_motion2.motion.div,
|
5354
5416
|
w: "max-content",
|
@@ -5374,37 +5436,37 @@ SidebarHeader.defaultProps = {
|
|
5374
5436
|
};
|
5375
5437
|
|
5376
5438
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5377
|
-
var
|
5439
|
+
var import_react84 = require("@chakra-ui/react");
|
5378
5440
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5379
5441
|
var import_framer_motion3 = require("framer-motion");
|
5380
|
-
var
|
5442
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5381
5443
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5382
|
-
return /* @__PURE__ */ (0,
|
5383
|
-
|
5444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5445
|
+
import_react84.Box,
|
5384
5446
|
{
|
5385
5447
|
as: import_framer_motion3.motion.div,
|
5386
5448
|
transitionTimingFunction: "linear",
|
5387
5449
|
initial: { padding: "8px" },
|
5388
5450
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5389
|
-
children: /* @__PURE__ */ (0,
|
5451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5390
5452
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5391
|
-
return /* @__PURE__ */ (0,
|
5453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5392
5454
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5393
5455
|
const noChild = !item.children.length;
|
5394
5456
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5395
|
-
return /* @__PURE__ */ (0,
|
5396
|
-
/* @__PURE__ */ (0,
|
5457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
5458
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5397
5459
|
const activeOption = isOpen ? "primary.50" : "white";
|
5398
5460
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5399
5461
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5400
|
-
return /* @__PURE__ */ (0,
|
5401
|
-
/* @__PURE__ */ (0,
|
5402
|
-
|
5462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
5463
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5464
|
+
import_react84.AccordionButton,
|
5403
5465
|
{
|
5404
5466
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5405
5467
|
p: "0",
|
5406
5468
|
h: "fit-content",
|
5407
|
-
children: /* @__PURE__ */ (0,
|
5469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5408
5470
|
NavItem,
|
5409
5471
|
{
|
5410
5472
|
as: import_framer_motion3.motion.div,
|
@@ -5417,9 +5479,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5417
5479
|
position: "relative",
|
5418
5480
|
...itemStyles,
|
5419
5481
|
children: [
|
5420
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5421
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5422
|
-
|
5482
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5483
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5484
|
+
import_react84.Box,
|
5423
5485
|
{
|
5424
5486
|
display: "flex",
|
5425
5487
|
w: "full",
|
@@ -5433,16 +5495,16 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5433
5495
|
animate: { opacity: 1, x: 0 },
|
5434
5496
|
exit: { opacity: 0, x: 16 },
|
5435
5497
|
children: [
|
5436
|
-
/* @__PURE__ */ (0,
|
5437
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5438
|
-
|
5498
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5499
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5500
|
+
import_react84.Box,
|
5439
5501
|
{
|
5440
5502
|
display: "flex",
|
5441
5503
|
boxSize: "3",
|
5442
5504
|
as: import_framer_motion3.motion.div,
|
5443
5505
|
transitionTimingFunction: "linear",
|
5444
5506
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
5445
|
-
children: /* @__PURE__ */ (0,
|
5507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon8.ChevronDown, { size: 3 })
|
5446
5508
|
}
|
5447
5509
|
)
|
5448
5510
|
]
|
@@ -5455,12 +5517,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5455
5517
|
},
|
5456
5518
|
item.id
|
5457
5519
|
) }, item.id),
|
5458
|
-
isOpenOptions && /* @__PURE__ */ (0,
|
5459
|
-
/* @__PURE__ */ (0,
|
5520
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react84.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5521
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react84.Box, { display: "flex", alignItems: "center", children: [
|
5460
5522
|
mappingIcon2.get(item.icon || ""),
|
5461
|
-
/* @__PURE__ */ (0,
|
5523
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { as: "span", ml: "2", children: item.title })
|
5462
5524
|
] }) }),
|
5463
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5525
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5464
5526
|
NavItem,
|
5465
5527
|
{
|
5466
5528
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5476,7 +5538,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5476
5538
|
},
|
5477
5539
|
submenu.id
|
5478
5540
|
)) })
|
5479
|
-
] }) : isCollapse && /* @__PURE__ */ (0,
|
5541
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5480
5542
|
NavItem,
|
5481
5543
|
{
|
5482
5544
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5489,22 +5551,22 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5489
5551
|
rounded: "none",
|
5490
5552
|
...itemStyles,
|
5491
5553
|
children: [
|
5492
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5493
|
-
/* @__PURE__ */ (0,
|
5554
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5494
5556
|
]
|
5495
5557
|
},
|
5496
5558
|
item.id
|
5497
5559
|
) }) }) })
|
5498
5560
|
] });
|
5499
5561
|
} }, item.id),
|
5500
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5501
|
-
|
5562
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5563
|
+
import_react84.Fade,
|
5502
5564
|
{
|
5503
5565
|
in: true,
|
5504
5566
|
transition: {
|
5505
5567
|
enter: { duration: 0.5 }
|
5506
5568
|
},
|
5507
|
-
children: /* @__PURE__ */ (0,
|
5569
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5508
5570
|
NavItem,
|
5509
5571
|
{
|
5510
5572
|
mt: "1",
|
@@ -5532,16 +5594,16 @@ SidebarMenu.defaultProps = {
|
|
5532
5594
|
};
|
5533
5595
|
|
5534
5596
|
// src/components/switch/components/switch.tsx
|
5535
|
-
var
|
5597
|
+
var import_react85 = require("@chakra-ui/react");
|
5536
5598
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5537
5599
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5538
|
-
var
|
5539
|
-
var
|
5540
|
-
var Switch = (0,
|
5541
|
-
const styles = (0,
|
5542
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
5543
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
5544
|
-
const containerStyles = (0,
|
5600
|
+
var import_react86 = require("react");
|
5601
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
5602
|
+
var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
5603
|
+
const styles = (0, import_react85.useMultiStyleConfig)("Switch", props);
|
5604
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react85.omitThemingProps)(props);
|
5605
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react85.useCheckbox)(ownProps);
|
5606
|
+
const containerStyles = (0, import_react86.useMemo)(
|
5545
5607
|
() => ({
|
5546
5608
|
display: "inline-block",
|
5547
5609
|
position: "relative",
|
@@ -5551,7 +5613,7 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5551
5613
|
}),
|
5552
5614
|
[styles.container]
|
5553
5615
|
);
|
5554
|
-
const trackStyles = (0,
|
5616
|
+
const trackStyles = (0, import_react86.useMemo)(
|
5555
5617
|
() => ({
|
5556
5618
|
display: "inline-flex",
|
5557
5619
|
flexShrink: 0,
|
@@ -5563,7 +5625,7 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5563
5625
|
}),
|
5564
5626
|
[styles.track]
|
5565
5627
|
);
|
5566
|
-
const labelStyles = (0,
|
5628
|
+
const labelStyles = (0, import_react86.useMemo)(
|
5567
5629
|
() => ({
|
5568
5630
|
userSelect: "none",
|
5569
5631
|
marginStart: spacing2,
|
@@ -5579,8 +5641,8 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5579
5641
|
};
|
5580
5642
|
return iconSize[value];
|
5581
5643
|
};
|
5582
|
-
return /* @__PURE__ */ (0,
|
5583
|
-
|
5644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5645
|
+
import_react85.chakra.label,
|
5584
5646
|
{
|
5585
5647
|
...getRootProps(),
|
5586
5648
|
display: "flex",
|
@@ -5588,14 +5650,14 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5588
5650
|
className: (0, import_shared_utils10.cx)("chakra-switch", props.className),
|
5589
5651
|
__css: containerStyles,
|
5590
5652
|
children: [
|
5591
|
-
/* @__PURE__ */ (0,
|
5592
|
-
/* @__PURE__ */ (0,
|
5593
|
-
/* @__PURE__ */ (0,
|
5594
|
-
/* @__PURE__ */ (0,
|
5595
|
-
/* @__PURE__ */ (0,
|
5653
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5654
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react85.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5655
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react85.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5656
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5657
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5596
5658
|
] }),
|
5597
|
-
/* @__PURE__ */ (0,
|
5598
|
-
|
5659
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5660
|
+
import_react85.chakra.span,
|
5599
5661
|
{
|
5600
5662
|
__css: styles.thumb,
|
5601
5663
|
className: "chakra-switch__thumb",
|
@@ -5604,8 +5666,8 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5604
5666
|
}
|
5605
5667
|
)
|
5606
5668
|
] }),
|
5607
|
-
children && /* @__PURE__ */ (0,
|
5608
|
-
|
5669
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5670
|
+
import_react85.chakra.span,
|
5609
5671
|
{
|
5610
5672
|
className: "chakra-switch__label",
|
5611
5673
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5625,18 +5687,18 @@ Switch.defaultProps = {
|
|
5625
5687
|
var switch_default = Switch;
|
5626
5688
|
|
5627
5689
|
// src/components/table/index.tsx
|
5628
|
-
var
|
5690
|
+
var import_react87 = require("@chakra-ui/react");
|
5629
5691
|
|
5630
5692
|
// src/components/tabs/components/tab.tsx
|
5631
|
-
var
|
5632
|
-
var
|
5633
|
-
var Tab = (0,
|
5693
|
+
var import_react88 = require("@chakra-ui/react");
|
5694
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5695
|
+
var Tab = (0, import_react88.forwardRef)((props, ref) => {
|
5634
5696
|
var _a, _b;
|
5635
|
-
const tabProps = (0,
|
5697
|
+
const tabProps = (0, import_react88.useTab)({ ...props, ref });
|
5636
5698
|
const isSelected = !!tabProps["aria-selected"];
|
5637
|
-
const styles = (0,
|
5638
|
-
return /* @__PURE__ */ (0,
|
5639
|
-
|
5699
|
+
const styles = (0, import_react88.useMultiStyleConfig)("Tabs", tabProps);
|
5700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5701
|
+
import_react88.Button,
|
5640
5702
|
{
|
5641
5703
|
"data-test-id": props["data-test-id"],
|
5642
5704
|
p: 4,
|
@@ -5661,7 +5723,7 @@ var Tab = (0, import_react87.forwardRef)((props, ref) => {
|
|
5661
5723
|
},
|
5662
5724
|
__css: styles.tab,
|
5663
5725
|
...tabProps,
|
5664
|
-
children: /* @__PURE__ */ (0,
|
5726
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react88.Flex, { alignItems: "center", children: [
|
5665
5727
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5666
5728
|
tabProps.children,
|
5667
5729
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5672,39 +5734,39 @@ var Tab = (0, import_react87.forwardRef)((props, ref) => {
|
|
5672
5734
|
var tab_default = Tab;
|
5673
5735
|
|
5674
5736
|
// src/components/tabs/index.ts
|
5675
|
-
var
|
5737
|
+
var import_react89 = require("@chakra-ui/react");
|
5676
5738
|
|
5677
5739
|
// src/components/text/index.ts
|
5678
|
-
var
|
5740
|
+
var import_react90 = require("@chakra-ui/react");
|
5679
5741
|
|
5680
5742
|
// src/components/time-input/components/index.tsx
|
5681
|
-
var
|
5743
|
+
var import_react92 = require("@chakra-ui/react");
|
5682
5744
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5683
|
-
var
|
5745
|
+
var import_react93 = require("react");
|
5684
5746
|
|
5685
5747
|
// src/components/time-input/components/integration.tsx
|
5686
5748
|
var import_timescape = require("@zamiru/timescape");
|
5687
5749
|
var import_timescape2 = require("@zamiru/timescape");
|
5688
|
-
var
|
5750
|
+
var import_react91 = require("react");
|
5689
5751
|
var useTimescape = (options = {}) => {
|
5690
5752
|
var _a;
|
5691
5753
|
const { date, onChangeDate, ...rest } = options;
|
5692
|
-
const [manager] = (0,
|
5693
|
-
const onChangeDateRef = (0,
|
5694
|
-
(0,
|
5754
|
+
const [manager] = (0, import_react91.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5755
|
+
const onChangeDateRef = (0, import_react91.useRef)(onChangeDate);
|
5756
|
+
(0, import_react91.useLayoutEffect)(() => {
|
5695
5757
|
onChangeDateRef.current = onChangeDate;
|
5696
5758
|
}, [onChangeDate]);
|
5697
|
-
const [optionsState, update] = (0,
|
5759
|
+
const [optionsState, update] = (0, import_react91.useState)(() => ({
|
5698
5760
|
date,
|
5699
5761
|
...rest
|
5700
5762
|
}));
|
5701
|
-
(0,
|
5763
|
+
(0, import_react91.useEffect)(() => {
|
5702
5764
|
manager.resync();
|
5703
5765
|
return () => {
|
5704
5766
|
manager.remove();
|
5705
5767
|
};
|
5706
5768
|
}, [manager]);
|
5707
|
-
(0,
|
5769
|
+
(0, import_react91.useEffect)(() => {
|
5708
5770
|
return manager.on("changeDate", (nextDate) => {
|
5709
5771
|
var _a2;
|
5710
5772
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5712,7 +5774,7 @@ var useTimescape = (options = {}) => {
|
|
5712
5774
|
});
|
5713
5775
|
}, [manager]);
|
5714
5776
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5715
|
-
(0,
|
5777
|
+
(0, import_react91.useEffect)(() => {
|
5716
5778
|
manager.date = timestamp;
|
5717
5779
|
manager.minDate = optionsState.minDate;
|
5718
5780
|
manager.maxDate = optionsState.maxDate;
|
@@ -5754,7 +5816,7 @@ var useTimescape = (options = {}) => {
|
|
5754
5816
|
};
|
5755
5817
|
|
5756
5818
|
// src/components/time-input/components/index.tsx
|
5757
|
-
var
|
5819
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5758
5820
|
var timeDigitFormat = (number) => {
|
5759
5821
|
if (number.toString().length === 1) {
|
5760
5822
|
return `0${number}`;
|
@@ -5778,9 +5840,9 @@ var timeFromString = (timeString) => {
|
|
5778
5840
|
const [hours, minutes, seconds] = timeString.split(":");
|
5779
5841
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5780
5842
|
};
|
5781
|
-
var InputTimeArea = (0,
|
5782
|
-
return /* @__PURE__ */ (0,
|
5783
|
-
|
5843
|
+
var InputTimeArea = (0, import_react92.forwardRef)((props, ref) => {
|
5844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5845
|
+
import_react92.Input,
|
5784
5846
|
{
|
5785
5847
|
_focusWithin: {
|
5786
5848
|
bg: "neutral.300"
|
@@ -5798,7 +5860,7 @@ var InputTimeArea = (0, import_react91.forwardRef)((props, ref) => {
|
|
5798
5860
|
}
|
5799
5861
|
);
|
5800
5862
|
});
|
5801
|
-
var TimeInput2 = (0,
|
5863
|
+
var TimeInput2 = (0, import_react92.forwardRef)(
|
5802
5864
|
({
|
5803
5865
|
name,
|
5804
5866
|
config: config2,
|
@@ -5825,7 +5887,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5825
5887
|
date,
|
5826
5888
|
...config2
|
5827
5889
|
});
|
5828
|
-
(0,
|
5890
|
+
(0, import_react93.useEffect)(() => {
|
5829
5891
|
var _a, _b, _c, _d, _e, _f;
|
5830
5892
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5831
5893
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5834,7 +5896,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5834
5896
|
onChangeTime(timeValue);
|
5835
5897
|
}
|
5836
5898
|
}, [options.date]);
|
5837
|
-
(0,
|
5899
|
+
(0, import_react93.useImperativeHandle)(ref, () => ({
|
5838
5900
|
focus() {
|
5839
5901
|
_manager.focusField("hours");
|
5840
5902
|
}
|
@@ -5855,7 +5917,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5855
5917
|
};
|
5856
5918
|
};
|
5857
5919
|
const { outlineColor, focusColor } = getProperties();
|
5858
|
-
return /* @__PURE__ */ (0,
|
5920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5859
5921
|
field_default,
|
5860
5922
|
{
|
5861
5923
|
isError,
|
@@ -5864,8 +5926,8 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5864
5926
|
errorMessage,
|
5865
5927
|
isDisabled,
|
5866
5928
|
isSuccess,
|
5867
|
-
children: /* @__PURE__ */ (0,
|
5868
|
-
|
5929
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5930
|
+
import_react92.Box,
|
5869
5931
|
{
|
5870
5932
|
transition: "all 0.15s",
|
5871
5933
|
boxShadow: "none",
|
@@ -5875,8 +5937,8 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5875
5937
|
_focusWithin: {
|
5876
5938
|
borderColor: focusColor
|
5877
5939
|
},
|
5878
|
-
children: /* @__PURE__ */ (0,
|
5879
|
-
|
5940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5941
|
+
import_react92.InputGroup,
|
5880
5942
|
{
|
5881
5943
|
borderRadius: "sm",
|
5882
5944
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5885,17 +5947,17 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5885
5947
|
gap: 3,
|
5886
5948
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5887
5949
|
children: [
|
5888
|
-
/* @__PURE__ */ (0,
|
5889
|
-
/* @__PURE__ */ (0,
|
5890
|
-
/* @__PURE__ */ (0,
|
5891
|
-
/* @__PURE__ */ (0,
|
5892
|
-
seconds && /* @__PURE__ */ (0,
|
5893
|
-
/* @__PURE__ */ (0,
|
5894
|
-
/* @__PURE__ */ (0,
|
5950
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5951
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5952
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
5953
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
5954
|
+
seconds && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5955
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
5956
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5895
5957
|
] }),
|
5896
|
-
options.hour12 && /* @__PURE__ */ (0,
|
5958
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Input, { p: 0, ...getInputProps("am/pm") })
|
5897
5959
|
] }),
|
5898
|
-
/* @__PURE__ */ (0,
|
5960
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5899
5961
|
addOnRight
|
5900
5962
|
]
|
5901
5963
|
}
|
@@ -5908,16 +5970,16 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5908
5970
|
);
|
5909
5971
|
|
5910
5972
|
// src/components/toast/components/toast.tsx
|
5911
|
-
var
|
5973
|
+
var import_react95 = require("@chakra-ui/react");
|
5912
5974
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5913
5975
|
var import_react_toastify = require("react-toastify");
|
5914
5976
|
|
5915
5977
|
// src/components/toast/components/styles.tsx
|
5916
|
-
var
|
5917
|
-
var
|
5978
|
+
var import_react94 = require("@emotion/react");
|
5979
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
5918
5980
|
var Styles2 = () => {
|
5919
|
-
return /* @__PURE__ */ (0,
|
5920
|
-
|
5981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5982
|
+
import_react94.Global,
|
5921
5983
|
{
|
5922
5984
|
styles: `
|
5923
5985
|
:root {
|
@@ -5951,10 +6013,10 @@ var Styles2 = () => {
|
|
5951
6013
|
var styles_default2 = Styles2;
|
5952
6014
|
|
5953
6015
|
// src/components/toast/components/toast.tsx
|
5954
|
-
var
|
6016
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
5955
6017
|
var CustomCloseButton = (props) => {
|
5956
6018
|
const { closeToast } = props;
|
5957
|
-
return /* @__PURE__ */ (0,
|
6019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: () => closeToast(), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
|
5958
6020
|
};
|
5959
6021
|
var DEFAULT_OPTIONS = {
|
5960
6022
|
position: "top-right",
|
@@ -5977,7 +6039,7 @@ var renderIcon = (icon, type) => {
|
|
5977
6039
|
return icon;
|
5978
6040
|
};
|
5979
6041
|
var useToast = () => {
|
5980
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
6042
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react95.useToken)("colors", [
|
5981
6043
|
"primary.500",
|
5982
6044
|
"neutral.500",
|
5983
6045
|
"info.500",
|
@@ -5986,15 +6048,15 @@ var useToast = () => {
|
|
5986
6048
|
"success.500"
|
5987
6049
|
]);
|
5988
6050
|
const content = (icon, message, link) => {
|
5989
|
-
return /* @__PURE__ */ (0,
|
5990
|
-
/* @__PURE__ */ (0,
|
5991
|
-
/* @__PURE__ */ (0,
|
5992
|
-
/* @__PURE__ */ (0,
|
5993
|
-
icon && /* @__PURE__ */ (0,
|
5994
|
-
/* @__PURE__ */ (0,
|
6051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
6052
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(styles_default2, {}),
|
6053
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
|
6054
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Flex, { alignItems: "center", children: [
|
6055
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
6056
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.chakra.span, { noOfLines: 2, children: message })
|
5995
6057
|
] }),
|
5996
|
-
link && /* @__PURE__ */ (0,
|
5997
|
-
|
6058
|
+
link && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6059
|
+
import_react95.Link,
|
5998
6060
|
{
|
5999
6061
|
as: link.as,
|
6000
6062
|
href: link.url,
|
@@ -6074,9 +6136,9 @@ var useToast = () => {
|
|
6074
6136
|
var import_react_toastify2 = require("react-toastify");
|
6075
6137
|
|
6076
6138
|
// src/components/uploader/components/uploader.tsx
|
6077
|
-
var
|
6139
|
+
var import_react96 = require("@chakra-ui/react");
|
6078
6140
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
6079
|
-
var
|
6141
|
+
var import_react97 = require("react");
|
6080
6142
|
var import_react_dropzone = require("react-dropzone");
|
6081
6143
|
|
6082
6144
|
// src/components/uploader/constants.ts
|
@@ -6163,7 +6225,7 @@ var defaultOnHandleRejections = (fileRejection, config2, handleRejection) => {
|
|
6163
6225
|
};
|
6164
6226
|
|
6165
6227
|
// src/components/uploader/components/uploader.tsx
|
6166
|
-
var
|
6228
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
6167
6229
|
var Uploader = ({
|
6168
6230
|
onHandleUploadFile,
|
6169
6231
|
onHandleRejections,
|
@@ -6195,15 +6257,15 @@ var Uploader = ({
|
|
6195
6257
|
customErrorRejection,
|
6196
6258
|
...props
|
6197
6259
|
}) => {
|
6198
|
-
const [filePreview, setFilePreview] = (0,
|
6199
|
-
const [isError, setIsError] = (0,
|
6200
|
-
const [errorText, setErrorText] = (0,
|
6201
|
-
(0,
|
6260
|
+
const [filePreview, setFilePreview] = (0, import_react97.useState)();
|
6261
|
+
const [isError, setIsError] = (0, import_react97.useState)(propIsError);
|
6262
|
+
const [errorText, setErrorText] = (0, import_react97.useState)(propErrorText);
|
6263
|
+
(0, import_react97.useEffect)(() => {
|
6202
6264
|
setIsError(propIsError);
|
6203
6265
|
setErrorText(propErrorText);
|
6204
6266
|
}, [propIsError, propErrorText]);
|
6205
6267
|
const toast2 = useToast();
|
6206
|
-
const handleRejection = (0,
|
6268
|
+
const handleRejection = (0, import_react97.useCallback)(
|
6207
6269
|
(message, file, image, errorCode) => {
|
6208
6270
|
if (onHandleRejections) {
|
6209
6271
|
onHandleRejections(file, image, errorCode);
|
@@ -6226,7 +6288,7 @@ var Uploader = ({
|
|
6226
6288
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
6227
6289
|
[onHandleRejections, customErrorRejection]
|
6228
6290
|
);
|
6229
|
-
const onDropAccepted = (0,
|
6291
|
+
const onDropAccepted = (0, import_react97.useCallback)(
|
6230
6292
|
(files) => {
|
6231
6293
|
const file = files[0];
|
6232
6294
|
setIsError(false);
|
@@ -6261,10 +6323,10 @@ var Uploader = ({
|
|
6261
6323
|
},
|
6262
6324
|
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
|
6263
6325
|
);
|
6264
|
-
const onDropRejected = (0,
|
6326
|
+
const onDropRejected = (0, import_react97.useCallback)((fileRejections) => {
|
6265
6327
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
6266
6328
|
}, []);
|
6267
|
-
const validator = (0,
|
6329
|
+
const validator = (0, import_react97.useCallback)(
|
6268
6330
|
(file) => {
|
6269
6331
|
const result = [];
|
6270
6332
|
if (validatorExt) {
|
@@ -6296,27 +6358,27 @@ var Uploader = ({
|
|
6296
6358
|
});
|
6297
6359
|
const renderHelperText = () => {
|
6298
6360
|
if (Array.isArray(helperText)) {
|
6299
|
-
return /* @__PURE__ */ (0,
|
6300
|
-
|
6361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6362
|
+
import_react96.UnorderedList,
|
6301
6363
|
{
|
6302
6364
|
pl: 2,
|
6303
6365
|
fontSize: 12,
|
6304
6366
|
color: "black.medium",
|
6305
6367
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6306
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0,
|
6368
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.ListItem, { children: text2 }, text2))
|
6307
6369
|
}
|
6308
6370
|
);
|
6309
6371
|
}
|
6310
6372
|
return helperText;
|
6311
6373
|
};
|
6312
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0,
|
6374
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6313
6375
|
const handleRemove = (e) => {
|
6314
6376
|
e.stopPropagation();
|
6315
6377
|
setFilePreview(void 0);
|
6316
6378
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6317
6379
|
acceptedFiles.pop();
|
6318
6380
|
};
|
6319
|
-
(0,
|
6381
|
+
(0, import_react97.useEffect)(() => {
|
6320
6382
|
if (value) {
|
6321
6383
|
if (typeof value === "string") {
|
6322
6384
|
setFilePreview(value);
|
@@ -6340,16 +6402,16 @@ var Uploader = ({
|
|
6340
6402
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6341
6403
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6342
6404
|
const cursorType = filePreview ? "initial" : "pointer";
|
6343
|
-
return /* @__PURE__ */ (0,
|
6405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.FormControl, { isRequired, children: [
|
6344
6406
|
label && typeof label === "string" ? (
|
6345
6407
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6346
|
-
/* @__PURE__ */ (0,
|
6347
|
-
isRequired && /* @__PURE__ */ (0,
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, {}), fontSize: "text.sm", children: [
|
6409
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.RequiredIndicator, { mr: 1, ml: 0 }),
|
6348
6410
|
label
|
6349
6411
|
] })
|
6350
6412
|
) : label,
|
6351
|
-
/* @__PURE__ */ (0,
|
6352
|
-
|
6413
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
6414
|
+
import_react96.Flex,
|
6353
6415
|
{
|
6354
6416
|
minH: containerHeight,
|
6355
6417
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6366,8 +6428,8 @@ var Uploader = ({
|
|
6366
6428
|
...props,
|
6367
6429
|
...getRootProps(),
|
6368
6430
|
children: [
|
6369
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0,
|
6370
|
-
|
6431
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6432
|
+
import_react96.Button,
|
6371
6433
|
{
|
6372
6434
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6373
6435
|
"aria-label": "remove-image",
|
@@ -6381,32 +6443,32 @@ var Uploader = ({
|
|
6381
6443
|
border: "none",
|
6382
6444
|
zIndex: 1,
|
6383
6445
|
onClick: handleRemove,
|
6384
|
-
children: /* @__PURE__ */ (0,
|
6446
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6385
6447
|
}
|
6386
6448
|
) }),
|
6387
|
-
filePreview && /* @__PURE__ */ (0,
|
6388
|
-
|
6449
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6450
|
+
import_react96.Flex,
|
6389
6451
|
{
|
6390
6452
|
position: "relative",
|
6391
6453
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6392
6454
|
justify: "center",
|
6393
6455
|
align: "center",
|
6394
|
-
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0,
|
6395
|
-
|
6456
|
+
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6457
|
+
import_react96.Image,
|
6396
6458
|
{
|
6397
6459
|
h: size2 === "lg" ? "120" : "100",
|
6398
6460
|
src: filePreview,
|
6399
6461
|
alt: "uploader-preview",
|
6400
6462
|
objectFit: "contain"
|
6401
6463
|
}
|
6402
|
-
) : /* @__PURE__ */ (0,
|
6464
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { noOfLines: 3, mx: 2, textAlign: "center", children: filePreview })
|
6403
6465
|
}
|
6404
6466
|
) }),
|
6405
|
-
!filePreview && /* @__PURE__ */ (0,
|
6406
|
-
size2 === "sm" && /* @__PURE__ */ (0,
|
6407
|
-
/* @__PURE__ */ (0,
|
6408
|
-
!filePreview && /* @__PURE__ */ (0,
|
6409
|
-
|
6467
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6468
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6469
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.Box, { children: [
|
6470
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6471
|
+
import_react96.Heading,
|
6410
6472
|
{
|
6411
6473
|
fontWeight: "400",
|
6412
6474
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6415,21 +6477,21 @@ var Uploader = ({
|
|
6415
6477
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6416
6478
|
}
|
6417
6479
|
),
|
6418
|
-
size2 === "lg" && /* @__PURE__ */ (0,
|
6480
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6419
6481
|
] })
|
6420
6482
|
] }) })
|
6421
6483
|
]
|
6422
6484
|
}
|
6423
6485
|
),
|
6424
|
-
/* @__PURE__ */ (0,
|
6486
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6425
6487
|
"input",
|
6426
6488
|
{
|
6427
6489
|
...getInputProps(),
|
6428
6490
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6429
6491
|
}
|
6430
6492
|
),
|
6431
|
-
filePreview && !isSmall && /* @__PURE__ */ (0,
|
6432
|
-
|
6493
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6494
|
+
import_react96.Button,
|
6433
6495
|
{
|
6434
6496
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6435
6497
|
type: "button",
|
@@ -6475,10 +6537,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6475
6537
|
};
|
6476
6538
|
|
6477
6539
|
// src/components/index.ts
|
6478
|
-
var
|
6540
|
+
var import_react98 = require("@chakra-ui/react");
|
6479
6541
|
|
6480
6542
|
// src/config/theme/themeConfiguration.ts
|
6481
|
-
var
|
6543
|
+
var import_react106 = require("@chakra-ui/react");
|
6482
6544
|
|
6483
6545
|
// src/config/theme/components/index.ts
|
6484
6546
|
var components_exports = {};
|
@@ -7035,8 +7097,8 @@ var card_default2 = CardStyle;
|
|
7035
7097
|
|
7036
7098
|
// src/config/theme/components/checkbox.ts
|
7037
7099
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
7038
|
-
var
|
7039
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
7100
|
+
var import_react99 = require("@chakra-ui/react");
|
7101
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react99.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
7040
7102
|
var baseStyle3 = definePartsStyle3({
|
7041
7103
|
control: {
|
7042
7104
|
borderRadius: "sm",
|
@@ -7137,8 +7199,8 @@ var checkbox_default2 = Checkbox3;
|
|
7137
7199
|
|
7138
7200
|
// src/config/theme/components/chips.ts
|
7139
7201
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
7140
|
-
var
|
7141
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
7202
|
+
var import_react100 = require("@chakra-ui/react");
|
7203
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react100.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
7142
7204
|
var baseStyle4 = definePartsStyle4({
|
7143
7205
|
container: {
|
7144
7206
|
px: 3,
|
@@ -7347,8 +7409,8 @@ var input_default = Input4;
|
|
7347
7409
|
|
7348
7410
|
// src/config/theme/components/loader.ts
|
7349
7411
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7350
|
-
var
|
7351
|
-
var rotate = (0,
|
7412
|
+
var import_react101 = require("@emotion/react");
|
7413
|
+
var rotate = (0, import_react101.keyframes)({
|
7352
7414
|
"0%": {
|
7353
7415
|
transform: "rotate(0deg)"
|
7354
7416
|
},
|
@@ -7530,8 +7592,8 @@ var modal_default = modalTheme;
|
|
7530
7592
|
|
7531
7593
|
// src/config/theme/components/popover.ts
|
7532
7594
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7533
|
-
var
|
7534
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
7595
|
+
var import_react102 = require("@chakra-ui/react");
|
7596
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react102.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
7535
7597
|
var baseStyle8 = definePartsStyle7({
|
7536
7598
|
content: {
|
7537
7599
|
bg: "white"
|
@@ -7542,8 +7604,8 @@ var popover_default = popoverTheme;
|
|
7542
7604
|
|
7543
7605
|
// src/config/theme/components/radio.ts
|
7544
7606
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7545
|
-
var
|
7546
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
7607
|
+
var import_react103 = require("@chakra-ui/react");
|
7608
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react103.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
7547
7609
|
var baseStyle9 = definePartsStyle8({
|
7548
7610
|
control: {
|
7549
7611
|
border: "1px solid",
|
@@ -7965,7 +8027,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7965
8027
|
var tabs_default = tabsTheme;
|
7966
8028
|
|
7967
8029
|
// src/config/theme/components/textarea.ts
|
7968
|
-
var
|
8030
|
+
var import_react104 = require("@chakra-ui/react");
|
7969
8031
|
var getProps = (props) => {
|
7970
8032
|
const { isError, isSuccess, isDisabled } = props;
|
7971
8033
|
let borderColor = "neutral.400";
|
@@ -7985,7 +8047,7 @@ var getProps = (props) => {
|
|
7985
8047
|
borderColor
|
7986
8048
|
};
|
7987
8049
|
};
|
7988
|
-
var outline3 = (0,
|
8050
|
+
var outline3 = (0, import_react104.defineStyle)((props) => {
|
7989
8051
|
const { focusBorderColor, borderColor } = getProps(props);
|
7990
8052
|
return {
|
7991
8053
|
background: "white.high",
|
@@ -8029,7 +8091,7 @@ var outline3 = (0, import_react103.defineStyle)((props) => {
|
|
8029
8091
|
}
|
8030
8092
|
};
|
8031
8093
|
});
|
8032
|
-
var Textarea = (0,
|
8094
|
+
var Textarea = (0, import_react104.defineStyleConfig)({
|
8033
8095
|
variants: { outline: outline3 },
|
8034
8096
|
defaultProps: {
|
8035
8097
|
variant: "outline"
|
@@ -8038,15 +8100,15 @@ var Textarea = (0, import_react103.defineStyleConfig)({
|
|
8038
8100
|
var textarea_default2 = Textarea;
|
8039
8101
|
|
8040
8102
|
// src/config/theme/components/tooltip.ts
|
8041
|
-
var
|
8042
|
-
var $arrowBg = (0,
|
8103
|
+
var import_react105 = require("@chakra-ui/react");
|
8104
|
+
var $arrowBg = (0, import_react105.cssVar)("popper-arrow-bg");
|
8043
8105
|
var baseStyle12 = {
|
8044
8106
|
bg: "neutral.700",
|
8045
8107
|
textStyle: "text.sm",
|
8046
8108
|
fontSize: "text.sm",
|
8047
8109
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
8048
8110
|
};
|
8049
|
-
var Tooltip2 = (0,
|
8111
|
+
var Tooltip2 = (0, import_react105.defineStyleConfig)({ baseStyle: baseStyle12 });
|
8050
8112
|
var tooltip_default = Tooltip2;
|
8051
8113
|
|
8052
8114
|
// src/config/theme/themeConfiguration.ts
|
@@ -8065,7 +8127,7 @@ var createExtendTheme = (theme5) => {
|
|
8065
8127
|
return function extendTheme2(...extensions) {
|
8066
8128
|
let overrides = [...extensions];
|
8067
8129
|
let activeTheme = extensions[extensions.length - 1];
|
8068
|
-
if ((0,
|
8130
|
+
if ((0, import_react106.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
8069
8131
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
8070
8132
|
overrides.length > 1) {
|
8071
8133
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -8074,13 +8136,13 @@ var createExtendTheme = (theme5) => {
|
|
8074
8136
|
}
|
8075
8137
|
return pipe(
|
8076
8138
|
...overrides.map(
|
8077
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
8139
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react106.mergeThemeOverride)(prevTheme, extension)
|
8078
8140
|
)
|
8079
8141
|
)(activeTheme);
|
8080
8142
|
};
|
8081
8143
|
};
|
8082
8144
|
var getTheme = (foundations) => {
|
8083
|
-
return (0,
|
8145
|
+
return (0, import_react106.extendTheme)({
|
8084
8146
|
...foundations,
|
8085
8147
|
components: {
|
8086
8148
|
...components_exports
|
@@ -8097,7 +8159,7 @@ var getTheme = (foundations) => {
|
|
8097
8159
|
config
|
8098
8160
|
});
|
8099
8161
|
};
|
8100
|
-
var theme4 = (0,
|
8162
|
+
var theme4 = (0, import_react106.extendTheme)({
|
8101
8163
|
components: {
|
8102
8164
|
...components_exports
|
8103
8165
|
},
|
@@ -8117,23 +8179,23 @@ var theme4 = (0, import_react105.extendTheme)({
|
|
8117
8179
|
|
8118
8180
|
// src/hooks/useFetcher.ts
|
8119
8181
|
var import_axios2 = __toESM(require("axios"));
|
8120
|
-
var
|
8182
|
+
var import_react109 = require("react");
|
8121
8183
|
|
8122
8184
|
// src/provider/components/provider.tsx
|
8123
8185
|
var import_axios = __toESM(require("axios"));
|
8124
|
-
var
|
8186
|
+
var import_react107 = require("react");
|
8125
8187
|
var import_react_toastify3 = require("react-toastify");
|
8126
|
-
var
|
8127
|
-
var ProviderContext = (0,
|
8188
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
8189
|
+
var ProviderContext = (0, import_react107.createContext)({
|
8128
8190
|
instance: void 0
|
8129
8191
|
});
|
8130
8192
|
var useInternalUI = () => {
|
8131
|
-
const { instance } = (0,
|
8193
|
+
const { instance } = (0, import_react107.useContext)(ProviderContext);
|
8132
8194
|
return { instance };
|
8133
8195
|
};
|
8134
8196
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
8135
|
-
const instanceRef = (0,
|
8136
|
-
(0,
|
8197
|
+
const instanceRef = (0, import_react107.useRef)(import_axios.default.create(config2));
|
8198
|
+
(0, import_react107.useEffect)(() => {
|
8137
8199
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
8138
8200
|
instanceRef.current.interceptors.request.use(interceptor);
|
8139
8201
|
});
|
@@ -8141,9 +8203,9 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
8141
8203
|
instanceRef.current.interceptors.response.use(interceptor);
|
8142
8204
|
});
|
8143
8205
|
}, [requestInterceptors, responseInterceptors]);
|
8144
|
-
const provider = (0,
|
8145
|
-
return /* @__PURE__ */ (0,
|
8146
|
-
/* @__PURE__ */ (0,
|
8206
|
+
const provider = (0, import_react107.useMemo)(() => ({ instance: instanceRef.current }), []);
|
8207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
8208
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_toastify3.ToastContainer, {}),
|
8147
8209
|
children
|
8148
8210
|
] });
|
8149
8211
|
};
|
@@ -8151,12 +8213,12 @@ Provider.displayName = "Provider";
|
|
8151
8213
|
var provider_default = Provider;
|
8152
8214
|
|
8153
8215
|
// src/provider/index.ts
|
8154
|
-
var
|
8216
|
+
var import_react108 = require("@chakra-ui/react");
|
8155
8217
|
|
8156
8218
|
// src/hooks/useFetcher.ts
|
8157
8219
|
function useFetcher() {
|
8158
8220
|
const { instance } = useInternalUI();
|
8159
|
-
const axiosInstance = (0,
|
8221
|
+
const axiosInstance = (0, import_react109.useMemo)(() => instance || import_axios2.default, [instance]);
|
8160
8222
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
8161
8223
|
const response = await axiosInstance.request({
|
8162
8224
|
data,
|
@@ -8176,10 +8238,10 @@ function useFetcher() {
|
|
8176
8238
|
}
|
8177
8239
|
|
8178
8240
|
// src/hooks/index.ts
|
8179
|
-
var
|
8241
|
+
var import_react110 = require("@chakra-ui/react");
|
8180
8242
|
|
8181
8243
|
// src/index.ts
|
8182
|
-
var
|
8244
|
+
var import_react111 = require("@chakra-ui/react");
|
8183
8245
|
// Annotate the CommonJS export names for ESM import in node:
|
8184
8246
|
0 && (module.exports = {
|
8185
8247
|
Accordion,
|