@thecb/components 8.4.11-beta.9 → 8.4.12-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 +83 -90
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +83 -91
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/alert/Alert.js +0 -1
- package/src/components/atoms/checkbox/Checkbox.js +1 -1
- package/src/components/atoms/country-dropdown/CountryDropdown.js +1 -3
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +0 -2
- package/src/components/atoms/dropdown/Dropdown.js +14 -13
- package/src/components/atoms/form-layouts/FormInput.js +13 -7
- package/src/components/atoms/form-select/FormSelect.js +22 -18
- package/src/components/molecules/address-form/AddressForm.js +3 -12
- package/src/components/molecules/partial-amount-form/PartialAmountForm.state.js +40 -22
- package/src/components/molecules/partial-amount-form/index.js +9 -2
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- /package/src/components/atoms/icons/{ExternalLinkIcon.js → ExternalLinkicon.js} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -18818,8 +18818,7 @@ var Alert = function Alert(_ref) {
|
|
|
18818
18818
|
borderColor: themeValues.border,
|
|
18819
18819
|
borderSize: noBorder ? "0px" : "1px",
|
|
18820
18820
|
boxShadow: enableBoxShadow ? (_generateShadows = generateShadows()) === null || _generateShadows === void 0 ? void 0 : (_generateShadows$inse = _generateShadows.inset) === null || _generateShadows$inse === void 0 ? void 0 : _generateShadows$inse.base : "",
|
|
18821
|
-
extraStyles: extraStyles
|
|
18822
|
-
role: "alert"
|
|
18821
|
+
extraStyles: extraStyles
|
|
18823
18822
|
}, maxContentWidth ? /*#__PURE__*/React__default.createElement(Center, {
|
|
18824
18823
|
maxWidth: maxContentWidth
|
|
18825
18824
|
}, content) : content);
|
|
@@ -22151,7 +22150,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22151
22150
|
onChange: onChange,
|
|
22152
22151
|
tabIndex: "-1",
|
|
22153
22152
|
"aria-invalid": error,
|
|
22154
|
-
"aria-describedby": name
|
|
22153
|
+
"aria-describedby": error ? "".concat(name, "-error-message") : ""
|
|
22155
22154
|
}), /*#__PURE__*/React__default.createElement(StyledCheckbox, {
|
|
22156
22155
|
error: error,
|
|
22157
22156
|
disabled: disabled,
|
|
@@ -23985,14 +23984,15 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
23985
23984
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
23986
23985
|
as: "input",
|
|
23987
23986
|
"aria-multiline": "false",
|
|
23988
|
-
"aria-autocomplete": "list"
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
,
|
|
23987
|
+
"aria-autocomplete": "list",
|
|
23988
|
+
"aria-controls": "".concat(ariaLabelledby, "_listbox"),
|
|
23989
|
+
"aria-activedescendant": "focused_option",
|
|
23990
|
+
"aria-owns": "".concat(ariaLabelledby, "_listbox"),
|
|
23992
23991
|
"aria-haspopup": "listbox",
|
|
23993
23992
|
"aria-labelledby": ariaLabelledby,
|
|
23994
23993
|
"aria-describedby": ariaDescribedby,
|
|
23995
|
-
|
|
23994
|
+
"aria-expanded": isOpen,
|
|
23995
|
+
autocomplete: autocompleteValue,
|
|
23996
23996
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
23997
23997
|
borderRadius: "2px",
|
|
23998
23998
|
borderSize: "1px",
|
|
@@ -24002,8 +24002,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24002
24002
|
isOpen: isOpen,
|
|
24003
24003
|
minHeight: "48px",
|
|
24004
24004
|
minWidth: "100%",
|
|
24005
|
-
name: autocompleteValue
|
|
24006
|
-
,
|
|
24005
|
+
name: autocompleteValue,
|
|
24007
24006
|
onChange: function onChange(e) {
|
|
24008
24007
|
// support autofill and copy/paste
|
|
24009
24008
|
if (e.target.value !== inputValue) {
|
|
@@ -24013,6 +24012,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24013
24012
|
},
|
|
24014
24013
|
padding: "12px",
|
|
24015
24014
|
placeholder: getSelection(),
|
|
24015
|
+
role: "combobox",
|
|
24016
24016
|
themeValues: themeValues,
|
|
24017
24017
|
title: hasTitles ? getSelection() : null,
|
|
24018
24018
|
type: "text",
|
|
@@ -24065,7 +24065,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24065
24065
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24066
24066
|
variant: "p",
|
|
24067
24067
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
24068
|
-
extraStyles: "padding-left: 16px; \n
|
|
24068
|
+
extraStyles: "padding-left: 16px; \n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", "; \n white-space: nowrap; \n overflow: hidden; \n text-overflow: ellipsis;")
|
|
24069
24069
|
}, choice.text));
|
|
24070
24070
|
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
24071
24071
|
};
|
|
@@ -24210,7 +24210,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24210
24210
|
id: createIdFromString(labelTextWhenNoError)
|
|
24211
24211
|
}, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
24212
24212
|
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24213
|
-
ariaDescribedby: createIdFromString(labelTextWhenNoError),
|
|
24213
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24214
24214
|
maxHeight: dropdownMaxHeight,
|
|
24215
24215
|
hasTitles: hasTitles,
|
|
24216
24216
|
placeholder: options[0] ? options[0].text : "",
|
|
@@ -24229,19 +24229,20 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24229
24229
|
},
|
|
24230
24230
|
disabled: disabled,
|
|
24231
24231
|
autocompleteValue: autocompleteValue,
|
|
24232
|
-
smoothScroll: smoothScroll
|
|
24233
|
-
required: options.required
|
|
24232
|
+
smoothScroll: smoothScroll
|
|
24234
24233
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24235
24234
|
direction: "row",
|
|
24236
24235
|
justify: "space-between",
|
|
24237
|
-
|
|
24238
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24236
|
+
"aria-live": "polite"
|
|
24237
|
+
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24239
24238
|
color: ERROR_COLOR,
|
|
24240
24239
|
variant: "pXS",
|
|
24241
24240
|
weight: themeValues.fontWeight,
|
|
24242
|
-
extraStyles: "word-break: break-word;\n
|
|
24241
|
+
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24243
24242
|
id: createIdFromString(labelTextWhenNoError, "error message")
|
|
24244
|
-
},
|
|
24243
|
+
}, errorMessages[field.errors[0]]) : /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24244
|
+
extraStyles: "height: ".concat(themeValues.lineHeight, ";")
|
|
24245
|
+
})));
|
|
24245
24246
|
};
|
|
24246
24247
|
|
|
24247
24248
|
var FormSelect$1 = themeComponent(FormSelect, "FormSelect", fallbackValues$g, "default");
|
|
@@ -24989,18 +24990,14 @@ var options = [{
|
|
|
24989
24990
|
value: "ZW"
|
|
24990
24991
|
}];
|
|
24991
24992
|
|
|
24992
|
-
var _excluded$o = ["labelTextWhenNoError", "errorMessages", "field", "fieldActions", "showErrors", "onChange"];
|
|
24993
|
-
|
|
24994
24993
|
var CountryDropdown = function CountryDropdown(_ref) {
|
|
24995
24994
|
var labelTextWhenNoError = _ref.labelTextWhenNoError,
|
|
24996
24995
|
errorMessages = _ref.errorMessages,
|
|
24997
24996
|
field = _ref.field,
|
|
24998
24997
|
fieldActions = _ref.fieldActions,
|
|
24999
24998
|
showErrors = _ref.showErrors,
|
|
25000
|
-
onChange = _ref.onChange
|
|
25001
|
-
|
|
25002
|
-
|
|
25003
|
-
return /*#__PURE__*/React__default.createElement(FormSelect$1, _extends({
|
|
24999
|
+
onChange = _ref.onChange;
|
|
25000
|
+
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
25004
25001
|
options: options,
|
|
25005
25002
|
field: field,
|
|
25006
25003
|
fieldActions: fieldActions,
|
|
@@ -25009,7 +25006,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25009
25006
|
showErrors: showErrors,
|
|
25010
25007
|
onChange: onChange,
|
|
25011
25008
|
autocompleteValue: "country-name"
|
|
25012
|
-
}
|
|
25009
|
+
});
|
|
25013
25010
|
};
|
|
25014
25011
|
|
|
25015
25012
|
var DetailText = styled__default.p.withConfig({
|
|
@@ -25075,7 +25072,7 @@ var mobileFallbackValues$1 = {
|
|
|
25075
25072
|
};
|
|
25076
25073
|
var MOBILE_BREAKPOINT$1 = 768;
|
|
25077
25074
|
|
|
25078
|
-
var _excluded$
|
|
25075
|
+
var _excluded$o = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
|
|
25079
25076
|
/*
|
|
25080
25077
|
New responsive text component for Detail elements
|
|
25081
25078
|
(Block level text elements which are smaller than "Title" elements)
|
|
@@ -25125,7 +25122,7 @@ var Detail = function Detail(_ref) {
|
|
|
25125
25122
|
as = _ref$as === void 0 ? "p" : _ref$as,
|
|
25126
25123
|
dataQa = _ref.dataQa,
|
|
25127
25124
|
children = _ref.children,
|
|
25128
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
25125
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
25129
25126
|
|
|
25130
25127
|
return /*#__PURE__*/React__default.createElement(DetailText, _extends({
|
|
25131
25128
|
variant: variant,
|
|
@@ -25849,7 +25846,7 @@ var fallbackValues$k = {
|
|
|
25849
25846
|
formFooterPanel: formFooterPanel
|
|
25850
25847
|
};
|
|
25851
25848
|
|
|
25852
|
-
var _excluded$
|
|
25849
|
+
var _excluded$p = ["showErrors", "themeValues"],
|
|
25853
25850
|
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocomplete", "extraStyles", "removeFromValue"];
|
|
25854
25851
|
var InputField = styled__default.input.withConfig({
|
|
25855
25852
|
displayName: "FormInput__InputField",
|
|
@@ -25883,7 +25880,7 @@ var InputField = styled__default.input.withConfig({
|
|
|
25883
25880
|
var FormattedInputField = styled__default(function (_ref8) {
|
|
25884
25881
|
var showErrors = _ref8.showErrors,
|
|
25885
25882
|
themeValues = _ref8.themeValues,
|
|
25886
|
-
props = _objectWithoutProperties(_ref8, _excluded$
|
|
25883
|
+
props = _objectWithoutProperties(_ref8, _excluded$p);
|
|
25887
25884
|
|
|
25888
25885
|
return /*#__PURE__*/React__default.createElement(FormattedInput, props);
|
|
25889
25886
|
}).withConfig({
|
|
@@ -25954,8 +25951,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25954
25951
|
};
|
|
25955
25952
|
|
|
25956
25953
|
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
25957
|
-
childGap: "0.25rem"
|
|
25958
|
-
"aria-live": "assertive"
|
|
25954
|
+
childGap: "0.25rem"
|
|
25959
25955
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25960
25956
|
padding: "0"
|
|
25961
25957
|
}, helperModal ? /*#__PURE__*/React__default.createElement(Cluster, {
|
|
@@ -26002,11 +25998,10 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26002
25998
|
}, showPassword ? "Hide" : "Show"), isMobile && decorator && /*#__PURE__*/React__default.createElement(Box, {
|
|
26003
25999
|
padding: "0 0 0 auto"
|
|
26004
26000
|
}, decorator)))), /*#__PURE__*/React__default.createElement(Box, {
|
|
26005
|
-
padding: "0"
|
|
26006
|
-
"aria-live": "assertive"
|
|
26001
|
+
padding: "0"
|
|
26007
26002
|
}, formatter ? /*#__PURE__*/React__default.createElement(FormattedInputField, _extends({
|
|
26008
26003
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26009
|
-
"aria-describedby": createIdFromString(labelTextWhenNoError),
|
|
26004
|
+
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
26010
26005
|
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
26011
26006
|
onChange: function onChange(value) {
|
|
26012
26007
|
return setValue(value);
|
|
@@ -26022,10 +26017,10 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26022
26017
|
themeValues: themeValues,
|
|
26023
26018
|
$customHeight: customHeight,
|
|
26024
26019
|
$extraStyles: extraStyles,
|
|
26025
|
-
|
|
26020
|
+
autoComplete: autocomplete
|
|
26026
26021
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
26027
26022
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26028
|
-
"aria-describedby": createIdFromString(labelTextWhenNoError),
|
|
26023
|
+
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
26029
26024
|
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
26030
26025
|
onChange: function onChange(e) {
|
|
26031
26026
|
return setValue(e.target.value);
|
|
@@ -26041,11 +26036,11 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26041
26036
|
background: background,
|
|
26042
26037
|
$customHeight: customHeight,
|
|
26043
26038
|
$extraStyles: extraStyles,
|
|
26044
|
-
|
|
26039
|
+
autoComplete: autocomplete
|
|
26045
26040
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26046
26041
|
direction: "row",
|
|
26047
26042
|
justify: "space-between",
|
|
26048
|
-
|
|
26043
|
+
"aria-live": "polite"
|
|
26049
26044
|
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26050
26045
|
color: ERROR_COLOR,
|
|
26051
26046
|
variant: "pXS",
|
|
@@ -26061,7 +26056,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26061
26056
|
|
|
26062
26057
|
var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$k, "default");
|
|
26063
26058
|
|
|
26064
|
-
var _excluded$
|
|
26059
|
+
var _excluded$q = ["breakpoint", "childGap", "largeChild", "largeChildSize", "children"];
|
|
26065
26060
|
|
|
26066
26061
|
var FormInputRow = function FormInputRow(_ref) {
|
|
26067
26062
|
var _ref$breakpoint = _ref.breakpoint,
|
|
@@ -26071,7 +26066,7 @@ var FormInputRow = function FormInputRow(_ref) {
|
|
|
26071
26066
|
largeChild = _ref.largeChild,
|
|
26072
26067
|
largeChildSize = _ref.largeChildSize,
|
|
26073
26068
|
children = _ref.children,
|
|
26074
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
26069
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
26075
26070
|
|
|
26076
26071
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
26077
26072
|
padding: "0"
|
|
@@ -26083,14 +26078,14 @@ var FormInputRow = function FormInputRow(_ref) {
|
|
|
26083
26078
|
}, children));
|
|
26084
26079
|
};
|
|
26085
26080
|
|
|
26086
|
-
var _excluded$
|
|
26081
|
+
var _excluded$r = ["childGap", "bottomItem", "children"];
|
|
26087
26082
|
|
|
26088
26083
|
var FormInputColumn = function FormInputColumn(_ref) {
|
|
26089
26084
|
var _ref$childGap = _ref.childGap,
|
|
26090
26085
|
childGap = _ref$childGap === void 0 ? "0.5rem" : _ref$childGap,
|
|
26091
26086
|
bottomItem = _ref.bottomItem,
|
|
26092
26087
|
children = _ref.children,
|
|
26093
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
26088
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
26094
26089
|
|
|
26095
26090
|
return /*#__PURE__*/React__default.createElement(Stack, _extends({
|
|
26096
26091
|
childGap: childGap,
|
|
@@ -26098,12 +26093,12 @@ var FormInputColumn = function FormInputColumn(_ref) {
|
|
|
26098
26093
|
}, rest), children);
|
|
26099
26094
|
};
|
|
26100
26095
|
|
|
26101
|
-
var _excluded$
|
|
26096
|
+
var _excluded$s = ["themeValues", "children"];
|
|
26102
26097
|
|
|
26103
26098
|
var FormContainer = function FormContainer(_ref) {
|
|
26104
26099
|
var themeValues = _ref.themeValues,
|
|
26105
26100
|
children = _ref.children,
|
|
26106
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
26101
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
26107
26102
|
|
|
26108
26103
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
26109
26104
|
isMobile = _useContext.isMobile;
|
|
@@ -26368,7 +26363,7 @@ var fallbackValues$o = {
|
|
|
26368
26363
|
fontSize: fontSize$8
|
|
26369
26364
|
};
|
|
26370
26365
|
|
|
26371
|
-
var _excluded$
|
|
26366
|
+
var _excluded$t = ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"];
|
|
26372
26367
|
|
|
26373
26368
|
var Heading = function Heading(_ref) {
|
|
26374
26369
|
var themeValues = _ref.themeValues,
|
|
@@ -26388,7 +26383,7 @@ var Heading = function Heading(_ref) {
|
|
|
26388
26383
|
as = _ref$as === void 0 ? variant : _ref$as,
|
|
26389
26384
|
dataQa = _ref.dataQa,
|
|
26390
26385
|
children = _ref.children,
|
|
26391
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
26386
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
26392
26387
|
|
|
26393
26388
|
return /*#__PURE__*/React__default.createElement(HeadingText, _extends({
|
|
26394
26389
|
variant: variant,
|
|
@@ -26679,7 +26674,7 @@ var Loading = function Loading() {
|
|
|
26679
26674
|
})))));
|
|
26680
26675
|
};
|
|
26681
26676
|
|
|
26682
|
-
var _excluded$
|
|
26677
|
+
var _excluded$u = ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"];
|
|
26683
26678
|
|
|
26684
26679
|
var NavFooter = function NavFooter(_ref) {
|
|
26685
26680
|
var leftContent = _ref.leftContent,
|
|
@@ -26695,7 +26690,7 @@ var NavFooter = function NavFooter(_ref) {
|
|
|
26695
26690
|
footerPadding = _ref$footerPadding === void 0 ? "1.5rem 1rem" : _ref$footerPadding,
|
|
26696
26691
|
isMobile = _ref.isMobile,
|
|
26697
26692
|
footerWidth = _ref.footerWidth,
|
|
26698
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
26693
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
26699
26694
|
|
|
26700
26695
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
26701
26696
|
padding: footerPadding,
|
|
@@ -26727,7 +26722,7 @@ var NavFooter = function NavFooter(_ref) {
|
|
|
26727
26722
|
}, rightContent)))))));
|
|
26728
26723
|
};
|
|
26729
26724
|
|
|
26730
|
-
var _excluded$
|
|
26725
|
+
var _excluded$v = ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"];
|
|
26731
26726
|
|
|
26732
26727
|
var NavHeader = function NavHeader(_ref) {
|
|
26733
26728
|
var leftContent = _ref.leftContent,
|
|
@@ -26737,7 +26732,7 @@ var NavHeader = function NavHeader(_ref) {
|
|
|
26737
26732
|
isMobile = _ref.isMobile,
|
|
26738
26733
|
backgroundColor = _ref.backgroundColor,
|
|
26739
26734
|
headerWidth = _ref.headerWidth,
|
|
26740
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
26735
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
26741
26736
|
|
|
26742
26737
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
26743
26738
|
padding: "0 16px 4px",
|
|
@@ -38512,7 +38507,7 @@ var TableRowWrapper = styled__default.tr.withConfig({
|
|
|
38512
38507
|
return extraStyles;
|
|
38513
38508
|
});
|
|
38514
38509
|
|
|
38515
|
-
var _excluded$
|
|
38510
|
+
var _excluded$w = ["children", "extraStyles", "hoverCursor", "hoverEffect", "onClick", "themeValues"];
|
|
38516
38511
|
|
|
38517
38512
|
var TableRow = function TableRow(_ref) {
|
|
38518
38513
|
var children = _ref.children,
|
|
@@ -38522,7 +38517,7 @@ var TableRow = function TableRow(_ref) {
|
|
|
38522
38517
|
hoverEffect = _ref$hoverEffect === void 0 ? true : _ref$hoverEffect,
|
|
38523
38518
|
onClick = _ref.onClick,
|
|
38524
38519
|
themeValues = _ref.themeValues,
|
|
38525
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
38520
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
38526
38521
|
|
|
38527
38522
|
return /*#__PURE__*/React__default.createElement(TableRowWrapper, _extends({
|
|
38528
38523
|
onClick: onClick,
|
|
@@ -40376,20 +40371,17 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40376
40371
|
actions.fields.zip.set("");
|
|
40377
40372
|
}
|
|
40378
40373
|
},
|
|
40379
|
-
showErrors: showErrors
|
|
40380
|
-
"aria-label": "Country"
|
|
40374
|
+
showErrors: showErrors
|
|
40381
40375
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40382
40376
|
labelTextWhenNoError: "Address",
|
|
40383
40377
|
errorMessages: street1ErrorMessages,
|
|
40384
|
-
required: true,
|
|
40385
40378
|
field: fields.street1,
|
|
40386
40379
|
fieldActions: actions.fields.street1,
|
|
40387
40380
|
showErrors: showErrors,
|
|
40388
40381
|
onKeyDown: function onKeyDown(e) {
|
|
40389
40382
|
return e.key === "Enter" && handleSubmit(e);
|
|
40390
40383
|
},
|
|
40391
|
-
autocomplete: "address-line1"
|
|
40392
|
-
"aria-label": "Address Line 1"
|
|
40384
|
+
autocomplete: "address-line1"
|
|
40393
40385
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40394
40386
|
labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
|
|
40395
40387
|
field: fields.street2,
|
|
@@ -40398,11 +40390,9 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40398
40390
|
onKeyDown: function onKeyDown(e) {
|
|
40399
40391
|
return e.key === "Enter" && handleSubmit(e);
|
|
40400
40392
|
},
|
|
40401
|
-
autocomplete: "address-line2"
|
|
40402
|
-
"aria-label": "Address Line 2"
|
|
40393
|
+
autocomplete: "address-line2"
|
|
40403
40394
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40404
40395
|
labelTextWhenNoError: "City",
|
|
40405
|
-
required: true,
|
|
40406
40396
|
errorMessages: cityErrorMessages,
|
|
40407
40397
|
field: fields.city,
|
|
40408
40398
|
fieldActions: actions.fields.city,
|
|
@@ -40410,8 +40400,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40410
40400
|
onKeyDown: function onKeyDown(e) {
|
|
40411
40401
|
return e.key === "Enter" && handleSubmit(e);
|
|
40412
40402
|
},
|
|
40413
|
-
autocomplete: "
|
|
40414
|
-
"aria-label": "City"
|
|
40403
|
+
autocomplete: "address-level2"
|
|
40415
40404
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
40416
40405
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
40417
40406
|
errorMessages: stateProvinceErrorMessages,
|
|
@@ -40422,8 +40411,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40422
40411
|
onKeyDown: function onKeyDown(e) {
|
|
40423
40412
|
return e.key === "Enter" && handleSubmit(e);
|
|
40424
40413
|
},
|
|
40425
|
-
|
|
40426
|
-
required: true
|
|
40414
|
+
autocomplete: "address-level1"
|
|
40427
40415
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40428
40416
|
isNum: isUS,
|
|
40429
40417
|
formatter: isUS ? zipFormat : null,
|
|
@@ -40435,12 +40423,10 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40435
40423
|
onKeyDown: function onKeyDown(e) {
|
|
40436
40424
|
return e.key === "Enter" && handleSubmit(e);
|
|
40437
40425
|
},
|
|
40438
|
-
|
|
40439
|
-
autocomplete: "postal-code",
|
|
40440
|
-
required: true
|
|
40426
|
+
autocomplete: "postal-code"
|
|
40441
40427
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40442
40428
|
name: "address checkbox",
|
|
40443
|
-
title: "Save address to
|
|
40429
|
+
title: "Save address to wallet",
|
|
40444
40430
|
checked: walletCheckboxMarked,
|
|
40445
40431
|
onChange: saveToWallet
|
|
40446
40432
|
})));
|
|
@@ -47815,24 +47801,7 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
47815
47801
|
var minimum = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
47816
47802
|
var blockPartialPaymentOverpay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
47817
47803
|
var formConfig = lineItems.reduce(function (acc, item) {
|
|
47818
|
-
var validators =
|
|
47819
|
-
return lineItem != item;
|
|
47820
|
-
}).reduce(function (acc, curr) {
|
|
47821
|
-
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
47822
|
-
}, []))];
|
|
47823
|
-
|
|
47824
|
-
if (!!maximum) {
|
|
47825
|
-
validators.push(validateSum(numberLessThanOrEqualTo(maximum), lineItems.filter(function (lineItem) {
|
|
47826
|
-
return lineItem != item;
|
|
47827
|
-
}).reduce(function (acc, curr) {
|
|
47828
|
-
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
47829
|
-
}, [])));
|
|
47830
|
-
}
|
|
47831
|
-
|
|
47832
|
-
if (blockPartialPaymentOverpay) {
|
|
47833
|
-
validators.push(numberLessThanOrEqualTo(item.amount));
|
|
47834
|
-
}
|
|
47835
|
-
|
|
47804
|
+
var validators = createPartialAmountFormValidators(lineItems, maximum, minimum, blockPartialPaymentOverpay);
|
|
47836
47805
|
return _objectSpread2(_objectSpread2({}, acc), {}, _defineProperty({}, item.id, {
|
|
47837
47806
|
validators: validators,
|
|
47838
47807
|
constraints: [onlyNaturals()],
|
|
@@ -47851,6 +47820,29 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
47851
47820
|
partialAmountFormMapDispatchToProps: mapDispatchToProps
|
|
47852
47821
|
};
|
|
47853
47822
|
};
|
|
47823
|
+
var createPartialAmountFormValidators = function createPartialAmountFormValidators(lineItems, maximum) {
|
|
47824
|
+
var minimum = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
47825
|
+
var blockPartialPaymentOverpay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
47826
|
+
var validators = [required(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
47827
|
+
return lineItem != item;
|
|
47828
|
+
}).reduce(function (acc, curr) {
|
|
47829
|
+
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
47830
|
+
}, []))];
|
|
47831
|
+
|
|
47832
|
+
if (!!maximum) {
|
|
47833
|
+
validators.push(validateSum(numberLessThanOrEqualTo(maximum), lineItems.filter(function (lineItem) {
|
|
47834
|
+
return lineItem != item;
|
|
47835
|
+
}).reduce(function (acc, curr) {
|
|
47836
|
+
return [].concat(_toConsumableArray(acc), [curr.id]);
|
|
47837
|
+
}, [])));
|
|
47838
|
+
}
|
|
47839
|
+
|
|
47840
|
+
if (blockPartialPaymentOverpay) {
|
|
47841
|
+
validators.push(numberLessThanOrEqualTo(item.amount));
|
|
47842
|
+
}
|
|
47843
|
+
|
|
47844
|
+
return validators;
|
|
47845
|
+
};
|
|
47854
47846
|
|
|
47855
47847
|
var arrowColor = WHITE;
|
|
47856
47848
|
var numberColor = MATISSE_BLUE;
|
|
@@ -48156,7 +48148,7 @@ var fallbackValues$N = {
|
|
|
48156
48148
|
labeledAmountTotal: labeledAmountTotal
|
|
48157
48149
|
};
|
|
48158
48150
|
|
|
48159
|
-
var _excluded$
|
|
48151
|
+
var _excluded$x = ["amount"],
|
|
48160
48152
|
_excluded2$1 = ["amount"];
|
|
48161
48153
|
|
|
48162
48154
|
var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
@@ -48366,7 +48358,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48366
48358
|
return fee.amount > 0;
|
|
48367
48359
|
}).map(function (_ref5) {
|
|
48368
48360
|
var amount = _ref5.amount,
|
|
48369
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
48361
|
+
rest = _objectWithoutProperties(_ref5, _excluded$x);
|
|
48370
48362
|
|
|
48371
48363
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
48372
48364
|
amount: displayCurrency(amount)
|
|
@@ -48800,12 +48792,12 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48800
48792
|
}, errorMessage)))));
|
|
48801
48793
|
};
|
|
48802
48794
|
|
|
48803
|
-
var _excluded$
|
|
48795
|
+
var _excluded$y = ["version"];
|
|
48804
48796
|
|
|
48805
48797
|
var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
48806
48798
|
var _ref$version = _ref.version,
|
|
48807
48799
|
version = _ref$version === void 0 ? "v1" : _ref$version,
|
|
48808
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
48800
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
48809
48801
|
|
|
48810
48802
|
var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
|
|
48811
48803
|
return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);
|
|
@@ -50690,6 +50682,7 @@ exports.XCircleIconSmall = XCircleIconSmall;
|
|
|
50690
50682
|
exports.cardRegistry = cardRegistry;
|
|
50691
50683
|
exports.constants = index$5;
|
|
50692
50684
|
exports.createPartialAmountFormState = createPartialAmountFormState;
|
|
50685
|
+
exports.createPartialAmountFormValidators = createPartialAmountFormValidators;
|
|
50693
50686
|
exports.util = index$4;
|
|
50694
50687
|
exports.withWindowSize = withWindowSize;
|
|
50695
50688
|
//# sourceMappingURL=index.cjs.js.map
|