@thecb/components 9.3.0 → 9.3.1-beta.1
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/index.cjs.js +136 -202
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.esm.js +137 -202
- package/dist/index.esm.js.map +1 -1
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/button-with-action/ButtonWithAction.js +70 -76
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/atoms/icons/TrashIcon.js +40 -42
- package/src/components/atoms/icons/icons.stories.js +1 -3
- package/src/components/atoms/icons/index.d.ts +0 -1
- package/src/components/atoms/icons/index.js +1 -3
- package/src/components/molecules/radio-section/RadioSection.js +140 -131
- package/src/components/molecules/radio-section/RadioSection.stories.js +1 -0
- package/src/components/atoms/icons/KebabMenuIcon.d.ts +0 -1
- package/src/components/atoms/icons/KebabMenuIcon.js +0 -38
- package/src/components/molecules/popup-menu/PopupMenu.js +0 -152
- package/src/components/molecules/popup-menu/PopupMenu.stories.js +0 -40
- package/src/components/molecules/popup-menu/PopupMenu.styled.js +0 -20
- package/src/components/molecules/popup-menu/PopupMenu.theme.js +0 -11
- package/src/components/molecules/popup-menu/index.d.ts +0 -25
- package/src/components/molecules/popup-menu/index.js +0 -3
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.js +0 -79
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.styled.js +0 -27
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.theme.js +0 -23
package/package.json
CHANGED
package/src/.DS_Store
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
2
|
import styled, { ThemeContext } from "styled-components";
|
|
3
3
|
import posed from "react-pose";
|
|
4
4
|
import { linear } from "@popmotion/easing";
|
|
@@ -60,36 +60,32 @@ const Spinner = ({ color, isMobile }) => (
|
|
|
60
60
|
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
|
-
const ButtonWithAction =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"Button",
|
|
88
|
-
variant
|
|
89
|
-
);
|
|
90
|
-
const { isMobile } = themeContext;
|
|
63
|
+
const ButtonWithAction = ({
|
|
64
|
+
action = noop,
|
|
65
|
+
variant = "primary",
|
|
66
|
+
text,
|
|
67
|
+
textWrap = false,
|
|
68
|
+
isLoading = false,
|
|
69
|
+
loadingColor = "white",
|
|
70
|
+
dataQa = null,
|
|
71
|
+
textExtraStyles,
|
|
72
|
+
contentOverride = false,
|
|
73
|
+
extraStyles = "",
|
|
74
|
+
tabIndex,
|
|
75
|
+
children,
|
|
76
|
+
extraDisabledStyles,
|
|
77
|
+
...rest
|
|
78
|
+
}) => {
|
|
79
|
+
const themeContext = useContext(ThemeContext);
|
|
80
|
+
const themeValues = createThemeValues(
|
|
81
|
+
themeContext,
|
|
82
|
+
fallbackValues,
|
|
83
|
+
"Button",
|
|
84
|
+
variant
|
|
85
|
+
);
|
|
86
|
+
const { isMobile } = themeContext;
|
|
91
87
|
|
|
92
|
-
|
|
88
|
+
const hoverStyles = `
|
|
93
89
|
outline: none;
|
|
94
90
|
background-color: ${themeValues.hoverBackgroundColor};
|
|
95
91
|
border-color: ${themeValues.hoverBorderColor};
|
|
@@ -99,7 +95,7 @@ const ButtonWithAction = forwardRef(
|
|
|
99
95
|
};
|
|
100
96
|
cursor: pointer;
|
|
101
97
|
`;
|
|
102
|
-
|
|
98
|
+
const activeStyles = `
|
|
103
99
|
outline: none;
|
|
104
100
|
background-color: ${themeValues.activeBackgroundColor};
|
|
105
101
|
border-color: ${themeValues.activeBorderColor};
|
|
@@ -108,7 +104,7 @@ const ButtonWithAction = forwardRef(
|
|
|
108
104
|
variant === "ghost" || variant === "smallGhost" ? "underline" : "none"
|
|
109
105
|
};
|
|
110
106
|
`;
|
|
111
|
-
|
|
107
|
+
const disabledStyles = `
|
|
112
108
|
background-color: #6D717E;
|
|
113
109
|
border-color: #6D717E;
|
|
114
110
|
color: #FFFFFF;
|
|
@@ -120,49 +116,47 @@ const ButtonWithAction = forwardRef(
|
|
|
120
116
|
${extraDisabledStyles}
|
|
121
117
|
`;
|
|
122
118
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
);
|
|
119
|
+
return (
|
|
120
|
+
<Box
|
|
121
|
+
variant={variant}
|
|
122
|
+
padding={themeValues.padding}
|
|
123
|
+
minHeight={themeValues.height}
|
|
124
|
+
minWidth={themeValues.minWidth}
|
|
125
|
+
background={themeValues.backgroundColor}
|
|
126
|
+
border={themeValues.border}
|
|
127
|
+
hoverStyles={hoverStyles}
|
|
128
|
+
activeStyles={activeStyles}
|
|
129
|
+
disabledStyles={disabledStyles}
|
|
130
|
+
as="button"
|
|
131
|
+
onClick={isLoading ? undefined : action}
|
|
132
|
+
borderRadius="2px"
|
|
133
|
+
theme={themeContext}
|
|
134
|
+
extraStyles={`margin: 0.5rem; ${extraStyles}`}
|
|
135
|
+
dataQa={dataQa}
|
|
136
|
+
tabIndex={tabIndex}
|
|
137
|
+
{...rest}
|
|
138
|
+
>
|
|
139
|
+
{contentOverride ? (
|
|
140
|
+
children
|
|
141
|
+
) : (
|
|
142
|
+
<Center intrinsic>
|
|
143
|
+
{isLoading ? (
|
|
144
|
+
<Spinner color={loadingColor} isMobile={isMobile} />
|
|
145
|
+
) : (
|
|
146
|
+
<Text
|
|
147
|
+
weight={themeValues.fontWeight}
|
|
148
|
+
variant={themeValues.fontSizeVariant}
|
|
149
|
+
color={themeValues.color}
|
|
150
|
+
textWrap={textWrap}
|
|
151
|
+
extraStyles={textExtraStyles}
|
|
152
|
+
>
|
|
153
|
+
{text}
|
|
154
|
+
</Text>
|
|
155
|
+
)}
|
|
156
|
+
</Center>
|
|
157
|
+
)}
|
|
158
|
+
</Box>
|
|
159
|
+
);
|
|
160
|
+
};
|
|
167
161
|
|
|
168
162
|
export default ButtonWithAction;
|
|
Binary file
|
|
@@ -2,48 +2,46 @@ import React from "react";
|
|
|
2
2
|
import { fallbackValues } from "./Icons.theme";
|
|
3
3
|
import { themeComponent } from "../../../util/themeUtils";
|
|
4
4
|
|
|
5
|
-
const TrashIcon = ({ themeValues
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const TrashIcon = ({ themeValues }) => (
|
|
6
|
+
<svg
|
|
7
|
+
width="20px"
|
|
8
|
+
height="20px"
|
|
9
|
+
viewBox="0 0 20 20"
|
|
10
|
+
version="1.1"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
13
|
+
>
|
|
14
|
+
<defs>
|
|
15
|
+
<path
|
|
16
|
+
d="M15,7 L14,15.5714286 C14,16.3571429 13.25,17 12.3333333,17 L12.3333333,17 L7.66666667,17 C6.75,17 6,16.3571429 6,15.5714286 L6,15.5714286 L5,7 L15,7 Z M12.1428571,3 L13,4 L16,4 L16,6 L4,6 L4,4 L7,4 L7.85714286,3 L12.1428571,3 Z"
|
|
17
|
+
id="trash-path-1"
|
|
18
|
+
></path>
|
|
19
|
+
</defs>
|
|
20
|
+
<g
|
|
21
|
+
id="trash-Icons-/-Small-/-20px-S-/-Trash---Mobile---20px"
|
|
22
|
+
stroke="none"
|
|
23
|
+
strokeWidth="1"
|
|
24
|
+
fill="none"
|
|
25
|
+
fillRule="evenodd"
|
|
14
26
|
>
|
|
15
|
-
<
|
|
16
|
-
<path
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fillRule="nonzero"
|
|
35
|
-
xlinkHref="#trash-path-1"
|
|
36
|
-
></use>
|
|
37
|
-
<polygon
|
|
38
|
-
id="trash-Path"
|
|
39
|
-
fill={iconFill ?? themeValues.singleIconColor}
|
|
40
|
-
fillRule="nonzero"
|
|
41
|
-
mask="url(#trash-mask-2)"
|
|
42
|
-
points="0 0 20 0 20 20 0 20"
|
|
43
|
-
></polygon>
|
|
44
|
-
</g>
|
|
45
|
-
</svg>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
27
|
+
<mask id="trash-mask-2" fill="white">
|
|
28
|
+
<use xlinkHref="#trash-path-1"></use>
|
|
29
|
+
</mask>
|
|
30
|
+
<use
|
|
31
|
+
id="trash-Mask"
|
|
32
|
+
fill={themeValues.singleIconColor}
|
|
33
|
+
fillRule="nonzero"
|
|
34
|
+
xlinkHref="#trash-path-1"
|
|
35
|
+
></use>
|
|
36
|
+
<polygon
|
|
37
|
+
id="trash-Path"
|
|
38
|
+
fill={themeValues.singleIconColor}
|
|
39
|
+
fillRule="nonzero"
|
|
40
|
+
mask="url(#trash-mask-2)"
|
|
41
|
+
points="0 0 20 0 20 20 0 20"
|
|
42
|
+
></polygon>
|
|
43
|
+
</g>
|
|
44
|
+
</svg>
|
|
45
|
+
);
|
|
48
46
|
|
|
49
47
|
export default themeComponent(TrashIcon, "Icons", fallbackValues, "primary");
|
|
@@ -38,8 +38,7 @@ import {
|
|
|
38
38
|
SuccessfulIcon,
|
|
39
39
|
VoidedIcon,
|
|
40
40
|
StatusUnknownIcon,
|
|
41
|
-
AutopayIcon
|
|
42
|
-
KebabMenuIcon
|
|
41
|
+
AutopayIcon
|
|
43
42
|
} from "./index";
|
|
44
43
|
|
|
45
44
|
const story = page({
|
|
@@ -85,4 +84,3 @@ export const successfulIcon = () => <SuccessfulIcon />;
|
|
|
85
84
|
export const voidedIcon = () => <VoidedIcon />;
|
|
86
85
|
export const statusUnknownIcon = () => <StatusUnknownIcon />;
|
|
87
86
|
export const autopayIcon = () => <AutopayIcon />;
|
|
88
|
-
export const kebabMenuIcon = () => <KebabMenuIcon />;
|
|
@@ -86,7 +86,6 @@ import ArrowLeftCircleIconMedium from "./ArrowLeftCircleIconMedium";
|
|
|
86
86
|
import ChargebackIconMedium from "./ChargebackIconMedium";
|
|
87
87
|
import ChargebackReversalIconMedium from "./ChargebackReversalIconMedium";
|
|
88
88
|
import PlusCircleIcon from "./PlusCircleIcon";
|
|
89
|
-
import KebabMenuIcon from "./KebabMenuIcon";
|
|
90
89
|
|
|
91
90
|
export {
|
|
92
91
|
AccountsIcon,
|
|
@@ -176,6 +175,5 @@ export {
|
|
|
176
175
|
ArrowLeftCircleIconMedium,
|
|
177
176
|
ChargebackIconMedium,
|
|
178
177
|
ChargebackReversalIconMedium,
|
|
179
|
-
PlusCircleIcon
|
|
180
|
-
KebabMenuIcon
|
|
178
|
+
PlusCircleIcon
|
|
181
179
|
};
|
|
@@ -48,7 +48,8 @@ const RadioSection = ({
|
|
|
48
48
|
openHeight = "auto",
|
|
49
49
|
containerStyles = "",
|
|
50
50
|
ariaDescribedBy,
|
|
51
|
-
isSectionRequired = false
|
|
51
|
+
isSectionRequired = false,
|
|
52
|
+
legendText = ""
|
|
52
53
|
}) => {
|
|
53
54
|
const handleKeyDown = (id, e) => {
|
|
54
55
|
if (e?.keyCode === 13 || e?.keyCode === 32) {
|
|
@@ -106,143 +107,151 @@ const RadioSection = ({
|
|
|
106
107
|
borderRadius="4px"
|
|
107
108
|
extraStyles={containerStyles}
|
|
108
109
|
>
|
|
109
|
-
<Stack
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
110
|
+
<Stack childGap="0">
|
|
111
|
+
<fieldset role="radiogroup" tabIndex="0" required={isSectionRequired}>
|
|
112
|
+
<legend>
|
|
113
|
+
<Box
|
|
114
|
+
width="0"
|
|
115
|
+
srOnly={true}
|
|
116
|
+
border="0"
|
|
117
|
+
padding="0"
|
|
118
|
+
margin="0"
|
|
119
|
+
></Box>
|
|
120
|
+
</legend>
|
|
121
|
+
{sections
|
|
122
|
+
.filter(section => !section.hidden)
|
|
123
|
+
.map(section => (
|
|
124
|
+
<Motion
|
|
125
|
+
tabIndex={
|
|
126
|
+
section.hideRadioButton || section.disabled ? "-1" : "0"
|
|
127
|
+
}
|
|
128
|
+
onKeyDown={e =>
|
|
129
|
+
!section.disabled && handleKeyDown(section.id, e)
|
|
130
|
+
}
|
|
131
|
+
onFocus={() => !section.disabled && setFocused(section.id)}
|
|
132
|
+
onBlur={() => !section.disabled && setFocused(null)}
|
|
133
|
+
hoverStyles={themeValues.focusStyles}
|
|
134
|
+
animate={openSection === section.id ? "open" : "closed"}
|
|
135
|
+
initial={initiallyOpen ? "open" : "closed"}
|
|
136
|
+
key={`item-${section.id}`}
|
|
137
|
+
extraStyles={borderStyles}
|
|
138
|
+
role="radio"
|
|
139
|
+
aria-checked={openSection === section.id}
|
|
140
|
+
aria-disabled={section.disabled}
|
|
141
|
+
aria-required={section?.required}
|
|
142
|
+
>
|
|
143
|
+
<Stack childGap="0">
|
|
144
|
+
<Box
|
|
145
|
+
padding={
|
|
146
|
+
section.hideRadioButton ? "1.5rem" : "1.25rem 1.5rem"
|
|
147
|
+
}
|
|
148
|
+
background={
|
|
149
|
+
section.disabled
|
|
150
|
+
? themeValues.headingDisabledColor
|
|
151
|
+
: themeValues.headingBackgroundColor
|
|
152
|
+
}
|
|
153
|
+
onClick={
|
|
154
|
+
(isMobile && supportsTouch) || section.disabled
|
|
155
|
+
? noop
|
|
156
|
+
: () => toggleOpenSection(section.id)
|
|
157
|
+
}
|
|
158
|
+
onTouchEnd={
|
|
159
|
+
isMobile && supportsTouch && !section.disabled
|
|
160
|
+
? () => toggleOpenSection(section.id)
|
|
161
|
+
: noop
|
|
162
|
+
}
|
|
163
|
+
key={`header-${section.id}`}
|
|
164
|
+
borderSize="0px"
|
|
165
|
+
borderColor={themeValues.borderColor}
|
|
166
|
+
borderWidthOverride={
|
|
167
|
+
openSection === section.id && !!section.content
|
|
168
|
+
? `0px 0px 1px 0px`
|
|
169
|
+
: ``
|
|
170
|
+
}
|
|
171
|
+
extraStyles={!section.disabled ? "cursor: pointer;" : ""}
|
|
172
|
+
dataQa={section.dataQa ? section.dataQa : section.id}
|
|
170
173
|
>
|
|
171
|
-
<Cluster
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
section
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
174
|
+
<Cluster
|
|
175
|
+
justify="space-between"
|
|
176
|
+
align="center"
|
|
177
|
+
childGap="1px"
|
|
178
|
+
nowrap
|
|
179
|
+
>
|
|
180
|
+
<Cluster justify="flex-start" align="center" nowrap>
|
|
181
|
+
{!section.hideRadioButton && (
|
|
182
|
+
<Box padding="0">
|
|
183
|
+
<RadioButton
|
|
184
|
+
id={`radio-input-${idString(section)}`}
|
|
185
|
+
name={idString(section)}
|
|
186
|
+
ariaDescribedBy={ariaDescribedBy}
|
|
187
|
+
radioOn={openSection === section.id}
|
|
188
|
+
radioFocused={focused === section.id}
|
|
189
|
+
toggleRadio={
|
|
190
|
+
section.disabled
|
|
191
|
+
? noop
|
|
192
|
+
: () => toggleOpenSection(section.id)
|
|
193
|
+
}
|
|
194
|
+
isRequired={section?.required}
|
|
195
|
+
/>
|
|
196
|
+
</Box>
|
|
197
|
+
)}
|
|
198
|
+
{section.titleIcon && (
|
|
199
|
+
<Cluster align="center">{section.titleIcon}</Cluster>
|
|
200
|
+
)}
|
|
201
|
+
<Box padding={section.titleIcon ? "0 0 0 8px" : "0"}>
|
|
202
|
+
<Text
|
|
203
|
+
as="label"
|
|
204
|
+
htmlFor={`radio-input-${idString(section)}`}
|
|
205
|
+
color={CHARADE_GREY}
|
|
206
|
+
>
|
|
207
|
+
{section.title}
|
|
208
|
+
</Text>
|
|
188
209
|
</Box>
|
|
210
|
+
</Cluster>
|
|
211
|
+
{section.rightIcons && (
|
|
212
|
+
<Cluster
|
|
213
|
+
childGap="0.5rem"
|
|
214
|
+
aria-label={section?.rightIconsLabel || null}
|
|
215
|
+
role={section?.rightIconsRole || null}
|
|
216
|
+
>
|
|
217
|
+
{section.rightIcons.map(icon => (
|
|
218
|
+
<RightIcon
|
|
219
|
+
src={icon.img}
|
|
220
|
+
key={icon.img}
|
|
221
|
+
fade={!icon.enabled}
|
|
222
|
+
isMobile={isMobile}
|
|
223
|
+
alt={icon.altText}
|
|
224
|
+
aria-disabled={!icon.enabled}
|
|
225
|
+
/>
|
|
226
|
+
))}
|
|
227
|
+
</Cluster>
|
|
189
228
|
)}
|
|
190
|
-
{section.
|
|
191
|
-
<
|
|
229
|
+
{section.rightTitleContent && (
|
|
230
|
+
<Fragment>{section.rightTitleContent}</Fragment>
|
|
192
231
|
)}
|
|
193
|
-
<Box padding={section.titleIcon ? "0 0 0 8px" : "0"}>
|
|
194
|
-
<Text
|
|
195
|
-
as="label"
|
|
196
|
-
htmlFor={`radio-input-${idString(section)}`}
|
|
197
|
-
color={CHARADE_GREY}
|
|
198
|
-
>
|
|
199
|
-
{section.title}
|
|
200
|
-
</Text>
|
|
201
|
-
</Box>
|
|
202
232
|
</Cluster>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
233
|
+
</Box>
|
|
234
|
+
<AnimatePresence initial={false}>
|
|
235
|
+
{openSection === section.id && (
|
|
236
|
+
<Motion
|
|
237
|
+
key={`content-${section.id}`}
|
|
238
|
+
padding="0"
|
|
239
|
+
background={themeValues.bodyBackgroundColor}
|
|
240
|
+
layoutTransition
|
|
241
|
+
initial="closed"
|
|
242
|
+
animate="open"
|
|
243
|
+
exit="closed"
|
|
244
|
+
variants={wrapper}
|
|
245
|
+
extraStyles={`transform-origin: 100% 0;`}
|
|
208
246
|
>
|
|
209
|
-
{section.
|
|
210
|
-
|
|
211
|
-
src={icon.img}
|
|
212
|
-
key={icon.img}
|
|
213
|
-
fade={!icon.enabled}
|
|
214
|
-
isMobile={isMobile}
|
|
215
|
-
alt={icon.altText}
|
|
216
|
-
aria-disabled={!icon.enabled}
|
|
217
|
-
/>
|
|
218
|
-
))}
|
|
219
|
-
</Cluster>
|
|
220
|
-
)}
|
|
221
|
-
{section.rightTitleContent && (
|
|
222
|
-
<Fragment>{section.rightTitleContent}</Fragment>
|
|
247
|
+
{section.content}
|
|
248
|
+
</Motion>
|
|
223
249
|
)}
|
|
224
|
-
</
|
|
225
|
-
</
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
key={`content-${section.id}`}
|
|
230
|
-
padding="0"
|
|
231
|
-
background={themeValues.bodyBackgroundColor}
|
|
232
|
-
layoutTransition
|
|
233
|
-
initial="closed"
|
|
234
|
-
animate="open"
|
|
235
|
-
exit="closed"
|
|
236
|
-
variants={wrapper}
|
|
237
|
-
extraStyles={`transform-origin: 100% 0;`}
|
|
238
|
-
>
|
|
239
|
-
{section.content}
|
|
240
|
-
</Motion>
|
|
241
|
-
)}
|
|
242
|
-
</AnimatePresence>
|
|
243
|
-
</Stack>
|
|
244
|
-
</Motion>
|
|
245
|
-
))}
|
|
250
|
+
</AnimatePresence>
|
|
251
|
+
</Stack>
|
|
252
|
+
</Motion>
|
|
253
|
+
))}
|
|
254
|
+
</fieldset>
|
|
246
255
|
</Stack>
|
|
247
256
|
</Box>
|
|
248
257
|
);
|
|
@@ -60,6 +60,7 @@ export const radioSection = () => {
|
|
|
60
60
|
const [openSection, setOpenSection] = useState("");
|
|
61
61
|
return (
|
|
62
62
|
<RadioSection
|
|
63
|
+
legendText="Storybook Story for RadioSection"
|
|
63
64
|
isMobile={boolean("isMobile", false, "props")}
|
|
64
65
|
supportsTouch={boolean("isMobile", false, "props")}
|
|
65
66
|
toggleOpenSection={setOpenSection}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const KebabMenuIcon: JSX.Element;
|