@ecl/site-header 5.0.0-alpha.8 → 5.0.0-aplha.13

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/README.md CHANGED
@@ -11,7 +11,6 @@ npm install --save @ecl/site-header
11
11
  - **"logged"** (boolean) (default: false): Whether the user is logged in or not
12
12
  - **"menu"** (associative array): Menu content, if any. Uses ECL Menu structure
13
13
  - **"banner_top"** (string) OR (object with Link component in property): Class name
14
- - **"icon_path"** (string) (default: ''): file containing the svg icons
15
14
  - **"site_name"** (string) (default: '') Site name
16
15
  - **"site_name_mobile_only"** (boolean): Whether the site name should be hidden on desktop or not
17
16
  - **"logo"** (associative array) (default: predefined structure): Logo image settings. format:
@@ -76,7 +75,6 @@ npm install --save @ecl/site-header
76
75
  {% include '@ecl/site-header/site-header.html.twig' with {
77
76
  banner_top: 'Class name',
78
77
  site_name: 'This site name'
79
- icon_path: '/icons.svg',
80
78
  logo: {
81
79
  alt: 'European Commission',
82
80
  href: '/example',
@@ -14,7 +14,7 @@ $language-list: null !default;
14
14
 
15
15
  @mixin with-scrollbar {
16
16
  overflow-y: auto;
17
- scrollbar-color: var(--cm-surface-medium, var(--c-n)) rgba(0, 0, 0, 0);
17
+ scrollbar-color: var(--cm-surface-medium, var(--c-n)) rgb(0, 0, 0, 0);
18
18
  scrollbar-width: thin;
19
19
  }
20
20
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ecl/site-header",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "5.0.0-alpha.8",
5
+ "version": "5.0.0-aplha.13",
6
6
  "description": "ECL Site Header",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -10,20 +10,20 @@
10
10
  "main": "site-header.js",
11
11
  "module": "site-header.js",
12
12
  "dependencies": {
13
- "@ecl/button": "5.0.0-alpha.8",
14
- "@ecl/dom-utils": "5.0.0-alpha.8",
15
- "@ecl/grid": "5.0.0-alpha.8",
16
- "@ecl/icon": "5.0.0-alpha.8",
17
- "@ecl/link": "5.0.0-alpha.8",
18
- "@ecl/menu": "5.0.0-alpha.8",
19
- "@ecl/notification": "5.0.0-alpha.8",
20
- "@ecl/picture": "5.0.0-alpha.8",
21
- "@ecl/search-form": "5.0.0-alpha.8",
13
+ "@ecl/button": "5.0.0-aplha.13",
14
+ "@ecl/dom-utils": "5.0.0-aplha.13",
15
+ "@ecl/grid": "5.0.0-aplha.13",
16
+ "@ecl/icon": "5.0.0-aplha.13",
17
+ "@ecl/link": "5.0.0-aplha.13",
18
+ "@ecl/menu": "5.0.0-aplha.13",
19
+ "@ecl/notification": "5.0.0-aplha.13",
20
+ "@ecl/picture": "5.0.0-aplha.13",
21
+ "@ecl/search-form": "5.0.0-aplha.13",
22
22
  "focus-trap": "7.6.4"
23
23
  },
24
24
  "devDependencies": {
25
- "@ecl/resources-ec-logo": "5.0.0-alpha.8",
26
- "@ecl/resources-eu-logo": "5.0.0-alpha.8"
25
+ "@ecl/resources-ec-logo": "5.0.0-aplha.13",
26
+ "@ecl/resources-eu-logo": "5.0.0-aplha.13"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",
@@ -39,5 +39,5 @@
39
39
  "design-system",
40
40
  "twig"
41
41
  ],
42
- "gitHead": "765d0f9f94ff5aebe563f8693bb682647cc4f8a8"
42
+ "gitHead": "b5ce1b660b26e315055172169c3a7e9daa638f63"
43
43
  }
@@ -182,7 +182,7 @@ $language-list: null !default;
182
182
  font: var(--f-m);
183
183
  left: 0;
184
184
  margin-top: var(--s-l);
185
- padding: var(--s-3xl) var(--s-m);
185
+ padding: var(--s-5xl) var(--s-m);
186
186
  position: absolute;
187
187
  z-index: map.get($theme, 'z-index', 'modal') + 1;
188
188
 
@@ -278,6 +278,10 @@ $language-list: null !default;
278
278
  }
279
279
  }
280
280
 
281
+ .ecl-site-header__site-name {
282
+ margin-inline-end: var(--s-5xl);
283
+ }
284
+
281
285
  // Menu display and position
282
286
  $menu-top: calc(44px + 2 * var(--s-xs));
283
287
 
@@ -464,7 +468,7 @@ $menu-top: calc(44px + 2 * var(--s-xs));
464
468
  left: 50%;
465
469
  margin-top: var(--s-l);
466
470
  min-width: 22rem;
467
- padding: var(--s-3xl);
471
+ padding: var(--s-5xl);
468
472
  transform: translateX(-50%);
469
473
  width: auto;
470
474
 
@@ -78,6 +78,14 @@ $language-list: null !default;
78
78
  }
79
79
  }
80
80
 
81
+ .ecl-menu__inner-header {
82
+ flex-flow: row;
83
+
84
+ .ecl-menu__close {
85
+ display: none;
86
+ }
87
+ }
88
+
81
89
  /* stylelint-disable no-descending-specificity */
82
90
  .ecl-menu__open,
83
91
  .ecl-mega-menu__open,
@@ -2,7 +2,6 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
- - "icon_path" (string) (default: ''): URL to icons file
6
5
  - "language_selector" (associative array) (default: predefined structure): Language switcher settings. format:
7
6
  {
8
7
  "href": (string) (default: ''): URL for switcher
@@ -37,7 +36,6 @@
37
36
  {# Default variables #}
38
37
 
39
38
  {% set _language_selector = language_selector|default({}) %}
40
- {% set _icon_path = icon_path|default('') %}
41
39
  {% set _label = _language_selector.label|default('') %}
42
40
 
43
41
  {# Internal logic - Process properties #}
@@ -62,7 +60,6 @@
62
60
  <span class="ecl-site-header__language-icon">
63
61
  {% include '@ecl/icon/icon.html.twig' with {
64
62
  icon: {
65
- path: _icon_path,
66
63
  name: 'global',
67
64
  size: 's'
68
65
  },
@@ -109,7 +106,7 @@
109
106
  {{- _language_selector.eu_category -}}
110
107
  </div>
111
108
  {% endif %}
112
- <ul class="ecl-site-header__language-list">
109
+ <ul class="ecl-site-header__language-list" translate="no">
113
110
  {% for _item in _language_selector.overlay.items %}
114
111
  <li class="ecl-site-header__language-item">
115
112
  {% set _link_label %}
@@ -145,7 +142,7 @@
145
142
  {{- _language_selector.non_eu_category -}}
146
143
  </div>
147
144
  {% endif %}
148
- <ul class="ecl-site-header__language-list">
145
+ <ul class="ecl-site-header__language-list" translate="no">
149
146
  {% for _item in _language_selector.overlay.non_eu_items %}
150
147
  <li class="ecl-site-header__language-item">
151
148
  {% set _link_label %}
@@ -43,11 +43,7 @@ $site-header: null !default;
43
43
  }
44
44
 
45
45
  .ecl-site-header__banner {
46
- color: map.get($site-header, 'banner-text-color');
47
- font: map.get($theme, 'font-print', '3xl');
48
- font-family: var(--ecl-font-family-print-alt);
49
- font-weight: map.get($theme, 'font-weight-print', 'bold');
50
- margin-top: map.get($theme, 'spacing-print', 'xs');
46
+ display: none !important;
51
47
  }
52
48
 
53
49
  .ecl-site-header__logo-link::after {
@@ -2,7 +2,6 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
- - "icon_path" (string) (default: ''): URL to icons file
6
5
  - "banner_top" (object): Object of type link (link : { label, path })
7
6
  - "logged" (boolean): Whether the user is logged in or not
8
7
  - "menu" (associative array): Menu content, if any. Uses ECL Menu structure
@@ -105,7 +104,6 @@
105
104
  {% set _login_box = login_box|default({}) %}
106
105
  {% set _login_toggle = login_toggle|default({}) %}
107
106
  {% set _search_toggle = search_toggle|default({}) %}
108
- {% set _icon_path = icon_path|default('') %}
109
107
  {% set _menu = menu|default(false) %}
110
108
  {% set _mega_menu = mega_menu|default(false) %}
111
109
  {% set _site_name = site_name|default('') %}
@@ -187,7 +185,6 @@
187
185
  label: _search_button_label,
188
186
  icon: {
189
187
  name: 'search',
190
- path: _icon_path,
191
188
  size: 'fluid',
192
189
  },
193
190
  icon_position: 'before',
@@ -299,7 +296,6 @@
299
296
  {% set icon_extra_classes = _custom_action.icon.extra_classes|default('') %}
300
297
  {% set icon_extra_classes = icon_extra_classes ~ ' ecl-site-header__icon' %}
301
298
  {% set icon = _custom_action.icon|merge({
302
- path: _icon_path,
303
299
  extra_classes: icon_extra_classes
304
300
  }) %}
305
301
  {% else %}
@@ -363,7 +359,6 @@
363
359
  >
364
360
  {% include '@ecl/icon/icon.html.twig' with {
365
361
  icon: {
366
- path: _icon_path,
367
362
  name: 'logged-in',
368
363
  size: 's'
369
364
  },
@@ -478,7 +473,6 @@
478
473
  {%- if banner_top.link is defined and banner_top.link is not empty %}
479
474
  {% include '@ecl/link/link.html.twig' with banner_top|merge({
480
475
  link: banner_top.link|merge({ type: 'standalone', no_visited: true}),
481
- icon_path: _icon_path
482
476
  }) only %}
483
477
  {% else %}
484
478
  {{ banner_top }}
@@ -517,13 +511,11 @@
517
511
  {% if _menu is defined and _menu is not empty %}
518
512
  {% include '@ecl/menu/menu.html.twig' with _menu|merge({
519
513
  site_name: _site_name,
520
- icon_path: _icon_path,
521
514
  }) only %}
522
515
  {% endif %}
523
516
  {% if _mega_menu is defined and _mega_menu is not empty %}
524
517
  {% include '@ecl/mega-menu/mega-menu.html.twig' with _mega_menu|merge({
525
518
  site_name: _site_name,
526
- icon_path: _icon_path,
527
519
  }) only %}
528
520
  {% endif %}
529
521
  </header>
package/site-header.js CHANGED
@@ -446,9 +446,8 @@ export class SiteHeader {
446
446
  arrowCssVar,
447
447
  `calc(${arrowPos}px - ${this.arrowSize})`,
448
448
  );
449
- }
450
- // If popover extends beyond left edge in RTL
451
- else if (this.direction === 'rtl' && popoverRect.left < 0) {
449
+ } else if (this.direction === 'rtl' && popoverRect.left < 0) {
450
+ // If popover extends beyond left edge in RTL
452
451
  overlay.classList.add('ecl-site-header__language-container--push-left');
453
452
  overlay.style.setProperty(
454
453
  'left',