@ons/design-system 45.1.0 → 45.1.4
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.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{% endset %}
|
|
9
9
|
|
|
10
10
|
{% set descHtml %}
|
|
11
|
-
{% if params.readDescriptionFirst is defined and params.readDescriptionFirst == true %}
|
|
11
|
+
{% if params.readDescriptionFirst is defined and params.readDescriptionFirst == true %}
|
|
12
12
|
<div aria-hidden="true" {% if params.legendIsQuestionTitle is not defined %}class="ons-question__description"{% endif %}>{{ params.description | safe }}</div>
|
|
13
13
|
{% elif params.legendIsQuestionTitle is not defined %}
|
|
14
14
|
<div class="ons-question__description ons-u-mb-m">{{ params.description | safe }}</div>
|
|
@@ -21,46 +21,50 @@
|
|
|
21
21
|
<div class="ons-question__instruction ons-u-mb-m">{{ params.instruction | safe }}</div>
|
|
22
22
|
{% endset %}
|
|
23
23
|
|
|
24
|
-
{%
|
|
25
|
-
{%
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
{% if params.definition is defined and params.definition %}
|
|
25
|
+
{% set questionDefinition %}
|
|
26
|
+
{% from "components/collapsible/_macro.njk" import onsCollapsible %}
|
|
27
|
+
{% call onsCollapsible({
|
|
28
|
+
"id": params.definition.id if params.definition.id is defined and params.definition.id else '',
|
|
29
|
+
"titleTag": 'h2',
|
|
30
|
+
"classes": 'ons-u-mb-m',
|
|
31
|
+
"title": params.definition.title if params.definition.title is defined and params.definition.title else ''
|
|
32
|
+
}) %}
|
|
33
|
+
{% if params.definition.content %}
|
|
34
|
+
{{ params.definition.content | safe }}
|
|
35
|
+
{% endif %}
|
|
36
|
+
{% endcall %}
|
|
37
|
+
{% endset %}
|
|
38
|
+
{% endif %}
|
|
37
39
|
|
|
38
|
-
{%
|
|
39
|
-
{%
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
40
|
+
{% if params.guidance is defined and params.guidance %}
|
|
41
|
+
{% set questionGuidance %}
|
|
42
|
+
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
43
|
+
{% call onsPanel({
|
|
44
|
+
"classes": "ons-u-mb-m"
|
|
45
|
+
}) %}
|
|
46
|
+
{% if params.guidance.content is defined and params.guidance.content %}
|
|
47
|
+
{{ params.guidance.content | safe }}
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% if params.guidance.lists is defined and params.guidance.lists %}
|
|
50
|
+
{%- for item in params.guidance.lists -%}
|
|
51
|
+
{% if item.listHeading is defined and item.listHeading %}
|
|
52
|
+
<h2 class="ons-u-fs-r--b">{{ item.listHeading }}</h2>
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% if item.listLeadingLine is defined and item.listLeadingLine %}
|
|
55
|
+
<p>{{ item.listLeadingLine }}</h2>
|
|
56
|
+
{% endif %}
|
|
57
|
+
{% from "components/lists/_macro.njk" import onsList %}
|
|
58
|
+
{{
|
|
59
|
+
onsList({
|
|
60
|
+
"itemsList": item.itemsList
|
|
61
|
+
})
|
|
62
|
+
}}
|
|
63
|
+
{% endfor -%}
|
|
64
|
+
{% endif -%}
|
|
65
|
+
{% endcall %}
|
|
66
|
+
{% endset %}
|
|
67
|
+
{% endif %}
|
|
64
68
|
|
|
65
69
|
<div
|
|
66
70
|
{% if params.id is defined and params.id %} id="{{ params.id }}"{% endif %}
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
{% endif %}
|
|
12
12
|
<div class="{{ className }}">
|
|
13
13
|
{% for summary in params.summaries %}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{%
|
|
14
|
+
{% if summary.summaryTitle is defined and summary.summaryTitle %}
|
|
15
|
+
<h2 class="ons-summary__title ons-u-mb-m">{{ summary.summaryTitle }}</h2>
|
|
16
|
+
{% set titleSize = "3" %}
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% for group in summary.groups %}
|
|
19
|
+
<div {% if group.id is defined and group.id %}id="{{ group.id }}" {% endif %} class="ons-summary__group">
|
|
20
20
|
{% if group.groupTitle is defined and group.groupTitle %}
|
|
21
21
|
<h{{ titleSize }} class="ons-summary__group-title">{{ group.groupTitle }}</h{{ titleSize }}>
|
|
22
22
|
{% endif %}
|
|
23
23
|
{% if group.headers is defined and group.headers and group.rows is defined and group.rows %}
|
|
24
24
|
<table class="ons-summary__items">
|
|
25
|
-
<thead
|
|
25
|
+
<thead class="ons-u-vh">
|
|
26
26
|
<tr>
|
|
27
27
|
{% for header in group.headers %}
|
|
28
28
|
<th>{{ header }}</th>
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
<a {% if group.summaryLink.attributes is defined and group.summaryLink.attributes %}{% for attribute, value in (group.summaryLink.attributes.items() if group.summaryLink.attributes is mapping and group.summaryLink.attributes.items else group.summaryLink.attributes) %}{{attribute}}="{{value}}" {% endfor %}{% endif %} href="{{ group.summaryLink.url }}">{{ group.summaryLink.text }}</a>
|
|
123
123
|
</div>
|
|
124
124
|
{% endif %}
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
</div>
|
|
126
|
+
{% endfor %}
|
|
127
127
|
{% endfor %}
|
|
128
128
|
</div>
|
|
129
129
|
{% endmacro %}
|