@ctlyst.id/internal-ui 2.3.1 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +202 -41
- package/dist/index.d.ts +202 -41
- package/dist/index.js +1748 -1330
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1492 -1062
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
3
|
-
import { LinkProps, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, BoxProps, CheckboxProps, FormControlProps, CheckboxGroupProps, TableProps, TableHeadProps, TableRowProps, TableBodyProps, TableColumnHeaderProps, TableCellProps, ModalProps, InputProps, TextareaProps, HTMLChakraProps as HTMLChakraProps$1, ThemingProps as ThemingProps$1, ModalBodyProps, ModalFooterProps, ModalHeaderProps, As, TextProps, RadioProps as RadioProps$1, RadioGroupProps, UseCheckboxProps, SystemProps, TabProps as TabProps$1,
|
4
|
-
export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, AccordionProvider, AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, AlertDialogProps, Avatar, AvatarBadge, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Box, BoxProps, ButtonGroup, ButtonGroupProps, Center, ChakraProvider, ChakraProviderProps, Table as ChakraTable, CheckboxGroupContext, CheckboxGroupProps, CheckboxIcon, CheckboxIconProps, CheckboxState, CloseButton, CloseButtonProps, Code, CodeProps, Collapse, CollapseProps, ColorMode, ColorModeScript, ColorModeScriptProps, Container, ContainerProps, Divider, DividerProps, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, DrawerContentProps, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormControl, FormControlProps, FormErrorMessage, FormHelperText, FormLabel, FormLabelProps, Grid, GridItem, GridItemProps, GridProps, HStack, Heading, HeadingProps, Hide, HideProps, Icon, IconButton, IconButtonProps, IconProps, Image, ImageProps, Img, ImgProps, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, InputGroup, InputGroupProps, InputLeftAddon, InputLeftAddonProps, InputLeftElement, InputLeftElementProps, InputProps, InputRightAddon, InputRightAddonProps, InputRightElement, InputRightElementProps, Link, LinkProps, List, ListIcon, ListItem, ListItemProps, ListProps, Modal, ModalBodyProps, ModalContent, ModalContentProps, ModalContextProvider, ModalFocusScope, ModalFooterProps, ModalHeaderProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, Portal, PortalProps, RadioGroupContext, RequiredIndicator, RequiredIndicatorProps, ScaleFade, ScaleFadeProps, Show, ShowProps, SimpleGrid, Skeleton, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, Stack, StackProps, Step, StepDescription, StepIcon, StepIndicator, StepNumber, StepSeparator, StepStatus, StepTitle, Stepper, TabIndicator, TabIndicatorProps, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeadProps, TableProps, TableRowProps, Tabs, TabsDescendantsProvider, TabsProps, TabsProvider, Tbody, Td, Text, TextProps, Th, Thead,
|
3
|
+
import { LinkProps, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, BoxProps, CheckboxProps, FormControlProps, CheckboxGroupProps, TableProps, TableHeadProps, TableRowProps, TableBodyProps, TableColumnHeaderProps, TableCellProps, ModalProps, InputProps, TextareaProps, FlexProps, HTMLChakraProps as HTMLChakraProps$1, ThemingProps as ThemingProps$1, ModalBodyProps, ModalFooterProps, ModalHeaderProps, As, TextProps, RadioProps as RadioProps$1, RadioGroupProps, UseCheckboxProps, SystemProps, TabProps as TabProps$1, TooltipProps as TooltipProps$1, ColorProps, PopoverContentProps } from '@chakra-ui/react';
|
4
|
+
export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, AccordionProvider, AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, AlertDialogProps, Avatar, AvatarBadge, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Box, BoxProps, ButtonGroup, ButtonGroupProps, Center, ChakraProvider, ChakraProviderProps, Table as ChakraTable, CheckboxGroupContext, CheckboxGroupProps, CheckboxIcon, CheckboxIconProps, CheckboxState, CloseButton, CloseButtonProps, Code, CodeProps, Collapse, CollapseProps, ColorMode, ColorModeScript, ColorModeScriptProps, Container, ContainerProps, Divider, DividerProps, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, DrawerContentProps, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormControl, FormControlProps, FormErrorMessage, FormHelperText, FormLabel, FormLabelProps, Grid, GridItem, GridItemProps, GridProps, HStack, Heading, HeadingProps, Hide, HideProps, Icon, IconButton, IconButtonProps, IconProps, Image, ImageProps, Img, ImgProps, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, InputGroup, InputGroupProps, InputLeftAddon, InputLeftAddonProps, InputLeftElement, InputLeftElementProps, InputProps, InputRightAddon, InputRightAddonProps, InputRightElement, InputRightElementProps, Link, LinkProps, List, ListIcon, ListItem, ListItemProps, ListProps, Modal, ModalBodyProps, ModalContent, ModalContentProps, ModalContextProvider, ModalFocusScope, ModalFooterProps, ModalHeaderProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, Portal, PortalProps, RadioGroupContext, RequiredIndicator, RequiredIndicatorProps, ScaleFade, ScaleFadeProps, Show, ShowProps, SimpleGrid, Skeleton, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, Stack, StackProps, Step, StepDescription, StepIcon, StepIndicator, StepNumber, StepSeparator, StepStatus, StepTitle, Stepper, TabIndicator, TabIndicatorProps, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeadProps, TableProps, TableRowProps, Tabs, TabsDescendantsProvider, TabsProps, TabsProvider, Tbody, Td, Text, TextProps, Th, Thead, Tr, UnorderedList, UseAccordionItemProps, UseAccordionItemReturn, UseAccordionProps, UseAccordionReturn, UseBreakpointOptions, UseCheckboxGroupProps, UseCheckboxGroupReturn, UseCheckboxProps, UseCheckboxReturn, UseDisclosureProps, UseImageProps, UseImageReturn, UseMediaQueryOptions, UseModalProps, UseModalReturn, UseQueryProps, UseRadioGroupReturn, UseRadioProps, UseRadioReturn, UseTabListProps, UseTabListReturn, UseTabOptions, UseTabPanelsProps, UseTabProps, UseTabsProps, UseTabsReturn, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, WrapItemProps, WrapProps, extendTheme, forwardRef, useAccordion, useAccordionContext, useAccordionItem, useAccordionItemState, useAccordionStyles, useBoolean, useBreakpoint, useCheckbox, useCheckboxGroup, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useConst, useControllableProp, useControllableState, useDimensions, useDisclosure, useDrawerContext, useImage, useMergeRefs, useModal, useModalContext, useModalStyles, useOutsideClick, useQuery, useRadio, useRadioGroup, useRadioGroupContext, useSteps, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles, useTheme, useToken } from '@chakra-ui/react';
|
5
5
|
import * as _chakra_ui_system from '@chakra-ui/system';
|
6
6
|
import { SystemStyleObject, HTMLChakraProps, ThemingProps } from '@chakra-ui/system';
|
7
7
|
import * as React$1 from 'react';
|
@@ -14,7 +14,9 @@ import { GroupBase, Props as Props$1 } from 'react-select';
|
|
14
14
|
import { AsyncPaginateProps } from 'react-select-async-paginate';
|
15
15
|
import { AsyncCreatableProps } from 'react-select/async-creatable';
|
16
16
|
import { CreatableProps } from 'react-select/creatable';
|
17
|
-
import {
|
17
|
+
import { ToastOptions } from 'react-toastify';
|
18
|
+
export { ToastContainer } from 'react-toastify';
|
19
|
+
import { ToastIcon } from 'react-toastify/dist/types';
|
18
20
|
import * as axios from 'axios';
|
19
21
|
import { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
|
20
22
|
export { ThemeTypings } from '@chakra-ui/styled-system';
|
@@ -101,17 +103,13 @@ type AlertTitleProps = HTMLChakraProps<'div'>;
|
|
101
103
|
declare const AlertTitle: _chakra_ui_system.ComponentWithAs<"div", AlertTitleProps>;
|
102
104
|
|
103
105
|
interface AnchorProps extends LinkProps, PropsWithChildren {
|
104
|
-
leftIcon?: React$1.ReactNode;
|
105
|
-
rightIcon?: React$1.ReactNode;
|
106
106
|
isActive?: boolean;
|
107
107
|
isChild?: boolean;
|
108
108
|
}
|
109
109
|
declare const Anchor: {
|
110
|
-
({ children,
|
110
|
+
({ children, isActive, isChild, ...props }: AnchorProps): react_jsx_runtime.JSX.Element;
|
111
111
|
displayName: string;
|
112
112
|
defaultProps: {
|
113
|
-
leftIcon: undefined;
|
114
|
-
rightIcon: undefined;
|
115
113
|
isActive: boolean;
|
116
114
|
isChild: boolean;
|
117
115
|
};
|
@@ -193,16 +191,17 @@ interface ChipsProps {
|
|
193
191
|
isDisabled?: boolean;
|
194
192
|
isActive?: boolean;
|
195
193
|
onClose?: () => void;
|
196
|
-
|
194
|
+
label?: string;
|
197
195
|
size?: 'sm' | 'md';
|
196
|
+
onClick?: () => void;
|
198
197
|
}
|
199
198
|
declare const Chips: {
|
200
|
-
({
|
199
|
+
({ label, size, onClick, ...rest }: ChipsProps): react_jsx_runtime.JSX.Element;
|
201
200
|
defaultProps: {
|
202
201
|
isDisabled: boolean;
|
203
202
|
isActive: boolean;
|
204
203
|
onClose: undefined;
|
205
|
-
|
204
|
+
label: undefined;
|
206
205
|
size: string;
|
207
206
|
};
|
208
207
|
};
|
@@ -229,7 +228,9 @@ interface TableStyleProps {
|
|
229
228
|
tableColumnHeader?: TableColumnHeaderProps;
|
230
229
|
tableCell?: TableCellProps;
|
231
230
|
}
|
232
|
-
interface DataTableProps<T
|
231
|
+
interface DataTableProps<T extends {
|
232
|
+
disabled?: Record<string, boolean>;
|
233
|
+
}> {
|
233
234
|
container?: BoxProps;
|
234
235
|
styles?: TableStyleProps;
|
235
236
|
columns: ColumnDef<T>[];
|
@@ -246,12 +247,16 @@ interface DataTableProps<T = unknown> extends BoxProps {
|
|
246
247
|
onRowClick?: (data: T) => void;
|
247
248
|
}
|
248
249
|
type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;
|
249
|
-
declare const useDataTable: <T
|
250
|
+
declare const useDataTable: <T extends {
|
251
|
+
disabled?: Record<string, boolean> | undefined;
|
252
|
+
}>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, columnPinning, }: DataTableProps<T>) => {
|
250
253
|
table: _tanstack_react_table.Table<T>;
|
251
254
|
toggleAllRowsSelected: (value?: boolean | undefined) => void;
|
252
255
|
generateColumn: () => ColumnDef<T>[];
|
253
256
|
};
|
254
|
-
declare const _default: <T
|
257
|
+
declare const _default: <T extends {
|
258
|
+
disabled?: Record<string, boolean> | undefined;
|
259
|
+
}>(props: DataTableProps<T> & {
|
255
260
|
ref?: React$1.Ref<DataTableRefs<T>>;
|
256
261
|
}) => JSX.Element;
|
257
262
|
|
@@ -295,25 +300,24 @@ interface DialogProps extends Omit<ModalProps, 'children'> {
|
|
295
300
|
}
|
296
301
|
declare const Dialog: React__default.FC<DialogProps>;
|
297
302
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
Search: () => react_jsx_runtime.JSX.Element;
|
303
|
-
Connection: () => react_jsx_runtime.JSX.Element;
|
304
|
-
Maintenance: () => react_jsx_runtime.JSX.Element;
|
305
|
-
NotAuthorize: () => react_jsx_runtime.JSX.Element;
|
306
|
-
};
|
307
|
-
|
308
|
-
interface EmptyStateLayoutProps {
|
309
|
-
icon: React__default.ReactNode;
|
310
|
-
title: string;
|
311
|
-
description: string;
|
303
|
+
interface EmptyStateProps {
|
304
|
+
icon?: React__default.ReactNode;
|
305
|
+
title?: string;
|
306
|
+
description?: string;
|
312
307
|
buttonText?: string;
|
313
308
|
onClick?: () => void;
|
314
|
-
maxW?: number;
|
315
309
|
}
|
316
|
-
|
310
|
+
|
311
|
+
type EmptyStateComponent = React__default.FC<EmptyStateProps> & {
|
312
|
+
Data: React__default.FC<EmptyStateProps>;
|
313
|
+
Page: React__default.FC<EmptyStateProps>;
|
314
|
+
Filter: React__default.FC<EmptyStateProps>;
|
315
|
+
Search: React__default.FC<EmptyStateProps>;
|
316
|
+
NoConnection: React__default.FC<EmptyStateProps>;
|
317
|
+
Maintenance: React__default.FC<EmptyStateProps>;
|
318
|
+
NotAuthorize: React__default.FC<EmptyStateProps>;
|
319
|
+
};
|
320
|
+
declare const EmptyState: EmptyStateComponent;
|
317
321
|
|
318
322
|
interface InputAddonProps {
|
319
323
|
children: React__default.ReactNode;
|
@@ -363,6 +367,47 @@ type HeaderProps = BoxProps & {
|
|
363
367
|
};
|
364
368
|
declare const Header: React$1.FC<HeaderProps>;
|
365
369
|
|
370
|
+
interface LogoProps {
|
371
|
+
url?: string;
|
372
|
+
imageUrl: string;
|
373
|
+
height?: BoxProps['h'];
|
374
|
+
}
|
375
|
+
declare const Logo: React__default.FC<LogoProps>;
|
376
|
+
declare const XMSLogo: () => react_jsx_runtime.JSX.Element;
|
377
|
+
declare const VoilaLogo: () => react_jsx_runtime.JSX.Element;
|
378
|
+
|
379
|
+
interface NavbarProps extends FlexProps {
|
380
|
+
}
|
381
|
+
declare const Navbar: {
|
382
|
+
({ bg, children, ...props }: NavbarProps): react_jsx_runtime.JSX.Element;
|
383
|
+
displayName: string;
|
384
|
+
};
|
385
|
+
|
386
|
+
interface ProfileProps extends BoxProps {
|
387
|
+
brandColor?: BoxProps['bgColor'];
|
388
|
+
data?: HeaderDataProps;
|
389
|
+
onLogout?: () => void;
|
390
|
+
badgeStyle?: BadgeProps;
|
391
|
+
}
|
392
|
+
declare const Profile: {
|
393
|
+
({ color, brandColor, data, badgeStyle, children, onLogout, ...props }: ProfileProps): react_jsx_runtime.JSX.Element;
|
394
|
+
defaultProps: {
|
395
|
+
brandColor: string;
|
396
|
+
data: undefined;
|
397
|
+
onLogout: undefined;
|
398
|
+
badgeStyle: undefined;
|
399
|
+
};
|
400
|
+
};
|
401
|
+
|
402
|
+
type VersionProps = {
|
403
|
+
hideEnv?: boolean;
|
404
|
+
environment?: Environment;
|
405
|
+
version?: React$1.ReactNode;
|
406
|
+
versionStyle?: BadgeProps;
|
407
|
+
onOpenModalRelease?: () => void;
|
408
|
+
};
|
409
|
+
declare const Version: React$1.FC<VersionProps>;
|
410
|
+
|
366
411
|
interface LoaderProps {
|
367
412
|
size?: string;
|
368
413
|
variant?: string;
|
@@ -488,8 +533,8 @@ declare const Radio: {
|
|
488
533
|
displayName: string;
|
489
534
|
defaultProps: {
|
490
535
|
isError: boolean;
|
491
|
-
helpText:
|
492
|
-
errorText:
|
536
|
+
helpText: undefined;
|
537
|
+
errorText: undefined;
|
493
538
|
};
|
494
539
|
};
|
495
540
|
|
@@ -568,8 +613,15 @@ declare const Sidebar: {
|
|
568
613
|
interface SidebarHeaderProps {
|
569
614
|
isCollapse: boolean;
|
570
615
|
setCollapse: (k: boolean) => void;
|
616
|
+
title?: string;
|
571
617
|
}
|
572
|
-
declare const SidebarHeader:
|
618
|
+
declare const SidebarHeader: {
|
619
|
+
({ isCollapse, setCollapse, title }: SidebarHeaderProps): react_jsx_runtime.JSX.Element;
|
620
|
+
displayName: string;
|
621
|
+
defaultProps: {
|
622
|
+
title: string;
|
623
|
+
};
|
624
|
+
};
|
573
625
|
|
574
626
|
type SubMenuItem = {
|
575
627
|
type: string;
|
@@ -633,14 +685,123 @@ type TabProps = TabProps$1 & {
|
|
633
685
|
};
|
634
686
|
declare const Tab: _chakra_ui_react.ComponentWithAs<"button", TabProps>;
|
635
687
|
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
688
|
+
interface CustomToastOptions extends Omit<ToastOptions, 'icon'> {
|
689
|
+
icon?: ToastIcon;
|
690
|
+
link?: {
|
691
|
+
url: string;
|
692
|
+
label: string;
|
693
|
+
};
|
694
|
+
}
|
695
|
+
declare const useToast: () => {
|
696
|
+
primary: (message: string, options?: CustomToastOptions) => void;
|
697
|
+
neutral: (message: string, options?: CustomToastOptions) => void;
|
698
|
+
success: (message: string, options?: CustomToastOptions) => void;
|
699
|
+
error: (message: string, options?: CustomToastOptions) => void;
|
700
|
+
warning: (message: string, options?: CustomToastOptions) => void;
|
701
|
+
info: (message: string, options?: CustomToastOptions) => void;
|
702
|
+
custom: (message: string, options?: CustomToastOptions) => void;
|
703
|
+
};
|
704
|
+
|
705
|
+
interface BaseTooltipProps extends Omit<TooltipProps$1, 'color'> {
|
706
|
+
isInteractive?: false;
|
707
|
+
color?: ColorProps['color'];
|
708
|
+
}
|
709
|
+
interface InteractiveTooltipProps extends PopoverContentProps, Pick<TooltipProps$1, 'hasArrow' | 'placement' | 'children' | 'label'> {
|
710
|
+
isInteractive?: true;
|
711
|
+
portal?: boolean;
|
712
|
+
}
|
713
|
+
type TooltipProps = BaseTooltipProps | InteractiveTooltipProps;
|
714
|
+
declare const Tooltip: (props: TooltipProps) => react_jsx_runtime.JSX.Element;
|
715
|
+
|
716
|
+
type UploaderProps = FlexProps & {
|
717
|
+
/**
|
718
|
+
* callback when validation is valid
|
719
|
+
*/
|
720
|
+
onHandleUploadFile?: (file: File | null, image: HTMLImageElement | null) => void;
|
721
|
+
/**
|
722
|
+
* callback when validation is not valid
|
723
|
+
*/
|
724
|
+
onHandleRejections?: (file: File, image: HTMLImageElement | null) => void;
|
725
|
+
/**
|
726
|
+
* Text for drag active
|
727
|
+
* - if `dragActiveText` is undefined. Text will take from default constant.
|
728
|
+
*/
|
729
|
+
dragActiveText?: string;
|
730
|
+
/**
|
731
|
+
* Text for drag inactive
|
732
|
+
* - if `dragInActiveText` is undefined. Text will take from default constant.
|
733
|
+
*/
|
734
|
+
dragInActiveText?: string;
|
735
|
+
/**
|
736
|
+
* Text for drag replace
|
737
|
+
* - if `dragReplaceText` is undefined. Text will take from default constant.
|
738
|
+
*/
|
739
|
+
dragReplaceText?: string;
|
740
|
+
/**
|
741
|
+
* Text for upload file
|
742
|
+
* - if `uploadFileText` is undefined. Text will take from default constant.
|
743
|
+
*/
|
744
|
+
uploadFileText?: string;
|
745
|
+
/**
|
746
|
+
* Text for button preview
|
747
|
+
* - if `changeFileText` is undefined. Text will take from default constant.
|
748
|
+
*/
|
749
|
+
changeFileText?: string;
|
750
|
+
label?: string | ReactNode;
|
751
|
+
isRequired?: boolean;
|
752
|
+
helperText?: string[] | ReactNode;
|
753
|
+
value?: File | string;
|
754
|
+
/**
|
755
|
+
* validate width x height dimension
|
756
|
+
*/
|
757
|
+
dimension?: {
|
758
|
+
/**
|
759
|
+
* [width, height]
|
760
|
+
*/
|
761
|
+
validate: [number, number];
|
762
|
+
message: string;
|
763
|
+
};
|
764
|
+
/**
|
765
|
+
* validate max file size
|
766
|
+
*/
|
767
|
+
maxFileSize?: {
|
768
|
+
/**
|
769
|
+
* in bytes
|
770
|
+
*/
|
771
|
+
validate: number;
|
772
|
+
message: string;
|
773
|
+
};
|
774
|
+
/**
|
775
|
+
* validate image format
|
776
|
+
* @default acceptFormat.validate - @see DEFAULT_IMAGE_MIME_TYPE
|
777
|
+
* @default acceptFormat.message - Hanya diperbolehkan upload gambar
|
778
|
+
*/
|
779
|
+
acceptFormat?: {
|
780
|
+
/**
|
781
|
+
* Example :
|
782
|
+
* ['.jpg', '.png', '.jpeg', ...]
|
783
|
+
*/
|
784
|
+
validate: string[];
|
785
|
+
message?: string;
|
786
|
+
};
|
787
|
+
/**
|
788
|
+
* Custom validation
|
789
|
+
* custom validation will run first
|
790
|
+
*/
|
791
|
+
customValidation?: (file: File, image: HTMLImageElement) => string | null;
|
792
|
+
isShowCloseButton?: boolean;
|
793
|
+
isClosableToast?: boolean;
|
794
|
+
isError?: boolean;
|
795
|
+
isDisabled?: boolean;
|
796
|
+
errorText?: string;
|
797
|
+
/**
|
798
|
+
* provide unique test id
|
799
|
+
*/
|
800
|
+
testId?: string;
|
801
|
+
isShowReupload?: boolean;
|
802
|
+
size?: 'sm' | 'lg';
|
641
803
|
};
|
642
|
-
|
643
|
-
declare const Uploader: React$1.FC<UploaderProps>;
|
804
|
+
declare const Uploader: React__default.FC<UploaderProps>;
|
644
805
|
|
645
806
|
declare const getTheme: (foundations: Record<string, any>) => Record<string, any>;
|
646
807
|
declare const theme: Record<string, any>;
|
@@ -666,4 +827,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
666
827
|
declare const useInternalUI: () => ProviderContextObject;
|
667
828
|
declare const Provider: FC<ProviderProps>;
|
668
829
|
|
669
|
-
export { AccordionEye, AccordionIndicator, Alert, AlertAction, type AlertActionProps, AlertClose, type AlertCloseProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, Anchor, type AnchorProps, Badge, type BadgeProps, BreadCrumb, type BreadCrumbParentProps, type BreadCrumbProps, Button, type ButtonProps, CHECKBOX_STATE, CardCustom as Card, type CardProps, CheckboxComponent as Checkbox, type CheckboxComponentProps, CheckboxGroupComponent as CheckboxGroup, type CheckboxGroupComponentProps, Chips, type ChipsProps, Counter, type CustomLoaderProps, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, EmptyState,
|
830
|
+
export { AccordionEye, AccordionIndicator, Alert, AlertAction, type AlertActionProps, AlertClose, type AlertCloseProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, Anchor, type AnchorProps, Badge, type BadgeProps, BreadCrumb, type BreadCrumbParentProps, type BreadCrumbProps, Button, type ButtonProps, CHECKBOX_STATE, CardCustom as Card, type CardProps, CheckboxComponent as Checkbox, type CheckboxComponentProps, CheckboxGroupComponent as CheckboxGroup, type CheckboxGroupComponentProps, Chips, type ChipsProps, Counter, type CustomLoaderProps, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, EmptyState, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Logo, type LogoProps, Navigation as MainMenu, ModalBackButton, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, type MultiDatePickerMonthProps, NavItem, type NavItemProps, Navbar, type NavbarProps, NavigationBar, type NavigationBarProps, type NavigationProps, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, Profile, type ProfileProps, type Props, Provider, ProviderContext, Radio, RadioGroup, type RadioGroupComponentProps, type RadioProps, Rating, type RatingProps, Select, SelectAsync, SelectAsyncCreatable, type SelectAsyncCreatableProps, type SelectAsyncProps, SelectCheckbox as SelectCheckBox, SelectCreatable, type SelectCreatableProps, type SelectProps, type SelectWithCheckboxBaseProps, Sidebar, SidebarHeader, type SidebarHeaderProps, SidebarMenu, type SidebarMenuProps, type SidebarProps, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, getSelectAllCheckboxState, getTheme, theme, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|