@openeuropa/bcl-mega-menu 0.4185.202511191330 → 0.4230.202512021730

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.
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {% set _label = label ?? null %}
4
2
  {% set _items = items ?? [] %}
5
3
  {% set _icon_path = icon_path ?? '' %}
@@ -32,4 +30,3 @@
32
30
  {% endfor %}
33
31
  </ul>
34
32
 
35
- {% endapply %}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {% set _items = items ?? [] %}
4
2
  {% set _trigger = trigger ?? null %}
5
3
  {% set _icon_path = icon_path ?? '' %}
@@ -21,24 +19,26 @@
21
19
  }) %}
22
20
  {% include '@oe-bcl/bcl-button/button.html.twig' with _trigger only %}
23
21
 
24
- {% set _see_all_link = null %}
25
- {# Prepare an optional "See all" link rendered outside the list. #}
22
+ {# Add an optional "See all" link as last item. #}
26
23
  {% if _see_all is not empty %}
24
+ {# Wrap the label for an ellipsis. #}
27
25
  {% set _see_all_label %}
28
26
  <span>{{- _see_all.label -}}</span>
29
27
  {% endset %}
30
28
  {% set _see_all_attr = (_see_all.attributes is defined ? _see_all.attributes : create_attribute()) %}
31
- {% set _see_all_link = _see_all|merge({
29
+ {% set _see_all = _see_all|merge({
32
30
  label: _see_all_label,
33
31
  icon: {
34
- size: 'xs',
35
32
  name: 'arrow-right',
36
33
  path: _icon_path,
37
34
  },
35
+ li_attributes: create_attribute()
36
+ .addClass('__see_all'),
38
37
  attributes: _see_all_attr
39
38
  .addClass(['see-all-button'])
40
39
  .setAttribute('aria-label', 'See all items in ‘' ~ _trigger.label ~ '’')
41
40
  }) %}
41
+ {% set _items = _items|merge([_see_all]) %}
42
42
  {% endif %}
43
43
  {% set submenu_attributes = create_attribute()
44
44
  .setAttribute('id', _panel_id)
@@ -58,11 +58,5 @@
58
58
  icon_path: _icon_path,
59
59
  level: _level,
60
60
  } only %}
61
- {% if _see_all_link %}
62
- <div class="__see_all">
63
- {% include '@oe-bcl/bcl-link/link.html.twig' with _see_all_link only %}
64
- </div>
65
- {% endif %}
66
61
  </div>
67
62
 
68
- {% endapply %}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {# Parameters:
4
2
  - id (string) (default: dropdown-random(1000))
5
3
  - link (boolean) (default: false) - sets trigger to link, default is button
@@ -112,4 +110,3 @@
112
110
  </nav>
113
111
  </div>
114
112
 
115
- {% endapply %}
package/package.json CHANGED
@@ -2,15 +2,15 @@
2
2
  "name": "@openeuropa/bcl-mega-menu",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.4185.202511191330",
5
+ "version": "0.4230.202512021730",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL mega menu",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-button": "^0.4185.202511191330",
12
- "@openeuropa/bcl-dropdown": "^0.4185.202511191330",
13
- "@openeuropa/bcl-link": "^0.4185.202511191330"
11
+ "@openeuropa/bcl-button": "^0.4230.202512021730",
12
+ "@openeuropa/bcl-dropdown": "^0.4230.202512021730",
13
+ "@openeuropa/bcl-link": "^0.4230.202512021730"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
@@ -26,5 +26,5 @@
26
26
  "design-system",
27
27
  "twig"
28
28
  ],
29
- "gitHead": "de7fc20600e88ea3b38e74c2ec1c6ffbb0b2a1b0"
29
+ "gitHead": "19735e328b2b53ccefbcc6829e2aaf149a2c438c"
30
30
  }