@thecb/components 9.1.4 → 9.1.5

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,
@@ -23733,9 +23735,11 @@ exportTypedArrayMethod$1('at', function at(index) {
23733
23735
 
23734
23736
  var selectedColor = "".concat(MATISSE_BLUE);
23735
23737
  var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
23738
+ var focusColor = "".concat(MATISSE_BLUE_DARK);
23736
23739
  var fallbackValues$f = {
23737
23740
  selectedColor: selectedColor,
23738
- hoverColor: hoverColor$3
23741
+ hoverColor: hoverColor$3,
23742
+ focusColor: focusColor
23739
23743
  };
23740
23744
 
23741
23745
  var IconWrapper = styled.div.withConfig({
@@ -23758,7 +23762,7 @@ var DropdownContentWrapper = styled.div.withConfig({
23758
23762
  var DropdownItemWrapper = styled.li.withConfig({
23759
23763
  displayName: "Dropdown__DropdownItemWrapper",
23760
23764
  componentId: "sc-pn6m0h-2"
23761
- })(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;list-style:none;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
23765
+ })(["text-align:start;border-width:2px;border-style:solid;border-color:", ";box-shadow:none;box-sizing:border-box;width:100%;list-style:none;cursor:", ";&:hover{border-color:", ";> *{background:", ";border-color:", ";}}&:focus{outline:none;border-color:", ";> *{background:", ";border-color:white;outline:none;}}"], function (_ref4) {
23762
23766
  var selected = _ref4.selected,
23763
23767
  themeValues = _ref4.themeValues;
23764
23768
  return selected ? themeValues.selectedColor : WHITE;
@@ -23766,44 +23770,69 @@ var DropdownItemWrapper = styled.li.withConfig({
23766
23770
  var disabled = _ref5.disabled;
23767
23771
  return disabled ? "default" : "pointer";
23768
23772
  }, function (_ref6) {
23769
- var selected = _ref6.selected,
23770
- disabled = _ref6.disabled,
23773
+ var disabled = _ref6.disabled,
23774
+ selected = _ref6.selected,
23771
23775
  themeValues = _ref6.themeValues;
23772
- return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
23776
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23773
23777
  }, function (_ref7) {
23774
23778
  var selected = _ref7.selected,
23775
23779
  disabled = _ref7.disabled,
23776
23780
  themeValues = _ref7.themeValues;
23777
- return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
23781
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23782
+ }, function (_ref8) {
23783
+ var selected = _ref8.selected,
23784
+ disabled = _ref8.disabled,
23785
+ themeValues = _ref8.themeValues;
23786
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23787
+ }, function (_ref9) {
23788
+ var themeValues = _ref9.themeValues;
23789
+ return themeValues.selectedColor;
23790
+ }, function (_ref10) {
23791
+ var selected = _ref10.selected,
23792
+ disabled = _ref10.disabled,
23793
+ themeValues = _ref10.themeValues;
23794
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23795
+ });
23796
+ var DropdownItemBorder = styled.div.withConfig({
23797
+ displayName: "Dropdown__DropdownItemBorder",
23798
+ componentId: "sc-pn6m0h-3"
23799
+ })(["background:", ";border-color:", ";border-width:2px;border-style:solid;padding:12px;"], function (_ref11) {
23800
+ var selected = _ref11.selected,
23801
+ themeValues = _ref11.themeValues;
23802
+ return selected ? themeValues.selectedColor : WHITE;
23803
+ }, function (_ref12) {
23804
+ var selected = _ref12.selected,
23805
+ themeValues = _ref12.themeValues;
23806
+ return selected ? themeValues.selectedColor : WHITE;
23778
23807
  });
23779
23808
 
23780
- var Dropdown = function Dropdown(_ref8) {
23781
- var placeholder = _ref8.placeholder,
23782
- options = _ref8.options,
23783
- value = _ref8.value,
23784
- isOpen = _ref8.isOpen,
23785
- isError = _ref8.isError,
23786
- onSelect = _ref8.onSelect,
23787
- _ref8$disabledValues = _ref8.disabledValues,
23788
- disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
23789
- _ref8$onClick = _ref8.onClick,
23790
- _onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
23791
- themeValues = _ref8.themeValues,
23792
- maxHeight = _ref8.maxHeight,
23793
- _ref8$widthFitOptions = _ref8.widthFitOptions,
23794
- widthFitOptions = _ref8$widthFitOptions === void 0 ? false : _ref8$widthFitOptions,
23795
- disabled = _ref8.disabled,
23796
- _ref8$hasTitles = _ref8.hasTitles,
23797
- hasTitles = _ref8$hasTitles === void 0 ? false : _ref8$hasTitles,
23798
- _ref8$autoEraseTypeAh = _ref8.autoEraseTypeAhead,
23799
- autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
23800
- ariaLabelledby = _ref8.ariaLabelledby,
23801
- ariaDescribedby = _ref8.ariaDescribedby,
23802
- autocompleteValue = _ref8.autocompleteValue,
23803
- _ref8$smoothScroll = _ref8.smoothScroll,
23804
- smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll,
23805
- _ref8$ariaInvalid = _ref8.ariaInvalid,
23806
- ariaInvalid = _ref8$ariaInvalid === void 0 ? false : _ref8$ariaInvalid;
23809
+ var Dropdown = function Dropdown(_ref13) {
23810
+ var placeholder = _ref13.placeholder,
23811
+ options = _ref13.options,
23812
+ value = _ref13.value,
23813
+ isOpen = _ref13.isOpen,
23814
+ isError = _ref13.isError,
23815
+ onSelect = _ref13.onSelect,
23816
+ _ref13$disabledValues = _ref13.disabledValues,
23817
+ disabledValues = _ref13$disabledValues === void 0 ? [] : _ref13$disabledValues,
23818
+ _ref13$onClick = _ref13.onClick,
23819
+ _onClick = _ref13$onClick === void 0 ? noop : _ref13$onClick,
23820
+ themeValues = _ref13.themeValues,
23821
+ maxHeight = _ref13.maxHeight,
23822
+ _ref13$widthFitOption = _ref13.widthFitOptions,
23823
+ widthFitOptions = _ref13$widthFitOption === void 0 ? false : _ref13$widthFitOption,
23824
+ disabled = _ref13.disabled,
23825
+ _ref13$hasTitles = _ref13.hasTitles,
23826
+ hasTitles = _ref13$hasTitles === void 0 ? false : _ref13$hasTitles,
23827
+ _ref13$autoEraseTypeA = _ref13.autoEraseTypeAhead,
23828
+ autoEraseTypeAhead = _ref13$autoEraseTypeA === void 0 ? true : _ref13$autoEraseTypeA,
23829
+ ariaLabelledby = _ref13.ariaLabelledby,
23830
+ ariaDescribedby = _ref13.ariaDescribedby,
23831
+ autocompleteValue = _ref13.autocompleteValue,
23832
+ _ref13$smoothScroll = _ref13.smoothScroll,
23833
+ smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
23834
+ _ref13$ariaInvalid = _ref13.ariaInvalid,
23835
+ ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid;
23807
23836
 
23808
23837
  var _useState = useState(""),
23809
23838
  _useState2 = _slicedToArray(_useState, 2),
@@ -24125,11 +24154,15 @@ var Dropdown = function Dropdown(_ref8) {
24125
24154
  onFocus: function onFocus() {
24126
24155
  return setFocusedRef(optionRefs.current[i]);
24127
24156
  }
24157
+ }, /*#__PURE__*/React.createElement(DropdownItemBorder, {
24158
+ disabled: disabledValues.includes(choice.value),
24159
+ selected: choice.value === value,
24160
+ themeValues: themeValues
24128
24161
  }, /*#__PURE__*/React.createElement(Text$1, {
24129
24162
  variant: "p",
24130
24163
  color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
24131
- extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
24132
- }, choice.text));
24164
+ extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
24165
+ }, choice.text)));
24133
24166
  }))) : /*#__PURE__*/React.createElement(Fragment$1, null)));
24134
24167
  };
24135
24168