@camunda/camunda-composite-components 0.2.18-rc.1 → 0.2.18-rc.2

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.
@@ -73,9 +73,6 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
73
73
  }, [showTabId]);
74
74
  if (activeTab === "feedback") {
75
75
  header = "Share your feedback";
76
- content = (React.createElement(Feedback, { audience: audience, theme: theme, mixpanelTrack: mixpanelTrack, setHeader: (head) => {
77
- header = head;
78
- }, salesPlanType: organization?.salesPlan?.type ?? "" }));
79
76
  }
80
77
  else if (activeTab === "recommendations" &&
81
78
  Object.keys(tabTiles).length === 0 &&
@@ -152,35 +149,35 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
152
149
  React.createElement(SideNavItems, null,
153
150
  React.createElement(SideNavMenuItem, null,
154
151
  React.createElement("h5", null, "Help Center")),
155
- React.createElement("li", { style: { marginTop: "4px" } },
156
- React.createElement(Stack, null,
157
- React.createElement("ul", null, tabBar.map(({ name, id, text }) => {
158
- const active = activeTab === name;
159
- let tabBackgroundColor = theme === "light" ? "#F4F4F4" : "#161616";
160
- let tabButtonColor = theme === "light" ? "#525252" : "#f4f4f4";
161
- if (active) {
162
- tabBackgroundColor =
163
- theme === "light" ? "#E5E5E5" : "#8D8D8D3D";
164
- tabButtonColor =
165
- theme === "light" ? "#161616" : "#f4f4f4";
166
- }
167
- return (React.createElement("li", { key: name },
168
- React.createElement(Button, { className: active ? "active" : "", kind: "secondary", onClick: () => {
169
- setActiveTab(name);
170
- mixpanelTrack?.("helpcenter:open", {
171
- to: id,
172
- from: origin,
173
- });
174
- }, style: {
175
- width: "100%",
176
- backgroundColor: tabBackgroundColor,
177
- color: tabButtonColor,
178
- }, "aria-label": text }, text)));
179
- })))),
180
- React.createElement("li", { style: { position: "absolute", bottom: "20px" } },
181
- React.createElement("ul", null, configuration.links.map((link) => (React.createElement(SideNavMenuItem, { key: link.label.split(" ").join("-").toLowerCase(), href: link.link, target: "_blank" },
182
- React.createElement("span", { className: "cds--link" }, link.label)))))))),
183
- content)),
152
+ React.createElement("div", { style: { marginTop: "4px" } },
153
+ React.createElement(Stack, null, tabBar.map(({ name, id, text }) => {
154
+ const active = activeTab === name;
155
+ let tabBackgroundColor = theme === "light" ? "#F4F4F4" : "#161616";
156
+ let tabButtonColor = theme === "light" ? "#525252" : "#f4f4f4";
157
+ if (active) {
158
+ tabBackgroundColor =
159
+ theme === "light" ? "#E5E5E5" : "#8D8D8D3D";
160
+ tabButtonColor = theme === "light" ? "#161616" : "#f4f4f4";
161
+ }
162
+ return (React.createElement(Button, { className: active ? "active" : "", kind: "secondary", onClick: () => {
163
+ setActiveTab(name);
164
+ mixpanelTrack?.("helpcenter:open", {
165
+ to: id,
166
+ from: origin,
167
+ });
168
+ }, style: {
169
+ width: "100%",
170
+ backgroundColor: tabBackgroundColor,
171
+ color: tabButtonColor,
172
+ }, key: name, "aria-label": text }, text));
173
+ }))),
174
+ React.createElement("div", { style: { position: "absolute", bottom: "20px" } }, configuration.links.map((link) => (React.createElement(SideNavMenuItem, { key: link.label.split(" ").join("-").toLowerCase(), href: link.link, target: "_blank" },
175
+ React.createElement("span", { className: "cds--link" }, link.label))))))),
176
+ content,
177
+ React.createElement("div", { style: { display: activeTab === "feedback" ? "block" : "none" } },
178
+ React.createElement(Feedback, { audience: audience, theme: theme, mixpanelTrack: mixpanelTrack, setHeader: (head) => {
179
+ header = head;
180
+ }, salesPlanType: organization?.salesPlan?.type ?? "" })))),
184
181
  persona.complete && activeTab === "recommendations" && (React.createElement(ModalFooter, { style: {
185
182
  height: "62px",
186
183
  paddingRight: "16px",
@@ -157,12 +157,13 @@ export const Feedback = (props) => {
157
157
  // eslint-disable-next-line
158
158
  // @ts-ignore
159
159
  align: "bottom" },
160
- React.createElement(Button, { kind: "ghost", "aria-label": "Information", renderIcon: Information, iconDescription: "Information", style: {
161
- marginTop: "-10px",
162
- backgroundColor: props.theme === "light" ? "#FFFFFF" : "#161616",
163
- color: props.theme === "light" ? "#161616" : "#F4F4F4",
164
- paddingLeft: "0px",
165
- } }))),
160
+ React.createElement("span", { className: "upload-file" },
161
+ React.createElement(Button, { kind: "ghost", renderIcon: Information, iconDescription: "Information", style: {
162
+ marginTop: "-10px",
163
+ backgroundColor: props.theme === "light" ? "#FFFFFF" : "#161616",
164
+ color: props.theme === "light" ? "#161616" : "#F4F4F4",
165
+ paddingLeft: "0px",
166
+ } })))),
166
167
  React.createElement("p", { className: "cds--label-description", style: { marginTop: "-24px" } }, "Max. file size is 5MB. Supported file types are .jpg and .png."))),
167
168
  !orgIsEnterPriseOrPaidCC &&
168
169
  (() => {
@@ -22,7 +22,6 @@ export const DropdownSelect = ({ title, label, elements, selectedElement, setSel
22
22
  setSuggestion(input);
23
23
  setElement(rawElement);
24
24
  };
25
- const titleId = title.replace(/\s/g, "-").toLowerCase();
26
25
  return (React.createElement(React.Fragment, null,
27
26
  React.createElement(Stack, null, (() => {
28
27
  return (React.createElement(React.Fragment, null,
@@ -31,7 +30,7 @@ export const DropdownSelect = ({ title, label, elements, selectedElement, setSel
31
30
  gridTemplateColumns: "58% 42%",
32
31
  } },
33
32
  React.createElement(Stack, { gap: 1 },
34
- React.createElement("h4", { id: titleId }, title),
33
+ React.createElement("h4", null, title),
35
34
  (() => {
36
35
  if (label) {
37
36
  return React.createElement("p", { className: "cds--modal-header__label" }, label);
@@ -39,7 +38,7 @@ export const DropdownSelect = ({ title, label, elements, selectedElement, setSel
39
38
  return React.createElement(React.Fragment, null);
40
39
  })(),
41
40
  " "),
42
- React.createElement(Select, { key: `select-${Math.random() * 10000}`, id: `select-${Math.random() * 10000}`, size: "lg", defaultValue: elements[0].value, "aria-labelledby": titleId, labelText: "", onChange: (event) => {
41
+ React.createElement(Select, { key: `select-${Math.random() * 10000}`, id: `select-${Math.random() * 10000}`, size: "lg", defaultValue: elements[0].value, labelText: "", onChange: (event) => {
43
42
  const element = elements.find((e) => e.value === event.target.value);
44
43
  if (element)
45
44
  setElement(element.value);
@@ -1,13 +1,10 @@
1
1
  import { TextInput, Stack } from "@carbon/react";
2
2
  import React from "react";
3
- export const TextInputElement = ({ title, label, preFiledValue, setValue, placeholder }) => {
4
- const titleId = title.replace(/\s/g, "-").toLowerCase();
5
- return (React.createElement(React.Fragment, null,
6
- React.createElement(Stack, { orientation: "horizontal" },
7
- React.createElement(Stack, { gap: 1 },
8
- React.createElement("h4", { id: titleId }, title),
9
- label && React.createElement("p", { className: "cds--modal-header__label" }, label)),
10
- React.createElement(TextInput, { id: `text-input-element-${Math.random() * 1000}`, placeholder: placeholder ?? "", labelText: "", value: preFiledValue ?? "", onChange: (event) => {
11
- setValue(event.target.value);
12
- }, "aria-labelledby": titleId }))));
13
- };
3
+ export const TextInputElement = ({ title, label, preFiledValue, setValue, placeholder }) => (React.createElement(React.Fragment, null,
4
+ React.createElement(Stack, { orientation: "horizontal" },
5
+ React.createElement(Stack, { gap: 1 },
6
+ React.createElement("h4", null, title),
7
+ label && React.createElement("p", { className: "cds--modal-header__label" }, label)),
8
+ React.createElement(TextInput, { id: `text-input-element-${Math.random() * 1000}`, placeholder: placeholder ?? "", labelText: "", value: preFiledValue ?? "", onChange: (event) => {
9
+ setValue(event.target.value);
10
+ } }))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.2.18-rc.1",
3
+ "version": "0.2.18-rc.2",
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.6",
37
- "@storybook/addon-actions": "7.4.6",
38
- "@storybook/addon-docs": "7.4.6",
39
- "@storybook/addon-essentials": "7.4.6",
40
- "@storybook/addon-interactions": "7.4.6",
41
- "@storybook/addon-links": "7.4.6",
42
- "@storybook/blocks": "7.4.6",
36
+ "@storybook/addon-a11y": "7.5.1",
37
+ "@storybook/addon-actions": "7.5.1",
38
+ "@storybook/addon-docs": "7.5.1",
39
+ "@storybook/addon-essentials": "7.5.1",
40
+ "@storybook/addon-interactions": "7.5.1",
41
+ "@storybook/addon-links": "7.5.1",
42
+ "@storybook/blocks": "7.5.1",
43
43
  "@storybook/preset-scss": "1.0.3",
44
- "@storybook/react": "7.4.6",
45
- "@storybook/react-webpack5": "7.4.6",
44
+ "@storybook/react": "7.5.1",
45
+ "@storybook/react-webpack5": "7.5.1",
46
46
  "@storybook/test-runner": "0.13.0",
47
47
  "@storybook/testing-library": "0.2.2",
48
48
  "@types/carbon-components-react": "7.55.3",
@@ -65,7 +65,7 @@
65
65
  "eslint-plugin-prettier": "5.0.1",
66
66
  "eslint-plugin-react": "7.33.2",
67
67
  "eslint-plugin-react-hooks": "4.6.0",
68
- "eslint-plugin-storybook": "0.6.14",
68
+ "eslint-plugin-storybook": "0.6.15",
69
69
  "event-source-polyfill": "1.0.31",
70
70
  "husky": "8.0.3",
71
71
  "mixpanel-browser": "2.47.0",
@@ -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.6",
79
+ "storybook": "7.5.1",
80
80
  "style-loader": "3.3.3",
81
81
  "styled-components": "6.0.7",
82
82
  "typescript": "5.2.2",