@thecb/components 6.0.0-beta.25 → 6.0.0-beta.28

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
@@ -6309,7 +6309,7 @@ var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxS
6309
6309
  completely off screen (only for users of screen readers)
6310
6310
  */
6311
6311
 
6312
- var Box = function Box(_ref) {
6312
+ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
6313
6313
  var _ref$padding = _ref.padding,
6314
6314
  padding = _ref$padding === void 0 ? "16px" : _ref$padding,
6315
6315
  _ref$borderSize = _ref.borderSize,
@@ -6379,9 +6379,10 @@ var Box = function Box(_ref) {
6379
6379
  onMouseLeave: onMouseLeave,
6380
6380
  onFocus: onFocus,
6381
6381
  onBlur: onBlur,
6382
- onTouchEnd: onTouchEnd
6382
+ onTouchEnd: onTouchEnd,
6383
+ ref: ref
6383
6384
  }, rest), children && safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
6384
- };
6385
+ });
6385
6386
 
6386
6387
  var CenterWrapper = styled__default.div.withConfig({
6387
6388
  displayName: "Centerstyled__CenterWrapper",
@@ -20751,8 +20752,6 @@ var Dropdown = function Dropdown(_ref8) {
20751
20752
  inputChangedByAutofill = _useState14[0],
20752
20753
  setInputChangedByAutofill = _useState14[1];
20753
20754
 
20754
- var inputBox = React.useRef(null);
20755
-
20756
20755
  if (optionsState !== options) {
20757
20756
  setOptionsState(options);
20758
20757
  setOptionsChanged(true);
@@ -20772,6 +20771,7 @@ var Dropdown = function Dropdown(_ref8) {
20772
20771
  return /*#__PURE__*/React.createRef();
20773
20772
  }));
20774
20773
  var dropdownRef = React.useRef(null);
20774
+ var inputRef = React.useRef(null);
20775
20775
 
20776
20776
  var getSelection = function getSelection() {
20777
20777
  var _options$find;
@@ -20883,11 +20883,11 @@ var Dropdown = function Dropdown(_ref8) {
20883
20883
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20884
20884
  // WAI-ARIA requires the selected option to receive focus
20885
20885
  selectedRef.current.focus();
20886
- inputBox.current.focus();
20886
+ console.log("input box ref", inputRef, inputRef.current);
20887
20887
  } else if (isOpen && optionRefs.current[0].current) {
20888
20888
  // If no selected option, first option receives focus
20889
20889
  optionRefs.current[0].current.focus();
20890
- inputBox.current.focus();
20890
+ console.log("input box ref", inputRef, inputRef.current);
20891
20891
  }
20892
20892
 
20893
20893
  clearTimeout(timer);
@@ -20974,7 +20974,7 @@ var Dropdown = function Dropdown(_ref8) {
20974
20974
  },
20975
20975
  padding: "12px",
20976
20976
  placeholder: getSelection(),
20977
- ref: inputBox,
20977
+ ref: inputRef,
20978
20978
  role: "combobox",
20979
20979
  themeValues: themeValues,
20980
20980
  title: hasTitles ? getSelection() : null,