@ons/design-system 70.0.16 → 72.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.
Files changed (212) hide show
  1. package/README.md +10 -1
  2. package/components/access-code/_macro.njk +4 -4
  3. package/components/access-code/_macro.spec.js +10 -10
  4. package/components/access-code/example-access-code-error.njk +2 -2
  5. package/components/access-code/example-access-code.njk +2 -2
  6. package/components/accordion/_macro.njk +1 -1
  7. package/components/accordion/_macro.spec.js +162 -91
  8. package/components/accordion/_test_examples.js +13 -0
  9. package/components/address-input/_macro.njk +7 -7
  10. package/components/address-input/_macro.spec.js +16 -15
  11. package/components/address-input/autosuggest.address.error.js +1 -1
  12. package/components/address-input/autosuggest.address.js +25 -25
  13. package/components/address-input/autosuggest.address.spec.js +6 -5
  14. package/components/address-input/example-address-input-editable.njk +5 -4
  15. package/components/address-input/example-address-input.njk +4 -5
  16. package/components/autosuggest/_autosuggest.scss +8 -8
  17. package/components/autosuggest/_macro.njk +5 -5
  18. package/components/autosuggest/autosuggest.spec.js +1 -1
  19. package/components/back-to-top/_back-to-top.scss +2 -2
  20. package/components/back-to-top/_macro.spec.js +1 -1
  21. package/components/back-to-top/example-full-page-back-to-top.njk +6 -6
  22. package/components/breadcrumbs/_breadcrumbs.scss +1 -1
  23. package/components/breadcrumbs/_macro.spec.js +121 -115
  24. package/components/breadcrumbs/_test_examples.js +36 -0
  25. package/components/browser-banner/_macro.spec.js +1 -1
  26. package/components/button/_button.scss +24 -16
  27. package/components/button/_macro.njk +5 -5
  28. package/components/button/_macro.spec.js +2 -2
  29. package/components/button/example-button-custom.njk +1 -1
  30. package/components/card/_card.scss +0 -6
  31. package/components/card/_macro.njk +9 -9
  32. package/components/card/_macro.spec.js +57 -24
  33. package/components/card/example-card-set-with-images.njk +30 -18
  34. package/components/card/example-card-set-with-lists.njk +57 -45
  35. package/components/card/example-card-set.njk +27 -15
  36. package/components/card/example-card.njk +9 -5
  37. package/components/char-check-limit/_macro.njk +1 -1
  38. package/components/checkboxes/_checkbox.scss +4 -4
  39. package/components/checkboxes/_checkboxes.scss +1 -1
  40. package/components/checkboxes/example-checkboxes-with-hidden-label.njk +4 -4
  41. package/components/cookies-banner/_cookies-banner.scss +5 -5
  42. package/components/cookies-banner/_macro.njk +15 -13
  43. package/components/cookies-banner/_macro.spec.js +1 -1
  44. package/components/details/_details.scss +5 -6
  45. package/components/details/_macro.njk +4 -4
  46. package/components/details/_macro.spec.js +1 -1
  47. package/components/document-list/_document-list.scss +0 -2
  48. package/components/document-list/_macro.njk +18 -18
  49. package/components/document-list/_macro.spec.js +16 -14
  50. package/components/document-list/example-document-list-article-featured.njk +5 -3
  51. package/components/document-list/example-document-list-articles.njk +15 -9
  52. package/components/document-list/example-document-list-downloads.njk +15 -9
  53. package/components/document-list/example-document-list-search-result-featured.njk +5 -3
  54. package/components/document-list/example-document-list-search-results.njk +20 -12
  55. package/components/download-resources/_download-resources.scss +1 -2
  56. package/components/download-resources/download-resources.spec.js +12 -6
  57. package/components/external-link/_macro.njk +1 -1
  58. package/components/external-link/_macro.spec.js +1 -1
  59. package/components/external-link/example-external-link.njk +1 -1
  60. package/components/feedback/_macro.njk +1 -1
  61. package/components/feedback/_macro.spec.js +3 -3
  62. package/components/feedback/example-feedback-call-to-action.njk +1 -1
  63. package/components/field/_field-group.scss +0 -2
  64. package/components/field/_field.scss +1 -2
  65. package/components/fieldset/_fieldset.scss +2 -2
  66. package/components/fieldset/_macro.njk +1 -1
  67. package/components/fieldset/_macro.spec.js +1 -1
  68. package/components/footer/_footer.scss +12 -7
  69. package/components/footer/_macro.njk +54 -34
  70. package/components/footer/_macro.spec.js +90 -28
  71. package/components/footer/example-footer-cymraeg.njk +1 -1
  72. package/components/footer/example-footer-transactional.njk +1 -1
  73. package/components/footer/example-footer-warning.njk +1 -1
  74. package/components/footer/example-footer-with-alternative-organisation.njk +99 -94
  75. package/components/footer/example-footer-with-coat-of-arms.njk +1 -1
  76. package/components/footer/example-footer-with-copyright.njk +1 -1
  77. package/components/footer/example-footer-with-multiple-logos-and-split-display.njk +173 -0
  78. package/components/footer/example-footer-with-multiple-logos.njk +172 -0
  79. package/components/footer/example-footer.njk +1 -1
  80. package/components/header/_header.scss +7 -14
  81. package/components/header/_macro.njk +19 -19
  82. package/components/header/_macro.spec.js +18 -18
  83. package/components/header/example-header-external-for-surveys.njk +2 -2
  84. package/components/header/example-header-external-welsh.njk +2 -2
  85. package/components/header/example-header-external-with-sub-navigation-removed.njk +1 -1
  86. package/components/header/example-header-external-with-sub-navigation.njk +1 -1
  87. package/components/header/example-header-multiple-logos.njk +4 -4
  88. package/components/hero/_hero.scss +6 -8
  89. package/components/hero/_macro.njk +1 -1
  90. package/components/icon/_icon.scss +4 -4
  91. package/components/icon/_macro.njk +4 -4
  92. package/components/icon/_macro.spec.js +2 -2
  93. package/components/image/_image.scss +1 -1
  94. package/components/image/_macro.njk +1 -1
  95. package/components/image/_macro.spec.js +10 -10
  96. package/components/image/example-image-for-regular-screens.njk +1 -1
  97. package/components/input/_input-type.scss +0 -2
  98. package/components/input/_input.scss +10 -10
  99. package/components/input/_macro.njk +4 -2
  100. package/components/input/example-input-search-with-character-check.njk +1 -1
  101. package/components/input/example-input-search.njk +1 -1
  102. package/components/label/_label.scss +1 -3
  103. package/components/language-selector/_macro.njk +3 -3
  104. package/components/language-selector/_macro.spec.js +7 -7
  105. package/components/list/_list.scss +1 -5
  106. package/components/list/_macro.njk +9 -10
  107. package/components/list/_macro.spec.js +50 -9
  108. package/components/list/example-inline-list-with-social-icon-prefix.njk +1 -1
  109. package/components/message/_macro.njk +3 -3
  110. package/components/message/_macro.spec.js +3 -3
  111. package/components/message-list/_macro.njk +2 -2
  112. package/components/message-list/_macro.spec.js +8 -4
  113. package/components/message-list/_message-list.scss +2 -2
  114. package/components/navigation/_macro.njk +9 -9
  115. package/components/navigation/_macro.spec.js +2 -2
  116. package/components/navigation/_navigation.scss +2 -6
  117. package/components/navigation/navigation.dom.js +1 -1
  118. package/components/navigation/navigation.spec.js +4 -4
  119. package/components/pagination/_macro.njk +2 -2
  120. package/components/pagination/_pagination.scss +1 -7
  121. package/components/panel/_macro.njk +5 -4
  122. package/components/panel/_macro.spec.js +2 -2
  123. package/components/panel/_panel.scss +12 -8
  124. package/components/password/_macro.njk +1 -1
  125. package/components/password/_macro.spec.js +2 -2
  126. package/components/phase-banner/_macro.njk +1 -1
  127. package/components/phase-banner/_phase-banner.scss +3 -4
  128. package/components/phase-banner/example-phase-banner-alpha.njk +1 -1
  129. package/components/phase-banner/example-phase-banner-beta.njk +1 -1
  130. package/components/question/_macro.njk +8 -8
  131. package/components/question/_macro.spec.js +3 -3
  132. package/components/question/_question.scss +3 -3
  133. package/components/radios/_macro.njk +1 -1
  134. package/components/radios/_macro.spec.js +1 -1
  135. package/components/radios/_radios.scss +1 -1
  136. package/components/radios/example-radios-with-clear-button-expanded.njk +1 -1
  137. package/components/radios/example-radios-with-clear-button.njk +1 -1
  138. package/components/related-content/_macro.spec.js +2 -2
  139. package/components/related-content/_related-content.scss +1 -1
  140. package/components/related-content/example-related-content-general.njk +2 -2
  141. package/components/related-content/example-related-content-social-media.njk +1 -1
  142. package/components/reply/_macro.njk +3 -1
  143. package/components/reply/_macro.spec.js +1 -1
  144. package/components/reply/reply.spec.js +1 -1
  145. package/components/section-navigation/_macro.njk +10 -10
  146. package/components/section-navigation/_macro.spec.js +15 -15
  147. package/components/section-navigation/_section-navigation.scss +3 -8
  148. package/components/section-navigation/example-section-navigation-single-vertical-with-title.njk +3 -3
  149. package/components/section-navigation/example-section-navigation-vertical.njk +14 -14
  150. package/components/section-navigation/example-section-navigation.njk +3 -3
  151. package/components/select/example-select-with-inline-label.njk +1 -1
  152. package/components/share-page/_macro.njk +7 -7
  153. package/components/share-page/_macro.spec.js +2 -2
  154. package/components/share-page/example-share-page.njk +1 -1
  155. package/components/status/_status.scss +1 -1
  156. package/components/summary/_macro.njk +33 -33
  157. package/components/summary/_macro.spec.js +34 -34
  158. package/components/summary/_summary.scss +2 -4
  159. package/components/summary/example-summary-card-grouped.njk +34 -34
  160. package/components/summary/example-summary-grouped-total.njk +7 -7
  161. package/components/summary/example-summary-grouped-with-errors.njk +9 -9
  162. package/components/summary/example-summary-grouped.njk +34 -34
  163. package/components/summary/example-summary-household.njk +7 -7
  164. package/components/summary/example-summary-hub-minimal.njk +8 -8
  165. package/components/summary/example-summary-hub.njk +16 -16
  166. package/components/summary/example-summary-multiple.njk +7 -7
  167. package/components/summary/example-summary-no-action.njk +5 -5
  168. package/components/summary/example-summary.njk +9 -9
  169. package/components/table/_table.scss +2 -3
  170. package/components/table-of-contents/_macro.njk +3 -3
  171. package/components/table-of-contents/_macro.spec.js +3 -3
  172. package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +1 -1
  173. package/components/tabs/_macro.njk +3 -3
  174. package/components/tabs/_macro.spec.js +3 -3
  175. package/components/tabs/_tabs.scss +3 -4
  176. package/components/tabs/example-tabs-details.njk +1 -1
  177. package/components/text-indent/_text-indent.scss +1 -1
  178. package/components/text-indent/example-text-indent.njk +1 -1
  179. package/components/timeline/_macro.njk +4 -4
  180. package/components/timeline/_macro.spec.js +3 -3
  181. package/components/timeline/_timeline.scss +4 -3
  182. package/components/timeline/example-timeline.njk +1 -1
  183. package/components/upload/_upload.scss +2 -2
  184. package/components/video/_macro.njk +4 -4
  185. package/components/video/_macro.spec.js +2 -2
  186. package/components/video/_video.scss +1 -1
  187. package/components/video/example-video.njk +2 -2
  188. package/components/video/video.spec.js +2 -2
  189. package/css/main.css +1 -1
  190. package/layout/_dsTemplate.njk +1 -1
  191. package/layout/_template.njk +31 -31
  192. package/package.json +3 -2
  193. package/scripts/main.es5.js +1 -1
  194. package/scripts/main.js +1 -1
  195. package/scss/base/_global.scss +2 -0
  196. package/scss/base/_typography.scss +0 -2
  197. package/scss/main.scss +0 -1
  198. package/scss/objects/_container.scss +1 -1
  199. package/scss/objects/_page.scss +2 -3
  200. package/scss/overrides/rtl.scss +1 -1
  201. package/scss/utilities/_grid.scss +103 -96
  202. package/scss/utilities/_margin.scss +11 -5
  203. package/scss/utilities/_padding.scss +12 -5
  204. package/scss/utilities/_typography.scss +2 -1
  205. package/scss/vars/_forms.scss +8 -10
  206. package/scss/vars/_grid.scss +4 -4
  207. package/scss/vars/_typography.scss +26 -19
  208. package/components/call-to-action/_call-to-action.scss +0 -8
  209. package/components/call-to-action/_macro.njk +0 -24
  210. package/components/call-to-action/_macro.spec.js +0 -48
  211. package/components/call-to-action/example-call-to-action-default.njk +0 -15
  212. package/components/metadata/_macro.njk +0 -14
@@ -12,6 +12,8 @@ html {
12
12
  }
13
13
 
14
14
  body {
15
+ @extend .ons-u-fs-r;
16
+
15
17
  height: 100%;
16
18
  margin: 0;
17
19
  position: relative;
@@ -2,7 +2,6 @@ html {
2
2
  @include font-smoothing;
3
3
 
4
4
  font-size: $base;
5
- line-height: 1.6;
6
5
  }
7
6
 
8
7
  body {
@@ -21,7 +20,6 @@ h3,
21
20
  h4,
22
21
  h5,
23
22
  h6 {
24
- line-height: 1.2;
25
23
  margin: 0 0 1rem;
26
24
  strong {
27
25
  @extend .ons-highlight;
package/scss/main.scss CHANGED
@@ -10,7 +10,6 @@
10
10
  @import '../components/breadcrumbs/breadcrumbs';
11
11
  @import '../components/browser-banner/browser-banner';
12
12
  @import '../components/button/button';
13
- @import '../components/call-to-action/call-to-action';
14
13
  @import '../components/card/card';
15
14
  @import '../components/checkboxes/checkbox';
16
15
  @import '../components/checkboxes/checkboxes';
@@ -26,7 +26,7 @@
26
26
  }
27
27
 
28
28
  .ons-grid__col {
29
- font-size: 1rem;
29
+ font-size: 1.125rem;
30
30
  }
31
31
 
32
32
  @include bp-suffix('ons-container--gutterless', $create-between-breakpoints: true) {
@@ -15,10 +15,9 @@
15
15
  }
16
16
 
17
17
  .ons-page__main {
18
- margin-bottom: 4.5rem;
19
- margin-top: 2.5rem;
18
+ margin: 2.5rem 0 4rem;
20
19
 
21
- @include mq(xxs, m) {
20
+ @include mq('2xs', m) {
22
21
  margin-top: 1.5rem;
23
22
  }
24
23
  }
@@ -64,7 +64,7 @@
64
64
  // Buttons
65
65
  .ons-btn {
66
66
  .ons-icon {
67
- margin: 0 0.5rem 0.1rem 0;
67
+ margin: 0 0.5rem 0.125rem 0;
68
68
  transform: rotate(180deg);
69
69
  }
70
70
  }
@@ -4,108 +4,143 @@
4
4
  box-sizing: border-box;
5
5
  font-size: 0;
6
6
  margin-left: -$grid-gutters;
7
- }
8
-
9
- .ons-grid--float {
10
- letter-spacing: 0;
11
- }
12
7
 
13
- .ons-grid--center {
14
- text-align: center;
15
- .ons-grid__col {
16
- text-align: left;
8
+ &--float {
9
+ letter-spacing: 0;
17
10
  }
18
- }
19
11
 
20
- .ons-grid--center-all {
21
- text-align: center;
22
- }
12
+ &--center {
13
+ text-align: center;
23
14
 
24
- .ons-grid--reverse {
25
- direction: rtl;
26
- .ons-grid__col {
27
- direction: ltr;
15
+ .ons-grid__col {
16
+ text-align: left;
17
+ }
18
+
19
+ &-all {
20
+ text-align: center;
21
+ }
28
22
  }
29
- }
30
23
 
31
- .ons-grid--spaced {
32
- .ons-grid__col {
33
- margin-bottom: $grid-gutters;
24
+ &--reverse {
25
+ direction: rtl;
26
+
27
+ .ons-grid__col {
28
+ direction: ltr;
29
+ }
34
30
  }
35
- &.ons-grid--tight {
31
+
32
+ &--spaced {
36
33
  .ons-grid__col {
37
- margin-bottom: math.div($grid-gutters, 2);
34
+ margin-bottom: $grid-gutters;
35
+ }
36
+
37
+ &.ons-grid--tight {
38
+ .ons-grid__col {
39
+ margin-bottom: math.div($grid-gutters, 2);
40
+ }
38
41
  }
39
42
  }
40
- }
41
43
 
42
- .ons-grid--align-mid {
43
- .ons-grid__col {
44
- vertical-align: middle;
44
+ &--align-mid {
45
+ .ons-grid__col {
46
+ vertical-align: middle;
47
+ }
45
48
  }
46
- }
47
49
 
48
- .ons-grid--stagger-align {
49
- .ons-grid__col:nth-of-type(1n) {
50
- text-align: right;
50
+ &--stagger-align {
51
+ .ons-grid__col:nth-of-type(1n) {
52
+ text-align: right;
53
+ }
54
+
55
+ .ons-grid__col:nth-of-type(2n) {
56
+ text-align: left;
57
+ }
51
58
  }
52
- .ons-grid__col:nth-of-type(2n) {
53
- text-align: left;
59
+
60
+ &--tight {
61
+ margin-left: math.div(-$grid-gutters, 2);
62
+
63
+ .ons-grid__col {
64
+ padding-left: math.div($grid-gutters, 2);
65
+ }
54
66
  }
55
- }
56
67
 
57
- .ons-grid--tight {
58
- margin-left: math.div(-$grid-gutters, 2);
59
- .ons-grid__col {
60
- padding-left: math.div($grid-gutters, 2);
68
+ &--loose {
69
+ margin-left: -$grid-gutters * 2;
61
70
  }
62
- }
63
71
 
64
- .ons-grid--loose {
65
- margin-left: -$grid-gutters * 2;
66
- }
72
+ &--gutterless {
73
+ margin-left: 0;
67
74
 
68
- .ons-grid--gutterless {
69
- margin-left: 0;
70
- .ons-grid__col {
71
- padding-left: 0;
75
+ .ons-grid__col {
76
+ padding-left: 0;
77
+ }
72
78
  }
73
- }
74
79
 
75
- .ons-grid--pixelgutter {
76
- margin-left: 1px;
77
- .ons-grid__col {
78
- margin-bottom: 1px;
79
- padding-left: 1px;
80
+ &--pixelgutter {
81
+ margin-left: 1px;
82
+
83
+ .ons-grid__col {
84
+ margin-bottom: 1px;
85
+ padding-left: 1px;
86
+ }
80
87
  }
81
- }
82
88
 
83
- .ons-grid--flex {
84
- display: flex;
85
- flex-flow: row wrap;
89
+ &-flex {
90
+ display: flex;
91
+ flex-flow: row wrap;
86
92
 
87
- &.ons-grid--center {
88
- justify-content: center;
89
- }
93
+ &--center {
94
+ justify-content: center;
95
+ }
90
96
 
91
- &.ons-grid--between {
92
- justify-content: space-between;
97
+ &--between {
98
+ justify-content: space-between;
99
+ }
100
+
101
+ &--vertical-top {
102
+ align-items: start;
103
+ }
104
+
105
+ &--vertical-center {
106
+ align-items: center;
107
+ }
93
108
  }
94
109
 
95
- &.ons-grid--vertical-top {
96
- align-items: start;
110
+ &__col {
111
+ background-clip: content-box;
112
+ box-sizing: border-box;
113
+ display: inline-block;
114
+ // Fixes text overflow issues
115
+ min-width: 0;
116
+ padding-left: $grid-gutters;
117
+ vertical-align: top;
118
+ width: 100%;
119
+
120
+ .ons-grid--float & {
121
+ display: block;
122
+ float: left;
123
+ }
124
+
125
+ &--loose {
126
+ padding-left: $grid-gutters * 2;
127
+ }
128
+
129
+ .ons-grid-flex & {
130
+ width: auto;
131
+ }
97
132
  }
98
133
 
99
- &.ons-grid--vertical-center {
100
- align-items: center;
134
+ &_col--flex {
135
+ display: flex;
101
136
  }
102
137
  }
103
138
 
104
- @include bp-suffix(ons-grid--no-wrap) {
139
+ @include bp-suffix(ons-grid-flex--no-wrap) {
105
140
  flex-wrap: nowrap;
106
141
  }
107
142
 
108
- @include bp-suffix(ons-grid--column, $create-between-breakpoints: true) {
143
+ @include bp-suffix(ons-grid-flex--column, $create-between-breakpoints: true) {
109
144
  flex-direction: column;
110
145
  }
111
146
 
@@ -124,34 +159,6 @@
124
159
  }
125
160
  }
126
161
 
127
- .ons-grid__col {
128
- background-clip: content-box;
129
- box-sizing: border-box;
130
- display: inline-block;
131
- // Fixes text overflow issues
132
- min-width: 0;
133
- padding-left: $grid-gutters;
134
- vertical-align: top;
135
- width: 100%;
136
-
137
- .ons-grid--float & {
138
- display: block;
139
- float: left;
140
- }
141
-
142
- &--loose {
143
- padding-left: $grid-gutters * 2;
144
- }
145
-
146
- .ons-grid--flex & {
147
- width: auto;
148
- }
149
- }
150
-
151
- .ons-grid__col--flex {
152
- display: flex;
153
- }
154
-
155
162
  @include bp-suffix(ons-grid__col--sticky) {
156
163
  position: sticky;
157
164
  top: 2rem;
@@ -206,7 +213,7 @@
206
213
  @include bp-suffix(ons-col-auto) {
207
214
  width: auto;
208
215
 
209
- .ons-grid--flex & {
216
+ .ons-grid-flex & {
210
217
  flex-basis: auto;
211
218
  max-width: 100%;
212
219
  }
@@ -1,11 +1,17 @@
1
1
  $sizes: (
2
2
  no: 0,
3
- xxs: 0.25rem,
4
- xs: 0.5rem,
3
+ 4xs: 0.125rem,
4
+ 3xs: 0.25rem,
5
+ 2xs: 0.5rem,
6
+ xs: 0.75rem,
5
7
  s: 1rem,
6
- m: 1.5rem,
7
- l: 2rem,
8
- xl: 3rem,
8
+ m: 1.25rem,
9
+ l: 1.5rem,
10
+ xl: 2rem,
11
+ 2xl: 2.5rem,
12
+ 3xl: 3rem,
13
+ 4xl: 4rem,
14
+ 5xl: 5rem,
9
15
  auto: auto,
10
16
  );
11
17
 
@@ -1,11 +1,18 @@
1
1
  $sizes: (
2
2
  no: 0,
3
- xxs: 0.25rem,
4
- xs: 0.5rem,
3
+ 4xs: 0.125rem,
4
+ 3xs: 0.25rem,
5
+ 2xs: 0.5rem,
6
+ xs: 0.75rem,
5
7
  s: 1rem,
6
- m: 1.5rem,
7
- l: 2rem,
8
- xl: 3rem,
8
+ m: 1.25rem,
9
+ l: 1.5rem,
10
+ xl: 2rem,
11
+ 2xl: 2.5rem,
12
+ 3xl: 3rem,
13
+ 4xl: 4rem,
14
+ 5xl: 5rem,
15
+ auto: auto,
9
16
  );
10
17
 
11
18
  $padding: (
@@ -6,11 +6,12 @@
6
6
 
7
7
  font-size: rems($small-size, $base);
8
8
  font-weight: map.get($props, weight);
9
- line-height: map.get($props, line-height);
9
+ line-height: map.get($props, line-height-mobile);
10
10
 
11
11
  @if $small-size != $large-size {
12
12
  @include mq(m) {
13
13
  font-size: rems($large-size, $base);
14
+ line-height: map.get($props, line-height-desktop);
14
15
  }
15
16
  }
16
17
  }
@@ -1,19 +1,17 @@
1
- @import '../helpers/functions';
2
-
3
1
  $input-radius: 3px;
4
- $input-padding-vertical: 0.39rem;
2
+ $input-padding-vertical: 0.25rem;
5
3
  $input-padding-horizontal: 0.5rem;
6
- $input-width: 20rem;
4
+ $input-width: 22.5rem;
7
5
  $input-border-width: 1px;
8
6
  $input-widths: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50;
9
7
  // Widest character (capital W) is 1.0065rem wide
10
- $char-max-width: 0.9rem;
11
- // Widest number (4) is 0.54rem wide
12
- $num-max-width: 0.54rem;
8
+ $char-max-width: 1.013rem;
9
+ // Widest number (4) is 0.607rem wide
10
+ $num-max-width: 0.607rem;
13
11
  // Not the width of a space, the width of the space between characters with no spaces between
14
- $char-space-width: 0.029rem;
12
+ $char-space-width: 0.033rem;
15
13
  // Space width
16
- $nbsp-width: 0.256rem;
14
+ $nbsp-width: 0.288rem;
17
15
 
18
16
  @mixin input-width($class-name, $char-width: $char-max-width) {
19
17
  @each $width in $input-widths {
@@ -35,7 +33,7 @@ $nbsp-width: 0.256rem;
35
33
  }
36
34
 
37
35
  @function input-width-calc($chars: 1, $char-width: $char-max-width, $spaces: 0, $num-chars: 0) {
38
- // Space between characters is 0.029rem wide
36
+ // Space between characters is 0.033rem wide
39
37
  // Extra 2 pixels are to prevent clipping when the cursor is visible (2px is needed for iOS)
40
38
 
41
39
  $padding-width: $input-padding-horizontal * 2;
@@ -1,17 +1,17 @@
1
1
  @use 'sass:map';
2
2
 
3
3
  $grid-bp: (
4
- xxs: 300px,
4
+ '2xs': 300px,
5
5
  xs: 400px,
6
6
  s: 500px,
7
7
  m: 740px,
8
8
  l: 980px,
9
9
  xl: 1300px,
10
- xxl: 1600px,
10
+ '2xl': 1600px,
11
11
  ) !default;
12
12
 
13
- $grid-max-width: 57.445rem !default;
14
- $grid-max-1280: 71.1111rem !default;
13
+ $grid-max-width: 64.625625rem !default;
14
+ $grid-max-1280: 79.9999rem !default;
15
15
  $grid-cols: 12 !default;
16
16
  $grid-cols-mobile: 4 !default;
17
17
  $grid-gutters: 1rem !default;
@@ -2,66 +2,73 @@ $font-sans: 'OpenSans', 'Helvetica Neue', arial, sans-serif !default;
2
2
  $font-serif: georgia, serif !default;
3
3
  $font-mono: 'RobotoMono', monospace !default;
4
4
 
5
- $base-font-size: 1rem;
6
- $base-line-height: 1.5;
7
-
8
5
  $font-weight-regular: 400;
9
6
  $font-weight-bold: 700;
10
- $base: 18px;
7
+
8
+ $base: 16px;
11
9
 
12
10
  $type-matrix: (
13
- ons-u-fs-xxxl: (
11
+ ons-u-fs-3xl: (
14
12
  small: 32px,
15
13
  large: 48px,
16
14
  weight: $font-weight-bold,
17
- line-height: 1.3,
15
+ line-height-mobile: 44px,
16
+ line-height-desktop: 56px,
18
17
  ),
19
- ons-u-fs-xxl: (
18
+ ons-u-fs-2xl: (
20
19
  small: 28px,
21
20
  large: 36px,
22
21
  weight: $font-weight-bold,
23
- line-height: 1.4,
22
+ line-height-mobile: 40px,
23
+ line-height-desktop: 48px,
24
24
  ),
25
25
  ons-u-fs-xl: (
26
26
  small: 26px,
27
27
  large: 30px,
28
28
  weight: $font-weight-bold,
29
- line-height: 1.4,
29
+ line-height-mobile: 36px,
30
+ line-height-desktop: 40px,
30
31
  ),
31
32
  ons-u-fs-l: (
32
33
  small: 24px,
33
34
  large: 26px,
34
35
  weight: $font-weight-bold,
35
- line-height: 1.4,
36
+ line-height-mobile: 32px,
37
+ line-height-desktop: 36px,
36
38
  ),
37
39
  ons-u-fs-m: (
38
40
  small: 20px,
39
41
  large: 22px,
40
42
  weight: $font-weight-bold,
41
- line-height: 1.4,
43
+ line-height-mobile: 28px,
44
+ line-height-desktop: 32px,
42
45
  ),
43
46
  ons-u-fs-r--b: (
44
- small: $base,
45
- large: $base,
47
+ small: 18px,
48
+ large: 18px,
46
49
  weight: $font-weight-bold,
47
- line-height: 1.4,
50
+ line-height-mobile: 28px,
51
+ line-height-desktop: 28px,
48
52
  ),
49
53
  ons-u-fs-r: (
50
- small: $base,
51
- large: $base,
54
+ small: 18px,
55
+ large: 18px,
52
56
  weight: $font-weight-regular,
53
- line-height: 1.4,
57
+ line-height-mobile: 28px,
58
+ line-height-desktop: 28px,
54
59
  ),
55
60
  ons-u-fs-s--b: (
56
61
  small: 14px,
57
62
  large: 14px,
58
63
  weight: $font-weight-bold,
59
- line-height: 1.4,
64
+ line-height-mobile: 20px,
65
+ line-height-desktop: 20px,
60
66
  ),
61
67
  ons-u-fs-s: (
62
68
  small: 14px,
63
69
  large: 14px,
64
70
  weight: $font-weight-regular,
65
- line-height: 1.4,
71
+ line-height-mobile: 20px,
72
+ line-height-desktop: 20px,
66
73
  ),
67
74
  );
@@ -1,8 +0,0 @@
1
- .ons-call-to-action {
2
- background: var(--ons-color-cta-bg);
3
- padding: 0.85rem 0;
4
-
5
- &__heading {
6
- padding-right: 0.2rem;
7
- }
8
- }
@@ -1,24 +0,0 @@
1
- {% macro onsCallToAction(params) %}
2
- {% from "components/button/_macro.njk" import onsButton %}
3
- <div class="ons-call-to-action">
4
- <div class="ons-container">
5
- <div class="ons-grid ons-grid--flex ons-grid--vertical-center ons-grid--no-wrap@s">
6
- <div class="ons-grid__col ons-col-auto ons-u-flex-shrink@s">
7
- <h2 class="ons-call-to-action__heading ons-u-fs-r--b ons-u-di">{{ params.headingText }}</h2>
8
- {% if params.paragraphText %}
9
- <p class="ons-call-to-action__text ons-u-di">{{ params.paragraphText }}</p>
10
- {% endif %}
11
- </div>
12
- <div class="ons-grid__col ons-col-auto ons-u-flex-no-grow ons-u-mt-xs@xxs@s">
13
- {{
14
- onsButton({
15
- "text": params.button.text,
16
- "url": params.button.url,
17
- "variants": "small"
18
- })
19
- }}
20
- </div>
21
- </div>
22
- </div>
23
- </div>
24
- {% endmacro %}
@@ -1,48 +0,0 @@
1
- /** @jest-environment jsdom */
2
-
3
- import * as cheerio from 'cheerio';
4
-
5
- import axe from '../../tests/helpers/axe';
6
- import { renderComponent, templateFaker } from '../../tests/helpers/rendering';
7
-
8
- const EXAMPLE_CALL_TO_ACTION = {
9
- headingText: 'Call to action heading.',
10
- paragraphText: 'Descriptive text about call to action',
11
- button: {
12
- text: 'Start',
13
- url: 'https://example.com/start',
14
- },
15
- };
16
-
17
- describe('macro: call-to-action', () => {
18
- it('passes jest-axe checks', async () => {
19
- const $ = cheerio.load(renderComponent('call-to-action', EXAMPLE_CALL_TO_ACTION));
20
-
21
- const results = await axe($.html());
22
- expect(results).toHaveNoViolations();
23
- });
24
-
25
- it('has the provided `headingText`', () => {
26
- const $ = cheerio.load(renderComponent('call-to-action', EXAMPLE_CALL_TO_ACTION));
27
-
28
- const headingText = $('.ons-call-to-action__heading').text().trim();
29
- expect(headingText).toBe('Call to action heading.');
30
- });
31
-
32
- it('has the provided `paragraphText`', () => {
33
- const $ = cheerio.load(renderComponent('call-to-action', EXAMPLE_CALL_TO_ACTION));
34
-
35
- const paragraphText = $('.ons-call-to-action__text').text().trim();
36
- expect(paragraphText).toBe('Descriptive text about call to action');
37
- });
38
-
39
- it('outputs the expected call-to-action button', () => {
40
- const faker = templateFaker();
41
- const buttonSpy = faker.spy('button');
42
-
43
- faker.renderComponent('call-to-action', EXAMPLE_CALL_TO_ACTION);
44
-
45
- expect(buttonSpy.occurrences[0]).toHaveProperty('text', 'Start');
46
- expect(buttonSpy.occurrences[0]).toHaveProperty('url', 'https://example.com/start');
47
- });
48
- });
@@ -1,15 +0,0 @@
1
- ---
2
- 'fullWidth': true
3
- ---
4
-
5
- {% from "components/call-to-action/_macro.njk" import onsCallToAction %}
6
- {{-
7
- onsCallToAction({
8
- "headingText": 'Call to action heading.',
9
- "paragraphText": 'Descriptive text about call to action',
10
- "button": {
11
- "text": 'Start',
12
- "url": '#0'
13
- }
14
- })
15
- -}}
@@ -1,14 +0,0 @@
1
- {% from "components/description-list/_macro.njk" import onsDescriptionList %}
2
-
3
- {% macro onsMetadata(params) %}
4
- {{
5
- onsDescriptionList({
6
- "id": params.id,
7
- "classes": params.classes,
8
- "descriptionListLabel": params.metadataLabel,
9
- "termCol": params.termCol,
10
- "descriptionCol": params.descriptionCol,
11
- "itemsList": params.itemsList
12
- })
13
- }}
14
- {% endmacro %}