@madj2k/fe-frontend-kit 2.0.9 → 2.0.11
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.
|
@@ -334,12 +334,15 @@ class Madj2kFlyoutMenu {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
let height = this.settings.$menuInner.offsetHeight || this.settings.$menu.offsetHeight;
|
|
337
|
+
const refObj = this.settings.$positionReference || this.$element;
|
|
338
|
+
const refPos = refObj.getBoundingClientRect();
|
|
339
|
+
const flyoutTop = refPos.top + refObj.offsetHeight;
|
|
337
340
|
|
|
338
341
|
// heightMode "full" with deprecated fullHeight-setting as fallback
|
|
339
342
|
if (this.settings.heightMode === 'full' || this.settings.fullHeight === true) {
|
|
340
343
|
const viewPortHeight = window.innerHeight;
|
|
341
344
|
if (height < viewPortHeight) {
|
|
342
|
-
this.settings.$menu.style.height = `100vh`;
|
|
345
|
+
this.settings.$menu.style.height = `calc(100vh + ${flyoutTop}px)`;
|
|
343
346
|
} else {
|
|
344
347
|
this.settings.$menu.style.height = `${height}px`;
|
|
345
348
|
}
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
///
|
|
13
13
|
/// @param {Color} $color - Outline color for focused state. Defaults to `$color-outline`.
|
|
14
14
|
/// @param {Length} $width - Outline width. Defaults to `3px`.
|
|
15
|
+
/// @param {Selector} $selector - Optional sub-selector to apply the outline to. Defaults to `null`
|
|
15
16
|
///
|
|
16
17
|
/// @example scss
|
|
17
18
|
/// button,
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
/// @author Steffen Kroggel <developer@steffenkroggel>
|
|
28
29
|
/// @license GNU General Public License v3.0 https://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
30
|
///
|
|
30
|
-
@mixin accessibility-outline
|
|
31
|
+
@mixin accessibility-outline($color: var(--bs-primary), $width: 3px, $selector: null) {
|
|
31
32
|
|
|
32
33
|
&:focus,
|
|
33
34
|
&:focus-within {
|
|
@@ -36,7 +37,13 @@
|
|
|
36
37
|
|
|
37
38
|
&:has(input:focus-visible),
|
|
38
39
|
&:focus-visible {
|
|
39
|
-
|
|
40
|
+
@if $selector == null {
|
|
41
|
+
outline: rem-calc($width) solid $color;
|
|
42
|
+
} @else {
|
|
43
|
+
#{$selector} {
|
|
44
|
+
outline: rem-calc($width) solid $color;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
40
47
|
}
|
|
41
|
-
|
|
42
48
|
}
|
|
49
|
+
|