@qld-gov-au/qgds-bootstrap5 2.1.2 → 2.1.4
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/main.mjs +1 -0
- package/.storybook/manager.js +31 -0
- package/dist/assets/components/bs5/globalAlert/globalAlert.hbs +2 -2
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/navbar/navbar.hbs +1 -1
- package/dist/assets/css/qld.bootstrap.css +2 -2
- package/dist/assets/css/qld.bootstrap.css.map +2 -2
- package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
- package/dist/assets/css/qld.bootstrap.legacy.css.map +2 -2
- package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
- package/dist/assets/js/handlebars.init.min.js +5 -5
- package/dist/assets/js/handlebars.init.min.js.map +1 -1
- package/dist/assets/js/handlebars.partials.js +5 -5
- package/dist/assets/js/handlebars.partials.js.map +1 -1
- package/dist/assets/js/qld.bootstrap.min.js +6 -6
- package/dist/assets/js/qld.bootstrap.min.js.map +3 -3
- package/dist/assets/node/handlebars.init.min.js +4 -4
- package/dist/assets/node/handlebars.init.min.js.map +1 -1
- package/dist/components/bs5/globalAlert/globalAlert.hbs +2 -2
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/navbar/navbar.hbs +1 -1
- package/dist/package.json +2 -1
- package/dist/sample-data/globalAlert/globalAlert.data.json +9 -9
- package/package.json +2 -1
- package/src/components/bs5/accordion/mdx/_designResources.mdx +0 -1
- package/src/components/bs5/backToTop/backToTop.mdx +0 -1
- package/src/components/bs5/banner/Banner.mdx +0 -1
- package/src/components/bs5/blockquote/Blockquote.mdx +0 -1
- package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +0 -1
- package/src/components/bs5/button/Button.mdx +0 -1
- package/src/components/bs5/callToAction/callToAction.mdx +0 -1
- package/src/components/bs5/callout/Callout.mdx +0 -1
- package/src/components/bs5/card/Card.mdx +0 -1
- package/src/components/bs5/directionLinks/DirectionLinks.mdx +0 -1
- package/src/components/bs5/footer/Footer.mdx +0 -1
- package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +1 -3
- package/src/components/bs5/formcheck/stories/radio/Radio.mdx +0 -1
- package/src/components/bs5/globalAlert/GlobalAlert.mdx +0 -1
- package/src/components/bs5/globalAlert/globalAlert.data.json +9 -9
- package/src/components/bs5/globalAlert/globalAlert.hbs +2 -2
- package/src/components/bs5/globalAlert/globalAlert.scss +24 -9
- package/src/components/bs5/globalAlert/globalAlert.stories.js +1 -1
- package/src/components/bs5/globalAlert/globalAlert.test.js +0 -14
- package/src/components/bs5/header/header.scss +1 -1
- package/src/components/bs5/image/Image.mdx +0 -1
- package/src/components/bs5/inpageAlert/InpageAlert.mdx +0 -1
- package/src/components/bs5/inpageAlert/inpageAlert.stories.js +1 -1
- package/src/components/bs5/inpagenav/Inpagenav.mdx +0 -1
- package/src/components/bs5/link/link.mdx +1 -3
- package/src/components/bs5/linkColumns/linkColumns.mdx +0 -1
- package/src/components/bs5/linkColumns/linkColumns.stories.js +11 -10
- package/src/components/bs5/navbar/navbar.functions.js +52 -67
- package/src/components/bs5/navbar/navbar.hbs +1 -1
- package/src/components/bs5/navbar/navbar.scss +119 -46
- package/src/components/bs5/pagination/Pagination.mdx +0 -1
- package/src/components/bs5/pagination/pagination.scss +14 -18
- package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +0 -1
- package/src/components/bs5/promotionalPanel/promotionalPanel.stories.js +17 -15
- package/src/components/bs5/quickexit/quickexit.stories.js +1 -1
- package/src/components/bs5/searchInput/SearchInput.mdx +1 -1
- package/src/components/bs5/searchInput/search.functions.js +48 -2
- package/src/components/bs5/searchInput/searchInput.stories.js +1 -1
- package/src/components/bs5/spinner/Spinner.stories.js +14 -19
- package/src/components/bs5/table/Table.mdx +0 -1
- package/src/components/bs5/table/table.stories.js +1 -1
- package/src/components/bs5/tabs/Tabs.mdx +0 -1
- package/src/components/bs5/tag/Tag.mdx +0 -1
- package/src/components/bs5/video/Video.mdx +0 -1
- package/src/components/bs5/video/video.scss +1 -1
- package/src/components/bs5/video/video.stories.js +1 -1
- package/src/css/mixins/focusable.scss +1 -1
- package/src/stories/Introduction.mdx +15 -6
|
@@ -11,33 +11,34 @@ import defaultdata from "./promotionalPanel.data.json";
|
|
|
11
11
|
export default {
|
|
12
12
|
tags: ["autodocs"],
|
|
13
13
|
title: "3. Components/Promotional Panel",
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
render: (args) => new PromotionalPanel(args).html,
|
|
16
16
|
args: defaultdata,
|
|
17
17
|
argTypes: {
|
|
18
18
|
type: {
|
|
19
|
-
description:
|
|
19
|
+
description: "The types of layouts that this component supports",
|
|
20
20
|
control: "select",
|
|
21
21
|
options: ["promo", "contained", "indent-text", "indent-img"],
|
|
22
22
|
},
|
|
23
23
|
variantClass: {
|
|
24
|
-
description:
|
|
24
|
+
description: "The types of themes that this component supports",
|
|
25
25
|
control: "select",
|
|
26
26
|
options: ["light", "alt", "dark", "dark-alt"],
|
|
27
|
-
},
|
|
27
|
+
},
|
|
28
28
|
promoImage: {
|
|
29
29
|
control: "text",
|
|
30
30
|
description: "The image to be displayed in the promotional panel.",
|
|
31
|
-
defaultValue:"./assets/img/banner-example-3-to-2.jpg",
|
|
31
|
+
defaultValue: "./assets/img/banner-example-3-to-2.jpg",
|
|
32
32
|
},
|
|
33
33
|
contentAlignment: {
|
|
34
|
-
description:
|
|
34
|
+
description: "Position of the content in the panel within this component",
|
|
35
35
|
control: "select",
|
|
36
|
-
options: ["content-left","content-right"],
|
|
36
|
+
options: ["content-left", "content-right"],
|
|
37
37
|
},
|
|
38
38
|
icon: {
|
|
39
39
|
control: "select",
|
|
40
|
-
description:
|
|
40
|
+
description:
|
|
41
|
+
"Current list of usable icons available in the icon component.",
|
|
41
42
|
options: ["icon-dot-grid", "icon-phone", "icon-email", "icon-search"],
|
|
42
43
|
},
|
|
43
44
|
title: {
|
|
@@ -48,20 +49,22 @@ export default {
|
|
|
48
49
|
abstract: {
|
|
49
50
|
control: "text",
|
|
50
51
|
description: "The abstract of the promotional panel.",
|
|
51
|
-
defaultValue:
|
|
52
|
+
defaultValue:
|
|
53
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis.",
|
|
52
54
|
},
|
|
53
55
|
body: {
|
|
54
56
|
control: "text",
|
|
55
57
|
description: "The body of the promotional panel.",
|
|
56
|
-
defaultValue:
|
|
58
|
+
defaultValue:
|
|
59
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis. Vel suspendisse mi quisque consequat aliquet egestas.",
|
|
57
60
|
},
|
|
58
61
|
cta: {
|
|
59
|
-
description:
|
|
60
|
-
control:
|
|
62
|
+
description: "The call to action objects for the promotional panel.",
|
|
63
|
+
control: "object",
|
|
61
64
|
},
|
|
62
65
|
btn: {
|
|
63
|
-
description:
|
|
64
|
-
control:
|
|
66
|
+
description: "The button objects for the promotional panel.",
|
|
67
|
+
control: "object",
|
|
65
68
|
},
|
|
66
69
|
},
|
|
67
70
|
|
|
@@ -120,4 +123,3 @@ export const DarkAlternative = {
|
|
|
120
123
|
variantClass: "dark-alt",
|
|
121
124
|
},
|
|
122
125
|
};
|
|
123
|
-
|
|
@@ -3,7 +3,7 @@ import { Quickexit } from "./Quickexit.js";
|
|
|
3
3
|
import defaultdata from "./quickexit.data.json";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
tags: ["autodocs"],
|
|
6
|
+
tags: ["autodocs", "extended"],
|
|
7
7
|
title: "3. Components/Quickexit",
|
|
8
8
|
render: (args) => {
|
|
9
9
|
//Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
|
|
@@ -9,4 +9,4 @@ import * as SearchInputStories from "./searchInput.stories";
|
|
|
9
9
|
|
|
10
10
|
## Design resources
|
|
11
11
|
|
|
12
|
-
- [Component
|
|
12
|
+
- [Component file (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?node-id=11017-307599&t=NGmPmPhkUQMN7qQw-0)
|
|
@@ -145,7 +145,30 @@ export async function showSuggestions(value = "", isDefault = false, form) {
|
|
|
145
145
|
let linkItem = event.target.closest("a");
|
|
146
146
|
if (linkItem) {
|
|
147
147
|
event.preventDefault();
|
|
148
|
-
|
|
148
|
+
|
|
149
|
+
// Check if the link has a valid absolute URL
|
|
150
|
+
const href = linkItem.getAttribute("href");
|
|
151
|
+
const isValidUrl =
|
|
152
|
+
href &&
|
|
153
|
+
href !== "#" &&
|
|
154
|
+
(() => {
|
|
155
|
+
try {
|
|
156
|
+
const url = new URL(href, window.location.origin);
|
|
157
|
+
return (
|
|
158
|
+
url.protocol === "http:" || url.protocol === "https:"
|
|
159
|
+
);
|
|
160
|
+
} catch {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
})();
|
|
164
|
+
|
|
165
|
+
if (isValidUrl) {
|
|
166
|
+
// Navigate directly to the URL
|
|
167
|
+
window.location.href = href;
|
|
168
|
+
} else {
|
|
169
|
+
// Use the search suggestion flow
|
|
170
|
+
selectDynamicSuggestion(linkItem.textContent, form);
|
|
171
|
+
}
|
|
149
172
|
}
|
|
150
173
|
});
|
|
151
174
|
} else {
|
|
@@ -200,7 +223,30 @@ export async function showSuggestions(value = "", isDefault = false, form) {
|
|
|
200
223
|
let linkItem = event.target.closest("a");
|
|
201
224
|
if (linkItem) {
|
|
202
225
|
event.preventDefault();
|
|
203
|
-
|
|
226
|
+
|
|
227
|
+
// Check if the link has a valid absolute URL
|
|
228
|
+
const href = linkItem.getAttribute("href");
|
|
229
|
+
const isValidUrl =
|
|
230
|
+
href &&
|
|
231
|
+
href !== "#" &&
|
|
232
|
+
(() => {
|
|
233
|
+
try {
|
|
234
|
+
const url = new URL(href, window.location.origin);
|
|
235
|
+
return (
|
|
236
|
+
url.protocol === "http:" || url.protocol === "https:"
|
|
237
|
+
);
|
|
238
|
+
} catch {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
})();
|
|
242
|
+
|
|
243
|
+
if (isValidUrl) {
|
|
244
|
+
// Navigate directly to the URL
|
|
245
|
+
window.location.href = href;
|
|
246
|
+
} else {
|
|
247
|
+
// Use the search suggestion flow
|
|
248
|
+
selectDynamicSuggestion(linkItem.textContent, form);
|
|
249
|
+
}
|
|
204
250
|
}
|
|
205
251
|
});
|
|
206
252
|
}
|
|
@@ -6,7 +6,7 @@ import defaultdata from "./searchInput.data.json";
|
|
|
6
6
|
const initData = defaultdata.defaultSuggestions || null;
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
|
-
tags: ["autodocs"],
|
|
9
|
+
tags: ["autodocs", "extended"],
|
|
10
10
|
title: "3. Components/Search Input",
|
|
11
11
|
render: (args) => {
|
|
12
12
|
return `<form action="https://uat.forgov.qld.gov.au/search" class="site-search p-3">${new SearchInput(args).html}</form>`;
|
|
@@ -6,18 +6,16 @@ export default {
|
|
|
6
6
|
tags: ["autodocs"],
|
|
7
7
|
title: "3. Components/Spinner",
|
|
8
8
|
render: (args) => {
|
|
9
|
-
|
|
10
|
-
//Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
|
|
9
|
+
//Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
|
|
11
10
|
//We can't use commas on our class="..." attribute, so we need to replace the commas with spaces.
|
|
12
11
|
|
|
13
|
-
if(
|
|
14
|
-
args.customClass = args.customClass.replaceAll(","," ");
|
|
15
|
-
} else if (
|
|
12
|
+
if (typeof args.customClass === "string") {
|
|
13
|
+
args.customClass = args.customClass.replaceAll(",", " ");
|
|
14
|
+
} else if (typeof args.customClass === "object") {
|
|
16
15
|
args.customClass = args.customClass.join(" ");
|
|
17
16
|
}
|
|
18
|
-
|
|
17
|
+
|
|
19
18
|
return new Spinner(args).html;
|
|
20
|
-
|
|
21
19
|
},
|
|
22
20
|
};
|
|
23
21
|
|
|
@@ -32,15 +30,13 @@ export const Default = {
|
|
|
32
30
|
* Dark themed Loading Spinner
|
|
33
31
|
*/
|
|
34
32
|
export const Dark = {
|
|
35
|
-
args: {
|
|
36
|
-
|
|
33
|
+
args: {
|
|
34
|
+
...defaultdata,
|
|
37
35
|
},
|
|
38
36
|
parameters: {
|
|
39
37
|
backgrounds: {
|
|
40
|
-
default:
|
|
41
|
-
values: [
|
|
42
|
-
{ name: 'Dark', value: 'var(--qld-brand-primary)' },
|
|
43
|
-
],
|
|
38
|
+
default: "Dark",
|
|
39
|
+
values: [{ name: "Dark", value: "var(--qld-brand-primary)" }],
|
|
44
40
|
},
|
|
45
41
|
},
|
|
46
42
|
decorators: [
|
|
@@ -59,8 +55,8 @@ export const Dark = {
|
|
|
59
55
|
*/
|
|
60
56
|
export const Minimal = {
|
|
61
57
|
args: {
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
...defaultdata,
|
|
59
|
+
...{ minimal: true },
|
|
64
60
|
},
|
|
65
61
|
};
|
|
66
62
|
|
|
@@ -68,9 +64,8 @@ export const Minimal = {
|
|
|
68
64
|
* Stacked Loading Spinner
|
|
69
65
|
*/
|
|
70
66
|
export const Stacked = {
|
|
71
|
-
args: {
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
args: {
|
|
68
|
+
...defaultdata,
|
|
69
|
+
...{ stacked: true },
|
|
74
70
|
},
|
|
75
71
|
};
|
|
76
|
-
|
|
@@ -9,7 +9,6 @@ import * as TableStories from "./table.stories";
|
|
|
9
9
|
|
|
10
10
|
## Design resources
|
|
11
11
|
|
|
12
|
-
- [Component library (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=23167-395552&mode=design&t=NREcuP5UOBB2Y6G4-4)
|
|
13
12
|
- [Master component file (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=5990-97592&mode=design&t=YLfxdziHdqD2Ty0o-0)
|
|
14
13
|
- [Design System website](https://www.designsystem.qld.gov.au/components/tables)
|
|
15
14
|
- [Bootstrap component](https://getbootstrap.com/docs/5.3/content/tables/)
|
|
@@ -9,7 +9,6 @@ import * as TabsStories from "./tabs.stories";
|
|
|
9
9
|
|
|
10
10
|
## Design resources
|
|
11
11
|
|
|
12
|
-
- [Component library (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=6247-38705&p=f&t=AHTplcCqsKKRWGvc-0)
|
|
13
12
|
- [Master component file (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=25951-236134&p=f&t=GBRfQxrdnGxAh30j-0)
|
|
14
13
|
- [Design System website](https://www.designsystem.qld.gov.au/components/tabs)
|
|
15
14
|
- [Bootstrap component](https://getbootstrap.com/docs/5.3/components/navs-tabs/)
|
|
@@ -9,6 +9,5 @@ import * as TagStories from "./tag.stories";
|
|
|
9
9
|
|
|
10
10
|
## Design resources
|
|
11
11
|
|
|
12
|
-
- [Component library (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=23167-395550&mode=design&t=NREcuP5UOBB2Y6G4-4)
|
|
13
12
|
- [Master component file (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=5990-97596&mode=design&t=YLfxdziHdqD2Ty0o-0)
|
|
14
13
|
- [Design System website](https://www.designsystem.qld.gov.au/components/tags)
|
|
@@ -9,5 +9,4 @@ import * as VideoStories from "./video.stories";
|
|
|
9
9
|
|
|
10
10
|
## Design resources
|
|
11
11
|
|
|
12
|
-
- [Component library (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=23203-295341&mode=design&t=eRH1gEfJNDna1ovz-4)
|
|
13
12
|
- [Master component file (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=13297-214065&mode=design&t=YLfxdziHdqD2Ty0o-0)
|
|
@@ -10,7 +10,7 @@ import { Accordion } from "../accordion/Accordion.js";
|
|
|
10
10
|
* which is based on YouTube arguments.
|
|
11
11
|
*/
|
|
12
12
|
export default {
|
|
13
|
-
tags: ["autodocs"],
|
|
13
|
+
tags: ["autodocs", "extended"],
|
|
14
14
|
title: "3. Components/Video",
|
|
15
15
|
args: defaultdata.youtube,
|
|
16
16
|
render: (args) => {
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { Meta, Markdown } from "@storybook/addon-docs/blocks";
|
|
2
2
|
|
|
3
|
-
import Readme from "../../README.md?raw"
|
|
3
|
+
import Readme from "../../README.md?raw";
|
|
4
4
|
|
|
5
5
|
<Meta title="Welcome" />
|
|
6
6
|
|
|
7
|
-
[//]: #
|
|
7
|
+
[//]: # "# Welcome to QGDS QOL BS MVP Storybook"
|
|
8
|
+
[//]: #
|
|
9
|
+
[//]: # "Welcome to Queensland Government Design System Qld Online Mvp Storybook, this documentation is mainly for development and testing purposes."
|
|
10
|
+
[//]: # "For user orientated documentation, please visit https://www.forgov.qld.gov.au/swe."
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
[//]: # (Welcome to Queensland Government Design System Qld Online Mvp Storybook, this documentation is mainly for development and testing purposes.)
|
|
12
|
+
<Markdown>{Readme}</Markdown>
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
---
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
## Component Badges
|
|
17
|
+
|
|
18
|
+
Components are labelled as:
|
|
19
|
+
|
|
20
|
+
- **Core** — Essential, broadly applicable components that serve as the single source of truth for the Queensland Government design system.
|
|
21
|
+
- **Extended** — Specialised components for needs not covered by the core set.
|
|
22
|
+
|
|
23
|
+
Further information is available in the [QGDS UI Kit](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=8701-244248&m=dev).
|