@thecb/components 10.6.2-beta.7 → 10.6.2
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 +653 -122
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +653 -122
- 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/icons/.DS_Store +0 -0
- package/src/components/atoms/icons/WalletIconSmall.js +7 -3
- package/src/components/atoms/icons/icons.stories.js +0 -2
- package/src/components/atoms/layouts/Box.js +0 -2
- package/src/components/atoms/layouts/Box.styled.js +1 -3
- package/src/components/atoms/placeholder/Placeholder.js +126 -91
- package/src/components/atoms/placeholder/Placeholder.stories.js +0 -1
- package/src/components/molecules/editable-list/EditableList.stories.js +2 -7
- package/src/components/molecules/module/Module.js +8 -2
- package/src/components/molecules/payment-details/PaymentDetails.js +8 -4
package/dist/index.esm.js
CHANGED
|
@@ -6419,7 +6419,7 @@ var Text = function Text(_ref) {
|
|
|
6419
6419
|
};
|
|
6420
6420
|
var Text$1 = themeComponent(Text, "Text", fallbackValues, "p");
|
|
6421
6421
|
|
|
6422
|
-
var _excluded$2 = ["activeStyles", "
|
|
6422
|
+
var _excluded$2 = ["activeStyles", "hoverStyles", "disabledStyles", "extraStyles", "borderSize", "borderColor", "borderWidthOverride", "borderRadius", "textAlign", "boxShadow", "minHeight", "minWidth", "maxWidth", "padding", "hiddenStyles", "ariaControls", "ariaLabel"];
|
|
6423
6423
|
/*
|
|
6424
6424
|
The child span selector on hover styles targets the text inside of buttons when a button is hovered,
|
|
6425
6425
|
as long as the box wrapper has an "as" prop equal to "button"
|
|
@@ -6431,7 +6431,6 @@ var _excluded$2 = ["activeStyles", "focusStyles", "hoverStyles", "disabledStyles
|
|
|
6431
6431
|
/* eslint-disable no-unused-vars */
|
|
6432
6432
|
var BoxWrapper = styled(function (_ref) {
|
|
6433
6433
|
var activeStyles = _ref.activeStyles,
|
|
6434
|
-
focusStyles = _ref.focusStyles,
|
|
6435
6434
|
hoverStyles = _ref.hoverStyles,
|
|
6436
6435
|
disabledStyles = _ref.disabledStyles,
|
|
6437
6436
|
extraStyles = _ref.extraStyles,
|
|
@@ -6500,9 +6499,8 @@ var BoxWrapper = styled(function (_ref) {
|
|
|
6500
6499
|
disabled = _ref14.disabled;
|
|
6501
6500
|
return css(["", " ", ""], hoverStyles, as === "button" && !disabled ? "> * > span {\n ".concat(hoverStyles, "\n border: none;\n outline: none;\n box-shadow: none;\n }") : "");
|
|
6502
6501
|
}, function (_ref15) {
|
|
6503
|
-
var
|
|
6504
|
-
|
|
6505
|
-
return css(["", " outline:3px solid ", ";outline-offset:2px;", ""], focusStyles, ROYAL_BLUE, as === "button" && "\n > * > span {\n border: none;\n outline: none;\n box-shadow: none;\n }");
|
|
6502
|
+
var as = _ref15.as;
|
|
6503
|
+
return css(["outline:3px solid ", ";outline-offset:2px;", ""], ROYAL_BLUE, as === "button" && "\n > * > span {\n border: none;\n outline: none;\n box-shadow: none;\n }");
|
|
6506
6504
|
}, function (_ref16) {
|
|
6507
6505
|
var activeStyles = _ref16.activeStyles,
|
|
6508
6506
|
as = _ref16.as;
|
|
@@ -6527,7 +6525,7 @@ var BoxWrapper = styled(function (_ref) {
|
|
|
6527
6525
|
});
|
|
6528
6526
|
/* eslint-enable no-unused-vars */
|
|
6529
6527
|
|
|
6530
|
-
var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "
|
|
6528
|
+
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"];
|
|
6531
6529
|
|
|
6532
6530
|
/*
|
|
6533
6531
|
Box component to create generic boxes
|
|
@@ -6560,7 +6558,6 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6560
6558
|
hoverStyles = _ref.hoverStyles,
|
|
6561
6559
|
activeStyles = _ref.activeStyles,
|
|
6562
6560
|
disabledStyles = _ref.disabledStyles,
|
|
6563
|
-
focusStyles = _ref.focusStyles,
|
|
6564
6561
|
variant = _ref.variant,
|
|
6565
6562
|
as = _ref.as,
|
|
6566
6563
|
onClick = _ref.onClick,
|
|
@@ -6596,7 +6593,6 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6596
6593
|
hoverStyles: hoverStyles,
|
|
6597
6594
|
activeStyles: activeStyles,
|
|
6598
6595
|
disabledStyles: disabledStyles,
|
|
6599
|
-
focusStyles: focusStyles,
|
|
6600
6596
|
variant: variant,
|
|
6601
6597
|
as: as,
|
|
6602
6598
|
onClick: onClick,
|
|
@@ -13581,7 +13577,8 @@ var SettingsIconSmall$1 = themeComponent(SettingsIconSmall, "Icons", fallbackVal
|
|
|
13581
13577
|
var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
13582
13578
|
var themeValues = _ref.themeValues,
|
|
13583
13579
|
_ref$iconIndex = _ref.iconIndex,
|
|
13584
|
-
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex
|
|
13580
|
+
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex,
|
|
13581
|
+
colorOverride = _ref.colorOverride;
|
|
13585
13582
|
return /*#__PURE__*/React.createElement("svg", {
|
|
13586
13583
|
width: "20",
|
|
13587
13584
|
height: "20",
|
|
@@ -13592,7 +13589,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13592
13589
|
fillRule: "evenodd",
|
|
13593
13590
|
clipRule: "evenodd",
|
|
13594
13591
|
d: "M16.3125 6.94643C16.0446 6.70536 15.7232 6.57143 15.3482 6.57143L5.14283 6.57143C5.0089 6.57143 4.90176 6.54464 4.8214 6.46429C4.74104 6.38393 4.71426 6.27678 4.71426 6.14286C4.71426 6.03571 4.74104 5.92857 4.8214 5.84821C4.90176 5.76786 5.0089 5.71428 5.14283 5.71428L15.4285 5.71428C15.5357 5.71428 15.6428 5.6875 15.7232 5.60714C15.8035 5.52678 15.8571 5.41964 15.8571 5.28571C15.8571 4.9375 15.7232 4.64286 15.4821 4.375C15.2143 4.13393 14.9196 4 14.5714 4L4.71426 4C4.23211 4 3.80354 4.1875 3.48211 4.50893C3.16068 4.83036 2.99997 5.23214 2.99997 5.71428V14.2857C2.99997 14.7679 3.16068 15.1964 3.48211 15.5179C3.80354 15.8393 4.23211 16 4.71426 16L15.3482 16C15.7232 16 16.0446 15.8929 16.3125 15.625C16.5803 15.3839 16.7143 15.0893 16.7143 14.7143V7.85714C16.7143 7.50893 16.5803 7.21428 16.3125 6.94643ZM12.7142 13.143C13.661 13.143 14.4285 12.3755 14.4285 11.4288C14.4285 10.482 13.661 9.71447 12.7142 9.71447C11.7674 9.71447 10.9999 10.482 10.9999 11.4288C10.9999 12.3755 11.7674 13.143 12.7142 13.143Z",
|
|
13595
|
-
fill: themeValues.singleIconColor
|
|
13592
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13596
13593
|
}), /*#__PURE__*/React.createElement("mask", {
|
|
13597
13594
|
id: "mask0_503_574-".concat(iconIndex),
|
|
13598
13595
|
style: {
|
|
@@ -13613,7 +13610,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13613
13610
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
13614
13611
|
width: "20",
|
|
13615
13612
|
height: "20",
|
|
13616
|
-
fill: themeValues.singleIconColor
|
|
13613
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13617
13614
|
})));
|
|
13618
13615
|
};
|
|
13619
13616
|
var WalletIconSmall$1 = themeComponent(WalletIconSmall, "Icons", fallbackValues$2, "primary");
|
|
@@ -19610,7 +19607,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19610
19607
|
}
|
|
19611
19608
|
|
|
19612
19609
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19613
|
-
|
|
19614
19610
|
/**
|
|
19615
19611
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19616
19612
|
* @private
|
|
@@ -19695,84 +19691,71 @@ var ERRORS = {
|
|
|
19695
19691
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19696
19692
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19697
19693
|
};
|
|
19694
|
+
|
|
19698
19695
|
/**
|
|
19699
19696
|
* super basic version of sprintf
|
|
19700
19697
|
* @private
|
|
19701
19698
|
*/
|
|
19702
|
-
|
|
19703
19699
|
function format() {
|
|
19704
19700
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19705
19701
|
args[_key] = arguments[_key];
|
|
19706
19702
|
}
|
|
19707
|
-
|
|
19708
19703
|
var a = args[0];
|
|
19709
19704
|
var b = [];
|
|
19710
19705
|
var c;
|
|
19711
|
-
|
|
19712
19706
|
for (c = 1; c < args.length; c += 1) {
|
|
19713
19707
|
b.push(args[c]);
|
|
19714
19708
|
}
|
|
19715
|
-
|
|
19716
19709
|
b.forEach(function (d) {
|
|
19717
19710
|
a = a.replace(/%[a-z]/, d);
|
|
19718
19711
|
});
|
|
19719
19712
|
return a;
|
|
19720
19713
|
}
|
|
19714
|
+
|
|
19721
19715
|
/**
|
|
19722
19716
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19723
19717
|
* in production mode.
|
|
19724
19718
|
* @private
|
|
19725
19719
|
*/
|
|
19726
|
-
|
|
19727
|
-
|
|
19728
19720
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19729
19721
|
_inheritsLoose(PolishedError, _Error);
|
|
19730
|
-
|
|
19731
19722
|
function PolishedError(code) {
|
|
19732
19723
|
var _this;
|
|
19733
|
-
|
|
19734
19724
|
if (process.env.NODE_ENV === 'production') {
|
|
19735
19725
|
_this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
|
|
19736
19726
|
} else {
|
|
19737
19727
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19738
19728
|
args[_key2 - 1] = arguments[_key2];
|
|
19739
19729
|
}
|
|
19740
|
-
|
|
19741
19730
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19742
19731
|
}
|
|
19743
|
-
|
|
19744
19732
|
return _assertThisInitialized(_this);
|
|
19745
19733
|
}
|
|
19746
|
-
|
|
19747
19734
|
return PolishedError;
|
|
19748
19735
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19749
19736
|
|
|
19750
19737
|
function colorToInt(color) {
|
|
19751
19738
|
return Math.round(color * 255);
|
|
19752
19739
|
}
|
|
19753
|
-
|
|
19754
19740
|
function convertToInt(red, green, blue) {
|
|
19755
19741
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19756
19742
|
}
|
|
19757
|
-
|
|
19758
19743
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19759
19744
|
if (convert === void 0) {
|
|
19760
19745
|
convert = convertToInt;
|
|
19761
19746
|
}
|
|
19762
|
-
|
|
19763
19747
|
if (saturation === 0) {
|
|
19764
19748
|
// achromatic
|
|
19765
19749
|
return convert(lightness, lightness, lightness);
|
|
19766
|
-
}
|
|
19767
|
-
|
|
19750
|
+
}
|
|
19768
19751
|
|
|
19752
|
+
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19769
19753
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19770
19754
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19771
19755
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19772
19756
|
var red = 0;
|
|
19773
19757
|
var green = 0;
|
|
19774
19758
|
var blue = 0;
|
|
19775
|
-
|
|
19776
19759
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19777
19760
|
red = chroma;
|
|
19778
19761
|
green = secondComponent;
|
|
@@ -19792,7 +19775,6 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19792
19775
|
red = chroma;
|
|
19793
19776
|
blue = secondComponent;
|
|
19794
19777
|
}
|
|
19795
|
-
|
|
19796
19778
|
var lightnessModification = lightness - chroma / 2;
|
|
19797
19779
|
var finalRed = red + lightnessModification;
|
|
19798
19780
|
var finalGreen = green + lightnessModification;
|
|
@@ -19950,11 +19932,11 @@ var namedColorMap = {
|
|
|
19950
19932
|
yellow: 'ff0',
|
|
19951
19933
|
yellowgreen: '9acd32'
|
|
19952
19934
|
};
|
|
19935
|
+
|
|
19953
19936
|
/**
|
|
19954
19937
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19955
19938
|
* @private
|
|
19956
19939
|
*/
|
|
19957
|
-
|
|
19958
19940
|
function nameToHex(color) {
|
|
19959
19941
|
if (typeof color !== 'string') return color;
|
|
19960
19942
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19969,6 +19951,7 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19969
19951
|
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
19970
19952
|
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
19971
19953
|
var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
19954
|
+
|
|
19972
19955
|
/**
|
|
19973
19956
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19974
19957
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19980,14 +19963,11 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19980
19963
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
19981
19964
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
19982
19965
|
*/
|
|
19983
|
-
|
|
19984
19966
|
function parseToRgb(color) {
|
|
19985
19967
|
if (typeof color !== 'string') {
|
|
19986
19968
|
throw new PolishedError(3);
|
|
19987
19969
|
}
|
|
19988
|
-
|
|
19989
19970
|
var normalizedColor = nameToHex(color);
|
|
19990
|
-
|
|
19991
19971
|
if (normalizedColor.match(hexRegex)) {
|
|
19992
19972
|
return {
|
|
19993
19973
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -19995,7 +19975,6 @@ function parseToRgb(color) {
|
|
|
19995
19975
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
19996
19976
|
};
|
|
19997
19977
|
}
|
|
19998
|
-
|
|
19999
19978
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
20000
19979
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
20001
19980
|
return {
|
|
@@ -20005,7 +19984,6 @@ function parseToRgb(color) {
|
|
|
20005
19984
|
alpha: alpha
|
|
20006
19985
|
};
|
|
20007
19986
|
}
|
|
20008
|
-
|
|
20009
19987
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
20010
19988
|
return {
|
|
20011
19989
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -20013,10 +19991,8 @@ function parseToRgb(color) {
|
|
|
20013
19991
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
20014
19992
|
};
|
|
20015
19993
|
}
|
|
20016
|
-
|
|
20017
19994
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
20018
19995
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
20019
|
-
|
|
20020
19996
|
return {
|
|
20021
19997
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
20022
19998
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -20024,9 +20000,7 @@ function parseToRgb(color) {
|
|
|
20024
20000
|
alpha: _alpha
|
|
20025
20001
|
};
|
|
20026
20002
|
}
|
|
20027
|
-
|
|
20028
20003
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
20029
|
-
|
|
20030
20004
|
if (rgbMatched) {
|
|
20031
20005
|
return {
|
|
20032
20006
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -20034,9 +20008,7 @@ function parseToRgb(color) {
|
|
|
20034
20008
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
20035
20009
|
};
|
|
20036
20010
|
}
|
|
20037
|
-
|
|
20038
20011
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
20039
|
-
|
|
20040
20012
|
if (rgbaMatched) {
|
|
20041
20013
|
return {
|
|
20042
20014
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -20045,44 +20017,32 @@ function parseToRgb(color) {
|
|
|
20045
20017
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
20046
20018
|
};
|
|
20047
20019
|
}
|
|
20048
|
-
|
|
20049
20020
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
20050
|
-
|
|
20051
20021
|
if (hslMatched) {
|
|
20052
20022
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
20053
20023
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
20054
20024
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
20055
20025
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
20056
20026
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
20057
|
-
|
|
20058
20027
|
if (!hslRgbMatched) {
|
|
20059
20028
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
20060
20029
|
}
|
|
20061
|
-
|
|
20062
20030
|
return {
|
|
20063
20031
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
20064
20032
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
20065
20033
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
20066
20034
|
};
|
|
20067
20035
|
}
|
|
20068
|
-
|
|
20069
20036
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
20070
|
-
|
|
20071
20037
|
if (hslaMatched) {
|
|
20072
20038
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
20073
|
-
|
|
20074
20039
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
20075
|
-
|
|
20076
20040
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
20077
|
-
|
|
20078
20041
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
20079
|
-
|
|
20080
20042
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
20081
|
-
|
|
20082
20043
|
if (!_hslRgbMatched) {
|
|
20083
20044
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
20084
20045
|
}
|
|
20085
|
-
|
|
20086
20046
|
return {
|
|
20087
20047
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
20088
20048
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -20090,10 +20050,82 @@ function parseToRgb(color) {
|
|
|
20090
20050
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
20091
20051
|
};
|
|
20092
20052
|
}
|
|
20093
|
-
|
|
20094
20053
|
throw new PolishedError(5);
|
|
20095
20054
|
}
|
|
20096
20055
|
|
|
20056
|
+
function rgbToHsl(color) {
|
|
20057
|
+
// make sure rgb are contained in a set of [0, 255]
|
|
20058
|
+
var red = color.red / 255;
|
|
20059
|
+
var green = color.green / 255;
|
|
20060
|
+
var blue = color.blue / 255;
|
|
20061
|
+
var max = Math.max(red, green, blue);
|
|
20062
|
+
var min = Math.min(red, green, blue);
|
|
20063
|
+
var lightness = (max + min) / 2;
|
|
20064
|
+
if (max === min) {
|
|
20065
|
+
// achromatic
|
|
20066
|
+
if (color.alpha !== undefined) {
|
|
20067
|
+
return {
|
|
20068
|
+
hue: 0,
|
|
20069
|
+
saturation: 0,
|
|
20070
|
+
lightness: lightness,
|
|
20071
|
+
alpha: color.alpha
|
|
20072
|
+
};
|
|
20073
|
+
} else {
|
|
20074
|
+
return {
|
|
20075
|
+
hue: 0,
|
|
20076
|
+
saturation: 0,
|
|
20077
|
+
lightness: lightness
|
|
20078
|
+
};
|
|
20079
|
+
}
|
|
20080
|
+
}
|
|
20081
|
+
var hue;
|
|
20082
|
+
var delta = max - min;
|
|
20083
|
+
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
20084
|
+
switch (max) {
|
|
20085
|
+
case red:
|
|
20086
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
20087
|
+
break;
|
|
20088
|
+
case green:
|
|
20089
|
+
hue = (blue - red) / delta + 2;
|
|
20090
|
+
break;
|
|
20091
|
+
default:
|
|
20092
|
+
// blue case
|
|
20093
|
+
hue = (red - green) / delta + 4;
|
|
20094
|
+
break;
|
|
20095
|
+
}
|
|
20096
|
+
hue *= 60;
|
|
20097
|
+
if (color.alpha !== undefined) {
|
|
20098
|
+
return {
|
|
20099
|
+
hue: hue,
|
|
20100
|
+
saturation: saturation,
|
|
20101
|
+
lightness: lightness,
|
|
20102
|
+
alpha: color.alpha
|
|
20103
|
+
};
|
|
20104
|
+
}
|
|
20105
|
+
return {
|
|
20106
|
+
hue: hue,
|
|
20107
|
+
saturation: saturation,
|
|
20108
|
+
lightness: lightness
|
|
20109
|
+
};
|
|
20110
|
+
}
|
|
20111
|
+
|
|
20112
|
+
/**
|
|
20113
|
+
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
20114
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
20115
|
+
* can convert a HslColor or HslaColor object back to a string.
|
|
20116
|
+
*
|
|
20117
|
+
* @example
|
|
20118
|
+
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
20119
|
+
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
20120
|
+
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
20121
|
+
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
20122
|
+
*/
|
|
20123
|
+
function parseToHsl(color) {
|
|
20124
|
+
// Note: At a later stage we can optimize this function as right now a hsl
|
|
20125
|
+
// color would be parsed converted to rgb values and converted back to hsl.
|
|
20126
|
+
return rgbToHsl(parseToRgb(color));
|
|
20127
|
+
}
|
|
20128
|
+
|
|
20097
20129
|
/**
|
|
20098
20130
|
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
20099
20131
|
* @private
|
|
@@ -20102,10 +20134,8 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
20102
20134
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
20103
20135
|
return "#" + value[1] + value[3] + value[5];
|
|
20104
20136
|
}
|
|
20105
|
-
|
|
20106
20137
|
return value;
|
|
20107
20138
|
};
|
|
20108
|
-
|
|
20109
20139
|
var reduceHexValue$1 = reduceHexValue;
|
|
20110
20140
|
|
|
20111
20141
|
function numberToHex(value) {
|
|
@@ -20113,6 +20143,83 @@ function numberToHex(value) {
|
|
|
20113
20143
|
return hex.length === 1 ? "0" + hex : hex;
|
|
20114
20144
|
}
|
|
20115
20145
|
|
|
20146
|
+
function colorToHex(color) {
|
|
20147
|
+
return numberToHex(Math.round(color * 255));
|
|
20148
|
+
}
|
|
20149
|
+
function convertToHex(red, green, blue) {
|
|
20150
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
20151
|
+
}
|
|
20152
|
+
function hslToHex(hue, saturation, lightness) {
|
|
20153
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
20154
|
+
}
|
|
20155
|
+
|
|
20156
|
+
/**
|
|
20157
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20158
|
+
*
|
|
20159
|
+
* @example
|
|
20160
|
+
* // Styles as object usage
|
|
20161
|
+
* const styles = {
|
|
20162
|
+
* background: hsl(359, 0.75, 0.4),
|
|
20163
|
+
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
20164
|
+
* }
|
|
20165
|
+
*
|
|
20166
|
+
* // styled-components usage
|
|
20167
|
+
* const div = styled.div`
|
|
20168
|
+
* background: ${hsl(359, 0.75, 0.4)};
|
|
20169
|
+
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
20170
|
+
* `
|
|
20171
|
+
*
|
|
20172
|
+
* // CSS in JS Output
|
|
20173
|
+
*
|
|
20174
|
+
* element {
|
|
20175
|
+
* background: "#b3191c";
|
|
20176
|
+
* background: "#b3191c";
|
|
20177
|
+
* }
|
|
20178
|
+
*/
|
|
20179
|
+
function hsl(value, saturation, lightness) {
|
|
20180
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
|
20181
|
+
return hslToHex(value, saturation, lightness);
|
|
20182
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
20183
|
+
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
20184
|
+
}
|
|
20185
|
+
throw new PolishedError(1);
|
|
20186
|
+
}
|
|
20187
|
+
|
|
20188
|
+
/**
|
|
20189
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
20190
|
+
*
|
|
20191
|
+
* @example
|
|
20192
|
+
* // Styles as object usage
|
|
20193
|
+
* const styles = {
|
|
20194
|
+
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
20195
|
+
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
20196
|
+
* background: hsla(359, 0.75, 0.4, 1),
|
|
20197
|
+
* }
|
|
20198
|
+
*
|
|
20199
|
+
* // styled-components usage
|
|
20200
|
+
* const div = styled.div`
|
|
20201
|
+
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
20202
|
+
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
20203
|
+
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
20204
|
+
* `
|
|
20205
|
+
*
|
|
20206
|
+
* // CSS in JS Output
|
|
20207
|
+
*
|
|
20208
|
+
* element {
|
|
20209
|
+
* background: "rgba(179,25,28,0.7)";
|
|
20210
|
+
* background: "rgba(179,25,28,0.7)";
|
|
20211
|
+
* background: "#b3191c";
|
|
20212
|
+
* }
|
|
20213
|
+
*/
|
|
20214
|
+
function hsla$1(value, saturation, lightness, alpha) {
|
|
20215
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
|
|
20216
|
+
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
20217
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
20218
|
+
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
20219
|
+
}
|
|
20220
|
+
throw new PolishedError(2);
|
|
20221
|
+
}
|
|
20222
|
+
|
|
20116
20223
|
/**
|
|
20117
20224
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20118
20225
|
*
|
|
@@ -20142,7 +20249,6 @@ function rgb(value, green, blue) {
|
|
|
20142
20249
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
20143
20250
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
20144
20251
|
}
|
|
20145
|
-
|
|
20146
20252
|
throw new PolishedError(6);
|
|
20147
20253
|
}
|
|
20148
20254
|
|
|
@@ -20189,10 +20295,62 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
20189
20295
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
20190
20296
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
20191
20297
|
}
|
|
20192
|
-
|
|
20193
20298
|
throw new PolishedError(7);
|
|
20194
20299
|
}
|
|
20195
20300
|
|
|
20301
|
+
var isRgb = function isRgb(color) {
|
|
20302
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20303
|
+
};
|
|
20304
|
+
var isRgba$1 = function isRgba(color) {
|
|
20305
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
|
|
20306
|
+
};
|
|
20307
|
+
var isHsl = function isHsl(color) {
|
|
20308
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20309
|
+
};
|
|
20310
|
+
var isHsla$1 = function isHsla(color) {
|
|
20311
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
|
|
20312
|
+
};
|
|
20313
|
+
|
|
20314
|
+
/**
|
|
20315
|
+
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
20316
|
+
* This util is useful in case you only know on runtime which color object is
|
|
20317
|
+
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
20318
|
+
*
|
|
20319
|
+
* @example
|
|
20320
|
+
* // Styles as object usage
|
|
20321
|
+
* const styles = {
|
|
20322
|
+
* background: toColorString({ red: 255, green: 205, blue: 100 }),
|
|
20323
|
+
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
|
|
20324
|
+
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
|
|
20325
|
+
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
|
|
20326
|
+
* }
|
|
20327
|
+
*
|
|
20328
|
+
* // styled-components usage
|
|
20329
|
+
* const div = styled.div`
|
|
20330
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
20331
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
20332
|
+
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
20333
|
+
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
20334
|
+
* `
|
|
20335
|
+
*
|
|
20336
|
+
* // CSS in JS Output
|
|
20337
|
+
* element {
|
|
20338
|
+
* background: "#ffcd64";
|
|
20339
|
+
* background: "rgba(255,205,100,0.72)";
|
|
20340
|
+
* background: "#00f";
|
|
20341
|
+
* background: "rgba(179,25,25,0.72)";
|
|
20342
|
+
* }
|
|
20343
|
+
*/
|
|
20344
|
+
|
|
20345
|
+
function toColorString(color) {
|
|
20346
|
+
if (typeof color !== 'object') throw new PolishedError(8);
|
|
20347
|
+
if (isRgba$1(color)) return rgba$1(color);
|
|
20348
|
+
if (isRgb(color)) return rgb(color);
|
|
20349
|
+
if (isHsla$1(color)) return hsla$1(color);
|
|
20350
|
+
if (isHsl(color)) return hsl(color);
|
|
20351
|
+
throw new PolishedError(8);
|
|
20352
|
+
}
|
|
20353
|
+
|
|
20196
20354
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
20197
20355
|
// eslint-disable-next-line no-unused-vars
|
|
20198
20356
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -20203,14 +20361,156 @@ function curried(f, length, acc) {
|
|
|
20203
20361
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20204
20362
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
20205
20363
|
};
|
|
20206
|
-
}
|
|
20207
|
-
|
|
20364
|
+
}
|
|
20208
20365
|
|
|
20366
|
+
// eslint-disable-next-line no-redeclare
|
|
20209
20367
|
function curry(f) {
|
|
20210
20368
|
// eslint-disable-line no-redeclare
|
|
20211
20369
|
return curried(f, f.length, []);
|
|
20212
20370
|
}
|
|
20213
20371
|
|
|
20372
|
+
/**
|
|
20373
|
+
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
20374
|
+
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
20375
|
+
* the color wheel, always producing a positive hue value.
|
|
20376
|
+
*
|
|
20377
|
+
* @example
|
|
20378
|
+
* // Styles as object usage
|
|
20379
|
+
* const styles = {
|
|
20380
|
+
* background: adjustHue(180, '#448'),
|
|
20381
|
+
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
20382
|
+
* }
|
|
20383
|
+
*
|
|
20384
|
+
* // styled-components usage
|
|
20385
|
+
* const div = styled.div`
|
|
20386
|
+
* background: ${adjustHue(180, '#448')};
|
|
20387
|
+
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
20388
|
+
* `
|
|
20389
|
+
*
|
|
20390
|
+
* // CSS in JS Output
|
|
20391
|
+
* element {
|
|
20392
|
+
* background: "#888844";
|
|
20393
|
+
* background: "rgba(136,136,68,0.7)";
|
|
20394
|
+
* }
|
|
20395
|
+
*/
|
|
20396
|
+
function adjustHue(degree, color) {
|
|
20397
|
+
if (color === 'transparent') return color;
|
|
20398
|
+
var hslColor = parseToHsl(color);
|
|
20399
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20400
|
+
hue: hslColor.hue + parseFloat(degree)
|
|
20401
|
+
}));
|
|
20402
|
+
}
|
|
20403
|
+
|
|
20404
|
+
// prettier-ignore
|
|
20405
|
+
var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
|
|
20406
|
+
|
|
20407
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
20408
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
20409
|
+
}
|
|
20410
|
+
|
|
20411
|
+
/**
|
|
20412
|
+
* Returns a string value for the darkened color.
|
|
20413
|
+
*
|
|
20414
|
+
* @example
|
|
20415
|
+
* // Styles as object usage
|
|
20416
|
+
* const styles = {
|
|
20417
|
+
* background: darken(0.2, '#FFCD64'),
|
|
20418
|
+
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
20419
|
+
* }
|
|
20420
|
+
*
|
|
20421
|
+
* // styled-components usage
|
|
20422
|
+
* const div = styled.div`
|
|
20423
|
+
* background: ${darken(0.2, '#FFCD64')};
|
|
20424
|
+
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
20425
|
+
* `
|
|
20426
|
+
*
|
|
20427
|
+
* // CSS in JS Output
|
|
20428
|
+
*
|
|
20429
|
+
* element {
|
|
20430
|
+
* background: "#ffbd31";
|
|
20431
|
+
* background: "rgba(255,189,49,0.7)";
|
|
20432
|
+
* }
|
|
20433
|
+
*/
|
|
20434
|
+
function darken(amount, color) {
|
|
20435
|
+
if (color === 'transparent') return color;
|
|
20436
|
+
var hslColor = parseToHsl(color);
|
|
20437
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20438
|
+
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
20439
|
+
}));
|
|
20440
|
+
}
|
|
20441
|
+
|
|
20442
|
+
// prettier-ignore
|
|
20443
|
+
var curriedDarken = curry /* ::<number | string, string, string> */(darken);
|
|
20444
|
+
|
|
20445
|
+
/**
|
|
20446
|
+
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
20447
|
+
* argument of the desaturate function is the amount by how much the color
|
|
20448
|
+
* intensity should be decreased.
|
|
20449
|
+
*
|
|
20450
|
+
* @example
|
|
20451
|
+
* // Styles as object usage
|
|
20452
|
+
* const styles = {
|
|
20453
|
+
* background: desaturate(0.2, '#CCCD64'),
|
|
20454
|
+
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20455
|
+
* }
|
|
20456
|
+
*
|
|
20457
|
+
* // styled-components usage
|
|
20458
|
+
* const div = styled.div`
|
|
20459
|
+
* background: ${desaturate(0.2, '#CCCD64')};
|
|
20460
|
+
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20461
|
+
* `
|
|
20462
|
+
*
|
|
20463
|
+
* // CSS in JS Output
|
|
20464
|
+
* element {
|
|
20465
|
+
* background: "#b8b979";
|
|
20466
|
+
* background: "rgba(184,185,121,0.7)";
|
|
20467
|
+
* }
|
|
20468
|
+
*/
|
|
20469
|
+
function desaturate(amount, color) {
|
|
20470
|
+
if (color === 'transparent') return color;
|
|
20471
|
+
var hslColor = parseToHsl(color);
|
|
20472
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20473
|
+
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
20474
|
+
}));
|
|
20475
|
+
}
|
|
20476
|
+
|
|
20477
|
+
// prettier-ignore
|
|
20478
|
+
var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
|
|
20479
|
+
|
|
20480
|
+
/**
|
|
20481
|
+
* Returns a string value for the lightened color.
|
|
20482
|
+
*
|
|
20483
|
+
* @example
|
|
20484
|
+
* // Styles as object usage
|
|
20485
|
+
* const styles = {
|
|
20486
|
+
* background: lighten(0.2, '#CCCD64'),
|
|
20487
|
+
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
20488
|
+
* }
|
|
20489
|
+
*
|
|
20490
|
+
* // styled-components usage
|
|
20491
|
+
* const div = styled.div`
|
|
20492
|
+
* background: ${lighten(0.2, '#FFCD64')};
|
|
20493
|
+
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
20494
|
+
* `
|
|
20495
|
+
*
|
|
20496
|
+
* // CSS in JS Output
|
|
20497
|
+
*
|
|
20498
|
+
* element {
|
|
20499
|
+
* background: "#e5e6b1";
|
|
20500
|
+
* background: "rgba(229,230,177,0.7)";
|
|
20501
|
+
* }
|
|
20502
|
+
*/
|
|
20503
|
+
function lighten(amount, color) {
|
|
20504
|
+
if (color === 'transparent') return color;
|
|
20505
|
+
var hslColor = parseToHsl(color);
|
|
20506
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20507
|
+
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
20508
|
+
}));
|
|
20509
|
+
}
|
|
20510
|
+
|
|
20511
|
+
// prettier-ignore
|
|
20512
|
+
var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
20513
|
+
|
|
20214
20514
|
/**
|
|
20215
20515
|
* Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
|
|
20216
20516
|
*
|
|
@@ -20237,25 +20537,21 @@ function curry(f) {
|
|
|
20237
20537
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
20238
20538
|
* }
|
|
20239
20539
|
*/
|
|
20240
|
-
|
|
20241
20540
|
function mix$1(weight, color, otherColor) {
|
|
20242
20541
|
if (color === 'transparent') return otherColor;
|
|
20243
20542
|
if (otherColor === 'transparent') return color;
|
|
20244
20543
|
if (weight === 0) return otherColor;
|
|
20245
20544
|
var parsedColor1 = parseToRgb(color);
|
|
20246
|
-
|
|
20247
20545
|
var color1 = _extends$1({}, parsedColor1, {
|
|
20248
20546
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20249
20547
|
});
|
|
20250
|
-
|
|
20251
20548
|
var parsedColor2 = parseToRgb(otherColor);
|
|
20252
|
-
|
|
20253
20549
|
var color2 = _extends$1({}, parsedColor2, {
|
|
20254
20550
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20255
|
-
});
|
|
20256
|
-
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20257
|
-
|
|
20551
|
+
});
|
|
20258
20552
|
|
|
20553
|
+
// The formula is copied from the original Sass implementation:
|
|
20554
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20259
20555
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
20260
20556
|
var x = parseFloat(weight) * 2 - 1;
|
|
20261
20557
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -20269,14 +20565,218 @@ function mix$1(weight, color, otherColor) {
|
|
|
20269
20565
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
20270
20566
|
};
|
|
20271
20567
|
return rgba$1(mixedColor);
|
|
20272
|
-
}
|
|
20273
|
-
|
|
20568
|
+
}
|
|
20274
20569
|
|
|
20275
|
-
|
|
20276
|
-
/* ::<number | string, string, string, string> */
|
|
20277
|
-
(mix$1);
|
|
20570
|
+
// prettier-ignore
|
|
20571
|
+
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
20278
20572
|
var mix$1$1 = curriedMix;
|
|
20279
20573
|
|
|
20574
|
+
/**
|
|
20575
|
+
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20576
|
+
*
|
|
20577
|
+
*
|
|
20578
|
+
* @example
|
|
20579
|
+
* // Styles as object usage
|
|
20580
|
+
* const styles = {
|
|
20581
|
+
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
20582
|
+
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
20583
|
+
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
20584
|
+
* }
|
|
20585
|
+
*
|
|
20586
|
+
* // styled-components usage
|
|
20587
|
+
* const div = styled.div`
|
|
20588
|
+
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
20589
|
+
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
20590
|
+
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
20591
|
+
* `
|
|
20592
|
+
*
|
|
20593
|
+
* // CSS in JS Output
|
|
20594
|
+
*
|
|
20595
|
+
* element {
|
|
20596
|
+
* background: "#fff";
|
|
20597
|
+
* background: "rgba(255,255,255,0.7)";
|
|
20598
|
+
* background: "rgba(255,0,0,0.7)";
|
|
20599
|
+
* }
|
|
20600
|
+
*/
|
|
20601
|
+
function opacify(amount, color) {
|
|
20602
|
+
if (color === 'transparent') return color;
|
|
20603
|
+
var parsedColor = parseToRgb(color);
|
|
20604
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20605
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20606
|
+
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
20607
|
+
});
|
|
20608
|
+
return rgba$1(colorWithAlpha);
|
|
20609
|
+
}
|
|
20610
|
+
|
|
20611
|
+
// prettier-ignore
|
|
20612
|
+
var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
|
|
20613
|
+
|
|
20614
|
+
/**
|
|
20615
|
+
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
20616
|
+
* argument of the saturate function is the amount by how much the color
|
|
20617
|
+
* intensity should be increased.
|
|
20618
|
+
*
|
|
20619
|
+
* @example
|
|
20620
|
+
* // Styles as object usage
|
|
20621
|
+
* const styles = {
|
|
20622
|
+
* background: saturate(0.2, '#CCCD64'),
|
|
20623
|
+
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20624
|
+
* }
|
|
20625
|
+
*
|
|
20626
|
+
* // styled-components usage
|
|
20627
|
+
* const div = styled.div`
|
|
20628
|
+
* background: ${saturate(0.2, '#FFCD64')};
|
|
20629
|
+
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20630
|
+
* `
|
|
20631
|
+
*
|
|
20632
|
+
* // CSS in JS Output
|
|
20633
|
+
*
|
|
20634
|
+
* element {
|
|
20635
|
+
* background: "#e0e250";
|
|
20636
|
+
* background: "rgba(224,226,80,0.7)";
|
|
20637
|
+
* }
|
|
20638
|
+
*/
|
|
20639
|
+
function saturate(amount, color) {
|
|
20640
|
+
if (color === 'transparent') return color;
|
|
20641
|
+
var hslColor = parseToHsl(color);
|
|
20642
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20643
|
+
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
20644
|
+
}));
|
|
20645
|
+
}
|
|
20646
|
+
|
|
20647
|
+
// prettier-ignore
|
|
20648
|
+
var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
|
|
20649
|
+
|
|
20650
|
+
/**
|
|
20651
|
+
* Sets the hue of a color to the provided value. The hue range can be
|
|
20652
|
+
* from 0 and 359.
|
|
20653
|
+
*
|
|
20654
|
+
* @example
|
|
20655
|
+
* // Styles as object usage
|
|
20656
|
+
* const styles = {
|
|
20657
|
+
* background: setHue(42, '#CCCD64'),
|
|
20658
|
+
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
20659
|
+
* }
|
|
20660
|
+
*
|
|
20661
|
+
* // styled-components usage
|
|
20662
|
+
* const div = styled.div`
|
|
20663
|
+
* background: ${setHue(42, '#CCCD64')};
|
|
20664
|
+
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
20665
|
+
* `
|
|
20666
|
+
*
|
|
20667
|
+
* // CSS in JS Output
|
|
20668
|
+
* element {
|
|
20669
|
+
* background: "#cdae64";
|
|
20670
|
+
* background: "rgba(107,100,205,0.7)";
|
|
20671
|
+
* }
|
|
20672
|
+
*/
|
|
20673
|
+
function setHue(hue, color) {
|
|
20674
|
+
if (color === 'transparent') return color;
|
|
20675
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20676
|
+
hue: parseFloat(hue)
|
|
20677
|
+
}));
|
|
20678
|
+
}
|
|
20679
|
+
|
|
20680
|
+
// prettier-ignore
|
|
20681
|
+
var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
|
|
20682
|
+
|
|
20683
|
+
/**
|
|
20684
|
+
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
20685
|
+
* from 0 and 1.
|
|
20686
|
+
*
|
|
20687
|
+
* @example
|
|
20688
|
+
* // Styles as object usage
|
|
20689
|
+
* const styles = {
|
|
20690
|
+
* background: setLightness(0.2, '#CCCD64'),
|
|
20691
|
+
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
20692
|
+
* }
|
|
20693
|
+
*
|
|
20694
|
+
* // styled-components usage
|
|
20695
|
+
* const div = styled.div`
|
|
20696
|
+
* background: ${setLightness(0.2, '#CCCD64')};
|
|
20697
|
+
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
20698
|
+
* `
|
|
20699
|
+
*
|
|
20700
|
+
* // CSS in JS Output
|
|
20701
|
+
* element {
|
|
20702
|
+
* background: "#4d4d19";
|
|
20703
|
+
* background: "rgba(223,224,159,0.7)";
|
|
20704
|
+
* }
|
|
20705
|
+
*/
|
|
20706
|
+
function setLightness(lightness, color) {
|
|
20707
|
+
if (color === 'transparent') return color;
|
|
20708
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20709
|
+
lightness: parseFloat(lightness)
|
|
20710
|
+
}));
|
|
20711
|
+
}
|
|
20712
|
+
|
|
20713
|
+
// prettier-ignore
|
|
20714
|
+
var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
|
|
20715
|
+
|
|
20716
|
+
/**
|
|
20717
|
+
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
20718
|
+
* from 0 and 1.
|
|
20719
|
+
*
|
|
20720
|
+
* @example
|
|
20721
|
+
* // Styles as object usage
|
|
20722
|
+
* const styles = {
|
|
20723
|
+
* background: setSaturation(0.2, '#CCCD64'),
|
|
20724
|
+
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
20725
|
+
* }
|
|
20726
|
+
*
|
|
20727
|
+
* // styled-components usage
|
|
20728
|
+
* const div = styled.div`
|
|
20729
|
+
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
20730
|
+
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
20731
|
+
* `
|
|
20732
|
+
*
|
|
20733
|
+
* // CSS in JS Output
|
|
20734
|
+
* element {
|
|
20735
|
+
* background: "#adad84";
|
|
20736
|
+
* background: "rgba(228,229,76,0.7)";
|
|
20737
|
+
* }
|
|
20738
|
+
*/
|
|
20739
|
+
function setSaturation(saturation, color) {
|
|
20740
|
+
if (color === 'transparent') return color;
|
|
20741
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20742
|
+
saturation: parseFloat(saturation)
|
|
20743
|
+
}));
|
|
20744
|
+
}
|
|
20745
|
+
|
|
20746
|
+
// prettier-ignore
|
|
20747
|
+
var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
|
|
20748
|
+
|
|
20749
|
+
/**
|
|
20750
|
+
* Shades a color by mixing it with black. `shade` can produce
|
|
20751
|
+
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
20752
|
+
* doesn't produce hue shifts.
|
|
20753
|
+
*
|
|
20754
|
+
* @example
|
|
20755
|
+
* // Styles as object usage
|
|
20756
|
+
* const styles = {
|
|
20757
|
+
* background: shade(0.25, '#00f')
|
|
20758
|
+
* }
|
|
20759
|
+
*
|
|
20760
|
+
* // styled-components usage
|
|
20761
|
+
* const div = styled.div`
|
|
20762
|
+
* background: ${shade(0.25, '#00f')};
|
|
20763
|
+
* `
|
|
20764
|
+
*
|
|
20765
|
+
* // CSS in JS Output
|
|
20766
|
+
*
|
|
20767
|
+
* element {
|
|
20768
|
+
* background: "#00003f";
|
|
20769
|
+
* }
|
|
20770
|
+
*/
|
|
20771
|
+
|
|
20772
|
+
function shade(percentage, color) {
|
|
20773
|
+
if (color === 'transparent') return color;
|
|
20774
|
+
return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
|
|
20775
|
+
}
|
|
20776
|
+
|
|
20777
|
+
// prettier-ignore
|
|
20778
|
+
var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
20779
|
+
|
|
20280
20780
|
/**
|
|
20281
20781
|
* Tints a color by mixing it with white. `tint` can produce
|
|
20282
20782
|
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
@@ -20303,14 +20803,52 @@ var mix$1$1 = curriedMix;
|
|
|
20303
20803
|
function tint(percentage, color) {
|
|
20304
20804
|
if (color === 'transparent') return color;
|
|
20305
20805
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20306
|
-
}
|
|
20307
|
-
|
|
20806
|
+
}
|
|
20308
20807
|
|
|
20309
|
-
|
|
20310
|
-
/* ::<number | string, string, string> */
|
|
20311
|
-
(tint);
|
|
20808
|
+
// prettier-ignore
|
|
20809
|
+
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20312
20810
|
var curriedTint$1 = curriedTint;
|
|
20313
20811
|
|
|
20812
|
+
/**
|
|
20813
|
+
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20814
|
+
*
|
|
20815
|
+
*
|
|
20816
|
+
* @example
|
|
20817
|
+
* // Styles as object usage
|
|
20818
|
+
* const styles = {
|
|
20819
|
+
* background: transparentize(0.1, '#fff'),
|
|
20820
|
+
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
20821
|
+
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
20822
|
+
* }
|
|
20823
|
+
*
|
|
20824
|
+
* // styled-components usage
|
|
20825
|
+
* const div = styled.div`
|
|
20826
|
+
* background: ${transparentize(0.1, '#fff')};
|
|
20827
|
+
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
20828
|
+
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
20829
|
+
* `
|
|
20830
|
+
*
|
|
20831
|
+
* // CSS in JS Output
|
|
20832
|
+
*
|
|
20833
|
+
* element {
|
|
20834
|
+
* background: "rgba(255,255,255,0.9)";
|
|
20835
|
+
* background: "rgba(255,255,255,0.8)";
|
|
20836
|
+
* background: "rgba(255,0,0,0.3)";
|
|
20837
|
+
* }
|
|
20838
|
+
*/
|
|
20839
|
+
function transparentize(amount, color) {
|
|
20840
|
+
if (color === 'transparent') return color;
|
|
20841
|
+
var parsedColor = parseToRgb(color);
|
|
20842
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20843
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20844
|
+
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
20845
|
+
});
|
|
20846
|
+
return rgba$1(colorWithAlpha);
|
|
20847
|
+
}
|
|
20848
|
+
|
|
20849
|
+
// prettier-ignore
|
|
20850
|
+
var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
|
|
20851
|
+
|
|
20314
20852
|
var linkColor = MATISSE_BLUE;
|
|
20315
20853
|
var fallbackValues$8 = {
|
|
20316
20854
|
linkColor: linkColor
|
|
@@ -23000,32 +23538,19 @@ var toIndexedObject = function (it) {
|
|
|
23000
23538
|
return indexedObject(requireObjectCoercible(it));
|
|
23001
23539
|
};
|
|
23002
23540
|
|
|
23003
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
23004
|
-
|
|
23005
23541
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23006
|
-
|
|
23007
|
-
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
23008
|
-
|
|
23009
|
-
var documentAll_1 = {
|
|
23010
|
-
all: documentAll,
|
|
23011
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
23012
|
-
};
|
|
23013
|
-
|
|
23014
|
-
var documentAll$1 = documentAll_1.all;
|
|
23542
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
23015
23543
|
|
|
23016
23544
|
// `IsCallable` abstract operation
|
|
23017
23545
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23018
|
-
|
|
23019
|
-
|
|
23546
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
23547
|
+
var isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
23548
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
23020
23549
|
} : function (argument) {
|
|
23021
23550
|
return typeof argument == 'function';
|
|
23022
23551
|
};
|
|
23023
23552
|
|
|
23024
|
-
var
|
|
23025
|
-
|
|
23026
|
-
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
23027
|
-
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
23028
|
-
} : function (it) {
|
|
23553
|
+
var isObject = function (it) {
|
|
23029
23554
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23030
23555
|
};
|
|
23031
23556
|
|
|
@@ -23161,10 +23686,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
23161
23686
|
(module.exports = function (key, value) {
|
|
23162
23687
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
23163
23688
|
})('versions', []).push({
|
|
23164
|
-
version: '3.
|
|
23689
|
+
version: '3.35.1',
|
|
23165
23690
|
mode: 'global',
|
|
23166
|
-
copyright: '© 2014-
|
|
23167
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
23691
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
23692
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
|
|
23168
23693
|
source: 'https://github.com/zloirock/core-js'
|
|
23169
23694
|
});
|
|
23170
23695
|
});
|
|
@@ -23461,7 +23986,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23461
23986
|
|
|
23462
23987
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23463
23988
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23464
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23989
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
23465
23990
|
}
|
|
23466
23991
|
if (options && options.getter) name = 'get ' + name;
|
|
23467
23992
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23549,7 +24074,8 @@ var min$1 = Math.min;
|
|
|
23549
24074
|
// `ToLength` abstract operation
|
|
23550
24075
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23551
24076
|
var toLength = function (argument) {
|
|
23552
|
-
|
|
24077
|
+
var len = toIntegerOrInfinity(argument);
|
|
24078
|
+
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23553
24079
|
};
|
|
23554
24080
|
|
|
23555
24081
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23709,7 +24235,7 @@ var _export = function (options, source) {
|
|
|
23709
24235
|
} else if (STATIC) {
|
|
23710
24236
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23711
24237
|
} else {
|
|
23712
|
-
target =
|
|
24238
|
+
target = global_1[TARGET] && global_1[TARGET].prototype;
|
|
23713
24239
|
}
|
|
23714
24240
|
if (target) for (key in source) {
|
|
23715
24241
|
sourceProperty = source[key];
|
|
@@ -23972,11 +24498,15 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
23972
24498
|
} catch (error) { /* empty */ }
|
|
23973
24499
|
};
|
|
23974
24500
|
|
|
24501
|
+
var isPossiblePrototype = function (argument) {
|
|
24502
|
+
return isObject(argument) || argument === null;
|
|
24503
|
+
};
|
|
24504
|
+
|
|
23975
24505
|
var $String$4 = String;
|
|
23976
24506
|
var $TypeError$6 = TypeError;
|
|
23977
24507
|
|
|
23978
24508
|
var aPossiblePrototype = function (argument) {
|
|
23979
|
-
if (
|
|
24509
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
23980
24510
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23981
24511
|
};
|
|
23982
24512
|
|
|
@@ -27577,11 +28107,7 @@ var renderContent = function renderContent(_ref2) {
|
|
|
27577
28107
|
padding: "0",
|
|
27578
28108
|
minHeight: "100%",
|
|
27579
28109
|
extraStyles: "cursor: pointer;",
|
|
27580
|
-
dataQa: dataQa
|
|
27581
|
-
tabIndex: "0",
|
|
27582
|
-
onKeyPress: function onKeyPress(e) {
|
|
27583
|
-
return e.key === "Enter" && action();
|
|
27584
|
-
}
|
|
28110
|
+
dataQa: dataQa
|
|
27585
28111
|
}, children);
|
|
27586
28112
|
};
|
|
27587
28113
|
var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref3) {
|
|
@@ -27616,7 +28142,6 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27616
28142
|
_ref4$isDisabled = _ref4.isDisabled,
|
|
27617
28143
|
isDisabled = _ref4$isDisabled === void 0 ? false : _ref4$isDisabled,
|
|
27618
28144
|
dataQa = _ref4.dataQa;
|
|
27619
|
-
var borderColor = isDisabled ? MANATEE_GREY : themeValues.color;
|
|
27620
28145
|
return /*#__PURE__*/React.createElement(PlaceholderContentWrapper, {
|
|
27621
28146
|
isLink: isLink,
|
|
27622
28147
|
action: action,
|
|
@@ -27629,14 +28154,16 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27629
28154
|
border: "none",
|
|
27630
28155
|
minHeight: themeValues.height,
|
|
27631
28156
|
hiddenStyles: !visible,
|
|
27632
|
-
extraStyles: "\n
|
|
27633
|
-
hoverStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.9, themeValues.color), ";")
|
|
27634
|
-
focusStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.9, themeValues.color), ";"),
|
|
27635
|
-
activeStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.8, themeValues.color), "; ").concat(!isDisabled && "background-image:none; border: 2px solid ".concat(borderColor, ";}"))
|
|
28157
|
+
extraStyles: isDisabled ? "border: 1px dashed ".concat(MANATEE_GREY, "; \n display: flex;\n justify-content: center;\n align-items:center;") : "\n background: linear-gradient(\n to right,\n ".concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%);\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 5px 1px, 1px 5px;\n display: flex;\n justify-content: center;\n align-items:center;"),
|
|
28158
|
+
hoverStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : variant === "large" ? GRECIAN_GREY : curriedTint$1(0.9, themeValues.color), ";")
|
|
27636
28159
|
}, /*#__PURE__*/React.createElement(Center, {
|
|
27637
28160
|
maxWidth: "300px"
|
|
27638
28161
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27639
|
-
padding: "0"
|
|
28162
|
+
padding: "0",
|
|
28163
|
+
tabIndex: "0",
|
|
28164
|
+
onKeyPress: function onKeyPress(e) {
|
|
28165
|
+
return isDisabled ? noop : e.key === "Enter" && action();
|
|
28166
|
+
}
|
|
27640
28167
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
27641
28168
|
justify: "center",
|
|
27642
28169
|
align: "center",
|
|
@@ -27647,7 +28174,7 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27647
28174
|
}, variant === "large" && /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement(Box, {
|
|
27648
28175
|
padding: "0",
|
|
27649
28176
|
"aria-disabled": isDisabled,
|
|
27650
|
-
extraStyles: ".fill { \n fill: ".concat(isDisabled ? MANATEE_GREY : themeValues.color, "; \n } .stroke { \n stroke: ").concat(isDisabled ? MANATEE_GREY : themeValues.color, "; \n } ")
|
|
28177
|
+
extraStyles: ".fill { \n fill: ".concat(isDisabled ? MANATEE_GREY : variant === "large" ? CHARADE_GREY : themeValues.color, "; \n } .stroke { \n stroke: ").concat(isDisabled ? MANATEE_GREY : variant === "large" ? CHARADE_GREY : themeValues.color, "; \n } ")
|
|
27651
28178
|
}, variant === "large" ? /*#__PURE__*/React.createElement(Center, {
|
|
27652
28179
|
intrinsic: true
|
|
27653
28180
|
}, getLargeIcon(largeIcon, isDisabled), /*#__PURE__*/React.createElement(Text$1, {
|
|
@@ -27661,8 +28188,9 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27661
28188
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
27662
28189
|
justify: "center",
|
|
27663
28190
|
align: "center"
|
|
27664
|
-
}, /*#__PURE__*/React.createElement(
|
|
27665
|
-
|
|
28191
|
+
}, /*#__PURE__*/React.createElement(IconAdd, {
|
|
28192
|
+
fill: isDisabled ? MANATEE_GREY : WHITE,
|
|
28193
|
+
strokeWidth: "2"
|
|
27666
28194
|
}), /*#__PURE__*/React.createElement(Center, {
|
|
27667
28195
|
intrinsic: true
|
|
27668
28196
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
@@ -39111,7 +39639,9 @@ var Module = function Module(_ref) {
|
|
|
39111
39639
|
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
39112
39640
|
fontSize = _ref.fontSize,
|
|
39113
39641
|
themeValues = _ref.themeValues,
|
|
39114
|
-
children = _ref.children
|
|
39642
|
+
children = _ref.children,
|
|
39643
|
+
_ref$allowContentOver = _ref.allowContentOverflow,
|
|
39644
|
+
allowContentOverflow = _ref$allowContentOver === void 0 ? false : _ref$allowContentOver;
|
|
39115
39645
|
var themedFontSize = variant === "small" ? "1.25rem" : variant === "default" ? "1.375rem" : "2rem";
|
|
39116
39646
|
var computedFontSize = fontSize || themedFontSize;
|
|
39117
39647
|
var themedElemType = variant === "small" ? "h6" : variant === "default" ? "h5" : "h2";
|
|
@@ -39134,6 +39664,7 @@ var Module = function Module(_ref) {
|
|
|
39134
39664
|
}, heading && !rightTitleContent && headingText, heading && rightTitleContent && /*#__PURE__*/React.createElement(Cluster, {
|
|
39135
39665
|
justify: "space-between",
|
|
39136
39666
|
align: "center",
|
|
39667
|
+
overflow: allowContentOverflow,
|
|
39137
39668
|
nowrap: true
|
|
39138
39669
|
}, headingText, rightTitleContent), /*#__PURE__*/React.createElement(Box, {
|
|
39139
39670
|
padding: "0 0 ".concat(spacingBottom),
|
|
@@ -48383,9 +48914,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48383
48914
|
justify: "space-between",
|
|
48384
48915
|
align: "center"
|
|
48385
48916
|
}, /*#__PURE__*/React.createElement(Title$1, {
|
|
48386
|
-
weight:
|
|
48917
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48387
48918
|
as: "h2",
|
|
48388
|
-
extraStyles: "font-size: 1.
|
|
48919
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48389
48920
|
id: "payment-details-title"
|
|
48390
48921
|
}, titleText), /*#__PURE__*/React.createElement(Title$1, {
|
|
48391
48922
|
weight: FONT_WEIGHT_BOLD,
|
|
@@ -48393,9 +48924,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48393
48924
|
extraStyles: "font-size: 1.375rem;"
|
|
48394
48925
|
}, displayCurrency(total)))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Title$1, {
|
|
48395
48926
|
as: "h2",
|
|
48396
|
-
weight:
|
|
48927
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48397
48928
|
margin: "1rem 0 0 0",
|
|
48398
|
-
extraStyles: "font-size: 1.
|
|
48929
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48399
48930
|
id: "payment-details-title"
|
|
48400
48931
|
}, titleText), agencySubheading);
|
|
48401
48932
|
return isCollapsible ? /*#__PURE__*/React.createElement(Collapsible, {
|