@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.esm.js CHANGED
@@ -6301,7 +6301,7 @@ var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxS
6301
6301
  completely off screen (only for users of screen readers)
6302
6302
  */
6303
6303
 
6304
- var Box = function Box(_ref) {
6304
+ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
6305
6305
  var _ref$padding = _ref.padding,
6306
6306
  padding = _ref$padding === void 0 ? "16px" : _ref$padding,
6307
6307
  _ref$borderSize = _ref.borderSize,
@@ -6371,9 +6371,10 @@ var Box = function Box(_ref) {
6371
6371
  onMouseLeave: onMouseLeave,
6372
6372
  onFocus: onFocus,
6373
6373
  onBlur: onBlur,
6374
- onTouchEnd: onTouchEnd
6374
+ onTouchEnd: onTouchEnd,
6375
+ ref: ref
6375
6376
  }, rest), children && safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
6376
- };
6377
+ });
6377
6378
 
6378
6379
  var CenterWrapper = styled.div.withConfig({
6379
6380
  displayName: "Centerstyled__CenterWrapper",
@@ -20743,8 +20744,6 @@ var Dropdown = function Dropdown(_ref8) {
20743
20744
  inputChangedByAutofill = _useState14[0],
20744
20745
  setInputChangedByAutofill = _useState14[1];
20745
20746
 
20746
- var inputBox = useRef(null);
20747
-
20748
20747
  if (optionsState !== options) {
20749
20748
  setOptionsState(options);
20750
20749
  setOptionsChanged(true);
@@ -20764,6 +20763,7 @@ var Dropdown = function Dropdown(_ref8) {
20764
20763
  return /*#__PURE__*/createRef();
20765
20764
  }));
20766
20765
  var dropdownRef = useRef(null);
20766
+ var inputRef = useRef(null);
20767
20767
 
20768
20768
  var getSelection = function getSelection() {
20769
20769
  var _options$find;
@@ -20875,11 +20875,11 @@ var Dropdown = function Dropdown(_ref8) {
20875
20875
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20876
20876
  // WAI-ARIA requires the selected option to receive focus
20877
20877
  selectedRef.current.focus();
20878
- inputBox.current.focus();
20878
+ console.log("input box ref", inputRef, inputRef.current);
20879
20879
  } else if (isOpen && optionRefs.current[0].current) {
20880
20880
  // If no selected option, first option receives focus
20881
20881
  optionRefs.current[0].current.focus();
20882
- inputBox.current.focus();
20882
+ console.log("input box ref", inputRef, inputRef.current);
20883
20883
  }
20884
20884
 
20885
20885
  clearTimeout(timer);
@@ -20966,7 +20966,7 @@ var Dropdown = function Dropdown(_ref8) {
20966
20966
  },
20967
20967
  padding: "12px",
20968
20968
  placeholder: getSelection(),
20969
- ref: inputBox,
20969
+ ref: inputRef,
20970
20970
  role: "combobox",
20971
20971
  themeValues: themeValues,
20972
20972
  title: hasTitles ? getSelection() : null,