nsw-design-system 2.14.2 → 3.0.3

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 (92) hide show
  1. package/CHANGELOG.md +586 -350
  2. package/README.md +28 -34
  3. package/dist/css/core.css +2 -0
  4. package/dist/css/main.css +1 -1
  5. package/dist/js/main.js +65 -112
  6. package/package.json +4 -2
  7. package/src/components/_all.scss +9 -14
  8. package/src/components/accordion/_accordion.scss +23 -28
  9. package/src/components/accordion/accordion.js +4 -4
  10. package/src/components/breadcrumbs/_breadcrumbs.scss +35 -40
  11. package/src/components/button/_button.scss +167 -26
  12. package/src/components/callout/_callout.scss +2 -79
  13. package/src/components/card/_card.scss +139 -168
  14. package/src/components/content-block/_content-block.scss +8 -39
  15. package/src/components/filters/_filters.scss +11 -77
  16. package/src/components/filters/filters.js +0 -5
  17. package/src/components/footer/_footer.scss +77 -132
  18. package/src/components/{forms/_forms.scss → form/_form.scss} +71 -50
  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 +140 -253
  22. package/src/components/hero-banner/_hero-banner.scss +150 -84
  23. package/src/components/hero-search/_hero-search.scss +23 -44
  24. package/src/components/in-page-alert/_in-page-alert.scss +66 -0
  25. package/src/components/in-page-nav/_in-page-nav.scss +22 -0
  26. package/src/components/link-list/_link-list.scss +26 -41
  27. package/src/components/list-item/_list-item.scss +28 -44
  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 +9 -18
  31. package/src/components/media/_media.scss +0 -1
  32. package/src/components/pagination/_pagination.scss +35 -46
  33. package/src/components/progress-indicator/_progress-indicator.scss +11 -12
  34. package/src/components/results-bar/_results-bar.scss +0 -1
  35. package/src/components/side-nav/_side-nav.scss +73 -0
  36. package/src/components/table/_table.scss +56 -0
  37. package/src/components/tables/_tables.scss +0 -86
  38. package/src/components/tabs/_tabs.scss +79 -0
  39. package/src/components/{tab-navigation/tab-navigation.js → tabs/tabs.js} +6 -8
  40. package/src/components/tag/_tag.scss +60 -0
  41. package/src/{styles → core}/_all.scss +3 -0
  42. package/src/core/grid/_grid.scss +117 -0
  43. package/src/core/iconography/_icon.scss +83 -0
  44. package/src/core/layout/_layout.scss +42 -0
  45. package/src/{styles → core}/section/_section.scss +0 -40
  46. package/src/{styles → core}/spacing/_spacing.scss +0 -8
  47. package/src/core/typography/_typography.scss +324 -0
  48. package/src/global/scss/base/_all.scss +4 -0
  49. package/src/global/scss/base/_functions.scss +44 -0
  50. package/src/global/scss/{style/_base.scss → base/_global.scss} +0 -0
  51. package/src/global/scss/base/_mixins.scss +241 -0
  52. package/src/global/scss/{tools → base}/_print.scss +1 -1
  53. package/src/global/scss/helpers/_all.scss +3 -1
  54. package/src/global/scss/helpers/_colour.scss +2 -1
  55. package/src/global/scss/helpers/_list.scss +21 -0
  56. package/src/global/scss/helpers/_text.scss +9 -0
  57. package/src/global/scss/helpers/_visibility.scss +31 -0
  58. package/src/global/scss/settings/_palette.scss +2 -1
  59. package/src/global/scss/settings/_settings.scss +9 -317
  60. package/src/global/scss/settings/_theme.scss +5 -1
  61. package/src/main.js +8 -11
  62. package/src/main.scss +13 -21
  63. package/dist/assets/svg/sprite.svg +0 -1
  64. package/src/components/banner/_banner.scss +0 -205
  65. package/src/components/direction-links/_direction-links.scss +0 -63
  66. package/src/components/feature-tile/_feature-tile.scss +0 -170
  67. package/src/components/forms/_forms-prev.scss +0 -356
  68. package/src/components/in-page-navigation/_in-page-navigation.scss +0 -27
  69. package/src/components/main-navigation/_main-navigation.scss +0 -406
  70. package/src/components/notification/_notification.scss +0 -92
  71. package/src/components/side-navigation/_side-navigation.scss +0 -86
  72. package/src/components/site-wide-message/_site-wide-message.scss +0 -163
  73. package/src/components/social-bar/_social-bar.scss +0 -28
  74. package/src/components/social-bar/social-bar.js +0 -24
  75. package/src/components/tab-navigation/_tab-navigation.scss +0 -69
  76. package/src/components/tags/_tags.scss +0 -69
  77. package/src/global/scss/helpers/_sr-only.scss +0 -7
  78. package/src/global/scss/style/_all.scss +0 -3
  79. package/src/global/scss/style/_grid.scss +0 -171
  80. package/src/global/scss/style/_icons.scss +0 -44
  81. package/src/global/scss/tools/_all.scss +0 -10
  82. package/src/global/scss/tools/_breakpoint.scss +0 -16
  83. package/src/global/scss/tools/_buttons.scss +0 -36
  84. package/src/global/scss/tools/_focus.scss +0 -25
  85. package/src/global/scss/tools/_general.scss +0 -163
  86. package/src/global/scss/tools/_grid.scss +0 -129
  87. package/src/global/scss/tools/_links.scss +0 -33
  88. package/src/global/scss/tools/_spacing.scss +0 -37
  89. package/src/global/scss/tools/_sr-only.scss +0 -21
  90. package/src/global/scss/tools/_typography.scss +0 -71
  91. package/src/styles/layout/_layout.scss +0 -0
  92. package/src/styles/typography/_typography.scss +0 -325
@@ -1,182 +1,127 @@
1
1
  .nsw-footer {
2
- font-family: var(--nsw-font-family);
3
-
4
2
  hr {
5
- @include nsw-spacing(margin, md none md none);
3
+ margin: rem(16px) 0;
6
4
  height: 1px;
7
5
  border: 0;
8
- color: var(--nsw-grey-03);
9
6
  background-color: var(--nsw-grey-03);
10
7
  }
11
8
 
12
9
  &__upper {
13
- @include nsw-spacing(padding-top, lg);
14
10
  background-color: var(--nsw-white);
15
11
  border-top: solid 1px var(--nsw-grey-03);
16
- }
12
+ padding-top: rem(24px);
17
13
 
18
- &__lower {
19
- @include nsw-spacing(padding, md none lg none);
20
- @include font-size('xxs');
21
- background-color: var(--nsw-grey-01);
22
- color: var(--nsw-text-light);
23
-
24
- a {
25
- color: var(--nsw-text-light);
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: var(--nsw-text-light));
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: var(--nsw-text-light);
54
-
55
- &:hover {
56
- background-color: transparent;
57
- outline: none;
58
- text-decoration: none;
59
- }
39
+ @include breakpoint('lg') {
40
+ padding: 0 rem(16px) rem(24px) rem(16px);
41
+ flex-basis: 25%;
42
+ }
60
43
 
61
- &:focus {
62
- @include nsw-focus($offset: false, $color: var(--nsw-text-light));
63
- }
44
+ ul {
45
+ @include font-size('xs');
46
+ list-style: none;
47
+ margin: rem(4px) 0 0 0;
48
+ padding: 0;
64
49
 
65
- &:visited {
66
- color: var(--nsw-text-light);
50
+ a {
51
+ font-weight: var(--nsw-font-normal);
67
52
  }
68
53
  }
69
54
 
70
- @include breakpoint('md') {
71
- text-align: right;
55
+ li:first-child {
56
+ margin-top: 0;
72
57
  }
73
58
  }
74
- }
75
59
 
76
- .nsw-footer-links {
77
- @include nsw-spacing(margin, md none none none);
78
- @include nsw-spacing(padding, none);
79
- font-weight: var(--nsw-font-bold);
80
- list-style: none;
81
- display: flex;
82
- flex-direction: row;
83
- flex-wrap: wrap;
84
- margin-left: rem(-8px);
85
- margin-right: rem(-8px);
86
-
87
- @include breakpoint('md') {
88
- margin-left: 0;
89
- margin-right: 0;
90
- }
91
-
92
- &__item {
93
- @include nsw-spacing(margin, none none md none);
94
- flex: 1 0 50%;
95
- max-width: 50%;
96
- padding: 0 rem(8px);
97
-
98
- @include breakpoint('md') {
99
- @include nsw-spacing(margin-right, lg);
100
- padding: 0;
101
- flex: 0 0 auto;
102
- max-width: none;
103
- }
60
+ &__heading {
61
+ @include font-size('sm');
104
62
  }
105
63
 
106
- &__link {
107
- text-decoration: underline;
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;
108
69
 
109
- &:hover {
110
- text-decoration: none;
70
+ a {
71
+ @include link-light;
111
72
  }
112
73
 
113
- &:focus {
114
- @include nsw-focus($color: var(--nsw-text-light));
74
+ p {
75
+ margin: rem(12px) 0;
115
76
  }
116
- }
117
- }
118
-
119
- .section-links {
120
- @include nsw-spacing(padding-left, xs);
121
- @include nsw-spacing(padding-right, xs);
122
- display: flex;
123
- flex-direction: row;
124
- flex-wrap: wrap;
125
-
126
- @include breakpoint('lg') {
127
- padding-left: 0;
128
- padding-right: 0;
129
- }
130
77
 
131
- a:not([class]) {
132
- color: var(--nsw-brand-dark);
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;
133
85
 
134
- &:visited {
135
- color: var(--nsw-brand-dark);
86
+ @include breakpoint('md') {
87
+ margin-left: 0;
88
+ margin-right: 0;
89
+ }
136
90
  }
137
91
 
138
- &:hover {
139
- @include nsw-hover;
140
- outline: 2px solid var(--nsw-text-hover);
141
- }
142
-
143
- &:focus {
144
- @include nsw-focus($offset: false);
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
+ }
145
104
  }
146
105
  }
147
106
 
148
- &__group {
149
- @include nsw-spacing(padding, none xs md xs);
150
- flex: 1 0 auto;
151
- min-width: rem(256px);
152
- max-width: 50%;
153
-
107
+ &__info {
154
108
  @include breakpoint('md') {
155
- flex-basis: 50%;
156
- min-width: auto;
157
- }
158
-
159
- @include breakpoint('lg') {
160
- @include nsw-spacing(padding, none md lg md);
161
- flex-basis: 25%;
109
+ display: flex;
110
+ flex-wrap: nowrap;
162
111
  }
163
112
  }
164
113
 
165
- &__heading {
166
- @include nsw-spacing(margin, none);
167
- @include font-size('sm');
168
- font-weight: var(--nsw-font-bold);
114
+ &__copyright {
115
+ flex: 1 1 auto;
116
+ margin: rem(12px) 0;
169
117
  }
170
118
 
171
- &__list {
172
- @include nsw-spacing(margin, none);
173
- @include nsw-spacing(padding, none);
174
- @include font-size('xs');
175
- list-style: none;
176
- margin-top: rem(4px);
177
- }
119
+ &__built {
120
+ flex: 0 0 rem(200px);
121
+ margin: rem(12px) 0;
178
122
 
179
- &__item:not(:first-child) {
180
- @include nsw-spacing(margin-top, xs);
123
+ @include breakpoint('md') {
124
+ text-align: right;
125
+ }
181
126
  }
182
127
  }
@@ -1,28 +1,15 @@
1
- $nsw-svg-light: #ffffff;
2
- $nsw-svg-dark: #333333;
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
3
 
4
4
  .nsw-form {
5
- @include nsw-spacing(margin-top, xxl);
6
- font-family: var(--nsw-font-family);
5
+ margin-top: rem(48px);
7
6
 
8
7
  &:first-child {
9
8
  margin-top: 0;
10
9
  }
11
10
 
12
- button,
13
- input,
14
- textarea,
15
- textfield,
16
- select {
17
- font-family: var(--nsw-font-family);
18
- }
19
-
20
- a {
21
- @include link;
22
- }
23
-
24
11
  &__group {
25
- @include nsw-spacing(margin-top, md);
12
+ margin-top: rem(16px);
26
13
 
27
14
  &:first-child {
28
15
  margin-top: 0;
@@ -36,9 +23,10 @@ $nsw-svg-dark: #333333;
36
23
 
37
24
  &--error,
38
25
  &--valid {
39
- @include nsw-spacing(padding, xs);
40
- @include nsw-spacing(margin-top, xs);
26
+ margin-top: rem(8px);
27
+ padding: rem(8px);
41
28
  font-weight: var(--nsw-font-bold);
29
+ color: var(--nsw-text-dark);
42
30
  background-repeat: no-repeat;
43
31
  background-position: left rem(8px) top rem(8px);
44
32
  background-size: 1rem auto;
@@ -46,9 +34,8 @@ $nsw-svg-dark: #333333;
46
34
  align-items: center;
47
35
 
48
36
  .nsw-material-icons {
49
- font-size: rem(20px);
37
+ font-size: rem(map-get($nsw-icon-sizes, 20));
50
38
  margin-right: rem(4px);
51
- color: var(--nsw-text-dark);
52
39
  }
53
40
  }
54
41
 
@@ -80,7 +67,8 @@ $nsw-svg-dark: #333333;
80
67
 
81
68
  + input,
82
69
  + textarea,
83
- + select {
70
+ + select,
71
+ + .nsw-form__input-group {
84
72
  margin-top: rem(4px);
85
73
  }
86
74
  }
@@ -95,9 +83,8 @@ $nsw-svg-dark: #333333;
95
83
  &__input,
96
84
  &__select {
97
85
  @include font-size('sm');
98
- @include nsw-spacing(padding, sm md);
86
+ padding: rem(11px) rem(16px);
99
87
  border-radius: var(--nsw-border-radius);
100
- font-family: var(--nsw-font-family);
101
88
  background-color: var(--nsw-white);
102
89
  color: var(--nsw-text-dark);
103
90
  border: 1px solid var(--nsw-grey-01);
@@ -106,42 +93,63 @@ $nsw-svg-dark: #333333;
106
93
  -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
107
94
  width: 100%;
108
95
 
109
- &:hover {
110
- @include nsw-hover;
111
- }
112
-
113
96
  &:focus {
114
97
  @include nsw-focus;
115
98
  }
116
99
 
117
100
  &:disabled {
118
- background-color: var(--nsw-off-white);
119
101
  border-color: var(--nsw-grey-03);
120
102
  color: var(--nsw-grey-03);
121
103
  cursor: not-allowed;
104
+ opacity: 1;
122
105
  }
123
106
 
124
-
125
107
  &[aria-invalid='true'],
126
108
  &.has-error {
127
109
  border-color: var(--nsw-status-error);
128
110
  border-width: 2px;
111
+ }
112
+ }
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
+ }
129
122
 
123
+ &[aria-invalid='true'],
124
+ &.has-error {
130
125
  &:hover {
131
- background-color: var(--nsw-status-error-bg);
126
+ background: var(--nsw-status-error-bg);
132
127
  }
133
128
  }
134
129
  }
135
130
 
136
131
  &__select {
137
- @include background-svg(chevron-down, $nsw-svg-dark);
138
- @include nsw-spacing(padding-right, xxl);
139
- background-repeat: no-repeat;
140
- 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;
141
134
  background-size: rem(16px) auto;
142
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
+
143
142
  &:disabled {
144
- @include background-svg(chevron-down, $nsw-svg-dark);
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
+ }
145
153
  }
146
154
 
147
155
  option {
@@ -156,6 +164,10 @@ $nsw-svg-dark: #333333;
156
164
  border-right-width: 0;
157
165
  border-top-right-radius: 0;
158
166
  border-bottom-right-radius: 0;
167
+
168
+ &:focus {
169
+ position: relative;
170
+ }
159
171
  }
160
172
 
161
173
  .nsw-button {
@@ -168,36 +180,44 @@ $nsw-svg-dark: #333333;
168
180
  border-bottom-left-radius: 0;
169
181
  border-width: 1px;
170
182
  white-space: nowrap;
183
+
184
+ &:focus {
185
+ outline-color: var(--nsw-focus);
186
+ }
171
187
  }
172
188
 
173
189
  .nsw-material-icons {
174
190
  display: block;
175
191
  color: var(--nsw-brand-dark);
176
- font-size: rem(30px);
192
+ font-size: rem(map-get($nsw-icon-sizes, 30));
177
193
  position: static;
178
194
  }
179
195
 
180
196
  &--icon {
181
197
  .nsw-button {
182
198
  padding: 0;
183
- min-width: rem(50px);
199
+ min-width: rem(48px);
184
200
  border-color: var(--nsw-grey-01);
185
201
  border-left-width: 0;
186
202
 
187
203
  &:hover {
188
- @include nsw-hover;
204
+ background-image: linear-gradient(var(--nsw-text-hover), var(--nsw-text-hover));
189
205
  }
190
206
  }
191
207
  }
192
208
 
193
209
  &--large {
194
210
  .nsw-form__input {
195
- @include nsw-spacing(padding, md);
211
+ padding: rem(16px);
196
212
  }
197
213
 
198
214
  .nsw-button {
199
215
  min-width: rem(58px);
200
216
  }
217
+
218
+ .nsw-material-icons {
219
+ font-size: rem(map-get($nsw-icon-sizes, 36));
220
+ }
201
221
  }
202
222
  }
203
223
 
@@ -216,7 +236,7 @@ $nsw-svg-dark: #333333;
216
236
  padding: 0;
217
237
  margin: 0;
218
238
  position: absolute;
219
- top: rem(50px);
239
+ top: rem(48px);
220
240
  right: 0;
221
241
  left: 0;
222
242
  overflow: hidden;
@@ -230,16 +250,18 @@ $nsw-svg-dark: #333333;
230
250
  margin: 0;
231
251
  }
232
252
 
233
- a:not([class]) {
253
+ a {
234
254
  display: block;
235
255
  padding: rem(10px);
236
256
  color: var(--nsw-text-dark);
257
+ font-weight: var(--nsw-font-normal);
237
258
 
238
259
  &:hover {
239
- outline: none;
260
+ outline-width: 0;
240
261
  }
241
262
 
242
263
  &:focus {
264
+ outline-width: 3px;
243
265
  outline-offset: -3px;
244
266
  }
245
267
 
@@ -249,7 +271,6 @@ $nsw-svg-dark: #333333;
249
271
  }
250
272
  }
251
273
 
252
-
253
274
  &__date {
254
275
  padding: 0;
255
276
  margin: 0;
@@ -282,8 +303,8 @@ $nsw-svg-dark: #333333;
282
303
  display: contents;
283
304
 
284
305
  legend {
285
- @include nsw-spacing(margin, none none md none);
286
306
  padding: 0;
307
+ margin: 0 0 rem(16px) 0;
287
308
  display: block;
288
309
  }
289
310
  }
@@ -307,11 +328,11 @@ $nsw-svg-dark: #333333;
307
328
 
308
329
  &:hover + .nsw-form__checkbox-label::before,
309
330
  &:hover + .nsw-form__radio-label::before {
310
- @include nsw-hover;
331
+ background-image: linear-gradient(var(--nsw-text-hover), var(--nsw-text-hover));
311
332
  }
312
333
 
313
334
  &:checked + .nsw-form__checkbox-label::after {
314
- @include background-svg(tick, $nsw-svg-light);
335
+ background-image: svg-url($nsw-form-tick);
315
336
  background-color: var(--nsw-brand-dark);
316
337
  }
317
338
 
@@ -348,7 +369,7 @@ $nsw-svg-dark: #333333;
348
369
  &[aria-invalid='true'] + .nsw-form__checkbox-label,
349
370
  &.has-error + .nsw-form__checkbox-label {
350
371
  &:hover::before {
351
- background-color: var(--nsw-status-error-bg);
372
+ background-image: linear-gradient(var(--nsw-status-error-bg), var(--nsw-status-error-bg));
352
373
  }
353
374
 
354
375
  &::before {
@@ -361,17 +382,17 @@ $nsw-svg-dark: #333333;
361
382
  &__checkbox-label,
362
383
  &__radio-label {
363
384
  @include font-size('sm');
364
- @include nsw-spacing(margin, md none none none);
385
+ margin: rem(16px) 0 0 0;
365
386
  padding: rem(4px) 0 rem(4px) rem(48px);
366
387
  min-height: rem(32px);
367
388
  display: block;
368
389
  position: relative;
369
390
 
370
391
  &::before {
371
- @include nsw-spacing(margin-right, md);
372
392
  content: '';
373
393
  width: rem(32px);
374
394
  height: rem(32px);
395
+ margin-right: rem(16px);
375
396
  border: 1px var(--nsw-grey-01) solid;
376
397
  background-color: var(--nsw-white);
377
398
  top: 0;
@@ -0,0 +1,68 @@
1
+ .nsw-global-alert {
2
+ padding: rem(24px) 0;
3
+ background-color: var(--nsw-status-info);
4
+ color: var(--nsw-text-light);
5
+
6
+ .nsw-icon-button {
7
+ position: absolute;
8
+ top: rem(-8px);
9
+ right: rem(4px);
10
+ color: var(--nsw-text-light);
11
+
12
+ &:hover {
13
+ @include nsw-hover;
14
+ background-color: var(--nsw-text-hover-light);
15
+ }
16
+
17
+ &:focus {
18
+ @include nsw-focus($color: var(--nsw-text-light));
19
+ }
20
+ }
21
+
22
+ &__wrapper {
23
+ @include container;
24
+ position: relative;
25
+ }
26
+
27
+ &__title {
28
+ @include font-size('md');
29
+ font-weight: var(--nsw-font-bold);
30
+ }
31
+
32
+ &__content {
33
+ margin-right: rem(36px);
34
+
35
+ a {
36
+ @include link-light;
37
+ }
38
+ }
39
+
40
+ .nsw-button {
41
+ margin-right: 0;
42
+ }
43
+
44
+ &--critical {
45
+ background-color: var(--nsw-status-error);
46
+ }
47
+
48
+ &--light {
49
+ background-color: var(--nsw-status-info-bg);
50
+ color: var(--nsw-text-dark);
51
+
52
+ .nsw-global-alert__content a {
53
+ @include link-dark;
54
+ }
55
+
56
+ .nsw-icon-button {
57
+ color: var(--nsw-brand-dark);
58
+
59
+ &:hover {
60
+ background-color: var(--nsw-text-hover);
61
+ }
62
+
63
+ &:focus {
64
+ outline-color: var(--nsw-focus);
65
+ }
66
+ }
67
+ }
68
+ }
@@ -1,7 +1,7 @@
1
- class SitewideMessage {
1
+ class GlobalAlert {
2
2
  constructor(element) {
3
3
  this.messageElement = element
4
- this.closeButton = element.querySelector('.nsw-sitewide-message__close')
4
+ this.closeButton = element.querySelector('.js-close-alert')
5
5
  this.closeMessageEvent = (e) => this.closeMessage(e)
6
6
  }
7
7
 
@@ -18,4 +18,4 @@ class SitewideMessage {
18
18
  }
19
19
  }
20
20
 
21
- export default SitewideMessage
21
+ export default GlobalAlert