@camunda/camunda-composite-components 0.17.0 → 0.17.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/lib/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,21 +38,19 @@
|
|
|
38
38
|
"@carbon/react": "1.69.0",
|
|
39
39
|
"@mdx-js/react": "3.0.1",
|
|
40
40
|
"@playwright/test": "1.45.2",
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@storybook/addon-
|
|
44
|
-
"@storybook/addon-
|
|
45
|
-
"@storybook/addon-
|
|
46
|
-
"@storybook/addon-
|
|
47
|
-
"@storybook/addon-
|
|
48
|
-
"@storybook/addon-links": "8.2.9",
|
|
49
|
-
"@storybook/addon-mdx-gfm": "8.2.9",
|
|
41
|
+
"@storybook/addon-a11y": "8.6.4",
|
|
42
|
+
"@storybook/addon-actions": "8.6.4",
|
|
43
|
+
"@storybook/addon-docs": "8.6.4",
|
|
44
|
+
"@storybook/addon-essentials": "8.6.4",
|
|
45
|
+
"@storybook/addon-interactions": "8.6.4",
|
|
46
|
+
"@storybook/addon-links": "8.6.4",
|
|
47
|
+
"@storybook/addon-mdx-gfm": "8.6.4",
|
|
50
48
|
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
51
|
-
"@storybook/blocks": "8.
|
|
49
|
+
"@storybook/blocks": "8.6.4",
|
|
52
50
|
"@storybook/preset-scss": "1.0.3",
|
|
53
|
-
"@storybook/react": "8.
|
|
54
|
-
"@storybook/react-webpack5": "8.
|
|
55
|
-
"@storybook/test": "8.
|
|
51
|
+
"@storybook/react": "8.6.4",
|
|
52
|
+
"@storybook/react-webpack5": "8.6.4",
|
|
53
|
+
"@storybook/test": "8.6.4",
|
|
56
54
|
"@storybook/test-runner": "0.19.1",
|
|
57
55
|
"@types/carbon-components-react": "7.55.10",
|
|
58
56
|
"@types/event-source-polyfill": "1.0.5",
|
|
@@ -85,13 +83,12 @@
|
|
|
85
83
|
"rimraf": "6.0.1",
|
|
86
84
|
"sass": "1.74.1",
|
|
87
85
|
"sass-loader": "14.1.1",
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"storybook": "8.2.9",
|
|
86
|
+
"serve": "14.2.4",
|
|
87
|
+
"storybook": "^8.6.4",
|
|
91
88
|
"style-loader": "4.0.0",
|
|
92
89
|
"styled-components": "6.1.8",
|
|
93
90
|
"typescript": "4.9.5",
|
|
94
|
-
"wait-on": "
|
|
91
|
+
"wait-on": "8.0.2",
|
|
95
92
|
"webpack": "5.94.0"
|
|
96
93
|
},
|
|
97
94
|
"dependencies": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from "react";
|
|
2
2
|
import { Close } from "@carbon/react/icons";
|
|
3
|
+
import { styled } from "styled-components";
|
|
3
4
|
import { useOnClickOutside } from "../helpers";
|
|
4
5
|
import { FormLabel, HeaderGlobalAction, HeaderMenuItem, HeaderSideNavItems, Modal, SideNavItems, SideNavLink, SideNavMenu, SideNavMenuItem, } from "@carbon/react";
|
|
5
6
|
import { C3AppMenuIcon } from "../../../assets/c3-icons";
|
|
@@ -65,6 +66,13 @@ const OrgPickerModal = ({ isOpen, onCancel, orgs, activeOrg, loadingStatus, appT
|
|
|
65
66
|
})));
|
|
66
67
|
}))))));
|
|
67
68
|
};
|
|
69
|
+
const SubElementWrapper = styled.ul `
|
|
70
|
+
.cds--side-nav__submenu[aria-expanded="true"] + .cds--side-nav__menu {
|
|
71
|
+
max-block-size: 456px;
|
|
72
|
+
overflow-y: auto;
|
|
73
|
+
visibility: inherit;
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
68
76
|
export const C3NavigationAppBar = ({ app: appProps, appBar, forwardRef, navbar, }) => {
|
|
69
77
|
const { currentApp, domain, analyticsTrack, currentClusterUuid } = useC3UserConfiguration();
|
|
70
78
|
const { orgs, clusters, activeOrg, isEnabled, loadClustersById } = useC3Profile();
|
|
@@ -221,39 +229,40 @@ export const C3NavigationAppBar = ({ app: appProps, appBar, forwardRef, navbar,
|
|
|
221
229
|
setAppBarOpen(false);
|
|
222
230
|
}
|
|
223
231
|
} }, element.label)))))),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
subElement.onClick
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
subElement.routeProps
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
appBar.elementClicked
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
element.onClick
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
element.routeProps
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
appBar.elementClicked
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
232
|
+
React.createElement("li", null,
|
|
233
|
+
React.createElement(SubElementWrapper, { "$expanded": appBarOpen }, appBarElements &&
|
|
234
|
+
appBarElements.map((element) => {
|
|
235
|
+
if (element.subElements && element.subElements.length > 0) {
|
|
236
|
+
return (React.createElement(SideNavMenu, { large: true, title: element.label, key: element.key }, element.subElements.map((subElement) => (React.createElement(SideNavMenuItem, { as: subElement.routeProps && forwardRef, key: subElement.key, href: subElement.href, target: subElement.href ? subElement.target : undefined, isActive: subElement.isActive || subElement.active, ...subElement.routeProps, onClick: () => {
|
|
237
|
+
if (subElement.onClick) {
|
|
238
|
+
subElement.onClick();
|
|
239
|
+
}
|
|
240
|
+
if (subElement.routeProps?.onClick) {
|
|
241
|
+
subElement.routeProps.onClick();
|
|
242
|
+
}
|
|
243
|
+
if (appBar.closeOnClick !== false) {
|
|
244
|
+
setAppBarOpen(false);
|
|
245
|
+
}
|
|
246
|
+
if (appBar.elementClicked) {
|
|
247
|
+
appBar.elementClicked(subElement.key);
|
|
248
|
+
}
|
|
249
|
+
} }, subElement.label)))));
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
return (React.createElement(SideNavLink, { as: element.routeProps && forwardRef, key: element.key, large: true, isActive: element.active, ...element.routeProps, onClick: () => {
|
|
253
|
+
if (element.onClick) {
|
|
254
|
+
element.onClick();
|
|
255
|
+
}
|
|
256
|
+
if (element.routeProps?.onClick) {
|
|
257
|
+
element.routeProps.onClick();
|
|
258
|
+
}
|
|
259
|
+
if (appBar.closeOnClick !== false) {
|
|
260
|
+
setAppBarOpen(false);
|
|
261
|
+
}
|
|
262
|
+
if (appBar.elementClicked) {
|
|
263
|
+
appBar.elementClicked(element.key);
|
|
264
|
+
}
|
|
265
|
+
}, href: element.href, target: element.href ? element.target : undefined }, element.label));
|
|
266
|
+
}
|
|
267
|
+
}))))))));
|
|
259
268
|
};
|
package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js
CHANGED
|
@@ -55,7 +55,7 @@ const C3NavigationSidebarElement = (props) => {
|
|
|
55
55
|
if (props.sideBar.closeOnClick !== false) {
|
|
56
56
|
props.setSideBarOpen(false);
|
|
57
57
|
}
|
|
58
|
-
}, tabIndex: props.itemTabIndex, renderIcon: props.element.renderIcon,
|
|
58
|
+
}, tabIndex: props.itemTabIndex, renderIcon: props.element.renderIcon, ...(isNavLink ? { isActive } : {}) },
|
|
59
59
|
React.createElement("span", { ref: sideBarElementRef, title: isOverflown ? props.element.label : "", style: {
|
|
60
60
|
overflow: "hidden",
|
|
61
61
|
textOverflow: "ellipsis",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -13,21 +13,19 @@
|
|
|
13
13
|
"@carbon/react": "1.69.0",
|
|
14
14
|
"@mdx-js/react": "3.0.1",
|
|
15
15
|
"@playwright/test": "1.45.2",
|
|
16
|
-
"@
|
|
17
|
-
"@
|
|
18
|
-
"@storybook/addon-
|
|
19
|
-
"@storybook/addon-
|
|
20
|
-
"@storybook/addon-
|
|
21
|
-
"@storybook/addon-
|
|
22
|
-
"@storybook/addon-
|
|
23
|
-
"@storybook/addon-links": "8.2.9",
|
|
24
|
-
"@storybook/addon-mdx-gfm": "8.2.9",
|
|
16
|
+
"@storybook/addon-a11y": "8.6.4",
|
|
17
|
+
"@storybook/addon-actions": "8.6.4",
|
|
18
|
+
"@storybook/addon-docs": "8.6.4",
|
|
19
|
+
"@storybook/addon-essentials": "8.6.4",
|
|
20
|
+
"@storybook/addon-interactions": "8.6.4",
|
|
21
|
+
"@storybook/addon-links": "8.6.4",
|
|
22
|
+
"@storybook/addon-mdx-gfm": "8.6.4",
|
|
25
23
|
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
26
|
-
"@storybook/blocks": "8.
|
|
24
|
+
"@storybook/blocks": "8.6.4",
|
|
27
25
|
"@storybook/preset-scss": "1.0.3",
|
|
28
|
-
"@storybook/react": "8.
|
|
29
|
-
"@storybook/react-webpack5": "8.
|
|
30
|
-
"@storybook/test": "8.
|
|
26
|
+
"@storybook/react": "8.6.4",
|
|
27
|
+
"@storybook/react-webpack5": "8.6.4",
|
|
28
|
+
"@storybook/test": "8.6.4",
|
|
31
29
|
"@storybook/test-runner": "0.19.1",
|
|
32
30
|
"@types/carbon-components-react": "7.55.10",
|
|
33
31
|
"@types/event-source-polyfill": "1.0.5",
|
|
@@ -60,13 +58,12 @@
|
|
|
60
58
|
"rimraf": "6.0.1",
|
|
61
59
|
"sass": "1.74.1",
|
|
62
60
|
"sass-loader": "14.1.1",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"storybook": "8.2.9",
|
|
61
|
+
"serve": "14.2.4",
|
|
62
|
+
"storybook": "^8.6.4",
|
|
66
63
|
"style-loader": "4.0.0",
|
|
67
64
|
"styled-components": "6.1.8",
|
|
68
65
|
"typescript": "4.9.5",
|
|
69
|
-
"wait-on": "
|
|
66
|
+
"wait-on": "8.0.2",
|
|
70
67
|
"webpack": "5.94.0"
|
|
71
68
|
},
|
|
72
69
|
"dependencies": {
|