@ctlyst.id/internal-ui 4.3.2 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +718 -617
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +155 -55
- 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_react56.AlertDialog,
|
49
|
+
AlertDialogBody: () => import_react56.ModalBody,
|
50
|
+
AlertDialogCloseButton: () => import_react56.ModalCloseButton,
|
51
|
+
AlertDialogContent: () => import_react56.AlertDialogContent,
|
52
|
+
AlertDialogFooter: () => import_react56.ModalFooter,
|
53
|
+
AlertDialogHeader: () => import_react56.ModalHeader,
|
54
|
+
AlertDialogOverlay: () => import_react56.ModalOverlay,
|
55
|
+
AlertDialogProps: () => import_react56.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_react93.Avatar,
|
60
|
+
AvatarBadge: () => import_react93.AvatarBadge,
|
61
|
+
AvatarBadgeProps: () => import_react93.AvatarBadgeProps,
|
62
|
+
AvatarGroup: () => import_react93.AvatarGroup,
|
63
|
+
AvatarGroupProps: () => import_react93.AvatarGroupProps,
|
64
|
+
AvatarProps: () => import_react93.AvatarProps,
|
65
65
|
Badge: () => badge_default,
|
66
|
-
Box: () =>
|
67
|
-
BoxProps: () =>
|
66
|
+
Box: () => import_react53.Box,
|
67
|
+
BoxProps: () => import_react53.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_react53.Center,
|
75
|
+
ChakraProvider: () => import_react103.ChakraProvider,
|
76
|
+
ChakraProviderProps: () => import_react103.ChakraProviderProps,
|
77
|
+
ChakraTable: () => import_react82.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_react85.Code,
|
90
|
+
CodeProps: () => import_react85.CodeProps,
|
91
|
+
Collapse: () => import_react93.Collapse,
|
92
|
+
CollapseProps: () => import_react93.CollapseProps,
|
93
|
+
ColorMode: () => import_react103.ColorMode,
|
94
|
+
ColorModeScript: () => import_react103.ColorModeScript,
|
95
|
+
ColorModeScriptProps: () => import_react103.ColorModeScriptProps,
|
96
|
+
Container: () => import_react53.Container,
|
97
|
+
ContainerProps: () => import_react53.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_react53.Divider,
|
104
|
+
DividerProps: () => import_react53.DividerProps,
|
105
|
+
Drawer: () => import_react56.Drawer,
|
106
|
+
DrawerBody: () => import_react56.ModalBody,
|
107
|
+
DrawerCloseButton: () => import_react56.ModalCloseButton,
|
108
|
+
DrawerContent: () => import_react56.DrawerContent,
|
109
|
+
DrawerContentProps: () => import_react56.DrawerContentProps,
|
110
|
+
DrawerFooter: () => import_react56.ModalFooter,
|
111
|
+
DrawerHeader: () => import_react56.ModalHeader,
|
112
|
+
DrawerOverlay: () => import_react56.ModalOverlay,
|
113
|
+
DrawerProps: () => import_react56.DrawerProps,
|
114
114
|
DropdownIndicator: () => DropdownIndicator,
|
115
115
|
EmptyState: () => empty_state_default,
|
116
116
|
ErrorCode: () => error_code_default,
|
117
|
-
Fade: () =>
|
118
|
-
FadeProps: () =>
|
117
|
+
Fade: () => import_react93.Fade,
|
118
|
+
FadeProps: () => import_react93.FadeProps,
|
119
119
|
Field: () => field_default,
|
120
|
-
Flex: () =>
|
121
|
-
FlexProps: () =>
|
120
|
+
Flex: () => import_react53.Flex,
|
121
|
+
FlexProps: () => import_react53.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_react53.Grid,
|
129
|
+
GridItem: () => import_react53.GridItem,
|
130
|
+
GridItemProps: () => import_react53.GridItemProps,
|
131
|
+
GridProps: () => import_react53.GridProps,
|
132
|
+
HStack: () => import_react53.HStack,
|
133
133
|
Header: () => Header,
|
134
|
-
Heading: () =>
|
135
|
-
HeadingProps: () =>
|
136
|
-
Hide: () =>
|
137
|
-
HideProps: () =>
|
138
|
-
Icon: () =>
|
134
|
+
Heading: () => import_react85.Heading,
|
135
|
+
HeadingProps: () => import_react85.HeadingProps,
|
136
|
+
Hide: () => import_react93.Hide,
|
137
|
+
HideProps: () => import_react93.HideProps,
|
138
|
+
Icon: () => import_react52.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_react52.IconProps,
|
142
|
+
Image: () => import_react52.Image,
|
143
|
+
ImageProps: () => import_react52.ImageProps,
|
144
|
+
Img: () => import_react93.Img,
|
145
|
+
ImgProps: () => import_react93.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_react85.Link,
|
163
|
+
LinkProps: () => import_react85.LinkProps,
|
164
|
+
List: () => import_react54.List,
|
165
|
+
ListIcon: () => import_react54.ListIcon,
|
166
|
+
ListItem: () => import_react54.ListItem,
|
167
|
+
ListItemProps: () => import_react54.ListItemProps,
|
168
|
+
ListProps: () => import_react54.ListProps,
|
169
169
|
Loader: () => loader_default,
|
170
170
|
Logo: () => Logo,
|
171
171
|
MainMenu: () => navigation_default,
|
172
|
-
Modal: () =>
|
172
|
+
Modal: () => import_react56.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_react56.ModalBody,
|
175
|
+
ModalBodyProps: () => import_react56.ModalBodyProps,
|
176
|
+
ModalCloseButton: () => import_react56.ModalCloseButton,
|
177
|
+
ModalContent: () => import_react56.ModalContent,
|
178
|
+
ModalContentProps: () => import_react56.ModalContentProps,
|
179
|
+
ModalContextProvider: () => import_react56.ModalContextProvider,
|
180
|
+
ModalFocusScope: () => import_react56.ModalFocusScope,
|
181
|
+
ModalFooter: () => import_react56.ModalFooter,
|
182
|
+
ModalFooterProps: () => import_react56.ModalFooterProps,
|
183
|
+
ModalHeader: () => import_react56.ModalHeader,
|
184
|
+
ModalHeaderProps: () => import_react56.ModalHeaderProps,
|
185
|
+
ModalOverlay: () => import_react56.ModalOverlay,
|
186
|
+
ModalOverlayProps: () => import_react56.ModalOverlayProps,
|
187
|
+
ModalProps: () => import_react56.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_react54.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_react65.PinInput,
|
200
|
+
PinInputContext: () => import_react65.PinInputContext,
|
201
|
+
PinInputDescendantsProvider: () => import_react65.PinInputDescendantsProvider,
|
202
|
+
PinInputField: () => import_react65.PinInputField,
|
203
|
+
PinInputFieldProps: () => import_react65.PinInputFieldProps,
|
204
|
+
PinInputProps: () => import_react65.PinInputProps,
|
205
|
+
PinInputProvider: () => import_react65.PinInputProvider,
|
206
|
+
Popover: () => import_react66.Popover,
|
207
|
+
PopoverAnchor: () => import_react66.PopoverAnchor,
|
208
|
+
PopoverArrow: () => import_react66.PopoverArrow,
|
209
|
+
PopoverArrowProps: () => import_react66.PopoverArrowProps,
|
210
|
+
PopoverBody: () => import_react66.PopoverBody,
|
211
|
+
PopoverBodyProps: () => import_react66.PopoverBodyProps,
|
212
|
+
PopoverCloseButton: () => import_react66.PopoverCloseButton,
|
213
|
+
PopoverContent: () => import_react66.PopoverContent,
|
214
|
+
PopoverContentProps: () => import_react66.PopoverContentProps,
|
215
|
+
PopoverFooter: () => import_react66.PopoverFooter,
|
216
|
+
PopoverFooterProps: () => import_react66.PopoverFooterProps,
|
217
|
+
PopoverHeader: () => import_react66.PopoverHeader,
|
218
|
+
PopoverHeaderProps: () => import_react66.PopoverHeaderProps,
|
219
|
+
PopoverProps: () => import_react66.PopoverProps,
|
220
|
+
PopoverTrigger: () => import_react66.PopoverTrigger,
|
221
|
+
Portal: () => import_react66.Portal,
|
222
|
+
PortalProps: () => import_react66.PortalProps,
|
223
223
|
Profile: () => Profile,
|
224
|
-
Progress: () =>
|
225
|
-
ProgressFilledTrackProps: () =>
|
226
|
-
ProgressLabel: () =>
|
227
|
-
ProgressLabelProps: () =>
|
228
|
-
ProgressProps: () =>
|
229
|
-
ProgressTrackProps: () =>
|
224
|
+
Progress: () => import_react67.Progress,
|
225
|
+
ProgressFilledTrackProps: () => import_react67.ProgressFilledTrackProps,
|
226
|
+
ProgressLabel: () => import_react67.ProgressLabel,
|
227
|
+
ProgressLabelProps: () => import_react67.ProgressLabelProps,
|
228
|
+
ProgressProps: () => import_react67.ProgressProps,
|
229
|
+
ProgressTrackProps: () => import_react67.ProgressTrackProps,
|
230
230
|
Provider: () => provider_default,
|
231
231
|
ProviderContext: () => ProviderContext,
|
232
232
|
Radio: () => Radio,
|
233
233
|
RadioGroup: () => RadioGroup,
|
234
|
-
RadioGroupContext: () =>
|
234
|
+
RadioGroupContext: () => import_react70.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_react93.ScaleFade,
|
239
|
+
ScaleFadeProps: () => import_react93.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_react93.Show,
|
246
|
+
ShowProps: () => import_react93.ShowProps,
|
247
247
|
Sidebar: () => Sidebar,
|
248
248
|
SidebarHeader: () => SidebarHeader,
|
249
249
|
SidebarMenu: () => SidebarMenu,
|
250
|
-
SimpleGrid: () =>
|
250
|
+
SimpleGrid: () => import_react53.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_react93.Slide,
|
253
|
+
SlideFade: () => import_react93.SlideFade,
|
254
|
+
SlideFadeProps: () => import_react93.SlideFadeProps,
|
255
|
+
SlideProps: () => import_react93.SlideProps,
|
256
|
+
Spacer: () => import_react53.Spacer,
|
257
|
+
Stack: () => import_react53.Stack,
|
258
|
+
StackProps: () => import_react53.StackProps,
|
259
|
+
Step: () => import_react93.Step,
|
260
|
+
StepDescription: () => import_react93.StepDescription,
|
261
|
+
StepIcon: () => import_react93.StepIcon,
|
262
|
+
StepIndicator: () => import_react93.StepIndicator,
|
263
|
+
StepNumber: () => import_react93.StepNumber,
|
264
|
+
StepSeparator: () => import_react93.StepSeparator,
|
265
|
+
StepStatus: () => import_react93.StepStatus,
|
266
|
+
StepTitle: () => import_react93.StepTitle,
|
267
|
+
Stepper: () => import_react93.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_react84.TabIndicator,
|
271
|
+
TabIndicatorProps: () => import_react84.TabIndicatorProps,
|
272
|
+
TabList: () => import_react84.TabList,
|
273
|
+
TabListProps: () => import_react84.TabListProps,
|
274
|
+
TabPanel: () => import_react84.TabPanel,
|
275
|
+
TabPanelProps: () => import_react84.TabPanelProps,
|
276
|
+
TabPanels: () => import_react84.TabPanels,
|
277
|
+
TabPanelsProps: () => import_react84.TabPanelsProps,
|
278
|
+
TabProps: () => import_react84.TabProps,
|
279
|
+
TableBodyProps: () => import_react82.TableBodyProps,
|
280
|
+
TableCellProps: () => import_react82.TableCellProps,
|
281
|
+
TableColumnHeaderProps: () => import_react82.TableColumnHeaderProps,
|
282
|
+
TableHeadProps: () => import_react82.TableHeadProps,
|
283
|
+
TableProps: () => import_react82.TableProps,
|
284
|
+
TableRowProps: () => import_react82.TableRowProps,
|
285
|
+
Tabs: () => import_react84.Tabs,
|
286
|
+
TabsDescendantsProvider: () => import_react84.TabsDescendantsProvider,
|
287
|
+
TabsProps: () => import_react84.TabsProps,
|
288
|
+
TabsProvider: () => import_react84.TabsProvider,
|
289
|
+
Tbody: () => import_react82.Tbody,
|
290
|
+
Td: () => import_react82.Td,
|
291
|
+
Text: () => import_react85.Text,
|
292
|
+
TextProps: () => import_react85.TextProps,
|
293
293
|
TextareaField: () => textarea_default,
|
294
|
-
Th: () =>
|
295
|
-
Thead: () =>
|
294
|
+
Th: () => import_react82.Th,
|
295
|
+
Thead: () => import_react82.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_react82.Tr,
|
302
|
+
UnorderedList: () => import_react54.UnorderedList,
|
303
303
|
Uploader: () => uploader_default,
|
304
|
-
UseBreakpointOptions: () =>
|
304
|
+
UseBreakpointOptions: () => import_react93.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_react105.UseDisclosureProps,
|
310
|
+
UseImageProps: () => import_react93.UseImageProps,
|
311
|
+
UseImageReturn: () => import_react93.UseImageReturn,
|
312
|
+
UseMediaQueryOptions: () => import_react93.UseMediaQueryOptions,
|
313
|
+
UseModalProps: () => import_react56.UseModalProps,
|
314
|
+
UseModalReturn: () => import_react56.UseModalReturn,
|
315
|
+
UsePinInputFieldProps: () => import_react65.UsePinInputFieldProps,
|
316
|
+
UsePinInputProps: () => import_react65.UsePinInputProps,
|
317
|
+
UsePinInputReturn: () => import_react65.UsePinInputReturn,
|
318
|
+
UseQueryProps: () => import_react93.UseQueryProps,
|
319
|
+
UseRadioGroupReturn: () => import_react70.UseRadioGroupReturn,
|
320
|
+
UseRadioProps: () => import_react70.UseRadioProps,
|
321
|
+
UseRadioReturn: () => import_react70.UseRadioReturn,
|
322
|
+
UseTabListProps: () => import_react84.UseTabListProps,
|
323
|
+
UseTabListReturn: () => import_react84.UseTabListReturn,
|
324
|
+
UseTabOptions: () => import_react84.UseTabOptions,
|
325
|
+
UseTabPanelsProps: () => import_react84.UseTabPanelsProps,
|
326
|
+
UseTabProps: () => import_react84.UseTabProps,
|
327
|
+
UseTabsProps: () => import_react84.UseTabsProps,
|
328
|
+
UseTabsReturn: () => import_react84.UseTabsReturn,
|
329
|
+
VStack: () => import_react53.VStack,
|
330
330
|
Version: () => Version,
|
331
|
-
VisuallyHidden: () =>
|
332
|
-
VisuallyHiddenInput: () =>
|
331
|
+
VisuallyHidden: () => import_react93.VisuallyHidden,
|
332
|
+
VisuallyHiddenInput: () => import_react93.VisuallyHiddenInput,
|
333
333
|
VoilaLogo: () => VoilaLogo,
|
334
|
-
Wrap: () =>
|
335
|
-
WrapItem: () =>
|
336
|
-
WrapItemProps: () =>
|
337
|
-
WrapProps: () =>
|
334
|
+
Wrap: () => import_react53.Wrap,
|
335
|
+
WrapItem: () => import_react53.WrapItem,
|
336
|
+
WrapItemProps: () => import_react53.WrapItemProps,
|
337
|
+
WrapProps: () => import_react53.WrapProps,
|
338
338
|
XMSLogo: () => XMSLogo,
|
339
339
|
createExtendTheme: () => createExtendTheme,
|
340
340
|
defaultOnHandleRejections: () => defaultOnHandleRejections,
|
341
341
|
dimensionValidator: () => dimensionValidator,
|
342
|
-
extendTheme: () =>
|
343
|
-
forwardRef: () =>
|
342
|
+
extendTheme: () => import_react106.extendTheme,
|
343
|
+
forwardRef: () => import_react106.forwardRef,
|
344
344
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
345
345
|
getTheme: () => getTheme,
|
346
346
|
id: () => id,
|
@@ -356,52 +356,53 @@ __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_react105.useBoolean,
|
360
|
+
useBreakpoint: () => import_react93.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_react105.useClipboard,
|
364
|
+
useColorMode: () => import_react105.useColorMode,
|
365
|
+
useColorModePreference: () => import_react93.useColorModePreference,
|
366
|
+
useColorModeValue: () => import_react105.useColorModeValue,
|
367
|
+
useConst: () => import_react105.useConst,
|
368
|
+
useControllableProp: () => import_react105.useControllableProp,
|
369
|
+
useControllableState: () => import_react105.useControllableState,
|
370
370
|
useDataTable: () => useDataTable,
|
371
|
-
useDimensions: () =>
|
372
|
-
useDisclosure: () =>
|
373
|
-
useDrawerContext: () =>
|
371
|
+
useDimensions: () => import_react105.useDimensions,
|
372
|
+
useDisclosure: () => import_react105.useDisclosure,
|
373
|
+
useDrawerContext: () => import_react56.useDrawerContext,
|
374
374
|
useFetcher: () => useFetcher,
|
375
|
-
useImage: () =>
|
375
|
+
useImage: () => import_react93.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
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
377
|
+
useMergeRefs: () => import_react105.useMergeRefs,
|
378
|
+
useModal: () => import_react56.useModal,
|
379
|
+
useModalContext: () => import_react56.useModalContext,
|
380
|
+
useModalStyles: () => import_react56.useModalStyles,
|
381
|
+
useOutsideClick: () => import_react105.useOutsideClick,
|
382
|
+
usePinInput: () => import_react65.usePinInput,
|
383
|
+
usePinInputContext: () => import_react65.usePinInputContext,
|
384
|
+
usePinInputField: () => import_react65.usePinInputField,
|
385
|
+
useProgressStyles: () => import_react67.useProgressStyles,
|
386
|
+
useQuery: () => import_react93.useQuery,
|
387
|
+
useRadio: () => import_react70.useRadio,
|
388
|
+
useRadioGroup: () => import_react70.useRadioGroup,
|
389
|
+
useRadioGroupContext: () => import_react70.useRadioGroupContext,
|
390
|
+
useSelectTable: () => useSelectTable,
|
391
|
+
useSteps: () => import_react93.useSteps,
|
392
|
+
useTab: () => import_react84.useTab,
|
393
|
+
useTabIndicator: () => import_react84.useTabIndicator,
|
394
|
+
useTabList: () => import_react84.useTabList,
|
395
|
+
useTabPanel: () => import_react84.useTabPanel,
|
396
|
+
useTabPanels: () => import_react84.useTabPanels,
|
397
|
+
useTabs: () => import_react84.useTabs,
|
398
|
+
useTabsContext: () => import_react84.useTabsContext,
|
399
|
+
useTabsDescendant: () => import_react84.useTabsDescendant,
|
400
|
+
useTabsDescendants: () => import_react84.useTabsDescendants,
|
401
|
+
useTabsDescendantsContext: () => import_react84.useTabsDescendantsContext,
|
402
|
+
useTabsStyles: () => import_react84.useTabsStyles,
|
403
|
+
useTheme: () => import_react105.useTheme,
|
403
404
|
useToast: () => useToast,
|
404
|
-
useToken: () =>
|
405
|
+
useToken: () => import_react105.useToken
|
405
406
|
});
|
406
407
|
module.exports = __toCommonJS(src_exports);
|
407
408
|
|
@@ -1266,10 +1267,87 @@ var counter_default = Counter;
|
|
1266
1267
|
|
1267
1268
|
// src/components/data-table/components/data-table.tsx
|
1268
1269
|
var import_icons2 = require("@chakra-ui/icons");
|
1269
|
-
var
|
1270
|
-
var
|
1270
|
+
var import_react29 = require("@chakra-ui/react");
|
1271
|
+
var import_react30 = require("@emotion/react");
|
1271
1272
|
var import_react_table = require("@tanstack/react-table");
|
1272
1273
|
var React5 = __toESM(require("react"));
|
1274
|
+
|
1275
|
+
// src/hooks/use-drag-threshold/use-drag-or-click.ts
|
1276
|
+
var import_react28 = require("react");
|
1277
|
+
|
1278
|
+
// src/hooks/use-drag-threshold/drag-threshold.ts
|
1279
|
+
var DragThreshold = class {
|
1280
|
+
constructor() {
|
1281
|
+
__publicField(this, "isDrag");
|
1282
|
+
__publicField(this, "mouseDown");
|
1283
|
+
__publicField(this, "x0");
|
1284
|
+
__publicField(this, "y0");
|
1285
|
+
/** threshold for dragging behavior in pixel
|
1286
|
+
* @type {number}
|
1287
|
+
*/
|
1288
|
+
__publicField(this, "threshold");
|
1289
|
+
this.isDrag = false;
|
1290
|
+
this.x0 = 0;
|
1291
|
+
this.y0 = 0;
|
1292
|
+
this.threshold = 20;
|
1293
|
+
this.mouseDown = false;
|
1294
|
+
}
|
1295
|
+
reset() {
|
1296
|
+
this.isDrag = false;
|
1297
|
+
this.x0 = 0;
|
1298
|
+
this.y0 = 0;
|
1299
|
+
this.mouseDown = false;
|
1300
|
+
}
|
1301
|
+
start(x, y) {
|
1302
|
+
this.x0 = x;
|
1303
|
+
this.y0 = y;
|
1304
|
+
this.mouseDown = true;
|
1305
|
+
}
|
1306
|
+
move(x, y) {
|
1307
|
+
if (!this.mouseDown) return;
|
1308
|
+
const dx = Math.abs(x - this.x0);
|
1309
|
+
const dy = Math.abs(y - this.y0);
|
1310
|
+
this.isDrag = Math.abs(dx) > this.threshold || Math.abs(dy) > this.threshold;
|
1311
|
+
}
|
1312
|
+
isDragged() {
|
1313
|
+
return this.isDrag;
|
1314
|
+
}
|
1315
|
+
};
|
1316
|
+
|
1317
|
+
// src/hooks/use-drag-threshold/use-drag-or-click.ts
|
1318
|
+
var useDragOrClick = () => {
|
1319
|
+
const clickOrDragged = (0, import_react28.useRef)(new DragThreshold());
|
1320
|
+
const getDragOrClickProps = ({
|
1321
|
+
onClick,
|
1322
|
+
onMouseDown,
|
1323
|
+
onMouseMove,
|
1324
|
+
onMouseUp
|
1325
|
+
}) => {
|
1326
|
+
return {
|
1327
|
+
onMouseDown: (e) => {
|
1328
|
+
clickOrDragged.current.start(e.clientX, e.clientY);
|
1329
|
+
onMouseDown == null ? void 0 : onMouseDown(e);
|
1330
|
+
},
|
1331
|
+
onMouseMove: (e) => {
|
1332
|
+
clickOrDragged.current.move(e.clientX, e.clientY);
|
1333
|
+
onMouseMove == null ? void 0 : onMouseMove(e);
|
1334
|
+
},
|
1335
|
+
onMouseUp: (e) => {
|
1336
|
+
if (!clickOrDragged.current.isDragged()) {
|
1337
|
+
onClick == null ? void 0 : onClick(e);
|
1338
|
+
}
|
1339
|
+
clickOrDragged.current.reset();
|
1340
|
+
onMouseUp == null ? void 0 : onMouseUp(e);
|
1341
|
+
}
|
1342
|
+
};
|
1343
|
+
};
|
1344
|
+
return {
|
1345
|
+
clickOrDragged: clickOrDragged.current,
|
1346
|
+
getDragOrClickProps
|
1347
|
+
};
|
1348
|
+
};
|
1349
|
+
|
1350
|
+
// src/components/data-table/components/data-table.tsx
|
1273
1351
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
1274
1352
|
var isCellDisabled = (row, cellId) => {
|
1275
1353
|
if (row.disabled) {
|
@@ -1341,36 +1419,52 @@ var useDataTable = ({
|
|
1341
1419
|
sortDescFirst,
|
1342
1420
|
sortingState,
|
1343
1421
|
manualSorting,
|
1422
|
+
selectedRow,
|
1423
|
+
disabledRow,
|
1424
|
+
onRowSelectionChange,
|
1344
1425
|
columnPinning
|
1345
1426
|
}) => {
|
1346
1427
|
const [isFirstLoad, setIsFirstLoad] = React5.useState(true);
|
1347
1428
|
const [sorting, setSorting] = React5.useState(sortingState != null ? sortingState : []);
|
1348
|
-
const [rowSelection, onRowSelectionChange] = React5.useState({});
|
1349
1429
|
const dataColumns = React5.useMemo(() => columns, [columns]);
|
1350
1430
|
const checkboxColumn = React5.useMemo(
|
1351
1431
|
() => [
|
1352
1432
|
{
|
1353
1433
|
id: "select",
|
1354
1434
|
size: 32,
|
1355
|
-
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1356
|
-
|
1435
|
+
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1436
|
+
import_react29.Checkbox,
|
1357
1437
|
{
|
1358
1438
|
"data-test-id": "select-header-data-table",
|
1359
1439
|
...{
|
1440
|
+
isDisabled: table2.getPaginationRowModel().rows.filter((row) => !(disabledRow == null ? void 0 : disabledRow(row.original))).length === 0,
|
1360
1441
|
isChecked: table2.getIsAllRowsSelected(),
|
1361
1442
|
isIndeterminate: table2.getIsSomeRowsSelected(),
|
1362
|
-
onChange:
|
1443
|
+
onChange: () => {
|
1444
|
+
if (table2.getIsAllRowsSelected()) {
|
1445
|
+
table2.getToggleAllRowsSelectedHandler();
|
1446
|
+
} else if (disabledRow) {
|
1447
|
+
const prevSelected = table2.getFilteredSelectedRowModel().rows.length;
|
1448
|
+
const rows = table2.getPaginationRowModel().rows.filter((row) => !disabledRow(row.original));
|
1449
|
+
if (prevSelected === rows.length) {
|
1450
|
+
table2.setRowSelection(Object.fromEntries(rows.map((row) => [row.id, false])));
|
1451
|
+
} else {
|
1452
|
+
table2.setRowSelection(Object.fromEntries(rows.map((row) => [row.id, true])));
|
1453
|
+
}
|
1454
|
+
} else {
|
1455
|
+
table2.getToggleAllRowsSelectedHandler();
|
1456
|
+
}
|
1457
|
+
}
|
1363
1458
|
}
|
1364
1459
|
}
|
1365
1460
|
) }),
|
1366
|
-
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1367
|
-
|
1461
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1462
|
+
import_react29.Checkbox,
|
1368
1463
|
{
|
1369
1464
|
"data-test-id": `select-data-table-${row.index}`,
|
1370
1465
|
...{
|
1371
1466
|
isChecked: row.getIsSelected(),
|
1372
|
-
isIndeterminate: row.getIsSomeSelected()
|
1373
|
-
onChange: row.getToggleSelectedHandler()
|
1467
|
+
isIndeterminate: row.getIsSomeSelected()
|
1374
1468
|
}
|
1375
1469
|
}
|
1376
1470
|
) })
|
@@ -1397,15 +1491,17 @@ var useDataTable = ({
|
|
1397
1491
|
sortDescFirst,
|
1398
1492
|
state: {
|
1399
1493
|
sorting,
|
1400
|
-
rowSelection,
|
1494
|
+
...selectedRow ? { rowSelection: selectedRow } : {},
|
1401
1495
|
...columnPinning ? { columnPinning } : {}
|
1402
1496
|
},
|
1497
|
+
enableRowSelection: withSelectedRow,
|
1403
1498
|
onRowSelectionChange,
|
1404
1499
|
onSortingChange
|
1405
1500
|
});
|
1406
1501
|
const { getSelectedRowModel, toggleAllRowsSelected } = table;
|
1407
1502
|
const { flatRows } = getSelectedRowModel();
|
1408
1503
|
React5.useEffect(() => {
|
1504
|
+
console.log("changed");
|
1409
1505
|
const rowData = flatRows.map((row) => row.original);
|
1410
1506
|
if (onSelectedRow) {
|
1411
1507
|
onSelectedRow(rowData);
|
@@ -1436,9 +1532,11 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1436
1532
|
columnPinning,
|
1437
1533
|
disabledRow,
|
1438
1534
|
highlightedRow,
|
1535
|
+
withSelectedRow,
|
1439
1536
|
highlightRowColor,
|
1440
1537
|
cellLineClamp = 2
|
1441
1538
|
} = props;
|
1539
|
+
const { clickOrDragged, getDragOrClickProps } = useDragOrClick();
|
1442
1540
|
const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1443
1541
|
const refTable = React5.useRef(null);
|
1444
1542
|
React5.useImperativeHandle(ref, () => ({
|
@@ -1484,27 +1582,27 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1484
1582
|
}, []);
|
1485
1583
|
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
1584
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1487
|
-
|
1585
|
+
import_react29.Box,
|
1488
1586
|
{
|
1489
1587
|
overflowX: "auto",
|
1490
1588
|
overflowY: "hidden",
|
1491
1589
|
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 :
|
1590
|
+
pl: ((_e = columnPinning == null ? void 0 : columnPinning.left) == null ? void 0 : _e.length) ? 0 : 2,
|
1591
|
+
pr: ((_f = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _f.length) ? 0 : 2,
|
1494
1592
|
maxW: "100%",
|
1495
1593
|
w: "full",
|
1496
1594
|
ref: refTable,
|
1497
1595
|
...((_g = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _g.length) && hasScroll ? { "data-pin-right": true } : {},
|
1498
1596
|
...container,
|
1499
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1500
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1501
|
-
|
1597
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react29.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
1598
|
+
/* @__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)(
|
1599
|
+
import_react29.Th,
|
1502
1600
|
{
|
1503
1601
|
colSpan: header.colSpan,
|
1504
1602
|
width: `${header.getSize()}px`,
|
1505
1603
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1506
1604
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1507
|
-
|
1605
|
+
import_react29.Flex,
|
1508
1606
|
{
|
1509
1607
|
"data-test-id": "CT_component_data-table_loader",
|
1510
1608
|
textTransform: "capitalize",
|
@@ -1516,27 +1614,27 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1516
1614
|
},
|
1517
1615
|
header.id
|
1518
1616
|
)) }, headerGroup.id)) }),
|
1519
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1520
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1617
|
+
/* @__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)) })
|
1618
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react29.Table, { ...styles == null ? void 0 : styles.table, children: [
|
1521
1619
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1522
|
-
|
1620
|
+
import_react29.Thead,
|
1523
1621
|
{
|
1524
1622
|
maxH: "50px",
|
1525
1623
|
...(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)(
|
1624
|
+
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
1625
|
var _a2, _b2;
|
1528
1626
|
if (!!((_a2 = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _a2.length) && header.column.getIsFirstColumn("right")) {
|
1529
1627
|
lastPinnedColumn = header.column.getAfter("right");
|
1530
1628
|
}
|
1531
1629
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1532
|
-
|
1630
|
+
import_react29.Th,
|
1533
1631
|
{
|
1534
1632
|
colSpan: header.colSpan,
|
1535
1633
|
sx: getCommonPinningStyles(header.column),
|
1536
1634
|
width: header.column.getIsFirstColumn("left") || header.column.getIsLastColumn("right") ? `${header.getSize() + 8}px` : `${header.getSize()}px`,
|
1537
1635
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1538
1636
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1539
|
-
|
1637
|
+
import_react29.Flex,
|
1540
1638
|
{
|
1541
1639
|
backgroundColor: "white",
|
1542
1640
|
height: "100%",
|
@@ -1551,13 +1649,13 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1551
1649
|
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1552
1650
|
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1553
1651
|
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1554
|
-
|
1652
|
+
import_react29.Box,
|
1555
1653
|
{
|
1556
1654
|
as: "span",
|
1557
1655
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1558
1656
|
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1559
1657
|
onClick: header.column.getToggleSortingHandler(),
|
1560
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1658
|
+
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
1659
|
}
|
1562
1660
|
)
|
1563
1661
|
]
|
@@ -1569,18 +1667,18 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1569
1667
|
}) }, headerGroup.id))
|
1570
1668
|
}
|
1571
1669
|
),
|
1572
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react29.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
|
1573
1671
|
const isDisabledRow = disabledRow && disabledRow(row.original);
|
1574
1672
|
const isHighlightedRow = highlightedRow && highlightedRow(row.original);
|
1575
1673
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1576
|
-
|
1674
|
+
import_react29.Tr,
|
1577
1675
|
{
|
1578
1676
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
1579
1677
|
...styles == null ? void 0 : styles.tableRow,
|
1580
|
-
sx: { ...isHighlightedRow && getTableHighlightStyle() },
|
1678
|
+
sx: { ...isHighlightedRow && getTableHighlightStyle(highlightRowColor) },
|
1581
1679
|
"aria-disabled": isDisabledRow,
|
1582
1680
|
"data-highlight": isHighlightedRow ? "true" : "false",
|
1583
|
-
css:
|
1681
|
+
css: import_react30.css`
|
1584
1682
|
&:last-child {
|
1585
1683
|
td {
|
1586
1684
|
border-bottom: none;
|
@@ -1588,29 +1686,32 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1588
1686
|
}
|
1589
1687
|
`,
|
1590
1688
|
cursor: isDisabledRow ? "default" : "pointer",
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
(
|
1689
|
+
...getDragOrClickProps({
|
1690
|
+
onMouseDown: (e) => {
|
1691
|
+
var _a2;
|
1692
|
+
if (!isDisabledRow && !isHighlightedRow) {
|
1693
|
+
(_a2 = e.currentTarget) == null ? void 0 : _a2.setAttribute("data-active", "true");
|
1694
|
+
}
|
1695
|
+
},
|
1696
|
+
onMouseUp: (e) => {
|
1697
|
+
var _a2;
|
1698
|
+
(_a2 = e.currentTarget) == null ? void 0 : _a2.removeAttribute("data-active");
|
1699
|
+
},
|
1700
|
+
onClick: () => {
|
1701
|
+
if (withSelectedRow) row.toggleSelected();
|
1702
|
+
if (onRowClick) {
|
1703
|
+
if (isDisabledRow) return;
|
1704
|
+
onRowClick(row.original);
|
1705
|
+
}
|
1595
1706
|
}
|
1596
|
-
},
|
1597
|
-
onMouseUp: (e) => {
|
1598
|
-
var _a2;
|
1599
|
-
(_a2 = e.currentTarget) == null ? void 0 : _a2.removeAttribute("data-active");
|
1600
|
-
},
|
1707
|
+
}),
|
1601
1708
|
opacity: isDisabledRow ? 0.4 : 1,
|
1602
1709
|
pointerEvents: isDisabledRow ? "none" : "auto",
|
1603
|
-
onClick: () => {
|
1604
|
-
if (onRowClick) {
|
1605
|
-
if (isDisabledRow) return;
|
1606
|
-
onRowClick(row.original);
|
1607
|
-
}
|
1608
|
-
},
|
1609
1710
|
children: row.getVisibleCells().map((cell) => {
|
1610
1711
|
const meta = cell.column.columnDef.meta;
|
1611
1712
|
const isDisabled = isCellDisabled(row.original, cell.column.id);
|
1612
1713
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1613
|
-
|
1714
|
+
import_react29.Td,
|
1614
1715
|
{
|
1615
1716
|
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1616
1717
|
fontSize: "text.sm",
|
@@ -1619,33 +1720,22 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1619
1720
|
},
|
1620
1721
|
...styles == null ? void 0 : styles.tableCell,
|
1621
1722
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1622
|
-
|
1723
|
+
import_react29.Flex,
|
1623
1724
|
{
|
1725
|
+
tabIndex: 0,
|
1624
1726
|
height: "100%",
|
1625
1727
|
width: "100%",
|
1626
1728
|
align: "center",
|
1729
|
+
"data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
|
1627
1730
|
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())
|
1731
|
+
...cellLineClamp > 0 ? {
|
1732
|
+
noOfLines: cellLineClamp,
|
1733
|
+
sx: {
|
1734
|
+
display: "-webkit-inline-box"
|
1647
1735
|
}
|
1648
|
-
|
1736
|
+
} : {},
|
1737
|
+
sx: { ...meta && meta.columnStyles ? meta.columnStyles : {} },
|
1738
|
+
children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
1649
1739
|
}
|
1650
1740
|
)
|
1651
1741
|
},
|
@@ -1662,11 +1752,21 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1662
1752
|
});
|
1663
1753
|
var data_table_default = DataTable;
|
1664
1754
|
|
1755
|
+
// src/components/data-table/hook/use-select-table.ts
|
1756
|
+
var import_react31 = __toESM(require("react"));
|
1757
|
+
var useSelectTable = (intialRowSelection) => {
|
1758
|
+
const [rowSelection, onRowSelectionChange] = import_react31.default.useState(intialRowSelection != null ? intialRowSelection : {});
|
1759
|
+
return {
|
1760
|
+
rowSelection,
|
1761
|
+
onRowSelectionChange
|
1762
|
+
};
|
1763
|
+
};
|
1764
|
+
|
1665
1765
|
// src/components/datepicker/components/datepicker.tsx
|
1666
|
-
var
|
1766
|
+
var import_react35 = require("@chakra-ui/react");
|
1667
1767
|
var import_shared_utils8 = require("@chakra-ui/shared-utils");
|
1668
1768
|
var import_internal_icon6 = require("@ctlyst.id/internal-icon");
|
1669
|
-
var
|
1769
|
+
var import_react36 = require("@floating-ui/react");
|
1670
1770
|
var import_react_datepicker = __toESM(require("react-datepicker"));
|
1671
1771
|
|
1672
1772
|
// ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs
|
@@ -2204,12 +2304,12 @@ id.localize.month = buildLocalizeFn2({
|
|
2204
2304
|
|
2205
2305
|
// src/components/datepicker/components/styles.tsx
|
2206
2306
|
var import_system6 = require("@chakra-ui/system");
|
2207
|
-
var
|
2307
|
+
var import_react32 = require("@emotion/react");
|
2208
2308
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
2209
2309
|
var Styles = ({ showHeader }) => {
|
2210
2310
|
const { colorMode } = (0, import_system6.useColorMode)();
|
2211
2311
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
2212
|
-
|
2312
|
+
import_react32.Global,
|
2213
2313
|
{
|
2214
2314
|
styles: `
|
2215
2315
|
@charset "UTF-8";
|
@@ -3044,21 +3144,21 @@ var Styles = ({ showHeader }) => {
|
|
3044
3144
|
var styles_default = Styles;
|
3045
3145
|
|
3046
3146
|
// src/components/datepicker/components/time-input.tsx
|
3047
|
-
var
|
3048
|
-
var
|
3147
|
+
var import_react33 = require("@chakra-ui/react");
|
3148
|
+
var import_react34 = __toESM(require("react"));
|
3049
3149
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
3050
3150
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
3051
|
-
const [time, setTime] =
|
3151
|
+
const [time, setTime] = import_react34.default.useState(value || "00:00");
|
3052
3152
|
const handleChange = (e) => {
|
3053
3153
|
var _a, _b;
|
3054
3154
|
setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
|
3055
3155
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
3056
3156
|
};
|
3057
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
3058
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3059
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
3157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react33.Flex, { flexDir: "column", p: 4, pt: 0, children: [
|
3158
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react33.Text, { mb: 2, children: label }),
|
3159
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react33.InputGroup, { alignItems: "center", borderColor: "neutral.400", children: [
|
3060
3160
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3061
|
-
|
3161
|
+
import_react33.Input,
|
3062
3162
|
{
|
3063
3163
|
onChange: handleChange,
|
3064
3164
|
type: "time",
|
@@ -3073,7 +3173,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
3073
3173
|
}
|
3074
3174
|
}
|
3075
3175
|
),
|
3076
|
-
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3176
|
+
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react33.InputRightAddon, { children: rightAddon })
|
3077
3177
|
] })
|
3078
3178
|
] });
|
3079
3179
|
};
|
@@ -3129,7 +3229,7 @@ var Datepicker = ({
|
|
3129
3229
|
},
|
3130
3230
|
selected,
|
3131
3231
|
popperModifiers: [
|
3132
|
-
(0,
|
3232
|
+
(0, import_react36.offset)(4),
|
3133
3233
|
{
|
3134
3234
|
name: "placement",
|
3135
3235
|
fn: (state) => {
|
@@ -3152,7 +3252,7 @@ var Datepicker = ({
|
|
3152
3252
|
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
3253
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_internal_icon6.Calendar, { size: 4, color: "neutral.400" }),
|
3154
3254
|
value && !props.disabled && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3155
|
-
|
3255
|
+
import_react35.IconButton,
|
3156
3256
|
{
|
3157
3257
|
"data-test-id": "H0rseVCzGIaqoLho-EPbu",
|
3158
3258
|
display: "flex",
|
@@ -3186,9 +3286,9 @@ var Datepicker = ({
|
|
3186
3286
|
if (props.inline) {
|
3187
3287
|
return component;
|
3188
3288
|
}
|
3189
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
3289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react35.FormControl, { "data-test-id": "CT_Component_datepicker_wrapper", isInvalid: isError, children: [
|
3190
3290
|
component,
|
3191
|
-
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3291
|
+
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react35.FormHelperText, { fontSize: "text.xs", mt: 1, children: helperText }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react35.FormErrorMessage, { fontSize: "text.xs", mt: 1, children: error })
|
3192
3292
|
] });
|
3193
3293
|
};
|
3194
3294
|
Datepicker.defaultProps = {
|
@@ -3206,18 +3306,18 @@ Datepicker.defaultProps = {
|
|
3206
3306
|
var datepicker_default = Datepicker;
|
3207
3307
|
|
3208
3308
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
3209
|
-
var
|
3210
|
-
var
|
3211
|
-
var
|
3309
|
+
var import_react37 = require("@chakra-ui/react");
|
3310
|
+
var import_react38 = require("@emotion/react");
|
3311
|
+
var import_react39 = __toESM(require("react"));
|
3212
3312
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
3213
3313
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
3214
|
-
const [date, setDate] =
|
3314
|
+
const [date, setDate] = import_react39.default.useState(null);
|
3215
3315
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3216
|
-
|
3316
|
+
import_react37.Box,
|
3217
3317
|
{
|
3218
3318
|
fontSize: "12px",
|
3219
3319
|
lineHeight: "18px",
|
3220
|
-
css:
|
3320
|
+
css: import_react38.css`
|
3221
3321
|
input[type='date']::-webkit-inner-spin-button,
|
3222
3322
|
input[type='date']::-webkit-calendar-picker-indicator {
|
3223
3323
|
display: none;
|
@@ -3228,7 +3328,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3228
3328
|
}
|
3229
3329
|
`,
|
3230
3330
|
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3231
|
-
|
3331
|
+
import_react37.Input,
|
3232
3332
|
{
|
3233
3333
|
"data-test-id": props["data-test-id"],
|
3234
3334
|
type: "date",
|
@@ -3241,7 +3341,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3241
3341
|
min,
|
3242
3342
|
max,
|
3243
3343
|
required: true,
|
3244
|
-
css:
|
3344
|
+
css: import_react38.css`
|
3245
3345
|
border: 1px solid transparent;
|
3246
3346
|
|
3247
3347
|
&:focus,
|
@@ -3265,11 +3365,11 @@ DatePickerMonth.defaultProps = {
|
|
3265
3365
|
var datepicker_month_default = DatePickerMonth;
|
3266
3366
|
|
3267
3367
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
3268
|
-
var
|
3368
|
+
var import_react40 = require("@chakra-ui/react");
|
3269
3369
|
var import_styled = __toESM(require("@emotion/styled"));
|
3270
|
-
var
|
3370
|
+
var import_react41 = __toESM(require("react"));
|
3271
3371
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
3272
|
-
var MultiDateWrapper = (0, import_styled.default)(
|
3372
|
+
var MultiDateWrapper = (0, import_styled.default)(import_react40.Box)`
|
3273
3373
|
display: flex;
|
3274
3374
|
align-items: center;
|
3275
3375
|
width: fit-content;
|
@@ -3284,7 +3384,7 @@ var MultiDatePickerMonth = ({
|
|
3284
3384
|
min = "2020-01-01",
|
3285
3385
|
max = "2020-12-31"
|
3286
3386
|
}) => {
|
3287
|
-
const [date, setDate] =
|
3387
|
+
const [date, setDate] = import_react41.default.useState([null, null]);
|
3288
3388
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(MultiDateWrapper, { isError, children: [
|
3289
3389
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3290
3390
|
datepicker_month_default,
|
@@ -3298,7 +3398,7 @@ var MultiDatePickerMonth = ({
|
|
3298
3398
|
max
|
3299
3399
|
}
|
3300
3400
|
),
|
3301
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react40.Box, { children: "-" }),
|
3302
3402
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3303
3403
|
datepicker_month_default,
|
3304
3404
|
{
|
@@ -3321,7 +3421,7 @@ MultiDatePickerMonth.defaultProps = {
|
|
3321
3421
|
var multi_datepicker_month_default = MultiDatePickerMonth;
|
3322
3422
|
|
3323
3423
|
// src/components/dialog/components/dialog.tsx
|
3324
|
-
var
|
3424
|
+
var import_react42 = require("@chakra-ui/react");
|
3325
3425
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
3326
3426
|
var Dialog = ({
|
3327
3427
|
title,
|
@@ -3332,12 +3432,12 @@ var Dialog = ({
|
|
3332
3432
|
isOverlayClickable,
|
3333
3433
|
...props
|
3334
3434
|
}) => {
|
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)(
|
3435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react42.Modal, { ...props, children: [
|
3436
|
+
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react42.ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
3437
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react42.ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
3438
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react42.ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react42.Text, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
3439
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react42.ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
3440
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react42.ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
3341
3441
|
] })
|
3342
3442
|
] });
|
3343
3443
|
};
|
@@ -3352,7 +3452,7 @@ var dialog_default = Dialog;
|
|
3352
3452
|
var Icon2 = __toESM(require("@ctlyst.id/internal-icon"));
|
3353
3453
|
|
3354
3454
|
// src/components/empty-state/components/layout.tsx
|
3355
|
-
var
|
3455
|
+
var import_react43 = require("@chakra-ui/react");
|
3356
3456
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
3357
3457
|
var EmptyState = (props) => {
|
3358
3458
|
const { icon, title, description, buttonText, onClick } = props;
|
@@ -3361,13 +3461,13 @@ var EmptyState = (props) => {
|
|
3361
3461
|
onClick();
|
3362
3462
|
}
|
3363
3463
|
};
|
3364
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react43.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react43.VStack, { textAlign: "center", children: [
|
3365
3465
|
icon,
|
3366
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
3367
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3368
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3466
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react43.VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
|
3467
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react43.Text, { textStyle: "text.lg", fontWeight: "bold", children: title }),
|
3468
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react43.Text, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
|
3369
3469
|
] }),
|
3370
|
-
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3470
|
+
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react43.Box, { mt: 3, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react43.Button, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
|
3371
3471
|
] }) });
|
3372
3472
|
};
|
3373
3473
|
var layout_default = EmptyState;
|
@@ -3444,28 +3544,28 @@ EmptyState2.NotAuthorize = EmptyStateNotAuthorize;
|
|
3444
3544
|
var empty_state_default = EmptyState2;
|
3445
3545
|
|
3446
3546
|
// src/components/header/components/header.tsx
|
3447
|
-
var
|
3547
|
+
var import_react50 = require("@chakra-ui/react");
|
3448
3548
|
|
3449
3549
|
// src/components/header/components/logo.tsx
|
3450
|
-
var
|
3550
|
+
var import_react44 = require("@chakra-ui/react");
|
3451
3551
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
3452
3552
|
var Logo = ({ url, imageUrl, height }) => {
|
3453
3553
|
if (url)
|
3454
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3455
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react44.Box, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react44.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" }) });
|
3555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react44.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" });
|
3456
3556
|
};
|
3457
3557
|
var XMSLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3458
|
-
|
3558
|
+
import_react44.Image,
|
3459
3559
|
{
|
3460
3560
|
height: 8,
|
3461
|
-
src: (0,
|
3561
|
+
src: (0, import_react44.useColorModeValue)("https://assets.voila.id/xms/logo-xms.jpg", "https://assets.voila.id/xms/logo-xms-dark.png")
|
3462
3562
|
}
|
3463
3563
|
);
|
3464
3564
|
var VoilaLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3465
|
-
|
3565
|
+
import_react44.Image,
|
3466
3566
|
{
|
3467
3567
|
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
3468
|
-
filter: (0,
|
3568
|
+
filter: (0, import_react44.useColorModeValue)("none", "invert(1)"),
|
3469
3569
|
maxW: 24
|
3470
3570
|
}
|
3471
3571
|
);
|
@@ -3475,16 +3575,16 @@ Logo.defaultProps = {
|
|
3475
3575
|
};
|
3476
3576
|
|
3477
3577
|
// src/components/header/components/profile.tsx
|
3478
|
-
var
|
3578
|
+
var import_react47 = require("@chakra-ui/react");
|
3479
3579
|
var import_fi2 = require("react-icons/fi");
|
3480
3580
|
|
3481
3581
|
// src/components/nav-item/components/nav-item.tsx
|
3482
|
-
var
|
3582
|
+
var import_react45 = require("@chakra-ui/react");
|
3483
3583
|
var import_shared_utils9 = require("@chakra-ui/shared-utils");
|
3484
3584
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
3485
3585
|
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
3486
3586
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
3487
|
-
|
3587
|
+
import_react45.Link,
|
3488
3588
|
{
|
3489
3589
|
"data-test-id": props["data-test-id"],
|
3490
3590
|
opacity: isDisabled ? "0.3" : "initial",
|
@@ -3524,7 +3624,7 @@ NavItem.defaultProps = {
|
|
3524
3624
|
};
|
3525
3625
|
|
3526
3626
|
// src/components/tooltip/components/tooltip.tsx
|
3527
|
-
var
|
3627
|
+
var import_react46 = require("@chakra-ui/react");
|
3528
3628
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
3529
3629
|
var Tooltip = (props) => {
|
3530
3630
|
const {
|
@@ -3537,7 +3637,7 @@ var Tooltip = (props) => {
|
|
3537
3637
|
fontWeight = "400"
|
3538
3638
|
} = props;
|
3539
3639
|
const content = ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
3540
|
-
|
3640
|
+
import_react46.PopoverContent,
|
3541
3641
|
{
|
3542
3642
|
"data-test-id": "",
|
3543
3643
|
border: "none",
|
@@ -3551,15 +3651,15 @@ var Tooltip = (props) => {
|
|
3551
3651
|
onClose();
|
3552
3652
|
},
|
3553
3653
|
children: [
|
3554
|
-
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3555
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3654
|
+
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react46.PopoverArrow, { color, bg, shadow: "none" }),
|
3655
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react46.PopoverBody, { color, ...props, fontWeight, children: props.label })
|
3556
3656
|
]
|
3557
3657
|
}
|
3558
3658
|
);
|
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)(
|
3659
|
+
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react46.Popover, { trigger: "hover", placement: props.placement, ...props.popoverProps, children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
3660
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react46.PopoverTrigger, { children }),
|
3661
|
+
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react46.Portal, { children: content({ onClose }) }) : content({ onClose })
|
3662
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react46.Tooltip, { ...props, children });
|
3563
3663
|
};
|
3564
3664
|
|
3565
3665
|
// src/components/header/components/profile.tsx
|
@@ -3575,10 +3675,10 @@ var Profile = ({
|
|
3575
3675
|
...props
|
3576
3676
|
}) => {
|
3577
3677
|
var _a, _b;
|
3578
|
-
const { isOpen, onToggle, onClose } = (0,
|
3579
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3678
|
+
const { isOpen, onToggle, onClose } = (0, import_react47.useDisclosure)();
|
3679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react47.Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
3580
3680
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3581
|
-
|
3681
|
+
import_react47.Box,
|
3582
3682
|
{
|
3583
3683
|
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
3584
3684
|
as: "button",
|
@@ -3594,14 +3694,14 @@ var Profile = ({
|
|
3594
3694
|
onClick: onToggle,
|
3595
3695
|
color,
|
3596
3696
|
...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)(
|
3697
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react47.HStack, { children: [
|
3698
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react47.VStack, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
|
3699
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Text, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
3700
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react47.Flex, { alignItems: "center", children: [
|
3601
3701
|
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
3602
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
3603
3703
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3604
|
-
|
3704
|
+
import_react47.Box,
|
3605
3705
|
{
|
3606
3706
|
className: "catalyst_header-profile-divider",
|
3607
3707
|
h: "3",
|
@@ -3611,17 +3711,17 @@ var Profile = ({
|
|
3611
3711
|
}
|
3612
3712
|
)
|
3613
3713
|
] }),
|
3614
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3615
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3714
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react47.Flex, { align: "center", justify: "center", children: [
|
3715
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Text, { textStyle: "text.xs", children: data.office[0] }),
|
3616
3716
|
data.office.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3617
3717
|
Tooltip,
|
3618
3718
|
{
|
3619
3719
|
isInteractive: true,
|
3620
3720
|
hasArrow: true,
|
3621
3721
|
p: "2",
|
3622
|
-
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3623
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3624
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3722
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react47.Box, { children: [
|
3723
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Text, { children: "Akses Office:" }),
|
3724
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Text, { children: data.office.sort().join(", ") })
|
3625
3725
|
] }),
|
3626
3726
|
textAlign: "left",
|
3627
3727
|
placement: "bottom-end",
|
@@ -3632,7 +3732,7 @@ var Profile = ({
|
|
3632
3732
|
},
|
3633
3733
|
width: 300,
|
3634
3734
|
...officeContainer,
|
3635
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3636
3736
|
badge_default,
|
3637
3737
|
{
|
3638
3738
|
rounded: "full",
|
@@ -3649,18 +3749,18 @@ var Profile = ({
|
|
3649
3749
|
) })
|
3650
3750
|
}
|
3651
3751
|
)
|
3652
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3752
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
3653
3753
|
] })
|
3654
3754
|
] }),
|
3655
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Box, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Avatar, { size: "sm", bg: brandColor, color: "white", name: (_b = data == null ? void 0 : data.name) != null ? _b : data == null ? void 0 : data.email }) }) })
|
3656
3756
|
] })
|
3657
3757
|
}
|
3658
3758
|
),
|
3659
|
-
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3660
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3661
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3759
|
+
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react47.PopoverContent, { bg: "white", maxW: 200, children: [
|
3760
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.PopoverArrow, { bg: "white" }),
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.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_react47.Box, { display: "flex", alignItems: "center", children: [
|
3662
3762
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_fi2.FiPower, {}),
|
3663
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3763
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react47.Text, { ml: "2", children: "Logout" })
|
3664
3764
|
] }) }) })
|
3665
3765
|
] })
|
3666
3766
|
] });
|
@@ -3673,17 +3773,17 @@ Profile.defaultProps = {
|
|
3673
3773
|
};
|
3674
3774
|
|
3675
3775
|
// src/components/header/components/switch-mode.tsx
|
3676
|
-
var
|
3776
|
+
var import_react48 = require("@chakra-ui/react");
|
3677
3777
|
var import_fi3 = require("react-icons/fi");
|
3678
3778
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
3679
3779
|
var SwitchMode = () => {
|
3680
|
-
const { colorMode, toggleColorMode } = (0,
|
3681
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
3780
|
+
const { colorMode, toggleColorMode } = (0, import_react48.useColorMode)();
|
3781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react48.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
3782
|
};
|
3683
3783
|
var switch_mode_default = SwitchMode;
|
3684
3784
|
|
3685
3785
|
// src/components/header/components/version.tsx
|
3686
|
-
var
|
3786
|
+
var import_react49 = require("@chakra-ui/react");
|
3687
3787
|
|
3688
3788
|
// src/components/header/utils/formatter.ts
|
3689
3789
|
function environmentName(env) {
|
@@ -3721,7 +3821,7 @@ var Version = ({
|
|
3721
3821
|
}
|
3722
3822
|
) : version,
|
3723
3823
|
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
3724
|
-
|
3824
|
+
import_react49.Box,
|
3725
3825
|
{
|
3726
3826
|
background: "primary.50",
|
3727
3827
|
color: "primary.500",
|
@@ -3761,8 +3861,8 @@ var Header = ({
|
|
3761
3861
|
bg = "white",
|
3762
3862
|
versionStyle,
|
3763
3863
|
...props
|
3764
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3765
|
-
|
3864
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react50.Flex, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3865
|
+
import_react50.Flex,
|
3766
3866
|
{
|
3767
3867
|
h: "auto",
|
3768
3868
|
w: "full",
|
@@ -3770,11 +3870,11 @@ var Header = ({
|
|
3770
3870
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
3771
3871
|
pos: "relative",
|
3772
3872
|
children: [
|
3773
|
-
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3873
|
+
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react50.Flex, { alignItems: "center", children: [
|
3774
3874
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
3775
3875
|
children && children
|
3776
3876
|
] }),
|
3777
|
-
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3877
|
+
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react50.HStack, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
3778
3878
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
3779
3879
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3780
3880
|
Version,
|
@@ -3787,7 +3887,7 @@ var Header = ({
|
|
3787
3887
|
}
|
3788
3888
|
)
|
3789
3889
|
] }),
|
3790
|
-
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3890
|
+
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react50.Flex, { alignItems: "center", children: [
|
3791
3891
|
!hideSwitchMode && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(switch_mode_default, {}),
|
3792
3892
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Profile, { color: props.color, brandColor, data, onLogout })
|
3793
3893
|
] })
|
@@ -3811,11 +3911,11 @@ Header.defaultProps = {
|
|
3811
3911
|
};
|
3812
3912
|
|
3813
3913
|
// src/components/header/components/navbar.tsx
|
3814
|
-
var
|
3914
|
+
var import_react51 = require("@chakra-ui/react");
|
3815
3915
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
3816
3916
|
var Navbar = ({ bg = "white", children, ...props }) => {
|
3817
3917
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
3818
|
-
|
3918
|
+
import_react51.Flex,
|
3819
3919
|
{
|
3820
3920
|
minH: "15",
|
3821
3921
|
h: "15",
|
@@ -3835,21 +3935,21 @@ var Navbar = ({ bg = "white", children, ...props }) => {
|
|
3835
3935
|
Navbar.displayName = "Navbar";
|
3836
3936
|
|
3837
3937
|
// src/components/image/index.ts
|
3838
|
-
var
|
3938
|
+
var import_react52 = require("@chakra-ui/react");
|
3839
3939
|
|
3840
3940
|
// src/components/layouting/index.ts
|
3841
|
-
var
|
3941
|
+
var import_react53 = require("@chakra-ui/react");
|
3842
3942
|
|
3843
3943
|
// src/components/list/index.tsx
|
3844
|
-
var
|
3944
|
+
var import_react54 = require("@chakra-ui/react");
|
3845
3945
|
|
3846
3946
|
// src/components/modal/components/modal-back-button.tsx
|
3847
3947
|
var import_icons3 = require("@chakra-ui/icons");
|
3848
|
-
var
|
3948
|
+
var import_react55 = require("@chakra-ui/react");
|
3849
3949
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
3850
3950
|
var ModalBackButton = ({ onClick }) => {
|
3851
3951
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
3852
|
-
|
3952
|
+
import_react55.IconButton,
|
3853
3953
|
{
|
3854
3954
|
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons3.ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
3855
3955
|
size: "sm",
|
@@ -3869,12 +3969,12 @@ var ModalBackButton = ({ onClick }) => {
|
|
3869
3969
|
var modal_back_button_default = ModalBackButton;
|
3870
3970
|
|
3871
3971
|
// src/components/modal/index.ts
|
3872
|
-
var
|
3972
|
+
var import_react56 = require("@chakra-ui/react");
|
3873
3973
|
|
3874
3974
|
// src/components/navigation/components/navigation.tsx
|
3875
|
-
var
|
3975
|
+
var import_react57 = require("@chakra-ui/react");
|
3876
3976
|
var Icon5 = __toESM(require("@ctlyst.id/internal-icon"));
|
3877
|
-
var
|
3977
|
+
var import_react58 = require("@emotion/react");
|
3878
3978
|
|
3879
3979
|
// src/components/navigation/components/mapping-icon.tsx
|
3880
3980
|
var Icon4 = __toESM(require("@ctlyst.id/internal-icon"));
|
@@ -3897,8 +3997,8 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
3897
3997
|
// src/components/navigation/components/navigation.tsx
|
3898
3998
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
3899
3999
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
3900
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3901
|
-
|
4000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react57.Box, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4001
|
+
import_react57.Flex,
|
3902
4002
|
{
|
3903
4003
|
bg: "white",
|
3904
4004
|
w: "full",
|
@@ -3912,9 +4012,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3912
4012
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
3913
4013
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
3914
4014
|
const activeBg = isActive ? "primary.500" : void 0;
|
3915
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3916
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3917
|
-
|
4015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react57.Popover, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
4016
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react57.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4017
|
+
import_react57.Button,
|
3918
4018
|
{
|
3919
4019
|
h: 7.5,
|
3920
4020
|
p: 2,
|
@@ -3931,10 +4031,10 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3931
4031
|
children: navigation.title
|
3932
4032
|
}
|
3933
4033
|
) }),
|
3934
|
-
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3935
|
-
|
4034
|
+
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react57.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react57.Box, { zIndex: "popover", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4035
|
+
import_react57.PopoverContent,
|
3936
4036
|
{
|
3937
|
-
bg: (0,
|
4037
|
+
bg: (0, import_react57.useColorModeValue)("white", "ebony-clay.800"),
|
3938
4038
|
maxW: 250,
|
3939
4039
|
border: "none",
|
3940
4040
|
borderRadius: "md",
|
@@ -3944,7 +4044,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3944
4044
|
const isLocalLink = host === navHost;
|
3945
4045
|
const isActiveSub = activePath === navLink;
|
3946
4046
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3947
|
-
|
4047
|
+
import_react57.Link,
|
3948
4048
|
{
|
3949
4049
|
as: isLocalLink ? as : void 0,
|
3950
4050
|
href: link,
|
@@ -3952,7 +4052,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3952
4052
|
textDecoration: "none"
|
3953
4053
|
},
|
3954
4054
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
3955
|
-
|
4055
|
+
import_react57.Box,
|
3956
4056
|
{
|
3957
4057
|
display: "flex",
|
3958
4058
|
position: "relative",
|
@@ -3960,24 +4060,24 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3960
4060
|
cursor: "pointer",
|
3961
4061
|
transition: "padding 0.35s ease 0s",
|
3962
4062
|
_hover: {
|
3963
|
-
backgroundColor: (0,
|
3964
|
-
color: (0,
|
4063
|
+
backgroundColor: (0, import_react57.useColorModeValue)("dove-gray.50", "mirage.900"),
|
4064
|
+
color: (0, import_react57.useColorModeValue)("primary.500", "dove-gray.600"),
|
3965
4065
|
px: 5,
|
3966
4066
|
py: 4,
|
3967
4067
|
_first: { borderTopRadius: "md" },
|
3968
4068
|
_last: { borderBottomRadius: "md" }
|
3969
4069
|
},
|
3970
4070
|
color: isActiveSub ? "primary.500" : "inherit",
|
3971
|
-
css:
|
4071
|
+
css: import_react58.css`
|
3972
4072
|
border-spacing: 4px;
|
3973
4073
|
`,
|
3974
4074
|
px: 6,
|
3975
4075
|
py: 4,
|
3976
4076
|
children: [
|
3977
4077
|
mappingIcon.get(navigation.title),
|
3978
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react57.Text, { fontSize: "text.sm", ml: 3, children: title }),
|
3979
4079
|
isActiveSub && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3980
|
-
|
4080
|
+
import_react57.Box,
|
3981
4081
|
{
|
3982
4082
|
width: 0.5,
|
3983
4083
|
height: 8,
|
@@ -4010,7 +4110,7 @@ Navigation.defaultProps = {
|
|
4010
4110
|
var navigation_default = Navigation;
|
4011
4111
|
|
4012
4112
|
// src/components/navigation/components/navigation-bar.tsx
|
4013
|
-
var
|
4113
|
+
var import_react59 = require("@chakra-ui/react");
|
4014
4114
|
var Icon6 = __toESM(require("@ctlyst.id/internal-icon"));
|
4015
4115
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
4016
4116
|
var NavigationBar = ({
|
@@ -4027,8 +4127,8 @@ var NavigationBar = ({
|
|
4027
4127
|
}
|
4028
4128
|
return subMenu.navHost + subMenu.navLink;
|
4029
4129
|
};
|
4030
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4031
|
-
|
4130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react59.Box, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4131
|
+
import_react59.Flex,
|
4032
4132
|
{
|
4033
4133
|
bg: "white",
|
4034
4134
|
w: "full",
|
@@ -4044,9 +4144,9 @@ var NavigationBar = ({
|
|
4044
4144
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
4045
4145
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
4046
4146
|
const activeBg = isActive ? "primary.500" : void 0;
|
4047
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4048
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4049
|
-
|
4147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react59.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: [
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react59.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4149
|
+
import_react59.Button,
|
4050
4150
|
{
|
4051
4151
|
h: 7.5,
|
4052
4152
|
p: 2,
|
@@ -4063,8 +4163,8 @@ var NavigationBar = ({
|
|
4063
4163
|
children: item.title
|
4064
4164
|
}
|
4065
4165
|
) }),
|
4066
|
-
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4067
|
-
|
4166
|
+
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react59.PopoverContent, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
4167
|
+
import_react59.Link,
|
4068
4168
|
{
|
4069
4169
|
href: urlMenu(subMenu),
|
4070
4170
|
display: "flex",
|
@@ -4081,7 +4181,7 @@ var NavigationBar = ({
|
|
4081
4181
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
4082
4182
|
children: [
|
4083
4183
|
mappingIcon2.get(item.title),
|
4084
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4184
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react59.Text, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
4085
4185
|
]
|
4086
4186
|
},
|
4087
4187
|
subMenu.id
|
@@ -4098,18 +4198,18 @@ var navigation_bar_default = NavigationBar;
|
|
4098
4198
|
|
4099
4199
|
// src/components/pagination/components/pagination.tsx
|
4100
4200
|
var import_icons4 = require("@chakra-ui/icons");
|
4101
|
-
var
|
4201
|
+
var import_react62 = require("@chakra-ui/react");
|
4102
4202
|
|
4103
4203
|
// src/components/pagination/components/pagination-button.tsx
|
4104
|
-
var
|
4204
|
+
var import_react60 = require("@chakra-ui/react");
|
4105
4205
|
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,
|
4206
|
+
var PaginationButton = (0, import_react60.forwardRef)(({ className, style, isActive, children, ...rest }, ref) => {
|
4207
|
+
const btnBg = (0, import_react60.useColorModeValue)("neutral.300", "mirage.900");
|
4208
|
+
const btnColor = (0, import_react60.useColorModeValue)("black.high", "primary.300");
|
4209
|
+
const btnNotActiveBg = (0, import_react60.useColorModeValue)("secondary.50", "primary.500");
|
4210
|
+
const btnNotActiveColor = (0, import_react60.useColorModeValue)("primary.500", "white");
|
4111
4211
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
4112
|
-
|
4212
|
+
import_react60.Button,
|
4113
4213
|
{
|
4114
4214
|
"data-test-id": "Pagination-Button",
|
4115
4215
|
ref,
|
@@ -4134,7 +4234,7 @@ var PaginationButton = (0, import_react58.forwardRef)(({ className, style, isAct
|
|
4134
4234
|
color: "neutral.300"
|
4135
4235
|
},
|
4136
4236
|
_disabled: {
|
4137
|
-
background: (0,
|
4237
|
+
background: (0, import_react60.useColorModeValue)("neutral.300", "mirage.900"),
|
4138
4238
|
color: "neutral.600",
|
4139
4239
|
pointerEvents: "none"
|
4140
4240
|
},
|
@@ -4150,7 +4250,7 @@ PaginationButton.defaultProps = {
|
|
4150
4250
|
var pagination_button_default = PaginationButton;
|
4151
4251
|
|
4152
4252
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
4153
|
-
var
|
4253
|
+
var import_react61 = require("@chakra-ui/react");
|
4154
4254
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
4155
4255
|
var PaginationButtonTrigger = ({
|
4156
4256
|
color,
|
@@ -4159,7 +4259,7 @@ var PaginationButtonTrigger = ({
|
|
4159
4259
|
visuallyHidden,
|
4160
4260
|
icon
|
4161
4261
|
}) => /* @__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)(
|
4262
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react61.VisuallyHidden, { children: visuallyHidden }),
|
4163
4263
|
icon
|
4164
4264
|
] });
|
4165
4265
|
PaginationButtonTrigger.defaultProps = {
|
@@ -4174,8 +4274,8 @@ var pagination_button_trigger_default = PaginationButtonTrigger;
|
|
4174
4274
|
// src/components/pagination/components/pagination.tsx
|
4175
4275
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
4176
4276
|
var Pagination = ({ className, current, total, onSelect }) => {
|
4177
|
-
const btnColorDisabled = (0,
|
4178
|
-
const btnColor = (0,
|
4277
|
+
const btnColorDisabled = (0, import_react62.useColorModeValue)("secondary.100", "primary.500");
|
4278
|
+
const btnColor = (0, import_react62.useColorModeValue)("primary.500", "secondary.100");
|
4179
4279
|
const disabledPrevious = current === 1;
|
4180
4280
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
4181
4281
|
const disabledNext = current === total;
|
@@ -4202,8 +4302,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4202
4302
|
}
|
4203
4303
|
return pageButtons;
|
4204
4304
|
};
|
4205
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4206
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react62.Box, { className, display: "inline-flex", alignItems: "center", children: [
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react62.Box, { mr: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4207
4307
|
pagination_button_trigger_default,
|
4208
4308
|
{
|
4209
4309
|
"data-test-id": "Pagination-Button",
|
@@ -4214,7 +4314,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4214
4314
|
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons4.ArrowLeftIcon, { width: 2 })
|
4215
4315
|
}
|
4216
4316
|
) }),
|
4217
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4317
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react62.Box, { bg: "neutral.300", borderRadius: "full", children: [
|
4218
4318
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4219
4319
|
pagination_button_trigger_default,
|
4220
4320
|
{
|
@@ -4233,7 +4333,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4233
4333
|
"data-test-id": "Pagination-Button",
|
4234
4334
|
isActive: page === current,
|
4235
4335
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
4236
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react62.Text, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
4237
4337
|
},
|
4238
4338
|
page
|
4239
4339
|
);
|
@@ -4250,7 +4350,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4250
4350
|
}
|
4251
4351
|
)
|
4252
4352
|
] }),
|
4253
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4353
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react62.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4254
4354
|
pagination_button_trigger_default,
|
4255
4355
|
{
|
4256
4356
|
"data-test-id": "Pagination-Button",
|
@@ -4271,7 +4371,7 @@ Pagination.displayName = "Pagination";
|
|
4271
4371
|
var pagination_default = Pagination;
|
4272
4372
|
|
4273
4373
|
// src/components/pagination/components/pagination-detail.tsx
|
4274
|
-
var
|
4374
|
+
var import_react63 = require("@chakra-ui/react");
|
4275
4375
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
4276
4376
|
var PaginationDetail = ({
|
4277
4377
|
page,
|
@@ -4282,13 +4382,13 @@ var PaginationDetail = ({
|
|
4282
4382
|
lineHeight = 18,
|
4283
4383
|
...rest
|
4284
4384
|
}) => {
|
4285
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
4385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react63.Text, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
4286
4386
|
};
|
4287
4387
|
var pagination_detail_default = PaginationDetail;
|
4288
4388
|
|
4289
4389
|
// src/components/pagination/components/pagination-filter.tsx
|
4290
|
-
var
|
4291
|
-
var
|
4390
|
+
var import_react64 = require("@chakra-ui/react");
|
4391
|
+
var React10 = __toESM(require("react"));
|
4292
4392
|
var import_fi4 = require("react-icons/fi");
|
4293
4393
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
4294
4394
|
var PaginationFilter = ({
|
@@ -4298,11 +4398,11 @@ var PaginationFilter = ({
|
|
4298
4398
|
onChange,
|
4299
4399
|
...rest
|
4300
4400
|
}) => {
|
4301
|
-
const [value, setValue] =
|
4302
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
4303
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4401
|
+
const [value, setValue] = React10.useState(limit);
|
4402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react64.Box, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
4403
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react64.Text, { fontSize: "text.sm", lineHeight: 18, color: (0, import_react64.useColorModeValue)("neutral.900", "white"), ...rest, children: label }),
|
4304
4404
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4305
|
-
|
4405
|
+
import_react64.Select,
|
4306
4406
|
{
|
4307
4407
|
textAlign: "center",
|
4308
4408
|
size: "xs",
|
@@ -4332,22 +4432,22 @@ PaginationFilter.defaultProps = {
|
|
4332
4432
|
var pagination_filter_default = PaginationFilter;
|
4333
4433
|
|
4334
4434
|
// src/components/pin-input/index.ts
|
4335
|
-
var
|
4435
|
+
var import_react65 = require("@chakra-ui/react");
|
4336
4436
|
|
4337
4437
|
// src/components/popover/index.ts
|
4338
|
-
var
|
4438
|
+
var import_react66 = require("@chakra-ui/react");
|
4339
4439
|
|
4340
4440
|
// src/components/progress/index.ts
|
4341
|
-
var
|
4441
|
+
var import_react67 = require("@chakra-ui/react");
|
4342
4442
|
|
4343
4443
|
// src/components/radio/components/radio.tsx
|
4344
|
-
var
|
4444
|
+
var import_react68 = require("@chakra-ui/react");
|
4345
4445
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
4346
4446
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
4347
4447
|
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)(
|
4448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react68.Box, { children: [
|
4449
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.Box, { display: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.Radio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
4450
|
+
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react68.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
4351
4451
|
] });
|
4352
4452
|
};
|
4353
4453
|
Radio.displayName = "Radio";
|
@@ -4358,7 +4458,7 @@ Radio.defaultProps = {
|
|
4358
4458
|
};
|
4359
4459
|
|
4360
4460
|
// src/components/radio/components/radio-group.tsx
|
4361
|
-
var
|
4461
|
+
var import_react69 = require("@chakra-ui/react");
|
4362
4462
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
4363
4463
|
var RadioGroup = ({
|
4364
4464
|
children,
|
@@ -4368,7 +4468,7 @@ var RadioGroup = ({
|
|
4368
4468
|
errorMessage,
|
4369
4469
|
...props
|
4370
4470
|
}) => {
|
4371
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
4471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react69.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react69.RadioGroup, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react69.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
4372
4472
|
};
|
4373
4473
|
RadioGroup.displayName = "RadioGroup";
|
4374
4474
|
RadioGroup.defaultProps = {
|
@@ -4378,34 +4478,34 @@ RadioGroup.defaultProps = {
|
|
4378
4478
|
};
|
4379
4479
|
|
4380
4480
|
// src/components/radio/index.ts
|
4381
|
-
var
|
4481
|
+
var import_react70 = require("@chakra-ui/react");
|
4382
4482
|
|
4383
4483
|
// src/components/rating/components/rating.tsx
|
4384
|
-
var
|
4484
|
+
var import_react71 = require("@chakra-ui/react");
|
4385
4485
|
var import_internal_icon7 = require("@ctlyst.id/internal-icon");
|
4386
4486
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
4387
4487
|
var Rating = ({ value }) => {
|
4388
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
4488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react71.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
4489
|
};
|
4390
4490
|
var rating_default = Rating;
|
4391
4491
|
|
4392
4492
|
// src/components/select/components/select.tsx
|
4393
|
-
var
|
4493
|
+
var import_react75 = require("@chakra-ui/react");
|
4394
4494
|
var import_system7 = require("@chakra-ui/system");
|
4395
4495
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4396
4496
|
var import_react_select = __toESM(require("react-select"));
|
4397
4497
|
|
4398
4498
|
// src/config/theme/foundations/shadows.ts
|
4399
|
-
var
|
4499
|
+
var import_react72 = require("@chakra-ui/react");
|
4400
4500
|
var shadows = {
|
4401
|
-
...
|
4501
|
+
...import_react72.theme.shadows,
|
4402
4502
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4403
4503
|
};
|
4404
4504
|
|
4405
4505
|
// src/config/theme/foundations/sizes.ts
|
4406
|
-
var
|
4506
|
+
var import_react73 = require("@chakra-ui/react");
|
4407
4507
|
var sizes = {
|
4408
|
-
...
|
4508
|
+
...import_react73.theme.sizes,
|
4409
4509
|
4.5: "1.125rem",
|
4410
4510
|
9.5: "2.375rem",
|
4411
4511
|
18: "4.5rem",
|
@@ -4415,9 +4515,9 @@ var sizes = {
|
|
4415
4515
|
};
|
4416
4516
|
|
4417
4517
|
// src/config/theme/foundations/spacing.ts
|
4418
|
-
var
|
4518
|
+
var import_react74 = require("@chakra-ui/react");
|
4419
4519
|
var spacing = {
|
4420
|
-
...
|
4520
|
+
...import_react74.theme.space,
|
4421
4521
|
4.5: "1.125rem",
|
4422
4522
|
9.5: "2.375rem",
|
4423
4523
|
18: "4.5rem",
|
@@ -4777,13 +4877,13 @@ function ClearIndicator(props) {
|
|
4777
4877
|
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
4878
|
}
|
4779
4879
|
function MultiValue(props) {
|
4780
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react75.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4781
4881
|
}
|
4782
4882
|
function MultiValueRemove(props) {
|
4783
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react75.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
4784
4884
|
}
|
4785
4885
|
function NoOptionsMessage(props) {
|
4786
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react75.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
4887
|
}
|
4788
4888
|
function Select2({
|
4789
4889
|
styles,
|
@@ -4891,7 +4991,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
4891
4991
|
}
|
4892
4992
|
|
4893
4993
|
// src/components/select/components/select-with-checkbox.tsx
|
4894
|
-
var
|
4994
|
+
var import_react76 = require("@chakra-ui/react");
|
4895
4995
|
var import_system11 = require("@chakra-ui/system");
|
4896
4996
|
var import_react_select2 = __toESM(require("react-select"));
|
4897
4997
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
@@ -4954,7 +5054,7 @@ var InputOption = ({
|
|
4954
5054
|
innerProps: props,
|
4955
5055
|
...rest,
|
4956
5056
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
4957
|
-
|
5057
|
+
import_react76.Flex,
|
4958
5058
|
{
|
4959
5059
|
alignItems: "center",
|
4960
5060
|
width: "100%",
|
@@ -4963,7 +5063,7 @@ var InputOption = ({
|
|
4963
5063
|
cursor: isDisabled ? "not-allowed" : "default",
|
4964
5064
|
children: [
|
4965
5065
|
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4966
|
-
|
5066
|
+
import_react76.Checkbox,
|
4967
5067
|
{
|
4968
5068
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
4969
5069
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -4972,14 +5072,14 @@ var InputOption = ({
|
|
4972
5072
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
4973
5073
|
}
|
4974
5074
|
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4975
|
-
|
5075
|
+
import_react76.Checkbox,
|
4976
5076
|
{
|
4977
5077
|
pointerEvents: "none",
|
4978
5078
|
isChecked: isSelected,
|
4979
5079
|
"data-test-id": "CT_component_select-checkbox_option-checkbox"
|
4980
5080
|
}
|
4981
5081
|
),
|
4982
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5082
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react76.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
4983
5083
|
]
|
4984
5084
|
}
|
4985
5085
|
)
|
@@ -5051,13 +5151,13 @@ var SelectCheckbox = (props) => {
|
|
5051
5151
|
var select_with_checkbox_default = SelectCheckbox;
|
5052
5152
|
|
5053
5153
|
// src/components/sidebar/components/sidebar.tsx
|
5054
|
-
var
|
5154
|
+
var import_react77 = require("@chakra-ui/react");
|
5055
5155
|
var import_framer_motion = require("framer-motion");
|
5056
5156
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5057
5157
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5058
5158
|
const { width = "220px" } = props;
|
5059
5159
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5060
|
-
|
5160
|
+
import_react77.Flex,
|
5061
5161
|
{
|
5062
5162
|
position: "relative",
|
5063
5163
|
as: import_framer_motion.motion.div,
|
@@ -5077,13 +5177,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5077
5177
|
Sidebar.displayName = "Sidebar";
|
5078
5178
|
|
5079
5179
|
// src/components/sidebar/components/sidebar-header.tsx
|
5080
|
-
var
|
5180
|
+
var import_react78 = require("@chakra-ui/react");
|
5081
5181
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5082
5182
|
var import_framer_motion2 = require("framer-motion");
|
5083
5183
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5084
5184
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5085
5185
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5086
|
-
|
5186
|
+
import_react78.Box,
|
5087
5187
|
{
|
5088
5188
|
px: "2",
|
5089
5189
|
color: "neutral.900",
|
@@ -5093,7 +5193,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5093
5193
|
color: "primary.500"
|
5094
5194
|
},
|
5095
5195
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5096
|
-
|
5196
|
+
import_react78.Flex,
|
5097
5197
|
{
|
5098
5198
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5099
5199
|
direction: "row",
|
@@ -5103,7 +5203,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5103
5203
|
cursor: "pointer",
|
5104
5204
|
children: [
|
5105
5205
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5106
|
-
|
5206
|
+
import_react78.Box,
|
5107
5207
|
{
|
5108
5208
|
as: import_framer_motion2.motion.div,
|
5109
5209
|
boxSize: "4",
|
@@ -5114,8 +5214,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5114
5214
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5115
5215
|
}
|
5116
5216
|
),
|
5117
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5118
|
-
|
5217
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react78.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5218
|
+
import_react78.Text,
|
5119
5219
|
{
|
5120
5220
|
as: import_framer_motion2.motion.div,
|
5121
5221
|
w: "max-content",
|
@@ -5141,32 +5241,32 @@ SidebarHeader.defaultProps = {
|
|
5141
5241
|
};
|
5142
5242
|
|
5143
5243
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5144
|
-
var
|
5244
|
+
var import_react79 = require("@chakra-ui/react");
|
5145
5245
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5146
5246
|
var import_framer_motion3 = require("framer-motion");
|
5147
5247
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5148
5248
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5149
5249
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5150
|
-
|
5250
|
+
import_react79.Box,
|
5151
5251
|
{
|
5152
5252
|
as: import_framer_motion3.motion.div,
|
5153
5253
|
transitionTimingFunction: "linear",
|
5154
5254
|
initial: { padding: "8px" },
|
5155
5255
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5156
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5157
5257
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5158
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5159
5259
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5160
5260
|
const noChild = !item.children.length;
|
5161
5261
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5162
5262
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5163
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5263
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5164
5264
|
const activeOption = isOpen ? "primary.50" : "white";
|
5165
5265
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5166
5266
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5167
5267
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5168
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5169
|
-
|
5268
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5269
|
+
import_react79.AccordionButton,
|
5170
5270
|
{
|
5171
5271
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5172
5272
|
p: "0",
|
@@ -5184,9 +5284,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5184
5284
|
position: "relative",
|
5185
5285
|
...itemStyles,
|
5186
5286
|
children: [
|
5187
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5287
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5188
5288
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5189
|
-
|
5289
|
+
import_react79.Box,
|
5190
5290
|
{
|
5191
5291
|
display: "flex",
|
5192
5292
|
w: "full",
|
@@ -5200,9 +5300,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5200
5300
|
animate: { opacity: 1, x: 0 },
|
5201
5301
|
exit: { opacity: 0, x: 16 },
|
5202
5302
|
children: [
|
5203
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5303
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5204
5304
|
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5205
|
-
|
5305
|
+
import_react79.Box,
|
5206
5306
|
{
|
5207
5307
|
display: "flex",
|
5208
5308
|
boxSize: "3",
|
@@ -5222,12 +5322,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5222
5322
|
},
|
5223
5323
|
item.id
|
5224
5324
|
) }, item.id),
|
5225
|
-
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5226
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5325
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react79.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5326
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react79.Box, { display: "flex", alignItems: "center", children: [
|
5227
5327
|
mappingIcon2.get(item.icon || ""),
|
5228
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5328
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Box, { as: "span", ml: "2", children: item.title })
|
5229
5329
|
] }) }),
|
5230
|
-
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5330
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5231
5331
|
NavItem,
|
5232
5332
|
{
|
5233
5333
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5243,7 +5343,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5243
5343
|
},
|
5244
5344
|
submenu.id
|
5245
5345
|
)) })
|
5246
|
-
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5346
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5247
5347
|
NavItem,
|
5248
5348
|
{
|
5249
5349
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5256,8 +5356,8 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5256
5356
|
rounded: "none",
|
5257
5357
|
...itemStyles,
|
5258
5358
|
children: [
|
5259
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5260
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5359
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5360
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5261
5361
|
]
|
5262
5362
|
},
|
5263
5363
|
item.id
|
@@ -5265,13 +5365,13 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5265
5365
|
] });
|
5266
5366
|
} }, item.id),
|
5267
5367
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5268
|
-
|
5368
|
+
import_react79.Fade,
|
5269
5369
|
{
|
5270
5370
|
in: true,
|
5271
5371
|
transition: {
|
5272
5372
|
enter: { duration: 0.5 }
|
5273
5373
|
},
|
5274
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react79.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5275
5375
|
NavItem,
|
5276
5376
|
{
|
5277
5377
|
mt: "1",
|
@@ -5299,16 +5399,16 @@ SidebarMenu.defaultProps = {
|
|
5299
5399
|
};
|
5300
5400
|
|
5301
5401
|
// src/components/switch/components/switch.tsx
|
5302
|
-
var
|
5402
|
+
var import_react80 = require("@chakra-ui/react");
|
5303
5403
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5304
5404
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5305
|
-
var
|
5405
|
+
var import_react81 = require("react");
|
5306
5406
|
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,
|
5407
|
+
var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
5408
|
+
const styles = (0, import_react80.useMultiStyleConfig)("Switch", props);
|
5409
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react80.omitThemingProps)(props);
|
5410
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react80.useCheckbox)(ownProps);
|
5411
|
+
const containerStyles = (0, import_react81.useMemo)(
|
5312
5412
|
() => ({
|
5313
5413
|
display: "inline-block",
|
5314
5414
|
position: "relative",
|
@@ -5318,7 +5418,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5318
5418
|
}),
|
5319
5419
|
[styles.container]
|
5320
5420
|
);
|
5321
|
-
const trackStyles = (0,
|
5421
|
+
const trackStyles = (0, import_react81.useMemo)(
|
5322
5422
|
() => ({
|
5323
5423
|
display: "inline-flex",
|
5324
5424
|
flexShrink: 0,
|
@@ -5330,7 +5430,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5330
5430
|
}),
|
5331
5431
|
[styles.track]
|
5332
5432
|
);
|
5333
|
-
const labelStyles = (0,
|
5433
|
+
const labelStyles = (0, import_react81.useMemo)(
|
5334
5434
|
() => ({
|
5335
5435
|
userSelect: "none",
|
5336
5436
|
marginStart: spacing2,
|
@@ -5347,7 +5447,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5347
5447
|
return iconSize[value];
|
5348
5448
|
};
|
5349
5449
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5350
|
-
|
5450
|
+
import_react80.chakra.label,
|
5351
5451
|
{
|
5352
5452
|
...getRootProps(),
|
5353
5453
|
display: "flex",
|
@@ -5356,13 +5456,13 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5356
5456
|
__css: containerStyles,
|
5357
5457
|
children: [
|
5358
5458
|
/* @__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)(
|
5459
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react80.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5460
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react80.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5361
5461
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5362
5462
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5363
5463
|
] }),
|
5364
5464
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5365
|
-
|
5465
|
+
import_react80.chakra.span,
|
5366
5466
|
{
|
5367
5467
|
__css: styles.thumb,
|
5368
5468
|
className: "chakra-switch__thumb",
|
@@ -5372,7 +5472,7 @@ var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
|
5372
5472
|
)
|
5373
5473
|
] }),
|
5374
5474
|
children && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5375
|
-
|
5475
|
+
import_react80.chakra.span,
|
5376
5476
|
{
|
5377
5477
|
className: "chakra-switch__label",
|
5378
5478
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5392,18 +5492,18 @@ Switch.defaultProps = {
|
|
5392
5492
|
var switch_default = Switch;
|
5393
5493
|
|
5394
5494
|
// src/components/table/index.tsx
|
5395
|
-
var
|
5495
|
+
var import_react82 = require("@chakra-ui/react");
|
5396
5496
|
|
5397
5497
|
// src/components/tabs/components/tab.tsx
|
5398
|
-
var
|
5498
|
+
var import_react83 = require("@chakra-ui/react");
|
5399
5499
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5400
|
-
var Tab = (0,
|
5500
|
+
var Tab = (0, import_react83.forwardRef)((props, ref) => {
|
5401
5501
|
var _a, _b;
|
5402
|
-
const tabProps = (0,
|
5502
|
+
const tabProps = (0, import_react83.useTab)({ ...props, ref });
|
5403
5503
|
const isSelected = !!tabProps["aria-selected"];
|
5404
|
-
const styles = (0,
|
5504
|
+
const styles = (0, import_react83.useMultiStyleConfig)("Tabs", tabProps);
|
5405
5505
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5406
|
-
|
5506
|
+
import_react83.Button,
|
5407
5507
|
{
|
5408
5508
|
"data-test-id": props["data-test-id"],
|
5409
5509
|
p: 4,
|
@@ -5428,7 +5528,7 @@ var Tab = (0, import_react81.forwardRef)((props, ref) => {
|
|
5428
5528
|
},
|
5429
5529
|
__css: styles.tab,
|
5430
5530
|
...tabProps,
|
5431
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react83.Flex, { alignItems: "center", children: [
|
5432
5532
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5433
5533
|
tabProps.children,
|
5434
5534
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5439,39 +5539,39 @@ var Tab = (0, import_react81.forwardRef)((props, ref) => {
|
|
5439
5539
|
var tab_default = Tab;
|
5440
5540
|
|
5441
5541
|
// src/components/tabs/index.ts
|
5442
|
-
var
|
5542
|
+
var import_react84 = require("@chakra-ui/react");
|
5443
5543
|
|
5444
5544
|
// src/components/text/index.ts
|
5445
|
-
var
|
5545
|
+
var import_react85 = require("@chakra-ui/react");
|
5446
5546
|
|
5447
5547
|
// src/components/time-input/components/index.tsx
|
5448
|
-
var
|
5548
|
+
var import_react87 = require("@chakra-ui/react");
|
5449
5549
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5450
|
-
var
|
5550
|
+
var import_react88 = require("react");
|
5451
5551
|
|
5452
5552
|
// src/components/time-input/components/integration.tsx
|
5453
5553
|
var import_timescape = require("@zamiru/timescape");
|
5454
5554
|
var import_timescape2 = require("@zamiru/timescape");
|
5455
|
-
var
|
5555
|
+
var import_react86 = require("react");
|
5456
5556
|
var useTimescape = (options = {}) => {
|
5457
5557
|
var _a;
|
5458
5558
|
const { date, onChangeDate, ...rest } = options;
|
5459
|
-
const [manager] = (0,
|
5460
|
-
const onChangeDateRef = (0,
|
5461
|
-
(0,
|
5559
|
+
const [manager] = (0, import_react86.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5560
|
+
const onChangeDateRef = (0, import_react86.useRef)(onChangeDate);
|
5561
|
+
(0, import_react86.useLayoutEffect)(() => {
|
5462
5562
|
onChangeDateRef.current = onChangeDate;
|
5463
5563
|
}, [onChangeDate]);
|
5464
|
-
const [optionsState, update] = (0,
|
5564
|
+
const [optionsState, update] = (0, import_react86.useState)(() => ({
|
5465
5565
|
date,
|
5466
5566
|
...rest
|
5467
5567
|
}));
|
5468
|
-
(0,
|
5568
|
+
(0, import_react86.useEffect)(() => {
|
5469
5569
|
manager.resync();
|
5470
5570
|
return () => {
|
5471
5571
|
manager.remove();
|
5472
5572
|
};
|
5473
5573
|
}, [manager]);
|
5474
|
-
(0,
|
5574
|
+
(0, import_react86.useEffect)(() => {
|
5475
5575
|
return manager.on("changeDate", (nextDate) => {
|
5476
5576
|
var _a2;
|
5477
5577
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5479,7 +5579,7 @@ var useTimescape = (options = {}) => {
|
|
5479
5579
|
});
|
5480
5580
|
}, [manager]);
|
5481
5581
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5482
|
-
(0,
|
5582
|
+
(0, import_react86.useEffect)(() => {
|
5483
5583
|
manager.date = timestamp;
|
5484
5584
|
manager.minDate = optionsState.minDate;
|
5485
5585
|
manager.maxDate = optionsState.maxDate;
|
@@ -5545,9 +5645,9 @@ var timeFromString = (timeString) => {
|
|
5545
5645
|
const [hours, minutes, seconds] = timeString.split(":");
|
5546
5646
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5547
5647
|
};
|
5548
|
-
var InputTimeArea = (0,
|
5648
|
+
var InputTimeArea = (0, import_react87.forwardRef)((props, ref) => {
|
5549
5649
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5550
|
-
|
5650
|
+
import_react87.Input,
|
5551
5651
|
{
|
5552
5652
|
_focusWithin: {
|
5553
5653
|
bg: "neutral.300"
|
@@ -5565,7 +5665,7 @@ var InputTimeArea = (0, import_react85.forwardRef)((props, ref) => {
|
|
5565
5665
|
}
|
5566
5666
|
);
|
5567
5667
|
});
|
5568
|
-
var TimeInput2 = (0,
|
5668
|
+
var TimeInput2 = (0, import_react87.forwardRef)(
|
5569
5669
|
({
|
5570
5670
|
name,
|
5571
5671
|
config: config2,
|
@@ -5592,7 +5692,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5592
5692
|
date,
|
5593
5693
|
...config2
|
5594
5694
|
});
|
5595
|
-
(0,
|
5695
|
+
(0, import_react88.useEffect)(() => {
|
5596
5696
|
var _a, _b, _c, _d, _e, _f;
|
5597
5697
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5598
5698
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5601,7 +5701,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5601
5701
|
onChangeTime(timeValue);
|
5602
5702
|
}
|
5603
5703
|
}, [options.date]);
|
5604
|
-
(0,
|
5704
|
+
(0, import_react88.useImperativeHandle)(ref, () => ({
|
5605
5705
|
focus() {
|
5606
5706
|
_manager.focusField("hours");
|
5607
5707
|
}
|
@@ -5622,7 +5722,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5622
5722
|
};
|
5623
5723
|
};
|
5624
5724
|
const { outlineColor, focusColor } = getProperties();
|
5625
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react87.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5626
5726
|
field_default,
|
5627
5727
|
{
|
5628
5728
|
isError,
|
@@ -5632,7 +5732,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5632
5732
|
isDisabled,
|
5633
5733
|
isSuccess,
|
5634
5734
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5635
|
-
|
5735
|
+
import_react87.Box,
|
5636
5736
|
{
|
5637
5737
|
transition: "all 0.15s",
|
5638
5738
|
boxShadow: "none",
|
@@ -5643,7 +5743,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5643
5743
|
borderColor: focusColor
|
5644
5744
|
},
|
5645
5745
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5646
|
-
|
5746
|
+
import_react87.InputGroup,
|
5647
5747
|
{
|
5648
5748
|
borderRadius: "sm",
|
5649
5749
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5652,7 +5752,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5652
5752
|
gap: 3,
|
5653
5753
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5654
5754
|
children: [
|
5655
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5755
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react87.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5656
5756
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5657
5757
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5658
5758
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
@@ -5660,7 +5760,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5660
5760
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5661
5761
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5662
5762
|
] }),
|
5663
|
-
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5763
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react87.Input, { p: 0, ...getInputProps("am/pm") })
|
5664
5764
|
] }),
|
5665
5765
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5666
5766
|
addOnRight
|
@@ -5675,16 +5775,16 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5675
5775
|
);
|
5676
5776
|
|
5677
5777
|
// src/components/toast/components/toast.tsx
|
5678
|
-
var
|
5778
|
+
var import_react90 = require("@chakra-ui/react");
|
5679
5779
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5680
5780
|
var import_react_toastify = require("react-toastify");
|
5681
5781
|
|
5682
5782
|
// src/components/toast/components/styles.tsx
|
5683
|
-
var
|
5783
|
+
var import_react89 = require("@emotion/react");
|
5684
5784
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5685
5785
|
var Styles2 = () => {
|
5686
5786
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5687
|
-
|
5787
|
+
import_react89.Global,
|
5688
5788
|
{
|
5689
5789
|
styles: `
|
5690
5790
|
.Toastify__toast-container {
|
@@ -5718,7 +5818,7 @@ var styles_default2 = Styles2;
|
|
5718
5818
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5719
5819
|
var CustomCloseButton = (props) => {
|
5720
5820
|
const { closeToast } = props;
|
5721
|
-
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react90.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
5822
|
};
|
5723
5823
|
var DEFAULT_OPTIONS = {
|
5724
5824
|
position: "top-right",
|
@@ -5741,7 +5841,7 @@ var renderIcon = (icon, type) => {
|
|
5741
5841
|
return icon;
|
5742
5842
|
};
|
5743
5843
|
var useToast = () => {
|
5744
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
5844
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react90.useToken)("colors", [
|
5745
5845
|
"primary.500",
|
5746
5846
|
"neutral.500",
|
5747
5847
|
"info.500",
|
@@ -5752,13 +5852,13 @@ var useToast = () => {
|
|
5752
5852
|
const content = (icon, message, link) => {
|
5753
5853
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5754
5854
|
/* @__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)(
|
5855
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react90.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, children: [
|
5856
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react90.Flex, { alignItems: "center", children: [
|
5857
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react90.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
5858
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react90.chakra.span, { noOfLines: 2, children: message })
|
5759
5859
|
] }),
|
5760
5860
|
link && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5761
|
-
|
5861
|
+
import_react90.Link,
|
5762
5862
|
{
|
5763
5863
|
href: link.url,
|
5764
5864
|
textDecoration: "underline",
|
@@ -5837,9 +5937,9 @@ var useToast = () => {
|
|
5837
5937
|
var import_react_toastify2 = require("react-toastify");
|
5838
5938
|
|
5839
5939
|
// src/components/uploader/components/uploader.tsx
|
5840
|
-
var
|
5940
|
+
var import_react91 = require("@chakra-ui/react");
|
5841
5941
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
5842
|
-
var
|
5942
|
+
var import_react92 = require("react");
|
5843
5943
|
var import_react_dropzone = require("react-dropzone");
|
5844
5944
|
|
5845
5945
|
// src/components/uploader/constants.ts
|
@@ -5938,9 +6038,9 @@ var Uploader = ({
|
|
5938
6038
|
validatorExt,
|
5939
6039
|
...props
|
5940
6040
|
}) => {
|
5941
|
-
const [filePreview, setFilePreview] = (0,
|
6041
|
+
const [filePreview, setFilePreview] = (0, import_react92.useState)();
|
5942
6042
|
const toast2 = useToast();
|
5943
|
-
const handleRejection = (0,
|
6043
|
+
const handleRejection = (0, import_react92.useCallback)(
|
5944
6044
|
(message, file, image) => {
|
5945
6045
|
if (onHandleRejections) {
|
5946
6046
|
onHandleRejections(file, image);
|
@@ -5950,7 +6050,7 @@ var Uploader = ({
|
|
5950
6050
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
5951
6051
|
[onHandleRejections]
|
5952
6052
|
);
|
5953
|
-
const onDropAccepted = (0,
|
6053
|
+
const onDropAccepted = (0, import_react92.useCallback)(
|
5954
6054
|
(files) => {
|
5955
6055
|
const file = files[0];
|
5956
6056
|
const imageUrl = URL.createObjectURL(file);
|
@@ -5973,10 +6073,10 @@ var Uploader = ({
|
|
5973
6073
|
},
|
5974
6074
|
[acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
|
5975
6075
|
);
|
5976
|
-
const onDropRejected = (0,
|
6076
|
+
const onDropRejected = (0, import_react92.useCallback)((fileRejections) => {
|
5977
6077
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
5978
6078
|
}, []);
|
5979
|
-
const validator = (0,
|
6079
|
+
const validator = (0, import_react92.useCallback)(
|
5980
6080
|
(file) => {
|
5981
6081
|
const result = [];
|
5982
6082
|
if (validatorExt) {
|
@@ -6006,26 +6106,26 @@ var Uploader = ({
|
|
6006
6106
|
const renderHelperText = () => {
|
6007
6107
|
if (Array.isArray(helperText)) {
|
6008
6108
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6009
|
-
|
6109
|
+
import_react91.UnorderedList,
|
6010
6110
|
{
|
6011
6111
|
pl: 2,
|
6012
6112
|
fontSize: 12,
|
6013
6113
|
color: "black.medium",
|
6014
6114
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6015
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6115
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.ListItem, { children: text2 }, text2))
|
6016
6116
|
}
|
6017
6117
|
);
|
6018
6118
|
}
|
6019
6119
|
return helperText;
|
6020
6120
|
};
|
6021
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6121
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6022
6122
|
const handleRemove = (e) => {
|
6023
6123
|
e.stopPropagation();
|
6024
6124
|
setFilePreview(void 0);
|
6025
6125
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6026
6126
|
acceptedFiles.pop();
|
6027
6127
|
};
|
6028
|
-
(0,
|
6128
|
+
(0, import_react92.useEffect)(() => {
|
6029
6129
|
if (value) {
|
6030
6130
|
if (typeof value === "string") {
|
6031
6131
|
setFilePreview(value);
|
@@ -6041,16 +6141,16 @@ var Uploader = ({
|
|
6041
6141
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6042
6142
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6043
6143
|
const cursorType = filePreview ? "initial" : "pointer";
|
6044
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react91.FormControl, { isRequired, children: [
|
6045
6145
|
label && typeof label === "string" ? (
|
6046
6146
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6047
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6048
|
-
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6147
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react91.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, {}), fontSize: "text.sm", children: [
|
6148
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.RequiredIndicator, { mr: 1, ml: 0 }),
|
6049
6149
|
label
|
6050
6150
|
] })
|
6051
6151
|
) : label,
|
6052
6152
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6053
|
-
|
6153
|
+
import_react91.Flex,
|
6054
6154
|
{
|
6055
6155
|
minH: containerHeight,
|
6056
6156
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6067,8 +6167,8 @@ var Uploader = ({
|
|
6067
6167
|
...props,
|
6068
6168
|
...getRootProps(),
|
6069
6169
|
children: [
|
6070
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6071
|
-
|
6170
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6171
|
+
import_react91.Button,
|
6072
6172
|
{
|
6073
6173
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6074
6174
|
"aria-label": "remove-image",
|
@@ -6085,15 +6185,15 @@ var Uploader = ({
|
|
6085
6185
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6086
6186
|
}
|
6087
6187
|
) }),
|
6088
|
-
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6089
|
-
|
6188
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6189
|
+
import_react91.Flex,
|
6090
6190
|
{
|
6091
6191
|
position: "relative",
|
6092
6192
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6093
6193
|
justify: "center",
|
6094
6194
|
align: "center",
|
6095
6195
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6096
|
-
|
6196
|
+
import_react91.Image,
|
6097
6197
|
{
|
6098
6198
|
h: size2 === "lg" ? "120" : "100",
|
6099
6199
|
src: filePreview,
|
@@ -6103,11 +6203,11 @@ var Uploader = ({
|
|
6103
6203
|
)
|
6104
6204
|
}
|
6105
6205
|
) }),
|
6106
|
-
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6206
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react91.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6107
6207
|
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6108
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6208
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react91.Box, { children: [
|
6109
6209
|
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6110
|
-
|
6210
|
+
import_react91.Heading,
|
6111
6211
|
{
|
6112
6212
|
fontWeight: "400",
|
6113
6213
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6116,7 +6216,7 @@ var Uploader = ({
|
|
6116
6216
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6117
6217
|
}
|
6118
6218
|
),
|
6119
|
-
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6219
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6120
6220
|
] })
|
6121
6221
|
] }) })
|
6122
6222
|
]
|
@@ -6129,8 +6229,8 @@ var Uploader = ({
|
|
6129
6229
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6130
6230
|
}
|
6131
6231
|
),
|
6132
|
-
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6133
|
-
|
6232
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react91.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6233
|
+
import_react91.Button,
|
6134
6234
|
{
|
6135
6235
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6136
6236
|
type: "button",
|
@@ -6176,10 +6276,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6176
6276
|
};
|
6177
6277
|
|
6178
6278
|
// src/components/index.ts
|
6179
|
-
var
|
6279
|
+
var import_react93 = require("@chakra-ui/react");
|
6180
6280
|
|
6181
6281
|
// src/config/theme/themeConfiguration.ts
|
6182
|
-
var
|
6282
|
+
var import_react101 = require("@chakra-ui/react");
|
6183
6283
|
|
6184
6284
|
// src/config/theme/components/index.ts
|
6185
6285
|
var components_exports = {};
|
@@ -6736,8 +6836,8 @@ var card_default2 = CardStyle;
|
|
6736
6836
|
|
6737
6837
|
// src/config/theme/components/checkbox.ts
|
6738
6838
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
6739
|
-
var
|
6740
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
6839
|
+
var import_react94 = require("@chakra-ui/react");
|
6840
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react94.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
6741
6841
|
var baseStyle3 = definePartsStyle3({
|
6742
6842
|
control: {
|
6743
6843
|
borderRadius: "sm",
|
@@ -6838,8 +6938,8 @@ var checkbox_default2 = Checkbox4;
|
|
6838
6938
|
|
6839
6939
|
// src/config/theme/components/chips.ts
|
6840
6940
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
6841
|
-
var
|
6842
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
6941
|
+
var import_react95 = require("@chakra-ui/react");
|
6942
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react95.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
6843
6943
|
var baseStyle4 = definePartsStyle4({
|
6844
6944
|
container: {
|
6845
6945
|
px: 3,
|
@@ -7048,8 +7148,8 @@ var input_default = Input4;
|
|
7048
7148
|
|
7049
7149
|
// src/config/theme/components/loader.ts
|
7050
7150
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7051
|
-
var
|
7052
|
-
var rotate = (0,
|
7151
|
+
var import_react96 = require("@emotion/react");
|
7152
|
+
var rotate = (0, import_react96.keyframes)({
|
7053
7153
|
"0%": {
|
7054
7154
|
transform: "rotate(0deg)"
|
7055
7155
|
},
|
@@ -7231,8 +7331,8 @@ var modal_default = modalTheme;
|
|
7231
7331
|
|
7232
7332
|
// src/config/theme/components/popover.ts
|
7233
7333
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7234
|
-
var
|
7235
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
7334
|
+
var import_react97 = require("@chakra-ui/react");
|
7335
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react97.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
7236
7336
|
var baseStyle8 = definePartsStyle7({
|
7237
7337
|
content: {
|
7238
7338
|
bg: "white"
|
@@ -7243,8 +7343,8 @@ var popover_default = popoverTheme;
|
|
7243
7343
|
|
7244
7344
|
// src/config/theme/components/radio.ts
|
7245
7345
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7246
|
-
var
|
7247
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
7346
|
+
var import_react98 = require("@chakra-ui/react");
|
7347
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react98.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
7248
7348
|
var baseStyle9 = definePartsStyle8({
|
7249
7349
|
control: {
|
7250
7350
|
border: "1px solid",
|
@@ -7666,7 +7766,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7666
7766
|
var tabs_default = tabsTheme;
|
7667
7767
|
|
7668
7768
|
// src/config/theme/components/textarea.ts
|
7669
|
-
var
|
7769
|
+
var import_react99 = require("@chakra-ui/react");
|
7670
7770
|
var getProps = (props) => {
|
7671
7771
|
const { isError, isSuccess, isDisabled } = props;
|
7672
7772
|
let borderColor = "neutral.400";
|
@@ -7686,7 +7786,7 @@ var getProps = (props) => {
|
|
7686
7786
|
borderColor
|
7687
7787
|
};
|
7688
7788
|
};
|
7689
|
-
var outline3 = (0,
|
7789
|
+
var outline3 = (0, import_react99.defineStyle)((props) => {
|
7690
7790
|
const { focusBorderColor, borderColor } = getProps(props);
|
7691
7791
|
return {
|
7692
7792
|
background: "white.high",
|
@@ -7730,7 +7830,7 @@ var outline3 = (0, import_react97.defineStyle)((props) => {
|
|
7730
7830
|
}
|
7731
7831
|
};
|
7732
7832
|
});
|
7733
|
-
var Textarea = (0,
|
7833
|
+
var Textarea = (0, import_react99.defineStyleConfig)({
|
7734
7834
|
variants: { outline: outline3 },
|
7735
7835
|
defaultProps: {
|
7736
7836
|
variant: "outline"
|
@@ -7739,15 +7839,15 @@ var Textarea = (0, import_react97.defineStyleConfig)({
|
|
7739
7839
|
var textarea_default2 = Textarea;
|
7740
7840
|
|
7741
7841
|
// src/config/theme/components/tooltip.ts
|
7742
|
-
var
|
7743
|
-
var $arrowBg = (0,
|
7842
|
+
var import_react100 = require("@chakra-ui/react");
|
7843
|
+
var $arrowBg = (0, import_react100.cssVar)("popper-arrow-bg");
|
7744
7844
|
var baseStyle12 = {
|
7745
7845
|
bg: "neutral.700",
|
7746
7846
|
textStyle: "text.sm",
|
7747
7847
|
fontSize: "text.sm",
|
7748
7848
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
7749
7849
|
};
|
7750
|
-
var Tooltip2 = (0,
|
7850
|
+
var Tooltip2 = (0, import_react100.defineStyleConfig)({ baseStyle: baseStyle12 });
|
7751
7851
|
var tooltip_default = Tooltip2;
|
7752
7852
|
|
7753
7853
|
// src/config/theme/themeConfiguration.ts
|
@@ -7766,7 +7866,7 @@ var createExtendTheme = (theme5) => {
|
|
7766
7866
|
return function extendTheme2(...extensions) {
|
7767
7867
|
let overrides = [...extensions];
|
7768
7868
|
let activeTheme = extensions[extensions.length - 1];
|
7769
|
-
if ((0,
|
7869
|
+
if ((0, import_react101.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
7770
7870
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
7771
7871
|
overrides.length > 1) {
|
7772
7872
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -7775,13 +7875,13 @@ var createExtendTheme = (theme5) => {
|
|
7775
7875
|
}
|
7776
7876
|
return pipe(
|
7777
7877
|
...overrides.map(
|
7778
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
7878
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react101.mergeThemeOverride)(prevTheme, extension)
|
7779
7879
|
)
|
7780
7880
|
)(activeTheme);
|
7781
7881
|
};
|
7782
7882
|
};
|
7783
7883
|
var getTheme = (foundations) => {
|
7784
|
-
return (0,
|
7884
|
+
return (0, import_react101.extendTheme)({
|
7785
7885
|
...foundations,
|
7786
7886
|
components: {
|
7787
7887
|
...components_exports
|
@@ -7798,7 +7898,7 @@ var getTheme = (foundations) => {
|
|
7798
7898
|
config
|
7799
7899
|
});
|
7800
7900
|
};
|
7801
|
-
var theme4 = (0,
|
7901
|
+
var theme4 = (0, import_react101.extendTheme)({
|
7802
7902
|
components: {
|
7803
7903
|
...components_exports
|
7804
7904
|
},
|
@@ -7818,23 +7918,23 @@ var theme4 = (0, import_react99.extendTheme)({
|
|
7818
7918
|
|
7819
7919
|
// src/hooks/useFetcher.ts
|
7820
7920
|
var import_axios2 = __toESM(require("axios"));
|
7821
|
-
var
|
7921
|
+
var import_react104 = require("react");
|
7822
7922
|
|
7823
7923
|
// src/provider/components/provider.tsx
|
7824
7924
|
var import_axios = __toESM(require("axios"));
|
7825
|
-
var
|
7925
|
+
var import_react102 = require("react");
|
7826
7926
|
var import_react_toastify3 = require("react-toastify");
|
7827
7927
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
7828
|
-
var ProviderContext = (0,
|
7928
|
+
var ProviderContext = (0, import_react102.createContext)({
|
7829
7929
|
instance: void 0
|
7830
7930
|
});
|
7831
7931
|
var useInternalUI = () => {
|
7832
|
-
const { instance } = (0,
|
7932
|
+
const { instance } = (0, import_react102.useContext)(ProviderContext);
|
7833
7933
|
return { instance };
|
7834
7934
|
};
|
7835
7935
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
7836
|
-
const instanceRef = (0,
|
7837
|
-
(0,
|
7936
|
+
const instanceRef = (0, import_react102.useRef)(import_axios.default.create(config2));
|
7937
|
+
(0, import_react102.useEffect)(() => {
|
7838
7938
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
7839
7939
|
instanceRef.current.interceptors.request.use(interceptor);
|
7840
7940
|
});
|
@@ -7842,7 +7942,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
7842
7942
|
instanceRef.current.interceptors.response.use(interceptor);
|
7843
7943
|
});
|
7844
7944
|
}, [requestInterceptors, responseInterceptors]);
|
7845
|
-
const provider = (0,
|
7945
|
+
const provider = (0, import_react102.useMemo)(() => ({ instance: instanceRef.current }), []);
|
7846
7946
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
7847
7947
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_toastify3.ToastContainer, {}),
|
7848
7948
|
children
|
@@ -7852,12 +7952,12 @@ Provider.displayName = "Provider";
|
|
7852
7952
|
var provider_default = Provider;
|
7853
7953
|
|
7854
7954
|
// src/provider/index.ts
|
7855
|
-
var
|
7955
|
+
var import_react103 = require("@chakra-ui/react");
|
7856
7956
|
|
7857
7957
|
// src/hooks/useFetcher.ts
|
7858
7958
|
function useFetcher() {
|
7859
7959
|
const { instance } = useInternalUI();
|
7860
|
-
const axiosInstance = (0,
|
7960
|
+
const axiosInstance = (0, import_react104.useMemo)(() => instance || import_axios2.default, [instance]);
|
7861
7961
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
7862
7962
|
const response = await axiosInstance.request({
|
7863
7963
|
data,
|
@@ -7877,10 +7977,10 @@ function useFetcher() {
|
|
7877
7977
|
}
|
7878
7978
|
|
7879
7979
|
// src/hooks/index.ts
|
7880
|
-
var
|
7980
|
+
var import_react105 = require("@chakra-ui/react");
|
7881
7981
|
|
7882
7982
|
// src/index.ts
|
7883
|
-
var
|
7983
|
+
var import_react106 = require("@chakra-ui/react");
|
7884
7984
|
// Annotate the CommonJS export names for ESM import in node:
|
7885
7985
|
0 && (module.exports = {
|
7886
7986
|
Accordion,
|
@@ -8237,6 +8337,7 @@ var import_react104 = require("@chakra-ui/react");
|
|
8237
8337
|
useRadio,
|
8238
8338
|
useRadioGroup,
|
8239
8339
|
useRadioGroupContext,
|
8340
|
+
useSelectTable,
|
8240
8341
|
useSteps,
|
8241
8342
|
useTab,
|
8242
8343
|
useTabIndicator,
|