@ons/design-system 45.1.5 → 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/question/_macro.njk +0 -2
- package/components/section-navigation/_macro.njk +10 -1
- package/components/section-navigation/_section-navigation.scss +48 -13
- package/css/census.css +1 -1
- package/css/main.css +1 -1
- package/package.json +1 -1
- package/scss/patternlib.scss +0 -1
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
{% if params.value is defined and params.value %}value="{{ params.value }}"{% endif %}
|
|
50
50
|
{% if params.name is defined and params.name and tag != "a" %}name="{{ params.name }}"{% elif params.name is defined and params.name and tag == "a" %}id="{{ params.name }}"{% endif %}
|
|
51
51
|
{% if params.url is defined and params.url and params.newWindow is defined and params.newWindow %}target="_blank" rel="noopener"{% endif %}
|
|
52
|
-
{% if params.buttonStyle == "download" %} download{% endif %}
|
|
52
|
+
{% if params.buttonStyle == "download" and (params.removeDownloadAttribute is not defined or not params.removeDownloadAttribute or params.removeDownloadAttribute != true) %} download{% endif %}
|
|
53
53
|
{% if params.attributes is defined and params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %} {{attribute}}="{{value}}"{% endfor %}{% endif %}
|
|
54
54
|
>
|
|
55
55
|
<span class="ons-btn__inner{% if params.innerClasses is defined and params.innerClasses %} {{ params.innerClasses }}{% endif %}">
|
|
@@ -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
|
}
|