@zag-js/popper 0.0.0-dev-20221005155029 → 0.0.0-dev-20221018132023
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 +1 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -208,10 +208,11 @@ function getPlacement(reference, floating, opts = {}) {
|
|
|
208
208
|
const options = Object.assign({}, defaultOptions, opts);
|
|
209
209
|
const arrowEl = floating.querySelector("[data-part=arrow]");
|
|
210
210
|
const middleware = [];
|
|
211
|
+
const boundary = typeof options.boundary === "function" ? options.boundary() : options.boundary;
|
|
211
212
|
if (options.flip) {
|
|
212
213
|
middleware.push(
|
|
213
214
|
(0, import_dom2.flip)({
|
|
214
|
-
boundary
|
|
215
|
+
boundary,
|
|
215
216
|
padding: options.overflowPadding
|
|
216
217
|
})
|
|
217
218
|
);
|
|
@@ -225,7 +226,7 @@ function getPlacement(reference, floating, opts = {}) {
|
|
|
225
226
|
}
|
|
226
227
|
middleware.push(
|
|
227
228
|
(0, import_dom2.shift)({
|
|
228
|
-
boundary
|
|
229
|
+
boundary,
|
|
229
230
|
crossAxis: options.overlap,
|
|
230
231
|
padding: options.overflowPadding
|
|
231
232
|
})
|
package/dist/index.mjs
CHANGED
|
@@ -180,10 +180,11 @@ function getPlacement(reference, floating, opts = {}) {
|
|
|
180
180
|
const options = Object.assign({}, defaultOptions, opts);
|
|
181
181
|
const arrowEl = floating.querySelector("[data-part=arrow]");
|
|
182
182
|
const middleware = [];
|
|
183
|
+
const boundary = typeof options.boundary === "function" ? options.boundary() : options.boundary;
|
|
183
184
|
if (options.flip) {
|
|
184
185
|
middleware.push(
|
|
185
186
|
flip({
|
|
186
|
-
boundary
|
|
187
|
+
boundary,
|
|
187
188
|
padding: options.overflowPadding
|
|
188
189
|
})
|
|
189
190
|
);
|
|
@@ -197,7 +198,7 @@ function getPlacement(reference, floating, opts = {}) {
|
|
|
197
198
|
}
|
|
198
199
|
middleware.push(
|
|
199
200
|
shift({
|
|
200
|
-
boundary
|
|
201
|
+
boundary,
|
|
201
202
|
crossAxis: options.overlap,
|
|
202
203
|
padding: options.overflowPadding
|
|
203
204
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popper",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20221018132023",
|
|
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.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
32
|
-
"@zag-js/utils": "0.
|
|
31
|
+
"@zag-js/dom-utils": "0.0.0-dev-20221018132023",
|
|
32
|
+
"@zag-js/utils": "0.1.6"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build-fast": "tsup src/index.ts --format=esm,cjs",
|