@thecb/components 9.1.0-beta.7 → 9.1.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 +38 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.esm.js +38 -29
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/alert/Alert.js +7 -3
- package/src/components/atoms/dropdown/Dropdown.js +5 -5
- package/src/components/atoms/form-layouts/FormInput.js +1 -1
- package/src/components/atoms/form-layouts/index.d.ts +1 -1
- package/src/components/atoms/form-select/FormSelect.js +4 -2
- package/src/components/atoms/form-select/FormSelect.stories.js +8 -4
- package/src/components/atoms/form-select/index.d.ts +2 -1
- package/src/components/atoms/icons/icons.stories.js +0 -2
- package/src/components/atoms/layouts/Box.d.ts +1 -0
- package/src/components/atoms/layouts/Box.js +2 -0
- package/src/components/atoms/line-item/LineItem.js +6 -12
- package/src/components/atoms/searchable-select/SearchableSelect.js +2 -0
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +61 -0
- package/src/components/atoms/searchable-select/index.d.ts +1 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +2 -3
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +1 -0
- package/src/components/molecules/.DS_Store +0 -0
- package/src/components/molecules/address-form/AddressForm.js +1 -2
- package/src/components/molecules/phone-form/PhoneForm.js +1 -1
- /package/src/components/atoms/icons/{ExternalLinkIcon.js → ExternalLinkicon.js} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -6530,7 +6530,7 @@ var BoxWrapper = styled__default(function (_ref) {
|
|
|
6530
6530
|
});
|
|
6531
6531
|
/* eslint-enable no-unused-vars */
|
|
6532
6532
|
|
|
6533
|
-
var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
|
|
6533
|
+
var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
|
|
6534
6534
|
/*
|
|
6535
6535
|
Box component to create generic boxes
|
|
6536
6536
|
Supply padding, border, background, and color values
|
|
@@ -6540,7 +6540,8 @@ var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxS
|
|
|
6540
6540
|
*/
|
|
6541
6541
|
|
|
6542
6542
|
var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
6543
|
-
var
|
|
6543
|
+
var autocompleteValue = _ref.autocompleteValue,
|
|
6544
|
+
_ref$padding = _ref.padding,
|
|
6544
6545
|
padding = _ref$padding === void 0 ? "16px" : _ref$padding,
|
|
6545
6546
|
_ref$borderSize = _ref.borderSize,
|
|
6546
6547
|
borderSize = _ref$borderSize === void 0 ? "0px" : _ref$borderSize,
|
|
@@ -6580,6 +6581,7 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6580
6581
|
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
6581
6582
|
|
|
6582
6583
|
return /*#__PURE__*/React__default.createElement(BoxWrapper, _extends({
|
|
6584
|
+
autoComplete: autocompleteValue,
|
|
6583
6585
|
padding: padding,
|
|
6584
6586
|
borderSize: borderSize,
|
|
6585
6587
|
borderColor: borderColor,
|
|
@@ -18762,7 +18764,13 @@ var Alert = function Alert(_ref) {
|
|
|
18762
18764
|
_ref$iconPadding = _ref.iconPadding,
|
|
18763
18765
|
iconPadding = _ref$iconPadding === void 0 ? "0 0 0 1rem" : _ref$iconPadding,
|
|
18764
18766
|
_ref$contentFullHeigh = _ref.contentFullHeight,
|
|
18765
|
-
contentFullHeight = _ref$contentFullHeigh === void 0 ? false : _ref$contentFullHeigh
|
|
18767
|
+
contentFullHeight = _ref$contentFullHeigh === void 0 ? false : _ref$contentFullHeigh,
|
|
18768
|
+
_ref$ariaRole = _ref.ariaRole,
|
|
18769
|
+
ariaRole = _ref$ariaRole === void 0 ? null : _ref$ariaRole,
|
|
18770
|
+
_ref$ariaAtomic = _ref.ariaAtomic,
|
|
18771
|
+
ariaAtomic = _ref$ariaAtomic === void 0 ? true : _ref$ariaAtomic,
|
|
18772
|
+
_ref$ariaLive = _ref.ariaLive,
|
|
18773
|
+
ariaLive = _ref$ariaLive === void 0 ? "polite" : _ref$ariaLive;
|
|
18766
18774
|
var Icon = AlertIcons[variant];
|
|
18767
18775
|
var contentPadding = maxContentWidth ? "".concat(padding, " 1rem") : innerContentPadding;
|
|
18768
18776
|
var content = /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
@@ -18808,7 +18816,7 @@ var Alert = function Alert(_ref) {
|
|
|
18808
18816
|
minHeight: "100%",
|
|
18809
18817
|
onClick: onLinkClick
|
|
18810
18818
|
}, /*#__PURE__*/React__default.createElement(IconQuit, null))))));
|
|
18811
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
18819
|
+
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
18812
18820
|
padding: padding,
|
|
18813
18821
|
width: "100%",
|
|
18814
18822
|
minHeight: height && parseInt(height) < 100 ? height : "100px",
|
|
@@ -18819,9 +18827,12 @@ var Alert = function Alert(_ref) {
|
|
|
18819
18827
|
borderSize: noBorder ? "0px" : "1px",
|
|
18820
18828
|
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
18829
|
extraStyles: extraStyles,
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
|
|
18830
|
+
"aria-live": ariaLive
|
|
18831
|
+
}, ariaAtomic !== null ? {
|
|
18832
|
+
"aria-atomic": ariaAtomic
|
|
18833
|
+
} : {}, ariaRole !== null ? {
|
|
18834
|
+
role: ariaRole
|
|
18835
|
+
} : {}), maxContentWidth ? /*#__PURE__*/React__default.createElement(Center, {
|
|
18825
18836
|
maxWidth: maxContentWidth
|
|
18826
18837
|
}, content) : content);
|
|
18827
18838
|
};
|
|
@@ -23749,8 +23760,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
23749
23760
|
autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
|
|
23750
23761
|
ariaLabelledby = _ref8.ariaLabelledby,
|
|
23751
23762
|
ariaDescribedby = _ref8.ariaDescribedby,
|
|
23752
|
-
|
|
23753
|
-
autocompleteValue = _ref8$autocompleteVal === void 0 ? null : _ref8$autocompleteVal,
|
|
23763
|
+
autocompleteValue = _ref8.autocompleteValue,
|
|
23754
23764
|
_ref8$smoothScroll = _ref8.smoothScroll,
|
|
23755
23765
|
smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll,
|
|
23756
23766
|
_ref8$ariaInvalid = _ref8.ariaInvalid,
|
|
@@ -24079,7 +24089,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24079
24089
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24080
24090
|
variant: "p",
|
|
24081
24091
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
24082
|
-
extraStyles: "padding-left: 16px
|
|
24092
|
+
extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
|
|
24083
24093
|
}, choice.text));
|
|
24084
24094
|
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
24085
24095
|
};
|
|
@@ -24183,12 +24193,13 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24183
24193
|
themeValues = _ref.themeValues,
|
|
24184
24194
|
_ref$hasTitles = _ref.hasTitles,
|
|
24185
24195
|
hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
|
|
24186
|
-
|
|
24187
|
-
autocompleteValue = _ref$autocompleteValu === void 0 ? null : _ref$autocompleteValu,
|
|
24196
|
+
autocompleteValue = _ref.autocompleteValue,
|
|
24188
24197
|
_ref$smoothScroll = _ref.smoothScroll,
|
|
24189
24198
|
smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll,
|
|
24190
24199
|
_ref$dataQa = _ref.dataQa,
|
|
24191
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
24200
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24201
|
+
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24202
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
|
|
24192
24203
|
|
|
24193
24204
|
var _useState = React.useState(false),
|
|
24194
24205
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24231,6 +24242,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24231
24242
|
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24232
24243
|
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24233
24244
|
maxHeight: dropdownMaxHeight,
|
|
24245
|
+
widthFitOptions: widthFitOptions,
|
|
24234
24246
|
hasTitles: hasTitles,
|
|
24235
24247
|
placeholder: options[0] ? options[0].text : "",
|
|
24236
24248
|
options: options,
|
|
@@ -25956,8 +25968,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25956
25968
|
themeValues = _ref15.themeValues,
|
|
25957
25969
|
background = _ref15.background,
|
|
25958
25970
|
customHeight = _ref15.customHeight,
|
|
25959
|
-
|
|
25960
|
-
autocompleteValue = _ref15$autocompleteVa === void 0 ? null : _ref15$autocompleteVa,
|
|
25971
|
+
autocompleteValue = _ref15.autocompleteValue,
|
|
25961
25972
|
extraStyles = _ref15.extraStyles,
|
|
25962
25973
|
removeFromValue = _ref15.removeFromValue,
|
|
25963
25974
|
_ref15$dataQa = _ref15.dataQa,
|
|
@@ -26627,12 +26638,11 @@ var LineItem = function LineItem(_ref) {
|
|
|
26627
26638
|
return visibleFields.includes(attr.key) && attr.key !== "description";
|
|
26628
26639
|
})) === null || _customAttributes$fil === void 0 ? void 0 : _customAttributes$fil.map(function (attr) {
|
|
26629
26640
|
return /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
26630
|
-
variant:
|
|
26641
|
+
variant: "pS",
|
|
26631
26642
|
weight: "400",
|
|
26632
|
-
key: attr.key
|
|
26633
|
-
|
|
26634
|
-
|
|
26635
|
-
}, "".concat(formatAttrKeys(attr.key), ":")), /*#__PURE__*/React__default.createElement(Text$1, null, " ".concat(attr.value)));
|
|
26643
|
+
key: attr.key,
|
|
26644
|
+
color: STORM_GREY
|
|
26645
|
+
}, "".concat(formatAttrKeys(attr.key), ": ").concat(attr.value));
|
|
26636
26646
|
});
|
|
26637
26647
|
return /*#__PURE__*/React__default.createElement(Cluster, {
|
|
26638
26648
|
nowrap: true,
|
|
@@ -26647,7 +26657,7 @@ var LineItem = function LineItem(_ref) {
|
|
|
26647
26657
|
variant: themeValues.paragraphVariant,
|
|
26648
26658
|
weight: "400"
|
|
26649
26659
|
}, subDescription), visibleCustomAttrs && /*#__PURE__*/React__default.createElement(Stack, {
|
|
26650
|
-
childGap: "0"
|
|
26660
|
+
childGap: "0.25rem"
|
|
26651
26661
|
}, visibleCustomAttrs)), !!displayQuantity && /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
26652
26662
|
variant: themeValues.paragraphVariant,
|
|
26653
26663
|
weight: themeValues.weightTitle
|
|
@@ -27339,7 +27349,8 @@ var fallbackValues$w = {
|
|
|
27339
27349
|
var SELECT_ALL = "Select All";
|
|
27340
27350
|
|
|
27341
27351
|
var SearchableSelect = function SearchableSelect(_ref) {
|
|
27342
|
-
var
|
|
27352
|
+
var autocompleteValue = _ref.autocompleteValue,
|
|
27353
|
+
items = _ref.items,
|
|
27343
27354
|
selectedItems = _ref.selectedItems,
|
|
27344
27355
|
allSelected = _ref.allSelected,
|
|
27345
27356
|
toggleSelectAllItems = _ref.toggleSelectAllItems,
|
|
@@ -27381,6 +27392,7 @@ var SearchableSelect = function SearchableSelect(_ref) {
|
|
|
27381
27392
|
border: themeValues.border,
|
|
27382
27393
|
extraStyles: disabled && "color: #6e727e; background-color: #f7f7f7; pointer-events: none;"
|
|
27383
27394
|
}, /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
27395
|
+
autocompleteValue: autocompleteValue,
|
|
27384
27396
|
errorMessages: {},
|
|
27385
27397
|
field: fields.searchTerm,
|
|
27386
27398
|
fieldActions: actions.fields.searchTerm,
|
|
@@ -37998,9 +38010,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
37998
38010
|
field = _ref.field,
|
|
37999
38011
|
fieldActions = _ref.fieldActions,
|
|
38000
38012
|
showErrors = _ref.showErrors,
|
|
38001
|
-
countryCode = _ref.countryCode
|
|
38002
|
-
_ref$autocompleteValu = _ref.autocompleteValue,
|
|
38003
|
-
autocompleteValue = _ref$autocompleteValu === void 0 ? null : _ref$autocompleteValu;
|
|
38013
|
+
countryCode = _ref.countryCode;
|
|
38004
38014
|
var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
|
|
38005
38015
|
var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
|
|
38006
38016
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
@@ -38010,7 +38020,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38010
38020
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
38011
38021
|
errorMessages: errorMessages,
|
|
38012
38022
|
showErrors: showErrors,
|
|
38013
|
-
autocompleteValue:
|
|
38023
|
+
autocompleteValue: "address-level1"
|
|
38014
38024
|
});
|
|
38015
38025
|
};
|
|
38016
38026
|
|
|
@@ -39380,7 +39390,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39380
39390
|
onKeyDown: function onKeyDown(e) {
|
|
39381
39391
|
return e.key === "Enter" && handleSubmit(e);
|
|
39382
39392
|
},
|
|
39383
|
-
autocompleteValue: "
|
|
39393
|
+
autocompleteValue: "address-level2",
|
|
39384
39394
|
dataQa: "City"
|
|
39385
39395
|
}), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
|
|
39386
39396
|
labelTextWhenNoError: isUS ? "State" : "State or Province",
|
|
@@ -39392,7 +39402,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39392
39402
|
onKeyDown: function onKeyDown(e) {
|
|
39393
39403
|
return e.key === "Enter" && handleSubmit(e);
|
|
39394
39404
|
},
|
|
39395
|
-
autocompleteValue: "administrative-area",
|
|
39396
39405
|
dataQa: "State or Province"
|
|
39397
39406
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39398
39407
|
isNum: isUS,
|
|
@@ -48399,7 +48408,7 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48399
48408
|
onKeyUp: function onKeyUp(e) {
|
|
48400
48409
|
return e.key === "Enter" && handleSubmit(e);
|
|
48401
48410
|
},
|
|
48402
|
-
autocompleteValue: "tel",
|
|
48411
|
+
autocompleteValue: "tel-national",
|
|
48403
48412
|
dataQa: "Phone number",
|
|
48404
48413
|
isNum: true
|
|
48405
48414
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|