@zag-js/popper
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -0,4 +1,6 @@ | ||
import { Placement } from "@floating-ui/dom"; | ||
declare type Options = { | ||
measured: boolean; | ||
strategy?: "absolute" | "fixed"; | ||
placement?: Placement; | ||
}; | ||
@@ -14,3 +16,3 @@ export declare function getPlacementStyles(options: Options): { | ||
innerArrow: { | ||
readonly transform: "rotate(45deg)"; | ||
readonly transform: any; | ||
readonly background: string; | ||
@@ -17,0 +19,0 @@ readonly top: "0"; |
@@ -412,4 +412,10 @@ var __defProp = Object.defineProperty; | ||
}; | ||
var ARROW_FLOATING_STYLE = { | ||
bottom: "rotate(45deg)", | ||
left: "rotate(135deg)", | ||
top: "rotate(225deg)", | ||
right: "rotate(315deg)" | ||
}; | ||
function getPlacementStyles(options) { | ||
const { measured, strategy = "absolute" } = options; | ||
const { measured, strategy = "absolute", placement = "bottom" } = options; | ||
return { | ||
@@ -425,3 +431,3 @@ arrow: { | ||
innerArrow: { | ||
transform: "rotate(45deg)", | ||
transform: ARROW_FLOATING_STYLE[placement.split("-")[0]], | ||
background: cssVars.arrowBg.reference, | ||
@@ -428,0 +434,0 @@ top: "0", |
{ | ||
"name": "@zag-js/popper", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Dynamic positioning logic for ui machines", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
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
188306
993