@livechat/design-system-react-components 2.4.7 → 2.5.1
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/Alert/Alert.d.ts +7 -8
- package/dist/components/FloatingPortal/FloatingPortal.d.ts +3 -0
- package/dist/components/FloatingPortal/index.d.ts +3 -0
- package/dist/components/PromoBannerV2/PromoBannerV2.d.ts +8 -10
- package/dist/components/Tooltip/types.d.ts +9 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1404 -1381
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ComponentCoreProps } from '../../utils/types';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
type AlertKind = 'info' | 'warning' | 'success' | 'error';
|
|
5
|
+
type OldButtonProps = {
|
|
6
|
+
handleClick: () => void;
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
4
9
|
export interface AlertProps extends ComponentCoreProps {
|
|
5
10
|
/**
|
|
6
11
|
* Specify the kind of Alert
|
|
@@ -9,17 +14,11 @@ export interface AlertProps extends ComponentCoreProps {
|
|
|
9
14
|
/**
|
|
10
15
|
* Shows the primary CTA button
|
|
11
16
|
*/
|
|
12
|
-
primaryButton?:
|
|
13
|
-
handleClick: () => void;
|
|
14
|
-
label: string;
|
|
15
|
-
};
|
|
17
|
+
primaryButton?: ButtonProps & OldButtonProps;
|
|
16
18
|
/**
|
|
17
19
|
* Shows the secondary CTA button
|
|
18
20
|
*/
|
|
19
|
-
secondaryButton?:
|
|
20
|
-
handleClick: () => void;
|
|
21
|
-
label: string;
|
|
22
|
-
};
|
|
21
|
+
secondaryButton?: ButtonProps & OldButtonProps;
|
|
23
22
|
/**
|
|
24
23
|
* The optional event handler for close button
|
|
25
24
|
*/
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ButtonKind, ButtonProps } from '../Button';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
type OldButtonProps = {
|
|
4
|
+
handleClick: () => void;
|
|
5
|
+
label: string;
|
|
6
|
+
kind?: ButtonKind;
|
|
7
|
+
};
|
|
3
8
|
export interface IPromoBannerV2Props {
|
|
4
9
|
/**
|
|
5
10
|
* Specify an optional className to be applied to the main container node
|
|
@@ -12,19 +17,11 @@ export interface IPromoBannerV2Props {
|
|
|
12
17
|
/**
|
|
13
18
|
* Shows the primary CTA button
|
|
14
19
|
*/
|
|
15
|
-
primaryButton?:
|
|
16
|
-
handleClick: () => void;
|
|
17
|
-
label: string;
|
|
18
|
-
kind?: ButtonKind;
|
|
19
|
-
} & ButtonProps;
|
|
20
|
+
primaryButton?: OldButtonProps & ButtonProps;
|
|
20
21
|
/**
|
|
21
22
|
* Shows the secondary CTA button
|
|
22
23
|
*/
|
|
23
|
-
secondaryButton?:
|
|
24
|
-
handleClick: () => void;
|
|
25
|
-
label: string;
|
|
26
|
-
kind?: ButtonKind;
|
|
27
|
-
};
|
|
24
|
+
secondaryButton?: OldButtonProps & ButtonProps;
|
|
28
25
|
/**
|
|
29
26
|
* Set to true to display the banner vertically
|
|
30
27
|
*/
|
|
@@ -48,3 +45,4 @@ export interface IPromoBannerV2Props {
|
|
|
48
45
|
kind?: 'default' | 'dark';
|
|
49
46
|
}
|
|
50
47
|
export declare const PromoBannerV2: React.FC<React.PropsWithChildren<IPromoBannerV2Props>>;
|
|
48
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Placement, VirtualElement, UseDismissProps, Strategy, UseClickProps } from '@floating-ui/react';
|
|
1
|
+
import { Placement, VirtualElement, UseDismissProps, Strategy, UseClickProps, FloatingPortalProps } from '@floating-ui/react';
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export type TooltipTheme = 'invert' | 'important' | undefined;
|
|
@@ -133,6 +133,14 @@ export interface ITooltipProps {
|
|
|
133
133
|
* https://floating-ui.com/docs/usefloating#strategy
|
|
134
134
|
*/
|
|
135
135
|
floatingStrategy?: Strategy;
|
|
136
|
+
/**
|
|
137
|
+
* Set to render the tooltip in a portal
|
|
138
|
+
*/
|
|
139
|
+
portal?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Props for the FloatingPortal component, see FloatingPortal docs or https://floating-ui.com/docs/FloatingPortal
|
|
142
|
+
*/
|
|
143
|
+
portalProps?: FloatingPortalProps;
|
|
136
144
|
/**
|
|
137
145
|
* Set to hide the tooltip when reference element is hidden
|
|
138
146
|
* IMPORTANT: This prop enables the `hide` middleware from `floating-ui` library: https://floating-ui.com/docs/hide. But for some reason, it doesn't work in tests because always returns `true` in `referenceHidden` check.
|