@livechat/design-system-react-components 1.1.0 → 1.3.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 +18 -2
- package/dist/components/ActionMenu/constants.d.ts +1 -7
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.stories.d.ts +1 -1
- package/dist/components/Button/helpers.d.ts +2 -0
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/types.d.ts +1 -0
- package/dist/components/TagInput/TagInput.d.ts +8 -0
- package/dist/components/Tooltip/components/FloatingComponent.d.ts +1 -1
- package/dist/dsrc.cjs.js +8 -8
- package/dist/dsrc.es.js +1909 -1866
- package/dist/index.d.ts +1 -0
- package/dist/preview-stats.json +623 -593
- package/dist/stories/components/StoryDescriptor.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/themes/design-token.d.ts +50 -2
- package/dist/utils/getDesignTokenWithOpacity.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +6 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Placement } from '@floating-ui/react
|
|
2
|
+
import { Placement, flip } from '@floating-ui/react';
|
|
3
3
|
import { IActionMenuOption } from './types';
|
|
4
4
|
export interface ActionMenuProps {
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@ export interface ActionMenuProps {
|
|
|
7
7
|
*/
|
|
8
8
|
className?: string;
|
|
9
9
|
/**
|
|
10
|
-
* The CSS class for trigger
|
|
10
|
+
* The CSS class for trigger container
|
|
11
11
|
*/
|
|
12
12
|
triggerClassName?: string;
|
|
13
13
|
/**
|
|
@@ -30,5 +30,21 @@ export interface ActionMenuProps {
|
|
|
30
30
|
* Menu will stay open after option click
|
|
31
31
|
*/
|
|
32
32
|
keepOpenOnClick?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Set the menu placement to keep it in view
|
|
35
|
+
*/
|
|
36
|
+
flipOptions?: Parameters<typeof flip>[0];
|
|
37
|
+
/**
|
|
38
|
+
* Set to control the menu visibility
|
|
39
|
+
*/
|
|
40
|
+
visible?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Optional handler called on menu close
|
|
43
|
+
*/
|
|
44
|
+
onClose?: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* Optional handler called on menu open
|
|
47
|
+
*/
|
|
48
|
+
onOpen?: () => void;
|
|
33
49
|
}
|
|
34
50
|
export declare const ActionMenu: React.FC<ActionMenuProps>;
|
|
@@ -10,12 +10,6 @@ export declare const exampleOptions: ({
|
|
|
10
10
|
key: string;
|
|
11
11
|
element: React.JSX.Element;
|
|
12
12
|
disabled: boolean;
|
|
13
|
-
onClick: typeof noop;
|
|
14
|
-
withDivider?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
key: string;
|
|
17
|
-
element: React.JSX.Element;
|
|
18
|
-
onClick: typeof noop;
|
|
19
13
|
withDivider: boolean;
|
|
20
|
-
|
|
14
|
+
onClick: typeof noop;
|
|
21
15
|
})[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Size } from 'utils';
|
|
3
|
-
|
|
3
|
+
import { ButtonKind } from './types';
|
|
4
4
|
export type ButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Specify the button kind
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from './Button';
|
|
3
3
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
4
|
-
kind?: import("./
|
|
4
|
+
kind?: import("./types").ButtonKind | undefined;
|
|
5
5
|
size?: import("../..").Size | undefined;
|
|
6
6
|
loading?: boolean | undefined;
|
|
7
7
|
fullWidth?: boolean | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ButtonKind = 'basic' | 'primary' | 'secondary' | 'destructive' | 'destructive-outline' | 'text' | 'link' | 'link-light' | 'link-inverted' | 'plain' | 'float' | 'dotted' | 'high-contrast';
|
|
@@ -28,5 +28,13 @@ export interface TagInputProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
28
28
|
* Specify the input size
|
|
29
29
|
*/
|
|
30
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;
|
|
31
39
|
}
|
|
32
40
|
export declare const TagInput: React.FC<TagInputProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { UseFloatingReturn } from '@floating-ui/react
|
|
2
|
+
import { UseFloatingReturn } from '@floating-ui/react';
|
|
3
3
|
import { ITooltipProps } from '../types';
|
|
4
4
|
type IProps = Pick<ITooltipProps, 'referenceElement' | 'arrowOffsetX' | 'arrowOffsetY' | 'className' | 'theme' | 'withFadeAnimation' | 'transitionDuration' | 'transitionDelay'> & {
|
|
5
5
|
visible?: boolean;
|