@radix-ui/react-popper
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -1,2 +0,2 @@ | ||
function e(e,r,t){Object.defineProperty(e,r,{get:t,enumerable:!0})}var r,t=require("@radix-ui/react-arrow").Root,o=require("@radix-ui/react-primitive").Primitive,i=require("@radix-ui/react-use-size").useSize,n=require("@radix-ui/react-use-rect").useRect,s=require("@radix-ui/react-context").createContext,a=require("@radix-ui/react-compose-refs").useComposedRefs,l=require("@radix-ui/popper").getPlacementData,u=require("react"),c=u.forwardRef,p=u.useState,d=u.useRef,f=u.createElement,w=u.useEffect,y=(r=require("@babel/runtime/helpers/extends"))&&r.__esModule?r.default:r,m={};const[v,x]=s("Popper"),R=c(((e,r)=>{const{anchorRef:t,side:s="bottom",sideOffset:u,align:c="center",alignOffset:m,collisionTolerance:x,avoidCollisions:R=!0,...g}=e,[h,A]=p(),P=n(t),q=d(null),O=i(q),S=d(null),b=i(S),z=a(r,q),C=function(){const[e,r]=p(void 0);return w((()=>{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:k,placedSide:D,placedAlign:L}=l({anchorRect:P,popperSize:O,arrowSize:b,arrowOffset:h,side:s,sideOffset:u,align:c,alignOffset:m,shouldAvoidCollisions:R,collisionBoundariesRect:E,collisionTolerance:x}),M=void 0!==D;return f("div",{style:T,"data-radix-popper-wrapper":""},f(v,{arrowRef:S,arrowStyles:k,onArrowOffsetChange:A},f(o,y({"data-side":D,"data-align":L},g,{style:{...g.style,animation:M?void 0:"none"},ref:z}))))}));exports.Popper=R,R.displayName="Popper";const g=c((function(e,r){const{offset:o,...i}=e,n=x("PopperArrow"),{onArrowOffsetChange:s}=n;return w((()=>s(o)),[s,o]),f("span",{style:{...n.arrowStyles,pointerEvents:"none"}},f("span",{ref:n.arrowRef,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},f(t,y({},i,{ref:r,style:{...i.style,display:"block"}}))))}));exports.PopperArrow=g,g.displayName="PopperArrow";const h=R;exports.Root=h;const A=g;exports.Arrow=A,e(m,"Arrow",(function(){return A})),e(m,"Root",(function(){return h})),e(m,"PopperArrow",(function(){return g})),e(m,"Popper",(function(){return R})); | ||
var e,r=u({},require("@radix-ui/react-arrow")),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,l=u({},require("react")),c=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function u(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}const[d,f]=n("Popper"),p=l.forwardRef(((e,r)=>{const{anchorRef:n,side:u="bottom",sideOffset:f,align:p="center",alignOffset:w,collisionTolerance:m,avoidCollisions:y=!0,...v}=e,[x,R]=l.useState(),g=i(n),E=l.useRef(null),h=o(E),O=l.useRef(null),S=o(O),q=a(r,E),A=function(){const[e,r]=l.useState(void 0);return l.useEffect((()=>{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}(),P=A?DOMRect.fromRect({...A,x:0,y:0}):void 0,{popperStyles:b,arrowStyles:z,placedSide:C,placedAlign:T}=s({anchorRect:g,popperSize:h,arrowSize:S,arrowOffset:x,side:u,sideOffset:f,align:p,alignOffset:w,shouldAvoidCollisions:y,collisionBoundariesRect:P,collisionTolerance:m}),_=void 0!==C;return l.createElement("div",{style:b,"data-radix-popper-wrapper":""},l.createElement(d,{arrowRef:O,arrowStyles:z,onArrowOffsetChange:R},l.createElement(t,c({"data-side":C,"data-align":T},v,{style:{...v.style,animation:_?void 0:"none"},ref:q}))))}));exports.Popper=p,p.displayName="Popper";const w=l.forwardRef((function(e,t){const{offset:o,...i}=e,n=f("PopperArrow"),{onArrowOffsetChange:a}=n;return l.useEffect((()=>a(o)),[a,o]),l.createElement("span",{style:{...n.arrowStyles,pointerEvents:"none"}},l.createElement("span",{ref:n.arrowRef,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},l.createElement(r.Root,c({},i,{ref:t,style:{...i.style,display:"block"}}))))}));exports.PopperArrow=w,w.displayName="PopperArrow";const m=p;exports.Root=m;const y=w;exports.Arrow=y; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
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 d,useEffect as f}from"react";import u from"@babel/runtime/helpers/esm/extends";var w={};const[m,y]=n("Popper");export const Popper=s(((r,e)=>{const{anchorRef:n,side:s="bottom",sideOffset:w,align:y="center",alignOffset:v,collisionTolerance:x,avoidCollisions:A=!0,...P}=r,[g,h]=l(),R=i(n),O=c(null),b=t(O),S=c(null),z=t(S),C=p(e,O),E=function(){const[r,e]=l(void 0);return f((()=>{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:k,arrowStyles:L,placedSide:N,placedAlign:j}=a({anchorRect:R,popperSize:b,arrowSize:z,arrowOffset:g,side:s,sideOffset:w,align:y,alignOffset:v,shouldAvoidCollisions:A,collisionBoundariesRect:T,collisionTolerance:x}),B=void 0!==N;return d("div",{style:k,"data-radix-popper-wrapper":""},d(m,{arrowRef:S,arrowStyles:L,onArrowOffsetChange:h},d(o,u({"data-side":N,"data-align":j},P,{style:{...P.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 f((()=>p(t)),[p,t]),d("span",{style:{...n.arrowStyles,pointerEvents:"none"}},d("span",{ref:n.arrowRef,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},d(e,u({},i,{ref:o,style:{...i.style,display:"block"}}))))}));PopperArrow.displayName="PopperArrow";export const Root=Popper;export const Arrow=PopperArrow;r(w,"Arrow",(function(){return Arrow})),r(w,"Root",(function(){return Root})),r(w,"PopperArrow",(function(){return PopperArrow})),r(w,"Popper",(function(){return Popper})); | ||
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";import p from"@babel/runtime/helpers/esm/extends";const[l,c]=i("Popper");export const Popper=s.forwardRef(((e,i)=>{const{anchorRef:c,side:f="bottom",sideOffset:d,align:m="center",alignOffset:w,collisionTolerance:u,avoidCollisions:y=!0,...x}=e,[v,R]=s.useState(),E=t(c),g=s.useRef(null),h=o(g),A=s.useRef(null),P=o(A),S=n(i,g),O=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=O?DOMRect.fromRect({...O,x:0,y:0}):void 0,{popperStyles:z,arrowStyles:C,placedSide:T,placedAlign:k}=a({anchorRect:E,popperSize:h,arrowSize:P,arrowOffset:v,side:f,sideOffset:d,align:m,alignOffset:w,shouldAvoidCollisions:y,collisionBoundariesRect:b,collisionTolerance:u}),L=void 0!==T;return s.createElement("div",{style:z,"data-radix-popper-wrapper":""},s.createElement(l,{arrowRef:A,arrowStyles:C,onArrowOffsetChange:R},s.createElement(r,p({"data-side":T,"data-align":k},x,{style:{...x.style,animation:L?void 0:"none"},ref:S}))))}));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; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-popper", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"license": "MIT", | ||
@@ -21,11 +21,11 @@ "source": "src/index.ts", | ||
"@babel/runtime": "^7.13.10", | ||
"@radix-ui/popper": "0.0.8", | ||
"@radix-ui/react-arrow": "0.0.9", | ||
"@radix-ui/react-compose-refs": "0.0.3", | ||
"@radix-ui/react-context": "0.0.3", | ||
"@radix-ui/react-polymorphic": "0.0.8", | ||
"@radix-ui/react-primitive": "0.0.9", | ||
"@radix-ui/react-use-rect": "0.0.4", | ||
"@radix-ui/react-use-size": "0.0.3", | ||
"@radix-ui/rect": "0.0.3" | ||
"@radix-ui/popper": "0.0.9", | ||
"@radix-ui/react-arrow": "0.0.10", | ||
"@radix-ui/react-compose-refs": "0.0.4", | ||
"@radix-ui/react-context": "0.0.4", | ||
"@radix-ui/react-polymorphic": "0.0.9", | ||
"@radix-ui/react-primitive": "0.0.10", | ||
"@radix-ui/react-use-rect": "0.0.5", | ||
"@radix-ui/react-use-size": "0.0.4", | ||
"@radix-ui/rect": "0.0.4" | ||
}, | ||
@@ -32,0 +32,0 @@ "peerDependencies": { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
27885
1
+ Added@radix-ui/popper@0.0.9(transitive)
+ Added@radix-ui/react-arrow@0.0.10(transitive)
+ Added@radix-ui/react-compose-refs@0.0.4(transitive)
+ Added@radix-ui/react-context@0.0.4(transitive)
+ Added@radix-ui/react-polymorphic@0.0.9(transitive)
+ Added@radix-ui/react-primitive@0.0.10(transitive)
+ Added@radix-ui/react-use-layout-effect@0.0.4(transitive)
+ Added@radix-ui/react-use-rect@0.0.5(transitive)
+ Added@radix-ui/react-use-size@0.0.4(transitive)
+ Added@radix-ui/rect@0.0.4(transitive)
- Removed@radix-ui/popper@0.0.8(transitive)
- Removed@radix-ui/react-arrow@0.0.9(transitive)
- Removed@radix-ui/react-compose-refs@0.0.3(transitive)
- Removed@radix-ui/react-context@0.0.3(transitive)
- Removed@radix-ui/react-polymorphic@0.0.8(transitive)
- Removed@radix-ui/react-primitive@0.0.9(transitive)
- Removed@radix-ui/react-use-layout-effect@0.0.3(transitive)
- Removed@radix-ui/react-use-rect@0.0.4(transitive)
- Removed@radix-ui/react-use-size@0.0.3(transitive)
- Removed@radix-ui/rect@0.0.3(transitive)
Updated@radix-ui/popper@0.0.9
Updated@radix-ui/react-arrow@0.0.10
Updated@radix-ui/rect@0.0.4