nsw-design-system 3.5.0 → 3.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsw-design-system",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "Design system for Digital NSW",
5
5
  "main": "dist/main.js",
6
6
  "style": "dist/main.css",
@@ -43,38 +43,40 @@
43
43
  "author": "Digital NSW",
44
44
  "license": "ISC",
45
45
  "devDependencies": {
46
- "@babel/core": "^7.9.0",
47
- "@babel/preset-env": "^7.9.0",
48
- "auto-changelog": "^2.2.1",
46
+ "@babel/core": "^7.21.4",
47
+ "@babel/preset-env": "^7.21.4",
48
+ "@rollup/plugin-babel": "^6.0.3",
49
+ "auto-changelog": "^2.4.0",
49
50
  "autoprefixer": "^9.7.5",
50
- "browser-sync": "^2.26.13",
51
- "cssnano": "^4.1.10",
51
+ "browser-sync": "^2.29.1",
52
+ "cssnano": "^6.0.0",
52
53
  "del": "^5.1.0",
53
- "eslint": "^6.8.0",
54
- "eslint-config-airbnb-base": "^14.1.0",
55
- "eslint-plugin-import": "^2.20.1",
54
+ "eslint": "^8.38.0",
55
+ "eslint-config-airbnb-base": "^15.0.0",
56
+ "eslint-plugin-import": "^2.27.5",
56
57
  "gulp": "^4.0.2",
57
58
  "gulp-better-rollup": "^4.0.1",
58
- "gulp-bump": "^3.1.3",
59
- "gulp-changed": "^4.0.2",
60
- "gulp-eslint": "^6.0.0",
59
+ "gulp-bump": "^3.2.0",
60
+ "gulp-changed": "^4.0.3",
61
+ "gulp-eslint-new": "^1.7.2",
61
62
  "gulp-inject-string": "^1.1.2",
62
63
  "gulp-plumber": "^1.2.1",
63
- "gulp-postcss": "^8.0.0",
64
- "gulp-replace": "^1.0.0",
65
- "gulp-sass": "^4.0.2",
64
+ "gulp-postcss": "^9.0.1",
65
+ "gulp-replace": "^1.1.4",
66
+ "gulp-sass": "^5.1.0",
66
67
  "gulp-sass-glob": "^1.1.0",
67
68
  "gulp-sitemap": "^8.0.0",
68
69
  "gulp-sourcemaps": "^2.6.5",
69
70
  "gulp-stylelint": "^13.0.0",
70
71
  "gulp-surge": "^0.1.4",
71
- "gulp-zip": "^5.0.1",
72
- "handlebars": "^4.7.6",
72
+ "gulp-zip": "^5.1.0",
73
+ "handlebars": "^4.7.7",
74
+ "handlebars-helpers": "^0.10.0",
73
75
  "inquirer": "^7.1.0",
74
- "jstransformer-handlebars": "^1.1.0",
75
- "metalsmith": "^2.3.0",
76
+ "jstransformer-handlebars": "^1.2.0",
77
+ "metalsmith": "^2.5.1",
76
78
  "metalsmith-collections": "^0.9.0",
77
- "metalsmith-data-loader": "^1.1.4",
79
+ "metalsmith-data-loader": "^1.3.0",
78
80
  "metalsmith-debug-ui": "^0.3.2",
79
81
  "metalsmith-discover-helpers": "^0.1.1",
80
82
  "metalsmith-discover-partials": "^0.1.2",
@@ -83,17 +85,20 @@
83
85
  "metalsmith-in-place": "^4.4.1",
84
86
  "metalsmith-layouts": "^2.3.1",
85
87
  "metalsmith-register-helpers": "^0.4.1",
86
- "node-sass": "^4.13.1",
87
- "postcss-normalize": "^8.0.1",
88
- "redrun": "^7.1.20",
89
- "rollup": "^2.2.0",
90
- "rollup-plugin-babel": "^4.4.0",
88
+ "postcss-normalize": "^10.0.1",
89
+ "redrun": "^10.0.2",
90
+ "rollup": "^3.20.6",
91
+ "sass": "^1.62.0",
91
92
  "stylelint": "^13.2.1",
92
93
  "stylelint-config-sass-guidelines": "^7.0.0",
93
- "stylelint-declaration-use-variable": "^1.7.2",
94
+ "stylelint-declaration-use-variable": "^1.7.3",
94
95
  "stylelint-order": "^4.0.0",
95
96
  "stylelint-scss": "^3.16.0",
96
97
  "yargs": "^15.3.1"
97
98
  },
98
- "dependencies": {}
99
+ "overrides": {
100
+ "gulp-better-rollup": {
101
+ "rollup": "^1||^2||^3"
102
+ }
103
+ }
99
104
  }
@@ -28,7 +28,8 @@
28
28
 
29
29
  &__menu,
30
30
  &__search {
31
- button {
31
+ button,
32
+ a {
32
33
  @include font-size('xxs');
33
34
  font-weight: var(--nsw-font-bold);
34
35
  border-radius: var(--nsw-border-radius);
@@ -71,7 +71,8 @@
71
71
  padding-top: 56.25%;
72
72
  }
73
73
 
74
- iframe {
74
+ iframe,
75
+ video {
75
76
  position: absolute;
76
77
  top: 0;
77
78
  left: 0;
@@ -57,6 +57,12 @@
57
57
  .nsw-section--invert & {
58
58
  color: var(--nsw-text-light);
59
59
  }
60
- }
60
+ }
61
+
62
+ &.disabled,
63
+ .disabled > & {
64
+ pointer-events: none;
65
+ opacity: 0.4;
66
+ }
61
67
  }
62
68
  }
@@ -353,7 +353,6 @@ class Select {
353
353
  const focusableContent = element.querySelectorAll(focusableElements)
354
354
  const lastFocusableElement = focusableContent[focusableContent.length - 1]
355
355
 
356
-
357
356
  document.addEventListener('keydown', (event) => {
358
357
  const isTabPressed = event.key === 'Tab' || event.code === 9
359
358
 
@@ -1,3 +1,5 @@
1
+ @use 'sass:math';
2
+
1
3
  .nsw-container {
2
4
  @include container;
3
5
 
@@ -81,8 +83,8 @@
81
83
 
82
84
  @for $i from 1 through 12 {
83
85
  &-#{$i} {
84
- width: percentage($i / 12);
85
- max-width: percentage($i / 12);
86
+ width: percentage(math.div($i, 12));
87
+ max-width: percentage(math.div($i, 12));
86
88
  }
87
89
  }
88
90
 
@@ -90,8 +92,8 @@
90
92
  @include breakpoint($breakpoint) {
91
93
  @for $i from 1 through 12 {
92
94
  &-#{$breakpoint}-#{$i} {
93
- width: percentage($i / 12);
94
- max-width: percentage($i / 12);
95
+ width: percentage(math.div($i, 12));
96
+ max-width: percentage(math.div($i, 12));
95
97
  }
96
98
  }
97
99
  }
@@ -101,7 +103,7 @@
101
103
  .nsw-offset {
102
104
  @for $i from 1 through 12 {
103
105
  &-#{$i} {
104
- margin-left: percentage($i / 12);
106
+ margin-left: percentage(math.div($i, 12));
105
107
  }
106
108
  }
107
109
 
@@ -109,7 +111,7 @@
109
111
  @include breakpoint($breakpoint) {
110
112
  @for $i from 1 through 12 {
111
113
  &-#{$breakpoint}-#{$i} {
112
- margin-left: percentage($i / 12);
114
+ margin-left: percentage(math.div($i, 12));
113
115
  }
114
116
  }
115
117
  }
@@ -87,7 +87,7 @@ $nsw-sections: (
87
87
  }
88
88
 
89
89
  @each $name, $variant in $nsw-sections {
90
- &--#{$name} {
90
+ &--#{"" + $name} {
91
91
  background-color: map-get($variant, background);
92
92
  color: map-get($variant, color);
93
93
  }
@@ -1,9 +1,11 @@
1
+ @use 'sass:math';
2
+
1
3
  @function rem($value) {
2
4
  @if (unitless($value)) {
3
5
  $value: $value * 1px;
4
6
  }
5
7
 
6
- @return $value / $nsw-base-font-size * 1rem;
8
+ @return math.div($value, $nsw-base-font-size) * 1rem;
7
9
  }
8
10
 
9
11
  @function svg-url($svg) {
@@ -14,7 +16,7 @@
14
16
  $encoded: '';
15
17
  $slice: 2000;
16
18
  $index: 0;
17
- $loops: ceil(str-length($svg)/$slice);
19
+ $loops: ceil(math.div(str-length($svg), $slice));
18
20
 
19
21
  @for $i from 1 through $loops {
20
22
  $chunk: str-slice($svg, $index, $index + $slice - 1);
@@ -1,3 +1,5 @@
1
+ @use 'sass:math';
2
+
1
3
  @mixin breakpoint( $size, $width-type: min-width) {
2
4
  @if type-of( $size ) != 'string' {
3
5
  @error 'NSW-DS Breakpoint mixin accepts only strings';
@@ -227,20 +229,20 @@
227
229
  @mixin column($size, $breakpoint: null, $offset: null) {
228
230
  @if ($breakpoint) {
229
231
  @include breakpoint($breakpoint) {
230
- width: percentage($size / 12);
231
- max-width: percentage($size / 12);
232
+ width: percentage(math.div($size, 12));
233
+ max-width: percentage(math.div($size, 12));
232
234
 
233
235
  @if ($offset) {
234
- margin-left: percentage($offset / 12);
236
+ margin-left: percentage(math.div($offset, 12));
235
237
  }
236
238
  }
237
239
 
238
240
  } @else {
239
- width: percentage($size / 12);
240
- max-width: percentage($size / 12);
241
+ width: percentage(math.div($size, 12));
242
+ max-width: percentage(math.div($size, 12));
241
243
 
242
244
  @if ($offset) {
243
- margin-left: percentage($offset / 12);
245
+ margin-left: percentage(math.div($offset, 12));
244
246
  }
245
247
  }
246
248
  }
@@ -11,10 +11,10 @@ $nsw-helper-list-sizes: (8, 16, 32);
11
11
 
12
12
  @each $size in $nsw-helper-list-sizes {
13
13
  &--#{"" + $size} {
14
- margin: rem(-$size / 2);
14
+ margin: rem(-$size * 0.5);
15
15
 
16
16
  > * {
17
- margin: rem($size / 2);
17
+ margin: rem($size * 0.5);
18
18
  }
19
19
  }
20
20
  }
@@ -49,15 +49,15 @@
49
49
  --nsw-palette-purple-03-rgb: 206, 191, 255;
50
50
  --nsw-palette-purple-04-rgb: 230, 225, 253;
51
51
 
52
- --nsw-palette-pink-01: #65004d;
53
- --nsw-palette-pink-02: #d912ae;
54
- --nsw-palette-pink-03: #f4b5e6;
55
- --nsw-palette-pink-04: #fddef2;
56
-
57
- --nsw-palette-pink-01-rgb: 101, 0, 77;
58
- --nsw-palette-pink-02-rgb: 217, 18, 174;
59
- --nsw-palette-pink-03-rgb: 244, 181, 230;
60
- --nsw-palette-pink-04-rgb: 253, 222, 242;
52
+ --nsw-palette-fuschia-01: #65004d;
53
+ --nsw-palette-fuschia-02: #d912ae;
54
+ --nsw-palette-fuschia-03: #f4b5e6;
55
+ --nsw-palette-fuschia-04: #fddef2;
56
+
57
+ --nsw-palette-fuschia-01-rgb: 101, 0, 77;
58
+ --nsw-palette-fuschia-02-rgb: 217, 18, 174;
59
+ --nsw-palette-fuschia-03-rgb: 244, 181, 230;
60
+ --nsw-palette-fuschia-04-rgb: 253, 222, 242;
61
61
 
62
62
  --nsw-palette-red-01: #630019;
63
63
  --nsw-palette-red-02: #d7153a;