@qld-gov-au/qgds-bootstrap5 1.0.11 → 1.0.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.
- package/dist/assets/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/js/qld.bootstrap.min.js +20 -14
- package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
- package/dist/components/bs5/header/header.hbs +18 -72
- package/dist/sample-data/header/header.data.json +33 -169
- package/dist/sample-data/tag/tag.data.json +19 -15
- package/package.json +18 -17
- package/src/components/bs5/breadcrumbs/breadcrumb.functions.js +56 -0
- package/src/components/bs5/breadcrumbs/breadcrumbs.scss +20 -0
- package/src/components/bs5/card/card.scss +13 -2
- package/src/components/bs5/correctincorrect/correctincorrect.scss +45 -51
- package/src/components/bs5/correctincorrect/correctincorrect.stories.js +29 -28
- package/src/components/bs5/header/_colours.scss +93 -122
- package/src/components/bs5/header/header.data.json +33 -169
- package/src/components/bs5/header/header.functions.js +141 -78
- package/src/components/bs5/header/header.hbs +18 -72
- package/src/components/bs5/header/header.scss +32 -9
- package/src/components/bs5/navbar/navbar.functions.js +26 -7
- package/src/components/bs5/spinner/spinner.scss +1 -3
- package/src/components/bs5/tag/tag.data.json +19 -15
- package/src/components/bs5/tag/tag.scss +129 -39
- package/src/components/bs5/tag/tag.stories.js +12 -12
- package/src/main.js +13 -15
- package/src/main.scss +1 -0
- package/src/scss/qld-variables.scss +6 -15
package/src/main.js
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
accordionToggleAllButtonState,
|
|
4
|
-
accordionHashLinks,
|
|
5
|
-
} from "./components/bs5/accordion/accordion.functions";
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
videoEmbedPlay,
|
|
9
|
-
videoTranscriptTitle,
|
|
10
|
-
} from "./components/bs5/video/video.functions";
|
|
11
|
-
|
|
1
|
+
import { accordionToggleAll, accordionToggleAllButtonState, accordionHashLinks } from "./components/bs5/accordion/accordion.functions";
|
|
2
|
+
import { videoEmbedPlay, videoTranscriptTitle } from "./components/bs5/video/video.functions";
|
|
12
3
|
import { initializeNavbar } from './components/bs5/navbar/navbar.functions';
|
|
4
|
+
import { breadcrumbShorten } from "./components/bs5/breadcrumbs/breadcrumb.functions";
|
|
13
5
|
import { positionQuickExit, initQuickexit } from './components/bs5/quickexit/quickexit.functions';
|
|
14
6
|
import { toggleSearch, showSuggestions } from './components/bs5/header/header.functions';
|
|
15
7
|
|
|
@@ -22,15 +14,19 @@ window.addEventListener("DOMContentLoaded", () => {
|
|
|
22
14
|
(() => {
|
|
23
15
|
|
|
24
16
|
//Header search
|
|
25
|
-
let headerSearchButton = document.querySelector('.qld__main-nav__toggle-search');
|
|
17
|
+
let headerSearchButton = document.querySelector('.qld__main-nav__toggle-search');
|
|
26
18
|
if(headerSearchButton) {
|
|
27
19
|
document.querySelector('.qld__main-nav__toggle-search').addEventListener('click', toggleSearch);
|
|
28
20
|
}
|
|
29
|
-
|
|
30
21
|
const searchInput = document.getElementById('search-input');
|
|
31
22
|
if (searchInput) {
|
|
23
|
+
let timeout;
|
|
24
|
+
|
|
32
25
|
searchInput.addEventListener('keyup', function() {
|
|
33
|
-
|
|
26
|
+
clearTimeout(timeout);
|
|
27
|
+
timeout = setTimeout(() => {
|
|
28
|
+
showSuggestions(this.value);
|
|
29
|
+
}, 300);
|
|
34
30
|
});
|
|
35
31
|
|
|
36
32
|
searchInput.addEventListener('focus', function() {
|
|
@@ -42,7 +38,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
|
|
42
38
|
showSuggestions('', true);
|
|
43
39
|
}
|
|
44
40
|
});
|
|
45
|
-
|
|
46
41
|
// Close suggestions when clicking outside
|
|
47
42
|
document.addEventListener('click', function(event) {
|
|
48
43
|
if (!searchInput.contains(event.target) && !document.getElementById('suggestions').contains(event.target)) {
|
|
@@ -54,6 +49,9 @@ window.addEventListener("DOMContentLoaded", () => {
|
|
|
54
49
|
// Navbar
|
|
55
50
|
initializeNavbar();
|
|
56
51
|
|
|
52
|
+
// Breadcrumb
|
|
53
|
+
breadcrumbShorten();
|
|
54
|
+
|
|
57
55
|
// Quick exit
|
|
58
56
|
initQuickexit();
|
|
59
57
|
positionQuickExit();
|
package/src/main.scss
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
// These variables include new $variables for the project, or replace existing out-of-the-box bootstrap variables defined under /node_modules/bootstrap/.../_variables.scss,
|
|
5
5
|
|
|
6
|
+
//QGDS tokens - masterbrand
|
|
7
|
+
@import "@qld-gov-au/qgds-tokens/dist/scss/_map.scss";
|
|
8
|
+
|
|
6
9
|
//QLD Names Colours
|
|
7
10
|
$qld-dark-blue : #05325F;
|
|
8
11
|
$qld-sapphire-blue : #09549F;
|
|
@@ -201,12 +204,10 @@ $project-colors: (
|
|
|
201
204
|
"button-dark-blue": $qld-button-dark-blue,
|
|
202
205
|
"text-darkest": $qld-text-darkest,
|
|
203
206
|
"dark-hover" : $qld-dark-hover,
|
|
204
|
-
|
|
205
207
|
"light-action-primary": $qld-light-action-primary,
|
|
206
208
|
"light-action-primary-hover": $qld-light-action-primary-hover,
|
|
207
209
|
"light-action-secondary": $qld-light-action-secondary,
|
|
208
210
|
"light-action-secondary-hover": $qld-light-action-secondary-hover,
|
|
209
|
-
|
|
210
211
|
"dark-action-primary": $qld-dark-action-primary,
|
|
211
212
|
"dark-action-primary-hover": $qld-dark-action-primary-hover,
|
|
212
213
|
"dark-action-text": $qld-dark-action-text,
|
|
@@ -217,28 +218,24 @@ $project-colors: (
|
|
|
217
218
|
//These will become properties on ::root node that you can reference by e.g: background: var(--qld-light-text-text)
|
|
218
219
|
"default-background": $qld-color-background,
|
|
219
220
|
"default-background-shade": $qld-color-background--shade,
|
|
220
|
-
|
|
221
221
|
"light-text-heading": $qld-text-headings,
|
|
222
222
|
"light-text-text": $qld-text-grey,
|
|
223
223
|
"light-background": $qld-light-background,
|
|
224
224
|
"light-background-shade": $qld-light-background-shade,
|
|
225
225
|
"light-border": $qld-light-border,
|
|
226
|
-
|
|
227
226
|
"light-alt-background": $qld-color-light-alt-background,
|
|
228
227
|
"light-alt-background-shade": $qld-color-light-alt-background--shade,
|
|
229
|
-
|
|
230
228
|
"dark-background": $qld-color-dark-background,
|
|
231
229
|
"dark-background-shade": $qld-color-dark-background--shade,
|
|
232
230
|
"dark-alt-background": $qld-color-dark-alt-background,
|
|
233
231
|
"dark-alt-background-shade": $qld-color-dark-alt-background--shade,
|
|
234
|
-
|
|
235
232
|
"link-visited": $qld-link-visited,
|
|
236
233
|
"link-visited-dark": $qld-link-visited-dark,
|
|
237
|
-
|
|
238
234
|
);
|
|
239
235
|
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
// Merge maps
|
|
237
|
+
$merged-theme-qld: map-merge($theme-colors, $qld-tokens);
|
|
238
|
+
$theme-colors: map-merge($merged-theme-qld, $project-colors);
|
|
242
239
|
|
|
243
240
|
// Cusotm GRID breakpoints: https://getbootstrap.com/docs/5.2/layout/grid/#variables
|
|
244
241
|
$grid-breakpoints: (
|
|
@@ -249,15 +246,11 @@ $grid-breakpoints: (
|
|
|
249
246
|
xl: 1312px
|
|
250
247
|
);
|
|
251
248
|
|
|
252
|
-
|
|
253
|
-
|
|
254
249
|
// Default border radius
|
|
255
250
|
$border-radius: 0.25rem;
|
|
256
251
|
$border-radius-sm: 0.25rem;
|
|
257
252
|
$border-radius-lg: 0.25rem;
|
|
258
253
|
|
|
259
|
-
|
|
260
|
-
|
|
261
254
|
// QGOV Borders
|
|
262
255
|
$qld-border-width-thin : 1px;
|
|
263
256
|
$qld-border-width-default : 2px;
|
|
@@ -265,8 +258,6 @@ $qld-border-width-medium : 3px;
|
|
|
265
258
|
$qld-border-width-thick : 4px;
|
|
266
259
|
$qld-border-width-extra-thick : 8px;
|
|
267
260
|
|
|
268
|
-
|
|
269
|
-
|
|
270
261
|
// Extended spacers to procude 8px and 16px increments
|
|
271
262
|
// use px-16, py-sm-16, ml-40, mr-40, etc
|
|
272
263
|
$qld-custom-spacers: (
|