@thecb/components 10.3.0 → 10.3.1
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 +99 -627
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +99 -627
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/molecules/modal/Modal.js +6 -2
- package/src/components/molecules/modal/Modal.stories.js +2 -0
package/dist/index.esm.js
CHANGED
|
@@ -19248,6 +19248,7 @@ function _wrapNativeSuper(Class) {
|
|
|
19248
19248
|
}
|
|
19249
19249
|
|
|
19250
19250
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19251
|
+
|
|
19251
19252
|
/**
|
|
19252
19253
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19253
19254
|
* @private
|
|
@@ -19332,71 +19333,84 @@ var ERRORS = {
|
|
|
19332
19333
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19333
19334
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19334
19335
|
};
|
|
19335
|
-
|
|
19336
19336
|
/**
|
|
19337
19337
|
* super basic version of sprintf
|
|
19338
19338
|
* @private
|
|
19339
19339
|
*/
|
|
19340
|
+
|
|
19340
19341
|
function format() {
|
|
19341
19342
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19342
19343
|
args[_key] = arguments[_key];
|
|
19343
19344
|
}
|
|
19345
|
+
|
|
19344
19346
|
var a = args[0];
|
|
19345
19347
|
var b = [];
|
|
19346
19348
|
var c;
|
|
19349
|
+
|
|
19347
19350
|
for (c = 1; c < args.length; c += 1) {
|
|
19348
19351
|
b.push(args[c]);
|
|
19349
19352
|
}
|
|
19353
|
+
|
|
19350
19354
|
b.forEach(function (d) {
|
|
19351
19355
|
a = a.replace(/%[a-z]/, d);
|
|
19352
19356
|
});
|
|
19353
19357
|
return a;
|
|
19354
19358
|
}
|
|
19355
|
-
|
|
19356
19359
|
/**
|
|
19357
19360
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19358
19361
|
* in production mode.
|
|
19359
19362
|
* @private
|
|
19360
19363
|
*/
|
|
19364
|
+
|
|
19365
|
+
|
|
19361
19366
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19362
19367
|
_inheritsLoose(PolishedError, _Error);
|
|
19368
|
+
|
|
19363
19369
|
function PolishedError(code) {
|
|
19364
19370
|
var _this;
|
|
19371
|
+
|
|
19365
19372
|
if (process.env.NODE_ENV === 'production') {
|
|
19366
19373
|
_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;
|
|
19367
19374
|
} else {
|
|
19368
19375
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19369
19376
|
args[_key2 - 1] = arguments[_key2];
|
|
19370
19377
|
}
|
|
19378
|
+
|
|
19371
19379
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19372
19380
|
}
|
|
19381
|
+
|
|
19373
19382
|
return _assertThisInitialized(_this);
|
|
19374
19383
|
}
|
|
19384
|
+
|
|
19375
19385
|
return PolishedError;
|
|
19376
19386
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19377
19387
|
|
|
19378
19388
|
function colorToInt(color) {
|
|
19379
19389
|
return Math.round(color * 255);
|
|
19380
19390
|
}
|
|
19391
|
+
|
|
19381
19392
|
function convertToInt(red, green, blue) {
|
|
19382
19393
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19383
19394
|
}
|
|
19395
|
+
|
|
19384
19396
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19385
19397
|
if (convert === void 0) {
|
|
19386
19398
|
convert = convertToInt;
|
|
19387
19399
|
}
|
|
19400
|
+
|
|
19388
19401
|
if (saturation === 0) {
|
|
19389
19402
|
// achromatic
|
|
19390
19403
|
return convert(lightness, lightness, lightness);
|
|
19391
|
-
}
|
|
19404
|
+
} // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19405
|
+
|
|
19392
19406
|
|
|
19393
|
-
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19394
19407
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19395
19408
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19396
19409
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19397
19410
|
var red = 0;
|
|
19398
19411
|
var green = 0;
|
|
19399
19412
|
var blue = 0;
|
|
19413
|
+
|
|
19400
19414
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19401
19415
|
red = chroma;
|
|
19402
19416
|
green = secondComponent;
|
|
@@ -19416,6 +19430,7 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19416
19430
|
red = chroma;
|
|
19417
19431
|
blue = secondComponent;
|
|
19418
19432
|
}
|
|
19433
|
+
|
|
19419
19434
|
var lightnessModification = lightness - chroma / 2;
|
|
19420
19435
|
var finalRed = red + lightnessModification;
|
|
19421
19436
|
var finalGreen = green + lightnessModification;
|
|
@@ -19573,11 +19588,11 @@ var namedColorMap = {
|
|
|
19573
19588
|
yellow: 'ff0',
|
|
19574
19589
|
yellowgreen: '9acd32'
|
|
19575
19590
|
};
|
|
19576
|
-
|
|
19577
19591
|
/**
|
|
19578
19592
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19579
19593
|
* @private
|
|
19580
19594
|
*/
|
|
19595
|
+
|
|
19581
19596
|
function nameToHex(color) {
|
|
19582
19597
|
if (typeof color !== 'string') return color;
|
|
19583
19598
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19592,7 +19607,6 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19592
19607
|
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
19593
19608
|
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;
|
|
19594
19609
|
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;
|
|
19595
|
-
|
|
19596
19610
|
/**
|
|
19597
19611
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19598
19612
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19604,11 +19618,14 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19604
19618
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
19605
19619
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
19606
19620
|
*/
|
|
19621
|
+
|
|
19607
19622
|
function parseToRgb(color) {
|
|
19608
19623
|
if (typeof color !== 'string') {
|
|
19609
19624
|
throw new PolishedError(3);
|
|
19610
19625
|
}
|
|
19626
|
+
|
|
19611
19627
|
var normalizedColor = nameToHex(color);
|
|
19628
|
+
|
|
19612
19629
|
if (normalizedColor.match(hexRegex)) {
|
|
19613
19630
|
return {
|
|
19614
19631
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -19616,6 +19633,7 @@ function parseToRgb(color) {
|
|
|
19616
19633
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
19617
19634
|
};
|
|
19618
19635
|
}
|
|
19636
|
+
|
|
19619
19637
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
19620
19638
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
19621
19639
|
return {
|
|
@@ -19625,6 +19643,7 @@ function parseToRgb(color) {
|
|
|
19625
19643
|
alpha: alpha
|
|
19626
19644
|
};
|
|
19627
19645
|
}
|
|
19646
|
+
|
|
19628
19647
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
19629
19648
|
return {
|
|
19630
19649
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -19632,8 +19651,10 @@ function parseToRgb(color) {
|
|
|
19632
19651
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
19633
19652
|
};
|
|
19634
19653
|
}
|
|
19654
|
+
|
|
19635
19655
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
19636
19656
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
19657
|
+
|
|
19637
19658
|
return {
|
|
19638
19659
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
19639
19660
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -19641,7 +19662,9 @@ function parseToRgb(color) {
|
|
|
19641
19662
|
alpha: _alpha
|
|
19642
19663
|
};
|
|
19643
19664
|
}
|
|
19665
|
+
|
|
19644
19666
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
19667
|
+
|
|
19645
19668
|
if (rgbMatched) {
|
|
19646
19669
|
return {
|
|
19647
19670
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -19649,7 +19672,9 @@ function parseToRgb(color) {
|
|
|
19649
19672
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
19650
19673
|
};
|
|
19651
19674
|
}
|
|
19675
|
+
|
|
19652
19676
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
19677
|
+
|
|
19653
19678
|
if (rgbaMatched) {
|
|
19654
19679
|
return {
|
|
19655
19680
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -19658,32 +19683,44 @@ function parseToRgb(color) {
|
|
|
19658
19683
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
19659
19684
|
};
|
|
19660
19685
|
}
|
|
19686
|
+
|
|
19661
19687
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
19688
|
+
|
|
19662
19689
|
if (hslMatched) {
|
|
19663
19690
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
19664
19691
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
19665
19692
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
19666
19693
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
19667
19694
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
19695
|
+
|
|
19668
19696
|
if (!hslRgbMatched) {
|
|
19669
19697
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
19670
19698
|
}
|
|
19699
|
+
|
|
19671
19700
|
return {
|
|
19672
19701
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
19673
19702
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
19674
19703
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
19675
19704
|
};
|
|
19676
19705
|
}
|
|
19706
|
+
|
|
19677
19707
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
19708
|
+
|
|
19678
19709
|
if (hslaMatched) {
|
|
19679
19710
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
19711
|
+
|
|
19680
19712
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
19713
|
+
|
|
19681
19714
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
19715
|
+
|
|
19682
19716
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
19717
|
+
|
|
19683
19718
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
19719
|
+
|
|
19684
19720
|
if (!_hslRgbMatched) {
|
|
19685
19721
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
19686
19722
|
}
|
|
19723
|
+
|
|
19687
19724
|
return {
|
|
19688
19725
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
19689
19726
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -19691,80 +19728,8 @@ function parseToRgb(color) {
|
|
|
19691
19728
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
19692
19729
|
};
|
|
19693
19730
|
}
|
|
19694
|
-
throw new PolishedError(5);
|
|
19695
|
-
}
|
|
19696
|
-
|
|
19697
|
-
function rgbToHsl(color) {
|
|
19698
|
-
// make sure rgb are contained in a set of [0, 255]
|
|
19699
|
-
var red = color.red / 255;
|
|
19700
|
-
var green = color.green / 255;
|
|
19701
|
-
var blue = color.blue / 255;
|
|
19702
|
-
var max = Math.max(red, green, blue);
|
|
19703
|
-
var min = Math.min(red, green, blue);
|
|
19704
|
-
var lightness = (max + min) / 2;
|
|
19705
|
-
if (max === min) {
|
|
19706
|
-
// achromatic
|
|
19707
|
-
if (color.alpha !== undefined) {
|
|
19708
|
-
return {
|
|
19709
|
-
hue: 0,
|
|
19710
|
-
saturation: 0,
|
|
19711
|
-
lightness: lightness,
|
|
19712
|
-
alpha: color.alpha
|
|
19713
|
-
};
|
|
19714
|
-
} else {
|
|
19715
|
-
return {
|
|
19716
|
-
hue: 0,
|
|
19717
|
-
saturation: 0,
|
|
19718
|
-
lightness: lightness
|
|
19719
|
-
};
|
|
19720
|
-
}
|
|
19721
|
-
}
|
|
19722
|
-
var hue;
|
|
19723
|
-
var delta = max - min;
|
|
19724
|
-
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
19725
|
-
switch (max) {
|
|
19726
|
-
case red:
|
|
19727
|
-
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
19728
|
-
break;
|
|
19729
|
-
case green:
|
|
19730
|
-
hue = (blue - red) / delta + 2;
|
|
19731
|
-
break;
|
|
19732
|
-
default:
|
|
19733
|
-
// blue case
|
|
19734
|
-
hue = (red - green) / delta + 4;
|
|
19735
|
-
break;
|
|
19736
|
-
}
|
|
19737
|
-
hue *= 60;
|
|
19738
|
-
if (color.alpha !== undefined) {
|
|
19739
|
-
return {
|
|
19740
|
-
hue: hue,
|
|
19741
|
-
saturation: saturation,
|
|
19742
|
-
lightness: lightness,
|
|
19743
|
-
alpha: color.alpha
|
|
19744
|
-
};
|
|
19745
|
-
}
|
|
19746
|
-
return {
|
|
19747
|
-
hue: hue,
|
|
19748
|
-
saturation: saturation,
|
|
19749
|
-
lightness: lightness
|
|
19750
|
-
};
|
|
19751
|
-
}
|
|
19752
19731
|
|
|
19753
|
-
|
|
19754
|
-
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
19755
|
-
* if want to extract a color component. With the color util `toColorString` you
|
|
19756
|
-
* can convert a HslColor or HslaColor object back to a string.
|
|
19757
|
-
*
|
|
19758
|
-
* @example
|
|
19759
|
-
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
19760
|
-
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
19761
|
-
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
19762
|
-
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
19763
|
-
*/
|
|
19764
|
-
function parseToHsl(color) {
|
|
19765
|
-
// Note: At a later stage we can optimize this function as right now a hsl
|
|
19766
|
-
// color would be parsed converted to rgb values and converted back to hsl.
|
|
19767
|
-
return rgbToHsl(parseToRgb(color));
|
|
19732
|
+
throw new PolishedError(5);
|
|
19768
19733
|
}
|
|
19769
19734
|
|
|
19770
19735
|
/**
|
|
@@ -19775,8 +19740,10 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
19775
19740
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
19776
19741
|
return "#" + value[1] + value[3] + value[5];
|
|
19777
19742
|
}
|
|
19743
|
+
|
|
19778
19744
|
return value;
|
|
19779
19745
|
};
|
|
19746
|
+
|
|
19780
19747
|
var reduceHexValue$1 = reduceHexValue;
|
|
19781
19748
|
|
|
19782
19749
|
function numberToHex(value) {
|
|
@@ -19784,83 +19751,6 @@ function numberToHex(value) {
|
|
|
19784
19751
|
return hex.length === 1 ? "0" + hex : hex;
|
|
19785
19752
|
}
|
|
19786
19753
|
|
|
19787
|
-
function colorToHex(color) {
|
|
19788
|
-
return numberToHex(Math.round(color * 255));
|
|
19789
|
-
}
|
|
19790
|
-
function convertToHex(red, green, blue) {
|
|
19791
|
-
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
19792
|
-
}
|
|
19793
|
-
function hslToHex(hue, saturation, lightness) {
|
|
19794
|
-
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
19795
|
-
}
|
|
19796
|
-
|
|
19797
|
-
/**
|
|
19798
|
-
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
19799
|
-
*
|
|
19800
|
-
* @example
|
|
19801
|
-
* // Styles as object usage
|
|
19802
|
-
* const styles = {
|
|
19803
|
-
* background: hsl(359, 0.75, 0.4),
|
|
19804
|
-
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
19805
|
-
* }
|
|
19806
|
-
*
|
|
19807
|
-
* // styled-components usage
|
|
19808
|
-
* const div = styled.div`
|
|
19809
|
-
* background: ${hsl(359, 0.75, 0.4)};
|
|
19810
|
-
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
19811
|
-
* `
|
|
19812
|
-
*
|
|
19813
|
-
* // CSS in JS Output
|
|
19814
|
-
*
|
|
19815
|
-
* element {
|
|
19816
|
-
* background: "#b3191c";
|
|
19817
|
-
* background: "#b3191c";
|
|
19818
|
-
* }
|
|
19819
|
-
*/
|
|
19820
|
-
function hsl(value, saturation, lightness) {
|
|
19821
|
-
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
|
19822
|
-
return hslToHex(value, saturation, lightness);
|
|
19823
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
19824
|
-
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
19825
|
-
}
|
|
19826
|
-
throw new PolishedError(1);
|
|
19827
|
-
}
|
|
19828
|
-
|
|
19829
|
-
/**
|
|
19830
|
-
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
19831
|
-
*
|
|
19832
|
-
* @example
|
|
19833
|
-
* // Styles as object usage
|
|
19834
|
-
* const styles = {
|
|
19835
|
-
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
19836
|
-
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
19837
|
-
* background: hsla(359, 0.75, 0.4, 1),
|
|
19838
|
-
* }
|
|
19839
|
-
*
|
|
19840
|
-
* // styled-components usage
|
|
19841
|
-
* const div = styled.div`
|
|
19842
|
-
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
19843
|
-
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
19844
|
-
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
19845
|
-
* `
|
|
19846
|
-
*
|
|
19847
|
-
* // CSS in JS Output
|
|
19848
|
-
*
|
|
19849
|
-
* element {
|
|
19850
|
-
* background: "rgba(179,25,28,0.7)";
|
|
19851
|
-
* background: "rgba(179,25,28,0.7)";
|
|
19852
|
-
* background: "#b3191c";
|
|
19853
|
-
* }
|
|
19854
|
-
*/
|
|
19855
|
-
function hsla$1(value, saturation, lightness, alpha) {
|
|
19856
|
-
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
|
|
19857
|
-
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
19858
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
19859
|
-
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
19860
|
-
}
|
|
19861
|
-
throw new PolishedError(2);
|
|
19862
|
-
}
|
|
19863
|
-
|
|
19864
19754
|
/**
|
|
19865
19755
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
19866
19756
|
*
|
|
@@ -19890,6 +19780,7 @@ function rgb(value, green, blue) {
|
|
|
19890
19780
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
19891
19781
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
19892
19782
|
}
|
|
19783
|
+
|
|
19893
19784
|
throw new PolishedError(6);
|
|
19894
19785
|
}
|
|
19895
19786
|
|
|
@@ -19936,60 +19827,8 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
19936
19827
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
19937
19828
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
19938
19829
|
}
|
|
19939
|
-
throw new PolishedError(7);
|
|
19940
|
-
}
|
|
19941
19830
|
|
|
19942
|
-
|
|
19943
|
-
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
19944
|
-
};
|
|
19945
|
-
var isRgba$1 = function isRgba(color) {
|
|
19946
|
-
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
|
|
19947
|
-
};
|
|
19948
|
-
var isHsl = function isHsl(color) {
|
|
19949
|
-
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
19950
|
-
};
|
|
19951
|
-
var isHsla$1 = function isHsla(color) {
|
|
19952
|
-
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
|
|
19953
|
-
};
|
|
19954
|
-
|
|
19955
|
-
/**
|
|
19956
|
-
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
19957
|
-
* This util is useful in case you only know on runtime which color object is
|
|
19958
|
-
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
19959
|
-
*
|
|
19960
|
-
* @example
|
|
19961
|
-
* // Styles as object usage
|
|
19962
|
-
* const styles = {
|
|
19963
|
-
* background: toColorString({ red: 255, green: 205, blue: 100 }),
|
|
19964
|
-
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
|
|
19965
|
-
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
|
|
19966
|
-
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
|
|
19967
|
-
* }
|
|
19968
|
-
*
|
|
19969
|
-
* // styled-components usage
|
|
19970
|
-
* const div = styled.div`
|
|
19971
|
-
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
19972
|
-
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
19973
|
-
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
19974
|
-
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
19975
|
-
* `
|
|
19976
|
-
*
|
|
19977
|
-
* // CSS in JS Output
|
|
19978
|
-
* element {
|
|
19979
|
-
* background: "#ffcd64";
|
|
19980
|
-
* background: "rgba(255,205,100,0.72)";
|
|
19981
|
-
* background: "#00f";
|
|
19982
|
-
* background: "rgba(179,25,25,0.72)";
|
|
19983
|
-
* }
|
|
19984
|
-
*/
|
|
19985
|
-
|
|
19986
|
-
function toColorString(color) {
|
|
19987
|
-
if (typeof color !== 'object') throw new PolishedError(8);
|
|
19988
|
-
if (isRgba$1(color)) return rgba$1(color);
|
|
19989
|
-
if (isRgb(color)) return rgb(color);
|
|
19990
|
-
if (isHsla$1(color)) return hsla$1(color);
|
|
19991
|
-
if (isHsl(color)) return hsl(color);
|
|
19992
|
-
throw new PolishedError(8);
|
|
19831
|
+
throw new PolishedError(7);
|
|
19993
19832
|
}
|
|
19994
19833
|
|
|
19995
19834
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
@@ -20002,156 +19841,14 @@ function curried(f, length, acc) {
|
|
|
20002
19841
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20003
19842
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
20004
19843
|
};
|
|
20005
|
-
}
|
|
19844
|
+
} // eslint-disable-next-line no-redeclare
|
|
19845
|
+
|
|
20006
19846
|
|
|
20007
|
-
// eslint-disable-next-line no-redeclare
|
|
20008
19847
|
function curry(f) {
|
|
20009
19848
|
// eslint-disable-line no-redeclare
|
|
20010
19849
|
return curried(f, f.length, []);
|
|
20011
19850
|
}
|
|
20012
19851
|
|
|
20013
|
-
/**
|
|
20014
|
-
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
20015
|
-
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
20016
|
-
* the color wheel, always producing a positive hue value.
|
|
20017
|
-
*
|
|
20018
|
-
* @example
|
|
20019
|
-
* // Styles as object usage
|
|
20020
|
-
* const styles = {
|
|
20021
|
-
* background: adjustHue(180, '#448'),
|
|
20022
|
-
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
20023
|
-
* }
|
|
20024
|
-
*
|
|
20025
|
-
* // styled-components usage
|
|
20026
|
-
* const div = styled.div`
|
|
20027
|
-
* background: ${adjustHue(180, '#448')};
|
|
20028
|
-
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
20029
|
-
* `
|
|
20030
|
-
*
|
|
20031
|
-
* // CSS in JS Output
|
|
20032
|
-
* element {
|
|
20033
|
-
* background: "#888844";
|
|
20034
|
-
* background: "rgba(136,136,68,0.7)";
|
|
20035
|
-
* }
|
|
20036
|
-
*/
|
|
20037
|
-
function adjustHue(degree, color) {
|
|
20038
|
-
if (color === 'transparent') return color;
|
|
20039
|
-
var hslColor = parseToHsl(color);
|
|
20040
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20041
|
-
hue: hslColor.hue + parseFloat(degree)
|
|
20042
|
-
}));
|
|
20043
|
-
}
|
|
20044
|
-
|
|
20045
|
-
// prettier-ignore
|
|
20046
|
-
var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
|
|
20047
|
-
|
|
20048
|
-
function guard(lowerBoundary, upperBoundary, value) {
|
|
20049
|
-
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
20050
|
-
}
|
|
20051
|
-
|
|
20052
|
-
/**
|
|
20053
|
-
* Returns a string value for the darkened color.
|
|
20054
|
-
*
|
|
20055
|
-
* @example
|
|
20056
|
-
* // Styles as object usage
|
|
20057
|
-
* const styles = {
|
|
20058
|
-
* background: darken(0.2, '#FFCD64'),
|
|
20059
|
-
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
20060
|
-
* }
|
|
20061
|
-
*
|
|
20062
|
-
* // styled-components usage
|
|
20063
|
-
* const div = styled.div`
|
|
20064
|
-
* background: ${darken(0.2, '#FFCD64')};
|
|
20065
|
-
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
20066
|
-
* `
|
|
20067
|
-
*
|
|
20068
|
-
* // CSS in JS Output
|
|
20069
|
-
*
|
|
20070
|
-
* element {
|
|
20071
|
-
* background: "#ffbd31";
|
|
20072
|
-
* background: "rgba(255,189,49,0.7)";
|
|
20073
|
-
* }
|
|
20074
|
-
*/
|
|
20075
|
-
function darken(amount, color) {
|
|
20076
|
-
if (color === 'transparent') return color;
|
|
20077
|
-
var hslColor = parseToHsl(color);
|
|
20078
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20079
|
-
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
20080
|
-
}));
|
|
20081
|
-
}
|
|
20082
|
-
|
|
20083
|
-
// prettier-ignore
|
|
20084
|
-
var curriedDarken = curry /* ::<number | string, string, string> */(darken);
|
|
20085
|
-
|
|
20086
|
-
/**
|
|
20087
|
-
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
20088
|
-
* argument of the desaturate function is the amount by how much the color
|
|
20089
|
-
* intensity should be decreased.
|
|
20090
|
-
*
|
|
20091
|
-
* @example
|
|
20092
|
-
* // Styles as object usage
|
|
20093
|
-
* const styles = {
|
|
20094
|
-
* background: desaturate(0.2, '#CCCD64'),
|
|
20095
|
-
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20096
|
-
* }
|
|
20097
|
-
*
|
|
20098
|
-
* // styled-components usage
|
|
20099
|
-
* const div = styled.div`
|
|
20100
|
-
* background: ${desaturate(0.2, '#CCCD64')};
|
|
20101
|
-
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20102
|
-
* `
|
|
20103
|
-
*
|
|
20104
|
-
* // CSS in JS Output
|
|
20105
|
-
* element {
|
|
20106
|
-
* background: "#b8b979";
|
|
20107
|
-
* background: "rgba(184,185,121,0.7)";
|
|
20108
|
-
* }
|
|
20109
|
-
*/
|
|
20110
|
-
function desaturate(amount, color) {
|
|
20111
|
-
if (color === 'transparent') return color;
|
|
20112
|
-
var hslColor = parseToHsl(color);
|
|
20113
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20114
|
-
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
20115
|
-
}));
|
|
20116
|
-
}
|
|
20117
|
-
|
|
20118
|
-
// prettier-ignore
|
|
20119
|
-
var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
|
|
20120
|
-
|
|
20121
|
-
/**
|
|
20122
|
-
* Returns a string value for the lightened color.
|
|
20123
|
-
*
|
|
20124
|
-
* @example
|
|
20125
|
-
* // Styles as object usage
|
|
20126
|
-
* const styles = {
|
|
20127
|
-
* background: lighten(0.2, '#CCCD64'),
|
|
20128
|
-
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
20129
|
-
* }
|
|
20130
|
-
*
|
|
20131
|
-
* // styled-components usage
|
|
20132
|
-
* const div = styled.div`
|
|
20133
|
-
* background: ${lighten(0.2, '#FFCD64')};
|
|
20134
|
-
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
20135
|
-
* `
|
|
20136
|
-
*
|
|
20137
|
-
* // CSS in JS Output
|
|
20138
|
-
*
|
|
20139
|
-
* element {
|
|
20140
|
-
* background: "#e5e6b1";
|
|
20141
|
-
* background: "rgba(229,230,177,0.7)";
|
|
20142
|
-
* }
|
|
20143
|
-
*/
|
|
20144
|
-
function lighten(amount, color) {
|
|
20145
|
-
if (color === 'transparent') return color;
|
|
20146
|
-
var hslColor = parseToHsl(color);
|
|
20147
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20148
|
-
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
20149
|
-
}));
|
|
20150
|
-
}
|
|
20151
|
-
|
|
20152
|
-
// prettier-ignore
|
|
20153
|
-
var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
20154
|
-
|
|
20155
19852
|
/**
|
|
20156
19853
|
* 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.
|
|
20157
19854
|
*
|
|
@@ -20178,21 +19875,25 @@ var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
|
20178
19875
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
20179
19876
|
* }
|
|
20180
19877
|
*/
|
|
19878
|
+
|
|
20181
19879
|
function mix$1(weight, color, otherColor) {
|
|
20182
19880
|
if (color === 'transparent') return otherColor;
|
|
20183
19881
|
if (otherColor === 'transparent') return color;
|
|
20184
19882
|
if (weight === 0) return otherColor;
|
|
20185
19883
|
var parsedColor1 = parseToRgb(color);
|
|
19884
|
+
|
|
20186
19885
|
var color1 = _extends$1({}, parsedColor1, {
|
|
20187
19886
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20188
19887
|
});
|
|
19888
|
+
|
|
20189
19889
|
var parsedColor2 = parseToRgb(otherColor);
|
|
19890
|
+
|
|
20190
19891
|
var color2 = _extends$1({}, parsedColor2, {
|
|
20191
19892
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20192
|
-
});
|
|
20193
|
-
|
|
20194
|
-
// The formula is copied from the original Sass implementation:
|
|
19893
|
+
}); // The formula is copied from the original Sass implementation:
|
|
20195
19894
|
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
19895
|
+
|
|
19896
|
+
|
|
20196
19897
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
20197
19898
|
var x = parseFloat(weight) * 2 - 1;
|
|
20198
19899
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -20206,217 +19907,13 @@ function mix$1(weight, color, otherColor) {
|
|
|
20206
19907
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
20207
19908
|
};
|
|
20208
19909
|
return rgba$1(mixedColor);
|
|
20209
|
-
}
|
|
20210
|
-
|
|
20211
|
-
// prettier-ignore
|
|
20212
|
-
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
20213
|
-
var mix$1$1 = curriedMix;
|
|
20214
|
-
|
|
20215
|
-
/**
|
|
20216
|
-
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20217
|
-
*
|
|
20218
|
-
*
|
|
20219
|
-
* @example
|
|
20220
|
-
* // Styles as object usage
|
|
20221
|
-
* const styles = {
|
|
20222
|
-
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
20223
|
-
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
20224
|
-
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
20225
|
-
* }
|
|
20226
|
-
*
|
|
20227
|
-
* // styled-components usage
|
|
20228
|
-
* const div = styled.div`
|
|
20229
|
-
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
20230
|
-
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
20231
|
-
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
20232
|
-
* `
|
|
20233
|
-
*
|
|
20234
|
-
* // CSS in JS Output
|
|
20235
|
-
*
|
|
20236
|
-
* element {
|
|
20237
|
-
* background: "#fff";
|
|
20238
|
-
* background: "rgba(255,255,255,0.7)";
|
|
20239
|
-
* background: "rgba(255,0,0,0.7)";
|
|
20240
|
-
* }
|
|
20241
|
-
*/
|
|
20242
|
-
function opacify(amount, color) {
|
|
20243
|
-
if (color === 'transparent') return color;
|
|
20244
|
-
var parsedColor = parseToRgb(color);
|
|
20245
|
-
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20246
|
-
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20247
|
-
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
20248
|
-
});
|
|
20249
|
-
return rgba$1(colorWithAlpha);
|
|
20250
|
-
}
|
|
19910
|
+
} // prettier-ignore
|
|
20251
19911
|
|
|
20252
|
-
// prettier-ignore
|
|
20253
|
-
var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
|
|
20254
19912
|
|
|
20255
|
-
|
|
20256
|
-
|
|
20257
|
-
|
|
20258
|
-
|
|
20259
|
-
*
|
|
20260
|
-
* @example
|
|
20261
|
-
* // Styles as object usage
|
|
20262
|
-
* const styles = {
|
|
20263
|
-
* background: saturate(0.2, '#CCCD64'),
|
|
20264
|
-
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20265
|
-
* }
|
|
20266
|
-
*
|
|
20267
|
-
* // styled-components usage
|
|
20268
|
-
* const div = styled.div`
|
|
20269
|
-
* background: ${saturate(0.2, '#FFCD64')};
|
|
20270
|
-
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20271
|
-
* `
|
|
20272
|
-
*
|
|
20273
|
-
* // CSS in JS Output
|
|
20274
|
-
*
|
|
20275
|
-
* element {
|
|
20276
|
-
* background: "#e0e250";
|
|
20277
|
-
* background: "rgba(224,226,80,0.7)";
|
|
20278
|
-
* }
|
|
20279
|
-
*/
|
|
20280
|
-
function saturate(amount, color) {
|
|
20281
|
-
if (color === 'transparent') return color;
|
|
20282
|
-
var hslColor = parseToHsl(color);
|
|
20283
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20284
|
-
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
20285
|
-
}));
|
|
20286
|
-
}
|
|
20287
|
-
|
|
20288
|
-
// prettier-ignore
|
|
20289
|
-
var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
|
|
20290
|
-
|
|
20291
|
-
/**
|
|
20292
|
-
* Sets the hue of a color to the provided value. The hue range can be
|
|
20293
|
-
* from 0 and 359.
|
|
20294
|
-
*
|
|
20295
|
-
* @example
|
|
20296
|
-
* // Styles as object usage
|
|
20297
|
-
* const styles = {
|
|
20298
|
-
* background: setHue(42, '#CCCD64'),
|
|
20299
|
-
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
20300
|
-
* }
|
|
20301
|
-
*
|
|
20302
|
-
* // styled-components usage
|
|
20303
|
-
* const div = styled.div`
|
|
20304
|
-
* background: ${setHue(42, '#CCCD64')};
|
|
20305
|
-
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
20306
|
-
* `
|
|
20307
|
-
*
|
|
20308
|
-
* // CSS in JS Output
|
|
20309
|
-
* element {
|
|
20310
|
-
* background: "#cdae64";
|
|
20311
|
-
* background: "rgba(107,100,205,0.7)";
|
|
20312
|
-
* }
|
|
20313
|
-
*/
|
|
20314
|
-
function setHue(hue, color) {
|
|
20315
|
-
if (color === 'transparent') return color;
|
|
20316
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20317
|
-
hue: parseFloat(hue)
|
|
20318
|
-
}));
|
|
20319
|
-
}
|
|
20320
|
-
|
|
20321
|
-
// prettier-ignore
|
|
20322
|
-
var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
|
|
20323
|
-
|
|
20324
|
-
/**
|
|
20325
|
-
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
20326
|
-
* from 0 and 1.
|
|
20327
|
-
*
|
|
20328
|
-
* @example
|
|
20329
|
-
* // Styles as object usage
|
|
20330
|
-
* const styles = {
|
|
20331
|
-
* background: setLightness(0.2, '#CCCD64'),
|
|
20332
|
-
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
20333
|
-
* }
|
|
20334
|
-
*
|
|
20335
|
-
* // styled-components usage
|
|
20336
|
-
* const div = styled.div`
|
|
20337
|
-
* background: ${setLightness(0.2, '#CCCD64')};
|
|
20338
|
-
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
20339
|
-
* `
|
|
20340
|
-
*
|
|
20341
|
-
* // CSS in JS Output
|
|
20342
|
-
* element {
|
|
20343
|
-
* background: "#4d4d19";
|
|
20344
|
-
* background: "rgba(223,224,159,0.7)";
|
|
20345
|
-
* }
|
|
20346
|
-
*/
|
|
20347
|
-
function setLightness(lightness, color) {
|
|
20348
|
-
if (color === 'transparent') return color;
|
|
20349
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20350
|
-
lightness: parseFloat(lightness)
|
|
20351
|
-
}));
|
|
20352
|
-
}
|
|
20353
|
-
|
|
20354
|
-
// prettier-ignore
|
|
20355
|
-
var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
|
|
20356
|
-
|
|
20357
|
-
/**
|
|
20358
|
-
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
20359
|
-
* from 0 and 1.
|
|
20360
|
-
*
|
|
20361
|
-
* @example
|
|
20362
|
-
* // Styles as object usage
|
|
20363
|
-
* const styles = {
|
|
20364
|
-
* background: setSaturation(0.2, '#CCCD64'),
|
|
20365
|
-
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
20366
|
-
* }
|
|
20367
|
-
*
|
|
20368
|
-
* // styled-components usage
|
|
20369
|
-
* const div = styled.div`
|
|
20370
|
-
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
20371
|
-
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
20372
|
-
* `
|
|
20373
|
-
*
|
|
20374
|
-
* // CSS in JS Output
|
|
20375
|
-
* element {
|
|
20376
|
-
* background: "#adad84";
|
|
20377
|
-
* background: "rgba(228,229,76,0.7)";
|
|
20378
|
-
* }
|
|
20379
|
-
*/
|
|
20380
|
-
function setSaturation(saturation, color) {
|
|
20381
|
-
if (color === 'transparent') return color;
|
|
20382
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20383
|
-
saturation: parseFloat(saturation)
|
|
20384
|
-
}));
|
|
20385
|
-
}
|
|
20386
|
-
|
|
20387
|
-
// prettier-ignore
|
|
20388
|
-
var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
|
|
20389
|
-
|
|
20390
|
-
/**
|
|
20391
|
-
* Shades a color by mixing it with black. `shade` can produce
|
|
20392
|
-
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
20393
|
-
* doesn't produce hue shifts.
|
|
20394
|
-
*
|
|
20395
|
-
* @example
|
|
20396
|
-
* // Styles as object usage
|
|
20397
|
-
* const styles = {
|
|
20398
|
-
* background: shade(0.25, '#00f')
|
|
20399
|
-
* }
|
|
20400
|
-
*
|
|
20401
|
-
* // styled-components usage
|
|
20402
|
-
* const div = styled.div`
|
|
20403
|
-
* background: ${shade(0.25, '#00f')};
|
|
20404
|
-
* `
|
|
20405
|
-
*
|
|
20406
|
-
* // CSS in JS Output
|
|
20407
|
-
*
|
|
20408
|
-
* element {
|
|
20409
|
-
* background: "#00003f";
|
|
20410
|
-
* }
|
|
20411
|
-
*/
|
|
20412
|
-
|
|
20413
|
-
function shade(percentage, color) {
|
|
20414
|
-
if (color === 'transparent') return color;
|
|
20415
|
-
return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
|
|
20416
|
-
}
|
|
20417
|
-
|
|
20418
|
-
// prettier-ignore
|
|
20419
|
-
var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
19913
|
+
var curriedMix = /*#__PURE__*/curry
|
|
19914
|
+
/* ::<number | string, string, string, string> */
|
|
19915
|
+
(mix$1);
|
|
19916
|
+
var mix$1$1 = curriedMix;
|
|
20420
19917
|
|
|
20421
19918
|
/**
|
|
20422
19919
|
* Tints a color by mixing it with white. `tint` can produce
|
|
@@ -20444,51 +19941,13 @@ var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
|
20444
19941
|
function tint(percentage, color) {
|
|
20445
19942
|
if (color === 'transparent') return color;
|
|
20446
19943
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20447
|
-
}
|
|
20448
|
-
|
|
20449
|
-
// prettier-ignore
|
|
20450
|
-
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20451
|
-
var curriedTint$1 = curriedTint;
|
|
19944
|
+
} // prettier-ignore
|
|
20452
19945
|
|
|
20453
|
-
/**
|
|
20454
|
-
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20455
|
-
*
|
|
20456
|
-
*
|
|
20457
|
-
* @example
|
|
20458
|
-
* // Styles as object usage
|
|
20459
|
-
* const styles = {
|
|
20460
|
-
* background: transparentize(0.1, '#fff'),
|
|
20461
|
-
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
20462
|
-
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
20463
|
-
* }
|
|
20464
|
-
*
|
|
20465
|
-
* // styled-components usage
|
|
20466
|
-
* const div = styled.div`
|
|
20467
|
-
* background: ${transparentize(0.1, '#fff')};
|
|
20468
|
-
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
20469
|
-
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
20470
|
-
* `
|
|
20471
|
-
*
|
|
20472
|
-
* // CSS in JS Output
|
|
20473
|
-
*
|
|
20474
|
-
* element {
|
|
20475
|
-
* background: "rgba(255,255,255,0.9)";
|
|
20476
|
-
* background: "rgba(255,255,255,0.8)";
|
|
20477
|
-
* background: "rgba(255,0,0,0.3)";
|
|
20478
|
-
* }
|
|
20479
|
-
*/
|
|
20480
|
-
function transparentize(amount, color) {
|
|
20481
|
-
if (color === 'transparent') return color;
|
|
20482
|
-
var parsedColor = parseToRgb(color);
|
|
20483
|
-
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20484
|
-
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20485
|
-
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
20486
|
-
});
|
|
20487
|
-
return rgba$1(colorWithAlpha);
|
|
20488
|
-
}
|
|
20489
19946
|
|
|
20490
|
-
|
|
20491
|
-
|
|
19947
|
+
var curriedTint = /*#__PURE__*/curry
|
|
19948
|
+
/* ::<number | string, string, string> */
|
|
19949
|
+
(tint);
|
|
19950
|
+
var curriedTint$1 = curriedTint;
|
|
20492
19951
|
|
|
20493
19952
|
var linkColor = MATISSE_BLUE;
|
|
20494
19953
|
var fallbackValues$8 = {
|
|
@@ -23179,19 +22638,32 @@ var toIndexedObject = function (it) {
|
|
|
23179
22638
|
return indexedObject(requireObjectCoercible(it));
|
|
23180
22639
|
};
|
|
23181
22640
|
|
|
23182
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23183
22641
|
var documentAll = typeof document == 'object' && document.all;
|
|
23184
22642
|
|
|
22643
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
22644
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
22645
|
+
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
22646
|
+
|
|
22647
|
+
var documentAll_1 = {
|
|
22648
|
+
all: documentAll,
|
|
22649
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
22650
|
+
};
|
|
22651
|
+
|
|
22652
|
+
var documentAll$1 = documentAll_1.all;
|
|
22653
|
+
|
|
23185
22654
|
// `IsCallable` abstract operation
|
|
23186
22655
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23187
|
-
|
|
23188
|
-
|
|
23189
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
22656
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
22657
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
23190
22658
|
} : function (argument) {
|
|
23191
22659
|
return typeof argument == 'function';
|
|
23192
22660
|
};
|
|
23193
22661
|
|
|
23194
|
-
var
|
|
22662
|
+
var documentAll$2 = documentAll_1.all;
|
|
22663
|
+
|
|
22664
|
+
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
22665
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
22666
|
+
} : function (it) {
|
|
23195
22667
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23196
22668
|
};
|
|
23197
22669
|
|
|
@@ -23327,10 +22799,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
23327
22799
|
(module.exports = function (key, value) {
|
|
23328
22800
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
23329
22801
|
})('versions', []).push({
|
|
23330
|
-
version: '3.
|
|
22802
|
+
version: '3.33.3',
|
|
23331
22803
|
mode: 'global',
|
|
23332
|
-
copyright: '© 2014-
|
|
23333
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22804
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22805
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
23334
22806
|
source: 'https://github.com/zloirock/core-js'
|
|
23335
22807
|
});
|
|
23336
22808
|
});
|
|
@@ -23627,7 +23099,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23627
23099
|
|
|
23628
23100
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23629
23101
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23630
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23102
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
23631
23103
|
}
|
|
23632
23104
|
if (options && options.getter) name = 'get ' + name;
|
|
23633
23105
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23715,8 +23187,7 @@ var min$1 = Math.min;
|
|
|
23715
23187
|
// `ToLength` abstract operation
|
|
23716
23188
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23717
23189
|
var toLength = function (argument) {
|
|
23718
|
-
|
|
23719
|
-
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23190
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23720
23191
|
};
|
|
23721
23192
|
|
|
23722
23193
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23876,7 +23347,7 @@ var _export = function (options, source) {
|
|
|
23876
23347
|
} else if (STATIC) {
|
|
23877
23348
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23878
23349
|
} else {
|
|
23879
|
-
target = global_1[TARGET]
|
|
23350
|
+
target = (global_1[TARGET] || {}).prototype;
|
|
23880
23351
|
}
|
|
23881
23352
|
if (target) for (key in source) {
|
|
23882
23353
|
sourceProperty = source[key];
|
|
@@ -24139,15 +23610,11 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
24139
23610
|
} catch (error) { /* empty */ }
|
|
24140
23611
|
};
|
|
24141
23612
|
|
|
24142
|
-
var isPossiblePrototype = function (argument) {
|
|
24143
|
-
return isObject(argument) || argument === null;
|
|
24144
|
-
};
|
|
24145
|
-
|
|
24146
23613
|
var $String$4 = String;
|
|
24147
23614
|
var $TypeError$6 = TypeError;
|
|
24148
23615
|
|
|
24149
23616
|
var aPossiblePrototype = function (argument) {
|
|
24150
|
-
if (
|
|
23617
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
24151
23618
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
24152
23619
|
};
|
|
24153
23620
|
|
|
@@ -46200,7 +45667,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
46200
45667
|
_ref$dataQa = _ref.dataQa,
|
|
46201
45668
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
46202
45669
|
_ref$initialFocusSele = _ref.initialFocusSelector,
|
|
46203
|
-
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele
|
|
45670
|
+
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
|
|
45671
|
+
_ref$blurUnderlay = _ref.blurUnderlay,
|
|
45672
|
+
blurUnderlay = _ref$blurUnderlay === void 0 ? true : _ref$blurUnderlay;
|
|
46204
45673
|
var _useContext = useContext(ThemeContext),
|
|
46205
45674
|
isMobile = _useContext.isMobile;
|
|
46206
45675
|
var modalContainerRef = useRef(null);
|
|
@@ -46220,7 +45689,10 @@ var Modal$1 = function Modal(_ref) {
|
|
|
46220
45689
|
display: "flex",
|
|
46221
45690
|
flexDirection: "column",
|
|
46222
45691
|
justifyContent: "center",
|
|
46223
|
-
alignItems: "center"
|
|
45692
|
+
alignItems: "center",
|
|
45693
|
+
background: "rgba(41, 42, 51, 0.45)",
|
|
45694
|
+
backdropFilter: blurUnderlay ? "blur(4px)" : "none",
|
|
45695
|
+
WebkitBackdropFilter: blurUnderlay ? "blur(4px)" : "none"
|
|
46224
45696
|
},
|
|
46225
45697
|
dialogStyle: {
|
|
46226
45698
|
width: customWidth || "615px",
|