@openeuropa/bcl-twig-templates 0.25.1 → 0.26.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": "0.25.1",
5
+ "version": "0.26.0",
6
6
  "description": "OE Bcl Twig Templates",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "devDependencies": {
11
- "@openeuropa/bcl-accordion": "^0.25.1",
12
- "@openeuropa/bcl-alert": "^0.25.1",
13
- "@openeuropa/bcl-badge": "^0.25.1",
14
- "@openeuropa/bcl-banner": "^0.25.1",
15
- "@openeuropa/bcl-base-templates": "^0.25.1",
16
- "@openeuropa/bcl-blockquote": "^0.25.1",
17
- "@openeuropa/bcl-breadcrumb": "^0.25.1",
18
- "@openeuropa/bcl-button": "^0.25.1",
19
- "@openeuropa/bcl-button-group": "^0.25.1",
20
- "@openeuropa/bcl-card": "^0.25.1",
21
- "@openeuropa/bcl-card-layout": "^0.25.1",
22
- "@openeuropa/bcl-carousel": "^0.25.1",
23
- "@openeuropa/bcl-contact-form": "^0.25.1",
24
- "@openeuropa/bcl-content-banner": "^0.25.1",
25
- "@openeuropa/bcl-date-block": "^0.25.1",
26
- "@openeuropa/bcl-description-list": "^0.25.1",
27
- "@openeuropa/bcl-dropdown": "^0.25.1",
28
- "@openeuropa/bcl-event": "^0.25.1",
29
- "@openeuropa/bcl-fact-figures": "^0.25.1",
30
- "@openeuropa/bcl-featured-media": "^0.25.1",
31
- "@openeuropa/bcl-file": "^0.25.1",
32
- "@openeuropa/bcl-footer": "^0.25.1",
33
- "@openeuropa/bcl-form": "^0.25.1",
34
- "@openeuropa/bcl-form-input": "^0.25.1",
35
- "@openeuropa/bcl-gallery": "^0.25.1",
36
- "@openeuropa/bcl-glossary": "^0.25.1",
37
- "@openeuropa/bcl-group": "^0.25.1",
38
- "@openeuropa/bcl-header": "^0.25.1",
39
- "@openeuropa/bcl-heading": "^0.25.1",
40
- "@openeuropa/bcl-icon": "^0.25.1",
41
- "@openeuropa/bcl-inpage-navigation": "^0.25.1",
42
- "@openeuropa/bcl-landing-page": "^0.25.1",
43
- "@openeuropa/bcl-language-list": "^0.25.1",
44
- "@openeuropa/bcl-language-switcher": "^0.25.1",
45
- "@openeuropa/bcl-link": "^0.25.1",
46
- "@openeuropa/bcl-links-block": "^0.25.1",
47
- "@openeuropa/bcl-list-group": "^0.25.1",
48
- "@openeuropa/bcl-listing": "^0.25.1",
49
- "@openeuropa/bcl-modal": "^0.25.1",
50
- "@openeuropa/bcl-multilingual": "^0.25.1",
51
- "@openeuropa/bcl-navbar": "^0.25.1",
52
- "@openeuropa/bcl-navigation": "^0.25.1",
53
- "@openeuropa/bcl-news": "^0.25.1",
54
- "@openeuropa/bcl-offcanvas": "^0.25.1",
55
- "@openeuropa/bcl-page": "^0.25.1",
56
- "@openeuropa/bcl-pagination": "^0.25.1",
57
- "@openeuropa/bcl-person": "^0.25.1",
58
- "@openeuropa/bcl-placeholder": "^0.25.1",
59
- "@openeuropa/bcl-progress": "^0.25.1",
60
- "@openeuropa/bcl-project": "^0.25.1",
61
- "@openeuropa/bcl-project-status": "^0.25.1",
62
- "@openeuropa/bcl-recent-activities": "^0.25.1",
63
- "@openeuropa/bcl-search": "^0.25.1",
64
- "@openeuropa/bcl-search-form": "^0.25.1",
65
- "@openeuropa/bcl-select": "^0.25.1",
66
- "@openeuropa/bcl-spinner": "^0.25.1",
67
- "@openeuropa/bcl-subscription": "^0.25.1",
68
- "@openeuropa/bcl-subscription-block": "^0.25.1",
69
- "@openeuropa/bcl-table": "^0.25.1",
70
- "@openeuropa/bcl-textarea": "^0.25.1",
71
- "@openeuropa/bcl-timeline": "^0.25.1",
72
- "@openeuropa/bcl-toast": "^0.25.1",
73
- "@openeuropa/bcl-user": "^0.25.1",
11
+ "@openeuropa/bcl-accordion": "^0.26.0",
12
+ "@openeuropa/bcl-alert": "^0.26.0",
13
+ "@openeuropa/bcl-badge": "^0.26.0",
14
+ "@openeuropa/bcl-banner": "^0.26.0",
15
+ "@openeuropa/bcl-base-templates": "^0.26.0",
16
+ "@openeuropa/bcl-blockquote": "^0.26.0",
17
+ "@openeuropa/bcl-breadcrumb": "^0.26.0",
18
+ "@openeuropa/bcl-button": "^0.26.0",
19
+ "@openeuropa/bcl-button-group": "^0.26.0",
20
+ "@openeuropa/bcl-card": "^0.26.0",
21
+ "@openeuropa/bcl-card-layout": "^0.26.0",
22
+ "@openeuropa/bcl-carousel": "^0.26.0",
23
+ "@openeuropa/bcl-contact-form": "^0.26.0",
24
+ "@openeuropa/bcl-content-banner": "^0.26.0",
25
+ "@openeuropa/bcl-date-block": "^0.26.0",
26
+ "@openeuropa/bcl-description-list": "^0.26.0",
27
+ "@openeuropa/bcl-dropdown": "^0.26.0",
28
+ "@openeuropa/bcl-event": "^0.26.0",
29
+ "@openeuropa/bcl-fact-figures": "^0.26.0",
30
+ "@openeuropa/bcl-featured-media": "^0.26.0",
31
+ "@openeuropa/bcl-file": "^0.26.0",
32
+ "@openeuropa/bcl-footer": "^0.26.0",
33
+ "@openeuropa/bcl-form": "^0.26.0",
34
+ "@openeuropa/bcl-form-input": "^0.26.0",
35
+ "@openeuropa/bcl-gallery": "^0.26.0",
36
+ "@openeuropa/bcl-glossary": "^0.26.0",
37
+ "@openeuropa/bcl-group": "^0.26.0",
38
+ "@openeuropa/bcl-header": "^0.26.0",
39
+ "@openeuropa/bcl-heading": "^0.26.0",
40
+ "@openeuropa/bcl-icon": "^0.26.0",
41
+ "@openeuropa/bcl-inpage-navigation": "^0.26.0",
42
+ "@openeuropa/bcl-landing-page": "^0.26.0",
43
+ "@openeuropa/bcl-language-list": "^0.26.0",
44
+ "@openeuropa/bcl-language-switcher": "^0.26.0",
45
+ "@openeuropa/bcl-link": "^0.26.0",
46
+ "@openeuropa/bcl-links-block": "^0.26.0",
47
+ "@openeuropa/bcl-list-group": "^0.26.0",
48
+ "@openeuropa/bcl-listing": "^0.26.0",
49
+ "@openeuropa/bcl-modal": "^0.26.0",
50
+ "@openeuropa/bcl-multilingual": "^0.26.0",
51
+ "@openeuropa/bcl-navbar": "^0.26.0",
52
+ "@openeuropa/bcl-navigation": "^0.26.0",
53
+ "@openeuropa/bcl-news": "^0.26.0",
54
+ "@openeuropa/bcl-offcanvas": "^0.26.0",
55
+ "@openeuropa/bcl-page": "^0.26.0",
56
+ "@openeuropa/bcl-pagination": "^0.26.0",
57
+ "@openeuropa/bcl-person": "^0.26.0",
58
+ "@openeuropa/bcl-placeholder": "^0.26.0",
59
+ "@openeuropa/bcl-progress": "^0.26.0",
60
+ "@openeuropa/bcl-project": "^0.26.0",
61
+ "@openeuropa/bcl-project-status": "^0.26.0",
62
+ "@openeuropa/bcl-recent-activities": "^0.26.0",
63
+ "@openeuropa/bcl-search": "^0.26.0",
64
+ "@openeuropa/bcl-search-form": "^0.26.0",
65
+ "@openeuropa/bcl-select": "^0.26.0",
66
+ "@openeuropa/bcl-spinner": "^0.26.0",
67
+ "@openeuropa/bcl-subscription": "^0.26.0",
68
+ "@openeuropa/bcl-subscription-block": "^0.26.0",
69
+ "@openeuropa/bcl-table": "^0.26.0",
70
+ "@openeuropa/bcl-textarea": "^0.26.0",
71
+ "@openeuropa/bcl-timeline": "^0.26.0",
72
+ "@openeuropa/bcl-toast": "^0.26.0",
73
+ "@openeuropa/bcl-user": "^0.26.0",
74
74
  "copyfiles": "2.4.1",
75
75
  "rimraf": "3.0.2"
76
76
  },
@@ -93,5 +93,5 @@
93
93
  "design-system",
94
94
  "twig"
95
95
  ],
96
- "gitHead": "01db3de0765fee0f44e4f202f3ea7d0f2e28f742"
96
+ "gitHead": "94d89cc379780cfce06178959194b3bc1b4c5eda"
97
97
  }
@@ -1,7 +1,20 @@
1
1
  {% extends "@oe-bcl/bcl-offcanvas/offcanvas.html.twig" %}
2
2
 
3
+ {% set responsiveness = 'lg' %}
4
+ {% if extra_classes_header is empty %}
5
+ {% set extra_classes_header = 'd-lg-block' %}
6
+ {% else %}
7
+ {% set extra_classes_header = extra_classes_header ~ ' d-lg-block' %}
8
+ {% endif %}
9
+
3
10
  {% block body %}
11
+ {% if search_form.attributes is empty %}
12
+ {% set attributes = search_form.create_attribute() %}
13
+ {% endif %}
14
+
4
15
  <div class="offcanvas-body p-lg-0">
5
- {% include '@oe-bcl/bcl-form/form.html.twig' with search_form only %}
16
+ {% include '@oe-bcl/bcl-form/form.html.twig' with search_form|merge({
17
+ attributes: search_form.attributes.addClass('w-100')
18
+ }) only %}
6
19
  </div>
7
20
  {% endblock %}
@@ -6,7 +6,6 @@
6
6
  - title_link: (link object) (default: {})
7
7
  - title_attributes: (drupal attrs)
8
8
  - autoplay (boolean) (default: true)
9
- - autoinit (boolean) (default: true)
10
9
  - dark (boolean) (default: false)
11
10
  - active_item (integer) (default: 1)
12
11
  - items (array of objects) format: [
@@ -33,7 +32,6 @@
33
32
  {% set _title_link = title_link|default({}) %}
34
33
  {% set _title_attributes = title_attributes ?: create_attribute() %}
35
34
  {% set _id = id|default('') %}
36
- {% set _autoinit = autoinit ?? true %}
37
35
  {% set _autoplay = autoplay ?? true %}
38
36
  {% set _dark = dark|default(false) %}
39
37
  {% set _active_item = active_item|default(1) %}
@@ -63,7 +61,7 @@
63
61
  {% set attributes = attributes.setAttribute('id', _id) %}
64
62
  {% endif %}
65
63
 
66
- {% if _autoinit %}
64
+ {% if _autoplay %}
67
65
  {% set attributes = attributes.setAttribute('data-bs-ride', 'carousel') %}
68
66
  {% endif %}
69
67
 
@@ -75,10 +73,6 @@
75
73
  {% set attributes = attributes.addClass('rounded-indicators') %}
76
74
  {% endif %}
77
75
 
78
- {% if not _autoplay %}
79
- {% set attributes = attributes.setAttribute('data-bs-interval', 'false') %}
80
- {% endif %}
81
-
82
76
  {% set attributes = attributes.addClass(_classes) %}
83
77
 
84
78
  {%- if _title is not empty -%}
@@ -140,7 +134,7 @@
140
134
  <div class="{{ _item.caption_classes }}">
141
135
  {% endif %}
142
136
  {% if _item.caption_title is not empty %}
143
- <h5>{{ _item.caption_title }}</h5>
137
+ <p class="fs-5">{{ _item.caption_title }}</p>
144
138
  {% endif %}
145
139
  {{- _item.caption -}}
146
140
  {% if _item.caption_classes is defined and _item.caption_classes is not empty %}
@@ -2,7 +2,6 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
- - "variant" (string) (default: '')
6
5
  - "day" (integer) (default: '')
7
6
  - "month" (string) (default: '')
8
7
  - "date_time" (string) (default: '')
@@ -19,7 +18,6 @@
19
18
  {% set _end_day = end_day|default('') %}
20
19
  {% set _end_month = end_month|default('') %}
21
20
  {% set _end_year = end_year|default('') %}
22
- {% set _variant = variant|default('') %}
23
21
  {% set _css_classes = [
24
22
  'bcl-date-block',
25
23
  'bg-date',
@@ -67,6 +67,15 @@
67
67
 
68
68
  {% set attributes = attributes.addClass(["rounded", "overflow-hidden"]) %}
69
69
 
70
+ {% if _image is not empty %}
71
+ {% set attributes = attributes.addClass(["d-inline-flex", "flex-wrap"]) %}
72
+ {% if _content_classes is not empty %}
73
+ {% set _content_classes = _content_classes ~ ' flex-1 w-min-content' %}
74
+ {% else %}
75
+ {% set _content_classes = 'flex-1 w-min-content' %}
76
+ {% endif %}
77
+ {% endif %}
78
+
70
79
  {% if _with_text %}
71
80
  <div class="{{ _wrapper_classes }}">
72
81
  <div class="row">
@@ -39,7 +39,7 @@
39
39
  {# Internal properties #}
40
40
 
41
41
  {% set _icon = icon|default({}) %}
42
- {% set _icon_inline = icon_inline|default(true) %}
42
+ {% set _icon_inline = icon_inline ?? true %}
43
43
  {% set _title = title|default('') %}
44
44
  {% set _title_tag = title_tag|default('h2') %}
45
45
  {% set _title_link = title_link|default({}) %}
@@ -102,7 +102,7 @@ Parameters:
102
102
  {% if _item.caption is not empty or item.caption_title is not empty %}
103
103
  <div class="bcl-gallery__item-caption">
104
104
  {% if _item.caption_title is not empty %}
105
- <h5>{{ _item.caption_title }}</h5>
105
+ <p class="fs-5">{{ _item.caption_title }}</p>
106
106
  {% endif %}
107
107
  {% if _item.caption is not empty %}
108
108
  <div class="bcl-gallery__item-description">
@@ -30,12 +30,18 @@
30
30
 
31
31
  <div class="collapse mt-3" id="{{ _id }}">
32
32
  <div
33
- class="d-md-grid"
34
- style="grid-auto-flow: column; grid-template-rows: repeat(4, 1fr)"
33
+ class="d-grid"
34
+ style="grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(4rem, 8rem))"
35
35
  >
36
36
  {% for language in languages %}
37
37
  {% include '@oe-bcl/bcl-link/link.html.twig' with language|merge({
38
- attributes: create_attribute().addClass(["btn", "btn-link", "d-block", "ps-0", "text-start"])
38
+ attributes: create_attribute().addClass(
39
+ [ "btn",
40
+ "btn-link",
41
+ "d-block",
42
+ "ps-0",
43
+ "text-start"
44
+ ])
39
45
  }) only %}
40
46
  {% endfor %}
41
47
  </div>
@@ -78,17 +78,17 @@
78
78
 
79
79
  {% if not _disable_collapse %}
80
80
  <button
81
- class='navbar-toggler'
82
- type='button'
83
- data-bs-toggle='collapse'
81
+ class="navbar-toggler"
82
+ type="button"
83
+ data-bs-toggle="collapse"
84
84
  data-bs-target='#{{ _collapse_id }}'
85
85
  aria-controls='{{ _collapse_id }}'
86
- aria-expanded='false'
87
- aria-label='Toggle navigation'
86
+ aria-expanded="false"
87
+ aria-label="Toggle navigation"
88
88
  >
89
- <span class='navbar-toggler-icon'></span>
89
+ <span class="navbar-toggler-icon"></span>
90
90
  </button>
91
- <div class='collapse navbar-collapse' id='{{ _collapse_id }}'>
91
+ <div class="collapse navbar-collapse" id='{{ _collapse_id }}'>
92
92
  {% endif %}
93
93
  {% block navigation %}
94
94
  {% if _navigation is not empty %}
@@ -114,7 +114,7 @@
114
114
  role="tab"
115
115
  {% endif %}
116
116
  >
117
- {% elseif _tabs %}
117
+ {% elseif _tabs and _item.dropdown is not defined %}
118
118
  {% set _item = _item|merge({
119
119
  attributes: _item.attributes.setAttribute("role", "tab"),
120
120
  })
@@ -11,9 +11,12 @@
11
11
  - with_body_scroll (boolean) (default: false)
12
12
  - with_backdrop (boolean) (default: true)
13
13
  - with_close (boolean) (default: true)
14
+ - close_aria_label (default: '')
14
15
  - extra_classes_body (string) (default: '')
15
16
  - extra_classes_header (string) (default: '')
16
17
  - extra_classes_close (string) (default: '')
18
+ - responsiveness (string) (default: '')
19
+ options: ['sm', 'md', 'lg', 'xl', 'xxl']
17
20
  - attributes (drupal attrs)
18
21
  #}
19
22
 
@@ -25,13 +28,20 @@
25
28
  {% set _id = id|default('') %}
26
29
  {% set _body = body|default('') %}
27
30
  {% set _with_body_scroll = with_body_scroll|default(false) %}
28
- {% set _with_backdrop = with_backdrop|default(true) %}
29
- {% set _with_close = with_close|default(true) %}
31
+ {% set _with_backdrop = with_backdrop ?? true %}
32
+ {% set _with_close = with_close ?? true %}
33
+ {% set _close_aria_label = close_aria_label|default('') %}
30
34
  {% set _extra_classes_body = extra_classes_body|default('') %}
31
35
  {% set _extra_classes_header = extra_classes_header|default('') %}
32
36
  {% set _extra_classes_close = extra_classes_close|default('') %}
37
+ {% set _responsiveness = responsiveness|default('') %}
38
+
39
+ {% if _responsiveness is not empty %}
40
+ {% set _classes = ['offcanvas-' ~ _responsiveness] %}
41
+ {% else %}
42
+ {% set _classes = ['offcanvas'] %}
43
+ {% endif %}
33
44
 
34
- {% set _classes = ['offcanvas'] %}
35
45
  {% set _class_body = 'offcanvas-body' ~ (_extra_classes_body ? ' ' ~ _extra_classes_body : '') %}
36
46
  {% set _class_header = 'offcanvas-header' ~ (_extra_classes_header ? ' ' ~ _extra_classes_header : '') %}
37
47
 
@@ -82,6 +92,7 @@
82
92
  {% set button_attributes = create_attribute()
83
93
  .addClass(['btn-close', 'text-reset'])
84
94
  .setAttribute('data-bs-dismiss', 'offcanvas')
95
+ .setAttribute('aria-label', _close_aria_label)
85
96
  %}
86
97
  {% if _extra_classes_close is not empty %}
87
98
  {% set button_attributes = button_attributes.addClass(_extra_classes_close) %}
@@ -57,7 +57,7 @@
57
57
  {% set _alignment = alignment|default('') %}
58
58
  {% set _aria_label = aria_label|default('') %}
59
59
  {% set _enable_prev_next_icon = enable_prev_next_icon|default(false) %}
60
- {% set _enable_first_last_icon = enable_first_last_icon|default(true) %}
60
+ {% set _enable_first_last_icon = enable_first_last_icon ?? true %}
61
61
  {% set _items = items|default([]) %}
62
62
  {% set _first = first|default({}) %}
63
63
  {% set _next = next|default({}) %}
@@ -18,14 +18,12 @@
18
18
 
19
19
  {% if files.main_title is not empty %}
20
20
  <h2
21
- class="mb-4"
21
+ class="mb-3-5"
22
22
  >{{- files.main_title -}}</h2>
23
23
  {% endif %}
24
24
  {% if files.listing is defined and files.listing is not empty %}
25
- <div class="mb-4-5">
26
25
  {% for file in files.listing %}
27
26
  {% include '@oe-bcl/bcl-file/file.html.twig' with file only %}
28
27
  {% endfor %}
29
- </div>
30
28
  {% endif %}
31
29
  {% endblock %}
@@ -33,10 +33,7 @@
33
33
  {% set _classes = _classes ~ ' progress-bar-animated' %}
34
34
  {% endif %}
35
35
  {% if _variant is not empty %}
36
- {% set _classes = _classes ~ ' bg-' ~ _variant %}
37
- {% endif %}
38
- {% if _variant == 'light' %}
39
- {% set _classes = _classes ~ ' text-dark' %}
36
+ {% set _classes = _classes ~ ' text-bg-' ~ _variant %}
40
37
  {% endif %}
41
38
 
42
39
  {% if attributes is empty %}