@camunda/camunda-composite-components 0.0.25 → 0.0.26
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/README.md
CHANGED
|
@@ -25,7 +25,7 @@ yarn build
|
|
|
25
25
|
|
|
26
26
|
## Release
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Just create a [new release](https://github.com/camunda-cloud/camunda-composite-components/releases/new). This will start a github action to bump the version in `package.json` and publish the package to the github package repository.
|
|
29
29
|
|
|
30
30
|
Pushing to `main` will update the storybook available under [cloudflare page](https://camunda-composite-components.pages.dev/).
|
|
31
31
|
|
|
@@ -168,18 +168,7 @@ const C3NavigationSideBar = (props) => {
|
|
|
168
168
|
sideBar.customElements &&
|
|
169
169
|
!sideBar.customElements?.activeOrganization && (React.createElement(SwitcherDivider, null)),
|
|
170
170
|
sideBar.elements &&
|
|
171
|
-
sideBar.elements.map((element, index) => (React.createElement(
|
|
172
|
-
element.preceedingDivider && React.createElement(SwitcherDivider, null),
|
|
173
|
-
React.createElement(Button, { style: index === 0 && !sideBar.customElements
|
|
174
|
-
? { marginTop: "1.5rem", whiteSpace: "nowrap" }
|
|
175
|
-
: { whiteSpace: "nowrap" }, size: "sm", kind: element.kind ?? "ghost", className: "cds--switcher__item", onClick: () => {
|
|
176
|
-
if (element.onClick) {
|
|
177
|
-
element.onClick();
|
|
178
|
-
}
|
|
179
|
-
if (sideBar.closeOnClick !== false) {
|
|
180
|
-
setSideBarOpen(false);
|
|
181
|
-
}
|
|
182
|
-
}, tabIndex: itemTabIndex }, element.label)))),
|
|
171
|
+
sideBar.elements.map((element, index) => (React.createElement(C3NavigationSideBarElement, { key: element.key, element: element, index: index, sideBar: sideBar, setSideBarOpen: setSideBarOpen, itemTabIndex: itemTabIndex }))),
|
|
183
172
|
sideBar.type === "info" && sideBar.version !== undefined && (React.createElement(React.Fragment, null,
|
|
184
173
|
React.createElement(SwitcherDivider, null),
|
|
185
174
|
React.createElement("span", { className: "cds--switcher__item", style: {
|
|
@@ -218,6 +207,20 @@ const C3NavigationSideBar = (props) => {
|
|
|
218
207
|
}
|
|
219
208
|
return null;
|
|
220
209
|
};
|
|
210
|
+
const C3NavigationSideBarElement = (props) => {
|
|
211
|
+
return (React.createElement(React.Fragment, null,
|
|
212
|
+
props.element.preceedingDivider && React.createElement(SwitcherDivider, null),
|
|
213
|
+
React.createElement(Button, { style: props.index === 0 && !props.sideBar.customElements
|
|
214
|
+
? { marginTop: "1.5rem", whiteSpace: "nowrap" }
|
|
215
|
+
: { whiteSpace: "nowrap" }, size: "sm", kind: props.element.kind ?? "ghost", className: "cds--switcher__item", onClick: () => {
|
|
216
|
+
if (props.element.onClick) {
|
|
217
|
+
props.element.onClick();
|
|
218
|
+
}
|
|
219
|
+
if (props.sideBar.closeOnClick !== false) {
|
|
220
|
+
props.setSideBarOpen(false);
|
|
221
|
+
}
|
|
222
|
+
}, tabIndex: props.itemTabIndex }, props.element.label)));
|
|
223
|
+
};
|
|
221
224
|
export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, userSideBar, }) => {
|
|
222
225
|
const isLargeScreen = useMediaQuery(`(min-width: ${BREAKPOINT_LG_WIDTH}`);
|
|
223
226
|
const appBarElementsLength = appBar.elements?.length ?? 0;
|