@openeuropa/bcl-progress 1.10.9 → 1.10.11
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/package.json +2 -2
- package/progress.html.twig +16 -20
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-progress",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.11",
|
|
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": "82aecf2f60f8bd8f9afd447ea0d044396f085823"
|
|
25
25
|
}
|
package/progress.html.twig
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- progress (int) (default: 0)
|
|
5
3
|
- min (int) (default: 0)
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
- attributes (drupal attrs)
|
|
15
13
|
#}
|
|
16
14
|
|
|
17
|
-
{
|
|
15
|
+
{%- set _progress = progress|default(0) %}
|
|
18
16
|
{% set _min = min|default(0) %}
|
|
19
17
|
{% set _max = max|default(100) %}
|
|
20
18
|
{% set _striped = striped ?? false %}
|
|
@@ -25,33 +23,33 @@
|
|
|
25
23
|
{% set _variant = variant|default('') %}
|
|
26
24
|
{% set _message = message|default('') %}
|
|
27
25
|
|
|
28
|
-
{
|
|
26
|
+
{%- set _classes = 'progress-bar' %}
|
|
29
27
|
{% if _striped is not empty %}
|
|
30
|
-
{
|
|
28
|
+
{%- set _classes = _classes ~ ' progress-bar-striped' %}
|
|
31
29
|
{% endif %}
|
|
32
30
|
{% if _animated is not empty %}
|
|
33
|
-
{
|
|
31
|
+
{%- set _classes = _classes ~ ' progress-bar-animated' %}
|
|
34
32
|
{% endif %}
|
|
35
33
|
{% if _variant is not empty %}
|
|
36
|
-
{
|
|
34
|
+
{%- set _classes = _classes ~ ' text-bg-' ~ _variant %}
|
|
37
35
|
{% endif %}
|
|
38
36
|
|
|
39
|
-
{
|
|
40
|
-
{
|
|
37
|
+
{%- if attributes is empty %}
|
|
38
|
+
{%- set attributes = create_attribute() %}
|
|
41
39
|
{% endif %}
|
|
42
40
|
|
|
43
|
-
{
|
|
41
|
+
{%- set attributes = attributes.addClass(['progress']) %}
|
|
44
42
|
|
|
45
|
-
{
|
|
46
|
-
{
|
|
43
|
+
{%- if _bar_label is empty %}
|
|
44
|
+
{%- set _bar_label = _progress ~ '%' %}
|
|
47
45
|
{% endif %}
|
|
48
46
|
|
|
49
|
-
{
|
|
47
|
+
{%- if _label is not empty -%}
|
|
50
48
|
<label class="progress-bar-label">{{ _label }}</label>
|
|
51
|
-
{
|
|
49
|
+
{%- endif -%}
|
|
52
50
|
<div
|
|
53
51
|
{{ attributes }}
|
|
54
|
-
>
|
|
52
|
+
>{# -#}
|
|
55
53
|
<div
|
|
56
54
|
class="{{ _classes }}"
|
|
57
55
|
role="progressbar"
|
|
@@ -64,10 +62,8 @@
|
|
|
64
62
|
{%- if not _hidden_label -%}
|
|
65
63
|
{{- _bar_label -}}
|
|
66
64
|
{%- endif -%}
|
|
67
|
-
</div>
|
|
65
|
+
</div>{# -#}
|
|
68
66
|
</div>
|
|
69
|
-
{
|
|
67
|
+
{%- if _message is not empty -%}
|
|
70
68
|
<small class="form-text text-muted progress-bar-message">{{ _message }}</small>
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
{% endapply %}
|
|
69
|
+
{%- endif -%}
|