@ctlyst.id/internal-ui 5.6.6 → 5.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +756 -736
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -77
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45,56 +45,56 @@ __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_react59.AlertDialog,
|
|
49
|
+
AlertDialogBody: () => import_react59.ModalBody,
|
|
50
|
+
AlertDialogCloseButton: () => import_react59.ModalCloseButton,
|
|
51
|
+
AlertDialogContent: () => import_react59.AlertDialogContent,
|
|
52
|
+
AlertDialogFooter: () => import_react59.ModalFooter,
|
|
53
|
+
AlertDialogHeader: () => import_react59.ModalHeader,
|
|
54
|
+
AlertDialogOverlay: () => import_react59.ModalOverlay,
|
|
55
|
+
AlertDialogProps: () => import_react59.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_react99.Avatar,
|
|
60
|
+
AvatarBadge: () => import_react99.AvatarBadge,
|
|
61
|
+
AvatarBadgeProps: () => import_react99.AvatarBadgeProps,
|
|
62
|
+
AvatarGroup: () => import_react99.AvatarGroup,
|
|
63
|
+
AvatarGroupProps: () => import_react99.AvatarGroupProps,
|
|
64
|
+
AvatarProps: () => import_react99.AvatarProps,
|
|
65
65
|
Badge: () => badge_default,
|
|
66
|
-
Box: () =>
|
|
67
|
-
BoxProps: () =>
|
|
66
|
+
Box: () => import_react56.Box,
|
|
67
|
+
BoxProps: () => import_react56.BoxProps,
|
|
68
68
|
BreadCrumb: () => bread_crumb_default,
|
|
69
69
|
Button: () => button_default,
|
|
70
|
-
ButtonGroup: () =>
|
|
71
|
-
ButtonGroupProps: () =>
|
|
70
|
+
ButtonGroup: () => import_react11.ButtonGroup,
|
|
71
|
+
ButtonGroupProps: () => import_react11.ButtonGroupProps,
|
|
72
72
|
CHECKBOX_STATE: () => CHECKBOX_STATE,
|
|
73
73
|
Card: () => card_default,
|
|
74
|
-
Center: () =>
|
|
75
|
-
ChakraProvider: () =>
|
|
76
|
-
ChakraProviderProps: () =>
|
|
77
|
-
ChakraTable: () =>
|
|
74
|
+
Center: () => import_react56.Center,
|
|
75
|
+
ChakraProvider: () => import_react109.ChakraProvider,
|
|
76
|
+
ChakraProviderProps: () => import_react109.ChakraProviderProps,
|
|
77
|
+
ChakraTable: () => import_react88.Table,
|
|
78
78
|
Checkbox: () => checkbox_default,
|
|
79
79
|
CheckboxGroup: () => checkbox_group_default,
|
|
80
|
-
CheckboxGroupContext: () =>
|
|
81
|
-
CheckboxGroupProps: () =>
|
|
82
|
-
CheckboxIcon: () =>
|
|
83
|
-
CheckboxIconProps: () =>
|
|
84
|
-
CheckboxState: () =>
|
|
80
|
+
CheckboxGroupContext: () => import_react18.CheckboxGroupContext,
|
|
81
|
+
CheckboxGroupProps: () => import_react18.CheckboxGroupProps,
|
|
82
|
+
CheckboxIcon: () => import_react18.CheckboxIcon,
|
|
83
|
+
CheckboxIconProps: () => import_react18.CheckboxIconProps,
|
|
84
|
+
CheckboxState: () => import_react18.CheckboxState,
|
|
85
85
|
Chips: () => chips_default,
|
|
86
86
|
ClearIndicator: () => ClearIndicator,
|
|
87
|
-
CloseButton: () =>
|
|
88
|
-
CloseButtonProps: () =>
|
|
89
|
-
Code: () =>
|
|
90
|
-
CodeProps: () =>
|
|
91
|
-
Collapse: () =>
|
|
92
|
-
CollapseProps: () =>
|
|
93
|
-
ColorMode: () =>
|
|
94
|
-
ColorModeScript: () =>
|
|
95
|
-
ColorModeScriptProps: () =>
|
|
96
|
-
Container: () =>
|
|
97
|
-
ContainerProps: () =>
|
|
87
|
+
CloseButton: () => import_react11.CloseButton,
|
|
88
|
+
CloseButtonProps: () => import_react11.CloseButtonProps,
|
|
89
|
+
Code: () => import_react91.Code,
|
|
90
|
+
CodeProps: () => import_react91.CodeProps,
|
|
91
|
+
Collapse: () => import_react99.Collapse,
|
|
92
|
+
CollapseProps: () => import_react99.CollapseProps,
|
|
93
|
+
ColorMode: () => import_react109.ColorMode,
|
|
94
|
+
ColorModeScript: () => import_react109.ColorModeScript,
|
|
95
|
+
ColorModeScriptProps: () => import_react109.ColorModeScriptProps,
|
|
96
|
+
Container: () => import_react56.Container,
|
|
97
|
+
ContainerProps: () => import_react56.ContainerProps,
|
|
98
98
|
Counter: () => counter_default,
|
|
99
99
|
DEFAULT_EXCEL_MIME_TYPE: () => DEFAULT_EXCEL_MIME_TYPE,
|
|
100
100
|
DEFAULT_IMAGE_MIME_TYPE: () => DEFAULT_IMAGE_MIME_TYPE,
|
|
@@ -102,93 +102,93 @@ __export(src_exports, {
|
|
|
102
102
|
DatePickerMonth: () => datepicker_month_default,
|
|
103
103
|
Datepicker: () => datepicker_default,
|
|
104
104
|
Dialog: () => dialog_default,
|
|
105
|
-
Divider: () =>
|
|
106
|
-
DividerProps: () =>
|
|
107
|
-
Drawer: () =>
|
|
108
|
-
DrawerBody: () =>
|
|
109
|
-
DrawerCloseButton: () =>
|
|
110
|
-
DrawerContent: () =>
|
|
111
|
-
DrawerContentProps: () =>
|
|
112
|
-
DrawerFooter: () =>
|
|
113
|
-
DrawerHeader: () =>
|
|
114
|
-
DrawerOverlay: () =>
|
|
115
|
-
DrawerProps: () =>
|
|
105
|
+
Divider: () => import_react56.Divider,
|
|
106
|
+
DividerProps: () => import_react56.DividerProps,
|
|
107
|
+
Drawer: () => import_react59.Drawer,
|
|
108
|
+
DrawerBody: () => import_react59.ModalBody,
|
|
109
|
+
DrawerCloseButton: () => import_react59.ModalCloseButton,
|
|
110
|
+
DrawerContent: () => import_react59.DrawerContent,
|
|
111
|
+
DrawerContentProps: () => import_react59.DrawerContentProps,
|
|
112
|
+
DrawerFooter: () => import_react59.ModalFooter,
|
|
113
|
+
DrawerHeader: () => import_react59.ModalHeader,
|
|
114
|
+
DrawerOverlay: () => import_react59.ModalOverlay,
|
|
115
|
+
DrawerProps: () => import_react59.DrawerProps,
|
|
116
116
|
DropdownIndicator: () => DropdownIndicator,
|
|
117
117
|
EXCEL_EXT: () => EXCEL_EXT,
|
|
118
118
|
EmptyState: () => empty_state_default,
|
|
119
119
|
ErrorCode: () => error_code_default,
|
|
120
|
-
Fade: () =>
|
|
121
|
-
FadeProps: () =>
|
|
120
|
+
Fade: () => import_react99.Fade,
|
|
121
|
+
FadeProps: () => import_react99.FadeProps,
|
|
122
122
|
Field: () => field_default,
|
|
123
|
-
Flex: () =>
|
|
124
|
-
FlexProps: () =>
|
|
125
|
-
FormControl: () =>
|
|
126
|
-
FormControlProps: () =>
|
|
127
|
-
FormErrorMessage: () =>
|
|
128
|
-
FormHelperText: () =>
|
|
129
|
-
FormLabel: () =>
|
|
130
|
-
FormLabelProps: () =>
|
|
131
|
-
Grid: () =>
|
|
132
|
-
GridItem: () =>
|
|
133
|
-
GridItemProps: () =>
|
|
134
|
-
GridProps: () =>
|
|
135
|
-
HStack: () =>
|
|
123
|
+
Flex: () => import_react56.Flex,
|
|
124
|
+
FlexProps: () => import_react56.FlexProps,
|
|
125
|
+
FormControl: () => import_react27.FormControl,
|
|
126
|
+
FormControlProps: () => import_react27.FormControlProps,
|
|
127
|
+
FormErrorMessage: () => import_react27.FormErrorMessage,
|
|
128
|
+
FormHelperText: () => import_react27.FormHelperText,
|
|
129
|
+
FormLabel: () => import_react27.FormLabel,
|
|
130
|
+
FormLabelProps: () => import_react27.FormLabelProps,
|
|
131
|
+
Grid: () => import_react56.Grid,
|
|
132
|
+
GridItem: () => import_react56.GridItem,
|
|
133
|
+
GridItemProps: () => import_react56.GridItemProps,
|
|
134
|
+
GridProps: () => import_react56.GridProps,
|
|
135
|
+
HStack: () => import_react56.HStack,
|
|
136
136
|
Header: () => Header,
|
|
137
|
-
Heading: () =>
|
|
138
|
-
HeadingProps: () =>
|
|
139
|
-
Hide: () =>
|
|
140
|
-
HideProps: () =>
|
|
137
|
+
Heading: () => import_react91.Heading,
|
|
138
|
+
HeadingProps: () => import_react91.HeadingProps,
|
|
139
|
+
Hide: () => import_react99.Hide,
|
|
140
|
+
HideProps: () => import_react99.HideProps,
|
|
141
141
|
IMG_EXT: () => IMG_EXT,
|
|
142
|
-
Icon: () =>
|
|
143
|
-
IconButton: () =>
|
|
144
|
-
IconButtonProps: () =>
|
|
145
|
-
IconProps: () =>
|
|
146
|
-
Image: () =>
|
|
147
|
-
ImageProps: () =>
|
|
148
|
-
Img: () =>
|
|
149
|
-
ImgProps: () =>
|
|
142
|
+
Icon: () => import_react55.Icon,
|
|
143
|
+
IconButton: () => import_react11.IconButton,
|
|
144
|
+
IconButtonProps: () => import_react11.IconButtonProps,
|
|
145
|
+
IconProps: () => import_react55.IconProps,
|
|
146
|
+
Image: () => import_react55.Image,
|
|
147
|
+
ImageProps: () => import_react55.ImageProps,
|
|
148
|
+
Img: () => import_react99.Img,
|
|
149
|
+
ImgProps: () => import_react99.ImgProps,
|
|
150
150
|
InputAddonLeft: () => InputAddonLeft,
|
|
151
151
|
InputAddonRight: () => InputAddonRight,
|
|
152
|
-
InputElementLeft: () =>
|
|
153
|
-
InputElementRight: () =>
|
|
152
|
+
InputElementLeft: () => import_react21.InputLeftElement,
|
|
153
|
+
InputElementRight: () => import_react22.InputRightElement,
|
|
154
154
|
InputField: () => input_field_default,
|
|
155
|
-
InputGroup: () =>
|
|
156
|
-
InputGroupProps: () =>
|
|
157
|
-
InputLeftAddon: () =>
|
|
158
|
-
InputLeftAddonProps: () =>
|
|
159
|
-
InputLeftElement: () =>
|
|
160
|
-
InputLeftElementProps: () =>
|
|
161
|
-
InputProps: () =>
|
|
162
|
-
InputRightAddon: () =>
|
|
163
|
-
InputRightAddonProps: () =>
|
|
164
|
-
InputRightElement: () =>
|
|
165
|
-
InputRightElementProps: () =>
|
|
166
|
-
Link: () =>
|
|
167
|
-
LinkProps: () =>
|
|
168
|
-
List: () =>
|
|
169
|
-
ListIcon: () =>
|
|
170
|
-
ListItem: () =>
|
|
171
|
-
ListItemProps: () =>
|
|
172
|
-
ListProps: () =>
|
|
155
|
+
InputGroup: () => import_react27.InputGroup,
|
|
156
|
+
InputGroupProps: () => import_react27.InputGroupProps,
|
|
157
|
+
InputLeftAddon: () => import_react27.InputLeftAddon,
|
|
158
|
+
InputLeftAddonProps: () => import_react27.InputLeftAddonProps,
|
|
159
|
+
InputLeftElement: () => import_react27.InputLeftElement,
|
|
160
|
+
InputLeftElementProps: () => import_react27.InputLeftElementProps,
|
|
161
|
+
InputProps: () => import_react27.InputProps,
|
|
162
|
+
InputRightAddon: () => import_react27.InputRightAddon,
|
|
163
|
+
InputRightAddonProps: () => import_react27.InputRightAddonProps,
|
|
164
|
+
InputRightElement: () => import_react27.InputRightElement,
|
|
165
|
+
InputRightElementProps: () => import_react27.InputRightElementProps,
|
|
166
|
+
Link: () => import_react91.Link,
|
|
167
|
+
LinkProps: () => import_react91.LinkProps,
|
|
168
|
+
List: () => import_react57.List,
|
|
169
|
+
ListIcon: () => import_react57.ListIcon,
|
|
170
|
+
ListItem: () => import_react57.ListItem,
|
|
171
|
+
ListItemProps: () => import_react57.ListItemProps,
|
|
172
|
+
ListProps: () => import_react57.ListProps,
|
|
173
173
|
Loader: () => loader_default,
|
|
174
174
|
Logo: () => Logo,
|
|
175
175
|
MainMenu: () => navigation_default,
|
|
176
|
-
Modal: () =>
|
|
176
|
+
Modal: () => import_react59.Modal,
|
|
177
177
|
ModalBackButton: () => modal_back_button_default,
|
|
178
|
-
ModalBody: () =>
|
|
179
|
-
ModalBodyProps: () =>
|
|
180
|
-
ModalCloseButton: () =>
|
|
181
|
-
ModalContent: () =>
|
|
182
|
-
ModalContentProps: () =>
|
|
183
|
-
ModalContextProvider: () =>
|
|
184
|
-
ModalFocusScope: () =>
|
|
185
|
-
ModalFooter: () =>
|
|
186
|
-
ModalFooterProps: () =>
|
|
187
|
-
ModalHeader: () =>
|
|
188
|
-
ModalHeaderProps: () =>
|
|
189
|
-
ModalOverlay: () =>
|
|
190
|
-
ModalOverlayProps: () =>
|
|
191
|
-
ModalProps: () =>
|
|
178
|
+
ModalBody: () => import_react59.ModalBody,
|
|
179
|
+
ModalBodyProps: () => import_react59.ModalBodyProps,
|
|
180
|
+
ModalCloseButton: () => import_react59.ModalCloseButton,
|
|
181
|
+
ModalContent: () => import_react59.ModalContent,
|
|
182
|
+
ModalContentProps: () => import_react59.ModalContentProps,
|
|
183
|
+
ModalContextProvider: () => import_react59.ModalContextProvider,
|
|
184
|
+
ModalFocusScope: () => import_react59.ModalFocusScope,
|
|
185
|
+
ModalFooter: () => import_react59.ModalFooter,
|
|
186
|
+
ModalFooterProps: () => import_react59.ModalFooterProps,
|
|
187
|
+
ModalHeader: () => import_react59.ModalHeader,
|
|
188
|
+
ModalHeaderProps: () => import_react59.ModalHeaderProps,
|
|
189
|
+
ModalOverlay: () => import_react59.ModalOverlay,
|
|
190
|
+
ModalOverlayProps: () => import_react59.ModalOverlayProps,
|
|
191
|
+
ModalProps: () => import_react59.ModalProps,
|
|
192
192
|
MultiDatePickerMonth: () => multi_datepicker_month_default,
|
|
193
193
|
MultiValue: () => MultiValue,
|
|
194
194
|
MultiValueRemove: () => MultiValueRemove,
|
|
@@ -197,157 +197,157 @@ __export(src_exports, {
|
|
|
197
197
|
NavigationBar: () => navigation_bar_default,
|
|
198
198
|
NoOptionsMessage: () => NoOptionsMessage,
|
|
199
199
|
ONE_MEGA_BYTE: () => ONE_MEGA_BYTE,
|
|
200
|
-
OrderedList: () =>
|
|
200
|
+
OrderedList: () => import_react57.OrderedList,
|
|
201
201
|
Pagination: () => pagination_default,
|
|
202
202
|
PaginationDetail: () => pagination_detail_default,
|
|
203
203
|
PaginationFilter: () => pagination_filter_default,
|
|
204
|
-
PinInput: () =>
|
|
205
|
-
PinInputContext: () =>
|
|
206
|
-
PinInputDescendantsProvider: () =>
|
|
207
|
-
PinInputField: () =>
|
|
208
|
-
PinInputFieldProps: () =>
|
|
209
|
-
PinInputProps: () =>
|
|
210
|
-
PinInputProvider: () =>
|
|
211
|
-
Popover: () =>
|
|
212
|
-
PopoverAnchor: () =>
|
|
213
|
-
PopoverArrow: () =>
|
|
214
|
-
PopoverArrowProps: () =>
|
|
215
|
-
PopoverBody: () =>
|
|
216
|
-
PopoverBodyProps: () =>
|
|
217
|
-
PopoverCloseButton: () =>
|
|
204
|
+
PinInput: () => import_react68.PinInput,
|
|
205
|
+
PinInputContext: () => import_react68.PinInputContext,
|
|
206
|
+
PinInputDescendantsProvider: () => import_react68.PinInputDescendantsProvider,
|
|
207
|
+
PinInputField: () => import_react68.PinInputField,
|
|
208
|
+
PinInputFieldProps: () => import_react68.PinInputFieldProps,
|
|
209
|
+
PinInputProps: () => import_react68.PinInputProps,
|
|
210
|
+
PinInputProvider: () => import_react68.PinInputProvider,
|
|
211
|
+
Popover: () => import_react71.Popover,
|
|
212
|
+
PopoverAnchor: () => import_react71.PopoverAnchor,
|
|
213
|
+
PopoverArrow: () => import_react71.PopoverArrow,
|
|
214
|
+
PopoverArrowProps: () => import_react71.PopoverArrowProps,
|
|
215
|
+
PopoverBody: () => import_react71.PopoverBody,
|
|
216
|
+
PopoverBodyProps: () => import_react71.PopoverBodyProps,
|
|
217
|
+
PopoverCloseButton: () => import_react71.PopoverCloseButton,
|
|
218
218
|
PopoverContent: () => PopoverContent_default,
|
|
219
|
-
PopoverContentProps: () =>
|
|
220
|
-
PopoverFooter: () =>
|
|
221
|
-
PopoverFooterProps: () =>
|
|
222
|
-
PopoverHeader: () =>
|
|
223
|
-
PopoverHeaderProps: () =>
|
|
224
|
-
PopoverProps: () =>
|
|
225
|
-
PopoverTrigger: () =>
|
|
226
|
-
Portal: () =>
|
|
227
|
-
PortalProps: () =>
|
|
219
|
+
PopoverContentProps: () => import_react71.PopoverContentProps,
|
|
220
|
+
PopoverFooter: () => import_react71.PopoverFooter,
|
|
221
|
+
PopoverFooterProps: () => import_react71.PopoverFooterProps,
|
|
222
|
+
PopoverHeader: () => import_react71.PopoverHeader,
|
|
223
|
+
PopoverHeaderProps: () => import_react71.PopoverHeaderProps,
|
|
224
|
+
PopoverProps: () => import_react71.PopoverProps,
|
|
225
|
+
PopoverTrigger: () => import_react71.PopoverTrigger,
|
|
226
|
+
Portal: () => import_react71.Portal,
|
|
227
|
+
PortalProps: () => import_react71.PortalProps,
|
|
228
228
|
Profile: () => Profile,
|
|
229
|
-
Progress: () =>
|
|
230
|
-
ProgressFilledTrackProps: () =>
|
|
231
|
-
ProgressLabel: () =>
|
|
232
|
-
ProgressLabelProps: () =>
|
|
233
|
-
ProgressProps: () =>
|
|
234
|
-
ProgressTrackProps: () =>
|
|
229
|
+
Progress: () => import_react72.Progress,
|
|
230
|
+
ProgressFilledTrackProps: () => import_react72.ProgressFilledTrackProps,
|
|
231
|
+
ProgressLabel: () => import_react72.ProgressLabel,
|
|
232
|
+
ProgressLabelProps: () => import_react72.ProgressLabelProps,
|
|
233
|
+
ProgressProps: () => import_react72.ProgressProps,
|
|
234
|
+
ProgressTrackProps: () => import_react72.ProgressTrackProps,
|
|
235
235
|
Provider: () => provider_default,
|
|
236
236
|
ProviderContext: () => ProviderContext,
|
|
237
237
|
Radio: () => Radio,
|
|
238
238
|
RadioGroup: () => RadioGroup,
|
|
239
|
-
RadioGroupContext: () =>
|
|
239
|
+
RadioGroupContext: () => import_react75.RadioGroupContext,
|
|
240
240
|
Rating: () => rating_default,
|
|
241
|
-
RequiredIndicator: () =>
|
|
242
|
-
RequiredIndicatorProps: () =>
|
|
243
|
-
ScaleFade: () =>
|
|
244
|
-
ScaleFadeProps: () =>
|
|
241
|
+
RequiredIndicator: () => import_react27.RequiredIndicator,
|
|
242
|
+
RequiredIndicatorProps: () => import_react27.RequiredIndicatorProps,
|
|
243
|
+
ScaleFade: () => import_react99.ScaleFade,
|
|
244
|
+
ScaleFadeProps: () => import_react99.ScaleFadeProps,
|
|
245
245
|
Select: () => select_default,
|
|
246
246
|
SelectAsync: () => select_async_default,
|
|
247
247
|
SelectAsyncCreatable: () => SelectAsyncCreatable,
|
|
248
248
|
SelectCheckBox: () => select_with_checkbox_default,
|
|
249
249
|
SelectCreatable: () => SelectCreatable,
|
|
250
|
-
Show: () =>
|
|
251
|
-
ShowProps: () =>
|
|
250
|
+
Show: () => import_react99.Show,
|
|
251
|
+
ShowProps: () => import_react99.ShowProps,
|
|
252
252
|
Sidebar: () => Sidebar,
|
|
253
253
|
SidebarHeader: () => SidebarHeader,
|
|
254
254
|
SidebarMenu: () => SidebarMenu,
|
|
255
|
-
SimpleGrid: () =>
|
|
255
|
+
SimpleGrid: () => import_react56.SimpleGrid,
|
|
256
256
|
Skeleton: () => import_react5.Skeleton,
|
|
257
|
-
Slide: () =>
|
|
258
|
-
SlideFade: () =>
|
|
259
|
-
SlideFadeProps: () =>
|
|
260
|
-
SlideProps: () =>
|
|
261
|
-
Spacer: () =>
|
|
262
|
-
Stack: () =>
|
|
263
|
-
StackProps: () =>
|
|
264
|
-
Step: () =>
|
|
265
|
-
StepDescription: () =>
|
|
266
|
-
StepIcon: () =>
|
|
267
|
-
StepIndicator: () =>
|
|
268
|
-
StepNumber: () =>
|
|
269
|
-
StepSeparator: () =>
|
|
270
|
-
StepStatus: () =>
|
|
271
|
-
StepTitle: () =>
|
|
272
|
-
Stepper: () =>
|
|
257
|
+
Slide: () => import_react99.Slide,
|
|
258
|
+
SlideFade: () => import_react99.SlideFade,
|
|
259
|
+
SlideFadeProps: () => import_react99.SlideFadeProps,
|
|
260
|
+
SlideProps: () => import_react99.SlideProps,
|
|
261
|
+
Spacer: () => import_react56.Spacer,
|
|
262
|
+
Stack: () => import_react56.Stack,
|
|
263
|
+
StackProps: () => import_react56.StackProps,
|
|
264
|
+
Step: () => import_react99.Step,
|
|
265
|
+
StepDescription: () => import_react99.StepDescription,
|
|
266
|
+
StepIcon: () => import_react99.StepIcon,
|
|
267
|
+
StepIndicator: () => import_react99.StepIndicator,
|
|
268
|
+
StepNumber: () => import_react99.StepNumber,
|
|
269
|
+
StepSeparator: () => import_react99.StepSeparator,
|
|
270
|
+
StepStatus: () => import_react99.StepStatus,
|
|
271
|
+
StepTitle: () => import_react99.StepTitle,
|
|
272
|
+
Stepper: () => import_react99.Stepper,
|
|
273
273
|
Switch: () => switch_default,
|
|
274
274
|
Tab: () => tab_default,
|
|
275
|
-
TabIndicator: () =>
|
|
276
|
-
TabIndicatorProps: () =>
|
|
277
|
-
TabList: () =>
|
|
278
|
-
TabListProps: () =>
|
|
279
|
-
TabPanel: () =>
|
|
280
|
-
TabPanelProps: () =>
|
|
281
|
-
TabPanels: () =>
|
|
282
|
-
TabPanelsProps: () =>
|
|
283
|
-
TabProps: () =>
|
|
284
|
-
TableBodyProps: () =>
|
|
285
|
-
TableCellProps: () =>
|
|
286
|
-
TableColumnHeaderProps: () =>
|
|
287
|
-
TableHeadProps: () =>
|
|
288
|
-
TableProps: () =>
|
|
289
|
-
TableRowProps: () =>
|
|
290
|
-
Tabs: () =>
|
|
291
|
-
TabsDescendantsProvider: () =>
|
|
292
|
-
TabsProps: () =>
|
|
293
|
-
TabsProvider: () =>
|
|
294
|
-
Tbody: () =>
|
|
295
|
-
Td: () =>
|
|
296
|
-
Text: () =>
|
|
297
|
-
TextProps: () =>
|
|
275
|
+
TabIndicator: () => import_react90.TabIndicator,
|
|
276
|
+
TabIndicatorProps: () => import_react90.TabIndicatorProps,
|
|
277
|
+
TabList: () => import_react90.TabList,
|
|
278
|
+
TabListProps: () => import_react90.TabListProps,
|
|
279
|
+
TabPanel: () => import_react90.TabPanel,
|
|
280
|
+
TabPanelProps: () => import_react90.TabPanelProps,
|
|
281
|
+
TabPanels: () => import_react90.TabPanels,
|
|
282
|
+
TabPanelsProps: () => import_react90.TabPanelsProps,
|
|
283
|
+
TabProps: () => import_react90.TabProps,
|
|
284
|
+
TableBodyProps: () => import_react88.TableBodyProps,
|
|
285
|
+
TableCellProps: () => import_react88.TableCellProps,
|
|
286
|
+
TableColumnHeaderProps: () => import_react88.TableColumnHeaderProps,
|
|
287
|
+
TableHeadProps: () => import_react88.TableHeadProps,
|
|
288
|
+
TableProps: () => import_react88.TableProps,
|
|
289
|
+
TableRowProps: () => import_react88.TableRowProps,
|
|
290
|
+
Tabs: () => import_react90.Tabs,
|
|
291
|
+
TabsDescendantsProvider: () => import_react90.TabsDescendantsProvider,
|
|
292
|
+
TabsProps: () => import_react90.TabsProps,
|
|
293
|
+
TabsProvider: () => import_react90.TabsProvider,
|
|
294
|
+
Tbody: () => import_react88.Tbody,
|
|
295
|
+
Td: () => import_react88.Td,
|
|
296
|
+
Text: () => import_react91.Text,
|
|
297
|
+
TextProps: () => import_react91.TextProps,
|
|
298
298
|
TextareaField: () => textarea_default,
|
|
299
|
-
Th: () =>
|
|
300
|
-
Thead: () =>
|
|
299
|
+
Th: () => import_react88.Th,
|
|
300
|
+
Thead: () => import_react88.Thead,
|
|
301
301
|
ThemeTypings: () => import_styled_system12.ThemeTypings,
|
|
302
302
|
Time: () => Time,
|
|
303
303
|
TimeInput: () => TimeInput2,
|
|
304
304
|
ToastContainer: () => import_react_toastify2.ToastContainer,
|
|
305
305
|
Tooltip: () => Tooltip,
|
|
306
|
-
Tr: () =>
|
|
307
|
-
UnorderedList: () =>
|
|
306
|
+
Tr: () => import_react88.Tr,
|
|
307
|
+
UnorderedList: () => import_react57.UnorderedList,
|
|
308
308
|
Uploader: () => uploader_default,
|
|
309
|
-
UseBreakpointOptions: () =>
|
|
310
|
-
UseCheckboxGroupProps: () =>
|
|
311
|
-
UseCheckboxGroupReturn: () =>
|
|
312
|
-
UseCheckboxProps: () =>
|
|
313
|
-
UseCheckboxReturn: () =>
|
|
314
|
-
UseDisclosureProps: () =>
|
|
315
|
-
UseImageProps: () =>
|
|
316
|
-
UseImageReturn: () =>
|
|
317
|
-
UseMediaQueryOptions: () =>
|
|
318
|
-
UseModalProps: () =>
|
|
319
|
-
UseModalReturn: () =>
|
|
320
|
-
UsePinInputFieldProps: () =>
|
|
321
|
-
UsePinInputProps: () =>
|
|
322
|
-
UsePinInputReturn: () =>
|
|
323
|
-
UseQueryProps: () =>
|
|
324
|
-
UseRadioGroupReturn: () =>
|
|
325
|
-
UseRadioProps: () =>
|
|
326
|
-
UseRadioReturn: () =>
|
|
327
|
-
UseTabListProps: () =>
|
|
328
|
-
UseTabListReturn: () =>
|
|
329
|
-
UseTabOptions: () =>
|
|
330
|
-
UseTabPanelsProps: () =>
|
|
331
|
-
UseTabProps: () =>
|
|
332
|
-
UseTabsProps: () =>
|
|
333
|
-
UseTabsReturn: () =>
|
|
334
|
-
VStack: () =>
|
|
309
|
+
UseBreakpointOptions: () => import_react99.UseBreakpointOptions,
|
|
310
|
+
UseCheckboxGroupProps: () => import_react18.UseCheckboxGroupProps,
|
|
311
|
+
UseCheckboxGroupReturn: () => import_react18.UseCheckboxGroupReturn,
|
|
312
|
+
UseCheckboxProps: () => import_react18.UseCheckboxProps,
|
|
313
|
+
UseCheckboxReturn: () => import_react18.UseCheckboxReturn,
|
|
314
|
+
UseDisclosureProps: () => import_react111.UseDisclosureProps,
|
|
315
|
+
UseImageProps: () => import_react99.UseImageProps,
|
|
316
|
+
UseImageReturn: () => import_react99.UseImageReturn,
|
|
317
|
+
UseMediaQueryOptions: () => import_react99.UseMediaQueryOptions,
|
|
318
|
+
UseModalProps: () => import_react59.UseModalProps,
|
|
319
|
+
UseModalReturn: () => import_react59.UseModalReturn,
|
|
320
|
+
UsePinInputFieldProps: () => import_react68.UsePinInputFieldProps,
|
|
321
|
+
UsePinInputProps: () => import_react68.UsePinInputProps,
|
|
322
|
+
UsePinInputReturn: () => import_react68.UsePinInputReturn,
|
|
323
|
+
UseQueryProps: () => import_react99.UseQueryProps,
|
|
324
|
+
UseRadioGroupReturn: () => import_react75.UseRadioGroupReturn,
|
|
325
|
+
UseRadioProps: () => import_react75.UseRadioProps,
|
|
326
|
+
UseRadioReturn: () => import_react75.UseRadioReturn,
|
|
327
|
+
UseTabListProps: () => import_react90.UseTabListProps,
|
|
328
|
+
UseTabListReturn: () => import_react90.UseTabListReturn,
|
|
329
|
+
UseTabOptions: () => import_react90.UseTabOptions,
|
|
330
|
+
UseTabPanelsProps: () => import_react90.UseTabPanelsProps,
|
|
331
|
+
UseTabProps: () => import_react90.UseTabProps,
|
|
332
|
+
UseTabsProps: () => import_react90.UseTabsProps,
|
|
333
|
+
UseTabsReturn: () => import_react90.UseTabsReturn,
|
|
334
|
+
VStack: () => import_react56.VStack,
|
|
335
335
|
Version: () => Version,
|
|
336
|
-
VisuallyHidden: () =>
|
|
337
|
-
VisuallyHiddenInput: () =>
|
|
336
|
+
VisuallyHidden: () => import_react99.VisuallyHidden,
|
|
337
|
+
VisuallyHiddenInput: () => import_react99.VisuallyHiddenInput,
|
|
338
338
|
VoilaLogo: () => VoilaLogo,
|
|
339
|
-
Wrap: () =>
|
|
340
|
-
WrapItem: () =>
|
|
341
|
-
WrapItemProps: () =>
|
|
342
|
-
WrapProps: () =>
|
|
339
|
+
Wrap: () => import_react56.Wrap,
|
|
340
|
+
WrapItem: () => import_react56.WrapItem,
|
|
341
|
+
WrapItemProps: () => import_react56.WrapItemProps,
|
|
342
|
+
WrapProps: () => import_react56.WrapProps,
|
|
343
343
|
XMSLogo: () => XMSLogo,
|
|
344
344
|
concatList: () => concatList,
|
|
345
345
|
createExtendTheme: () => createExtendTheme,
|
|
346
346
|
defaultOnHandleRejections: () => defaultOnHandleRejections,
|
|
347
347
|
dimensionValidator: () => dimensionValidator,
|
|
348
|
-
extendTheme: () =>
|
|
348
|
+
extendTheme: () => import_react112.extendTheme,
|
|
349
349
|
formatValidationMessage: () => formatValidationMessage,
|
|
350
|
-
forwardRef: () =>
|
|
350
|
+
forwardRef: () => import_react112.forwardRef,
|
|
351
351
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
|
352
352
|
getTheme: () => getTheme,
|
|
353
353
|
id: () => id,
|
|
@@ -364,54 +364,54 @@ __export(src_exports, {
|
|
|
364
364
|
useAccordionItemState: () => import_react3.useAccordionItemState,
|
|
365
365
|
useAccordionStyles: () => import_react3.useAccordionStyles,
|
|
366
366
|
useAlertStyles: () => useAlertStyles,
|
|
367
|
-
useBoolean: () =>
|
|
368
|
-
useBreakpoint: () =>
|
|
369
|
-
useCheckbox: () =>
|
|
370
|
-
useCheckboxGroup: () =>
|
|
371
|
-
useClipboard: () =>
|
|
372
|
-
useColorMode: () =>
|
|
373
|
-
useColorModePreference: () =>
|
|
374
|
-
useColorModeValue: () =>
|
|
375
|
-
useConst: () =>
|
|
376
|
-
useControllableProp: () =>
|
|
377
|
-
useControllableState: () =>
|
|
367
|
+
useBoolean: () => import_react111.useBoolean,
|
|
368
|
+
useBreakpoint: () => import_react99.useBreakpoint,
|
|
369
|
+
useCheckbox: () => import_react18.useCheckbox,
|
|
370
|
+
useCheckboxGroup: () => import_react18.useCheckboxGroup,
|
|
371
|
+
useClipboard: () => import_react111.useClipboard,
|
|
372
|
+
useColorMode: () => import_react111.useColorMode,
|
|
373
|
+
useColorModePreference: () => import_react99.useColorModePreference,
|
|
374
|
+
useColorModeValue: () => import_react111.useColorModeValue,
|
|
375
|
+
useConst: () => import_react111.useConst,
|
|
376
|
+
useControllableProp: () => import_react111.useControllableProp,
|
|
377
|
+
useControllableState: () => import_react111.useControllableState,
|
|
378
378
|
useDataTable: () => useDataTable,
|
|
379
|
-
useDimensions: () =>
|
|
380
|
-
useDisclosure: () =>
|
|
379
|
+
useDimensions: () => import_react111.useDimensions,
|
|
380
|
+
useDisclosure: () => import_react111.useDisclosure,
|
|
381
381
|
useDragOrClick: () => useDragOrClick,
|
|
382
|
-
useDrawerContext: () =>
|
|
382
|
+
useDrawerContext: () => import_react59.useDrawerContext,
|
|
383
383
|
useFetcher: () => useFetcher,
|
|
384
|
-
useImage: () =>
|
|
384
|
+
useImage: () => import_react99.useImage,
|
|
385
385
|
useInternalUI: () => useInternalUI,
|
|
386
|
-
useMergeRefs: () =>
|
|
387
|
-
useModal: () =>
|
|
388
|
-
useModalContext: () =>
|
|
389
|
-
useModalStyles: () =>
|
|
390
|
-
useOutsideClick: () =>
|
|
391
|
-
usePinInput: () =>
|
|
392
|
-
usePinInputContext: () =>
|
|
393
|
-
usePinInputField: () =>
|
|
394
|
-
useProgressStyles: () =>
|
|
395
|
-
useQuery: () =>
|
|
396
|
-
useRadio: () =>
|
|
397
|
-
useRadioGroup: () =>
|
|
398
|
-
useRadioGroupContext: () =>
|
|
386
|
+
useMergeRefs: () => import_react111.useMergeRefs,
|
|
387
|
+
useModal: () => import_react59.useModal,
|
|
388
|
+
useModalContext: () => import_react59.useModalContext,
|
|
389
|
+
useModalStyles: () => import_react59.useModalStyles,
|
|
390
|
+
useOutsideClick: () => import_react111.useOutsideClick,
|
|
391
|
+
usePinInput: () => import_react68.usePinInput,
|
|
392
|
+
usePinInputContext: () => import_react68.usePinInputContext,
|
|
393
|
+
usePinInputField: () => import_react68.usePinInputField,
|
|
394
|
+
useProgressStyles: () => import_react72.useProgressStyles,
|
|
395
|
+
useQuery: () => import_react99.useQuery,
|
|
396
|
+
useRadio: () => import_react75.useRadio,
|
|
397
|
+
useRadioGroup: () => import_react75.useRadioGroup,
|
|
398
|
+
useRadioGroupContext: () => import_react75.useRadioGroupContext,
|
|
399
399
|
useSelectTable: () => useSelectTable,
|
|
400
|
-
useSteps: () =>
|
|
401
|
-
useTab: () =>
|
|
402
|
-
useTabIndicator: () =>
|
|
403
|
-
useTabList: () =>
|
|
404
|
-
useTabPanel: () =>
|
|
405
|
-
useTabPanels: () =>
|
|
406
|
-
useTabs: () =>
|
|
407
|
-
useTabsContext: () =>
|
|
408
|
-
useTabsDescendant: () =>
|
|
409
|
-
useTabsDescendants: () =>
|
|
410
|
-
useTabsDescendantsContext: () =>
|
|
411
|
-
useTabsStyles: () =>
|
|
412
|
-
useTheme: () =>
|
|
400
|
+
useSteps: () => import_react99.useSteps,
|
|
401
|
+
useTab: () => import_react90.useTab,
|
|
402
|
+
useTabIndicator: () => import_react90.useTabIndicator,
|
|
403
|
+
useTabList: () => import_react90.useTabList,
|
|
404
|
+
useTabPanel: () => import_react90.useTabPanel,
|
|
405
|
+
useTabPanels: () => import_react90.useTabPanels,
|
|
406
|
+
useTabs: () => import_react90.useTabs,
|
|
407
|
+
useTabsContext: () => import_react90.useTabsContext,
|
|
408
|
+
useTabsDescendant: () => import_react90.useTabsDescendant,
|
|
409
|
+
useTabsDescendants: () => import_react90.useTabsDescendants,
|
|
410
|
+
useTabsDescendantsContext: () => import_react90.useTabsDescendantsContext,
|
|
411
|
+
useTabsStyles: () => import_react90.useTabsStyles,
|
|
412
|
+
useTheme: () => import_react111.useTheme,
|
|
413
413
|
useToast: () => useToast,
|
|
414
|
-
useToken: () =>
|
|
414
|
+
useToken: () => import_react111.useToken
|
|
415
415
|
});
|
|
416
416
|
module.exports = __toCommonJS(src_exports);
|
|
417
417
|
|
|
@@ -737,6 +737,7 @@ var badge_default = Badge;
|
|
|
737
737
|
// src/components/breadcrumb/components/bread-crumb.tsx
|
|
738
738
|
var import_react9 = require("@chakra-ui/react");
|
|
739
739
|
var import_internal_icon4 = require("@ctlyst.id/internal-icon");
|
|
740
|
+
var import_react10 = require("react");
|
|
740
741
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
741
742
|
var BreadCrumb = ({
|
|
742
743
|
title,
|
|
@@ -750,6 +751,13 @@ var BreadCrumb = ({
|
|
|
750
751
|
hideTitle,
|
|
751
752
|
as
|
|
752
753
|
}) => {
|
|
754
|
+
const [hasPreviousPage, setHasPreviousPage] = (0, import_react10.useState)(false);
|
|
755
|
+
(0, import_react10.useEffect)(() => {
|
|
756
|
+
if (window === void 0) return;
|
|
757
|
+
if (window.history.length > 1) {
|
|
758
|
+
setHasPreviousPage(true);
|
|
759
|
+
}
|
|
760
|
+
}, []);
|
|
753
761
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
754
762
|
import_react9.Box,
|
|
755
763
|
{
|
|
@@ -774,6 +782,7 @@ var BreadCrumb = ({
|
|
|
774
782
|
bg: "white",
|
|
775
783
|
variant: "ghost",
|
|
776
784
|
"aria-label": "Back",
|
|
785
|
+
isDisabled: !hasPreviousPage,
|
|
777
786
|
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_internal_icon4.ChevronLeft, { size: 5 }),
|
|
778
787
|
onClick: backButton
|
|
779
788
|
}
|
|
@@ -825,15 +834,15 @@ BreadCrumb.defaultProps = {
|
|
|
825
834
|
var bread_crumb_default = BreadCrumb;
|
|
826
835
|
|
|
827
836
|
// src/components/button/index.ts
|
|
828
|
-
var
|
|
837
|
+
var import_react11 = require("@chakra-ui/react");
|
|
829
838
|
|
|
830
839
|
// src/components/card/components/card.tsx
|
|
831
|
-
var
|
|
832
|
-
var
|
|
840
|
+
var import_react12 = require("@chakra-ui/react");
|
|
841
|
+
var import_react13 = require("react");
|
|
833
842
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
834
|
-
var CardCustom = (0,
|
|
835
|
-
const styles = (0,
|
|
836
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
843
|
+
var CardCustom = (0, import_react13.forwardRef)(({ children, ...rest }, ref) => {
|
|
844
|
+
const styles = (0, import_react12.useStyleConfig)("Card", rest);
|
|
845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react12.Card, { __css: styles, backgroundColor: "white.high", ref, ...rest, children });
|
|
837
846
|
});
|
|
838
847
|
CardCustom.defaultProps = {
|
|
839
848
|
withShadow: true,
|
|
@@ -842,9 +851,9 @@ CardCustom.defaultProps = {
|
|
|
842
851
|
var card_default = CardCustom;
|
|
843
852
|
|
|
844
853
|
// src/components/checkbox/components/checkbox.tsx
|
|
845
|
-
var
|
|
854
|
+
var import_react14 = require("@chakra-ui/react");
|
|
846
855
|
var Icon = __toESM(require("@ctlyst.id/internal-icon"));
|
|
847
|
-
var
|
|
856
|
+
var import_react15 = require("react");
|
|
848
857
|
|
|
849
858
|
// src/utils/throttleFn.ts
|
|
850
859
|
var throttle = (fn, delay) => {
|
|
@@ -862,17 +871,17 @@ var throttle = (fn, delay) => {
|
|
|
862
871
|
|
|
863
872
|
// src/components/checkbox/components/checkbox.tsx
|
|
864
873
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
865
|
-
var CheckboxComponent = (0,
|
|
874
|
+
var CheckboxComponent = (0, import_react14.forwardRef)(
|
|
866
875
|
({ isError = false, animated = false, helpText, errorText, boxProps, children, isDisabled, throttleTime, ...rest }, ref) => {
|
|
867
|
-
const { state } = (0,
|
|
868
|
-
const throttleFn = (0,
|
|
876
|
+
const { state } = (0, import_react14.useCheckbox)(rest);
|
|
877
|
+
const throttleFn = (0, import_react15.useCallback)(
|
|
869
878
|
throttle((event) => {
|
|
870
879
|
var _a;
|
|
871
880
|
return (_a = rest.onChange) == null ? void 0 : _a.call(rest, event);
|
|
872
881
|
}, throttleTime),
|
|
873
882
|
[]
|
|
874
883
|
);
|
|
875
|
-
const handleOnChange = (0,
|
|
884
|
+
const handleOnChange = (0, import_react15.useCallback)(
|
|
876
885
|
(event) => {
|
|
877
886
|
var _a;
|
|
878
887
|
if (throttleTime) throttleFn(event);
|
|
@@ -886,9 +895,9 @@ var CheckboxComponent = (0, import_react13.forwardRef)(
|
|
|
886
895
|
if (state.isIndeterminate) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon.MinusLine, { size: 3, color: "inherit" });
|
|
887
896
|
return void 0;
|
|
888
897
|
};
|
|
889
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
890
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
891
|
-
|
|
898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react14.Box, { children: [
|
|
899
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react14.Box, { display: "flex", ...boxProps, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
900
|
+
import_react14.Checkbox,
|
|
892
901
|
{
|
|
893
902
|
"data-test-id": "Ok3zwJNf_-uY5Pe3mSV4P",
|
|
894
903
|
variant,
|
|
@@ -899,10 +908,10 @@ var CheckboxComponent = (0, import_react13.forwardRef)(
|
|
|
899
908
|
isDisabled,
|
|
900
909
|
color: "white",
|
|
901
910
|
icon: renderIcon2(),
|
|
902
|
-
children: children && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
911
|
+
children: children && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react14.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children })
|
|
903
912
|
}
|
|
904
913
|
) }),
|
|
905
|
-
(isError && errorText || helpText) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
914
|
+
(isError && errorText || helpText) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react14.Box, { mt: "1", ml: "6", children: isError ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react14.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react14.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
|
|
906
915
|
] });
|
|
907
916
|
}
|
|
908
917
|
);
|
|
@@ -916,10 +925,10 @@ CheckboxComponent.defaultProps = {
|
|
|
916
925
|
var checkbox_default = CheckboxComponent;
|
|
917
926
|
|
|
918
927
|
// src/components/checkbox/components/checkbox-group.tsx
|
|
919
|
-
var
|
|
928
|
+
var import_react17 = require("@chakra-ui/react");
|
|
920
929
|
|
|
921
930
|
// src/components/field/components/field.tsx
|
|
922
|
-
var
|
|
931
|
+
var import_react16 = require("@chakra-ui/react");
|
|
923
932
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
924
933
|
var Field = (props) => {
|
|
925
934
|
const {
|
|
@@ -946,15 +955,15 @@ var Field = (props) => {
|
|
|
946
955
|
};
|
|
947
956
|
const helperColor = getHelperColor();
|
|
948
957
|
const justifyHelper = getJustifyContentHelper();
|
|
949
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
950
|
-
label && (typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
951
|
-
isRequired && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react16.FormControl, { isInvalid: isError, id: id2, ...boxProps, children: [
|
|
959
|
+
label && (typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react16.FormLabel, { mb: 1, fontSize: "text.sm", requiredIndicator: void 0, children: [
|
|
960
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react16.Box, { as: "span", color: "danger.500", ml: 0, mr: 1, children: "*" }),
|
|
952
961
|
label
|
|
953
962
|
] }) : label),
|
|
954
963
|
children,
|
|
955
|
-
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
956
|
-
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
957
|
-
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
964
|
+
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react16.Box, { display: "flex", width: "full", justifyContent: justifyHelper, children: [
|
|
965
|
+
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react16.FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: leftHelperText }) : leftHelperText) : typeof errorMessage === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react16.FormErrorMessage, { fontSize: "text.xs", color: "danger.500", mt: 1, children: errorMessage }) : errorMessage,
|
|
966
|
+
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react16.FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: rightHelperText }) : rightHelperText)
|
|
958
967
|
] })
|
|
959
968
|
] });
|
|
960
969
|
};
|
|
@@ -974,7 +983,7 @@ var field_default = Field;
|
|
|
974
983
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
975
984
|
function CheckboxGroupComponent(props) {
|
|
976
985
|
const { children, label, helpText, isError, errorMessage, ...rest } = props;
|
|
977
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(field_default, { ...rest, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(field_default, { ...rest, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.CheckboxGroup, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react17.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
|
978
987
|
}
|
|
979
988
|
CheckboxGroupComponent.defaultProps = {
|
|
980
989
|
helpText: "",
|
|
@@ -984,10 +993,10 @@ CheckboxGroupComponent.defaultProps = {
|
|
|
984
993
|
var checkbox_group_default = CheckboxGroupComponent;
|
|
985
994
|
|
|
986
995
|
// src/components/checkbox/index.ts
|
|
987
|
-
var
|
|
996
|
+
var import_react18 = require("@chakra-ui/react");
|
|
988
997
|
|
|
989
998
|
// src/components/chips/components/chips.tsx
|
|
990
|
-
var
|
|
999
|
+
var import_react19 = require("@chakra-ui/react");
|
|
991
1000
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
992
1001
|
var Chips = ({ label, size: size2, onClick, ...rest }) => {
|
|
993
1002
|
const { isActive, isDisabled, onClose } = rest;
|
|
@@ -999,7 +1008,7 @@ var Chips = ({ label, size: size2, onClick, ...rest }) => {
|
|
|
999
1008
|
}
|
|
1000
1009
|
};
|
|
1001
1010
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1002
|
-
|
|
1011
|
+
import_react19.Tag,
|
|
1003
1012
|
{
|
|
1004
1013
|
"data-test-id": "",
|
|
1005
1014
|
onClick,
|
|
@@ -1007,8 +1016,8 @@ var Chips = ({ label, size: size2, onClick, ...rest }) => {
|
|
|
1007
1016
|
borderRadius: "full",
|
|
1008
1017
|
variant: isActive ? "solid" : variant,
|
|
1009
1018
|
children: [
|
|
1010
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1011
|
-
onClose && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react19.TagLabel, { children: label }),
|
|
1020
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react19.TagCloseButton, { "data-test-id": "", onClick: handleClose })
|
|
1012
1021
|
]
|
|
1013
1022
|
},
|
|
1014
1023
|
size2
|
|
@@ -1024,19 +1033,19 @@ Chips.defaultProps = {
|
|
|
1024
1033
|
var chips_default = Chips;
|
|
1025
1034
|
|
|
1026
1035
|
// src/components/counter/components/counter.tsx
|
|
1027
|
-
var
|
|
1028
|
-
var
|
|
1036
|
+
var import_react28 = require("@chakra-ui/react");
|
|
1037
|
+
var import_react29 = require("react");
|
|
1029
1038
|
var import_fi = require("react-icons/fi");
|
|
1030
1039
|
|
|
1031
1040
|
// src/components/form/components/input-addon.tsx
|
|
1032
|
-
var
|
|
1041
|
+
var import_react20 = require("@chakra-ui/react");
|
|
1033
1042
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1034
1043
|
var InputAddonLeft = ({ children, ...props }) => {
|
|
1035
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react20.InputLeftAddon, { backgroundColor: "neutral.200", px: 3, py: 2.5, style: { border: 0, marginInlineEnd: 0 }, ...props, children });
|
|
1036
1045
|
};
|
|
1037
1046
|
var InputAddonRight = ({ children, ...props }) => {
|
|
1038
1047
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1039
|
-
|
|
1048
|
+
import_react20.InputRightAddon,
|
|
1040
1049
|
{
|
|
1041
1050
|
backgroundColor: "neutral.200",
|
|
1042
1051
|
px: 3,
|
|
@@ -1049,15 +1058,15 @@ var InputAddonRight = ({ children, ...props }) => {
|
|
|
1049
1058
|
};
|
|
1050
1059
|
|
|
1051
1060
|
// src/components/form/components/input-element.tsx
|
|
1052
|
-
var import_react20 = require("@chakra-ui/react");
|
|
1053
1061
|
var import_react21 = require("@chakra-ui/react");
|
|
1062
|
+
var import_react22 = require("@chakra-ui/react");
|
|
1054
1063
|
|
|
1055
1064
|
// src/components/form/components/input-field.tsx
|
|
1056
|
-
var
|
|
1065
|
+
var import_react23 = require("@chakra-ui/react");
|
|
1057
1066
|
var import_internal_icon5 = require("@ctlyst.id/internal-icon");
|
|
1058
|
-
var
|
|
1067
|
+
var import_react24 = __toESM(require("react"));
|
|
1059
1068
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1060
|
-
var InputField =
|
|
1069
|
+
var InputField = import_react24.default.forwardRef((props, ref) => {
|
|
1061
1070
|
const {
|
|
1062
1071
|
value,
|
|
1063
1072
|
type,
|
|
@@ -1090,17 +1099,17 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1090
1099
|
focusColor: focusColor2
|
|
1091
1100
|
};
|
|
1092
1101
|
};
|
|
1093
|
-
const [isShowPassword, setIsShowPassword] = (0,
|
|
1094
|
-
const inputType = (0,
|
|
1102
|
+
const [isShowPassword, setIsShowPassword] = (0, import_react24.useState)(false);
|
|
1103
|
+
const inputType = (0, import_react24.useMemo)(() => {
|
|
1095
1104
|
return type === "password" && isShowPassword ? "text" : type;
|
|
1096
1105
|
}, [isShowPassword, type]);
|
|
1097
|
-
const fontSize = (0,
|
|
1106
|
+
const fontSize = (0, import_react24.useMemo)(() => {
|
|
1098
1107
|
if (type === "password") {
|
|
1099
1108
|
if (!isShowPassword && value) return "text.xl";
|
|
1100
1109
|
}
|
|
1101
1110
|
return "text.sm";
|
|
1102
1111
|
}, [isShowPassword, type, value]);
|
|
1103
|
-
const iconColor = (0,
|
|
1112
|
+
const iconColor = (0, import_react24.useMemo)(() => {
|
|
1104
1113
|
return isDisabled ? "black.low" : "black.medium";
|
|
1105
1114
|
}, [isDisabled]);
|
|
1106
1115
|
const { outlineColor, focusColor } = getProperties();
|
|
@@ -1116,7 +1125,7 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1116
1125
|
rightHelperText,
|
|
1117
1126
|
isRequired,
|
|
1118
1127
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1119
|
-
|
|
1128
|
+
import_react23.Box,
|
|
1120
1129
|
{
|
|
1121
1130
|
transition: "all 0.15s",
|
|
1122
1131
|
boxShadow: "none",
|
|
@@ -1127,7 +1136,7 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1127
1136
|
borderColor: focusColor
|
|
1128
1137
|
},
|
|
1129
1138
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1130
|
-
|
|
1139
|
+
import_react23.InputGroup,
|
|
1131
1140
|
{
|
|
1132
1141
|
size: size2,
|
|
1133
1142
|
borderRadius: "sm",
|
|
@@ -1136,7 +1145,7 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1136
1145
|
children: [
|
|
1137
1146
|
addOnLeft,
|
|
1138
1147
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1139
|
-
|
|
1148
|
+
import_react23.Input,
|
|
1140
1149
|
{
|
|
1141
1150
|
ref,
|
|
1142
1151
|
type: inputType,
|
|
@@ -1149,7 +1158,7 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1149
1158
|
}
|
|
1150
1159
|
),
|
|
1151
1160
|
(withClear || isLoading || type === "password") && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1152
|
-
|
|
1161
|
+
import_react23.Box,
|
|
1153
1162
|
{
|
|
1154
1163
|
"data-test-id": "CT_Component_ClearInput",
|
|
1155
1164
|
display: "flex",
|
|
@@ -1159,7 +1168,7 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1159
1168
|
mr: "10px",
|
|
1160
1169
|
children: [
|
|
1161
1170
|
withClear && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1162
|
-
|
|
1171
|
+
import_react23.Box,
|
|
1163
1172
|
{
|
|
1164
1173
|
display: "flex",
|
|
1165
1174
|
justifyContent: "center",
|
|
@@ -1169,7 +1178,7 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1169
1178
|
}
|
|
1170
1179
|
),
|
|
1171
1180
|
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1172
|
-
|
|
1181
|
+
import_react23.Box,
|
|
1173
1182
|
{
|
|
1174
1183
|
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
|
1175
1184
|
onClick: () => {
|
|
@@ -1182,7 +1191,7 @@ var InputField = import_react23.default.forwardRef((props, ref) => {
|
|
|
1182
1191
|
}
|
|
1183
1192
|
),
|
|
1184
1193
|
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1185
|
-
|
|
1194
|
+
import_react23.Box,
|
|
1186
1195
|
{
|
|
1187
1196
|
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
|
1188
1197
|
onClick: () => {
|
|
@@ -1218,14 +1227,14 @@ InputField.defaultProps = {
|
|
|
1218
1227
|
var input_field_default = InputField;
|
|
1219
1228
|
|
|
1220
1229
|
// src/components/form/components/textarea.tsx
|
|
1221
|
-
var
|
|
1222
|
-
var
|
|
1230
|
+
var import_react25 = require("@chakra-ui/react");
|
|
1231
|
+
var import_react26 = __toESM(require("react"));
|
|
1223
1232
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1224
|
-
var TextareaField =
|
|
1233
|
+
var TextareaField = import_react26.default.forwardRef((props, ref) => {
|
|
1225
1234
|
const { value, isLoading, ...inputProps } = props;
|
|
1226
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(field_default, { ...inputProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1227
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1228
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(field_default, { ...inputProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react25.Box, { position: "relative", children: [
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react25.Textarea, { ref, value, ...inputProps }),
|
|
1237
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react25.Box, { zIndex: 999, top: 2, right: 2, position: "absolute", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(loader_default, { size: "sm" }) })
|
|
1229
1238
|
] }) });
|
|
1230
1239
|
});
|
|
1231
1240
|
TextareaField.defaultProps = {
|
|
@@ -1234,7 +1243,7 @@ TextareaField.defaultProps = {
|
|
|
1234
1243
|
var textarea_default = TextareaField;
|
|
1235
1244
|
|
|
1236
1245
|
// src/components/form/index.ts
|
|
1237
|
-
var
|
|
1246
|
+
var import_react27 = require("@chakra-ui/react");
|
|
1238
1247
|
|
|
1239
1248
|
// src/components/counter/components/counter.tsx
|
|
1240
1249
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
@@ -1256,7 +1265,7 @@ var Counter = ({
|
|
|
1256
1265
|
const increment = () => {
|
|
1257
1266
|
onChange(value + 1);
|
|
1258
1267
|
};
|
|
1259
|
-
const handleChangeInput = (0,
|
|
1268
|
+
const handleChangeInput = (0, import_react29.useCallback)(
|
|
1260
1269
|
(e) => {
|
|
1261
1270
|
const inputValue = e.target.value;
|
|
1262
1271
|
const cleanedInputValue = inputValue.replace(/^0+/, "") || "0";
|
|
@@ -1267,10 +1276,10 @@ var Counter = ({
|
|
|
1267
1276
|
},
|
|
1268
1277
|
[onChange, max, min]
|
|
1269
1278
|
);
|
|
1270
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1271
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react28.Box, { children: [
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react28.HStack, { gap: "1", children: [
|
|
1272
1281
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1273
|
-
|
|
1282
|
+
import_react28.IconButton,
|
|
1274
1283
|
{
|
|
1275
1284
|
"aria-label": "minus",
|
|
1276
1285
|
"data-test-id": "CT_Component_Counter_decrement",
|
|
@@ -1300,7 +1309,7 @@ var Counter = ({
|
|
|
1300
1309
|
}
|
|
1301
1310
|
),
|
|
1302
1311
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1303
|
-
|
|
1312
|
+
import_react28.IconButton,
|
|
1304
1313
|
{
|
|
1305
1314
|
"aria-label": "plus",
|
|
1306
1315
|
"data-test-id": "CT_Component_Counter_decrement",
|
|
@@ -1311,21 +1320,21 @@ var Counter = ({
|
|
|
1311
1320
|
}
|
|
1312
1321
|
)
|
|
1313
1322
|
] }),
|
|
1314
|
-
!isError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1323
|
+
!isError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react28.Text, { mt: 1, color: "black.medium", textStyle: "text.xs", children: helperText }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react28.Text, { mt: 1, color: "danger.500", textStyle: "text.xs", children: error })
|
|
1315
1324
|
] });
|
|
1316
1325
|
};
|
|
1317
1326
|
var counter_default = Counter;
|
|
1318
1327
|
|
|
1319
1328
|
// src/components/data-table/components/data-table.tsx
|
|
1320
1329
|
var import_icons2 = require("@chakra-ui/icons");
|
|
1321
|
-
var
|
|
1322
|
-
var
|
|
1330
|
+
var import_react31 = require("@chakra-ui/react");
|
|
1331
|
+
var import_react32 = require("@emotion/react");
|
|
1323
1332
|
var import_react_table = require("@tanstack/react-table");
|
|
1324
|
-
var
|
|
1325
|
-
var
|
|
1333
|
+
var React6 = __toESM(require("react"));
|
|
1334
|
+
var import_react33 = require("react");
|
|
1326
1335
|
|
|
1327
1336
|
// src/hooks/use-drag-threshold/use-drag-or-click.ts
|
|
1328
|
-
var
|
|
1337
|
+
var import_react30 = require("react");
|
|
1329
1338
|
|
|
1330
1339
|
// src/hooks/use-drag-threshold/drag-threshold.ts
|
|
1331
1340
|
var DragThreshold = class {
|
|
@@ -1368,7 +1377,7 @@ var DragThreshold = class {
|
|
|
1368
1377
|
|
|
1369
1378
|
// src/hooks/use-drag-threshold/use-drag-or-click.ts
|
|
1370
1379
|
var useDragOrClick = () => {
|
|
1371
|
-
const clickOrDragged = (0,
|
|
1380
|
+
const clickOrDragged = (0, import_react30.useRef)(new DragThreshold());
|
|
1372
1381
|
const getDragOrClickProps = ({
|
|
1373
1382
|
onClick,
|
|
1374
1383
|
onMouseDown,
|
|
@@ -1462,7 +1471,7 @@ var getCommonPinningStyles = (column, paddingRowX) => {
|
|
|
1462
1471
|
} : {}
|
|
1463
1472
|
};
|
|
1464
1473
|
};
|
|
1465
|
-
var fadeIn =
|
|
1474
|
+
var fadeIn = import_react31.keyframes`
|
|
1466
1475
|
from { opacity: 0; }
|
|
1467
1476
|
to { opacity: 1; }
|
|
1468
1477
|
`;
|
|
@@ -1480,22 +1489,22 @@ var useDataTable = ({
|
|
|
1480
1489
|
onRowSelectionChange,
|
|
1481
1490
|
columnPinning
|
|
1482
1491
|
}) => {
|
|
1483
|
-
const [isFirstLoad, setIsFirstLoad] =
|
|
1484
|
-
const [sorting, setSorting] =
|
|
1485
|
-
const dataColumns =
|
|
1486
|
-
const action =
|
|
1487
|
-
const throttleRowClick = (0,
|
|
1492
|
+
const [isFirstLoad, setIsFirstLoad] = React6.useState(true);
|
|
1493
|
+
const [sorting, setSorting] = React6.useState(sortingState != null ? sortingState : []);
|
|
1494
|
+
const dataColumns = React6.useMemo(() => columns, [columns]);
|
|
1495
|
+
const action = React6.useRef("");
|
|
1496
|
+
const throttleRowClick = (0, import_react33.useCallback)(
|
|
1488
1497
|
throttle((row) => {
|
|
1489
1498
|
row.toggleSelected();
|
|
1490
1499
|
}, 250),
|
|
1491
1500
|
[]
|
|
1492
1501
|
);
|
|
1493
|
-
const checkboxColumn =
|
|
1502
|
+
const checkboxColumn = React6.useMemo(
|
|
1494
1503
|
() => [
|
|
1495
1504
|
{
|
|
1496
1505
|
id: "select",
|
|
1497
1506
|
size: 32,
|
|
1498
|
-
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1507
|
+
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1499
1508
|
checkbox_default,
|
|
1500
1509
|
{
|
|
1501
1510
|
"data-test-id": "select-header-data-table",
|
|
@@ -1523,7 +1532,7 @@ var useDataTable = ({
|
|
|
1523
1532
|
}
|
|
1524
1533
|
) }),
|
|
1525
1534
|
cell: ({ row }) => {
|
|
1526
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1527
1536
|
checkbox_default,
|
|
1528
1537
|
{
|
|
1529
1538
|
"data-test-id": `select-data-table-${row.index}`,
|
|
@@ -1565,22 +1574,22 @@ var useDataTable = ({
|
|
|
1565
1574
|
});
|
|
1566
1575
|
const { getSelectedRowModel, toggleAllRowsSelected } = table;
|
|
1567
1576
|
const { flatRows } = getSelectedRowModel();
|
|
1568
|
-
|
|
1577
|
+
React6.useEffect(() => {
|
|
1569
1578
|
const rowData = flatRows.map((row) => row.original);
|
|
1570
1579
|
if (onSelectedRow) {
|
|
1571
1580
|
onSelectedRow(rowData, action.current);
|
|
1572
1581
|
}
|
|
1573
1582
|
}, [flatRows]);
|
|
1574
|
-
|
|
1583
|
+
React6.useEffect(() => {
|
|
1575
1584
|
action.current = "newData";
|
|
1576
1585
|
table.setRowSelection(selectedRow != null ? selectedRow : {});
|
|
1577
1586
|
}, [selectedRow]);
|
|
1578
|
-
|
|
1587
|
+
React6.useEffect(() => {
|
|
1579
1588
|
if (onSort && !isFirstLoad) {
|
|
1580
1589
|
onSort(sorting);
|
|
1581
1590
|
}
|
|
1582
1591
|
}, [sorting]);
|
|
1583
|
-
|
|
1592
|
+
React6.useEffect(() => {
|
|
1584
1593
|
setIsFirstLoad(false);
|
|
1585
1594
|
}, []);
|
|
1586
1595
|
return {
|
|
@@ -1592,7 +1601,7 @@ var useDataTable = ({
|
|
|
1592
1601
|
selectedRow
|
|
1593
1602
|
};
|
|
1594
1603
|
};
|
|
1595
|
-
var DataTable =
|
|
1604
|
+
var DataTable = React6.forwardRef((props, ref) => {
|
|
1596
1605
|
var _a, _b, _c, _d, _e;
|
|
1597
1606
|
const {
|
|
1598
1607
|
isLoading,
|
|
@@ -1610,8 +1619,8 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1610
1619
|
} = props;
|
|
1611
1620
|
const { clickOrDragged, getDragOrClickProps } = useDragOrClick();
|
|
1612
1621
|
const { table, action, throttleRowClick, toggleAllRowsSelected, generateColumn, selectedRow } = useDataTable(props);
|
|
1613
|
-
const refTable =
|
|
1614
|
-
|
|
1622
|
+
const refTable = React6.useRef(null);
|
|
1623
|
+
React6.useImperativeHandle(ref, () => ({
|
|
1615
1624
|
toggleAllRowsSelected
|
|
1616
1625
|
}));
|
|
1617
1626
|
const tableResizeHandler = () => {
|
|
@@ -1631,7 +1640,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1631
1640
|
};
|
|
1632
1641
|
};
|
|
1633
1642
|
let lastPinnedColumn = 0;
|
|
1634
|
-
|
|
1643
|
+
React6.useEffect(() => {
|
|
1635
1644
|
var _a2;
|
|
1636
1645
|
(_a2 = refTable.current) == null ? void 0 : _a2.addEventListener("scroll", (s) => {
|
|
1637
1646
|
var _a3, _b2, _c2, _d2;
|
|
@@ -1666,7 +1675,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1666
1675
|
return { width: `${header.getSize()}px` };
|
|
1667
1676
|
};
|
|
1668
1677
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1669
|
-
|
|
1678
|
+
import_react31.Box,
|
|
1670
1679
|
{
|
|
1671
1680
|
overflowX: "auto",
|
|
1672
1681
|
overflowY: "hidden",
|
|
@@ -1676,9 +1685,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1676
1685
|
ref: refTable,
|
|
1677
1686
|
...((_e = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _e.length) && hasScroll ? { "data-pin-right": true } : {},
|
|
1678
1687
|
...container,
|
|
1679
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1680
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1681
|
-
|
|
1688
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react31.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
|
1689
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.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_react31.Tr, { ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1690
|
+
import_react31.Th,
|
|
1682
1691
|
{
|
|
1683
1692
|
colSpan: header.colSpan,
|
|
1684
1693
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
@@ -1686,35 +1695,35 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1686
1695
|
sx: getCommonPinningStyles(header.column, paddingRowX),
|
|
1687
1696
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
|
1688
1697
|
...getTableHeaderSize(header, index, headerGroup.headers.length),
|
|
1689
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Flex, { "data-test-id": "CT_component_data-table_loader", align: "center", gap: 2, children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()) })
|
|
1690
1699
|
},
|
|
1691
1700
|
header.id
|
|
1692
1701
|
)) }, headerGroup.id)) }),
|
|
1693
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1694
|
-
|
|
1702
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1703
|
+
import_react31.Td,
|
|
1695
1704
|
{
|
|
1696
1705
|
width: "100%",
|
|
1697
1706
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
1698
1707
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
|
1699
1708
|
sx: getCommonPinningStyles(column, paddingRowX),
|
|
1700
1709
|
...styles == null ? void 0 : styles.tableCell,
|
|
1701
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" })
|
|
1702
1711
|
},
|
|
1703
1712
|
column.id
|
|
1704
1713
|
)) }, num)) })
|
|
1705
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1714
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react31.Table, { ...styles == null ? void 0 : styles.table, children: [
|
|
1706
1715
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1707
|
-
|
|
1716
|
+
import_react31.Thead,
|
|
1708
1717
|
{
|
|
1709
1718
|
maxH: "50px",
|
|
1710
1719
|
...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
|
|
1711
|
-
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1720
|
+
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Tr, { bg: (0, import_react31.useColorModeValue)("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => {
|
|
1712
1721
|
var _a2, _b2;
|
|
1713
1722
|
if (!!((_a2 = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _a2.length) && header.column.getIsFirstColumn("right")) {
|
|
1714
1723
|
lastPinnedColumn = header.column.getAfter("right");
|
|
1715
1724
|
}
|
|
1716
1725
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1717
|
-
|
|
1726
|
+
import_react31.Th,
|
|
1718
1727
|
{
|
|
1719
1728
|
colSpan: header.colSpan,
|
|
1720
1729
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
@@ -1723,7 +1732,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1723
1732
|
...getTableHeaderSize(header, index, headerGroup.headers.length),
|
|
1724
1733
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
|
1725
1734
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1726
|
-
|
|
1735
|
+
import_react31.Flex,
|
|
1727
1736
|
{
|
|
1728
1737
|
backgroundColor: "white",
|
|
1729
1738
|
height: "100%",
|
|
@@ -1734,7 +1743,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1734
1743
|
children: [
|
|
1735
1744
|
(0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()),
|
|
1736
1745
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1737
|
-
|
|
1746
|
+
import_react31.Box,
|
|
1738
1747
|
{
|
|
1739
1748
|
as: "span",
|
|
1740
1749
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
|
@@ -1743,7 +1752,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1743
1752
|
children: (_b2 = header.column.getCanSort() && {
|
|
1744
1753
|
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
|
1745
1754
|
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
|
1746
|
-
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1755
|
+
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
|
|
1747
1756
|
}
|
|
1748
1757
|
)
|
|
1749
1758
|
]
|
|
@@ -1755,18 +1764,18 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1755
1764
|
}) }, headerGroup.id))
|
|
1756
1765
|
}
|
|
1757
1766
|
),
|
|
1758
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1767
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react31.Tbody, { ...styles == null ? void 0 : styles.tableBody, animation: `${fadeIn} 0.15s ease-out`, children: table.getRowModel().rows.map((row, index) => {
|
|
1759
1768
|
const isDisabledRow = disabledRow && disabledRow(row.original);
|
|
1760
1769
|
const isHighlightedRow = Object.keys(selectedRow != null ? selectedRow : {}).filter((key) => selectedRow == null ? void 0 : selectedRow[key]).includes(row.id) || highlightedRow && highlightedRow(row.original);
|
|
1761
1770
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1762
|
-
|
|
1771
|
+
import_react31.Tr,
|
|
1763
1772
|
{
|
|
1764
1773
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
|
1765
1774
|
...styles == null ? void 0 : styles.tableRow,
|
|
1766
1775
|
sx: { ...isHighlightedRow && getTableHighlightStyle(highlightRowColor) },
|
|
1767
1776
|
"aria-disabled": isDisabledRow,
|
|
1768
1777
|
"data-highlight": isHighlightedRow ? "true" : "false",
|
|
1769
|
-
css:
|
|
1778
|
+
css: import_react32.css`
|
|
1770
1779
|
&:last-child {
|
|
1771
1780
|
td {
|
|
1772
1781
|
border-bottom: none;
|
|
@@ -1800,7 +1809,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1800
1809
|
const meta = cell.column.columnDef.meta;
|
|
1801
1810
|
const isDisabled = isCellDisabled(row.original, cell.column.id);
|
|
1802
1811
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1803
|
-
|
|
1812
|
+
import_react31.Td,
|
|
1804
1813
|
{
|
|
1805
1814
|
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
|
1806
1815
|
fontSize: "text.sm",
|
|
@@ -1811,7 +1820,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1811
1820
|
},
|
|
1812
1821
|
...styles == null ? void 0 : styles.tableCell,
|
|
1813
1822
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1814
|
-
|
|
1823
|
+
import_react31.Flex,
|
|
1815
1824
|
{
|
|
1816
1825
|
tabIndex: 0,
|
|
1817
1826
|
height: "100%",
|
|
@@ -1821,7 +1830,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1821
1830
|
opacity: isDisabled ? 0.5 : 1,
|
|
1822
1831
|
sx: { ...meta && meta.columnStyles ? meta.columnStyles : {} },
|
|
1823
1832
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1824
|
-
|
|
1833
|
+
import_react31.Box,
|
|
1825
1834
|
{
|
|
1826
1835
|
onMouseUp: (e) => {
|
|
1827
1836
|
var _a2, _b2;
|
|
@@ -1864,9 +1873,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1864
1873
|
var data_table_default = DataTable;
|
|
1865
1874
|
|
|
1866
1875
|
// src/components/data-table/hook/use-select-table.ts
|
|
1867
|
-
var
|
|
1876
|
+
var import_react34 = __toESM(require("react"));
|
|
1868
1877
|
var useSelectTable = (intialRowSelection) => {
|
|
1869
|
-
const [rowSelection, onRowSelectionChange] =
|
|
1878
|
+
const [rowSelection, onRowSelectionChange] = import_react34.default.useState(intialRowSelection != null ? intialRowSelection : {});
|
|
1870
1879
|
return {
|
|
1871
1880
|
rowSelection,
|
|
1872
1881
|
onRowSelectionChange
|
|
@@ -1874,10 +1883,10 @@ var useSelectTable = (intialRowSelection) => {
|
|
|
1874
1883
|
};
|
|
1875
1884
|
|
|
1876
1885
|
// src/components/datepicker/components/datepicker.tsx
|
|
1877
|
-
var
|
|
1886
|
+
var import_react38 = require("@chakra-ui/react");
|
|
1878
1887
|
var import_shared_utils8 = require("@chakra-ui/shared-utils");
|
|
1879
1888
|
var import_internal_icon6 = require("@ctlyst.id/internal-icon");
|
|
1880
|
-
var
|
|
1889
|
+
var import_react39 = require("@floating-ui/react");
|
|
1881
1890
|
var import_react_datepicker = __toESM(require("react-datepicker"));
|
|
1882
1891
|
|
|
1883
1892
|
// ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs
|
|
@@ -2414,11 +2423,11 @@ id.localize.month = buildLocalizeFn2({
|
|
|
2414
2423
|
});
|
|
2415
2424
|
|
|
2416
2425
|
// src/components/datepicker/components/styles.tsx
|
|
2417
|
-
var
|
|
2426
|
+
var import_react35 = require("@emotion/react");
|
|
2418
2427
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2419
2428
|
var Styles = ({ showHeader }) => {
|
|
2420
2429
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2421
|
-
|
|
2430
|
+
import_react35.Global,
|
|
2422
2431
|
{
|
|
2423
2432
|
styles: `
|
|
2424
2433
|
@charset "UTF-8";
|
|
@@ -3253,21 +3262,21 @@ var Styles = ({ showHeader }) => {
|
|
|
3253
3262
|
var styles_default = Styles;
|
|
3254
3263
|
|
|
3255
3264
|
// src/components/datepicker/components/time-input.tsx
|
|
3256
|
-
var
|
|
3257
|
-
var
|
|
3265
|
+
var import_react36 = require("@chakra-ui/react");
|
|
3266
|
+
var import_react37 = __toESM(require("react"));
|
|
3258
3267
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3259
3268
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
3260
|
-
const [time, setTime] =
|
|
3269
|
+
const [time, setTime] = import_react37.default.useState(value || "00:00");
|
|
3261
3270
|
const handleChange = (e) => {
|
|
3262
3271
|
var _a, _b;
|
|
3263
3272
|
setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
|
|
3264
3273
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
|
3265
3274
|
};
|
|
3266
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3267
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3268
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react36.Flex, { flexDir: "column", p: 4, pt: 0, children: [
|
|
3276
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react36.Text, { mb: 2, children: label }),
|
|
3277
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react36.InputGroup, { alignItems: "center", borderColor: "neutral.400", children: [
|
|
3269
3278
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3270
|
-
|
|
3279
|
+
import_react36.Input,
|
|
3271
3280
|
{
|
|
3272
3281
|
onChange: handleChange,
|
|
3273
3282
|
type: "time",
|
|
@@ -3282,7 +3291,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
|
3282
3291
|
}
|
|
3283
3292
|
}
|
|
3284
3293
|
),
|
|
3285
|
-
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3294
|
+
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react36.InputRightAddon, { children: rightAddon })
|
|
3286
3295
|
] })
|
|
3287
3296
|
] });
|
|
3288
3297
|
};
|
|
@@ -3338,7 +3347,7 @@ var Datepicker = ({
|
|
|
3338
3347
|
},
|
|
3339
3348
|
selected,
|
|
3340
3349
|
popperModifiers: [
|
|
3341
|
-
(0,
|
|
3350
|
+
(0, import_react39.offset)(4),
|
|
3342
3351
|
{
|
|
3343
3352
|
name: "placement",
|
|
3344
3353
|
fn: (state) => {
|
|
@@ -3358,10 +3367,10 @@ var Datepicker = ({
|
|
|
3358
3367
|
isError,
|
|
3359
3368
|
name,
|
|
3360
3369
|
sx: props.selectsRange ? { caretColor: "transparent" } : {},
|
|
3361
|
-
addOnRight: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3370
|
+
addOnRight: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react22.InputRightElement, { alignSelf: "center", bottom: 0, flexDir: "row-reverse", width: "auto", mr: 2, gap: 2, children: [
|
|
3362
3371
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_internal_icon6.Calendar, { size: 4, color: "neutral.400" }),
|
|
3363
3372
|
value && !props.disabled && props.isClearable && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3364
|
-
|
|
3373
|
+
import_react38.IconButton,
|
|
3365
3374
|
{
|
|
3366
3375
|
"data-test-id": "H0rseVCzGIaqoLho-EPbu",
|
|
3367
3376
|
display: "flex",
|
|
@@ -3395,9 +3404,9 @@ var Datepicker = ({
|
|
|
3395
3404
|
if (props.inline) {
|
|
3396
3405
|
return component;
|
|
3397
3406
|
}
|
|
3398
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react38.FormControl, { "data-test-id": "CT_Component_datepicker_wrapper", isInvalid: isError, children: [
|
|
3399
3408
|
component,
|
|
3400
|
-
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3409
|
+
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.FormHelperText, { fontSize: "text.xs", mt: 1, children: helperText }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.FormErrorMessage, { fontSize: "text.xs", mt: 1, children: error })
|
|
3401
3410
|
] });
|
|
3402
3411
|
};
|
|
3403
3412
|
Datepicker.defaultProps = {
|
|
@@ -3415,18 +3424,18 @@ Datepicker.defaultProps = {
|
|
|
3415
3424
|
var datepicker_default = Datepicker;
|
|
3416
3425
|
|
|
3417
3426
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
|
3418
|
-
var
|
|
3419
|
-
var
|
|
3420
|
-
var
|
|
3427
|
+
var import_react40 = require("@chakra-ui/react");
|
|
3428
|
+
var import_react41 = require("@emotion/react");
|
|
3429
|
+
var import_react42 = __toESM(require("react"));
|
|
3421
3430
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3422
3431
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3423
|
-
const [date, setDate] =
|
|
3432
|
+
const [date, setDate] = import_react42.default.useState(null);
|
|
3424
3433
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3425
|
-
|
|
3434
|
+
import_react40.Box,
|
|
3426
3435
|
{
|
|
3427
3436
|
fontSize: "12px",
|
|
3428
3437
|
lineHeight: "18px",
|
|
3429
|
-
css:
|
|
3438
|
+
css: import_react41.css`
|
|
3430
3439
|
input[type='date']::-webkit-inner-spin-button,
|
|
3431
3440
|
input[type='date']::-webkit-calendar-picker-indicator {
|
|
3432
3441
|
display: none;
|
|
@@ -3437,7 +3446,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
|
3437
3446
|
}
|
|
3438
3447
|
`,
|
|
3439
3448
|
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3440
|
-
|
|
3449
|
+
import_react40.Input,
|
|
3441
3450
|
{
|
|
3442
3451
|
"data-test-id": props["data-test-id"],
|
|
3443
3452
|
type: "date",
|
|
@@ -3450,7 +3459,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
|
3450
3459
|
min,
|
|
3451
3460
|
max,
|
|
3452
3461
|
required: true,
|
|
3453
|
-
css:
|
|
3462
|
+
css: import_react41.css`
|
|
3454
3463
|
border: 1px solid transparent;
|
|
3455
3464
|
|
|
3456
3465
|
&:focus,
|
|
@@ -3474,11 +3483,11 @@ DatePickerMonth.defaultProps = {
|
|
|
3474
3483
|
var datepicker_month_default = DatePickerMonth;
|
|
3475
3484
|
|
|
3476
3485
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
|
3477
|
-
var
|
|
3486
|
+
var import_react43 = require("@chakra-ui/react");
|
|
3478
3487
|
var import_styled = __toESM(require("@emotion/styled"));
|
|
3479
|
-
var
|
|
3488
|
+
var import_react44 = __toESM(require("react"));
|
|
3480
3489
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3481
|
-
var MultiDateWrapper = (0, import_styled.default)(
|
|
3490
|
+
var MultiDateWrapper = (0, import_styled.default)(import_react43.Box)`
|
|
3482
3491
|
display: flex;
|
|
3483
3492
|
align-items: center;
|
|
3484
3493
|
width: fit-content;
|
|
@@ -3493,7 +3502,7 @@ var MultiDatePickerMonth = ({
|
|
|
3493
3502
|
min = "2020-01-01",
|
|
3494
3503
|
max = "2020-12-31"
|
|
3495
3504
|
}) => {
|
|
3496
|
-
const [date, setDate] =
|
|
3505
|
+
const [date, setDate] = import_react44.default.useState([null, null]);
|
|
3497
3506
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(MultiDateWrapper, { isError, children: [
|
|
3498
3507
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3499
3508
|
datepicker_month_default,
|
|
@@ -3507,7 +3516,7 @@ var MultiDatePickerMonth = ({
|
|
|
3507
3516
|
max
|
|
3508
3517
|
}
|
|
3509
3518
|
),
|
|
3510
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3519
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react43.Box, { children: "-" }),
|
|
3511
3520
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3512
3521
|
datepicker_month_default,
|
|
3513
3522
|
{
|
|
@@ -3530,7 +3539,7 @@ MultiDatePickerMonth.defaultProps = {
|
|
|
3530
3539
|
var multi_datepicker_month_default = MultiDatePickerMonth;
|
|
3531
3540
|
|
|
3532
3541
|
// src/components/dialog/components/dialog.tsx
|
|
3533
|
-
var
|
|
3542
|
+
var import_react45 = require("@chakra-ui/react");
|
|
3534
3543
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3535
3544
|
var Dialog = ({
|
|
3536
3545
|
title,
|
|
@@ -3541,12 +3550,12 @@ var Dialog = ({
|
|
|
3541
3550
|
isOverlayClickable,
|
|
3542
3551
|
...props
|
|
3543
3552
|
}) => {
|
|
3544
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3545
|
-
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3546
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3547
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3548
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3549
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react45.Modal, { ...props, children: [
|
|
3554
|
+
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react45.ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react45.ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
|
3556
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react45.ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react45.Text, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react45.ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
|
3558
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react45.ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
|
3550
3559
|
] })
|
|
3551
3560
|
] });
|
|
3552
3561
|
};
|
|
@@ -3561,7 +3570,7 @@ var dialog_default = Dialog;
|
|
|
3561
3570
|
var Icon2 = __toESM(require("@ctlyst.id/internal-icon"));
|
|
3562
3571
|
|
|
3563
3572
|
// src/components/empty-state/components/layout.tsx
|
|
3564
|
-
var
|
|
3573
|
+
var import_react46 = require("@chakra-ui/react");
|
|
3565
3574
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3566
3575
|
var EmptyState = (props) => {
|
|
3567
3576
|
const { icon, title, description, buttonText, onClick } = props;
|
|
@@ -3570,13 +3579,13 @@ var EmptyState = (props) => {
|
|
|
3570
3579
|
onClick();
|
|
3571
3580
|
}
|
|
3572
3581
|
};
|
|
3573
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react46.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react46.VStack, { textAlign: "center", children: [
|
|
3574
3583
|
icon,
|
|
3575
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3576
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3577
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3584
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react46.VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
|
|
3585
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react46.Text, { textStyle: "text.lg", fontWeight: "bold", children: title }),
|
|
3586
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react46.Text, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
|
|
3578
3587
|
] }),
|
|
3579
|
-
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3588
|
+
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react46.Box, { mt: 3, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react46.Button, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
|
|
3580
3589
|
] }) });
|
|
3581
3590
|
};
|
|
3582
3591
|
var layout_default = EmptyState;
|
|
@@ -3653,28 +3662,28 @@ EmptyState2.NotAuthorize = EmptyStateNotAuthorize;
|
|
|
3653
3662
|
var empty_state_default = EmptyState2;
|
|
3654
3663
|
|
|
3655
3664
|
// src/components/header/components/header.tsx
|
|
3656
|
-
var
|
|
3665
|
+
var import_react53 = require("@chakra-ui/react");
|
|
3657
3666
|
|
|
3658
3667
|
// src/components/header/components/logo.tsx
|
|
3659
|
-
var
|
|
3668
|
+
var import_react47 = require("@chakra-ui/react");
|
|
3660
3669
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3661
3670
|
var Logo = ({ url, imageUrl, height }) => {
|
|
3662
3671
|
if (url)
|
|
3663
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3664
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react47.Box, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react47.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" }) });
|
|
3673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react47.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" });
|
|
3665
3674
|
};
|
|
3666
3675
|
var XMSLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3667
|
-
|
|
3676
|
+
import_react47.Image,
|
|
3668
3677
|
{
|
|
3669
3678
|
height: 8,
|
|
3670
|
-
src: (0,
|
|
3679
|
+
src: (0, import_react47.useColorModeValue)("https://assets.voila.id/xms/logo-xms.jpg", "https://assets.voila.id/xms/logo-xms-dark.png")
|
|
3671
3680
|
}
|
|
3672
3681
|
);
|
|
3673
3682
|
var VoilaLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3674
|
-
|
|
3683
|
+
import_react47.Image,
|
|
3675
3684
|
{
|
|
3676
3685
|
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
|
3677
|
-
filter: (0,
|
|
3686
|
+
filter: (0, import_react47.useColorModeValue)("none", "invert(1)"),
|
|
3678
3687
|
maxW: 24
|
|
3679
3688
|
}
|
|
3680
3689
|
);
|
|
@@ -3684,16 +3693,16 @@ Logo.defaultProps = {
|
|
|
3684
3693
|
};
|
|
3685
3694
|
|
|
3686
3695
|
// src/components/header/components/profile.tsx
|
|
3687
|
-
var
|
|
3696
|
+
var import_react50 = require("@chakra-ui/react");
|
|
3688
3697
|
var import_fi2 = require("react-icons/fi");
|
|
3689
3698
|
|
|
3690
3699
|
// src/components/nav-item/components/nav-item.tsx
|
|
3691
|
-
var
|
|
3700
|
+
var import_react48 = require("@chakra-ui/react");
|
|
3692
3701
|
var import_shared_utils9 = require("@chakra-ui/shared-utils");
|
|
3693
3702
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3694
3703
|
var NavItem = ({ children, isActive, isChild, isDisabled, _hover, ...props }) => {
|
|
3695
3704
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3696
|
-
|
|
3705
|
+
import_react48.Link,
|
|
3697
3706
|
{
|
|
3698
3707
|
"data-test-id": props["data-test-id"],
|
|
3699
3708
|
opacity: isDisabled ? "0.3" : "initial",
|
|
@@ -3735,7 +3744,7 @@ NavItem.defaultProps = {
|
|
|
3735
3744
|
};
|
|
3736
3745
|
|
|
3737
3746
|
// src/components/tooltip/components/tooltip.tsx
|
|
3738
|
-
var
|
|
3747
|
+
var import_react49 = require("@chakra-ui/react");
|
|
3739
3748
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3740
3749
|
var Tooltip = (props) => {
|
|
3741
3750
|
const {
|
|
@@ -3748,7 +3757,7 @@ var Tooltip = (props) => {
|
|
|
3748
3757
|
fontWeight = "400"
|
|
3749
3758
|
} = props;
|
|
3750
3759
|
const content = ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3751
|
-
|
|
3760
|
+
import_react49.PopoverContent,
|
|
3752
3761
|
{
|
|
3753
3762
|
"data-test-id": "",
|
|
3754
3763
|
border: "none",
|
|
@@ -3762,15 +3771,15 @@ var Tooltip = (props) => {
|
|
|
3762
3771
|
onClose();
|
|
3763
3772
|
},
|
|
3764
3773
|
children: [
|
|
3765
|
-
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3766
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3774
|
+
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react49.PopoverArrow, { color, bg, shadow: "none" }),
|
|
3775
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react49.PopoverBody, { color, ...props, fontWeight, children: props.label })
|
|
3767
3776
|
]
|
|
3768
3777
|
}
|
|
3769
3778
|
);
|
|
3770
|
-
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3771
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3772
|
-
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3773
|
-
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3779
|
+
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react49.Popover, { trigger: "hover", placement: props.placement, ...props.popoverProps, children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3780
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react49.PopoverTrigger, { children }),
|
|
3781
|
+
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react49.Portal, { children: content({ onClose }) }) : content({ onClose })
|
|
3782
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react49.Tooltip, { ...props, children });
|
|
3774
3783
|
};
|
|
3775
3784
|
|
|
3776
3785
|
// src/components/header/components/profile.tsx
|
|
@@ -3786,10 +3795,10 @@ var Profile = ({
|
|
|
3786
3795
|
...props
|
|
3787
3796
|
}) => {
|
|
3788
3797
|
var _a, _b;
|
|
3789
|
-
const { isOpen, onToggle, onClose } = (0,
|
|
3790
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3798
|
+
const { isOpen, onToggle, onClose } = (0, import_react50.useDisclosure)();
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react50.Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
|
3791
3800
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3792
|
-
|
|
3801
|
+
import_react50.Box,
|
|
3793
3802
|
{
|
|
3794
3803
|
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
|
3795
3804
|
as: "button",
|
|
@@ -3805,14 +3814,14 @@ var Profile = ({
|
|
|
3805
3814
|
onClick: onToggle,
|
|
3806
3815
|
color,
|
|
3807
3816
|
...props,
|
|
3808
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3809
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3810
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3811
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3817
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react50.HStack, { children: [
|
|
3818
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react50.VStack, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
|
|
3819
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Text, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
|
3820
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react50.Flex, { alignItems: "center", children: [
|
|
3812
3821
|
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3813
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3822
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
|
3814
3823
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3815
|
-
|
|
3824
|
+
import_react50.Box,
|
|
3816
3825
|
{
|
|
3817
3826
|
className: "catalyst_header-profile-divider",
|
|
3818
3827
|
h: "3",
|
|
@@ -3822,17 +3831,17 @@ var Profile = ({
|
|
|
3822
3831
|
}
|
|
3823
3832
|
)
|
|
3824
3833
|
] }),
|
|
3825
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3826
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3834
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react50.Flex, { align: "center", justify: "center", children: [
|
|
3835
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Text, { textStyle: "text.xs", children: data.office[0] }),
|
|
3827
3836
|
data.office.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3828
3837
|
Tooltip,
|
|
3829
3838
|
{
|
|
3830
3839
|
isInteractive: true,
|
|
3831
3840
|
hasArrow: true,
|
|
3832
3841
|
p: "2",
|
|
3833
|
-
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3834
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3835
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3842
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react50.Box, { children: [
|
|
3843
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Text, { children: "Akses Office:" }),
|
|
3844
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Text, { children: data.office.sort().join(", ") })
|
|
3836
3845
|
] }),
|
|
3837
3846
|
textAlign: "left",
|
|
3838
3847
|
placement: "bottom-end",
|
|
@@ -3843,7 +3852,7 @@ var Profile = ({
|
|
|
3843
3852
|
},
|
|
3844
3853
|
width: 300,
|
|
3845
3854
|
...officeContainer,
|
|
3846
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3847
3856
|
badge_default,
|
|
3848
3857
|
{
|
|
3849
3858
|
rounded: "full",
|
|
@@ -3860,18 +3869,18 @@ var Profile = ({
|
|
|
3860
3869
|
) })
|
|
3861
3870
|
}
|
|
3862
3871
|
)
|
|
3863
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3872
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
|
3864
3873
|
] })
|
|
3865
3874
|
] }),
|
|
3866
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Box, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Avatar, { size: "sm", bg: brandColor, color: "white", name: (_b = data == null ? void 0 : data.name) != null ? _b : data == null ? void 0 : data.email }) }) })
|
|
3867
3876
|
] })
|
|
3868
3877
|
}
|
|
3869
3878
|
),
|
|
3870
|
-
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3871
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3872
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3879
|
+
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react50.PopoverContent, { bg: "white", maxW: 200, children: [
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.PopoverArrow, { bg: "white" }),
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.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_react50.Box, { display: "flex", alignItems: "center", children: [
|
|
3873
3882
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_fi2.FiPower, {}),
|
|
3874
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3883
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react50.Text, { ml: "2", children: "Logout" })
|
|
3875
3884
|
] }) }) })
|
|
3876
3885
|
] })
|
|
3877
3886
|
] });
|
|
@@ -3884,17 +3893,17 @@ Profile.defaultProps = {
|
|
|
3884
3893
|
};
|
|
3885
3894
|
|
|
3886
3895
|
// src/components/header/components/switch-mode.tsx
|
|
3887
|
-
var
|
|
3896
|
+
var import_react51 = require("@chakra-ui/react");
|
|
3888
3897
|
var import_fi3 = require("react-icons/fi");
|
|
3889
3898
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3890
3899
|
var SwitchMode = () => {
|
|
3891
|
-
const { colorMode, toggleColorMode } = (0,
|
|
3892
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3900
|
+
const { colorMode, toggleColorMode } = (0, import_react51.useColorMode)();
|
|
3901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react51.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 }) });
|
|
3893
3902
|
};
|
|
3894
3903
|
var switch_mode_default = SwitchMode;
|
|
3895
3904
|
|
|
3896
3905
|
// src/components/header/components/version.tsx
|
|
3897
|
-
var
|
|
3906
|
+
var import_react52 = require("@chakra-ui/react");
|
|
3898
3907
|
|
|
3899
3908
|
// src/components/header/utils/formatter.ts
|
|
3900
3909
|
function environmentName(env) {
|
|
@@ -3932,7 +3941,7 @@ var Version = ({
|
|
|
3932
3941
|
}
|
|
3933
3942
|
) : version,
|
|
3934
3943
|
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3935
|
-
|
|
3944
|
+
import_react52.Box,
|
|
3936
3945
|
{
|
|
3937
3946
|
background: "primary.50",
|
|
3938
3947
|
color: "primary.500",
|
|
@@ -3972,8 +3981,8 @@ var Header = ({
|
|
|
3972
3981
|
bg = "white",
|
|
3973
3982
|
versionStyle,
|
|
3974
3983
|
...props
|
|
3975
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3976
|
-
|
|
3984
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react53.Flex, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3985
|
+
import_react53.Flex,
|
|
3977
3986
|
{
|
|
3978
3987
|
h: "auto",
|
|
3979
3988
|
w: "full",
|
|
@@ -3981,11 +3990,11 @@ var Header = ({
|
|
|
3981
3990
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
|
3982
3991
|
pos: "relative",
|
|
3983
3992
|
children: [
|
|
3984
|
-
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3993
|
+
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react53.Flex, { alignItems: "center", children: [
|
|
3985
3994
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
|
3986
3995
|
children && children
|
|
3987
3996
|
] }),
|
|
3988
|
-
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3997
|
+
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react53.HStack, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
|
3989
3998
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
|
3990
3999
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3991
4000
|
Version,
|
|
@@ -3998,7 +4007,7 @@ var Header = ({
|
|
|
3998
4007
|
}
|
|
3999
4008
|
)
|
|
4000
4009
|
] }),
|
|
4001
|
-
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
4010
|
+
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react53.Flex, { alignItems: "center", children: [
|
|
4002
4011
|
!hideSwitchMode && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(switch_mode_default, {}),
|
|
4003
4012
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Profile, { color: props.color, brandColor, data, onLogout })
|
|
4004
4013
|
] })
|
|
@@ -4022,11 +4031,11 @@ Header.defaultProps = {
|
|
|
4022
4031
|
};
|
|
4023
4032
|
|
|
4024
4033
|
// src/components/header/components/navbar.tsx
|
|
4025
|
-
var
|
|
4034
|
+
var import_react54 = require("@chakra-ui/react");
|
|
4026
4035
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4027
4036
|
var Navbar = ({ bg = "white", children, ...props }) => {
|
|
4028
4037
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4029
|
-
|
|
4038
|
+
import_react54.Flex,
|
|
4030
4039
|
{
|
|
4031
4040
|
minH: "15",
|
|
4032
4041
|
h: "15",
|
|
@@ -4046,21 +4055,21 @@ var Navbar = ({ bg = "white", children, ...props }) => {
|
|
|
4046
4055
|
Navbar.displayName = "Navbar";
|
|
4047
4056
|
|
|
4048
4057
|
// src/components/image/index.ts
|
|
4049
|
-
var
|
|
4058
|
+
var import_react55 = require("@chakra-ui/react");
|
|
4050
4059
|
|
|
4051
4060
|
// src/components/layouting/index.ts
|
|
4052
|
-
var
|
|
4061
|
+
var import_react56 = require("@chakra-ui/react");
|
|
4053
4062
|
|
|
4054
4063
|
// src/components/list/index.tsx
|
|
4055
|
-
var
|
|
4064
|
+
var import_react57 = require("@chakra-ui/react");
|
|
4056
4065
|
|
|
4057
4066
|
// src/components/modal/components/modal-back-button.tsx
|
|
4058
4067
|
var import_icons3 = require("@chakra-ui/icons");
|
|
4059
|
-
var
|
|
4068
|
+
var import_react58 = require("@chakra-ui/react");
|
|
4060
4069
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4061
4070
|
var ModalBackButton = ({ onClick }) => {
|
|
4062
4071
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4063
|
-
|
|
4072
|
+
import_react58.IconButton,
|
|
4064
4073
|
{
|
|
4065
4074
|
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons3.ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
|
4066
4075
|
size: "sm",
|
|
@@ -4080,12 +4089,12 @@ var ModalBackButton = ({ onClick }) => {
|
|
|
4080
4089
|
var modal_back_button_default = ModalBackButton;
|
|
4081
4090
|
|
|
4082
4091
|
// src/components/modal/index.ts
|
|
4083
|
-
var
|
|
4092
|
+
var import_react59 = require("@chakra-ui/react");
|
|
4084
4093
|
|
|
4085
4094
|
// src/components/navigation/components/navigation.tsx
|
|
4086
|
-
var
|
|
4095
|
+
var import_react60 = require("@chakra-ui/react");
|
|
4087
4096
|
var Icon5 = __toESM(require("@ctlyst.id/internal-icon"));
|
|
4088
|
-
var
|
|
4097
|
+
var import_react61 = require("@emotion/react");
|
|
4089
4098
|
|
|
4090
4099
|
// src/components/navigation/components/mapping-icon.tsx
|
|
4091
4100
|
var Icon4 = __toESM(require("@ctlyst.id/internal-icon"));
|
|
@@ -4108,8 +4117,8 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
|
4108
4117
|
// src/components/navigation/components/navigation.tsx
|
|
4109
4118
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4110
4119
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4111
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4112
|
-
|
|
4120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react60.Box, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4121
|
+
import_react60.Flex,
|
|
4113
4122
|
{
|
|
4114
4123
|
bg: "white",
|
|
4115
4124
|
w: "full",
|
|
@@ -4123,9 +4132,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
|
4123
4132
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
|
4124
4133
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
|
4125
4134
|
const activeBg = isActive ? "primary.500" : void 0;
|
|
4126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4127
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4128
|
-
|
|
4135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react60.Popover, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
4136
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react60.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4137
|
+
import_react60.Button,
|
|
4129
4138
|
{
|
|
4130
4139
|
h: 7.5,
|
|
4131
4140
|
p: 2,
|
|
@@ -4142,10 +4151,10 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
|
4142
4151
|
children: navigation.title
|
|
4143
4152
|
}
|
|
4144
4153
|
) }),
|
|
4145
|
-
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4146
|
-
|
|
4154
|
+
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react60.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react60.Box, { zIndex: "popover", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4155
|
+
import_react60.PopoverContent,
|
|
4147
4156
|
{
|
|
4148
|
-
bg: (0,
|
|
4157
|
+
bg: (0, import_react60.useColorModeValue)("white", "ebony-clay.800"),
|
|
4149
4158
|
maxW: 250,
|
|
4150
4159
|
border: "none",
|
|
4151
4160
|
borderRadius: "md",
|
|
@@ -4155,7 +4164,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
|
4155
4164
|
const isLocalLink = host === navHost;
|
|
4156
4165
|
const isActiveSub = activePath === navLink;
|
|
4157
4166
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4158
|
-
|
|
4167
|
+
import_react60.Link,
|
|
4159
4168
|
{
|
|
4160
4169
|
as: isLocalLink ? as : void 0,
|
|
4161
4170
|
href: link,
|
|
@@ -4163,7 +4172,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
|
4163
4172
|
textDecoration: "none"
|
|
4164
4173
|
},
|
|
4165
4174
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4166
|
-
|
|
4175
|
+
import_react60.Box,
|
|
4167
4176
|
{
|
|
4168
4177
|
display: "flex",
|
|
4169
4178
|
position: "relative",
|
|
@@ -4171,24 +4180,24 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
|
4171
4180
|
cursor: "pointer",
|
|
4172
4181
|
transition: "padding 0.35s ease 0s",
|
|
4173
4182
|
_hover: {
|
|
4174
|
-
backgroundColor: (0,
|
|
4175
|
-
color: (0,
|
|
4183
|
+
backgroundColor: (0, import_react60.useColorModeValue)("dove-gray.50", "mirage.900"),
|
|
4184
|
+
color: (0, import_react60.useColorModeValue)("primary.500", "dove-gray.600"),
|
|
4176
4185
|
px: 5,
|
|
4177
4186
|
py: 4,
|
|
4178
4187
|
_first: { borderTopRadius: "md" },
|
|
4179
4188
|
_last: { borderBottomRadius: "md" }
|
|
4180
4189
|
},
|
|
4181
4190
|
color: isActiveSub ? "primary.500" : "inherit",
|
|
4182
|
-
css:
|
|
4191
|
+
css: import_react61.css`
|
|
4183
4192
|
border-spacing: 4px;
|
|
4184
4193
|
`,
|
|
4185
4194
|
px: 6,
|
|
4186
4195
|
py: 4,
|
|
4187
4196
|
children: [
|
|
4188
4197
|
mappingIcon.get(navigation.title),
|
|
4189
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react60.Text, { fontSize: "text.sm", ml: 3, children: title }),
|
|
4190
4199
|
isActiveSub && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4191
|
-
|
|
4200
|
+
import_react60.Box,
|
|
4192
4201
|
{
|
|
4193
4202
|
width: 0.5,
|
|
4194
4203
|
height: 8,
|
|
@@ -4221,7 +4230,7 @@ Navigation.defaultProps = {
|
|
|
4221
4230
|
var navigation_default = Navigation;
|
|
4222
4231
|
|
|
4223
4232
|
// src/components/navigation/components/navigation-bar.tsx
|
|
4224
|
-
var
|
|
4233
|
+
var import_react62 = require("@chakra-ui/react");
|
|
4225
4234
|
var Icon6 = __toESM(require("@ctlyst.id/internal-icon"));
|
|
4226
4235
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4227
4236
|
var NavigationBar = ({
|
|
@@ -4238,8 +4247,8 @@ var NavigationBar = ({
|
|
|
4238
4247
|
}
|
|
4239
4248
|
return subMenu.navHost + subMenu.navLink;
|
|
4240
4249
|
};
|
|
4241
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4242
|
-
|
|
4250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react62.Box, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4251
|
+
import_react62.Flex,
|
|
4243
4252
|
{
|
|
4244
4253
|
bg: "white",
|
|
4245
4254
|
w: "full",
|
|
@@ -4255,9 +4264,9 @@ var NavigationBar = ({
|
|
|
4255
4264
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
|
4256
4265
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
|
4257
4266
|
const activeBg = isActive ? "primary.500" : void 0;
|
|
4258
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4259
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4260
|
-
|
|
4267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react62.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: [
|
|
4268
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react62.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4269
|
+
import_react62.Button,
|
|
4261
4270
|
{
|
|
4262
4271
|
h: 7.5,
|
|
4263
4272
|
p: 2,
|
|
@@ -4274,8 +4283,8 @@ var NavigationBar = ({
|
|
|
4274
4283
|
children: item.title
|
|
4275
4284
|
}
|
|
4276
4285
|
) }),
|
|
4277
|
-
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4278
|
-
|
|
4286
|
+
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react62.PopoverContent, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4287
|
+
import_react62.Link,
|
|
4279
4288
|
{
|
|
4280
4289
|
href: urlMenu(subMenu),
|
|
4281
4290
|
display: "flex",
|
|
@@ -4292,7 +4301,7 @@ var NavigationBar = ({
|
|
|
4292
4301
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
|
4293
4302
|
children: [
|
|
4294
4303
|
mappingIcon2.get(item.title),
|
|
4295
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4304
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react62.Text, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
|
4296
4305
|
]
|
|
4297
4306
|
},
|
|
4298
4307
|
subMenu.id
|
|
@@ -4309,18 +4318,18 @@ var navigation_bar_default = NavigationBar;
|
|
|
4309
4318
|
|
|
4310
4319
|
// src/components/pagination/components/pagination.tsx
|
|
4311
4320
|
var import_icons4 = require("@chakra-ui/icons");
|
|
4312
|
-
var
|
|
4321
|
+
var import_react65 = require("@chakra-ui/react");
|
|
4313
4322
|
|
|
4314
4323
|
// src/components/pagination/components/pagination-button.tsx
|
|
4315
|
-
var
|
|
4324
|
+
var import_react63 = require("@chakra-ui/react");
|
|
4316
4325
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4317
|
-
var PaginationButton = (0,
|
|
4318
|
-
const btnBg = (0,
|
|
4319
|
-
const btnColor = (0,
|
|
4320
|
-
const btnNotActiveBg = (0,
|
|
4321
|
-
const btnNotActiveColor = (0,
|
|
4326
|
+
var PaginationButton = (0, import_react63.forwardRef)(({ className, style, isActive, children, ...rest }, ref) => {
|
|
4327
|
+
const btnBg = (0, import_react63.useColorModeValue)("neutral.300", "mirage.900");
|
|
4328
|
+
const btnColor = (0, import_react63.useColorModeValue)("black.high", "primary.300");
|
|
4329
|
+
const btnNotActiveBg = (0, import_react63.useColorModeValue)("secondary.50", "primary.500");
|
|
4330
|
+
const btnNotActiveColor = (0, import_react63.useColorModeValue)("primary.500", "white");
|
|
4322
4331
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4323
|
-
|
|
4332
|
+
import_react63.Button,
|
|
4324
4333
|
{
|
|
4325
4334
|
"data-test-id": "Pagination-Button",
|
|
4326
4335
|
ref,
|
|
@@ -4345,7 +4354,7 @@ var PaginationButton = (0, import_react62.forwardRef)(({ className, style, isAct
|
|
|
4345
4354
|
color: "neutral.300"
|
|
4346
4355
|
},
|
|
4347
4356
|
_disabled: {
|
|
4348
|
-
background: (0,
|
|
4357
|
+
background: (0, import_react63.useColorModeValue)("neutral.300", "mirage.900"),
|
|
4349
4358
|
color: "neutral.600",
|
|
4350
4359
|
pointerEvents: "none"
|
|
4351
4360
|
},
|
|
@@ -4361,7 +4370,7 @@ PaginationButton.defaultProps = {
|
|
|
4361
4370
|
var pagination_button_default = PaginationButton;
|
|
4362
4371
|
|
|
4363
4372
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
|
4364
|
-
var
|
|
4373
|
+
var import_react64 = require("@chakra-ui/react");
|
|
4365
4374
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4366
4375
|
var PaginationButtonTrigger = ({
|
|
4367
4376
|
color,
|
|
@@ -4370,7 +4379,7 @@ var PaginationButtonTrigger = ({
|
|
|
4370
4379
|
visuallyHidden,
|
|
4371
4380
|
icon
|
|
4372
4381
|
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
|
4373
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4382
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react64.VisuallyHidden, { children: visuallyHidden }),
|
|
4374
4383
|
icon
|
|
4375
4384
|
] });
|
|
4376
4385
|
PaginationButtonTrigger.defaultProps = {
|
|
@@ -4385,8 +4394,8 @@ var pagination_button_trigger_default = PaginationButtonTrigger;
|
|
|
4385
4394
|
// src/components/pagination/components/pagination.tsx
|
|
4386
4395
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4387
4396
|
var Pagination = ({ className, current, total, onSelect }) => {
|
|
4388
|
-
const btnColorDisabled = (0,
|
|
4389
|
-
const btnColor = (0,
|
|
4397
|
+
const btnColorDisabled = (0, import_react65.useColorModeValue)("secondary.100", "primary.500");
|
|
4398
|
+
const btnColor = (0, import_react65.useColorModeValue)("primary.500", "secondary.100");
|
|
4390
4399
|
const disabledPrevious = current === 1;
|
|
4391
4400
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
|
4392
4401
|
const disabledNext = current === total;
|
|
@@ -4413,8 +4422,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
|
4413
4422
|
}
|
|
4414
4423
|
return pageButtons;
|
|
4415
4424
|
};
|
|
4416
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4417
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react65.Box, { className, display: "inline-flex", alignItems: "center", children: [
|
|
4426
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react65.Box, { mr: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4418
4427
|
pagination_button_trigger_default,
|
|
4419
4428
|
{
|
|
4420
4429
|
"data-test-id": "Pagination-Button",
|
|
@@ -4425,7 +4434,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
|
4425
4434
|
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons4.ArrowLeftIcon, { width: 2 })
|
|
4426
4435
|
}
|
|
4427
4436
|
) }),
|
|
4428
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4437
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react65.Box, { bg: "neutral.300", borderRadius: "full", children: [
|
|
4429
4438
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4430
4439
|
pagination_button_trigger_default,
|
|
4431
4440
|
{
|
|
@@ -4444,7 +4453,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
|
4444
4453
|
"data-test-id": "Pagination-Button",
|
|
4445
4454
|
isActive: page === current,
|
|
4446
4455
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
|
4447
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4456
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react65.Text, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
|
4448
4457
|
},
|
|
4449
4458
|
page
|
|
4450
4459
|
);
|
|
@@ -4461,7 +4470,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
|
4461
4470
|
}
|
|
4462
4471
|
)
|
|
4463
4472
|
] }),
|
|
4464
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4473
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react65.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4465
4474
|
pagination_button_trigger_default,
|
|
4466
4475
|
{
|
|
4467
4476
|
"data-test-id": "Pagination-Button",
|
|
@@ -4482,7 +4491,7 @@ Pagination.displayName = "Pagination";
|
|
|
4482
4491
|
var pagination_default = Pagination;
|
|
4483
4492
|
|
|
4484
4493
|
// src/components/pagination/components/pagination-detail.tsx
|
|
4485
|
-
var
|
|
4494
|
+
var import_react66 = require("@chakra-ui/react");
|
|
4486
4495
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4487
4496
|
var PaginationDetail = ({
|
|
4488
4497
|
page,
|
|
@@ -4493,13 +4502,13 @@ var PaginationDetail = ({
|
|
|
4493
4502
|
lineHeight = 18,
|
|
4494
4503
|
...rest
|
|
4495
4504
|
}) => {
|
|
4496
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react66.Text, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
|
4497
4506
|
};
|
|
4498
4507
|
var pagination_detail_default = PaginationDetail;
|
|
4499
4508
|
|
|
4500
4509
|
// src/components/pagination/components/pagination-filter.tsx
|
|
4501
|
-
var
|
|
4502
|
-
var
|
|
4510
|
+
var import_react67 = require("@chakra-ui/react");
|
|
4511
|
+
var React11 = __toESM(require("react"));
|
|
4503
4512
|
var import_fi4 = require("react-icons/fi");
|
|
4504
4513
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4505
4514
|
var PaginationFilter = ({
|
|
@@ -4509,11 +4518,11 @@ var PaginationFilter = ({
|
|
|
4509
4518
|
onChange,
|
|
4510
4519
|
...rest
|
|
4511
4520
|
}) => {
|
|
4512
|
-
const [value, setValue] =
|
|
4513
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4514
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4521
|
+
const [value, setValue] = React11.useState(limit);
|
|
4522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react67.Box, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
|
4523
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react67.Text, { fontSize: "text.sm", lineHeight: 18, color: (0, import_react67.useColorModeValue)("neutral.900", "white"), ...rest, children: label }),
|
|
4515
4524
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4516
|
-
|
|
4525
|
+
import_react67.Select,
|
|
4517
4526
|
{
|
|
4518
4527
|
textAlign: "center",
|
|
4519
4528
|
size: "xs",
|
|
@@ -4543,35 +4552,35 @@ PaginationFilter.defaultProps = {
|
|
|
4543
4552
|
var pagination_filter_default = PaginationFilter;
|
|
4544
4553
|
|
|
4545
4554
|
// src/components/pin-input/index.ts
|
|
4546
|
-
var
|
|
4555
|
+
var import_react68 = require("@chakra-ui/react");
|
|
4547
4556
|
|
|
4548
4557
|
// src/components/popover/PopoverContent.tsx
|
|
4549
|
-
var
|
|
4550
|
-
var
|
|
4558
|
+
var import_react69 = require("@chakra-ui/react");
|
|
4559
|
+
var import_react70 = __toESM(require("react"));
|
|
4551
4560
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4552
|
-
var PopoverContent5 = (0,
|
|
4561
|
+
var PopoverContent5 = (0, import_react69.forwardRef)((props, ref) => {
|
|
4553
4562
|
const { children, ...rest } = props;
|
|
4554
|
-
const hasArrow =
|
|
4555
|
-
return
|
|
4563
|
+
const hasArrow = import_react70.default.Children.toArray(children).some((child) => {
|
|
4564
|
+
return import_react70.default.isValidElement(child) && child.type === import_react69.PopoverArrow;
|
|
4556
4565
|
});
|
|
4557
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react69.PopoverContent, { ...!hasArrow ? { mt: -1 } : {}, ...rest, ref, children });
|
|
4558
4567
|
});
|
|
4559
4568
|
var PopoverContent_default = PopoverContent5;
|
|
4560
4569
|
|
|
4561
4570
|
// src/components/popover/index.ts
|
|
4562
|
-
var
|
|
4571
|
+
var import_react71 = require("@chakra-ui/react");
|
|
4563
4572
|
|
|
4564
4573
|
// src/components/progress/index.ts
|
|
4565
|
-
var
|
|
4574
|
+
var import_react72 = require("@chakra-ui/react");
|
|
4566
4575
|
|
|
4567
4576
|
// src/components/radio/components/radio.tsx
|
|
4568
|
-
var
|
|
4577
|
+
var import_react73 = require("@chakra-ui/react");
|
|
4569
4578
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4570
4579
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
|
4571
4580
|
const variant = isError ? "errors" : "unstyled";
|
|
4572
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4573
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4574
|
-
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react73.Box, { children: [
|
|
4582
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react73.Box, { display: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react73.Radio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react73.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
|
4583
|
+
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react73.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react73.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react73.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react73.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
|
4575
4584
|
] });
|
|
4576
4585
|
};
|
|
4577
4586
|
Radio.displayName = "Radio";
|
|
@@ -4582,7 +4591,7 @@ Radio.defaultProps = {
|
|
|
4582
4591
|
};
|
|
4583
4592
|
|
|
4584
4593
|
// src/components/radio/components/radio-group.tsx
|
|
4585
|
-
var
|
|
4594
|
+
var import_react74 = require("@chakra-ui/react");
|
|
4586
4595
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4587
4596
|
var RadioGroup = ({
|
|
4588
4597
|
children,
|
|
@@ -4592,7 +4601,7 @@ var RadioGroup = ({
|
|
|
4592
4601
|
errorMessage,
|
|
4593
4602
|
...props
|
|
4594
4603
|
}) => {
|
|
4595
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react74.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react74.RadioGroup, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react74.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
|
4596
4605
|
};
|
|
4597
4606
|
RadioGroup.displayName = "RadioGroup";
|
|
4598
4607
|
RadioGroup.defaultProps = {
|
|
@@ -4602,32 +4611,32 @@ RadioGroup.defaultProps = {
|
|
|
4602
4611
|
};
|
|
4603
4612
|
|
|
4604
4613
|
// src/components/radio/index.ts
|
|
4605
|
-
var
|
|
4614
|
+
var import_react75 = require("@chakra-ui/react");
|
|
4606
4615
|
|
|
4607
4616
|
// src/components/rating/components/rating.tsx
|
|
4608
|
-
var
|
|
4617
|
+
var import_react76 = require("@chakra-ui/react");
|
|
4609
4618
|
var import_internal_icon7 = require("@ctlyst.id/internal-icon");
|
|
4610
4619
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4611
4620
|
var Rating = ({ value }) => {
|
|
4612
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react76.Grid, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_internal_icon7.Rating, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
|
4613
4622
|
};
|
|
4614
4623
|
var rating_default = Rating;
|
|
4615
4624
|
|
|
4616
4625
|
// src/components/select/components/select.tsx
|
|
4617
|
-
var
|
|
4626
|
+
var import_react81 = require("@chakra-ui/react");
|
|
4618
4627
|
var import_system6 = require("@chakra-ui/system");
|
|
4619
4628
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
|
4620
4629
|
var import_react_select = __toESM(require("react-select"));
|
|
4621
4630
|
|
|
4622
4631
|
// src/components/select/components/menu-list-virtualized.tsx
|
|
4623
4632
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
4624
|
-
var
|
|
4633
|
+
var import_react77 = require("react");
|
|
4625
4634
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4626
4635
|
var MenuListVirtualized = (props) => {
|
|
4627
4636
|
const { children, estimateSize, overscan, ...virtualizerProps } = props;
|
|
4628
4637
|
const childrenArr = Array.isArray(children) ? children : [children];
|
|
4629
4638
|
const itemCount = childrenArr.length;
|
|
4630
|
-
const parentRef = (0,
|
|
4639
|
+
const parentRef = (0, import_react77.useRef)(null);
|
|
4631
4640
|
const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
4632
4641
|
count: itemCount,
|
|
4633
4642
|
getScrollElement: () => parentRef.current,
|
|
@@ -4674,16 +4683,16 @@ var MenuListVirtualized = (props) => {
|
|
|
4674
4683
|
};
|
|
4675
4684
|
|
|
4676
4685
|
// src/config/theme/foundations/shadows.ts
|
|
4677
|
-
var
|
|
4686
|
+
var import_react78 = require("@chakra-ui/react");
|
|
4678
4687
|
var shadows = {
|
|
4679
|
-
...
|
|
4688
|
+
...import_react78.theme.shadows,
|
|
4680
4689
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
|
4681
4690
|
};
|
|
4682
4691
|
|
|
4683
4692
|
// src/config/theme/foundations/sizes.ts
|
|
4684
|
-
var
|
|
4693
|
+
var import_react79 = require("@chakra-ui/react");
|
|
4685
4694
|
var sizes = {
|
|
4686
|
-
...
|
|
4695
|
+
...import_react79.theme.sizes,
|
|
4687
4696
|
4.5: "1.125rem",
|
|
4688
4697
|
9.5: "2.375rem",
|
|
4689
4698
|
18: "4.5rem",
|
|
@@ -4693,9 +4702,9 @@ var sizes = {
|
|
|
4693
4702
|
};
|
|
4694
4703
|
|
|
4695
4704
|
// src/config/theme/foundations/spacing.ts
|
|
4696
|
-
var
|
|
4705
|
+
var import_react80 = require("@chakra-ui/react");
|
|
4697
4706
|
var spacing = {
|
|
4698
|
-
...
|
|
4707
|
+
...import_react80.theme.space,
|
|
4699
4708
|
4.5: "1.125rem",
|
|
4700
4709
|
9.5: "2.375rem",
|
|
4701
4710
|
18: "4.5rem",
|
|
@@ -5054,13 +5063,13 @@ function ClearIndicator(props) {
|
|
|
5054
5063
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.ClearIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
|
5055
5064
|
}
|
|
5056
5065
|
function MultiValue(props) {
|
|
5057
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react81.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
|
5058
5067
|
}
|
|
5059
5068
|
function MultiValueRemove(props) {
|
|
5060
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react81.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
|
5061
5070
|
}
|
|
5062
5071
|
function NoOptionsMessage(props) {
|
|
5063
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react81.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" });
|
|
5064
5073
|
}
|
|
5065
5074
|
function Select2({
|
|
5066
5075
|
styles,
|
|
@@ -5174,7 +5183,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
|
5174
5183
|
}
|
|
5175
5184
|
|
|
5176
5185
|
// src/components/select/components/select-with-checkbox.tsx
|
|
5177
|
-
var
|
|
5186
|
+
var import_react82 = require("@chakra-ui/react");
|
|
5178
5187
|
var import_system10 = require("@chakra-ui/system");
|
|
5179
5188
|
var import_react_select2 = __toESM(require("react-select"));
|
|
5180
5189
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
@@ -5237,7 +5246,7 @@ var InputOption = ({
|
|
|
5237
5246
|
innerProps: props,
|
|
5238
5247
|
...rest,
|
|
5239
5248
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
5240
|
-
|
|
5249
|
+
import_react82.Flex,
|
|
5241
5250
|
{
|
|
5242
5251
|
alignItems: "center",
|
|
5243
5252
|
width: "100%",
|
|
@@ -5246,7 +5255,7 @@ var InputOption = ({
|
|
|
5246
5255
|
cursor: isDisabled ? "not-allowed" : "default",
|
|
5247
5256
|
children: [
|
|
5248
5257
|
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5249
|
-
|
|
5258
|
+
import_react82.Checkbox,
|
|
5250
5259
|
{
|
|
5251
5260
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
|
5252
5261
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
|
@@ -5256,7 +5265,7 @@ var InputOption = ({
|
|
|
5256
5265
|
isInvalid: false
|
|
5257
5266
|
}
|
|
5258
5267
|
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5259
|
-
|
|
5268
|
+
import_react82.Checkbox,
|
|
5260
5269
|
{
|
|
5261
5270
|
pointerEvents: "none",
|
|
5262
5271
|
isChecked: isSelected,
|
|
@@ -5264,7 +5273,7 @@ var InputOption = ({
|
|
|
5264
5273
|
isInvalid: false
|
|
5265
5274
|
}
|
|
5266
5275
|
),
|
|
5267
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5276
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react82.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
|
5268
5277
|
]
|
|
5269
5278
|
}
|
|
5270
5279
|
)
|
|
@@ -5340,13 +5349,13 @@ var SelectCheckbox = (props) => {
|
|
|
5340
5349
|
var select_with_checkbox_default = SelectCheckbox;
|
|
5341
5350
|
|
|
5342
5351
|
// src/components/sidebar/components/sidebar.tsx
|
|
5343
|
-
var
|
|
5352
|
+
var import_react83 = require("@chakra-ui/react");
|
|
5344
5353
|
var import_framer_motion = require("framer-motion");
|
|
5345
5354
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5346
5355
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5347
5356
|
const { width = "220px" } = props;
|
|
5348
5357
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5349
|
-
|
|
5358
|
+
import_react83.Flex,
|
|
5350
5359
|
{
|
|
5351
5360
|
position: "relative",
|
|
5352
5361
|
as: import_framer_motion.motion.div,
|
|
@@ -5366,13 +5375,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
|
5366
5375
|
Sidebar.displayName = "Sidebar";
|
|
5367
5376
|
|
|
5368
5377
|
// src/components/sidebar/components/sidebar-header.tsx
|
|
5369
|
-
var
|
|
5378
|
+
var import_react84 = require("@chakra-ui/react");
|
|
5370
5379
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
|
5371
5380
|
var import_framer_motion2 = require("framer-motion");
|
|
5372
5381
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5373
5382
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5374
5383
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5375
|
-
|
|
5384
|
+
import_react84.Box,
|
|
5376
5385
|
{
|
|
5377
5386
|
px: "2",
|
|
5378
5387
|
color: "neutral.900",
|
|
@@ -5382,7 +5391,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
|
5382
5391
|
color: "primary.500"
|
|
5383
5392
|
},
|
|
5384
5393
|
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
5385
|
-
|
|
5394
|
+
import_react84.Flex,
|
|
5386
5395
|
{
|
|
5387
5396
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
|
5388
5397
|
direction: "row",
|
|
@@ -5392,7 +5401,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
|
5392
5401
|
cursor: "pointer",
|
|
5393
5402
|
children: [
|
|
5394
5403
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5395
|
-
|
|
5404
|
+
import_react84.Box,
|
|
5396
5405
|
{
|
|
5397
5406
|
as: import_framer_motion2.motion.div,
|
|
5398
5407
|
boxSize: "4",
|
|
@@ -5403,8 +5412,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
|
5403
5412
|
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
|
5404
5413
|
}
|
|
5405
5414
|
),
|
|
5406
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5407
|
-
|
|
5415
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react84.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5416
|
+
import_react84.Text,
|
|
5408
5417
|
{
|
|
5409
5418
|
as: import_framer_motion2.motion.div,
|
|
5410
5419
|
w: "max-content",
|
|
@@ -5430,32 +5439,33 @@ SidebarHeader.defaultProps = {
|
|
|
5430
5439
|
};
|
|
5431
5440
|
|
|
5432
5441
|
// src/components/sidebar/components/sidebar-menu.tsx
|
|
5433
|
-
var
|
|
5442
|
+
var import_react85 = require("@chakra-ui/react");
|
|
5434
5443
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
|
5435
5444
|
var import_framer_motion3 = require("framer-motion");
|
|
5436
5445
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5437
5446
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
|
5438
5447
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5439
|
-
|
|
5448
|
+
import_react85.Box,
|
|
5440
5449
|
{
|
|
5441
5450
|
as: import_framer_motion3.motion.div,
|
|
5442
5451
|
transitionTimingFunction: "linear",
|
|
5443
5452
|
initial: { padding: "8px" },
|
|
5444
5453
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
|
5445
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
|
5446
5455
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
|
5447
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
|
5448
5457
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
|
5449
5458
|
const noChild = !item.children.length;
|
|
5450
5459
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
|
5451
5460
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
5452
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5461
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
|
5462
|
+
var _a, _b;
|
|
5453
5463
|
const activeOption = isOpen ? "primary.50" : "white";
|
|
5454
5464
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
|
5455
5465
|
const activeParent = isActive ? backgroundColor : activeOption;
|
|
5456
5466
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
5457
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5458
|
-
|
|
5467
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5468
|
+
import_react85.AccordionButton,
|
|
5459
5469
|
{
|
|
5460
5470
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
|
5461
5471
|
p: "0",
|
|
@@ -5471,11 +5481,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5471
5481
|
"data-test-id": `CTA_nav-item-${item.title}`,
|
|
5472
5482
|
onClick: () => setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink, true),
|
|
5473
5483
|
position: "relative",
|
|
5484
|
+
...(_a = item.itemProps) != null ? _a : {},
|
|
5474
5485
|
...itemStyles,
|
|
5475
5486
|
children: [
|
|
5476
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5487
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
|
5477
5488
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5478
|
-
|
|
5489
|
+
import_react85.Box,
|
|
5479
5490
|
{
|
|
5480
5491
|
display: "flex",
|
|
5481
5492
|
w: "full",
|
|
@@ -5489,9 +5500,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5489
5500
|
animate: { opacity: 1, x: 0 },
|
|
5490
5501
|
exit: { opacity: 0, x: 16 },
|
|
5491
5502
|
children: [
|
|
5492
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5503
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
|
5493
5504
|
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5494
|
-
|
|
5505
|
+
import_react85.Box,
|
|
5495
5506
|
{
|
|
5496
5507
|
display: "flex",
|
|
5497
5508
|
boxSize: "3",
|
|
@@ -5511,28 +5522,32 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5511
5522
|
},
|
|
5512
5523
|
item.id
|
|
5513
5524
|
) }, item.id),
|
|
5514
|
-
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5515
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5525
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react85.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
|
5526
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react85.Box, { display: "flex", alignItems: "center", children: [
|
|
5516
5527
|
mappingIcon2.get(item.icon || ""),
|
|
5517
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5528
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Box, { as: "span", ml: "2", children: item.title })
|
|
5518
5529
|
] }) }),
|
|
5519
|
-
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5530
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => {
|
|
5531
|
+
var _a2;
|
|
5532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5533
|
+
NavItem,
|
|
5534
|
+
{
|
|
5535
|
+
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
|
5536
|
+
isChild: true,
|
|
5537
|
+
isActive: active === submenu.navLink,
|
|
5538
|
+
onClick: () => {
|
|
5539
|
+
setActive(submenu.navLink);
|
|
5540
|
+
onClose();
|
|
5541
|
+
},
|
|
5542
|
+
rounded: "none",
|
|
5543
|
+
...(_a2 = submenu.itemProps) != null ? _a2 : {},
|
|
5544
|
+
...itemStyles,
|
|
5545
|
+
children: submenu.title
|
|
5528
5546
|
},
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
submenu.id
|
|
5534
|
-
)) })
|
|
5535
|
-
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react84.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5547
|
+
submenu.id
|
|
5548
|
+
);
|
|
5549
|
+
}) })
|
|
5550
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5536
5551
|
NavItem,
|
|
5537
5552
|
{
|
|
5538
5553
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
|
@@ -5543,10 +5558,11 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5543
5558
|
onClose();
|
|
5544
5559
|
},
|
|
5545
5560
|
rounded: "none",
|
|
5561
|
+
...(_b = item.itemProps) != null ? _b : {},
|
|
5546
5562
|
...itemStyles,
|
|
5547
5563
|
children: [
|
|
5548
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5549
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5564
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
|
5565
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
|
5550
5566
|
]
|
|
5551
5567
|
},
|
|
5552
5568
|
item.id
|
|
@@ -5554,25 +5570,29 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5554
5570
|
] });
|
|
5555
5571
|
} }, item.id),
|
|
5556
5572
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5557
|
-
|
|
5573
|
+
import_react85.Fade,
|
|
5558
5574
|
{
|
|
5559
5575
|
in: true,
|
|
5560
5576
|
transition: {
|
|
5561
5577
|
enter: { duration: 0.5 }
|
|
5562
5578
|
},
|
|
5563
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react85.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => {
|
|
5580
|
+
var _a;
|
|
5581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5582
|
+
NavItem,
|
|
5583
|
+
{
|
|
5584
|
+
mt: "1",
|
|
5585
|
+
"data-test-id": `CTA_Sidebar-accordion-item-${submenu.id}`,
|
|
5586
|
+
isActive: active === submenu.navLink,
|
|
5587
|
+
isChild: true,
|
|
5588
|
+
...(_a = submenu.itemProps) != null ? _a : {},
|
|
5589
|
+
...itemStyles,
|
|
5590
|
+
onClick: () => setActive(submenu.navLink),
|
|
5591
|
+
children: submenu.title
|
|
5592
|
+
},
|
|
5593
|
+
submenu.id
|
|
5594
|
+
);
|
|
5595
|
+
}) })
|
|
5576
5596
|
}
|
|
5577
5597
|
)
|
|
5578
5598
|
] });
|
|
@@ -5588,16 +5608,16 @@ SidebarMenu.defaultProps = {
|
|
|
5588
5608
|
};
|
|
5589
5609
|
|
|
5590
5610
|
// src/components/switch/components/switch.tsx
|
|
5591
|
-
var
|
|
5611
|
+
var import_react86 = require("@chakra-ui/react");
|
|
5592
5612
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
|
5593
5613
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
|
5594
|
-
var
|
|
5614
|
+
var import_react87 = require("react");
|
|
5595
5615
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5596
|
-
var Switch = (0,
|
|
5597
|
-
const styles = (0,
|
|
5598
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
|
5599
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
|
5600
|
-
const containerStyles = (0,
|
|
5616
|
+
var Switch = (0, import_react86.forwardRef)(function Switch2(props, ref) {
|
|
5617
|
+
const styles = (0, import_react86.useMultiStyleConfig)("Switch", props);
|
|
5618
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react86.omitThemingProps)(props);
|
|
5619
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react86.useCheckbox)(ownProps);
|
|
5620
|
+
const containerStyles = (0, import_react87.useMemo)(
|
|
5601
5621
|
() => ({
|
|
5602
5622
|
display: "inline-block",
|
|
5603
5623
|
position: "relative",
|
|
@@ -5607,7 +5627,7 @@ var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
|
|
5607
5627
|
}),
|
|
5608
5628
|
[styles.container]
|
|
5609
5629
|
);
|
|
5610
|
-
const trackStyles = (0,
|
|
5630
|
+
const trackStyles = (0, import_react87.useMemo)(
|
|
5611
5631
|
() => ({
|
|
5612
5632
|
display: "inline-flex",
|
|
5613
5633
|
flexShrink: 0,
|
|
@@ -5619,7 +5639,7 @@ var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
|
|
5619
5639
|
}),
|
|
5620
5640
|
[styles.track]
|
|
5621
5641
|
);
|
|
5622
|
-
const labelStyles = (0,
|
|
5642
|
+
const labelStyles = (0, import_react87.useMemo)(
|
|
5623
5643
|
() => ({
|
|
5624
5644
|
userSelect: "none",
|
|
5625
5645
|
marginStart: spacing2,
|
|
@@ -5636,7 +5656,7 @@ var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
|
|
5636
5656
|
return iconSize[value];
|
|
5637
5657
|
};
|
|
5638
5658
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
5639
|
-
|
|
5659
|
+
import_react86.chakra.label,
|
|
5640
5660
|
{
|
|
5641
5661
|
...getRootProps(),
|
|
5642
5662
|
display: "flex",
|
|
@@ -5645,13 +5665,13 @@ var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
|
|
5645
5665
|
__css: containerStyles,
|
|
5646
5666
|
children: [
|
|
5647
5667
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
|
5648
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
5649
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
5668
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react86.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
|
5669
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react86.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
|
5650
5670
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
|
5651
5671
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
|
5652
5672
|
] }),
|
|
5653
5673
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5654
|
-
|
|
5674
|
+
import_react86.chakra.span,
|
|
5655
5675
|
{
|
|
5656
5676
|
__css: styles.thumb,
|
|
5657
5677
|
className: "chakra-switch__thumb",
|
|
@@ -5661,7 +5681,7 @@ var Switch = (0, import_react85.forwardRef)(function Switch2(props, ref) {
|
|
|
5661
5681
|
)
|
|
5662
5682
|
] }),
|
|
5663
5683
|
children && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5664
|
-
|
|
5684
|
+
import_react86.chakra.span,
|
|
5665
5685
|
{
|
|
5666
5686
|
className: "chakra-switch__label",
|
|
5667
5687
|
color: state.isDisabled ? "black.low" : "black.high",
|
|
@@ -5681,18 +5701,18 @@ Switch.defaultProps = {
|
|
|
5681
5701
|
var switch_default = Switch;
|
|
5682
5702
|
|
|
5683
5703
|
// src/components/table/index.tsx
|
|
5684
|
-
var
|
|
5704
|
+
var import_react88 = require("@chakra-ui/react");
|
|
5685
5705
|
|
|
5686
5706
|
// src/components/tabs/components/tab.tsx
|
|
5687
|
-
var
|
|
5707
|
+
var import_react89 = require("@chakra-ui/react");
|
|
5688
5708
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5689
|
-
var Tab = (0,
|
|
5709
|
+
var Tab = (0, import_react89.forwardRef)((props, ref) => {
|
|
5690
5710
|
var _a, _b;
|
|
5691
|
-
const tabProps = (0,
|
|
5711
|
+
const tabProps = (0, import_react89.useTab)({ ...props, ref });
|
|
5692
5712
|
const isSelected = !!tabProps["aria-selected"];
|
|
5693
|
-
const styles = (0,
|
|
5713
|
+
const styles = (0, import_react89.useMultiStyleConfig)("Tabs", tabProps);
|
|
5694
5714
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5695
|
-
|
|
5715
|
+
import_react89.Button,
|
|
5696
5716
|
{
|
|
5697
5717
|
"data-test-id": props["data-test-id"],
|
|
5698
5718
|
p: 4,
|
|
@@ -5717,7 +5737,7 @@ var Tab = (0, import_react88.forwardRef)((props, ref) => {
|
|
|
5717
5737
|
},
|
|
5718
5738
|
__css: styles.tab,
|
|
5719
5739
|
...tabProps,
|
|
5720
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
5740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react89.Flex, { alignItems: "center", children: [
|
|
5721
5741
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
|
5722
5742
|
tabProps.children,
|
|
5723
5743
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
|
@@ -5728,39 +5748,39 @@ var Tab = (0, import_react88.forwardRef)((props, ref) => {
|
|
|
5728
5748
|
var tab_default = Tab;
|
|
5729
5749
|
|
|
5730
5750
|
// src/components/tabs/index.ts
|
|
5731
|
-
var
|
|
5751
|
+
var import_react90 = require("@chakra-ui/react");
|
|
5732
5752
|
|
|
5733
5753
|
// src/components/text/index.ts
|
|
5734
|
-
var
|
|
5754
|
+
var import_react91 = require("@chakra-ui/react");
|
|
5735
5755
|
|
|
5736
5756
|
// src/components/time-input/components/index.tsx
|
|
5737
|
-
var
|
|
5757
|
+
var import_react93 = require("@chakra-ui/react");
|
|
5738
5758
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
|
5739
|
-
var
|
|
5759
|
+
var import_react94 = require("react");
|
|
5740
5760
|
|
|
5741
5761
|
// src/components/time-input/components/integration.tsx
|
|
5742
5762
|
var import_timescape = require("@zamiru/timescape");
|
|
5743
5763
|
var import_timescape2 = require("@zamiru/timescape");
|
|
5744
|
-
var
|
|
5764
|
+
var import_react92 = require("react");
|
|
5745
5765
|
var useTimescape = (options = {}) => {
|
|
5746
5766
|
var _a;
|
|
5747
5767
|
const { date, onChangeDate, ...rest } = options;
|
|
5748
|
-
const [manager] = (0,
|
|
5749
|
-
const onChangeDateRef = (0,
|
|
5750
|
-
(0,
|
|
5768
|
+
const [manager] = (0, import_react92.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
|
5769
|
+
const onChangeDateRef = (0, import_react92.useRef)(onChangeDate);
|
|
5770
|
+
(0, import_react92.useLayoutEffect)(() => {
|
|
5751
5771
|
onChangeDateRef.current = onChangeDate;
|
|
5752
5772
|
}, [onChangeDate]);
|
|
5753
|
-
const [optionsState, update] = (0,
|
|
5773
|
+
const [optionsState, update] = (0, import_react92.useState)(() => ({
|
|
5754
5774
|
date,
|
|
5755
5775
|
...rest
|
|
5756
5776
|
}));
|
|
5757
|
-
(0,
|
|
5777
|
+
(0, import_react92.useEffect)(() => {
|
|
5758
5778
|
manager.resync();
|
|
5759
5779
|
return () => {
|
|
5760
5780
|
manager.remove();
|
|
5761
5781
|
};
|
|
5762
5782
|
}, [manager]);
|
|
5763
|
-
(0,
|
|
5783
|
+
(0, import_react92.useEffect)(() => {
|
|
5764
5784
|
return manager.on("changeDate", (nextDate) => {
|
|
5765
5785
|
var _a2;
|
|
5766
5786
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
|
@@ -5768,7 +5788,7 @@ var useTimescape = (options = {}) => {
|
|
|
5768
5788
|
});
|
|
5769
5789
|
}, [manager]);
|
|
5770
5790
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
|
5771
|
-
(0,
|
|
5791
|
+
(0, import_react92.useEffect)(() => {
|
|
5772
5792
|
manager.date = timestamp;
|
|
5773
5793
|
manager.minDate = optionsState.minDate;
|
|
5774
5794
|
manager.maxDate = optionsState.maxDate;
|
|
@@ -5834,9 +5854,9 @@ var timeFromString = (timeString) => {
|
|
|
5834
5854
|
const [hours, minutes, seconds] = timeString.split(":");
|
|
5835
5855
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
|
5836
5856
|
};
|
|
5837
|
-
var InputTimeArea = (0,
|
|
5857
|
+
var InputTimeArea = (0, import_react93.forwardRef)((props, ref) => {
|
|
5838
5858
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5839
|
-
|
|
5859
|
+
import_react93.Input,
|
|
5840
5860
|
{
|
|
5841
5861
|
_focusWithin: {
|
|
5842
5862
|
bg: "neutral.300"
|
|
@@ -5854,7 +5874,7 @@ var InputTimeArea = (0, import_react92.forwardRef)((props, ref) => {
|
|
|
5854
5874
|
}
|
|
5855
5875
|
);
|
|
5856
5876
|
});
|
|
5857
|
-
var TimeInput2 = (0,
|
|
5877
|
+
var TimeInput2 = (0, import_react93.forwardRef)(
|
|
5858
5878
|
({
|
|
5859
5879
|
name,
|
|
5860
5880
|
config: config2,
|
|
@@ -5881,7 +5901,7 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5881
5901
|
date,
|
|
5882
5902
|
...config2
|
|
5883
5903
|
});
|
|
5884
|
-
(0,
|
|
5904
|
+
(0, import_react94.useEffect)(() => {
|
|
5885
5905
|
var _a, _b, _c, _d, _e, _f;
|
|
5886
5906
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
|
5887
5907
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
|
@@ -5890,7 +5910,7 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5890
5910
|
onChangeTime(timeValue);
|
|
5891
5911
|
}
|
|
5892
5912
|
}, [options.date]);
|
|
5893
|
-
(0,
|
|
5913
|
+
(0, import_react94.useImperativeHandle)(ref, () => ({
|
|
5894
5914
|
focus() {
|
|
5895
5915
|
_manager.focusField("hours");
|
|
5896
5916
|
}
|
|
@@ -5911,7 +5931,7 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5911
5931
|
};
|
|
5912
5932
|
};
|
|
5913
5933
|
const { outlineColor, focusColor } = getProperties();
|
|
5914
|
-
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react93.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5915
5935
|
field_default,
|
|
5916
5936
|
{
|
|
5917
5937
|
isError,
|
|
@@ -5921,7 +5941,7 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5921
5941
|
isDisabled,
|
|
5922
5942
|
isSuccess,
|
|
5923
5943
|
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5924
|
-
|
|
5944
|
+
import_react93.Box,
|
|
5925
5945
|
{
|
|
5926
5946
|
transition: "all 0.15s",
|
|
5927
5947
|
boxShadow: "none",
|
|
@@ -5932,7 +5952,7 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5932
5952
|
borderColor: focusColor
|
|
5933
5953
|
},
|
|
5934
5954
|
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5935
|
-
|
|
5955
|
+
import_react93.InputGroup,
|
|
5936
5956
|
{
|
|
5937
5957
|
borderRadius: "sm",
|
|
5938
5958
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
|
@@ -5941,7 +5961,7 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5941
5961
|
gap: 3,
|
|
5942
5962
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
|
5943
5963
|
children: [
|
|
5944
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
5964
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react93.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
|
5945
5965
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
|
5946
5966
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
|
5947
5967
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
|
@@ -5949,7 +5969,7 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5949
5969
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ":" }),
|
|
5950
5970
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
|
5951
5971
|
] }),
|
|
5952
|
-
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
5972
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react93.Input, { p: 0, ...getInputProps("am/pm") })
|
|
5953
5973
|
] }),
|
|
5954
5974
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
|
5955
5975
|
addOnRight
|
|
@@ -5964,16 +5984,16 @@ var TimeInput2 = (0, import_react92.forwardRef)(
|
|
|
5964
5984
|
);
|
|
5965
5985
|
|
|
5966
5986
|
// src/components/toast/components/toast.tsx
|
|
5967
|
-
var
|
|
5987
|
+
var import_react96 = require("@chakra-ui/react");
|
|
5968
5988
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
|
5969
5989
|
var import_react_toastify = require("react-toastify");
|
|
5970
5990
|
|
|
5971
5991
|
// src/components/toast/components/styles.tsx
|
|
5972
|
-
var
|
|
5992
|
+
var import_react95 = require("@emotion/react");
|
|
5973
5993
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5974
5994
|
var Styles2 = () => {
|
|
5975
5995
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5976
|
-
|
|
5996
|
+
import_react95.Global,
|
|
5977
5997
|
{
|
|
5978
5998
|
styles: `
|
|
5979
5999
|
:root {
|
|
@@ -6010,7 +6030,7 @@ var styles_default2 = Styles2;
|
|
|
6010
6030
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
6011
6031
|
var CustomCloseButton = (props) => {
|
|
6012
6032
|
const { closeToast } = props;
|
|
6013
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react96.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: () => closeToast(), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
|
|
6014
6034
|
};
|
|
6015
6035
|
var DEFAULT_OPTIONS = {
|
|
6016
6036
|
position: "top-right",
|
|
@@ -6033,7 +6053,7 @@ var renderIcon = (icon, type) => {
|
|
|
6033
6053
|
return icon;
|
|
6034
6054
|
};
|
|
6035
6055
|
var useToast = () => {
|
|
6036
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
|
6056
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react96.useToken)("colors", [
|
|
6037
6057
|
"primary.500",
|
|
6038
6058
|
"neutral.500",
|
|
6039
6059
|
"info.500",
|
|
@@ -6044,13 +6064,13 @@ var useToast = () => {
|
|
|
6044
6064
|
const content = (icon, message, link) => {
|
|
6045
6065
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
6046
6066
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(styles_default2, {}),
|
|
6047
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
6048
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
6049
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6050
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6067
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react96.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
|
|
6068
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react96.Flex, { alignItems: "center", children: [
|
|
6069
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react96.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
|
6070
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react96.chakra.span, { noOfLines: 2, children: message })
|
|
6051
6071
|
] }),
|
|
6052
6072
|
link && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
6053
|
-
|
|
6073
|
+
import_react96.Link,
|
|
6054
6074
|
{
|
|
6055
6075
|
as: link.as,
|
|
6056
6076
|
href: link.url,
|
|
@@ -6130,9 +6150,9 @@ var useToast = () => {
|
|
|
6130
6150
|
var import_react_toastify2 = require("react-toastify");
|
|
6131
6151
|
|
|
6132
6152
|
// src/components/uploader/components/uploader.tsx
|
|
6133
|
-
var
|
|
6153
|
+
var import_react97 = require("@chakra-ui/react");
|
|
6134
6154
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
|
6135
|
-
var
|
|
6155
|
+
var import_react98 = require("react");
|
|
6136
6156
|
var import_react_dropzone = require("react-dropzone");
|
|
6137
6157
|
|
|
6138
6158
|
// src/components/uploader/constants.ts
|
|
@@ -6251,15 +6271,15 @@ var Uploader = ({
|
|
|
6251
6271
|
customErrorRejection,
|
|
6252
6272
|
...props
|
|
6253
6273
|
}) => {
|
|
6254
|
-
const [filePreview, setFilePreview] = (0,
|
|
6255
|
-
const [isError, setIsError] = (0,
|
|
6256
|
-
const [errorText, setErrorText] = (0,
|
|
6257
|
-
(0,
|
|
6274
|
+
const [filePreview, setFilePreview] = (0, import_react98.useState)();
|
|
6275
|
+
const [isError, setIsError] = (0, import_react98.useState)(propIsError);
|
|
6276
|
+
const [errorText, setErrorText] = (0, import_react98.useState)(propErrorText);
|
|
6277
|
+
(0, import_react98.useEffect)(() => {
|
|
6258
6278
|
setIsError(propIsError);
|
|
6259
6279
|
setErrorText(propErrorText);
|
|
6260
6280
|
}, [propIsError, propErrorText]);
|
|
6261
6281
|
const toast2 = useToast();
|
|
6262
|
-
const handleRejection = (0,
|
|
6282
|
+
const handleRejection = (0, import_react98.useCallback)(
|
|
6263
6283
|
(message, file, image, errorCode) => {
|
|
6264
6284
|
if (onHandleRejections) {
|
|
6265
6285
|
onHandleRejections(file, image, errorCode);
|
|
@@ -6282,7 +6302,7 @@ var Uploader = ({
|
|
|
6282
6302
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6283
6303
|
[onHandleRejections, customErrorRejection]
|
|
6284
6304
|
);
|
|
6285
|
-
const onDropAccepted = (0,
|
|
6305
|
+
const onDropAccepted = (0, import_react98.useCallback)(
|
|
6286
6306
|
(files) => {
|
|
6287
6307
|
const file = files[0];
|
|
6288
6308
|
setIsError(false);
|
|
@@ -6317,10 +6337,10 @@ var Uploader = ({
|
|
|
6317
6337
|
},
|
|
6318
6338
|
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
|
|
6319
6339
|
);
|
|
6320
|
-
const onDropRejected = (0,
|
|
6340
|
+
const onDropRejected = (0, import_react98.useCallback)((fileRejections) => {
|
|
6321
6341
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
|
6322
6342
|
}, []);
|
|
6323
|
-
const validator = (0,
|
|
6343
|
+
const validator = (0, import_react98.useCallback)(
|
|
6324
6344
|
(file) => {
|
|
6325
6345
|
const result = [];
|
|
6326
6346
|
if (validatorExt) {
|
|
@@ -6353,26 +6373,26 @@ var Uploader = ({
|
|
|
6353
6373
|
const renderHelperText = () => {
|
|
6354
6374
|
if (Array.isArray(helperText)) {
|
|
6355
6375
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6356
|
-
|
|
6376
|
+
import_react97.UnorderedList,
|
|
6357
6377
|
{
|
|
6358
6378
|
pl: 2,
|
|
6359
6379
|
fontSize: 12,
|
|
6360
6380
|
color: "black.medium",
|
|
6361
6381
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
|
6362
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6382
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.ListItem, { children: text2 }, text2))
|
|
6363
6383
|
}
|
|
6364
6384
|
);
|
|
6365
6385
|
}
|
|
6366
6386
|
return helperText;
|
|
6367
6387
|
};
|
|
6368
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6388
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
|
6369
6389
|
const handleRemove = (e) => {
|
|
6370
6390
|
e.stopPropagation();
|
|
6371
6391
|
setFilePreview(void 0);
|
|
6372
6392
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
|
6373
6393
|
acceptedFiles.pop();
|
|
6374
6394
|
};
|
|
6375
|
-
(0,
|
|
6395
|
+
(0, import_react98.useEffect)(() => {
|
|
6376
6396
|
if (value) {
|
|
6377
6397
|
if (typeof value === "string") {
|
|
6378
6398
|
setFilePreview(value);
|
|
@@ -6396,16 +6416,16 @@ var Uploader = ({
|
|
|
6396
6416
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
|
6397
6417
|
const containerHeight = !isSmall ? "160px" : "120px";
|
|
6398
6418
|
const cursorType = filePreview ? "initial" : "pointer";
|
|
6399
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react97.FormControl, { isRequired, children: [
|
|
6400
6420
|
label && typeof label === "string" ? (
|
|
6401
6421
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
6402
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6403
|
-
isRequired && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6422
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react97.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, {}), fontSize: "text.sm", children: [
|
|
6423
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.RequiredIndicator, { mr: 1, ml: 0 }),
|
|
6404
6424
|
label
|
|
6405
6425
|
] })
|
|
6406
6426
|
) : label,
|
|
6407
6427
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6408
|
-
|
|
6428
|
+
import_react97.Flex,
|
|
6409
6429
|
{
|
|
6410
6430
|
minH: containerHeight,
|
|
6411
6431
|
maxW: !isSmall ? "full" : "120px",
|
|
@@ -6422,8 +6442,8 @@ var Uploader = ({
|
|
|
6422
6442
|
...props,
|
|
6423
6443
|
...getRootProps(),
|
|
6424
6444
|
children: [
|
|
6425
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6426
|
-
|
|
6445
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6446
|
+
import_react97.Button,
|
|
6427
6447
|
{
|
|
6428
6448
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
|
6429
6449
|
"aria-label": "remove-image",
|
|
@@ -6440,29 +6460,29 @@ var Uploader = ({
|
|
|
6440
6460
|
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
|
6441
6461
|
}
|
|
6442
6462
|
) }),
|
|
6443
|
-
filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6444
|
-
|
|
6463
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6464
|
+
import_react97.Flex,
|
|
6445
6465
|
{
|
|
6446
6466
|
position: "relative",
|
|
6447
6467
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
|
6448
6468
|
justify: "center",
|
|
6449
6469
|
align: "center",
|
|
6450
6470
|
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6451
|
-
|
|
6471
|
+
import_react97.Image,
|
|
6452
6472
|
{
|
|
6453
6473
|
h: size2 === "lg" ? "120" : "100",
|
|
6454
6474
|
src: filePreview,
|
|
6455
6475
|
alt: "uploader-preview",
|
|
6456
6476
|
objectFit: "contain"
|
|
6457
6477
|
}
|
|
6458
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6478
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Text, { noOfLines: 3, mx: 2, textAlign: "center", children: filePreview })
|
|
6459
6479
|
}
|
|
6460
6480
|
) }),
|
|
6461
|
-
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6481
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react97.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
|
6462
6482
|
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
|
6463
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6483
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react97.Box, { children: [
|
|
6464
6484
|
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6465
|
-
|
|
6485
|
+
import_react97.Heading,
|
|
6466
6486
|
{
|
|
6467
6487
|
fontWeight: "400",
|
|
6468
6488
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
|
@@ -6471,7 +6491,7 @@ var Uploader = ({
|
|
|
6471
6491
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
|
6472
6492
|
}
|
|
6473
6493
|
),
|
|
6474
|
-
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6494
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
|
6475
6495
|
] })
|
|
6476
6496
|
] }) })
|
|
6477
6497
|
]
|
|
@@ -6484,8 +6504,8 @@ var Uploader = ({
|
|
|
6484
6504
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
|
6485
6505
|
}
|
|
6486
6506
|
),
|
|
6487
|
-
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6488
|
-
|
|
6507
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react97.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6508
|
+
import_react97.Button,
|
|
6489
6509
|
{
|
|
6490
6510
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
|
6491
6511
|
type: "button",
|
|
@@ -6531,10 +6551,10 @@ var dimensionValidator = (dimension, message) => {
|
|
|
6531
6551
|
};
|
|
6532
6552
|
|
|
6533
6553
|
// src/components/index.ts
|
|
6534
|
-
var
|
|
6554
|
+
var import_react99 = require("@chakra-ui/react");
|
|
6535
6555
|
|
|
6536
6556
|
// src/config/theme/themeConfiguration.ts
|
|
6537
|
-
var
|
|
6557
|
+
var import_react107 = require("@chakra-ui/react");
|
|
6538
6558
|
|
|
6539
6559
|
// src/config/theme/components/index.ts
|
|
6540
6560
|
var components_exports = {};
|
|
@@ -7091,8 +7111,8 @@ var card_default2 = CardStyle;
|
|
|
7091
7111
|
|
|
7092
7112
|
// src/config/theme/components/checkbox.ts
|
|
7093
7113
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
|
7094
|
-
var
|
|
7095
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
|
7114
|
+
var import_react100 = require("@chakra-ui/react");
|
|
7115
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react100.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
|
7096
7116
|
var baseStyle3 = definePartsStyle3({
|
|
7097
7117
|
control: {
|
|
7098
7118
|
borderRadius: "sm",
|
|
@@ -7193,8 +7213,8 @@ var checkbox_default2 = Checkbox3;
|
|
|
7193
7213
|
|
|
7194
7214
|
// src/config/theme/components/chips.ts
|
|
7195
7215
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
|
7196
|
-
var
|
|
7197
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
|
7216
|
+
var import_react101 = require("@chakra-ui/react");
|
|
7217
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react101.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
|
7198
7218
|
var baseStyle4 = definePartsStyle4({
|
|
7199
7219
|
container: {
|
|
7200
7220
|
px: 3,
|
|
@@ -7403,8 +7423,8 @@ var input_default = Input4;
|
|
|
7403
7423
|
|
|
7404
7424
|
// src/config/theme/components/loader.ts
|
|
7405
7425
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
|
7406
|
-
var
|
|
7407
|
-
var rotate = (0,
|
|
7426
|
+
var import_react102 = require("@emotion/react");
|
|
7427
|
+
var rotate = (0, import_react102.keyframes)({
|
|
7408
7428
|
"0%": {
|
|
7409
7429
|
transform: "rotate(0deg)"
|
|
7410
7430
|
},
|
|
@@ -7586,8 +7606,8 @@ var modal_default = modalTheme;
|
|
|
7586
7606
|
|
|
7587
7607
|
// src/config/theme/components/popover.ts
|
|
7588
7608
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
|
7589
|
-
var
|
|
7590
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
|
7609
|
+
var import_react103 = require("@chakra-ui/react");
|
|
7610
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react103.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
|
7591
7611
|
var baseStyle8 = definePartsStyle7({
|
|
7592
7612
|
content: {
|
|
7593
7613
|
bg: "white"
|
|
@@ -7598,8 +7618,8 @@ var popover_default = popoverTheme;
|
|
|
7598
7618
|
|
|
7599
7619
|
// src/config/theme/components/radio.ts
|
|
7600
7620
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
|
7601
|
-
var
|
|
7602
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
|
7621
|
+
var import_react104 = require("@chakra-ui/react");
|
|
7622
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react104.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
|
7603
7623
|
var baseStyle9 = definePartsStyle8({
|
|
7604
7624
|
control: {
|
|
7605
7625
|
border: "1px solid",
|
|
@@ -8021,7 +8041,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
|
8021
8041
|
var tabs_default = tabsTheme;
|
|
8022
8042
|
|
|
8023
8043
|
// src/config/theme/components/textarea.ts
|
|
8024
|
-
var
|
|
8044
|
+
var import_react105 = require("@chakra-ui/react");
|
|
8025
8045
|
var getProps = (props) => {
|
|
8026
8046
|
const { isError, isSuccess, isDisabled } = props;
|
|
8027
8047
|
let borderColor = "neutral.400";
|
|
@@ -8041,7 +8061,7 @@ var getProps = (props) => {
|
|
|
8041
8061
|
borderColor
|
|
8042
8062
|
};
|
|
8043
8063
|
};
|
|
8044
|
-
var outline3 = (0,
|
|
8064
|
+
var outline3 = (0, import_react105.defineStyle)((props) => {
|
|
8045
8065
|
const { focusBorderColor, borderColor } = getProps(props);
|
|
8046
8066
|
return {
|
|
8047
8067
|
background: "white.high",
|
|
@@ -8085,7 +8105,7 @@ var outline3 = (0, import_react104.defineStyle)((props) => {
|
|
|
8085
8105
|
}
|
|
8086
8106
|
};
|
|
8087
8107
|
});
|
|
8088
|
-
var Textarea = (0,
|
|
8108
|
+
var Textarea = (0, import_react105.defineStyleConfig)({
|
|
8089
8109
|
variants: { outline: outline3 },
|
|
8090
8110
|
defaultProps: {
|
|
8091
8111
|
variant: "outline"
|
|
@@ -8094,15 +8114,15 @@ var Textarea = (0, import_react104.defineStyleConfig)({
|
|
|
8094
8114
|
var textarea_default2 = Textarea;
|
|
8095
8115
|
|
|
8096
8116
|
// src/config/theme/components/tooltip.ts
|
|
8097
|
-
var
|
|
8098
|
-
var $arrowBg = (0,
|
|
8117
|
+
var import_react106 = require("@chakra-ui/react");
|
|
8118
|
+
var $arrowBg = (0, import_react106.cssVar)("popper-arrow-bg");
|
|
8099
8119
|
var baseStyle12 = {
|
|
8100
8120
|
bg: "neutral.700",
|
|
8101
8121
|
textStyle: "text.sm",
|
|
8102
8122
|
fontSize: "text.sm",
|
|
8103
8123
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
|
8104
8124
|
};
|
|
8105
|
-
var Tooltip2 = (0,
|
|
8125
|
+
var Tooltip2 = (0, import_react106.defineStyleConfig)({ baseStyle: baseStyle12 });
|
|
8106
8126
|
var tooltip_default = Tooltip2;
|
|
8107
8127
|
|
|
8108
8128
|
// src/config/theme/themeConfiguration.ts
|
|
@@ -8121,7 +8141,7 @@ var createExtendTheme = (theme5) => {
|
|
|
8121
8141
|
return function extendTheme2(...extensions) {
|
|
8122
8142
|
let overrides = [...extensions];
|
|
8123
8143
|
let activeTheme = extensions[extensions.length - 1];
|
|
8124
|
-
if ((0,
|
|
8144
|
+
if ((0, import_react107.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
|
8125
8145
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
|
8126
8146
|
overrides.length > 1) {
|
|
8127
8147
|
overrides = overrides.slice(0, overrides.length - 1);
|
|
@@ -8130,13 +8150,13 @@ var createExtendTheme = (theme5) => {
|
|
|
8130
8150
|
}
|
|
8131
8151
|
return pipe(
|
|
8132
8152
|
...overrides.map(
|
|
8133
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
|
8153
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react107.mergeThemeOverride)(prevTheme, extension)
|
|
8134
8154
|
)
|
|
8135
8155
|
)(activeTheme);
|
|
8136
8156
|
};
|
|
8137
8157
|
};
|
|
8138
8158
|
var getTheme = (foundations) => {
|
|
8139
|
-
return (0,
|
|
8159
|
+
return (0, import_react107.extendTheme)({
|
|
8140
8160
|
...foundations,
|
|
8141
8161
|
components: {
|
|
8142
8162
|
...components_exports
|
|
@@ -8153,7 +8173,7 @@ var getTheme = (foundations) => {
|
|
|
8153
8173
|
config
|
|
8154
8174
|
});
|
|
8155
8175
|
};
|
|
8156
|
-
var theme4 = (0,
|
|
8176
|
+
var theme4 = (0, import_react107.extendTheme)({
|
|
8157
8177
|
components: {
|
|
8158
8178
|
...components_exports
|
|
8159
8179
|
},
|
|
@@ -8173,23 +8193,23 @@ var theme4 = (0, import_react106.extendTheme)({
|
|
|
8173
8193
|
|
|
8174
8194
|
// src/hooks/useFetcher.ts
|
|
8175
8195
|
var import_axios2 = __toESM(require("axios"));
|
|
8176
|
-
var
|
|
8196
|
+
var import_react110 = require("react");
|
|
8177
8197
|
|
|
8178
8198
|
// src/provider/components/provider.tsx
|
|
8179
8199
|
var import_axios = __toESM(require("axios"));
|
|
8180
|
-
var
|
|
8200
|
+
var import_react108 = require("react");
|
|
8181
8201
|
var import_react_toastify3 = require("react-toastify");
|
|
8182
8202
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8183
|
-
var ProviderContext = (0,
|
|
8203
|
+
var ProviderContext = (0, import_react108.createContext)({
|
|
8184
8204
|
instance: void 0
|
|
8185
8205
|
});
|
|
8186
8206
|
var useInternalUI = () => {
|
|
8187
|
-
const { instance } = (0,
|
|
8207
|
+
const { instance } = (0, import_react108.useContext)(ProviderContext);
|
|
8188
8208
|
return { instance };
|
|
8189
8209
|
};
|
|
8190
8210
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
|
8191
|
-
const instanceRef = (0,
|
|
8192
|
-
(0,
|
|
8211
|
+
const instanceRef = (0, import_react108.useRef)(import_axios.default.create(config2));
|
|
8212
|
+
(0, import_react108.useEffect)(() => {
|
|
8193
8213
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
|
8194
8214
|
instanceRef.current.interceptors.request.use(interceptor);
|
|
8195
8215
|
});
|
|
@@ -8197,7 +8217,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
|
8197
8217
|
instanceRef.current.interceptors.response.use(interceptor);
|
|
8198
8218
|
});
|
|
8199
8219
|
}, [requestInterceptors, responseInterceptors]);
|
|
8200
|
-
const provider = (0,
|
|
8220
|
+
const provider = (0, import_react108.useMemo)(() => ({ instance: instanceRef.current }), []);
|
|
8201
8221
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
|
8202
8222
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react_toastify3.ToastContainer, {}),
|
|
8203
8223
|
children
|
|
@@ -8207,12 +8227,12 @@ Provider.displayName = "Provider";
|
|
|
8207
8227
|
var provider_default = Provider;
|
|
8208
8228
|
|
|
8209
8229
|
// src/provider/index.ts
|
|
8210
|
-
var
|
|
8230
|
+
var import_react109 = require("@chakra-ui/react");
|
|
8211
8231
|
|
|
8212
8232
|
// src/hooks/useFetcher.ts
|
|
8213
8233
|
function useFetcher() {
|
|
8214
8234
|
const { instance } = useInternalUI();
|
|
8215
|
-
const axiosInstance = (0,
|
|
8235
|
+
const axiosInstance = (0, import_react110.useMemo)(() => instance || import_axios2.default, [instance]);
|
|
8216
8236
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
|
8217
8237
|
const response = await axiosInstance.request({
|
|
8218
8238
|
data,
|
|
@@ -8232,10 +8252,10 @@ function useFetcher() {
|
|
|
8232
8252
|
}
|
|
8233
8253
|
|
|
8234
8254
|
// src/hooks/index.ts
|
|
8235
|
-
var
|
|
8255
|
+
var import_react111 = require("@chakra-ui/react");
|
|
8236
8256
|
|
|
8237
8257
|
// src/index.ts
|
|
8238
|
-
var
|
|
8258
|
+
var import_react112 = require("@chakra-ui/react");
|
|
8239
8259
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8240
8260
|
0 && (module.exports = {
|
|
8241
8261
|
Accordion,
|