@thecb/components 10.4.9-beta.0 → 10.5.0-beta.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 +940 -130
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +30 -18
- package/dist/index.esm.js +940 -130
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/icons/IconQuitLarge.js +1 -0
- package/src/components/molecules/modal/Modal.js +6 -217
- package/src/components/molecules/modal/Modal.stories.js +48 -6
- package/src/components/molecules/modal/ModalControlV1.js +221 -0
- package/src/components/molecules/modal/ModalControlV2.js +180 -0
- package/src/components/molecules/modal/__private__/ButtonLayoutWrapper.js +24 -0
- package/src/components/molecules/modal/__private__/CancelButton.js +30 -0
- package/src/components/molecules/modal/__private__/CloseButton.js +29 -0
- package/src/components/molecules/modal/__private__/ContinueButton.js +39 -0
- package/src/components/molecules/modal/__private__/index.d.ts +46 -0
- package/src/components/molecules/modal/__private__/index.js +4 -0
- package/src/components/molecules/toast-notification/ToastNotification.js +12 -16
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +0 -38
- package/src/constants/style_constants.d.ts +10 -6
- package/src/constants/style_constants.js +13 -21
- package/src/hooks/use-toast-notification/index.js +1 -1
- package/src/.DS_Store +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -4908,27 +4908,35 @@ var themeUtils = /*#__PURE__*/Object.freeze({
|
|
|
4908
4908
|
|
|
4909
4909
|
/* These are constants used by nav frontend components */
|
|
4910
4910
|
|
|
4911
|
-
var
|
|
4912
|
-
var
|
|
4913
|
-
var SPACER_HEIGHT = "65px";
|
|
4914
|
-
var JUMBO_HEIGHT = "300px";
|
|
4915
|
-
var COMPACT_JUMBO_HEIGHT = "65px";
|
|
4911
|
+
var BORDER_THIN = "1px";
|
|
4912
|
+
var CORNER_STANDARD = "4px";
|
|
4916
4913
|
var FONT_WEIGHT_REGULAR = "400";
|
|
4917
|
-
var FONT_WEIGHT_BOLD = "700";
|
|
4918
4914
|
var FONT_WEIGHT_SEMIBOLD = "600";
|
|
4915
|
+
var FONT_WEIGHT_BOLD = "700";
|
|
4916
|
+
var FOOTER_HEIGHT = "100px";
|
|
4917
|
+
var HEADER_HEIGHT = "104px";
|
|
4918
|
+
var COMPACT_JUMBO_HEIGHT = "65px";
|
|
4919
|
+
var JUMBO_HEIGHT = "300px";
|
|
4920
|
+
var SPACER_HEIGHT = "65px";
|
|
4919
4921
|
var LINK_TEXT_DECORATION = "underline solid 1px";
|
|
4922
|
+
var SPACING_XS = "1.0rem";
|
|
4923
|
+
var SPACING_NORMAL = "1.5rem";
|
|
4920
4924
|
|
|
4921
4925
|
var style_constants = /*#__PURE__*/Object.freeze({
|
|
4922
4926
|
__proto__: null,
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
SPACER_HEIGHT: SPACER_HEIGHT,
|
|
4926
|
-
JUMBO_HEIGHT: JUMBO_HEIGHT,
|
|
4927
|
-
COMPACT_JUMBO_HEIGHT: COMPACT_JUMBO_HEIGHT,
|
|
4927
|
+
BORDER_THIN: BORDER_THIN,
|
|
4928
|
+
CORNER_STANDARD: CORNER_STANDARD,
|
|
4928
4929
|
FONT_WEIGHT_REGULAR: FONT_WEIGHT_REGULAR,
|
|
4929
|
-
FONT_WEIGHT_BOLD: FONT_WEIGHT_BOLD,
|
|
4930
4930
|
FONT_WEIGHT_SEMIBOLD: FONT_WEIGHT_SEMIBOLD,
|
|
4931
|
-
|
|
4931
|
+
FONT_WEIGHT_BOLD: FONT_WEIGHT_BOLD,
|
|
4932
|
+
FOOTER_HEIGHT: FOOTER_HEIGHT,
|
|
4933
|
+
HEADER_HEIGHT: HEADER_HEIGHT,
|
|
4934
|
+
COMPACT_JUMBO_HEIGHT: COMPACT_JUMBO_HEIGHT,
|
|
4935
|
+
JUMBO_HEIGHT: JUMBO_HEIGHT,
|
|
4936
|
+
SPACER_HEIGHT: SPACER_HEIGHT,
|
|
4937
|
+
LINK_TEXT_DECORATION: LINK_TEXT_DECORATION,
|
|
4938
|
+
SPACING_XS: SPACING_XS,
|
|
4939
|
+
SPACING_NORMAL: SPACING_NORMAL
|
|
4932
4940
|
});
|
|
4933
4941
|
|
|
4934
4942
|
/*
|
|
@@ -14180,7 +14188,7 @@ var IconQuitLarge = function IconQuitLarge(_ref) {
|
|
|
14180
14188
|
version: "1.1",
|
|
14181
14189
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14182
14190
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
14183
|
-
}, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("polygon", {
|
|
14191
|
+
}, /*#__PURE__*/React__default.createElement("title", null, "Icon/X"), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("polygon", {
|
|
14184
14192
|
id: "quit-large-path-1",
|
|
14185
14193
|
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
14194
|
})), /*#__PURE__*/React__default.createElement("g", {
|
|
@@ -19308,7 +19316,6 @@ function _wrapNativeSuper(Class) {
|
|
|
19308
19316
|
}
|
|
19309
19317
|
|
|
19310
19318
|
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19311
|
-
|
|
19312
19319
|
/**
|
|
19313
19320
|
* Parse errors.md and turn it into a simple hash of code: message
|
|
19314
19321
|
* @private
|
|
@@ -19393,84 +19400,71 @@ var ERRORS = {
|
|
|
19393
19400
|
"77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
19394
19401
|
"78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
19395
19402
|
};
|
|
19403
|
+
|
|
19396
19404
|
/**
|
|
19397
19405
|
* super basic version of sprintf
|
|
19398
19406
|
* @private
|
|
19399
19407
|
*/
|
|
19400
|
-
|
|
19401
19408
|
function format() {
|
|
19402
19409
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19403
19410
|
args[_key] = arguments[_key];
|
|
19404
19411
|
}
|
|
19405
|
-
|
|
19406
19412
|
var a = args[0];
|
|
19407
19413
|
var b = [];
|
|
19408
19414
|
var c;
|
|
19409
|
-
|
|
19410
19415
|
for (c = 1; c < args.length; c += 1) {
|
|
19411
19416
|
b.push(args[c]);
|
|
19412
19417
|
}
|
|
19413
|
-
|
|
19414
19418
|
b.forEach(function (d) {
|
|
19415
19419
|
a = a.replace(/%[a-z]/, d);
|
|
19416
19420
|
});
|
|
19417
19421
|
return a;
|
|
19418
19422
|
}
|
|
19423
|
+
|
|
19419
19424
|
/**
|
|
19420
19425
|
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19421
19426
|
* in production mode.
|
|
19422
19427
|
* @private
|
|
19423
19428
|
*/
|
|
19424
|
-
|
|
19425
|
-
|
|
19426
19429
|
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19427
19430
|
_inheritsLoose(PolishedError, _Error);
|
|
19428
|
-
|
|
19429
19431
|
function PolishedError(code) {
|
|
19430
19432
|
var _this;
|
|
19431
|
-
|
|
19432
19433
|
if (process.env.NODE_ENV === 'production') {
|
|
19433
19434
|
_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;
|
|
19434
19435
|
} else {
|
|
19435
19436
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19436
19437
|
args[_key2 - 1] = arguments[_key2];
|
|
19437
19438
|
}
|
|
19438
|
-
|
|
19439
19439
|
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19440
19440
|
}
|
|
19441
|
-
|
|
19442
19441
|
return _assertThisInitialized(_this);
|
|
19443
19442
|
}
|
|
19444
|
-
|
|
19445
19443
|
return PolishedError;
|
|
19446
19444
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19447
19445
|
|
|
19448
19446
|
function colorToInt(color) {
|
|
19449
19447
|
return Math.round(color * 255);
|
|
19450
19448
|
}
|
|
19451
|
-
|
|
19452
19449
|
function convertToInt(red, green, blue) {
|
|
19453
19450
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19454
19451
|
}
|
|
19455
|
-
|
|
19456
19452
|
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19457
19453
|
if (convert === void 0) {
|
|
19458
19454
|
convert = convertToInt;
|
|
19459
19455
|
}
|
|
19460
|
-
|
|
19461
19456
|
if (saturation === 0) {
|
|
19462
19457
|
// achromatic
|
|
19463
19458
|
return convert(lightness, lightness, lightness);
|
|
19464
|
-
}
|
|
19465
|
-
|
|
19459
|
+
}
|
|
19466
19460
|
|
|
19461
|
+
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19467
19462
|
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19468
19463
|
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19469
19464
|
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19470
19465
|
var red = 0;
|
|
19471
19466
|
var green = 0;
|
|
19472
19467
|
var blue = 0;
|
|
19473
|
-
|
|
19474
19468
|
if (huePrime >= 0 && huePrime < 1) {
|
|
19475
19469
|
red = chroma;
|
|
19476
19470
|
green = secondComponent;
|
|
@@ -19490,7 +19484,6 @@ function hslToRgb(hue, saturation, lightness, convert) {
|
|
|
19490
19484
|
red = chroma;
|
|
19491
19485
|
blue = secondComponent;
|
|
19492
19486
|
}
|
|
19493
|
-
|
|
19494
19487
|
var lightnessModification = lightness - chroma / 2;
|
|
19495
19488
|
var finalRed = red + lightnessModification;
|
|
19496
19489
|
var finalGreen = green + lightnessModification;
|
|
@@ -19648,11 +19641,11 @@ var namedColorMap = {
|
|
|
19648
19641
|
yellow: 'ff0',
|
|
19649
19642
|
yellowgreen: '9acd32'
|
|
19650
19643
|
};
|
|
19644
|
+
|
|
19651
19645
|
/**
|
|
19652
19646
|
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
19653
19647
|
* @private
|
|
19654
19648
|
*/
|
|
19655
|
-
|
|
19656
19649
|
function nameToHex(color) {
|
|
19657
19650
|
if (typeof color !== 'string') return color;
|
|
19658
19651
|
var normalizedColorName = color.toLowerCase();
|
|
@@ -19667,6 +19660,7 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
|
|
|
19667
19660
|
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
19668
19661
|
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;
|
|
19669
19662
|
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;
|
|
19663
|
+
|
|
19670
19664
|
/**
|
|
19671
19665
|
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
19672
19666
|
* if want to extract a color component. With the color util `toColorString` you
|
|
@@ -19678,14 +19672,11 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
|
|
|
19678
19672
|
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
19679
19673
|
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
19680
19674
|
*/
|
|
19681
|
-
|
|
19682
19675
|
function parseToRgb(color) {
|
|
19683
19676
|
if (typeof color !== 'string') {
|
|
19684
19677
|
throw new PolishedError(3);
|
|
19685
19678
|
}
|
|
19686
|
-
|
|
19687
19679
|
var normalizedColor = nameToHex(color);
|
|
19688
|
-
|
|
19689
19680
|
if (normalizedColor.match(hexRegex)) {
|
|
19690
19681
|
return {
|
|
19691
19682
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -19693,7 +19684,6 @@ function parseToRgb(color) {
|
|
|
19693
19684
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
19694
19685
|
};
|
|
19695
19686
|
}
|
|
19696
|
-
|
|
19697
19687
|
if (normalizedColor.match(hexRgbaRegex)) {
|
|
19698
19688
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
19699
19689
|
return {
|
|
@@ -19703,7 +19693,6 @@ function parseToRgb(color) {
|
|
|
19703
19693
|
alpha: alpha
|
|
19704
19694
|
};
|
|
19705
19695
|
}
|
|
19706
|
-
|
|
19707
19696
|
if (normalizedColor.match(reducedHexRegex)) {
|
|
19708
19697
|
return {
|
|
19709
19698
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -19711,10 +19700,8 @@ function parseToRgb(color) {
|
|
|
19711
19700
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
19712
19701
|
};
|
|
19713
19702
|
}
|
|
19714
|
-
|
|
19715
19703
|
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
19716
19704
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
19717
|
-
|
|
19718
19705
|
return {
|
|
19719
19706
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
19720
19707
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
@@ -19722,9 +19709,7 @@ function parseToRgb(color) {
|
|
|
19722
19709
|
alpha: _alpha
|
|
19723
19710
|
};
|
|
19724
19711
|
}
|
|
19725
|
-
|
|
19726
19712
|
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
19727
|
-
|
|
19728
19713
|
if (rgbMatched) {
|
|
19729
19714
|
return {
|
|
19730
19715
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -19732,9 +19717,7 @@ function parseToRgb(color) {
|
|
|
19732
19717
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
19733
19718
|
};
|
|
19734
19719
|
}
|
|
19735
|
-
|
|
19736
19720
|
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
19737
|
-
|
|
19738
19721
|
if (rgbaMatched) {
|
|
19739
19722
|
return {
|
|
19740
19723
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -19743,44 +19726,32 @@ function parseToRgb(color) {
|
|
|
19743
19726
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
19744
19727
|
};
|
|
19745
19728
|
}
|
|
19746
|
-
|
|
19747
19729
|
var hslMatched = hslRegex.exec(normalizedColor);
|
|
19748
|
-
|
|
19749
19730
|
if (hslMatched) {
|
|
19750
19731
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
19751
19732
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
19752
19733
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
19753
19734
|
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
19754
19735
|
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
19755
|
-
|
|
19756
19736
|
if (!hslRgbMatched) {
|
|
19757
19737
|
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
19758
19738
|
}
|
|
19759
|
-
|
|
19760
19739
|
return {
|
|
19761
19740
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
19762
19741
|
green: parseInt("" + hslRgbMatched[2], 10),
|
|
19763
19742
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
19764
19743
|
};
|
|
19765
19744
|
}
|
|
19766
|
-
|
|
19767
19745
|
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
19768
|
-
|
|
19769
19746
|
if (hslaMatched) {
|
|
19770
19747
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
19771
|
-
|
|
19772
19748
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
19773
|
-
|
|
19774
19749
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
19775
|
-
|
|
19776
19750
|
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
19777
|
-
|
|
19778
19751
|
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
19779
|
-
|
|
19780
19752
|
if (!_hslRgbMatched) {
|
|
19781
19753
|
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
19782
19754
|
}
|
|
19783
|
-
|
|
19784
19755
|
return {
|
|
19785
19756
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
19786
19757
|
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
@@ -19788,10 +19759,82 @@ function parseToRgb(color) {
|
|
|
19788
19759
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
19789
19760
|
};
|
|
19790
19761
|
}
|
|
19791
|
-
|
|
19792
19762
|
throw new PolishedError(5);
|
|
19793
19763
|
}
|
|
19794
19764
|
|
|
19765
|
+
function rgbToHsl(color) {
|
|
19766
|
+
// make sure rgb are contained in a set of [0, 255]
|
|
19767
|
+
var red = color.red / 255;
|
|
19768
|
+
var green = color.green / 255;
|
|
19769
|
+
var blue = color.blue / 255;
|
|
19770
|
+
var max = Math.max(red, green, blue);
|
|
19771
|
+
var min = Math.min(red, green, blue);
|
|
19772
|
+
var lightness = (max + min) / 2;
|
|
19773
|
+
if (max === min) {
|
|
19774
|
+
// achromatic
|
|
19775
|
+
if (color.alpha !== undefined) {
|
|
19776
|
+
return {
|
|
19777
|
+
hue: 0,
|
|
19778
|
+
saturation: 0,
|
|
19779
|
+
lightness: lightness,
|
|
19780
|
+
alpha: color.alpha
|
|
19781
|
+
};
|
|
19782
|
+
} else {
|
|
19783
|
+
return {
|
|
19784
|
+
hue: 0,
|
|
19785
|
+
saturation: 0,
|
|
19786
|
+
lightness: lightness
|
|
19787
|
+
};
|
|
19788
|
+
}
|
|
19789
|
+
}
|
|
19790
|
+
var hue;
|
|
19791
|
+
var delta = max - min;
|
|
19792
|
+
var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
|
|
19793
|
+
switch (max) {
|
|
19794
|
+
case red:
|
|
19795
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
19796
|
+
break;
|
|
19797
|
+
case green:
|
|
19798
|
+
hue = (blue - red) / delta + 2;
|
|
19799
|
+
break;
|
|
19800
|
+
default:
|
|
19801
|
+
// blue case
|
|
19802
|
+
hue = (red - green) / delta + 4;
|
|
19803
|
+
break;
|
|
19804
|
+
}
|
|
19805
|
+
hue *= 60;
|
|
19806
|
+
if (color.alpha !== undefined) {
|
|
19807
|
+
return {
|
|
19808
|
+
hue: hue,
|
|
19809
|
+
saturation: saturation,
|
|
19810
|
+
lightness: lightness,
|
|
19811
|
+
alpha: color.alpha
|
|
19812
|
+
};
|
|
19813
|
+
}
|
|
19814
|
+
return {
|
|
19815
|
+
hue: hue,
|
|
19816
|
+
saturation: saturation,
|
|
19817
|
+
lightness: lightness
|
|
19818
|
+
};
|
|
19819
|
+
}
|
|
19820
|
+
|
|
19821
|
+
/**
|
|
19822
|
+
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
19823
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
19824
|
+
* can convert a HslColor or HslaColor object back to a string.
|
|
19825
|
+
*
|
|
19826
|
+
* @example
|
|
19827
|
+
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
19828
|
+
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
19829
|
+
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
19830
|
+
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
19831
|
+
*/
|
|
19832
|
+
function parseToHsl(color) {
|
|
19833
|
+
// Note: At a later stage we can optimize this function as right now a hsl
|
|
19834
|
+
// color would be parsed converted to rgb values and converted back to hsl.
|
|
19835
|
+
return rgbToHsl(parseToRgb(color));
|
|
19836
|
+
}
|
|
19837
|
+
|
|
19795
19838
|
/**
|
|
19796
19839
|
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
19797
19840
|
* @private
|
|
@@ -19800,10 +19843,8 @@ var reduceHexValue = function reduceHexValue(value) {
|
|
|
19800
19843
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
19801
19844
|
return "#" + value[1] + value[3] + value[5];
|
|
19802
19845
|
}
|
|
19803
|
-
|
|
19804
19846
|
return value;
|
|
19805
19847
|
};
|
|
19806
|
-
|
|
19807
19848
|
var reduceHexValue$1 = reduceHexValue;
|
|
19808
19849
|
|
|
19809
19850
|
function numberToHex(value) {
|
|
@@ -19811,6 +19852,83 @@ function numberToHex(value) {
|
|
|
19811
19852
|
return hex.length === 1 ? "0" + hex : hex;
|
|
19812
19853
|
}
|
|
19813
19854
|
|
|
19855
|
+
function colorToHex(color) {
|
|
19856
|
+
return numberToHex(Math.round(color * 255));
|
|
19857
|
+
}
|
|
19858
|
+
function convertToHex(red, green, blue) {
|
|
19859
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
19860
|
+
}
|
|
19861
|
+
function hslToHex(hue, saturation, lightness) {
|
|
19862
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
19863
|
+
}
|
|
19864
|
+
|
|
19865
|
+
/**
|
|
19866
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
19867
|
+
*
|
|
19868
|
+
* @example
|
|
19869
|
+
* // Styles as object usage
|
|
19870
|
+
* const styles = {
|
|
19871
|
+
* background: hsl(359, 0.75, 0.4),
|
|
19872
|
+
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
19873
|
+
* }
|
|
19874
|
+
*
|
|
19875
|
+
* // styled-components usage
|
|
19876
|
+
* const div = styled.div`
|
|
19877
|
+
* background: ${hsl(359, 0.75, 0.4)};
|
|
19878
|
+
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
19879
|
+
* `
|
|
19880
|
+
*
|
|
19881
|
+
* // CSS in JS Output
|
|
19882
|
+
*
|
|
19883
|
+
* element {
|
|
19884
|
+
* background: "#b3191c";
|
|
19885
|
+
* background: "#b3191c";
|
|
19886
|
+
* }
|
|
19887
|
+
*/
|
|
19888
|
+
function hsl(value, saturation, lightness) {
|
|
19889
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
|
|
19890
|
+
return hslToHex(value, saturation, lightness);
|
|
19891
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
|
|
19892
|
+
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
19893
|
+
}
|
|
19894
|
+
throw new PolishedError(1);
|
|
19895
|
+
}
|
|
19896
|
+
|
|
19897
|
+
/**
|
|
19898
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
19899
|
+
*
|
|
19900
|
+
* @example
|
|
19901
|
+
* // Styles as object usage
|
|
19902
|
+
* const styles = {
|
|
19903
|
+
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
19904
|
+
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
19905
|
+
* background: hsla(359, 0.75, 0.4, 1),
|
|
19906
|
+
* }
|
|
19907
|
+
*
|
|
19908
|
+
* // styled-components usage
|
|
19909
|
+
* const div = styled.div`
|
|
19910
|
+
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
19911
|
+
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
19912
|
+
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
19913
|
+
* `
|
|
19914
|
+
*
|
|
19915
|
+
* // CSS in JS Output
|
|
19916
|
+
*
|
|
19917
|
+
* element {
|
|
19918
|
+
* background: "rgba(179,25,28,0.7)";
|
|
19919
|
+
* background: "rgba(179,25,28,0.7)";
|
|
19920
|
+
* background: "#b3191c";
|
|
19921
|
+
* }
|
|
19922
|
+
*/
|
|
19923
|
+
function hsla$1(value, saturation, lightness, alpha) {
|
|
19924
|
+
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
|
|
19925
|
+
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
19926
|
+
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
|
|
19927
|
+
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
19928
|
+
}
|
|
19929
|
+
throw new PolishedError(2);
|
|
19930
|
+
}
|
|
19931
|
+
|
|
19814
19932
|
/**
|
|
19815
19933
|
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
19816
19934
|
*
|
|
@@ -19840,7 +19958,6 @@ function rgb(value, green, blue) {
|
|
|
19840
19958
|
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
19841
19959
|
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
19842
19960
|
}
|
|
19843
|
-
|
|
19844
19961
|
throw new PolishedError(6);
|
|
19845
19962
|
}
|
|
19846
19963
|
|
|
@@ -19887,10 +20004,62 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
|
19887
20004
|
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
19888
20005
|
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
19889
20006
|
}
|
|
19890
|
-
|
|
19891
20007
|
throw new PolishedError(7);
|
|
19892
20008
|
}
|
|
19893
20009
|
|
|
20010
|
+
var isRgb = function isRgb(color) {
|
|
20011
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20012
|
+
};
|
|
20013
|
+
var isRgba$1 = function isRgba(color) {
|
|
20014
|
+
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
|
|
20015
|
+
};
|
|
20016
|
+
var isHsl = function isHsl(color) {
|
|
20017
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
|
|
20018
|
+
};
|
|
20019
|
+
var isHsla$1 = function isHsla(color) {
|
|
20020
|
+
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
|
|
20021
|
+
};
|
|
20022
|
+
|
|
20023
|
+
/**
|
|
20024
|
+
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
20025
|
+
* This util is useful in case you only know on runtime which color object is
|
|
20026
|
+
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
20027
|
+
*
|
|
20028
|
+
* @example
|
|
20029
|
+
* // Styles as object usage
|
|
20030
|
+
* const styles = {
|
|
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
|
+
* // styled-components usage
|
|
20038
|
+
* const div = styled.div`
|
|
20039
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
20040
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
20041
|
+
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
20042
|
+
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
20043
|
+
* `
|
|
20044
|
+
*
|
|
20045
|
+
* // CSS in JS Output
|
|
20046
|
+
* element {
|
|
20047
|
+
* background: "#ffcd64";
|
|
20048
|
+
* background: "rgba(255,205,100,0.72)";
|
|
20049
|
+
* background: "#00f";
|
|
20050
|
+
* background: "rgba(179,25,25,0.72)";
|
|
20051
|
+
* }
|
|
20052
|
+
*/
|
|
20053
|
+
|
|
20054
|
+
function toColorString(color) {
|
|
20055
|
+
if (typeof color !== 'object') throw new PolishedError(8);
|
|
20056
|
+
if (isRgba$1(color)) return rgba$1(color);
|
|
20057
|
+
if (isRgb(color)) return rgb(color);
|
|
20058
|
+
if (isHsla$1(color)) return hsla$1(color);
|
|
20059
|
+
if (isHsl(color)) return hsl(color);
|
|
20060
|
+
throw new PolishedError(8);
|
|
20061
|
+
}
|
|
20062
|
+
|
|
19894
20063
|
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
19895
20064
|
// eslint-disable-next-line no-unused-vars
|
|
19896
20065
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -19901,14 +20070,156 @@ function curried(f, length, acc) {
|
|
|
19901
20070
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
19902
20071
|
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
19903
20072
|
};
|
|
19904
|
-
}
|
|
19905
|
-
|
|
20073
|
+
}
|
|
19906
20074
|
|
|
20075
|
+
// eslint-disable-next-line no-redeclare
|
|
19907
20076
|
function curry(f) {
|
|
19908
20077
|
// eslint-disable-line no-redeclare
|
|
19909
20078
|
return curried(f, f.length, []);
|
|
19910
20079
|
}
|
|
19911
20080
|
|
|
20081
|
+
/**
|
|
20082
|
+
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
20083
|
+
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
20084
|
+
* the color wheel, always producing a positive hue value.
|
|
20085
|
+
*
|
|
20086
|
+
* @example
|
|
20087
|
+
* // Styles as object usage
|
|
20088
|
+
* const styles = {
|
|
20089
|
+
* background: adjustHue(180, '#448'),
|
|
20090
|
+
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
20091
|
+
* }
|
|
20092
|
+
*
|
|
20093
|
+
* // styled-components usage
|
|
20094
|
+
* const div = styled.div`
|
|
20095
|
+
* background: ${adjustHue(180, '#448')};
|
|
20096
|
+
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
20097
|
+
* `
|
|
20098
|
+
*
|
|
20099
|
+
* // CSS in JS Output
|
|
20100
|
+
* element {
|
|
20101
|
+
* background: "#888844";
|
|
20102
|
+
* background: "rgba(136,136,68,0.7)";
|
|
20103
|
+
* }
|
|
20104
|
+
*/
|
|
20105
|
+
function adjustHue(degree, color) {
|
|
20106
|
+
if (color === 'transparent') return color;
|
|
20107
|
+
var hslColor = parseToHsl(color);
|
|
20108
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20109
|
+
hue: hslColor.hue + parseFloat(degree)
|
|
20110
|
+
}));
|
|
20111
|
+
}
|
|
20112
|
+
|
|
20113
|
+
// prettier-ignore
|
|
20114
|
+
var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
|
|
20115
|
+
|
|
20116
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
20117
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
20118
|
+
}
|
|
20119
|
+
|
|
20120
|
+
/**
|
|
20121
|
+
* Returns a string value for the darkened color.
|
|
20122
|
+
*
|
|
20123
|
+
* @example
|
|
20124
|
+
* // Styles as object usage
|
|
20125
|
+
* const styles = {
|
|
20126
|
+
* background: darken(0.2, '#FFCD64'),
|
|
20127
|
+
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
20128
|
+
* }
|
|
20129
|
+
*
|
|
20130
|
+
* // styled-components usage
|
|
20131
|
+
* const div = styled.div`
|
|
20132
|
+
* background: ${darken(0.2, '#FFCD64')};
|
|
20133
|
+
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
20134
|
+
* `
|
|
20135
|
+
*
|
|
20136
|
+
* // CSS in JS Output
|
|
20137
|
+
*
|
|
20138
|
+
* element {
|
|
20139
|
+
* background: "#ffbd31";
|
|
20140
|
+
* background: "rgba(255,189,49,0.7)";
|
|
20141
|
+
* }
|
|
20142
|
+
*/
|
|
20143
|
+
function darken(amount, color) {
|
|
20144
|
+
if (color === 'transparent') return color;
|
|
20145
|
+
var hslColor = parseToHsl(color);
|
|
20146
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20147
|
+
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
20148
|
+
}));
|
|
20149
|
+
}
|
|
20150
|
+
|
|
20151
|
+
// prettier-ignore
|
|
20152
|
+
var curriedDarken = curry /* ::<number | string, string, string> */(darken);
|
|
20153
|
+
|
|
20154
|
+
/**
|
|
20155
|
+
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
20156
|
+
* argument of the desaturate function is the amount by how much the color
|
|
20157
|
+
* intensity should be decreased.
|
|
20158
|
+
*
|
|
20159
|
+
* @example
|
|
20160
|
+
* // Styles as object usage
|
|
20161
|
+
* const styles = {
|
|
20162
|
+
* background: desaturate(0.2, '#CCCD64'),
|
|
20163
|
+
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20164
|
+
* }
|
|
20165
|
+
*
|
|
20166
|
+
* // styled-components usage
|
|
20167
|
+
* const div = styled.div`
|
|
20168
|
+
* background: ${desaturate(0.2, '#CCCD64')};
|
|
20169
|
+
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20170
|
+
* `
|
|
20171
|
+
*
|
|
20172
|
+
* // CSS in JS Output
|
|
20173
|
+
* element {
|
|
20174
|
+
* background: "#b8b979";
|
|
20175
|
+
* background: "rgba(184,185,121,0.7)";
|
|
20176
|
+
* }
|
|
20177
|
+
*/
|
|
20178
|
+
function desaturate(amount, color) {
|
|
20179
|
+
if (color === 'transparent') return color;
|
|
20180
|
+
var hslColor = parseToHsl(color);
|
|
20181
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20182
|
+
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
20183
|
+
}));
|
|
20184
|
+
}
|
|
20185
|
+
|
|
20186
|
+
// prettier-ignore
|
|
20187
|
+
var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
|
|
20188
|
+
|
|
20189
|
+
/**
|
|
20190
|
+
* Returns a string value for the lightened color.
|
|
20191
|
+
*
|
|
20192
|
+
* @example
|
|
20193
|
+
* // Styles as object usage
|
|
20194
|
+
* const styles = {
|
|
20195
|
+
* background: lighten(0.2, '#CCCD64'),
|
|
20196
|
+
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
20197
|
+
* }
|
|
20198
|
+
*
|
|
20199
|
+
* // styled-components usage
|
|
20200
|
+
* const div = styled.div`
|
|
20201
|
+
* background: ${lighten(0.2, '#FFCD64')};
|
|
20202
|
+
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
20203
|
+
* `
|
|
20204
|
+
*
|
|
20205
|
+
* // CSS in JS Output
|
|
20206
|
+
*
|
|
20207
|
+
* element {
|
|
20208
|
+
* background: "#e5e6b1";
|
|
20209
|
+
* background: "rgba(229,230,177,0.7)";
|
|
20210
|
+
* }
|
|
20211
|
+
*/
|
|
20212
|
+
function lighten(amount, color) {
|
|
20213
|
+
if (color === 'transparent') return color;
|
|
20214
|
+
var hslColor = parseToHsl(color);
|
|
20215
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20216
|
+
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
20217
|
+
}));
|
|
20218
|
+
}
|
|
20219
|
+
|
|
20220
|
+
// prettier-ignore
|
|
20221
|
+
var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
|
|
20222
|
+
|
|
19912
20223
|
/**
|
|
19913
20224
|
* 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.
|
|
19914
20225
|
*
|
|
@@ -19935,25 +20246,21 @@ function curry(f) {
|
|
|
19935
20246
|
* background: "rgba(63, 0, 191, 0.75)";
|
|
19936
20247
|
* }
|
|
19937
20248
|
*/
|
|
19938
|
-
|
|
19939
20249
|
function mix$1(weight, color, otherColor) {
|
|
19940
20250
|
if (color === 'transparent') return otherColor;
|
|
19941
20251
|
if (otherColor === 'transparent') return color;
|
|
19942
20252
|
if (weight === 0) return otherColor;
|
|
19943
20253
|
var parsedColor1 = parseToRgb(color);
|
|
19944
|
-
|
|
19945
20254
|
var color1 = _extends$1({}, parsedColor1, {
|
|
19946
20255
|
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
19947
20256
|
});
|
|
19948
|
-
|
|
19949
20257
|
var parsedColor2 = parseToRgb(otherColor);
|
|
19950
|
-
|
|
19951
20258
|
var color2 = _extends$1({}, parsedColor2, {
|
|
19952
20259
|
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
19953
|
-
});
|
|
19954
|
-
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
19955
|
-
|
|
20260
|
+
});
|
|
19956
20261
|
|
|
20262
|
+
// The formula is copied from the original Sass implementation:
|
|
20263
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
19957
20264
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
19958
20265
|
var x = parseFloat(weight) * 2 - 1;
|
|
19959
20266
|
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
@@ -19967,14 +20274,218 @@ function mix$1(weight, color, otherColor) {
|
|
|
19967
20274
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
19968
20275
|
};
|
|
19969
20276
|
return rgba$1(mixedColor);
|
|
19970
|
-
}
|
|
19971
|
-
|
|
20277
|
+
}
|
|
19972
20278
|
|
|
19973
|
-
|
|
19974
|
-
/* ::<number | string, string, string, string> */
|
|
19975
|
-
(mix$1);
|
|
20279
|
+
// prettier-ignore
|
|
20280
|
+
var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
|
|
19976
20281
|
var mix$1$1 = curriedMix;
|
|
19977
20282
|
|
|
20283
|
+
/**
|
|
20284
|
+
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20285
|
+
*
|
|
20286
|
+
*
|
|
20287
|
+
* @example
|
|
20288
|
+
* // Styles as object usage
|
|
20289
|
+
* const styles = {
|
|
20290
|
+
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
20291
|
+
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
20292
|
+
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
20293
|
+
* }
|
|
20294
|
+
*
|
|
20295
|
+
* // styled-components usage
|
|
20296
|
+
* const div = styled.div`
|
|
20297
|
+
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
20298
|
+
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
20299
|
+
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
20300
|
+
* `
|
|
20301
|
+
*
|
|
20302
|
+
* // CSS in JS Output
|
|
20303
|
+
*
|
|
20304
|
+
* element {
|
|
20305
|
+
* background: "#fff";
|
|
20306
|
+
* background: "rgba(255,255,255,0.7)";
|
|
20307
|
+
* background: "rgba(255,0,0,0.7)";
|
|
20308
|
+
* }
|
|
20309
|
+
*/
|
|
20310
|
+
function opacify(amount, color) {
|
|
20311
|
+
if (color === 'transparent') return color;
|
|
20312
|
+
var parsedColor = parseToRgb(color);
|
|
20313
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20314
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20315
|
+
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
20316
|
+
});
|
|
20317
|
+
return rgba$1(colorWithAlpha);
|
|
20318
|
+
}
|
|
20319
|
+
|
|
20320
|
+
// prettier-ignore
|
|
20321
|
+
var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
|
|
20322
|
+
|
|
20323
|
+
/**
|
|
20324
|
+
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
20325
|
+
* argument of the saturate function is the amount by how much the color
|
|
20326
|
+
* intensity should be increased.
|
|
20327
|
+
*
|
|
20328
|
+
* @example
|
|
20329
|
+
* // Styles as object usage
|
|
20330
|
+
* const styles = {
|
|
20331
|
+
* background: saturate(0.2, '#CCCD64'),
|
|
20332
|
+
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
20333
|
+
* }
|
|
20334
|
+
*
|
|
20335
|
+
* // styled-components usage
|
|
20336
|
+
* const div = styled.div`
|
|
20337
|
+
* background: ${saturate(0.2, '#FFCD64')};
|
|
20338
|
+
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
20339
|
+
* `
|
|
20340
|
+
*
|
|
20341
|
+
* // CSS in JS Output
|
|
20342
|
+
*
|
|
20343
|
+
* element {
|
|
20344
|
+
* background: "#e0e250";
|
|
20345
|
+
* background: "rgba(224,226,80,0.7)";
|
|
20346
|
+
* }
|
|
20347
|
+
*/
|
|
20348
|
+
function saturate(amount, color) {
|
|
20349
|
+
if (color === 'transparent') return color;
|
|
20350
|
+
var hslColor = parseToHsl(color);
|
|
20351
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
20352
|
+
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
20353
|
+
}));
|
|
20354
|
+
}
|
|
20355
|
+
|
|
20356
|
+
// prettier-ignore
|
|
20357
|
+
var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
|
|
20358
|
+
|
|
20359
|
+
/**
|
|
20360
|
+
* Sets the hue of a color to the provided value. The hue range can be
|
|
20361
|
+
* from 0 and 359.
|
|
20362
|
+
*
|
|
20363
|
+
* @example
|
|
20364
|
+
* // Styles as object usage
|
|
20365
|
+
* const styles = {
|
|
20366
|
+
* background: setHue(42, '#CCCD64'),
|
|
20367
|
+
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
20368
|
+
* }
|
|
20369
|
+
*
|
|
20370
|
+
* // styled-components usage
|
|
20371
|
+
* const div = styled.div`
|
|
20372
|
+
* background: ${setHue(42, '#CCCD64')};
|
|
20373
|
+
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
20374
|
+
* `
|
|
20375
|
+
*
|
|
20376
|
+
* // CSS in JS Output
|
|
20377
|
+
* element {
|
|
20378
|
+
* background: "#cdae64";
|
|
20379
|
+
* background: "rgba(107,100,205,0.7)";
|
|
20380
|
+
* }
|
|
20381
|
+
*/
|
|
20382
|
+
function setHue(hue, color) {
|
|
20383
|
+
if (color === 'transparent') return color;
|
|
20384
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20385
|
+
hue: parseFloat(hue)
|
|
20386
|
+
}));
|
|
20387
|
+
}
|
|
20388
|
+
|
|
20389
|
+
// prettier-ignore
|
|
20390
|
+
var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
|
|
20391
|
+
|
|
20392
|
+
/**
|
|
20393
|
+
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
20394
|
+
* from 0 and 1.
|
|
20395
|
+
*
|
|
20396
|
+
* @example
|
|
20397
|
+
* // Styles as object usage
|
|
20398
|
+
* const styles = {
|
|
20399
|
+
* background: setLightness(0.2, '#CCCD64'),
|
|
20400
|
+
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
20401
|
+
* }
|
|
20402
|
+
*
|
|
20403
|
+
* // styled-components usage
|
|
20404
|
+
* const div = styled.div`
|
|
20405
|
+
* background: ${setLightness(0.2, '#CCCD64')};
|
|
20406
|
+
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
20407
|
+
* `
|
|
20408
|
+
*
|
|
20409
|
+
* // CSS in JS Output
|
|
20410
|
+
* element {
|
|
20411
|
+
* background: "#4d4d19";
|
|
20412
|
+
* background: "rgba(223,224,159,0.7)";
|
|
20413
|
+
* }
|
|
20414
|
+
*/
|
|
20415
|
+
function setLightness(lightness, color) {
|
|
20416
|
+
if (color === 'transparent') return color;
|
|
20417
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20418
|
+
lightness: parseFloat(lightness)
|
|
20419
|
+
}));
|
|
20420
|
+
}
|
|
20421
|
+
|
|
20422
|
+
// prettier-ignore
|
|
20423
|
+
var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
|
|
20424
|
+
|
|
20425
|
+
/**
|
|
20426
|
+
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
20427
|
+
* from 0 and 1.
|
|
20428
|
+
*
|
|
20429
|
+
* @example
|
|
20430
|
+
* // Styles as object usage
|
|
20431
|
+
* const styles = {
|
|
20432
|
+
* background: setSaturation(0.2, '#CCCD64'),
|
|
20433
|
+
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
20434
|
+
* }
|
|
20435
|
+
*
|
|
20436
|
+
* // styled-components usage
|
|
20437
|
+
* const div = styled.div`
|
|
20438
|
+
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
20439
|
+
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
20440
|
+
* `
|
|
20441
|
+
*
|
|
20442
|
+
* // CSS in JS Output
|
|
20443
|
+
* element {
|
|
20444
|
+
* background: "#adad84";
|
|
20445
|
+
* background: "rgba(228,229,76,0.7)";
|
|
20446
|
+
* }
|
|
20447
|
+
*/
|
|
20448
|
+
function setSaturation(saturation, color) {
|
|
20449
|
+
if (color === 'transparent') return color;
|
|
20450
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
20451
|
+
saturation: parseFloat(saturation)
|
|
20452
|
+
}));
|
|
20453
|
+
}
|
|
20454
|
+
|
|
20455
|
+
// prettier-ignore
|
|
20456
|
+
var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
|
|
20457
|
+
|
|
20458
|
+
/**
|
|
20459
|
+
* Shades a color by mixing it with black. `shade` can produce
|
|
20460
|
+
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
20461
|
+
* doesn't produce hue shifts.
|
|
20462
|
+
*
|
|
20463
|
+
* @example
|
|
20464
|
+
* // Styles as object usage
|
|
20465
|
+
* const styles = {
|
|
20466
|
+
* background: shade(0.25, '#00f')
|
|
20467
|
+
* }
|
|
20468
|
+
*
|
|
20469
|
+
* // styled-components usage
|
|
20470
|
+
* const div = styled.div`
|
|
20471
|
+
* background: ${shade(0.25, '#00f')};
|
|
20472
|
+
* `
|
|
20473
|
+
*
|
|
20474
|
+
* // CSS in JS Output
|
|
20475
|
+
*
|
|
20476
|
+
* element {
|
|
20477
|
+
* background: "#00003f";
|
|
20478
|
+
* }
|
|
20479
|
+
*/
|
|
20480
|
+
|
|
20481
|
+
function shade(percentage, color) {
|
|
20482
|
+
if (color === 'transparent') return color;
|
|
20483
|
+
return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
|
|
20484
|
+
}
|
|
20485
|
+
|
|
20486
|
+
// prettier-ignore
|
|
20487
|
+
var curriedShade = curry /* ::<number | string, string, string> */(shade);
|
|
20488
|
+
|
|
19978
20489
|
/**
|
|
19979
20490
|
* Tints a color by mixing it with white. `tint` can produce
|
|
19980
20491
|
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
@@ -20001,14 +20512,52 @@ var mix$1$1 = curriedMix;
|
|
|
20001
20512
|
function tint(percentage, color) {
|
|
20002
20513
|
if (color === 'transparent') return color;
|
|
20003
20514
|
return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20004
|
-
}
|
|
20005
|
-
|
|
20515
|
+
}
|
|
20006
20516
|
|
|
20007
|
-
|
|
20008
|
-
/* ::<number | string, string, string> */
|
|
20009
|
-
(tint);
|
|
20517
|
+
// prettier-ignore
|
|
20518
|
+
var curriedTint = curry /* ::<number | string, string, string> */(tint);
|
|
20010
20519
|
var curriedTint$1 = curriedTint;
|
|
20011
20520
|
|
|
20521
|
+
/**
|
|
20522
|
+
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
20523
|
+
*
|
|
20524
|
+
*
|
|
20525
|
+
* @example
|
|
20526
|
+
* // Styles as object usage
|
|
20527
|
+
* const styles = {
|
|
20528
|
+
* background: transparentize(0.1, '#fff'),
|
|
20529
|
+
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
20530
|
+
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
20531
|
+
* }
|
|
20532
|
+
*
|
|
20533
|
+
* // styled-components usage
|
|
20534
|
+
* const div = styled.div`
|
|
20535
|
+
* background: ${transparentize(0.1, '#fff')};
|
|
20536
|
+
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
20537
|
+
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
20538
|
+
* `
|
|
20539
|
+
*
|
|
20540
|
+
* // CSS in JS Output
|
|
20541
|
+
*
|
|
20542
|
+
* element {
|
|
20543
|
+
* background: "rgba(255,255,255,0.9)";
|
|
20544
|
+
* background: "rgba(255,255,255,0.8)";
|
|
20545
|
+
* background: "rgba(255,0,0,0.3)";
|
|
20546
|
+
* }
|
|
20547
|
+
*/
|
|
20548
|
+
function transparentize(amount, color) {
|
|
20549
|
+
if (color === 'transparent') return color;
|
|
20550
|
+
var parsedColor = parseToRgb(color);
|
|
20551
|
+
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
|
|
20552
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
20553
|
+
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
20554
|
+
});
|
|
20555
|
+
return rgba$1(colorWithAlpha);
|
|
20556
|
+
}
|
|
20557
|
+
|
|
20558
|
+
// prettier-ignore
|
|
20559
|
+
var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
|
|
20560
|
+
|
|
20012
20561
|
var linkColor = MATISSE_BLUE;
|
|
20013
20562
|
var fallbackValues$8 = {
|
|
20014
20563
|
linkColor: linkColor
|
|
@@ -22698,32 +23247,19 @@ var toIndexedObject = function (it) {
|
|
|
22698
23247
|
return indexedObject(requireObjectCoercible(it));
|
|
22699
23248
|
};
|
|
22700
23249
|
|
|
22701
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
22702
|
-
|
|
22703
23250
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
22704
|
-
|
|
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;
|
|
23251
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
22713
23252
|
|
|
22714
23253
|
// `IsCallable` abstract operation
|
|
22715
23254
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
22716
|
-
|
|
22717
|
-
|
|
23255
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
23256
|
+
var isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
23257
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
22718
23258
|
} : function (argument) {
|
|
22719
23259
|
return typeof argument == 'function';
|
|
22720
23260
|
};
|
|
22721
23261
|
|
|
22722
|
-
var
|
|
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) {
|
|
23262
|
+
var isObject = function (it) {
|
|
22727
23263
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
22728
23264
|
};
|
|
22729
23265
|
|
|
@@ -22859,10 +23395,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
22859
23395
|
(module.exports = function (key, value) {
|
|
22860
23396
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22861
23397
|
})('versions', []).push({
|
|
22862
|
-
version: '3.
|
|
23398
|
+
version: '3.35.1',
|
|
22863
23399
|
mode: 'global',
|
|
22864
|
-
copyright: '© 2014-
|
|
22865
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
23400
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
23401
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
|
|
22866
23402
|
source: 'https://github.com/zloirock/core-js'
|
|
22867
23403
|
});
|
|
22868
23404
|
});
|
|
@@ -23159,7 +23695,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
23159
23695
|
|
|
23160
23696
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
23161
23697
|
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23162
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)
|
|
23698
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
23163
23699
|
}
|
|
23164
23700
|
if (options && options.getter) name = 'get ' + name;
|
|
23165
23701
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -23247,7 +23783,8 @@ var min$1 = Math.min;
|
|
|
23247
23783
|
// `ToLength` abstract operation
|
|
23248
23784
|
// https://tc39.es/ecma262/#sec-tolength
|
|
23249
23785
|
var toLength = function (argument) {
|
|
23250
|
-
|
|
23786
|
+
var len = toIntegerOrInfinity(argument);
|
|
23787
|
+
return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
23251
23788
|
};
|
|
23252
23789
|
|
|
23253
23790
|
// `LengthOfArrayLike` abstract operation
|
|
@@ -23407,7 +23944,7 @@ var _export = function (options, source) {
|
|
|
23407
23944
|
} else if (STATIC) {
|
|
23408
23945
|
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
23409
23946
|
} else {
|
|
23410
|
-
target =
|
|
23947
|
+
target = global_1[TARGET] && global_1[TARGET].prototype;
|
|
23411
23948
|
}
|
|
23412
23949
|
if (target) for (key in source) {
|
|
23413
23950
|
sourceProperty = source[key];
|
|
@@ -23670,11 +24207,15 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
23670
24207
|
} catch (error) { /* empty */ }
|
|
23671
24208
|
};
|
|
23672
24209
|
|
|
24210
|
+
var isPossiblePrototype = function (argument) {
|
|
24211
|
+
return isObject(argument) || argument === null;
|
|
24212
|
+
};
|
|
24213
|
+
|
|
23673
24214
|
var $String$4 = String;
|
|
23674
24215
|
var $TypeError$6 = TypeError;
|
|
23675
24216
|
|
|
23676
24217
|
var aPossiblePrototype = function (argument) {
|
|
23677
|
-
if (
|
|
24218
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
23678
24219
|
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23679
24220
|
};
|
|
23680
24221
|
|
|
@@ -25461,7 +26002,7 @@ var useToastNotification = function useToastNotification() {
|
|
|
25461
26002
|
toastState = _useState2[0],
|
|
25462
26003
|
setToastState = _useState2[1];
|
|
25463
26004
|
React.useEffect(function () {
|
|
25464
|
-
if (toastState.isOpen
|
|
26005
|
+
if (toastState.isOpen) {
|
|
25465
26006
|
setTimeout(function () {
|
|
25466
26007
|
setToastState(initialToastState);
|
|
25467
26008
|
}, timeout);
|
|
@@ -45895,6 +46436,282 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45895
46436
|
}))))))))), children);
|
|
45896
46437
|
};
|
|
45897
46438
|
|
|
46439
|
+
var ButtonLayoutWrapper = function ButtonLayoutWrapper(_ref) {
|
|
46440
|
+
var _ref$children = _ref.children,
|
|
46441
|
+
children = _ref$children === void 0 ? [] : _ref$children,
|
|
46442
|
+
_ref$isMobile = _ref.isMobile,
|
|
46443
|
+
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
46444
|
+
var safeChildren = Array.isArray(children) ? children : [children];
|
|
46445
|
+
var flexGrow = isMobile ? "flex-grow: 1;" : "";
|
|
46446
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46447
|
+
padding: SPACING_NORMAL
|
|
46448
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
46449
|
+
childGap: "1rem",
|
|
46450
|
+
direction: "row",
|
|
46451
|
+
justify: "flex-end"
|
|
46452
|
+
}, safeChildren.map(function (child, index) {
|
|
46453
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46454
|
+
padding: "0",
|
|
46455
|
+
extraStyles: flexGrow,
|
|
46456
|
+
key: index
|
|
46457
|
+
}, child);
|
|
46458
|
+
})));
|
|
46459
|
+
};
|
|
46460
|
+
|
|
46461
|
+
var CancelButton = function CancelButton(_ref) {
|
|
46462
|
+
var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46463
|
+
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46464
|
+
_ref$cancelAction = _ref.cancelAction,
|
|
46465
|
+
cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
|
|
46466
|
+
_ref$cancelButtonText = _ref.cancelButtonText,
|
|
46467
|
+
cancelButtonText = _ref$cancelButtonText === void 0 ? "" : _ref$cancelButtonText,
|
|
46468
|
+
_ref$hideModal = _ref.hideModal,
|
|
46469
|
+
hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
|
|
46470
|
+
_ref$isMobile = _ref.isMobile,
|
|
46471
|
+
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
46472
|
+
var fullWidth = isMobile ? "width: 100%;" : "";
|
|
46473
|
+
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46474
|
+
action: cancelAction ? cancelAction : hideModal,
|
|
46475
|
+
borderRadius: CORNER_STANDARD,
|
|
46476
|
+
className: "modal-cancel-button",
|
|
46477
|
+
dataQa: cancelButtonText,
|
|
46478
|
+
extraStyles: "".concat(buttonExtraStyles, "; margin: 0; ").concat(fullWidth),
|
|
46479
|
+
name: cancelButtonText,
|
|
46480
|
+
role: "button",
|
|
46481
|
+
text: cancelButtonText,
|
|
46482
|
+
variant: "secondary"
|
|
46483
|
+
});
|
|
46484
|
+
};
|
|
46485
|
+
|
|
46486
|
+
var CloseButton = function CloseButton(_ref) {
|
|
46487
|
+
var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46488
|
+
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46489
|
+
_ref$closeButtonText = _ref.closeButtonText,
|
|
46490
|
+
closeButtonText = _ref$closeButtonText === void 0 ? "" : _ref$closeButtonText,
|
|
46491
|
+
_ref$hideModal = _ref.hideModal,
|
|
46492
|
+
hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
|
|
46493
|
+
_ref$isMobile = _ref.isMobile,
|
|
46494
|
+
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
46495
|
+
var fullWidth = isMobile ? "width: 100%;" : "";
|
|
46496
|
+
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46497
|
+
action: hideModal,
|
|
46498
|
+
borderRadius: CORNER_STANDARD,
|
|
46499
|
+
className: "modal-close-button",
|
|
46500
|
+
dataQa: closeButtonText,
|
|
46501
|
+
extraStyles: "".concat(buttonExtraStyles, "; margin: 0; ").concat(fullWidth),
|
|
46502
|
+
name: closeButtonText,
|
|
46503
|
+
role: "button",
|
|
46504
|
+
text: closeButtonText,
|
|
46505
|
+
variant: "primary"
|
|
46506
|
+
});
|
|
46507
|
+
};
|
|
46508
|
+
|
|
46509
|
+
var ContinueButton = function ContinueButton(_ref) {
|
|
46510
|
+
var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46511
|
+
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46512
|
+
_ref$continueAction = _ref.continueAction,
|
|
46513
|
+
continueAction = _ref$continueAction === void 0 ? noop : _ref$continueAction,
|
|
46514
|
+
_ref$continueButtonTe = _ref.continueButtonText,
|
|
46515
|
+
continueButtonText = _ref$continueButtonTe === void 0 ? "" : _ref$continueButtonTe,
|
|
46516
|
+
_ref$continueURL = _ref.continueURL,
|
|
46517
|
+
continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
|
|
46518
|
+
_ref$isContinueAction = _ref.isContinueActionDisabled,
|
|
46519
|
+
isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
|
|
46520
|
+
_ref$isLoading = _ref.isLoading,
|
|
46521
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
46522
|
+
_ref$isMobile = _ref.isMobile,
|
|
46523
|
+
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
|
|
46524
|
+
_ref$useDangerButton = _ref.useDangerButton,
|
|
46525
|
+
useDangerButton = _ref$useDangerButton === void 0 ? false : _ref$useDangerButton;
|
|
46526
|
+
var ContinueButtonAtom = continueURL ? ButtonWithLink : ButtonWithAction;
|
|
46527
|
+
var fullWidth = isMobile ? "width: 100%;" : "";
|
|
46528
|
+
return /*#__PURE__*/React__default.createElement(ContinueButtonAtom, {
|
|
46529
|
+
action: continueAction,
|
|
46530
|
+
borderRadius: CORNER_STANDARD,
|
|
46531
|
+
className: "modal-continue-button",
|
|
46532
|
+
dataQa: continueButtonText,
|
|
46533
|
+
disabled: isContinueActionDisabled,
|
|
46534
|
+
extraStyles: "".concat(buttonExtraStyles, "; margin: 0; ").concat(fullWidth),
|
|
46535
|
+
isLoading: isLoading,
|
|
46536
|
+
linkExtraStyles: "display: inline-block; ".concat(fullWidth),
|
|
46537
|
+
name: continueButtonText,
|
|
46538
|
+
role: "button",
|
|
46539
|
+
text: continueButtonText,
|
|
46540
|
+
url: continueURL,
|
|
46541
|
+
variant: useDangerButton ? "danger" : "primary"
|
|
46542
|
+
});
|
|
46543
|
+
};
|
|
46544
|
+
|
|
46545
|
+
/*
|
|
46546
|
+
Default Modal molecule
|
|
46547
|
+
Uses react-aria-modal behind the scenes for a11y purposes
|
|
46548
|
+
Styling accomplished with our atoms / layout primitives
|
|
46549
|
+
|
|
46550
|
+
Cancel button will (for now) always use hideModal as its action
|
|
46551
|
+
Continue button takes an action, if you want to navigate to
|
|
46552
|
+
a different route (as with a link) connect() and use "push" from @thecb/connected-react-router
|
|
46553
|
+
*/
|
|
46554
|
+
|
|
46555
|
+
var getApplicationNode$1 = function getApplicationNode() {
|
|
46556
|
+
return document.getElementById("root");
|
|
46557
|
+
};
|
|
46558
|
+
var Modal$2 = function Modal(_ref) {
|
|
46559
|
+
var _ref$blurUnderlay = _ref.blurUnderlay,
|
|
46560
|
+
blurUnderlay = _ref$blurUnderlay === void 0 ? true : _ref$blurUnderlay,
|
|
46561
|
+
_ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46562
|
+
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46563
|
+
_ref$cancelAction = _ref.cancelAction,
|
|
46564
|
+
cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
|
|
46565
|
+
_ref$cancelButtonText = _ref.cancelButtonText,
|
|
46566
|
+
cancelButtonText = _ref$cancelButtonText === void 0 ? "Cancel" : _ref$cancelButtonText,
|
|
46567
|
+
_ref$children = _ref.children,
|
|
46568
|
+
children = _ref$children === void 0 ? [] : _ref$children,
|
|
46569
|
+
_ref$closeButtonText = _ref.closeButtonText,
|
|
46570
|
+
closeButtonText = _ref$closeButtonText === void 0 ? "Close" : _ref$closeButtonText,
|
|
46571
|
+
_ref$continueAction = _ref.continueAction,
|
|
46572
|
+
continueAction = _ref$continueAction === void 0 ? noop : _ref$continueAction,
|
|
46573
|
+
_ref$continueButtonTe = _ref.continueButtonText,
|
|
46574
|
+
continueButtonText = _ref$continueButtonTe === void 0 ? "Continue" : _ref$continueButtonTe,
|
|
46575
|
+
_ref$continueURL = _ref.continueURL,
|
|
46576
|
+
continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
|
|
46577
|
+
_ref$customWidth = _ref.customWidth,
|
|
46578
|
+
customWidth = _ref$customWidth === void 0 ? "" : _ref$customWidth,
|
|
46579
|
+
_ref$dataQa = _ref.dataQa,
|
|
46580
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
46581
|
+
_ref$defaultWrapper = _ref.defaultWrapper,
|
|
46582
|
+
defaultWrapper = _ref$defaultWrapper === void 0 ? true : _ref$defaultWrapper,
|
|
46583
|
+
_ref$hideModal = _ref.hideModal,
|
|
46584
|
+
hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
|
|
46585
|
+
_ref$initialFocusSele = _ref.initialFocusSelector,
|
|
46586
|
+
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
|
|
46587
|
+
_ref$isContinueAction = _ref.isContinueActionDisabled,
|
|
46588
|
+
isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
|
|
46589
|
+
_ref$isLoading = _ref.isLoading,
|
|
46590
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
46591
|
+
_ref$maxHeight = _ref.maxHeight,
|
|
46592
|
+
maxHeight = _ref$maxHeight === void 0 ? "" : _ref$maxHeight,
|
|
46593
|
+
_ref$modalBodyBg = _ref.modalBodyBg,
|
|
46594
|
+
modalBodyBg = _ref$modalBodyBg === void 0 ? ATHENS_GREY : _ref$modalBodyBg,
|
|
46595
|
+
_ref$modalBodyText = _ref.modalBodyText,
|
|
46596
|
+
modalBodyText = _ref$modalBodyText === void 0 ? "" : _ref$modalBodyText,
|
|
46597
|
+
_ref$modalHeaderBg = _ref.modalHeaderBg,
|
|
46598
|
+
modalHeaderBg = _ref$modalHeaderBg === void 0 ? WHITE : _ref$modalHeaderBg,
|
|
46599
|
+
_ref$modalHeaderText = _ref.modalHeaderText,
|
|
46600
|
+
modalHeaderText = _ref$modalHeaderText === void 0 ? "" : _ref$modalHeaderText,
|
|
46601
|
+
_ref$modalOpen = _ref.modalOpen,
|
|
46602
|
+
modalOpen = _ref$modalOpen === void 0 ? false : _ref$modalOpen,
|
|
46603
|
+
_ref$noButtons = _ref.noButtons,
|
|
46604
|
+
noButtons = _ref$noButtons === void 0 ? false : _ref$noButtons,
|
|
46605
|
+
_ref$onExit = _ref.onExit,
|
|
46606
|
+
onExit = _ref$onExit === void 0 ? hideModal : _ref$onExit,
|
|
46607
|
+
_ref$onlyCloseButton = _ref.onlyCloseButton,
|
|
46608
|
+
onlyCloseButton = _ref$onlyCloseButton === void 0 ? false : _ref$onlyCloseButton,
|
|
46609
|
+
_ref$onlyContinueButt = _ref.onlyContinueButton,
|
|
46610
|
+
onlyContinueButton = _ref$onlyContinueButt === void 0 ? false : _ref$onlyContinueButt,
|
|
46611
|
+
_ref$underlayClickExi = _ref.underlayClickExits,
|
|
46612
|
+
underlayClickExits = _ref$underlayClickExi === void 0 ? true : _ref$underlayClickExi,
|
|
46613
|
+
_ref$useDangerButton = _ref.useDangerButton,
|
|
46614
|
+
useDangerButton = _ref$useDangerButton === void 0 ? false : _ref$useDangerButton;
|
|
46615
|
+
var _useContext = React.useContext(styled.ThemeContext),
|
|
46616
|
+
isMobile = _useContext.isMobile;
|
|
46617
|
+
var modalContainerRef = React.useRef(null);
|
|
46618
|
+
var hasCloseButton = onlyCloseButton && !noButtons;
|
|
46619
|
+
var hasCancelButton = !onlyContinueButton && !onlyCloseButton && !noButtons;
|
|
46620
|
+
var hasContinueButton = onlyContinueButton && !noButtons || !onlyCloseButton && !noButtons;
|
|
46621
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
46622
|
+
ref: modalContainerRef,
|
|
46623
|
+
"data-qa": dataQa
|
|
46624
|
+
}, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal
|
|
46625
|
+
// fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
46626
|
+
, {
|
|
46627
|
+
focusTrapOptions: {
|
|
46628
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
46629
|
+
},
|
|
46630
|
+
onExit: onExit,
|
|
46631
|
+
getApplicationNode: getApplicationNode$1,
|
|
46632
|
+
titleText: modalHeaderText,
|
|
46633
|
+
underlayStyle: {
|
|
46634
|
+
display: "flex",
|
|
46635
|
+
flexDirection: "column",
|
|
46636
|
+
justifyContent: "center",
|
|
46637
|
+
alignItems: "center",
|
|
46638
|
+
background: "rgba(41, 42, 51, 0.45)",
|
|
46639
|
+
backdropFilter: blurUnderlay ? "blur(4px)" : "none",
|
|
46640
|
+
WebkitBackdropFilter: blurUnderlay ? "blur(4px)" : "none"
|
|
46641
|
+
},
|
|
46642
|
+
dialogStyle: {
|
|
46643
|
+
borderRadius: CORNER_STANDARD,
|
|
46644
|
+
width: isMobile ? "" : customWidth || "615px",
|
|
46645
|
+
overflow: "auto"
|
|
46646
|
+
},
|
|
46647
|
+
underlayClickExits: underlayClickExits,
|
|
46648
|
+
"aria-modal": true,
|
|
46649
|
+
initialFocus: initialFocusSelector,
|
|
46650
|
+
focusDialog: !initialFocusSelector // Focus the dialogue box itself if no selector for initial focus was provided
|
|
46651
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
46652
|
+
padding: "0",
|
|
46653
|
+
boxShadow: "inset 0px -2px 0px 0px rgb(0, 80, 149)"
|
|
46654
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
46655
|
+
background: modalHeaderBg,
|
|
46656
|
+
borderColor: SILVER_GREY,
|
|
46657
|
+
borderWidthOverride: "0 0 ".concat(BORDER_THIN, " 0"),
|
|
46658
|
+
padding: "".concat(SPACING_XS, " ").concat(SPACING_NORMAL)
|
|
46659
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
46660
|
+
justify: "flex-start",
|
|
46661
|
+
align: "center"
|
|
46662
|
+
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
46663
|
+
as: "h2",
|
|
46664
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
46665
|
+
fontSize: "1.25rem"
|
|
46666
|
+
}, modalHeaderText))), /*#__PURE__*/React__default.createElement(Box, {
|
|
46667
|
+
background: modalBodyBg,
|
|
46668
|
+
padding: "0"
|
|
46669
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
46670
|
+
padding: SPACING_NORMAL,
|
|
46671
|
+
borderWidthOverride: !noButtons && "0 0 ".concat(BORDER_THIN, " 0"),
|
|
46672
|
+
borderColor: !noButtons && SILVER_GREY,
|
|
46673
|
+
extraStyles: maxHeight ? "max-height: ".concat(maxHeight, "; overflow: auto;") : ""
|
|
46674
|
+
}, defaultWrapper ? /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
46675
|
+
variant: "p"
|
|
46676
|
+
}, modalBodyText) : /*#__PURE__*/React__default.createElement(Box, {
|
|
46677
|
+
padding: maxHeight ? "0 0 ".concat(SPACING_XS, " 0") : "0"
|
|
46678
|
+
}, modalBodyText)), noButtons ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null) : /*#__PURE__*/React__default.createElement(ButtonLayoutWrapper, {
|
|
46679
|
+
isMobile: isMobile
|
|
46680
|
+
}, [hasCancelButton && /*#__PURE__*/React__default.createElement(CancelButton, {
|
|
46681
|
+
buttonExtraStyles: buttonExtraStyles,
|
|
46682
|
+
cancelAction: cancelAction,
|
|
46683
|
+
cancelButtonText: cancelButtonText,
|
|
46684
|
+
hideModal: hideModal,
|
|
46685
|
+
isMobile: isMobile
|
|
46686
|
+
}), hasContinueButton && /*#__PURE__*/React__default.createElement(ContinueButton, {
|
|
46687
|
+
buttonExtraStyles: buttonExtraStyles,
|
|
46688
|
+
continueAction: continueAction,
|
|
46689
|
+
continueButtonText: continueButtonText,
|
|
46690
|
+
continueURL: continueURL,
|
|
46691
|
+
isContinueActionDisabled: isContinueActionDisabled,
|
|
46692
|
+
isLoading: isLoading,
|
|
46693
|
+
isMobile: isMobile,
|
|
46694
|
+
useDangerButton: useDangerButton
|
|
46695
|
+
}), hasCloseButton && /*#__PURE__*/React__default.createElement(CloseButton, {
|
|
46696
|
+
buttonExtraStyles: buttonExtraStyles,
|
|
46697
|
+
closeButtonText: closeButtonText,
|
|
46698
|
+
hideModal: hideModal,
|
|
46699
|
+
isMobile: isMobile
|
|
46700
|
+
})].filter(function (button) {
|
|
46701
|
+
return button;
|
|
46702
|
+
}))))), children);
|
|
46703
|
+
};
|
|
46704
|
+
var ModalControlV2 = withWindowSize(Modal$2);
|
|
46705
|
+
|
|
46706
|
+
var _excluded$A = ["version"];
|
|
46707
|
+
var Modal$3 = function Modal(_ref) {
|
|
46708
|
+
var _ref$version = _ref.version,
|
|
46709
|
+
version = _ref$version === void 0 ? "v1" : _ref$version,
|
|
46710
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
46711
|
+
var ModalControl = version === "v1" ? Modal$1 : ModalControlV2;
|
|
46712
|
+
return /*#__PURE__*/React__default.createElement(ModalControl, rest);
|
|
46713
|
+
};
|
|
46714
|
+
|
|
45898
46715
|
var fontSize$9 = {
|
|
45899
46716
|
"default": "1.375rem",
|
|
45900
46717
|
largeTitle: "1.75rem",
|
|
@@ -46302,7 +47119,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
46302
47119
|
}
|
|
46303
47120
|
}
|
|
46304
47121
|
};
|
|
46305
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
47122
|
+
return /*#__PURE__*/React__default.createElement(Modal$3, _extends({
|
|
46306
47123
|
showModal: function showModal() {
|
|
46307
47124
|
return toggleModal(true);
|
|
46308
47125
|
},
|
|
@@ -46541,7 +47358,7 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
46541
47358
|
return formattedAccount === agencyName ? agencyName : acc + formattedAccount;
|
|
46542
47359
|
}, "".concat(agencyName, " - ")) : "";
|
|
46543
47360
|
var identifier = accountType === "Account" && obligations.length > 1 ? "accounts" : accountType === "Property" && obligations.length > 1 ? "properties" : accountType.toLowerCase();
|
|
46544
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
47361
|
+
return /*#__PURE__*/React__default.createElement(Modal$3, {
|
|
46545
47362
|
showModal: function showModal() {
|
|
46546
47363
|
return setModalIsOpen(true);
|
|
46547
47364
|
},
|
|
@@ -47300,7 +48117,7 @@ var fallbackValues$N = {
|
|
|
47300
48117
|
labeledAmountTotal: labeledAmountTotal
|
|
47301
48118
|
};
|
|
47302
48119
|
|
|
47303
|
-
var _excluded$
|
|
48120
|
+
var _excluded$B = ["amount"],
|
|
47304
48121
|
_excluded2$1 = ["amount"];
|
|
47305
48122
|
var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
47306
48123
|
var lineItemElems = _ref.lineItemElems,
|
|
@@ -47545,7 +48362,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
47545
48362
|
return fee.amount > 0;
|
|
47546
48363
|
}).map(function (_ref5) {
|
|
47547
48364
|
var amount = _ref5.amount,
|
|
47548
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
48365
|
+
rest = _objectWithoutProperties(_ref5, _excluded$B);
|
|
47549
48366
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
47550
48367
|
amount: displayCurrency(amount)
|
|
47551
48368
|
});
|
|
@@ -47705,7 +48522,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
|
|
|
47705
48522
|
themeValues = _ref.themeValues,
|
|
47706
48523
|
_ref$dataQa = _ref.dataQa,
|
|
47707
48524
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
47708
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
48525
|
+
return /*#__PURE__*/React__default.createElement(Modal$3, {
|
|
47709
48526
|
modalOpen: isOpen,
|
|
47710
48527
|
hideModal: function hideModal() {
|
|
47711
48528
|
return toggleOpen(false);
|
|
@@ -47809,7 +48626,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47809
48626
|
themeValues = _ref.themeValues,
|
|
47810
48627
|
_ref$initialFocusSele = _ref.initialFocusSelector,
|
|
47811
48628
|
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
|
|
47812
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
48629
|
+
return /*#__PURE__*/React__default.createElement(Modal$3, {
|
|
47813
48630
|
modalOpen: isOpen,
|
|
47814
48631
|
hideModal: function hideModal() {
|
|
47815
48632
|
return toggleOpen(false);
|
|
@@ -47982,11 +48799,11 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47982
48799
|
}, errorMessage))))));
|
|
47983
48800
|
};
|
|
47984
48801
|
|
|
47985
|
-
var _excluded$
|
|
48802
|
+
var _excluded$C = ["version"];
|
|
47986
48803
|
var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
47987
48804
|
var _ref$version = _ref.version,
|
|
47988
48805
|
version = _ref$version === void 0 ? "v1" : _ref$version,
|
|
47989
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
48806
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
47990
48807
|
var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
|
|
47991
48808
|
return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);
|
|
47992
48809
|
};
|
|
@@ -48785,7 +49602,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
|
|
|
48785
49602
|
}, section.content))));
|
|
48786
49603
|
};
|
|
48787
49604
|
|
|
48788
|
-
var _excluded$
|
|
49605
|
+
var _excluded$D = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections"];
|
|
48789
49606
|
|
|
48790
49607
|
/**
|
|
48791
49608
|
- The RadioSection component takes either a flat array (via the 'sections'
|
|
@@ -48833,7 +49650,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48833
49650
|
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48834
49651
|
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
|
|
48835
49652
|
groupedSections = _ref.groupedSections,
|
|
48836
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
49653
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
48837
49654
|
var _useState = React.useState(null),
|
|
48838
49655
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48839
49656
|
focused = _useState2[0],
|
|
@@ -49386,9 +50203,7 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
49386
50203
|
height = _ref$height === void 0 ? "56px" : _ref$height,
|
|
49387
50204
|
_ref$childGap = _ref.childGap,
|
|
49388
50205
|
childGap = _ref$childGap === void 0 ? "1rem" : _ref$childGap,
|
|
49389
|
-
backgroundColor = _ref.backgroundColor
|
|
49390
|
-
_ref$role = _ref.role,
|
|
49391
|
-
role = _ref$role === void 0 ? "alert" : _ref$role;
|
|
50206
|
+
backgroundColor = _ref.backgroundColor;
|
|
49392
50207
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
49393
50208
|
onClick: closeToastNotification,
|
|
49394
50209
|
background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === VARIANTS.ERROR ? ERROR_BACKGROUND_COLOR : WHITE,
|
|
@@ -49399,12 +50214,7 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
49399
50214
|
padding: "0rem 1rem",
|
|
49400
50215
|
borderRadius: "4px",
|
|
49401
50216
|
boxShadow: generateShadows().standard.base,
|
|
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"
|
|
50217
|
+
extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n ")
|
|
49408
50218
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
49409
50219
|
align: "center",
|
|
49410
50220
|
childGap: childGap
|
|
@@ -49414,7 +50224,7 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
49414
50224
|
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
49415
50225
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
49416
50226
|
extraStyles: "word-break: break-word;"
|
|
49417
|
-
}, message))
|
|
50227
|
+
}, message)), /*#__PURE__*/React__default.createElement(IconQuitLarge, null)));
|
|
49418
50228
|
};
|
|
49419
50229
|
|
|
49420
50230
|
var fontWeight$9 = "600";
|
|
@@ -49549,7 +50359,7 @@ var PopupMenuItemContainer = styled__default(ButtonWithAction).withConfig({
|
|
|
49549
50359
|
return "\n background-color: ".concat(isDeleteAction ? theme.menuItemHoverBackgroundColorDelete : theme.menuItemHoverBackgroundColor, ";\n ");
|
|
49550
50360
|
});
|
|
49551
50361
|
|
|
49552
|
-
var _excluded$
|
|
50362
|
+
var _excluded$E = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
|
|
49553
50363
|
var PopupMenuItem = function PopupMenuItem(_ref) {
|
|
49554
50364
|
var id = _ref.id,
|
|
49555
50365
|
closeMenuCallback = _ref.closeMenuCallback,
|
|
@@ -49565,7 +50375,7 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
|
|
|
49565
50375
|
hoverStyles = _ref.hoverStyles,
|
|
49566
50376
|
activeStyles = _ref.activeStyles,
|
|
49567
50377
|
extraStyles = _ref.extraStyles,
|
|
49568
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
50378
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
49569
50379
|
return /*#__PURE__*/React__default.createElement(PopupMenuItemContainer, _extends({
|
|
49570
50380
|
id: id,
|
|
49571
50381
|
role: "menuItem",
|
|
@@ -50137,7 +50947,7 @@ exports.LinkCard = LinkCard$1;
|
|
|
50137
50947
|
exports.Loading = Loading;
|
|
50138
50948
|
exports.LoadingLine = LoadingLine;
|
|
50139
50949
|
exports.LoginForm = LoginForm;
|
|
50140
|
-
exports.Modal = Modal$
|
|
50950
|
+
exports.Modal = Modal$3;
|
|
50141
50951
|
exports.Module = Module$1;
|
|
50142
50952
|
exports.Motion = Motion;
|
|
50143
50953
|
exports.MultiCartIcon = MultiCartIcon;
|