@livechat/design-system-react-components 1.17.1 → 1.18.0
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.
- package/dist/components/Skeleton/SkeletonAvatar.d.ts +16 -0
- package/dist/components/Skeleton/SkeletonText.d.ts +16 -0
- package/dist/components/Skeleton/SkeletonWrapper.d.ts +16 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Tag/Tag.d.ts +1 -48
- package/dist/components/Tag/index.d.ts +1 -1
- package/dist/components/Tag/types.d.ts +52 -0
- package/dist/components/TagInput/TagInput.d.ts +2 -39
- package/dist/components/TagInput/{EditableTag.d.ts → components/EditableTag.d.ts} +2 -0
- package/dist/components/TagInput/components/EmailTagInput.d.ts +5 -0
- package/dist/components/TagInput/index.d.ts +3 -3
- package/dist/components/TagInput/types.d.ts +41 -0
- package/dist/components/Typography/Display.d.ts +5 -1
- package/dist/components/Typography/Heading.d.ts +5 -1
- package/dist/components/Typography/Text.d.ts +5 -1
- package/dist/components/Typography/types.d.ts +1 -0
- package/dist/foundations/design-token.d.ts +23 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1501 -1472
- package/dist/preview-stats.json +507 -507
- package/dist/style.css +1 -1
- package/package.json +4 -3
- package/dist/components/TagInput/EmailTagInput.d.ts +0 -5
- /package/dist/components/TagInput/{EditableTagContent.d.ts → components/EditableTagContent.d.ts} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ISkeletonAvatar {
|
|
3
|
+
/**
|
|
4
|
+
* Specify if the element is square shape
|
|
5
|
+
*/
|
|
6
|
+
square?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Specify the size of the element (wdith and height in px)
|
|
9
|
+
*/
|
|
10
|
+
size?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Specify if the animation is enabled
|
|
13
|
+
*/
|
|
14
|
+
animated?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const SkeletonAvatar: React.FC<ISkeletonAvatar>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ISkeletonText {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the height of the element
|
|
5
|
+
*/
|
|
6
|
+
height?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Specify the width of the element
|
|
9
|
+
*/
|
|
10
|
+
width?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Specify if the animation is enabled
|
|
13
|
+
*/
|
|
14
|
+
animated?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const SkeletonText: React.FC<ISkeletonText>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ISkeletonWrapper extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The children elements to be wrapped by the skeleton wrapper
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Specify if the skeleton wrapper should display children elements vertically
|
|
9
|
+
*/
|
|
10
|
+
vertical?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Specify if the animation is enabled, it will be passed to the children skeleton components
|
|
13
|
+
*/
|
|
14
|
+
animated?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const SkeletonWrapper: React.FC<ISkeletonWrapper>;
|
|
@@ -1,50 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/**
|
|
5
|
-
* Specify the tag kind
|
|
6
|
-
*/
|
|
7
|
-
kind?: TagKind;
|
|
8
|
-
/**
|
|
9
|
-
* Specify the tag size
|
|
10
|
-
*/
|
|
11
|
-
size?: TagSize;
|
|
12
|
-
/**
|
|
13
|
-
* Set the tag custom color
|
|
14
|
-
*/
|
|
15
|
-
customColor?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Set to show close icon
|
|
18
|
-
* @deprecated The close icon will be visible by providing the `onRemove` prop and this flag will no longer be needed
|
|
19
|
-
*/
|
|
20
|
-
dismissible?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Set to show close icon on hover only if the `onRemove` prop is provided
|
|
23
|
-
*/
|
|
24
|
-
dismissibleOnHover?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Set to hide close icon if the `onRemove` prop is provided
|
|
27
|
-
*/
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Outlined version of tag
|
|
31
|
-
*/
|
|
32
|
-
outline?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The event handler for close icon click, if provided the close icon will be visible
|
|
35
|
-
*/
|
|
36
|
-
onRemove?(e: React.MouseEvent): void;
|
|
37
|
-
/**
|
|
38
|
-
* React node element to show on the left
|
|
39
|
-
*/
|
|
40
|
-
leftNode?: React.ReactElement;
|
|
41
|
-
/**
|
|
42
|
-
* React node element to show on the right
|
|
43
|
-
*/
|
|
44
|
-
rightNode?: React.ReactElement;
|
|
45
|
-
/**
|
|
46
|
-
* Set to show the tag as square (only if you want use icon without text)
|
|
47
|
-
*/
|
|
48
|
-
iconOnly?: boolean;
|
|
49
|
-
}
|
|
2
|
+
import { TagProps } from './types';
|
|
50
3
|
export declare const Tag: React.FC<React.PropsWithChildren<TagProps>>;
|
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { kinds, sizes } from './constants';
|
|
2
3
|
export type TagKind = (typeof kinds)[number];
|
|
3
4
|
export type TagSize = (typeof sizes)[number];
|
|
5
|
+
export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Specify the tag kind
|
|
8
|
+
*/
|
|
9
|
+
kind?: TagKind;
|
|
10
|
+
/**
|
|
11
|
+
* Specify the tag size
|
|
12
|
+
*/
|
|
13
|
+
size?: TagSize;
|
|
14
|
+
/**
|
|
15
|
+
* Set the tag custom color
|
|
16
|
+
*/
|
|
17
|
+
customColor?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Set to show close icon
|
|
20
|
+
* @deprecated The close icon will be visible by providing the `onRemove` prop and this flag will no longer be needed
|
|
21
|
+
*/
|
|
22
|
+
dismissible?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Set to show close icon on hover only if the `onRemove` prop is provided
|
|
25
|
+
*/
|
|
26
|
+
dismissibleOnHover?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Set to hide close icon if the `onRemove` prop is provided
|
|
29
|
+
*/
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Outlined version of tag
|
|
33
|
+
*/
|
|
34
|
+
outline?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The event handler for close icon click, if provided the close icon will be visible
|
|
37
|
+
*/
|
|
38
|
+
onRemove?(e: React.MouseEvent): void;
|
|
39
|
+
/**
|
|
40
|
+
* React node element to show on the left
|
|
41
|
+
*/
|
|
42
|
+
leftNode?: React.ReactElement;
|
|
43
|
+
/**
|
|
44
|
+
* React node element to show on the right
|
|
45
|
+
*/
|
|
46
|
+
rightNode?: React.ReactElement;
|
|
47
|
+
/**
|
|
48
|
+
* Set to show the tag as square (only if you want use icon without text)
|
|
49
|
+
*/
|
|
50
|
+
iconOnly?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Set text value for the tag. You can use this or `children` prop. If both are provided, `value` prop will be used.
|
|
53
|
+
*/
|
|
54
|
+
value?: string;
|
|
55
|
+
}
|
|
@@ -1,40 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Set the id for input
|
|
5
|
-
*/
|
|
6
|
-
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Set the error message
|
|
9
|
-
*/
|
|
10
|
-
error?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Array of defined tags
|
|
13
|
-
*/
|
|
14
|
-
tags?: string[];
|
|
15
|
-
/**
|
|
16
|
-
* The event handler for modify tags array
|
|
17
|
-
*/
|
|
18
|
-
onChange: (tags: string[]) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Set the input placeholder
|
|
21
|
-
*/
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Set the custom validation for provided items
|
|
25
|
-
*/
|
|
26
|
-
validator?: (val: string) => boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Specify the input size
|
|
29
|
-
*/
|
|
30
|
-
size?: 'medium' | 'large';
|
|
31
|
-
/**
|
|
32
|
-
* Set the input custom class
|
|
33
|
-
*/
|
|
34
|
-
inputClassName?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Add Tag on blur
|
|
37
|
-
*/
|
|
38
|
-
addOnBlur?: boolean;
|
|
39
|
-
}
|
|
40
|
-
export declare const TagInput: React.FC<TagInputProps>;
|
|
2
|
+
import { TagInputProps, TagInputValues } from './types';
|
|
3
|
+
export declare const TagInput: <T extends TagInputValues>({ id, tags, onChange, validator, error, placeholder, size, className, inputClassName, onBlur, addOnBlur, ...props }: TagInputProps<T>) => React.ReactElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { TagProps } from '../../Tag';
|
|
2
3
|
export interface EditableTagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
4
5
|
index: number;
|
|
@@ -7,5 +8,6 @@ export interface EditableTagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
8
|
validator?: (val: string) => boolean;
|
|
8
9
|
children: string;
|
|
9
10
|
size: 'medium' | 'large';
|
|
11
|
+
tagProps?: TagProps;
|
|
10
12
|
}
|
|
11
13
|
export declare const EditableTag: React.FC<EditableTagProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TagInputProps, TagInputValues } from '../types';
|
|
3
|
+
export type EmailTagInputProps<T> = Omit<TagInputProps<T>, 'validator'>;
|
|
4
|
+
export declare const emailRegex: RegExp;
|
|
5
|
+
export declare const EmailTagInput: <T extends TagInputValues>({ placeholder, ...props }: EmailTagInputProps<T>) => React.ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { TagInput } from './TagInput';
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
2
|
+
export { EmailTagInput } from './components/EmailTagInput';
|
|
3
|
+
export type { EmailTagInputProps } from './components/EmailTagInput';
|
|
4
|
+
export type { TagInputProps } from './types';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TagProps } from '../Tag';
|
|
3
|
+
export interface TagInputProps<T> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* Set the id for input
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Set the error message
|
|
10
|
+
*/
|
|
11
|
+
error?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Array of defined tags
|
|
14
|
+
*/
|
|
15
|
+
tags?: T[];
|
|
16
|
+
/**
|
|
17
|
+
* The event handler for modify tags array
|
|
18
|
+
*/
|
|
19
|
+
onChange: (tags: T[]) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Set the input placeholder
|
|
22
|
+
*/
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Set the custom validation for provided items
|
|
26
|
+
*/
|
|
27
|
+
validator?: (val: string) => boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Specify the input size
|
|
30
|
+
*/
|
|
31
|
+
size?: 'medium' | 'large';
|
|
32
|
+
/**
|
|
33
|
+
* Set the input custom class
|
|
34
|
+
*/
|
|
35
|
+
inputClassName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Add Tag on blur
|
|
38
|
+
*/
|
|
39
|
+
addOnBlur?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export type TagInputValues = string | Omit<TagProps, 'onRemove' | 'dismissible'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TDisplaySize } from './types';
|
|
2
|
+
import { TDisplaySize, TTextAlign } from './types';
|
|
3
3
|
interface IProps {
|
|
4
4
|
/** Size of the text */
|
|
5
5
|
size?: TDisplaySize;
|
|
@@ -7,6 +7,10 @@ interface IProps {
|
|
|
7
7
|
as?: string;
|
|
8
8
|
/** Optional custom className */
|
|
9
9
|
className?: string;
|
|
10
|
+
/** Optional prop to set the custom color */
|
|
11
|
+
customColor?: string;
|
|
12
|
+
/** Optional prop to set the text align */
|
|
13
|
+
textAlign?: TTextAlign;
|
|
10
14
|
}
|
|
11
15
|
export declare const Display: React.FC<React.PropsWithChildren<IProps>>;
|
|
12
16
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { THeadingSize } from './types';
|
|
2
|
+
import { THeadingSize, TTextAlign } from './types';
|
|
3
3
|
interface IProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
size?: THeadingSize;
|
|
5
5
|
/** DOM element name that will be rendered */
|
|
@@ -10,6 +10,10 @@ interface IProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
10
10
|
uppercase?: boolean;
|
|
11
11
|
/** Optional prop to set the bold */
|
|
12
12
|
bold?: boolean;
|
|
13
|
+
/** Optional prop to set the custom color */
|
|
14
|
+
customColor?: string;
|
|
15
|
+
/** Optional prop to set the text align */
|
|
16
|
+
textAlign?: TTextAlign;
|
|
13
17
|
}
|
|
14
18
|
export declare const Heading: React.FC<React.PropsWithChildren<IProps>>;
|
|
15
19
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TTextSize } from './types';
|
|
2
|
+
import { TTextAlign, TTextSize } from './types';
|
|
3
3
|
interface IProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** DOM element name that will be rendered */
|
|
5
5
|
as?: string;
|
|
@@ -20,6 +20,10 @@ interface IProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
20
20
|
underline?: boolean;
|
|
21
21
|
/** Optional prop to set the strike */
|
|
22
22
|
strike?: boolean;
|
|
23
|
+
/** Optional prop to set the custom color */
|
|
24
|
+
customColor?: string;
|
|
25
|
+
/** Optional prop to set the text align */
|
|
26
|
+
textAlign?: TTextAlign;
|
|
23
27
|
}
|
|
24
28
|
export declare const Text: React.FC<React.PropsWithChildren<IProps>>;
|
|
25
29
|
export {};
|
|
@@ -40,6 +40,18 @@ export declare const DesignToken: {
|
|
|
40
40
|
SurfaceAccentEmphasisMinWarning: string;
|
|
41
41
|
SurfaceAccentEmphasisMinPositive: string;
|
|
42
42
|
SurfaceAccentEmphasisMinPurple: string;
|
|
43
|
+
SurfaceAccentOndarkNegativeDefault: string;
|
|
44
|
+
SurfaceAccentOndarkNegativeHover: string;
|
|
45
|
+
SurfaceAccentOndarkWarningDefault: string;
|
|
46
|
+
SurfaceAccentOndarkWarningHover: string;
|
|
47
|
+
SurfaceAccentOndarkInfoDefault: string;
|
|
48
|
+
SurfaceAccentOndarkInfoHover: string;
|
|
49
|
+
SurfaceAccentOndarkPositiveDefault: string;
|
|
50
|
+
SurfaceAccentOndarkPositiveHover: string;
|
|
51
|
+
SurfaceAccentEmphasisSubtleNegative: string;
|
|
52
|
+
SurfaceAccentEmphasisSubtleWarning: string;
|
|
53
|
+
SurfaceAccentEmphasisSubtleInfo: string;
|
|
54
|
+
SurfaceAccentEmphasisSubtlePositive: string;
|
|
43
55
|
SurfaceInvertDefault: string;
|
|
44
56
|
SurfaceInvertPrimary: string;
|
|
45
57
|
SurfaceInvertSubtle: string;
|
|
@@ -70,10 +82,16 @@ export declare const DesignToken: {
|
|
|
70
82
|
SurfaceGradient09: string;
|
|
71
83
|
SurfaceGradient10: string;
|
|
72
84
|
SurfaceGradient11: string;
|
|
85
|
+
SurfaceGradient12: string;
|
|
86
|
+
SurfaceGradient13: string;
|
|
73
87
|
SurfaceOtherOverlay: string;
|
|
74
88
|
SurfaceOtherAgent: string;
|
|
75
89
|
SurfaceOtherAgentHover: string;
|
|
76
90
|
SurfaceOtherSkeleton: string;
|
|
91
|
+
SurfaceOtherInternalNote: string;
|
|
92
|
+
SurfaceOtherInternalNoteHover: string;
|
|
93
|
+
SurfaceOtherVisitor: string;
|
|
94
|
+
SurfaceOtherVisitorHover: string;
|
|
77
95
|
ContentDefault: string;
|
|
78
96
|
ContentBasicPrimary: string;
|
|
79
97
|
ContentSubtle: string;
|
|
@@ -236,6 +254,8 @@ export declare const DesignToken: {
|
|
|
236
254
|
DecorPurple200: string;
|
|
237
255
|
DecorPurple100: string;
|
|
238
256
|
DecorPurple50: string;
|
|
257
|
+
DecorBrown50: string;
|
|
258
|
+
DecorBrown300: string;
|
|
239
259
|
ProductsLivechat: string;
|
|
240
260
|
ProductsHelpdesk: string;
|
|
241
261
|
ProductsChatbot: string;
|
|
@@ -276,5 +296,8 @@ export declare const DesignToken: {
|
|
|
276
296
|
SurfaceAvatar10: string;
|
|
277
297
|
NavbarBackground: string;
|
|
278
298
|
TooltipBorder: string;
|
|
299
|
+
AnimatedGradientValue1: string;
|
|
300
|
+
AnimatedGradientValue2: string;
|
|
301
|
+
AnimatedGradientValue3: string;
|
|
279
302
|
};
|
|
280
303
|
export type DesignTokenKey = keyof typeof DesignToken;
|