@thecb/components 9.2.4-beta.13 → 9.2.4-beta.14
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 +19 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +19 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +3 -1
- package/src/components/molecules/address-form/AddressForm.js +5 -0
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ const CountryDropdown = ({
|
|
|
10
10
|
fieldActions,
|
|
11
11
|
showErrors,
|
|
12
12
|
onChange,
|
|
13
|
+
isRequired = false,
|
|
13
14
|
dataQa = null
|
|
14
15
|
}) => (
|
|
15
16
|
<FormSelect
|
|
@@ -22,6 +23,7 @@ const CountryDropdown = ({
|
|
|
22
23
|
showErrors={showErrors}
|
|
23
24
|
onChange={onChange}
|
|
24
25
|
autocompleteValue="country-name"
|
|
26
|
+
isRequired={isRequired}
|
|
25
27
|
/>
|
|
26
28
|
);
|
|
27
29
|
export default CountryDropdown;
|
|
@@ -9,7 +9,8 @@ const FormStateDropdown = ({
|
|
|
9
9
|
field,
|
|
10
10
|
fieldActions,
|
|
11
11
|
showErrors,
|
|
12
|
-
countryCode
|
|
12
|
+
countryCode,
|
|
13
|
+
isRequired = false
|
|
13
14
|
}) => {
|
|
14
15
|
const placeholder =
|
|
15
16
|
countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
@@ -23,6 +24,7 @@ const FormStateDropdown = ({
|
|
|
23
24
|
errorMessages={errorMessages}
|
|
24
25
|
showErrors={showErrors}
|
|
25
26
|
autocompleteValue="address-level1"
|
|
27
|
+
isRequired={isRequired}
|
|
26
28
|
/>
|
|
27
29
|
);
|
|
28
30
|
};
|
|
@@ -71,6 +71,7 @@ const AddressForm = ({
|
|
|
71
71
|
}}
|
|
72
72
|
showErrors={showErrors}
|
|
73
73
|
dataQa="Country"
|
|
74
|
+
isRequired={true}
|
|
74
75
|
/>
|
|
75
76
|
<FormInput
|
|
76
77
|
labelTextWhenNoError="Address"
|
|
@@ -81,6 +82,7 @@ const AddressForm = ({
|
|
|
81
82
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
82
83
|
autocompleteValue="address-line1"
|
|
83
84
|
dataQa="Address"
|
|
85
|
+
isRequired={true}
|
|
84
86
|
/>
|
|
85
87
|
<FormInput
|
|
86
88
|
labelTextWhenNoError="Apt, Suite, Unit, Floor, etc. (Optional)"
|
|
@@ -100,6 +102,7 @@ const AddressForm = ({
|
|
|
100
102
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
101
103
|
autocompleteValue="address-level2"
|
|
102
104
|
dataQa="City"
|
|
105
|
+
isRequired={true}
|
|
103
106
|
/>
|
|
104
107
|
<StateProvinceDropdown
|
|
105
108
|
labelTextWhenNoError={isUS ? "State" : "State or Province"}
|
|
@@ -110,6 +113,7 @@ const AddressForm = ({
|
|
|
110
113
|
showErrors={showErrors}
|
|
111
114
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
112
115
|
dataQa="State or Province"
|
|
116
|
+
isRequired={true}
|
|
113
117
|
/>
|
|
114
118
|
<FormInput
|
|
115
119
|
isNum={isUS}
|
|
@@ -122,6 +126,7 @@ const AddressForm = ({
|
|
|
122
126
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
123
127
|
autocompleteValue="postal-code"
|
|
124
128
|
dataQa="Zip code"
|
|
129
|
+
isRequired={true}
|
|
125
130
|
/>
|
|
126
131
|
{showWalletCheckbox && (
|
|
127
132
|
<Checkbox
|