@livechat/design-system-react-components 2.21.0 → 2.22.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/AppFrame/components/SideNavigationGroup/constants.d.ts +1 -0
- package/dist/components/AppFrame/components/SideNavigationGroup/types.d.ts +46 -1
- package/dist/foundations/shadow-token.d.ts +1 -0
- package/dist/hooks/useAnimations.d.ts +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1578 -1539
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SIDE_NAVIGATION_LINK_LABEL_TEST_ID = "side-navigation-link-label-test-id";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { IUseAnimations } from '../../../../hooks/useAnimations';
|
|
1
2
|
import { ComponentCoreProps } from '../../../../utils/types';
|
|
2
3
|
import * as React from 'react';
|
|
4
|
+
interface IOnClickProps {
|
|
5
|
+
toggle: () => void;
|
|
6
|
+
}
|
|
3
7
|
export interface ISideNavigationGroupProps extends ComponentCoreProps {
|
|
4
8
|
/**
|
|
5
9
|
* It will display your side navigation elements
|
|
@@ -10,19 +14,60 @@ export interface ISideNavigationGroupProps extends ComponentCoreProps {
|
|
|
10
14
|
*/
|
|
11
15
|
label?: React.ReactNode | ((isOpen: boolean) => React.ReactNode);
|
|
12
16
|
/**
|
|
13
|
-
* The right node of the side navigation list
|
|
17
|
+
* The right node of the side navigation list
|
|
14
18
|
*/
|
|
15
19
|
rightNode?: React.ReactNode | ((isOpen: boolean) => React.ReactNode);
|
|
16
20
|
/**
|
|
17
21
|
* Specify whether the list should be collapsible
|
|
18
22
|
*/
|
|
19
23
|
isCollapsible?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Specify whether the label is a link
|
|
26
|
+
*/
|
|
27
|
+
isLinkLabel?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Specify whether the list label is active
|
|
30
|
+
*/
|
|
31
|
+
isActive?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Specify whether the list is open
|
|
34
|
+
*/
|
|
35
|
+
isOpen?: IUseAnimations['isOpen'];
|
|
36
|
+
/**
|
|
37
|
+
* Specify whether the list is mounted
|
|
38
|
+
*/
|
|
39
|
+
isMounted?: IUseAnimations['isMounted'];
|
|
40
|
+
/**
|
|
41
|
+
* Set whether the list should be visible
|
|
42
|
+
*/
|
|
43
|
+
setShouldBeVisible?: IUseAnimations['setShouldBeVisible'];
|
|
44
|
+
/**
|
|
45
|
+
* The function to call on list label click
|
|
46
|
+
*/
|
|
47
|
+
onClick?: ({ toggle }: IOnClickProps) => void;
|
|
20
48
|
/**
|
|
21
49
|
* The function to call on item hover
|
|
22
50
|
*/
|
|
23
51
|
onItemHover?: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* The ref of the list wrapper
|
|
54
|
+
*/
|
|
55
|
+
listWrapperRef?: React.RefObject<HTMLDivElement>;
|
|
24
56
|
/**
|
|
25
57
|
* Specify whether the list should be open on the first render
|
|
26
58
|
*/
|
|
27
59
|
shouldOpenOnInit?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The CSS class name for the label
|
|
62
|
+
*/
|
|
63
|
+
labelClassName?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The CSS class name for the label wrapper
|
|
66
|
+
*/
|
|
67
|
+
labelWrapperClassName?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The CSS class name for the list wrapper
|
|
70
|
+
*/
|
|
71
|
+
listWrapperClassName?: string;
|
|
28
72
|
}
|
|
73
|
+
export {};
|
|
@@ -4,7 +4,7 @@ interface UseAnimationsProps {
|
|
|
4
4
|
elementRef: React.RefObject<HTMLDivElement>;
|
|
5
5
|
includeSleepWakeScenario?: boolean;
|
|
6
6
|
}
|
|
7
|
-
interface IUseAnimations {
|
|
7
|
+
export interface IUseAnimations {
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
isMounted: boolean;
|
|
10
10
|
setShouldBeVisible: React.Dispatch<React.SetStateAction<boolean>>;
|