@ctlyst.id/internal-ui 5.5.6 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +423 -350
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +174 -101
- 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
|
|
@@ -1681,6 +1681,8 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1681
1681
|
{
|
1682
1682
|
colSpan: header.colSpan,
|
1683
1683
|
width: `${header.getSize()}px`,
|
1684
|
+
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
1685
|
+
_last: { paddingRight: `${paddingRowX + 8}px` },
|
1684
1686
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1685
1687
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1686
1688
|
import_react30.Flex,
|
@@ -1695,7 +1697,16 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1695
1697
|
},
|
1696
1698
|
header.id
|
1697
1699
|
)) }, headerGroup.id)) }),
|
1698
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1701
|
+
import_react30.Td,
|
1702
|
+
{
|
1703
|
+
width: 210,
|
1704
|
+
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
1705
|
+
_last: { paddingRight: `${paddingRowX + 8}px` },
|
1706
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i)
|
1707
|
+
},
|
1708
|
+
i
|
1709
|
+
)) }, num)) })
|
1699
1710
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react30.Table, { ...styles == null ? void 0 : styles.table, children: [
|
1700
1711
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1701
1712
|
import_react30.Thead,
|
@@ -4609,22 +4620,76 @@ var Rating = ({ value }) => {
|
|
4609
4620
|
var rating_default = Rating;
|
4610
4621
|
|
4611
4622
|
// src/components/select/components/select.tsx
|
4612
|
-
var
|
4623
|
+
var import_react80 = require("@chakra-ui/react");
|
4613
4624
|
var import_system6 = require("@chakra-ui/system");
|
4614
4625
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4615
4626
|
var import_react_select = __toESM(require("react-select"));
|
4616
4627
|
|
4628
|
+
// src/components/select/components/menu-list-virtualized.tsx
|
4629
|
+
var import_react_virtual = require("@tanstack/react-virtual");
|
4630
|
+
var import_react76 = require("react");
|
4631
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
4632
|
+
var MenuListVirtualized = (props) => {
|
4633
|
+
const { children, estimateSize, overscan, ...virtualizerProps } = props;
|
4634
|
+
const childrenArr = Array.isArray(children) ? children : [children];
|
4635
|
+
const itemCount = childrenArr.length;
|
4636
|
+
const parentRef = (0, import_react76.useRef)(null);
|
4637
|
+
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
4638
|
+
count: itemCount,
|
4639
|
+
getScrollElement: () => parentRef.current,
|
4640
|
+
estimateSize: estimateSize || (() => 42),
|
4641
|
+
overscan: overscan || 5,
|
4642
|
+
...virtualizerProps
|
4643
|
+
});
|
4644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4645
|
+
"div",
|
4646
|
+
{
|
4647
|
+
ref: parentRef,
|
4648
|
+
style: {
|
4649
|
+
height: `300px`,
|
4650
|
+
width: `100%`,
|
4651
|
+
overflow: "auto"
|
4652
|
+
},
|
4653
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4654
|
+
"div",
|
4655
|
+
{
|
4656
|
+
style: {
|
4657
|
+
height: `${rowVirtualizer.getTotalSize()}px`,
|
4658
|
+
width: "100%",
|
4659
|
+
position: "relative"
|
4660
|
+
},
|
4661
|
+
children: rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
4662
|
+
"div",
|
4663
|
+
{
|
4664
|
+
style: {
|
4665
|
+
position: "absolute",
|
4666
|
+
top: 0,
|
4667
|
+
left: 0,
|
4668
|
+
width: "100%",
|
4669
|
+
height: `${virtualRow.size}px`,
|
4670
|
+
transform: `translateY(${virtualRow.start}px)`
|
4671
|
+
},
|
4672
|
+
children: childrenArr[virtualRow.index]
|
4673
|
+
},
|
4674
|
+
virtualRow.index
|
4675
|
+
))
|
4676
|
+
}
|
4677
|
+
)
|
4678
|
+
}
|
4679
|
+
);
|
4680
|
+
};
|
4681
|
+
|
4617
4682
|
// src/config/theme/foundations/shadows.ts
|
4618
|
-
var
|
4683
|
+
var import_react77 = require("@chakra-ui/react");
|
4619
4684
|
var shadows = {
|
4620
|
-
...
|
4685
|
+
...import_react77.theme.shadows,
|
4621
4686
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4622
4687
|
};
|
4623
4688
|
|
4624
4689
|
// src/config/theme/foundations/sizes.ts
|
4625
|
-
var
|
4690
|
+
var import_react78 = require("@chakra-ui/react");
|
4626
4691
|
var sizes = {
|
4627
|
-
...
|
4692
|
+
...import_react78.theme.sizes,
|
4628
4693
|
4.5: "1.125rem",
|
4629
4694
|
9.5: "2.375rem",
|
4630
4695
|
18: "4.5rem",
|
@@ -4634,9 +4699,9 @@ var sizes = {
|
|
4634
4699
|
};
|
4635
4700
|
|
4636
4701
|
// src/config/theme/foundations/spacing.ts
|
4637
|
-
var
|
4702
|
+
var import_react79 = require("@chakra-ui/react");
|
4638
4703
|
var spacing = {
|
4639
|
-
...
|
4704
|
+
...import_react79.theme.space,
|
4640
4705
|
4.5: "1.125rem",
|
4641
4706
|
9.5: "2.375rem",
|
4642
4707
|
18: "4.5rem",
|
@@ -4986,22 +5051,22 @@ var themeSelect = (theme5) => {
|
|
4986
5051
|
};
|
4987
5052
|
|
4988
5053
|
// src/components/select/components/select.tsx
|
4989
|
-
var
|
5054
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
4990
5055
|
function DropdownIndicator(props) {
|
4991
|
-
return /* @__PURE__ */ (0,
|
5056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.DropdownIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.ChevronDown, { size: 4, color: "neutral.400" }) });
|
4992
5057
|
}
|
4993
5058
|
function ClearIndicator(props) {
|
4994
5059
|
const { hasValue } = props;
|
4995
|
-
return /* @__PURE__ */ (0,
|
5060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.ClearIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
4996
5061
|
}
|
4997
5062
|
function MultiValue(props) {
|
4998
|
-
return /* @__PURE__ */ (0,
|
5063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react80.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4999
5064
|
}
|
5000
5065
|
function MultiValueRemove(props) {
|
5001
|
-
return /* @__PURE__ */ (0,
|
5066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react80.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
5002
5067
|
}
|
5003
5068
|
function NoOptionsMessage(props) {
|
5004
|
-
return /* @__PURE__ */ (0,
|
5069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react80.Center, { textStyle: "text.xs", py: "1.5", color: "black.medium", children: (props == null ? void 0 : props.options.length) === 0 ? "Opsi tidak tersedia" : "Hasil tidak ditemukan" });
|
5005
5070
|
}
|
5006
5071
|
function Select2({
|
5007
5072
|
styles,
|
@@ -5009,8 +5074,9 @@ function Select2({
|
|
5009
5074
|
...rest
|
5010
5075
|
}) {
|
5011
5076
|
const { colorMode } = (0, import_system6.useColorMode)();
|
5012
|
-
const { components, value, onChange } = rest;
|
5013
|
-
|
5077
|
+
const { components, value, onChange, virtualized } = rest;
|
5078
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
5014
5080
|
import_react_select.default,
|
5015
5081
|
{
|
5016
5082
|
"data-test-id": "",
|
@@ -5021,6 +5087,9 @@ function Select2({
|
|
5021
5087
|
MultiValue,
|
5022
5088
|
MultiValueRemove,
|
5023
5089
|
NoOptionsMessage,
|
5090
|
+
...virtualized ? {
|
5091
|
+
MenuList: renderMenuListVirtualized
|
5092
|
+
} : {},
|
5024
5093
|
...components
|
5025
5094
|
},
|
5026
5095
|
value,
|
@@ -5037,7 +5106,7 @@ var select_default = Select2;
|
|
5037
5106
|
// src/components/select/components/select-async.tsx
|
5038
5107
|
var import_system7 = require("@chakra-ui/system");
|
5039
5108
|
var import_react_select_async_paginate = require("react-select-async-paginate");
|
5040
|
-
var
|
5109
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
5041
5110
|
function SelectAsync({
|
5042
5111
|
styles,
|
5043
5112
|
isError = false,
|
@@ -5045,7 +5114,7 @@ function SelectAsync({
|
|
5045
5114
|
}) {
|
5046
5115
|
const { colorMode } = (0, import_system7.useColorMode)();
|
5047
5116
|
const { components } = rest;
|
5048
|
-
return /* @__PURE__ */ (0,
|
5117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
5049
5118
|
import_react_select_async_paginate.AsyncPaginate,
|
5050
5119
|
{
|
5051
5120
|
classNamePrefix: "react-select",
|
@@ -5067,10 +5136,10 @@ var select_async_default = SelectAsync;
|
|
5067
5136
|
// src/components/select/components/select-async-creatable.tsx
|
5068
5137
|
var import_system8 = require("@chakra-ui/system");
|
5069
5138
|
var import_async_creatable = __toESM(require("react-select/async-creatable"));
|
5070
|
-
var
|
5139
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
5071
5140
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
5072
5141
|
const { colorMode } = (0, import_system8.useColorMode)();
|
5073
|
-
return /* @__PURE__ */ (0,
|
5142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5074
5143
|
import_async_creatable.default,
|
5075
5144
|
{
|
5076
5145
|
classNamePrefix: "react-select",
|
@@ -5090,10 +5159,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
5090
5159
|
// src/components/select/components/select-creatable.tsx
|
5091
5160
|
var import_system9 = require("@chakra-ui/system");
|
5092
5161
|
var import_creatable = __toESM(require("react-select/creatable"));
|
5093
|
-
var
|
5162
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5094
5163
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
5095
5164
|
const { colorMode } = (0, import_system9.useColorMode)();
|
5096
|
-
return /* @__PURE__ */ (0,
|
5165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5097
5166
|
import_creatable.default,
|
5098
5167
|
{
|
5099
5168
|
classNamePrefix: "react-select",
|
@@ -5111,10 +5180,10 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
5111
5180
|
}
|
5112
5181
|
|
5113
5182
|
// src/components/select/components/select-with-checkbox.tsx
|
5114
|
-
var
|
5183
|
+
var import_react81 = require("@chakra-ui/react");
|
5115
5184
|
var import_system10 = require("@chakra-ui/system");
|
5116
5185
|
var import_react_select2 = __toESM(require("react-select"));
|
5117
|
-
var
|
5186
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5118
5187
|
var CHECKBOX_STATE = {
|
5119
5188
|
UNCHECKED: 0,
|
5120
5189
|
INDETERMINATE: 1,
|
@@ -5161,8 +5230,8 @@ var InputOption = ({
|
|
5161
5230
|
onClick: isDisabled ? void 0 : innerProps.onClick,
|
5162
5231
|
style
|
5163
5232
|
};
|
5164
|
-
return /* @__PURE__ */ (0,
|
5165
|
-
/* @__PURE__ */ (0,
|
5233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
5234
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5166
5235
|
import_react_select2.components.Option,
|
5167
5236
|
{
|
5168
5237
|
isMulti: true,
|
@@ -5173,8 +5242,8 @@ var InputOption = ({
|
|
5173
5242
|
getStyles,
|
5174
5243
|
innerProps: props,
|
5175
5244
|
...rest,
|
5176
|
-
children: /* @__PURE__ */ (0,
|
5177
|
-
|
5245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5246
|
+
import_react81.Flex,
|
5178
5247
|
{
|
5179
5248
|
alignItems: "center",
|
5180
5249
|
width: "100%",
|
@@ -5182,8 +5251,8 @@ var InputOption = ({
|
|
5182
5251
|
"data-test-id": "CT_component_select-checkbox_options",
|
5183
5252
|
cursor: isDisabled ? "not-allowed" : "default",
|
5184
5253
|
children: [
|
5185
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5186
|
-
|
5254
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5255
|
+
import_react81.Checkbox,
|
5187
5256
|
{
|
5188
5257
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
5189
5258
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -5192,8 +5261,8 @@ var InputOption = ({
|
|
5192
5261
|
"data-test-id": "CT_component_select-checkbox_select-all-option",
|
5193
5262
|
isInvalid: false
|
5194
5263
|
}
|
5195
|
-
) : /* @__PURE__ */ (0,
|
5196
|
-
|
5264
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5265
|
+
import_react81.Checkbox,
|
5197
5266
|
{
|
5198
5267
|
pointerEvents: "none",
|
5199
5268
|
isChecked: isSelected,
|
@@ -5201,13 +5270,13 @@ var InputOption = ({
|
|
5201
5270
|
isInvalid: false
|
5202
5271
|
}
|
5203
5272
|
),
|
5204
|
-
/* @__PURE__ */ (0,
|
5273
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react81.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
5205
5274
|
]
|
5206
5275
|
}
|
5207
5276
|
)
|
5208
5277
|
}
|
5209
5278
|
),
|
5210
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0,
|
5279
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("hr", {}) : null
|
5211
5280
|
] });
|
5212
5281
|
};
|
5213
5282
|
var SelectWithCheckboxBase = ({
|
@@ -5220,7 +5289,7 @@ var SelectWithCheckboxBase = ({
|
|
5220
5289
|
...rest
|
5221
5290
|
}) => {
|
5222
5291
|
const { colorMode } = (0, import_system10.useColorMode)();
|
5223
|
-
return /* @__PURE__ */ (0,
|
5292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5224
5293
|
import_react_select2.default,
|
5225
5294
|
{
|
5226
5295
|
"data-test-id": "",
|
@@ -5239,8 +5308,9 @@ var SelectWithCheckboxBase = ({
|
|
5239
5308
|
);
|
5240
5309
|
};
|
5241
5310
|
var SelectCheckbox = (props) => {
|
5242
|
-
const { isMulti, options, value, components, ...rest } = props;
|
5311
|
+
const { isMulti, options, value, components, virtualized, ...rest } = props;
|
5243
5312
|
const selectValue = value || [];
|
5313
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5244
5314
|
const defaultComponents = {
|
5245
5315
|
DropdownIndicator,
|
5246
5316
|
ClearIndicator,
|
@@ -5252,10 +5322,10 @@ var SelectCheckbox = (props) => {
|
|
5252
5322
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
5253
5323
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
5254
5324
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
5255
|
-
return /* @__PURE__ */ (0,
|
5325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InputOption, { ...optionProps, checkedState });
|
5256
5326
|
}
|
5257
5327
|
};
|
5258
|
-
return /* @__PURE__ */ (0,
|
5328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5259
5329
|
SelectWithCheckboxBase,
|
5260
5330
|
{
|
5261
5331
|
"data-test-id": "",
|
@@ -5264,6 +5334,9 @@ var SelectCheckbox = (props) => {
|
|
5264
5334
|
value,
|
5265
5335
|
components: {
|
5266
5336
|
...defaultComponents,
|
5337
|
+
...virtualized ? {
|
5338
|
+
MenuList: renderMenuListVirtualized
|
5339
|
+
} : {},
|
5267
5340
|
...components
|
5268
5341
|
},
|
5269
5342
|
...rest
|
@@ -5273,13 +5346,13 @@ var SelectCheckbox = (props) => {
|
|
5273
5346
|
var select_with_checkbox_default = SelectCheckbox;
|
5274
5347
|
|
5275
5348
|
// src/components/sidebar/components/sidebar.tsx
|
5276
|
-
var
|
5349
|
+
var import_react82 = require("@chakra-ui/react");
|
5277
5350
|
var import_framer_motion = require("framer-motion");
|
5278
|
-
var
|
5351
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5279
5352
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5280
5353
|
const { width = "220px" } = props;
|
5281
|
-
return /* @__PURE__ */ (0,
|
5282
|
-
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5355
|
+
import_react82.Flex,
|
5283
5356
|
{
|
5284
5357
|
position: "relative",
|
5285
5358
|
as: import_framer_motion.motion.div,
|
@@ -5299,13 +5372,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5299
5372
|
Sidebar.displayName = "Sidebar";
|
5300
5373
|
|
5301
5374
|
// src/components/sidebar/components/sidebar-header.tsx
|
5302
|
-
var
|
5375
|
+
var import_react83 = require("@chakra-ui/react");
|
5303
5376
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5304
5377
|
var import_framer_motion2 = require("framer-motion");
|
5305
|
-
var
|
5378
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5306
5379
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5307
|
-
return /* @__PURE__ */ (0,
|
5308
|
-
|
5380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5381
|
+
import_react83.Box,
|
5309
5382
|
{
|
5310
5383
|
px: "2",
|
5311
5384
|
color: "neutral.900",
|
@@ -5314,8 +5387,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5314
5387
|
_hover: {
|
5315
5388
|
color: "primary.500"
|
5316
5389
|
},
|
5317
|
-
children: /* @__PURE__ */ (0,
|
5318
|
-
|
5390
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5391
|
+
import_react83.Flex,
|
5319
5392
|
{
|
5320
5393
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5321
5394
|
direction: "row",
|
@@ -5324,8 +5397,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5324
5397
|
onClick: () => setCollapse(!isCollapse),
|
5325
5398
|
cursor: "pointer",
|
5326
5399
|
children: [
|
5327
|
-
/* @__PURE__ */ (0,
|
5328
|
-
|
5400
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5401
|
+
import_react83.Box,
|
5329
5402
|
{
|
5330
5403
|
as: import_framer_motion2.motion.div,
|
5331
5404
|
boxSize: "4",
|
@@ -5333,11 +5406,11 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5333
5406
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
5334
5407
|
transitionTimingFunction: "linear",
|
5335
5408
|
"aria-label": "toggle sidebar",
|
5336
|
-
children: /* @__PURE__ */ (0,
|
5409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5337
5410
|
}
|
5338
5411
|
),
|
5339
|
-
/* @__PURE__ */ (0,
|
5340
|
-
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react83.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5413
|
+
import_react83.Text,
|
5341
5414
|
{
|
5342
5415
|
as: import_framer_motion2.motion.div,
|
5343
5416
|
w: "max-content",
|
@@ -5363,37 +5436,37 @@ SidebarHeader.defaultProps = {
|
|
5363
5436
|
};
|
5364
5437
|
|
5365
5438
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5366
|
-
var
|
5439
|
+
var import_react84 = require("@chakra-ui/react");
|
5367
5440
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5368
5441
|
var import_framer_motion3 = require("framer-motion");
|
5369
|
-
var
|
5442
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5370
5443
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5371
|
-
return /* @__PURE__ */ (0,
|
5372
|
-
|
5444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5445
|
+
import_react84.Box,
|
5373
5446
|
{
|
5374
5447
|
as: import_framer_motion3.motion.div,
|
5375
5448
|
transitionTimingFunction: "linear",
|
5376
5449
|
initial: { padding: "8px" },
|
5377
5450
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5378
|
-
children: /* @__PURE__ */ (0,
|
5451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5379
5452
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5380
|
-
return /* @__PURE__ */ (0,
|
5453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5381
5454
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5382
5455
|
const noChild = !item.children.length;
|
5383
5456
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5384
|
-
return /* @__PURE__ */ (0,
|
5385
|
-
/* @__PURE__ */ (0,
|
5457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
5458
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5386
5459
|
const activeOption = isOpen ? "primary.50" : "white";
|
5387
5460
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5388
5461
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5389
|
-
return /* @__PURE__ */ (0,
|
5390
|
-
/* @__PURE__ */ (0,
|
5391
|
-
|
5462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
5463
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5464
|
+
import_react84.AccordionButton,
|
5392
5465
|
{
|
5393
5466
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5394
5467
|
p: "0",
|
5395
5468
|
h: "fit-content",
|
5396
|
-
children: /* @__PURE__ */ (0,
|
5469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5397
5470
|
NavItem,
|
5398
5471
|
{
|
5399
5472
|
as: import_framer_motion3.motion.div,
|
@@ -5406,9 +5479,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5406
5479
|
position: "relative",
|
5407
5480
|
...itemStyles,
|
5408
5481
|
children: [
|
5409
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5410
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5411
|
-
|
5482
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5483
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5484
|
+
import_react84.Box,
|
5412
5485
|
{
|
5413
5486
|
display: "flex",
|
5414
5487
|
w: "full",
|
@@ -5422,16 +5495,16 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5422
5495
|
animate: { opacity: 1, x: 0 },
|
5423
5496
|
exit: { opacity: 0, x: 16 },
|
5424
5497
|
children: [
|
5425
|
-
/* @__PURE__ */ (0,
|
5426
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5427
|
-
|
5498
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5499
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5500
|
+
import_react84.Box,
|
5428
5501
|
{
|
5429
5502
|
display: "flex",
|
5430
5503
|
boxSize: "3",
|
5431
5504
|
as: import_framer_motion3.motion.div,
|
5432
5505
|
transitionTimingFunction: "linear",
|
5433
5506
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
5434
|
-
children: /* @__PURE__ */ (0,
|
5507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon8.ChevronDown, { size: 3 })
|
5435
5508
|
}
|
5436
5509
|
)
|
5437
5510
|
]
|
@@ -5444,12 +5517,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5444
5517
|
},
|
5445
5518
|
item.id
|
5446
5519
|
) }, item.id),
|
5447
|
-
isOpenOptions && /* @__PURE__ */ (0,
|
5448
|
-
/* @__PURE__ */ (0,
|
5520
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react84.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5521
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react84.Box, { display: "flex", alignItems: "center", children: [
|
5449
5522
|
mappingIcon2.get(item.icon || ""),
|
5450
|
-
/* @__PURE__ */ (0,
|
5523
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { as: "span", ml: "2", children: item.title })
|
5451
5524
|
] }) }),
|
5452
|
-
!!item.children.length && /* @__PURE__ */ (0,
|
5525
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5453
5526
|
NavItem,
|
5454
5527
|
{
|
5455
5528
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5465,7 +5538,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5465
5538
|
},
|
5466
5539
|
submenu.id
|
5467
5540
|
)) })
|
5468
|
-
] }) : isCollapse && /* @__PURE__ */ (0,
|
5541
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5469
5542
|
NavItem,
|
5470
5543
|
{
|
5471
5544
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5478,22 +5551,22 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5478
5551
|
rounded: "none",
|
5479
5552
|
...itemStyles,
|
5480
5553
|
children: [
|
5481
|
-
mappingIcon2 && /* @__PURE__ */ (0,
|
5482
|
-
/* @__PURE__ */ (0,
|
5554
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5483
5556
|
]
|
5484
5557
|
},
|
5485
5558
|
item.id
|
5486
5559
|
) }) }) })
|
5487
5560
|
] });
|
5488
5561
|
} }, item.id),
|
5489
|
-
!isCollapse && /* @__PURE__ */ (0,
|
5490
|
-
|
5562
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5563
|
+
import_react84.Fade,
|
5491
5564
|
{
|
5492
5565
|
in: true,
|
5493
5566
|
transition: {
|
5494
5567
|
enter: { duration: 0.5 }
|
5495
5568
|
},
|
5496
|
-
children: /* @__PURE__ */ (0,
|
5569
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5497
5570
|
NavItem,
|
5498
5571
|
{
|
5499
5572
|
mt: "1",
|
@@ -5521,16 +5594,16 @@ SidebarMenu.defaultProps = {
|
|
5521
5594
|
};
|
5522
5595
|
|
5523
5596
|
// src/components/switch/components/switch.tsx
|
5524
|
-
var
|
5597
|
+
var import_react85 = require("@chakra-ui/react");
|
5525
5598
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5526
5599
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5527
|
-
var
|
5528
|
-
var
|
5529
|
-
var Switch = (0,
|
5530
|
-
const styles = (0,
|
5531
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
5532
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
5533
|
-
const containerStyles = (0,
|
5600
|
+
var import_react86 = require("react");
|
5601
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
5602
|
+
var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
5603
|
+
const styles = (0, import_react85.useMultiStyleConfig)("Switch", props);
|
5604
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react85.omitThemingProps)(props);
|
5605
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react85.useCheckbox)(ownProps);
|
5606
|
+
const containerStyles = (0, import_react86.useMemo)(
|
5534
5607
|
() => ({
|
5535
5608
|
display: "inline-block",
|
5536
5609
|
position: "relative",
|
@@ -5540,7 +5613,7 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5540
5613
|
}),
|
5541
5614
|
[styles.container]
|
5542
5615
|
);
|
5543
|
-
const trackStyles = (0,
|
5616
|
+
const trackStyles = (0, import_react86.useMemo)(
|
5544
5617
|
() => ({
|
5545
5618
|
display: "inline-flex",
|
5546
5619
|
flexShrink: 0,
|
@@ -5552,7 +5625,7 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5552
5625
|
}),
|
5553
5626
|
[styles.track]
|
5554
5627
|
);
|
5555
|
-
const labelStyles = (0,
|
5628
|
+
const labelStyles = (0, import_react86.useMemo)(
|
5556
5629
|
() => ({
|
5557
5630
|
userSelect: "none",
|
5558
5631
|
marginStart: spacing2,
|
@@ -5568,8 +5641,8 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5568
5641
|
};
|
5569
5642
|
return iconSize[value];
|
5570
5643
|
};
|
5571
|
-
return /* @__PURE__ */ (0,
|
5572
|
-
|
5644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5645
|
+
import_react85.chakra.label,
|
5573
5646
|
{
|
5574
5647
|
...getRootProps(),
|
5575
5648
|
display: "flex",
|
@@ -5577,14 +5650,14 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5577
5650
|
className: (0, import_shared_utils10.cx)("chakra-switch", props.className),
|
5578
5651
|
__css: containerStyles,
|
5579
5652
|
children: [
|
5580
|
-
/* @__PURE__ */ (0,
|
5581
|
-
/* @__PURE__ */ (0,
|
5582
|
-
/* @__PURE__ */ (0,
|
5583
|
-
/* @__PURE__ */ (0,
|
5584
|
-
/* @__PURE__ */ (0,
|
5653
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5654
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react85.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5655
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react85.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5656
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5657
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5585
5658
|
] }),
|
5586
|
-
/* @__PURE__ */ (0,
|
5587
|
-
|
5659
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5660
|
+
import_react85.chakra.span,
|
5588
5661
|
{
|
5589
5662
|
__css: styles.thumb,
|
5590
5663
|
className: "chakra-switch__thumb",
|
@@ -5593,8 +5666,8 @@ var Switch = (0, import_react84.forwardRef)(function Switch2(props, ref) {
|
|
5593
5666
|
}
|
5594
5667
|
)
|
5595
5668
|
] }),
|
5596
|
-
children && /* @__PURE__ */ (0,
|
5597
|
-
|
5669
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5670
|
+
import_react85.chakra.span,
|
5598
5671
|
{
|
5599
5672
|
className: "chakra-switch__label",
|
5600
5673
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5614,18 +5687,18 @@ Switch.defaultProps = {
|
|
5614
5687
|
var switch_default = Switch;
|
5615
5688
|
|
5616
5689
|
// src/components/table/index.tsx
|
5617
|
-
var
|
5690
|
+
var import_react87 = require("@chakra-ui/react");
|
5618
5691
|
|
5619
5692
|
// src/components/tabs/components/tab.tsx
|
5620
|
-
var
|
5621
|
-
var
|
5622
|
-
var Tab = (0,
|
5693
|
+
var import_react88 = require("@chakra-ui/react");
|
5694
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5695
|
+
var Tab = (0, import_react88.forwardRef)((props, ref) => {
|
5623
5696
|
var _a, _b;
|
5624
|
-
const tabProps = (0,
|
5697
|
+
const tabProps = (0, import_react88.useTab)({ ...props, ref });
|
5625
5698
|
const isSelected = !!tabProps["aria-selected"];
|
5626
|
-
const styles = (0,
|
5627
|
-
return /* @__PURE__ */ (0,
|
5628
|
-
|
5699
|
+
const styles = (0, import_react88.useMultiStyleConfig)("Tabs", tabProps);
|
5700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5701
|
+
import_react88.Button,
|
5629
5702
|
{
|
5630
5703
|
"data-test-id": props["data-test-id"],
|
5631
5704
|
p: 4,
|
@@ -5650,7 +5723,7 @@ var Tab = (0, import_react87.forwardRef)((props, ref) => {
|
|
5650
5723
|
},
|
5651
5724
|
__css: styles.tab,
|
5652
5725
|
...tabProps,
|
5653
|
-
children: /* @__PURE__ */ (0,
|
5726
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react88.Flex, { alignItems: "center", children: [
|
5654
5727
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5655
5728
|
tabProps.children,
|
5656
5729
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5661,39 +5734,39 @@ var Tab = (0, import_react87.forwardRef)((props, ref) => {
|
|
5661
5734
|
var tab_default = Tab;
|
5662
5735
|
|
5663
5736
|
// src/components/tabs/index.ts
|
5664
|
-
var
|
5737
|
+
var import_react89 = require("@chakra-ui/react");
|
5665
5738
|
|
5666
5739
|
// src/components/text/index.ts
|
5667
|
-
var
|
5740
|
+
var import_react90 = require("@chakra-ui/react");
|
5668
5741
|
|
5669
5742
|
// src/components/time-input/components/index.tsx
|
5670
|
-
var
|
5743
|
+
var import_react92 = require("@chakra-ui/react");
|
5671
5744
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5672
|
-
var
|
5745
|
+
var import_react93 = require("react");
|
5673
5746
|
|
5674
5747
|
// src/components/time-input/components/integration.tsx
|
5675
5748
|
var import_timescape = require("@zamiru/timescape");
|
5676
5749
|
var import_timescape2 = require("@zamiru/timescape");
|
5677
|
-
var
|
5750
|
+
var import_react91 = require("react");
|
5678
5751
|
var useTimescape = (options = {}) => {
|
5679
5752
|
var _a;
|
5680
5753
|
const { date, onChangeDate, ...rest } = options;
|
5681
|
-
const [manager] = (0,
|
5682
|
-
const onChangeDateRef = (0,
|
5683
|
-
(0,
|
5754
|
+
const [manager] = (0, import_react91.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5755
|
+
const onChangeDateRef = (0, import_react91.useRef)(onChangeDate);
|
5756
|
+
(0, import_react91.useLayoutEffect)(() => {
|
5684
5757
|
onChangeDateRef.current = onChangeDate;
|
5685
5758
|
}, [onChangeDate]);
|
5686
|
-
const [optionsState, update] = (0,
|
5759
|
+
const [optionsState, update] = (0, import_react91.useState)(() => ({
|
5687
5760
|
date,
|
5688
5761
|
...rest
|
5689
5762
|
}));
|
5690
|
-
(0,
|
5763
|
+
(0, import_react91.useEffect)(() => {
|
5691
5764
|
manager.resync();
|
5692
5765
|
return () => {
|
5693
5766
|
manager.remove();
|
5694
5767
|
};
|
5695
5768
|
}, [manager]);
|
5696
|
-
(0,
|
5769
|
+
(0, import_react91.useEffect)(() => {
|
5697
5770
|
return manager.on("changeDate", (nextDate) => {
|
5698
5771
|
var _a2;
|
5699
5772
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5701,7 +5774,7 @@ var useTimescape = (options = {}) => {
|
|
5701
5774
|
});
|
5702
5775
|
}, [manager]);
|
5703
5776
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5704
|
-
(0,
|
5777
|
+
(0, import_react91.useEffect)(() => {
|
5705
5778
|
manager.date = timestamp;
|
5706
5779
|
manager.minDate = optionsState.minDate;
|
5707
5780
|
manager.maxDate = optionsState.maxDate;
|
@@ -5743,7 +5816,7 @@ var useTimescape = (options = {}) => {
|
|
5743
5816
|
};
|
5744
5817
|
|
5745
5818
|
// src/components/time-input/components/index.tsx
|
5746
|
-
var
|
5819
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5747
5820
|
var timeDigitFormat = (number) => {
|
5748
5821
|
if (number.toString().length === 1) {
|
5749
5822
|
return `0${number}`;
|
@@ -5767,9 +5840,9 @@ var timeFromString = (timeString) => {
|
|
5767
5840
|
const [hours, minutes, seconds] = timeString.split(":");
|
5768
5841
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5769
5842
|
};
|
5770
|
-
var InputTimeArea = (0,
|
5771
|
-
return /* @__PURE__ */ (0,
|
5772
|
-
|
5843
|
+
var InputTimeArea = (0, import_react92.forwardRef)((props, ref) => {
|
5844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5845
|
+
import_react92.Input,
|
5773
5846
|
{
|
5774
5847
|
_focusWithin: {
|
5775
5848
|
bg: "neutral.300"
|
@@ -5787,7 +5860,7 @@ var InputTimeArea = (0, import_react91.forwardRef)((props, ref) => {
|
|
5787
5860
|
}
|
5788
5861
|
);
|
5789
5862
|
});
|
5790
|
-
var TimeInput2 = (0,
|
5863
|
+
var TimeInput2 = (0, import_react92.forwardRef)(
|
5791
5864
|
({
|
5792
5865
|
name,
|
5793
5866
|
config: config2,
|
@@ -5814,7 +5887,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5814
5887
|
date,
|
5815
5888
|
...config2
|
5816
5889
|
});
|
5817
|
-
(0,
|
5890
|
+
(0, import_react93.useEffect)(() => {
|
5818
5891
|
var _a, _b, _c, _d, _e, _f;
|
5819
5892
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5820
5893
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5823,7 +5896,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5823
5896
|
onChangeTime(timeValue);
|
5824
5897
|
}
|
5825
5898
|
}, [options.date]);
|
5826
|
-
(0,
|
5899
|
+
(0, import_react93.useImperativeHandle)(ref, () => ({
|
5827
5900
|
focus() {
|
5828
5901
|
_manager.focusField("hours");
|
5829
5902
|
}
|
@@ -5844,7 +5917,7 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5844
5917
|
};
|
5845
5918
|
};
|
5846
5919
|
const { outlineColor, focusColor } = getProperties();
|
5847
|
-
return /* @__PURE__ */ (0,
|
5920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5848
5921
|
field_default,
|
5849
5922
|
{
|
5850
5923
|
isError,
|
@@ -5853,8 +5926,8 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5853
5926
|
errorMessage,
|
5854
5927
|
isDisabled,
|
5855
5928
|
isSuccess,
|
5856
|
-
children: /* @__PURE__ */ (0,
|
5857
|
-
|
5929
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5930
|
+
import_react92.Box,
|
5858
5931
|
{
|
5859
5932
|
transition: "all 0.15s",
|
5860
5933
|
boxShadow: "none",
|
@@ -5864,8 +5937,8 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5864
5937
|
_focusWithin: {
|
5865
5938
|
borderColor: focusColor
|
5866
5939
|
},
|
5867
|
-
children: /* @__PURE__ */ (0,
|
5868
|
-
|
5940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5941
|
+
import_react92.InputGroup,
|
5869
5942
|
{
|
5870
5943
|
borderRadius: "sm",
|
5871
5944
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5874,17 +5947,17 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5874
5947
|
gap: 3,
|
5875
5948
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5876
5949
|
children: [
|
5877
|
-
/* @__PURE__ */ (0,
|
5878
|
-
/* @__PURE__ */ (0,
|
5879
|
-
/* @__PURE__ */ (0,
|
5880
|
-
/* @__PURE__ */ (0,
|
5881
|
-
seconds && /* @__PURE__ */ (0,
|
5882
|
-
/* @__PURE__ */ (0,
|
5883
|
-
/* @__PURE__ */ (0,
|
5950
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5951
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5952
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
5953
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
5954
|
+
seconds && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5955
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
5956
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5884
5957
|
] }),
|
5885
|
-
options.hour12 && /* @__PURE__ */ (0,
|
5958
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Input, { p: 0, ...getInputProps("am/pm") })
|
5886
5959
|
] }),
|
5887
|
-
/* @__PURE__ */ (0,
|
5960
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5888
5961
|
addOnRight
|
5889
5962
|
]
|
5890
5963
|
}
|
@@ -5897,16 +5970,16 @@ var TimeInput2 = (0, import_react91.forwardRef)(
|
|
5897
5970
|
);
|
5898
5971
|
|
5899
5972
|
// src/components/toast/components/toast.tsx
|
5900
|
-
var
|
5973
|
+
var import_react95 = require("@chakra-ui/react");
|
5901
5974
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5902
5975
|
var import_react_toastify = require("react-toastify");
|
5903
5976
|
|
5904
5977
|
// src/components/toast/components/styles.tsx
|
5905
|
-
var
|
5906
|
-
var
|
5978
|
+
var import_react94 = require("@emotion/react");
|
5979
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
5907
5980
|
var Styles2 = () => {
|
5908
|
-
return /* @__PURE__ */ (0,
|
5909
|
-
|
5981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5982
|
+
import_react94.Global,
|
5910
5983
|
{
|
5911
5984
|
styles: `
|
5912
5985
|
:root {
|
@@ -5940,10 +6013,10 @@ var Styles2 = () => {
|
|
5940
6013
|
var styles_default2 = Styles2;
|
5941
6014
|
|
5942
6015
|
// src/components/toast/components/toast.tsx
|
5943
|
-
var
|
6016
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
5944
6017
|
var CustomCloseButton = (props) => {
|
5945
6018
|
const { closeToast } = props;
|
5946
|
-
return /* @__PURE__ */ (0,
|
6019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: () => closeToast(), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
|
5947
6020
|
};
|
5948
6021
|
var DEFAULT_OPTIONS = {
|
5949
6022
|
position: "top-right",
|
@@ -5966,7 +6039,7 @@ var renderIcon = (icon, type) => {
|
|
5966
6039
|
return icon;
|
5967
6040
|
};
|
5968
6041
|
var useToast = () => {
|
5969
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
6042
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react95.useToken)("colors", [
|
5970
6043
|
"primary.500",
|
5971
6044
|
"neutral.500",
|
5972
6045
|
"info.500",
|
@@ -5975,15 +6048,15 @@ var useToast = () => {
|
|
5975
6048
|
"success.500"
|
5976
6049
|
]);
|
5977
6050
|
const content = (icon, message, link) => {
|
5978
|
-
return /* @__PURE__ */ (0,
|
5979
|
-
/* @__PURE__ */ (0,
|
5980
|
-
/* @__PURE__ */ (0,
|
5981
|
-
/* @__PURE__ */ (0,
|
5982
|
-
icon && /* @__PURE__ */ (0,
|
5983
|
-
/* @__PURE__ */ (0,
|
6051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
6052
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(styles_default2, {}),
|
6053
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
|
6054
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react95.Flex, { alignItems: "center", children: [
|
6055
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
6056
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react95.chakra.span, { noOfLines: 2, children: message })
|
5984
6057
|
] }),
|
5985
|
-
link && /* @__PURE__ */ (0,
|
5986
|
-
|
6058
|
+
link && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
6059
|
+
import_react95.Link,
|
5987
6060
|
{
|
5988
6061
|
as: link.as,
|
5989
6062
|
href: link.url,
|
@@ -6063,9 +6136,9 @@ var useToast = () => {
|
|
6063
6136
|
var import_react_toastify2 = require("react-toastify");
|
6064
6137
|
|
6065
6138
|
// src/components/uploader/components/uploader.tsx
|
6066
|
-
var
|
6139
|
+
var import_react96 = require("@chakra-ui/react");
|
6067
6140
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
6068
|
-
var
|
6141
|
+
var import_react97 = require("react");
|
6069
6142
|
var import_react_dropzone = require("react-dropzone");
|
6070
6143
|
|
6071
6144
|
// src/components/uploader/constants.ts
|
@@ -6152,7 +6225,7 @@ var defaultOnHandleRejections = (fileRejection, config2, handleRejection) => {
|
|
6152
6225
|
};
|
6153
6226
|
|
6154
6227
|
// src/components/uploader/components/uploader.tsx
|
6155
|
-
var
|
6228
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
6156
6229
|
var Uploader = ({
|
6157
6230
|
onHandleUploadFile,
|
6158
6231
|
onHandleRejections,
|
@@ -6184,15 +6257,15 @@ var Uploader = ({
|
|
6184
6257
|
customErrorRejection,
|
6185
6258
|
...props
|
6186
6259
|
}) => {
|
6187
|
-
const [filePreview, setFilePreview] = (0,
|
6188
|
-
const [isError, setIsError] = (0,
|
6189
|
-
const [errorText, setErrorText] = (0,
|
6190
|
-
(0,
|
6260
|
+
const [filePreview, setFilePreview] = (0, import_react97.useState)();
|
6261
|
+
const [isError, setIsError] = (0, import_react97.useState)(propIsError);
|
6262
|
+
const [errorText, setErrorText] = (0, import_react97.useState)(propErrorText);
|
6263
|
+
(0, import_react97.useEffect)(() => {
|
6191
6264
|
setIsError(propIsError);
|
6192
6265
|
setErrorText(propErrorText);
|
6193
6266
|
}, [propIsError, propErrorText]);
|
6194
6267
|
const toast2 = useToast();
|
6195
|
-
const handleRejection = (0,
|
6268
|
+
const handleRejection = (0, import_react97.useCallback)(
|
6196
6269
|
(message, file, image, errorCode) => {
|
6197
6270
|
if (onHandleRejections) {
|
6198
6271
|
onHandleRejections(file, image, errorCode);
|
@@ -6215,7 +6288,7 @@ var Uploader = ({
|
|
6215
6288
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
6216
6289
|
[onHandleRejections, customErrorRejection]
|
6217
6290
|
);
|
6218
|
-
const onDropAccepted = (0,
|
6291
|
+
const onDropAccepted = (0, import_react97.useCallback)(
|
6219
6292
|
(files) => {
|
6220
6293
|
const file = files[0];
|
6221
6294
|
setIsError(false);
|
@@ -6250,10 +6323,10 @@ var Uploader = ({
|
|
6250
6323
|
},
|
6251
6324
|
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
|
6252
6325
|
);
|
6253
|
-
const onDropRejected = (0,
|
6326
|
+
const onDropRejected = (0, import_react97.useCallback)((fileRejections) => {
|
6254
6327
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
6255
6328
|
}, []);
|
6256
|
-
const validator = (0,
|
6329
|
+
const validator = (0, import_react97.useCallback)(
|
6257
6330
|
(file) => {
|
6258
6331
|
const result = [];
|
6259
6332
|
if (validatorExt) {
|
@@ -6285,27 +6358,27 @@ var Uploader = ({
|
|
6285
6358
|
});
|
6286
6359
|
const renderHelperText = () => {
|
6287
6360
|
if (Array.isArray(helperText)) {
|
6288
|
-
return /* @__PURE__ */ (0,
|
6289
|
-
|
6361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6362
|
+
import_react96.UnorderedList,
|
6290
6363
|
{
|
6291
6364
|
pl: 2,
|
6292
6365
|
fontSize: 12,
|
6293
6366
|
color: "black.medium",
|
6294
6367
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6295
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0,
|
6368
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.ListItem, { children: text2 }, text2))
|
6296
6369
|
}
|
6297
6370
|
);
|
6298
6371
|
}
|
6299
6372
|
return helperText;
|
6300
6373
|
};
|
6301
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0,
|
6374
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6302
6375
|
const handleRemove = (e) => {
|
6303
6376
|
e.stopPropagation();
|
6304
6377
|
setFilePreview(void 0);
|
6305
6378
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6306
6379
|
acceptedFiles.pop();
|
6307
6380
|
};
|
6308
|
-
(0,
|
6381
|
+
(0, import_react97.useEffect)(() => {
|
6309
6382
|
if (value) {
|
6310
6383
|
if (typeof value === "string") {
|
6311
6384
|
setFilePreview(value);
|
@@ -6329,16 +6402,16 @@ var Uploader = ({
|
|
6329
6402
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6330
6403
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6331
6404
|
const cursorType = filePreview ? "initial" : "pointer";
|
6332
|
-
return /* @__PURE__ */ (0,
|
6405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.FormControl, { isRequired, children: [
|
6333
6406
|
label && typeof label === "string" ? (
|
6334
6407
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6335
|
-
/* @__PURE__ */ (0,
|
6336
|
-
isRequired && /* @__PURE__ */ (0,
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, {}), fontSize: "text.sm", children: [
|
6409
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.RequiredIndicator, { mr: 1, ml: 0 }),
|
6337
6410
|
label
|
6338
6411
|
] })
|
6339
6412
|
) : label,
|
6340
|
-
/* @__PURE__ */ (0,
|
6341
|
-
|
6413
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
6414
|
+
import_react96.Flex,
|
6342
6415
|
{
|
6343
6416
|
minH: containerHeight,
|
6344
6417
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6355,8 +6428,8 @@ var Uploader = ({
|
|
6355
6428
|
...props,
|
6356
6429
|
...getRootProps(),
|
6357
6430
|
children: [
|
6358
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0,
|
6359
|
-
|
6431
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6432
|
+
import_react96.Button,
|
6360
6433
|
{
|
6361
6434
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6362
6435
|
"aria-label": "remove-image",
|
@@ -6370,32 +6443,32 @@ var Uploader = ({
|
|
6370
6443
|
border: "none",
|
6371
6444
|
zIndex: 1,
|
6372
6445
|
onClick: handleRemove,
|
6373
|
-
children: /* @__PURE__ */ (0,
|
6446
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6374
6447
|
}
|
6375
6448
|
) }),
|
6376
|
-
filePreview && /* @__PURE__ */ (0,
|
6377
|
-
|
6449
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6450
|
+
import_react96.Flex,
|
6378
6451
|
{
|
6379
6452
|
position: "relative",
|
6380
6453
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6381
6454
|
justify: "center",
|
6382
6455
|
align: "center",
|
6383
|
-
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0,
|
6384
|
-
|
6456
|
+
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6457
|
+
import_react96.Image,
|
6385
6458
|
{
|
6386
6459
|
h: size2 === "lg" ? "120" : "100",
|
6387
6460
|
src: filePreview,
|
6388
6461
|
alt: "uploader-preview",
|
6389
6462
|
objectFit: "contain"
|
6390
6463
|
}
|
6391
|
-
) : /* @__PURE__ */ (0,
|
6464
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { noOfLines: 3, mx: 2, textAlign: "center", children: filePreview })
|
6392
6465
|
}
|
6393
6466
|
) }),
|
6394
|
-
!filePreview && /* @__PURE__ */ (0,
|
6395
|
-
size2 === "sm" && /* @__PURE__ */ (0,
|
6396
|
-
/* @__PURE__ */ (0,
|
6397
|
-
!filePreview && /* @__PURE__ */ (0,
|
6398
|
-
|
6467
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6468
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6469
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react96.Box, { children: [
|
6470
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6471
|
+
import_react96.Heading,
|
6399
6472
|
{
|
6400
6473
|
fontWeight: "400",
|
6401
6474
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6404,21 +6477,21 @@ var Uploader = ({
|
|
6404
6477
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6405
6478
|
}
|
6406
6479
|
),
|
6407
|
-
size2 === "lg" && /* @__PURE__ */ (0,
|
6480
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6408
6481
|
] })
|
6409
6482
|
] }) })
|
6410
6483
|
]
|
6411
6484
|
}
|
6412
6485
|
),
|
6413
|
-
/* @__PURE__ */ (0,
|
6486
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6414
6487
|
"input",
|
6415
6488
|
{
|
6416
6489
|
...getInputProps(),
|
6417
6490
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6418
6491
|
}
|
6419
6492
|
),
|
6420
|
-
filePreview && !isSmall && /* @__PURE__ */ (0,
|
6421
|
-
|
6493
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react96.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
6494
|
+
import_react96.Button,
|
6422
6495
|
{
|
6423
6496
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6424
6497
|
type: "button",
|
@@ -6464,10 +6537,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6464
6537
|
};
|
6465
6538
|
|
6466
6539
|
// src/components/index.ts
|
6467
|
-
var
|
6540
|
+
var import_react98 = require("@chakra-ui/react");
|
6468
6541
|
|
6469
6542
|
// src/config/theme/themeConfiguration.ts
|
6470
|
-
var
|
6543
|
+
var import_react106 = require("@chakra-ui/react");
|
6471
6544
|
|
6472
6545
|
// src/config/theme/components/index.ts
|
6473
6546
|
var components_exports = {};
|
@@ -7024,8 +7097,8 @@ var card_default2 = CardStyle;
|
|
7024
7097
|
|
7025
7098
|
// src/config/theme/components/checkbox.ts
|
7026
7099
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
7027
|
-
var
|
7028
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
7100
|
+
var import_react99 = require("@chakra-ui/react");
|
7101
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react99.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
7029
7102
|
var baseStyle3 = definePartsStyle3({
|
7030
7103
|
control: {
|
7031
7104
|
borderRadius: "sm",
|
@@ -7126,8 +7199,8 @@ var checkbox_default2 = Checkbox3;
|
|
7126
7199
|
|
7127
7200
|
// src/config/theme/components/chips.ts
|
7128
7201
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
7129
|
-
var
|
7130
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
7202
|
+
var import_react100 = require("@chakra-ui/react");
|
7203
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react100.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
7131
7204
|
var baseStyle4 = definePartsStyle4({
|
7132
7205
|
container: {
|
7133
7206
|
px: 3,
|
@@ -7336,8 +7409,8 @@ var input_default = Input4;
|
|
7336
7409
|
|
7337
7410
|
// src/config/theme/components/loader.ts
|
7338
7411
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7339
|
-
var
|
7340
|
-
var rotate = (0,
|
7412
|
+
var import_react101 = require("@emotion/react");
|
7413
|
+
var rotate = (0, import_react101.keyframes)({
|
7341
7414
|
"0%": {
|
7342
7415
|
transform: "rotate(0deg)"
|
7343
7416
|
},
|
@@ -7519,8 +7592,8 @@ var modal_default = modalTheme;
|
|
7519
7592
|
|
7520
7593
|
// src/config/theme/components/popover.ts
|
7521
7594
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7522
|
-
var
|
7523
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
7595
|
+
var import_react102 = require("@chakra-ui/react");
|
7596
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react102.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
7524
7597
|
var baseStyle8 = definePartsStyle7({
|
7525
7598
|
content: {
|
7526
7599
|
bg: "white"
|
@@ -7531,8 +7604,8 @@ var popover_default = popoverTheme;
|
|
7531
7604
|
|
7532
7605
|
// src/config/theme/components/radio.ts
|
7533
7606
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7534
|
-
var
|
7535
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
7607
|
+
var import_react103 = require("@chakra-ui/react");
|
7608
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react103.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
7536
7609
|
var baseStyle9 = definePartsStyle8({
|
7537
7610
|
control: {
|
7538
7611
|
border: "1px solid",
|
@@ -7954,7 +8027,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7954
8027
|
var tabs_default = tabsTheme;
|
7955
8028
|
|
7956
8029
|
// src/config/theme/components/textarea.ts
|
7957
|
-
var
|
8030
|
+
var import_react104 = require("@chakra-ui/react");
|
7958
8031
|
var getProps = (props) => {
|
7959
8032
|
const { isError, isSuccess, isDisabled } = props;
|
7960
8033
|
let borderColor = "neutral.400";
|
@@ -7974,7 +8047,7 @@ var getProps = (props) => {
|
|
7974
8047
|
borderColor
|
7975
8048
|
};
|
7976
8049
|
};
|
7977
|
-
var outline3 = (0,
|
8050
|
+
var outline3 = (0, import_react104.defineStyle)((props) => {
|
7978
8051
|
const { focusBorderColor, borderColor } = getProps(props);
|
7979
8052
|
return {
|
7980
8053
|
background: "white.high",
|
@@ -8018,7 +8091,7 @@ var outline3 = (0, import_react103.defineStyle)((props) => {
|
|
8018
8091
|
}
|
8019
8092
|
};
|
8020
8093
|
});
|
8021
|
-
var Textarea = (0,
|
8094
|
+
var Textarea = (0, import_react104.defineStyleConfig)({
|
8022
8095
|
variants: { outline: outline3 },
|
8023
8096
|
defaultProps: {
|
8024
8097
|
variant: "outline"
|
@@ -8027,15 +8100,15 @@ var Textarea = (0, import_react103.defineStyleConfig)({
|
|
8027
8100
|
var textarea_default2 = Textarea;
|
8028
8101
|
|
8029
8102
|
// src/config/theme/components/tooltip.ts
|
8030
|
-
var
|
8031
|
-
var $arrowBg = (0,
|
8103
|
+
var import_react105 = require("@chakra-ui/react");
|
8104
|
+
var $arrowBg = (0, import_react105.cssVar)("popper-arrow-bg");
|
8032
8105
|
var baseStyle12 = {
|
8033
8106
|
bg: "neutral.700",
|
8034
8107
|
textStyle: "text.sm",
|
8035
8108
|
fontSize: "text.sm",
|
8036
8109
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
8037
8110
|
};
|
8038
|
-
var Tooltip2 = (0,
|
8111
|
+
var Tooltip2 = (0, import_react105.defineStyleConfig)({ baseStyle: baseStyle12 });
|
8039
8112
|
var tooltip_default = Tooltip2;
|
8040
8113
|
|
8041
8114
|
// src/config/theme/themeConfiguration.ts
|
@@ -8054,7 +8127,7 @@ var createExtendTheme = (theme5) => {
|
|
8054
8127
|
return function extendTheme2(...extensions) {
|
8055
8128
|
let overrides = [...extensions];
|
8056
8129
|
let activeTheme = extensions[extensions.length - 1];
|
8057
|
-
if ((0,
|
8130
|
+
if ((0, import_react106.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
8058
8131
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
8059
8132
|
overrides.length > 1) {
|
8060
8133
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -8063,13 +8136,13 @@ var createExtendTheme = (theme5) => {
|
|
8063
8136
|
}
|
8064
8137
|
return pipe(
|
8065
8138
|
...overrides.map(
|
8066
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
8139
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react106.mergeThemeOverride)(prevTheme, extension)
|
8067
8140
|
)
|
8068
8141
|
)(activeTheme);
|
8069
8142
|
};
|
8070
8143
|
};
|
8071
8144
|
var getTheme = (foundations) => {
|
8072
|
-
return (0,
|
8145
|
+
return (0, import_react106.extendTheme)({
|
8073
8146
|
...foundations,
|
8074
8147
|
components: {
|
8075
8148
|
...components_exports
|
@@ -8086,7 +8159,7 @@ var getTheme = (foundations) => {
|
|
8086
8159
|
config
|
8087
8160
|
});
|
8088
8161
|
};
|
8089
|
-
var theme4 = (0,
|
8162
|
+
var theme4 = (0, import_react106.extendTheme)({
|
8090
8163
|
components: {
|
8091
8164
|
...components_exports
|
8092
8165
|
},
|
@@ -8106,23 +8179,23 @@ var theme4 = (0, import_react105.extendTheme)({
|
|
8106
8179
|
|
8107
8180
|
// src/hooks/useFetcher.ts
|
8108
8181
|
var import_axios2 = __toESM(require("axios"));
|
8109
|
-
var
|
8182
|
+
var import_react109 = require("react");
|
8110
8183
|
|
8111
8184
|
// src/provider/components/provider.tsx
|
8112
8185
|
var import_axios = __toESM(require("axios"));
|
8113
|
-
var
|
8186
|
+
var import_react107 = require("react");
|
8114
8187
|
var import_react_toastify3 = require("react-toastify");
|
8115
|
-
var
|
8116
|
-
var ProviderContext = (0,
|
8188
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
8189
|
+
var ProviderContext = (0, import_react107.createContext)({
|
8117
8190
|
instance: void 0
|
8118
8191
|
});
|
8119
8192
|
var useInternalUI = () => {
|
8120
|
-
const { instance } = (0,
|
8193
|
+
const { instance } = (0, import_react107.useContext)(ProviderContext);
|
8121
8194
|
return { instance };
|
8122
8195
|
};
|
8123
8196
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
8124
|
-
const instanceRef = (0,
|
8125
|
-
(0,
|
8197
|
+
const instanceRef = (0, import_react107.useRef)(import_axios.default.create(config2));
|
8198
|
+
(0, import_react107.useEffect)(() => {
|
8126
8199
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
8127
8200
|
instanceRef.current.interceptors.request.use(interceptor);
|
8128
8201
|
});
|
@@ -8130,9 +8203,9 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
8130
8203
|
instanceRef.current.interceptors.response.use(interceptor);
|
8131
8204
|
});
|
8132
8205
|
}, [requestInterceptors, responseInterceptors]);
|
8133
|
-
const provider = (0,
|
8134
|
-
return /* @__PURE__ */ (0,
|
8135
|
-
/* @__PURE__ */ (0,
|
8206
|
+
const provider = (0, import_react107.useMemo)(() => ({ instance: instanceRef.current }), []);
|
8207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
8208
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_toastify3.ToastContainer, {}),
|
8136
8209
|
children
|
8137
8210
|
] });
|
8138
8211
|
};
|
@@ -8140,12 +8213,12 @@ Provider.displayName = "Provider";
|
|
8140
8213
|
var provider_default = Provider;
|
8141
8214
|
|
8142
8215
|
// src/provider/index.ts
|
8143
|
-
var
|
8216
|
+
var import_react108 = require("@chakra-ui/react");
|
8144
8217
|
|
8145
8218
|
// src/hooks/useFetcher.ts
|
8146
8219
|
function useFetcher() {
|
8147
8220
|
const { instance } = useInternalUI();
|
8148
|
-
const axiosInstance = (0,
|
8221
|
+
const axiosInstance = (0, import_react109.useMemo)(() => instance || import_axios2.default, [instance]);
|
8149
8222
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
8150
8223
|
const response = await axiosInstance.request({
|
8151
8224
|
data,
|
@@ -8165,10 +8238,10 @@ function useFetcher() {
|
|
8165
8238
|
}
|
8166
8239
|
|
8167
8240
|
// src/hooks/index.ts
|
8168
|
-
var
|
8241
|
+
var import_react110 = require("@chakra-ui/react");
|
8169
8242
|
|
8170
8243
|
// src/index.ts
|
8171
|
-
var
|
8244
|
+
var import_react111 = require("@chakra-ui/react");
|
8172
8245
|
// Annotate the CommonJS export names for ESM import in node:
|
8173
8246
|
0 && (module.exports = {
|
8174
8247
|
Accordion,
|