@qld-gov-au/qgds-bootstrap5 2.0.6 → 2.0.8
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/.esbuild/plugins/qgds-plugin-build-log.js +2 -2
- package/.esbuild/plugins/qgds-plugin-copy-assets.js +0 -3
- package/.esbuild/plugins/qgds-plugin-handlebar-partial-builder.js +76 -66
- package/.storybook/README.md +10 -0
- package/.storybook/{main.js → main.mjs} +4 -5
- package/.storybook/modes.js +3 -12
- package/.storybook/preview.js +14 -11
- package/dist/assets/components/bs5/footer/footer.hbs +20 -18
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/header/header.hbs +40 -52
- package/dist/assets/components/bs5/header/headerBrand.hbs +9 -10
- package/dist/assets/components/bs5/logo/logo.hbs +2 -0
- package/dist/assets/components/bs5/logo/logoCOADeliveringForQLD.hbs +49 -0
- package/dist/assets/components/bs5/logo/logoCOALandscape.hbs +55 -109
- package/dist/assets/components/bs5/logo/logoCOALandscape2Lines.hbs +55 -55
- package/dist/assets/components/bs5/searchInput/searchInput.hbs +5 -5
- package/dist/assets/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/css/qld.bootstrap.legacy.css +1 -1
- package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
- package/dist/assets/img/coa-delivering-for-qld.svg +47 -0
- package/dist/assets/img/coa-delivering-for-qld.svg.old +58 -0
- package/dist/assets/img/coa-landscape-2lines.svg +63 -0
- package/dist/assets/img/coa-landscape-web.svg +56 -0
- package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
- package/dist/assets/js/handlebars.helpers.bundle.js.map +3 -3
- package/dist/assets/js/handlebars.init.min.js +1329 -1344
- package/dist/assets/js/handlebars.init.min.js.map +4 -4
- package/dist/assets/js/handlebars.partials.js +2383 -136
- package/dist/assets/js/handlebars.partials.js.map +7 -0
- package/dist/assets/js/qld.bootstrap.min.js +3 -3
- package/dist/assets/js/qld.bootstrap.min.js.map +3 -3
- package/dist/assets/node/handlebars.init.min.js +219 -198
- package/dist/assets/node/handlebars.init.min.js.map +3 -3
- package/dist/components/bs5/footer/footer.hbs +20 -18
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/header/header.hbs +40 -52
- package/dist/components/bs5/header/headerBrand.hbs +9 -10
- package/dist/components/bs5/logo/logo.hbs +2 -0
- package/dist/components/bs5/logo/logoCOADeliveringForQLD.hbs +49 -0
- package/dist/components/bs5/logo/logoCOALandscape.hbs +55 -109
- package/dist/components/bs5/logo/logoCOALandscape2Lines.hbs +55 -55
- package/dist/components/bs5/searchInput/searchInput.hbs +5 -5
- package/dist/package.json +27 -29
- package/dist/sample-data/correctincorrect/correctincorrect.data.json +1 -0
- package/dist/sample-data/header/header.variant.coBrand.data.json +5 -8
- package/dist/sample-data/header/header.variant.endorsed.data.json +3 -6
- package/dist/sample-data/header/header.variant.masterBrand.data.json +1 -6
- package/dist/sample-data/header/header.variant.standAlone.data.json +3 -6
- package/dist/sample-data/header/header.variant.subBrand.data.json +5 -8
- package/dist/sample-data/tabs/tabs.data.json +1 -2
- package/dist/sample-data/typography/typography.data.json +1 -0
- package/esbuild.js +16 -4
- package/package.json +27 -29
- package/pom.xml +3 -3
- package/src/components/bs5/accordion/Accordion.mdx +1 -1
- package/src/components/bs5/accordion/accordion.stories.js +17 -22
- package/src/components/bs5/backToTop/backToTop.mdx +1 -1
- package/src/components/bs5/banner/Banner.mdx +1 -1
- package/src/components/bs5/banner/banner.scss +2 -2
- package/src/components/bs5/blockquote/Blockquote.mdx +1 -1
- package/src/components/bs5/blockquote/manifest.json +1 -0
- package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +1 -1
- package/src/components/bs5/breadcrumbs/breadcrumbs.scss +7 -2
- package/src/components/bs5/breadcrumbs/breadcrumbs.stories.js +19 -10
- package/src/components/bs5/breadcrumbs/manifest.json +1 -0
- package/src/components/bs5/breadcumbsWrapper/manifest.json +1 -0
- package/src/components/bs5/button/Button.mdx +1 -1
- package/src/components/bs5/button/manifest.json +1 -0
- package/src/components/bs5/callToAction/callToAction.mdx +1 -1
- package/src/components/bs5/callToAction/callToAction.stories.js +15 -50
- package/src/components/bs5/callout/Callout.mdx +1 -1
- package/src/components/bs5/callout/callout.stories.js +7 -26
- package/src/components/bs5/callout/manifest.json +1 -0
- package/src/components/bs5/card/Card.mdx +1 -1
- package/src/components/bs5/card/card.scss +1 -1
- package/src/components/bs5/card/manifest.json +1 -0
- package/src/components/bs5/contentFooter/manifest.json +1 -0
- package/src/components/bs5/contentFooterWrapper/manifest.json +1 -0
- package/src/components/bs5/contentWrapper/manifest.json +1 -0
- package/src/components/bs5/correctincorrect/correctincorrect.data.json +1 -0
- package/src/components/bs5/correctincorrect/manifest.json +1 -0
- package/src/components/bs5/dateinput/Dateinput.stories.js +23 -31
- package/src/components/bs5/dateinput/manifest.json +1 -0
- package/src/components/bs5/directionLinks/DirectionLinks.mdx +1 -1
- package/src/components/bs5/directionLinks/directionLinks.stories.js +14 -12
- package/src/components/bs5/footer/Footer.mdx +1 -1
- package/src/components/bs5/footer/footer.hbs +20 -18
- package/src/components/bs5/footer/footer.scss +7 -5
- package/src/components/bs5/formcheck/manifest.json +1 -0
- package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +1 -1
- package/src/components/bs5/formcheck/stories/checkbox/checkbox.stories.js +44 -87
- package/src/components/bs5/formcheck/stories/radio/Radio.mdx +1 -1
- package/src/components/bs5/formcheck/stories/radio/radio.stories.js +9 -36
- package/src/components/bs5/fullPageWrapper/manifest.json +1 -0
- package/src/components/bs5/globalAlert/GlobalAlert.mdx +1 -1
- package/src/components/bs5/globalAlert/globalAlert.test.js +3 -3
- package/src/components/bs5/globalAlert/manifest.json +1 -0
- package/src/components/bs5/head/manifest.json +1 -0
- package/src/components/bs5/header/Header.js +25 -0
- package/src/components/bs5/header/Header.mdx +1 -1
- package/src/components/bs5/header/_header-variables.scss +61 -247
- package/src/components/bs5/header/header.functions.js +10 -15
- package/src/components/bs5/header/header.hbs +40 -52
- package/src/components/bs5/header/header.scss +166 -158
- package/src/components/bs5/header/header.stories.js +35 -233
- package/src/components/bs5/header/header.variant.coBrand.data.json +5 -8
- package/src/components/bs5/header/header.variant.endorsed.data.json +3 -6
- package/src/components/bs5/header/header.variant.masterBrand.data.json +1 -6
- package/src/components/bs5/header/header.variant.standAlone.data.json +3 -6
- package/src/components/bs5/header/header.variant.subBrand.data.json +5 -8
- package/src/components/bs5/header/headerBrand.hbs +9 -10
- package/src/components/bs5/header/manifest.json +1 -0
- package/src/components/bs5/icons/Icons.mdx +1 -1
- package/src/components/bs5/icons/manifest.json +1 -0
- package/src/components/bs5/icons/mdx/_IconsSizes.mdx +1 -1
- package/src/components/bs5/image/Image.mdx +1 -1
- package/src/components/bs5/inpageAlert/InpageAlert.mdx +1 -1
- package/src/components/bs5/inpageAlert/inpageAlert.scss +107 -120
- package/src/components/bs5/inpageAlert/inpageAlert.stories.js +7 -23
- package/src/components/bs5/inpageAlert/manifest.json +1 -0
- package/src/components/bs5/inpagenav/Inpagenav.mdx +1 -1
- package/src/components/bs5/inpagenav/inpagenav.stories.js +4 -6
- package/src/components/bs5/inpagenav/manifest.json +1 -0
- package/src/components/bs5/link/link.mdx +1 -1
- package/src/components/bs5/link/link.stories.js +4 -6
- package/src/components/bs5/linkColumns/linkColumns.mdx +1 -1
- package/src/components/bs5/linkColumns/linkColumns.scss +18 -25
- package/src/components/bs5/logo/Logo.mdx +1 -1
- package/src/components/bs5/logo/logo.hbs +2 -0
- package/src/components/bs5/logo/logoCOADeliveringForQLD.hbs +49 -0
- package/src/components/bs5/logo/logoCOALandscape.hbs +55 -109
- package/src/components/bs5/logo/logoCOALandscape2Lines.hbs +55 -55
- package/src/components/bs5/mainContainerWrapper/manifest.json +1 -0
- package/src/components/bs5/metaDcTerms/manifest.json +1 -0
- package/src/components/bs5/metaOpenGraph/manifest.json +1 -0
- package/src/components/bs5/modal/Modal.mdx +1 -1
- package/src/components/bs5/modal/manifest.json +1 -0
- package/src/components/bs5/navbar/navbar.scss +36 -14
- package/src/components/bs5/pagination/Pagination.mdx +1 -1
- package/src/components/bs5/pagination/manifest.json +1 -0
- package/src/components/bs5/pagination/pagination.stories.js +12 -21
- package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +1 -1
- package/src/components/bs5/quickexit/manifest.json +1 -0
- package/src/components/bs5/searchInput/SearchInput.js +3 -5
- package/src/components/bs5/searchInput/SearchInput.mdx +1 -1
- package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +5 -5
- package/src/components/bs5/searchInput/manifest.json +1 -0
- package/src/components/bs5/searchInput/searchInput.hbs +5 -5
- package/src/components/bs5/searchInput/searchInput.scss +13 -0
- package/src/components/bs5/searchInput/searchInput.stories.js +10 -12
- package/src/components/bs5/select/manifest.json +1 -0
- package/src/components/bs5/sidenav/Sidenav.mdx +1 -1
- package/src/components/bs5/sidenav/manifest.json +1 -0
- package/src/components/bs5/sidenav/sidenav.stories.js +4 -7
- package/src/components/bs5/sidenavWrapper/manifest.json +1 -0
- package/src/components/bs5/skiplinks/SkipLinks.mdx +1 -1
- package/src/components/bs5/spinner/manifest.json +1 -0
- package/src/components/bs5/table/Table.mdx +1 -1
- package/src/components/bs5/table/manifest.json +1 -0
- package/src/components/bs5/tabs/Tabs.mdx +1 -1
- package/src/components/bs5/tabs/tabs.data.json +1 -2
- package/src/components/bs5/tabs/tabs.stories.js +38 -215
- package/src/components/bs5/tag/Tag.mdx +1 -1
- package/src/components/bs5/tag/manifest.json +1 -0
- package/src/components/bs5/tag/tag--large.stories.js +53 -0
- package/src/components/bs5/tag/tag--standard.stories.js +39 -0
- package/src/components/bs5/tag/tag--status.stories.js +97 -0
- package/src/components/bs5/tag/tag.scss +67 -36
- package/src/components/bs5/tag/tag.stories.js +69 -106
- package/src/components/bs5/textarea/manifest.json +1 -0
- package/src/components/bs5/textbox/manifest.json +1 -0
- package/src/components/bs5/typography/Typography.mdx +1 -1
- package/src/components/bs5/typography/manifest.json +1 -0
- package/src/components/bs5/typography/typography.data.json +1 -0
- package/src/components/bs5/typography/typography.stories.js +6 -24
- package/src/components/bs5/video/Video.mdx +1 -1
- package/src/components/bs5/video/manifest.json +1 -0
- package/src/components/bs5/video/video.stories.js +6 -24
- package/src/css/main.scss +2 -2
- package/src/css/mixins/_index.scss +1 -0
- package/src/css/mixins/focusable.scss +6 -5
- package/src/css/mixins/make-link.scss +40 -0
- package/src/css/qld-print.scss +426 -304
- package/src/css/qld-theme.scss +16 -8
- package/src/css/qld-type.scss +3 -73
- package/src/css/variables/animation.scss +5 -0
- package/src/img/coa-delivering-for-qld.svg +47 -0
- package/src/img/coa-delivering-for-qld.svg.old +58 -0
- package/src/img/coa-landscape-2lines.svg +63 -0
- package/src/img/coa-landscape-web.svg +56 -0
- package/src/js/handlebars.helpers.js +51 -38
- package/src/js/handlebars.partials.js +12 -10
- package/src/stories/Introduction.mdx +1 -1
- package/vite.config.js +17 -0
- package/.eslintrc.cjs +0 -52
- package/dist/assets/img/_coa_header-logo-qgov--stacked.svg +0 -171
- package/dist/assets/img/_coa_header-logo-qgov-masterbrand.svg +0 -56
- package/dist/assets/img/_coa_preheader-logo-qgov.svg +0 -56
- package/dist/assets/js/bootstrap.js +0 -6312
- package/dist/assets/js/handlebars.helpers.js +0 -292
- package/dist/assets/js/handlebars.init.cjs +0 -6
- package/dist/assets/js/handlebars.init.js +0 -34
- package/dist/components/handlebars.helpers.js +0 -292
- package/dist/components/handlebars.init.cjs +0 -6
- package/dist/components/handlebars.init.js +0 -34
- package/dist/components/handlebars.partials.js +0 -136
- package/src/img/_coa_header-logo-qgov--stacked.svg +0 -171
- package/src/img/_coa_header-logo-qgov-masterbrand.svg +0 -56
- package/src/img/_coa_preheader-logo-qgov.svg +0 -56
|
@@ -93,6 +93,9 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
93
93
|
list-style-type: none;
|
|
94
94
|
margin: 0.5rem 0;
|
|
95
95
|
padding: 30px;
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: 1rem;
|
|
96
99
|
|
|
97
100
|
.tag-item {
|
|
98
101
|
--_padding-y: 0;
|
|
@@ -104,12 +107,11 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
104
107
|
//
|
|
105
108
|
display: inline-flex;
|
|
106
109
|
align-items: center;
|
|
107
|
-
color: var(--#{$prefix}
|
|
108
|
-
margin
|
|
109
|
-
gap: calc(var(--_padding-x) / 2);
|
|
110
|
+
color: var(--#{$prefix}light-text-lighter);
|
|
111
|
+
// margin: 0 1rem 1rem 0;
|
|
110
112
|
padding: var(--_padding-y) var(--_padding-x);
|
|
111
113
|
list-style-type: none;
|
|
112
|
-
border: var(--_border-width) solid var(--#{$prefix}
|
|
114
|
+
border: var(--_border-width) solid var(--#{$prefix}neutral-lighter);
|
|
113
115
|
border-radius: 1rem;
|
|
114
116
|
font-size: 0.875rem;
|
|
115
117
|
line-height: 1.5;
|
|
@@ -121,14 +123,13 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
121
123
|
--_padding-x: 1rem;
|
|
122
124
|
--_height: 2.5rem;
|
|
123
125
|
--_icon-size: 1.5rem;
|
|
124
|
-
margin: 0 1rem 1rem 0;
|
|
125
126
|
font-size: 1rem;
|
|
126
127
|
border-radius: calc(var(--_height) / 2);
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
&.tag-link {
|
|
130
|
-
color: var(--#{$prefix}
|
|
131
|
-
border-color: var(--#{$prefix}
|
|
131
|
+
color: var(--#{$prefix}light-link);
|
|
132
|
+
border-color: var(--#{$prefix}light-link);
|
|
132
133
|
|
|
133
134
|
a {
|
|
134
135
|
text-decoration: none;
|
|
@@ -144,14 +145,13 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
144
145
|
&:active,
|
|
145
146
|
&:focus,
|
|
146
147
|
&:focus-within {
|
|
147
|
-
|
|
148
|
-
color: var(--#{$prefix}
|
|
149
|
-
background-color: var(--#{$prefix}button-dark-blue);
|
|
148
|
+
color: var(--#{$prefix}light-link-on-action);
|
|
149
|
+
background-color: var(--#{$prefix}light-action-primary-hover);
|
|
150
150
|
text-decoration: underline;
|
|
151
151
|
text-underline-offset: var(--#{$prefix}link-underline-offset);
|
|
152
152
|
|
|
153
153
|
a {
|
|
154
|
-
color: var(--#{$prefix}
|
|
154
|
+
color: var(--#{$prefix}light-link-on-action);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -166,9 +166,9 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
&.tag-info {
|
|
169
|
-
color: var(--#{$prefix}
|
|
169
|
+
color: var(--#{$prefix}light-text-lighter);
|
|
170
170
|
border: 0;
|
|
171
|
-
background-color: var(--#{$prefix}
|
|
171
|
+
background-color: var(--#{$prefix}neutral-lightest);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -266,20 +266,22 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
&.tag-dark
|
|
270
|
-
|
|
269
|
+
&.tag-dark,
|
|
270
|
+
.dark &:not(.tag-dark):not(.tag-dark-alt):not(.tag-alt) {
|
|
271
|
+
background-color: var(--#{$prefix}dark-background);
|
|
271
272
|
|
|
272
273
|
.tag-item {
|
|
273
274
|
--qld-focus-color: #{$qld-dark-focus}; // because we use component-scoped context (.tag-dark) not global .dark, need to set focus color correctly here.
|
|
274
|
-
color: var(--#{$prefix}dark-text);
|
|
275
|
+
color: var(--#{$prefix}dark-text-lighter);
|
|
276
|
+
border-color: var(--#{$prefix}dark-alt-border);
|
|
275
277
|
}
|
|
276
278
|
|
|
277
279
|
.tag-link {
|
|
278
|
-
color: var(--#{$prefix}
|
|
279
|
-
border-color: var(--#{$prefix}
|
|
280
|
+
color: var(--#{$prefix}dark-link);
|
|
281
|
+
border-color: var(--#{$prefix}dark-link);
|
|
280
282
|
|
|
281
283
|
a {
|
|
282
|
-
color:
|
|
284
|
+
color: var(--#{$prefix}dark-link);
|
|
283
285
|
}
|
|
284
286
|
|
|
285
287
|
&:hover,
|
|
@@ -287,17 +289,18 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
287
289
|
&:focus,
|
|
288
290
|
&:focus-within {
|
|
289
291
|
background-color: var(--#{$prefix}dark-action-primary-hover);
|
|
290
|
-
border-color: var(--#{$prefix}
|
|
291
|
-
color: var(--#{$prefix}
|
|
292
|
+
border-color: var(--#{$prefix}dark-action-primary-hover);
|
|
293
|
+
color: var(--#{$prefix}dark-link-on-action);
|
|
292
294
|
|
|
293
295
|
a {
|
|
294
|
-
color: var(--#{$prefix}
|
|
296
|
+
color: var(--#{$prefix}dark-link-on-action);
|
|
295
297
|
}
|
|
296
298
|
}
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
.tag-info {
|
|
300
|
-
background-color: var(--#{$prefix}
|
|
302
|
+
background-color: var(--#{$prefix}dark-background-shade);
|
|
303
|
+
color: var(--#{$prefix}dark-text-lighter);
|
|
301
304
|
}
|
|
302
305
|
|
|
303
306
|
.tag-clear-filter-button {
|
|
@@ -310,11 +313,11 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
310
313
|
}
|
|
311
314
|
|
|
312
315
|
&.tag-alt {
|
|
313
|
-
background-color: var(--#{$prefix}light-
|
|
316
|
+
background-color: var(--#{$prefix}light-alt-background);
|
|
314
317
|
|
|
315
318
|
.tag-item {
|
|
316
|
-
color: var(--#{$prefix}
|
|
317
|
-
border-color: var(--#{$prefix}
|
|
319
|
+
color: var(--#{$prefix}light-text-lighter);
|
|
320
|
+
border-color: var(--#{$prefix}light-alt-border);
|
|
318
321
|
}
|
|
319
322
|
|
|
320
323
|
.tag-link:hover,
|
|
@@ -324,27 +327,55 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
324
327
|
}
|
|
325
328
|
|
|
326
329
|
.tag-link {
|
|
327
|
-
color: var(--#{$prefix}
|
|
328
|
-
border-color: var(--#{$prefix}
|
|
330
|
+
color: var(--#{$prefix}light-link);
|
|
331
|
+
border-color: var(--#{$prefix}light-link);
|
|
329
332
|
}
|
|
330
333
|
}
|
|
331
334
|
|
|
332
|
-
&.tag-
|
|
333
|
-
background-color: var(--#{$prefix}
|
|
335
|
+
&.tag-light {
|
|
336
|
+
background-color: var(--#{$prefix}light-background);
|
|
337
|
+
|
|
338
|
+
.tag-item {
|
|
339
|
+
color: var(--#{$prefix}light-text-lighter);
|
|
340
|
+
border-color: var(--#{$prefix}light-border);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.tag-link {
|
|
344
|
+
color: var(--#{$prefix}light-link);
|
|
345
|
+
border-color: var(--#{$prefix}light-link);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.tag-info {
|
|
349
|
+
background-color: var(--#{$prefix}light-background-shade);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.tag-clear-filter-button {
|
|
353
|
+
color: var(--#{$prefix}light-action-secondary);
|
|
354
|
+
|
|
355
|
+
&:hover {
|
|
356
|
+
color: var(--#{$prefix}light-action-secondary-hover);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
&.tag-dark-alt,
|
|
362
|
+
.dark-alt &:not(.tag-dark, .tag-dark-alt, .tag-alt) {
|
|
363
|
+
background-color: var(--#{$prefix}dark-alt-background);
|
|
334
364
|
|
|
335
365
|
.tag-item {
|
|
336
366
|
--qld-focus-color: #{$qld-dark-focus}; // because we use component-scoped context (.tag-dark) not global .dark, need to set focus color correctly here.
|
|
337
367
|
|
|
338
368
|
a {
|
|
339
|
-
color: var(--#{$prefix}dark-text);
|
|
369
|
+
color: var(--#{$prefix}dark-text-lighter);
|
|
340
370
|
}
|
|
341
371
|
|
|
342
|
-
color: var(--#{$prefix}dark-text);
|
|
372
|
+
color: var(--#{$prefix}dark-text-lighter);
|
|
343
373
|
border-color: var(--#{$prefix}dark-border);
|
|
344
374
|
}
|
|
345
375
|
|
|
346
376
|
.tag-info {
|
|
347
|
-
background-color: var(--#{$prefix}dark-
|
|
377
|
+
background-color: var(--#{$prefix}dark-alt-background-shade);
|
|
378
|
+
color: var(--#{$prefix}dark-text-lighter);
|
|
348
379
|
}
|
|
349
380
|
|
|
350
381
|
.tag-link {
|
|
@@ -353,11 +384,11 @@ $_icon-status-cancel: url('data:image/svg+xml,<svg width="32" height="32" viewBo
|
|
|
353
384
|
&:focus,
|
|
354
385
|
&:focus-within {
|
|
355
386
|
background-color: var(--#{$prefix}dark-action-primary-hover);
|
|
356
|
-
border-color: var(--#{$prefix}
|
|
357
|
-
color: var(--#{$prefix}
|
|
387
|
+
border-color: var(--#{$prefix}dark-link-on-action);
|
|
388
|
+
color: var(--#{$prefix}dark-link-on-action);
|
|
358
389
|
|
|
359
390
|
a {
|
|
360
|
-
color: var(--#{$prefix}
|
|
391
|
+
color: var(--#{$prefix}dark-link-on-action);
|
|
361
392
|
}
|
|
362
393
|
}
|
|
363
394
|
}
|
|
@@ -1,64 +1,10 @@
|
|
|
1
1
|
// Tag.stories.js
|
|
2
|
-
import { Tag } from
|
|
3
|
-
import defaultdata from
|
|
4
|
-
|
|
5
|
-
const sizes = {
|
|
6
|
-
"": "Small (Default)",
|
|
7
|
-
"tag-large": "Large",
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const emphasis = {
|
|
11
|
-
"tag-low": "Low",
|
|
12
|
-
"tag-high": "High",
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const types = {
|
|
16
|
-
"tag-neutral": "Neutral",
|
|
17
|
-
"tag-success": "Success",
|
|
18
|
-
"tag-warning": "Warning",
|
|
19
|
-
"tag-error": "Error",
|
|
20
|
-
"tag-information": "Information",
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Construct Status tag for all possible variants with various sizes, emphasis levels, and types.
|
|
25
|
-
* @returns {HTML} HTMLMarkup of the tags.
|
|
26
|
-
*/
|
|
27
|
-
function statusVariantsMarkup() {
|
|
28
|
-
//Map through the emphasis levels and sizes objects.
|
|
29
|
-
return Object.entries(emphasis).map(([emClass, emLabel]) => {
|
|
30
|
-
return Object.entries(sizes).map(([sizeClass, sizeLabel]) => {
|
|
31
|
-
//Construct tagItems for each types.
|
|
32
|
-
let tagItems = [];
|
|
33
|
-
Object.entries(types).map(([typeClass, typeLabel]) => {
|
|
34
|
-
tagItems.push({
|
|
35
|
-
content: `${typeLabel}`,
|
|
36
|
-
classes: `${typeClass}`,
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
//Generate Tag component markup from all possible tag types.
|
|
41
|
-
const tagHtml = new Tag({
|
|
42
|
-
variant: defaultdata.status.variant,
|
|
43
|
-
tagItems: tagItems,
|
|
44
|
-
size: sizeClass,
|
|
45
|
-
emphasis: emClass,
|
|
46
|
-
}).html;
|
|
47
|
-
|
|
48
|
-
//Return Tag component markup in grid with tag's emphasis and size as label.
|
|
49
|
-
return `<div class="d-grid mb-4">
|
|
50
|
-
<div class="fw-bold">${emLabel} ${sizeLabel}</div>
|
|
51
|
-
<div class="btn-toolbar">
|
|
52
|
-
${tagHtml}
|
|
53
|
-
</div>
|
|
54
|
-
</div>`;
|
|
55
|
-
}).join('')
|
|
56
|
-
}).join('');
|
|
57
|
-
}
|
|
2
|
+
import { Tag } from "./Tag.js";
|
|
3
|
+
import defaultdata from "./tag.data.json";
|
|
58
4
|
|
|
59
5
|
export default {
|
|
60
|
-
tags: [
|
|
61
|
-
title:
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
title: "3. Components/Tag",
|
|
62
8
|
render: (args) => new Tag(args).html,
|
|
63
9
|
argTypes: {
|
|
64
10
|
variant: {
|
|
@@ -67,12 +13,19 @@ export default {
|
|
|
67
13
|
type: "radio",
|
|
68
14
|
labels: {
|
|
69
15
|
"tag-default": "Default",
|
|
16
|
+
"tag-light": "Light",
|
|
70
17
|
"tag-alt": "Alt",
|
|
71
18
|
"tag-dark": "Dark",
|
|
72
19
|
"tag-dark-alt": "Dark-alt",
|
|
73
20
|
},
|
|
74
21
|
},
|
|
75
|
-
options: [
|
|
22
|
+
options: [
|
|
23
|
+
"tag-default",
|
|
24
|
+
"tag-light",
|
|
25
|
+
"tag-alt",
|
|
26
|
+
"tag-dark",
|
|
27
|
+
"tag-dark-alt",
|
|
28
|
+
],
|
|
76
29
|
},
|
|
77
30
|
},
|
|
78
31
|
};
|
|
@@ -82,61 +35,71 @@ export const Default = {
|
|
|
82
35
|
args: defaultdata.default,
|
|
83
36
|
};
|
|
84
37
|
|
|
85
|
-
// Info Tag story
|
|
86
|
-
export const Information = {
|
|
87
|
-
args: defaultdata.info,
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// Action Tag story
|
|
91
|
-
export const Action = {
|
|
92
|
-
args: defaultdata.action,
|
|
93
|
-
};
|
|
94
|
-
|
|
95
38
|
// Filter Tag story
|
|
96
39
|
export const Filter = {
|
|
97
40
|
args: defaultdata.filter,
|
|
98
41
|
};
|
|
99
42
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
43
|
+
export const ParentContextComparison = {
|
|
44
|
+
name: "Parent Context vs Component Variant Comparison",
|
|
45
|
+
render: () => {
|
|
46
|
+
const testTags = {
|
|
47
|
+
variant: "",
|
|
48
|
+
tagItems: [
|
|
49
|
+
{
|
|
50
|
+
content: "default",
|
|
51
|
+
classes: "",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
content: "Information",
|
|
55
|
+
classes: "tag-info",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
content: "<a href='javascript:void(0)'>Action</a>",
|
|
59
|
+
classes: "tag-link",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
content: "Filter",
|
|
63
|
+
classes: "tag-large",
|
|
64
|
+
"applied-filter": true,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
content: "Large",
|
|
68
|
+
classes: "tag-info tag-large",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
content: "Large",
|
|
72
|
+
classes: "tag-link tag-large",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
};
|
|
104
76
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
77
|
+
return `
|
|
78
|
+
<div class="mb-4">
|
|
79
|
+
<h6>Default</h6>
|
|
80
|
+
${new Tag(testTags).html}
|
|
81
|
+
</div>
|
|
109
82
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
control: {
|
|
125
|
-
type: "radio",
|
|
126
|
-
labels: emphasis,
|
|
127
|
-
},
|
|
128
|
-
options: Object.keys(emphasis),
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
};
|
|
83
|
+
<div class="mb-4">
|
|
84
|
+
<h6>Component Variant: tag-light</h6>
|
|
85
|
+
${new Tag({ ...testTags, variant: "tag-light" }).html}
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div class="mb-4">
|
|
89
|
+
<h6>Component Variant: tag-alt</h6>
|
|
90
|
+
${new Tag({ ...testTags, variant: "tag-alt" }).html}
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div class="mb-4">
|
|
94
|
+
<h6>Component Variant: tag-dark</h6>
|
|
95
|
+
${new Tag({ ...testTags, variant: "tag-dark" }).html}
|
|
96
|
+
</div>
|
|
132
97
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
render:() => {
|
|
139
|
-
return statusVariantsMarkup();
|
|
98
|
+
<div class="mb-4">
|
|
99
|
+
<h6>Component Variant: tag-dark-alt</h6>
|
|
100
|
+
${new Tag({ ...testTags, variant: "tag-dark-alt" }).html}
|
|
101
|
+
</div>
|
|
102
|
+
`;
|
|
140
103
|
},
|
|
141
104
|
parameters: {
|
|
142
105
|
controls: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -68,6 +68,8 @@ export default {
|
|
|
68
68
|
url: "https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=23805-301553&mode=design&t=5REJ3QGtTW1K0fGT-4",
|
|
69
69
|
},
|
|
70
70
|
],
|
|
71
|
+
backgrounds: { disable: false },
|
|
72
|
+
globals: { backgrounds: { value: "default" } },
|
|
71
73
|
},
|
|
72
74
|
};
|
|
73
75
|
|
|
@@ -80,12 +82,7 @@ export const Default = {};
|
|
|
80
82
|
* Light colour Callout
|
|
81
83
|
*/
|
|
82
84
|
export const Light = {
|
|
83
|
-
|
|
84
|
-
backgrounds: {
|
|
85
|
-
default: "Light",
|
|
86
|
-
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
87
|
-
},
|
|
88
|
-
},
|
|
85
|
+
globals: { backgrounds: { value: "light" } },
|
|
89
86
|
decorators: [
|
|
90
87
|
(Story) => {
|
|
91
88
|
return `
|
|
@@ -103,12 +100,7 @@ export const Light = {
|
|
|
103
100
|
* Alternative Callout
|
|
104
101
|
*/
|
|
105
102
|
export const Alternative = {
|
|
106
|
-
|
|
107
|
-
backgrounds: {
|
|
108
|
-
default: "Alternative",
|
|
109
|
-
values: [{ name: "Alternative", value: "var(--qld-light-grey-alt)" }],
|
|
110
|
-
},
|
|
111
|
-
},
|
|
103
|
+
globals: { backgrounds: { value: "alt" } },
|
|
112
104
|
decorators: [
|
|
113
105
|
(Story) => {
|
|
114
106
|
return `
|
|
@@ -126,12 +118,7 @@ export const Alternative = {
|
|
|
126
118
|
* Dark Callout
|
|
127
119
|
*/
|
|
128
120
|
export const Dark = {
|
|
129
|
-
|
|
130
|
-
backgrounds: {
|
|
131
|
-
default: "Dark",
|
|
132
|
-
values: [{ name: "Dark", value: "var(--qld-brand-primary)" }],
|
|
133
|
-
},
|
|
134
|
-
},
|
|
121
|
+
globals: { backgrounds: { value: "dark" } },
|
|
135
122
|
decorators: [
|
|
136
123
|
(Story) => {
|
|
137
124
|
return `
|
|
@@ -149,12 +136,7 @@ export const Dark = {
|
|
|
149
136
|
* Dark alternative Callout
|
|
150
137
|
*/
|
|
151
138
|
export const DarkAlternative = {
|
|
152
|
-
|
|
153
|
-
backgrounds: {
|
|
154
|
-
default: "Dark alternative",
|
|
155
|
-
values: [{ name: "Dark alternative", value: "var(--qld-dark-blue)" }],
|
|
156
|
-
},
|
|
157
|
-
},
|
|
139
|
+
globals: { backgrounds: { value: "darkAlt" } },
|
|
158
140
|
decorators: [
|
|
159
141
|
(Story) => {
|
|
160
142
|
return `
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -84,7 +84,9 @@ export default {
|
|
|
84
84
|
controls: {
|
|
85
85
|
exclude: ["transcriptAccordion"],
|
|
86
86
|
},
|
|
87
|
+
backgrounds: { disable: false },
|
|
87
88
|
},
|
|
89
|
+
globals: { backgrounds: { value: "default" } },
|
|
88
90
|
};
|
|
89
91
|
|
|
90
92
|
/**
|
|
@@ -110,12 +112,7 @@ export const Custom = {
|
|
|
110
112
|
* Light colour Video
|
|
111
113
|
*/
|
|
112
114
|
export const Light = {
|
|
113
|
-
|
|
114
|
-
backgrounds: {
|
|
115
|
-
default: "Light",
|
|
116
|
-
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
117
|
-
},
|
|
118
|
-
},
|
|
115
|
+
globals: { backgrounds: { value: "light" } },
|
|
119
116
|
decorators: [
|
|
120
117
|
(Story) => {
|
|
121
118
|
return `
|
|
@@ -131,12 +128,7 @@ export const Light = {
|
|
|
131
128
|
* Alternative Video
|
|
132
129
|
*/
|
|
133
130
|
export const Alternative = {
|
|
134
|
-
|
|
135
|
-
backgrounds: {
|
|
136
|
-
default: "Alternative",
|
|
137
|
-
values: [{ name: "Alternative", value: "var(--qld-light-grey-alt)" }],
|
|
138
|
-
},
|
|
139
|
-
},
|
|
131
|
+
globals: { backgrounds: { value: "alt" } },
|
|
140
132
|
decorators: [
|
|
141
133
|
(Story) => {
|
|
142
134
|
return `
|
|
@@ -152,12 +144,7 @@ export const Alternative = {
|
|
|
152
144
|
* Dark Video
|
|
153
145
|
*/
|
|
154
146
|
export const Dark = {
|
|
155
|
-
|
|
156
|
-
backgrounds: {
|
|
157
|
-
default: "Dark",
|
|
158
|
-
values: [{ name: "Dark", value: "var(--qld-brand-primary)" }],
|
|
159
|
-
},
|
|
160
|
-
},
|
|
147
|
+
globals: { backgrounds: { value: "dark" } },
|
|
161
148
|
decorators: [
|
|
162
149
|
(Story) => {
|
|
163
150
|
return `
|
|
@@ -173,12 +160,7 @@ export const Dark = {
|
|
|
173
160
|
* Dark alternative Video
|
|
174
161
|
*/
|
|
175
162
|
export const DarkAlternative = {
|
|
176
|
-
|
|
177
|
-
backgrounds: {
|
|
178
|
-
default: "Dark alternative",
|
|
179
|
-
values: [{ name: "Dark alternative", value: "var(--qld-dark-blue)" }],
|
|
180
|
-
},
|
|
181
|
-
},
|
|
163
|
+
globals: { backgrounds: { value: "darkAlt" } },
|
|
182
164
|
decorators: [
|
|
183
165
|
(Story) => {
|
|
184
166
|
return `
|
package/src/css/main.scss
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
$qld-tokens: meta.module-variables("qld-tokens") !default;
|
|
19
19
|
|
|
20
20
|
// External fonts
|
|
21
|
-
@import url("https://fonts.googleapis.com/css2?family=
|
|
21
|
+
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700;900&display=swap");
|
|
22
22
|
$font-family-sans-serif:
|
|
23
23
|
"Noto Sans",
|
|
24
24
|
system-ui,
|
|
@@ -34,7 +34,7 @@ $font-family-sans-serif:
|
|
|
34
34
|
"Segoe UI Emoji",
|
|
35
35
|
"Segoe UI Symbol",
|
|
36
36
|
"Noto Color Emoji" !default;
|
|
37
|
-
$font-family-sitename:
|
|
37
|
+
$font-family-sitename: $font-family-sans-serif;
|
|
38
38
|
|
|
39
39
|
//Prefix to namespace design-system classes
|
|
40
40
|
$prefix: "qld-";
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
/// Default focus styles for use in buttons etc. Resets :focus and uses :focus-visible instead which only appears on keyboard interaction.
|
|
3
3
|
/// @param {Boolean} $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
|
+
/// @param {String} $outlineWidth: [3px] The width of the outline.
|
|
5
6
|
/// @param {String} $customSelector [null] - If passed, will override $isFocusWithin and apply focus styles instead to a custom selector string. @see SearchInput
|
|
7
|
+
|
|
6
8
|
@mixin focusable(
|
|
7
9
|
$offsetOutline: true,
|
|
8
10
|
$isFocusWithin: false,
|
|
11
|
+
$outlineWidth: 3px,
|
|
9
12
|
$customSelector: null
|
|
10
13
|
) {
|
|
11
14
|
// outline styles without the pseudo state to allow for transition animations.
|
|
12
|
-
|
|
13
|
-
$outline-width: 3px;
|
|
14
|
-
$initial-offset: 0 - $outline-width;
|
|
15
|
+
$initial-offset: 0 - $outlineWidth;
|
|
15
16
|
|
|
16
17
|
@if $offsetOutline == true {
|
|
17
18
|
$offsetOutline: 2px;
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
$offsetOutline: $initial-offset;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
outline: $
|
|
23
|
+
outline: $outlineWidth solid transparent;
|
|
23
24
|
outline-offset: $initial-offset;
|
|
24
25
|
|
|
25
26
|
$selector: if(
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
|
|
31
32
|
&#{$selector} {
|
|
32
33
|
outline: {
|
|
33
|
-
width: $
|
|
34
|
+
width: $outlineWidth;
|
|
34
35
|
style: solid;
|
|
35
36
|
color: var(
|
|
36
37
|
--qld-focus-color,
|