@qld-gov-au/qgds-bootstrap5 2.1.9 → 2.1.11
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-story-list-builder.js +112 -0
- package/.storybook/DocumentationTemplate.mdx +47 -0
- package/.storybook/addons/qgds-multi-code-panels/components/Panel.tsx +231 -0
- package/.storybook/addons/qgds-multi-code-panels/constants.js +8 -0
- package/.storybook/addons/qgds-multi-code-panels/manager.tsx +15 -0
- package/.storybook/addons/qgds-multi-code-panels/preset.js +12 -0
- package/.storybook/codeRefsDecorator.js +87 -0
- package/.storybook/customMDXComponents.jsx +284 -0
- package/.storybook/main.mjs +16 -11
- package/.storybook/manager.js +2 -2
- package/.storybook/preview.js +39 -1
- package/dist/assets/components/bs5/directionLinks/directionLinks.hbs +0 -1
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/pagination/pagination.hbs +0 -7
- package/dist/assets/css/qld.bootstrap.css +2 -2
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
- package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
- package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
- package/dist/assets/js/handlebars.helpers.bundle.js.map +2 -2
- package/dist/assets/js/handlebars.init.min.js +3 -11
- package/dist/assets/js/handlebars.init.min.js.map +2 -2
- package/dist/assets/js/handlebars.partials.js +3 -11
- package/dist/assets/js/handlebars.partials.js.map +2 -2
- package/dist/assets/js/qld.bootstrap.min.js +1 -1
- package/dist/assets/node/handlebars.init.min.js +2 -10
- package/dist/assets/node/handlebars.init.min.js.map +2 -2
- package/dist/components/bs5/directionLinks/directionLinks.hbs +0 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/pagination/pagination.hbs +0 -7
- package/dist/package.json +8 -7
- package/dist/sample-data/sidenav/sidenav.data.json +1 -7
- package/esbuild.js +2 -0
- package/package.json +8 -7
- package/src/components/bs5/accordion/accordion.stories.js +6 -13
- package/src/components/bs5/accordion/metadata.json +15 -0
- package/src/components/bs5/backToTop/backToTop.stories.js +10 -14
- package/src/components/bs5/backToTop/manifest.json +15 -0
- package/src/components/bs5/backToTop/metadata.json +15 -0
- package/src/components/bs5/banner/banner.stories.js +16 -1
- package/src/components/bs5/banner/metadata.json +16 -0
- package/src/components/bs5/blockquote/blockquote.stories.js +20 -11
- package/src/components/bs5/blockquote/metadata.json +15 -0
- package/src/components/bs5/breadcrumbs/breadcrumbs.stories.js +6 -4
- package/src/components/bs5/breadcrumbs/metadata.json +16 -0
- package/src/components/bs5/button/button.stories.js +13 -5
- package/src/components/bs5/button/metadata.json +15 -0
- package/src/components/bs5/callToAction/callToAction.stories.js +6 -5
- package/src/components/bs5/callToAction/metadata.json +15 -0
- package/src/components/bs5/callout/callout.stories.js +6 -5
- package/src/components/bs5/callout/metadata.json +16 -0
- package/src/components/bs5/card/card--icon-list-footer.stories.js +4 -4
- package/src/components/bs5/card/card--multi-action.stories.js +6 -0
- package/src/components/bs5/card/card--no-action.stories.js +7 -0
- package/src/components/bs5/card/card--single-action.stories.js +7 -0
- package/src/components/bs5/card/metadata.json +15 -0
- package/src/components/bs5/containerLayout/containerLayout.stories.js +6 -0
- package/src/components/bs5/containerLayout/metadata.json +1 -0
- package/src/components/bs5/contentFooter/contentFooter.stories.js +26 -20
- package/src/components/bs5/contentFooter/metadata.json +15 -0
- package/src/components/bs5/correctincorrect/correctincorrect.stories.js +53 -38
- package/src/components/bs5/correctincorrect/metadata.json +14 -0
- package/src/components/bs5/dateinput/Dateinput.stories.js +6 -0
- package/src/components/bs5/dateinput/metadata.json +14 -0
- package/src/components/bs5/directionLinks/directionLinks.hbs +0 -1
- package/src/components/bs5/directionLinks/directionLinks.stories.js +4 -4
- package/src/components/bs5/directionLinks/metadata.json +16 -0
- package/src/components/bs5/footer/footer.stories.js +7 -1
- package/src/components/bs5/footer/metadata.json +15 -0
- package/src/components/bs5/formcheck/metadata.json +15 -0
- package/src/components/bs5/formcheck/stories/checkbox/checkbox.stories.js +5 -1
- package/src/components/bs5/formcheck/stories/radio/radio.stories.js +12 -1
- package/src/components/bs5/globalAlert/globalAlert.stories.js +9 -0
- package/src/components/bs5/globalAlert/metadata.json +15 -0
- package/src/components/bs5/head/head.stories.js +33 -14
- package/src/components/bs5/header/header.stories.js +10 -0
- package/src/components/bs5/header/metadata.json +15 -0
- package/src/components/bs5/icons/icons.stories.js +5 -0
- package/src/components/bs5/icons/metadata.json +15 -0
- package/src/components/bs5/image/image.stories.js +9 -0
- package/src/components/bs5/image/metadata.json +15 -0
- package/src/components/bs5/inpageAlert/inpageAlert.stories.js +9 -2
- package/src/components/bs5/inpageAlert/metadata.json +15 -0
- package/src/components/bs5/inpagenav/inpagenav.stories.js +8 -1
- package/src/components/bs5/inpagenav/metadata.json +15 -0
- package/src/components/bs5/link/link.stories.js +5 -5
- package/src/components/bs5/link/metadata.json +15 -0
- package/src/components/bs5/linkColumns/linkColumns.stories.js +4 -4
- package/src/components/bs5/linkColumns/metadata.json +15 -0
- package/src/components/bs5/logo/logo.stories.js +40 -5
- package/src/components/bs5/logo/metadata.json +16 -0
- package/src/components/bs5/metaDcTerms/metaDcTerms.stories.js +14 -9
- package/src/components/bs5/metaOpenGraph/metaOpenGraph.stories.js +14 -9
- package/src/components/bs5/modal/metadata.json +15 -0
- package/src/components/bs5/modal/modal.stories.js +64 -60
- package/src/components/bs5/navbar/metadata.json +15 -0
- package/src/components/bs5/navbar/navbar.stories.js +9 -4
- package/src/components/bs5/pageLayout/metadata.json +1 -0
- package/src/components/bs5/pageLayout/pageLayout.stories.js +1 -0
- package/src/components/bs5/pagination/metadata.json +15 -0
- package/src/components/bs5/pagination/pagination.hbs +0 -7
- package/src/components/bs5/pagination/pagination.stories.js +5 -0
- package/src/components/bs5/promotionalPanel/metadata.json +15 -0
- package/src/components/bs5/promotionalPanel/promotionalPanel.stories.js +4 -4
- package/src/components/bs5/quickexit/metadata.json +15 -0
- package/src/components/bs5/quickexit/quickexit.stories.js +7 -0
- package/src/components/bs5/searchInput/metadata.json +15 -0
- package/src/components/bs5/searchInput/searchInput.stories.js +5 -0
- package/src/components/bs5/select/Select.stories.js +8 -1
- package/src/components/bs5/select/metadata.json +15 -0
- package/src/components/bs5/sidenav/metadata.json +15 -0
- package/src/components/bs5/sidenav/sidenav.data.json +1 -7
- package/src/components/bs5/sidenav/sidenav.scss +5 -6
- package/src/components/bs5/sidenav/sidenav.stories.js +5 -0
- package/src/components/bs5/skiplinks/skipLinks.stories.js +5 -0
- package/src/components/bs5/spinner/Spinner.stories.js +8 -0
- package/src/components/bs5/spinner/metadata.json +15 -0
- package/src/components/bs5/table/metadata.json +15 -0
- package/src/components/bs5/table/table.stories.js +139 -61
- package/src/components/bs5/tabs/metadata.json +15 -0
- package/src/components/bs5/tabs/tabs.stories.js +8 -0
- package/src/components/bs5/tag/metadata.json +15 -0
- package/src/components/bs5/tag/tag--large.stories.js +7 -0
- package/src/components/bs5/tag/tag--standard.stories.js +12 -5
- package/src/components/bs5/tag/tag--status.stories.js +4 -0
- package/src/components/bs5/tag/tag.stories.js +10 -0
- package/src/components/bs5/textarea/Textarea.stories.js +8 -1
- package/src/components/bs5/textarea/metadata.json +15 -0
- package/src/components/bs5/textbox/Textbox.stories.js +11 -1
- package/src/components/bs5/textbox/metadata.json +15 -0
- package/src/components/bs5/typography/metadata.json +1 -0
- package/src/components/bs5/typography/typography.stories.js +4 -0
- package/src/components/bs5/video/metadata.json +15 -0
- package/src/components/bs5/video/video.stories.js +5 -5
- package/src/components/common/focus-styles/focusStyles.stories.js +13 -9
- package/src/js/QGDSComponent.js +0 -1
- package/src/js/handlebars.helpers.js +1 -0
- package/src/stories/Introduction/development.mdx +136 -0
- package/src/stories/Introduction/how-to-use.mdx +272 -0
- package/src/stories/Introduction.mdx +95 -13
- package/src/{components/bs5/accordion/Accordion.mdx → stories/archive/__Accordion.mdx} +3 -3
- package/src/stories/archive/__Blockquote.mdx +13 -0
- package/src/stories/archive/__BlockquoteCanvas.mdx +47 -0
- package/src/stories/archive/__backToTop.orig.mdx +13 -0
- package/src/stories/archive/__blockquote.stories.bak.js +132 -0
- package/src/stories/component-list.json +627 -0
- package/src/templates/data/component.metadata.template.json +15 -0
- package/src/templates/index.html +40 -37
- /package/src/{components/bs5/banner/Banner.mdx → stories/archive/__Banner.mdx} +0 -0
- /package/src/{components/bs5/blockquote/Blockquote.mdx → stories/archive/__Blockquote.bak.mdx} +0 -0
- /package/src/{components/bs5/breadcrumbs/Breadcrumbs.mdx → stories/archive/__Breadcrumbs.mdx} +0 -0
- /package/src/{components/bs5/button/Button.mdx → stories/archive/__Button.mdx} +0 -0
- /package/src/{components/bs5/callout/Callout.mdx → stories/archive/__Callout.mdx} +0 -0
- /package/src/{components/bs5/card/Card.mdx → stories/archive/__Card.mdx} +0 -0
- /package/src/{components/bs5/formcheck/stories/checkbox/Checkbox.mdx → stories/archive/__Checkbox.mdx} +0 -0
- /package/src/{components/bs5/dateinput/Dateinput.mdx → stories/archive/__Dateinput.mdx} +0 -0
- /package/src/{components/bs5/directionLinks/DirectionLinks.mdx → stories/archive/__DirectionLinks.mdx} +0 -0
- /package/src/{components/bs5/footer/Footer.mdx → stories/archive/__Footer.mdx} +0 -0
- /package/src/{components/bs5/globalAlert/GlobalAlert.mdx → stories/archive/__GlobalAlert.mdx} +0 -0
- /package/src/{components/bs5/header/Header.mdx → stories/archive/__Header.mdx} +0 -0
- /package/src/{components/bs5/image/Image.mdx → stories/archive/__Image.mdx} +0 -0
- /package/src/{components/bs5/inpageAlert/InpageAlert.mdx → stories/archive/__InpageAlert.mdx} +0 -0
- /package/src/{components/bs5/inpagenav/Inpagenav.mdx → stories/archive/__Inpagenav.mdx} +0 -0
- /package/src/{components/bs5/logo/Logo.mdx → stories/archive/__Logo.mdx} +0 -0
- /package/src/{components/bs5/modal/Modal.mdx → stories/archive/__Modal.mdx} +0 -0
- /package/src/{components/bs5/pagination/Pagination.mdx → stories/archive/__Pagination.mdx} +0 -0
- /package/src/{components/bs5/promotionalPanel/PromotionalPanel.mdx → stories/archive/__PromotionalPanel.mdx} +0 -0
- /package/src/{components/bs5/formcheck/stories/radio/Radio.mdx → stories/archive/__Radio.mdx} +0 -0
- /package/src/{components/bs5/searchInput/SearchInput.mdx → stories/archive/__SearchInput.mdx} +0 -0
- /package/src/{components/bs5/sidenav/Sidenav.mdx → stories/archive/__Sidenav.mdx} +0 -0
- /package/src/{components/bs5/skiplinks/SkipLinks.mdx → stories/archive/__SkipLinks.mdx} +0 -0
- /package/src/{components/bs5/table/Table.mdx → stories/archive/__Table.mdx} +0 -0
- /package/src/{components/bs5/tabs/Tabs.mdx → stories/archive/__Tabs.mdx} +0 -0
- /package/src/{components/bs5/tag/Tag.mdx → stories/archive/__Tag.mdx} +0 -0
- /package/src/{components/bs5/typography/Typography.mdx → stories/archive/__Typography.mdx} +0 -0
- /package/src/{components/bs5/video/Video.mdx → stories/archive/__Video.mdx} +0 -0
- /package/src/{components/bs5/backToTop/backToTop.mdx → stories/archive/__backToTop.mdx} +0 -0
- /package/src/{components/bs5/callToAction/callToAction.mdx → stories/archive/__callToAction.mdx} +0 -0
- /package/src/{components/bs5/accordion/mdx/_designResources.mdx → stories/archive/__designResources.mdx} +0 -0
- /package/src/{components/bs5/link/link.mdx → stories/archive/__link.mdx} +0 -0
- /package/src/{components/bs5/linkColumns/linkColumns.mdx → stories/archive/__linkColumns.mdx} +0 -0
- /package/src/{components/bs5/accordion/mdx/_usageInstructions.mdx → stories/archive/__usageInstructions.mdx} +0 -0
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
// ComponentExample.stories.js
|
|
2
2
|
import { Table } from "./Table.js";
|
|
3
3
|
import defaultdata from "./table.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
tags: ["autodocs", "extended"],
|
|
7
8
|
title: "3. Components/Table",
|
|
8
9
|
render: (args) => {
|
|
9
|
-
|
|
10
|
-
//Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
|
|
10
|
+
//Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
|
|
11
11
|
//We can't use commas on our class="..." attribute, so we need to replace the commas with spaces.
|
|
12
|
-
if(
|
|
13
|
-
args.variantClass = args.variantClass.replaceAll(","," ");
|
|
14
|
-
} else if (
|
|
12
|
+
if (typeof args.variantClass === "string") {
|
|
13
|
+
args.variantClass = args.variantClass.replaceAll(",", " ");
|
|
14
|
+
} else if (typeof args.variantClass === "object") {
|
|
15
15
|
args.variantClass = args.variantClass.join(" ");
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
return new Table(args).html;
|
|
19
|
-
|
|
20
19
|
},
|
|
21
20
|
|
|
22
21
|
//https://storybook.js.org/docs/api/arg-types
|
|
@@ -31,10 +30,7 @@ export default {
|
|
|
31
30
|
"table-striped": "Striped",
|
|
32
31
|
},
|
|
33
32
|
},
|
|
34
|
-
options: [
|
|
35
|
-
"table-dark",
|
|
36
|
-
"table-striped",
|
|
37
|
-
],
|
|
33
|
+
options: ["table-dark", "table-striped"],
|
|
38
34
|
},
|
|
39
35
|
|
|
40
36
|
caption: {
|
|
@@ -52,15 +48,13 @@ export default {
|
|
|
52
48
|
type: "text",
|
|
53
49
|
},
|
|
54
50
|
},
|
|
55
|
-
|
|
56
51
|
},
|
|
57
52
|
|
|
58
53
|
parameters: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// },
|
|
54
|
+
coderefs: {
|
|
55
|
+
metadata,
|
|
56
|
+
partialname: "table", //{{> table }}
|
|
57
|
+
},
|
|
64
58
|
docs: {
|
|
65
59
|
controls: {
|
|
66
60
|
exclude: ["headers", "rows", "footer"],
|
|
@@ -70,12 +64,12 @@ export default {
|
|
|
70
64
|
};
|
|
71
65
|
|
|
72
66
|
/**
|
|
73
|
-
*
|
|
67
|
+
*
|
|
74
68
|
* For data tables with a small amount of rows use the default table:
|
|
75
69
|
* - Align text columns and corresponding data cells to the left
|
|
76
70
|
* - When comparing numbers in a column, align data cells and column headers to the right
|
|
77
71
|
* - For data tables with more rows, use the striped alternative
|
|
78
|
-
*
|
|
72
|
+
*
|
|
79
73
|
* Example full table including headers, rows and footer, caption and subcaption
|
|
80
74
|
*/
|
|
81
75
|
export const Default = {
|
|
@@ -87,49 +81,44 @@ export const Default = {
|
|
|
87
81
|
*/
|
|
88
82
|
|
|
89
83
|
export const Striped = {
|
|
90
|
-
args: {
|
|
84
|
+
args: {
|
|
91
85
|
...defaultdata,
|
|
92
|
-
...{variantClass: "table-striped"},
|
|
86
|
+
...{ variantClass: "table-striped" },
|
|
93
87
|
},
|
|
94
88
|
};
|
|
95
|
-
|
|
96
89
|
|
|
97
90
|
/**
|
|
98
91
|
* Also known as: Quiet Table
|
|
99
|
-
*
|
|
92
|
+
*
|
|
100
93
|
* When seeking to integrate and expand the information that accompanies a text, a borderless table can prove advantageous. It imparts a sense of continuity and cohesion, making the data feel more seamlessly integrated with the surrounding text.
|
|
101
94
|
*/
|
|
102
95
|
|
|
103
96
|
export const Borderless = {
|
|
104
|
-
args: {
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
args: {
|
|
98
|
+
...defaultdata,
|
|
99
|
+
...{ customClass: "qld-table--borderless" },
|
|
107
100
|
},
|
|
108
101
|
};
|
|
109
102
|
|
|
110
|
-
|
|
111
103
|
/**
|
|
112
104
|
* Table with row hover <code>.table-hover</code>
|
|
113
105
|
*/
|
|
114
106
|
export const WithHover = {
|
|
115
|
-
args: {
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
args: {
|
|
108
|
+
...defaultdata,
|
|
109
|
+
...{ variantClass: "table-hover" },
|
|
118
110
|
},
|
|
119
111
|
};
|
|
120
112
|
|
|
121
|
-
|
|
122
|
-
|
|
123
113
|
/**
|
|
124
114
|
* Alternate (Dark) table. <code>.table-dark</code>
|
|
125
115
|
*/
|
|
126
116
|
export const Dark = {
|
|
127
117
|
args: {
|
|
128
118
|
...defaultdata,
|
|
129
|
-
...{variantClass: "table-dark"},
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
119
|
+
...{ variantClass: "table-dark" },
|
|
120
|
+
},
|
|
121
|
+
};
|
|
133
122
|
|
|
134
123
|
/**
|
|
135
124
|
* Alternate (Dark) table. <code>.table-dark .table-hover</code>
|
|
@@ -137,10 +126,9 @@ export const Dark = {
|
|
|
137
126
|
export const DarkWithHover = {
|
|
138
127
|
args: {
|
|
139
128
|
...defaultdata,
|
|
140
|
-
...{ variantClass: ["table-dark","table-hover"] },
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
129
|
+
...{ variantClass: ["table-dark", "table-hover"] },
|
|
130
|
+
},
|
|
131
|
+
};
|
|
144
132
|
|
|
145
133
|
/**
|
|
146
134
|
* Responsive table example <code>.table-responsive</code>
|
|
@@ -159,32 +147,122 @@ export const Responsive = {
|
|
|
159
147
|
],
|
|
160
148
|
args: {
|
|
161
149
|
...defaultdata,
|
|
162
|
-
...{
|
|
163
|
-
|
|
164
|
-
"Header",
|
|
165
|
-
"Header",
|
|
166
|
-
"Header",
|
|
167
|
-
"Header",
|
|
168
|
-
"Header",
|
|
169
|
-
"Header",
|
|
170
|
-
"Header",
|
|
171
|
-
"Header",
|
|
150
|
+
...{
|
|
151
|
+
headers: [
|
|
152
|
+
"Header",
|
|
153
|
+
"Header",
|
|
154
|
+
"Header",
|
|
155
|
+
"Header",
|
|
156
|
+
"Header",
|
|
157
|
+
"Header",
|
|
158
|
+
"Header",
|
|
159
|
+
"Header",
|
|
172
160
|
"Header",
|
|
173
161
|
"Header",
|
|
174
162
|
"Header",
|
|
175
163
|
"Header",
|
|
176
164
|
],
|
|
177
|
-
|
|
178
|
-
{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
165
|
+
rows: [
|
|
166
|
+
{
|
|
167
|
+
cells: [
|
|
168
|
+
"Cell",
|
|
169
|
+
"Longer cell",
|
|
170
|
+
"Cell",
|
|
171
|
+
"Cell",
|
|
172
|
+
"Longer cell",
|
|
173
|
+
"Cell",
|
|
174
|
+
"Cell",
|
|
175
|
+
"Cell",
|
|
176
|
+
"Cell",
|
|
177
|
+
"Cell",
|
|
178
|
+
"Longer Cell",
|
|
179
|
+
"Cell",
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
cells: [
|
|
184
|
+
"Cell",
|
|
185
|
+
"Longer cell",
|
|
186
|
+
"Cell",
|
|
187
|
+
"Cell",
|
|
188
|
+
"Longer cell",
|
|
189
|
+
"Cell",
|
|
190
|
+
"Cell",
|
|
191
|
+
"Cell",
|
|
192
|
+
"Cell",
|
|
193
|
+
"Cell",
|
|
194
|
+
"Longer Cell",
|
|
195
|
+
"Cell",
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
cells: [
|
|
200
|
+
"Cell",
|
|
201
|
+
"Longer cell",
|
|
202
|
+
"Cell",
|
|
203
|
+
"Cell",
|
|
204
|
+
"Longer cell",
|
|
205
|
+
"Cell",
|
|
206
|
+
"Cell",
|
|
207
|
+
"Cell",
|
|
208
|
+
"Cell",
|
|
209
|
+
"Cell",
|
|
210
|
+
"Longer Cell",
|
|
211
|
+
"Cell",
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
cells: [
|
|
216
|
+
"Cell",
|
|
217
|
+
"Longer cell",
|
|
218
|
+
"Cell",
|
|
219
|
+
"Cell",
|
|
220
|
+
"Longer cell",
|
|
221
|
+
"Cell",
|
|
222
|
+
"Cell",
|
|
223
|
+
"Cell",
|
|
224
|
+
"Cell",
|
|
225
|
+
"Cell",
|
|
226
|
+
"Longer Cell",
|
|
227
|
+
"Cell",
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
cells: [
|
|
232
|
+
"Cell",
|
|
233
|
+
"Longer cell",
|
|
234
|
+
"Cell",
|
|
235
|
+
"Cell",
|
|
236
|
+
"Longer cell",
|
|
237
|
+
"Cell",
|
|
238
|
+
"Cell",
|
|
239
|
+
"Cell",
|
|
240
|
+
"Cell",
|
|
241
|
+
"Cell",
|
|
242
|
+
"Longer Cell",
|
|
243
|
+
"Cell",
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
cells: [
|
|
248
|
+
"Cell",
|
|
249
|
+
"Longer cell",
|
|
250
|
+
"Cell",
|
|
251
|
+
"Cell",
|
|
252
|
+
"Longer cell",
|
|
253
|
+
"Cell",
|
|
254
|
+
"Cell",
|
|
255
|
+
"Cell",
|
|
256
|
+
"Cell",
|
|
257
|
+
"Cell",
|
|
258
|
+
"Longer Cell",
|
|
259
|
+
"Cell",
|
|
260
|
+
],
|
|
261
|
+
},
|
|
184
262
|
],
|
|
185
|
-
|
|
263
|
+
footer: [
|
|
186
264
|
{
|
|
187
|
-
|
|
265
|
+
cells: [
|
|
188
266
|
"Footer",
|
|
189
267
|
"Footer",
|
|
190
268
|
"Footer",
|
|
@@ -201,6 +279,6 @@ export const Responsive = {
|
|
|
201
279
|
},
|
|
202
280
|
],
|
|
203
281
|
},
|
|
204
|
-
...{ variantClass: ["table-striped","table-hover"] },
|
|
205
|
-
|
|
206
|
-
}
|
|
282
|
+
...{ variantClass: ["table-striped", "table-hover"] },
|
|
283
|
+
},
|
|
284
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "qgds-tab",
|
|
3
|
+
"title": "Tabs",
|
|
4
|
+
"title_uikit": "Tabs",
|
|
5
|
+
"type": "Component",
|
|
6
|
+
"scope": "Core",
|
|
7
|
+
"group": "",
|
|
8
|
+
"status": "Published",
|
|
9
|
+
"synonyms": [],
|
|
10
|
+
"description": "",
|
|
11
|
+
"refs": {
|
|
12
|
+
"uikit": "https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=25951-236134&p=f&t=1PNeXYXdepnDeW4g-0",
|
|
13
|
+
"website": "https://www.designsystem.qld.gov.au/components/tags"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// ComponentExample.stories.js
|
|
2
2
|
import { Tabs } from "./tabs.js";
|
|
3
3
|
import defaultdata from "./tabs.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
// Generate argTypes for tab items dynamically
|
|
6
7
|
const generateTabItemArgTypes = () => {
|
|
@@ -71,6 +72,13 @@ export default {
|
|
|
71
72
|
// Dynamically generated tab item controls
|
|
72
73
|
...generateTabItemArgTypes(),
|
|
73
74
|
},
|
|
75
|
+
|
|
76
|
+
parameters: {
|
|
77
|
+
coderefs: {
|
|
78
|
+
metadata,
|
|
79
|
+
partialname: "tabs", //{{> tabs }}
|
|
80
|
+
},
|
|
81
|
+
},
|
|
74
82
|
};
|
|
75
83
|
|
|
76
84
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "qgds-tag",
|
|
3
|
+
"title": "Tags",
|
|
4
|
+
"title_uikit": "Tags",
|
|
5
|
+
"type": "Component",
|
|
6
|
+
"scope": "Core",
|
|
7
|
+
"group": "",
|
|
8
|
+
"status": "Published",
|
|
9
|
+
"synonyms": [],
|
|
10
|
+
"description": "",
|
|
11
|
+
"refs": {
|
|
12
|
+
"uikit": "https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=5702-89540&t=loDOHfqaVy8bH9Qa-0",
|
|
13
|
+
"website": "https://www.designsystem.qld.gov.au/components/input-fields-text-box-and-area"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// tag--large.stories.js
|
|
2
2
|
import { Tag } from "./Tag.js";
|
|
3
3
|
import defaultdata from "./tag.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
tags: ["autodocs"],
|
|
@@ -21,6 +22,12 @@ export default {
|
|
|
21
22
|
options: ["tag-default", "tag-alt", "tag-dark", "tag-dark-alt"],
|
|
22
23
|
},
|
|
23
24
|
},
|
|
25
|
+
parameters: {
|
|
26
|
+
coderefs: {
|
|
27
|
+
metadata,
|
|
28
|
+
partialname: "tag", //{{> tag }}
|
|
29
|
+
},
|
|
30
|
+
},
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
// Large Tag story
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// tag--standard.stories.js
|
|
2
|
-
import { Tag } from
|
|
3
|
-
import defaultdata from
|
|
2
|
+
import { Tag } from "./Tag.js";
|
|
3
|
+
import defaultdata from "./tag.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
|
-
tags: [
|
|
7
|
-
title:
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
title: "3. Components/Tag/Standard",
|
|
8
9
|
render: (args) => new Tag(args).html,
|
|
9
10
|
argTypes: {
|
|
10
11
|
variant: {
|
|
@@ -21,6 +22,12 @@ export default {
|
|
|
21
22
|
options: ["tag-default", "tag-alt", "tag-dark", "tag-dark-alt"],
|
|
22
23
|
},
|
|
23
24
|
},
|
|
25
|
+
parameters: {
|
|
26
|
+
coderefs: {
|
|
27
|
+
metadata,
|
|
28
|
+
partialname: "tag", //{{> tag }}
|
|
29
|
+
},
|
|
30
|
+
},
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
// Default Tag story
|
|
@@ -36,4 +43,4 @@ export const Information = {
|
|
|
36
43
|
// Action Tag story
|
|
37
44
|
export const Action = {
|
|
38
45
|
args: defaultdata.action,
|
|
39
|
-
};
|
|
46
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// tag--status.stories.js
|
|
2
2
|
import { Tag } from "./Tag.js";
|
|
3
3
|
import defaultdata from "./tag.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
const sizes = {
|
|
6
7
|
"": "Small (Default)",
|
|
@@ -94,5 +95,8 @@ export const AllStatusVariantsInDefaultMode = {
|
|
|
94
95
|
controls: {
|
|
95
96
|
disable: true,
|
|
96
97
|
},
|
|
98
|
+
coderefs: {
|
|
99
|
+
show: false,
|
|
100
|
+
},
|
|
97
101
|
},
|
|
98
102
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Tag.stories.js
|
|
2
2
|
import { Tag } from "./Tag.js";
|
|
3
3
|
import defaultdata from "./tag.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
tags: ["autodocs"],
|
|
@@ -28,6 +29,12 @@ export default {
|
|
|
28
29
|
],
|
|
29
30
|
},
|
|
30
31
|
},
|
|
32
|
+
parameters: {
|
|
33
|
+
coderefs: {
|
|
34
|
+
metadata,
|
|
35
|
+
partialname: "tag", //{{> tag }}
|
|
36
|
+
},
|
|
37
|
+
},
|
|
31
38
|
};
|
|
32
39
|
|
|
33
40
|
// Default Tag story
|
|
@@ -106,5 +113,8 @@ export const ParentContextComparison = {
|
|
|
106
113
|
controls: {
|
|
107
114
|
disable: true,
|
|
108
115
|
},
|
|
116
|
+
coderefs: {
|
|
117
|
+
show: false,
|
|
118
|
+
},
|
|
109
119
|
},
|
|
110
120
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// ComponentExample.stories.js
|
|
2
2
|
import { Textarea, argTypes } from "./Textarea.js";
|
|
3
3
|
import defaultdata from "./textarea.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
tags: ["autodocs"],
|
|
@@ -17,7 +18,13 @@ export default {
|
|
|
17
18
|
|
|
18
19
|
return new Textarea(args).html;
|
|
19
20
|
},
|
|
20
|
-
parameters: {
|
|
21
|
+
parameters: {
|
|
22
|
+
coderefs: {
|
|
23
|
+
metadata,
|
|
24
|
+
partialname: "textarea",
|
|
25
|
+
},
|
|
26
|
+
backgrounds: { disable: false },
|
|
27
|
+
},
|
|
21
28
|
globals: { backgrounds: { value: "default" } },
|
|
22
29
|
//https://storybook.js.org/docs/api/arg-types
|
|
23
30
|
argTypes,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "qgds-textarea",
|
|
3
|
+
"title": "Text area",
|
|
4
|
+
"title_uikit": "Input fields (Text-box and Text-area)",
|
|
5
|
+
"type": "Component",
|
|
6
|
+
"scope": "Core",
|
|
7
|
+
"group": "Forms",
|
|
8
|
+
"status": "Published",
|
|
9
|
+
"synonyms": [],
|
|
10
|
+
"description": "",
|
|
11
|
+
"refs": {
|
|
12
|
+
"uikit": "https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=5990-97997&p=f&t=1PNeXYXdepnDeW4g-0",
|
|
13
|
+
"website": "https://www.designsystem.qld.gov.au/components/input-fields-text-box-and-area"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// ComponentExample.stories.js
|
|
2
2
|
import { Textbox, argTypes } from "./Textbox.js";
|
|
3
3
|
import defaultdata from "./textbox.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
tags: ["autodocs"],
|
|
@@ -17,7 +18,16 @@ export default {
|
|
|
17
18
|
|
|
18
19
|
return new Textbox(args).html;
|
|
19
20
|
},
|
|
20
|
-
parameters: {
|
|
21
|
+
parameters: {
|
|
22
|
+
coderefs: {
|
|
23
|
+
metadata,
|
|
24
|
+
partialname: "textbox",
|
|
25
|
+
tabs: {
|
|
26
|
+
notes: `Note: The partial name for this component is \`textbox\`. Refer the "Use" tab for more.`,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
backgrounds: { disable: false },
|
|
30
|
+
},
|
|
21
31
|
globals: { backgrounds: { value: "default" } },
|
|
22
32
|
//https://storybook.js.org/docs/api/arg-types
|
|
23
33
|
argTypes,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "qgds-textinput",
|
|
3
|
+
"title": "Text input",
|
|
4
|
+
"title_uikit": "Input fields (Text-box and Text-area)",
|
|
5
|
+
"type": "Component",
|
|
6
|
+
"scope": "Core",
|
|
7
|
+
"group": "Forms",
|
|
8
|
+
"status": "Published",
|
|
9
|
+
"synonyms": [],
|
|
10
|
+
"description": "",
|
|
11
|
+
"refs": {
|
|
12
|
+
"uikit": "https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=5990-97997&p=f&t=1PNeXYXdepnDeW4g-0",
|
|
13
|
+
"website": ""
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// typography.stories.js
|
|
2
2
|
// import { Typography } from "./Typography.js";
|
|
3
3
|
// import defaultdata from "./typography.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
tags: ["autodocs"],
|
|
@@ -69,6 +70,9 @@ export default {
|
|
|
69
70
|
},
|
|
70
71
|
],
|
|
71
72
|
backgrounds: { disable: false },
|
|
73
|
+
coderefs: {
|
|
74
|
+
show: false,
|
|
75
|
+
},
|
|
72
76
|
},
|
|
73
77
|
globals: { backgrounds: { value: "default" } },
|
|
74
78
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "qgds-video",
|
|
3
|
+
"title": "Video player",
|
|
4
|
+
"title_uikit": "Video player",
|
|
5
|
+
"type": "Component",
|
|
6
|
+
"scope": "Extended",
|
|
7
|
+
"group": "",
|
|
8
|
+
"status": "Published",
|
|
9
|
+
"synonyms": [],
|
|
10
|
+
"description": "",
|
|
11
|
+
"refs": {
|
|
12
|
+
"uikit": "https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=13297-214065&p=f&t=1PNeXYXdepnDeW4g-0",
|
|
13
|
+
"website": ""
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// video.stories.js
|
|
2
2
|
import { Video } from "./Video.js";
|
|
3
3
|
import defaultdata from "./video.data.json";
|
|
4
|
+
import metadata from "./metadata.json";
|
|
4
5
|
|
|
5
6
|
// include accordion for transcript
|
|
6
7
|
import { Accordion } from "../accordion/Accordion.js";
|
|
@@ -76,11 +77,10 @@ export default {
|
|
|
76
77
|
* @property {string} design.url - URL of the design parameter.
|
|
77
78
|
*/
|
|
78
79
|
parameters: {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// },
|
|
80
|
+
coderefs: {
|
|
81
|
+
metadata,
|
|
82
|
+
partialname: "video", //{{> video }}
|
|
83
|
+
},
|
|
84
84
|
controls: {
|
|
85
85
|
exclude: ["transcriptAccordion"],
|
|
86
86
|
},
|
|
@@ -19,6 +19,16 @@ const cardArgs = cardData.singleAction;
|
|
|
19
19
|
export default {
|
|
20
20
|
title: "1. Core Styles/Focus Styles",
|
|
21
21
|
tags: ["autodocs"],
|
|
22
|
+
|
|
23
|
+
render: (args) => {
|
|
24
|
+
return `<div class="p-24 ${args.paletteClass || ""}" style="display: flex; gap: 48px; align-items: flex-start">
|
|
25
|
+
<a href=javascript:void()" class="${args.utilityClass || ""}">Here is a link</a>
|
|
26
|
+
${new Button({ ...buttonArgs, variantClass: `${buttonArgs.variantClass} ${args.utilityClass || ""}` }).html}
|
|
27
|
+
${new Card({ ...cardArgs, variantClass: `${args.cardPaletteClass} ${args.utilityClass || ""}` }).html}
|
|
28
|
+
</div>
|
|
29
|
+
`;
|
|
30
|
+
},
|
|
31
|
+
|
|
22
32
|
argTypes: {
|
|
23
33
|
utilityClass: {
|
|
24
34
|
description:
|
|
@@ -35,15 +45,9 @@ export default {
|
|
|
35
45
|
options: ["default", "light", "alt", "dark", "dark-alt"],
|
|
36
46
|
},
|
|
37
47
|
},
|
|
38
|
-
parameters: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return `<div class="p-24 ${args.paletteClass || ""}" style="display: flex; gap: 48px; align-items: flex-start">
|
|
42
|
-
<a href=javascript:void()" class="${args.utilityClass || ""}">Here is a link</a>
|
|
43
|
-
${new Button({ ...buttonArgs, variantClass: `${buttonArgs.variantClass} ${args.utilityClass || ""}` }).html}
|
|
44
|
-
${new Card({ ...cardArgs, variantClass: `${args.cardPaletteClass} ${args.utilityClass || ""}` }).html}
|
|
45
|
-
</div>
|
|
46
|
-
`;
|
|
48
|
+
parameters: {
|
|
49
|
+
layout: "fullscreen",
|
|
50
|
+
coderefs: { show: false },
|
|
47
51
|
},
|
|
48
52
|
};
|
|
49
53
|
|
package/src/js/QGDSComponent.js
CHANGED
|
@@ -60,6 +60,7 @@ function cond(v1, operator, v2) {
|
|
|
60
60
|
|
|
61
61
|
export default function handlebarsHelpers(handlebars) {
|
|
62
62
|
// contains - if first object is in collection (second object) to return true
|
|
63
|
+
// example: {{#contains "needle" "haystack, needle, something"}} do something {{/contains}}
|
|
63
64
|
handlebars.registerHelper("contains", function (needle, haystack, options) {
|
|
64
65
|
needle = handlebars.escapeExpression(needle);
|
|
65
66
|
haystack = handlebars.escapeExpression(haystack);
|