@qld-gov-au/qgds-bootstrap5 2.1.0 → 2.1.1
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/preview.js +15 -6
- package/dist/assets/components/bs5/callToAction/callToAction.hbs +3 -3
- package/dist/assets/components/bs5/dateinput/dateinput.hbs +21 -27
- package/dist/assets/components/bs5/globalAlert/globalAlert.hbs +8 -1
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/pagination/pagination.hbs +7 -2
- package/dist/assets/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
- package/dist/assets/components/bs5/searchInput/searchInput.hbs +2 -2
- 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.init.min.js +50 -44
- package/dist/assets/js/handlebars.init.min.js.map +2 -2
- package/dist/assets/js/handlebars.partials.js +50 -44
- package/dist/assets/js/handlebars.partials.js.map +2 -2
- package/dist/assets/js/qld.bootstrap.min.js +6 -6
- package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
- package/dist/assets/node/handlebars.init.min.js +15 -8
- package/dist/assets/node/handlebars.init.min.js.map +2 -2
- package/dist/components/bs5/callToAction/callToAction.hbs +3 -3
- package/dist/components/bs5/dateinput/dateinput.hbs +21 -27
- package/dist/components/bs5/globalAlert/globalAlert.hbs +8 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/pagination/pagination.hbs +7 -2
- package/dist/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
- package/dist/components/bs5/searchInput/searchInput.hbs +2 -2
- package/dist/package.json +33 -32
- package/dist/sample-data/callToAction/callToAction.data.json +2 -1
- package/dist/sample-data/dateinput/dateinput.data.json +3 -1
- package/dist/sample-data/pagination/pagination.data.json +4 -4
- package/dist/sample-data/promotionalPanel/promotionalPanel.data.json +45 -47
- package/package.json +33 -32
- package/src/components/bs5/breadcrumbs/breadcrumbs.scss +1 -0
- package/src/components/bs5/button/button.scss +1 -0
- package/src/components/bs5/button/button.stories.js +16 -4
- package/src/components/bs5/callToAction/callToAction.data.json +2 -1
- package/src/components/bs5/callToAction/callToAction.hbs +3 -3
- package/src/components/bs5/callToAction/callToAction.stories.js +2 -2
- package/src/components/bs5/card/card.scss +2 -2
- package/src/components/bs5/dateinput/Dateinput.js +1 -38
- package/src/components/bs5/dateinput/Dateinput.mdx +27 -0
- package/src/components/bs5/dateinput/Dateinput.stories.js +48 -4
- package/src/components/bs5/dateinput/dateinput.data.json +3 -1
- package/src/components/bs5/dateinput/dateinput.functions.js +91 -0
- package/src/components/bs5/dateinput/dateinput.hbs +21 -27
- package/src/components/bs5/formcheck/formcheck.scss +5 -0
- package/src/components/bs5/globalAlert/globalAlert.hbs +8 -1
- package/src/components/bs5/globalAlert/globalAlert.scss +14 -19
- package/src/components/bs5/globalAlert/globalAlert.stories.js +1 -0
- package/src/components/bs5/globalAlert/globalAlert.test.js +10 -5
- package/src/components/bs5/inpageAlert/inpageAlert.scss +3 -4
- package/src/components/bs5/inpagenav/inpagenav.scss +9 -1
- package/src/components/bs5/modal/modal.scss +1 -1
- package/src/components/bs5/navbar/navbar.functions.js +39 -28
- package/src/components/bs5/navbar/navbar.scss +43 -28
- package/src/components/bs5/navbar/navbar.stories.js +4 -3
- package/src/components/bs5/pagination/pagination.data.json +4 -4
- package/src/components/bs5/pagination/pagination.hbs +7 -2
- package/src/components/bs5/pagination/pagination.scss +1 -1
- package/src/components/bs5/promotionalPanel/promotionalPanel.data.json +45 -47
- package/src/components/bs5/promotionalPanel/promotionalPanel.hbs +1 -1
- package/src/components/bs5/quickexit/quickexit.scss +1 -1
- package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +2 -2
- package/src/components/bs5/searchInput/search.functions.js +9 -5
- package/src/components/bs5/searchInput/searchInput.hbs +2 -2
- package/src/components/bs5/searchInput/searchInput.scss +1 -0
- package/src/components/bs5/sidenav/sidenav.scss +17 -19
- package/src/components/bs5/table/table.scss +93 -83
- package/src/css/main.scss +3 -0
- package/src/css/mixins/focusable.scss +1 -1
- package/src/css/qld-reduced-motion.scss +51 -0
- package/src/css/qld-tokens.scss +3 -3
- package/src/css/qld-type.scss +7 -13
- package/src/js/constants.js +10 -0
- package/src/js/qld.bootstrap.js +99 -99
- package/src/js/utils.js +3 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<a class="qld-cta-link {{getClassNames "small, view-all" class}}"
|
|
2
2
|
{{#if id}}id="{{id}}"{{/if}}
|
|
3
|
-
href="{{href}}"
|
|
4
|
-
target="{{target}}"
|
|
5
|
-
{{#if arialabel}}aria-label="{{arialabel}}"{{/if}}
|
|
3
|
+
href="{{href}}"
|
|
4
|
+
target="{{target}}"
|
|
5
|
+
{{#if arialabel}}aria-label="{{arialabel}}"{{/if}}
|
|
6
6
|
>
|
|
7
7
|
{{label}}
|
|
8
8
|
<span class="icon" aria-hidden="true"></span>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<!-- QGDS Component: Date input -->
|
|
2
2
|
|
|
3
|
-
<label id="{{id}}-label"
|
|
4
|
-
class="qld-text-input-label {{#if isRequired}}field-required{{/if}} {{#if isDisabled}}field-disabled{{/if}}"
|
|
5
|
-
for="{{id}}">
|
|
3
|
+
<label id="{{id}}-label" class="qld-text-input-label {{#if isRequired}}field-required{{/if}} {{#if isDisabled}}field-disabled{{/if}}" for="{{id}}">
|
|
6
4
|
{{label-text}}
|
|
7
5
|
{{#if optional-text}}
|
|
8
6
|
<span class="label-text-optional">({{optional-text}})</span>
|
|
@@ -12,53 +10,49 @@
|
|
|
12
10
|
{{#if hint-text}}
|
|
13
11
|
<span class="qld-hint-text" id="{{id}}-hint">{{hint-text}}</span>
|
|
14
12
|
{{/if}}
|
|
15
|
-
|
|
16
13
|
{{#contains "qld-input-success" customClass}}{{! legacy support for feedback classes `qld-input-success`}}
|
|
17
14
|
<span class="qld-input-success">{{successMessageText}}</span>
|
|
18
|
-
{{else}}
|
|
19
|
-
{{#if successMessageText}}{{! updated bootstrap style classes - `valid-feedback`}}
|
|
15
|
+
{{else if successMessageText}}{{! updated bootstrap style classes - `valid-feedback`}}
|
|
20
16
|
<div class="valid-feedback">{{successMessageText}}</div>
|
|
21
|
-
{{/
|
|
22
|
-
|
|
17
|
+
{{/contains}}
|
|
23
18
|
{{#contains "qld-input-error" customClass}}{{! legacy support for feedback classes `qld-input-error`}}
|
|
24
19
|
<span class="qld-input-error">{{errorMessageText}}</span>
|
|
25
|
-
{{else}}
|
|
26
|
-
{{#if errorMessageText}}{{! updated bootstrap style classes - `invalid-feedback`}}
|
|
20
|
+
{{else if errorMessageText}}{{! updated bootstrap style classes - `invalid-feedback`}}
|
|
27
21
|
<div class="invalid-feedback">{{errorMessageText}}</div>
|
|
28
|
-
{{/
|
|
22
|
+
{{/contains}}
|
|
29
23
|
|
|
30
24
|
<div aria-labelledby="{{id}}-label" role="group" class="row date-container {{customClass}}">
|
|
31
25
|
<!-- day group -->
|
|
32
26
|
<div class="day-group">
|
|
33
27
|
<label id="{{id}}-dayinput-label" for="{{id}}-dayinput" class="date-label qld-text-input-label">Day</label>
|
|
34
28
|
<div>
|
|
35
|
-
<input id="{{id}}-dayinput" aria-
|
|
36
|
-
inputmode="numeric" maxlength="2"
|
|
37
|
-
class="
|
|
38
|
-
|
|
39
|
-
{{/if}}>
|
|
29
|
+
<input id="{{id}}-dayinput" aria-labelledby="{{id}}-label {{id}}-dayinput-label" placeholder="{{day-placeholder}}" type="text"
|
|
30
|
+
inputmode="numeric" maxlength="2" minlength="2" min="1" max="31" pattern="^(0?[1-9]|[12][0-9]|3[01])$"
|
|
31
|
+
class="form-control dayinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}}
|
|
32
|
+
{{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}" ref="day"
|
|
33
|
+
aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}>
|
|
40
34
|
</div>
|
|
41
35
|
</div>
|
|
42
36
|
<!-- month group -->
|
|
43
37
|
<div class="date-group">
|
|
44
38
|
<label id="{{id}}-monthinput-label" for="{{id}}-monthinput" class="date-label qld-text-input-label">Month</label>
|
|
45
39
|
<div>
|
|
46
|
-
<input id="{{id}}-monthinput" aria-
|
|
47
|
-
type="text" inputmode="numeric" maxlength="2"
|
|
48
|
-
class="
|
|
49
|
-
|
|
50
|
-
{{/if}}>
|
|
40
|
+
<input id="{{id}}-monthinput" aria-labelledby="{{id}}-label {{id}}-monthinput-label" placeholder="{{month-placeholder}}"
|
|
41
|
+
type="text" inputmode="numeric" maxlength="2" minlength="2" min="1" max="12" pattern="^(0?[1-9]|[1][0-2])$"
|
|
42
|
+
class="form-control monthinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}}
|
|
43
|
+
{{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}" ref="month"
|
|
44
|
+
aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}>
|
|
51
45
|
</div>
|
|
52
46
|
</div>
|
|
53
47
|
<!-- year group -->
|
|
54
48
|
<div class="date-group">
|
|
55
|
-
<label id="{{id}}-yearinput-label" for="{{id}}-yearinput" class="date-label">Year</label>
|
|
49
|
+
<label id="{{id}}-yearinput-label" for="{{id}}-yearinput" class="date-label qld-text-input-label">Year</label>
|
|
56
50
|
<div class="year-label">
|
|
57
|
-
<input id="{{id}}-yearinput" aria-
|
|
58
|
-
placeholder="{{year-placeholder}}" type="text" inputmode="numeric" maxlength="4"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
isRequired}}required{{/if}}>
|
|
51
|
+
<input id="{{id}}-yearinput" aria-labelledby="{{id}}-label {{id}}-yearinput-label"
|
|
52
|
+
placeholder="{{year-placeholder}}" type="text" inputmode="numeric" maxlength="4" minlength="4" pattern="[0-9]*"
|
|
53
|
+
{{#if yearMin}}min="{{yearMin}}"{{/if}} {{#if yearMax}}max="{{yearMax}}"{{/if}}
|
|
54
|
+
class="form-control yearinput {{customClass}} {{#if isFilled}}form-style-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}"
|
|
55
|
+
ref="year" aria-invalid="false" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}>
|
|
62
56
|
</div>
|
|
63
57
|
</div>
|
|
64
58
|
</div>
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
<div class="global-alert-include">
|
|
4
4
|
{{#each alertItems}}
|
|
5
5
|
<section role="region" class="global-alert alert container-full d-none {{variant}}" data-variant="{{variant}}"
|
|
6
|
-
|
|
6
|
+
{{#if ariaLabel}} aria-label="{{ ariaLabel }}"
|
|
7
|
+
{{~else ifCond variant "==" "global-alert-critical"}} aria-label="Critical alert"
|
|
8
|
+
{{~else ifCond variant "==" "global-alert-info"}} aria-label="Informational alert"
|
|
9
|
+
{{~else ifCond variant "==" "global-alert-warning"}} aria-label="Warning alert"
|
|
10
|
+
{{~else}} aria-label="Informational alert"
|
|
11
|
+
{{~/if}}
|
|
12
|
+
{{#if id}} data-id="{{id}}" {{/if}}{{#if dismissedExpiryDays}}
|
|
7
13
|
data-expiry-days="{{dismissedExpiryDays}}" {{/if}}>
|
|
8
14
|
<div class="qld-global-alert-main">
|
|
9
15
|
<div class="global-alert-icon">
|
|
@@ -13,6 +19,7 @@
|
|
|
13
19
|
<span class="qld-icon qld-icon-sm qld-icon-alert-information" aria-hidden="true"></span>
|
|
14
20
|
{{else ifCond variant '==' 'global-alert-warning'}}
|
|
15
21
|
<span class="qld-icon qld-icon-sm qld-icon-alert-warning" aria-hidden="true"></span>
|
|
22
|
+
{{else}}<span class="qld-icon qld-icon-sm qld-icon-alert-information" aria-hidden="true"></span>
|
|
16
23
|
{{/ifCond}}
|
|
17
24
|
</div>
|
|
18
25
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.
|
|
2
|
+
<!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.1","branch":"HEAD","tag":"v2.1.1","commit":"e9b014307ee0b957ab946f973a0bd735811415db","majorVersion":"v2"} -->
|
|
3
3
|
|
|
4
4
|
{{! Select environment, used verbatium if not using predefind key
|
|
5
5
|
cdn := PROD|STAGING|BETA|TEST|DEV|???
|
|
@@ -23,8 +23,13 @@ Reference: https://getbootstrap.com/docs/5.0/components/pagination/
|
|
|
23
23
|
{{! More button }}
|
|
24
24
|
<span></span>
|
|
25
25
|
{{else}}
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
{{#ifCond "active" "in" customClasses}}
|
|
27
|
+
{{! Active page - not a link }}
|
|
28
|
+
<span class="page-link" aria-current="page" aria-label="{{#if arialabel}}{{arialabel}}{{else}}Page {{linktext}}, current page{{/if}}">{{ linktext }}</span>
|
|
29
|
+
{{else}}
|
|
30
|
+
{{! Page button }}
|
|
31
|
+
<a class="page-link" href="{{href}}" aria-label="{{#if arialabel}}{{arialabel}}{{else}}Page {{linktext}}{{/if}}">{{ linktext }}</a>
|
|
32
|
+
{{/ifCond}}
|
|
28
33
|
{{/if}}
|
|
29
34
|
</li>
|
|
30
35
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
{{/ifCond}}>
|
|
6
6
|
<div class="image-panel">
|
|
7
7
|
{{#ifCond type '!=' 'promo'}}
|
|
8
|
-
<img class="promo-panel-image" src="{{promoImage}}" alt="Promotional
|
|
8
|
+
<img class="promo-panel-image" src="{{promoImage}}" alt="{{isdefined promoImageDescription "Promotional image"}}">
|
|
9
9
|
{{else}}
|
|
10
10
|
<div class="promo-panel-image"></div>
|
|
11
11
|
{{/ifCond}}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<div class="qld-search-input {{customClass}}">
|
|
5
5
|
<input id="{{ inputID }}" name="{{ inputName }}" class="form-control" type="text" autocomplete="off"
|
|
6
6
|
aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} placeholder="{{placeholder}}" />
|
|
7
|
-
<button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}">
|
|
8
|
-
<span class="btn-icon"></span>
|
|
7
|
+
<button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}" aria-label="{{ buttonLabel }}">
|
|
8
|
+
<span class="btn-icon" aria-hidden="true"></span>
|
|
9
9
|
<span class="btn-label">{{ buttonLabel }}</span>
|
|
10
10
|
</button>
|
|
11
11
|
{{#ifCond hasDynamicSuggestions '||' hasDefaultSuggestions}}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qld-gov-au/qgds-bootstrap5",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,13 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"prepare": "husky && npm run build",
|
|
15
|
+
"ci:all": "npm ci && npm run lint && npm run test:run && npm run test:integration && npm run build && npm run build-storybook",
|
|
15
16
|
"start": "npm run build",
|
|
16
17
|
"lint": "eslint --fix --ext .js,.json --ignore-pattern 'docs/*' --ignore-pattern 'dist/*' --ignore-pattern 'storybook-static/*' --ignore-pattern 'src/js/handlebars.partials.js' .",
|
|
17
18
|
"build": "node esbuild.js",
|
|
18
19
|
"build:icons": "node esbuild.js --icons",
|
|
19
20
|
"build:theme": "node esbuild.js --theme",
|
|
20
21
|
"build:theme:icons": "node esbuild.js --theme --icons",
|
|
21
|
-
"test": "vitest",
|
|
22
|
+
"test": "vitest watch",
|
|
23
|
+
"test:run": "vitest run",
|
|
22
24
|
"test:ui": "vitest --ui",
|
|
23
25
|
"test:integration": "npm-run-all --parallel --race serve:test test:testrunner",
|
|
24
26
|
"test:testrunner": "sleep 2 && mocha --timeout 10000 --require ./test/testServer.test.js ",
|
|
@@ -53,56 +55,55 @@
|
|
|
53
55
|
"bootstrap": "^5.3.8"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
|
-
"@chromatic-com/storybook": "^4.1.
|
|
58
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
57
59
|
"@eslint/eslintrc": "^3.3.1",
|
|
58
|
-
"@eslint/json": "^0.
|
|
60
|
+
"@eslint/json": "^0.14.0",
|
|
59
61
|
"@qld-gov-au/qgds-tokens": "^1.2.1",
|
|
60
|
-
"@storybook/addon-a11y": "^
|
|
61
|
-
"@storybook/addon-docs": "^
|
|
62
|
-
"@storybook/addon-links": "^
|
|
63
|
-
"@storybook/addon-themes": "^
|
|
64
|
-
"@storybook/cli": "^
|
|
65
|
-
"@storybook/html-vite": "^
|
|
66
|
-
"@
|
|
67
|
-
"@vitest/ui": "^3.2.4",
|
|
62
|
+
"@storybook/addon-a11y": "^10.0.8",
|
|
63
|
+
"@storybook/addon-docs": "^10.0.8",
|
|
64
|
+
"@storybook/addon-links": "^10.0.8",
|
|
65
|
+
"@storybook/addon-themes": "^10.0.8",
|
|
66
|
+
"@storybook/cli": "^10.0.8",
|
|
67
|
+
"@storybook/html-vite": "^10.0.8",
|
|
68
|
+
"@vitest/ui": "^4.0.10",
|
|
68
69
|
"autoprefixer": "^10.4.20",
|
|
69
|
-
"chai": "^
|
|
70
|
-
"chalk": "^5.
|
|
71
|
-
"chromatic": "^13.3.
|
|
72
|
-
"esbuild": "0.
|
|
70
|
+
"chai": "^6.2.1",
|
|
71
|
+
"chalk": "^5.6.2",
|
|
72
|
+
"chromatic": "^13.3.3",
|
|
73
|
+
"esbuild": "0.27.0",
|
|
73
74
|
"esbuild-plugin-copy": "^2.1.1",
|
|
74
|
-
"esbuild-plugin-eslint": "^0.3.
|
|
75
|
+
"esbuild-plugin-eslint": "^0.3.12",
|
|
75
76
|
"esbuild-plugin-handlebars": "1.0.3",
|
|
76
77
|
"esbuild-sass-plugin": "3.3.1",
|
|
77
|
-
"eslint": "9.
|
|
78
|
+
"eslint": "9.39.1",
|
|
78
79
|
"eslint-plugin-json": "^4.0.1",
|
|
79
|
-
"eslint-plugin-storybook": "^
|
|
80
|
-
"globals": "16.
|
|
80
|
+
"eslint-plugin-storybook": "^10.0.8",
|
|
81
|
+
"globals": "16.5.0",
|
|
81
82
|
"handlebars": "4.7.8",
|
|
82
83
|
"http-server": "^14.1.1",
|
|
83
84
|
"husky": "^9.1.7",
|
|
84
|
-
"jsdom": "^
|
|
85
|
+
"jsdom": "^27.2.0",
|
|
85
86
|
"mini-svg-data-uri": "^1.4.4",
|
|
86
87
|
"minimist": "^1.2.8",
|
|
87
|
-
"mocha": "^11.
|
|
88
|
+
"mocha": "^11.7.5",
|
|
88
89
|
"node-html-parser": "^7.0.1",
|
|
89
90
|
"npm-run-all2": "^8.0.4",
|
|
90
91
|
"onchange": "^7.1.0",
|
|
91
|
-
"portfinder": "^1.0.
|
|
92
|
-
"postcss": "^8.5.
|
|
92
|
+
"portfinder": "^1.0.38",
|
|
93
|
+
"postcss": "^8.5.6",
|
|
93
94
|
"prettier": "3.6.2",
|
|
94
95
|
"raw-loader": "^4.0.2",
|
|
95
|
-
"rimraf": "^6.0
|
|
96
|
+
"rimraf": "^6.1.0",
|
|
96
97
|
"run-parallel": "^1.2.0",
|
|
97
|
-
"sass": "^1.
|
|
98
|
-
"selenium-webdriver": "^4.
|
|
99
|
-
"storybook": "^
|
|
100
|
-
"storybook-addon-deep-controls": "^0.
|
|
101
|
-
"vite": "^
|
|
102
|
-
"vitest": "^
|
|
98
|
+
"sass": "^1.94.0",
|
|
99
|
+
"selenium-webdriver": "^4.38.0",
|
|
100
|
+
"storybook": "^10.0.8",
|
|
101
|
+
"storybook-addon-deep-controls": "^0.10.0",
|
|
102
|
+
"vite": "^7.1.11",
|
|
103
|
+
"vitest": "^4.0.10"
|
|
103
104
|
},
|
|
104
105
|
"peerDependencies": {
|
|
105
|
-
"typescript": "
|
|
106
|
+
"typescript": ">=5.0.0 <5.9.0"
|
|
106
107
|
},
|
|
107
108
|
"exports": {
|
|
108
109
|
"./qld.bootstrap.min.js": "./dist/assets/js/qld.bootstrap.min.js",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
},
|
|
13
13
|
|
|
14
14
|
"pages": [
|
|
15
|
-
{ "href": "#", "linktext": "1", "customClasses": "" },
|
|
16
|
-
{ "href": "#", "linktext": "2", "customClasses": "active" },
|
|
17
|
-
{ "href": "#", "linktext": "3", "customClasses": "" },
|
|
15
|
+
{ "href": "#", "linktext": "1", "arialabel": "Page 1", "customClasses": "" },
|
|
16
|
+
{ "href": "#", "linktext": "2", "arialabel": "Page 2, current page", "customClasses": "active" },
|
|
17
|
+
{ "href": "#", "linktext": "3", "arialabel": "Page 3", "customClasses": "" },
|
|
18
18
|
{ "href": "#", "linktext": "", "customClasses": "more", "more": true },
|
|
19
|
-
{ "href": "#", "linktext": "7", "customClasses": "" }
|
|
19
|
+
{ "href": "#", "linktext": "7", "arialabel": "Page 7", "customClasses": "" }
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
}
|
|
2
|
+
"type": "indent-text",
|
|
3
|
+
"variantClass": "light",
|
|
4
|
+
"promoImage": "./assets/img/banner-example-3-to-2.jpg",
|
|
5
|
+
"promoImageDescription": "Promotional image",
|
|
6
|
+
"contentAlignment": "content-left",
|
|
7
|
+
"icon": "icon-dot-grid",
|
|
8
|
+
"title": "Title goes here and has a maximum of 65 character limit",
|
|
9
|
+
"abstract": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis.",
|
|
10
|
+
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis. Vel suspendisse mi quisque consequat aliquet egestas.",
|
|
11
|
+
"cta": {
|
|
12
|
+
"items": [
|
|
13
|
+
{
|
|
14
|
+
"url": "#",
|
|
15
|
+
"id": "https://www.wired.com",
|
|
16
|
+
"value": "Label",
|
|
17
|
+
"target": "_blank",
|
|
18
|
+
"class": [{ "small": false }, { "view-all": false }]
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"btn": {
|
|
23
|
+
"items": [
|
|
24
|
+
{
|
|
25
|
+
"variantClass": "btn-primary",
|
|
26
|
+
"islink": true,
|
|
27
|
+
"isdisabled": false,
|
|
28
|
+
"iconClass": "",
|
|
29
|
+
"iconPosition": "",
|
|
30
|
+
"label": "Primary",
|
|
31
|
+
"href": "https://google.com",
|
|
32
|
+
"target": "_self"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"variantClass": "btn-secondary",
|
|
36
|
+
"islink": true,
|
|
37
|
+
"isdisabled": false,
|
|
38
|
+
"iconClass": "",
|
|
39
|
+
"iconPosition": "",
|
|
40
|
+
"label": "Secondary",
|
|
41
|
+
"href": "https://google.com",
|
|
42
|
+
"target": "_self"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qld-gov-au/qgds-bootstrap5",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,13 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"prepare": "husky && npm run build",
|
|
15
|
+
"ci:all": "npm ci && npm run lint && npm run test:run && npm run test:integration && npm run build && npm run build-storybook",
|
|
15
16
|
"start": "npm run build",
|
|
16
17
|
"lint": "eslint --fix --ext .js,.json --ignore-pattern 'docs/*' --ignore-pattern 'dist/*' --ignore-pattern 'storybook-static/*' --ignore-pattern 'src/js/handlebars.partials.js' .",
|
|
17
18
|
"build": "node esbuild.js",
|
|
18
19
|
"build:icons": "node esbuild.js --icons",
|
|
19
20
|
"build:theme": "node esbuild.js --theme",
|
|
20
21
|
"build:theme:icons": "node esbuild.js --theme --icons",
|
|
21
|
-
"test": "vitest",
|
|
22
|
+
"test": "vitest watch",
|
|
23
|
+
"test:run": "vitest run",
|
|
22
24
|
"test:ui": "vitest --ui",
|
|
23
25
|
"test:integration": "npm-run-all --parallel --race serve:test test:testrunner",
|
|
24
26
|
"test:testrunner": "sleep 2 && mocha --timeout 10000 --require ./test/testServer.test.js ",
|
|
@@ -53,56 +55,55 @@
|
|
|
53
55
|
"bootstrap": "^5.3.8"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
|
-
"@chromatic-com/storybook": "^4.1.
|
|
58
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
57
59
|
"@eslint/eslintrc": "^3.3.1",
|
|
58
|
-
"@eslint/json": "^0.
|
|
60
|
+
"@eslint/json": "^0.14.0",
|
|
59
61
|
"@qld-gov-au/qgds-tokens": "^1.2.1",
|
|
60
|
-
"@storybook/addon-a11y": "^
|
|
61
|
-
"@storybook/addon-docs": "^
|
|
62
|
-
"@storybook/addon-links": "^
|
|
63
|
-
"@storybook/addon-themes": "^
|
|
64
|
-
"@storybook/cli": "^
|
|
65
|
-
"@storybook/html-vite": "^
|
|
66
|
-
"@
|
|
67
|
-
"@vitest/ui": "^3.2.4",
|
|
62
|
+
"@storybook/addon-a11y": "^10.0.8",
|
|
63
|
+
"@storybook/addon-docs": "^10.0.8",
|
|
64
|
+
"@storybook/addon-links": "^10.0.8",
|
|
65
|
+
"@storybook/addon-themes": "^10.0.8",
|
|
66
|
+
"@storybook/cli": "^10.0.8",
|
|
67
|
+
"@storybook/html-vite": "^10.0.8",
|
|
68
|
+
"@vitest/ui": "^4.0.10",
|
|
68
69
|
"autoprefixer": "^10.4.20",
|
|
69
|
-
"chai": "^
|
|
70
|
-
"chalk": "^5.
|
|
71
|
-
"chromatic": "^13.3.
|
|
72
|
-
"esbuild": "0.
|
|
70
|
+
"chai": "^6.2.1",
|
|
71
|
+
"chalk": "^5.6.2",
|
|
72
|
+
"chromatic": "^13.3.3",
|
|
73
|
+
"esbuild": "0.27.0",
|
|
73
74
|
"esbuild-plugin-copy": "^2.1.1",
|
|
74
|
-
"esbuild-plugin-eslint": "^0.3.
|
|
75
|
+
"esbuild-plugin-eslint": "^0.3.12",
|
|
75
76
|
"esbuild-plugin-handlebars": "1.0.3",
|
|
76
77
|
"esbuild-sass-plugin": "3.3.1",
|
|
77
|
-
"eslint": "9.
|
|
78
|
+
"eslint": "9.39.1",
|
|
78
79
|
"eslint-plugin-json": "^4.0.1",
|
|
79
|
-
"eslint-plugin-storybook": "^
|
|
80
|
-
"globals": "16.
|
|
80
|
+
"eslint-plugin-storybook": "^10.0.8",
|
|
81
|
+
"globals": "16.5.0",
|
|
81
82
|
"handlebars": "4.7.8",
|
|
82
83
|
"http-server": "^14.1.1",
|
|
83
84
|
"husky": "^9.1.7",
|
|
84
|
-
"jsdom": "^
|
|
85
|
+
"jsdom": "^27.2.0",
|
|
85
86
|
"mini-svg-data-uri": "^1.4.4",
|
|
86
87
|
"minimist": "^1.2.8",
|
|
87
|
-
"mocha": "^11.
|
|
88
|
+
"mocha": "^11.7.5",
|
|
88
89
|
"node-html-parser": "^7.0.1",
|
|
89
90
|
"npm-run-all2": "^8.0.4",
|
|
90
91
|
"onchange": "^7.1.0",
|
|
91
|
-
"portfinder": "^1.0.
|
|
92
|
-
"postcss": "^8.5.
|
|
92
|
+
"portfinder": "^1.0.38",
|
|
93
|
+
"postcss": "^8.5.6",
|
|
93
94
|
"prettier": "3.6.2",
|
|
94
95
|
"raw-loader": "^4.0.2",
|
|
95
|
-
"rimraf": "^6.0
|
|
96
|
+
"rimraf": "^6.1.0",
|
|
96
97
|
"run-parallel": "^1.2.0",
|
|
97
|
-
"sass": "^1.
|
|
98
|
-
"selenium-webdriver": "^4.
|
|
99
|
-
"storybook": "^
|
|
100
|
-
"storybook-addon-deep-controls": "^0.
|
|
101
|
-
"vite": "^
|
|
102
|
-
"vitest": "^
|
|
98
|
+
"sass": "^1.94.0",
|
|
99
|
+
"selenium-webdriver": "^4.38.0",
|
|
100
|
+
"storybook": "^10.0.8",
|
|
101
|
+
"storybook-addon-deep-controls": "^0.10.0",
|
|
102
|
+
"vite": "^7.1.11",
|
|
103
|
+
"vitest": "^4.0.10"
|
|
103
104
|
},
|
|
104
105
|
"peerDependencies": {
|
|
105
|
-
"typescript": "
|
|
106
|
+
"typescript": ">=5.0.0 <5.9.0"
|
|
106
107
|
},
|
|
107
108
|
"exports": {
|
|
108
109
|
"./qld.bootstrap.min.js": "./dist/assets/js/qld.bootstrap.min.js",
|
|
@@ -48,7 +48,10 @@ function buttonVariantsMarkup() {
|
|
|
48
48
|
return `<div class="d-grid p-32">
|
|
49
49
|
<div class="fw-bold">${variantLabel}</div>
|
|
50
50
|
<div class="d-flex gap-3">
|
|
51
|
+
|
|
52
|
+
<!-- Example buttons -->
|
|
51
53
|
${variantButtons}
|
|
54
|
+
|
|
52
55
|
</div>
|
|
53
56
|
</div>`;
|
|
54
57
|
})
|
|
@@ -61,11 +64,20 @@ export default {
|
|
|
61
64
|
args: defaultdata,
|
|
62
65
|
render: (args) => {
|
|
63
66
|
return `
|
|
67
|
+
<!-- Wrapper div for storybook only -->
|
|
64
68
|
<div class="d-flex gap-3 p-32">
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
${new Button(
|
|
68
|
-
|
|
69
|
+
|
|
70
|
+
<!-- Example link presented as QGDS button -->
|
|
71
|
+
${new Button(args).html.trim()}
|
|
72
|
+
|
|
73
|
+
<!-- Example link presented as QGDS button -->
|
|
74
|
+
${new Button({ ...args, isdisabled: true }).html.trim()}
|
|
75
|
+
|
|
76
|
+
<!-- Example button presented as QGDS button -->
|
|
77
|
+
${new Button({ ...args, isprogress: true, iconClass: "", label: "Loading button", progressLabel: "Loading...", islink: false, dataatts: 'data-loading-btn="true"' }).html.trim()}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</div>
|
|
69
81
|
`; //expand arguments, specifically turn isdisabled into true
|
|
70
82
|
},
|
|
71
83
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<a class="qld-cta-link {{getClassNames "small, view-all" class}}"
|
|
2
2
|
{{#if id}}id="{{id}}"{{/if}}
|
|
3
|
-
href="{{href}}"
|
|
4
|
-
target="{{target}}"
|
|
5
|
-
{{#if arialabel}}aria-label="{{arialabel}}"{{/if}}
|
|
3
|
+
href="{{href}}"
|
|
4
|
+
target="{{target}}"
|
|
5
|
+
{{#if arialabel}}aria-label="{{arialabel}}"{{/if}}
|
|
6
6
|
>
|
|
7
7
|
{{label}}
|
|
8
8
|
<span class="icon" aria-hidden="true"></span>
|