@ons/design-system 44.0.1 → 45.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 (165) hide show
  1. package/components/access-code/uac.scss +5 -5
  2. package/components/address-input/_macro.njk +1 -0
  3. package/components/address-input/autosuggest.address.js +0 -1
  4. package/components/autosuggest/_macro.njk +1 -0
  5. package/components/autosuggest/autosuggest.ui.js +3 -3
  6. package/components/autosuggest/{code.list.searcher.js → fuse-config.js} +1 -3
  7. package/components/checkboxes/_checkbox-macro.njk +1 -1
  8. package/components/checkboxes/_macro.njk +1 -1
  9. package/components/fieldset/_macro.njk +1 -1
  10. package/components/header/_header.scss +3 -4
  11. package/components/header/_macro.njk +2 -2
  12. package/components/highlight/_highlight.scss +5 -0
  13. package/components/input/_input.scss +2 -2
  14. package/components/metadata/_macro.njk +1 -1
  15. package/components/metadata/_metadata.scss +1 -1
  16. package/components/modal/_macro.njk +23 -0
  17. package/components/modal/_modal.scss +32 -0
  18. package/components/modal/modal.dom.js +14 -0
  19. package/components/modal/modal.js +104 -0
  20. package/components/radios/_macro.njk +2 -2
  21. package/components/table-of-contents/_macro.njk +7 -7
  22. package/components/textarea/_macro.njk +2 -2
  23. package/components/timeout-modal/_macro.njk +26 -0
  24. package/components/timeout-modal/timeout.dom.js +16 -0
  25. package/components/timeout-modal/timeout.js +289 -0
  26. package/css/census.css +1 -0
  27. package/css/error.css +1 -0
  28. package/css/main.css +1 -0
  29. package/css/print.css +1 -0
  30. package/favicons/android-chrome-192x192.png +0 -0
  31. package/favicons/android-chrome-512x512.png +0 -0
  32. package/favicons/apple-touch-icon.png +0 -0
  33. package/favicons/browserconfig.xml +12 -0
  34. package/favicons/census/cy/android-chrome-192x192.png +0 -0
  35. package/favicons/census/cy/android-chrome-512x512.png +0 -0
  36. package/favicons/census/cy/apple-touch-icon.png +0 -0
  37. package/favicons/census/cy/browserconfig.xml +12 -0
  38. package/favicons/census/cy/favicon-16x16.png +0 -0
  39. package/favicons/census/cy/favicon-32x32.png +0 -0
  40. package/favicons/census/cy/favicon.ico +0 -0
  41. package/favicons/census/cy/manifest.json +20 -0
  42. package/favicons/census/cy/mstitle-150x150.png +0 -0
  43. package/favicons/census/cy/mstitle-310x150.png +0 -0
  44. package/favicons/census/cy/mstitle-310x310.png +0 -0
  45. package/favicons/census/cy/mstitle-70x70.png +0 -0
  46. package/favicons/census/cy/opengraph.png +0 -0
  47. package/favicons/census/cy/safari-pinned-tab.svg +3 -0
  48. package/favicons/census/cy/site.webmanifest +19 -0
  49. package/favicons/census/cy/twitter.png +0 -0
  50. package/favicons/census/en/android-chrome-192x192.png +0 -0
  51. package/favicons/census/en/android-chrome-512x512.png +0 -0
  52. package/favicons/census/en/apple-touch-icon.png +0 -0
  53. package/favicons/census/en/browserconfig.xml +12 -0
  54. package/favicons/census/en/favicon-16x16.png +0 -0
  55. package/favicons/census/en/favicon-32x32.png +0 -0
  56. package/favicons/census/en/favicon.ico +0 -0
  57. package/favicons/census/en/manifest.json +20 -0
  58. package/favicons/census/en/mstitle-150x150.png +0 -0
  59. package/favicons/census/en/mstitle-310x150.png +0 -0
  60. package/favicons/census/en/mstitle-310x310.png +0 -0
  61. package/favicons/census/en/mstitle-70x70.png +0 -0
  62. package/favicons/census/en/opengraph.png +0 -0
  63. package/favicons/census/en/safari-pinned-tab.svg +3 -0
  64. package/favicons/census/en/site.webmanifest +19 -0
  65. package/favicons/census/en/twitter.png +0 -0
  66. package/favicons/census/ni/favicon.ico +0 -0
  67. package/favicons/favicon-16x16.png +0 -0
  68. package/favicons/favicon-32x32.png +0 -0
  69. package/favicons/favicon.ico +0 -0
  70. package/favicons/manifest.json +27 -0
  71. package/favicons/maskable_icon.png +0 -0
  72. package/favicons/mstitle-150x150.png +0 -0
  73. package/favicons/mstitle-310x150.png +0 -0
  74. package/favicons/mstitle-310x310.png +0 -0
  75. package/favicons/mstitle-70x70.png +0 -0
  76. package/favicons/opengraph.png +0 -0
  77. package/favicons/safari-pinned-tab.svg +25 -0
  78. package/favicons/site.webmanifest +19 -0
  79. package/favicons/twitter.png +0 -0
  80. package/fonts/opensans-bold.woff +0 -0
  81. package/fonts/opensans-bold.woff2 +0 -0
  82. package/fonts/opensans-regular.woff +0 -0
  83. package/fonts/opensans-regular.woff2 +0 -0
  84. package/fonts/robotomono-bold.woff +0 -0
  85. package/fonts/robotomono-bold.woff2 +0 -0
  86. package/fonts/robotomono-regular.woff +0 -0
  87. package/fonts/robotomono-regular.woff2 +0 -0
  88. package/img/UKOpenGovernmentLicence-grey.svg +1 -0
  89. package/img/UKOpenGovernmentLicence.svg +1 -0
  90. package/img/card-placeholder.svg +1 -0
  91. package/img/census-landscape.svg +1 -0
  92. package/img/census-promo-banner.svg +1 -0
  93. package/img/circle-lines.svg +1 -0
  94. package/img/icons--check.svg +1 -0
  95. package/img/icons--chevron-down.svg +1 -0
  96. package/img/its-about-us--dark.svg +1 -0
  97. package/img/its-about-us--light.svg +1 -0
  98. package/img/large/hero-man.png +0 -0
  99. package/img/large/mother-and-daughter-in-ireland.jpg +0 -0
  100. package/img/large/mum-and-child-healthcare-belfast.jpg +0 -0
  101. package/img/large/placeholder-card.png +0 -0
  102. package/img/large/placeholder-news-medium.png +0 -0
  103. package/img/large/placeholder-news.png +0 -0
  104. package/img/large/placeholder-portrait.png +0 -0
  105. package/img/large/students.jpg +0 -0
  106. package/img/large/woman-in-purple-dress-shirt.jpg +0 -0
  107. package/img/logo.svg +1 -0
  108. package/img/ni-syn-cyfrif--dark.svg +1 -0
  109. package/img/ni-syn-cyfrif--light.svg +1 -0
  110. package/img/nisra-logo-black-en.svg +1 -0
  111. package/img/ogl.svg +1 -0
  112. package/img/ons-logo-black-cy.svg +1 -0
  113. package/img/ons-logo-black-en.svg +1 -0
  114. package/img/rehearsal-areas.svg +1 -0
  115. package/img/small/hero-man.png +0 -0
  116. package/img/small/mother-and-daughter-in-ireland.jpg +0 -0
  117. package/img/small/mum-and-child-healthcare-belfast.jpg +0 -0
  118. package/img/small/placeholder-card.png +0 -0
  119. package/img/small/placeholder-news-medium.png +0 -0
  120. package/img/small/placeholder-news.png +0 -0
  121. package/img/small/placeholder-portrait.png +0 -0
  122. package/img/small/students.jpg +0 -0
  123. package/img/small/woman-in-purple-dress-shirt.jpg +0 -0
  124. package/package.json +4 -4
  125. package/scripts/main.es5.js +7 -0
  126. package/scripts/main.js +7 -0
  127. package/scss/base/_fonts.scss +4 -0
  128. package/scss/base/_forms.scss +29 -0
  129. package/scss/base/_global.scss +65 -0
  130. package/scss/base/_index.scss +4 -0
  131. package/scss/base/_typography.scss +46 -0
  132. package/scss/census.scss +2 -0
  133. package/scss/error.scss +27 -0
  134. package/scss/helpers/_functions.scss +44 -0
  135. package/scss/helpers/_index.scss +3 -0
  136. package/scss/helpers/_mixins.scss +94 -0
  137. package/scss/helpers/_mq.scss +93 -0
  138. package/scss/main.scss +71 -0
  139. package/scss/objects/_container.scss +34 -0
  140. package/scss/objects/_index.scss +3 -0
  141. package/scss/objects/_page.scss +49 -0
  142. package/scss/objects/_spacing.scss +23 -0
  143. package/scss/overrides/hcm.scss +81 -0
  144. package/scss/overrides/rtl.scss +131 -0
  145. package/scss/patternlib.scss +216 -0
  146. package/scss/print.scss +66 -0
  147. package/scss/settings/_census.scss +13 -0
  148. package/scss/utilities/_border.scss +12 -0
  149. package/scss/utilities/_colors.scss +17 -0
  150. package/scss/utilities/_display.scss +19 -0
  151. package/scss/utilities/_float.scss +34 -0
  152. package/scss/utilities/_grid.scss +245 -0
  153. package/scss/utilities/_index.scss +10 -0
  154. package/scss/utilities/_margin.scss +24 -0
  155. package/scss/utilities/_pad.scss +25 -0
  156. package/scss/utilities/_typography.scss +88 -0
  157. package/scss/utilities/_utilities.scss +31 -0
  158. package/scss/utilities/_visibility.scss +45 -0
  159. package/scss/vars/_colors.scss +112 -0
  160. package/scss/vars/_forms.scss +50 -0
  161. package/scss/vars/_grid.scss +17 -0
  162. package/scss/vars/_index.scss +5 -0
  163. package/scss/vars/_typography.scss +67 -0
  164. package/scss/vars/_vars.scss +1 -0
  165. package/page-templates/_template.njk +0 -242
@@ -0,0 +1,245 @@
1
+ @use 'sass:math';
2
+
3
+ .ons-grid {
4
+ box-sizing: border-box;
5
+ font-size: 0;
6
+ margin-left: -$grid-gutters;
7
+ }
8
+
9
+ .ons-grid--float {
10
+ letter-spacing: 0;
11
+ }
12
+
13
+ .ons-grid--center {
14
+ text-align: center;
15
+ .ons-grid__col {
16
+ text-align: left;
17
+ }
18
+ }
19
+
20
+ .ons-grid--center-all {
21
+ text-align: center;
22
+ }
23
+
24
+ .ons-grid--reverse {
25
+ direction: rtl;
26
+ .ons-grid__col {
27
+ direction: ltr;
28
+ }
29
+ }
30
+
31
+ .ons-grid--spaced {
32
+ .ons-grid__col {
33
+ margin-bottom: $grid-gutters;
34
+ }
35
+ &.ons-grid--tight {
36
+ .ons-grid__col {
37
+ margin-bottom: math.div($grid-gutters, 2);
38
+ }
39
+ }
40
+ }
41
+
42
+ .ons-grid--align-mid {
43
+ .ons-grid__col {
44
+ vertical-align: middle;
45
+ }
46
+ }
47
+
48
+ .ons-grid--stagger-align {
49
+ .ons-grid__col:nth-of-type(1n) {
50
+ text-align: right;
51
+ }
52
+ .ons-grid__col:nth-of-type(2n) {
53
+ text-align: left;
54
+ }
55
+ }
56
+
57
+ .ons-grid--tight {
58
+ margin-left: math.div(-$grid-gutters, 2);
59
+ .ons-grid__col {
60
+ padding-left: math.div($grid-gutters, 2);
61
+ }
62
+ }
63
+
64
+ .ons-grid--loose {
65
+ margin-left: -$grid-gutters * 2;
66
+ }
67
+
68
+ .ons-grid--gutterless {
69
+ margin-left: 0;
70
+ .ons-grid__col {
71
+ padding-left: 0;
72
+ }
73
+ }
74
+
75
+ .ons-grid--pixelgutter {
76
+ margin-left: 1px;
77
+ .ons-grid__col {
78
+ margin-bottom: 1px;
79
+ padding-left: 1px;
80
+ }
81
+ }
82
+
83
+ .ons-grid--flex {
84
+ display: flex;
85
+ flex-flow: row wrap;
86
+
87
+ &.ons-grid--center {
88
+ justify-content: center;
89
+ }
90
+
91
+ &.ons-grid--between {
92
+ justify-content: space-between;
93
+ }
94
+
95
+ &.ons-grid--vertical-top {
96
+ align-items: start;
97
+ }
98
+
99
+ &.ons-grid--vertical-center {
100
+ align-items: center;
101
+ }
102
+ }
103
+
104
+ @include bp-suffix(ons-grid--no-wrap) {
105
+ flex-wrap: nowrap;
106
+ }
107
+
108
+ @include bp-suffix(ons-grid--column, $create-between-breakpoints: true) {
109
+ flex-direction: column;
110
+ }
111
+
112
+ @include bp-suffix(ons-grid--bordered, false) {
113
+ margin-left: 0;
114
+ .ons-grid__col {
115
+ border-bottom: 1px solid $color-borders;
116
+ border-top: 1px solid $color-borders;
117
+ flex: 1 1 auto;
118
+ padding-bottom: 1rem;
119
+ padding-top: 1rem;
120
+ &:first-of-type {
121
+ border-right: 1px solid $color-borders;
122
+ padding-left: 0;
123
+ }
124
+ }
125
+ }
126
+
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
+ @include bp-suffix(ons-grid__col--sticky) {
156
+ position: sticky;
157
+ top: 2rem;
158
+ }
159
+
160
+ @each $breakpoint-min, $size in $grid-bp {
161
+ @for $column from 1 through $grid-cols {
162
+ $width: percentage(math.div($column, $grid-cols));
163
+
164
+ @include mq($breakpoint-min) {
165
+ .ons-col-#{$column}\@#{$breakpoint-min} {
166
+ max-width: $width;
167
+ width: $width;
168
+ }
169
+
170
+ .ons-push-#{$column}\@#{$breakpoint-min} {
171
+ left: $width;
172
+ position: relative;
173
+ }
174
+
175
+ .ons-pull-#{$column}\@#{$breakpoint-min} {
176
+ left: -$width;
177
+ position: relative;
178
+ }
179
+ }
180
+ }
181
+
182
+ @each $breakpoint-max, $size in $grid-bp {
183
+ @for $column from 1 through $grid-cols {
184
+ $width: percentage(math.div($column, $grid-cols));
185
+
186
+ @include mq($breakpoint-min, $breakpoint-max) {
187
+ .ons-col-#{$column}\@#{$breakpoint-min}\@#{$breakpoint-max} {
188
+ max-width: $width;
189
+ width: $width;
190
+ }
191
+
192
+ .ons-push-#{$column}\@#{$breakpoint-min}\@#{$breakpoint-max} {
193
+ left: $width;
194
+ position: relative;
195
+ }
196
+
197
+ .ons-pull-#{$column}\@#{$breakpoint-min}\@#{$breakpoint-max} {
198
+ left: -$width;
199
+ position: relative;
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+
206
+ @include bp-suffix(ons-col-auto) {
207
+ width: auto;
208
+
209
+ .ons-grid--flex & {
210
+ flex-basis: auto;
211
+ max-width: 100%;
212
+ }
213
+ }
214
+
215
+ @include bp-suffix(ons-u-flex-shrink) {
216
+ flex-shrink: 1;
217
+ }
218
+
219
+ @include bp-suffix(ons-u-flex-no-shrink) {
220
+ flex-shrink: 0;
221
+ }
222
+
223
+ @include bp-suffix(ons-u-flex-grow) {
224
+ flex-grow: 1;
225
+ }
226
+
227
+ @include bp-suffix(ons-u-flex-no-grow) {
228
+ flex-grow: 0;
229
+ }
230
+
231
+ @include bp-suffix(ons-u-flex-no-basis) {
232
+ flex-basis: 0;
233
+ }
234
+
235
+ @include bp-suffix(ons-u-flex-align-bottom) {
236
+ align-self: flex-end;
237
+ }
238
+
239
+ @include bp-suffix('ons-nopull-', false) {
240
+ left: 0;
241
+ }
242
+
243
+ @include bp-suffix('ons-nopush-', false) {
244
+ left: 0;
245
+ }
@@ -0,0 +1,10 @@
1
+ @import './border';
2
+ @import './colors';
3
+ @import './display';
4
+ @import './float';
5
+ @import './grid';
6
+ @import './margin';
7
+ @import './pad';
8
+ @import './typography';
9
+ @import './utilities';
10
+ @import './visibility';
@@ -0,0 +1,24 @@
1
+ $sizes: (
2
+ no: 0,
3
+ xs: 0.5rem,
4
+ s: 1rem,
5
+ m: 1.5rem,
6
+ l: 2rem,
7
+ xl: 3rem,
8
+ );
9
+
10
+ $margins: (
11
+ mt: margin-top,
12
+ mr: margin-right,
13
+ mb: margin-bottom,
14
+ ml: margin-left,
15
+ m: margin,
16
+ );
17
+
18
+ @each $key, $value in $sizes {
19
+ @each $abbr, $dec in $margins {
20
+ @include bp-suffix(ons-u-#{$abbr}-#{$key}, $create-between-breakpoints: true) {
21
+ #{$dec}: #{$value} !important;
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,25 @@
1
+ // e.g ons-u-pl-m
2
+ $sizes: (
3
+ no: 0 !important,
4
+ xxs: 0.3rem,
5
+ xs: 0.5rem,
6
+ s: 1rem,
7
+ m: 2rem,
8
+ l: 3rem,
9
+ );
10
+
11
+ $padding: (
12
+ pt: padding-top,
13
+ pr: padding-right,
14
+ pb: padding-bottom,
15
+ pl: padding-left,
16
+ p: padding,
17
+ );
18
+
19
+ @each $key, $value in $sizes {
20
+ @each $abbr, $dec in $padding {
21
+ @include bp-suffix(ons-u-#{$abbr}-#{$key}, $create-between-breakpoints: true) {
22
+ #{$dec}: #{$value};
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,88 @@
1
+ @mixin font-size($props, $base) {
2
+ $small-size: map-get($props, small);
3
+ $large-size: map-get($props, large);
4
+
5
+ font-size: rems($small-size, $base);
6
+ font-weight: map-get($props, weight);
7
+ line-height: map-get($props, line-height);
8
+
9
+ @if $small-size != $large-size {
10
+ @include mq(m) {
11
+ font-size: rems($large-size, $base);
12
+ }
13
+ }
14
+ }
15
+
16
+ @each $name, $props in $type-matrix {
17
+ .#{$name} {
18
+ @include font-size($props, $base);
19
+ }
20
+ }
21
+
22
+ @each $breakpoint, $size in $grid-bp {
23
+ @each $name, $props in $type-matrix {
24
+ @include mq($breakpoint) {
25
+ .#{$name}\@#{$breakpoint} {
26
+ @include font-size($props, $base);
27
+ }
28
+ }
29
+ }
30
+ }
31
+
32
+ h1 {
33
+ @extend .ons-u-fs-xl;
34
+ }
35
+
36
+ h2 {
37
+ @extend .ons-u-fs-l;
38
+ }
39
+
40
+ h3 {
41
+ @extend .ons-u-fs-m;
42
+ }
43
+
44
+ h4 {
45
+ @extend .ons-u-fs-r--b;
46
+ }
47
+
48
+ .ons-u-fw-b {
49
+ font-weight: 700;
50
+ }
51
+
52
+ .ons-u-fw-n {
53
+ font-weight: $font-weight-regular;
54
+ }
55
+
56
+ .ons-u-fs-i {
57
+ font-style: italic;
58
+ }
59
+
60
+ .ons-u-tt-u {
61
+ text-transform: uppercase;
62
+ }
63
+
64
+ .ons-u-td-no,
65
+ .ons-u-td-no:hover {
66
+ text-decoration: none;
67
+ }
68
+
69
+ .ons-u-lighter {
70
+ color: $color-text-light;
71
+ }
72
+
73
+ .ons-u-f-mono {
74
+ font-family: $font-mono;
75
+ letter-spacing: 0.1em;
76
+ }
77
+
78
+ .ons-u-ta-right {
79
+ text-align: right;
80
+ }
81
+
82
+ .ons-u-ta-left {
83
+ text-align: left;
84
+ }
85
+
86
+ .ons-u-ta-center {
87
+ text-align: center;
88
+ }
@@ -0,0 +1,31 @@
1
+ .ons-u-dib {
2
+ display: inline-block;
3
+ }
4
+
5
+ .ons-u-di {
6
+ display: inline;
7
+ }
8
+
9
+ .ons-u-db {
10
+ display: block;
11
+ }
12
+
13
+ // Utility class to override the height property to 'auto'
14
+ .ons-u-ha {
15
+ height: auto;
16
+ }
17
+
18
+ // Utility class to force non-wrapping of values
19
+ .ons-u-nowrap {
20
+ white-space: nowrap;
21
+ }
22
+
23
+ // Utility class to set direction right to left
24
+ .ons-u-rtl {
25
+ direction: rtl;
26
+ }
27
+
28
+ // Set an element's width to be auto at specified breakpoint
29
+ @include bp-suffix(ons-u-wa--) {
30
+ width: auto;
31
+ }
@@ -0,0 +1,45 @@
1
+ .ons-u-hidden {
2
+ display: none !important;
3
+ visibility: hidden;
4
+ }
5
+
6
+ @include bp-suffix('ons-u-vh', $create-between-breakpoints: true) {
7
+ border: 0;
8
+ clip: rect(0 0 0 0);
9
+ height: 1px;
10
+ margin: -1px;
11
+ overflow: hidden;
12
+ padding: 0;
13
+ position: absolute;
14
+ user-select: none;
15
+ width: 1px;
16
+ }
17
+
18
+ .ons-u-visuallyhidden.ons-u-focusable:active,
19
+ .ons-u-vh.ons-u-focusable:active,
20
+ .ons-u-visuallyhidden.ons-u-focusable:focus,
21
+ .ons-u-vh.ons-u-focusable:focus {
22
+ clip: auto;
23
+ height: auto;
24
+ margin: 0;
25
+ overflow: visible;
26
+ position: static;
27
+ width: auto;
28
+ }
29
+
30
+ .ons-u-invisible {
31
+ visibility: hidden;
32
+ }
33
+
34
+ .ons-u-ir {
35
+ background-color: transparent;
36
+ border: 0;
37
+ overflow: hidden;
38
+ }
39
+
40
+ .ons-u-ir::before {
41
+ content: '';
42
+ display: block;
43
+ height: 150%;
44
+ width: 0;
45
+ }
@@ -0,0 +1,112 @@
1
+ @import '../helpers/functions';
2
+
3
+ // =============================================================================
4
+ // ONS Brand guidelines for Colour: https://www.notion.so/Colours-9cd14589e0764e33a3b3c5a6762f37ae
5
+ // Tints: If you are using tints of a colour, use either 70%, 40% or 10%. Tints are created by adding white (30%, 60% or 90%), rather than using transparency.
6
+ // =============================================================================
7
+
8
+ // Grey palette
9
+ $color-black: #222;
10
+ $color-grey-100: #414042;
11
+ $color-grey-75: #707071;
12
+ $color-grey-35: #bcbcbd;
13
+ $color-grey-15: #e2e2e3;
14
+ $color-grey-5: #f5f5f6;
15
+ $color-white: #fff;
16
+
17
+ // Primary brand palette
18
+ $color-night-blue: #003c57; // ONS logo primary
19
+ $color-spring-green: #a8bd3a; // ONS logo accent
20
+ $color-ocean-blue: #206095;
21
+ $color-sky-blue: #27a0cc;
22
+ $color-aqua-teal: #00a3a6;
23
+
24
+ // Supporting palette
25
+ $color-leaf-green: #0f8243;
26
+ $color-ruby-red: #d0021b;
27
+ $color-jaffa-orange: #fa6401;
28
+ $color-sun-yellow: #fbc900;
29
+ $color-neon-yellow: #f0f762;
30
+
31
+ // ONS logo
32
+ $color-ons-logo-primary: $color-night-blue !default;
33
+ $color-ons-logo-secondary: $color-spring-green !default;
34
+
35
+ // Census 2021
36
+ $color-indigo-blue: #3c388e;
37
+ $color-plum-purple: #902082;
38
+ $color-flamingo-pink: #df0667;
39
+
40
+ // NISRA logo
41
+ $color-nisra-logo-primary: #3d7cc9;
42
+ $color-nisra-logo-secondary: #cddb00;
43
+ $color-nisra-logo-tertiary: #00205c;
44
+
45
+ // Theme branding
46
+ $color-branded: $color-ocean-blue !default;
47
+ $color-branded-tint: tint($color-branded, 90%) !default;
48
+ $color-branded-secondary: $color-night-blue !default;
49
+ $color-branded-secondary-tint: tint($color-branded-secondary, 90%) !default;
50
+ $color-branded-tertiary: $color-aqua-teal !default;
51
+ $color-branded-tertiary-tint: tint($color-branded-tertiary, 90%) !default;
52
+ $color-branded-supporting: $color-spring-green !default;
53
+ $color-branded-supporting-tint: tint($color-branded-supporting, 90%) !default;
54
+
55
+ // =============================================================================
56
+ // Assignment
57
+ // =============================================================================
58
+
59
+ // Headers, footers, banners
60
+ $color-header: $color-branded !default;
61
+ $color-header-top: $color-white !default;
62
+ $color-header-top-internal: $color-branded-secondary !default;
63
+ $color-cta-bg: $color-branded-tint !default;
64
+ $color-banner-bg: $color-grey-5 !default;
65
+ $color-banner-bg-dark: $color-grey-15 !default;
66
+
67
+ // Typography
68
+ $color-text: $color-black !default;
69
+ $color-text-light: $color-grey-75 !default;
70
+ $color-text-inverse: $color-white !default;
71
+ $color-text-banner: $color-black !default;
72
+ $color-text-link: $color-ocean-blue !default;
73
+ $color-text-link-hover: $color-night-blue !default;
74
+ $color-text-link-active: $color-night-blue !default;
75
+ $color-text-link-focus: $color-black !default;
76
+ $color-text-inverse-link: $color-white !default;
77
+ $color-text-inverse-link-hover: $color-grey-5 !default;
78
+ $color-text-banner-link: $color-grey-100 !default;
79
+ $color-text-banner-link-hover: $color-black !default;
80
+
81
+ // Foundations
82
+ $color-focus: $color-sun-yellow !default;
83
+ $color-highlight: $color-neon-yellow !default;
84
+
85
+ // Borders
86
+ $color-borders: $color-grey-75 !default;
87
+ $color-borders-indent: $color-grey-35 !default;
88
+ $color-document-border: $color-grey-15 !default;
89
+ $color-document-border-focus: $color-black !default;
90
+
91
+ // Form elements
92
+ $color-button: $color-leaf-green !default;
93
+ $color-button-secondary: $color-grey-15 !default;
94
+ $color-input: $color-black !default;
95
+
96
+ // Panels and status
97
+ $color-info: $color-ocean-blue !default;
98
+ $color-info-tint: tint($color-info, 90) !default;
99
+ $color-info-vibrant: scale-color($color-info, $lightness: 20%, $saturation: 30%) !default;
100
+ $color-success: $color-leaf-green !default;
101
+ $color-success-tint: tint($color-success, 90) !default;
102
+ $color-success-vibrant: scale-color($color-success, $lightness: 20%, $saturation: 30%) !default;
103
+ $color-errors: $color-ruby-red !default;
104
+ $color-errors-tint: tint($color-errors, 90) !default;
105
+ $color-errors-vibrant: scale-color($color-errors, $lightness: 20%, $saturation: 30%) !default;
106
+ $color-pending: $color-jaffa-orange !default;
107
+ $color-pending-tint: tint($color-pending, 90) !default;
108
+ $color-pending-vibrant: scale-color($color-pending, $lightness: 20%, $saturation: 30%) !default;
109
+ $color-dead: $color-grey-75 !default;
110
+ $color-instruction: $color-jaffa-orange !default;
111
+ $color-instruction-tint: tint($color-instruction, 90) !default;
112
+ $color-tag-bg: tint($color-leaf-green, 90) !default;
@@ -0,0 +1,50 @@
1
+ @import '../helpers/functions';
2
+
3
+ $input-radius: 3px;
4
+ $input-padding-vertical: 0.39rem;
5
+ $input-padding-horizontal: 0.5rem;
6
+ $input-width: 20rem;
7
+ $input-border-width: 1px;
8
+ $input-widths: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 40, 50;
9
+ // 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;
13
+ // Not the width of a space, the width of the space between characters with no spaces between
14
+ $char-space-width: 0.029rem;
15
+ // Space width
16
+ $nbsp-width: 0.256rem;
17
+
18
+ @mixin input-width($class-name, $char-width: $char-max-width) {
19
+ @each $width in $input-widths {
20
+ .#{str-replace($class-name, '{x}', $width)} {
21
+ max-width: input-width-calc($width, $char-width);
22
+ width: 100%;
23
+
24
+ .ons-field__group & {
25
+ width: input-width-calc($width, $char-width);
26
+ }
27
+
28
+ @if $width <= 10 {
29
+ .ons-input-type & {
30
+ width: input-width-calc($width, $char-width);
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+
37
+ @function input-width-calc($chars: 1, $char-width: $char-max-width, $spaces: 0, $num-chars: 0) {
38
+ // Space between characters is 0.029rem wide
39
+ // Extra 2 pixels are to prevent clipping when the cursor is visible (2px is needed for iOS)
40
+
41
+ $padding-width: $input-padding-horizontal * 2;
42
+ $chars-width: $char-width * $chars;
43
+ $num-chars-width: $num-max-width * $num-chars;
44
+ $chars-space-width: $char-space-width * ($chars + $num-chars - 1);
45
+ $spaces-width: $spaces * $nbsp-width;
46
+
47
+ @return calc(
48
+ #{$padding-width + $chars-width + $num-chars-width + $chars-space-width + $spaces-width} + #{($input-border-width * 2) + 2px}
49
+ );
50
+ }
@@ -0,0 +1,17 @@
1
+ $grid-bp: (
2
+ xxs: 300px,
3
+ xs: 400px,
4
+ s: 500px,
5
+ m: 740px,
6
+ l: 980px,
7
+ xl: 1300px,
8
+ xxl: 1600px
9
+ ) !default;
10
+
11
+ $grid-max-width: 57.445rem !default;
12
+ $grid-max-1280: 71.111111rem !default;
13
+ $grid-cols: 12 !default;
14
+ $grid-cols-mobile: 4 !default;
15
+ $grid-gutters: 1rem !default;
16
+ $grid-bp-fixed: map-get($grid-bp, m) !default;
17
+ $grid-baseline: 16px;
@@ -0,0 +1,5 @@
1
+ @import './vars';
2
+ @import './colors';
3
+ @import './typography';
4
+ @import './grid';
5
+ @import './forms';