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