@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
@@ -10,7 +10,7 @@
10
10
 
11
11
  {{#unless islink}}
12
12
 
13
- <button class="btn {{variantClass}} {{#if isprogress}}btn-progress{{/if}} {{label}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if isprogress}}disabled aria-live="polite"{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}} {{#if progressLabel}}data-progress-label="{{progressLabel}}"{{/if}}>
13
+ <button class="btn {{variantClass}} {{#if isprogress}}btn-progress{{/if}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if isprogress}}disabled aria-live="polite"{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}} {{#if progressLabel}}data-progress-label="{{progressLabel}}"{{/if}}>
14
14
  {{#if isprogress}}
15
15
  {{~>progressSpinner~}}
16
16
  {{else}}
@@ -1,8 +1,8 @@
1
1
  <a class="qld-cta-link {{getClassNames "small, view-all" class}}"
2
2
  {{#if id}}id="{{id}}"{{/if}}
3
- href="{{href}}"
4
- target="{{target}}"
5
- {{#if arialabel}}aria-label="{{arialabel}}"{{/if}}
3
+ href="{{href}}"
4
+ target="{{target}}"
5
+ {{#if arialabel}}aria-label="{{arialabel}}"{{/if}}
6
6
  >
7
7
  {{label}}
8
8
  <span class="icon" aria-hidden="true"></span>
@@ -1,8 +1,6 @@
1
1
  <!-- QGDS Component: Date input -->
2
2
 
3
- <label id="{{id}}-label"
4
- class="qld-text-input-label {{#if isRequired}}field-required{{/if}} {{#if isDisabled}}field-disabled{{/if}}"
5
- for="{{id}}">
3
+ <label id="{{id}}-label" class="qld-text-input-label {{#if isRequired}}field-required{{/if}} {{#if isDisabled}}field-disabled{{/if}}" for="{{id}}">
6
4
  {{label-text}}
7
5
  {{#if optional-text}}
8
6
  <span class="label-text-optional">({{optional-text}})</span>
@@ -12,53 +10,49 @@
12
10
  {{#if hint-text}}
13
11
  <span class="qld-hint-text" id="{{id}}-hint">{{hint-text}}</span>
14
12
  {{/if}}
15
-
16
13
  {{#contains "qld-input-success" customClass}}{{! legacy support for feedback classes `qld-input-success`}}
17
14
  <span class="qld-input-success">{{successMessageText}}</span>
18
- {{else}}
19
- {{#if successMessageText}}{{! updated bootstrap style classes - `valid-feedback`}}
15
+ {{else if successMessageText}}{{! updated bootstrap style classes - `valid-feedback`}}
20
16
  <div class="valid-feedback">{{successMessageText}}</div>
21
- {{/if}}{{/contains}}
22
-
17
+ {{/contains}}
23
18
  {{#contains "qld-input-error" customClass}}{{! legacy support for feedback classes `qld-input-error`}}
24
19
  <span class="qld-input-error">{{errorMessageText}}</span>
25
- {{else}}
26
- {{#if errorMessageText}}{{! updated bootstrap style classes - `invalid-feedback`}}
20
+ {{else if errorMessageText}}{{! updated bootstrap style classes - `invalid-feedback`}}
27
21
  <div class="invalid-feedback">{{errorMessageText}}</div>
28
- {{/if}}{{/contains}}
22
+ {{/contains}}
29
23
 
30
24
  <div aria-labelledby="{{id}}-label" role="group" class="row date-container {{customClass}}">
31
25
  <!-- day group -->
32
26
  <div class="day-group">
33
27
  <label id="{{id}}-dayinput-label" for="{{id}}-dayinput" class="date-label qld-text-input-label">Day</label>
34
28
  <div>
35
- <input id="{{id}}-dayinput" aria-required="true" aria-labelledby="{{id}}-label {{id}}-dayinput-label" placeholder="{{day-placeholder}}" type="text"
36
- inputmode="numeric" maxlength="2"
37
- class="qld-text-input form-control dayinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}" ref="day"
38
- aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required aria-required="true"
39
- {{/if}}>
29
+ <input id="{{id}}-dayinput" aria-labelledby="{{id}}-label {{id}}-dayinput-label" placeholder="{{day-placeholder}}" type="text"
30
+ inputmode="numeric" maxlength="2" minlength="2" min="1" max="31" pattern="^(0?[1-9]|[12][0-9]|3[01])$"
31
+ class="form-control dayinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}}
32
+ {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}" ref="day"
33
+ aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}>
40
34
  </div>
41
35
  </div>
42
36
  <!-- month group -->
43
37
  <div class="date-group">
44
38
  <label id="{{id}}-monthinput-label" for="{{id}}-monthinput" class="date-label qld-text-input-label">Month</label>
45
39
  <div>
46
- <input id="{{id}}-monthinput" aria-required="true" aria-labelledby="{{id}}-label {{id}}-monthinput-label" placeholder="{{month-placeholder}}"
47
- type="text" inputmode="numeric" maxlength="2"
48
- class="qld-text-input form-control monthinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}" ref="month"
49
- aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required aria-required="true"
50
- {{/if}}>
40
+ <input id="{{id}}-monthinput" aria-labelledby="{{id}}-label {{id}}-monthinput-label" placeholder="{{month-placeholder}}"
41
+ type="text" inputmode="numeric" maxlength="2" minlength="2" min="1" max="12" pattern="^(0?[1-9]|[1][0-2])$"
42
+ class="form-control monthinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}}
43
+ {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}" ref="month"
44
+ aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}>
51
45
  </div>
52
46
  </div>
53
47
  <!-- year group -->
54
48
  <div class="date-group">
55
- <label id="{{id}}-yearinput-label" for="{{id}}-yearinput" class="date-label">Year</label>
49
+ <label id="{{id}}-yearinput-label" for="{{id}}-yearinput" class="date-label qld-text-input-label">Year</label>
56
50
  <div class="year-label">
57
- <input id="{{id}}-yearinput" aria-required="true" aria-labelledby="{{id}}-label {{id}}-yearinput-label"
58
- placeholder="{{year-placeholder}}" type="text" inputmode="numeric" maxlength="4"
59
- class="qld-text-input form-control yearinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}"
60
- ref="year" aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if
61
- isRequired}}required{{/if}}>
51
+ <input id="{{id}}-yearinput" aria-labelledby="{{id}}-label {{id}}-yearinput-label"
52
+ placeholder="{{year-placeholder}}" type="text" inputmode="numeric" maxlength="4" minlength="4" pattern="[0-9]*"
53
+ {{#if yearMin}}min="{{yearMin}}"{{/if}} {{#if yearMax}}max="{{yearMax}}"{{/if}}
54
+ class="form-control yearinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}"
55
+ ref="year" aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}>
62
56
  </div>
63
57
  </div>
64
58
  </div>
@@ -1,5 +1,5 @@
1
1
  {{#if customLinks }}
2
- <ul class="nav footer-link-list footer-link-list--custom flex-column">
2
+ <ul class="nav footer-link-list footer-link-list--custom flex-column">
3
3
  {{#each customLinks }}
4
4
  <li><a class="nav-link" href="{{ link }}" {{#if target }} target="_blank" {{/if}}>{{ label }}</a></li>
5
5
  {{/each }}
@@ -6,7 +6,7 @@
6
6
  <span class="qld-icon qld-icon-md qld-icon-{{icon}} d-lg-none" aria-hidden="true"></span>
7
7
  <span class="qld-icon qld-icon-sm qld-icon-{{icon}} d-none d-lg-block" aria-hidden="true"></span>
8
8
  <span class="nav-link-label d-none d-lg-block">{{ label }}</span>
9
- <span class="sr-only">{{ label }}</span>
9
+ <span class="sr-only">{{isdefined accessibleLabel label}}</span>
10
10
  </a>
11
11
  </li>
12
12
  {{/each }}
@@ -3,7 +3,13 @@
3
3
  <div class="global-alert-include">
4
4
  {{#each alertItems}}
5
5
  <section role="region" class="global-alert alert container-full d-none {{variant}}" data-variant="{{variant}}"
6
- aria-label="{{ariaLabel}}" {{#if id}} data-id="{{id}}" {{/if}}{{#if dismissedExpiryDays}}
6
+ {{#if ariaLabel}} aria-label="{{ ariaLabel }}"
7
+ {{~else ifCond variant "==" "global-alert-critical"}} aria-label="Critical alert"
8
+ {{~else ifCond variant "==" "global-alert-info"}} aria-label="Informational alert"
9
+ {{~else ifCond variant "==" "global-alert-warning"}} aria-label="Warning alert"
10
+ {{~else}} aria-label="Informational alert"
11
+ {{~/if}}
12
+ {{#if id}} data-id="{{id}}" {{/if}}{{#if dismissedExpiryDays}}
7
13
  data-expiry-days="{{dismissedExpiryDays}}" {{/if}}>
8
14
  <div class="qld-global-alert-main">
9
15
  <div class="global-alert-icon">
@@ -13,6 +19,7 @@
13
19
  <span class="qld-icon qld-icon-sm qld-icon-alert-information" aria-hidden="true"></span>
14
20
  {{else ifCond variant '==' 'global-alert-warning'}}
15
21
  <span class="qld-icon qld-icon-sm qld-icon-alert-warning" aria-hidden="true"></span>
22
+ {{else}}<span class="qld-icon qld-icon-sm qld-icon-alert-information" aria-hidden="true"></span>
16
23
  {{/ifCond}}
17
24
  </div>
18
25
 
@@ -1,5 +1,5 @@
1
1
 
2
- <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.12","branch":"HEAD","tag":"v2.0.12","commit":"8a144c9ab3a88493219cbc779eb61a0ca8b8d059","majorVersion":"v2"} -->
2
+ <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.1","branch":"HEAD","tag":"v2.1.1","commit":"e9b014307ee0b957ab946f973a0bd735811415db","majorVersion":"v2"} -->
3
3
 
4
4
  {{! Select environment, used verbatium if not using predefind key
5
5
  cdn := PROD|STAGING|BETA|TEST|DEV|???
@@ -1,5 +1,13 @@
1
- <div class="alert {{variantClass}} {{customClass}}" role="alert"
2
- {{#if alertType}}aria-label="{{alertType}}"{{/if}}>
1
+ <div class="alert {{variantClass}} {{customClass}}" role="alert"
2
+ {{#if ariaLabel}}
3
+ aria-label="{{ ariaLabel }}"
4
+ {{else}}
5
+ {{#ifCond variantClass "==" "alert-info"}}aria-label="Information alert"{{/ifCond}}
6
+ {{#ifCond variantClass "==" "alert-success"}}aria-label="Success alert"{{/ifCond}}
7
+ {{#ifCond variantClass "==" "alert-error"}}aria-label="Error alert"{{/ifCond}}
8
+ {{#ifCond variantClass "==" "alert-warning"}}aria-label="Warning alert"{{/ifCond}}
9
+ {{/if}}
10
+ >
3
11
  {{#if heading}}
4
12
  {{#if headingTag}}
5
13
  <{{headingTag}} class="alert-heading">{{{ heading }}}</{{headingTag}}>
@@ -23,8 +23,13 @@ Reference: https://getbootstrap.com/docs/5.0/components/pagination/
23
23
  {{! More button }}
24
24
  <span></span>
25
25
  {{else}}
26
- {{! Page button }}
27
- <a class="page-link" href="{{href}}" aria-label="{{arialabel}}">{{ linktext }}</a>
26
+ {{#ifCond "active" "in" customClasses}}
27
+ {{! Active page - not a link }}
28
+ <span class="page-link" aria-current="page" aria-label="{{#if arialabel}}{{arialabel}}{{else}}Page {{linktext}}, current page{{/if}}">{{ linktext }}</span>
29
+ {{else}}
30
+ {{! Page button }}
31
+ <a class="page-link" href="{{href}}" aria-label="{{#if arialabel}}{{arialabel}}{{else}}Page {{linktext}}{{/if}}">{{ linktext }}</a>
32
+ {{/ifCond}}
28
33
  {{/if}}
29
34
  </li>
30
35
 
@@ -5,7 +5,7 @@
5
5
  {{/ifCond}}>
6
6
  <div class="image-panel">
7
7
  {{#ifCond type '!=' 'promo'}}
8
- <img class="promo-panel-image" src="{{promoImage}}" alt="Promotional Image">
8
+ <img class="promo-panel-image" src="{{promoImage}}" alt="{{isdefined promoImageDescription "Promotional image"}}">
9
9
  {{else}}
10
10
  <div class="promo-panel-image"></div>
11
11
  {{/ifCond}}
@@ -3,38 +3,40 @@
3
3
  -->
4
4
  <div class="qld-search-input {{customClass}}">
5
5
  <input id="{{ inputID }}" name="{{ inputName }}" class="form-control" type="text" autocomplete="off"
6
- aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} />
7
- <button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}">
8
- <span class="btn-icon"></span>
6
+ aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} placeholder="{{placeholder}}" />
7
+ <button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}" aria-label="{{ buttonLabel }}">
8
+ <span class="btn-icon" aria-hidden="true"></span>
9
9
  <span class="btn-label">{{ buttonLabel }}</span>
10
10
  </button>
11
11
  {{#ifCond hasDynamicSuggestions '||' hasDefaultSuggestions}}
12
- <div class="suggestions suggestions__group d-none default">
12
+
13
+ <div class="suggestions suggestions__group default">
13
14
  {{#if hasDefaultSuggestions}}
14
15
  <div class="default-suggestions">
15
16
  <div class="suggestions-category">
16
17
  <strong class="suggestions-category-label d-block">{{defaultSuggestions.popularServicesTitle}}</strong>
17
18
  <ul>
18
19
  {{#each defaultSuggestions.popularServices}}
19
- <li><a href="{{link}}">{{title}}</a></li>
20
+ <li><a tabindex="0" href="{{link}}">{{title}}</a></li>
20
21
  {{/each}}
21
22
  {{#if defaultSuggestions.popularServicesLink}}
22
- <li><a href="{{defaultSuggestions.popularServicesLink.href}}" class="view-more">{{#if defaultSuggestions.popularServicesLink.label}}{{defaultSuggestions.popularServicesLink.label}}{{else}}View More{{/if}}</a></li>
23
+ <li><a tabindex="0" href="{{defaultSuggestions.popularServicesLink.href}}" class="view-more">{{#if defaultSuggestions.popularServicesLink.label}}{{defaultSuggestions.popularServicesLink.label}}{{else}}View More{{/if}}</a></li>
23
24
  {{/if}}
24
25
  </ul>
25
26
  </div>
26
-
27
+ {{#if defaultSuggestions.categories}}
27
28
  <div class="suggestions-category">
28
29
  <strong class="suggestions-category-label d-block">{{defaultSuggestions.categoriesTitle}}</strong>
29
30
  <ul>
30
31
  {{#each defaultSuggestions.categories}}
31
- <li><a href="{{link}}">{{title}}</a></li>
32
+ <li><a tabindex="0"href="{{link}}">{{title}}</a></li>
32
33
  {{/each}}
33
34
  {{#if defaultSuggestions.categoriesLink}}
34
- <li><a href="{{defaultSuggestions.categoriesLink.href}}" class="view-more">{{#if defaultSuggestions.categoriesLink.label}}{{defaultSuggestions.categoriesLink.label}}{{else}}View More{{/if}}</a></li>
35
+ <li><a tabindex="0" href="{{defaultSuggestions.categoriesLink.href}}" class="view-more">{{#if defaultSuggestions.categoriesLink.label}}{{defaultSuggestions.categoriesLink.label}}{{else}}View More{{/if}}</a></li>
35
36
  {{/if}}
36
37
  </ul>
37
38
  </div>
39
+ {{/if}}
38
40
  </div>
39
41
  {{/if}}
40
42
  {{#if hasDynamicSuggestions}}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qld-gov-au/qgds-bootstrap5",
3
- "version": "2.0.12",
3
+ "version": "2.1.1",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,13 +12,15 @@
12
12
  },
13
13
  "scripts": {
14
14
  "prepare": "husky && npm run build",
15
+ "ci:all": "npm ci && npm run lint && npm run test:run && npm run test:integration && npm run build && npm run build-storybook",
15
16
  "start": "npm run build",
16
17
  "lint": "eslint --fix --ext .js,.json --ignore-pattern 'docs/*' --ignore-pattern 'dist/*' --ignore-pattern 'storybook-static/*' --ignore-pattern 'src/js/handlebars.partials.js' .",
17
18
  "build": "node esbuild.js",
18
19
  "build:icons": "node esbuild.js --icons",
19
20
  "build:theme": "node esbuild.js --theme",
20
21
  "build:theme:icons": "node esbuild.js --theme --icons",
21
- "test": "vitest",
22
+ "test": "vitest watch",
23
+ "test:run": "vitest run",
22
24
  "test:ui": "vitest --ui",
23
25
  "test:integration": "npm-run-all --parallel --race serve:test test:testrunner",
24
26
  "test:testrunner": "sleep 2 && mocha --timeout 10000 --require ./test/testServer.test.js ",
@@ -53,56 +55,55 @@
53
55
  "bootstrap": "^5.3.8"
54
56
  },
55
57
  "devDependencies": {
56
- "@chromatic-com/storybook": "^4.1.1",
58
+ "@chromatic-com/storybook": "^4.1.3",
57
59
  "@eslint/eslintrc": "^3.3.1",
58
- "@eslint/json": "^0.13.2",
60
+ "@eslint/json": "^0.14.0",
59
61
  "@qld-gov-au/qgds-tokens": "^1.2.1",
60
- "@storybook/addon-a11y": "^9.1.13",
61
- "@storybook/addon-docs": "^9.1.13",
62
- "@storybook/addon-links": "^9.1.13",
63
- "@storybook/addon-themes": "^9.1.13",
64
- "@storybook/cli": "^9.1.13",
65
- "@storybook/html-vite": "^9.1.13",
66
- "@vitejs/plugin-vue": "5.2.4",
67
- "@vitest/ui": "^3.2.4",
62
+ "@storybook/addon-a11y": "^10.0.8",
63
+ "@storybook/addon-docs": "^10.0.8",
64
+ "@storybook/addon-links": "^10.0.8",
65
+ "@storybook/addon-themes": "^10.0.8",
66
+ "@storybook/cli": "^10.0.8",
67
+ "@storybook/html-vite": "^10.0.8",
68
+ "@vitest/ui": "^4.0.10",
68
69
  "autoprefixer": "^10.4.20",
69
- "chai": "^5.2.0",
70
- "chalk": "^5.3.0",
71
- "chromatic": "^13.3.1",
72
- "esbuild": "0.25.11",
70
+ "chai": "^6.2.1",
71
+ "chalk": "^5.6.2",
72
+ "chromatic": "^13.3.3",
73
+ "esbuild": "0.27.0",
73
74
  "esbuild-plugin-copy": "^2.1.1",
74
- "esbuild-plugin-eslint": "^0.3.7",
75
+ "esbuild-plugin-eslint": "^0.3.12",
75
76
  "esbuild-plugin-handlebars": "1.0.3",
76
77
  "esbuild-sass-plugin": "3.3.1",
77
- "eslint": "9.38.0",
78
+ "eslint": "9.39.1",
78
79
  "eslint-plugin-json": "^4.0.1",
79
- "eslint-plugin-storybook": "^9.1.13",
80
- "globals": "16.4.0",
80
+ "eslint-plugin-storybook": "^10.0.8",
81
+ "globals": "16.5.0",
81
82
  "handlebars": "4.7.8",
82
83
  "http-server": "^14.1.1",
83
84
  "husky": "^9.1.7",
84
- "jsdom": "^26.1.0",
85
+ "jsdom": "^27.2.0",
85
86
  "mini-svg-data-uri": "^1.4.4",
86
87
  "minimist": "^1.2.8",
87
- "mocha": "^11.6.0",
88
+ "mocha": "^11.7.5",
88
89
  "node-html-parser": "^7.0.1",
89
90
  "npm-run-all2": "^8.0.4",
90
91
  "onchange": "^7.1.0",
91
- "portfinder": "^1.0.37",
92
- "postcss": "^8.5.4",
92
+ "portfinder": "^1.0.38",
93
+ "postcss": "^8.5.6",
93
94
  "prettier": "3.6.2",
94
95
  "raw-loader": "^4.0.2",
95
- "rimraf": "^6.0.1",
96
+ "rimraf": "^6.1.0",
96
97
  "run-parallel": "^1.2.0",
97
- "sass": "^1.89.2",
98
- "selenium-webdriver": "^4.33.0",
99
- "storybook": "^9.1.13",
100
- "storybook-addon-deep-controls": "^0.9.5",
101
- "vite": "^6.3.5",
102
- "vitest": "^3.2.4"
98
+ "sass": "^1.94.0",
99
+ "selenium-webdriver": "^4.38.0",
100
+ "storybook": "^10.0.8",
101
+ "storybook-addon-deep-controls": "^0.10.0",
102
+ "vite": "^7.1.11",
103
+ "vitest": "^4.0.10"
103
104
  },
104
105
  "peerDependencies": {
105
- "typescript": "^5.0.0"
106
+ "typescript": ">=5.0.0 <5.9.0"
106
107
  },
107
108
  "exports": {
108
109
  "./qld.bootstrap.min.js": "./dist/assets/js/qld.bootstrap.min.js",
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "id": "",
3
3
  "label": "View all",
4
+ "arialabel": "View all services",
4
5
  "href": "#123",
5
6
  "target": "_blank",
6
7
  "class": [
7
- {"small": false},
8
+ {"small": false},
8
9
  {"view-all": true}
9
10
  ]
10
11
  }
@@ -12,5 +12,7 @@
12
12
  "optional-text": "optional",
13
13
  "hint-text": "(dd/mm/yyyy)",
14
14
  "successMessageText": "Success message",
15
- "errorMessageText": "Error message"
15
+ "errorMessageText": "Error message",
16
+ "yearMin": "",
17
+ "yearMax": ""
16
18
  }
@@ -61,18 +61,21 @@
61
61
  "followLinks": [
62
62
  {
63
63
  "label": "Facebook",
64
+ "accessibleLabel": "Facebook page",
64
65
  "link": "#",
65
66
  "icon": "facebook",
66
67
  "target": "_blank"
67
68
  },
68
69
  {
69
70
  "label": "LinkedIn",
71
+ "accessibleLabel": "LinkedIn page",
70
72
  "link": "#",
71
73
  "icon": "linkedin",
72
74
  "target": "_blank"
73
75
  },
74
76
  {
75
77
  "label": "X (Twitter)",
78
+ "accessibleLabel": "X page",
76
79
  "link": "#",
77
80
  "icon": "x",
78
81
  "target": "_blank"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "variantClass": "alert-success",
3
- "alertType": "",
3
+ "ariaLabel": "Success alert",
4
4
  "heading": "Alert heading",
5
5
  "headingTag": "h2",
6
6
  "content": "<p>This is an alert notice with some important information. <a href='#'>Find out more</a>.</p>"
@@ -12,10 +12,10 @@
12
12
  },
13
13
 
14
14
  "pages": [
15
- { "href": "#", "linktext": "1", "customClasses": "" },
16
- { "href": "#", "linktext": "2", "customClasses": "active" },
17
- { "href": "#", "linktext": "3", "customClasses": "" },
15
+ { "href": "#", "linktext": "1", "arialabel": "Page 1", "customClasses": "" },
16
+ { "href": "#", "linktext": "2", "arialabel": "Page 2, current page", "customClasses": "active" },
17
+ { "href": "#", "linktext": "3", "arialabel": "Page 3", "customClasses": "" },
18
18
  { "href": "#", "linktext": "", "customClasses": "more", "more": true },
19
- { "href": "#", "linktext": "7", "customClasses": "" }
19
+ { "href": "#", "linktext": "7", "arialabel": "Page 7", "customClasses": "" }
20
20
  ]
21
21
  }
@@ -1,48 +1,46 @@
1
1
  {
2
- "type": "indent-text",
3
- "variantClass": "light",
4
- "promoImage": "./assets/img/banner-example-3-to-2.jpg",
5
- "contentAlignment": "content-left",
6
- "icon": "icon-dot-grid",
7
- "title": "Title goes here and has a maximum of 65 character limit",
8
- "abstract": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis.",
9
- "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis. Vel suspendisse mi quisque consequat aliquet egestas.",
10
- "cta": {
11
- "items": [
12
- {
13
- "url": "#",
14
- "id": "https://www.wired.com",
15
- "value": "Label",
16
- "target": "_blank",
17
- "class": [
18
- {"small": false},
19
- {"view-all": false}
20
- ]
21
- }
22
- ]
23
- },
24
- "btn": {
25
- "items": [
26
- {
27
- "variantClass": "btn-primary",
28
- "islink": true,
29
- "isdisabled": false,
30
- "iconClass": "",
31
- "iconPosition": "",
32
- "label": "Primary",
33
- "href": "https://google.com",
34
- "target": "_self"
35
- },
36
- {
37
- "variantClass": "btn-secondary",
38
- "islink": true,
39
- "isdisabled": false,
40
- "iconClass": "",
41
- "iconPosition": "",
42
- "label": "Secondary",
43
- "href": "https://google.com",
44
- "target": "_self"
45
- }
46
- ]
47
- }
48
- }
2
+ "type": "indent-text",
3
+ "variantClass": "light",
4
+ "promoImage": "./assets/img/banner-example-3-to-2.jpg",
5
+ "promoImageDescription": "Promotional image",
6
+ "contentAlignment": "content-left",
7
+ "icon": "icon-dot-grid",
8
+ "title": "Title goes here and has a maximum of 65 character limit",
9
+ "abstract": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis.",
10
+ "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis. Vel suspendisse mi quisque consequat aliquet egestas.",
11
+ "cta": {
12
+ "items": [
13
+ {
14
+ "url": "#",
15
+ "id": "https://www.wired.com",
16
+ "value": "Label",
17
+ "target": "_blank",
18
+ "class": [{ "small": false }, { "view-all": false }]
19
+ }
20
+ ]
21
+ },
22
+ "btn": {
23
+ "items": [
24
+ {
25
+ "variantClass": "btn-primary",
26
+ "islink": true,
27
+ "isdisabled": false,
28
+ "iconClass": "",
29
+ "iconPosition": "",
30
+ "label": "Primary",
31
+ "href": "https://google.com",
32
+ "target": "_self"
33
+ },
34
+ {
35
+ "variantClass": "btn-secondary",
36
+ "islink": true,
37
+ "isdisabled": false,
38
+ "iconClass": "",
39
+ "iconPosition": "",
40
+ "label": "Secondary",
41
+ "href": "https://google.com",
42
+ "target": "_self"
43
+ }
44
+ ]
45
+ }
46
+ }
@@ -6,6 +6,7 @@
6
6
  "buttonType": "submit",
7
7
  "buttonLabel": "Search",
8
8
  "ariaLabel": "Search website",
9
+ "placeholder": "",
9
10
  "tags": {
10
11
  "collection": "qgov~sp-search",
11
12
  "profile": "qld",