@qld-gov-au/qgds-bootstrap5 2.0.1 → 2.0.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.
Files changed (137) hide show
  1. package/.storybook/preview.js +4 -1
  2. package/dist/assets/components/bs5/accordion/accordion.hbs +3 -6
  3. package/dist/assets/components/bs5/directionLinks/directionLinks.hbs +2 -1
  4. package/dist/assets/components/bs5/head/head.hbs +1 -1
  5. package/dist/assets/components/bs5/header/header.hbs +6 -9
  6. package/dist/assets/components/bs5/navbar/navbar.hbs +21 -14
  7. package/dist/assets/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
  8. package/dist/assets/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
  9. package/dist/assets/components/bs5/pageLayout/templates/homePage.hbs +1 -1
  10. package/dist/assets/components/bs5/quickexit/quickexit.hbs +1 -1
  11. package/dist/assets/components/bs5/sidenav/sidenav.hbs +56 -37
  12. package/dist/assets/css/qld.bootstrap.css +1 -6
  13. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  14. package/dist/assets/js/handlebars.init.min.js +232 -179
  15. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  16. package/dist/assets/js/qld.bootstrap.min.js +5 -5
  17. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  18. package/dist/assets/node/handlebars.init.min.js +55 -23
  19. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  20. package/dist/components/bs5/accordion/accordion.hbs +3 -6
  21. package/dist/components/bs5/directionLinks/directionLinks.hbs +2 -1
  22. package/dist/components/bs5/head/head.hbs +1 -1
  23. package/dist/components/bs5/header/header.hbs +6 -9
  24. package/dist/components/bs5/navbar/navbar.hbs +21 -14
  25. package/dist/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
  26. package/dist/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
  27. package/dist/components/bs5/pageLayout/templates/homePage.hbs +1 -1
  28. package/dist/components/bs5/quickexit/quickexit.hbs +1 -1
  29. package/dist/components/bs5/sidenav/sidenav.hbs +56 -37
  30. package/dist/package.json +2 -4
  31. package/dist/sample-data/accordion/accordion.data.json +24 -23
  32. package/dist/sample-data/navbar/navbar.data.json +91 -25
  33. package/dist/sample-data/pagination/pagination.data.json +19 -19
  34. package/dist/sample-data/sidenav/sidenav.data.json +81 -80
  35. package/package.json +2 -4
  36. package/src/components/bs5/accordion/Accordion.mdx +34 -12
  37. package/src/components/bs5/accordion/__snapshots__/accordion.test.js.snap +3 -6
  38. package/src/components/bs5/accordion/accordion.data.json +24 -23
  39. package/src/components/bs5/accordion/accordion.hbs +3 -6
  40. package/src/components/bs5/accordion/accordion.scss +19 -9
  41. package/src/components/bs5/accordion/accordion.stories.js +8 -0
  42. package/src/components/bs5/accordion/accordion.test.js +5 -0
  43. package/src/components/bs5/accordion/mdx/_designResources.mdx +6 -0
  44. package/src/components/bs5/accordion/mdx/_usageInstructions.mdx +10 -0
  45. package/src/components/bs5/backToTop/backToTop.mdx +4 -5
  46. package/src/components/bs5/banner/Banner.mdx +1 -3
  47. package/src/components/bs5/blockquote/Blockquote.mdx +4 -5
  48. package/src/components/bs5/blockquote/blockquote.scss +47 -7
  49. package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +1 -3
  50. package/src/components/bs5/button/Button.mdx +4 -5
  51. package/src/components/bs5/button/button.scss +13 -1
  52. package/src/components/bs5/callToAction/callToAction.mdx +1 -3
  53. package/src/components/bs5/callout/Callout.mdx +4 -5
  54. package/src/components/bs5/card/Card.mdx +1 -3
  55. package/src/components/bs5/card/card.scss +1 -25
  56. package/src/components/bs5/directionLinks/DirectionLinks.mdx +4 -5
  57. package/src/components/bs5/directionLinks/directionLinks.hbs +2 -1
  58. package/src/components/bs5/directionLinks/directionLinks.scss +27 -80
  59. package/src/components/bs5/directionLinks/directionLinks.stories.js +7 -14
  60. package/src/components/bs5/footer/Footer.mdx +1 -3
  61. package/src/components/bs5/footer/footer.scss +4 -11
  62. package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +7 -6
  63. package/src/components/bs5/formcheck/stories/radio/Radio.mdx +7 -6
  64. package/src/components/bs5/globalAlert/GlobalAlert.mdx +1 -3
  65. package/src/components/bs5/globalAlert/globalAlert.scss +6 -0
  66. package/src/components/bs5/header/Header.mdx +1 -3
  67. package/src/components/bs5/header/header.hbs +6 -9
  68. package/src/components/bs5/header/header.scss +6 -2
  69. package/src/components/bs5/icons/Icons.mdx +167 -7
  70. package/src/components/bs5/icons/_icons.sizes.scss +9 -0
  71. package/src/components/bs5/icons/icons.scss +23 -71
  72. package/src/components/bs5/icons/icons.stories.js +34 -57
  73. package/src/components/bs5/icons/mdx/_IconsSizes.mdx +112 -0
  74. package/src/components/bs5/icons/stories/storyFlexContainer.html +18 -0
  75. package/src/components/bs5/icons/stories/storyInlineWithText.html +18 -0
  76. package/src/components/bs5/icons/stories/storySizes.html +89 -0
  77. package/src/components/bs5/image/Image.mdx +1 -4
  78. package/src/components/bs5/inpageAlert/InpageAlert.mdx +1 -3
  79. package/src/components/bs5/inpagenav/Inpagenav.mdx +4 -5
  80. package/src/components/bs5/inpagenav/inpagenav.scss +7 -3
  81. package/src/components/bs5/link/link.mdx +1 -3
  82. package/src/components/bs5/link/link.scss +2 -15
  83. package/src/components/bs5/linkColumns/linkColumns.mdx +1 -3
  84. package/src/components/bs5/logo/Logo.mdx +1 -3
  85. package/src/components/bs5/navbar/navbar.data.json +91 -25
  86. package/src/components/bs5/navbar/navbar.functions.js +4 -0
  87. package/src/components/bs5/navbar/navbar.hbs +21 -14
  88. package/src/components/bs5/navbar/navbar.scss +219 -166
  89. package/src/components/bs5/navbar/navbar.stories.js +31 -2
  90. package/src/components/bs5/pageLayout/ThemeShowcase.stories.js +249 -0
  91. package/src/components/bs5/pageLayout/pageLayout.stories.js +3 -1
  92. package/src/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
  93. package/src/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
  94. package/src/components/bs5/pageLayout/templates/homePage.hbs +1 -1
  95. package/src/components/bs5/pagination/Pagination.mdx +4 -5
  96. package/src/components/bs5/pagination/pagination.data.json +19 -19
  97. package/src/components/bs5/pagination/pagination.scss +37 -63
  98. package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +1 -3
  99. package/src/components/bs5/promotionalPanel/promotionalPanel.scss +23 -22
  100. package/src/components/bs5/quickexit/quickexit.functions.js +24 -37
  101. package/src/components/bs5/quickexit/quickexit.hbs +1 -1
  102. package/src/components/bs5/quickexit/quickexit.scss +27 -10
  103. package/src/components/bs5/searchInput/SearchInput.mdx +5 -5
  104. package/src/components/bs5/sidenav/Sidenav.mdx +4 -5
  105. package/src/components/bs5/sidenav/sidenav.data.json +81 -80
  106. package/src/components/bs5/sidenav/sidenav.hbs +56 -37
  107. package/src/components/bs5/sidenav/sidenav.scss +236 -151
  108. package/src/components/bs5/skiplinks/SkipLinks.mdx +1 -3
  109. package/src/components/bs5/skiplinks/skipLinks.functions.js +0 -9
  110. package/src/components/bs5/skiplinks/skipLinks.test.js +0 -1
  111. package/src/components/bs5/table/Table.mdx +4 -5
  112. package/src/components/bs5/tabs/Tabs.mdx +4 -5
  113. package/src/components/bs5/tabs/tabs.scss +22 -1
  114. package/src/components/bs5/tag/Tag.mdx +4 -5
  115. package/src/components/bs5/typography/Typography.mdx +4 -5
  116. package/src/components/bs5/video/Video.mdx +4 -5
  117. package/src/components/common/layout/container.scss +5 -0
  118. package/src/components/common/layout/content.scss +16 -8
  119. package/src/css/functions/_index.scss +1 -0
  120. package/src/css/functions/in-list.scss +5 -0
  121. package/src/css/main.scss +4 -10
  122. package/src/css/mixins/_index.scss +3 -0
  123. package/src/css/mixins/make-icon.scss +87 -0
  124. package/src/css/qld-theme.scss +74 -31
  125. package/src/css/qld-type.scss +26 -140
  126. package/src/css/qld-utilities.scss +29 -14
  127. package/src/css/qld-variables.scss +4 -4
  128. package/src/css/utilities/_index.scss +1 -0
  129. package/src/css/utilities/sr-only.scss +5 -0
  130. package/src/css/variables/_index.scss +1 -0
  131. package/src/css/variables/type.scss +58 -0
  132. package/src/js/qld.bootstrap.js +1 -9
  133. package/src/stories/documentation/_storybookDocsTabs.jsx +63 -0
  134. package/src/stories/documentation/storybook-documentation.scss +51 -0
  135. package/src/components/bs5/icons/story-icon-sizing.html +0 -131
  136. package/src/components/bs5/icons/story-icon-usage.html +0 -89
  137. package/src/components/bs5/pagination/health-icon-sprite.svg +0 -156
@@ -16,24 +16,11 @@ $pagination-icon-more-hover-color: $secondary;
16
16
  $pagination-icon-more-dark-color: $qld-white;
17
17
  $pagination-icon-more-dark-hover-color: $qld-golden-yellow;
18
18
 
19
- //SVG ICONS - Default, light and light-alt
20
- $pagination-icon-prevnext: url('data:image/svg+xml,<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.5 8.50066C21.5 8.89906 21.125 9.20892 20.7031 9.20892L3.03125 9.20892L9.59375 15.8489C9.875 16.1145 9.875 16.5572 9.54688 16.8228C9.40625 16.9556 9.21875 16.9998 9.03125 16.9998C8.79688 16.9998 8.60938 16.9556 8.46875 16.7785L0.6875 8.98759C0.40625 8.72199 0.40625 8.32359 0.6875 8.05799L8.46875 0.267061C8.75 -0.0428051 9.21875 -0.0428051 9.54688 0.222795C9.875 0.488394 9.875 0.931061 9.59375 1.19666L3.03125 7.79239L20.7031 7.79239C21.125 7.79239 21.5 8.14652 21.5 8.50066Z" fill="#{$pagination-icon-prevnext-color}"/></svg>');
21
- $pagination-icon-prevnext-hover: url('data:image/svg+xml,<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.5 8.50066C21.5 8.89906 21.125 9.20892 20.7031 9.20892L3.03125 9.20892L9.59375 15.8489C9.875 16.1145 9.875 16.5572 9.54688 16.8228C9.40625 16.9556 9.21875 16.9998 9.03125 16.9998C8.79688 16.9998 8.60938 16.9556 8.46875 16.7785L0.6875 8.98759C0.40625 8.72199 0.40625 8.32359 0.6875 8.05799L8.46875 0.267061C8.75 -0.0428051 9.21875 -0.0428051 9.54688 0.222795C9.875 0.488394 9.875 0.931061 9.59375 1.19666L3.03125 7.79239L20.7031 7.79239C21.125 7.79239 21.5 8.14652 21.5 8.50066Z" fill="#{$pagination-icon-prevnext-hover-color}"/></svg>');
22
- $pagination-icon-more: url('data:image/svg+xml,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="16" r="2" fill="#{$pagination-icon-more-color}"/><circle cx="16" cy="16" r="2" fill="#{$pagination-icon-more-color}"/><circle cx="24" cy="16" r="2" fill="#{$pagination-icon-more-color}"/></svg>');
23
-
24
- ///////////////////////EDIT
25
- $pagination-icon-more-hover: url('data:image/svg+xml,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="16" r="2" fill="#{$pagination-icon-more-hover-color}"/><circle cx="16" cy="16" r="2" fill="#{$pagination-icon-more-hover-color}"/><circle cx="24" cy="16" r="2" fill="#{$pagination-icon-more-hover-color}"/></svg>');
26
-
27
- $pagination-icon-more-dark-hover: url('data:image/svg+xml,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="16" r="2" fill="#{$pagination-icon-more-dark-hover-color}"/><circle cx="16" cy="16" r="2" fill="#{$pagination-icon-more-dark-hover-color}"/><circle cx="24" cy="16" r="2" fill="#{$pagination-icon-more-dark-hover-color}"/></svg>');
28
-
29
-
30
- //SVG ICONS - Dark and dark-alt
31
- $pagination-icon-prevnext-dark: url('data:image/svg+xml,<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.5 8.50066C21.5 8.89906 21.125 9.20892 20.7031 9.20892L3.03125 9.20892L9.59375 15.8489C9.875 16.1145 9.875 16.5572 9.54688 16.8228C9.40625 16.9556 9.21875 16.9998 9.03125 16.9998C8.79688 16.9998 8.60938 16.9556 8.46875 16.7785L0.6875 8.98759C0.40625 8.72199 0.40625 8.32359 0.6875 8.05799L8.46875 0.267061C8.75 -0.0428051 9.21875 -0.0428051 9.54688 0.222795C9.875 0.488394 9.875 0.931061 9.59375 1.19666L3.03125 7.79239L20.7031 7.79239C21.125 7.79239 21.5 8.14652 21.5 8.50066Z" fill="#{$pagination-icon-prevnext-dark-color}"/></svg>');
32
- $pagination-icon-prevnext-dark-hover: url('data:image/svg+xml,<svg width="22" height="17" viewBox="0 0 22 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.5 8.50066C21.5 8.89906 21.125 9.20892 20.7031 9.20892L3.03125 9.20892L9.59375 15.8489C9.875 16.1145 9.875 16.5572 9.54688 16.8228C9.40625 16.9556 9.21875 16.9998 9.03125 16.9998C8.79688 16.9998 8.60938 16.9556 8.46875 16.7785L0.6875 8.98759C0.40625 8.72199 0.40625 8.32359 0.6875 8.05799L8.46875 0.267061C8.75 -0.0428051 9.21875 -0.0428051 9.54688 0.222795C9.875 0.488394 9.875 0.931061 9.59375 1.19666L3.03125 7.79239L20.7031 7.79239C21.125 7.79239 21.5 8.14652 21.5 8.50066Z" fill="#{$pagination-icon-prevnext-dark-hover-color}"/></svg>');
33
- $pagination-icon-more-dark: url('data:image/svg+xml,<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="16" r="2" fill="#{$pagination-icon-more-dark-color}"/><circle cx="16" cy="16" r="2" fill="#{$pagination-icon-more-dark-color}"/><circle cx="24" cy="16" r="2" fill="#{$pagination-icon-more-dark-color}"/></svg>');
34
-
35
-
36
19
  .pagination {
20
+ --action-icon-color: var(--#{$prefix}light-action-secondary);
21
+ --action-icon-color-hover: var(--#{$prefix}light-action-secondary-hover);
22
+ --action-icon-more-color: var(--#{$prefix}light-text-text);
23
+ --action-icon-more-color-hover: var(--#{$prefix}light-action-secondary);
37
24
 
38
25
  //Padding
39
26
  --#{$prefix}pagination-padding-x: 1rem;
@@ -78,13 +65,6 @@ $pagination-icon-more-dark: url('data:image/svg+xml,<svg width="32" height="32"
78
65
  --#{$prefix}pagination-disabled-bg: var(--#{$prefix}secondary-bg);
79
66
  --#{$prefix}pagination-disabled-border-color: var(--#{$prefix}border-color);
80
67
 
81
- //SASS icons assinged to CSS properties
82
- --#{$prefix}pagination-icon-prevnext: #{escape-svg($pagination-icon-prevnext)};
83
- --#{$prefix}pagination-icon-prevnext-hover: #{escape-svg($pagination-icon-prevnext-hover)};
84
- --#{$prefix}pagination-icon-more: #{escape-svg($pagination-icon-more)};
85
- --#{$prefix}pagination-icon-more-hover: #{escape-svg($pagination-icon-more-hover)};
86
- --#{$prefix}pagination-icon-more-dark-hover: #{escape-svg($pagination-icon-more-dark-hover)};
87
-
88
68
  }
89
69
 
90
70
  // When the parent container has a darker background (.dark), or the parent container uses attribute data-bs-theme="dark"
@@ -126,9 +106,10 @@ $pagination-icon-more-dark: url('data:image/svg+xml,<svg width="32" height="32"
126
106
  --#{$prefix}pagination-active-focus-bg: var(--#{$prefix}dark-action-primary-hover);
127
107
 
128
108
  //SASS icons assinged to CSS properties
129
- --#{$prefix}pagination-icon-prevnext: #{escape-svg($pagination-icon-prevnext-dark)};
130
- --#{$prefix}pagination-icon-prevnext-hover: #{escape-svg($pagination-icon-prevnext-dark-hover)};
131
- --#{$prefix}pagination-icon-more: #{escape-svg($pagination-icon-more-dark)};
109
+ --action-icon-color: var(--#{$prefix}dark-action-secondary);
110
+ --action-icon-color-hover: var(--#{$prefix}dark-action-secondary-hover);
111
+ --action-icon-more-color: var(--#{$prefix}dark-text-text);
112
+ --action-icon-more-color-hover: var(--#{$prefix}dark-action-secondary);
132
113
  }
133
114
 
134
115
 
@@ -154,7 +135,7 @@ $pagination-icon-more-dark: url('data:image/svg+xml,<svg width="32" height="32"
154
135
  .page-item {
155
136
 
156
137
  .page-link {
157
- border-radius: 3px;
138
+ border-radius: 4px;
158
139
  width: 2rem;
159
140
  height: 2rem;
160
141
  padding: 0;
@@ -194,40 +175,41 @@ $pagination-icon-more-dark: url('data:image/svg+xml,<svg width="32" height="32"
194
175
  //Shared by both .prev and .next
195
176
  &.previous .page-link,
196
177
  &.next .page-link {
178
+ display: flex;
179
+ align-items: center;
180
+ gap: 0.5rem;
197
181
 
198
182
  //.prev and .next arrows
199
183
  &:before {
200
184
  content: "";
201
- position: absolute;
202
- top: 0;
203
- left: 0;
204
- width: 2rem;
205
- height: 2rem;
206
- background: var(--#{$prefix}pagination-icon-prevnext) center center;
207
- background-repeat: no-repeat;
185
+ width: 1.5rem;
186
+ height: 1.5rem;
187
+ mask-image: var(--qgds-icon-arrow-left);
188
+ background-color: var(--action-icon-color);
189
+ mask-repeat: no-repeat;
190
+ mask-position: 0;
208
191
  }
209
192
 
210
193
  &:hover:before {
211
- background: var(--#{$prefix}pagination-icon-prevnext-hover) center center;
212
- background-repeat: no-repeat;
194
+ background-color: var(--action-icon-color-hover);
213
195
  }
214
196
 
215
197
  &:hover, &:focus {
216
198
  //Previous and Next "link text"
217
- span {
218
- text-decoration: underline;
219
- text-underline-offset: 2px;
220
- }
199
+ span {
200
+ text-decoration: underline;
201
+ text-underline-offset: 2px;
202
+ }
221
203
 
222
204
  }
223
-
224
205
  }
225
206
 
226
- &.next .page-link:before {
227
- //Replica of previous arrow (defined above), but rotated 180 degrees
228
- transform: rotate(180deg);
229
- right: 0;
230
- left: unset;
207
+ &.next .page-link {
208
+ flex-direction: row-reverse;
209
+
210
+ &:before {
211
+ transform: rotate(180deg);
212
+ }
231
213
  }
232
214
 
233
215
  //Non-numeric links in pagination
@@ -276,29 +258,21 @@ $pagination-icon-more-dark: url('data:image/svg+xml,<svg width="32" height="32"
276
258
  //More dots
277
259
  &.more span {
278
260
  border: none;
279
- position: relative;
261
+ // position: relative;
280
262
  height: 2rem;
281
263
  width: 2rem;
282
- display: inline-block;
264
+ display: inline-flex;
283
265
 
284
266
  &:hover:before {
285
- background: var(--#{$prefix}pagination-icon-more-hover);
267
+ background-color: var(--action-icon-more-color-hover);
286
268
  }
287
269
  &:before {
288
270
  content: "";
289
- position: absolute;
290
- top: 0;
291
- left: 0;
292
- width: 100%;
293
- height: 100%;
294
- background: var(--#{$prefix}pagination-icon-more);
271
+ width: 2rem;
272
+ height: 2rem;
295
273
  background-repeat: no-repeat;
296
- }
297
- .dark &, .dark-alt & {
298
- &:hover:before {
299
- background: var(--#{$prefix}pagination-icon-more-dark-hover);
300
-
301
- }
274
+ mask-image: var(--qgds-icon-more-horizontal);
275
+ background-color: var(--action-icon-more-color);
302
276
  }
303
277
  }
304
278
  }
@@ -307,7 +281,7 @@ $pagination-icon-more-dark: url('data:image/svg+xml,<svg width="32" height="32"
307
281
  .dark &, .dark-alt & {
308
282
 
309
283
  .page-item {
310
- //Active link only
284
+ //Active link only
311
285
  &.active .page-link {
312
286
  &:hover {
313
287
  color: black;
@@ -6,9 +6,7 @@ import defaultdata from "./promotionalPanel.data.json";
6
6
 
7
7
  # Promotional Panel
8
8
 
9
- <Canvas>
10
- <Story of={promotionalPanelStories.Default} />
11
- </Canvas>
9
+ <Canvas of={promotionalPanelStories.Default} />
12
10
 
13
11
  ## Design resources
14
12
 
@@ -9,7 +9,7 @@
9
9
  display: grid;
10
10
  grid-template-columns: repeat(2, 1fr);
11
11
  grid-template-areas: "content graphic";
12
- &>* {
12
+ & > * {
13
13
  padding: 0;
14
14
  }
15
15
  &.content-right {
@@ -18,8 +18,8 @@
18
18
  align-items: start;
19
19
  }
20
20
  }
21
- &.bg-img {
22
- background-repeat: no-repeat;
21
+ &.bg-img {
22
+ background-repeat: no-repeat;
23
23
  background-size: cover;
24
24
  .content-panel {
25
25
  padding: 4rem;
@@ -48,7 +48,7 @@
48
48
  flex-direction: column;
49
49
  gap: 2rem;
50
50
  align-items: end;
51
- &>* {
51
+ & > * {
52
52
  max-width: 65ch;
53
53
  padding: 0;
54
54
  margin: 0;
@@ -64,7 +64,7 @@
64
64
  justify-content: center;
65
65
  }
66
66
  .qld-icon {
67
- --#{$prefix}icon-color: var(--icon-colour);
67
+ --#{$prefix}icon-color: var(--icon-colour);
68
68
  width: 2rem;
69
69
  height: 2rem;
70
70
  mask-size: 100%;
@@ -79,7 +79,7 @@
79
79
  gap: 1.5rem;
80
80
  }
81
81
  h2 {
82
- margin:0;
82
+ margin: 0;
83
83
  line-height: 1.25;
84
84
  }
85
85
  .btn-container {
@@ -87,7 +87,7 @@
87
87
  gap: 1rem;
88
88
  flex-direction: row;
89
89
  justify-content: start;
90
- flex-wrap:wrap;
90
+ flex-wrap: wrap;
91
91
  }
92
92
  .cta-container {
93
93
  .qld-cta-link {
@@ -121,7 +121,7 @@
121
121
  }
122
122
  @include media-breakpoint-down(xl) {
123
123
  .row {
124
- border-radius: 0;
124
+ border-radius: 0;
125
125
  }
126
126
  }
127
127
  }
@@ -130,12 +130,12 @@
130
130
  border-radius: 0;
131
131
  padding: 0;
132
132
  background-color: transparent;
133
- gap:0;
133
+ gap: 0;
134
134
  .content-panel {
135
135
  border-radius: 3rem;
136
136
  border-start-end-radius: 0;
137
137
  padding: 4rem;
138
- }
138
+ }
139
139
  .image-panel {
140
140
  .promo-panel-image {
141
141
  border-radius: 0;
@@ -183,7 +183,7 @@
183
183
  &.content-right {
184
184
  .content-panel {
185
185
  border-radius: 0;
186
- border-start-end-radius: 3rem;
186
+ border-start-end-radius: 3rem;
187
187
  border-end-end-radius: 3rem;
188
188
  }
189
189
  .image-panel {
@@ -209,14 +209,14 @@
209
209
  &.indent .row {
210
210
  .content-panel {
211
211
  border-radius: 0;
212
- border-end-end-radius: 3rem ;
212
+ border-end-end-radius: 3rem;
213
213
  padding-inline: 3rem;
214
214
  padding-block: 2.5rem;
215
215
  gap: 1.5rem;
216
216
  }
217
217
  &.content-right {
218
218
  .content-panel {
219
- border-radius: 0 ;
219
+ border-radius: 0;
220
220
  border-end-start-radius: 3rem;
221
221
  }
222
222
  .image-panel {
@@ -236,10 +236,10 @@
236
236
  &.indent-img .row {
237
237
  .image-panel {
238
238
  margin-block-end: -2.75rem;
239
- .promo-panel-image {
240
- border-radius: 0;
241
- border-end-start-radius: 2.5rem;
242
- }
239
+ .promo-panel-image {
240
+ border-radius: 0;
241
+ border-end-start-radius: 2.5rem;
242
+ }
243
243
  }
244
244
  .content-panel {
245
245
  border-radius: 0;
@@ -253,7 +253,7 @@
253
253
  }
254
254
  }
255
255
  .content-panel {
256
- border-radius: 0 ;
256
+ border-radius: 0;
257
257
  }
258
258
  }
259
259
  }
@@ -267,7 +267,8 @@
267
267
  }
268
268
  }
269
269
  }
270
- a.btn,.btn {
270
+ a.btn,
271
+ .btn {
271
272
  white-space: normal;
272
273
  }
273
274
  @include media-breakpoint-down(md) {
@@ -297,7 +298,7 @@
297
298
  }
298
299
  &.bg-img {
299
300
  border-radius: 3rem;
300
- gap:0;
301
+ gap: 0;
301
302
  .content-panel {
302
303
  border-radius: 2rem;
303
304
  }
@@ -324,7 +325,7 @@
324
325
  margin-block-end: 0;
325
326
  .promo-panel-image {
326
327
  border-radius: 0;
327
- border-end-end-radius: 2.75rem;
328
+ border-end-end-radius: 2rem;
328
329
  }
329
330
  }
330
331
  .content-panel {
@@ -333,4 +334,4 @@
333
334
  }
334
335
  }
335
336
  }
336
- }
337
+ }
@@ -1,49 +1,36 @@
1
- export function positionQuickExit() {
2
- let quickexitInstances = document.getElementsByClassName('qld-quick-exit');
3
- if (quickexitInstances.length > 0) {
4
- const el = document.getElementsByClassName('qld-quick-exit')[0];
5
- if (document.documentElement.clientWidth > 992) {
6
- if (window.pageYOffset > 200) {
7
- el.setAttribute("style", "position: 'fixed', top: '0px'");
8
- }
9
- if (window.pageYOffset < 200) {
10
- el.setAttribute("style", "position: 'sticky', top: '0px'");
11
- }
12
- } else {
13
- el.setAttribute("style", "position: 'fixed', top: 'auto'");
14
- }
15
- }
16
- }
17
-
18
1
  export function initQuickexit() {
19
- var quickExitElement = document.getElementsByClassName('qld-quick-exit');
20
- var quickExitButton = document.querySelector('.qld-quick-exit-button');
2
+ var quickExitElement = document.getElementsByClassName("qld-quick-exit");
3
+ var quickExitButton = document.querySelector(".qld-quick-exit-button");
21
4
 
22
- if (quickExitElement.length > 0 && typeof (quickExitButton) !== 'undefined' && quickExitButton != null) {
5
+ if (
6
+ quickExitElement.length > 0 &&
7
+ typeof quickExitButton !== "undefined" &&
8
+ quickExitButton != null
9
+ ) {
23
10
  onbtnClick();
24
11
  onKeyDown();
25
12
  }
26
13
  }
27
14
  /**
28
- * onbtnClick -> clicking quick exit button a page
29
- * @return {undefined}
30
- **/
15
+ * onbtnClick -> clicking quick exit button a page
16
+ * @return {undefined}
17
+ **/
31
18
  function onbtnClick() {
32
- const escapeSite = 'https://www.google.com.au/';
33
- var quickExitButton = document.querySelector('.qld-quick-exit-button');
19
+ const escapeSite = "https://www.google.com.au/";
20
+ var quickExitButton = document.querySelector(".qld-quick-exit-button");
34
21
  quickExitButton.onclick = function () {
35
22
  return quickExit(escapeSite);
36
- }
23
+ };
37
24
  }
38
25
 
39
26
  /**
40
- * onKeyDown -> escape keydown event
41
- * @return {undefined}
42
- **/
27
+ * onKeyDown -> escape keydown event
28
+ * @return {undefined}
29
+ **/
43
30
  function onKeyDown() {
44
- const escapeSite = 'https://www.google.com.au/';
31
+ const escapeSite = "https://www.google.com.au/";
45
32
  // add hotkey trigger
46
- document.addEventListener('keydown', function (e) {
33
+ document.addEventListener("keydown", function (e) {
47
34
  if (e.keyCode === 27) {
48
35
  quickExit(escapeSite);
49
36
  if (e) {
@@ -58,18 +45,18 @@ function onKeyDown() {
58
45
  }
59
46
 
60
47
  /**
61
- * quickExit function redirects a user on click and Esc key down
62
- * @param {string} site - site to replace on initiating the 'quick exit' ('Esc' key or clicking 'Close this site' button) function
63
- * @return {undefined}
64
- **/
48
+ * quickExit function redirects a user on click and Esc key down
49
+ * @param {string} site - site to replace on initiating the 'quick exit' ('Esc' key or clicking 'Close this site' button) function
50
+ * @return {undefined}
51
+ **/
65
52
  function quickExit(site) {
66
53
  // then redirect to a non-sensitive site
67
- window.open(site, '_blank');
54
+ window.open(site, "_blank");
68
55
  window.location.replace(site);
69
56
  // remove as much info from URL as possible
70
57
  if (window.history) {
71
58
  try {
72
- window.history.replaceState({}, '', '/');
59
+ window.history.replaceState({}, "", "/");
73
60
  } catch (e) {
74
61
  e.printStackTrace();
75
62
  }
@@ -5,7 +5,7 @@
5
5
  <div class="qld-quick-exit-inner container-fluid {{#if hasIconInfo}} has-icon-info{{/if}}{{#if hasTooltip}} has-tooltip{{/if}}">
6
6
  <div class="qg-quick-exit__tips">
7
7
  {{#if hasIconInfo}}
8
- <span class="qld-icon icon-info"></span>
8
+ <span class="icon-info"></span>
9
9
  {{/if}}
10
10
  <p class="qld-quick-exit-tip-title">{{{exitMessage}}}</p>
11
11
  <a href="{{browseSafelyOnlineURL}}" class="qld-quick-exit-tip-link">
@@ -1,3 +1,4 @@
1
+ @use "../../../css/mixins" as m;
1
2
  // ----------------------------------------------------------------------------------------------------------------------
2
3
  // Header - palettes and second hand variables:
3
4
  @import "./colours";
@@ -58,8 +59,10 @@
58
59
  position: absolute;
59
60
  }
60
61
  .qld-tooltip-wrapper:after {
61
- border-block-end: var(--#{$prefix}tooltip-arrow) solid var(--#{$prefix}quick-exit-tooltip-bg);
62
- border-inline-start: var(--#{$prefix}tooltip-arrow) solid var(--#{$prefix}quick-exit-tooltip-bg);
62
+ border-block-end: var(--#{$prefix}tooltip-arrow) solid
63
+ var(--#{$prefix}quick-exit-tooltip-bg);
64
+ border-inline-start: var(--#{$prefix}tooltip-arrow) solid
65
+ var(--#{$prefix}quick-exit-tooltip-bg);
63
66
  border-inline-end: var(--#{$prefix}tooltip-arrow) solid transparent;
64
67
  border-block-start: var(--#{$prefix}tooltip-arrow) solid transparent;
65
68
  inset-block-end: calc(var(--#{$prefix}tooltip-arrow) * -1);
@@ -75,7 +78,8 @@
75
78
  &:focus-within {
76
79
  outline-offset: var(--#{$prefix}quick-exit-text-outline-offset);
77
80
  box-shadow: none;
78
- outline: var(--#{$prefix}quick-exit-text-outline) solid var(--#{$prefix}quick-exit-tooltip-btn-focus);
81
+ outline: var(--#{$prefix}quick-exit-text-outline) solid
82
+ var(--#{$prefix}quick-exit-tooltip-btn-focus);
79
83
  border-radius: 0;
80
84
  }
81
85
  }
@@ -84,9 +88,13 @@
84
88
  font-weight: 500;
85
89
  text-decoration-line: underline;
86
90
  text-decoration-style: solid;
87
- text-underline-offset: calc(var(--#{$prefix}quick-exit-text-outline-offset) * 2);
91
+ text-underline-offset: calc(
92
+ var(--#{$prefix}quick-exit-text-outline-offset) * 2
93
+ );
88
94
  &:hover {
89
- text-decoration-thickness: var(--#{$prefix}link-underline-thickness-hover);
95
+ text-decoration-thickness: var(
96
+ --#{$prefix}link-underline-thickness-hover
97
+ );
90
98
  }
91
99
  }
92
100
  .qld-tooltip-prompt {
@@ -117,6 +125,7 @@
117
125
  border-color: var(--#{$prefix}quick-exit-button-bg-colour);
118
126
  background-color: var(--#{$prefix}quick-exit-button-bg-colour);
119
127
  color: var(--#{$prefix}quick-exit-button-text-colour);
128
+ display: inline-block;
120
129
  &:hover {
121
130
  border-color: var(--#{$prefix}quick-exit-button-bg-colour-hover);
122
131
  background-color: var(--#{$prefix}quick-exit-button-bg-colour-hover);
@@ -129,7 +138,9 @@
129
138
  }
130
139
  &:hover,
131
140
  &:focus {
132
- text-decoration-thickness: var(--#{$prefix}link-underline-thickness-hover);
141
+ text-decoration-thickness: var(
142
+ --#{$prefix}link-underline-thickness-hover
143
+ );
133
144
  }
134
145
  }
135
146
  .qg-quick-exit__tips {
@@ -143,9 +154,9 @@
143
154
  .icon-info {
144
155
  position: absolute;
145
156
  inset-inline-start: 0;
146
- background-repeat: no-repeat;
147
157
  margin-block-start: 4px;
148
- background-image: url("data:image/svg+xml,<svg width='18' height='19' viewBox='0 0 18 19' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M9 0.25C4.00781 0.25 0 4.29297 0 9.25C0 14.2422 4.00781 18.25 9 18.25C13.957 18.25 18 14.2422 18 9.25C18 4.29297 13.957 0.25 9 0.25ZM9 17.125C4.64062 17.125 1.125 13.6094 1.125 9.25C1.125 4.92578 4.64062 1.375 9 1.375C13.3242 1.375 16.875 4.92578 16.875 9.25C16.875 13.6094 13.3242 17.125 9 17.125ZM9 6.71875C9.45703 6.71875 9.84375 6.36719 9.84375 5.875C9.84375 5.41797 9.45703 5.03125 9 5.03125C8.50781 5.03125 8.15625 5.41797 8.15625 5.875C8.15625 6.36719 8.50781 6.71875 9 6.71875ZM10.6875 12.625H9.5625V8.6875C9.5625 8.40625 9.28125 8.125 9 8.125H7.875C7.55859 8.125 7.3125 8.40625 7.3125 8.6875C7.3125 9.00391 7.55859 9.25 7.875 9.25H8.4375V12.625H7.3125C6.99609 12.625 6.75 12.9062 6.75 13.1875C6.75 13.5039 6.99609 13.75 7.3125 13.75H10.6875C10.9688 13.75 11.25 13.5039 11.25 13.1875C11.25 12.9062 10.9688 12.625 10.6875 12.625Z' fill='white'/></svg>");
158
+ @include m.make-icon("alert-information");
159
+ --#{$prefix}icon-color: #{$qld-dark-action-secondary};
149
160
  }
150
161
  @include media-breakpoint-up(lg) {
151
162
  -webkit-box-pack: justify;
@@ -188,8 +199,10 @@
188
199
  .qld-tooltip-wrapper:after {
189
200
  border-block-end: var(--#{$prefix}tooltip-arrow) solid transparent;
190
201
  border-inline-start: var(--#{$prefix}tooltip-arrow) solid transparent;
191
- border-inline-end: var(--#{$prefix}tooltip-arrow) solid var(--#{$prefix}quick-exit-tooltip-bg);
192
- border-block-start: var(--#{$prefix}tooltip-arrow) solid var(--#{$prefix}quick-exit-tooltip-bg);
202
+ border-inline-end: var(--#{$prefix}tooltip-arrow) solid
203
+ var(--#{$prefix}quick-exit-tooltip-bg);
204
+ border-block-start: var(--#{$prefix}tooltip-arrow) solid
205
+ var(--#{$prefix}quick-exit-tooltip-bg);
193
206
  inset-block-end: auto;
194
207
  inset-inline-start: 25px;
195
208
  inset-block-start: calc(var(--#{$prefix}tooltip-arrow) * -1);
@@ -251,3 +264,7 @@
251
264
  }
252
265
  }
253
266
  }
267
+
268
+ body:has(.qld-quick-exit) {
269
+ height: auto;
270
+ }
@@ -1,12 +1,12 @@
1
- import { Canvas, Meta, Story } from "@storybook/blocks"
2
- import * as SearchInputStories from "./searchInput.stories"
1
+ import { Canvas, Meta, Story } from "@storybook/blocks";
2
+ import * as SearchInputStories from "./searchInput.stories";
3
3
 
4
4
  <Meta of={SearchInputStories} />
5
5
 
6
6
  # Search Input
7
- <Canvas>
8
- <Story of={SearchInputStories.Default} />
9
- </Canvas>
7
+
8
+ <Canvas of={SearchInputStories.Default} />
10
9
 
11
10
  ## Design resources
11
+
12
12
  - [Component library (Figma)]https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?node-id=11017-307599&t=NGmPmPhkUQMN7qQw-0)./searchInput.stories
@@ -1,12 +1,11 @@
1
- import { Canvas, Meta, Story } from "@storybook/blocks"
2
- import * as SidenavStories from "./sidenav.stories"
1
+ import { Canvas, Meta, Story } from "@storybook/blocks";
2
+ import * as SidenavStories from "./sidenav.stories";
3
3
 
4
4
  <Meta of={SidenavStories} />
5
5
 
6
6
  # Side navigation
7
- <Canvas>
8
- <Story of={SidenavStories.Default} />
9
- </Canvas>
7
+
8
+ <Canvas of={SidenavStories.Default} />
10
9
 
11
10
  ## Design resources
12
11