@zag-js/popper 0.0.0-dev-20220616090725 → 0.0.0-dev-20220616093310
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.js +3 -4
- package/dist/index.mjs +3 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -312,17 +312,16 @@ function getPlacement(reference, floating, options = {}) {
|
|
|
312
312
|
middleware.push((0, import_dom2.size)({
|
|
313
313
|
padding: options.overflowPadding,
|
|
314
314
|
apply(data) {
|
|
315
|
-
const { reference: reference2, height, width } = data;
|
|
316
315
|
if (options.sameWidth) {
|
|
317
316
|
Object.assign(floating.style, {
|
|
318
|
-
width: `${
|
|
317
|
+
width: `${data.rects.reference.width}px`,
|
|
319
318
|
minWidth: "unset"
|
|
320
319
|
});
|
|
321
320
|
}
|
|
322
321
|
if (options.fitViewport) {
|
|
323
322
|
Object.assign(floating.style, {
|
|
324
|
-
maxWidth: `${
|
|
325
|
-
maxHeight: `${
|
|
323
|
+
maxWidth: `${data.availableWidth}px`,
|
|
324
|
+
maxHeight: `${data.availableHeight}px`
|
|
326
325
|
});
|
|
327
326
|
}
|
|
328
327
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -289,17 +289,16 @@ function getPlacement(reference, floating, options = {}) {
|
|
|
289
289
|
middleware.push(size({
|
|
290
290
|
padding: options.overflowPadding,
|
|
291
291
|
apply(data) {
|
|
292
|
-
const { reference: reference2, height, width } = data;
|
|
293
292
|
if (options.sameWidth) {
|
|
294
293
|
Object.assign(floating.style, {
|
|
295
|
-
width: `${
|
|
294
|
+
width: `${data.rects.reference.width}px`,
|
|
296
295
|
minWidth: "unset"
|
|
297
296
|
});
|
|
298
297
|
}
|
|
299
298
|
if (options.fitViewport) {
|
|
300
299
|
Object.assign(floating.style, {
|
|
301
|
-
maxWidth: `${
|
|
302
|
-
maxHeight: `${
|
|
300
|
+
maxWidth: `${data.availableWidth}px`,
|
|
301
|
+
maxHeight: `${data.availableHeight}px`
|
|
303
302
|
});
|
|
304
303
|
}
|
|
305
304
|
}
|
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-20220616093310",
|
|
4
4
|
"description": "Dynamic positioning logic for ui machines",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@floating-ui/dom": "^0.5.0",
|
|
29
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
29
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220616093310",
|
|
30
30
|
"@zag-js/utils": "0.1.2"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|