@qld-gov-au/qgds-bootstrap5 2.1.11 → 2.1.13

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 (27) hide show
  1. package/.esbuild/plugins/qgds-plugin-clean-output-folders.js +2 -2
  2. package/dist/assets/components/bs5/head/head.hbs +1 -1
  3. package/dist/assets/components/bs5/searchInput/searchInput.hbs +1 -1
  4. package/dist/assets/css/qld.bootstrap.css +2 -2
  5. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  6. package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
  7. package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
  8. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  9. package/dist/assets/js/handlebars.init.min.js +3 -3
  10. package/dist/assets/js/handlebars.init.min.js.map +1 -1
  11. package/dist/assets/js/handlebars.partials.js +3 -3
  12. package/dist/assets/js/handlebars.partials.js.map +1 -1
  13. package/dist/assets/js/qld.bootstrap.min.js +5 -5
  14. package/dist/assets/js/qld.bootstrap.min.js.map +3 -3
  15. package/dist/assets/node/handlebars.init.min.js +2 -2
  16. package/dist/assets/node/handlebars.init.min.js.map +1 -1
  17. package/dist/components/bs5/head/head.hbs +1 -1
  18. package/dist/components/bs5/searchInput/searchInput.hbs +1 -1
  19. package/dist/package.json +5 -6
  20. package/package.json +5 -6
  21. package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +4 -4
  22. package/src/components/bs5/searchInput/search.functions.js +9 -1
  23. package/src/components/bs5/searchInput/searchInput.hbs +1 -1
  24. package/src/components/bs5/searchInput/searchInput.scss +88 -5
  25. package/src/components/bs5/sidenav/sidenav.scss +1 -2
  26. package/src/css/qld-tokens.scss +4 -4
  27. package/src/stories/Introduction.mdx +12 -9
@@ -1,5 +1,5 @@
1
1
 
2
- <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.11","branch":"HEAD","tag":"v2.1.11","commit":"5a3e313339341709791de452b0963964578103a8","majorVersion":"v2"} -->
2
+ <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.13","branch":"HEAD","tag":"v2.1.13","commit":"52e2a0036c32fec19ae46dd2bf41785321ad2010","majorVersion":"v2"} -->
3
3
 
4
4
  {{! Select environment, used verbatium if not using predefind key
5
5
  cdn := PROD|STAGING|BETA|TEST|DEV|???
@@ -29,7 +29,7 @@
29
29
  <strong class="suggestions-category-label d-block">{{defaultSuggestions.categoriesTitle}}</strong>
30
30
  <ul>
31
31
  {{#each defaultSuggestions.categories}}
32
- <li><a tabindex="0"href="{{link}}">{{title}}</a></li>
32
+ <li><a tabindex="0" href="{{link}}">{{title}}</a></li>
33
33
  {{/each}}
34
34
  {{#if defaultSuggestions.categoriesLink}}
35
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>
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qld-gov-au/qgds-bootstrap5",
3
- "version": "2.1.11",
3
+ "version": "2.1.13",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,24 +59,23 @@
59
59
  "@eslint/eslintrc": "^3.3.1",
60
60
  "@eslint/json": "^1.0.0",
61
61
  "@qld-gov-au/qgds-tokens": "^1.2.1",
62
- "@vitejs/plugin-react": "^5.1.2",
63
62
  "@storybook/addon-a11y": "^10.1.10",
64
63
  "@storybook/addon-docs": "^10.1.10",
65
64
  "@storybook/addon-links": "^10.1.10",
66
65
  "@storybook/addon-themes": "^10.1.10",
67
66
  "@storybook/cli": "^10.1.10",
68
67
  "@storybook/html-vite": "^10.1.10",
68
+ "@vitejs/plugin-react": "^5.1.4",
69
69
  "@vitest/ui": "^4.0.10",
70
70
  "autoprefixer": "^10.4.20",
71
71
  "chai": "^6.2.1",
72
72
  "chalk": "^5.6.2",
73
- "chromatic": "^13.3.3",
73
+ "chromatic": "^15.0.0",
74
74
  "esbuild": "0.27.3",
75
75
  "esbuild-plugin-copy": "^2.1.1",
76
- "esbuild-plugin-eslint": "^0.3.12",
77
76
  "esbuild-plugin-handlebars": "1.0.3",
78
77
  "esbuild-sass-plugin": "3.6.0",
79
- "eslint": "9.39.2",
78
+ "eslint": "10.0.0",
80
79
  "eslint-plugin-json": "^4.0.1",
81
80
  "eslint-plugin-storybook": "^10.1.10",
82
81
  "globals": "17.3.0",
@@ -92,7 +91,7 @@
92
91
  "onchange": "^7.1.0",
93
92
  "portfinder": "^1.0.38",
94
93
  "postcss": "^8.5.6",
95
- "prettier": "3.6.2",
94
+ "prettier": "3.8.1",
96
95
  "raw-loader": "^4.0.2",
97
96
  "rimraf": "^6.1.0",
98
97
  "run-parallel": "^1.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qld-gov-au/qgds-bootstrap5",
3
- "version": "2.1.11",
3
+ "version": "2.1.13",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,24 +59,23 @@
59
59
  "@eslint/eslintrc": "^3.3.1",
60
60
  "@eslint/json": "^1.0.0",
61
61
  "@qld-gov-au/qgds-tokens": "^1.2.1",
62
- "@vitejs/plugin-react": "^5.1.2",
63
62
  "@storybook/addon-a11y": "^10.1.10",
64
63
  "@storybook/addon-docs": "^10.1.10",
65
64
  "@storybook/addon-links": "^10.1.10",
66
65
  "@storybook/addon-themes": "^10.1.10",
67
66
  "@storybook/cli": "^10.1.10",
68
67
  "@storybook/html-vite": "^10.1.10",
68
+ "@vitejs/plugin-react": "^5.1.4",
69
69
  "@vitest/ui": "^4.0.10",
70
70
  "autoprefixer": "^10.4.20",
71
71
  "chai": "^6.2.1",
72
72
  "chalk": "^5.6.2",
73
- "chromatic": "^13.3.3",
73
+ "chromatic": "^15.0.0",
74
74
  "esbuild": "0.27.3",
75
75
  "esbuild-plugin-copy": "^2.1.1",
76
- "esbuild-plugin-eslint": "^0.3.12",
77
76
  "esbuild-plugin-handlebars": "1.0.3",
78
77
  "esbuild-sass-plugin": "3.6.0",
79
- "eslint": "9.39.2",
78
+ "eslint": "10.0.0",
80
79
  "eslint-plugin-json": "^4.0.1",
81
80
  "eslint-plugin-storybook": "^10.1.10",
82
81
  "globals": "17.3.0",
@@ -92,7 +91,7 @@
92
91
  "onchange": "^7.1.0",
93
92
  "portfinder": "^1.0.38",
94
93
  "postcss": "^8.5.6",
95
- "prettier": "3.6.2",
94
+ "prettier": "3.8.1",
96
95
  "raw-loader": "^4.0.2",
97
96
  "rimraf": "^6.1.0",
98
97
  "run-parallel": "^1.2.0",
@@ -27,10 +27,10 @@ exports[`SearchInput > Renders as expected 1`] = `
27
27
  <div class="suggestions-category">
28
28
  <strong class="suggestions-category-label d-block">Collection</strong>
29
29
  <ul>
30
- <li><a tabindex="0"href="https://www.forgov.qld.gov.au/pay-benefits-and-policy/directives-policies-circulars-and-guidelines">Search for directives, policies, circulars, and guidelines</a></li>
31
- <li><a tabindex="0"href="https://www.forgov.qld.gov.au/pay-benefits-and-policy/benefits/employee-pay-and-benefits">Employee pay and benefits</a></li>
32
- <li><a tabindex="0"href="https://www.forgov.qld.gov.au/sandbox/archive/queensland-shared-services">Queensland Shared Services</a></li>
33
- <li><a tabindex="0"href="https://www.forgov.qld.gov.au/recruitment-performance-and-career/career-development">Career development</a></li>
30
+ <li><a tabindex="0" href="https://www.forgov.qld.gov.au/pay-benefits-and-policy/directives-policies-circulars-and-guidelines">Search for directives, policies, circulars, and guidelines</a></li>
31
+ <li><a tabindex="0" href="https://www.forgov.qld.gov.au/pay-benefits-and-policy/benefits/employee-pay-and-benefits">Employee pay and benefits</a></li>
32
+ <li><a tabindex="0" href="https://www.forgov.qld.gov.au/sandbox/archive/queensland-shared-services">Queensland Shared Services</a></li>
33
+ <li><a tabindex="0" href="https://www.forgov.qld.gov.au/recruitment-performance-and-career/career-development">Career development</a></li>
34
34
  <li><a tabindex="0" href="/queenslanders" class="view-more">View all</a></li>
35
35
  </ul>
36
36
  </div>
@@ -196,6 +196,14 @@ export async function showSuggestions(value = "", isDefault = false, form) {
196
196
  dynamicSuggestionsContainer.getAttribute("data-view-more");
197
197
 
198
198
  // Build the services HTML safely
199
+ const escapeHtmlAttr = (str) =>
200
+ String(str)
201
+ .replace(/&/g, "&amp;")
202
+ .replace(/"/g, "&quot;")
203
+ .replace(/'/g, "&#39;")
204
+ .replace(/</g, "&lt;")
205
+ .replace(/>/g, "&gt;");
206
+
199
207
  const servicesItems = fetchedServices.response.resultPacket.results
200
208
  .slice(0, 4)
201
209
  .map(
@@ -205,7 +213,7 @@ export async function showSuggestions(value = "", isDefault = false, form) {
205
213
  .join("");
206
214
 
207
215
  const viewMoreItem = viewMoreUrl
208
- ? `<li><a tabindex="0" href="${viewMoreUrl}" class="view-more">View more</a></li>`
216
+ ? `<li><a tabindex="0" href="${escapeHtmlAttr(viewMoreUrl)}" class="view-more">View more</a></li>`
209
217
  : "";
210
218
 
211
219
  dynamicSuggestionsContainer.innerHTML += `
@@ -29,7 +29,7 @@
29
29
  <strong class="suggestions-category-label d-block">{{defaultSuggestions.categoriesTitle}}</strong>
30
30
  <ul>
31
31
  {{#each defaultSuggestions.categories}}
32
- <li><a tabindex="0"href="{{link}}">{{title}}</a></li>
32
+ <li><a tabindex="0" href="{{link}}">{{title}}</a></li>
33
33
  {{/each}}
34
34
  {{#if defaultSuggestions.categoriesLink}}
35
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>
@@ -17,6 +17,10 @@
17
17
  --border-radius: 0.25rem;
18
18
  --hover-background-color: var(--#{$prefix}neutral-light);
19
19
  --_size: 3rem;
20
+ container-type: inline-size;
21
+ display: flex;
22
+ position: relative;
23
+ border-radius: var(--border-radius);
20
24
 
21
25
  .dark &,
22
26
  .dark-alt & {
@@ -40,11 +44,7 @@
40
44
  --text-color: var(--#{$prefix}light-text-text);
41
45
  }
42
46
  }
43
-
44
- display: flex;
45
- position: relative;
46
- border-radius: var(--border-radius);
47
-
47
+
48
48
  .suggestions {
49
49
  transition-behavior: allow-discrete;
50
50
  opacity: 0;
@@ -106,6 +106,7 @@
106
106
  --background-color: var(--#{$prefix}white);
107
107
  outline: none;
108
108
  }
109
+
109
110
  }
110
111
 
111
112
  > button {
@@ -133,10 +134,40 @@
133
134
  --qld-icon-color: currentColor;
134
135
  }
135
136
  }
137
+
136
138
 
139
+ // Fallback for browsers that don't support container queries
137
140
  @include media-breakpoint-up(md) {
138
141
  --_size: 3.25rem;
139
142
 
143
+ &:before {
144
+ content: "";
145
+ mask-image: var(--qgds-icon-search);
146
+ mask-repeat: no-repeat;
147
+ mask-position: left;
148
+ background-color: var(--text-color);
149
+ width: 1.25rem;
150
+ aspect-ratio: 1 / 1;
151
+ position: absolute;
152
+ margin-inline-start: .5rem;
153
+ left: .5rem;
154
+ height: 100%;
155
+ }
156
+ .form-control {
157
+ padding-inline-start: 2.5rem;
158
+ }
159
+ .dark &,
160
+ .dark-alt & {
161
+ &:has(.form-control:focus) {
162
+ &:before {
163
+ background-color: var(--#{$prefix}light-text-text);
164
+ }
165
+ }
166
+ &:before {
167
+ background-color: var(--#{$prefix}dark-text-text);
168
+ }
169
+ }
170
+
140
171
  > button {
141
172
  padding-block: calc(0.75rem - 0.125rem);
142
173
  padding-inline: var(--qld-btn-padding-x);
@@ -154,6 +185,58 @@
154
185
  }
155
186
  }
156
187
 
188
+ // Container query for browsers that support it (overrides @media)
189
+ @supports (container-type: inline-size) {
190
+ @container (width > 450px) {
191
+ --_size: 3.25rem;
192
+
193
+ &:before {
194
+ content: "";
195
+ mask-image: var(--qgds-icon-search);
196
+ mask-repeat: no-repeat;
197
+ mask-position: left;
198
+ background-color: var(--text-color);
199
+ width: 1.25rem;
200
+ aspect-ratio: 1 / 1;
201
+ position: absolute;
202
+ margin-inline-start: .5rem;
203
+ left: .5rem;
204
+ height: 100%;
205
+ }
206
+ .form-control {
207
+ padding-inline-start: 2.5rem;
208
+ }
209
+ .dark &,
210
+ .dark-alt & {
211
+ &:has(.form-control:focus) {
212
+ &:before {
213
+ background-color: var(--#{$prefix}light-text-text);
214
+ }
215
+ }
216
+ &:before {
217
+ background-color: var(--#{$prefix}dark-text-text);
218
+ }
219
+ }
220
+
221
+ > button {
222
+ padding-block: calc(0.75rem - 0.125rem);
223
+ padding-inline: var(--qld-btn-padding-x);
224
+ margin: 0;
225
+ width: auto;
226
+
227
+ .btn-label {
228
+ display: block;
229
+ }
230
+
231
+ .btn-icon {
232
+ display: none;
233
+ margin-inline-start: 0;
234
+ }
235
+ }
236
+ }
237
+ }
238
+
239
+
157
240
  //Search dropdown
158
241
  .suggestions {
159
242
  position: absolute;
@@ -13,7 +13,6 @@
13
13
  --sidenav-level-two-padding: 2rem;
14
14
  --sidenav-level-three-padding: 3.5rem;
15
15
  --sidenav-navlink-padding: 1rem;
16
-
17
16
  --sidenav-hover-bg: var(--#{$prefix}neutral-lightest);
18
17
  --sidenav-hover-color: var(--#{$prefix}light-action-primary);
19
18
  --sidenav-hover-underline-color: var(
@@ -149,7 +148,7 @@
149
148
  .nav-link {
150
149
  padding: var(--sidenav-navlink-padding);
151
150
  font-size: 0.875rem;
152
- color: var(--#{$prefix}light-text-text);
151
+ color: var(--qld-body-color);
153
152
  text-decoration: none;
154
153
  transition-duration: 0s;
155
154
  line-height: 1.25rem;
@@ -10,21 +10,21 @@ $color-default-color-dark-background-alt-shade: #000764 !default;
10
10
  $color-default-color-dark-background-alt: #001d74 !default;
11
11
  $color-default-color-dark-background-default-shade: #003e96 !default;
12
12
  $color-default-color-dark-background-default: #005eb8 !default;
13
- $color-default-color-dark-border-alt: #63b1ff !default;
13
+ $color-default-color-dark-border-alt: #73c2ff !default;
14
14
  $color-default-color-dark-border-default: #418fed !default;
15
15
  $color-default-color-dark-crest-fill: #ffffff !default;
16
16
  $color-default-color-dark-focus-default: #c6ffff !default;
17
17
  $color-default-color-dark-link-default: #ffffff !default;
18
18
  $color-default-color-dark-link-on-action: #001c37 !default;
19
- $color-default-color-dark-link-visited: #F2CDFF !default;
19
+ $color-default-color-dark-link-visited: #f2cdff !default;
20
20
  $color-default-color-dark-site-title: #ffffff !default;
21
21
  $color-default-color-dark-text-default: #ffffff !default;
22
22
  $color-default-color-dark-text-heading: #ffffff !default;
23
23
  $color-default-color-dark-text-lighter: #deebf9 !default;
24
24
  $color-default-color-dark-underline-default-hover: #ffffff !default;
25
25
  $color-default-color-dark-underline-default: #b5cce2 !default;
26
- $color-default-color-dark-underline-visited-hover: #F2CDFF !default;
27
- $color-default-color-dark-underline-visited: #C6AED9 !default;
26
+ $color-default-color-dark-underline-visited-hover: #f2cdff !default;
27
+ $color-default-color-dark-underline-visited: #c6aed9 !default;
28
28
 
29
29
  /* Light palettes */
30
30
  $color-default-color-light-accent-design-accent: #84d3ff !default;
@@ -79,7 +79,7 @@ The following core components are available in this library. Additional layout
79
79
  {componentList.map(component => (
80
80
  <a
81
81
  key={component.id}
82
- href={`/?path=${component.storyPath}`}
82
+ href={`/qgds-bootstrap5/?path=${component.storyPath}`}
83
83
  className="component-card"
84
84
  >
85
85
  <div className="component-card-title">{component.title}</div>
@@ -88,18 +88,21 @@ The following core components are available in this library. Additional layout
88
88
  </div>
89
89
 
90
90
 
91
- ## [How to use](?path=/docs/introduction-how-to-use--overview)
92
- > Use this guide to implement the QGDS Bootstrap 5 edition in your web page or application.
91
+ ## How to use
92
+ Use this guide to implement the QGDS Bootstrap 5 edition in your web page or application.<br /><br />
93
+ [How to use guide](?path=/docs/introduction-how-to-use--overview)
93
94
 
94
- ## [Project development](?path=/docs/introduction-development---overview)
95
- > Use this guide if working on or contributing to the QGDS Bootstrap 5 source code itself. It outlines the architecture, build processes, Github setup and repository forking.
95
+
96
+ ## How to contribute
97
+ Use this guide if working on or contributing to the QGDS Bootstrap 5 source code itself. It outlines the architecture, build processes, Github setup and repository forking.<br /><br />
98
+ [Project development guide](?path=/docs/introduction-development---overview)
96
99
 
97
100
 
98
101
  ## The QGDS Ecosystem
99
102
  This library is part of a coordinated suite of tools designed to ensure visual and functional consistency across all Queensland Government digital touchpoints:
100
103
 
101
104
  - [Figma UI Kit](https://www.figma.com/community/file/978450410021220739): The design source of truth and visual specification for all components.
102
- - [QGDS Website](https://www.designsystem.qld.gov.au): The central hgub for Design System and component guidance and documentation.
103
- - Design Tokens: The foundational variables (colors, spacing, typography) that power our styles.
104
- - QGDS Web Components: A framework-agnostic implementation of Design System by the Queensland Government.
105
- - Vanilla Component Library: An independent framework-agnostic implementation of Design System by Queensland Health.
105
+ - [QGDS Website](https://www.designsystem.qld.gov.au): The central hub for Design System and component guidance and documentation.
106
+ - [Design Tokens](https://github.com/qld-gov-au/design-tokens): (WIP) The foundational variables (colors, spacing, typography) that power our styles.
107
+ - [QGDS Web Components](https://github.com/qld-gov-au/qgds-web-components): (WIP) A framework-agnostic implementation of Design System by the Queensland Government.
108
+ - [Vanilla QGDS Component Library](https://github.com/Qld-Health-Online-Team/design-system): An independent framework-agnostic implementation of Design System by Queensland Health.