@chakra-ui/popper
Advanced tools
Comparing version 3.0.13 to 3.0.14
@@ -48,9 +48,9 @@ "use strict"; | ||
if (placement.includes("top")) | ||
return `1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("bottom")) | ||
return `-1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("right")) | ||
return `-1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("left")) | ||
return `1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
} | ||
@@ -144,3 +144,3 @@ var transforms = { | ||
const vars = { | ||
[cssVars.arrowSizeHalf.var]: `calc(${cssVars.arrowSize.varRef} / 2)`, | ||
[cssVars.arrowSizeHalf.var]: `calc(${cssVars.arrowSize.varRef} / 2 - 1px)`, | ||
[cssVars.arrowOffset.var]: `calc(${cssVars.arrowSizeHalf.varRef} * -1)` | ||
@@ -147,0 +147,0 @@ }; |
@@ -45,9 +45,9 @@ "use strict"; | ||
if (placement.includes("top")) | ||
return `1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("bottom")) | ||
return `-1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("right")) | ||
return `-1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("left")) | ||
return `1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
} | ||
@@ -122,3 +122,3 @@ var transforms = { | ||
const vars = { | ||
[cssVars.arrowSizeHalf.var]: `calc(${cssVars.arrowSize.varRef} / 2)`, | ||
[cssVars.arrowSizeHalf.var]: `calc(${cssVars.arrowSize.varRef} / 2 - 1px)`, | ||
[cssVars.arrowOffset.var]: `calc(${cssVars.arrowSizeHalf.varRef} * -1)` | ||
@@ -125,0 +125,0 @@ }; |
import { Placement } from '@popperjs/core'; | ||
export { Placement } from '@popperjs/core'; | ||
declare type Logical = "start-start" | "start-end" | "end-start" | "end-end" | "start" | "end"; | ||
declare type PlacementWithLogical = Placement | Logical; | ||
type Logical = "start-start" | "start-end" | "end-start" | "end-end" | "start" | "end"; | ||
type PlacementWithLogical = Placement | Logical; | ||
@@ -7,0 +7,0 @@ declare function getPopperPlacement(placement: PlacementWithLogical, dir?: "ltr" | "rtl"): Placement; |
@@ -1,2 +0,1 @@ | ||
import * as _chakra_ui_react_types from '@chakra-ui/react-types'; | ||
import { PropGetter } from '@chakra-ui/react-types'; | ||
@@ -86,3 +85,3 @@ import { Modifier, VirtualElement } from '@popperjs/core'; | ||
} | ||
declare type ArrowCSSVarProps = { | ||
type ArrowCSSVarProps = { | ||
/** | ||
@@ -110,9 +109,9 @@ * The size of the popover arrow. | ||
popperRef: <T_1 extends HTMLElement>(node: T_1 | null) => void; | ||
getPopperProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>; | ||
getArrowProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>; | ||
getArrowInnerProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>; | ||
getReferenceProps: PropGetter<Record<string, unknown>, _chakra_ui_react_types.DOMAttributes<_chakra_ui_react_types.DOMElement>>; | ||
getPopperProps: PropGetter; | ||
getArrowProps: PropGetter; | ||
getArrowInnerProps: PropGetter; | ||
getReferenceProps: PropGetter; | ||
}; | ||
declare type UsePopperReturn = ReturnType<typeof usePopper>; | ||
type UsePopperReturn = ReturnType<typeof usePopper>; | ||
export { ArrowCSSVarProps, UsePopperProps, UsePopperReturn, usePopper }; |
@@ -45,9 +45,9 @@ "use strict"; | ||
if (placement.includes("top")) | ||
return `1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("bottom")) | ||
return `-1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("right")) | ||
return `-1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("left")) | ||
return `1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
} | ||
@@ -141,3 +141,3 @@ var transforms = { | ||
const vars = { | ||
[cssVars.arrowSizeHalf.var]: `calc(${cssVars.arrowSize.varRef} / 2)`, | ||
[cssVars.arrowSizeHalf.var]: `calc(${cssVars.arrowSize.varRef} / 2 - 1px)`, | ||
[cssVars.arrowOffset.var]: `calc(${cssVars.arrowSizeHalf.varRef} * -1)` | ||
@@ -144,0 +144,0 @@ }; |
@@ -29,3 +29,3 @@ import { Placement } from '@popperjs/core'; | ||
}; | ||
declare function getBoxShadow(placement: Placement): "1px 1px 1px 0 var(--popper-arrow-shadow-color)" | "-1px -1px 1px 0 var(--popper-arrow-shadow-color)" | "-1px 1px 1px 0 var(--popper-arrow-shadow-color)" | "1px -1px 1px 0 var(--popper-arrow-shadow-color)" | undefined; | ||
declare function getBoxShadow(placement: Placement): "1px 1px 0px 0 var(--popper-arrow-shadow-color)" | "-1px -1px 0px 0 var(--popper-arrow-shadow-color)" | "-1px 1px 0px 0 var(--popper-arrow-shadow-color)" | "1px -1px 0px 0 var(--popper-arrow-shadow-color)" | undefined; | ||
declare const toTransformOrigin: (placement: Placement) => string; | ||
@@ -32,0 +32,0 @@ declare const defaultEventListeners: { |
@@ -43,9 +43,9 @@ "use strict"; | ||
if (placement.includes("top")) | ||
return `1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("bottom")) | ||
return `-1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("right")) | ||
return `-1px 1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `-1px 1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
if (placement.includes("left")) | ||
return `1px -1px 1px 0 var(--popper-arrow-shadow-color)`; | ||
return `1px -1px 0px 0 var(--popper-arrow-shadow-color)`; | ||
} | ||
@@ -52,0 +52,0 @@ var transforms = { |
{ | ||
"name": "@chakra-ui/popper", | ||
"version": "3.0.13", | ||
"version": "3.0.14", | ||
"description": "A React component and hooks wrapper for popper.js", | ||
@@ -44,4 +44,4 @@ "keywords": [ | ||
"react": "^18.0.0", | ||
"clean-package": "2.1.1", | ||
"@chakra-ui/hooks": "2.1.5" | ||
"clean-package": "2.2.0", | ||
"@chakra-ui/hooks": "2.2.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "peerDependencies": { |
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
56654
1747