@thecb/components 4.1.10-beta.0 → 4.1.11-beta.0

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 CHANGED
@@ -39384,7 +39384,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
39384
39384
  variant: variant,
39385
39385
  role: "form",
39386
39386
  "aria-label": "Card payment"
39387
- }, /*#__PURE__*/React__default.createElement(FormInputColumn, null, /*#__PURE__*/React__default.createElement(CountryDropdown, {
39387
+ }, /*#__PURE__*/React__default.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React__default.createElement(CountryDropdown, {
39388
39388
  labelTextWhenNoError: "Country",
39389
39389
  errorMessages: countryErrorMessages,
39390
39390
  field: fields.country,
@@ -39392,10 +39392,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
39392
39392
  actions.fields.country.set(value); // temporary measure to not dirty fields until
39393
39393
  // we can write a reset function for fields
39394
39394
 
39395
- if (fields.stateProvince.rawValue) {
39396
- actions.fields.stateProvince.set("");
39397
- }
39398
-
39399
39395
  if (fields.zipCode.rawValue) {
39400
39396
  actions.fields.zipCode.set("");
39401
39397
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "4.1.10-beta.0",
3
+ "version": "4.1.11-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -16,7 +16,8 @@ const PaymentButtonBar = ({
16
16
  cancelURL,
17
17
  cancelText = "Cancel",
18
18
  redirectURL,
19
- redirectText = "Return"
19
+ redirectText = "Return",
20
+ buttonFlexOverride
20
21
  }) => {
21
22
  const { isMobile } = useContext(ThemeContext);
22
23
 
@@ -68,7 +69,13 @@ const PaymentButtonBar = ({
68
69
  <SolidDivider />
69
70
  <Box padding="2.5rem 0 3.125rem 0">
70
71
  <Cluster
71
- justify={!!backButton ? "space-between" : "flex-end"}
72
+ justify={
73
+ buttonFlexOverride
74
+ ? buttonFlexOverride
75
+ : !!backButton
76
+ ? "space-between"
77
+ : "flex-end"
78
+ }
72
79
  align="center"
73
80
  childGap="0.75rem"
74
81
  >
@@ -73,23 +73,22 @@ const PaymentFormCard = ({
73
73
  return (
74
74
  <FormContainer variant={variant} role="form" aria-label="Card payment">
75
75
  <FormInputColumn>
76
- <CountryDropdown
77
- labelTextWhenNoError="Country"
78
- errorMessages={countryErrorMessages}
79
- field={fields.country}
80
- onChange={value => {
81
- actions.fields.country.set(value);
82
- // temporary measure to not dirty fields until
83
- // we can write a reset function for fields
84
- if (fields.stateProvince.rawValue) {
85
- actions.fields.stateProvince.set("");
86
- }
87
- if (fields.zipCode.rawValue) {
88
- actions.fields.zipCode.set("");
89
- }
90
- }}
91
- showErrors={showErrors}
92
- />
76
+ {!hideZipCode && (
77
+ <CountryDropdown
78
+ labelTextWhenNoError="Country"
79
+ errorMessages={countryErrorMessages}
80
+ field={fields.country}
81
+ onChange={value => {
82
+ actions.fields.country.set(value);
83
+ // temporary measure to not dirty fields until
84
+ // we can write a reset function for fields
85
+ if (fields.zipCode.rawValue) {
86
+ actions.fields.zipCode.set("");
87
+ }
88
+ }}
89
+ showErrors={showErrors}
90
+ />
91
+ )}
93
92
  <FormInput
94
93
  labelTextWhenNoError="Name on card"
95
94
  errorMessages={nameOnCardErrors}