@qld-gov-au/qgds-bootstrap5 2.0.12 → 2.1.1

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 (121) hide show
  1. package/.esbuild/plugins/qgds-plugin-generate-icon-assets.js +31 -24
  2. package/.storybook/preview.js +15 -6
  3. package/dist/assets/components/bs5/button/button.hbs +1 -1
  4. package/dist/assets/components/bs5/callToAction/callToAction.hbs +3 -3
  5. package/dist/assets/components/bs5/dateinput/dateinput.hbs +21 -27
  6. package/dist/assets/components/bs5/footer/customLinks.hbs +1 -1
  7. package/dist/assets/components/bs5/footer/followLinks.hbs +1 -1
  8. package/dist/assets/components/bs5/globalAlert/globalAlert.hbs +8 -1
  9. package/dist/assets/components/bs5/head/head.hbs +1 -1
  10. package/dist/assets/components/bs5/inpageAlert/inpageAlert.hbs +10 -2
  11. package/dist/assets/components/bs5/pagination/pagination.hbs +7 -2
  12. package/dist/assets/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
  13. package/dist/assets/components/bs5/searchInput/searchInput.hbs +11 -9
  14. package/dist/assets/css/qld.bootstrap.css +2 -2
  15. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  16. package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
  17. package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
  18. package/dist/assets/img/icons-sprite.svg +24 -24
  19. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  20. package/dist/assets/js/handlebars.init.min.js +80 -64
  21. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  22. package/dist/assets/js/handlebars.partials.js +80 -64
  23. package/dist/assets/js/handlebars.partials.js.map +2 -2
  24. package/dist/assets/js/qld.bootstrap.min.js +6 -6
  25. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  26. package/dist/assets/node/handlebars.init.min.js +28 -19
  27. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  28. package/dist/components/bs5/button/button.hbs +1 -1
  29. package/dist/components/bs5/callToAction/callToAction.hbs +3 -3
  30. package/dist/components/bs5/dateinput/dateinput.hbs +21 -27
  31. package/dist/components/bs5/footer/customLinks.hbs +1 -1
  32. package/dist/components/bs5/footer/followLinks.hbs +1 -1
  33. package/dist/components/bs5/globalAlert/globalAlert.hbs +8 -1
  34. package/dist/components/bs5/head/head.hbs +1 -1
  35. package/dist/components/bs5/inpageAlert/inpageAlert.hbs +10 -2
  36. package/dist/components/bs5/pagination/pagination.hbs +7 -2
  37. package/dist/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
  38. package/dist/components/bs5/searchInput/searchInput.hbs +11 -9
  39. package/dist/package.json +33 -32
  40. package/dist/sample-data/callToAction/callToAction.data.json +2 -1
  41. package/dist/sample-data/dateinput/dateinput.data.json +3 -1
  42. package/dist/sample-data/footer/footer.data.json +3 -0
  43. package/dist/sample-data/inpageAlert/inpageAlert.data.json +1 -1
  44. package/dist/sample-data/pagination/pagination.data.json +4 -4
  45. package/dist/sample-data/promotionalPanel/promotionalPanel.data.json +45 -47
  46. package/dist/sample-data/searchInput/searchInput.data.json +1 -0
  47. package/package.json +33 -32
  48. package/src/components/bs5/breadcrumbs/breadcrumbs.scss +4 -4
  49. package/src/components/bs5/button/Button.js +32 -6
  50. package/src/components/bs5/button/button.hbs +1 -1
  51. package/src/components/bs5/button/button.scss +1 -5
  52. package/src/components/bs5/button/button.stories.js +16 -4
  53. package/src/components/bs5/callToAction/callToAction.data.json +2 -1
  54. package/src/components/bs5/callToAction/callToAction.hbs +3 -3
  55. package/src/components/bs5/callToAction/callToAction.stories.js +2 -2
  56. package/src/components/bs5/card/card.scss +4 -2
  57. package/src/components/bs5/dateinput/Dateinput.js +1 -38
  58. package/src/components/bs5/dateinput/Dateinput.mdx +27 -0
  59. package/src/components/bs5/dateinput/Dateinput.stories.js +48 -4
  60. package/src/components/bs5/dateinput/dateinput.data.json +3 -1
  61. package/src/components/bs5/dateinput/dateinput.functions.js +91 -0
  62. package/src/components/bs5/dateinput/dateinput.hbs +21 -27
  63. package/src/components/bs5/footer/customLinks.hbs +1 -1
  64. package/src/components/bs5/footer/followLinks.hbs +1 -1
  65. package/src/components/bs5/footer/footer.data.json +3 -0
  66. package/src/components/bs5/formcheck/_form-variables.scss +36 -0
  67. package/src/components/bs5/formcheck/formcheck.scss +59 -14
  68. package/src/components/bs5/globalAlert/globalAlert.hbs +8 -1
  69. package/src/components/bs5/globalAlert/globalAlert.scss +14 -19
  70. package/src/components/bs5/globalAlert/globalAlert.stories.js +1 -0
  71. package/src/components/bs5/globalAlert/globalAlert.test.js +10 -5
  72. package/src/components/bs5/header/header.scss +1 -2
  73. package/src/components/bs5/icons/_icons.list.js +7 -7
  74. package/src/components/bs5/icons/_icons.list.scss +113 -112
  75. package/src/components/bs5/icons/_icons.variables.scss +7 -6
  76. package/src/components/bs5/icons/icons.scss +2 -1
  77. package/src/components/bs5/inpageAlert/inpageAlert.data.json +1 -1
  78. package/src/components/bs5/inpageAlert/inpageAlert.hbs +10 -2
  79. package/src/components/bs5/inpageAlert/inpageAlert.scss +52 -55
  80. package/src/components/bs5/inpageAlert/inpageAlert.stories.js +54 -3
  81. package/src/components/bs5/inpagenav/inpagenav.scss +9 -1
  82. package/src/components/bs5/modal/modal.scss +1 -1
  83. package/src/components/bs5/navbar/navbar.functions.js +39 -28
  84. package/src/components/bs5/navbar/navbar.scss +43 -28
  85. package/src/components/bs5/navbar/navbar.stories.js +4 -3
  86. package/src/components/bs5/pageLayout/PaletteShowcase.stories.js +4 -3
  87. package/src/components/bs5/pagination/pagination.data.json +4 -4
  88. package/src/components/bs5/pagination/pagination.hbs +7 -2
  89. package/src/components/bs5/pagination/pagination.scss +1 -1
  90. package/src/components/bs5/promotionalPanel/promotionalPanel.data.json +45 -47
  91. package/src/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
  92. package/src/components/bs5/quickexit/quickexit.scss +1 -1
  93. package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +16 -16
  94. package/src/components/bs5/searchInput/search.functions.js +70 -71
  95. package/src/components/bs5/searchInput/searchInput.data.json +1 -0
  96. package/src/components/bs5/searchInput/searchInput.hbs +11 -9
  97. package/src/components/bs5/searchInput/searchInput.scss +92 -38
  98. package/src/components/bs5/searchInput/searchInput.test.js +91 -119
  99. package/src/components/bs5/sidenav/sidenav.scss +17 -19
  100. package/src/components/bs5/skiplinks/skipLinks.scss +12 -4
  101. package/src/components/bs5/table/table.scss +93 -83
  102. package/src/components/common/focus-styles/focusStyles.mdx +20 -0
  103. package/src/components/common/focus-styles/focusStyles.stories.js +58 -0
  104. package/src/css/functions/_index.scss +3 -0
  105. package/src/css/functions/color-icon.scss +31 -0
  106. package/src/css/functions/string-replace.scss +49 -0
  107. package/src/css/functions/svg-encode.scss +22 -0
  108. package/src/css/main.scss +3 -0
  109. package/src/css/mixins/focusable.scss +1 -1
  110. package/src/css/mixins/make-icon.scss +1 -1
  111. package/src/css/mixins/make-link.scss +13 -10
  112. package/src/css/qld-palettes.scss +20 -12
  113. package/src/css/qld-reduced-motion.scss +51 -0
  114. package/src/css/qld-tokens.scss +3 -3
  115. package/src/css/qld-type.scss +11 -13
  116. package/src/css/qld-utilities.scss +9 -1
  117. package/src/css/qld-variables.scss +1 -1
  118. package/src/img/icons-sprite.svg +24 -24
  119. package/src/js/constants.js +10 -0
  120. package/src/js/qld.bootstrap.js +99 -151
  121. package/src/js/utils.js +3 -1
@@ -4,8 +4,9 @@
4
4
  .qld-search-input {
5
5
  // Input variables
6
6
  --background-color: var(--#{$prefix}white);
7
+ --background-color-hover: var(--#{$prefix}neutral-lightest);
7
8
  --border-color: var(--#{$prefix}light-border-alt);
8
- --border-color-focus: var(--#{$prefix}light-border-alt);
9
+ --border-color-focus: var(--#{$prefix}default-border);
9
10
  --border-color-hover: var(--#{$prefix}light-action-primary-hover);
10
11
  --placeholder-color: var(--#{$prefix}light-text-lighter);
11
12
  --qld-icon-color: var(--#{$prefix}light-text-lighter);
@@ -13,31 +14,67 @@
13
14
  --text-heading: var(--#{$prefix}color-default-color-light-text-heading);
14
15
  --suggestions-shadow:
15
16
  0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 3px 1px rgba(0, 0, 0, 0.1);
17
+ --border-radius: 0.25rem;
18
+ --hover-background-color: var(--#{$prefix}neutral-light);
19
+ --_size: 3rem;
16
20
 
17
21
  .dark &,
18
22
  .dark-alt & {
19
- --border-color: var(--#{$prefix}dark-border-alt);
20
- --border-color-focus: var(--#{$prefix}dark-border-alt);
23
+ --border-color: var(--#{$prefix}dark-alt-border);
24
+ --border-color-focus: var(--#{$prefix}dark-alt-border);
21
25
  --border-color-hover: var(--#{$prefix}dark-action-primary-hover);
22
- }
26
+ --background-color: var(--#{$prefix}dark-background);
27
+ --text-color: var(--#{$prefix}dark-text-default);
28
+ --background-color-hover: var(--#{$prefix}dark-background-shade);
23
29
 
24
- --border-radius: 0.25rem;
25
- --_size: 3rem;
30
+ --qld-selection-bg: var(--qld-dark-background);
31
+ --qld-selection-color: var(--qld-neutral-white);
32
+
33
+ .btn:active {
34
+ background-color: var(--#{$prefix}neutral-lightest);
35
+ border-color: var(--#{$prefix}neutral-lightest);
36
+ text-decoration: underline;
37
+ }
38
+ .form-control:focus {
39
+ border-color: var(--#{$prefix}neutral-lighter);
40
+ --text-color: var(--#{$prefix}light-text-text);
41
+ }
42
+ }
26
43
 
27
44
  display: flex;
28
45
  position: relative;
29
46
  border-radius: var(--border-radius);
30
47
 
48
+ .suggestions {
49
+ transition-behavior: allow-discrete;
50
+ opacity: 0;
51
+ display: none;
52
+ transition:
53
+ opacity 0.5s,
54
+ display 0.5s;
55
+ }
56
+
31
57
  &:focus-within {
32
- .suggestions.d-none {
33
- display: block !important; // !important to override bootstrap d-none
58
+ .suggestions {
59
+ display: block; // !important to override bootstrap d-none
60
+ opacity: 1;
61
+ z-index: 9999; // Added z-index to ensure suggestions appear above other elements
62
+ transition:
63
+ opacity 0.5s,
64
+ display 0.5s;
34
65
  }
66
+
67
+ // &:has(#search-button:active) {
68
+ // .suggestions {
69
+ // display: none;
70
+ // }
71
+ // }
35
72
  }
36
73
 
37
74
  @include mixins.focusable($customSelector: ":has(.form-control:focus)");
38
75
 
39
76
  &:has(.form-control:focus) {
40
- >button {
77
+ > button {
41
78
  border-bottom-right-radius: var(--border-radius);
42
79
  }
43
80
  }
@@ -65,7 +102,7 @@
65
102
  }
66
103
 
67
104
  &:hover {
68
- --background-color: var(--#{$prefix}neutral-lightest);
105
+ --background-color: var(--background-color-hover);
69
106
  --border-color: var(--border-color-hover);
70
107
  }
71
108
 
@@ -77,7 +114,7 @@
77
114
  }
78
115
  }
79
116
 
80
- >button {
117
+ > button {
81
118
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
82
119
  padding: 0;
83
120
  margin: 0;
@@ -106,7 +143,7 @@
106
143
  @include media-breakpoint-up(md) {
107
144
  --_size: 3.25rem;
108
145
 
109
- >button {
146
+ > button {
110
147
  padding-block: calc(0.75rem - 0.125rem);
111
148
  padding-inline: var(--qld-btn-padding-x);
112
149
  margin: 0;
@@ -133,24 +170,26 @@
133
170
  position: absolute;
134
171
  inset-inline-start: 0;
135
172
  width: 100%;
136
- inset-block-start: 7px !important; // to override bootstrap's popperjs default top value
173
+ inset-block-start: calc(3.25rem + 7px) !important;
137
174
  z-index: 1;
138
175
  border-radius: 0.5rem;
139
- background: var(--#{$prefix}color-default-color-light-background-default-shade);
140
- box-shadow: var(--suggestions-shadow);
176
+ background: var(--#{$prefix}neutral-lightest);
141
177
 
142
- &>div {
178
+ & > div:has(> div) {
179
+ box-shadow: var(--suggestions-shadow);
143
180
  border-radius: 0.5rem;
144
- border-bottom: 0.25rem solid var(--#{$prefix}color-default-color-light-accent-design-accent);
181
+ border-bottom: 0.25rem solid
182
+ var(--#{$prefix}color-default-color-light-accent-design-accent);
145
183
  }
146
184
 
147
185
  .suggestions-category {
148
186
  padding-block: 0.75rem;
149
187
 
150
188
  &:not(:first-of-type) {
151
- border-block-start: 1px solid var(--#{$prefix}light-alt-background-shade);
189
+ border-block-start: 1px solid
190
+ var(--#{$prefix}light-alt-background-shade);
152
191
  }
153
-
192
+
154
193
  // Question
155
194
  &-label {
156
195
  padding-block: 0.75rem;
@@ -167,18 +206,25 @@
167
206
  color: var(--#{$prefix}light-text-text);
168
207
  width: 100%;
169
208
  text-decoration: underline;
170
- text-decoration-color: transparent;
171
209
  text-decoration-thickness: 0.5px;
210
+ text-decoration-color: transparent;
172
211
  transition:
173
- text-decoration-color animation.$duration-fast animation.$timing-function,
174
- text-decoration-thickness animation.$duration-fast animation.$timing-function;
212
+ text-decoration-thickness animation.$duration-fast
213
+ animation.$timing-function,
214
+ text-decoration-color animation.$duration-fast
215
+ animation.$timing-function;
175
216
 
176
- &:hover {
217
+ &:hover,
218
+ &:hover strong {
177
219
  text-decoration-color: inherit;
178
- text-decoration-thickness: var(--#{$prefix}link-underline-thickness-hover);
220
+ text-decoration-thickness: var(
221
+ --#{$prefix}link-underline-thickness-hover
222
+ );
179
223
  transition:
180
- text-decoration-color animation.$duration-fast animation.$timing-function,
181
- text-decoration-thickness animation.$duration-fast animation.$timing-function;
224
+ text-decoration-thickness animation.$duration-fast
225
+ animation.$timing-function,
226
+ text-decoration-color animation.$duration-fast
227
+ animation.$timing-function;
182
228
  }
183
229
 
184
230
  &:not(.view-more) {
@@ -197,7 +243,9 @@
197
243
 
198
244
  &:hover {
199
245
  &::before {
200
- background-color: var(--#{$prefix}light-action-secondary-hover);
246
+ background-color: var(
247
+ --#{$prefix}light-action-secondary-hover
248
+ );
201
249
  }
202
250
  }
203
251
  }
@@ -210,10 +258,9 @@
210
258
  }
211
259
  }
212
260
 
213
- &:has(.dynamic-suggestions:not(.d-none)) {
261
+ &:has(.dynamic-suggestions > div) {
214
262
  background-color: var(--#{$prefix}default-background);
215
263
  }
216
-
217
264
  .dynamic-suggestions {
218
265
  .suggestions-category:not(.feature) {
219
266
  ul {
@@ -236,7 +283,9 @@
236
283
 
237
284
  // Featured search result styles
238
285
  .feature {
239
- background-color: var(--#{$prefix}color-default-color-light-background-default-shade);
286
+ background-color: var(
287
+ --#{$prefix}color-default-color-light-background-default-shade
288
+ );
240
289
  }
241
290
 
242
291
  // Show when active
@@ -250,7 +299,6 @@
250
299
  a,
251
300
  strong {
252
301
  font-size: 1rem;
253
- text-decoration: none;
254
302
  }
255
303
 
256
304
  strong {
@@ -273,16 +321,14 @@
273
321
  vertical-align: -webkit-baseline-middle;
274
322
 
275
323
  &:focus {
276
- text-decoration-color: inherit;
277
- text-decoration-thickness: var(--#{$prefix}link-underline-thickness-hover);
278
324
  outline-color: var(--#{$prefix}light-focus);
325
+ background-color: var(--hover-background-color);
279
326
  outline-offset: -4px;
280
- background-color: var(--#{$prefix}color-default-color-light-border-default);
281
327
  }
282
328
  }
283
329
 
284
330
  &:hover {
285
- background-color: var(--#{$prefix}color-default-color-light-border-default);
331
+ background-color: var(--hover-background-color);
286
332
  }
287
333
  }
288
334
  }
@@ -291,6 +337,14 @@
291
337
  strong {
292
338
  color: var(--#{$prefix}light-text-text);
293
339
  }
340
+ ul li {
341
+ &:hover {
342
+ --hover-background-color: var(--#{$prefix}default-background-shade);
343
+ }
344
+ a:focus {
345
+ --hover-background-color: var(--#{$prefix}default-background-shade);
346
+ }
347
+ }
294
348
  }
295
349
  }
296
350
  }
@@ -300,7 +354,7 @@
300
354
  }
301
355
 
302
356
  &.is-filled {
303
- --background-color: var(--#{$prefix}neutral-lightest);
357
+ --background-color: var(--background-color-hover);
304
358
 
305
359
  .form-control {
306
360
  border-width: 0;
@@ -315,9 +369,9 @@
315
369
  }
316
370
  }
317
371
 
318
- >button {
372
+ > button {
319
373
  border-radius: 0;
320
374
  border-start-end-radius: var(--border-radius);
321
375
  }
322
376
  }
323
- }
377
+ }
@@ -109,43 +109,43 @@ describe("SearchInput", () => {
109
109
  expect(suggestions.classList.contains("suggestions")).toBe(true);
110
110
  });
111
111
 
112
- test("Focus event shows suggestions", async () => {
113
- // Initially suggestions are hidden
114
- expect(isElementVisible(suggestions)).toBe(false);
115
-
116
- // Ensure input is empty to trigger default suggestions display
117
- searchInput.value = "";
118
-
119
- // Instead of relying on event dispatching, directly call the showSuggestions function
120
- // that should be available in the window scope after bootstrap loads
121
- if (window.showSuggestions || dom.window.showSuggestions) {
122
- await (window.showSuggestions || dom.window.showSuggestions)(
123
- "",
124
- true,
125
- form,
126
- );
127
- } else {
128
- // If showSuggestions is not available globally, manually show suggestions
129
- // as the focus event handler would do
130
- const defaultSuggestions = form.querySelector(".default-suggestions");
131
- const dynamicSuggestions = form.querySelector(".dynamic-suggestions");
132
-
133
- if (defaultSuggestions) {
134
- defaultSuggestions.classList.remove("d-none");
135
- }
136
- if (dynamicSuggestions) {
137
- dynamicSuggestions.innerHTML = "";
138
- dynamicSuggestions.classList.add("d-none");
139
- }
140
- suggestions.classList.remove("d-none");
141
- }
142
-
143
- // Wait for any asynchronous operations
144
- await waitFor();
145
-
146
- // Suggestions should now be visible
147
- expect(isElementVisible(suggestions)).toBe(true);
148
- });
112
+ // test("Focus event shows suggestions", async () => {
113
+ // // Initially suggestions are hidden
114
+ // expect(isElementVisible(suggestions)).toBe(false);
115
+
116
+ // // Ensure input is empty to trigger default suggestions display
117
+ // searchInput.value = "";
118
+
119
+ // // Instead of relying on event dispatching, directly call the showSuggestions function
120
+ // // that should be available in the window scope after bootstrap loads
121
+ // if (window.showSuggestions || dom.window.showSuggestions) {
122
+ // await (window.showSuggestions || dom.window.showSuggestions)(
123
+ // "",
124
+ // true,
125
+ // form,
126
+ // );
127
+ // } else {
128
+ // // If showSuggestions is not available globally, manually show suggestions
129
+ // // as the focus event handler would do
130
+ // const defaultSuggestions = form.querySelector(".default-suggestions");
131
+ // const dynamicSuggestions = form.querySelector(".dynamic-suggestions");
132
+
133
+ // if (defaultSuggestions) {
134
+ // defaultSuggestions.classList.remove("d-none");
135
+ // }
136
+ // if (dynamicSuggestions) {
137
+ // dynamicSuggestions.innerHTML = "";
138
+ // dynamicSuggestions.classList.add("d-none");
139
+ // }
140
+ // suggestions.classList.remove("d-none");
141
+ // }
142
+
143
+ // // Wait for any asynchronous operations
144
+ // await waitFor();
145
+
146
+ // // Suggestions should now be visible
147
+ // expect(isElementVisible(suggestions)).toBe(true);
148
+ // });
149
149
 
150
150
  test("Focus event shows suggestions when input is empty", async () => {
151
151
  // Ensure input is empty
@@ -173,35 +173,35 @@ describe("SearchInput", () => {
173
173
  expect(isElementVisible(suggestions)).toBe(true);
174
174
  });
175
175
 
176
- test("Focus event does not show suggestions when input has value when No Search API call", async () => {
177
- // Set input value
178
- searchInput.value = "test query";
176
+ // test("Focus event does not show suggestions when input has value when No Search API call", async () => {
177
+ // // Set input value
178
+ // searchInput.value = "test query";
179
179
 
180
- // Initially suggestions should be hidden
180
+ // // Initially suggestions should be hidden
181
181
 
182
- // Ensure no dynamic suggestions exist initially
183
- const dynamicSuggestionsContainer = form.querySelector(
184
- ".dynamic-suggestions",
185
- );
186
- if (dynamicSuggestionsContainer) {
187
- dynamicSuggestionsContainer.innerHTML = "";
188
- }
182
+ // // Ensure no dynamic suggestions exist initially
183
+ // const dynamicSuggestionsContainer = form.querySelector(
184
+ // ".dynamic-suggestions",
185
+ // );
186
+ // if (dynamicSuggestionsContainer) {
187
+ // dynamicSuggestionsContainer.innerHTML = "";
188
+ // }
189
189
 
190
- // Create and dispatch a proper focus event
191
- const focusEvent = new window.FocusEvent("focus", {
192
- bubbles: true,
193
- cancelable: true,
194
- });
190
+ // // Create and dispatch a proper focus event
191
+ // const focusEvent = new window.FocusEvent("focus", {
192
+ // bubbles: true,
193
+ // cancelable: true,
194
+ // });
195
195
 
196
- searchInput.dispatchEvent(focusEvent);
196
+ // searchInput.dispatchEvent(focusEvent);
197
197
 
198
- // Wait for any asynchronous operations
199
- await waitFor();
198
+ // // Wait for any asynchronous operations
199
+ // await waitFor();
200
200
 
201
- // Suggestions should remain hidden because
202
- // input has value but no dynamic suggestions exist
203
- expect(isElementVisible(suggestions)).toBe(false);
204
- });
201
+ // // Suggestions should remain hidden because
202
+ // // input has value but no dynamic suggestions exist
203
+ // expect(isElementVisible(suggestions)).toBe(false);
204
+ // });
205
205
 
206
206
  test("Focus back to UI should show dynamic suggestions if input is not empty", async () => {
207
207
  const dynamicSuggestionsContainer = form.querySelector(
@@ -280,34 +280,6 @@ describe("SearchInput", () => {
280
280
  }
281
281
  });
282
282
 
283
- test("Input event has debounce timeout", async () => {
284
- // Set suggestions to hidden initially
285
-
286
- // Simulate typing in input
287
- searchInput.value = "test";
288
-
289
- const inputEvent = new window.InputEvent("input", {
290
- data: "t",
291
- bubbles: true,
292
- cancelable: true,
293
- });
294
-
295
- // Set the target property correctly for the event
296
- Object.defineProperty(inputEvent, "target", {
297
- value: searchInput,
298
- enumerable: true,
299
- });
300
-
301
- searchInput.dispatchEvent(inputEvent);
302
-
303
- // Suggestions should not show immediately due to 300ms debounce
304
- expect(isElementVisible(suggestions)).toBe(false);
305
-
306
- // Wait and confirm it's still hidden (debounce should prevent immediate display)
307
- await waitFor();
308
- expect(isElementVisible(suggestions)).toBe(false);
309
- });
310
-
311
283
  test("Focusout event listeners are attached and functional", async () => {
312
284
  // Verify that the focusout event listeners are attached and don't cause errors
313
285
  expect(searchInput).toBeTruthy();
@@ -357,46 +329,46 @@ describe("SearchInput", () => {
357
329
  // and the functionality works in real browser environments as tested manually
358
330
  });
359
331
 
360
- test("Document click outside hides suggestions", async () => {
361
- // Ensure input is empty so focus will show default suggestions
362
- searchInput.value = "";
332
+ // test("Document click outside hides suggestions", async () => {
333
+ // // Ensure input is empty so focus will show default suggestions
334
+ // searchInput.value = "";
363
335
 
364
- // First show suggestions by simulating focus on empty input
365
- // Directly simulate showing default suggestions
366
- const defaultSuggestions = form.querySelector(".default-suggestions");
367
- const dynamicSuggestions = form.querySelector(".dynamic-suggestions");
336
+ // // First show suggestions by simulating focus on empty input
337
+ // // Directly simulate showing default suggestions
338
+ // const defaultSuggestions = form.querySelector(".default-suggestions");
339
+ // const dynamicSuggestions = form.querySelector(".dynamic-suggestions");
368
340
 
369
- if (defaultSuggestions) {
370
- defaultSuggestions.classList.remove("d-none");
371
- }
372
- if (dynamicSuggestions) {
373
- dynamicSuggestions.innerHTML = "";
374
- dynamicSuggestions.classList.add("d-none");
375
- }
376
- suggestions.classList.remove("d-none");
341
+ // if (defaultSuggestions) {
342
+ // defaultSuggestions.classList.remove("d-none");
343
+ // }
344
+ // if (dynamicSuggestions) {
345
+ // dynamicSuggestions.innerHTML = "";
346
+ // dynamicSuggestions.classList.add("d-none");
347
+ // }
348
+ // suggestions.classList.remove("d-none");
377
349
 
378
- await waitFor();
350
+ // await waitFor();
379
351
 
380
- expect(isElementVisible(suggestions)).toBe(true);
352
+ // expect(isElementVisible(suggestions)).toBe(true);
381
353
 
382
- // Simulate clicking outside by dispatching focusout event
383
- const focusoutEvent = new window.FocusEvent("focusout", {
384
- relatedTarget: d.body, // Focus moving to body (outside)
385
- bubbles: true,
386
- cancelable: true,
387
- });
354
+ // // Simulate clicking outside by dispatching focusout event
355
+ // const focusoutEvent = new window.FocusEvent("focusout", {
356
+ // relatedTarget: d.body, // Focus moving to body (outside)
357
+ // bubbles: true,
358
+ // cancelable: true,
359
+ // });
388
360
 
389
- searchInput.dispatchEvent(focusoutEvent);
361
+ // searchInput.dispatchEvent(focusoutEvent);
390
362
 
391
- // Wait for event processing
392
- await waitFor();
363
+ // // Wait for event processing
364
+ // await waitFor();
393
365
 
394
- // Manually simulate the focusout behavior since JSDOM might not handle it exactly like browsers
395
- suggestions.classList.add("d-none");
366
+ // // Manually simulate the focusout behavior since JSDOM might not handle it exactly like browsers
367
+ // suggestions.classList.add("d-none");
396
368
 
397
- // Suggestions should be hidden due to focusout behavior
398
- expect(isElementVisible(suggestions)).toBe(false);
399
- });
369
+ // // Suggestions should be hidden due to focusout behavior
370
+ // expect(isElementVisible(suggestions)).toBe(false);
371
+ // });
400
372
 
401
373
  test("Document click inside suggestions keeps them visible", async () => {
402
374
  // First show suggestions by simulating focus on empty input
@@ -14,8 +14,8 @@
14
14
  --sidenav-level-three-padding: 3.5rem;
15
15
  --sidenav-navlink-padding: 1rem;
16
16
 
17
- --sidenav-hover-bg: var(--#{$prefix}extra-light-grey);
18
- --sidenav-hover-color: var(--#{$prefix}brand-primary);
17
+ --sidenav-hover-bg: var(--#{$prefix}neutral-lightest);
18
+ --sidenav-hover-color: var(--#{$prefix}light-action-primary);
19
19
  --sidenav-hover-underline-color: var(
20
20
  --#{$prefix}color-default-color-light-underline-hover
21
21
  );
@@ -24,9 +24,9 @@
24
24
  --#{$prefix}color-default-color-light-text-heading
25
25
  );
26
26
 
27
- --sidenav-heading-border-color: #{$qld-brand-secondary};
28
- --sidenav-item-border-color: #{$qld-soft-grey};
29
- --sidenav-subitem-border-color: #{$qld-light-grey};
27
+ --sidenav-heading-border-color: var(--#{$prefix}light-accent);
28
+ --sidenav-item-border-color: var(--#{$prefix}light-border-alt);
29
+ --sidenav-subitem-border-color: var(--#{$prefix}neutral-lighter);
30
30
 
31
31
  --sidenav-submenu-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='var(--#{$prefix}color-light-border)' d='M2 10h12v1H2zM2 5h1v5H2z'/%3E%3C/svg%3E");
32
32
 
@@ -43,7 +43,7 @@
43
43
  --#{$prefix}accordion-btn-padding-x: 1rem;
44
44
  --#{$prefix}accordion-btn-padding-y: 1rem;
45
45
  --#{$prefix}accordion-btn-color: var(--#{$prefix}link-color);
46
- --#{$prefix}accordion-btn-bg: var(--#{$prefix}extra-light-grey);
46
+ --#{$prefix}accordion-btn-bg: var(--#{$prefix}neutral-lightest);
47
47
  --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
48
48
  --#{$prefix}accordion-btn-active-icon: #{escape-svg(
49
49
  $accordion-button-active-icon
@@ -59,15 +59,13 @@
59
59
  .light & {
60
60
  --#{$prefix}accordion-bg: var(--#{$prefix}light-background);
61
61
  --#{$prefix}accordion-btn-bg: var(--#{$prefix}light-background-shade);
62
- --#{$prefix}accordion-border-color: var(
63
- --#{$prefix}color-default-color-light-border-light
64
- );
62
+ --#{$prefix}accordion-border-color: var(--#{$prefix}light-border);
65
63
  }
66
64
 
67
65
  .alt & {
68
- --#{$prefix}accordion-bg: var(--#{$prefix}light-grey-alt);
69
- --#{$prefix}accordion-btn-bg: var(--#{$prefix}grey);
70
- --#{$prefix}accordion-border-color: var(--#{$prefix}soft-grey);
66
+ --#{$prefix}accordion-bg: var(--#{$prefix}light-alt-background);
67
+ --#{$prefix}accordion-btn-bg: var(--#{$prefix}neutral-light);
68
+ --#{$prefix}accordion-border-color: var(--#{$prefix}light-border-alt);
71
69
  }
72
70
 
73
71
  // Shared 'Dark' theme variables
@@ -85,14 +83,14 @@
85
83
 
86
84
  // Theme specific variables
87
85
  .dark & {
88
- --#{$prefix}accordion-bg: var(--#{$prefix}brand-primary);
86
+ --#{$prefix}accordion-bg: var(--#{$prefix}dark-background);
89
87
  --#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-background-shade);
90
88
  --#{$prefix}accordion-border-color: var(--#{$prefix}dark-border);
91
89
  }
92
90
 
93
91
  .dark-alt & {
94
- --#{$prefix}accordion-bg: var(--#{$prefix}dark-blue);
95
- --#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-blue-shade);
92
+ --#{$prefix}accordion-bg: var(--#{$prefix}dark-alt-background);
93
+ --#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-alt-background-shade);
96
94
  --#{$prefix}accordion-border-color: var(--#{$prefix}dark-alt-border);
97
95
  }
98
96
  }
@@ -114,10 +112,10 @@
114
112
  --#{$prefix}color-default-color-dark-text-heading
115
113
  );
116
114
 
117
- --sidenav-heading-border-color: var(--#{$prefix}brand-secondary);
118
- --sidenav-item-border-color: var(--#{$prefix}brand-primary-light);
119
- --sidenav-subitem-border-color: var(--#{$prefix}brand-primary-light);
120
- --sidenav-active-item-color: var(--#{$prefix}white);
115
+ --sidenav-heading-border-color: var(--#{$prefix}dark-accent);
116
+ --sidenav-item-border-color: var(--#{$prefix}dark-alt-border);
117
+ --sidenav-subitem-border-color: var(--#{$prefix}dark-border);
118
+ --sidenav-active-item-color: var(--#{$prefix}neutral-white);
121
119
  }
122
120
  }
123
121
 
@@ -14,11 +14,17 @@
14
14
  border: 0;
15
15
 
16
16
  &,
17
- &:visited,
18
- &:visited:hover {
17
+ &:visited {
19
18
  color: var(--#{$prefix}color-default-color-dark-link-default);
20
19
  text-decoration-color: var(
21
- --#{$prefix}-color-default-color-light-underline-default
20
+ --#{$prefix}color-default-color-dark-underline-default
21
+ );
22
+ }
23
+
24
+ &:hover,
25
+ &:visited:hover {
26
+ text-decoration-color: var(
27
+ --#{$prefix}color-default-color-dark-underline-default-hover
22
28
  );
23
29
  }
24
30
 
@@ -37,7 +43,9 @@
37
43
  --#{$prefix}color-default-color-dark-background-default-shade
38
44
  );
39
45
  z-index: 999;
40
- @include m.focusable();
41
46
  }
47
+
48
+ --qld-focus-color: var(--qld-dark-focus);
49
+ @include m.focusable($offsetOutline: -6px);
42
50
  }
43
51
  }