@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.cjs.js
CHANGED
|
@@ -13585,7 +13585,8 @@ var SettingsIconSmall$1 = themeComponent(SettingsIconSmall, "Icons", fallbackVal
|
|
|
13585
13585
|
var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
13586
13586
|
var themeValues = _ref.themeValues,
|
|
13587
13587
|
_ref$iconIndex = _ref.iconIndex,
|
|
13588
|
-
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex
|
|
13588
|
+
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex,
|
|
13589
|
+
colorOverride = _ref.colorOverride;
|
|
13589
13590
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
13590
13591
|
width: "20",
|
|
13591
13592
|
height: "20",
|
|
@@ -13596,7 +13597,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13596
13597
|
fillRule: "evenodd",
|
|
13597
13598
|
clipRule: "evenodd",
|
|
13598
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",
|
|
13599
|
-
fill: themeValues.singleIconColor
|
|
13600
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13600
13601
|
}), /*#__PURE__*/React__default.createElement("mask", {
|
|
13601
13602
|
id: "mask0_503_574-".concat(iconIndex),
|
|
13602
13603
|
style: {
|
|
@@ -13617,7 +13618,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13617
13618
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
13618
13619
|
width: "20",
|
|
13619
13620
|
height: "20",
|
|
13620
|
-
fill: themeValues.singleIconColor
|
|
13621
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13621
13622
|
})));
|
|
13622
13623
|
};
|
|
13623
13624
|
var WalletIconSmall$1 = themeComponent(WalletIconSmall, "Icons", fallbackValues$2, "primary");
|
|
@@ -19614,7 +19615,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19614
19615
|
}
|
|
19615
19616
|
|
|
19616
19617
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19617
|
-
|
|
19618
19618
|
/**
|
|
19619
19619
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19620
19620
|
* @private
|
|
@@ -19699,84 +19699,71 @@ var ERRORS = {
|
|
|
19699
19699
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19700
19700
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19701
19701
|
};
|
|
19702
|
+
|
|
19702
19703
|
/**
|
|
19703
19704
|
* super basic version of sprintf
|
|
19704
19705
|
* @private
|
|
19705
19706
|
*/
|
|
19706
|
-
|
|
19707
19707
|
function format() {
|
|
19708
19708
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19709
19709
|
args[_key] = arguments[_key];
|
|
19710
19710
|
}
|
|
19711
|
-
|
|
19712
19711
|
var a = args[0];
|
|
19713
19712
|
var b = [];
|
|
19714
19713
|
var c;
|
|
19715
|
-
|
|
19716
19714
|
for (c = 1; c < args.length; c += 1) {
|
|
19717
19715
|
b.push(args[c]);
|
|
19718
19716
|
}
|
|
19719
|
-
|
|
19720
19717
|
b.forEach(function (d) {
|
|
19721
19718
|
a = a.replace(/%[a-z]/, d);
|
|
19722
19719
|
});
|
|
19723
19720
|
return a;
|
|
19724
19721
|
}
|
|
19722
|
+
|
|
19725
19723
|
/**
|
|
19726
19724
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19727
19725
|
* in production mode.
|
|
19728
19726
|
* @private
|
|
19729
19727
|
*/
|
|
19730
|
-
|
|
19731
|
-
|
|
19732
19728
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19733
19729
|
_inheritsLoose(PolishedError, _Error);
|
|
19734
|
-
|
|
19735
19730
|
function PolishedError(code) {
|
|
19736
19731
|
var _this;
|
|
19737
|
-
|
|
19738
19732
|
if (process.env.NODE_ENV === 'production') {
|
|
19739
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;
|
|
19740
19734
|
} else {
|
|
19741
19735
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19742
19736
|
args[_key2 - 1] = arguments[_key2];
|
|
19743
19737
|
}
|
|
19744
|
-
|
|
19745
19738
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19746
19739
|
}
|
|
19747
|
-
|
|
19748
19740
|
return _assertThisInitialized(_this);
|
|
19749
19741
|
}
|
|
19750
|
-
|
|
19751
19742
|
return PolishedError;
|
|
19752
19743
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19753
19744
|
|
|
19754
19745
|
function colorToInt(color) {
|
|
19755
19746
|
return Math.round(color * 255);
|
|
19756
19747
|
}
|
|
19757
|
-
|
|
19758
19748
|
function convertToInt(red, green, blue) {
|
|
19759
19749
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19760
19750
|
}
|
|
19761
|
-
|
|
19762
19751
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19763
19752
|
if (convert === void 0) {
|
|
19764
19753
|
convert = convertToInt;
|
|
19765
19754
|
}
|
|
19766
|
-
|
|
19767
19755
|
if (saturation === 0) {
|
|
19768
19756
|
// achromatic
|
|
19769
19757
|
return convert(lightness, lightness, lightness);
|
|
19770
|
-
}
|
|
19771
|
-
|
|
19758
|
+
}
|
|
19772
19759
|
|
|
19760
|
+
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19773
19761
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19774
19762
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19775
19763
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19776
19764
|
var red = 0;
|
|
19777
19765
|
var green = 0;
|
|
19778
19766
|
var blue = 0;
|
|
19779
|
-
|
|
19780
19767
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19781
19768
|
red = chroma;
|
|
19782
19769
|
green = secondComponent;
|
|
@@ -19796,7 +19783,6 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19796
19783
|
red = chroma;
|
|
19797
19784
|
blue = secondComponent;
|
|
19798
19785
|
}
|
|
19799
|
-
|
|
19800
19786
|
var lightnessModification = lightness - chroma / 2;
|
|
19801
19787
|
var finalRed = red + lightnessModification;
|
|
19802
19788
|
var finalGreen = green + lightnessModification;
|
|
@@ -19954,11 +19940,11 @@ var namedColorMap = {
|
|
|
19954
19940
|
yellow: 'ff0',
|
|
19955
19941
|
yellowgreen: '9acd32'
|
|
19956
19942
|
};
|
|
19943
|
+
|
|
19957
19944
|
/**
|
|
19958
19945
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19959
19946
|
* @private
|
|
19960
19947
|
*/
|
|
19961
|
-
|
|
19962
19948
|
function nameToHex(color) {
|
|
19963
19949
|
if (typeof color !== 'string') return color;
|
|
19964
19950
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19973,6 +19959,7 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19973
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;
|
|
19974
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;
|
|
19975
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
|
+
|
|
19976
19963
|
/**
|
|
19977
19964
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19978
19965
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19984,14 +19971,11 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19984
19971
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
19985
19972
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
19986
19973
|
*/
|
|
19987
|
-
|
|
19988
19974
|
function parseToRgb(color) {
|
|
19989
19975
|
if (typeof color !== 'string') {
|
|
19990
19976
|
throw new PolishedError(3);
|
|
19991
19977
|
}
|
|
19992
|
-
|
|
19993
19978
|
var normalizedColor = nameToHex(color);
|
|
19994
|
-
|
|
19995
19979
|
if (normalizedColor.match(hexRegex)) {
|
|
19996
19980
|
return {
|
|
19997
19981
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -19999,7 +19983,6 @@ function parseToRgb(color) {
|
|
|
19999
19983
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
20000
19984
|
};
|
|
20001
19985
|
}
|
|
20002
|
-
|
|
20003
19986
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
20004
19987
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
20005
19988
|
return {
|
|
@@ -20009,7 +19992,6 @@ function parseToRgb(color) {
|
|
|
20009
19992
|
alpha: alpha
|
|
20010
19993
|
};
|
|
20011
19994
|
}
|
|
20012
|
-
|
|
20013
19995
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
20014
19996
|
return {
|
|
20015
19997
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -20017,10 +19999,8 @@ function parseToRgb(color) {
|
|
|
20017
19999
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
20018
20000
|
};
|
|
20019
20001
|
}
|
|
20020
|
-
|
|
20021
20002
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
20022
20003
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
20023
|
-
|
|
20024
20004
|
return {
|
|
20025
20005
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
20026
20006
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -20028,9 +20008,7 @@ function parseToRgb(color) {
|
|
|
20028
20008
|
alpha: _alpha
|
|
20029
20009
|
};
|
|
20030
20010
|
}
|
|
20031
|
-
|
|
20032
20011
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
20033
|
-
|
|
20034
20012
|
if (rgbMatched) {
|
|
20035
20013
|
return {
|
|
20036
20014
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -20038,9 +20016,7 @@ function parseToRgb(color) {
|
|
|
20038
20016
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
20039
20017
|
};
|
|
20040
20018
|
}
|
|
20041
|
-
|
|
20042
20019
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
20043
|
-
|
|
20044
20020
|
if (rgbaMatched) {
|
|
20045
20021
|
return {
|
|
20046
20022
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -20049,44 +20025,32 @@ function parseToRgb(color) {
|
|
|
20049
20025
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
20050
20026
|
};
|
|
20051
20027
|
}
|
|
20052
|
-
|
|
20053
20028
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
20054
|
-
|
|
20055
20029
|
if (hslMatched) {
|
|
20056
20030
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
20057
20031
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
20058
20032
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
20059
20033
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
20060
20034
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
20061
|
-
|
|
20062
20035
|
if (!hslRgbMatched) {
|
|
20063
20036
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
20064
20037
|
}
|
|
20065
|
-
|
|
20066
20038
|
return {
|
|
20067
20039
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
20068
20040
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
20069
20041
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
20070
20042
|
};
|
|
20071
20043
|
}
|
|
20072
|
-
|
|
20073
20044
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
20074
|
-
|
|
20075
20045
|
if (hslaMatched) {
|
|
20076
20046
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
20077
|
-
|
|
20078
20047
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
20079
|
-
|
|
20080
20048
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
20081
|
-
|
|
20082
20049
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
20083
|
-
|
|
20084
20050
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
20085
|
-
|
|
20086
20051
|
if (!_hslRgbMatched) {
|
|
20087
20052
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
20088
20053
|
}
|
|
20089
|
-
|
|
20090
20054
|
return {
|
|
20091
20055
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
20092
20056
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -20094,10 +20058,82 @@ function parseToRgb(color) {
|
|
|
20094
20058
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
20095
20059
|
};
|
|
20096
20060
|
}
|
|
20097
|
-
|
|
20098
20061
|
throw new PolishedError(5);
|
|
20099
20062
|
}
|
|
20100
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
|
+
|
|
20101
20137
|
/**
|
|
20102
20138
|
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
20103
20139
|
* @private
|
|
@@ -20106,10 +20142,8 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
20106
20142
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
20107
20143
|
return "#" + value[1] + value[3] + value[5];
|
|
20108
20144
|
}
|
|
20109
|
-
|
|
20110
20145
|
return value;
|
|
20111
20146
|
};
|
|
20112
|
-
|
|
20113
20147
|
var reduceHexValue$1 = reduceHexValue;
|
|
20114
20148
|
|
|
20115
20149
|
function numberToHex(value) {
|
|
@@ -20117,6 +20151,83 @@ function numberToHex(value) {
|
|
|
20117
20151
|
return hex.length === 1 ? "0" + hex : hex;
|
|
20118
20152
|
}
|
|
20119
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
|
+
|
|
20120
20231
|
/**
|
|
20121
20232
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20122
20233
|
*
|
|
@@ -20146,7 +20257,6 @@ function rgb(value, green, blue) {
|
|
|
20146
20257
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
20147
20258
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
20148
20259
|
}
|
|
20149
|
-
|
|
20150
20260
|
throw new PolishedError(6);
|
|
20151
20261
|
}
|
|
20152
20262
|
|
|
@@ -20193,10 +20303,62 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
20193
20303
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
20194
20304
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
20195
20305
|
}
|
|
20196
|
-
|
|
20197
20306
|
throw new PolishedError(7);
|
|
20198
20307
|
}
|
|
20199
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
|
+
|
|
20200
20362
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
20201
20363
|
// eslint-disable-next-line no-unused-vars
|
|
20202
20364
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -20207,14 +20369,156 @@ function curried(f, length, acc) {
|
|
|
20207
20369
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20208
20370
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
20209
20371
|
};
|
|
20210
|
-
}
|
|
20211
|
-
|
|
20372
|
+
}
|
|
20212
20373
|
|
|
20374
|
+
// eslint-disable-next-line no-redeclare
|
|
20213
20375
|
function curry(f) {
|
|
20214
20376
|
// eslint-disable-line no-redeclare
|
|
20215
20377
|
return curried(f, f.length, []);
|
|
20216
20378
|
}
|
|
20217
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
|
+
|
|
20218
20522
|
/**
|
|
20219
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.
|
|
20220
20524
|
*
|
|
@@ -20241,25 +20545,21 @@ function curry(f) {
|
|
|
20241
20545
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
20242
20546
|
* }
|
|
20243
20547
|
*/
|
|
20244
|
-
|
|
20245
20548
|
function mix$1(weight, color, otherColor) {
|
|
20246
20549
|
if (color === 'transparent') return otherColor;
|
|
20247
20550
|
if (otherColor === 'transparent') return color;
|
|
20248
20551
|
if (weight === 0) return otherColor;
|
|
20249
20552
|
var parsedColor1 = parseToRgb(color);
|
|
20250
|
-
|
|
20251
20553
|
var color1 = _extends$1({}, parsedColor1, {
|
|
20252
20554
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20253
20555
|
});
|
|
20254
|
-
|
|
20255
20556
|
var parsedColor2 = parseToRgb(otherColor);
|
|
20256
|
-
|
|
20257
20557
|
var color2 = _extends$1({}, parsedColor2, {
|
|
20258
20558
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20259
|
-
});
|
|
20260
|
-
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20261
|
-
|
|
20559
|
+
});
|
|
20262
20560
|
|
|
20561
|
+
// The formula is copied from the original Sass implementation:
|
|
20562
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20263
20563
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
20264
20564
|
var x = parseFloat(weight) * 2 - 1;
|
|
20265
20565
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -20273,14 +20573,218 @@ function mix$1(weight, color, otherColor) {
|
|
|
20273
20573
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
20274
20574
|
};
|
|
20275
20575
|
return rgba$1(mixedColor);
|
|
20276
|
-
}
|
|
20277
|
-
|
|
20576
|
+
}
|
|
20278
20577
|
|
|
20279
|
-
|
|
20280
|
-
/* ::<number | string, string, string, string> */
|
|
20281
|
-
(mix$1);
|
|
20578
|
+
// prettier-ignore
|
|
20579
|
+
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
20282
20580
|
var mix$1$1 = curriedMix;
|
|
20283
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
|
+
|
|
20284
20788
|
/**
|
|
20285
20789
|
* Tints a color by mixing it with white. `tint` can produce
|
|
20286
20790
|
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
@@ -20307,14 +20811,52 @@ var mix$1$1 = curriedMix;
|
|
|
20307
20811
|
function tint(percentage, color) {
|
|
20308
20812
|
if (color === 'transparent') return color;
|
|
20309
20813
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20310
|
-
}
|
|
20311
|
-
|
|
20814
|
+
}
|
|
20312
20815
|
|
|
20313
|
-
|
|
20314
|
-
/* ::<number | string, string, string> */
|
|
20315
|
-
(tint);
|
|
20816
|
+
// prettier-ignore
|
|
20817
|
+
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20316
20818
|
var curriedTint$1 = curriedTint;
|
|
20317
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
|
+
|
|
20318
20860
|
var linkColor = MATISSE_BLUE;
|
|
20319
20861
|
var fallbackValues$8 = {
|
|
20320
20862
|
linkColor: linkColor
|
|
@@ -23004,32 +23546,19 @@ var toIndexedObject = function (it) {
|
|
|
23004
23546
|
return indexedObject(requireObjectCoercible(it));
|
|
23005
23547
|
};
|
|
23006
23548
|
|
|
23007
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
23008
|
-
|
|
23009
23549
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23010
|
-
|
|
23011
|
-
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
23012
|
-
|
|
23013
|
-
var documentAll_1 = {
|
|
23014
|
-
all: documentAll,
|
|
23015
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
23016
|
-
};
|
|
23017
|
-
|
|
23018
|
-
var documentAll$1 = documentAll_1.all;
|
|
23550
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
23019
23551
|
|
|
23020
23552
|
// `IsCallable` abstract operation
|
|
23021
23553
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23022
|
-
|
|
23023
|
-
|
|
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;
|
|
23024
23557
|
} : function (argument) {
|
|
23025
23558
|
return typeof argument == 'function';
|
|
23026
23559
|
};
|
|
23027
23560
|
|
|
23028
|
-
var
|
|
23029
|
-
|
|
23030
|
-
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
23031
|
-
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
23032
|
-
} : function (it) {
|
|
23561
|
+
var isObject = function (it) {
|
|
23033
23562
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23034
23563
|
};
|
|
23035
23564
|
|
|
@@ -23165,10 +23694,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
23165
23694
|
(module.exports = function (key, value) {
|
|
23166
23695
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
23167
23696
|
})('versions', []).push({
|
|
23168
|
-
version: '3.
|
|
23697
|
+
version: '3.35.1',
|
|
23169
23698
|
mode: 'global',
|
|
23170
|
-
copyright: '© 2014-
|
|
23171
|
-
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',
|
|
23172
23701
|
source: 'https://github.com/zloirock/core-js'
|
|
23173
23702
|
});
|
|
23174
23703
|
});
|
|
@@ -23465,7 +23994,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23465
23994
|
|
|
23466
23995
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23467
23996
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23468
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23997
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
23469
23998
|
}
|
|
23470
23999
|
if (options && options.getter) name = 'get ' + name;
|
|
23471
24000
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23553,7 +24082,8 @@ var min$1 = Math.min;
|
|
|
23553
24082
|
// `ToLength` abstract operation
|
|
23554
24083
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23555
24084
|
var toLength = function (argument) {
|
|
23556
|
-
|
|
24085
|
+
var len = toIntegerOrInfinity(argument);
|
|
24086
|
+
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23557
24087
|
};
|
|
23558
24088
|
|
|
23559
24089
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23713,7 +24243,7 @@ var _export = function (options, source) {
|
|
|
23713
24243
|
} else if (STATIC) {
|
|
23714
24244
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23715
24245
|
} else {
|
|
23716
|
-
target =
|
|
24246
|
+
target = global_1[TARGET] && global_1[TARGET].prototype;
|
|
23717
24247
|
}
|
|
23718
24248
|
if (target) for (key in source) {
|
|
23719
24249
|
sourceProperty = source[key];
|
|
@@ -23976,11 +24506,15 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
23976
24506
|
} catch (error) { /* empty */ }
|
|
23977
24507
|
};
|
|
23978
24508
|
|
|
24509
|
+
var isPossiblePrototype = function (argument) {
|
|
24510
|
+
return isObject(argument) || argument === null;
|
|
24511
|
+
};
|
|
24512
|
+
|
|
23979
24513
|
var $String$4 = String;
|
|
23980
24514
|
var $TypeError$6 = TypeError;
|
|
23981
24515
|
|
|
23982
24516
|
var aPossiblePrototype = function (argument) {
|
|
23983
|
-
if (
|
|
24517
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
23984
24518
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23985
24519
|
};
|
|
23986
24520
|
|
|
@@ -27581,11 +28115,7 @@ var renderContent = function renderContent(_ref2) {
|
|
|
27581
28115
|
padding: "0",
|
|
27582
28116
|
minHeight: "100%",
|
|
27583
28117
|
extraStyles: "cursor: pointer;",
|
|
27584
|
-
dataQa: dataQa
|
|
27585
|
-
tabIndex: "0",
|
|
27586
|
-
onKeyPress: function onKeyPress(e) {
|
|
27587
|
-
return e.key === "Enter" && action();
|
|
27588
|
-
}
|
|
28118
|
+
dataQa: dataQa
|
|
27589
28119
|
}, children);
|
|
27590
28120
|
};
|
|
27591
28121
|
var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref3) {
|
|
@@ -27620,7 +28150,6 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27620
28150
|
_ref4$isDisabled = _ref4.isDisabled,
|
|
27621
28151
|
isDisabled = _ref4$isDisabled === void 0 ? false : _ref4$isDisabled,
|
|
27622
28152
|
dataQa = _ref4.dataQa;
|
|
27623
|
-
var borderColor = isDisabled ? MANATEE_GREY : themeValues.color;
|
|
27624
28153
|
return /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
|
|
27625
28154
|
isLink: isLink,
|
|
27626
28155
|
action: action,
|
|
@@ -27633,13 +28162,16 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27633
28162
|
border: "none",
|
|
27634
28163
|
minHeight: themeValues.height,
|
|
27635
28164
|
hiddenStyles: !visible,
|
|
27636
|
-
extraStyles: "\n
|
|
27637
|
-
hoverStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.9, themeValues.color), ";")
|
|
27638
|
-
activeStyles: "background-color: ".concat(isDisabled ? TRANSPARENT : curriedTint$1(0.8, themeValues.color), ";")
|
|
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), ";")
|
|
27639
28167
|
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
27640
28168
|
maxWidth: "300px"
|
|
27641
28169
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
27642
|
-
padding: "0"
|
|
28170
|
+
padding: "0",
|
|
28171
|
+
tabIndex: "0",
|
|
28172
|
+
onKeyPress: function onKeyPress(e) {
|
|
28173
|
+
return isDisabled ? noop : e.key === "Enter" && action();
|
|
28174
|
+
}
|
|
27643
28175
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
27644
28176
|
justify: "center",
|
|
27645
28177
|
align: "center",
|
|
@@ -27650,7 +28182,7 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27650
28182
|
}, variant === "large" && /*#__PURE__*/React__default.createElement("div", null), /*#__PURE__*/React__default.createElement(Box, {
|
|
27651
28183
|
padding: "0",
|
|
27652
28184
|
"aria-disabled": isDisabled,
|
|
27653
|
-
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 } ")
|
|
27654
28186
|
}, variant === "large" ? /*#__PURE__*/React__default.createElement(Center, {
|
|
27655
28187
|
intrinsic: true
|
|
27656
28188
|
}, getLargeIcon(largeIcon, isDisabled), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -27664,8 +28196,9 @@ var Placeholder = function Placeholder(_ref4) {
|
|
|
27664
28196
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
27665
28197
|
justify: "center",
|
|
27666
28198
|
align: "center"
|
|
27667
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
27668
|
-
|
|
28199
|
+
}, /*#__PURE__*/React__default.createElement(IconAdd, {
|
|
28200
|
+
fill: isDisabled ? MANATEE_GREY : WHITE,
|
|
28201
|
+
strokeWidth: "2"
|
|
27669
28202
|
}), /*#__PURE__*/React__default.createElement(Center, {
|
|
27670
28203
|
intrinsic: true
|
|
27671
28204
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -39114,7 +39647,9 @@ var Module = function Module(_ref) {
|
|
|
39114
39647
|
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
39115
39648
|
fontSize = _ref.fontSize,
|
|
39116
39649
|
themeValues = _ref.themeValues,
|
|
39117
|
-
children = _ref.children
|
|
39650
|
+
children = _ref.children,
|
|
39651
|
+
_ref$allowContentOver = _ref.allowContentOverflow,
|
|
39652
|
+
allowContentOverflow = _ref$allowContentOver === void 0 ? false : _ref$allowContentOver;
|
|
39118
39653
|
var themedFontSize = variant === "small" ? "1.25rem" : variant === "default" ? "1.375rem" : "2rem";
|
|
39119
39654
|
var computedFontSize = fontSize || themedFontSize;
|
|
39120
39655
|
var themedElemType = variant === "small" ? "h6" : variant === "default" ? "h5" : "h2";
|
|
@@ -39137,6 +39672,7 @@ var Module = function Module(_ref) {
|
|
|
39137
39672
|
}, heading && !rightTitleContent && headingText, heading && rightTitleContent && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39138
39673
|
justify: "space-between",
|
|
39139
39674
|
align: "center",
|
|
39675
|
+
overflow: allowContentOverflow,
|
|
39140
39676
|
nowrap: true
|
|
39141
39677
|
}, headingText, rightTitleContent), /*#__PURE__*/React__default.createElement(Box, {
|
|
39142
39678
|
padding: "0 0 ".concat(spacingBottom),
|
|
@@ -48386,9 +48922,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48386
48922
|
justify: "space-between",
|
|
48387
48923
|
align: "center"
|
|
48388
48924
|
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
48389
|
-
weight:
|
|
48925
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48390
48926
|
as: "h2",
|
|
48391
|
-
extraStyles: "font-size: 1.
|
|
48927
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48392
48928
|
id: "payment-details-title"
|
|
48393
48929
|
}, titleText), /*#__PURE__*/React__default.createElement(Title$1, {
|
|
48394
48930
|
weight: FONT_WEIGHT_BOLD,
|
|
@@ -48396,9 +48932,9 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48396
48932
|
extraStyles: "font-size: 1.375rem;"
|
|
48397
48933
|
}, displayCurrency(total)))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
48398
48934
|
as: "h2",
|
|
48399
|
-
weight:
|
|
48935
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
48400
48936
|
margin: "1rem 0 0 0",
|
|
48401
|
-
extraStyles: "font-size: 1.
|
|
48937
|
+
extraStyles: "font-size: 1.5rem; line-height: ".concat(isMobile ? "2.2857rem" : "2.25rem", ";"),
|
|
48402
48938
|
id: "payment-details-title"
|
|
48403
48939
|
}, titleText), agencySubheading);
|
|
48404
48940
|
return isCollapsible ? /*#__PURE__*/React__default.createElement(Collapsible, {
|