@openeuropa/bcl-twig-templates 0.3752.202504231630 → 0.3791.202505201300

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,7 +2,7 @@
2
2
  "name": "@openeuropa/bcl-twig-templates",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.3752.202504231630",
5
+ "version": "0.3791.202505201300",
6
6
  "description": "OE Bcl Twig Templates",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -11,69 +11,69 @@
11
11
  "hoistingLimits": "workspaces"
12
12
  },
13
13
  "devDependencies": {
14
- "@openeuropa/bcl-accordion": "^0.3752.202504231630",
15
- "@openeuropa/bcl-alert": "^0.3752.202504231630",
16
- "@openeuropa/bcl-badge": "^0.3752.202504231630",
17
- "@openeuropa/bcl-banner": "^0.3752.202504231630",
18
- "@openeuropa/bcl-base-templates": "^0.3752.202504231630",
19
- "@openeuropa/bcl-blockquote": "^0.3752.202504231630",
20
- "@openeuropa/bcl-breadcrumb": "^0.3752.202504231630",
21
- "@openeuropa/bcl-button": "^0.3752.202504231630",
22
- "@openeuropa/bcl-button-group": "^0.3752.202504231630",
23
- "@openeuropa/bcl-card": "^0.3752.202504231630",
24
- "@openeuropa/bcl-card-layout": "^0.3752.202504231630",
25
- "@openeuropa/bcl-carousel": "^0.3752.202504231630",
26
- "@openeuropa/bcl-contact-form": "^0.3752.202504231630",
27
- "@openeuropa/bcl-content-banner": "^0.3752.202504231630",
28
- "@openeuropa/bcl-date-block": "^0.3752.202504231630",
29
- "@openeuropa/bcl-description-list": "^0.3752.202504231630",
30
- "@openeuropa/bcl-dropdown": "^0.3752.202504231630",
31
- "@openeuropa/bcl-event": "^0.3752.202504231630",
32
- "@openeuropa/bcl-fact-figures": "^0.3752.202504231630",
33
- "@openeuropa/bcl-featured-media": "^0.3752.202504231630",
34
- "@openeuropa/bcl-file": "^0.3752.202504231630",
35
- "@openeuropa/bcl-footer": "^0.3752.202504231630",
36
- "@openeuropa/bcl-form": "^0.3752.202504231630",
37
- "@openeuropa/bcl-form-input": "^0.3752.202504231630",
38
- "@openeuropa/bcl-gallery": "^0.3752.202504231630",
39
- "@openeuropa/bcl-glossary": "^0.3752.202504231630",
40
- "@openeuropa/bcl-group": "^0.3752.202504231630",
41
- "@openeuropa/bcl-header": "^0.3752.202504231630",
42
- "@openeuropa/bcl-heading": "^0.3752.202504231630",
43
- "@openeuropa/bcl-icon": "^0.3752.202504231630",
44
- "@openeuropa/bcl-inpage-navigation": "^0.3752.202504231630",
45
- "@openeuropa/bcl-landing-page": "^0.3752.202504231630",
46
- "@openeuropa/bcl-language-list": "^0.3752.202504231630",
47
- "@openeuropa/bcl-language-switcher": "^0.3752.202504231630",
48
- "@openeuropa/bcl-link": "^0.3752.202504231630",
49
- "@openeuropa/bcl-links-block": "^0.3752.202504231630",
50
- "@openeuropa/bcl-list-group": "^0.3752.202504231630",
51
- "@openeuropa/bcl-listing": "^0.3752.202504231630",
52
- "@openeuropa/bcl-modal": "^0.3752.202504231630",
53
- "@openeuropa/bcl-multilingual": "^0.3752.202504231630",
54
- "@openeuropa/bcl-navbar": "^0.3752.202504231630",
55
- "@openeuropa/bcl-navigation": "^0.3752.202504231630",
56
- "@openeuropa/bcl-news": "^0.3752.202504231630",
57
- "@openeuropa/bcl-offcanvas": "^0.3752.202504231630",
58
- "@openeuropa/bcl-page": "^0.3752.202504231630",
59
- "@openeuropa/bcl-pagination": "^0.3752.202504231630",
60
- "@openeuropa/bcl-person": "^0.3752.202504231630",
61
- "@openeuropa/bcl-placeholder": "^0.3752.202504231630",
62
- "@openeuropa/bcl-progress": "^0.3752.202504231630",
63
- "@openeuropa/bcl-project": "^0.3752.202504231630",
64
- "@openeuropa/bcl-project-status": "^0.3752.202504231630",
65
- "@openeuropa/bcl-recent-activities": "^0.3752.202504231630",
66
- "@openeuropa/bcl-search": "^0.3752.202504231630",
67
- "@openeuropa/bcl-search-form": "^0.3752.202504231630",
68
- "@openeuropa/bcl-select": "^0.3752.202504231630",
69
- "@openeuropa/bcl-spinner": "^0.3752.202504231630",
70
- "@openeuropa/bcl-subscription": "^0.3752.202504231630",
71
- "@openeuropa/bcl-subscription-block": "^0.3752.202504231630",
72
- "@openeuropa/bcl-table": "^0.3752.202504231630",
73
- "@openeuropa/bcl-textarea": "^0.3752.202504231630",
74
- "@openeuropa/bcl-timeline": "^0.3752.202504231630",
75
- "@openeuropa/bcl-toast": "^0.3752.202504231630",
76
- "@openeuropa/bcl-user": "^0.3752.202504231630",
14
+ "@openeuropa/bcl-accordion": "^0.3791.202505201300",
15
+ "@openeuropa/bcl-alert": "^0.3791.202505201300",
16
+ "@openeuropa/bcl-badge": "^0.3791.202505201300",
17
+ "@openeuropa/bcl-banner": "^0.3791.202505201300",
18
+ "@openeuropa/bcl-base-templates": "^0.3791.202505201300",
19
+ "@openeuropa/bcl-blockquote": "^0.3791.202505201300",
20
+ "@openeuropa/bcl-breadcrumb": "^0.3791.202505201300",
21
+ "@openeuropa/bcl-button": "^0.3791.202505201300",
22
+ "@openeuropa/bcl-button-group": "^0.3791.202505201300",
23
+ "@openeuropa/bcl-card": "^0.3791.202505201300",
24
+ "@openeuropa/bcl-card-layout": "^0.3791.202505201300",
25
+ "@openeuropa/bcl-carousel": "^0.3791.202505201300",
26
+ "@openeuropa/bcl-contact-form": "^0.3791.202505201300",
27
+ "@openeuropa/bcl-content-banner": "^0.3791.202505201300",
28
+ "@openeuropa/bcl-date-block": "^0.3791.202505201300",
29
+ "@openeuropa/bcl-description-list": "^0.3791.202505201300",
30
+ "@openeuropa/bcl-dropdown": "^0.3791.202505201300",
31
+ "@openeuropa/bcl-event": "^0.3791.202505201300",
32
+ "@openeuropa/bcl-fact-figures": "^0.3791.202505201300",
33
+ "@openeuropa/bcl-featured-media": "^0.3791.202505201300",
34
+ "@openeuropa/bcl-file": "^0.3791.202505201300",
35
+ "@openeuropa/bcl-footer": "^0.3791.202505201300",
36
+ "@openeuropa/bcl-form": "^0.3791.202505201300",
37
+ "@openeuropa/bcl-form-input": "^0.3791.202505201300",
38
+ "@openeuropa/bcl-gallery": "^0.3791.202505201300",
39
+ "@openeuropa/bcl-glossary": "^0.3791.202505201300",
40
+ "@openeuropa/bcl-group": "^0.3791.202505201300",
41
+ "@openeuropa/bcl-header": "^0.3791.202505201300",
42
+ "@openeuropa/bcl-heading": "^0.3791.202505201300",
43
+ "@openeuropa/bcl-icon": "^0.3791.202505201300",
44
+ "@openeuropa/bcl-inpage-navigation": "^0.3791.202505201300",
45
+ "@openeuropa/bcl-landing-page": "^0.3791.202505201300",
46
+ "@openeuropa/bcl-language-list": "^0.3791.202505201300",
47
+ "@openeuropa/bcl-language-switcher": "^0.3791.202505201300",
48
+ "@openeuropa/bcl-link": "^0.3791.202505201300",
49
+ "@openeuropa/bcl-links-block": "^0.3791.202505201300",
50
+ "@openeuropa/bcl-list-group": "^0.3791.202505201300",
51
+ "@openeuropa/bcl-listing": "^0.3791.202505201300",
52
+ "@openeuropa/bcl-modal": "^0.3791.202505201300",
53
+ "@openeuropa/bcl-multilingual": "^0.3791.202505201300",
54
+ "@openeuropa/bcl-navbar": "^0.3791.202505201300",
55
+ "@openeuropa/bcl-navigation": "^0.3791.202505201300",
56
+ "@openeuropa/bcl-news": "^0.3791.202505201300",
57
+ "@openeuropa/bcl-offcanvas": "^0.3791.202505201300",
58
+ "@openeuropa/bcl-page": "^0.3791.202505201300",
59
+ "@openeuropa/bcl-pagination": "^0.3791.202505201300",
60
+ "@openeuropa/bcl-person": "^0.3791.202505201300",
61
+ "@openeuropa/bcl-placeholder": "^0.3791.202505201300",
62
+ "@openeuropa/bcl-progress": "^0.3791.202505201300",
63
+ "@openeuropa/bcl-project": "^0.3791.202505201300",
64
+ "@openeuropa/bcl-project-status": "^0.3791.202505201300",
65
+ "@openeuropa/bcl-recent-activities": "^0.3791.202505201300",
66
+ "@openeuropa/bcl-search": "^0.3791.202505201300",
67
+ "@openeuropa/bcl-search-form": "^0.3791.202505201300",
68
+ "@openeuropa/bcl-select": "^0.3791.202505201300",
69
+ "@openeuropa/bcl-spinner": "^0.3791.202505201300",
70
+ "@openeuropa/bcl-subscription": "^0.3791.202505201300",
71
+ "@openeuropa/bcl-subscription-block": "^0.3791.202505201300",
72
+ "@openeuropa/bcl-table": "^0.3791.202505201300",
73
+ "@openeuropa/bcl-textarea": "^0.3791.202505201300",
74
+ "@openeuropa/bcl-timeline": "^0.3791.202505201300",
75
+ "@openeuropa/bcl-toast": "^0.3791.202505201300",
76
+ "@openeuropa/bcl-user": "^0.3791.202505201300",
77
77
  "copyfiles": "2.4.1",
78
78
  "rimraf": "6.0.1"
79
79
  },
@@ -96,5 +96,5 @@
96
96
  "design-system",
97
97
  "twig"
98
98
  ],
99
- "gitHead": "91fbd7b60f1948c0ee0f93769c31e848b859e8b5"
99
+ "gitHead": "33fc1ffa4edcfa493362e35a7079ae02c05b8b82"
100
100
  }
@@ -6,7 +6,7 @@
6
6
  - title_tag (string) (default: 'h2')
7
7
  - title_link: (link object) (default: {})
8
8
  - title_attributes: (drupal attrs)
9
- - id (int) (default: random(1000))
9
+ - id (int) (default: random(10000))
10
10
  - flush (boolean) (default: false)
11
11
  - items (array) (default: []): format: [
12
12
  {
@@ -26,7 +26,7 @@
26
26
  {% set _title_tag = title_tag|default('h2') %}
27
27
  {% set _title_link = title_link|default({}) %}
28
28
  {% set _title_attributes = title_attributes ?: create_attribute() %}
29
- {% set _id = id|default(random(1000)) %}
29
+ {% set _id = id|default(random(10000)) %}
30
30
  {% set _flush = flush ?? false %}
31
31
  {% set _items = items|default([]) %}
32
32
  {% set _expand_button = expand_button|default({}) %}
@@ -110,8 +110,13 @@
110
110
  .setAttribute('aria-controls', 'collapse-' ~ _id ~ '-' ~ loop.index)
111
111
  .setAttribute('aria-expanded', open_item ? 'true' : 'false')
112
112
  %}
113
+ {% set item_title %}
114
+ <span>
115
+ {{- _item.title -}}
116
+ </span>
117
+ {% endset %}
113
118
  {% include '@oe-bcl/bcl-button/button.html.twig' with {
114
- label: _item.title,
119
+ label: item_title,
115
120
  clean_class: true,
116
121
  attributes: button_attributes
117
122
  } only %}
@@ -9,6 +9,7 @@
9
9
  - end_day (integer) (default: '')
10
10
  - end_month (string) (default: '')
11
11
  - end_year (integer) (default: '')
12
+ - icon_path (string) (default: '')
12
13
  #}
13
14
 
14
15
  {% set _day = day|default('') %}
@@ -18,6 +19,7 @@
18
19
  {% set _end_day = end_day|default('') %}
19
20
  {% set _end_month = end_month|default('') %}
20
21
  {% set _end_year = end_year|default('') %}
22
+ {% set _icon_path = icon_path|default('') %}
21
23
 
22
24
  {% set _classes = [
23
25
  'bcl-date-block',
@@ -42,23 +44,37 @@
42
44
  {% endif %}
43
45
 
44
46
  <time {{ attributes }}>
45
- <span class="d-flex flex-column pt-2">
46
- <span class="d-flex flex-column align-item-center justify-content-center bg-white border border-bottom-0 w-100 h-100 fs-5 text-uppercase">
47
- <span class="d-block">{{- _day ~ ' ' ~ _month ~ ((_end_day or _end_month) ? ' - ' ) -}}</span>
48
- {%- if _end_day is not empty %}
49
- {{- _end_day -}}
50
- {% endif -%}
51
- {%- if _end_month is not empty %}
52
- {{- ' ' ~ _end_month -}}
53
- {% endif -%}
54
- </span>
55
- <span class="bg-lighter border w-100 rounded-bottom py-1">
56
- {{- _year -}}
47
+ <div class="d-flex flex-column pt-2">
48
+ <div class="d-flex align-item-center justify-content-center bg-white border border-bottom-0 w-100 h-100 text-uppercase">
49
+ <div class="d-flex flex-column align-item-center justify-content-center">
50
+ <div class="date-month lh-1">{{- _month -}}</div>
51
+ <div class="date-day fw-bold fs-4 lh-1">{{- _day -}}</div>
52
+ </div>
53
+ {% if _end_day or _end_month %}
54
+ <div class="d-flex flex-column align-item-center justify-content-center px-2">
55
+ {%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
56
+ name: "chevron-right",
57
+ size: "xs",
58
+ path: _icon_path,
59
+ } only -%}
60
+ </div>
61
+ <div class="d-flex flex-column align-item-center justify-content-center">
62
+ {%- if _end_month is not empty %}
63
+ <div class="date-month lh-1">{{- _end_month -}}</div>
64
+ {% endif -%}
65
+ {%- if _end_day is not empty %}
66
+ <div class="date-day fw-bold fs-4 lh-1">{{- _end_day -}}</div>
67
+ {% endif -%}
68
+ </div>
69
+ {% endif %}
70
+ </div>
71
+ <div class="bg-lighter border w-100 rounded-bottom py-1 d-flex align-item-center justify-content-around gap-2">
72
+ <div class="date-year year-start">{{- _year -}}</div>
57
73
  {%- if _end_year is not empty -%}
58
- {{ ' - ' ~ _end_year }}
74
+ <div class="date-year year-end">{{ _end_year }}</div>
59
75
  {%- endif -%}
60
- </span>
61
- </span>
76
+ </div>
77
+ </div>
62
78
  </time>
63
79
 
64
80
  {% endapply %}
@@ -1,7 +1,7 @@
1
1
  {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - id (string) (default: dropdown-random(1000))
4
+ - id (string) (default: dropdown-random(10000))
5
5
  - trigger (link or button)
6
6
  - link (boolean) (default: false)
7
7
  - direction (string) (default: '')
@@ -1,7 +1,7 @@
1
1
  {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - id (string) (default: language-dropdown-random(1000))
4
+ - id (string) (default: language-dropdown-random(10000))
5
5
  - label (string) (default: '')
6
6
  - icon_path (string) (default: '')
7
7
  - items (string) (default: [])
@@ -15,7 +15,7 @@
15
15
  ]
16
16
  #}
17
17
 
18
- {% set _id = id|default('language-dropdown' ~ random(1000)) %}
18
+ {% set _id = id|default('language-dropdown' ~ random(10000)) %}
19
19
  {% set _label = label|default('') %}
20
20
  {% set _icon_path = icon_path|default('') %}
21
21
  {% set _items = items|default([]) %}
@@ -2,7 +2,7 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
- - id (string) (default: gallery-random(1000))
5
+ - id (string) (default: gallery-random(10000))
6
6
  - title (string) (default: '')
7
7
  - title_tag (string) (default: 'h2')
8
8
  - title_link: (link object) (default: {})
@@ -28,7 +28,7 @@ Parameters:
28
28
  carousel
29
29
  #}
30
30
 
31
- {% set _id = id|default('gallery-' ~ random(1000)) %}
31
+ {% set _id = id|default('gallery-' ~ random(10000)) %}
32
32
  {% set _title = title|default('') %}
33
33
  {% set _title_tag = title_tag|default('h2') %}
34
34
  {% set _title_link = title_link|default({}) %}
@@ -7,8 +7,8 @@ Parameters:
7
7
  - title_link: (link object) (default: {})
8
8
  - title_attributes (drupal attrs)
9
9
  - links: (link[]) (default: [])
10
- - id (string) (default: bcl-inpage-navigation-random(100))
11
- - dropdown_id (string) (default: bcl-inpage-navigation-dropdown-random(100))
10
+ - id (string) (default: bcl-inpage-navigation-random(10000))
11
+ - dropdown_id (string) (default: bcl-inpage-navigation-dropdown-random(10000))
12
12
  - dynamic_active: (boolean) (default: false)
13
13
  - icon_path (string) (default: '')
14
14
  - attributes (drupal attrs)
@@ -19,9 +19,9 @@ Parameters:
19
19
  {% set _title_link = title_link|default({}) %}
20
20
  {% set _title_attributes = title_attributes ?: create_attribute() %}
21
21
  {% set _links = links|default([]) %}
22
- {% set _id = id|default('bcl-inpage-navigation-' ~ random(100)) %}
22
+ {% set _id = id|default('bcl-inpage-navigation-' ~ random(10000)) %}
23
23
  {% set _icon_path = icon_path|default('') %}
24
- {% set _dropdown_id = dropdown_id|default('bcl-inpage-navigation-dropdown' ~ random(100)) %}
24
+ {% set _dropdown_id = dropdown_id|default('bcl-inpage-navigation-dropdown' ~ random(10000)) %}
25
25
  {% set _dyanmic_active = dynamic_active|default(false) %}
26
26
 
27
27
  {% if attributes is empty %}
@@ -29,8 +29,8 @@ Parameters:
29
29
  {% endif %}
30
30
 
31
31
  {% set attributes = attributes.addClass(['bcl-inpage-navigation', 'position-sticky']).setAttribute('id', _id) %}
32
- {% set title_attributes = _title_attributes.addClass('mb-0') %}
33
- {% set _title_content %}
32
+ {% set title_attributes = _title_attributes.addClass(['mb-0', 'd-none', 'd-md-block']) %}
33
+ {% set _button_content %}
34
34
  {{ _title }}
35
35
  {%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
36
36
  name: 'chevron-down',
@@ -51,13 +51,17 @@ Parameters:
51
51
  .setAttribute('type', 'button')
52
52
  .setAttribute('id', _dropdown_id)
53
53
  .setAttribute('data-bs-toggle', 'dropdown')
54
- .addClass(['dropdown-toggle']) %}
54
+ .addClass(['dropdown-toggle', 'h2', 'd-md-none']) %}
55
+ {% include '@oe-bcl/bcl-button/button.html.twig' with {
56
+ label: _button_content,
57
+ clean_class: true,
58
+ attributes: trigger_attributes,
59
+ } only %}
55
60
  {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
56
- title: _title_content,
61
+ title: _title,
57
62
  title_tag: _title_tag,
58
63
  title_link: _title_link,
59
- attributes: _title_attributes
60
- .merge(trigger_attributes),
64
+ attributes: _title_attributes,
61
65
  } only %}
62
66
  <div class="dropdown-menu" aria-labelledby="{{ _dropdown_id }}">
63
67
  {% include '@oe-bcl/bcl-navigation/navigation.html.twig' with {
@@ -1,13 +1,13 @@
1
1
  {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - id (string) (default: collapse-random(1000), optional)
4
+ - id (string) (default: collapse-random(10000), optional)
5
5
  - message (alert object) (default: {})
6
6
  - expandable (button object) (default: {})
7
7
  - languages (link[]) (default: [])
8
8
  #}
9
9
 
10
- {% set _id = id|default('collapse-' ~ random(1000)) %}
10
+ {% set _id = id|default('collapse-' ~ random(10000)) %}
11
11
  {% set _message = message|default({}) %}
12
12
  {% set _expandable = expandable|default({}) %}
13
13
  {% set _languages = languages|default([]) %}
@@ -3,7 +3,7 @@
3
3
  {# Parameters:
4
4
  - size (string) default('')
5
5
  options: sm, lg, xl, fullscreen
6
- - id (boolean) (default: modal-random(1000))
6
+ - id (boolean) (default: modal-random(10000))
7
7
  - fullscreen_responsive (string) (default: '')
8
8
  options: sm, md, lg, xl, xxl
9
9
  - static_backdrop (boolean) (default: false)
@@ -23,7 +23,7 @@
23
23
  #}
24
24
 
25
25
  {% set _size = size|default('') %}
26
- {% set _id = id|default('modal-' ~ random(1000)) %}
26
+ {% set _id = id|default('modal-' ~ random(10000)) %}
27
27
  {% set _fullscreen_responsive = fullscreen_responsive|default('') %}
28
28
  {% set _static_backdrop = static_backdrop ?? false %}
29
29
  {% set _verticaly_centered = verticaly_centered ?? false %}
@@ -2,7 +2,7 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
- - id: (integer) (default: random(1000))
5
+ - id: (integer) (default: random(10000))
6
6
  - title: (string) (default: '')
7
7
  - title_tag: (string) (default: 'h2')
8
8
  - title_link: (link object) (default: {})
@@ -25,7 +25,7 @@ Parameters:
25
25
  - icon_path (string) (default: ''): file containing the svg icons
26
26
  #}
27
27
 
28
- {% set _id = id|default(random(1000)) %}
28
+ {% set _id = id|default(random(10000)) %}
29
29
  {% set _title = title|default('') %}
30
30
  {% set _title_tag = title_tag|default('h2') %}
31
31
  {% set _title_link = title_link|default({}) %}