@thecb/components 9.5.0-beta.3 → 9.5.0-beta.4
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 +10 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -7
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/partial-amount-form/PartialAmountForm.js +8 -2
- package/src/components/molecules/radio-section/InnerRadioSection.js +6 -1
- package/src/components/molecules/radio-section/RadioSection.js +4 -8
package/package.json
CHANGED
|
@@ -22,7 +22,8 @@ const PartialAmountForm = ({
|
|
|
22
22
|
clearOnDismount,
|
|
23
23
|
fields,
|
|
24
24
|
actions,
|
|
25
|
-
showErrors = false
|
|
25
|
+
showErrors = false,
|
|
26
|
+
dataQa
|
|
26
27
|
}) => {
|
|
27
28
|
if (clearOnDismount) {
|
|
28
29
|
useEffect(() => () => actions.form.clear(), []);
|
|
@@ -54,7 +55,12 @@ const PartialAmountForm = ({
|
|
|
54
55
|
|
|
55
56
|
const lineItemsNew = Array.isArray(lineItems) ? lineItems : [];
|
|
56
57
|
return (
|
|
57
|
-
<FormContainer
|
|
58
|
+
<FormContainer
|
|
59
|
+
variant={variant}
|
|
60
|
+
role="form"
|
|
61
|
+
aria-label="Other amount"
|
|
62
|
+
data-qa={dataQa}
|
|
63
|
+
>
|
|
58
64
|
<Text variant="p">
|
|
59
65
|
Pay a different amount. The total balance will still be due on the same
|
|
60
66
|
due date.
|
|
@@ -101,7 +101,12 @@ const InnerRadioSection = ({
|
|
|
101
101
|
? () => toggleOpenSection(section.id)
|
|
102
102
|
: noop
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
id={`inner-radio-section-${sectionIndex}`}
|
|
105
|
+
data-qa={
|
|
106
|
+
section.dataQa
|
|
107
|
+
? section.dataQa
|
|
108
|
+
: section.id || `inner-radio-section-${sectionIndex}`
|
|
109
|
+
}
|
|
105
110
|
>
|
|
106
111
|
<Stack childGap="0">
|
|
107
112
|
<Box
|
|
@@ -128,17 +128,13 @@ const RadioSection = ({
|
|
|
128
128
|
</Fragment>
|
|
129
129
|
))}
|
|
130
130
|
{!!groupedSections &&
|
|
131
|
-
groupedSections.map(sectionGroup =>
|
|
131
|
+
groupedSections.map((sectionGroup, sectionGroupindex) =>
|
|
132
132
|
sectionGroup
|
|
133
133
|
.filter(unfilteredSection => !unfilteredSection.hidden)
|
|
134
|
-
.map((section,
|
|
135
|
-
<Fragment
|
|
136
|
-
key={`radio-section-${groupedSections.indexOf(
|
|
137
|
-
sectionGroup
|
|
138
|
-
)}-${sectionGroup.indexOf(section)}}`}
|
|
139
|
-
>
|
|
134
|
+
.map((section, sectionIndex) => (
|
|
135
|
+
<Fragment key={`key-${sectionGroupindex}-${sectionIndex}}`}>
|
|
140
136
|
<InnerRadioSection
|
|
141
|
-
sectionIndex={
|
|
137
|
+
sectionIndex={`radio-section-inner-${sectionGroupindex}-${sectionIndex}}`}
|
|
142
138
|
section={section}
|
|
143
139
|
sectionRefs={sectionRefs}
|
|
144
140
|
focused={focused}
|