@openeuropa/bcl-modal 0.21.0 → 0.24.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 (2) hide show
  1. package/modal.html.twig +16 -4
  2. package/package.json +2 -2
package/modal.html.twig CHANGED
@@ -12,17 +12,26 @@
12
12
  - messages (block) (default: '')
13
13
  - body (block) (default: '')
14
14
  - footer (block) (default: '')
15
+ - attributes (drupal attrs)
16
+
17
+ Blocks
18
+ - header
19
+ - messages
20
+ - body
21
+ - footer
15
22
  #}
23
+
16
24
  {% set _size = size|default('') %}
17
25
  {% set _id = id|default('modal-' ~ random(1000)) %}
18
26
  {% set _fullscreen_responsive = fullscreen_responsive|default('') %}
19
- {% set _header = header|default('') %}
20
- {% set _body = body|default('') %}
21
- {% set _messages = messages|default('') %}
22
27
  {% set _static_backdrop = static_backdrop|default(false) %}
23
28
  {% set _verticaly_centered = verticaly_centered|default(false) %}
24
29
  {% set _scrollable = scrollable|default(false) %}
30
+ {% set _header = header|default('') %}
31
+ {% set _messages = messages|default('') %}
32
+ {% set _body = body|default('') %}
25
33
  {% set _footer = footer|default('') %}
34
+
26
35
  {% set _classes = ['modal fade'] %}
27
36
 
28
37
  {% if attributes is empty %}
@@ -37,6 +46,10 @@
37
46
  .addClass(_classes)
38
47
  %}
39
48
 
49
+ {% if _static_backdrop %}
50
+ {% set attributes = attributes.setAttribute('data-bs-backdrop', 'static') %}
51
+ {% endif %}
52
+
40
53
  <div
41
54
  {{ attributes }}
42
55
  >
@@ -45,7 +58,6 @@
45
58
  {{- _fullscreen_responsive ? ' modal-fullscreen-' ~ _fullscreen_responsive ~ '-down' -}}
46
59
  {{- _verticaly_centered ? ' modal-dialog-centered' -}}
47
60
  {{- _scrollable ? ' modal-dialog-scrollable' -}}"
48
- {{- _static_backdrop ? ' data-bs-backdrop="static"' -}}
49
61
  >
50
62
  <div class="modal-content">
51
63
  {% if header is not empty %}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@openeuropa/bcl-modal",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.21.0",
5
+ "version": "0.24.0",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -21,5 +21,5 @@
21
21
  "design-system",
22
22
  "twig"
23
23
  ],
24
- "gitHead": "18c01b34ca76780f480c692c566dfe507d961ccf"
24
+ "gitHead": "a46bb6bc12771da4667516dc7b0665b00504ade2"
25
25
  }