@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.cjs.js
CHANGED
|
@@ -6427,7 +6427,7 @@ var Text = function Text(_ref) {
|
|
|
6427
6427
|
};
|
|
6428
6428
|
var Text$1 = themeComponent(Text, "Text", fallbackValues, "p");
|
|
6429
6429
|
|
|
6430
|
-
var _excluded$2 = ["activeStyles", "
|
|
6430
|
+
var _excluded$2 = ["activeStyles", "hoverStyles", "disabledStyles", "extraStyles", "borderSize", "borderColor", "borderWidthOverride", "borderRadius", "textAlign", "boxShadow", "minHeight", "minWidth", "maxWidth", "padding", "hiddenStyles", "ariaControls", "ariaLabel"];
|
|
6431
6431
|
/*
|
|
6432
6432
|
The child span selector on hover styles targets the text inside of buttons when a button is hovered,
|
|
6433
6433
|
as long as the box wrapper has an "as" prop equal to "button"
|
|
@@ -6439,7 +6439,6 @@ var _excluded$2 = ["activeStyles", "focusStyles", "hoverStyles", "disabledStyles
|
|
|
6439
6439
|
/* eslint-disable no-unused-vars */
|
|
6440
6440
|
var BoxWrapper = styled__default(function (_ref) {
|
|
6441
6441
|
var activeStyles = _ref.activeStyles,
|
|
6442
|
-
focusStyles = _ref.focusStyles,
|
|
6443
6442
|
hoverStyles = _ref.hoverStyles,
|
|
6444
6443
|
disabledStyles = _ref.disabledStyles,
|
|
6445
6444
|
extraStyles = _ref.extraStyles,
|
|
@@ -6508,9 +6507,8 @@ var BoxWrapper = styled__default(function (_ref) {
|
|
|
6508
6507
|
disabled = _ref14.disabled;
|
|
6509
6508
|
return styled.css(["", " ", ""], hoverStyles, as === "button" && !disabled ? "> * > span {\n ".concat(hoverStyles, "\n border: none;\n outline: none;\n box-shadow: none;\n }") : "");
|
|
6510
6509
|
}, function (_ref15) {
|
|
6511
|
-
var
|
|
6512
|
-
|
|
6513
|
-
return styled.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 }");
|
|
6510
|
+
var as = _ref15.as;
|
|
6511
|
+
return styled.css(["outline:3px solid ", ";outline-offset:2px;", ""], ROYAL_BLUE, as === "button" && "\n > * > span {\n border: none;\n outline: none;\n box-shadow: none;\n }");
|
|
6514
6512
|
}, function (_ref16) {
|
|
6515
6513
|
var activeStyles = _ref16.activeStyles,
|
|
6516
6514
|
as = _ref16.as;
|
|
@@ -6535,7 +6533,7 @@ var BoxWrapper = styled__default(function (_ref) {
|
|
|
6535
6533
|
});
|
|
6536
6534
|
/* eslint-enable no-unused-vars */
|
|
6537
6535
|
|
|
6538
|
-
var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "
|
|
6536
|
+
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"];
|
|
6539
6537
|
|
|
6540
6538
|
/*
|
|
6541
6539
|
Box component to create generic boxes
|
|
@@ -6568,7 +6566,6 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6568
6566
|
hoverStyles = _ref.hoverStyles,
|
|
6569
6567
|
activeStyles = _ref.activeStyles,
|
|
6570
6568
|
disabledStyles = _ref.disabledStyles,
|
|
6571
|
-
focusStyles = _ref.focusStyles,
|
|
6572
6569
|
variant = _ref.variant,
|
|
6573
6570
|
as = _ref.as,
|
|
6574
6571
|
onClick = _ref.onClick,
|
|
@@ -6604,7 +6601,6 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6604
6601
|
hoverStyles: hoverStyles,
|
|
6605
6602
|
activeStyles: activeStyles,
|
|
6606
6603
|
disabledStyles: disabledStyles,
|
|
6607
|
-
focusStyles: focusStyles,
|
|
6608
6604
|
variant: variant,
|
|
6609
6605
|
as: as,
|
|
6610
6606
|
onClick: onClick,
|
|
@@ -13589,7 +13585,8 @@ var SettingsIconSmall$1 = themeComponent(SettingsIconSmall, "Icons", fallbackVal
|
|
|
13589
13585
|
var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
13590
13586
|
var themeValues = _ref.themeValues,
|
|
13591
13587
|
_ref$iconIndex = _ref.iconIndex,
|
|
13592
|
-
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex
|
|
13588
|
+
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex,
|
|
13589
|
+
colorOverride = _ref.colorOverride;
|
|
13593
13590
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
13594
13591
|
width: "20",
|
|
13595
13592
|
height: "20",
|
|
@@ -13600,7 +13597,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13600
13597
|
fillRule: "evenodd",
|
|
13601
13598
|
clipRule: "evenodd",
|
|
13602
13599
|
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",
|
|
13603
|
-
fill: themeValues.singleIconColor
|
|
13600
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13604
13601
|
}), /*#__PURE__*/React__default.createElement("mask", {
|
|
13605
13602
|
id: "mask0_503_574-".concat(iconIndex),
|
|
13606
13603
|
style: {
|
|
@@ -13621,7 +13618,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13621
13618
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
13622
13619
|
width: "20",
|
|
13623
13620
|
height: "20",
|
|
13624
|
-
fill: themeValues.singleIconColor
|
|
13621
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13625
13622
|
})));
|
|
13626
13623
|
};
|
|
13627
13624
|
var WalletIconSmall$1 = themeComponent(WalletIconSmall, "Icons", fallbackValues$2, "primary");
|
|
@@ -19618,7 +19615,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19618
19615
|
}
|
|
19619
19616
|
|
|
19620
19617
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19621
|
-
|
|
19622
19618
|
/**
|
|
19623
19619
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19624
19620
|
* @private
|
|
@@ -19703,84 +19699,71 @@ var ERRORS = {
|
|
|
19703
19699
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19704
19700
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19705
19701
|
};
|
|
19702
|
+
|
|
19706
19703
|
/**
|
|
19707
19704
|
* super basic version of sprintf
|
|
19708
19705
|
* @private
|
|
19709
19706
|
*/
|
|
19710
|
-
|
|
19711
19707
|
function format() {
|
|
19712
19708
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19713
19709
|
args[_key] = arguments[_key];
|
|
19714
19710
|
}
|
|
19715
|
-
|
|
19716
19711
|
var a = args[0];
|
|
19717
19712
|
var b = [];
|
|
19718
19713
|
var c;
|
|
19719
|
-
|
|
19720
19714
|
for (c = 1; c < args.length; c += 1) {
|
|
19721
19715
|
b.push(args[c]);
|
|
19722
19716
|
}
|
|
19723
|
-
|
|
19724
19717
|
b.forEach(function (d) {
|
|
19725
19718
|
a = a.replace(/%[a-z]/, d);
|
|
19726
19719
|
});
|
|
19727
19720
|
return a;
|
|
19728
19721
|
}
|
|
19722
|
+
|
|
19729
19723
|
/**
|
|
19730
19724
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19731
19725
|
* in production mode.
|
|
19732
19726
|
* @private
|
|
19733
19727
|
*/
|
|
19734
|
-
|
|
19735
|
-
|
|
19736
19728
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19737
19729
|
_inheritsLoose(PolishedError, _Error);
|
|
19738
|
-
|
|
19739
19730
|
function PolishedError(code) {
|
|
19740
19731
|
var _this;
|
|
19741
|
-
|
|
19742
19732
|
if (process.env.NODE_ENV === 'production') {
|
|
19743
19733
|
_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;
|
|
19744
19734
|
} else {
|
|
19745
19735
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19746
19736
|
args[_key2 - 1] = arguments[_key2];
|
|
19747
19737
|
}
|
|
19748
|
-
|
|
19749
19738
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19750
19739
|
}
|
|
19751
|
-
|
|
19752
19740
|
return _assertThisInitialized(_this);
|
|
19753
19741
|
}
|
|
19754
|
-
|
|
19755
19742
|
return PolishedError;
|
|
19756
19743
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19757
19744
|
|
|
19758
19745
|
function colorToInt(color) {
|
|
19759
19746
|
return Math.round(color * 255);
|
|
19760
19747
|
}
|
|
19761
|
-
|
|
19762
19748
|
function convertToInt(red, green, blue) {
|
|
19763
19749
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19764
19750
|
}
|
|
19765
|
-
|
|
19766
19751
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19767
19752
|
if (convert === void 0) {
|
|
19768
19753
|
convert = convertToInt;
|
|
19769
19754
|
}
|
|
19770
|
-
|
|
19771
19755
|
if (saturation === 0) {
|
|
19772
19756
|
// achromatic
|
|
19773
19757
|
return convert(lightness, lightness, lightness);
|
|
19774
|
-
}
|
|
19775
|
-
|
|
19758
|
+
}
|
|
19776
19759
|
|
|
19760
|
+
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19777
19761
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19778
19762
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19779
19763
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19780
19764
|
var red = 0;
|
|
19781
19765
|
var green = 0;
|
|
19782
19766
|
var blue = 0;
|
|
19783
|
-
|
|
19784
19767
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19785
19768
|
red = chroma;
|
|
19786
19769
|
green = secondComponent;
|
|
@@ -19800,7 +19783,6 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19800
19783
|
red = chroma;
|
|
19801
19784
|
blue = secondComponent;
|
|
19802
19785
|
}
|
|
19803
|
-
|
|
19804
19786
|
var lightnessModification = lightness - chroma / 2;
|
|
19805
19787
|
var finalRed = red + lightnessModification;
|
|
19806
19788
|
var finalGreen = green + lightnessModification;
|
|
@@ -19958,11 +19940,11 @@ var namedColorMap = {
|
|
|
19958
19940
|
yellow: 'ff0',
|
|
19959
19941
|
yellowgreen: '9acd32'
|
|
19960
19942
|
};
|
|
19943
|
+
|
|
19961
19944
|
/**
|
|
19962
19945
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19963
19946
|
* @private
|
|
19964
19947
|
*/
|
|
19965
|
-
|
|
19966
19948
|
function nameToHex(color) {
|
|
19967
19949
|
if (typeof color !== 'string') return color;
|
|
19968
19950
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19977,6 +19959,7 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19977
19959
|
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
19978
19960
|
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;
|
|
19979
19961
|
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;
|
|
19962
|
+
|
|
19980
19963
|
/**
|
|
19981
19964
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19982
19965
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19988,14 +19971,11 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19988
19971
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
19989
19972
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
19990
19973
|
*/
|
|
19991
|
-
|
|
19992
19974
|
function parseToRgb(color) {
|
|
19993
19975
|
if (typeof color !== 'string') {
|
|
19994
19976
|
throw new PolishedError(3);
|
|
19995
19977
|
}
|
|
19996
|
-
|
|
19997
19978
|
var normalizedColor = nameToHex(color);
|
|
19998
|
-
|
|
19999
19979
|
if (normalizedColor.match(hexRegex)) {
|
|
20000
19980
|
return {
|
|
20001
19981
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -20003,7 +19983,6 @@ function parseToRgb(color) {
|
|
|
20003
19983
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
20004
19984
|
};
|
|
20005
19985
|
}
|
|
20006
|
-
|
|
20007
19986
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
20008
19987
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
20009
19988
|
return {
|
|
@@ -20013,7 +19992,6 @@ function parseToRgb(color) {
|
|
|
20013
19992
|
alpha: alpha
|
|
20014
19993
|
};
|
|
20015
19994
|
}
|
|
20016
|
-
|
|
20017
19995
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
20018
19996
|
return {
|
|
20019
19997
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -20021,10 +19999,8 @@ function parseToRgb(color) {
|
|
|
20021
19999
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
20022
20000
|
};
|
|
20023
20001
|
}
|
|
20024
|
-
|
|
20025
20002
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
20026
20003
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
20027
|
-
|
|
20028
20004
|
return {
|
|
20029
20005
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
20030
20006
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -20032,9 +20008,7 @@ function parseToRgb(color) {
|
|
|
20032
20008
|
alpha: _alpha
|
|
20033
20009
|
};
|
|
20034
20010
|
}
|
|
20035
|
-
|
|
20036
20011
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
20037
|
-
|
|
20038
20012
|
if (rgbMatched) {
|
|
20039
20013
|
return {
|
|
20040
20014
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -20042,9 +20016,7 @@ function parseToRgb(color) {
|
|
|
20042
20016
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
20043
20017
|
};
|
|
20044
20018
|
}
|
|
20045
|
-
|
|
20046
20019
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
20047
|
-
|
|
20048
20020
|
if (rgbaMatched) {
|
|
20049
20021
|
return {
|
|
20050
20022
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -20053,44 +20025,32 @@ function parseToRgb(color) {
|
|
|
20053
20025
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
20054
20026
|
};
|
|
20055
20027
|
}
|
|
20056
|
-
|
|
20057
20028
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
20058
|
-
|
|
20059
20029
|
if (hslMatched) {
|
|
20060
20030
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
20061
20031
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
20062
20032
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
20063
20033
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
20064
20034
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
20065
|
-
|
|
20066
20035
|
if (!hslRgbMatched) {
|
|
20067
20036
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
20068
20037
|
}
|
|
20069
|
-
|
|
20070
20038
|
return {
|
|
20071
20039
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
20072
20040
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
20073
20041
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
20074
20042
|
};
|
|
20075
20043
|
}
|
|
20076
|
-
|
|
20077
20044
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
20078
|
-
|
|
20079
20045
|
if (hslaMatched) {
|
|
20080
20046
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
20081
|
-
|
|
20082
20047
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
20083
|
-
|
|
20084
20048
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
20085
|
-
|
|
20086
20049
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
20087
|
-
|
|
20088
20050
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
20089
|
-
|
|
20090
20051
|
if (!_hslRgbMatched) {
|
|
20091
20052
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
20092
20053
|
}
|
|
20093
|
-
|
|
20094
20054
|
return {
|
|
20095
20055
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
20096
20056
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -20098,10 +20058,82 @@ function parseToRgb(color) {
|
|
|
20098
20058
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
20099
20059
|
};
|
|
20100
20060
|
}
|
|
20101
|
-
|
|
20102
20061
|
throw new PolishedError(5);
|
|
20103
20062
|
}
|
|
20104
20063
|
|
|
20064
|
+
function rgbToHsl(color) {
|
|
20065
|
+
// make sure rgb are contained in a set of [0, 255]
|
|
20066
|
+
var red = color.red / 255;
|
|
20067
|
+
var green = color.green / 255;
|
|
20068
|
+
var blue = color.blue / 255;
|
|
20069
|
+
var max = Math.max(red, green, blue);
|
|
20070
|
+
var min = Math.min(red, green, blue);
|
|
20071
|
+
var lightness = (max + min) / 2;
|
|
20072
|
+
if (max === min) {
|
|
20073
|
+
// achromatic
|
|
20074
|
+
if (color.alpha !== undefined) {
|
|
20075
|
+
return {
|
|
20076
|
+
hue: 0,
|
|
20077
|
+
saturation: 0,
|
|
20078
|
+
lightness: lightness,
|
|
20079
|
+
alpha: color.alpha
|
|
20080
|
+
};
|
|
20081
|
+
} else {
|
|
20082
|
+
return {
|
|
20083
|
+
hue: 0,
|
|
20084
|
+
saturation: 0,
|
|
20085
|
+
lightness: lightness
|
|
20086
|
+
};
|
|
20087
|
+
}
|
|
20088
|
+
}
|
|
20089
|
+
var hue;
|
|
20090
|
+
var delta = max - min;
|
|
20091
|
+
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
20092
|
+
switch (max) {
|
|
20093
|
+
case red:
|
|
20094
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
20095
|
+
break;
|
|
20096
|
+
case green:
|
|
20097
|
+
hue = (blue - red) / delta + 2;
|
|
20098
|
+
break;
|
|
20099
|
+
default:
|
|
20100
|
+
// blue case
|
|
20101
|
+
hue = (red - green) / delta + 4;
|
|
20102
|
+
break;
|
|
20103
|
+
}
|
|
20104
|
+
hue *= 60;
|
|
20105
|
+
if (color.alpha !== undefined) {
|
|
20106
|
+
return {
|
|
20107
|
+
hue: hue,
|
|
20108
|
+
saturation: saturation,
|
|
20109
|
+
lightness: lightness,
|
|
20110
|
+
alpha: color.alpha
|
|
20111
|
+
};
|
|
20112
|
+
}
|
|
20113
|
+
return {
|
|
20114
|
+
hue: hue,
|
|
20115
|
+
saturation: saturation,
|
|
20116
|
+
lightness: lightness
|
|
20117
|
+
};
|
|
20118
|
+
}
|
|
20119
|
+
|
|
20120
|
+
/**
|
|
20121
|
+
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
20122
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
20123
|
+
* can convert a HslColor or HslaColor object back to a string.
|
|
20124
|
+
*
|
|
20125
|
+
* @example
|
|
20126
|
+
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
20127
|
+
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
20128
|
+
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
20129
|
+
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
20130
|
+
*/
|
|
20131
|
+
function parseToHsl(color) {
|
|
20132
|
+
// Note: At a later stage we can optimize this function as right now a hsl
|
|
20133
|
+
// color would be parsed converted to rgb values and converted back to hsl.
|
|
20134
|
+
return rgbToHsl(parseToRgb(color));
|
|
20135
|
+
}
|
|
20136
|
+
|
|
20105
20137
|
/**
|
|
20106
20138
|
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
20107
20139
|
* @private
|
|
@@ -20110,10 +20142,8 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
20110
20142
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
20111
20143
|
return "#" + value[1] + value[3] + value[5];
|
|
20112
20144
|
}
|
|
20113
|
-
|
|
20114
20145
|
return value;
|
|
20115
20146
|
};
|
|
20116
|
-
|
|
20117
20147
|
var reduceHexValue$1 = reduceHexValue;
|
|
20118
20148
|
|
|
20119
20149
|
function numberToHex(value) {
|
|
@@ -20121,6 +20151,83 @@ function numberToHex(value) {
|
|
|
20121
20151
|
return hex.length === 1 ? "0" + hex : hex;
|
|
20122
20152
|
}
|
|
20123
20153
|
|
|
20154
|
+
function colorToHex(color) {
|
|
20155
|
+
return numberToHex(Math.round(color * 255));
|
|
20156
|
+
}
|
|
20157
|
+
function convertToHex(red, green, blue) {
|
|
20158
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
20159
|
+
}
|
|
20160
|
+
function hslToHex(hue, saturation, lightness) {
|
|
20161
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
20162
|
+
}
|
|
20163
|
+
|
|
20164
|
+
/**
|
|
20165
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20166
|
+
*
|
|
20167
|
+
* @example
|
|
20168
|
+
* // Styles as object usage
|
|
20169
|
+
* const styles = {
|
|
20170
|
+
* background: hsl(359, 0.75, 0.4),
|
|
20171
|
+
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
20172
|
+
* }
|
|
20173
|
+
*
|
|
20174
|
+
* // styled-components usage
|
|
20175
|
+
* const div = styled.div`
|
|
20176
|
+
* background: ${hsl(359, 0.75, 0.4)};
|
|
20177
|
+
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
20178
|
+
* `
|
|
20179
|
+
*
|
|
20180
|
+
* // CSS in JS Output
|
|
20181
|
+
*
|
|
20182
|
+
* element {
|
|
20183
|
+
* background: "#b3191c";
|
|
20184
|
+
* background: "#b3191c";
|
|
20185
|
+
* }
|
|
20186
|
+
*/
|
|
20187
|
+
function hsl(value, saturation, lightness) {
|
|
20188
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
|
20189
|
+
return hslToHex(value, saturation, lightness);
|
|
20190
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
20191
|
+
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
20192
|
+
}
|
|
20193
|
+
throw new PolishedError(1);
|
|
20194
|
+
}
|
|
20195
|
+
|
|
20196
|
+
/**
|
|
20197
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
20198
|
+
*
|
|
20199
|
+
* @example
|
|
20200
|
+
* // Styles as object usage
|
|
20201
|
+
* const styles = {
|
|
20202
|
+
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
20203
|
+
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
20204
|
+
* background: hsla(359, 0.75, 0.4, 1),
|
|
20205
|
+
* }
|
|
20206
|
+
*
|
|
20207
|
+
* // styled-components usage
|
|
20208
|
+
* const div = styled.div`
|
|
20209
|
+
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
20210
|
+
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
20211
|
+
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
20212
|
+
* `
|
|
20213
|
+
*
|
|
20214
|
+
* // CSS in JS Output
|
|
20215
|
+
*
|
|
20216
|
+
* element {
|
|
20217
|
+
* background: "rgba(179,25,28,0.7)";
|
|
20218
|
+
* background: "rgba(179,25,28,0.7)";
|
|
20219
|
+
* background: "#b3191c";
|
|
20220
|
+
* }
|
|
20221
|
+
*/
|
|
20222
|
+
function hsla$1(value, saturation, lightness, alpha) {
|
|
20223
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
|
|
20224
|
+
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
20225
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
20226
|
+
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
20227
|
+
}
|
|
20228
|
+
throw new PolishedError(2);
|
|
20229
|
+
}
|
|
20230
|
+
|
|
20124
20231
|
/**
|
|
20125
20232
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20126
20233
|
*
|
|
@@ -20150,7 +20257,6 @@ function rgb(value, green, blue) {
|
|
|
20150
20257
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
20151
20258
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
20152
20259
|
}
|
|
20153
|
-
|
|
20154
20260
|
throw new PolishedError(6);
|
|
20155
20261
|
}
|
|
20156
20262
|
|
|
@@ -20197,10 +20303,62 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
20197
20303
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
20198
20304
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
20199
20305
|
}
|
|
20200
|
-
|
|
20201
20306
|
throw new PolishedError(7);
|
|
20202
20307
|
}
|
|
20203
20308
|
|
|
20309
|
+
var isRgb = function isRgb(color) {
|
|
20310
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20311
|
+
};
|
|
20312
|
+
var isRgba$1 = function isRgba(color) {
|
|
20313
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
|
|
20314
|
+
};
|
|
20315
|
+
var isHsl = function isHsl(color) {
|
|
20316
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20317
|
+
};
|
|
20318
|
+
var isHsla$1 = function isHsla(color) {
|
|
20319
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
|
|
20320
|
+
};
|
|
20321
|
+
|
|
20322
|
+
/**
|
|
20323
|
+
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
20324
|
+
* This util is useful in case you only know on runtime which color object is
|
|
20325
|
+
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
20326
|
+
*
|
|
20327
|
+
* @example
|
|
20328
|
+
* // Styles as object usage
|
|
20329
|
+
* const styles = {
|
|
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
|
+
* // styled-components usage
|
|
20337
|
+
* const div = styled.div`
|
|
20338
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
20339
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
20340
|
+
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
20341
|
+
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
20342
|
+
* `
|
|
20343
|
+
*
|
|
20344
|
+
* // CSS in JS Output
|
|
20345
|
+
* element {
|
|
20346
|
+
* background: "#ffcd64";
|
|
20347
|
+
* background: "rgba(255,205,100,0.72)";
|
|
20348
|
+
* background: "#00f";
|
|
20349
|
+
* background: "rgba(179,25,25,0.72)";
|
|
20350
|
+
* }
|
|
20351
|
+
*/
|
|
20352
|
+
|
|
20353
|
+
function toColorString(color) {
|
|
20354
|
+
if (typeof color !== 'object') throw new PolishedError(8);
|
|
20355
|
+
if (isRgba$1(color)) return rgba$1(color);
|
|
20356
|
+
if (isRgb(color)) return rgb(color);
|
|
20357
|
+
if (isHsla$1(color)) return hsla$1(color);
|
|
20358
|
+
if (isHsl(color)) return hsl(color);
|
|
20359
|
+
throw new PolishedError(8);
|
|
20360
|
+
}
|
|
20361
|
+
|
|
20204
20362
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
20205
20363
|
// eslint-disable-next-line no-unused-vars
|
|
20206
20364
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -20211,14 +20369,156 @@ function curried(f, length, acc) {
|
|
|
20211
20369
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20212
20370
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
20213
20371
|
};
|
|
20214
|
-
}
|
|
20215
|
-
|
|
20372
|
+
}
|
|
20216
20373
|
|
|
20374
|
+
// eslint-disable-next-line no-redeclare
|
|
20217
20375
|
function curry(f) {
|
|
20218
20376
|
// eslint-disable-line no-redeclare
|
|
20219
20377
|
return curried(f, f.length, []);
|
|
20220
20378
|
}
|
|
20221
20379
|
|
|
20380
|
+
/**
|
|
20381
|
+
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
20382
|
+
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
20383
|
+
* the color wheel, always producing a positive hue value.
|
|
20384
|
+
*
|
|
20385
|
+
* @example
|
|
20386
|
+
* // Styles as object usage
|
|
20387
|
+
* const styles = {
|
|
20388
|
+
* background: adjustHue(180, '#448'),
|
|
20389
|
+
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
20390
|
+
* }
|
|
20391
|
+
*
|
|
20392
|
+
* // styled-components usage
|
|
20393
|
+
* const div = styled.div`
|
|
20394
|
+
* background: ${adjustHue(180, '#448')};
|
|
20395
|
+
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
20396
|
+
* `
|
|
20397
|
+
*
|
|
20398
|
+
* // CSS in JS Output
|
|
20399
|
+
* element {
|
|
20400
|
+
* background: "#888844";
|
|
20401
|
+
* background: "rgba(136,136,68,0.7)";
|
|
20402
|
+
* }
|
|
20403
|
+
*/
|
|
20404
|
+
function adjustHue(degree, color) {
|
|
20405
|
+
if (color === 'transparent') return color;
|
|
20406
|
+
var hslColor = parseToHsl(color);
|
|
20407
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20408
|
+
hue: hslColor.hue + parseFloat(degree)
|
|
20409
|
+
}));
|
|
20410
|
+
}
|
|
20411
|
+
|
|
20412
|
+
// prettier-ignore
|
|
20413
|
+
var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
|
|
20414
|
+
|
|
20415
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
20416
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
20417
|
+
}
|
|
20418
|
+
|
|
20419
|
+
/**
|
|
20420
|
+
* Returns a string value for the darkened color.
|
|
20421
|
+
*
|
|
20422
|
+
* @example
|
|
20423
|
+
* // Styles as object usage
|
|
20424
|
+
* const styles = {
|
|
20425
|
+
* background: darken(0.2, '#FFCD64'),
|
|
20426
|
+
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
20427
|
+
* }
|
|
20428
|
+
*
|
|
20429
|
+
* // styled-components usage
|
|
20430
|
+
* const div = styled.div`
|
|
20431
|
+
* background: ${darken(0.2, '#FFCD64')};
|
|
20432
|
+
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
20433
|
+
* `
|
|
20434
|
+
*
|
|
20435
|
+
* // CSS in JS Output
|
|
20436
|
+
*
|
|
20437
|
+
* element {
|
|
20438
|
+
* background: "#ffbd31";
|
|
20439
|
+
* background: "rgba(255,189,49,0.7)";
|
|
20440
|
+
* }
|
|
20441
|
+
*/
|
|
20442
|
+
function darken(amount, color) {
|
|
20443
|
+
if (color === 'transparent') return color;
|
|
20444
|
+
var hslColor = parseToHsl(color);
|
|
20445
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20446
|
+
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
20447
|
+
}));
|
|
20448
|
+
}
|
|
20449
|
+
|
|
20450
|
+
// prettier-ignore
|
|
20451
|
+
var curriedDarken = curry /* ::<number | string, string, string> */(darken);
|
|
20452
|
+
|
|
20453
|
+
/**
|
|
20454
|
+
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
20455
|
+
* argument of the desaturate function is the amount by how much the color
|
|
20456
|
+
* intensity should be decreased.
|
|
20457
|
+
*
|
|
20458
|
+
* @example
|
|
20459
|
+
* // Styles as object usage
|
|
20460
|
+
* const styles = {
|
|
20461
|
+
* background: desaturate(0.2, '#CCCD64'),
|
|
20462
|
+
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20463
|
+
* }
|
|
20464
|
+
*
|
|
20465
|
+
* // styled-components usage
|
|
20466
|
+
* const div = styled.div`
|
|
20467
|
+
* background: ${desaturate(0.2, '#CCCD64')};
|
|
20468
|
+
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20469
|
+
* `
|
|
20470
|
+
*
|
|
20471
|
+
* // CSS in JS Output
|
|
20472
|
+
* element {
|
|
20473
|
+
* background: "#b8b979";
|
|
20474
|
+
* background: "rgba(184,185,121,0.7)";
|
|
20475
|
+
* }
|
|
20476
|
+
*/
|
|
20477
|
+
function desaturate(amount, color) {
|
|
20478
|
+
if (color === 'transparent') return color;
|
|
20479
|
+
var hslColor = parseToHsl(color);
|
|
20480
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20481
|
+
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
20482
|
+
}));
|
|
20483
|
+
}
|
|
20484
|
+
|
|
20485
|
+
// prettier-ignore
|
|
20486
|
+
var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
|
|
20487
|
+
|
|
20488
|
+
/**
|
|
20489
|
+
* Returns a string value for the lightened color.
|
|
20490
|
+
*
|
|
20491
|
+
* @example
|
|
20492
|
+
* // Styles as object usage
|
|
20493
|
+
* const styles = {
|
|
20494
|
+
* background: lighten(0.2, '#CCCD64'),
|
|
20495
|
+
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
20496
|
+
* }
|
|
20497
|
+
*
|
|
20498
|
+
* // styled-components usage
|
|
20499
|
+
* const div = styled.div`
|
|
20500
|
+
* background: ${lighten(0.2, '#FFCD64')};
|
|
20501
|
+
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
20502
|
+
* `
|
|
20503
|
+
*
|
|
20504
|
+
* // CSS in JS Output
|
|
20505
|
+
*
|
|
20506
|
+
* element {
|
|
20507
|
+
* background: "#e5e6b1";
|
|
20508
|
+
* background: "rgba(229,230,177,0.7)";
|
|
20509
|
+
* }
|
|
20510
|
+
*/
|
|
20511
|
+
function lighten(amount, color) {
|
|
20512
|
+
if (color === 'transparent') return color;
|
|
20513
|
+
var hslColor = parseToHsl(color);
|
|
20514
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20515
|
+
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
20516
|
+
}));
|
|
20517
|
+
}
|
|
20518
|
+
|
|
20519
|
+
// prettier-ignore
|
|
20520
|
+
var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
20521
|
+
|
|
20222
20522
|
/**
|
|
20223
20523
|
* 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.
|
|
20224
20524
|
*
|
|
@@ -20245,25 +20545,21 @@ function curry(f) {
|
|
|
20245
20545
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
20246
20546
|
* }
|
|
20247
20547
|
*/
|
|
20248
|
-
|
|
20249
20548
|
function mix$1(weight, color, otherColor) {
|
|
20250
20549
|
if (color === 'transparent') return otherColor;
|
|
20251
20550
|
if (otherColor === 'transparent') return color;
|
|
20252
20551
|
if (weight === 0) return otherColor;
|
|
20253
20552
|
var parsedColor1 = parseToRgb(color);
|
|
20254
|
-
|
|
20255
20553
|
var color1 = _extends$1({}, parsedColor1, {
|
|
20256
20554
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20257
20555
|
});
|
|
20258
|
-
|
|
20259
20556
|
var parsedColor2 = parseToRgb(otherColor);
|
|
20260
|
-
|
|
20261
20557
|
var color2 = _extends$1({}, parsedColor2, {
|
|
20262
20558
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20263
|
-
});
|
|
20264
|
-
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20265
|
-
|
|
20559
|
+
});
|
|
20266
20560
|
|
|
20561
|
+
// The formula is copied from the original Sass implementation:
|
|
20562
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20267
20563
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
20268
20564
|
var x = parseFloat(weight) * 2 - 1;
|
|
20269
20565
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -20277,14 +20573,218 @@ function mix$1(weight, color, otherColor) {
|
|
|
20277
20573
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
20278
20574
|
};
|
|
20279
20575
|
return rgba$1(mixedColor);
|
|
20280
|
-
}
|
|
20281
|
-
|
|
20576
|
+
}
|
|
20282
20577
|
|
|
20283
|
-
|
|
20284
|
-
/* ::<number | string, string, string, string> */
|
|
20285
|
-
(mix$1);
|
|
20578
|
+
// prettier-ignore
|
|
20579
|
+
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
20286
20580
|
var mix$1$1 = curriedMix;
|
|
20287
20581
|
|
|
20582
|
+
/**
|
|
20583
|
+
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20584
|
+
*
|
|
20585
|
+
*
|
|
20586
|
+
* @example
|
|
20587
|
+
* // Styles as object usage
|
|
20588
|
+
* const styles = {
|
|
20589
|
+
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
20590
|
+
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
20591
|
+
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
20592
|
+
* }
|
|
20593
|
+
*
|
|
20594
|
+
* // styled-components usage
|
|
20595
|
+
* const div = styled.div`
|
|
20596
|
+
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
20597
|
+
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
20598
|
+
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
20599
|
+
* `
|
|
20600
|
+
*
|
|
20601
|
+
* // CSS in JS Output
|
|
20602
|
+
*
|
|
20603
|
+
* element {
|
|
20604
|
+
* background: "#fff";
|
|
20605
|
+
* background: "rgba(255,255,255,0.7)";
|
|
20606
|
+
* background: "rgba(255,0,0,0.7)";
|
|
20607
|
+
* }
|
|
20608
|
+
*/
|
|
20609
|
+
function opacify(amount, color) {
|
|
20610
|
+
if (color === 'transparent') return color;
|
|
20611
|
+
var parsedColor = parseToRgb(color);
|
|
20612
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20613
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20614
|
+
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
20615
|
+
});
|
|
20616
|
+
return rgba$1(colorWithAlpha);
|
|
20617
|
+
}
|
|
20618
|
+
|
|
20619
|
+
// prettier-ignore
|
|
20620
|
+
var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
|
|
20621
|
+
|
|
20622
|
+
/**
|
|
20623
|
+
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
20624
|
+
* argument of the saturate function is the amount by how much the color
|
|
20625
|
+
* intensity should be increased.
|
|
20626
|
+
*
|
|
20627
|
+
* @example
|
|
20628
|
+
* // Styles as object usage
|
|
20629
|
+
* const styles = {
|
|
20630
|
+
* background: saturate(0.2, '#CCCD64'),
|
|
20631
|
+
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20632
|
+
* }
|
|
20633
|
+
*
|
|
20634
|
+
* // styled-components usage
|
|
20635
|
+
* const div = styled.div`
|
|
20636
|
+
* background: ${saturate(0.2, '#FFCD64')};
|
|
20637
|
+
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20638
|
+
* `
|
|
20639
|
+
*
|
|
20640
|
+
* // CSS in JS Output
|
|
20641
|
+
*
|
|
20642
|
+
* element {
|
|
20643
|
+
* background: "#e0e250";
|
|
20644
|
+
* background: "rgba(224,226,80,0.7)";
|
|
20645
|
+
* }
|
|
20646
|
+
*/
|
|
20647
|
+
function saturate(amount, color) {
|
|
20648
|
+
if (color === 'transparent') return color;
|
|
20649
|
+
var hslColor = parseToHsl(color);
|
|
20650
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20651
|
+
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
20652
|
+
}));
|
|
20653
|
+
}
|
|
20654
|
+
|
|
20655
|
+
// prettier-ignore
|
|
20656
|
+
var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
|
|
20657
|
+
|
|
20658
|
+
/**
|
|
20659
|
+
* Sets the hue of a color to the provided value. The hue range can be
|
|
20660
|
+
* from 0 and 359.
|
|
20661
|
+
*
|
|
20662
|
+
* @example
|
|
20663
|
+
* // Styles as object usage
|
|
20664
|
+
* const styles = {
|
|
20665
|
+
* background: setHue(42, '#CCCD64'),
|
|
20666
|
+
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
20667
|
+
* }
|
|
20668
|
+
*
|
|
20669
|
+
* // styled-components usage
|
|
20670
|
+
* const div = styled.div`
|
|
20671
|
+
* background: ${setHue(42, '#CCCD64')};
|
|
20672
|
+
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
20673
|
+
* `
|
|
20674
|
+
*
|
|
20675
|
+
* // CSS in JS Output
|
|
20676
|
+
* element {
|
|
20677
|
+
* background: "#cdae64";
|
|
20678
|
+
* background: "rgba(107,100,205,0.7)";
|
|
20679
|
+
* }
|
|
20680
|
+
*/
|
|
20681
|
+
function setHue(hue, color) {
|
|
20682
|
+
if (color === 'transparent') return color;
|
|
20683
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20684
|
+
hue: parseFloat(hue)
|
|
20685
|
+
}));
|
|
20686
|
+
}
|
|
20687
|
+
|
|
20688
|
+
// prettier-ignore
|
|
20689
|
+
var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
|
|
20690
|
+
|
|
20691
|
+
/**
|
|
20692
|
+
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
20693
|
+
* from 0 and 1.
|
|
20694
|
+
*
|
|
20695
|
+
* @example
|
|
20696
|
+
* // Styles as object usage
|
|
20697
|
+
* const styles = {
|
|
20698
|
+
* background: setLightness(0.2, '#CCCD64'),
|
|
20699
|
+
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
20700
|
+
* }
|
|
20701
|
+
*
|
|
20702
|
+
* // styled-components usage
|
|
20703
|
+
* const div = styled.div`
|
|
20704
|
+
* background: ${setLightness(0.2, '#CCCD64')};
|
|
20705
|
+
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
20706
|
+
* `
|
|
20707
|
+
*
|
|
20708
|
+
* // CSS in JS Output
|
|
20709
|
+
* element {
|
|
20710
|
+
* background: "#4d4d19";
|
|
20711
|
+
* background: "rgba(223,224,159,0.7)";
|
|
20712
|
+
* }
|
|
20713
|
+
*/
|
|
20714
|
+
function setLightness(lightness, color) {
|
|
20715
|
+
if (color === 'transparent') return color;
|
|
20716
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20717
|
+
lightness: parseFloat(lightness)
|
|
20718
|
+
}));
|
|
20719
|
+
}
|
|
20720
|
+
|
|
20721
|
+
// prettier-ignore
|
|
20722
|
+
var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
|
|
20723
|
+
|
|
20724
|
+
/**
|
|
20725
|
+
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
20726
|
+
* from 0 and 1.
|
|
20727
|
+
*
|
|
20728
|
+
* @example
|
|
20729
|
+
* // Styles as object usage
|
|
20730
|
+
* const styles = {
|
|
20731
|
+
* background: setSaturation(0.2, '#CCCD64'),
|
|
20732
|
+
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
20733
|
+
* }
|
|
20734
|
+
*
|
|
20735
|
+
* // styled-components usage
|
|
20736
|
+
* const div = styled.div`
|
|
20737
|
+
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
20738
|
+
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
20739
|
+
* `
|
|
20740
|
+
*
|
|
20741
|
+
* // CSS in JS Output
|
|
20742
|
+
* element {
|
|
20743
|
+
* background: "#adad84";
|
|
20744
|
+
* background: "rgba(228,229,76,0.7)";
|
|
20745
|
+
* }
|
|
20746
|
+
*/
|
|
20747
|
+
function setSaturation(saturation, color) {
|
|
20748
|
+
if (color === 'transparent') return color;
|
|
20749
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20750
|
+
saturation: parseFloat(saturation)
|
|
20751
|
+
}));
|
|
20752
|
+
}
|
|
20753
|
+
|
|
20754
|
+
// prettier-ignore
|
|
20755
|
+
var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
|
|
20756
|
+
|
|
20757
|
+
/**
|
|
20758
|
+
* Shades a color by mixing it with black. `shade` can produce
|
|
20759
|
+
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
20760
|
+
* doesn't produce hue shifts.
|
|
20761
|
+
*
|
|
20762
|
+
* @example
|
|
20763
|
+
* // Styles as object usage
|
|
20764
|
+
* const styles = {
|
|
20765
|
+
* background: shade(0.25, '#00f')
|
|
20766
|
+
* }
|
|
20767
|
+
*
|
|
20768
|
+
* // styled-components usage
|
|
20769
|
+
* const div = styled.div`
|
|
20770
|
+
* background: ${shade(0.25, '#00f')};
|
|
20771
|
+
* `
|
|
20772
|
+
*
|
|
20773
|
+
* // CSS in JS Output
|
|
20774
|
+
*
|
|
20775
|
+
* element {
|
|
20776
|
+
* background: "#00003f";
|
|
20777
|
+
* }
|
|
20778
|
+
*/
|
|
20779
|
+
|
|
20780
|
+
function shade(percentage, color) {
|
|
20781
|
+
if (color === 'transparent') return color;
|
|
20782
|
+
return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
|
|
20783
|
+
}
|
|
20784
|
+
|
|
20785
|
+
// prettier-ignore
|
|
20786
|
+
var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
20787
|
+
|
|
20288
20788
|
/**
|
|
20289
20789
|
* Tints a color by mixing it with white. `tint` can produce
|
|
20290
20790
|
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
@@ -20311,14 +20811,52 @@ var mix$1$1 = curriedMix;
|
|
|
20311
20811
|
function tint(percentage, color) {
|
|
20312
20812
|
if (color === 'transparent') return color;
|
|
20313
20813
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20314
|
-
}
|
|
20315
|
-
|
|
20814
|
+
}
|
|
20316
20815
|
|
|
20317
|
-
|
|
20318
|
-
/* ::<number | string, string, string> */
|
|
20319
|
-
(tint);
|
|
20816
|
+
// prettier-ignore
|
|
20817
|
+
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20320
20818
|
var curriedTint$1 = curriedTint;
|
|
20321
20819
|
|
|
20820
|
+
/**
|
|
20821
|
+
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20822
|
+
*
|
|
20823
|
+
*
|
|
20824
|
+
* @example
|
|
20825
|
+
* // Styles as object usage
|
|
20826
|
+
* const styles = {
|
|
20827
|
+
* background: transparentize(0.1, '#fff'),
|
|
20828
|
+
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
20829
|
+
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
20830
|
+
* }
|
|
20831
|
+
*
|
|
20832
|
+
* // styled-components usage
|
|
20833
|
+
* const div = styled.div`
|
|
20834
|
+
* background: ${transparentize(0.1, '#fff')};
|
|
20835
|
+
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
20836
|
+
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
20837
|
+
* `
|
|
20838
|
+
*
|
|
20839
|
+
* // CSS in JS Output
|
|
20840
|
+
*
|
|
20841
|
+
* element {
|
|
20842
|
+
* background: "rgba(255,255,255,0.9)";
|
|
20843
|
+
* background: "rgba(255,255,255,0.8)";
|
|
20844
|
+
* background: "rgba(255,0,0,0.3)";
|
|
20845
|
+
* }
|
|
20846
|
+
*/
|
|
20847
|
+
function transparentize(amount, color) {
|
|
20848
|
+
if (color === 'transparent') return color;
|
|
20849
|
+
var parsedColor = parseToRgb(color);
|
|
20850
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20851
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20852
|
+
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
20853
|
+
});
|
|
20854
|
+
return rgba$1(colorWithAlpha);
|
|
20855
|
+
}
|
|
20856
|
+
|
|
20857
|
+
// prettier-ignore
|
|
20858
|
+
var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
|
|
20859
|
+
|
|
20322
20860
|
var linkColor = MATISSE_BLUE;
|
|
20323
20861
|
var fallbackValues$8 = {
|
|
20324
20862
|
linkColor: linkColor
|
|
@@ -23008,32 +23546,19 @@ var toIndexedObject = function (it) {
|
|
|
23008
23546
|
return indexedObject(requireObjectCoercible(it));
|
|
23009
23547
|
};
|
|
23010
23548
|
|
|
23011
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
23012
|
-
|
|
23013
23549
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23014
|
-
|
|
23015
|
-
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
23016
|
-
|
|
23017
|
-
var documentAll_1 = {
|
|
23018
|
-
all: documentAll,
|
|
23019
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
23020
|
-
};
|
|
23021
|
-
|
|
23022
|
-
var documentAll$1 = documentAll_1.all;
|
|
23550
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
23023
23551
|
|
|
23024
23552
|
// `IsCallable` abstract operation
|
|
23025
23553
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23026
|
-
|
|
23027
|
-
|
|
23554
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
23555
|
+
var isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
23556
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
23028
23557
|
} : function (argument) {
|
|
23029
23558
|
return typeof argument == 'function';
|
|
23030
23559
|
};
|
|
23031
23560
|
|
|
23032
|
-
var
|
|
23033
|
-
|
|
23034
|
-
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
23035
|
-
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
23036
|
-
} : function (it) {
|
|
23561
|
+
var isObject = function (it) {
|
|
23037
23562
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23038
23563
|
};
|
|
23039
23564
|
|
|
@@ -23169,10 +23694,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
23169
23694
|
(module.exports = function (key, value) {
|
|
23170
23695
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
23171
23696
|
})('versions', []).push({
|
|
23172
|
-
version: '3.
|
|
23697
|
+
version: '3.35.1',
|
|
23173
23698
|
mode: 'global',
|
|
23174
|
-
copyright: '© 2014-
|
|
23175
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
23699
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
23700
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
|
|
23176
23701
|
source: 'https://github.com/zloirock/core-js'
|
|
23177
23702
|
});
|
|
23178
23703
|
});
|
|
@@ -23469,7 +23994,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23469
23994
|
|
|
23470
23995
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23471
23996
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23472
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23997
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
23473
23998
|
}
|
|
23474
23999
|
if (options && options.getter) name = 'get ' + name;
|
|
23475
24000
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23557,7 +24082,8 @@ var min$1 = Math.min;
|
|
|
23557
24082
|
// `ToLength` abstract operation
|
|
23558
24083
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23559
24084
|
var toLength = function (argument) {
|
|
23560
|
-
|
|
24085
|
+
var len = toIntegerOrInfinity(argument);
|
|
24086
|
+
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23561
24087
|
};
|
|
23562
24088
|
|
|
23563
24089
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23717,7 +24243,7 @@ var _export = function (options, source) {
|
|
|
23717
24243
|
} else if (STATIC) {
|
|
23718
24244
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23719
24245
|
} else {
|
|
23720
|
-
target =
|
|
24246
|
+
target = global_1[TARGET] && global_1[TARGET].prototype;
|
|
23721
24247
|
}
|
|
23722
24248
|
if (target) for (key in source) {
|
|
23723
24249
|
sourceProperty = source[key];
|
|
@@ -23980,11 +24506,15 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
23980
24506
|
} catch (error) { /* empty */ }
|
|
23981
24507
|
};
|
|
23982
24508
|
|
|
24509
|
+
var isPossiblePrototype = function (argument) {
|
|
24510
|
+
return isObject(argument) || argument === null;
|
|
24511
|
+
};
|
|
24512
|
+
|
|
23983
24513
|
var $String$4 = String;
|
|
23984
24514
|
var $TypeError$6 = TypeError;
|
|
23985
24515
|
|
|
23986
24516
|
var aPossiblePrototype = function (argument) {
|
|
23987
|
-
if (
|
|
24517
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
23988
24518
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23989
24519
|
};
|
|
23990
24520
|
|
|
@@ -27585,11 +28115,7 @@ var renderContent = function renderContent(_ref2) {
|
|
|
27585
28115
|
padding: "0",
|
|
27586
28116
|
minHeight: "100%",
|
|
27587
28117
|
extraStyles: "cursor: pointer;",
|
|
27588
|
-
dataQa: dataQa
|
|
27589
|
-
tabIndex: "0",
|
|
27590
|
-
onKeyPress: function onKeyPress(e) {
|
|
27591
|
-
return e.key === "Enter" && action();
|
|
27592
|
-
}
|
|
28118
|
+
dataQa: dataQa
|
|
27593
28119
|
}, children);
|
|
27594
28120
|
};
|
|
27595
28121
|
var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref3) {
|
|
@@ -27624,7 +28150,6 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27624
28150
|
_ref4$isDisabled = _ref4.isDisabled,
|
|
27625
28151
|
isDisabled = _ref4$isDisabled === void 0 ? false : _ref4$isDisabled,
|
|
27626
28152
|
dataQa = _ref4.dataQa;
|
|
27627
|
-
var borderColor = isDisabled ? MANATEE_GREY : themeValues.color;
|
|
27628
28153
|
return /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
|
|
27629
28154
|
isLink: isLink,
|
|
27630
28155
|
action: action,
|
|
@@ -27637,14 +28162,16 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27637
28162
|
border: "none",
|
|
27638
28163
|
minHeight: themeValues.height,
|
|
27639
28164
|
hiddenStyles: !visible,
|
|
27640
|
-
extraStyles: "\n
|
|
27641
|
-
hoverStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.9, themeValues.color), ";")
|
|
27642
|
-
focusStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.9, themeValues.color), ";"),
|
|
27643
|
-
activeStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.8, themeValues.color), "; ").concat(!isDisabled && "background-image:none; border: 2px solid ".concat(borderColor, ";}"))
|
|
28165
|
+
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;"),
|
|
28166
|
+
hoverStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : variant === "large" ? GRECIAN_GREY : curriedTint$1(0.9, themeValues.color), ";")
|
|
27644
28167
|
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
27645
28168
|
maxWidth: "300px"
|
|
27646
28169
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
27647
|
-
padding: "0"
|
|
28170
|
+
padding: "0",
|
|
28171
|
+
tabIndex: "0",
|
|
28172
|
+
onKeyPress: function onKeyPress(e) {
|
|
28173
|
+
return isDisabled ? noop : e.key === "Enter" && action();
|
|
28174
|
+
}
|
|
27648
28175
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
27649
28176
|
justify: "center",
|
|
27650
28177
|
align: "center",
|
|
@@ -27655,7 +28182,7 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27655
28182
|
}, variant === "large" && /*#__PURE__*/React__default.createElement("div", null), /*#__PURE__*/React__default.createElement(Box, {
|
|
27656
28183
|
padding: "0",
|
|
27657
28184
|
"aria-disabled": isDisabled,
|
|
27658
|
-
extraStyles: ".fill { \n fill: ".concat(isDisabled ? MANATEE_GREY : themeValues.color, "; \n } .stroke { \n stroke: ").concat(isDisabled ? MANATEE_GREY : themeValues.color, "; \n } ")
|
|
28185
|
+
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 } ")
|
|
27659
28186
|
}, variant === "large" ? /*#__PURE__*/React__default.createElement(Center, {
|
|
27660
28187
|
intrinsic: true
|
|
27661
28188
|
}, getLargeIcon(largeIcon, isDisabled), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -27669,8 +28196,9 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27669
28196
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
27670
28197
|
justify: "center",
|
|
27671
28198
|
align: "center"
|
|
27672
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
27673
|
-
|
|
28199
|
+
}, /*#__PURE__*/React__default.createElement(IconAdd, {
|
|
28200
|
+
fill: isDisabled ? MANATEE_GREY : WHITE,
|
|
28201
|
+
strokeWidth: "2"
|
|
27674
28202
|
}), /*#__PURE__*/React__default.createElement(Center, {
|
|
27675
28203
|
intrinsic: true
|
|
27676
28204
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -39119,7 +39647,9 @@ var Module = function Module(_ref) {
|
|
|
39119
39647
|
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
39120
39648
|
fontSize = _ref.fontSize,
|
|
39121
39649
|
themeValues = _ref.themeValues,
|
|
39122
|
-
children = _ref.children
|
|
39650
|
+
children = _ref.children,
|
|
39651
|
+
_ref$allowContentOver = _ref.allowContentOverflow,
|
|
39652
|
+
allowContentOverflow = _ref$allowContentOver === void 0 ? false : _ref$allowContentOver;
|
|
39123
39653
|
var themedFontSize = variant === "small" ? "1.25rem" : variant === "default" ? "1.375rem" : "2rem";
|
|
39124
39654
|
var computedFontSize = fontSize || themedFontSize;
|
|
39125
39655
|
var themedElemType = variant === "small" ? "h6" : variant === "default" ? "h5" : "h2";
|
|
@@ -39142,6 +39672,7 @@ var Module = function Module(_ref) {
|
|
|
39142
39672
|
}, heading && !rightTitleContent && headingText, heading && rightTitleContent && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39143
39673
|
justify: "space-between",
|
|
39144
39674
|
align: "center",
|
|
39675
|
+
overflow: allowContentOverflow,
|
|
39145
39676
|
nowrap: true
|
|
39146
39677
|
}, headingText, rightTitleContent), /*#__PURE__*/React__default.createElement(Box, {
|
|
39147
39678
|
padding: "0 0 ".concat(spacingBottom),
|
|
@@ -48391,9 +48922,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48391
48922
|
justify: "space-between",
|
|
48392
48923
|
align: "center"
|
|
48393
48924
|
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
48394
|
-
weight:
|
|
48925
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48395
48926
|
as: "h2",
|
|
48396
|
-
extraStyles: "font-size: 1.
|
|
48927
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48397
48928
|
id: "payment-details-title"
|
|
48398
48929
|
}, titleText), /*#__PURE__*/React__default.createElement(Title$1, {
|
|
48399
48930
|
weight: FONT_WEIGHT_BOLD,
|
|
@@ -48401,9 +48932,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48401
48932
|
extraStyles: "font-size: 1.375rem;"
|
|
48402
48933
|
}, displayCurrency(total)))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
48403
48934
|
as: "h2",
|
|
48404
|
-
weight:
|
|
48935
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48405
48936
|
margin: "1rem 0 0 0",
|
|
48406
|
-
extraStyles: "font-size: 1.
|
|
48937
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48407
48938
|
id: "payment-details-title"
|
|
48408
48939
|
}, titleText), agencySubheading);
|
|
48409
48940
|
return isCollapsible ? /*#__PURE__*/React__default.createElement(Collapsible, {
|