@openeuropa/bcl-modal 0.19.0 → 0.20.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/modal.html.twig +12 -1
- package/package.json +2 -2
package/modal.html.twig
CHANGED
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
{# Parameters:
|
|
4
4
|
- size (string) (sm, lg, xl, fullscreen) default('')
|
|
5
5
|
- id (boolean) (default: 'modal-' ~ random(1000))
|
|
6
|
+
- fullscreen_responsive (string) (default: '')
|
|
7
|
+
options: sm, md, lg, xl, xxl
|
|
6
8
|
- static_backdrop (boolean) (default: false)
|
|
7
9
|
- verticaly_centered (boolean) (default: false)
|
|
8
10
|
- scrollable (boolean) (default: false)
|
|
9
11
|
- header (block) (default: '')
|
|
12
|
+
- messages (block) (default: '')
|
|
10
13
|
- body (block) (default: '')
|
|
11
14
|
- footer (block) (default: '')
|
|
12
15
|
#}
|
|
13
16
|
{% set _size = size|default('') %}
|
|
14
17
|
{% set _id = id|default('modal-' ~ random(1000)) %}
|
|
18
|
+
{% set _fullscreen_responsive = fullscreen_responsive|default('') %}
|
|
15
19
|
{% set _header = header|default('') %}
|
|
16
20
|
{% set _body = body|default('') %}
|
|
21
|
+
{% set _messages = messages|default('') %}
|
|
17
22
|
{% set _static_backdrop = static_backdrop|default(false) %}
|
|
18
23
|
{% set _verticaly_centered = verticaly_centered|default(false) %}
|
|
19
24
|
{% set _scrollable = scrollable|default(false) %}
|
|
@@ -28,7 +33,7 @@
|
|
|
28
33
|
.setAttribute('id', _id)
|
|
29
34
|
.setAttribute('tabindex', '-1')
|
|
30
35
|
.setAttribute('aria-hidden', 'true')
|
|
31
|
-
.setAttribute('aria-
|
|
36
|
+
.setAttribute('aria-label', _id ~ 'Label')
|
|
32
37
|
.addClass(_classes)
|
|
33
38
|
%}
|
|
34
39
|
|
|
@@ -37,20 +42,26 @@
|
|
|
37
42
|
>
|
|
38
43
|
<div class="modal-dialog
|
|
39
44
|
{{- _size ? ' modal-' ~ size -}}
|
|
45
|
+
{{- _fullscreen_responsive ? ' modal-fullscreen-' ~ _fullscreen_responsive ~ '-down' -}}
|
|
40
46
|
{{- _verticaly_centered ? ' modal-dialog-centered' -}}
|
|
41
47
|
{{- _scrollable ? ' modal-dialog-scrollable' -}}"
|
|
42
48
|
{{- _static_backdrop ? ' data-bs-backdrop="static"' -}}
|
|
43
49
|
>
|
|
44
50
|
<div class="modal-content">
|
|
51
|
+
{% if header is not empty %}
|
|
45
52
|
<div class="modal-header">
|
|
46
53
|
{%- block header _header -%}
|
|
47
54
|
</div>
|
|
55
|
+
{% endif %}
|
|
56
|
+
{%- block messages _messages -%}
|
|
48
57
|
<div class="modal-body">
|
|
49
58
|
{%- block body _body -%}
|
|
50
59
|
</div>
|
|
60
|
+
{% if footer is not empty %}
|
|
51
61
|
<div class="modal-footer">
|
|
52
62
|
{%- block footer _footer -%}
|
|
53
63
|
</div>
|
|
64
|
+
{% endif %}
|
|
54
65
|
</div>
|
|
55
66
|
</div>
|
|
56
67
|
</div>
|
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.
|
|
5
|
+
"version": "0.20.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": "
|
|
24
|
+
"gitHead": "ea13560489a089d0c198f781e75951a9160d2554"
|
|
25
25
|
}
|