@qhealth-design-system/core 1.18.4 → 1.19.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 (90) hide show
  1. package/.storybook/assets/accordion-js.js +344 -0
  2. package/.storybook/assets/animate-js.js +247 -0
  3. package/.storybook/assets/index.js +15 -0
  4. package/.storybook/globals.js +39 -41
  5. package/.storybook/main.js +4 -3
  6. package/.storybook/preview.js +11 -13
  7. package/CHANGELOG.md +2 -0
  8. package/README.md +1 -1
  9. package/package.json +10 -15
  10. package/src/component-loader.js +23 -0
  11. package/src/components/_global/css/body/component.scss +3 -3
  12. package/src/components/_global/css/btn/component.scss +1 -1
  13. package/src/components/_global/css/cta_links/component.scss +2 -2
  14. package/src/components/_global/css/example/component.scss +11 -19
  15. package/src/components/_global/css/forms/control_inputs/component.scss +2 -2
  16. package/src/components/_global/css/forms/general/component.scss +5 -5
  17. package/src/components/_global/css/headings/component.scss +42 -44
  18. package/src/components/_global/css/img/images.scss +20 -36
  19. package/src/components/_global/css/link_columns/component.scss +2 -2
  20. package/src/components/_global/css/modal/component.scss +20 -26
  21. package/src/components/_global/css/table/component.scss +14 -21
  22. package/src/components/_global/css/tabs/component.scss +2 -2
  23. package/src/components/_global/css/tags/component.scss +1 -1
  24. package/src/components/_global/css/toggle_and_tool_tip/component.scss +3 -3
  25. package/src/components/_global/js/global.js +1 -1
  26. package/src/components/_global/js/select_boxes/global.js +26 -35
  27. package/src/components/accordion/css/component.scss +289 -326
  28. package/src/components/banner/css/component.scss +77 -173
  29. package/src/components/banner/html/component.hbs +2 -4
  30. package/src/components/banner_advanced/html/component.hbs +2 -2
  31. package/src/components/banner_advanced/js/manifest.json +1422 -1386
  32. package/src/components/basic_search/css/component.scss +13 -14
  33. package/src/components/basic_search/html/component.hbs +11 -20
  34. package/src/components/breadcrumbs/js/global.js +6 -1
  35. package/src/components/callout/css/component.scss +37 -40
  36. package/src/components/card_feature/css/component.scss +28 -167
  37. package/src/components/card_multi_action/css/component.scss +46 -58
  38. package/src/components/code/css/component.scss +3 -3
  39. package/src/components/code/html/component.hbs +12 -12
  40. package/src/components/code/js/global.js +6 -1
  41. package/src/components/file_upload/css/component.scss +5 -5
  42. package/src/components/file_upload/js/global.js +46 -43
  43. package/src/components/footer/css/component.scss +3 -3
  44. package/src/components/global_alert/css/component.scss +8 -14
  45. package/src/components/global_alert/html/component.hbs +3 -3
  46. package/src/components/header/css/component.scss +16 -4
  47. package/src/components/header/html/component.hbs +3 -2
  48. package/src/components/in_page_navigation/css/component.scss +14 -16
  49. package/src/components/in_page_navigation/js/global.js +48 -58
  50. package/src/components/internal_navigation/css/component.scss +3 -3
  51. package/src/components/internal_navigation/js/global.js +27 -35
  52. package/src/components/left_hand_navigation/css/component.scss +8 -2
  53. package/src/components/main_navigation/css/component.scss +16 -7
  54. package/src/components/main_navigation/html/component.hbs +1 -0
  55. package/src/components/mega_main_navigation/css/component.scss +5 -5
  56. package/src/components/mega_main_navigation/html/component.hbs +1 -0
  57. package/src/components/pagination/css/component.scss +32 -28
  58. package/src/components/pagination/html/component.hbs +37 -40
  59. package/src/components/promo_panel/css/component.scss +1 -4
  60. package/src/components/promo_panel/html/component.hbs +11 -5
  61. package/src/components/promo_panel/js/global.js +24 -39
  62. package/src/components/promo_panel/js/manifest.json +8 -0
  63. package/src/components/tab/css/component.scss +3 -3
  64. package/src/components/toggle_tip/css/component.scss +1 -1
  65. package/src/components/tool_tip/css/component.scss +1 -1
  66. package/src/components/video_player/js/global.js +16 -13
  67. package/src/data/current.json +33 -1
  68. package/src/helpers/global-helpers.js +56 -0
  69. package/src/html/component-in_page_navigation.html +2 -2
  70. package/src/index.js +4 -8
  71. package/src/stories/BackToTop/BackToTop.mdx +3 -21
  72. package/src/stories/CTALink/CTALink.mdx +1 -4
  73. package/src/stories/Checkboxes/Checkboxes.mdx +1 -4
  74. package/src/stories/DirectionLinks/DirectionLinks.mdx +1 -4
  75. package/src/stories/InPageAlert/InPageAlert.mdx +1 -4
  76. package/src/stories/Introduction.mdx +9 -5
  77. package/src/stories/LinkColumns/LinkColumns.mdx +1 -4
  78. package/src/stories/Pagination/Pagination.mdx +26 -0
  79. package/src/stories/Pagination/Pagination.stories.js +257 -0
  80. package/src/stories/PromoPanel/PromoPanel.mdx +26 -0
  81. package/src/stories/PromoPanel/PromoPanel.stories.js +219 -0
  82. package/src/stories/RadioButtons/RadioButtons.mdx +1 -4
  83. package/src/stories/SelectBox/SelectBox.mdx +1 -4
  84. package/src/stories/Tags/Tags.js +3 -3
  85. package/src/stories/Tags/Tags.mdx +1 -4
  86. package/src/stories/VideoPlayer/VideoPlayer.mdx +3 -28
  87. package/src/stories/VideoPlayer/VideoPlayer.stories.js +19 -46
  88. package/src/styles/imports/utilities.scss +3 -3
  89. package/src/styles/imports/variables.scss +5 -0
  90. package/src/stories/VideoPlayer/VideoPlayer.js +0 -0
@@ -2,150 +2,7 @@
2
2
  // Feature card
3
3
  //--------------------------------------------------------------------------------------------------------------------------------------------------------------
4
4
 
5
- // .qld__card.qld__card__multi-action{
6
- // @include QLD-box-shadow(2);
7
-
8
- // @include QLD-media(lg) {
9
- // box-shadow: none;
10
- // }
11
- // .qld__card__inner{
12
- // .qld__card__title{
13
- // @include QLD-fontgrid(lg, heading);
14
- // }
15
- // }
16
-
17
- // //Card Icon
18
- // &.qld__card--icon {
19
- // .qld__card__icon{
20
- // i,
21
- // svg{
22
- // color: var(--QLD-color-light__action--secondary);
23
- // }
24
- // }
25
- // &:hover{
26
- // .qld__card__icon{
27
- // i,
28
- // svg{
29
- // color: var(--QLD-color-light__action--secondary-hover);
30
- // }
31
- // }
32
- // }
33
- // }
34
-
35
- // .qld__card--clickable__link{
36
- // color: var(--QLD-color-light__link);
37
- // text-decoration: none;
38
- // &:hover{
39
- // text-decoration: underline;
40
- // color: var(--QLD-color-light__link);
41
- // }
42
- // }
43
- // .qld__card__image-link {
44
- // display: flex;
45
- // position: relative;
46
- // @include QLD-space(border-radius, 0 0 3.75unit 0);
47
- // max-width: 100%;
48
-
49
- // &::before {
50
- // content: "";
51
- // background-color: var(--QLD-color-dark__background);
52
- // display: block;
53
- // width: 100%;
54
- // height: 100%;
55
- // position: absolute;
56
- // opacity: 0;
57
- // transition: opacity 0.2s ease;
58
- // border-radius: 0px 0px 6.0882800608828%/10.81081081081081% 0px;
59
- // z-index: 1;
60
- // }
61
-
62
- // &:hover,
63
- // &:focus {
64
- // &::before {
65
- // opacity: 0.1;
66
- // }
67
- // }
68
- // }
69
-
70
- // .qld__card__footer-inner{
71
- // display: flex;
72
- // flex-direction: column;
73
-
74
- // .qld__link-list{
75
- // @include QLD-space(padding, 0unit);
76
-
77
- // li{
78
- // @include QLD-space(margin, .75unit 0 0 0);
79
- // @include QLD-space(padding, 0);
80
-
81
- // &:first-of-type{
82
- // @include QLD-space(margin-top, 0);
83
- // }
84
- // }
85
- // }
86
- // .qld__tag-list{
87
- // @include QLD-space(margin, -.50unit 0unit 0unit 0unit);
88
-
89
- // }
90
- // }
91
-
92
- // .qld__card__footer-link-icon{
93
- // @include QLD-space(font-size, 1.25unit);
94
- // @include QLD-space(margin-right, .5unit);
95
- // color: var(--QLD-color-light__action--secondary);
96
- // vertical-align: middle;
97
- // }
98
-
99
- // .qld__card__footer-link{
100
- // @include QLD-space(font-size, 1unit);
101
- // font-weight: bold;
102
-
103
- // &:hover{
104
- // .qld__card__footer-link-icon{
105
- // color: var(--QLD-color-light__action--secondary-hover);
106
- // }
107
- // }
108
- // }
109
-
110
- // &.qld__card--dark,
111
- // &.qld__card--dark-alt{
112
- // .qld__card--clickable__link{
113
- // color: var(--QLD-color-dark__link);
114
- // }
115
-
116
- // //Card Icon
117
- // &.qld__card--icon {
118
- // .qld__card__icon{
119
- // i,
120
- // svg{
121
- // color: var(--QLD-color-dark__action--secondary);
122
- // }
123
- // }
124
- // &:hover{
125
- // .qld__card__icon{
126
- // i,
127
- // svg{
128
- // color: var(--QLD-color-dark__action--secondary-hover);
129
- // }
130
- // }
131
- // }
132
- // }
133
-
134
- // .qld__card__footer-link-icon{
135
- // color: var(--QLD-color-dark__action--secondary);
136
- // }
137
-
138
- // .qld__card__footer-link{
139
- // &:hover{
140
- // .qld__card__footer-link-icon{
141
- // color: var(--QLD-color-dark__action--secondary-hover);
142
- // }
143
- // }
144
- // }
145
- // }
146
- // }
147
-
148
- .qld__card.qld__card__multi-action.qld__card__multi-action--feature{
5
+ .qld__card.qld__card__multi-action.qld__card__multi-action--feature {
149
6
  @include QLD-media(md) {
150
7
  flex-direction: row;
151
8
  @include QLD-space(min-height, 18.75unit);
@@ -155,7 +12,7 @@
155
12
  }
156
13
 
157
14
  .qld__card__image-wrapper,
158
- .qld__card__image-link{
15
+ .qld__card__image-link {
159
16
  @include QLD-media(md) {
160
17
  flex: 1;
161
18
  @include QLD-space(padding-bottom, 0unit);
@@ -173,7 +30,7 @@
173
30
  }
174
31
  }
175
32
 
176
- .qld__card__inner{
33
+ .qld__card__inner {
177
34
  @include QLD-space(padding, 1.5unit);
178
35
  @include QLD-media(md) {
179
36
  @include QLD-space(padding, 1.25unit);
@@ -190,30 +47,25 @@
190
47
  }
191
48
  }
192
49
 
193
- .qld__card__footer{
50
+ .qld__card__footer {
194
51
  justify-content: initial;
195
52
  }
196
53
 
197
- &.qld__card__multi-action--image-right{
198
-
199
-
54
+ &.qld__card__multi-action--image-right {
200
55
  @include QLD-media(md) {
201
56
  flex-direction: row-reverse;
202
57
  }
203
58
  @include QLD-media(lg) {
204
-
205
59
  }
206
-
207
- .qld__responsive-media-img--bg{
60
+
61
+ .qld__responsive-media-img--bg {
208
62
  border-radius: 0;
209
63
 
210
64
  &::before {
211
65
  border-radius: 0;
212
66
  }
213
-
214
67
  }
215
- .qld__card__inner{
216
-
68
+ .qld__card__inner {
217
69
  .qld__card__title {
218
70
  @include QLD-space(font-size, 1.25unit);
219
71
  line-height: 1.4;
@@ -222,32 +74,41 @@
222
74
  }
223
75
  }
224
76
 
225
-
226
- /* Tag hover colour for default (light cards) */
227
- .qld__card .qld__card__footer a.qld__tag:hover, .qld__card .qld__card__footer .qld__tag.qld__tag--link:hover {
77
+ /* Tag hover colour for default (light cards) */
78
+ .qld__card .qld__card__footer a.qld__tag:hover,
79
+ .qld__card .qld__card__footer .qld__tag.qld__tag--link:hover {
228
80
  background-color: var(--QLD-color-light__action--primary-hover);
229
81
  color: var(--QLD-color-light__link--on-action);
230
82
  border-color: var(--QLD-color-light__action--primary-hover);
231
- text-decoration-color: var(--QLD-color-light__link--on-action);
83
+ text-decoration-color: var(--QLD-color-light__link--on-action);
232
84
  }
233
85
 
234
- /* New CSS this Default */
235
- .qld__card .qld__card__footer a.qld__tag, .qld__card .qld__card__footer .qld__tag.qld__tag--link:visited {
86
+ /* New CSS this Default */
87
+ .qld__card .qld__card__footer a.qld__tag,
88
+ .qld__card .qld__card__footer .qld__tag.qld__tag--link:visited {
236
89
  color: var(--QLD-color-light__link);
237
90
  }
238
91
 
239
- /* Visited link hover */
240
- .qld__card .qld__card__footer a.qld__tag:hover, .qld__card .qld__card__footer .qld__tag.qld__tag--link:visited:hover {
92
+ /* Visited link hover */
93
+ .qld__card .qld__card__footer a.qld__tag:hover,
94
+ .qld__card .qld__card__footer .qld__tag.qld__tag--link:visited:hover {
241
95
  background-color: var(--QLD-color-light__action--primary-hover);
242
96
  color: var(--QLD-color-light__link--on-action);
243
97
  border-color: var(--QLD-color-light__action--primary-hover);
244
98
  text-decoration-color: var(--QLD-color-light__link--on-action);
245
99
  }
246
100
 
247
- /* Visited link hover colour for dark cards */
248
- .qld__body--dark a.qld__tag:hover:visited, .qld__card--dark .qld__card__footer a.qld__tag:hover:visited, .qld__body--dark-alt a.qld__tag:hover:visited, .qld__card--dark-alt .qld__card__footer a.qld__tag:hover:visited, .qld__body--dark .qld__tag.qld__tag--link:hover:visited, .qld__card--dark .qld__card__footer .qld__tag.qld__tag--link:hover:visited, .qld__body--dark-alt .qld__tag.qld__tag--link:hover:visited, .qld__card--dark-alt .qld__card__footer .qld__tag.qld__tag--link:hover:visited {
101
+ /* Visited link hover colour for dark cards */
102
+ .qld__body--dark a.qld__tag:hover:visited,
103
+ .qld__card--dark .qld__card__footer a.qld__tag:hover:visited,
104
+ .qld__body--dark-alt a.qld__tag:hover:visited,
105
+ .qld__card--dark-alt .qld__card__footer a.qld__tag:hover:visited,
106
+ .qld__body--dark .qld__tag.qld__tag--link:hover:visited,
107
+ .qld__card--dark .qld__card__footer .qld__tag.qld__tag--link:hover:visited,
108
+ .qld__body--dark-alt .qld__tag.qld__tag--link:hover:visited,
109
+ .qld__card--dark-alt .qld__card__footer .qld__tag.qld__tag--link:hover:visited {
249
110
  color: var(--QLD-color-dark__link--on-action);
250
111
  -webkit-text-decoration-color: var(--QLD-color-dark__link--on-action);
251
112
  text-decoration-color: var(--QLD-color-dark__link--on-action);
252
113
  background-color: var(--QLD-color-dark__action--primary-hover);
253
- }
114
+ }
@@ -2,7 +2,7 @@
2
2
  // Multi action card
3
3
  //--------------------------------------------------------------------------------------------------------------------------------------------------------------
4
4
 
5
- .qld__card.qld__card__multi-action{
5
+ .qld__card.qld__card__multi-action {
6
6
  @include QLD-box-shadow(2);
7
7
 
8
8
  @include QLD-media(lg) {
@@ -11,19 +11,19 @@
11
11
 
12
12
  //Card Icon
13
13
  &.qld__card--icon {
14
- .qld__card__icon{
14
+ .qld__card__icon {
15
15
  i,
16
- svg{
16
+ svg {
17
17
  color: var(--QLD-color-light__action--secondary);
18
18
  }
19
- }
20
- &:hover{
21
- .qld__card__icon{
19
+ }
20
+ &:hover {
21
+ .qld__card__icon {
22
22
  i,
23
- svg{
23
+ svg {
24
24
  color: var(--QLD-color-light__action--secondary-hover);
25
25
  }
26
- }
26
+ }
27
27
  }
28
28
  }
29
29
 
@@ -80,73 +80,71 @@
80
80
  }
81
81
  }
82
82
 
83
- .qld__card__footer-inner{
83
+ .qld__card__footer-inner {
84
84
  display: flex;
85
85
  flex-direction: column;
86
86
 
87
- .qld__link-list{
87
+ .qld__link-list {
88
88
  @include QLD-space(padding, 0unit);
89
89
 
90
- li{
90
+ li {
91
91
  @include QLD-space(margin, 1unit 0 0 0);
92
- @include QLD-space(padding, 0);
92
+ @include QLD-space(padding, 0);
93
93
 
94
- &:first-of-type{
94
+ &:first-of-type {
95
95
  @include QLD-space(margin-top, 0);
96
96
  }
97
97
  }
98
98
  }
99
- .qld__tag-list{
100
- @include QLD-space(margin, -.50unit 0unit 0unit 0unit);
101
-
99
+ .qld__tag-list {
100
+ @include QLD-space(margin, -0.5unit 0unit 0unit 0unit);
102
101
  }
103
102
  }
104
103
 
105
- .qld__card__footer-link-icon{
104
+ .qld__card__footer-link-icon {
106
105
  @include QLD-space(font-size, 1.25unit);
107
- @include QLD-space(margin-right, .5unit);
106
+ @include QLD-space(margin-right, 0.5unit);
108
107
  color: var(--QLD-color-light__action--secondary);
109
108
  vertical-align: middle;
110
109
  width: 24px;
111
110
  text-decoration: none;
112
111
  }
113
112
 
114
- .qld__card__footer-link{
113
+ .qld__card__footer-link {
115
114
  color: var(--QLD-color-light__link);
116
115
  @include QLD-space(font-size, 1unit);
117
- font-weight: bold;
116
+ font-weight: $QLD-font-weight-semibold;
118
117
  display: flex;
119
118
  flex-direction: row;
120
119
  justify-content: flex-start;
121
120
  align-items: center;
122
121
  text-decoration: none;
123
-
124
- span {
125
- @include QLD-underline('light');
126
122
 
123
+ span {
124
+ @include QLD-underline("light");
127
125
  }
128
126
 
129
- &:visited{
127
+ &:visited {
130
128
  span {
131
129
  color: var(--QLD-color-light__underline--hover-visited);
132
130
  text-decoration-color: var(--QLD-color-light__underline--visited);
133
131
  }
134
132
  }
135
133
  &:hover:visited {
136
- span{
134
+ span {
137
135
  color: var(--QLD-color-light__underline--hover-visited);
138
136
  text-decoration-color: var(--QLD-color-light__underline--hover-visited);
139
137
  text-decoration-thickness: var(--QLD-underline__thickness-thick);
140
138
  }
141
139
  }
142
- &:hover{
140
+ &:hover {
143
141
  color: var(--QLD-color-light__link);
144
142
  text-decoration: none;
145
- span{
143
+ span {
146
144
  text-decoration-thickness: var(--QLD-underline__thickness-thick);
147
145
  }
148
-
149
- .qld__card__footer-link-icon{
146
+
147
+ .qld__card__footer-link-icon {
150
148
  color: var(--QLD-color-light__action--secondary-hover);
151
149
  }
152
150
  }
@@ -154,22 +152,21 @@
154
152
 
155
153
  &.qld__card--dark,
156
154
  &.qld__card--dark-alt {
157
-
158
155
  //Card Icon
159
156
  &.qld__card--icon {
160
- .qld__card__icon{
157
+ .qld__card__icon {
161
158
  i,
162
- svg{
159
+ svg {
163
160
  color: var(--QLD-color-dark__action--secondary);
164
161
  }
165
- }
166
- &:hover{
167
- .qld__card__icon{
162
+ }
163
+ &:hover {
164
+ .qld__card__icon {
168
165
  i,
169
- svg{
166
+ svg {
170
167
  color: var(--QLD-color-dark__action--secondary-hover);
171
168
  }
172
- }
169
+ }
173
170
  }
174
171
  }
175
172
 
@@ -178,7 +175,7 @@
178
175
  outline: 3px solid var(--QLD-color-dark__focus);
179
176
  }
180
177
 
181
- .qld__card__footer-link-icon{
178
+ .qld__card__footer-link-icon {
182
179
  color: var(--QLD-color-dark__action--secondary);
183
180
  }
184
181
 
@@ -186,10 +183,10 @@
186
183
  color: var(--QLD-color-dark__link);
187
184
 
188
185
  span {
189
- @include QLD-underline('dark');
186
+ @include QLD-underline("dark");
190
187
  }
191
188
 
192
- &:visited{
189
+ &:visited {
193
190
  span {
194
191
  color: var(--QLD-color-dark__underline--hover-visited);
195
192
  text-decoration-color: var(--QLD-color-dark__underline--visited);
@@ -197,7 +194,7 @@
197
194
  }
198
195
 
199
196
  &:hover:visited {
200
- span{
197
+ span {
201
198
  color: var(--QLD-color-dark__underline--hover-visited);
202
199
  text-decoration-color: var(--QLD-color-dark__underline--hover-visited);
203
200
  text-decoration-thickness: var(--QLD-underline__thickness-thick);
@@ -213,7 +210,7 @@
213
210
  }
214
211
  }
215
212
 
216
- .qld__card.qld__card__multi-action.qld__card__multi-action--feature{
213
+ .qld__card.qld__card__multi-action.qld__card__multi-action--feature {
217
214
  @include QLD-media(md) {
218
215
  flex-direction: row;
219
216
  @include QLD-space(min-height, 18.75unit);
@@ -222,8 +219,7 @@
222
219
  @include QLD-space(min-height, 27.5unit);
223
220
  }
224
221
 
225
- .qld__card__image-link{
226
-
222
+ .qld__card__image-link {
227
223
  @include QLD-media(md) {
228
224
  flex: 1;
229
225
  @include QLD-space(padding-bottom, 0unit);
@@ -234,7 +230,7 @@
234
230
  }
235
231
  }
236
232
 
237
- .qld__card__inner{
233
+ .qld__card__inner {
238
234
  @include QLD-space(padding, 1.5unit);
239
235
  @include QLD-media(md) {
240
236
  @include QLD-space(padding, 1.25unit);
@@ -251,26 +247,21 @@
251
247
  }
252
248
  }
253
249
 
254
- .qld__card__footer{
250
+ .qld__card__footer {
255
251
  justify-content: initial;
256
252
  }
257
253
 
258
- &.qld__card__multi-action--image-right{
259
-
260
-
254
+ &.qld__card__multi-action--image-right {
261
255
  @include QLD-media(md) {
262
256
  flex-direction: row-reverse;
263
257
  }
264
258
  @include QLD-media(lg) {
265
-
266
259
  }
267
-
268
- .qld__responsive-media-img--bg{
269
- border-radius: 0;
270
260
 
261
+ .qld__responsive-media-img--bg {
262
+ border-radius: 0;
271
263
  }
272
- .qld__card__inner{
273
-
264
+ .qld__card__inner {
274
265
  .qld__card__title {
275
266
  @include QLD-space(font-size, 1.25unit);
276
267
  line-height: 1.4;
@@ -278,6 +269,3 @@
278
269
  }
279
270
  }
280
271
  }
281
-
282
-
283
-
@@ -203,7 +203,7 @@
203
203
  }
204
204
 
205
205
  &-label {
206
- font-weight: 600;
206
+ font-weight: $QLD-font-weight-semibold;
207
207
  @include QLD-space("padding-right", 0.75unit);
208
208
  }
209
209
 
@@ -225,7 +225,7 @@
225
225
 
226
226
  label {
227
227
  color: var(--QLD-color-light__text);
228
- font-weight: 400;
228
+ font-weight: $QLD-font-weight-regular;
229
229
  @include QLD-space("margin", 0);
230
230
  @include QLD-space("padding-left", 2.5unit);
231
231
  }
@@ -238,7 +238,7 @@
238
238
  border-radius: $QLD-border-radius-xs $QLD-border-radius-xs 0 0;
239
239
  bottom: 100%;
240
240
  color: var(--QLD-color-dark__text);
241
- font-weight: 600;
241
+ font-weight: $QLD-font-weight-semibold;
242
242
  display: inline-block;
243
243
  position: absolute;
244
244
  @include QLD-space("font-size", 0.875unit);
@@ -91,19 +91,19 @@
91
91
  <div class="qld__code-header">
92
92
  <div class="qld__code-header-left">
93
93
  {{#if github_link.value}}
94
- <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">
94
+ <a href="{{github_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Github, opens in new tab">
95
95
  <span>Github</span>
96
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
97
  </a>
98
98
  {{/if}}
99
99
  {{#if figma_link.value}}
100
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
100
+ <a href="{{figma_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Figma, opens in new tab">
101
101
  <span>Figma</span>
102
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
103
  </a>
104
104
  {{/if}}
105
105
  {{#if action_link_title.value}}
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">
106
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
107
107
  <span>{{action_link_title.value}}</span>
108
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
109
  </a>
@@ -114,19 +114,19 @@
114
114
  <div class="qld__code-header">
115
115
  <div class="qld__code-header-left">
116
116
  {{#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">
117
+ <a href="{{github_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Github, opens in new tab">
118
118
  <span>Github</span>
119
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
120
  </a>
121
121
  {{/if}}
122
122
  {{#if figma_link.value}}
123
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
123
+ <a href="{{figma_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Figma, opens in new tab">
124
124
  <span>Figma</span>
125
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
126
  </a>
127
127
  {{/if}}
128
128
  {{#if action_link_title.value}}
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">
129
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
130
130
  <span>{{action_link_title.value}}</span>
131
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
132
  </a>
@@ -137,19 +137,19 @@
137
137
  <div class="qld__code-header">
138
138
  <div class="qld__code-header-left">
139
139
  {{#if github_link.value}}
140
- <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">
140
+ <a href="{{github_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Github, opens in new tab">
141
141
  <span>Github</span>
142
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
143
  </a>
144
144
  {{/if}}
145
145
  {{#if figma_link.value}}
146
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
146
+ <a href="{{figma_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Figma, opens in new tab">
147
147
  <span>Figma</span>
148
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
149
  </a>
150
150
  {{/if}}
151
151
  {{#if action_link_title.value}}
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">
152
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
153
153
  <span>{{action_link_title.value}}</span>
154
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
155
  </a>
@@ -161,19 +161,19 @@
161
161
  <div class="qld__code-header">
162
162
  <div class="qld__code-header-left">
163
163
  {{#if github_link.value}}
164
- <a href="{{github_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Github, opens in new tab">
164
+ <a href="{{github_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Github, opens in new tab">
165
165
  <span>Github</span>
166
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
167
  </a>
168
168
  {{/if}}
169
169
  {{#if figma_link.value}}
170
- <a href="{{figma_link.value}}" class="qld__code-header-link" target="_blank" aria-label="Visit Figma, opens in new tab">
170
+ <a href="{{figma_link.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit Figma, opens in new tab">
171
171
  <span>Figma</span>
172
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
173
  </a>
174
174
  {{/if}}
175
175
  {{#if action_link_title.value}}
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">
176
+ <a href="{{action_link_address.value}}" class="qld__code-header-link" rel="noopener noreferrer" target="_blank" aria-label="Visit {{action_link_title.value}}, opens in new tab">
177
177
  <span>{{action_link_title.value}}</span>
178
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
179
  </a>
@@ -1,3 +1,5 @@
1
+ import { validateInternalSvgPath, buildIconPath } from "../../../helpers/global-helpers.js";
2
+
1
3
  (function () {
2
4
  /**
3
5
  * @module code
@@ -69,7 +71,10 @@
69
71
 
70
72
  // Create <use>
71
73
  const use = document.createElementNS("http://www.w3.org/2000/svg", "use");
72
- use.setAttributeNS(null, "href", `${svgPath}#chevron-up`);
74
+ // Attempt to validate SVG path before using it
75
+ if (validateInternalSvgPath(svgPath)) {
76
+ use.setAttributeNS(null, "href", buildIconPath(svgPath, "chevron-up").toString());
77
+ }
73
78
 
74
79
  showToggleButton.addEventListener("click", function () {
75
80
  // Update button text