@livechat/design-system-react-components 2.0.0-alpha.8 → 2.1.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/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.helpers.d.ts +4 -1
- package/dist/components/InviteAgents/InviteAgents.d.ts +3 -0
- package/dist/components/InviteAgents/helpers.d.ts +4 -0
- package/dist/components/InviteAgents/index.d.ts +2 -0
- package/dist/components/InviteAgents/types.d.ts +30 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2562 -2343
- package/dist/style.css +1 -1
- package/dist/utils/types.d.ts +5 -0
- package/package.json +3 -3
|
@@ -29,6 +29,10 @@ export type ButtonProps = {
|
|
|
29
29
|
* Specify the place to render element given in `icon` prop
|
|
30
30
|
*/
|
|
31
31
|
iconPosition?: 'left' | 'right';
|
|
32
|
+
/**
|
|
33
|
+
* Set to enable animation that will show label on button hover if icon is present
|
|
34
|
+
*/
|
|
35
|
+
animatedLabel?: boolean;
|
|
32
36
|
} & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
33
37
|
export declare const Button: React.ForwardRefExoticComponent<{
|
|
34
38
|
/**
|
|
@@ -59,4 +63,8 @@ export declare const Button: React.ForwardRefExoticComponent<{
|
|
|
59
63
|
* Specify the place to render element given in `icon` prop
|
|
60
64
|
*/
|
|
61
65
|
iconPosition?: "left" | "right" | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Set to enable animation that will show label on button hover if icon is present
|
|
68
|
+
*/
|
|
69
|
+
animatedLabel?: boolean | undefined;
|
|
62
70
|
} & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLButtonElement & HTMLAnchorElement>>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ButtonKind } from './types';
|
|
2
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
export declare const getSpinnerColors: (kind: ButtonKind) => Record<string, string> | undefined;
|
|
4
|
+
export declare const handleMouseInteraction: (event: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<HTMLAnchorElement>, internalHandler: () => void, userHandler?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
5
|
+
export declare const handleKeyboardInteraction: (event: React.FocusEvent<HTMLButtonElement> | React.FocusEvent<HTMLAnchorElement>, internalHandler: () => void, userHandler?: React.FocusEventHandler<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
6
|
+
export declare const buttonRef: (node: HTMLSpanElement | null, internalHandler: (width: number) => void) => void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentCoreProps } from '../../utils/types';
|
|
2
|
+
|
|
3
|
+
export interface Agent {
|
|
4
|
+
name: string;
|
|
5
|
+
email: string;
|
|
6
|
+
status: 'available' | 'unavailable' | 'unknown';
|
|
7
|
+
avatar: string;
|
|
8
|
+
}
|
|
9
|
+
export interface InviteAgentsProps extends ComponentCoreProps {
|
|
10
|
+
/**
|
|
11
|
+
* The list of invited agents
|
|
12
|
+
*/
|
|
13
|
+
agents: Agent[];
|
|
14
|
+
/**
|
|
15
|
+
* The function to call when the "Set up Chatbot" button is clicked
|
|
16
|
+
*/
|
|
17
|
+
onSetUpChatbotClick: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* The function to call when the "Invite Teammate" button is clicked
|
|
20
|
+
*/
|
|
21
|
+
onAddTeammateClick: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the invite button should be animated
|
|
24
|
+
*/
|
|
25
|
+
animatedInviteButton?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Offset for the tooltip arrow
|
|
28
|
+
*/
|
|
29
|
+
tooltipArrowOffset?: number;
|
|
30
|
+
}
|