@openeuropa/bcl-gallery 0.21.0 → 0.23.1

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.
Files changed (2) hide show
  1. package/gallery.html.twig +23 -19
  2. package/package.json +5 -4
package/gallery.html.twig CHANGED
@@ -2,16 +2,18 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
- - "id" (string) (default: '')
6
- - "title" (string) (default: '')
7
- - "title_tag" (string) (default: 'h2')
8
- - "counter" (string) (default: '')
9
- - "toggle_collapsed" (string) (default: '')
10
- - "toggle_expanded" (string) (default: '')
11
- - "previous_label" (string) (default: '')
12
- - "next_label" (string) (default: '')
13
- - "max_visible_thumbnails" (int) (default: 5)
14
- - "items" (array of objects) format: [
5
+ - id (string) (default: '')
6
+ - title (string) (default: '')
7
+ - title_tag (string) (default: 'h2')
8
+ - title_link: (link object) (default: {})
9
+ - title_attributes (drupal attrs)
10
+ - counter (string) (default: '')
11
+ - toggle_collapsed (string) (default: '')
12
+ - toggle_expanded (string) (default: '')
13
+ - previous_label (string) (default: '')
14
+ - next_label (string) (default: '')
15
+ - max_visible_thumbnails (int) (default: 5)
16
+ - items (array of objects) format: [
15
17
  {
16
18
  thumbnails (string) img path
17
19
  media: (string) <img> tag
@@ -22,14 +24,14 @@ Parameters:
22
24
  }
23
25
  ...
24
26
  ],
25
- - "icon_path" (string) (default: '')
27
+ - icon_path (string) (default: '')
26
28
  #}
27
29
 
28
- {# Internal properties #}
29
-
30
30
  {% set _id = id|default('gallery-' ~ random(1000)) %}
31
31
  {% set _title = title|default('') %}
32
32
  {% set _title_tag = title_tag|default('h2') %}
33
+ {% set _title_link = title_link|default({}) %}
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,14 @@ 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
+ title_link: _title_link,
69
+ attributes: _title_attributes,
70
+ } only %}
71
+ {% endif %}
68
72
  </div>
69
73
  <div class="mb-3 mb-sm-0 fw-bold">
70
74
  {%- 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.23.1",
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.23.1",
12
+ "@openeuropa/bcl-heading": "^0.23.1",
13
+ "@openeuropa/bcl-icon": "^0.23.1"
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": "927e89290a185b5e578065e44e81cb99b0b47c12"
29
30
  }