@qld-gov-au/qgds-bootstrap5 2.0.4 → 2.0.6
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/helpers/scssOverrideTheme.js +40 -0
- package/.esbuild/plugins/qgds-plugin-handlebar-partial-builder.js +4 -0
- package/.storybook/dynamicThemeDecorator.js +159 -0
- package/.storybook/main.js +8 -0
- package/.storybook/preview.js +19 -0
- package/README.md +26 -18
- package/dist/README.md +26 -18
- 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/node/handlebars.init.min.js +1 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/package.json +6 -2
- package/esbuild.js +40 -10
- package/package.json +6 -2
- package/src/components/bs5/accordion/accordion.scss +3 -3
- package/src/components/bs5/button/button.scss +25 -45
- package/src/components/bs5/callout/callout.stories.js +15 -21
- package/src/components/bs5/card/card--icon-list-footer.stories.js +171 -0
- package/src/components/bs5/card/card.scss +20 -5
- package/src/components/bs5/footer/footer.scss +3 -7
- package/src/components/bs5/header/header.scss +8 -0
- package/src/components/bs5/pageLayout/pageLayout.stories.js +2 -2
- package/src/components/bs5/pagination/pagination.scss +290 -274
- package/src/components/bs5/pagination/pagination.stories.js +18 -33
- package/src/components/bs5/searchInput/searchInput.test.js +21 -5
- package/src/components/bs5/textbox/textInput.scss +55 -39
- package/src/components/bs5/video/video.scss +41 -27
- package/src/css/main.legacy.scss +19 -0
- package/src/css/main.scss +17 -0
- package/src/css/qld-tokens-legacy.scss +94 -0
- package/src/css/qld-tokens.scss +110 -0
- package/src/css/qld-variables.scss +43 -29
- package/src/css/readme.md +6 -1
|
@@ -825,7 +825,7 @@
|
|
|
825
825
|
</section>
|
|
826
826
|
{{/each }}
|
|
827
827
|
</div>`;var R=`
|
|
828
|
-
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.
|
|
828
|
+
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.6","branch":"HEAD","tag":"v2.0.6","commit":"8e01e15b93ee3bf9a4f97638ef79324fdf6a97a7","majorVersion":"v2"} -->
|
|
829
829
|
|
|
830
830
|
{{! Select environment, used verbatium if not using predefind key
|
|
831
831
|
cdn := PROD|STAGING|BETA|TEST|DEV|???
|
|
@@ -808,7 +808,7 @@ var head_default;
|
|
|
808
808
|
var init_head = __esm({
|
|
809
809
|
"src/components/bs5/head/head.hbs?raw"() {
|
|
810
810
|
head_default = `
|
|
811
|
-
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.
|
|
811
|
+
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.6","branch":"HEAD","tag":"v2.0.6","commit":"8e01e15b93ee3bf9a4f97638ef79324fdf6a97a7","majorVersion":"v2"} -->
|
|
812
812
|
|
|
813
813
|
{{! Select environment, used verbatium if not using predefind key
|
|
814
814
|
cdn := PROD|STAGING|BETA|TEST|DEV|???
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.
|
|
2
|
+
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.6","branch":"HEAD","tag":"v2.0.6","commit":"8e01e15b93ee3bf9a4f97638ef79324fdf6a97a7","majorVersion":"v2"} -->
|
|
3
3
|
|
|
4
4
|
{{! Select environment, used verbatium if not using predefind key
|
|
5
5
|
cdn := PROD|STAGING|BETA|TEST|DEV|???
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qld-gov-au/qgds-bootstrap5",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"prepare": "npm run build",
|
|
12
12
|
"start": "npm run build",
|
|
13
|
-
"lint": "eslint --fix --ext .js,.json --ignore-pattern 'docs/*' --ignore-pattern 'dist/*' --ignore-pattern 'storybook-static/*' .",
|
|
13
|
+
"lint": "eslint --fix --ext .js,.json --ignore-pattern 'docs/*' --ignore-pattern 'dist/*' --ignore-pattern 'storybook-static/*' --ignore-pattern 'src/js/handlebars.partials.js' .",
|
|
14
14
|
"build": "node esbuild.js",
|
|
15
15
|
"build:icons": "node esbuild.js --icons",
|
|
16
|
+
"build:theme": "node esbuild.js --theme",
|
|
17
|
+
"build:theme:icons": "node esbuild.js --theme --icons",
|
|
16
18
|
"test": "vitest",
|
|
17
19
|
"test:ui": "vitest --ui",
|
|
18
20
|
"test:integration": "npm-run-all --parallel --race serve:test test:testrunner",
|
|
@@ -22,7 +24,9 @@
|
|
|
22
24
|
"serve:test": "http-server dist -p 8081 --silent",
|
|
23
25
|
"dev-storybook": "npm-run-all --parallel watch storybook",
|
|
24
26
|
"storybook": "storybook dev -p 6006",
|
|
27
|
+
"storybook:themes": "ENABLE_DYNAMIC_THEME=true storybook dev -p 6006",
|
|
25
28
|
"build-storybook": "storybook build --webpack-stats-json ",
|
|
29
|
+
"build-storybook:themes": "ENABLE_DYNAMIC_THEME=true storybook build --webpack-stats-json ",
|
|
26
30
|
"build-storybook:serve": "http-server storybook-static -p 8080"
|
|
27
31
|
},
|
|
28
32
|
"keywords": [],
|
package/esbuild.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* global process */
|
|
2
2
|
// ESBUILD PROJECT DEPENDENCIES
|
|
3
3
|
import * as esbuild from "esbuild";
|
|
4
|
+
import path from "path";
|
|
4
5
|
|
|
5
6
|
//Local ESBUILD PLUGINS
|
|
6
7
|
import QGDSupdateHandlebarsPartialsPlugin from "./.esbuild/plugins/qgds-plugin-handlebar-partial-builder.js";
|
|
@@ -10,6 +11,7 @@ import QDGSbuildLog from "./.esbuild/plugins/qgds-plugin-build-log.js";
|
|
|
10
11
|
import QDGScopy from "./.esbuild/plugins/qgds-plugin-copy-assets.js";
|
|
11
12
|
import { QGDSgenerateIconAssetsPlugin } from "./.esbuild/plugins/qgds-plugin-generate-icon-assets.js";
|
|
12
13
|
import { versionPlugin } from "./.esbuild/plugins/qgds-plugin-version.js";
|
|
14
|
+
import { createOverrideThemeScssEntry } from "./.esbuild/helpers/scssOverrideTheme.js";
|
|
13
15
|
|
|
14
16
|
//Open source ESBUILD PLUGINS
|
|
15
17
|
import { sassPlugin } from "esbuild-sass-plugin";
|
|
@@ -19,7 +21,6 @@ import handlebarsPlugin from "esbuild-plugin-handlebars";
|
|
|
19
21
|
import minimist from "minimist";
|
|
20
22
|
const argv = minimist(process.argv.slice(2));
|
|
21
23
|
|
|
22
|
-
|
|
23
24
|
// https://esbuild.github.io/getting-started/#build-scripts
|
|
24
25
|
const buildConfig = {
|
|
25
26
|
bundle: true,
|
|
@@ -36,9 +37,13 @@ const buildConfig = {
|
|
|
36
37
|
out: "./assets/js/qld.bootstrap.min",
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
|
-
in: "./src/css/main.scss",
|
|
40
|
+
in: "./src/css/main.scss", //default masterbrand theme
|
|
40
41
|
out: "./assets/css/qld.bootstrap",
|
|
41
42
|
},
|
|
43
|
+
{
|
|
44
|
+
in: "./src/css/main.legacy.scss", //legacy masterbrand theme (before October 2025)
|
|
45
|
+
out: "./assets/css/qld.bootstrap.legacy",
|
|
46
|
+
},
|
|
42
47
|
{
|
|
43
48
|
in: "./src/js/handlebars.helpers.js",
|
|
44
49
|
out: "./assets/js/handlebars.helpers.bundle",
|
|
@@ -65,7 +70,12 @@ const buildConfig = {
|
|
|
65
70
|
versionPlugin(),
|
|
66
71
|
QDGScleanFolders(),
|
|
67
72
|
handlebarsPlugin(),
|
|
68
|
-
sassPlugin(
|
|
73
|
+
sassPlugin({
|
|
74
|
+
//Hide sass deprecation warnings with a quiet flag... npm run build -- --quiet
|
|
75
|
+
silenceDeprecations: argv.quiet
|
|
76
|
+
? ["import", "global-builtin", "mixed-decls", "color-functions"]
|
|
77
|
+
: [],
|
|
78
|
+
}),
|
|
69
79
|
QDGSbuildLog(),
|
|
70
80
|
],
|
|
71
81
|
};
|
|
@@ -81,7 +91,7 @@ const buildNodeConfig = {
|
|
|
81
91
|
external: buildConfig.external,
|
|
82
92
|
platform: "node",
|
|
83
93
|
target: ["node20"],
|
|
84
|
-
format:
|
|
94
|
+
format: "esm",
|
|
85
95
|
entryPoints: [
|
|
86
96
|
{
|
|
87
97
|
in: "./src/js/handlebars.init.cjs",
|
|
@@ -95,26 +105,46 @@ const buildNodeConfig = {
|
|
|
95
105
|
versionPlugin(),
|
|
96
106
|
handlebarsPlugin(),
|
|
97
107
|
],
|
|
98
|
-
}
|
|
108
|
+
};
|
|
99
109
|
|
|
100
110
|
async function StartBuild() {
|
|
101
|
-
|
|
111
|
+
// Choose configuration based on theme
|
|
112
|
+
let config = buildConfig;
|
|
113
|
+
const tempEntries = [];
|
|
102
114
|
|
|
115
|
+
if (argv.theme) {
|
|
116
|
+
const themes = Array.isArray(argv.theme) ? argv.theme : [argv.theme];
|
|
117
|
+
const cssDir = path.resolve("src/css");
|
|
118
|
+
const mainScss = path.join(cssDir, "main.scss");
|
|
119
|
+
|
|
120
|
+
themes.forEach((themeVar) => {
|
|
121
|
+
const tempEntry = createOverrideThemeScssEntry({
|
|
122
|
+
cssDir,
|
|
123
|
+
mainScss,
|
|
124
|
+
themeVar,
|
|
125
|
+
});
|
|
126
|
+
tempEntries.push(tempEntry);
|
|
127
|
+
config.entryPoints.push({
|
|
128
|
+
in: tempEntry,
|
|
129
|
+
out: `./assets/css/qld.${themeVar}.bootstrap`,
|
|
130
|
+
});
|
|
131
|
+
console.log(`theme SCSS entry created: ${tempEntry}`);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let ctx = await esbuild.context(config);
|
|
103
136
|
if (argv.watch === true) {
|
|
104
|
-
// "npm run watch"
|
|
105
137
|
await ctx.watch();
|
|
106
|
-
|
|
107
138
|
} else {
|
|
108
|
-
// "npm run build" or "node build.js"
|
|
109
139
|
await ctx.rebuild();
|
|
110
140
|
await ctx.dispose();
|
|
141
|
+
// Note: Temp files are preserved for performance - they're only recreated when content changes
|
|
111
142
|
}
|
|
112
143
|
|
|
113
144
|
//node js module
|
|
114
145
|
let ctxNode = await esbuild.context(buildNodeConfig);
|
|
115
146
|
await ctxNode.rebuild();
|
|
116
147
|
await ctxNode.dispose();
|
|
117
|
-
|
|
118
148
|
}
|
|
119
149
|
|
|
120
150
|
//Initate the project build...
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qld-gov-au/qgds-bootstrap5",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"prepare": "npm run build",
|
|
12
12
|
"start": "npm run build",
|
|
13
|
-
"lint": "eslint --fix --ext .js,.json --ignore-pattern 'docs/*' --ignore-pattern 'dist/*' --ignore-pattern 'storybook-static/*' .",
|
|
13
|
+
"lint": "eslint --fix --ext .js,.json --ignore-pattern 'docs/*' --ignore-pattern 'dist/*' --ignore-pattern 'storybook-static/*' --ignore-pattern 'src/js/handlebars.partials.js' .",
|
|
14
14
|
"build": "node esbuild.js",
|
|
15
15
|
"build:icons": "node esbuild.js --icons",
|
|
16
|
+
"build:theme": "node esbuild.js --theme",
|
|
17
|
+
"build:theme:icons": "node esbuild.js --theme --icons",
|
|
16
18
|
"test": "vitest",
|
|
17
19
|
"test:ui": "vitest --ui",
|
|
18
20
|
"test:integration": "npm-run-all --parallel --race serve:test test:testrunner",
|
|
@@ -22,7 +24,9 @@
|
|
|
22
24
|
"serve:test": "http-server dist -p 8081 --silent",
|
|
23
25
|
"dev-storybook": "npm-run-all --parallel watch storybook",
|
|
24
26
|
"storybook": "storybook dev -p 6006",
|
|
27
|
+
"storybook:themes": "ENABLE_DYNAMIC_THEME=true storybook dev -p 6006",
|
|
25
28
|
"build-storybook": "storybook build --webpack-stats-json ",
|
|
29
|
+
"build-storybook:themes": "ENABLE_DYNAMIC_THEME=true storybook build --webpack-stats-json ",
|
|
26
30
|
"build-storybook:serve": "http-server storybook-static -p 8080"
|
|
27
31
|
},
|
|
28
32
|
"keywords": [],
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
//SASS variables;
|
|
5
5
|
$accordion-padding: 1rem;
|
|
6
|
-
$accordion-icon-color: $
|
|
7
|
-
$accordion-icon-active-color: $
|
|
6
|
+
$accordion-icon-color: $color-default-color-light-action-primary;
|
|
7
|
+
$accordion-icon-active-color: $color-default-color-light-action-primary;
|
|
8
8
|
$accordion-button-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
|
|
9
9
|
$accordion-button-active-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-active-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
|
|
10
|
-
$accordion-icon-dark-color: $
|
|
10
|
+
$accordion-icon-dark-color: $color-default-color-dark-action-primary;
|
|
11
11
|
$accordion-button-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-dark-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
|
|
12
12
|
$accordion-button-active-icon-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$accordion-icon-dark-color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
|
|
13
13
|
|
|
@@ -18,20 +18,16 @@
|
|
|
18
18
|
//Primary button variant
|
|
19
19
|
&-primary {
|
|
20
20
|
--#{$prefix}btn-bg: var(--#{$prefix}light-action-primary);
|
|
21
|
-
--#{$prefix}btn-hover-bg: var(
|
|
22
|
-
--#{$prefix}color-default-color-light-action-primary-hover
|
|
23
|
-
);
|
|
21
|
+
--#{$prefix}btn-hover-bg: var(--#{$prefix}light-action-primary-hover);
|
|
24
22
|
--#{$prefix}btn-active-bg: var(--#{$prefix}extra-light-grey);
|
|
25
23
|
--#{$prefix}btn-active-color: var(--#{$prefix}light-text-heading);
|
|
26
24
|
--#{$prefix}btn-disabled-bg: var(--#{$prefix}grey);
|
|
27
25
|
--#{$prefix}btn-disabled-color: var(--#{$prefix}dark-grey-muted);
|
|
28
26
|
--#{$prefix}btn-disabled-opacity: 1;
|
|
29
27
|
--#{$prefix}btn-disabled-border-color: transparent;
|
|
30
|
-
--#{$prefix}btn-focus-bg: var(
|
|
31
|
-
--#{$prefix}color-default-color-light-action-primary-hover
|
|
32
|
-
);
|
|
28
|
+
--#{$prefix}btn-focus-bg: var(--#{$prefix}light-action-primary-hover);
|
|
33
29
|
--#{$prefix}btn-focus-border-color: var(
|
|
34
|
-
--#{$prefix}
|
|
30
|
+
--#{$prefix}light-action-primary-hover
|
|
35
31
|
);
|
|
36
32
|
--#{$prefix}icon-color: currentColor;
|
|
37
33
|
--#{$prefix}icon-hover-color: currentColor;
|
|
@@ -41,12 +37,12 @@
|
|
|
41
37
|
&-outline-secondary {
|
|
42
38
|
--#{$prefix}btn-bg: transparent;
|
|
43
39
|
--#{$prefix}btn-color: var(--#{$prefix}light-action-primary);
|
|
44
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}
|
|
45
|
-
--#{$prefix}btn-hover-color: var(--#{$prefix}light-action-primary);
|
|
46
|
-
--#{$prefix}btn-hover-bg: transparent;
|
|
40
|
+
--#{$prefix}btn-border-color: var(--#{$prefix}light-action-secondary);
|
|
47
41
|
--#{$prefix}btn-hover-border-color: var(
|
|
48
|
-
--#{$prefix}
|
|
42
|
+
--#{$prefix}light-action-secondary-hover
|
|
49
43
|
);
|
|
44
|
+
--#{$prefix}btn-hover-color: var(--#{$prefix}light-action-primary);
|
|
45
|
+
--#{$prefix}btn-hover-bg: transparent;
|
|
50
46
|
--#{$prefix}btn-active-color: var(--#{$prefix}light-text-heading);
|
|
51
47
|
--#{$prefix}btn-active-bg: var(--#{$prefix}extra-light-grey);
|
|
52
48
|
--#{$prefix}btn-active-border-color: var(--#{$prefix}extra-light-grey);
|
|
@@ -57,7 +53,7 @@
|
|
|
57
53
|
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}grey);
|
|
58
54
|
--#{$prefix}gradient: none;
|
|
59
55
|
--#{$prefix}btn-focus-border-color: var(
|
|
60
|
-
--#{$prefix}
|
|
56
|
+
--#{$prefix}light-action-secondary-hover
|
|
61
57
|
);
|
|
62
58
|
}
|
|
63
59
|
|
|
@@ -83,40 +79,32 @@
|
|
|
83
79
|
.dark-alt .btn {
|
|
84
80
|
//Primary button variant (dark mode)
|
|
85
81
|
&-primary {
|
|
86
|
-
--#{$prefix}btn-bg: var(--#{$prefix}dark-
|
|
87
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}dark-
|
|
82
|
+
--#{$prefix}btn-bg: var(--#{$prefix}dark-action-secondary);
|
|
83
|
+
--#{$prefix}btn-border-color: var(--#{$prefix}dark-action-secondary);
|
|
88
84
|
--#{$prefix}btn-color: var(--#{$prefix}text-darkest);
|
|
89
85
|
--#{$prefix}btn-hover-color: var(--#{$prefix}text-darkest);
|
|
90
|
-
--#{$prefix}btn-hover-bg: var(
|
|
91
|
-
--#{$prefix}color-default-color-dark-action-primary-hover
|
|
92
|
-
);
|
|
86
|
+
--#{$prefix}btn-hover-bg: var(--#{$prefix}dark-action-primary-hover);
|
|
93
87
|
--#{$prefix}btn-hover-border-color: var(
|
|
94
|
-
--#{$prefix}
|
|
88
|
+
--#{$prefix}dark-action-primary-hover
|
|
95
89
|
);
|
|
96
90
|
--#{$prefix}btn-active-color: var(--#{$prefix}light-text-heading);
|
|
97
91
|
--#{$prefix}btn-active-bg: var(--#{$prefix}extra-light-grey);
|
|
98
92
|
--#{$prefix}btn-disabled-bg: rgba(224, 224, 224, 0.1);
|
|
99
|
-
--#{$prefix}btn-disabled-color: var(
|
|
100
|
-
--#{$prefix}color-default-color-dark-text-lighter
|
|
101
|
-
);
|
|
93
|
+
--#{$prefix}btn-disabled-color: var(--#{$prefix}dark-text-lighter);
|
|
102
94
|
--#{$prefix}btn-disabled-border-color: transparent;
|
|
103
|
-
--#{$prefix}btn-focus-bg: var(
|
|
104
|
-
--#{$prefix}color-default-color-dark-action-primary-hover
|
|
105
|
-
);
|
|
95
|
+
--#{$prefix}btn-focus-bg: var(--#{$prefix}dark-action-primary-hover);
|
|
106
96
|
--#{$prefix}btn-focus-border-color: var(
|
|
107
|
-
--#{$prefix}
|
|
97
|
+
--#{$prefix}dark-action-primary-hover
|
|
108
98
|
);
|
|
109
99
|
}
|
|
110
100
|
|
|
111
101
|
//Secondary button variant (dark mode)
|
|
112
102
|
&-secondary,
|
|
113
103
|
&-outline-secondary {
|
|
114
|
-
--#{$prefix}btn-border-color: var(
|
|
115
|
-
--#{$prefix}color-default-color-dark-action-secondary
|
|
116
|
-
);
|
|
104
|
+
--#{$prefix}btn-border-color: var(--#{$prefix}dark-action-secondary);
|
|
117
105
|
--#{$prefix}btn-color: var(--#{$prefix}white);
|
|
118
106
|
--#{$prefix}btn-hover-border-color: var(
|
|
119
|
-
--#{$prefix}
|
|
107
|
+
--#{$prefix}dark-action-secondary-hover
|
|
120
108
|
);
|
|
121
109
|
--#{$prefix}btn-hover-bg: transparent;
|
|
122
110
|
--#{$prefix}btn-hover-color: var(--#{$prefix}white);
|
|
@@ -124,13 +112,11 @@
|
|
|
124
112
|
--#{$prefix}btn-active-border-color: var(--#{$prefix}extra-light-grey);
|
|
125
113
|
--#{$prefix}btn-active-color: var(--#{$prefix}light-text-heading);
|
|
126
114
|
--#{$prefix}btn-disabled-bg: transparent;
|
|
127
|
-
--#{$prefix}btn-disabled-color: var(
|
|
128
|
-
--#{$prefix}color-default-color-dark-text-lighter
|
|
129
|
-
);
|
|
115
|
+
--#{$prefix}btn-disabled-color: var(--#{$prefix}dark-text-lighter);
|
|
130
116
|
--#{$prefix}btn-disabled-border-color: rgba(224, 224, 224, 0.1);
|
|
131
117
|
--#{$prefix}btn-focus-bg: transparent;
|
|
132
118
|
--#{$prefix}btn-focus-border-color: var(
|
|
133
|
-
--#{$prefix}
|
|
119
|
+
--#{$prefix}dark-action-secondary-hover
|
|
134
120
|
);
|
|
135
121
|
}
|
|
136
122
|
|
|
@@ -145,9 +131,7 @@
|
|
|
145
131
|
--#{$prefix}btn-active-color: var(--#{$prefix}white);
|
|
146
132
|
--#{$prefix}btn-focus-bg: var(--#{$prefix}dark-background-shade);
|
|
147
133
|
--#{$prefix}btn-disabled-bg: transparent;
|
|
148
|
-
--#{$prefix}btn-disabled-color: var(
|
|
149
|
-
--#{$prefix}color-default-color-dark-text-lighter
|
|
150
|
-
);
|
|
134
|
+
--#{$prefix}btn-disabled-color: var(--#{$prefix}dark-text-lighter);
|
|
151
135
|
--#{$prefix}btn-disabled-border-color: transparent;
|
|
152
136
|
}
|
|
153
137
|
}
|
|
@@ -321,19 +305,15 @@ a.btn,
|
|
|
321
305
|
&-tertiary {
|
|
322
306
|
text-decoration: underline;
|
|
323
307
|
text-underline-offset: 0.3em;
|
|
324
|
-
--qld-body-color: var(--#{$prefix}
|
|
308
|
+
--qld-body-color: var(--#{$prefix}light-link);
|
|
325
309
|
|
|
326
310
|
&:hover {
|
|
327
|
-
--qld-body-color: var(
|
|
328
|
-
--#{$prefix}color-default-color-light-action-secondary-hover
|
|
329
|
-
);
|
|
311
|
+
--qld-body-color: var(--#{$prefix}light-action-secondary-hover);
|
|
330
312
|
}
|
|
331
313
|
|
|
332
314
|
&:focus {
|
|
333
315
|
background-color: var(--#{$prefix}btn-hover-bg);
|
|
334
|
-
--qld-body-color: var(
|
|
335
|
-
--#{$prefix}color-default-color-light-action-secondary-hover
|
|
336
|
-
);
|
|
316
|
+
--qld-body-color: var(--#{$prefix}light-action-secondary-hover);
|
|
337
317
|
}
|
|
338
318
|
|
|
339
319
|
&:active {
|
|
@@ -409,7 +389,7 @@ a.btn,
|
|
|
409
389
|
}
|
|
410
390
|
|
|
411
391
|
&-tertiary {
|
|
412
|
-
--qld-body-color: var(--#{$prefix}
|
|
392
|
+
--qld-body-color: var(--#{$prefix}dark-link);
|
|
413
393
|
|
|
414
394
|
&:hover {
|
|
415
395
|
--qld-body-color: var(--#{$prefix}dark-action-secondary-hover);
|
|
@@ -421,7 +401,7 @@ a.btn,
|
|
|
421
401
|
|
|
422
402
|
&:active {
|
|
423
403
|
text-decoration: none;
|
|
424
|
-
--qld-body-color: var(--#{$prefix}
|
|
404
|
+
--qld-body-color: var(--#{$prefix}dark-link);
|
|
425
405
|
}
|
|
426
406
|
}
|
|
427
407
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// callout.stories.js
|
|
2
|
-
import { Callout } from
|
|
3
|
-
import defaultdata from
|
|
2
|
+
import { Callout } from "./Callout.js";
|
|
3
|
+
import defaultdata from "./callout.data.json";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
tags: [
|
|
7
|
-
title:
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
title: "3. Components/Callout",
|
|
8
8
|
render: (args) => new Callout(args).html,
|
|
9
9
|
|
|
10
10
|
argTypes: {
|
|
11
11
|
title: {
|
|
12
|
-
name:
|
|
12
|
+
name: "Title",
|
|
13
13
|
description: `H3 title text for the callout.`,
|
|
14
14
|
},
|
|
15
15
|
content: {
|
|
16
|
-
name:
|
|
17
|
-
description:
|
|
16
|
+
name: "Content",
|
|
17
|
+
description: "Text content for the callout. Can include HTML markup.",
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
|
|
@@ -57,10 +57,8 @@ export const Light = {
|
|
|
57
57
|
args: defaultdata.default,
|
|
58
58
|
parameters: {
|
|
59
59
|
backgrounds: {
|
|
60
|
-
default:
|
|
61
|
-
values: [
|
|
62
|
-
{ name: 'Light', value: 'var(--qld-light-background)' },
|
|
63
|
-
],
|
|
60
|
+
default: "Light",
|
|
61
|
+
values: [{ name: "Light", value: "var(--qld-light-background)" }],
|
|
64
62
|
},
|
|
65
63
|
},
|
|
66
64
|
decorators: [
|
|
@@ -83,10 +81,8 @@ export const Alternative = {
|
|
|
83
81
|
args: defaultdata.default,
|
|
84
82
|
parameters: {
|
|
85
83
|
backgrounds: {
|
|
86
|
-
default:
|
|
87
|
-
values: [
|
|
88
|
-
{ name: 'Alternative', value: 'var(--qld-light-grey-alt)' },
|
|
89
|
-
],
|
|
84
|
+
default: "Alternative",
|
|
85
|
+
values: [{ name: "Alternative", value: "var(--qld-light-grey-alt)" }],
|
|
90
86
|
},
|
|
91
87
|
},
|
|
92
88
|
decorators: [
|
|
@@ -109,10 +105,8 @@ export const Dark = {
|
|
|
109
105
|
args: defaultdata.default,
|
|
110
106
|
parameters: {
|
|
111
107
|
backgrounds: {
|
|
112
|
-
default:
|
|
113
|
-
values: [
|
|
114
|
-
{ name: 'Dark', value: 'var(--qld-brand-primary)' },
|
|
115
|
-
],
|
|
108
|
+
default: "Dark",
|
|
109
|
+
values: [{ name: "Dark", value: "var(--qld-dark-background)" }],
|
|
116
110
|
},
|
|
117
111
|
},
|
|
118
112
|
decorators: [
|
|
@@ -135,9 +129,9 @@ export const DarkAlternative = {
|
|
|
135
129
|
args: defaultdata.default,
|
|
136
130
|
parameters: {
|
|
137
131
|
backgrounds: {
|
|
138
|
-
default:
|
|
132
|
+
default: "Dark alternative",
|
|
139
133
|
values: [
|
|
140
|
-
{ name:
|
|
134
|
+
{ name: "Dark alternative", value: "var(--qld-dark-alt-background)" },
|
|
141
135
|
],
|
|
142
136
|
},
|
|
143
137
|
},
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// card--icon-list-footer.stories.js
|
|
2
|
+
import { Card } from "./Card.js";
|
|
3
|
+
import { Link } from "../link/link.js";
|
|
4
|
+
import defaultdata from "./card.data.json";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
title: "3. Components/Card/Icon List Footer",
|
|
9
|
+
render: (args) => {
|
|
10
|
+
// Create icon list for card footer following Figma design pattern
|
|
11
|
+
const figmaLinkData = {
|
|
12
|
+
title: "Related links",
|
|
13
|
+
linkList: [
|
|
14
|
+
{
|
|
15
|
+
url: "#",
|
|
16
|
+
id: "link-1",
|
|
17
|
+
label: "Label",
|
|
18
|
+
target: "_self",
|
|
19
|
+
arialabel: "Label",
|
|
20
|
+
iconClass: "qld-icon-arrow-right",
|
|
21
|
+
iconPosition: "leading",
|
|
22
|
+
download: null,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
url: "#",
|
|
26
|
+
id: "link-2",
|
|
27
|
+
label: "Label",
|
|
28
|
+
target: "_self",
|
|
29
|
+
arialabel: "Label",
|
|
30
|
+
iconClass: "qld-icon-profile",
|
|
31
|
+
iconPosition: "leading",
|
|
32
|
+
download: null,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
url: "#",
|
|
36
|
+
id: "link-3",
|
|
37
|
+
label: "Label",
|
|
38
|
+
target: "_self",
|
|
39
|
+
arialabel: "Label",
|
|
40
|
+
iconClass: "qld-icon-like",
|
|
41
|
+
iconPosition: "leading",
|
|
42
|
+
download: null,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
const iconListHtml = new Link(figmaLinkData).html;
|
|
47
|
+
|
|
48
|
+
return `
|
|
49
|
+
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
|
|
50
|
+
${new Card({ ...args, footer: iconListHtml }).html}
|
|
51
|
+
${new Card({ ...args, variantClass: "light", footer: iconListHtml }).html}
|
|
52
|
+
${new Card({ ...args, variantClass: "alt", footer: iconListHtml }).html}
|
|
53
|
+
${new Card({ ...args, variantClass: "dark", footer: iconListHtml }).html}
|
|
54
|
+
${new Card({ ...args, variantClass: "dark-alt", footer: iconListHtml }).html}
|
|
55
|
+
${
|
|
56
|
+
new Card({
|
|
57
|
+
...args,
|
|
58
|
+
iconClasses: "qld-icon-design",
|
|
59
|
+
iconPosition: "icon-left",
|
|
60
|
+
footer: iconListHtml,
|
|
61
|
+
}).html
|
|
62
|
+
}
|
|
63
|
+
${
|
|
64
|
+
new Card({
|
|
65
|
+
...args,
|
|
66
|
+
iconClasses: "qld-icon-design",
|
|
67
|
+
iconPosition: "icon-top",
|
|
68
|
+
footer: iconListHtml,
|
|
69
|
+
}).html
|
|
70
|
+
}
|
|
71
|
+
${
|
|
72
|
+
new Card({
|
|
73
|
+
...args,
|
|
74
|
+
image: "./img/image-placeholder.png",
|
|
75
|
+
imageAlt: "A grey placeholder image with an icon in the centre.",
|
|
76
|
+
footer: iconListHtml,
|
|
77
|
+
}).html
|
|
78
|
+
}
|
|
79
|
+
${
|
|
80
|
+
new Card({
|
|
81
|
+
...args,
|
|
82
|
+
image: "./img/image-placeholder.png",
|
|
83
|
+
imageAlt: "A grey placeholder image with an icon in the centre.",
|
|
84
|
+
video: true,
|
|
85
|
+
videoDuration: "2:34",
|
|
86
|
+
footer: iconListHtml,
|
|
87
|
+
}).html
|
|
88
|
+
}
|
|
89
|
+
</div>
|
|
90
|
+
`;
|
|
91
|
+
},
|
|
92
|
+
args: {
|
|
93
|
+
...defaultdata.multiAction,
|
|
94
|
+
title: "Card with Icon List Footer",
|
|
95
|
+
description:
|
|
96
|
+
"This card demonstrates the proper nesting of an Icon List component into the Card Footer following the Figma design pattern with 0.75rem gap spacing between links and 12px gap between icons and text.",
|
|
97
|
+
},
|
|
98
|
+
argTypes: {
|
|
99
|
+
date: {
|
|
100
|
+
control: "text",
|
|
101
|
+
},
|
|
102
|
+
variantClass: {
|
|
103
|
+
control: "select",
|
|
104
|
+
options: {
|
|
105
|
+
Default: "default",
|
|
106
|
+
Light: "light",
|
|
107
|
+
Alternative: "alt",
|
|
108
|
+
Dark: "dark",
|
|
109
|
+
"Dark alternative": "dark-alt",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
action: {
|
|
113
|
+
control: "select",
|
|
114
|
+
options: {
|
|
115
|
+
None: "no",
|
|
116
|
+
Single: "single",
|
|
117
|
+
Multi: "multi",
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
parameters: {
|
|
122
|
+
docs: {
|
|
123
|
+
description: {
|
|
124
|
+
story:
|
|
125
|
+
"This story demonstrates how to properly nest an Icon List component into the Card Footer following the Figma design pattern with 0.75rem gap spacing between links and 12px gap between icons and text. Each link uses consistent 'Label' text with different leading icons (arrow-right, profile, like) as shown in the design reference.",
|
|
126
|
+
},
|
|
127
|
+
controls: {
|
|
128
|
+
exclude: ["link", "arrow", "iconPosition", "footer"],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
design: {
|
|
132
|
+
name: "QGDS Figma Reference - Cards",
|
|
133
|
+
type: "figma",
|
|
134
|
+
url: "https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=card-component",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const Default = {};
|
|
140
|
+
|
|
141
|
+
export const WithLeadingIcons = {
|
|
142
|
+
name: "With leading icon variant",
|
|
143
|
+
args: {
|
|
144
|
+
iconClasses: "qld-icon-design",
|
|
145
|
+
iconPosition: "icon-left",
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const LightTheme = {
|
|
150
|
+
name: "Light theme with icon list",
|
|
151
|
+
args: {
|
|
152
|
+
variantClass: "light",
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const DarkTheme = {
|
|
157
|
+
name: "Dark theme with icon list",
|
|
158
|
+
args: {
|
|
159
|
+
variantClass: "dark",
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export const WithVideo = {
|
|
164
|
+
name: "Video card with icon list footer",
|
|
165
|
+
args: {
|
|
166
|
+
image: "./img/image-placeholder.png",
|
|
167
|
+
imageAlt: "A grey placeholder image with an icon in the centre.",
|
|
168
|
+
video: true,
|
|
169
|
+
videoDuration: "2:34",
|
|
170
|
+
},
|
|
171
|
+
};
|