@openeuropa/bcl-alert 0.4230.202512021730 → 0.4360.202601141610
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/alert.html.twig +18 -18
- package/package.json +2 -2
package/alert.html.twig
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- attributes (drupal attrs)
|
|
10
10
|
#}
|
|
11
11
|
|
|
12
|
-
{
|
|
12
|
+
{%- set _message = message|default('') %}
|
|
13
13
|
{% set _heading = heading|default('') %}
|
|
14
14
|
{% set _variant = variant|default('primary') %}
|
|
15
15
|
{% set _dismissible = dismissible ?? true %}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
{% set _icon_path = icon_path|default('') %}
|
|
18
18
|
{% set _icon_name = icon_name|default('') %}
|
|
19
19
|
|
|
20
|
-
{
|
|
20
|
+
{%- set _classes = ['alert', 'alert-' ~ _variant|e('html_attr'), 'd-flex', 'align-items-center'] %}
|
|
21
21
|
{% set _icon_names = {
|
|
22
22
|
primary: "info-circle-fill",
|
|
23
23
|
secondary: "info-circle-fill",
|
|
@@ -30,36 +30,36 @@
|
|
|
30
30
|
}
|
|
31
31
|
%}
|
|
32
32
|
|
|
33
|
-
{
|
|
34
|
-
{
|
|
33
|
+
{%- if _dismissible %}
|
|
34
|
+
{%- set _classes = _classes|merge(['alert-dismissible']) %}
|
|
35
35
|
{% endif %}
|
|
36
36
|
{% if _animated_dismiss %}
|
|
37
|
-
{
|
|
37
|
+
{%- set _classes = _classes|merge(['fade', 'show']) %}
|
|
38
38
|
{% endif %}
|
|
39
39
|
|
|
40
|
-
{
|
|
40
|
+
{%- set _classes = _classes|merge(['text-dark']) %}
|
|
41
41
|
|
|
42
|
-
{
|
|
42
|
+
{%- set _icon_classes = ['flex-shrink-0 me-3 mt-1 align-self-start' ] %}
|
|
43
43
|
|
|
44
|
-
{
|
|
45
|
-
{
|
|
44
|
+
{%- if _variant != 'light' %}
|
|
45
|
+
{%- set _icon_classes = _icon_classes|merge(['text-' ~ _variant]) %}
|
|
46
46
|
{% endif %}
|
|
47
47
|
|
|
48
|
-
{
|
|
49
|
-
{
|
|
48
|
+
{%- if attributes is empty %}
|
|
49
|
+
{%- set attributes = create_attribute() %}
|
|
50
50
|
{% endif %}
|
|
51
51
|
|
|
52
|
-
{
|
|
52
|
+
{%- set attributes = attributes.addClass(_classes).setAttribute('role', 'alert') -%}
|
|
53
53
|
|
|
54
54
|
<div {{ attributes }}>
|
|
55
|
-
{
|
|
56
|
-
{
|
|
55
|
+
{%- if _icon_path is not empty %}
|
|
56
|
+
{%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
57
57
|
name: _icon_name ?: _icon_names[_variant],
|
|
58
58
|
size: 's',
|
|
59
59
|
path: _icon_path,
|
|
60
60
|
attributes: create_attribute().addClass(_icon_classes),
|
|
61
61
|
} only %}
|
|
62
|
-
{% endif
|
|
62
|
+
{% endif -%}
|
|
63
63
|
<div class="alert-content flex-grow-1">
|
|
64
64
|
{%- if _heading is not empty -%}
|
|
65
65
|
<div class="alert-heading h4">{{ _heading }}</div>
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
type="button"
|
|
74
74
|
class="btn-close"
|
|
75
75
|
data-bs-dismiss="alert"
|
|
76
|
-
aria-label="Close"
|
|
77
|
-
|
|
76
|
+
aria-label="Close"
|
|
77
|
+
></button>
|
|
78
78
|
{%- endif -%}
|
|
79
79
|
</div>
|
|
80
|
-
|
|
80
|
+
{#--#}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-alert",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4360.202601141610",
|
|
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": "2caf9255f88587416f6e83e572a1f20e4cf206f5"
|
|
25
25
|
}
|