@thecb/components 9.1.7-beta.6 → 9.1.7-beta.8

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.esm.js CHANGED
@@ -5011,6 +5011,7 @@ var INFO_BLUE = "#E4F4FD";
5011
5011
  var CORNFLOWER_BLUE = "#EBEFFB";
5012
5012
  var HOVER_LIGHT_BLUE = "#EFFAFF";
5013
5013
  var MATISSE_BLUE = "#15749D";
5014
+ var MATISSE_BLUE_DARK = "#105C7D";
5014
5015
  var ROYAL_BLUE = "#3181E3";
5015
5016
  var ROYAL_BLUE_VIVID = "#3B5BDB";
5016
5017
  var ASTRAL_BLUE = "#3176AA";
@@ -5145,6 +5146,7 @@ var colors = /*#__PURE__*/Object.freeze({
5145
5146
  BOSTON_BLUE: BOSTON_BLUE,
5146
5147
  HOVER_LIGHT_BLUE: HOVER_LIGHT_BLUE,
5147
5148
  MATISSE_BLUE: MATISSE_BLUE,
5149
+ MATISSE_BLUE_DARK: MATISSE_BLUE_DARK,
5148
5150
  ROYAL_BLUE: ROYAL_BLUE,
5149
5151
  ROYAL_BLUE_VIVID: ROYAL_BLUE_VIVID,
5150
5152
  ASTRAL_BLUE: ASTRAL_BLUE,
@@ -18678,12 +18680,22 @@ var fallbackValues$4 = {
18678
18680
  link: link
18679
18681
  };
18680
18682
 
18683
+ /*
18684
+
18685
+ A utility function that can generate box-shadow values for components
18686
+ Takes a string representing an rgb color value and returns an object
18687
+ with values for standard, inset, and overlay shadows.
18688
+
18689
+ The objects for standard and inset shadows contain versions approiate
18690
+ for base, hover, and active interaction states.
18691
+
18692
+ */
18693
+
18681
18694
  /*
18682
18695
  Function to convert string representing rgb color to rgba value with provided opacity
18683
18696
  ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
18684
18697
 
18685
18698
  */
18686
-
18687
18699
  var rgbToRgba = function rgbToRgba() {
18688
18700
  var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
18689
18701
  var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
@@ -18694,17 +18706,6 @@ var rgbToRgba = function rgbToRgba() {
18694
18706
 
18695
18707
  return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
18696
18708
  };
18697
- /*
18698
-
18699
- A utility function that can generate box-shadow values for components
18700
- Takes a string representing an rgb color value and returns an object
18701
- with values for standard, inset, and overlay shadows.
18702
-
18703
- The objects for standard and inset shadows contain versions approiate
18704
- for base, hover, and active interaction states.
18705
-
18706
- */
18707
-
18708
18709
 
18709
18710
  var generateShadows = function generateShadows() {
18710
18711
  var baseColorRGB = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(41, 42, 51)";
@@ -18732,52 +18733,6 @@ var generateShadows = function generateShadows() {
18732
18733
  overlay: overlay
18733
18734
  };
18734
18735
  };
18735
- /*
18736
- Function to convert a string representing hex color to rgb color
18737
- hexToRbg("#00ff00") => [0, 255, 0]
18738
- */
18739
-
18740
- var hexToRbg = function hexToRbg(hexColor) {
18741
- var hexArr = hexColor.replace("#", "");
18742
- var red = parseInt(hexArr.slice(0, 2), 16);
18743
- var green = parseInt(hexArr.slice(2, 4), 16);
18744
- var blue = parseInt(hexArr.slice(4, 6), 16);
18745
- return [red, green, blue];
18746
- };
18747
-
18748
- var rbgToHex = function rbgToHex(rbgColor) {
18749
- hexCodes = rbgColor.map(function (c) {
18750
- var hex = c.toString(16).toUpperCase();
18751
- return hex.length == 1 ? "0" + hex : hex;
18752
- });
18753
- return "#" + hexCodes.join("");
18754
- };
18755
- /*
18756
- Function to calculate a new hex color given an original
18757
- hex color, a hex background color, and an opacity number
18758
- between 0 and 1 to apply to the background.
18759
-
18760
- For example, to add a 20% black opacity (20% darker) to a green color
18761
- ("#00ff00"):
18762
- addOpacityToHex("00ff00", "#000000", .2) => "#00CC00"
18763
- */
18764
-
18765
-
18766
- var addOpacityToHex = function addOpacityToHex(hexColor, background, opacity) {
18767
- if (hexColor == TRANSPARENT) {
18768
- return hexColor;
18769
- }
18770
-
18771
- var color = hexToRbg(hexColor);
18772
- var backgroundRbg = hexToRbg(background);
18773
- var newColor = color.map(function (colorElem, index) {
18774
- return Math.floor(opacity * backgroundRbg[index] + (1 - opacity) * colorElem);
18775
- });
18776
- return rbgToHex(newColor);
18777
- };
18778
- var darken = function darken(hexColor, opacity) {
18779
- return addOpacityToHex(hexColor, "#000000", opacity);
18780
- };
18781
18736
 
18782
18737
  var Alert = function Alert(_ref) {
18783
18738
  var _generateShadows, _generateShadows$inse;
@@ -23780,9 +23735,11 @@ exportTypedArrayMethod$1('at', function at(index) {
23780
23735
 
23781
23736
  var selectedColor = "".concat(MATISSE_BLUE);
23782
23737
  var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
23738
+ var focusColor = "".concat(MATISSE_BLUE_DARK);
23783
23739
  var fallbackValues$f = {
23784
23740
  selectedColor: selectedColor,
23785
- hoverColor: hoverColor$3
23741
+ hoverColor: hoverColor$3,
23742
+ focusColor: focusColor
23786
23743
  };
23787
23744
 
23788
23745
  var IconWrapper = styled.div.withConfig({
@@ -23816,17 +23773,17 @@ var DropdownItemWrapper = styled.li.withConfig({
23816
23773
  var disabled = _ref6.disabled,
23817
23774
  selected = _ref6.selected,
23818
23775
  themeValues = _ref6.themeValues;
23819
- return selected ? darken(themeValues.selectedColor, 0.2) : disabled ? WHITE : themeValues.hoverColor;
23776
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23820
23777
  }, function (_ref7) {
23821
23778
  var selected = _ref7.selected,
23822
23779
  disabled = _ref7.disabled,
23823
23780
  themeValues = _ref7.themeValues;
23824
- return selected ? darken(themeValues.selectedColor, 0.2) : disabled ? WHITE : themeValues.hoverColor;
23781
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23825
23782
  }, function (_ref8) {
23826
23783
  var selected = _ref8.selected,
23827
23784
  disabled = _ref8.disabled,
23828
23785
  themeValues = _ref8.themeValues;
23829
- return selected ? darken(themeValues.selectedColor, 0.2) : disabled ? WHITE : themeValues.hoverColor;
23786
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23830
23787
  }, function (_ref9) {
23831
23788
  var themeValues = _ref9.themeValues;
23832
23789
  return themeValues.selectedColor;
@@ -23834,7 +23791,7 @@ var DropdownItemWrapper = styled.li.withConfig({
23834
23791
  var selected = _ref10.selected,
23835
23792
  disabled = _ref10.disabled,
23836
23793
  themeValues = _ref10.themeValues;
23837
- return selected ? darken(themeValues.selectedColor, 0.2) : disabled ? WHITE : themeValues.hoverColor;
23794
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23838
23795
  });
23839
23796
  var DropdownItemBorder = styled.div.withConfig({
23840
23797
  displayName: "Dropdown__DropdownItemBorder",