@thecb/components 6.0.0 → 6.0.3
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 +14 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/dropdown/Dropdown.js +10 -6
- package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +3 -0
- package/src/components/molecules/modal/Modal.js +70 -57
- package/src/components/molecules/modal/Modal.stories.js +52 -3
- package/src/util/general.js +21 -0
- package/src/.DS_Store +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -6137,6 +6137,8 @@ var checkDeniedCards = function checkDeniedCards(name) {
|
|
|
6137
6137
|
*/
|
|
6138
6138
|
|
|
6139
6139
|
var screenReaderOnlyStyle = "\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n";
|
|
6140
|
+
var inputPlaceholderTextStyle = "\n ::-webkit-input-placeholder {\n color: ".concat(CHARADE_GREY, ";\n }\n ::-moz-placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n ::-ms-placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n ::placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n");
|
|
6141
|
+
var inputDisabledStyle = "\n color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;\n";
|
|
6140
6142
|
|
|
6141
6143
|
var general = /*#__PURE__*/Object.freeze({
|
|
6142
6144
|
__proto__: null,
|
|
@@ -6149,7 +6151,9 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6149
6151
|
checkCardBrand: checkCardBrand,
|
|
6150
6152
|
displayCardBrand: displayCardBrand,
|
|
6151
6153
|
checkDeniedCards: checkDeniedCards,
|
|
6152
|
-
screenReaderOnlyStyle: screenReaderOnlyStyle
|
|
6154
|
+
screenReaderOnlyStyle: screenReaderOnlyStyle,
|
|
6155
|
+
inputPlaceholderTextStyle: inputPlaceholderTextStyle,
|
|
6156
|
+
inputDisabledStyle: inputDisabledStyle
|
|
6153
6157
|
});
|
|
6154
6158
|
|
|
6155
6159
|
var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children"];
|
|
@@ -20961,7 +20965,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20961
20965
|
borderRadius: "2px",
|
|
20962
20966
|
borderSize: "1px",
|
|
20963
20967
|
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
|
|
20964
|
-
extraStyles: disabled
|
|
20968
|
+
extraStyles: disabled ? "".concat(inputPlaceholderTextStyle).concat(inputDisabledStyle) : inputPlaceholderTextStyle,
|
|
20965
20969
|
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20966
20970
|
isOpen: isOpen,
|
|
20967
20971
|
minHeight: "48px",
|
|
@@ -37256,7 +37260,10 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
37256
37260
|
boxShadow: "0px 0px 4px 0px rgb(110, 114, 126)",
|
|
37257
37261
|
role: "region",
|
|
37258
37262
|
"aria-label": "Payment step"
|
|
37259
|
-
}, /*#__PURE__*/React.createElement(
|
|
37263
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
37264
|
+
srOnly: true,
|
|
37265
|
+
padding: "0"
|
|
37266
|
+
}, /*#__PURE__*/React.createElement(Text$1, null, "Current step: ".concat(tabs[highlightIndex]))), /*#__PURE__*/React.createElement(Center, {
|
|
37260
37267
|
maxWidth: "76.5rem"
|
|
37261
37268
|
}, /*#__PURE__*/React.createElement(Reel, {
|
|
37262
37269
|
padding: "0",
|
|
@@ -40249,6 +40256,8 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40249
40256
|
defaultWrapper = _ref$defaultWrapper === void 0 ? true : _ref$defaultWrapper,
|
|
40250
40257
|
_ref$onlyCloseButton = _ref.onlyCloseButton,
|
|
40251
40258
|
onlyCloseButton = _ref$onlyCloseButton === void 0 ? false : _ref$onlyCloseButton,
|
|
40259
|
+
_ref$noButtons = _ref.noButtons,
|
|
40260
|
+
noButtons = _ref$noButtons === void 0 ? false : _ref$noButtons,
|
|
40252
40261
|
maxHeight = _ref.maxHeight,
|
|
40253
40262
|
_ref$underlayClickExi = _ref.underlayClickExits,
|
|
40254
40263
|
underlayClickExits = _ref$underlayClickExi === void 0 ? true : _ref$underlayClickExi,
|
|
@@ -40309,7 +40318,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40309
40318
|
justify: "flex-end",
|
|
40310
40319
|
align: "center",
|
|
40311
40320
|
childGap: "0rem"
|
|
40312
|
-
}, !onlyCloseButton ? /*#__PURE__*/React.createElement(Fragment, null, isMobile ? /*#__PURE__*/React.createElement(Stack, {
|
|
40321
|
+
}, !noButtons && /*#__PURE__*/React.createElement(React.Fragment, null, !onlyCloseButton ? /*#__PURE__*/React.createElement(Fragment, null, isMobile ? /*#__PURE__*/React.createElement(Stack, {
|
|
40313
40322
|
childGap: "1rem",
|
|
40314
40323
|
direction: "row"
|
|
40315
40324
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -40361,7 +40370,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40361
40370
|
dataQa: "Close",
|
|
40362
40371
|
extraStyles: buttonExtraStyles,
|
|
40363
40372
|
className: "modal-cancel-button"
|
|
40364
|
-
})))))))), children);
|
|
40373
|
+
}))))))))), children);
|
|
40365
40374
|
};
|
|
40366
40375
|
|
|
40367
40376
|
var fontSize$9 = {
|