nsw-design-system 3.0.4 → 3.2.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 (37) hide show
  1. package/CHANGELOG.md +241 -88
  2. package/README.md +7 -12
  3. package/dist/css/core.css +1 -1
  4. package/dist/css/main.css +1 -1
  5. package/dist/js/main.js +91 -0
  6. package/package.json +1 -1
  7. package/src/components/_all.scss +2 -0
  8. package/src/components/accordion/_accordion.scss +22 -0
  9. package/src/components/breadcrumbs/_breadcrumbs.scss +4 -0
  10. package/src/components/button/_button.scss +46 -43
  11. package/src/components/callout/_callout.scss +4 -0
  12. package/src/components/card/_card.scss +50 -0
  13. package/src/components/content-block/_content-block.scss +4 -0
  14. package/src/components/dialog/_dialog.scss +156 -0
  15. package/src/components/dialog/dialog.js +60 -0
  16. package/src/components/filters/_filters.scss +43 -0
  17. package/src/components/header/_header.scss +15 -4
  18. package/src/components/hero-banner/_hero-banner.scss +59 -25
  19. package/src/components/in-page-alert/_in-page-alert.scss +8 -0
  20. package/src/components/link-list/_link-list.scss +4 -0
  21. package/src/components/media/_media.scss +8 -0
  22. package/src/components/pagination/_pagination.scss +4 -0
  23. package/src/components/side-nav/_side-nav.scss +12 -0
  24. package/src/components/steps/_steps.scss +315 -0
  25. package/src/components/table/_table.scss +4 -0
  26. package/src/components/tabs/_tabs.scss +17 -0
  27. package/src/components/tag/_tag.scss +28 -0
  28. package/src/core/iconography/_icon.scss +4 -0
  29. package/src/core/section/_section.scss +4 -0
  30. package/src/core/typography/_typography.scss +12 -0
  31. package/src/global/scss/base/_mixins.scss +1 -1
  32. package/src/global/scss/helpers/_all.scss +2 -0
  33. package/src/global/scss/helpers/_border.scss +20 -0
  34. package/src/global/scss/helpers/_shadow.scss +3 -0
  35. package/src/global/scss/settings/_theme.scss +3 -0
  36. package/src/main.js +6 -0
  37. package/src/main.scss +2 -0
@@ -31,6 +31,10 @@
31
31
  display: flex;
32
32
  align-items: center;
33
33
  text-decoration: none;
34
+
35
+ .nsw-section--invert & {
36
+ color: var(--nsw-white);
37
+ }
34
38
 
35
39
  span {
36
40
  text-decoration: underline;
@@ -44,12 +48,21 @@
44
48
  padding: rem(1px);
45
49
  border: 2px solid var(--nsw-brand-dark);
46
50
  text-decoration: none;
51
+
52
+ .nsw-section--invert & {
53
+ border-color: var(--nsw-white);
54
+ }
47
55
  }
48
56
 
49
57
  &.active {
50
58
  .nsw-material-icons {
51
59
  background-color: var(--nsw-brand-dark);
52
60
  color: var(--nsw-text-light);
61
+
62
+ .nsw-section--invert & {
63
+ background-color: var(--nsw-white);
64
+ color: var(--nsw-brand-dark);
65
+ }
53
66
  }
54
67
  }
55
68
  }
@@ -67,6 +80,10 @@
67
80
  @include breakpoint('lg') {
68
81
  display: none;
69
82
  }
83
+
84
+ .nsw-section--invert & {
85
+ background-color: var(--nsw-brand-dark);
86
+ }
70
87
  }
71
88
 
72
89
  &__wrapper {
@@ -81,6 +98,10 @@
81
98
  overflow-y: auto;
82
99
  background-color: var(--nsw-white);
83
100
  padding: rem(73px) rem(16px) rem(101px) rem(16px);
101
+
102
+ .nsw-section--invert & {
103
+ background-color: var(--nsw-brand-dark);
104
+ }
84
105
 
85
106
  @include breakpoint('lg') {
86
107
  display: block;
@@ -88,6 +109,10 @@
88
109
  background-color: transparent;
89
110
  padding: 0;
90
111
  overflow-y: visible;
112
+
113
+ .nsw-section--invert & {
114
+ background-color: transparent;
115
+ }
91
116
  }
92
117
  }
93
118
 
@@ -122,9 +147,18 @@
122
147
  background-color: var(--nsw-white);
123
148
  padding: rem(24px) rem(16px);
124
149
 
150
+ .nsw-section--invert & {
151
+ background-color: var(--nsw-brand-dark);
152
+ }
153
+
125
154
  @include breakpoint('lg') {
126
155
  position: static;
127
156
  padding: rem(32px) 0;
157
+ background-color: transparent;
158
+
159
+ .nsw-section--invert & {
160
+ background-color: transparent;
161
+ }
128
162
  }
129
163
  }
130
164
  }
@@ -139,6 +173,7 @@
139
173
  @include breakpoint('lg') {
140
174
  padding-top: 0;
141
175
  border: 0;
176
+ background-color: transparent;
142
177
  }
143
178
  }
144
179
 
@@ -149,6 +184,10 @@
149
184
 
150
185
  button {
151
186
  @include link-button;
187
+
188
+ .nsw-section--invert & {
189
+ @include link-light;
190
+ }
152
191
  }
153
192
  }
154
193
 
@@ -156,6 +195,10 @@
156
195
  &__less {
157
196
  @include link-button;
158
197
  margin-top: rem(24px);
198
+
199
+ .nsw-section--invert & {
200
+ @include link-light;
201
+ }
159
202
  }
160
203
 
161
204
  .hidden {
@@ -102,12 +102,20 @@
102
102
  display: flex;
103
103
  justify-content: flex-start;
104
104
  align-items: center;
105
- margin: rem(12px) rem(72px) rem(12px) 0;
105
+ margin: rem(20px) rem(72px) rem(20px) 0;
106
106
 
107
107
  &:focus-within {
108
108
  @include nsw-focus;
109
109
  }
110
110
  }
111
+
112
+ .nsw-header__rectangular-logo {
113
+ @include breakpoint('lg') {
114
+ height: rem(60px);
115
+ margin-top: rem(8px);
116
+ margin-bottom: rem(8px);
117
+ }
118
+ }
111
119
  }
112
120
 
113
121
  &__waratah {
@@ -163,7 +171,7 @@
163
171
  margin-left: rem(24px);
164
172
 
165
173
  @include breakpoint($nsw-desktop-breakpoint) {
166
- margin-left: rem(48px);
174
+ margin-left: rem(40px);
167
175
  }
168
176
  }
169
177
  }
@@ -191,7 +199,7 @@
191
199
 
192
200
  @include breakpoint($nsw-desktop-breakpoint) {
193
201
  padding: 0;
194
- margin-left: rem(32px);
202
+ margin-left: rem(40px);
195
203
  }
196
204
  }
197
205
 
@@ -202,6 +210,10 @@
202
210
  display: flex;
203
211
  align-items: center;
204
212
 
213
+ @include breakpoint('lg') {
214
+ line-height: rem(28px);
215
+ }
216
+
205
217
  .nsw-tag {
206
218
  margin-left: rem(24px);
207
219
  }
@@ -217,7 +229,6 @@
217
229
  justify-content: center;
218
230
 
219
231
  @include breakpoint($nsw-desktop-breakpoint) {
220
- padding-left: rem(16px);
221
232
  justify-content: flex-start;
222
233
  }
223
234
 
@@ -145,34 +145,33 @@
145
145
  object-position: center;
146
146
  }
147
147
 
148
- &__graphic {
149
- width: 100%;
150
- height: 100%;
151
- display: flex;
152
- justify-content: flex-end;
153
- align-items: flex-end;
148
+ &__lines {
149
+ display: none;
150
+ background-color: var(--nsw-brand-light);
151
+ position: relative;
154
152
 
155
- &--transparent {
156
- opacity: 0.2;
153
+ @include breakpoint('md') {
154
+ display: block;
155
+ width: 100%;
157
156
  }
158
- }
159
157
 
160
- &__bg {
161
- width: 100%;
162
- height: 100%;
163
- overflow: hidden;
164
- color: var(--nsw-brand-dark);
165
- opacity: 0.2;
166
- /*
167
- background-image: url("data:image/svg+xml,%3Csvg width='206' height='220' viewBox='0 0 206 220' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M206 220V36.232L32.136 220H206zm-189.5 0H0L206 2.143v17.46L16.5 220z'/%3E%3C/svg%3E");
168
- background-size: rem(206px);
169
- background-position: right bottom;
170
- background-repeat: no-repeat;
171
- */
158
+ &::after {
159
+ content: '';
160
+ position: absolute;
161
+ top: 0;
162
+ bottom: 0;
163
+ left: rem(-16px);
164
+ width: rem(32px);
165
+ background-color: var(--nsw-brand-supplementary);
166
+ }
172
167
  }
173
168
 
174
169
  &--light {
175
170
  background-color: var(--nsw-brand-light);
171
+
172
+ .nsw-hero-banner__lines {
173
+ background-color: var(--nsw-brand-dark);
174
+ }
176
175
  }
177
176
 
178
177
  &--dark {
@@ -190,10 +189,45 @@
190
189
  }
191
190
  }
192
191
 
193
- /*
194
- .nsw-hero-banner__bg {
195
- background-image: url("data:image/svg+xml,%3Csvg width='206' height='220' viewBox='0 0 206 220' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M206 220V36.232L32.136 220H206zm-189.5 0H0L206 2.143v17.46L16.5 220z'/%3E%3C/svg%3E");
192
+ .nsw-hero-banner__list {
193
+ border-color: var(--nsw-brand-light);
194
+ }
195
+ }
196
+
197
+ &--lines {
198
+ border-bottom: rem(32px) solid var(--nsw-brand-light);
199
+
200
+ @include breakpoint('md') {
201
+ border: 0;
202
+ }
203
+
204
+ &.nsw-hero-banner--light {
205
+ border-color: var(--nsw-brand-dark);
206
+ }
207
+
208
+ &::after {
209
+ visibility: hidden;
210
+
211
+ @include breakpoint('md') {
212
+ visibility: visible;
213
+ }
214
+ }
215
+
216
+ .nsw-hero-banner__container {
217
+ border-bottom: rem(16px) solid var(--nsw-brand-supplementary);
218
+
219
+ @include breakpoint('md') {
220
+ border: 0;
221
+ }
222
+ }
223
+
224
+ .nsw-hero-banner__box {
225
+ width: 25%;
226
+
227
+ @include breakpoint('xl') {
228
+ width: 50%;
229
+ padding-left: calc(var(--nsw-container-width)/4+#{rem($grid-gutters)}*2);
230
+ }
196
231
  }
197
- */
198
232
  }
199
233
  }
@@ -35,6 +35,14 @@ $nsw-in-page-alerts: (
35
35
  @include breakpoint('md') {
36
36
  padding: rem(24px) rem(24px) rem(24px) rem(16px);
37
37
  }
38
+
39
+ .nsw-section--invert & {
40
+ color: var(--nsw-text-dark);
41
+
42
+ a {
43
+ @include link-dark;
44
+ }
45
+ }
38
46
 
39
47
  &__icon {
40
48
  font-size: rem(map-get($nsw-icon-sizes, 30));
@@ -50,6 +50,10 @@
50
50
  .nsw-material-icons {
51
51
  text-decoration: none;
52
52
  }
53
+
54
+ .nsw-section--invert & {
55
+ color: var(--nsw-text-light);
56
+ }
53
57
  }
54
58
 
55
59
  .nsw-material-icons {
@@ -2,6 +2,10 @@
2
2
  width: 100%;
3
3
  margin: rem(16px) auto;
4
4
 
5
+ .nsw-section--invert & {
6
+ color: var(--nsw-text-dark);
7
+ }
8
+
5
9
  @include breakpoint('md') {
6
10
  margin-top: rem(32px);
7
11
  margin-bottom: rem(32px);
@@ -107,6 +111,10 @@
107
111
  padding-left: 0;
108
112
  padding-right: 0;
109
113
  padding-bottom: 0;
114
+
115
+ .nsw-section--invert & {
116
+ color: var(--nsw-text-light);
117
+ }
110
118
  }
111
119
  }
112
120
  }
@@ -51,6 +51,10 @@
51
51
  height: 2px;
52
52
  background-color: var(--nsw-brand-accent);
53
53
  }
54
+
55
+ .nsw-section--invert & {
56
+ color: var(--nsw-text-light);
57
+ }
54
58
  }
55
59
  }
56
60
  }
@@ -53,12 +53,24 @@
53
53
 
54
54
  &.current {
55
55
  background-color: var(--nsw-off-white);
56
+
57
+ .nsw-section--invert & {
58
+ background-color: var(--nsw-text-hover-light);
59
+ }
60
+ }
61
+
62
+ .nsw-section--invert & {
63
+ color: var(--nsw-text-light);
56
64
  }
57
65
  }
58
66
 
59
67
  &__header {
60
68
  border-bottom: solid 2px var(--nsw-brand-dark);
61
69
 
70
+ .nsw-section--invert & {
71
+ border-color: var(--nsw-brand-light);
72
+ }
73
+
62
74
  a {
63
75
  font-weight: var(--nsw-font-bold);
64
76
  padding: rem(8px) 0;
@@ -0,0 +1,315 @@
1
+ .nsw-steps {
2
+ @include component-spacing();
3
+ counter-reset: step;
4
+
5
+ &__item {
6
+ position: relative;
7
+
8
+ &:last-child {
9
+ .nsw-steps__content {
10
+ padding-bottom: 0;
11
+
12
+ &::before {
13
+ bottom: 0;
14
+ }
15
+ }
16
+ }
17
+
18
+ &::before {
19
+ content: '';
20
+ position: absolute;
21
+ top: rem(1px);
22
+ left: 0;
23
+ width: rem(32px);
24
+ height: rem(32px);
25
+ border: rem(4px) solid var(--nsw-brand-accent);
26
+ border-radius: 100%;
27
+
28
+ @include breakpoint('lg') {
29
+ width: rem(48px);
30
+ height: rem(48px);
31
+ top: rem(-4px);
32
+ }
33
+ }
34
+
35
+ &::after {
36
+ @include font-size('md');
37
+ counter-increment: step;
38
+ content: counter(step);
39
+ position: absolute;
40
+ top: rem(1px);
41
+ left: 0;
42
+ width: rem(32px);
43
+ height: rem(32px);
44
+ display: flex;
45
+ justify-content: center;
46
+ align-items: center;
47
+ color: var(--nsw-brand-accent);
48
+ font-weight: var(--nsw-font-bold);
49
+ visibility: hidden;
50
+
51
+ @include breakpoint('lg') {
52
+ width: rem(48px);
53
+ height: rem(48px);
54
+ top: rem(-4px);
55
+ }
56
+ }
57
+
58
+ &--fill {
59
+ &::before {
60
+ background-color: var(--nsw-brand-accent);
61
+ }
62
+
63
+ &::after {
64
+ color: var(--nsw-text-light);
65
+ }
66
+
67
+ .nsw-steps--dark & {
68
+ &::before {
69
+ background-color: var(--nsw-brand-dark);
70
+ }
71
+ }
72
+
73
+ .nsw-steps--light & {
74
+ &::before {
75
+ background-color: var(--nsw-brand-light);
76
+ }
77
+ }
78
+
79
+ .nsw-steps--supplementary & {
80
+ &::before {
81
+ background-color: var(--nsw-brand-supplementary);
82
+ }
83
+ }
84
+ }
85
+ }
86
+
87
+ &__content {
88
+ position: relative;
89
+ padding: 0 0 rem(24px) rem(48px);
90
+
91
+ @include breakpoint('lg') {
92
+ padding: 0 0 rem(32px) rem(72px);
93
+ }
94
+
95
+ &::before {
96
+ content: '';
97
+ position: absolute;
98
+ top: rem(33px);
99
+ bottom: rem(-1px);
100
+ left: rem(14px);
101
+ width: rem(4px);
102
+ background-color: var(--nsw-brand-accent);
103
+
104
+ @include breakpoint('lg') {
105
+ top: rem(44px);
106
+ left: rem(22px);
107
+ bottom: rem(4px);
108
+ }
109
+ }
110
+ }
111
+
112
+ &--dark {
113
+ .nsw-steps__item {
114
+ &::before {
115
+ border-color: var(--nsw-brand-dark);
116
+ }
117
+
118
+ &::after {
119
+ color: var(--nsw-brand-dark);
120
+ }
121
+
122
+ &--fill {
123
+ &::after {
124
+ color: var(--nsw-text-light);
125
+ }
126
+ }
127
+ }
128
+
129
+ .nsw-steps__content {
130
+ &::before {
131
+ background-color: var(--nsw-brand-dark);
132
+ }
133
+ }
134
+ }
135
+
136
+ &--light {
137
+ .nsw-steps__item {
138
+ &::before {
139
+ border-color: var(--nsw-brand-light);
140
+ }
141
+
142
+ &::after {
143
+ color: var(--nsw-brand-light);
144
+ }
145
+
146
+ &--fill {
147
+ &::after {
148
+ color: var(--nsw-text-dark);
149
+ }
150
+ }
151
+ }
152
+
153
+ .nsw-steps__content {
154
+ &::before {
155
+ background-color: var(--nsw-brand-light);
156
+ }
157
+ }
158
+ }
159
+
160
+ &--supplementary {
161
+ .nsw-steps__item {
162
+ &::before {
163
+ border-color: var(--nsw-brand-supplementary);
164
+ }
165
+
166
+ &::after {
167
+ color: var(--nsw-brand-supplementary);
168
+ }
169
+
170
+ &--fill {
171
+ &::after {
172
+ color: var(--nsw-text-light);
173
+ }
174
+ }
175
+ }
176
+
177
+ .nsw-steps__content {
178
+ &::before {
179
+ background-color: var(--nsw-brand-supplementary);
180
+ }
181
+ }
182
+ }
183
+
184
+ &--counters {
185
+ .nsw-steps__item {
186
+ &::after {
187
+ visibility: visible;
188
+ }
189
+ }
190
+ }
191
+
192
+ &--fill {
193
+ .nsw-steps__item {
194
+ &::before {
195
+ background-color: var(--nsw-brand-accent);
196
+ }
197
+
198
+ &::after {
199
+ color: var(--nsw-text-light);
200
+ }
201
+ }
202
+
203
+ &.nsw-steps--dark {
204
+ .nsw-steps__item {
205
+ &::before {
206
+ background-color: var(--nsw-brand-dark);
207
+ }
208
+ }
209
+ }
210
+
211
+ &.nsw-steps--light {
212
+ .nsw-steps__item {
213
+ &::before {
214
+ background-color: var(--nsw-brand-light);
215
+ }
216
+
217
+ &::after {
218
+ color: var(--nsw-text-dark);
219
+ }
220
+ }
221
+ }
222
+
223
+ &.nsw-steps--supplementary {
224
+ .nsw-steps__item {
225
+ &::before {
226
+ background-color: var(--nsw-brand-supplementary);
227
+ }
228
+ }
229
+ }
230
+ }
231
+
232
+ &--medium {
233
+ .nsw-steps__item {
234
+ &::before {
235
+ top: rem(-2px);
236
+
237
+ @include breakpoint('lg') {
238
+ width: rem(40px);
239
+ height: rem(40px);
240
+ top: rem(-4px);
241
+ }
242
+ }
243
+
244
+ &::after {
245
+ top: rem(-2px);
246
+
247
+ @include breakpoint('lg') {
248
+ font-size: var(--nsw-font-size-md-mobile);
249
+ width: rem(40px);
250
+ height: rem(40px);
251
+ top: rem(-4px);
252
+ }
253
+ }
254
+ }
255
+
256
+ .nsw-steps__content {
257
+ @include breakpoint('lg') {
258
+ padding-left: rem(64px);
259
+ }
260
+
261
+ &::before {
262
+ top: rem(30px);
263
+ bottom: rem(2px);
264
+
265
+ @include breakpoint('lg') {
266
+ top: rem(36px);
267
+ bottom: rem(4px);
268
+ left: rem(18px);
269
+ }
270
+ }
271
+ }
272
+ }
273
+
274
+ &--small {
275
+ .nsw-steps__item {
276
+ &::before {
277
+ top: rem(-4px);
278
+
279
+ @include breakpoint('lg') {
280
+ width: rem(32px);
281
+ height: rem(32px);
282
+ top: rem(-2px);
283
+ }
284
+ }
285
+
286
+ &::after {
287
+ top: rem(-4px);
288
+
289
+ @include breakpoint('lg') {
290
+ font-size: var(--nsw-font-size-md-mobile);
291
+ width: rem(32px);
292
+ height: rem(32px);
293
+ top: rem(-2px);
294
+ }
295
+ }
296
+ }
297
+
298
+ .nsw-steps__content {
299
+ @include breakpoint('lg') {
300
+ padding-left: rem(56px);
301
+ }
302
+
303
+ &::before {
304
+ top: rem(28px);
305
+ bottom: rem(4px);
306
+
307
+ @include breakpoint('lg') {
308
+ top: rem(30px);
309
+ bottom: rem(2px);
310
+ left: rem(14px);
311
+ }
312
+ }
313
+ }
314
+ }
315
+ }
@@ -35,6 +35,10 @@ $nsw-vertical-align: (
35
35
 
36
36
  tbody tr:nth-of-type(even) {
37
37
  background-color: var(--nsw-off-white);
38
+
39
+ .nsw-section--invert & {
40
+ background-color: var(--nsw-text-hover-light);
41
+ }
38
42
  }
39
43
  }
40
44