@camunda/camunda-composite-components 0.0.21 → 0.0.23-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.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Camunda Composite Components
2
2
 
3
- Storybook: [Link](https://shiny-sniffle-e6e1a28f.pages.github.io/)
3
+ Storybook: [Link](https://camunda-composite-components.pages.dev/)
4
4
 
5
5
  ## Dev
6
6
 
7
7
  ```bash
8
8
  # install
9
- # yarn
9
+ yarn
10
10
 
11
11
  # start storybook
12
12
  yarn storybook
@@ -19,7 +19,7 @@ yarn build
19
19
 
20
20
  Bump version in `package.json` and create a [new release](https://github.com/camunda-cloud/camunda-composite-components/releases/new). This will start a github action to publish the package to the github package repository.
21
21
 
22
- Pushing to `main` will update the storybook available under [github page](https://shiny-sniffle-e6e1a28f.pages.github.io/).
22
+ Pushing to `main` will update the storybook available under [cloudflare page](https://camunda-composite-components.pages.dev/).
23
23
 
24
24
  ## Usage
25
25
 
@@ -173,16 +173,44 @@ const C3NavigationSideBar = (props) => {
173
173
  sideBar.customElements &&
174
174
  !sideBar.customElements?.activeOrganization && (React.createElement(SwitcherDivider, null)),
175
175
  sideBar.elements &&
176
- sideBar.elements.map((element, index) => (React.createElement(Button, { key: element.key, style: index === 0 && !sideBar.customElements
177
- ? { marginTop: "1.5rem", whiteSpace: "nowrap" }
178
- : { whiteSpace: "nowrap" }, size: "sm", kind: element.kind ?? "ghost", className: "cds--switcher__item", onClick: () => {
179
- if (element.onClick) {
180
- element.onClick();
181
- }
182
- if (sideBar.closeOnClick !== false) {
183
- setSideBarOpen(false);
184
- }
185
- }, tabIndex: itemTabIndex }, element.label)))),
176
+ sideBar.elements.map((element, index) => (React.createElement("span", { key: element.key },
177
+ element.preceedingDivider && React.createElement(SwitcherDivider, null),
178
+ React.createElement(Button, { style: index === 0 && !sideBar.customElements
179
+ ? { marginTop: "1.5rem", whiteSpace: "nowrap" }
180
+ : { whiteSpace: "nowrap" }, size: "sm", kind: element.kind ?? "ghost", className: "cds--switcher__item", onClick: () => {
181
+ if (element.onClick) {
182
+ element.onClick();
183
+ }
184
+ if (sideBar.closeOnClick !== false) {
185
+ setSideBarOpen(false);
186
+ }
187
+ }, tabIndex: itemTabIndex }, element.label)))),
188
+ sideBar.type === "info" && sideBar.version !== undefined && (React.createElement(React.Fragment, null,
189
+ React.createElement(SwitcherDivider, null),
190
+ React.createElement("span", { className: "cds--switcher__item", style: {
191
+ padding: "var(--cds-spacing-05)",
192
+ paddingTop: "var(--cds-spacing-03)",
193
+ paddingBottom: 0,
194
+ color: "var(--cds-text-primary)",
195
+ fontSize: "var(--cds-body-01-font-size)",
196
+ fontWeight: "var(--cds-body-01-font-weight)",
197
+ lineHeight: "var(--cds-body-01-line-height)",
198
+ letterSpacing: "var(--cds-body-01-letter-spacing)",
199
+ } },
200
+ "Version ",
201
+ sideBar.version),
202
+ React.createElement("span", { className: "cds--switcher__item", style: {
203
+ paddingRight: "var(--cds-spacing-05)",
204
+ paddingLeft: "var(--cds-spacing-05)",
205
+ color: "var(--cds-text-secondary)",
206
+ fontSize: "var(--cds-label-01-font-size)",
207
+ fontWeight: "var(--cds-label-01-font-weight)",
208
+ lineHeight: "var(--cds-label-01-line-height)",
209
+ letterSpacing: "var(--cds-label-01-letter-spacing)",
210
+ } },
211
+ `© Camunda Services GmbH ${new Date().getFullYear()}`,
212
+ React.createElement("br", null),
213
+ " All rights reserved.")))),
186
214
  sideBar.bottomElements &&
187
215
  sideBar.bottomElements.map((element) => (React.createElement(Button, { kind: element.kind, key: element.key, className: "cds--switcher__item", renderIcon: element.renderIcon, onClick: () => {
188
216
  if (element.onClick) {
@@ -18,6 +18,7 @@ export interface C3NavigationElementProps {
18
18
  target?: "_blank" | "_self" | "_parent" | "_top";
19
19
  onClick?: () => void;
20
20
  subElements?: C3NavigationElementProps[];
21
+ preceedingDivider?: boolean;
21
22
  }
22
23
  export interface C3NavigationSideBarBaseProps {
23
24
  ariaLabel?: string;
@@ -53,6 +54,7 @@ export interface C3NavigationSideBarBaseProps {
53
54
  };
54
55
  elements?: C3NavigationElementProps[];
55
56
  bottomElements?: C3NavigationElementProps[];
57
+ version?: string;
56
58
  }
57
59
  export interface C3NavigationNavBarProps {
58
60
  elements: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.0.21",
3
+ "version": "0.0.23-rc1",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "storybook": "start-storybook -p 6006",