@ons/design-system 45.1.2 → 45.2.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/components/button/_macro.njk +1 -1
- package/components/footer/_footer.scss +2 -2
- package/components/header/_header.scss +10 -38
- package/components/header/_macro.njk +3 -3
- package/components/icons/_macro.njk +246 -191
- package/components/question/_macro.njk +0 -2
- package/components/section-navigation/_macro.njk +10 -1
- package/components/section-navigation/_section-navigation.scss +48 -13
- package/components/summary/_macro.njk +9 -9
- package/css/census.css +1 -1
- package/css/main.css +1 -1
- package/package.json +1 -1
- package/scss/patternlib.scss +0 -1
- package/scss/vars/_colors.scss +0 -9
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
{% from "components/collapsible/_macro.njk" import onsCollapsible %}
|
|
27
27
|
{% call onsCollapsible({
|
|
28
28
|
"id": params.definition.id if params.definition.id is defined and params.definition.id else '',
|
|
29
|
-
"titleTag": 'h2',
|
|
30
29
|
"classes": 'ons-u-mb-m',
|
|
31
30
|
"title": params.definition.title if params.definition.title is defined and params.definition.title else ''
|
|
32
31
|
}) %}
|
|
@@ -118,7 +117,6 @@
|
|
|
118
117
|
{% from "components/collapsible/_macro.njk" import onsCollapsible %}
|
|
119
118
|
{% call onsCollapsible({
|
|
120
119
|
"id": params.justification.id,
|
|
121
|
-
"titleTag": 'h2',
|
|
122
120
|
"classes": 'ons-u-mb-m',
|
|
123
121
|
"title": params.justification.title | default('Why we ask this question')
|
|
124
122
|
}) %}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
{% macro onsSectionNavigation(params) %}
|
|
2
|
-
<nav class="ons-section-nav" id="{{ params.id }}" aria-label="{{ params.ariaLabel | default("Section menu") }}">
|
|
2
|
+
<nav class="ons-section-nav{% if params.variants is defined and params.variants == 'vertical' %} ons-section-nav--vertical{% endif %}" id="{{ params.id }}" aria-label="{{ params.ariaLabel | default("Section menu") }}">
|
|
3
3
|
<ul class="ons-section-nav__list" aria-label="{{ params.ariaListLabel | default("Section menu links") }}">
|
|
4
4
|
{% for item in (params.itemsList if params.itemsList is iterable else params.itemsList.items()) %}
|
|
5
5
|
<li class="ons-section-nav__item {{ item.classes }}{{ ' ons-section-nav__item--active' if (item.url == params.currentPath) or (item.url in params.currentPath) or (params.tabQuery == item.title|lower) }}">
|
|
6
6
|
<a class="ons-section-nav__link" href="{{ item.url }}" {% if (item.url == params.currentPath) or (item.url in params.currentPath) or (params.tabQuery == item.title|lower) %} aria-current="location" {% endif %}>{{ item.title }}</a>
|
|
7
|
+
{% if item.anchors is defined and item.anchors %}
|
|
8
|
+
<ul class="ons-section-nav__sub-items ons-list ons-list--dashed ons-u-mt-xs ons-u-mb-xs">
|
|
9
|
+
{% for anchor in item.anchors %}
|
|
10
|
+
<li class="ons-section-nav__item ons-list__item">
|
|
11
|
+
<a href="{{ anchor.url }}" class="ons-section-nav__link ons-list__link">{{ anchor.title }}</a>
|
|
12
|
+
</li>
|
|
13
|
+
{% endfor %}
|
|
14
|
+
</ul>
|
|
15
|
+
{% endif %}
|
|
7
16
|
</li>
|
|
8
17
|
{% endfor %}
|
|
9
18
|
</ul>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
.ons-section-nav {
|
|
2
|
-
|
|
2
|
+
&:not(&--vertical) {
|
|
3
|
+
border-bottom: 1px solid $color-borders;
|
|
4
|
+
}
|
|
3
5
|
|
|
4
6
|
&__list {
|
|
5
7
|
list-style: none;
|
|
@@ -7,28 +9,61 @@
|
|
|
7
9
|
padding: 0;
|
|
8
10
|
}
|
|
9
11
|
|
|
12
|
+
&__link {
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
&:hover {
|
|
15
|
+
color: $color-text-link-hover;
|
|
16
|
+
text-decoration: underline solid $color-text-link-hover 2px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
10
20
|
&__item {
|
|
11
|
-
border-bottom: 4px solid transparent;
|
|
12
|
-
display: inline-block;
|
|
13
21
|
font-size: 1rem;
|
|
14
|
-
|
|
15
|
-
text-align: center;
|
|
16
|
-
&:hover,
|
|
22
|
+
padding: 0;
|
|
17
23
|
&--active {
|
|
18
|
-
border-
|
|
24
|
+
border-left: 4px solid $color-text-link-active;
|
|
25
|
+
font-weight: $font-weight-bold;
|
|
26
|
+
margin-left: -18px;
|
|
27
|
+
padding-left: 14px;
|
|
19
28
|
a {
|
|
20
|
-
color: $color-
|
|
29
|
+
color: $color-text-link-active;
|
|
21
30
|
}
|
|
22
31
|
}
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
& & {
|
|
33
|
+
margin-bottom: 0.3rem;
|
|
25
34
|
}
|
|
26
35
|
}
|
|
27
36
|
|
|
28
|
-
&
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
&__sub-items {
|
|
38
|
+
a {
|
|
39
|
+
color: $color-text-link;
|
|
40
|
+
font-weight: $font-weight-regular;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:not(&--vertical) & {
|
|
45
|
+
&__item {
|
|
46
|
+
border: none;
|
|
47
|
+
border-bottom: 4px solid transparent;
|
|
48
|
+
display: inline-block;
|
|
49
|
+
margin: 0 1rem 0 0;
|
|
50
|
+
text-align: center;
|
|
51
|
+
&--active,
|
|
52
|
+
&:hover {
|
|
53
|
+
border-color: $color-text-link-active;
|
|
54
|
+
margin: 0 1rem 0 0;
|
|
55
|
+
padding: 0;
|
|
56
|
+
a {
|
|
57
|
+
color: $color-text-link-active;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__link {
|
|
31
63
|
text-decoration: none;
|
|
64
|
+
&:hover {
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
}
|
|
32
67
|
}
|
|
33
68
|
}
|
|
34
69
|
}
|
|
@@ -11,17 +11,17 @@
|
|
|
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
|
-
<table
|
|
24
|
+
<table class="ons-summary__items">
|
|
25
25
|
<thead class="ons-u-vh">
|
|
26
26
|
<tr>
|
|
27
27
|
{% for header in group.headers %}
|
|
@@ -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 %}
|