@livechat/design-system-react-components 2.0.0-alpha.7 → 2.0.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/AppFrame/components/MobileNavigation/MobileNavigation.d.ts +3 -0
- package/dist/components/AppFrame/components/MobileNavigation/types.d.ts +8 -0
- package/dist/components/AppFrame/components/index.d.ts +1 -0
- package/dist/components/AppFrame/types.d.ts +9 -0
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.helpers.d.ts +4 -1
- package/dist/hooks/helpers.d.ts +3 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/types.d.ts +13 -0
- package/dist/hooks/useHeightResizer.d.ts +3 -7
- package/dist/hooks/useMobileViewDetector.d.ts +3 -0
- package/dist/hooks/useSharedResizeObserver.d.ts +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2614 -2475
- package/dist/providers/AppFrameProvider.d.ts +3 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -7,3 +7,4 @@ export { Navigation } from './Navigation/Navigation';
|
|
|
7
7
|
export { NavigationTopBar, NavigationTopBarAlert, NavigationTopBarTitle, } from './NavigationTopBar/NavigationTopBar';
|
|
8
8
|
export { SIDE_NAVIGATION_ITEM_TEST_ID, SIDE_NAVIGATION_ACTIVE_ITEM_TEST_ID, SIDE_NAVIGATION_PARENT_ICON_TEST_ID, } from './SideNavigationItem/constants';
|
|
9
9
|
export { ExpirationCounter } from './ExpirationCounter/ExpirationCounter';
|
|
10
|
+
export { MobileNavigation } from './MobileNavigation/MobileNavigation';
|
|
@@ -9,6 +9,10 @@ export interface IAppFrameProps extends ComponentCoreProps {
|
|
|
9
9
|
* It will display navigation elements
|
|
10
10
|
*/
|
|
11
11
|
navigation: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* It will display mobile navigation elements
|
|
14
|
+
*/
|
|
15
|
+
mobileNavigation: React.ReactNode;
|
|
12
16
|
/**
|
|
13
17
|
* It will display the side navigation bar
|
|
14
18
|
*/
|
|
@@ -29,6 +33,11 @@ export interface IAppFrameProps extends ComponentCoreProps {
|
|
|
29
33
|
* The CSS class for the content container
|
|
30
34
|
*/
|
|
31
35
|
contentClassName?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The value that will determine on which resolution mobile view will be displayed
|
|
38
|
+
* @default 705
|
|
39
|
+
*/
|
|
40
|
+
mobileViewBreakpoint?: number;
|
|
32
41
|
}
|
|
33
42
|
export type { INavigationProps } from './components/Navigation/types';
|
|
34
43
|
export type { INavigationGroupProps } from './components/NavigationGroup/types';
|
|
@@ -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;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type NODE = HTMLDivElement | null;
|
|
2
|
+
export type CALLBACK = (newSize: DOMRectReadOnly) => void;
|
|
3
|
+
export interface IUseHeightResizer {
|
|
4
|
+
size: number;
|
|
5
|
+
handleResizeRef: (node: NODE) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface IUseMobileViewDetectorProps {
|
|
8
|
+
mobileBreakpoint: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IUseMobileViewDetector {
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
handleResizeRef: (node: NODE) => void;
|
|
13
|
+
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
handleResize: (node: NODE) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare const useHeightResizer: () => IUseResizer;
|
|
7
|
-
export {};
|
|
1
|
+
import { IUseHeightResizer } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const useHeightResizer: () => IUseHeightResizer;
|