@thecb/components 10.4.7-beta.2 → 10.4.9-beta.0
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 +156 -657
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +156 -657
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/atoms/icons/IconQuitLarge.js +0 -1
- package/src/components/atoms/toggle-switch/ToggleSwitch.js +61 -34
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +3 -2
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -5
- package/src/components/molecules/toast-notification/ToastNotification.js +16 -12
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +38 -0
- package/src/hooks/use-toast-notification/index.js +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14180,7 +14180,7 @@ var IconQuitLarge = function IconQuitLarge(_ref) {
|
|
|
14180
14180
|
version: "1.1",
|
|
14181
14181
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14182
14182
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
14183
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
14183
|
+
}, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("polygon", {
|
|
14184
14184
|
id: "quit-large-path-1",
|
|
14185
14185
|
points: "18.9999989 6.40999946 17.589999 4.9999997 11.9999993 10.5899995 6.40999946 4.9999997 4.9999997 6.40999946 10.5899995 11.9999993 4.9999997 17.589999 6.40999946 18.9999989 11.9999993 13.409999 17.589999 18.9999989 18.9999989 17.589999 13.409999 11.9999993"
|
|
14186
14186
|
})), /*#__PURE__*/React__default.createElement("g", {
|
|
@@ -19308,6 +19308,7 @@ function _wrapNativeSuper(Class) {
|
|
|
19308
19308
|
}
|
|
19309
19309
|
|
|
19310
19310
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19311
|
+
|
|
19311
19312
|
/**
|
|
19312
19313
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19313
19314
|
* @private
|
|
@@ -19392,71 +19393,84 @@ var ERRORS = {
|
|
|
19392
19393
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19393
19394
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19394
19395
|
};
|
|
19395
|
-
|
|
19396
19396
|
/**
|
|
19397
19397
|
* super basic version of sprintf
|
|
19398
19398
|
* @private
|
|
19399
19399
|
*/
|
|
19400
|
+
|
|
19400
19401
|
function format() {
|
|
19401
19402
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19402
19403
|
args[_key] = arguments[_key];
|
|
19403
19404
|
}
|
|
19405
|
+
|
|
19404
19406
|
var a = args[0];
|
|
19405
19407
|
var b = [];
|
|
19406
19408
|
var c;
|
|
19409
|
+
|
|
19407
19410
|
for (c = 1; c < args.length; c += 1) {
|
|
19408
19411
|
b.push(args[c]);
|
|
19409
19412
|
}
|
|
19413
|
+
|
|
19410
19414
|
b.forEach(function (d) {
|
|
19411
19415
|
a = a.replace(/%[a-z]/, d);
|
|
19412
19416
|
});
|
|
19413
19417
|
return a;
|
|
19414
19418
|
}
|
|
19415
|
-
|
|
19416
19419
|
/**
|
|
19417
19420
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19418
19421
|
* in production mode.
|
|
19419
19422
|
* @private
|
|
19420
19423
|
*/
|
|
19424
|
+
|
|
19425
|
+
|
|
19421
19426
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19422
19427
|
_inheritsLoose(PolishedError, _Error);
|
|
19428
|
+
|
|
19423
19429
|
function PolishedError(code) {
|
|
19424
19430
|
var _this;
|
|
19431
|
+
|
|
19425
19432
|
if (process.env.NODE_ENV === 'production') {
|
|
19426
19433
|
_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;
|
|
19427
19434
|
} else {
|
|
19428
19435
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19429
19436
|
args[_key2 - 1] = arguments[_key2];
|
|
19430
19437
|
}
|
|
19438
|
+
|
|
19431
19439
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19432
19440
|
}
|
|
19441
|
+
|
|
19433
19442
|
return _assertThisInitialized(_this);
|
|
19434
19443
|
}
|
|
19444
|
+
|
|
19435
19445
|
return PolishedError;
|
|
19436
19446
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19437
19447
|
|
|
19438
19448
|
function colorToInt(color) {
|
|
19439
19449
|
return Math.round(color * 255);
|
|
19440
19450
|
}
|
|
19451
|
+
|
|
19441
19452
|
function convertToInt(red, green, blue) {
|
|
19442
19453
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19443
19454
|
}
|
|
19455
|
+
|
|
19444
19456
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19445
19457
|
if (convert === void 0) {
|
|
19446
19458
|
convert = convertToInt;
|
|
19447
19459
|
}
|
|
19460
|
+
|
|
19448
19461
|
if (saturation === 0) {
|
|
19449
19462
|
// achromatic
|
|
19450
19463
|
return convert(lightness, lightness, lightness);
|
|
19451
|
-
}
|
|
19464
|
+
} // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19465
|
+
|
|
19452
19466
|
|
|
19453
|
-
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19454
19467
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19455
19468
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19456
19469
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19457
19470
|
var red = 0;
|
|
19458
19471
|
var green = 0;
|
|
19459
19472
|
var blue = 0;
|
|
19473
|
+
|
|
19460
19474
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19461
19475
|
red = chroma;
|
|
19462
19476
|
green = secondComponent;
|
|
@@ -19476,6 +19490,7 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19476
19490
|
red = chroma;
|
|
19477
19491
|
blue = secondComponent;
|
|
19478
19492
|
}
|
|
19493
|
+
|
|
19479
19494
|
var lightnessModification = lightness - chroma / 2;
|
|
19480
19495
|
var finalRed = red + lightnessModification;
|
|
19481
19496
|
var finalGreen = green + lightnessModification;
|
|
@@ -19633,11 +19648,11 @@ var namedColorMap = {
|
|
|
19633
19648
|
yellow: 'ff0',
|
|
19634
19649
|
yellowgreen: '9acd32'
|
|
19635
19650
|
};
|
|
19636
|
-
|
|
19637
19651
|
/**
|
|
19638
19652
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19639
19653
|
* @private
|
|
19640
19654
|
*/
|
|
19655
|
+
|
|
19641
19656
|
function nameToHex(color) {
|
|
19642
19657
|
if (typeof color !== 'string') return color;
|
|
19643
19658
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19652,7 +19667,6 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19652
19667
|
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
19653
19668
|
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;
|
|
19654
19669
|
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;
|
|
19655
|
-
|
|
19656
19670
|
/**
|
|
19657
19671
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19658
19672
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19664,11 +19678,14 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19664
19678
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
19665
19679
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
19666
19680
|
*/
|
|
19681
|
+
|
|
19667
19682
|
function parseToRgb(color) {
|
|
19668
19683
|
if (typeof color !== 'string') {
|
|
19669
19684
|
throw new PolishedError(3);
|
|
19670
19685
|
}
|
|
19686
|
+
|
|
19671
19687
|
var normalizedColor = nameToHex(color);
|
|
19688
|
+
|
|
19672
19689
|
if (normalizedColor.match(hexRegex)) {
|
|
19673
19690
|
return {
|
|
19674
19691
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -19676,6 +19693,7 @@ function parseToRgb(color) {
|
|
|
19676
19693
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
19677
19694
|
};
|
|
19678
19695
|
}
|
|
19696
|
+
|
|
19679
19697
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
19680
19698
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
19681
19699
|
return {
|
|
@@ -19685,6 +19703,7 @@ function parseToRgb(color) {
|
|
|
19685
19703
|
alpha: alpha
|
|
19686
19704
|
};
|
|
19687
19705
|
}
|
|
19706
|
+
|
|
19688
19707
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
19689
19708
|
return {
|
|
19690
19709
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -19692,8 +19711,10 @@ function parseToRgb(color) {
|
|
|
19692
19711
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
19693
19712
|
};
|
|
19694
19713
|
}
|
|
19714
|
+
|
|
19695
19715
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
19696
19716
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
19717
|
+
|
|
19697
19718
|
return {
|
|
19698
19719
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
19699
19720
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -19701,7 +19722,9 @@ function parseToRgb(color) {
|
|
|
19701
19722
|
alpha: _alpha
|
|
19702
19723
|
};
|
|
19703
19724
|
}
|
|
19725
|
+
|
|
19704
19726
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
19727
|
+
|
|
19705
19728
|
if (rgbMatched) {
|
|
19706
19729
|
return {
|
|
19707
19730
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -19709,7 +19732,9 @@ function parseToRgb(color) {
|
|
|
19709
19732
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
19710
19733
|
};
|
|
19711
19734
|
}
|
|
19735
|
+
|
|
19712
19736
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
19737
|
+
|
|
19713
19738
|
if (rgbaMatched) {
|
|
19714
19739
|
return {
|
|
19715
19740
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -19718,32 +19743,44 @@ function parseToRgb(color) {
|
|
|
19718
19743
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
19719
19744
|
};
|
|
19720
19745
|
}
|
|
19746
|
+
|
|
19721
19747
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
19748
|
+
|
|
19722
19749
|
if (hslMatched) {
|
|
19723
19750
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
19724
19751
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
19725
19752
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
19726
19753
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
19727
19754
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
19755
|
+
|
|
19728
19756
|
if (!hslRgbMatched) {
|
|
19729
19757
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
19730
19758
|
}
|
|
19759
|
+
|
|
19731
19760
|
return {
|
|
19732
19761
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
19733
19762
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
19734
19763
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
19735
19764
|
};
|
|
19736
19765
|
}
|
|
19766
|
+
|
|
19737
19767
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
19768
|
+
|
|
19738
19769
|
if (hslaMatched) {
|
|
19739
19770
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
19771
|
+
|
|
19740
19772
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
19773
|
+
|
|
19741
19774
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
19775
|
+
|
|
19742
19776
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
19777
|
+
|
|
19743
19778
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
19779
|
+
|
|
19744
19780
|
if (!_hslRgbMatched) {
|
|
19745
19781
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
19746
19782
|
}
|
|
19783
|
+
|
|
19747
19784
|
return {
|
|
19748
19785
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
19749
19786
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -19751,80 +19788,8 @@ function parseToRgb(color) {
|
|
|
19751
19788
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
19752
19789
|
};
|
|
19753
19790
|
}
|
|
19754
|
-
throw new PolishedError(5);
|
|
19755
|
-
}
|
|
19756
|
-
|
|
19757
|
-
function rgbToHsl(color) {
|
|
19758
|
-
// make sure rgb are contained in a set of [0, 255]
|
|
19759
|
-
var red = color.red / 255;
|
|
19760
|
-
var green = color.green / 255;
|
|
19761
|
-
var blue = color.blue / 255;
|
|
19762
|
-
var max = Math.max(red, green, blue);
|
|
19763
|
-
var min = Math.min(red, green, blue);
|
|
19764
|
-
var lightness = (max + min) / 2;
|
|
19765
|
-
if (max === min) {
|
|
19766
|
-
// achromatic
|
|
19767
|
-
if (color.alpha !== undefined) {
|
|
19768
|
-
return {
|
|
19769
|
-
hue: 0,
|
|
19770
|
-
saturation: 0,
|
|
19771
|
-
lightness: lightness,
|
|
19772
|
-
alpha: color.alpha
|
|
19773
|
-
};
|
|
19774
|
-
} else {
|
|
19775
|
-
return {
|
|
19776
|
-
hue: 0,
|
|
19777
|
-
saturation: 0,
|
|
19778
|
-
lightness: lightness
|
|
19779
|
-
};
|
|
19780
|
-
}
|
|
19781
|
-
}
|
|
19782
|
-
var hue;
|
|
19783
|
-
var delta = max - min;
|
|
19784
|
-
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
19785
|
-
switch (max) {
|
|
19786
|
-
case red:
|
|
19787
|
-
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
19788
|
-
break;
|
|
19789
|
-
case green:
|
|
19790
|
-
hue = (blue - red) / delta + 2;
|
|
19791
|
-
break;
|
|
19792
|
-
default:
|
|
19793
|
-
// blue case
|
|
19794
|
-
hue = (red - green) / delta + 4;
|
|
19795
|
-
break;
|
|
19796
|
-
}
|
|
19797
|
-
hue *= 60;
|
|
19798
|
-
if (color.alpha !== undefined) {
|
|
19799
|
-
return {
|
|
19800
|
-
hue: hue,
|
|
19801
|
-
saturation: saturation,
|
|
19802
|
-
lightness: lightness,
|
|
19803
|
-
alpha: color.alpha
|
|
19804
|
-
};
|
|
19805
|
-
}
|
|
19806
|
-
return {
|
|
19807
|
-
hue: hue,
|
|
19808
|
-
saturation: saturation,
|
|
19809
|
-
lightness: lightness
|
|
19810
|
-
};
|
|
19811
|
-
}
|
|
19812
19791
|
|
|
19813
|
-
|
|
19814
|
-
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
19815
|
-
* if want to extract a color component. With the color util `toColorString` you
|
|
19816
|
-
* can convert a HslColor or HslaColor object back to a string.
|
|
19817
|
-
*
|
|
19818
|
-
* @example
|
|
19819
|
-
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
19820
|
-
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
19821
|
-
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
19822
|
-
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
19823
|
-
*/
|
|
19824
|
-
function parseToHsl(color) {
|
|
19825
|
-
// Note: At a later stage we can optimize this function as right now a hsl
|
|
19826
|
-
// color would be parsed converted to rgb values and converted back to hsl.
|
|
19827
|
-
return rgbToHsl(parseToRgb(color));
|
|
19792
|
+
throw new PolishedError(5);
|
|
19828
19793
|
}
|
|
19829
19794
|
|
|
19830
19795
|
/**
|
|
@@ -19835,8 +19800,10 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
19835
19800
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
19836
19801
|
return "#" + value[1] + value[3] + value[5];
|
|
19837
19802
|
}
|
|
19803
|
+
|
|
19838
19804
|
return value;
|
|
19839
19805
|
};
|
|
19806
|
+
|
|
19840
19807
|
var reduceHexValue$1 = reduceHexValue;
|
|
19841
19808
|
|
|
19842
19809
|
function numberToHex(value) {
|
|
@@ -19844,83 +19811,6 @@ function numberToHex(value) {
|
|
|
19844
19811
|
return hex.length === 1 ? "0" + hex : hex;
|
|
19845
19812
|
}
|
|
19846
19813
|
|
|
19847
|
-
function colorToHex(color) {
|
|
19848
|
-
return numberToHex(Math.round(color * 255));
|
|
19849
|
-
}
|
|
19850
|
-
function convertToHex(red, green, blue) {
|
|
19851
|
-
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
19852
|
-
}
|
|
19853
|
-
function hslToHex(hue, saturation, lightness) {
|
|
19854
|
-
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
19855
|
-
}
|
|
19856
|
-
|
|
19857
|
-
/**
|
|
19858
|
-
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
19859
|
-
*
|
|
19860
|
-
* @example
|
|
19861
|
-
* // Styles as object usage
|
|
19862
|
-
* const styles = {
|
|
19863
|
-
* background: hsl(359, 0.75, 0.4),
|
|
19864
|
-
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
19865
|
-
* }
|
|
19866
|
-
*
|
|
19867
|
-
* // styled-components usage
|
|
19868
|
-
* const div = styled.div`
|
|
19869
|
-
* background: ${hsl(359, 0.75, 0.4)};
|
|
19870
|
-
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
19871
|
-
* `
|
|
19872
|
-
*
|
|
19873
|
-
* // CSS in JS Output
|
|
19874
|
-
*
|
|
19875
|
-
* element {
|
|
19876
|
-
* background: "#b3191c";
|
|
19877
|
-
* background: "#b3191c";
|
|
19878
|
-
* }
|
|
19879
|
-
*/
|
|
19880
|
-
function hsl(value, saturation, lightness) {
|
|
19881
|
-
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
|
19882
|
-
return hslToHex(value, saturation, lightness);
|
|
19883
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
19884
|
-
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
19885
|
-
}
|
|
19886
|
-
throw new PolishedError(1);
|
|
19887
|
-
}
|
|
19888
|
-
|
|
19889
|
-
/**
|
|
19890
|
-
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
19891
|
-
*
|
|
19892
|
-
* @example
|
|
19893
|
-
* // Styles as object usage
|
|
19894
|
-
* const styles = {
|
|
19895
|
-
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
19896
|
-
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
19897
|
-
* background: hsla(359, 0.75, 0.4, 1),
|
|
19898
|
-
* }
|
|
19899
|
-
*
|
|
19900
|
-
* // styled-components usage
|
|
19901
|
-
* const div = styled.div`
|
|
19902
|
-
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
19903
|
-
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
19904
|
-
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
19905
|
-
* `
|
|
19906
|
-
*
|
|
19907
|
-
* // CSS in JS Output
|
|
19908
|
-
*
|
|
19909
|
-
* element {
|
|
19910
|
-
* background: "rgba(179,25,28,0.7)";
|
|
19911
|
-
* background: "rgba(179,25,28,0.7)";
|
|
19912
|
-
* background: "#b3191c";
|
|
19913
|
-
* }
|
|
19914
|
-
*/
|
|
19915
|
-
function hsla$1(value, saturation, lightness, alpha) {
|
|
19916
|
-
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
|
|
19917
|
-
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
19918
|
-
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
19919
|
-
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
19920
|
-
}
|
|
19921
|
-
throw new PolishedError(2);
|
|
19922
|
-
}
|
|
19923
|
-
|
|
19924
19814
|
/**
|
|
19925
19815
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
19926
19816
|
*
|
|
@@ -19950,6 +19840,7 @@ function rgb(value, green, blue) {
|
|
|
19950
19840
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
19951
19841
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
19952
19842
|
}
|
|
19843
|
+
|
|
19953
19844
|
throw new PolishedError(6);
|
|
19954
19845
|
}
|
|
19955
19846
|
|
|
@@ -19996,60 +19887,8 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
19996
19887
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
19997
19888
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
19998
19889
|
}
|
|
19999
|
-
throw new PolishedError(7);
|
|
20000
|
-
}
|
|
20001
|
-
|
|
20002
|
-
var isRgb = function isRgb(color) {
|
|
20003
|
-
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20004
|
-
};
|
|
20005
|
-
var isRgba$1 = function isRgba(color) {
|
|
20006
|
-
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
|
|
20007
|
-
};
|
|
20008
|
-
var isHsl = function isHsl(color) {
|
|
20009
|
-
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20010
|
-
};
|
|
20011
|
-
var isHsla$1 = function isHsla(color) {
|
|
20012
|
-
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
|
|
20013
|
-
};
|
|
20014
|
-
|
|
20015
|
-
/**
|
|
20016
|
-
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
20017
|
-
* This util is useful in case you only know on runtime which color object is
|
|
20018
|
-
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
20019
|
-
*
|
|
20020
|
-
* @example
|
|
20021
|
-
* // Styles as object usage
|
|
20022
|
-
* const styles = {
|
|
20023
|
-
* background: toColorString({ red: 255, green: 205, blue: 100 }),
|
|
20024
|
-
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
|
|
20025
|
-
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
|
|
20026
|
-
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
|
|
20027
|
-
* }
|
|
20028
|
-
*
|
|
20029
|
-
* // styled-components usage
|
|
20030
|
-
* const div = styled.div`
|
|
20031
|
-
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
20032
|
-
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
20033
|
-
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
20034
|
-
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
20035
|
-
* `
|
|
20036
|
-
*
|
|
20037
|
-
* // CSS in JS Output
|
|
20038
|
-
* element {
|
|
20039
|
-
* background: "#ffcd64";
|
|
20040
|
-
* background: "rgba(255,205,100,0.72)";
|
|
20041
|
-
* background: "#00f";
|
|
20042
|
-
* background: "rgba(179,25,25,0.72)";
|
|
20043
|
-
* }
|
|
20044
|
-
*/
|
|
20045
19890
|
|
|
20046
|
-
|
|
20047
|
-
if (typeof color !== 'object') throw new PolishedError(8);
|
|
20048
|
-
if (isRgba$1(color)) return rgba$1(color);
|
|
20049
|
-
if (isRgb(color)) return rgb(color);
|
|
20050
|
-
if (isHsla$1(color)) return hsla$1(color);
|
|
20051
|
-
if (isHsl(color)) return hsl(color);
|
|
20052
|
-
throw new PolishedError(8);
|
|
19891
|
+
throw new PolishedError(7);
|
|
20053
19892
|
}
|
|
20054
19893
|
|
|
20055
19894
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
@@ -20062,156 +19901,14 @@ function curried(f, length, acc) {
|
|
|
20062
19901
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20063
19902
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
20064
19903
|
};
|
|
20065
|
-
}
|
|
19904
|
+
} // eslint-disable-next-line no-redeclare
|
|
19905
|
+
|
|
20066
19906
|
|
|
20067
|
-
// eslint-disable-next-line no-redeclare
|
|
20068
19907
|
function curry(f) {
|
|
20069
19908
|
// eslint-disable-line no-redeclare
|
|
20070
19909
|
return curried(f, f.length, []);
|
|
20071
19910
|
}
|
|
20072
19911
|
|
|
20073
|
-
/**
|
|
20074
|
-
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
20075
|
-
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
20076
|
-
* the color wheel, always producing a positive hue value.
|
|
20077
|
-
*
|
|
20078
|
-
* @example
|
|
20079
|
-
* // Styles as object usage
|
|
20080
|
-
* const styles = {
|
|
20081
|
-
* background: adjustHue(180, '#448'),
|
|
20082
|
-
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
20083
|
-
* }
|
|
20084
|
-
*
|
|
20085
|
-
* // styled-components usage
|
|
20086
|
-
* const div = styled.div`
|
|
20087
|
-
* background: ${adjustHue(180, '#448')};
|
|
20088
|
-
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
20089
|
-
* `
|
|
20090
|
-
*
|
|
20091
|
-
* // CSS in JS Output
|
|
20092
|
-
* element {
|
|
20093
|
-
* background: "#888844";
|
|
20094
|
-
* background: "rgba(136,136,68,0.7)";
|
|
20095
|
-
* }
|
|
20096
|
-
*/
|
|
20097
|
-
function adjustHue(degree, color) {
|
|
20098
|
-
if (color === 'transparent') return color;
|
|
20099
|
-
var hslColor = parseToHsl(color);
|
|
20100
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20101
|
-
hue: hslColor.hue + parseFloat(degree)
|
|
20102
|
-
}));
|
|
20103
|
-
}
|
|
20104
|
-
|
|
20105
|
-
// prettier-ignore
|
|
20106
|
-
var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
|
|
20107
|
-
|
|
20108
|
-
function guard(lowerBoundary, upperBoundary, value) {
|
|
20109
|
-
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
20110
|
-
}
|
|
20111
|
-
|
|
20112
|
-
/**
|
|
20113
|
-
* Returns a string value for the darkened color.
|
|
20114
|
-
*
|
|
20115
|
-
* @example
|
|
20116
|
-
* // Styles as object usage
|
|
20117
|
-
* const styles = {
|
|
20118
|
-
* background: darken(0.2, '#FFCD64'),
|
|
20119
|
-
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
20120
|
-
* }
|
|
20121
|
-
*
|
|
20122
|
-
* // styled-components usage
|
|
20123
|
-
* const div = styled.div`
|
|
20124
|
-
* background: ${darken(0.2, '#FFCD64')};
|
|
20125
|
-
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
20126
|
-
* `
|
|
20127
|
-
*
|
|
20128
|
-
* // CSS in JS Output
|
|
20129
|
-
*
|
|
20130
|
-
* element {
|
|
20131
|
-
* background: "#ffbd31";
|
|
20132
|
-
* background: "rgba(255,189,49,0.7)";
|
|
20133
|
-
* }
|
|
20134
|
-
*/
|
|
20135
|
-
function darken(amount, color) {
|
|
20136
|
-
if (color === 'transparent') return color;
|
|
20137
|
-
var hslColor = parseToHsl(color);
|
|
20138
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20139
|
-
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
20140
|
-
}));
|
|
20141
|
-
}
|
|
20142
|
-
|
|
20143
|
-
// prettier-ignore
|
|
20144
|
-
var curriedDarken = curry /* ::<number | string, string, string> */(darken);
|
|
20145
|
-
|
|
20146
|
-
/**
|
|
20147
|
-
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
20148
|
-
* argument of the desaturate function is the amount by how much the color
|
|
20149
|
-
* intensity should be decreased.
|
|
20150
|
-
*
|
|
20151
|
-
* @example
|
|
20152
|
-
* // Styles as object usage
|
|
20153
|
-
* const styles = {
|
|
20154
|
-
* background: desaturate(0.2, '#CCCD64'),
|
|
20155
|
-
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20156
|
-
* }
|
|
20157
|
-
*
|
|
20158
|
-
* // styled-components usage
|
|
20159
|
-
* const div = styled.div`
|
|
20160
|
-
* background: ${desaturate(0.2, '#CCCD64')};
|
|
20161
|
-
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20162
|
-
* `
|
|
20163
|
-
*
|
|
20164
|
-
* // CSS in JS Output
|
|
20165
|
-
* element {
|
|
20166
|
-
* background: "#b8b979";
|
|
20167
|
-
* background: "rgba(184,185,121,0.7)";
|
|
20168
|
-
* }
|
|
20169
|
-
*/
|
|
20170
|
-
function desaturate(amount, color) {
|
|
20171
|
-
if (color === 'transparent') return color;
|
|
20172
|
-
var hslColor = parseToHsl(color);
|
|
20173
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20174
|
-
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
20175
|
-
}));
|
|
20176
|
-
}
|
|
20177
|
-
|
|
20178
|
-
// prettier-ignore
|
|
20179
|
-
var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
|
|
20180
|
-
|
|
20181
|
-
/**
|
|
20182
|
-
* Returns a string value for the lightened color.
|
|
20183
|
-
*
|
|
20184
|
-
* @example
|
|
20185
|
-
* // Styles as object usage
|
|
20186
|
-
* const styles = {
|
|
20187
|
-
* background: lighten(0.2, '#CCCD64'),
|
|
20188
|
-
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
20189
|
-
* }
|
|
20190
|
-
*
|
|
20191
|
-
* // styled-components usage
|
|
20192
|
-
* const div = styled.div`
|
|
20193
|
-
* background: ${lighten(0.2, '#FFCD64')};
|
|
20194
|
-
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
20195
|
-
* `
|
|
20196
|
-
*
|
|
20197
|
-
* // CSS in JS Output
|
|
20198
|
-
*
|
|
20199
|
-
* element {
|
|
20200
|
-
* background: "#e5e6b1";
|
|
20201
|
-
* background: "rgba(229,230,177,0.7)";
|
|
20202
|
-
* }
|
|
20203
|
-
*/
|
|
20204
|
-
function lighten(amount, color) {
|
|
20205
|
-
if (color === 'transparent') return color;
|
|
20206
|
-
var hslColor = parseToHsl(color);
|
|
20207
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20208
|
-
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
20209
|
-
}));
|
|
20210
|
-
}
|
|
20211
|
-
|
|
20212
|
-
// prettier-ignore
|
|
20213
|
-
var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
20214
|
-
|
|
20215
19912
|
/**
|
|
20216
19913
|
* 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.
|
|
20217
19914
|
*
|
|
@@ -20238,21 +19935,25 @@ var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
|
20238
19935
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
20239
19936
|
* }
|
|
20240
19937
|
*/
|
|
19938
|
+
|
|
20241
19939
|
function mix$1(weight, color, otherColor) {
|
|
20242
19940
|
if (color === 'transparent') return otherColor;
|
|
20243
19941
|
if (otherColor === 'transparent') return color;
|
|
20244
19942
|
if (weight === 0) return otherColor;
|
|
20245
19943
|
var parsedColor1 = parseToRgb(color);
|
|
19944
|
+
|
|
20246
19945
|
var color1 = _extends$1({}, parsedColor1, {
|
|
20247
19946
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20248
19947
|
});
|
|
19948
|
+
|
|
20249
19949
|
var parsedColor2 = parseToRgb(otherColor);
|
|
19950
|
+
|
|
20250
19951
|
var color2 = _extends$1({}, parsedColor2, {
|
|
20251
19952
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20252
|
-
});
|
|
20253
|
-
|
|
20254
|
-
// The formula is copied from the original Sass implementation:
|
|
19953
|
+
}); // The formula is copied from the original Sass implementation:
|
|
20255
19954
|
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
19955
|
+
|
|
19956
|
+
|
|
20256
19957
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
20257
19958
|
var x = parseFloat(weight) * 2 - 1;
|
|
20258
19959
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -20266,217 +19967,13 @@ function mix$1(weight, color, otherColor) {
|
|
|
20266
19967
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
20267
19968
|
};
|
|
20268
19969
|
return rgba$1(mixedColor);
|
|
20269
|
-
}
|
|
20270
|
-
|
|
20271
|
-
// prettier-ignore
|
|
20272
|
-
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
20273
|
-
var mix$1$1 = curriedMix;
|
|
20274
|
-
|
|
20275
|
-
/**
|
|
20276
|
-
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20277
|
-
*
|
|
20278
|
-
*
|
|
20279
|
-
* @example
|
|
20280
|
-
* // Styles as object usage
|
|
20281
|
-
* const styles = {
|
|
20282
|
-
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
20283
|
-
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
20284
|
-
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
20285
|
-
* }
|
|
20286
|
-
*
|
|
20287
|
-
* // styled-components usage
|
|
20288
|
-
* const div = styled.div`
|
|
20289
|
-
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
20290
|
-
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
20291
|
-
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
20292
|
-
* `
|
|
20293
|
-
*
|
|
20294
|
-
* // CSS in JS Output
|
|
20295
|
-
*
|
|
20296
|
-
* element {
|
|
20297
|
-
* background: "#fff";
|
|
20298
|
-
* background: "rgba(255,255,255,0.7)";
|
|
20299
|
-
* background: "rgba(255,0,0,0.7)";
|
|
20300
|
-
* }
|
|
20301
|
-
*/
|
|
20302
|
-
function opacify(amount, color) {
|
|
20303
|
-
if (color === 'transparent') return color;
|
|
20304
|
-
var parsedColor = parseToRgb(color);
|
|
20305
|
-
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20306
|
-
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20307
|
-
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
20308
|
-
});
|
|
20309
|
-
return rgba$1(colorWithAlpha);
|
|
20310
|
-
}
|
|
20311
|
-
|
|
20312
|
-
// prettier-ignore
|
|
20313
|
-
var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
|
|
20314
|
-
|
|
20315
|
-
/**
|
|
20316
|
-
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
20317
|
-
* argument of the saturate function is the amount by how much the color
|
|
20318
|
-
* intensity should be increased.
|
|
20319
|
-
*
|
|
20320
|
-
* @example
|
|
20321
|
-
* // Styles as object usage
|
|
20322
|
-
* const styles = {
|
|
20323
|
-
* background: saturate(0.2, '#CCCD64'),
|
|
20324
|
-
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20325
|
-
* }
|
|
20326
|
-
*
|
|
20327
|
-
* // styled-components usage
|
|
20328
|
-
* const div = styled.div`
|
|
20329
|
-
* background: ${saturate(0.2, '#FFCD64')};
|
|
20330
|
-
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20331
|
-
* `
|
|
20332
|
-
*
|
|
20333
|
-
* // CSS in JS Output
|
|
20334
|
-
*
|
|
20335
|
-
* element {
|
|
20336
|
-
* background: "#e0e250";
|
|
20337
|
-
* background: "rgba(224,226,80,0.7)";
|
|
20338
|
-
* }
|
|
20339
|
-
*/
|
|
20340
|
-
function saturate(amount, color) {
|
|
20341
|
-
if (color === 'transparent') return color;
|
|
20342
|
-
var hslColor = parseToHsl(color);
|
|
20343
|
-
return toColorString(_extends$1({}, hslColor, {
|
|
20344
|
-
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
20345
|
-
}));
|
|
20346
|
-
}
|
|
20347
|
-
|
|
20348
|
-
// prettier-ignore
|
|
20349
|
-
var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
|
|
20350
|
-
|
|
20351
|
-
/**
|
|
20352
|
-
* Sets the hue of a color to the provided value. The hue range can be
|
|
20353
|
-
* from 0 and 359.
|
|
20354
|
-
*
|
|
20355
|
-
* @example
|
|
20356
|
-
* // Styles as object usage
|
|
20357
|
-
* const styles = {
|
|
20358
|
-
* background: setHue(42, '#CCCD64'),
|
|
20359
|
-
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
20360
|
-
* }
|
|
20361
|
-
*
|
|
20362
|
-
* // styled-components usage
|
|
20363
|
-
* const div = styled.div`
|
|
20364
|
-
* background: ${setHue(42, '#CCCD64')};
|
|
20365
|
-
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
20366
|
-
* `
|
|
20367
|
-
*
|
|
20368
|
-
* // CSS in JS Output
|
|
20369
|
-
* element {
|
|
20370
|
-
* background: "#cdae64";
|
|
20371
|
-
* background: "rgba(107,100,205,0.7)";
|
|
20372
|
-
* }
|
|
20373
|
-
*/
|
|
20374
|
-
function setHue(hue, color) {
|
|
20375
|
-
if (color === 'transparent') return color;
|
|
20376
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20377
|
-
hue: parseFloat(hue)
|
|
20378
|
-
}));
|
|
20379
|
-
}
|
|
19970
|
+
} // prettier-ignore
|
|
20380
19971
|
|
|
20381
|
-
// prettier-ignore
|
|
20382
|
-
var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
|
|
20383
19972
|
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
* @example
|
|
20389
|
-
* // Styles as object usage
|
|
20390
|
-
* const styles = {
|
|
20391
|
-
* background: setLightness(0.2, '#CCCD64'),
|
|
20392
|
-
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
20393
|
-
* }
|
|
20394
|
-
*
|
|
20395
|
-
* // styled-components usage
|
|
20396
|
-
* const div = styled.div`
|
|
20397
|
-
* background: ${setLightness(0.2, '#CCCD64')};
|
|
20398
|
-
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
20399
|
-
* `
|
|
20400
|
-
*
|
|
20401
|
-
* // CSS in JS Output
|
|
20402
|
-
* element {
|
|
20403
|
-
* background: "#4d4d19";
|
|
20404
|
-
* background: "rgba(223,224,159,0.7)";
|
|
20405
|
-
* }
|
|
20406
|
-
*/
|
|
20407
|
-
function setLightness(lightness, color) {
|
|
20408
|
-
if (color === 'transparent') return color;
|
|
20409
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20410
|
-
lightness: parseFloat(lightness)
|
|
20411
|
-
}));
|
|
20412
|
-
}
|
|
20413
|
-
|
|
20414
|
-
// prettier-ignore
|
|
20415
|
-
var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
|
|
20416
|
-
|
|
20417
|
-
/**
|
|
20418
|
-
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
20419
|
-
* from 0 and 1.
|
|
20420
|
-
*
|
|
20421
|
-
* @example
|
|
20422
|
-
* // Styles as object usage
|
|
20423
|
-
* const styles = {
|
|
20424
|
-
* background: setSaturation(0.2, '#CCCD64'),
|
|
20425
|
-
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
20426
|
-
* }
|
|
20427
|
-
*
|
|
20428
|
-
* // styled-components usage
|
|
20429
|
-
* const div = styled.div`
|
|
20430
|
-
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
20431
|
-
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
20432
|
-
* `
|
|
20433
|
-
*
|
|
20434
|
-
* // CSS in JS Output
|
|
20435
|
-
* element {
|
|
20436
|
-
* background: "#adad84";
|
|
20437
|
-
* background: "rgba(228,229,76,0.7)";
|
|
20438
|
-
* }
|
|
20439
|
-
*/
|
|
20440
|
-
function setSaturation(saturation, color) {
|
|
20441
|
-
if (color === 'transparent') return color;
|
|
20442
|
-
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20443
|
-
saturation: parseFloat(saturation)
|
|
20444
|
-
}));
|
|
20445
|
-
}
|
|
20446
|
-
|
|
20447
|
-
// prettier-ignore
|
|
20448
|
-
var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
|
|
20449
|
-
|
|
20450
|
-
/**
|
|
20451
|
-
* Shades a color by mixing it with black. `shade` can produce
|
|
20452
|
-
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
20453
|
-
* doesn't produce hue shifts.
|
|
20454
|
-
*
|
|
20455
|
-
* @example
|
|
20456
|
-
* // Styles as object usage
|
|
20457
|
-
* const styles = {
|
|
20458
|
-
* background: shade(0.25, '#00f')
|
|
20459
|
-
* }
|
|
20460
|
-
*
|
|
20461
|
-
* // styled-components usage
|
|
20462
|
-
* const div = styled.div`
|
|
20463
|
-
* background: ${shade(0.25, '#00f')};
|
|
20464
|
-
* `
|
|
20465
|
-
*
|
|
20466
|
-
* // CSS in JS Output
|
|
20467
|
-
*
|
|
20468
|
-
* element {
|
|
20469
|
-
* background: "#00003f";
|
|
20470
|
-
* }
|
|
20471
|
-
*/
|
|
20472
|
-
|
|
20473
|
-
function shade(percentage, color) {
|
|
20474
|
-
if (color === 'transparent') return color;
|
|
20475
|
-
return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
|
|
20476
|
-
}
|
|
20477
|
-
|
|
20478
|
-
// prettier-ignore
|
|
20479
|
-
var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
19973
|
+
var curriedMix = /*#__PURE__*/curry
|
|
19974
|
+
/* ::<number | string, string, string, string> */
|
|
19975
|
+
(mix$1);
|
|
19976
|
+
var mix$1$1 = curriedMix;
|
|
20480
19977
|
|
|
20481
19978
|
/**
|
|
20482
19979
|
* Tints a color by mixing it with white. `tint` can produce
|
|
@@ -20504,51 +20001,13 @@ var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
|
20504
20001
|
function tint(percentage, color) {
|
|
20505
20002
|
if (color === 'transparent') return color;
|
|
20506
20003
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20507
|
-
}
|
|
20004
|
+
} // prettier-ignore
|
|
20508
20005
|
|
|
20509
|
-
// prettier-ignore
|
|
20510
|
-
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20511
|
-
var curriedTint$1 = curriedTint;
|
|
20512
20006
|
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20517
|
-
* @example
|
|
20518
|
-
* // Styles as object usage
|
|
20519
|
-
* const styles = {
|
|
20520
|
-
* background: transparentize(0.1, '#fff'),
|
|
20521
|
-
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
20522
|
-
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
20523
|
-
* }
|
|
20524
|
-
*
|
|
20525
|
-
* // styled-components usage
|
|
20526
|
-
* const div = styled.div`
|
|
20527
|
-
* background: ${transparentize(0.1, '#fff')};
|
|
20528
|
-
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
20529
|
-
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
20530
|
-
* `
|
|
20531
|
-
*
|
|
20532
|
-
* // CSS in JS Output
|
|
20533
|
-
*
|
|
20534
|
-
* element {
|
|
20535
|
-
* background: "rgba(255,255,255,0.9)";
|
|
20536
|
-
* background: "rgba(255,255,255,0.8)";
|
|
20537
|
-
* background: "rgba(255,0,0,0.3)";
|
|
20538
|
-
* }
|
|
20539
|
-
*/
|
|
20540
|
-
function transparentize(amount, color) {
|
|
20541
|
-
if (color === 'transparent') return color;
|
|
20542
|
-
var parsedColor = parseToRgb(color);
|
|
20543
|
-
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20544
|
-
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20545
|
-
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
20546
|
-
});
|
|
20547
|
-
return rgba$1(colorWithAlpha);
|
|
20548
|
-
}
|
|
20549
|
-
|
|
20550
|
-
// prettier-ignore
|
|
20551
|
-
var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
|
|
20007
|
+
var curriedTint = /*#__PURE__*/curry
|
|
20008
|
+
/* ::<number | string, string, string> */
|
|
20009
|
+
(tint);
|
|
20010
|
+
var curriedTint$1 = curriedTint;
|
|
20552
20011
|
|
|
20553
20012
|
var linkColor = MATISSE_BLUE;
|
|
20554
20013
|
var fallbackValues$8 = {
|
|
@@ -23239,19 +22698,32 @@ var toIndexedObject = function (it) {
|
|
|
23239
22698
|
return indexedObject(requireObjectCoercible(it));
|
|
23240
22699
|
};
|
|
23241
22700
|
|
|
23242
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
23243
22701
|
var documentAll = typeof document == 'object' && document.all;
|
|
23244
22702
|
|
|
22703
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
22704
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
22705
|
+
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
22706
|
+
|
|
22707
|
+
var documentAll_1 = {
|
|
22708
|
+
all: documentAll,
|
|
22709
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
22710
|
+
};
|
|
22711
|
+
|
|
22712
|
+
var documentAll$1 = documentAll_1.all;
|
|
22713
|
+
|
|
23245
22714
|
// `IsCallable` abstract operation
|
|
23246
22715
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
23247
|
-
|
|
23248
|
-
|
|
23249
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
22716
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
22717
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
23250
22718
|
} : function (argument) {
|
|
23251
22719
|
return typeof argument == 'function';
|
|
23252
22720
|
};
|
|
23253
22721
|
|
|
23254
|
-
var
|
|
22722
|
+
var documentAll$2 = documentAll_1.all;
|
|
22723
|
+
|
|
22724
|
+
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
22725
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
22726
|
+
} : function (it) {
|
|
23255
22727
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
23256
22728
|
};
|
|
23257
22729
|
|
|
@@ -23387,10 +22859,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
23387
22859
|
(module.exports = function (key, value) {
|
|
23388
22860
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
23389
22861
|
})('versions', []).push({
|
|
23390
|
-
version: '3.
|
|
22862
|
+
version: '3.33.3',
|
|
23391
22863
|
mode: 'global',
|
|
23392
|
-
copyright: '© 2014-
|
|
23393
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22864
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22865
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
23394
22866
|
source: 'https://github.com/zloirock/core-js'
|
|
23395
22867
|
});
|
|
23396
22868
|
});
|
|
@@ -23687,7 +23159,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23687
23159
|
|
|
23688
23160
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23689
23161
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23690
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23162
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
23691
23163
|
}
|
|
23692
23164
|
if (options && options.getter) name = 'get ' + name;
|
|
23693
23165
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23775,8 +23247,7 @@ var min$1 = Math.min;
|
|
|
23775
23247
|
// `ToLength` abstract operation
|
|
23776
23248
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23777
23249
|
var toLength = function (argument) {
|
|
23778
|
-
|
|
23779
|
-
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23250
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23780
23251
|
};
|
|
23781
23252
|
|
|
23782
23253
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23936,7 +23407,7 @@ var _export = function (options, source) {
|
|
|
23936
23407
|
} else if (STATIC) {
|
|
23937
23408
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23938
23409
|
} else {
|
|
23939
|
-
target = global_1[TARGET]
|
|
23410
|
+
target = (global_1[TARGET] || {}).prototype;
|
|
23940
23411
|
}
|
|
23941
23412
|
if (target) for (key in source) {
|
|
23942
23413
|
sourceProperty = source[key];
|
|
@@ -24199,15 +23670,11 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
24199
23670
|
} catch (error) { /* empty */ }
|
|
24200
23671
|
};
|
|
24201
23672
|
|
|
24202
|
-
var isPossiblePrototype = function (argument) {
|
|
24203
|
-
return isObject(argument) || argument === null;
|
|
24204
|
-
};
|
|
24205
|
-
|
|
24206
23673
|
var $String$4 = String;
|
|
24207
23674
|
var $TypeError$6 = TypeError;
|
|
24208
23675
|
|
|
24209
23676
|
var aPossiblePrototype = function (argument) {
|
|
24210
|
-
if (
|
|
23677
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
24211
23678
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
24212
23679
|
};
|
|
24213
23680
|
|
|
@@ -25994,7 +25461,7 @@ var useToastNotification = function useToastNotification() {
|
|
|
25994
25461
|
toastState = _useState2[0],
|
|
25995
25462
|
setToastState = _useState2[1];
|
|
25996
25463
|
React.useEffect(function () {
|
|
25997
|
-
if (toastState.isOpen) {
|
|
25464
|
+
if (toastState.isOpen && timeout > 0) {
|
|
25998
25465
|
setTimeout(function () {
|
|
25999
25466
|
setToastState(initialToastState);
|
|
26000
25467
|
}, timeout);
|
|
@@ -38771,17 +38238,17 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
38771
38238
|
};
|
|
38772
38239
|
|
|
38773
38240
|
var onBackground = "".concat(MATISSE_BLUE);
|
|
38774
|
-
var disabledBackground = "".concat(
|
|
38775
|
-
var disabledBackgroundLight = "".concat(ATHENS_GREY);
|
|
38241
|
+
var disabledBackground = "".concat(IRON_GREY);
|
|
38776
38242
|
var white = "".concat(WHITE);
|
|
38243
|
+
var offBackground = "".concat(REGENT_GREY);
|
|
38777
38244
|
var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
|
|
38778
38245
|
var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
|
|
38779
38246
|
var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
|
|
38780
38247
|
var fallbackValues$y = {
|
|
38781
38248
|
onBackground: onBackground,
|
|
38782
38249
|
disabledBackground: disabledBackground,
|
|
38783
|
-
disabledBackgroundLight: disabledBackgroundLight,
|
|
38784
38250
|
white: white,
|
|
38251
|
+
offBackground: offBackground,
|
|
38785
38252
|
rightLabelStyles: rightLabelStyles,
|
|
38786
38253
|
leftLabelStyles: leftLabelStyles
|
|
38787
38254
|
};
|
|
@@ -38799,7 +38266,7 @@ var HiddenToggleSwitchBox = styled__default.input.withConfig({
|
|
|
38799
38266
|
var VisibleSwitchComponent = styled__default.label.withConfig({
|
|
38800
38267
|
displayName: "ToggleSwitch__VisibleSwitchComponent",
|
|
38801
38268
|
componentId: "sc-1t51u6v-1"
|
|
38802
|
-
})(["width:
|
|
38269
|
+
})(["width:48px;height:24px;border-radius:48px;border:none;position:relative;box-sizing:border-box;cursor:", ";display:inline-block;&:hover{box-shadow:", ";}&:focus{box-shadow:0px 2px 5px 0px rgba(0,0,0,0.5);}", ""], function (_ref3) {
|
|
38803
38270
|
var disabled = _ref3.disabled;
|
|
38804
38271
|
return disabled ? "auto" : "pointer";
|
|
38805
38272
|
}, function (_ref4) {
|
|
@@ -38809,10 +38276,14 @@ var VisibleSwitchComponent = styled__default.label.withConfig({
|
|
|
38809
38276
|
var isMobile = _ref5.isMobile;
|
|
38810
38277
|
return isMobile ? "transform: scale(0.75)" : "";
|
|
38811
38278
|
});
|
|
38812
|
-
var
|
|
38813
|
-
displayName: "
|
|
38279
|
+
var ToggleSwitchMiddleRingComponent = styled__default.div.withConfig({
|
|
38280
|
+
displayName: "ToggleSwitch__ToggleSwitchMiddleRingComponent",
|
|
38814
38281
|
componentId: "sc-1t51u6v-2"
|
|
38815
|
-
})(["position:absolute;width:
|
|
38282
|
+
})(["position:absolute;width:20px;height:20px;border:none;border-radius:50%;box-sizing:border-box;"]);
|
|
38283
|
+
var ToggleSwitchInnerRingComponent = styled__default.div.withConfig({
|
|
38284
|
+
displayName: "ToggleSwitch__ToggleSwitchInnerRingComponent",
|
|
38285
|
+
componentId: "sc-1t51u6v-3"
|
|
38286
|
+
})(["position:absolute;width:14px;height:14px;top:3px;left:3px;right:3px;bottom:3px;border-radius:50%;box-sizing:border-box;"]);
|
|
38816
38287
|
var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
38817
38288
|
var _ref6$isOn = _ref6.isOn,
|
|
38818
38289
|
isOn = _ref6$isOn === void 0 ? false : _ref6$isOn,
|
|
@@ -38829,30 +38300,52 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
38829
38300
|
themeValues = _ref6.themeValues,
|
|
38830
38301
|
isMobile = _ref6.isMobile,
|
|
38831
38302
|
dataQa = _ref6.dataQa;
|
|
38832
|
-
var
|
|
38303
|
+
var ToggleSwitchInnerRing = posed(ToggleSwitchInnerRingComponent)({
|
|
38304
|
+
off: {
|
|
38305
|
+
backgroundColor: themeValues.offBackground,
|
|
38306
|
+
transition: {
|
|
38307
|
+
ease: "easeOut"
|
|
38308
|
+
}
|
|
38309
|
+
},
|
|
38310
|
+
on: {
|
|
38311
|
+
backgroundColor: themeValues.onBackground,
|
|
38312
|
+
transition: {
|
|
38313
|
+
ease: "easeIn"
|
|
38314
|
+
}
|
|
38315
|
+
},
|
|
38316
|
+
disabled: {
|
|
38317
|
+
backgroundColor: themeValues.disabledBackground
|
|
38318
|
+
}
|
|
38319
|
+
});
|
|
38320
|
+
var ToggleSwitchMiddleRing = posed(ToggleSwitchMiddleRingComponent)({
|
|
38833
38321
|
off: {
|
|
38834
|
-
backgroundColor:
|
|
38835
|
-
left: "
|
|
38836
|
-
top: "
|
|
38837
|
-
bottom: "
|
|
38838
|
-
right: "
|
|
38322
|
+
backgroundColor: themeValues.white,
|
|
38323
|
+
left: "2px",
|
|
38324
|
+
top: "2px",
|
|
38325
|
+
bottom: "2px",
|
|
38326
|
+
right: "24px",
|
|
38839
38327
|
transition: {
|
|
38840
38328
|
ease: "backIn"
|
|
38841
38329
|
}
|
|
38842
38330
|
},
|
|
38843
38331
|
on: {
|
|
38844
38332
|
backgroundColor: themeValues.white,
|
|
38845
|
-
right: "
|
|
38846
|
-
top: "
|
|
38847
|
-
bottom: "
|
|
38848
|
-
left: "
|
|
38333
|
+
right: "1px",
|
|
38334
|
+
top: "2px",
|
|
38335
|
+
bottom: "2px",
|
|
38336
|
+
left: "25px",
|
|
38849
38337
|
transition: {
|
|
38850
38338
|
ease: "backIn"
|
|
38851
38339
|
}
|
|
38340
|
+
},
|
|
38341
|
+
disabled: {
|
|
38342
|
+
backgroundColor: themeValues.white,
|
|
38343
|
+
left: "2px",
|
|
38344
|
+
top: "2px",
|
|
38345
|
+
bottom: "2px",
|
|
38346
|
+
right: "24px"
|
|
38852
38347
|
}
|
|
38853
38348
|
});
|
|
38854
|
-
|
|
38855
|
-
// to do: for disabled, background color should not be white (should be lighter disabled background)
|
|
38856
38349
|
var VisibleSwitch = posed(VisibleSwitchComponent)({
|
|
38857
38350
|
focusable: true,
|
|
38858
38351
|
hoverable: true,
|
|
@@ -38865,20 +38358,19 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
38865
38358
|
boxShadow: "0px 2px 5px 0px rgba(0,0,0,0.5)"
|
|
38866
38359
|
},
|
|
38867
38360
|
off: {
|
|
38868
|
-
|
|
38869
|
-
backgroundColor: disabled ? themeValues.disabledBackgroundLight : themeValues.white,
|
|
38870
|
-
borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
|
|
38361
|
+
backgroundColor: themeValues.offBackground,
|
|
38871
38362
|
transition: {
|
|
38872
38363
|
ease: "easeOut"
|
|
38873
38364
|
}
|
|
38874
38365
|
},
|
|
38875
38366
|
on: {
|
|
38876
|
-
|
|
38877
|
-
backgroundColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
|
|
38878
|
-
borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
|
|
38367
|
+
backgroundColor: themeValues.onBackground,
|
|
38879
38368
|
transition: {
|
|
38880
38369
|
ease: "easeIn"
|
|
38881
38370
|
}
|
|
38371
|
+
},
|
|
38372
|
+
disabled: {
|
|
38373
|
+
backgroundColor: themeValues.disabledBackground
|
|
38882
38374
|
}
|
|
38883
38375
|
});
|
|
38884
38376
|
var handleKeyDown = function handleKeyDown(e) {
|
|
@@ -38913,11 +38405,11 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
38913
38405
|
htmlFor: "#toggle-".concat(name),
|
|
38914
38406
|
onClick: disabled ? noop : onToggle,
|
|
38915
38407
|
onKeyDown: disabled ? noop : handleKeyDown,
|
|
38916
|
-
pose: isOn ? "on" : "off",
|
|
38408
|
+
pose: disabled ? "disabled" : isOn ? "on" : "off",
|
|
38917
38409
|
tabIndex: disabled ? -1 : 0,
|
|
38918
38410
|
disabled: disabled,
|
|
38919
38411
|
isMobile: isMobile
|
|
38920
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
38412
|
+
}, /*#__PURE__*/React__default.createElement(ToggleSwitchMiddleRing, null, /*#__PURE__*/React__default.createElement(ToggleSwitchInnerRing, null))))), label && /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
38921
38413
|
variant: "h4",
|
|
38922
38414
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
38923
38415
|
extraStyles: "margin: 0 0.5rem; position: relative; bottom: 1px; display: inline-block;",
|
|
@@ -49894,7 +49386,9 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
49894
49386
|
height = _ref$height === void 0 ? "56px" : _ref$height,
|
|
49895
49387
|
_ref$childGap = _ref.childGap,
|
|
49896
49388
|
childGap = _ref$childGap === void 0 ? "1rem" : _ref$childGap,
|
|
49897
|
-
backgroundColor = _ref.backgroundColor
|
|
49389
|
+
backgroundColor = _ref.backgroundColor,
|
|
49390
|
+
_ref$role = _ref.role,
|
|
49391
|
+
role = _ref$role === void 0 ? "alert" : _ref$role;
|
|
49898
49392
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
49899
49393
|
onClick: closeToastNotification,
|
|
49900
49394
|
background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === VARIANTS.ERROR ? ERROR_BACKGROUND_COLOR : WHITE,
|
|
@@ -49905,7 +49399,12 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
49905
49399
|
padding: "0rem 1rem",
|
|
49906
49400
|
borderRadius: "4px",
|
|
49907
49401
|
boxShadow: generateShadows().standard.base,
|
|
49908
|
-
extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n ")
|
|
49402
|
+
extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n "),
|
|
49403
|
+
role: role
|
|
49404
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
49405
|
+
align: "center",
|
|
49406
|
+
childGap: childGap,
|
|
49407
|
+
justify: "space-between"
|
|
49909
49408
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
49910
49409
|
align: "center",
|
|
49911
49410
|
childGap: childGap
|
|
@@ -49915,7 +49414,7 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
49915
49414
|
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
49916
49415
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
49917
49416
|
extraStyles: "word-break: break-word;"
|
|
49918
|
-
}, message)), /*#__PURE__*/React__default.createElement(IconQuitLarge, null)));
|
|
49417
|
+
}, message))), /*#__PURE__*/React__default.createElement(IconQuitLarge, null)));
|
|
49919
49418
|
};
|
|
49920
49419
|
|
|
49921
49420
|
var fontWeight$9 = "600";
|