@thecb/components 8.4.11-beta.17 → 8.4.11-beta.19
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 +14 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -16
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/alert/Alert.js +1 -0
- package/src/components/atoms/checkbox/Checkbox.js +0 -2
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +0 -1
- package/src/components/atoms/dropdown/Dropdown.js +4 -4
- package/src/components/atoms/form-layouts/FormInput.js +6 -5
- package/src/components/atoms/form-select/FormSelect.js +4 -5
- package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +1 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +1 -1
package/package.json
CHANGED
|
@@ -286,15 +286,15 @@ const Dropdown = ({
|
|
|
286
286
|
>
|
|
287
287
|
<Box
|
|
288
288
|
as="input"
|
|
289
|
-
role="combobox"
|
|
290
289
|
aria-multiline="false"
|
|
290
|
+
autoComplete={autocompleteValue}
|
|
291
|
+
aria-controls={`${ariaLabelledby}_listbox`}
|
|
291
292
|
aria-activedescendant="focused_option"
|
|
292
293
|
aria-owns={`${ariaLabelledby}_listbox`}
|
|
293
|
-
aria-controls={`${ariaLabelledby}_listbox`}
|
|
294
294
|
aria-haspopup="listbox"
|
|
295
295
|
aria-labelledby={ariaLabelledby}
|
|
296
296
|
aria-describedby={ariaDescribedby}
|
|
297
|
-
|
|
297
|
+
aria-expanded={isOpen}
|
|
298
298
|
background={isOpen ? themeValues.hoverColor : WHITE}
|
|
299
299
|
borderRadius="2px"
|
|
300
300
|
borderSize="1px"
|
|
@@ -315,7 +315,6 @@ const Dropdown = ({
|
|
|
315
315
|
minHeight="48px"
|
|
316
316
|
minWidth="100%"
|
|
317
317
|
name={autocompleteValue}
|
|
318
|
-
aria-expanded={isOpen}
|
|
319
318
|
onChange={e => {
|
|
320
319
|
// support autofill and copy/paste
|
|
321
320
|
if (e.target.value !== inputValue) {
|
|
@@ -325,6 +324,7 @@ const Dropdown = ({
|
|
|
325
324
|
}}
|
|
326
325
|
padding="12px"
|
|
327
326
|
placeholder={getSelection()}
|
|
327
|
+
role="combobox"
|
|
328
328
|
themeValues={themeValues}
|
|
329
329
|
title={hasTitles ? getSelection() : null}
|
|
330
330
|
type="text"
|
|
@@ -220,15 +220,16 @@ const FormInput = ({
|
|
|
220
220
|
themeValues={themeValues}
|
|
221
221
|
$customHeight={customHeight}
|
|
222
222
|
$extraStyles={extraStyles}
|
|
223
|
-
|
|
223
|
+
autoComplete={autocomplete}
|
|
224
224
|
{...props}
|
|
225
225
|
/>
|
|
226
226
|
) : (
|
|
227
227
|
<InputField
|
|
228
228
|
aria-labelledby={createIdFromString(labelTextWhenNoError)}
|
|
229
|
-
aria-describedby={
|
|
230
|
-
labelTextWhenNoError
|
|
231
|
-
|
|
229
|
+
aria-describedby={createIdFromString(
|
|
230
|
+
labelTextWhenNoError,
|
|
231
|
+
"error message"
|
|
232
|
+
)}
|
|
232
233
|
aria-invalid={
|
|
233
234
|
(field.dirty && field.hasErrors) ||
|
|
234
235
|
(field.hasErrors && showErrors)
|
|
@@ -240,7 +241,7 @@ const FormInput = ({
|
|
|
240
241
|
inputMode={isNum ? "numeric" : isEmail ? "email" : "text"}
|
|
241
242
|
field={field}
|
|
242
243
|
showErrors={showErrors}
|
|
243
|
-
data-qa={labelTextWhenNoError}
|
|
244
|
+
data-qa={createIdFromString(labelTextWhenNoError)}
|
|
244
245
|
themeValues={themeValues}
|
|
245
246
|
background={background}
|
|
246
247
|
$customHeight={customHeight}
|
|
@@ -66,9 +66,10 @@ const FormSelect = ({
|
|
|
66
66
|
</Box>
|
|
67
67
|
<Dropdown
|
|
68
68
|
ariaLabelledby={createIdFromString(labelTextWhenNoError)}
|
|
69
|
-
|
|
70
|
-
labelTextWhenNoError
|
|
71
|
-
|
|
69
|
+
aria-describedby={createIdFromString(
|
|
70
|
+
labelTextWhenNoError,
|
|
71
|
+
"error message"
|
|
72
|
+
)}
|
|
72
73
|
maxHeight={dropdownMaxHeight}
|
|
73
74
|
hasTitles={hasTitles}
|
|
74
75
|
placeholder={options[0] ? options[0].text : ""}
|
|
@@ -91,8 +92,6 @@ const FormSelect = ({
|
|
|
91
92
|
autocompleteValue={autocompleteValue}
|
|
92
93
|
smoothScroll={smoothScroll}
|
|
93
94
|
required={options.required}
|
|
94
|
-
aria-required={options.required}
|
|
95
|
-
id={`${createIdFromString(labelTextWhenNoError)}-input`}
|
|
96
95
|
/>
|
|
97
96
|
<Stack direction="row" justify="space-between">
|
|
98
97
|
<Text
|
|
@@ -177,7 +177,7 @@ const PaymentFormCard = ({
|
|
|
177
177
|
fieldActions={actions.fields.zipCode}
|
|
178
178
|
showErrors={showErrors}
|
|
179
179
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
180
|
-
|
|
180
|
+
autoComplete="billing postal-code"
|
|
181
181
|
/>
|
|
182
182
|
</Box>
|
|
183
183
|
)}
|