@qhealth-design-system/core 1.16.4 → 1.17.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 (103) hide show
  1. package/.storybook/assets/storybook.css +1 -1
  2. package/.storybook/globals.js +10 -0
  3. package/CHANGELOG.md +4 -0
  4. package/package.json +1 -1
  5. package/src/components/_global/css/cta_links/component.scss +107 -14
  6. package/src/components/_global/css/forms/control_inputs/component.scss +65 -77
  7. package/src/components/_global/css/link_columns/component.scss +2 -2
  8. package/src/components/_global/html/scripts.html +0 -2
  9. package/src/components/_global/js/cta_links/global.js +33 -0
  10. package/src/components/_global/js/global.js +175 -138
  11. package/src/components/_global/js/tabs/global.js +6 -2
  12. package/src/components/_template/html/component-page.html +25 -31
  13. package/src/components/banner_advanced/html/component.hbs +1 -1
  14. package/src/components/breadcrumbs/js/global.js +17 -4
  15. package/src/components/card_feature/html/component.hbs +1 -1
  16. package/src/components/card_multi_action/html/component.hbs +1 -1
  17. package/src/components/card_single_action/css/component.scss +38 -47
  18. package/src/components/card_single_action/html/component.hbs +1 -1
  19. package/src/components/code/css/component.scss +72 -73
  20. package/src/components/code/html/component.hbs +62 -19
  21. package/src/components/code/js/global.js +102 -86
  22. package/src/components/footer/css/component.scss +2 -4
  23. package/src/components/footer/html/component.hbs +11 -8
  24. package/src/components/header/css/component.scss +11 -11
  25. package/src/components/header/html/component.hbs +3 -3
  26. package/src/components/header/js/global.js +58 -65
  27. package/src/components/in_page_navigation/js/global.js +34 -31
  28. package/src/components/internal_navigation/js/global.js +13 -3
  29. package/src/components/main_navigation/css/component.scss +79 -13
  30. package/src/components/main_navigation/html/component.hbs +5 -5
  31. package/src/components/main_navigation/js/global.js +94 -115
  32. package/src/components/mega_main_navigation/css/component.scss +27 -14
  33. package/src/components/mega_main_navigation/html/component.hbs +5 -5
  34. package/src/components/mega_main_navigation/js/global.js +50 -55
  35. package/src/components/page_alert/css/component.scss +141 -179
  36. package/src/components/prefooter/css/component.scss +62 -0
  37. package/src/components/prefooter/js/manifest.json +9 -0
  38. package/src/data/current.json +3 -9
  39. package/src/data/site.json +3 -3
  40. package/src/html/component-a-z_listing.html +13 -41
  41. package/src/html/component-abstract.html +536 -40
  42. package/src/html/component-accordion.html +537 -41
  43. package/src/html/component-banner.html +537 -40
  44. package/src/html/component-banner_advanced.html +14 -41
  45. package/src/html/component-banner_basic.html +13 -40
  46. package/src/html/component-banner_intermediate.html +14 -41
  47. package/src/html/component-basic_search.html +10 -26
  48. package/src/html/component-body.html +541 -52
  49. package/src/html/component-breadcrumbs.html +538 -43
  50. package/src/html/component-btn.html +471 -69
  51. package/src/html/component-callout.html +536 -40
  52. package/src/html/component-card_feature.html +282 -312
  53. package/src/html/component-card_multi_action.html +651 -217
  54. package/src/html/component-card_no_action.html +163 -289
  55. package/src/html/component-card_single_action.html +283 -312
  56. package/src/html/component-code.html +13 -40
  57. package/src/html/component-file_upload.html +13 -41
  58. package/src/html/component-footer.html +537 -41
  59. package/src/html/component-forms.html +206 -72
  60. package/src/html/component-global-elements.html +720 -152
  61. package/src/html/component-global_alert.html +536 -41
  62. package/src/html/component-header.html +537 -42
  63. package/src/html/component-horizontal_rule.html +459 -65
  64. package/src/html/component-in_page_navigation.html +544 -48
  65. package/src/html/component-internal_navigation.html +537 -41
  66. package/src/html/component-left_hand_navigation.html +13 -41
  67. package/src/html/component-loading_spinner.html +13 -42
  68. package/src/html/component-main_navigation.html +537 -41
  69. package/src/html/component-mega_main_navigation.html +537 -42
  70. package/src/html/component-multi_column.html +536 -40
  71. package/src/html/component-overflow_menu.html +12 -35
  72. package/src/html/component-page_alert.html +536 -40
  73. package/src/html/component-page_footer_info.html +583 -0
  74. package/src/html/component-pagination.html +459 -65
  75. package/src/html/component-promo_panel.html +13 -43
  76. package/src/html/component-tab.html +13 -41
  77. package/src/html/component-tag_list.html +495 -77
  78. package/src/html/component-toggle_tip.html +2 -3
  79. package/src/html/component-tool_tip.html +2 -3
  80. package/src/html/component-video_player.html +13 -41
  81. package/src/html/components.html +306 -88
  82. package/src/html/home.html +1807 -628
  83. package/src/html/index.html +9 -22
  84. package/src/html/inner-with-nav.html +551 -137
  85. package/src/html/inner.html +570 -59
  86. package/src/stories/Checkboxes/Checkboxes.js +41 -0
  87. package/src/stories/Checkboxes/Checkboxes.mdx +45 -0
  88. package/src/stories/Checkboxes/Checkboxes.stories.js +209 -0
  89. package/src/stories/RadioButtons/RadioButtons.js +41 -0
  90. package/src/stories/RadioButtons/RadioButtons.mdx +45 -0
  91. package/src/stories/RadioButtons/RadioButtons.stories.js +209 -0
  92. package/src/styles/imports/mixins.scss +5 -43
  93. package/src/components/updated_date/css/component.scss +0 -24
  94. package/src/components/updated_date/js/manifest.json +0 -9
  95. package/src/components/widgets/css/component.scss +0 -130
  96. package/src/components/widgets/html/component.hbs +0 -8
  97. package/src/components/widgets/html/default.html +0 -3
  98. package/src/components/widgets/js/current.json +0 -471
  99. package/src/components/widgets/js/manifest.json +0 -9
  100. package/src/components/widgets/js/site.json +0 -350
  101. package/src/html/component-updated_date.html +0 -88
  102. package/src/html/component-widgets.html +0 -90
  103. /package/src/components/{updated_date → prefooter}/html/component.hbs +0 -0
@@ -1,7 +1,7 @@
1
1
 
2
2
  {{#with component.data.metadata}}
3
3
  {{#if code.value}}
4
- <section class="qld__body">
4
+ <section class="qld__body" data-path="{{@root.site.metadata.coreSiteIcons.value}}">
5
5
  <div class="container-fluid">
6
6
  {{#ifCond code_snippet_type.value '==' 'singleline'}}
7
7
  {{#ifCond show_code.value '==' 'true'}}
@@ -16,10 +16,12 @@
16
16
  <code class="qld__code-body">{{code.value}}</code>
17
17
  <button class="qld__btn qld__code-copy--button" type="button">
18
18
  <div class="clean">
19
- <i class="fa-light fa-copy"></i><span class="qld__code-copy--button-text">Copy</span>
19
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#copy"></use></svg>
20
+ <span class="qld__code-copy--button-text">Copy</span>
20
21
  </div>
21
22
  <div class="dirty">
22
- <i class="fa-solid fa-circle-check"></i><span class="qld__code-copy--button-text">Copied</span>
23
+ <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#status-success"></use></svg>
24
+ <span class="qld__code-copy--button-text">Copied</span>
23
25
  </div>
24
26
  <div class="qld__code-tooltip">
25
27
  <span class="clean">Copy</span>
@@ -77,7 +79,10 @@
77
79
  {{#ifCond show_code.value '==' 'true'}}
78
80
  {{#ifCond show_more_button.value '==' 'true'}}
79
81
  <div class="qld__code-toggle">
80
- <button class="qld__code-toggle-button" type="button">Show more<i class="fa-regular fa-chevron-up"></i></button>
82
+ <button class="qld__code-toggle-button" type="button">
83
+ Show more
84
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#chevron-up"></use></svg>
85
+ </button>
81
86
  </div>
82
87
  {{/ifCond}}
83
88
  {{/ifCond}}
@@ -86,13 +91,22 @@
86
91
  <div class="qld__code-header">
87
92
  <div class="qld__code-header-left">
88
93
  {{#if github_link.value}}
89
- <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">Github<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
94
+ <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">
95
+ <span>Github</span>
96
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
97
+ </a>
90
98
  {{/if}}
91
99
  {{#if figma_link.value}}
92
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">Figma<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
100
+ <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
101
+ <span>Figma</span>
102
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
103
+ </a>
93
104
  {{/if}}
94
105
  {{#if action_link_title.value}}
95
- <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">{{action_link_title.value}}<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
106
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
107
+ <span>{{action_link_title.value}}</span>
108
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
109
+ </a>
96
110
  {{/if}}
97
111
  </div>
98
112
  </div>
@@ -100,27 +114,45 @@
100
114
  <div class="qld__code-header">
101
115
  <div class="qld__code-header-left">
102
116
  {{#if github_link.value}}
103
- <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">Github<i class="fa-regular fa-arrow-up-right-from-square" ></i></a>
117
+ <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">
118
+ <span>Github</span>
119
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
120
+ </a>
104
121
  {{/if}}
105
122
  {{#if figma_link.value}}
106
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">Figma<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
123
+ <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
124
+ <span>Figma</span>
125
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
126
+ </a>
107
127
  {{/if}}
108
128
  {{#if action_link_title.value}}
109
- <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">{{action_link_title.value}}<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
129
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
130
+ <span>{{action_link_title.value}}</span>
131
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
132
+ </a>
110
133
  {{/if}}
111
134
  </div>
112
135
  </div>
113
- {{else if figma_link.value}}
136
+ {{else if action_link_title.value}}
114
137
  <div class="qld__code-header">
115
138
  <div class="qld__code-header-left">
116
139
  {{#if github_link.value}}
117
- <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">Github<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
140
+ <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">
141
+ <span>Github</span>
142
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
143
+ </a>
118
144
  {{/if}}
119
145
  {{#if figma_link.value}}
120
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">Figma<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
146
+ <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
147
+ <span>Figma</span>
148
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
149
+ </a>
121
150
  {{/if}}
122
151
  {{#if action_link_title.value}}
123
- <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">{{action_link_title.value}}<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
152
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
153
+ <span>{{action_link_title.value}}</span>
154
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
155
+ </a>
124
156
  {{/if}}
125
157
  </div>
126
158
  </div>
@@ -129,23 +161,34 @@
129
161
  <div class="qld__code-header">
130
162
  <div class="qld__code-header-left">
131
163
  {{#if github_link.value}}
132
- <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">Github<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
164
+ <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">
165
+ <span>Github</span>
166
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
167
+ </a>
133
168
  {{/if}}
134
169
  {{#if figma_link.value}}
135
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">Figma<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
170
+ <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
171
+ <span>Figma</span>
172
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
173
+ </a>
136
174
  {{/if}}
137
175
  {{#if action_link_title.value}}
138
- <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">{{action_link_title.value}}<i class="fa-regular fa-arrow-up-right-from-square"></i></a>
176
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
177
+ <span>{{action_link_title.value}}</span>
178
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#external-link"></use></svg>
179
+ </a>
139
180
  {{/if}}
140
181
  </div>
141
182
  {{#ifCond show_code.value '==' 'true'}}
142
183
  <div class="qld__code-header-right">
143
184
  <button class="qld__btn qld__code-copy--button" type="button">
144
185
  <div class="clean">
145
- <i class="fa-light fa-copy"></i><span class="qld__code-copy--button-text">Copy</span>
186
+ <svg class="qld__icon qld__icon--sm" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#copy"></use></svg>
187
+ <span class="qld__code-copy--button-text">Copy</span>
146
188
  </div>
147
189
  <div class="dirty">
148
- <i class="fa-solid fa-circle-check"></i><span class="qld__code-copy--button-text">Copied</span>
190
+ <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#status-success"></use></svg>
191
+ <span class="qld__code-copy--button-text">Copied</span>
149
192
  </div>
150
193
  <div class="qld__code-tooltip">
151
194
  <span class="clean">Copy</span>
@@ -4,23 +4,23 @@
4
4
  */
5
5
  var code = {};
6
6
 
7
- code.init = function() {
8
- const codes = document.querySelectorAll('code')
9
- const inlinecodes = document.querySelectorAll('code:not(.qld__code-body)')
10
- const copyButtons = document.querySelectorAll('.qld__code-copy--button')
11
- const showToggle = document.querySelectorAll('.qld__code-toggle-button')
12
- const colorButtons = document.querySelectorAll('.qld__code-preview-colours input[type=radio]')
7
+ code.init = function () {
8
+ const codes = document.querySelectorAll("code");
9
+ const inlinecodes = document.querySelectorAll("code:not(.qld__code-body)");
10
+ const copyButtons = document.querySelectorAll(".qld__code-copy--button");
11
+ const showToggle = document.querySelectorAll(".qld__code-toggle-button");
12
+ const colorButtons = document.querySelectorAll(".qld__code-preview-colours input[type=radio]");
13
13
 
14
14
  if (codes.length) {
15
- codes.forEach(function(code) {
16
- code.innerHTML = Prism.highlight(code.innerText, Prism.languages.html, 'html')
17
- })
15
+ codes.forEach(function (code) {
16
+ code.innerHTML = Prism.highlight(code.innerText, Prism.languages.html, "html");
17
+ });
18
18
  }
19
19
 
20
20
  if (inlinecodes.length) {
21
- inlinecodes.forEach(function(inlinecode){
21
+ inlinecodes.forEach(function (inlinecode) {
22
22
  const codeWrap = document.createElement("div");
23
- codeWrap.classList.add('qld__code--inline');
23
+ codeWrap.classList.add("qld__code--inline");
24
24
 
25
25
  inlinecode.replaceWith(codeWrap);
26
26
  codeWrap.appendChild(inlinecode);
@@ -28,133 +28,149 @@
28
28
  const tooltip = document.createElement("span");
29
29
  const tooltipText = document.createTextNode("Copy");
30
30
  tooltip.appendChild(tooltipText);
31
- tooltip.classList.add('qld__code-tooltip');
31
+ tooltip.classList.add("qld__code-tooltip");
32
32
  inlinecode.after(tooltip);
33
- inlinecode.setAttribute('tabindex', 0);
33
+ inlinecode.setAttribute("tabindex", 0);
34
34
 
35
- inlinecode.addEventListener('click', function () {
35
+ inlinecode.addEventListener("click", function () {
36
36
  copyButtonAction(this);
37
- })
37
+ });
38
38
 
39
- inlinecode.addEventListener("keypress", function(event) {
39
+ inlinecode.addEventListener("keypress", function (event) {
40
40
  if (event.key === "Enter") {
41
41
  event.preventDefault();
42
42
  copyButtonAction(this);
43
43
  }
44
44
  });
45
- })
45
+ });
46
46
  }
47
-
47
+
48
48
  if (copyButtons.length) {
49
- copyButtons.forEach(function(copyButton){
50
- copyButton.addEventListener('click', function () {
49
+ copyButtons.forEach(function (copyButton) {
50
+ copyButton.addEventListener("click", function () {
51
51
  copyButtonAction(this);
52
- })
53
- })
52
+ });
53
+ });
54
54
  }
55
55
 
56
56
  if (showToggle.length) {
57
- showToggle.forEach(function(showToggleButton){
58
- const parent = showToggleButton.closest('.qld__code');
59
- const target = parent.querySelector('code')
60
- target.style.height = '120px'
61
-
62
- showToggleButton.addEventListener('click', function () {
63
- if (this.innerText.indexOf('more') > -1) {
64
- this.innerHTML = 'Show less<i class="fa-regular fa-chevron-up"></i>'
65
- } else {
66
- this.innerHTML = 'Show more<i class="fa-regular fa-chevron-up"></i>'
67
- }
57
+ showToggle.forEach(function (showToggleButton) {
58
+ const parent = showToggleButton.closest(".qld__code");
59
+ const grandParent = parent.closest("section");
60
+ const svgPath = grandParent.getAttribute("data-path");
61
+ const target = parent.querySelector("code");
62
+ target.style.height = "120px";
63
+
64
+ // Create <svg>
65
+ const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
66
+ svg.setAttribute("class", "qld__icon qld__icon--sm");
67
+ svg.setAttribute("aria-hidden", "true");
68
+ svg.setAttribute("xmlns", "http://www.w3.org/2000/svg");
69
+
70
+ // Create <use>
71
+ const use = document.createElementNS("http://www.w3.org/2000/svg", "use");
72
+ use.setAttributeNS(null, "href", `${svgPath}#chevron-up`);
73
+
74
+ showToggleButton.addEventListener("click", function () {
75
+ // Update button text
76
+ showToggleButton.innerText = this.innerText.indexOf("more") > -1 ? "Show less" : "Show more";
77
+
78
+ // Append <use> to <svg>
79
+ svg.appendChild(use);
80
+ showToggleButton.appendChild(svg);
68
81
 
69
82
  QLD.animate.Toggle({
70
83
  element: target,
71
- property: 'height',
84
+ property: "height",
72
85
  speed: 250,
73
86
  closeSize: 120,
74
87
  prefunction: function () {
75
- parent.classList.toggle('show_less')
76
- }
77
- })
78
- })
79
- })
88
+ parent.classList.toggle("show_less");
89
+ },
90
+ });
91
+ });
92
+ });
80
93
  }
81
94
 
82
95
  if (colorButtons.length) {
83
- colorButtons.forEach(function(colorButton){
84
- colorButton.addEventListener('change', function () {
85
- const body = colorButton.closest('.qld__code').querySelector('.qld__code-preview-body')
86
- body.classList.remove('qld__body--light','qld__body--alt','qld__body--dark','qld__body--dark-alt')
87
- if (this.value){
88
- body.classList.add(this.value)
96
+ colorButtons.forEach(function (colorButton) {
97
+ colorButton.addEventListener("change", function () {
98
+ const body = colorButton.closest(".qld__code").querySelector(".qld__code-preview-body");
99
+ body.classList.remove("qld__body--light", "qld__body--alt", "qld__body--dark", "qld__body--dark-alt");
100
+ if (this.value) {
101
+ body.classList.add(this.value);
89
102
  }
90
- const toggle = colorButton.closest('.qld__code').querySelector('.qld__code-toggle')
91
- if (typeof(toggle)!=='undefined'){
92
- toggle.classList.remove('qld__body--light','qld__body--alt','qld__body--dark','qld__body--dark-alt')
93
- if (this.value){
94
- toggle.classList.add(this.value)
103
+ const toggle = colorButton.closest(".qld__code").querySelector(".qld__code-toggle");
104
+ if (typeof toggle !== "undefined") {
105
+ toggle.classList.remove("qld__body--light", "qld__body--alt", "qld__body--dark", "qld__body--dark-alt");
106
+ if (this.value) {
107
+ toggle.classList.add(this.value);
95
108
  }
96
109
  }
97
- })
98
- })
110
+ });
111
+ });
99
112
  }
100
- }
113
+ };
101
114
 
102
115
  function copyButtonAction(button) {
103
- if (button.classList.contains('qld__code-copy--button')){
104
- const parent = button.closest('.qld__code');
105
- copyTextToClipboard(parent.querySelector('code').innerText)
106
- button.classList.add('copied');
116
+ if (button.classList.contains("qld__code-copy--button")) {
117
+ const parent = button.closest(".qld__code");
118
+ copyTextToClipboard(parent.querySelector("code").innerText);
119
+ button.classList.add("copied");
107
120
 
108
121
  setTimeout(() => {
109
- button.classList.remove('copied')
110
- }, "1500")
122
+ button.classList.remove("copied");
123
+ }, "1500");
111
124
  } else {
112
125
  copyTextToClipboard(button.innerText);
113
- button.nextElementSibling.innerText = "Copied"
114
- button.addEventListener('blur', function() {
115
- button.nextElementSibling.innerText = "Copy"
126
+ button.nextElementSibling.innerText = "Copied";
127
+ button.addEventListener("blur", function () {
128
+ button.nextElementSibling.innerText = "Copy";
116
129
  });
117
130
  }
118
131
  }
119
132
 
120
133
  function fallbackCopyTextToClipboard(text) {
121
- const textArea = document.createElement("textarea")
134
+ const textArea = document.createElement("textarea");
122
135
  textArea.value = text;
123
-
136
+
124
137
  // Avoid scrolling to bottom
125
- textArea.style.top = "0"
126
- textArea.style.left = "0"
127
- textArea.style.position = "fixed"
128
-
129
- document.body.appendChild(textArea)
130
- textArea.focus()
131
- textArea.select()
132
-
138
+ textArea.style.top = "0";
139
+ textArea.style.left = "0";
140
+ textArea.style.position = "fixed";
141
+
142
+ document.body.appendChild(textArea);
143
+ textArea.focus();
144
+ textArea.select();
145
+
133
146
  try {
134
- const successful = document.execCommand('copy')
135
- const msg = successful ? 'successful' : 'unsuccessful';
136
- console.log('Fallback: Copying text command was ' + msg)
147
+ const successful = document.execCommand("copy");
148
+ const msg = successful ? "successful" : "unsuccessful";
149
+ console.log("Fallback: Copying text command was " + msg);
137
150
  } catch (err) {
138
- console.error('Fallback: Oops, unable to copy', err)
151
+ console.error("Fallback: Oops, unable to copy", err);
139
152
  }
140
-
141
- document.body.removeChild(textArea)
153
+
154
+ document.body.removeChild(textArea);
142
155
  }
143
156
 
144
157
  function copyTextToClipboard(text) {
145
158
  if (!navigator.clipboard) {
146
- fallbackCopyTextToClipboard(text)
159
+ fallbackCopyTextToClipboard(text);
147
160
  return;
148
161
  }
149
- navigator.clipboard.writeText(text).then(function() {
150
- console.log('Async: Copying to clipboard was successful!')
151
- }, function(err) {
152
- console.error('Async: Could not copy text: ', err)
153
- });
162
+ navigator.clipboard.writeText(text).then(
163
+ function () {
164
+ console.log("Async: Copying to clipboard was successful!");
165
+ },
166
+ function (err) {
167
+ console.error("Async: Could not copy text: ", err);
168
+ },
169
+ );
154
170
  }
155
171
 
156
172
  QLD.code = code;
157
173
 
158
174
  // Init In Page Nav on document load
159
- document.addEventListener('DOMContentLoaded', QLD.code.init)
160
- }());
175
+ document.addEventListener("DOMContentLoaded", QLD.code.init);
176
+ })();
@@ -407,11 +407,9 @@
407
407
  }
408
408
  }
409
409
 
410
- .qld__footer__cta__icon {
410
+ svg.qld__icon {
411
411
  color: var(--QLD-color-dark__action--secondary);
412
- text-align: middle;
413
- line-height: 1;
414
- height: 0.875rem;
412
+ font-size: 1.25rem;
415
413
  }
416
414
 
417
415
  a.qld__footer__clickable__link {
@@ -30,9 +30,12 @@
30
30
  {{/if}}
31
31
  {{#if footerCTAContact.value}}
32
32
  <p class="qld__footer__cta-content">
33
- {{#if footerCTAContactIcon.value}}
34
- <i class="qld__footer__cta__icon {{footerCTAContactIcon.value}}"></i>
35
- {{/if}}
33
+ {{#ifCond footerCTAContactIcon.value '==' 'phone'}}
34
+ <svg class="qld__icon qld__icon--lead" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#phone"></use></svg>
35
+ {{/ifCond}}
36
+ {{#ifCond footerCTAContactIcon.value '==' 'email'}}
37
+ <svg class="qld__icon qld__icon--lead" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#Email"></use></svg>
38
+ {{/ifCond}}
36
39
  {{{footerCTAContact.value}}}
37
40
  </p>
38
41
  {{/if}}
@@ -113,19 +116,19 @@
113
116
  <a class="qld__footer__clickable__link" href="{{urldecode (lookup this 'asset_url^urlencode')}}">
114
117
  {{/ifCond}}
115
118
  {{#ifCond (lookup this 'asset_short_name^escapequotes') 'contains' 'facebook'}}
116
- <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" ><use href="{{@root.site.metadata.coreSiteIcons.value}}#Facebook"></use></svg>
119
+ <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#Facebook"></use></svg>
117
120
  {{/ifCond}}
118
121
  {{#ifCond (lookup this 'asset_short_name^escapequotes') 'contains' 'linkedin'}}
119
- <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" ><use href="{{@root.site.metadata.coreSiteIcons.value}}#LinkedIn"></use></svg>
122
+ <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#LinkedIn"></use></svg>
120
123
  {{/ifCond}}
121
124
  {{#ifCond (lookup this 'asset_short_name^escapequotes') 'contains' 'youtube'}}
122
- <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" ><use href="{{@root.site.metadata.coreSiteIcons.value}}#YouTube"></use></svg>
125
+ <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#YouTube"></use></svg>
123
126
  {{/ifCond}}
124
127
  {{#ifCond (lookup this 'asset_short_name^escapequotes') 'contains' 'instagram'}}
125
- <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" ><use href="{{@root.site.metadata.coreSiteIcons.value}}#Instagram"></use></svg>
128
+ <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#Instagram"></use></svg>
126
129
  {{/ifCond}}
127
130
  {{#ifCond (lookup this 'asset_short_name^escapequotes') 'contains' 'twitter'}}
128
- <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" ><use href="{{@root.site.metadata.coreSiteIcons.value}}#X"></use></svg>
131
+ <svg class="qld__icon qld__icon--md" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#X"></use></svg>
129
132
  {{/ifCond}}
130
133
  <span class="qld__footer__social__label">{{lookup this 'asset_short_name^escapequotes'}}</span>
131
134
  </a>
@@ -134,7 +134,7 @@
134
134
  .qld__header__cta-link {
135
135
  @include QLD-fontgrid(xs);
136
136
  color: var(--QLD-color-light__link);
137
- @include QLD-space(padding-left, 0.75unit);
137
+ @include QLD-space(margin-left, 0.75unit);
138
138
  align-items: center;
139
139
 
140
140
  &:hover {
@@ -152,8 +152,7 @@
152
152
  color: var(--QLD-color-light__action--secondary);
153
153
  text-align: center;
154
154
 
155
- svg,
156
- i {
155
+ svg {
157
156
  height: 100%;
158
157
  width: 100%;
159
158
  }
@@ -163,8 +162,6 @@
163
162
  a {
164
163
  color: var(--QLD-color-dark__text);
165
164
  display: flex;
166
-
167
- @include QLD-focus();
168
165
  }
169
166
 
170
167
  .qld__header__main-nav-controls {
@@ -192,7 +189,7 @@
192
189
  cursor: pointer;
193
190
  align-items: center;
194
191
  color: var(--QLD-color-light__link);
195
- @include QLD-focus();
192
+ @include QLD-focus("light", false, -3px);
196
193
  border-left: solid $QLD-border-width-thin $QLD-color-neutral--lighter;
197
194
 
198
195
  &:hover {
@@ -238,9 +235,11 @@
238
235
  }
239
236
 
240
237
  //Dark theme
241
- &.qld__header__pre-header--dark {
238
+ &.qld__header__pre-header--dark,
239
+ &.qld__header__pre-header--dark-alt {
242
240
  background-color: var(--QLD-color-dark__background);
243
241
  color: var(--QLD-color-dark__text);
242
+ @include QLD-focus("dark");
244
243
 
245
244
  .qld__header__pre-header-url {
246
245
  color: var(--QLD-color-dark__link);
@@ -269,11 +268,12 @@
269
268
  }
270
269
 
271
270
  .qld__header__toggle-main-nav {
271
+ @include QLD-focus("dark", false, -3px);
272
272
  color: var(--QLD-color-dark__link);
273
273
  border-color: var(--QLD-color-dark__border);
274
+ @include QLD-focus("dark");
274
275
 
275
- svg,
276
- i {
276
+ svg {
277
277
  color: var(--QLD-color-dark__action--secondary);
278
278
  }
279
279
 
@@ -319,11 +319,11 @@
319
319
  }
320
320
 
321
321
  .qld__header__toggle-main-nav {
322
+ @include QLD-focus("dark", false, -3px);
322
323
  color: var(--QLD-color-dark__link);
323
324
  border-color: var(--QLD-color-dark__border);
324
325
 
325
- svg,
326
- i {
326
+ svg {
327
327
  color: var(--QLD-color-dark__action--secondary);
328
328
  }
329
329
 
@@ -10,7 +10,7 @@
10
10
  </nav>
11
11
  <div class="qld__header__pre-header {{site.metadata.sitePreHeaderTheme.value}}">
12
12
  <div class="container-fluid">
13
- <a href="{{#if site.metadata.sitePreHeaderURL.value}}{{site.metadata.sitePreHeaderURL.value}}{{else}}./?a={{site.data.assetid}}{{/if}}" >
13
+ <a href="{{#if site.metadata.sitePreHeaderURL.value}}{{site.metadata.sitePreHeaderURL.value}}{{else}}./?a={{site.data.assetid}}{{/if}}">
14
14
  <span class="qld__header__pre-header-url">{{site.metadata.sitePreHeaderText.value}}</span>
15
15
  {{#if site.metadata.sitePreHeaderLogo.value}}
16
16
  <img
@@ -29,7 +29,7 @@
29
29
  <a class="qld__header__cta-link" href="./?a={{site.metadata.mainNavCtaOne.value}}">
30
30
  {{#if site.metadata.mainNavCtaOneIcon.value}}
31
31
  <span class="qld__header__cta-link-icon">
32
- <i class="{{site.metadata.mainNavCtaOneIcon.value}}"></i>
32
+ <svg class="qld__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#{{site.metadata.mainNavCtaOneIcon.value}}"></use></svg>
33
33
  </span>
34
34
  {{/if}}
35
35
  <span class="qld__header__cta-link-text">{{site.metadata.mainNavCtaOneText.value}}</span>
@@ -39,7 +39,7 @@
39
39
  <a class="qld__header__cta-link" href="./?a={{site.metadata.mainNavCtaTwo.value}}">
40
40
  {{#if site.metadata.mainNavCtaTwoIcon.value}}
41
41
  <span class="qld__header__cta-link-icon">
42
- <i class="{{site.metadata.mainNavCtaTwoIcon.value}}"></i>
42
+ <svg class="qld__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><use href="{{@root.site.metadata.coreSiteIcons.value}}#{{site.metadata.mainNavCtaTwoIcon.value}}"></use></svg>
43
43
  </span>
44
44
  {{/if}}
45
45
  <span class="qld__header__cta-link-text">{{site.metadata.mainNavCtaTwoText.value}}</span>