@camunda/camunda-composite-components 0.20.2 → 0.20.3
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 +27 -28
- package/lib/esm/src/api/clusters.js +1 -1
- package/lib/esm/src/api/endpoints.const.js +2 -0
- package/lib/esm/src/api/help-center.d.ts +1 -1
- package/lib/esm/src/api/status.js +1 -1
- package/lib/esm/src/assets/c3-icons.d.ts +4 -4
- package/lib/esm/src/assets/c3-icons.js +5 -14
- package/lib/esm/src/components/c3-app-teaser/app-teaser-cards.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/app-teaser-cards.js +10 -19
- package/lib/esm/src/components/c3-app-teaser/app-teaster-card.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/app-teaster-card.js +4 -8
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser-page.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser-page.js +2 -2
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser.js +8 -9
- package/lib/esm/src/components/c3-cluster-tag/c3-cluster-tag.d.ts +2 -1
- package/lib/esm/src/components/c3-cluster-tag/c3-cluster-tag.js +9 -8
- package/lib/esm/src/components/c3-data-table/c3-data-table.js +84 -70
- package/lib/esm/src/components/c3-data-table/c3-data-table.types.d.ts +3 -2
- package/lib/esm/src/components/c3-data-table/link-button/link-button.js +2 -4
- package/lib/esm/src/components/c3-data-table/link-button/link-button.types.d.ts +0 -1
- package/lib/esm/src/components/c3-empty-state/c3-empty-state.js +9 -29
- package/lib/esm/src/components/c3-help-center/c3-help-center-provider.js +3 -2
- package/lib/esm/src/components/c3-help-center/c3-help-center.js +3 -7
- package/lib/esm/src/components/c3-help-center/help-center-hint.d.ts +1 -1
- package/lib/esm/src/components/c3-help-center/help-center-hint.js +6 -10
- package/lib/esm/src/components/c3-help-center/help-center.d.ts +1 -1
- package/lib/esm/src/components/c3-help-center/help-center.js +69 -102
- package/lib/esm/src/components/c3-help-center/tabs/feedback.js +41 -89
- package/lib/esm/src/components/c3-help-center/tabs/tabContent.js +2 -5
- package/lib/esm/src/components/c3-help-center/tabs/tabContentSkeleton.js +4 -5
- package/lib/esm/src/components/c3-help-center/tile.js +16 -30
- package/lib/esm/src/components/c3-navigation/c3-info-button.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-info-button.js +2 -3
- package/lib/esm/src/components/c3-navigation/c3-navigation-actions/c3-action-buttons.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-actions/c3-action-buttons.js +9 -9
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/c3-navigation-appbar.js +72 -87
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/components.d.ts +1 -5
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/components.js +1 -0
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.js +20 -28
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js +23 -27
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.js +29 -37
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +18 -24
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.js +3 -2
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.js +13 -37
- package/lib/esm/src/components/c3-navigation/c3-navigation.js +78 -120
- package/lib/esm/src/components/c3-navigation/c3-navigation.types.d.ts +5 -6
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.js +10 -18
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-provider.js +4 -4
- package/lib/esm/src/components/c3-navigation/c3-org-name.js +2 -4
- package/lib/esm/src/components/c3-navigation/c3-org-sidebar/c3-org-sidebar.js +48 -60
- package/lib/esm/src/components/c3-navigation/c3-org-sidebar/components.js +23 -13
- package/lib/esm/src/components/c3-navigation/helpers.d.ts +2 -3
- package/lib/esm/src/components/c3-navigation/index.d.ts +1 -2
- package/lib/esm/src/components/c3-navigation/stories/story-helpers.js +3 -5
- package/lib/esm/src/components/c3-navigation/stories/story-templates.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/stories/story-templates.js +23 -29
- package/lib/esm/src/components/c3-onboarding-survey/c3-onboarding-survey.js +2 -1
- package/lib/esm/src/components/c3-onboarding-survey/elements/dropdownSelect.js +25 -38
- package/lib/esm/src/components/c3-onboarding-survey/elements/radioGroupMulti.js +45 -56
- package/lib/esm/src/components/c3-onboarding-survey/elements/radioGroupSingle.js +24 -34
- package/lib/esm/src/components/c3-onboarding-survey/elements/textField.js +4 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.d.ts +9 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.js +31 -42
- package/lib/esm/src/components/c3-onboarding-survey/onboardingPage.d.ts +9 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingPage.js +27 -39
- package/lib/esm/src/components/c3-onboarding-survey/onboardingSurvey.js +9 -13
- package/lib/esm/src/components/c3-onboarding-survey/step.js +27 -27
- package/lib/esm/src/components/c3-page/c3-breadcrumb/c3-breadcrumb.js +8 -17
- package/lib/esm/src/components/c3-page/c3-page.js +2 -9
- package/lib/esm/src/components/c3-page/c3-tabs/c3-tabs.js +4 -5
- package/lib/esm/src/components/c3-responsive-stack/c3-responsive-stack.d.ts +2 -0
- package/lib/esm/src/components/c3-responsive-stack/c3-responsive-stack.js +13 -0
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.d.ts +1 -1
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +5 -4
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/carbon-theme-provider.js +3 -2
- package/lib/esm/src/components/c3-user-configuration/c3-user-configuration-provider.js +3 -4
- package/lib/esm/src/contexts/c3-cluster-update-manager.d.ts +1 -1
- package/lib/esm/src/contexts/c3-cluster-update-manager.js +3 -2
- package/lib/esm/src/hooks/useApi.d.ts +4 -5
- package/lib/esm/src/index.d.ts +1 -0
- package/lib/esm/src/index.js +1 -0
- package/package.json +20 -27
- package/README.md +0 -197
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { Loading, ProgressIndicator, ProgressStep, Stack } from "@carbon/react";
|
|
2
3
|
import React, { useState } from "react";
|
|
3
4
|
import { OnboardingModal } from "./onboardingModal";
|
|
@@ -119,25 +120,20 @@ export const OnboardingSurvey = ({ appTheme, persona, userFirstName, syncPersona
|
|
|
119
120
|
else {
|
|
120
121
|
theme = "dark";
|
|
121
122
|
}
|
|
122
|
-
const content = (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"Get personalized next steps and educational content by answering this 1-minute survey."),
|
|
127
|
-
React.createElement(Stack, { gap: 8 },
|
|
128
|
-
React.createElement(ProgressIndicator, { currentIndex: step, spaceEqually: true, onChange: tryStepTo }, isLoadingConfig ? (React.createElement(Loading, null)) : (onboardingConfiguration.steps.map((currentStep, index) => (React.createElement(ProgressStep, { label: `Step ${index + 1}`, secondaryLabel: currentStep.title, key: `onboarding-step-${index}`, disabled: step !== index }))))),
|
|
129
|
-
React.createElement(OnboardingStep, { theme: theme, generic: generic, setGeneric: setGeneric, config: onboardingConfiguration.steps[step] }))));
|
|
123
|
+
const content = (_jsxs(_Fragment, { children: [_jsx(Body01, { children: isLoadingConfig
|
|
124
|
+
? ""
|
|
125
|
+
: onboardingConfiguration?.header?.description ||
|
|
126
|
+
"Get personalized next steps and educational content by answering this 1-minute survey." }), _jsxs(Stack, { gap: 8, children: [_jsx(ProgressIndicator, { currentIndex: step, spaceEqually: true, onChange: tryStepTo, children: isLoadingConfig ? (_jsx(Loading, {})) : (onboardingConfiguration.steps.map((currentStep, index) => (_jsx(ProgressStep, { label: `Step ${index + 1}`, secondaryLabel: currentStep.title, disabled: step !== index }, `onboarding-step-${index}`)))) }), _jsx(OnboardingStep, { theme: theme, generic: generic, setGeneric: setGeneric, config: onboardingConfiguration.steps[step] })] })] }));
|
|
130
127
|
if (modal) {
|
|
131
|
-
return (
|
|
128
|
+
return (_jsx(OnboardingModal, { isDoingAsyncWork: isDoingAsyncWork, heading: isLoadingConfig
|
|
132
129
|
? ""
|
|
133
130
|
: onboardingConfiguration.header?.title ||
|
|
134
|
-
`Welcome to Camunda, ${userFirstName}!`, headingLabel: "", primaryButtonText: "Next", primaryButtonDisabled: !nextEnabled(step), secondaryButtonText: step === 0 ? undefined : "Previous", tertiaryButtonText: step === 0 ? "Skip customization" : undefined, loadingText: "Loading", theme: theme, onPrimary: stepForward, onRequestClose: onRequestClose, onSecondary: secondaryButtonAction, onTertiary: step === 0 ? secondaryButtonAction : undefined
|
|
131
|
+
`Welcome to Camunda, ${userFirstName}!`, headingLabel: "", primaryButtonText: "Next", primaryButtonDisabled: !nextEnabled(step), secondaryButtonText: step === 0 ? undefined : "Previous", tertiaryButtonText: step === 0 ? "Skip customization" : undefined, loadingText: "Loading", theme: theme, onPrimary: stepForward, onRequestClose: onRequestClose, onSecondary: secondaryButtonAction, onTertiary: step === 0 ? secondaryButtonAction : undefined, children: content }));
|
|
135
132
|
}
|
|
136
133
|
else {
|
|
137
|
-
return (
|
|
138
|
-
React.createElement(OnboardingPage, { isDoingAsyncWork: isDoingAsyncWork, heading: isLoadingConfig
|
|
134
|
+
return (_jsx(_Fragment, { children: _jsx(OnboardingPage, { isDoingAsyncWork: isDoingAsyncWork, heading: isLoadingConfig
|
|
139
135
|
? ""
|
|
140
136
|
: onboardingConfiguration?.header?.title ||
|
|
141
|
-
`Welcome to Camunda, ${userFirstName}!`, headingLabel: "", primaryButtonText: "Next", primaryButtonDisabled: !nextEnabled(step), secondaryButtonText: step === 0 ? undefined : "Previous", tertiaryButtonText: step === 0 ? "Skip customization" : undefined, loadingText: "Loading", onPrimary: stepForward, onSecondary: secondaryButtonAction, onTertiary: step === 0 ? secondaryButtonAction : undefined
|
|
137
|
+
`Welcome to Camunda, ${userFirstName}!`, headingLabel: "", primaryButtonText: "Next", primaryButtonDisabled: !nextEnabled(step), secondaryButtonText: step === 0 ? undefined : "Previous", tertiaryButtonText: step === 0 ? "Skip customization" : undefined, loadingText: "Loading", onPrimary: stepForward, onSecondary: secondaryButtonAction, onTertiary: step === 0 ? secondaryButtonAction : undefined, children: content }) }));
|
|
142
138
|
}
|
|
143
139
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Stack } from "@carbon/react";
|
|
2
|
-
import React from "react";
|
|
3
3
|
import { RadioGroupElementSingle } from "./elements/radioGroupSingle";
|
|
4
4
|
import { RadioGroupElementMulti } from "./elements/radioGroupMulti";
|
|
5
5
|
import { TextInputElement } from "./elements/textField";
|
|
6
6
|
import { DropdownSelect } from "./elements/dropdownSelect";
|
|
7
7
|
import { OnboardingQuestionType } from "./onboarding.types";
|
|
8
8
|
export const OnboardingStep = ({ theme, config, generic, setGeneric, }) => {
|
|
9
|
-
return (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
return config?.elements.map((element, index) => {
|
|
14
|
-
switch (element.type) {
|
|
15
|
-
case OnboardingQuestionType.TileSingleSelect:
|
|
16
|
-
return (React.createElement(RadioGroupElementSingle, { theme: theme, tooltip: element.tooltip, elements: element.elements, selectedElement: generic(element.mapto), setSelectedElement: (e) => {
|
|
17
|
-
setGeneric(element.mapto, e);
|
|
18
|
-
}, title: element.title, label: element.label, columns: element.columns, key: `onboarding-step-element-${index}` }));
|
|
19
|
-
case OnboardingQuestionType.TileMultiSelect:
|
|
20
|
-
return (React.createElement(RadioGroupElementMulti, { theme: theme, tooltip: element.tooltip, elements: element.elements, selectedElements: generic(element.mapto) ?? [], setSelectedElements: (e) => {
|
|
21
|
-
setGeneric(element.mapto, e);
|
|
22
|
-
}, title: element.title, label: element.label, columns: element.columns, key: `onboarding-step-element-${index}` }));
|
|
23
|
-
case OnboardingQuestionType.DropdownSelect:
|
|
24
|
-
return (React.createElement(DropdownSelect, { tooltip: element.tooltip, elements: element.elements, selectedElement: generic(element.mapto), setSelectedElement: (e) => {
|
|
25
|
-
setGeneric(element.mapto, e);
|
|
26
|
-
}, title: element.title, label: element.label, columns: element.columns, exceptionTitle: element.exceptiontextinput?.title, exceptionLabel: element.exceptiontextinput?.label, exceptionValue: element.exceptiontextinput?.forvalue, key: `onboarding-step-element-${index}` }));
|
|
27
|
-
case OnboardingQuestionType.TextInput:
|
|
28
|
-
return (React.createElement(TextInputElement, { title: element.title, label: element.label, preFiledValue: generic(element.mapto), setValue: (value) => {
|
|
29
|
-
setGeneric(element.mapto, value);
|
|
30
|
-
}, placeholder: "Your company\u2019s name", key: `onboarding-step-element-${index}` }));
|
|
31
|
-
default:
|
|
32
|
-
return React.createElement(React.Fragment, null);
|
|
9
|
+
return (_jsx(Stack, { gap: 6, children: (() => {
|
|
10
|
+
if (!config?.elements) {
|
|
11
|
+
return _jsx(_Fragment, {});
|
|
33
12
|
}
|
|
34
|
-
|
|
35
|
-
|
|
13
|
+
return config?.elements.map((element, index) => {
|
|
14
|
+
switch (element.type) {
|
|
15
|
+
case OnboardingQuestionType.TileSingleSelect:
|
|
16
|
+
return (_jsx(RadioGroupElementSingle, { theme: theme, tooltip: element.tooltip, elements: element.elements, selectedElement: generic(element.mapto), setSelectedElement: (e) => {
|
|
17
|
+
setGeneric(element.mapto, e);
|
|
18
|
+
}, title: element.title, label: element.label, columns: element.columns }, `onboarding-step-element-${index}`));
|
|
19
|
+
case OnboardingQuestionType.TileMultiSelect:
|
|
20
|
+
return (_jsx(RadioGroupElementMulti, { theme: theme, tooltip: element.tooltip, elements: element.elements, selectedElements: generic(element.mapto) ?? [], setSelectedElements: (e) => {
|
|
21
|
+
setGeneric(element.mapto, e);
|
|
22
|
+
}, title: element.title, label: element.label, columns: element.columns }, `onboarding-step-element-${index}`));
|
|
23
|
+
case OnboardingQuestionType.DropdownSelect:
|
|
24
|
+
return (_jsx(DropdownSelect, { tooltip: element.tooltip, elements: element.elements, selectedElement: generic(element.mapto), setSelectedElement: (e) => {
|
|
25
|
+
setGeneric(element.mapto, e);
|
|
26
|
+
}, title: element.title, label: element.label, columns: element.columns, exceptionTitle: element.exceptiontextinput?.title, exceptionLabel: element.exceptiontextinput?.label, exceptionValue: element.exceptiontextinput?.forvalue }, `onboarding-step-element-${index}`));
|
|
27
|
+
case OnboardingQuestionType.TextInput:
|
|
28
|
+
return (_jsx(TextInputElement, { title: element.title, label: element.label, preFiledValue: generic(element.mapto), setValue: (value) => {
|
|
29
|
+
setGeneric(element.mapto, value);
|
|
30
|
+
}, placeholder: "Your company\u2019s name" }, `onboarding-step-element-${index}`));
|
|
31
|
+
default:
|
|
32
|
+
return _jsx(_Fragment, {});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
})() }));
|
|
36
36
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Breadcrumb, BreadcrumbItem, BreadcrumbSkeleton, Link, OverflowMenu, OverflowMenuItem, SkeletonText, Stack, Tag, } from "@carbon/react";
|
|
2
|
-
import React from "react";
|
|
3
3
|
const breadCrumbWrapperStyles = {
|
|
4
4
|
minHeight: "40px",
|
|
5
5
|
display: "grid",
|
|
@@ -10,23 +10,14 @@ const breadCrumbWrapperStyles = {
|
|
|
10
10
|
export const C3Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu, tag, forwardRef, }) => {
|
|
11
11
|
let breadcrumb = null;
|
|
12
12
|
if (loading) {
|
|
13
|
-
breadcrumb = (
|
|
14
|
-
React.createElement(BreadcrumbSkeleton, null),
|
|
15
|
-
title && React.createElement(SkeletonText, null)));
|
|
13
|
+
breadcrumb = (_jsxs(Stack, { children: [_jsx(BreadcrumbSkeleton, {}), title && _jsx(SkeletonText, {})] }));
|
|
16
14
|
}
|
|
17
15
|
else {
|
|
18
|
-
breadcrumb = (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(menu || title || tag) && (React.createElement("div", { style: breadCrumbWrapperStyles },
|
|
24
|
-
React.createElement(Stack, { orientation: "horizontal", gap: 4 },
|
|
25
|
-
title && React.createElement("h2", null, title),
|
|
26
|
-
tag && React.createElement(Tag, { type: "blue" }, tag)),
|
|
27
|
-
menu && (React.createElement(OverflowMenu, { style: { float: "right" }, "aria-label": "breadcrumb menu" }, menu.map((item) => {
|
|
28
|
-
return (React.createElement(OverflowMenuItem, { key: item.key, id: item.key, onClick: () => item.onClick(), itemText: item.label, isDelete: item.isDelete }));
|
|
29
|
-
})))))));
|
|
16
|
+
breadcrumb = (_jsxs(Stack, { gap: 1, children: [_jsx(Breadcrumb, { noTrailingSlash: noTrailingSlash ?? false, children: elements.map((element) => {
|
|
17
|
+
return (_jsx(BreadcrumbItem, { children: _jsx(Link, { as: forwardRef, style: { cursor: "pointer" }, ...element.routeProps, children: element.label }) }, element.key));
|
|
18
|
+
}) }), (menu || title || tag) && (_jsxs("div", { style: breadCrumbWrapperStyles, children: [_jsxs(Stack, { orientation: "horizontal", gap: 4, children: [title && _jsx("h2", { children: title }), tag && _jsx(Tag, { type: "blue", children: tag })] }), menu && (_jsx(OverflowMenu, { style: { float: "right" }, "aria-label": "breadcrumb menu", children: menu.map((item) => {
|
|
19
|
+
return (_jsx(OverflowMenuItem, { id: item.key, onClick: () => item.onClick(), itemText: item.label, isDelete: item.isDelete }, item.key));
|
|
20
|
+
}) }))] }))] }));
|
|
30
21
|
}
|
|
31
|
-
return
|
|
22
|
+
return _jsx("div", { style: breadCrumbWrapperStyles, children: breadcrumb });
|
|
32
23
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Grid, Column, Stack } from "@carbon/react";
|
|
3
3
|
import { C3Tabs } from "./c3-tabs/c3-tabs";
|
|
4
4
|
import { C3Breadcrumb } from "./c3-breadcrumb/c3-breadcrumb";
|
|
@@ -6,13 +6,6 @@ import { DefaultStyleWrapper } from "../styles";
|
|
|
6
6
|
const gridStyles = { paddingRight: 0, paddingLeft: 0 };
|
|
7
7
|
const gridColumnStyles = { marginInline: 0 };
|
|
8
8
|
const C3Page = ({ header, tabs, children, isLoading = false, breadcrumbs = { elements: [] }, }) => {
|
|
9
|
-
return (
|
|
10
|
-
React.createElement(Grid, { style: gridStyles },
|
|
11
|
-
React.createElement(Column, { span: 16, style: gridColumnStyles },
|
|
12
|
-
React.createElement(Stack, { orientation: "vertical", gap: 7 },
|
|
13
|
-
(breadcrumbs.elements?.length || header) && (React.createElement(C3Breadcrumb, { ...breadcrumbs, title: header?.title, menu: header?.menuItems, tag: header?.tag, loading: isLoading })),
|
|
14
|
-
tabs && (React.createElement(Stack, { orientation: "vertical", gap: 5 },
|
|
15
|
-
React.createElement(C3Tabs, { tabs: tabs.list, desiredTabId: tabs?.activeTabId, onTabChange: tabs?.onChange, loading: isLoading }))),
|
|
16
|
-
children)))));
|
|
9
|
+
return (_jsx(DefaultStyleWrapper, { children: _jsx(Grid, { style: gridStyles, children: _jsx(Column, { span: 16, style: gridColumnStyles, children: _jsxs(Stack, { orientation: "vertical", gap: 7, children: [(breadcrumbs.elements?.length || header) && (_jsx(C3Breadcrumb, { ...breadcrumbs, title: header?.title, menu: header?.menuItems, tag: header?.tag, loading: isLoading })), tabs && (_jsx(Stack, { orientation: "vertical", gap: 5, children: _jsx(C3Tabs, { tabs: tabs.list, desiredTabId: tabs?.activeTabId, onTabChange: tabs?.onChange, loading: isLoading }) })), children] }) }) }) }));
|
|
17
10
|
};
|
|
18
11
|
export { C3Page };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Tab, TabList, TabPanel, TabPanels, Tabs, TabsSkeleton, } from "@carbon/react";
|
|
2
3
|
import React from "react";
|
|
3
4
|
const TabPanelStyles = { paddingLeft: 0, paddingRight: 0 };
|
|
@@ -19,15 +20,13 @@ export const C3Tabs = ({ tabs, desiredTabId, onTabChange, loading = false, }) =>
|
|
|
19
20
|
setActiveTabIndex(selectedTab);
|
|
20
21
|
}, [selectedTab]);
|
|
21
22
|
if (loading) {
|
|
22
|
-
return
|
|
23
|
+
return _jsx(TabsSkeleton, {}, "tabs-skeleton");
|
|
23
24
|
}
|
|
24
|
-
return (
|
|
25
|
+
return (_jsxs(Tabs, { selectedIndex: activeTabIndex, onChange: (event) => {
|
|
25
26
|
setActiveTabIndex(event.selectedIndex);
|
|
26
27
|
const newDesiredTab = visibleTabs[event.selectedIndex].id;
|
|
27
28
|
if (event.selectedIndex !== activeTabIndex && onTabChange) {
|
|
28
29
|
onTabChange(newDesiredTab);
|
|
29
30
|
}
|
|
30
|
-
} },
|
|
31
|
-
React.createElement(TabList, { "aria-label": "tabs" }, visibleTabs.map((tab) => (React.createElement(Tab, { key: `${tab.id}-label` }, tab.label)))),
|
|
32
|
-
React.createElement(TabPanels, null, visibleTabs.map((tab) => (React.createElement(TabPanel, { key: tab.id, style: TabPanelStyles }, tab.content))))));
|
|
31
|
+
}, children: [_jsx(TabList, { "aria-label": "tabs", children: visibleTabs.map((tab) => (_jsx(Tab, { children: tab.label }, `${tab.id}-label`))) }), _jsx(TabPanels, { children: visibleTabs.map((tab) => (_jsx(TabPanel, { style: TabPanelStyles, children: tab.content }, tab.id))) })] }));
|
|
33
32
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { styled } from "styled-components";
|
|
2
|
+
const C3ResponsiveStack = styled.div `
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: ${({ orientation }) => `${orientation === "vertical" ? "column" : "row"}`};
|
|
5
|
+
gap: ${({ gap }) => `${typeof gap === "string" ? gap : `${(gap ?? 1) * 16}px`}`};
|
|
6
|
+
${({ alignItems }) => (alignItems ? `align-items: ${alignItems};` : "")}
|
|
7
|
+
${({ justifyContent }) => justifyContent ? `justify-content: ${justifyContent};` : ""}
|
|
8
|
+
|
|
9
|
+
@media (max-width: 768px) {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
export { C3ResponsiveStack };
|
package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export type C3ProfileContextValue = {
|
|
|
21
21
|
export declare const C3ProfileContext: React.Context<C3ProfileContextValue>;
|
|
22
22
|
export declare const C3ProfileProvider: ({ children }: {
|
|
23
23
|
children: JSX.Element;
|
|
24
|
-
}) => JSX.Element;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export declare const useC3Profile: () => C3ProfileContextValue;
|
package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useEffect, useRef, useState, } from "react";
|
|
2
3
|
import { C3UserConfigurationContext } from "../c3-user-configuration-provider";
|
|
3
4
|
import { getUserTheme, updateTheme, getClusters, getOrgs, } from "../../../api/profile";
|
|
4
5
|
import { CarbonThemeProvider, resolveTheme, } from "./carbon-theme-provider";
|
|
@@ -91,8 +92,8 @@ export const C3ProfileProvider = ({ children }) => {
|
|
|
91
92
|
};
|
|
92
93
|
if (!isEnabled)
|
|
93
94
|
return children;
|
|
94
|
-
const content = config.handleTheme ? (
|
|
95
|
-
return (
|
|
95
|
+
const content = config.handleTheme ? (_jsx(CarbonThemeProvider, { children: children })) : (children);
|
|
96
|
+
return (_jsx(C3ProfileContext.Provider, { value: {
|
|
96
97
|
isEnabled,
|
|
97
98
|
theme: themeRef.current,
|
|
98
99
|
resolvedTheme,
|
|
@@ -105,6 +106,6 @@ export const C3ProfileProvider = ({ children }) => {
|
|
|
105
106
|
removeOrg,
|
|
106
107
|
onThemeChange,
|
|
107
108
|
loadClustersById,
|
|
108
|
-
}
|
|
109
|
+
}, children: content }));
|
|
109
110
|
};
|
|
110
111
|
export const useC3Profile = () => useContext(C3ProfileContext);
|
package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/carbon-theme-provider.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
2
3
|
import { useC3Profile } from "./c3-profile-provider";
|
|
3
4
|
import { GlobalTheme } from "@carbon/react";
|
|
4
5
|
const THEMES = {
|
|
@@ -19,5 +20,5 @@ export const CarbonThemeProvider = ({ children }) => {
|
|
|
19
20
|
useEffect(() => {
|
|
20
21
|
updateCarbonTheme(getCarbonTheme(resolvedTheme));
|
|
21
22
|
}, [resolvedTheme]);
|
|
22
|
-
return
|
|
23
|
+
return _jsx(GlobalTheme, { theme: carbonTheme, children: children });
|
|
23
24
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React, { useContext, useEffect, useState } from "react";
|
|
2
3
|
import { C3ProfileProvider } from "./c3-profile-provider/c3-profile-provider";
|
|
3
4
|
import { decodeJWT } from "./authToken";
|
|
@@ -29,16 +30,14 @@ const C3UserConfigurationProvider = ({ children, activeOrganizationId, ...config
|
|
|
29
30
|
useEffect(() => {
|
|
30
31
|
setActiveOrgId(activeOrganizationId);
|
|
31
32
|
}, [activeOrganizationId]);
|
|
32
|
-
return (
|
|
33
|
+
return (_jsx(C3UserConfigurationContext.Provider, { value: {
|
|
33
34
|
...config,
|
|
34
35
|
activeOrganizationId: activeOrgId,
|
|
35
36
|
setActiveOrgId,
|
|
36
37
|
decodedToken,
|
|
37
38
|
decodedAudience,
|
|
38
39
|
domain,
|
|
39
|
-
} }
|
|
40
|
-
React.createElement(C3ProfileProvider, null,
|
|
41
|
-
React.createElement(C3HelpCenterProvider, null, children))));
|
|
40
|
+
}, children: _jsx(C3ProfileProvider, { children: _jsx(C3HelpCenterProvider, { children: children }) }) }));
|
|
42
41
|
};
|
|
43
42
|
export const useC3UserConfiguration = () => useContext(C3UserConfigurationContext);
|
|
44
43
|
export default C3UserConfigurationProvider;
|
|
@@ -5,7 +5,7 @@ type C3ClusterUpdateManagerProps = {
|
|
|
5
5
|
stage: Stage;
|
|
6
6
|
userToken: string;
|
|
7
7
|
};
|
|
8
|
-
declare const C3ClusterUpdateManager: ({ children, stage, userToken, }: C3ClusterUpdateManagerProps) => JSX.Element;
|
|
8
|
+
declare const C3ClusterUpdateManager: ({ children, stage, userToken, }: C3ClusterUpdateManagerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare const useClusterUpdate: ({ onUpdate }: {
|
|
10
10
|
onUpdate: (data: any) => void;
|
|
11
11
|
}) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from "react";
|
|
2
3
|
import { useEffect, createContext } from "react";
|
|
3
4
|
import { ClustersService } from "../api/clusters";
|
|
4
5
|
const C3ClusterUpdateManagerContext = createContext(null);
|
|
@@ -9,7 +10,7 @@ const C3ClusterUpdateManager = ({ children, stage, userToken, }) => {
|
|
|
9
10
|
eventSource.close();
|
|
10
11
|
};
|
|
11
12
|
}, [stage, userToken]);
|
|
12
|
-
return (
|
|
13
|
+
return (_jsx(C3ClusterUpdateManagerContext.Provider, { value: null, children: children }));
|
|
13
14
|
};
|
|
14
15
|
const useClusterUpdate = ({ onUpdate }) => {
|
|
15
16
|
const onUpdateRef = useRef(onUpdate);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RequestResponse } from "../api/api";
|
|
3
2
|
type QueryFn<R = undefined> = (...params: any[]) => Promise<RequestResponse<R>> | undefined;
|
|
4
3
|
type OnSuccess<R = undefined> = (data: R | undefined) => void;
|
|
@@ -6,12 +5,12 @@ type OnError = () => void;
|
|
|
6
5
|
declare const useApi: <R = undefined>({ queryFn, queryKey, onSuccess, onError, enabled, }: {
|
|
7
6
|
queryFn: QueryFn<R>;
|
|
8
7
|
queryKey: unknown[];
|
|
9
|
-
enabled?: boolean
|
|
10
|
-
onSuccess?: OnSuccess<R
|
|
11
|
-
onError?: OnError
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
onSuccess?: OnSuccess<R>;
|
|
10
|
+
onError?: OnError;
|
|
12
11
|
}) => {
|
|
13
12
|
data: R | null;
|
|
14
|
-
setData: import("react").Dispatch<import("react").SetStateAction<R | null>>;
|
|
13
|
+
setData: import("@types/react").Dispatch<import("@types/react").SetStateAction<R | null>>;
|
|
15
14
|
status: number;
|
|
16
15
|
errors: string[] | null;
|
|
17
16
|
loading: boolean;
|
package/lib/esm/src/index.d.ts
CHANGED
|
@@ -29,3 +29,4 @@ export { C3DataTableActionProps, C3DataTableHeaderContentType, C3DataTableHeader
|
|
|
29
29
|
export { RequestResponse } from "./api/api";
|
|
30
30
|
export { useApi } from "./hooks/useApi";
|
|
31
31
|
export { C3ClusterUpdateManager } from "./contexts/c3-cluster-update-manager";
|
|
32
|
+
export { C3ResponsiveStack } from "./components/c3-responsive-stack/c3-responsive-stack";
|
package/lib/esm/src/index.js
CHANGED
|
@@ -20,3 +20,4 @@ export { C3Page } from "./components/c3-page/c3-page";
|
|
|
20
20
|
export { C3DataTable } from "./components/c3-data-table/c3-data-table";
|
|
21
21
|
export { useApi } from "./hooks/useApi";
|
|
22
22
|
export { C3ClusterUpdateManager } from "./contexts/c3-cluster-update-manager";
|
|
23
|
+
export { C3ResponsiveStack } from "./components/c3-responsive-stack/c3-responsive-stack";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,33 +15,24 @@
|
|
|
15
15
|
"@babel/preset-env": "7.25.7",
|
|
16
16
|
"@babel/preset-react": "7.25.7",
|
|
17
17
|
"@babel/preset-typescript": "7.25.7",
|
|
18
|
-
"@carbon/react": "1.
|
|
18
|
+
"@carbon/react": "1.90.0",
|
|
19
19
|
"@mdx-js/react": "3.0.1",
|
|
20
20
|
"@playwright/test": "1.45.2",
|
|
21
|
-
"@storybook/addon-a11y": "
|
|
22
|
-
"@storybook/addon-
|
|
23
|
-
"@storybook/addon-
|
|
24
|
-
"@storybook/addon-
|
|
25
|
-
"@storybook/addon-interactions": "8.6.4",
|
|
26
|
-
"@storybook/addon-links": "8.6.4",
|
|
27
|
-
"@storybook/addon-mdx-gfm": "8.6.4",
|
|
28
|
-
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
29
|
-
"@storybook/blocks": "8.6.4",
|
|
21
|
+
"@storybook/addon-a11y": "9.1.4",
|
|
22
|
+
"@storybook/addon-docs": "^9.1.4",
|
|
23
|
+
"@storybook/addon-links": "9.1.4",
|
|
24
|
+
"@storybook/addon-webpack5-compiler-babel": "3.0.6",
|
|
30
25
|
"@storybook/preset-scss": "1.0.3",
|
|
31
|
-
"@storybook/react": "
|
|
32
|
-
"@storybook/
|
|
33
|
-
"@storybook/test": "8.6.4",
|
|
34
|
-
"@storybook/test-runner": "0.19.1",
|
|
35
|
-
"@types/carbon-components-react": "7.55.10",
|
|
26
|
+
"@storybook/react-webpack5": "9.1.4",
|
|
27
|
+
"@storybook/test-runner": "0.23.0",
|
|
36
28
|
"@types/event-source-polyfill": "1.0.5",
|
|
29
|
+
"@types/react": "18.3.12",
|
|
30
|
+
"@types/react-dom": "18.3.2",
|
|
37
31
|
"@types/mixpanel-browser": "2.49.0",
|
|
38
32
|
"@types/node": "22.13.14",
|
|
39
|
-
"@types/react": "18.0.28",
|
|
40
|
-
"@types/react-dom": "18.0.11",
|
|
41
|
-
"@types/styled-components": "5.1.34",
|
|
42
33
|
"@typescript-eslint/eslint-plugin": "7.17.0",
|
|
43
34
|
"@typescript-eslint/parser": "7.17.0",
|
|
44
|
-
"axe-playwright": "2.0
|
|
35
|
+
"axe-playwright": "2.1.0",
|
|
45
36
|
"babel-loader": "9.2.1",
|
|
46
37
|
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
47
38
|
"copyfiles": "2.4.1",
|
|
@@ -53,21 +44,22 @@
|
|
|
53
44
|
"eslint-plugin-prettier": "5.2.1",
|
|
54
45
|
"eslint-plugin-react": "7.35.0",
|
|
55
46
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
56
|
-
"eslint-plugin-storybook": "
|
|
47
|
+
"eslint-plugin-storybook": "9.1.4",
|
|
57
48
|
"event-source-polyfill": "1.0.31",
|
|
58
49
|
"husky": "9.1.2",
|
|
59
50
|
"mixpanel-browser": "2.49.0",
|
|
60
51
|
"prettier": "3.3.3",
|
|
61
|
-
"react": "
|
|
62
|
-
"react-dom": "
|
|
52
|
+
"react": "19.1.0",
|
|
53
|
+
"react-dom": "19.1.0",
|
|
54
|
+
"react-is": "^19.1.0",
|
|
63
55
|
"rimraf": "6.0.1",
|
|
64
56
|
"sass": "1.74.1",
|
|
65
57
|
"sass-loader": "14.1.1",
|
|
66
58
|
"serve": "14.2.4",
|
|
67
|
-
"storybook": "^
|
|
59
|
+
"storybook": "^9.1.4",
|
|
68
60
|
"style-loader": "4.0.0",
|
|
69
61
|
"styled-components": "6.1.8",
|
|
70
|
-
"typescript": "
|
|
62
|
+
"typescript": "5.8.3",
|
|
71
63
|
"wait-on": "8.0.2",
|
|
72
64
|
"webpack": "5.94.0"
|
|
73
65
|
},
|
|
@@ -99,20 +91,21 @@
|
|
|
99
91
|
"build-storybook": "storybook build",
|
|
100
92
|
"build:all": "pnpm build && pnpm build-storybook",
|
|
101
93
|
"serve:storybook": "npx --yes serve ./storybook-static -p 6006 -n -L",
|
|
94
|
+
"docker:setup": "pnpm install && npx playwright install",
|
|
102
95
|
"format": "prettier --write .",
|
|
103
96
|
"lint": "eslint src/",
|
|
104
97
|
"lint:fix": "eslint --fix src/",
|
|
105
98
|
"test:ts": "tsc --noEmit --project ./tsconfig.json",
|
|
106
99
|
"test:storybook": "TEST_A11Y=true test-storybook",
|
|
107
100
|
"test:storybook:smoke": "test-storybook",
|
|
108
|
-
"start:docker-storybook": "pnpm build-storybook && docker-compose up -d && docker-compose exec c3-visual-regression pnpm serve:storybook",
|
|
101
|
+
"start:docker-storybook": "pnpm build-storybook && docker-compose up -d && docker-compose exec c3-visual-regression pnpm docker:setup && docker-compose exec c3-visual-regression pnpm serve:storybook",
|
|
109
102
|
"test:visual-regression": "wait-on http://localhost:6006 && pnpm playwright test",
|
|
110
103
|
"test:visual-regression:ui": "pnpm playwright test --ui",
|
|
111
104
|
"report:visual-regression": "pnpm playwright show-report",
|
|
112
105
|
"update:visual-regression": "pnpm playwright test --update-snapshots",
|
|
113
106
|
"test:visual-regression:docker": "docker exec -it -t c3-visual-regression pnpm test:visual-regression",
|
|
114
107
|
"update:visual-regression:docker": "docker exec -it -t c3-visual-regression pnpm update:visual-regression",
|
|
115
|
-
"test:all": "pnpm test:ts && pnpm serve:storybook & wait-on http://localhost:6006 && pnpm test:storybook && pnpm test:visual-regression:docker",
|
|
108
|
+
"test:all": "pnpm test:ts && pnpm serve:storybook & pnpm wait-on http://localhost:6006 && pnpm test:storybook && pnpm test:visual-regression:docker",
|
|
116
109
|
"test": "pnpm test:ts"
|
|
117
110
|
}
|
|
118
111
|
}
|