@openeuropa/bcl-gallery 0.21.0 → 0.22.0

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/gallery.html.twig CHANGED
@@ -5,6 +5,7 @@ Parameters:
5
5
  - "id" (string) (default: '')
6
6
  - "title" (string) (default: '')
7
7
  - "title_tag" (string) (default: 'h2')
8
+ - "title_attributes" (drupal attrs)
8
9
  - "counter" (string) (default: '')
9
10
  - "toggle_collapsed" (string) (default: '')
10
11
  - "toggle_expanded" (string) (default: '')
@@ -30,6 +31,7 @@ Parameters:
30
31
  {% set _id = id|default('gallery-' ~ random(1000)) %}
31
32
  {% set _title = title|default('') %}
32
33
  {% set _title_tag = title_tag|default('h2') %}
34
+ {% set _title_attributes = title_attributes ?: create_attribute() %}
33
35
  {% set _counter = counter|default('') %}
34
36
  {% set _toggle_collapsed = toggle_collapsed|default('') %}
35
37
  {% set _toggle_expanded = toggle_expanded|default('') %}
@@ -59,12 +61,13 @@ Parameters:
59
61
  {% if _items is iterable %}
60
62
  <div class="d-sm-flex flex-sm-row align-items-sm-center">
61
63
  <div class="flex-sm-grow-1">
62
- {%- if _title is not empty -%}
63
- {% set _title_classes = 'fw-bold mb-3' %}
64
- <{{ _title_tag }} class="{{ _title_classes }}">
65
- {{- _title -}}
66
- </{{ _title_tag }}>
67
- {%- endif -%}
64
+ {% if _title is not empty %}
65
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
66
+ title: _title,
67
+ title_tag: _title_tag,
68
+ attributes: _title_attributes,
69
+ } only %}
70
+ {% endif %}
68
71
  </div>
69
72
  <div class="mb-3 mb-sm-0 fw-bold">
70
73
  {%- if _counter is not empty -%}
package/package.json CHANGED
@@ -2,14 +2,15 @@
2
2
  "name": "@openeuropa/bcl-gallery",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.21.0",
5
+ "version": "0.22.0",
6
6
  "description": "OE - BCL gallery",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "dependencies": {
11
- "@openeuropa/bcl-carousel": "^0.21.0",
12
- "@openeuropa/bcl-icon": "^0.21.0"
11
+ "@openeuropa/bcl-carousel": "^0.22.0",
12
+ "@openeuropa/bcl-heading": "^0.22.0",
13
+ "@openeuropa/bcl-icon": "^0.22.0"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -25,5 +26,5 @@
25
26
  "design-system",
26
27
  "twig"
27
28
  ],
28
- "gitHead": "18c01b34ca76780f480c692c566dfe507d961ccf"
29
+ "gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
29
30
  }