@thecb/components 10.6.2-beta.6 → 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 +649 -113
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +649 -113
- 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/placeholder/Placeholder.js +126 -88
- 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
|
@@ -13577,7 +13577,8 @@ var SettingsIconSmall$1 = themeComponent(SettingsIconSmall, "Icons", fallbackVal
|
|
|
13577
13577
|
var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
13578
13578
|
var themeValues = _ref.themeValues,
|
|
13579
13579
|
_ref$iconIndex = _ref.iconIndex,
|
|
13580
|
-
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex
|
|
13580
|
+
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex,
|
|
13581
|
+
colorOverride = _ref.colorOverride;
|
|
13581
13582
|
return /*#__PURE__*/React.createElement("svg", {
|
|
13582
13583
|
width: "20",
|
|
13583
13584
|
height: "20",
|
|
@@ -13588,7 +13589,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13588
13589
|
fillRule: "evenodd",
|
|
13589
13590
|
clipRule: "evenodd",
|
|
13590
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",
|
|
13591
|
-
fill: themeValues.singleIconColor
|
|
13592
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13592
13593
|
}), /*#__PURE__*/React.createElement("mask", {
|
|
13593
13594
|
id: "mask0_503_574-".concat(iconIndex),
|
|
13594
13595
|
style: {
|
|
@@ -13609,7 +13610,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13609
13610
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
13610
13611
|
width: "20",
|
|
13611
13612
|
height: "20",
|
|
13612
|
-
fill: themeValues.singleIconColor
|
|
13613
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13613
13614
|
})));
|
|
13614
13615
|
};
|
|
13615
13616
|
var WalletIconSmall$1 = themeComponent(WalletIconSmall, "Icons", fallbackValues$2, "primary");
|
|
@@ -19606,7 +19607,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19606
19607
|
}
|
|
19607
19608
|
|
|
19608
19609
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19609
|
-
|
|
19610
19610
|
/**
|
|
19611
19611
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19612
19612
|
* @private
|
|
@@ -19691,84 +19691,71 @@ var ERRORS = {
|
|
|
19691
19691
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19692
19692
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19693
19693
|
};
|
|
19694
|
+
|
|
19694
19695
|
/**
|
|
19695
19696
|
* super basic version of sprintf
|
|
19696
19697
|
* @private
|
|
19697
19698
|
*/
|
|
19698
|
-
|
|
19699
19699
|
function format() {
|
|
19700
19700
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19701
19701
|
args[_key] = arguments[_key];
|
|
19702
19702
|
}
|
|
19703
|
-
|
|
19704
19703
|
var a = args[0];
|
|
19705
19704
|
var b = [];
|
|
19706
19705
|
var c;
|
|
19707
|
-
|
|
19708
19706
|
for (c = 1; c < args.length; c += 1) {
|
|
19709
19707
|
b.push(args[c]);
|
|
19710
19708
|
}
|
|
19711
|
-
|
|
19712
19709
|
b.forEach(function (d) {
|
|
19713
19710
|
a = a.replace(/%[a-z]/, d);
|
|
19714
19711
|
});
|
|
19715
19712
|
return a;
|
|
19716
19713
|
}
|
|
19714
|
+
|
|
19717
19715
|
/**
|
|
19718
19716
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19719
19717
|
* in production mode.
|
|
19720
19718
|
* @private
|
|
19721
19719
|
*/
|
|
19722
|
-
|
|
19723
|
-
|
|
19724
19720
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19725
19721
|
_inheritsLoose(PolishedError, _Error);
|
|
19726
|
-
|
|
19727
19722
|
function PolishedError(code) {
|
|
19728
19723
|
var _this;
|
|
19729
|
-
|
|
19730
19724
|
if (process.env.NODE_ENV === 'production') {
|
|
19731
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;
|
|
19732
19726
|
} else {
|
|
19733
19727
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19734
19728
|
args[_key2 - 1] = arguments[_key2];
|
|
19735
19729
|
}
|
|
19736
|
-
|
|
19737
19730
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19738
19731
|
}
|
|
19739
|
-
|
|
19740
19732
|
return _assertThisInitialized(_this);
|
|
19741
19733
|
}
|
|
19742
|
-
|
|
19743
19734
|
return PolishedError;
|
|
19744
19735
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19745
19736
|
|
|
19746
19737
|
function colorToInt(color) {
|
|
19747
19738
|
return Math.round(color * 255);
|
|
19748
19739
|
}
|
|
19749
|
-
|
|
19750
19740
|
function convertToInt(red, green, blue) {
|
|
19751
19741
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19752
19742
|
}
|
|
19753
|
-
|
|
19754
19743
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19755
19744
|
if (convert === void 0) {
|
|
19756
19745
|
convert = convertToInt;
|
|
19757
19746
|
}
|
|
19758
|
-
|
|
19759
19747
|
if (saturation === 0) {
|
|
19760
19748
|
// achromatic
|
|
19761
19749
|
return convert(lightness, lightness, lightness);
|
|
19762
|
-
}
|
|
19763
|
-
|
|
19750
|
+
}
|
|
19764
19751
|
|
|
19752
|
+
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19765
19753
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19766
19754
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19767
19755
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19768
19756
|
var red = 0;
|
|
19769
19757
|
var green = 0;
|
|
19770
19758
|
var blue = 0;
|
|
19771
|
-
|
|
19772
19759
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19773
19760
|
red = chroma;
|
|
19774
19761
|
green = secondComponent;
|
|
@@ -19788,7 +19775,6 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19788
19775
|
red = chroma;
|
|
19789
19776
|
blue = secondComponent;
|
|
19790
19777
|
}
|
|
19791
|
-
|
|
19792
19778
|
var lightnessModification = lightness - chroma / 2;
|
|
19793
19779
|
var finalRed = red + lightnessModification;
|
|
19794
19780
|
var finalGreen = green + lightnessModification;
|
|
@@ -19946,11 +19932,11 @@ var namedColorMap = {
|
|
|
19946
19932
|
yellow: 'ff0',
|
|
19947
19933
|
yellowgreen: '9acd32'
|
|
19948
19934
|
};
|
|
19935
|
+
|
|
19949
19936
|
/**
|
|
19950
19937
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19951
19938
|
* @private
|
|
19952
19939
|
*/
|
|
19953
|
-
|
|
19954
19940
|
function nameToHex(color) {
|
|
19955
19941
|
if (typeof color !== 'string') return color;
|
|
19956
19942
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19965,6 +19951,7 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19965
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;
|
|
19966
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;
|
|
19967
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
|
+
|
|
19968
19955
|
/**
|
|
19969
19956
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19970
19957
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19976,14 +19963,11 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19976
19963
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
19977
19964
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
19978
19965
|
*/
|
|
19979
|
-
|
|
19980
19966
|
function parseToRgb(color) {
|
|
19981
19967
|
if (typeof color !== 'string') {
|
|
19982
19968
|
throw new PolishedError(3);
|
|
19983
19969
|
}
|
|
19984
|
-
|
|
19985
19970
|
var normalizedColor = nameToHex(color);
|
|
19986
|
-
|
|
19987
19971
|
if (normalizedColor.match(hexRegex)) {
|
|
19988
19972
|
return {
|
|
19989
19973
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -19991,7 +19975,6 @@ function parseToRgb(color) {
|
|
|
19991
19975
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
19992
19976
|
};
|
|
19993
19977
|
}
|
|
19994
|
-
|
|
19995
19978
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
19996
19979
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
19997
19980
|
return {
|
|
@@ -20001,7 +19984,6 @@ function parseToRgb(color) {
|
|
|
20001
19984
|
alpha: alpha
|
|
20002
19985
|
};
|
|
20003
19986
|
}
|
|
20004
|
-
|
|
20005
19987
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
20006
19988
|
return {
|
|
20007
19989
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -20009,10 +19991,8 @@ function parseToRgb(color) {
|
|
|
20009
19991
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
20010
19992
|
};
|
|
20011
19993
|
}
|
|
20012
|
-
|
|
20013
19994
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
20014
19995
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
20015
|
-
|
|
20016
19996
|
return {
|
|
20017
19997
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
20018
19998
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -20020,9 +20000,7 @@ function parseToRgb(color) {
|
|
|
20020
20000
|
alpha: _alpha
|
|
20021
20001
|
};
|
|
20022
20002
|
}
|
|
20023
|
-
|
|
20024
20003
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
20025
|
-
|
|
20026
20004
|
if (rgbMatched) {
|
|
20027
20005
|
return {
|
|
20028
20006
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -20030,9 +20008,7 @@ function parseToRgb(color) {
|
|
|
20030
20008
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
20031
20009
|
};
|
|
20032
20010
|
}
|
|
20033
|
-
|
|
20034
20011
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
20035
|
-
|
|
20036
20012
|
if (rgbaMatched) {
|
|
20037
20013
|
return {
|
|
20038
20014
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -20041,44 +20017,32 @@ function parseToRgb(color) {
|
|
|
20041
20017
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
20042
20018
|
};
|
|
20043
20019
|
}
|
|
20044
|
-
|
|
20045
20020
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
20046
|
-
|
|
20047
20021
|
if (hslMatched) {
|
|
20048
20022
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
20049
20023
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
20050
20024
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
20051
20025
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
20052
20026
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
20053
|
-
|
|
20054
20027
|
if (!hslRgbMatched) {
|
|
20055
20028
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
20056
20029
|
}
|
|
20057
|
-
|
|
20058
20030
|
return {
|
|
20059
20031
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
20060
20032
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
20061
20033
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
20062
20034
|
};
|
|
20063
20035
|
}
|
|
20064
|
-
|
|
20065
20036
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
20066
|
-
|
|
20067
20037
|
if (hslaMatched) {
|
|
20068
20038
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
20069
|
-
|
|
20070
20039
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
20071
|
-
|
|
20072
20040
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
20073
|
-
|
|
20074
20041
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
20075
|
-
|
|
20076
20042
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
20077
|
-
|
|
20078
20043
|
if (!_hslRgbMatched) {
|
|
20079
20044
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
20080
20045
|
}
|
|
20081
|
-
|
|
20082
20046
|
return {
|
|
20083
20047
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
20084
20048
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -20086,10 +20050,82 @@ function parseToRgb(color) {
|
|
|
20086
20050
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
20087
20051
|
};
|
|
20088
20052
|
}
|
|
20089
|
-
|
|
20090
20053
|
throw new PolishedError(5);
|
|
20091
20054
|
}
|
|
20092
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
|
+
|
|
20093
20129
|
/**
|
|
20094
20130
|
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
20095
20131
|
* @private
|
|
@@ -20098,10 +20134,8 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
20098
20134
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
20099
20135
|
return "#" + value[1] + value[3] + value[5];
|
|
20100
20136
|
}
|
|
20101
|
-
|
|
20102
20137
|
return value;
|
|
20103
20138
|
};
|
|
20104
|
-
|
|
20105
20139
|
var reduceHexValue$1 = reduceHexValue;
|
|
20106
20140
|
|
|
20107
20141
|
function numberToHex(value) {
|
|
@@ -20109,6 +20143,83 @@ function numberToHex(value) {
|
|
|
20109
20143
|
return hex.length === 1 ? "0" + hex : hex;
|
|
20110
20144
|
}
|
|
20111
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
|
+
|
|
20112
20223
|
/**
|
|
20113
20224
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20114
20225
|
*
|
|
@@ -20138,7 +20249,6 @@ function rgb(value, green, blue) {
|
|
|
20138
20249
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
20139
20250
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
20140
20251
|
}
|
|
20141
|
-
|
|
20142
20252
|
throw new PolishedError(6);
|
|
20143
20253
|
}
|
|
20144
20254
|
|
|
@@ -20185,10 +20295,62 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
20185
20295
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
20186
20296
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
20187
20297
|
}
|
|
20188
|
-
|
|
20189
20298
|
throw new PolishedError(7);
|
|
20190
20299
|
}
|
|
20191
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
|
+
|
|
20192
20354
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
20193
20355
|
// eslint-disable-next-line no-unused-vars
|
|
20194
20356
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -20199,14 +20361,156 @@ function curried(f, length, acc) {
|
|
|
20199
20361
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20200
20362
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
20201
20363
|
};
|
|
20202
|
-
}
|
|
20203
|
-
|
|
20364
|
+
}
|
|
20204
20365
|
|
|
20366
|
+
// eslint-disable-next-line no-redeclare
|
|
20205
20367
|
function curry(f) {
|
|
20206
20368
|
// eslint-disable-line no-redeclare
|
|
20207
20369
|
return curried(f, f.length, []);
|
|
20208
20370
|
}
|
|
20209
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
|
+
|
|
20210
20514
|
/**
|
|
20211
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.
|
|
20212
20516
|
*
|
|
@@ -20233,25 +20537,21 @@ function curry(f) {
|
|
|
20233
20537
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
20234
20538
|
* }
|
|
20235
20539
|
*/
|
|
20236
|
-
|
|
20237
20540
|
function mix$1(weight, color, otherColor) {
|
|
20238
20541
|
if (color === 'transparent') return otherColor;
|
|
20239
20542
|
if (otherColor === 'transparent') return color;
|
|
20240
20543
|
if (weight === 0) return otherColor;
|
|
20241
20544
|
var parsedColor1 = parseToRgb(color);
|
|
20242
|
-
|
|
20243
20545
|
var color1 = _extends$1({}, parsedColor1, {
|
|
20244
20546
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20245
20547
|
});
|
|
20246
|
-
|
|
20247
20548
|
var parsedColor2 = parseToRgb(otherColor);
|
|
20248
|
-
|
|
20249
20549
|
var color2 = _extends$1({}, parsedColor2, {
|
|
20250
20550
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20251
|
-
});
|
|
20252
|
-
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20253
|
-
|
|
20551
|
+
});
|
|
20254
20552
|
|
|
20553
|
+
// The formula is copied from the original Sass implementation:
|
|
20554
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20255
20555
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
20256
20556
|
var x = parseFloat(weight) * 2 - 1;
|
|
20257
20557
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -20265,14 +20565,218 @@ function mix$1(weight, color, otherColor) {
|
|
|
20265
20565
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
20266
20566
|
};
|
|
20267
20567
|
return rgba$1(mixedColor);
|
|
20268
|
-
}
|
|
20269
|
-
|
|
20568
|
+
}
|
|
20270
20569
|
|
|
20271
|
-
|
|
20272
|
-
/* ::<number | string, string, string, string> */
|
|
20273
|
-
(mix$1);
|
|
20570
|
+
// prettier-ignore
|
|
20571
|
+
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
20274
20572
|
var mix$1$1 = curriedMix;
|
|
20275
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
|
+
|
|
20276
20780
|
/**
|
|
20277
20781
|
* Tints a color by mixing it with white. `tint` can produce
|
|
20278
20782
|
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
@@ -20299,14 +20803,52 @@ var mix$1$1 = curriedMix;
|
|
|
20299
20803
|
function tint(percentage, color) {
|
|
20300
20804
|
if (color === 'transparent') return color;
|
|
20301
20805
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20302
|
-
}
|
|
20303
|
-
|
|
20806
|
+
}
|
|
20304
20807
|
|
|
20305
|
-
|
|
20306
|
-
/* ::<number | string, string, string> */
|
|
20307
|
-
(tint);
|
|
20808
|
+
// prettier-ignore
|
|
20809
|
+
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20308
20810
|
var curriedTint$1 = curriedTint;
|
|
20309
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
|
+
|
|
20310
20852
|
var linkColor = MATISSE_BLUE;
|
|
20311
20853
|
var fallbackValues$8 = {
|
|
20312
20854
|
linkColor: linkColor
|
|
@@ -22996,32 +23538,19 @@ var toIndexedObject = function (it) {
|
|
|
22996
23538
|
return indexedObject(requireObjectCoercible(it));
|
|
22997
23539
|
};
|
|
22998
23540
|
|
|
22999
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
23000
|
-
|
|
23001
23541
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23002
|
-
|
|
23003
|
-
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
23004
|
-
|
|
23005
|
-
var documentAll_1 = {
|
|
23006
|
-
all: documentAll,
|
|
23007
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
23008
|
-
};
|
|
23009
|
-
|
|
23010
|
-
var documentAll$1 = documentAll_1.all;
|
|
23542
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
23011
23543
|
|
|
23012
23544
|
// `IsCallable` abstract operation
|
|
23013
23545
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23014
|
-
|
|
23015
|
-
|
|
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;
|
|
23016
23549
|
} : function (argument) {
|
|
23017
23550
|
return typeof argument == 'function';
|
|
23018
23551
|
};
|
|
23019
23552
|
|
|
23020
|
-
var
|
|
23021
|
-
|
|
23022
|
-
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
23023
|
-
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
23024
|
-
} : function (it) {
|
|
23553
|
+
var isObject = function (it) {
|
|
23025
23554
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23026
23555
|
};
|
|
23027
23556
|
|
|
@@ -23157,10 +23686,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
23157
23686
|
(module.exports = function (key, value) {
|
|
23158
23687
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
23159
23688
|
})('versions', []).push({
|
|
23160
|
-
version: '3.
|
|
23689
|
+
version: '3.35.1',
|
|
23161
23690
|
mode: 'global',
|
|
23162
|
-
copyright: '© 2014-
|
|
23163
|
-
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',
|
|
23164
23693
|
source: 'https://github.com/zloirock/core-js'
|
|
23165
23694
|
});
|
|
23166
23695
|
});
|
|
@@ -23457,7 +23986,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23457
23986
|
|
|
23458
23987
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23459
23988
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23460
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23989
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
23461
23990
|
}
|
|
23462
23991
|
if (options && options.getter) name = 'get ' + name;
|
|
23463
23992
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23545,7 +24074,8 @@ var min$1 = Math.min;
|
|
|
23545
24074
|
// `ToLength` abstract operation
|
|
23546
24075
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23547
24076
|
var toLength = function (argument) {
|
|
23548
|
-
|
|
24077
|
+
var len = toIntegerOrInfinity(argument);
|
|
24078
|
+
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23549
24079
|
};
|
|
23550
24080
|
|
|
23551
24081
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23705,7 +24235,7 @@ var _export = function (options, source) {
|
|
|
23705
24235
|
} else if (STATIC) {
|
|
23706
24236
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23707
24237
|
} else {
|
|
23708
|
-
target =
|
|
24238
|
+
target = global_1[TARGET] && global_1[TARGET].prototype;
|
|
23709
24239
|
}
|
|
23710
24240
|
if (target) for (key in source) {
|
|
23711
24241
|
sourceProperty = source[key];
|
|
@@ -23968,11 +24498,15 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
23968
24498
|
} catch (error) { /* empty */ }
|
|
23969
24499
|
};
|
|
23970
24500
|
|
|
24501
|
+
var isPossiblePrototype = function (argument) {
|
|
24502
|
+
return isObject(argument) || argument === null;
|
|
24503
|
+
};
|
|
24504
|
+
|
|
23971
24505
|
var $String$4 = String;
|
|
23972
24506
|
var $TypeError$6 = TypeError;
|
|
23973
24507
|
|
|
23974
24508
|
var aPossiblePrototype = function (argument) {
|
|
23975
|
-
if (
|
|
24509
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
23976
24510
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23977
24511
|
};
|
|
23978
24512
|
|
|
@@ -27573,11 +28107,7 @@ var renderContent = function renderContent(_ref2) {
|
|
|
27573
28107
|
padding: "0",
|
|
27574
28108
|
minHeight: "100%",
|
|
27575
28109
|
extraStyles: "cursor: pointer;",
|
|
27576
|
-
dataQa: dataQa
|
|
27577
|
-
tabIndex: "0",
|
|
27578
|
-
onKeyPress: function onKeyPress(e) {
|
|
27579
|
-
return e.key === "Enter" && action();
|
|
27580
|
-
}
|
|
28110
|
+
dataQa: dataQa
|
|
27581
28111
|
}, children);
|
|
27582
28112
|
};
|
|
27583
28113
|
var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref3) {
|
|
@@ -27612,7 +28142,6 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27612
28142
|
_ref4$isDisabled = _ref4.isDisabled,
|
|
27613
28143
|
isDisabled = _ref4$isDisabled === void 0 ? false : _ref4$isDisabled,
|
|
27614
28144
|
dataQa = _ref4.dataQa;
|
|
27615
|
-
var borderColor = isDisabled ? MANATEE_GREY : themeValues.color;
|
|
27616
28145
|
return /*#__PURE__*/React.createElement(PlaceholderContentWrapper, {
|
|
27617
28146
|
isLink: isLink,
|
|
27618
28147
|
action: action,
|
|
@@ -27625,13 +28154,16 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27625
28154
|
border: "none",
|
|
27626
28155
|
minHeight: themeValues.height,
|
|
27627
28156
|
hiddenStyles: !visible,
|
|
27628
|
-
extraStyles: "\n
|
|
27629
|
-
hoverStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.9, themeValues.color), ";")
|
|
27630
|
-
activeStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.8, themeValues.color), ";")
|
|
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), ";")
|
|
27631
28159
|
}, /*#__PURE__*/React.createElement(Center, {
|
|
27632
28160
|
maxWidth: "300px"
|
|
27633
28161
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27634
|
-
padding: "0"
|
|
28162
|
+
padding: "0",
|
|
28163
|
+
tabIndex: "0",
|
|
28164
|
+
onKeyPress: function onKeyPress(e) {
|
|
28165
|
+
return isDisabled ? noop : e.key === "Enter" && action();
|
|
28166
|
+
}
|
|
27635
28167
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
27636
28168
|
justify: "center",
|
|
27637
28169
|
align: "center",
|
|
@@ -27642,7 +28174,7 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27642
28174
|
}, variant === "large" && /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement(Box, {
|
|
27643
28175
|
padding: "0",
|
|
27644
28176
|
"aria-disabled": isDisabled,
|
|
27645
|
-
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 } ")
|
|
27646
28178
|
}, variant === "large" ? /*#__PURE__*/React.createElement(Center, {
|
|
27647
28179
|
intrinsic: true
|
|
27648
28180
|
}, getLargeIcon(largeIcon, isDisabled), /*#__PURE__*/React.createElement(Text$1, {
|
|
@@ -27656,8 +28188,9 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27656
28188
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
27657
28189
|
justify: "center",
|
|
27658
28190
|
align: "center"
|
|
27659
|
-
}, /*#__PURE__*/React.createElement(
|
|
27660
|
-
|
|
28191
|
+
}, /*#__PURE__*/React.createElement(IconAdd, {
|
|
28192
|
+
fill: isDisabled ? MANATEE_GREY : WHITE,
|
|
28193
|
+
strokeWidth: "2"
|
|
27661
28194
|
}), /*#__PURE__*/React.createElement(Center, {
|
|
27662
28195
|
intrinsic: true
|
|
27663
28196
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
@@ -39106,7 +39639,9 @@ var Module = function Module(_ref) {
|
|
|
39106
39639
|
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
39107
39640
|
fontSize = _ref.fontSize,
|
|
39108
39641
|
themeValues = _ref.themeValues,
|
|
39109
|
-
children = _ref.children
|
|
39642
|
+
children = _ref.children,
|
|
39643
|
+
_ref$allowContentOver = _ref.allowContentOverflow,
|
|
39644
|
+
allowContentOverflow = _ref$allowContentOver === void 0 ? false : _ref$allowContentOver;
|
|
39110
39645
|
var themedFontSize = variant === "small" ? "1.25rem" : variant === "default" ? "1.375rem" : "2rem";
|
|
39111
39646
|
var computedFontSize = fontSize || themedFontSize;
|
|
39112
39647
|
var themedElemType = variant === "small" ? "h6" : variant === "default" ? "h5" : "h2";
|
|
@@ -39129,6 +39664,7 @@ var Module = function Module(_ref) {
|
|
|
39129
39664
|
}, heading && !rightTitleContent && headingText, heading && rightTitleContent && /*#__PURE__*/React.createElement(Cluster, {
|
|
39130
39665
|
justify: "space-between",
|
|
39131
39666
|
align: "center",
|
|
39667
|
+
overflow: allowContentOverflow,
|
|
39132
39668
|
nowrap: true
|
|
39133
39669
|
}, headingText, rightTitleContent), /*#__PURE__*/React.createElement(Box, {
|
|
39134
39670
|
padding: "0 0 ".concat(spacingBottom),
|
|
@@ -48378,9 +48914,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48378
48914
|
justify: "space-between",
|
|
48379
48915
|
align: "center"
|
|
48380
48916
|
}, /*#__PURE__*/React.createElement(Title$1, {
|
|
48381
|
-
weight:
|
|
48917
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48382
48918
|
as: "h2",
|
|
48383
|
-
extraStyles: "font-size: 1.
|
|
48919
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48384
48920
|
id: "payment-details-title"
|
|
48385
48921
|
}, titleText), /*#__PURE__*/React.createElement(Title$1, {
|
|
48386
48922
|
weight: FONT_WEIGHT_BOLD,
|
|
@@ -48388,9 +48924,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48388
48924
|
extraStyles: "font-size: 1.375rem;"
|
|
48389
48925
|
}, displayCurrency(total)))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Title$1, {
|
|
48390
48926
|
as: "h2",
|
|
48391
|
-
weight:
|
|
48927
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48392
48928
|
margin: "1rem 0 0 0",
|
|
48393
|
-
extraStyles: "font-size: 1.
|
|
48929
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48394
48930
|
id: "payment-details-title"
|
|
48395
48931
|
}, titleText), agencySubheading);
|
|
48396
48932
|
return isCollapsible ? /*#__PURE__*/React.createElement(Collapsible, {
|