nsw-design-system 3.18.7 → 3.18.8

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
@@ -5171,11 +5171,12 @@
5171
5171
  copiedMessage(element) {
5172
5172
  this.copyElement = element;
5173
5173
  const icon = '<span class="material-icons nsw-material-icons" focusable="false" aria-hidden="true">link</span>';
5174
+ const originalText = this.copyElement.innerHTML;
5174
5175
  this.copyElement.classList.add('copied');
5175
5176
  this.copyElement.innerHTML = `${icon} Copied`;
5176
5177
  setTimeout(() => {
5177
5178
  this.copyElement.classList.remove('copied');
5178
- this.copyElement.innerHTML = `${icon} Copy link`;
5179
+ this.copyElement.innerHTML = originalText;
5179
5180
  }, 3000);
5180
5181
  }
5181
5182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsw-design-system",
3
- "version": "3.18.7",
3
+ "version": "3.18.8",
4
4
  "description": "Design system for Digital NSW",
5
5
  "main": "dist/js/main.js",
6
6
  "types": "dist/js/main.d.ts",
@@ -152,11 +152,14 @@ class UtilityList extends Toggletip {
152
152
  copiedMessage(element) {
153
153
  this.copyElement = element
154
154
  const icon = '<span class="material-icons nsw-material-icons" focusable="false" aria-hidden="true">link</span>'
155
+ const originalText = this.copyElement.innerHTML
156
+
155
157
  this.copyElement.classList.add('copied')
156
158
  this.copyElement.innerHTML = `${icon} Copied`
159
+
157
160
  setTimeout(() => {
158
161
  this.copyElement.classList.remove('copied')
159
- this.copyElement.innerHTML = `${icon} Copy link`
162
+ this.copyElement.innerHTML = originalText
160
163
  }, 3000)
161
164
  }
162
165
  }