@ctlyst.id/internal-ui 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +724 -671
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -45,146 +45,146 @@ __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_react58.AlertDialog,
|
49
|
+
AlertDialogBody: () => import_react58.ModalBody,
|
50
|
+
AlertDialogCloseButton: () => import_react58.ModalCloseButton,
|
51
|
+
AlertDialogContent: () => import_react58.AlertDialogContent,
|
52
|
+
AlertDialogFooter: () => import_react58.ModalFooter,
|
53
|
+
AlertDialogHeader: () => import_react58.ModalHeader,
|
54
|
+
AlertDialogOverlay: () => import_react58.ModalOverlay,
|
55
|
+
AlertDialogProps: () => import_react58.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_react95.Avatar,
|
60
|
+
AvatarBadge: () => import_react95.AvatarBadge,
|
61
|
+
AvatarBadgeProps: () => import_react95.AvatarBadgeProps,
|
62
|
+
AvatarGroup: () => import_react95.AvatarGroup,
|
63
|
+
AvatarGroupProps: () => import_react95.AvatarGroupProps,
|
64
|
+
AvatarProps: () => import_react95.AvatarProps,
|
65
65
|
Badge: () => badge_default,
|
66
|
-
Box: () =>
|
67
|
-
BoxProps: () =>
|
66
|
+
Box: () => import_react55.Box,
|
67
|
+
BoxProps: () => import_react55.BoxProps,
|
68
68
|
BreadCrumb: () => bread_crumb_default,
|
69
69
|
Button: () => button_default,
|
70
70
|
ButtonGroup: () => import_react10.ButtonGroup,
|
71
71
|
ButtonGroupProps: () => import_react10.ButtonGroupProps,
|
72
72
|
CHECKBOX_STATE: () => CHECKBOX_STATE,
|
73
73
|
Card: () => card_default,
|
74
|
-
Center: () =>
|
75
|
-
ChakraProvider: () =>
|
76
|
-
ChakraProviderProps: () =>
|
77
|
-
ChakraTable: () =>
|
74
|
+
Center: () => import_react55.Center,
|
75
|
+
ChakraProvider: () => import_react105.ChakraProvider,
|
76
|
+
ChakraProviderProps: () => import_react105.ChakraProviderProps,
|
77
|
+
ChakraTable: () => import_react84.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_react17.CheckboxGroupContext,
|
81
|
+
CheckboxGroupProps: () => import_react17.CheckboxGroupProps,
|
82
|
+
CheckboxIcon: () => import_react17.CheckboxIcon,
|
83
|
+
CheckboxIconProps: () => import_react17.CheckboxIconProps,
|
84
|
+
CheckboxState: () => import_react17.CheckboxState,
|
85
85
|
Chips: () => chips_default,
|
86
86
|
ClearIndicator: () => ClearIndicator,
|
87
87
|
CloseButton: () => import_react10.CloseButton,
|
88
88
|
CloseButtonProps: () => import_react10.CloseButtonProps,
|
89
|
-
Code: () =>
|
90
|
-
CodeProps: () =>
|
91
|
-
Collapse: () =>
|
92
|
-
CollapseProps: () =>
|
93
|
-
ColorMode: () =>
|
94
|
-
ColorModeScript: () =>
|
95
|
-
ColorModeScriptProps: () =>
|
96
|
-
Container: () =>
|
97
|
-
ContainerProps: () =>
|
89
|
+
Code: () => import_react87.Code,
|
90
|
+
CodeProps: () => import_react87.CodeProps,
|
91
|
+
Collapse: () => import_react95.Collapse,
|
92
|
+
CollapseProps: () => import_react95.CollapseProps,
|
93
|
+
ColorMode: () => import_react105.ColorMode,
|
94
|
+
ColorModeScript: () => import_react105.ColorModeScript,
|
95
|
+
ColorModeScriptProps: () => import_react105.ColorModeScriptProps,
|
96
|
+
Container: () => import_react55.Container,
|
97
|
+
ContainerProps: () => import_react55.ContainerProps,
|
98
98
|
Counter: () => counter_default,
|
99
99
|
DataTable: () => data_table_default,
|
100
100
|
DatePickerMonth: () => datepicker_month_default,
|
101
101
|
Datepicker: () => datepicker_default,
|
102
102
|
Dialog: () => dialog_default,
|
103
|
-
Divider: () =>
|
104
|
-
DividerProps: () =>
|
105
|
-
Drawer: () =>
|
106
|
-
DrawerBody: () =>
|
107
|
-
DrawerCloseButton: () =>
|
108
|
-
DrawerContent: () =>
|
109
|
-
DrawerContentProps: () =>
|
110
|
-
DrawerFooter: () =>
|
111
|
-
DrawerHeader: () =>
|
112
|
-
DrawerOverlay: () =>
|
113
|
-
DrawerProps: () =>
|
103
|
+
Divider: () => import_react55.Divider,
|
104
|
+
DividerProps: () => import_react55.DividerProps,
|
105
|
+
Drawer: () => import_react58.Drawer,
|
106
|
+
DrawerBody: () => import_react58.ModalBody,
|
107
|
+
DrawerCloseButton: () => import_react58.ModalCloseButton,
|
108
|
+
DrawerContent: () => import_react58.DrawerContent,
|
109
|
+
DrawerContentProps: () => import_react58.DrawerContentProps,
|
110
|
+
DrawerFooter: () => import_react58.ModalFooter,
|
111
|
+
DrawerHeader: () => import_react58.ModalHeader,
|
112
|
+
DrawerOverlay: () => import_react58.ModalOverlay,
|
113
|
+
DrawerProps: () => import_react58.DrawerProps,
|
114
114
|
DropdownIndicator: () => DropdownIndicator,
|
115
115
|
EmptyState: () => empty_state_default,
|
116
116
|
ErrorCode: () => error_code_default,
|
117
|
-
Fade: () =>
|
118
|
-
FadeProps: () =>
|
117
|
+
Fade: () => import_react95.Fade,
|
118
|
+
FadeProps: () => import_react95.FadeProps,
|
119
119
|
Field: () => field_default,
|
120
|
-
Flex: () =>
|
121
|
-
FlexProps: () =>
|
122
|
-
FormControl: () =>
|
123
|
-
FormControlProps: () =>
|
124
|
-
FormErrorMessage: () =>
|
125
|
-
FormHelperText: () =>
|
126
|
-
FormLabel: () =>
|
127
|
-
FormLabelProps: () =>
|
128
|
-
Grid: () =>
|
129
|
-
GridItem: () =>
|
130
|
-
GridItemProps: () =>
|
131
|
-
GridProps: () =>
|
132
|
-
HStack: () =>
|
120
|
+
Flex: () => import_react55.Flex,
|
121
|
+
FlexProps: () => import_react55.FlexProps,
|
122
|
+
FormControl: () => import_react26.FormControl,
|
123
|
+
FormControlProps: () => import_react26.FormControlProps,
|
124
|
+
FormErrorMessage: () => import_react26.FormErrorMessage,
|
125
|
+
FormHelperText: () => import_react26.FormHelperText,
|
126
|
+
FormLabel: () => import_react26.FormLabel,
|
127
|
+
FormLabelProps: () => import_react26.FormLabelProps,
|
128
|
+
Grid: () => import_react55.Grid,
|
129
|
+
GridItem: () => import_react55.GridItem,
|
130
|
+
GridItemProps: () => import_react55.GridItemProps,
|
131
|
+
GridProps: () => import_react55.GridProps,
|
132
|
+
HStack: () => import_react55.HStack,
|
133
133
|
Header: () => Header,
|
134
|
-
Heading: () =>
|
135
|
-
HeadingProps: () =>
|
136
|
-
Hide: () =>
|
137
|
-
HideProps: () =>
|
138
|
-
Icon: () =>
|
134
|
+
Heading: () => import_react87.Heading,
|
135
|
+
HeadingProps: () => import_react87.HeadingProps,
|
136
|
+
Hide: () => import_react95.Hide,
|
137
|
+
HideProps: () => import_react95.HideProps,
|
138
|
+
Icon: () => import_react54.Icon,
|
139
139
|
IconButton: () => import_react10.IconButton,
|
140
140
|
IconButtonProps: () => import_react10.IconButtonProps,
|
141
|
-
IconProps: () =>
|
142
|
-
Image: () =>
|
143
|
-
ImageProps: () =>
|
144
|
-
Img: () =>
|
145
|
-
ImgProps: () =>
|
141
|
+
IconProps: () => import_react54.IconProps,
|
142
|
+
Image: () => import_react54.Image,
|
143
|
+
ImageProps: () => import_react54.ImageProps,
|
144
|
+
Img: () => import_react95.Img,
|
145
|
+
ImgProps: () => import_react95.ImgProps,
|
146
146
|
InputAddonLeft: () => InputAddonLeft,
|
147
147
|
InputAddonRight: () => InputAddonRight,
|
148
|
-
InputElementLeft: () =>
|
149
|
-
InputElementRight: () =>
|
148
|
+
InputElementLeft: () => import_react20.InputLeftElement,
|
149
|
+
InputElementRight: () => import_react21.InputRightElement,
|
150
150
|
InputField: () => input_field_default,
|
151
|
-
InputGroup: () =>
|
152
|
-
InputGroupProps: () =>
|
153
|
-
InputLeftAddon: () =>
|
154
|
-
InputLeftAddonProps: () =>
|
155
|
-
InputLeftElement: () =>
|
156
|
-
InputLeftElementProps: () =>
|
157
|
-
InputProps: () =>
|
158
|
-
InputRightAddon: () =>
|
159
|
-
InputRightAddonProps: () =>
|
160
|
-
InputRightElement: () =>
|
161
|
-
InputRightElementProps: () =>
|
162
|
-
Link: () =>
|
163
|
-
LinkProps: () =>
|
164
|
-
List: () =>
|
165
|
-
ListIcon: () =>
|
166
|
-
ListItem: () =>
|
167
|
-
ListItemProps: () =>
|
168
|
-
ListProps: () =>
|
151
|
+
InputGroup: () => import_react26.InputGroup,
|
152
|
+
InputGroupProps: () => import_react26.InputGroupProps,
|
153
|
+
InputLeftAddon: () => import_react26.InputLeftAddon,
|
154
|
+
InputLeftAddonProps: () => import_react26.InputLeftAddonProps,
|
155
|
+
InputLeftElement: () => import_react26.InputLeftElement,
|
156
|
+
InputLeftElementProps: () => import_react26.InputLeftElementProps,
|
157
|
+
InputProps: () => import_react26.InputProps,
|
158
|
+
InputRightAddon: () => import_react26.InputRightAddon,
|
159
|
+
InputRightAddonProps: () => import_react26.InputRightAddonProps,
|
160
|
+
InputRightElement: () => import_react26.InputRightElement,
|
161
|
+
InputRightElementProps: () => import_react26.InputRightElementProps,
|
162
|
+
Link: () => import_react87.Link,
|
163
|
+
LinkProps: () => import_react87.LinkProps,
|
164
|
+
List: () => import_react56.List,
|
165
|
+
ListIcon: () => import_react56.ListIcon,
|
166
|
+
ListItem: () => import_react56.ListItem,
|
167
|
+
ListItemProps: () => import_react56.ListItemProps,
|
168
|
+
ListProps: () => import_react56.ListProps,
|
169
169
|
Loader: () => loader_default,
|
170
170
|
Logo: () => Logo,
|
171
171
|
MainMenu: () => navigation_default,
|
172
|
-
Modal: () =>
|
172
|
+
Modal: () => import_react58.Modal,
|
173
173
|
ModalBackButton: () => modal_back_button_default,
|
174
|
-
ModalBody: () =>
|
175
|
-
ModalBodyProps: () =>
|
176
|
-
ModalCloseButton: () =>
|
177
|
-
ModalContent: () =>
|
178
|
-
ModalContentProps: () =>
|
179
|
-
ModalContextProvider: () =>
|
180
|
-
ModalFocusScope: () =>
|
181
|
-
ModalFooter: () =>
|
182
|
-
ModalFooterProps: () =>
|
183
|
-
ModalHeader: () =>
|
184
|
-
ModalHeaderProps: () =>
|
185
|
-
ModalOverlay: () =>
|
186
|
-
ModalOverlayProps: () =>
|
187
|
-
ModalProps: () =>
|
174
|
+
ModalBody: () => import_react58.ModalBody,
|
175
|
+
ModalBodyProps: () => import_react58.ModalBodyProps,
|
176
|
+
ModalCloseButton: () => import_react58.ModalCloseButton,
|
177
|
+
ModalContent: () => import_react58.ModalContent,
|
178
|
+
ModalContentProps: () => import_react58.ModalContentProps,
|
179
|
+
ModalContextProvider: () => import_react58.ModalContextProvider,
|
180
|
+
ModalFocusScope: () => import_react58.ModalFocusScope,
|
181
|
+
ModalFooter: () => import_react58.ModalFooter,
|
182
|
+
ModalFooterProps: () => import_react58.ModalFooterProps,
|
183
|
+
ModalHeader: () => import_react58.ModalHeader,
|
184
|
+
ModalHeaderProps: () => import_react58.ModalHeaderProps,
|
185
|
+
ModalOverlay: () => import_react58.ModalOverlay,
|
186
|
+
ModalOverlayProps: () => import_react58.ModalOverlayProps,
|
187
|
+
ModalProps: () => import_react58.ModalProps,
|
188
188
|
MultiDatePickerMonth: () => multi_datepicker_month_default,
|
189
189
|
MultiValue: () => MultiValue,
|
190
190
|
MultiValueRemove: () => MultiValueRemove,
|
@@ -192,155 +192,155 @@ __export(src_exports, {
|
|
192
192
|
Navbar: () => Navbar,
|
193
193
|
NavigationBar: () => navigation_bar_default,
|
194
194
|
NoOptionsMessage: () => NoOptionsMessage,
|
195
|
-
OrderedList: () =>
|
195
|
+
OrderedList: () => import_react56.OrderedList,
|
196
196
|
Pagination: () => pagination_default,
|
197
197
|
PaginationDetail: () => pagination_detail_default,
|
198
198
|
PaginationFilter: () => pagination_filter_default,
|
199
|
-
PinInput: () =>
|
200
|
-
PinInputContext: () =>
|
201
|
-
PinInputDescendantsProvider: () =>
|
202
|
-
PinInputField: () =>
|
203
|
-
PinInputFieldProps: () =>
|
204
|
-
PinInputProps: () =>
|
205
|
-
PinInputProvider: () =>
|
206
|
-
Popover: () =>
|
207
|
-
PopoverAnchor: () =>
|
208
|
-
PopoverArrow: () =>
|
209
|
-
PopoverArrowProps: () =>
|
210
|
-
PopoverBody: () =>
|
211
|
-
PopoverBodyProps: () =>
|
212
|
-
PopoverCloseButton: () =>
|
213
|
-
PopoverContent: () =>
|
214
|
-
PopoverContentProps: () =>
|
215
|
-
PopoverFooter: () =>
|
216
|
-
PopoverFooterProps: () =>
|
217
|
-
PopoverHeader: () =>
|
218
|
-
PopoverHeaderProps: () =>
|
219
|
-
PopoverProps: () =>
|
220
|
-
PopoverTrigger: () =>
|
221
|
-
Portal: () =>
|
222
|
-
PortalProps: () =>
|
199
|
+
PinInput: () => import_react67.PinInput,
|
200
|
+
PinInputContext: () => import_react67.PinInputContext,
|
201
|
+
PinInputDescendantsProvider: () => import_react67.PinInputDescendantsProvider,
|
202
|
+
PinInputField: () => import_react67.PinInputField,
|
203
|
+
PinInputFieldProps: () => import_react67.PinInputFieldProps,
|
204
|
+
PinInputProps: () => import_react67.PinInputProps,
|
205
|
+
PinInputProvider: () => import_react67.PinInputProvider,
|
206
|
+
Popover: () => import_react68.Popover,
|
207
|
+
PopoverAnchor: () => import_react68.PopoverAnchor,
|
208
|
+
PopoverArrow: () => import_react68.PopoverArrow,
|
209
|
+
PopoverArrowProps: () => import_react68.PopoverArrowProps,
|
210
|
+
PopoverBody: () => import_react68.PopoverBody,
|
211
|
+
PopoverBodyProps: () => import_react68.PopoverBodyProps,
|
212
|
+
PopoverCloseButton: () => import_react68.PopoverCloseButton,
|
213
|
+
PopoverContent: () => import_react68.PopoverContent,
|
214
|
+
PopoverContentProps: () => import_react68.PopoverContentProps,
|
215
|
+
PopoverFooter: () => import_react68.PopoverFooter,
|
216
|
+
PopoverFooterProps: () => import_react68.PopoverFooterProps,
|
217
|
+
PopoverHeader: () => import_react68.PopoverHeader,
|
218
|
+
PopoverHeaderProps: () => import_react68.PopoverHeaderProps,
|
219
|
+
PopoverProps: () => import_react68.PopoverProps,
|
220
|
+
PopoverTrigger: () => import_react68.PopoverTrigger,
|
221
|
+
Portal: () => import_react68.Portal,
|
222
|
+
PortalProps: () => import_react68.PortalProps,
|
223
223
|
Profile: () => Profile,
|
224
|
-
Progress: () =>
|
225
|
-
ProgressFilledTrackProps: () =>
|
226
|
-
ProgressLabel: () =>
|
227
|
-
ProgressLabelProps: () =>
|
228
|
-
ProgressProps: () =>
|
229
|
-
ProgressTrackProps: () =>
|
224
|
+
Progress: () => import_react69.Progress,
|
225
|
+
ProgressFilledTrackProps: () => import_react69.ProgressFilledTrackProps,
|
226
|
+
ProgressLabel: () => import_react69.ProgressLabel,
|
227
|
+
ProgressLabelProps: () => import_react69.ProgressLabelProps,
|
228
|
+
ProgressProps: () => import_react69.ProgressProps,
|
229
|
+
ProgressTrackProps: () => import_react69.ProgressTrackProps,
|
230
230
|
Provider: () => provider_default,
|
231
231
|
ProviderContext: () => ProviderContext,
|
232
232
|
Radio: () => Radio,
|
233
233
|
RadioGroup: () => RadioGroup,
|
234
|
-
RadioGroupContext: () =>
|
234
|
+
RadioGroupContext: () => import_react72.RadioGroupContext,
|
235
235
|
Rating: () => rating_default,
|
236
|
-
RequiredIndicator: () =>
|
237
|
-
RequiredIndicatorProps: () =>
|
238
|
-
ScaleFade: () =>
|
239
|
-
ScaleFadeProps: () =>
|
236
|
+
RequiredIndicator: () => import_react26.RequiredIndicator,
|
237
|
+
RequiredIndicatorProps: () => import_react26.RequiredIndicatorProps,
|
238
|
+
ScaleFade: () => import_react95.ScaleFade,
|
239
|
+
ScaleFadeProps: () => import_react95.ScaleFadeProps,
|
240
240
|
Select: () => select_default,
|
241
241
|
SelectAsync: () => select_async_default,
|
242
242
|
SelectAsyncCreatable: () => SelectAsyncCreatable,
|
243
243
|
SelectCheckBox: () => select_with_checkbox_default,
|
244
244
|
SelectCreatable: () => SelectCreatable,
|
245
|
-
Show: () =>
|
246
|
-
ShowProps: () =>
|
245
|
+
Show: () => import_react95.Show,
|
246
|
+
ShowProps: () => import_react95.ShowProps,
|
247
247
|
Sidebar: () => Sidebar,
|
248
248
|
SidebarHeader: () => SidebarHeader,
|
249
249
|
SidebarMenu: () => SidebarMenu,
|
250
|
-
SimpleGrid: () =>
|
250
|
+
SimpleGrid: () => import_react55.SimpleGrid,
|
251
251
|
Skeleton: () => import_react5.Skeleton,
|
252
|
-
Slide: () =>
|
253
|
-
SlideFade: () =>
|
254
|
-
SlideFadeProps: () =>
|
255
|
-
SlideProps: () =>
|
256
|
-
Spacer: () =>
|
257
|
-
Stack: () =>
|
258
|
-
StackProps: () =>
|
259
|
-
Step: () =>
|
260
|
-
StepDescription: () =>
|
261
|
-
StepIcon: () =>
|
262
|
-
StepIndicator: () =>
|
263
|
-
StepNumber: () =>
|
264
|
-
StepSeparator: () =>
|
265
|
-
StepStatus: () =>
|
266
|
-
StepTitle: () =>
|
267
|
-
Stepper: () =>
|
252
|
+
Slide: () => import_react95.Slide,
|
253
|
+
SlideFade: () => import_react95.SlideFade,
|
254
|
+
SlideFadeProps: () => import_react95.SlideFadeProps,
|
255
|
+
SlideProps: () => import_react95.SlideProps,
|
256
|
+
Spacer: () => import_react55.Spacer,
|
257
|
+
Stack: () => import_react55.Stack,
|
258
|
+
StackProps: () => import_react55.StackProps,
|
259
|
+
Step: () => import_react95.Step,
|
260
|
+
StepDescription: () => import_react95.StepDescription,
|
261
|
+
StepIcon: () => import_react95.StepIcon,
|
262
|
+
StepIndicator: () => import_react95.StepIndicator,
|
263
|
+
StepNumber: () => import_react95.StepNumber,
|
264
|
+
StepSeparator: () => import_react95.StepSeparator,
|
265
|
+
StepStatus: () => import_react95.StepStatus,
|
266
|
+
StepTitle: () => import_react95.StepTitle,
|
267
|
+
Stepper: () => import_react95.Stepper,
|
268
268
|
Switch: () => switch_default,
|
269
269
|
Tab: () => tab_default,
|
270
|
-
TabIndicator: () =>
|
271
|
-
TabIndicatorProps: () =>
|
272
|
-
TabList: () =>
|
273
|
-
TabListProps: () =>
|
274
|
-
TabPanel: () =>
|
275
|
-
TabPanelProps: () =>
|
276
|
-
TabPanels: () =>
|
277
|
-
TabPanelsProps: () =>
|
278
|
-
TabProps: () =>
|
279
|
-
TableBodyProps: () =>
|
280
|
-
TableCellProps: () =>
|
281
|
-
TableColumnHeaderProps: () =>
|
282
|
-
TableHeadProps: () =>
|
283
|
-
TableProps: () =>
|
284
|
-
TableRowProps: () =>
|
285
|
-
Tabs: () =>
|
286
|
-
TabsDescendantsProvider: () =>
|
287
|
-
TabsProps: () =>
|
288
|
-
TabsProvider: () =>
|
289
|
-
Tbody: () =>
|
290
|
-
Td: () =>
|
291
|
-
Text: () =>
|
292
|
-
TextProps: () =>
|
270
|
+
TabIndicator: () => import_react86.TabIndicator,
|
271
|
+
TabIndicatorProps: () => import_react86.TabIndicatorProps,
|
272
|
+
TabList: () => import_react86.TabList,
|
273
|
+
TabListProps: () => import_react86.TabListProps,
|
274
|
+
TabPanel: () => import_react86.TabPanel,
|
275
|
+
TabPanelProps: () => import_react86.TabPanelProps,
|
276
|
+
TabPanels: () => import_react86.TabPanels,
|
277
|
+
TabPanelsProps: () => import_react86.TabPanelsProps,
|
278
|
+
TabProps: () => import_react86.TabProps,
|
279
|
+
TableBodyProps: () => import_react84.TableBodyProps,
|
280
|
+
TableCellProps: () => import_react84.TableCellProps,
|
281
|
+
TableColumnHeaderProps: () => import_react84.TableColumnHeaderProps,
|
282
|
+
TableHeadProps: () => import_react84.TableHeadProps,
|
283
|
+
TableProps: () => import_react84.TableProps,
|
284
|
+
TableRowProps: () => import_react84.TableRowProps,
|
285
|
+
Tabs: () => import_react86.Tabs,
|
286
|
+
TabsDescendantsProvider: () => import_react86.TabsDescendantsProvider,
|
287
|
+
TabsProps: () => import_react86.TabsProps,
|
288
|
+
TabsProvider: () => import_react86.TabsProvider,
|
289
|
+
Tbody: () => import_react84.Tbody,
|
290
|
+
Td: () => import_react84.Td,
|
291
|
+
Text: () => import_react87.Text,
|
292
|
+
TextProps: () => import_react87.TextProps,
|
293
293
|
TextareaField: () => textarea_default,
|
294
|
-
Th: () =>
|
295
|
-
Thead: () =>
|
294
|
+
Th: () => import_react84.Th,
|
295
|
+
Thead: () => import_react84.Thead,
|
296
296
|
ThemeTypings: () => import_styled_system12.ThemeTypings,
|
297
297
|
Time: () => Time,
|
298
298
|
TimeInput: () => TimeInput2,
|
299
299
|
ToastContainer: () => import_react_toastify2.ToastContainer,
|
300
300
|
Tooltip: () => Tooltip,
|
301
|
-
Tr: () =>
|
302
|
-
UnorderedList: () =>
|
301
|
+
Tr: () => import_react84.Tr,
|
302
|
+
UnorderedList: () => import_react56.UnorderedList,
|
303
303
|
Uploader: () => uploader_default,
|
304
|
-
UseBreakpointOptions: () =>
|
305
|
-
UseCheckboxGroupProps: () =>
|
306
|
-
UseCheckboxGroupReturn: () =>
|
307
|
-
UseCheckboxProps: () =>
|
308
|
-
UseCheckboxReturn: () =>
|
309
|
-
UseDisclosureProps: () =>
|
310
|
-
UseImageProps: () =>
|
311
|
-
UseImageReturn: () =>
|
312
|
-
UseMediaQueryOptions: () =>
|
313
|
-
UseModalProps: () =>
|
314
|
-
UseModalReturn: () =>
|
315
|
-
UsePinInputFieldProps: () =>
|
316
|
-
UsePinInputProps: () =>
|
317
|
-
UsePinInputReturn: () =>
|
318
|
-
UseQueryProps: () =>
|
319
|
-
UseRadioGroupReturn: () =>
|
320
|
-
UseRadioProps: () =>
|
321
|
-
UseRadioReturn: () =>
|
322
|
-
UseTabListProps: () =>
|
323
|
-
UseTabListReturn: () =>
|
324
|
-
UseTabOptions: () =>
|
325
|
-
UseTabPanelsProps: () =>
|
326
|
-
UseTabProps: () =>
|
327
|
-
UseTabsProps: () =>
|
328
|
-
UseTabsReturn: () =>
|
329
|
-
VStack: () =>
|
304
|
+
UseBreakpointOptions: () => import_react95.UseBreakpointOptions,
|
305
|
+
UseCheckboxGroupProps: () => import_react17.UseCheckboxGroupProps,
|
306
|
+
UseCheckboxGroupReturn: () => import_react17.UseCheckboxGroupReturn,
|
307
|
+
UseCheckboxProps: () => import_react17.UseCheckboxProps,
|
308
|
+
UseCheckboxReturn: () => import_react17.UseCheckboxReturn,
|
309
|
+
UseDisclosureProps: () => import_react107.UseDisclosureProps,
|
310
|
+
UseImageProps: () => import_react95.UseImageProps,
|
311
|
+
UseImageReturn: () => import_react95.UseImageReturn,
|
312
|
+
UseMediaQueryOptions: () => import_react95.UseMediaQueryOptions,
|
313
|
+
UseModalProps: () => import_react58.UseModalProps,
|
314
|
+
UseModalReturn: () => import_react58.UseModalReturn,
|
315
|
+
UsePinInputFieldProps: () => import_react67.UsePinInputFieldProps,
|
316
|
+
UsePinInputProps: () => import_react67.UsePinInputProps,
|
317
|
+
UsePinInputReturn: () => import_react67.UsePinInputReturn,
|
318
|
+
UseQueryProps: () => import_react95.UseQueryProps,
|
319
|
+
UseRadioGroupReturn: () => import_react72.UseRadioGroupReturn,
|
320
|
+
UseRadioProps: () => import_react72.UseRadioProps,
|
321
|
+
UseRadioReturn: () => import_react72.UseRadioReturn,
|
322
|
+
UseTabListProps: () => import_react86.UseTabListProps,
|
323
|
+
UseTabListReturn: () => import_react86.UseTabListReturn,
|
324
|
+
UseTabOptions: () => import_react86.UseTabOptions,
|
325
|
+
UseTabPanelsProps: () => import_react86.UseTabPanelsProps,
|
326
|
+
UseTabProps: () => import_react86.UseTabProps,
|
327
|
+
UseTabsProps: () => import_react86.UseTabsProps,
|
328
|
+
UseTabsReturn: () => import_react86.UseTabsReturn,
|
329
|
+
VStack: () => import_react55.VStack,
|
330
330
|
Version: () => Version,
|
331
|
-
VisuallyHidden: () =>
|
332
|
-
VisuallyHiddenInput: () =>
|
331
|
+
VisuallyHidden: () => import_react95.VisuallyHidden,
|
332
|
+
VisuallyHiddenInput: () => import_react95.VisuallyHiddenInput,
|
333
333
|
VoilaLogo: () => VoilaLogo,
|
334
|
-
Wrap: () =>
|
335
|
-
WrapItem: () =>
|
336
|
-
WrapItemProps: () =>
|
337
|
-
WrapProps: () =>
|
334
|
+
Wrap: () => import_react55.Wrap,
|
335
|
+
WrapItem: () => import_react55.WrapItem,
|
336
|
+
WrapItemProps: () => import_react55.WrapItemProps,
|
337
|
+
WrapProps: () => import_react55.WrapProps,
|
338
338
|
XMSLogo: () => XMSLogo,
|
339
339
|
createExtendTheme: () => createExtendTheme,
|
340
340
|
defaultOnHandleRejections: () => defaultOnHandleRejections,
|
341
341
|
dimensionValidator: () => dimensionValidator,
|
342
|
-
extendTheme: () =>
|
343
|
-
forwardRef: () =>
|
342
|
+
extendTheme: () => import_react108.extendTheme,
|
343
|
+
forwardRef: () => import_react108.forwardRef,
|
344
344
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
345
345
|
getTheme: () => getTheme,
|
346
346
|
id: () => id,
|
@@ -356,53 +356,53 @@ __export(src_exports, {
|
|
356
356
|
useAccordionItemState: () => import_react3.useAccordionItemState,
|
357
357
|
useAccordionStyles: () => import_react3.useAccordionStyles,
|
358
358
|
useAlertStyles: () => useAlertStyles,
|
359
|
-
useBoolean: () =>
|
360
|
-
useBreakpoint: () =>
|
361
|
-
useCheckbox: () =>
|
362
|
-
useCheckboxGroup: () =>
|
363
|
-
useClipboard: () =>
|
364
|
-
useColorMode: () =>
|
365
|
-
useColorModePreference: () =>
|
366
|
-
useColorModeValue: () =>
|
367
|
-
useConst: () =>
|
368
|
-
useControllableProp: () =>
|
369
|
-
useControllableState: () =>
|
359
|
+
useBoolean: () => import_react107.useBoolean,
|
360
|
+
useBreakpoint: () => import_react95.useBreakpoint,
|
361
|
+
useCheckbox: () => import_react17.useCheckbox,
|
362
|
+
useCheckboxGroup: () => import_react17.useCheckboxGroup,
|
363
|
+
useClipboard: () => import_react107.useClipboard,
|
364
|
+
useColorMode: () => import_react107.useColorMode,
|
365
|
+
useColorModePreference: () => import_react95.useColorModePreference,
|
366
|
+
useColorModeValue: () => import_react107.useColorModeValue,
|
367
|
+
useConst: () => import_react107.useConst,
|
368
|
+
useControllableProp: () => import_react107.useControllableProp,
|
369
|
+
useControllableState: () => import_react107.useControllableState,
|
370
370
|
useDataTable: () => useDataTable,
|
371
|
-
useDimensions: () =>
|
372
|
-
useDisclosure: () =>
|
373
|
-
useDrawerContext: () =>
|
371
|
+
useDimensions: () => import_react107.useDimensions,
|
372
|
+
useDisclosure: () => import_react107.useDisclosure,
|
373
|
+
useDrawerContext: () => import_react58.useDrawerContext,
|
374
374
|
useFetcher: () => useFetcher,
|
375
|
-
useImage: () =>
|
375
|
+
useImage: () => import_react95.useImage,
|
376
376
|
useInternalUI: () => useInternalUI,
|
377
|
-
useMergeRefs: () =>
|
378
|
-
useModal: () =>
|
379
|
-
useModalContext: () =>
|
380
|
-
useModalStyles: () =>
|
381
|
-
useOutsideClick: () =>
|
382
|
-
usePinInput: () =>
|
383
|
-
usePinInputContext: () =>
|
384
|
-
usePinInputField: () =>
|
385
|
-
useProgressStyles: () =>
|
386
|
-
useQuery: () =>
|
387
|
-
useRadio: () =>
|
388
|
-
useRadioGroup: () =>
|
389
|
-
useRadioGroupContext: () =>
|
377
|
+
useMergeRefs: () => import_react107.useMergeRefs,
|
378
|
+
useModal: () => import_react58.useModal,
|
379
|
+
useModalContext: () => import_react58.useModalContext,
|
380
|
+
useModalStyles: () => import_react58.useModalStyles,
|
381
|
+
useOutsideClick: () => import_react107.useOutsideClick,
|
382
|
+
usePinInput: () => import_react67.usePinInput,
|
383
|
+
usePinInputContext: () => import_react67.usePinInputContext,
|
384
|
+
usePinInputField: () => import_react67.usePinInputField,
|
385
|
+
useProgressStyles: () => import_react69.useProgressStyles,
|
386
|
+
useQuery: () => import_react95.useQuery,
|
387
|
+
useRadio: () => import_react72.useRadio,
|
388
|
+
useRadioGroup: () => import_react72.useRadioGroup,
|
389
|
+
useRadioGroupContext: () => import_react72.useRadioGroupContext,
|
390
390
|
useSelectTable: () => useSelectTable,
|
391
|
-
useSteps: () =>
|
392
|
-
useTab: () =>
|
393
|
-
useTabIndicator: () =>
|
394
|
-
useTabList: () =>
|
395
|
-
useTabPanel: () =>
|
396
|
-
useTabPanels: () =>
|
397
|
-
useTabs: () =>
|
398
|
-
useTabsContext: () =>
|
399
|
-
useTabsDescendant: () =>
|
400
|
-
useTabsDescendants: () =>
|
401
|
-
useTabsDescendantsContext: () =>
|
402
|
-
useTabsStyles: () =>
|
403
|
-
useTheme: () =>
|
391
|
+
useSteps: () => import_react95.useSteps,
|
392
|
+
useTab: () => import_react86.useTab,
|
393
|
+
useTabIndicator: () => import_react86.useTabIndicator,
|
394
|
+
useTabList: () => import_react86.useTabList,
|
395
|
+
useTabPanel: () => import_react86.useTabPanel,
|
396
|
+
useTabPanels: () => import_react86.useTabPanels,
|
397
|
+
useTabs: () => import_react86.useTabs,
|
398
|
+
useTabsContext: () => import_react86.useTabsContext,
|
399
|
+
useTabsDescendant: () => import_react86.useTabsDescendant,
|
400
|
+
useTabsDescendants: () => import_react86.useTabsDescendants,
|
401
|
+
useTabsDescendantsContext: () => import_react86.useTabsDescendantsContext,
|
402
|
+
useTabsStyles: () => import_react86.useTabsStyles,
|
403
|
+
useTheme: () => import_react107.useTheme,
|
404
404
|
useToast: () => useToast,
|
405
|
-
useToken: () =>
|
405
|
+
useToken: () => import_react107.useToken
|
406
406
|
});
|
407
407
|
module.exports = __toCommonJS(src_exports);
|
408
408
|
|
@@ -839,10 +839,40 @@ var card_default = CardCustom;
|
|
839
839
|
// src/components/checkbox/components/checkbox.tsx
|
840
840
|
var import_react13 = require("@chakra-ui/react");
|
841
841
|
var Icon = __toESM(require("@ctlyst.id/internal-icon"));
|
842
|
+
var import_react14 = require("react");
|
843
|
+
|
844
|
+
// src/utils/throttleFn.ts
|
845
|
+
var throttle = (fn, delay) => {
|
846
|
+
if (!delay) return fn;
|
847
|
+
let timeoutId;
|
848
|
+
return (val) => {
|
849
|
+
if (timeoutId) return;
|
850
|
+
fn(val);
|
851
|
+
timeoutId = setTimeout(() => {
|
852
|
+
clearTimeout(timeoutId);
|
853
|
+
timeoutId = void 0;
|
854
|
+
}, delay);
|
855
|
+
};
|
856
|
+
};
|
857
|
+
|
858
|
+
// src/components/checkbox/components/checkbox.tsx
|
842
859
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
843
860
|
var CheckboxComponent = (0, import_react13.forwardRef)(
|
844
|
-
({ isError = false, animated = false, helpText, errorText, boxProps, children, isDisabled, ...rest }, ref) => {
|
861
|
+
({ isError = false, animated = false, helpText, errorText, boxProps, children, isDisabled, throttleTime, ...rest }, ref) => {
|
845
862
|
const { state } = (0, import_react13.useCheckbox)(rest);
|
863
|
+
const [isChecked, setIsChecked] = (0, import_react14.useState)(!!rest.isChecked);
|
864
|
+
(0, import_react14.useEffect)(() => {
|
865
|
+
setIsChecked(!!rest.isChecked);
|
866
|
+
}, [rest.isChecked]);
|
867
|
+
const throttleFn = (0, import_react14.useCallback)(
|
868
|
+
throttle((val) => setIsChecked(val), throttleTime),
|
869
|
+
[]
|
870
|
+
);
|
871
|
+
const handleOnChange = (0, import_react14.useCallback)((event) => {
|
872
|
+
if (throttleTime) throttleFn(event.target.checked);
|
873
|
+
else setIsChecked(event.target.checked);
|
874
|
+
if (rest.onChange) rest.onChange(event);
|
875
|
+
}, []);
|
846
876
|
const variant = isError ? "errors" : "unstyled";
|
847
877
|
const renderIcon2 = () => {
|
848
878
|
if (state.isChecked) return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon.Check, { size: 3, color: "inherit" });
|
@@ -850,7 +880,21 @@ var CheckboxComponent = (0, import_react13.forwardRef)(
|
|
850
880
|
return void 0;
|
851
881
|
};
|
852
882
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react13.Box, { children: [
|
853
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Box, { display: "flex", ...boxProps, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Box, { display: "flex", ...boxProps, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
884
|
+
import_react13.Checkbox,
|
885
|
+
{
|
886
|
+
"data-test-id": "Ok3zwJNf_-uY5Pe3mSV4P",
|
887
|
+
variant,
|
888
|
+
ref,
|
889
|
+
...rest,
|
890
|
+
isChecked,
|
891
|
+
onChange: handleOnChange,
|
892
|
+
isDisabled,
|
893
|
+
color: "white",
|
894
|
+
icon: renderIcon2(),
|
895
|
+
children: children && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children })
|
896
|
+
}
|
897
|
+
) }),
|
854
898
|
(isError && errorText || helpText) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Box, { mt: "1", ml: "6", children: isError ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react13.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
|
855
899
|
] });
|
856
900
|
}
|
@@ -865,10 +909,10 @@ CheckboxComponent.defaultProps = {
|
|
865
909
|
var checkbox_default = CheckboxComponent;
|
866
910
|
|
867
911
|
// src/components/checkbox/components/checkbox-group.tsx
|
868
|
-
var
|
912
|
+
var import_react16 = require("@chakra-ui/react");
|
869
913
|
|
870
914
|
// src/components/field/components/field.tsx
|
871
|
-
var
|
915
|
+
var import_react15 = require("@chakra-ui/react");
|
872
916
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
873
917
|
var Field = (props) => {
|
874
918
|
const {
|
@@ -895,15 +939,15 @@ var Field = (props) => {
|
|
895
939
|
};
|
896
940
|
const helperColor = getHelperColor();
|
897
941
|
const justifyHelper = getJustifyContentHelper();
|
898
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
899
|
-
label && (typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
900
|
-
isRequired && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react15.FormControl, { isInvalid: isError, id: id2, ...boxProps, children: [
|
943
|
+
label && (typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react15.FormLabel, { mb: 1, fontSize: "text.sm", requiredIndicator: void 0, children: [
|
944
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react15.Box, { as: "span", color: "danger.500", ml: 0, mr: 1, children: "*" }),
|
901
945
|
label
|
902
946
|
] }) : label),
|
903
947
|
children,
|
904
|
-
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
905
|
-
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
906
|
-
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
948
|
+
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react15.Box, { display: "flex", width: "full", justifyContent: justifyHelper, children: [
|
949
|
+
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react15.FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: leftHelperText }) : leftHelperText) : typeof errorMessage === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react15.FormErrorMessage, { fontSize: "text.xs", color: "danger.500", mt: 1, children: errorMessage }) : errorMessage,
|
950
|
+
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react15.FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: rightHelperText }) : rightHelperText)
|
907
951
|
] })
|
908
952
|
] });
|
909
953
|
};
|
@@ -923,7 +967,7 @@ var field_default = Field;
|
|
923
967
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
924
968
|
function CheckboxGroupComponent(props) {
|
925
969
|
const { children, label, helpText, isError, errorMessage, ...rest } = props;
|
926
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(field_default, { ...rest, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(field_default, { ...rest, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react16.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react16.CheckboxGroup, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react16.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
927
971
|
}
|
928
972
|
CheckboxGroupComponent.defaultProps = {
|
929
973
|
helpText: "",
|
@@ -933,10 +977,10 @@ CheckboxGroupComponent.defaultProps = {
|
|
933
977
|
var checkbox_group_default = CheckboxGroupComponent;
|
934
978
|
|
935
979
|
// src/components/checkbox/index.ts
|
936
|
-
var
|
980
|
+
var import_react17 = require("@chakra-ui/react");
|
937
981
|
|
938
982
|
// src/components/chips/components/chips.tsx
|
939
|
-
var
|
983
|
+
var import_react18 = require("@chakra-ui/react");
|
940
984
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
941
985
|
var Chips = ({ label, size: size2, onClick, ...rest }) => {
|
942
986
|
const { isActive, isDisabled, onClose } = rest;
|
@@ -948,7 +992,7 @@ var Chips = ({ label, size: size2, onClick, ...rest }) => {
|
|
948
992
|
}
|
949
993
|
};
|
950
994
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
951
|
-
|
995
|
+
import_react18.Tag,
|
952
996
|
{
|
953
997
|
"data-test-id": "",
|
954
998
|
onClick,
|
@@ -956,8 +1000,8 @@ var Chips = ({ label, size: size2, onClick, ...rest }) => {
|
|
956
1000
|
borderRadius: "full",
|
957
1001
|
variant: isActive ? "solid" : variant,
|
958
1002
|
children: [
|
959
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
960
|
-
onClose && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react18.TagLabel, { children: label }),
|
1004
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react18.TagCloseButton, { "data-test-id": "", onClick: handleClose })
|
961
1005
|
]
|
962
1006
|
},
|
963
1007
|
size2
|
@@ -973,19 +1017,19 @@ Chips.defaultProps = {
|
|
973
1017
|
var chips_default = Chips;
|
974
1018
|
|
975
1019
|
// src/components/counter/components/counter.tsx
|
976
|
-
var
|
977
|
-
var
|
1020
|
+
var import_react27 = require("@chakra-ui/react");
|
1021
|
+
var import_react28 = require("react");
|
978
1022
|
var import_fi = require("react-icons/fi");
|
979
1023
|
|
980
1024
|
// src/components/form/components/input-addon.tsx
|
981
|
-
var
|
1025
|
+
var import_react19 = require("@chakra-ui/react");
|
982
1026
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
983
1027
|
var InputAddonLeft = ({ children, ...props }) => {
|
984
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
1028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react19.InputLeftAddon, { backgroundColor: "neutral.200", px: 3, py: 2.5, style: { border: 0, marginInlineEnd: 0 }, ...props, children });
|
985
1029
|
};
|
986
1030
|
var InputAddonRight = ({ children, ...props }) => {
|
987
1031
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
988
|
-
|
1032
|
+
import_react19.InputRightAddon,
|
989
1033
|
{
|
990
1034
|
backgroundColor: "neutral.200",
|
991
1035
|
px: 3,
|
@@ -998,15 +1042,15 @@ var InputAddonRight = ({ children, ...props }) => {
|
|
998
1042
|
};
|
999
1043
|
|
1000
1044
|
// src/components/form/components/input-element.tsx
|
1001
|
-
var import_react19 = require("@chakra-ui/react");
|
1002
1045
|
var import_react20 = require("@chakra-ui/react");
|
1046
|
+
var import_react21 = require("@chakra-ui/react");
|
1003
1047
|
|
1004
1048
|
// src/components/form/components/input-field.tsx
|
1005
|
-
var
|
1049
|
+
var import_react22 = require("@chakra-ui/react");
|
1006
1050
|
var import_internal_icon5 = require("@ctlyst.id/internal-icon");
|
1007
|
-
var
|
1051
|
+
var import_react23 = __toESM(require("react"));
|
1008
1052
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
1009
|
-
var InputField =
|
1053
|
+
var InputField = import_react23.default.forwardRef((props, ref) => {
|
1010
1054
|
const {
|
1011
1055
|
value,
|
1012
1056
|
type,
|
@@ -1039,17 +1083,17 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1039
1083
|
focusColor: focusColor2
|
1040
1084
|
};
|
1041
1085
|
};
|
1042
|
-
const [isShowPassword, setIsShowPassword] = (0,
|
1043
|
-
const inputType = (0,
|
1086
|
+
const [isShowPassword, setIsShowPassword] = (0, import_react23.useState)(false);
|
1087
|
+
const inputType = (0, import_react23.useMemo)(() => {
|
1044
1088
|
return type === "password" && isShowPassword ? "text" : type;
|
1045
1089
|
}, [isShowPassword, type]);
|
1046
|
-
const fontSize = (0,
|
1090
|
+
const fontSize = (0, import_react23.useMemo)(() => {
|
1047
1091
|
if (type === "password") {
|
1048
1092
|
if (!isShowPassword && value) return "text.xl";
|
1049
1093
|
}
|
1050
1094
|
return "text.sm";
|
1051
1095
|
}, [isShowPassword, type, value]);
|
1052
|
-
const iconColor = (0,
|
1096
|
+
const iconColor = (0, import_react23.useMemo)(() => {
|
1053
1097
|
return isDisabled ? "black.low" : "black.medium";
|
1054
1098
|
}, [isDisabled]);
|
1055
1099
|
const { outlineColor, focusColor } = getProperties();
|
@@ -1065,7 +1109,7 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1065
1109
|
rightHelperText,
|
1066
1110
|
isRequired,
|
1067
1111
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1068
|
-
|
1112
|
+
import_react22.Box,
|
1069
1113
|
{
|
1070
1114
|
transition: "all 0.15s",
|
1071
1115
|
boxShadow: "none",
|
@@ -1076,7 +1120,7 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1076
1120
|
borderColor: focusColor
|
1077
1121
|
},
|
1078
1122
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
1079
|
-
|
1123
|
+
import_react22.InputGroup,
|
1080
1124
|
{
|
1081
1125
|
size: size2,
|
1082
1126
|
borderRadius: "sm",
|
@@ -1085,7 +1129,7 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1085
1129
|
children: [
|
1086
1130
|
addOnLeft,
|
1087
1131
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1088
|
-
|
1132
|
+
import_react22.Input,
|
1089
1133
|
{
|
1090
1134
|
ref,
|
1091
1135
|
type: inputType,
|
@@ -1098,7 +1142,7 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1098
1142
|
}
|
1099
1143
|
),
|
1100
1144
|
(withClear || isLoading || type === "password") && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
1101
|
-
|
1145
|
+
import_react22.Box,
|
1102
1146
|
{
|
1103
1147
|
"data-test-id": "CT_Component_ClearInput",
|
1104
1148
|
display: "flex",
|
@@ -1108,7 +1152,7 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1108
1152
|
mr: "10px",
|
1109
1153
|
children: [
|
1110
1154
|
withClear && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1111
|
-
|
1155
|
+
import_react22.Box,
|
1112
1156
|
{
|
1113
1157
|
display: "flex",
|
1114
1158
|
justifyContent: "center",
|
@@ -1118,7 +1162,7 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1118
1162
|
}
|
1119
1163
|
),
|
1120
1164
|
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1121
|
-
|
1165
|
+
import_react22.Box,
|
1122
1166
|
{
|
1123
1167
|
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
1124
1168
|
onClick: () => {
|
@@ -1131,7 +1175,7 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1131
1175
|
}
|
1132
1176
|
),
|
1133
1177
|
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1134
|
-
|
1178
|
+
import_react22.Box,
|
1135
1179
|
{
|
1136
1180
|
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
1137
1181
|
onClick: () => {
|
@@ -1167,14 +1211,14 @@ InputField.defaultProps = {
|
|
1167
1211
|
var input_field_default = InputField;
|
1168
1212
|
|
1169
1213
|
// src/components/form/components/textarea.tsx
|
1170
|
-
var
|
1171
|
-
var
|
1214
|
+
var import_react24 = require("@chakra-ui/react");
|
1215
|
+
var import_react25 = __toESM(require("react"));
|
1172
1216
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
1173
|
-
var TextareaField =
|
1217
|
+
var TextareaField = import_react25.default.forwardRef((props, ref) => {
|
1174
1218
|
const { value, isLoading, ...inputProps } = props;
|
1175
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(field_default, { ...inputProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
1176
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
1177
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
1219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(field_default, { ...inputProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react24.Box, { position: "relative", children: [
|
1220
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react24.Textarea, { ref, value, ...inputProps }),
|
1221
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react24.Box, { zIndex: 999, top: 2, right: 2, position: "absolute", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(loader_default, { size: "sm" }) })
|
1178
1222
|
] }) });
|
1179
1223
|
});
|
1180
1224
|
TextareaField.defaultProps = {
|
@@ -1183,7 +1227,7 @@ TextareaField.defaultProps = {
|
|
1183
1227
|
var textarea_default = TextareaField;
|
1184
1228
|
|
1185
1229
|
// src/components/form/index.ts
|
1186
|
-
var
|
1230
|
+
var import_react26 = require("@chakra-ui/react");
|
1187
1231
|
|
1188
1232
|
// src/components/counter/components/counter.tsx
|
1189
1233
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
@@ -1205,7 +1249,7 @@ var Counter = ({
|
|
1205
1249
|
const increment = () => {
|
1206
1250
|
onChange(value + 1);
|
1207
1251
|
};
|
1208
|
-
const handleChangeInput = (0,
|
1252
|
+
const handleChangeInput = (0, import_react28.useCallback)(
|
1209
1253
|
(e) => {
|
1210
1254
|
const inputValue = e.target.value;
|
1211
1255
|
const cleanedInputValue = inputValue.replace(/^0+/, "") || "0";
|
@@ -1216,10 +1260,10 @@ var Counter = ({
|
|
1216
1260
|
},
|
1217
1261
|
[onChange, max, min]
|
1218
1262
|
);
|
1219
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
1220
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
1263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react27.Box, { children: [
|
1264
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react27.HStack, { gap: "1", children: [
|
1221
1265
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
1222
|
-
|
1266
|
+
import_react27.IconButton,
|
1223
1267
|
{
|
1224
1268
|
"aria-label": "minus",
|
1225
1269
|
"data-test-id": "CT_Component_Counter_decrement",
|
@@ -1249,7 +1293,7 @@ var Counter = ({
|
|
1249
1293
|
}
|
1250
1294
|
),
|
1251
1295
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
1252
|
-
|
1296
|
+
import_react27.IconButton,
|
1253
1297
|
{
|
1254
1298
|
"aria-label": "plus",
|
1255
1299
|
"data-test-id": "CT_Component_Counter_decrement",
|
@@ -1260,20 +1304,21 @@ var Counter = ({
|
|
1260
1304
|
}
|
1261
1305
|
)
|
1262
1306
|
] }),
|
1263
|
-
!isError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
1307
|
+
!isError ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react27.Text, { mt: 1, color: "black.medium", textStyle: "text.xs", children: helperText }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react27.Text, { mt: 1, color: "danger.500", textStyle: "text.xs", children: error })
|
1264
1308
|
] });
|
1265
1309
|
};
|
1266
1310
|
var counter_default = Counter;
|
1267
1311
|
|
1268
1312
|
// src/components/data-table/components/data-table.tsx
|
1269
1313
|
var import_icons2 = require("@chakra-ui/icons");
|
1270
|
-
var
|
1271
|
-
var
|
1314
|
+
var import_react30 = require("@chakra-ui/react");
|
1315
|
+
var import_react31 = require("@emotion/react");
|
1272
1316
|
var import_react_table = require("@tanstack/react-table");
|
1273
1317
|
var React5 = __toESM(require("react"));
|
1318
|
+
var import_react32 = require("react");
|
1274
1319
|
|
1275
1320
|
// src/hooks/use-drag-threshold/use-drag-or-click.ts
|
1276
|
-
var
|
1321
|
+
var import_react29 = require("react");
|
1277
1322
|
|
1278
1323
|
// src/hooks/use-drag-threshold/drag-threshold.ts
|
1279
1324
|
var DragThreshold = class {
|
@@ -1316,7 +1361,7 @@ var DragThreshold = class {
|
|
1316
1361
|
|
1317
1362
|
// src/hooks/use-drag-threshold/use-drag-or-click.ts
|
1318
1363
|
var useDragOrClick = () => {
|
1319
|
-
const clickOrDragged = (0,
|
1364
|
+
const clickOrDragged = (0, import_react29.useRef)(new DragThreshold());
|
1320
1365
|
const getDragOrClickProps = ({
|
1321
1366
|
onClick,
|
1322
1367
|
onMouseDown,
|
@@ -1428,13 +1473,19 @@ var useDataTable = ({
|
|
1428
1473
|
const [sorting, setSorting] = React5.useState(sortingState != null ? sortingState : []);
|
1429
1474
|
const dataColumns = React5.useMemo(() => columns, [columns]);
|
1430
1475
|
const action = React5.useRef("");
|
1476
|
+
const throttleRowClick = (0, import_react32.useCallback)(
|
1477
|
+
throttle((row) => {
|
1478
|
+
row.toggleSelected();
|
1479
|
+
}, 250),
|
1480
|
+
[]
|
1481
|
+
);
|
1431
1482
|
const checkboxColumn = React5.useMemo(
|
1432
1483
|
() => [
|
1433
1484
|
{
|
1434
1485
|
id: "select",
|
1435
1486
|
size: 32,
|
1436
|
-
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1437
|
-
|
1487
|
+
header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1488
|
+
checkbox_default,
|
1438
1489
|
{
|
1439
1490
|
"data-test-id": "select-header-data-table",
|
1440
1491
|
...{
|
@@ -1460,19 +1511,20 @@ var useDataTable = ({
|
|
1460
1511
|
}
|
1461
1512
|
}
|
1462
1513
|
) }),
|
1463
|
-
cell: ({ row }) =>
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1514
|
+
cell: ({ row }) => {
|
1515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Flex, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1516
|
+
checkbox_default,
|
1517
|
+
{
|
1518
|
+
"data-test-id": `select-data-table-${row.index}`,
|
1468
1519
|
isChecked: row.getIsSelected(),
|
1469
|
-
isIndeterminate: row.getIsSomeSelected()
|
1520
|
+
isIndeterminate: row.getIsSomeSelected(),
|
1521
|
+
onChange: () => throttleRowClick(row)
|
1470
1522
|
}
|
1471
|
-
}
|
1472
|
-
|
1523
|
+
) });
|
1524
|
+
}
|
1473
1525
|
}
|
1474
1526
|
],
|
1475
|
-
[
|
1527
|
+
[]
|
1476
1528
|
);
|
1477
1529
|
const generateColumn = () => {
|
1478
1530
|
if (withSelectedRow) {
|
@@ -1524,7 +1576,8 @@ var useDataTable = ({
|
|
1524
1576
|
table,
|
1525
1577
|
action,
|
1526
1578
|
toggleAllRowsSelected,
|
1527
|
-
generateColumn
|
1579
|
+
generateColumn,
|
1580
|
+
throttleRowClick
|
1528
1581
|
};
|
1529
1582
|
};
|
1530
1583
|
var DataTable = React5.forwardRef((props, ref) => {
|
@@ -1544,7 +1597,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1544
1597
|
paddingRowX = 8
|
1545
1598
|
} = props;
|
1546
1599
|
const { clickOrDragged, getDragOrClickProps } = useDragOrClick();
|
1547
|
-
const { table, action, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1600
|
+
const { table, action, throttleRowClick, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1548
1601
|
const refTable = React5.useRef(null);
|
1549
1602
|
React5.useImperativeHandle(ref, () => ({
|
1550
1603
|
toggleAllRowsSelected
|
@@ -1601,7 +1654,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1601
1654
|
return { width: `${header.getSize()}px` };
|
1602
1655
|
};
|
1603
1656
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1604
|
-
|
1657
|
+
import_react30.Box,
|
1605
1658
|
{
|
1606
1659
|
overflowX: "auto",
|
1607
1660
|
overflowY: "hidden",
|
@@ -1611,15 +1664,15 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1611
1664
|
ref: refTable,
|
1612
1665
|
...((_e = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _e.length) && hasScroll ? { "data-pin-right": true } : {},
|
1613
1666
|
...container,
|
1614
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1615
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1616
|
-
|
1667
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react30.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
1668
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.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_react30.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1669
|
+
import_react30.Th,
|
1617
1670
|
{
|
1618
1671
|
colSpan: header.colSpan,
|
1619
1672
|
width: `${header.getSize()}px`,
|
1620
1673
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1621
1674
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1622
|
-
|
1675
|
+
import_react30.Flex,
|
1623
1676
|
{
|
1624
1677
|
"data-test-id": "CT_component_data-table_loader",
|
1625
1678
|
textTransform: "capitalize",
|
@@ -1631,20 +1684,20 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1631
1684
|
},
|
1632
1685
|
header.id
|
1633
1686
|
)) }, headerGroup.id)) }),
|
1634
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1635
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1687
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Td, { width: 210, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i) }, i)) }, num)) })
|
1688
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react30.Table, { ...styles == null ? void 0 : styles.table, children: [
|
1636
1689
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1637
|
-
|
1690
|
+
import_react30.Thead,
|
1638
1691
|
{
|
1639
1692
|
maxH: "50px",
|
1640
1693
|
...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
|
1641
|
-
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1694
|
+
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { bg: (0, import_react30.useColorModeValue)("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => {
|
1642
1695
|
var _a2, _b2;
|
1643
1696
|
if (!!((_a2 = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _a2.length) && header.column.getIsFirstColumn("right")) {
|
1644
1697
|
lastPinnedColumn = header.column.getAfter("right");
|
1645
1698
|
}
|
1646
1699
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1647
|
-
|
1700
|
+
import_react30.Th,
|
1648
1701
|
{
|
1649
1702
|
colSpan: header.colSpan,
|
1650
1703
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
@@ -1653,7 +1706,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1653
1706
|
...getTableHeaderSize(header, index, headerGroup.headers.length),
|
1654
1707
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1655
1708
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1656
|
-
|
1709
|
+
import_react30.Flex,
|
1657
1710
|
{
|
1658
1711
|
backgroundColor: "white",
|
1659
1712
|
height: "100%",
|
@@ -1668,13 +1721,13 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1668
1721
|
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1669
1722
|
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1670
1723
|
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1671
|
-
|
1724
|
+
import_react30.Box,
|
1672
1725
|
{
|
1673
1726
|
as: "span",
|
1674
1727
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1675
1728
|
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1676
1729
|
onClick: header.column.getToggleSortingHandler(),
|
1677
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1730
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
|
1678
1731
|
}
|
1679
1732
|
)
|
1680
1733
|
]
|
@@ -1686,18 +1739,18 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1686
1739
|
}) }, headerGroup.id))
|
1687
1740
|
}
|
1688
1741
|
),
|
1689
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row, index) => {
|
1690
1743
|
const isDisabledRow = disabledRow && disabledRow(row.original);
|
1691
1744
|
const isHighlightedRow = highlightedRow && highlightedRow(row.original);
|
1692
1745
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1693
|
-
|
1746
|
+
import_react30.Tr,
|
1694
1747
|
{
|
1695
1748
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
1696
1749
|
...styles == null ? void 0 : styles.tableRow,
|
1697
1750
|
sx: { ...isHighlightedRow && getTableHighlightStyle(highlightRowColor) },
|
1698
1751
|
"aria-disabled": isDisabledRow,
|
1699
1752
|
"data-highlight": isHighlightedRow ? "true" : "false",
|
1700
|
-
css:
|
1753
|
+
css: import_react31.css`
|
1701
1754
|
&:last-child {
|
1702
1755
|
td {
|
1703
1756
|
border-bottom: none;
|
@@ -1718,7 +1771,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1718
1771
|
},
|
1719
1772
|
onClick: () => {
|
1720
1773
|
action.current = "selectRow";
|
1721
|
-
if (withSelectedRow) row
|
1774
|
+
if (withSelectedRow) throttleRowClick(row);
|
1722
1775
|
if (onRowClick) {
|
1723
1776
|
if (isDisabledRow) return;
|
1724
1777
|
onRowClick(row.original);
|
@@ -1731,7 +1784,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1731
1784
|
const meta = cell.column.columnDef.meta;
|
1732
1785
|
const isDisabled = isCellDisabled(row.original, cell.column.id);
|
1733
1786
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1734
|
-
|
1787
|
+
import_react30.Td,
|
1735
1788
|
{
|
1736
1789
|
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1737
1790
|
fontSize: "text.sm",
|
@@ -1742,7 +1795,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1742
1795
|
},
|
1743
1796
|
...styles == null ? void 0 : styles.tableCell,
|
1744
1797
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1745
|
-
|
1798
|
+
import_react30.Flex,
|
1746
1799
|
{
|
1747
1800
|
tabIndex: 0,
|
1748
1801
|
height: "100%",
|
@@ -1752,7 +1805,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1752
1805
|
opacity: isDisabled ? 0.5 : 1,
|
1753
1806
|
sx: { ...meta && meta.columnStyles ? meta.columnStyles : {} },
|
1754
1807
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1755
|
-
|
1808
|
+
import_react30.Box,
|
1756
1809
|
{
|
1757
1810
|
onMouseUp: (e) => {
|
1758
1811
|
e.stopPropagation();
|
@@ -1783,9 +1836,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1783
1836
|
var data_table_default = DataTable;
|
1784
1837
|
|
1785
1838
|
// src/components/data-table/hook/use-select-table.ts
|
1786
|
-
var
|
1839
|
+
var import_react33 = __toESM(require("react"));
|
1787
1840
|
var useSelectTable = (intialRowSelection) => {
|
1788
|
-
const [rowSelection, onRowSelectionChange] =
|
1841
|
+
const [rowSelection, onRowSelectionChange] = import_react33.default.useState(intialRowSelection != null ? intialRowSelection : {});
|
1789
1842
|
return {
|
1790
1843
|
rowSelection,
|
1791
1844
|
onRowSelectionChange
|
@@ -1793,10 +1846,10 @@ var useSelectTable = (intialRowSelection) => {
|
|
1793
1846
|
};
|
1794
1847
|
|
1795
1848
|
// src/components/datepicker/components/datepicker.tsx
|
1796
|
-
var
|
1849
|
+
var import_react37 = require("@chakra-ui/react");
|
1797
1850
|
var import_shared_utils8 = require("@chakra-ui/shared-utils");
|
1798
1851
|
var import_internal_icon6 = require("@ctlyst.id/internal-icon");
|
1799
|
-
var
|
1852
|
+
var import_react38 = require("@floating-ui/react");
|
1800
1853
|
var import_react_datepicker = __toESM(require("react-datepicker"));
|
1801
1854
|
|
1802
1855
|
// ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs
|
@@ -2334,12 +2387,12 @@ id.localize.month = buildLocalizeFn2({
|
|
2334
2387
|
|
2335
2388
|
// src/components/datepicker/components/styles.tsx
|
2336
2389
|
var import_system6 = require("@chakra-ui/system");
|
2337
|
-
var
|
2390
|
+
var import_react34 = require("@emotion/react");
|
2338
2391
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
2339
2392
|
var Styles = ({ showHeader }) => {
|
2340
2393
|
const { colorMode } = (0, import_system6.useColorMode)();
|
2341
2394
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
2342
|
-
|
2395
|
+
import_react34.Global,
|
2343
2396
|
{
|
2344
2397
|
styles: `
|
2345
2398
|
@charset "UTF-8";
|
@@ -3174,21 +3227,21 @@ var Styles = ({ showHeader }) => {
|
|
3174
3227
|
var styles_default = Styles;
|
3175
3228
|
|
3176
3229
|
// src/components/datepicker/components/time-input.tsx
|
3177
|
-
var
|
3178
|
-
var
|
3230
|
+
var import_react35 = require("@chakra-ui/react");
|
3231
|
+
var import_react36 = __toESM(require("react"));
|
3179
3232
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
3180
3233
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
3181
|
-
const [time, setTime] =
|
3234
|
+
const [time, setTime] = import_react36.default.useState(value || "00:00");
|
3182
3235
|
const handleChange = (e) => {
|
3183
3236
|
var _a, _b;
|
3184
3237
|
setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
|
3185
3238
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
3186
3239
|
};
|
3187
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
3188
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3189
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
3240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react35.Flex, { flexDir: "column", p: 4, pt: 0, children: [
|
3241
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react35.Text, { mb: 2, children: label }),
|
3242
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react35.InputGroup, { alignItems: "center", borderColor: "neutral.400", children: [
|
3190
3243
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3191
|
-
|
3244
|
+
import_react35.Input,
|
3192
3245
|
{
|
3193
3246
|
onChange: handleChange,
|
3194
3247
|
type: "time",
|
@@ -3203,7 +3256,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
3203
3256
|
}
|
3204
3257
|
}
|
3205
3258
|
),
|
3206
|
-
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3259
|
+
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react35.InputRightAddon, { children: rightAddon })
|
3207
3260
|
] })
|
3208
3261
|
] });
|
3209
3262
|
};
|
@@ -3259,7 +3312,7 @@ var Datepicker = ({
|
|
3259
3312
|
},
|
3260
3313
|
selected,
|
3261
3314
|
popperModifiers: [
|
3262
|
-
(0,
|
3315
|
+
(0, import_react38.offset)(4),
|
3263
3316
|
{
|
3264
3317
|
name: "placement",
|
3265
3318
|
fn: (state) => {
|
@@ -3279,10 +3332,10 @@ var Datepicker = ({
|
|
3279
3332
|
isError,
|
3280
3333
|
name,
|
3281
3334
|
sx: props.selectsRange ? { caretColor: "transparent" } : {},
|
3282
|
-
addOnRight: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
3335
|
+
addOnRight: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react21.InputRightElement, { alignSelf: "center", bottom: 0, flexDir: "row-reverse", width: "auto", mr: 2, gap: 2, children: [
|
3283
3336
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_internal_icon6.Calendar, { size: 4, color: "neutral.400" }),
|
3284
3337
|
value && !props.disabled && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3285
|
-
|
3338
|
+
import_react37.IconButton,
|
3286
3339
|
{
|
3287
3340
|
"data-test-id": "H0rseVCzGIaqoLho-EPbu",
|
3288
3341
|
display: "flex",
|
@@ -3316,9 +3369,9 @@ var Datepicker = ({
|
|
3316
3369
|
if (props.inline) {
|
3317
3370
|
return component;
|
3318
3371
|
}
|
3319
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
3372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react37.FormControl, { "data-test-id": "CT_Component_datepicker_wrapper", isInvalid: isError, children: [
|
3320
3373
|
component,
|
3321
|
-
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3374
|
+
!isError ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react37.FormHelperText, { fontSize: "text.xs", mt: 1, children: helperText }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react37.FormErrorMessage, { fontSize: "text.xs", mt: 1, children: error })
|
3322
3375
|
] });
|
3323
3376
|
};
|
3324
3377
|
Datepicker.defaultProps = {
|
@@ -3336,18 +3389,18 @@ Datepicker.defaultProps = {
|
|
3336
3389
|
var datepicker_default = Datepicker;
|
3337
3390
|
|
3338
3391
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
3339
|
-
var
|
3340
|
-
var
|
3341
|
-
var
|
3392
|
+
var import_react39 = require("@chakra-ui/react");
|
3393
|
+
var import_react40 = require("@emotion/react");
|
3394
|
+
var import_react41 = __toESM(require("react"));
|
3342
3395
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
3343
3396
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
3344
|
-
const [date, setDate] =
|
3397
|
+
const [date, setDate] = import_react41.default.useState(null);
|
3345
3398
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3346
|
-
|
3399
|
+
import_react39.Box,
|
3347
3400
|
{
|
3348
3401
|
fontSize: "12px",
|
3349
3402
|
lineHeight: "18px",
|
3350
|
-
css:
|
3403
|
+
css: import_react40.css`
|
3351
3404
|
input[type='date']::-webkit-inner-spin-button,
|
3352
3405
|
input[type='date']::-webkit-calendar-picker-indicator {
|
3353
3406
|
display: none;
|
@@ -3358,7 +3411,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3358
3411
|
}
|
3359
3412
|
`,
|
3360
3413
|
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3361
|
-
|
3414
|
+
import_react39.Input,
|
3362
3415
|
{
|
3363
3416
|
"data-test-id": props["data-test-id"],
|
3364
3417
|
type: "date",
|
@@ -3371,7 +3424,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3371
3424
|
min,
|
3372
3425
|
max,
|
3373
3426
|
required: true,
|
3374
|
-
css:
|
3427
|
+
css: import_react40.css`
|
3375
3428
|
border: 1px solid transparent;
|
3376
3429
|
|
3377
3430
|
&:focus,
|
@@ -3395,11 +3448,11 @@ DatePickerMonth.defaultProps = {
|
|
3395
3448
|
var datepicker_month_default = DatePickerMonth;
|
3396
3449
|
|
3397
3450
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
3398
|
-
var
|
3451
|
+
var import_react42 = require("@chakra-ui/react");
|
3399
3452
|
var import_styled = __toESM(require("@emotion/styled"));
|
3400
|
-
var
|
3453
|
+
var import_react43 = __toESM(require("react"));
|
3401
3454
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
3402
|
-
var MultiDateWrapper = (0, import_styled.default)(
|
3455
|
+
var MultiDateWrapper = (0, import_styled.default)(import_react42.Box)`
|
3403
3456
|
display: flex;
|
3404
3457
|
align-items: center;
|
3405
3458
|
width: fit-content;
|
@@ -3414,7 +3467,7 @@ var MultiDatePickerMonth = ({
|
|
3414
3467
|
min = "2020-01-01",
|
3415
3468
|
max = "2020-12-31"
|
3416
3469
|
}) => {
|
3417
|
-
const [date, setDate] =
|
3470
|
+
const [date, setDate] = import_react43.default.useState([null, null]);
|
3418
3471
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(MultiDateWrapper, { isError, children: [
|
3419
3472
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3420
3473
|
datepicker_month_default,
|
@@ -3428,7 +3481,7 @@ var MultiDatePickerMonth = ({
|
|
3428
3481
|
max
|
3429
3482
|
}
|
3430
3483
|
),
|
3431
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3484
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react42.Box, { children: "-" }),
|
3432
3485
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3433
3486
|
datepicker_month_default,
|
3434
3487
|
{
|
@@ -3451,7 +3504,7 @@ MultiDatePickerMonth.defaultProps = {
|
|
3451
3504
|
var multi_datepicker_month_default = MultiDatePickerMonth;
|
3452
3505
|
|
3453
3506
|
// src/components/dialog/components/dialog.tsx
|
3454
|
-
var
|
3507
|
+
var import_react44 = require("@chakra-ui/react");
|
3455
3508
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
3456
3509
|
var Dialog = ({
|
3457
3510
|
title,
|
@@ -3462,12 +3515,12 @@ var Dialog = ({
|
|
3462
3515
|
isOverlayClickable,
|
3463
3516
|
...props
|
3464
3517
|
}) => {
|
3465
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3466
|
-
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3467
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3468
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3469
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3470
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react44.Modal, { ...props, children: [
|
3519
|
+
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react44.ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
3520
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react44.ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
3521
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react44.ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react44.Text, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
3522
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react44.ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
3523
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react44.ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
3471
3524
|
] })
|
3472
3525
|
] });
|
3473
3526
|
};
|
@@ -3482,7 +3535,7 @@ var dialog_default = Dialog;
|
|
3482
3535
|
var Icon2 = __toESM(require("@ctlyst.id/internal-icon"));
|
3483
3536
|
|
3484
3537
|
// src/components/empty-state/components/layout.tsx
|
3485
|
-
var
|
3538
|
+
var import_react45 = require("@chakra-ui/react");
|
3486
3539
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
3487
3540
|
var EmptyState = (props) => {
|
3488
3541
|
const { icon, title, description, buttonText, onClick } = props;
|
@@ -3491,13 +3544,13 @@ var EmptyState = (props) => {
|
|
3491
3544
|
onClick();
|
3492
3545
|
}
|
3493
3546
|
};
|
3494
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react45.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react45.VStack, { textAlign: "center", children: [
|
3495
3548
|
icon,
|
3496
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
3497
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3498
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3549
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react45.VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
|
3550
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react45.Text, { textStyle: "text.lg", fontWeight: "bold", children: title }),
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react45.Text, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
|
3499
3552
|
] }),
|
3500
|
-
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3553
|
+
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react45.Box, { mt: 3, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react45.Button, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
|
3501
3554
|
] }) });
|
3502
3555
|
};
|
3503
3556
|
var layout_default = EmptyState;
|
@@ -3574,28 +3627,28 @@ EmptyState2.NotAuthorize = EmptyStateNotAuthorize;
|
|
3574
3627
|
var empty_state_default = EmptyState2;
|
3575
3628
|
|
3576
3629
|
// src/components/header/components/header.tsx
|
3577
|
-
var
|
3630
|
+
var import_react52 = require("@chakra-ui/react");
|
3578
3631
|
|
3579
3632
|
// src/components/header/components/logo.tsx
|
3580
|
-
var
|
3633
|
+
var import_react46 = require("@chakra-ui/react");
|
3581
3634
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
3582
3635
|
var Logo = ({ url, imageUrl, height }) => {
|
3583
3636
|
if (url)
|
3584
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3585
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react46.Box, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react46.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" }) });
|
3638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react46.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" });
|
3586
3639
|
};
|
3587
3640
|
var XMSLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3588
|
-
|
3641
|
+
import_react46.Image,
|
3589
3642
|
{
|
3590
3643
|
height: 8,
|
3591
|
-
src: (0,
|
3644
|
+
src: (0, import_react46.useColorModeValue)("https://assets.voila.id/xms/logo-xms.jpg", "https://assets.voila.id/xms/logo-xms-dark.png")
|
3592
3645
|
}
|
3593
3646
|
);
|
3594
3647
|
var VoilaLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3595
|
-
|
3648
|
+
import_react46.Image,
|
3596
3649
|
{
|
3597
3650
|
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
3598
|
-
filter: (0,
|
3651
|
+
filter: (0, import_react46.useColorModeValue)("none", "invert(1)"),
|
3599
3652
|
maxW: 24
|
3600
3653
|
}
|
3601
3654
|
);
|
@@ -3605,16 +3658,16 @@ Logo.defaultProps = {
|
|
3605
3658
|
};
|
3606
3659
|
|
3607
3660
|
// src/components/header/components/profile.tsx
|
3608
|
-
var
|
3661
|
+
var import_react49 = require("@chakra-ui/react");
|
3609
3662
|
var import_fi2 = require("react-icons/fi");
|
3610
3663
|
|
3611
3664
|
// src/components/nav-item/components/nav-item.tsx
|
3612
|
-
var
|
3665
|
+
var import_react47 = require("@chakra-ui/react");
|
3613
3666
|
var import_shared_utils9 = require("@chakra-ui/shared-utils");
|
3614
3667
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
3615
3668
|
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
3616
3669
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
3617
|
-
|
3670
|
+
import_react47.Link,
|
3618
3671
|
{
|
3619
3672
|
"data-test-id": props["data-test-id"],
|
3620
3673
|
opacity: isDisabled ? "0.3" : "initial",
|
@@ -3654,7 +3707,7 @@ NavItem.defaultProps = {
|
|
3654
3707
|
};
|
3655
3708
|
|
3656
3709
|
// src/components/tooltip/components/tooltip.tsx
|
3657
|
-
var
|
3710
|
+
var import_react48 = require("@chakra-ui/react");
|
3658
3711
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
3659
3712
|
var Tooltip = (props) => {
|
3660
3713
|
const {
|
@@ -3667,7 +3720,7 @@ var Tooltip = (props) => {
|
|
3667
3720
|
fontWeight = "400"
|
3668
3721
|
} = props;
|
3669
3722
|
const content = ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
3670
|
-
|
3723
|
+
import_react48.PopoverContent,
|
3671
3724
|
{
|
3672
3725
|
"data-test-id": "",
|
3673
3726
|
border: "none",
|
@@ -3681,15 +3734,15 @@ var Tooltip = (props) => {
|
|
3681
3734
|
onClose();
|
3682
3735
|
},
|
3683
3736
|
children: [
|
3684
|
-
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3685
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3737
|
+
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react48.PopoverArrow, { color, bg, shadow: "none" }),
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react48.PopoverBody, { color, ...props, fontWeight, children: props.label })
|
3686
3739
|
]
|
3687
3740
|
}
|
3688
3741
|
);
|
3689
|
-
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3690
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3691
|
-
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3692
|
-
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3742
|
+
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react48.Popover, { trigger: "hover", placement: props.placement, ...props.popoverProps, children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
3743
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react48.PopoverTrigger, { children }),
|
3744
|
+
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react48.Portal, { children: content({ onClose }) }) : content({ onClose })
|
3745
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react48.Tooltip, { ...props, children });
|
3693
3746
|
};
|
3694
3747
|
|
3695
3748
|
// src/components/header/components/profile.tsx
|
@@ -3705,10 +3758,10 @@ var Profile = ({
|
|
3705
3758
|
...props
|
3706
3759
|
}) => {
|
3707
3760
|
var _a, _b;
|
3708
|
-
const { isOpen, onToggle, onClose } = (0,
|
3709
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3761
|
+
const { isOpen, onToggle, onClose } = (0, import_react49.useDisclosure)();
|
3762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react49.Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
3710
3763
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3711
|
-
|
3764
|
+
import_react49.Box,
|
3712
3765
|
{
|
3713
3766
|
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
3714
3767
|
as: "button",
|
@@ -3724,14 +3777,14 @@ var Profile = ({
|
|
3724
3777
|
onClick: onToggle,
|
3725
3778
|
color,
|
3726
3779
|
...props,
|
3727
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3728
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3729
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3730
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react49.HStack, { children: [
|
3781
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react49.VStack, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
|
3782
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react49.Flex, { alignItems: "center", children: [
|
3731
3784
|
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
3732
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
3733
3786
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3734
|
-
|
3787
|
+
import_react49.Box,
|
3735
3788
|
{
|
3736
3789
|
className: "catalyst_header-profile-divider",
|
3737
3790
|
h: "3",
|
@@ -3741,17 +3794,17 @@ var Profile = ({
|
|
3741
3794
|
}
|
3742
3795
|
)
|
3743
3796
|
] }),
|
3744
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3745
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3797
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react49.Flex, { align: "center", justify: "center", children: [
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { textStyle: "text.xs", children: data.office[0] }),
|
3746
3799
|
data.office.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3747
3800
|
Tooltip,
|
3748
3801
|
{
|
3749
3802
|
isInteractive: true,
|
3750
3803
|
hasArrow: true,
|
3751
3804
|
p: "2",
|
3752
|
-
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3753
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3754
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3805
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react49.Box, { children: [
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { children: "Akses Office:" }),
|
3807
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { children: data.office.sort().join(", ") })
|
3755
3808
|
] }),
|
3756
3809
|
textAlign: "left",
|
3757
3810
|
placement: "bottom-end",
|
@@ -3762,7 +3815,7 @@ var Profile = ({
|
|
3762
3815
|
},
|
3763
3816
|
width: 300,
|
3764
3817
|
...officeContainer,
|
3765
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3818
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3766
3819
|
badge_default,
|
3767
3820
|
{
|
3768
3821
|
rounded: "full",
|
@@ -3779,18 +3832,18 @@ var Profile = ({
|
|
3779
3832
|
) })
|
3780
3833
|
}
|
3781
3834
|
)
|
3782
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3835
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
3783
3836
|
] })
|
3784
3837
|
] }),
|
3785
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3838
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Box, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Avatar, { size: "sm", bg: brandColor, color: "white", name: (_b = data == null ? void 0 : data.name) != null ? _b : data == null ? void 0 : data.email }) }) })
|
3786
3839
|
] })
|
3787
3840
|
}
|
3788
3841
|
),
|
3789
|
-
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3790
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3791
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3842
|
+
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react49.PopoverContent, { bg: "white", maxW: 200, children: [
|
3843
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.PopoverArrow, { bg: "white" }),
|
3844
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.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_react49.Box, { display: "flex", alignItems: "center", children: [
|
3792
3845
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_fi2.FiPower, {}),
|
3793
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { ml: "2", children: "Logout" })
|
3794
3847
|
] }) }) })
|
3795
3848
|
] })
|
3796
3849
|
] });
|
@@ -3803,17 +3856,17 @@ Profile.defaultProps = {
|
|
3803
3856
|
};
|
3804
3857
|
|
3805
3858
|
// src/components/header/components/switch-mode.tsx
|
3806
|
-
var
|
3859
|
+
var import_react50 = require("@chakra-ui/react");
|
3807
3860
|
var import_fi3 = require("react-icons/fi");
|
3808
3861
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
3809
3862
|
var SwitchMode = () => {
|
3810
|
-
const { colorMode, toggleColorMode } = (0,
|
3811
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
3863
|
+
const { colorMode, toggleColorMode } = (0, import_react50.useColorMode)();
|
3864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react50.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 }) });
|
3812
3865
|
};
|
3813
3866
|
var switch_mode_default = SwitchMode;
|
3814
3867
|
|
3815
3868
|
// src/components/header/components/version.tsx
|
3816
|
-
var
|
3869
|
+
var import_react51 = require("@chakra-ui/react");
|
3817
3870
|
|
3818
3871
|
// src/components/header/utils/formatter.ts
|
3819
3872
|
function environmentName(env) {
|
@@ -3851,7 +3904,7 @@ var Version = ({
|
|
3851
3904
|
}
|
3852
3905
|
) : version,
|
3853
3906
|
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
3854
|
-
|
3907
|
+
import_react51.Box,
|
3855
3908
|
{
|
3856
3909
|
background: "primary.50",
|
3857
3910
|
color: "primary.500",
|
@@ -3891,8 +3944,8 @@ var Header = ({
|
|
3891
3944
|
bg = "white",
|
3892
3945
|
versionStyle,
|
3893
3946
|
...props
|
3894
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3895
|
-
|
3947
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react52.Flex, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3948
|
+
import_react52.Flex,
|
3896
3949
|
{
|
3897
3950
|
h: "auto",
|
3898
3951
|
w: "full",
|
@@ -3900,11 +3953,11 @@ var Header = ({
|
|
3900
3953
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
3901
3954
|
pos: "relative",
|
3902
3955
|
children: [
|
3903
|
-
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3956
|
+
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react52.Flex, { alignItems: "center", children: [
|
3904
3957
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
3905
3958
|
children && children
|
3906
3959
|
] }),
|
3907
|
-
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3960
|
+
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react52.HStack, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
3908
3961
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
3909
3962
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3910
3963
|
Version,
|
@@ -3917,7 +3970,7 @@ var Header = ({
|
|
3917
3970
|
}
|
3918
3971
|
)
|
3919
3972
|
] }),
|
3920
|
-
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3973
|
+
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react52.Flex, { alignItems: "center", children: [
|
3921
3974
|
!hideSwitchMode && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(switch_mode_default, {}),
|
3922
3975
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Profile, { color: props.color, brandColor, data, onLogout })
|
3923
3976
|
] })
|
@@ -3941,11 +3994,11 @@ Header.defaultProps = {
|
|
3941
3994
|
};
|
3942
3995
|
|
3943
3996
|
// src/components/header/components/navbar.tsx
|
3944
|
-
var
|
3997
|
+
var import_react53 = require("@chakra-ui/react");
|
3945
3998
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
3946
3999
|
var Navbar = ({ bg = "white", children, ...props }) => {
|
3947
4000
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
3948
|
-
|
4001
|
+
import_react53.Flex,
|
3949
4002
|
{
|
3950
4003
|
minH: "15",
|
3951
4004
|
h: "15",
|
@@ -3965,21 +4018,21 @@ var Navbar = ({ bg = "white", children, ...props }) => {
|
|
3965
4018
|
Navbar.displayName = "Navbar";
|
3966
4019
|
|
3967
4020
|
// src/components/image/index.ts
|
3968
|
-
var
|
4021
|
+
var import_react54 = require("@chakra-ui/react");
|
3969
4022
|
|
3970
4023
|
// src/components/layouting/index.ts
|
3971
|
-
var
|
4024
|
+
var import_react55 = require("@chakra-ui/react");
|
3972
4025
|
|
3973
4026
|
// src/components/list/index.tsx
|
3974
|
-
var
|
4027
|
+
var import_react56 = require("@chakra-ui/react");
|
3975
4028
|
|
3976
4029
|
// src/components/modal/components/modal-back-button.tsx
|
3977
4030
|
var import_icons3 = require("@chakra-ui/icons");
|
3978
|
-
var
|
4031
|
+
var import_react57 = require("@chakra-ui/react");
|
3979
4032
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
3980
4033
|
var ModalBackButton = ({ onClick }) => {
|
3981
4034
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
3982
|
-
|
4035
|
+
import_react57.IconButton,
|
3983
4036
|
{
|
3984
4037
|
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons3.ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
3985
4038
|
size: "sm",
|
@@ -3999,12 +4052,12 @@ var ModalBackButton = ({ onClick }) => {
|
|
3999
4052
|
var modal_back_button_default = ModalBackButton;
|
4000
4053
|
|
4001
4054
|
// src/components/modal/index.ts
|
4002
|
-
var
|
4055
|
+
var import_react58 = require("@chakra-ui/react");
|
4003
4056
|
|
4004
4057
|
// src/components/navigation/components/navigation.tsx
|
4005
|
-
var
|
4058
|
+
var import_react59 = require("@chakra-ui/react");
|
4006
4059
|
var Icon5 = __toESM(require("@ctlyst.id/internal-icon"));
|
4007
|
-
var
|
4060
|
+
var import_react60 = require("@emotion/react");
|
4008
4061
|
|
4009
4062
|
// src/components/navigation/components/mapping-icon.tsx
|
4010
4063
|
var Icon4 = __toESM(require("@ctlyst.id/internal-icon"));
|
@@ -4027,8 +4080,8 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
4027
4080
|
// src/components/navigation/components/navigation.tsx
|
4028
4081
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
4029
4082
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
4030
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4031
|
-
|
4083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react59.Box, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4084
|
+
import_react59.Flex,
|
4032
4085
|
{
|
4033
4086
|
bg: "white",
|
4034
4087
|
w: "full",
|
@@ -4042,9 +4095,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4042
4095
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
4043
4096
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
4044
4097
|
const activeBg = isActive ? "primary.500" : void 0;
|
4045
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4046
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4047
|
-
|
4098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react59.Popover, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
4099
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react59.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4100
|
+
import_react59.Button,
|
4048
4101
|
{
|
4049
4102
|
h: 7.5,
|
4050
4103
|
p: 2,
|
@@ -4061,10 +4114,10 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4061
4114
|
children: navigation.title
|
4062
4115
|
}
|
4063
4116
|
) }),
|
4064
|
-
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4065
|
-
|
4117
|
+
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react59.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react59.Box, { zIndex: "popover", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4118
|
+
import_react59.PopoverContent,
|
4066
4119
|
{
|
4067
|
-
bg: (0,
|
4120
|
+
bg: (0, import_react59.useColorModeValue)("white", "ebony-clay.800"),
|
4068
4121
|
maxW: 250,
|
4069
4122
|
border: "none",
|
4070
4123
|
borderRadius: "md",
|
@@ -4074,7 +4127,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4074
4127
|
const isLocalLink = host === navHost;
|
4075
4128
|
const isActiveSub = activePath === navLink;
|
4076
4129
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4077
|
-
|
4130
|
+
import_react59.Link,
|
4078
4131
|
{
|
4079
4132
|
as: isLocalLink ? as : void 0,
|
4080
4133
|
href: link,
|
@@ -4082,7 +4135,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4082
4135
|
textDecoration: "none"
|
4083
4136
|
},
|
4084
4137
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
4085
|
-
|
4138
|
+
import_react59.Box,
|
4086
4139
|
{
|
4087
4140
|
display: "flex",
|
4088
4141
|
position: "relative",
|
@@ -4090,24 +4143,24 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4090
4143
|
cursor: "pointer",
|
4091
4144
|
transition: "padding 0.35s ease 0s",
|
4092
4145
|
_hover: {
|
4093
|
-
backgroundColor: (0,
|
4094
|
-
color: (0,
|
4146
|
+
backgroundColor: (0, import_react59.useColorModeValue)("dove-gray.50", "mirage.900"),
|
4147
|
+
color: (0, import_react59.useColorModeValue)("primary.500", "dove-gray.600"),
|
4095
4148
|
px: 5,
|
4096
4149
|
py: 4,
|
4097
4150
|
_first: { borderTopRadius: "md" },
|
4098
4151
|
_last: { borderBottomRadius: "md" }
|
4099
4152
|
},
|
4100
4153
|
color: isActiveSub ? "primary.500" : "inherit",
|
4101
|
-
css:
|
4154
|
+
css: import_react60.css`
|
4102
4155
|
border-spacing: 4px;
|
4103
4156
|
`,
|
4104
4157
|
px: 6,
|
4105
4158
|
py: 4,
|
4106
4159
|
children: [
|
4107
4160
|
mappingIcon.get(navigation.title),
|
4108
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4161
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react59.Text, { fontSize: "text.sm", ml: 3, children: title }),
|
4109
4162
|
isActiveSub && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4110
|
-
|
4163
|
+
import_react59.Box,
|
4111
4164
|
{
|
4112
4165
|
width: 0.5,
|
4113
4166
|
height: 8,
|
@@ -4140,7 +4193,7 @@ Navigation.defaultProps = {
|
|
4140
4193
|
var navigation_default = Navigation;
|
4141
4194
|
|
4142
4195
|
// src/components/navigation/components/navigation-bar.tsx
|
4143
|
-
var
|
4196
|
+
var import_react61 = require("@chakra-ui/react");
|
4144
4197
|
var Icon6 = __toESM(require("@ctlyst.id/internal-icon"));
|
4145
4198
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
4146
4199
|
var NavigationBar = ({
|
@@ -4157,8 +4210,8 @@ var NavigationBar = ({
|
|
4157
4210
|
}
|
4158
4211
|
return subMenu.navHost + subMenu.navLink;
|
4159
4212
|
};
|
4160
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4161
|
-
|
4213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react61.Box, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4214
|
+
import_react61.Flex,
|
4162
4215
|
{
|
4163
4216
|
bg: "white",
|
4164
4217
|
w: "full",
|
@@ -4174,9 +4227,9 @@ var NavigationBar = ({
|
|
4174
4227
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
4175
4228
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
4176
4229
|
const activeBg = isActive ? "primary.500" : void 0;
|
4177
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4178
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4179
|
-
|
4230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react61.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: [
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react61.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4232
|
+
import_react61.Button,
|
4180
4233
|
{
|
4181
4234
|
h: 7.5,
|
4182
4235
|
p: 2,
|
@@ -4193,8 +4246,8 @@ var NavigationBar = ({
|
|
4193
4246
|
children: item.title
|
4194
4247
|
}
|
4195
4248
|
) }),
|
4196
|
-
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4197
|
-
|
4249
|
+
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react61.PopoverContent, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
4250
|
+
import_react61.Link,
|
4198
4251
|
{
|
4199
4252
|
href: urlMenu(subMenu),
|
4200
4253
|
display: "flex",
|
@@ -4211,7 +4264,7 @@ var NavigationBar = ({
|
|
4211
4264
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
4212
4265
|
children: [
|
4213
4266
|
mappingIcon2.get(item.title),
|
4214
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4267
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react61.Text, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
4215
4268
|
]
|
4216
4269
|
},
|
4217
4270
|
subMenu.id
|
@@ -4228,18 +4281,18 @@ var navigation_bar_default = NavigationBar;
|
|
4228
4281
|
|
4229
4282
|
// src/components/pagination/components/pagination.tsx
|
4230
4283
|
var import_icons4 = require("@chakra-ui/icons");
|
4231
|
-
var
|
4284
|
+
var import_react64 = require("@chakra-ui/react");
|
4232
4285
|
|
4233
4286
|
// src/components/pagination/components/pagination-button.tsx
|
4234
|
-
var
|
4287
|
+
var import_react62 = require("@chakra-ui/react");
|
4235
4288
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
4236
|
-
var PaginationButton = (0,
|
4237
|
-
const btnBg = (0,
|
4238
|
-
const btnColor = (0,
|
4239
|
-
const btnNotActiveBg = (0,
|
4240
|
-
const btnNotActiveColor = (0,
|
4289
|
+
var PaginationButton = (0, import_react62.forwardRef)(({ className, style, isActive, children, ...rest }, ref) => {
|
4290
|
+
const btnBg = (0, import_react62.useColorModeValue)("neutral.300", "mirage.900");
|
4291
|
+
const btnColor = (0, import_react62.useColorModeValue)("black.high", "primary.300");
|
4292
|
+
const btnNotActiveBg = (0, import_react62.useColorModeValue)("secondary.50", "primary.500");
|
4293
|
+
const btnNotActiveColor = (0, import_react62.useColorModeValue)("primary.500", "white");
|
4241
4294
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
4242
|
-
|
4295
|
+
import_react62.Button,
|
4243
4296
|
{
|
4244
4297
|
"data-test-id": "Pagination-Button",
|
4245
4298
|
ref,
|
@@ -4264,7 +4317,7 @@ var PaginationButton = (0, import_react60.forwardRef)(({ className, style, isAct
|
|
4264
4317
|
color: "neutral.300"
|
4265
4318
|
},
|
4266
4319
|
_disabled: {
|
4267
|
-
background: (0,
|
4320
|
+
background: (0, import_react62.useColorModeValue)("neutral.300", "mirage.900"),
|
4268
4321
|
color: "neutral.600",
|
4269
4322
|
pointerEvents: "none"
|
4270
4323
|
},
|
@@ -4280,7 +4333,7 @@ PaginationButton.defaultProps = {
|
|
4280
4333
|
var pagination_button_default = PaginationButton;
|
4281
4334
|
|
4282
4335
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
4283
|
-
var
|
4336
|
+
var import_react63 = require("@chakra-ui/react");
|
4284
4337
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
4285
4338
|
var PaginationButtonTrigger = ({
|
4286
4339
|
color,
|
@@ -4289,7 +4342,7 @@ var PaginationButtonTrigger = ({
|
|
4289
4342
|
visuallyHidden,
|
4290
4343
|
icon
|
4291
4344
|
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
4292
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
4345
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react63.VisuallyHidden, { children: visuallyHidden }),
|
4293
4346
|
icon
|
4294
4347
|
] });
|
4295
4348
|
PaginationButtonTrigger.defaultProps = {
|
@@ -4304,8 +4357,8 @@ var pagination_button_trigger_default = PaginationButtonTrigger;
|
|
4304
4357
|
// src/components/pagination/components/pagination.tsx
|
4305
4358
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
4306
4359
|
var Pagination = ({ className, current, total, onSelect }) => {
|
4307
|
-
const btnColorDisabled = (0,
|
4308
|
-
const btnColor = (0,
|
4360
|
+
const btnColorDisabled = (0, import_react64.useColorModeValue)("secondary.100", "primary.500");
|
4361
|
+
const btnColor = (0, import_react64.useColorModeValue)("primary.500", "secondary.100");
|
4309
4362
|
const disabledPrevious = current === 1;
|
4310
4363
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
4311
4364
|
const disabledNext = current === total;
|
@@ -4332,8 +4385,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4332
4385
|
}
|
4333
4386
|
return pageButtons;
|
4334
4387
|
};
|
4335
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4336
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react64.Box, { className, display: "inline-flex", alignItems: "center", children: [
|
4389
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react64.Box, { mr: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4337
4390
|
pagination_button_trigger_default,
|
4338
4391
|
{
|
4339
4392
|
"data-test-id": "Pagination-Button",
|
@@ -4344,7 +4397,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4344
4397
|
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons4.ArrowLeftIcon, { width: 2 })
|
4345
4398
|
}
|
4346
4399
|
) }),
|
4347
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4400
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react64.Box, { bg: "neutral.300", borderRadius: "full", children: [
|
4348
4401
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4349
4402
|
pagination_button_trigger_default,
|
4350
4403
|
{
|
@@ -4363,7 +4416,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4363
4416
|
"data-test-id": "Pagination-Button",
|
4364
4417
|
isActive: page === current,
|
4365
4418
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
4366
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react64.Text, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
4367
4420
|
},
|
4368
4421
|
page
|
4369
4422
|
);
|
@@ -4380,7 +4433,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4380
4433
|
}
|
4381
4434
|
)
|
4382
4435
|
] }),
|
4383
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4436
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react64.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4384
4437
|
pagination_button_trigger_default,
|
4385
4438
|
{
|
4386
4439
|
"data-test-id": "Pagination-Button",
|
@@ -4401,7 +4454,7 @@ Pagination.displayName = "Pagination";
|
|
4401
4454
|
var pagination_default = Pagination;
|
4402
4455
|
|
4403
4456
|
// src/components/pagination/components/pagination-detail.tsx
|
4404
|
-
var
|
4457
|
+
var import_react65 = require("@chakra-ui/react");
|
4405
4458
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
4406
4459
|
var PaginationDetail = ({
|
4407
4460
|
page,
|
@@ -4412,12 +4465,12 @@ var PaginationDetail = ({
|
|
4412
4465
|
lineHeight = 18,
|
4413
4466
|
...rest
|
4414
4467
|
}) => {
|
4415
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
4468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react65.Text, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
4416
4469
|
};
|
4417
4470
|
var pagination_detail_default = PaginationDetail;
|
4418
4471
|
|
4419
4472
|
// src/components/pagination/components/pagination-filter.tsx
|
4420
|
-
var
|
4473
|
+
var import_react66 = require("@chakra-ui/react");
|
4421
4474
|
var React10 = __toESM(require("react"));
|
4422
4475
|
var import_fi4 = require("react-icons/fi");
|
4423
4476
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
@@ -4429,10 +4482,10 @@ var PaginationFilter = ({
|
|
4429
4482
|
...rest
|
4430
4483
|
}) => {
|
4431
4484
|
const [value, setValue] = React10.useState(limit);
|
4432
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
4433
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react66.Box, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
4486
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react66.Text, { fontSize: "text.sm", lineHeight: 18, color: (0, import_react66.useColorModeValue)("neutral.900", "white"), ...rest, children: label }),
|
4434
4487
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4435
|
-
|
4488
|
+
import_react66.Select,
|
4436
4489
|
{
|
4437
4490
|
textAlign: "center",
|
4438
4491
|
size: "xs",
|
@@ -4462,22 +4515,22 @@ PaginationFilter.defaultProps = {
|
|
4462
4515
|
var pagination_filter_default = PaginationFilter;
|
4463
4516
|
|
4464
4517
|
// src/components/pin-input/index.ts
|
4465
|
-
var
|
4518
|
+
var import_react67 = require("@chakra-ui/react");
|
4466
4519
|
|
4467
4520
|
// src/components/popover/index.ts
|
4468
|
-
var
|
4521
|
+
var import_react68 = require("@chakra-ui/react");
|
4469
4522
|
|
4470
4523
|
// src/components/progress/index.ts
|
4471
|
-
var
|
4524
|
+
var import_react69 = require("@chakra-ui/react");
|
4472
4525
|
|
4473
4526
|
// src/components/radio/components/radio.tsx
|
4474
|
-
var
|
4527
|
+
var import_react70 = require("@chakra-ui/react");
|
4475
4528
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
4476
4529
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
4477
4530
|
const variant = isError ? "errors" : "unstyled";
|
4478
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
4479
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
4480
|
-
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
4531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react70.Box, { children: [
|
4532
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react70.Box, { display: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react70.Radio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react70.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
4533
|
+
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react70.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react70.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react70.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react70.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
4481
4534
|
] });
|
4482
4535
|
};
|
4483
4536
|
Radio.displayName = "Radio";
|
@@ -4488,7 +4541,7 @@ Radio.defaultProps = {
|
|
4488
4541
|
};
|
4489
4542
|
|
4490
4543
|
// src/components/radio/components/radio-group.tsx
|
4491
|
-
var
|
4544
|
+
var import_react71 = require("@chakra-ui/react");
|
4492
4545
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
4493
4546
|
var RadioGroup = ({
|
4494
4547
|
children,
|
@@ -4498,7 +4551,7 @@ var RadioGroup = ({
|
|
4498
4551
|
errorMessage,
|
4499
4552
|
...props
|
4500
4553
|
}) => {
|
4501
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
4554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react71.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react71.RadioGroup, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react71.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
4502
4555
|
};
|
4503
4556
|
RadioGroup.displayName = "RadioGroup";
|
4504
4557
|
RadioGroup.defaultProps = {
|
@@ -4508,34 +4561,34 @@ RadioGroup.defaultProps = {
|
|
4508
4561
|
};
|
4509
4562
|
|
4510
4563
|
// src/components/radio/index.ts
|
4511
|
-
var
|
4564
|
+
var import_react72 = require("@chakra-ui/react");
|
4512
4565
|
|
4513
4566
|
// src/components/rating/components/rating.tsx
|
4514
|
-
var
|
4567
|
+
var import_react73 = require("@chakra-ui/react");
|
4515
4568
|
var import_internal_icon7 = require("@ctlyst.id/internal-icon");
|
4516
4569
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
4517
4570
|
var Rating = ({ value }) => {
|
4518
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
4571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react73.Grid, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_internal_icon7.Rating, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
4519
4572
|
};
|
4520
4573
|
var rating_default = Rating;
|
4521
4574
|
|
4522
4575
|
// src/components/select/components/select.tsx
|
4523
|
-
var
|
4576
|
+
var import_react77 = require("@chakra-ui/react");
|
4524
4577
|
var import_system7 = require("@chakra-ui/system");
|
4525
4578
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4526
4579
|
var import_react_select = __toESM(require("react-select"));
|
4527
4580
|
|
4528
4581
|
// src/config/theme/foundations/shadows.ts
|
4529
|
-
var
|
4582
|
+
var import_react74 = require("@chakra-ui/react");
|
4530
4583
|
var shadows = {
|
4531
|
-
...
|
4584
|
+
...import_react74.theme.shadows,
|
4532
4585
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4533
4586
|
};
|
4534
4587
|
|
4535
4588
|
// src/config/theme/foundations/sizes.ts
|
4536
|
-
var
|
4589
|
+
var import_react75 = require("@chakra-ui/react");
|
4537
4590
|
var sizes = {
|
4538
|
-
...
|
4591
|
+
...import_react75.theme.sizes,
|
4539
4592
|
4.5: "1.125rem",
|
4540
4593
|
9.5: "2.375rem",
|
4541
4594
|
18: "4.5rem",
|
@@ -4545,9 +4598,9 @@ var sizes = {
|
|
4545
4598
|
};
|
4546
4599
|
|
4547
4600
|
// src/config/theme/foundations/spacing.ts
|
4548
|
-
var
|
4601
|
+
var import_react76 = require("@chakra-ui/react");
|
4549
4602
|
var spacing = {
|
4550
|
-
...
|
4603
|
+
...import_react76.theme.space,
|
4551
4604
|
4.5: "1.125rem",
|
4552
4605
|
9.5: "2.375rem",
|
4553
4606
|
18: "4.5rem",
|
@@ -4907,13 +4960,13 @@ function ClearIndicator(props) {
|
|
4907
4960
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.ClearIndicator, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
4908
4961
|
}
|
4909
4962
|
function MultiValue(props) {
|
4910
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react77.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4911
4964
|
}
|
4912
4965
|
function MultiValueRemove(props) {
|
4913
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react77.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
4914
4967
|
}
|
4915
4968
|
function NoOptionsMessage(props) {
|
4916
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react77.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" });
|
4917
4970
|
}
|
4918
4971
|
function Select2({
|
4919
4972
|
styles,
|
@@ -5021,7 +5074,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
5021
5074
|
}
|
5022
5075
|
|
5023
5076
|
// src/components/select/components/select-with-checkbox.tsx
|
5024
|
-
var
|
5077
|
+
var import_react78 = require("@chakra-ui/react");
|
5025
5078
|
var import_system11 = require("@chakra-ui/system");
|
5026
5079
|
var import_react_select2 = __toESM(require("react-select"));
|
5027
5080
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
@@ -5084,7 +5137,7 @@ var InputOption = ({
|
|
5084
5137
|
innerProps: props,
|
5085
5138
|
...rest,
|
5086
5139
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
5087
|
-
|
5140
|
+
import_react78.Flex,
|
5088
5141
|
{
|
5089
5142
|
alignItems: "center",
|
5090
5143
|
width: "100%",
|
@@ -5093,7 +5146,7 @@ var InputOption = ({
|
|
5093
5146
|
cursor: isDisabled ? "not-allowed" : "default",
|
5094
5147
|
children: [
|
5095
5148
|
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5096
|
-
|
5149
|
+
import_react78.Checkbox,
|
5097
5150
|
{
|
5098
5151
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
5099
5152
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -5102,14 +5155,14 @@ var InputOption = ({
|
|
5102
5155
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
5103
5156
|
}
|
5104
5157
|
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5105
|
-
|
5158
|
+
import_react78.Checkbox,
|
5106
5159
|
{
|
5107
5160
|
pointerEvents: "none",
|
5108
5161
|
isChecked: isSelected,
|
5109
5162
|
"data-test-id": "CT_component_select-checkbox_option-checkbox"
|
5110
5163
|
}
|
5111
5164
|
),
|
5112
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5165
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react78.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
5113
5166
|
]
|
5114
5167
|
}
|
5115
5168
|
)
|
@@ -5181,13 +5234,13 @@ var SelectCheckbox = (props) => {
|
|
5181
5234
|
var select_with_checkbox_default = SelectCheckbox;
|
5182
5235
|
|
5183
5236
|
// src/components/sidebar/components/sidebar.tsx
|
5184
|
-
var
|
5237
|
+
var import_react79 = require("@chakra-ui/react");
|
5185
5238
|
var import_framer_motion = require("framer-motion");
|
5186
5239
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5187
5240
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5188
5241
|
const { width = "220px" } = props;
|
5189
5242
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5190
|
-
|
5243
|
+
import_react79.Flex,
|
5191
5244
|
{
|
5192
5245
|
position: "relative",
|
5193
5246
|
as: import_framer_motion.motion.div,
|
@@ -5207,13 +5260,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5207
5260
|
Sidebar.displayName = "Sidebar";
|
5208
5261
|
|
5209
5262
|
// src/components/sidebar/components/sidebar-header.tsx
|
5210
|
-
var
|
5263
|
+
var import_react80 = require("@chakra-ui/react");
|
5211
5264
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5212
5265
|
var import_framer_motion2 = require("framer-motion");
|
5213
5266
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5214
5267
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5215
5268
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5216
|
-
|
5269
|
+
import_react80.Box,
|
5217
5270
|
{
|
5218
5271
|
px: "2",
|
5219
5272
|
color: "neutral.900",
|
@@ -5223,7 +5276,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5223
5276
|
color: "primary.500"
|
5224
5277
|
},
|
5225
5278
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5226
|
-
|
5279
|
+
import_react80.Flex,
|
5227
5280
|
{
|
5228
5281
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5229
5282
|
direction: "row",
|
@@ -5233,7 +5286,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5233
5286
|
cursor: "pointer",
|
5234
5287
|
children: [
|
5235
5288
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5236
|
-
|
5289
|
+
import_react80.Box,
|
5237
5290
|
{
|
5238
5291
|
as: import_framer_motion2.motion.div,
|
5239
5292
|
boxSize: "4",
|
@@ -5244,8 +5297,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5244
5297
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5245
5298
|
}
|
5246
5299
|
),
|
5247
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5248
|
-
|
5300
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react80.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5301
|
+
import_react80.Text,
|
5249
5302
|
{
|
5250
5303
|
as: import_framer_motion2.motion.div,
|
5251
5304
|
w: "max-content",
|
@@ -5271,32 +5324,32 @@ SidebarHeader.defaultProps = {
|
|
5271
5324
|
};
|
5272
5325
|
|
5273
5326
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5274
|
-
var
|
5327
|
+
var import_react81 = require("@chakra-ui/react");
|
5275
5328
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5276
5329
|
var import_framer_motion3 = require("framer-motion");
|
5277
5330
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5278
5331
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5279
5332
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5280
|
-
|
5333
|
+
import_react81.Box,
|
5281
5334
|
{
|
5282
5335
|
as: import_framer_motion3.motion.div,
|
5283
5336
|
transitionTimingFunction: "linear",
|
5284
5337
|
initial: { padding: "8px" },
|
5285
5338
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5286
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5339
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5287
5340
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5288
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5289
5342
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5290
5343
|
const noChild = !item.children.length;
|
5291
5344
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5292
5345
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5293
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5346
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5294
5347
|
const activeOption = isOpen ? "primary.50" : "white";
|
5295
5348
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5296
5349
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5297
5350
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5298
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5299
|
-
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5352
|
+
import_react81.AccordionButton,
|
5300
5353
|
{
|
5301
5354
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5302
5355
|
p: "0",
|
@@ -5314,9 +5367,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5314
5367
|
position: "relative",
|
5315
5368
|
...itemStyles,
|
5316
5369
|
children: [
|
5317
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5370
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5318
5371
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5319
|
-
|
5372
|
+
import_react81.Box,
|
5320
5373
|
{
|
5321
5374
|
display: "flex",
|
5322
5375
|
w: "full",
|
@@ -5330,9 +5383,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5330
5383
|
animate: { opacity: 1, x: 0 },
|
5331
5384
|
exit: { opacity: 0, x: 16 },
|
5332
5385
|
children: [
|
5333
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5386
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5334
5387
|
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5335
|
-
|
5388
|
+
import_react81.Box,
|
5336
5389
|
{
|
5337
5390
|
display: "flex",
|
5338
5391
|
boxSize: "3",
|
@@ -5352,12 +5405,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5352
5405
|
},
|
5353
5406
|
item.id
|
5354
5407
|
) }, item.id),
|
5355
|
-
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5356
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5408
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react81.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react81.Box, { display: "flex", alignItems: "center", children: [
|
5357
5410
|
mappingIcon2.get(item.icon || ""),
|
5358
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5411
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Box, { as: "span", ml: "2", children: item.title })
|
5359
5412
|
] }) }),
|
5360
|
-
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5413
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5361
5414
|
NavItem,
|
5362
5415
|
{
|
5363
5416
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5373,7 +5426,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5373
5426
|
},
|
5374
5427
|
submenu.id
|
5375
5428
|
)) })
|
5376
|
-
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5429
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5377
5430
|
NavItem,
|
5378
5431
|
{
|
5379
5432
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5386,8 +5439,8 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5386
5439
|
rounded: "none",
|
5387
5440
|
...itemStyles,
|
5388
5441
|
children: [
|
5389
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5390
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5442
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5443
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5391
5444
|
]
|
5392
5445
|
},
|
5393
5446
|
item.id
|
@@ -5395,13 +5448,13 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5395
5448
|
] });
|
5396
5449
|
} }, item.id),
|
5397
5450
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5398
|
-
|
5451
|
+
import_react81.Fade,
|
5399
5452
|
{
|
5400
5453
|
in: true,
|
5401
5454
|
transition: {
|
5402
5455
|
enter: { duration: 0.5 }
|
5403
5456
|
},
|
5404
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5405
5458
|
NavItem,
|
5406
5459
|
{
|
5407
5460
|
mt: "1",
|
@@ -5429,16 +5482,16 @@ SidebarMenu.defaultProps = {
|
|
5429
5482
|
};
|
5430
5483
|
|
5431
5484
|
// src/components/switch/components/switch.tsx
|
5432
|
-
var
|
5485
|
+
var import_react82 = require("@chakra-ui/react");
|
5433
5486
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5434
5487
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5435
|
-
var
|
5488
|
+
var import_react83 = require("react");
|
5436
5489
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5437
|
-
var Switch = (0,
|
5438
|
-
const styles = (0,
|
5439
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
5440
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
5441
|
-
const containerStyles = (0,
|
5490
|
+
var Switch = (0, import_react82.forwardRef)(function Switch2(props, ref) {
|
5491
|
+
const styles = (0, import_react82.useMultiStyleConfig)("Switch", props);
|
5492
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react82.omitThemingProps)(props);
|
5493
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react82.useCheckbox)(ownProps);
|
5494
|
+
const containerStyles = (0, import_react83.useMemo)(
|
5442
5495
|
() => ({
|
5443
5496
|
display: "inline-block",
|
5444
5497
|
position: "relative",
|
@@ -5448,7 +5501,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5448
5501
|
}),
|
5449
5502
|
[styles.container]
|
5450
5503
|
);
|
5451
|
-
const trackStyles = (0,
|
5504
|
+
const trackStyles = (0, import_react83.useMemo)(
|
5452
5505
|
() => ({
|
5453
5506
|
display: "inline-flex",
|
5454
5507
|
flexShrink: 0,
|
@@ -5460,7 +5513,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5460
5513
|
}),
|
5461
5514
|
[styles.track]
|
5462
5515
|
);
|
5463
|
-
const labelStyles = (0,
|
5516
|
+
const labelStyles = (0, import_react83.useMemo)(
|
5464
5517
|
() => ({
|
5465
5518
|
userSelect: "none",
|
5466
5519
|
marginStart: spacing2,
|
@@ -5477,7 +5530,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5477
5530
|
return iconSize[value];
|
5478
5531
|
};
|
5479
5532
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5480
|
-
|
5533
|
+
import_react82.chakra.label,
|
5481
5534
|
{
|
5482
5535
|
...getRootProps(),
|
5483
5536
|
display: "flex",
|
@@ -5486,13 +5539,13 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5486
5539
|
__css: containerStyles,
|
5487
5540
|
children: [
|
5488
5541
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5489
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5490
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5542
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react82.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react82.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5491
5544
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5492
5545
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5493
5546
|
] }),
|
5494
5547
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5495
|
-
|
5548
|
+
import_react82.chakra.span,
|
5496
5549
|
{
|
5497
5550
|
__css: styles.thumb,
|
5498
5551
|
className: "chakra-switch__thumb",
|
@@ -5502,7 +5555,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5502
5555
|
)
|
5503
5556
|
] }),
|
5504
5557
|
children && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5505
|
-
|
5558
|
+
import_react82.chakra.span,
|
5506
5559
|
{
|
5507
5560
|
className: "chakra-switch__label",
|
5508
5561
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5522,18 +5575,18 @@ Switch.defaultProps = {
|
|
5522
5575
|
var switch_default = Switch;
|
5523
5576
|
|
5524
5577
|
// src/components/table/index.tsx
|
5525
|
-
var
|
5578
|
+
var import_react84 = require("@chakra-ui/react");
|
5526
5579
|
|
5527
5580
|
// src/components/tabs/components/tab.tsx
|
5528
|
-
var
|
5581
|
+
var import_react85 = require("@chakra-ui/react");
|
5529
5582
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5530
|
-
var Tab = (0,
|
5583
|
+
var Tab = (0, import_react85.forwardRef)((props, ref) => {
|
5531
5584
|
var _a, _b;
|
5532
|
-
const tabProps = (0,
|
5585
|
+
const tabProps = (0, import_react85.useTab)({ ...props, ref });
|
5533
5586
|
const isSelected = !!tabProps["aria-selected"];
|
5534
|
-
const styles = (0,
|
5587
|
+
const styles = (0, import_react85.useMultiStyleConfig)("Tabs", tabProps);
|
5535
5588
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5536
|
-
|
5589
|
+
import_react85.Button,
|
5537
5590
|
{
|
5538
5591
|
"data-test-id": props["data-test-id"],
|
5539
5592
|
p: 4,
|
@@ -5558,7 +5611,7 @@ var Tab = (0, import_react83.forwardRef)((props, ref) => {
|
|
5558
5611
|
},
|
5559
5612
|
__css: styles.tab,
|
5560
5613
|
...tabProps,
|
5561
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5614
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react85.Flex, { alignItems: "center", children: [
|
5562
5615
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5563
5616
|
tabProps.children,
|
5564
5617
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5569,39 +5622,39 @@ var Tab = (0, import_react83.forwardRef)((props, ref) => {
|
|
5569
5622
|
var tab_default = Tab;
|
5570
5623
|
|
5571
5624
|
// src/components/tabs/index.ts
|
5572
|
-
var
|
5625
|
+
var import_react86 = require("@chakra-ui/react");
|
5573
5626
|
|
5574
5627
|
// src/components/text/index.ts
|
5575
|
-
var
|
5628
|
+
var import_react87 = require("@chakra-ui/react");
|
5576
5629
|
|
5577
5630
|
// src/components/time-input/components/index.tsx
|
5578
|
-
var
|
5631
|
+
var import_react89 = require("@chakra-ui/react");
|
5579
5632
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5580
|
-
var
|
5633
|
+
var import_react90 = require("react");
|
5581
5634
|
|
5582
5635
|
// src/components/time-input/components/integration.tsx
|
5583
5636
|
var import_timescape = require("@zamiru/timescape");
|
5584
5637
|
var import_timescape2 = require("@zamiru/timescape");
|
5585
|
-
var
|
5638
|
+
var import_react88 = require("react");
|
5586
5639
|
var useTimescape = (options = {}) => {
|
5587
5640
|
var _a;
|
5588
5641
|
const { date, onChangeDate, ...rest } = options;
|
5589
|
-
const [manager] = (0,
|
5590
|
-
const onChangeDateRef = (0,
|
5591
|
-
(0,
|
5642
|
+
const [manager] = (0, import_react88.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5643
|
+
const onChangeDateRef = (0, import_react88.useRef)(onChangeDate);
|
5644
|
+
(0, import_react88.useLayoutEffect)(() => {
|
5592
5645
|
onChangeDateRef.current = onChangeDate;
|
5593
5646
|
}, [onChangeDate]);
|
5594
|
-
const [optionsState, update] = (0,
|
5647
|
+
const [optionsState, update] = (0, import_react88.useState)(() => ({
|
5595
5648
|
date,
|
5596
5649
|
...rest
|
5597
5650
|
}));
|
5598
|
-
(0,
|
5651
|
+
(0, import_react88.useEffect)(() => {
|
5599
5652
|
manager.resync();
|
5600
5653
|
return () => {
|
5601
5654
|
manager.remove();
|
5602
5655
|
};
|
5603
5656
|
}, [manager]);
|
5604
|
-
(0,
|
5657
|
+
(0, import_react88.useEffect)(() => {
|
5605
5658
|
return manager.on("changeDate", (nextDate) => {
|
5606
5659
|
var _a2;
|
5607
5660
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5609,7 +5662,7 @@ var useTimescape = (options = {}) => {
|
|
5609
5662
|
});
|
5610
5663
|
}, [manager]);
|
5611
5664
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5612
|
-
(0,
|
5665
|
+
(0, import_react88.useEffect)(() => {
|
5613
5666
|
manager.date = timestamp;
|
5614
5667
|
manager.minDate = optionsState.minDate;
|
5615
5668
|
manager.maxDate = optionsState.maxDate;
|
@@ -5675,9 +5728,9 @@ var timeFromString = (timeString) => {
|
|
5675
5728
|
const [hours, minutes, seconds] = timeString.split(":");
|
5676
5729
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5677
5730
|
};
|
5678
|
-
var InputTimeArea = (0,
|
5731
|
+
var InputTimeArea = (0, import_react89.forwardRef)((props, ref) => {
|
5679
5732
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5680
|
-
|
5733
|
+
import_react89.Input,
|
5681
5734
|
{
|
5682
5735
|
_focusWithin: {
|
5683
5736
|
bg: "neutral.300"
|
@@ -5695,7 +5748,7 @@ var InputTimeArea = (0, import_react87.forwardRef)((props, ref) => {
|
|
5695
5748
|
}
|
5696
5749
|
);
|
5697
5750
|
});
|
5698
|
-
var TimeInput2 = (0,
|
5751
|
+
var TimeInput2 = (0, import_react89.forwardRef)(
|
5699
5752
|
({
|
5700
5753
|
name,
|
5701
5754
|
config: config2,
|
@@ -5722,7 +5775,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5722
5775
|
date,
|
5723
5776
|
...config2
|
5724
5777
|
});
|
5725
|
-
(0,
|
5778
|
+
(0, import_react90.useEffect)(() => {
|
5726
5779
|
var _a, _b, _c, _d, _e, _f;
|
5727
5780
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5728
5781
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5731,7 +5784,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5731
5784
|
onChangeTime(timeValue);
|
5732
5785
|
}
|
5733
5786
|
}, [options.date]);
|
5734
|
-
(0,
|
5787
|
+
(0, import_react90.useImperativeHandle)(ref, () => ({
|
5735
5788
|
focus() {
|
5736
5789
|
_manager.focusField("hours");
|
5737
5790
|
}
|
@@ -5752,7 +5805,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5752
5805
|
};
|
5753
5806
|
};
|
5754
5807
|
const { outlineColor, focusColor } = getProperties();
|
5755
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react89.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5756
5809
|
field_default,
|
5757
5810
|
{
|
5758
5811
|
isError,
|
@@ -5762,7 +5815,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5762
5815
|
isDisabled,
|
5763
5816
|
isSuccess,
|
5764
5817
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5765
|
-
|
5818
|
+
import_react89.Box,
|
5766
5819
|
{
|
5767
5820
|
transition: "all 0.15s",
|
5768
5821
|
boxShadow: "none",
|
@@ -5773,7 +5826,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5773
5826
|
borderColor: focusColor
|
5774
5827
|
},
|
5775
5828
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5776
|
-
|
5829
|
+
import_react89.InputGroup,
|
5777
5830
|
{
|
5778
5831
|
borderRadius: "sm",
|
5779
5832
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5782,7 +5835,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5782
5835
|
gap: 3,
|
5783
5836
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5784
5837
|
children: [
|
5785
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5838
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react89.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5786
5839
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5787
5840
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5788
5841
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
@@ -5790,7 +5843,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5790
5843
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5791
5844
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5792
5845
|
] }),
|
5793
|
-
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5846
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react89.Input, { p: 0, ...getInputProps("am/pm") })
|
5794
5847
|
] }),
|
5795
5848
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5796
5849
|
addOnRight
|
@@ -5805,16 +5858,16 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5805
5858
|
);
|
5806
5859
|
|
5807
5860
|
// src/components/toast/components/toast.tsx
|
5808
|
-
var
|
5861
|
+
var import_react92 = require("@chakra-ui/react");
|
5809
5862
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5810
5863
|
var import_react_toastify = require("react-toastify");
|
5811
5864
|
|
5812
5865
|
// src/components/toast/components/styles.tsx
|
5813
|
-
var
|
5866
|
+
var import_react91 = require("@emotion/react");
|
5814
5867
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5815
5868
|
var Styles2 = () => {
|
5816
5869
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5817
|
-
|
5870
|
+
import_react91.Global,
|
5818
5871
|
{
|
5819
5872
|
styles: `
|
5820
5873
|
.Toastify__toast-container {
|
@@ -5848,7 +5901,7 @@ var styles_default2 = Styles2;
|
|
5848
5901
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5849
5902
|
var CustomCloseButton = (props) => {
|
5850
5903
|
const { closeToast } = props;
|
5851
|
-
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.Box, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
|
5852
5905
|
};
|
5853
5906
|
var DEFAULT_OPTIONS = {
|
5854
5907
|
position: "top-right",
|
@@ -5871,7 +5924,7 @@ var renderIcon = (icon, type) => {
|
|
5871
5924
|
return icon;
|
5872
5925
|
};
|
5873
5926
|
var useToast = () => {
|
5874
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
5927
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react92.useToken)("colors", [
|
5875
5928
|
"primary.500",
|
5876
5929
|
"neutral.500",
|
5877
5930
|
"info.500",
|
@@ -5882,13 +5935,13 @@ var useToast = () => {
|
|
5882
5935
|
const content = (icon, message, link) => {
|
5883
5936
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5884
5937
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(styles_default2, {}),
|
5885
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5886
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5887
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5888
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5938
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, children: [
|
5939
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react92.Flex, { alignItems: "center", children: [
|
5940
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
5941
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react92.chakra.span, { noOfLines: 2, children: message })
|
5889
5942
|
] }),
|
5890
5943
|
link && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5891
|
-
|
5944
|
+
import_react92.Link,
|
5892
5945
|
{
|
5893
5946
|
href: link.url,
|
5894
5947
|
textDecoration: "underline",
|
@@ -5967,9 +6020,9 @@ var useToast = () => {
|
|
5967
6020
|
var import_react_toastify2 = require("react-toastify");
|
5968
6021
|
|
5969
6022
|
// src/components/uploader/components/uploader.tsx
|
5970
|
-
var
|
6023
|
+
var import_react93 = require("@chakra-ui/react");
|
5971
6024
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
5972
|
-
var
|
6025
|
+
var import_react94 = require("react");
|
5973
6026
|
var import_react_dropzone = require("react-dropzone");
|
5974
6027
|
|
5975
6028
|
// src/components/uploader/constants.ts
|
@@ -6068,9 +6121,9 @@ var Uploader = ({
|
|
6068
6121
|
validatorExt,
|
6069
6122
|
...props
|
6070
6123
|
}) => {
|
6071
|
-
const [filePreview, setFilePreview] = (0,
|
6124
|
+
const [filePreview, setFilePreview] = (0, import_react94.useState)();
|
6072
6125
|
const toast2 = useToast();
|
6073
|
-
const handleRejection = (0,
|
6126
|
+
const handleRejection = (0, import_react94.useCallback)(
|
6074
6127
|
(message, file, image) => {
|
6075
6128
|
if (onHandleRejections) {
|
6076
6129
|
onHandleRejections(file, image);
|
@@ -6080,7 +6133,7 @@ var Uploader = ({
|
|
6080
6133
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
6081
6134
|
[onHandleRejections]
|
6082
6135
|
);
|
6083
|
-
const onDropAccepted = (0,
|
6136
|
+
const onDropAccepted = (0, import_react94.useCallback)(
|
6084
6137
|
(files) => {
|
6085
6138
|
const file = files[0];
|
6086
6139
|
const imageUrl = URL.createObjectURL(file);
|
@@ -6103,10 +6156,10 @@ var Uploader = ({
|
|
6103
6156
|
},
|
6104
6157
|
[acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
|
6105
6158
|
);
|
6106
|
-
const onDropRejected = (0,
|
6159
|
+
const onDropRejected = (0, import_react94.useCallback)((fileRejections) => {
|
6107
6160
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
6108
6161
|
}, []);
|
6109
|
-
const validator = (0,
|
6162
|
+
const validator = (0, import_react94.useCallback)(
|
6110
6163
|
(file) => {
|
6111
6164
|
const result = [];
|
6112
6165
|
if (validatorExt) {
|
@@ -6136,26 +6189,26 @@ var Uploader = ({
|
|
6136
6189
|
const renderHelperText = () => {
|
6137
6190
|
if (Array.isArray(helperText)) {
|
6138
6191
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6139
|
-
|
6192
|
+
import_react93.UnorderedList,
|
6140
6193
|
{
|
6141
6194
|
pl: 2,
|
6142
6195
|
fontSize: 12,
|
6143
6196
|
color: "black.medium",
|
6144
6197
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6145
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6198
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.ListItem, { children: text2 }, text2))
|
6146
6199
|
}
|
6147
6200
|
);
|
6148
6201
|
}
|
6149
6202
|
return helperText;
|
6150
6203
|
};
|
6151
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6204
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6152
6205
|
const handleRemove = (e) => {
|
6153
6206
|
e.stopPropagation();
|
6154
6207
|
setFilePreview(void 0);
|
6155
6208
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6156
6209
|
acceptedFiles.pop();
|
6157
6210
|
};
|
6158
|
-
(0,
|
6211
|
+
(0, import_react94.useEffect)(() => {
|
6159
6212
|
if (value) {
|
6160
6213
|
if (typeof value === "string") {
|
6161
6214
|
setFilePreview(value);
|
@@ -6171,16 +6224,16 @@ var Uploader = ({
|
|
6171
6224
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6172
6225
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6173
6226
|
const cursorType = filePreview ? "initial" : "pointer";
|
6174
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react93.FormControl, { isRequired, children: [
|
6175
6228
|
label && typeof label === "string" ? (
|
6176
6229
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6177
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6178
|
-
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6230
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react93.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, {}), fontSize: "text.sm", children: [
|
6231
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.RequiredIndicator, { mr: 1, ml: 0 }),
|
6179
6232
|
label
|
6180
6233
|
] })
|
6181
6234
|
) : label,
|
6182
6235
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6183
|
-
|
6236
|
+
import_react93.Flex,
|
6184
6237
|
{
|
6185
6238
|
minH: containerHeight,
|
6186
6239
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6197,8 +6250,8 @@ var Uploader = ({
|
|
6197
6250
|
...props,
|
6198
6251
|
...getRootProps(),
|
6199
6252
|
children: [
|
6200
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6201
|
-
|
6253
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6254
|
+
import_react93.Button,
|
6202
6255
|
{
|
6203
6256
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6204
6257
|
"aria-label": "remove-image",
|
@@ -6215,15 +6268,15 @@ var Uploader = ({
|
|
6215
6268
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6216
6269
|
}
|
6217
6270
|
) }),
|
6218
|
-
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6219
|
-
|
6271
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6272
|
+
import_react93.Flex,
|
6220
6273
|
{
|
6221
6274
|
position: "relative",
|
6222
6275
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6223
6276
|
justify: "center",
|
6224
6277
|
align: "center",
|
6225
6278
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6226
|
-
|
6279
|
+
import_react93.Image,
|
6227
6280
|
{
|
6228
6281
|
h: size2 === "lg" ? "120" : "100",
|
6229
6282
|
src: filePreview,
|
@@ -6233,11 +6286,11 @@ var Uploader = ({
|
|
6233
6286
|
)
|
6234
6287
|
}
|
6235
6288
|
) }),
|
6236
|
-
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6289
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react93.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6237
6290
|
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6238
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react93.Box, { children: [
|
6239
6292
|
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6240
|
-
|
6293
|
+
import_react93.Heading,
|
6241
6294
|
{
|
6242
6295
|
fontWeight: "400",
|
6243
6296
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6246,7 +6299,7 @@ var Uploader = ({
|
|
6246
6299
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6247
6300
|
}
|
6248
6301
|
),
|
6249
|
-
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6302
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6250
6303
|
] })
|
6251
6304
|
] }) })
|
6252
6305
|
]
|
@@ -6259,8 +6312,8 @@ var Uploader = ({
|
|
6259
6312
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6260
6313
|
}
|
6261
6314
|
),
|
6262
|
-
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6263
|
-
|
6315
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6316
|
+
import_react93.Button,
|
6264
6317
|
{
|
6265
6318
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6266
6319
|
type: "button",
|
@@ -6306,10 +6359,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6306
6359
|
};
|
6307
6360
|
|
6308
6361
|
// src/components/index.ts
|
6309
|
-
var
|
6362
|
+
var import_react95 = require("@chakra-ui/react");
|
6310
6363
|
|
6311
6364
|
// src/config/theme/themeConfiguration.ts
|
6312
|
-
var
|
6365
|
+
var import_react103 = require("@chakra-ui/react");
|
6313
6366
|
|
6314
6367
|
// src/config/theme/components/index.ts
|
6315
6368
|
var components_exports = {};
|
@@ -6866,8 +6919,8 @@ var card_default2 = CardStyle;
|
|
6866
6919
|
|
6867
6920
|
// src/config/theme/components/checkbox.ts
|
6868
6921
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
6869
|
-
var
|
6870
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
6922
|
+
var import_react96 = require("@chakra-ui/react");
|
6923
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react96.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
6871
6924
|
var baseStyle3 = definePartsStyle3({
|
6872
6925
|
control: {
|
6873
6926
|
borderRadius: "sm",
|
@@ -6957,19 +7010,19 @@ var variants2 = {
|
|
6957
7010
|
errors,
|
6958
7011
|
unstyled
|
6959
7012
|
};
|
6960
|
-
var
|
7013
|
+
var Checkbox3 = defineMultiStyleConfig3({
|
6961
7014
|
baseStyle: baseStyle3,
|
6962
7015
|
variants: variants2,
|
6963
7016
|
defaultProps: {
|
6964
7017
|
variant: "unstyled"
|
6965
7018
|
}
|
6966
7019
|
});
|
6967
|
-
var checkbox_default2 =
|
7020
|
+
var checkbox_default2 = Checkbox3;
|
6968
7021
|
|
6969
7022
|
// src/config/theme/components/chips.ts
|
6970
7023
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
6971
|
-
var
|
6972
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
7024
|
+
var import_react97 = require("@chakra-ui/react");
|
7025
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react97.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
6973
7026
|
var baseStyle4 = definePartsStyle4({
|
6974
7027
|
container: {
|
6975
7028
|
px: 3,
|
@@ -7178,8 +7231,8 @@ var input_default = Input4;
|
|
7178
7231
|
|
7179
7232
|
// src/config/theme/components/loader.ts
|
7180
7233
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7181
|
-
var
|
7182
|
-
var rotate = (0,
|
7234
|
+
var import_react98 = require("@emotion/react");
|
7235
|
+
var rotate = (0, import_react98.keyframes)({
|
7183
7236
|
"0%": {
|
7184
7237
|
transform: "rotate(0deg)"
|
7185
7238
|
},
|
@@ -7361,8 +7414,8 @@ var modal_default = modalTheme;
|
|
7361
7414
|
|
7362
7415
|
// src/config/theme/components/popover.ts
|
7363
7416
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7364
|
-
var
|
7365
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
7417
|
+
var import_react99 = require("@chakra-ui/react");
|
7418
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react99.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
7366
7419
|
var baseStyle8 = definePartsStyle7({
|
7367
7420
|
content: {
|
7368
7421
|
bg: "white"
|
@@ -7373,8 +7426,8 @@ var popover_default = popoverTheme;
|
|
7373
7426
|
|
7374
7427
|
// src/config/theme/components/radio.ts
|
7375
7428
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7376
|
-
var
|
7377
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
7429
|
+
var import_react100 = require("@chakra-ui/react");
|
7430
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react100.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
7378
7431
|
var baseStyle9 = definePartsStyle8({
|
7379
7432
|
control: {
|
7380
7433
|
border: "1px solid",
|
@@ -7796,7 +7849,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7796
7849
|
var tabs_default = tabsTheme;
|
7797
7850
|
|
7798
7851
|
// src/config/theme/components/textarea.ts
|
7799
|
-
var
|
7852
|
+
var import_react101 = require("@chakra-ui/react");
|
7800
7853
|
var getProps = (props) => {
|
7801
7854
|
const { isError, isSuccess, isDisabled } = props;
|
7802
7855
|
let borderColor = "neutral.400";
|
@@ -7816,7 +7869,7 @@ var getProps = (props) => {
|
|
7816
7869
|
borderColor
|
7817
7870
|
};
|
7818
7871
|
};
|
7819
|
-
var outline3 = (0,
|
7872
|
+
var outline3 = (0, import_react101.defineStyle)((props) => {
|
7820
7873
|
const { focusBorderColor, borderColor } = getProps(props);
|
7821
7874
|
return {
|
7822
7875
|
background: "white.high",
|
@@ -7860,7 +7913,7 @@ var outline3 = (0, import_react99.defineStyle)((props) => {
|
|
7860
7913
|
}
|
7861
7914
|
};
|
7862
7915
|
});
|
7863
|
-
var Textarea = (0,
|
7916
|
+
var Textarea = (0, import_react101.defineStyleConfig)({
|
7864
7917
|
variants: { outline: outline3 },
|
7865
7918
|
defaultProps: {
|
7866
7919
|
variant: "outline"
|
@@ -7869,15 +7922,15 @@ var Textarea = (0, import_react99.defineStyleConfig)({
|
|
7869
7922
|
var textarea_default2 = Textarea;
|
7870
7923
|
|
7871
7924
|
// src/config/theme/components/tooltip.ts
|
7872
|
-
var
|
7873
|
-
var $arrowBg = (0,
|
7925
|
+
var import_react102 = require("@chakra-ui/react");
|
7926
|
+
var $arrowBg = (0, import_react102.cssVar)("popper-arrow-bg");
|
7874
7927
|
var baseStyle12 = {
|
7875
7928
|
bg: "neutral.700",
|
7876
7929
|
textStyle: "text.sm",
|
7877
7930
|
fontSize: "text.sm",
|
7878
7931
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
7879
7932
|
};
|
7880
|
-
var Tooltip2 = (0,
|
7933
|
+
var Tooltip2 = (0, import_react102.defineStyleConfig)({ baseStyle: baseStyle12 });
|
7881
7934
|
var tooltip_default = Tooltip2;
|
7882
7935
|
|
7883
7936
|
// src/config/theme/themeConfiguration.ts
|
@@ -7896,7 +7949,7 @@ var createExtendTheme = (theme5) => {
|
|
7896
7949
|
return function extendTheme2(...extensions) {
|
7897
7950
|
let overrides = [...extensions];
|
7898
7951
|
let activeTheme = extensions[extensions.length - 1];
|
7899
|
-
if ((0,
|
7952
|
+
if ((0, import_react103.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
7900
7953
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
7901
7954
|
overrides.length > 1) {
|
7902
7955
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -7905,13 +7958,13 @@ var createExtendTheme = (theme5) => {
|
|
7905
7958
|
}
|
7906
7959
|
return pipe(
|
7907
7960
|
...overrides.map(
|
7908
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
7961
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react103.mergeThemeOverride)(prevTheme, extension)
|
7909
7962
|
)
|
7910
7963
|
)(activeTheme);
|
7911
7964
|
};
|
7912
7965
|
};
|
7913
7966
|
var getTheme = (foundations) => {
|
7914
|
-
return (0,
|
7967
|
+
return (0, import_react103.extendTheme)({
|
7915
7968
|
...foundations,
|
7916
7969
|
components: {
|
7917
7970
|
...components_exports
|
@@ -7928,7 +7981,7 @@ var getTheme = (foundations) => {
|
|
7928
7981
|
config
|
7929
7982
|
});
|
7930
7983
|
};
|
7931
|
-
var theme4 = (0,
|
7984
|
+
var theme4 = (0, import_react103.extendTheme)({
|
7932
7985
|
components: {
|
7933
7986
|
...components_exports
|
7934
7987
|
},
|
@@ -7948,23 +8001,23 @@ var theme4 = (0, import_react101.extendTheme)({
|
|
7948
8001
|
|
7949
8002
|
// src/hooks/useFetcher.ts
|
7950
8003
|
var import_axios2 = __toESM(require("axios"));
|
7951
|
-
var
|
8004
|
+
var import_react106 = require("react");
|
7952
8005
|
|
7953
8006
|
// src/provider/components/provider.tsx
|
7954
8007
|
var import_axios = __toESM(require("axios"));
|
7955
|
-
var
|
8008
|
+
var import_react104 = require("react");
|
7956
8009
|
var import_react_toastify3 = require("react-toastify");
|
7957
8010
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
7958
|
-
var ProviderContext = (0,
|
8011
|
+
var ProviderContext = (0, import_react104.createContext)({
|
7959
8012
|
instance: void 0
|
7960
8013
|
});
|
7961
8014
|
var useInternalUI = () => {
|
7962
|
-
const { instance } = (0,
|
8015
|
+
const { instance } = (0, import_react104.useContext)(ProviderContext);
|
7963
8016
|
return { instance };
|
7964
8017
|
};
|
7965
8018
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
7966
|
-
const instanceRef = (0,
|
7967
|
-
(0,
|
8019
|
+
const instanceRef = (0, import_react104.useRef)(import_axios.default.create(config2));
|
8020
|
+
(0, import_react104.useEffect)(() => {
|
7968
8021
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
7969
8022
|
instanceRef.current.interceptors.request.use(interceptor);
|
7970
8023
|
});
|
@@ -7972,7 +8025,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
7972
8025
|
instanceRef.current.interceptors.response.use(interceptor);
|
7973
8026
|
});
|
7974
8027
|
}, [requestInterceptors, responseInterceptors]);
|
7975
|
-
const provider = (0,
|
8028
|
+
const provider = (0, import_react104.useMemo)(() => ({ instance: instanceRef.current }), []);
|
7976
8029
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
7977
8030
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_toastify3.ToastContainer, {}),
|
7978
8031
|
children
|
@@ -7982,12 +8035,12 @@ Provider.displayName = "Provider";
|
|
7982
8035
|
var provider_default = Provider;
|
7983
8036
|
|
7984
8037
|
// src/provider/index.ts
|
7985
|
-
var
|
8038
|
+
var import_react105 = require("@chakra-ui/react");
|
7986
8039
|
|
7987
8040
|
// src/hooks/useFetcher.ts
|
7988
8041
|
function useFetcher() {
|
7989
8042
|
const { instance } = useInternalUI();
|
7990
|
-
const axiosInstance = (0,
|
8043
|
+
const axiosInstance = (0, import_react106.useMemo)(() => instance || import_axios2.default, [instance]);
|
7991
8044
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
7992
8045
|
const response = await axiosInstance.request({
|
7993
8046
|
data,
|
@@ -8007,10 +8060,10 @@ function useFetcher() {
|
|
8007
8060
|
}
|
8008
8061
|
|
8009
8062
|
// src/hooks/index.ts
|
8010
|
-
var
|
8063
|
+
var import_react107 = require("@chakra-ui/react");
|
8011
8064
|
|
8012
8065
|
// src/index.ts
|
8013
|
-
var
|
8066
|
+
var import_react108 = require("@chakra-ui/react");
|
8014
8067
|
// Annotate the CommonJS export names for ESM import in node:
|
8015
8068
|
0 && (module.exports = {
|
8016
8069
|
Accordion,
|