@livechat/design-system-react-components 1.0.0-beta.0 → 1.0.0-refresh-ui.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/ActionMenu/ActionMenu.d.ts +4 -0
- package/dist/components/ActionMenu/ActionMenu.stories.d.ts +1 -0
- package/dist/components/Modal/ModalBase.d.ts +4 -0
- package/dist/components/Picker/Picker.d.ts +5 -1
- package/dist/components/Picker/PickerList.d.ts +1 -10
- package/dist/components/Picker/PickerListItem.d.ts +10 -0
- package/dist/components/Picker/TriggerBody.d.ts +4 -1
- package/dist/components/Picker/types.d.ts +11 -0
- package/dist/components/Switch/Switch.d.ts +30 -0
- package/dist/dsrc.cjs.js +8 -8
- package/dist/dsrc.es.js +1722 -1654
- package/dist/dsrc.umd.js +8 -8
- package/dist/foundations/radius-token.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/preview-stats.json +566 -530
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -27,5 +27,9 @@ export interface ActionMenuProps {
|
|
|
27
27
|
* Will open menu on component initialization
|
|
28
28
|
*/
|
|
29
29
|
openedOnInit?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Menu will stay open after option click
|
|
32
|
+
*/
|
|
33
|
+
keepOpenOnClick?: boolean;
|
|
30
34
|
}
|
|
31
35
|
export declare const ActionMenu: React.FC<ActionMenuProps>;
|
|
@@ -12,5 +12,9 @@ export interface ModalBaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
* Triggers the onClose event on overlay click
|
|
13
13
|
*/
|
|
14
14
|
closeOnOverlayPress?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Removes the spacing inside the main container
|
|
17
|
+
*/
|
|
18
|
+
fullSpaceContent?: boolean;
|
|
15
19
|
}
|
|
16
20
|
export declare const ModalBase: React.FC<React.PropsWithChildren<ModalBaseProps>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IPickerListItem } from './PickerList';
|
|
3
2
|
import { IconSize } from '../Icon';
|
|
4
3
|
import { Size } from 'utils';
|
|
4
|
+
import { IPickerListItem } from './types';
|
|
5
5
|
export type PickerType = 'single' | 'multi';
|
|
6
6
|
export interface IPickerProps {
|
|
7
7
|
/**
|
|
@@ -76,5 +76,9 @@ export interface IPickerProps {
|
|
|
76
76
|
* Callback called after item selection
|
|
77
77
|
*/
|
|
78
78
|
onSelect: (selectedItems: IPickerListItem[] | null) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Clears the search input after item select
|
|
81
|
+
*/
|
|
82
|
+
clearSearchAfterSelection?: boolean;
|
|
79
83
|
}
|
|
80
84
|
export declare const Picker: React.FC<IPickerProps>;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
key: string;
|
|
4
|
-
name: string;
|
|
5
|
-
customElement?: {
|
|
6
|
-
listItemBody: React.ReactElement;
|
|
7
|
-
selectedItemBody: React.ReactElement;
|
|
8
|
-
};
|
|
9
|
-
groupHeader?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}
|
|
2
|
+
import { IPickerListItem } from './types';
|
|
12
3
|
export interface IPickerListProps {
|
|
13
4
|
isOpen: boolean;
|
|
14
5
|
items: IPickerListItem[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IPickerListItem } from './types';
|
|
3
|
+
interface IProps {
|
|
4
|
+
item: IPickerListItem;
|
|
5
|
+
isItemSelected: boolean;
|
|
6
|
+
currentItemKey: string | null;
|
|
7
|
+
onSelect: (item: IPickerListItem) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const PickerListItem: React.FC<IProps>;
|
|
10
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IPickerListItem } from './PickerList';
|
|
3
2
|
import { PickerType } from './Picker';
|
|
4
3
|
import { IconSize } from 'index';
|
|
4
|
+
import { Size } from 'utils';
|
|
5
|
+
import { IPickerListItem } from './types';
|
|
5
6
|
export interface ITriggerBodyProps {
|
|
6
7
|
isOpen: boolean;
|
|
7
8
|
isSearchDisabled?: boolean;
|
|
@@ -10,6 +11,8 @@ export interface ITriggerBodyProps {
|
|
|
10
11
|
items?: IPickerListItem[] | null;
|
|
11
12
|
type: PickerType;
|
|
12
13
|
iconSize?: IconSize;
|
|
14
|
+
clearSearchAfterSelection?: boolean;
|
|
15
|
+
size?: Size;
|
|
13
16
|
onItemRemove: (item: IPickerListItem) => void;
|
|
14
17
|
onFilter: (text: string) => void;
|
|
15
18
|
}
|
|
@@ -3,15 +3,45 @@ export declare const baseClass = "switch";
|
|
|
3
3
|
export type SwitchSize = 'compact' | 'medium' | 'large';
|
|
4
4
|
export type SwitchState = 'regular' | 'loading' | 'locked';
|
|
5
5
|
export interface SwitchProps {
|
|
6
|
+
/**
|
|
7
|
+
* Specify the label for the switch input
|
|
8
|
+
*/
|
|
6
9
|
ariaLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The CSS class for switch container
|
|
12
|
+
*/
|
|
7
13
|
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Will set the switch to "on" on component initialization
|
|
16
|
+
*/
|
|
8
17
|
defaultOn?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Specify whether the switch should be disabled
|
|
20
|
+
*/
|
|
9
21
|
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Ref object
|
|
24
|
+
*/
|
|
10
25
|
innerRef?: React.LegacyRef<HTMLInputElement> | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Specify the switch input name
|
|
28
|
+
*/
|
|
11
29
|
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Define if switch is "on"
|
|
32
|
+
*/
|
|
12
33
|
on?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The event handler for onChange
|
|
36
|
+
*/
|
|
13
37
|
onChange?(e: React.FormEvent, value: boolean): void;
|
|
38
|
+
/**
|
|
39
|
+
* Specify the switch size
|
|
40
|
+
*/
|
|
14
41
|
size?: SwitchSize;
|
|
42
|
+
/**
|
|
43
|
+
* Specify the switch state
|
|
44
|
+
*/
|
|
15
45
|
state?: SwitchState;
|
|
16
46
|
}
|
|
17
47
|
export declare const Switch: React.FC<SwitchProps>;
|