@qld-gov-au/qgds-bootstrap5 2.1.1 → 2.1.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 (68) hide show
  1. package/dist/assets/components/bs5/button/button.hbs +2 -1
  2. package/dist/assets/components/bs5/dateinput/dateinput.hbs +3 -3
  3. package/dist/assets/components/bs5/formcheck/formcheck.hbs +1 -1
  4. package/dist/assets/components/bs5/head/head.hbs +1 -1
  5. package/dist/assets/components/bs5/select/select.hbs +1 -1
  6. package/dist/assets/components/bs5/textarea/textarea.hbs +1 -1
  7. package/dist/assets/components/bs5/textbox/textbox.hbs +1 -1
  8. package/dist/assets/css/qld.bootstrap.css +2 -2
  9. package/dist/assets/css/qld.bootstrap.css.map +2 -2
  10. package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
  11. package/dist/assets/css/qld.bootstrap.legacy.css.map +2 -2
  12. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  13. package/dist/assets/js/handlebars.init.min.js +11 -10
  14. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  15. package/dist/assets/js/handlebars.partials.js +11 -10
  16. package/dist/assets/js/handlebars.partials.js.map +2 -2
  17. package/dist/assets/js/qld.bootstrap.min.js +6 -6
  18. package/dist/assets/js/qld.bootstrap.min.js.map +3 -3
  19. package/dist/assets/node/handlebars.init.min.js +8 -7
  20. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  21. package/dist/components/bs5/button/button.hbs +2 -1
  22. package/dist/components/bs5/dateinput/dateinput.hbs +3 -3
  23. package/dist/components/bs5/formcheck/formcheck.hbs +1 -1
  24. package/dist/components/bs5/head/head.hbs +1 -1
  25. package/dist/components/bs5/select/select.hbs +1 -1
  26. package/dist/components/bs5/textarea/textarea.hbs +1 -1
  27. package/dist/components/bs5/textbox/textbox.hbs +1 -1
  28. package/dist/package.json +1 -1
  29. package/package.json +1 -1
  30. package/src/components/bs5/accordion/mdx/_designResources.mdx +0 -1
  31. package/src/components/bs5/backToTop/backToTop.mdx +0 -1
  32. package/src/components/bs5/banner/Banner.mdx +0 -1
  33. package/src/components/bs5/blockquote/Blockquote.mdx +0 -1
  34. package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +0 -1
  35. package/src/components/bs5/button/Button.mdx +0 -1
  36. package/src/components/bs5/button/button.hbs +2 -1
  37. package/src/components/bs5/callToAction/callToAction.mdx +0 -1
  38. package/src/components/bs5/callout/Callout.mdx +0 -1
  39. package/src/components/bs5/card/Card.mdx +0 -1
  40. package/src/components/bs5/dateinput/dateinput.hbs +3 -3
  41. package/src/components/bs5/directionLinks/DirectionLinks.mdx +0 -1
  42. package/src/components/bs5/footer/Footer.mdx +0 -1
  43. package/src/components/bs5/formcheck/formcheck.hbs +1 -1
  44. package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +1 -3
  45. package/src/components/bs5/formcheck/stories/radio/Radio.mdx +0 -1
  46. package/src/components/bs5/globalAlert/GlobalAlert.mdx +0 -1
  47. package/src/components/bs5/header/header.scss +1 -1
  48. package/src/components/bs5/image/Image.mdx +0 -1
  49. package/src/components/bs5/inpageAlert/InpageAlert.mdx +0 -1
  50. package/src/components/bs5/inpagenav/Inpagenav.mdx +0 -1
  51. package/src/components/bs5/link/link.mdx +1 -3
  52. package/src/components/bs5/linkColumns/linkColumns.mdx +0 -1
  53. package/src/components/bs5/navbar/navbar.scss +75 -13
  54. package/src/components/bs5/pageLayout/pageLayout.stories.js +2 -0
  55. package/src/components/bs5/pagination/Pagination.mdx +0 -1
  56. package/src/components/bs5/pagination/pagination.scss +14 -18
  57. package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +0 -1
  58. package/src/components/bs5/searchInput/SearchInput.mdx +1 -1
  59. package/src/components/bs5/searchInput/search.functions.js +48 -2
  60. package/src/components/bs5/select/select.hbs +1 -1
  61. package/src/components/bs5/table/Table.mdx +0 -1
  62. package/src/components/bs5/tabs/Tabs.mdx +0 -1
  63. package/src/components/bs5/tag/Tag.mdx +0 -1
  64. package/src/components/bs5/textarea/textarea.hbs +1 -1
  65. package/src/components/bs5/textbox/textbox.hbs +1 -1
  66. package/src/components/bs5/video/Video.mdx +0 -1
  67. package/src/components/bs5/video/video.scss +1 -1
  68. package/src/css/mixins/focusable.scss +1 -1
@@ -1,6 +1,8 @@
1
1
  // QGDS QOL Pagination
2
2
  // extends https://getbootstrap.com/docs/5.3/components/pagination/#variables
3
3
 
4
+ @use "../../../css/mixins" as m;
5
+
4
6
  //PREV NEXT ARROW on default background
5
7
  $pagination-icon-prevnext-color: var(--#{$prefix}light-action-secondary);
6
8
  $pagination-icon-prevnext-hover-color: var(
@@ -45,7 +47,7 @@ $pagination-icon-more-dark-hover-color: var(--#{$prefix}dark-action-secondary);
45
47
  --#{$prefix}pagination-focus-border-color: var(
46
48
  --#{$prefix}dark-action-secondary
47
49
  );
48
- --#{$prefix}pagination-focus-outline-color: var(--#{$prefix}light-link);
50
+ --#{$prefix}focus-color: var(--#{$prefix}light-focus);
49
51
  --#{$prefix}pagination-focus-bg: transparent;
50
52
 
51
53
  //Hover
@@ -99,7 +101,7 @@ $pagination-icon-more-dark-hover-color: var(--#{$prefix}dark-action-secondary);
99
101
  --#{$prefix}pagination-focus-border-color: var(
100
102
  --#{$prefix}dark-action-secondary
101
103
  );
102
- --#{$prefix}pagination-focus-outline-color: var(--#{$prefix}dark-focus);
104
+ --#{$prefix}focus-color: var(--#{$prefix}dark-focus);
103
105
  --#{$prefix}pagination-focus-bg: transparent;
104
106
 
105
107
  //Hover
@@ -171,9 +173,7 @@ $pagination-icon-more-dark-hover-color: var(--#{$prefix}dark-action-secondary);
171
173
  background-color: var(--#{$prefix}pagination-hover-bg);
172
174
  }
173
175
 
174
- &:focus {
175
- outline: 2px solid var(--#{$prefix}pagination-focus-outline-color);
176
- outline-offset: 2px;
176
+ @include m.focusable($offsetOutline: 2px) {
177
177
  border-color: var(--#{$prefix}pagination-hover-border-color);
178
178
  box-shadow: inset 0 0 0 1px
179
179
  var(--#{$prefix}pagination-hover-border-color);
@@ -245,9 +245,7 @@ $pagination-icon-more-dark-hover-color: var(--#{$prefix}dark-action-secondary);
245
245
  box-shadow: none;
246
246
  }
247
247
 
248
- &:focus {
249
- outline: 2px solid var(--#{$prefix}pagination-focus-outline-color);
250
- outline-offset: 2px;
248
+ @include m.focusable($offsetOutline: 2px) {
251
249
  border: none;
252
250
  box-shadow: none;
253
251
  }
@@ -260,18 +258,16 @@ $pagination-icon-more-dark-hover-color: var(--#{$prefix}dark-action-secondary);
260
258
  background-color: var(--#{$prefix}pagination-active-bg);
261
259
  border-color: var(--#{$prefix}pagination-active-border-color);
262
260
 
263
- &:hover {
264
- border-color: var(--#{$prefix}pagination-active-bg);
265
- box-shadow: var(--#{$prefix}pagination-active-dropshadow);
266
- background-color: var(--#{$prefix}pagination-active-hover-bg);
261
+ @include m.focusable($offsetOutline: 2px) {
262
+ box-shadow: none;
263
+ border-color: var(--#{$prefix}pagination-active-focus-bg);
264
+ background-color: var(--#{$prefix}pagination-active-focus-bg);
267
265
  }
268
266
 
269
- &:focus {
270
- outline: 2px solid var(--#{$prefix}pagination-focus-outline-color);
271
- outline-offset: 2px;
272
- border-color: var(--#{$prefix}pagination-active-bg);
273
- box-shadow: var(--#{$prefix}pagination-active-dropshadow);
274
- background-color: var(--#{$prefix}pagination-active-focus-bg);
267
+ &:hover {
268
+ box-shadow: none;
269
+ border-color: var(--#{$prefix}pagination-active-hover-bg);
270
+ background-color: var(--#{$prefix}pagination-active-hover-bg);
275
271
  }
276
272
  }
277
273
 
@@ -10,7 +10,6 @@ import defaultdata from "./promotionalPanel.data.json";
10
10
 
11
11
  ## Design resources
12
12
 
13
- - [Component library (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=23269-286312&p=f&t=SY0WW7uiwAl3ioEj-0)
14
13
  - [Master component file (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=23269-286312&p=f&t=nVLTSHpRu8jvVSar-0)
15
14
  - [Design System website](https://www.designsystem.qld.gov.au/components/promotional-panel)
16
15
 
@@ -9,4 +9,4 @@ import * as SearchInputStories from "./searchInput.stories";
9
9
 
10
10
  ## Design resources
11
11
 
12
- - [Component library(Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?node-id=11017-307599&t=NGmPmPhkUQMN7qQw-0)
12
+ - [Component file (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?node-id=11017-307599&t=NGmPmPhkUQMN7qQw-0)
@@ -145,7 +145,30 @@ export async function showSuggestions(value = "", isDefault = false, form) {
145
145
  let linkItem = event.target.closest("a");
146
146
  if (linkItem) {
147
147
  event.preventDefault();
148
- selectDynamicSuggestion(linkItem.textContent, form);
148
+
149
+ // Check if the link has a valid absolute URL
150
+ const href = linkItem.getAttribute("href");
151
+ const isValidUrl =
152
+ href &&
153
+ href !== "#" &&
154
+ (() => {
155
+ try {
156
+ const url = new URL(href, window.location.origin);
157
+ return (
158
+ url.protocol === "http:" || url.protocol === "https:"
159
+ );
160
+ } catch {
161
+ return false;
162
+ }
163
+ })();
164
+
165
+ if (isValidUrl) {
166
+ // Navigate directly to the URL
167
+ window.location.href = href;
168
+ } else {
169
+ // Use the search suggestion flow
170
+ selectDynamicSuggestion(linkItem.textContent, form);
171
+ }
149
172
  }
150
173
  });
151
174
  } else {
@@ -200,7 +223,30 @@ export async function showSuggestions(value = "", isDefault = false, form) {
200
223
  let linkItem = event.target.closest("a");
201
224
  if (linkItem) {
202
225
  event.preventDefault();
203
- selectDynamicSuggestion(linkItem.textContent, form);
226
+
227
+ // Check if the link has a valid absolute URL
228
+ const href = linkItem.getAttribute("href");
229
+ const isValidUrl =
230
+ href &&
231
+ href !== "#" &&
232
+ (() => {
233
+ try {
234
+ const url = new URL(href, window.location.origin);
235
+ return (
236
+ url.protocol === "http:" || url.protocol === "https:"
237
+ );
238
+ } catch {
239
+ return false;
240
+ }
241
+ })();
242
+
243
+ if (isValidUrl) {
244
+ // Navigate directly to the URL
245
+ window.location.href = href;
246
+ } else {
247
+ // Use the search suggestion flow
248
+ selectDynamicSuggestion(linkItem.textContent, form);
249
+ }
204
250
  }
205
251
  });
206
252
  }
@@ -26,7 +26,7 @@
26
26
  {{/if}}{{/contains}}
27
27
 
28
28
  <select id={{id}} class="form-select {{#if isFilled}}is-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}} {{customClass}}"
29
- {{#if hint-text}}aria-describedby="{{id}}-hint"{{/if}} {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}} >
29
+ {{#if hint-text}}aria-describedby="{{id}}-hint"{{/if}} tabindex="0" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}} >
30
30
  <option selected value="">{{placeholder}}</option>
31
31
  <option value="1">Option 1</option>
32
32
  <option value="2">Option 2</option>
@@ -9,7 +9,6 @@ import * as TableStories from "./table.stories";
9
9
 
10
10
  ## Design resources
11
11
 
12
- - [Component library (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=23167-395552&mode=design&t=NREcuP5UOBB2Y6G4-4)
13
12
  - [Master component file (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=5990-97592&mode=design&t=YLfxdziHdqD2Ty0o-0)
14
13
  - [Design System website](https://www.designsystem.qld.gov.au/components/tables)
15
14
  - [Bootstrap component](https://getbootstrap.com/docs/5.3/content/tables/)
@@ -9,7 +9,6 @@ import * as TabsStories from "./tabs.stories";
9
9
 
10
10
  ## Design resources
11
11
 
12
- - [Component library (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=6247-38705&p=f&t=AHTplcCqsKKRWGvc-0)
13
12
  - [Master component file (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=25951-236134&p=f&t=GBRfQxrdnGxAh30j-0)
14
13
  - [Design System website](https://www.designsystem.qld.gov.au/components/tabs)
15
14
  - [Bootstrap component](https://getbootstrap.com/docs/5.3/components/navs-tabs/)
@@ -9,6 +9,5 @@ import * as TagStories from "./tag.stories";
9
9
 
10
10
  ## Design resources
11
11
 
12
- - [Component library (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=23167-395550&mode=design&t=NREcuP5UOBB2Y6G4-4)
13
12
  - [Master component file (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=5990-97596&mode=design&t=YLfxdziHdqD2Ty0o-0)
14
13
  - [Design System website](https://www.designsystem.qld.gov.au/components/tags)
@@ -28,5 +28,5 @@
28
28
 
29
29
  <!-- First text input field, described by the hint text above -->
30
30
  <textarea id="{{id}}" class="form-control {{customClass}} {{#if isFilled}}is-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}"
31
- placeholder="{{placeholder}}" rows="{{rows}}" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}
31
+ placeholder="{{placeholder}}" rows="{{rows}}" tabindex="0" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}
32
32
  {{#if hint-text}}aria-describedby="{{id}}-hint"{{/if}}>{{value}}</textarea>
@@ -27,5 +27,5 @@
27
27
  {{/if}}{{/contains}}
28
28
 
29
29
  <input id={{id}} {{#if value}}value="{{value}}"{{/if}} class="form-control {{customClass}} {{#if isFilled}}is-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}"
30
- type="text" placeholder="{{placeholder}}" {{#if isDisabled}}disabled{{/if}} {{#if
30
+ type="text" placeholder="{{placeholder}}" tabindex="0" {{#if isDisabled}}disabled{{/if}} {{#if
31
31
  isRequired}}required{{/if}} {{#if hint-text}}aria-describedby="{{id}}-hint"{{/if}} />
@@ -9,5 +9,4 @@ import * as VideoStories from "./video.stories";
9
9
 
10
10
  ## Design resources
11
11
 
12
- - [Component library (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=23203-295341&mode=design&t=eRH1gEfJNDna1ovz-4)
13
12
  - [Master component file (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=13297-214065&mode=design&t=YLfxdziHdqD2Ty0o-0)
@@ -256,7 +256,7 @@ $video-clock-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/20
256
256
  }
257
257
 
258
258
  .accordion {
259
- margin-bottom: 0;
259
+ margin: 0;
260
260
  grid-area: transcript;
261
261
  &-item {
262
262
  &,
@@ -18,7 +18,7 @@
18
18
  @if $offsetOutline == true {
19
19
  $offsetOutline: 2px;
20
20
  } @else if $offsetOutline == false {
21
- $offsetOutline: $initial-offset;
21
+ $offsetOutline: 0px;
22
22
  }
23
23
 
24
24
  outline: $outlineWidth solid transparent;