@ctlyst.id/internal-ui 5.5.7 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +413 -361
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.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
|
|
@@ -1684,16 +1684,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1684
1684
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
1685
1685
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
1686
1686
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1687
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1688
|
-
import_react30.Flex,
|
1689
|
-
{
|
1690
|
-
"data-test-id": "CT_component_data-table_loader",
|
1691
|
-
textTransform: "capitalize",
|
1692
|
-
align: "center",
|
1693
|
-
gap: 2,
|
1694
|
-
children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext())
|
1695
|
-
}
|
1696
|
-
)
|
1687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Flex, { "data-test-id": "CT_component_data-table_loader", align: "center", gap: 2, children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()) })
|
1697
1688
|
},
|
1698
1689
|
header.id
|
1699
1690
|
)) }, headerGroup.id)) }),
|
@@ -1733,7 +1724,6 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1733
1724
|
backgroundColor: "white",
|
1734
1725
|
height: "100%",
|
1735
1726
|
"data-test-id": `CT_Container_TableHeader_${header.id}`,
|
1736
|
-
textTransform: "capitalize",
|
1737
1727
|
userSelect: "none",
|
1738
1728
|
align: "center",
|
1739
1729
|
gap: 2,
|
@@ -4620,22 +4610,76 @@ var Rating = ({ value }) => {
|
|
4620
4610
|
var rating_default = Rating;
|
4621
4611
|
|
4622
4612
|
// src/components/select/components/select.tsx
|
4623
|
-
var
|
4613
|
+
var import_react80 = require("@chakra-ui/react");
|
4624
4614
|
var import_system6 = require("@chakra-ui/system");
|
4625
4615
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4626
4616
|
var import_react_select = __toESM(require("react-select"));
|
4627
4617
|
|
4618
|
+
// src/components/select/components/menu-list-virtualized.tsx
|
4619
|
+
var import_react_virtual = require("@tanstack/react-virtual");
|
4620
|
+
var import_react76 = require("react");
|
4621
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
4622
|
+
var MenuListVirtualized = (props) => {
|
4623
|
+
const { children, estimateSize, overscan, ...virtualizerProps } = props;
|
4624
|
+
const childrenArr = Array.isArray(children) ? children : [children];
|
4625
|
+
const itemCount = childrenArr.length;
|
4626
|
+
const parentRef = (0, import_react76.useRef)(null);
|
4627
|
+
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
4628
|
+
count: itemCount,
|
4629
|
+
getScrollElement: () => parentRef.current,
|
4630
|
+
estimateSize: estimateSize || (() => 42),
|
4631
|
+
overscan: overscan || 5,
|
4632
|
+
...virtualizerProps
|
4633
|
+
});
|
4634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4635
|
+
"div",
|
4636
|
+
{
|
4637
|
+
ref: parentRef,
|
4638
|
+
style: {
|
4639
|
+
height: `300px`,
|
4640
|
+
width: `100%`,
|
4641
|
+
overflow: "auto"
|
4642
|
+
},
|
4643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4644
|
+
"div",
|
4645
|
+
{
|
4646
|
+
style: {
|
4647
|
+
height: `${rowVirtualizer.getTotalSize()}px`,
|
4648
|
+
width: "100%",
|
4649
|
+
position: "relative"
|
4650
|
+
},
|
4651
|
+
children: rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4652
|
+
"div",
|
4653
|
+
{
|
4654
|
+
style: {
|
4655
|
+
position: "absolute",
|
4656
|
+
top: 0,
|
4657
|
+
left: 0,
|
4658
|
+
width: "100%",
|
4659
|
+
height: `${virtualRow.size}px`,
|
4660
|
+
transform: `translateY(${virtualRow.start}px)`
|
4661
|
+
},
|
4662
|
+
children: childrenArr[virtualRow.index]
|
4663
|
+
},
|
4664
|
+
virtualRow.index
|
4665
|
+
))
|
4666
|
+
}
|
4667
|
+
)
|
4668
|
+
}
|
4669
|
+
);
|
4670
|
+
};
|
4671
|
+
|
4628
4672
|
// src/config/theme/foundations/shadows.ts
|
4629
|
-
var
|
4673
|
+
var import_react77 = require("@chakra-ui/react");
|
4630
4674
|
var shadows = {
|
4631
|
-
...
|
4675
|
+
...import_react77.theme.shadows,
|
4632
4676
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4633
4677
|
};
|
4634
4678
|
|
4635
4679
|
// src/config/theme/foundations/sizes.ts
|
4636
|
-
var
|
4680
|
+
var import_react78 = require("@chakra-ui/react");
|
4637
4681
|
var sizes = {
|
4638
|
-
...
|
4682
|
+
...import_react78.theme.sizes,
|
4639
4683
|
4.5: "1.125rem",
|
4640
4684
|
9.5: "2.375rem",
|
4641
4685
|
18: "4.5rem",
|
@@ -4645,9 +4689,9 @@ var sizes = {
|
|
4645
4689
|
};
|
4646
4690
|
|
4647
4691
|
// src/config/theme/foundations/spacing.ts
|
4648
|
-
var
|
4692
|
+
var import_react79 = require("@chakra-ui/react");
|
4649
4693
|
var spacing = {
|
4650
|
-
...
|
4694
|
+
...import_react79.theme.space,
|
4651
4695
|
4.5: "1.125rem",
|
4652
4696
|
9.5: "2.375rem",
|
4653
4697
|
18: "4.5rem",
|
@@ -4997,22 +5041,22 @@ var themeSelect = (theme5) => {
|
|
4997
5041
|
};
|
4998
5042
|
|
4999
5043
|
// src/components/select/components/select.tsx
|
5000
|
-
var
|
5044
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
5001
5045
|
function DropdownIndicator(props) {
|
5002
|
-
return /* @__PURE__ */ (0,
|
5046
|
+
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
5047
|
}
|
5004
5048
|
function ClearIndicator(props) {
|
5005
5049
|
const { hasValue } = props;
|
5006
|
-
return /* @__PURE__ */ (0,
|
5050
|
+
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
5051
|
}
|
5008
5052
|
function MultiValue(props) {
|
5009
|
-
return /* @__PURE__ */ (0,
|
5053
|
+
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
5054
|
}
|
5011
5055
|
function MultiValueRemove(props) {
|
5012
|
-
return /* @__PURE__ */ (0,
|
5056
|
+
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
5057
|
}
|
5014
5058
|
function NoOptionsMessage(props) {
|
5015
|
-
return /* @__PURE__ */ (0,
|
5059
|
+
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
5060
|
}
|
5017
5061
|
function Select2({
|
5018
5062
|
styles,
|
@@ -5020,8 +5064,9 @@ function Select2({
|
|
5020
5064
|
...rest
|
5021
5065
|
}) {
|
5022
5066
|
const { colorMode } = (0, import_system6.useColorMode)();
|
5023
|
-
const { components, value, onChange } = rest;
|
5024
|
-
|
5067
|
+
const { components, value, onChange, virtualized } = rest;
|
5068
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
5025
5070
|
import_react_select.default,
|
5026
5071
|
{
|
5027
5072
|
"data-test-id": "",
|
@@ -5032,6 +5077,9 @@ function Select2({
|
|
5032
5077
|
MultiValue,
|
5033
5078
|
MultiValueRemove,
|
5034
5079
|
NoOptionsMessage,
|
5080
|
+
...virtualized ? {
|
5081
|
+
MenuList: renderMenuListVirtualized
|
5082
|
+
} : {},
|
5035
5083
|
...components
|
5036
5084
|
},
|
5037
5085
|
value,
|
@@ -5048,7 +5096,7 @@ var select_default = Select2;
|
|
5048
5096
|
// src/components/select/components/select-async.tsx
|
5049
5097
|
var import_system7 = require("@chakra-ui/system");
|
5050
5098
|
var import_react_select_async_paginate = require("react-select-async-paginate");
|
5051
|
-
var
|
5099
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
5052
5100
|
function SelectAsync({
|
5053
5101
|
styles,
|
5054
5102
|
isError = false,
|
@@ -5056,7 +5104,7 @@ function SelectAsync({
|
|
5056
5104
|
}) {
|
5057
5105
|
const { colorMode } = (0, import_system7.useColorMode)();
|
5058
5106
|
const { components } = rest;
|
5059
|
-
return /* @__PURE__ */ (0,
|
5107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
5060
5108
|
import_react_select_async_paginate.AsyncPaginate,
|
5061
5109
|
{
|
5062
5110
|
classNamePrefix: "react-select",
|
@@ -5078,10 +5126,10 @@ var select_async_default = SelectAsync;
|
|
5078
5126
|
// src/components/select/components/select-async-creatable.tsx
|
5079
5127
|
var import_system8 = require("@chakra-ui/system");
|
5080
5128
|
var import_async_creatable = __toESM(require("react-select/async-creatable"));
|
5081
|
-
var
|
5129
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
5082
5130
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
5083
5131
|
const { colorMode } = (0, import_system8.useColorMode)();
|
5084
|
-
return /* @__PURE__ */ (0,
|
5132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5085
5133
|
import_async_creatable.default,
|
5086
5134
|
{
|
5087
5135
|
classNamePrefix: "react-select",
|
@@ -5101,10 +5149,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
5101
5149
|
// src/components/select/components/select-creatable.tsx
|
5102
5150
|
var import_system9 = require("@chakra-ui/system");
|
5103
5151
|
var import_creatable = __toESM(require("react-select/creatable"));
|
5104
|
-
var
|
5152
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5105
5153
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
5106
5154
|
const { colorMode } = (0, import_system9.useColorMode)();
|
5107
|
-
return /* @__PURE__ */ (0,
|
5155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5108
5156
|
import_creatable.default,
|
5109
5157
|
{
|
5110
5158
|
classNamePrefix: "react-select",
|
@@ -5122,10 +5170,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
5122
5170
|
}
|
5123
5171
|
|
5124
5172
|
// src/components/select/components/select-with-checkbox.tsx
|
5125
|
-
var
|
5173
|
+
var import_react81 = require("@chakra-ui/react");
|
5126
5174
|
var import_system10 = require("@chakra-ui/system");
|
5127
5175
|
var import_react_select2 = __toESM(require("react-select"));
|
5128
|
-
var
|
5176
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5129
5177
|
var CHECKBOX_STATE = {
|
5130
5178
|
UNCHECKED: 0,
|
5131
5179
|
INDETERMINATE: 1,
|
@@ -5172,8 +5220,8 @@ var InputOption = ({
|
|
5172
5220
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
5173
5221
|
style
|
5174
5222
|
};
|
5175
|
-
return /* @__PURE__ */ (0,
|
5176
|
-
/* @__PURE__ */ (0,
|
5223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
5224
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5177
5225
|
import_react_select2.components.Option,
|
5178
5226
|
{
|
5179
5227
|
isMulti: true,
|
@@ -5184,8 +5232,8 @@ var InputOption = ({
|
|
5184
5232
|
getStyles,
|
5185
5233
|
innerProps: props,
|
5186
5234
|
...rest,
|
5187
|
-
children: /* @__PURE__ */ (0,
|
5188
|
-
|
5235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5236
|
+
import_react81.Flex,
|
5189
5237
|
{
|
5190
5238
|
alignItems: "center",
|
5191
5239
|
width: "100%",
|
@@ -5193,8 +5241,8 @@ var InputOption = ({
|
|
5193
5241
|
"data-test-id": "CT_component_select-checkbox_options",
|
5194
5242
|
cursor: isDisabled ? "not-allowed" : "default",
|
5195
5243
|
children: [
|
5196
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5197
|
-
|
5244
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5245
|
+
import_react81.Checkbox,
|
5198
5246
|
{
|
5199
5247
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
5200
5248
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -5203,8 +5251,8 @@ var InputOption = ({
|
|
5203
5251
|
"data-test-id": "CT_component_select-checkbox_select-all-option",
|
5204
5252
|
isInvalid: false
|
5205
5253
|
}
|
5206
|
-
) : /* @__PURE__ */ (0,
|
5207
|
-
|
5254
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5255
|
+
import_react81.Checkbox,
|
5208
5256
|
{
|
5209
5257
|
pointerEvents: "none",
|
5210
5258
|
isChecked: isSelected,
|
@@ -5212,13 +5260,13 @@ var InputOption = ({
|
|
5212
5260
|
isInvalid: false
|
5213
5261
|
}
|
5214
5262
|
),
|
5215
|
-
/* @__PURE__ */ (0,
|
5263
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react81.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
5216
5264
|
]
|
5217
5265
|
}
|
5218
5266
|
)
|
5219
5267
|
}
|
5220
5268
|
),
|
5221
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5269
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("hr", {}) : null
|
5222
5270
|
] });
|
5223
5271
|
};
|
5224
5272
|
var SelectWithCheckboxBase = ({
|
@@ -5231,7 +5279,7 @@ var SelectWithCheckboxBase = ({
|
|
5231
5279
|
...rest
|
5232
5280
|
}) => {
|
5233
5281
|
const { colorMode } = (0, import_system10.useColorMode)();
|
5234
|
-
return /* @__PURE__ */ (0,
|
5282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5235
5283
|
import_react_select2.default,
|
5236
5284
|
{
|
5237
5285
|
"data-test-id": "",
|
@@ -5250,8 +5298,9 @@ var SelectWithCheckboxBase = ({
|
|
5250
5298
|
);
|
5251
5299
|
};
|
5252
5300
|
var SelectCheckbox = (props) => {
|
5253
|
-
const { isMulti, options, value, components, ...rest } = props;
|
5301
|
+
const { isMulti, options, value, components, virtualized, ...rest } = props;
|
5254
5302
|
const selectValue = value || [];
|
5303
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5255
5304
|
const defaultComponents = {
|
5256
5305
|
DropdownIndicator,
|
5257
5306
|
ClearIndicator,
|
@@ -5263,10 +5312,10 @@ var SelectCheckbox = (props) => {
|
|
5263
5312
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
5264
5313
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
5265
5314
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
5266
|
-
return /* @__PURE__ */ (0,
|
5315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InputOption, { ...optionProps, checkedState });
|
5267
5316
|
}
|
5268
5317
|
};
|
5269
|
-
return /* @__PURE__ */ (0,
|
5318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5270
5319
|
SelectWithCheckboxBase,
|
5271
5320
|
{
|
5272
5321
|
"data-test-id": "",
|
@@ -5275,6 +5324,9 @@ var SelectCheckbox = (props) => {
|
|
5275
5324
|
value,
|
5276
5325
|
components: {
|
5277
5326
|
...defaultComponents,
|
5327
|
+
...virtualized ? {
|
5328
|
+
MenuList: renderMenuListVirtualized
|
5329
|
+
} : {},
|
5278
5330
|
...components
|
5279
5331
|
},
|
5280
5332
|
...rest
|
@@ -5284,13 +5336,13 @@ var SelectCheckbox = (props) => {
|
|
5284
5336
|
var select_with_checkbox_default = SelectCheckbox;
|
5285
5337
|
|
5286
5338
|
// src/components/sidebar/components/sidebar.tsx
|
5287
|
-
var
|
5339
|
+
var import_react82 = require("@chakra-ui/react");
|
5288
5340
|
var import_framer_motion = require("framer-motion");
|
5289
|
-
var
|
5341
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5290
5342
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5291
5343
|
const { width = "220px" } = props;
|
5292
|
-
return /* @__PURE__ */ (0,
|
5293
|
-
|
5344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5345
|
+
import_react82.Flex,
|
5294
5346
|
{
|
5295
5347
|
position: "relative",
|
5296
5348
|
as: import_framer_motion.motion.div,
|
@@ -5310,13 +5362,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5310
5362
|
Sidebar.displayName = "Sidebar";
|
5311
5363
|
|
5312
5364
|
// src/components/sidebar/components/sidebar-header.tsx
|
5313
|
-
var
|
5365
|
+
var import_react83 = require("@chakra-ui/react");
|
5314
5366
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5315
5367
|
var import_framer_motion2 = require("framer-motion");
|
5316
|
-
var
|
5368
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5317
5369
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5318
|
-
return /* @__PURE__ */ (0,
|
5319
|
-
|
5370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5371
|
+
import_react83.Box,
|
5320
5372
|
{
|
5321
5373
|
px: "2",
|
5322
5374
|
color: "neutral.900",
|
@@ -5325,8 +5377,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5325
5377
|
_hover: {
|
5326
5378
|
color: "primary.500"
|
5327
5379
|
},
|
5328
|
-
children: /* @__PURE__ */ (0,
|
5329
|
-
|
5380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5381
|
+
import_react83.Flex,
|
5330
5382
|
{
|
5331
5383
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5332
5384
|
direction: "row",
|
@@ -5335,8 +5387,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5335
5387
|
onClick: () => setCollapse(!isCollapse),
|
5336
5388
|
cursor: "pointer",
|
5337
5389
|
children: [
|
5338
|
-
/* @__PURE__ */ (0,
|
5339
|
-
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5391
|
+
import_react83.Box,
|
5340
5392
|
{
|
5341
5393
|
as: import_framer_motion2.motion.div,
|
5342
5394
|
boxSize: "4",
|
@@ -5344,11 +5396,11 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5344
5396
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
5345
5397
|
transitionTimingFunction: "linear",
|
5346
5398
|
"aria-label": "toggle sidebar",
|
5347
|
-
children: /* @__PURE__ */ (0,
|
5399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5348
5400
|
}
|
5349
5401
|
),
|
5350
|
-
/* @__PURE__ */ (0,
|
5351
|
-
|
5402
|
+
/* @__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)(
|
5403
|
+
import_react83.Text,
|
5352
5404
|
{
|
5353
5405
|
as: import_framer_motion2.motion.div,
|
5354
5406
|
w: "max-content",
|
@@ -5374,37 +5426,37 @@ SidebarHeader.defaultProps = {
|
|
5374
5426
|
};
|
5375
5427
|
|
5376
5428
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5377
|
-
var
|
5429
|
+
var import_react84 = require("@chakra-ui/react");
|
5378
5430
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5379
5431
|
var import_framer_motion3 = require("framer-motion");
|
5380
|
-
var
|
5432
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5381
5433
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5382
|
-
return /* @__PURE__ */ (0,
|
5383
|
-
|
5434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5435
|
+
import_react84.Box,
|
5384
5436
|
{
|
5385
5437
|
as: import_framer_motion3.motion.div,
|
5386
5438
|
transitionTimingFunction: "linear",
|
5387
5439
|
initial: { padding: "8px" },
|
5388
5440
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5389
|
-
children: /* @__PURE__ */ (0,
|
5441
|
+
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
5442
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5391
|
-
return /* @__PURE__ */ (0,
|
5443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5392
5444
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5393
5445
|
const noChild = !item.children.length;
|
5394
5446
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5395
|
-
return /* @__PURE__ */ (0,
|
5396
|
-
/* @__PURE__ */ (0,
|
5447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
5448
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5397
5449
|
const activeOption = isOpen ? "primary.50" : "white";
|
5398
5450
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5399
5451
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5400
|
-
return /* @__PURE__ */ (0,
|
5401
|
-
/* @__PURE__ */ (0,
|
5402
|
-
|
5452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
5453
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5454
|
+
import_react84.AccordionButton,
|
5403
5455
|
{
|
5404
5456
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5405
5457
|
p: "0",
|
5406
5458
|
h: "fit-content",
|
5407
|
-
children: /* @__PURE__ */ (0,
|
5459
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5408
5460
|
NavItem,
|
5409
5461
|
{
|
5410
5462
|
as: import_framer_motion3.motion.div,
|
@@ -5417,9 +5469,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5417
5469
|
position: "relative",
|
5418
5470
|
...itemStyles,
|
5419
5471
|
children: [
|
5420
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5421
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5422
|
-
|
5472
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5473
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5474
|
+
import_react84.Box,
|
5423
5475
|
{
|
5424
5476
|
display: "flex",
|
5425
5477
|
w: "full",
|
@@ -5433,16 +5485,16 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5433
5485
|
animate: { opacity: 1, x: 0 },
|
5434
5486
|
exit: { opacity: 0, x: 16 },
|
5435
5487
|
children: [
|
5436
|
-
/* @__PURE__ */ (0,
|
5437
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5438
|
-
|
5488
|
+
/* @__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 }) }),
|
5489
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5490
|
+
import_react84.Box,
|
5439
5491
|
{
|
5440
5492
|
display: "flex",
|
5441
5493
|
boxSize: "3",
|
5442
5494
|
as: import_framer_motion3.motion.div,
|
5443
5495
|
transitionTimingFunction: "linear",
|
5444
5496
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
5445
|
-
children: /* @__PURE__ */ (0,
|
5497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon8.ChevronDown, { size: 3 })
|
5446
5498
|
}
|
5447
5499
|
)
|
5448
5500
|
]
|
@@ -5455,12 +5507,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5455
5507
|
},
|
5456
5508
|
item.id
|
5457
5509
|
) }, item.id),
|
5458
|
-
isOpenOptions && /* @__PURE__ */ (0,
|
5459
|
-
/* @__PURE__ */ (0,
|
5510
|
+
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: [
|
5511
|
+
/* @__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
5512
|
mappingIcon2.get(item.icon || ""),
|
5461
|
-
/* @__PURE__ */ (0,
|
5513
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { as: "span", ml: "2", children: item.title })
|
5462
5514
|
] }) }),
|
5463
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5515
|
+
!!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
5516
|
NavItem,
|
5465
5517
|
{
|
5466
5518
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5476,7 +5528,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5476
5528
|
},
|
5477
5529
|
submenu.id
|
5478
5530
|
)) })
|
5479
|
-
] }) : isCollapse && /* @__PURE__ */ (0,
|
5531
|
+
] }) : 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
5532
|
NavItem,
|
5481
5533
|
{
|
5482
5534
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5489,22 +5541,22 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5489
5541
|
rounded: "none",
|
5490
5542
|
...itemStyles,
|
5491
5543
|
children: [
|
5492
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5493
|
-
/* @__PURE__ */ (0,
|
5544
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5545
|
+
/* @__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
5546
|
]
|
5495
5547
|
},
|
5496
5548
|
item.id
|
5497
5549
|
) }) }) })
|
5498
5550
|
] });
|
5499
5551
|
} }, item.id),
|
5500
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5501
|
-
|
5552
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5553
|
+
import_react84.Fade,
|
5502
5554
|
{
|
5503
5555
|
in: true,
|
5504
5556
|
transition: {
|
5505
5557
|
enter: { duration: 0.5 }
|
5506
5558
|
},
|
5507
|
-
children: /* @__PURE__ */ (0,
|
5559
|
+
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
5560
|
NavItem,
|
5509
5561
|
{
|
5510
5562
|
mt: "1",
|
@@ -5532,16 +5584,16 @@ SidebarMenu.defaultProps = {
|
|
5532
5584
|
};
|
5533
5585
|
|
5534
5586
|
// src/components/switch/components/switch.tsx
|
5535
|
-
var
|
5587
|
+
var import_react85 = require("@chakra-ui/react");
|
5536
5588
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5537
5589
|
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,
|
5590
|
+
var import_react86 = require("react");
|
5591
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
5592
|
+
var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
5593
|
+
const styles = (0, import_react85.useMultiStyleConfig)("Switch", props);
|
5594
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react85.omitThemingProps)(props);
|
5595
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react85.useCheckbox)(ownProps);
|
5596
|
+
const containerStyles = (0, import_react86.useMemo)(
|
5545
5597
|
() => ({
|
5546
5598
|
display: "inline-block",
|
5547
5599
|
position: "relative",
|
@@ -5551,7 +5603,7 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5551
5603
|
}),
|
5552
5604
|
[styles.container]
|
5553
5605
|
);
|
5554
|
-
const trackStyles = (0,
|
5606
|
+
const trackStyles = (0, import_react86.useMemo)(
|
5555
5607
|
() => ({
|
5556
5608
|
display: "inline-flex",
|
5557
5609
|
flexShrink: 0,
|
@@ -5563,7 +5615,7 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5563
5615
|
}),
|
5564
5616
|
[styles.track]
|
5565
5617
|
);
|
5566
|
-
const labelStyles = (0,
|
5618
|
+
const labelStyles = (0, import_react86.useMemo)(
|
5567
5619
|
() => ({
|
5568
5620
|
userSelect: "none",
|
5569
5621
|
marginStart: spacing2,
|
@@ -5579,8 +5631,8 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5579
5631
|
};
|
5580
5632
|
return iconSize[value];
|
5581
5633
|
};
|
5582
|
-
return /* @__PURE__ */ (0,
|
5583
|
-
|
5634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5635
|
+
import_react85.chakra.label,
|
5584
5636
|
{
|
5585
5637
|
...getRootProps(),
|
5586
5638
|
display: "flex",
|
@@ -5588,14 +5640,14 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5588
5640
|
className: (0, import_shared_utils10.cx)("chakra-switch", props.className),
|
5589
5641
|
__css: containerStyles,
|
5590
5642
|
children: [
|
5591
|
-
/* @__PURE__ */ (0,
|
5592
|
-
/* @__PURE__ */ (0,
|
5593
|
-
/* @__PURE__ */ (0,
|
5594
|
-
/* @__PURE__ */ (0,
|
5595
|
-
/* @__PURE__ */ (0,
|
5643
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5644
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react85.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5645
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react85.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5646
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5647
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5596
5648
|
] }),
|
5597
|
-
/* @__PURE__ */ (0,
|
5598
|
-
|
5649
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5650
|
+
import_react85.chakra.span,
|
5599
5651
|
{
|
5600
5652
|
__css: styles.thumb,
|
5601
5653
|
className: "chakra-switch__thumb",
|
@@ -5604,8 +5656,8 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5604
5656
|
}
|
5605
5657
|
)
|
5606
5658
|
] }),
|
5607
|
-
children && /* @__PURE__ */ (0,
|
5608
|
-
|
5659
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5660
|
+
import_react85.chakra.span,
|
5609
5661
|
{
|
5610
5662
|
className: "chakra-switch__label",
|
5611
5663
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5625,18 +5677,18 @@ Switch.defaultProps = {
|
|
5625
5677
|
var switch_default = Switch;
|
5626
5678
|
|
5627
5679
|
// src/components/table/index.tsx
|
5628
|
-
var
|
5680
|
+
var import_react87 = require("@chakra-ui/react");
|
5629
5681
|
|
5630
5682
|
// src/components/tabs/components/tab.tsx
|
5631
|
-
var
|
5632
|
-
var
|
5633
|
-
var Tab = (0,
|
5683
|
+
var import_react88 = require("@chakra-ui/react");
|
5684
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5685
|
+
var Tab = (0, import_react88.forwardRef)((props, ref) => {
|
5634
5686
|
var _a, _b;
|
5635
|
-
const tabProps = (0,
|
5687
|
+
const tabProps = (0, import_react88.useTab)({ ...props, ref });
|
5636
5688
|
const isSelected = !!tabProps["aria-selected"];
|
5637
|
-
const styles = (0,
|
5638
|
-
return /* @__PURE__ */ (0,
|
5639
|
-
|
5689
|
+
const styles = (0, import_react88.useMultiStyleConfig)("Tabs", tabProps);
|
5690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5691
|
+
import_react88.Button,
|
5640
5692
|
{
|
5641
5693
|
"data-test-id": props["data-test-id"],
|
5642
5694
|
p: 4,
|
@@ -5661,7 +5713,7 @@ var Tab = (0, import_react87.forwardRef)((props, ref) => {
|
|
5661
5713
|
},
|
5662
5714
|
__css: styles.tab,
|
5663
5715
|
...tabProps,
|
5664
|
-
children: /* @__PURE__ */ (0,
|
5716
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react88.Flex, { alignItems: "center", children: [
|
5665
5717
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5666
5718
|
tabProps.children,
|
5667
5719
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5672,39 +5724,39 @@ var Tab = (0, import_react87.forwardRef)((props, ref) => {
|
|
5672
5724
|
var tab_default = Tab;
|
5673
5725
|
|
5674
5726
|
// src/components/tabs/index.ts
|
5675
|
-
var
|
5727
|
+
var import_react89 = require("@chakra-ui/react");
|
5676
5728
|
|
5677
5729
|
// src/components/text/index.ts
|
5678
|
-
var
|
5730
|
+
var import_react90 = require("@chakra-ui/react");
|
5679
5731
|
|
5680
5732
|
// src/components/time-input/components/index.tsx
|
5681
|
-
var
|
5733
|
+
var import_react92 = require("@chakra-ui/react");
|
5682
5734
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5683
|
-
var
|
5735
|
+
var import_react93 = require("react");
|
5684
5736
|
|
5685
5737
|
// src/components/time-input/components/integration.tsx
|
5686
5738
|
var import_timescape = require("@zamiru/timescape");
|
5687
5739
|
var import_timescape2 = require("@zamiru/timescape");
|
5688
|
-
var
|
5740
|
+
var import_react91 = require("react");
|
5689
5741
|
var useTimescape = (options = {}) => {
|
5690
5742
|
var _a;
|
5691
5743
|
const { date, onChangeDate, ...rest } = options;
|
5692
|
-
const [manager] = (0,
|
5693
|
-
const onChangeDateRef = (0,
|
5694
|
-
(0,
|
5744
|
+
const [manager] = (0, import_react91.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5745
|
+
const onChangeDateRef = (0, import_react91.useRef)(onChangeDate);
|
5746
|
+
(0, import_react91.useLayoutEffect)(() => {
|
5695
5747
|
onChangeDateRef.current = onChangeDate;
|
5696
5748
|
}, [onChangeDate]);
|
5697
|
-
const [optionsState, update] = (0,
|
5749
|
+
const [optionsState, update] = (0, import_react91.useState)(() => ({
|
5698
5750
|
date,
|
5699
5751
|
...rest
|
5700
5752
|
}));
|
5701
|
-
(0,
|
5753
|
+
(0, import_react91.useEffect)(() => {
|
5702
5754
|
manager.resync();
|
5703
5755
|
return () => {
|
5704
5756
|
manager.remove();
|
5705
5757
|
};
|
5706
5758
|
}, [manager]);
|
5707
|
-
(0,
|
5759
|
+
(0, import_react91.useEffect)(() => {
|
5708
5760
|
return manager.on("changeDate", (nextDate) => {
|
5709
5761
|
var _a2;
|
5710
5762
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5712,7 +5764,7 @@ var useTimescape = (options = {}) => {
|
|
5712
5764
|
});
|
5713
5765
|
}, [manager]);
|
5714
5766
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5715
|
-
(0,
|
5767
|
+
(0, import_react91.useEffect)(() => {
|
5716
5768
|
manager.date = timestamp;
|
5717
5769
|
manager.minDate = optionsState.minDate;
|
5718
5770
|
manager.maxDate = optionsState.maxDate;
|
@@ -5754,7 +5806,7 @@ var useTimescape = (options = {}) => {
|
|
5754
5806
|
};
|
5755
5807
|
|
5756
5808
|
// src/components/time-input/components/index.tsx
|
5757
|
-
var
|
5809
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5758
5810
|
var timeDigitFormat = (number) => {
|
5759
5811
|
if (number.toString().length === 1) {
|
5760
5812
|
return `0${number}`;
|
@@ -5778,9 +5830,9 @@ var timeFromString = (timeString) => {
|
|
5778
5830
|
const [hours, minutes, seconds] = timeString.split(":");
|
5779
5831
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5780
5832
|
};
|
5781
|
-
var InputTimeArea = (0,
|
5782
|
-
return /* @__PURE__ */ (0,
|
5783
|
-
|
5833
|
+
var InputTimeArea = (0, import_react92.forwardRef)((props, ref) => {
|
5834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5835
|
+
import_react92.Input,
|
5784
5836
|
{
|
5785
5837
|
_focusWithin: {
|
5786
5838
|
bg: "neutral.300"
|
@@ -5798,7 +5850,7 @@ var InputTimeArea = (0, import_react91.forwardRef)((props, ref) => {
|
|
5798
5850
|
}
|
5799
5851
|
);
|
5800
5852
|
});
|
5801
|
-
var TimeInput2 = (0,
|
5853
|
+
var TimeInput2 = (0, import_react92.forwardRef)(
|
5802
5854
|
({
|
5803
5855
|
name,
|
5804
5856
|
config: config2,
|
@@ -5825,7 +5877,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5825
5877
|
date,
|
5826
5878
|
...config2
|
5827
5879
|
});
|
5828
|
-
(0,
|
5880
|
+
(0, import_react93.useEffect)(() => {
|
5829
5881
|
var _a, _b, _c, _d, _e, _f;
|
5830
5882
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5831
5883
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5834,7 +5886,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5834
5886
|
onChangeTime(timeValue);
|
5835
5887
|
}
|
5836
5888
|
}, [options.date]);
|
5837
|
-
(0,
|
5889
|
+
(0, import_react93.useImperativeHandle)(ref, () => ({
|
5838
5890
|
focus() {
|
5839
5891
|
_manager.focusField("hours");
|
5840
5892
|
}
|
@@ -5855,7 +5907,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5855
5907
|
};
|
5856
5908
|
};
|
5857
5909
|
const { outlineColor, focusColor } = getProperties();
|
5858
|
-
return /* @__PURE__ */ (0,
|
5910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5859
5911
|
field_default,
|
5860
5912
|
{
|
5861
5913
|
isError,
|
@@ -5864,8 +5916,8 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5864
5916
|
errorMessage,
|
5865
5917
|
isDisabled,
|
5866
5918
|
isSuccess,
|
5867
|
-
children: /* @__PURE__ */ (0,
|
5868
|
-
|
5919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5920
|
+
import_react92.Box,
|
5869
5921
|
{
|
5870
5922
|
transition: "all 0.15s",
|
5871
5923
|
boxShadow: "none",
|
@@ -5875,8 +5927,8 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5875
5927
|
_focusWithin: {
|
5876
5928
|
borderColor: focusColor
|
5877
5929
|
},
|
5878
|
-
children: /* @__PURE__ */ (0,
|
5879
|
-
|
5930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5931
|
+
import_react92.InputGroup,
|
5880
5932
|
{
|
5881
5933
|
borderRadius: "sm",
|
5882
5934
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5885,17 +5937,17 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5885
5937
|
gap: 3,
|
5886
5938
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5887
5939
|
children: [
|
5888
|
-
/* @__PURE__ */ (0,
|
5889
|
-
/* @__PURE__ */ (0,
|
5890
|
-
/* @__PURE__ */ (0,
|
5891
|
-
/* @__PURE__ */ (0,
|
5892
|
-
seconds && /* @__PURE__ */ (0,
|
5893
|
-
/* @__PURE__ */ (0,
|
5894
|
-
/* @__PURE__ */ (0,
|
5940
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5941
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5942
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
5943
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
5944
|
+
seconds && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5945
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
5946
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5895
5947
|
] }),
|
5896
|
-
options.hour12 && /* @__PURE__ */ (0,
|
5948
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Input, { p: 0, ...getInputProps("am/pm") })
|
5897
5949
|
] }),
|
5898
|
-
/* @__PURE__ */ (0,
|
5950
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5899
5951
|
addOnRight
|
5900
5952
|
]
|
5901
5953
|
}
|
@@ -5908,16 +5960,16 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5908
5960
|
);
|
5909
5961
|
|
5910
5962
|
// src/components/toast/components/toast.tsx
|
5911
|
-
var
|
5963
|
+
var import_react95 = require("@chakra-ui/react");
|
5912
5964
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5913
5965
|
var import_react_toastify = require("react-toastify");
|
5914
5966
|
|
5915
5967
|
// src/components/toast/components/styles.tsx
|
5916
|
-
var
|
5917
|
-
var
|
5968
|
+
var import_react94 = require("@emotion/react");
|
5969
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
5918
5970
|
var Styles2 = () => {
|
5919
|
-
return /* @__PURE__ */ (0,
|
5920
|
-
|
5971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5972
|
+
import_react94.Global,
|
5921
5973
|
{
|
5922
5974
|
styles: `
|
5923
5975
|
:root {
|
@@ -5951,10 +6003,10 @@ var Styles2 = () => {
|
|
5951
6003
|
var styles_default2 = Styles2;
|
5952
6004
|
|
5953
6005
|
// src/components/toast/components/toast.tsx
|
5954
|
-
var
|
6006
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
5955
6007
|
var CustomCloseButton = (props) => {
|
5956
6008
|
const { closeToast } = props;
|
5957
|
-
return /* @__PURE__ */ (0,
|
6009
|
+
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
6010
|
};
|
5959
6011
|
var DEFAULT_OPTIONS = {
|
5960
6012
|
position: "top-right",
|
@@ -5977,7 +6029,7 @@ var renderIcon = (icon, type) => {
|
|
5977
6029
|
return icon;
|
5978
6030
|
};
|
5979
6031
|
var useToast = () => {
|
5980
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
6032
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react95.useToken)("colors", [
|
5981
6033
|
"primary.500",
|
5982
6034
|
"neutral.500",
|
5983
6035
|
"info.500",
|
@@ -5986,15 +6038,15 @@ var useToast = () => {
|
|
5986
6038
|
"success.500"
|
5987
6039
|
]);
|
5988
6040
|
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,
|
6041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
6042
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(styles_default2, {}),
|
6043
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
|
6044
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Flex, { alignItems: "center", children: [
|
6045
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
6046
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.chakra.span, { noOfLines: 2, children: message })
|
5995
6047
|
] }),
|
5996
|
-
link && /* @__PURE__ */ (0,
|
5997
|
-
|
6048
|
+
link && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6049
|
+
import_react95.Link,
|
5998
6050
|
{
|
5999
6051
|
as: link.as,
|
6000
6052
|
href: link.url,
|
@@ -6074,9 +6126,9 @@ var useToast = () => {
|
|
6074
6126
|
var import_react_toastify2 = require("react-toastify");
|
6075
6127
|
|
6076
6128
|
// src/components/uploader/components/uploader.tsx
|
6077
|
-
var
|
6129
|
+
var import_react96 = require("@chakra-ui/react");
|
6078
6130
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
6079
|
-
var
|
6131
|
+
var import_react97 = require("react");
|
6080
6132
|
var import_react_dropzone = require("react-dropzone");
|
6081
6133
|
|
6082
6134
|
// src/components/uploader/constants.ts
|
@@ -6163,7 +6215,7 @@ var defaultOnHandleRejections = (fileRejection, config2, handleRejection) => {
|
|
6163
6215
|
};
|
6164
6216
|
|
6165
6217
|
// src/components/uploader/components/uploader.tsx
|
6166
|
-
var
|
6218
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
6167
6219
|
var Uploader = ({
|
6168
6220
|
onHandleUploadFile,
|
6169
6221
|
onHandleRejections,
|
@@ -6195,15 +6247,15 @@ var Uploader = ({
|
|
6195
6247
|
customErrorRejection,
|
6196
6248
|
...props
|
6197
6249
|
}) => {
|
6198
|
-
const [filePreview, setFilePreview] = (0,
|
6199
|
-
const [isError, setIsError] = (0,
|
6200
|
-
const [errorText, setErrorText] = (0,
|
6201
|
-
(0,
|
6250
|
+
const [filePreview, setFilePreview] = (0, import_react97.useState)();
|
6251
|
+
const [isError, setIsError] = (0, import_react97.useState)(propIsError);
|
6252
|
+
const [errorText, setErrorText] = (0, import_react97.useState)(propErrorText);
|
6253
|
+
(0, import_react97.useEffect)(() => {
|
6202
6254
|
setIsError(propIsError);
|
6203
6255
|
setErrorText(propErrorText);
|
6204
6256
|
}, [propIsError, propErrorText]);
|
6205
6257
|
const toast2 = useToast();
|
6206
|
-
const handleRejection = (0,
|
6258
|
+
const handleRejection = (0, import_react97.useCallback)(
|
6207
6259
|
(message, file, image, errorCode) => {
|
6208
6260
|
if (onHandleRejections) {
|
6209
6261
|
onHandleRejections(file, image, errorCode);
|
@@ -6226,7 +6278,7 @@ var Uploader = ({
|
|
6226
6278
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
6227
6279
|
[onHandleRejections, customErrorRejection]
|
6228
6280
|
);
|
6229
|
-
const onDropAccepted = (0,
|
6281
|
+
const onDropAccepted = (0, import_react97.useCallback)(
|
6230
6282
|
(files) => {
|
6231
6283
|
const file = files[0];
|
6232
6284
|
setIsError(false);
|
@@ -6261,10 +6313,10 @@ var Uploader = ({
|
|
6261
6313
|
},
|
6262
6314
|
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
|
6263
6315
|
);
|
6264
|
-
const onDropRejected = (0,
|
6316
|
+
const onDropRejected = (0, import_react97.useCallback)((fileRejections) => {
|
6265
6317
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
6266
6318
|
}, []);
|
6267
|
-
const validator = (0,
|
6319
|
+
const validator = (0, import_react97.useCallback)(
|
6268
6320
|
(file) => {
|
6269
6321
|
const result = [];
|
6270
6322
|
if (validatorExt) {
|
@@ -6296,27 +6348,27 @@ var Uploader = ({
|
|
6296
6348
|
});
|
6297
6349
|
const renderHelperText = () => {
|
6298
6350
|
if (Array.isArray(helperText)) {
|
6299
|
-
return /* @__PURE__ */ (0,
|
6300
|
-
|
6351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6352
|
+
import_react96.UnorderedList,
|
6301
6353
|
{
|
6302
6354
|
pl: 2,
|
6303
6355
|
fontSize: 12,
|
6304
6356
|
color: "black.medium",
|
6305
6357
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6306
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0,
|
6358
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.ListItem, { children: text2 }, text2))
|
6307
6359
|
}
|
6308
6360
|
);
|
6309
6361
|
}
|
6310
6362
|
return helperText;
|
6311
6363
|
};
|
6312
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0,
|
6364
|
+
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
6365
|
const handleRemove = (e) => {
|
6314
6366
|
e.stopPropagation();
|
6315
6367
|
setFilePreview(void 0);
|
6316
6368
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6317
6369
|
acceptedFiles.pop();
|
6318
6370
|
};
|
6319
|
-
(0,
|
6371
|
+
(0, import_react97.useEffect)(() => {
|
6320
6372
|
if (value) {
|
6321
6373
|
if (typeof value === "string") {
|
6322
6374
|
setFilePreview(value);
|
@@ -6340,16 +6392,16 @@ var Uploader = ({
|
|
6340
6392
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6341
6393
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6342
6394
|
const cursorType = filePreview ? "initial" : "pointer";
|
6343
|
-
return /* @__PURE__ */ (0,
|
6395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.FormControl, { isRequired, children: [
|
6344
6396
|
label && typeof label === "string" ? (
|
6345
6397
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6346
|
-
/* @__PURE__ */ (0,
|
6347
|
-
isRequired && /* @__PURE__ */ (0,
|
6398
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, {}), fontSize: "text.sm", children: [
|
6399
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.RequiredIndicator, { mr: 1, ml: 0 }),
|
6348
6400
|
label
|
6349
6401
|
] })
|
6350
6402
|
) : label,
|
6351
|
-
/* @__PURE__ */ (0,
|
6352
|
-
|
6403
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
6404
|
+
import_react96.Flex,
|
6353
6405
|
{
|
6354
6406
|
minH: containerHeight,
|
6355
6407
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6366,8 +6418,8 @@ var Uploader = ({
|
|
6366
6418
|
...props,
|
6367
6419
|
...getRootProps(),
|
6368
6420
|
children: [
|
6369
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0,
|
6370
|
-
|
6421
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6422
|
+
import_react96.Button,
|
6371
6423
|
{
|
6372
6424
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6373
6425
|
"aria-label": "remove-image",
|
@@ -6381,32 +6433,32 @@ var Uploader = ({
|
|
6381
6433
|
border: "none",
|
6382
6434
|
zIndex: 1,
|
6383
6435
|
onClick: handleRemove,
|
6384
|
-
children: /* @__PURE__ */ (0,
|
6436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6385
6437
|
}
|
6386
6438
|
) }),
|
6387
|
-
filePreview && /* @__PURE__ */ (0,
|
6388
|
-
|
6439
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6440
|
+
import_react96.Flex,
|
6389
6441
|
{
|
6390
6442
|
position: "relative",
|
6391
6443
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6392
6444
|
justify: "center",
|
6393
6445
|
align: "center",
|
6394
|
-
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0,
|
6395
|
-
|
6446
|
+
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6447
|
+
import_react96.Image,
|
6396
6448
|
{
|
6397
6449
|
h: size2 === "lg" ? "120" : "100",
|
6398
6450
|
src: filePreview,
|
6399
6451
|
alt: "uploader-preview",
|
6400
6452
|
objectFit: "contain"
|
6401
6453
|
}
|
6402
|
-
) : /* @__PURE__ */ (0,
|
6454
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { noOfLines: 3, mx: 2, textAlign: "center", children: filePreview })
|
6403
6455
|
}
|
6404
6456
|
) }),
|
6405
|
-
!filePreview && /* @__PURE__ */ (0,
|
6406
|
-
size2 === "sm" && /* @__PURE__ */ (0,
|
6407
|
-
/* @__PURE__ */ (0,
|
6408
|
-
!filePreview && /* @__PURE__ */ (0,
|
6409
|
-
|
6457
|
+
!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: [
|
6458
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6459
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.Box, { children: [
|
6460
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6461
|
+
import_react96.Heading,
|
6410
6462
|
{
|
6411
6463
|
fontWeight: "400",
|
6412
6464
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6415,21 +6467,21 @@ var Uploader = ({
|
|
6415
6467
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6416
6468
|
}
|
6417
6469
|
),
|
6418
|
-
size2 === "lg" && /* @__PURE__ */ (0,
|
6470
|
+
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
6471
|
] })
|
6420
6472
|
] }) })
|
6421
6473
|
]
|
6422
6474
|
}
|
6423
6475
|
),
|
6424
|
-
/* @__PURE__ */ (0,
|
6476
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6425
6477
|
"input",
|
6426
6478
|
{
|
6427
6479
|
...getInputProps(),
|
6428
6480
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6429
6481
|
}
|
6430
6482
|
),
|
6431
|
-
filePreview && !isSmall && /* @__PURE__ */ (0,
|
6432
|
-
|
6483
|
+
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)(
|
6484
|
+
import_react96.Button,
|
6433
6485
|
{
|
6434
6486
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6435
6487
|
type: "button",
|
@@ -6475,10 +6527,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6475
6527
|
};
|
6476
6528
|
|
6477
6529
|
// src/components/index.ts
|
6478
|
-
var
|
6530
|
+
var import_react98 = require("@chakra-ui/react");
|
6479
6531
|
|
6480
6532
|
// src/config/theme/themeConfiguration.ts
|
6481
|
-
var
|
6533
|
+
var import_react106 = require("@chakra-ui/react");
|
6482
6534
|
|
6483
6535
|
// src/config/theme/components/index.ts
|
6484
6536
|
var components_exports = {};
|
@@ -7035,8 +7087,8 @@ var card_default2 = CardStyle;
|
|
7035
7087
|
|
7036
7088
|
// src/config/theme/components/checkbox.ts
|
7037
7089
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
7038
|
-
var
|
7039
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
7090
|
+
var import_react99 = require("@chakra-ui/react");
|
7091
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react99.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
7040
7092
|
var baseStyle3 = definePartsStyle3({
|
7041
7093
|
control: {
|
7042
7094
|
borderRadius: "sm",
|
@@ -7137,8 +7189,8 @@ var checkbox_default2 = Checkbox3;
|
|
7137
7189
|
|
7138
7190
|
// src/config/theme/components/chips.ts
|
7139
7191
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
7140
|
-
var
|
7141
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
7192
|
+
var import_react100 = require("@chakra-ui/react");
|
7193
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react100.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
7142
7194
|
var baseStyle4 = definePartsStyle4({
|
7143
7195
|
container: {
|
7144
7196
|
px: 3,
|
@@ -7347,8 +7399,8 @@ var input_default = Input4;
|
|
7347
7399
|
|
7348
7400
|
// src/config/theme/components/loader.ts
|
7349
7401
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7350
|
-
var
|
7351
|
-
var rotate = (0,
|
7402
|
+
var import_react101 = require("@emotion/react");
|
7403
|
+
var rotate = (0, import_react101.keyframes)({
|
7352
7404
|
"0%": {
|
7353
7405
|
transform: "rotate(0deg)"
|
7354
7406
|
},
|
@@ -7530,8 +7582,8 @@ var modal_default = modalTheme;
|
|
7530
7582
|
|
7531
7583
|
// src/config/theme/components/popover.ts
|
7532
7584
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7533
|
-
var
|
7534
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
7585
|
+
var import_react102 = require("@chakra-ui/react");
|
7586
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react102.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
7535
7587
|
var baseStyle8 = definePartsStyle7({
|
7536
7588
|
content: {
|
7537
7589
|
bg: "white"
|
@@ -7542,8 +7594,8 @@ var popover_default = popoverTheme;
|
|
7542
7594
|
|
7543
7595
|
// src/config/theme/components/radio.ts
|
7544
7596
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7545
|
-
var
|
7546
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
7597
|
+
var import_react103 = require("@chakra-ui/react");
|
7598
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react103.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
7547
7599
|
var baseStyle9 = definePartsStyle8({
|
7548
7600
|
control: {
|
7549
7601
|
border: "1px solid",
|
@@ -7761,7 +7813,7 @@ var baseStyle11 = definePartsStyle10({
|
|
7761
7813
|
th: {
|
7762
7814
|
fontFamily: "heading",
|
7763
7815
|
fontWeight: "semibold",
|
7764
|
-
textTransform: "
|
7816
|
+
textTransform: "capitalize",
|
7765
7817
|
letterSpacing: "normal",
|
7766
7818
|
textAlign: "start",
|
7767
7819
|
height: "50px",
|
@@ -7965,7 +8017,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7965
8017
|
var tabs_default = tabsTheme;
|
7966
8018
|
|
7967
8019
|
// src/config/theme/components/textarea.ts
|
7968
|
-
var
|
8020
|
+
var import_react104 = require("@chakra-ui/react");
|
7969
8021
|
var getProps = (props) => {
|
7970
8022
|
const { isError, isSuccess, isDisabled } = props;
|
7971
8023
|
let borderColor = "neutral.400";
|
@@ -7985,7 +8037,7 @@ var getProps = (props) => {
|
|
7985
8037
|
borderColor
|
7986
8038
|
};
|
7987
8039
|
};
|
7988
|
-
var outline3 = (0,
|
8040
|
+
var outline3 = (0, import_react104.defineStyle)((props) => {
|
7989
8041
|
const { focusBorderColor, borderColor } = getProps(props);
|
7990
8042
|
return {
|
7991
8043
|
background: "white.high",
|
@@ -8029,7 +8081,7 @@ var outline3 = (0, import_react103.defineStyle)((props) => {
|
|
8029
8081
|
}
|
8030
8082
|
};
|
8031
8083
|
});
|
8032
|
-
var Textarea = (0,
|
8084
|
+
var Textarea = (0, import_react104.defineStyleConfig)({
|
8033
8085
|
variants: { outline: outline3 },
|
8034
8086
|
defaultProps: {
|
8035
8087
|
variant: "outline"
|
@@ -8038,15 +8090,15 @@ var Textarea = (0, import_react103.defineStyleConfig)({
|
|
8038
8090
|
var textarea_default2 = Textarea;
|
8039
8091
|
|
8040
8092
|
// src/config/theme/components/tooltip.ts
|
8041
|
-
var
|
8042
|
-
var $arrowBg = (0,
|
8093
|
+
var import_react105 = require("@chakra-ui/react");
|
8094
|
+
var $arrowBg = (0, import_react105.cssVar)("popper-arrow-bg");
|
8043
8095
|
var baseStyle12 = {
|
8044
8096
|
bg: "neutral.700",
|
8045
8097
|
textStyle: "text.sm",
|
8046
8098
|
fontSize: "text.sm",
|
8047
8099
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
8048
8100
|
};
|
8049
|
-
var Tooltip2 = (0,
|
8101
|
+
var Tooltip2 = (0, import_react105.defineStyleConfig)({ baseStyle: baseStyle12 });
|
8050
8102
|
var tooltip_default = Tooltip2;
|
8051
8103
|
|
8052
8104
|
// src/config/theme/themeConfiguration.ts
|
@@ -8065,7 +8117,7 @@ var createExtendTheme = (theme5) => {
|
|
8065
8117
|
return function extendTheme2(...extensions) {
|
8066
8118
|
let overrides = [...extensions];
|
8067
8119
|
let activeTheme = extensions[extensions.length - 1];
|
8068
|
-
if ((0,
|
8120
|
+
if ((0, import_react106.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
8069
8121
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
8070
8122
|
overrides.length > 1) {
|
8071
8123
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -8074,13 +8126,13 @@ var createExtendTheme = (theme5) => {
|
|
8074
8126
|
}
|
8075
8127
|
return pipe(
|
8076
8128
|
...overrides.map(
|
8077
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
8129
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react106.mergeThemeOverride)(prevTheme, extension)
|
8078
8130
|
)
|
8079
8131
|
)(activeTheme);
|
8080
8132
|
};
|
8081
8133
|
};
|
8082
8134
|
var getTheme = (foundations) => {
|
8083
|
-
return (0,
|
8135
|
+
return (0, import_react106.extendTheme)({
|
8084
8136
|
...foundations,
|
8085
8137
|
components: {
|
8086
8138
|
...components_exports
|
@@ -8097,7 +8149,7 @@ var getTheme = (foundations) => {
|
|
8097
8149
|
config
|
8098
8150
|
});
|
8099
8151
|
};
|
8100
|
-
var theme4 = (0,
|
8152
|
+
var theme4 = (0, import_react106.extendTheme)({
|
8101
8153
|
components: {
|
8102
8154
|
...components_exports
|
8103
8155
|
},
|
@@ -8117,23 +8169,23 @@ var theme4 = (0, import_react105.extendTheme)({
|
|
8117
8169
|
|
8118
8170
|
// src/hooks/useFetcher.ts
|
8119
8171
|
var import_axios2 = __toESM(require("axios"));
|
8120
|
-
var
|
8172
|
+
var import_react109 = require("react");
|
8121
8173
|
|
8122
8174
|
// src/provider/components/provider.tsx
|
8123
8175
|
var import_axios = __toESM(require("axios"));
|
8124
|
-
var
|
8176
|
+
var import_react107 = require("react");
|
8125
8177
|
var import_react_toastify3 = require("react-toastify");
|
8126
|
-
var
|
8127
|
-
var ProviderContext = (0,
|
8178
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
8179
|
+
var ProviderContext = (0, import_react107.createContext)({
|
8128
8180
|
instance: void 0
|
8129
8181
|
});
|
8130
8182
|
var useInternalUI = () => {
|
8131
|
-
const { instance } = (0,
|
8183
|
+
const { instance } = (0, import_react107.useContext)(ProviderContext);
|
8132
8184
|
return { instance };
|
8133
8185
|
};
|
8134
8186
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
8135
|
-
const instanceRef = (0,
|
8136
|
-
(0,
|
8187
|
+
const instanceRef = (0, import_react107.useRef)(import_axios.default.create(config2));
|
8188
|
+
(0, import_react107.useEffect)(() => {
|
8137
8189
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
8138
8190
|
instanceRef.current.interceptors.request.use(interceptor);
|
8139
8191
|
});
|
@@ -8141,9 +8193,9 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
8141
8193
|
instanceRef.current.interceptors.response.use(interceptor);
|
8142
8194
|
});
|
8143
8195
|
}, [requestInterceptors, responseInterceptors]);
|
8144
|
-
const provider = (0,
|
8145
|
-
return /* @__PURE__ */ (0,
|
8146
|
-
/* @__PURE__ */ (0,
|
8196
|
+
const provider = (0, import_react107.useMemo)(() => ({ instance: instanceRef.current }), []);
|
8197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
8198
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_toastify3.ToastContainer, {}),
|
8147
8199
|
children
|
8148
8200
|
] });
|
8149
8201
|
};
|
@@ -8151,12 +8203,12 @@ Provider.displayName = "Provider";
|
|
8151
8203
|
var provider_default = Provider;
|
8152
8204
|
|
8153
8205
|
// src/provider/index.ts
|
8154
|
-
var
|
8206
|
+
var import_react108 = require("@chakra-ui/react");
|
8155
8207
|
|
8156
8208
|
// src/hooks/useFetcher.ts
|
8157
8209
|
function useFetcher() {
|
8158
8210
|
const { instance } = useInternalUI();
|
8159
|
-
const axiosInstance = (0,
|
8211
|
+
const axiosInstance = (0, import_react109.useMemo)(() => instance || import_axios2.default, [instance]);
|
8160
8212
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
8161
8213
|
const response = await axiosInstance.request({
|
8162
8214
|
data,
|
@@ -8176,10 +8228,10 @@ function useFetcher() {
|
|
8176
8228
|
}
|
8177
8229
|
|
8178
8230
|
// src/hooks/index.ts
|
8179
|
-
var
|
8231
|
+
var import_react110 = require("@chakra-ui/react");
|
8180
8232
|
|
8181
8233
|
// src/index.ts
|
8182
|
-
var
|
8234
|
+
var import_react111 = require("@chakra-ui/react");
|
8183
8235
|
// Annotate the CommonJS export names for ESM import in node:
|
8184
8236
|
0 && (module.exports = {
|
8185
8237
|
Accordion,
|