@softwareone/spi-sv5-library 1.11.9 → 1.11.10
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.
|
@@ -25,12 +25,14 @@
|
|
|
25
25
|
dividerIndex !== -1 && dividerIndex !== actions.length - 1 && dividerIndex === index;
|
|
26
26
|
|
|
27
27
|
const autoPosition: Attachment<HTMLElement> = (element: HTMLElement) => {
|
|
28
|
+
const MENU_GAP = 2;
|
|
29
|
+
|
|
28
30
|
const updatePosition = () => {
|
|
29
31
|
const rect = container.getBoundingClientRect();
|
|
30
32
|
const showAbove = rect.bottom + element.offsetHeight > window.innerHeight;
|
|
31
33
|
|
|
32
34
|
const left = rect.left + rect.width / 2 - element.offsetWidth / 2;
|
|
33
|
-
const top = showAbove ? rect.top - element.offsetHeight +
|
|
35
|
+
const top = showAbove ? rect.top - element.offsetHeight + MENU_GAP : rect.bottom + MENU_GAP;
|
|
34
36
|
|
|
35
37
|
element.style.setProperty('--menu-left', `${Math.max(0, left)}px`);
|
|
36
38
|
element.style.setProperty('--menu-top', `${top}px`);
|
|
@@ -69,7 +71,6 @@
|
|
|
69
71
|
<div
|
|
70
72
|
role="menu"
|
|
71
73
|
tabindex="-1"
|
|
72
|
-
class="actions-group"
|
|
73
74
|
bind:this={container}
|
|
74
75
|
onmouseenter={toggleActionsMenu}
|
|
75
76
|
onmouseleave={toggleActionsMenu}
|
|
@@ -126,15 +127,11 @@
|
|
|
126
127
|
justify-content: center;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
|
-
.actions-group {
|
|
130
|
-
position: relative;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
130
|
.actions-trigger {
|
|
134
131
|
display: inline-block;
|
|
135
|
-
margin-bottom: var(--spacing-sm);
|
|
136
132
|
font-size: var(--font-size-2xl);
|
|
137
133
|
font-weight: bold;
|
|
134
|
+
line-height: 0;
|
|
138
135
|
cursor: default;
|
|
139
136
|
}
|
|
140
137
|
|