@openeuropa/bcl-file 0.14.0 → 0.18.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.
Files changed (2) hide show
  1. package/file.html.twig +19 -4
  2. package/package.json +4 -4
package/file.html.twig CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
- - icon (icon Object) (default: {})
6
5
  - title (string) (default: '')
6
+ - title_tag (string) (default: 'h2')
7
+ - item_title (string) (default: '')
8
+ - icon (icon Object) (default: {})
7
9
  - text (string) (default: '')
8
10
  - content (string) (default: '')
9
11
  - image (object) (default: {}) - format: {
@@ -34,6 +36,8 @@
34
36
 
35
37
  {% set _icon = icon|default({}) %}
36
38
  {% set _title = title|default('') %}
39
+ {% set _title_tag = title_tag|default('h2') %}
40
+ {% set _item_title = item_title|default('') %}
37
41
  {% set _text = text|default('') %}
38
42
  {% set _content = content|default('') %}
39
43
  {% set _image = image|default({}) %}
@@ -53,6 +57,17 @@
53
57
  }) %}
54
58
  {% endif %}
55
59
 
60
+ {% if attributes is empty %}
61
+ {% set attributes = create_attribute() %}
62
+ {% endif %}
63
+
64
+ {% if _title is not empty %}
65
+ {% set _title_classes = 'fw-bold mb-4' %}
66
+ <{{ _title_tag }} class="{{ _title_classes }}">
67
+ {{- _title -}}
68
+ </{{ _title_tag }}>
69
+ {% endif %}
70
+
56
71
  {% if _variant == 'card' %}
57
72
  {% set attributes = attributes.addClass(['border', 'rounded-bottom']) %}
58
73
  {% set _image = _image|merge({
@@ -67,7 +82,7 @@
67
82
  },
68
83
  badges: _badges,
69
84
  title: {
70
- content: _title,
85
+ content: _item_title,
71
86
  },
72
87
  text: {
73
88
  content: _text,
@@ -94,8 +109,8 @@
94
109
  {% endif %}
95
110
  <div class="{{ _container_classes }}">
96
111
  <div class="flex-grow-1">
97
- {% if _title is not empty and _variant == 'default' %}
98
- <p class="fw-bold m-0">{{ _title }}</p>
112
+ {% if _item_title is not empty and _variant == 'default' %}
113
+ <p class="fw-bold m-0">{{ _item_title }}</p>
99
114
  {% endif %}
100
115
  {% if _language is not empty or _meta is not empty %}
101
116
  <small class="fw-bold m-0">
package/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "name": "@openeuropa/bcl-file",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.14.0",
5
+ "version": "0.18.0",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL file",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-icon": "^0.14.0",
12
- "@openeuropa/bcl-link": "^0.14.0"
11
+ "@openeuropa/bcl-icon": "^0.18.0",
12
+ "@openeuropa/bcl-link": "^0.18.0"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -25,5 +25,5 @@
25
25
  "design-system",
26
26
  "twig"
27
27
  ],
28
- "gitHead": "b91fc0b466f8a604eda1cfd519f3be4cbbc75324"
28
+ "gitHead": "a82834df6dff563a956a79bf2899c92742dd5820"
29
29
  }