@thecb/components 9.1.5-beta.0 → 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.cjs.js CHANGED
@@ -5019,6 +5019,7 @@ var INFO_BLUE = "#E4F4FD";
5019
5019
  var CORNFLOWER_BLUE = "#EBEFFB";
5020
5020
  var HOVER_LIGHT_BLUE = "#EFFAFF";
5021
5021
  var MATISSE_BLUE = "#15749D";
5022
+ var MATISSE_BLUE_DARK = "#105C7D";
5022
5023
  var ROYAL_BLUE = "#3181E3";
5023
5024
  var ROYAL_BLUE_VIVID = "#3B5BDB";
5024
5025
  var ASTRAL_BLUE = "#3176AA";
@@ -5153,6 +5154,7 @@ var colors = /*#__PURE__*/Object.freeze({
5153
5154
  BOSTON_BLUE: BOSTON_BLUE,
5154
5155
  HOVER_LIGHT_BLUE: HOVER_LIGHT_BLUE,
5155
5156
  MATISSE_BLUE: MATISSE_BLUE,
5157
+ MATISSE_BLUE_DARK: MATISSE_BLUE_DARK,
5156
5158
  ROYAL_BLUE: ROYAL_BLUE,
5157
5159
  ROYAL_BLUE_VIVID: ROYAL_BLUE_VIVID,
5158
5160
  ASTRAL_BLUE: ASTRAL_BLUE,
@@ -23741,9 +23743,11 @@ exportTypedArrayMethod$1('at', function at(index) {
23741
23743
 
23742
23744
  var selectedColor = "".concat(MATISSE_BLUE);
23743
23745
  var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
23746
+ var focusColor = "".concat(MATISSE_BLUE_DARK);
23744
23747
  var fallbackValues$f = {
23745
23748
  selectedColor: selectedColor,
23746
- hoverColor: hoverColor$3
23749
+ hoverColor: hoverColor$3,
23750
+ focusColor: focusColor
23747
23751
  };
23748
23752
 
23749
23753
  var IconWrapper = styled__default.div.withConfig({
@@ -23766,7 +23770,7 @@ var DropdownContentWrapper = styled__default.div.withConfig({
23766
23770
  var DropdownItemWrapper = styled__default.li.withConfig({
23767
23771
  displayName: "Dropdown__DropdownItemWrapper",
23768
23772
  componentId: "sc-pn6m0h-2"
23769
- })(["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) {
23773
+ })(["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) {
23770
23774
  var selected = _ref4.selected,
23771
23775
  themeValues = _ref4.themeValues;
23772
23776
  return selected ? themeValues.selectedColor : WHITE;
@@ -23774,44 +23778,69 @@ var DropdownItemWrapper = styled__default.li.withConfig({
23774
23778
  var disabled = _ref5.disabled;
23775
23779
  return disabled ? "default" : "pointer";
23776
23780
  }, function (_ref6) {
23777
- var selected = _ref6.selected,
23778
- disabled = _ref6.disabled,
23781
+ var disabled = _ref6.disabled,
23782
+ selected = _ref6.selected,
23779
23783
  themeValues = _ref6.themeValues;
23780
- return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
23784
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23781
23785
  }, function (_ref7) {
23782
23786
  var selected = _ref7.selected,
23783
23787
  disabled = _ref7.disabled,
23784
23788
  themeValues = _ref7.themeValues;
23785
- return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
23789
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23790
+ }, function (_ref8) {
23791
+ var selected = _ref8.selected,
23792
+ disabled = _ref8.disabled,
23793
+ themeValues = _ref8.themeValues;
23794
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23795
+ }, function (_ref9) {
23796
+ var themeValues = _ref9.themeValues;
23797
+ return themeValues.selectedColor;
23798
+ }, function (_ref10) {
23799
+ var selected = _ref10.selected,
23800
+ disabled = _ref10.disabled,
23801
+ themeValues = _ref10.themeValues;
23802
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23803
+ });
23804
+ var DropdownItemBorder = styled__default.div.withConfig({
23805
+ displayName: "Dropdown__DropdownItemBorder",
23806
+ componentId: "sc-pn6m0h-3"
23807
+ })(["background:", ";border-color:", ";border-width:2px;border-style:solid;padding:12px;"], function (_ref11) {
23808
+ var selected = _ref11.selected,
23809
+ themeValues = _ref11.themeValues;
23810
+ return selected ? themeValues.selectedColor : WHITE;
23811
+ }, function (_ref12) {
23812
+ var selected = _ref12.selected,
23813
+ themeValues = _ref12.themeValues;
23814
+ return selected ? themeValues.selectedColor : WHITE;
23786
23815
  });
23787
23816
 
23788
- var Dropdown = function Dropdown(_ref8) {
23789
- var placeholder = _ref8.placeholder,
23790
- options = _ref8.options,
23791
- value = _ref8.value,
23792
- isOpen = _ref8.isOpen,
23793
- isError = _ref8.isError,
23794
- onSelect = _ref8.onSelect,
23795
- _ref8$disabledValues = _ref8.disabledValues,
23796
- disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
23797
- _ref8$onClick = _ref8.onClick,
23798
- _onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
23799
- themeValues = _ref8.themeValues,
23800
- maxHeight = _ref8.maxHeight,
23801
- _ref8$widthFitOptions = _ref8.widthFitOptions,
23802
- widthFitOptions = _ref8$widthFitOptions === void 0 ? false : _ref8$widthFitOptions,
23803
- disabled = _ref8.disabled,
23804
- _ref8$hasTitles = _ref8.hasTitles,
23805
- hasTitles = _ref8$hasTitles === void 0 ? false : _ref8$hasTitles,
23806
- _ref8$autoEraseTypeAh = _ref8.autoEraseTypeAhead,
23807
- autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
23808
- ariaLabelledby = _ref8.ariaLabelledby,
23809
- ariaDescribedby = _ref8.ariaDescribedby,
23810
- autocompleteValue = _ref8.autocompleteValue,
23811
- _ref8$smoothScroll = _ref8.smoothScroll,
23812
- smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll,
23813
- _ref8$ariaInvalid = _ref8.ariaInvalid,
23814
- ariaInvalid = _ref8$ariaInvalid === void 0 ? false : _ref8$ariaInvalid;
23817
+ var Dropdown = function Dropdown(_ref13) {
23818
+ var placeholder = _ref13.placeholder,
23819
+ options = _ref13.options,
23820
+ value = _ref13.value,
23821
+ isOpen = _ref13.isOpen,
23822
+ isError = _ref13.isError,
23823
+ onSelect = _ref13.onSelect,
23824
+ _ref13$disabledValues = _ref13.disabledValues,
23825
+ disabledValues = _ref13$disabledValues === void 0 ? [] : _ref13$disabledValues,
23826
+ _ref13$onClick = _ref13.onClick,
23827
+ _onClick = _ref13$onClick === void 0 ? noop : _ref13$onClick,
23828
+ themeValues = _ref13.themeValues,
23829
+ maxHeight = _ref13.maxHeight,
23830
+ _ref13$widthFitOption = _ref13.widthFitOptions,
23831
+ widthFitOptions = _ref13$widthFitOption === void 0 ? false : _ref13$widthFitOption,
23832
+ disabled = _ref13.disabled,
23833
+ _ref13$hasTitles = _ref13.hasTitles,
23834
+ hasTitles = _ref13$hasTitles === void 0 ? false : _ref13$hasTitles,
23835
+ _ref13$autoEraseTypeA = _ref13.autoEraseTypeAhead,
23836
+ autoEraseTypeAhead = _ref13$autoEraseTypeA === void 0 ? true : _ref13$autoEraseTypeA,
23837
+ ariaLabelledby = _ref13.ariaLabelledby,
23838
+ ariaDescribedby = _ref13.ariaDescribedby,
23839
+ autocompleteValue = _ref13.autocompleteValue,
23840
+ _ref13$smoothScroll = _ref13.smoothScroll,
23841
+ smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
23842
+ _ref13$ariaInvalid = _ref13.ariaInvalid,
23843
+ ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid;
23815
23844
 
23816
23845
  var _useState = React.useState(""),
23817
23846
  _useState2 = _slicedToArray(_useState, 2),
@@ -24133,11 +24162,15 @@ var Dropdown = function Dropdown(_ref8) {
24133
24162
  onFocus: function onFocus() {
24134
24163
  return setFocusedRef(optionRefs.current[i]);
24135
24164
  }
24165
+ }, /*#__PURE__*/React__default.createElement(DropdownItemBorder, {
24166
+ disabled: disabledValues.includes(choice.value),
24167
+ selected: choice.value === value,
24168
+ themeValues: themeValues
24136
24169
  }, /*#__PURE__*/React__default.createElement(Text$1, {
24137
24170
  variant: "p",
24138
24171
  color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
24139
- extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
24140
- }, choice.text));
24172
+ extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
24173
+ }, choice.text)));
24141
24174
  }))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
24142
24175
  };
24143
24176
 
@@ -26682,7 +26715,7 @@ var LineItem = function LineItem(_ref) {
26682
26715
  };
26683
26716
 
26684
26717
  var visibleCustomAttrs = customAttributes === null || customAttributes === void 0 ? void 0 : (_customAttributes$fil = customAttributes.filter(function (attr) {
26685
- return visibleFields.includes(attr.key) && attr.key !== "description";
26718
+ return (visibleFields === null || visibleFields === void 0 ? void 0 : visibleFields.includes(attr.key)) && attr.key !== "description";
26686
26719
  })) === null || _customAttributes$fil === void 0 ? void 0 : _customAttributes$fil.map(function (attr) {
26687
26720
  return /*#__PURE__*/React__default.createElement(Paragraph$1, {
26688
26721
  variant: "pS",