downshift 8.3.2-alpha.0 → 8.3.3
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/downshift.cjs.js +2 -1
- package/dist/downshift.esm.js +2 -1
- package/dist/downshift.native.cjs.js +2 -1
- package/dist/downshift.nativeweb.cjs.js +2 -1
- package/dist/downshift.umd.js +4 -3
- package/dist/downshift.umd.js.map +1 -1
- package/dist/downshift.umd.min.js +1 -1
- package/dist/downshift.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/preact/dist/downshift.cjs.js +2 -1
- package/preact/dist/downshift.esm.js +2 -1
- package/preact/dist/downshift.umd.js +4 -3
- package/preact/dist/downshift.umd.js.map +1 -1
- package/preact/dist/downshift.umd.min.js +1 -1
- package/preact/dist/downshift.umd.min.js.map +1 -1
package/dist/downshift.cjs.js
CHANGED
|
@@ -3769,7 +3769,8 @@ function useMultipleSelection(userProps) {
|
|
|
3769
3769
|
} else if (selectedItemRefs.current[activeIndex]) {
|
|
3770
3770
|
selectedItemRefs.current[activeIndex].focus();
|
|
3771
3771
|
}
|
|
3772
|
-
|
|
3772
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3773
|
+
}, [activeIndex]);
|
|
3773
3774
|
useControlPropsValidator({
|
|
3774
3775
|
props: props,
|
|
3775
3776
|
state: state
|
package/dist/downshift.esm.js
CHANGED
|
@@ -3756,7 +3756,8 @@ function useMultipleSelection(userProps) {
|
|
|
3756
3756
|
} else if (selectedItemRefs.current[activeIndex]) {
|
|
3757
3757
|
selectedItemRefs.current[activeIndex].focus();
|
|
3758
3758
|
}
|
|
3759
|
-
|
|
3759
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3760
|
+
}, [activeIndex]);
|
|
3760
3761
|
useControlPropsValidator({
|
|
3761
3762
|
props: props,
|
|
3762
3763
|
state: state
|
|
@@ -3612,7 +3612,8 @@ function useMultipleSelection(userProps) {
|
|
|
3612
3612
|
} else if (selectedItemRefs.current[activeIndex]) {
|
|
3613
3613
|
selectedItemRefs.current[activeIndex].focus();
|
|
3614
3614
|
}
|
|
3615
|
-
|
|
3615
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3616
|
+
}, [activeIndex]);
|
|
3616
3617
|
useControlPropsValidator({
|
|
3617
3618
|
props: props,
|
|
3618
3619
|
state: state
|
|
@@ -3752,7 +3752,8 @@ function useMultipleSelection(userProps) {
|
|
|
3752
3752
|
} else if (selectedItemRefs.current[activeIndex]) {
|
|
3753
3753
|
selectedItemRefs.current[activeIndex].focus();
|
|
3754
3754
|
}
|
|
3755
|
-
|
|
3755
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3756
|
+
}, [activeIndex]);
|
|
3756
3757
|
useControlPropsValidator({
|
|
3757
3758
|
props: props,
|
|
3758
3759
|
state: state
|
package/dist/downshift.umd.js
CHANGED
|
@@ -1379,7 +1379,7 @@
|
|
|
1379
1379
|
|
|
1380
1380
|
var reactIsExports = reactIs.exports;
|
|
1381
1381
|
|
|
1382
|
-
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,
|
|
1382
|
+
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};
|
|
1383
1383
|
|
|
1384
1384
|
var idCounter = 0;
|
|
1385
1385
|
|
|
@@ -1405,7 +1405,7 @@
|
|
|
1405
1405
|
if (!node) {
|
|
1406
1406
|
return;
|
|
1407
1407
|
}
|
|
1408
|
-
var actions =
|
|
1408
|
+
var actions = r(node, {
|
|
1409
1409
|
boundary: menuNode,
|
|
1410
1410
|
block: 'nearest',
|
|
1411
1411
|
scrollMode: 'if-needed'
|
|
@@ -5153,7 +5153,8 @@
|
|
|
5153
5153
|
} else if (selectedItemRefs.current[activeIndex]) {
|
|
5154
5154
|
selectedItemRefs.current[activeIndex].focus();
|
|
5155
5155
|
}
|
|
5156
|
-
|
|
5156
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5157
|
+
}, [activeIndex]);
|
|
5157
5158
|
useControlPropsValidator({
|
|
5158
5159
|
props: props,
|
|
5159
5160
|
state: state
|