@camunda/camunda-composite-components 0.0.37 → 0.0.38-rc1

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.
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ export declare const InfoButton: FC<{
3
+ onClick: () => void;
4
+ }>;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { HeaderGlobalAction } from "@carbon/react";
3
+ import { Help } from "@carbon/react/icons";
4
+ export const InfoButton = ({ onClick }) => (React.createElement(HeaderGlobalAction, { "aria-label": "Open Help Center", tooltipAlignment: "center", onClick: onClick },
5
+ React.createElement(Help, { size: 20 })));
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { C3NavigationProps } from "./c3-navigation.types";
3
- export declare const C3Navigation: ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, userSideBar, notificationSideBar, }: C3NavigationProps) => JSX.Element;
3
+ export declare const C3Navigation: ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, infoButton, userSideBar, notificationSideBar, }: C3NavigationProps) => JSX.Element;
@@ -8,6 +8,7 @@ import { useMediaQuery } from "./helpers";
8
8
  import { C3NavigationAppBar } from "./c3-navigation-appbar";
9
9
  import styled from "styled-components";
10
10
  import { CamundaLogo } from "../../icons/c3-icons";
11
+ import { InfoButton } from "./c3-info-button";
11
12
  /**
12
13
  * UI SHELL
13
14
  * Docs: https://react.carbondesignsystem.com/?path=/story/components-ui-shell--fixed-side-nav
@@ -27,7 +28,7 @@ const StyledToggletipContent = styled(ToggletipContent) `
27
28
  color: var(--cds-link-hover-text-color);
28
29
  }
29
30
  `;
30
- export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, userSideBar, notificationSideBar, }) => {
31
+ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, infoSideBar, infoButton, userSideBar, notificationSideBar, }) => {
31
32
  const isLargeScreen = useMediaQuery(`(min-width: ${BREAKPOINT_LG_WIDTH}`);
32
33
  const appBarElementsLength = appBar.elements?.length ?? 0;
33
34
  const displayAppBar = appBarElementsLength > 0 || (!isLargeScreen && navbar.elements.length > 0);
@@ -82,7 +83,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
82
83
  } }, navbar.orgName))),
83
84
  notificationSideBar && (React.createElement(C3NotificationSidebar, { sideBar: { ...notificationSideBar, type: "notifications" } })),
84
85
  orgSideBar && (React.createElement(C3OrgSidebar, { sideBar: { ...orgSideBar, type: "org" } })),
85
- infoSideBar && (React.createElement(C3InfoSidebar, { sideBar: { ...infoSideBar, type: "info" } })),
86
+ infoButton ? (React.createElement(InfoButton, { onClick: infoButton.onClick })) : (infoSideBar && (React.createElement(C3InfoSidebar, { sideBar: { ...infoSideBar, type: "info" } }))),
86
87
  userSideBar && (React.createElement(C3UserSidebar, { sideBar: { ...userSideBar, type: "user" } })))));
87
88
  } }));
88
89
  };
@@ -53,6 +53,9 @@ export interface C3NavigationProps {
53
53
  appBar: WithoutType<C3NavigationAppBarProps>;
54
54
  orgSideBar?: WithoutType<C3NavigationOrgSideBarProps>;
55
55
  infoSideBar?: WithoutType<C3NavigationInfoSideBarProps>;
56
+ infoButton?: {
57
+ onClick: () => void;
58
+ };
56
59
  userSideBar?: WithoutType<C3NavigationUserSideBarProps>;
57
60
  notificationSideBar?: WithoutType<C3NavigationNotificationsSideBarProps>;
58
61
  navbar: C3NavigationNavBarProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.0.37",
3
+ "version": "0.0.38-rc1",
4
4
  "scripts": {
5
5
  "clean": "rimraf lib/",
6
6
  "copy-css-files": "copyfiles -u 1 src/components/**/*.css lib/esm",