@qld-gov-au/qgds-bootstrap5 2.0.5 → 2.0.7
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/.storybook/README.md +10 -0
- package/.storybook/dynamicThemeDecorator.js +28 -24
- package/.storybook/{main.js → main.mjs} +8 -7
- package/.storybook/modes.js +3 -12
- package/.storybook/preview.js +14 -11
- package/dist/assets/components/bs5/head/head.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/css/qld.bootstrap.legacy.css +2 -0
- package/dist/assets/css/qld.bootstrap.legacy.css.map +7 -0
- package/dist/assets/js/handlebars.init.min.js +1 -1
- package/dist/assets/js/handlebars.partials.js +2398 -136
- package/dist/assets/js/handlebars.partials.js.map +7 -0
- package/dist/assets/node/handlebars.init.min.js +1 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/package.json +25 -27
- package/dist/sample-data/correctincorrect/correctincorrect.data.json +1 -0
- package/dist/sample-data/tabs/tabs.data.json +1 -2
- package/dist/sample-data/typography/typography.data.json +1 -0
- package/esbuild.js +22 -5
- package/package.json +25 -27
- package/pom.xml +3 -3
- package/src/components/bs5/accordion/Accordion.mdx +1 -1
- package/src/components/bs5/accordion/accordion.scss +3 -3
- 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/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.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/button.scss +25 -45
- 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 +14 -39
- 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 +5 -5
- 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.scss +3 -7
- 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.mdx +1 -1
- package/src/components/bs5/header/header.stories.js +1 -30
- 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.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/logo/Logo.mdx +1 -1
- 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/pagination/Pagination.mdx +1 -1
- package/src/components/bs5/pagination/manifest.json +1 -0
- package/src/components/bs5/pagination/pagination.scss +290 -274
- package/src/components/bs5/pagination/pagination.stories.js +22 -46
- package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +1 -1
- package/src/components/bs5/quickexit/manifest.json +1 -0
- package/src/components/bs5/searchInput/SearchInput.mdx +1 -1
- package/src/components/bs5/searchInput/manifest.json +1 -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/textarea/manifest.json +1 -0
- package/src/components/bs5/textbox/manifest.json +1 -0
- package/src/components/bs5/textbox/textInput.scss +55 -39
- 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.scss +41 -27
- package/src/components/bs5/video/video.stories.js +6 -24
- package/src/css/main.legacy.scss +19 -0
- package/src/css/main.scss +17 -0
- package/src/css/qld-print.scss +426 -304
- package/src/css/qld-tokens-legacy.scss +94 -0
- package/src/css/qld-tokens.scss +92 -77
- package/src/css/qld-variables.scss +37 -30
- package/src/stories/Introduction.mdx +1 -1
- package/vite.config.js +17 -0
- package/.eslintrc.cjs +0 -52
- 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/css/main.masterbrand.scss +0 -137
- package/src/css/themes/masterbrand.scss +0 -109
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
// 1. Palette colours
|
|
8
8
|
// ------------------------------------------------------------------------------------------------------------------
|
|
9
9
|
// Default palette
|
|
10
|
-
--#{$prefix}footer-color-crest-fill: var(
|
|
11
|
-
--#{$prefix}color-default-color-light-crest-fill
|
|
12
|
-
);
|
|
10
|
+
--#{$prefix}footer-color-crest-fill: var(--#{$prefix}-neutral-black);
|
|
13
11
|
--#{$prefix}footer-color-border: var(
|
|
14
12
|
--#{$prefix}color-default-color-light-border-default
|
|
15
13
|
);
|
|
@@ -35,11 +33,9 @@
|
|
|
35
33
|
--#{$prefix}footer-color-background: var(
|
|
36
34
|
--#{$prefix}color-default-color-light-background-default
|
|
37
35
|
);
|
|
38
|
-
--#{$prefix}footer-color-alt-button: var(
|
|
39
|
-
--#{$prefix}core-default-color-brand-secondary-darkgreen
|
|
40
|
-
);
|
|
36
|
+
--#{$prefix}footer-color-alt-button: var(--#{$prefix}light-action-secondary);
|
|
41
37
|
--#{$prefix}footer-color-alt-button__hover: var(
|
|
42
|
-
--#{$prefix}
|
|
38
|
+
--#{$prefix}light-action-secondary-hover
|
|
43
39
|
);
|
|
44
40
|
--#{$prefix}footer-color-social-icon: #{$core-default-color-neutral-black};
|
|
45
41
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -1,35 +1,27 @@
|
|
|
1
1
|
// FormcheckCheckbox.stories.js
|
|
2
|
-
import { Formcheck } from
|
|
3
|
-
import defaultdata from
|
|
2
|
+
import { Formcheck } from "../../Formcheck.js";
|
|
3
|
+
import defaultdata from "./checkbox.data.json";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
tags: [
|
|
7
|
-
title:
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
title: "3. Components/Forms/Checkbox",
|
|
8
8
|
render: (args) => {
|
|
9
|
-
return `${new Formcheck(args).html}
|
|
9
|
+
return `${new Formcheck(args).html}`;
|
|
10
10
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
globals: { backgrounds: { value: "default" } },
|
|
12
|
+
parameters: { backgrounds: { disable: false } },
|
|
13
|
+
//https://storybook.js.org/docs/api/arg-types
|
|
14
|
+
argTypes: {},
|
|
16
15
|
};
|
|
17
16
|
|
|
18
17
|
export const Default = {
|
|
19
|
-
args: {...defaultdata},
|
|
18
|
+
args: { ...defaultdata },
|
|
19
|
+
globals: { backgrounds: { value: "default" } },
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const CheckboxDark = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
parameters: {
|
|
26
|
-
backgrounds: {
|
|
27
|
-
default: 'Dark',
|
|
28
|
-
values: [
|
|
29
|
-
{ name: 'Dark', value: 'var(--qld-sapphire-blue)' },
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
},
|
|
23
|
+
args: { ...defaultdata },
|
|
24
|
+
globals: { backgrounds: { value: "dark" } },
|
|
33
25
|
decorators: [
|
|
34
26
|
(Story) => {
|
|
35
27
|
return `
|
|
@@ -42,7 +34,7 @@ export const CheckboxDark = {
|
|
|
42
34
|
};
|
|
43
35
|
|
|
44
36
|
export const CheckboxSmall = {
|
|
45
|
-
args: {...defaultdata, id: "checkboxSmall"},
|
|
37
|
+
args: { ...defaultdata, id: "checkboxSmall" },
|
|
46
38
|
decorators: [
|
|
47
39
|
(Story) => {
|
|
48
40
|
return `
|
|
@@ -55,15 +47,8 @@ export const CheckboxSmall = {
|
|
|
55
47
|
};
|
|
56
48
|
|
|
57
49
|
export const CheckboxSmallDark = {
|
|
58
|
-
args: {...defaultdata, id: "checkboxSmallDark"},
|
|
59
|
-
|
|
60
|
-
backgrounds: {
|
|
61
|
-
default: 'Dark',
|
|
62
|
-
values: [
|
|
63
|
-
{ name: 'Dark', value: 'var(--qld-sapphire-blue)' },
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
},
|
|
50
|
+
args: { ...defaultdata, id: "checkboxSmallDark" },
|
|
51
|
+
globals: { backgrounds: { value: "dark" } },
|
|
67
52
|
decorators: [
|
|
68
53
|
(Story) => {
|
|
69
54
|
return `
|
|
@@ -78,39 +63,32 @@ export const CheckboxSmallDark = {
|
|
|
78
63
|
};
|
|
79
64
|
|
|
80
65
|
export const CheckboxValid = {
|
|
81
|
-
args: {...defaultdata, id: "checkboxValid"},
|
|
66
|
+
args: { ...defaultdata, id: "checkboxValid" },
|
|
82
67
|
render: (args) => {
|
|
83
68
|
return `
|
|
84
69
|
<div class="valid">${new Formcheck(args).html}</div>
|
|
85
|
-
|
|
70
|
+
`;
|
|
86
71
|
},
|
|
87
|
-
}
|
|
72
|
+
};
|
|
88
73
|
|
|
89
74
|
export const CheckboxValidSmall = {
|
|
90
|
-
args: {...defaultdata, id: "checkboxValidSmall"},
|
|
75
|
+
args: { ...defaultdata, id: "checkboxValidSmall" },
|
|
91
76
|
render: (args) => {
|
|
92
77
|
return `
|
|
93
78
|
<div class="small"><div class="valid">${new Formcheck(args).html}</div></div>
|
|
94
|
-
|
|
79
|
+
`;
|
|
95
80
|
},
|
|
96
|
-
}
|
|
81
|
+
};
|
|
97
82
|
|
|
98
83
|
export const CheckboxValidDark = {
|
|
99
|
-
args: {...defaultdata, id: "checkboxValidDark"},
|
|
84
|
+
args: { ...defaultdata, id: "checkboxValidDark" },
|
|
100
85
|
render: (args) => {
|
|
101
86
|
return `
|
|
102
87
|
<div class="dark">
|
|
103
88
|
<div class="valid">${new Formcheck(args).html}</div></div>
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
parameters: {
|
|
107
|
-
backgrounds: {
|
|
108
|
-
default: 'Dark',
|
|
109
|
-
values: [
|
|
110
|
-
{ name: 'Dark', value: 'var(--qld-sapphire-blue)' },
|
|
111
|
-
],
|
|
112
|
-
},
|
|
89
|
+
`;
|
|
113
90
|
},
|
|
91
|
+
globals: { backgrounds: { value: "dark" } },
|
|
114
92
|
decorators: [
|
|
115
93
|
(Story) => {
|
|
116
94
|
return `
|
|
@@ -120,24 +98,17 @@ export const CheckboxValidDark = {
|
|
|
120
98
|
`;
|
|
121
99
|
},
|
|
122
100
|
],
|
|
123
|
-
}
|
|
101
|
+
};
|
|
124
102
|
|
|
125
103
|
export const CheckboxValidSmallDark = {
|
|
126
|
-
args: {...defaultdata, id: "checkboxValidSmallDark"},
|
|
104
|
+
args: { ...defaultdata, id: "checkboxValidSmallDark" },
|
|
127
105
|
render: (args) => {
|
|
128
106
|
return `
|
|
129
107
|
<div class="dark">
|
|
130
108
|
<div class="valid">${new Formcheck(args).html}</div></div>
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
parameters: {
|
|
134
|
-
backgrounds: {
|
|
135
|
-
default: 'Dark',
|
|
136
|
-
values: [
|
|
137
|
-
{ name: 'Dark', value: 'var(--qld-sapphire-blue)' },
|
|
138
|
-
],
|
|
139
|
-
},
|
|
109
|
+
`;
|
|
140
110
|
},
|
|
111
|
+
globals: { backgrounds: { value: "dark" } },
|
|
141
112
|
decorators: [
|
|
142
113
|
(Story) => {
|
|
143
114
|
return `
|
|
@@ -147,42 +118,35 @@ export const CheckboxValidSmallDark = {
|
|
|
147
118
|
`;
|
|
148
119
|
},
|
|
149
120
|
],
|
|
150
|
-
}
|
|
121
|
+
};
|
|
151
122
|
|
|
152
123
|
export const CheckboxInvalid = {
|
|
153
|
-
args: {...defaultdata, id: "checkboxInvalid"},
|
|
124
|
+
args: { ...defaultdata, id: "checkboxInvalid" },
|
|
154
125
|
render: (args) => {
|
|
155
126
|
return `
|
|
156
127
|
<div class="invalid">${new Formcheck(args).html}</div>
|
|
157
|
-
|
|
128
|
+
`;
|
|
158
129
|
},
|
|
159
|
-
}
|
|
130
|
+
};
|
|
160
131
|
|
|
161
132
|
export const CheckboxInvalidSmall = {
|
|
162
|
-
args: {...defaultdata, id: "checkboxInvalidSmall"},
|
|
133
|
+
args: { ...defaultdata, id: "checkboxInvalidSmall" },
|
|
163
134
|
render: (args) => {
|
|
164
135
|
return `
|
|
165
136
|
<div class="small"><div class="invalid">${new Formcheck(args).html}</div></div>
|
|
166
|
-
|
|
137
|
+
`;
|
|
167
138
|
},
|
|
168
|
-
}
|
|
139
|
+
};
|
|
169
140
|
|
|
170
141
|
export const CheckboxInvalidDark = {
|
|
171
|
-
args: {...defaultdata, id: "checkboxInvalidDark"},
|
|
142
|
+
args: { ...defaultdata, id: "checkboxInvalidDark" },
|
|
172
143
|
render: (args) => {
|
|
173
144
|
return `
|
|
174
145
|
<div class="dark">
|
|
175
146
|
<div class="invalid">${new Formcheck(args).html}</div></div>
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
parameters: {
|
|
179
|
-
backgrounds: {
|
|
180
|
-
default: 'Dark',
|
|
181
|
-
values: [
|
|
182
|
-
{ name: 'Dark', value: 'var(--qld-sapphire-blue)' },
|
|
183
|
-
],
|
|
184
|
-
},
|
|
147
|
+
`;
|
|
185
148
|
},
|
|
149
|
+
globals: { backgrounds: { value: "dark" } },
|
|
186
150
|
decorators: [
|
|
187
151
|
(Story) => {
|
|
188
152
|
return `
|
|
@@ -192,24 +156,17 @@ export const CheckboxInvalidDark = {
|
|
|
192
156
|
`;
|
|
193
157
|
},
|
|
194
158
|
],
|
|
195
|
-
}
|
|
159
|
+
};
|
|
196
160
|
|
|
197
161
|
export const CheckboxInvalidSmallDark = {
|
|
198
|
-
args: {...defaultdata, id: "checkboxInvalidSmallDark"},
|
|
162
|
+
args: { ...defaultdata, id: "checkboxInvalidSmallDark" },
|
|
199
163
|
render: (args) => {
|
|
200
164
|
return `
|
|
201
165
|
<div class="dark">
|
|
202
166
|
<div class="invalid">${new Formcheck(args).html}</div></div>
|
|
203
|
-
|
|
204
|
-
},
|
|
205
|
-
parameters: {
|
|
206
|
-
backgrounds: {
|
|
207
|
-
default: 'Dark',
|
|
208
|
-
values: [
|
|
209
|
-
{ name: 'Dark', value: 'var(--qld-sapphire-blue)' },
|
|
210
|
-
],
|
|
211
|
-
},
|
|
167
|
+
`;
|
|
212
168
|
},
|
|
169
|
+
globals: { backgrounds: { value: "dark" } },
|
|
213
170
|
decorators: [
|
|
214
171
|
(Story) => {
|
|
215
172
|
return `
|
|
@@ -219,4 +176,4 @@ export const CheckboxInvalidSmallDark = {
|
|
|
219
176
|
`;
|
|
220
177
|
},
|
|
221
178
|
],
|
|
222
|
-
}
|
|
179
|
+
};
|
|
@@ -8,6 +8,8 @@ export default {
|
|
|
8
8
|
render: (args) => {
|
|
9
9
|
return `${new Formcheck(args).html}`;
|
|
10
10
|
},
|
|
11
|
+
globals: { backgrounds: { value: "default" } },
|
|
12
|
+
parameters: { backgrounds: { disable: false } },
|
|
11
13
|
//https://storybook.js.org/docs/api/arg-types
|
|
12
14
|
argTypes: {},
|
|
13
15
|
};
|
|
@@ -18,16 +20,12 @@ export const Default = {
|
|
|
18
20
|
parameters: {
|
|
19
21
|
controls: { include: `listitems` },
|
|
20
22
|
},
|
|
23
|
+
globals: { backgrounds: { value: "default" } },
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
export const RadioDark = {
|
|
24
27
|
args: { ...defaultdata },
|
|
25
|
-
|
|
26
|
-
backgrounds: {
|
|
27
|
-
default: "Dark",
|
|
28
|
-
values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
|
|
29
|
-
},
|
|
30
|
-
},
|
|
28
|
+
globals: { backgrounds: { value: "dark" } },
|
|
31
29
|
decorators: [
|
|
32
30
|
(Story) => {
|
|
33
31
|
return `
|
|
@@ -54,12 +52,7 @@ export const RadioSmall = {
|
|
|
54
52
|
|
|
55
53
|
export const RadioSmallDark = {
|
|
56
54
|
args: { ...defaultdata, id: "radioSmallDark" },
|
|
57
|
-
|
|
58
|
-
backgrounds: {
|
|
59
|
-
default: "Dark",
|
|
60
|
-
values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
|
|
61
|
-
},
|
|
62
|
-
},
|
|
55
|
+
globals: { backgrounds: { value: "dark" } },
|
|
63
56
|
decorators: [
|
|
64
57
|
(Story) => {
|
|
65
58
|
return `
|
|
@@ -97,12 +90,7 @@ export const RadioValidDark = {
|
|
|
97
90
|
<div class="valid">${new Formcheck(args).html}</div></div>
|
|
98
91
|
`;
|
|
99
92
|
},
|
|
100
|
-
|
|
101
|
-
backgrounds: {
|
|
102
|
-
default: "Dark",
|
|
103
|
-
values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
|
|
104
|
-
},
|
|
105
|
-
},
|
|
93
|
+
globals: { backgrounds: { value: "dark" } },
|
|
106
94
|
decorators: [
|
|
107
95
|
(Story) => {
|
|
108
96
|
return `
|
|
@@ -122,12 +110,7 @@ export const RadioValidSmallDark = {
|
|
|
122
110
|
<div class="valid">${new Formcheck(args).html}</div></div>
|
|
123
111
|
`;
|
|
124
112
|
},
|
|
125
|
-
|
|
126
|
-
backgrounds: {
|
|
127
|
-
default: "Dark",
|
|
128
|
-
values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
|
|
129
|
-
},
|
|
130
|
-
},
|
|
113
|
+
globals: { backgrounds: { value: "dark" } },
|
|
131
114
|
decorators: [
|
|
132
115
|
(Story) => {
|
|
133
116
|
return `
|
|
@@ -163,12 +146,7 @@ export const RadioInvalidDark = {
|
|
|
163
146
|
<div class="invalid"><div class="dark">${new Formcheck(args).html}</div></div>
|
|
164
147
|
`;
|
|
165
148
|
},
|
|
166
|
-
|
|
167
|
-
backgrounds: {
|
|
168
|
-
default: "Dark",
|
|
169
|
-
values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
|
|
170
|
-
},
|
|
171
|
-
},
|
|
149
|
+
globals: { backgrounds: { value: "dark" } },
|
|
172
150
|
decorators: [
|
|
173
151
|
(Story) => {
|
|
174
152
|
return `
|
|
@@ -188,12 +166,7 @@ export const RadioInvalidSmallDark = {
|
|
|
188
166
|
<div class="invalid">${new Formcheck(args).html}</div></div>
|
|
189
167
|
`;
|
|
190
168
|
},
|
|
191
|
-
|
|
192
|
-
backgrounds: {
|
|
193
|
-
default: "Dark",
|
|
194
|
-
values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
|
|
195
|
-
},
|
|
196
|
-
},
|
|
169
|
+
globals: { backgrounds: { value: "dark" } },
|
|
197
170
|
decorators: [
|
|
198
171
|
(Story) => {
|
|
199
172
|
return `
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -139,11 +139,11 @@ describe("initGlobalAlerts", () => {
|
|
|
139
139
|
localStorage = localStorageMock;
|
|
140
140
|
|
|
141
141
|
// Set global references for initGlobalAlerts
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
global.document = d;
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
global.window = window;
|
|
146
|
-
|
|
146
|
+
|
|
147
147
|
global.localStorage = localStorageMock;
|
|
148
148
|
|
|
149
149
|
// Clear localStorage before each test
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -163,6 +163,7 @@ export default {
|
|
|
163
163
|
docs: {
|
|
164
164
|
story: { height: "400px" },
|
|
165
165
|
},
|
|
166
|
+
backgrounds: { disable: true },
|
|
166
167
|
},
|
|
167
168
|
};
|
|
168
169
|
|
|
@@ -172,12 +173,6 @@ export const MasterBrand = {
|
|
|
172
173
|
...masterbrand_variant,
|
|
173
174
|
...menu_state,
|
|
174
175
|
},
|
|
175
|
-
parameters: {
|
|
176
|
-
backgrounds: {
|
|
177
|
-
default: "Light",
|
|
178
|
-
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
176
|
decorators: [
|
|
182
177
|
(Story) => {
|
|
183
178
|
return `
|
|
@@ -193,12 +188,6 @@ export const SubBrand = {
|
|
|
193
188
|
...subbrand_variant,
|
|
194
189
|
...menu_state,
|
|
195
190
|
},
|
|
196
|
-
parameters: {
|
|
197
|
-
backgrounds: {
|
|
198
|
-
default: "Light",
|
|
199
|
-
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
191
|
decorators: [
|
|
203
192
|
(Story) => {
|
|
204
193
|
return `
|
|
@@ -212,12 +201,6 @@ export const SubBrand = {
|
|
|
212
201
|
export const CoBrand = {
|
|
213
202
|
args: mergeArgs(alternative_palette, cobrand_variant, menu_state),
|
|
214
203
|
argTypes: arg_types,
|
|
215
|
-
parameters: {
|
|
216
|
-
backgrounds: {
|
|
217
|
-
default: "Light",
|
|
218
|
-
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
204
|
decorators: [
|
|
222
205
|
(Story, context) => {
|
|
223
206
|
const args = context.args;
|
|
@@ -249,12 +232,6 @@ export const CoBrand = {
|
|
|
249
232
|
export const EndorsedBrand = {
|
|
250
233
|
args: mergeArgs(sample_argtypes, endorsed_variant, menu_state),
|
|
251
234
|
argTypes: arg_types,
|
|
252
|
-
parameters: {
|
|
253
|
-
backgrounds: {
|
|
254
|
-
default: "Light",
|
|
255
|
-
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
235
|
decorators: [
|
|
259
236
|
(Story, context) => {
|
|
260
237
|
const args = context.args;
|
|
@@ -286,12 +263,6 @@ export const EndorsedBrand = {
|
|
|
286
263
|
export const StandaloneBrand = {
|
|
287
264
|
args: mergeArgs(sample_argtypes, standalone_variant, menu_state),
|
|
288
265
|
argTypes: arg_types,
|
|
289
|
-
parameters: {
|
|
290
|
-
backgrounds: {
|
|
291
|
-
default: "Light",
|
|
292
|
-
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
266
|
decorators: [
|
|
296
267
|
(Story, context) => {
|
|
297
268
|
const args = context.args;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -3,7 +3,7 @@ import defaultdata from "./inpageAlert.data.json";
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The Inpage Alert is also known as Page Alert or Alert
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* Inpage alert accepts the following classes: <code>.alert-success</code>, <code>.alert-info</code>, <code>.alert-warning</code>, and <code>.alert-danger</code>
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -32,7 +32,8 @@ export default {
|
|
|
32
32
|
render: (args) => {
|
|
33
33
|
return new InpageAlert({ ...defaultdata, ...args }).html;
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
globals: { backgrounds: { value: "default" } },
|
|
36
|
+
parameters: { backgrounds: { disable: false } },
|
|
36
37
|
argTypes: {
|
|
37
38
|
variantClass: {
|
|
38
39
|
name: "Classes",
|
|
@@ -46,12 +47,7 @@ export default {
|
|
|
46
47
|
"alert-error": "Error",
|
|
47
48
|
},
|
|
48
49
|
},
|
|
49
|
-
options: [
|
|
50
|
-
"alert-success",
|
|
51
|
-
"alert-info",
|
|
52
|
-
"alert-warning",
|
|
53
|
-
"alert-error",
|
|
54
|
-
],
|
|
50
|
+
options: ["alert-success", "alert-info", "alert-warning", "alert-error"],
|
|
55
51
|
},
|
|
56
52
|
alertType: {
|
|
57
53
|
name: "Alert Type",
|
|
@@ -59,15 +55,14 @@ export default {
|
|
|
59
55
|
},
|
|
60
56
|
headingTag: {
|
|
61
57
|
name: "Heading Tag",
|
|
62
|
-
description:
|
|
58
|
+
description:
|
|
59
|
+
"Heading tag for the In-page Alert component. Can be h2, h3, h4, h5 or h6.",
|
|
63
60
|
control: "select",
|
|
64
61
|
options: ["h2", "h3", "h4", "h5", "h6"],
|
|
65
62
|
},
|
|
66
63
|
},
|
|
67
|
-
|
|
68
64
|
};
|
|
69
65
|
|
|
70
|
-
|
|
71
66
|
/**
|
|
72
67
|
* Default In-page Alert component.
|
|
73
68
|
*/
|
|
@@ -76,23 +71,12 @@ export const Default = {
|
|
|
76
71
|
args: defaultdata,
|
|
77
72
|
};
|
|
78
73
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
74
|
/**
|
|
83
75
|
* In-page Alert when presented inside a <code>.dark</code> or <code>.dark-alt</code> container.
|
|
84
76
|
*/
|
|
85
77
|
|
|
86
|
-
|
|
87
78
|
export const Dark = {
|
|
88
|
-
|
|
89
|
-
backgrounds: {
|
|
90
|
-
default: 'Dark',
|
|
91
|
-
values: [
|
|
92
|
-
{ name: 'Dark', value: 'var(--qld-dark-background)' },
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
79
|
+
globals: { backgrounds: { value: "dark" } },
|
|
96
80
|
|
|
97
81
|
decorators: [
|
|
98
82
|
(Story) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -13,7 +13,9 @@ export default {
|
|
|
13
13
|
exclude: ["variantClass", "navitems"],
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
|
+
backgrounds: { disable: false },
|
|
16
17
|
},
|
|
18
|
+
globals: { backgrounds: { value: "default" } },
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -21,6 +23,7 @@ export default {
|
|
|
21
23
|
*/
|
|
22
24
|
export const Default = {
|
|
23
25
|
args: defaultdata,
|
|
26
|
+
globals: { backgrounds: { value: "default" } },
|
|
24
27
|
decorators: [
|
|
25
28
|
(Story) => {
|
|
26
29
|
return `
|
|
@@ -43,12 +46,7 @@ export const Default = {
|
|
|
43
46
|
*/
|
|
44
47
|
export const Dark = {
|
|
45
48
|
args: defaultdata,
|
|
46
|
-
|
|
47
|
-
backgrounds: {
|
|
48
|
-
default: "Dark",
|
|
49
|
-
values: [{ name: "Dark", value: "var(--qld-dark-background)" }],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
49
|
+
globals: { backgrounds: { value: "dark" } },
|
|
52
50
|
decorators: [
|
|
53
51
|
(Story) => {
|
|
54
52
|
return `
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|