@openeuropa/bcl-mega-menu 0.3694.202508010105 → 0.3694.202508261115
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.html.twig +98 -35
- package/package.json +5 -5
package/mega-menu.html.twig
CHANGED
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
attributes: create_attribute().addClass(['back-button'])
|
|
79
79
|
} only %}
|
|
80
80
|
</div>
|
|
81
|
-
<div class="row
|
|
81
|
+
<div class="row h-100">
|
|
82
82
|
{% if content_block is defined %}
|
|
83
83
|
<div class="col-md-12 col-xl-3">
|
|
84
84
|
<div class="content-block">
|
|
@@ -100,40 +100,103 @@
|
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
{% endif %}
|
|
103
|
-
<div class="col-md-12 col-xl-
|
|
104
|
-
<div class="
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{% set
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
103
|
+
<div class="col-md-12 col-xl-6 h-100">
|
|
104
|
+
<div class="row h-100 g-0">
|
|
105
|
+
<div class="col-12 col-lg-4 col-xl h-100 mt-lg-3 mt-xl-0">
|
|
106
|
+
<div class="navigation-items" role="tablist" aria-orientation="vertical">
|
|
107
|
+
{% set _dropdown_panels = _dropdown_panels|default([]) %}
|
|
108
|
+
|
|
109
|
+
{% for _raw in _items %}
|
|
110
|
+
{% set _render_item = _raw %}
|
|
111
|
+
{% if _raw.items is defined and _raw.items is not empty %}
|
|
112
|
+
{% set _panel_id = 'mm-panel-' ~ _id ~ '-' ~ loop.index0 %}
|
|
113
|
+
{% set _trigger_id = 'mm-trigger-' ~ _id ~ '-' ~ loop.index0 %}
|
|
114
|
+
|
|
115
|
+
{% set _raw_items = _raw.items %}
|
|
116
|
+
|
|
117
|
+
{% if _raw.see_all is defined and _raw.see_all is not empty %}
|
|
118
|
+
{% set _see_all_attr = (_raw.see_all.attributes is defined ? _raw.see_all.attributes : create_attribute()) %}
|
|
119
|
+
{% set _see_all = _raw.see_all|merge({
|
|
120
|
+
icon: {
|
|
121
|
+
name: 'arrow-right',
|
|
122
|
+
path: _icon_path,
|
|
123
|
+
size: 'fluid'
|
|
124
|
+
},
|
|
125
|
+
attributes: _see_all_attr.addClass(['see-all-button'])
|
|
126
|
+
}) %}
|
|
127
|
+
|
|
128
|
+
{% set _raw_items = _raw_items|merge([ _see_all ]) %}
|
|
129
|
+
{% endif %}
|
|
130
|
+
|
|
131
|
+
{% set _dropdown_panels = _dropdown_panels|merge([{
|
|
132
|
+
id: _panel_id,
|
|
133
|
+
trigger_id: _trigger_id,
|
|
134
|
+
items: _raw_items,
|
|
135
|
+
title: _raw.trigger.label,
|
|
136
|
+
}]) %}
|
|
137
|
+
|
|
138
|
+
{% set _trigger_attributes = (_raw.trigger.attributes is defined ? _raw.trigger.attributes : create_attribute())
|
|
139
|
+
.addClass(['tab-toggle'])
|
|
140
|
+
.setAttribute('id', _trigger_id)
|
|
141
|
+
.setAttribute('role', 'tab')
|
|
142
|
+
.setAttribute('data-bs-toggle', 'tab')
|
|
143
|
+
.setAttribute('data-bs-target', '#' ~ _panel_id)
|
|
144
|
+
.setAttribute('aria-controls', _panel_id)
|
|
145
|
+
.setAttribute('aria-selected', 'false')
|
|
146
|
+
%}
|
|
147
|
+
|
|
148
|
+
{% set _render_item = _raw|merge({
|
|
149
|
+
trigger: _raw.trigger|merge({
|
|
150
|
+
icon: {
|
|
151
|
+
name: 'chevron-right',
|
|
152
|
+
path: _icon_path,
|
|
153
|
+
size: 'fluid'
|
|
154
|
+
},
|
|
155
|
+
attributes: _trigger_attributes.addClass('no-chevron')
|
|
156
|
+
})
|
|
157
|
+
}) %}
|
|
158
|
+
{% set _render_item = _render_item.trigger %}
|
|
159
|
+
{% endif %}
|
|
160
|
+
|
|
161
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _render_item only %}
|
|
162
|
+
{% endfor %}
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<div class="col-12 col-lg-4 col-xl h-100 mt-lg-3 mt-xl-0">
|
|
166
|
+
<div class="sub-navigation-items tab-content">
|
|
167
|
+
{% for _panel in _dropdown_panels %}
|
|
168
|
+
{% if _items is not empty and _items is iterable %}
|
|
169
|
+
<div
|
|
170
|
+
class="tab-pane p-0"
|
|
171
|
+
id="{{ _panel.id }}"
|
|
172
|
+
role="tabpanel"
|
|
173
|
+
aria-labelledby="{{ _panel.trigger_id }}"
|
|
174
|
+
>
|
|
175
|
+
<p class="panel-title">{{ _panel.title }}</p>
|
|
176
|
+
<ul class="list-unstyled m-0">
|
|
177
|
+
{% for _item in _panel.items %}
|
|
178
|
+
{% if _item.attributes is empty %}
|
|
179
|
+
{% set _item = _item|merge({
|
|
180
|
+
attributes: create_attribute()
|
|
181
|
+
}) %}
|
|
182
|
+
{% endif %}
|
|
183
|
+
{% if _item.active %}
|
|
184
|
+
{% set _item_classes = _item_classes|merge(['active']) %}
|
|
185
|
+
{% endif %}
|
|
186
|
+
{% set _item = _item|merge({
|
|
187
|
+
clean_class: true,
|
|
188
|
+
attributes: _item.attributes.addClass(_item_classes)
|
|
189
|
+
}) %}
|
|
190
|
+
<li>
|
|
191
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
|
|
192
|
+
</li>
|
|
193
|
+
{% endfor %}
|
|
194
|
+
</ul>
|
|
195
|
+
</div>
|
|
196
|
+
{% endif %}
|
|
197
|
+
{% endfor %}
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
137
200
|
</div>
|
|
138
201
|
</div>
|
|
139
202
|
</div>
|
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.3694.
|
|
5
|
+
"version": "0.3694.202508261115",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"description": "OE - BCL mega menu",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-button": "^0.3694.
|
|
12
|
-
"@openeuropa/bcl-dropdown": "^0.3694.
|
|
13
|
-
"@openeuropa/bcl-link": "^0.3694.
|
|
11
|
+
"@openeuropa/bcl-button": "^0.3694.202508261115",
|
|
12
|
+
"@openeuropa/bcl-dropdown": "^0.3694.202508261115",
|
|
13
|
+
"@openeuropa/bcl-link": "^0.3694.202508261115"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"design-system",
|
|
27
27
|
"twig"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "3dc35a5c524555e0540a5cc86033ee89dac48098"
|
|
30
30
|
}
|