@ctlyst.id/internal-ui 4.3.2 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +704 -615
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +136 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -45,36 +45,36 @@ __export(src_exports, {
|
|
45
45
|
AlertAction: () => AlertAction,
|
46
46
|
AlertClose: () => AlertClose,
|
47
47
|
AlertDescription: () => AlertDescription,
|
48
|
-
AlertDialog: () =>
|
49
|
-
AlertDialogBody: () =>
|
50
|
-
AlertDialogCloseButton: () =>
|
51
|
-
AlertDialogContent: () =>
|
52
|
-
AlertDialogFooter: () =>
|
53
|
-
AlertDialogHeader: () =>
|
54
|
-
AlertDialogOverlay: () =>
|
55
|
-
AlertDialogProps: () =>
|
48
|
+
AlertDialog: () => import_react55.AlertDialog,
|
49
|
+
AlertDialogBody: () => import_react55.ModalBody,
|
50
|
+
AlertDialogCloseButton: () => import_react55.ModalCloseButton,
|
51
|
+
AlertDialogContent: () => import_react55.AlertDialogContent,
|
52
|
+
AlertDialogFooter: () => import_react55.ModalFooter,
|
53
|
+
AlertDialogHeader: () => import_react55.ModalHeader,
|
54
|
+
AlertDialogOverlay: () => import_react55.ModalOverlay,
|
55
|
+
AlertDialogProps: () => import_react55.AlertDialogProps,
|
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_react92.Avatar,
|
60
|
+
AvatarBadge: () => import_react92.AvatarBadge,
|
61
|
+
AvatarBadgeProps: () => import_react92.AvatarBadgeProps,
|
62
|
+
AvatarGroup: () => import_react92.AvatarGroup,
|
63
|
+
AvatarGroupProps: () => import_react92.AvatarGroupProps,
|
64
|
+
AvatarProps: () => import_react92.AvatarProps,
|
65
65
|
Badge: () => badge_default,
|
66
|
-
Box: () =>
|
67
|
-
BoxProps: () =>
|
66
|
+
Box: () => import_react52.Box,
|
67
|
+
BoxProps: () => import_react52.BoxProps,
|
68
68
|
BreadCrumb: () => bread_crumb_default,
|
69
69
|
Button: () => button_default,
|
70
70
|
ButtonGroup: () => import_react10.ButtonGroup,
|
71
71
|
ButtonGroupProps: () => import_react10.ButtonGroupProps,
|
72
72
|
CHECKBOX_STATE: () => CHECKBOX_STATE,
|
73
73
|
Card: () => card_default,
|
74
|
-
Center: () =>
|
75
|
-
ChakraProvider: () =>
|
76
|
-
ChakraProviderProps: () =>
|
77
|
-
ChakraTable: () =>
|
74
|
+
Center: () => import_react52.Center,
|
75
|
+
ChakraProvider: () => import_react102.ChakraProvider,
|
76
|
+
ChakraProviderProps: () => import_react102.ChakraProviderProps,
|
77
|
+
ChakraTable: () => import_react81.Table,
|
78
78
|
Checkbox: () => checkbox_default,
|
79
79
|
CheckboxGroup: () => checkbox_group_default,
|
80
80
|
CheckboxGroupContext: () => import_react16.CheckboxGroupContext,
|
@@ -86,63 +86,63 @@ __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: () =>
|
96
|
-
Container: () =>
|
97
|
-
ContainerProps: () =>
|
89
|
+
Code: () => import_react84.Code,
|
90
|
+
CodeProps: () => import_react84.CodeProps,
|
91
|
+
Collapse: () => import_react92.Collapse,
|
92
|
+
CollapseProps: () => import_react92.CollapseProps,
|
93
|
+
ColorMode: () => import_react102.ColorMode,
|
94
|
+
ColorModeScript: () => import_react102.ColorModeScript,
|
95
|
+
ColorModeScriptProps: () => import_react102.ColorModeScriptProps,
|
96
|
+
Container: () => import_react52.Container,
|
97
|
+
ContainerProps: () => import_react52.ContainerProps,
|
98
98
|
Counter: () => counter_default,
|
99
99
|
DataTable: () => data_table_default,
|
100
100
|
DatePickerMonth: () => datepicker_month_default,
|
101
101
|
Datepicker: () => datepicker_default,
|
102
102
|
Dialog: () => dialog_default,
|
103
|
-
Divider: () =>
|
104
|
-
DividerProps: () =>
|
105
|
-
Drawer: () =>
|
106
|
-
DrawerBody: () =>
|
107
|
-
DrawerCloseButton: () =>
|
108
|
-
DrawerContent: () =>
|
109
|
-
DrawerContentProps: () =>
|
110
|
-
DrawerFooter: () =>
|
111
|
-
DrawerHeader: () =>
|
112
|
-
DrawerOverlay: () =>
|
113
|
-
DrawerProps: () =>
|
103
|
+
Divider: () => import_react52.Divider,
|
104
|
+
DividerProps: () => import_react52.DividerProps,
|
105
|
+
Drawer: () => import_react55.Drawer,
|
106
|
+
DrawerBody: () => import_react55.ModalBody,
|
107
|
+
DrawerCloseButton: () => import_react55.ModalCloseButton,
|
108
|
+
DrawerContent: () => import_react55.DrawerContent,
|
109
|
+
DrawerContentProps: () => import_react55.DrawerContentProps,
|
110
|
+
DrawerFooter: () => import_react55.ModalFooter,
|
111
|
+
DrawerHeader: () => import_react55.ModalHeader,
|
112
|
+
DrawerOverlay: () => import_react55.ModalOverlay,
|
113
|
+
DrawerProps: () => import_react55.DrawerProps,
|
114
114
|
DropdownIndicator: () => DropdownIndicator,
|
115
115
|
EmptyState: () => empty_state_default,
|
116
116
|
ErrorCode: () => error_code_default,
|
117
|
-
Fade: () =>
|
118
|
-
FadeProps: () =>
|
117
|
+
Fade: () => import_react92.Fade,
|
118
|
+
FadeProps: () => import_react92.FadeProps,
|
119
119
|
Field: () => field_default,
|
120
|
-
Flex: () =>
|
121
|
-
FlexProps: () =>
|
120
|
+
Flex: () => import_react52.Flex,
|
121
|
+
FlexProps: () => import_react52.FlexProps,
|
122
122
|
FormControl: () => import_react25.FormControl,
|
123
123
|
FormControlProps: () => import_react25.FormControlProps,
|
124
124
|
FormErrorMessage: () => import_react25.FormErrorMessage,
|
125
125
|
FormHelperText: () => import_react25.FormHelperText,
|
126
126
|
FormLabel: () => import_react25.FormLabel,
|
127
127
|
FormLabelProps: () => import_react25.FormLabelProps,
|
128
|
-
Grid: () =>
|
129
|
-
GridItem: () =>
|
130
|
-
GridItemProps: () =>
|
131
|
-
GridProps: () =>
|
132
|
-
HStack: () =>
|
128
|
+
Grid: () => import_react52.Grid,
|
129
|
+
GridItem: () => import_react52.GridItem,
|
130
|
+
GridItemProps: () => import_react52.GridItemProps,
|
131
|
+
GridProps: () => import_react52.GridProps,
|
132
|
+
HStack: () => import_react52.HStack,
|
133
133
|
Header: () => Header,
|
134
|
-
Heading: () =>
|
135
|
-
HeadingProps: () =>
|
136
|
-
Hide: () =>
|
137
|
-
HideProps: () =>
|
138
|
-
Icon: () =>
|
134
|
+
Heading: () => import_react84.Heading,
|
135
|
+
HeadingProps: () => import_react84.HeadingProps,
|
136
|
+
Hide: () => import_react92.Hide,
|
137
|
+
HideProps: () => import_react92.HideProps,
|
138
|
+
Icon: () => import_react51.Icon,
|
139
139
|
IconButton: () => import_react10.IconButton,
|
140
140
|
IconButtonProps: () => import_react10.IconButtonProps,
|
141
|
-
IconProps: () =>
|
142
|
-
Image: () =>
|
143
|
-
ImageProps: () =>
|
144
|
-
Img: () =>
|
145
|
-
ImgProps: () =>
|
141
|
+
IconProps: () => import_react51.IconProps,
|
142
|
+
Image: () => import_react51.Image,
|
143
|
+
ImageProps: () => import_react51.ImageProps,
|
144
|
+
Img: () => import_react92.Img,
|
145
|
+
ImgProps: () => import_react92.ImgProps,
|
146
146
|
InputAddonLeft: () => InputAddonLeft,
|
147
147
|
InputAddonRight: () => InputAddonRight,
|
148
148
|
InputElementLeft: () => import_react19.InputLeftElement,
|
@@ -159,32 +159,32 @@ __export(src_exports, {
|
|
159
159
|
InputRightAddonProps: () => import_react25.InputRightAddonProps,
|
160
160
|
InputRightElement: () => import_react25.InputRightElement,
|
161
161
|
InputRightElementProps: () => import_react25.InputRightElementProps,
|
162
|
-
Link: () =>
|
163
|
-
LinkProps: () =>
|
164
|
-
List: () =>
|
165
|
-
ListIcon: () =>
|
166
|
-
ListItem: () =>
|
167
|
-
ListItemProps: () =>
|
168
|
-
ListProps: () =>
|
162
|
+
Link: () => import_react84.Link,
|
163
|
+
LinkProps: () => import_react84.LinkProps,
|
164
|
+
List: () => import_react53.List,
|
165
|
+
ListIcon: () => import_react53.ListIcon,
|
166
|
+
ListItem: () => import_react53.ListItem,
|
167
|
+
ListItemProps: () => import_react53.ListItemProps,
|
168
|
+
ListProps: () => import_react53.ListProps,
|
169
169
|
Loader: () => loader_default,
|
170
170
|
Logo: () => Logo,
|
171
171
|
MainMenu: () => navigation_default,
|
172
|
-
Modal: () =>
|
172
|
+
Modal: () => import_react55.Modal,
|
173
173
|
ModalBackButton: () => modal_back_button_default,
|
174
|
-
ModalBody: () =>
|
175
|
-
ModalBodyProps: () =>
|
176
|
-
ModalCloseButton: () =>
|
177
|
-
ModalContent: () =>
|
178
|
-
ModalContentProps: () =>
|
179
|
-
ModalContextProvider: () =>
|
180
|
-
ModalFocusScope: () =>
|
181
|
-
ModalFooter: () =>
|
182
|
-
ModalFooterProps: () =>
|
183
|
-
ModalHeader: () =>
|
184
|
-
ModalHeaderProps: () =>
|
185
|
-
ModalOverlay: () =>
|
186
|
-
ModalOverlayProps: () =>
|
187
|
-
ModalProps: () =>
|
174
|
+
ModalBody: () => import_react55.ModalBody,
|
175
|
+
ModalBodyProps: () => import_react55.ModalBodyProps,
|
176
|
+
ModalCloseButton: () => import_react55.ModalCloseButton,
|
177
|
+
ModalContent: () => import_react55.ModalContent,
|
178
|
+
ModalContentProps: () => import_react55.ModalContentProps,
|
179
|
+
ModalContextProvider: () => import_react55.ModalContextProvider,
|
180
|
+
ModalFocusScope: () => import_react55.ModalFocusScope,
|
181
|
+
ModalFooter: () => import_react55.ModalFooter,
|
182
|
+
ModalFooterProps: () => import_react55.ModalFooterProps,
|
183
|
+
ModalHeader: () => import_react55.ModalHeader,
|
184
|
+
ModalHeaderProps: () => import_react55.ModalHeaderProps,
|
185
|
+
ModalOverlay: () => import_react55.ModalOverlay,
|
186
|
+
ModalOverlayProps: () => import_react55.ModalOverlayProps,
|
187
|
+
ModalProps: () => import_react55.ModalProps,
|
188
188
|
MultiDatePickerMonth: () => multi_datepicker_month_default,
|
189
189
|
MultiValue: () => MultiValue,
|
190
190
|
MultiValueRemove: () => MultiValueRemove,
|
@@ -192,155 +192,155 @@ __export(src_exports, {
|
|
192
192
|
Navbar: () => Navbar,
|
193
193
|
NavigationBar: () => navigation_bar_default,
|
194
194
|
NoOptionsMessage: () => NoOptionsMessage,
|
195
|
-
OrderedList: () =>
|
195
|
+
OrderedList: () => import_react53.OrderedList,
|
196
196
|
Pagination: () => pagination_default,
|
197
197
|
PaginationDetail: () => pagination_detail_default,
|
198
198
|
PaginationFilter: () => pagination_filter_default,
|
199
|
-
PinInput: () =>
|
200
|
-
PinInputContext: () =>
|
201
|
-
PinInputDescendantsProvider: () =>
|
202
|
-
PinInputField: () =>
|
203
|
-
PinInputFieldProps: () =>
|
204
|
-
PinInputProps: () =>
|
205
|
-
PinInputProvider: () =>
|
206
|
-
Popover: () =>
|
207
|
-
PopoverAnchor: () =>
|
208
|
-
PopoverArrow: () =>
|
209
|
-
PopoverArrowProps: () =>
|
210
|
-
PopoverBody: () =>
|
211
|
-
PopoverBodyProps: () =>
|
212
|
-
PopoverCloseButton: () =>
|
213
|
-
PopoverContent: () =>
|
214
|
-
PopoverContentProps: () =>
|
215
|
-
PopoverFooter: () =>
|
216
|
-
PopoverFooterProps: () =>
|
217
|
-
PopoverHeader: () =>
|
218
|
-
PopoverHeaderProps: () =>
|
219
|
-
PopoverProps: () =>
|
220
|
-
PopoverTrigger: () =>
|
221
|
-
Portal: () =>
|
222
|
-
PortalProps: () =>
|
199
|
+
PinInput: () => import_react64.PinInput,
|
200
|
+
PinInputContext: () => import_react64.PinInputContext,
|
201
|
+
PinInputDescendantsProvider: () => import_react64.PinInputDescendantsProvider,
|
202
|
+
PinInputField: () => import_react64.PinInputField,
|
203
|
+
PinInputFieldProps: () => import_react64.PinInputFieldProps,
|
204
|
+
PinInputProps: () => import_react64.PinInputProps,
|
205
|
+
PinInputProvider: () => import_react64.PinInputProvider,
|
206
|
+
Popover: () => import_react65.Popover,
|
207
|
+
PopoverAnchor: () => import_react65.PopoverAnchor,
|
208
|
+
PopoverArrow: () => import_react65.PopoverArrow,
|
209
|
+
PopoverArrowProps: () => import_react65.PopoverArrowProps,
|
210
|
+
PopoverBody: () => import_react65.PopoverBody,
|
211
|
+
PopoverBodyProps: () => import_react65.PopoverBodyProps,
|
212
|
+
PopoverCloseButton: () => import_react65.PopoverCloseButton,
|
213
|
+
PopoverContent: () => import_react65.PopoverContent,
|
214
|
+
PopoverContentProps: () => import_react65.PopoverContentProps,
|
215
|
+
PopoverFooter: () => import_react65.PopoverFooter,
|
216
|
+
PopoverFooterProps: () => import_react65.PopoverFooterProps,
|
217
|
+
PopoverHeader: () => import_react65.PopoverHeader,
|
218
|
+
PopoverHeaderProps: () => import_react65.PopoverHeaderProps,
|
219
|
+
PopoverProps: () => import_react65.PopoverProps,
|
220
|
+
PopoverTrigger: () => import_react65.PopoverTrigger,
|
221
|
+
Portal: () => import_react65.Portal,
|
222
|
+
PortalProps: () => import_react65.PortalProps,
|
223
223
|
Profile: () => Profile,
|
224
|
-
Progress: () =>
|
225
|
-
ProgressFilledTrackProps: () =>
|
226
|
-
ProgressLabel: () =>
|
227
|
-
ProgressLabelProps: () =>
|
228
|
-
ProgressProps: () =>
|
229
|
-
ProgressTrackProps: () =>
|
224
|
+
Progress: () => import_react66.Progress,
|
225
|
+
ProgressFilledTrackProps: () => import_react66.ProgressFilledTrackProps,
|
226
|
+
ProgressLabel: () => import_react66.ProgressLabel,
|
227
|
+
ProgressLabelProps: () => import_react66.ProgressLabelProps,
|
228
|
+
ProgressProps: () => import_react66.ProgressProps,
|
229
|
+
ProgressTrackProps: () => import_react66.ProgressTrackProps,
|
230
230
|
Provider: () => provider_default,
|
231
231
|
ProviderContext: () => ProviderContext,
|
232
232
|
Radio: () => Radio,
|
233
233
|
RadioGroup: () => RadioGroup,
|
234
|
-
RadioGroupContext: () =>
|
234
|
+
RadioGroupContext: () => import_react69.RadioGroupContext,
|
235
235
|
Rating: () => rating_default,
|
236
236
|
RequiredIndicator: () => import_react25.RequiredIndicator,
|
237
237
|
RequiredIndicatorProps: () => import_react25.RequiredIndicatorProps,
|
238
|
-
ScaleFade: () =>
|
239
|
-
ScaleFadeProps: () =>
|
238
|
+
ScaleFade: () => import_react92.ScaleFade,
|
239
|
+
ScaleFadeProps: () => import_react92.ScaleFadeProps,
|
240
240
|
Select: () => select_default,
|
241
241
|
SelectAsync: () => select_async_default,
|
242
242
|
SelectAsyncCreatable: () => SelectAsyncCreatable,
|
243
243
|
SelectCheckBox: () => select_with_checkbox_default,
|
244
244
|
SelectCreatable: () => SelectCreatable,
|
245
|
-
Show: () =>
|
246
|
-
ShowProps: () =>
|
245
|
+
Show: () => import_react92.Show,
|
246
|
+
ShowProps: () => import_react92.ShowProps,
|
247
247
|
Sidebar: () => Sidebar,
|
248
248
|
SidebarHeader: () => SidebarHeader,
|
249
249
|
SidebarMenu: () => SidebarMenu,
|
250
|
-
SimpleGrid: () =>
|
250
|
+
SimpleGrid: () => import_react52.SimpleGrid,
|
251
251
|
Skeleton: () => import_react5.Skeleton,
|
252
|
-
Slide: () =>
|
253
|
-
SlideFade: () =>
|
254
|
-
SlideFadeProps: () =>
|
255
|
-
SlideProps: () =>
|
256
|
-
Spacer: () =>
|
257
|
-
Stack: () =>
|
258
|
-
StackProps: () =>
|
259
|
-
Step: () =>
|
260
|
-
StepDescription: () =>
|
261
|
-
StepIcon: () =>
|
262
|
-
StepIndicator: () =>
|
263
|
-
StepNumber: () =>
|
264
|
-
StepSeparator: () =>
|
265
|
-
StepStatus: () =>
|
266
|
-
StepTitle: () =>
|
267
|
-
Stepper: () =>
|
252
|
+
Slide: () => import_react92.Slide,
|
253
|
+
SlideFade: () => import_react92.SlideFade,
|
254
|
+
SlideFadeProps: () => import_react92.SlideFadeProps,
|
255
|
+
SlideProps: () => import_react92.SlideProps,
|
256
|
+
Spacer: () => import_react52.Spacer,
|
257
|
+
Stack: () => import_react52.Stack,
|
258
|
+
StackProps: () => import_react52.StackProps,
|
259
|
+
Step: () => import_react92.Step,
|
260
|
+
StepDescription: () => import_react92.StepDescription,
|
261
|
+
StepIcon: () => import_react92.StepIcon,
|
262
|
+
StepIndicator: () => import_react92.StepIndicator,
|
263
|
+
StepNumber: () => import_react92.StepNumber,
|
264
|
+
StepSeparator: () => import_react92.StepSeparator,
|
265
|
+
StepStatus: () => import_react92.StepStatus,
|
266
|
+
StepTitle: () => import_react92.StepTitle,
|
267
|
+
Stepper: () => import_react92.Stepper,
|
268
268
|
Switch: () => switch_default,
|
269
269
|
Tab: () => tab_default,
|
270
|
-
TabIndicator: () =>
|
271
|
-
TabIndicatorProps: () =>
|
272
|
-
TabList: () =>
|
273
|
-
TabListProps: () =>
|
274
|
-
TabPanel: () =>
|
275
|
-
TabPanelProps: () =>
|
276
|
-
TabPanels: () =>
|
277
|
-
TabPanelsProps: () =>
|
278
|
-
TabProps: () =>
|
279
|
-
TableBodyProps: () =>
|
280
|
-
TableCellProps: () =>
|
281
|
-
TableColumnHeaderProps: () =>
|
282
|
-
TableHeadProps: () =>
|
283
|
-
TableProps: () =>
|
284
|
-
TableRowProps: () =>
|
285
|
-
Tabs: () =>
|
286
|
-
TabsDescendantsProvider: () =>
|
287
|
-
TabsProps: () =>
|
288
|
-
TabsProvider: () =>
|
289
|
-
Tbody: () =>
|
290
|
-
Td: () =>
|
291
|
-
Text: () =>
|
292
|
-
TextProps: () =>
|
270
|
+
TabIndicator: () => import_react83.TabIndicator,
|
271
|
+
TabIndicatorProps: () => import_react83.TabIndicatorProps,
|
272
|
+
TabList: () => import_react83.TabList,
|
273
|
+
TabListProps: () => import_react83.TabListProps,
|
274
|
+
TabPanel: () => import_react83.TabPanel,
|
275
|
+
TabPanelProps: () => import_react83.TabPanelProps,
|
276
|
+
TabPanels: () => import_react83.TabPanels,
|
277
|
+
TabPanelsProps: () => import_react83.TabPanelsProps,
|
278
|
+
TabProps: () => import_react83.TabProps,
|
279
|
+
TableBodyProps: () => import_react81.TableBodyProps,
|
280
|
+
TableCellProps: () => import_react81.TableCellProps,
|
281
|
+
TableColumnHeaderProps: () => import_react81.TableColumnHeaderProps,
|
282
|
+
TableHeadProps: () => import_react81.TableHeadProps,
|
283
|
+
TableProps: () => import_react81.TableProps,
|
284
|
+
TableRowProps: () => import_react81.TableRowProps,
|
285
|
+
Tabs: () => import_react83.Tabs,
|
286
|
+
TabsDescendantsProvider: () => import_react83.TabsDescendantsProvider,
|
287
|
+
TabsProps: () => import_react83.TabsProps,
|
288
|
+
TabsProvider: () => import_react83.TabsProvider,
|
289
|
+
Tbody: () => import_react81.Tbody,
|
290
|
+
Td: () => import_react81.Td,
|
291
|
+
Text: () => import_react84.Text,
|
292
|
+
TextProps: () => import_react84.TextProps,
|
293
293
|
TextareaField: () => textarea_default,
|
294
|
-
Th: () =>
|
295
|
-
Thead: () =>
|
294
|
+
Th: () => import_react81.Th,
|
295
|
+
Thead: () => import_react81.Thead,
|
296
296
|
ThemeTypings: () => import_styled_system12.ThemeTypings,
|
297
297
|
Time: () => Time,
|
298
298
|
TimeInput: () => TimeInput2,
|
299
299
|
ToastContainer: () => import_react_toastify2.ToastContainer,
|
300
300
|
Tooltip: () => Tooltip,
|
301
|
-
Tr: () =>
|
302
|
-
UnorderedList: () =>
|
301
|
+
Tr: () => import_react81.Tr,
|
302
|
+
UnorderedList: () => import_react53.UnorderedList,
|
303
303
|
Uploader: () => uploader_default,
|
304
|
-
UseBreakpointOptions: () =>
|
304
|
+
UseBreakpointOptions: () => import_react92.UseBreakpointOptions,
|
305
305
|
UseCheckboxGroupProps: () => import_react16.UseCheckboxGroupProps,
|
306
306
|
UseCheckboxGroupReturn: () => import_react16.UseCheckboxGroupReturn,
|
307
307
|
UseCheckboxProps: () => import_react16.UseCheckboxProps,
|
308
308
|
UseCheckboxReturn: () => import_react16.UseCheckboxReturn,
|
309
|
-
UseDisclosureProps: () =>
|
310
|
-
UseImageProps: () =>
|
311
|
-
UseImageReturn: () =>
|
312
|
-
UseMediaQueryOptions: () =>
|
313
|
-
UseModalProps: () =>
|
314
|
-
UseModalReturn: () =>
|
315
|
-
UsePinInputFieldProps: () =>
|
316
|
-
UsePinInputProps: () =>
|
317
|
-
UsePinInputReturn: () =>
|
318
|
-
UseQueryProps: () =>
|
319
|
-
UseRadioGroupReturn: () =>
|
320
|
-
UseRadioProps: () =>
|
321
|
-
UseRadioReturn: () =>
|
322
|
-
UseTabListProps: () =>
|
323
|
-
UseTabListReturn: () =>
|
324
|
-
UseTabOptions: () =>
|
325
|
-
UseTabPanelsProps: () =>
|
326
|
-
UseTabProps: () =>
|
327
|
-
UseTabsProps: () =>
|
328
|
-
UseTabsReturn: () =>
|
329
|
-
VStack: () =>
|
309
|
+
UseDisclosureProps: () => import_react104.UseDisclosureProps,
|
310
|
+
UseImageProps: () => import_react92.UseImageProps,
|
311
|
+
UseImageReturn: () => import_react92.UseImageReturn,
|
312
|
+
UseMediaQueryOptions: () => import_react92.UseMediaQueryOptions,
|
313
|
+
UseModalProps: () => import_react55.UseModalProps,
|
314
|
+
UseModalReturn: () => import_react55.UseModalReturn,
|
315
|
+
UsePinInputFieldProps: () => import_react64.UsePinInputFieldProps,
|
316
|
+
UsePinInputProps: () => import_react64.UsePinInputProps,
|
317
|
+
UsePinInputReturn: () => import_react64.UsePinInputReturn,
|
318
|
+
UseQueryProps: () => import_react92.UseQueryProps,
|
319
|
+
UseRadioGroupReturn: () => import_react69.UseRadioGroupReturn,
|
320
|
+
UseRadioProps: () => import_react69.UseRadioProps,
|
321
|
+
UseRadioReturn: () => import_react69.UseRadioReturn,
|
322
|
+
UseTabListProps: () => import_react83.UseTabListProps,
|
323
|
+
UseTabListReturn: () => import_react83.UseTabListReturn,
|
324
|
+
UseTabOptions: () => import_react83.UseTabOptions,
|
325
|
+
UseTabPanelsProps: () => import_react83.UseTabPanelsProps,
|
326
|
+
UseTabProps: () => import_react83.UseTabProps,
|
327
|
+
UseTabsProps: () => import_react83.UseTabsProps,
|
328
|
+
UseTabsReturn: () => import_react83.UseTabsReturn,
|
329
|
+
VStack: () => import_react52.VStack,
|
330
330
|
Version: () => Version,
|
331
|
-
VisuallyHidden: () =>
|
332
|
-
VisuallyHiddenInput: () =>
|
331
|
+
VisuallyHidden: () => import_react92.VisuallyHidden,
|
332
|
+
VisuallyHiddenInput: () => import_react92.VisuallyHiddenInput,
|
333
333
|
VoilaLogo: () => VoilaLogo,
|
334
|
-
Wrap: () =>
|
335
|
-
WrapItem: () =>
|
336
|
-
WrapItemProps: () =>
|
337
|
-
WrapProps: () =>
|
334
|
+
Wrap: () => import_react52.Wrap,
|
335
|
+
WrapItem: () => import_react52.WrapItem,
|
336
|
+
WrapItemProps: () => import_react52.WrapItemProps,
|
337
|
+
WrapProps: () => import_react52.WrapProps,
|
338
338
|
XMSLogo: () => XMSLogo,
|
339
339
|
createExtendTheme: () => createExtendTheme,
|
340
340
|
defaultOnHandleRejections: () => defaultOnHandleRejections,
|
341
341
|
dimensionValidator: () => dimensionValidator,
|
342
|
-
extendTheme: () =>
|
343
|
-
forwardRef: () =>
|
342
|
+
extendTheme: () => import_react105.extendTheme,
|
343
|
+
forwardRef: () => import_react105.forwardRef,
|
344
344
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
345
345
|
getTheme: () => getTheme,
|
346
346
|
id: () => id,
|
@@ -356,52 +356,52 @@ __export(src_exports, {
|
|
356
356
|
useAccordionItemState: () => import_react3.useAccordionItemState,
|
357
357
|
useAccordionStyles: () => import_react3.useAccordionStyles,
|
358
358
|
useAlertStyles: () => useAlertStyles,
|
359
|
-
useBoolean: () =>
|
360
|
-
useBreakpoint: () =>
|
359
|
+
useBoolean: () => import_react104.useBoolean,
|
360
|
+
useBreakpoint: () => import_react92.useBreakpoint,
|
361
361
|
useCheckbox: () => import_react16.useCheckbox,
|
362
362
|
useCheckboxGroup: () => import_react16.useCheckboxGroup,
|
363
|
-
useClipboard: () =>
|
364
|
-
useColorMode: () =>
|
365
|
-
useColorModePreference: () =>
|
366
|
-
useColorModeValue: () =>
|
367
|
-
useConst: () =>
|
368
|
-
useControllableProp: () =>
|
369
|
-
useControllableState: () =>
|
363
|
+
useClipboard: () => import_react104.useClipboard,
|
364
|
+
useColorMode: () => import_react104.useColorMode,
|
365
|
+
useColorModePreference: () => import_react92.useColorModePreference,
|
366
|
+
useColorModeValue: () => import_react104.useColorModeValue,
|
367
|
+
useConst: () => import_react104.useConst,
|
368
|
+
useControllableProp: () => import_react104.useControllableProp,
|
369
|
+
useControllableState: () => import_react104.useControllableState,
|
370
370
|
useDataTable: () => useDataTable,
|
371
|
-
useDimensions: () =>
|
372
|
-
useDisclosure: () =>
|
373
|
-
useDrawerContext: () =>
|
371
|
+
useDimensions: () => import_react104.useDimensions,
|
372
|
+
useDisclosure: () => import_react104.useDisclosure,
|
373
|
+
useDrawerContext: () => import_react55.useDrawerContext,
|
374
374
|
useFetcher: () => useFetcher,
|
375
|
-
useImage: () =>
|
375
|
+
useImage: () => import_react92.useImage,
|
376
376
|
useInternalUI: () => useInternalUI,
|
377
|
-
useMergeRefs: () =>
|
378
|
-
useModal: () =>
|
379
|
-
useModalContext: () =>
|
380
|
-
useModalStyles: () =>
|
381
|
-
useOutsideClick: () =>
|
382
|
-
usePinInput: () =>
|
383
|
-
usePinInputContext: () =>
|
384
|
-
usePinInputField: () =>
|
385
|
-
useProgressStyles: () =>
|
386
|
-
useQuery: () =>
|
387
|
-
useRadio: () =>
|
388
|
-
useRadioGroup: () =>
|
389
|
-
useRadioGroupContext: () =>
|
390
|
-
useSteps: () =>
|
391
|
-
useTab: () =>
|
392
|
-
useTabIndicator: () =>
|
393
|
-
useTabList: () =>
|
394
|
-
useTabPanel: () =>
|
395
|
-
useTabPanels: () =>
|
396
|
-
useTabs: () =>
|
397
|
-
useTabsContext: () =>
|
398
|
-
useTabsDescendant: () =>
|
399
|
-
useTabsDescendants: () =>
|
400
|
-
useTabsDescendantsContext: () =>
|
401
|
-
useTabsStyles: () =>
|
402
|
-
useTheme: () =>
|
377
|
+
useMergeRefs: () => import_react104.useMergeRefs,
|
378
|
+
useModal: () => import_react55.useModal,
|
379
|
+
useModalContext: () => import_react55.useModalContext,
|
380
|
+
useModalStyles: () => import_react55.useModalStyles,
|
381
|
+
useOutsideClick: () => import_react104.useOutsideClick,
|
382
|
+
usePinInput: () => import_react64.usePinInput,
|
383
|
+
usePinInputContext: () => import_react64.usePinInputContext,
|
384
|
+
usePinInputField: () => import_react64.usePinInputField,
|
385
|
+
useProgressStyles: () => import_react66.useProgressStyles,
|
386
|
+
useQuery: () => import_react92.useQuery,
|
387
|
+
useRadio: () => import_react69.useRadio,
|
388
|
+
useRadioGroup: () => import_react69.useRadioGroup,
|
389
|
+
useRadioGroupContext: () => import_react69.useRadioGroupContext,
|
390
|
+
useSteps: () => import_react92.useSteps,
|
391
|
+
useTab: () => import_react83.useTab,
|
392
|
+
useTabIndicator: () => import_react83.useTabIndicator,
|
393
|
+
useTabList: () => import_react83.useTabList,
|
394
|
+
useTabPanel: () => import_react83.useTabPanel,
|
395
|
+
useTabPanels: () => import_react83.useTabPanels,
|
396
|
+
useTabs: () => import_react83.useTabs,
|
397
|
+
useTabsContext: () => import_react83.useTabsContext,
|
398
|
+
useTabsDescendant: () => import_react83.useTabsDescendant,
|
399
|
+
useTabsDescendants: () => import_react83.useTabsDescendants,
|
400
|
+
useTabsDescendantsContext: () => import_react83.useTabsDescendantsContext,
|
401
|
+
useTabsStyles: () => import_react83.useTabsStyles,
|
402
|
+
useTheme: () => import_react104.useTheme,
|
403
403
|
useToast: () => useToast,
|
404
|
-
useToken: () =>
|
404
|
+
useToken: () => import_react104.useToken
|
405
405
|
});
|
406
406
|
module.exports = __toCommonJS(src_exports);
|
407
407
|
|
@@ -1266,10 +1266,87 @@ var counter_default = Counter;
|
|
1266
1266
|
|
1267
1267
|
// src/components/data-table/components/data-table.tsx
|
1268
1268
|
var import_icons2 = require("@chakra-ui/icons");
|
1269
|
-
var
|
1270
|
-
var
|
1269
|
+
var import_react29 = require("@chakra-ui/react");
|
1270
|
+
var import_react30 = require("@emotion/react");
|
1271
1271
|
var import_react_table = require("@tanstack/react-table");
|
1272
1272
|
var React5 = __toESM(require("react"));
|
1273
|
+
|
1274
|
+
// src/hooks/useDragOrClick.ts
|
1275
|
+
var import_react28 = require("react");
|
1276
|
+
|
1277
|
+
// src/components/data-table/drag-threshold.ts
|
1278
|
+
var DragThreshold = class {
|
1279
|
+
constructor() {
|
1280
|
+
__publicField(this, "isDrag");
|
1281
|
+
__publicField(this, "mouseDown");
|
1282
|
+
__publicField(this, "x0");
|
1283
|
+
__publicField(this, "y0");
|
1284
|
+
/** threshold for dragging behavior in pixel
|
1285
|
+
* @type {number}
|
1286
|
+
*/
|
1287
|
+
__publicField(this, "threshold");
|
1288
|
+
this.isDrag = false;
|
1289
|
+
this.x0 = 0;
|
1290
|
+
this.y0 = 0;
|
1291
|
+
this.threshold = 20;
|
1292
|
+
this.mouseDown = false;
|
1293
|
+
}
|
1294
|
+
reset() {
|
1295
|
+
this.isDrag = false;
|
1296
|
+
this.x0 = 0;
|
1297
|
+
this.y0 = 0;
|
1298
|
+
this.mouseDown = false;
|
1299
|
+
}
|
1300
|
+
start(x, y) {
|
1301
|
+
this.x0 = x;
|
1302
|
+
this.y0 = y;
|
1303
|
+
this.mouseDown = true;
|
1304
|
+
}
|
1305
|
+
move(x, y) {
|
1306
|
+
if (!this.mouseDown) return;
|
1307
|
+
const dx = Math.abs(x - this.x0);
|
1308
|
+
const dy = Math.abs(y - this.y0);
|
1309
|
+
this.isDrag = Math.abs(dx) > this.threshold || Math.abs(dy) > this.threshold;
|
1310
|
+
}
|
1311
|
+
isDragged() {
|
1312
|
+
return this.isDrag;
|
1313
|
+
}
|
1314
|
+
};
|
1315
|
+
|
1316
|
+
// src/hooks/useDragOrClick.ts
|
1317
|
+
var useDragOrClick = () => {
|
1318
|
+
const clickOrDragged = (0, import_react28.useRef)(new DragThreshold());
|
1319
|
+
const getDragOrClickProps = ({
|
1320
|
+
onClick,
|
1321
|
+
onMouseDown,
|
1322
|
+
onMouseMove,
|
1323
|
+
onMouseUp
|
1324
|
+
}) => {
|
1325
|
+
return {
|
1326
|
+
onMouseDown: (e) => {
|
1327
|
+
clickOrDragged.current.start(e.clientX, e.clientY);
|
1328
|
+
onMouseDown == null ? void 0 : onMouseDown(e);
|
1329
|
+
},
|
1330
|
+
onMouseMove: (e) => {
|
1331
|
+
clickOrDragged.current.move(e.clientX, e.clientY);
|
1332
|
+
onMouseMove == null ? void 0 : onMouseMove(e);
|
1333
|
+
},
|
1334
|
+
onMouseUp: (e) => {
|
1335
|
+
if (!clickOrDragged.current.isDragged()) {
|
1336
|
+
onClick == null ? void 0 : onClick(e);
|
1337
|
+
}
|
1338
|
+
clickOrDragged.current.reset();
|
1339
|
+
onMouseUp == null ? void 0 : onMouseUp(e);
|
1340
|
+
}
|
1341
|
+
};
|
1342
|
+
};
|
1343
|
+
return {
|
1344
|
+
clickOrDragged: clickOrDragged.current,
|
1345
|
+
getDragOrClickProps
|
1346
|
+
};
|
1347
|
+
};
|
1348
|
+
|
1349
|
+
// src/components/data-table/components/data-table.tsx
|
1273
1350
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
1274
1351
|
var isCellDisabled = (row, cellId) => {
|
1275
1352
|
if (row.disabled) {
|
@@ -1341,36 +1418,52 @@ var useDataTable = ({
|
|
1341
1418
|
sortDescFirst,
|
1342
1419
|
sortingState,
|
1343
1420
|
manualSorting,
|
1421
|
+
selectedRow,
|
1422
|
+
disabledRow,
|
1423
|
+
onRowSelectionChange,
|
1344
1424
|
columnPinning
|
1345
1425
|
}) => {
|
1346
1426
|
const [isFirstLoad, setIsFirstLoad] = React5.useState(true);
|
1347
1427
|
const [sorting, setSorting] = React5.useState(sortingState != null ? sortingState : []);
|
1348
|
-
const [rowSelection, onRowSelectionChange] = React5.useState({});
|
1349
1428
|
const dataColumns = React5.useMemo(() => columns, [columns]);
|
1350
1429
|
const checkboxColumn = React5.useMemo(
|
1351
1430
|
() => [
|
1352
1431
|
{
|
1353
1432
|
id: "select",
|
1354
1433
|
size: 32,
|
1355
|
-
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1356
|
-
|
1434
|
+
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1435
|
+
import_react29.Checkbox,
|
1357
1436
|
{
|
1358
1437
|
"data-test-id": "select-header-data-table",
|
1359
1438
|
...{
|
1439
|
+
isDisabled: table2.getPaginationRowModel().rows.filter((row) => !(disabledRow == null ? void 0 : disabledRow(row.original))).length === 0,
|
1360
1440
|
isChecked: table2.getIsAllRowsSelected(),
|
1361
1441
|
isIndeterminate: table2.getIsSomeRowsSelected(),
|
1362
|
-
onChange:
|
1442
|
+
onChange: () => {
|
1443
|
+
if (table2.getIsAllRowsSelected()) {
|
1444
|
+
table2.getToggleAllRowsSelectedHandler();
|
1445
|
+
} else if (disabledRow) {
|
1446
|
+
const prevSelected = table2.getFilteredSelectedRowModel().rows.length;
|
1447
|
+
const rows = table2.getPaginationRowModel().rows.filter((row) => !disabledRow(row.original));
|
1448
|
+
if (prevSelected === rows.length) {
|
1449
|
+
table2.setRowSelection(Object.fromEntries(rows.map((row) => [row.id, false])));
|
1450
|
+
} else {
|
1451
|
+
table2.setRowSelection(Object.fromEntries(rows.map((row) => [row.id, true])));
|
1452
|
+
}
|
1453
|
+
} else {
|
1454
|
+
table2.getToggleAllRowsSelectedHandler();
|
1455
|
+
}
|
1456
|
+
}
|
1363
1457
|
}
|
1364
1458
|
}
|
1365
1459
|
) }),
|
1366
|
-
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1367
|
-
|
1460
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1461
|
+
import_react29.Checkbox,
|
1368
1462
|
{
|
1369
1463
|
"data-test-id": `select-data-table-${row.index}`,
|
1370
1464
|
...{
|
1371
1465
|
isChecked: row.getIsSelected(),
|
1372
|
-
isIndeterminate: row.getIsSomeSelected()
|
1373
|
-
onChange: row.getToggleSelectedHandler()
|
1466
|
+
isIndeterminate: row.getIsSomeSelected()
|
1374
1467
|
}
|
1375
1468
|
}
|
1376
1469
|
) })
|
@@ -1397,15 +1490,17 @@ var useDataTable = ({
|
|
1397
1490
|
sortDescFirst,
|
1398
1491
|
state: {
|
1399
1492
|
sorting,
|
1400
|
-
rowSelection,
|
1493
|
+
...selectedRow ? { rowSelection: selectedRow } : {},
|
1401
1494
|
...columnPinning ? { columnPinning } : {}
|
1402
1495
|
},
|
1496
|
+
enableRowSelection: withSelectedRow,
|
1403
1497
|
onRowSelectionChange,
|
1404
1498
|
onSortingChange
|
1405
1499
|
});
|
1406
1500
|
const { getSelectedRowModel, toggleAllRowsSelected } = table;
|
1407
1501
|
const { flatRows } = getSelectedRowModel();
|
1408
1502
|
React5.useEffect(() => {
|
1503
|
+
console.log("changed");
|
1409
1504
|
const rowData = flatRows.map((row) => row.original);
|
1410
1505
|
if (onSelectedRow) {
|
1411
1506
|
onSelectedRow(rowData);
|
@@ -1436,9 +1531,11 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1436
1531
|
columnPinning,
|
1437
1532
|
disabledRow,
|
1438
1533
|
highlightedRow,
|
1534
|
+
withSelectedRow,
|
1439
1535
|
highlightRowColor,
|
1440
1536
|
cellLineClamp = 2
|
1441
1537
|
} = props;
|
1538
|
+
const { clickOrDragged, getDragOrClickProps } = useDragOrClick();
|
1442
1539
|
const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1443
1540
|
const refTable = React5.useRef(null);
|
1444
1541
|
React5.useImperativeHandle(ref, () => ({
|
@@ -1484,27 +1581,27 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1484
1581
|
}, []);
|
1485
1582
|
const hasScroll = ((_a = refTable == null ? void 0 : refTable.current) == null ? void 0 : _a.offsetWidth) && ((_b = refTable == null ? void 0 : refTable.current) == null ? void 0 : _b.scrollWidth) && ((_c = refTable == null ? void 0 : refTable.current) == null ? void 0 : _c.offsetWidth) < ((_d = refTable == null ? void 0 : refTable.current) == null ? void 0 : _d.scrollWidth);
|
1486
1583
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1487
|
-
|
1584
|
+
import_react29.Box,
|
1488
1585
|
{
|
1489
1586
|
overflowX: "auto",
|
1490
1587
|
overflowY: "hidden",
|
1491
1588
|
position: "relative",
|
1492
|
-
pl: ((_e = columnPinning == null ? void 0 : columnPinning.left) == null ? void 0 : _e.length) ? 0 :
|
1493
|
-
pr: ((_f = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _f.length) ? 0 :
|
1589
|
+
pl: ((_e = columnPinning == null ? void 0 : columnPinning.left) == null ? void 0 : _e.length) ? 0 : 2,
|
1590
|
+
pr: ((_f = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _f.length) ? 0 : 2,
|
1494
1591
|
maxW: "100%",
|
1495
1592
|
w: "full",
|
1496
1593
|
ref: refTable,
|
1497
1594
|
...((_g = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _g.length) && hasScroll ? { "data-pin-right": true } : {},
|
1498
1595
|
...container,
|
1499
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1500
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1501
|
-
|
1596
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react29.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1598
|
+
import_react29.Th,
|
1502
1599
|
{
|
1503
1600
|
colSpan: header.colSpan,
|
1504
1601
|
width: `${header.getSize()}px`,
|
1505
1602
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1506
1603
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1507
|
-
|
1604
|
+
import_react29.Flex,
|
1508
1605
|
{
|
1509
1606
|
"data-test-id": "CT_component_data-table_loader",
|
1510
1607
|
textTransform: "capitalize",
|
@@ -1516,27 +1613,27 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1516
1613
|
},
|
1517
1614
|
header.id
|
1518
1615
|
)) }, headerGroup.id)) }),
|
1519
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1520
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Td, { width: 210, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i) }, i)) }, num)) })
|
1617
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react29.Table, { ...styles == null ? void 0 : styles.table, children: [
|
1521
1618
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1522
|
-
|
1619
|
+
import_react29.Thead,
|
1523
1620
|
{
|
1524
1621
|
maxH: "50px",
|
1525
1622
|
...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
|
1526
|
-
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1623
|
+
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Tr, { bg: (0, import_react29.useColorModeValue)("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => {
|
1527
1624
|
var _a2, _b2;
|
1528
1625
|
if (!!((_a2 = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _a2.length) && header.column.getIsFirstColumn("right")) {
|
1529
1626
|
lastPinnedColumn = header.column.getAfter("right");
|
1530
1627
|
}
|
1531
1628
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1532
|
-
|
1629
|
+
import_react29.Th,
|
1533
1630
|
{
|
1534
1631
|
colSpan: header.colSpan,
|
1535
1632
|
sx: getCommonPinningStyles(header.column),
|
1536
1633
|
width: header.column.getIsFirstColumn("left") || header.column.getIsLastColumn("right") ? `${header.getSize() + 8}px` : `${header.getSize()}px`,
|
1537
1634
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1538
1635
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1539
|
-
|
1636
|
+
import_react29.Flex,
|
1540
1637
|
{
|
1541
1638
|
backgroundColor: "white",
|
1542
1639
|
height: "100%",
|
@@ -1551,13 +1648,13 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1551
1648
|
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1552
1649
|
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1553
1650
|
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1554
|
-
|
1651
|
+
import_react29.Box,
|
1555
1652
|
{
|
1556
1653
|
as: "span",
|
1557
1654
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1558
1655
|
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1559
1656
|
onClick: header.column.getToggleSortingHandler(),
|
1560
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
|
1561
1658
|
}
|
1562
1659
|
)
|
1563
1660
|
]
|
@@ -1569,18 +1666,18 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1569
1666
|
}) }, headerGroup.id))
|
1570
1667
|
}
|
1571
1668
|
),
|
1572
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
|
1573
1670
|
const isDisabledRow = disabledRow && disabledRow(row.original);
|
1574
1671
|
const isHighlightedRow = highlightedRow && highlightedRow(row.original);
|
1575
1672
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1576
|
-
|
1673
|
+
import_react29.Tr,
|
1577
1674
|
{
|
1578
1675
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
1579
1676
|
...styles == null ? void 0 : styles.tableRow,
|
1580
|
-
sx: { ...isHighlightedRow && getTableHighlightStyle() },
|
1677
|
+
sx: { ...isHighlightedRow && getTableHighlightStyle(highlightRowColor) },
|
1581
1678
|
"aria-disabled": isDisabledRow,
|
1582
1679
|
"data-highlight": isHighlightedRow ? "true" : "false",
|
1583
|
-
css:
|
1680
|
+
css: import_react30.css`
|
1584
1681
|
&:last-child {
|
1585
1682
|
td {
|
1586
1683
|
border-bottom: none;
|
@@ -1588,29 +1685,32 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1588
1685
|
}
|
1589
1686
|
`,
|
1590
1687
|
cursor: isDisabledRow ? "default" : "pointer",
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
(
|
1688
|
+
...getDragOrClickProps({
|
1689
|
+
onMouseDown: (e) => {
|
1690
|
+
var _a2;
|
1691
|
+
if (!isDisabledRow && !isHighlightedRow) {
|
1692
|
+
(_a2 = e.currentTarget) == null ? void 0 : _a2.setAttribute("data-active", "true");
|
1693
|
+
}
|
1694
|
+
},
|
1695
|
+
onMouseUp: (e) => {
|
1696
|
+
var _a2;
|
1697
|
+
(_a2 = e.currentTarget) == null ? void 0 : _a2.removeAttribute("data-active");
|
1698
|
+
},
|
1699
|
+
onClick: () => {
|
1700
|
+
if (withSelectedRow) row.toggleSelected();
|
1701
|
+
if (onRowClick) {
|
1702
|
+
if (isDisabledRow) return;
|
1703
|
+
onRowClick(row.original);
|
1704
|
+
}
|
1595
1705
|
}
|
1596
|
-
},
|
1597
|
-
onMouseUp: (e) => {
|
1598
|
-
var _a2;
|
1599
|
-
(_a2 = e.currentTarget) == null ? void 0 : _a2.removeAttribute("data-active");
|
1600
|
-
},
|
1706
|
+
}),
|
1601
1707
|
opacity: isDisabledRow ? 0.4 : 1,
|
1602
1708
|
pointerEvents: isDisabledRow ? "none" : "auto",
|
1603
|
-
onClick: () => {
|
1604
|
-
if (onRowClick) {
|
1605
|
-
if (isDisabledRow) return;
|
1606
|
-
onRowClick(row.original);
|
1607
|
-
}
|
1608
|
-
},
|
1609
1709
|
children: row.getVisibleCells().map((cell) => {
|
1610
1710
|
const meta = cell.column.columnDef.meta;
|
1611
1711
|
const isDisabled = isCellDisabled(row.original, cell.column.id);
|
1612
1712
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1613
|
-
|
1713
|
+
import_react29.Td,
|
1614
1714
|
{
|
1615
1715
|
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1616
1716
|
fontSize: "text.sm",
|
@@ -1619,33 +1719,22 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1619
1719
|
},
|
1620
1720
|
...styles == null ? void 0 : styles.tableCell,
|
1621
1721
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1622
|
-
|
1722
|
+
import_react29.Flex,
|
1623
1723
|
{
|
1724
|
+
tabIndex: 0,
|
1624
1725
|
height: "100%",
|
1625
1726
|
width: "100%",
|
1626
1727
|
align: "center",
|
1728
|
+
"data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
|
1627
1729
|
opacity: isDisabled ? 0.5 : 1,
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
tabIndex: 0,
|
1633
|
-
cursor: "auto",
|
1634
|
-
"data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
|
1635
|
-
onMouseUp: (e) => e.stopPropagation(),
|
1636
|
-
onMouseDown: (e) => e.stopPropagation(),
|
1637
|
-
onClick: (e) => {
|
1638
|
-
e.stopPropagation();
|
1639
|
-
},
|
1640
|
-
...cellLineClamp > 0 ? {
|
1641
|
-
noOfLines: cellLineClamp,
|
1642
|
-
sx: {
|
1643
|
-
display: "-webkit-inline-box"
|
1644
|
-
}
|
1645
|
-
} : {},
|
1646
|
-
children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
1730
|
+
...cellLineClamp > 0 ? {
|
1731
|
+
noOfLines: cellLineClamp,
|
1732
|
+
sx: {
|
1733
|
+
display: "-webkit-inline-box"
|
1647
1734
|
}
|
1648
|
-
|
1735
|
+
} : {},
|
1736
|
+
sx: { ...meta && meta.columnStyles ? meta.columnStyles : {} },
|
1737
|
+
children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
1649
1738
|
}
|
1650
1739
|
)
|
1651
1740
|
},
|
@@ -1663,10 +1752,10 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1663
1752
|
var data_table_default = DataTable;
|
1664
1753
|
|
1665
1754
|
// src/components/datepicker/components/datepicker.tsx
|
1666
|
-
var
|
1755
|
+
var import_react34 = require("@chakra-ui/react");
|
1667
1756
|
var import_shared_utils8 = require("@chakra-ui/shared-utils");
|
1668
1757
|
var import_internal_icon6 = require("@ctlyst.id/internal-icon");
|
1669
|
-
var
|
1758
|
+
var import_react35 = require("@floating-ui/react");
|
1670
1759
|
var import_react_datepicker = __toESM(require("react-datepicker"));
|
1671
1760
|
|
1672
1761
|
// ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs
|
@@ -2204,12 +2293,12 @@ id.localize.month = buildLocalizeFn2({
|
|
2204
2293
|
|
2205
2294
|
// src/components/datepicker/components/styles.tsx
|
2206
2295
|
var import_system6 = require("@chakra-ui/system");
|
2207
|
-
var
|
2296
|
+
var import_react31 = require("@emotion/react");
|
2208
2297
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
2209
2298
|
var Styles = ({ showHeader }) => {
|
2210
2299
|
const { colorMode } = (0, import_system6.useColorMode)();
|
2211
2300
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
2212
|
-
|
2301
|
+
import_react31.Global,
|
2213
2302
|
{
|
2214
2303
|
styles: `
|
2215
2304
|
@charset "UTF-8";
|
@@ -3044,21 +3133,21 @@ var Styles = ({ showHeader }) => {
|
|
3044
3133
|
var styles_default = Styles;
|
3045
3134
|
|
3046
3135
|
// src/components/datepicker/components/time-input.tsx
|
3047
|
-
var
|
3048
|
-
var
|
3136
|
+
var import_react32 = require("@chakra-ui/react");
|
3137
|
+
var import_react33 = __toESM(require("react"));
|
3049
3138
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
3050
3139
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
3051
|
-
const [time, setTime] =
|
3140
|
+
const [time, setTime] = import_react33.default.useState(value || "00:00");
|
3052
3141
|
const handleChange = (e) => {
|
3053
3142
|
var _a, _b;
|
3054
3143
|
setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
|
3055
3144
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
3056
3145
|
};
|
3057
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
3058
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3059
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
3146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react32.Flex, { flexDir: "column", p: 4, pt: 0, children: [
|
3147
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react32.Text, { mb: 2, children: label }),
|
3148
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react32.InputGroup, { alignItems: "center", borderColor: "neutral.400", children: [
|
3060
3149
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3061
|
-
|
3150
|
+
import_react32.Input,
|
3062
3151
|
{
|
3063
3152
|
onChange: handleChange,
|
3064
3153
|
type: "time",
|
@@ -3073,7 +3162,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
3073
3162
|
}
|
3074
3163
|
}
|
3075
3164
|
),
|
3076
|
-
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3165
|
+
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react32.InputRightAddon, { children: rightAddon })
|
3077
3166
|
] })
|
3078
3167
|
] });
|
3079
3168
|
};
|
@@ -3129,7 +3218,7 @@ var Datepicker = ({
|
|
3129
3218
|
},
|
3130
3219
|
selected,
|
3131
3220
|
popperModifiers: [
|
3132
|
-
(0,
|
3221
|
+
(0, import_react35.offset)(4),
|
3133
3222
|
{
|
3134
3223
|
name: "placement",
|
3135
3224
|
fn: (state) => {
|
@@ -3152,7 +3241,7 @@ var Datepicker = ({
|
|
3152
3241
|
addOnRight: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react20.InputRightElement, { alignSelf: "center", bottom: 0, flexDir: "row-reverse", width: "auto", mr: 2, gap: 2, children: [
|
3153
3242
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_internal_icon6.Calendar, { size: 4, color: "neutral.400" }),
|
3154
3243
|
value && !props.disabled && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3155
|
-
|
3244
|
+
import_react34.IconButton,
|
3156
3245
|
{
|
3157
3246
|
"data-test-id": "H0rseVCzGIaqoLho-EPbu",
|
3158
3247
|
display: "flex",
|
@@ -3186,9 +3275,9 @@ var Datepicker = ({
|
|
3186
3275
|
if (props.inline) {
|
3187
3276
|
return component;
|
3188
3277
|
}
|
3189
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
3278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react34.FormControl, { "data-test-id": "CT_Component_datepicker_wrapper", isInvalid: isError, children: [
|
3190
3279
|
component,
|
3191
|
-
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3280
|
+
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react34.FormHelperText, { fontSize: "text.xs", mt: 1, children: helperText }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react34.FormErrorMessage, { fontSize: "text.xs", mt: 1, children: error })
|
3192
3281
|
] });
|
3193
3282
|
};
|
3194
3283
|
Datepicker.defaultProps = {
|
@@ -3206,18 +3295,18 @@ Datepicker.defaultProps = {
|
|
3206
3295
|
var datepicker_default = Datepicker;
|
3207
3296
|
|
3208
3297
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
3209
|
-
var
|
3210
|
-
var
|
3211
|
-
var
|
3298
|
+
var import_react36 = require("@chakra-ui/react");
|
3299
|
+
var import_react37 = require("@emotion/react");
|
3300
|
+
var import_react38 = __toESM(require("react"));
|
3212
3301
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
3213
3302
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
3214
|
-
const [date, setDate] =
|
3303
|
+
const [date, setDate] = import_react38.default.useState(null);
|
3215
3304
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3216
|
-
|
3305
|
+
import_react36.Box,
|
3217
3306
|
{
|
3218
3307
|
fontSize: "12px",
|
3219
3308
|
lineHeight: "18px",
|
3220
|
-
css:
|
3309
|
+
css: import_react37.css`
|
3221
3310
|
input[type='date']::-webkit-inner-spin-button,
|
3222
3311
|
input[type='date']::-webkit-calendar-picker-indicator {
|
3223
3312
|
display: none;
|
@@ -3228,7 +3317,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3228
3317
|
}
|
3229
3318
|
`,
|
3230
3319
|
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3231
|
-
|
3320
|
+
import_react36.Input,
|
3232
3321
|
{
|
3233
3322
|
"data-test-id": props["data-test-id"],
|
3234
3323
|
type: "date",
|
@@ -3241,7 +3330,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3241
3330
|
min,
|
3242
3331
|
max,
|
3243
3332
|
required: true,
|
3244
|
-
css:
|
3333
|
+
css: import_react37.css`
|
3245
3334
|
border: 1px solid transparent;
|
3246
3335
|
|
3247
3336
|
&:focus,
|
@@ -3265,11 +3354,11 @@ DatePickerMonth.defaultProps = {
|
|
3265
3354
|
var datepicker_month_default = DatePickerMonth;
|
3266
3355
|
|
3267
3356
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
3268
|
-
var
|
3357
|
+
var import_react39 = require("@chakra-ui/react");
|
3269
3358
|
var import_styled = __toESM(require("@emotion/styled"));
|
3270
|
-
var
|
3359
|
+
var import_react40 = __toESM(require("react"));
|
3271
3360
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
3272
|
-
var MultiDateWrapper = (0, import_styled.default)(
|
3361
|
+
var MultiDateWrapper = (0, import_styled.default)(import_react39.Box)`
|
3273
3362
|
display: flex;
|
3274
3363
|
align-items: center;
|
3275
3364
|
width: fit-content;
|
@@ -3284,7 +3373,7 @@ var MultiDatePickerMonth = ({
|
|
3284
3373
|
min = "2020-01-01",
|
3285
3374
|
max = "2020-12-31"
|
3286
3375
|
}) => {
|
3287
|
-
const [date, setDate] =
|
3376
|
+
const [date, setDate] = import_react40.default.useState([null, null]);
|
3288
3377
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(MultiDateWrapper, { isError, children: [
|
3289
3378
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3290
3379
|
datepicker_month_default,
|
@@ -3298,7 +3387,7 @@ var MultiDatePickerMonth = ({
|
|
3298
3387
|
max
|
3299
3388
|
}
|
3300
3389
|
),
|
3301
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3390
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react39.Box, { children: "-" }),
|
3302
3391
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3303
3392
|
datepicker_month_default,
|
3304
3393
|
{
|
@@ -3321,7 +3410,7 @@ MultiDatePickerMonth.defaultProps = {
|
|
3321
3410
|
var multi_datepicker_month_default = MultiDatePickerMonth;
|
3322
3411
|
|
3323
3412
|
// src/components/dialog/components/dialog.tsx
|
3324
|
-
var
|
3413
|
+
var import_react41 = require("@chakra-ui/react");
|
3325
3414
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
3326
3415
|
var Dialog = ({
|
3327
3416
|
title,
|
@@ -3332,12 +3421,12 @@ var Dialog = ({
|
|
3332
3421
|
isOverlayClickable,
|
3333
3422
|
...props
|
3334
3423
|
}) => {
|
3335
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3336
|
-
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3337
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3338
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3339
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3340
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react41.Modal, { ...props, children: [
|
3425
|
+
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react41.ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
3426
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react41.ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
3427
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react41.ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react41.Text, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
3428
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react41.ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
3429
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react41.ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
3341
3430
|
] })
|
3342
3431
|
] });
|
3343
3432
|
};
|
@@ -3352,7 +3441,7 @@ var dialog_default = Dialog;
|
|
3352
3441
|
var Icon2 = __toESM(require("@ctlyst.id/internal-icon"));
|
3353
3442
|
|
3354
3443
|
// src/components/empty-state/components/layout.tsx
|
3355
|
-
var
|
3444
|
+
var import_react42 = require("@chakra-ui/react");
|
3356
3445
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
3357
3446
|
var EmptyState = (props) => {
|
3358
3447
|
const { icon, title, description, buttonText, onClick } = props;
|
@@ -3361,13 +3450,13 @@ var EmptyState = (props) => {
|
|
3361
3450
|
onClick();
|
3362
3451
|
}
|
3363
3452
|
};
|
3364
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react42.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react42.VStack, { textAlign: "center", children: [
|
3365
3454
|
icon,
|
3366
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
3367
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3368
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3455
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react42.VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
|
3456
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react42.Text, { textStyle: "text.lg", fontWeight: "bold", children: title }),
|
3457
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react42.Text, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
|
3369
3458
|
] }),
|
3370
|
-
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3459
|
+
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react42.Box, { mt: 3, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react42.Button, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
|
3371
3460
|
] }) });
|
3372
3461
|
};
|
3373
3462
|
var layout_default = EmptyState;
|
@@ -3444,28 +3533,28 @@ EmptyState2.NotAuthorize = EmptyStateNotAuthorize;
|
|
3444
3533
|
var empty_state_default = EmptyState2;
|
3445
3534
|
|
3446
3535
|
// src/components/header/components/header.tsx
|
3447
|
-
var
|
3536
|
+
var import_react49 = require("@chakra-ui/react");
|
3448
3537
|
|
3449
3538
|
// src/components/header/components/logo.tsx
|
3450
|
-
var
|
3539
|
+
var import_react43 = require("@chakra-ui/react");
|
3451
3540
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
3452
3541
|
var Logo = ({ url, imageUrl, height }) => {
|
3453
3542
|
if (url)
|
3454
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3455
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react43.Box, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react43.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" }) });
|
3544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react43.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" });
|
3456
3545
|
};
|
3457
3546
|
var XMSLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3458
|
-
|
3547
|
+
import_react43.Image,
|
3459
3548
|
{
|
3460
3549
|
height: 8,
|
3461
|
-
src: (0,
|
3550
|
+
src: (0, import_react43.useColorModeValue)("https://assets.voila.id/xms/logo-xms.jpg", "https://assets.voila.id/xms/logo-xms-dark.png")
|
3462
3551
|
}
|
3463
3552
|
);
|
3464
3553
|
var VoilaLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3465
|
-
|
3554
|
+
import_react43.Image,
|
3466
3555
|
{
|
3467
3556
|
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
3468
|
-
filter: (0,
|
3557
|
+
filter: (0, import_react43.useColorModeValue)("none", "invert(1)"),
|
3469
3558
|
maxW: 24
|
3470
3559
|
}
|
3471
3560
|
);
|
@@ -3475,16 +3564,16 @@ Logo.defaultProps = {
|
|
3475
3564
|
};
|
3476
3565
|
|
3477
3566
|
// src/components/header/components/profile.tsx
|
3478
|
-
var
|
3567
|
+
var import_react46 = require("@chakra-ui/react");
|
3479
3568
|
var import_fi2 = require("react-icons/fi");
|
3480
3569
|
|
3481
3570
|
// src/components/nav-item/components/nav-item.tsx
|
3482
|
-
var
|
3571
|
+
var import_react44 = require("@chakra-ui/react");
|
3483
3572
|
var import_shared_utils9 = require("@chakra-ui/shared-utils");
|
3484
3573
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
3485
3574
|
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
3486
3575
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
3487
|
-
|
3576
|
+
import_react44.Link,
|
3488
3577
|
{
|
3489
3578
|
"data-test-id": props["data-test-id"],
|
3490
3579
|
opacity: isDisabled ? "0.3" : "initial",
|
@@ -3524,7 +3613,7 @@ NavItem.defaultProps = {
|
|
3524
3613
|
};
|
3525
3614
|
|
3526
3615
|
// src/components/tooltip/components/tooltip.tsx
|
3527
|
-
var
|
3616
|
+
var import_react45 = require("@chakra-ui/react");
|
3528
3617
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
3529
3618
|
var Tooltip = (props) => {
|
3530
3619
|
const {
|
@@ -3537,7 +3626,7 @@ var Tooltip = (props) => {
|
|
3537
3626
|
fontWeight = "400"
|
3538
3627
|
} = props;
|
3539
3628
|
const content = ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
3540
|
-
|
3629
|
+
import_react45.PopoverContent,
|
3541
3630
|
{
|
3542
3631
|
"data-test-id": "",
|
3543
3632
|
border: "none",
|
@@ -3551,15 +3640,15 @@ var Tooltip = (props) => {
|
|
3551
3640
|
onClose();
|
3552
3641
|
},
|
3553
3642
|
children: [
|
3554
|
-
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3555
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3643
|
+
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react45.PopoverArrow, { color, bg, shadow: "none" }),
|
3644
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react45.PopoverBody, { color, ...props, fontWeight, children: props.label })
|
3556
3645
|
]
|
3557
3646
|
}
|
3558
3647
|
);
|
3559
|
-
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3560
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3561
|
-
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3562
|
-
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3648
|
+
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react45.Popover, { trigger: "hover", placement: props.placement, ...props.popoverProps, children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react45.PopoverTrigger, { children }),
|
3650
|
+
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react45.Portal, { children: content({ onClose }) }) : content({ onClose })
|
3651
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react45.Tooltip, { ...props, children });
|
3563
3652
|
};
|
3564
3653
|
|
3565
3654
|
// src/components/header/components/profile.tsx
|
@@ -3575,10 +3664,10 @@ var Profile = ({
|
|
3575
3664
|
...props
|
3576
3665
|
}) => {
|
3577
3666
|
var _a, _b;
|
3578
|
-
const { isOpen, onToggle, onClose } = (0,
|
3579
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3667
|
+
const { isOpen, onToggle, onClose } = (0, import_react46.useDisclosure)();
|
3668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
3580
3669
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3581
|
-
|
3670
|
+
import_react46.Box,
|
3582
3671
|
{
|
3583
3672
|
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
3584
3673
|
as: "button",
|
@@ -3594,14 +3683,14 @@ var Profile = ({
|
|
3594
3683
|
onClick: onToggle,
|
3595
3684
|
color,
|
3596
3685
|
...props,
|
3597
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3598
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3599
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3600
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.HStack, { children: [
|
3687
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.VStack, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
|
3688
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Text, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
3689
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.Flex, { alignItems: "center", children: [
|
3601
3690
|
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
3602
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
3603
3692
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3604
|
-
|
3693
|
+
import_react46.Box,
|
3605
3694
|
{
|
3606
3695
|
className: "catalyst_header-profile-divider",
|
3607
3696
|
h: "3",
|
@@ -3611,17 +3700,17 @@ var Profile = ({
|
|
3611
3700
|
}
|
3612
3701
|
)
|
3613
3702
|
] }),
|
3614
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3615
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3703
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.Flex, { align: "center", justify: "center", children: [
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Text, { textStyle: "text.xs", children: data.office[0] }),
|
3616
3705
|
data.office.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3617
3706
|
Tooltip,
|
3618
3707
|
{
|
3619
3708
|
isInteractive: true,
|
3620
3709
|
hasArrow: true,
|
3621
3710
|
p: "2",
|
3622
|
-
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3623
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3624
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3711
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.Box, { children: [
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Text, { children: "Akses Office:" }),
|
3713
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Text, { children: data.office.sort().join(", ") })
|
3625
3714
|
] }),
|
3626
3715
|
textAlign: "left",
|
3627
3716
|
placement: "bottom-end",
|
@@ -3632,7 +3721,7 @@ var Profile = ({
|
|
3632
3721
|
},
|
3633
3722
|
width: 300,
|
3634
3723
|
...officeContainer,
|
3635
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3724
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3636
3725
|
badge_default,
|
3637
3726
|
{
|
3638
3727
|
rounded: "full",
|
@@ -3649,18 +3738,18 @@ var Profile = ({
|
|
3649
3738
|
) })
|
3650
3739
|
}
|
3651
3740
|
)
|
3652
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3741
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
3653
3742
|
] })
|
3654
3743
|
] }),
|
3655
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Box, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Avatar, { size: "sm", bg: brandColor, color: "white", name: (_b = data == null ? void 0 : data.name) != null ? _b : data == null ? void 0 : data.email }) }) })
|
3656
3745
|
] })
|
3657
3746
|
}
|
3658
3747
|
),
|
3659
|
-
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3660
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3661
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3748
|
+
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.PopoverContent, { bg: "white", maxW: 200, children: [
|
3749
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.PopoverArrow, { bg: "white" }),
|
3750
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NavItem, { "data-test-id": "CTA_Navbar_logout-button", onClick: onLogout, rounded: "none", px: "4", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react46.Box, { display: "flex", alignItems: "center", children: [
|
3662
3751
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_fi2.FiPower, {}),
|
3663
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3752
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react46.Text, { ml: "2", children: "Logout" })
|
3664
3753
|
] }) }) })
|
3665
3754
|
] })
|
3666
3755
|
] });
|
@@ -3673,17 +3762,17 @@ Profile.defaultProps = {
|
|
3673
3762
|
};
|
3674
3763
|
|
3675
3764
|
// src/components/header/components/switch-mode.tsx
|
3676
|
-
var
|
3765
|
+
var import_react47 = require("@chakra-ui/react");
|
3677
3766
|
var import_fi3 = require("react-icons/fi");
|
3678
3767
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
3679
3768
|
var SwitchMode = () => {
|
3680
|
-
const { colorMode, toggleColorMode } = (0,
|
3681
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
3769
|
+
const { colorMode, toggleColorMode } = (0, import_react47.useColorMode)();
|
3770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react47.Box, { "data-test-id": "rhYuTDCiWkFqr96upiEEh", mx: 5, onClick: toggleColorMode, cursor: "pointer", children: colorMode === "light" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_fi3.FiMoon, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_fi3.FiSun, { size: 20 }) });
|
3682
3771
|
};
|
3683
3772
|
var switch_mode_default = SwitchMode;
|
3684
3773
|
|
3685
3774
|
// src/components/header/components/version.tsx
|
3686
|
-
var
|
3775
|
+
var import_react48 = require("@chakra-ui/react");
|
3687
3776
|
|
3688
3777
|
// src/components/header/utils/formatter.ts
|
3689
3778
|
function environmentName(env) {
|
@@ -3721,7 +3810,7 @@ var Version = ({
|
|
3721
3810
|
}
|
3722
3811
|
) : version,
|
3723
3812
|
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
3724
|
-
|
3813
|
+
import_react48.Box,
|
3725
3814
|
{
|
3726
3815
|
background: "primary.50",
|
3727
3816
|
color: "primary.500",
|
@@ -3761,8 +3850,8 @@ var Header = ({
|
|
3761
3850
|
bg = "white",
|
3762
3851
|
versionStyle,
|
3763
3852
|
...props
|
3764
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3765
|
-
|
3853
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react49.Flex, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3854
|
+
import_react49.Flex,
|
3766
3855
|
{
|
3767
3856
|
h: "auto",
|
3768
3857
|
w: "full",
|
@@ -3770,11 +3859,11 @@ var Header = ({
|
|
3770
3859
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
3771
3860
|
pos: "relative",
|
3772
3861
|
children: [
|
3773
|
-
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3862
|
+
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react49.Flex, { alignItems: "center", children: [
|
3774
3863
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
3775
3864
|
children && children
|
3776
3865
|
] }),
|
3777
|
-
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3866
|
+
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react49.HStack, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
3778
3867
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
3779
3868
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3780
3869
|
Version,
|
@@ -3787,7 +3876,7 @@ var Header = ({
|
|
3787
3876
|
}
|
3788
3877
|
)
|
3789
3878
|
] }),
|
3790
|
-
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3879
|
+
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react49.Flex, { alignItems: "center", children: [
|
3791
3880
|
!hideSwitchMode && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(switch_mode_default, {}),
|
3792
3881
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Profile, { color: props.color, brandColor, data, onLogout })
|
3793
3882
|
] })
|
@@ -3811,11 +3900,11 @@ Header.defaultProps = {
|
|
3811
3900
|
};
|
3812
3901
|
|
3813
3902
|
// src/components/header/components/navbar.tsx
|
3814
|
-
var
|
3903
|
+
var import_react50 = require("@chakra-ui/react");
|
3815
3904
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
3816
3905
|
var Navbar = ({ bg = "white", children, ...props }) => {
|
3817
3906
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
3818
|
-
|
3907
|
+
import_react50.Flex,
|
3819
3908
|
{
|
3820
3909
|
minH: "15",
|
3821
3910
|
h: "15",
|
@@ -3835,21 +3924,21 @@ var Navbar = ({ bg = "white", children, ...props }) => {
|
|
3835
3924
|
Navbar.displayName = "Navbar";
|
3836
3925
|
|
3837
3926
|
// src/components/image/index.ts
|
3838
|
-
var
|
3927
|
+
var import_react51 = require("@chakra-ui/react");
|
3839
3928
|
|
3840
3929
|
// src/components/layouting/index.ts
|
3841
|
-
var
|
3930
|
+
var import_react52 = require("@chakra-ui/react");
|
3842
3931
|
|
3843
3932
|
// src/components/list/index.tsx
|
3844
|
-
var
|
3933
|
+
var import_react53 = require("@chakra-ui/react");
|
3845
3934
|
|
3846
3935
|
// src/components/modal/components/modal-back-button.tsx
|
3847
3936
|
var import_icons3 = require("@chakra-ui/icons");
|
3848
|
-
var
|
3937
|
+
var import_react54 = require("@chakra-ui/react");
|
3849
3938
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
3850
3939
|
var ModalBackButton = ({ onClick }) => {
|
3851
3940
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
3852
|
-
|
3941
|
+
import_react54.IconButton,
|
3853
3942
|
{
|
3854
3943
|
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons3.ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
3855
3944
|
size: "sm",
|
@@ -3869,12 +3958,12 @@ var ModalBackButton = ({ onClick }) => {
|
|
3869
3958
|
var modal_back_button_default = ModalBackButton;
|
3870
3959
|
|
3871
3960
|
// src/components/modal/index.ts
|
3872
|
-
var
|
3961
|
+
var import_react55 = require("@chakra-ui/react");
|
3873
3962
|
|
3874
3963
|
// src/components/navigation/components/navigation.tsx
|
3875
|
-
var
|
3964
|
+
var import_react56 = require("@chakra-ui/react");
|
3876
3965
|
var Icon5 = __toESM(require("@ctlyst.id/internal-icon"));
|
3877
|
-
var
|
3966
|
+
var import_react57 = require("@emotion/react");
|
3878
3967
|
|
3879
3968
|
// src/components/navigation/components/mapping-icon.tsx
|
3880
3969
|
var Icon4 = __toESM(require("@ctlyst.id/internal-icon"));
|
@@ -3897,8 +3986,8 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
3897
3986
|
// src/components/navigation/components/navigation.tsx
|
3898
3987
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
3899
3988
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
3900
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3901
|
-
|
3989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react56.Box, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3990
|
+
import_react56.Flex,
|
3902
3991
|
{
|
3903
3992
|
bg: "white",
|
3904
3993
|
w: "full",
|
@@ -3912,9 +4001,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3912
4001
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
3913
4002
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
3914
4003
|
const activeBg = isActive ? "primary.500" : void 0;
|
3915
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3916
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3917
|
-
|
4004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react56.Popover, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
4005
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react56.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4006
|
+
import_react56.Button,
|
3918
4007
|
{
|
3919
4008
|
h: 7.5,
|
3920
4009
|
p: 2,
|
@@ -3931,10 +4020,10 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3931
4020
|
children: navigation.title
|
3932
4021
|
}
|
3933
4022
|
) }),
|
3934
|
-
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3935
|
-
|
4023
|
+
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react56.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react56.Box, { zIndex: "popover", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4024
|
+
import_react56.PopoverContent,
|
3936
4025
|
{
|
3937
|
-
bg: (0,
|
4026
|
+
bg: (0, import_react56.useColorModeValue)("white", "ebony-clay.800"),
|
3938
4027
|
maxW: 250,
|
3939
4028
|
border: "none",
|
3940
4029
|
borderRadius: "md",
|
@@ -3944,7 +4033,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3944
4033
|
const isLocalLink = host === navHost;
|
3945
4034
|
const isActiveSub = activePath === navLink;
|
3946
4035
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3947
|
-
|
4036
|
+
import_react56.Link,
|
3948
4037
|
{
|
3949
4038
|
as: isLocalLink ? as : void 0,
|
3950
4039
|
href: link,
|
@@ -3952,7 +4041,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3952
4041
|
textDecoration: "none"
|
3953
4042
|
},
|
3954
4043
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
3955
|
-
|
4044
|
+
import_react56.Box,
|
3956
4045
|
{
|
3957
4046
|
display: "flex",
|
3958
4047
|
position: "relative",
|
@@ -3960,24 +4049,24 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3960
4049
|
cursor: "pointer",
|
3961
4050
|
transition: "padding 0.35s ease 0s",
|
3962
4051
|
_hover: {
|
3963
|
-
backgroundColor: (0,
|
3964
|
-
color: (0,
|
4052
|
+
backgroundColor: (0, import_react56.useColorModeValue)("dove-gray.50", "mirage.900"),
|
4053
|
+
color: (0, import_react56.useColorModeValue)("primary.500", "dove-gray.600"),
|
3965
4054
|
px: 5,
|
3966
4055
|
py: 4,
|
3967
4056
|
_first: { borderTopRadius: "md" },
|
3968
4057
|
_last: { borderBottomRadius: "md" }
|
3969
4058
|
},
|
3970
4059
|
color: isActiveSub ? "primary.500" : "inherit",
|
3971
|
-
css:
|
4060
|
+
css: import_react57.css`
|
3972
4061
|
border-spacing: 4px;
|
3973
4062
|
`,
|
3974
4063
|
px: 6,
|
3975
4064
|
py: 4,
|
3976
4065
|
children: [
|
3977
4066
|
mappingIcon.get(navigation.title),
|
3978
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4067
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react56.Text, { fontSize: "text.sm", ml: 3, children: title }),
|
3979
4068
|
isActiveSub && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3980
|
-
|
4069
|
+
import_react56.Box,
|
3981
4070
|
{
|
3982
4071
|
width: 0.5,
|
3983
4072
|
height: 8,
|
@@ -4010,7 +4099,7 @@ Navigation.defaultProps = {
|
|
4010
4099
|
var navigation_default = Navigation;
|
4011
4100
|
|
4012
4101
|
// src/components/navigation/components/navigation-bar.tsx
|
4013
|
-
var
|
4102
|
+
var import_react58 = require("@chakra-ui/react");
|
4014
4103
|
var Icon6 = __toESM(require("@ctlyst.id/internal-icon"));
|
4015
4104
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
4016
4105
|
var NavigationBar = ({
|
@@ -4027,8 +4116,8 @@ var NavigationBar = ({
|
|
4027
4116
|
}
|
4028
4117
|
return subMenu.navHost + subMenu.navLink;
|
4029
4118
|
};
|
4030
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4031
|
-
|
4119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react58.Box, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4120
|
+
import_react58.Flex,
|
4032
4121
|
{
|
4033
4122
|
bg: "white",
|
4034
4123
|
w: "full",
|
@@ -4044,9 +4133,9 @@ var NavigationBar = ({
|
|
4044
4133
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
4045
4134
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
4046
4135
|
const activeBg = isActive ? "primary.500" : void 0;
|
4047
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4048
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4049
|
-
|
4136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react58.Popover, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
4137
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react58.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4138
|
+
import_react58.Button,
|
4050
4139
|
{
|
4051
4140
|
h: 7.5,
|
4052
4141
|
p: 2,
|
@@ -4063,8 +4152,8 @@ var NavigationBar = ({
|
|
4063
4152
|
children: item.title
|
4064
4153
|
}
|
4065
4154
|
) }),
|
4066
|
-
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4067
|
-
|
4155
|
+
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react58.PopoverContent, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
4156
|
+
import_react58.Link,
|
4068
4157
|
{
|
4069
4158
|
href: urlMenu(subMenu),
|
4070
4159
|
display: "flex",
|
@@ -4081,7 +4170,7 @@ var NavigationBar = ({
|
|
4081
4170
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
4082
4171
|
children: [
|
4083
4172
|
mappingIcon2.get(item.title),
|
4084
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4173
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react58.Text, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
4085
4174
|
]
|
4086
4175
|
},
|
4087
4176
|
subMenu.id
|
@@ -4098,18 +4187,18 @@ var navigation_bar_default = NavigationBar;
|
|
4098
4187
|
|
4099
4188
|
// src/components/pagination/components/pagination.tsx
|
4100
4189
|
var import_icons4 = require("@chakra-ui/icons");
|
4101
|
-
var
|
4190
|
+
var import_react61 = require("@chakra-ui/react");
|
4102
4191
|
|
4103
4192
|
// src/components/pagination/components/pagination-button.tsx
|
4104
|
-
var
|
4193
|
+
var import_react59 = require("@chakra-ui/react");
|
4105
4194
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
4106
|
-
var PaginationButton = (0,
|
4107
|
-
const btnBg = (0,
|
4108
|
-
const btnColor = (0,
|
4109
|
-
const btnNotActiveBg = (0,
|
4110
|
-
const btnNotActiveColor = (0,
|
4195
|
+
var PaginationButton = (0, import_react59.forwardRef)(({ className, style, isActive, children, ...rest }, ref) => {
|
4196
|
+
const btnBg = (0, import_react59.useColorModeValue)("neutral.300", "mirage.900");
|
4197
|
+
const btnColor = (0, import_react59.useColorModeValue)("black.high", "primary.300");
|
4198
|
+
const btnNotActiveBg = (0, import_react59.useColorModeValue)("secondary.50", "primary.500");
|
4199
|
+
const btnNotActiveColor = (0, import_react59.useColorModeValue)("primary.500", "white");
|
4111
4200
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
4112
|
-
|
4201
|
+
import_react59.Button,
|
4113
4202
|
{
|
4114
4203
|
"data-test-id": "Pagination-Button",
|
4115
4204
|
ref,
|
@@ -4134,7 +4223,7 @@ var PaginationButton = (0, import_react58.forwardRef)(({ className, style, isAct
|
|
4134
4223
|
color: "neutral.300"
|
4135
4224
|
},
|
4136
4225
|
_disabled: {
|
4137
|
-
background: (0,
|
4226
|
+
background: (0, import_react59.useColorModeValue)("neutral.300", "mirage.900"),
|
4138
4227
|
color: "neutral.600",
|
4139
4228
|
pointerEvents: "none"
|
4140
4229
|
},
|
@@ -4150,7 +4239,7 @@ PaginationButton.defaultProps = {
|
|
4150
4239
|
var pagination_button_default = PaginationButton;
|
4151
4240
|
|
4152
4241
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
4153
|
-
var
|
4242
|
+
var import_react60 = require("@chakra-ui/react");
|
4154
4243
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
4155
4244
|
var PaginationButtonTrigger = ({
|
4156
4245
|
color,
|
@@ -4159,7 +4248,7 @@ var PaginationButtonTrigger = ({
|
|
4159
4248
|
visuallyHidden,
|
4160
4249
|
icon
|
4161
4250
|
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
4162
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
4251
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react60.VisuallyHidden, { children: visuallyHidden }),
|
4163
4252
|
icon
|
4164
4253
|
] });
|
4165
4254
|
PaginationButtonTrigger.defaultProps = {
|
@@ -4174,8 +4263,8 @@ var pagination_button_trigger_default = PaginationButtonTrigger;
|
|
4174
4263
|
// src/components/pagination/components/pagination.tsx
|
4175
4264
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
4176
4265
|
var Pagination = ({ className, current, total, onSelect }) => {
|
4177
|
-
const btnColorDisabled = (0,
|
4178
|
-
const btnColor = (0,
|
4266
|
+
const btnColorDisabled = (0, import_react61.useColorModeValue)("secondary.100", "primary.500");
|
4267
|
+
const btnColor = (0, import_react61.useColorModeValue)("primary.500", "secondary.100");
|
4179
4268
|
const disabledPrevious = current === 1;
|
4180
4269
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
4181
4270
|
const disabledNext = current === total;
|
@@ -4202,8 +4291,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4202
4291
|
}
|
4203
4292
|
return pageButtons;
|
4204
4293
|
};
|
4205
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4206
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react61.Box, { className, display: "inline-flex", alignItems: "center", children: [
|
4295
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react61.Box, { mr: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4207
4296
|
pagination_button_trigger_default,
|
4208
4297
|
{
|
4209
4298
|
"data-test-id": "Pagination-Button",
|
@@ -4214,7 +4303,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4214
4303
|
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons4.ArrowLeftIcon, { width: 2 })
|
4215
4304
|
}
|
4216
4305
|
) }),
|
4217
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react61.Box, { bg: "neutral.300", borderRadius: "full", children: [
|
4218
4307
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4219
4308
|
pagination_button_trigger_default,
|
4220
4309
|
{
|
@@ -4233,7 +4322,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4233
4322
|
"data-test-id": "Pagination-Button",
|
4234
4323
|
isActive: page === current,
|
4235
4324
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
4236
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react61.Text, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
4237
4326
|
},
|
4238
4327
|
page
|
4239
4328
|
);
|
@@ -4250,7 +4339,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4250
4339
|
}
|
4251
4340
|
)
|
4252
4341
|
] }),
|
4253
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4342
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react61.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4254
4343
|
pagination_button_trigger_default,
|
4255
4344
|
{
|
4256
4345
|
"data-test-id": "Pagination-Button",
|
@@ -4271,7 +4360,7 @@ Pagination.displayName = "Pagination";
|
|
4271
4360
|
var pagination_default = Pagination;
|
4272
4361
|
|
4273
4362
|
// src/components/pagination/components/pagination-detail.tsx
|
4274
|
-
var
|
4363
|
+
var import_react62 = require("@chakra-ui/react");
|
4275
4364
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
4276
4365
|
var PaginationDetail = ({
|
4277
4366
|
page,
|
@@ -4282,12 +4371,12 @@ var PaginationDetail = ({
|
|
4282
4371
|
lineHeight = 18,
|
4283
4372
|
...rest
|
4284
4373
|
}) => {
|
4285
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
4374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react62.Text, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
4286
4375
|
};
|
4287
4376
|
var pagination_detail_default = PaginationDetail;
|
4288
4377
|
|
4289
4378
|
// src/components/pagination/components/pagination-filter.tsx
|
4290
|
-
var
|
4379
|
+
var import_react63 = require("@chakra-ui/react");
|
4291
4380
|
var React9 = __toESM(require("react"));
|
4292
4381
|
var import_fi4 = require("react-icons/fi");
|
4293
4382
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
@@ -4299,10 +4388,10 @@ var PaginationFilter = ({
|
|
4299
4388
|
...rest
|
4300
4389
|
}) => {
|
4301
4390
|
const [value, setValue] = React9.useState(limit);
|
4302
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
4303
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react63.Box, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
4392
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react63.Text, { fontSize: "text.sm", lineHeight: 18, color: (0, import_react63.useColorModeValue)("neutral.900", "white"), ...rest, children: label }),
|
4304
4393
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4305
|
-
|
4394
|
+
import_react63.Select,
|
4306
4395
|
{
|
4307
4396
|
textAlign: "center",
|
4308
4397
|
size: "xs",
|
@@ -4332,22 +4421,22 @@ PaginationFilter.defaultProps = {
|
|
4332
4421
|
var pagination_filter_default = PaginationFilter;
|
4333
4422
|
|
4334
4423
|
// src/components/pin-input/index.ts
|
4335
|
-
var
|
4424
|
+
var import_react64 = require("@chakra-ui/react");
|
4336
4425
|
|
4337
4426
|
// src/components/popover/index.ts
|
4338
|
-
var
|
4427
|
+
var import_react65 = require("@chakra-ui/react");
|
4339
4428
|
|
4340
4429
|
// src/components/progress/index.ts
|
4341
|
-
var
|
4430
|
+
var import_react66 = require("@chakra-ui/react");
|
4342
4431
|
|
4343
4432
|
// src/components/radio/components/radio.tsx
|
4344
|
-
var
|
4433
|
+
var import_react67 = require("@chakra-ui/react");
|
4345
4434
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
4346
4435
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
4347
4436
|
const variant = isError ? "errors" : "unstyled";
|
4348
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
4349
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
4350
|
-
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
4437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react67.Box, { children: [
|
4438
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react67.Box, { display: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react67.Radio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react67.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
4439
|
+
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react67.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react67.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react67.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react67.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
4351
4440
|
] });
|
4352
4441
|
};
|
4353
4442
|
Radio.displayName = "Radio";
|
@@ -4358,7 +4447,7 @@ Radio.defaultProps = {
|
|
4358
4447
|
};
|
4359
4448
|
|
4360
4449
|
// src/components/radio/components/radio-group.tsx
|
4361
|
-
var
|
4450
|
+
var import_react68 = require("@chakra-ui/react");
|
4362
4451
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
4363
4452
|
var RadioGroup = ({
|
4364
4453
|
children,
|
@@ -4368,7 +4457,7 @@ var RadioGroup = ({
|
|
4368
4457
|
errorMessage,
|
4369
4458
|
...props
|
4370
4459
|
}) => {
|
4371
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
4460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react68.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react68.RadioGroup, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react68.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
4372
4461
|
};
|
4373
4462
|
RadioGroup.displayName = "RadioGroup";
|
4374
4463
|
RadioGroup.defaultProps = {
|
@@ -4378,34 +4467,34 @@ RadioGroup.defaultProps = {
|
|
4378
4467
|
};
|
4379
4468
|
|
4380
4469
|
// src/components/radio/index.ts
|
4381
|
-
var
|
4470
|
+
var import_react69 = require("@chakra-ui/react");
|
4382
4471
|
|
4383
4472
|
// src/components/rating/components/rating.tsx
|
4384
|
-
var
|
4473
|
+
var import_react70 = require("@chakra-ui/react");
|
4385
4474
|
var import_internal_icon7 = require("@ctlyst.id/internal-icon");
|
4386
4475
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
4387
4476
|
var Rating = ({ value }) => {
|
4388
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
4477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react70.Grid, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_internal_icon7.Rating, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
4389
4478
|
};
|
4390
4479
|
var rating_default = Rating;
|
4391
4480
|
|
4392
4481
|
// src/components/select/components/select.tsx
|
4393
|
-
var
|
4482
|
+
var import_react74 = require("@chakra-ui/react");
|
4394
4483
|
var import_system7 = require("@chakra-ui/system");
|
4395
4484
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4396
4485
|
var import_react_select = __toESM(require("react-select"));
|
4397
4486
|
|
4398
4487
|
// src/config/theme/foundations/shadows.ts
|
4399
|
-
var
|
4488
|
+
var import_react71 = require("@chakra-ui/react");
|
4400
4489
|
var shadows = {
|
4401
|
-
...
|
4490
|
+
...import_react71.theme.shadows,
|
4402
4491
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4403
4492
|
};
|
4404
4493
|
|
4405
4494
|
// src/config/theme/foundations/sizes.ts
|
4406
|
-
var
|
4495
|
+
var import_react72 = require("@chakra-ui/react");
|
4407
4496
|
var sizes = {
|
4408
|
-
...
|
4497
|
+
...import_react72.theme.sizes,
|
4409
4498
|
4.5: "1.125rem",
|
4410
4499
|
9.5: "2.375rem",
|
4411
4500
|
18: "4.5rem",
|
@@ -4415,9 +4504,9 @@ var sizes = {
|
|
4415
4504
|
};
|
4416
4505
|
|
4417
4506
|
// src/config/theme/foundations/spacing.ts
|
4418
|
-
var
|
4507
|
+
var import_react73 = require("@chakra-ui/react");
|
4419
4508
|
var spacing = {
|
4420
|
-
...
|
4509
|
+
...import_react73.theme.space,
|
4421
4510
|
4.5: "1.125rem",
|
4422
4511
|
9.5: "2.375rem",
|
4423
4512
|
18: "4.5rem",
|
@@ -4777,13 +4866,13 @@ function ClearIndicator(props) {
|
|
4777
4866
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.ClearIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
4778
4867
|
}
|
4779
4868
|
function MultiValue(props) {
|
4780
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react74.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4781
4870
|
}
|
4782
4871
|
function MultiValueRemove(props) {
|
4783
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react74.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
4784
4873
|
}
|
4785
4874
|
function NoOptionsMessage(props) {
|
4786
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react74.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" });
|
4787
4876
|
}
|
4788
4877
|
function Select2({
|
4789
4878
|
styles,
|
@@ -4891,7 +4980,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
4891
4980
|
}
|
4892
4981
|
|
4893
4982
|
// src/components/select/components/select-with-checkbox.tsx
|
4894
|
-
var
|
4983
|
+
var import_react75 = require("@chakra-ui/react");
|
4895
4984
|
var import_system11 = require("@chakra-ui/system");
|
4896
4985
|
var import_react_select2 = __toESM(require("react-select"));
|
4897
4986
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
@@ -4954,7 +5043,7 @@ var InputOption = ({
|
|
4954
5043
|
innerProps: props,
|
4955
5044
|
...rest,
|
4956
5045
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
4957
|
-
|
5046
|
+
import_react75.Flex,
|
4958
5047
|
{
|
4959
5048
|
alignItems: "center",
|
4960
5049
|
width: "100%",
|
@@ -4963,7 +5052,7 @@ var InputOption = ({
|
|
4963
5052
|
cursor: isDisabled ? "not-allowed" : "default",
|
4964
5053
|
children: [
|
4965
5054
|
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4966
|
-
|
5055
|
+
import_react75.Checkbox,
|
4967
5056
|
{
|
4968
5057
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
4969
5058
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -4972,14 +5061,14 @@ var InputOption = ({
|
|
4972
5061
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
4973
5062
|
}
|
4974
5063
|
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4975
|
-
|
5064
|
+
import_react75.Checkbox,
|
4976
5065
|
{
|
4977
5066
|
pointerEvents: "none",
|
4978
5067
|
isChecked: isSelected,
|
4979
5068
|
"data-test-id": "CT_component_select-checkbox_option-checkbox"
|
4980
5069
|
}
|
4981
5070
|
),
|
4982
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5071
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react75.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
4983
5072
|
]
|
4984
5073
|
}
|
4985
5074
|
)
|
@@ -5051,13 +5140,13 @@ var SelectCheckbox = (props) => {
|
|
5051
5140
|
var select_with_checkbox_default = SelectCheckbox;
|
5052
5141
|
|
5053
5142
|
// src/components/sidebar/components/sidebar.tsx
|
5054
|
-
var
|
5143
|
+
var import_react76 = require("@chakra-ui/react");
|
5055
5144
|
var import_framer_motion = require("framer-motion");
|
5056
5145
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5057
5146
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5058
5147
|
const { width = "220px" } = props;
|
5059
5148
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5060
|
-
|
5149
|
+
import_react76.Flex,
|
5061
5150
|
{
|
5062
5151
|
position: "relative",
|
5063
5152
|
as: import_framer_motion.motion.div,
|
@@ -5077,13 +5166,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5077
5166
|
Sidebar.displayName = "Sidebar";
|
5078
5167
|
|
5079
5168
|
// src/components/sidebar/components/sidebar-header.tsx
|
5080
|
-
var
|
5169
|
+
var import_react77 = require("@chakra-ui/react");
|
5081
5170
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5082
5171
|
var import_framer_motion2 = require("framer-motion");
|
5083
5172
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5084
5173
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5085
5174
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5086
|
-
|
5175
|
+
import_react77.Box,
|
5087
5176
|
{
|
5088
5177
|
px: "2",
|
5089
5178
|
color: "neutral.900",
|
@@ -5093,7 +5182,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5093
5182
|
color: "primary.500"
|
5094
5183
|
},
|
5095
5184
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5096
|
-
|
5185
|
+
import_react77.Flex,
|
5097
5186
|
{
|
5098
5187
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5099
5188
|
direction: "row",
|
@@ -5103,7 +5192,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5103
5192
|
cursor: "pointer",
|
5104
5193
|
children: [
|
5105
5194
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5106
|
-
|
5195
|
+
import_react77.Box,
|
5107
5196
|
{
|
5108
5197
|
as: import_framer_motion2.motion.div,
|
5109
5198
|
boxSize: "4",
|
@@ -5114,8 +5203,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5114
5203
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5115
5204
|
}
|
5116
5205
|
),
|
5117
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5118
|
-
|
5206
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react77.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5207
|
+
import_react77.Text,
|
5119
5208
|
{
|
5120
5209
|
as: import_framer_motion2.motion.div,
|
5121
5210
|
w: "max-content",
|
@@ -5141,32 +5230,32 @@ SidebarHeader.defaultProps = {
|
|
5141
5230
|
};
|
5142
5231
|
|
5143
5232
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5144
|
-
var
|
5233
|
+
var import_react78 = require("@chakra-ui/react");
|
5145
5234
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5146
5235
|
var import_framer_motion3 = require("framer-motion");
|
5147
5236
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5148
5237
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5149
5238
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5150
|
-
|
5239
|
+
import_react78.Box,
|
5151
5240
|
{
|
5152
5241
|
as: import_framer_motion3.motion.div,
|
5153
5242
|
transitionTimingFunction: "linear",
|
5154
5243
|
initial: { padding: "8px" },
|
5155
5244
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5156
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5157
5246
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5158
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5159
5248
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5160
5249
|
const noChild = !item.children.length;
|
5161
5250
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5162
5251
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5163
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5252
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5164
5253
|
const activeOption = isOpen ? "primary.50" : "white";
|
5165
5254
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5166
5255
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5167
5256
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5168
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5169
|
-
|
5257
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5258
|
+
import_react78.AccordionButton,
|
5170
5259
|
{
|
5171
5260
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5172
5261
|
p: "0",
|
@@ -5184,9 +5273,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5184
5273
|
position: "relative",
|
5185
5274
|
...itemStyles,
|
5186
5275
|
children: [
|
5187
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5276
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5188
5277
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5189
|
-
|
5278
|
+
import_react78.Box,
|
5190
5279
|
{
|
5191
5280
|
display: "flex",
|
5192
5281
|
w: "full",
|
@@ -5200,9 +5289,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5200
5289
|
animate: { opacity: 1, x: 0 },
|
5201
5290
|
exit: { opacity: 0, x: 16 },
|
5202
5291
|
children: [
|
5203
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5292
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5204
5293
|
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5205
|
-
|
5294
|
+
import_react78.Box,
|
5206
5295
|
{
|
5207
5296
|
display: "flex",
|
5208
5297
|
boxSize: "3",
|
@@ -5222,12 +5311,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5222
5311
|
},
|
5223
5312
|
item.id
|
5224
5313
|
) }, item.id),
|
5225
|
-
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5226
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5314
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react78.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5315
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react78.Box, { display: "flex", alignItems: "center", children: [
|
5227
5316
|
mappingIcon2.get(item.icon || ""),
|
5228
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5317
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Box, { as: "span", ml: "2", children: item.title })
|
5229
5318
|
] }) }),
|
5230
|
-
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5319
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5231
5320
|
NavItem,
|
5232
5321
|
{
|
5233
5322
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5243,7 +5332,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5243
5332
|
},
|
5244
5333
|
submenu.id
|
5245
5334
|
)) })
|
5246
|
-
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5335
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5247
5336
|
NavItem,
|
5248
5337
|
{
|
5249
5338
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5256,8 +5345,8 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5256
5345
|
rounded: "none",
|
5257
5346
|
...itemStyles,
|
5258
5347
|
children: [
|
5259
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5260
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5348
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5349
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5261
5350
|
]
|
5262
5351
|
},
|
5263
5352
|
item.id
|
@@ -5265,13 +5354,13 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5265
5354
|
] });
|
5266
5355
|
} }, item.id),
|
5267
5356
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5268
|
-
|
5357
|
+
import_react78.Fade,
|
5269
5358
|
{
|
5270
5359
|
in: true,
|
5271
5360
|
transition: {
|
5272
5361
|
enter: { duration: 0.5 }
|
5273
5362
|
},
|
5274
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react78.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5275
5364
|
NavItem,
|
5276
5365
|
{
|
5277
5366
|
mt: "1",
|
@@ -5299,16 +5388,16 @@ SidebarMenu.defaultProps = {
|
|
5299
5388
|
};
|
5300
5389
|
|
5301
5390
|
// src/components/switch/components/switch.tsx
|
5302
|
-
var
|
5391
|
+
var import_react79 = require("@chakra-ui/react");
|
5303
5392
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5304
5393
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5305
|
-
var
|
5394
|
+
var import_react80 = require("react");
|
5306
5395
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5307
|
-
var Switch = (0,
|
5308
|
-
const styles = (0,
|
5309
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
5310
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
5311
|
-
const containerStyles = (0,
|
5396
|
+
var Switch = (0, import_react79.forwardRef)(function Switch2(props, ref) {
|
5397
|
+
const styles = (0, import_react79.useMultiStyleConfig)("Switch", props);
|
5398
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react79.omitThemingProps)(props);
|
5399
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react79.useCheckbox)(ownProps);
|
5400
|
+
const containerStyles = (0, import_react80.useMemo)(
|
5312
5401
|
() => ({
|
5313
5402
|
display: "inline-block",
|
5314
5403
|
position: "relative",
|
@@ -5318,7 +5407,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5318
5407
|
}),
|
5319
5408
|
[styles.container]
|
5320
5409
|
);
|
5321
|
-
const trackStyles = (0,
|
5410
|
+
const trackStyles = (0, import_react80.useMemo)(
|
5322
5411
|
() => ({
|
5323
5412
|
display: "inline-flex",
|
5324
5413
|
flexShrink: 0,
|
@@ -5330,7 +5419,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5330
5419
|
}),
|
5331
5420
|
[styles.track]
|
5332
5421
|
);
|
5333
|
-
const labelStyles = (0,
|
5422
|
+
const labelStyles = (0, import_react80.useMemo)(
|
5334
5423
|
() => ({
|
5335
5424
|
userSelect: "none",
|
5336
5425
|
marginStart: spacing2,
|
@@ -5347,7 +5436,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5347
5436
|
return iconSize[value];
|
5348
5437
|
};
|
5349
5438
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5350
|
-
|
5439
|
+
import_react79.chakra.label,
|
5351
5440
|
{
|
5352
5441
|
...getRootProps(),
|
5353
5442
|
display: "flex",
|
@@ -5356,13 +5445,13 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5356
5445
|
__css: containerStyles,
|
5357
5446
|
children: [
|
5358
5447
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5359
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5360
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5448
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react79.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5449
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react79.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5361
5450
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5362
5451
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5363
5452
|
] }),
|
5364
5453
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5365
|
-
|
5454
|
+
import_react79.chakra.span,
|
5366
5455
|
{
|
5367
5456
|
__css: styles.thumb,
|
5368
5457
|
className: "chakra-switch__thumb",
|
@@ -5372,7 +5461,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5372
5461
|
)
|
5373
5462
|
] }),
|
5374
5463
|
children && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5375
|
-
|
5464
|
+
import_react79.chakra.span,
|
5376
5465
|
{
|
5377
5466
|
className: "chakra-switch__label",
|
5378
5467
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5392,18 +5481,18 @@ Switch.defaultProps = {
|
|
5392
5481
|
var switch_default = Switch;
|
5393
5482
|
|
5394
5483
|
// src/components/table/index.tsx
|
5395
|
-
var
|
5484
|
+
var import_react81 = require("@chakra-ui/react");
|
5396
5485
|
|
5397
5486
|
// src/components/tabs/components/tab.tsx
|
5398
|
-
var
|
5487
|
+
var import_react82 = require("@chakra-ui/react");
|
5399
5488
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5400
|
-
var Tab = (0,
|
5489
|
+
var Tab = (0, import_react82.forwardRef)((props, ref) => {
|
5401
5490
|
var _a, _b;
|
5402
|
-
const tabProps = (0,
|
5491
|
+
const tabProps = (0, import_react82.useTab)({ ...props, ref });
|
5403
5492
|
const isSelected = !!tabProps["aria-selected"];
|
5404
|
-
const styles = (0,
|
5493
|
+
const styles = (0, import_react82.useMultiStyleConfig)("Tabs", tabProps);
|
5405
5494
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5406
|
-
|
5495
|
+
import_react82.Button,
|
5407
5496
|
{
|
5408
5497
|
"data-test-id": props["data-test-id"],
|
5409
5498
|
p: 4,
|
@@ -5428,7 +5517,7 @@ var Tab = (0, import_react81.forwardRef)((props, ref) => {
|
|
5428
5517
|
},
|
5429
5518
|
__css: styles.tab,
|
5430
5519
|
...tabProps,
|
5431
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5520
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react82.Flex, { alignItems: "center", children: [
|
5432
5521
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5433
5522
|
tabProps.children,
|
5434
5523
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5439,39 +5528,39 @@ var Tab = (0, import_react81.forwardRef)((props, ref) => {
|
|
5439
5528
|
var tab_default = Tab;
|
5440
5529
|
|
5441
5530
|
// src/components/tabs/index.ts
|
5442
|
-
var
|
5531
|
+
var import_react83 = require("@chakra-ui/react");
|
5443
5532
|
|
5444
5533
|
// src/components/text/index.ts
|
5445
|
-
var
|
5534
|
+
var import_react84 = require("@chakra-ui/react");
|
5446
5535
|
|
5447
5536
|
// src/components/time-input/components/index.tsx
|
5448
|
-
var
|
5537
|
+
var import_react86 = require("@chakra-ui/react");
|
5449
5538
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5450
|
-
var
|
5539
|
+
var import_react87 = require("react");
|
5451
5540
|
|
5452
5541
|
// src/components/time-input/components/integration.tsx
|
5453
5542
|
var import_timescape = require("@zamiru/timescape");
|
5454
5543
|
var import_timescape2 = require("@zamiru/timescape");
|
5455
|
-
var
|
5544
|
+
var import_react85 = require("react");
|
5456
5545
|
var useTimescape = (options = {}) => {
|
5457
5546
|
var _a;
|
5458
5547
|
const { date, onChangeDate, ...rest } = options;
|
5459
|
-
const [manager] = (0,
|
5460
|
-
const onChangeDateRef = (0,
|
5461
|
-
(0,
|
5548
|
+
const [manager] = (0, import_react85.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5549
|
+
const onChangeDateRef = (0, import_react85.useRef)(onChangeDate);
|
5550
|
+
(0, import_react85.useLayoutEffect)(() => {
|
5462
5551
|
onChangeDateRef.current = onChangeDate;
|
5463
5552
|
}, [onChangeDate]);
|
5464
|
-
const [optionsState, update] = (0,
|
5553
|
+
const [optionsState, update] = (0, import_react85.useState)(() => ({
|
5465
5554
|
date,
|
5466
5555
|
...rest
|
5467
5556
|
}));
|
5468
|
-
(0,
|
5557
|
+
(0, import_react85.useEffect)(() => {
|
5469
5558
|
manager.resync();
|
5470
5559
|
return () => {
|
5471
5560
|
manager.remove();
|
5472
5561
|
};
|
5473
5562
|
}, [manager]);
|
5474
|
-
(0,
|
5563
|
+
(0, import_react85.useEffect)(() => {
|
5475
5564
|
return manager.on("changeDate", (nextDate) => {
|
5476
5565
|
var _a2;
|
5477
5566
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5479,7 +5568,7 @@ var useTimescape = (options = {}) => {
|
|
5479
5568
|
});
|
5480
5569
|
}, [manager]);
|
5481
5570
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5482
|
-
(0,
|
5571
|
+
(0, import_react85.useEffect)(() => {
|
5483
5572
|
manager.date = timestamp;
|
5484
5573
|
manager.minDate = optionsState.minDate;
|
5485
5574
|
manager.maxDate = optionsState.maxDate;
|
@@ -5545,9 +5634,9 @@ var timeFromString = (timeString) => {
|
|
5545
5634
|
const [hours, minutes, seconds] = timeString.split(":");
|
5546
5635
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5547
5636
|
};
|
5548
|
-
var InputTimeArea = (0,
|
5637
|
+
var InputTimeArea = (0, import_react86.forwardRef)((props, ref) => {
|
5549
5638
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5550
|
-
|
5639
|
+
import_react86.Input,
|
5551
5640
|
{
|
5552
5641
|
_focusWithin: {
|
5553
5642
|
bg: "neutral.300"
|
@@ -5565,7 +5654,7 @@ var InputTimeArea = (0, import_react85.forwardRef)((props, ref) => {
|
|
5565
5654
|
}
|
5566
5655
|
);
|
5567
5656
|
});
|
5568
|
-
var TimeInput2 = (0,
|
5657
|
+
var TimeInput2 = (0, import_react86.forwardRef)(
|
5569
5658
|
({
|
5570
5659
|
name,
|
5571
5660
|
config: config2,
|
@@ -5592,7 +5681,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5592
5681
|
date,
|
5593
5682
|
...config2
|
5594
5683
|
});
|
5595
|
-
(0,
|
5684
|
+
(0, import_react87.useEffect)(() => {
|
5596
5685
|
var _a, _b, _c, _d, _e, _f;
|
5597
5686
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5598
5687
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5601,7 +5690,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5601
5690
|
onChangeTime(timeValue);
|
5602
5691
|
}
|
5603
5692
|
}, [options.date]);
|
5604
|
-
(0,
|
5693
|
+
(0, import_react87.useImperativeHandle)(ref, () => ({
|
5605
5694
|
focus() {
|
5606
5695
|
_manager.focusField("hours");
|
5607
5696
|
}
|
@@ -5622,7 +5711,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5622
5711
|
};
|
5623
5712
|
};
|
5624
5713
|
const { outlineColor, focusColor } = getProperties();
|
5625
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react86.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5626
5715
|
field_default,
|
5627
5716
|
{
|
5628
5717
|
isError,
|
@@ -5632,7 +5721,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5632
5721
|
isDisabled,
|
5633
5722
|
isSuccess,
|
5634
5723
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5635
|
-
|
5724
|
+
import_react86.Box,
|
5636
5725
|
{
|
5637
5726
|
transition: "all 0.15s",
|
5638
5727
|
boxShadow: "none",
|
@@ -5643,7 +5732,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5643
5732
|
borderColor: focusColor
|
5644
5733
|
},
|
5645
5734
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5646
|
-
|
5735
|
+
import_react86.InputGroup,
|
5647
5736
|
{
|
5648
5737
|
borderRadius: "sm",
|
5649
5738
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5652,7 +5741,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5652
5741
|
gap: 3,
|
5653
5742
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5654
5743
|
children: [
|
5655
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5744
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react86.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5656
5745
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5657
5746
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5658
5747
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
@@ -5660,7 +5749,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5660
5749
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5661
5750
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5662
5751
|
] }),
|
5663
|
-
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5752
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react86.Input, { p: 0, ...getInputProps("am/pm") })
|
5664
5753
|
] }),
|
5665
5754
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5666
5755
|
addOnRight
|
@@ -5675,16 +5764,16 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5675
5764
|
);
|
5676
5765
|
|
5677
5766
|
// src/components/toast/components/toast.tsx
|
5678
|
-
var
|
5767
|
+
var import_react89 = require("@chakra-ui/react");
|
5679
5768
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5680
5769
|
var import_react_toastify = require("react-toastify");
|
5681
5770
|
|
5682
5771
|
// src/components/toast/components/styles.tsx
|
5683
|
-
var
|
5772
|
+
var import_react88 = require("@emotion/react");
|
5684
5773
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5685
5774
|
var Styles2 = () => {
|
5686
5775
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5687
|
-
|
5776
|
+
import_react88.Global,
|
5688
5777
|
{
|
5689
5778
|
styles: `
|
5690
5779
|
.Toastify__toast-container {
|
@@ -5718,7 +5807,7 @@ var styles_default2 = Styles2;
|
|
5718
5807
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5719
5808
|
var CustomCloseButton = (props) => {
|
5720
5809
|
const { closeToast } = props;
|
5721
|
-
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react89.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
|
5722
5811
|
};
|
5723
5812
|
var DEFAULT_OPTIONS = {
|
5724
5813
|
position: "top-right",
|
@@ -5741,7 +5830,7 @@ var renderIcon = (icon, type) => {
|
|
5741
5830
|
return icon;
|
5742
5831
|
};
|
5743
5832
|
var useToast = () => {
|
5744
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
5833
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react89.useToken)("colors", [
|
5745
5834
|
"primary.500",
|
5746
5835
|
"neutral.500",
|
5747
5836
|
"info.500",
|
@@ -5752,13 +5841,13 @@ var useToast = () => {
|
|
5752
5841
|
const content = (icon, message, link) => {
|
5753
5842
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5754
5843
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(styles_default2, {}),
|
5755
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5756
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5757
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5758
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5844
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react89.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, children: [
|
5845
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react89.Flex, { alignItems: "center", children: [
|
5846
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react89.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
5847
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react89.chakra.span, { noOfLines: 2, children: message })
|
5759
5848
|
] }),
|
5760
5849
|
link && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5761
|
-
|
5850
|
+
import_react89.Link,
|
5762
5851
|
{
|
5763
5852
|
href: link.url,
|
5764
5853
|
textDecoration: "underline",
|
@@ -5837,9 +5926,9 @@ var useToast = () => {
|
|
5837
5926
|
var import_react_toastify2 = require("react-toastify");
|
5838
5927
|
|
5839
5928
|
// src/components/uploader/components/uploader.tsx
|
5840
|
-
var
|
5929
|
+
var import_react90 = require("@chakra-ui/react");
|
5841
5930
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
5842
|
-
var
|
5931
|
+
var import_react91 = require("react");
|
5843
5932
|
var import_react_dropzone = require("react-dropzone");
|
5844
5933
|
|
5845
5934
|
// src/components/uploader/constants.ts
|
@@ -5938,9 +6027,9 @@ var Uploader = ({
|
|
5938
6027
|
validatorExt,
|
5939
6028
|
...props
|
5940
6029
|
}) => {
|
5941
|
-
const [filePreview, setFilePreview] = (0,
|
6030
|
+
const [filePreview, setFilePreview] = (0, import_react91.useState)();
|
5942
6031
|
const toast2 = useToast();
|
5943
|
-
const handleRejection = (0,
|
6032
|
+
const handleRejection = (0, import_react91.useCallback)(
|
5944
6033
|
(message, file, image) => {
|
5945
6034
|
if (onHandleRejections) {
|
5946
6035
|
onHandleRejections(file, image);
|
@@ -5950,7 +6039,7 @@ var Uploader = ({
|
|
5950
6039
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
5951
6040
|
[onHandleRejections]
|
5952
6041
|
);
|
5953
|
-
const onDropAccepted = (0,
|
6042
|
+
const onDropAccepted = (0, import_react91.useCallback)(
|
5954
6043
|
(files) => {
|
5955
6044
|
const file = files[0];
|
5956
6045
|
const imageUrl = URL.createObjectURL(file);
|
@@ -5973,10 +6062,10 @@ var Uploader = ({
|
|
5973
6062
|
},
|
5974
6063
|
[acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
|
5975
6064
|
);
|
5976
|
-
const onDropRejected = (0,
|
6065
|
+
const onDropRejected = (0, import_react91.useCallback)((fileRejections) => {
|
5977
6066
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
5978
6067
|
}, []);
|
5979
|
-
const validator = (0,
|
6068
|
+
const validator = (0, import_react91.useCallback)(
|
5980
6069
|
(file) => {
|
5981
6070
|
const result = [];
|
5982
6071
|
if (validatorExt) {
|
@@ -6006,26 +6095,26 @@ var Uploader = ({
|
|
6006
6095
|
const renderHelperText = () => {
|
6007
6096
|
if (Array.isArray(helperText)) {
|
6008
6097
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6009
|
-
|
6098
|
+
import_react90.UnorderedList,
|
6010
6099
|
{
|
6011
6100
|
pl: 2,
|
6012
6101
|
fontSize: 12,
|
6013
6102
|
color: "black.medium",
|
6014
6103
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6015
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6104
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.ListItem, { children: text2 }, text2))
|
6016
6105
|
}
|
6017
6106
|
);
|
6018
6107
|
}
|
6019
6108
|
return helperText;
|
6020
6109
|
};
|
6021
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6110
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6022
6111
|
const handleRemove = (e) => {
|
6023
6112
|
e.stopPropagation();
|
6024
6113
|
setFilePreview(void 0);
|
6025
6114
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6026
6115
|
acceptedFiles.pop();
|
6027
6116
|
};
|
6028
|
-
(0,
|
6117
|
+
(0, import_react91.useEffect)(() => {
|
6029
6118
|
if (value) {
|
6030
6119
|
if (typeof value === "string") {
|
6031
6120
|
setFilePreview(value);
|
@@ -6041,16 +6130,16 @@ var Uploader = ({
|
|
6041
6130
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6042
6131
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6043
6132
|
const cursorType = filePreview ? "initial" : "pointer";
|
6044
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react90.FormControl, { isRequired, children: [
|
6045
6134
|
label && typeof label === "string" ? (
|
6046
6135
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6047
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6048
|
-
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6136
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react90.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, {}), fontSize: "text.sm", children: [
|
6137
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.RequiredIndicator, { mr: 1, ml: 0 }),
|
6049
6138
|
label
|
6050
6139
|
] })
|
6051
6140
|
) : label,
|
6052
6141
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6053
|
-
|
6142
|
+
import_react90.Flex,
|
6054
6143
|
{
|
6055
6144
|
minH: containerHeight,
|
6056
6145
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6067,8 +6156,8 @@ var Uploader = ({
|
|
6067
6156
|
...props,
|
6068
6157
|
...getRootProps(),
|
6069
6158
|
children: [
|
6070
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6071
|
-
|
6159
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6160
|
+
import_react90.Button,
|
6072
6161
|
{
|
6073
6162
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6074
6163
|
"aria-label": "remove-image",
|
@@ -6085,15 +6174,15 @@ var Uploader = ({
|
|
6085
6174
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6086
6175
|
}
|
6087
6176
|
) }),
|
6088
|
-
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6089
|
-
|
6177
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6178
|
+
import_react90.Flex,
|
6090
6179
|
{
|
6091
6180
|
position: "relative",
|
6092
6181
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6093
6182
|
justify: "center",
|
6094
6183
|
align: "center",
|
6095
6184
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6096
|
-
|
6185
|
+
import_react90.Image,
|
6097
6186
|
{
|
6098
6187
|
h: size2 === "lg" ? "120" : "100",
|
6099
6188
|
src: filePreview,
|
@@ -6103,11 +6192,11 @@ var Uploader = ({
|
|
6103
6192
|
)
|
6104
6193
|
}
|
6105
6194
|
) }),
|
6106
|
-
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6195
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react90.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6107
6196
|
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6108
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6197
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react90.Box, { children: [
|
6109
6198
|
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6110
|
-
|
6199
|
+
import_react90.Heading,
|
6111
6200
|
{
|
6112
6201
|
fontWeight: "400",
|
6113
6202
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6116,7 +6205,7 @@ var Uploader = ({
|
|
6116
6205
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6117
6206
|
}
|
6118
6207
|
),
|
6119
|
-
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6208
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6120
6209
|
] })
|
6121
6210
|
] }) })
|
6122
6211
|
]
|
@@ -6129,8 +6218,8 @@ var Uploader = ({
|
|
6129
6218
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6130
6219
|
}
|
6131
6220
|
),
|
6132
|
-
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6133
|
-
|
6221
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react90.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6222
|
+
import_react90.Button,
|
6134
6223
|
{
|
6135
6224
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6136
6225
|
type: "button",
|
@@ -6176,10 +6265,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6176
6265
|
};
|
6177
6266
|
|
6178
6267
|
// src/components/index.ts
|
6179
|
-
var
|
6268
|
+
var import_react92 = require("@chakra-ui/react");
|
6180
6269
|
|
6181
6270
|
// src/config/theme/themeConfiguration.ts
|
6182
|
-
var
|
6271
|
+
var import_react100 = require("@chakra-ui/react");
|
6183
6272
|
|
6184
6273
|
// src/config/theme/components/index.ts
|
6185
6274
|
var components_exports = {};
|
@@ -6736,8 +6825,8 @@ var card_default2 = CardStyle;
|
|
6736
6825
|
|
6737
6826
|
// src/config/theme/components/checkbox.ts
|
6738
6827
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
6739
|
-
var
|
6740
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
6828
|
+
var import_react93 = require("@chakra-ui/react");
|
6829
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react93.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
6741
6830
|
var baseStyle3 = definePartsStyle3({
|
6742
6831
|
control: {
|
6743
6832
|
borderRadius: "sm",
|
@@ -6838,8 +6927,8 @@ var checkbox_default2 = Checkbox4;
|
|
6838
6927
|
|
6839
6928
|
// src/config/theme/components/chips.ts
|
6840
6929
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
6841
|
-
var
|
6842
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
6930
|
+
var import_react94 = require("@chakra-ui/react");
|
6931
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react94.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
6843
6932
|
var baseStyle4 = definePartsStyle4({
|
6844
6933
|
container: {
|
6845
6934
|
px: 3,
|
@@ -7048,8 +7137,8 @@ var input_default = Input4;
|
|
7048
7137
|
|
7049
7138
|
// src/config/theme/components/loader.ts
|
7050
7139
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7051
|
-
var
|
7052
|
-
var rotate = (0,
|
7140
|
+
var import_react95 = require("@emotion/react");
|
7141
|
+
var rotate = (0, import_react95.keyframes)({
|
7053
7142
|
"0%": {
|
7054
7143
|
transform: "rotate(0deg)"
|
7055
7144
|
},
|
@@ -7231,8 +7320,8 @@ var modal_default = modalTheme;
|
|
7231
7320
|
|
7232
7321
|
// src/config/theme/components/popover.ts
|
7233
7322
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7234
|
-
var
|
7235
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
7323
|
+
var import_react96 = require("@chakra-ui/react");
|
7324
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react96.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
7236
7325
|
var baseStyle8 = definePartsStyle7({
|
7237
7326
|
content: {
|
7238
7327
|
bg: "white"
|
@@ -7243,8 +7332,8 @@ var popover_default = popoverTheme;
|
|
7243
7332
|
|
7244
7333
|
// src/config/theme/components/radio.ts
|
7245
7334
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7246
|
-
var
|
7247
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
7335
|
+
var import_react97 = require("@chakra-ui/react");
|
7336
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react97.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
7248
7337
|
var baseStyle9 = definePartsStyle8({
|
7249
7338
|
control: {
|
7250
7339
|
border: "1px solid",
|
@@ -7666,7 +7755,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7666
7755
|
var tabs_default = tabsTheme;
|
7667
7756
|
|
7668
7757
|
// src/config/theme/components/textarea.ts
|
7669
|
-
var
|
7758
|
+
var import_react98 = require("@chakra-ui/react");
|
7670
7759
|
var getProps = (props) => {
|
7671
7760
|
const { isError, isSuccess, isDisabled } = props;
|
7672
7761
|
let borderColor = "neutral.400";
|
@@ -7686,7 +7775,7 @@ var getProps = (props) => {
|
|
7686
7775
|
borderColor
|
7687
7776
|
};
|
7688
7777
|
};
|
7689
|
-
var outline3 = (0,
|
7778
|
+
var outline3 = (0, import_react98.defineStyle)((props) => {
|
7690
7779
|
const { focusBorderColor, borderColor } = getProps(props);
|
7691
7780
|
return {
|
7692
7781
|
background: "white.high",
|
@@ -7730,7 +7819,7 @@ var outline3 = (0, import_react97.defineStyle)((props) => {
|
|
7730
7819
|
}
|
7731
7820
|
};
|
7732
7821
|
});
|
7733
|
-
var Textarea = (0,
|
7822
|
+
var Textarea = (0, import_react98.defineStyleConfig)({
|
7734
7823
|
variants: { outline: outline3 },
|
7735
7824
|
defaultProps: {
|
7736
7825
|
variant: "outline"
|
@@ -7739,15 +7828,15 @@ var Textarea = (0, import_react97.defineStyleConfig)({
|
|
7739
7828
|
var textarea_default2 = Textarea;
|
7740
7829
|
|
7741
7830
|
// src/config/theme/components/tooltip.ts
|
7742
|
-
var
|
7743
|
-
var $arrowBg = (0,
|
7831
|
+
var import_react99 = require("@chakra-ui/react");
|
7832
|
+
var $arrowBg = (0, import_react99.cssVar)("popper-arrow-bg");
|
7744
7833
|
var baseStyle12 = {
|
7745
7834
|
bg: "neutral.700",
|
7746
7835
|
textStyle: "text.sm",
|
7747
7836
|
fontSize: "text.sm",
|
7748
7837
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
7749
7838
|
};
|
7750
|
-
var Tooltip2 = (0,
|
7839
|
+
var Tooltip2 = (0, import_react99.defineStyleConfig)({ baseStyle: baseStyle12 });
|
7751
7840
|
var tooltip_default = Tooltip2;
|
7752
7841
|
|
7753
7842
|
// src/config/theme/themeConfiguration.ts
|
@@ -7766,7 +7855,7 @@ var createExtendTheme = (theme5) => {
|
|
7766
7855
|
return function extendTheme2(...extensions) {
|
7767
7856
|
let overrides = [...extensions];
|
7768
7857
|
let activeTheme = extensions[extensions.length - 1];
|
7769
|
-
if ((0,
|
7858
|
+
if ((0, import_react100.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
7770
7859
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
7771
7860
|
overrides.length > 1) {
|
7772
7861
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -7775,13 +7864,13 @@ var createExtendTheme = (theme5) => {
|
|
7775
7864
|
}
|
7776
7865
|
return pipe(
|
7777
7866
|
...overrides.map(
|
7778
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
7867
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react100.mergeThemeOverride)(prevTheme, extension)
|
7779
7868
|
)
|
7780
7869
|
)(activeTheme);
|
7781
7870
|
};
|
7782
7871
|
};
|
7783
7872
|
var getTheme = (foundations) => {
|
7784
|
-
return (0,
|
7873
|
+
return (0, import_react100.extendTheme)({
|
7785
7874
|
...foundations,
|
7786
7875
|
components: {
|
7787
7876
|
...components_exports
|
@@ -7798,7 +7887,7 @@ var getTheme = (foundations) => {
|
|
7798
7887
|
config
|
7799
7888
|
});
|
7800
7889
|
};
|
7801
|
-
var theme4 = (0,
|
7890
|
+
var theme4 = (0, import_react100.extendTheme)({
|
7802
7891
|
components: {
|
7803
7892
|
...components_exports
|
7804
7893
|
},
|
@@ -7818,23 +7907,23 @@ var theme4 = (0, import_react99.extendTheme)({
|
|
7818
7907
|
|
7819
7908
|
// src/hooks/useFetcher.ts
|
7820
7909
|
var import_axios2 = __toESM(require("axios"));
|
7821
|
-
var
|
7910
|
+
var import_react103 = require("react");
|
7822
7911
|
|
7823
7912
|
// src/provider/components/provider.tsx
|
7824
7913
|
var import_axios = __toESM(require("axios"));
|
7825
|
-
var
|
7914
|
+
var import_react101 = require("react");
|
7826
7915
|
var import_react_toastify3 = require("react-toastify");
|
7827
7916
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
7828
|
-
var ProviderContext = (0,
|
7917
|
+
var ProviderContext = (0, import_react101.createContext)({
|
7829
7918
|
instance: void 0
|
7830
7919
|
});
|
7831
7920
|
var useInternalUI = () => {
|
7832
|
-
const { instance } = (0,
|
7921
|
+
const { instance } = (0, import_react101.useContext)(ProviderContext);
|
7833
7922
|
return { instance };
|
7834
7923
|
};
|
7835
7924
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
7836
|
-
const instanceRef = (0,
|
7837
|
-
(0,
|
7925
|
+
const instanceRef = (0, import_react101.useRef)(import_axios.default.create(config2));
|
7926
|
+
(0, import_react101.useEffect)(() => {
|
7838
7927
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
7839
7928
|
instanceRef.current.interceptors.request.use(interceptor);
|
7840
7929
|
});
|
@@ -7842,7 +7931,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
7842
7931
|
instanceRef.current.interceptors.response.use(interceptor);
|
7843
7932
|
});
|
7844
7933
|
}, [requestInterceptors, responseInterceptors]);
|
7845
|
-
const provider = (0,
|
7934
|
+
const provider = (0, import_react101.useMemo)(() => ({ instance: instanceRef.current }), []);
|
7846
7935
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
7847
7936
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_toastify3.ToastContainer, {}),
|
7848
7937
|
children
|
@@ -7852,12 +7941,12 @@ Provider.displayName = "Provider";
|
|
7852
7941
|
var provider_default = Provider;
|
7853
7942
|
|
7854
7943
|
// src/provider/index.ts
|
7855
|
-
var
|
7944
|
+
var import_react102 = require("@chakra-ui/react");
|
7856
7945
|
|
7857
7946
|
// src/hooks/useFetcher.ts
|
7858
7947
|
function useFetcher() {
|
7859
7948
|
const { instance } = useInternalUI();
|
7860
|
-
const axiosInstance = (0,
|
7949
|
+
const axiosInstance = (0, import_react103.useMemo)(() => instance || import_axios2.default, [instance]);
|
7861
7950
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
7862
7951
|
const response = await axiosInstance.request({
|
7863
7952
|
data,
|
@@ -7877,10 +7966,10 @@ function useFetcher() {
|
|
7877
7966
|
}
|
7878
7967
|
|
7879
7968
|
// src/hooks/index.ts
|
7880
|
-
var
|
7969
|
+
var import_react104 = require("@chakra-ui/react");
|
7881
7970
|
|
7882
7971
|
// src/index.ts
|
7883
|
-
var
|
7972
|
+
var import_react105 = require("@chakra-ui/react");
|
7884
7973
|
// Annotate the CommonJS export names for ESM import in node:
|
7885
7974
|
0 && (module.exports = {
|
7886
7975
|
Accordion,
|