@ecl/mega-menu 5.0.0-alpha.12 → 5.0.0-alpha.14

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.
Files changed (2) hide show
  1. package/mega-menu.js +16 -0
  2. package/package.json +7 -7
package/mega-menu.js CHANGED
@@ -798,6 +798,11 @@ export class MegaMenu {
798
798
  const containerBottom = containerBounding.bottom;
799
799
  // By requirements, limit the height to the 70% of the available space.
800
800
  const availableHeight = (window.innerHeight - containerBottom) * 0.7;
801
+ const minHeight =
802
+ parseFloat(
803
+ window.getComputedStyle(queryOne('.ecl-mega-menu__wrapper'))
804
+ .minHeight,
805
+ ) || 0;
801
806
 
802
807
  if (maxHeight > availableHeight) {
803
808
  height = availableHeight;
@@ -805,6 +810,10 @@ export class MegaMenu {
805
810
  height = maxHeight;
806
811
  }
807
812
 
813
+ if (height < minHeight) {
814
+ height = minHeight;
815
+ }
816
+
808
817
  const wrapper = queryOne('.ecl-mega-menu__wrapper', menuItem);
809
818
  if (wrapper) {
810
819
  wrapper.style.height = `${height}px`;
@@ -1298,6 +1307,7 @@ export class MegaMenu {
1298
1307
  'ecl-mega-menu--start-panel',
1299
1308
  );
1300
1309
  this.element.classList.add('ecl-mega-menu--one-panel');
1310
+ this.element.classList.remove('ecl-mega-menu--has-secondary-featured');
1301
1311
  level2.setAttribute('aria-expanded', 'false');
1302
1312
  level2.classList.remove(
1303
1313
  'ecl-mega-menu__subitem--expanded',
@@ -1533,6 +1543,12 @@ export class MegaMenu {
1533
1543
  if (infoPanel) {
1534
1544
  infoPanel.style.top = '';
1535
1545
  }
1546
+
1547
+ this.positionMenuOverlay();
1548
+ this.checkDropdownHeight(
1549
+ menuItem.closest('.ecl-mega-menu__item'),
1550
+ false,
1551
+ );
1536
1552
  break;
1537
1553
 
1538
1554
  default:
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ecl/mega-menu",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "5.0.0-alpha.12",
5
+ "version": "5.0.0-alpha.14",
6
6
  "description": "ECL Mega Menu",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -11,11 +11,11 @@
11
11
  "module": "mega-menu.js",
12
12
  "style": "mega-menu.scss",
13
13
  "dependencies": {
14
- "@ecl/button": "5.0.0-alpha.12",
15
- "@ecl/dom-utils": "5.0.0-alpha.12",
16
- "@ecl/event-manager": "5.0.0-alpha.12",
17
- "@ecl/link": "5.0.0-alpha.12",
18
- "@ecl/picture": "5.0.0-alpha.12",
14
+ "@ecl/button": "5.0.0-alpha.14",
15
+ "@ecl/dom-utils": "5.0.0-alpha.14",
16
+ "@ecl/event-manager": "5.0.0-alpha.14",
17
+ "@ecl/link": "5.0.0-alpha.14",
18
+ "@ecl/picture": "5.0.0-alpha.14",
19
19
  "bowser": "2.11.0",
20
20
  "focus-trap": "7.6.4"
21
21
  },
@@ -33,5 +33,5 @@
33
33
  "design-system",
34
34
  "twig"
35
35
  ],
36
- "gitHead": "a8d78ac3122f61283f822ca27a4a8343a583f65a"
36
+ "gitHead": "5f790fa1e567483d23464f81405996c9e1c4f4f5"
37
37
  }