@radix-ui/react-popper
Advanced tools
Comparing version 1.1.1 to 1.1.2-rc.1
@@ -132,3 +132,2 @@ var $50Iv9$babelruntimehelpersextends = require("@babel/runtime/helpers/extends"); | ||
middleware: [ | ||
$34310caa050a8d63$var$anchorCssProperties(), | ||
$50Iv9$floatinguireactdom.offset({ | ||
@@ -144,6 +143,2 @@ mainAxis: sideOffset + arrowHeight, | ||
}) : undefined, | ||
arrow ? $50Iv9$floatinguireactdom.arrow({ | ||
element: arrow, | ||
padding: arrowPadding | ||
}) : undefined, | ||
avoidCollisions ? $50Iv9$floatinguireactdom.flip({ | ||
@@ -154,7 +149,15 @@ ...detectOverflowOptions | ||
...detectOverflowOptions, | ||
apply: ({ elements: elements , availableWidth: width , availableHeight: height })=>{ | ||
elements.floating.style.setProperty('--radix-popper-available-width', `${width}px`); | ||
elements.floating.style.setProperty('--radix-popper-available-height', `${height}px`); | ||
apply: ({ elements: elements , rects: rects , availableWidth: availableWidth , availableHeight: availableHeight })=>{ | ||
const { width: anchorWidth , height: anchorHeight } = rects.reference; | ||
const contentStyle = elements.floating.style; | ||
contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`); | ||
contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`); | ||
contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`); | ||
contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`); | ||
} | ||
}), | ||
arrow ? $50Iv9$floatinguireactdom.arrow({ | ||
element: arrow, | ||
padding: arrowPadding | ||
}) : undefined, | ||
$34310caa050a8d63$var$transformOrigin({ | ||
@@ -321,13 +324,2 @@ arrowWidth: arrowWidth, | ||
} | ||
const $34310caa050a8d63$var$anchorCssProperties = ()=>({ | ||
name: 'anchorCssProperties', | ||
fn (data) { | ||
const { rects: rects , elements: elements } = data; | ||
const { width: width , height: height } = rects.reference; | ||
elements.floating.style.setProperty('--radix-popper-anchor-width', `${width}px`); | ||
elements.floating.style.setProperty('--radix-popper-anchor-height', `${height}px`); | ||
return {}; | ||
} | ||
}) | ||
; | ||
const $34310caa050a8d63$var$transformOrigin = (options)=>({ | ||
@@ -334,0 +326,0 @@ name: 'transformOrigin', |
import $kY93V$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends"; | ||
import {useState as $kY93V$useState, createElement as $kY93V$createElement, forwardRef as $kY93V$forwardRef, useRef as $kY93V$useRef, useEffect as $kY93V$useEffect, useLayoutEffect as $kY93V$useLayoutEffect} from "react"; | ||
import {useFloating as $kY93V$useFloating, autoUpdate as $kY93V$autoUpdate, offset as $kY93V$offset, shift as $kY93V$shift, limitShift as $kY93V$limitShift, arrow as $kY93V$arrow, flip as $kY93V$flip, size as $kY93V$size, hide as $kY93V$hide} from "@floating-ui/react-dom"; | ||
import {useFloating as $kY93V$useFloating, autoUpdate as $kY93V$autoUpdate, offset as $kY93V$offset, shift as $kY93V$shift, limitShift as $kY93V$limitShift, flip as $kY93V$flip, size as $kY93V$size, arrow as $kY93V$arrow, hide as $kY93V$hide} from "@floating-ui/react-dom"; | ||
import {Root as $kY93V$Root} from "@radix-ui/react-arrow"; | ||
@@ -114,3 +114,2 @@ import {useComposedRefs as $kY93V$useComposedRefs} from "@radix-ui/react-compose-refs"; | ||
middleware: [ | ||
$cf1ac5d9fe0e8206$var$anchorCssProperties(), | ||
$kY93V$offset({ | ||
@@ -126,6 +125,2 @@ mainAxis: sideOffset + arrowHeight, | ||
}) : undefined, | ||
arrow ? $kY93V$arrow({ | ||
element: arrow, | ||
padding: arrowPadding | ||
}) : undefined, | ||
avoidCollisions ? $kY93V$flip({ | ||
@@ -136,7 +131,15 @@ ...detectOverflowOptions | ||
...detectOverflowOptions, | ||
apply: ({ elements: elements , availableWidth: width , availableHeight: height })=>{ | ||
elements.floating.style.setProperty('--radix-popper-available-width', `${width}px`); | ||
elements.floating.style.setProperty('--radix-popper-available-height', `${height}px`); | ||
apply: ({ elements: elements , rects: rects , availableWidth: availableWidth , availableHeight: availableHeight })=>{ | ||
const { width: anchorWidth , height: anchorHeight } = rects.reference; | ||
const contentStyle = elements.floating.style; | ||
contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`); | ||
contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`); | ||
contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`); | ||
contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`); | ||
} | ||
}), | ||
arrow ? $kY93V$arrow({ | ||
element: arrow, | ||
padding: arrowPadding | ||
}) : undefined, | ||
$cf1ac5d9fe0e8206$var$transformOrigin({ | ||
@@ -303,13 +306,2 @@ arrowWidth: arrowWidth, | ||
} | ||
const $cf1ac5d9fe0e8206$var$anchorCssProperties = ()=>({ | ||
name: 'anchorCssProperties', | ||
fn (data) { | ||
const { rects: rects , elements: elements } = data; | ||
const { width: width , height: height } = rects.reference; | ||
elements.floating.style.setProperty('--radix-popper-anchor-width', `${width}px`); | ||
elements.floating.style.setProperty('--radix-popper-anchor-height', `${height}px`); | ||
return {}; | ||
} | ||
}) | ||
; | ||
const $cf1ac5d9fe0e8206$var$transformOrigin = (options)=>({ | ||
@@ -316,0 +308,0 @@ name: 'transformOrigin', |
{ | ||
"name": "@radix-ui/react-popper", | ||
"version": "1.1.1", | ||
"version": "1.1.2-rc.1", | ||
"license": "MIT", | ||
@@ -42,3 +42,4 @@ "source": "src/index.ts", | ||
"url": "https://github.com/radix-ui/primitives/issues" | ||
} | ||
}, | ||
"stableVersion": "1.1.1" | ||
} |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
111378
755
1