@qhealth-design-system/core 1.22.2 → 1.23.0

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.
Files changed (78) hide show
  1. package/.storybook/assets/image-position-demo-portrait.svg +54 -0
  2. package/.storybook/assets/image-position-demo.svg +55 -0
  3. package/.storybook/globals.js +9 -0
  4. package/.storybook/preview.js +8 -1
  5. package/CHANGELOG.md +2 -0
  6. package/README.md +0 -6
  7. package/package.json +13 -33
  8. package/src/assets/img/svg-icons.svg +154 -154
  9. package/src/component-loader.js +11 -2
  10. package/src/components/_global/css/admin/component.scss +1 -0
  11. package/src/components/_global/css/btn/component.scss +9 -0
  12. package/src/components/_global/css/img/image-position-utility-classes.scss +30 -0
  13. package/src/components/_global/css/img/image-ratio-utility-classes.scss +41 -0
  14. package/src/components/_global/css/img/images.scss +74 -5
  15. package/src/components/_global/css/modal/component.scss +1 -0
  16. package/src/components/_global/js/animate/global.js +272 -294
  17. package/src/components/_global/js/collapsible.js +3 -3
  18. package/src/components/_global/js/global.js +304 -316
  19. package/src/components/_global/js/legacyGlobal.js +63 -0
  20. package/src/components/_global/js/modal/global.js +218 -223
  21. package/src/components/_global/js/popover/controller.js +4 -4
  22. package/src/components/_global/js/tabs/global.js +264 -276
  23. package/src/components/a-z_listing/js/global.js +106 -92
  24. package/src/components/accordion/css/component.scss +24 -41
  25. package/src/components/accordion/html/component.hbs +23 -5
  26. package/src/components/accordion/js/global.js +5 -10
  27. package/src/components/basic_search/js/global.js +0 -7
  28. package/src/components/code/js/global.js +6 -12
  29. package/src/components/file_upload/js/global.js +1 -5
  30. package/src/components/internal_navigation/css/component.scss +2 -2
  31. package/src/components/internal_navigation/html/component.hbs +16 -1
  32. package/src/components/main_navigation/js/global.js +341 -335
  33. package/src/components/overflow_menu/css/component.scss +1 -0
  34. package/src/components/search_box/css/component.scss +0 -1
  35. package/src/components/tab/js/global.js +5 -10
  36. package/src/components/toggle_tip/js/global.js +0 -6
  37. package/src/components/tool_tip/js/global.js +0 -6
  38. package/src/components/video_player/css/component.scss +27 -9
  39. package/src/components/video_player/html/component.hbs +32 -6
  40. package/src/components/video_player/js/global.js +8 -1
  41. package/src/index.js +4 -0
  42. package/src/stories/Accordion/accordion.stories.js +1 -0
  43. package/src/stories/Banner/bannerContained.stories.js +123 -0
  44. package/src/stories/Flexbox/Flexbox.stories.js +316 -0
  45. package/src/stories/Image/Image.stories.js +182 -0
  46. package/src/stories/Templates/ContentPage.stories.js +101 -0
  47. package/src/stories/Templates/LandingPage.stories.js +193 -0
  48. package/src/stories/Templates/templateHelpers.js +102 -0
  49. package/src/stories/VideoPlayer/VideoPlayer.stories.js +16 -0
  50. package/src/styles/imports/utilities.scss +15 -25
  51. package/src/styles/imports/variables.scss +26 -0
  52. package/src/components/_global/html/head.html +0 -22
  53. package/src/components/_global/html/scripts.html +0 -28
  54. package/src/components/_global/js/_polyfills/global.js +0 -19
  55. package/src/components/_template/html/component-page.html +0 -75
  56. package/src/components/_template/js/global.js +0 -3
  57. package/src/components/accordion/html/accordion-group.html +0 -163
  58. package/src/components/accordion/html/default.html +0 -99
  59. package/src/components/banner_basic/js/global.js +0 -3
  60. package/src/components/loading_spinner/js/global.js +0 -3
  61. package/src/components/pagination/html/default.html +0 -39
  62. package/src/components/search_box/html/component.html +0 -26
  63. package/src/data/current.json +0 -400
  64. package/src/data/current_admin.json +0 -305
  65. package/src/data/model_component.js +0 -14
  66. package/src/data/site.json +0 -977
  67. package/src/externals/tinymce_classes.css +0 -62
  68. package/src/html/component-global-elements.html +0 -2857
  69. package/src/html/component-horizontal_rule.html +0 -647
  70. package/src/html/component-internal_navigation.html +0 -583
  71. package/src/html/component-left_hand_navigation.html +0 -57
  72. package/src/html/component-main_navigation.html +0 -583
  73. package/src/html/component-multi_column.html +0 -582
  74. package/src/html/components.html +0 -354
  75. package/src/html/home.html +0 -1898
  76. package/src/html/index.html +0 -129
  77. package/src/html/inner-with-nav.html +0 -605
  78. package/src/html/inner.html +0 -618
@@ -0,0 +1,54 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 900" width="600" height="900" role="img" aria-label="A three by three grid of labelled zones used to show which part of an image survives a crop">
2
+ <title>Image position demo sheet, portrait</title>
3
+
4
+ <!--
5
+ The portrait twin of image-position-demo.svg, 2:3 instead of 3:2. A wide
6
+ crop of this one has plenty of height to spare, so the vertical half of each
7
+ position name has something to do.
8
+ -->
9
+
10
+ <g font-family="'Helvetica Neue', Arial, sans-serif" font-weight="700" text-anchor="middle">
11
+ <!-- Top row -->
12
+ <rect x="0" y="0" width="200" height="300" fill="#7ca3d4" />
13
+ <text x="100" y="140" font-size="28" fill="#0b1c30">LEFT</text>
14
+ <text x="100" y="176" font-size="28" fill="#0b1c30">TOP</text>
15
+
16
+ <rect x="200" y="0" width="200" height="300" fill="#a8c3e6" />
17
+ <text x="300" y="162" font-size="32" fill="#0b1c30">TOP</text>
18
+
19
+ <rect x="400" y="0" width="200" height="300" fill="#7ca3d4" />
20
+ <text x="500" y="140" font-size="28" fill="#0b1c30">RIGHT</text>
21
+ <text x="500" y="176" font-size="28" fill="#0b1c30">TOP</text>
22
+
23
+ <!-- Middle row -->
24
+ <rect x="0" y="300" width="200" height="300" fill="#c9dcb4" />
25
+ <text x="100" y="462" font-size="32" fill="#1b2b12">LEFT</text>
26
+
27
+ <rect x="200" y="300" width="200" height="300" fill="#f0ead2" />
28
+ <circle cx="300" cy="450" r="70" fill="none" stroke="#2b2b2b" stroke-width="4" />
29
+ <circle cx="300" cy="450" r="34" fill="none" stroke="#2b2b2b" stroke-width="4" />
30
+ <circle cx="300" cy="450" r="6" fill="#2b2b2b" />
31
+ <text x="300" y="562" font-size="26" fill="#2b2b2b">CENTER</text>
32
+
33
+ <rect x="400" y="300" width="200" height="300" fill="#c9dcb4" />
34
+ <text x="500" y="462" font-size="32" fill="#1b2b12">RIGHT</text>
35
+
36
+ <!-- Bottom row -->
37
+ <rect x="0" y="600" width="200" height="300" fill="#e8b98c" />
38
+ <text x="100" y="740" font-size="28" fill="#31200d">LEFT</text>
39
+ <text x="100" y="776" font-size="26" fill="#31200d">BOTTOM</text>
40
+
41
+ <rect x="200" y="600" width="200" height="300" fill="#f2d3b3" />
42
+ <text x="300" y="762" font-size="30" fill="#31200d">BOTTOM</text>
43
+
44
+ <rect x="400" y="600" width="200" height="300" fill="#e8b98c" />
45
+ <text x="500" y="740" font-size="28" fill="#31200d">RIGHT</text>
46
+ <text x="500" y="776" font-size="26" fill="#31200d">BOTTOM</text>
47
+ </g>
48
+
49
+ <!-- Zone edges, drawn over the fills so they read as one grid. -->
50
+ <g stroke="#2b2b2b" stroke-width="3" opacity="0.55">
51
+ <path d="M200 0V900M400 0V900M0 300H600M0 600H600" />
52
+ </g>
53
+ <rect x="1.5" y="1.5" width="597" height="897" fill="none" stroke="#2b2b2b" stroke-width="3" />
54
+ </svg>
@@ -0,0 +1,55 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 600" width="900" height="600" role="img" aria-label="A three by three grid of labelled zones used to show which part of an image survives a crop">
2
+ <title>Image position demo sheet</title>
3
+
4
+ <!--
5
+ A 3:2 test sheet for the image position stories. Every zone is labelled and
6
+ colour-coded, so a cropped copy of this image tells you at a glance which
7
+ part of it stayed in frame. (Class names are spelled out in the stories, not
8
+ here: a double hyphen is illegal inside an XML comment.)
9
+ -->
10
+
11
+ <g font-family="'Helvetica Neue', Arial, sans-serif" font-weight="700" text-anchor="middle">
12
+ <!-- Top row -->
13
+ <rect x="0" y="0" width="300" height="200" fill="#7ca3d4" />
14
+ <text x="150" y="92" font-size="30" fill="#0b1c30">LEFT</text>
15
+ <text x="150" y="128" font-size="30" fill="#0b1c30">TOP</text>
16
+
17
+ <rect x="300" y="0" width="300" height="200" fill="#a8c3e6" />
18
+ <text x="450" y="112" font-size="34" fill="#0b1c30">TOP</text>
19
+
20
+ <rect x="600" y="0" width="300" height="200" fill="#7ca3d4" />
21
+ <text x="750" y="92" font-size="30" fill="#0b1c30">RIGHT</text>
22
+ <text x="750" y="128" font-size="30" fill="#0b1c30">TOP</text>
23
+
24
+ <!-- Middle row -->
25
+ <rect x="0" y="200" width="300" height="200" fill="#c9dcb4" />
26
+ <text x="150" y="312" font-size="34" fill="#1b2b12">LEFT</text>
27
+
28
+ <rect x="300" y="200" width="300" height="200" fill="#f0ead2" />
29
+ <circle cx="450" cy="300" r="70" fill="none" stroke="#2b2b2b" stroke-width="4" />
30
+ <circle cx="450" cy="300" r="34" fill="none" stroke="#2b2b2b" stroke-width="4" />
31
+ <circle cx="450" cy="300" r="6" fill="#2b2b2b" />
32
+ <text x="450" y="392" font-size="26" fill="#2b2b2b">CENTER</text>
33
+
34
+ <rect x="600" y="200" width="300" height="200" fill="#c9dcb4" />
35
+ <text x="750" y="312" font-size="34" fill="#1b2b12">RIGHT</text>
36
+
37
+ <!-- Bottom row -->
38
+ <rect x="0" y="400" width="300" height="200" fill="#e8b98c" />
39
+ <text x="150" y="492" font-size="30" fill="#31200d">LEFT</text>
40
+ <text x="150" y="528" font-size="30" fill="#31200d">BOTTOM</text>
41
+
42
+ <rect x="300" y="400" width="300" height="200" fill="#f2d3b3" />
43
+ <text x="450" y="512" font-size="34" fill="#31200d">BOTTOM</text>
44
+
45
+ <rect x="600" y="400" width="300" height="200" fill="#e8b98c" />
46
+ <text x="750" y="492" font-size="30" fill="#31200d">RIGHT</text>
47
+ <text x="750" y="528" font-size="30" fill="#31200d">BOTTOM</text>
48
+ </g>
49
+
50
+ <!-- Zone edges, drawn over the fills so they read as one grid. -->
51
+ <g stroke="#2b2b2b" stroke-width="3" opacity="0.55">
52
+ <path d="M300 0V600M600 0V600M0 200H900M0 400H900" />
53
+ </g>
54
+ <rect x="1.5" y="1.5" width="897" height="597" fill="none" stroke="#2b2b2b" stroke-width="3" />
55
+ </svg>
@@ -42,6 +42,15 @@ export const dummyLink = "https://www.google.com";
42
42
  // time, making the image flicker in/out between builds.
43
43
  export const dummyImageLink = "Culex_annulirostris_female2.jpg";
44
44
 
45
+ // Sheets of nine labelled zones, one landscape and one portrait. Cropped, they
46
+ // name the part of themselves that survived, which a photograph cannot do. The
47
+ // image position stories use both: object-position can only slide an image
48
+ // along the axis its crop overflows, so showing the horizontal and the vertical
49
+ // halves of the utility takes a wide source and a tall one.
50
+ export const imagePositionDemoImage = "image-position-demo.svg";
51
+ export const imagePositionDemoImagePortrait =
52
+ "image-position-demo-portrait.svg";
53
+
45
54
  // Path to the icon sprite, relative to the Storybook preview iframe. Used for
46
55
  // <use href> references and the coreSiteIcons metadata across stories.
47
56
  export const iconSpritePath = "QLD-icons.svg";
@@ -24,6 +24,7 @@ const preview = {
24
24
  },
25
25
  ],
26
26
  },
27
+ test: "todo",
27
28
  },
28
29
  viewport: {
29
30
  options: {
@@ -66,7 +67,13 @@ const preview = {
66
67
  options: {
67
68
  storySort: {
68
69
  // Force SB to load Introduction page first
69
- order: ["Introduction", "1. Core Styles", "2. Layout", "3. Components"],
70
+ order: [
71
+ "Introduction",
72
+ "1. Core Styles",
73
+ "2. Layout",
74
+ "3. Components",
75
+ "4. Templates",
76
+ ],
70
77
  },
71
78
  },
72
79
  },
package/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 1.23.0 - 2026-07-28
11
+
10
12
  ## 1.22.2 - 2026-07-01
11
13
 
12
14
  ## 1.22.1 - 2026-07-01
package/README.md CHANGED
@@ -49,12 +49,6 @@ Build the Design System CSS, JS, Components and templates
49
49
  npm run build
50
50
  ```
51
51
 
52
- Static view, start a local server from /dist folder
53
-
54
- ```bash
55
- npm run serve
56
- ```
57
-
58
52
  Build Storybook for Component development
59
53
 
60
54
  ```bash
package/package.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@qhealth-design-system/core",
3
- "version": "1.22.2",
3
+ "version": "1.23.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/Qld-Health-Online-Team/design-system"
8
8
  },
9
- "licence": "MIT",
9
+ "license": "MIT",
10
10
  "main": "index.js",
11
11
  "scripts": {
12
12
  "build": "webpack --config webpack/webpack.prod.js",
13
13
  "build-all": "npm run build && npm run jsdoc",
14
- "serve": "webpack-dev-server --open --config webpack/webpack.dev.js",
15
14
  "jsdoc": "./node_modules/jsdoc/jsdoc.js -a all -c jsdoc.json -r -R README.md ./src/components/ -d ./documentation/jsdoc",
16
15
  "lint:js": "eslint .",
17
16
  "lint:styles": "stylelint \"**/*.{css,scss}\"",
@@ -27,72 +26,53 @@
27
26
  },
28
27
  "keywords": [],
29
28
  "author": "",
30
- "license": "ISC",
31
29
  "devDependencies": {
32
- "@babel/core": "^7.22.5",
33
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
34
- "@babel/preset-env": "^7.22.5",
35
- "@babel/preset-react": "^7.22.5",
36
30
  "@chromatic-com/storybook": "^5.2.1",
37
31
  "@eslint/css": "^1.3.0",
38
32
  "@eslint/js": "^10.0.1",
39
33
  "@eslint/json": "^2.0.0",
40
34
  "@eslint/markdown": "^8.0.2",
41
35
  "@poliklot/prettier-plugin-handlebars": "^0.2.12",
42
- "@storybook/addon-a11y": "^10.4.0",
36
+ "@storybook/addon-a11y": "^10.4.6",
43
37
  "@storybook/addon-designs": "^11.1.3",
44
- "@storybook/addon-docs": "^10.4.0",
45
- "@storybook/addon-themes": "^10.4.0",
46
- "@storybook/addon-vitest": "^10.4.1",
47
- "@storybook/html-vite": "^10.4.0",
38
+ "@storybook/addon-docs": "^10.4.6",
39
+ "@storybook/addon-themes": "^10.4.6",
40
+ "@storybook/addon-vitest": "^10.4.6",
41
+ "@storybook/html-vite": "^10.4.6",
48
42
  "@vitest/browser-playwright": "^4.1.7",
49
43
  "autoprefixer": "^10.4.14",
50
- "chromatic": "^17.0.0",
44
+ "chromatic": "^18.0.0",
51
45
  "copy-webpack-plugin": "^11.0.0",
52
- "core-js": "^3.31.0",
53
46
  "css-loader": "^5.2.6",
54
47
  "eslint": "^10.4.1",
55
48
  "eslint-config-prettier": "^10.1.8",
56
- "eslint-plugin-storybook": "^10.4.0",
57
- "eslint-webpack-plugin": "^6.0.0",
49
+ "eslint-plugin-storybook": "^10.4.6",
58
50
  "glob": "^7.2.0",
59
51
  "globals": "^17.6.0",
60
52
  "handlebars": "^4.7.8",
61
- "html-loader": "^0.5.5",
62
- "html-webpack-plugin": "^5.5.3",
63
53
  "import-glob-loader": "^1.1.0",
64
- "imports-loader": "^4.0.1",
65
54
  "jsdoc": "^4.0.2",
66
55
  "mini-css-extract-plugin": "^2.7.6",
67
56
  "playwright": "^1.60.0",
68
57
  "postcss-loader": "^7.3.3",
69
58
  "postcss-scss": "^4.0.9",
70
- "prettier": "3.8.3",
59
+ "prettier": "3.9.4",
71
60
  "sass": "^1.63.6",
72
61
  "sass-loader": "^13.3.2",
73
- "storybook": "^10.4.0",
74
- "string-replace-loader": "^3.1.0",
75
- "style-loader": "^3.3.3",
62
+ "storybook": "^10.4.6",
76
63
  "stylelint": "^17.12.0",
77
64
  "stylelint-config-standard": "^40.0.0",
78
65
  "stylelint-scss": "^7.1.0",
79
66
  "terser-webpack-plugin": "^5.3.9",
80
- "url-loader": "^4.1.1",
81
67
  "vite": "^7.2.6",
82
68
  "vite-plugin-sass-glob-import": "^6.0.2",
83
69
  "vitest": "^4.1.7",
84
70
  "webpack": "^5.88.0",
85
71
  "webpack-cli": "^5.1.4",
86
- "webpack-dev-server": "^4.15.1"
72
+ "webpack-merge": "^4.2.2"
87
73
  },
88
74
  "dependencies": {
89
- "extract-loader": "^5.1.0",
90
- "handlebars-loader": "^1.7.1",
91
75
  "highlight.js": "^11.1.0",
92
- "node-jq": "^2.0.0",
93
- "prismjs": "^1.29.0",
94
- "tinymce": "^5.8.2",
95
- "to-string-loader": "^1.1.6",
96
- "webpack-merge": "^4.2.2"
76
+ "prismjs": "^1.29.0"
97
77
  }
98
78
  }