@openeuropa/bcl-file 0.4230.202512021730 → 0.4360.202601141610

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.
@@ -13,21 +13,21 @@
13
13
  ]
14
14
  #}
15
15
 
16
- {% set _id = id|default('language-dropdown' ~ random(10000)) %}
16
+ {%- set _id = id|default('language-dropdown' ~ random(10000)) %}
17
17
  {% set _label = label|default('') %}
18
18
  {% set _icon_path = icon_path|default('') %}
19
19
  {% set _items = items|default([]) %}
20
20
 
21
- {% if attributes is empty %}
22
- {% set attributes = create_attribute() %}
21
+ {%- if attributes is empty %}
22
+ {%- set attributes = create_attribute() %}
23
23
  {% endif %}
24
24
 
25
- {% set attributes = attributes.addClass(['bg-lighter', 'py-3', 'px-4', 'border-top']) %}
25
+ {%- set attributes = attributes.addClass(['bg-lighter', 'py-3', 'px-4', 'border-top']) -%}
26
26
 
27
27
  <div
28
- {{ attributes }}>
28
+ {{ attributes }}>{# -#}
29
29
  <div class="text-end text-md-center">
30
- {% include '@oe-bcl/bcl-link/link.html.twig' with _label|merge({
30
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _label|merge({
31
31
  path: '#' ~ _id,
32
32
  attributes: create_attribute()
33
33
  .addClass(['standalone'])
@@ -35,25 +35,25 @@
35
35
  .setAttribute('data-bs-toggle', 'collapse')
36
36
  .setAttribute('aria-expanded', 'false')
37
37
  .setAttribute('role', 'button'),
38
- }) only %}
38
+ }) only -%}
39
39
  </div>
40
- {% if _items is not empty and _items is iterable %}
40
+ {%- if _items is not empty and _items is iterable -%}
41
41
  <div class="collapse" id="{{ _id }}">
42
- {% for _item in _items %}
43
- {% set _item_classes = loop.last ? 'pt-3' : 'py-3 border-bottom' %}
42
+ {%- for _item in _items %}
43
+ {%- set _item_classes = loop.last ? 'pt-3' : 'py-3 border-bottom' -%}
44
44
  <div class="{{ _item_classes }}">
45
- {% if _item.type == 'content' %}
46
- {{ _item.content }}
47
- {% else %}
48
- <div class="row">
45
+ {%- if _item.type == 'content' %}
46
+ {{- _item.content }}
47
+ {%- else -%}
48
+ <div class="row">{# -#}
49
49
  <div class="col-12 col-md-9">
50
- {% if _item.title is not empty %}
50
+ {%- if _item.title is not empty -%}
51
51
  <p class="fw-bold m-0">{{ _item.title }}</p>
52
- {% endif %}
53
- {% if _item.description is not empty %}
52
+ {%- endif %}
53
+ {%- if _item.description is not empty -%}
54
54
  <p class="m-0">{{ _item.description }}</p>
55
- {% endif %}
56
- {% if _item.language is not empty or _item.meta is not empty %}
55
+ {%- endif %}
56
+ {%- if _item.language is not empty or _item.meta is not empty -%}
57
57
  <small class="fw-bold m-0">
58
58
  {%- if _item.language is not empty -%}
59
59
  {{- _item.language -}}
@@ -64,15 +64,15 @@
64
64
  </span>
65
65
  {%- endif -%}
66
66
  </small>
67
- {% endif %}
68
- </div>
67
+ {%- endif -%}
68
+ </div>{# -#}
69
69
  <div class="col-12 col-md-3 align-self-end text-md-end">
70
- {% set download_attributes = create_attribute()
70
+ {%- set download_attributes = create_attribute()
71
71
  .setAttribute('download', true)
72
72
  .setAttribute('target', '_blank')
73
73
  .addClass(['d-block', 'standalone', 'mt-1'])
74
74
  %}
75
- {% set _download_item = _item.download|merge({
75
+ {%- set _download_item = _item.download|merge({
76
76
  icon_position: "after",
77
77
  icon: {
78
78
  name: "download",
@@ -81,13 +81,13 @@
81
81
  }|merge(_item.download.icon|default({})),
82
82
  attributes: download_attributes.merge(_item.download.attributes|default(create_attribute()))
83
83
  }) %}
84
- {% include '@oe-bcl/bcl-link/link.html.twig' with _download_item only %}
85
- </div>
84
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _download_item only -%}
85
+ </div>{# -#}
86
86
  </div>
87
- {% endif %}
87
+ {%- endif -%}
88
88
  </div>
89
- {% endfor %}
89
+ {%- endfor -%}
90
90
  </div>
91
- {% endif %}
91
+ {%- endif -%}
92
92
  </div>
93
-
93
+ {#--#}
package/file.html.twig CHANGED
@@ -34,9 +34,9 @@
34
34
  - attributes (drupal attrs)
35
35
  #}
36
36
 
37
- {# Internal properties #}
37
+ {#- Internal properties #}
38
38
 
39
- {% set _title = title|default('') %}
39
+ {%- set _title = title|default('') %}
40
40
  {% set _title_tag = title_tag|default('h2') %}
41
41
  {% set _title_link = title_link|default({}) %}
42
42
  {% set _title_attributes = title_attributes ?: create_attribute() %}
@@ -54,23 +54,23 @@
54
54
  {% set _translation = translation|default({}) %}
55
55
  {% set _icon_path = icon_path|default('') %}
56
56
 
57
- {% set _classes = ['bcl-file'] %}
57
+ {%- set _classes = ['bcl-file'] %}
58
58
 
59
- {% if attributes is empty %}
60
- {% set attributes = create_attribute() %}
59
+ {%- if attributes is empty %}
60
+ {%- set attributes = create_attribute() %}
61
61
  {% endif %}
62
62
 
63
- {% set attributes = attributes.addClass(_classes) %}
63
+ {%- set attributes = attributes.addClass(_classes) %}
64
64
 
65
- {% if _icon is not empty %}
66
- {% set _container_classes = _container_classes ~ ' ms-2-5' %}
67
- {% set _icon = _icon|merge({
65
+ {%- if _icon is not empty %}
66
+ {%- set _container_classes = _container_classes ~ ' ms-2-5' %}
67
+ {%- set _icon = _icon|merge({
68
68
  attributes: create_attribute().addClass(['mt-1', 'icon--file'])
69
69
  }) %}
70
70
  {% endif %}
71
71
 
72
- {% if _title is not empty %}
73
- {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
72
+ {%- if _title is not empty %}
73
+ {%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
74
74
  title: _title,
75
75
  title_tag: _title_tag,
76
76
  title_link: _title_link,
@@ -78,52 +78,52 @@
78
78
  } only %}
79
79
  {% endif %}
80
80
 
81
- {% set attributes = attributes.addClass(['border', 'rounded']) %}
81
+ {%- set attributes = attributes.addClass(['border', 'rounded']) %}
82
82
 
83
- {% set _container_classes = 'd-md-flex flex-grow-1' %}
83
+ {%- set _container_classes = 'd-md-flex flex-grow-1' -%}
84
84
 
85
85
  <div
86
86
  {{ attributes }}
87
87
  >
88
- {% if _variant == 'card' %}
89
- <div class="border-bottom px-3-5 py-3 d-md-flex">
88
+ {%- if _variant == 'card' -%}
89
+ <div class="border-bottom px-3-5 py-3 d-md-flex">{# -#}
90
90
  <div class="pe-2 pb-2">
91
- {% if _icon is not empty %}
91
+ {%- if _icon is not empty %}
92
92
  {%- include '@oe-bcl/bcl-icon/icon.html.twig' with _icon|merge({
93
93
  path: _icon_path,
94
94
  }) only -%}
95
- {% endif %}
96
- </div>
95
+ {% endif -%}
96
+ </div>{# -#}
97
97
  <div>
98
- {% if _item_title is not empty %}
98
+ {%- if _item_title is not empty -%}
99
99
  <p class="fw-medium mb-2 fs-5">{{ _item_title }}</p>
100
- {% endif %}
101
- {% if _text is not empty %}
100
+ {%- endif %}
101
+ {%- if _text is not empty -%}
102
102
  <p class="mb-3">{{ _text }}</p>
103
- {% endif %}
104
- {% if _content is not empty %}
105
- {{ _content }}
106
- {% endif %}
107
- </div>
103
+ {%- endif %}
104
+ {%- if _content is not empty %}
105
+ {{- _content }}
106
+ {%- endif -%}
107
+ </div>{# -#}
108
108
  </div>
109
- {% endif %}
110
- <div class="px-3-5 py-3">
109
+ {%- endif -%}
110
+ <div class="px-3-5 py-3">{# -#}
111
111
  <div class="d-md-flex">
112
- {% if _icon is not empty and _variant == 'default' %}
112
+ {%- if _icon is not empty and _variant == 'default' -%}
113
113
  <div class="pe-2 pb-2">
114
- {% if _icon is not empty %}
114
+ {%- if _icon is not empty %}
115
115
  {%- include '@oe-bcl/bcl-icon/icon.html.twig' with _icon|merge({
116
116
  path: _icon_path,
117
117
  }) only -%}
118
- {% endif %}
118
+ {% endif -%}
119
119
  </div>
120
- {% endif %}
121
- <div class="{{ _container_classes }}">
120
+ {%- endif -%}
121
+ <div class="{{ _container_classes }}">{# -#}
122
122
  <div class="flex-grow-1">
123
- {% if _item_title is not empty and _variant == 'default' %}
123
+ {%- if _item_title is not empty and _variant == 'default' -%}
124
124
  <p class="fw-medium m-0 fs-5">{{ _item_title }}</p>
125
- {% endif %}
126
- {% if _language is not empty or _meta is not empty %}
125
+ {%- endif %}
126
+ {%- if _language is not empty or _meta is not empty -%}
127
127
  <small class="fw-medium m-0">
128
128
  {%- if _language is not empty -%}
129
129
  {{- _language -}}
@@ -134,13 +134,13 @@
134
134
  </span>
135
135
  {%- endif -%}
136
136
  </small>
137
- {% endif %}
137
+ {%- endif -%}
138
138
  </div>
139
- {% set download_attributes = create_attribute()
139
+ {%- set download_attributes = create_attribute()
140
140
  .setAttribute('download', true)
141
141
  .setAttribute('target', '_blank')
142
142
  .addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0', 'flex-shrink-0']) %}
143
- {% set _download = _download|merge({
143
+ {%- set _download = _download|merge({
144
144
  icon_position: "after",
145
145
  icon: {
146
146
  name: "download",
@@ -149,14 +149,14 @@
149
149
  }|merge(_download.icon|default({})),
150
150
  attributes: download_attributes.merge(_download.attributes|default(create_attribute()))
151
151
  }) %}
152
- {% include '@oe-bcl/bcl-link/link.html.twig' with _download only %}
153
- </div>
154
- </div>
152
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _download only -%}
153
+ </div>{# -#}
154
+ </div>{# -#}
155
155
  </div>
156
- {% if _translation is not empty %}
157
- {% include '@oe-bcl/bcl-file/file-translations.html.twig' with _translation|merge({
156
+ {%- if _translation is not empty %}
157
+ {%- include '@oe-bcl/bcl-file/file-translations.html.twig' with _translation|merge({
158
158
  icon_path: _icon_path
159
159
  }) only %}
160
- {% endif %}
160
+ {%- endif -%}
161
161
  </div>
162
-
162
+ {#--#}
package/package.json CHANGED
@@ -2,15 +2,15 @@
2
2
  "name": "@openeuropa/bcl-file",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.4230.202512021730",
5
+ "version": "0.4360.202601141610",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL file",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-heading": "^0.4230.202512021730",
12
- "@openeuropa/bcl-icon": "^0.4230.202512021730",
13
- "@openeuropa/bcl-link": "^0.4230.202512021730"
11
+ "@openeuropa/bcl-heading": "^0.4360.202601141610",
12
+ "@openeuropa/bcl-icon": "^0.4360.202601141610",
13
+ "@openeuropa/bcl-link": "^0.4360.202601141610"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
@@ -26,5 +26,5 @@
26
26
  "design-system",
27
27
  "twig"
28
28
  ],
29
- "gitHead": "19735e328b2b53ccefbcc6829e2aaf149a2c438c"
29
+ "gitHead": "2caf9255f88587416f6e83e572a1f20e4cf206f5"
30
30
  }