@zag-js/popper 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Placement, Boundary, ComputePositionReturn, ComputePositionConfig, VirtualElement } from '@floating-ui/dom';
|
|
2
2
|
export { Placement } from '@floating-ui/dom';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type AutoUpdateOptions = {
|
|
5
5
|
ancestorScroll?: boolean;
|
|
6
6
|
ancestorResize?: boolean;
|
|
7
7
|
referenceResize?: boolean;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
type PositioningOptions = {
|
|
11
11
|
/**
|
|
12
12
|
* The strategy to use for positioning
|
|
13
13
|
*/
|
|
@@ -67,12 +67,12 @@ declare type PositioningOptions = {
|
|
|
67
67
|
*/
|
|
68
68
|
onCleanup?: VoidFunction;
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
type BasePlacement = "top" | "right" | "bottom" | "left";
|
|
71
71
|
|
|
72
72
|
declare function getPlacement(reference: HTMLElement | VirtualElement | null, floating: HTMLElement | null, opts?: PositioningOptions): (() => void) | undefined;
|
|
73
73
|
declare function getBasePlacement(placement: Placement): BasePlacement;
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
type Options = {
|
|
76
76
|
measured: boolean;
|
|
77
77
|
strategy?: "absolute" | "fixed";
|
|
78
78
|
placement?: Placement;
|
|
@@ -85,7 +85,7 @@ declare function getPlacementStyles(options: Options): {
|
|
|
85
85
|
readonly height: string;
|
|
86
86
|
readonly opacity: 0 | undefined;
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
arrowTip: {
|
|
89
89
|
readonly transform: any;
|
|
90
90
|
readonly background: string;
|
|
91
91
|
readonly top: "0";
|
package/dist/index.js
CHANGED
|
@@ -320,7 +320,7 @@ function getPlacementStyles(options) {
|
|
|
320
320
|
[cssVars.arrowOffset.variable]: `calc(${cssVars.arrowSizeHalf.reference} * -1)`,
|
|
321
321
|
opacity: !measured ? 0 : void 0
|
|
322
322
|
},
|
|
323
|
-
|
|
323
|
+
arrowTip: {
|
|
324
324
|
transform: ARROW_FLOATING_STYLE[placement.split("-")[0]],
|
|
325
325
|
background: cssVars.arrowBg.reference,
|
|
326
326
|
top: "0",
|
package/dist/index.mjs
CHANGED
|
@@ -292,7 +292,7 @@ function getPlacementStyles(options) {
|
|
|
292
292
|
[cssVars.arrowOffset.variable]: `calc(${cssVars.arrowSizeHalf.reference} * -1)`,
|
|
293
293
|
opacity: !measured ? 0 : void 0
|
|
294
294
|
},
|
|
295
|
-
|
|
295
|
+
arrowTip: {
|
|
296
296
|
transform: ARROW_FLOATING_STYLE[placement.split("-")[0]],
|
|
297
297
|
background: cssVars.arrowBg.reference,
|
|
298
298
|
top: "0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popper",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Dynamic positioning logic for ui machines",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@floating-ui/dom": "1.0.
|
|
28
|
+
"@floating-ui/dom": "1.0.10"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@zag-js/dom-utils": "0.2.
|
|
32
|
-
"@zag-js/utils": "0.
|
|
31
|
+
"@zag-js/dom-utils": "0.2.1",
|
|
32
|
+
"@zag-js/utils": "0.3.1"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build-fast": "tsup src/index.ts --format=esm,cjs",
|