@radix-ui/react-popper
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -1,2 +0,2 @@ | ||
var e=l({},require("@radix-ui/react-arrow")),r=require("@radix-ui/react-primitive").Primitive,t=require("@radix-ui/react-use-size").useSize,n=require("@radix-ui/react-use-rect").useRect,o=require("@radix-ui/react-context").createContext,i=require("@radix-ui/react-compose-refs").useComposedRefs,a=require("@radix-ui/popper").getPlacementData,c=l({},require("react"));function l(e,r){return Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})})),e}function u(){return(u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach((function(r){p(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function p(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function d(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function y(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(t.push(a.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return t}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return v(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var b=y(o("Popper"),2),w=b[0],O=b[1],m=c.forwardRef((function(e,o){var l=e.anchorRef,s=e.side,p=void 0===s?"bottom":s,v=e.sideOffset,b=e.align,O=void 0===b?"center":b,m=e.alignOffset,g=e.collisionTolerance,h=e.avoidCollisions,j=void 0===h||h,P=d(e,["anchorRef","side","sideOffset","align","alignOffset","collisionTolerance","avoidCollisions"]),S=y(c.useState(),2),x=S[0],E=S[1],R=n(l),A=c.useRef(null),q=t(A),C=c.useRef(null),z=t(C),D=i(o,A),T=function(){var e=y(c.useState(void 0),2),r=e[0],t=e[1];return c.useEffect((function(){var e;function r(){t({width:window.innerWidth,height:window.innerHeight})}function n(){window.clearTimeout(e),e=window.setTimeout(r,100)}return r(),window.addEventListener("resize",n),function(){return window.removeEventListener("resize",n)}}),[]),r}(),k=T?DOMRect.fromRect(f(f({},T),{},{x:0,y:0})):void 0,I=a({anchorRect:R,popperSize:q,arrowSize:z,arrowOffset:x,side:p,sideOffset:v,align:O,alignOffset:m,shouldAvoidCollisions:j,collisionBoundariesRect:k,collisionTolerance:g}),M=I.popperStyles,L=I.arrowStyles,N=I.placedSide,_=I.placedAlign,B=void 0!==N;return c.createElement("div",{style:M,"data-radix-popper-wrapper":""},c.createElement(w,{arrowRef:C,arrowStyles:L,onArrowOffsetChange:E},c.createElement(r,u({"data-side":N,"data-align":_},P,{style:f(f({},P.style),{},{animation:B?void 0:"none"}),ref:D}))))}));exports.Popper=m,m.displayName="Popper";var g=c.forwardRef((function(r,t){var n=r.offset,o=d(r,["offset"]),i=O("PopperArrow"),a=i.onArrowOffsetChange;return c.useEffect((function(){return a(n)}),[a,n]),c.createElement("span",{style:f(f({},i.arrowStyles),{},{pointerEvents:"none"})},c.createElement("span",{ref:i.arrowRef,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},c.createElement(e.Root,u({},o,{ref:t,style:f(f({},o.style),{},{display:"block"})}))))}));exports.PopperArrow=g,g.displayName="PopperArrow";var h=m;exports.Root=h;var j=g;exports.Arrow=j; | ||
function e(e,r,t){Object.defineProperty(e,r,{get:t,enumerable:!0})}var r=require("@radix-ui/react-arrow").Root,t=require("@radix-ui/react-primitive").Primitive,o=require("@radix-ui/react-use-size").useSize,i=require("@radix-ui/react-use-rect").useRect,n=require("@radix-ui/react-context").createContext,a=require("@radix-ui/react-compose-refs").useComposedRefs,s=require("@radix-ui/popper").getPlacementData,c=require("react"),l=c.forwardRef,p=c.useState,u=c.useRef,d=c.createElement,f=c.useEffect,w={};function y(){return(y=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}const[v,g]=n("Popper"),m=l(((e,r)=>{const{anchorRef:n,side:c="bottom",sideOffset:l,align:w="center",alignOffset:g,collisionTolerance:m,avoidCollisions:x=!0,...R}=e,[h,O]=p(),P=i(n),A=u(null),S=o(A),q=u(null),b=o(q),z=a(r,A),C=function(){const[e,r]=p(void 0);return f((()=>{let e;function t(){r({width:window.innerWidth,height:window.innerHeight})}function o(){window.clearTimeout(e),e=window.setTimeout(t,100)}return t(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)}),[]),e}(),E=C?DOMRect.fromRect({...C,x:0,y:0}):void 0,{popperStyles:T,arrowStyles:j,placedSide:k,placedAlign:D}=s({anchorRect:P,popperSize:S,arrowSize:b,arrowOffset:h,side:c,sideOffset:l,align:w,alignOffset:g,shouldAvoidCollisions:x,collisionBoundariesRect:E,collisionTolerance:m}),L=void 0!==k;return d("div",{style:T,"data-radix-popper-wrapper":""},d(v,{arrowRef:q,arrowStyles:j,onArrowOffsetChange:O},d(t,y({"data-side":k,"data-align":D},R,{style:{...R.style,animation:L?void 0:"none"},ref:z}))))}));exports.Popper=m,m.displayName="Popper";const x=l((function(e,t){const{offset:o,...i}=e,n=g("PopperArrow"),{onArrowOffsetChange:a}=n;return f((()=>a(o)),[a,o]),d("span",{style:{...n.arrowStyles,pointerEvents:"none"}},d("span",{ref:n.arrowRef,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},d(r,y({},i,{ref:t,style:{...i.style,display:"block"}}))))}));exports.PopperArrow=x,x.displayName="PopperArrow";const R=m;exports.Root=R;const h=x;exports.Arrow=h,e(w,"Arrow",(function(){return h})),e(w,"Root",(function(){return R})),e(w,"PopperArrow",(function(){return x})),e(w,"Popper",(function(){return m})); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import*as e from"@radix-ui/react-arrow";import{Primitive as r}from"@radix-ui/react-primitive";import{useSize as o}from"@radix-ui/react-use-size";import{useRect as t}from"@radix-ui/react-use-rect";import{createContext as i}from"@radix-ui/react-context";import{useComposedRefs as n}from"@radix-ui/react-compose-refs";import{getPlacementData as a}from"@radix-ui/popper";import*as s from"react";function p(){return(p=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e}).apply(this,arguments)}const[l,c]=i("Popper");export const Popper=s.forwardRef(((e,i)=>{const{anchorRef:c,side:f="bottom",sideOffset:d,align:u="center",alignOffset:w,collisionTolerance:m,avoidCollisions:y=!0,...v}=e,[x,g]=s.useState(),h=t(c),R=s.useRef(null),E=o(R),A=s.useRef(null),O=o(A),P=n(i,R),S=function(){const[e,r]=s.useState(void 0);return s.useEffect((()=>{let e;function o(){r({width:window.innerWidth,height:window.innerHeight})}function t(){window.clearTimeout(e),e=window.setTimeout(o,100)}return o(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]),e}(),b=S?DOMRect.fromRect({...S,x:0,y:0}):void 0,{popperStyles:z,arrowStyles:C,placedSide:T,placedAlign:j}=a({anchorRect:h,popperSize:E,arrowSize:O,arrowOffset:x,side:f,sideOffset:d,align:u,alignOffset:w,shouldAvoidCollisions:y,collisionBoundariesRect:b,collisionTolerance:m}),k=void 0!==T;return s.createElement("div",{style:z,"data-radix-popper-wrapper":""},s.createElement(l,{arrowRef:A,arrowStyles:C,onArrowOffsetChange:g},s.createElement(r,p({"data-side":T,"data-align":j},v,{style:{...v.style,animation:k?void 0:"none"},ref:P}))))}));Popper.displayName="Popper";export const PopperArrow=s.forwardRef((function(r,o){const{offset:t,...i}=r,n=c("PopperArrow"),{onArrowOffsetChange:a}=n;return s.useEffect((()=>a(t)),[a,t]),s.createElement("span",{style:{...n.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:n.arrowRef,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(e.Root,p({},i,{ref:o,style:{...i.style,display:"block"}}))))}));PopperArrow.displayName="PopperArrow";export const Root=Popper;export const Arrow=PopperArrow; | ||
function r(r,e,o){Object.defineProperty(r,e,{get:o,enumerable:!0})}import{Root as e}from"@radix-ui/react-arrow";import{Primitive as o}from"@radix-ui/react-primitive";import{useSize as t}from"@radix-ui/react-use-size";import{useRect as i}from"@radix-ui/react-use-rect";import{createContext as n}from"@radix-ui/react-context";import{useComposedRefs as p}from"@radix-ui/react-compose-refs";import{getPlacementData as a}from"@radix-ui/popper";import{forwardRef as s,useState as l,useRef as c,createElement as f,useEffect as d}from"react";var u={};function w(){return(w=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}const[m,y]=n("Popper");export const Popper=s(((r,e)=>{const{anchorRef:n,side:s="bottom",sideOffset:u,align:y="center",alignOffset:v,collisionTolerance:P,avoidCollisions:A=!0,...g}=r,[x,h]=l(),O=i(n),R=c(null),b=t(R),S=c(null),z=t(S),C=p(e,R),E=function(){const[r,e]=l(void 0);return d((()=>{let r;function o(){e({width:window.innerWidth,height:window.innerHeight})}function t(){window.clearTimeout(r),r=window.setTimeout(o,100)}return o(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]),r}(),T=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:j,arrowStyles:k,placedSide:L,placedAlign:N}=a({anchorRect:O,popperSize:b,arrowSize:z,arrowOffset:x,side:s,sideOffset:u,align:y,alignOffset:v,shouldAvoidCollisions:A,collisionBoundariesRect:T,collisionTolerance:P}),B=void 0!==L;return f("div",{style:j,"data-radix-popper-wrapper":""},f(m,{arrowRef:S,arrowStyles:k,onArrowOffsetChange:h},f(o,w({"data-side":L,"data-align":N},g,{style:{...g.style,animation:B?void 0:"none"},ref:C}))))}));Popper.displayName="Popper";export const PopperArrow=s((function(r,o){const{offset:t,...i}=r,n=y("PopperArrow"),{onArrowOffsetChange:p}=n;return d((()=>p(t)),[p,t]),f("span",{style:{...n.arrowStyles,pointerEvents:"none"}},f("span",{ref:n.arrowRef,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},f(e,w({},i,{ref:o,style:{...i.style,display:"block"}}))))}));PopperArrow.displayName="PopperArrow";export const Root=Popper;export const Arrow=PopperArrow;r(u,"Arrow",(function(){return Arrow})),r(u,"Root",(function(){return Root})),r(u,"PopperArrow",(function(){return PopperArrow})),r(u,"Popper",(function(){return Popper})); | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-popper", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"license": "MIT", | ||
@@ -19,3 +19,3 @@ "source": "src/index.ts", | ||
"dependencies": { | ||
"@radix-ui/popper": "0.0.5", | ||
"@radix-ui/popper": "0.0.6", | ||
"@radix-ui/react-arrow": "0.0.6", | ||
@@ -22,0 +22,0 @@ "@radix-ui/react-compose-refs": "0.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28426
47
+ Added@radix-ui/popper@0.0.6(transitive)
- Removed@radix-ui/popper@0.0.5(transitive)
Updated@radix-ui/popper@0.0.6