Merge aura branch, adds new theme and minor showcase cosmetics

This commit is contained in:
Cagatay Civici 2024-01-17 22:56:22 +03:00
parent 5387c214eb
commit 60193987ef
68 changed files with 139835 additions and 34 deletions

View file

@ -310,6 +310,7 @@ export default {
if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {
top = targetOffset.top + windowScrollTop - elementOuterHeight;
element.style.transformOrigin = 'bottom';
element.style.marginTop = 'calc(var(--p-anchor-gutter) * -1)';
if (top < 0) {
top = windowScrollTop;
@ -317,6 +318,7 @@ export default {
} else {
top = targetOuterHeight + targetOffset.top + windowScrollTop;
element.style.transformOrigin = 'top';
element.style.marginTop = 'calc(var(--p-anchor-gutter))';
}
if (targetOffset.left + elementOuterWidth > viewport.width) left = Math.max(0, targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth);
@ -395,7 +397,7 @@ export default {
getParentNode(element) {
let parent = element?.parentNode;
if (parent && parent instanceof ShadowRoot && parent.host) {
if (parent && parent.host) {
parent = parent.host;
}