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/dist/css/core.css +1 -1
- package/dist/css/main.css +1 -1
- package/dist/js/main.js +1185 -1786
- package/package.json +32 -27
- package/src/components/header/_header.scss +2 -1
- package/src/components/media/_media.scss +2 -1
- package/src/components/pagination/_pagination.scss +7 -1
- package/src/components/select/select.js +0 -1
- package/src/core/grid/_grid.scss +8 -6
- package/src/core/section/_section.scss +1 -1
- package/src/global/scss/base/_functions.scss +4 -2
- package/src/global/scss/base/_mixins.scss +8 -6
- package/src/global/scss/helpers/_list.scss +2 -2
- package/src/global/scss/settings/_palette.scss +9 -9
- package/CHANGELOG.md +0 -900
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nsw-design-system",
|
|
3
|
-
"version": "3.5.
|
|
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.
|
|
47
|
-
"@babel/preset-env": "^7.
|
|
48
|
-
"
|
|
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.
|
|
51
|
-
"cssnano": "^
|
|
51
|
+
"browser-sync": "^2.29.1",
|
|
52
|
+
"cssnano": "^6.0.0",
|
|
52
53
|
"del": "^5.1.0",
|
|
53
|
-
"eslint": "^
|
|
54
|
-
"eslint-config-airbnb-base": "^
|
|
55
|
-
"eslint-plugin-import": "^2.
|
|
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.
|
|
59
|
-
"gulp-changed": "^4.0.
|
|
60
|
-
"gulp-eslint": "^
|
|
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": "^
|
|
64
|
-
"gulp-replace": "^1.
|
|
65
|
-
"gulp-sass": "^
|
|
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
|
|
72
|
-
"handlebars": "^4.7.
|
|
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.
|
|
75
|
-
"metalsmith": "^2.
|
|
76
|
+
"jstransformer-handlebars": "^1.2.0",
|
|
77
|
+
"metalsmith": "^2.5.1",
|
|
76
78
|
"metalsmith-collections": "^0.9.0",
|
|
77
|
-
"metalsmith-data-loader": "^1.
|
|
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
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
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.
|
|
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
|
-
"
|
|
99
|
+
"overrides": {
|
|
100
|
+
"gulp-better-rollup": {
|
|
101
|
+
"rollup": "^1||^2||^3"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
99
104
|
}
|
|
@@ -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
|
|
package/src/core/grid/_grid.scss
CHANGED
|
@@ -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
|
|
85
|
-
max-width: percentage($i
|
|
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
|
|
94
|
-
max-width: percentage($i
|
|
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
|
|
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
|
|
114
|
+
margin-left: percentage(math.div($i, 12));
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
}
|
|
@@ -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
|
|
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)
|
|
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
|
|
231
|
-
max-width: percentage($size
|
|
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
|
|
236
|
+
margin-left: percentage(math.div($offset, 12));
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
} @else {
|
|
239
|
-
width: percentage($size
|
|
240
|
-
max-width: percentage($size
|
|
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
|
|
245
|
+
margin-left: percentage(math.div($offset, 12));
|
|
244
246
|
}
|
|
245
247
|
}
|
|
246
248
|
}
|
|
@@ -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-
|
|
53
|
-
--nsw-palette-
|
|
54
|
-
--nsw-palette-
|
|
55
|
-
--nsw-palette-
|
|
56
|
-
|
|
57
|
-
--nsw-palette-
|
|
58
|
-
--nsw-palette-
|
|
59
|
-
--nsw-palette-
|
|
60
|
-
--nsw-palette-
|
|
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;
|