@ctlyst.id/internal-ui 3.2.2 → 3.3.1
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 +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +379 -257
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -152
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -4
- package/dist/index.css +0 -50
- package/dist/index.css.map +0 -1
- package/dist/poppins-latin-400-normal-SFWTNBQB.woff2 +0 -0
- package/dist/poppins-latin-400-normal-ZPTYLX7I.woff +0 -0
- package/dist/poppins-latin-ext-400-normal-7PFKV6Y5.woff +0 -0
- package/dist/poppins-latin-ext-400-normal-K3FV5HAI.woff2 +0 -0
package/dist/index.js
CHANGED
@@ -6,6 +6,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
9
10
|
var __export = (target, all) => {
|
10
11
|
for (var name in all)
|
11
12
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -27,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
27
28
|
mod
|
28
29
|
));
|
29
30
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
31
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
30
32
|
|
31
33
|
// src/index.ts
|
32
34
|
var src_exports = {};
|
@@ -59,12 +61,12 @@ __export(src_exports, {
|
|
59
61
|
AlertIcon: () => AlertIcon,
|
60
62
|
AlertTitle: () => AlertTitle,
|
61
63
|
Anchor: () => Anchor,
|
62
|
-
Avatar: () =>
|
63
|
-
AvatarBadge: () =>
|
64
|
-
AvatarBadgeProps: () =>
|
65
|
-
AvatarGroup: () =>
|
66
|
-
AvatarGroupProps: () =>
|
67
|
-
AvatarProps: () =>
|
64
|
+
Avatar: () => import_react91.Avatar,
|
65
|
+
AvatarBadge: () => import_react91.AvatarBadge,
|
66
|
+
AvatarBadgeProps: () => import_react91.AvatarBadgeProps,
|
67
|
+
AvatarGroup: () => import_react91.AvatarGroup,
|
68
|
+
AvatarGroupProps: () => import_react91.AvatarGroupProps,
|
69
|
+
AvatarProps: () => import_react91.AvatarProps,
|
68
70
|
Badge: () => badge_default,
|
69
71
|
Box: () => import_react50.Box,
|
70
72
|
BoxProps: () => import_react50.BoxProps,
|
@@ -75,8 +77,8 @@ __export(src_exports, {
|
|
75
77
|
CHECKBOX_STATE: () => CHECKBOX_STATE,
|
76
78
|
Card: () => card_default,
|
77
79
|
Center: () => import_react50.Center,
|
78
|
-
ChakraProvider: () =>
|
79
|
-
ChakraProviderProps: () =>
|
80
|
+
ChakraProvider: () => import_react101.ChakraProvider,
|
81
|
+
ChakraProviderProps: () => import_react101.ChakraProviderProps,
|
80
82
|
ChakraTable: () => import_react79.Table,
|
81
83
|
Checkbox: () => checkbox_default,
|
82
84
|
CheckboxGroup: () => checkbox_group_default,
|
@@ -91,11 +93,11 @@ __export(src_exports, {
|
|
91
93
|
CloseButtonProps: () => import_react10.CloseButtonProps,
|
92
94
|
Code: () => import_react82.Code,
|
93
95
|
CodeProps: () => import_react82.CodeProps,
|
94
|
-
Collapse: () =>
|
95
|
-
CollapseProps: () =>
|
96
|
-
ColorMode: () =>
|
97
|
-
ColorModeScript: () =>
|
98
|
-
ColorModeScriptProps: () =>
|
96
|
+
Collapse: () => import_react91.Collapse,
|
97
|
+
CollapseProps: () => import_react91.CollapseProps,
|
98
|
+
ColorMode: () => import_react101.ColorMode,
|
99
|
+
ColorModeScript: () => import_react101.ColorModeScript,
|
100
|
+
ColorModeScriptProps: () => import_react101.ColorModeScriptProps,
|
99
101
|
Container: () => import_react50.Container,
|
100
102
|
ContainerProps: () => import_react50.ContainerProps,
|
101
103
|
Counter: () => counter_default,
|
@@ -116,8 +118,8 @@ __export(src_exports, {
|
|
116
118
|
DrawerProps: () => import_react53.DrawerProps,
|
117
119
|
DropdownIndicator: () => DropdownIndicator,
|
118
120
|
EmptyState: () => empty_state_default,
|
119
|
-
Fade: () =>
|
120
|
-
FadeProps: () =>
|
121
|
+
Fade: () => import_react91.Fade,
|
122
|
+
FadeProps: () => import_react91.FadeProps,
|
121
123
|
Field: () => field_default,
|
122
124
|
Flex: () => import_react50.Flex,
|
123
125
|
FlexProps: () => import_react50.FlexProps,
|
@@ -135,16 +137,16 @@ __export(src_exports, {
|
|
135
137
|
Header: () => Header,
|
136
138
|
Heading: () => import_react82.Heading,
|
137
139
|
HeadingProps: () => import_react82.HeadingProps,
|
138
|
-
Hide: () =>
|
139
|
-
HideProps: () =>
|
140
|
+
Hide: () => import_react91.Hide,
|
141
|
+
HideProps: () => import_react91.HideProps,
|
140
142
|
Icon: () => import_react49.Icon,
|
141
143
|
IconButton: () => import_react10.IconButton,
|
142
144
|
IconButtonProps: () => import_react10.IconButtonProps,
|
143
145
|
IconProps: () => import_react49.IconProps,
|
144
146
|
Image: () => import_react49.Image,
|
145
147
|
ImageProps: () => import_react49.ImageProps,
|
146
|
-
Img: () =>
|
147
|
-
ImgProps: () =>
|
148
|
+
Img: () => import_react91.Img,
|
149
|
+
ImgProps: () => import_react91.ImgProps,
|
148
150
|
InputAddonLeft: () => InputAddonLeft,
|
149
151
|
InputAddonRight: () => InputAddonRight,
|
150
152
|
InputElementLeft: () => import_react19.InputLeftElement,
|
@@ -237,36 +239,36 @@ __export(src_exports, {
|
|
237
239
|
Rating: () => rating_default,
|
238
240
|
RequiredIndicator: () => import_react25.RequiredIndicator,
|
239
241
|
RequiredIndicatorProps: () => import_react25.RequiredIndicatorProps,
|
240
|
-
ScaleFade: () =>
|
241
|
-
ScaleFadeProps: () =>
|
242
|
+
ScaleFade: () => import_react91.ScaleFade,
|
243
|
+
ScaleFadeProps: () => import_react91.ScaleFadeProps,
|
242
244
|
Select: () => select_default,
|
243
245
|
SelectAsync: () => select_async_default,
|
244
246
|
SelectAsyncCreatable: () => SelectAsyncCreatable,
|
245
247
|
SelectCheckBox: () => select_with_checkbox_default,
|
246
248
|
SelectCreatable: () => SelectCreatable,
|
247
|
-
Show: () =>
|
248
|
-
ShowProps: () =>
|
249
|
+
Show: () => import_react91.Show,
|
250
|
+
ShowProps: () => import_react91.ShowProps,
|
249
251
|
Sidebar: () => Sidebar,
|
250
252
|
SidebarHeader: () => SidebarHeader,
|
251
253
|
SidebarMenu: () => SidebarMenu,
|
252
254
|
SimpleGrid: () => import_react50.SimpleGrid,
|
253
255
|
Skeleton: () => import_react5.Skeleton,
|
254
|
-
Slide: () =>
|
255
|
-
SlideFade: () =>
|
256
|
-
SlideFadeProps: () =>
|
257
|
-
SlideProps: () =>
|
256
|
+
Slide: () => import_react91.Slide,
|
257
|
+
SlideFade: () => import_react91.SlideFade,
|
258
|
+
SlideFadeProps: () => import_react91.SlideFadeProps,
|
259
|
+
SlideProps: () => import_react91.SlideProps,
|
258
260
|
Spacer: () => import_react50.Spacer,
|
259
261
|
Stack: () => import_react50.Stack,
|
260
262
|
StackProps: () => import_react50.StackProps,
|
261
|
-
Step: () =>
|
262
|
-
StepDescription: () =>
|
263
|
-
StepIcon: () =>
|
264
|
-
StepIndicator: () =>
|
265
|
-
StepNumber: () =>
|
266
|
-
StepSeparator: () =>
|
267
|
-
StepStatus: () =>
|
268
|
-
StepTitle: () =>
|
269
|
-
Stepper: () =>
|
263
|
+
Step: () => import_react91.Step,
|
264
|
+
StepDescription: () => import_react91.StepDescription,
|
265
|
+
StepIcon: () => import_react91.StepIcon,
|
266
|
+
StepIndicator: () => import_react91.StepIndicator,
|
267
|
+
StepNumber: () => import_react91.StepNumber,
|
268
|
+
StepSeparator: () => import_react91.StepSeparator,
|
269
|
+
StepStatus: () => import_react91.StepStatus,
|
270
|
+
StepTitle: () => import_react91.StepTitle,
|
271
|
+
Stepper: () => import_react91.Stepper,
|
270
272
|
Switch: () => switch_default,
|
271
273
|
Tab: () => tab_default,
|
272
274
|
TabIndicator: () => import_react81.TabIndicator,
|
@@ -296,6 +298,8 @@ __export(src_exports, {
|
|
296
298
|
Th: () => import_react79.Th,
|
297
299
|
Thead: () => import_react79.Thead,
|
298
300
|
ThemeTypings: () => import_styled_system12.ThemeTypings,
|
301
|
+
Time: () => Time,
|
302
|
+
TimeInput: () => TimeInput2,
|
299
303
|
ToastContainer: () => import_react_toastify2.ToastContainer,
|
300
304
|
Tooltip: () => Tooltip,
|
301
305
|
Tr: () => import_react79.Tr,
|
@@ -305,21 +309,21 @@ __export(src_exports, {
|
|
305
309
|
UseAccordionItemReturn: () => import_react3.UseAccordionItemReturn,
|
306
310
|
UseAccordionProps: () => import_react3.UseAccordionProps,
|
307
311
|
UseAccordionReturn: () => import_react3.UseAccordionReturn,
|
308
|
-
UseBreakpointOptions: () =>
|
312
|
+
UseBreakpointOptions: () => import_react91.UseBreakpointOptions,
|
309
313
|
UseCheckboxGroupProps: () => import_react16.UseCheckboxGroupProps,
|
310
314
|
UseCheckboxGroupReturn: () => import_react16.UseCheckboxGroupReturn,
|
311
315
|
UseCheckboxProps: () => import_react16.UseCheckboxProps,
|
312
316
|
UseCheckboxReturn: () => import_react16.UseCheckboxReturn,
|
313
|
-
UseDisclosureProps: () =>
|
314
|
-
UseImageProps: () =>
|
315
|
-
UseImageReturn: () =>
|
316
|
-
UseMediaQueryOptions: () =>
|
317
|
+
UseDisclosureProps: () => import_react103.UseDisclosureProps,
|
318
|
+
UseImageProps: () => import_react91.UseImageProps,
|
319
|
+
UseImageReturn: () => import_react91.UseImageReturn,
|
320
|
+
UseMediaQueryOptions: () => import_react91.UseMediaQueryOptions,
|
317
321
|
UseModalProps: () => import_react53.UseModalProps,
|
318
322
|
UseModalReturn: () => import_react53.UseModalReturn,
|
319
323
|
UsePinInputFieldProps: () => import_react62.UsePinInputFieldProps,
|
320
324
|
UsePinInputProps: () => import_react62.UsePinInputProps,
|
321
325
|
UsePinInputReturn: () => import_react62.UsePinInputReturn,
|
322
|
-
UseQueryProps: () =>
|
326
|
+
UseQueryProps: () => import_react91.UseQueryProps,
|
323
327
|
UseRadioGroupReturn: () => import_react67.UseRadioGroupReturn,
|
324
328
|
UseRadioProps: () => import_react67.UseRadioProps,
|
325
329
|
UseRadioReturn: () => import_react67.UseRadioReturn,
|
@@ -332,8 +336,8 @@ __export(src_exports, {
|
|
332
336
|
UseTabsReturn: () => import_react81.UseTabsReturn,
|
333
337
|
VStack: () => import_react50.VStack,
|
334
338
|
Version: () => Version,
|
335
|
-
VisuallyHidden: () =>
|
336
|
-
VisuallyHiddenInput: () =>
|
339
|
+
VisuallyHidden: () => import_react91.VisuallyHidden,
|
340
|
+
VisuallyHiddenInput: () => import_react91.VisuallyHiddenInput,
|
337
341
|
VoilaLogo: () => VoilaLogo,
|
338
342
|
Wrap: () => import_react50.Wrap,
|
339
343
|
WrapItem: () => import_react50.WrapItem,
|
@@ -341,8 +345,8 @@ __export(src_exports, {
|
|
341
345
|
WrapProps: () => import_react50.WrapProps,
|
342
346
|
XMSLogo: () => XMSLogo,
|
343
347
|
createExtendTheme: () => createExtendTheme,
|
344
|
-
extendTheme: () =>
|
345
|
-
forwardRef: () =>
|
348
|
+
extendTheme: () => import_react104.extendTheme,
|
349
|
+
forwardRef: () => import_react104.forwardRef,
|
346
350
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
347
351
|
getTheme: () => getTheme,
|
348
352
|
isCellDisabled: () => isCellDisabled,
|
@@ -355,38 +359,38 @@ __export(src_exports, {
|
|
355
359
|
useAccordionItemState: () => import_react3.useAccordionItemState,
|
356
360
|
useAccordionStyles: () => import_react3.useAccordionStyles,
|
357
361
|
useAlertStyles: () => useAlertStyles,
|
358
|
-
useBoolean: () =>
|
359
|
-
useBreakpoint: () =>
|
362
|
+
useBoolean: () => import_react103.useBoolean,
|
363
|
+
useBreakpoint: () => import_react91.useBreakpoint,
|
360
364
|
useCheckbox: () => import_react16.useCheckbox,
|
361
365
|
useCheckboxGroup: () => import_react16.useCheckboxGroup,
|
362
|
-
useClipboard: () =>
|
363
|
-
useColorMode: () =>
|
364
|
-
useColorModePreference: () =>
|
365
|
-
useColorModeValue: () =>
|
366
|
-
useConst: () =>
|
367
|
-
useControllableProp: () =>
|
368
|
-
useControllableState: () =>
|
366
|
+
useClipboard: () => import_react103.useClipboard,
|
367
|
+
useColorMode: () => import_react103.useColorMode,
|
368
|
+
useColorModePreference: () => import_react91.useColorModePreference,
|
369
|
+
useColorModeValue: () => import_react103.useColorModeValue,
|
370
|
+
useConst: () => import_react103.useConst,
|
371
|
+
useControllableProp: () => import_react103.useControllableProp,
|
372
|
+
useControllableState: () => import_react103.useControllableState,
|
369
373
|
useDataTable: () => useDataTable,
|
370
|
-
useDimensions: () =>
|
371
|
-
useDisclosure: () =>
|
374
|
+
useDimensions: () => import_react103.useDimensions,
|
375
|
+
useDisclosure: () => import_react103.useDisclosure,
|
372
376
|
useDrawerContext: () => import_react53.useDrawerContext,
|
373
377
|
useFetcher: () => useFetcher,
|
374
|
-
useImage: () =>
|
378
|
+
useImage: () => import_react91.useImage,
|
375
379
|
useInternalUI: () => useInternalUI,
|
376
|
-
useMergeRefs: () =>
|
380
|
+
useMergeRefs: () => import_react103.useMergeRefs,
|
377
381
|
useModal: () => import_react53.useModal,
|
378
382
|
useModalContext: () => import_react53.useModalContext,
|
379
383
|
useModalStyles: () => import_react53.useModalStyles,
|
380
|
-
useOutsideClick: () =>
|
384
|
+
useOutsideClick: () => import_react103.useOutsideClick,
|
381
385
|
usePinInput: () => import_react62.usePinInput,
|
382
386
|
usePinInputContext: () => import_react62.usePinInputContext,
|
383
387
|
usePinInputField: () => import_react62.usePinInputField,
|
384
388
|
useProgressStyles: () => import_react64.useProgressStyles,
|
385
|
-
useQuery: () =>
|
389
|
+
useQuery: () => import_react91.useQuery,
|
386
390
|
useRadio: () => import_react67.useRadio,
|
387
391
|
useRadioGroup: () => import_react67.useRadioGroup,
|
388
392
|
useRadioGroupContext: () => import_react67.useRadioGroupContext,
|
389
|
-
useSteps: () =>
|
393
|
+
useSteps: () => import_react91.useSteps,
|
390
394
|
useTab: () => import_react81.useTab,
|
391
395
|
useTabIndicator: () => import_react81.useTabIndicator,
|
392
396
|
useTabList: () => import_react81.useTabList,
|
@@ -398,9 +402,9 @@ __export(src_exports, {
|
|
398
402
|
useTabsDescendants: () => import_react81.useTabsDescendants,
|
399
403
|
useTabsDescendantsContext: () => import_react81.useTabsDescendantsContext,
|
400
404
|
useTabsStyles: () => import_react81.useTabsStyles,
|
401
|
-
useTheme: () =>
|
405
|
+
useTheme: () => import_react103.useTheme,
|
402
406
|
useToast: () => useToast,
|
403
|
-
useToken: () =>
|
407
|
+
useToken: () => import_react103.useToken
|
404
408
|
});
|
405
409
|
module.exports = __toCommonJS(src_exports);
|
406
410
|
|
@@ -884,6 +888,7 @@ var Field = (props) => {
|
|
884
888
|
isRequired,
|
885
889
|
children,
|
886
890
|
isSuccess,
|
891
|
+
isDisabled,
|
887
892
|
boxProps = {}
|
888
893
|
} = props;
|
889
894
|
const getHelperColor = () => {
|
@@ -897,12 +902,39 @@ var Field = (props) => {
|
|
897
902
|
};
|
898
903
|
const helperColor = getHelperColor();
|
899
904
|
const justifyHelper = getJustifyContentHelper();
|
905
|
+
const getProperties = () => {
|
906
|
+
let outlineColor2 = "neutral.400";
|
907
|
+
let focusColor2 = "primary.500";
|
908
|
+
if (isError || isDisabled || isSuccess) {
|
909
|
+
if (isError) outlineColor2 = "danger.500";
|
910
|
+
else if (isSuccess) outlineColor2 = "success.500";
|
911
|
+
focusColor2 = outlineColor2;
|
912
|
+
}
|
913
|
+
return {
|
914
|
+
outlineColor: outlineColor2,
|
915
|
+
focusColor: focusColor2
|
916
|
+
};
|
917
|
+
};
|
918
|
+
const { outlineColor, focusColor } = getProperties();
|
900
919
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react14.FormControl, { isInvalid: isError, ...boxProps, children: [
|
901
920
|
label && (typeof label === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react14.FormLabel, { mb: 1, fontSize: "text.sm", requiredIndicator: void 0, children: [
|
902
921
|
isRequired && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react14.Box, { as: "span", color: "danger.500", ml: 0, mr: 1, children: "*" }),
|
903
922
|
label
|
904
923
|
] }) : label),
|
905
|
-
|
924
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
925
|
+
import_react14.Box,
|
926
|
+
{
|
927
|
+
transition: "all 0.15s",
|
928
|
+
boxShadow: "none",
|
929
|
+
borderRadius: "sm",
|
930
|
+
border: "1px solid",
|
931
|
+
borderColor: outlineColor,
|
932
|
+
_focusWithin: {
|
933
|
+
borderColor: focusColor
|
934
|
+
},
|
935
|
+
children
|
936
|
+
}
|
937
|
+
),
|
906
938
|
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react14.Box, { display: "flex", width: "full", justifyContent: justifyHelper, children: [
|
907
939
|
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react14.FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: leftHelperText }) : leftHelperText) : typeof errorMessage === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react14.FormErrorMessage, { fontSize: "text.xs", color: "danger.500", mt: 1, children: errorMessage }) : errorMessage,
|
908
940
|
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react14.FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: rightHelperText }) : rightHelperText)
|
@@ -1028,19 +1060,6 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1028
1060
|
isLoading,
|
1029
1061
|
...inputProps
|
1030
1062
|
} = props;
|
1031
|
-
const getProperties = () => {
|
1032
|
-
let outlineColor2 = "neutral.400";
|
1033
|
-
let focusColor2 = "primary.500";
|
1034
|
-
if (isError || isDisabled || isSuccess) {
|
1035
|
-
if (isError) outlineColor2 = "danger.500";
|
1036
|
-
else if (isSuccess) outlineColor2 = "success.500";
|
1037
|
-
focusColor2 = outlineColor2;
|
1038
|
-
}
|
1039
|
-
return {
|
1040
|
-
outlineColor: outlineColor2,
|
1041
|
-
focusColor: focusColor2
|
1042
|
-
};
|
1043
|
-
};
|
1044
1063
|
const [isShowPassword, setIsShowPassword] = (0, import_react22.useState)(false);
|
1045
1064
|
const inputType = (0, import_react22.useMemo)(() => {
|
1046
1065
|
return type === "password" && isShowPassword ? "text" : type;
|
@@ -1054,7 +1073,6 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1054
1073
|
const iconColor = (0, import_react22.useMemo)(() => {
|
1055
1074
|
return isDisabled ? "black.low" : "black.medium";
|
1056
1075
|
}, [isDisabled]);
|
1057
|
-
const { outlineColor, focusColor } = getProperties();
|
1058
1076
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1059
1077
|
field_default,
|
1060
1078
|
{
|
@@ -1065,92 +1083,80 @@ var InputField = import_react22.default.forwardRef((props, ref) => {
|
|
1065
1083
|
leftHelperText,
|
1066
1084
|
rightHelperText,
|
1067
1085
|
isRequired,
|
1068
|
-
|
1069
|
-
|
1086
|
+
isDisabled,
|
1087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
1088
|
+
import_react21.InputGroup,
|
1070
1089
|
{
|
1071
|
-
|
1072
|
-
boxShadow: "none",
|
1090
|
+
size: size2,
|
1073
1091
|
borderRadius: "sm",
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
justifyContent: "center",
|
1143
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_internal_icon5.Eye, { size: 4, color: iconColor })
|
1144
|
-
}
|
1145
|
-
),
|
1146
|
-
isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(loader_default, { size: "sm" })
|
1147
|
-
]
|
1148
|
-
}
|
1149
|
-
),
|
1150
|
-
addOnRight
|
1151
|
-
]
|
1152
|
-
}
|
1153
|
-
)
|
1092
|
+
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
1093
|
+
cursor: isDisabled ? "not-allowed" : "default",
|
1094
|
+
children: [
|
1095
|
+
addOnLeft,
|
1096
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1097
|
+
import_react21.Input,
|
1098
|
+
{
|
1099
|
+
ref,
|
1100
|
+
type: inputType,
|
1101
|
+
value,
|
1102
|
+
isDisabled,
|
1103
|
+
isSuccess,
|
1104
|
+
...inputProps,
|
1105
|
+
fontSize
|
1106
|
+
}
|
1107
|
+
),
|
1108
|
+
(withClear || isLoading || type === "password") && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
1109
|
+
import_react21.Box,
|
1110
|
+
{
|
1111
|
+
"data-test-id": "CT_Component_ClearInput",
|
1112
|
+
display: "flex",
|
1113
|
+
alignItems: "center",
|
1114
|
+
justifyContent: "center",
|
1115
|
+
width: "16px",
|
1116
|
+
mr: "10px",
|
1117
|
+
children: [
|
1118
|
+
withClear && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1119
|
+
import_react21.Box,
|
1120
|
+
{
|
1121
|
+
display: "flex",
|
1122
|
+
justifyContent: "center",
|
1123
|
+
onClick: !isDisabled ? onClear : void 0,
|
1124
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
1125
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_internal_icon5.Close, { size: 4, color: iconColor })
|
1126
|
+
}
|
1127
|
+
),
|
1128
|
+
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1129
|
+
import_react21.Box,
|
1130
|
+
{
|
1131
|
+
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
1132
|
+
onClick: () => {
|
1133
|
+
if (!isDisabled) setIsShowPassword(true);
|
1134
|
+
},
|
1135
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
1136
|
+
display: "flex",
|
1137
|
+
justifyContent: "center",
|
1138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_internal_icon5.EyeOff, { size: 4, color: iconColor })
|
1139
|
+
}
|
1140
|
+
),
|
1141
|
+
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1142
|
+
import_react21.Box,
|
1143
|
+
{
|
1144
|
+
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
1145
|
+
onClick: () => {
|
1146
|
+
if (!isDisabled) setIsShowPassword(false);
|
1147
|
+
},
|
1148
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
1149
|
+
display: "flex",
|
1150
|
+
justifyContent: "center",
|
1151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_internal_icon5.Eye, { size: 4, color: iconColor })
|
1152
|
+
}
|
1153
|
+
),
|
1154
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(loader_default, { size: "sm" })
|
1155
|
+
]
|
1156
|
+
}
|
1157
|
+
),
|
1158
|
+
addOnRight
|
1159
|
+
]
|
1154
1160
|
}
|
1155
1161
|
)
|
1156
1162
|
}
|
@@ -2500,7 +2506,7 @@ var Datepicker = ({
|
|
2500
2506
|
id,
|
2501
2507
|
name,
|
2502
2508
|
selected,
|
2503
|
-
customInput: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(input_field_default, { autoComplete: "off" }),
|
2509
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(input_field_default, { label, isRequired, autoComplete: "off", isError }),
|
2504
2510
|
showPopperArrow: false,
|
2505
2511
|
calendarClassName: (0, import_shared_utils8.cx)({ inline: props.inline }),
|
2506
2512
|
dropdownMode: "select",
|
@@ -2517,8 +2523,7 @@ var Datepicker = ({
|
|
2517
2523
|
if (props.inline) {
|
2518
2524
|
return component;
|
2519
2525
|
}
|
2520
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react33.FormControl, {
|
2521
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react33.FormLabel, { fontSize: "text.sm", children: label }),
|
2526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react33.FormControl, { "data-test-id": "CT_Component_datepicker_wrapper", isInvalid: isError, children: [
|
2522
2527
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react33.InputGroup, { children: [
|
2523
2528
|
component,
|
2524
2529
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react33.InputRightElement, { alignSelf: "center", bottom: 0, flexDir: "row-reverse", width: "auto", mr: 2, gap: 2, children: [
|
@@ -4779,16 +4784,131 @@ var import_react81 = require("@chakra-ui/react");
|
|
4779
4784
|
// src/components/text/index.ts
|
4780
4785
|
var import_react82 = require("@chakra-ui/react");
|
4781
4786
|
|
4787
|
+
// src/components/time-input/components/index.tsx
|
4788
|
+
var import_react83 = require("@chakra-ui/react");
|
4789
|
+
var import_internal_icon10 = require("@ctlyst.id/internal-icon");
|
4790
|
+
var import_react84 = require("react");
|
4791
|
+
var import_react85 = require("timescape/react");
|
4792
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
4793
|
+
var Time = class {
|
4794
|
+
constructor(hours, minutes, seconds) {
|
4795
|
+
__publicField(this, "hours");
|
4796
|
+
__publicField(this, "minutes");
|
4797
|
+
__publicField(this, "seconds");
|
4798
|
+
this.hours = hours != null ? hours : 0;
|
4799
|
+
this.minutes = minutes != null ? minutes : 0;
|
4800
|
+
this.seconds = seconds != null ? seconds : 0;
|
4801
|
+
}
|
4802
|
+
toString() {
|
4803
|
+
return `${this.hours}:${this.minutes}:${this.seconds}`;
|
4804
|
+
}
|
4805
|
+
};
|
4806
|
+
var InputTimeArea = (0, import_react83.forwardRef)((props, ref) => {
|
4807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
4808
|
+
import_react83.Input,
|
4809
|
+
{
|
4810
|
+
_focusWithin: {
|
4811
|
+
bg: "neutral.300"
|
4812
|
+
},
|
4813
|
+
boxSizing: "content-box",
|
4814
|
+
height: "24px",
|
4815
|
+
ref,
|
4816
|
+
p: "2px",
|
4817
|
+
sx: {
|
4818
|
+
fontVariantNumeric: "tabular-nums"
|
4819
|
+
},
|
4820
|
+
...props
|
4821
|
+
}
|
4822
|
+
);
|
4823
|
+
});
|
4824
|
+
var TimeInput2 = (0, import_react83.forwardRef)(
|
4825
|
+
({
|
4826
|
+
config: config2,
|
4827
|
+
label,
|
4828
|
+
isError,
|
4829
|
+
isRequired,
|
4830
|
+
errorMessage,
|
4831
|
+
value,
|
4832
|
+
seconds,
|
4833
|
+
isDisabled,
|
4834
|
+
boxProps,
|
4835
|
+
addOnRight,
|
4836
|
+
isSuccess,
|
4837
|
+
onChangeTime
|
4838
|
+
}, ref) => {
|
4839
|
+
const dateVal = value != null ? value : config2 == null ? void 0 : config2.date;
|
4840
|
+
const defaultDate = /* @__PURE__ */ new Date();
|
4841
|
+
defaultDate.setHours(0, 0, 0, 0);
|
4842
|
+
const date = dateVal ? new Date(dateVal) : defaultDate;
|
4843
|
+
const timeValue = new Time();
|
4844
|
+
const { getRootProps, getInputProps, options, update, _manager } = (0, import_react85.useTimescape)({
|
4845
|
+
date,
|
4846
|
+
...config2
|
4847
|
+
});
|
4848
|
+
(0, import_react84.useEffect)(() => {
|
4849
|
+
var _a, _b, _c, _d, _e, _f;
|
4850
|
+
timeValue.hours = (_b = (_a = options == null ? void 0 : options.date) == null ? void 0 : _a.getHours()) != null ? _b : 0;
|
4851
|
+
timeValue.minutes = (_d = (_c = options == null ? void 0 : options.date) == null ? void 0 : _c.getMinutes()) != null ? _d : 0;
|
4852
|
+
timeValue.seconds = (_f = (_e = options == null ? void 0 : options.date) == null ? void 0 : _e.getSeconds()) != null ? _f : 0;
|
4853
|
+
if (onChangeTime) {
|
4854
|
+
onChangeTime(timeValue);
|
4855
|
+
}
|
4856
|
+
}, [options.date]);
|
4857
|
+
(0, import_react84.useImperativeHandle)(ref, () => ({
|
4858
|
+
focus() {
|
4859
|
+
_manager.focusField("hours");
|
4860
|
+
}
|
4861
|
+
}));
|
4862
|
+
const rootProps = getRootProps();
|
4863
|
+
const hoursProps = getInputProps("hours");
|
4864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react83.Box, { ...boxProps, ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
4865
|
+
field_default,
|
4866
|
+
{
|
4867
|
+
isError,
|
4868
|
+
label,
|
4869
|
+
isRequired,
|
4870
|
+
errorMessage,
|
4871
|
+
isDisabled,
|
4872
|
+
isSuccess,
|
4873
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
4874
|
+
import_react83.InputGroup,
|
4875
|
+
{
|
4876
|
+
borderRadius: "sm",
|
4877
|
+
backgroundColor: isDisabled ? "neutral.300" : "white.high",
|
4878
|
+
cursor: isDisabled ? "not-allowed" : "default",
|
4879
|
+
alignItems: "center",
|
4880
|
+
gap: 3,
|
4881
|
+
children: [
|
4882
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react83.Flex, { gap: 1, width: "100%", alignItems: "center", pl: 2, children: [
|
4883
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...hoursProps }),
|
4884
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
4885
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("minutes") }),
|
4886
|
+
seconds && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
4887
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: ":" }),
|
4888
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputTimeArea, { ...getInputProps("seconds") })
|
4889
|
+
] }),
|
4890
|
+
options.hour12 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("input", { ...getInputProps("am/pm") })
|
4891
|
+
] }),
|
4892
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_internal_icon10.Clock, { color: "neutral.400" }),
|
4893
|
+
addOnRight
|
4894
|
+
]
|
4895
|
+
}
|
4896
|
+
)
|
4897
|
+
}
|
4898
|
+
) });
|
4899
|
+
}
|
4900
|
+
);
|
4901
|
+
|
4782
4902
|
// src/components/toast/components/toast.tsx
|
4783
|
-
var
|
4903
|
+
var import_react87 = require("@chakra-ui/react");
|
4784
4904
|
var import_react_toastify = require("react-toastify");
|
4785
4905
|
|
4786
4906
|
// src/components/toast/components/styles.tsx
|
4787
|
-
var
|
4788
|
-
var
|
4907
|
+
var import_react86 = require("@emotion/react");
|
4908
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
4789
4909
|
var Styles2 = () => {
|
4790
|
-
return /* @__PURE__ */ (0,
|
4791
|
-
|
4910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
4911
|
+
import_react86.Global,
|
4792
4912
|
{
|
4793
4913
|
styles: `
|
4794
4914
|
.Toastify__toast-container {
|
@@ -4819,7 +4939,7 @@ var Styles2 = () => {
|
|
4819
4939
|
var styles_default2 = Styles2;
|
4820
4940
|
|
4821
4941
|
// src/components/toast/components/toast.tsx
|
4822
|
-
var
|
4942
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
4823
4943
|
var DEFAULT_OPTIONS = {
|
4824
4944
|
position: "top-right",
|
4825
4945
|
autoClose: 5e3,
|
@@ -4841,7 +4961,7 @@ var renderIcon = (icon, type) => {
|
|
4841
4961
|
return icon;
|
4842
4962
|
};
|
4843
4963
|
var useToast = () => {
|
4844
|
-
const [primary500, neutral500, info500, danger500, warning500, success500] = (0,
|
4964
|
+
const [primary500, neutral500, info500, danger500, warning500, success500] = (0, import_react87.useToken)("colors", [
|
4845
4965
|
"primary.500",
|
4846
4966
|
"neutral.500",
|
4847
4967
|
"info.500",
|
@@ -4850,15 +4970,15 @@ var useToast = () => {
|
|
4850
4970
|
"success.500"
|
4851
4971
|
]);
|
4852
4972
|
const content = (icon, message, link) => {
|
4853
|
-
return /* @__PURE__ */ (0,
|
4854
|
-
/* @__PURE__ */ (0,
|
4855
|
-
/* @__PURE__ */ (0,
|
4856
|
-
/* @__PURE__ */ (0,
|
4857
|
-
icon && /* @__PURE__ */ (0,
|
4858
|
-
/* @__PURE__ */ (0,
|
4973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
4974
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(styles_default2, {}),
|
4975
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react87.Flex, { justifyContent: "space-between", alignItems: "center", gap: 4, children: [
|
4976
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react87.Flex, { alignItems: "center", children: [
|
4977
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react87.chakra.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
4978
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react87.chakra.span, { noOfLines: 2, children: message })
|
4859
4979
|
] }),
|
4860
|
-
link && /* @__PURE__ */ (0,
|
4861
|
-
|
4980
|
+
link && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
4981
|
+
import_react87.Link,
|
4862
4982
|
{
|
4863
4983
|
href: link.url,
|
4864
4984
|
textDecoration: "underline",
|
@@ -4937,9 +5057,9 @@ var useToast = () => {
|
|
4937
5057
|
var import_react_toastify2 = require("react-toastify");
|
4938
5058
|
|
4939
5059
|
// src/components/uploader/components/uploader.tsx
|
4940
|
-
var
|
4941
|
-
var
|
4942
|
-
var
|
5060
|
+
var import_react88 = require("@chakra-ui/react");
|
5061
|
+
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5062
|
+
var import_react89 = require("react");
|
4943
5063
|
var import_react_dropzone = require("react-dropzone");
|
4944
5064
|
|
4945
5065
|
// src/components/uploader/constants.ts
|
@@ -4969,8 +5089,8 @@ var concatList = (list) => {
|
|
4969
5089
|
var formatValidationMessage = (extension) => `Foto harus dalam format ${concatList(extension.map((ext) => `.${ext}`))}.`;
|
4970
5090
|
|
4971
5091
|
// src/components/uploader/components/uploader.tsx
|
4972
|
-
var
|
4973
|
-
var
|
5092
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
5093
|
+
var import_react90 = require("react");
|
4974
5094
|
var Uploader = ({
|
4975
5095
|
onHandleUploadFile,
|
4976
5096
|
onHandleRejections,
|
@@ -4999,10 +5119,10 @@ var Uploader = ({
|
|
4999
5119
|
size: size2 = "lg",
|
5000
5120
|
...props
|
5001
5121
|
}) => {
|
5002
|
-
const inputRef = (0,
|
5003
|
-
const [filePreview, setFilePreview] = (0,
|
5122
|
+
const inputRef = (0, import_react89.useRef)(null);
|
5123
|
+
const [filePreview, setFilePreview] = (0, import_react89.useState)();
|
5004
5124
|
const toast2 = useToast();
|
5005
|
-
const handleRejection = (0,
|
5125
|
+
const handleRejection = (0, import_react89.useCallback)(
|
5006
5126
|
(message, file, image) => {
|
5007
5127
|
if (onHandleRejections) {
|
5008
5128
|
onHandleRejections(file, image);
|
@@ -5014,7 +5134,7 @@ var Uploader = ({
|
|
5014
5134
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
5015
5135
|
[onHandleRejections]
|
5016
5136
|
);
|
5017
|
-
const onDrop = (0,
|
5137
|
+
const onDrop = (0, import_react89.useCallback)(
|
5018
5138
|
(files) => {
|
5019
5139
|
var _a;
|
5020
5140
|
const file = files[0];
|
@@ -5058,18 +5178,18 @@ var Uploader = ({
|
|
5058
5178
|
});
|
5059
5179
|
const renderHelperText = () => {
|
5060
5180
|
if (Array.isArray(helperText)) {
|
5061
|
-
return /* @__PURE__ */ (0,
|
5181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.UnorderedList, { pl: 2, fontSize: 12, color: "gray.600", "data-test-id": "CT_component_base-image-uploader_helperText", children: helperText.map((text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.ListItem, { children: text2 }, text2)) });
|
5062
5182
|
}
|
5063
5183
|
return helperText;
|
5064
5184
|
};
|
5065
|
-
const renderErrorText = (text2) => /* @__PURE__ */ (0,
|
5185
|
+
const renderErrorText = (text2) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Box, { mb: 2, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Text, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
5066
5186
|
const handleRemove = (e) => {
|
5067
5187
|
e.stopPropagation();
|
5068
5188
|
setFilePreview(void 0);
|
5069
5189
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(null, null);
|
5070
5190
|
acceptedFiles.pop();
|
5071
5191
|
};
|
5072
|
-
(0,
|
5192
|
+
(0, import_react89.useEffect)(() => {
|
5073
5193
|
if (value) {
|
5074
5194
|
if (typeof value === "string") {
|
5075
5195
|
setFilePreview(value);
|
@@ -5085,16 +5205,16 @@ var Uploader = ({
|
|
5085
5205
|
const color = isDisabled ? "neutral.500" : "primary.500";
|
5086
5206
|
const containerHeight = !isSmall ? "160px" : "120px";
|
5087
5207
|
const cursorType = filePreview ? "initial" : "pointer";
|
5088
|
-
return /* @__PURE__ */ (0,
|
5208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.FormControl, { isRequired, children: [
|
5089
5209
|
label && typeof label === "string" ? (
|
5090
5210
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
5091
|
-
/* @__PURE__ */ (0,
|
5092
|
-
isRequired && /* @__PURE__ */ (0,
|
5211
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.FormLabel, { requiredIndicator: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, {}), fontSize: "text.sm", children: [
|
5212
|
+
isRequired && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.RequiredIndicator, { mr: 1, ml: 0 }),
|
5093
5213
|
label
|
5094
5214
|
] })
|
5095
5215
|
) : label,
|
5096
|
-
/* @__PURE__ */ (0,
|
5097
|
-
|
5216
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
5217
|
+
import_react88.Flex,
|
5098
5218
|
{
|
5099
5219
|
minH: containerHeight,
|
5100
5220
|
maxW: !isSmall ? "full" : "120px",
|
@@ -5111,8 +5231,8 @@ var Uploader = ({
|
|
5111
5231
|
...props,
|
5112
5232
|
...getRootProps(),
|
5113
5233
|
children: [
|
5114
|
-
filePreview && isShowCloseButton && /* @__PURE__ */ (0,
|
5115
|
-
|
5234
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Box, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5235
|
+
import_react88.Button,
|
5116
5236
|
{
|
5117
5237
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
5118
5238
|
"aria-label": "remove-image",
|
@@ -5126,18 +5246,18 @@ var Uploader = ({
|
|
5126
5246
|
border: "none",
|
5127
5247
|
zIndex: 1,
|
5128
5248
|
onClick: handleRemove,
|
5129
|
-
children: /* @__PURE__ */ (0,
|
5249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon11.Close, { size: 3, color: "white" })
|
5130
5250
|
}
|
5131
5251
|
) }),
|
5132
|
-
filePreview && /* @__PURE__ */ (0,
|
5133
|
-
|
5252
|
+
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5253
|
+
import_react88.Flex,
|
5134
5254
|
{
|
5135
5255
|
position: "relative",
|
5136
5256
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
5137
5257
|
justify: "center",
|
5138
5258
|
align: "center",
|
5139
|
-
children: /* @__PURE__ */ (0,
|
5140
|
-
|
5259
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5260
|
+
import_react88.Image,
|
5141
5261
|
{
|
5142
5262
|
h: size2 === "lg" ? "120" : "100",
|
5143
5263
|
src: filePreview,
|
@@ -5147,19 +5267,19 @@ var Uploader = ({
|
|
5147
5267
|
)
|
5148
5268
|
}
|
5149
5269
|
) }),
|
5150
|
-
!filePreview && /* @__PURE__ */ (0,
|
5151
|
-
/* @__PURE__ */ (0,
|
5270
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
5271
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5152
5272
|
"input",
|
5153
5273
|
{
|
5154
5274
|
"data-test-id": `CT_component_base-image-uploader_input-file${testId ? `_${testId}` : ""}`,
|
5155
5275
|
...getInputProps()
|
5156
5276
|
}
|
5157
5277
|
),
|
5158
|
-
isDragActive ? /* @__PURE__ */ (0,
|
5159
|
-
size2 === "sm" && /* @__PURE__ */ (0,
|
5160
|
-
/* @__PURE__ */ (0,
|
5161
|
-
!filePreview && /* @__PURE__ */ (0,
|
5162
|
-
|
5278
|
+
isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
5279
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon11.Plus, { size: 6, color }),
|
5280
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.Box, { children: [
|
5281
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5282
|
+
import_react88.Heading,
|
5163
5283
|
{
|
5164
5284
|
fontWeight: "400",
|
5165
5285
|
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
@@ -5168,15 +5288,15 @@ var Uploader = ({
|
|
5168
5288
|
children: uploadFileText && size2 === "lg" ? messages.uploadFile : "Upload"
|
5169
5289
|
}
|
5170
5290
|
),
|
5171
|
-
size2 === "lg" && /* @__PURE__ */ (0,
|
5291
|
+
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 })
|
5172
5292
|
] })
|
5173
5293
|
] })
|
5174
5294
|
] })
|
5175
5295
|
]
|
5176
5296
|
}
|
5177
5297
|
),
|
5178
|
-
filePreview && !isSmall && /* @__PURE__ */ (0,
|
5179
|
-
/* @__PURE__ */ (0,
|
5298
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.Flex, { align: "center", justify: "center", my: 2, children: [
|
5299
|
+
/* @__PURE__ */ (0, import_react90.createElement)(
|
5180
5300
|
"input",
|
5181
5301
|
{
|
5182
5302
|
...getInputProps(),
|
@@ -5186,8 +5306,8 @@ var Uploader = ({
|
|
5186
5306
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
5187
5307
|
}
|
5188
5308
|
),
|
5189
|
-
isShowReupload && /* @__PURE__ */ (0,
|
5190
|
-
|
5309
|
+
isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5310
|
+
import_react88.Button,
|
5191
5311
|
{
|
5192
5312
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
5193
5313
|
type: "button",
|
@@ -5208,10 +5328,10 @@ var Uploader = ({
|
|
5208
5328
|
var uploader_default = Uploader;
|
5209
5329
|
|
5210
5330
|
// src/components/index.ts
|
5211
|
-
var
|
5331
|
+
var import_react91 = require("@chakra-ui/react");
|
5212
5332
|
|
5213
5333
|
// src/config/theme/themeConfiguration.ts
|
5214
|
-
var
|
5334
|
+
var import_react99 = require("@chakra-ui/react");
|
5215
5335
|
|
5216
5336
|
// src/config/theme/components/index.ts
|
5217
5337
|
var components_exports = {};
|
@@ -5768,8 +5888,8 @@ var card_default2 = CardStyle;
|
|
5768
5888
|
|
5769
5889
|
// src/config/theme/components/checkbox.ts
|
5770
5890
|
var import_anatomy3 = require("@chakra-ui/anatomy");
|
5771
|
-
var
|
5772
|
-
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0,
|
5891
|
+
var import_react92 = require("@chakra-ui/react");
|
5892
|
+
var { definePartsStyle: definePartsStyle3, defineMultiStyleConfig: defineMultiStyleConfig3 } = (0, import_react92.createMultiStyleConfigHelpers)(import_anatomy3.checkboxAnatomy.keys);
|
5773
5893
|
var baseStyle3 = definePartsStyle3({
|
5774
5894
|
control: {
|
5775
5895
|
borderRadius: "sm",
|
@@ -5870,8 +5990,8 @@ var checkbox_default2 = Checkbox4;
|
|
5870
5990
|
|
5871
5991
|
// src/config/theme/components/chips.ts
|
5872
5992
|
var import_anatomy4 = require("@chakra-ui/anatomy");
|
5873
|
-
var
|
5874
|
-
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0,
|
5993
|
+
var import_react93 = require("@chakra-ui/react");
|
5994
|
+
var { definePartsStyle: definePartsStyle4, defineMultiStyleConfig: defineMultiStyleConfig4 } = (0, import_react93.createMultiStyleConfigHelpers)(import_anatomy4.tagAnatomy.keys);
|
5875
5995
|
var baseStyle4 = definePartsStyle4({
|
5876
5996
|
container: {
|
5877
5997
|
px: 3,
|
@@ -5954,10 +6074,10 @@ var baseStyle5 = (0, import_styled_system5.defineStyle)({
|
|
5954
6074
|
marginEnd: 1,
|
5955
6075
|
mb: 1
|
5956
6076
|
});
|
5957
|
-
var
|
6077
|
+
var FormLabel4 = (0, import_styled_system5.defineStyleConfig)({
|
5958
6078
|
baseStyle: baseStyle5
|
5959
6079
|
});
|
5960
|
-
var form_label_default =
|
6080
|
+
var form_label_default = FormLabel4;
|
5961
6081
|
|
5962
6082
|
// src/config/theme/components/input.ts
|
5963
6083
|
var import_anatomy5 = require("@chakra-ui/anatomy");
|
@@ -6067,7 +6187,7 @@ var variants3 = {
|
|
6067
6187
|
outline: outline2,
|
6068
6188
|
unstyled: unstyled2
|
6069
6189
|
};
|
6070
|
-
var
|
6190
|
+
var Input4 = defineMultiStyleConfig5({
|
6071
6191
|
baseStyle: baseStyle6,
|
6072
6192
|
sizes: sizes2,
|
6073
6193
|
variants: variants3,
|
@@ -6076,12 +6196,12 @@ var Input3 = defineMultiStyleConfig5({
|
|
6076
6196
|
variant: "outline"
|
6077
6197
|
}
|
6078
6198
|
});
|
6079
|
-
var input_default =
|
6199
|
+
var input_default = Input4;
|
6080
6200
|
|
6081
6201
|
// src/config/theme/components/loader.ts
|
6082
6202
|
var import_styled_system7 = require("@chakra-ui/styled-system");
|
6083
|
-
var
|
6084
|
-
var rotate = (0,
|
6203
|
+
var import_react94 = require("@emotion/react");
|
6204
|
+
var rotate = (0, import_react94.keyframes)({
|
6085
6205
|
"0%": {
|
6086
6206
|
transform: "rotate(0deg)"
|
6087
6207
|
},
|
@@ -6263,8 +6383,8 @@ var modal_default = modalTheme;
|
|
6263
6383
|
|
6264
6384
|
// src/config/theme/components/popover.ts
|
6265
6385
|
var import_anatomy7 = require("@chakra-ui/anatomy");
|
6266
|
-
var
|
6267
|
-
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0,
|
6386
|
+
var import_react95 = require("@chakra-ui/react");
|
6387
|
+
var { definePartsStyle: definePartsStyle7, defineMultiStyleConfig: defineMultiStyleConfig7 } = (0, import_react95.createMultiStyleConfigHelpers)(import_anatomy7.popoverAnatomy.keys);
|
6268
6388
|
var baseStyle8 = definePartsStyle7({
|
6269
6389
|
content: {
|
6270
6390
|
bg: "white"
|
@@ -6275,8 +6395,8 @@ var popover_default = popoverTheme;
|
|
6275
6395
|
|
6276
6396
|
// src/config/theme/components/radio.ts
|
6277
6397
|
var import_anatomy8 = require("@chakra-ui/anatomy");
|
6278
|
-
var
|
6279
|
-
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0,
|
6398
|
+
var import_react96 = require("@chakra-ui/react");
|
6399
|
+
var { definePartsStyle: definePartsStyle8, defineMultiStyleConfig: defineMultiStyleConfig8 } = (0, import_react96.createMultiStyleConfigHelpers)(import_anatomy8.radioAnatomy.keys);
|
6280
6400
|
var baseStyle9 = definePartsStyle8({
|
6281
6401
|
control: {
|
6282
6402
|
border: "1px solid",
|
@@ -6699,7 +6819,7 @@ var tabsTheme = defineMultiStyleConfig11({
|
|
6699
6819
|
var tabs_default = tabsTheme;
|
6700
6820
|
|
6701
6821
|
// src/config/theme/components/textarea.ts
|
6702
|
-
var
|
6822
|
+
var import_react97 = require("@chakra-ui/react");
|
6703
6823
|
var getProps = (props) => {
|
6704
6824
|
const { isError, isSuccess, isDisabled } = props;
|
6705
6825
|
let borderColor = "neutral.400";
|
@@ -6719,7 +6839,7 @@ var getProps = (props) => {
|
|
6719
6839
|
borderColor
|
6720
6840
|
};
|
6721
6841
|
};
|
6722
|
-
var outline3 = (0,
|
6842
|
+
var outline3 = (0, import_react97.defineStyle)((props) => {
|
6723
6843
|
const { focusBorderColor, borderColor } = getProps(props);
|
6724
6844
|
return {
|
6725
6845
|
background: "white.high",
|
@@ -6763,7 +6883,7 @@ var outline3 = (0, import_react94.defineStyle)((props) => {
|
|
6763
6883
|
}
|
6764
6884
|
};
|
6765
6885
|
});
|
6766
|
-
var Textarea = (0,
|
6886
|
+
var Textarea = (0, import_react97.defineStyleConfig)({
|
6767
6887
|
variants: { outline: outline3 },
|
6768
6888
|
defaultProps: {
|
6769
6889
|
variant: "outline"
|
@@ -6772,15 +6892,15 @@ var Textarea = (0, import_react94.defineStyleConfig)({
|
|
6772
6892
|
var textarea_default2 = Textarea;
|
6773
6893
|
|
6774
6894
|
// src/config/theme/components/tooltip.ts
|
6775
|
-
var
|
6776
|
-
var $arrowBg = (0,
|
6895
|
+
var import_react98 = require("@chakra-ui/react");
|
6896
|
+
var $arrowBg = (0, import_react98.cssVar)("popper-arrow-bg");
|
6777
6897
|
var baseStyle12 = {
|
6778
6898
|
bg: "neutral.700",
|
6779
6899
|
textStyle: "text.sm",
|
6780
6900
|
fontSize: "text.sm",
|
6781
6901
|
[$arrowBg.variable]: "var(--chakra-colors-neutral-700)"
|
6782
6902
|
};
|
6783
|
-
var Tooltip2 = (0,
|
6903
|
+
var Tooltip2 = (0, import_react98.defineStyleConfig)({ baseStyle: baseStyle12 });
|
6784
6904
|
var tooltip_default = Tooltip2;
|
6785
6905
|
|
6786
6906
|
// src/config/theme/themeConfiguration.ts
|
@@ -6799,7 +6919,7 @@ var createExtendTheme = (theme5) => {
|
|
6799
6919
|
return function extendTheme2(...extensions) {
|
6800
6920
|
let overrides = [...extensions];
|
6801
6921
|
let activeTheme = extensions[extensions.length - 1];
|
6802
|
-
if ((0,
|
6922
|
+
if ((0, import_react99.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
6803
6923
|
// previously only `extendTheme(override, activeTheme?)` was allowed
|
6804
6924
|
overrides.length > 1) {
|
6805
6925
|
overrides = overrides.slice(0, overrides.length - 1);
|
@@ -6808,13 +6928,13 @@ var createExtendTheme = (theme5) => {
|
|
6808
6928
|
}
|
6809
6929
|
return pipe(
|
6810
6930
|
...overrides.map(
|
6811
|
-
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0,
|
6931
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react99.mergeThemeOverride)(prevTheme, extension)
|
6812
6932
|
)
|
6813
6933
|
)(activeTheme);
|
6814
6934
|
};
|
6815
6935
|
};
|
6816
6936
|
var getTheme = (foundations) => {
|
6817
|
-
return (0,
|
6937
|
+
return (0, import_react99.extendTheme)({
|
6818
6938
|
...foundations,
|
6819
6939
|
components: {
|
6820
6940
|
...components_exports
|
@@ -6831,7 +6951,7 @@ var getTheme = (foundations) => {
|
|
6831
6951
|
config
|
6832
6952
|
});
|
6833
6953
|
};
|
6834
|
-
var theme4 = (0,
|
6954
|
+
var theme4 = (0, import_react99.extendTheme)({
|
6835
6955
|
components: {
|
6836
6956
|
...components_exports
|
6837
6957
|
},
|
@@ -6851,23 +6971,23 @@ var theme4 = (0, import_react96.extendTheme)({
|
|
6851
6971
|
|
6852
6972
|
// src/hooks/useFetcher.ts
|
6853
6973
|
var import_axios2 = __toESM(require("axios"));
|
6854
|
-
var
|
6974
|
+
var import_react102 = require("react");
|
6855
6975
|
|
6856
6976
|
// src/provider/components/provider.tsx
|
6857
6977
|
var import_axios = __toESM(require("axios"));
|
6858
|
-
var
|
6978
|
+
var import_react100 = require("react");
|
6859
6979
|
var import_react_toastify3 = require("react-toastify");
|
6860
|
-
var
|
6861
|
-
var ProviderContext = (0,
|
6980
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
6981
|
+
var ProviderContext = (0, import_react100.createContext)({
|
6862
6982
|
instance: void 0
|
6863
6983
|
});
|
6864
6984
|
var useInternalUI = () => {
|
6865
|
-
const { instance } = (0,
|
6985
|
+
const { instance } = (0, import_react100.useContext)(ProviderContext);
|
6866
6986
|
return { instance };
|
6867
6987
|
};
|
6868
6988
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
6869
|
-
const instanceRef = (0,
|
6870
|
-
(0,
|
6989
|
+
const instanceRef = (0, import_react100.useRef)(import_axios.default.create(config2));
|
6990
|
+
(0, import_react100.useEffect)(() => {
|
6871
6991
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
6872
6992
|
instanceRef.current.interceptors.request.use(interceptor);
|
6873
6993
|
});
|
@@ -6875,9 +6995,9 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
6875
6995
|
instanceRef.current.interceptors.response.use(interceptor);
|
6876
6996
|
});
|
6877
6997
|
}, [requestInterceptors, responseInterceptors]);
|
6878
|
-
const provider = (0,
|
6879
|
-
return /* @__PURE__ */ (0,
|
6880
|
-
/* @__PURE__ */ (0,
|
6998
|
+
const provider = (0, import_react100.useMemo)(() => ({ instance: instanceRef.current }), []);
|
6999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(ProviderContext.Provider, { value: provider, children: [
|
7000
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_toastify3.ToastContainer, {}),
|
6881
7001
|
children
|
6882
7002
|
] });
|
6883
7003
|
};
|
@@ -6885,12 +7005,12 @@ Provider.displayName = "Provider";
|
|
6885
7005
|
var provider_default = Provider;
|
6886
7006
|
|
6887
7007
|
// src/provider/index.ts
|
6888
|
-
var
|
7008
|
+
var import_react101 = require("@chakra-ui/react");
|
6889
7009
|
|
6890
7010
|
// src/hooks/useFetcher.ts
|
6891
7011
|
function useFetcher() {
|
6892
7012
|
const { instance } = useInternalUI();
|
6893
|
-
const axiosInstance = (0,
|
7013
|
+
const axiosInstance = (0, import_react102.useMemo)(() => instance || import_axios2.default, [instance]);
|
6894
7014
|
const fetcher = async ({ url, data, method, headers, ...config2 }) => {
|
6895
7015
|
const response = await axiosInstance.request({
|
6896
7016
|
data,
|
@@ -6910,10 +7030,10 @@ function useFetcher() {
|
|
6910
7030
|
}
|
6911
7031
|
|
6912
7032
|
// src/hooks/index.ts
|
6913
|
-
var
|
7033
|
+
var import_react103 = require("@chakra-ui/react");
|
6914
7034
|
|
6915
7035
|
// src/index.ts
|
6916
|
-
var
|
7036
|
+
var import_react104 = require("@chakra-ui/react");
|
6917
7037
|
// Annotate the CommonJS export names for ESM import in node:
|
6918
7038
|
0 && (module.exports = {
|
6919
7039
|
Accordion,
|
@@ -7181,6 +7301,8 @@ var import_react101 = require("@chakra-ui/react");
|
|
7181
7301
|
Th,
|
7182
7302
|
Thead,
|
7183
7303
|
ThemeTypings,
|
7304
|
+
Time,
|
7305
|
+
TimeInput,
|
7184
7306
|
ToastContainer,
|
7185
7307
|
Tooltip,
|
7186
7308
|
Tr,
|