@openeuropa/bcl-twig-templates 1.2.2 → 1.4.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/package.json CHANGED
@@ -2,75 +2,75 @@
2
2
  "name": "@openeuropa/bcl-twig-templates",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.2.2",
5
+ "version": "1.4.0",
6
6
  "description": "OE Bcl Twig Templates",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "devDependencies": {
11
- "@openeuropa/bcl-accordion": "^1.2.2",
12
- "@openeuropa/bcl-alert": "^1.2.2",
13
- "@openeuropa/bcl-badge": "^1.2.2",
14
- "@openeuropa/bcl-banner": "^1.2.2",
15
- "@openeuropa/bcl-base-templates": "^1.2.2",
16
- "@openeuropa/bcl-blockquote": "^1.2.2",
17
- "@openeuropa/bcl-breadcrumb": "^1.2.2",
18
- "@openeuropa/bcl-button": "^1.2.2",
19
- "@openeuropa/bcl-button-group": "^1.2.2",
20
- "@openeuropa/bcl-card": "^1.2.2",
21
- "@openeuropa/bcl-card-layout": "^1.2.2",
22
- "@openeuropa/bcl-carousel": "^1.2.2",
23
- "@openeuropa/bcl-contact-form": "^1.2.2",
24
- "@openeuropa/bcl-content-banner": "^1.2.2",
25
- "@openeuropa/bcl-date-block": "^1.2.2",
26
- "@openeuropa/bcl-description-list": "^1.2.2",
27
- "@openeuropa/bcl-dropdown": "^1.2.2",
28
- "@openeuropa/bcl-event": "^1.2.2",
29
- "@openeuropa/bcl-fact-figures": "^1.2.2",
30
- "@openeuropa/bcl-featured-media": "^1.2.2",
31
- "@openeuropa/bcl-file": "^1.2.2",
32
- "@openeuropa/bcl-footer": "^1.2.2",
33
- "@openeuropa/bcl-form": "^1.2.2",
34
- "@openeuropa/bcl-form-input": "^1.2.2",
35
- "@openeuropa/bcl-gallery": "^1.2.2",
36
- "@openeuropa/bcl-glossary": "^1.2.2",
37
- "@openeuropa/bcl-group": "^1.2.2",
38
- "@openeuropa/bcl-header": "^1.2.2",
39
- "@openeuropa/bcl-heading": "^1.2.2",
40
- "@openeuropa/bcl-icon": "^1.2.2",
41
- "@openeuropa/bcl-inpage-navigation": "^1.2.2",
42
- "@openeuropa/bcl-landing-page": "^1.2.2",
43
- "@openeuropa/bcl-language-list": "^1.2.2",
44
- "@openeuropa/bcl-language-switcher": "^1.2.2",
45
- "@openeuropa/bcl-link": "^1.2.2",
46
- "@openeuropa/bcl-links-block": "^1.2.2",
47
- "@openeuropa/bcl-list-group": "^1.2.2",
48
- "@openeuropa/bcl-listing": "^1.2.2",
49
- "@openeuropa/bcl-modal": "^1.2.2",
50
- "@openeuropa/bcl-multilingual": "^1.2.2",
51
- "@openeuropa/bcl-navbar": "^1.2.2",
52
- "@openeuropa/bcl-navigation": "^1.2.2",
53
- "@openeuropa/bcl-news": "^1.2.2",
54
- "@openeuropa/bcl-offcanvas": "^1.2.2",
55
- "@openeuropa/bcl-page": "^1.2.2",
56
- "@openeuropa/bcl-pagination": "^1.2.2",
57
- "@openeuropa/bcl-person": "^1.2.2",
58
- "@openeuropa/bcl-placeholder": "^1.2.2",
59
- "@openeuropa/bcl-progress": "^1.2.2",
60
- "@openeuropa/bcl-project": "^1.2.2",
61
- "@openeuropa/bcl-project-status": "^1.2.2",
62
- "@openeuropa/bcl-recent-activities": "^1.2.2",
63
- "@openeuropa/bcl-search": "^1.2.2",
64
- "@openeuropa/bcl-search-form": "^1.2.2",
65
- "@openeuropa/bcl-select": "^1.2.2",
66
- "@openeuropa/bcl-spinner": "^1.2.2",
67
- "@openeuropa/bcl-subscription": "^1.2.2",
68
- "@openeuropa/bcl-subscription-block": "^1.2.2",
69
- "@openeuropa/bcl-table": "^1.2.2",
70
- "@openeuropa/bcl-textarea": "^1.2.2",
71
- "@openeuropa/bcl-timeline": "^1.2.2",
72
- "@openeuropa/bcl-toast": "^1.2.2",
73
- "@openeuropa/bcl-user": "^1.2.2",
11
+ "@openeuropa/bcl-accordion": "^1.4.0",
12
+ "@openeuropa/bcl-alert": "^1.4.0",
13
+ "@openeuropa/bcl-badge": "^1.4.0",
14
+ "@openeuropa/bcl-banner": "^1.4.0",
15
+ "@openeuropa/bcl-base-templates": "^1.4.0",
16
+ "@openeuropa/bcl-blockquote": "^1.4.0",
17
+ "@openeuropa/bcl-breadcrumb": "^1.4.0",
18
+ "@openeuropa/bcl-button": "^1.4.0",
19
+ "@openeuropa/bcl-button-group": "^1.4.0",
20
+ "@openeuropa/bcl-card": "^1.4.0",
21
+ "@openeuropa/bcl-card-layout": "^1.4.0",
22
+ "@openeuropa/bcl-carousel": "^1.4.0",
23
+ "@openeuropa/bcl-contact-form": "^1.4.0",
24
+ "@openeuropa/bcl-content-banner": "^1.4.0",
25
+ "@openeuropa/bcl-date-block": "^1.4.0",
26
+ "@openeuropa/bcl-description-list": "^1.4.0",
27
+ "@openeuropa/bcl-dropdown": "^1.4.0",
28
+ "@openeuropa/bcl-event": "^1.4.0",
29
+ "@openeuropa/bcl-fact-figures": "^1.4.0",
30
+ "@openeuropa/bcl-featured-media": "^1.4.0",
31
+ "@openeuropa/bcl-file": "^1.4.0",
32
+ "@openeuropa/bcl-footer": "^1.4.0",
33
+ "@openeuropa/bcl-form": "^1.4.0",
34
+ "@openeuropa/bcl-form-input": "^1.4.0",
35
+ "@openeuropa/bcl-gallery": "^1.4.0",
36
+ "@openeuropa/bcl-glossary": "^1.4.0",
37
+ "@openeuropa/bcl-group": "^1.4.0",
38
+ "@openeuropa/bcl-header": "^1.4.0",
39
+ "@openeuropa/bcl-heading": "^1.4.0",
40
+ "@openeuropa/bcl-icon": "^1.4.0",
41
+ "@openeuropa/bcl-inpage-navigation": "^1.4.0",
42
+ "@openeuropa/bcl-landing-page": "^1.4.0",
43
+ "@openeuropa/bcl-language-list": "^1.4.0",
44
+ "@openeuropa/bcl-language-switcher": "^1.4.0",
45
+ "@openeuropa/bcl-link": "^1.4.0",
46
+ "@openeuropa/bcl-links-block": "^1.4.0",
47
+ "@openeuropa/bcl-list-group": "^1.4.0",
48
+ "@openeuropa/bcl-listing": "^1.4.0",
49
+ "@openeuropa/bcl-modal": "^1.4.0",
50
+ "@openeuropa/bcl-multilingual": "^1.4.0",
51
+ "@openeuropa/bcl-navbar": "^1.4.0",
52
+ "@openeuropa/bcl-navigation": "^1.4.0",
53
+ "@openeuropa/bcl-news": "^1.4.0",
54
+ "@openeuropa/bcl-offcanvas": "^1.4.0",
55
+ "@openeuropa/bcl-page": "^1.4.0",
56
+ "@openeuropa/bcl-pagination": "^1.4.0",
57
+ "@openeuropa/bcl-person": "^1.4.0",
58
+ "@openeuropa/bcl-placeholder": "^1.4.0",
59
+ "@openeuropa/bcl-progress": "^1.4.0",
60
+ "@openeuropa/bcl-project": "^1.4.0",
61
+ "@openeuropa/bcl-project-status": "^1.4.0",
62
+ "@openeuropa/bcl-recent-activities": "^1.4.0",
63
+ "@openeuropa/bcl-search": "^1.4.0",
64
+ "@openeuropa/bcl-search-form": "^1.4.0",
65
+ "@openeuropa/bcl-select": "^1.4.0",
66
+ "@openeuropa/bcl-spinner": "^1.4.0",
67
+ "@openeuropa/bcl-subscription": "^1.4.0",
68
+ "@openeuropa/bcl-subscription-block": "^1.4.0",
69
+ "@openeuropa/bcl-table": "^1.4.0",
70
+ "@openeuropa/bcl-textarea": "^1.4.0",
71
+ "@openeuropa/bcl-timeline": "^1.4.0",
72
+ "@openeuropa/bcl-toast": "^1.4.0",
73
+ "@openeuropa/bcl-user": "^1.4.0",
74
74
  "copyfiles": "2.4.1",
75
75
  "rimraf": "5.0.7"
76
76
  },
@@ -93,5 +93,5 @@
93
93
  "design-system",
94
94
  "twig"
95
95
  ],
96
- "gitHead": "03e3f25dcc61e449566c32a78213363e7d18afd0"
96
+ "gitHead": "0271b344c41999ea181851f229385df1d539047b"
97
97
  }
@@ -93,7 +93,7 @@
93
93
  icon: _item.icon|merge({
94
94
  path: _icon_path,
95
95
  size: 'l',
96
- attributes: _icon_attributes.addClass('mb-2'),
96
+ attributes: _icon_attributes.addClass(['mb-2', 'icon--primary']),
97
97
  })
98
98
  }) %}
99
99
  {% include '@oe-bcl/bcl-icon/icon.html.twig' with _item.icon only %}
@@ -69,18 +69,21 @@
69
69
  {% endif %}
70
70
  </div>
71
71
  <div class="col-12 col-md-3 align-self-end text-md-end">
72
- {% include '@oe-bcl/bcl-link/link.html.twig' with _item.download|merge({
72
+ {% set download_attributes = create_attribute()
73
+ .setAttribute('download', true)
74
+ .setAttribute('target', '_blank')
75
+ .addClass(['d-block', 'standalone', 'mt-1'])
76
+ %}
77
+ {% set _download_item = _item.download|merge({
73
78
  icon_position: "after",
74
79
  icon: {
75
80
  name: "download",
76
81
  size: "fluid",
77
82
  path: _icon_path,
78
- },
79
- attributes: create_attribute()
80
- .setAttribute('download', true)
81
- .setAttribute('target', '_blank')
82
- .addClass(['d-block', 'standalone', 'mt-1'])
83
- }) only %}
83
+ }|merge(_item.download.icon|default({})),
84
+ attributes: download_attributes.merge(_item.download.attributes|default(create_attribute()))
85
+ }) %}
86
+ {% include '@oe-bcl/bcl-link/link.html.twig' with _download_item only %}
84
87
  </div>
85
88
  </div>
86
89
  {% endif %}
@@ -138,17 +138,18 @@
138
138
  </small>
139
139
  {% endif %}
140
140
  </div>
141
+ {% set download_attributes = create_attribute()
142
+ .setAttribute('download', 'true')
143
+ .setAttribute('target', '_blank')
144
+ .addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0', 'flex-shrink-0']) %}
141
145
  {% set _download = _download|merge({
142
146
  icon_position: "after",
143
147
  icon: {
144
148
  name: "download",
145
149
  size: "fluid",
146
150
  path: _icon_path,
147
- },
148
- attributes: create_attribute()
149
- .setAttribute('download', true)
150
- .setAttribute('target', '_blank')
151
- .addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0', 'flex-shrink-0'])
151
+ }|merge(_download.icon|default({})),
152
+ attributes: download_attributes.merge(_download.attributes|default(create_attribute()))
152
153
  }) %}
153
154
  {% include '@oe-bcl/bcl-link/link.html.twig' with _download only %}
154
155
  </div>
@@ -35,18 +35,18 @@
35
35
 
36
36
  {% set attributes = attributes.addClass(_classes) %}
37
37
 
38
- <div
39
- {{ attributes }}
40
- >
41
- {% if _title is not empty %}
42
- {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
43
- title: _title,
44
- title_tag: _title_tag,
45
- title_link: _title_link,
46
- attributes: _title_attributes.addClass(_title_classes),
47
- } only %}
48
- {% endif %}
49
- {% if _links is not empty and _links is iterable %}
38
+ {% if _links is not empty and _links is iterable %}
39
+ <div
40
+ {{ attributes }}
41
+ >
42
+ {% if _title is not empty %}
43
+ {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
44
+ title: _title,
45
+ title_tag: _title_tag,
46
+ title_link: _title_link,
47
+ attributes: _title_attributes.addClass(_title_classes),
48
+ } only %}
49
+ {% endif %}
50
50
  <ul class="ps-0 mb-0">
51
51
  {% for _link in _links %}
52
52
  {% if _link.attributes is empty %}
@@ -70,7 +70,7 @@
70
70
  </li>
71
71
  {% endfor %}
72
72
  </ul>
73
- {% endif %}
74
- </div>
73
+ </div>
74
+ {% endif %}
75
75
 
76
76
  {% endapply %}