@kaizen/components 0.0.0-canary-rollup-cjs-20240408010936 → 0.0.0-canary-rollup-cjs-20240408013052
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/dist/cjs/__future__/Select/Select.cjs +86 -0
- package/dist/cjs/__future__/Select/Select.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/Workflow.cjs +35 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/Footer.cjs +22 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.cjs +23 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +64 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Footer/components/Root/Root.cjs +19 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/Header.cjs +23 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Actions/Actions.cjs +18 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Actions/Actions.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Branding/Branding.cjs +18 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Branding/Branding.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Root/Root.cjs +19 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Root/Root.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Titles/Titles.cjs +29 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Header/components/Titles/Titles.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Main/Main.cjs +19 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Main/Main.module.scss.cjs +5 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Wrapper/Wrapper.cjs +19 -0
- package/dist/cjs/__future__/Workflow/subcomponents/Wrapper/Wrapper.module.scss.cjs +5 -0
- package/dist/cjs/future.cjs +13 -0
- package/dist/cjs/future.css +170 -0
- package/dist/esm/__future__/Select/Select.mjs +79 -0
- package/dist/esm/__future__/Select/Select.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/Workflow.mjs +29 -0
- package/dist/esm/__future__/Workflow/subcomponents/Footer/Footer.mjs +16 -0
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.mjs +16 -0
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +57 -0
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/Root/FooterRoot.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Footer/components/Root/Root.mjs +12 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/Header.mjs +17 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Actions/Actions.mjs +12 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Actions/Actions.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Branding/Branding.mjs +12 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Branding/Branding.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Root/Root.mjs +12 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Root/Root.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Titles/Titles.mjs +23 -0
- package/dist/esm/__future__/Workflow/subcomponents/Header/components/Titles/Titles.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Main/Main.mjs +12 -0
- package/dist/esm/__future__/Workflow/subcomponents/Main/Main.module.scss.mjs +3 -0
- package/dist/esm/__future__/Workflow/subcomponents/Wrapper/Wrapper.mjs +12 -0
- package/dist/esm/__future__/Workflow/subcomponents/Wrapper/Wrapper.module.scss.mjs +3 -0
- package/dist/esm/future.css +170 -0
- package/dist/esm/future.mjs +4 -0
- package/dist/index.css +10 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React, { useId, useState, useEffect } from 'react';
|
|
3
|
+
import { useButton } from '@react-aria/button';
|
|
4
|
+
import { useSelect, HiddenSelect } from '@react-aria/select';
|
|
5
|
+
import { useSelectState } from '@react-stately/select';
|
|
6
|
+
import classnames from 'classnames';
|
|
7
|
+
import { FieldMessage } from '../../FieldMessage/FieldMessage.mjs';
|
|
8
|
+
import { Popover } from '../../MultiSelect/subcomponents/Popover/Popover.mjs';
|
|
9
|
+
import { useFloating } from '@floating-ui/react-dom';
|
|
10
|
+
import { SelectProvider } from './context/SelectContext.mjs';
|
|
11
|
+
import { ListBox } from './subcomponents/ListBox/ListBox.mjs';
|
|
12
|
+
import { ListBoxSection } from './subcomponents/ListBoxSection/ListBoxSection.mjs';
|
|
13
|
+
import { ListItem } from './subcomponents/ListItem/ListItem.mjs';
|
|
14
|
+
import './subcomponents/ListItems/ListItems.mjs';
|
|
15
|
+
import { Option } from './subcomponents/Option/Option.mjs';
|
|
16
|
+
import './subcomponents/Overlay/Overlay.mjs';
|
|
17
|
+
import { SectionDivider } from './subcomponents/SectionDivider/SectionDivider.mjs';
|
|
18
|
+
import { SelectPopoverContents } from './subcomponents/SelectPopoverContents/SelectPopoverContents.mjs';
|
|
19
|
+
import { SelectToggle } from './subcomponents/SelectToggle/SelectToggle.mjs';
|
|
20
|
+
import { getDisabledKeysFromItems } from './utils/getDisabledKeysFromItems.mjs';
|
|
21
|
+
import { transformSelectItemToCollectionElement } from './utils/transformSelectItemToCollectionElement.mjs';
|
|
22
|
+
import styles from './Select.module.scss.mjs';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081896474/Select Guidance} |
|
|
26
|
+
* {@link https://cultureamp.design/?path=/docs/components-select--docs Storybook}
|
|
27
|
+
*/
|
|
28
|
+
var Select = function (_a) {
|
|
29
|
+
var _b;
|
|
30
|
+
var label = _a.label, items = _a.items, propsId = _a.id, trigger = _a.trigger, children = _a.children, status = _a.status, validationMessage = _a.validationMessage, isReversed = _a.isReversed, isFullWidth = _a.isFullWidth, disabledValues = _a.disabledValues, classNameOverride = _a.classNameOverride, selectedKey = _a.selectedKey, description = _a.description, placeholder = _a.placeholder, isDisabled = _a.isDisabled, portalContainerId = _a.portalContainerId, restProps = __rest(_a, ["label", "items", "id", "trigger", "children", "status", "validationMessage", "isReversed", "isFullWidth", "disabledValues", "classNameOverride", "selectedKey", "description", "placeholder", "isDisabled", "portalContainerId"]);
|
|
31
|
+
var refs = useFloating().refs;
|
|
32
|
+
var triggerRef = refs.reference;
|
|
33
|
+
var id = propsId !== null && propsId !== void 0 ? propsId : useId();
|
|
34
|
+
var descriptionId = "".concat(id, "--description");
|
|
35
|
+
var popoverId = "".concat(id, "--popover");
|
|
36
|
+
var disabledKeys = getDisabledKeysFromItems(items);
|
|
37
|
+
var ariaSelectProps = __assign({ label: label, items: items, children: transformSelectItemToCollectionElement, disabledKeys: disabledValues !== null && disabledValues !== void 0 ? disabledValues : disabledKeys, selectedKey: typeof selectedKey === "number" ? selectedKey.toString() : selectedKey, description: description, placeholder: placeholder, isDisabled: isDisabled }, restProps);
|
|
38
|
+
var state = useSelectState(ariaSelectProps);
|
|
39
|
+
var _c = useSelect(ariaSelectProps, state, triggerRef), labelProps = _c.labelProps, reactAriaTriggerProps = _c.triggerProps, valueProps = _c.valueProps, menuProps = _c.menuProps, errorMessageProps = _c.errorMessageProps, descriptionProps = _c.descriptionProps;
|
|
40
|
+
// Hack incoming:
|
|
41
|
+
// react-aria/useSelect wants to prefix the combobox's accessible name with the value of the select.
|
|
42
|
+
// We use role=combobox, meaning screen readers will read the value.
|
|
43
|
+
// So we're modifying the `aria-labelledby` property to remove the value element id.
|
|
44
|
+
// Issue: https://github.com/adobe/react-spectrum/issues/4091
|
|
45
|
+
var reactAriaLabelledBy = reactAriaTriggerProps["aria-labelledby"];
|
|
46
|
+
var triggerProps = __assign(__assign({}, reactAriaTriggerProps), { "aria-labelledby": reactAriaLabelledBy === null || reactAriaLabelledBy === void 0 ? void 0 : reactAriaLabelledBy.substring(reactAriaLabelledBy.indexOf(" ") + 1) });
|
|
47
|
+
var buttonProps = useButton(triggerProps, triggerRef).buttonProps;
|
|
48
|
+
var selectToggleProps = __assign(__assign({}, buttonProps), { label: label, labelProps: labelProps, value: (_b = state === null || state === void 0 ? void 0 : state.selectedItem) === null || _b === void 0 ? void 0 : _b.rendered, valueProps: valueProps, isOpen: state.isOpen, placeholder: placeholder, status: status, isDisabled: triggerProps.isDisabled, isReversed: isReversed, ref: refs.setReference });
|
|
49
|
+
var _d = useState(), portalContainer = _d[0], setPortalContainer = _d[1];
|
|
50
|
+
useEffect(function () {
|
|
51
|
+
if (portalContainerId) {
|
|
52
|
+
var portalElement = document.getElementById(portalContainerId);
|
|
53
|
+
portalElement && setPortalContainer(portalElement);
|
|
54
|
+
}
|
|
55
|
+
}, []);
|
|
56
|
+
return (React.createElement("div", { className: classnames(!isFullWidth && styles.notFullWidth, classNameOverride) },
|
|
57
|
+
React.createElement(HiddenSelect, { label: label, name: id, state: state, triggerRef: triggerRef }),
|
|
58
|
+
React.createElement("div", { className: styles.container },
|
|
59
|
+
trigger === undefined ? (React.createElement(SelectToggle, __assign({}, selectToggleProps))) : (trigger(selectToggleProps, selectToggleProps.ref)),
|
|
60
|
+
state.isOpen && (React.createElement(Popover, { id: popoverId, portalContainer: portalContainer, refs: refs, focusOnProps: {
|
|
61
|
+
onEscapeKey: state.close,
|
|
62
|
+
onClickOutside: state.close,
|
|
63
|
+
noIsolation: true,
|
|
64
|
+
} },
|
|
65
|
+
React.createElement(SelectProvider, { state: state },
|
|
66
|
+
React.createElement(SelectPopoverContents, { menuProps: menuProps }, children))))),
|
|
67
|
+
validationMessage && (React.createElement(FieldMessage, __assign({}, errorMessageProps, { message: validationMessage, status: status, reversed: isReversed }))),
|
|
68
|
+
description && (React.createElement(FieldMessage, __assign({}, descriptionProps, { id: descriptionId, message: description, reversed: isReversed })))));
|
|
69
|
+
};
|
|
70
|
+
Select.displayName = "Select";
|
|
71
|
+
Select.Section = ListBoxSection;
|
|
72
|
+
Select.SectionDivider = SectionDivider;
|
|
73
|
+
Select.Option = Option;
|
|
74
|
+
Select.ItemDefaultRender = ListItem;
|
|
75
|
+
// @deprecated Legacy exported aliases
|
|
76
|
+
Select.TriggerButton = SelectToggle;
|
|
77
|
+
Select.ListBox = ListBox;
|
|
78
|
+
|
|
79
|
+
export { Select };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Footer } from './subcomponents/Footer/Footer.mjs';
|
|
4
|
+
import './subcomponents/Footer/components/Root/Root.mjs';
|
|
5
|
+
import { ProgressStepper } from './subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs';
|
|
6
|
+
import './subcomponents/Footer/components/FooterActions/FooterActions.mjs';
|
|
7
|
+
import { Header } from './subcomponents/Header/Header.mjs';
|
|
8
|
+
import './subcomponents/Header/components/Titles/Titles.mjs';
|
|
9
|
+
import './subcomponents/Header/components/Actions/Actions.mjs';
|
|
10
|
+
import './subcomponents/Header/components/Branding/Branding.mjs';
|
|
11
|
+
import './subcomponents/Header/components/Root/Root.mjs';
|
|
12
|
+
import { Main } from './subcomponents/Main/Main.mjs';
|
|
13
|
+
import { Wrapper } from './subcomponents/Wrapper/Wrapper.mjs';
|
|
14
|
+
|
|
15
|
+
var Workflow = function (_a) {
|
|
16
|
+
var steps = _a.steps, currentStepId = _a.currentStepId, isComplete = _a.isComplete, workflowName = _a.workflowName, status = _a.status, headerActions = _a.headerActions, children = _a.children, nextAction = _a.nextAction, previousAction = _a.previousAction, classNameOverride = _a.classNameOverride, restProps = __rest(_a, ["steps", "currentStepId", "isComplete", "workflowName", "status", "headerActions", "children", "nextAction", "previousAction", "classNameOverride"]);
|
|
17
|
+
var currentStep = steps.find(function (step) { return step.id === currentStepId; });
|
|
18
|
+
return (React.createElement(Workflow.Wrapper, __assign({ classNameOverride: classNameOverride }, restProps),
|
|
19
|
+
React.createElement(Workflow.Header, { workflowName: workflowName, stepName: currentStep.label, status: status, headerActions: headerActions }),
|
|
20
|
+
React.createElement(Workflow.Main, null, children),
|
|
21
|
+
React.createElement(Workflow.Footer, { currentStepId: currentStepId, steps: steps, isComplete: isComplete, nextAction: nextAction, previousAction: previousAction })));
|
|
22
|
+
};
|
|
23
|
+
Workflow.Header = Header;
|
|
24
|
+
Workflow.Footer = Footer;
|
|
25
|
+
Workflow.Main = Main;
|
|
26
|
+
Workflow.ProgressStepper = ProgressStepper;
|
|
27
|
+
Workflow.Wrapper = Wrapper;
|
|
28
|
+
|
|
29
|
+
export { Workflow };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FooterRoot } from './components/Root/Root.mjs';
|
|
4
|
+
import { ProgressStepper } from './components/ProgressStepper/ProgressStepper.mjs';
|
|
5
|
+
import { FooterAction } from './components/FooterActions/FooterActions.mjs';
|
|
6
|
+
|
|
7
|
+
var Footer = function (_a) {
|
|
8
|
+
var steps = _a.steps, currentStepId = _a.currentStepId, isComplete = _a.isComplete, previousAction = _a.previousAction, nextAction = _a.nextAction, restProps = __rest(_a, ["steps", "currentStepId", "isComplete", "previousAction", "nextAction"]);
|
|
9
|
+
return (React.createElement(FooterRoot, __assign({}, restProps),
|
|
10
|
+
React.createElement(FooterAction, { action: previousAction, actionType: "Previous" }),
|
|
11
|
+
React.createElement(ProgressStepper, { steps: steps, currentStepId: currentStepId, isComplete: isComplete }),
|
|
12
|
+
React.createElement(FooterAction, { action: nextAction, actionType: "Next" })));
|
|
13
|
+
};
|
|
14
|
+
Footer.displayName = "Workflow.Footer";
|
|
15
|
+
|
|
16
|
+
export { Footer };
|
package/dist/esm/__future__/Workflow/subcomponents/Footer/components/FooterActions/FooterActions.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import styles from './FooterActions.module.scss.mjs';
|
|
5
|
+
|
|
6
|
+
/** A simple wrapper for a Footer previous or next action */
|
|
7
|
+
var FooterAction = function (_a) {
|
|
8
|
+
var _b = _a.actionType, actionType = _b === void 0 ? "Previous" : _b, action = _a.action, restProps = __rest(_a, ["actionType", "action"]);
|
|
9
|
+
return (React.createElement("div", __assign({ className: classnames([
|
|
10
|
+
styles.footerAction,
|
|
11
|
+
styles["footerAction".concat(actionType)],
|
|
12
|
+
]) }, restProps), action));
|
|
13
|
+
};
|
|
14
|
+
FooterAction.displayName = "Workflow.FooterActions";
|
|
15
|
+
|
|
16
|
+
export { FooterAction };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import '../../../../../../Icon/subcomponents/SVG/SVG.mjs';
|
|
5
|
+
import { IndicatorActiveIcon } from '../../../../../../Icon/IndicatorActiveIcon.mjs';
|
|
6
|
+
import { IndicatorInactiveIcon } from '../../../../../../Icon/IndicatorInactiveIcon.mjs';
|
|
7
|
+
import { SuccessIcon } from '../../../../../../Icon/SuccessIcon.mjs';
|
|
8
|
+
import { Text } from '../../../../../../Text/Text.mjs';
|
|
9
|
+
import { VisuallyHidden } from '../../../../../../VisuallyHidden/VisuallyHidden.mjs';
|
|
10
|
+
import styles from './ProgressStepper.module.scss.mjs';
|
|
11
|
+
|
|
12
|
+
var getStepStatus = function (isComplete, isCurrentStep, step, index) {
|
|
13
|
+
if (isComplete) {
|
|
14
|
+
return {
|
|
15
|
+
icon: (React.createElement(SuccessIcon, { key: index, inheritSize: true, role: "presentation", classNameOverride: "success" })),
|
|
16
|
+
accessibleName: "Completed: ".concat(step.label),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (isCurrentStep) {
|
|
20
|
+
return {
|
|
21
|
+
icon: (React.createElement(IndicatorActiveIcon, { key: index, inheritSize: true, role: "presentation", classNameOverride: "active" })),
|
|
22
|
+
accessibleName: "Current: ".concat(step.label),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
icon: (React.createElement(IndicatorInactiveIcon, { key: index, inheritSize: true, classNameOverride: "incomplete", role: "presentation" })),
|
|
27
|
+
accessibleName: "Not started: ".concat(step.label),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
var ProgressStepper = function (_a) {
|
|
31
|
+
var currentStepId = _a.currentStepId, steps = _a.steps, _b = _a.isComplete, isComplete = _b === void 0 ? false : _b, restprops = __rest(_a, ["currentStepId", "steps", "isComplete"]);
|
|
32
|
+
var currentStepIndex = steps.findIndex(function (stepItem) { return stepItem.id === currentStepId; });
|
|
33
|
+
return (React.createElement("div", { className: styles.stepsContainer },
|
|
34
|
+
React.createElement("ol", __assign({ className: styles.stepList }, restprops, { "aria-labelledby": "stepper-description" }), steps.map(function (step, index) {
|
|
35
|
+
var isCurrentStep = currentStepIndex === index;
|
|
36
|
+
var isCompletedStep = index < currentStepIndex || isComplete;
|
|
37
|
+
var _a = getStepStatus(isCompletedStep, isCurrentStep, step, index), accessibleName = _a.accessibleName, Icon = _a.icon;
|
|
38
|
+
return (React.createElement("li", { className: styles.step, key: "".concat(step.id), "aria-current": isCurrentStep },
|
|
39
|
+
React.createElement("div", { className: styles.stepContent },
|
|
40
|
+
React.createElement(VisuallyHidden, null, accessibleName),
|
|
41
|
+
React.createElement(Text, { classNameOverride: styles.stepName, variant: "small", color: "white", "aria-hidden": true }, step.label),
|
|
42
|
+
React.createElement("div", { className: styles.stepIndicator },
|
|
43
|
+
React.createElement("span", { className: styles.stepIcon }, Icon)),
|
|
44
|
+
index < steps.length - 1 && (React.createElement("div", { className: classnames([
|
|
45
|
+
styles.stepDivider,
|
|
46
|
+
isCompletedStep && styles.completedStep,
|
|
47
|
+
]) })))));
|
|
48
|
+
})),
|
|
49
|
+
React.createElement(Text, { classNameOverride: styles.stepperDescription, variant: "small", color: "white", id: "stepper-description" },
|
|
50
|
+
"Step ",
|
|
51
|
+
currentStepIndex + 1,
|
|
52
|
+
" of ",
|
|
53
|
+
steps.length)));
|
|
54
|
+
};
|
|
55
|
+
ProgressStepper.displayName = "Workflow.ProgressStepper";
|
|
56
|
+
|
|
57
|
+
export { ProgressStepper };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"stepsContainer":"ProgressStepper-module_stepsContainer__WMxXN","stepList":"ProgressStepper-module_stepList__b1wWX","step":"ProgressStepper-module_step__-Ep19","stepContent":"ProgressStepper-module_stepContent__B4uFS","stepIndicator":"ProgressStepper-module_stepIndicator__-qEWT","stepName":"ProgressStepper-module_stepName__hS4lp","stepIcon":"ProgressStepper-module_stepIcon__0Kh4y","stepDivider":"ProgressStepper-module_stepDivider__KEZPU","stepperDescription":"ProgressStepper-module_stepperDescription__B00hX"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import styles from './FooterRoot.module.scss.mjs';
|
|
5
|
+
|
|
6
|
+
var FooterRoot = function (_a) {
|
|
7
|
+
var children = _a.children, classNameOverride = _a.classNameOverride, restProps = __rest(_a, ["children", "classNameOverride"]);
|
|
8
|
+
return (React.createElement("footer", __assign({ className: classnames(styles.footerRoot, classNameOverride) }, restProps), children));
|
|
9
|
+
};
|
|
10
|
+
FooterRoot.displayName = "Workflow.FooterRoot";
|
|
11
|
+
|
|
12
|
+
export { FooterRoot };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Titles } from './components/Titles/Titles.mjs';
|
|
4
|
+
import { Actions } from './components/Actions/Actions.mjs';
|
|
5
|
+
import { Branding } from './components/Branding/Branding.mjs';
|
|
6
|
+
import { HeaderRoot } from './components/Root/Root.mjs';
|
|
7
|
+
|
|
8
|
+
var Header = function (_a) {
|
|
9
|
+
var workflowName = _a.workflowName, stepName = _a.stepName, status = _a.status, headerActions = _a.headerActions, restProps = __rest(_a, ["workflowName", "stepName", "status", "headerActions"]);
|
|
10
|
+
return (React.createElement(HeaderRoot, __assign({}, restProps),
|
|
11
|
+
React.createElement(Branding, { alt: "Cultureamp" }),
|
|
12
|
+
React.createElement(Titles, { workflowName: workflowName, stepName: stepName, status: status }),
|
|
13
|
+
React.createElement(Actions, { headerActions: headerActions })));
|
|
14
|
+
};
|
|
15
|
+
Header.displayName = "Workflow.Header";
|
|
16
|
+
|
|
17
|
+
export { Header };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import styles from './Actions.module.scss.mjs';
|
|
4
|
+
|
|
5
|
+
/** A wrapper for an exit trigger (and other) actions of the Header Workflow */
|
|
6
|
+
var Actions = function (_a) {
|
|
7
|
+
var headerActions = _a.headerActions, restProps = __rest(_a, ["headerActions"]);
|
|
8
|
+
return (React.createElement("div", __assign({ className: styles.actions }, restProps), headerActions === null || headerActions === void 0 ? void 0 : headerActions.map(function (action, index) { return (React.createElement(action.type, __assign({ key: "header-actions ".concat(index) }, action.props))); })));
|
|
9
|
+
};
|
|
10
|
+
Actions.displayName = "Workflow.Actions";
|
|
11
|
+
|
|
12
|
+
export { Actions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Brand } from '../../../../../../Brand/Brand.mjs';
|
|
3
|
+
import styles from './Branding.module.scss.mjs';
|
|
4
|
+
|
|
5
|
+
var Branding = function (_a) {
|
|
6
|
+
var _b = _a.variant, variant = _b === void 0 ? "logo-horizontal" : _b, alt = _a.alt;
|
|
7
|
+
return (React.createElement("div", { className: styles.branding },
|
|
8
|
+
React.createElement(Brand, { classNameOverride: styles.logo, variant: variant, alt: alt })));
|
|
9
|
+
};
|
|
10
|
+
Branding.displayName = "Workflow.Branding";
|
|
11
|
+
|
|
12
|
+
export { Branding };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import styles from './Root.module.scss.mjs';
|
|
5
|
+
|
|
6
|
+
var HeaderRoot = function (_a) {
|
|
7
|
+
var children = _a.children, classNameOverride = _a.classNameOverride, restProps = __rest(_a, ["children", "classNameOverride"]);
|
|
8
|
+
return (React.createElement("header", __assign({ className: classnames(styles.root, classNameOverride) }, restProps), children));
|
|
9
|
+
};
|
|
10
|
+
HeaderRoot.displayName = "Workflow.HeaderRoot";
|
|
11
|
+
|
|
12
|
+
export { HeaderRoot };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Heading } from '../../../../../../Heading/Heading.mjs';
|
|
4
|
+
import { Tag } from '../../../../../../Tag/Tag.mjs';
|
|
5
|
+
import { VisuallyHidden } from '../../../../../../VisuallyHidden/VisuallyHidden.mjs';
|
|
6
|
+
import styles from './Titles.module.scss.mjs';
|
|
7
|
+
|
|
8
|
+
var Titles = function (_a) {
|
|
9
|
+
var workflowName = _a.workflowName, stepName = _a.stepName, status = _a.status, restProps = __rest(_a, ["workflowName", "stepName", "status"]);
|
|
10
|
+
return (React.createElement("div", __assign({ className: styles.titles }, restProps),
|
|
11
|
+
React.createElement(Heading, { variant: "heading-1", tag: "h1", color: "dark", classNameOverride: styles.pageTitle },
|
|
12
|
+
React.createElement(Heading, { classNameOverride: styles.prefix, variant: "heading-6", tag: "span", color: "dark-reduced-opacity" },
|
|
13
|
+
workflowName,
|
|
14
|
+
React.createElement(VisuallyHidden, null, ":")),
|
|
15
|
+
React.createElement("span", null, stepName)),
|
|
16
|
+
status && (
|
|
17
|
+
// status may need to be update by a fetch
|
|
18
|
+
React.createElement("div", { className: styles.status },
|
|
19
|
+
React.createElement(Tag, { inline: true, variant: (status === null || status === void 0 ? void 0 : status.variant) || "statusDraft" }, status === null || status === void 0 ? void 0 : status.content)))));
|
|
20
|
+
};
|
|
21
|
+
Titles.displayName = "Workflow.Titles";
|
|
22
|
+
|
|
23
|
+
export { Titles };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import styles from './Main.module.scss.mjs';
|
|
5
|
+
|
|
6
|
+
var Main = function (_a) {
|
|
7
|
+
var children = _a.children, classNameOverride = _a.classNameOverride, restProps = __rest(_a, ["children", "classNameOverride"]);
|
|
8
|
+
return (React.createElement("main", __assign({ className: classnames([styles.main, classNameOverride]) }, restProps), children));
|
|
9
|
+
};
|
|
10
|
+
Main.displayName = "Workflow.Main";
|
|
11
|
+
|
|
12
|
+
export { Main };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import styles from './Wrapper.module.scss.mjs';
|
|
5
|
+
|
|
6
|
+
var Wrapper = function (_a) {
|
|
7
|
+
var children = _a.children, classNameOverride = _a.classNameOverride, restProps = __rest(_a, ["children", "classNameOverride"]);
|
|
8
|
+
return (React.createElement("div", __assign({ className: classnames(styles.wrapper, classNameOverride) }, restProps), children));
|
|
9
|
+
};
|
|
10
|
+
Wrapper.displayName = "Workflow.Wrapper";
|
|
11
|
+
|
|
12
|
+
export { Wrapper };
|