@qhealth-design-system/core 1.22.1 → 1.23.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.
Files changed (81) hide show
  1. package/.storybook/assets/image-position-demo-portrait.svg +54 -0
  2. package/.storybook/assets/image-position-demo.svg +55 -0
  3. package/.storybook/globals.js +10 -1
  4. package/.storybook/preview.js +8 -1
  5. package/CHANGELOG.md +4 -0
  6. package/README.md +0 -6
  7. package/package.json +13 -33
  8. package/src/assets/img/svg-icons.svg +154 -154
  9. package/src/component-loader.js +11 -2
  10. package/src/components/_global/css/admin/component.scss +1 -0
  11. package/src/components/_global/css/btn/component.scss +9 -0
  12. package/src/components/_global/css/img/image-position-utility-classes.scss +30 -0
  13. package/src/components/_global/css/img/image-ratio-utility-classes.scss +41 -0
  14. package/src/components/_global/css/img/images.scss +74 -5
  15. package/src/components/_global/css/modal/component.scss +1 -0
  16. package/src/components/_global/js/animate/global.js +272 -294
  17. package/src/components/_global/js/collapsible.js +3 -3
  18. package/src/components/_global/js/global.js +304 -316
  19. package/src/components/_global/js/legacyGlobal.js +63 -0
  20. package/src/components/_global/js/modal/global.js +218 -223
  21. package/src/components/_global/js/popover/controller.js +4 -4
  22. package/src/components/_global/js/tabs/global.js +264 -276
  23. package/src/components/a-z_listing/js/global.js +106 -92
  24. package/src/components/accordion/css/component.scss +24 -41
  25. package/src/components/accordion/html/component.hbs +23 -5
  26. package/src/components/accordion/js/global.js +5 -10
  27. package/src/components/basic_search/js/global.js +0 -7
  28. package/src/components/code/js/global.js +6 -12
  29. package/src/components/file_upload/js/global.js +1 -5
  30. package/src/components/internal_navigation/css/component.scss +2 -2
  31. package/src/components/internal_navigation/html/component.hbs +16 -1
  32. package/src/components/main_navigation/js/global.js +341 -335
  33. package/src/components/overflow_menu/css/component.scss +1 -0
  34. package/src/components/search_box/css/component.scss +0 -1
  35. package/src/components/tab/js/global.js +5 -10
  36. package/src/components/toggle_tip/js/global.js +0 -6
  37. package/src/components/tool_tip/js/global.js +0 -6
  38. package/src/components/video_player/css/component.scss +27 -9
  39. package/src/components/video_player/html/component.hbs +32 -6
  40. package/src/components/video_player/js/global.js +8 -1
  41. package/src/index.js +4 -0
  42. package/src/stories/Accordion/accordion.stories.js +1 -0
  43. package/src/stories/Banner/bannerContained.stories.js +123 -0
  44. package/src/stories/Flexbox/Flexbox.stories.js +316 -0
  45. package/src/stories/Footer/Footer.stories.js +3 -3
  46. package/src/stories/Header/Header.js +1 -1
  47. package/src/stories/Image/Image.stories.js +182 -0
  48. package/src/stories/PromoPanel/PromoPanel.stories.js +1 -1
  49. package/src/stories/Templates/ContentPage.stories.js +101 -0
  50. package/src/stories/Templates/LandingPage.stories.js +193 -0
  51. package/src/stories/Templates/templateHelpers.js +102 -0
  52. package/src/stories/VideoPlayer/VideoPlayer.stories.js +16 -0
  53. package/src/styles/imports/utilities.scss +15 -25
  54. package/src/styles/imports/variables.scss +26 -0
  55. package/src/components/_global/html/head.html +0 -22
  56. package/src/components/_global/html/scripts.html +0 -28
  57. package/src/components/_global/js/_polyfills/global.js +0 -19
  58. package/src/components/_template/html/component-page.html +0 -75
  59. package/src/components/_template/js/global.js +0 -3
  60. package/src/components/accordion/html/accordion-group.html +0 -163
  61. package/src/components/accordion/html/default.html +0 -99
  62. package/src/components/banner_basic/js/global.js +0 -3
  63. package/src/components/loading_spinner/js/global.js +0 -3
  64. package/src/components/pagination/html/default.html +0 -39
  65. package/src/components/search_box/html/component.html +0 -26
  66. package/src/data/current.json +0 -400
  67. package/src/data/current_admin.json +0 -305
  68. package/src/data/model_component.js +0 -14
  69. package/src/data/site.json +0 -977
  70. package/src/externals/tinymce_classes.css +0 -62
  71. package/src/html/component-global-elements.html +0 -2857
  72. package/src/html/component-horizontal_rule.html +0 -647
  73. package/src/html/component-internal_navigation.html +0 -583
  74. package/src/html/component-left_hand_navigation.html +0 -57
  75. package/src/html/component-main_navigation.html +0 -583
  76. package/src/html/component-multi_column.html +0 -582
  77. package/src/html/components.html +0 -354
  78. package/src/html/home.html +0 -1898
  79. package/src/html/index.html +0 -129
  80. package/src/html/inner-with-nav.html +0 -605
  81. package/src/html/inner.html +0 -618
@@ -1,346 +1,334 @@
1
- (function (QLD) {
2
- "use strict";
1
+ /**
2
+ * The main namespace for all QLDDS functions and variables
3
+ * @module _global
4
+ */
3
5
 
6
+ const utils = {
4
7
  /**
5
- * The main namespace for all QLDDS functions and variables
6
- * @module _global
8
+ * Add 'js' body class if JS is enabled on the page
9
+ *
10
+ * @memberof module:_global
7
11
  */
8
- var QLD = QLD ? QLD : {};
9
- QLD.utils = {
10
- /**
11
- * Add 'js' body class if JS is enabled on the page
12
- *
13
- * @memberof module:_global
14
- */
15
- browserJS: function () {
16
- document.querySelector("html").classList.remove("no-js");
17
- document.querySelector("html").classList.add("js");
18
- },
12
+ browserJS: function () {
13
+ document.querySelector("html").classList.remove("no-js");
14
+ document.querySelector("html").classList.add("js");
15
+ },
19
16
 
20
- /**
21
- * Returns a function, that, as long as it continues to be invoked, will not
22
- * be triggered. The function will be called after it stops being called for
23
- * N milliseconds. If `immediate` is passed, trigger the function on the
24
- * leading edge, instead of the trailing.
25
- * https://davidwalsh.name/javascript-debounce-function
26
- *
27
- * @memberof module:_global
28
- *
29
- * @param {function} func
30
- * @param {number} wait
31
- * @param {boolean} immediate
32
- *
33
- * @returns {function}
34
- */
35
- debounce: function (func, wait, immediate) {
36
- var timeout;
37
- return function () {
38
- var context = this,
39
- args = arguments;
40
- var later = function () {
41
- timeout = null;
42
- if (!immediate) func.apply(context, args);
43
- };
44
- var callNow = immediate && !timeout;
45
- clearTimeout(timeout);
46
- timeout = setTimeout(later, wait);
47
- if (callNow) func.apply(context, args);
17
+ /**
18
+ * Returns a function, that, as long as it continues to be invoked, will not
19
+ * be triggered. The function will be called after it stops being called for
20
+ * N milliseconds. If `immediate` is passed, trigger the function on the
21
+ * leading edge, instead of the trailing.
22
+ * https://davidwalsh.name/javascript-debounce-function
23
+ *
24
+ * @memberof module:_global
25
+ *
26
+ * @param {function} func
27
+ * @param {number} wait
28
+ * @param {boolean} immediate
29
+ *
30
+ * @returns {function}
31
+ */
32
+ debounce: function (func, wait, immediate) {
33
+ var timeout;
34
+ return function () {
35
+ var context = this,
36
+ args = arguments;
37
+ var later = function () {
38
+ timeout = null;
39
+ if (!immediate) func.apply(context, args);
48
40
  };
49
- },
41
+ var callNow = immediate && !timeout;
42
+ clearTimeout(timeout);
43
+ timeout = setTimeout(later, wait);
44
+ if (callNow) func.apply(context, args);
45
+ };
46
+ },
50
47
 
51
- /**
52
- * Convert nodeList to Array (for IE11)
53
- *
54
- * @memberof module:_global
55
- *
56
- * @param {*} node_list
57
- *
58
- * @returns {Node[]}
59
- */
60
- listToArray: function (node_list) {
61
- return Array.prototype.slice.call(node_list);
62
- },
48
+ /**
49
+ * Convert nodeList to Array (for IE11)
50
+ *
51
+ * @memberof module:_global
52
+ *
53
+ * @param {*} node_list
54
+ *
55
+ * @returns {Node[]}
56
+ */
57
+ listToArray: function (node_list) {
58
+ return Array.prototype.slice.call(node_list);
59
+ },
63
60
 
64
- /**
65
- * Set browser cookie
66
- *
67
- * @memberof module:_global
68
- *
69
- * @param {string} cookie_name
70
- * @param {string} cookie_value
71
- */
72
- setCookie: function (cookie_name, cookie_value) {
73
- var cookie_entry =
74
- cookie_name + "=" + encodeURIComponent(cookie_value) + ";";
75
- document.cookie = cookie_entry + "; path=/;";
76
- },
77
- /**
78
- * Get browser cookie
79
- *
80
- * @memberof module:_global
81
- *
82
- * @param {string} cookie_name
83
- *
84
- * @returns {c_value}
85
- */
86
- getCookie: function (cookie_name) {
87
- var c_value = " " + document.cookie;
88
- var c_start = c_value.indexOf(" " + cookie_name + "=");
89
- if (c_start == -1) {
90
- c_value = null;
91
- } else {
92
- c_start = c_value.indexOf("=", c_start) + 1;
93
- var c_end = c_value.indexOf(";", c_start);
94
- if (c_end == -1) {
95
- c_end = c_value.length;
96
- }
97
- c_value = unescape(c_value.substring(c_start, c_end));
98
- }
99
- return c_value;
100
- },
101
- /**
102
- * Set browser local storage
103
- *
104
- * @memberof module:_global
105
- *
106
- * @param {string} storage_key
107
- * @param {string} storage_value
108
- */
109
- setLocalStorage: function (storage_key, storage_value) {
110
- if (typeof storage_value !== "string") {
111
- storage_value = JSON.stringify(storage_value);
61
+ /**
62
+ * Set browser cookie
63
+ *
64
+ * @memberof module:_global
65
+ *
66
+ * @param {string} cookie_name
67
+ * @param {string} cookie_value
68
+ */
69
+ setCookie: function (cookie_name, cookie_value) {
70
+ var cookie_entry =
71
+ cookie_name + "=" + encodeURIComponent(cookie_value) + ";";
72
+ document.cookie = cookie_entry + "; path=/;";
73
+ },
74
+ /**
75
+ * Get browser cookie
76
+ *
77
+ * @memberof module:_global
78
+ *
79
+ * @param {string} cookie_name
80
+ *
81
+ * @returns {c_value}
82
+ */
83
+ getCookie: function (cookie_name) {
84
+ var c_value = " " + document.cookie;
85
+ var c_start = c_value.indexOf(" " + cookie_name + "=");
86
+ if (c_start == -1) {
87
+ c_value = null;
88
+ } else {
89
+ c_start = c_value.indexOf("=", c_start) + 1;
90
+ var c_end = c_value.indexOf(";", c_start);
91
+ if (c_end == -1) {
92
+ c_end = c_value.length;
112
93
  }
94
+ c_value = unescape(c_value.substring(c_start, c_end));
95
+ }
96
+ return c_value;
97
+ },
98
+ /**
99
+ * Set browser local storage
100
+ *
101
+ * @memberof module:_global
102
+ *
103
+ * @param {string} storage_key
104
+ * @param {string} storage_value
105
+ */
106
+ setLocalStorage: function (storage_key, storage_value) {
107
+ if (typeof storage_value !== "string") {
108
+ storage_value = JSON.stringify(storage_value);
109
+ }
113
110
 
114
- localStorage.setItem(storage_key, storage_value);
115
- },
116
- /**
117
- * Get browser local storage from key
118
- *
119
- * @memberof module:_global
120
- *
121
- * @param {string} storage_key
122
- *
123
- * @returns {localStorage.getItem(storage_key)}
124
- */
125
- getLocalStorage: function (storage_key) {
126
- return localStorage.getItem(storage_key);
127
- },
128
- /**
129
- * Remove browser local storage item by key
130
- *
131
- * @memberof module:_global
132
- *
133
- * @param {string} storage_key
134
- */
135
- removeLocalStorage: function (storage_key) {
136
- localStorage.removeItem(storage_key);
137
- },
138
- /**
139
- * Determine the location of the user using HTML5 geolocation
140
- *
141
- * @memberof module:_global
142
- *
143
- * @param {Boolean} override
144
- * @param {function} errorCallback
145
- */
146
- geolocateUser: function (override, errorCallback) {
147
- var userLocationStorage = QLD.utils.getLocalStorage("qld_user_location");
148
- if (userLocationStorage !== null && !override) {
149
- return JSON.parse(userLocationStorage);
150
- }
111
+ localStorage.setItem(storage_key, storage_value);
112
+ },
113
+ /**
114
+ * Get browser local storage from key
115
+ *
116
+ * @memberof module:_global
117
+ *
118
+ * @param {string} storage_key
119
+ *
120
+ * @returns {localStorage.getItem(storage_key)}
121
+ */
122
+ getLocalStorage: function (storage_key) {
123
+ return localStorage.getItem(storage_key);
124
+ },
125
+ /**
126
+ * Remove browser local storage item by key
127
+ *
128
+ * @memberof module:_global
129
+ *
130
+ * @param {string} storage_key
131
+ */
132
+ removeLocalStorage: function (storage_key) {
133
+ localStorage.removeItem(storage_key);
134
+ },
135
+ /**
136
+ * Determine the location of the user using HTML5 geolocation
137
+ *
138
+ * @memberof module:_global
139
+ *
140
+ * @param {Boolean} override
141
+ * @param {function} errorCallback
142
+ */
143
+ geolocateUser: function (override, errorCallback) {
144
+ var userLocationStorage = utils.getLocalStorage("qld_user_location");
145
+ if (userLocationStorage !== null && !override) {
146
+ return JSON.parse(userLocationStorage);
147
+ }
151
148
 
152
- if (navigator.geolocation) {
153
- QLD.utils.setLoadingState(true);
154
- navigator.geolocation.getCurrentPosition(
155
- function (position) {
156
- var location = {
157
- latitude: position.coords.latitude,
158
- longitude: position.coords.longitude,
159
- isGeolocated: true,
160
- location: "",
161
- };
149
+ if (navigator.geolocation) {
150
+ utils.setLoadingState(true);
151
+ navigator.geolocation.getCurrentPosition(
152
+ function (position) {
153
+ var location = {
154
+ latitude: position.coords.latitude,
155
+ longitude: position.coords.longitude,
156
+ isGeolocated: true,
157
+ location: "",
158
+ };
162
159
 
163
- QLD.utils.setUserLocation(location);
164
- QLD.utils.removeLocalStorage("deny-location");
165
- return `${position.coords.latitude},${position.coords.longitude}`;
166
- },
167
- function (error) {
168
- console.log(error);
169
- QLD.utils.setLoadingState(false);
170
- if (errorCallback) {
171
- errorCallback();
172
- }
173
- return false;
174
- },
175
- { timeout: 10000 },
176
- );
177
- } else {
178
- console.log("Unable to locate");
179
- if (errorCallback) {
180
- errorCallback();
181
- }
182
- return false;
160
+ utils.setUserLocation(location);
161
+ utils.removeLocalStorage("deny-location");
162
+ return `${position.coords.latitude},${position.coords.longitude}`;
163
+ },
164
+ function (error) {
165
+ console.log(error);
166
+ utils.setLoadingState(false);
167
+ if (errorCallback) {
168
+ errorCallback();
169
+ }
170
+ return false;
171
+ },
172
+ { timeout: 10000 },
173
+ );
174
+ } else {
175
+ console.log("Unable to locate");
176
+ if (errorCallback) {
177
+ errorCallback();
183
178
  }
184
- },
185
-
186
- /**
187
- * Set the user location, including the HHS
188
- *
189
- * @memberof module:_global
190
- *
191
- * @param {object} location
192
- */
193
- setUserLocation: function (location, refresh = true) {
194
- // If there is a site-wide HHS configured
195
- var hhsDiv = document.getElementById("qld__hhs");
179
+ return false;
180
+ }
181
+ },
196
182
 
197
- if (hhsDiv !== null && typeof serviceFinderData !== "undefined") {
198
- var hhsId = hhsDiv.getAttribute("data-hhs");
199
- serviceFinderData
200
- .collection("hhs")
201
- .doc(hhsId)
202
- .get()
203
- .then((response) => {
204
- location.hhs_id = hhsId;
205
- location.hhs_name = response.name;
183
+ /**
184
+ * Set the user location, including the HHS
185
+ *
186
+ * @memberof module:_global
187
+ *
188
+ * @param {object} location
189
+ */
190
+ setUserLocation: function (location, refresh = true) {
191
+ // If there is a site-wide HHS configured
192
+ var hhsDiv = document.getElementById("qld__hhs");
206
193
 
207
- QLD.utils.setUserLocationInStorage(location, refresh);
208
- });
209
- } else {
210
- QLD.utils.setUserLocationInStorage(location, refresh);
211
- }
212
- },
194
+ if (hhsDiv !== null && typeof serviceFinderData !== "undefined") {
195
+ var hhsId = hhsDiv.getAttribute("data-hhs");
196
+ serviceFinderData
197
+ .collection("hhs")
198
+ .doc(hhsId)
199
+ .get()
200
+ .then((response) => {
201
+ location.hhs_id = hhsId;
202
+ location.hhs_name = response.name;
213
203
 
214
- /**
215
- * Set the 'qld_user_location' cookie based on a provided location object
216
- *
217
- * @memberof module:_global
218
- *
219
- */
220
- setUserLocationInStorage: function (newLocation, refresh) {
221
- QLD.utils.setLocalStorage(
222
- "qld_user_location",
223
- JSON.stringify(newLocation),
224
- );
204
+ utils.setUserLocationInStorage(location, refresh);
205
+ });
206
+ } else {
207
+ utils.setUserLocationInStorage(location, refresh);
208
+ }
209
+ },
225
210
 
226
- if (refresh) {
227
- QLD.utils.setLoadingState(true);
211
+ /**
212
+ * Set the 'qld_user_location' cookie based on a provided location object
213
+ *
214
+ * @memberof module:_global
215
+ *
216
+ */
217
+ setUserLocationInStorage: function (newLocation, refresh) {
218
+ utils.setLocalStorage("qld_user_location", JSON.stringify(newLocation));
228
219
 
229
- setTimeout(function () {
230
- window.location.reload(false);
231
- }, 300);
232
- }
233
- },
234
- /**
235
- * Check the 'qld_user_location' cookie to determine
236
- * whether the user is geolocated
237
- *
238
- * @memberof module:_global
239
- *
240
- * @return {boolean}
241
- *
242
- */
243
- isGeolocated: function () {
244
- var userLocationStorage = QLD.utils.getLocalStorage("qld_user_location");
245
- var userLocationData = {};
220
+ if (refresh) {
221
+ utils.setLoadingState(true);
246
222
 
247
- if (userLocationStorage !== null) {
248
- userLocationData = JSON.parse(userLocationStorage);
249
- }
223
+ setTimeout(function () {
224
+ window.location.reload(false);
225
+ }, 300);
226
+ }
227
+ },
228
+ /**
229
+ * Check the 'qld_user_location' cookie to determine
230
+ * whether the user is geolocated
231
+ *
232
+ * @memberof module:_global
233
+ *
234
+ * @return {boolean}
235
+ *
236
+ */
237
+ isGeolocated: function () {
238
+ var userLocationStorage = utils.getLocalStorage("qld_user_location");
239
+ var userLocationData = {};
250
240
 
251
- if (Object.keys(userLocationData).length > 0) {
252
- return userLocationData.isGeolocated;
253
- }
241
+ if (userLocationStorage !== null) {
242
+ userLocationData = JSON.parse(userLocationStorage);
243
+ }
254
244
 
255
- return false;
256
- },
257
- /**
258
- * Set the loading state of the page. If 'true',
259
- * this will show a loader animation overlay over
260
- * the entire page. Use 'false' to remove this
261
- * same animation
262
- *
263
- * @memberof module:_global
264
- *
265
- * @param {Boolean} isLoading
266
- */
267
- setLoadingState: function (isLoading) {
268
- var loader = document.querySelector(".loader");
245
+ if (Object.keys(userLocationData).length > 0) {
246
+ return userLocationData.isGeolocated;
247
+ }
269
248
 
270
- if (loader === null) {
271
- loader = document.createElement("div");
272
- loader.classList.add("loader");
273
- var parentNode = document.querySelector(".main");
274
- parentNode.insertBefore(loader, parentNode.firstChild);
275
- }
249
+ return false;
250
+ },
251
+ /**
252
+ * Set the loading state of the page. If 'true',
253
+ * this will show a loader animation overlay over
254
+ * the entire page. Use 'false' to remove this
255
+ * same animation
256
+ *
257
+ * @memberof module:_global
258
+ *
259
+ * @param {Boolean} isLoading
260
+ */
261
+ setLoadingState: function (isLoading) {
262
+ var loader = document.querySelector(".loader");
276
263
 
277
- if (isLoading) {
278
- loader.parentNode.classList.add("loading");
279
- } else {
280
- document.querySelector(".loading").classList.remove("loading");
281
- }
282
- },
283
- /**
284
- * Get Paramater from URL by name
285
- *
286
- * @memberof module:_global
287
- *
288
- * @param {*} name
289
- */
290
- getParamaterByName: function (name) {
291
- name = name.replace(/\[/g, "\\[").replace(/]/g, "\\]");
292
- var regexS = "[\\?&]" + name + "=([^&#]*)";
293
- var regex = new RegExp(regexS);
294
- var results = regex.exec(window.location.href);
295
- if (results == null) return "";
296
- else return decodeURIComponent(results[1].replace(/\+/g, " "));
297
- },
298
- /**
299
- * Update the href path for SVG icons, depending on the spritesheeet source (core vs health)
300
- *
301
- * @memberof module:_global
302
- *
303
- * String selector to that targets the "use" element within the SVG icon
304
- * @param {string} selector
305
- */
306
- updateSvgIconPath: function (selector) {
307
- const ctaNavIcons = document.querySelectorAll(selector);
308
- if (ctaNavIcons.length > 0) {
309
- // Check each icon found
310
- ctaNavIcons.forEach((icon) => {
311
- const href = icon.getAttribute("href");
264
+ if (loader === null) {
265
+ loader = document.createElement("div");
266
+ loader.classList.add("loader");
267
+ var parentNode = document.querySelector(".main");
268
+ parentNode.insertBefore(loader, parentNode.firstChild);
269
+ }
312
270
 
313
- if (href) {
314
- const splitArray = href.split("#");
315
- let iconName = splitArray.pop();
316
- let isHealthIcon = iconName.startsWith("extended_");
271
+ if (isLoading) {
272
+ loader.parentNode.classList.add("loading");
273
+ } else {
274
+ document.querySelector(".loading").classList.remove("loading");
275
+ }
276
+ },
277
+ /**
278
+ * Get Paramater from URL by name
279
+ *
280
+ * @memberof module:_global
281
+ *
282
+ * @param {*} name
283
+ */
284
+ getParamaterByName: function (name) {
285
+ name = name.replace(/\[/g, "\\[").replace(/]/g, "\\]");
286
+ var regexS = "[\\?&]" + name + "=([^&#]*)";
287
+ var regex = new RegExp(regexS);
288
+ var results = regex.exec(window.location.href);
289
+ if (results == null) return "";
290
+ else return decodeURIComponent(results[1].replace(/\+/g, " "));
291
+ },
292
+ /**
293
+ * Update the href path for SVG icons, depending on the spritesheeet source (core vs health)
294
+ *
295
+ * @memberof module:_global
296
+ *
297
+ * String selector to that targets the "use" element within the SVG icon
298
+ * @param {string} selector
299
+ */
300
+ updateSvgIconPath: function (selector) {
301
+ const ctaNavIcons = document.querySelectorAll(selector);
302
+ if (ctaNavIcons.length > 0) {
303
+ // Check each icon found
304
+ ctaNavIcons.forEach((icon) => {
305
+ const href = icon.getAttribute("href");
317
306
 
318
- // Remove the "extended_" prefix from the iconName if it's a health icon
319
- if (isHealthIcon) {
320
- iconName = iconName.replace(/extended_/gi, "");
321
- }
307
+ if (href) {
308
+ const splitArray = href.split("#");
309
+ let iconName = splitArray.pop();
310
+ let isHealthIcon = iconName.startsWith("extended_");
322
311
 
323
- // Recreate the href path for the SVG
324
- splitArray.push(iconName);
325
- let updatedHref = splitArray.join("#");
312
+ // Remove the "extended_" prefix from the iconName if it's a health icon
313
+ if (isHealthIcon) {
314
+ iconName = iconName.replace(/extended_/gi, "");
315
+ }
326
316
 
327
- // Update the path to the health spreadsheet if required
328
- if (isHealthIcon) {
329
- updatedHref = updatedHref.replace(
330
- "QLD-icons",
331
- "QLD-Health-icons",
332
- );
333
- }
317
+ // Recreate the href path for the SVG
318
+ splitArray.push(iconName);
319
+ let updatedHref = splitArray.join("#");
334
320
 
335
- icon.setAttribute("href", updatedHref);
321
+ // Update the path to the health spreadsheet if required
322
+ if (isHealthIcon) {
323
+ updatedHref = updatedHref.replace("QLD-icons", "QLD-Health-icons");
336
324
  }
337
- });
338
- }
339
- },
340
- };
341
325
 
342
- // Make QLD variable available to the console for debugging
343
- window.QLD = QLD;
326
+ icon.setAttribute("href", updatedHref);
327
+ }
328
+ });
329
+ }
330
+ },
331
+ };
344
332
 
345
- QLD.utils.browserJS();
346
- })(window.QLD);
333
+ export default utils;
334
+ export { utils };