@qld-gov-au/qgds-bootstrap5 1.1.20 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +46 -41
- package/.storybook/preview.js +96 -94
- package/dist/assets/components/bs5/callToAction/callToAction.hbs +9 -0
- 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/js/handlebars.helpers.bundle.js +1 -1
- package/dist/assets/js/handlebars.helpers.bundle.js.map +3 -3
- package/dist/assets/js/handlebars.helpers.js +33 -0
- package/dist/assets/js/handlebars.init.min.js +42 -34
- package/dist/assets/js/handlebars.init.min.js.map +4 -4
- package/dist/assets/js/handlebars.partials.js +2 -0
- package/dist/assets/node/handlebars.init.min.js +29 -1
- package/dist/assets/node/handlebars.init.min.js.map +3 -3
- package/dist/components/bs5/callToAction/callToAction.hbs +9 -0
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/handlebars.helpers.js +33 -0
- package/dist/components/handlebars.partials.js +2 -0
- package/dist/package.json +2 -2
- package/dist/sample-data/callToAction/callToAction.data.json +10 -0
- package/package.json +2 -2
- package/src/components/bs5/callToAction/callToAction.data.json +10 -0
- package/src/components/bs5/callToAction/callToAction.hbs +9 -0
- package/src/components/bs5/callToAction/callToAction.js +12 -0
- package/src/components/bs5/callToAction/callToAction.mdx +16 -0
- package/src/components/bs5/callToAction/callToAction.scss +93 -0
- package/src/components/bs5/callToAction/callToAction.stories.js +134 -0
- package/src/components/bs5/video/video.stories.js +23 -22
- package/src/css/main.scss +1 -0
- package/src/css/qld-print.scss +13 -0
- package/src/js/handlebars.helpers.js +33 -0
- package/src/js/handlebars.partials.js +2 -0
package/.storybook/main.js
CHANGED
|
@@ -1,51 +1,56 @@
|
|
|
1
1
|
/** @type { import('@storybook/html-vite').StorybookConfig } */
|
|
2
2
|
const config = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
stories: [
|
|
4
|
+
'../src/stories/Introduction.mdx',
|
|
5
|
+
// Include all stories found under the src/components directory ( For example: alert/alert.stories.js )
|
|
6
|
+
// Exlude any stories starting with an underscore ( For example: _exludeme.stories.js )
|
|
7
|
+
'../src/**/!(*_)*.mdx',
|
|
8
|
+
'../src/**/!(*_)*.stories.js',
|
|
9
|
+
],
|
|
10
|
+
staticDirs: [{ from: '../dist', to: '/' }], //Bring dist in statically instead of having it minified
|
|
11
|
+
addons: [
|
|
12
|
+
//Storybook addons
|
|
13
|
+
//https://storybook.js.org/addons/
|
|
14
|
+
'@storybook/addon-a11y',
|
|
15
|
+
'@storybook/addon-themes',
|
|
16
|
+
'@storybook/addon-essentials',
|
|
17
|
+
'@storybook/addon-interactions',
|
|
18
|
+
'@storybook/addon-links',
|
|
19
|
+
'@chromatic-com/storybook',
|
|
20
|
+
'storybook-addon-deep-controls',
|
|
21
|
+
],
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
framework: {
|
|
24
|
+
//Build the storybook with html-vite rendered - faster than webpack
|
|
25
|
+
//https://www.npmjs.com/package/@storybook/html-vite
|
|
26
|
+
name: '@storybook/html-vite',
|
|
27
|
+
options: {},
|
|
28
|
+
},
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
//Autodocs for each component
|
|
31
|
+
//https://storybook.js.org/docs/writing-docs/autodocs
|
|
32
|
+
docs: {
|
|
33
|
+
defaultName: 'Overview',
|
|
34
|
+
},
|
|
29
35
|
|
|
36
|
+
//Each component's JS module, for example Alert.js, imports a HTML string to use for it's template.
|
|
37
|
+
//We add a plugin to handle these .hbs extensions. (Or .mustache, .html etc)
|
|
38
|
+
//https://storybook.js.org/docs/api/main-config-vite-final
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
viteFinal: async (config, { configType }) => {
|
|
41
|
+
config.root = './dist';
|
|
42
|
+
// config.plugins.push({
|
|
43
|
+
// name: "html-transform",
|
|
44
|
+
// transform(src, id) {
|
|
45
|
+
// if (id.endsWith(".mustache") || id.endsWith(".html") || id.endsWith(".hbs")) {
|
|
46
|
+
// // Transform your HTML files here (src is the file content as a string)
|
|
47
|
+
// return src;
|
|
48
|
+
// }
|
|
49
|
+
// },
|
|
50
|
+
// });
|
|
34
51
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// config.plugins.push({
|
|
38
|
-
// name: "html-transform",
|
|
39
|
-
// transform(src, id) {
|
|
40
|
-
// if (id.endsWith(".mustache") || id.endsWith(".html") || id.endsWith(".hbs")) {
|
|
41
|
-
// // Transform your HTML files here (src is the file content as a string)
|
|
42
|
-
// return src;
|
|
43
|
-
// }
|
|
44
|
-
// },
|
|
45
|
-
// });
|
|
46
|
-
|
|
47
|
-
return config;
|
|
48
|
-
},
|
|
52
|
+
return config;
|
|
53
|
+
},
|
|
49
54
|
};
|
|
50
55
|
|
|
51
56
|
export default config;
|
package/.storybook/preview.js
CHANGED
|
@@ -1,107 +1,109 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {withThemeByClassName} from '@storybook/addon-themes';
|
|
5
|
-
import {allBackgrounds} from
|
|
1
|
+
import '../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js';
|
|
2
|
+
import '../src/js/qld.bootstrap.js';
|
|
3
|
+
import '../src/css/main.scss';
|
|
4
|
+
import { withThemeByClassName } from '@storybook/addon-themes';
|
|
5
|
+
import { allBackgrounds } from './modes.js';
|
|
6
6
|
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
|
|
7
|
-
import init from
|
|
8
|
-
import Handlebars from
|
|
7
|
+
import init from '../src/js/handlebars.init.js';
|
|
8
|
+
import Handlebars from 'handlebars';
|
|
9
9
|
|
|
10
10
|
/** @type { import('@storybook/html-vite').Preview } */
|
|
11
11
|
const preview = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
12
|
+
parameters: {
|
|
13
|
+
//actions: { argTypesRegex: "^on[A-Z].*" },
|
|
14
|
+
chromatic: {
|
|
15
|
+
//🔶 Test each story for ArticleCard in two modes
|
|
16
|
+
modes: {
|
|
17
|
+
// Light: allModes["Light"],
|
|
18
|
+
// "Light alternative": allModes["Light alternative"],
|
|
19
|
+
// Dark: allModes["Dark"],
|
|
20
|
+
// "Dark alternative": allModes["Dark alternative"],
|
|
21
|
+
//mobile: allModes["mobile"],
|
|
22
|
+
//desktop: allModes["desktop"],
|
|
23
|
+
//"1200px": {viewport: 1200}, //original non-modes based baseline
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
viewport: {
|
|
27
|
+
viewports: {
|
|
28
|
+
//QLD-media Breakpoints
|
|
29
|
+
small: { name: 'Small', styles: { width: '400px', height: '800px' } },
|
|
30
|
+
medium: { name: 'Medium', styles: { width: '700px', height: '800px' } },
|
|
31
|
+
large: { name: 'Large', styles: { width: '992px', height: '800px' } },
|
|
32
|
+
xlarge: { name: 'Extra Large', styles: { width: '1312px', height: '1000px' } },
|
|
33
|
+
xxlarge: { name: 'Extra Extra Large', styles: { width: '1599px', height: '1000px' } },
|
|
34
|
+
navbreakpoint: { name: 'Nave Breakpoint', styles: { width: '992px', height: '800px' } },
|
|
35
|
+
...INITIAL_VIEWPORTS,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
hideNoControlsWarning: true,
|
|
39
|
+
expanded: true,
|
|
40
|
+
controls: {
|
|
41
|
+
matchers: {
|
|
42
|
+
color: /(background|color)$/i,
|
|
43
|
+
date: /Date$/i,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
deepControls: { enabled: true },
|
|
47
|
+
html: {
|
|
48
|
+
highlighter: {
|
|
49
|
+
wrapLines: false,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
docs: {
|
|
53
|
+
source: {
|
|
54
|
+
excludeDecorators: true,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
backgrounds: {
|
|
58
|
+
//default: 'default',
|
|
59
|
+
values: [
|
|
60
|
+
allBackgrounds['default'],
|
|
61
|
+
allBackgrounds['Light'],
|
|
62
|
+
allBackgrounds['Light alternative'],
|
|
63
|
+
allBackgrounds['Dark'],
|
|
64
|
+
allBackgrounds['Dark alternative'],
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
options: {
|
|
68
|
+
storySort: {
|
|
69
|
+
method: 'alphabetical',
|
|
70
|
+
// Set order of components in the Layout category
|
|
71
|
+
order: ['*', ['Header', 'Footer', 'Breadcrumbs', 'Side navigation']],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
a11y: {
|
|
75
|
+
// Optional configuration for the a11y addon
|
|
76
|
+
config: {},
|
|
77
|
+
options: {
|
|
78
|
+
checks: { 'color-contrast': { options: { noScroll: true } } },
|
|
79
|
+
restoreScroll: true,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
decorators: [
|
|
85
|
+
// data-bs-theme="dark" won't be used
|
|
86
|
+
withThemeByClassName({
|
|
87
|
+
themes: {
|
|
88
|
+
None: '',
|
|
89
|
+
Light: 'light',
|
|
90
|
+
'Light alternative': 'alt',
|
|
91
|
+
Dark: 'dark',
|
|
92
|
+
'Dark alternative': 'dark-alt',
|
|
93
|
+
},
|
|
94
|
+
defaultTheme: 'None',
|
|
95
|
+
}),
|
|
96
|
+
(Story) => {
|
|
97
|
+
init(Handlebars);
|
|
98
|
+
return `
|
|
97
99
|
|
|
98
100
|
${Story()}
|
|
99
101
|
|
|
100
102
|
`;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
},
|
|
104
|
+
],
|
|
103
105
|
|
|
104
|
-
|
|
106
|
+
tags: ['autodocs'],
|
|
105
107
|
};
|
|
106
108
|
|
|
107
109
|
export default preview;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"1.1.
|
|
2
|
+
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"1.1.21","branch":"HEAD","tag":"v1.1.21","commit":"a3f1a8cf0304d6c7f562866d133b170b491e720c","majorVersion":"v1"} -->
|
|
3
3
|
|
|
4
4
|
{{! Select environment, used verbatium if not using predefind key
|
|
5
5
|
cdn := PROD|STAGING|BETA|TEST|DEV|???
|