nsw-design-system 3.28.1 → 3.28.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.
package/dist/js/main.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! NSW Design System v3.28.1 | MIT License */
1
+ /*! NSW Design System v3.28.3 | MIT License */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define('NSW', ['exports'], factory) :
@@ -64,7 +64,6 @@
64
64
  return unsafeStringify(rnds);
65
65
  }
66
66
 
67
- // eslint-disable-next-line import/no-extraneous-dependencies
68
67
  const hasWindow$2 = typeof window !== 'undefined';
69
68
  const hasDocument$2 = typeof document !== 'undefined';
70
69
  const legacyCopyText = text => {
@@ -6523,7 +6522,7 @@
6523
6522
  }
6524
6523
  }
6525
6524
 
6526
- /* eslint-disable max-len, import/no-extraneous-dependencies */
6525
+ /* eslint-disable max-len */
6527
6526
  class Toggletip {
6528
6527
  constructor(element) {
6529
6528
  this.toggletip = element;
@@ -7618,4 +7617,4 @@
7618
7617
 
7619
7618
  }));
7620
7619
 
7621
- ;(function(g){try{g.NSW=g.NSW||{};g.NSW.VERSION="3.28.1";}catch(e){} }(typeof globalThis!=='undefined'?globalThis:(typeof window!=='undefined'?window:self)));
7620
+ ;(function(g){try{g.NSW=g.NSW||{};g.NSW.VERSION="3.28.3";}catch(e){} }(typeof globalThis!=='undefined'?globalThis:(typeof window!=='undefined'?window:self)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsw-design-system",
3
- "version": "3.28.1",
3
+ "version": "3.28.3",
4
4
  "description": "Design system for Digital NSW",
5
5
  "main": "dist/js/main.js",
6
6
  "types": "dist/js/main.d.ts",
@@ -58,12 +58,12 @@
58
58
  "license": "ISC",
59
59
  "dependencies": {
60
60
  "@floating-ui/dom": "^1.6.13",
61
+ "uuid": "^14.0.0",
61
62
  "vanilla-cookieconsent": "^3.1.0"
62
63
  },
63
64
  "devDependencies": {
64
65
  "@babel/core": "^7.21.4",
65
66
  "@babel/preset-env": "^7.21.4",
66
- "@floating-ui/dom": "^1.6.13",
67
67
  "@rollup/plugin-babel": "^6.0.3",
68
68
  "@rollup/plugin-node-resolve": "^15.0.2",
69
69
  "auto-changelog": "^2.4.0",
@@ -117,7 +117,6 @@
117
117
  "stylelint-order": "^4.0.0",
118
118
  "stylelint-scss": "^3.16.0",
119
119
  "typescript": "5.6.3",
120
- "uuid": "^14.0.0",
121
120
  "yargs": "^15.3.1"
122
121
  },
123
122
  "overrides": {
@@ -168,12 +168,14 @@
168
168
  position: relative;
169
169
  }
170
170
 
171
- &:hover {
172
- outline-width: 0;
171
+ &:hover,
172
+ &:focus:not(:focus-visible) {
173
+ outline: 0;
173
174
  }
174
175
 
175
- &:focus {
176
- outline-width: 3px;
176
+ &:focus-visible {
177
+ @include nsw.nsw-focus($offset: false);
178
+ outline-offset: -(nsw.$nsw-focus-width);
177
179
  }
178
180
  }
179
181
 
@@ -1,4 +1,4 @@
1
- /* eslint-disable max-len, import/no-extraneous-dependencies */
1
+ /* eslint-disable max-len */
2
2
  import {
3
3
  computePosition,
4
4
  flip,
@@ -236,7 +236,7 @@
236
236
 
237
237
  &.nsw-section--brand-dark,
238
238
  &.nsw-section--invert {
239
- a {
239
+ a:not(.nsw-button) {
240
240
  @include nsw.link-light;
241
241
  }
242
242
  }
@@ -244,7 +244,7 @@
244
244
  &.nsw-section--brand-light,
245
245
  &.nsw-section--off-white,
246
246
  &.nsw-section--white {
247
- a {
247
+ a:not(.nsw-button) {
248
248
  @include nsw.link-dark;
249
249
  }
250
250
  }
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line import/no-extraneous-dependencies
2
1
  import { v4 as uuidv4 } from 'uuid'
3
2
 
4
3
  const hasWindow = typeof window !== 'undefined'
@@ -40,11 +40,11 @@
40
40
  @error 'NSW-DS nsw-focus mixin allows a boolean for $offset: You have used a type of "#{meta.type-of($offset)}" and a value of "#{$offset}"';
41
41
  }
42
42
 
43
- outline: solid 3px $color;
43
+ outline: solid settings.$nsw-focus-width $color;
44
44
  outline-offset: 0;
45
45
 
46
46
  @if $offset == true {
47
- outline-offset: 3px;
47
+ outline-offset: settings.$nsw-focus-width;
48
48
  }
49
49
  }
50
50
 
@@ -33,6 +33,9 @@ $nsw-font-weight-bolder: bolder !default;
33
33
  // Grid
34
34
  $grid-gutters: 8px;
35
35
 
36
+ // Focus
37
+ $nsw-focus-width: 3px !default;
38
+
36
39
  // z-index
37
40
  $nsw-z-index: (
38
41
  top: 900,