@livechat/design-system-react-components 1.0.0-beta.2 → 1.0.0-beta.4

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,2 +1,3 @@
1
+ export declare function getBackgroundColor(initials: string): string | undefined;
1
2
  export declare function getInitials(name?: string, count?: number): string;
2
3
  export declare function getFontColor(color: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  export type IconSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
3
- export type IconKind = 'primary' | 'subtle' | 'inverted' | 'inverted-subtle' | 'link' | 'success' | 'warning' | 'error' | 'negative' | 'positive' | 'warning' | 'action-primary' | 'action-negative' | 'action-positive' | 'action-warning' | 'action-neutral';
3
+ export type IconKind = 'primary' | 'subtle' | 'inverted' | 'inverted-subtle' | 'link' | 'success' | 'warning' | 'error' | 'negative' | 'positive' | 'action-primary' | 'action-negative' | 'action-positive' | 'action-warning' | 'action-neutral';
4
4
  export type IconSource = React.FC<React.SVGProps<SVGSVGElement>> & React.ReactElement;
5
5
  export interface IconProps {
6
6
  /**
@@ -20,6 +20,10 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
20
20
  * Set the icon and its position
21
21
  */
22
22
  icon?: InputIcon;
23
+ /**
24
+ * Set to enable ellipsis
25
+ */
26
+ cropOnBlur?: boolean;
23
27
  }
24
28
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
25
29
  export {};
@@ -30,9 +30,14 @@ export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
30
30
  */
31
31
  onRemove?(): void;
32
32
  /**
33
- * Pass the icon to show it
33
+ * Pass the icon to show it on the left
34
34
  */
35
- icon?: IconSource;
35
+ leftIcon?: IconSource;
36
+ /**
37
+ * Pass the icon to show it on the right
38
+ */
39
+ rightIcon?: IconSource;
40
+ /**
36
41
  /**
37
42
  * Pass the image source to show it as avatar
38
43
  */
@@ -12,13 +12,14 @@ export declare const Kinds: {
12
12
  ({ children, ...args }: TagProps): React.ReactElement;
13
13
  args: {
14
14
  children: string;
15
- icon: any;
15
+ leftIcon: any;
16
16
  };
17
17
  };
18
18
  export declare const Sizes: {
19
19
  ({ children, ...args }: TagProps): React.ReactElement;
20
20
  args: {
21
21
  children: string;
22
- icon: any;
22
+ leftIcon: any;
23
+ rightIcon: any;
23
24
  };
24
25
  };
@@ -11,7 +11,7 @@ export declare const ToastWrapper: {
11
11
  toasts: ({
12
12
  id: string;
13
13
  kind: string;
14
- content: React.JSX.Element;
14
+ content: string;
15
15
  removable?: undefined;
16
16
  action?: undefined;
17
17
  } | {
@@ -29,12 +29,6 @@ export declare const ToastWrapper: {
29
29
  handler: () => void;
30
30
  };
31
31
  removable?: undefined;
32
- } | {
33
- id: string;
34
- kind: string;
35
- content: string;
36
- removable?: undefined;
37
- action?: undefined;
38
32
  })[];
39
33
  };
40
34
  };
@@ -1,3 +1,4 @@
1
1
  export { Tooltip } from './Tooltip';
2
2
  export { Simple, Info, Interactive, Reports } from './components';
3
3
  export { UserGuide } from './components/UserGuide';
4
+ export type { ITooltipProps } from './types';