react-asc 23.2.0 → 23.3.2

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.
Files changed (53) hide show
  1. package/components/Alert/Alert.d.ts +1 -1
  2. package/components/AppBar/AppBar.d.ts +2 -2
  3. package/components/AppBar/AppBarTitle.d.ts +1 -1
  4. package/components/Backdrop/Backdrop.d.ts +1 -1
  5. package/components/Badge/Badge.d.ts +2 -2
  6. package/components/Breadcrumb/Breadcrumb.d.ts +1 -1
  7. package/components/Button/Button.d.ts +1 -1
  8. package/components/ButtonGroup/ButtonGroup.d.ts +1 -1
  9. package/components/Card/Card.d.ts +1 -1
  10. package/components/Card/CardBody.d.ts +1 -1
  11. package/components/Card/CardFooter.d.ts +1 -1
  12. package/components/Card/CardImage.d.ts +1 -1
  13. package/components/Card/CardSubtitle.d.ts +1 -1
  14. package/components/Card/CardText.d.ts +1 -1
  15. package/components/Card/CardTitle.d.ts +1 -1
  16. package/components/Checkbox/Checkbox.d.ts +1 -1
  17. package/components/Chip/Chip.d.ts +2 -2
  18. package/components/ConditionalWrapper/ConditionalWrapper.d.ts +1 -1
  19. package/components/CssTransition/CssTransition.d.ts +2 -2
  20. package/components/Drawer/Drawer.d.ts +1 -1
  21. package/components/Form/FormHint/FormHint.d.ts +1 -1
  22. package/components/Form/FormLabel/FormLabel.d.ts +1 -1
  23. package/components/Grid/Column/Column.d.ts +1 -1
  24. package/components/Grid/Row/Row.d.ts +1 -1
  25. package/components/Icon/Icon.d.ts +1 -1
  26. package/components/IconButton/IconButton.d.ts +1 -1
  27. package/components/Link/Link.d.ts +1 -1
  28. package/components/List/List.d.ts +1 -1
  29. package/components/List/ListItem.d.ts +1 -1
  30. package/components/List/ListItemAction.d.ts +1 -1
  31. package/components/List/ListItemAvatar.d.ts +1 -1
  32. package/components/List/ListItemIcon.d.ts +1 -1
  33. package/components/List/ListItemText.d.ts +1 -1
  34. package/components/LoadingIndicator/LoadingIndicator.d.ts +1 -1
  35. package/components/Modal/GlobalModal.d.ts +2 -1
  36. package/components/Sidebar/Sidebar.d.ts +2 -2
  37. package/components/Snackbar/Snackbar.d.ts +1 -1
  38. package/components/Table/TableBody.d.ts +1 -1
  39. package/components/Table/TableCell.d.ts +1 -1
  40. package/components/Table/TableHead.d.ts +1 -1
  41. package/components/Table/TableRow.d.ts +1 -1
  42. package/components/Textarea/Textarea.d.ts +1 -1
  43. package/components/Tooltip/Tooltip.d.ts +1 -1
  44. package/components/TreeView/TreeItem.d.ts +1 -1
  45. package/components/TreeView/TreeView.d.ts +2 -2
  46. package/components/Typography/Typography.d.ts +1 -1
  47. package/hooks/index.d.ts +1 -0
  48. package/hooks/useDebounce.d.ts +1 -1
  49. package/hooks/useOnDestroy.d.ts +1 -0
  50. package/index.es.js +101 -83
  51. package/index.js +101 -82
  52. package/package.json +1 -1
  53. package/readme.md +5 -0
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { VARIANT } from '../component.enums';
3
3
  import { COLOR, SIZE } from '../component.enums';
4
- export interface IAlertProps extends React.ComponentProps<"div"> {
4
+ export interface IAlertProps extends React.ComponentProps<'div'> {
5
5
  children?: ReactNode;
6
6
  className?: string;
7
7
  variant?: VARIANT;
@@ -1,9 +1,9 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { COLOR, SIZE } from '../component.enums';
3
- export interface IAppBarProps extends React.ComponentProps<"nav"> {
3
+ export interface IAppBarProps extends React.ComponentProps<'nav'> {
4
4
  children?: ReactNode;
5
5
  className?: string;
6
- color?: COLOR.primary | COLOR.light;
6
+ color?: COLOR;
7
7
  shadow?: boolean | SIZE.sm | SIZE.md | SIZE.lg;
8
8
  }
9
9
  export declare const AppBar: (props: IAppBarProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- export interface IAppBarTitleProps extends React.ComponentProps<"div"> {
2
+ export interface IAppBarTitleProps extends React.ComponentProps<'div'> {
3
3
  children?: ReactNode;
4
4
  }
5
5
  export declare const AppBarTitle: (props: IAppBarTitleProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface IBackdropProps extends React.ComponentProps<"div"> {
2
+ interface IBackdropProps extends React.ComponentProps<'div'> {
3
3
  target?: HTMLElement;
4
4
  isTransparent?: boolean;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { COLOR } from "../component.enums";
3
- export interface IBadgeProps extends React.ComponentProps<"div"> {
2
+ import { COLOR } from '../component.enums';
3
+ export interface IBadgeProps extends React.ComponentProps<'div'> {
4
4
  color?: COLOR;
5
5
  content?: React.ReactNode;
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- export interface IBreadcrumbProps extends React.ComponentProps<"nav"> {
2
+ export interface IBreadcrumbProps extends React.ComponentProps<'nav'> {
3
3
  children?: ReactNode;
4
4
  }
5
5
  export declare const Breadcrumb: (props: IBreadcrumbProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { COLOR, VARIANT } from '../component.enums';
3
- export interface IButtonProps extends React.ComponentProps<"button"> {
3
+ export interface IButtonProps extends React.ComponentProps<'button'> {
4
4
  color?: COLOR;
5
5
  isActive?: boolean;
6
6
  isRounded?: boolean;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const ButtonGroup: (props: React.ComponentProps<"div">) => JSX.Element;
2
+ export declare const ButtonGroup: (props: React.ComponentProps<'div'>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface ICardProps extends React.ComponentProps<"div"> {
2
+ interface ICardProps extends React.ComponentProps<'div'> {
3
3
  shadow?: boolean;
4
4
  }
5
5
  export declare const Card: (props: ICardProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const CardBody: (props: React.ComponentProps<"div">) => JSX.Element;
2
+ export declare const CardBody: (props: React.ComponentProps<'div'>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const CardFooter: (props: React.ComponentProps<"div">) => JSX.Element;
2
+ export declare const CardFooter: (props: React.ComponentProps<'div'>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const CardImage: (props: React.ComponentProps<"img">) => JSX.Element;
2
+ export declare const CardImage: (props: React.ComponentProps<'img'>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const CardSubtitle: (props: React.ComponentProps<"div">) => JSX.Element;
2
+ export declare const CardSubtitle: (props: React.ComponentProps<'div'>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const CardText: (props: React.ComponentProps<"p">) => JSX.Element;
2
+ export declare const CardText: (props: React.ComponentProps<'p'>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface ICardTitleProps extends React.ComponentProps<"div"> {
2
+ interface ICardTitleProps extends React.ComponentProps<'div'> {
3
3
  as?: any;
4
4
  }
5
5
  export declare const CardTitle: (props: ICardTitleProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface ICheckboxProps extends React.ComponentProps<"input"> {
2
+ export interface ICheckboxProps extends React.ComponentProps<'input'> {
3
3
  label?: string;
4
4
  value?: string;
5
5
  onKeyDown?: (event: React.KeyboardEvent) => void;
@@ -1,6 +1,6 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  import { COLOR } from '../component.enums';
3
- export interface IChipProps extends React.ComponentProps<"div"> {
3
+ export interface IChipProps extends React.ComponentProps<'div'> {
4
4
  color?: COLOR;
5
5
  shadow?: boolean;
6
6
  onClick?: (e: React.MouseEvent<Element>) => void;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  interface IConditionalWrapperProps {
3
3
  condition: boolean;
4
4
  wrapper: (children: React.ReactNode) => JSX.Element;
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  interface ICssTransitionProps {
3
3
  className: string;
4
4
  children: React.ReactNode;
5
- show: boolean | undefined;
5
+ show: boolean;
6
6
  }
7
7
  export declare const CssTransition: (props: ICssTransitionProps) => JSX.Element;
8
8
  export {};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface IDrawerProps extends React.ComponentProps<"div"> {
2
+ export interface IDrawerProps extends React.ComponentProps<'div'> {
3
3
  position?: 'left' | 'right';
4
4
  shadow?: boolean;
5
5
  onClickBackdrop?: () => void;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const FormHint: (props: React.ComponentProps<"small">) => JSX.Element;
2
+ export declare const FormHint: (props: React.ComponentProps<'small'>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const FormLabel: ({ children, className, htmlFor, ...rest }: React.ComponentProps<"label">) => JSX.Element;
2
+ export declare const FormLabel: ({ children, className, htmlFor, ...rest }: React.ComponentProps<'label'>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface IColProps extends React.ComponentProps<"div"> {
2
+ interface IColProps extends React.ComponentProps<'div'> {
3
3
  xs?: number;
4
4
  sm?: number;
5
5
  md?: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface IContainerProps extends React.ComponentProps<"div"> {
2
+ export interface IContainerProps extends React.ComponentProps<'div'> {
3
3
  direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
4
4
  }
5
5
  export declare const Row: ({ children, direction, className, ...rest }: IContainerProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { COLOR } from '../component.enums';
3
- export interface IIconProps extends ComponentProps<"div"> {
3
+ export interface IIconProps extends ComponentProps<'div'> {
4
4
  iconColor?: COLOR;
5
5
  }
6
6
  export declare const Icon: (props: IIconProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { COLOR, SIZE, VARIANT } from '../component.enums';
3
- export interface IIconButtonProps extends React.ComponentProps<"button"> {
3
+ export interface IIconButtonProps extends React.ComponentProps<'button'> {
4
4
  icon?: React.SVGProps<SVGSVGElement>;
5
5
  color?: COLOR;
6
6
  size?: SIZE;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const Link: (props: React.ComponentProps<"a">) => JSX.Element;
2
+ export declare const Link: (props: React.ComponentProps<'a'>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface IListProps extends React.ComponentProps<"ul"> {
2
+ export interface IListProps extends React.ComponentProps<'ul'> {
3
3
  isFlush?: boolean;
4
4
  }
5
5
  export declare const List: (props: IListProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { COLOR } from '../component.enums';
3
- export interface IListItemProps extends React.ComponentProps<"li"> {
3
+ export interface IListItemProps extends React.ComponentProps<'li'> {
4
4
  color?: COLOR;
5
5
  active?: boolean;
6
6
  isHoverable?: boolean;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const ListItemAction: ({ children, onClick, ...rest }: React.ComponentProps<"div">) => JSX.Element;
2
+ export declare const ListItemAction: ({ children, onClick, ...rest }: React.ComponentProps<'div'>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface IListItemAvatarProps extends React.ComponentProps<"div"> {
2
+ interface IListItemAvatarProps extends React.ComponentProps<'div'> {
3
3
  avatar: React.SVGProps<SVGSVGElement> | React.ImgHTMLAttributes<HTMLImageElement>;
4
4
  }
5
5
  export declare const ListItemAvatar: ({ avatar, ...rest }: IListItemAvatarProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface IListItemIconProps extends React.ComponentProps<"div"> {
2
+ interface IListItemIconProps extends React.ComponentProps<'div'> {
3
3
  icon: React.SVGProps<SVGSVGElement>;
4
4
  }
5
5
  export declare const ListItemIcon: ({ icon, ...rest }: IListItemIconProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- interface IListItemTextProps extends React.ComponentProps<"div"> {
2
+ interface IListItemTextProps extends React.ComponentProps<'div'> {
3
3
  primary: ReactNode;
4
4
  secondary?: ReactNode;
5
5
  }
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const LoadingIndicator: ({ ...rest }: React.ComponentProps<"div">) => JSX.Element;
2
+ export declare const LoadingIndicator: ({ ...rest }: React.ComponentProps<'div'>) => JSX.Element;
@@ -10,10 +10,11 @@ interface IModalProps {
10
10
  modalType?: MODALTYPE;
11
11
  onOk?: (values?: IFormValues) => void;
12
12
  onCancel?: () => void;
13
+ onBackdropClick?: () => void;
13
14
  isDismissable?: boolean;
14
15
  buttons?: Array<IModalButton>;
15
16
  fullScreen?: boolean;
16
17
  size?: SIZE;
17
18
  }
18
- export declare const GlobalModal: ({ title, description, formControls, onOk, onCancel, isDismissable, buttons, size, fullScreen }: IModalProps) => JSX.Element;
19
+ export declare const GlobalModal: ({ title, description, formControls, onOk, onCancel, onBackdropClick, isDismissable, buttons, size, fullScreen }: IModalProps) => JSX.Element;
19
20
  export {};
@@ -1,6 +1,6 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  import { ISidebarItem } from './sidebar.interfaces';
3
- interface ISidebarProps extends React.ComponentProps<"nav"> {
3
+ interface ISidebarProps extends React.ComponentProps<'nav'> {
4
4
  items: Array<ISidebarItem>;
5
5
  currentUrl: string;
6
6
  onItemClicked: (path: string) => void;
@@ -1,6 +1,6 @@
1
1
  import React, { ComponentProps } from 'react';
2
2
  import { COLOR } from '../component.enums';
3
- export interface ISnackbarProps extends ComponentProps<"div"> {
3
+ export interface ISnackbarProps extends ComponentProps<'div'> {
4
4
  color?: COLOR;
5
5
  actionText?: string;
6
6
  onOk?: (e: React.MouseEvent) => void;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const TableBody: (props: React.ComponentProps<"tbody">) => JSX.Element;
2
+ export declare const TableBody: (props: React.ComponentProps<'tbody'>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface ITableCellProps extends React.ComponentProps<"th">, React.ComponentProps<"td"> {
2
+ export interface ITableCellProps extends React.ComponentProps<'th'>, React.ComponentProps<'td'> {
3
3
  component?: 'th';
4
4
  }
5
5
  export declare const TableCell: (props: ITableCellProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const TableHead: (props: React.ComponentProps<"thead">) => JSX.Element;
2
+ export declare const TableHead: (props: React.ComponentProps<'thead'>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const TableRow: (props: React.ComponentProps<"tr">) => JSX.Element;
2
+ export declare const TableRow: (props: React.ComponentProps<'tr'>) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface ITextareaProps extends React.ComponentProps<"textarea"> {
2
+ export interface ITextareaProps extends React.ComponentProps<'textarea'> {
3
3
  error?: boolean;
4
4
  }
5
5
  export declare const Textarea: (props: ITextareaProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface ITooltipProps extends React.ComponentProps<"div"> {
2
+ export interface ITooltipProps extends React.ComponentProps<'div'> {
3
3
  placement?: 'top' | 'bottom' | 'right' | 'left';
4
4
  text?: string;
5
5
  }
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export interface ITreeItemProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLLIElement>, HTMLLIElement> {
3
3
  nodeId?: string;
4
4
  label?: string;
@@ -1,2 +1,2 @@
1
- import React from "react";
2
- export declare const TreeView: (props: React.ComponentProps<"ul">) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const TreeView: (props: React.ComponentProps<'ul'>) => JSX.Element;
@@ -5,7 +5,7 @@ export interface IWrapperProps {
5
5
  className?: string;
6
6
  wrap?: boolean;
7
7
  }
8
- export interface ITypographyProps extends React.ComponentProps<"span"> {
8
+ export interface ITypographyProps extends React.ComponentProps<'span'> {
9
9
  as?: string;
10
10
  wrap?: boolean;
11
11
  }
package/hooks/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './useCssClasses';
4
4
  export * from './useHover';
5
5
  export * from './useMobileDetect';
6
6
  export * from './useWindowSize';
7
+ export * from './useOnDestroy';
@@ -1,2 +1,2 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export declare function useDebounce(callback: () => void, timeout: number, deps: React.DependencyList): void;
@@ -0,0 +1 @@
1
+ export declare const useOnDestroy: (callBack: () => void) => void;