nsw-design-system 2.13.0 → 3.0.2

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 (95) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +50 -20
  3. package/dist/css/core.css +2 -0
  4. package/dist/css/main.css +1 -1
  5. package/dist/js/main.js +208 -124
  6. package/package.json +4 -2
  7. package/src/components/_all.scss +27 -0
  8. package/src/components/accordion/_accordion.scss +68 -30
  9. package/src/components/accordion/accordion.js +61 -14
  10. package/src/components/breadcrumbs/_breadcrumbs.scss +34 -43
  11. package/src/components/button/_button.scss +171 -27
  12. package/src/components/callout/_callout.scss +13 -57
  13. package/src/components/card/_card.scss +222 -71
  14. package/src/components/content-block/_content-block.scss +16 -45
  15. package/src/components/filters/_filters.scss +25 -85
  16. package/src/components/filters/filters.js +0 -5
  17. package/src/components/footer/_footer.scss +80 -132
  18. package/src/components/{forms/_forms.scss → form/_form.scss} +122 -75
  19. package/src/components/global-alert/_global-alert.scss +68 -0
  20. package/src/components/{site-wide-message/site-wide-message.js → global-alert/global-alert.js} +3 -3
  21. package/src/components/header/_header.scss +196 -227
  22. package/src/components/hero-banner/_hero-banner.scss +152 -86
  23. package/src/components/hero-search/_hero-search.scss +26 -38
  24. package/src/components/in-page-alert/_in-page-alert.scss +54 -0
  25. package/src/components/in-page-nav/_in-page-nav.scss +22 -0
  26. package/src/components/link-list/_link-list.scss +28 -47
  27. package/src/components/list-item/_list-item.scss +31 -43
  28. package/src/components/main-nav/_main-nav.scss +272 -0
  29. package/src/components/{main-navigation/main-navigation.js → main-nav/main-nav.js} +40 -39
  30. package/src/components/masthead/_masthead.scss +61 -0
  31. package/src/components/media/_media.scss +14 -2
  32. package/src/components/pagination/_pagination.scss +37 -41
  33. package/src/components/progress-indicator/_progress-indicator.scss +11 -11
  34. package/src/components/side-nav/_side-nav.scss +73 -0
  35. package/src/components/table/_table.scss +56 -0
  36. package/src/components/tables/_tables.scss +0 -71
  37. package/src/components/tabs/_tabs.scss +79 -0
  38. package/src/components/{tab-navigation/tab-navigation.js → tabs/tabs.js} +9 -9
  39. package/src/components/tag/_tag.scss +60 -0
  40. package/src/core/_all.scss +6 -0
  41. package/src/core/grid/_grid.scss +117 -0
  42. package/src/core/iconography/_icon.scss +83 -0
  43. package/src/core/layout/_layout.scss +42 -0
  44. package/src/core/section/_section.scss +95 -0
  45. package/src/{global/scss/helpers → core/spacing}/_spacing.scss +27 -4
  46. package/src/core/typography/_typography.scss +266 -0
  47. package/src/global/scss/base/_all.scss +4 -0
  48. package/src/global/scss/base/_functions.scss +44 -0
  49. package/src/global/scss/{style/_base.scss → base/_global.scss} +1 -2
  50. package/src/global/scss/base/_mixins.scss +241 -0
  51. package/src/global/scss/{tools → base}/_print.scss +3 -3
  52. package/src/global/scss/helpers/_all.scss +4 -3
  53. package/src/global/scss/helpers/_colour.scss +86 -0
  54. package/src/global/scss/helpers/_list.scss +21 -0
  55. package/src/global/scss/helpers/_text.scss +9 -0
  56. package/src/global/scss/helpers/_visibility.scss +31 -0
  57. package/src/global/scss/settings/_palette.scss +69 -0
  58. package/src/global/scss/settings/_settings.scss +12 -296
  59. package/src/global/scss/settings/_theme.scss +82 -0
  60. package/src/main.js +8 -11
  61. package/src/main.scss +17 -21
  62. package/dist/assets/svg/sprite.svg +0 -1
  63. package/src/components/banner/_banner.scss +0 -170
  64. package/src/components/direction-links/_direction-links.scss +0 -62
  65. package/src/components/feature-tile/_feature-tile.scss +0 -175
  66. package/src/components/forms/_forms-prev.scss +0 -357
  67. package/src/components/in-page-navigation/_in-page-navigation.scss +0 -26
  68. package/src/components/main-navigation/_main-navigation.scss +0 -405
  69. package/src/components/notification/_notification.scss +0 -69
  70. package/src/components/side-navigation/_side-navigation.scss +0 -85
  71. package/src/components/site-wide-message/_site-wide-message.scss +0 -148
  72. package/src/components/social-bar/_social-bar.scss +0 -27
  73. package/src/components/social-bar/social-bar.js +0 -24
  74. package/src/components/tab-navigation/_tab-navigation.scss +0 -69
  75. package/src/components/tags/_tags.scss +0 -65
  76. package/src/global/scss/helpers/_section.scss +0 -50
  77. package/src/global/scss/helpers/_sr-only.scss +0 -8
  78. package/src/global/scss/style/_all.scss +0 -4
  79. package/src/global/scss/style/_docs.scss +0 -538
  80. package/src/global/scss/style/_grid.scss +0 -171
  81. package/src/global/scss/style/_icons.scss +0 -68
  82. package/src/global/scss/tools/_all.scss +0 -10
  83. package/src/global/scss/tools/_breakpoint.scss +0 -16
  84. package/src/global/scss/tools/_buttons.scss +0 -15
  85. package/src/global/scss/tools/_focus.scss +0 -26
  86. package/src/global/scss/tools/_general.scss +0 -189
  87. package/src/global/scss/tools/_grid.scss +0 -129
  88. package/src/global/scss/tools/_links.scss +0 -18
  89. package/src/global/scss/tools/_spacing.scss +0 -37
  90. package/src/global/scss/tools/_sr-only.scss +0 -21
  91. package/src/global/scss/tools/_typography.scss +0 -90
  92. package/src/styles/grid/_grid.scss +0 -0
  93. package/src/styles/iconography/_iconography.scss +0 -0
  94. package/src/styles/layout/_layout.scss +0 -0
  95. package/src/styles/typography/_typography.scss +0 -219
@@ -1,179 +1,127 @@
1
1
  .nsw-footer {
2
- @include font-stack;
3
- border-top: solid 1px $light40;
4
-
5
2
  hr {
6
- @include nsw-spacing(margin, md none md none);
3
+ margin: rem(16px) 0;
7
4
  height: 1px;
8
5
  border: 0;
9
- color: $light40;
10
- background-color: $light40;
6
+ background-color: var(--nsw-grey-03);
11
7
  }
12
8
 
13
9
  &__upper {
14
- @include nsw-spacing(padding-top, lg);
15
- background-color: $white;
16
- }
17
-
18
- &__lower {
19
- @include nsw-spacing(padding, md none lg none);
20
- background-color: $dark80;
21
- color: $white;
22
- font-size: rem(12px);
10
+ background-color: var(--nsw-white);
11
+ border-top: solid 1px var(--nsw-grey-03);
12
+ padding-top: rem(24px);
23
13
 
24
- a {
25
- color: $white;
14
+ .nsw-container {
15
+ padding-left: rem(8px);
16
+ padding-right: rem(8px);
17
+ display: flex;
18
+ flex-direction: row;
19
+ flex-wrap: wrap;
26
20
 
27
- &:focus {
28
- @include nsw-focus($color: $white);
21
+ @include breakpoint('lg') {
22
+ padding-left: 0;
23
+ padding-right: 0;
29
24
  }
30
25
  }
31
-
32
- p:not([class]) {
33
- margin: rem(12px) 0;
34
- }
35
26
  }
36
27
 
37
- &__info {
28
+ &__group {
29
+ padding: 0 rem(8px) rem(16px) rem(8px);
30
+ flex: 1 0 auto;
31
+ min-width: rem(256px);
32
+ max-width: 50%;
38
33
 
39
34
  @include breakpoint('md') {
40
- display: flex;
41
- flex-wrap: nowrap;
35
+ flex-basis: 50%;
36
+ min-width: auto;
42
37
  }
43
- }
44
38
 
45
- &__copyright {
46
- flex: 1 1 auto;
47
- }
48
-
49
- &__built {
50
- flex: 0 0 rem(200px);
51
-
52
- a:not([class]) {
53
- color: $white;
54
-
55
- &:hover {
56
- background-color: transparent;
57
- outline: none;
58
- text-decoration: none;
59
- }
60
-
61
- &:focus {
62
- @include nsw-focus($offset: false, $color: $white);
63
- }
39
+ @include breakpoint('lg') {
40
+ padding: 0 rem(16px) rem(24px) rem(16px);
41
+ flex-basis: 25%;
42
+ }
64
43
 
65
- &:visited {
66
- color: $white;
67
- }
44
+ ul {
45
+ @include font-size('xs');
46
+ list-style: none;
47
+ margin: rem(4px) 0 0 0;
48
+ padding: 0;
68
49
 
69
- &:active {
70
- background-color: transparent;
50
+ a {
51
+ font-weight: var(--nsw-font-normal);
71
52
  }
72
53
  }
73
54
 
74
- @include breakpoint('md') {
75
- text-align: right;
55
+ li:first-child {
56
+ margin-top: 0;
76
57
  }
77
58
  }
78
- }
79
-
80
- .nsw-footer-links {
81
- @include font-stack('heading');
82
- @include nsw-spacing(margin, md none none none);
83
- @include nsw-spacing(padding, none);
84
- list-style: none;
85
- display: flex;
86
- flex-direction: row;
87
- flex-wrap: wrap;
88
-
89
- &__item {
90
- @include nsw-spacing(margin, none none md none);
91
- flex: 1 0 50%;
92
- max-width: 50%;
93
59
 
94
- @include breakpoint('md') {
95
- @include nsw-spacing(margin-right, lg);
96
- flex: 0 0 auto;
97
- max-width: none;
98
- }
60
+ &__heading {
61
+ @include font-size('sm');
99
62
  }
100
63
 
101
- &__link {
102
- text-decoration: underline;
103
-
104
- &:hover {
105
- text-decoration: none;
106
- }
64
+ &__lower {
65
+ @include font-size('xxs');
66
+ background-color: var(--nsw-grey-01);
67
+ color: var(--nsw-text-light);
68
+ padding: rem(16px) 0 rem(24px) 0;
107
69
 
108
- &:focus {
109
- @include nsw-focus($color: $white);
70
+ a {
71
+ @include link-light;
110
72
  }
111
- }
112
- }
113
-
114
- .section-links {
115
- display: flex;
116
- flex-direction: row;
117
- flex-wrap: wrap;
118
-
119
- @include breakpoint('md') {
120
- display: flex;
121
- flex-direction: row;
122
- flex-wrap: wrap;
123
- }
124
-
125
- a:not([class]) {
126
- color: $nsw-primary-blue;
127
73
 
128
- &:visited {
129
- color: $nsw-primary-blue;
74
+ p {
75
+ margin: rem(12px) 0;
130
76
  }
131
77
 
132
- &:hover {
133
- @include nsw-hover;
134
- outline: 2px solid $hover-colour;
135
- }
78
+ ul {
79
+ list-style: none;
80
+ margin: rem(16px) rem(-8px) 0 rem(-8px);
81
+ padding: 0;
82
+ display: flex;
83
+ flex-direction: row;
84
+ flex-wrap: wrap;
136
85
 
137
- &:focus {
138
- @include nsw-focus($offset: false);
86
+ @include breakpoint('md') {
87
+ margin-left: 0;
88
+ margin-right: 0;
89
+ }
139
90
  }
140
91
 
141
- &:active {
142
- @include nsw-active;
92
+ li {
93
+ flex: 1 0 50%;
94
+ max-width: 50%;
95
+ padding: 0 rem(8px);
96
+ margin: 0 0 rem(16px) 0;
97
+
98
+ @include breakpoint('md') {
99
+ margin-right: rem(24px);
100
+ padding: 0;
101
+ flex: 0 0 auto;
102
+ max-width: none;
103
+ }
143
104
  }
144
105
  }
145
106
 
146
- &__group {
147
- @include nsw-spacing(padding-bottom, lg);
148
- flex: 1 0 auto;
149
- min-width: rem(256px);
150
- max-width: 50%;
151
-
107
+ &__info {
152
108
  @include breakpoint('md') {
153
- flex-basis: 50%;
154
- min-width: auto;
155
- }
156
-
157
- @include breakpoint('lg') {
158
- flex-basis: 25%;
109
+ display: flex;
110
+ flex-wrap: nowrap;
159
111
  }
160
112
  }
161
113
 
162
- &__heading {
163
- @include nsw-spacing(margin, none);
164
- @include font-stack('heading');
165
- @include font-size('sm');
114
+ &__copyright {
115
+ flex: 1 1 auto;
116
+ margin: rem(12px) 0;
166
117
  }
167
118
 
168
- &__list {
169
- @include nsw-spacing(margin, none);
170
- @include nsw-spacing(padding, none);
171
- @include font-size('xs');
172
- list-style: none;
173
- margin-top: rem(4px);
174
- }
119
+ &__built {
120
+ flex: 0 0 rem(200px);
121
+ margin: rem(12px) 0;
175
122
 
176
- &__item:not(:first-child) {
177
- @include nsw-spacing(margin-top, xs);
123
+ @include breakpoint('md') {
124
+ text-align: right;
125
+ }
178
126
  }
179
127
  }
@@ -1,16 +1,15 @@
1
+ $nsw-form-chevron-down: '<svg fill="#333333" version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M16 26l16-16-4-4-12 12-12-12-4 4 16 16z"></path></svg>';
2
+ $nsw-form-tick: '<svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M29.362 3.742l-18.867 19.204-7.857-7.997-2.638 2.685 9.175 9.34 1.319 1.284 1.318-1.284 20.187-20.547z"></path></svg>';
3
+
1
4
  .nsw-form {
2
- @include nsw-spacing(margin-top, xxl);
5
+ margin-top: rem(48px);
3
6
 
4
7
  &:first-child {
5
8
  margin-top: 0;
6
9
  }
7
10
 
8
- a {
9
- @include link;
10
- }
11
-
12
11
  &__group {
13
- @include nsw-spacing(margin-top, md);
12
+ margin-top: rem(16px);
14
13
 
15
14
  &:first-child {
16
15
  margin-top: 0;
@@ -18,44 +17,58 @@
18
17
  }
19
18
 
20
19
  &__helper {
21
- @include font-stack;
22
20
  @include font-size('xs');
23
21
  display: block;
24
22
  margin-bottom: rem(4px);
25
23
 
26
24
  &--error,
27
25
  &--valid {
28
- @include font-stack(heading);
29
- @include nsw-spacing(padding, xs md xs xl);
30
- @include nsw-spacing(margin-top, xs);
26
+ margin-top: rem(8px);
27
+ padding: rem(8px);
28
+ font-weight: var(--nsw-font-bold);
29
+ color: var(--nsw-text-dark);
31
30
  background-repeat: no-repeat;
32
31
  background-position: left rem(8px) top rem(8px);
33
32
  background-size: 1rem auto;
33
+ display: flex;
34
+ align-items: center;
35
+
36
+ .nsw-material-icons {
37
+ font-size: rem(map-get($nsw-icon-sizes, 20));
38
+ margin-right: rem(4px);
39
+ }
34
40
  }
35
41
 
36
42
  &--error {
37
- @include background-svg(error, $critical);
38
- background-color: $critical-background;
43
+ background-color: var(--nsw-status-error-bg);
44
+
45
+ .nsw-material-icons {
46
+ color: var(--nsw-status-error);
47
+ }
39
48
  }
40
49
 
41
50
  &--valid {
42
- @include background-svg(tick, $info);
43
- background-color: $info-background;
51
+ background-color: var(--nsw-status-success-bg);
52
+
53
+ .nsw-material-icons {
54
+ color: var(--nsw-status-success);
55
+ }
44
56
  }
45
57
  }
46
58
 
47
59
  &__label {
48
- @include font-stack(heading);
49
60
  @include font-size('sm');
61
+ font-weight: var(--nsw-font-bold);
50
62
  display: block;
51
63
 
52
64
  &--small {
53
- font-weight: normal;
65
+ font-weight: var(--nsw-font-normal);
54
66
  }
55
67
 
56
68
  + input,
57
69
  + textarea,
58
- + select {
70
+ + select,
71
+ + .nsw-form__input-group {
59
72
  margin-top: rem(4px);
60
73
  }
61
74
  }
@@ -63,64 +76,84 @@
63
76
  &__required {
64
77
  &::after {
65
78
  content: ' *';
66
- color: $nsw-primary-highlight;
79
+ color: var(--nsw-status-error);
67
80
  }
68
81
  }
69
82
 
70
83
  &__input,
71
84
  &__select {
72
- @include font-stack;
73
85
  @include font-size('sm');
74
- @include nsw-spacing(padding, sm md);
75
- @include border-radius;
76
- background-color: $white;
77
- color: $dark80;
78
- border: 1px solid $dark70;
86
+ padding: rem(11px) rem(16px);
87
+ border-radius: var(--nsw-border-radius);
88
+ background-color: var(--nsw-white);
89
+ color: var(--nsw-text-dark);
90
+ border: 1px solid var(--nsw-grey-01);
79
91
  vertical-align: middle;
80
92
  appearance: none;
81
93
  -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
82
94
  width: 100%;
83
95
 
84
- &:hover {
85
- @include nsw-hover;
86
- }
87
-
88
96
  &:focus {
89
97
  @include nsw-focus;
90
98
  }
91
99
 
92
100
  &:disabled {
93
- background-color: $light10;
94
- border-color: $light40;
95
- color: $light40;
101
+ border-color: var(--nsw-grey-03);
102
+ color: var(--nsw-grey-03);
96
103
  cursor: not-allowed;
104
+ opacity: 1;
97
105
  }
98
106
 
99
-
100
107
  &[aria-invalid='true'],
101
108
  &.has-error {
102
- border-color: $critical;
109
+ border-color: var(--nsw-status-error);
103
110
  border-width: 2px;
111
+ }
112
+ }
104
113
 
114
+ &__input {
115
+ &:hover {
116
+ background-image: linear-gradient(var(--nsw-text-hover), var(--nsw-text-hover));
117
+ }
118
+
119
+ &:disabled {
120
+ background: var(--nsw-off-white);
121
+ }
122
+
123
+ &[aria-invalid='true'],
124
+ &.has-error {
105
125
  &:hover {
106
- background-color: $critical-background;
126
+ background: var(--nsw-status-error-bg);
107
127
  }
108
128
  }
109
129
  }
110
130
 
111
131
  &__select {
112
- @include background-svg(chevron-down, $nsw-primary-blue);
113
- @include nsw-spacing(padding-right, xxl);
114
- background-repeat: no-repeat;
115
- background-position: right rem(16px) center;
132
+ padding-right: rem(48px);
133
+ background: var(--nsw-white) svg-url($nsw-form-chevron-down) no-repeat right rem(16px) center;
116
134
  background-size: rem(16px) auto;
117
135
 
136
+ &:hover {
137
+ background: svg-url($nsw-form-chevron-down) no-repeat right rem(16px) center, linear-gradient(var(--nsw-text-hover), var(--nsw-text-hover));
138
+ background-size: rem(16px) auto, auto;
139
+ background-color: var(--nsw-white);
140
+ }
141
+
118
142
  &:disabled {
119
- @include background-svg(chevron-down, $light40);
143
+ background: var(--nsw-off-white) svg-url($nsw-form-chevron-down) no-repeat right rem(16px) center;
144
+ background-size: rem(16px) auto;
145
+ }
146
+
147
+ &[aria-invalid='true'],
148
+ &.has-error {
149
+ &:hover {
150
+ background: var(--nsw-status-error-bg) svg-url($nsw-form-chevron-down) no-repeat right rem(16px) center;
151
+ background-size: rem(16px) auto;
152
+ }
120
153
  }
121
154
 
122
155
  option {
123
- background-color: $white;
156
+ background-color: var(--nsw-white);
124
157
  }
125
158
  }
126
159
 
@@ -131,6 +164,10 @@
131
164
  border-right-width: 0;
132
165
  border-top-right-radius: 0;
133
166
  border-bottom-right-radius: 0;
167
+
168
+ &:focus {
169
+ position: relative;
170
+ }
134
171
  }
135
172
 
136
173
  .nsw-button {
@@ -143,34 +180,44 @@
143
180
  border-bottom-left-radius: 0;
144
181
  border-width: 1px;
145
182
  white-space: nowrap;
183
+
184
+ &:focus {
185
+ outline-color: var(--nsw-focus);
186
+ }
146
187
  }
147
188
 
148
189
  .nsw-material-icons {
149
190
  display: block;
150
- color: $nsw-primary-blue;
191
+ color: var(--nsw-brand-dark);
192
+ font-size: rem(map-get($nsw-icon-sizes, 30));
193
+ position: static;
151
194
  }
152
195
 
153
196
  &--icon {
154
197
  .nsw-button {
155
198
  padding: 0;
156
- min-width: rem(50px);
157
- border-color: $dark70;
199
+ min-width: rem(48px);
200
+ border-color: var(--nsw-grey-01);
158
201
  border-left-width: 0;
159
202
 
160
203
  &:hover {
161
- @include nsw-hover;
204
+ background-image: linear-gradient(var(--nsw-text-hover), var(--nsw-text-hover));
162
205
  }
163
206
  }
164
207
  }
165
208
 
166
209
  &--large {
167
210
  .nsw-form__input {
168
- @include nsw-spacing(padding, md);
211
+ padding: rem(16px);
169
212
  }
170
213
 
171
214
  .nsw-button {
172
215
  min-width: rem(58px);
173
216
  }
217
+
218
+ .nsw-material-icons {
219
+ font-size: rem(map-get($nsw-icon-sizes, 36));
220
+ }
174
221
  }
175
222
  }
176
223
 
@@ -179,17 +226,17 @@
179
226
  }
180
227
 
181
228
  &__predictive-list {
182
- @include border-radius;
183
229
  @include z-index;
230
+ border-radius: var(--nsw-border-radius);
184
231
  border-top-left-radius: 0;
185
232
  border-top-right-radius: 0;
186
- background-color: $white;
187
- box-shadow: map-get($shadows, card);
233
+ background-color: var(--nsw-white);
234
+ box-shadow: 0 4px 12px 0 rgba(var(--nsw-black-rgb), 0.15);
188
235
  list-style-type: none;
189
236
  padding: 0;
190
237
  margin: 0;
191
238
  position: absolute;
192
- top: rem(50px);
239
+ top: rem(48px);
193
240
  right: 0;
194
241
  left: 0;
195
242
  overflow: hidden;
@@ -203,26 +250,27 @@
203
250
  margin: 0;
204
251
  }
205
252
 
206
- a:not([class]) {
253
+ a {
207
254
  display: block;
208
255
  padding: rem(10px);
209
- color: $dark80;
256
+ color: var(--nsw-text-dark);
257
+ font-weight: var(--nsw-font-normal);
210
258
 
211
259
  &:hover {
212
- outline: none;
260
+ outline-width: 0;
213
261
  }
214
262
 
215
263
  &:focus {
264
+ outline-width: 3px;
216
265
  outline-offset: -3px;
217
266
  }
218
267
 
219
268
  span {
220
- font-weight: bolder;
269
+ font-weight: var(--nsw-font-bold);
221
270
  }
222
271
  }
223
272
  }
224
273
 
225
-
226
274
  &__date {
227
275
  padding: 0;
228
276
  margin: 0;
@@ -255,15 +303,15 @@
255
303
  display: contents;
256
304
 
257
305
  legend {
258
- @include nsw-spacing(margin, none none md none);
259
306
  padding: 0;
307
+ margin: 0 0 rem(16px) 0;
260
308
  display: block;
261
309
  }
262
310
  }
263
311
 
264
312
  &__legend {
265
- @include font-stack(heading);
266
313
  @include font-size('sm');
314
+ font-weight: var(--nsw-font-bold);
267
315
  width: 100%;
268
316
  display: block;
269
317
  }
@@ -280,16 +328,16 @@
280
328
 
281
329
  &:hover + .nsw-form__checkbox-label::before,
282
330
  &:hover + .nsw-form__radio-label::before {
283
- @include nsw-hover;
331
+ background-image: linear-gradient(var(--nsw-text-hover), var(--nsw-text-hover));
284
332
  }
285
333
 
286
334
  &:checked + .nsw-form__checkbox-label::after {
287
- @include background-svg(tick, $white);
288
- background-color: $nsw-primary-blue;
335
+ background-image: svg-url($nsw-form-tick);
336
+ background-color: var(--nsw-brand-dark);
289
337
  }
290
338
 
291
339
  &:checked + .nsw-form__radio-label::after {
292
- background-color: $nsw-primary-blue;
340
+ background-color: var(--nsw-brand-dark);
293
341
  }
294
342
 
295
343
  &:disabled {
@@ -300,13 +348,13 @@
300
348
 
301
349
  + .nsw-form__checkbox-label::before,
302
350
  + .nsw-form__radio-label::before {
303
- border-color: $light40;
304
- background-color: $light10;
351
+ border-color: var(--nsw-grey-03);
352
+ background-color: var(--nsw-off-white);
305
353
  }
306
354
 
307
355
  &:checked + .nsw-form__checkbox-label::after,
308
356
  &:checked + .nsw-form__radio-label::after {
309
- background-color: $light40;
357
+ background-color: var(--nsw-grey-03);
310
358
  }
311
359
  }
312
360
 
@@ -315,44 +363,43 @@
315
363
  }
316
364
 
317
365
  &:focus + .nsw-form__radio-label::before {
318
- box-shadow: 0 0 0 3px $white, 0 0 0 6px $focus-color;
366
+ box-shadow: 0 0 0 3px var(--nsw-text-light), 0 0 0 6px var(--nsw-focus);
319
367
  }
320
368
 
321
369
  &[aria-invalid='true'] + .nsw-form__checkbox-label,
322
370
  &.has-error + .nsw-form__checkbox-label {
323
371
  &:hover::before {
324
- background-color: $critical-background;
372
+ background-image: linear-gradient(var(--nsw-status-error-bg), var(--nsw-status-error-bg));
325
373
  }
326
374
 
327
375
  &::before {
328
376
  border-width: 2px;
329
- border-color: $critical;
377
+ border-color: var(--nsw-status-error);
330
378
  }
331
379
  }
332
380
  }
333
381
 
334
382
  &__checkbox-label,
335
383
  &__radio-label {
336
- @include font-stack;
337
384
  @include font-size('sm');
338
- @include nsw-spacing(margin, md none none none);
385
+ margin: rem(16px) 0 0 0;
339
386
  padding: rem(4px) 0 rem(4px) rem(48px);
340
387
  min-height: rem(32px);
341
388
  display: block;
342
389
  position: relative;
343
390
 
344
391
  &::before {
345
- @include nsw-spacing(margin-right, md);
346
392
  content: '';
347
393
  width: rem(32px);
348
394
  height: rem(32px);
349
- border: 1px $dark70 solid;
350
- background: $white;
395
+ margin-right: rem(16px);
396
+ border: 1px var(--nsw-grey-01) solid;
397
+ background-color: var(--nsw-white);
351
398
  top: 0;
352
399
  left: 0;
353
400
  display: inline-block;
354
401
  vertical-align: middle;
355
- background-color: $white;
402
+ background-color: var(--nsw-white);
356
403
  position: absolute;
357
404
  }
358
405
 
@@ -371,17 +418,17 @@
371
418
 
372
419
  &__checkbox-label {
373
420
  &::before {
374
- @include border-radius;
421
+ border-radius: var(--nsw-border-radius);
375
422
  }
376
423
  }
377
424
 
378
425
  &__radio-label {
379
426
  &::before {
380
- @include border-radius('round');
427
+ border-radius: 50%;
381
428
  }
382
429
 
383
430
  &::after {
384
- @include border-radius('round');
431
+ border-radius: 50%;
385
432
  }
386
433
  }
387
434
  }