@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/dist/index.esm.js
CHANGED
|
@@ -25068,6 +25068,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25068
25068
|
fieldActions = _ref.fieldActions,
|
|
25069
25069
|
showErrors = _ref.showErrors,
|
|
25070
25070
|
onChange = _ref.onChange,
|
|
25071
|
+
_ref$isRequired = _ref.isRequired,
|
|
25072
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25071
25073
|
_ref$dataQa = _ref.dataQa,
|
|
25072
25074
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25073
25075
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -25079,7 +25081,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25079
25081
|
errorMessages: errorMessages,
|
|
25080
25082
|
showErrors: showErrors,
|
|
25081
25083
|
onChange: onChange,
|
|
25082
|
-
autocompleteValue: "country-name"
|
|
25084
|
+
autocompleteValue: "country-name",
|
|
25085
|
+
isRequired: isRequired
|
|
25083
25086
|
});
|
|
25084
25087
|
};
|
|
25085
25088
|
|
|
@@ -38119,7 +38122,9 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38119
38122
|
field = _ref.field,
|
|
38120
38123
|
fieldActions = _ref.fieldActions,
|
|
38121
38124
|
showErrors = _ref.showErrors,
|
|
38122
|
-
countryCode = _ref.countryCode
|
|
38125
|
+
countryCode = _ref.countryCode,
|
|
38126
|
+
_ref$isRequired = _ref.isRequired,
|
|
38127
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
38123
38128
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38124
38129
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38125
38130
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
@@ -38129,7 +38134,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38129
38134
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38130
38135
|
errorMessages: errorMessages,
|
|
38131
38136
|
showErrors: showErrors,
|
|
38132
|
-
autocompleteValue: "address-level1"
|
|
38137
|
+
autocompleteValue: "address-level1",
|
|
38138
|
+
isRequired: isRequired
|
|
38133
38139
|
});
|
|
38134
38140
|
};
|
|
38135
38141
|
|
|
@@ -39468,7 +39474,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39468
39474
|
}
|
|
39469
39475
|
},
|
|
39470
39476
|
showErrors: showErrors,
|
|
39471
|
-
dataQa: "Country"
|
|
39477
|
+
dataQa: "Country",
|
|
39478
|
+
isRequired: true
|
|
39472
39479
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39473
39480
|
labelTextWhenNoError: "Address",
|
|
39474
39481
|
errorMessages: street1ErrorMessages,
|
|
@@ -39479,7 +39486,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39479
39486
|
return e.key === "Enter" && handleSubmit(e);
|
|
39480
39487
|
},
|
|
39481
39488
|
autocompleteValue: "address-line1",
|
|
39482
|
-
dataQa: "Address"
|
|
39489
|
+
dataQa: "Address",
|
|
39490
|
+
isRequired: true
|
|
39483
39491
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39484
39492
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
39485
39493
|
field: fields.street2,
|
|
@@ -39500,7 +39508,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39500
39508
|
return e.key === "Enter" && handleSubmit(e);
|
|
39501
39509
|
},
|
|
39502
39510
|
autocompleteValue: "address-level2",
|
|
39503
|
-
dataQa: "City"
|
|
39511
|
+
dataQa: "City",
|
|
39512
|
+
isRequired: true
|
|
39504
39513
|
}), /*#__PURE__*/React.createElement(FormStateDropdown, {
|
|
39505
39514
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
39506
39515
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -39511,7 +39520,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39511
39520
|
onKeyDown: function onKeyDown(e) {
|
|
39512
39521
|
return e.key === "Enter" && handleSubmit(e);
|
|
39513
39522
|
},
|
|
39514
|
-
dataQa: "State or Province"
|
|
39523
|
+
dataQa: "State or Province",
|
|
39524
|
+
isRequired: true
|
|
39515
39525
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39516
39526
|
isNum: isUS,
|
|
39517
39527
|
formatter: isUS ? zipFormat : null,
|
|
@@ -39524,7 +39534,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39524
39534
|
return e.key === "Enter" && handleSubmit(e);
|
|
39525
39535
|
},
|
|
39526
39536
|
autocompleteValue: "postal-code",
|
|
39527
|
-
dataQa: "Zip code"
|
|
39537
|
+
dataQa: "Zip code",
|
|
39538
|
+
isRequired: true
|
|
39528
39539
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
39529
39540
|
name: "address checkbox",
|
|
39530
39541
|
title: "Save address to wallet",
|