@qld-gov-au/qgds-bootstrap5 2.1.0 → 2.1.2
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/.storybook/preview.js +15 -6
- package/dist/assets/components/bs5/button/button.hbs +2 -1
- package/dist/assets/components/bs5/callToAction/callToAction.hbs +3 -3
- package/dist/assets/components/bs5/dateinput/dateinput.hbs +21 -27
- package/dist/assets/components/bs5/formcheck/formcheck.hbs +1 -1
- package/dist/assets/components/bs5/globalAlert/globalAlert.hbs +8 -1
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/pagination/pagination.hbs +7 -2
- package/dist/assets/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
- package/dist/assets/components/bs5/searchInput/searchInput.hbs +2 -2
- package/dist/assets/components/bs5/select/select.hbs +1 -1
- package/dist/assets/components/bs5/textarea/textarea.hbs +1 -1
- package/dist/assets/components/bs5/textbox/textbox.hbs +1 -1
- package/dist/assets/css/qld.bootstrap.css +2 -2
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
- package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
- package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
- package/dist/assets/js/handlebars.init.min.js +56 -49
- package/dist/assets/js/handlebars.init.min.js.map +2 -2
- package/dist/assets/js/handlebars.partials.js +56 -49
- package/dist/assets/js/handlebars.partials.js.map +2 -2
- package/dist/assets/js/qld.bootstrap.min.js +6 -6
- package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
- package/dist/assets/node/handlebars.init.min.js +21 -13
- package/dist/assets/node/handlebars.init.min.js.map +2 -2
- package/dist/components/bs5/button/button.hbs +2 -1
- package/dist/components/bs5/callToAction/callToAction.hbs +3 -3
- package/dist/components/bs5/dateinput/dateinput.hbs +21 -27
- package/dist/components/bs5/formcheck/formcheck.hbs +1 -1
- package/dist/components/bs5/globalAlert/globalAlert.hbs +8 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/pagination/pagination.hbs +7 -2
- package/dist/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
- package/dist/components/bs5/searchInput/searchInput.hbs +2 -2
- package/dist/components/bs5/select/select.hbs +1 -1
- package/dist/components/bs5/textarea/textarea.hbs +1 -1
- package/dist/components/bs5/textbox/textbox.hbs +1 -1
- package/dist/package.json +33 -32
- package/dist/sample-data/callToAction/callToAction.data.json +2 -1
- package/dist/sample-data/dateinput/dateinput.data.json +3 -1
- package/dist/sample-data/pagination/pagination.data.json +4 -4
- package/dist/sample-data/promotionalPanel/promotionalPanel.data.json +45 -47
- package/package.json +33 -32
- package/src/components/bs5/breadcrumbs/breadcrumbs.scss +1 -0
- package/src/components/bs5/button/button.hbs +2 -1
- package/src/components/bs5/button/button.scss +1 -0
- package/src/components/bs5/button/button.stories.js +16 -4
- package/src/components/bs5/callToAction/callToAction.data.json +2 -1
- package/src/components/bs5/callToAction/callToAction.hbs +3 -3
- package/src/components/bs5/callToAction/callToAction.stories.js +2 -2
- package/src/components/bs5/card/card.scss +2 -2
- package/src/components/bs5/dateinput/Dateinput.js +1 -38
- package/src/components/bs5/dateinput/Dateinput.mdx +27 -0
- package/src/components/bs5/dateinput/Dateinput.stories.js +48 -4
- package/src/components/bs5/dateinput/dateinput.data.json +3 -1
- package/src/components/bs5/dateinput/dateinput.functions.js +91 -0
- package/src/components/bs5/dateinput/dateinput.hbs +21 -27
- package/src/components/bs5/formcheck/formcheck.hbs +1 -1
- package/src/components/bs5/formcheck/formcheck.scss +5 -0
- package/src/components/bs5/globalAlert/globalAlert.hbs +8 -1
- package/src/components/bs5/globalAlert/globalAlert.scss +14 -19
- package/src/components/bs5/globalAlert/globalAlert.stories.js +1 -0
- package/src/components/bs5/globalAlert/globalAlert.test.js +10 -5
- package/src/components/bs5/inpageAlert/inpageAlert.scss +3 -4
- package/src/components/bs5/inpagenav/inpagenav.scss +9 -1
- package/src/components/bs5/modal/modal.scss +1 -1
- package/src/components/bs5/navbar/navbar.functions.js +39 -28
- package/src/components/bs5/navbar/navbar.scss +43 -28
- package/src/components/bs5/navbar/navbar.stories.js +4 -3
- package/src/components/bs5/pageLayout/pageLayout.stories.js +2 -0
- package/src/components/bs5/pagination/pagination.data.json +4 -4
- package/src/components/bs5/pagination/pagination.hbs +7 -2
- package/src/components/bs5/pagination/pagination.scss +1 -1
- package/src/components/bs5/promotionalPanel/promotionalPanel.data.json +45 -47
- package/src/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
- package/src/components/bs5/quickexit/quickexit.scss +1 -1
- package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +2 -2
- package/src/components/bs5/searchInput/search.functions.js +9 -5
- package/src/components/bs5/searchInput/searchInput.hbs +2 -2
- package/src/components/bs5/searchInput/searchInput.scss +1 -0
- package/src/components/bs5/select/select.hbs +1 -1
- package/src/components/bs5/sidenav/sidenav.scss +17 -19
- package/src/components/bs5/table/table.scss +93 -83
- package/src/components/bs5/textarea/textarea.hbs +1 -1
- package/src/components/bs5/textbox/textbox.hbs +1 -1
- package/src/css/main.scss +3 -0
- package/src/css/mixins/focusable.scss +1 -1
- package/src/css/qld-reduced-motion.scss +51 -0
- package/src/css/qld-tokens.scss +3 -3
- package/src/css/qld-type.scss +7 -13
- package/src/js/constants.js +10 -0
- package/src/js/qld.bootstrap.js +99 -99
- package/src/js/utils.js +3 -1
|
@@ -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>
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
--sidenav-level-three-padding: 3.5rem;
|
|
15
15
|
--sidenav-navlink-padding: 1rem;
|
|
16
16
|
|
|
17
|
-
--sidenav-hover-bg: var(--#{$prefix}
|
|
18
|
-
--sidenav-hover-color: var(--#{$prefix}
|
|
17
|
+
--sidenav-hover-bg: var(--#{$prefix}neutral-lightest);
|
|
18
|
+
--sidenav-hover-color: var(--#{$prefix}light-action-primary);
|
|
19
19
|
--sidenav-hover-underline-color: var(
|
|
20
20
|
--#{$prefix}color-default-color-light-underline-hover
|
|
21
21
|
);
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
--#{$prefix}color-default-color-light-text-heading
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
--sidenav-heading-border-color:
|
|
28
|
-
--sidenav-item-border-color:
|
|
29
|
-
--sidenav-subitem-border-color:
|
|
27
|
+
--sidenav-heading-border-color: var(--#{$prefix}light-accent);
|
|
28
|
+
--sidenav-item-border-color: var(--#{$prefix}light-border-alt);
|
|
29
|
+
--sidenav-subitem-border-color: var(--#{$prefix}neutral-lighter);
|
|
30
30
|
|
|
31
31
|
--sidenav-submenu-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='var(--#{$prefix}color-light-border)' d='M2 10h12v1H2zM2 5h1v5H2z'/%3E%3C/svg%3E");
|
|
32
32
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
--#{$prefix}accordion-btn-padding-x: 1rem;
|
|
44
44
|
--#{$prefix}accordion-btn-padding-y: 1rem;
|
|
45
45
|
--#{$prefix}accordion-btn-color: var(--#{$prefix}link-color);
|
|
46
|
-
--#{$prefix}accordion-btn-bg: var(--#{$prefix}
|
|
46
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}neutral-lightest);
|
|
47
47
|
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
|
|
48
48
|
--#{$prefix}accordion-btn-active-icon: #{escape-svg(
|
|
49
49
|
$accordion-button-active-icon
|
|
@@ -59,15 +59,13 @@
|
|
|
59
59
|
.light & {
|
|
60
60
|
--#{$prefix}accordion-bg: var(--#{$prefix}light-background);
|
|
61
61
|
--#{$prefix}accordion-btn-bg: var(--#{$prefix}light-background-shade);
|
|
62
|
-
--#{$prefix}accordion-border-color: var(
|
|
63
|
-
--#{$prefix}color-default-color-light-border-light
|
|
64
|
-
);
|
|
62
|
+
--#{$prefix}accordion-border-color: var(--#{$prefix}light-border);
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
.alt & {
|
|
68
|
-
--#{$prefix}accordion-bg: var(--#{$prefix}light-
|
|
69
|
-
--#{$prefix}accordion-btn-bg: var(--#{$prefix}
|
|
70
|
-
--#{$prefix}accordion-border-color: var(--#{$prefix}
|
|
66
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}light-alt-background);
|
|
67
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}neutral-light);
|
|
68
|
+
--#{$prefix}accordion-border-color: var(--#{$prefix}light-border-alt);
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
// Shared 'Dark' theme variables
|
|
@@ -85,14 +83,14 @@
|
|
|
85
83
|
|
|
86
84
|
// Theme specific variables
|
|
87
85
|
.dark & {
|
|
88
|
-
--#{$prefix}accordion-bg: var(--#{$prefix}
|
|
86
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}dark-background);
|
|
89
87
|
--#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-background-shade);
|
|
90
88
|
--#{$prefix}accordion-border-color: var(--#{$prefix}dark-border);
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
.dark-alt & {
|
|
94
|
-
--#{$prefix}accordion-bg: var(--#{$prefix}dark-
|
|
95
|
-
--#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-
|
|
92
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}dark-alt-background);
|
|
93
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-alt-background-shade);
|
|
96
94
|
--#{$prefix}accordion-border-color: var(--#{$prefix}dark-alt-border);
|
|
97
95
|
}
|
|
98
96
|
}
|
|
@@ -114,10 +112,10 @@
|
|
|
114
112
|
--#{$prefix}color-default-color-dark-text-heading
|
|
115
113
|
);
|
|
116
114
|
|
|
117
|
-
--sidenav-heading-border-color: var(--#{$prefix}
|
|
118
|
-
--sidenav-item-border-color: var(--#{$prefix}
|
|
119
|
-
--sidenav-subitem-border-color: var(--#{$prefix}
|
|
120
|
-
--sidenav-active-item-color: var(--#{$prefix}white);
|
|
115
|
+
--sidenav-heading-border-color: var(--#{$prefix}dark-accent);
|
|
116
|
+
--sidenav-item-border-color: var(--#{$prefix}dark-alt-border);
|
|
117
|
+
--sidenav-subitem-border-color: var(--#{$prefix}dark-border);
|
|
118
|
+
--sidenav-active-item-color: var(--#{$prefix}neutral-white);
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
|
|
@@ -1,93 +1,103 @@
|
|
|
1
1
|
.qld-table {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
border: 1px solid var(--qld-neutral-lighter);
|
|
3
|
+
border-radius: 0.75rem;
|
|
4
|
+
margin-bottom: 1rem;
|
|
5
|
+
|
|
6
|
+
// DS includes a version of the table without borders ("quiet table").
|
|
7
|
+
// This is achieved by setting the border on a wrapping .qld-table--borderless class
|
|
8
|
+
&--borderless {
|
|
9
|
+
border: 1px solid transparent;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.table {
|
|
13
|
+
--qld-table-border-color: var(--qld-neutral-lighter);
|
|
14
|
+
--qld-table-header-color: var(--qld-light-text-heading);
|
|
15
|
+
--qld-table-cell-color: var(--qld-light-text-text);
|
|
16
|
+
--qld-table-striped-bg: var(--qld-neutral-lightest);
|
|
17
|
+
|
|
18
|
+
margin-bottom: 0;
|
|
4
19
|
border-radius: 0.75rem;
|
|
5
|
-
margin-bottom: 1rem;
|
|
6
20
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
21
|
+
//required to maintain effective border-radius on the table
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
|
|
24
|
+
// Override Bootstrap's default odd-row striping to use even rows
|
|
25
|
+
&.table-striped {
|
|
26
|
+
> tbody > tr:nth-of-type(odd) > * {
|
|
27
|
+
--qld-table-accent-bg: transparent;
|
|
28
|
+
--qld-table-bg-type: transparent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
> tbody > tr:nth-of-type(even) > * {
|
|
32
|
+
--qld-table-accent-bg: var(--qld-table-striped-bg);
|
|
33
|
+
--qld-table-bg-type: var(--qld-table-striped-bg);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
caption {
|
|
38
|
+
caption-side: top;
|
|
39
|
+
color: var(--qld-headings-color);
|
|
40
|
+
padding: 0.75rem;
|
|
41
|
+
line-height: 2rem;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
font-size: 1.25rem;
|
|
44
|
+
border-bottom: 1px solid var(--qld-table-border-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.sub-caption {
|
|
48
|
+
color: var(--qld-light-text-lighter);
|
|
49
|
+
font-size: 0.875rem;
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
line-height: 1.25rem;
|
|
52
|
+
display: table-row;
|
|
11
53
|
}
|
|
12
54
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//required to maintain effective border-radius on the table
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
|
|
25
|
-
caption {
|
|
26
|
-
caption-side: top;
|
|
27
|
-
color: var(--qld-headings-color);
|
|
28
|
-
padding: 0.75rem;
|
|
29
|
-
line-height: 2rem;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
font-size: 1.25rem;
|
|
32
|
-
border-bottom: 1px solid var(--qld-table-border-color);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.sub-caption {
|
|
36
|
-
color: var(--qld-dark-grey-muted);
|
|
37
|
-
font-size: 0.875rem;
|
|
38
|
-
font-weight: 400;
|
|
39
|
-
line-height: 1.25rem;
|
|
40
|
-
display: table-row;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
thead th,
|
|
44
|
-
thead td {
|
|
45
|
-
border-bottom: 2px solid var(--qld-brand-secondary);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
th {
|
|
49
|
-
color: var(--qld-table-header-color);
|
|
50
|
-
padding: 1.25rem 0.75rem;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
td {
|
|
54
|
-
color: var(--qld-table-cell-color);
|
|
55
|
-
padding: 0.75rem;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
tbody tr {
|
|
59
|
-
border-bottom: 1px solid var(--qld-table-border-color);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
tfoot th,
|
|
63
|
-
tfoot td {
|
|
64
|
-
border-top: 2px solid $qld-brand-secondary;
|
|
65
|
-
border-bottom: 0;
|
|
66
|
-
font-weight: 600;
|
|
67
|
-
padding: 0.75rem;
|
|
68
|
-
}
|
|
55
|
+
thead th,
|
|
56
|
+
thead td {
|
|
57
|
+
border-bottom: 2px solid var(--qld-light-accent);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
th {
|
|
61
|
+
color: var(--qld-table-header-color);
|
|
62
|
+
padding: 1.25rem 0.75rem;
|
|
63
|
+
}
|
|
69
64
|
|
|
65
|
+
td {
|
|
66
|
+
color: var(--qld-table-cell-color);
|
|
67
|
+
padding: 0.75rem;
|
|
70
68
|
}
|
|
71
69
|
|
|
70
|
+
tbody tr {
|
|
71
|
+
border-bottom: 1px solid var(--qld-table-border-color);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
tfoot th,
|
|
75
|
+
tfoot td {
|
|
76
|
+
border-top: 2px solid var(--qld-light-accent);
|
|
77
|
+
border-bottom: 0;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
padding: 0.75rem;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//Build a bootstrap ".table-dark" class dynamically, passing in a background colour
|
|
84
|
+
@include table-variant("dark", $color-default-color-dark-background-default);
|
|
85
|
+
|
|
86
|
+
//Then, we extend .table-dark with some additional rules
|
|
87
|
+
.table-dark {
|
|
88
|
+
--qld-table-border-color: var(--qld-dark-border);
|
|
89
|
+
--qld-table-header-color: var(--qld-dark-text-heading);
|
|
90
|
+
--qld-table-cell-color: var(--qld-dark-text-text);
|
|
91
|
+
--qld-table-striped-bg: var(--qld-dark-background-shade);
|
|
92
|
+
|
|
93
|
+
caption,
|
|
94
|
+
.sub-caption {
|
|
95
|
+
background-color: var(--qld-dark-background);
|
|
96
|
+
color: var(--qld-dark-text-text);
|
|
97
|
+
}
|
|
72
98
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
//Then, we extend .table-dark with some additional rules
|
|
77
|
-
.table-dark {
|
|
78
|
-
--qld-table-border-color: var(--qld-dark-border);
|
|
79
|
-
--qld-table-header-color: var(--qld-white);
|
|
80
|
-
--qld-table-cell-color: var(--qld-white);
|
|
81
|
-
--qld-table-striped-bg: var(--qld-extra-light-grey);
|
|
82
|
-
|
|
83
|
-
caption,
|
|
84
|
-
.sub-caption {
|
|
85
|
-
background-color: #09549F;
|
|
86
|
-
color: #FFF;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
thead th {
|
|
90
|
-
background-color: #04498F;
|
|
91
|
-
}
|
|
99
|
+
thead th {
|
|
100
|
+
background-color: var(--qld-dark-background-shade);
|
|
92
101
|
}
|
|
93
|
-
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -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}} />
|
package/src/css/main.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
///
|
|
2
2
|
/// Default focus styles for use in buttons etc. Resets :focus and uses :focus-visible instead which only appears on keyboard interaction.
|
|
3
|
-
/// @param {Boolean} $offsetOutline [true] - Offset the focus ring by 2px.
|
|
3
|
+
/// @param {Boolean|number} $offsetOutline [true] - Offset the focus ring by 2px.
|
|
4
4
|
/// @param {Boolean} $isFocusWithin [false] - Optionally apply styles via :focus-within rather than :focus-visible
|
|
5
5
|
/// @param {String} $outlineWidth: [3px] The width of the outline.
|
|
6
6
|
/// @param {String} $customSelector [null] - If passed, will override $isFocusWithin and apply focus styles instead to a custom selector string. @see SearchInput
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2
|
+
.show,
|
|
3
|
+
.show:after,
|
|
4
|
+
.show:before,
|
|
5
|
+
a::after,
|
|
6
|
+
a::before,
|
|
7
|
+
a.dropdown-item,
|
|
8
|
+
.collapsed,
|
|
9
|
+
.accordion-toggle-btn--closed::after,
|
|
10
|
+
.accordion-toggle-btn--open::after,
|
|
11
|
+
.video-thumbnail .video-thumbnail-image:before,
|
|
12
|
+
* {
|
|
13
|
+
transition-duration: 0.001ms !important;
|
|
14
|
+
animation-duration: 0.001ms !important;
|
|
15
|
+
transition: none !important;
|
|
16
|
+
animation: none !important;
|
|
17
|
+
}
|
|
18
|
+
a.dropdown-item,
|
|
19
|
+
a.dropdown-item:hover {
|
|
20
|
+
gap: 1rem !important;
|
|
21
|
+
}
|
|
22
|
+
a.dropdown-item,
|
|
23
|
+
a.dropdown-item:hover,
|
|
24
|
+
a.dropdown-item:hover::after {
|
|
25
|
+
padding-inline-end: 0.5rem !important;
|
|
26
|
+
transform: none !important;
|
|
27
|
+
top: unset;
|
|
28
|
+
}
|
|
29
|
+
.qld-cta-link:hover {
|
|
30
|
+
gap: 0.5rem !important;
|
|
31
|
+
}
|
|
32
|
+
.link-column .nav-item .nav-link::after,
|
|
33
|
+
.link-column .nav-item .nav-link:hover::after {
|
|
34
|
+
margin-inline-end: 0.5rem;
|
|
35
|
+
}
|
|
36
|
+
.link-column .all-link .qld-cta-link:hover {
|
|
37
|
+
padding-inline-end: 0.5rem;
|
|
38
|
+
}
|
|
39
|
+
.qld-tabs .nav-tabs {
|
|
40
|
+
scroll-behavior: unset !important;
|
|
41
|
+
}
|
|
42
|
+
.card.card-arrow:hover .qld-icon {
|
|
43
|
+
transform: translateX(0rem);
|
|
44
|
+
}
|
|
45
|
+
@media (max-width: 991.98px) {
|
|
46
|
+
.navbar.show > .container,
|
|
47
|
+
.navbar.vertical.show > .container {
|
|
48
|
+
transform: translateX(0);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
package/src/css/qld-tokens.scss
CHANGED
|
@@ -16,15 +16,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: #
|
|
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: #
|
|
27
|
-
$color-default-color-dark-underline-visited: #
|
|
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;
|
package/src/css/qld-type.scss
CHANGED
|
@@ -6,12 +6,11 @@ body {
|
|
|
6
6
|
|
|
7
7
|
.qld-content-body {
|
|
8
8
|
p {
|
|
9
|
-
margin-bottom:
|
|
9
|
+
margin-bottom: 1rem;
|
|
10
|
+
line-height: 1.5;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
12
|
ul,
|
|
13
|
-
ol
|
|
14
|
-
p {
|
|
13
|
+
ol{
|
|
15
14
|
line-height: 1.75;
|
|
16
15
|
}
|
|
17
16
|
|
|
@@ -77,12 +76,6 @@ a.nav-link {
|
|
|
77
76
|
border-radius: 0;
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
figure > figcaption {
|
|
81
|
-
font-size: 14px;
|
|
82
|
-
font-weight: 400;
|
|
83
|
-
line-height: 20px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
79
|
a.nostyle {
|
|
87
80
|
text-decoration: unset;
|
|
88
81
|
text-underline-offset: unset;
|
|
@@ -93,9 +86,10 @@ a.nostyle {
|
|
|
93
86
|
}
|
|
94
87
|
}
|
|
95
88
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
figure > figcaption {
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
line-height: 20px;
|
|
99
93
|
}
|
|
100
94
|
|
|
101
95
|
::selection {
|
package/src/js/qld.bootstrap.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "./../components/bs5/video/video.functions";
|
|
10
10
|
import { initializeNavbar } from "./../components/bs5/navbar/navbar.functions";
|
|
11
11
|
import { initBreadcrumb } from "./../components/bs5/breadcrumbs/breadcrumbs.functions";
|
|
12
|
+
import { initDateInput } from "../components/bs5/dateinput/dateinput.functions";
|
|
12
13
|
import { initQuickexit } from "./../components/bs5/quickexit/quickexit.functions";
|
|
13
14
|
//import { displayFeedbackForm } from "./../components/bs5/footer/footer.functions";
|
|
14
15
|
import { toggleSearch } from "./../components/bs5/header/header.functions";
|
|
@@ -23,122 +24,121 @@ import { validateSkipLinks } from "./../components/bs5/skiplinks/skipLinks.funct
|
|
|
23
24
|
|
|
24
25
|
window.addEventListener("click", initQuickexit, true);
|
|
25
26
|
window.addEventListener("keydown", initQuickexit, true);
|
|
26
|
-
|
|
27
27
|
window.addEventListener("DOMContentLoaded", () => {
|
|
28
|
-
(
|
|
29
|
-
backToTop();
|
|
28
|
+
backToTop();
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
initTabsScroll();
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
initGlobalAlerts();
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
// Footer FormIO Action
|
|
35
|
+
// Note: This is added here, as there is an issue with breadcrumbShorten() function.
|
|
36
|
+
// Will move this once that issue is fixed.
|
|
37
|
+
/*
|
|
39
38
|
const footerFormio = document.getElementById("qg-feedback-toggle");
|
|
40
39
|
if (footerFormio) {
|
|
41
40
|
displayFeedbackForm();
|
|
42
41
|
}
|
|
43
42
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// Attach event listener to form submit
|
|
72
|
-
form.addEventListener("submit", function (event) {
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
const query = searchInput.value.trim();
|
|
75
|
-
submitSearchForm(query, form);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
//Header - get the <header> element
|
|
81
|
-
let header = document.querySelector("header");
|
|
82
|
-
|
|
83
|
-
if (header) {
|
|
84
|
-
// Get the current page URL without query string parameters
|
|
85
|
-
let url = window.location.origin + window.location.pathname;
|
|
86
|
-
// Set the data-page-url attribute on the <header> element
|
|
87
|
-
header.setAttribute("data-page-url", url);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Navbar
|
|
91
|
-
initializeNavbar();
|
|
92
|
-
|
|
93
|
-
// Breadcrumb
|
|
94
|
-
initBreadcrumb();
|
|
95
|
-
|
|
96
|
-
// Quick exit
|
|
97
|
-
window.addEventListener("click", initQuickexit, true);
|
|
98
|
-
window.addEventListener("keydown", initQuickexit, true);
|
|
99
|
-
initQuickexit();
|
|
100
|
-
|
|
101
|
-
// Accordion
|
|
102
|
-
let accordionToggleButton = document.querySelectorAll(
|
|
103
|
-
".accordion-toggle-btn",
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
accordionToggleButton.forEach(function (toggleButton) {
|
|
107
|
-
toggleButton.addEventListener("click", accordionToggleAll);
|
|
108
|
-
|
|
109
|
-
let accordionButtons = toggleButton
|
|
110
|
-
.closest(".accordion-group")
|
|
111
|
-
.querySelectorAll(".accordion-button");
|
|
43
|
+
//Header search
|
|
44
|
+
let headerSearchButton = document.getElementById(
|
|
45
|
+
"qld-header-toggle-search-button",
|
|
46
|
+
);
|
|
47
|
+
if (headerSearchButton) {
|
|
48
|
+
headerSearchButton.addEventListener("click", toggleSearch);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Get all forms with the class 'site-search'
|
|
52
|
+
let forms = document.querySelectorAll(".site-search");
|
|
53
|
+
|
|
54
|
+
forms.forEach((form) => {
|
|
55
|
+
// Get the search input within the current form
|
|
56
|
+
let searchInput = form.querySelector(".qld-search-input input");
|
|
57
|
+
|
|
58
|
+
if (searchInput) {
|
|
59
|
+
let timeout;
|
|
60
|
+
|
|
61
|
+
// Add keyup event listener to the search input
|
|
62
|
+
searchInput.addEventListener("input", function (e) {
|
|
63
|
+
clearTimeout(timeout);
|
|
64
|
+
timeout = setTimeout(() => {
|
|
65
|
+
const value = e.target.value.trim();
|
|
66
|
+
showSuggestions(value, value === "", form);
|
|
67
|
+
}, 300);
|
|
68
|
+
});
|
|
112
69
|
|
|
113
|
-
|
|
114
|
-
|
|
70
|
+
// Attach event listener to form submit
|
|
71
|
+
form.addEventListener("submit", function (event) {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
const query = searchInput.value.trim();
|
|
74
|
+
submitSearchForm(query, form);
|
|
115
75
|
});
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
//Header
|
|
80
|
+
// Get the <header> element
|
|
81
|
+
let header = document.querySelector("header");
|
|
82
|
+
if (header) {
|
|
83
|
+
// Get the current page URL without query string parameters
|
|
84
|
+
let url = window.location.origin + window.location.pathname;
|
|
85
|
+
// Set the data-page-url attribute on the <header> element
|
|
86
|
+
header.setAttribute("data-page-url", url);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Navbar
|
|
90
|
+
initializeNavbar();
|
|
91
|
+
|
|
92
|
+
// Breadcrumb
|
|
93
|
+
initBreadcrumb();
|
|
94
|
+
|
|
95
|
+
// Quick exit
|
|
96
|
+
window.addEventListener("click", initQuickexit, true);
|
|
97
|
+
window.addEventListener("keydown", initQuickexit, true);
|
|
98
|
+
initQuickexit();
|
|
99
|
+
|
|
100
|
+
// Accordion
|
|
101
|
+
let accordionToggleButton = document.querySelectorAll(
|
|
102
|
+
".accordion-toggle-btn",
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
accordionToggleButton.forEach(function (toggleButton) {
|
|
106
|
+
toggleButton.addEventListener("click", accordionToggleAll);
|
|
107
|
+
|
|
108
|
+
let accordionButtons = toggleButton
|
|
109
|
+
.closest(".accordion-group")
|
|
110
|
+
.querySelectorAll(".accordion-button");
|
|
111
|
+
|
|
112
|
+
accordionButtons.forEach(function (button) {
|
|
113
|
+
button.addEventListener("click", accordionToggleAllButtonState);
|
|
116
114
|
});
|
|
115
|
+
});
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
let inPageLinks = document.querySelectorAll('a[href^="#"]');
|
|
119
118
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
accordionHashLinks();
|
|
120
|
+
window.onhashchange = accordionHashLinks;
|
|
121
|
+
inPageLinks.forEach(function (link) {
|
|
122
|
+
link.addEventListener("click", accordionHashLinks);
|
|
123
|
+
});
|
|
125
124
|
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
// Video
|
|
126
|
+
let videoThumbnails = document.querySelectorAll(".video-thumbnail");
|
|
128
127
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
videoThumbnails.forEach(function (thumbnail) {
|
|
129
|
+
thumbnail.addEventListener("click", videoEmbedPlay);
|
|
130
|
+
});
|
|
132
131
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
let videoTranscripts = document.querySelectorAll(
|
|
133
|
+
".video .accordion .accordion-button",
|
|
134
|
+
);
|
|
136
135
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
videoTranscripts.forEach(function (transcript) {
|
|
137
|
+
transcript.addEventListener("click", videoTranscriptTitle);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
initDateInput();
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
})();
|
|
142
|
+
// Skip Links
|
|
143
|
+
validateSkipLinks();
|
|
144
144
|
});
|