@thecb/components 6.0.0-beta.24 → 6.0.0-beta.27

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
@@ -6197,7 +6197,7 @@ var Text = function Text(_ref) {
6197
6197
 
6198
6198
  var Text$1 = themeComponent(Text, "Text", fallbackValues, "p");
6199
6199
 
6200
- var _excluded$2 = ["activeStyles", "hoverStyles", "disabledStyles", "extraStyles", "borderSize", "borderColor", "borderWidthOverride", "borderRadius", "textAlign", "boxShadow", "minHeight", "minWidth", "maxWidth", "padding", "hiddenStyles", "ariaControls", "ariaLabel"];
6200
+ var _excluded$2 = ["activeStyles", "hoverStyles", "disabledStyles", "extraStyles", "borderSize", "borderColor", "borderWidthOverride", "borderRadius", "textAlign", "boxShadow", "minHeight", "minWidth", "maxWidth", "padding", "hiddenStyles", "ariaControls", "ariaLabel", "ref"];
6201
6201
  /*
6202
6202
  The child span selector on hover styles targets the text inside of buttons when a button is hovered,
6203
6203
  as long as the box wrapper has an "as" prop equal to "button"
@@ -6226,11 +6226,13 @@ var BoxWrapper = styled__default(function (_ref) {
6226
6226
  hiddenStyles = _ref.hiddenStyles,
6227
6227
  ariaControls = _ref.ariaControls,
6228
6228
  ariaLabel = _ref.ariaLabel,
6229
+ ref = _ref.ref,
6229
6230
  props = _objectWithoutProperties(_ref, _excluded$2);
6230
6231
 
6231
6232
  return /*#__PURE__*/React__default.createElement("div", _extends({
6232
6233
  "aria-controls": ariaControls,
6233
- "aria-label": ariaLabel
6234
+ "aria-label": ariaLabel,
6235
+ ref: ref
6234
6236
  }, props));
6235
6237
  }).withConfig({
6236
6238
  displayName: "Boxstyled__BoxWrapper",
@@ -6300,7 +6302,7 @@ var BoxWrapper = styled__default(function (_ref) {
6300
6302
  });
6301
6303
  /* eslint-enable no-unused-vars */
6302
6304
 
6303
- var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
6305
+ var _excluded$3 = ["padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "ref", "dataQa", "children"];
6304
6306
  /*
6305
6307
  Box component to create generic boxes
6306
6308
  Supply padding, border, background, and color values
@@ -6345,6 +6347,7 @@ var Box = function Box(_ref) {
6345
6347
  extraStyles = _ref.extraStyles,
6346
6348
  _ref$srOnly = _ref.srOnly,
6347
6349
  srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
6350
+ ref = _ref.ref,
6348
6351
  dataQa = _ref.dataQa,
6349
6352
  children = _ref.children,
6350
6353
  rest = _objectWithoutProperties(_ref, _excluded$3);
@@ -6379,7 +6382,8 @@ var Box = function Box(_ref) {
6379
6382
  onMouseLeave: onMouseLeave,
6380
6383
  onFocus: onFocus,
6381
6384
  onBlur: onBlur,
6382
- onTouchEnd: onTouchEnd
6385
+ onTouchEnd: onTouchEnd,
6386
+ ref: ref
6383
6387
  }, rest), children && safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
6384
6388
  };
6385
6389
 
@@ -20770,6 +20774,7 @@ var Dropdown = function Dropdown(_ref8) {
20770
20774
  return /*#__PURE__*/React.createRef();
20771
20775
  }));
20772
20776
  var dropdownRef = React.useRef(null);
20777
+ var inputRef = React.useRef(null);
20773
20778
 
20774
20779
  var getSelection = function getSelection() {
20775
20780
  var _options$find;
@@ -20881,9 +20886,11 @@ var Dropdown = function Dropdown(_ref8) {
20881
20886
  if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
20882
20887
  // WAI-ARIA requires the selected option to receive focus
20883
20888
  selectedRef.current.focus();
20889
+ console.log("input box ref", inputRef, inputRef.current);
20884
20890
  } else if (isOpen && optionRefs.current[0].current) {
20885
20891
  // If no selected option, first option receives focus
20886
20892
  optionRefs.current[0].current.focus();
20893
+ console.log("input box ref", inputRef, inputRef.current);
20887
20894
  }
20888
20895
 
20889
20896
  clearTimeout(timer);
@@ -20970,6 +20977,7 @@ var Dropdown = function Dropdown(_ref8) {
20970
20977
  },
20971
20978
  padding: "12px",
20972
20979
  placeholder: getSelection(),
20980
+ ref: inputRef,
20973
20981
  role: "combobox",
20974
20982
  themeValues: themeValues,
20975
20983
  title: hasTitles ? getSelection() : null,