@thecb/components 10.8.2-beta.0 → 10.9.0-beta.1
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 +57 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +57 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/country-dropdown/CountryDropdown.js +5 -1
- package/src/components/atoms/dropdown/Dropdown.js +3 -1
- package/src/components/atoms/form-layouts/FormInput.js +6 -0
- package/src/components/atoms/form-select/FormSelect.js +5 -1
- package/src/components/atoms/form-select/index.d.ts +2 -0
- package/src/components/atoms/layouts/Box.d.ts +1 -0
- package/src/components/atoms/layouts/Box.js +2 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +5 -1
- package/src/components/atoms/text/index.d.ts +2 -0
- package/src/components/molecules/address-form/AddressForm.js +13 -0
- package/src/components/molecules/payment-details/PaymentDetails.js +2 -1
- package/src/components/molecules/payment-details/PaymentDetails.stories.js +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -6548,7 +6548,7 @@ var BoxWrapper = styled__default(function (_ref) {
|
|
|
6548
6548
|
});
|
|
6549
6549
|
/* eslint-enable no-unused-vars */
|
|
6550
6550
|
|
|
6551
|
-
var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "focusStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
|
|
6551
|
+
var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "focusStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "id", "children"];
|
|
6552
6552
|
|
|
6553
6553
|
/*
|
|
6554
6554
|
Box component to create generic boxes
|
|
@@ -6597,6 +6597,7 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6597
6597
|
_ref$srOnly = _ref.srOnly,
|
|
6598
6598
|
srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
|
|
6599
6599
|
dataQa = _ref.dataQa,
|
|
6600
|
+
id = _ref.id,
|
|
6600
6601
|
children = _ref.children,
|
|
6601
6602
|
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
6602
6603
|
return /*#__PURE__*/React__default.createElement(BoxWrapper, _extends({
|
|
@@ -6632,7 +6633,8 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6632
6633
|
onFocus: onFocus,
|
|
6633
6634
|
onBlur: onBlur,
|
|
6634
6635
|
onTouchEnd: onTouchEnd,
|
|
6635
|
-
ref: ref
|
|
6636
|
+
ref: ref,
|
|
6637
|
+
id: id
|
|
6636
6638
|
}, rest), children && safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
6637
6639
|
});
|
|
6638
6640
|
|
|
@@ -24896,7 +24898,9 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24896
24898
|
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
24897
24899
|
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
|
|
24898
24900
|
_ref13$isRequired = _ref13.isRequired,
|
|
24899
|
-
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired
|
|
24901
|
+
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired,
|
|
24902
|
+
_ref13$inputId = _ref13.inputId,
|
|
24903
|
+
inputId = _ref13$inputId === void 0 ? false : _ref13$inputId;
|
|
24900
24904
|
var _useState = React.useState(""),
|
|
24901
24905
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24902
24906
|
inputValue = _useState2[0],
|
|
@@ -25105,6 +25109,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
25105
25109
|
width: "100%",
|
|
25106
25110
|
dataQa: "".concat(ariaLabelledby, "-dropdown")
|
|
25107
25111
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25112
|
+
id: inputId,
|
|
25108
25113
|
as: "input",
|
|
25109
25114
|
autoComplete: autocompleteValue,
|
|
25110
25115
|
"aria-controls": "".concat(ariaLabelledby, "_listbox"),
|
|
@@ -25307,7 +25312,11 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
25307
25312
|
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
25308
25313
|
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
|
|
25309
25314
|
_ref$isRequired = _ref.isRequired,
|
|
25310
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired
|
|
25315
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25316
|
+
_ref$htmlFor = _ref.htmlFor,
|
|
25317
|
+
htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
|
|
25318
|
+
_ref$inputId = _ref.inputId,
|
|
25319
|
+
inputId = _ref$inputId === void 0 ? null : _ref$inputId;
|
|
25311
25320
|
var _useState = React.useState(false),
|
|
25312
25321
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25313
25322
|
open = _useState2[0],
|
|
@@ -25341,8 +25350,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
25341
25350
|
color: themeValues.labelColor,
|
|
25342
25351
|
weight: themeValues.fontWeight,
|
|
25343
25352
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
25344
|
-
id: createIdFromString(labelTextWhenNoError)
|
|
25353
|
+
id: createIdFromString(labelTextWhenNoError),
|
|
25354
|
+
htmlFor: htmlFor
|
|
25345
25355
|
}, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
25356
|
+
inputId: inputId,
|
|
25346
25357
|
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
25347
25358
|
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
25348
25359
|
maxHeight: dropdownMaxHeight,
|
|
@@ -26139,7 +26150,11 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
26139
26150
|
_ref$isRequired = _ref.isRequired,
|
|
26140
26151
|
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
26141
26152
|
_ref$dataQa = _ref.dataQa,
|
|
26142
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
26153
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
26154
|
+
_ref$htmlFor = _ref.htmlFor,
|
|
26155
|
+
htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
|
|
26156
|
+
_ref$inputId = _ref.inputId,
|
|
26157
|
+
inputId = _ref$inputId === void 0 ? null : _ref$inputId;
|
|
26143
26158
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
26144
26159
|
options: options,
|
|
26145
26160
|
field: field,
|
|
@@ -26150,6 +26165,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
26150
26165
|
showErrors: showErrors,
|
|
26151
26166
|
onChange: onChange,
|
|
26152
26167
|
autocompleteValue: "country-name",
|
|
26168
|
+
htmlFor: htmlFor,
|
|
26169
|
+
inputId: inputId,
|
|
26153
26170
|
isRequired: isRequired
|
|
26154
26171
|
});
|
|
26155
26172
|
};
|
|
@@ -26977,7 +26994,7 @@ var fallbackValues$k = {
|
|
|
26977
26994
|
};
|
|
26978
26995
|
|
|
26979
26996
|
var _excluded$s = ["showErrors", "themeValues"],
|
|
26980
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
|
|
26997
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "htmlFor", "inputId"];
|
|
26981
26998
|
var InputField = styled__default.input.withConfig({
|
|
26982
26999
|
displayName: "FormInput__InputField",
|
|
26983
27000
|
componentId: "sc-l094r1-0"
|
|
@@ -27065,6 +27082,10 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27065
27082
|
dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
|
|
27066
27083
|
_ref15$isRequired = _ref15.isRequired,
|
|
27067
27084
|
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
27085
|
+
_ref15$htmlFor = _ref15.htmlFor,
|
|
27086
|
+
htmlFor = _ref15$htmlFor === void 0 ? null : _ref15$htmlFor,
|
|
27087
|
+
_ref15$inputId = _ref15.inputId,
|
|
27088
|
+
inputId = _ref15$inputId === void 0 ? null : _ref15$inputId,
|
|
27068
27089
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
27069
27090
|
var _useState = React.useState(false),
|
|
27070
27091
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -27102,7 +27123,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27102
27123
|
variant: "pS",
|
|
27103
27124
|
weight: themeValues.fontWeight,
|
|
27104
27125
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
27105
|
-
id: createIdFromString(labelTextWhenNoError)
|
|
27126
|
+
id: createIdFromString(labelTextWhenNoError),
|
|
27127
|
+
htmlFor: htmlFor
|
|
27106
27128
|
}, labelTextWhenNoError), helperModal()) : /*#__PURE__*/React__default.createElement(Box, {
|
|
27107
27129
|
padding: "0",
|
|
27108
27130
|
minWidth: "100%"
|
|
@@ -27115,7 +27137,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27115
27137
|
variant: "pS",
|
|
27116
27138
|
fontWeight: themeValues.fontWeight,
|
|
27117
27139
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
27118
|
-
id: createIdFromString(labelTextWhenNoError)
|
|
27140
|
+
id: createIdFromString(labelTextWhenNoError),
|
|
27141
|
+
htmlFor: htmlFor
|
|
27119
27142
|
}, labelTextWhenNoError), type === "password" && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27120
27143
|
variant: "pS",
|
|
27121
27144
|
color: themeValues.linkColor,
|
|
@@ -27136,6 +27159,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27136
27159
|
}, decorator)))), /*#__PURE__*/React__default.createElement(Box, {
|
|
27137
27160
|
padding: "0"
|
|
27138
27161
|
}, formatter ? /*#__PURE__*/React__default.createElement(FormattedInputField, _extends({
|
|
27162
|
+
id: inputId || (props === null || props === void 0 ? void 0 : props.id),
|
|
27139
27163
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
27140
27164
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
27141
27165
|
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
@@ -27168,6 +27192,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27168
27192
|
}
|
|
27169
27193
|
}
|
|
27170
27194
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
27195
|
+
id: inputId || (props === null || props === void 0 ? void 0 : props.id),
|
|
27171
27196
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
27172
27197
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
27173
27198
|
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
@@ -39307,7 +39332,11 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
39307
39332
|
showErrors = _ref.showErrors,
|
|
39308
39333
|
countryCode = _ref.countryCode,
|
|
39309
39334
|
_ref$isRequired = _ref.isRequired,
|
|
39310
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired
|
|
39335
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
39336
|
+
_ref$htmlFor = _ref.htmlFor,
|
|
39337
|
+
htmlFor = _ref$htmlFor === void 0 ? null : _ref$htmlFor,
|
|
39338
|
+
_ref$inputId = _ref.inputId,
|
|
39339
|
+
inputId = _ref$inputId === void 0 ? null : _ref$inputId;
|
|
39311
39340
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
39312
39341
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
39313
39342
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -39318,6 +39347,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
39318
39347
|
errorMessages: errorMessages,
|
|
39319
39348
|
showErrors: showErrors,
|
|
39320
39349
|
autocompleteValue: "address-level1",
|
|
39350
|
+
htmlFor: htmlFor,
|
|
39351
|
+
inputId: inputId,
|
|
39321
39352
|
isRequired: isRequired
|
|
39322
39353
|
});
|
|
39323
39354
|
};
|
|
@@ -40831,6 +40862,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40831
40862
|
}
|
|
40832
40863
|
},
|
|
40833
40864
|
showErrors: showErrors,
|
|
40865
|
+
htmlFor: "country-name",
|
|
40866
|
+
inputId: "country-name",
|
|
40834
40867
|
dataQa: "Country",
|
|
40835
40868
|
isRequired: true
|
|
40836
40869
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
@@ -40843,6 +40876,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40843
40876
|
return e.key === "Enter" && handleSubmit(e);
|
|
40844
40877
|
},
|
|
40845
40878
|
autocompleteValue: "address-line1",
|
|
40879
|
+
htmlFor: "address-line1",
|
|
40880
|
+
inputId: "address-line1",
|
|
40846
40881
|
dataQa: "Address",
|
|
40847
40882
|
isRequired: true
|
|
40848
40883
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
@@ -40854,6 +40889,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40854
40889
|
return e.key === "Enter" && handleSubmit(e);
|
|
40855
40890
|
},
|
|
40856
40891
|
autocompleteValue: "address-line2",
|
|
40892
|
+
htmlFor: "address-line2",
|
|
40893
|
+
inputId: "address-line2",
|
|
40857
40894
|
dataQa: "Address Line 2"
|
|
40858
40895
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
40859
40896
|
labelTextWhenNoError: "City",
|
|
@@ -40865,6 +40902,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40865
40902
|
return e.key === "Enter" && handleSubmit(e);
|
|
40866
40903
|
},
|
|
40867
40904
|
autocompleteValue: "address-level2",
|
|
40905
|
+
htmlFor: "city",
|
|
40906
|
+
inputId: "city",
|
|
40868
40907
|
dataQa: "City",
|
|
40869
40908
|
isRequired: true
|
|
40870
40909
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
@@ -40877,6 +40916,9 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40877
40916
|
onKeyDown: function onKeyDown(e) {
|
|
40878
40917
|
return e.key === "Enter" && handleSubmit(e);
|
|
40879
40918
|
},
|
|
40919
|
+
autocompleteValue: "address-level1",
|
|
40920
|
+
htmlFor: "stateOrProvince",
|
|
40921
|
+
inputId: "stateOrProvince",
|
|
40880
40922
|
dataQa: "State or Province",
|
|
40881
40923
|
isRequired: true
|
|
40882
40924
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
@@ -40891,6 +40933,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
40891
40933
|
return e.key === "Enter" && handleSubmit(e);
|
|
40892
40934
|
},
|
|
40893
40935
|
autocompleteValue: "postal-code",
|
|
40936
|
+
htmlFor: "postal-code",
|
|
40937
|
+
inputId: "postal-code",
|
|
40894
40938
|
dataQa: "Zip code",
|
|
40895
40939
|
isRequired: true
|
|
40896
40940
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
@@ -48024,6 +48068,8 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48024
48068
|
isLoading = _ref4$isLoading === void 0 ? false : _ref4$isLoading,
|
|
48025
48069
|
_ref4$isError = _ref4.isError,
|
|
48026
48070
|
isError = _ref4$isError === void 0 ? false : _ref4$isError,
|
|
48071
|
+
_ref4$multiCartEnable = _ref4.multiCartEnabled,
|
|
48072
|
+
multiCartEnabled = _ref4$multiCartEnable === void 0 ? false : _ref4$multiCartEnable,
|
|
48027
48073
|
agencyDisplayName = _ref4.agencyDisplayName;
|
|
48028
48074
|
var _useState = React.useState(initiallyOpen),
|
|
48029
48075
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -48064,7 +48110,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48064
48110
|
variant: themeValues.labeledAmountSubtotal
|
|
48065
48111
|
}, fee)));
|
|
48066
48112
|
});
|
|
48067
|
-
var agencySubheading = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, agencyDisplayName && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48113
|
+
var agencySubheading = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, multiCartEnabled && agencyDisplayName && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48068
48114
|
justify: "space-between",
|
|
48069
48115
|
align: "center",
|
|
48070
48116
|
style: {
|