downshift 9.0.7 → 9.0.9

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.
@@ -1290,7 +1290,7 @@ var Downshift = /*#__PURE__*/function () {
1290
1290
  _proto.componentDidMount = function componentDidMount() {
1291
1291
  var _this4 = this;
1292
1292
  /* istanbul ignore if (react-native) */
1293
- if (process.env.NODE_ENV !== 'production' && !false && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {
1293
+ if (process.env.NODE_ENV !== 'production' && true && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {
1294
1294
  validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);
1295
1295
  }
1296
1296
 
@@ -1524,7 +1524,6 @@ process.env.NODE_ENV !== "production" ? Downshift.propTypes = {
1524
1524
  getItemId: PropTypes.func
1525
1525
  /* eslint-enable react/no-unused-prop-types */
1526
1526
  } : void 0;
1527
- var Downshift$1 = Downshift;
1528
1527
  function validateGetMenuPropsCalledCorrectly(node, _ref12) {
1529
1528
  var refKey = _ref12.refKey;
1530
1529
  if (!node) {
@@ -1893,7 +1892,6 @@ var useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1893
1892
  /* istanbul ignore next */
1894
1893
  if (process.env.NODE_ENV !== 'production') {
1895
1894
  useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1896
- var isInitialMountRef = React.useRef(true);
1897
1895
  for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {
1898
1896
  propKeys[_key] = arguments[_key];
1899
1897
  }
@@ -1904,23 +1902,23 @@ if (process.env.NODE_ENV !== 'production') {
1904
1902
  React.useEffect(function () {
1905
1903
  Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {
1906
1904
  var propCallInfo = getterPropsCalledRef.current[propKey];
1907
- if (isInitialMountRef.current) {
1908
- if (!Object.keys(propCallInfo).length) {
1909
- // eslint-disable-next-line no-console
1910
- console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1911
- return;
1912
- }
1905
+ if (!Object.keys(propCallInfo).length) {
1906
+ // eslint-disable-next-line no-console
1907
+ console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1908
+ return;
1913
1909
  }
1914
1910
  var suppressRefError = propCallInfo.suppressRefError,
1915
1911
  refKey = propCallInfo.refKey,
1916
1912
  elementRef = propCallInfo.elementRef;
1917
- if ((!elementRef || !elementRef.current) && !suppressRefError) {
1913
+ if (suppressRefError) {
1914
+ return;
1915
+ }
1916
+ if (!(elementRef != null && elementRef.current)) {
1918
1917
  // eslint-disable-next-line no-console
1919
1918
  console.error("downshift: The ref prop \"" + refKey + "\" from " + propKey + " was not applied correctly on your element.");
1920
1919
  }
1921
1920
  });
1922
- isInitialMountRef.current = false;
1923
- });
1921
+ }, []);
1924
1922
  var setGetterPropCallInfo = React.useCallback(function (propKey, suppressRefError, refKey, elementRef) {
1925
1923
  getterPropsCalledRef.current[propKey] = {
1926
1924
  suppressRefError: suppressRefError,
@@ -3874,7 +3872,7 @@ function useMultipleSelection(userProps) {
3874
3872
  };
3875
3873
  }
3876
3874
 
3877
- exports.default = Downshift$1;
3875
+ exports.default = Downshift;
3878
3876
  exports.resetIdCounter = resetIdCounter;
3879
3877
  exports.useCombobox = useCombobox;
3880
3878
  exports.useMultipleSelection = useMultipleSelection;
@@ -1286,7 +1286,7 @@ var Downshift = /*#__PURE__*/function () {
1286
1286
  _proto.componentDidMount = function componentDidMount() {
1287
1287
  var _this4 = this;
1288
1288
  /* istanbul ignore if (react-native) */
1289
- if (process.env.NODE_ENV !== 'production' && !false && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {
1289
+ if (process.env.NODE_ENV !== 'production' && true && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {
1290
1290
  validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);
1291
1291
  }
1292
1292
 
@@ -1520,7 +1520,6 @@ process.env.NODE_ENV !== "production" ? Downshift.propTypes = {
1520
1520
  getItemId: PropTypes.func
1521
1521
  /* eslint-enable react/no-unused-prop-types */
1522
1522
  } : void 0;
1523
- var Downshift$1 = Downshift;
1524
1523
  function validateGetMenuPropsCalledCorrectly(node, _ref12) {
1525
1524
  var refKey = _ref12.refKey;
1526
1525
  if (!node) {
@@ -1889,7 +1888,6 @@ var useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1889
1888
  /* istanbul ignore next */
1890
1889
  if (process.env.NODE_ENV !== 'production') {
1891
1890
  useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1892
- var isInitialMountRef = useRef(true);
1893
1891
  for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {
1894
1892
  propKeys[_key] = arguments[_key];
1895
1893
  }
@@ -1900,23 +1898,23 @@ if (process.env.NODE_ENV !== 'production') {
1900
1898
  useEffect(function () {
1901
1899
  Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {
1902
1900
  var propCallInfo = getterPropsCalledRef.current[propKey];
1903
- if (isInitialMountRef.current) {
1904
- if (!Object.keys(propCallInfo).length) {
1905
- // eslint-disable-next-line no-console
1906
- console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1907
- return;
1908
- }
1901
+ if (!Object.keys(propCallInfo).length) {
1902
+ // eslint-disable-next-line no-console
1903
+ console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1904
+ return;
1909
1905
  }
1910
1906
  var suppressRefError = propCallInfo.suppressRefError,
1911
1907
  refKey = propCallInfo.refKey,
1912
1908
  elementRef = propCallInfo.elementRef;
1913
- if ((!elementRef || !elementRef.current) && !suppressRefError) {
1909
+ if (suppressRefError) {
1910
+ return;
1911
+ }
1912
+ if (!(elementRef != null && elementRef.current)) {
1914
1913
  // eslint-disable-next-line no-console
1915
1914
  console.error("downshift: The ref prop \"" + refKey + "\" from " + propKey + " was not applied correctly on your element.");
1916
1915
  }
1917
1916
  });
1918
- isInitialMountRef.current = false;
1919
- });
1917
+ }, []);
1920
1918
  var setGetterPropCallInfo = useCallback(function (propKey, suppressRefError, refKey, elementRef) {
1921
1919
  getterPropsCalledRef.current[propKey] = {
1922
1920
  suppressRefError: suppressRefError,
@@ -3870,4 +3868,4 @@ function useMultipleSelection(userProps) {
3870
3868
  };
3871
3869
  }
3872
3870
 
3873
- export { Downshift$1 as default, resetIdCounter, useCombobox, useMultipleSelection, useSelect };
3871
+ export { Downshift as default, resetIdCounter, useCombobox, useMultipleSelection, useSelect };
@@ -1257,9 +1257,7 @@ var Downshift = /*#__PURE__*/function () {
1257
1257
  _proto.componentDidMount = function componentDidMount() {
1258
1258
  var _this4 = this;
1259
1259
  /* istanbul ignore if (react-native) */
1260
- if (process.env.NODE_ENV !== 'production' && !true && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {
1261
- validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);
1262
- }
1260
+ if (process.env.NODE_ENV !== 'production' && false) ;
1263
1261
 
1264
1262
  /* istanbul ignore if (react-native or SSR) */
1265
1263
  {
@@ -1367,7 +1365,7 @@ var Downshift = /*#__PURE__*/function () {
1367
1365
  return prevItem !== item;
1368
1366
  },
1369
1367
  environment: /* istanbul ignore next (ssr) */
1370
- typeof window === 'undefined' || true ? undefined : window,
1368
+ undefined ,
1371
1369
  stateReducer: function stateReducer(state, stateToSet) {
1372
1370
  return stateToSet;
1373
1371
  },
@@ -1423,14 +1421,6 @@ process.env.NODE_ENV !== "production" ? Downshift.propTypes = {
1423
1421
  getItemId: PropTypes.func
1424
1422
  /* eslint-enable react/no-unused-prop-types */
1425
1423
  } : void 0;
1426
- var Downshift$1 = Downshift;
1427
- function validateGetMenuPropsCalledCorrectly(node, _ref12) {
1428
- var refKey = _ref12.refKey;
1429
- if (!node) {
1430
- // eslint-disable-next-line no-console
1431
- console.error("downshift: The ref prop \"" + refKey + "\" from getMenuProps was not applied correctly on your menu element.");
1432
- }
1433
- }
1434
1424
  function validateGetRootPropsCalledCorrectly(element, _ref13) {
1435
1425
  var refKey = _ref13.refKey;
1436
1426
  var refKeySpecified = refKey !== 'ref';
@@ -1643,7 +1633,7 @@ var defaultProps$3 = {
1643
1633
  stateReducer: stateReducer,
1644
1634
  scrollIntoView: scrollIntoView,
1645
1635
  environment: /* istanbul ignore next (ssr) */
1646
- typeof window === 'undefined' || true ? undefined : window
1636
+ undefined
1647
1637
  };
1648
1638
  function getDefaultValue$1(props, propKey, defaultStateValues) {
1649
1639
  if (defaultStateValues === void 0) {
@@ -1751,7 +1741,6 @@ var useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1751
1741
  /* istanbul ignore next */
1752
1742
  if (process.env.NODE_ENV !== 'production') {
1753
1743
  useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1754
- var isInitialMountRef = React.useRef(true);
1755
1744
  for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {
1756
1745
  propKeys[_key] = arguments[_key];
1757
1746
  }
@@ -1762,23 +1751,23 @@ if (process.env.NODE_ENV !== 'production') {
1762
1751
  React.useEffect(function () {
1763
1752
  Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {
1764
1753
  var propCallInfo = getterPropsCalledRef.current[propKey];
1765
- if (isInitialMountRef.current) {
1766
- if (!Object.keys(propCallInfo).length) {
1767
- // eslint-disable-next-line no-console
1768
- console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1769
- return;
1770
- }
1754
+ if (!Object.keys(propCallInfo).length) {
1755
+ // eslint-disable-next-line no-console
1756
+ console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1757
+ return;
1771
1758
  }
1772
1759
  var suppressRefError = propCallInfo.suppressRefError,
1773
1760
  refKey = propCallInfo.refKey,
1774
1761
  elementRef = propCallInfo.elementRef;
1775
- if ((!elementRef || !elementRef.current) && !suppressRefError) {
1762
+ if (suppressRefError) {
1763
+ return;
1764
+ }
1765
+ if (!(elementRef != null && elementRef.current)) {
1776
1766
  // eslint-disable-next-line no-console
1777
1767
  console.error("downshift: The ref prop \"" + refKey + "\" from " + propKey + " was not applied correctly on your element.");
1778
1768
  }
1779
1769
  });
1780
- isInitialMountRef.current = false;
1781
- });
1770
+ }, []);
1782
1771
  var setGetterPropCallInfo = React.useCallback(function (propKey, suppressRefError, refKey, elementRef) {
1783
1772
  getterPropsCalledRef.current[propKey] = {
1784
1773
  suppressRefError: suppressRefError,
@@ -1802,15 +1791,13 @@ function useA11yMessageStatus(getA11yStatusMessage, options, dependencyArray, en
1802
1791
  environment = {};
1803
1792
  }
1804
1793
  var document = environment.document;
1805
- var isInitialMount = useIsInitialMount();
1794
+ useIsInitialMount();
1806
1795
 
1807
1796
  // Adds an a11y aria live status message if getA11yStatusMessage is passed.
1808
1797
  React.useEffect(function () {
1809
- if (!getA11yStatusMessage || isInitialMount || true || !document) {
1798
+ {
1810
1799
  return;
1811
1800
  }
1812
- var status = getA11yStatusMessage(options);
1813
- updateA11yStatus(status, document);
1814
1801
 
1815
1802
  // eslint-disable-next-line react-hooks/exhaustive-deps
1816
1803
  }, dependencyArray);
@@ -3732,7 +3719,7 @@ function useMultipleSelection(userProps) {
3732
3719
  };
3733
3720
  }
3734
3721
 
3735
- exports.default = Downshift$1;
3722
+ exports.default = Downshift;
3736
3723
  exports.resetIdCounter = resetIdCounter;
3737
3724
  exports.useCombobox = useCombobox;
3738
3725
  exports.useMultipleSelection = useMultipleSelection;
@@ -1288,7 +1288,7 @@ var Downshift = /*#__PURE__*/function () {
1288
1288
  _proto.componentDidMount = function componentDidMount() {
1289
1289
  var _this4 = this;
1290
1290
  /* istanbul ignore if (react-native) */
1291
- if (process.env.NODE_ENV !== 'production' && !false && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {
1291
+ if (process.env.NODE_ENV !== 'production' && true && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {
1292
1292
  validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);
1293
1293
  }
1294
1294
 
@@ -1522,7 +1522,6 @@ process.env.NODE_ENV !== "production" ? Downshift.propTypes = {
1522
1522
  getItemId: PropTypes.func
1523
1523
  /* eslint-enable react/no-unused-prop-types */
1524
1524
  } : void 0;
1525
- var Downshift$1 = Downshift;
1526
1525
  function validateGetMenuPropsCalledCorrectly(node, _ref12) {
1527
1526
  var refKey = _ref12.refKey;
1528
1527
  if (!node) {
@@ -1888,7 +1887,6 @@ var useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1888
1887
  /* istanbul ignore next */
1889
1888
  if (process.env.NODE_ENV !== 'production') {
1890
1889
  useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
1891
- var isInitialMountRef = React.useRef(true);
1892
1890
  for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {
1893
1891
  propKeys[_key] = arguments[_key];
1894
1892
  }
@@ -1899,23 +1897,23 @@ if (process.env.NODE_ENV !== 'production') {
1899
1897
  React.useEffect(function () {
1900
1898
  Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {
1901
1899
  var propCallInfo = getterPropsCalledRef.current[propKey];
1902
- if (isInitialMountRef.current) {
1903
- if (!Object.keys(propCallInfo).length) {
1904
- // eslint-disable-next-line no-console
1905
- console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1906
- return;
1907
- }
1900
+ if (!Object.keys(propCallInfo).length) {
1901
+ // eslint-disable-next-line no-console
1902
+ console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
1903
+ return;
1908
1904
  }
1909
1905
  var suppressRefError = propCallInfo.suppressRefError,
1910
1906
  refKey = propCallInfo.refKey,
1911
1907
  elementRef = propCallInfo.elementRef;
1912
- if ((!elementRef || !elementRef.current) && !suppressRefError) {
1908
+ if (suppressRefError) {
1909
+ return;
1910
+ }
1911
+ if (!(elementRef != null && elementRef.current)) {
1913
1912
  // eslint-disable-next-line no-console
1914
1913
  console.error("downshift: The ref prop \"" + refKey + "\" from " + propKey + " was not applied correctly on your element.");
1915
1914
  }
1916
1915
  });
1917
- isInitialMountRef.current = false;
1918
- });
1916
+ }, []);
1919
1917
  var setGetterPropCallInfo = React.useCallback(function (propKey, suppressRefError, refKey, elementRef) {
1920
1918
  getterPropsCalledRef.current[propKey] = {
1921
1919
  suppressRefError: suppressRefError,
@@ -3857,7 +3855,7 @@ function useMultipleSelection(userProps) {
3857
3855
  };
3858
3856
  }
3859
3857
 
3860
- exports.default = Downshift$1;
3858
+ exports.default = Downshift;
3861
3859
  exports.resetIdCounter = resetIdCounter;
3862
3860
  exports.useCombobox = useCombobox;
3863
3861
  exports.useMultipleSelection = useMultipleSelection;
@@ -8,7 +8,7 @@
8
8
  if (null == r) return {};
9
9
  var t = {};
10
10
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
11
- if (e.includes(n)) continue;
11
+ if (-1 !== e.indexOf(n)) continue;
12
12
  t[n] = r[n];
13
13
  }
14
14
  return t;
@@ -1356,7 +1356,7 @@
1356
1356
 
1357
1357
  var reactIsExports = reactIs.exports;
1358
1358
 
1359
- const t=t=>"object"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||"hidden"!==t)&&("visible"!==t&&"clip"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return !!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return !1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},r=(e,r)=>{var i,s,d,h;if("undefined"==typeof document)return [];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p="function"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W);}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return {top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k="start"===f||"nearest"===f?x-T:"end"===f?I+F:x+v/2-T+F,D="center"===u?R+E/2-V+B:"end"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:n,width:l,top:r,right:i,bottom:s,left:d}=e.getBoundingClientRect();if("if-needed"===c&&x>=0&&R>=0&&I<=H&&C<=b&&x>=r&&I<=s&&R>=d&&C<=i)return L;const h=getComputedStyle(e),a=parseInt(h.borderLeftWidth,10),g=parseInt(h.borderTopWidth,10),p=parseInt(h.borderRightWidth,10),W=parseInt(h.borderBottomWidth,10);let T=0,B=0;const F="offsetWidth"in e?e.offsetWidth-e.clientWidth-a-p:0,V="offsetHeight"in e?e.offsetHeight-e.clientHeight-g-W:0,S="offsetWidth"in e?0===e.offsetWidth?0:l/e.offsetWidth:0,X="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(m===e)T="start"===f?k:"end"===f?k-H:"nearest"===f?o(M,M+H,H,g,W,M+k,M+k+v,v):k-H/2,B="start"===u?D:"center"===u?D-b/2:"end"===u?D-b:o(y,y+b,b,a,p,y+D,y+D+E,E),T=Math.max(0,T+M),B=Math.max(0,B+y);else {T="start"===f?k-r-g:"end"===f?k-s+W+V:"nearest"===f?o(r,s,n,g,W+V,k,k+v,v):k-(r+n/2)+V/2,B="start"===u?D-d-a:"center"===u?D-(d+l/2)+F/2:"end"===u?D-i+p+F:o(d,i,l,a,p+F,D,D+E,E);const{scrollLeft:t,scrollTop:h}=e;T=0===X?0:Math.max(0,Math.min(h+T/X,e.scrollHeight-n/X+V)),B=0===S?0:Math.max(0,Math.min(t+B/S,e.scrollWidth-l/S+F)),k+=h-T,D+=t-B;}L.push({el:e,top:T,left:B});}return L};
1359
+ const t=t=>"object"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||"hidden"!==t)&&("visible"!==t&&"clip"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return !!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return false},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},r=(e,r)=>{var i,s,d,h;if("undefined"==typeof document)return [];const{inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p="function"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W);}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,left:V}=(t=>{const e=window.getComputedStyle(t);return {top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k=x-T,D="center"===u?R+E/2-V+B:"end"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:l,width:r,top:i,right:s,bottom:d,left:h}=e.getBoundingClientRect();if(x>=0&&R>=0&&I<=H&&C<=b&&(e===m&&!n(e)||x>=i&&I<=d&&R>=h&&C<=s))return L;const a=getComputedStyle(e),g=parseInt(a.borderLeftWidth,10),p=parseInt(a.borderTopWidth,10),W=parseInt(a.borderRightWidth,10),T=parseInt(a.borderBottomWidth,10);let B=0,F=0;const V="offsetWidth"in e?e.offsetWidth-e.clientWidth-g-W:0,S="offsetHeight"in e?e.offsetHeight-e.clientHeight-p-T:0,X="offsetWidth"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,Y="offsetHeight"in e?0===e.offsetHeight?0:l/e.offsetHeight:0;if(m===e)B=o(M,M+H,H,p,T,M+k,M+k+v,v),F="start"===u?D:"center"===u?D-b/2:"end"===u?D-b:o(y,y+b,b,g,W,y+D,y+D+E,E),B=Math.max(0,B+M),F=Math.max(0,F+y);else {B=o(i,d,l,p,T+S,k,k+v,v),F="start"===u?D-h-g:"center"===u?D-(h+r/2)+V/2:"end"===u?D-s+W+V:o(h,s,r,g,W+V,D,D+E,E);const{scrollLeft:t,scrollTop:n}=e;B=0===Y?0:Math.max(0,Math.min(n+B/Y,e.scrollHeight-l/Y+S)),F=0===X?0:Math.max(0,Math.min(t+F/X,e.scrollWidth-r/X+V)),k+=n-B,D+=t-F;}L.push({el:e,top:B,left:F});}return L};
1360
1360
 
1361
1361
  var idCounter = 0;
1362
1362
 
@@ -1383,10 +1383,7 @@
1383
1383
  return;
1384
1384
  }
1385
1385
  var actions = r(node, {
1386
- boundary: menuNode,
1387
- block: 'nearest',
1388
- scrollMode: 'if-needed'
1389
- });
1386
+ boundary: menuNode});
1390
1387
  actions.forEach(function (_ref) {
1391
1388
  var el = _ref.el,
1392
1389
  top = _ref.top,
@@ -2864,7 +2861,6 @@
2864
2861
  getItemId: PropTypes.func
2865
2862
  /* eslint-enable react/no-unused-prop-types */
2866
2863
  } ;
2867
- var Downshift$1 = Downshift;
2868
2864
  function validateGetMenuPropsCalledCorrectly(node, _ref12) {
2869
2865
  var refKey = _ref12.refKey;
2870
2866
  if (!node) {
@@ -3233,7 +3229,6 @@
3233
3229
  /* istanbul ignore next */
3234
3230
  {
3235
3231
  useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {
3236
- var isInitialMountRef = React.useRef(true);
3237
3232
  for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {
3238
3233
  propKeys[_key] = arguments[_key];
3239
3234
  }
@@ -3244,23 +3239,23 @@
3244
3239
  React.useEffect(function () {
3245
3240
  Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {
3246
3241
  var propCallInfo = getterPropsCalledRef.current[propKey];
3247
- if (isInitialMountRef.current) {
3248
- if (!Object.keys(propCallInfo).length) {
3249
- // eslint-disable-next-line no-console
3250
- console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
3251
- return;
3252
- }
3242
+ if (!Object.keys(propCallInfo).length) {
3243
+ // eslint-disable-next-line no-console
3244
+ console.error("downshift: You forgot to call the " + propKey + " getter function on your component / element.");
3245
+ return;
3253
3246
  }
3254
3247
  var suppressRefError = propCallInfo.suppressRefError,
3255
3248
  refKey = propCallInfo.refKey,
3256
3249
  elementRef = propCallInfo.elementRef;
3257
- if ((!elementRef || !elementRef.current) && !suppressRefError) {
3250
+ if (suppressRefError) {
3251
+ return;
3252
+ }
3253
+ if (!(elementRef != null && elementRef.current)) {
3258
3254
  // eslint-disable-next-line no-console
3259
3255
  console.error("downshift: The ref prop \"" + refKey + "\" from " + propKey + " was not applied correctly on your element.");
3260
3256
  }
3261
3257
  });
3262
- isInitialMountRef.current = false;
3263
- });
3258
+ }, []);
3264
3259
  var setGetterPropCallInfo = React.useCallback(function (propKey, suppressRefError, refKey, elementRef) {
3265
3260
  getterPropsCalledRef.current[propKey] = {
3266
3261
  suppressRefError: suppressRefError,
@@ -3543,7 +3538,7 @@
3543
3538
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3544
3539
  PERFORMANCE OF THIS SOFTWARE.
3545
3540
  ***************************************************************************** */
3546
- /* global Reflect, Promise, SuppressedError, Symbol */
3541
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
3547
3542
 
3548
3543
 
3549
3544
  var __assign = function() {
@@ -5247,7 +5242,7 @@
5247
5242
  };
5248
5243
  }
5249
5244
 
5250
- exports.default = Downshift$1;
5245
+ exports.default = Downshift;
5251
5246
  exports.resetIdCounter = resetIdCounter;
5252
5247
  exports.useCombobox = useCombobox;
5253
5248
  exports.useMultipleSelection = useMultipleSelection;