@kaizen/components 1.61.3 → 1.62.0
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/codemods/README.md +0 -1
- package/dist/cjs/{__containers__/GuidanceBlock/v2 → GuidanceBlock}/GuidanceBlock.cjs +6 -6
- package/dist/cjs/GuidanceBlock/GuidanceBlock.module.scss.cjs +33 -0
- package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +1 -1
- package/dist/cjs/__layout__/Workflow/v2/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +2 -4
- package/dist/cjs/__layout__/Workflow/v3/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +2 -3
- package/dist/cjs/index.cjs +2 -2
- package/dist/esm/{__containers__/GuidanceBlock/v2 → GuidanceBlock}/GuidanceBlock.mjs +6 -6
- package/dist/esm/GuidanceBlock/GuidanceBlock.module.scss.mjs +31 -0
- package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +1 -1
- package/dist/esm/__layout__/Workflow/v2/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +2 -4
- package/dist/esm/__layout__/Workflow/v3/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +2 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/styles.css +1437 -1766
- package/dist/types/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.module.scss +2 -2
- package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/_docs/GuidanceBlock.mdx +2 -2
- package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/_docs/GuidanceBlock.stickersheet.stories.tsx +1 -1
- package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/_docs/GuidanceBlock.stories.tsx +1 -1
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +5 -1
- package/src/__layout__/Workflow/v2/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.scss +8 -2
- package/src/__layout__/Workflow/v2/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +2 -7
- package/src/__layout__/Workflow/v3/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css +5 -0
- package/src/__layout__/Workflow/v3/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +2 -6
- package/src/index.ts +1 -2
- package/codemods/updateGuidanceBlockVariantProp/index.ts +0 -19
- package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.spec.ts +0 -135
- package/codemods/updateGuidanceBlockVariantProp/transformGuidanceBlockVariantProp.ts +0 -77
- package/dist/cjs/__containers__/GuidanceBlock/v1/GuidanceBlock.cjs +0 -160
- package/dist/cjs/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.cjs +0 -33
- package/dist/cjs/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.cjs +0 -28
- package/dist/cjs/containersV1.cjs +0 -4
- package/dist/cjs/containersV2.cjs +0 -4
- package/dist/esm/__containers__/GuidanceBlock/v1/GuidanceBlock.mjs +0 -153
- package/dist/esm/__containers__/GuidanceBlock/v1/GuidanceBlock.module.scss.mjs +0 -31
- package/dist/esm/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss.mjs +0 -26
- package/dist/esm/containersV1.mjs +0 -1
- package/dist/esm/containersV2.mjs +0 -1
- package/dist/types/__containers__/GuidanceBlock/v2/GuidanceBlock.d.ts +0 -59
- package/dist/types/__containers__/GuidanceBlock/v2/index.d.ts +0 -1
- package/dist/types/__containers__/v1.d.ts +0 -1
- package/dist/types/__containers__/v2.d.ts +0 -1
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.module.scss +0 -356
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.spec.tsx +0 -82
- package/src/__containers__/GuidanceBlock/v2/GuidanceBlock.tsx +0 -262
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.mdx +0 -38
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stickersheet.stories.tsx +0 -118
- package/src/__containers__/GuidanceBlock/v2/_docs/GuidanceBlock.stories.tsx +0 -152
- package/src/__containers__/GuidanceBlock/v2/index.ts +0 -1
- package/src/__containers__/v1.ts +0 -1
- package/src/__containers__/v2.ts +0 -1
- package/v1/containers/package.json +0 -5
- package/v2/containers/package.json +0 -5
- /package/dist/types/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/index.d.ts +0 -0
- /package/dist/types/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/types.d.ts +0 -0
- /package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.spec.tsx +0 -0
- /package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/GuidanceBlock.tsx +0 -0
- /package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/index.ts +0 -0
- /package/src/{__containers__/GuidanceBlock/v1 → GuidanceBlock}/types.ts +0 -0
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { __rest, __assign } from 'tslib';
|
|
2
|
-
import React, { useState, useEffect } from 'react';
|
|
3
|
-
import classnames from 'classnames';
|
|
4
|
-
import Media from 'react-media';
|
|
5
|
-
import { Heading } from '../../../Heading/Heading.mjs';
|
|
6
|
-
import '../../../Icon/subcomponents/SVG/SVG.mjs';
|
|
7
|
-
import { ArrowForwardIcon } from '../../../Icon/ArrowForwardIcon.mjs';
|
|
8
|
-
import { Text } from '../../../Text/Text.mjs';
|
|
9
|
-
import { Tooltip } from '../../../__overlays__/Tooltip/v1/index.mjs';
|
|
10
|
-
import styles from './GuidanceBlock.module.scss.mjs';
|
|
11
|
-
import { Button } from '../../../__actions__/Button/v1/Button/Button.mjs';
|
|
12
|
-
var WithTooltip = function (_a) {
|
|
13
|
-
var tooltipProps = _a.tooltipProps,
|
|
14
|
-
children = _a.children;
|
|
15
|
-
return !!tooltipProps ? ( /*#__PURE__*/React.createElement(Tooltip, __assign({}, tooltipProps), children)) : ( /*#__PURE__*/React.createElement(React.Fragment, null, children));
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093807/Guidance+Block Guidance} |
|
|
19
|
-
* {@link https://cultureamp.design/?path=/docs/components-guidanceblock--docs Storybook}
|
|
20
|
-
*/
|
|
21
|
-
const GuidanceBlock = /*#__PURE__*/function () {
|
|
22
|
-
const GuidanceBlock = function (_a) {
|
|
23
|
-
var _b, _c, _d, _e;
|
|
24
|
-
var _f = _a.layout,
|
|
25
|
-
layout = _f === void 0 ? "default" : _f,
|
|
26
|
-
_g = _a.variant,
|
|
27
|
-
variant = _g === void 0 ? "default" : _g,
|
|
28
|
-
_h = _a.withActionButtonArrow,
|
|
29
|
-
withActionButtonArrow = _h === void 0 ? true : _h,
|
|
30
|
-
_j = _a.noMaxWidth,
|
|
31
|
-
noMaxWidth = _j === void 0 ? false : _j,
|
|
32
|
-
_k = _a.illustrationType,
|
|
33
|
-
illustrationType = _k === void 0 ? "spot" : _k,
|
|
34
|
-
_l = _a.smallScreenTextAlignment,
|
|
35
|
-
smallScreenTextAlignment = _l === void 0 ? "center" : _l,
|
|
36
|
-
actions = _a.actions,
|
|
37
|
-
illustration = _a.illustration,
|
|
38
|
-
secondaryDismiss = _a.secondaryDismiss,
|
|
39
|
-
restProps = __rest(_a, ["layout", "variant", "withActionButtonArrow", "noMaxWidth", "illustrationType", "smallScreenTextAlignment", "actions", "illustration", "secondaryDismiss"]);
|
|
40
|
-
var _m = useState(false),
|
|
41
|
-
hidden = _m[0],
|
|
42
|
-
setHidden = _m[1];
|
|
43
|
-
var _o = useState(false),
|
|
44
|
-
removed = _o[0],
|
|
45
|
-
setRemoved = _o[1];
|
|
46
|
-
var _p = useState(""),
|
|
47
|
-
mediaQueryLayout = _p[0],
|
|
48
|
-
setMediaQueryLayout = _p[1];
|
|
49
|
-
var containerRef = /*#__PURE__*/React.createRef();
|
|
50
|
-
useEffect(function () {
|
|
51
|
-
if (layout === "inline" || layout === "stacked") {
|
|
52
|
-
containerQuery();
|
|
53
|
-
}
|
|
54
|
-
}, []);
|
|
55
|
-
var handleDismissBanner = function () {
|
|
56
|
-
var _a;
|
|
57
|
-
setHidden(true);
|
|
58
|
-
(_a = actions === null || actions === void 0 ? void 0 : actions.dismiss) === null || _a === void 0 ? void 0 : _a.onClick();
|
|
59
|
-
};
|
|
60
|
-
var onTransitionEnd = function (e) {
|
|
61
|
-
// Be careful: this assumes the final CSS property to be animated is "margin-top".
|
|
62
|
-
if (hidden && e.propertyName === "margin-top") {
|
|
63
|
-
setRemoved(true);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
var containerQuery = function () {
|
|
67
|
-
var resizeObserver = new ResizeObserver(function (entries) {
|
|
68
|
-
if (entries.length === 1) {
|
|
69
|
-
handleMediaQueryLayout(entries[0].contentRect.width);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
resizeObserver.observe(containerRef.current);
|
|
73
|
-
};
|
|
74
|
-
var handleMediaQueryLayout = function (width) {
|
|
75
|
-
if (width <= 320) {
|
|
76
|
-
setMediaQueryLayout("centerContent");
|
|
77
|
-
} else {
|
|
78
|
-
setMediaQueryLayout("");
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
var marginTop = function () {
|
|
82
|
-
if (hidden && containerRef.current) {
|
|
83
|
-
return -containerRef.current.clientHeight + "px";
|
|
84
|
-
}
|
|
85
|
-
return "0";
|
|
86
|
-
};
|
|
87
|
-
if (removed) {
|
|
88
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
89
|
-
}
|
|
90
|
-
var componentIsMobile = mediaQueryLayout.includes("centerContent");
|
|
91
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
92
|
-
className: classnames(styles.banner, variant && styles[variant], layout && styles[layout], hidden && styles.hidden, mediaQueryLayout === "centerContent" && styles.centerContent, noMaxWidth && styles.noMaxWidth, illustrationType === "scene" && styles.hasSceneIllustration, smallScreenTextAlignment === "left" && styles.smallScreenTextAlignment),
|
|
93
|
-
style: {
|
|
94
|
-
marginTop: marginTop()
|
|
95
|
-
},
|
|
96
|
-
ref: containerRef,
|
|
97
|
-
onTransitionEnd: onTransitionEnd
|
|
98
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className: styles.illustrationWrapper
|
|
100
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
101
|
-
className: styles.illustration
|
|
102
|
-
}, illustrationType === "scene" ? /*#__PURE__*/React.cloneElement(illustration, {
|
|
103
|
-
enableAspectRatio: true
|
|
104
|
-
}) : illustration)), /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
className: styles.descriptionAndActions
|
|
106
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className: styles.descriptionContainer
|
|
108
|
-
}, "content" in restProps && restProps.content, "text" in restProps && ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
109
|
-
className: styles.headingWrapper
|
|
110
|
-
}, /*#__PURE__*/React.createElement(Heading, {
|
|
111
|
-
tag: (_c = (_b = restProps === null || restProps === void 0 ? void 0 : restProps.text) === null || _b === void 0 ? void 0 : _b.titleTag) !== null && _c !== void 0 ? _c : "h3",
|
|
112
|
-
variant: "heading-3"
|
|
113
|
-
}, (_d = restProps === null || restProps === void 0 ? void 0 : restProps.text) === null || _d === void 0 ? void 0 : _d.title)), /*#__PURE__*/React.createElement(Text, {
|
|
114
|
-
tag: "p",
|
|
115
|
-
variant: "body"
|
|
116
|
-
}, (_e = restProps === null || restProps === void 0 ? void 0 : restProps.text) === null || _e === void 0 ? void 0 : _e.description)))), (actions === null || actions === void 0 ? void 0 : actions.primary) && ( /*#__PURE__*/React.createElement(Media, {
|
|
117
|
-
query: "(max-width: 767px)"
|
|
118
|
-
}, function (isMobile) {
|
|
119
|
-
var _a;
|
|
120
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
121
|
-
className: classnames({
|
|
122
|
-
noRightMargin: isMobile || componentIsMobile,
|
|
123
|
-
rightMargin: !(isMobile || componentIsMobile) && layout === "default"
|
|
124
|
-
})
|
|
125
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
126
|
-
className: classnames(styles.buttonContainer, (actions === null || actions === void 0 ? void 0 : actions.secondary) && styles.secondaryAction)
|
|
127
|
-
}, /*#__PURE__*/React.createElement(WithTooltip, {
|
|
128
|
-
tooltipProps: actions.primary.tooltip
|
|
129
|
-
}, /*#__PURE__*/React.createElement(Button, __assign({
|
|
130
|
-
icon: withActionButtonArrow ? ( /*#__PURE__*/React.createElement(ArrowForwardIcon, {
|
|
131
|
-
role: "presentation"
|
|
132
|
-
})) : undefined,
|
|
133
|
-
iconPosition: "end"
|
|
134
|
-
}, actions.primary, {
|
|
135
|
-
fullWidth: isMobile || componentIsMobile
|
|
136
|
-
}))), (actions === null || actions === void 0 ? void 0 : actions.secondary) && ( /*#__PURE__*/React.createElement(WithTooltip, {
|
|
137
|
-
tooltipProps: actions.secondary.tooltip
|
|
138
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
139
|
-
className: styles.secondaryAction
|
|
140
|
-
}, /*#__PURE__*/React.createElement(Button, __assign({
|
|
141
|
-
secondary: true
|
|
142
|
-
}, actions.secondary, {
|
|
143
|
-
onClick: secondaryDismiss ? function () {
|
|
144
|
-
return handleDismissBanner();
|
|
145
|
-
} : (_a = actions === null || actions === void 0 ? void 0 : actions.secondary) === null || _a === void 0 ? void 0 : _a.onClick,
|
|
146
|
-
fullWidth: isMobile || componentIsMobile
|
|
147
|
-
})))))));
|
|
148
|
-
}))));
|
|
149
|
-
};
|
|
150
|
-
GuidanceBlock.displayName = "GuidanceBlock";
|
|
151
|
-
return GuidanceBlock;
|
|
152
|
-
}();
|
|
153
|
-
export { GuidanceBlock };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var styles = {
|
|
2
|
-
"rightMargin": "GuidanceBlock-module_rightMargin__SbVUD",
|
|
3
|
-
"noRightMargin": "GuidanceBlock-module_noRightMargin__CbCz9",
|
|
4
|
-
"banner": "GuidanceBlock-module_banner__NyOs1",
|
|
5
|
-
"noMaxWidth": "GuidanceBlock-module_noMaxWidth__Rh070",
|
|
6
|
-
"illustrationWrapper": "GuidanceBlock-module_illustrationWrapper__lIGaj",
|
|
7
|
-
"illustration": "GuidanceBlock-module_illustration__W7PwM",
|
|
8
|
-
"hasSceneIllustration": "GuidanceBlock-module_hasSceneIllustration__CX8GF",
|
|
9
|
-
"descriptionContainer": "GuidanceBlock-module_descriptionContainer__JyNJp",
|
|
10
|
-
"descriptionAndActions": "GuidanceBlock-module_descriptionAndActions__2KGZQ",
|
|
11
|
-
"buttonContainer": "GuidanceBlock-module_buttonContainer__6-Ty-",
|
|
12
|
-
"hidden": "GuidanceBlock-module_hidden__a6zCg",
|
|
13
|
-
"headingWrapper": "GuidanceBlock-module_headingWrapper__3zGY2",
|
|
14
|
-
"cancel": "GuidanceBlock-module_cancel__G-4ci",
|
|
15
|
-
"icon": "GuidanceBlock-module_icon__W0pEX",
|
|
16
|
-
"disabled": "GuidanceBlock-module_disabled__GL1dK",
|
|
17
|
-
"hover": "GuidanceBlock-module_hover__5PdJM",
|
|
18
|
-
"active": "GuidanceBlock-module_active__3ifEz",
|
|
19
|
-
"default": "GuidanceBlock-module_default__9rhEq",
|
|
20
|
-
"positive": "GuidanceBlock-module_positive__m6n-N",
|
|
21
|
-
"negative": "GuidanceBlock-module_negative__Z8tj-",
|
|
22
|
-
"assertive": "GuidanceBlock-module_assertive__76y6Y",
|
|
23
|
-
"informative": "GuidanceBlock-module_informative__QBzhx",
|
|
24
|
-
"cautionary": "GuidanceBlock-module_cautionary__iwOA-",
|
|
25
|
-
"prominent": "GuidanceBlock-module_prominent__LWMSm",
|
|
26
|
-
"inline": "GuidanceBlock-module_inline__Dq-OU",
|
|
27
|
-
"stacked": "GuidanceBlock-module_stacked__h3bUz",
|
|
28
|
-
"centerContent": "GuidanceBlock-module_centerContent__Cyd34",
|
|
29
|
-
"smallScreenTextAlignment": "GuidanceBlock-module_smallScreenTextAlignment__VI-fw"
|
|
30
|
-
};
|
|
31
|
-
export { styles as default };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var styles = {
|
|
2
|
-
"rightMargin": "GuidanceBlock-module_rightMargin__gIzig",
|
|
3
|
-
"noRightMargin": "GuidanceBlock-module_noRightMargin__xtPiX",
|
|
4
|
-
"banner": "GuidanceBlock-module_banner__ng6kh",
|
|
5
|
-
"noMaxWidth": "GuidanceBlock-module_noMaxWidth__V-DbD",
|
|
6
|
-
"illustrationWrapper": "GuidanceBlock-module_illustrationWrapper__-rRYc",
|
|
7
|
-
"illustration": "GuidanceBlock-module_illustration__LpEwu",
|
|
8
|
-
"hasSceneIllustration": "GuidanceBlock-module_hasSceneIllustration__HxwOA",
|
|
9
|
-
"descriptionContainer": "GuidanceBlock-module_descriptionContainer__N1EEi",
|
|
10
|
-
"descriptionAndActions": "GuidanceBlock-module_descriptionAndActions__D206m",
|
|
11
|
-
"buttonContainer": "GuidanceBlock-module_buttonContainer__w3vEh",
|
|
12
|
-
"hidden": "GuidanceBlock-module_hidden__hgakl",
|
|
13
|
-
"headingWrapper": "GuidanceBlock-module_headingWrapper__xqjf-",
|
|
14
|
-
"cancel": "GuidanceBlock-module_cancel__0lcBe",
|
|
15
|
-
"icon": "GuidanceBlock-module_icon__XVKkH",
|
|
16
|
-
"disabled": "GuidanceBlock-module_disabled__tbZPh",
|
|
17
|
-
"hover": "GuidanceBlock-module_hover__vs7Wu",
|
|
18
|
-
"active": "GuidanceBlock-module_active__eJu5N",
|
|
19
|
-
"default": "GuidanceBlock-module_default__W7fnR",
|
|
20
|
-
"expert-advice": "GuidanceBlock-module_expert-advice__uGg7D",
|
|
21
|
-
"inline": "GuidanceBlock-module_inline__DC0LQ",
|
|
22
|
-
"stacked": "GuidanceBlock-module_stacked__2SSuH",
|
|
23
|
-
"centerContent": "GuidanceBlock-module_centerContent__pS9uQ",
|
|
24
|
-
"smallScreenTextAlignment": "GuidanceBlock-module_smallScreenTextAlignment__iaw5d"
|
|
25
|
-
};
|
|
26
|
-
export { styles as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { GuidanceBlock } from './__containers__/GuidanceBlock/v1/GuidanceBlock.mjs';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { GuidanceBlock } from './__containers__/GuidanceBlock/v2/GuidanceBlock.mjs';
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HeadingProps } from "../../../Heading";
|
|
3
|
-
import { SceneProps, SpotProps } from "../../../Illustration";
|
|
4
|
-
import { ButtonProps } from "../../../__actions__/v2";
|
|
5
|
-
import { TooltipProps } from "../../../__overlays__/Tooltip/v1";
|
|
6
|
-
export type ActionProps = ButtonProps & {
|
|
7
|
-
tooltip?: TooltipProps;
|
|
8
|
-
};
|
|
9
|
-
type LayoutType = "default" | "inline" | "stacked";
|
|
10
|
-
type IllustrationType = "spot" | "scene";
|
|
11
|
-
type TextAlignment = "center" | "left";
|
|
12
|
-
type GuidanceBlockActions = {
|
|
13
|
-
primary: ActionProps;
|
|
14
|
-
secondary?: ActionProps;
|
|
15
|
-
dismiss?: {
|
|
16
|
-
onClick: () => void;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
type BaseGuidanceBlockProps = {
|
|
20
|
-
layout?: LayoutType;
|
|
21
|
-
illustration: React.ReactElement<SpotProps | SceneProps>;
|
|
22
|
-
illustrationType?: IllustrationType;
|
|
23
|
-
smallScreenTextAlignment?: TextAlignment;
|
|
24
|
-
actions?: GuidanceBlockActions;
|
|
25
|
-
secondaryDismiss?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* If you are migrating from the KAIO v1:
|
|
28
|
-
* - `prominent` is now `expert-advice`
|
|
29
|
-
* - All other variants are removed in favour of `default`
|
|
30
|
-
*/
|
|
31
|
-
variant?: "default" | "expert-advice";
|
|
32
|
-
withActionButtonArrow?: boolean;
|
|
33
|
-
noMaxWidth?: boolean;
|
|
34
|
-
};
|
|
35
|
-
type GuidanceBlockWithText = {
|
|
36
|
-
text: {
|
|
37
|
-
title: string;
|
|
38
|
-
titleTag?: HeadingProps["tag"];
|
|
39
|
-
description: string | React.ReactNode;
|
|
40
|
-
};
|
|
41
|
-
} & BaseGuidanceBlockProps;
|
|
42
|
-
type GuidanceBlockPropsWithContent = {
|
|
43
|
-
content: React.ReactElement;
|
|
44
|
-
} & BaseGuidanceBlockProps;
|
|
45
|
-
export type GuidanceBlockProps = GuidanceBlockWithText | GuidanceBlockPropsWithContent;
|
|
46
|
-
export type GuidanceBlockState = {
|
|
47
|
-
hidden: boolean;
|
|
48
|
-
removed: boolean;
|
|
49
|
-
mediaQueryLayout: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082093807/Guidance+Block Guidance} |
|
|
53
|
-
* {@link https://cultureamp.design/?path=/docs/components-guidanceblock--docs Storybook}
|
|
54
|
-
*/
|
|
55
|
-
export declare const GuidanceBlock: {
|
|
56
|
-
({ layout, variant, withActionButtonArrow, noMaxWidth, illustrationType, smallScreenTextAlignment, actions, illustration, secondaryDismiss, ...restProps }: GuidanceBlockProps): JSX.Element;
|
|
57
|
-
displayName: string;
|
|
58
|
-
};
|
|
59
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GuidanceBlock";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GuidanceBlock/v1";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./GuidanceBlock/v2";
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
@import "~@kaizen/design-tokens/sass/shadow";
|
|
2
|
-
@import "~@kaizen/design-tokens/sass/border";
|
|
3
|
-
@import "~@kaizen/design-tokens/sass/layout";
|
|
4
|
-
@import "~@kaizen/design-tokens/sass/color";
|
|
5
|
-
@import "~@kaizen/design-tokens/sass/animation";
|
|
6
|
-
@import "~@kaizen/design-tokens/sass/spacing";
|
|
7
|
-
@import "../../../../styles/utils/responsive";
|
|
8
|
-
@import "../../../../styles/utils/button-reset";
|
|
9
|
-
|
|
10
|
-
@mixin guidance-block-under-480 {
|
|
11
|
-
@media (max-width: 480px) {
|
|
12
|
-
@content;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
$bannerPadding: $spacing-lg;
|
|
17
|
-
$ca-banner-fade-out: opacity $animation-duration-slow ease;
|
|
18
|
-
$ca-banner-collapse-height-delayed: margin-top $animation-duration-fast
|
|
19
|
-
$animation-duration-slow ease;
|
|
20
|
-
$illustration-size: 155px;
|
|
21
|
-
$scene-illustration-size: 300px;
|
|
22
|
-
|
|
23
|
-
.rightMargin {
|
|
24
|
-
margin-right: $spacing-8;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.noRightMargin {
|
|
28
|
-
margin-right: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.banner.noMaxWidth {
|
|
32
|
-
max-width: inherit;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.banner {
|
|
36
|
-
--border-width: var(--border-width-1);
|
|
37
|
-
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
gap: $spacing-sm;
|
|
41
|
-
min-width: 320px;
|
|
42
|
-
max-width: $layout-breakpoints-large;
|
|
43
|
-
border: var(--border-width) var(--border-solid-border-style);
|
|
44
|
-
border-radius: $border-solid-border-radius;
|
|
45
|
-
padding: calc(#{$bannerPadding} - var(--border-width));
|
|
46
|
-
box-shadow: $shadow-small-box-shadow;
|
|
47
|
-
position: relative;
|
|
48
|
-
top: -1px;
|
|
49
|
-
transition: $ca-banner-fade-out, $ca-banner-collapse-height-delayed;
|
|
50
|
-
color: $color-purple-800;
|
|
51
|
-
|
|
52
|
-
@include ca-media-desktop {
|
|
53
|
-
min-height: calc(12rem - calc(#{$bannerPadding} * 2));
|
|
54
|
-
flex-direction: row;
|
|
55
|
-
gap: $spacing-md;
|
|
56
|
-
width: auto;
|
|
57
|
-
align-items: center;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@include ca-media-mobile {
|
|
61
|
-
min-width: unset;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.illustrationWrapper {
|
|
66
|
-
display: flex;
|
|
67
|
-
|
|
68
|
-
@include ca-media-tablet {
|
|
69
|
-
text-align: center;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
align-self: center;
|
|
72
|
-
padding: $spacing-sm;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@include ca-media-mobile {
|
|
76
|
-
display: none;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.illustration {
|
|
81
|
-
width: $illustration-size;
|
|
82
|
-
height: $illustration-size;
|
|
83
|
-
|
|
84
|
-
// This has been created to handle scene illustrations consistently until the tile component is created
|
|
85
|
-
.hasSceneIllustration & {
|
|
86
|
-
display: flex;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
max-width: $scene-illustration-size;
|
|
89
|
-
max-height: $scene-illustration-size;
|
|
90
|
-
width: $scene-illustration-size;
|
|
91
|
-
height: auto;
|
|
92
|
-
|
|
93
|
-
figure {
|
|
94
|
-
max-height: 100%;
|
|
95
|
-
max-width: 100%;
|
|
96
|
-
aspect-ratio: 4/3;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
img {
|
|
100
|
-
height: 100%;
|
|
101
|
-
object-fit: contain;
|
|
102
|
-
object-position: center;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.descriptionContainer {
|
|
108
|
-
flex: 1;
|
|
109
|
-
text-align: center;
|
|
110
|
-
align-self: center;
|
|
111
|
-
max-width: 780px;
|
|
112
|
-
|
|
113
|
-
@include ca-media-desktop {
|
|
114
|
-
padding: 0 $spacing-sm;
|
|
115
|
-
text-align: left;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@include ca-media-mobile {
|
|
119
|
-
margin: $spacing-sm;
|
|
120
|
-
max-width: 100%;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
[dir="rtl"] & {
|
|
124
|
-
@include ca-media-desktop {
|
|
125
|
-
padding: 0 $spacing-sm;
|
|
126
|
-
text-align: right;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.descriptionAndActions {
|
|
132
|
-
display: flex;
|
|
133
|
-
flex: 1;
|
|
134
|
-
align-items: center;
|
|
135
|
-
justify-content: space-between;
|
|
136
|
-
gap: $spacing-md;
|
|
137
|
-
|
|
138
|
-
@include ca-media-tablet-and-under {
|
|
139
|
-
flex-direction: column;
|
|
140
|
-
width: 100%;
|
|
141
|
-
align-items: unset;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.buttonContainer {
|
|
146
|
-
display: flex;
|
|
147
|
-
flex: 1 0 auto;
|
|
148
|
-
justify-content: center;
|
|
149
|
-
flex-direction: row-reverse;
|
|
150
|
-
gap: $spacing-sm;
|
|
151
|
-
min-width: max-content;
|
|
152
|
-
|
|
153
|
-
@include ca-media-tablet-and-up {
|
|
154
|
-
text-align: center;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@include ca-media-mobile {
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
width: 100%;
|
|
160
|
-
margin-top: $spacing-xs;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
[dir="rtl"] & svg {
|
|
164
|
-
transform: rotate(180deg);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.hidden {
|
|
169
|
-
opacity: 0%;
|
|
170
|
-
margin-bottom: 0;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.headingWrapper {
|
|
174
|
-
margin-bottom: $spacing-md;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.cancel {
|
|
178
|
-
@include button-reset;
|
|
179
|
-
|
|
180
|
-
cursor: pointer;
|
|
181
|
-
|
|
182
|
-
.icon {
|
|
183
|
-
opacity: 70%;
|
|
184
|
-
transition: $animation-duration-fast opacity;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
&:disabled,
|
|
188
|
-
&.disabled {
|
|
189
|
-
.icon {
|
|
190
|
-
opacity: 30%;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
&:not(:disabled, .disabled) {
|
|
195
|
-
&:hover,
|
|
196
|
-
&:focus,
|
|
197
|
-
&.hover {
|
|
198
|
-
.icon {
|
|
199
|
-
opacity: 100%;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&:active,
|
|
204
|
-
&.active {
|
|
205
|
-
.icon {
|
|
206
|
-
opacity: 100%;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
position: absolute;
|
|
212
|
-
top: $spacing-sm;
|
|
213
|
-
right: $spacing-sm;
|
|
214
|
-
color: $color-purple-800;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.default {
|
|
218
|
-
border-color: var(--color-gray-500);
|
|
219
|
-
background: var(--color-white);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.expert-advice {
|
|
223
|
-
border-color: var(--color-purple-400);
|
|
224
|
-
background: $color-purple-100;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.inline,
|
|
228
|
-
.stacked {
|
|
229
|
-
flex-flow: row wrap;
|
|
230
|
-
align-items: unset;
|
|
231
|
-
gap: $spacing-md;
|
|
232
|
-
min-width: unset;
|
|
233
|
-
|
|
234
|
-
@include ca-media-tablet-and-under {
|
|
235
|
-
flex-direction: unset;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.illustrationWrapper {
|
|
239
|
-
margin-right: $spacing-sm;
|
|
240
|
-
|
|
241
|
-
[dir="rtl"] & {
|
|
242
|
-
margin-left: $spacing-sm;
|
|
243
|
-
margin-right: inherit;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
@include ca-media-tablet {
|
|
247
|
-
padding: 0;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
@include ca-media-mobile {
|
|
251
|
-
display: flex;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.descriptionAndActions {
|
|
256
|
-
margin: auto 0;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.descriptionContainer {
|
|
260
|
-
text-align: left;
|
|
261
|
-
max-width: unset;
|
|
262
|
-
min-width: 320px;
|
|
263
|
-
|
|
264
|
-
@include ca-media-desktop {
|
|
265
|
-
padding: 0;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
@include ca-media-mobile {
|
|
269
|
-
margin: 0;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
[dir="rtl"] & {
|
|
273
|
-
text-align: right;
|
|
274
|
-
|
|
275
|
-
@include ca-media-desktop {
|
|
276
|
-
padding: 0;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.buttonContainer {
|
|
282
|
-
padding-left: $spacing-sm;
|
|
283
|
-
justify-content: flex-start;
|
|
284
|
-
width: unset;
|
|
285
|
-
min-width: unset;
|
|
286
|
-
|
|
287
|
-
@include ca-media-mobile {
|
|
288
|
-
flex-direction: row-reverse;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
[dir="rtl"] & {
|
|
292
|
-
padding-left: 0;
|
|
293
|
-
padding-right: $spacing-sm;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
> * {
|
|
297
|
-
width: unset;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
&.hasSceneIllustration {
|
|
302
|
-
justify-content: center;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
&.centerContent {
|
|
306
|
-
flex-direction: column;
|
|
307
|
-
|
|
308
|
-
&.hasSceneIllustration .illustration {
|
|
309
|
-
width: 100%;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.illustrationWrapper {
|
|
313
|
-
margin: 0 auto;
|
|
314
|
-
align-self: center;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.descriptionContainer {
|
|
318
|
-
text-align: center;
|
|
319
|
-
min-width: unset;
|
|
320
|
-
|
|
321
|
-
[dir="rtl"] & {
|
|
322
|
-
text-align: center;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.buttonContainer {
|
|
327
|
-
padding: 0;
|
|
328
|
-
flex-direction: column;
|
|
329
|
-
min-width: unset;
|
|
330
|
-
justify-content: center;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
&.centerContent.smallScreenTextAlignment {
|
|
335
|
-
.descriptionContainer {
|
|
336
|
-
text-align: left;
|
|
337
|
-
|
|
338
|
-
[dir="rtl"] & {
|
|
339
|
-
text-align: right;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/* stylelint-disable no-descending-specificity */
|
|
346
|
-
.stacked {
|
|
347
|
-
.descriptionAndActions {
|
|
348
|
-
flex-direction: column;
|
|
349
|
-
align-items: unset;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.descriptionContainer {
|
|
353
|
-
align-self: flex-start;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
/* stylelint-enable no-descending-specificity */
|