@tracktor/design-system 4.0.1 → 4.2.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/CHANGELOG.md +3 -3
- package/dist/main.cjs +11 -11
- package/dist/main.js +1109 -1040
- package/dist/src/components/DataDisplay/Icons/ChevronLeftDoubleIcon.d.ts +7 -0
- package/dist/src/components/Navigation/NavigationMenu/NavLinkItem/NavLinkItem.d.ts +6 -3
- package/dist/src/components/Navigation/NavigationMenu/NavigationMenu.d.ts +14 -9
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
interface CloseIconProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
}
|
|
6
|
+
declare const ChevronLeftDoubleIcon: ({ sx, color }: CloseIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ChevronLeftDoubleIcon;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { NavLinkProps, ObjectNavigationItem } from '..';
|
|
3
3
|
interface NavLinkItemProps extends Omit<ObjectNavigationItem, "label"> {
|
|
4
4
|
children?: ReactNode;
|
|
5
|
-
component?: (props: NavLinkProps
|
|
5
|
+
component?: (props: NavLinkProps & {
|
|
6
|
+
onClick?: (event?: MouseEvent) => void;
|
|
7
|
+
}) => ReactNode;
|
|
8
|
+
onClick?: (event?: MouseEvent) => void;
|
|
6
9
|
}
|
|
7
|
-
declare const NavLinkItem: ({ url, end, children, active, state, component, disabled }: NavLinkItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const NavLinkItem: ({ url, end, children, active, state, component, disabled, onClick }: NavLinkItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
11
|
export default NavLinkItem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { MouseEvent, ReactElement, ReactNode } from 'react';
|
|
2
2
|
export type ObjectNavigationItem = {
|
|
3
3
|
url?: string;
|
|
4
4
|
label?: string;
|
|
@@ -11,6 +11,16 @@ export type ObjectNavigationItem = {
|
|
|
11
11
|
hideOnMobile?: boolean;
|
|
12
12
|
hasAccess?: boolean;
|
|
13
13
|
};
|
|
14
|
+
export interface BottomLinkProps {
|
|
15
|
+
url?: string;
|
|
16
|
+
state?: any;
|
|
17
|
+
end?: boolean;
|
|
18
|
+
label?: ReactNode;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
onClick?: (e?: MouseEvent) => void;
|
|
23
|
+
}
|
|
14
24
|
export interface NavLinkProps {
|
|
15
25
|
className?: string | ((props: {
|
|
16
26
|
isActive: boolean;
|
|
@@ -54,14 +64,7 @@ export interface NavigationMenuProps {
|
|
|
54
64
|
/**
|
|
55
65
|
* Component to render the bottom link
|
|
56
66
|
*/
|
|
57
|
-
bottomLink?:
|
|
58
|
-
url?: string;
|
|
59
|
-
state?: any;
|
|
60
|
-
end?: boolean;
|
|
61
|
-
label?: ReactNode;
|
|
62
|
-
active?: boolean;
|
|
63
|
-
icon?: ReactNode;
|
|
64
|
-
} | null | false;
|
|
67
|
+
bottomLink?: BottomLinkProps | BottomLinkProps[] | null | false;
|
|
65
68
|
/**
|
|
66
69
|
* Component to router nav links.
|
|
67
70
|
* This component is used to render the links in the main menu & mobile bottom navigation
|
|
@@ -89,10 +92,12 @@ export interface NavigationMenuProps {
|
|
|
89
92
|
}
|
|
90
93
|
declare const DEFAULT_CONTEXT_VALUE: {
|
|
91
94
|
closeDrawerMenu: () => void;
|
|
95
|
+
isCollapsed: boolean;
|
|
92
96
|
isDrawerOpen: boolean;
|
|
93
97
|
isMobile: boolean;
|
|
94
98
|
isTablet: boolean;
|
|
95
99
|
openDrawerMenu: () => void;
|
|
100
|
+
toggleCollapse: () => void;
|
|
96
101
|
};
|
|
97
102
|
type NavigationMenuContextValue = NavigationMenuProps & typeof DEFAULT_CONTEXT_VALUE;
|
|
98
103
|
export declare const NavigationMenuContext: import('react').Context<NavigationMenuContextValue>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tracktor/design-system",
|
|
3
3
|
"description": "Tracktor Design System",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "4.0
|
|
5
|
+
"version": "4.2.0",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"types": "./dist/src/main.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@storybook/addon-docs": "^9.0.15",
|
|
51
51
|
"@storybook/addon-links": "^9.0.15",
|
|
52
52
|
"@storybook/addon-onboarding": "^9.0.15",
|
|
53
|
-
"@storybook/blocks": "^
|
|
53
|
+
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
54
54
|
"@storybook/builder-vite": "^9.0.15",
|
|
55
55
|
"@storybook/react-vite": "^9.0.15",
|
|
56
56
|
"@storybook/testing-library": "^0.2.2",
|