@qld-gov-au/qgds-bootstrap5 2.1.19 → 2.1.21
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/components/bs5/details/details.hbs +10 -0
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/header/header.hbs +2 -1
- package/dist/assets/components/bs5/header/headerBrand.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/img/icons-sprite.svg +4 -0
- package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
- package/dist/assets/js/handlebars.init.min.js +57 -46
- package/dist/assets/js/handlebars.init.min.js.map +4 -4
- package/dist/assets/js/handlebars.partials.js +57 -46
- package/dist/assets/js/handlebars.partials.js.map +4 -4
- package/dist/assets/js/qld.bootstrap.min.js +1 -1
- package/dist/assets/node/handlebars.init.min.js +60 -49
- package/dist/assets/node/handlebars.init.min.js.map +4 -4
- package/dist/components/bs5/details/details.hbs +10 -0
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/header/header.hbs +2 -1
- package/dist/components/bs5/header/headerBrand.hbs +1 -1
- package/dist/package.json +8 -8
- package/dist/sample-data/details/details.data.json +6 -0
- package/package.json +8 -8
- package/src/components/bs5/banner/banner.scss +4 -4
- package/src/components/bs5/callout/callout.scss +47 -45
- package/src/components/bs5/details/Details.js +8 -0
- package/src/components/bs5/details/details.data.json +6 -0
- package/src/components/bs5/details/details.hbs +10 -0
- package/src/components/bs5/details/details.scss +169 -0
- package/src/components/bs5/details/details.stories.js +99 -0
- package/src/components/bs5/details/metadata.json +15 -0
- package/src/components/bs5/globalAlert/globalAlert.scss +15 -4
- package/src/components/bs5/header/header.hbs +2 -1
- package/src/components/bs5/header/headerBrand.hbs +1 -1
- package/src/components/bs5/icons/_icons-multicolours.list.scss +2 -2
- package/src/components/bs5/icons/_icons.list.js +1 -0
- package/src/components/bs5/icons/_icons.list.scss +1 -0
- package/src/components/bs5/icons/_icons.variables.scss +1 -0
- package/src/components/common/layout/grid.scss +9 -1
- package/src/css/main.scss +1 -0
- package/src/css/qld-print.scss +18 -0
- package/src/css/qld-utilities.scss +7 -0
- package/src/img/icons/alert-cancel-filled.svg +3 -0
- package/src/img/icons-sprite.svg +4 -0
- package/src/js/handlebars.partials.js +2 -0
- package/src/stories/component-list.json +16 -0
- package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- QGDS Component: Details -->
|
|
2
|
+
<details class="qld-details{{#if size}} qld-details-{{size}}{{/if}}"{{#if open}} open{{/if}}>
|
|
3
|
+
<summary class="qld-details-summary">
|
|
4
|
+
<span class="qld-details-summary-text">{{summaryText}}</span>
|
|
5
|
+
|
|
6
|
+
</summary>
|
|
7
|
+
<div class="qld-details-content">
|
|
8
|
+
{{{content}}}
|
|
9
|
+
</div>
|
|
10
|
+
</details>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.
|
|
2
|
+
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.21","branch":"HEAD","tag":"v2.1.21","commit":"f4639297b6c558a2a4aa08920273ec29f4c018e7","majorVersion":"v2"} -->
|
|
3
3
|
|
|
4
4
|
{{! Select environment, used verbatium if not using predefind key
|
|
5
5
|
cdn := PROD|STAGING|BETA|TEST|DEV|???
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
<div class="d-flex justify-content-between">
|
|
7
7
|
|
|
8
8
|
<a class="qld-header-link align-self-center"
|
|
9
|
-
href="{{#if preHeader.globalLink.url}}{{preHeader.globalLink.url}}{{else}}https://qld.gov.au{{/if}}"
|
|
9
|
+
href="{{#if preHeader.globalLink.url}}{{preHeader.globalLink.url}}{{else}}https://qld.gov.au{{/if}}"
|
|
10
|
+
aria-label="{{#if preHeader.globalLink.text}}{{preHeader.globalLink.text}}{{else}}Queensland Government{{/if}}">
|
|
10
11
|
<span class="d-none d-lg-inline">{{preHeader.globalLink.text}}</span>
|
|
11
12
|
{{#if hasDeliveringForQLDLogo}}
|
|
12
13
|
{{>logo logo="coa-delivering-for-qld" className="qld-header-logo is-delivering-for-qld" fill="currentColor"}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
<div class="qld-header-brand">
|
|
3
|
-
<a class="qld-header-link d-lg-inline-flex align-middle" href="{{url}}">
|
|
3
|
+
<a class="qld-header-link d-lg-inline-flex align-middle" href="{{url}}"{{#unless logo}}{{#unless siteTitle}} aria-label="Queensland Government"{{/unless}}{{/unless}}>
|
|
4
4
|
<div class="qld-header-brand-image align-self-center">
|
|
5
5
|
{{#if logo}}
|
|
6
6
|
<img src="{{logo.src}}" height="56" alt="{{#if logo.altText}}{{logo.altText}}{{else}}Queensland government{{/if}}" />
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qld-gov-au/qgds-bootstrap5",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,19 +70,19 @@
|
|
|
70
70
|
"autoprefixer": "^10.4.20",
|
|
71
71
|
"chai": "^6.2.1",
|
|
72
72
|
"chalk": "^5.6.2",
|
|
73
|
-
"chromatic": "^
|
|
74
|
-
"esbuild": "0.
|
|
73
|
+
"chromatic": "^16.3.0",
|
|
74
|
+
"esbuild": "0.28.0",
|
|
75
75
|
"esbuild-plugin-copy": "^2.1.1",
|
|
76
76
|
"esbuild-plugin-handlebars": "1.0.3",
|
|
77
|
-
"esbuild-sass-plugin": "3.
|
|
78
|
-
"eslint": "10.
|
|
77
|
+
"esbuild-sass-plugin": "3.7.0",
|
|
78
|
+
"eslint": "10.2.1",
|
|
79
79
|
"eslint-plugin-json": "^4.0.1",
|
|
80
80
|
"eslint-plugin-storybook": "^10.1.10",
|
|
81
|
-
"globals": "17.
|
|
81
|
+
"globals": "17.5.0",
|
|
82
82
|
"handlebars": "4.7.9",
|
|
83
83
|
"http-server": "^14.1.1",
|
|
84
84
|
"husky": "^9.1.7",
|
|
85
|
-
"jsdom": "^
|
|
85
|
+
"jsdom": "^29.0.0",
|
|
86
86
|
"mini-svg-data-uri": "^1.4.4",
|
|
87
87
|
"minimist": "^1.2.8",
|
|
88
88
|
"mocha": "^11.7.5",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"onchange": "^7.1.0",
|
|
92
92
|
"portfinder": "^1.0.38",
|
|
93
93
|
"postcss": "^8.5.6",
|
|
94
|
-
"prettier": "3.8.
|
|
94
|
+
"prettier": "3.8.3",
|
|
95
95
|
"raw-loader": "^4.0.2",
|
|
96
96
|
"rimraf": "^6.1.0",
|
|
97
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.
|
|
3
|
+
"version": "2.1.21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,19 +70,19 @@
|
|
|
70
70
|
"autoprefixer": "^10.4.20",
|
|
71
71
|
"chai": "^6.2.1",
|
|
72
72
|
"chalk": "^5.6.2",
|
|
73
|
-
"chromatic": "^
|
|
74
|
-
"esbuild": "0.
|
|
73
|
+
"chromatic": "^16.3.0",
|
|
74
|
+
"esbuild": "0.28.0",
|
|
75
75
|
"esbuild-plugin-copy": "^2.1.1",
|
|
76
76
|
"esbuild-plugin-handlebars": "1.0.3",
|
|
77
|
-
"esbuild-sass-plugin": "3.
|
|
78
|
-
"eslint": "10.
|
|
77
|
+
"esbuild-sass-plugin": "3.7.0",
|
|
78
|
+
"eslint": "10.2.1",
|
|
79
79
|
"eslint-plugin-json": "^4.0.1",
|
|
80
80
|
"eslint-plugin-storybook": "^10.1.10",
|
|
81
|
-
"globals": "17.
|
|
81
|
+
"globals": "17.5.0",
|
|
82
82
|
"handlebars": "4.7.9",
|
|
83
83
|
"http-server": "^14.1.1",
|
|
84
84
|
"husky": "^9.1.7",
|
|
85
|
-
"jsdom": "^
|
|
85
|
+
"jsdom": "^29.0.0",
|
|
86
86
|
"mini-svg-data-uri": "^1.4.4",
|
|
87
87
|
"minimist": "^1.2.8",
|
|
88
88
|
"mocha": "^11.7.5",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"onchange": "^7.1.0",
|
|
92
92
|
"portfinder": "^1.0.38",
|
|
93
93
|
"postcss": "^8.5.6",
|
|
94
|
-
"prettier": "3.8.
|
|
94
|
+
"prettier": "3.8.3",
|
|
95
95
|
"raw-loader": "^4.0.2",
|
|
96
96
|
"rimraf": "^6.1.0",
|
|
97
97
|
"run-parallel": "^1.2.0",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
--#{$prefix}banner-padding-top: 2rem;
|
|
97
97
|
--#{$prefix}banner-padding-bottom: 2rem;
|
|
98
98
|
|
|
99
|
-
//No banner
|
|
99
|
+
//No banner — top matches default banner so breadcrumb position is consistent across page types
|
|
100
100
|
&.no-banner {
|
|
101
|
-
--#{$prefix}banner-padding-top:
|
|
101
|
+
--#{$prefix}banner-padding-top: 2rem;
|
|
102
102
|
--#{$prefix}banner-padding-bottom: 1.5rem;
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
--#{$prefix}banner-padding-bottom: 3rem;
|
|
118
118
|
|
|
119
119
|
&.no-banner {
|
|
120
|
-
--#{$prefix}banner-padding-top:
|
|
120
|
+
--#{$prefix}banner-padding-top: 3rem;
|
|
121
121
|
--#{$prefix}banner-padding-bottom: 2rem;
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
--#{$prefix}banner-padding-bottom: 4rem;
|
|
139
139
|
|
|
140
140
|
&.no-banner {
|
|
141
|
-
--#{$prefix}banner-padding-top:
|
|
141
|
+
--#{$prefix}banner-padding-top: 3rem;
|
|
142
142
|
--#{$prefix}banner-padding-bottom: 2rem;
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -1,69 +1,71 @@
|
|
|
1
|
-
// Callout
|
|
1
|
+
// Callout
|
|
2
2
|
|
|
3
3
|
// Default
|
|
4
4
|
.callout {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
--#{$prefix}callout-padding: 1.5rem 1rem 1.5rem 1.5rem;
|
|
6
|
+
--#{$prefix}callout-bg-color: var(--#{$prefix}extra-light-grey);
|
|
7
|
+
--#{$prefix}callout-border-color: var(--#{$prefix}light-accent);
|
|
8
|
+
--#{$prefix}callout-border-width: 0.25rem;
|
|
9
|
+
--#{$prefix}callout-title-color: var(--#{$prefix}headings-color);
|
|
10
|
+
--#{$prefix}callout-text-color: var(--#{$prefix}body-color);
|
|
11
|
+
--#{$prefix}callout-spacer: 1rem;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
.light & {
|
|
14
|
+
--#{$prefix}callout-bg-color: var(--#{$prefix}light-background-shade);
|
|
15
|
+
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
.alt & {
|
|
18
|
+
--#{$prefix}callout-bg-color: var(--#{$prefix}grey);
|
|
19
|
+
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
21
|
+
.dark &,
|
|
22
|
+
.dark-alt & {
|
|
23
|
+
--#{$prefix}callout-title-color: var(--#{$prefix}white);
|
|
24
|
+
--#{$prefix}callout-text-color: var(--#{$prefix}white);
|
|
25
|
+
--#{$prefix}callout-border-color: var(--#{$prefix}dark-accent);
|
|
26
|
+
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
.dark & {
|
|
29
|
+
--#{$prefix}callout-bg-color: var(--#{$prefix}dark-background-shade);
|
|
30
|
+
}
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
.dark-alt & {
|
|
33
|
+
--#{$prefix}callout-bg-color: var(--#{$prefix}dark-blue-shade);
|
|
34
|
+
}
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
//Dark theme
|
|
37
38
|
//https://getbootstrap.com/docs/5.3/customize/color-modes/#enable-dark-mode
|
|
38
39
|
|
|
39
40
|
@include color-mode(dark) {
|
|
40
|
-
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
//Define component styles
|
|
44
44
|
.callout {
|
|
45
|
+
background-color: var(--#{$prefix}callout-bg-color);
|
|
46
|
+
border-left: solid var(--#{$prefix}callout-border-width)
|
|
47
|
+
var(--#{$prefix}callout-border-color);
|
|
48
|
+
padding: var(--#{$prefix}callout-padding);
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
&-title {
|
|
51
|
+
color: var(--#{$prefix}callout-title-color);
|
|
52
|
+
margin-bottom: 0;
|
|
53
|
+
}
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
margin-bottom: 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&-text {
|
|
56
|
-
color: var(--#{$prefix}callout-text-color);
|
|
55
|
+
&-text {
|
|
56
|
+
color: var(--#{$prefix}callout-text-color);
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
p,
|
|
59
|
+
ul,
|
|
60
|
+
ol {
|
|
61
|
+
&:last-child {
|
|
62
|
+
margin-bottom: 0;
|
|
63
|
+
}
|
|
63
64
|
}
|
|
65
|
+
}
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
&-title + &-text {
|
|
68
|
+
// Add space above text only if there is a title
|
|
69
|
+
margin-top: var(--#{$prefix}callout-spacer);
|
|
70
|
+
}
|
|
69
71
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- QGDS Component: Details -->
|
|
2
|
+
<details class="qld-details{{#if size}} qld-details-{{size}}{{/if}}"{{#if open}} open{{/if}}>
|
|
3
|
+
<summary class="qld-details-summary">
|
|
4
|
+
<span class="qld-details-summary-text">{{summaryText}}</span>
|
|
5
|
+
|
|
6
|
+
</summary>
|
|
7
|
+
<div class="qld-details-content">
|
|
8
|
+
{{{content}}}
|
|
9
|
+
</div>
|
|
10
|
+
</details>
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
// QGDS Component: Details/Summary
|
|
2
|
+
// #{$prefix} defined in main.css
|
|
3
|
+
|
|
4
|
+
@use "../../../css/mixins" as m;
|
|
5
|
+
@use "../../../css/functions" as f;
|
|
6
|
+
|
|
7
|
+
// CSS Scoped Variables
|
|
8
|
+
.qld-details {
|
|
9
|
+
--#{$prefix}details-summary-color: var(--#{$prefix}light-link);
|
|
10
|
+
--#{$prefix}details-summary-icon-color: var(
|
|
11
|
+
--#{$prefix}light-action-secondary
|
|
12
|
+
);
|
|
13
|
+
--#{$prefix}details-summary-bg: transparent;
|
|
14
|
+
--#{$prefix}details-summary-bg-hover: var(--#{$prefix}neutral-lightest);
|
|
15
|
+
--#{$prefix}details-summary-icon-hover: var(
|
|
16
|
+
--#{$prefix}light-action-secondary-hover
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
--#{$prefix}details-content-color: var(--#{$prefix}light-text);
|
|
20
|
+
--#{$prefix}details-icon: var(--qgds-icon-chevron-right);
|
|
21
|
+
--#{$prefix}details-icon-width: 1.25rem;
|
|
22
|
+
--#{$prefix}details-icon-transition: transform 0.2s ease-in-out;
|
|
23
|
+
--#{$prefix}details-min-height: 2.75rem; // 44px — lg / default
|
|
24
|
+
--#{$prefix}details-font-size: 1rem;
|
|
25
|
+
|
|
26
|
+
.dark &,
|
|
27
|
+
.dark-alt & {
|
|
28
|
+
--#{$prefix}details-summary-color: var(--#{$prefix}dark-link, #fff);
|
|
29
|
+
--#{$prefix}details-summary-icon-color: var(
|
|
30
|
+
--#{$prefix}dark-action-secondary
|
|
31
|
+
);
|
|
32
|
+
--#{$prefix}details-summary-bg: var(--#{$prefix}dark-background);
|
|
33
|
+
|
|
34
|
+
--#{$prefix}details-summary-icon-hover: var(
|
|
35
|
+
--#{$prefix}dark-action-secondary-hover
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
--#{$prefix}details-content-color: var(--#{$prefix}dark-text, #fff);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dark & {
|
|
42
|
+
--#{$prefix}details-summary-bg-hover: var(--#{$prefix}dark-background-shade);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dark-alt & {
|
|
46
|
+
--#{$prefix}details-summary-bg-hover: var(
|
|
47
|
+
--#{$prefix}dark-alt-background-shade
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.alt & {
|
|
52
|
+
--#{$prefix}details-summary-bg-hover: var(--#{$prefix}light-alt-background-shade);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.light & {
|
|
56
|
+
--#{$prefix}details-summary-bg-hover: var(--#{$prefix}light-background-shade);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Component styles
|
|
61
|
+
.qld-details {
|
|
62
|
+
&-summary {
|
|
63
|
+
align-items: center;
|
|
64
|
+
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: 0.25rem;
|
|
67
|
+
//padding: 0.375rem 0.25rem;
|
|
68
|
+
//margin: -0.375rem -0.25rem;
|
|
69
|
+
min-height: var(--#{$prefix}details-min-height);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
list-style: none;
|
|
72
|
+
color: var(--#{$prefix}details-summary-color);
|
|
73
|
+
font-weight: 400;
|
|
74
|
+
font-size: var(--#{$prefix}details-font-size);
|
|
75
|
+
line-height: 1.5rem;
|
|
76
|
+
user-select: none;
|
|
77
|
+
|
|
78
|
+
// Hide native browser disclosure triangle
|
|
79
|
+
&::-webkit-details-marker,
|
|
80
|
+
&::marker {
|
|
81
|
+
display: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:hover {
|
|
85
|
+
.qld-details-summary-text {
|
|
86
|
+
background-color: var(--#{$prefix}details-summary-bg-hover);
|
|
87
|
+
color: var(--#{$prefix}details-summary-color);
|
|
88
|
+
&::before {
|
|
89
|
+
background-color: var(--#{$prefix}details-summary-icon-hover);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:focus {
|
|
95
|
+
outline: none;
|
|
96
|
+
.qld-details-summary-text {
|
|
97
|
+
outline-width: 3px;
|
|
98
|
+
outline-style: solid;
|
|
99
|
+
outline-color: var(--#{$prefix}focus-color);
|
|
100
|
+
outline-offset: 2px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&-summary-text {
|
|
106
|
+
padding: 0.25rem;
|
|
107
|
+
display: inline-flex;
|
|
108
|
+
width: 100%;
|
|
109
|
+
gap: 4px;
|
|
110
|
+
line-height: f.snap-line-height(1.25);
|
|
111
|
+
border-radius: 0.25rem;
|
|
112
|
+
|
|
113
|
+
// Chevron icon — points right, rotates to down when open
|
|
114
|
+
&::before {
|
|
115
|
+
content: "";
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
width: var(--#{$prefix}details-icon-width);
|
|
119
|
+
height: calc(1.25 * var(--#{$prefix}details-font-size));
|
|
120
|
+
mask-image: var(--#{$prefix}details-icon);
|
|
121
|
+
mask-repeat: no-repeat;
|
|
122
|
+
mask-size: contain;
|
|
123
|
+
-webkit-mask-position: center center;
|
|
124
|
+
mask-position: center center;
|
|
125
|
+
background-color: var(--#{$prefix}details-summary-icon-color);
|
|
126
|
+
transition: var(--#{$prefix}details-icon-transition);
|
|
127
|
+
align-items: center;
|
|
128
|
+
align-self: flex-start;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Rotate chevron to point down when open
|
|
133
|
+
&[open] &-summary-text::before {
|
|
134
|
+
transform: rotate(90deg);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&-content {
|
|
138
|
+
padding-left: 1.5rem;
|
|
139
|
+
padding-bottom: 0.75rem;
|
|
140
|
+
font-size: 0.875rem;
|
|
141
|
+
color: var(--#{$prefix}details-content-color);
|
|
142
|
+
|
|
143
|
+
p:last-child {
|
|
144
|
+
margin-bottom: 0;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Size variants
|
|
149
|
+
|
|
150
|
+
&-sm {
|
|
151
|
+
--#{$prefix}details-min-height: 2.75rem; // 44px
|
|
152
|
+
--#{$prefix}details-font-size: 0.875rem; //14px
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&-md {
|
|
156
|
+
--#{$prefix}details-min-height: 2.75rem; // 44px
|
|
157
|
+
--#{$prefix}details-font-size: 1rem; // default
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&-lg {
|
|
161
|
+
--#{$prefix}details-min-height: 2.75rem; // 44px
|
|
162
|
+
--#{$prefix}details-font-size: 1.25rem; //20px
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&-xl {
|
|
166
|
+
--#{$prefix}details-min-height: 2.75rem; // 44px
|
|
167
|
+
--#{$prefix}details-font-size: 1.5rem; //24px
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file details.stories.js
|
|
3
|
+
* @description Storybook configuration file for the Details component.
|
|
4
|
+
* @module details.stories
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Details } from "./Details.js";
|
|
8
|
+
import defaultdata from "./details.data.json";
|
|
9
|
+
import metadata from "./metadata.json";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
title: "3. Components/Details",
|
|
14
|
+
render: (args) => new Details(args).html,
|
|
15
|
+
args: { ...defaultdata, size: "md" },
|
|
16
|
+
globals: {
|
|
17
|
+
backgrounds: { value: "default" },
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
coderefs: {
|
|
21
|
+
metadata,
|
|
22
|
+
partialname: "details", //{{> details }}
|
|
23
|
+
},
|
|
24
|
+
backgrounds: {
|
|
25
|
+
disable: false,
|
|
26
|
+
},
|
|
27
|
+
docs: {},
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
size: {
|
|
31
|
+
control: { type: "select" },
|
|
32
|
+
options: ["sm", "md", "lg", "xl"],
|
|
33
|
+
description: "Size of the details component (sm=44px, md=48px, lg=52px, xl=56px)",
|
|
34
|
+
defaultValue: "md",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Default Details story (collapsed)
|
|
41
|
+
*/
|
|
42
|
+
export const Default = {
|
|
43
|
+
globals: { backgrounds: { value: "default" } },
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Details in open/expanded state
|
|
48
|
+
*/
|
|
49
|
+
export const Open = {
|
|
50
|
+
args: {
|
|
51
|
+
...defaultdata,
|
|
52
|
+
open: true,
|
|
53
|
+
},
|
|
54
|
+
globals: { backgrounds: { value: "default" } },
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Details in 'Light' colour theme.
|
|
59
|
+
*/
|
|
60
|
+
export const Light = {
|
|
61
|
+
args: { ...defaultdata },
|
|
62
|
+
globals: { backgrounds: { value: "light" } },
|
|
63
|
+
decorators: [
|
|
64
|
+
(Story) => `<div class="container-fluid light">${Story()}</div>`,
|
|
65
|
+
],
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Details in 'Alternative' colour theme.
|
|
70
|
+
*/
|
|
71
|
+
export const Alternative = {
|
|
72
|
+
args: { ...defaultdata },
|
|
73
|
+
globals: { backgrounds: { value: "alt" } },
|
|
74
|
+
decorators: [
|
|
75
|
+
(Story) => `<div class="container-fluid alt">${Story()}</div>`,
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Details in 'Dark' colour theme.
|
|
81
|
+
*/
|
|
82
|
+
export const Dark = {
|
|
83
|
+
args: { ...defaultdata },
|
|
84
|
+
globals: { backgrounds: { value: "dark" } },
|
|
85
|
+
decorators: [
|
|
86
|
+
(Story) => `<div class="container-fluid dark">${Story()}</div>`,
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Details in 'Dark alternative' colour theme.
|
|
92
|
+
*/
|
|
93
|
+
export const DarkAlternative = {
|
|
94
|
+
args: { ...defaultdata },
|
|
95
|
+
globals: { backgrounds: { value: "darkAlt" } },
|
|
96
|
+
decorators: [
|
|
97
|
+
(Story) => `<div class="container-fluid dark-alt">${Story()}</div>`,
|
|
98
|
+
],
|
|
99
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "qgds-details",
|
|
3
|
+
"title": "Details",
|
|
4
|
+
"title_uikit": "Details",
|
|
5
|
+
"type": "Component",
|
|
6
|
+
"scope": "Core",
|
|
7
|
+
"group": "",
|
|
8
|
+
"status": "Published",
|
|
9
|
+
"synonyms": [],
|
|
10
|
+
"description": "",
|
|
11
|
+
"refs": {
|
|
12
|
+
"uikit": "",
|
|
13
|
+
"website": ""
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
text-wrap: nowrap;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
.global-alert-close {
|
|
70
70
|
display: inline-flex;
|
|
71
71
|
justify-content: center;
|
|
@@ -107,7 +107,6 @@
|
|
|
107
107
|
&:focus {
|
|
108
108
|
outline-color: var(--focus-colour);
|
|
109
109
|
}
|
|
110
|
-
|
|
111
110
|
|
|
112
111
|
@include media-breakpoint-down(lg) {
|
|
113
112
|
&:hover {
|
|
@@ -200,14 +199,27 @@
|
|
|
200
199
|
@include media-breakpoint-down(lg) {
|
|
201
200
|
.global-alert {
|
|
202
201
|
.global-alert-content .global-alert-action {
|
|
203
|
-
margin-inline-end: 2rem;
|
|
202
|
+
margin-inline-end: 2rem;
|
|
204
203
|
}
|
|
205
204
|
}
|
|
206
205
|
}
|
|
206
|
+
|
|
207
207
|
@include media-breakpoint-down(md) {
|
|
208
208
|
.global-alert {
|
|
209
209
|
.global-alert-content {
|
|
210
210
|
padding: 0;
|
|
211
|
+
|
|
212
|
+
.global-alert-action {
|
|
213
|
+
margin-inline-end: 0.5rem;
|
|
214
|
+
|
|
215
|
+
a {
|
|
216
|
+
text-wrap: auto;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.qld-icon {
|
|
220
|
+
min-width: var(--icon-size);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
211
223
|
}
|
|
212
224
|
}
|
|
213
225
|
}
|
|
@@ -229,6 +241,5 @@
|
|
|
229
241
|
}
|
|
230
242
|
}
|
|
231
243
|
}
|
|
232
|
-
|
|
233
244
|
}
|
|
234
245
|
}
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
<div class="d-flex justify-content-between">
|
|
7
7
|
|
|
8
8
|
<a class="qld-header-link align-self-center"
|
|
9
|
-
href="{{#if preHeader.globalLink.url}}{{preHeader.globalLink.url}}{{else}}https://qld.gov.au{{/if}}"
|
|
9
|
+
href="{{#if preHeader.globalLink.url}}{{preHeader.globalLink.url}}{{else}}https://qld.gov.au{{/if}}"
|
|
10
|
+
aria-label="{{#if preHeader.globalLink.text}}{{preHeader.globalLink.text}}{{else}}Queensland Government{{/if}}">
|
|
10
11
|
<span class="d-none d-lg-inline">{{preHeader.globalLink.text}}</span>
|
|
11
12
|
{{#if hasDeliveringForQLDLogo}}
|
|
12
13
|
{{>logo logo="coa-delivering-for-qld" className="qld-header-logo is-delivering-for-qld" fill="currentColor"}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
<div class="qld-header-brand">
|
|
3
|
-
<a class="qld-header-link d-lg-inline-flex align-middle" href="{{url}}">
|
|
3
|
+
<a class="qld-header-link d-lg-inline-flex align-middle" href="{{url}}"{{#unless logo}}{{#unless siteTitle}} aria-label="Queensland Government"{{/unless}}{{/unless}}>
|
|
4
4
|
<div class="qld-header-brand-image align-self-center">
|
|
5
5
|
{{#if logo}}
|
|
6
6
|
<img src="{{logo.src}}" height="56" alt="{{#if logo.altText}}{{logo.altText}}{{else}}Queensland government{{/if}}" />
|