nsw-design-system 3.2.4 → 3.3.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.
@@ -16,41 +16,111 @@
16
16
  @include font-size('md');
17
17
  margin-top: rem(24px);
18
18
  }
19
+
20
+ .nsw-filters--down & {
21
+ display: none;
22
+
23
+ @include breakpoint('lg') {
24
+ display: block;
25
+ }
26
+ }
19
27
  }
20
28
 
21
29
  &__controls {
22
- padding: rem(24px) 0;
23
- border-bottom: 1px solid var(--nsw-grey-04);
24
-
25
30
  @include breakpoint('lg') {
26
31
  display: none;
27
32
  }
28
33
 
29
34
  button {
30
- @include link-button;
35
+ @include font-size('md');
36
+ font-weight: var(--nsw-font-bold);
37
+ background-color: var(--nsw-off-white);
38
+ width: 100%;
39
+ border: 0;
40
+ padding: rem(16px);
31
41
  display: flex;
32
42
  align-items: center;
33
43
  text-decoration: none;
44
+ text-align: left;
45
+ cursor: pointer;
34
46
 
35
47
  .nsw-section--invert & {
36
- color: var(--nsw-white);
48
+ color: var(--nsw-text-dark);
49
+ background-color: var(--nsw-white);
37
50
  }
38
51
 
39
52
  span {
40
- text-decoration: underline;
53
+ text-decoration: none;
41
54
  padding-left: rem(8px);
42
55
  }
56
+
57
+ &:hover:enabled {
58
+ background-color: var(--nsw-brand-dark);
59
+ color: var(--nsw-text-light);
60
+
61
+ .nsw-section--invert & {
62
+ background-color: var(--nsw-brand-light);
63
+ color: var(--nsw-brand-dark);
64
+ }
65
+
66
+ .nsw-material-icons {
67
+ color: var(--nsw-text-light);
68
+ outline: 2px solid var(--nsw-white);
69
+ }
70
+
71
+ .nsw-material-icons:last-child {
72
+ color: var(--nsw-text-light);
73
+ outline: 0;
74
+ }
75
+ }
76
+
77
+ &:hover:enabled .nsw-material-icons {
78
+ .nsw-section--invert & {
79
+ background-color: var(--nsw-brand-light);
80
+ }
81
+
82
+ .nsw-section--invert.nsw-section--grey-01 & {
83
+ color: var(--nsw-grey-01);
84
+ outline: 2px solid var(--nsw-grey-01);
85
+ }
86
+
87
+ .nsw-section--invert.nsw-section--brand-dark & {
88
+ color: var(--nsw-brand-dark);
89
+ outline: 2px solid var(--nsw-brand-dark);
90
+ }
91
+ }
92
+
93
+ &:hover:enabled .nsw-material-icons:last-child {
94
+ .nsw-section--invert & {
95
+ background-color: var(--nsw-brand-light);
96
+ outline: 0;
97
+ }
98
+
99
+ .nsw-section--invert.nsw-section--grey-01 & {
100
+ color: var(--nsw-grey-01);
101
+ }
102
+
103
+ .nsw-section--invert.nsw-section--brand-dark & {
104
+ color: var(--nsw-brand-dark);
105
+ }
106
+ }
107
+
108
+ &:focus {
109
+ @include nsw-focus($offset: false);
110
+ }
43
111
  }
44
112
 
45
113
  .nsw-material-icons {
46
- font-size: rem(map-get($nsw-icon-sizes, 24));
114
+ font-size: rem(map-get($nsw-icon-sizes, 30));
47
115
  border-radius: var(--nsw-border-radius);
48
- padding: rem(1px);
49
- border: 2px solid var(--nsw-brand-dark);
116
+ padding: 0;
50
117
  text-decoration: none;
51
-
52
- .nsw-section--invert & {
53
- border-color: var(--nsw-white);
118
+ outline: 2px solid var(--nsw-brand-dark);
119
+
120
+ &:last-child {
121
+ border: 0;
122
+ margin-left: auto;
123
+ outline: 0;
54
124
  }
55
125
  }
56
126
 
@@ -58,56 +128,124 @@
58
128
  .nsw-material-icons {
59
129
  background-color: var(--nsw-brand-dark);
60
130
  color: var(--nsw-text-light);
131
+
132
+ &:last-child {
133
+ background-color: transparent;
134
+ color: var(--nsw-brand-dark);
135
+ outline: 0;
136
+ }
137
+ }
138
+ }
139
+
140
+ .active & {
141
+ button {
142
+ background-color: var(--nsw-brand-dark);
143
+ color: var(--nsw-text-light);
144
+
145
+ .nsw-section--invert & {
146
+ background-color: var(--nsw-brand-light);
147
+ color: var(--nsw-brand-dark);
148
+ }
149
+ }
150
+
151
+ .nsw-material-icons {
152
+ color: var(--nsw-text-light);
153
+ outline: 2px solid var(--nsw-white);
154
+
155
+ .nsw-section--invert & {
156
+ background-color: var(--nsw-brand-light);
157
+ color: var(--nsw-brand-dark);
158
+ outline: 2px solid var(--nsw-brand-dark);
159
+ }
160
+ }
61
161
 
62
- .nsw-section--invert & {
63
- background-color: var(--nsw-white);
162
+ .nsw-material-icons:last-child {
163
+ transform: rotate(180deg);
164
+
165
+ .nsw-section--invert & {
166
+ background-color: var(--nsw-brand-light);
64
167
  color: var(--nsw-brand-dark);
168
+ outline: 0;
65
169
  }
66
170
  }
67
171
  }
68
172
  }
69
173
 
70
174
  &__back {
71
- @include z-index('upper');
72
- position: fixed;
73
- top: 0;
74
- left: 0;
75
- right: 0;
76
- background-color: var(--nsw-white);
77
- padding: rem(16px) rem(8px);
78
- border-bottom: 1px solid var(--nsw-grey-04);
175
+ .nsw-filters--fixed & {
176
+ @include z-index('upper');
177
+ position: fixed;
178
+ top: 0;
179
+ left: 0;
180
+ right: 0;
181
+ background-color: var(--nsw-white);
182
+ padding: rem(16px) rem(8px);
183
+ border-bottom: 1px solid var(--nsw-grey-04);
79
184
 
80
- @include breakpoint('lg') {
81
- display: none;
185
+ @include breakpoint('lg') {
186
+ display: none;
187
+ }
188
+
189
+ .nsw-section--invert.nsw-section--grey-01 & {
190
+ background-color: var(--nsw-grey-01);
191
+ }
192
+
193
+ .nsw-section--invert.nsw-section--brand-dark & {
194
+ background-color: var(--nsw-brand-dark);
195
+ }
82
196
  }
83
197
 
84
- .nsw-section--invert & {
85
- background-color: var(--nsw-brand-dark);
198
+ .nsw-filters--right & {
199
+ @include z-index('upper');
200
+ position: absolute;
201
+ top: rem(16px);
202
+ padding-right: rem(16px);
203
+ background-color: var(--nsw-white);
204
+ transition: $nsw-transition-duration;
205
+ right: -100vw;
206
+
207
+ @include breakpoint('lg') {
208
+ display: none;
209
+ }
210
+
211
+ .nsw-material-icons {
212
+ font-size: rem(map-get($nsw-icon-sizes, 30));
213
+ }
214
+
215
+ .nsw-section--invert.nsw-section--grey-01 & {
216
+ background-color: var(--nsw-grey-01);
217
+ }
218
+
219
+ .nsw-section--invert.nsw-section--brand-dark & {
220
+ background-color: var(--nsw-brand-dark);
221
+ }
222
+ }
223
+
224
+ .nsw-filters--right.active & {
225
+ right: 0;
86
226
  }
87
227
  }
88
228
 
89
229
  &__wrapper {
90
- .nsw-filters--fixed & {
230
+ .nsw-filters--fixed &,
231
+ .nsw-filters--right & {
91
232
  @include z-index('middle');
92
- display: none;
93
233
  position: fixed;
94
- top: 0;
95
- bottom: 0;
96
- left: 0;
97
- right: 0;
98
234
  overflow-y: auto;
99
235
  background-color: var(--nsw-white);
100
- padding: rem(73px) rem(16px) rem(101px) rem(16px);
101
-
102
- .nsw-section--invert & {
236
+ scroll-padding-bottom: rem(122px);
237
+
238
+ .nsw-section--invert.nsw-section--grey-01 & {
239
+ background-color: var(--nsw-grey-01);
240
+ }
241
+
242
+ .nsw-section--invert.nsw-section--brand-dark & {
103
243
  background-color: var(--nsw-brand-dark);
104
244
  }
105
245
 
106
246
  @include breakpoint('lg') {
107
- display: block;
108
247
  position: static;
109
248
  background-color: transparent;
110
- padding: 0;
111
249
  overflow-y: visible;
112
250
 
113
251
  .nsw-section--invert & {
@@ -116,38 +254,234 @@
116
254
  }
117
255
  }
118
256
 
257
+ .nsw-filters--fixed & {
258
+ display: none;
259
+ top: 0;
260
+ bottom: 0;
261
+ left: 0;
262
+ right: 0;
263
+ padding: rem(73px) rem(16px) rem(97px) rem(16px);
264
+
265
+ @include breakpoint('lg') {
266
+ display: block;
267
+ padding: 0;
268
+ }
269
+ }
270
+
271
+ .nsw-filters--right & {
272
+ top: 0;
273
+ bottom: 0;
274
+ width: 100%;
275
+ transition: $nsw-transition-duration;
276
+ padding: 0 rem(16px) rem(97px) rem(16px);
277
+ right: -100vw;
278
+ visibility: hidden;
279
+
280
+ @include breakpoint('lg') {
281
+ display: block;
282
+ visibility: visible;
283
+ padding: 0;
284
+ }
285
+ }
286
+
287
+ .nsw-filters--right.active & {
288
+ right: 0;
289
+ visibility: visible;
290
+ }
291
+
119
292
  .nsw-filters--fixed.nsw-filters--instant & {
120
293
  padding-bottom: 0;
121
294
  }
122
295
 
296
+ .nsw-filters--down & {
297
+ @include z-index('middle');
298
+ display: none;
299
+ background-color: var(--nsw-off-white);
300
+ padding: 0 rem(16px);
301
+
302
+ .nsw-section--invert & {
303
+ background-color: transparent;
304
+ }
305
+
306
+ @include breakpoint('lg') {
307
+ display: block;
308
+ position: static;
309
+ background-color: transparent;
310
+ padding: 0;
311
+
312
+ .nsw-section--invert & {
313
+ background-color: transparent;
314
+ }
315
+ }
316
+ }
317
+
123
318
  .active & {
124
319
  display: block;
125
320
  }
126
321
  }
127
322
 
128
323
  &__item {
129
- padding: rem(24px) 0;
130
324
  border-top: 1px solid var(--nsw-grey-04);
325
+ padding: rem(24px) 0;
326
+
327
+ &-button {
328
+ font-size: var(--nsw-font-size-sm-mobile);
329
+ line-height: var(--nsw-line-height-sm-mobile);
330
+ font-weight: var(--nsw-font-bold);
331
+ display: flex;
332
+ width: 100%;
333
+ align-items: center;
334
+ justify-content: space-between;
335
+ border: 0;
336
+ background: none;
337
+
338
+ @include breakpoint('lg') {
339
+ font-size: var(--nsw-font-size-sm-desktop);
340
+ line-height: var(--nsw-line-height-sm-desktop);
341
+ }
342
+
343
+ .nsw-material-icons {
344
+ font-size: rem(map-get($nsw-icon-sizes, 30));
345
+ }
346
+
347
+ &:focus {
348
+ @include nsw-focus;
349
+ }
350
+
351
+ &.active {
352
+ >.nsw-material-icons:last-child {
353
+ transform: rotate(180deg);
354
+ }
355
+ }
356
+
357
+ .nsw-section--invert & {
358
+ background-color: transparent;
359
+ color: var(--nsw-off-white);
360
+ }
361
+ }
362
+
363
+ &-button ~ &-content {
364
+ padding: rem(6px) 0 0 0;
365
+ }
366
+
367
+ span:not(.nsw-material-icons) {
368
+ display: flex;
369
+ align-items: center;
370
+ padding: 0;
371
+
372
+ .nsw-material-icons:last-child {
373
+ font-size: rem(map-get($nsw-icon-sizes, 20));
374
+ background-color: var(--nsw-white);
375
+ color: var(--nsw-status-success);
376
+ margin-left: rem(8px);
377
+ border-radius: 50%;
378
+ width: rem(16px);
379
+ height: rem(16px);
380
+ display: flex;
381
+ justify-content: center;
382
+ align-items: center;
383
+ }
384
+ }
385
+
386
+ .nsw-filters--down & {
387
+ border-top: 1px solid var(--nsw-grey-03);
388
+
389
+ @include breakpoint('lg') {
390
+ border-top: 1px solid var(--nsw-grey-04);
391
+ display: block;
392
+ }
393
+
394
+ &:first-child {
395
+ border: 0;
396
+
397
+ @include breakpoint('lg') {
398
+ border-top: 1px solid var(--nsw-grey-04);
399
+ }
400
+ }
401
+ }
131
402
  }
132
403
 
133
404
  &__all {
134
405
  padding-top: rem(16px);
135
406
  }
136
407
 
408
+ &__cancel {
409
+ padding-bottom: rem(32px);
410
+ border-top: 1px solid var(--nsw-grey-04);
411
+ padding: rem(32px) 0;
412
+
413
+ .nsw-filters--down & {
414
+ border-top: 1px solid var(--nsw-grey-03);
415
+
416
+ @include breakpoint('lg') {
417
+ border-top: 1px solid var(--nsw-grey-04);
418
+ }
419
+ }
420
+
421
+ button {
422
+ @include link-button;
423
+
424
+ .nsw-section--invert & {
425
+ @include link-light;
426
+ }
427
+ }
428
+ }
429
+
137
430
  &__accept {
138
431
  padding: rem(32px) 0;
139
432
  border-top: 1px solid var(--nsw-grey-04);
140
433
 
141
- .nsw-filters--fixed & {
434
+ @include breakpoint('lg') {
435
+ ~.nsw-filters__cancel {
436
+ border: 0;
437
+ padding-top: 0;
438
+ }
439
+ }
440
+
441
+ button {
442
+ .nsw-section--invert & {
443
+ background-color: var(--nsw-white);
444
+
445
+ &:disabled {
446
+ background-color: var(--nsw-white);
447
+ }
448
+ }
449
+
450
+ .nsw-section--invert.nsw-section--grey-01 & {
451
+ color: var(--nsw-grey-01);
452
+
453
+ &:hover {
454
+ background-color: var(--nsw-grey-04);
455
+ background-image: linear-gradient(rgba(var(--nsw-white-rgb), 0.15), rgba(var(--nsw-white-rgb), 0.15));
456
+ }
457
+ }
458
+
459
+ .nsw-section--invert.nsw-section--brand-dark & {
460
+ color: var(--nsw-brand-dark);
461
+
462
+ &:disabled {
463
+ color: var(--nsw-brand-dark);
464
+ }
465
+
466
+ &:hover {
467
+ color: var(--nsw-text-light);
468
+ background-image: linear-gradient(rgba(var(--nsw-white-rgb), 0.15), rgba(var(--nsw-white-rgb), 0.15));
469
+ }
470
+ }
471
+ }
472
+
473
+ .nsw-filters--fixed &,
474
+ .nsw-filters--right & {
142
475
  @include z-index('upper');
143
476
  position: fixed;
144
- bottom: 0;
145
- left: 0;
146
- right: 0;
147
477
  background-color: var(--nsw-white);
148
478
  padding: rem(24px) rem(16px);
149
479
 
150
- .nsw-section--invert & {
480
+ .nsw-section--invert.nsw-section--grey-01 & {
481
+ background-color: var(--nsw-grey-01);
482
+ }
483
+
484
+ .nsw-section--invert.nsw-section--brand-dark & {
151
485
  background-color: var(--nsw-brand-dark);
152
486
  }
153
487
 
@@ -161,32 +495,35 @@
161
495
  }
162
496
  }
163
497
  }
164
- }
165
-
166
- &__cancel {
167
- padding-bottom: rem(32px);
168
498
 
169
499
  .nsw-filters--fixed & {
170
- border-top: 1px solid var(--nsw-grey-04);
171
- padding: rem(32px) 0;
172
-
173
- @include breakpoint('lg') {
174
- padding-top: 0;
175
- border: 0;
176
- background-color: transparent;
177
- }
500
+ bottom: 0;
501
+ left: 0;
502
+ right: 0;
178
503
  }
179
504
 
180
- .nsw-filters--instant & {
505
+ .nsw-filters--right & {
181
506
  border-top: 1px solid var(--nsw-grey-04);
182
- padding: rem(32px) 0;
507
+ bottom: 0;
508
+ width: 100%;
509
+ transition: $nsw-transition-duration;
510
+ right: -100vw;
183
511
  }
184
512
 
185
- button {
186
- @include link-button;
513
+ .nsw-filters--right.active & {
514
+ right: 0;
515
+ }
187
516
 
188
- .nsw-section--invert & {
189
- @include link-light;
517
+ .nsw-filters--down & {
518
+ border-top: 1px solid var(--nsw-grey-03);
519
+
520
+ @include breakpoint('lg') {
521
+ border-top: 1px solid var(--nsw-grey-04);
522
+ }
523
+
524
+ ~.nsw-filters__cancel {
525
+ border: 0;
526
+ padding-top: 0;
190
527
  }
191
528
  }
192
529
  }
@@ -201,6 +538,60 @@
201
538
  }
202
539
  }
203
540
 
541
+ &.nsw-filters--down {
542
+ .nsw-section--invert & {
543
+ background-color: var(--nsw-white);
544
+ color: var(--nsw-text-dark);
545
+
546
+ @include breakpoint('lg') {
547
+ color: var(--nsw-text-light);
548
+ background-color: transparent;
549
+ }
550
+ }
551
+
552
+ .nsw-filters__item-button {
553
+ .nsw-section--invert & {
554
+ color: var(--nsw-text-dark);
555
+
556
+ @include breakpoint('lg') {
557
+ color: var(--nsw-text-light);
558
+ }
559
+ }
560
+ }
561
+
562
+ .nsw-filters__cancel button {
563
+ @include link-button;
564
+
565
+ .nsw-section--invert & {
566
+ @include breakpoint('lg') {
567
+ @include link-light;
568
+ }
569
+ }
570
+ }
571
+
572
+ .nsw-filters__accept button {
573
+ .nsw-section--invert.nsw-section--grey-01 & {
574
+ background-color: var(--nsw-grey-01);
575
+ color: var(--nsw-text-light);
576
+
577
+ @include breakpoint('lg') {
578
+ background-color: var(--nsw-white);
579
+ color: var(--nsw-grey-01);
580
+ }
581
+ }
582
+
583
+ .nsw-section--invert.nsw-section--brand-dark & {
584
+ background-color: var(--nsw-brand-dark);
585
+ color: var(--nsw-text-light);
586
+
587
+ @include breakpoint('lg') {
588
+ background-color: var(--nsw-white);
589
+ color: var(--nsw-brand-dark);
590
+ }
591
+ }
592
+ }
593
+ }
594
+
204
595
  .hidden {
205
596
  display: none;
206
597
  }