@ctlyst.id/internal-ui 5.4.13 → 5.5.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 +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +419 -394
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +140 -116
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -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_react97.Avatar,
|
60
|
+
AvatarBadge: () => import_react97.AvatarBadge,
|
61
|
+
AvatarBadgeProps: () => import_react97.AvatarBadgeProps,
|
62
|
+
AvatarGroup: () => import_react97.AvatarGroup,
|
63
|
+
AvatarGroupProps: () => import_react97.AvatarGroupProps,
|
64
|
+
AvatarProps: () => import_react97.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_react107.ChakraProvider,
|
76
|
+
ChakraProviderProps: () => import_react107.ChakraProviderProps,
|
77
|
+
ChakraTable: () => import_react86.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_react89.Code,
|
90
|
+
CodeProps: () => import_react89.CodeProps,
|
91
|
+
Collapse: () => import_react97.Collapse,
|
92
|
+
CollapseProps: () => import_react97.CollapseProps,
|
93
|
+
ColorMode: () => import_react107.ColorMode,
|
94
|
+
ColorModeScript: () => import_react107.ColorModeScript,
|
95
|
+
ColorModeScriptProps: () => import_react107.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_react97.Fade,
|
121
|
+
FadeProps: () => import_react97.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_react89.Heading,
|
138
|
+
HeadingProps: () => import_react89.HeadingProps,
|
139
|
+
Hide: () => import_react97.Hide,
|
140
|
+
HideProps: () => import_react97.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_react97.Img,
|
149
|
+
ImgProps: () => import_react97.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_react89.Link,
|
167
|
+
LinkProps: () => import_react89.LinkProps,
|
168
168
|
List: () => import_react56.List,
|
169
169
|
ListIcon: () => import_react56.ListIcon,
|
170
170
|
ListItem: () => import_react56.ListItem,
|
@@ -208,133 +208,133 @@ __export(src_exports, {
|
|
208
208
|
PinInputFieldProps: () => import_react67.PinInputFieldProps,
|
209
209
|
PinInputProps: () => import_react67.PinInputProps,
|
210
210
|
PinInputProvider: () => import_react67.PinInputProvider,
|
211
|
-
Popover: () =>
|
212
|
-
PopoverAnchor: () =>
|
213
|
-
PopoverArrow: () =>
|
214
|
-
PopoverArrowProps: () =>
|
215
|
-
PopoverBody: () =>
|
216
|
-
PopoverBodyProps: () =>
|
217
|
-
PopoverCloseButton: () =>
|
218
|
-
PopoverContent: () =>
|
219
|
-
PopoverContentProps: () =>
|
220
|
-
PopoverFooter: () =>
|
221
|
-
PopoverFooterProps: () =>
|
222
|
-
PopoverHeader: () =>
|
223
|
-
PopoverHeaderProps: () =>
|
224
|
-
PopoverProps: () =>
|
225
|
-
PopoverTrigger: () =>
|
226
|
-
Portal: () =>
|
227
|
-
PortalProps: () =>
|
211
|
+
Popover: () => import_react70.Popover,
|
212
|
+
PopoverAnchor: () => import_react70.PopoverAnchor,
|
213
|
+
PopoverArrow: () => import_react70.PopoverArrow,
|
214
|
+
PopoverArrowProps: () => import_react70.PopoverArrowProps,
|
215
|
+
PopoverBody: () => import_react70.PopoverBody,
|
216
|
+
PopoverBodyProps: () => import_react70.PopoverBodyProps,
|
217
|
+
PopoverCloseButton: () => import_react70.PopoverCloseButton,
|
218
|
+
PopoverContent: () => PopoverContent_default,
|
219
|
+
PopoverContentProps: () => import_react70.PopoverContentProps,
|
220
|
+
PopoverFooter: () => import_react70.PopoverFooter,
|
221
|
+
PopoverFooterProps: () => import_react70.PopoverFooterProps,
|
222
|
+
PopoverHeader: () => import_react70.PopoverHeader,
|
223
|
+
PopoverHeaderProps: () => import_react70.PopoverHeaderProps,
|
224
|
+
PopoverProps: () => import_react70.PopoverProps,
|
225
|
+
PopoverTrigger: () => import_react70.PopoverTrigger,
|
226
|
+
Portal: () => import_react70.Portal,
|
227
|
+
PortalProps: () => import_react70.PortalProps,
|
228
228
|
Profile: () => Profile,
|
229
|
-
Progress: () =>
|
230
|
-
ProgressFilledTrackProps: () =>
|
231
|
-
ProgressLabel: () =>
|
232
|
-
ProgressLabelProps: () =>
|
233
|
-
ProgressProps: () =>
|
234
|
-
ProgressTrackProps: () =>
|
229
|
+
Progress: () => import_react71.Progress,
|
230
|
+
ProgressFilledTrackProps: () => import_react71.ProgressFilledTrackProps,
|
231
|
+
ProgressLabel: () => import_react71.ProgressLabel,
|
232
|
+
ProgressLabelProps: () => import_react71.ProgressLabelProps,
|
233
|
+
ProgressProps: () => import_react71.ProgressProps,
|
234
|
+
ProgressTrackProps: () => import_react71.ProgressTrackProps,
|
235
235
|
Provider: () => provider_default,
|
236
236
|
ProviderContext: () => ProviderContext,
|
237
237
|
Radio: () => Radio,
|
238
238
|
RadioGroup: () => RadioGroup,
|
239
|
-
RadioGroupContext: () =>
|
239
|
+
RadioGroupContext: () => import_react74.RadioGroupContext,
|
240
240
|
Rating: () => rating_default,
|
241
241
|
RequiredIndicator: () => import_react26.RequiredIndicator,
|
242
242
|
RequiredIndicatorProps: () => import_react26.RequiredIndicatorProps,
|
243
|
-
ScaleFade: () =>
|
244
|
-
ScaleFadeProps: () =>
|
243
|
+
ScaleFade: () => import_react97.ScaleFade,
|
244
|
+
ScaleFadeProps: () => import_react97.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_react97.Show,
|
251
|
+
ShowProps: () => import_react97.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_react97.Slide,
|
258
|
+
SlideFade: () => import_react97.SlideFade,
|
259
|
+
SlideFadeProps: () => import_react97.SlideFadeProps,
|
260
|
+
SlideProps: () => import_react97.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_react97.Step,
|
265
|
+
StepDescription: () => import_react97.StepDescription,
|
266
|
+
StepIcon: () => import_react97.StepIcon,
|
267
|
+
StepIndicator: () => import_react97.StepIndicator,
|
268
|
+
StepNumber: () => import_react97.StepNumber,
|
269
|
+
StepSeparator: () => import_react97.StepSeparator,
|
270
|
+
StepStatus: () => import_react97.StepStatus,
|
271
|
+
StepTitle: () => import_react97.StepTitle,
|
272
|
+
Stepper: () => import_react97.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_react88.TabIndicator,
|
276
|
+
TabIndicatorProps: () => import_react88.TabIndicatorProps,
|
277
|
+
TabList: () => import_react88.TabList,
|
278
|
+
TabListProps: () => import_react88.TabListProps,
|
279
|
+
TabPanel: () => import_react88.TabPanel,
|
280
|
+
TabPanelProps: () => import_react88.TabPanelProps,
|
281
|
+
TabPanels: () => import_react88.TabPanels,
|
282
|
+
TabPanelsProps: () => import_react88.TabPanelsProps,
|
283
|
+
TabProps: () => import_react88.TabProps,
|
284
|
+
TableBodyProps: () => import_react86.TableBodyProps,
|
285
|
+
TableCellProps: () => import_react86.TableCellProps,
|
286
|
+
TableColumnHeaderProps: () => import_react86.TableColumnHeaderProps,
|
287
|
+
TableHeadProps: () => import_react86.TableHeadProps,
|
288
|
+
TableProps: () => import_react86.TableProps,
|
289
|
+
TableRowProps: () => import_react86.TableRowProps,
|
290
|
+
Tabs: () => import_react88.Tabs,
|
291
|
+
TabsDescendantsProvider: () => import_react88.TabsDescendantsProvider,
|
292
|
+
TabsProps: () => import_react88.TabsProps,
|
293
|
+
TabsProvider: () => import_react88.TabsProvider,
|
294
|
+
Tbody: () => import_react86.Tbody,
|
295
|
+
Td: () => import_react86.Td,
|
296
|
+
Text: () => import_react89.Text,
|
297
|
+
TextProps: () => import_react89.TextProps,
|
298
298
|
TextareaField: () => textarea_default,
|
299
|
-
Th: () =>
|
300
|
-
Thead: () =>
|
299
|
+
Th: () => import_react86.Th,
|
300
|
+
Thead: () => import_react86.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_react86.Tr,
|
307
307
|
UnorderedList: () => import_react56.UnorderedList,
|
308
308
|
Uploader: () => uploader_default,
|
309
|
-
UseBreakpointOptions: () =>
|
309
|
+
UseBreakpointOptions: () => import_react97.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_react109.UseDisclosureProps,
|
315
|
+
UseImageProps: () => import_react97.UseImageProps,
|
316
|
+
UseImageReturn: () => import_react97.UseImageReturn,
|
317
|
+
UseMediaQueryOptions: () => import_react97.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: () =>
|
324
|
-
UseRadioGroupReturn: () =>
|
325
|
-
UseRadioProps: () =>
|
326
|
-
UseRadioReturn: () =>
|
327
|
-
UseTabListProps: () =>
|
328
|
-
UseTabListReturn: () =>
|
329
|
-
UseTabOptions: () =>
|
330
|
-
UseTabPanelsProps: () =>
|
331
|
-
UseTabProps: () =>
|
332
|
-
UseTabsProps: () =>
|
333
|
-
UseTabsReturn: () =>
|
323
|
+
UseQueryProps: () => import_react97.UseQueryProps,
|
324
|
+
UseRadioGroupReturn: () => import_react74.UseRadioGroupReturn,
|
325
|
+
UseRadioProps: () => import_react74.UseRadioProps,
|
326
|
+
UseRadioReturn: () => import_react74.UseRadioReturn,
|
327
|
+
UseTabListProps: () => import_react88.UseTabListProps,
|
328
|
+
UseTabListReturn: () => import_react88.UseTabListReturn,
|
329
|
+
UseTabOptions: () => import_react88.UseTabOptions,
|
330
|
+
UseTabPanelsProps: () => import_react88.UseTabPanelsProps,
|
331
|
+
UseTabProps: () => import_react88.UseTabProps,
|
332
|
+
UseTabsProps: () => import_react88.UseTabsProps,
|
333
|
+
UseTabsReturn: () => import_react88.UseTabsReturn,
|
334
334
|
VStack: () => import_react55.VStack,
|
335
335
|
Version: () => Version,
|
336
|
-
VisuallyHidden: () =>
|
337
|
-
VisuallyHiddenInput: () =>
|
336
|
+
VisuallyHidden: () => import_react97.VisuallyHidden,
|
337
|
+
VisuallyHiddenInput: () => import_react97.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_react110.extendTheme,
|
349
349
|
formatValidationMessage: () => formatValidationMessage,
|
350
|
-
forwardRef: () =>
|
350
|
+
forwardRef: () => import_react110.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_react109.useBoolean,
|
368
|
+
useBreakpoint: () => import_react97.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_react109.useClipboard,
|
372
|
+
useColorMode: () => import_react109.useColorMode,
|
373
|
+
useColorModePreference: () => import_react97.useColorModePreference,
|
374
|
+
useColorModeValue: () => import_react109.useColorModeValue,
|
375
|
+
useConst: () => import_react109.useConst,
|
376
|
+
useControllableProp: () => import_react109.useControllableProp,
|
377
|
+
useControllableState: () => import_react109.useControllableState,
|
378
378
|
useDataTable: () => useDataTable,
|
379
|
-
useDimensions: () =>
|
380
|
-
useDisclosure: () =>
|
379
|
+
useDimensions: () => import_react109.useDimensions,
|
380
|
+
useDisclosure: () => import_react109.useDisclosure,
|
381
381
|
useDrawerContext: () => import_react58.useDrawerContext,
|
382
382
|
useFetcher: () => useFetcher,
|
383
|
-
useImage: () =>
|
383
|
+
useImage: () => import_react97.useImage,
|
384
384
|
useInternalUI: () => useInternalUI,
|
385
|
-
useMergeRefs: () =>
|
385
|
+
useMergeRefs: () => import_react109.useMergeRefs,
|
386
386
|
useModal: () => import_react58.useModal,
|
387
387
|
useModalContext: () => import_react58.useModalContext,
|
388
388
|
useModalStyles: () => import_react58.useModalStyles,
|
389
|
-
useOutsideClick: () =>
|
389
|
+
useOutsideClick: () => import_react109.useOutsideClick,
|
390
390
|
usePinInput: () => import_react67.usePinInput,
|
391
391
|
usePinInputContext: () => import_react67.usePinInputContext,
|
392
392
|
usePinInputField: () => import_react67.usePinInputField,
|
393
|
-
useProgressStyles: () =>
|
394
|
-
useQuery: () =>
|
395
|
-
useRadio: () =>
|
396
|
-
useRadioGroup: () =>
|
397
|
-
useRadioGroupContext: () =>
|
393
|
+
useProgressStyles: () => import_react71.useProgressStyles,
|
394
|
+
useQuery: () => import_react97.useQuery,
|
395
|
+
useRadio: () => import_react74.useRadio,
|
396
|
+
useRadioGroup: () => import_react74.useRadioGroup,
|
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_react97.useSteps,
|
400
|
+
useTab: () => import_react88.useTab,
|
401
|
+
useTabIndicator: () => import_react88.useTabIndicator,
|
402
|
+
useTabList: () => import_react88.useTabList,
|
403
|
+
useTabPanel: () => import_react88.useTabPanel,
|
404
|
+
useTabPanels: () => import_react88.useTabPanels,
|
405
|
+
useTabs: () => import_react88.useTabs,
|
406
|
+
useTabsContext: () => import_react88.useTabsContext,
|
407
|
+
useTabsDescendant: () => import_react88.useTabsDescendant,
|
408
|
+
useTabsDescendants: () => import_react88.useTabsDescendants,
|
409
|
+
useTabsDescendantsContext: () => import_react88.useTabsDescendantsContext,
|
410
|
+
useTabsStyles: () => import_react88.useTabsStyles,
|
411
|
+
useTheme: () => import_react109.useTheme,
|
412
412
|
useToast: () => useToast,
|
413
|
-
useToken: () =>
|
413
|
+
useToken: () => import_react109.useToken
|
414
414
|
});
|
415
415
|
module.exports = __toCommonJS(src_exports);
|
416
416
|
|
@@ -1819,7 +1819,19 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1819
1819
|
import_react30.Box,
|
1820
1820
|
{
|
1821
1821
|
onMouseUp: (e) => {
|
1822
|
-
|
1822
|
+
var _a2, _b2;
|
1823
|
+
const stopPropagationList = ["BUTTON", "LABEL", "INPUT", "A", "BODY"];
|
1824
|
+
const targetNode = e.target;
|
1825
|
+
let currentNode = targetNode;
|
1826
|
+
while (((_a2 = currentNode.parentElement) == null ? void 0 : _a2.nodeName) && !["TD"].includes((_b2 = currentNode.parentElement) == null ? void 0 : _b2.nodeName)) {
|
1827
|
+
if (stopPropagationList.includes(currentNode.nodeName)) {
|
1828
|
+
e.stopPropagation();
|
1829
|
+
break;
|
1830
|
+
}
|
1831
|
+
if (currentNode.parentElement) {
|
1832
|
+
currentNode = currentNode.parentElement;
|
1833
|
+
}
|
1834
|
+
}
|
1823
1835
|
},
|
1824
1836
|
...cellLineClamp > 0 ? {
|
1825
1837
|
noOfLines: cellLineClamp,
|
@@ -4528,20 +4540,33 @@ var pagination_filter_default = PaginationFilter;
|
|
4528
4540
|
// src/components/pin-input/index.ts
|
4529
4541
|
var import_react67 = require("@chakra-ui/react");
|
4530
4542
|
|
4531
|
-
// src/components/popover/
|
4543
|
+
// src/components/popover/PopoverContent.tsx
|
4532
4544
|
var import_react68 = require("@chakra-ui/react");
|
4545
|
+
var import_react69 = __toESM(require("react"));
|
4546
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
4547
|
+
var PopoverContent5 = (0, import_react68.forwardRef)((props, ref) => {
|
4548
|
+
const { children, ...rest } = props;
|
4549
|
+
const hasArrow = import_react69.default.Children.toArray(children).some((child) => {
|
4550
|
+
return import_react69.default.isValidElement(child) && child.type === import_react68.PopoverArrow;
|
4551
|
+
});
|
4552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.PopoverContent, { ...!hasArrow ? { mt: -1 } : {}, ...rest, ref, children });
|
4553
|
+
});
|
4554
|
+
var PopoverContent_default = PopoverContent5;
|
4555
|
+
|
4556
|
+
// src/components/popover/index.ts
|
4557
|
+
var import_react70 = require("@chakra-ui/react");
|
4533
4558
|
|
4534
4559
|
// src/components/progress/index.ts
|
4535
|
-
var
|
4560
|
+
var import_react71 = require("@chakra-ui/react");
|
4536
4561
|
|
4537
4562
|
// src/components/radio/components/radio.tsx
|
4538
|
-
var
|
4539
|
-
var
|
4563
|
+
var import_react72 = require("@chakra-ui/react");
|
4564
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
4540
4565
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
4541
4566
|
const variant = isError ? "errors" : "unstyled";
|
4542
|
-
return /* @__PURE__ */ (0,
|
4543
|
-
/* @__PURE__ */ (0,
|
4544
|
-
isError && errorText ? /* @__PURE__ */ (0,
|
4567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react72.Box, { children: [
|
4568
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react72.Box, { display: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react72.Radio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react72.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
4569
|
+
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react72.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react72.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react72.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react72.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
4545
4570
|
] });
|
4546
4571
|
};
|
4547
4572
|
Radio.displayName = "Radio";
|
@@ -4552,8 +4577,8 @@ Radio.defaultProps = {
|
|
4552
4577
|
};
|
4553
4578
|
|
4554
4579
|
// src/components/radio/components/radio-group.tsx
|
4555
|
-
var
|
4556
|
-
var
|
4580
|
+
var import_react73 = require("@chakra-ui/react");
|
4581
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
4557
4582
|
var RadioGroup = ({
|
4558
4583
|
children,
|
4559
4584
|
label,
|
@@ -4562,7 +4587,7 @@ var RadioGroup = ({
|
|
4562
4587
|
errorMessage,
|
4563
4588
|
...props
|
4564
4589
|
}) => {
|
4565
|
-
return /* @__PURE__ */ (0,
|
4590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react73.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react73.RadioGroup, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react73.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
4566
4591
|
};
|
4567
4592
|
RadioGroup.displayName = "RadioGroup";
|
4568
4593
|
RadioGroup.defaultProps = {
|
@@ -4572,34 +4597,34 @@ RadioGroup.defaultProps = {
|
|
4572
4597
|
};
|
4573
4598
|
|
4574
4599
|
// src/components/radio/index.ts
|
4575
|
-
var
|
4600
|
+
var import_react74 = require("@chakra-ui/react");
|
4576
4601
|
|
4577
4602
|
// src/components/rating/components/rating.tsx
|
4578
|
-
var
|
4603
|
+
var import_react75 = require("@chakra-ui/react");
|
4579
4604
|
var import_internal_icon7 = require("@ctlyst.id/internal-icon");
|
4580
|
-
var
|
4605
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
4581
4606
|
var Rating = ({ value }) => {
|
4582
|
-
return /* @__PURE__ */ (0,
|
4607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react75.Grid, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_internal_icon7.Rating, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
4583
4608
|
};
|
4584
4609
|
var rating_default = Rating;
|
4585
4610
|
|
4586
4611
|
// src/components/select/components/select.tsx
|
4587
|
-
var
|
4612
|
+
var import_react79 = require("@chakra-ui/react");
|
4588
4613
|
var import_system7 = require("@chakra-ui/system");
|
4589
4614
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4590
4615
|
var import_react_select = __toESM(require("react-select"));
|
4591
4616
|
|
4592
4617
|
// src/config/theme/foundations/shadows.ts
|
4593
|
-
var
|
4618
|
+
var import_react76 = require("@chakra-ui/react");
|
4594
4619
|
var shadows = {
|
4595
|
-
...
|
4620
|
+
...import_react76.theme.shadows,
|
4596
4621
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4597
4622
|
};
|
4598
4623
|
|
4599
4624
|
// src/config/theme/foundations/sizes.ts
|
4600
|
-
var
|
4625
|
+
var import_react77 = require("@chakra-ui/react");
|
4601
4626
|
var sizes = {
|
4602
|
-
...
|
4627
|
+
...import_react77.theme.sizes,
|
4603
4628
|
4.5: "1.125rem",
|
4604
4629
|
9.5: "2.375rem",
|
4605
4630
|
18: "4.5rem",
|
@@ -4609,9 +4634,9 @@ var sizes = {
|
|
4609
4634
|
};
|
4610
4635
|
|
4611
4636
|
// src/config/theme/foundations/spacing.ts
|
4612
|
-
var
|
4637
|
+
var import_react78 = require("@chakra-ui/react");
|
4613
4638
|
var spacing = {
|
4614
|
-
...
|
4639
|
+
...import_react78.theme.space,
|
4615
4640
|
4.5: "1.125rem",
|
4616
4641
|
9.5: "2.375rem",
|
4617
4642
|
18: "4.5rem",
|
@@ -4961,22 +4986,22 @@ var themeSelect = (theme5) => {
|
|
4961
4986
|
};
|
4962
4987
|
|
4963
4988
|
// src/components/select/components/select.tsx
|
4964
|
-
var
|
4989
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
4965
4990
|
function DropdownIndicator(props) {
|
4966
|
-
return /* @__PURE__ */ (0,
|
4991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_select.components.DropdownIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon7.ChevronDown, { size: 4, color: "neutral.400" }) });
|
4967
4992
|
}
|
4968
4993
|
function ClearIndicator(props) {
|
4969
4994
|
const { hasValue } = props;
|
4970
|
-
return /* @__PURE__ */ (0,
|
4995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_select.components.ClearIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
4971
4996
|
}
|
4972
4997
|
function MultiValue(props) {
|
4973
|
-
return /* @__PURE__ */ (0,
|
4998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react79.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4974
4999
|
}
|
4975
5000
|
function MultiValueRemove(props) {
|
4976
|
-
return /* @__PURE__ */ (0,
|
5001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react79.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
4977
5002
|
}
|
4978
5003
|
function NoOptionsMessage(props) {
|
4979
|
-
return /* @__PURE__ */ (0,
|
5004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react79.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" });
|
4980
5005
|
}
|
4981
5006
|
function Select2({
|
4982
5007
|
styles,
|
@@ -4985,7 +5010,7 @@ function Select2({
|
|
4985
5010
|
}) {
|
4986
5011
|
const { colorMode } = (0, import_system7.useColorMode)();
|
4987
5012
|
const { components, value, onChange } = rest;
|
4988
|
-
return /* @__PURE__ */ (0,
|
5013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4989
5014
|
import_react_select.default,
|
4990
5015
|
{
|
4991
5016
|
"data-test-id": "",
|
@@ -5012,7 +5037,7 @@ var select_default = Select2;
|
|
5012
5037
|
// src/components/select/components/select-async.tsx
|
5013
5038
|
var import_system8 = require("@chakra-ui/system");
|
5014
5039
|
var import_react_select_async_paginate = require("react-select-async-paginate");
|
5015
|
-
var
|
5040
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
5016
5041
|
function SelectAsync({
|
5017
5042
|
styles,
|
5018
5043
|
isError = false,
|
@@ -5020,7 +5045,7 @@ function SelectAsync({
|
|
5020
5045
|
}) {
|
5021
5046
|
const { colorMode } = (0, import_system8.useColorMode)();
|
5022
5047
|
const { components } = rest;
|
5023
|
-
return /* @__PURE__ */ (0,
|
5048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
5024
5049
|
import_react_select_async_paginate.AsyncPaginate,
|
5025
5050
|
{
|
5026
5051
|
classNamePrefix: "react-select",
|
@@ -5042,10 +5067,10 @@ var select_async_default = SelectAsync;
|
|
5042
5067
|
// src/components/select/components/select-async-creatable.tsx
|
5043
5068
|
var import_system9 = require("@chakra-ui/system");
|
5044
5069
|
var import_async_creatable = __toESM(require("react-select/async-creatable"));
|
5045
|
-
var
|
5070
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
5046
5071
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
5047
5072
|
const { colorMode } = (0, import_system9.useColorMode)();
|
5048
|
-
return /* @__PURE__ */ (0,
|
5073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
5049
5074
|
import_async_creatable.default,
|
5050
5075
|
{
|
5051
5076
|
classNamePrefix: "react-select",
|
@@ -5065,10 +5090,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
5065
5090
|
// src/components/select/components/select-creatable.tsx
|
5066
5091
|
var import_system10 = require("@chakra-ui/system");
|
5067
5092
|
var import_creatable = __toESM(require("react-select/creatable"));
|
5068
|
-
var
|
5093
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
5069
5094
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
5070
5095
|
const { colorMode } = (0, import_system10.useColorMode)();
|
5071
|
-
return /* @__PURE__ */ (0,
|
5096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5072
5097
|
import_creatable.default,
|
5073
5098
|
{
|
5074
5099
|
classNamePrefix: "react-select",
|
@@ -5086,10 +5111,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
5086
5111
|
}
|
5087
5112
|
|
5088
5113
|
// src/components/select/components/select-with-checkbox.tsx
|
5089
|
-
var
|
5114
|
+
var import_react80 = require("@chakra-ui/react");
|
5090
5115
|
var import_system11 = require("@chakra-ui/system");
|
5091
5116
|
var import_react_select2 = __toESM(require("react-select"));
|
5092
|
-
var
|
5117
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5093
5118
|
var CHECKBOX_STATE = {
|
5094
5119
|
UNCHECKED: 0,
|
5095
5120
|
INDETERMINATE: 1,
|
@@ -5136,8 +5161,8 @@ var InputOption = ({
|
|
5136
5161
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
5137
5162
|
style
|
5138
5163
|
};
|
5139
|
-
return /* @__PURE__ */ (0,
|
5140
|
-
/* @__PURE__ */ (0,
|
5164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
5165
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5141
5166
|
import_react_select2.components.Option,
|
5142
5167
|
{
|
5143
5168
|
isMulti: true,
|
@@ -5148,8 +5173,8 @@ var InputOption = ({
|
|
5148
5173
|
getStyles,
|
5149
5174
|
innerProps: props,
|
5150
5175
|
...rest,
|
5151
|
-
children: /* @__PURE__ */ (0,
|
5152
|
-
|
5176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
5177
|
+
import_react80.Flex,
|
5153
5178
|
{
|
5154
5179
|
alignItems: "center",
|
5155
5180
|
width: "100%",
|
@@ -5157,8 +5182,8 @@ var InputOption = ({
|
|
5157
5182
|
"data-test-id": "CT_component_select-checkbox_options",
|
5158
5183
|
cursor: isDisabled ? "not-allowed" : "default",
|
5159
5184
|
children: [
|
5160
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5161
|
-
|
5185
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5186
|
+
import_react80.Checkbox,
|
5162
5187
|
{
|
5163
5188
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
5164
5189
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -5166,21 +5191,21 @@ var InputOption = ({
|
|
5166
5191
|
pointerEvents: "none",
|
5167
5192
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
5168
5193
|
}
|
5169
|
-
) : /* @__PURE__ */ (0,
|
5170
|
-
|
5194
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5195
|
+
import_react80.Checkbox,
|
5171
5196
|
{
|
5172
5197
|
pointerEvents: "none",
|
5173
5198
|
isChecked: isSelected,
|
5174
5199
|
"data-test-id": "CT_component_select-checkbox_option-checkbox"
|
5175
5200
|
}
|
5176
5201
|
),
|
5177
|
-
/* @__PURE__ */ (0,
|
5202
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react80.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
5178
5203
|
]
|
5179
5204
|
}
|
5180
5205
|
)
|
5181
5206
|
}
|
5182
5207
|
),
|
5183
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5208
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("hr", {}) : null
|
5184
5209
|
] });
|
5185
5210
|
};
|
5186
5211
|
var SelectWithCheckboxBase = ({
|
@@ -5193,7 +5218,7 @@ var SelectWithCheckboxBase = ({
|
|
5193
5218
|
...rest
|
5194
5219
|
}) => {
|
5195
5220
|
const { colorMode } = (0, import_system11.useColorMode)();
|
5196
|
-
return /* @__PURE__ */ (0,
|
5221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5197
5222
|
import_react_select2.default,
|
5198
5223
|
{
|
5199
5224
|
"data-test-id": "",
|
@@ -5225,10 +5250,10 @@ var SelectCheckbox = (props) => {
|
|
5225
5250
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
5226
5251
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
5227
5252
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
5228
|
-
return /* @__PURE__ */ (0,
|
5253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(InputOption, { ...optionProps, checkedState });
|
5229
5254
|
}
|
5230
5255
|
};
|
5231
|
-
return /* @__PURE__ */ (0,
|
5256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5232
5257
|
SelectWithCheckboxBase,
|
5233
5258
|
{
|
5234
5259
|
"data-test-id": "",
|
@@ -5246,13 +5271,13 @@ var SelectCheckbox = (props) => {
|
|
5246
5271
|
var select_with_checkbox_default = SelectCheckbox;
|
5247
5272
|
|
5248
5273
|
// src/components/sidebar/components/sidebar.tsx
|
5249
|
-
var
|
5274
|
+
var import_react81 = require("@chakra-ui/react");
|
5250
5275
|
var import_framer_motion = require("framer-motion");
|
5251
|
-
var
|
5276
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5252
5277
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5253
5278
|
const { width = "220px" } = props;
|
5254
|
-
return /* @__PURE__ */ (0,
|
5255
|
-
|
5279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5280
|
+
import_react81.Flex,
|
5256
5281
|
{
|
5257
5282
|
position: "relative",
|
5258
5283
|
as: import_framer_motion.motion.div,
|
@@ -5272,13 +5297,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5272
5297
|
Sidebar.displayName = "Sidebar";
|
5273
5298
|
|
5274
5299
|
// src/components/sidebar/components/sidebar-header.tsx
|
5275
|
-
var
|
5300
|
+
var import_react82 = require("@chakra-ui/react");
|
5276
5301
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5277
5302
|
var import_framer_motion2 = require("framer-motion");
|
5278
|
-
var
|
5303
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5279
5304
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5280
|
-
return /* @__PURE__ */ (0,
|
5281
|
-
|
5305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5306
|
+
import_react82.Box,
|
5282
5307
|
{
|
5283
5308
|
px: "2",
|
5284
5309
|
color: "neutral.900",
|
@@ -5287,8 +5312,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5287
5312
|
_hover: {
|
5288
5313
|
color: "primary.500"
|
5289
5314
|
},
|
5290
|
-
children: /* @__PURE__ */ (0,
|
5291
|
-
|
5315
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5316
|
+
import_react82.Flex,
|
5292
5317
|
{
|
5293
5318
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5294
5319
|
direction: "row",
|
@@ -5297,8 +5322,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5297
5322
|
onClick: () => setCollapse(!isCollapse),
|
5298
5323
|
cursor: "pointer",
|
5299
5324
|
children: [
|
5300
|
-
/* @__PURE__ */ (0,
|
5301
|
-
|
5325
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5326
|
+
import_react82.Box,
|
5302
5327
|
{
|
5303
5328
|
as: import_framer_motion2.motion.div,
|
5304
5329
|
boxSize: "4",
|
@@ -5306,11 +5331,11 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5306
5331
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
5307
5332
|
transitionTimingFunction: "linear",
|
5308
5333
|
"aria-label": "toggle sidebar",
|
5309
|
-
children: /* @__PURE__ */ (0,
|
5334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5310
5335
|
}
|
5311
5336
|
),
|
5312
|
-
/* @__PURE__ */ (0,
|
5313
|
-
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react82.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5338
|
+
import_react82.Text,
|
5314
5339
|
{
|
5315
5340
|
as: import_framer_motion2.motion.div,
|
5316
5341
|
w: "max-content",
|
@@ -5336,37 +5361,37 @@ SidebarHeader.defaultProps = {
|
|
5336
5361
|
};
|
5337
5362
|
|
5338
5363
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5339
|
-
var
|
5364
|
+
var import_react83 = require("@chakra-ui/react");
|
5340
5365
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5341
5366
|
var import_framer_motion3 = require("framer-motion");
|
5342
|
-
var
|
5367
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5343
5368
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5344
|
-
return /* @__PURE__ */ (0,
|
5345
|
-
|
5369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5370
|
+
import_react83.Box,
|
5346
5371
|
{
|
5347
5372
|
as: import_framer_motion3.motion.div,
|
5348
5373
|
transitionTimingFunction: "linear",
|
5349
5374
|
initial: { padding: "8px" },
|
5350
5375
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5351
|
-
children: /* @__PURE__ */ (0,
|
5376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5352
5377
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5353
|
-
return /* @__PURE__ */ (0,
|
5378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5354
5379
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5355
5380
|
const noChild = !item.children.length;
|
5356
5381
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5357
|
-
return /* @__PURE__ */ (0,
|
5358
|
-
/* @__PURE__ */ (0,
|
5382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5359
5384
|
const activeOption = isOpen ? "primary.50" : "white";
|
5360
5385
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5361
5386
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5362
|
-
return /* @__PURE__ */ (0,
|
5363
|
-
/* @__PURE__ */ (0,
|
5364
|
-
|
5387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
5388
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5389
|
+
import_react83.AccordionButton,
|
5365
5390
|
{
|
5366
5391
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5367
5392
|
p: "0",
|
5368
5393
|
h: "fit-content",
|
5369
|
-
children: /* @__PURE__ */ (0,
|
5394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5370
5395
|
NavItem,
|
5371
5396
|
{
|
5372
5397
|
as: import_framer_motion3.motion.div,
|
@@ -5379,9 +5404,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5379
5404
|
position: "relative",
|
5380
5405
|
...itemStyles,
|
5381
5406
|
children: [
|
5382
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5383
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5384
|
-
|
5407
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5408
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5409
|
+
import_react83.Box,
|
5385
5410
|
{
|
5386
5411
|
display: "flex",
|
5387
5412
|
w: "full",
|
@@ -5395,16 +5420,16 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5395
5420
|
animate: { opacity: 1, x: 0 },
|
5396
5421
|
exit: { opacity: 0, x: 16 },
|
5397
5422
|
children: [
|
5398
|
-
/* @__PURE__ */ (0,
|
5399
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5400
|
-
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5424
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5425
|
+
import_react83.Box,
|
5401
5426
|
{
|
5402
5427
|
display: "flex",
|
5403
5428
|
boxSize: "3",
|
5404
5429
|
as: import_framer_motion3.motion.div,
|
5405
5430
|
transitionTimingFunction: "linear",
|
5406
5431
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
5407
|
-
children: /* @__PURE__ */ (0,
|
5432
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon8.ChevronDown, { size: 3 })
|
5408
5433
|
}
|
5409
5434
|
)
|
5410
5435
|
]
|
@@ -5417,12 +5442,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5417
5442
|
},
|
5418
5443
|
item.id
|
5419
5444
|
) }, item.id),
|
5420
|
-
isOpenOptions && /* @__PURE__ */ (0,
|
5421
|
-
/* @__PURE__ */ (0,
|
5445
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react83.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5446
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react83.Box, { display: "flex", alignItems: "center", children: [
|
5422
5447
|
mappingIcon2.get(item.icon || ""),
|
5423
|
-
/* @__PURE__ */ (0,
|
5448
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Box, { as: "span", ml: "2", children: item.title })
|
5424
5449
|
] }) }),
|
5425
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5450
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5426
5451
|
NavItem,
|
5427
5452
|
{
|
5428
5453
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5438,7 +5463,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5438
5463
|
},
|
5439
5464
|
submenu.id
|
5440
5465
|
)) })
|
5441
|
-
] }) : isCollapse && /* @__PURE__ */ (0,
|
5466
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5442
5467
|
NavItem,
|
5443
5468
|
{
|
5444
5469
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5451,22 +5476,22 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5451
5476
|
rounded: "none",
|
5452
5477
|
...itemStyles,
|
5453
5478
|
children: [
|
5454
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5455
|
-
/* @__PURE__ */ (0,
|
5479
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5480
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5456
5481
|
]
|
5457
5482
|
},
|
5458
5483
|
item.id
|
5459
5484
|
) }) }) })
|
5460
5485
|
] });
|
5461
5486
|
} }, item.id),
|
5462
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5463
|
-
|
5487
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5488
|
+
import_react83.Fade,
|
5464
5489
|
{
|
5465
5490
|
in: true,
|
5466
5491
|
transition: {
|
5467
5492
|
enter: { duration: 0.5 }
|
5468
5493
|
},
|
5469
|
-
children: /* @__PURE__ */ (0,
|
5494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5470
5495
|
NavItem,
|
5471
5496
|
{
|
5472
5497
|
mt: "1",
|
@@ -5494,16 +5519,16 @@ SidebarMenu.defaultProps = {
|
|
5494
5519
|
};
|
5495
5520
|
|
5496
5521
|
// src/components/switch/components/switch.tsx
|
5497
|
-
var
|
5522
|
+
var import_react84 = require("@chakra-ui/react");
|
5498
5523
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5499
5524
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5500
|
-
var
|
5501
|
-
var
|
5502
|
-
var Switch = (0,
|
5503
|
-
const styles = (0,
|
5504
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
5505
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
5506
|
-
const containerStyles = (0,
|
5525
|
+
var import_react85 = require("react");
|
5526
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5527
|
+
var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
5528
|
+
const styles = (0, import_react84.useMultiStyleConfig)("Switch", props);
|
5529
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react84.omitThemingProps)(props);
|
5530
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react84.useCheckbox)(ownProps);
|
5531
|
+
const containerStyles = (0, import_react85.useMemo)(
|
5507
5532
|
() => ({
|
5508
5533
|
display: "inline-block",
|
5509
5534
|
position: "relative",
|
@@ -5513,7 +5538,7 @@ var Switch = (0, import_react82.forwardRef)(function Switch2(props, ref) {
|
|
5513
5538
|
}),
|
5514
5539
|
[styles.container]
|
5515
5540
|
);
|
5516
|
-
const trackStyles = (0,
|
5541
|
+
const trackStyles = (0, import_react85.useMemo)(
|
5517
5542
|
() => ({
|
5518
5543
|
display: "inline-flex",
|
5519
5544
|
flexShrink: 0,
|
@@ -5525,7 +5550,7 @@ var Switch = (0, import_react82.forwardRef)(function Switch2(props, ref) {
|
|
5525
5550
|
}),
|
5526
5551
|
[styles.track]
|
5527
5552
|
);
|
5528
|
-
const labelStyles = (0,
|
5553
|
+
const labelStyles = (0, import_react85.useMemo)(
|
5529
5554
|
() => ({
|
5530
5555
|
userSelect: "none",
|
5531
5556
|
marginStart: spacing2,
|
@@ -5541,8 +5566,8 @@ var Switch = (0, import_react82.forwardRef)(function Switch2(props, ref) {
|
|
5541
5566
|
};
|
5542
5567
|
return iconSize[value];
|
5543
5568
|
};
|
5544
|
-
return /* @__PURE__ */ (0,
|
5545
|
-
|
5569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5570
|
+
import_react84.chakra.label,
|
5546
5571
|
{
|
5547
5572
|
...getRootProps(),
|
5548
5573
|
display: "flex",
|
@@ -5550,14 +5575,14 @@ var Switch = (0, import_react82.forwardRef)(function Switch2(props, ref) {
|
|
5550
5575
|
className: (0, import_shared_utils10.cx)("chakra-switch", props.className),
|
5551
5576
|
__css: containerStyles,
|
5552
5577
|
children: [
|
5553
|
-
/* @__PURE__ */ (0,
|
5554
|
-
/* @__PURE__ */ (0,
|
5555
|
-
/* @__PURE__ */ (0,
|
5556
|
-
/* @__PURE__ */ (0,
|
5557
|
-
/* @__PURE__ */ (0,
|
5578
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5579
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react84.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5580
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react84.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5581
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5558
5583
|
] }),
|
5559
|
-
/* @__PURE__ */ (0,
|
5560
|
-
|
5584
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5585
|
+
import_react84.chakra.span,
|
5561
5586
|
{
|
5562
5587
|
__css: styles.thumb,
|
5563
5588
|
className: "chakra-switch__thumb",
|
@@ -5566,8 +5591,8 @@ var Switch = (0, import_react82.forwardRef)(function Switch2(props, ref) {
|
|
5566
5591
|
}
|
5567
5592
|
)
|
5568
5593
|
] }),
|
5569
|
-
children && /* @__PURE__ */ (0,
|
5570
|
-
|
5594
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5595
|
+
import_react84.chakra.span,
|
5571
5596
|
{
|
5572
5597
|
className: "chakra-switch__label",
|
5573
5598
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5587,18 +5612,18 @@ Switch.defaultProps = {
|
|
5587
5612
|
var switch_default = Switch;
|
5588
5613
|
|
5589
5614
|
// src/components/table/index.tsx
|
5590
|
-
var
|
5615
|
+
var import_react86 = require("@chakra-ui/react");
|
5591
5616
|
|
5592
5617
|
// src/components/tabs/components/tab.tsx
|
5593
|
-
var
|
5594
|
-
var
|
5595
|
-
var Tab = (0,
|
5618
|
+
var import_react87 = require("@chakra-ui/react");
|
5619
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
5620
|
+
var Tab = (0, import_react87.forwardRef)((props, ref) => {
|
5596
5621
|
var _a, _b;
|
5597
|
-
const tabProps = (0,
|
5622
|
+
const tabProps = (0, import_react87.useTab)({ ...props, ref });
|
5598
5623
|
const isSelected = !!tabProps["aria-selected"];
|
5599
|
-
const styles = (0,
|
5600
|
-
return /* @__PURE__ */ (0,
|
5601
|
-
|
5624
|
+
const styles = (0, import_react87.useMultiStyleConfig)("Tabs", tabProps);
|
5625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5626
|
+
import_react87.Button,
|
5602
5627
|
{
|
5603
5628
|
"data-test-id": props["data-test-id"],
|
5604
5629
|
p: 4,
|
@@ -5623,7 +5648,7 @@ var Tab = (0, import_react85.forwardRef)((props, ref) => {
|
|
5623
5648
|
},
|
5624
5649
|
__css: styles.tab,
|
5625
5650
|
...tabProps,
|
5626
|
-
children: /* @__PURE__ */ (0,
|
5651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react87.Flex, { alignItems: "center", children: [
|
5627
5652
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5628
5653
|
tabProps.children,
|
5629
5654
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5634,39 +5659,39 @@ var Tab = (0, import_react85.forwardRef)((props, ref) => {
|
|
5634
5659
|
var tab_default = Tab;
|
5635
5660
|
|
5636
5661
|
// src/components/tabs/index.ts
|
5637
|
-
var
|
5662
|
+
var import_react88 = require("@chakra-ui/react");
|
5638
5663
|
|
5639
5664
|
// src/components/text/index.ts
|
5640
|
-
var
|
5665
|
+
var import_react89 = require("@chakra-ui/react");
|
5641
5666
|
|
5642
5667
|
// src/components/time-input/components/index.tsx
|
5643
|
-
var
|
5668
|
+
var import_react91 = require("@chakra-ui/react");
|
5644
5669
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5645
|
-
var
|
5670
|
+
var import_react92 = require("react");
|
5646
5671
|
|
5647
5672
|
// src/components/time-input/components/integration.tsx
|
5648
5673
|
var import_timescape = require("@zamiru/timescape");
|
5649
5674
|
var import_timescape2 = require("@zamiru/timescape");
|
5650
|
-
var
|
5675
|
+
var import_react90 = require("react");
|
5651
5676
|
var useTimescape = (options = {}) => {
|
5652
5677
|
var _a;
|
5653
5678
|
const { date, onChangeDate, ...rest } = options;
|
5654
|
-
const [manager] = (0,
|
5655
|
-
const onChangeDateRef = (0,
|
5656
|
-
(0,
|
5679
|
+
const [manager] = (0, import_react90.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5680
|
+
const onChangeDateRef = (0, import_react90.useRef)(onChangeDate);
|
5681
|
+
(0, import_react90.useLayoutEffect)(() => {
|
5657
5682
|
onChangeDateRef.current = onChangeDate;
|
5658
5683
|
}, [onChangeDate]);
|
5659
|
-
const [optionsState, update] = (0,
|
5684
|
+
const [optionsState, update] = (0, import_react90.useState)(() => ({
|
5660
5685
|
date,
|
5661
5686
|
...rest
|
5662
5687
|
}));
|
5663
|
-
(0,
|
5688
|
+
(0, import_react90.useEffect)(() => {
|
5664
5689
|
manager.resync();
|
5665
5690
|
return () => {
|
5666
5691
|
manager.remove();
|
5667
5692
|
};
|
5668
5693
|
}, [manager]);
|
5669
|
-
(0,
|
5694
|
+
(0, import_react90.useEffect)(() => {
|
5670
5695
|
return manager.on("changeDate", (nextDate) => {
|
5671
5696
|
var _a2;
|
5672
5697
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5674,7 +5699,7 @@ var useTimescape = (options = {}) => {
|
|
5674
5699
|
});
|
5675
5700
|
}, [manager]);
|
5676
5701
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5677
|
-
(0,
|
5702
|
+
(0, import_react90.useEffect)(() => {
|
5678
5703
|
manager.date = timestamp;
|
5679
5704
|
manager.minDate = optionsState.minDate;
|
5680
5705
|
manager.maxDate = optionsState.maxDate;
|
@@ -5716,7 +5741,7 @@ var useTimescape = (options = {}) => {
|
|
5716
5741
|
};
|
5717
5742
|
|
5718
5743
|
// src/components/time-input/components/index.tsx
|
5719
|
-
var
|
5744
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5720
5745
|
var timeDigitFormat = (number) => {
|
5721
5746
|
if (number.toString().length === 1) {
|
5722
5747
|
return `0${number}`;
|
@@ -5740,9 +5765,9 @@ var timeFromString = (timeString) => {
|
|
5740
5765
|
const [hours, minutes, seconds] = timeString.split(":");
|
5741
5766
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5742
5767
|
};
|
5743
|
-
var InputTimeArea = (0,
|
5744
|
-
return /* @__PURE__ */ (0,
|
5745
|
-
|
5768
|
+
var InputTimeArea = (0, import_react91.forwardRef)((props, ref) => {
|
5769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5770
|
+
import_react91.Input,
|
5746
5771
|
{
|
5747
5772
|
_focusWithin: {
|
5748
5773
|
bg: "neutral.300"
|
@@ -5760,7 +5785,7 @@ var InputTimeArea = (0, import_react89.forwardRef)((props, ref) => {
|
|
5760
5785
|
}
|
5761
5786
|
);
|
5762
5787
|
});
|
5763
|
-
var TimeInput2 = (0,
|
5788
|
+
var TimeInput2 = (0, import_react91.forwardRef)(
|
5764
5789
|
({
|
5765
5790
|
name,
|
5766
5791
|
config: config2,
|
@@ -5787,7 +5812,7 @@ var TimeInput2 = (0, import_react89.forwardRef)(
|
|
5787
5812
|
date,
|
5788
5813
|
...config2
|
5789
5814
|
});
|
5790
|
-
(0,
|
5815
|
+
(0, import_react92.useEffect)(() => {
|
5791
5816
|
var _a, _b, _c, _d, _e, _f;
|
5792
5817
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5793
5818
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5796,7 +5821,7 @@ var TimeInput2 = (0, import_react89.forwardRef)(
|
|
5796
5821
|
onChangeTime(timeValue);
|
5797
5822
|
}
|
5798
5823
|
}, [options.date]);
|
5799
|
-
(0,
|
5824
|
+
(0, import_react92.useImperativeHandle)(ref, () => ({
|
5800
5825
|
focus() {
|
5801
5826
|
_manager.focusField("hours");
|
5802
5827
|
}
|
@@ -5817,7 +5842,7 @@ var TimeInput2 = (0, import_react89.forwardRef)(
|
|
5817
5842
|
};
|
5818
5843
|
};
|
5819
5844
|
const { outlineColor, focusColor } = getProperties();
|
5820
|
-
return /* @__PURE__ */ (0,
|
5845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react91.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5821
5846
|
field_default,
|
5822
5847
|
{
|
5823
5848
|
isError,
|
@@ -5826,8 +5851,8 @@ var TimeInput2 = (0, import_react89.forwardRef)(
|
|
5826
5851
|
errorMessage,
|
5827
5852
|
isDisabled,
|
5828
5853
|
isSuccess,
|
5829
|
-
children: /* @__PURE__ */ (0,
|
5830
|
-
|
5854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5855
|
+
import_react91.Box,
|
5831
5856
|
{
|
5832
5857
|
transition: "all 0.15s",
|
5833
5858
|
boxShadow: "none",
|
@@ -5837,8 +5862,8 @@ var TimeInput2 = (0, import_react89.forwardRef)(
|
|
5837
5862
|
_focusWithin: {
|
5838
5863
|
borderColor: focusColor
|
5839
5864
|
},
|
5840
|
-
children: /* @__PURE__ */ (0,
|
5841
|
-
|
5865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
5866
|
+
import_react91.InputGroup,
|
5842
5867
|
{
|
5843
5868
|
borderRadius: "sm",
|
5844
5869
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5847,17 +5872,17 @@ var TimeInput2 = (0, import_react89.forwardRef)(
|
|
5847
5872
|
gap: 3,
|
5848
5873
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5849
5874
|
children: [
|
5850
|
-
/* @__PURE__ */ (0,
|
5851
|
-
/* @__PURE__ */ (0,
|
5852
|
-
/* @__PURE__ */ (0,
|
5853
|
-
/* @__PURE__ */ (0,
|
5854
|
-
seconds && /* @__PURE__ */ (0,
|
5855
|
-
/* @__PURE__ */ (0,
|
5856
|
-
/* @__PURE__ */ (0,
|
5875
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react91.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5876
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5877
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: ":" }),
|
5878
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
5879
|
+
seconds && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
5880
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: ":" }),
|
5881
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5857
5882
|
] }),
|
5858
|
-
options.hour12 && /* @__PURE__ */ (0,
|
5883
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react91.Input, { p: 0, ...getInputProps("am/pm") })
|
5859
5884
|
] }),
|
5860
|
-
/* @__PURE__ */ (0,
|
5885
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5861
5886
|
addOnRight
|
5862
5887
|
]
|
5863
5888
|
}
|
@@ -5870,16 +5895,16 @@ var TimeInput2 = (0, import_react89.forwardRef)(
|
|
5870
5895
|
);
|
5871
5896
|
|
5872
5897
|
// src/components/toast/components/toast.tsx
|
5873
|
-
var
|
5898
|
+
var import_react94 = require("@chakra-ui/react");
|
5874
5899
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5875
5900
|
var import_react_toastify = require("react-toastify");
|
5876
5901
|
|
5877
5902
|
// src/components/toast/components/styles.tsx
|
5878
|
-
var
|
5879
|
-
var
|
5903
|
+
var import_react93 = require("@emotion/react");
|
5904
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5880
5905
|
var Styles2 = () => {
|
5881
|
-
return /* @__PURE__ */ (0,
|
5882
|
-
|
5906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5907
|
+
import_react93.Global,
|
5883
5908
|
{
|
5884
5909
|
styles: `
|
5885
5910
|
.Toastify__toast-container {
|
@@ -5910,10 +5935,10 @@ var Styles2 = () => {
|
|
5910
5935
|
var styles_default2 = Styles2;
|
5911
5936
|
|
5912
5937
|
// src/components/toast/components/toast.tsx
|
5913
|
-
var
|
5938
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
5914
5939
|
var CustomCloseButton = (props) => {
|
5915
5940
|
const { closeToast } = props;
|
5916
|
-
return /* @__PURE__ */ (0,
|
5941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react94.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: () => closeToast(), children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
|
5917
5942
|
};
|
5918
5943
|
var DEFAULT_OPTIONS = {
|
5919
5944
|
position: "top-right",
|
@@ -5936,7 +5961,7 @@ var renderIcon = (icon, type) => {
|
|
5936
5961
|
return icon;
|
5937
5962
|
};
|
5938
5963
|
var useToast = () => {
|
5939
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
5964
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react94.useToken)("colors", [
|
5940
5965
|
"primary.500",
|
5941
5966
|
"neutral.500",
|
5942
5967
|
"info.500",
|
@@ -5945,15 +5970,15 @@ var useToast = () => {
|
|
5945
5970
|
"success.500"
|
5946
5971
|
]);
|
5947
5972
|
const content = (icon, message, link) => {
|
5948
|
-
return /* @__PURE__ */ (0,
|
5949
|
-
/* @__PURE__ */ (0,
|
5950
|
-
/* @__PURE__ */ (0,
|
5951
|
-
/* @__PURE__ */ (0,
|
5952
|
-
icon && /* @__PURE__ */ (0,
|
5953
|
-
/* @__PURE__ */ (0,
|
5973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
5974
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(styles_default2, {}),
|
5975
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react94.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
|
5976
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react94.Flex, { alignItems: "center", children: [
|
5977
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react94.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
5978
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react94.chakra.span, { noOfLines: 2, children: message })
|
5954
5979
|
] }),
|
5955
|
-
link && /* @__PURE__ */ (0,
|
5956
|
-
|
5980
|
+
link && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5981
|
+
import_react94.Link,
|
5957
5982
|
{
|
5958
5983
|
as: link.as,
|
5959
5984
|
href: link.url,
|
@@ -6033,9 +6058,9 @@ var useToast = () => {
|
|
6033
6058
|
var import_react_toastify2 = require("react-toastify");
|
6034
6059
|
|
6035
6060
|
// src/components/uploader/components/uploader.tsx
|
6036
|
-
var
|
6061
|
+
var import_react95 = require("@chakra-ui/react");
|
6037
6062
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
6038
|
-
var
|
6063
|
+
var import_react96 = require("react");
|
6039
6064
|
var import_react_dropzone = require("react-dropzone");
|
6040
6065
|
|
6041
6066
|
// src/components/uploader/constants.ts
|
@@ -6122,7 +6147,7 @@ var defaultOnHandleRejections = (fileRejection, config2, handleRejection) => {
|
|
6122
6147
|
};
|
6123
6148
|
|
6124
6149
|
// src/components/uploader/components/uploader.tsx
|
6125
|
-
var
|
6150
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
6126
6151
|
var Uploader = ({
|
6127
6152
|
onHandleUploadFile,
|
6128
6153
|
onHandleRejections,
|
@@ -6154,15 +6179,15 @@ var Uploader = ({
|
|
6154
6179
|
customErrorRejection,
|
6155
6180
|
...props
|
6156
6181
|
}) => {
|
6157
|
-
const [filePreview, setFilePreview] = (0,
|
6158
|
-
const [isError, setIsError] = (0,
|
6159
|
-
const [errorText, setErrorText] = (0,
|
6160
|
-
(0,
|
6182
|
+
const [filePreview, setFilePreview] = (0, import_react96.useState)();
|
6183
|
+
const [isError, setIsError] = (0, import_react96.useState)(propIsError);
|
6184
|
+
const [errorText, setErrorText] = (0, import_react96.useState)(propErrorText);
|
6185
|
+
(0, import_react96.useEffect)(() => {
|
6161
6186
|
setIsError(propIsError);
|
6162
6187
|
setErrorText(propErrorText);
|
6163
6188
|
}, [propIsError, propErrorText]);
|
6164
6189
|
const toast2 = useToast();
|
6165
|
-
const handleRejection = (0,
|
6190
|
+
const handleRejection = (0, import_react96.useCallback)(
|
6166
6191
|
(message, file, image, errorCode) => {
|
6167
6192
|
if (onHandleRejections) {
|
6168
6193
|
onHandleRejections(file, image, errorCode);
|
@@ -6185,7 +6210,7 @@ var Uploader = ({
|
|
6185
6210
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
6186
6211
|
[onHandleRejections, customErrorRejection]
|
6187
6212
|
);
|
6188
|
-
const onDropAccepted = (0,
|
6213
|
+
const onDropAccepted = (0, import_react96.useCallback)(
|
6189
6214
|
(files) => {
|
6190
6215
|
const file = files[0];
|
6191
6216
|
setIsError(false);
|
@@ -6220,10 +6245,10 @@ var Uploader = ({
|
|
6220
6245
|
},
|
6221
6246
|
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
|
6222
6247
|
);
|
6223
|
-
const onDropRejected = (0,
|
6248
|
+
const onDropRejected = (0, import_react96.useCallback)((fileRejections) => {
|
6224
6249
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
6225
6250
|
}, []);
|
6226
|
-
const validator = (0,
|
6251
|
+
const validator = (0, import_react96.useCallback)(
|
6227
6252
|
(file) => {
|
6228
6253
|
const result = [];
|
6229
6254
|
if (validatorExt) {
|
@@ -6250,32 +6275,32 @@ var Uploader = ({
|
|
6250
6275
|
maxFiles: 1,
|
6251
6276
|
maxSize: maxFileSize == null ? void 0 : maxFileSize.validate,
|
6252
6277
|
noClick: isDisabled || !!filePreview,
|
6253
|
-
noDrag: isDisabled
|
6278
|
+
noDrag: isDisabled,
|
6254
6279
|
validator
|
6255
6280
|
});
|
6256
6281
|
const renderHelperText = () => {
|
6257
6282
|
if (Array.isArray(helperText)) {
|
6258
|
-
return /* @__PURE__ */ (0,
|
6259
|
-
|
6283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6284
|
+
import_react95.UnorderedList,
|
6260
6285
|
{
|
6261
6286
|
pl: 2,
|
6262
6287
|
fontSize: 12,
|
6263
6288
|
color: "black.medium",
|
6264
6289
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6265
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0,
|
6290
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.ListItem, { children: text2 }, text2))
|
6266
6291
|
}
|
6267
6292
|
);
|
6268
6293
|
}
|
6269
6294
|
return helperText;
|
6270
6295
|
};
|
6271
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0,
|
6296
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6272
6297
|
const handleRemove = (e) => {
|
6273
6298
|
e.stopPropagation();
|
6274
6299
|
setFilePreview(void 0);
|
6275
6300
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6276
6301
|
acceptedFiles.pop();
|
6277
6302
|
};
|
6278
|
-
(0,
|
6303
|
+
(0, import_react96.useEffect)(() => {
|
6279
6304
|
if (value) {
|
6280
6305
|
if (typeof value === "string") {
|
6281
6306
|
setFilePreview(value);
|
@@ -6299,16 +6324,16 @@ var Uploader = ({
|
|
6299
6324
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6300
6325
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6301
6326
|
const cursorType = filePreview ? "initial" : "pointer";
|
6302
|
-
return /* @__PURE__ */ (0,
|
6327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.FormControl, { isRequired, children: [
|
6303
6328
|
label && typeof label === "string" ? (
|
6304
6329
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6305
|
-
/* @__PURE__ */ (0,
|
6306
|
-
isRequired && /* @__PURE__ */ (0,
|
6330
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, {}), fontSize: "text.sm", children: [
|
6331
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.RequiredIndicator, { mr: 1, ml: 0 }),
|
6307
6332
|
label
|
6308
6333
|
] })
|
6309
6334
|
) : label,
|
6310
|
-
/* @__PURE__ */ (0,
|
6311
|
-
|
6335
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
6336
|
+
import_react95.Flex,
|
6312
6337
|
{
|
6313
6338
|
minH: containerHeight,
|
6314
6339
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6325,8 +6350,8 @@ var Uploader = ({
|
|
6325
6350
|
...props,
|
6326
6351
|
...getRootProps(),
|
6327
6352
|
children: [
|
6328
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0,
|
6329
|
-
|
6353
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6354
|
+
import_react95.Button,
|
6330
6355
|
{
|
6331
6356
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6332
6357
|
"aria-label": "remove-image",
|
@@ -6340,32 +6365,32 @@ var Uploader = ({
|
|
6340
6365
|
border: "none",
|
6341
6366
|
zIndex: 1,
|
6342
6367
|
onClick: handleRemove,
|
6343
|
-
children: /* @__PURE__ */ (0,
|
6368
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6344
6369
|
}
|
6345
6370
|
) }),
|
6346
|
-
filePreview && /* @__PURE__ */ (0,
|
6347
|
-
|
6371
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6372
|
+
import_react95.Flex,
|
6348
6373
|
{
|
6349
6374
|
position: "relative",
|
6350
6375
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6351
6376
|
justify: "center",
|
6352
6377
|
align: "center",
|
6353
|
-
children: filePreview.includes("blob") &&
|
6354
|
-
|
6378
|
+
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6379
|
+
import_react95.Image,
|
6355
6380
|
{
|
6356
6381
|
h: size2 === "lg" ? "120" : "100",
|
6357
6382
|
src: filePreview,
|
6358
6383
|
alt: "uploader-preview",
|
6359
6384
|
objectFit: "contain"
|
6360
6385
|
}
|
6361
|
-
) : /* @__PURE__ */ (0,
|
6386
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Text, { noOfLines: 3, mx: 2, textAlign: "center", children: filePreview })
|
6362
6387
|
}
|
6363
6388
|
) }),
|
6364
|
-
!filePreview && /* @__PURE__ */ (0,
|
6365
|
-
size2 === "sm" && /* @__PURE__ */ (0,
|
6366
|
-
/* @__PURE__ */ (0,
|
6367
|
-
!filePreview && /* @__PURE__ */ (0,
|
6368
|
-
|
6389
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6390
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6391
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Box, { children: [
|
6392
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6393
|
+
import_react95.Heading,
|
6369
6394
|
{
|
6370
6395
|
fontWeight: "400",
|
6371
6396
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6374,21 +6399,21 @@ var Uploader = ({
|
|
6374
6399
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6375
6400
|
}
|
6376
6401
|
),
|
6377
|
-
size2 === "lg" && /* @__PURE__ */ (0,
|
6402
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6378
6403
|
] })
|
6379
6404
|
] }) })
|
6380
6405
|
]
|
6381
6406
|
}
|
6382
6407
|
),
|
6383
|
-
/* @__PURE__ */ (0,
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6384
6409
|
"input",
|
6385
6410
|
{
|
6386
6411
|
...getInputProps(),
|
6387
6412
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6388
6413
|
}
|
6389
6414
|
),
|
6390
|
-
filePreview && !isSmall && /* @__PURE__ */ (0,
|
6391
|
-
|
6415
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6416
|
+
import_react95.Button,
|
6392
6417
|
{
|
6393
6418
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6394
6419
|
type: "button",
|
@@ -6434,10 +6459,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6434
6459
|
};
|
6435
6460
|
|
6436
6461
|
// src/components/index.ts
|
6437
|
-
var
|
6462
|
+
var import_react97 = require("@chakra-ui/react");
|
6438
6463
|
|
6439
6464
|
// src/config/theme/themeConfiguration.ts
|
6440
|
-
var
|
6465
|
+
var import_react105 = require("@chakra-ui/react");
|
6441
6466
|
|
6442
6467
|
// src/config/theme/components/index.ts
|
6443
6468
|
var components_exports = {};
|
@@ -6994,8 +7019,8 @@ var card_default2 = CardStyle;
|
|
6994
7019
|
|
6995
7020
|
// src/config/theme/components/checkbox.ts
|
6996
7021
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
6997
|
-
var
|
6998
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
7022
|
+
var import_react98 = require("@chakra-ui/react");
|
7023
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react98.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
6999
7024
|
var baseStyle3 = definePartsStyle3({
|
7000
7025
|
control: {
|
7001
7026
|
borderRadius: "sm",
|
@@ -7096,8 +7121,8 @@ var checkbox_default2 = Checkbox3;
|
|
7096
7121
|
|
7097
7122
|
// src/config/theme/components/chips.ts
|
7098
7123
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
7099
|
-
var
|
7100
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
7124
|
+
var import_react99 = require("@chakra-ui/react");
|
7125
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react99.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
7101
7126
|
var baseStyle4 = definePartsStyle4({
|
7102
7127
|
container: {
|
7103
7128
|
px: 3,
|
@@ -7306,8 +7331,8 @@ var input_default = Input4;
|
|
7306
7331
|
|
7307
7332
|
// src/config/theme/components/loader.ts
|
7308
7333
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7309
|
-
var
|
7310
|
-
var rotate = (0,
|
7334
|
+
var import_react100 = require("@emotion/react");
|
7335
|
+
var rotate = (0, import_react100.keyframes)({
|
7311
7336
|
"0%": {
|
7312
7337
|
transform: "rotate(0deg)"
|
7313
7338
|
},
|
@@ -7489,8 +7514,8 @@ var modal_default = modalTheme;
|
|
7489
7514
|
|
7490
7515
|
// src/config/theme/components/popover.ts
|
7491
7516
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7492
|
-
var
|
7493
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
7517
|
+
var import_react101 = require("@chakra-ui/react");
|
7518
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react101.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
7494
7519
|
var baseStyle8 = definePartsStyle7({
|
7495
7520
|
content: {
|
7496
7521
|
bg: "white"
|
@@ -7501,8 +7526,8 @@ var popover_default = popoverTheme;
|
|
7501
7526
|
|
7502
7527
|
// src/config/theme/components/radio.ts
|
7503
7528
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7504
|
-
var
|
7505
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
7529
|
+
var import_react102 = require("@chakra-ui/react");
|
7530
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react102.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
7506
7531
|
var baseStyle9 = definePartsStyle8({
|
7507
7532
|
control: {
|
7508
7533
|
border: "1px solid",
|
@@ -7924,7 +7949,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7924
7949
|
var tabs_default = tabsTheme;
|
7925
7950
|
|
7926
7951
|
// src/config/theme/components/textarea.ts
|
7927
|
-
var
|
7952
|
+
var import_react103 = require("@chakra-ui/react");
|
7928
7953
|
var getProps = (props) => {
|
7929
7954
|
const { isError, isSuccess, isDisabled } = props;
|
7930
7955
|
let borderColor = "neutral.400";
|
@@ -7944,7 +7969,7 @@ var getProps = (props) => {
|
|
7944
7969
|
borderColor
|
7945
7970
|
};
|
7946
7971
|
};
|
7947
|
-
var outline3 = (0,
|
7972
|
+
var outline3 = (0, import_react103.defineStyle)((props) => {
|
7948
7973
|
const { focusBorderColor, borderColor } = getProps(props);
|
7949
7974
|
return {
|
7950
7975
|
background: "white.high",
|
@@ -7988,7 +8013,7 @@ var outline3 = (0, import_react101.defineStyle)((props) => {
|
|
7988
8013
|
}
|
7989
8014
|
};
|
7990
8015
|
});
|
7991
|
-
var Textarea = (0,
|
8016
|
+
var Textarea = (0, import_react103.defineStyleConfig)({
|
7992
8017
|
variants: { outline: outline3 },
|
7993
8018
|
defaultProps: {
|
7994
8019
|
variant: "outline"
|
@@ -7997,15 +8022,15 @@ var Textarea = (0, import_react101.defineStyleConfig)({
|
|
7997
8022
|
var textarea_default2 = Textarea;
|
7998
8023
|
|
7999
8024
|
// src/config/theme/components/tooltip.ts
|
8000
|
-
var
|
8001
|
-
var $arrowBg = (0,
|
8025
|
+
var import_react104 = require("@chakra-ui/react");
|
8026
|
+
var $arrowBg = (0, import_react104.cssVar)("popper-arrow-bg");
|
8002
8027
|
var baseStyle12 = {
|
8003
8028
|
bg: "neutral.700",
|
8004
8029
|
textStyle: "text.sm",
|
8005
8030
|
fontSize: "text.sm",
|
8006
8031
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
8007
8032
|
};
|
8008
|
-
var Tooltip2 = (0,
|
8033
|
+
var Tooltip2 = (0, import_react104.defineStyleConfig)({ baseStyle: baseStyle12 });
|
8009
8034
|
var tooltip_default = Tooltip2;
|
8010
8035
|
|
8011
8036
|
// src/config/theme/themeConfiguration.ts
|
@@ -8024,7 +8049,7 @@ var createExtendTheme = (theme5) => {
|
|
8024
8049
|
return function extendTheme2(...extensions) {
|
8025
8050
|
let overrides = [...extensions];
|
8026
8051
|
let activeTheme = extensions[extensions.length - 1];
|
8027
|
-
if ((0,
|
8052
|
+
if ((0, import_react105.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
8028
8053
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
8029
8054
|
overrides.length > 1) {
|
8030
8055
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -8033,13 +8058,13 @@ var createExtendTheme = (theme5) => {
|
|
8033
8058
|
}
|
8034
8059
|
return pipe(
|
8035
8060
|
...overrides.map(
|
8036
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
8061
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react105.mergeThemeOverride)(prevTheme, extension)
|
8037
8062
|
)
|
8038
8063
|
)(activeTheme);
|
8039
8064
|
};
|
8040
8065
|
};
|
8041
8066
|
var getTheme = (foundations) => {
|
8042
|
-
return (0,
|
8067
|
+
return (0, import_react105.extendTheme)({
|
8043
8068
|
...foundations,
|
8044
8069
|
components: {
|
8045
8070
|
...components_exports
|
@@ -8056,7 +8081,7 @@ var getTheme = (foundations) => {
|
|
8056
8081
|
config
|
8057
8082
|
});
|
8058
8083
|
};
|
8059
|
-
var theme4 = (0,
|
8084
|
+
var theme4 = (0, import_react105.extendTheme)({
|
8060
8085
|
components: {
|
8061
8086
|
...components_exports
|
8062
8087
|
},
|
@@ -8076,23 +8101,23 @@ var theme4 = (0, import_react103.extendTheme)({
|
|
8076
8101
|
|
8077
8102
|
// src/hooks/useFetcher.ts
|
8078
8103
|
var import_axios2 = __toESM(require("axios"));
|
8079
|
-
var
|
8104
|
+
var import_react108 = require("react");
|
8080
8105
|
|
8081
8106
|
// src/provider/components/provider.tsx
|
8082
8107
|
var import_axios = __toESM(require("axios"));
|
8083
|
-
var
|
8108
|
+
var import_react106 = require("react");
|
8084
8109
|
var import_react_toastify3 = require("react-toastify");
|
8085
|
-
var
|
8086
|
-
var ProviderContext = (0,
|
8110
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
8111
|
+
var ProviderContext = (0, import_react106.createContext)({
|
8087
8112
|
instance: void 0
|
8088
8113
|
});
|
8089
8114
|
var useInternalUI = () => {
|
8090
|
-
const { instance } = (0,
|
8115
|
+
const { instance } = (0, import_react106.useContext)(ProviderContext);
|
8091
8116
|
return { instance };
|
8092
8117
|
};
|
8093
8118
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
8094
|
-
const instanceRef = (0,
|
8095
|
-
(0,
|
8119
|
+
const instanceRef = (0, import_react106.useRef)(import_axios.default.create(config2));
|
8120
|
+
(0, import_react106.useEffect)(() => {
|
8096
8121
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
8097
8122
|
instanceRef.current.interceptors.request.use(interceptor);
|
8098
8123
|
});
|
@@ -8100,9 +8125,9 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
8100
8125
|
instanceRef.current.interceptors.response.use(interceptor);
|
8101
8126
|
});
|
8102
8127
|
}, [requestInterceptors, responseInterceptors]);
|
8103
|
-
const provider = (0,
|
8104
|
-
return /* @__PURE__ */ (0,
|
8105
|
-
/* @__PURE__ */ (0,
|
8128
|
+
const provider = (0, import_react106.useMemo)(() => ({ instance: instanceRef.current }), []);
|
8129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
8130
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_toastify3.ToastContainer, {}),
|
8106
8131
|
children
|
8107
8132
|
] });
|
8108
8133
|
};
|
@@ -8110,12 +8135,12 @@ Provider.displayName = "Provider";
|
|
8110
8135
|
var provider_default = Provider;
|
8111
8136
|
|
8112
8137
|
// src/provider/index.ts
|
8113
|
-
var
|
8138
|
+
var import_react107 = require("@chakra-ui/react");
|
8114
8139
|
|
8115
8140
|
// src/hooks/useFetcher.ts
|
8116
8141
|
function useFetcher() {
|
8117
8142
|
const { instance } = useInternalUI();
|
8118
|
-
const axiosInstance = (0,
|
8143
|
+
const axiosInstance = (0, import_react108.useMemo)(() => instance || import_axios2.default, [instance]);
|
8119
8144
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
8120
8145
|
const response = await axiosInstance.request({
|
8121
8146
|
data,
|
@@ -8135,10 +8160,10 @@ function useFetcher() {
|
|
8135
8160
|
}
|
8136
8161
|
|
8137
8162
|
// src/hooks/index.ts
|
8138
|
-
var
|
8163
|
+
var import_react109 = require("@chakra-ui/react");
|
8139
8164
|
|
8140
8165
|
// src/index.ts
|
8141
|
-
var
|
8166
|
+
var import_react110 = require("@chakra-ui/react");
|
8142
8167
|
// Annotate the CommonJS export names for ESM import in node:
|
8143
8168
|
0 && (module.exports = {
|
8144
8169
|
Accordion,
|