@qld-gov-au/qgds-bootstrap5 2.1.0 → 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 (78) hide show
  1. package/.storybook/preview.js +15 -6
  2. package/dist/assets/components/bs5/callToAction/callToAction.hbs +3 -3
  3. package/dist/assets/components/bs5/dateinput/dateinput.hbs +21 -27
  4. package/dist/assets/components/bs5/globalAlert/globalAlert.hbs +8 -1
  5. package/dist/assets/components/bs5/head/head.hbs +1 -1
  6. package/dist/assets/components/bs5/pagination/pagination.hbs +7 -2
  7. package/dist/assets/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
  8. package/dist/assets/components/bs5/searchInput/searchInput.hbs +2 -2
  9. package/dist/assets/css/qld.bootstrap.css +2 -2
  10. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  11. package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
  12. package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
  13. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  14. package/dist/assets/js/handlebars.init.min.js +50 -44
  15. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  16. package/dist/assets/js/handlebars.partials.js +50 -44
  17. package/dist/assets/js/handlebars.partials.js.map +2 -2
  18. package/dist/assets/js/qld.bootstrap.min.js +6 -6
  19. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  20. package/dist/assets/node/handlebars.init.min.js +15 -8
  21. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  22. package/dist/components/bs5/callToAction/callToAction.hbs +3 -3
  23. package/dist/components/bs5/dateinput/dateinput.hbs +21 -27
  24. package/dist/components/bs5/globalAlert/globalAlert.hbs +8 -1
  25. package/dist/components/bs5/head/head.hbs +1 -1
  26. package/dist/components/bs5/pagination/pagination.hbs +7 -2
  27. package/dist/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
  28. package/dist/components/bs5/searchInput/searchInput.hbs +2 -2
  29. package/dist/package.json +33 -32
  30. package/dist/sample-data/callToAction/callToAction.data.json +2 -1
  31. package/dist/sample-data/dateinput/dateinput.data.json +3 -1
  32. package/dist/sample-data/pagination/pagination.data.json +4 -4
  33. package/dist/sample-data/promotionalPanel/promotionalPanel.data.json +45 -47
  34. package/package.json +33 -32
  35. package/src/components/bs5/breadcrumbs/breadcrumbs.scss +1 -0
  36. package/src/components/bs5/button/button.scss +1 -0
  37. package/src/components/bs5/button/button.stories.js +16 -4
  38. package/src/components/bs5/callToAction/callToAction.data.json +2 -1
  39. package/src/components/bs5/callToAction/callToAction.hbs +3 -3
  40. package/src/components/bs5/callToAction/callToAction.stories.js +2 -2
  41. package/src/components/bs5/card/card.scss +2 -2
  42. package/src/components/bs5/dateinput/Dateinput.js +1 -38
  43. package/src/components/bs5/dateinput/Dateinput.mdx +27 -0
  44. package/src/components/bs5/dateinput/Dateinput.stories.js +48 -4
  45. package/src/components/bs5/dateinput/dateinput.data.json +3 -1
  46. package/src/components/bs5/dateinput/dateinput.functions.js +91 -0
  47. package/src/components/bs5/dateinput/dateinput.hbs +21 -27
  48. package/src/components/bs5/formcheck/formcheck.scss +5 -0
  49. package/src/components/bs5/globalAlert/globalAlert.hbs +8 -1
  50. package/src/components/bs5/globalAlert/globalAlert.scss +14 -19
  51. package/src/components/bs5/globalAlert/globalAlert.stories.js +1 -0
  52. package/src/components/bs5/globalAlert/globalAlert.test.js +10 -5
  53. package/src/components/bs5/inpageAlert/inpageAlert.scss +3 -4
  54. package/src/components/bs5/inpagenav/inpagenav.scss +9 -1
  55. package/src/components/bs5/modal/modal.scss +1 -1
  56. package/src/components/bs5/navbar/navbar.functions.js +39 -28
  57. package/src/components/bs5/navbar/navbar.scss +43 -28
  58. package/src/components/bs5/navbar/navbar.stories.js +4 -3
  59. package/src/components/bs5/pagination/pagination.data.json +4 -4
  60. package/src/components/bs5/pagination/pagination.hbs +7 -2
  61. package/src/components/bs5/pagination/pagination.scss +1 -1
  62. package/src/components/bs5/promotionalPanel/promotionalPanel.data.json +45 -47
  63. package/src/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
  64. package/src/components/bs5/quickexit/quickexit.scss +1 -1
  65. package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +2 -2
  66. package/src/components/bs5/searchInput/search.functions.js +9 -5
  67. package/src/components/bs5/searchInput/searchInput.hbs +2 -2
  68. package/src/components/bs5/searchInput/searchInput.scss +1 -0
  69. package/src/components/bs5/sidenav/sidenav.scss +17 -19
  70. package/src/components/bs5/table/table.scss +93 -83
  71. package/src/css/main.scss +3 -0
  72. package/src/css/mixins/focusable.scss +1 -1
  73. package/src/css/qld-reduced-motion.scss +51 -0
  74. package/src/css/qld-tokens.scss +3 -3
  75. package/src/css/qld-type.scss +7 -13
  76. package/src/js/constants.js +10 -0
  77. package/src/js/qld.bootstrap.js +99 -99
  78. package/src/js/utils.js +3 -1
@@ -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>
@@ -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.1.0","branch":"HEAD","tag":"v2.1.0","commit":"1610f625e3e2ba5c9420ba3ef0ebb53ed35820f6","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|???
@@ -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}}
@@ -4,8 +4,8 @@
4
4
  <div class="qld-search-input {{customClass}}">
5
5
  <input id="{{ inputID }}" name="{{ inputName }}" class="form-control" type="text" autocomplete="off"
6
6
  aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} placeholder="{{placeholder}}" />
7
- <button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}">
8
- <span class="btn-icon"></span>
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}}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qld-gov-au/qgds-bootstrap5",
3
- "version": "2.1.0",
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
  }
@@ -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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qld-gov-au/qgds-bootstrap5",
3
- "version": "2.1.0",
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",
@@ -57,6 +57,7 @@ $expander-icon-color: $qld-light-link;
57
57
  box-shadow: var(--#{$prefix}dropdown-box-shadow);
58
58
  pointer-events: all;
59
59
  transition: max-height 0.5s ease-in;
60
+ z-index: 1;
60
61
  }
61
62
  }
62
63
 
@@ -170,6 +170,7 @@ a.btn,
170
170
  color: var(--#{$prefix}btn-color);
171
171
  text-decoration: underline;
172
172
  text-decoration-color: inherit;
173
+ text-decoration-thickness: var(--qld-link-underline-thickness-hover, 2px);
173
174
  text-underline-offset: 0.3em;
174
175
  }
175
176
 
@@ -48,7 +48,10 @@ function buttonVariantsMarkup() {
48
48
  return `<div class="d-grid p-32">
49
49
  <div class="fw-bold">${variantLabel}</div>
50
50
  <div class="d-flex gap-3">
51
+
52
+ <!-- Example buttons -->
51
53
  ${variantButtons}
54
+
52
55
  </div>
53
56
  </div>`;
54
57
  })
@@ -61,11 +64,20 @@ export default {
61
64
  args: defaultdata,
62
65
  render: (args) => {
63
66
  return `
67
+ <!-- Wrapper div for storybook only -->
64
68
  <div class="d-flex gap-3 p-32">
65
- ${new Button(args).html}
66
- ${new Button({ ...args, isdisabled: true }).html}
67
- ${new Button({ ...args, isprogress: true, iconClass: "", label: "Loading button", progressLabel: "Loading...", islink: false, dataatts: 'data-loading-btn="true"' }).html}
68
- </div>
69
+
70
+ <!-- Example link presented as QGDS button -->
71
+ ${new Button(args).html.trim()}
72
+
73
+ <!-- Example link presented as QGDS button -->
74
+ ${new Button({ ...args, isdisabled: true }).html.trim()}
75
+
76
+ <!-- Example button presented as QGDS button -->
77
+ ${new Button({ ...args, isprogress: true, iconClass: "", label: "Loading button", progressLabel: "Loading...", islink: false, dataatts: 'data-loading-btn="true"' }).html.trim()}
78
+
79
+
80
+ </div>
69
81
  `; //expand arguments, specifically turn isdisabled into true
70
82
  },
71
83
 
@@ -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
  }
@@ -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>