@ecl/mega-menu 5.0.0-alpha.14 → 5.0.0-alpha.15
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.
- package/mega-menu.js +9 -9
- package/mega-menu.scss +34 -25
- package/package.json +8 -8
package/mega-menu.js
CHANGED
|
@@ -136,7 +136,7 @@ export class MegaMenu {
|
|
|
136
136
|
this.menuOverlay = null;
|
|
137
137
|
this.currentItem = null;
|
|
138
138
|
this.totalItemsWidth = 0;
|
|
139
|
-
this.breakpointL =
|
|
139
|
+
this.breakpointL = 1140;
|
|
140
140
|
this.openPanel = { num: 0, item: {} };
|
|
141
141
|
this.infoLinks = null;
|
|
142
142
|
this.seeAllLinks = null;
|
|
@@ -610,10 +610,10 @@ export class MegaMenu {
|
|
|
610
610
|
|
|
611
611
|
if (viewport === 'desktop' && this.header) {
|
|
612
612
|
if (this.headerBanner) {
|
|
613
|
-
this.headerBanner.style.display = '
|
|
613
|
+
this.headerBanner.style.display = '';
|
|
614
614
|
}
|
|
615
615
|
if (this.headerNotification) {
|
|
616
|
-
this.headerNotification.style.display = '
|
|
616
|
+
this.headerNotification.style.display = '';
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
}
|
|
@@ -639,12 +639,12 @@ export class MegaMenu {
|
|
|
639
639
|
screenWidth > this.breakpointL ? 'desktop' : 'mobile',
|
|
640
640
|
);
|
|
641
641
|
}
|
|
642
|
-
if (this.prevScreenWidth >=
|
|
642
|
+
if (this.prevScreenWidth >= 1368 && screenWidth >= 1140) {
|
|
643
643
|
this.resetStyles('desktop', true);
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
this.isDesktop = this.useDesktopDisplay();
|
|
647
|
-
this.isLarge = window.innerWidth >=
|
|
647
|
+
this.isLarge = window.innerWidth >= 1368;
|
|
648
648
|
// Update previous screen width
|
|
649
649
|
this.prevScreenWidth = screenWidth;
|
|
650
650
|
this.element.classList.remove('ecl-mega-menu--forced-mobile');
|
|
@@ -1333,10 +1333,10 @@ export class MegaMenu {
|
|
|
1333
1333
|
} else {
|
|
1334
1334
|
if (this.header) {
|
|
1335
1335
|
if (this.headerBanner) {
|
|
1336
|
-
this.headerBanner.style.display = '
|
|
1336
|
+
this.headerBanner.style.display = '';
|
|
1337
1337
|
}
|
|
1338
1338
|
if (this.headerNotification) {
|
|
1339
|
-
this.headerNotification.style.display = '
|
|
1339
|
+
this.headerNotification.style.display = '';
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
1342
|
// Remove expanded class from inner menu
|
|
@@ -1642,10 +1642,10 @@ export class MegaMenu {
|
|
|
1642
1642
|
'ecl-site-header--open-menu-start',
|
|
1643
1643
|
);
|
|
1644
1644
|
if (this.headerBanner) {
|
|
1645
|
-
this.headerBanner.style.display = '
|
|
1645
|
+
this.headerBanner.style.display = '';
|
|
1646
1646
|
}
|
|
1647
1647
|
if (this.headerNotification) {
|
|
1648
|
-
this.headerNotification.style.display = '
|
|
1648
|
+
this.headerNotification.style.display = '';
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
this.enableScroll();
|
package/mega-menu.scss
CHANGED
|
@@ -93,7 +93,7 @@ $mega-menu: null !default;
|
|
|
93
93
|
display: flex;
|
|
94
94
|
flex-direction: column;
|
|
95
95
|
font: var(--f-xs);
|
|
96
|
-
margin-inline-start:
|
|
96
|
+
margin-inline-start: map.get($mega-menu, 'mobile', 'open-button-margin');
|
|
97
97
|
order: 2;
|
|
98
98
|
padding: map.get($mega-menu, 'mobile', 'open-padding');
|
|
99
99
|
text-decoration: none;
|
|
@@ -112,7 +112,7 @@ $mega-menu: null !default;
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
&:focus-visible {
|
|
115
|
-
outline-offset: -
|
|
115
|
+
outline-offset: map.get($mega-menu, 'mobile', 'open-button-offset');
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.ecl-icon:last-of-type {
|
|
@@ -151,7 +151,7 @@ $mega-menu: null !default;
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
/* stylelint-disable-next-line order/order */
|
|
154
|
-
@include breakpoints.up('
|
|
154
|
+
@include breakpoints.up('xl') {
|
|
155
155
|
.ecl-mega-menu:not(.ecl-menu--forced-mobile) {
|
|
156
156
|
background: map.get($mega-menu, 'desktop', 'menu-background');
|
|
157
157
|
padding-bottom: 0;
|
|
@@ -334,7 +334,7 @@ $mega-menu: null !default;
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
/* stylelint-disable-next-line order/order */
|
|
337
|
-
@include breakpoints.up('
|
|
337
|
+
@include breakpoints.up('xl') {
|
|
338
338
|
.ecl-mega-menu:not(.ecl-menu--forced-mobile) {
|
|
339
339
|
.ecl-mega-menu__overlay {
|
|
340
340
|
background-color: map.get($mega-menu, 'desktop', 'overlay-background');
|
|
@@ -345,7 +345,6 @@ $mega-menu: null !default;
|
|
|
345
345
|
background-color: transparent;
|
|
346
346
|
box-shadow: none;
|
|
347
347
|
display: block;
|
|
348
|
-
margin-inline-start: calc(-1 * var(--s-m));
|
|
349
348
|
overflow-y: visible;
|
|
350
349
|
position: static;
|
|
351
350
|
transition: none;
|
|
@@ -495,9 +494,14 @@ $mega-menu: null !default;
|
|
|
495
494
|
}
|
|
496
495
|
|
|
497
496
|
.ecl-mega-menu__featured-list__item-description {
|
|
498
|
-
font: map.get($mega-menu, 'global', 'featured-description-font');
|
|
499
497
|
margin-inline-start: var(--s-l);
|
|
500
498
|
}
|
|
499
|
+
|
|
500
|
+
.ecl-mega-menu__featured-list__item-description,
|
|
501
|
+
.ecl-mega-menu__featured-list__item-description p {
|
|
502
|
+
font: map.get($mega-menu, 'global', 'featured-description-font');
|
|
503
|
+
margin-block: 0;
|
|
504
|
+
}
|
|
501
505
|
}
|
|
502
506
|
|
|
503
507
|
.ecl-mega-menu--rtl .ecl-icon--flip-horizontal {
|
|
@@ -572,12 +576,13 @@ $mega-menu: null !default;
|
|
|
572
576
|
}
|
|
573
577
|
|
|
574
578
|
/* stylelint-disable-next-line order/order */
|
|
575
|
-
@include breakpoints.up('
|
|
579
|
+
@include breakpoints.up('xl') {
|
|
576
580
|
.ecl-mega-menu:not(.ecl-menu--forced-mobile) {
|
|
577
581
|
border-top: map.get($mega-menu, 'desktop', 'menu-border');
|
|
578
582
|
|
|
579
583
|
.ecl-mega-menu__inner {
|
|
580
584
|
border-top: none;
|
|
585
|
+
margin-inline-start: calc(-1 * var(--s-xs));
|
|
581
586
|
}
|
|
582
587
|
|
|
583
588
|
.ecl-mega-menu__list {
|
|
@@ -722,9 +727,9 @@ $mega-menu: null !default;
|
|
|
722
727
|
}
|
|
723
728
|
|
|
724
729
|
.ecl-mega-menu:not(
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
730
|
+
.ecl-mega-menu--forced-mobile,
|
|
731
|
+
.ecl-mega-menu--forced-close
|
|
732
|
+
) {
|
|
728
733
|
.ecl-mega-menu__item {
|
|
729
734
|
&.ecl-mega-menu__item--expanded > .ecl-button .ecl-icon {
|
|
730
735
|
transform: rotate(0);
|
|
@@ -779,7 +784,7 @@ $mega-menu: null !default;
|
|
|
779
784
|
display: none;
|
|
780
785
|
}
|
|
781
786
|
|
|
782
|
-
@include breakpoints.down('
|
|
787
|
+
@include breakpoints.down('l') {
|
|
783
788
|
.ecl-mega-menu--one-panel {
|
|
784
789
|
.ecl-mega-menu__item--expanded > .ecl-mega-menu__link {
|
|
785
790
|
font: var(--f-l);
|
|
@@ -1100,11 +1105,11 @@ $mega-menu: null !default;
|
|
|
1100
1105
|
}
|
|
1101
1106
|
}
|
|
1102
1107
|
|
|
1103
|
-
@include breakpoints.up('
|
|
1108
|
+
@include breakpoints.up('xl') {
|
|
1104
1109
|
.ecl-mega-menu:not(
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1110
|
+
.ecl-mega-menu--forced-mobile,
|
|
1111
|
+
.ecl-mega-menu--forced-close
|
|
1112
|
+
) {
|
|
1108
1113
|
.ecl-mega-menu__wrapper {
|
|
1109
1114
|
padding-top: var(--s-m);
|
|
1110
1115
|
min-height: 200px !important;
|
|
@@ -1510,11 +1515,11 @@ $mega-menu: null !default;
|
|
|
1510
1515
|
}
|
|
1511
1516
|
}
|
|
1512
1517
|
|
|
1513
|
-
@include breakpoints.up('
|
|
1518
|
+
@include breakpoints.up('xxl') {
|
|
1514
1519
|
.ecl-mega-menu:not(
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1520
|
+
.ecl-mega-menu--forced-mobile,
|
|
1521
|
+
.ecl-mega-menu--forced-close
|
|
1522
|
+
) {
|
|
1518
1523
|
.ecl-container {
|
|
1519
1524
|
padding-inline: map.get(
|
|
1520
1525
|
$mega-menu,
|
|
@@ -1523,6 +1528,10 @@ $mega-menu: null !default;
|
|
|
1523
1528
|
);
|
|
1524
1529
|
}
|
|
1525
1530
|
|
|
1531
|
+
.ecl-mega-menu__inner {
|
|
1532
|
+
margin-inline-start: calc(-1 * var(--s-m));
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1526
1535
|
.ecl-mega-menu__item.ecl-mega-menu__item--expanded
|
|
1527
1536
|
> .ecl-mega-menu__wrapper
|
|
1528
1537
|
> .ecl-container {
|
|
@@ -1599,9 +1608,9 @@ $mega-menu: null !default;
|
|
|
1599
1608
|
|
|
1600
1609
|
@include breakpoints.up('xl') {
|
|
1601
1610
|
.ecl-mega-menu:not(
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1611
|
+
.ecl-mega-menu--forced-mobile,
|
|
1612
|
+
.ecl-mega-menu--forced-close
|
|
1613
|
+
) {
|
|
1605
1614
|
.ecl-container {
|
|
1606
1615
|
padding-inline: map.get(
|
|
1607
1616
|
$mega-menu,
|
|
@@ -1624,9 +1633,9 @@ $mega-menu: null !default;
|
|
|
1624
1633
|
|
|
1625
1634
|
@include breakpoints.up('xxl') {
|
|
1626
1635
|
.ecl-mega-menu:not(
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1636
|
+
.ecl-mega-menu--forced-mobile,
|
|
1637
|
+
.ecl-mega-menu--forced-close
|
|
1638
|
+
) {
|
|
1630
1639
|
.ecl-mega-menu__mega:not(.ecl-mega-menu__mega--level-2)
|
|
1631
1640
|
> .ecl-mega-menu__featured {
|
|
1632
1641
|
margin-inline-start: 20.68rem !important;
|
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.
|
|
5
|
+
"version": "5.0.0-alpha.15",
|
|
6
6
|
"description": "ECL Mega Menu",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"module": "mega-menu.js",
|
|
12
12
|
"style": "mega-menu.scss",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ecl/button": "5.0.0-alpha.
|
|
15
|
-
"@ecl/dom-utils": "5.0.0-alpha.
|
|
16
|
-
"@ecl/event-manager": "5.0.0-alpha.
|
|
17
|
-
"@ecl/link": "5.0.0-alpha.
|
|
18
|
-
"@ecl/picture": "5.0.0-alpha.
|
|
14
|
+
"@ecl/button": "5.0.0-alpha.15",
|
|
15
|
+
"@ecl/dom-utils": "5.0.0-alpha.15",
|
|
16
|
+
"@ecl/event-manager": "5.0.0-alpha.15",
|
|
17
|
+
"@ecl/link": "5.0.0-alpha.15",
|
|
18
|
+
"@ecl/picture": "5.0.0-alpha.15",
|
|
19
19
|
"bowser": "2.11.0",
|
|
20
|
-
"focus-trap": "7.6.
|
|
20
|
+
"focus-trap": "7.6.5"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"design-system",
|
|
34
34
|
"twig"
|
|
35
35
|
],
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "6004e147f949c0fbb2278650d59a1b8c249653c5"
|
|
37
37
|
}
|