@thecb/components 9.3.1-beta.5 → 9.3.1-beta.6
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 +6 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -12
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +3 -9
- package/src/components/molecules/radio-section/RadioSection.stories.js +14 -0
package/package.json
CHANGED
|
@@ -50,7 +50,6 @@ const RadioSection = ({
|
|
|
50
50
|
containerStyles = "",
|
|
51
51
|
ariaDescribedBy,
|
|
52
52
|
isSectionRequired = false,
|
|
53
|
-
legendText = "",
|
|
54
53
|
sectionGroups = null
|
|
55
54
|
}) => {
|
|
56
55
|
const handleKeyDown = (id, e) => {
|
|
@@ -156,6 +155,7 @@ const RadioSection = ({
|
|
|
156
155
|
initial={initiallyOpen ? "open" : "closed"}
|
|
157
156
|
key={`item-${section.id}`}
|
|
158
157
|
extraStyles={borderStyles}
|
|
158
|
+
dataQa={section.dataQa}
|
|
159
159
|
role="radio"
|
|
160
160
|
aria-checked={openSection === section.id}
|
|
161
161
|
aria-disabled={section.disabled}
|
|
@@ -194,7 +194,6 @@ const RadioSection = ({
|
|
|
194
194
|
extraStyles={
|
|
195
195
|
!section.disabled ? "cursor: pointer;" : ""
|
|
196
196
|
}
|
|
197
|
-
dataQa={section.dataQa ? section.dataQa : section.id}
|
|
198
197
|
>
|
|
199
198
|
<Cluster
|
|
200
199
|
justify="space-between"
|
|
@@ -285,7 +284,7 @@ const RadioSection = ({
|
|
|
285
284
|
})}
|
|
286
285
|
{sections &&
|
|
287
286
|
sections
|
|
288
|
-
.filter(
|
|
287
|
+
.filter(unfilteredSection => !unfilteredSection.hidden)
|
|
289
288
|
.map(section => (
|
|
290
289
|
<Motion
|
|
291
290
|
tabIndex={
|
|
@@ -301,6 +300,7 @@ const RadioSection = ({
|
|
|
301
300
|
initial={initiallyOpen ? "open" : "closed"}
|
|
302
301
|
key={`item-${section.id}`}
|
|
303
302
|
extraStyles={borderStyles}
|
|
303
|
+
dataQa={section.dataQa ? section.dataQa : section.id}
|
|
304
304
|
role="radio"
|
|
305
305
|
aria-checked={openSection === section.id}
|
|
306
306
|
aria-disabled={section.disabled}
|
|
@@ -335,12 +335,6 @@ const RadioSection = ({
|
|
|
335
335
|
: ``
|
|
336
336
|
}
|
|
337
337
|
extraStyles={!section.disabled ? "cursor: pointer;" : ""}
|
|
338
|
-
dataQa={section.dataQa ? section.dataQa : section.id}
|
|
339
|
-
role="radio"
|
|
340
|
-
aria-checked={openSection === section.id}
|
|
341
|
-
aria-disabled={section.disabled}
|
|
342
|
-
aria-required={section?.required}
|
|
343
|
-
tabIndex="0"
|
|
344
338
|
>
|
|
345
339
|
<Cluster
|
|
346
340
|
justify="space-between"
|
|
@@ -52,6 +52,20 @@ const sectionGroups = [
|
|
|
52
52
|
rightIconsLabel: cardIconsLabel,
|
|
53
53
|
rightIcons: cardIcons,
|
|
54
54
|
required: true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "new-bank-account-section",
|
|
58
|
+
title: "New Bank Account",
|
|
59
|
+
content: <p>The form to add a bank account would go here.</p>,
|
|
60
|
+
required: true
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
{
|
|
65
|
+
id: "single",
|
|
66
|
+
title: "A Single Item Section Group",
|
|
67
|
+
content: <div>Content for a single item section group.</div>,
|
|
68
|
+
required: true
|
|
55
69
|
}
|
|
56
70
|
],
|
|
57
71
|
[
|