@ibobbyts/svelte-ui-utils 0.3.6 → 0.3.7
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.
|
@@ -274,6 +274,11 @@
|
|
|
274
274
|
? rect.top - viewportMargin - menuGap
|
|
275
275
|
: window.innerHeight - rect.bottom - viewportMargin - menuGap;
|
|
276
276
|
viewportPanelMaxHeight = `${Math.max(0, Math.floor(available))}px`;
|
|
277
|
+
// Portal menus are moved under document.body, so the reactive style
|
|
278
|
+
// binding on the original root cannot reach them before this measurement.
|
|
279
|
+
// Apply the value directly first; otherwise the first upward open can
|
|
280
|
+
// measure the fallback 100vh height and place the menu above the viewport.
|
|
281
|
+
menuElement?.style.setProperty('--suu-dropdown-panel-max-height', viewportPanelMaxHeight);
|
|
277
282
|
updatePortalPosition(rect);
|
|
278
283
|
}
|
|
279
284
|
|
|
@@ -412,6 +417,7 @@
|
|
|
412
417
|
style:--suu-dropdown-menu-left={portalMenuLeft}
|
|
413
418
|
style:--suu-dropdown-menu-right={portalMenuRight}
|
|
414
419
|
style:--suu-dropdown-menu-width={portalMenuWidth}
|
|
420
|
+
style:--suu-dropdown-panel-max-height={viewportPanelMaxHeight}
|
|
415
421
|
>
|
|
416
422
|
<div
|
|
417
423
|
class="suu-dropdown__panel"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/dropdown/Dropdown.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAER,iBAAiB,EAGjB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,8BAA8B,EAC9B,iBAAiB,EACjB,2BAA2B,EAE5B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/dropdown/Dropdown.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAER,iBAAiB,EAGjB,cAAc,EACd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