@openeuropa/bcl-twig-templates 0.28.0 → 1.0.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.
Files changed (51) hide show
  1. package/package.json +65 -65
  2. package/templates/bcl-accordion/accordion.html.twig +1 -1
  3. package/templates/bcl-badge/badge.html.twig +29 -28
  4. package/templates/bcl-banner/banner.html.twig +4 -4
  5. package/templates/bcl-base-templates/content-type.html.twig +5 -5
  6. package/templates/bcl-breadcrumb/breadcrumb.html.twig +1 -1
  7. package/templates/bcl-button/button.html.twig +6 -6
  8. package/templates/bcl-button-group/button-group.html.twig +3 -3
  9. package/templates/bcl-card/card.html.twig +3 -4
  10. package/templates/bcl-card-layout/card-layout.html.twig +2 -2
  11. package/templates/bcl-carousel/carousel.html.twig +7 -10
  12. package/templates/bcl-content-banner/content-banner.html.twig +23 -8
  13. package/templates/bcl-description-list/description-list.html.twig +4 -5
  14. package/templates/bcl-dropdown/dropdown.html.twig +7 -7
  15. package/templates/bcl-fact-figures/fact-figures.html.twig +3 -3
  16. package/templates/bcl-featured-media/featured-media.html.twig +16 -16
  17. package/templates/bcl-file/file-translations.html.twig +1 -1
  18. package/templates/bcl-file/file.html.twig +2 -2
  19. package/templates/bcl-footer/footer.html.twig +3 -2
  20. package/templates/bcl-form/form.html.twig +2 -2
  21. package/templates/bcl-form-input/form-input.html.twig +12 -12
  22. package/templates/bcl-gallery/gallery-item.html.twig +7 -6
  23. package/templates/bcl-gallery/gallery.html.twig +120 -79
  24. package/templates/bcl-header/header.html.twig +3 -2
  25. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +3 -5
  26. package/templates/bcl-language-list/language-list.html.twig +2 -2
  27. package/templates/bcl-language-switcher/language-switcher.html.twig +3 -3
  28. package/templates/bcl-link/link.html.twig +3 -3
  29. package/templates/bcl-links-block/links-block.html.twig +1 -1
  30. package/templates/bcl-list-group/list-group.html.twig +3 -3
  31. package/templates/bcl-listing/listing.html.twig +1 -1
  32. package/templates/bcl-modal/modal.html.twig +4 -4
  33. package/templates/bcl-navbar/navbar.html.twig +1 -1
  34. package/templates/bcl-navigation/navigation.html.twig +10 -10
  35. package/templates/bcl-offcanvas/offcanvas.html.twig +2 -2
  36. package/templates/bcl-pagination/pagination-item.html.twig +73 -0
  37. package/templates/bcl-pagination/pagination.html.twig +104 -224
  38. package/templates/bcl-progress/progress.html.twig +3 -3
  39. package/templates/bcl-project/project.html.twig +14 -29
  40. package/templates/bcl-project-status/project-contributions.html.twig +2 -2
  41. package/templates/bcl-project-status/project-status.html.twig +3 -4
  42. package/templates/bcl-recent-activities/recent-activities.html.twig +1 -1
  43. package/templates/bcl-search-form/search-form.html.twig +1 -1
  44. package/templates/bcl-select/select.html.twig +22 -8
  45. package/templates/bcl-subscription/subscription-modal.html.twig +1 -1
  46. package/templates/bcl-table/table.html.twig +8 -8
  47. package/templates/bcl-textarea/textarea.html.twig +8 -8
  48. package/templates/bcl-timeline/timeline.html.twig +2 -2
  49. package/templates/bcl-toast/toasts.html.twig +4 -4
  50. package/templates/bcl-user/user-compact.html.twig +1 -1
  51. package/templates/bcl-gallery/gallery-modal.html.twig +0 -105
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.28.0",
5
+ "version": "1.0.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.28.0",
12
- "@openeuropa/bcl-alert": "^0.28.0",
13
- "@openeuropa/bcl-badge": "^0.28.0",
14
- "@openeuropa/bcl-banner": "^0.28.0",
15
- "@openeuropa/bcl-base-templates": "^0.28.0",
16
- "@openeuropa/bcl-blockquote": "^0.28.0",
17
- "@openeuropa/bcl-breadcrumb": "^0.28.0",
18
- "@openeuropa/bcl-button": "^0.28.0",
19
- "@openeuropa/bcl-button-group": "^0.28.0",
20
- "@openeuropa/bcl-card": "^0.28.0",
21
- "@openeuropa/bcl-card-layout": "^0.28.0",
22
- "@openeuropa/bcl-carousel": "^0.28.0",
23
- "@openeuropa/bcl-contact-form": "^0.28.0",
24
- "@openeuropa/bcl-content-banner": "^0.28.0",
25
- "@openeuropa/bcl-date-block": "^0.28.0",
26
- "@openeuropa/bcl-description-list": "^0.28.0",
27
- "@openeuropa/bcl-dropdown": "^0.28.0",
28
- "@openeuropa/bcl-event": "^0.28.0",
29
- "@openeuropa/bcl-fact-figures": "^0.28.0",
30
- "@openeuropa/bcl-featured-media": "^0.28.0",
31
- "@openeuropa/bcl-file": "^0.28.0",
32
- "@openeuropa/bcl-footer": "^0.28.0",
33
- "@openeuropa/bcl-form": "^0.28.0",
34
- "@openeuropa/bcl-form-input": "^0.28.0",
35
- "@openeuropa/bcl-gallery": "^0.28.0",
36
- "@openeuropa/bcl-glossary": "^0.28.0",
37
- "@openeuropa/bcl-group": "^0.28.0",
38
- "@openeuropa/bcl-header": "^0.28.0",
39
- "@openeuropa/bcl-heading": "^0.28.0",
40
- "@openeuropa/bcl-icon": "^0.28.0",
41
- "@openeuropa/bcl-inpage-navigation": "^0.28.0",
42
- "@openeuropa/bcl-landing-page": "^0.28.0",
43
- "@openeuropa/bcl-language-list": "^0.28.0",
44
- "@openeuropa/bcl-language-switcher": "^0.28.0",
45
- "@openeuropa/bcl-link": "^0.28.0",
46
- "@openeuropa/bcl-links-block": "^0.28.0",
47
- "@openeuropa/bcl-list-group": "^0.28.0",
48
- "@openeuropa/bcl-listing": "^0.28.0",
49
- "@openeuropa/bcl-modal": "^0.28.0",
50
- "@openeuropa/bcl-multilingual": "^0.28.0",
51
- "@openeuropa/bcl-navbar": "^0.28.0",
52
- "@openeuropa/bcl-navigation": "^0.28.0",
53
- "@openeuropa/bcl-news": "^0.28.0",
54
- "@openeuropa/bcl-offcanvas": "^0.28.0",
55
- "@openeuropa/bcl-page": "^0.28.0",
56
- "@openeuropa/bcl-pagination": "^0.28.0",
57
- "@openeuropa/bcl-person": "^0.28.0",
58
- "@openeuropa/bcl-placeholder": "^0.28.0",
59
- "@openeuropa/bcl-progress": "^0.28.0",
60
- "@openeuropa/bcl-project": "^0.28.0",
61
- "@openeuropa/bcl-project-status": "^0.28.0",
62
- "@openeuropa/bcl-recent-activities": "^0.28.0",
63
- "@openeuropa/bcl-search": "^0.28.0",
64
- "@openeuropa/bcl-search-form": "^0.28.0",
65
- "@openeuropa/bcl-select": "^0.28.0",
66
- "@openeuropa/bcl-spinner": "^0.28.0",
67
- "@openeuropa/bcl-subscription": "^0.28.0",
68
- "@openeuropa/bcl-subscription-block": "^0.28.0",
69
- "@openeuropa/bcl-table": "^0.28.0",
70
- "@openeuropa/bcl-textarea": "^0.28.0",
71
- "@openeuropa/bcl-timeline": "^0.28.0",
72
- "@openeuropa/bcl-toast": "^0.28.0",
73
- "@openeuropa/bcl-user": "^0.28.0",
11
+ "@openeuropa/bcl-accordion": "^1.0.0",
12
+ "@openeuropa/bcl-alert": "^1.0.0",
13
+ "@openeuropa/bcl-badge": "^1.0.0",
14
+ "@openeuropa/bcl-banner": "^1.0.0",
15
+ "@openeuropa/bcl-base-templates": "^1.0.0",
16
+ "@openeuropa/bcl-blockquote": "^1.0.0",
17
+ "@openeuropa/bcl-breadcrumb": "^1.0.0",
18
+ "@openeuropa/bcl-button": "^1.0.0",
19
+ "@openeuropa/bcl-button-group": "^1.0.0",
20
+ "@openeuropa/bcl-card": "^1.0.0",
21
+ "@openeuropa/bcl-card-layout": "^1.0.0",
22
+ "@openeuropa/bcl-carousel": "^1.0.0",
23
+ "@openeuropa/bcl-contact-form": "^1.0.0",
24
+ "@openeuropa/bcl-content-banner": "^1.0.0",
25
+ "@openeuropa/bcl-date-block": "^1.0.0",
26
+ "@openeuropa/bcl-description-list": "^1.0.0",
27
+ "@openeuropa/bcl-dropdown": "^1.0.0",
28
+ "@openeuropa/bcl-event": "^1.0.0",
29
+ "@openeuropa/bcl-fact-figures": "^1.0.0",
30
+ "@openeuropa/bcl-featured-media": "^1.0.0",
31
+ "@openeuropa/bcl-file": "^1.0.0",
32
+ "@openeuropa/bcl-footer": "^1.0.0",
33
+ "@openeuropa/bcl-form": "^1.0.0",
34
+ "@openeuropa/bcl-form-input": "^1.0.0",
35
+ "@openeuropa/bcl-gallery": "^1.0.0",
36
+ "@openeuropa/bcl-glossary": "^1.0.0",
37
+ "@openeuropa/bcl-group": "^1.0.0",
38
+ "@openeuropa/bcl-header": "^1.0.0",
39
+ "@openeuropa/bcl-heading": "^1.0.0",
40
+ "@openeuropa/bcl-icon": "^1.0.0",
41
+ "@openeuropa/bcl-inpage-navigation": "^1.0.0",
42
+ "@openeuropa/bcl-landing-page": "^1.0.0",
43
+ "@openeuropa/bcl-language-list": "^1.0.0",
44
+ "@openeuropa/bcl-language-switcher": "^1.0.0",
45
+ "@openeuropa/bcl-link": "^1.0.0",
46
+ "@openeuropa/bcl-links-block": "^1.0.0",
47
+ "@openeuropa/bcl-list-group": "^1.0.0",
48
+ "@openeuropa/bcl-listing": "^1.0.0",
49
+ "@openeuropa/bcl-modal": "^1.0.0",
50
+ "@openeuropa/bcl-multilingual": "^1.0.0",
51
+ "@openeuropa/bcl-navbar": "^1.0.0",
52
+ "@openeuropa/bcl-navigation": "^1.0.0",
53
+ "@openeuropa/bcl-news": "^1.0.0",
54
+ "@openeuropa/bcl-offcanvas": "^1.0.0",
55
+ "@openeuropa/bcl-page": "^1.0.0",
56
+ "@openeuropa/bcl-pagination": "^1.0.0",
57
+ "@openeuropa/bcl-person": "^1.0.0",
58
+ "@openeuropa/bcl-placeholder": "^1.0.0",
59
+ "@openeuropa/bcl-progress": "^1.0.0",
60
+ "@openeuropa/bcl-project": "^1.0.0",
61
+ "@openeuropa/bcl-project-status": "^1.0.0",
62
+ "@openeuropa/bcl-recent-activities": "^1.0.0",
63
+ "@openeuropa/bcl-search": "^1.0.0",
64
+ "@openeuropa/bcl-search-form": "^1.0.0",
65
+ "@openeuropa/bcl-select": "^1.0.0",
66
+ "@openeuropa/bcl-spinner": "^1.0.0",
67
+ "@openeuropa/bcl-subscription": "^1.0.0",
68
+ "@openeuropa/bcl-subscription-block": "^1.0.0",
69
+ "@openeuropa/bcl-table": "^1.0.0",
70
+ "@openeuropa/bcl-textarea": "^1.0.0",
71
+ "@openeuropa/bcl-timeline": "^1.0.0",
72
+ "@openeuropa/bcl-toast": "^1.0.0",
73
+ "@openeuropa/bcl-user": "^1.0.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": "9ceb916258c8c7331f37bbb7c4380a2121440e12"
96
+ "gitHead": "16b986722345644e83a37dc8091c07eecbdf4c8c"
97
97
  }
@@ -25,7 +25,7 @@
25
25
  {% set _title_link = title_link|default({}) %}
26
26
  {% set _title_attributes = title_attributes ?: create_attribute() %}
27
27
  {% set _id = id|default(random(1000)) %}
28
- {% set _flush = flush|default(false) %}
28
+ {% set _flush = flush ?? false %}
29
29
  {% set _items = items|default([]) %}
30
30
  {% set _open_item_id = open_item_id|default(0) %}
31
31
  {% set _classes = ['accordion'] %}
@@ -4,7 +4,7 @@
4
4
  - label (string) (default: '')
5
5
  - background: (string) (default: 'primary')
6
6
  - url (string) (default: '')
7
- - title (string) (default: label)
7
+ - title (string) (default: '')
8
8
  - dismissible (boolean) (default: false)
9
9
  - assistive_text (string) (default: '')
10
10
  - rounded_pill (boolean) (default: false)
@@ -16,13 +16,12 @@
16
16
  {% set _label = label|default('') %}
17
17
  {% set _background = background|default('primary') %}
18
18
  {% set _url = url|default('') %}
19
- {% set _title = title|default(_label) %}
20
- {% set _dismissible = dismissible|default(false) %}
19
+ {% set _title = title|default('') %}
20
+ {% set _dismissible = dismissible ?? false %}
21
21
  {% set _assistive_text = assistive_text|default('') %}
22
22
  {% set _rounded_pill = rounded_pill|default(false) %}
23
23
  {% set _outline = outline|default(false) %}
24
24
  {% set _icon_path = icon_path|default('') %}
25
-
26
25
  {% set _classes = ['badge'] %}
27
26
 
28
27
  {% if _rounded_pill %}
@@ -30,47 +29,49 @@
30
29
  {% endif %}
31
30
 
32
31
  {% if _outline %}
33
- {% set _classes = _classes|merge([ 'badge-outline-' ~ _background]) %}
32
+ {% set _classes = _classes|merge(['badge-outline-' ~ _background]) %}
34
33
  {% else %}
35
- {% set _classes = _classes|merge([ 'bg-' ~ _background]) %}
34
+ {% set _classes = _classes|merge(['bg-' ~ _background]) %}
36
35
  {% endif %}
37
36
 
38
37
  {% if attributes is empty %}
39
38
  {% set attributes = create_attribute() %}
40
39
  {% endif %}
41
40
 
42
- {%- if _url is not empty -%}
43
- {% set attributes = attributes.setAttribute('title', _title).setAttribute('href', _url) %}
41
+ {%- if _title is not empty -%}
42
+ {% set attributes = attributes.setAttribute('title', _title) %}
44
43
  {%- endif -%}
45
44
 
46
45
  {% set attributes = attributes.addClass(_classes) %}
47
46
 
48
- {%- if _url is not empty -%}
49
- <a
50
- {{ attributes }}
51
- >
52
- {%- else -%}
53
- <span
54
- {{ attributes }}
55
- >
56
- {%- endif -%}
47
+ {% set _label %}
57
48
  {%- if _assistive_text is not empty -%}
58
- <span class="visually-hidden">
59
- {{- _assistive_text -}}
60
- </span>
49
+ <span class="visually-hidden">
50
+ {{- _assistive_text -}}
51
+ </span>
61
52
  {%- endif -%}
62
- {{- _label -}}
53
+ {{- _label -}}
63
54
  {%- if _dismissible -%}
64
- <span class="icon--close" aria-hidden="true">
65
- {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
66
- name: "x-lg",
67
- path: _icon_path,
68
- } only %}
69
- </span>
55
+ <span class="icon--close" aria-hidden="true">
56
+ {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
57
+ name: "x-lg",
58
+ path: _icon_path,
59
+ } only %}
60
+ </span>
70
61
  {%- endif -%}
62
+ {% endset %}
63
+
71
64
  {%- if _url is not empty -%}
72
- </a>
65
+ {% include '@oe-bcl/bcl-link/link.html.twig' with {
66
+ label: _label,
67
+ path: _url,
68
+ attributes: attributes,
69
+ } only %}
73
70
  {%- else -%}
71
+ <span
72
+ {{ attributes }}
73
+ >
74
+ {{- _label -}}
74
75
  </span>
75
76
  {%- endif -%}
76
77
 
@@ -6,7 +6,7 @@
6
6
  - title_link: (link object) (default: {})
7
7
  - title_attributes (drupal attrs)
8
8
  - description: (string) (default: '')
9
- - link: (link object) (default: {}): predefined structure for Link component
9
+ - link: (link object) (default: {})
10
10
  - image: (string) <img> tag
11
11
  - shade: (boolean) (default: false)
12
12
  - hero: (boolean) (default: false)
@@ -22,9 +22,9 @@
22
22
  {% set _description = description|default('') %}
23
23
  {% set _link = link|default({}) %}
24
24
  {% set _image = image|default('') %}
25
- {% set _shade = shade|default(false) %}
26
- {% set _hero = hero|default(false) %}
27
- {% set _full_width = full_width|default(false) %}
25
+ {% set _shade = shade ?? false %}
26
+ {% set _hero = hero ?? false %}
27
+ {% set _full_width = full_width ?? false %}
28
28
  {% set _content_classes = content_classes|default('') %}
29
29
 
30
30
  {% set _content_class = 'bcl-banner__content' %}
@@ -25,12 +25,12 @@
25
25
  - messages_area
26
26
  #}
27
27
 
28
- {% set _with_header = header|default(false) %}
29
- {% set _with_footer = footer|default(false) %}
30
- {% set _with_banner = banner|default(false) %}
31
- {% set _with_sidebar = sidebar|default(false) %}
28
+ {% set _with_header = header ?? false %}
29
+ {% set _with_footer = footer ?? false %}
30
+ {% set _with_banner = banner ?? false %}
31
+ {% set _with_sidebar = sidebar ?? false %}
32
32
  {% set _sidebar_size = sidebar_size|default('normal') %}
33
- {% set _landing = landing|default(false) %}
33
+ {% set _landing = landing ?? false %}
34
34
  {% set _content_type = content_type|default('') %}
35
35
  {% set _classes = ['bcl-node-type'] %}
36
36
 
@@ -1,7 +1,7 @@
1
1
  {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - links (array of objects of type link) (default: [])
4
+ - links (link[]) (default: [])
5
5
  - icon_path (string) (default: '')
6
6
  - attributes (drupal attrs)
7
7
  #}
@@ -12,7 +12,7 @@
12
12
  - text_nowrap (boolean) (default: false)
13
13
  - assistive_text (string) (default: '')
14
14
  - id (string) (default: '')
15
- - icon (icon object) (default: {}): predefined structure for Icon component
15
+ - icon (icon object) (default: {})
16
16
  - icon_position (string) (default: after)
17
17
  - options ['after', 'before']
18
18
  - icon_spacing (string) (default: '')
@@ -27,17 +27,17 @@
27
27
  {% set _variant = variant|default('primary') %}
28
28
  {% set _size = size|default('md') %}
29
29
  {% set _type = type|default('button') %}
30
- {% set _outline = outline|default(false) %}
31
- {% set _disabled = disabled|default(false) %}
32
- {% set _text_nowrap = text_nowrap|default(false) %}
30
+ {% set _outline = outline ?? false %}
31
+ {% set _disabled = disabled ?? false %}
32
+ {% set _text_nowrap = text_nowrap ?? false %}
33
33
  {% set _assistive_text = assistive_text|default('') %}
34
34
  {% set _id = id|default('') %}
35
35
  {% set _icon = icon|default({}) %}
36
36
  {% set _icon_position = icon_position|default('after') %}
37
37
  {% set _icon_spacing = icon_spacing|default('') %}
38
38
  {% set _spinner = spinner|default({}) %}
39
- {% set _show_spinner = show_spinner|default(false) %}
40
- {% set _clean_class = clean_class|default(false) %}
39
+ {% set _show_spinner = show_spinner ?? false %}
40
+ {% set _clean_class = clean_class ?? false %}
41
41
 
42
42
  {% set _classes = [] %}
43
43
  {% if _clean_class == false %}
@@ -7,14 +7,14 @@
7
7
  - aria_label (string) (default: '')
8
8
  - toolbar (boolean) (default: false)
9
9
  - toolbar_aria_label (string) (default: '')
10
- - items (array of arrays with objects of type button or form-input (input key mandatory when the object is a form-input)) (default: [])
10
+ - items (button[] or input[] - if input key is present) (default: [])
11
11
  - attributes (drupal attrs)
12
12
  #}
13
13
 
14
- {% set _vertical = vertical|default(false) %}
14
+ {% set _vertical = vertical ?? false %}
15
15
  {% set _size = size|default('md') %}
16
16
  {% set _aria_label = aria_label|default('') %}
17
- {% set _toolbar = toolbar|default(false) %}
17
+ {% set _toolbar = toolbar ?? false %}
18
18
  {% set _toolbar_aria_label = toolbar_aria_label|default('') %}
19
19
  {% set _items = items|default([]) %}
20
20
 
@@ -24,14 +24,13 @@
24
24
  alt (string),
25
25
  position (string)
26
26
  }
27
- - date (object) (default: {})
27
+ - date (date block object) (default: {})
28
28
  - variant (string) (default: '')
29
29
  - horizontal (boolean) (default: false)
30
30
  - horizontal_grid (object) (default: {})
31
31
  format: {
32
32
  left_col_classes (default: 'bcl-card-start-col')
33
33
  right_col_classes (default: 'col')
34
- gutter (default: '')
35
34
  gutter (default: '') - options: ['small', 'large']
36
35
  }
37
36
  - border_variant (string) (default: '')
@@ -42,7 +41,7 @@
42
41
  - extra_classes_body (string) (default: '')
43
42
  - extra_classes_header (string) (default: '')
44
43
  - extra_classes_footer (string) (default: '')
45
- - badges (array of badge object) (default: [])
44
+ - badges (badge[]) (default: [])
46
45
  - links (array of link object) (default: [])
47
46
  - attributes (drupal attrs)
48
47
 
@@ -62,7 +61,7 @@
62
61
  {% set _image = image|default({}) %}
63
62
  {% set _date = date|default({}) %}
64
63
  {% set _variant = variant|default('') %}
65
- {% set _horizontal = horizontal|default(false) %}
64
+ {% set _horizontal = horizontal ?? false %}
66
65
  {% set _horizontal_grid = horizontal_grid|default({
67
66
  left_col_classes: 'bcl-card-start-col',
68
67
  right_col_classes: 'col',
@@ -3,7 +3,7 @@
3
3
  {# Parameters:
4
4
  - type (string) (default: 'group')
5
5
  options: ['group', 'grid', 'masonry']
6
- - items (array of object type card) (default: [])
6
+ - items (card[]) (default: [])
7
7
  - grid_columns (int) (default: 1)
8
8
  options: ['1', '2', '3']
9
9
  - responsiveness (string) (default: '')
@@ -26,7 +26,7 @@
26
26
  {% set _responsiveness = responsiveness|default('md') %}
27
27
  {% set _responsive_columns = responsive_columns|default('') %}
28
28
  {% set _gutter = gutter|default('') %}
29
- {% set _equal_height = equal_height|default(false) %}
29
+ {% set _equal_height = equal_height ?? false %}
30
30
  {% set _cols_extra_classes = cols_extra_classes|default('') %}
31
31
 
32
32
  {% set _cols_classes = 'col' %}
@@ -9,7 +9,7 @@
9
9
  - autoplay (boolean) (default: true)
10
10
  - dark (boolean) (default: false)
11
11
  - active_item (integer) (default: 1)
12
- - items (array of objects) format: [
12
+ - items (object[]) format: [
13
13
  {
14
14
  image: (string) <img> tag
15
15
  caption (string)
@@ -34,16 +34,16 @@
34
34
  {% set _title_attributes = title_attributes ?: create_attribute() %}
35
35
  {% set _id = id|default('') %}
36
36
  {% set _autoplay = autoplay ?? true %}
37
- {% set _dark = dark|default(false) %}
37
+ {% set _dark = dark ?? false %}
38
38
  {% set _active_item = active_item|default(1) %}
39
39
  {% set _items = items|default([]) %}
40
- {% set _fade = fade|default(false) %}
40
+ {% set _fade = fade ?? false %}
41
41
  {% set _with_controls = with_controls ?? true %}
42
42
  {% set _prev_label = prev_label|default('') %}
43
43
  {% set _next_label = next_label|default('') %}
44
- {% set _with_indicators = with_indicators|default(false) %}
45
- {% set _rounded_indicators = rounded_indicators|default(false) %}
46
- {% set _disable_touch = disable_touch|default(false) %}
44
+ {% set _with_indicators = with_indicators ?? false %}
45
+ {% set _rounded_indicators = rounded_indicators ?? false %}
46
+ {% set _disable_touch = disable_touch ?? false %}
47
47
 
48
48
  {% set _classes = ['carousel', 'slide'] %}
49
49
 
@@ -122,10 +122,7 @@
122
122
  {% if _item.image is defined and _item.image is not empty %}
123
123
  {{ _item.image }}
124
124
  {% endif %}
125
- {% if (_item.caption is defined and _item.caption is not empty) or
126
- (_item.link is defined and _item.link is not empty) or
127
- (_item.caption_title is defined and _item.caption_title is not empty)
128
- %}
125
+ {% if (_item.caption is defined and _item.caption is not empty) or (_item.link is defined and _item.link is not empty) or (_item.caption_title is defined and _item.caption_title is not empty) %}
129
126
  {% set _caption_classes = 'carousel-caption' %}
130
127
  {% if _item.caption is not empty and _item.link is empty %}
131
128
  {% set _caption_classes = _caption_classes ~ ' d-none d-md-block' %}
@@ -3,18 +3,33 @@
3
3
  {#
4
4
  Parameters:
5
5
  - title: (string) (default: '')
6
- - title_tag: (string) (default: 'h5')
6
+ - title_tag: (string) (default: 'h1')
7
7
  - title_link: (link object) (default: {})
8
8
  - title_attributes: (drupal attrs)
9
9
  - background: (string) (default: 'white')
10
10
  options: [ white, gray ]
11
- - image (object)
12
- - image_size: (string)
13
- - date: (object)
14
- options: ['sm', 'md', 'lg', 'xl']
15
- - content: (string)
16
- - badges: (array of objects of type badge)
17
- - links: (array of objects of type link)
11
+ - image (object) (default: {})
12
+ - image_size: (string) (default: 'md')
13
+ options: ['md', 'lg', 'xl']
14
+ - date: (date block object) (default: {})
15
+
16
+ Card inheritance
17
+ - badges (badge[]) (default: [])
18
+ - links (link[]) (default: [])
19
+ - content (string) (default: '')
20
+ - subtitle (object) (default: {})
21
+ format: {
22
+ content: '',
23
+ tag: '',
24
+ classes: ''
25
+ }
26
+ - text (object) (default: {})
27
+ format: {
28
+ content: '',
29
+ tag: '',
30
+ classes: ''
31
+ }
32
+
18
33
  - attributes: (drupal attrs)
19
34
 
20
35
  Blocks
@@ -10,8 +10,8 @@
10
10
  - col_classes (string) (default: 'col-3')
11
11
  - items (array) (default: []): format: [
12
12
  {
13
- term (string or array of descriptionListTitle object)
14
- definition (string or array of descriptionListDetails object)
13
+ term (string or description list title [])
14
+ definition (string or description list details [])
15
15
  },
16
16
  ...
17
17
  ]
@@ -22,11 +22,10 @@
22
22
  {% set _title = title|default('') %}
23
23
  {% set _title_tag = title_tag|default('h2') %}
24
24
  {% set _title_link = title_link|default({}) %}
25
- {% set _bordered = bordered|default(false) %}
26
- {% set _title_link = title_link|default({}) %}
27
25
  {% set _title_attributes = title_attributes ?: create_attribute() %}
28
- {% set _items = items|default([]) %}
26
+ {% set _bordered = bordered ?? false %}
29
27
  {% set _col_classes = col_classes|default('col-md-3') %}
28
+ {% set _items = items|default([]) %}
30
29
  {% set _variant = variant|default('') %}
31
30
 
32
31
  {% if attributes is empty %}
@@ -1,8 +1,8 @@
1
1
  {% apply spaceless %}
2
2
 
3
3
  {# Parameters:
4
- - id (string) (default: 'dropdown-' random(1000))
5
- - trigger (object of Button or Link component)
4
+ - id (string) (default: dropdown-random(1000))
5
+ - trigger (link or button)
6
6
  - link (boolean) (default: false)
7
7
  - direction (string) (default: '')
8
8
  - options ['dropup', 'dropend', 'dropstart']
@@ -23,10 +23,10 @@
23
23
  ]
24
24
  - dark (boolean) (default: false)
25
25
  - remove_wrapper (boolean) (default: false)
26
- - items (array of objects)
26
+ - items (object[])
27
27
  format: [
28
28
  {
29
- - Link or Button object component
29
+ - link or button object
30
30
  - active (boolean)
31
31
  - divider (bolean) - show divider
32
32
  - button (boolean) - set to button
@@ -37,11 +37,11 @@
37
37
 
38
38
  {% set _id = id|default('dropdown-' ~ random(1000)) %}
39
39
  {% set _trigger = trigger|default({}) %}
40
- {% set _link = link|default(false) %}
40
+ {% set _link = link ?? false %}
41
41
  {% set _direction = direction|default('') %}
42
42
  {% set _alignment = alignment|default('') %}
43
- {% set _dark = dark|default(false) %}
44
- {% set _remove_wrapper = remove_wrapper|default(false) %}
43
+ {% set _dark = dark ?? false %}
44
+ {% set _remove_wrapper = remove_wrapper ?? false %}
45
45
  {% set _items = items|default([]) %}
46
46
 
47
47
  {% set _class = 'dropdown' %}
@@ -6,8 +6,8 @@
6
6
  - title_tag (string) (default: 'h2')
7
7
  - title_link: (link object) (default: {})
8
8
  - title_attributes (drupal attrs)
9
- - variant (string) (default: 'default') options:
10
- [ default, block ]
9
+ - variant (string) (default: 'default')
10
+ options: default, block ]
11
11
  - display_icons (boolean) (default: true)
12
12
  - items (array) (default: []):
13
13
  - icon (associate array) (default: { size: 'm' })
@@ -35,7 +35,7 @@
35
35
  {% set _responsiveness = responsiveness|default('md') %}
36
36
  {% set _responsive_columns = responsive_columns|default(3) %}
37
37
  {% set _gutter = gutter|default(4) %}
38
- {% set _equal_height = equal_height|default(false) %}
38
+ {% set _equal_height = equal_height ?? false %}
39
39
  {% set _cols_extra_classes = cols_extra_classes|default('') %}
40
40
  {% set _icon_path = icon_path|default('') %}
41
41
  {% set _link_more = link_more|default({}) %}
@@ -6,29 +6,29 @@
6
6
  - title_link: (link object) (default: {})
7
7
  - title_attributes: (drupal attrs)
8
8
  - with_text (boolean) (default: false)
9
- - alignment: (string) (default: "right")
9
+ - alignment: (string) (default: 'right')
10
10
  - options ['left', 'right']
11
- - image: (string) (default: "")
12
- - poster_image: (string) (default: "")
13
- - content: (string) (default: "")
11
+ - image: (string) (default: '')
12
+ - poster_image: (string) (default: '')
13
+ - content: (string) (default: '')
14
14
  - wrapper_classes: (default: '')
15
- - content_classes: (string) (default: "")
15
+ - content_classes: (string) (default: '')
16
16
  - read_more (object) (default: {})
17
17
  - description (string) (default: '')
18
- - ratio: (string) (default: "16x9")
19
- - options ["1x1", "4x3", "16x9", "21x9"]
20
- - sources: (array of sources) (default: []) format: [
18
+ - ratio: (string) (default: '16x9')
19
+ - options ['1x1', '4x3', '16x9', '21x9']
20
+ - sources: (object[]) (default: []) format: [
21
21
  {
22
- type: "",
23
- src: ""
22
+ type: '',
23
+ src: ''
24
24
  }
25
25
  ]
26
- - tracks: (array of tracks) (default: []) format: [
26
+ - tracks: (object[]) (default: []) format: [
27
27
  {
28
- kind: "",
29
- label: "",
30
- src: "",
31
- src_lang: ""
28
+ kind: '',
29
+ label: '',
30
+ src: '',
31
+ src_lang: ''
32
32
  }
33
33
  ]
34
34
 
@@ -40,7 +40,7 @@
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() %}
43
- {% set _with_text = with_text|default(false) %}
43
+ {% set _with_text = with_text ?? false %}
44
44
  {% set _alignment = alignment|default('right') %}
45
45
  {% set _image = image|default('') %}
46
46
  {% set _poster_image = poster_image|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(1000))
5
5
  - label (string) (default: '')
6
6
  - icon_path (string) (default: '')
7
7
  - items (string) (default: [])