@thecb/components 10.6.2-beta.4 → 10.6.2-beta.6

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 CHANGED
@@ -19614,6 +19614,7 @@ function _wrapNativeSuper(Class) {
19614
19614
  }
19615
19615
 
19616
19616
  // based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
19617
+
19617
19618
  /**
19618
19619
  * Parse errors.md and turn it into a simple hash of code: message
19619
19620
  * @private
@@ -19698,71 +19699,84 @@ var ERRORS = {
19698
19699
  "77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
19699
19700
  "78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
19700
19701
  };
19701
-
19702
19702
  /**
19703
19703
  * super basic version of sprintf
19704
19704
  * @private
19705
19705
  */
19706
+
19706
19707
  function format() {
19707
19708
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19708
19709
  args[_key] = arguments[_key];
19709
19710
  }
19711
+
19710
19712
  var a = args[0];
19711
19713
  var b = [];
19712
19714
  var c;
19715
+
19713
19716
  for (c = 1; c < args.length; c += 1) {
19714
19717
  b.push(args[c]);
19715
19718
  }
19719
+
19716
19720
  b.forEach(function (d) {
19717
19721
  a = a.replace(/%[a-z]/, d);
19718
19722
  });
19719
19723
  return a;
19720
19724
  }
19721
-
19722
19725
  /**
19723
19726
  * Create an error file out of errors.md for development and a simple web link to the full errors
19724
19727
  * in production mode.
19725
19728
  * @private
19726
19729
  */
19730
+
19731
+
19727
19732
  var PolishedError = /*#__PURE__*/function (_Error) {
19728
19733
  _inheritsLoose(PolishedError, _Error);
19734
+
19729
19735
  function PolishedError(code) {
19730
19736
  var _this;
19737
+
19731
19738
  if (process.env.NODE_ENV === 'production') {
19732
19739
  _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;
19733
19740
  } else {
19734
19741
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
19735
19742
  args[_key2 - 1] = arguments[_key2];
19736
19743
  }
19744
+
19737
19745
  _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
19738
19746
  }
19747
+
19739
19748
  return _assertThisInitialized(_this);
19740
19749
  }
19750
+
19741
19751
  return PolishedError;
19742
19752
  }( /*#__PURE__*/_wrapNativeSuper(Error));
19743
19753
 
19744
19754
  function colorToInt(color) {
19745
19755
  return Math.round(color * 255);
19746
19756
  }
19757
+
19747
19758
  function convertToInt(red, green, blue) {
19748
19759
  return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
19749
19760
  }
19761
+
19750
19762
  function hslToRgb(hue, saturation, lightness, convert) {
19751
19763
  if (convert === void 0) {
19752
19764
  convert = convertToInt;
19753
19765
  }
19766
+
19754
19767
  if (saturation === 0) {
19755
19768
  // achromatic
19756
19769
  return convert(lightness, lightness, lightness);
19757
- }
19770
+ } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
19771
+
19758
19772
 
19759
- // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
19760
19773
  var huePrime = (hue % 360 + 360) % 360 / 60;
19761
19774
  var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
19762
19775
  var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
19763
19776
  var red = 0;
19764
19777
  var green = 0;
19765
19778
  var blue = 0;
19779
+
19766
19780
  if (huePrime >= 0 && huePrime < 1) {
19767
19781
  red = chroma;
19768
19782
  green = secondComponent;
@@ -19782,6 +19796,7 @@ function hslToRgb(hue, saturation, lightness, convert) {
19782
19796
  red = chroma;
19783
19797
  blue = secondComponent;
19784
19798
  }
19799
+
19785
19800
  var lightnessModification = lightness - chroma / 2;
19786
19801
  var finalRed = red + lightnessModification;
19787
19802
  var finalGreen = green + lightnessModification;
@@ -19939,11 +19954,11 @@ var namedColorMap = {
19939
19954
  yellow: 'ff0',
19940
19955
  yellowgreen: '9acd32'
19941
19956
  };
19942
-
19943
19957
  /**
19944
19958
  * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
19945
19959
  * @private
19946
19960
  */
19961
+
19947
19962
  function nameToHex(color) {
19948
19963
  if (typeof color !== 'string') return color;
19949
19964
  var normalizedColorName = color.toLowerCase();
@@ -19958,7 +19973,6 @@ var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\
19958
19973
  var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
19959
19974
  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;
19960
19975
  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;
19961
-
19962
19976
  /**
19963
19977
  * Returns an RgbColor or RgbaColor object. This utility function is only useful
19964
19978
  * if want to extract a color component. With the color util `toColorString` you
@@ -19970,11 +19984,14 @@ var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[
19970
19984
  * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
19971
19985
  * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
19972
19986
  */
19987
+
19973
19988
  function parseToRgb(color) {
19974
19989
  if (typeof color !== 'string') {
19975
19990
  throw new PolishedError(3);
19976
19991
  }
19992
+
19977
19993
  var normalizedColor = nameToHex(color);
19994
+
19978
19995
  if (normalizedColor.match(hexRegex)) {
19979
19996
  return {
19980
19997
  red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
@@ -19982,6 +19999,7 @@ function parseToRgb(color) {
19982
19999
  blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
19983
20000
  };
19984
20001
  }
20002
+
19985
20003
  if (normalizedColor.match(hexRgbaRegex)) {
19986
20004
  var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
19987
20005
  return {
@@ -19991,6 +20009,7 @@ function parseToRgb(color) {
19991
20009
  alpha: alpha
19992
20010
  };
19993
20011
  }
20012
+
19994
20013
  if (normalizedColor.match(reducedHexRegex)) {
19995
20014
  return {
19996
20015
  red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
@@ -19998,8 +20017,10 @@ function parseToRgb(color) {
19998
20017
  blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
19999
20018
  };
20000
20019
  }
20020
+
20001
20021
  if (normalizedColor.match(reducedRgbaHexRegex)) {
20002
20022
  var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
20023
+
20003
20024
  return {
20004
20025
  red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
20005
20026
  green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
@@ -20007,7 +20028,9 @@ function parseToRgb(color) {
20007
20028
  alpha: _alpha
20008
20029
  };
20009
20030
  }
20031
+
20010
20032
  var rgbMatched = rgbRegex.exec(normalizedColor);
20033
+
20011
20034
  if (rgbMatched) {
20012
20035
  return {
20013
20036
  red: parseInt("" + rgbMatched[1], 10),
@@ -20015,7 +20038,9 @@ function parseToRgb(color) {
20015
20038
  blue: parseInt("" + rgbMatched[3], 10)
20016
20039
  };
20017
20040
  }
20041
+
20018
20042
  var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
20043
+
20019
20044
  if (rgbaMatched) {
20020
20045
  return {
20021
20046
  red: parseInt("" + rgbaMatched[1], 10),
@@ -20024,32 +20049,44 @@ function parseToRgb(color) {
20024
20049
  alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
20025
20050
  };
20026
20051
  }
20052
+
20027
20053
  var hslMatched = hslRegex.exec(normalizedColor);
20054
+
20028
20055
  if (hslMatched) {
20029
20056
  var hue = parseInt("" + hslMatched[1], 10);
20030
20057
  var saturation = parseInt("" + hslMatched[2], 10) / 100;
20031
20058
  var lightness = parseInt("" + hslMatched[3], 10) / 100;
20032
20059
  var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
20033
20060
  var hslRgbMatched = rgbRegex.exec(rgbColorString);
20061
+
20034
20062
  if (!hslRgbMatched) {
20035
20063
  throw new PolishedError(4, normalizedColor, rgbColorString);
20036
20064
  }
20065
+
20037
20066
  return {
20038
20067
  red: parseInt("" + hslRgbMatched[1], 10),
20039
20068
  green: parseInt("" + hslRgbMatched[2], 10),
20040
20069
  blue: parseInt("" + hslRgbMatched[3], 10)
20041
20070
  };
20042
20071
  }
20072
+
20043
20073
  var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
20074
+
20044
20075
  if (hslaMatched) {
20045
20076
  var _hue = parseInt("" + hslaMatched[1], 10);
20077
+
20046
20078
  var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
20079
+
20047
20080
  var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
20081
+
20048
20082
  var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
20083
+
20049
20084
  var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
20085
+
20050
20086
  if (!_hslRgbMatched) {
20051
20087
  throw new PolishedError(4, normalizedColor, _rgbColorString);
20052
20088
  }
20089
+
20053
20090
  return {
20054
20091
  red: parseInt("" + _hslRgbMatched[1], 10),
20055
20092
  green: parseInt("" + _hslRgbMatched[2], 10),
@@ -20057,80 +20094,8 @@ function parseToRgb(color) {
20057
20094
  alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
20058
20095
  };
20059
20096
  }
20060
- throw new PolishedError(5);
20061
- }
20062
-
20063
- function rgbToHsl(color) {
20064
- // make sure rgb are contained in a set of [0, 255]
20065
- var red = color.red / 255;
20066
- var green = color.green / 255;
20067
- var blue = color.blue / 255;
20068
- var max = Math.max(red, green, blue);
20069
- var min = Math.min(red, green, blue);
20070
- var lightness = (max + min) / 2;
20071
- if (max === min) {
20072
- // achromatic
20073
- if (color.alpha !== undefined) {
20074
- return {
20075
- hue: 0,
20076
- saturation: 0,
20077
- lightness: lightness,
20078
- alpha: color.alpha
20079
- };
20080
- } else {
20081
- return {
20082
- hue: 0,
20083
- saturation: 0,
20084
- lightness: lightness
20085
- };
20086
- }
20087
- }
20088
- var hue;
20089
- var delta = max - min;
20090
- var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
20091
- switch (max) {
20092
- case red:
20093
- hue = (green - blue) / delta + (green < blue ? 6 : 0);
20094
- break;
20095
- case green:
20096
- hue = (blue - red) / delta + 2;
20097
- break;
20098
- default:
20099
- // blue case
20100
- hue = (red - green) / delta + 4;
20101
- break;
20102
- }
20103
- hue *= 60;
20104
- if (color.alpha !== undefined) {
20105
- return {
20106
- hue: hue,
20107
- saturation: saturation,
20108
- lightness: lightness,
20109
- alpha: color.alpha
20110
- };
20111
- }
20112
- return {
20113
- hue: hue,
20114
- saturation: saturation,
20115
- lightness: lightness
20116
- };
20117
- }
20118
20097
 
20119
- /**
20120
- * Returns an HslColor or HslaColor object. This utility function is only useful
20121
- * if want to extract a color component. With the color util `toColorString` you
20122
- * can convert a HslColor or HslaColor object back to a string.
20123
- *
20124
- * @example
20125
- * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
20126
- * const color1 = parseToHsl('rgb(255, 0, 0)');
20127
- * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
20128
- * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
20129
- */
20130
- function parseToHsl(color) {
20131
- // Note: At a later stage we can optimize this function as right now a hsl
20132
- // color would be parsed converted to rgb values and converted back to hsl.
20133
- return rgbToHsl(parseToRgb(color));
20098
+ throw new PolishedError(5);
20134
20099
  }
20135
20100
 
20136
20101
  /**
@@ -20141,8 +20106,10 @@ var reduceHexValue = function reduceHexValue(value) {
20141
20106
  if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
20142
20107
  return "#" + value[1] + value[3] + value[5];
20143
20108
  }
20109
+
20144
20110
  return value;
20145
20111
  };
20112
+
20146
20113
  var reduceHexValue$1 = reduceHexValue;
20147
20114
 
20148
20115
  function numberToHex(value) {
@@ -20150,83 +20117,6 @@ function numberToHex(value) {
20150
20117
  return hex.length === 1 ? "0" + hex : hex;
20151
20118
  }
20152
20119
 
20153
- function colorToHex(color) {
20154
- return numberToHex(Math.round(color * 255));
20155
- }
20156
- function convertToHex(red, green, blue) {
20157
- return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
20158
- }
20159
- function hslToHex(hue, saturation, lightness) {
20160
- return hslToRgb(hue, saturation, lightness, convertToHex);
20161
- }
20162
-
20163
- /**
20164
- * Returns a string value for the color. The returned result is the smallest possible hex notation.
20165
- *
20166
- * @example
20167
- * // Styles as object usage
20168
- * const styles = {
20169
- * background: hsl(359, 0.75, 0.4),
20170
- * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
20171
- * }
20172
- *
20173
- * // styled-components usage
20174
- * const div = styled.div`
20175
- * background: ${hsl(359, 0.75, 0.4)};
20176
- * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
20177
- * `
20178
- *
20179
- * // CSS in JS Output
20180
- *
20181
- * element {
20182
- * background: "#b3191c";
20183
- * background: "#b3191c";
20184
- * }
20185
- */
20186
- function hsl(value, saturation, lightness) {
20187
- if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
20188
- return hslToHex(value, saturation, lightness);
20189
- } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
20190
- return hslToHex(value.hue, value.saturation, value.lightness);
20191
- }
20192
- throw new PolishedError(1);
20193
- }
20194
-
20195
- /**
20196
- * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
20197
- *
20198
- * @example
20199
- * // Styles as object usage
20200
- * const styles = {
20201
- * background: hsla(359, 0.75, 0.4, 0.7),
20202
- * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
20203
- * background: hsla(359, 0.75, 0.4, 1),
20204
- * }
20205
- *
20206
- * // styled-components usage
20207
- * const div = styled.div`
20208
- * background: ${hsla(359, 0.75, 0.4, 0.7)};
20209
- * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
20210
- * background: ${hsla(359, 0.75, 0.4, 1)};
20211
- * `
20212
- *
20213
- * // CSS in JS Output
20214
- *
20215
- * element {
20216
- * background: "rgba(179,25,28,0.7)";
20217
- * background: "rgba(179,25,28,0.7)";
20218
- * background: "#b3191c";
20219
- * }
20220
- */
20221
- function hsla$1(value, saturation, lightness, alpha) {
20222
- if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
20223
- return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
20224
- } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
20225
- return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
20226
- }
20227
- throw new PolishedError(2);
20228
- }
20229
-
20230
20120
  /**
20231
20121
  * Returns a string value for the color. The returned result is the smallest possible hex notation.
20232
20122
  *
@@ -20256,6 +20146,7 @@ function rgb(value, green, blue) {
20256
20146
  } else if (typeof value === 'object' && green === undefined && blue === undefined) {
20257
20147
  return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
20258
20148
  }
20149
+
20259
20150
  throw new PolishedError(6);
20260
20151
  }
20261
20152
 
@@ -20302,60 +20193,8 @@ function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
20302
20193
  } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
20303
20194
  return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
20304
20195
  }
20305
- throw new PolishedError(7);
20306
- }
20307
20196
 
20308
- var isRgb = function isRgb(color) {
20309
- return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
20310
- };
20311
- var isRgba$1 = function isRgba(color) {
20312
- return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
20313
- };
20314
- var isHsl = function isHsl(color) {
20315
- return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
20316
- };
20317
- var isHsla$1 = function isHsla(color) {
20318
- return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
20319
- };
20320
-
20321
- /**
20322
- * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
20323
- * This util is useful in case you only know on runtime which color object is
20324
- * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
20325
- *
20326
- * @example
20327
- * // Styles as object usage
20328
- * const styles = {
20329
- * background: toColorString({ red: 255, green: 205, blue: 100 }),
20330
- * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
20331
- * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
20332
- * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
20333
- * }
20334
- *
20335
- * // styled-components usage
20336
- * const div = styled.div`
20337
- * background: ${toColorString({ red: 255, green: 205, blue: 100 })};
20338
- * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
20339
- * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
20340
- * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
20341
- * `
20342
- *
20343
- * // CSS in JS Output
20344
- * element {
20345
- * background: "#ffcd64";
20346
- * background: "rgba(255,205,100,0.72)";
20347
- * background: "#00f";
20348
- * background: "rgba(179,25,25,0.72)";
20349
- * }
20350
- */
20351
-
20352
- function toColorString(color) {
20353
- if (typeof color !== 'object') throw new PolishedError(8);
20354
- if (isRgba$1(color)) return rgba$1(color);
20355
- if (isRgb(color)) return rgb(color);
20356
- if (isHsla$1(color)) return hsla$1(color);
20357
- if (isHsl(color)) return hsl(color);
20358
- throw new PolishedError(8);
20197
+ throw new PolishedError(7);
20359
20198
  }
20360
20199
 
20361
20200
  // Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
@@ -20368,156 +20207,14 @@ function curried(f, length, acc) {
20368
20207
  var combined = acc.concat(Array.prototype.slice.call(arguments));
20369
20208
  return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
20370
20209
  };
20371
- }
20210
+ } // eslint-disable-next-line no-redeclare
20211
+
20372
20212
 
20373
- // eslint-disable-next-line no-redeclare
20374
20213
  function curry(f) {
20375
20214
  // eslint-disable-line no-redeclare
20376
20215
  return curried(f, f.length, []);
20377
20216
  }
20378
20217
 
20379
- /**
20380
- * Changes the hue of the color. Hue is a number between 0 to 360. The first
20381
- * argument for adjustHue is the amount of degrees the color is rotated around
20382
- * the color wheel, always producing a positive hue value.
20383
- *
20384
- * @example
20385
- * // Styles as object usage
20386
- * const styles = {
20387
- * background: adjustHue(180, '#448'),
20388
- * background: adjustHue('180', 'rgba(101,100,205,0.7)'),
20389
- * }
20390
- *
20391
- * // styled-components usage
20392
- * const div = styled.div`
20393
- * background: ${adjustHue(180, '#448')};
20394
- * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
20395
- * `
20396
- *
20397
- * // CSS in JS Output
20398
- * element {
20399
- * background: "#888844";
20400
- * background: "rgba(136,136,68,0.7)";
20401
- * }
20402
- */
20403
- function adjustHue(degree, color) {
20404
- if (color === 'transparent') return color;
20405
- var hslColor = parseToHsl(color);
20406
- return toColorString(_extends$1({}, hslColor, {
20407
- hue: hslColor.hue + parseFloat(degree)
20408
- }));
20409
- }
20410
-
20411
- // prettier-ignore
20412
- var curriedAdjustHue = curry /* ::<number | string, string, string> */(adjustHue);
20413
-
20414
- function guard(lowerBoundary, upperBoundary, value) {
20415
- return Math.max(lowerBoundary, Math.min(upperBoundary, value));
20416
- }
20417
-
20418
- /**
20419
- * Returns a string value for the darkened color.
20420
- *
20421
- * @example
20422
- * // Styles as object usage
20423
- * const styles = {
20424
- * background: darken(0.2, '#FFCD64'),
20425
- * background: darken('0.2', 'rgba(255,205,100,0.7)'),
20426
- * }
20427
- *
20428
- * // styled-components usage
20429
- * const div = styled.div`
20430
- * background: ${darken(0.2, '#FFCD64')};
20431
- * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
20432
- * `
20433
- *
20434
- * // CSS in JS Output
20435
- *
20436
- * element {
20437
- * background: "#ffbd31";
20438
- * background: "rgba(255,189,49,0.7)";
20439
- * }
20440
- */
20441
- function darken(amount, color) {
20442
- if (color === 'transparent') return color;
20443
- var hslColor = parseToHsl(color);
20444
- return toColorString(_extends$1({}, hslColor, {
20445
- lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
20446
- }));
20447
- }
20448
-
20449
- // prettier-ignore
20450
- var curriedDarken = curry /* ::<number | string, string, string> */(darken);
20451
-
20452
- /**
20453
- * Decreases the intensity of a color. Its range is between 0 to 1. The first
20454
- * argument of the desaturate function is the amount by how much the color
20455
- * intensity should be decreased.
20456
- *
20457
- * @example
20458
- * // Styles as object usage
20459
- * const styles = {
20460
- * background: desaturate(0.2, '#CCCD64'),
20461
- * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
20462
- * }
20463
- *
20464
- * // styled-components usage
20465
- * const div = styled.div`
20466
- * background: ${desaturate(0.2, '#CCCD64')};
20467
- * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
20468
- * `
20469
- *
20470
- * // CSS in JS Output
20471
- * element {
20472
- * background: "#b8b979";
20473
- * background: "rgba(184,185,121,0.7)";
20474
- * }
20475
- */
20476
- function desaturate(amount, color) {
20477
- if (color === 'transparent') return color;
20478
- var hslColor = parseToHsl(color);
20479
- return toColorString(_extends$1({}, hslColor, {
20480
- saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
20481
- }));
20482
- }
20483
-
20484
- // prettier-ignore
20485
- var curriedDesaturate = curry /* ::<number | string, string, string> */(desaturate);
20486
-
20487
- /**
20488
- * Returns a string value for the lightened color.
20489
- *
20490
- * @example
20491
- * // Styles as object usage
20492
- * const styles = {
20493
- * background: lighten(0.2, '#CCCD64'),
20494
- * background: lighten('0.2', 'rgba(204,205,100,0.7)'),
20495
- * }
20496
- *
20497
- * // styled-components usage
20498
- * const div = styled.div`
20499
- * background: ${lighten(0.2, '#FFCD64')};
20500
- * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
20501
- * `
20502
- *
20503
- * // CSS in JS Output
20504
- *
20505
- * element {
20506
- * background: "#e5e6b1";
20507
- * background: "rgba(229,230,177,0.7)";
20508
- * }
20509
- */
20510
- function lighten(amount, color) {
20511
- if (color === 'transparent') return color;
20512
- var hslColor = parseToHsl(color);
20513
- return toColorString(_extends$1({}, hslColor, {
20514
- lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
20515
- }));
20516
- }
20517
-
20518
- // prettier-ignore
20519
- var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
20520
-
20521
20218
  /**
20522
20219
  * 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.
20523
20220
  *
@@ -20544,21 +20241,25 @@ var curriedLighten = curry /* ::<number | string, string, string> */(lighten);
20544
20241
  * background: "rgba(63, 0, 191, 0.75)";
20545
20242
  * }
20546
20243
  */
20244
+
20547
20245
  function mix$1(weight, color, otherColor) {
20548
20246
  if (color === 'transparent') return otherColor;
20549
20247
  if (otherColor === 'transparent') return color;
20550
20248
  if (weight === 0) return otherColor;
20551
20249
  var parsedColor1 = parseToRgb(color);
20250
+
20552
20251
  var color1 = _extends$1({}, parsedColor1, {
20553
20252
  alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
20554
20253
  });
20254
+
20555
20255
  var parsedColor2 = parseToRgb(otherColor);
20256
+
20556
20257
  var color2 = _extends$1({}, parsedColor2, {
20557
20258
  alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
20558
- });
20559
-
20560
- // The formula is copied from the original Sass implementation:
20259
+ }); // The formula is copied from the original Sass implementation:
20561
20260
  // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
20261
+
20262
+
20562
20263
  var alphaDelta = color1.alpha - color2.alpha;
20563
20264
  var x = parseFloat(weight) * 2 - 1;
20564
20265
  var y = x * alphaDelta === -1 ? x : x + alphaDelta;
@@ -20572,217 +20273,13 @@ function mix$1(weight, color, otherColor) {
20572
20273
  alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
20573
20274
  };
20574
20275
  return rgba$1(mixedColor);
20575
- }
20576
-
20577
- // prettier-ignore
20578
- var curriedMix = curry /* ::<number | string, string, string, string> */(mix$1);
20579
- var mix$1$1 = curriedMix;
20580
-
20581
- /**
20582
- * Increases the opacity of a color. Its range for the amount is between 0 to 1.
20583
- *
20584
- *
20585
- * @example
20586
- * // Styles as object usage
20587
- * const styles = {
20588
- * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
20589
- * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
20590
- * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
20591
- * }
20592
- *
20593
- * // styled-components usage
20594
- * const div = styled.div`
20595
- * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
20596
- * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
20597
- * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
20598
- * `
20599
- *
20600
- * // CSS in JS Output
20601
- *
20602
- * element {
20603
- * background: "#fff";
20604
- * background: "rgba(255,255,255,0.7)";
20605
- * background: "rgba(255,0,0,0.7)";
20606
- * }
20607
- */
20608
- function opacify(amount, color) {
20609
- if (color === 'transparent') return color;
20610
- var parsedColor = parseToRgb(color);
20611
- var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
20612
- var colorWithAlpha = _extends$1({}, parsedColor, {
20613
- alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
20614
- });
20615
- return rgba$1(colorWithAlpha);
20616
- }
20276
+ } // prettier-ignore
20617
20277
 
20618
- // prettier-ignore
20619
- var curriedOpacify = curry /* ::<number | string, string, string> */(opacify);
20620
20278
 
20621
- /**
20622
- * Increases the intensity of a color. Its range is between 0 to 1. The first
20623
- * argument of the saturate function is the amount by how much the color
20624
- * intensity should be increased.
20625
- *
20626
- * @example
20627
- * // Styles as object usage
20628
- * const styles = {
20629
- * background: saturate(0.2, '#CCCD64'),
20630
- * background: saturate('0.2', 'rgba(204,205,100,0.7)'),
20631
- * }
20632
- *
20633
- * // styled-components usage
20634
- * const div = styled.div`
20635
- * background: ${saturate(0.2, '#FFCD64')};
20636
- * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
20637
- * `
20638
- *
20639
- * // CSS in JS Output
20640
- *
20641
- * element {
20642
- * background: "#e0e250";
20643
- * background: "rgba(224,226,80,0.7)";
20644
- * }
20645
- */
20646
- function saturate(amount, color) {
20647
- if (color === 'transparent') return color;
20648
- var hslColor = parseToHsl(color);
20649
- return toColorString(_extends$1({}, hslColor, {
20650
- saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
20651
- }));
20652
- }
20653
-
20654
- // prettier-ignore
20655
- var curriedSaturate = curry /* ::<number | string, string, string> */(saturate);
20656
-
20657
- /**
20658
- * Sets the hue of a color to the provided value. The hue range can be
20659
- * from 0 and 359.
20660
- *
20661
- * @example
20662
- * // Styles as object usage
20663
- * const styles = {
20664
- * background: setHue(42, '#CCCD64'),
20665
- * background: setHue('244', 'rgba(204,205,100,0.7)'),
20666
- * }
20667
- *
20668
- * // styled-components usage
20669
- * const div = styled.div`
20670
- * background: ${setHue(42, '#CCCD64')};
20671
- * background: ${setHue('244', 'rgba(204,205,100,0.7)')};
20672
- * `
20673
- *
20674
- * // CSS in JS Output
20675
- * element {
20676
- * background: "#cdae64";
20677
- * background: "rgba(107,100,205,0.7)";
20678
- * }
20679
- */
20680
- function setHue(hue, color) {
20681
- if (color === 'transparent') return color;
20682
- return toColorString(_extends$1({}, parseToHsl(color), {
20683
- hue: parseFloat(hue)
20684
- }));
20685
- }
20686
-
20687
- // prettier-ignore
20688
- var curriedSetHue = curry /* ::<number | string, string, string> */(setHue);
20689
-
20690
- /**
20691
- * Sets the lightness of a color to the provided value. The lightness range can be
20692
- * from 0 and 1.
20693
- *
20694
- * @example
20695
- * // Styles as object usage
20696
- * const styles = {
20697
- * background: setLightness(0.2, '#CCCD64'),
20698
- * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
20699
- * }
20700
- *
20701
- * // styled-components usage
20702
- * const div = styled.div`
20703
- * background: ${setLightness(0.2, '#CCCD64')};
20704
- * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
20705
- * `
20706
- *
20707
- * // CSS in JS Output
20708
- * element {
20709
- * background: "#4d4d19";
20710
- * background: "rgba(223,224,159,0.7)";
20711
- * }
20712
- */
20713
- function setLightness(lightness, color) {
20714
- if (color === 'transparent') return color;
20715
- return toColorString(_extends$1({}, parseToHsl(color), {
20716
- lightness: parseFloat(lightness)
20717
- }));
20718
- }
20719
-
20720
- // prettier-ignore
20721
- var curriedSetLightness = curry /* ::<number | string, string, string> */(setLightness);
20722
-
20723
- /**
20724
- * Sets the saturation of a color to the provided value. The saturation range can be
20725
- * from 0 and 1.
20726
- *
20727
- * @example
20728
- * // Styles as object usage
20729
- * const styles = {
20730
- * background: setSaturation(0.2, '#CCCD64'),
20731
- * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
20732
- * }
20733
- *
20734
- * // styled-components usage
20735
- * const div = styled.div`
20736
- * background: ${setSaturation(0.2, '#CCCD64')};
20737
- * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
20738
- * `
20739
- *
20740
- * // CSS in JS Output
20741
- * element {
20742
- * background: "#adad84";
20743
- * background: "rgba(228,229,76,0.7)";
20744
- * }
20745
- */
20746
- function setSaturation(saturation, color) {
20747
- if (color === 'transparent') return color;
20748
- return toColorString(_extends$1({}, parseToHsl(color), {
20749
- saturation: parseFloat(saturation)
20750
- }));
20751
- }
20752
-
20753
- // prettier-ignore
20754
- var curriedSetSaturation = curry /* ::<number | string, string, string> */(setSaturation);
20755
-
20756
- /**
20757
- * Shades a color by mixing it with black. `shade` can produce
20758
- * hue shifts, where as `darken` manipulates the luminance channel and therefore
20759
- * doesn't produce hue shifts.
20760
- *
20761
- * @example
20762
- * // Styles as object usage
20763
- * const styles = {
20764
- * background: shade(0.25, '#00f')
20765
- * }
20766
- *
20767
- * // styled-components usage
20768
- * const div = styled.div`
20769
- * background: ${shade(0.25, '#00f')};
20770
- * `
20771
- *
20772
- * // CSS in JS Output
20773
- *
20774
- * element {
20775
- * background: "#00003f";
20776
- * }
20777
- */
20778
-
20779
- function shade(percentage, color) {
20780
- if (color === 'transparent') return color;
20781
- return mix$1$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
20782
- }
20783
-
20784
- // prettier-ignore
20785
- var curriedShade = curry /* ::<number | string, string, string> */(shade);
20279
+ var curriedMix = /*#__PURE__*/curry
20280
+ /* ::<number | string, string, string, string> */
20281
+ (mix$1);
20282
+ var mix$1$1 = curriedMix;
20786
20283
 
20787
20284
  /**
20788
20285
  * Tints a color by mixing it with white. `tint` can produce
@@ -20810,51 +20307,13 @@ var curriedShade = curry /* ::<number | string, string, string> */(shade);
20810
20307
  function tint(percentage, color) {
20811
20308
  if (color === 'transparent') return color;
20812
20309
  return mix$1$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
20813
- }
20814
-
20815
- // prettier-ignore
20816
- var curriedTint = curry /* ::<number | string, string, string> */(tint);
20817
- var curriedTint$1 = curriedTint;
20310
+ } // prettier-ignore
20818
20311
 
20819
- /**
20820
- * Decreases the opacity of a color. Its range for the amount is between 0 to 1.
20821
- *
20822
- *
20823
- * @example
20824
- * // Styles as object usage
20825
- * const styles = {
20826
- * background: transparentize(0.1, '#fff'),
20827
- * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
20828
- * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
20829
- * }
20830
- *
20831
- * // styled-components usage
20832
- * const div = styled.div`
20833
- * background: ${transparentize(0.1, '#fff')};
20834
- * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
20835
- * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
20836
- * `
20837
- *
20838
- * // CSS in JS Output
20839
- *
20840
- * element {
20841
- * background: "rgba(255,255,255,0.9)";
20842
- * background: "rgba(255,255,255,0.8)";
20843
- * background: "rgba(255,0,0,0.3)";
20844
- * }
20845
- */
20846
- function transparentize(amount, color) {
20847
- if (color === 'transparent') return color;
20848
- var parsedColor = parseToRgb(color);
20849
- var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
20850
- var colorWithAlpha = _extends$1({}, parsedColor, {
20851
- alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
20852
- });
20853
- return rgba$1(colorWithAlpha);
20854
- }
20855
20312
 
20856
- // prettier-ignore
20857
- var curriedTransparentize = curry /* ::<number | string, string, string> */(transparentize);
20313
+ var curriedTint = /*#__PURE__*/curry
20314
+ /* ::<number | string, string, string> */
20315
+ (tint);
20316
+ var curriedTint$1 = curriedTint;
20858
20317
 
20859
20318
  var linkColor = MATISSE_BLUE;
20860
20319
  var fallbackValues$8 = {
@@ -23545,19 +23004,32 @@ var toIndexedObject = function (it) {
23545
23004
  return indexedObject(requireObjectCoercible(it));
23546
23005
  };
23547
23006
 
23548
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
23549
23007
  var documentAll = typeof document == 'object' && document.all;
23550
23008
 
23009
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
23010
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
23011
+ var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
23012
+
23013
+ var documentAll_1 = {
23014
+ all: documentAll,
23015
+ IS_HTMLDDA: IS_HTMLDDA
23016
+ };
23017
+
23018
+ var documentAll$1 = documentAll_1.all;
23019
+
23551
23020
  // `IsCallable` abstract operation
23552
23021
  // https://tc39.es/ecma262/#sec-iscallable
23553
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
23554
- var isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
23555
- return typeof argument == 'function' || argument === documentAll;
23022
+ var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
23023
+ return typeof argument == 'function' || argument === documentAll$1;
23556
23024
  } : function (argument) {
23557
23025
  return typeof argument == 'function';
23558
23026
  };
23559
23027
 
23560
- var isObject = function (it) {
23028
+ var documentAll$2 = documentAll_1.all;
23029
+
23030
+ var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
23031
+ return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
23032
+ } : function (it) {
23561
23033
  return typeof it == 'object' ? it !== null : isCallable(it);
23562
23034
  };
23563
23035
 
@@ -23693,10 +23165,10 @@ var shared = createCommonjsModule(function (module) {
23693
23165
  (module.exports = function (key, value) {
23694
23166
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
23695
23167
  })('versions', []).push({
23696
- version: '3.35.1',
23168
+ version: '3.33.3',
23697
23169
  mode: 'global',
23698
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
23699
- license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
23170
+ copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
23171
+ license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
23700
23172
  source: 'https://github.com/zloirock/core-js'
23701
23173
  });
23702
23174
  });
@@ -23993,7 +23465,7 @@ var TEMPLATE = String(String).split('String');
23993
23465
 
23994
23466
  var makeBuiltIn = module.exports = function (value, name, options) {
23995
23467
  if (stringSlice($String(name), 0, 7) === 'Symbol(') {
23996
- name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
23468
+ name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
23997
23469
  }
23998
23470
  if (options && options.getter) name = 'get ' + name;
23999
23471
  if (options && options.setter) name = 'set ' + name;
@@ -24081,8 +23553,7 @@ var min$1 = Math.min;
24081
23553
  // `ToLength` abstract operation
24082
23554
  // https://tc39.es/ecma262/#sec-tolength
24083
23555
  var toLength = function (argument) {
24084
- var len = toIntegerOrInfinity(argument);
24085
- return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
23556
+ return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
24086
23557
  };
24087
23558
 
24088
23559
  // `LengthOfArrayLike` abstract operation
@@ -24242,7 +23713,7 @@ var _export = function (options, source) {
24242
23713
  } else if (STATIC) {
24243
23714
  target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
24244
23715
  } else {
24245
- target = global_1[TARGET] && global_1[TARGET].prototype;
23716
+ target = (global_1[TARGET] || {}).prototype;
24246
23717
  }
24247
23718
  if (target) for (key in source) {
24248
23719
  sourceProperty = source[key];
@@ -24505,15 +23976,11 @@ var functionUncurryThisAccessor = function (object, key, method) {
24505
23976
  } catch (error) { /* empty */ }
24506
23977
  };
24507
23978
 
24508
- var isPossiblePrototype = function (argument) {
24509
- return isObject(argument) || argument === null;
24510
- };
24511
-
24512
23979
  var $String$4 = String;
24513
23980
  var $TypeError$6 = TypeError;
24514
23981
 
24515
23982
  var aPossiblePrototype = function (argument) {
24516
- if (isPossiblePrototype(argument)) return argument;
23983
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
24517
23984
  throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
24518
23985
  };
24519
23986
 
@@ -28106,14 +27573,14 @@ var renderContent = function renderContent(_ref2) {
28106
27573
  textDecoration: "none"
28107
27574
  }
28108
27575
  }, /*#__PURE__*/React__default.createElement(Box, {
28109
- padding: "0 2px",
27576
+ padding: "0",
28110
27577
  minHeight: "100%",
28111
27578
  extraStyles: "cursor: pointer;"
28112
27579
  }, children)) : /*#__PURE__*/React__default.createElement(Box, {
28113
27580
  onClick: action,
28114
27581
  padding: "0",
28115
27582
  minHeight: "100%",
28116
- extraStyles: "margin: 0 2px; cursor: pointer;",
27583
+ extraStyles: "cursor: pointer;",
28117
27584
  dataQa: dataQa,
28118
27585
  tabIndex: "0",
28119
27586
  onKeyPress: function onKeyPress(e) {