@ctlyst.id/internal-ui 5.1.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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +768 -692
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +142 -66
- 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,
|
@@ -1355,23 +1400,23 @@ var isCellDisabled = (row, cellId) => {
|
|
1355
1400
|
}
|
1356
1401
|
return false;
|
1357
1402
|
};
|
1358
|
-
var getCommonPinningStyles = (column) => {
|
1403
|
+
var getCommonPinningStyles = (column, paddingRowX) => {
|
1359
1404
|
const isPinned = column.getIsPinned();
|
1360
1405
|
const isFirstLeftPinnedColumn = isPinned === "left" && column.getIsFirstColumn("left");
|
1361
1406
|
const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
|
1362
1407
|
const isFirstRightPinnedColumn = isPinned === "right" && column.getIsFirstColumn("right");
|
1363
1408
|
const isLastRightPinnedColumn = isPinned === "right" && column.getIsLastColumn("right");
|
1364
1409
|
return {
|
1365
|
-
left: isPinned === "left" ? `${column.getStart("left") + (!isFirstLeftPinnedColumn ?
|
1366
|
-
right: isPinned === "right" ? `${column.getAfter("right") + (!isLastRightPinnedColumn ?
|
1410
|
+
left: isPinned === "left" ? `${column.getStart("left") + (!isFirstLeftPinnedColumn ? paddingRowX : 0)}px` : void 0,
|
1411
|
+
right: isPinned === "right" ? `${column.getAfter("right") + (!isLastRightPinnedColumn ? paddingRowX : 0)}px` : void 0,
|
1367
1412
|
position: isPinned ? "sticky" : "relative",
|
1368
1413
|
zIndex: isPinned ? 1 : 0,
|
1369
1414
|
...isFirstLeftPinnedColumn ? {
|
1370
|
-
pl:
|
1371
|
-
} : {
|
1415
|
+
pl: `${paddingRowX + 8}px`
|
1416
|
+
} : {},
|
1372
1417
|
...isLastRightPinnedColumn ? {
|
1373
|
-
pr:
|
1374
|
-
} : {
|
1418
|
+
pr: `${paddingRowX + 8}px`
|
1419
|
+
} : {},
|
1375
1420
|
...isLastLeftPinnedColumn ? {
|
1376
1421
|
py: "16px",
|
1377
1422
|
pr: "8px",
|
@@ -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,11 +1576,12 @@ 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) => {
|
1531
|
-
var _a, _b, _c, _d, _e
|
1584
|
+
var _a, _b, _c, _d, _e;
|
1532
1585
|
const {
|
1533
1586
|
isLoading,
|
1534
1587
|
styles,
|
@@ -1540,10 +1593,11 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1540
1593
|
highlightedRow,
|
1541
1594
|
withSelectedRow,
|
1542
1595
|
highlightRowColor,
|
1543
|
-
cellLineClamp = 2
|
1596
|
+
cellLineClamp = 2,
|
1597
|
+
paddingRowX = 8
|
1544
1598
|
} = props;
|
1545
1599
|
const { clickOrDragged, getDragOrClickProps } = useDragOrClick();
|
1546
|
-
const { table, action, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1600
|
+
const { table, action, throttleRowClick, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1547
1601
|
const refTable = React5.useRef(null);
|
1548
1602
|
React5.useImperativeHandle(ref, () => ({
|
1549
1603
|
toggleAllRowsSelected
|
@@ -1587,28 +1641,38 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1587
1641
|
};
|
1588
1642
|
}, []);
|
1589
1643
|
const hasScroll = ((_a = refTable == null ? void 0 : refTable.current) == null ? void 0 : _a.offsetWidth) && ((_b = refTable == null ? void 0 : refTable.current) == null ? void 0 : _b.scrollWidth) && ((_c = refTable == null ? void 0 : refTable.current) == null ? void 0 : _c.offsetWidth) < ((_d = refTable == null ? void 0 : refTable.current) == null ? void 0 : _d.scrollWidth);
|
1644
|
+
const getTableHeaderSize = (header, index, totalColumn) => {
|
1645
|
+
if (header.column.getIsFirstColumn("left") || header.column.getIsLastColumn("right")) {
|
1646
|
+
return { width: `${header.getSize() + paddingRowX}px` };
|
1647
|
+
}
|
1648
|
+
if (index === 0) {
|
1649
|
+
return { width: `${header.getSize() + paddingRowX}px`, paddingLeft: `${8 + paddingRowX}` };
|
1650
|
+
}
|
1651
|
+
if (index === totalColumn - 1) {
|
1652
|
+
return { width: `${header.getSize() + paddingRowX}px`, paddingRight: `${8 + paddingRowX}` };
|
1653
|
+
}
|
1654
|
+
return { width: `${header.getSize()}px` };
|
1655
|
+
};
|
1590
1656
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1591
|
-
|
1657
|
+
import_react30.Box,
|
1592
1658
|
{
|
1593
1659
|
overflowX: "auto",
|
1594
1660
|
overflowY: "hidden",
|
1595
1661
|
position: "relative",
|
1596
|
-
pl: ((_e = columnPinning == null ? void 0 : columnPinning.left) == null ? void 0 : _e.length) ? 0 : 2,
|
1597
|
-
pr: ((_f = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _f.length) ? 0 : 2,
|
1598
1662
|
maxW: "100%",
|
1599
1663
|
w: "full",
|
1600
1664
|
ref: refTable,
|
1601
|
-
...((
|
1665
|
+
...((_e = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _e.length) && hasScroll ? { "data-pin-right": true } : {},
|
1602
1666
|
...container,
|
1603
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1604
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1605
|
-
|
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,
|
1606
1670
|
{
|
1607
1671
|
colSpan: header.colSpan,
|
1608
1672
|
width: `${header.getSize()}px`,
|
1609
1673
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1610
1674
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1611
|
-
|
1675
|
+
import_react30.Flex,
|
1612
1676
|
{
|
1613
1677
|
"data-test-id": "CT_component_data-table_loader",
|
1614
1678
|
textTransform: "capitalize",
|
@@ -1620,27 +1684,29 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1620
1684
|
},
|
1621
1685
|
header.id
|
1622
1686
|
)) }, headerGroup.id)) }),
|
1623
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1624
|
-
] }) : /* @__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: [
|
1625
1689
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1626
|
-
|
1690
|
+
import_react30.Thead,
|
1627
1691
|
{
|
1628
1692
|
maxH: "50px",
|
1629
1693
|
...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
|
1630
|
-
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) => {
|
1631
1695
|
var _a2, _b2;
|
1632
1696
|
if (!!((_a2 = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _a2.length) && header.column.getIsFirstColumn("right")) {
|
1633
1697
|
lastPinnedColumn = header.column.getAfter("right");
|
1634
1698
|
}
|
1635
1699
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1636
|
-
|
1700
|
+
import_react30.Th,
|
1637
1701
|
{
|
1638
1702
|
colSpan: header.colSpan,
|
1639
|
-
|
1640
|
-
|
1703
|
+
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
1704
|
+
_last: { paddingRight: `${paddingRowX + 8}px` },
|
1705
|
+
sx: getCommonPinningStyles(header.column, paddingRowX),
|
1706
|
+
...getTableHeaderSize(header, index, headerGroup.headers.length),
|
1641
1707
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1642
1708
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1643
|
-
|
1709
|
+
import_react30.Flex,
|
1644
1710
|
{
|
1645
1711
|
backgroundColor: "white",
|
1646
1712
|
height: "100%",
|
@@ -1655,13 +1721,13 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1655
1721
|
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1656
1722
|
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1657
1723
|
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1658
|
-
|
1724
|
+
import_react30.Box,
|
1659
1725
|
{
|
1660
1726
|
as: "span",
|
1661
1727
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1662
1728
|
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1663
1729
|
onClick: header.column.getToggleSortingHandler(),
|
1664
|
-
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" }) })
|
1665
1731
|
}
|
1666
1732
|
)
|
1667
1733
|
]
|
@@ -1673,18 +1739,18 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1673
1739
|
}) }, headerGroup.id))
|
1674
1740
|
}
|
1675
1741
|
),
|
1676
|
-
/* @__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) => {
|
1677
1743
|
const isDisabledRow = disabledRow && disabledRow(row.original);
|
1678
1744
|
const isHighlightedRow = highlightedRow && highlightedRow(row.original);
|
1679
1745
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1680
|
-
|
1746
|
+
import_react30.Tr,
|
1681
1747
|
{
|
1682
1748
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
1683
1749
|
...styles == null ? void 0 : styles.tableRow,
|
1684
1750
|
sx: { ...isHighlightedRow && getTableHighlightStyle(highlightRowColor) },
|
1685
1751
|
"aria-disabled": isDisabledRow,
|
1686
1752
|
"data-highlight": isHighlightedRow ? "true" : "false",
|
1687
|
-
css:
|
1753
|
+
css: import_react31.css`
|
1688
1754
|
&:last-child {
|
1689
1755
|
td {
|
1690
1756
|
border-bottom: none;
|
@@ -1705,7 +1771,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1705
1771
|
},
|
1706
1772
|
onClick: () => {
|
1707
1773
|
action.current = "selectRow";
|
1708
|
-
if (withSelectedRow) row
|
1774
|
+
if (withSelectedRow) throttleRowClick(row);
|
1709
1775
|
if (onRowClick) {
|
1710
1776
|
if (isDisabledRow) return;
|
1711
1777
|
onRowClick(row.original);
|
@@ -1718,16 +1784,18 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1718
1784
|
const meta = cell.column.columnDef.meta;
|
1719
1785
|
const isDisabled = isCellDisabled(row.original, cell.column.id);
|
1720
1786
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1721
|
-
|
1787
|
+
import_react30.Td,
|
1722
1788
|
{
|
1723
1789
|
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1724
1790
|
fontSize: "text.sm",
|
1791
|
+
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
1792
|
+
_last: { paddingRight: `${paddingRowX + 8}px` },
|
1725
1793
|
sx: {
|
1726
|
-
...getCommonPinningStyles(cell.column)
|
1794
|
+
...getCommonPinningStyles(cell.column, paddingRowX)
|
1727
1795
|
},
|
1728
1796
|
...styles == null ? void 0 : styles.tableCell,
|
1729
1797
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1730
|
-
|
1798
|
+
import_react30.Flex,
|
1731
1799
|
{
|
1732
1800
|
tabIndex: 0,
|
1733
1801
|
height: "100%",
|
@@ -1735,14 +1803,22 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1735
1803
|
align: "center",
|
1736
1804
|
"data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
|
1737
1805
|
opacity: isDisabled ? 0.5 : 1,
|
1738
|
-
...cellLineClamp > 0 ? {
|
1739
|
-
noOfLines: cellLineClamp,
|
1740
|
-
sx: {
|
1741
|
-
display: "-webkit-inline-box"
|
1742
|
-
}
|
1743
|
-
} : {},
|
1744
1806
|
sx: { ...meta && meta.columnStyles ? meta.columnStyles : {} },
|
1745
|
-
children: (0,
|
1807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1808
|
+
import_react30.Box,
|
1809
|
+
{
|
1810
|
+
onMouseUp: (e) => {
|
1811
|
+
e.stopPropagation();
|
1812
|
+
},
|
1813
|
+
...cellLineClamp > 0 ? {
|
1814
|
+
noOfLines: cellLineClamp,
|
1815
|
+
sx: {
|
1816
|
+
display: "-webkit-inline-box"
|
1817
|
+
}
|
1818
|
+
} : {},
|
1819
|
+
children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
1820
|
+
}
|
1821
|
+
)
|
1746
1822
|
}
|
1747
1823
|
)
|
1748
1824
|
},
|
@@ -1760,9 +1836,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1760
1836
|
var data_table_default = DataTable;
|
1761
1837
|
|
1762
1838
|
// src/components/data-table/hook/use-select-table.ts
|
1763
|
-
var
|
1839
|
+
var import_react33 = __toESM(require("react"));
|
1764
1840
|
var useSelectTable = (intialRowSelection) => {
|
1765
|
-
const [rowSelection, onRowSelectionChange] =
|
1841
|
+
const [rowSelection, onRowSelectionChange] = import_react33.default.useState(intialRowSelection != null ? intialRowSelection : {});
|
1766
1842
|
return {
|
1767
1843
|
rowSelection,
|
1768
1844
|
onRowSelectionChange
|
@@ -1770,10 +1846,10 @@ var useSelectTable = (intialRowSelection) => {
|
|
1770
1846
|
};
|
1771
1847
|
|
1772
1848
|
// src/components/datepicker/components/datepicker.tsx
|
1773
|
-
var
|
1849
|
+
var import_react37 = require("@chakra-ui/react");
|
1774
1850
|
var import_shared_utils8 = require("@chakra-ui/shared-utils");
|
1775
1851
|
var import_internal_icon6 = require("@ctlyst.id/internal-icon");
|
1776
|
-
var
|
1852
|
+
var import_react38 = require("@floating-ui/react");
|
1777
1853
|
var import_react_datepicker = __toESM(require("react-datepicker"));
|
1778
1854
|
|
1779
1855
|
// ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs
|
@@ -2311,12 +2387,12 @@ id.localize.month = buildLocalizeFn2({
|
|
2311
2387
|
|
2312
2388
|
// src/components/datepicker/components/styles.tsx
|
2313
2389
|
var import_system6 = require("@chakra-ui/system");
|
2314
|
-
var
|
2390
|
+
var import_react34 = require("@emotion/react");
|
2315
2391
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
2316
2392
|
var Styles = ({ showHeader }) => {
|
2317
2393
|
const { colorMode } = (0, import_system6.useColorMode)();
|
2318
2394
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
2319
|
-
|
2395
|
+
import_react34.Global,
|
2320
2396
|
{
|
2321
2397
|
styles: `
|
2322
2398
|
@charset "UTF-8";
|
@@ -3151,21 +3227,21 @@ var Styles = ({ showHeader }) => {
|
|
3151
3227
|
var styles_default = Styles;
|
3152
3228
|
|
3153
3229
|
// src/components/datepicker/components/time-input.tsx
|
3154
|
-
var
|
3155
|
-
var
|
3230
|
+
var import_react35 = require("@chakra-ui/react");
|
3231
|
+
var import_react36 = __toESM(require("react"));
|
3156
3232
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
3157
3233
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
3158
|
-
const [time, setTime] =
|
3234
|
+
const [time, setTime] = import_react36.default.useState(value || "00:00");
|
3159
3235
|
const handleChange = (e) => {
|
3160
3236
|
var _a, _b;
|
3161
3237
|
setTime(((_a = e.target) == null ? void 0 : _a.value) || "00:00");
|
3162
3238
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
3163
3239
|
};
|
3164
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
3165
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3166
|
-
/* @__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: [
|
3167
3243
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3168
|
-
|
3244
|
+
import_react35.Input,
|
3169
3245
|
{
|
3170
3246
|
onChange: handleChange,
|
3171
3247
|
type: "time",
|
@@ -3180,7 +3256,7 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
3180
3256
|
}
|
3181
3257
|
}
|
3182
3258
|
),
|
3183
|
-
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
3259
|
+
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react35.InputRightAddon, { children: rightAddon })
|
3184
3260
|
] })
|
3185
3261
|
] });
|
3186
3262
|
};
|
@@ -3236,7 +3312,7 @@ var Datepicker = ({
|
|
3236
3312
|
},
|
3237
3313
|
selected,
|
3238
3314
|
popperModifiers: [
|
3239
|
-
(0,
|
3315
|
+
(0, import_react38.offset)(4),
|
3240
3316
|
{
|
3241
3317
|
name: "placement",
|
3242
3318
|
fn: (state) => {
|
@@ -3256,10 +3332,10 @@ var Datepicker = ({
|
|
3256
3332
|
isError,
|
3257
3333
|
name,
|
3258
3334
|
sx: props.selectsRange ? { caretColor: "transparent" } : {},
|
3259
|
-
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: [
|
3260
3336
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_internal_icon6.Calendar, { size: 4, color: "neutral.400" }),
|
3261
3337
|
value && !props.disabled && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3262
|
-
|
3338
|
+
import_react37.IconButton,
|
3263
3339
|
{
|
3264
3340
|
"data-test-id": "H0rseVCzGIaqoLho-EPbu",
|
3265
3341
|
display: "flex",
|
@@ -3293,9 +3369,9 @@ var Datepicker = ({
|
|
3293
3369
|
if (props.inline) {
|
3294
3370
|
return component;
|
3295
3371
|
}
|
3296
|
-
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: [
|
3297
3373
|
component,
|
3298
|
-
!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 })
|
3299
3375
|
] });
|
3300
3376
|
};
|
3301
3377
|
Datepicker.defaultProps = {
|
@@ -3313,18 +3389,18 @@ Datepicker.defaultProps = {
|
|
3313
3389
|
var datepicker_default = Datepicker;
|
3314
3390
|
|
3315
3391
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
3316
|
-
var
|
3317
|
-
var
|
3318
|
-
var
|
3392
|
+
var import_react39 = require("@chakra-ui/react");
|
3393
|
+
var import_react40 = require("@emotion/react");
|
3394
|
+
var import_react41 = __toESM(require("react"));
|
3319
3395
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
3320
3396
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
3321
|
-
const [date, setDate] =
|
3397
|
+
const [date, setDate] = import_react41.default.useState(null);
|
3322
3398
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3323
|
-
|
3399
|
+
import_react39.Box,
|
3324
3400
|
{
|
3325
3401
|
fontSize: "12px",
|
3326
3402
|
lineHeight: "18px",
|
3327
|
-
css:
|
3403
|
+
css: import_react40.css`
|
3328
3404
|
input[type='date']::-webkit-inner-spin-button,
|
3329
3405
|
input[type='date']::-webkit-calendar-picker-indicator {
|
3330
3406
|
display: none;
|
@@ -3335,7 +3411,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3335
3411
|
}
|
3336
3412
|
`,
|
3337
3413
|
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3338
|
-
|
3414
|
+
import_react39.Input,
|
3339
3415
|
{
|
3340
3416
|
"data-test-id": props["data-test-id"],
|
3341
3417
|
type: "date",
|
@@ -3348,7 +3424,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3348
3424
|
min,
|
3349
3425
|
max,
|
3350
3426
|
required: true,
|
3351
|
-
css:
|
3427
|
+
css: import_react40.css`
|
3352
3428
|
border: 1px solid transparent;
|
3353
3429
|
|
3354
3430
|
&:focus,
|
@@ -3372,11 +3448,11 @@ DatePickerMonth.defaultProps = {
|
|
3372
3448
|
var datepicker_month_default = DatePickerMonth;
|
3373
3449
|
|
3374
3450
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
3375
|
-
var
|
3451
|
+
var import_react42 = require("@chakra-ui/react");
|
3376
3452
|
var import_styled = __toESM(require("@emotion/styled"));
|
3377
|
-
var
|
3453
|
+
var import_react43 = __toESM(require("react"));
|
3378
3454
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
3379
|
-
var MultiDateWrapper = (0, import_styled.default)(
|
3455
|
+
var MultiDateWrapper = (0, import_styled.default)(import_react42.Box)`
|
3380
3456
|
display: flex;
|
3381
3457
|
align-items: center;
|
3382
3458
|
width: fit-content;
|
@@ -3391,7 +3467,7 @@ var MultiDatePickerMonth = ({
|
|
3391
3467
|
min = "2020-01-01",
|
3392
3468
|
max = "2020-12-31"
|
3393
3469
|
}) => {
|
3394
|
-
const [date, setDate] =
|
3470
|
+
const [date, setDate] = import_react43.default.useState([null, null]);
|
3395
3471
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(MultiDateWrapper, { isError, children: [
|
3396
3472
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3397
3473
|
datepicker_month_default,
|
@@ -3405,7 +3481,7 @@ var MultiDatePickerMonth = ({
|
|
3405
3481
|
max
|
3406
3482
|
}
|
3407
3483
|
),
|
3408
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3484
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react42.Box, { children: "-" }),
|
3409
3485
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3410
3486
|
datepicker_month_default,
|
3411
3487
|
{
|
@@ -3428,7 +3504,7 @@ MultiDatePickerMonth.defaultProps = {
|
|
3428
3504
|
var multi_datepicker_month_default = MultiDatePickerMonth;
|
3429
3505
|
|
3430
3506
|
// src/components/dialog/components/dialog.tsx
|
3431
|
-
var
|
3507
|
+
var import_react44 = require("@chakra-ui/react");
|
3432
3508
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
3433
3509
|
var Dialog = ({
|
3434
3510
|
title,
|
@@ -3439,12 +3515,12 @@ var Dialog = ({
|
|
3439
3515
|
isOverlayClickable,
|
3440
3516
|
...props
|
3441
3517
|
}) => {
|
3442
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3443
|
-
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3444
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3445
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3446
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3447
|
-
/* @__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 })
|
3448
3524
|
] })
|
3449
3525
|
] });
|
3450
3526
|
};
|
@@ -3459,7 +3535,7 @@ var dialog_default = Dialog;
|
|
3459
3535
|
var Icon2 = __toESM(require("@ctlyst.id/internal-icon"));
|
3460
3536
|
|
3461
3537
|
// src/components/empty-state/components/layout.tsx
|
3462
|
-
var
|
3538
|
+
var import_react45 = require("@chakra-ui/react");
|
3463
3539
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
3464
3540
|
var EmptyState = (props) => {
|
3465
3541
|
const { icon, title, description, buttonText, onClick } = props;
|
@@ -3468,13 +3544,13 @@ var EmptyState = (props) => {
|
|
3468
3544
|
onClick();
|
3469
3545
|
}
|
3470
3546
|
};
|
3471
|
-
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: [
|
3472
3548
|
icon,
|
3473
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
3474
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3475
|
-
/* @__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 })
|
3476
3552
|
] }),
|
3477
|
-
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 }) })
|
3478
3554
|
] }) });
|
3479
3555
|
};
|
3480
3556
|
var layout_default = EmptyState;
|
@@ -3551,28 +3627,28 @@ EmptyState2.NotAuthorize = EmptyStateNotAuthorize;
|
|
3551
3627
|
var empty_state_default = EmptyState2;
|
3552
3628
|
|
3553
3629
|
// src/components/header/components/header.tsx
|
3554
|
-
var
|
3630
|
+
var import_react52 = require("@chakra-ui/react");
|
3555
3631
|
|
3556
3632
|
// src/components/header/components/logo.tsx
|
3557
|
-
var
|
3633
|
+
var import_react46 = require("@chakra-ui/react");
|
3558
3634
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
3559
3635
|
var Logo = ({ url, imageUrl, height }) => {
|
3560
3636
|
if (url)
|
3561
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3562
|
-
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" });
|
3563
3639
|
};
|
3564
3640
|
var XMSLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3565
|
-
|
3641
|
+
import_react46.Image,
|
3566
3642
|
{
|
3567
3643
|
height: 8,
|
3568
|
-
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")
|
3569
3645
|
}
|
3570
3646
|
);
|
3571
3647
|
var VoilaLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3572
|
-
|
3648
|
+
import_react46.Image,
|
3573
3649
|
{
|
3574
3650
|
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
3575
|
-
filter: (0,
|
3651
|
+
filter: (0, import_react46.useColorModeValue)("none", "invert(1)"),
|
3576
3652
|
maxW: 24
|
3577
3653
|
}
|
3578
3654
|
);
|
@@ -3582,16 +3658,16 @@ Logo.defaultProps = {
|
|
3582
3658
|
};
|
3583
3659
|
|
3584
3660
|
// src/components/header/components/profile.tsx
|
3585
|
-
var
|
3661
|
+
var import_react49 = require("@chakra-ui/react");
|
3586
3662
|
var import_fi2 = require("react-icons/fi");
|
3587
3663
|
|
3588
3664
|
// src/components/nav-item/components/nav-item.tsx
|
3589
|
-
var
|
3665
|
+
var import_react47 = require("@chakra-ui/react");
|
3590
3666
|
var import_shared_utils9 = require("@chakra-ui/shared-utils");
|
3591
3667
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
3592
3668
|
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
3593
3669
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
3594
|
-
|
3670
|
+
import_react47.Link,
|
3595
3671
|
{
|
3596
3672
|
"data-test-id": props["data-test-id"],
|
3597
3673
|
opacity: isDisabled ? "0.3" : "initial",
|
@@ -3631,7 +3707,7 @@ NavItem.defaultProps = {
|
|
3631
3707
|
};
|
3632
3708
|
|
3633
3709
|
// src/components/tooltip/components/tooltip.tsx
|
3634
|
-
var
|
3710
|
+
var import_react48 = require("@chakra-ui/react");
|
3635
3711
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
3636
3712
|
var Tooltip = (props) => {
|
3637
3713
|
const {
|
@@ -3644,7 +3720,7 @@ var Tooltip = (props) => {
|
|
3644
3720
|
fontWeight = "400"
|
3645
3721
|
} = props;
|
3646
3722
|
const content = ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
3647
|
-
|
3723
|
+
import_react48.PopoverContent,
|
3648
3724
|
{
|
3649
3725
|
"data-test-id": "",
|
3650
3726
|
border: "none",
|
@@ -3658,15 +3734,15 @@ var Tooltip = (props) => {
|
|
3658
3734
|
onClose();
|
3659
3735
|
},
|
3660
3736
|
children: [
|
3661
|
-
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3662
|
-
/* @__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 })
|
3663
3739
|
]
|
3664
3740
|
}
|
3665
3741
|
);
|
3666
|
-
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3667
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3668
|
-
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3669
|
-
] }) }) : /* @__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 });
|
3670
3746
|
};
|
3671
3747
|
|
3672
3748
|
// src/components/header/components/profile.tsx
|
@@ -3682,10 +3758,10 @@ var Profile = ({
|
|
3682
3758
|
...props
|
3683
3759
|
}) => {
|
3684
3760
|
var _a, _b;
|
3685
|
-
const { isOpen, onToggle, onClose } = (0,
|
3686
|
-
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: [
|
3687
3763
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3688
|
-
|
3764
|
+
import_react49.Box,
|
3689
3765
|
{
|
3690
3766
|
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
3691
3767
|
as: "button",
|
@@ -3701,14 +3777,14 @@ var Profile = ({
|
|
3701
3777
|
onClick: onToggle,
|
3702
3778
|
color,
|
3703
3779
|
...props,
|
3704
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3705
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3706
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3707
|
-
/* @__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: [
|
3708
3784
|
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
3709
|
-
/* @__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" }),
|
3710
3786
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3711
|
-
|
3787
|
+
import_react49.Box,
|
3712
3788
|
{
|
3713
3789
|
className: "catalyst_header-profile-divider",
|
3714
3790
|
h: "3",
|
@@ -3718,17 +3794,17 @@ var Profile = ({
|
|
3718
3794
|
}
|
3719
3795
|
)
|
3720
3796
|
] }),
|
3721
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3722
|
-
/* @__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] }),
|
3723
3799
|
data.office.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3724
3800
|
Tooltip,
|
3725
3801
|
{
|
3726
3802
|
isInteractive: true,
|
3727
3803
|
hasArrow: true,
|
3728
3804
|
p: "2",
|
3729
|
-
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3730
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3731
|
-
/* @__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(", ") })
|
3732
3808
|
] }),
|
3733
3809
|
textAlign: "left",
|
3734
3810
|
placement: "bottom-end",
|
@@ -3739,7 +3815,7 @@ var Profile = ({
|
|
3739
3815
|
},
|
3740
3816
|
width: 300,
|
3741
3817
|
...officeContainer,
|
3742
|
-
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)(
|
3743
3819
|
badge_default,
|
3744
3820
|
{
|
3745
3821
|
rounded: "full",
|
@@ -3756,18 +3832,18 @@ var Profile = ({
|
|
3756
3832
|
) })
|
3757
3833
|
}
|
3758
3834
|
)
|
3759
|
-
] }) : /* @__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" })
|
3760
3836
|
] })
|
3761
3837
|
] }),
|
3762
|
-
/* @__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 }) }) })
|
3763
3839
|
] })
|
3764
3840
|
}
|
3765
3841
|
),
|
3766
|
-
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3767
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3768
|
-
/* @__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: [
|
3769
3845
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_fi2.FiPower, {}),
|
3770
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react49.Text, { ml: "2", children: "Logout" })
|
3771
3847
|
] }) }) })
|
3772
3848
|
] })
|
3773
3849
|
] });
|
@@ -3780,17 +3856,17 @@ Profile.defaultProps = {
|
|
3780
3856
|
};
|
3781
3857
|
|
3782
3858
|
// src/components/header/components/switch-mode.tsx
|
3783
|
-
var
|
3859
|
+
var import_react50 = require("@chakra-ui/react");
|
3784
3860
|
var import_fi3 = require("react-icons/fi");
|
3785
3861
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
3786
3862
|
var SwitchMode = () => {
|
3787
|
-
const { colorMode, toggleColorMode } = (0,
|
3788
|
-
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 }) });
|
3789
3865
|
};
|
3790
3866
|
var switch_mode_default = SwitchMode;
|
3791
3867
|
|
3792
3868
|
// src/components/header/components/version.tsx
|
3793
|
-
var
|
3869
|
+
var import_react51 = require("@chakra-ui/react");
|
3794
3870
|
|
3795
3871
|
// src/components/header/utils/formatter.ts
|
3796
3872
|
function environmentName(env) {
|
@@ -3828,7 +3904,7 @@ var Version = ({
|
|
3828
3904
|
}
|
3829
3905
|
) : version,
|
3830
3906
|
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
3831
|
-
|
3907
|
+
import_react51.Box,
|
3832
3908
|
{
|
3833
3909
|
background: "primary.50",
|
3834
3910
|
color: "primary.500",
|
@@ -3868,8 +3944,8 @@ var Header = ({
|
|
3868
3944
|
bg = "white",
|
3869
3945
|
versionStyle,
|
3870
3946
|
...props
|
3871
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3872
|
-
|
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,
|
3873
3949
|
{
|
3874
3950
|
h: "auto",
|
3875
3951
|
w: "full",
|
@@ -3877,11 +3953,11 @@ var Header = ({
|
|
3877
3953
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
3878
3954
|
pos: "relative",
|
3879
3955
|
children: [
|
3880
|
-
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3956
|
+
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react52.Flex, { alignItems: "center", children: [
|
3881
3957
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
3882
3958
|
children && children
|
3883
3959
|
] }),
|
3884
|
-
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: [
|
3885
3961
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
3886
3962
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3887
3963
|
Version,
|
@@ -3894,7 +3970,7 @@ var Header = ({
|
|
3894
3970
|
}
|
3895
3971
|
)
|
3896
3972
|
] }),
|
3897
|
-
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3973
|
+
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react52.Flex, { alignItems: "center", children: [
|
3898
3974
|
!hideSwitchMode && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(switch_mode_default, {}),
|
3899
3975
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Profile, { color: props.color, brandColor, data, onLogout })
|
3900
3976
|
] })
|
@@ -3918,11 +3994,11 @@ Header.defaultProps = {
|
|
3918
3994
|
};
|
3919
3995
|
|
3920
3996
|
// src/components/header/components/navbar.tsx
|
3921
|
-
var
|
3997
|
+
var import_react53 = require("@chakra-ui/react");
|
3922
3998
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
3923
3999
|
var Navbar = ({ bg = "white", children, ...props }) => {
|
3924
4000
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
3925
|
-
|
4001
|
+
import_react53.Flex,
|
3926
4002
|
{
|
3927
4003
|
minH: "15",
|
3928
4004
|
h: "15",
|
@@ -3942,21 +4018,21 @@ var Navbar = ({ bg = "white", children, ...props }) => {
|
|
3942
4018
|
Navbar.displayName = "Navbar";
|
3943
4019
|
|
3944
4020
|
// src/components/image/index.ts
|
3945
|
-
var
|
4021
|
+
var import_react54 = require("@chakra-ui/react");
|
3946
4022
|
|
3947
4023
|
// src/components/layouting/index.ts
|
3948
|
-
var
|
4024
|
+
var import_react55 = require("@chakra-ui/react");
|
3949
4025
|
|
3950
4026
|
// src/components/list/index.tsx
|
3951
|
-
var
|
4027
|
+
var import_react56 = require("@chakra-ui/react");
|
3952
4028
|
|
3953
4029
|
// src/components/modal/components/modal-back-button.tsx
|
3954
4030
|
var import_icons3 = require("@chakra-ui/icons");
|
3955
|
-
var
|
4031
|
+
var import_react57 = require("@chakra-ui/react");
|
3956
4032
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
3957
4033
|
var ModalBackButton = ({ onClick }) => {
|
3958
4034
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
3959
|
-
|
4035
|
+
import_react57.IconButton,
|
3960
4036
|
{
|
3961
4037
|
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons3.ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
3962
4038
|
size: "sm",
|
@@ -3976,12 +4052,12 @@ var ModalBackButton = ({ onClick }) => {
|
|
3976
4052
|
var modal_back_button_default = ModalBackButton;
|
3977
4053
|
|
3978
4054
|
// src/components/modal/index.ts
|
3979
|
-
var
|
4055
|
+
var import_react58 = require("@chakra-ui/react");
|
3980
4056
|
|
3981
4057
|
// src/components/navigation/components/navigation.tsx
|
3982
|
-
var
|
4058
|
+
var import_react59 = require("@chakra-ui/react");
|
3983
4059
|
var Icon5 = __toESM(require("@ctlyst.id/internal-icon"));
|
3984
|
-
var
|
4060
|
+
var import_react60 = require("@emotion/react");
|
3985
4061
|
|
3986
4062
|
// src/components/navigation/components/mapping-icon.tsx
|
3987
4063
|
var Icon4 = __toESM(require("@ctlyst.id/internal-icon"));
|
@@ -4004,8 +4080,8 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
4004
4080
|
// src/components/navigation/components/navigation.tsx
|
4005
4081
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
4006
4082
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
4007
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4008
|
-
|
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,
|
4009
4085
|
{
|
4010
4086
|
bg: "white",
|
4011
4087
|
w: "full",
|
@@ -4019,9 +4095,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4019
4095
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
4020
4096
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
4021
4097
|
const activeBg = isActive ? "primary.500" : void 0;
|
4022
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4023
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4024
|
-
|
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,
|
4025
4101
|
{
|
4026
4102
|
h: 7.5,
|
4027
4103
|
p: 2,
|
@@ -4038,10 +4114,10 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4038
4114
|
children: navigation.title
|
4039
4115
|
}
|
4040
4116
|
) }),
|
4041
|
-
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4042
|
-
|
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,
|
4043
4119
|
{
|
4044
|
-
bg: (0,
|
4120
|
+
bg: (0, import_react59.useColorModeValue)("white", "ebony-clay.800"),
|
4045
4121
|
maxW: 250,
|
4046
4122
|
border: "none",
|
4047
4123
|
borderRadius: "md",
|
@@ -4051,7 +4127,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4051
4127
|
const isLocalLink = host === navHost;
|
4052
4128
|
const isActiveSub = activePath === navLink;
|
4053
4129
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4054
|
-
|
4130
|
+
import_react59.Link,
|
4055
4131
|
{
|
4056
4132
|
as: isLocalLink ? as : void 0,
|
4057
4133
|
href: link,
|
@@ -4059,7 +4135,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4059
4135
|
textDecoration: "none"
|
4060
4136
|
},
|
4061
4137
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
4062
|
-
|
4138
|
+
import_react59.Box,
|
4063
4139
|
{
|
4064
4140
|
display: "flex",
|
4065
4141
|
position: "relative",
|
@@ -4067,24 +4143,24 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
4067
4143
|
cursor: "pointer",
|
4068
4144
|
transition: "padding 0.35s ease 0s",
|
4069
4145
|
_hover: {
|
4070
|
-
backgroundColor: (0,
|
4071
|
-
color: (0,
|
4146
|
+
backgroundColor: (0, import_react59.useColorModeValue)("dove-gray.50", "mirage.900"),
|
4147
|
+
color: (0, import_react59.useColorModeValue)("primary.500", "dove-gray.600"),
|
4072
4148
|
px: 5,
|
4073
4149
|
py: 4,
|
4074
4150
|
_first: { borderTopRadius: "md" },
|
4075
4151
|
_last: { borderBottomRadius: "md" }
|
4076
4152
|
},
|
4077
4153
|
color: isActiveSub ? "primary.500" : "inherit",
|
4078
|
-
css:
|
4154
|
+
css: import_react60.css`
|
4079
4155
|
border-spacing: 4px;
|
4080
4156
|
`,
|
4081
4157
|
px: 6,
|
4082
4158
|
py: 4,
|
4083
4159
|
children: [
|
4084
4160
|
mappingIcon.get(navigation.title),
|
4085
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4161
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react59.Text, { fontSize: "text.sm", ml: 3, children: title }),
|
4086
4162
|
isActiveSub && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
4087
|
-
|
4163
|
+
import_react59.Box,
|
4088
4164
|
{
|
4089
4165
|
width: 0.5,
|
4090
4166
|
height: 8,
|
@@ -4117,7 +4193,7 @@ Navigation.defaultProps = {
|
|
4117
4193
|
var navigation_default = Navigation;
|
4118
4194
|
|
4119
4195
|
// src/components/navigation/components/navigation-bar.tsx
|
4120
|
-
var
|
4196
|
+
var import_react61 = require("@chakra-ui/react");
|
4121
4197
|
var Icon6 = __toESM(require("@ctlyst.id/internal-icon"));
|
4122
4198
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
4123
4199
|
var NavigationBar = ({
|
@@ -4134,8 +4210,8 @@ var NavigationBar = ({
|
|
4134
4210
|
}
|
4135
4211
|
return subMenu.navHost + subMenu.navLink;
|
4136
4212
|
};
|
4137
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4138
|
-
|
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,
|
4139
4215
|
{
|
4140
4216
|
bg: "white",
|
4141
4217
|
w: "full",
|
@@ -4151,9 +4227,9 @@ var NavigationBar = ({
|
|
4151
4227
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
4152
4228
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
4153
4229
|
const activeBg = isActive ? "primary.500" : void 0;
|
4154
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4155
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4156
|
-
|
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,
|
4157
4233
|
{
|
4158
4234
|
h: 7.5,
|
4159
4235
|
p: 2,
|
@@ -4170,8 +4246,8 @@ var NavigationBar = ({
|
|
4170
4246
|
children: item.title
|
4171
4247
|
}
|
4172
4248
|
) }),
|
4173
|
-
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4174
|
-
|
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,
|
4175
4251
|
{
|
4176
4252
|
href: urlMenu(subMenu),
|
4177
4253
|
display: "flex",
|
@@ -4188,7 +4264,7 @@ var NavigationBar = ({
|
|
4188
4264
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
4189
4265
|
children: [
|
4190
4266
|
mappingIcon2.get(item.title),
|
4191
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4267
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react61.Text, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
4192
4268
|
]
|
4193
4269
|
},
|
4194
4270
|
subMenu.id
|
@@ -4205,18 +4281,18 @@ var navigation_bar_default = NavigationBar;
|
|
4205
4281
|
|
4206
4282
|
// src/components/pagination/components/pagination.tsx
|
4207
4283
|
var import_icons4 = require("@chakra-ui/icons");
|
4208
|
-
var
|
4284
|
+
var import_react64 = require("@chakra-ui/react");
|
4209
4285
|
|
4210
4286
|
// src/components/pagination/components/pagination-button.tsx
|
4211
|
-
var
|
4287
|
+
var import_react62 = require("@chakra-ui/react");
|
4212
4288
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
4213
|
-
var PaginationButton = (0,
|
4214
|
-
const btnBg = (0,
|
4215
|
-
const btnColor = (0,
|
4216
|
-
const btnNotActiveBg = (0,
|
4217
|
-
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");
|
4218
4294
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
4219
|
-
|
4295
|
+
import_react62.Button,
|
4220
4296
|
{
|
4221
4297
|
"data-test-id": "Pagination-Button",
|
4222
4298
|
ref,
|
@@ -4241,7 +4317,7 @@ var PaginationButton = (0, import_react60.forwardRef)(({ className, style, isAct
|
|
4241
4317
|
color: "neutral.300"
|
4242
4318
|
},
|
4243
4319
|
_disabled: {
|
4244
|
-
background: (0,
|
4320
|
+
background: (0, import_react62.useColorModeValue)("neutral.300", "mirage.900"),
|
4245
4321
|
color: "neutral.600",
|
4246
4322
|
pointerEvents: "none"
|
4247
4323
|
},
|
@@ -4257,7 +4333,7 @@ PaginationButton.defaultProps = {
|
|
4257
4333
|
var pagination_button_default = PaginationButton;
|
4258
4334
|
|
4259
4335
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
4260
|
-
var
|
4336
|
+
var import_react63 = require("@chakra-ui/react");
|
4261
4337
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
4262
4338
|
var PaginationButtonTrigger = ({
|
4263
4339
|
color,
|
@@ -4266,7 +4342,7 @@ var PaginationButtonTrigger = ({
|
|
4266
4342
|
visuallyHidden,
|
4267
4343
|
icon
|
4268
4344
|
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
4269
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
4345
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react63.VisuallyHidden, { children: visuallyHidden }),
|
4270
4346
|
icon
|
4271
4347
|
] });
|
4272
4348
|
PaginationButtonTrigger.defaultProps = {
|
@@ -4281,8 +4357,8 @@ var pagination_button_trigger_default = PaginationButtonTrigger;
|
|
4281
4357
|
// src/components/pagination/components/pagination.tsx
|
4282
4358
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
4283
4359
|
var Pagination = ({ className, current, total, onSelect }) => {
|
4284
|
-
const btnColorDisabled = (0,
|
4285
|
-
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");
|
4286
4362
|
const disabledPrevious = current === 1;
|
4287
4363
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
4288
4364
|
const disabledNext = current === total;
|
@@ -4309,8 +4385,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4309
4385
|
}
|
4310
4386
|
return pageButtons;
|
4311
4387
|
};
|
4312
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4313
|
-
/* @__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)(
|
4314
4390
|
pagination_button_trigger_default,
|
4315
4391
|
{
|
4316
4392
|
"data-test-id": "Pagination-Button",
|
@@ -4321,7 +4397,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4321
4397
|
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons4.ArrowLeftIcon, { width: 2 })
|
4322
4398
|
}
|
4323
4399
|
) }),
|
4324
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4400
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react64.Box, { bg: "neutral.300", borderRadius: "full", children: [
|
4325
4401
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4326
4402
|
pagination_button_trigger_default,
|
4327
4403
|
{
|
@@ -4340,7 +4416,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4340
4416
|
"data-test-id": "Pagination-Button",
|
4341
4417
|
isActive: page === current,
|
4342
4418
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
4343
|
-
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 })
|
4344
4420
|
},
|
4345
4421
|
page
|
4346
4422
|
);
|
@@ -4357,7 +4433,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4357
4433
|
}
|
4358
4434
|
)
|
4359
4435
|
] }),
|
4360
|
-
/* @__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)(
|
4361
4437
|
pagination_button_trigger_default,
|
4362
4438
|
{
|
4363
4439
|
"data-test-id": "Pagination-Button",
|
@@ -4378,7 +4454,7 @@ Pagination.displayName = "Pagination";
|
|
4378
4454
|
var pagination_default = Pagination;
|
4379
4455
|
|
4380
4456
|
// src/components/pagination/components/pagination-detail.tsx
|
4381
|
-
var
|
4457
|
+
var import_react65 = require("@chakra-ui/react");
|
4382
4458
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
4383
4459
|
var PaginationDetail = ({
|
4384
4460
|
page,
|
@@ -4389,12 +4465,12 @@ var PaginationDetail = ({
|
|
4389
4465
|
lineHeight = 18,
|
4390
4466
|
...rest
|
4391
4467
|
}) => {
|
4392
|
-
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` });
|
4393
4469
|
};
|
4394
4470
|
var pagination_detail_default = PaginationDetail;
|
4395
4471
|
|
4396
4472
|
// src/components/pagination/components/pagination-filter.tsx
|
4397
|
-
var
|
4473
|
+
var import_react66 = require("@chakra-ui/react");
|
4398
4474
|
var React10 = __toESM(require("react"));
|
4399
4475
|
var import_fi4 = require("react-icons/fi");
|
4400
4476
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
@@ -4406,10 +4482,10 @@ var PaginationFilter = ({
|
|
4406
4482
|
...rest
|
4407
4483
|
}) => {
|
4408
4484
|
const [value, setValue] = React10.useState(limit);
|
4409
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
4410
|
-
/* @__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 }),
|
4411
4487
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4412
|
-
|
4488
|
+
import_react66.Select,
|
4413
4489
|
{
|
4414
4490
|
textAlign: "center",
|
4415
4491
|
size: "xs",
|
@@ -4439,22 +4515,22 @@ PaginationFilter.defaultProps = {
|
|
4439
4515
|
var pagination_filter_default = PaginationFilter;
|
4440
4516
|
|
4441
4517
|
// src/components/pin-input/index.ts
|
4442
|
-
var
|
4518
|
+
var import_react67 = require("@chakra-ui/react");
|
4443
4519
|
|
4444
4520
|
// src/components/popover/index.ts
|
4445
|
-
var
|
4521
|
+
var import_react68 = require("@chakra-ui/react");
|
4446
4522
|
|
4447
4523
|
// src/components/progress/index.ts
|
4448
|
-
var
|
4524
|
+
var import_react69 = require("@chakra-ui/react");
|
4449
4525
|
|
4450
4526
|
// src/components/radio/components/radio.tsx
|
4451
|
-
var
|
4527
|
+
var import_react70 = require("@chakra-ui/react");
|
4452
4528
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
4453
4529
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
4454
4530
|
const variant = isError ? "errors" : "unstyled";
|
4455
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
4456
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
4457
|
-
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
|
4458
4534
|
] });
|
4459
4535
|
};
|
4460
4536
|
Radio.displayName = "Radio";
|
@@ -4465,7 +4541,7 @@ Radio.defaultProps = {
|
|
4465
4541
|
};
|
4466
4542
|
|
4467
4543
|
// src/components/radio/components/radio-group.tsx
|
4468
|
-
var
|
4544
|
+
var import_react71 = require("@chakra-ui/react");
|
4469
4545
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
4470
4546
|
var RadioGroup = ({
|
4471
4547
|
children,
|
@@ -4475,7 +4551,7 @@ var RadioGroup = ({
|
|
4475
4551
|
errorMessage,
|
4476
4552
|
...props
|
4477
4553
|
}) => {
|
4478
|
-
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 }) }) }) });
|
4479
4555
|
};
|
4480
4556
|
RadioGroup.displayName = "RadioGroup";
|
4481
4557
|
RadioGroup.defaultProps = {
|
@@ -4485,34 +4561,34 @@ RadioGroup.defaultProps = {
|
|
4485
4561
|
};
|
4486
4562
|
|
4487
4563
|
// src/components/radio/index.ts
|
4488
|
-
var
|
4564
|
+
var import_react72 = require("@chakra-ui/react");
|
4489
4565
|
|
4490
4566
|
// src/components/rating/components/rating.tsx
|
4491
|
-
var
|
4567
|
+
var import_react73 = require("@chakra-ui/react");
|
4492
4568
|
var import_internal_icon7 = require("@ctlyst.id/internal-icon");
|
4493
4569
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
4494
4570
|
var Rating = ({ value }) => {
|
4495
|
-
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 })) });
|
4496
4572
|
};
|
4497
4573
|
var rating_default = Rating;
|
4498
4574
|
|
4499
4575
|
// src/components/select/components/select.tsx
|
4500
|
-
var
|
4576
|
+
var import_react77 = require("@chakra-ui/react");
|
4501
4577
|
var import_system7 = require("@chakra-ui/system");
|
4502
4578
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4503
4579
|
var import_react_select = __toESM(require("react-select"));
|
4504
4580
|
|
4505
4581
|
// src/config/theme/foundations/shadows.ts
|
4506
|
-
var
|
4582
|
+
var import_react74 = require("@chakra-ui/react");
|
4507
4583
|
var shadows = {
|
4508
|
-
...
|
4584
|
+
...import_react74.theme.shadows,
|
4509
4585
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4510
4586
|
};
|
4511
4587
|
|
4512
4588
|
// src/config/theme/foundations/sizes.ts
|
4513
|
-
var
|
4589
|
+
var import_react75 = require("@chakra-ui/react");
|
4514
4590
|
var sizes = {
|
4515
|
-
...
|
4591
|
+
...import_react75.theme.sizes,
|
4516
4592
|
4.5: "1.125rem",
|
4517
4593
|
9.5: "2.375rem",
|
4518
4594
|
18: "4.5rem",
|
@@ -4522,9 +4598,9 @@ var sizes = {
|
|
4522
4598
|
};
|
4523
4599
|
|
4524
4600
|
// src/config/theme/foundations/spacing.ts
|
4525
|
-
var
|
4601
|
+
var import_react76 = require("@chakra-ui/react");
|
4526
4602
|
var spacing = {
|
4527
|
-
...
|
4603
|
+
...import_react76.theme.space,
|
4528
4604
|
4.5: "1.125rem",
|
4529
4605
|
9.5: "2.375rem",
|
4530
4606
|
18: "4.5rem",
|
@@ -4884,13 +4960,13 @@ function ClearIndicator(props) {
|
|
4884
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" }) });
|
4885
4961
|
}
|
4886
4962
|
function MultiValue(props) {
|
4887
|
-
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 }) });
|
4888
4964
|
}
|
4889
4965
|
function MultiValueRemove(props) {
|
4890
|
-
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" }) }) });
|
4891
4967
|
}
|
4892
4968
|
function NoOptionsMessage(props) {
|
4893
|
-
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" });
|
4894
4970
|
}
|
4895
4971
|
function Select2({
|
4896
4972
|
styles,
|
@@ -4998,7 +5074,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
4998
5074
|
}
|
4999
5075
|
|
5000
5076
|
// src/components/select/components/select-with-checkbox.tsx
|
5001
|
-
var
|
5077
|
+
var import_react78 = require("@chakra-ui/react");
|
5002
5078
|
var import_system11 = require("@chakra-ui/system");
|
5003
5079
|
var import_react_select2 = __toESM(require("react-select"));
|
5004
5080
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
@@ -5061,7 +5137,7 @@ var InputOption = ({
|
|
5061
5137
|
innerProps: props,
|
5062
5138
|
...rest,
|
5063
5139
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
5064
|
-
|
5140
|
+
import_react78.Flex,
|
5065
5141
|
{
|
5066
5142
|
alignItems: "center",
|
5067
5143
|
width: "100%",
|
@@ -5070,7 +5146,7 @@ var InputOption = ({
|
|
5070
5146
|
cursor: isDisabled ? "not-allowed" : "default",
|
5071
5147
|
children: [
|
5072
5148
|
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5073
|
-
|
5149
|
+
import_react78.Checkbox,
|
5074
5150
|
{
|
5075
5151
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
5076
5152
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
@@ -5079,14 +5155,14 @@ var InputOption = ({
|
|
5079
5155
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
5080
5156
|
}
|
5081
5157
|
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
5082
|
-
|
5158
|
+
import_react78.Checkbox,
|
5083
5159
|
{
|
5084
5160
|
pointerEvents: "none",
|
5085
5161
|
isChecked: isSelected,
|
5086
5162
|
"data-test-id": "CT_component_select-checkbox_option-checkbox"
|
5087
5163
|
}
|
5088
5164
|
),
|
5089
|
-
/* @__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 })
|
5090
5166
|
]
|
5091
5167
|
}
|
5092
5168
|
)
|
@@ -5158,13 +5234,13 @@ var SelectCheckbox = (props) => {
|
|
5158
5234
|
var select_with_checkbox_default = SelectCheckbox;
|
5159
5235
|
|
5160
5236
|
// src/components/sidebar/components/sidebar.tsx
|
5161
|
-
var
|
5237
|
+
var import_react79 = require("@chakra-ui/react");
|
5162
5238
|
var import_framer_motion = require("framer-motion");
|
5163
5239
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5164
5240
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5165
5241
|
const { width = "220px" } = props;
|
5166
5242
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5167
|
-
|
5243
|
+
import_react79.Flex,
|
5168
5244
|
{
|
5169
5245
|
position: "relative",
|
5170
5246
|
as: import_framer_motion.motion.div,
|
@@ -5184,13 +5260,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5184
5260
|
Sidebar.displayName = "Sidebar";
|
5185
5261
|
|
5186
5262
|
// src/components/sidebar/components/sidebar-header.tsx
|
5187
|
-
var
|
5263
|
+
var import_react80 = require("@chakra-ui/react");
|
5188
5264
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5189
5265
|
var import_framer_motion2 = require("framer-motion");
|
5190
5266
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5191
5267
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5192
5268
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5193
|
-
|
5269
|
+
import_react80.Box,
|
5194
5270
|
{
|
5195
5271
|
px: "2",
|
5196
5272
|
color: "neutral.900",
|
@@ -5200,7 +5276,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5200
5276
|
color: "primary.500"
|
5201
5277
|
},
|
5202
5278
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5203
|
-
|
5279
|
+
import_react80.Flex,
|
5204
5280
|
{
|
5205
5281
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5206
5282
|
direction: "row",
|
@@ -5210,7 +5286,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5210
5286
|
cursor: "pointer",
|
5211
5287
|
children: [
|
5212
5288
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5213
|
-
|
5289
|
+
import_react80.Box,
|
5214
5290
|
{
|
5215
5291
|
as: import_framer_motion2.motion.div,
|
5216
5292
|
boxSize: "4",
|
@@ -5221,8 +5297,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5221
5297
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5222
5298
|
}
|
5223
5299
|
),
|
5224
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5225
|
-
|
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,
|
5226
5302
|
{
|
5227
5303
|
as: import_framer_motion2.motion.div,
|
5228
5304
|
w: "max-content",
|
@@ -5248,32 +5324,32 @@ SidebarHeader.defaultProps = {
|
|
5248
5324
|
};
|
5249
5325
|
|
5250
5326
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5251
|
-
var
|
5327
|
+
var import_react81 = require("@chakra-ui/react");
|
5252
5328
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5253
5329
|
var import_framer_motion3 = require("framer-motion");
|
5254
5330
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5255
5331
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5256
5332
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5257
|
-
|
5333
|
+
import_react81.Box,
|
5258
5334
|
{
|
5259
5335
|
as: import_framer_motion3.motion.div,
|
5260
5336
|
transitionTimingFunction: "linear",
|
5261
5337
|
initial: { padding: "8px" },
|
5262
5338
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5263
|
-
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) => {
|
5264
5340
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5265
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5266
5342
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5267
5343
|
const noChild = !item.children.length;
|
5268
5344
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5269
5345
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5270
|
-
/* @__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 }) => {
|
5271
5347
|
const activeOption = isOpen ? "primary.50" : "white";
|
5272
5348
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5273
5349
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5274
5350
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5275
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5276
|
-
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5352
|
+
import_react81.AccordionButton,
|
5277
5353
|
{
|
5278
5354
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5279
5355
|
p: "0",
|
@@ -5291,9 +5367,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5291
5367
|
position: "relative",
|
5292
5368
|
...itemStyles,
|
5293
5369
|
children: [
|
5294
|
-
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 || "") }),
|
5295
5371
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5296
|
-
|
5372
|
+
import_react81.Box,
|
5297
5373
|
{
|
5298
5374
|
display: "flex",
|
5299
5375
|
w: "full",
|
@@ -5307,9 +5383,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5307
5383
|
animate: { opacity: 1, x: 0 },
|
5308
5384
|
exit: { opacity: 0, x: 16 },
|
5309
5385
|
children: [
|
5310
|
-
/* @__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 }) }),
|
5311
5387
|
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5312
|
-
|
5388
|
+
import_react81.Box,
|
5313
5389
|
{
|
5314
5390
|
display: "flex",
|
5315
5391
|
boxSize: "3",
|
@@ -5329,12 +5405,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5329
5405
|
},
|
5330
5406
|
item.id
|
5331
5407
|
) }, item.id),
|
5332
|
-
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5333
|
-
/* @__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: [
|
5334
5410
|
mappingIcon2.get(item.icon || ""),
|
5335
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5411
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react81.Box, { as: "span", ml: "2", children: item.title })
|
5336
5412
|
] }) }),
|
5337
|
-
!!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)(
|
5338
5414
|
NavItem,
|
5339
5415
|
{
|
5340
5416
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5350,7 +5426,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5350
5426
|
},
|
5351
5427
|
submenu.id
|
5352
5428
|
)) })
|
5353
|
-
] }) : 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)(
|
5354
5430
|
NavItem,
|
5355
5431
|
{
|
5356
5432
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5363,8 +5439,8 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5363
5439
|
rounded: "none",
|
5364
5440
|
...itemStyles,
|
5365
5441
|
children: [
|
5366
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5367
|
-
/* @__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 }) })
|
5368
5444
|
]
|
5369
5445
|
},
|
5370
5446
|
item.id
|
@@ -5372,13 +5448,13 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5372
5448
|
] });
|
5373
5449
|
} }, item.id),
|
5374
5450
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5375
|
-
|
5451
|
+
import_react81.Fade,
|
5376
5452
|
{
|
5377
5453
|
in: true,
|
5378
5454
|
transition: {
|
5379
5455
|
enter: { duration: 0.5 }
|
5380
5456
|
},
|
5381
|
-
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)(
|
5382
5458
|
NavItem,
|
5383
5459
|
{
|
5384
5460
|
mt: "1",
|
@@ -5406,16 +5482,16 @@ SidebarMenu.defaultProps = {
|
|
5406
5482
|
};
|
5407
5483
|
|
5408
5484
|
// src/components/switch/components/switch.tsx
|
5409
|
-
var
|
5485
|
+
var import_react82 = require("@chakra-ui/react");
|
5410
5486
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5411
5487
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5412
|
-
var
|
5488
|
+
var import_react83 = require("react");
|
5413
5489
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5414
|
-
var Switch = (0,
|
5415
|
-
const styles = (0,
|
5416
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
5417
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
5418
|
-
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)(
|
5419
5495
|
() => ({
|
5420
5496
|
display: "inline-block",
|
5421
5497
|
position: "relative",
|
@@ -5425,7 +5501,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5425
5501
|
}),
|
5426
5502
|
[styles.container]
|
5427
5503
|
);
|
5428
|
-
const trackStyles = (0,
|
5504
|
+
const trackStyles = (0, import_react83.useMemo)(
|
5429
5505
|
() => ({
|
5430
5506
|
display: "inline-flex",
|
5431
5507
|
flexShrink: 0,
|
@@ -5437,7 +5513,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5437
5513
|
}),
|
5438
5514
|
[styles.track]
|
5439
5515
|
);
|
5440
|
-
const labelStyles = (0,
|
5516
|
+
const labelStyles = (0, import_react83.useMemo)(
|
5441
5517
|
() => ({
|
5442
5518
|
userSelect: "none",
|
5443
5519
|
marginStart: spacing2,
|
@@ -5454,7 +5530,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5454
5530
|
return iconSize[value];
|
5455
5531
|
};
|
5456
5532
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5457
|
-
|
5533
|
+
import_react82.chakra.label,
|
5458
5534
|
{
|
5459
5535
|
...getRootProps(),
|
5460
5536
|
display: "flex",
|
@@ -5463,13 +5539,13 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5463
5539
|
__css: containerStyles,
|
5464
5540
|
children: [
|
5465
5541
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5466
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5467
|
-
/* @__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: [
|
5468
5544
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5469
5545
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5470
5546
|
] }),
|
5471
5547
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5472
|
-
|
5548
|
+
import_react82.chakra.span,
|
5473
5549
|
{
|
5474
5550
|
__css: styles.thumb,
|
5475
5551
|
className: "chakra-switch__thumb",
|
@@ -5479,7 +5555,7 @@ var Switch = (0, import_react80.forwardRef)(function Switch2(props, ref) {
|
|
5479
5555
|
)
|
5480
5556
|
] }),
|
5481
5557
|
children && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5482
|
-
|
5558
|
+
import_react82.chakra.span,
|
5483
5559
|
{
|
5484
5560
|
className: "chakra-switch__label",
|
5485
5561
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5499,18 +5575,18 @@ Switch.defaultProps = {
|
|
5499
5575
|
var switch_default = Switch;
|
5500
5576
|
|
5501
5577
|
// src/components/table/index.tsx
|
5502
|
-
var
|
5578
|
+
var import_react84 = require("@chakra-ui/react");
|
5503
5579
|
|
5504
5580
|
// src/components/tabs/components/tab.tsx
|
5505
|
-
var
|
5581
|
+
var import_react85 = require("@chakra-ui/react");
|
5506
5582
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5507
|
-
var Tab = (0,
|
5583
|
+
var Tab = (0, import_react85.forwardRef)((props, ref) => {
|
5508
5584
|
var _a, _b;
|
5509
|
-
const tabProps = (0,
|
5585
|
+
const tabProps = (0, import_react85.useTab)({ ...props, ref });
|
5510
5586
|
const isSelected = !!tabProps["aria-selected"];
|
5511
|
-
const styles = (0,
|
5587
|
+
const styles = (0, import_react85.useMultiStyleConfig)("Tabs", tabProps);
|
5512
5588
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5513
|
-
|
5589
|
+
import_react85.Button,
|
5514
5590
|
{
|
5515
5591
|
"data-test-id": props["data-test-id"],
|
5516
5592
|
p: 4,
|
@@ -5535,7 +5611,7 @@ var Tab = (0, import_react83.forwardRef)((props, ref) => {
|
|
5535
5611
|
},
|
5536
5612
|
__css: styles.tab,
|
5537
5613
|
...tabProps,
|
5538
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5614
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react85.Flex, { alignItems: "center", children: [
|
5539
5615
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5540
5616
|
tabProps.children,
|
5541
5617
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5546,39 +5622,39 @@ var Tab = (0, import_react83.forwardRef)((props, ref) => {
|
|
5546
5622
|
var tab_default = Tab;
|
5547
5623
|
|
5548
5624
|
// src/components/tabs/index.ts
|
5549
|
-
var
|
5625
|
+
var import_react86 = require("@chakra-ui/react");
|
5550
5626
|
|
5551
5627
|
// src/components/text/index.ts
|
5552
|
-
var
|
5628
|
+
var import_react87 = require("@chakra-ui/react");
|
5553
5629
|
|
5554
5630
|
// src/components/time-input/components/index.tsx
|
5555
|
-
var
|
5631
|
+
var import_react89 = require("@chakra-ui/react");
|
5556
5632
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5557
|
-
var
|
5633
|
+
var import_react90 = require("react");
|
5558
5634
|
|
5559
5635
|
// src/components/time-input/components/integration.tsx
|
5560
5636
|
var import_timescape = require("@zamiru/timescape");
|
5561
5637
|
var import_timescape2 = require("@zamiru/timescape");
|
5562
|
-
var
|
5638
|
+
var import_react88 = require("react");
|
5563
5639
|
var useTimescape = (options = {}) => {
|
5564
5640
|
var _a;
|
5565
5641
|
const { date, onChangeDate, ...rest } = options;
|
5566
|
-
const [manager] = (0,
|
5567
|
-
const onChangeDateRef = (0,
|
5568
|
-
(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)(() => {
|
5569
5645
|
onChangeDateRef.current = onChangeDate;
|
5570
5646
|
}, [onChangeDate]);
|
5571
|
-
const [optionsState, update] = (0,
|
5647
|
+
const [optionsState, update] = (0, import_react88.useState)(() => ({
|
5572
5648
|
date,
|
5573
5649
|
...rest
|
5574
5650
|
}));
|
5575
|
-
(0,
|
5651
|
+
(0, import_react88.useEffect)(() => {
|
5576
5652
|
manager.resync();
|
5577
5653
|
return () => {
|
5578
5654
|
manager.remove();
|
5579
5655
|
};
|
5580
5656
|
}, [manager]);
|
5581
|
-
(0,
|
5657
|
+
(0, import_react88.useEffect)(() => {
|
5582
5658
|
return manager.on("changeDate", (nextDate) => {
|
5583
5659
|
var _a2;
|
5584
5660
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5586,7 +5662,7 @@ var useTimescape = (options = {}) => {
|
|
5586
5662
|
});
|
5587
5663
|
}, [manager]);
|
5588
5664
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5589
|
-
(0,
|
5665
|
+
(0, import_react88.useEffect)(() => {
|
5590
5666
|
manager.date = timestamp;
|
5591
5667
|
manager.minDate = optionsState.minDate;
|
5592
5668
|
manager.maxDate = optionsState.maxDate;
|
@@ -5652,9 +5728,9 @@ var timeFromString = (timeString) => {
|
|
5652
5728
|
const [hours, minutes, seconds] = timeString.split(":");
|
5653
5729
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5654
5730
|
};
|
5655
|
-
var InputTimeArea = (0,
|
5731
|
+
var InputTimeArea = (0, import_react89.forwardRef)((props, ref) => {
|
5656
5732
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5657
|
-
|
5733
|
+
import_react89.Input,
|
5658
5734
|
{
|
5659
5735
|
_focusWithin: {
|
5660
5736
|
bg: "neutral.300"
|
@@ -5672,7 +5748,7 @@ var InputTimeArea = (0, import_react87.forwardRef)((props, ref) => {
|
|
5672
5748
|
}
|
5673
5749
|
);
|
5674
5750
|
});
|
5675
|
-
var TimeInput2 = (0,
|
5751
|
+
var TimeInput2 = (0, import_react89.forwardRef)(
|
5676
5752
|
({
|
5677
5753
|
name,
|
5678
5754
|
config: config2,
|
@@ -5699,7 +5775,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5699
5775
|
date,
|
5700
5776
|
...config2
|
5701
5777
|
});
|
5702
|
-
(0,
|
5778
|
+
(0, import_react90.useEffect)(() => {
|
5703
5779
|
var _a, _b, _c, _d, _e, _f;
|
5704
5780
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5705
5781
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5708,7 +5784,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5708
5784
|
onChangeTime(timeValue);
|
5709
5785
|
}
|
5710
5786
|
}, [options.date]);
|
5711
|
-
(0,
|
5787
|
+
(0, import_react90.useImperativeHandle)(ref, () => ({
|
5712
5788
|
focus() {
|
5713
5789
|
_manager.focusField("hours");
|
5714
5790
|
}
|
@@ -5729,7 +5805,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5729
5805
|
};
|
5730
5806
|
};
|
5731
5807
|
const { outlineColor, focusColor } = getProperties();
|
5732
|
-
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)(
|
5733
5809
|
field_default,
|
5734
5810
|
{
|
5735
5811
|
isError,
|
@@ -5739,7 +5815,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5739
5815
|
isDisabled,
|
5740
5816
|
isSuccess,
|
5741
5817
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5742
|
-
|
5818
|
+
import_react89.Box,
|
5743
5819
|
{
|
5744
5820
|
transition: "all 0.15s",
|
5745
5821
|
boxShadow: "none",
|
@@ -5750,7 +5826,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5750
5826
|
borderColor: focusColor
|
5751
5827
|
},
|
5752
5828
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5753
|
-
|
5829
|
+
import_react89.InputGroup,
|
5754
5830
|
{
|
5755
5831
|
borderRadius: "sm",
|
5756
5832
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5759,7 +5835,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5759
5835
|
gap: 3,
|
5760
5836
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5761
5837
|
children: [
|
5762
|
-
/* @__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: [
|
5763
5839
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5764
5840
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5765
5841
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
@@ -5767,7 +5843,7 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5767
5843
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5768
5844
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5769
5845
|
] }),
|
5770
|
-
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") })
|
5771
5847
|
] }),
|
5772
5848
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5773
5849
|
addOnRight
|
@@ -5782,16 +5858,16 @@ var TimeInput2 = (0, import_react87.forwardRef)(
|
|
5782
5858
|
);
|
5783
5859
|
|
5784
5860
|
// src/components/toast/components/toast.tsx
|
5785
|
-
var
|
5861
|
+
var import_react92 = require("@chakra-ui/react");
|
5786
5862
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5787
5863
|
var import_react_toastify = require("react-toastify");
|
5788
5864
|
|
5789
5865
|
// src/components/toast/components/styles.tsx
|
5790
|
-
var
|
5866
|
+
var import_react91 = require("@emotion/react");
|
5791
5867
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5792
5868
|
var Styles2 = () => {
|
5793
5869
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5794
|
-
|
5870
|
+
import_react91.Global,
|
5795
5871
|
{
|
5796
5872
|
styles: `
|
5797
5873
|
.Toastify__toast-container {
|
@@ -5825,7 +5901,7 @@ var styles_default2 = Styles2;
|
|
5825
5901
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5826
5902
|
var CustomCloseButton = (props) => {
|
5827
5903
|
const { closeToast } = props;
|
5828
|
-
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" }) });
|
5829
5905
|
};
|
5830
5906
|
var DEFAULT_OPTIONS = {
|
5831
5907
|
position: "top-right",
|
@@ -5848,7 +5924,7 @@ var renderIcon = (icon, type) => {
|
|
5848
5924
|
return icon;
|
5849
5925
|
};
|
5850
5926
|
var useToast = () => {
|
5851
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
5927
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react92.useToken)("colors", [
|
5852
5928
|
"primary.500",
|
5853
5929
|
"neutral.500",
|
5854
5930
|
"info.500",
|
@@ -5859,13 +5935,13 @@ var useToast = () => {
|
|
5859
5935
|
const content = (icon, message, link) => {
|
5860
5936
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5861
5937
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(styles_default2, {}),
|
5862
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5863
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5864
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5865
|
-
/* @__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 })
|
5866
5942
|
] }),
|
5867
5943
|
link && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5868
|
-
|
5944
|
+
import_react92.Link,
|
5869
5945
|
{
|
5870
5946
|
href: link.url,
|
5871
5947
|
textDecoration: "underline",
|
@@ -5944,9 +6020,9 @@ var useToast = () => {
|
|
5944
6020
|
var import_react_toastify2 = require("react-toastify");
|
5945
6021
|
|
5946
6022
|
// src/components/uploader/components/uploader.tsx
|
5947
|
-
var
|
6023
|
+
var import_react93 = require("@chakra-ui/react");
|
5948
6024
|
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
5949
|
-
var
|
6025
|
+
var import_react94 = require("react");
|
5950
6026
|
var import_react_dropzone = require("react-dropzone");
|
5951
6027
|
|
5952
6028
|
// src/components/uploader/constants.ts
|
@@ -6045,9 +6121,9 @@ var Uploader = ({
|
|
6045
6121
|
validatorExt,
|
6046
6122
|
...props
|
6047
6123
|
}) => {
|
6048
|
-
const [filePreview, setFilePreview] = (0,
|
6124
|
+
const [filePreview, setFilePreview] = (0, import_react94.useState)();
|
6049
6125
|
const toast2 = useToast();
|
6050
|
-
const handleRejection = (0,
|
6126
|
+
const handleRejection = (0, import_react94.useCallback)(
|
6051
6127
|
(message, file, image) => {
|
6052
6128
|
if (onHandleRejections) {
|
6053
6129
|
onHandleRejections(file, image);
|
@@ -6057,7 +6133,7 @@ var Uploader = ({
|
|
6057
6133
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
6058
6134
|
[onHandleRejections]
|
6059
6135
|
);
|
6060
|
-
const onDropAccepted = (0,
|
6136
|
+
const onDropAccepted = (0, import_react94.useCallback)(
|
6061
6137
|
(files) => {
|
6062
6138
|
const file = files[0];
|
6063
6139
|
const imageUrl = URL.createObjectURL(file);
|
@@ -6080,10 +6156,10 @@ var Uploader = ({
|
|
6080
6156
|
},
|
6081
6157
|
[acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
|
6082
6158
|
);
|
6083
|
-
const onDropRejected = (0,
|
6159
|
+
const onDropRejected = (0, import_react94.useCallback)((fileRejections) => {
|
6084
6160
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
6085
6161
|
}, []);
|
6086
|
-
const validator = (0,
|
6162
|
+
const validator = (0, import_react94.useCallback)(
|
6087
6163
|
(file) => {
|
6088
6164
|
const result = [];
|
6089
6165
|
if (validatorExt) {
|
@@ -6113,26 +6189,26 @@ var Uploader = ({
|
|
6113
6189
|
const renderHelperText = () => {
|
6114
6190
|
if (Array.isArray(helperText)) {
|
6115
6191
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6116
|
-
|
6192
|
+
import_react93.UnorderedList,
|
6117
6193
|
{
|
6118
6194
|
pl: 2,
|
6119
6195
|
fontSize: 12,
|
6120
6196
|
color: "black.medium",
|
6121
6197
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6122
|
-
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))
|
6123
6199
|
}
|
6124
6200
|
);
|
6125
6201
|
}
|
6126
6202
|
return helperText;
|
6127
6203
|
};
|
6128
|
-
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 }) });
|
6129
6205
|
const handleRemove = (e) => {
|
6130
6206
|
e.stopPropagation();
|
6131
6207
|
setFilePreview(void 0);
|
6132
6208
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
6133
6209
|
acceptedFiles.pop();
|
6134
6210
|
};
|
6135
|
-
(0,
|
6211
|
+
(0, import_react94.useEffect)(() => {
|
6136
6212
|
if (value) {
|
6137
6213
|
if (typeof value === "string") {
|
6138
6214
|
setFilePreview(value);
|
@@ -6148,16 +6224,16 @@ var Uploader = ({
|
|
6148
6224
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
6149
6225
|
const containerHeight = !isSmall ? "160px" : "120px";
|
6150
6226
|
const cursorType = filePreview ? "initial" : "pointer";
|
6151
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react93.FormControl, { isRequired, children: [
|
6152
6228
|
label && typeof label === "string" ? (
|
6153
6229
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6154
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6155
|
-
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 }),
|
6156
6232
|
label
|
6157
6233
|
] })
|
6158
6234
|
) : label,
|
6159
6235
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6160
|
-
|
6236
|
+
import_react93.Flex,
|
6161
6237
|
{
|
6162
6238
|
minH: containerHeight,
|
6163
6239
|
maxW: !isSmall ? "full" : "120px",
|
@@ -6174,8 +6250,8 @@ var Uploader = ({
|
|
6174
6250
|
...props,
|
6175
6251
|
...getRootProps(),
|
6176
6252
|
children: [
|
6177
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6178
|
-
|
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,
|
6179
6255
|
{
|
6180
6256
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
6181
6257
|
"aria-label": "remove-image",
|
@@ -6192,15 +6268,15 @@ var Uploader = ({
|
|
6192
6268
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6193
6269
|
}
|
6194
6270
|
) }),
|
6195
|
-
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6196
|
-
|
6271
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6272
|
+
import_react93.Flex,
|
6197
6273
|
{
|
6198
6274
|
position: "relative",
|
6199
6275
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6200
6276
|
justify: "center",
|
6201
6277
|
align: "center",
|
6202
6278
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6203
|
-
|
6279
|
+
import_react93.Image,
|
6204
6280
|
{
|
6205
6281
|
h: size2 === "lg" ? "120" : "100",
|
6206
6282
|
src: filePreview,
|
@@ -6210,11 +6286,11 @@ var Uploader = ({
|
|
6210
6286
|
)
|
6211
6287
|
}
|
6212
6288
|
) }),
|
6213
|
-
!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: [
|
6214
6290
|
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6215
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react93.Box, { children: [
|
6216
6292
|
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6217
|
-
|
6293
|
+
import_react93.Heading,
|
6218
6294
|
{
|
6219
6295
|
fontWeight: "400",
|
6220
6296
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -6223,7 +6299,7 @@ var Uploader = ({
|
|
6223
6299
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6224
6300
|
}
|
6225
6301
|
),
|
6226
|
-
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 })
|
6227
6303
|
] })
|
6228
6304
|
] }) })
|
6229
6305
|
]
|
@@ -6236,8 +6312,8 @@ var Uploader = ({
|
|
6236
6312
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6237
6313
|
}
|
6238
6314
|
),
|
6239
|
-
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6240
|
-
|
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,
|
6241
6317
|
{
|
6242
6318
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6243
6319
|
type: "button",
|
@@ -6283,10 +6359,10 @@ var dimensionValidator = (dimension, message) => {
|
|
6283
6359
|
};
|
6284
6360
|
|
6285
6361
|
// src/components/index.ts
|
6286
|
-
var
|
6362
|
+
var import_react95 = require("@chakra-ui/react");
|
6287
6363
|
|
6288
6364
|
// src/config/theme/themeConfiguration.ts
|
6289
|
-
var
|
6365
|
+
var import_react103 = require("@chakra-ui/react");
|
6290
6366
|
|
6291
6367
|
// src/config/theme/components/index.ts
|
6292
6368
|
var components_exports = {};
|
@@ -6843,8 +6919,8 @@ var card_default2 = CardStyle;
|
|
6843
6919
|
|
6844
6920
|
// src/config/theme/components/checkbox.ts
|
6845
6921
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
6846
|
-
var
|
6847
|
-
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);
|
6848
6924
|
var baseStyle3 = definePartsStyle3({
|
6849
6925
|
control: {
|
6850
6926
|
borderRadius: "sm",
|
@@ -6934,19 +7010,19 @@ var variants2 = {
|
|
6934
7010
|
errors,
|
6935
7011
|
unstyled
|
6936
7012
|
};
|
6937
|
-
var
|
7013
|
+
var Checkbox3 = defineMultiStyleConfig3({
|
6938
7014
|
baseStyle: baseStyle3,
|
6939
7015
|
variants: variants2,
|
6940
7016
|
defaultProps: {
|
6941
7017
|
variant: "unstyled"
|
6942
7018
|
}
|
6943
7019
|
});
|
6944
|
-
var checkbox_default2 =
|
7020
|
+
var checkbox_default2 = Checkbox3;
|
6945
7021
|
|
6946
7022
|
// src/config/theme/components/chips.ts
|
6947
7023
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
6948
|
-
var
|
6949
|
-
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);
|
6950
7026
|
var baseStyle4 = definePartsStyle4({
|
6951
7027
|
container: {
|
6952
7028
|
px: 3,
|
@@ -7155,8 +7231,8 @@ var input_default = Input4;
|
|
7155
7231
|
|
7156
7232
|
// src/config/theme/components/loader.ts
|
7157
7233
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
7158
|
-
var
|
7159
|
-
var rotate = (0,
|
7234
|
+
var import_react98 = require("@emotion/react");
|
7235
|
+
var rotate = (0, import_react98.keyframes)({
|
7160
7236
|
"0%": {
|
7161
7237
|
transform: "rotate(0deg)"
|
7162
7238
|
},
|
@@ -7338,8 +7414,8 @@ var modal_default = modalTheme;
|
|
7338
7414
|
|
7339
7415
|
// src/config/theme/components/popover.ts
|
7340
7416
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
7341
|
-
var
|
7342
|
-
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);
|
7343
7419
|
var baseStyle8 = definePartsStyle7({
|
7344
7420
|
content: {
|
7345
7421
|
bg: "white"
|
@@ -7350,8 +7426,8 @@ var popover_default = popoverTheme;
|
|
7350
7426
|
|
7351
7427
|
// src/config/theme/components/radio.ts
|
7352
7428
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
7353
|
-
var
|
7354
|
-
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);
|
7355
7431
|
var baseStyle9 = definePartsStyle8({
|
7356
7432
|
control: {
|
7357
7433
|
border: "1px solid",
|
@@ -7773,7 +7849,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
7773
7849
|
var tabs_default = tabsTheme;
|
7774
7850
|
|
7775
7851
|
// src/config/theme/components/textarea.ts
|
7776
|
-
var
|
7852
|
+
var import_react101 = require("@chakra-ui/react");
|
7777
7853
|
var getProps = (props) => {
|
7778
7854
|
const { isError, isSuccess, isDisabled } = props;
|
7779
7855
|
let borderColor = "neutral.400";
|
@@ -7793,7 +7869,7 @@ var getProps = (props) => {
|
|
7793
7869
|
borderColor
|
7794
7870
|
};
|
7795
7871
|
};
|
7796
|
-
var outline3 = (0,
|
7872
|
+
var outline3 = (0, import_react101.defineStyle)((props) => {
|
7797
7873
|
const { focusBorderColor, borderColor } = getProps(props);
|
7798
7874
|
return {
|
7799
7875
|
background: "white.high",
|
@@ -7837,7 +7913,7 @@ var outline3 = (0, import_react99.defineStyle)((props) => {
|
|
7837
7913
|
}
|
7838
7914
|
};
|
7839
7915
|
});
|
7840
|
-
var Textarea = (0,
|
7916
|
+
var Textarea = (0, import_react101.defineStyleConfig)({
|
7841
7917
|
variants: { outline: outline3 },
|
7842
7918
|
defaultProps: {
|
7843
7919
|
variant: "outline"
|
@@ -7846,15 +7922,15 @@ var Textarea = (0, import_react99.defineStyleConfig)({
|
|
7846
7922
|
var textarea_default2 = Textarea;
|
7847
7923
|
|
7848
7924
|
// src/config/theme/components/tooltip.ts
|
7849
|
-
var
|
7850
|
-
var $arrowBg = (0,
|
7925
|
+
var import_react102 = require("@chakra-ui/react");
|
7926
|
+
var $arrowBg = (0, import_react102.cssVar)("popper-arrow-bg");
|
7851
7927
|
var baseStyle12 = {
|
7852
7928
|
bg: "neutral.700",
|
7853
7929
|
textStyle: "text.sm",
|
7854
7930
|
fontSize: "text.sm",
|
7855
7931
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
7856
7932
|
};
|
7857
|
-
var Tooltip2 = (0,
|
7933
|
+
var Tooltip2 = (0, import_react102.defineStyleConfig)({ baseStyle: baseStyle12 });
|
7858
7934
|
var tooltip_default = Tooltip2;
|
7859
7935
|
|
7860
7936
|
// src/config/theme/themeConfiguration.ts
|
@@ -7873,7 +7949,7 @@ var createExtendTheme = (theme5) => {
|
|
7873
7949
|
return function extendTheme2(...extensions) {
|
7874
7950
|
let overrides = [...extensions];
|
7875
7951
|
let activeTheme = extensions[extensions.length - 1];
|
7876
|
-
if ((0,
|
7952
|
+
if ((0, import_react103.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
7877
7953
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
7878
7954
|
overrides.length > 1) {
|
7879
7955
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -7882,13 +7958,13 @@ var createExtendTheme = (theme5) => {
|
|
7882
7958
|
}
|
7883
7959
|
return pipe(
|
7884
7960
|
...overrides.map(
|
7885
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
7961
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react103.mergeThemeOverride)(prevTheme, extension)
|
7886
7962
|
)
|
7887
7963
|
)(activeTheme);
|
7888
7964
|
};
|
7889
7965
|
};
|
7890
7966
|
var getTheme = (foundations) => {
|
7891
|
-
return (0,
|
7967
|
+
return (0, import_react103.extendTheme)({
|
7892
7968
|
...foundations,
|
7893
7969
|
components: {
|
7894
7970
|
...components_exports
|
@@ -7905,7 +7981,7 @@ var getTheme = (foundations) => {
|
|
7905
7981
|
config
|
7906
7982
|
});
|
7907
7983
|
};
|
7908
|
-
var theme4 = (0,
|
7984
|
+
var theme4 = (0, import_react103.extendTheme)({
|
7909
7985
|
components: {
|
7910
7986
|
...components_exports
|
7911
7987
|
},
|
@@ -7925,23 +8001,23 @@ var theme4 = (0, import_react101.extendTheme)({
|
|
7925
8001
|
|
7926
8002
|
// src/hooks/useFetcher.ts
|
7927
8003
|
var import_axios2 = __toESM(require("axios"));
|
7928
|
-
var
|
8004
|
+
var import_react106 = require("react");
|
7929
8005
|
|
7930
8006
|
// src/provider/components/provider.tsx
|
7931
8007
|
var import_axios = __toESM(require("axios"));
|
7932
|
-
var
|
8008
|
+
var import_react104 = require("react");
|
7933
8009
|
var import_react_toastify3 = require("react-toastify");
|
7934
8010
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
7935
|
-
var ProviderContext = (0,
|
8011
|
+
var ProviderContext = (0, import_react104.createContext)({
|
7936
8012
|
instance: void 0
|
7937
8013
|
});
|
7938
8014
|
var useInternalUI = () => {
|
7939
|
-
const { instance } = (0,
|
8015
|
+
const { instance } = (0, import_react104.useContext)(ProviderContext);
|
7940
8016
|
return { instance };
|
7941
8017
|
};
|
7942
8018
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
7943
|
-
const instanceRef = (0,
|
7944
|
-
(0,
|
8019
|
+
const instanceRef = (0, import_react104.useRef)(import_axios.default.create(config2));
|
8020
|
+
(0, import_react104.useEffect)(() => {
|
7945
8021
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
7946
8022
|
instanceRef.current.interceptors.request.use(interceptor);
|
7947
8023
|
});
|
@@ -7949,7 +8025,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
7949
8025
|
instanceRef.current.interceptors.response.use(interceptor);
|
7950
8026
|
});
|
7951
8027
|
}, [requestInterceptors, responseInterceptors]);
|
7952
|
-
const provider = (0,
|
8028
|
+
const provider = (0, import_react104.useMemo)(() => ({ instance: instanceRef.current }), []);
|
7953
8029
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
7954
8030
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_toastify3.ToastContainer, {}),
|
7955
8031
|
children
|
@@ -7959,12 +8035,12 @@ Provider.displayName = "Provider";
|
|
7959
8035
|
var provider_default = Provider;
|
7960
8036
|
|
7961
8037
|
// src/provider/index.ts
|
7962
|
-
var
|
8038
|
+
var import_react105 = require("@chakra-ui/react");
|
7963
8039
|
|
7964
8040
|
// src/hooks/useFetcher.ts
|
7965
8041
|
function useFetcher() {
|
7966
8042
|
const { instance } = useInternalUI();
|
7967
|
-
const axiosInstance = (0,
|
8043
|
+
const axiosInstance = (0, import_react106.useMemo)(() => instance || import_axios2.default, [instance]);
|
7968
8044
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
7969
8045
|
const response = await axiosInstance.request({
|
7970
8046
|
data,
|
@@ -7984,10 +8060,10 @@ function useFetcher() {
|
|
7984
8060
|
}
|
7985
8061
|
|
7986
8062
|
// src/hooks/index.ts
|
7987
|
-
var
|
8063
|
+
var import_react107 = require("@chakra-ui/react");
|
7988
8064
|
|
7989
8065
|
// src/index.ts
|
7990
|
-
var
|
8066
|
+
var import_react108 = require("@chakra-ui/react");
|
7991
8067
|
// Annotate the CommonJS export names for ESM import in node:
|
7992
8068
|
0 && (module.exports = {
|
7993
8069
|
Accordion,
|