@thecb/components 6.0.0-beta.5 → 6.0.0-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
@@ -19446,33 +19446,31 @@ var DropdownItemWrapper = styled__default.div.withConfig({
19446
19446
  var SearchInput = styled__default.input.withConfig({
19447
19447
  displayName: "Dropdown__SearchInput",
19448
19448
  componentId: "sc-pn6m0h-3"
19449
- })(["border:none;background-color:", ";font-size:16px;height:24px;min-width:75%;"], function (_ref8) {
19450
- var themeValues = _ref8.themeValues,
19451
- isOpen = _ref8.isOpen;
19452
- return isOpen ? themeValues.hoverColor && themeValues.hoverColor : "WHITE";
19453
- });
19454
-
19455
- var Dropdown = function Dropdown(_ref9) {
19456
- var placeholder = _ref9.placeholder,
19457
- options = _ref9.options,
19458
- value = _ref9.value,
19459
- isOpen = _ref9.isOpen,
19460
- isError = _ref9.isError,
19461
- onSelect = _ref9.onSelect,
19462
- _ref9$disabledValues = _ref9.disabledValues,
19463
- disabledValues = _ref9$disabledValues === void 0 ? [] : _ref9$disabledValues,
19464
- _ref9$onClick = _ref9.onClick,
19465
- onClick = _ref9$onClick === void 0 ? noop : _ref9$onClick,
19466
- themeValues = _ref9.themeValues,
19467
- maxHeight = _ref9.maxHeight,
19468
- _ref9$widthFitOptions = _ref9.widthFitOptions,
19469
- widthFitOptions = _ref9$widthFitOptions === void 0 ? false : _ref9$widthFitOptions,
19470
- disabled = _ref9.disabled,
19471
- _ref9$hasTitles = _ref9.hasTitles,
19472
- hasTitles = _ref9$hasTitles === void 0 ? false : _ref9$hasTitles,
19473
- _ref9$autoEraseTypeAh = _ref9.autoEraseTypeAhead,
19474
- autoEraseTypeAhead = _ref9$autoEraseTypeAh === void 0 ? true : _ref9$autoEraseTypeAh,
19475
- ariaLabelledby = _ref9.ariaLabelledby;
19449
+ })(["border:none;background-color:transparent;font-size:16px;height:24px;min-width:80%;"]);
19450
+
19451
+ var Dropdown = function Dropdown(_ref8) {
19452
+ var placeholder = _ref8.placeholder,
19453
+ options = _ref8.options,
19454
+ value = _ref8.value,
19455
+ isOpen = _ref8.isOpen,
19456
+ isError = _ref8.isError,
19457
+ onSelect = _ref8.onSelect,
19458
+ _ref8$disabledValues = _ref8.disabledValues,
19459
+ disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
19460
+ _ref8$onClick = _ref8.onClick,
19461
+ onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
19462
+ themeValues = _ref8.themeValues,
19463
+ maxHeight = _ref8.maxHeight,
19464
+ _ref8$widthFitOptions = _ref8.widthFitOptions,
19465
+ widthFitOptions = _ref8$widthFitOptions === void 0 ? false : _ref8$widthFitOptions,
19466
+ disabled = _ref8.disabled,
19467
+ _ref8$hasTitles = _ref8.hasTitles,
19468
+ hasTitles = _ref8$hasTitles === void 0 ? false : _ref8$hasTitles,
19469
+ _ref8$autoEraseTypeAh = _ref8.autoEraseTypeAhead,
19470
+ autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
19471
+ ariaLabelledby = _ref8.ariaLabelledby,
19472
+ _ref8$autocompleteVal = _ref8.autocompleteValue,
19473
+ autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal;
19476
19474
 
19477
19475
  var _useState = React.useState(""),
19478
19476
  _useState2 = _slicedToArray(_useState, 2),
@@ -19633,6 +19631,8 @@ var Dropdown = function Dropdown(_ref9) {
19633
19631
  }, [inputValue]);
19634
19632
  React.useEffect(function () {
19635
19633
  if (!isOpen && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
19634
+ console.log("filtered options are", filteredOptions);
19635
+ console.log("option refs are", optionRefs);
19636
19636
  onSelect(filteredOptions[0].value);
19637
19637
  }
19638
19638
 
@@ -19669,7 +19669,8 @@ var Dropdown = function Dropdown(_ref9) {
19669
19669
  extraStyles: "height: 48px;\n ".concat(disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;", "\n ")
19670
19670
  }, /*#__PURE__*/React__default.createElement(Stack, {
19671
19671
  direction: "row",
19672
- bottomItem: 2
19672
+ bottomItem: 2,
19673
+ extraStyles: "position: relative;"
19673
19674
  }, /*#__PURE__*/React__default.createElement(SearchInput, {
19674
19675
  "aria-label": getSelection(),
19675
19676
  placeholder: getSelection(),
@@ -19682,7 +19683,10 @@ var Dropdown = function Dropdown(_ref9) {
19682
19683
  "aria-autocomplete": "list",
19683
19684
  "aria-controls": "".concat(ariaLabelledby, "_listbox"),
19684
19685
  "aria-activedescendant": "selected_option",
19685
- isOpen: isOpen
19686
+ isOpen: isOpen,
19687
+ tabIndex: -1,
19688
+ name: autocompleteValue,
19689
+ autocomplete: autocompleteValue
19686
19690
  }), /*#__PURE__*/React__default.createElement(IconWrapper, {
19687
19691
  open: isOpen
19688
19692
  }, /*#__PURE__*/React__default.createElement(DropdownIcon, null)))), isOpen ? /*#__PURE__*/React__default.createElement(DropdownContentWrapper, {