@camunda/camunda-composite-components 0.2.10 → 0.2.11-rc.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,5 +1,5 @@
|
|
|
1
1
|
import { Header, HeaderContainer, HeaderGlobalBar, HeaderMenuItem, HeaderName, HeaderNavigation, SkipToContent, Tag, Toggletip, ToggletipButton, ToggletipContent, Stack as CarbonStack, } from "@carbon/react";
|
|
2
|
-
import React, { useState } from "react";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
3
|
import C3InfoSidebar from "./c3-navigation-sidebar/c3-info-sidebar";
|
|
4
4
|
import { C3NotificationSidebar } from "./c3-navigation-sidebar/c3-notification-sidebar";
|
|
5
5
|
import C3OrgSidebar from "./c3-navigation-sidebar/c3-org-sidebar";
|
|
@@ -43,7 +43,12 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
|
|
|
43
43
|
const displayAppBar = appBarElementsLength > 0 || (!isLargeScreen && navbar.elements.length > 0);
|
|
44
44
|
if (app.prefix)
|
|
45
45
|
console.warn("The `prefix` prop is deprecated and will be removed in a future release. It has been replaced with a Camunda icon.");
|
|
46
|
-
const [isHelpCenterOpen, setIsHelpCenterOpen] = useState(false);
|
|
46
|
+
const [isHelpCenterOpen, setIsHelpCenterOpen] = useState(helpCenter?.isOpen ?? false);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (helpCenter?.isOpen) {
|
|
49
|
+
setIsHelpCenterOpen(true);
|
|
50
|
+
}
|
|
51
|
+
}, [helpCenter?.isOpen]);
|
|
47
52
|
return (React.createElement(C3SidebarStateProvider, { isNotificationSidebarOpen: notificationSideBar?.isOpen, isOrgSidebarOpen: orgSideBar?.isOpen, isInfoSidebarOpen: infoSideBar?.isOpen, isUserSidebarOpen: userSideBar?.isOpen },
|
|
48
53
|
React.createElement(HeaderContainer, { render: () => {
|
|
49
54
|
return (React.createElement(Header, { "aria-label": app.ariaLabel },
|
|
@@ -59,7 +59,9 @@ export interface C3NavigationProps {
|
|
|
59
59
|
infoButton?: {
|
|
60
60
|
onClick: () => void;
|
|
61
61
|
};
|
|
62
|
-
helpCenter?: Omit<C3HelpCenterProps, "isOpen"
|
|
62
|
+
helpCenter?: Omit<C3HelpCenterProps, "isOpen"> & {
|
|
63
|
+
isOpen?: boolean;
|
|
64
|
+
};
|
|
63
65
|
actionButtons?: C3ActionButtonsProps;
|
|
64
66
|
userSideBar?: WithoutType<C3NavigationUserSideBarProps>;
|
|
65
67
|
notificationSideBar?: WithoutType<C3NavigationNotificationsSideBarProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11-rc.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"clean": "rimraf lib/",
|
|
6
6
|
"build": "yarn clean && tsc",
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"@carbon/react": "1.37.0",
|
|
34
34
|
"@mdx-js/react": "2.3.0",
|
|
35
35
|
"@playwright/test": "1.37.1",
|
|
36
|
-
"@storybook/addon-a11y": "7.4.
|
|
37
|
-
"@storybook/addon-actions": "7.4.
|
|
38
|
-
"@storybook/addon-docs": "7.4.
|
|
39
|
-
"@storybook/addon-essentials": "7.4.
|
|
40
|
-
"@storybook/addon-interactions": "7.4.
|
|
41
|
-
"@storybook/addon-links": "7.4.
|
|
42
|
-
"@storybook/blocks": "7.4.
|
|
36
|
+
"@storybook/addon-a11y": "7.4.5",
|
|
37
|
+
"@storybook/addon-actions": "7.4.5",
|
|
38
|
+
"@storybook/addon-docs": "7.4.5",
|
|
39
|
+
"@storybook/addon-essentials": "7.4.5",
|
|
40
|
+
"@storybook/addon-interactions": "7.4.5",
|
|
41
|
+
"@storybook/addon-links": "7.4.5",
|
|
42
|
+
"@storybook/blocks": "7.4.5",
|
|
43
43
|
"@storybook/preset-scss": "1.0.3",
|
|
44
|
-
"@storybook/react": "7.4.
|
|
45
|
-
"@storybook/react-webpack5": "7.4.
|
|
44
|
+
"@storybook/react": "7.4.5",
|
|
45
|
+
"@storybook/react-webpack5": "7.4.5",
|
|
46
46
|
"@storybook/test-runner": "0.13.0",
|
|
47
47
|
"@storybook/testing-library": "0.2.1",
|
|
48
48
|
"@types/carbon-components-react": "7.55.3",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"sass": "1.66.1",
|
|
77
77
|
"sass-loader": "13.3.2",
|
|
78
78
|
"serve": "14.2.1",
|
|
79
|
-
"storybook": "7.4.
|
|
79
|
+
"storybook": "7.4.5",
|
|
80
80
|
"style-loader": "3.3.3",
|
|
81
81
|
"styled-components": "6.0.7",
|
|
82
82
|
"typescript": "5.2.2",
|