@openeuropa/bcl-modal 1.10.8 → 1.10.10
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 +21 -23
- package/package.json +2 -2
package/modal.html.twig
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- size (string) default('')
|
|
5
3
|
options: sm, lg, xl, fullscreen
|
|
@@ -7,7 +5,8 @@
|
|
|
7
5
|
- fullscreen_responsive (string) (default: '')
|
|
8
6
|
options: sm, md, lg, xl, xxl
|
|
9
7
|
- static_backdrop (boolean) (default: false)
|
|
10
|
-
-
|
|
8
|
+
- vertically_centered (boolean) (default: false)
|
|
9
|
+
- verticaly_centered (boolean) (default: false) // deprecated typo
|
|
11
10
|
- scrollable (boolean) (default: false)
|
|
12
11
|
- header (block) (default: '')
|
|
13
12
|
- messages (block) (default: '')
|
|
@@ -25,11 +24,11 @@
|
|
|
25
24
|
- footer
|
|
26
25
|
#}
|
|
27
26
|
|
|
28
|
-
{
|
|
27
|
+
{%- set _size = size|default('') %}
|
|
29
28
|
{% set _id = id|default('modal-' ~ random(10000)) %}
|
|
30
29
|
{% set _fullscreen_responsive = fullscreen_responsive|default('') %}
|
|
31
30
|
{% set _static_backdrop = static_backdrop ?? false %}
|
|
32
|
-
{% set
|
|
31
|
+
{% set _vertically_centered = vertically_centered ?? verticaly_centered ?? false %}
|
|
33
32
|
{% set _scrollable = scrollable ?? false %}
|
|
34
33
|
{% set _header = header|default('') %}
|
|
35
34
|
{% set _header_attributes = header_attributes ?: create_attribute() %}
|
|
@@ -39,13 +38,13 @@
|
|
|
39
38
|
{% set _footer = footer|default('') %}
|
|
40
39
|
{% set _footer_attributes = footer_attributes ?: create_attribute() %}
|
|
41
40
|
|
|
42
|
-
{
|
|
41
|
+
{%- set _classes = ['modal', 'fade'] %}
|
|
43
42
|
|
|
44
|
-
{
|
|
45
|
-
{
|
|
43
|
+
{%- if attributes is empty %}
|
|
44
|
+
{%- set attributes = create_attribute() %}
|
|
46
45
|
{% endif %}
|
|
47
46
|
|
|
48
|
-
{
|
|
47
|
+
{%- set attributes = attributes
|
|
49
48
|
.setAttribute('id', _id)
|
|
50
49
|
.setAttribute('tabindex', '-1')
|
|
51
50
|
.setAttribute('aria-hidden', 'true')
|
|
@@ -53,42 +52,41 @@
|
|
|
53
52
|
.addClass(_classes)
|
|
54
53
|
%}
|
|
55
54
|
|
|
56
|
-
{
|
|
57
|
-
{
|
|
58
|
-
{% endif
|
|
55
|
+
{%- if _static_backdrop %}
|
|
56
|
+
{%- set attributes = attributes.setAttribute('data-bs-backdrop', 'static') %}
|
|
57
|
+
{% endif -%}
|
|
59
58
|
|
|
60
59
|
<div
|
|
61
60
|
{{ attributes }}
|
|
62
|
-
>
|
|
61
|
+
>{# -#}
|
|
63
62
|
<div class="modal-dialog
|
|
64
63
|
{{- _size ? ' modal-' ~ size -}}
|
|
65
64
|
{{- _fullscreen_responsive ? ' modal-fullscreen-' ~ _fullscreen_responsive ~ '-down' -}}
|
|
66
|
-
{{-
|
|
65
|
+
{{- _vertically_centered ? ' modal-dialog-centered' -}}
|
|
67
66
|
{{- _scrollable ? ' modal-dialog-scrollable' -}}"
|
|
68
|
-
>
|
|
67
|
+
>{# -#}
|
|
69
68
|
<div class="modal-content">
|
|
70
|
-
{
|
|
69
|
+
{%- if header is not empty -%}
|
|
71
70
|
<div
|
|
72
71
|
{{- _header_attributes.addClass(['modal-header']) -}}
|
|
73
72
|
>
|
|
74
73
|
{%- block header _header -%}
|
|
75
74
|
</div>
|
|
76
|
-
{
|
|
75
|
+
{%- endif %}
|
|
77
76
|
{%- block messages _messages -%}
|
|
78
77
|
<div
|
|
79
78
|
{{- _body_attributes.addClass(['modal-body']) -}}
|
|
80
79
|
>
|
|
81
80
|
{%- block body _body -%}
|
|
82
81
|
</div>
|
|
83
|
-
{
|
|
82
|
+
{%- if footer is not empty -%}
|
|
84
83
|
<div
|
|
85
84
|
{{- _footer_attributes.addClass(['modal-footer']) -}}
|
|
86
85
|
>
|
|
87
86
|
{%- block footer _footer -%}
|
|
88
87
|
</div>
|
|
89
|
-
{
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
88
|
+
{%- endif -%}
|
|
89
|
+
</div>{# -#}
|
|
90
|
+
</div>{# -#}
|
|
92
91
|
</div>
|
|
93
|
-
|
|
94
|
-
{% endapply %}
|
|
92
|
+
{#--#}
|
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": "1.10.
|
|
5
|
+
"version": "1.10.10",
|
|
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": "9f7c4a046e8f8f325e4de7e998f1c2a654f6eed1"
|
|
25
25
|
}
|