@thecb/components 6.0.0-beta.4 → 6.0.0-beta.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
@@ -19438,9 +19438,10 @@ var DropdownItemWrapper = styled.div.withConfig({
19438
19438
  var SearchInput = styled.input.withConfig({
19439
19439
  displayName: "Dropdown__SearchInput",
19440
19440
  componentId: "sc-pn6m0h-3"
19441
- })(["border:none;background-color:", ";font-size:16px;height:24px;"], function (_ref8) {
19442
- var themeValues = _ref8.themeValues;
19443
- return themeValues.hoverColor && themeValues.hoverColor;
19441
+ })(["border:none;background-color:", ";font-size:16px;height:24px;min-width:75%;"], function (_ref8) {
19442
+ var themeValues = _ref8.themeValues,
19443
+ isOpen = _ref8.isOpen;
19444
+ return isOpen ? themeValues.hoverColor && themeValues.hoverColor : "WHITE";
19444
19445
  });
19445
19446
 
19446
19447
  var Dropdown = function Dropdown(_ref9) {
@@ -19655,6 +19656,7 @@ var Dropdown = function Dropdown(_ref9) {
19655
19656
  borderSize: "1px",
19656
19657
  borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
19657
19658
  borderRadius: "2px",
19659
+ tabIndex: 0,
19658
19660
  dataQa: placeholder,
19659
19661
  extraStyles: "height: 48px;\n ".concat(disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;", "\n ")
19660
19662
  }, /*#__PURE__*/React.createElement(Stack, {
@@ -19672,7 +19674,7 @@ var Dropdown = function Dropdown(_ref9) {
19672
19674
  "aria-autocomplete": "list",
19673
19675
  "aria-controls": "".concat(ariaLabelledby, "_listbox"),
19674
19676
  "aria-activedescendant": "selected_option",
19675
- tabIndex: 0
19677
+ isOpen: isOpen
19676
19678
  }), /*#__PURE__*/React.createElement(IconWrapper, {
19677
19679
  open: isOpen
19678
19680
  }, /*#__PURE__*/React.createElement(DropdownIcon, null)))), isOpen ? /*#__PURE__*/React.createElement(DropdownContentWrapper, {
@@ -19686,7 +19688,7 @@ var Dropdown = function Dropdown(_ref9) {
19686
19688
  }, /*#__PURE__*/React.createElement(Stack, {
19687
19689
  childGap: "0"
19688
19690
  }, filteredOptions.map(function (choice, i) {
19689
- if (selectedRef === undefined && choice.value === value) {
19691
+ if (choice.value === value && selectedRef !== optionRefs.current[i]) {
19690
19692
  setSelectedRef(optionRefs.current[i]);
19691
19693
  }
19692
19694
 
@@ -19699,7 +19701,8 @@ var Dropdown = function Dropdown(_ref9) {
19699
19701
  onClick: disabledValues.includes(choice.value) ? function (evt) {
19700
19702
  return evt.preventDefault();
19701
19703
  } : function () {
19702
- return onSelect(choice.value);
19704
+ setSelectedRef(optionRefs.current[i]);
19705
+ onSelect(choice.value);
19703
19706
  },
19704
19707
  selected: choice.value === value,
19705
19708
  "aria-selected": choice.value === value,