@livechat/design-system-react-components 1.0.0-alpha.53 → 1.0.0-alpha.55
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/dsrc.cjs.js +10 -7
- package/dist/dsrc.es.js +242 -199
- package/dist/dsrc.umd.js +10 -7
- package/dist/shadow/color-scheme.css +14 -0
- package/dist/shadow/color-scheme.css.map +1 -0
- package/dist/shadow/spacing.css +1 -0
- package/dist/shadow/spacing.css.map +1 -1
- package/dist/spacing/color-scheme.css +14 -0
- package/dist/spacing/color-scheme.css.map +1 -0
- package/dist/spacing/spacing.css +1 -0
- package/dist/spacing/spacing.css.map +1 -1
- package/dist/src/components/Alert/Alert.d.ts +14 -0
- package/dist/src/components/Button/Button.d.ts +1 -1
- package/dist/src/components/Card/Card.d.ts +18 -0
- package/dist/src/components/Input/Input.d.ts +13 -2
- package/dist/src/components/Picker/Picker.d.ts +8 -0
- package/dist/src/components/Picker/Trigger.d.ts +1 -0
- package/dist/src/components/PromoBanner/PromoBanner.d.ts +27 -0
- package/dist/src/components/Search/Search.d.ts +24 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +21 -0
- package/dist/src/components/Tag/Tag.d.ts +27 -0
- package/dist/src/components/TagInput/TagInput.d.ts +23 -4
- package/dist/src/foundations/spacing-token.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/foundations/color-scheme.css"],"names":[],"mappings":"AAAA;AAAA;EAEE;;;AAGF;EACE;;;AAGF;EACE","file":"color-scheme.css"}
|
package/dist/shadow/spacing.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/foundations/spacing.css"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"spacing.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/foundations/spacing.css"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"spacing.css"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/foundations/color-scheme.css"],"names":[],"mappings":"AAAA;AAAA;EAEE;;;AAGF;EACE;;;AAGF;EACE","file":"color-scheme.css"}
|
package/dist/spacing/spacing.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/foundations/spacing.css"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"spacing.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/foundations/spacing.css"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"spacing.css"}
|
|
@@ -9,6 +9,20 @@ export interface AlertProps {
|
|
|
9
9
|
* Specify the kind of Alert
|
|
10
10
|
*/
|
|
11
11
|
kind?: AlertKind;
|
|
12
|
+
/**
|
|
13
|
+
* Shows the primary CTA button
|
|
14
|
+
*/
|
|
15
|
+
primaryButton?: {
|
|
16
|
+
handleClick: () => void;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Shows the secondary CTA button
|
|
21
|
+
*/
|
|
22
|
+
secondaryButton?: {
|
|
23
|
+
handleClick: () => void;
|
|
24
|
+
label: string;
|
|
25
|
+
};
|
|
12
26
|
/**
|
|
13
27
|
* The optional event handler for close button
|
|
14
28
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Size } from 'utils';
|
|
3
|
-
export declare type ButtonKind = 'basic' | 'primary' | 'secondary' | 'destructive' | 'text' | 'plain' | 'plain-light' | 'subtle' | 'float';
|
|
3
|
+
export declare type ButtonKind = 'basic' | 'primary' | 'secondary' | 'destructive' | 'text' | 'plain' | 'plain-light' | 'subtle' | 'float' | 'dotted';
|
|
4
4
|
export declare type ButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Specify the button kind
|
|
@@ -2,11 +2,29 @@ import * as React from 'react';
|
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
3
|
export declare type CardButtonOptions = Pick<ButtonProps, 'children' | 'kind' | 'onClick'>;
|
|
4
4
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Alternate text for an image card
|
|
7
|
+
*/
|
|
5
8
|
alt?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Array of card buttons
|
|
11
|
+
*/
|
|
6
12
|
buttonsOptions?: CardButtonOptions[];
|
|
13
|
+
/**
|
|
14
|
+
* Card description
|
|
15
|
+
*/
|
|
7
16
|
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Element to display in the expandable area
|
|
19
|
+
*/
|
|
8
20
|
expandableContent?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Image source for the image card
|
|
23
|
+
*/
|
|
9
24
|
src?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Card title
|
|
27
|
+
*/
|
|
10
28
|
title?: string;
|
|
11
29
|
}
|
|
12
30
|
export declare const Card: React.FC<CardProps>;
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Size } from 'utils/constants';
|
|
3
2
|
interface InputIcon {
|
|
4
3
|
source: React.ReactElement;
|
|
5
4
|
place: 'left' | 'right';
|
|
6
5
|
}
|
|
7
6
|
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Specify the input size
|
|
9
|
+
*/
|
|
10
|
+
inputSize?: 'xsmall' | 'compact' | 'medium' | 'large';
|
|
11
|
+
/**
|
|
12
|
+
* Specify whether the input should be in error state
|
|
13
|
+
*/
|
|
9
14
|
error?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Specify whether the input should be disabled
|
|
17
|
+
*/
|
|
10
18
|
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Set the icon and its position
|
|
21
|
+
*/
|
|
11
22
|
icon?: InputIcon;
|
|
12
23
|
}
|
|
13
24
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -64,6 +64,14 @@ export interface IPickerProps {
|
|
|
64
64
|
* Set to hide clear selection button
|
|
65
65
|
*/
|
|
66
66
|
hideClearButton?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Will open picker on component initialization
|
|
69
|
+
*/
|
|
70
|
+
openedOnInit?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Test id passed to the picker trigger element
|
|
73
|
+
*/
|
|
74
|
+
['data-testid']?: string;
|
|
67
75
|
/**
|
|
68
76
|
* Callback called after item selection
|
|
69
77
|
*/
|
|
@@ -1,13 +1,40 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface PromoBannerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Specify an optional className to be applied to the container node
|
|
5
|
+
*/
|
|
3
6
|
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Set the primary button text
|
|
9
|
+
*/
|
|
4
10
|
buttonText?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Set the header text
|
|
13
|
+
*/
|
|
5
14
|
header: string;
|
|
15
|
+
/**
|
|
16
|
+
* Set the image source to display it
|
|
17
|
+
*/
|
|
6
18
|
img?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Specify whether the banner should use a light-themed design
|
|
21
|
+
*/
|
|
7
22
|
light?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Set the link button text
|
|
25
|
+
*/
|
|
8
26
|
linkText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Event handler for primary button press
|
|
29
|
+
*/
|
|
9
30
|
onButtonClick?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Event handler for close button press
|
|
33
|
+
*/
|
|
10
34
|
onClose?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Event handler for link button press
|
|
37
|
+
*/
|
|
11
38
|
onLinkClick?: () => void;
|
|
12
39
|
}
|
|
13
40
|
export declare const PromoBanner: React.FC<React.PropsWithChildren<PromoBannerProps>>;
|
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface ISearchInputProps {
|
|
3
|
+
/**
|
|
4
|
+
* Makes search expandable after focusing the icon
|
|
5
|
+
*/
|
|
3
6
|
isCollapsable?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Specify whether the search should be disabled
|
|
9
|
+
*/
|
|
4
10
|
isDisabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Specify whether the search should have loader visible
|
|
13
|
+
*/
|
|
5
14
|
isLoading?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Optional text for placeholder
|
|
17
|
+
*/
|
|
6
18
|
placeholder?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Specify the search size
|
|
21
|
+
*/
|
|
7
22
|
size?: 'compact' | 'medium' | 'large';
|
|
23
|
+
/**
|
|
24
|
+
* Specify the search value
|
|
25
|
+
*/
|
|
8
26
|
value: string;
|
|
27
|
+
/**
|
|
28
|
+
* Specify an optional className to be applied to the container node
|
|
29
|
+
*/
|
|
9
30
|
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The event handler for onChange
|
|
33
|
+
*/
|
|
10
34
|
onChange: (value: string) => void;
|
|
11
35
|
}
|
|
12
36
|
export declare const SearchInput: React.FC<ISearchInputProps>;
|
|
@@ -6,12 +6,33 @@ declare type ButtonElement = {
|
|
|
6
6
|
label: string;
|
|
7
7
|
} & Pick<ButtonProps, 'disabled' | 'loading' | 'icon'>;
|
|
8
8
|
export interface SegmentedControlProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to be applied to the container node
|
|
11
|
+
*/
|
|
9
12
|
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Array of buttons
|
|
15
|
+
*/
|
|
10
16
|
buttons: ButtonElement[];
|
|
17
|
+
/**
|
|
18
|
+
* Set to make buttons fill the container if there is free space
|
|
19
|
+
*/
|
|
11
20
|
fullWidth?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the buttons size
|
|
23
|
+
*/
|
|
12
24
|
size?: ButtonSize;
|
|
25
|
+
/**
|
|
26
|
+
* Id of initially selected button
|
|
27
|
+
*/
|
|
13
28
|
initialId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Id of current selected button
|
|
31
|
+
*/
|
|
14
32
|
currentId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Handler for onClick on specific button
|
|
35
|
+
*/
|
|
15
36
|
onButtonClick?: (id: string, event: React.MouseEvent<HTMLElement>) => void;
|
|
16
37
|
}
|
|
17
38
|
export declare const SegmentedControl: React.FC<SegmentedControlProps>;
|
|
@@ -1,14 +1,41 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconSize, IconSource } from '../Icon';
|
|
3
3
|
export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Specify the tag kind
|
|
6
|
+
*/
|
|
4
7
|
kind?: 'default' | 'info' | 'warning' | 'success' | 'error' | 'purple' | 'black';
|
|
8
|
+
/**
|
|
9
|
+
* Specify the tag size
|
|
10
|
+
*/
|
|
5
11
|
size?: 'medium' | 'large';
|
|
12
|
+
/**
|
|
13
|
+
* Specify the tag icon size if used
|
|
14
|
+
*/
|
|
6
15
|
iconSize?: IconSize;
|
|
16
|
+
/**
|
|
17
|
+
* Set the tag custom color
|
|
18
|
+
*/
|
|
7
19
|
customColor?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Set to show close icon
|
|
22
|
+
*/
|
|
8
23
|
dismissible?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Outlined version of tag
|
|
26
|
+
*/
|
|
9
27
|
outline?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The event handler for close icon click
|
|
30
|
+
*/
|
|
10
31
|
onRemove?(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Pass the icon to show it
|
|
34
|
+
*/
|
|
11
35
|
icon?: IconSource;
|
|
36
|
+
/**
|
|
37
|
+
* Pass the image source to show it as avatar
|
|
38
|
+
*/
|
|
12
39
|
avatar?: string;
|
|
13
40
|
}
|
|
14
41
|
export declare const Tag: React.FC<React.PropsWithChildren<TagProps>>;
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare type Tags = string[];
|
|
3
2
|
export interface TagInputProps {
|
|
3
|
+
/**
|
|
4
|
+
* Set the id for input
|
|
5
|
+
*/
|
|
4
6
|
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Set the error message
|
|
9
|
+
*/
|
|
5
10
|
error?: string;
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
*/
|
|
8
22
|
placeholder?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Set the custom validation for provided items
|
|
25
|
+
*/
|
|
9
26
|
validator?: (val: string) => boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Specify the input size
|
|
29
|
+
*/
|
|
10
30
|
size?: 'medium' | 'large';
|
|
11
31
|
}
|
|
12
32
|
export declare const TagInput: React.FC<TagInputProps>;
|
|
13
|
-
export {};
|