@livechat/design-system-react-components 1.24.2 → 1.25.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.
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IconSource } from './types';
3
- export type IconSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
3
+ export type IconSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
4
4
  export type IconKind = 'primary' | 'subtle' | 'inverted' | 'inverted-subtle' | 'link' | 'success' | 'warning' | 'error' | 'negative' | 'positive' | 'action-primary' | 'action-negative' | 'action-positive' | 'action-warning' | 'action-neutral' | 'lock-black';
5
5
  export interface IconProps {
6
6
  /**
@@ -6,10 +6,26 @@ type HTMLProps = (React.AnchorHTMLAttributes<HTMLAnchorElement> & {
6
6
  href?: never;
7
7
  });
8
8
  export type TabProps = HTMLProps & {
9
+ /**
10
+ * Set to display numeric counter with given number
11
+ */
9
12
  count?: number;
13
+ /**
14
+ * Set to display selected state
15
+ */
10
16
  isSelected?: boolean;
17
+ /**
18
+ * Set to display numeric counter as badge
19
+ */
11
20
  asBadge?: boolean;
21
+ /**
22
+ * Specify the button size
23
+ */
12
24
  size?: Size;
25
+ /**
26
+ * Renders given element
27
+ */
28
+ icon?: React.ReactElement;
13
29
  };
14
30
  export declare const Tab: React.FC<React.PropsWithChildren<TabProps>>;
15
31
  export {};
@@ -2,7 +2,6 @@ import { CSSProperties } from 'react';
2
2
  import { IconKind } from '../Icon';
3
3
  import { TooltipTheme } from './types';
4
4
  export declare function getIconType(theme: TooltipTheme): IconKind;
5
- export declare const sleep: (milliseconds: number) => Promise<void>;
6
5
  export declare function getArrowPositionStyles(arrowOffsetY?: number, arrowOffsetX?: number, arrowY?: number, arrowX?: number): CSSProperties | undefined;
7
6
  export declare const getArrowTokens: (tooltipStyle: string | undefined) => {
8
7
  stroke: string;
@@ -1,10 +1,3 @@
1
1
  import * as React from 'react';
2
- import { TooltipTheme } from '../types';
3
- export declare const Info: React.FC<{
4
- className?: string;
5
- header?: string;
6
- text: string;
7
- closeWithX?: boolean;
8
- theme?: TooltipTheme;
9
- handleCloseAction?: (ev: React.MouseEvent) => void;
10
- }>;
2
+ import { ITooltipInfoProps } from '../types';
3
+ export declare const Info: React.FC<ITooltipInfoProps>;
@@ -1,15 +1,3 @@
1
1
  import * as React from 'react';
2
- import { TooltipButton, TooltipTheme } from '../types';
3
- export declare const Interactive: React.FC<{
4
- header?: string;
5
- text: string;
6
- image?: {
7
- src: string;
8
- alt: string;
9
- };
10
- closeWithX?: boolean;
11
- theme?: TooltipTheme;
12
- handleCloseAction?: (ev: React.MouseEvent) => void;
13
- primaryButton: TooltipButton;
14
- secondaryButton: TooltipButton;
15
- }>;
2
+ import { ITooltipInteractiveProps } from '../types';
3
+ export declare const Interactive: React.FC<ITooltipInteractiveProps>;
@@ -1,4 +1,4 @@
1
1
  export { Tooltip } from './Tooltip';
2
2
  export { Simple, Info, Interactive, Reports } from './components';
3
3
  export { UserGuide } from './components/UserGuide';
4
- export type { ITooltipProps } from './types';
4
+ export type { ITooltipProps, ITooltipInfoProps, ITooltipInteractiveProps, } from './types';
@@ -127,3 +127,66 @@ export interface ITooltipProps {
127
127
  */
128
128
  floatingStrategy?: Strategy;
129
129
  }
130
+ export interface ITooltipInfoProps {
131
+ /**
132
+ * The CSS class for Info tooltip
133
+ */
134
+ className?: string;
135
+ /**
136
+ * The Info tooltip header
137
+ */
138
+ header?: string;
139
+ /**
140
+ * The Info tooltip text
141
+ */
142
+ text: string;
143
+ /**
144
+ * Set to show close button
145
+ */
146
+ closeWithX?: boolean;
147
+ /**
148
+ * The Info tooltip theme
149
+ */
150
+ theme?: TooltipTheme;
151
+ /**
152
+ * The Info tooltip close button action
153
+ */
154
+ handleCloseAction?: (ev: React.MouseEvent) => void;
155
+ }
156
+ export interface ITooltipInteractiveProps {
157
+ /**
158
+ * The Interactive tooltip header
159
+ */
160
+ header?: string;
161
+ /**
162
+ * The Interactive tooltip text
163
+ */
164
+ text: string;
165
+ /**
166
+ * The Interactive tooltip image
167
+ */
168
+ image?: {
169
+ src: string;
170
+ alt: string;
171
+ };
172
+ /**
173
+ * Set to show close button
174
+ */
175
+ closeWithX?: boolean;
176
+ /**
177
+ * The Interactive tooltip theme
178
+ */
179
+ theme?: TooltipTheme;
180
+ /**
181
+ * The Interactive tooltip close button action
182
+ */
183
+ handleCloseAction?: (ev: React.MouseEvent) => void;
184
+ /**
185
+ * The Interactive tooltip primary button props
186
+ */
187
+ primaryButton: TooltipButton;
188
+ /**
189
+ * The Interactive tooltip secondary button props
190
+ */
191
+ secondaryButton: TooltipButton;
192
+ }