@ctlyst.id/internal-ui 3.4.5 → 3.5.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 +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +580 -499
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +155 -78
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
@@ -45,14 +45,14 @@ __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_react54.AlertDialog,
|
49
|
+
AlertDialogBody: () => import_react54.ModalBody,
|
50
|
+
AlertDialogCloseButton: () => import_react54.ModalCloseButton,
|
51
|
+
AlertDialogContent: () => import_react54.AlertDialogContent,
|
52
|
+
AlertDialogFooter: () => import_react54.ModalFooter,
|
53
|
+
AlertDialogHeader: () => import_react54.ModalHeader,
|
54
|
+
AlertDialogOverlay: () => import_react54.ModalOverlay,
|
55
|
+
AlertDialogProps: () => import_react54.AlertDialogProps,
|
56
56
|
AlertIcon: () => AlertIcon,
|
57
57
|
AlertTitle: () => AlertTitle,
|
58
58
|
Anchor: () => Anchor,
|
@@ -63,18 +63,18 @@ __export(src_exports, {
|
|
63
63
|
AvatarGroupProps: () => import_react91.AvatarGroupProps,
|
64
64
|
AvatarProps: () => import_react91.AvatarProps,
|
65
65
|
Badge: () => badge_default,
|
66
|
-
Box: () =>
|
67
|
-
BoxProps: () =>
|
66
|
+
Box: () => import_react51.Box,
|
67
|
+
BoxProps: () => import_react51.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: () =>
|
74
|
+
Center: () => import_react51.Center,
|
75
75
|
ChakraProvider: () => import_react101.ChakraProvider,
|
76
76
|
ChakraProviderProps: () => import_react101.ChakraProviderProps,
|
77
|
-
ChakraTable: () =>
|
77
|
+
ChakraTable: () => import_react80.Table,
|
78
78
|
Checkbox: () => checkbox_default,
|
79
79
|
CheckboxGroup: () => checkbox_group_default,
|
80
80
|
CheckboxGroupContext: () => import_react16.CheckboxGroupContext,
|
@@ -86,60 +86,61 @@ __export(src_exports, {
|
|
86
86
|
ClearIndicator: () => ClearIndicator,
|
87
87
|
CloseButton: () => import_react10.CloseButton,
|
88
88
|
CloseButtonProps: () => import_react10.CloseButtonProps,
|
89
|
-
Code: () =>
|
90
|
-
CodeProps: () =>
|
89
|
+
Code: () => import_react83.Code,
|
90
|
+
CodeProps: () => import_react83.CodeProps,
|
91
91
|
Collapse: () => import_react91.Collapse,
|
92
92
|
CollapseProps: () => import_react91.CollapseProps,
|
93
93
|
ColorMode: () => import_react101.ColorMode,
|
94
94
|
ColorModeScript: () => import_react101.ColorModeScript,
|
95
95
|
ColorModeScriptProps: () => import_react101.ColorModeScriptProps,
|
96
|
-
Container: () =>
|
97
|
-
ContainerProps: () =>
|
96
|
+
Container: () => import_react51.Container,
|
97
|
+
ContainerProps: () => import_react51.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_react51.Divider,
|
104
|
+
DividerProps: () => import_react51.DividerProps,
|
105
|
+
Drawer: () => import_react54.Drawer,
|
106
|
+
DrawerBody: () => import_react54.ModalBody,
|
107
|
+
DrawerCloseButton: () => import_react54.ModalCloseButton,
|
108
|
+
DrawerContent: () => import_react54.DrawerContent,
|
109
|
+
DrawerContentProps: () => import_react54.DrawerContentProps,
|
110
|
+
DrawerFooter: () => import_react54.ModalFooter,
|
111
|
+
DrawerHeader: () => import_react54.ModalHeader,
|
112
|
+
DrawerOverlay: () => import_react54.ModalOverlay,
|
113
|
+
DrawerProps: () => import_react54.DrawerProps,
|
114
114
|
DropdownIndicator: () => DropdownIndicator,
|
115
115
|
EmptyState: () => empty_state_default,
|
116
|
+
ErrorCode: () => error_code_default,
|
116
117
|
Fade: () => import_react91.Fade,
|
117
118
|
FadeProps: () => import_react91.FadeProps,
|
118
119
|
Field: () => field_default,
|
119
|
-
Flex: () =>
|
120
|
-
FlexProps: () =>
|
120
|
+
Flex: () => import_react51.Flex,
|
121
|
+
FlexProps: () => import_react51.FlexProps,
|
121
122
|
FormControl: () => import_react25.FormControl,
|
122
123
|
FormControlProps: () => import_react25.FormControlProps,
|
123
124
|
FormErrorMessage: () => import_react25.FormErrorMessage,
|
124
125
|
FormHelperText: () => import_react25.FormHelperText,
|
125
126
|
FormLabel: () => import_react25.FormLabel,
|
126
127
|
FormLabelProps: () => import_react25.FormLabelProps,
|
127
|
-
Grid: () =>
|
128
|
-
GridItem: () =>
|
129
|
-
GridItemProps: () =>
|
130
|
-
GridProps: () =>
|
131
|
-
HStack: () =>
|
128
|
+
Grid: () => import_react51.Grid,
|
129
|
+
GridItem: () => import_react51.GridItem,
|
130
|
+
GridItemProps: () => import_react51.GridItemProps,
|
131
|
+
GridProps: () => import_react51.GridProps,
|
132
|
+
HStack: () => import_react51.HStack,
|
132
133
|
Header: () => Header,
|
133
|
-
Heading: () =>
|
134
|
-
HeadingProps: () =>
|
134
|
+
Heading: () => import_react83.Heading,
|
135
|
+
HeadingProps: () => import_react83.HeadingProps,
|
135
136
|
Hide: () => import_react91.Hide,
|
136
137
|
HideProps: () => import_react91.HideProps,
|
137
|
-
Icon: () =>
|
138
|
+
Icon: () => import_react50.Icon,
|
138
139
|
IconButton: () => import_react10.IconButton,
|
139
140
|
IconButtonProps: () => import_react10.IconButtonProps,
|
140
|
-
IconProps: () =>
|
141
|
-
Image: () =>
|
142
|
-
ImageProps: () =>
|
141
|
+
IconProps: () => import_react50.IconProps,
|
142
|
+
Image: () => import_react50.Image,
|
143
|
+
ImageProps: () => import_react50.ImageProps,
|
143
144
|
Img: () => import_react91.Img,
|
144
145
|
ImgProps: () => import_react91.ImgProps,
|
145
146
|
InputAddonLeft: () => InputAddonLeft,
|
@@ -158,32 +159,32 @@ __export(src_exports, {
|
|
158
159
|
InputRightAddonProps: () => import_react25.InputRightAddonProps,
|
159
160
|
InputRightElement: () => import_react25.InputRightElement,
|
160
161
|
InputRightElementProps: () => import_react25.InputRightElementProps,
|
161
|
-
Link: () =>
|
162
|
-
LinkProps: () =>
|
163
|
-
List: () =>
|
164
|
-
ListIcon: () =>
|
165
|
-
ListItem: () =>
|
166
|
-
ListItemProps: () =>
|
167
|
-
ListProps: () =>
|
162
|
+
Link: () => import_react83.Link,
|
163
|
+
LinkProps: () => import_react83.LinkProps,
|
164
|
+
List: () => import_react52.List,
|
165
|
+
ListIcon: () => import_react52.ListIcon,
|
166
|
+
ListItem: () => import_react52.ListItem,
|
167
|
+
ListItemProps: () => import_react52.ListItemProps,
|
168
|
+
ListProps: () => import_react52.ListProps,
|
168
169
|
Loader: () => loader_default,
|
169
170
|
Logo: () => Logo,
|
170
171
|
MainMenu: () => navigation_default,
|
171
|
-
Modal: () =>
|
172
|
+
Modal: () => import_react54.Modal,
|
172
173
|
ModalBackButton: () => modal_back_button_default,
|
173
|
-
ModalBody: () =>
|
174
|
-
ModalBodyProps: () =>
|
175
|
-
ModalCloseButton: () =>
|
176
|
-
ModalContent: () =>
|
177
|
-
ModalContentProps: () =>
|
178
|
-
ModalContextProvider: () =>
|
179
|
-
ModalFocusScope: () =>
|
180
|
-
ModalFooter: () =>
|
181
|
-
ModalFooterProps: () =>
|
182
|
-
ModalHeader: () =>
|
183
|
-
ModalHeaderProps: () =>
|
184
|
-
ModalOverlay: () =>
|
185
|
-
ModalOverlayProps: () =>
|
186
|
-
ModalProps: () =>
|
174
|
+
ModalBody: () => import_react54.ModalBody,
|
175
|
+
ModalBodyProps: () => import_react54.ModalBodyProps,
|
176
|
+
ModalCloseButton: () => import_react54.ModalCloseButton,
|
177
|
+
ModalContent: () => import_react54.ModalContent,
|
178
|
+
ModalContentProps: () => import_react54.ModalContentProps,
|
179
|
+
ModalContextProvider: () => import_react54.ModalContextProvider,
|
180
|
+
ModalFocusScope: () => import_react54.ModalFocusScope,
|
181
|
+
ModalFooter: () => import_react54.ModalFooter,
|
182
|
+
ModalFooterProps: () => import_react54.ModalFooterProps,
|
183
|
+
ModalHeader: () => import_react54.ModalHeader,
|
184
|
+
ModalHeaderProps: () => import_react54.ModalHeaderProps,
|
185
|
+
ModalOverlay: () => import_react54.ModalOverlay,
|
186
|
+
ModalOverlayProps: () => import_react54.ModalOverlayProps,
|
187
|
+
ModalProps: () => import_react54.ModalProps,
|
187
188
|
MultiDatePickerMonth: () => multi_datepicker_month_default,
|
188
189
|
MultiValue: () => MultiValue,
|
189
190
|
MultiValueRemove: () => MultiValueRemove,
|
@@ -191,46 +192,46 @@ __export(src_exports, {
|
|
191
192
|
Navbar: () => Navbar,
|
192
193
|
NavigationBar: () => navigation_bar_default,
|
193
194
|
NoOptionsMessage: () => NoOptionsMessage,
|
194
|
-
OrderedList: () =>
|
195
|
+
OrderedList: () => import_react52.OrderedList,
|
195
196
|
Pagination: () => pagination_default,
|
196
197
|
PaginationDetail: () => pagination_detail_default,
|
197
198
|
PaginationFilter: () => pagination_filter_default,
|
198
|
-
PinInput: () =>
|
199
|
-
PinInputContext: () =>
|
200
|
-
PinInputDescendantsProvider: () =>
|
201
|
-
PinInputField: () =>
|
202
|
-
PinInputFieldProps: () =>
|
203
|
-
PinInputProps: () =>
|
204
|
-
PinInputProvider: () =>
|
205
|
-
Popover: () =>
|
206
|
-
PopoverAnchor: () =>
|
207
|
-
PopoverArrow: () =>
|
208
|
-
PopoverArrowProps: () =>
|
209
|
-
PopoverBody: () =>
|
210
|
-
PopoverBodyProps: () =>
|
211
|
-
PopoverCloseButton: () =>
|
212
|
-
PopoverContent: () =>
|
213
|
-
PopoverContentProps: () =>
|
214
|
-
PopoverFooter: () =>
|
215
|
-
PopoverFooterProps: () =>
|
216
|
-
PopoverHeader: () =>
|
217
|
-
PopoverHeaderProps: () =>
|
218
|
-
PopoverProps: () =>
|
219
|
-
PopoverTrigger: () =>
|
220
|
-
Portal: () =>
|
221
|
-
PortalProps: () =>
|
199
|
+
PinInput: () => import_react63.PinInput,
|
200
|
+
PinInputContext: () => import_react63.PinInputContext,
|
201
|
+
PinInputDescendantsProvider: () => import_react63.PinInputDescendantsProvider,
|
202
|
+
PinInputField: () => import_react63.PinInputField,
|
203
|
+
PinInputFieldProps: () => import_react63.PinInputFieldProps,
|
204
|
+
PinInputProps: () => import_react63.PinInputProps,
|
205
|
+
PinInputProvider: () => import_react63.PinInputProvider,
|
206
|
+
Popover: () => import_react64.Popover,
|
207
|
+
PopoverAnchor: () => import_react64.PopoverAnchor,
|
208
|
+
PopoverArrow: () => import_react64.PopoverArrow,
|
209
|
+
PopoverArrowProps: () => import_react64.PopoverArrowProps,
|
210
|
+
PopoverBody: () => import_react64.PopoverBody,
|
211
|
+
PopoverBodyProps: () => import_react64.PopoverBodyProps,
|
212
|
+
PopoverCloseButton: () => import_react64.PopoverCloseButton,
|
213
|
+
PopoverContent: () => import_react64.PopoverContent,
|
214
|
+
PopoverContentProps: () => import_react64.PopoverContentProps,
|
215
|
+
PopoverFooter: () => import_react64.PopoverFooter,
|
216
|
+
PopoverFooterProps: () => import_react64.PopoverFooterProps,
|
217
|
+
PopoverHeader: () => import_react64.PopoverHeader,
|
218
|
+
PopoverHeaderProps: () => import_react64.PopoverHeaderProps,
|
219
|
+
PopoverProps: () => import_react64.PopoverProps,
|
220
|
+
PopoverTrigger: () => import_react64.PopoverTrigger,
|
221
|
+
Portal: () => import_react64.Portal,
|
222
|
+
PortalProps: () => import_react64.PortalProps,
|
222
223
|
Profile: () => Profile,
|
223
|
-
Progress: () =>
|
224
|
-
ProgressFilledTrackProps: () =>
|
225
|
-
ProgressLabel: () =>
|
226
|
-
ProgressLabelProps: () =>
|
227
|
-
ProgressProps: () =>
|
228
|
-
ProgressTrackProps: () =>
|
224
|
+
Progress: () => import_react65.Progress,
|
225
|
+
ProgressFilledTrackProps: () => import_react65.ProgressFilledTrackProps,
|
226
|
+
ProgressLabel: () => import_react65.ProgressLabel,
|
227
|
+
ProgressLabelProps: () => import_react65.ProgressLabelProps,
|
228
|
+
ProgressProps: () => import_react65.ProgressProps,
|
229
|
+
ProgressTrackProps: () => import_react65.ProgressTrackProps,
|
229
230
|
Provider: () => provider_default,
|
230
231
|
ProviderContext: () => ProviderContext,
|
231
232
|
Radio: () => Radio,
|
232
233
|
RadioGroup: () => RadioGroup,
|
233
|
-
RadioGroupContext: () =>
|
234
|
+
RadioGroupContext: () => import_react68.RadioGroupContext,
|
234
235
|
Rating: () => rating_default,
|
235
236
|
RequiredIndicator: () => import_react25.RequiredIndicator,
|
236
237
|
RequiredIndicatorProps: () => import_react25.RequiredIndicatorProps,
|
@@ -246,15 +247,15 @@ __export(src_exports, {
|
|
246
247
|
Sidebar: () => Sidebar,
|
247
248
|
SidebarHeader: () => SidebarHeader,
|
248
249
|
SidebarMenu: () => SidebarMenu,
|
249
|
-
SimpleGrid: () =>
|
250
|
+
SimpleGrid: () => import_react51.SimpleGrid,
|
250
251
|
Skeleton: () => import_react5.Skeleton,
|
251
252
|
Slide: () => import_react91.Slide,
|
252
253
|
SlideFade: () => import_react91.SlideFade,
|
253
254
|
SlideFadeProps: () => import_react91.SlideFadeProps,
|
254
255
|
SlideProps: () => import_react91.SlideProps,
|
255
|
-
Spacer: () =>
|
256
|
-
Stack: () =>
|
257
|
-
StackProps: () =>
|
256
|
+
Spacer: () => import_react51.Spacer,
|
257
|
+
Stack: () => import_react51.Stack,
|
258
|
+
StackProps: () => import_react51.StackProps,
|
258
259
|
Step: () => import_react91.Step,
|
259
260
|
StepDescription: () => import_react91.StepDescription,
|
260
261
|
StepIcon: () => import_react91.StepIcon,
|
@@ -266,39 +267,39 @@ __export(src_exports, {
|
|
266
267
|
Stepper: () => import_react91.Stepper,
|
267
268
|
Switch: () => switch_default,
|
268
269
|
Tab: () => tab_default,
|
269
|
-
TabIndicator: () =>
|
270
|
-
TabIndicatorProps: () =>
|
271
|
-
TabList: () =>
|
272
|
-
TabListProps: () =>
|
273
|
-
TabPanel: () =>
|
274
|
-
TabPanelProps: () =>
|
275
|
-
TabPanels: () =>
|
276
|
-
TabPanelsProps: () =>
|
277
|
-
TabProps: () =>
|
278
|
-
TableBodyProps: () =>
|
279
|
-
TableCellProps: () =>
|
280
|
-
TableColumnHeaderProps: () =>
|
281
|
-
TableHeadProps: () =>
|
282
|
-
TableProps: () =>
|
283
|
-
TableRowProps: () =>
|
284
|
-
Tabs: () =>
|
285
|
-
TabsDescendantsProvider: () =>
|
286
|
-
TabsProps: () =>
|
287
|
-
TabsProvider: () =>
|
288
|
-
Tbody: () =>
|
289
|
-
Td: () =>
|
290
|
-
Text: () =>
|
291
|
-
TextProps: () =>
|
270
|
+
TabIndicator: () => import_react82.TabIndicator,
|
271
|
+
TabIndicatorProps: () => import_react82.TabIndicatorProps,
|
272
|
+
TabList: () => import_react82.TabList,
|
273
|
+
TabListProps: () => import_react82.TabListProps,
|
274
|
+
TabPanel: () => import_react82.TabPanel,
|
275
|
+
TabPanelProps: () => import_react82.TabPanelProps,
|
276
|
+
TabPanels: () => import_react82.TabPanels,
|
277
|
+
TabPanelsProps: () => import_react82.TabPanelsProps,
|
278
|
+
TabProps: () => import_react82.TabProps,
|
279
|
+
TableBodyProps: () => import_react80.TableBodyProps,
|
280
|
+
TableCellProps: () => import_react80.TableCellProps,
|
281
|
+
TableColumnHeaderProps: () => import_react80.TableColumnHeaderProps,
|
282
|
+
TableHeadProps: () => import_react80.TableHeadProps,
|
283
|
+
TableProps: () => import_react80.TableProps,
|
284
|
+
TableRowProps: () => import_react80.TableRowProps,
|
285
|
+
Tabs: () => import_react82.Tabs,
|
286
|
+
TabsDescendantsProvider: () => import_react82.TabsDescendantsProvider,
|
287
|
+
TabsProps: () => import_react82.TabsProps,
|
288
|
+
TabsProvider: () => import_react82.TabsProvider,
|
289
|
+
Tbody: () => import_react80.Tbody,
|
290
|
+
Td: () => import_react80.Td,
|
291
|
+
Text: () => import_react83.Text,
|
292
|
+
TextProps: () => import_react83.TextProps,
|
292
293
|
TextareaField: () => textarea_default,
|
293
|
-
Th: () =>
|
294
|
-
Thead: () =>
|
294
|
+
Th: () => import_react80.Th,
|
295
|
+
Thead: () => import_react80.Thead,
|
295
296
|
ThemeTypings: () => import_styled_system12.ThemeTypings,
|
296
297
|
Time: () => Time,
|
297
298
|
TimeInput: () => TimeInput2,
|
298
299
|
ToastContainer: () => import_react_toastify2.ToastContainer,
|
299
300
|
Tooltip: () => Tooltip,
|
300
|
-
Tr: () =>
|
301
|
-
UnorderedList: () =>
|
301
|
+
Tr: () => import_react80.Tr,
|
302
|
+
UnorderedList: () => import_react52.UnorderedList,
|
302
303
|
Uploader: () => uploader_default,
|
303
304
|
UseBreakpointOptions: () => import_react91.UseBreakpointOptions,
|
304
305
|
UseCheckboxGroupProps: () => import_react16.UseCheckboxGroupProps,
|
@@ -309,39 +310,42 @@ __export(src_exports, {
|
|
309
310
|
UseImageProps: () => import_react91.UseImageProps,
|
310
311
|
UseImageReturn: () => import_react91.UseImageReturn,
|
311
312
|
UseMediaQueryOptions: () => import_react91.UseMediaQueryOptions,
|
312
|
-
UseModalProps: () =>
|
313
|
-
UseModalReturn: () =>
|
314
|
-
UsePinInputFieldProps: () =>
|
315
|
-
UsePinInputProps: () =>
|
316
|
-
UsePinInputReturn: () =>
|
313
|
+
UseModalProps: () => import_react54.UseModalProps,
|
314
|
+
UseModalReturn: () => import_react54.UseModalReturn,
|
315
|
+
UsePinInputFieldProps: () => import_react63.UsePinInputFieldProps,
|
316
|
+
UsePinInputProps: () => import_react63.UsePinInputProps,
|
317
|
+
UsePinInputReturn: () => import_react63.UsePinInputReturn,
|
317
318
|
UseQueryProps: () => import_react91.UseQueryProps,
|
318
|
-
UseRadioGroupReturn: () =>
|
319
|
-
UseRadioProps: () =>
|
320
|
-
UseRadioReturn: () =>
|
321
|
-
UseTabListProps: () =>
|
322
|
-
UseTabListReturn: () =>
|
323
|
-
UseTabOptions: () =>
|
324
|
-
UseTabPanelsProps: () =>
|
325
|
-
UseTabProps: () =>
|
326
|
-
UseTabsProps: () =>
|
327
|
-
UseTabsReturn: () =>
|
328
|
-
VStack: () =>
|
319
|
+
UseRadioGroupReturn: () => import_react68.UseRadioGroupReturn,
|
320
|
+
UseRadioProps: () => import_react68.UseRadioProps,
|
321
|
+
UseRadioReturn: () => import_react68.UseRadioReturn,
|
322
|
+
UseTabListProps: () => import_react82.UseTabListProps,
|
323
|
+
UseTabListReturn: () => import_react82.UseTabListReturn,
|
324
|
+
UseTabOptions: () => import_react82.UseTabOptions,
|
325
|
+
UseTabPanelsProps: () => import_react82.UseTabPanelsProps,
|
326
|
+
UseTabProps: () => import_react82.UseTabProps,
|
327
|
+
UseTabsProps: () => import_react82.UseTabsProps,
|
328
|
+
UseTabsReturn: () => import_react82.UseTabsReturn,
|
329
|
+
VStack: () => import_react51.VStack,
|
329
330
|
Version: () => Version,
|
330
331
|
VisuallyHidden: () => import_react91.VisuallyHidden,
|
331
332
|
VisuallyHiddenInput: () => import_react91.VisuallyHiddenInput,
|
332
333
|
VoilaLogo: () => VoilaLogo,
|
333
|
-
Wrap: () =>
|
334
|
-
WrapItem: () =>
|
335
|
-
WrapItemProps: () =>
|
336
|
-
WrapProps: () =>
|
334
|
+
Wrap: () => import_react51.Wrap,
|
335
|
+
WrapItem: () => import_react51.WrapItem,
|
336
|
+
WrapItemProps: () => import_react51.WrapItemProps,
|
337
|
+
WrapProps: () => import_react51.WrapProps,
|
337
338
|
XMSLogo: () => XMSLogo,
|
338
339
|
createExtendTheme: () => createExtendTheme,
|
340
|
+
defaultOnHandleRejections: () => defaultOnHandleRejections,
|
341
|
+
dimensionValidator: () => dimensionValidator,
|
339
342
|
extendTheme: () => import_react104.extendTheme,
|
340
343
|
forwardRef: () => import_react104.forwardRef,
|
341
344
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
342
345
|
getTheme: () => getTheme,
|
343
346
|
id: () => id,
|
344
347
|
isCellDisabled: () => isCellDisabled,
|
348
|
+
isRatioEqual: () => isRatioEqual,
|
345
349
|
selectStyles: () => selectStyles,
|
346
350
|
theme: () => theme4,
|
347
351
|
themeSelect: () => themeSelect,
|
@@ -365,35 +369,35 @@ __export(src_exports, {
|
|
365
369
|
useDataTable: () => useDataTable,
|
366
370
|
useDimensions: () => import_react103.useDimensions,
|
367
371
|
useDisclosure: () => import_react103.useDisclosure,
|
368
|
-
useDrawerContext: () =>
|
372
|
+
useDrawerContext: () => import_react54.useDrawerContext,
|
369
373
|
useFetcher: () => useFetcher,
|
370
374
|
useImage: () => import_react91.useImage,
|
371
375
|
useInternalUI: () => useInternalUI,
|
372
376
|
useMergeRefs: () => import_react103.useMergeRefs,
|
373
|
-
useModal: () =>
|
374
|
-
useModalContext: () =>
|
375
|
-
useModalStyles: () =>
|
377
|
+
useModal: () => import_react54.useModal,
|
378
|
+
useModalContext: () => import_react54.useModalContext,
|
379
|
+
useModalStyles: () => import_react54.useModalStyles,
|
376
380
|
useOutsideClick: () => import_react103.useOutsideClick,
|
377
|
-
usePinInput: () =>
|
378
|
-
usePinInputContext: () =>
|
379
|
-
usePinInputField: () =>
|
380
|
-
useProgressStyles: () =>
|
381
|
+
usePinInput: () => import_react63.usePinInput,
|
382
|
+
usePinInputContext: () => import_react63.usePinInputContext,
|
383
|
+
usePinInputField: () => import_react63.usePinInputField,
|
384
|
+
useProgressStyles: () => import_react65.useProgressStyles,
|
381
385
|
useQuery: () => import_react91.useQuery,
|
382
|
-
useRadio: () =>
|
383
|
-
useRadioGroup: () =>
|
384
|
-
useRadioGroupContext: () =>
|
386
|
+
useRadio: () => import_react68.useRadio,
|
387
|
+
useRadioGroup: () => import_react68.useRadioGroup,
|
388
|
+
useRadioGroupContext: () => import_react68.useRadioGroupContext,
|
385
389
|
useSteps: () => import_react91.useSteps,
|
386
|
-
useTab: () =>
|
387
|
-
useTabIndicator: () =>
|
388
|
-
useTabList: () =>
|
389
|
-
useTabPanel: () =>
|
390
|
-
useTabPanels: () =>
|
391
|
-
useTabs: () =>
|
392
|
-
useTabsContext: () =>
|
393
|
-
useTabsDescendant: () =>
|
394
|
-
useTabsDescendants: () =>
|
395
|
-
useTabsDescendantsContext: () =>
|
396
|
-
useTabsStyles: () =>
|
390
|
+
useTab: () => import_react82.useTab,
|
391
|
+
useTabIndicator: () => import_react82.useTabIndicator,
|
392
|
+
useTabList: () => import_react82.useTabList,
|
393
|
+
useTabPanel: () => import_react82.useTabPanel,
|
394
|
+
useTabPanels: () => import_react82.useTabPanels,
|
395
|
+
useTabs: () => import_react82.useTabs,
|
396
|
+
useTabsContext: () => import_react82.useTabsContext,
|
397
|
+
useTabsDescendant: () => import_react82.useTabsDescendant,
|
398
|
+
useTabsDescendants: () => import_react82.useTabsDescendants,
|
399
|
+
useTabsDescendantsContext: () => import_react82.useTabsDescendantsContext,
|
400
|
+
useTabsStyles: () => import_react82.useTabsStyles,
|
397
401
|
useTheme: () => import_react103.useTheme,
|
398
402
|
useToast: () => useToast,
|
399
403
|
useToken: () => import_react103.useToken
|
@@ -1631,6 +1635,7 @@ var data_table_default = DataTable;
|
|
1631
1635
|
var import_react33 = require("@chakra-ui/react");
|
1632
1636
|
var import_shared_utils8 = require("@chakra-ui/shared-utils");
|
1633
1637
|
var import_internal_icon6 = require("@ctlyst.id/internal-icon");
|
1638
|
+
var import_react34 = require("@floating-ui/react");
|
1634
1639
|
var import_react_datepicker = __toESM(require("react-datepicker"));
|
1635
1640
|
|
1636
1641
|
// ../../node_modules/.pnpm/date-fns@3.6.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs
|
@@ -2283,16 +2288,10 @@ var Styles = ({ showHeader }) => {
|
|
2283
2288
|
.react-datepicker-popper {
|
2284
2289
|
z-index: 1;
|
2285
2290
|
}
|
2286
|
-
.react-datepicker-popper[data-placement^=bottom] {
|
2287
|
-
padding-top: 10px;
|
2288
|
-
}
|
2289
2291
|
.react-datepicker-popper[data-placement=bottom-end] .react-datepicker__triangle, .react-datepicker-popper[data-placement=top-end] .react-datepicker__triangle {
|
2290
2292
|
left: auto;
|
2291
2293
|
right: 50px;
|
2292
2294
|
}
|
2293
|
-
.react-datepicker-popper[data-placement^=top] {
|
2294
|
-
padding-bottom: 10px;
|
2295
|
-
}
|
2296
2295
|
.react-datepicker-popper[data-placement^=right] {
|
2297
2296
|
padding-left: 8px;
|
2298
2297
|
}
|
@@ -3099,6 +3098,20 @@ var Datepicker = ({
|
|
3099
3098
|
id: id2,
|
3100
3099
|
name,
|
3101
3100
|
selected,
|
3101
|
+
popperModifiers: [
|
3102
|
+
(0, import_react34.offset)(4),
|
3103
|
+
{
|
3104
|
+
name: "placement",
|
3105
|
+
fn: (state) => {
|
3106
|
+
const { placement, y } = state;
|
3107
|
+
return {
|
3108
|
+
...state,
|
3109
|
+
y: placement.startsWith("bottom") ? y - 10 : y + 10
|
3110
|
+
// condition for auto placement
|
3111
|
+
};
|
3112
|
+
}
|
3113
|
+
}
|
3114
|
+
],
|
3102
3115
|
customInput: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
3103
3116
|
input_field_default,
|
3104
3117
|
{
|
@@ -3163,18 +3176,18 @@ Datepicker.defaultProps = {
|
|
3163
3176
|
var datepicker_default = Datepicker;
|
3164
3177
|
|
3165
3178
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
3166
|
-
var
|
3167
|
-
var
|
3168
|
-
var
|
3179
|
+
var import_react35 = require("@chakra-ui/react");
|
3180
|
+
var import_react36 = require("@emotion/react");
|
3181
|
+
var import_react37 = __toESM(require("react"));
|
3169
3182
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
3170
3183
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
3171
|
-
const [date, setDate] =
|
3184
|
+
const [date, setDate] = import_react37.default.useState(null);
|
3172
3185
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3173
|
-
|
3186
|
+
import_react35.Box,
|
3174
3187
|
{
|
3175
3188
|
fontSize: "12px",
|
3176
3189
|
lineHeight: "18px",
|
3177
|
-
css:
|
3190
|
+
css: import_react36.css`
|
3178
3191
|
input[type='date']::-webkit-inner-spin-button,
|
3179
3192
|
input[type='date']::-webkit-calendar-picker-indicator {
|
3180
3193
|
display: none;
|
@@ -3185,7 +3198,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3185
3198
|
}
|
3186
3199
|
`,
|
3187
3200
|
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
3188
|
-
|
3201
|
+
import_react35.Input,
|
3189
3202
|
{
|
3190
3203
|
"data-test-id": props["data-test-id"],
|
3191
3204
|
type: "date",
|
@@ -3198,7 +3211,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
3198
3211
|
min,
|
3199
3212
|
max,
|
3200
3213
|
required: true,
|
3201
|
-
css:
|
3214
|
+
css: import_react36.css`
|
3202
3215
|
border: 1px solid transparent;
|
3203
3216
|
|
3204
3217
|
&:focus,
|
@@ -3222,11 +3235,11 @@ DatePickerMonth.defaultProps = {
|
|
3222
3235
|
var datepicker_month_default = DatePickerMonth;
|
3223
3236
|
|
3224
3237
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
3225
|
-
var
|
3238
|
+
var import_react38 = require("@chakra-ui/react");
|
3226
3239
|
var import_styled = __toESM(require("@emotion/styled"));
|
3227
|
-
var
|
3240
|
+
var import_react39 = __toESM(require("react"));
|
3228
3241
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
3229
|
-
var MultiDateWrapper = (0, import_styled.default)(
|
3242
|
+
var MultiDateWrapper = (0, import_styled.default)(import_react38.Box)`
|
3230
3243
|
display: flex;
|
3231
3244
|
align-items: center;
|
3232
3245
|
width: fit-content;
|
@@ -3241,7 +3254,7 @@ var MultiDatePickerMonth = ({
|
|
3241
3254
|
min = "2020-01-01",
|
3242
3255
|
max = "2020-12-31"
|
3243
3256
|
}) => {
|
3244
|
-
const [date, setDate] =
|
3257
|
+
const [date, setDate] = import_react39.default.useState([null, null]);
|
3245
3258
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(MultiDateWrapper, { isError, children: [
|
3246
3259
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3247
3260
|
datepicker_month_default,
|
@@ -3255,7 +3268,7 @@ var MultiDatePickerMonth = ({
|
|
3255
3268
|
max
|
3256
3269
|
}
|
3257
3270
|
),
|
3258
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3271
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react38.Box, { children: "-" }),
|
3259
3272
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
3260
3273
|
datepicker_month_default,
|
3261
3274
|
{
|
@@ -3278,7 +3291,7 @@ MultiDatePickerMonth.defaultProps = {
|
|
3278
3291
|
var multi_datepicker_month_default = MultiDatePickerMonth;
|
3279
3292
|
|
3280
3293
|
// src/components/dialog/components/dialog.tsx
|
3281
|
-
var
|
3294
|
+
var import_react40 = require("@chakra-ui/react");
|
3282
3295
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
3283
3296
|
var Dialog = ({
|
3284
3297
|
title,
|
@@ -3289,12 +3302,12 @@ var Dialog = ({
|
|
3289
3302
|
isOverlayClickable,
|
3290
3303
|
...props
|
3291
3304
|
}) => {
|
3292
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3293
|
-
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3294
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
3295
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3296
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3297
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
3305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react40.Modal, { ...props, children: [
|
3306
|
+
isModalOverlay && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react40.ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react40.ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react40.ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react40.Text, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
3309
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react40.ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
3310
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react40.ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
3298
3311
|
] })
|
3299
3312
|
] });
|
3300
3313
|
};
|
@@ -3309,7 +3322,7 @@ var dialog_default = Dialog;
|
|
3309
3322
|
var Icon2 = __toESM(require("@ctlyst.id/internal-icon"));
|
3310
3323
|
|
3311
3324
|
// src/components/empty-state/components/layout.tsx
|
3312
|
-
var
|
3325
|
+
var import_react41 = require("@chakra-ui/react");
|
3313
3326
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
3314
3327
|
var EmptyState = (props) => {
|
3315
3328
|
const { icon, title, description, buttonText, onClick } = props;
|
@@ -3318,13 +3331,13 @@ var EmptyState = (props) => {
|
|
3318
3331
|
onClick();
|
3319
3332
|
}
|
3320
3333
|
};
|
3321
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react41.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react41.VStack, { textAlign: "center", children: [
|
3322
3335
|
icon,
|
3323
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
3324
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3325
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3336
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react41.VStack, { spacing: 2, textAlign: "center", mt: 3, children: [
|
3337
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react41.Text, { textStyle: "text.lg", fontWeight: "bold", children: title }),
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react41.Text, { textStyle: "text.md", color: "black.medium", whiteSpace: "pre-wrap", children: description })
|
3326
3339
|
] }),
|
3327
|
-
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
3340
|
+
buttonText && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react41.Box, { mt: 3, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react41.Button, { size: "lg", "data-test-id": "CT_component-action-button", onClick: handleClick, children: buttonText }) })
|
3328
3341
|
] }) });
|
3329
3342
|
};
|
3330
3343
|
var layout_default = EmptyState;
|
@@ -3401,28 +3414,28 @@ EmptyState2.NotAuthorize = EmptyStateNotAuthorize;
|
|
3401
3414
|
var empty_state_default = EmptyState2;
|
3402
3415
|
|
3403
3416
|
// src/components/header/components/header.tsx
|
3404
|
-
var
|
3417
|
+
var import_react48 = require("@chakra-ui/react");
|
3405
3418
|
|
3406
3419
|
// src/components/header/components/logo.tsx
|
3407
|
-
var
|
3420
|
+
var import_react42 = require("@chakra-ui/react");
|
3408
3421
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
3409
3422
|
var Logo = ({ url, imageUrl, height }) => {
|
3410
3423
|
if (url)
|
3411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3412
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react42.Box, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react42.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" }) });
|
3425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react42.Image, { w: "initial", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl, objectFit: "contain" });
|
3413
3426
|
};
|
3414
3427
|
var XMSLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3415
|
-
|
3428
|
+
import_react42.Image,
|
3416
3429
|
{
|
3417
3430
|
height: 8,
|
3418
|
-
src: (0,
|
3431
|
+
src: (0, import_react42.useColorModeValue)("https://assets.voila.id/xms/logo-xms.jpg", "https://assets.voila.id/xms/logo-xms-dark.png")
|
3419
3432
|
}
|
3420
3433
|
);
|
3421
3434
|
var VoilaLogo = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
3422
|
-
|
3435
|
+
import_react42.Image,
|
3423
3436
|
{
|
3424
3437
|
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
3425
|
-
filter: (0,
|
3438
|
+
filter: (0, import_react42.useColorModeValue)("none", "invert(1)"),
|
3426
3439
|
maxW: 24
|
3427
3440
|
}
|
3428
3441
|
);
|
@@ -3432,16 +3445,16 @@ Logo.defaultProps = {
|
|
3432
3445
|
};
|
3433
3446
|
|
3434
3447
|
// src/components/header/components/profile.tsx
|
3435
|
-
var
|
3448
|
+
var import_react45 = require("@chakra-ui/react");
|
3436
3449
|
var import_fi2 = require("react-icons/fi");
|
3437
3450
|
|
3438
3451
|
// src/components/nav-item/components/nav-item.tsx
|
3439
|
-
var
|
3452
|
+
var import_react43 = require("@chakra-ui/react");
|
3440
3453
|
var import_shared_utils9 = require("@chakra-ui/shared-utils");
|
3441
3454
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
3442
3455
|
var NavItem = ({ children, isActive, isChild, isDisabled, ...props }) => {
|
3443
3456
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
3444
|
-
|
3457
|
+
import_react43.Link,
|
3445
3458
|
{
|
3446
3459
|
"data-test-id": props["data-test-id"],
|
3447
3460
|
opacity: isDisabled ? "0.3" : "initial",
|
@@ -3481,7 +3494,7 @@ NavItem.defaultProps = {
|
|
3481
3494
|
};
|
3482
3495
|
|
3483
3496
|
// src/components/tooltip/components/tooltip.tsx
|
3484
|
-
var
|
3497
|
+
var import_react44 = require("@chakra-ui/react");
|
3485
3498
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
3486
3499
|
var Tooltip = (props) => {
|
3487
3500
|
const {
|
@@ -3494,7 +3507,7 @@ var Tooltip = (props) => {
|
|
3494
3507
|
fontWeight = "400"
|
3495
3508
|
} = props;
|
3496
3509
|
const content = ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
3497
|
-
|
3510
|
+
import_react44.PopoverContent,
|
3498
3511
|
{
|
3499
3512
|
"data-test-id": "",
|
3500
3513
|
border: "none",
|
@@ -3508,15 +3521,15 @@ var Tooltip = (props) => {
|
|
3508
3521
|
onClose();
|
3509
3522
|
},
|
3510
3523
|
children: [
|
3511
|
-
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3512
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3524
|
+
props.hasArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react44.PopoverArrow, { color, bg, shadow: "none" }),
|
3525
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react44.PopoverBody, { color, ...props, fontWeight, children: props.label })
|
3513
3526
|
]
|
3514
3527
|
}
|
3515
3528
|
);
|
3516
|
-
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3517
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3518
|
-
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3519
|
-
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
3529
|
+
return props.isInteractive === true ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react44.Popover, { trigger: "hover", placement: props.placement, ...props.popoverProps, children: ({ onClose }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
3530
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react44.PopoverTrigger, { children }),
|
3531
|
+
props.portal ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react44.Portal, { children: content({ onClose }) }) : content({ onClose })
|
3532
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react44.Tooltip, { ...props, children });
|
3520
3533
|
};
|
3521
3534
|
|
3522
3535
|
// src/components/header/components/profile.tsx
|
@@ -3532,10 +3545,10 @@ var Profile = ({
|
|
3532
3545
|
...props
|
3533
3546
|
}) => {
|
3534
3547
|
var _a, _b;
|
3535
|
-
const { isOpen, onToggle, onClose } = (0,
|
3536
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3548
|
+
const { isOpen, onToggle, onClose } = (0, import_react45.useDisclosure)();
|
3549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react45.Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
3537
3550
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3538
|
-
|
3551
|
+
import_react45.Box,
|
3539
3552
|
{
|
3540
3553
|
"data-test-id": "CTA_Navbar_Profile_wrapper",
|
3541
3554
|
as: "button",
|
@@ -3551,14 +3564,14 @@ var Profile = ({
|
|
3551
3564
|
onClick: onToggle,
|
3552
3565
|
color,
|
3553
3566
|
...props,
|
3554
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3555
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3556
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3557
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react45.HStack, { children: [
|
3568
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react45.VStack, { alignItems: "flex-end", spacing: "0", ml: "2", color, children: [
|
3569
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Text, { textStyle: "text.xs", mb: "1", children: data == null ? void 0 : data.email }),
|
3570
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react45.Flex, { alignItems: "center", children: [
|
3558
3571
|
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
3559
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3572
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
3560
3573
|
!!((_a = data.office) == null ? void 0 : _a.length) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3561
|
-
|
3574
|
+
import_react45.Box,
|
3562
3575
|
{
|
3563
3576
|
className: "catalyst_header-profile-divider",
|
3564
3577
|
h: "3",
|
@@ -3568,17 +3581,17 @@ var Profile = ({
|
|
3568
3581
|
}
|
3569
3582
|
)
|
3570
3583
|
] }),
|
3571
|
-
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3572
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3584
|
+
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react45.Flex, { align: "center", justify: "center", children: [
|
3585
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Text, { textStyle: "text.xs", children: data.office[0] }),
|
3573
3586
|
data.office.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3574
3587
|
Tooltip,
|
3575
3588
|
{
|
3576
3589
|
isInteractive: true,
|
3577
3590
|
hasArrow: true,
|
3578
3591
|
p: "2",
|
3579
|
-
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3580
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3581
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3592
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react45.Box, { children: [
|
3593
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Text, { children: "Akses Office:" }),
|
3594
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Text, { children: data.office.sort().join(", ") })
|
3582
3595
|
] }),
|
3583
3596
|
textAlign: "left",
|
3584
3597
|
placement: "bottom-end",
|
@@ -3589,7 +3602,7 @@ var Profile = ({
|
|
3589
3602
|
},
|
3590
3603
|
width: 300,
|
3591
3604
|
...officeContainer,
|
3592
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3605
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3593
3606
|
badge_default,
|
3594
3607
|
{
|
3595
3608
|
rounded: "full",
|
@@ -3606,18 +3619,18 @@ var Profile = ({
|
|
3606
3619
|
) })
|
3607
3620
|
}
|
3608
3621
|
)
|
3609
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3622
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Text, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
3610
3623
|
] })
|
3611
3624
|
] }),
|
3612
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3625
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Box, { border: "2px solid", borderColor: "transparent", className: "catalyst-header-avatar", rounded: "full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Avatar, { size: "sm", bg: brandColor, color: "white", name: (_b = data == null ? void 0 : data.name) != null ? _b : data == null ? void 0 : data.email }) }) })
|
3613
3626
|
] })
|
3614
3627
|
}
|
3615
3628
|
),
|
3616
|
-
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
3617
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3618
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3629
|
+
children || /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react45.PopoverContent, { bg: "white", maxW: 200, children: [
|
3630
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.PopoverArrow, { bg: "white" }),
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.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_react45.Box, { display: "flex", alignItems: "center", children: [
|
3619
3632
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_fi2.FiPower, {}),
|
3620
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
3633
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react45.Text, { ml: "2", children: "Logout" })
|
3621
3634
|
] }) }) })
|
3622
3635
|
] })
|
3623
3636
|
] });
|
@@ -3630,17 +3643,17 @@ Profile.defaultProps = {
|
|
3630
3643
|
};
|
3631
3644
|
|
3632
3645
|
// src/components/header/components/switch-mode.tsx
|
3633
|
-
var
|
3646
|
+
var import_react46 = require("@chakra-ui/react");
|
3634
3647
|
var import_fi3 = require("react-icons/fi");
|
3635
3648
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
3636
3649
|
var SwitchMode = () => {
|
3637
|
-
const { colorMode, toggleColorMode } = (0,
|
3638
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
3650
|
+
const { colorMode, toggleColorMode } = (0, import_react46.useColorMode)();
|
3651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react46.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 }) });
|
3639
3652
|
};
|
3640
3653
|
var switch_mode_default = SwitchMode;
|
3641
3654
|
|
3642
3655
|
// src/components/header/components/version.tsx
|
3643
|
-
var
|
3656
|
+
var import_react47 = require("@chakra-ui/react");
|
3644
3657
|
|
3645
3658
|
// src/components/header/utils/formatter.ts
|
3646
3659
|
function environmentName(env) {
|
@@ -3678,7 +3691,7 @@ var Version = ({
|
|
3678
3691
|
}
|
3679
3692
|
) : version,
|
3680
3693
|
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
3681
|
-
|
3694
|
+
import_react47.Box,
|
3682
3695
|
{
|
3683
3696
|
background: "primary.50",
|
3684
3697
|
color: "primary.500",
|
@@ -3718,8 +3731,8 @@ var Header = ({
|
|
3718
3731
|
bg = "white",
|
3719
3732
|
versionStyle,
|
3720
3733
|
...props
|
3721
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3722
|
-
|
3734
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react48.Flex, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3735
|
+
import_react48.Flex,
|
3723
3736
|
{
|
3724
3737
|
h: "auto",
|
3725
3738
|
w: "full",
|
@@ -3727,11 +3740,11 @@ var Header = ({
|
|
3727
3740
|
justifyContent: !mainLogo ? "flex-end" : "space-between",
|
3728
3741
|
pos: "relative",
|
3729
3742
|
children: [
|
3730
|
-
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3743
|
+
mainLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react48.Flex, { alignItems: "center", children: [
|
3731
3744
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
3732
3745
|
children && children
|
3733
3746
|
] }),
|
3734
|
-
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3747
|
+
centerLogo && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react48.HStack, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
3735
3748
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
3736
3749
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
3737
3750
|
Version,
|
@@ -3744,7 +3757,7 @@ var Header = ({
|
|
3744
3757
|
}
|
3745
3758
|
)
|
3746
3759
|
] }),
|
3747
|
-
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
3760
|
+
profile || /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react48.Flex, { alignItems: "center", children: [
|
3748
3761
|
!hideSwitchMode && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(switch_mode_default, {}),
|
3749
3762
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Profile, { color: props.color, brandColor, data, onLogout })
|
3750
3763
|
] })
|
@@ -3768,11 +3781,11 @@ Header.defaultProps = {
|
|
3768
3781
|
};
|
3769
3782
|
|
3770
3783
|
// src/components/header/components/navbar.tsx
|
3771
|
-
var
|
3784
|
+
var import_react49 = require("@chakra-ui/react");
|
3772
3785
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
3773
3786
|
var Navbar = ({ bg = "white", children, ...props }) => {
|
3774
3787
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
3775
|
-
|
3788
|
+
import_react49.Flex,
|
3776
3789
|
{
|
3777
3790
|
minH: "15",
|
3778
3791
|
h: "15",
|
@@ -3792,21 +3805,21 @@ var Navbar = ({ bg = "white", children, ...props }) => {
|
|
3792
3805
|
Navbar.displayName = "Navbar";
|
3793
3806
|
|
3794
3807
|
// src/components/image/index.ts
|
3795
|
-
var
|
3808
|
+
var import_react50 = require("@chakra-ui/react");
|
3796
3809
|
|
3797
3810
|
// src/components/layouting/index.ts
|
3798
|
-
var
|
3811
|
+
var import_react51 = require("@chakra-ui/react");
|
3799
3812
|
|
3800
3813
|
// src/components/list/index.tsx
|
3801
|
-
var
|
3814
|
+
var import_react52 = require("@chakra-ui/react");
|
3802
3815
|
|
3803
3816
|
// src/components/modal/components/modal-back-button.tsx
|
3804
3817
|
var import_icons3 = require("@chakra-ui/icons");
|
3805
|
-
var
|
3818
|
+
var import_react53 = require("@chakra-ui/react");
|
3806
3819
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
3807
3820
|
var ModalBackButton = ({ onClick }) => {
|
3808
3821
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
3809
|
-
|
3822
|
+
import_react53.IconButton,
|
3810
3823
|
{
|
3811
3824
|
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_icons3.ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
3812
3825
|
size: "sm",
|
@@ -3826,12 +3839,12 @@ var ModalBackButton = ({ onClick }) => {
|
|
3826
3839
|
var modal_back_button_default = ModalBackButton;
|
3827
3840
|
|
3828
3841
|
// src/components/modal/index.ts
|
3829
|
-
var
|
3842
|
+
var import_react54 = require("@chakra-ui/react");
|
3830
3843
|
|
3831
3844
|
// src/components/navigation/components/navigation.tsx
|
3832
|
-
var
|
3845
|
+
var import_react55 = require("@chakra-ui/react");
|
3833
3846
|
var Icon5 = __toESM(require("@ctlyst.id/internal-icon"));
|
3834
|
-
var
|
3847
|
+
var import_react56 = require("@emotion/react");
|
3835
3848
|
|
3836
3849
|
// src/components/navigation/components/mapping-icon.tsx
|
3837
3850
|
var Icon4 = __toESM(require("@ctlyst.id/internal-icon"));
|
@@ -3854,8 +3867,8 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
3854
3867
|
// src/components/navigation/components/navigation.tsx
|
3855
3868
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
3856
3869
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
3857
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3858
|
-
|
3870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react55.Box, { borderRadius: "md", overflowX: "auto", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3871
|
+
import_react55.Flex,
|
3859
3872
|
{
|
3860
3873
|
bg: "white",
|
3861
3874
|
w: "full",
|
@@ -3869,9 +3882,9 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3869
3882
|
children: navigations == null ? void 0 : navigations.map((navigation) => {
|
3870
3883
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
3871
3884
|
const activeBg = isActive ? "primary.500" : void 0;
|
3872
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3873
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3874
|
-
|
3885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react55.Popover, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
3886
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react55.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3887
|
+
import_react55.Button,
|
3875
3888
|
{
|
3876
3889
|
h: 7.5,
|
3877
3890
|
p: 2,
|
@@ -3888,10 +3901,10 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3888
3901
|
children: navigation.title
|
3889
3902
|
}
|
3890
3903
|
) }),
|
3891
|
-
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3892
|
-
|
3904
|
+
navigation.children && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react55.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react55.Box, { zIndex: "popover", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3905
|
+
import_react55.PopoverContent,
|
3893
3906
|
{
|
3894
|
-
bg: (0,
|
3907
|
+
bg: (0, import_react55.useColorModeValue)("white", "ebony-clay.800"),
|
3895
3908
|
maxW: 250,
|
3896
3909
|
border: "none",
|
3897
3910
|
borderRadius: "md",
|
@@ -3901,7 +3914,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3901
3914
|
const isLocalLink = host === navHost;
|
3902
3915
|
const isActiveSub = activePath === navLink;
|
3903
3916
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3904
|
-
|
3917
|
+
import_react55.Link,
|
3905
3918
|
{
|
3906
3919
|
as: isLocalLink ? as : void 0,
|
3907
3920
|
href: link,
|
@@ -3909,7 +3922,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3909
3922
|
textDecoration: "none"
|
3910
3923
|
},
|
3911
3924
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
3912
|
-
|
3925
|
+
import_react55.Box,
|
3913
3926
|
{
|
3914
3927
|
display: "flex",
|
3915
3928
|
position: "relative",
|
@@ -3917,24 +3930,24 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
3917
3930
|
cursor: "pointer",
|
3918
3931
|
transition: "padding 0.35s ease 0s",
|
3919
3932
|
_hover: {
|
3920
|
-
backgroundColor: (0,
|
3921
|
-
color: (0,
|
3933
|
+
backgroundColor: (0, import_react55.useColorModeValue)("dove-gray.50", "mirage.900"),
|
3934
|
+
color: (0, import_react55.useColorModeValue)("primary.500", "dove-gray.600"),
|
3922
3935
|
px: 5,
|
3923
3936
|
py: 4,
|
3924
3937
|
_first: { borderTopRadius: "md" },
|
3925
3938
|
_last: { borderBottomRadius: "md" }
|
3926
3939
|
},
|
3927
3940
|
color: isActiveSub ? "primary.500" : "inherit",
|
3928
|
-
css:
|
3941
|
+
css: import_react56.css`
|
3929
3942
|
border-spacing: 4px;
|
3930
3943
|
`,
|
3931
3944
|
px: 6,
|
3932
3945
|
py: 4,
|
3933
3946
|
children: [
|
3934
3947
|
mappingIcon.get(navigation.title),
|
3935
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3948
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react55.Text, { fontSize: "text.sm", ml: 3, children: title }),
|
3936
3949
|
isActiveSub && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
3937
|
-
|
3950
|
+
import_react55.Box,
|
3938
3951
|
{
|
3939
3952
|
width: 0.5,
|
3940
3953
|
height: 8,
|
@@ -3967,7 +3980,7 @@ Navigation.defaultProps = {
|
|
3967
3980
|
var navigation_default = Navigation;
|
3968
3981
|
|
3969
3982
|
// src/components/navigation/components/navigation-bar.tsx
|
3970
|
-
var
|
3983
|
+
var import_react57 = require("@chakra-ui/react");
|
3971
3984
|
var Icon6 = __toESM(require("@ctlyst.id/internal-icon"));
|
3972
3985
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
3973
3986
|
var NavigationBar = ({
|
@@ -3984,8 +3997,8 @@ var NavigationBar = ({
|
|
3984
3997
|
}
|
3985
3998
|
return subMenu.navHost + subMenu.navLink;
|
3986
3999
|
};
|
3987
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
3988
|
-
|
4000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react57.Box, { hidden: isFetched && navigations === void 0, "data-test-id": "CT_component_navigation_cms", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4001
|
+
import_react57.Flex,
|
3989
4002
|
{
|
3990
4003
|
bg: "white",
|
3991
4004
|
w: "full",
|
@@ -4001,9 +4014,9 @@ var NavigationBar = ({
|
|
4001
4014
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
4002
4015
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
4003
4016
|
const activeBg = isActive ? "primary.500" : void 0;
|
4004
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4005
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4006
|
-
|
4017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react57.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: [
|
4018
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react57.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4019
|
+
import_react57.Button,
|
4007
4020
|
{
|
4008
4021
|
h: 7.5,
|
4009
4022
|
p: 2,
|
@@ -4020,8 +4033,8 @@ var NavigationBar = ({
|
|
4020
4033
|
children: item.title
|
4021
4034
|
}
|
4022
4035
|
) }),
|
4023
|
-
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4024
|
-
|
4036
|
+
item.children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react57.PopoverContent, { bg: "white", boxShadow: "raised", borderRadius: "md", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
4037
|
+
import_react57.Link,
|
4025
4038
|
{
|
4026
4039
|
href: urlMenu(subMenu),
|
4027
4040
|
display: "flex",
|
@@ -4038,7 +4051,7 @@ var NavigationBar = ({
|
|
4038
4051
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
4039
4052
|
children: [
|
4040
4053
|
mappingIcon2.get(item.title),
|
4041
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
4054
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react57.Text, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
4042
4055
|
]
|
4043
4056
|
},
|
4044
4057
|
subMenu.id
|
@@ -4055,18 +4068,18 @@ var navigation_bar_default = NavigationBar;
|
|
4055
4068
|
|
4056
4069
|
// src/components/pagination/components/pagination.tsx
|
4057
4070
|
var import_icons4 = require("@chakra-ui/icons");
|
4058
|
-
var
|
4071
|
+
var import_react60 = require("@chakra-ui/react");
|
4059
4072
|
|
4060
4073
|
// src/components/pagination/components/pagination-button.tsx
|
4061
|
-
var
|
4074
|
+
var import_react58 = require("@chakra-ui/react");
|
4062
4075
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
4063
|
-
var PaginationButton = (0,
|
4064
|
-
const btnBg = (0,
|
4065
|
-
const btnColor = (0,
|
4066
|
-
const btnNotActiveBg = (0,
|
4067
|
-
const btnNotActiveColor = (0,
|
4076
|
+
var PaginationButton = (0, import_react58.forwardRef)(({ className, style, isActive, children, ...rest }, ref) => {
|
4077
|
+
const btnBg = (0, import_react58.useColorModeValue)("neutral.300", "mirage.900");
|
4078
|
+
const btnColor = (0, import_react58.useColorModeValue)("black.high", "primary.300");
|
4079
|
+
const btnNotActiveBg = (0, import_react58.useColorModeValue)("secondary.50", "primary.500");
|
4080
|
+
const btnNotActiveColor = (0, import_react58.useColorModeValue)("primary.500", "white");
|
4068
4081
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
4069
|
-
|
4082
|
+
import_react58.Button,
|
4070
4083
|
{
|
4071
4084
|
"data-test-id": "Pagination-Button",
|
4072
4085
|
ref,
|
@@ -4091,7 +4104,7 @@ var PaginationButton = (0, import_react57.forwardRef)(({ className, style, isAct
|
|
4091
4104
|
color: "neutral.300"
|
4092
4105
|
},
|
4093
4106
|
_disabled: {
|
4094
|
-
background: (0,
|
4107
|
+
background: (0, import_react58.useColorModeValue)("neutral.300", "mirage.900"),
|
4095
4108
|
color: "neutral.600",
|
4096
4109
|
pointerEvents: "none"
|
4097
4110
|
},
|
@@ -4107,7 +4120,7 @@ PaginationButton.defaultProps = {
|
|
4107
4120
|
var pagination_button_default = PaginationButton;
|
4108
4121
|
|
4109
4122
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
4110
|
-
var
|
4123
|
+
var import_react59 = require("@chakra-ui/react");
|
4111
4124
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
4112
4125
|
var PaginationButtonTrigger = ({
|
4113
4126
|
color,
|
@@ -4116,7 +4129,7 @@ var PaginationButtonTrigger = ({
|
|
4116
4129
|
visuallyHidden,
|
4117
4130
|
icon
|
4118
4131
|
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
4119
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
4132
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react59.VisuallyHidden, { children: visuallyHidden }),
|
4120
4133
|
icon
|
4121
4134
|
] });
|
4122
4135
|
PaginationButtonTrigger.defaultProps = {
|
@@ -4131,8 +4144,8 @@ var pagination_button_trigger_default = PaginationButtonTrigger;
|
|
4131
4144
|
// src/components/pagination/components/pagination.tsx
|
4132
4145
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
4133
4146
|
var Pagination = ({ className, current, total, onSelect }) => {
|
4134
|
-
const btnColorDisabled = (0,
|
4135
|
-
const btnColor = (0,
|
4147
|
+
const btnColorDisabled = (0, import_react60.useColorModeValue)("secondary.100", "primary.500");
|
4148
|
+
const btnColor = (0, import_react60.useColorModeValue)("primary.500", "secondary.100");
|
4136
4149
|
const disabledPrevious = current === 1;
|
4137
4150
|
const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
|
4138
4151
|
const disabledNext = current === total;
|
@@ -4159,8 +4172,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4159
4172
|
}
|
4160
4173
|
return pageButtons;
|
4161
4174
|
};
|
4162
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4163
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react60.Box, { className, display: "inline-flex", alignItems: "center", children: [
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react60.Box, { mr: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4164
4177
|
pagination_button_trigger_default,
|
4165
4178
|
{
|
4166
4179
|
"data-test-id": "Pagination-Button",
|
@@ -4171,7 +4184,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4171
4184
|
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons4.ArrowLeftIcon, { width: 2 })
|
4172
4185
|
}
|
4173
4186
|
) }),
|
4174
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react60.Box, { bg: "neutral.300", borderRadius: "full", children: [
|
4175
4188
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4176
4189
|
pagination_button_trigger_default,
|
4177
4190
|
{
|
@@ -4190,7 +4203,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4190
4203
|
"data-test-id": "Pagination-Button",
|
4191
4204
|
isActive: page === current,
|
4192
4205
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
4193
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react60.Text, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
4194
4207
|
},
|
4195
4208
|
page
|
4196
4209
|
);
|
@@ -4207,7 +4220,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
4207
4220
|
}
|
4208
4221
|
)
|
4209
4222
|
] }),
|
4210
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4223
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react60.Box, { ml: 1, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
4211
4224
|
pagination_button_trigger_default,
|
4212
4225
|
{
|
4213
4226
|
"data-test-id": "Pagination-Button",
|
@@ -4228,7 +4241,7 @@ Pagination.displayName = "Pagination";
|
|
4228
4241
|
var pagination_default = Pagination;
|
4229
4242
|
|
4230
4243
|
// src/components/pagination/components/pagination-detail.tsx
|
4231
|
-
var
|
4244
|
+
var import_react61 = require("@chakra-ui/react");
|
4232
4245
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
4233
4246
|
var PaginationDetail = ({
|
4234
4247
|
page,
|
@@ -4239,12 +4252,12 @@ var PaginationDetail = ({
|
|
4239
4252
|
lineHeight = 18,
|
4240
4253
|
...rest
|
4241
4254
|
}) => {
|
4242
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
4255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react61.Text, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
4243
4256
|
};
|
4244
4257
|
var pagination_detail_default = PaginationDetail;
|
4245
4258
|
|
4246
4259
|
// src/components/pagination/components/pagination-filter.tsx
|
4247
|
-
var
|
4260
|
+
var import_react62 = require("@chakra-ui/react");
|
4248
4261
|
var React9 = __toESM(require("react"));
|
4249
4262
|
var import_fi4 = require("react-icons/fi");
|
4250
4263
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
@@ -4256,10 +4269,10 @@ var PaginationFilter = ({
|
|
4256
4269
|
...rest
|
4257
4270
|
}) => {
|
4258
4271
|
const [value, setValue] = React9.useState(limit);
|
4259
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
4260
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react62.Box, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
4273
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react62.Text, { fontSize: "text.sm", lineHeight: 18, color: (0, import_react62.useColorModeValue)("neutral.900", "white"), ...rest, children: label }),
|
4261
4274
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
4262
|
-
|
4275
|
+
import_react62.Select,
|
4263
4276
|
{
|
4264
4277
|
textAlign: "center",
|
4265
4278
|
size: "xs",
|
@@ -4289,22 +4302,22 @@ PaginationFilter.defaultProps = {
|
|
4289
4302
|
var pagination_filter_default = PaginationFilter;
|
4290
4303
|
|
4291
4304
|
// src/components/pin-input/index.ts
|
4292
|
-
var
|
4305
|
+
var import_react63 = require("@chakra-ui/react");
|
4293
4306
|
|
4294
4307
|
// src/components/popover/index.ts
|
4295
|
-
var
|
4308
|
+
var import_react64 = require("@chakra-ui/react");
|
4296
4309
|
|
4297
4310
|
// src/components/progress/index.ts
|
4298
|
-
var
|
4311
|
+
var import_react65 = require("@chakra-ui/react");
|
4299
4312
|
|
4300
4313
|
// src/components/radio/components/radio.tsx
|
4301
|
-
var
|
4314
|
+
var import_react66 = require("@chakra-ui/react");
|
4302
4315
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
4303
4316
|
var Radio = ({ isError = false, helpText, errorText, children, isDisabled, ...rest }) => {
|
4304
4317
|
const variant = isError ? "errors" : "unstyled";
|
4305
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
4306
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
4307
|
-
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
4318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_react66.Box, { children: [
|
4319
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react66.Box, { display: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react66.Radio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react66.Text, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
4320
|
+
isError && errorText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react66.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react66.Text, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) }) : helpText ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react66.Box, { mt: "2", ml: "6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react66.Text, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) }) : null
|
4308
4321
|
] });
|
4309
4322
|
};
|
4310
4323
|
Radio.displayName = "Radio";
|
@@ -4315,7 +4328,7 @@ Radio.defaultProps = {
|
|
4315
4328
|
};
|
4316
4329
|
|
4317
4330
|
// src/components/radio/components/radio-group.tsx
|
4318
|
-
var
|
4331
|
+
var import_react67 = require("@chakra-ui/react");
|
4319
4332
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
4320
4333
|
var RadioGroup = ({
|
4321
4334
|
children,
|
@@ -4325,7 +4338,7 @@ var RadioGroup = ({
|
|
4325
4338
|
errorMessage,
|
4326
4339
|
...props
|
4327
4340
|
}) => {
|
4328
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
4341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react67.Box, { mt: "2", mb: "1", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react67.RadioGroup, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react67.Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
4329
4342
|
};
|
4330
4343
|
RadioGroup.displayName = "RadioGroup";
|
4331
4344
|
RadioGroup.defaultProps = {
|
@@ -4335,34 +4348,34 @@ RadioGroup.defaultProps = {
|
|
4335
4348
|
};
|
4336
4349
|
|
4337
4350
|
// src/components/radio/index.ts
|
4338
|
-
var
|
4351
|
+
var import_react68 = require("@chakra-ui/react");
|
4339
4352
|
|
4340
4353
|
// src/components/rating/components/rating.tsx
|
4341
|
-
var
|
4354
|
+
var import_react69 = require("@chakra-ui/react");
|
4342
4355
|
var import_internal_icon7 = require("@ctlyst.id/internal-icon");
|
4343
4356
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
4344
4357
|
var Rating = ({ value }) => {
|
4345
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
4358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react69.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 })) });
|
4346
4359
|
};
|
4347
4360
|
var rating_default = Rating;
|
4348
4361
|
|
4349
4362
|
// src/components/select/components/select.tsx
|
4350
|
-
var
|
4363
|
+
var import_react73 = require("@chakra-ui/react");
|
4351
4364
|
var import_system7 = require("@chakra-ui/system");
|
4352
4365
|
var Icon7 = __toESM(require("@ctlyst.id/internal-icon"));
|
4353
4366
|
var import_react_select = __toESM(require("react-select"));
|
4354
4367
|
|
4355
4368
|
// src/config/theme/foundations/shadows.ts
|
4356
|
-
var
|
4369
|
+
var import_react70 = require("@chakra-ui/react");
|
4357
4370
|
var shadows = {
|
4358
|
-
...
|
4371
|
+
...import_react70.theme.shadows,
|
4359
4372
|
raised: "0px 4px 20px rgba(0, 0, 0, 0.05)"
|
4360
4373
|
};
|
4361
4374
|
|
4362
4375
|
// src/config/theme/foundations/sizes.ts
|
4363
|
-
var
|
4376
|
+
var import_react71 = require("@chakra-ui/react");
|
4364
4377
|
var sizes = {
|
4365
|
-
...
|
4378
|
+
...import_react71.theme.sizes,
|
4366
4379
|
4.5: "1.125rem",
|
4367
4380
|
9.5: "2.375rem",
|
4368
4381
|
18: "4.5rem",
|
@@ -4372,9 +4385,9 @@ var sizes = {
|
|
4372
4385
|
};
|
4373
4386
|
|
4374
4387
|
// src/config/theme/foundations/spacing.ts
|
4375
|
-
var
|
4388
|
+
var import_react72 = require("@chakra-ui/react");
|
4376
4389
|
var spacing = {
|
4377
|
-
...
|
4390
|
+
...import_react72.theme.space,
|
4378
4391
|
4.5: "1.125rem",
|
4379
4392
|
9.5: "2.375rem",
|
4380
4393
|
18: "4.5rem",
|
@@ -4734,13 +4747,13 @@ function ClearIndicator(props) {
|
|
4734
4747
|
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" }) });
|
4735
4748
|
}
|
4736
4749
|
function MultiValue(props) {
|
4737
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValue, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react73.Badge, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4738
4751
|
}
|
4739
4752
|
function MultiValueRemove(props) {
|
4740
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react73.Flex, { align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
4741
4754
|
}
|
4742
4755
|
function NoOptionsMessage(props) {
|
4743
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
4756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react73.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" });
|
4744
4757
|
}
|
4745
4758
|
function Select2({
|
4746
4759
|
styles,
|
@@ -4848,7 +4861,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
4848
4861
|
}
|
4849
4862
|
|
4850
4863
|
// src/components/select/components/select-with-checkbox.tsx
|
4851
|
-
var
|
4864
|
+
var import_react74 = require("@chakra-ui/react");
|
4852
4865
|
var import_system11 = require("@chakra-ui/system");
|
4853
4866
|
var import_react_select2 = __toESM(require("react-select"));
|
4854
4867
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
@@ -4911,7 +4924,7 @@ var InputOption = ({
|
|
4911
4924
|
innerProps: props,
|
4912
4925
|
...rest,
|
4913
4926
|
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
4914
|
-
|
4927
|
+
import_react74.Flex,
|
4915
4928
|
{
|
4916
4929
|
alignItems: "center",
|
4917
4930
|
width: "100%",
|
@@ -4920,15 +4933,15 @@ var InputOption = ({
|
|
4920
4933
|
cursor: isDisabled ? "not-allowed" : "default",
|
4921
4934
|
children: [
|
4922
4935
|
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4923
|
-
|
4936
|
+
import_react74.Checkbox,
|
4924
4937
|
{
|
4925
4938
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
4926
4939
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
4927
4940
|
isDisabled,
|
4928
4941
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
4929
4942
|
}
|
4930
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4931
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4943
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react74.Checkbox, { isChecked: isSelected, "data-test-id": "CT_component_select-checkbox_option-checkbox" }),
|
4944
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react74.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
4932
4945
|
]
|
4933
4946
|
}
|
4934
4947
|
)
|
@@ -5000,13 +5013,13 @@ var SelectCheckbox = (props) => {
|
|
5000
5013
|
var select_with_checkbox_default = SelectCheckbox;
|
5001
5014
|
|
5002
5015
|
// src/components/sidebar/components/sidebar.tsx
|
5003
|
-
var
|
5016
|
+
var import_react75 = require("@chakra-ui/react");
|
5004
5017
|
var import_framer_motion = require("framer-motion");
|
5005
5018
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
5006
5019
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5007
5020
|
const { width = "220px" } = props;
|
5008
5021
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
5009
|
-
|
5022
|
+
import_react75.Flex,
|
5010
5023
|
{
|
5011
5024
|
position: "relative",
|
5012
5025
|
as: import_framer_motion.motion.div,
|
@@ -5026,13 +5039,13 @@ var Sidebar = ({ isCollapse, children, ...props }) => {
|
|
5026
5039
|
Sidebar.displayName = "Sidebar";
|
5027
5040
|
|
5028
5041
|
// src/components/sidebar/components/sidebar-header.tsx
|
5029
|
-
var
|
5042
|
+
var import_react76 = require("@chakra-ui/react");
|
5030
5043
|
var import_internal_icon8 = require("@ctlyst.id/internal-icon");
|
5031
5044
|
var import_framer_motion2 = require("framer-motion");
|
5032
5045
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
5033
5046
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5034
5047
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5035
|
-
|
5048
|
+
import_react76.Box,
|
5036
5049
|
{
|
5037
5050
|
px: "2",
|
5038
5051
|
color: "neutral.900",
|
@@ -5042,7 +5055,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5042
5055
|
color: "primary.500"
|
5043
5056
|
},
|
5044
5057
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
5045
|
-
|
5058
|
+
import_react76.Flex,
|
5046
5059
|
{
|
5047
5060
|
"data-test-id": "nLkz69YipW818FioeAxVI",
|
5048
5061
|
direction: "row",
|
@@ -5052,7 +5065,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5052
5065
|
cursor: "pointer",
|
5053
5066
|
children: [
|
5054
5067
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5055
|
-
|
5068
|
+
import_react76.Box,
|
5056
5069
|
{
|
5057
5070
|
as: import_framer_motion2.motion.div,
|
5058
5071
|
boxSize: "4",
|
@@ -5063,8 +5076,8 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5063
5076
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_internal_icon8.ArrowRight, { size: 4, color: "inherit" })
|
5064
5077
|
}
|
5065
5078
|
),
|
5066
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5067
|
-
|
5079
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_framer_motion2.AnimatePresence, { children: !isCollapse && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react76.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
5080
|
+
import_react76.Text,
|
5068
5081
|
{
|
5069
5082
|
as: import_framer_motion2.motion.div,
|
5070
5083
|
w: "max-content",
|
@@ -5090,32 +5103,32 @@ SidebarHeader.defaultProps = {
|
|
5090
5103
|
};
|
5091
5104
|
|
5092
5105
|
// src/components/sidebar/components/sidebar-menu.tsx
|
5093
|
-
var
|
5106
|
+
var import_react77 = require("@chakra-ui/react");
|
5094
5107
|
var Icon8 = __toESM(require("@ctlyst.id/internal-icon"));
|
5095
5108
|
var import_framer_motion3 = require("framer-motion");
|
5096
5109
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
5097
5110
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5098
5111
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5099
|
-
|
5112
|
+
import_react77.Box,
|
5100
5113
|
{
|
5101
5114
|
as: import_framer_motion3.motion.div,
|
5102
5115
|
transitionTimingFunction: "linear",
|
5103
5116
|
initial: { padding: "8px" },
|
5104
5117
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5105
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Accordion, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5106
5119
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5107
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.AccordionItem, { mt: "4", children: ({ isExpanded }) => {
|
5108
5121
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5109
5122
|
const noChild = !item.children.length;
|
5110
5123
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5111
5124
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5112
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5125
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Popover, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5113
5126
|
const activeOption = isOpen ? "primary.50" : "white";
|
5114
5127
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5115
5128
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5116
5129
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
5117
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5118
|
-
|
5130
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.PopoverTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5131
|
+
import_react77.AccordionButton,
|
5119
5132
|
{
|
5120
5133
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
5121
5134
|
p: "0",
|
@@ -5133,9 +5146,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5133
5146
|
position: "relative",
|
5134
5147
|
...itemStyles,
|
5135
5148
|
children: [
|
5136
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5149
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5137
5150
|
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5138
|
-
|
5151
|
+
import_react77.Box,
|
5139
5152
|
{
|
5140
5153
|
display: "flex",
|
5141
5154
|
w: "full",
|
@@ -5149,9 +5162,9 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5149
5162
|
animate: { opacity: 1, x: 0 },
|
5150
5163
|
exit: { opacity: 0, x: 16 },
|
5151
5164
|
children: [
|
5152
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5165
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Box, { h: "3.5", position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5153
5166
|
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5154
|
-
|
5167
|
+
import_react77.Box,
|
5155
5168
|
{
|
5156
5169
|
display: "flex",
|
5157
5170
|
boxSize: "3",
|
@@ -5171,12 +5184,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5171
5184
|
},
|
5172
5185
|
item.id
|
5173
5186
|
) }, item.id),
|
5174
|
-
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5175
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5187
|
+
isOpenOptions && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Portal, { children: item.children.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react77.PopoverContent, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5188
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.PopoverHeader, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react77.Box, { display: "flex", alignItems: "center", children: [
|
5176
5189
|
mappingIcon2.get(item.icon || ""),
|
5177
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5190
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Box, { as: "span", ml: "2", children: item.title })
|
5178
5191
|
] }) }),
|
5179
|
-
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5192
|
+
!!item.children.length && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.PopoverBody, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5180
5193
|
NavItem,
|
5181
5194
|
{
|
5182
5195
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5192,7 +5205,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5192
5205
|
},
|
5193
5206
|
submenu.id
|
5194
5207
|
)) })
|
5195
|
-
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5208
|
+
] }) : isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.PopoverContent, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.PopoverBody, { py: "1", px: "0", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
5196
5209
|
NavItem,
|
5197
5210
|
{
|
5198
5211
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5205,15 +5218,15 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5205
5218
|
rounded: "none",
|
5206
5219
|
...itemStyles,
|
5207
5220
|
children: [
|
5208
|
-
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5209
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5221
|
+
mappingIcon2 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Box, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5222
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Box, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.Text, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5210
5223
|
]
|
5211
5224
|
},
|
5212
5225
|
item.id
|
5213
5226
|
) }) }) })
|
5214
5227
|
] });
|
5215
5228
|
} }, item.id),
|
5216
|
-
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5229
|
+
!isCollapse && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react77.AccordionPanel, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
5217
5230
|
NavItem,
|
5218
5231
|
{
|
5219
5232
|
mt: "1",
|
@@ -5239,16 +5252,16 @@ SidebarMenu.defaultProps = {
|
|
5239
5252
|
};
|
5240
5253
|
|
5241
5254
|
// src/components/switch/components/switch.tsx
|
5242
|
-
var
|
5255
|
+
var import_react78 = require("@chakra-ui/react");
|
5243
5256
|
var import_shared_utils10 = require("@chakra-ui/shared-utils");
|
5244
5257
|
var import_internal_icon9 = require("@ctlyst.id/internal-icon");
|
5245
|
-
var
|
5258
|
+
var import_react79 = require("react");
|
5246
5259
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
5247
|
-
var Switch = (0,
|
5248
|
-
const styles = (0,
|
5249
|
-
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0,
|
5250
|
-
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0,
|
5251
|
-
const containerStyles = (0,
|
5260
|
+
var Switch = (0, import_react78.forwardRef)(function Switch2(props, ref) {
|
5261
|
+
const styles = (0, import_react78.useMultiStyleConfig)("Switch", props);
|
5262
|
+
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = (0, import_react78.omitThemingProps)(props);
|
5263
|
+
const { state, getInputProps, getCheckboxProps, getRootProps, getLabelProps } = (0, import_react78.useCheckbox)(ownProps);
|
5264
|
+
const containerStyles = (0, import_react79.useMemo)(
|
5252
5265
|
() => ({
|
5253
5266
|
display: "inline-block",
|
5254
5267
|
position: "relative",
|
@@ -5258,7 +5271,7 @@ var Switch = (0, import_react77.forwardRef)(function Switch2(props, ref) {
|
|
5258
5271
|
}),
|
5259
5272
|
[styles.container]
|
5260
5273
|
);
|
5261
|
-
const trackStyles = (0,
|
5274
|
+
const trackStyles = (0, import_react79.useMemo)(
|
5262
5275
|
() => ({
|
5263
5276
|
display: "inline-flex",
|
5264
5277
|
flexShrink: 0,
|
@@ -5270,7 +5283,7 @@ var Switch = (0, import_react77.forwardRef)(function Switch2(props, ref) {
|
|
5270
5283
|
}),
|
5271
5284
|
[styles.track]
|
5272
5285
|
);
|
5273
|
-
const labelStyles = (0,
|
5286
|
+
const labelStyles = (0, import_react79.useMemo)(
|
5274
5287
|
() => ({
|
5275
5288
|
userSelect: "none",
|
5276
5289
|
marginStart: spacing2,
|
@@ -5287,7 +5300,7 @@ var Switch = (0, import_react77.forwardRef)(function Switch2(props, ref) {
|
|
5287
5300
|
return iconSize[value];
|
5288
5301
|
};
|
5289
5302
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5290
|
-
|
5303
|
+
import_react78.chakra.label,
|
5291
5304
|
{
|
5292
5305
|
...getRootProps(),
|
5293
5306
|
display: "flex",
|
@@ -5296,13 +5309,13 @@ var Switch = (0, import_react77.forwardRef)(function Switch2(props, ref) {
|
|
5296
5309
|
__css: containerStyles,
|
5297
5310
|
children: [
|
5298
5311
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5299
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5300
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
5312
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react78.chakra.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5313
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react78.Flex, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5301
5314
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Check, { color: "white", size: getIconSize(props.size) }),
|
5302
5315
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_internal_icon9.Close, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5303
5316
|
] }),
|
5304
5317
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5305
|
-
|
5318
|
+
import_react78.chakra.span,
|
5306
5319
|
{
|
5307
5320
|
__css: styles.thumb,
|
5308
5321
|
className: "chakra-switch__thumb",
|
@@ -5312,7 +5325,7 @@ var Switch = (0, import_react77.forwardRef)(function Switch2(props, ref) {
|
|
5312
5325
|
)
|
5313
5326
|
] }),
|
5314
5327
|
children && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
5315
|
-
|
5328
|
+
import_react78.chakra.span,
|
5316
5329
|
{
|
5317
5330
|
className: "chakra-switch__label",
|
5318
5331
|
color: state.isDisabled ? "black.low" : "black.high",
|
@@ -5332,18 +5345,18 @@ Switch.defaultProps = {
|
|
5332
5345
|
var switch_default = Switch;
|
5333
5346
|
|
5334
5347
|
// src/components/table/index.tsx
|
5335
|
-
var
|
5348
|
+
var import_react80 = require("@chakra-ui/react");
|
5336
5349
|
|
5337
5350
|
// src/components/tabs/components/tab.tsx
|
5338
|
-
var
|
5351
|
+
var import_react81 = require("@chakra-ui/react");
|
5339
5352
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
5340
|
-
var Tab = (0,
|
5353
|
+
var Tab = (0, import_react81.forwardRef)((props, ref) => {
|
5341
5354
|
var _a, _b;
|
5342
|
-
const tabProps = (0,
|
5355
|
+
const tabProps = (0, import_react81.useTab)({ ...props, ref });
|
5343
5356
|
const isSelected = !!tabProps["aria-selected"];
|
5344
|
-
const styles = (0,
|
5357
|
+
const styles = (0, import_react81.useMultiStyleConfig)("Tabs", tabProps);
|
5345
5358
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
5346
|
-
|
5359
|
+
import_react81.Button,
|
5347
5360
|
{
|
5348
5361
|
"data-test-id": props["data-test-id"],
|
5349
5362
|
p: 4,
|
@@ -5368,7 +5381,7 @@ var Tab = (0, import_react80.forwardRef)((props, ref) => {
|
|
5368
5381
|
},
|
5369
5382
|
__css: styles.tab,
|
5370
5383
|
...tabProps,
|
5371
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
5384
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react81.Flex, { alignItems: "center", children: [
|
5372
5385
|
(_a = props.leftAddon) == null ? void 0 : _a.call(props, { isSelected }),
|
5373
5386
|
tabProps.children,
|
5374
5387
|
(_b = props.rightAddon) == null ? void 0 : _b.call(props, { isSelected })
|
@@ -5379,39 +5392,39 @@ var Tab = (0, import_react80.forwardRef)((props, ref) => {
|
|
5379
5392
|
var tab_default = Tab;
|
5380
5393
|
|
5381
5394
|
// src/components/tabs/index.ts
|
5382
|
-
var
|
5395
|
+
var import_react82 = require("@chakra-ui/react");
|
5383
5396
|
|
5384
5397
|
// src/components/text/index.ts
|
5385
|
-
var
|
5398
|
+
var import_react83 = require("@chakra-ui/react");
|
5386
5399
|
|
5387
5400
|
// src/components/time-input/components/index.tsx
|
5388
|
-
var
|
5401
|
+
var import_react85 = require("@chakra-ui/react");
|
5389
5402
|
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
5390
|
-
var
|
5403
|
+
var import_react86 = require("react");
|
5391
5404
|
|
5392
5405
|
// src/components/time-input/components/integration.tsx
|
5393
5406
|
var import_timescape = require("@zamiru/timescape");
|
5394
5407
|
var import_timescape2 = require("@zamiru/timescape");
|
5395
|
-
var
|
5408
|
+
var import_react84 = require("react");
|
5396
5409
|
var useTimescape = (options = {}) => {
|
5397
5410
|
var _a;
|
5398
5411
|
const { date, onChangeDate, ...rest } = options;
|
5399
|
-
const [manager] = (0,
|
5400
|
-
const onChangeDateRef = (0,
|
5401
|
-
(0,
|
5412
|
+
const [manager] = (0, import_react84.useState)(() => new import_timescape.TimescapeManager(date, rest));
|
5413
|
+
const onChangeDateRef = (0, import_react84.useRef)(onChangeDate);
|
5414
|
+
(0, import_react84.useLayoutEffect)(() => {
|
5402
5415
|
onChangeDateRef.current = onChangeDate;
|
5403
5416
|
}, [onChangeDate]);
|
5404
|
-
const [optionsState, update] = (0,
|
5417
|
+
const [optionsState, update] = (0, import_react84.useState)(() => ({
|
5405
5418
|
date,
|
5406
5419
|
...rest
|
5407
5420
|
}));
|
5408
|
-
(0,
|
5421
|
+
(0, import_react84.useEffect)(() => {
|
5409
5422
|
manager.resync();
|
5410
5423
|
return () => {
|
5411
5424
|
manager.remove();
|
5412
5425
|
};
|
5413
5426
|
}, [manager]);
|
5414
|
-
(0,
|
5427
|
+
(0, import_react84.useEffect)(() => {
|
5415
5428
|
return manager.on("changeDate", (nextDate) => {
|
5416
5429
|
var _a2;
|
5417
5430
|
(_a2 = onChangeDateRef.current) == null ? void 0 : _a2.call(onChangeDateRef, nextDate);
|
@@ -5419,7 +5432,7 @@ var useTimescape = (options = {}) => {
|
|
5419
5432
|
});
|
5420
5433
|
}, [manager]);
|
5421
5434
|
const timestamp = (_a = optionsState.date) == null ? void 0 : _a.getTime();
|
5422
|
-
(0,
|
5435
|
+
(0, import_react84.useEffect)(() => {
|
5423
5436
|
manager.date = timestamp;
|
5424
5437
|
manager.minDate = optionsState.minDate;
|
5425
5438
|
manager.maxDate = optionsState.maxDate;
|
@@ -5475,9 +5488,9 @@ var Time = class {
|
|
5475
5488
|
return `${this.hours}:${this.minutes}:${this.seconds}`;
|
5476
5489
|
}
|
5477
5490
|
};
|
5478
|
-
var InputTimeArea = (0,
|
5491
|
+
var InputTimeArea = (0, import_react85.forwardRef)((props, ref) => {
|
5479
5492
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5480
|
-
|
5493
|
+
import_react85.Input,
|
5481
5494
|
{
|
5482
5495
|
_focusWithin: {
|
5483
5496
|
bg: "neutral.300"
|
@@ -5495,7 +5508,7 @@ var InputTimeArea = (0, import_react84.forwardRef)((props, ref) => {
|
|
5495
5508
|
}
|
5496
5509
|
);
|
5497
5510
|
});
|
5498
|
-
var TimeInput2 = (0,
|
5511
|
+
var TimeInput2 = (0, import_react85.forwardRef)(
|
5499
5512
|
({
|
5500
5513
|
config: config2,
|
5501
5514
|
label,
|
@@ -5521,7 +5534,7 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5521
5534
|
date,
|
5522
5535
|
...config2
|
5523
5536
|
});
|
5524
|
-
(0,
|
5537
|
+
(0, import_react86.useEffect)(() => {
|
5525
5538
|
var _a, _b, _c, _d, _e, _f;
|
5526
5539
|
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
5527
5540
|
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
@@ -5530,7 +5543,7 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5530
5543
|
onChangeTime(timeValue);
|
5531
5544
|
}
|
5532
5545
|
}, [options.date]);
|
5533
|
-
(0,
|
5546
|
+
(0, import_react86.useImperativeHandle)(ref, () => ({
|
5534
5547
|
focus() {
|
5535
5548
|
_manager.focusField("hours");
|
5536
5549
|
}
|
@@ -5551,7 +5564,7 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5551
5564
|
};
|
5552
5565
|
};
|
5553
5566
|
const { outlineColor, focusColor } = getProperties();
|
5554
|
-
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react85.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5555
5568
|
field_default,
|
5556
5569
|
{
|
5557
5570
|
isError,
|
@@ -5561,7 +5574,7 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5561
5574
|
isDisabled,
|
5562
5575
|
isSuccess,
|
5563
5576
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5564
|
-
|
5577
|
+
import_react85.Box,
|
5565
5578
|
{
|
5566
5579
|
transition: "all 0.15s",
|
5567
5580
|
boxShadow: "none",
|
@@ -5572,7 +5585,7 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5572
5585
|
borderColor: focusColor
|
5573
5586
|
},
|
5574
5587
|
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5575
|
-
|
5588
|
+
import_react85.InputGroup,
|
5576
5589
|
{
|
5577
5590
|
borderRadius: "sm",
|
5578
5591
|
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
@@ -5580,7 +5593,7 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5580
5593
|
alignItems: "center",
|
5581
5594
|
gap: 3,
|
5582
5595
|
children: [
|
5583
|
-
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
5596
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react85.Flex, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5584
5597
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...hoursProps }),
|
5585
5598
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5586
5599
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("minutes") }),
|
@@ -5588,7 +5601,7 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5588
5601
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
5589
5602
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
5590
5603
|
] }),
|
5591
|
-
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5604
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react85.Input, { p: 0, ...getInputProps("am/pm") })
|
5592
5605
|
] }),
|
5593
5606
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon10.Clock, { color: "neutral.400", size: 4 }),
|
5594
5607
|
addOnRight
|
@@ -5603,15 +5616,15 @@ var TimeInput2 = (0, import_react84.forwardRef)(
|
|
5603
5616
|
);
|
5604
5617
|
|
5605
5618
|
// src/components/toast/components/toast.tsx
|
5606
|
-
var
|
5619
|
+
var import_react88 = require("@chakra-ui/react");
|
5607
5620
|
var import_react_toastify = require("react-toastify");
|
5608
5621
|
|
5609
5622
|
// src/components/toast/components/styles.tsx
|
5610
|
-
var
|
5623
|
+
var import_react87 = require("@emotion/react");
|
5611
5624
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
5612
5625
|
var Styles2 = () => {
|
5613
5626
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
5614
|
-
|
5627
|
+
import_react87.Global,
|
5615
5628
|
{
|
5616
5629
|
styles: `
|
5617
5630
|
.Toastify__toast-container {
|
@@ -5664,7 +5677,7 @@ var renderIcon = (icon, type) => {
|
|
5664
5677
|
return icon;
|
5665
5678
|
};
|
5666
5679
|
var useToast = () => {
|
5667
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
5680
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react88.useToken)("colors", [
|
5668
5681
|
"primary.500",
|
5669
5682
|
"neutral.500",
|
5670
5683
|
"info.500",
|
@@ -5675,13 +5688,13 @@ var useToast = () => {
|
|
5675
5688
|
const content = (icon, message, link) => {
|
5676
5689
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
5677
5690
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(styles_default2, {}),
|
5678
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5679
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
5680
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5681
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5691
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react88.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, children: [
|
5692
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react88.Flex, { alignItems: "center", children: [
|
5693
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react88.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
5694
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react88.chakra.span, { noOfLines: 2, children: message })
|
5682
5695
|
] }),
|
5683
5696
|
link && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
5684
|
-
|
5697
|
+
import_react88.Link,
|
5685
5698
|
{
|
5686
5699
|
href: link.url,
|
5687
5700
|
textDecoration: "underline",
|
@@ -5760,9 +5773,9 @@ var useToast = () => {
|
|
5760
5773
|
var import_react_toastify2 = require("react-toastify");
|
5761
5774
|
|
5762
5775
|
// src/components/uploader/components/uploader.tsx
|
5763
|
-
var
|
5776
|
+
var import_react89 = require("@chakra-ui/react");
|
5764
5777
|
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5765
|
-
var
|
5778
|
+
var import_react90 = require("react");
|
5766
5779
|
var import_react_dropzone = require("react-dropzone");
|
5767
5780
|
|
5768
5781
|
// src/components/uploader/constants.ts
|
@@ -5791,9 +5804,48 @@ var concatList = (list) => {
|
|
5791
5804
|
};
|
5792
5805
|
var formatValidationMessage = (extension) => `Foto harus dalam format ${concatList(extension.map((ext) => `.${ext}`))}.`;
|
5793
5806
|
|
5807
|
+
// src/components/uploader/utils/error-code.ts
|
5808
|
+
var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
5809
|
+
ErrorCode2["FileInvalidType"] = "file-invalid-type";
|
5810
|
+
ErrorCode2["FileTooLarge"] = "file-too-large";
|
5811
|
+
ErrorCode2["FileTooSmall"] = "file-too-small";
|
5812
|
+
ErrorCode2["TooManyFiles"] = "too-many-files";
|
5813
|
+
ErrorCode2["FileInvalidDimension"] = "file-invalid-dimension";
|
5814
|
+
return ErrorCode2;
|
5815
|
+
})(ErrorCode || {});
|
5816
|
+
var error_code_default = ErrorCode;
|
5817
|
+
|
5818
|
+
// src/components/uploader/utils/handler.ts
|
5819
|
+
var defaultOnHandleRejections = (fileRejection, config2, handleRejection) => {
|
5820
|
+
var _a, _b, _c, _d;
|
5821
|
+
const { file, errors: errors3 } = fileRejection[0];
|
5822
|
+
switch (errors3[0].code) {
|
5823
|
+
case error_code_default.FileInvalidType: {
|
5824
|
+
const fileFormat = file.name.split(".").pop();
|
5825
|
+
if (!(config2 == null ? void 0 : config2.acceptFormat)) return;
|
5826
|
+
if (!((_a = config2 == null ? void 0 : config2.acceptFormat) == null ? void 0 : _a.validate.includes(fileFormat))) {
|
5827
|
+
handleRejection(
|
5828
|
+
(_d = (_b = config2.acceptFormat) == null ? void 0 : _b.message) != null ? _d : formatValidationMessage((_c = config2.acceptFormat) == null ? void 0 : _c.validate),
|
5829
|
+
file,
|
5830
|
+
null
|
5831
|
+
);
|
5832
|
+
}
|
5833
|
+
break;
|
5834
|
+
}
|
5835
|
+
case error_code_default.FileTooLarge: {
|
5836
|
+
if (config2.maxFileSize) {
|
5837
|
+
handleRejection(config2.maxFileSize.message, file, null);
|
5838
|
+
}
|
5839
|
+
break;
|
5840
|
+
}
|
5841
|
+
default:
|
5842
|
+
handleRejection(errors3[0].message, file, null);
|
5843
|
+
break;
|
5844
|
+
}
|
5845
|
+
};
|
5846
|
+
|
5794
5847
|
// src/components/uploader/components/uploader.tsx
|
5795
5848
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
5796
|
-
var import_react90 = require("react");
|
5797
5849
|
var Uploader = ({
|
5798
5850
|
onHandleUploadFile,
|
5799
5851
|
onHandleRejections,
|
@@ -5820,12 +5872,12 @@ var Uploader = ({
|
|
5820
5872
|
errorText,
|
5821
5873
|
isShowReupload = true,
|
5822
5874
|
size: size2 = "lg",
|
5875
|
+
validatorExt,
|
5823
5876
|
...props
|
5824
5877
|
}) => {
|
5825
|
-
const
|
5826
|
-
const [filePreview, setFilePreview] = (0, import_react89.useState)();
|
5878
|
+
const [filePreview, setFilePreview] = (0, import_react90.useState)();
|
5827
5879
|
const toast2 = useToast();
|
5828
|
-
const handleRejection = (0,
|
5880
|
+
const handleRejection = (0, import_react90.useCallback)(
|
5829
5881
|
(message, file, image) => {
|
5830
5882
|
if (onHandleRejections) {
|
5831
5883
|
onHandleRejections(file, image);
|
@@ -5837,33 +5889,21 @@ var Uploader = ({
|
|
5837
5889
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
5838
5890
|
[onHandleRejections]
|
5839
5891
|
);
|
5840
|
-
const
|
5892
|
+
const onDropAccepted = (0, import_react90.useCallback)(
|
5841
5893
|
(files) => {
|
5842
|
-
var _a;
|
5843
5894
|
const file = files[0];
|
5844
|
-
const fileFormat = file.name.split(".").pop();
|
5845
|
-
if (!(acceptFormat == null ? void 0 : acceptFormat.validate.includes(fileFormat))) {
|
5846
|
-
return handleRejection((_a = acceptFormat.message) != null ? _a : formatValidationMessage(acceptFormat.validate), file, null);
|
5847
|
-
}
|
5848
5895
|
const imageUrl = URL.createObjectURL(file);
|
5849
5896
|
const img = new Image();
|
5850
5897
|
img.src = imageUrl;
|
5851
5898
|
img.onload = () => {
|
5852
|
-
var _a2;
|
5853
5899
|
const imgWidth = img.width;
|
5854
5900
|
const imgheight = img.height;
|
5855
5901
|
if (customValidation && customValidation(file, img) !== null) {
|
5856
5902
|
return handleRejection(customValidation(file, img), file, img);
|
5857
5903
|
}
|
5858
|
-
if (!acceptFormat.validate.includes(fileFormat)) {
|
5859
|
-
return handleRejection((_a2 = acceptFormat.message) != null ? _a2 : formatValidationMessage(acceptFormat.validate), file, img);
|
5860
|
-
}
|
5861
5904
|
if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {
|
5862
5905
|
return handleRejection(dimension.message, file, img);
|
5863
5906
|
}
|
5864
|
-
if (maxFileSize && file.size > maxFileSize.validate) {
|
5865
|
-
return handleRejection(maxFileSize.message, file, null);
|
5866
|
-
}
|
5867
5907
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, img);
|
5868
5908
|
setFilePreview(URL.createObjectURL(file));
|
5869
5909
|
return null;
|
@@ -5872,36 +5912,60 @@ var Uploader = ({
|
|
5872
5912
|
},
|
5873
5913
|
[acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
|
5874
5914
|
);
|
5875
|
-
const
|
5876
|
-
|
5915
|
+
const onDropRejected = (0, import_react90.useCallback)((fileRejections) => {
|
5916
|
+
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|
5917
|
+
}, []);
|
5918
|
+
const validator = (0, import_react90.useCallback)(
|
5919
|
+
(file) => {
|
5920
|
+
if (validatorExt) {
|
5921
|
+
const result = [];
|
5922
|
+
validatorExt.forEach((validatorFn) => {
|
5923
|
+
const error = validatorFn(file);
|
5924
|
+
if (Array.isArray(error)) {
|
5925
|
+
result.push(...error);
|
5926
|
+
} else if (error) result.push(error);
|
5927
|
+
});
|
5928
|
+
return result;
|
5929
|
+
}
|
5930
|
+
return null;
|
5931
|
+
},
|
5932
|
+
[validatorExt]
|
5933
|
+
);
|
5934
|
+
const { getRootProps, getInputProps, isDragActive, acceptedFiles, open } = (0, import_react_dropzone.useDropzone)({
|
5935
|
+
onDropAccepted,
|
5936
|
+
onDropRejected,
|
5937
|
+
accept: {
|
5938
|
+
"image/*": [...acceptFormat.validate]
|
5939
|
+
},
|
5877
5940
|
maxFiles: 1,
|
5941
|
+
maxSize: maxFileSize == null ? void 0 : maxFileSize.validate,
|
5878
5942
|
noClick: isDisabled,
|
5879
|
-
|
5880
|
-
|
5943
|
+
noDrag: isDisabled,
|
5944
|
+
validator
|
5881
5945
|
});
|
5882
5946
|
const renderHelperText = () => {
|
5883
5947
|
if (Array.isArray(helperText)) {
|
5884
5948
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5885
|
-
|
5949
|
+
import_react89.UnorderedList,
|
5886
5950
|
{
|
5887
5951
|
pl: 2,
|
5888
5952
|
fontSize: 12,
|
5889
5953
|
color: "black.medium",
|
5890
5954
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
5891
|
-
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5955
|
+
children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.ListItem, { children: text2 }, text2))
|
5892
5956
|
}
|
5893
5957
|
);
|
5894
5958
|
}
|
5895
5959
|
return helperText;
|
5896
5960
|
};
|
5897
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5961
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
5898
5962
|
const handleRemove = (e) => {
|
5899
5963
|
e.stopPropagation();
|
5900
5964
|
setFilePreview(void 0);
|
5901
5965
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
5902
5966
|
acceptedFiles.pop();
|
5903
5967
|
};
|
5904
|
-
(0,
|
5968
|
+
(0, import_react90.useEffect)(() => {
|
5905
5969
|
if (value) {
|
5906
5970
|
if (typeof value === "string") {
|
5907
5971
|
setFilePreview(value);
|
@@ -5917,16 +5981,16 @@ var Uploader = ({
|
|
5917
5981
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
5918
5982
|
const containerHeight = !isSmall ? "160px" : "120px";
|
5919
5983
|
const cursorType = filePreview ? "initial" : "pointer";
|
5920
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
5984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react89.FormControl, { isRequired, children: [
|
5921
5985
|
label && typeof label === "string" ? (
|
5922
5986
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
5923
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
5924
|
-
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5987
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react89.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, {}), fontSize: "text.sm", children: [
|
5988
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.RequiredIndicator, { mr: 1, ml: 0 }),
|
5925
5989
|
label
|
5926
5990
|
] })
|
5927
5991
|
) : label,
|
5928
5992
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
5929
|
-
|
5993
|
+
import_react89.Flex,
|
5930
5994
|
{
|
5931
5995
|
minH: containerHeight,
|
5932
5996
|
maxW: !isSmall ? "full" : "120px",
|
@@ -5943,8 +6007,8 @@ var Uploader = ({
|
|
5943
6007
|
...props,
|
5944
6008
|
...getRootProps(),
|
5945
6009
|
children: [
|
5946
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5947
|
-
|
6010
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6011
|
+
import_react89.Button,
|
5948
6012
|
{
|
5949
6013
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
5950
6014
|
"aria-label": "remove-image",
|
@@ -5961,15 +6025,15 @@ var Uploader = ({
|
|
5961
6025
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon11.Close, { size: 3, color: "white" })
|
5962
6026
|
}
|
5963
6027
|
) }),
|
5964
|
-
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5965
|
-
|
6028
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6029
|
+
import_react89.Flex,
|
5966
6030
|
{
|
5967
6031
|
position: "relative",
|
5968
6032
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
5969
6033
|
justify: "center",
|
5970
6034
|
align: "center",
|
5971
6035
|
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5972
|
-
|
6036
|
+
import_react89.Image,
|
5973
6037
|
{
|
5974
6038
|
h: size2 === "lg" ? "120" : "100",
|
5975
6039
|
src: filePreview,
|
@@ -5979,66 +6043,79 @@ var Uploader = ({
|
|
5979
6043
|
)
|
5980
6044
|
}
|
5981
6045
|
) }),
|
5982
|
-
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.
|
5983
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5984
|
-
|
5985
|
-
|
5986
|
-
|
5987
|
-
|
5988
|
-
|
5989
|
-
|
5990
|
-
|
5991
|
-
|
5992
|
-
|
5993
|
-
|
5994
|
-
|
5995
|
-
|
5996
|
-
fontWeight: "400",
|
5997
|
-
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
5998
|
-
mb: size2 === "sm" ? "0" : "2",
|
5999
|
-
textAlign: "center",
|
6000
|
-
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6001
|
-
}
|
6002
|
-
),
|
6003
|
-
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6004
|
-
] })
|
6046
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react89.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6047
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon11.Plus, { size: 6, color }),
|
6048
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react89.Box, { children: [
|
6049
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6050
|
+
import_react89.Heading,
|
6051
|
+
{
|
6052
|
+
fontWeight: "400",
|
6053
|
+
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
6054
|
+
mb: size2 === "sm" ? "0" : "2",
|
6055
|
+
textAlign: "center",
|
6056
|
+
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6057
|
+
}
|
6058
|
+
),
|
6059
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6005
6060
|
] })
|
6006
|
-
] })
|
6061
|
+
] }) })
|
6007
6062
|
]
|
6008
6063
|
}
|
6009
6064
|
),
|
6010
|
-
|
6011
|
-
|
6012
|
-
|
6013
|
-
|
6014
|
-
|
6015
|
-
|
6016
|
-
|
6017
|
-
|
6018
|
-
|
6019
|
-
|
6020
|
-
|
6021
|
-
|
6022
|
-
|
6023
|
-
|
6024
|
-
|
6025
|
-
|
6026
|
-
|
6027
|
-
|
6028
|
-
onClick: () => {
|
6029
|
-
var _a;
|
6030
|
-
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.click();
|
6031
|
-
},
|
6032
|
-
children: "Ubah Foto"
|
6033
|
-
}
|
6034
|
-
)
|
6035
|
-
] }),
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6066
|
+
"input",
|
6067
|
+
{
|
6068
|
+
...getInputProps(),
|
6069
|
+
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6070
|
+
}
|
6071
|
+
),
|
6072
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6073
|
+
import_react89.Button,
|
6074
|
+
{
|
6075
|
+
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6076
|
+
type: "button",
|
6077
|
+
size: "sm",
|
6078
|
+
variant: "outline",
|
6079
|
+
onClick: open,
|
6080
|
+
children: "Ubah Foto"
|
6081
|
+
}
|
6082
|
+
) }),
|
6036
6083
|
renderErrorText(errorText),
|
6037
6084
|
renderHelperText()
|
6038
6085
|
] });
|
6039
6086
|
};
|
6040
6087
|
var uploader_default = Uploader;
|
6041
6088
|
|
6089
|
+
// src/components/uploader/utils/is-ratio-equal.ts
|
6090
|
+
var isRatioEqual = (base, img) => {
|
6091
|
+
const baseRatio = (base.width / base.height).toFixed(2);
|
6092
|
+
const imgRatio = (img.width / img.height).toFixed(2);
|
6093
|
+
return baseRatio === imgRatio;
|
6094
|
+
};
|
6095
|
+
|
6096
|
+
// src/components/uploader/components/validator.ts
|
6097
|
+
var dimensionValidator = (dimension, message) => {
|
6098
|
+
return (file) => {
|
6099
|
+
const imageUrl = URL.createObjectURL(file);
|
6100
|
+
const img = new Image();
|
6101
|
+
img.src = imageUrl;
|
6102
|
+
img.onload = () => {
|
6103
|
+
};
|
6104
|
+
const isRatioValid = isRatioEqual(
|
6105
|
+
{ width: dimension[0], height: dimension[1] },
|
6106
|
+
{ width: img.width, height: img.height }
|
6107
|
+
);
|
6108
|
+
console.log("log", isRatioValid);
|
6109
|
+
if (isRatioValid) {
|
6110
|
+
return null;
|
6111
|
+
}
|
6112
|
+
return {
|
6113
|
+
code: error_code_default.FileInvalidDimension,
|
6114
|
+
message: message != null ? message : "File has invalid dimension"
|
6115
|
+
};
|
6116
|
+
};
|
6117
|
+
};
|
6118
|
+
|
6042
6119
|
// src/components/index.ts
|
6043
6120
|
var import_react91 = require("@chakra-ui/react");
|
6044
6121
|
|
@@ -7828,6 +7905,7 @@ var import_react104 = require("@chakra-ui/react");
|
|
7828
7905
|
DrawerProps,
|
7829
7906
|
DropdownIndicator,
|
7830
7907
|
EmptyState,
|
7908
|
+
ErrorCode,
|
7831
7909
|
Fade,
|
7832
7910
|
FadeProps,
|
7833
7911
|
Field,
|
@@ -8051,12 +8129,15 @@ var import_react104 = require("@chakra-ui/react");
|
|
8051
8129
|
WrapProps,
|
8052
8130
|
XMSLogo,
|
8053
8131
|
createExtendTheme,
|
8132
|
+
defaultOnHandleRejections,
|
8133
|
+
dimensionValidator,
|
8054
8134
|
extendTheme,
|
8055
8135
|
forwardRef,
|
8056
8136
|
getSelectAllCheckboxState,
|
8057
8137
|
getTheme,
|
8058
8138
|
id,
|
8059
8139
|
isCellDisabled,
|
8140
|
+
isRatioEqual,
|
8060
8141
|
selectStyles,
|
8061
8142
|
theme,
|
8062
8143
|
themeSelect,
|