@livechat/design-system-react-components 1.0.0-beta.7-rc.1 → 1.0.0-beta.8

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.
@@ -1,24 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import { Placement } from '@floating-ui/react-dom';
3
+ import { IActionMenuOption } from './types';
3
4
  export interface ActionMenuProps {
4
5
  /**
5
6
  * The CSS class for menu container
6
7
  */
7
8
  className?: string;
8
9
  /**
9
- * The CSS class for wrapper container
10
+ * The CSS class for trigger element
10
11
  */
11
- wrapperClassName?: string;
12
+ triggerClassName?: string;
12
13
  /**
13
14
  * Array of menu options
14
15
  */
15
- options: Array<{
16
- key: string;
17
- element: React.ReactNode;
18
- disabled?: boolean;
19
- withDivider?: boolean;
20
- onClick: () => void;
21
- }>;
16
+ options: IActionMenuOption[];
22
17
  /**
23
18
  * Trigger element
24
19
  */
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface IActionMenuOption {
3
+ key: string;
4
+ element: React.ReactNode;
5
+ groupHeader?: boolean;
6
+ disabled?: boolean;
7
+ withDivider?: boolean;
8
+ onClick?: () => void;
9
+ }
@@ -59,5 +59,5 @@ export declare const Button: React.ForwardRefExoticComponent<{
59
59
  /**
60
60
  * Specify the place to render element given in `icon` prop
61
61
  */
62
- iconPosition?: "left" | "right" | undefined;
62
+ iconPosition?: "right" | "left" | undefined;
63
63
  } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLButtonElement & HTMLAnchorElement>>;
@@ -7,7 +7,7 @@ declare const _default: import("@storybook/types").ComponentAnnotations<import("
7
7
  fullWidth?: boolean | undefined;
8
8
  loaderLabel?: string | undefined;
9
9
  icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
10
- iconPosition?: "left" | "right" | undefined;
10
+ iconPosition?: "right" | "left" | undefined;
11
11
  } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLButtonElement & HTMLAnchorElement>>;
12
12
  export default _default;
13
13
  export declare const Default: {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ModalBaseProps } from './ModalBase';
2
+ import { ModalBaseProps } from './components/ModalBase';
3
3
  export interface ModalProps extends ModalBaseProps {
4
4
  /**
5
5
  * Header element. For consistent UI use `<ModalHeader/>`
@@ -17,5 +17,9 @@ export interface ModalProps extends ModalBaseProps {
17
17
  * Footer element
18
18
  */
19
19
  footer?: React.ReactNode;
20
+ /**
21
+ * Class name for the content container
22
+ */
23
+ contentClassName?: string;
20
24
  }
21
25
  export declare const Modal: React.FC<ModalProps>;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ButtonProps } from '../Button';
2
+ import { ButtonProps } from '../../Button';
3
3
  export interface ModalCloseButtonProps extends ButtonProps {
4
4
  labelType?: boolean;
5
5
  customColor?: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { IconProps } from '../Icon';
2
+ import { IconProps } from '../../Icon';
3
3
  export interface ModalHeaderProps {
4
4
  title?: React.ReactNode;
5
5
  iconProps?: IconProps;
@@ -1,10 +1,10 @@
1
1
  export { Modal } from './Modal';
2
- export { ModalBase } from './ModalBase';
3
- export { ModalCloseButton } from './ModalCloseButton';
4
- export { ModalPortal } from './ModalPortal';
5
- export { ModalHeader } from './ModalHeader';
2
+ export { ModalBase } from './components/ModalBase';
3
+ export { ModalCloseButton } from './components/ModalCloseButton';
4
+ export { ModalPortal } from './components/ModalPortal';
5
+ export { ModalHeader } from './components/ModalHeader';
6
6
  export type { ModalProps } from './Modal';
7
- export type { ModalBaseProps } from './ModalBase';
8
- export type { ModalCloseButtonProps } from './ModalCloseButton';
9
- export type { ModalPortalProps } from './ModalPortal';
10
- export type { ModalHeaderProps } from './ModalHeader';
7
+ export type { ModalBaseProps } from './components/ModalBase';
8
+ export type { ModalCloseButtonProps } from './components/ModalCloseButton';
9
+ export type { ModalPortalProps } from './components/ModalPortal';
10
+ export type { ModalHeaderProps } from './components/ModalHeader';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { IconSize, IconSource } from '../Icon';
2
+ import { IconSize } from '../Icon';
3
3
  export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /**
5
5
  * Specify the tag kind
@@ -30,17 +30,12 @@ export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
30
30
  */
31
31
  onRemove?(): void;
32
32
  /**
33
- * Pass the icon to show it on the left
33
+ * React node element to show on the left
34
34
  */
35
- leftIcon?: IconSource;
35
+ leftNode?: React.ReactElement;
36
36
  /**
37
- * Pass the icon to show it on the right
37
+ * React node element to show on the right
38
38
  */
39
- rightIcon?: IconSource;
40
- /**
41
- /**
42
- * Pass the image source to show it as avatar
43
- */
44
- avatar?: string;
39
+ rightNode?: React.ReactElement;
45
40
  }
46
41
  export declare const Tag: React.FC<React.PropsWithChildren<TagProps>>;
@@ -12,14 +12,15 @@ export declare const Kinds: {
12
12
  ({ children, ...args }: TagProps): React.ReactElement;
13
13
  args: {
14
14
  children: string;
15
- leftIcon: any;
15
+ leftNode: React.JSX.Element;
16
+ rightNode: React.JSX.Element;
16
17
  };
17
18
  };
18
19
  export declare const Sizes: {
19
20
  ({ children, ...args }: TagProps): React.ReactElement;
20
21
  args: {
21
22
  children: string;
22
- leftIcon: any;
23
- rightIcon: any;
23
+ leftNode: React.JSX.Element;
24
+ rightNode: React.JSX.Element;
24
25
  };
25
26
  };