@ons/design-system 57.0.0 → 58.0.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/autosuggest/_autosuggest.scss +16 -16
- package/components/breadcrumbs/_breadcrumbs.scss +2 -2
- package/components/browser-banner/_browser-banner.scss +5 -5
- package/components/button/_button.scss +62 -62
- package/components/call-to-action/_call-to-action.scss +1 -1
- package/components/checkboxes/_checkbox.scss +16 -16
- package/components/collapsible/_collapsible.scss +8 -8
- package/components/content-pagination/_content-pagination.scss +1 -1
- package/components/cookies-banner/_cookies-banner.scss +3 -3
- package/components/document-list/document-list.scss +10 -10
- package/components/download-resources/_download-resources.scss +5 -5
- package/components/external-link/_external-link.scss +4 -4
- package/components/feedback/_feedback.scss +3 -3
- package/components/field/_field.scss +1 -1
- package/components/find-a-support-centre/_find-a-support-centre.scss +1 -1
- package/components/footer/_footer.scss +7 -7
- package/components/header/_header.scss +26 -26
- package/components/hero/_hero.scss +4 -4
- package/components/input/_input-type.scss +5 -5
- package/components/input/_input.scss +13 -13
- package/components/label/_label.scss +1 -1
- package/components/lists/_list.scss +1 -1
- package/components/message/_message.scss +3 -3
- package/components/message-list/_message-list.scss +1 -1
- package/components/modal/_modal.scss +1 -1
- package/components/navigation/_macro.njk +1 -1
- package/components/navigation/_macro.spec.js +20 -2
- package/components/navigation/_navigation.scss +14 -14
- package/components/pagination/_pagination.scss +2 -2
- package/components/panel/_panel.scss +22 -22
- package/components/phase-banner/_phase-banner.scss +3 -3
- package/components/promotional-banner/_promo-banner.scss +5 -5
- package/components/question/_question.scss +4 -4
- package/components/quote/_quote.scss +2 -2
- package/components/radios/_radio.scss +6 -4
- package/components/related-content/_related-content.scss +2 -2
- package/components/relationships/_relationships.scss +2 -2
- package/components/section-navigation/_macro.njk +1 -1
- package/components/section-navigation/_section-navigation.scss +8 -8
- package/components/skip-to-content/_skip.scss +3 -3
- package/components/status/_status.scss +5 -5
- package/components/summary/_summary.scss +6 -6
- package/components/table/_table.scss +18 -18
- package/components/table-of-contents/_toc.scss +3 -3
- package/components/table-of-contents/toc.dom.js +2 -4
- package/components/tabs/_macro.njk +18 -5
- package/components/tabs/_macro.spec.js +54 -0
- package/components/tabs/_tabs.scss +57 -25
- package/components/tabs/tabs.js +35 -12
- package/components/tabs/tabs.spec.js +104 -10
- package/components/text-indent/_text-indent.scss +1 -1
- package/components/timeline/_timeline.scss +2 -2
- package/components/upload/_upload.scss +6 -6
- package/css/census.css +3 -3
- package/css/ids.css +3 -3
- package/css/main.css +3 -3
- package/css/print.css +1 -1
- package/package.json +1 -1
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +2 -2
- package/scss/base/_global.scss +7 -7
- package/scss/base/_typography.scss +2 -2
- package/scss/census.scss +1 -1
- package/scss/helpers/_functions.scss +0 -8
- package/scss/ids.scss +1 -1
- package/scss/overrides/hcm.scss +1 -1
- package/scss/overrides/rtl.scss +1 -1
- package/scss/patternlib.scss +10 -9
- package/scss/print.scss +7 -5
- package/scss/settings/_census.scss +24 -19
- package/scss/settings/_ids.scss +16 -12
- package/scss/utilities/_border.scss +1 -1
- package/scss/utilities/_colors.scss +1 -10
- package/scss/utilities/_grid.scss +3 -3
- package/scss/utilities/_typography.scss +1 -1
- package/scss/vars/_colors.scss +112 -99
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
margin-bottom: 0;
|
|
5
5
|
|
|
6
6
|
&__item {
|
|
7
|
-
border-bottom: 1px solid
|
|
7
|
+
border-bottom: 1px solid var(--ons-color-borders-list);
|
|
8
8
|
margin: 0 0 1.5rem;
|
|
9
9
|
padding: 0 0 1.5rem;
|
|
10
10
|
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
&__item-image--file & {
|
|
49
49
|
&__image-link {
|
|
50
|
-
border-color:
|
|
50
|
+
border-color: var(--ons-color-borders-document-image);
|
|
51
51
|
|
|
52
52
|
&--placeholder {
|
|
53
53
|
height: 136px;
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
width: 100%;
|
|
63
63
|
|
|
64
64
|
&:focus {
|
|
65
|
-
background-color:
|
|
66
|
-
border: 2px solid
|
|
65
|
+
background-color: var(--ons-color-placeholder) !important;
|
|
66
|
+
border: 2px solid var(--ons-color-borders-document-image-focus);
|
|
67
67
|
box-shadow: none;
|
|
68
|
-
outline: 4px solid
|
|
68
|
+
outline: 4px solid var(--ons-color-focus) !important;
|
|
69
69
|
outline-offset: 0;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&--placeholder {
|
|
73
73
|
background-clip: padding-box;
|
|
74
|
-
background-color:
|
|
74
|
+
background-color: var(--ons-color-borders-document-image);
|
|
75
75
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='%23fff' d='M0 19.39c.49-1 1-2 1.55-2.93A31.59 31.59 0 0 1 0 11.72v7.67ZM3 0S0 0 0 3.7v2a34.85 34.85 0 0 0 2.17 9.76A31.2 31.2 0 0 1 8.3 8.3c4.84-4.16 11.36-7 20.21-8.29Zm28.84 2c-10.11 1-17 3.86-22 8.1a29.78 29.78 0 0 0-6.49 8C7.26 25.65 14.66 31.19 27 32h1.21A3.71 3.71 0 0 0 32 27.91V2a.41.41 0 0 1-.16 0Zm-26 21.49a25.94 25.94 0 0 1-3-4.4A48 48 0 0 0 0 25.71V32h20.23a26.41 26.41 0 0 1-14.39-8.49Z'/%3e%3c/svg%3e");
|
|
76
76
|
background-position: center;
|
|
77
77
|
background-repeat: no-repeat;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
&__item-attribute {
|
|
90
|
-
color:
|
|
90
|
+
color: var(--ons-color-text-metadata);
|
|
91
91
|
display: inline-block;
|
|
92
92
|
margin: 0 1rem 0 0;
|
|
93
93
|
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
color: inherit;
|
|
99
99
|
|
|
100
100
|
&:hover {
|
|
101
|
-
color:
|
|
102
|
-
text-decoration: underline solid
|
|
101
|
+
color: var(--ons-color-text-metadata);
|
|
102
|
+
text-decoration: underline solid var(--ons-color-text-metadata) 2px;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
.ons-document-list {
|
|
118
118
|
&__item {
|
|
119
119
|
&--featured {
|
|
120
|
-
background-color:
|
|
120
|
+
background-color: var(--ons-color-banner-bg);
|
|
121
121
|
border-bottom: none;
|
|
122
122
|
display: block;
|
|
123
123
|
outline: 2px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show background
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ons-adv-filter {
|
|
2
2
|
&__gallery {
|
|
3
|
-
border-top: 1px solid
|
|
3
|
+
border-top: 1px solid var(--ons-color-borders-list);
|
|
4
4
|
margin-left: 0;
|
|
5
5
|
padding-left: 0;
|
|
6
6
|
padding-top: 1.5rem;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&__selection {
|
|
22
|
-
color:
|
|
22
|
+
color: var(--ons-color-grey-100);
|
|
23
23
|
margin-bottom: 0.5rem;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
&__panel--is-visible {
|
|
51
|
-
background-color:
|
|
51
|
+
background-color: var(--ons-color-white);
|
|
52
52
|
bottom: 0;
|
|
53
53
|
display: block;
|
|
54
54
|
height: calc(100% - 76px); // Height of action buttons
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&__actions {
|
|
65
|
-
background-color:
|
|
65
|
+
background-color: var(--ons-color-white);
|
|
66
66
|
bottom: 0;
|
|
67
|
-
box-shadow: 0 0 5px 0 rgba(
|
|
67
|
+
box-shadow: 0 0 5px 0 rgba(var(--ons-color-black), 0.5), 0 -1px 0 0 rgba(var(--ons-color-grey-100), 0.5);
|
|
68
68
|
display: flex;
|
|
69
69
|
left: 0;
|
|
70
70
|
padding: 1rem;
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
white-space: nowrap;
|
|
5
5
|
}
|
|
6
6
|
.ons-svg-icon {
|
|
7
|
-
fill:
|
|
7
|
+
fill: var(--ons-color-grey-100);
|
|
8
8
|
margin: 0 0 0 0.25rem;
|
|
9
9
|
padding-bottom: 0.1rem;
|
|
10
10
|
visibility: visible;
|
|
11
11
|
}
|
|
12
12
|
&:focus {
|
|
13
13
|
.ons-svg-icon {
|
|
14
|
-
fill:
|
|
14
|
+
fill: var(--ons-color-black);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
&:hover {
|
|
18
18
|
.ons-svg-icon {
|
|
19
|
-
fill:
|
|
19
|
+
fill: var(--ons-color-text-link-hover);
|
|
20
20
|
.ons-footer & {
|
|
21
|
-
fill:
|
|
21
|
+
fill: var(--ons-color-black);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.ons-feedback {
|
|
2
|
-
border: 3px solid
|
|
2
|
+
border: 3px solid var(--ons-color-branded);
|
|
3
3
|
margin-bottom: 2rem;
|
|
4
4
|
padding: 1rem;
|
|
5
5
|
position: relative;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
}
|
|
9
9
|
&::before {
|
|
10
10
|
border-bottom: 15px solid transparent;
|
|
11
|
-
border-left: 15px solid
|
|
11
|
+
border-left: 15px solid var(--ons-color-branded);
|
|
12
12
|
border-right: 15px solid transparent;
|
|
13
|
-
border-top: 15px solid
|
|
13
|
+
border-top: 15px solid var(--ons-color-branded);
|
|
14
14
|
bottom: -30px;
|
|
15
15
|
content: '';
|
|
16
16
|
height: 0;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
.ons-footer {
|
|
2
2
|
a {
|
|
3
|
-
color:
|
|
3
|
+
color: var(--ons-color-text-banner-link);
|
|
4
4
|
text-decoration: underline;
|
|
5
5
|
|
|
6
6
|
&:hover {
|
|
7
|
-
color:
|
|
8
|
-
text-decoration: underline solid
|
|
7
|
+
color: var(--ons-color-text-banner-link-hover);
|
|
8
|
+
text-decoration: underline solid var(--ons-color-text-banner-link-hover) 2px;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
&__button-container {
|
|
13
13
|
background-clip: border-box;
|
|
14
|
-
background-color:
|
|
14
|
+
background-color: var(--ons-color-header);
|
|
15
15
|
padding: 1rem;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&__warning {
|
|
19
|
-
background-color:
|
|
19
|
+
background-color: var(--ons-color-banner-bg-dark);
|
|
20
20
|
outline: 2px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show background
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
|
|
33
33
|
.ons-svg-logo,
|
|
34
34
|
.ons-svg-logo__group {
|
|
35
|
-
fill:
|
|
35
|
+
fill: var(--ons-color-black) !important;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&__body {
|
|
39
|
-
background-color:
|
|
39
|
+
background-color: var(--ons-color-banner-bg);
|
|
40
40
|
padding: 2rem 0 4rem;
|
|
41
41
|
|
|
42
42
|
.ons-list__link {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
// Elements
|
|
10
10
|
&__top {
|
|
11
|
-
background:
|
|
11
|
+
background: var(--ons-color-header-masthead);
|
|
12
12
|
width: 100%;
|
|
13
13
|
}
|
|
14
14
|
&__grid-top {
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
&__main {
|
|
27
|
-
background:
|
|
27
|
+
background: var(--ons-color-header);
|
|
28
28
|
padding: 0.56rem 0;
|
|
29
29
|
|
|
30
30
|
&--border {
|
|
31
|
-
border-bottom: 3px solid
|
|
32
|
-
border-top: 3px solid
|
|
31
|
+
border-bottom: 3px solid var(--ons-color-header);
|
|
32
|
+
border-top: 3px solid var(--ons-color-header);
|
|
33
33
|
padding: 0.934rem 0;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
@extend .ons-u-fs-r--b;
|
|
38
38
|
@extend .ons-u-fs-xl\@xxs;
|
|
39
39
|
|
|
40
|
-
color:
|
|
40
|
+
color: var(--ons-color-white);
|
|
41
41
|
|
|
42
42
|
@include mq(m) {
|
|
43
43
|
margin-bottom: 1rem;
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
text-decoration: none;
|
|
50
50
|
&:focus {
|
|
51
51
|
.ons-header__title {
|
|
52
|
-
color:
|
|
52
|
+
color: var(--ons-color-text-link-focus);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
&:hover {
|
|
56
|
-
text-decoration: underline solid
|
|
56
|
+
text-decoration: underline solid var(--ons-color-text-inverse-link) 2px;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
@extend .ons-u-fs-s;
|
|
62
62
|
@extend .ons-u-fs-r\@s;
|
|
63
63
|
|
|
64
|
-
color:
|
|
64
|
+
color: var(--ons-color-white);
|
|
65
65
|
margin: 0;
|
|
66
66
|
|
|
67
67
|
@include mq(m) {
|
|
@@ -83,30 +83,30 @@
|
|
|
83
83
|
&--internal &,
|
|
84
84
|
&--neutral & {
|
|
85
85
|
&__top {
|
|
86
|
-
background:
|
|
86
|
+
background: var(--ons-color-header-masthead-internal);
|
|
87
87
|
.ons-svg-logo {
|
|
88
88
|
display: block;
|
|
89
89
|
.ons-svg-logo__group--text,
|
|
90
90
|
.ons-svg-logo__group--primary {
|
|
91
|
-
fill:
|
|
91
|
+
fill: var(--ons-color-white);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
&__org-logo-link:focus {
|
|
96
96
|
background-color: transparent;
|
|
97
97
|
box-shadow: none;
|
|
98
|
-
outline: 3px solid
|
|
98
|
+
outline: 3px solid var(--ons-color-focus);
|
|
99
99
|
.ons-svg-logo {
|
|
100
|
-
fill:
|
|
100
|
+
fill: var(--ons-color-text-link-focus);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
&__grid-top {
|
|
104
|
-
color:
|
|
104
|
+
color: var(--ons-color-text-inverse);
|
|
105
105
|
min-height: 36px;
|
|
106
106
|
a {
|
|
107
|
-
color:
|
|
107
|
+
color: var(--ons-color-text-inverse);
|
|
108
108
|
&:hover {
|
|
109
|
-
text-decoration: underline solid
|
|
109
|
+
text-decoration: underline solid var(--ons-color-text-inverse-link-hover) 3px;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -114,23 +114,23 @@
|
|
|
114
114
|
|
|
115
115
|
&--neutral & {
|
|
116
116
|
&__top {
|
|
117
|
-
background:
|
|
117
|
+
background: var(--ons-color-header-masthead-dark);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
&__main {
|
|
121
|
-
background:
|
|
121
|
+
background: var(--ons-color-header-light);
|
|
122
122
|
|
|
123
123
|
&--border {
|
|
124
|
-
border-bottom: 3px solid
|
|
125
|
-
border-top: 3px solid
|
|
124
|
+
border-bottom: 3px solid var(--ons-color-header-light);
|
|
125
|
+
border-top: 3px solid var(--ons-color-header-light);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
&__title {
|
|
130
|
-
color:
|
|
130
|
+
color: var(--ons-color-branded-text);
|
|
131
131
|
&-link {
|
|
132
132
|
&:hover {
|
|
133
|
-
text-decoration: underline solid
|
|
133
|
+
text-decoration: underline solid var(--ons-color-branded-text) 2px;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
display: block;
|
|
146
146
|
&:focus {
|
|
147
147
|
.ons-svg-logo {
|
|
148
|
-
fill:
|
|
148
|
+
fill: var(--ons-color-black) !important;
|
|
149
149
|
.ons-svg-logo__group {
|
|
150
|
-
fill:
|
|
150
|
+
fill: var(--ons-color-black) !important;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}
|
|
@@ -182,14 +182,14 @@
|
|
|
182
182
|
display: inline-block;
|
|
183
183
|
|
|
184
184
|
&--mobile {
|
|
185
|
-
background:
|
|
185
|
+
background: var(--ons-color-branded-tint);
|
|
186
186
|
padding: 1rem;
|
|
187
187
|
width: 100%;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
.ons-header--neutral & {
|
|
191
191
|
&--mobile {
|
|
192
|
-
background:
|
|
192
|
+
background: var(--ons-color-grey-5);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
.ons-language-links {
|
|
219
|
-
border-top: 1px solid
|
|
219
|
+
border-top: 1px solid var(--ons-color-branded);
|
|
220
220
|
margin: 1.5rem 0 0;
|
|
221
221
|
padding: 1rem 0 0;
|
|
222
222
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Default
|
|
2
2
|
.ons-hero {
|
|
3
|
-
background-color:
|
|
3
|
+
background-color: var(--ons-color-banner-bg);
|
|
4
4
|
display: flex;
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
padding: 0;
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
|
|
44
44
|
&--dark & {
|
|
45
45
|
&__details {
|
|
46
|
-
color:
|
|
46
|
+
color: var(--ons-color-text-inverse) !important;
|
|
47
47
|
|
|
48
48
|
a {
|
|
49
49
|
color: inherit;
|
|
50
|
-
text-decoration: underline solid
|
|
50
|
+
text-decoration: underline solid var(--ons-color-text-inverse-link) 1px;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
a:hover {
|
|
54
|
-
color:
|
|
54
|
+
color: var(--ons-color-text-inverse-link-hover);
|
|
55
55
|
text-decoration-thickness: 2px;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
|
|
22
22
|
// Overide default input error style so it can wrap prefix/suffix too
|
|
23
23
|
&.ons-input--error:not(:focus) {
|
|
24
|
-
border-right: $input-border-width solid
|
|
24
|
+
border-right: $input-border-width solid var(--ons-color-input-border);
|
|
25
25
|
box-shadow: none;
|
|
26
26
|
outline: none;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&__type {
|
|
31
|
-
background-color:
|
|
31
|
+
background-color: var(--ons-color-button-secondary);
|
|
32
32
|
display: block;
|
|
33
33
|
flex: 0 0 auto;
|
|
34
34
|
font-size: 1rem;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
&__type,
|
|
47
47
|
&__type[title] {
|
|
48
|
-
border: 1px solid
|
|
48
|
+
border: 1px solid var(--ons-color-input-border);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
&__type[title] {
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
.ons-input--error:not(:focus) {
|
|
96
96
|
& + .ons-input-type__type,
|
|
97
97
|
& + .ons-input-type__type[title] {
|
|
98
|
-
border-color:
|
|
98
|
+
border-color: var(--ons-color-errors);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
& + .ons-input-type__type::after {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
bottom: 0;
|
|
104
104
|
|
|
105
105
|
// Style input + prefix/suffix for errors
|
|
106
|
-
box-shadow: 0 0 0 1px
|
|
106
|
+
box-shadow: 0 0 0 1px var(--ons-color-errors);
|
|
107
107
|
content: '';
|
|
108
108
|
display: block;
|
|
109
109
|
left: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
%ons-input-focus {
|
|
2
|
-
box-shadow: 0 0 0 $input-border-width
|
|
2
|
+
box-shadow: 0 0 0 $input-border-width var(--ons-color-input-border), 0 0 0 4px var(--ons-color-focus);
|
|
3
3
|
|
|
4
4
|
// Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
|
|
5
5
|
outline: 3px solid transparent;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.ons-input {
|
|
15
|
-
border: $input-border-width solid
|
|
15
|
+
border: $input-border-width solid var(--ons-color-input-border);
|
|
16
16
|
border-radius: $input-radius;
|
|
17
17
|
color: inherit;
|
|
18
18
|
display: block;
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
&:disabled {
|
|
51
|
-
border-color:
|
|
51
|
+
border-color: var(--ons-color-grey-75);
|
|
52
52
|
cursor: not-allowed;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
&--error:not(:focus) {
|
|
56
|
-
border: $input-border-width solid
|
|
57
|
-
box-shadow: 0 0 0 $input-border-width
|
|
56
|
+
border: $input-border-width solid var(--ons-color-errors);
|
|
57
|
+
box-shadow: 0 0 0 $input-border-width var(--ons-color-errors);
|
|
58
58
|
outline: 1px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
.ons-input--select {
|
|
84
84
|
appearance: none;
|
|
85
|
-
background:
|
|
85
|
+
background: var(--ons-color-input-bg)
|
|
86
86
|
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11.75 7.7'%3E%3Cpath fill='currentColor' d='m1.37.15 4.5 5.1 4.5-5.1a.37.37 0 0 1 .6 0l.7.7a.45.45 0 0 1 0 .5l-5.5 6.2a.37.37 0 0 1-.6 0l-5.5-6.1a.64.64 0 0 1 0-.6l.7-.7a.64.64 0 0 1 .6 0Z'/%3E%3C/svg%3E")
|
|
87
87
|
no-repeat center right 10px;
|
|
88
88
|
background-size: 1rem;
|
|
@@ -111,29 +111,29 @@
|
|
|
111
111
|
color: transparent;
|
|
112
112
|
}
|
|
113
113
|
&:valid:not(:placeholder-shown) {
|
|
114
|
-
background-color:
|
|
114
|
+
background-color: var(--ons-color-input-bg);
|
|
115
115
|
}
|
|
116
116
|
&:focus {
|
|
117
|
-
background-color:
|
|
117
|
+
background-color: var(--ons-color-input-bg);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.ons-input--limit-reached:not(:focus) {
|
|
122
|
-
border: $input-border-width solid
|
|
122
|
+
border: $input-border-width solid var(--ons-color-ruby-red);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.ons-input__limit {
|
|
126
126
|
display: block;
|
|
127
127
|
|
|
128
128
|
&--reached {
|
|
129
|
-
color:
|
|
129
|
+
color: var(--ons-color-ruby-red);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.ons-input--ghost {
|
|
134
134
|
border: 2px solid rgba(255, 255, 255, 0.6);
|
|
135
135
|
&:focus {
|
|
136
|
-
border: 2px solid
|
|
136
|
+
border: 2px solid var(--ons-color-input-border);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -156,12 +156,12 @@
|
|
|
156
156
|
&:focus,
|
|
157
157
|
&:active {
|
|
158
158
|
background-position: 12px 10px;
|
|
159
|
-
box-shadow: 0 0 0 3px
|
|
159
|
+
box-shadow: 0 0 0 3px var(--ons-color-focus);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
&--dark {
|
|
164
|
-
border: 2px solid
|
|
164
|
+
border: 2px solid var(--ons-color-black);
|
|
165
165
|
&.ons-input-search--icon {
|
|
166
166
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M11.86 10.23 8.62 6.99a4.63 4.63 0 1 0-6.34 1.64 4.55 4.55 0 0 0 2.36.64 4.65 4.65 0 0 0 2.33-.65l3.24 3.23a.46.46 0 0 0 .65 0l1-1a.48.48 0 0 0 0-.62Zm-5-3.32a3.28 3.28 0 0 1-2.31.93 3.22 3.22 0 1 1 2.35-.93Z'/%3E%3C/svg%3E");
|
|
167
167
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
outline: 1px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show background
|
|
7
7
|
|
|
8
8
|
&--sent {
|
|
9
|
-
background:
|
|
9
|
+
background: var(--ons-color-info-tint);
|
|
10
10
|
|
|
11
11
|
@include mq(m) {
|
|
12
12
|
margin-left: 4rem;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
&--received {
|
|
17
|
-
background:
|
|
17
|
+
background: var(--ons-color-success-tint);
|
|
18
18
|
|
|
19
19
|
@include mq(m) {
|
|
20
20
|
margin-right: 4rem;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&__head {
|
|
25
|
-
border-bottom: 1px solid
|
|
25
|
+
border-bottom: 1px solid var(--ons-color-borders);
|
|
26
26
|
padding: $grid-gutters;
|
|
27
27
|
position: relative;
|
|
28
28
|
}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</div>
|
|
52
52
|
{% if params.navigation.subNavigation %}
|
|
53
53
|
<nav class="ons-navigation ons-navigation--sub ons-u-d-no@xxs@l{{ ' ' + params.navigation.subNavigation.classes if params.navigation.subNavigation.classes }}" id="{{ params.navigation.subNavigation.id }}" aria-label="{{ params.navigation.subNavigation.ariaLabel | default("Section menu") }}" data-analytics="header-section-navigation">
|
|
54
|
-
<div class="ons-container ons-container--gutterless@xxs@l{{ ' ons-container--full-width' if params.navigation.fullWidth }}{{ ' ons-container--wide' if params.navigation.wide }}">
|
|
54
|
+
<div class="ons-container ons-container--gutterless@xxs@l{{ ' ons-container--full-width' if params.navigation.fullWidth }}{{ ' ons-container--wide' if params.wide or params.navigation.wide }}">
|
|
55
55
|
<ul class="ons-navigation__list ons-navigation__list">
|
|
56
56
|
{% for item in (params.navigation.subNavigation.itemsList if params.navigation.subNavigation.itemsList is iterable else params.navigation.subNavigation.itemsList.items()) %}
|
|
57
57
|
<li class="ons-navigation__item {{ item.classes }}{{ ' ons-navigation__item--active' if (item.url == params.navigation.currentPath) or (params.navigation.currentPath is not string and item.url in params.navigation.currentPath) }}">
|
|
@@ -102,10 +102,16 @@ describe('macro: navigation', () => {
|
|
|
102
102
|
expect($('.ons-container').hasClass('ons-container--full-width')).toBe(true);
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
it('has the correct container if `wide`', () => {
|
|
105
|
+
it('has the correct container if `params.wide` is provided', () => {
|
|
106
|
+
const $ = cheerio.load(renderComponent('navigation', { wide: true, navigation: PARAMS }));
|
|
107
|
+
|
|
108
|
+
expect($('.ons-navigation-wrapper .ons-container').hasClass('ons-container--wide')).toBe(true);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('has the correct container if `params.navigation.wide` is provided', () => {
|
|
106
112
|
const $ = cheerio.load(renderComponent('navigation', { navigation: { ...PARAMS, wide: true } }));
|
|
107
113
|
|
|
108
|
-
expect($('.ons-container').hasClass('ons-container--wide')).toBe(true);
|
|
114
|
+
expect($('.ons-navigation-wrapper .ons-container').hasClass('ons-container--wide')).toBe(true);
|
|
109
115
|
});
|
|
110
116
|
|
|
111
117
|
it('has the search autosuggest with correct output', () => {
|
|
@@ -218,6 +224,18 @@ describe('macro: navigation', () => {
|
|
|
218
224
|
});
|
|
219
225
|
});
|
|
220
226
|
|
|
227
|
+
it('has the correct container if `params.wide` is provided', () => {
|
|
228
|
+
const $ = cheerio.load(renderComponent('navigation', { wide: true, navigation: PARAMS }));
|
|
229
|
+
|
|
230
|
+
expect($('.ons-navigation--sub .ons-container').hasClass('ons-container--wide')).toBe(true);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
it('has the correct container if `params.navigation.wide` is provided', () => {
|
|
234
|
+
const $ = cheerio.load(renderComponent('navigation', { navigation: { ...PARAMS, wide: true } }));
|
|
235
|
+
|
|
236
|
+
expect($('.ons-navigation--sub .ons-container').hasClass('ons-container--wide')).toBe(true);
|
|
237
|
+
});
|
|
238
|
+
|
|
221
239
|
it('has the provided `id` attribute', () => {
|
|
222
240
|
const $ = cheerio.load(renderComponent('navigation', { navigation: PARAMS }));
|
|
223
241
|
|