@qld-gov-au/qgds-bootstrap5 1.1.41 → 2.0.1
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/.eslintrc.cjs +27 -27
- package/.vscode/settings.json +5 -5
- package/dist/assets/components/bs5/banner/banner.hbs +0 -7
- package/dist/assets/components/bs5/card/card.hbs +3 -17
- package/dist/assets/components/bs5/footer/customLinks.hbs +7 -0
- package/dist/assets/components/bs5/footer/feedbackForm.hbs +25 -0
- package/dist/assets/components/bs5/footer/followLinks.hbs +14 -0
- package/dist/assets/components/bs5/footer/footer.hbs +229 -346
- package/dist/assets/components/bs5/head/head.hbs +4 -4
- package/dist/assets/components/bs5/header/header.hbs +124 -878
- package/dist/assets/components/bs5/header/headerBrand.hbs +35 -0
- package/dist/{components/bs5/iconLink/iconLink.hbs → assets/components/bs5/link/link.hbs} +3 -3
- package/dist/assets/components/bs5/logo/logoCOALandscape.hbs +110 -55
- package/dist/assets/components/bs5/logo/logoCOALandscape2Lines.hbs +2 -1
- package/dist/assets/components/bs5/navbar/navbar.hbs +3 -3
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithForm.hbs +53 -22
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +79 -59
- package/dist/assets/components/bs5/pageLayout/templates/homePage.hbs +111 -0
- package/dist/assets/components/bs5/searchInput/searchInput.hbs +1 -1
- package/dist/assets/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/js/handlebars.helpers.bundle.js.map +2 -2
- package/dist/assets/js/handlebars.helpers.js +34 -34
- package/dist/assets/js/handlebars.init.min.js +830 -1798
- package/dist/assets/js/handlebars.init.min.js.map +4 -4
- package/dist/assets/js/handlebars.partials.js +12 -8
- package/dist/assets/js/qld.bootstrap.min.js +5 -5
- package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
- package/dist/assets/node/handlebars.init.min.js +399 -121
- package/dist/assets/node/handlebars.init.min.js.map +3 -3
- package/dist/components/bs5/banner/banner.hbs +0 -7
- package/dist/components/bs5/card/card.hbs +3 -17
- package/dist/components/bs5/footer/customLinks.hbs +7 -0
- package/dist/components/bs5/footer/feedbackForm.hbs +25 -0
- package/dist/components/bs5/footer/followLinks.hbs +14 -0
- package/dist/components/bs5/footer/footer.hbs +229 -346
- package/dist/components/bs5/head/head.hbs +4 -4
- package/dist/components/bs5/header/header.hbs +124 -878
- package/dist/components/bs5/header/headerBrand.hbs +35 -0
- package/dist/{assets/components/bs5/iconLink/iconLink.hbs → components/bs5/link/link.hbs} +3 -3
- package/dist/components/bs5/logo/logoCOALandscape.hbs +110 -55
- package/dist/components/bs5/logo/logoCOALandscape2Lines.hbs +2 -1
- package/dist/components/bs5/navbar/navbar.hbs +3 -3
- package/dist/components/bs5/pageLayout/templates/contentPageWithForm.hbs +53 -22
- package/dist/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +79 -59
- package/dist/components/bs5/pageLayout/templates/homePage.hbs +111 -0
- package/dist/components/bs5/searchInput/searchInput.hbs +1 -1
- package/dist/components/handlebars.helpers.js +34 -34
- package/dist/components/handlebars.partials.js +12 -8
- package/dist/package.json +1 -1
- package/dist/sample-data/footer/footer.data.json +128 -84
- package/dist/sample-data/header/header.variant.coBrand.data.json +28 -40
- package/dist/sample-data/header/header.variant.endorsed.data.json +116 -150
- package/dist/sample-data/header/header.variant.masterBrand.data.json +116 -152
- package/dist/sample-data/header/header.variant.standAlone.data.json +118 -150
- package/dist/sample-data/header/header.variant.subBrand.data.json +32 -159
- package/dist/sample-data/inpageAlert/inpageAlert.data.json +6 -6
- package/dist/sample-data/logo/logo.data.json +1 -0
- package/dist/sample-data/navbar/navbar.data.json +5 -5
- package/package.json +1 -1
- package/src/components/bs5/accordion/Accordion.mdx +8 -2
- package/src/components/bs5/banner/Banner.mdx +6 -1
- package/src/components/bs5/banner/banner.hbs +0 -7
- package/src/components/bs5/banner/banner.scss +16 -9
- package/src/components/bs5/banner/banner.stories.js +17 -17
- package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +8 -2
- package/src/components/bs5/button/button.stories.js +8 -8
- package/src/components/bs5/callToAction/callToAction.mdx +8 -3
- package/src/components/bs5/card/Card.mdx +8 -2
- package/src/components/bs5/card/card.hbs +3 -17
- package/src/components/bs5/card/card.scss +103 -103
- package/src/components/bs5/containerLayout/containerLayout.stories.js +1 -1
- package/src/components/bs5/footer/Footer.js +3 -3
- package/src/components/bs5/footer/Footer.mdx +8 -2
- package/src/components/bs5/footer/customLinks.hbs +7 -0
- package/src/components/bs5/footer/feedbackForm.hbs +25 -0
- package/src/components/bs5/footer/followLinks.hbs +14 -0
- package/src/components/bs5/footer/footer.data.json +128 -84
- package/src/components/bs5/footer/footer.functions.js +2 -1
- package/src/components/bs5/footer/footer.hbs +229 -346
- package/src/components/bs5/footer/footer.scss +262 -272
- package/src/components/bs5/footer/footer.stories.js +4 -92
- package/src/components/bs5/footer/footer_formio.scss +219 -0
- package/src/components/bs5/globalAlert/GlobalAlert.mdx +8 -2
- package/src/components/bs5/globalAlert/globalAlert.test.js +3 -11
- package/src/components/bs5/header/_header-variables.scss +272 -0
- package/src/components/bs5/header/header.functions.js +9 -9
- package/src/components/bs5/header/header.hbs +124 -878
- package/src/components/bs5/header/header.scss +279 -411
- package/src/components/bs5/header/header.stories.js +8 -28
- package/src/components/bs5/header/header.variant.coBrand.data.json +28 -40
- package/src/components/bs5/header/header.variant.endorsed.data.json +116 -150
- package/src/components/bs5/header/header.variant.masterBrand.data.json +116 -152
- package/src/components/bs5/header/header.variant.standAlone.data.json +118 -150
- package/src/components/bs5/header/header.variant.subBrand.data.json +32 -159
- package/src/components/bs5/header/headerBrand.hbs +35 -0
- package/src/components/bs5/inpageAlert/InpageAlert.mdx +8 -2
- package/src/components/bs5/inpageAlert/inpageAlert.data.json +6 -6
- package/src/components/bs5/{iconLink/iconLink.hbs → link/link.hbs} +3 -3
- package/src/components/bs5/{iconLink/iconLink.js → link/link.js} +2 -2
- package/src/components/bs5/{iconLink/iconLink.mdx → link/link.mdx} +3 -3
- package/src/components/bs5/{iconLink/iconLink.scss → link/link.scss} +27 -3
- package/src/components/bs5/{iconLink/iconLink.stories.js → link/link.stories.js} +4 -5
- package/src/components/bs5/linkColumns/linkColumns.mdx +8 -3
- package/src/components/bs5/logo/logo.data.json +1 -0
- package/src/components/bs5/logo/logoCOALandscape.hbs +110 -55
- package/src/components/bs5/logo/logoCOALandscape2Lines.hbs +2 -1
- package/src/components/bs5/navbar/navbar.data.json +5 -5
- package/src/components/bs5/navbar/navbar.hbs +3 -3
- package/src/components/bs5/navbar/navbar.scss +669 -614
- package/src/components/bs5/navbar/navbar.stories.js +1 -0
- package/src/components/bs5/pageLayout/{FullWidthLandingPage.js → HomePage.js} +2 -2
- package/src/components/bs5/pageLayout/pageLayout.stories.js +242 -98
- package/src/components/bs5/pageLayout/templates/contentPageWithForm.hbs +53 -22
- package/src/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +79 -59
- package/src/components/bs5/pageLayout/templates/homePage.hbs +111 -0
- package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +8 -3
- package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +1 -1
- package/src/components/bs5/searchInput/searchInput.hbs +1 -1
- package/src/components/bs5/searchInput/searchInput.scss +2 -1
- package/src/components/bs5/searchInput/searchInput.test.js +1 -2
- package/src/css/main.scss +4 -1
- package/src/css/mixins/_index.scss +2 -1
- package/src/css/mixins/register-vars.scss +23 -0
- package/src/css/qld-variables.scss +4 -2
- package/src/css/utilities/_index.scss +1 -0
- package/src/css/utilities/responsive-visually-hidden.scss +10 -0
- package/src/js/handlebars.helpers.js +34 -34
- package/src/js/handlebars.partials.js +12 -8
- package/src/js/qld.bootstrap.js +10 -11
- package/dist/assets/components/bs5/footer/footerForgov.hbs +0 -279
- package/dist/assets/components/bs5/pageLayout/pageLayout.hbs +0 -34
- package/dist/assets/components/bs5/pageLayout/templates/fullWidthLandingPage.hbs +0 -61
- package/dist/components/bs5/footer/footerForgov.hbs +0 -279
- package/dist/components/bs5/pageLayout/pageLayout.hbs +0 -34
- package/dist/components/bs5/pageLayout/templates/fullWidthLandingPage.hbs +0 -61
- package/src/components/bs5/footer/_colours.scss +0 -149
- package/src/components/bs5/footer/_measurements.scss +0 -32
- package/src/components/bs5/footer/footerForgov.hbs +0 -279
- package/src/components/bs5/header/_colours.scss +0 -271
- package/src/components/bs5/header/_icons.scss +0 -10
- package/src/components/bs5/pageLayout/pageLayout.hbs +0 -34
- package/src/components/bs5/pageLayout/pageLayout.js +0 -21
- package/src/components/bs5/pageLayout/templates/fullWidthLandingPage.hbs +0 -61
- /package/dist/sample-data/{iconLink/iconLink.data.json → link/link.data.json} +0 -0
- /package/src/components/bs5/{iconLink/iconLink.data.json → link/link.data.json} +0 -0
|
@@ -1,173 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"chevron_down": "qld__icon__chevron-down"
|
|
8
|
-
},
|
|
9
|
-
"sitePreHeader": {
|
|
10
|
-
"url": {
|
|
11
|
-
"value": "https://qld.gov.au"
|
|
12
|
-
},
|
|
13
|
-
"text": {
|
|
14
|
-
"value": "www.qld.gov.au"
|
|
2
|
+
"isSubBrand": true,
|
|
3
|
+
"preHeader": {
|
|
4
|
+
"globalLink": {
|
|
5
|
+
"text": "www.qld.gov.au",
|
|
6
|
+
"url": "https://qld.gov.au"
|
|
15
7
|
},
|
|
16
|
-
"
|
|
8
|
+
"actions": [
|
|
17
9
|
{
|
|
18
10
|
"id": "CTAone",
|
|
19
|
-
"url":
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"text": {
|
|
23
|
-
"value": "For Queenslanders"
|
|
24
|
-
},
|
|
25
|
-
"dropdown_enabled": true,
|
|
26
|
-
"dropdown_options": {
|
|
27
|
-
"dropdown_type": "list",
|
|
28
|
-
"view_more": true,
|
|
29
|
-
"label": "View all",
|
|
30
|
-
"url": "https://www.qld.gov.au/queenslanders",
|
|
31
|
-
"target": "_blank",
|
|
32
|
-
"dropdown_config": {
|
|
33
|
-
"groups": [
|
|
34
|
-
{
|
|
35
|
-
"action": "_blank",
|
|
36
|
-
"url": "#",
|
|
37
|
-
"label": "Transport and motoring"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"action": "_blank",
|
|
41
|
-
"url": "#",
|
|
42
|
-
"label": "Employment and jobs"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"action": "_blank",
|
|
46
|
-
"url": "#",
|
|
47
|
-
"label": "Education and training"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"action": "_blank",
|
|
51
|
-
"url": "#",
|
|
52
|
-
"label": "Queensland and its government"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"action": "_blank",
|
|
56
|
-
"url": "#",
|
|
57
|
-
"label": "Health and wellbeing"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"action": "_blank",
|
|
61
|
-
"url": "#",
|
|
62
|
-
"label": "Community support"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"id": "CTAtwo",
|
|
70
|
-
"url": {
|
|
71
|
-
"value": "#"
|
|
72
|
-
},
|
|
73
|
-
"text": {
|
|
74
|
-
"value": "Business and Industry"
|
|
75
|
-
},
|
|
76
|
-
"dropdown_enabled": true,
|
|
77
|
-
"dropdown_options": {
|
|
78
|
-
"dropdown_type": "list",
|
|
79
|
-
"view_more": true,
|
|
80
|
-
"label": "View all",
|
|
81
|
-
"url": "https://www.qld.gov.au/queenslanders",
|
|
82
|
-
"target": "_blank",
|
|
83
|
-
"dropdown_config": {
|
|
84
|
-
"groups": [
|
|
85
|
-
{
|
|
86
|
-
"action": "_blank",
|
|
87
|
-
"url": "#",
|
|
88
|
-
"label": "Transport and motoring"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"action": "_blank",
|
|
92
|
-
"url": "#",
|
|
93
|
-
"label": "Employment and jobs"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"action": "_blank",
|
|
97
|
-
"url": "#",
|
|
98
|
-
"label": "Education and training"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"action": "_blank",
|
|
102
|
-
"url": "#",
|
|
103
|
-
"label": "Queensland and its government"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"action": "_blank",
|
|
107
|
-
"url": "#",
|
|
108
|
-
"label": "Health and wellbeing"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"action": "_blank",
|
|
112
|
-
"url": "#",
|
|
113
|
-
"label": "Community support"
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
}
|
|
11
|
+
"url": "#",
|
|
12
|
+
"text": "Contact Information",
|
|
13
|
+
"icon": "phone"
|
|
118
14
|
},
|
|
15
|
+
|
|
119
16
|
{
|
|
120
17
|
"id": "CTAthree",
|
|
121
|
-
"url":
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"text": {
|
|
125
|
-
"value": "Login"
|
|
126
|
-
},
|
|
127
|
-
"dropdown_enabled": true,
|
|
128
|
-
"dropdown_options": {
|
|
129
|
-
"dropdown_type": "form",
|
|
130
|
-
"dropdown_config": {
|
|
131
|
-
"content": "<div></div>"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
18
|
+
"url": "#",
|
|
19
|
+
"text": "Login",
|
|
20
|
+
"icon": "login"
|
|
134
21
|
}
|
|
135
22
|
]
|
|
136
23
|
},
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"standalone_enabled": false
|
|
144
|
-
},
|
|
145
|
-
"url": {
|
|
146
|
-
"value": "https://qld.gov.au"
|
|
147
|
-
},
|
|
148
|
-
"logo": {},
|
|
149
|
-
"secondaryType": {
|
|
150
|
-
"logo": {
|
|
151
|
-
"value": ""
|
|
152
|
-
},
|
|
153
|
-
"siteTitle": {
|
|
154
|
-
"value": "For government"
|
|
155
|
-
},
|
|
156
|
-
"subline": {
|
|
157
|
-
"value": ""
|
|
158
|
-
}
|
|
159
|
-
}
|
|
24
|
+
"mainContent": {
|
|
25
|
+
"url": "https://qld.gov.au",
|
|
26
|
+
"logoPath": "",
|
|
27
|
+
"secondaryLogoPath": "",
|
|
28
|
+
"siteTitle": "For government",
|
|
29
|
+
"subline": "Hospital and Health Service"
|
|
160
30
|
},
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
31
|
+
"assets": {
|
|
32
|
+
"SVGSpritePath": "./assets/img/icons-sprite.svg",
|
|
33
|
+
"siteSearch": {
|
|
34
|
+
"value": "#",
|
|
35
|
+
"placeholder": "",
|
|
36
|
+
"label": "",
|
|
37
|
+
"formAction": {
|
|
38
|
+
"url": "https://www.forgov.qld.gov.au/search"
|
|
39
|
+
},
|
|
40
|
+
"options": {
|
|
41
|
+
"borderStyle": {
|
|
42
|
+
"full": true
|
|
43
|
+
}
|
|
171
44
|
}
|
|
172
45
|
}
|
|
173
46
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
<div class="qld-header-brand">
|
|
3
|
+
<a class="qld-header-link d-lg-inline-flex" href="{{url}}">
|
|
4
|
+
<div class="qld-header-brand-image qld-header-logo">
|
|
5
|
+
{{#if logo}}
|
|
6
|
+
<img src="{{logo.src}}" height="56" alt="{{#if logo.altText}}{{logo.altText}}{{else}}Queensland government{{/if}}" />
|
|
7
|
+
{{else}}
|
|
8
|
+
{{#if siteTitle}}
|
|
9
|
+
{{>logo logo="coa-landscape-2lines" height="56" fill="currentColor"}}
|
|
10
|
+
{{else}}
|
|
11
|
+
{{>logo height="56" fill="currentColor"}}
|
|
12
|
+
{{/if}}
|
|
13
|
+
{{/if}}
|
|
14
|
+
</div>
|
|
15
|
+
{{#if secondaryLogo}}
|
|
16
|
+
<div class="qld-header-secondary-content" >
|
|
17
|
+
<img src="{{secondaryLogo.src}}" class="qld-header-secondary-image qld-header-logo" height="56" alt="{{#if secondaryLogo.altText}}{{secondaryLogo.altText}}{{else}}{{siteTitle}}{{#if subline}}{{subline}}{{/if}}{{/if}}" />
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
{{else}}
|
|
21
|
+
{{#if siteTitle}}
|
|
22
|
+
<div class="qld-header-secondary-content">
|
|
23
|
+
<span class="qld-header-site-title">
|
|
24
|
+
{{siteTitle}}
|
|
25
|
+
</span>
|
|
26
|
+
{{#if subline}}
|
|
27
|
+
<span class="qld-header-subline">
|
|
28
|
+
{{subline}}
|
|
29
|
+
</span>
|
|
30
|
+
{{/if}}
|
|
31
|
+
</div>
|
|
32
|
+
{{/if}}
|
|
33
|
+
{{/if}}
|
|
34
|
+
</a>
|
|
35
|
+
</div>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from "@storybook/blocks"
|
|
2
|
-
import * as AlertStories from "./inpageAlert.stories"
|
|
1
|
+
import { Canvas, Meta, Story, Source } from "@storybook/blocks";
|
|
2
|
+
import * as AlertStories from "./inpageAlert.stories";
|
|
3
|
+
import defaultdata from "./inpageAlert.data.json";
|
|
3
4
|
|
|
4
5
|
<Meta of={AlertStories} />
|
|
5
6
|
|
|
6
7
|
# In-page alert
|
|
8
|
+
|
|
7
9
|
<Canvas>
|
|
8
10
|
<Story of={AlertStories.Success} />
|
|
9
11
|
</Canvas>
|
|
@@ -14,3 +16,7 @@ import * as AlertStories from "./inpageAlert.stories"
|
|
|
14
16
|
- [Master component file (Figma)](https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=5990-98125&mode=design&t=YLfxdziHdqD2Ty0o-0)
|
|
15
17
|
- [Design System website](https://www.designsystem.qld.gov.au/components/alerts-in-page)
|
|
16
18
|
- [Bootstrap component](https://getbootstrap.com/docs/5.3/components/alerts/)
|
|
19
|
+
|
|
20
|
+
## Example JSON data
|
|
21
|
+
|
|
22
|
+
<Source language="json" code={JSON.stringify(defaultdata, null, 2)} />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
"variantClass": "alert-success",
|
|
3
|
+
"alertType": "",
|
|
4
|
+
"heading": "Alert heading",
|
|
5
|
+
"headingTag": "h2",
|
|
6
|
+
"content": "<p>This is an alert notice with some important information. <a href='#'>Find out more</a>.</p>"
|
|
7
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{{~/inline}}
|
|
5
5
|
|
|
6
6
|
{{#*inline "link"~}}
|
|
7
|
-
<a class="
|
|
7
|
+
<a class="link" {{#if id}}id="{{id}}"{{/if}}
|
|
8
8
|
href="{{url}}"
|
|
9
9
|
target="{{target}}"
|
|
10
10
|
{{#if arialabel}}aria-label="{{arialabel}}"{{/if}}
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
{{~/inline}}
|
|
29
29
|
|
|
30
30
|
{{#if linkList~}}
|
|
31
|
-
<ul class="
|
|
31
|
+
<ul class="link-list">
|
|
32
32
|
{{#each linkList}}
|
|
33
|
-
<li class="
|
|
33
|
+
<li class="link-item">
|
|
34
34
|
{{~> link~}}
|
|
35
35
|
</li>
|
|
36
36
|
{{/each}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Component from "../../../js/QGDSComponent.js";
|
|
2
|
-
import template from "./
|
|
2
|
+
import template from "./link.hbs?raw";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a new instance of the Link Column class.
|
|
@@ -10,7 +10,7 @@ import template from "./iconLink.hbs?raw";
|
|
|
10
10
|
* See sample data file for more examples.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
export class
|
|
13
|
+
export class Link {
|
|
14
14
|
// Use the global Component class to create a new instance of the LinkColumn component.
|
|
15
15
|
// A data object, containing the Handlebars placeholder replacement strings, should be provided as an argument.
|
|
16
16
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Canvas, Meta, Story } from "@storybook/blocks";
|
|
2
|
-
import * as
|
|
2
|
+
import * as linkStories from "./link.stories";
|
|
3
3
|
|
|
4
|
-
<Meta of={
|
|
4
|
+
<Meta of={linkStories} />
|
|
5
5
|
|
|
6
6
|
# Icon Link
|
|
7
7
|
|
|
8
8
|
<Canvas>
|
|
9
|
-
<Story of={
|
|
9
|
+
<Story of={linkStories.Default} />
|
|
10
10
|
</Canvas>
|
|
11
11
|
|
|
12
12
|
## Design resources
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
.
|
|
1
|
+
.link {
|
|
2
2
|
text-underline-offset: var(--qld-link-underline-offset);
|
|
3
3
|
text-decoration-thickness: var(--qld-link-underline-thickness);
|
|
4
4
|
|
|
5
5
|
--#{$prefix}icon-background-color: var(--#{$prefix}light-action-secondary);
|
|
6
|
+
--#{$prefix}icon-background-color-hover: var(
|
|
7
|
+
--#{$prefix}light-action-secondary-hover
|
|
8
|
+
);
|
|
6
9
|
--#{$prefix}link-color: var(--#{$prefix}light-link);
|
|
7
10
|
--#{$prefix}link-text-decoration-color: var(--#{$prefix}light-link);
|
|
11
|
+
--#{$prefix}link-gap: 0.5rem;
|
|
8
12
|
|
|
9
13
|
.dark &,
|
|
10
14
|
.dark-alt & {
|
|
11
15
|
--#{$prefix}icon-background-color: var(--#{$prefix}dark-action-secondary);
|
|
16
|
+
--#{$prefix}icon-background-color-hover: var(
|
|
17
|
+
--#{$prefix}dark-action-secondary-hover
|
|
18
|
+
);
|
|
12
19
|
--#{$prefix}link-color: var(--#{$prefix}dark-link);
|
|
13
20
|
--#{$prefix}link-text-decoration-color: var(--#{$prefix}dark-link);
|
|
14
21
|
&:visited {
|
|
@@ -19,12 +26,25 @@
|
|
|
19
26
|
|
|
20
27
|
color: var(--#{$prefix}link-color);
|
|
21
28
|
text-decoration-color: var(--#{$prefix}link-text-decoration-color);
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: var(--#{$prefix}link-gap);
|
|
31
|
+
align-items: center;
|
|
32
|
+
text-decoration-color: rgba(
|
|
33
|
+
var(--#{$prefix}link-color-rgb),
|
|
34
|
+
var(--#{$prefix}link-opacity, 0.5)
|
|
35
|
+
);
|
|
36
|
+
text-underline-offset: $icon-link-underline-offset;
|
|
37
|
+
backface-visibility: hidden;
|
|
38
|
+
width: fit-content;
|
|
22
39
|
|
|
23
40
|
&:hover {
|
|
24
|
-
text-decoration-thickness: var(--qld-link-underline-thickness);
|
|
41
|
+
text-decoration-thickness: var(--qld-link-underline-thickness-hover);
|
|
25
42
|
text-decoration-color: var(
|
|
26
43
|
--#{$prefix}color-default-color-light-underline-default
|
|
27
44
|
);
|
|
45
|
+
.qld-icon {
|
|
46
|
+
background-color: var(--#{$prefix}icon-background-color-hover);
|
|
47
|
+
}
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
&:visited {
|
|
@@ -47,10 +67,14 @@
|
|
|
47
67
|
}
|
|
48
68
|
}
|
|
49
69
|
|
|
50
|
-
.
|
|
70
|
+
.link-list {
|
|
51
71
|
list-style: none;
|
|
52
72
|
margin: 0;
|
|
53
73
|
padding: 0;
|
|
74
|
+
li {
|
|
75
|
+
margin-top: 0.75rem;
|
|
76
|
+
line-height: 1.5rem;
|
|
77
|
+
}
|
|
54
78
|
li:first-child {
|
|
55
79
|
margin-top: 0;
|
|
56
80
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
// ComponentExample.stories.js
|
|
2
1
|
/**
|
|
3
2
|
* @file linkColumns.stories.js
|
|
4
3
|
* @description Storybook configuration file for the link Columns component.
|
|
5
4
|
* @module linkColumns.stories
|
|
6
5
|
*/
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import defaultdata from "./
|
|
7
|
+
import { Link } from "./link.js";
|
|
8
|
+
import defaultdata from "./link.data.json";
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
11
|
tags: ["autodocs"],
|
|
13
|
-
title: "3. Components/
|
|
12
|
+
title: "3. Components/Link",
|
|
14
13
|
|
|
15
|
-
render: (args) => new
|
|
14
|
+
render: (args) => new Link(args).html,
|
|
16
15
|
// args: defaultdata,
|
|
17
16
|
argTypes: {
|
|
18
17
|
url: {
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from "@storybook/blocks"
|
|
2
|
-
import * as linkColumnsStories from "./linkColumns.stories"
|
|
1
|
+
import { Canvas, Meta, Story, Source } from "@storybook/blocks";
|
|
2
|
+
import * as linkColumnsStories from "./linkColumns.stories";
|
|
3
|
+
import defaultdata from "./linkColumns.data.json";
|
|
3
4
|
|
|
4
5
|
<Meta of={linkColumnsStories} />
|
|
5
6
|
|
|
6
7
|
# LinkColumns
|
|
8
|
+
|
|
7
9
|
<Canvas>
|
|
8
10
|
<Story of={linkColumnsStories.Default} />
|
|
9
11
|
</Canvas>
|
|
10
12
|
|
|
11
13
|
## Design resources
|
|
12
14
|
|
|
13
|
-
|
|
14
15
|
- [Component library (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=11056-321574&p=f&t=6pghtHXhO8h5PAit-0)
|
|
15
16
|
- [Master component file (Figma)](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=11056-321574&p=f&t=6sRnJtEdRnteiQXM-0)
|
|
16
17
|
- [Design System website](https://www.designsystem.qld.gov.au/components/link-columns-link-list)
|
|
18
|
+
|
|
19
|
+
## Example JSON data
|
|
20
|
+
|
|
21
|
+
<Source language="json" code={JSON.stringify(defaultdata, null, 2)} />
|