@ctlyst.id/internal-ui 2.1.20 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.mts CHANGED
@@ -364,6 +364,21 @@ declare const ModalFooter: React__default.ForwardRefExoticComponent<ModalFooterP
364
364
 
365
365
  declare const ModalHeader: React__default.ForwardRefExoticComponent<ModalHeaderProps & React__default.RefAttributes<HTMLDivElement>>;
366
366
 
367
+ interface NavItemProps extends LinkProps, PropsWithChildren {
368
+ isActive?: boolean;
369
+ isChild?: boolean;
370
+ isDisabled?: boolean;
371
+ }
372
+ declare const NavItem: {
373
+ ({ children, isActive, isChild, isDisabled, ...props }: NavItemProps): react_jsx_runtime.JSX.Element;
374
+ displayName: string;
375
+ defaultProps: {
376
+ isActive: boolean;
377
+ isChild: boolean;
378
+ isDisabled: boolean;
379
+ };
380
+ };
381
+
367
382
  type NavigationLink = {
368
383
  title: string;
369
384
  icon?: IconType;
@@ -493,6 +508,32 @@ declare function SelectAsyncCreatable<Option = unknown, IsMulti extends boolean
493
508
  type SelectCreatableProps<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = CreatableProps<Option, IsMulti, Group> & ExtendedSelectProps;
494
509
  declare function SelectCreatable<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ styles, isError, ...rest }: SelectCreatableProps<Option, IsMulti, Group>): react_jsx_runtime.JSX.Element;
495
510
 
511
+ type OptionGroup<Option> = {
512
+ label: string;
513
+ value: string | number | boolean;
514
+ selectAllCheckbox?: boolean;
515
+ } & Partial<Option>;
516
+ type OptionMultiGroup<Option = unknown> = {
517
+ label: string;
518
+ value: string | number | boolean;
519
+ group: string;
520
+ selectAllCheckbox?: boolean;
521
+ } & Partial<Option>;
522
+ type OptionsGroup<Option> = {
523
+ readonly label: string;
524
+ readonly options: readonly OptionMultiGroup<Option>[];
525
+ }[];
526
+ declare const CHECKBOX_STATE: {
527
+ readonly UNCHECKED: 0;
528
+ readonly INDETERMINATE: 1;
529
+ readonly CHECKED: 2;
530
+ };
531
+ declare const getSelectAllCheckboxState: (totalSelected: number, totalOption: number) => 0 | 2 | 1;
532
+ interface SelectWithCheckboxBaseProps<T = OptionGroup<never> | OptionMultiGroup<never>, IsMulti extends boolean = boolean> extends Props$1<T, IsMulti> {
533
+ isError?: boolean;
534
+ }
535
+ declare const SelectCheckbox: <T, IsMulti extends boolean = boolean>(props: SelectWithCheckboxBaseProps<OptionGroup<T>, IsMulti>) => react_jsx_runtime.JSX.Element;
536
+
496
537
  interface SwitchProps extends Omit<UseCheckboxProps, 'isIndeterminate'>, Omit<HTMLChakraProps$1<'label'>, keyof UseCheckboxProps>, ThemingProps$1<'Switch'> {
497
538
  /**
498
539
  * The spacing between the switch and its label text
@@ -553,4 +594,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
553
594
  declare const useInternalUI: () => ProviderContextObject;
554
595
  declare const Provider: FC<ProviderProps>;
555
596
 
556
- 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, 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, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Navigation as MainMenu, ModalBackButton, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, type MultiDatePickerMonthProps, NavigationBar, type NavigationBarProps, type NavigationProps, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, type Props, Provider, ProviderContext, Radio, RadioGroup, type RadioGroupComponentProps, type RadioProps, Rating, type RatingProps, Select, SelectAsync, SelectAsyncCreatable, type SelectAsyncCreatableProps, type SelectAsyncProps, SelectCreatable, type SelectCreatableProps, type SelectProps, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Uploader, type UploaderProps, type UploaderState, getTheme, theme, useAlertStyles, useDataTable, useFetcher, useInternalUI };
597
+ 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, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Navigation as MainMenu, ModalBackButton, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, type MultiDatePickerMonthProps, NavItem, type NavItemProps, NavigationBar, type NavigationBarProps, type NavigationProps, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, 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, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Uploader, type UploaderProps, type UploaderState, getSelectAllCheckboxState, getTheme, theme, useAlertStyles, useDataTable, useFetcher, useInternalUI };
package/dist/index.d.ts CHANGED
@@ -364,6 +364,21 @@ declare const ModalFooter: React__default.ForwardRefExoticComponent<ModalFooterP
364
364
 
365
365
  declare const ModalHeader: React__default.ForwardRefExoticComponent<ModalHeaderProps & React__default.RefAttributes<HTMLDivElement>>;
366
366
 
367
+ interface NavItemProps extends LinkProps, PropsWithChildren {
368
+ isActive?: boolean;
369
+ isChild?: boolean;
370
+ isDisabled?: boolean;
371
+ }
372
+ declare const NavItem: {
373
+ ({ children, isActive, isChild, isDisabled, ...props }: NavItemProps): react_jsx_runtime.JSX.Element;
374
+ displayName: string;
375
+ defaultProps: {
376
+ isActive: boolean;
377
+ isChild: boolean;
378
+ isDisabled: boolean;
379
+ };
380
+ };
381
+
367
382
  type NavigationLink = {
368
383
  title: string;
369
384
  icon?: IconType;
@@ -493,6 +508,32 @@ declare function SelectAsyncCreatable<Option = unknown, IsMulti extends boolean
493
508
  type SelectCreatableProps<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = CreatableProps<Option, IsMulti, Group> & ExtendedSelectProps;
494
509
  declare function SelectCreatable<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ styles, isError, ...rest }: SelectCreatableProps<Option, IsMulti, Group>): react_jsx_runtime.JSX.Element;
495
510
 
511
+ type OptionGroup<Option> = {
512
+ label: string;
513
+ value: string | number | boolean;
514
+ selectAllCheckbox?: boolean;
515
+ } & Partial<Option>;
516
+ type OptionMultiGroup<Option = unknown> = {
517
+ label: string;
518
+ value: string | number | boolean;
519
+ group: string;
520
+ selectAllCheckbox?: boolean;
521
+ } & Partial<Option>;
522
+ type OptionsGroup<Option> = {
523
+ readonly label: string;
524
+ readonly options: readonly OptionMultiGroup<Option>[];
525
+ }[];
526
+ declare const CHECKBOX_STATE: {
527
+ readonly UNCHECKED: 0;
528
+ readonly INDETERMINATE: 1;
529
+ readonly CHECKED: 2;
530
+ };
531
+ declare const getSelectAllCheckboxState: (totalSelected: number, totalOption: number) => 0 | 2 | 1;
532
+ interface SelectWithCheckboxBaseProps<T = OptionGroup<never> | OptionMultiGroup<never>, IsMulti extends boolean = boolean> extends Props$1<T, IsMulti> {
533
+ isError?: boolean;
534
+ }
535
+ declare const SelectCheckbox: <T, IsMulti extends boolean = boolean>(props: SelectWithCheckboxBaseProps<OptionGroup<T>, IsMulti>) => react_jsx_runtime.JSX.Element;
536
+
496
537
  interface SwitchProps extends Omit<UseCheckboxProps, 'isIndeterminate'>, Omit<HTMLChakraProps$1<'label'>, keyof UseCheckboxProps>, ThemingProps$1<'Switch'> {
497
538
  /**
498
539
  * The spacing between the switch and its label text
@@ -553,4 +594,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
553
594
  declare const useInternalUI: () => ProviderContextObject;
554
595
  declare const Provider: FC<ProviderProps>;
555
596
 
556
- 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, 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, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Navigation as MainMenu, ModalBackButton, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, type MultiDatePickerMonthProps, NavigationBar, type NavigationBarProps, type NavigationProps, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, type Props, Provider, ProviderContext, Radio, RadioGroup, type RadioGroupComponentProps, type RadioProps, Rating, type RatingProps, Select, SelectAsync, SelectAsyncCreatable, type SelectAsyncCreatableProps, type SelectAsyncProps, SelectCreatable, type SelectCreatableProps, type SelectProps, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Uploader, type UploaderProps, type UploaderState, getTheme, theme, useAlertStyles, useDataTable, useFetcher, useInternalUI };
597
+ 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, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Navigation as MainMenu, ModalBackButton, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, type MultiDatePickerMonthProps, NavItem, type NavItemProps, NavigationBar, type NavigationBarProps, type NavigationProps, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, 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, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Uploader, type UploaderProps, type UploaderState, getSelectAllCheckboxState, getTheme, theme, useAlertStyles, useDataTable, useFetcher, useInternalUI };