@qld-gov-au/qgds-bootstrap5 2.0.6 → 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.
Files changed (127) hide show
  1. package/.esbuild/plugins/qgds-plugin-build-log.js +2 -2
  2. package/.esbuild/plugins/qgds-plugin-copy-assets.js +0 -3
  3. package/.storybook/README.md +10 -0
  4. package/.storybook/{main.js → main.mjs} +4 -5
  5. package/.storybook/modes.js +3 -12
  6. package/.storybook/preview.js +13 -10
  7. package/dist/assets/components/bs5/head/head.hbs +1 -1
  8. package/dist/assets/css/qld.bootstrap.css +1 -1
  9. package/dist/assets/css/qld.bootstrap.css.map +2 -2
  10. package/dist/assets/css/qld.bootstrap.legacy.css +1 -1
  11. package/dist/assets/css/qld.bootstrap.legacy.css.map +2 -2
  12. package/dist/assets/js/handlebars.init.min.js +1 -1
  13. package/dist/assets/js/handlebars.partials.js +2398 -136
  14. package/dist/assets/js/handlebars.partials.js.map +7 -0
  15. package/dist/assets/node/handlebars.init.min.js +1 -1
  16. package/dist/components/bs5/head/head.hbs +1 -1
  17. package/dist/package.json +25 -27
  18. package/dist/sample-data/correctincorrect/correctincorrect.data.json +1 -0
  19. package/dist/sample-data/tabs/tabs.data.json +1 -2
  20. package/dist/sample-data/typography/typography.data.json +1 -0
  21. package/esbuild.js +16 -4
  22. package/package.json +25 -27
  23. package/pom.xml +3 -3
  24. package/src/components/bs5/accordion/Accordion.mdx +1 -1
  25. package/src/components/bs5/accordion/accordion.stories.js +17 -22
  26. package/src/components/bs5/backToTop/backToTop.mdx +1 -1
  27. package/src/components/bs5/banner/Banner.mdx +1 -1
  28. package/src/components/bs5/blockquote/Blockquote.mdx +1 -1
  29. package/src/components/bs5/blockquote/manifest.json +1 -0
  30. package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +1 -1
  31. package/src/components/bs5/breadcrumbs/breadcrumbs.stories.js +19 -10
  32. package/src/components/bs5/breadcrumbs/manifest.json +1 -0
  33. package/src/components/bs5/breadcumbsWrapper/manifest.json +1 -0
  34. package/src/components/bs5/button/Button.mdx +1 -1
  35. package/src/components/bs5/button/manifest.json +1 -0
  36. package/src/components/bs5/callToAction/callToAction.mdx +1 -1
  37. package/src/components/bs5/callToAction/callToAction.stories.js +15 -50
  38. package/src/components/bs5/callout/Callout.mdx +1 -1
  39. package/src/components/bs5/callout/callout.stories.js +7 -26
  40. package/src/components/bs5/callout/manifest.json +1 -0
  41. package/src/components/bs5/card/Card.mdx +1 -1
  42. package/src/components/bs5/card/manifest.json +1 -0
  43. package/src/components/bs5/contentFooter/manifest.json +1 -0
  44. package/src/components/bs5/contentFooterWrapper/manifest.json +1 -0
  45. package/src/components/bs5/contentWrapper/manifest.json +1 -0
  46. package/src/components/bs5/correctincorrect/correctincorrect.data.json +1 -0
  47. package/src/components/bs5/correctincorrect/manifest.json +1 -0
  48. package/src/components/bs5/dateinput/Dateinput.stories.js +23 -31
  49. package/src/components/bs5/dateinput/manifest.json +1 -0
  50. package/src/components/bs5/directionLinks/DirectionLinks.mdx +1 -1
  51. package/src/components/bs5/directionLinks/directionLinks.stories.js +14 -12
  52. package/src/components/bs5/footer/Footer.mdx +1 -1
  53. package/src/components/bs5/formcheck/manifest.json +1 -0
  54. package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +1 -1
  55. package/src/components/bs5/formcheck/stories/checkbox/checkbox.stories.js +44 -87
  56. package/src/components/bs5/formcheck/stories/radio/Radio.mdx +1 -1
  57. package/src/components/bs5/formcheck/stories/radio/radio.stories.js +9 -36
  58. package/src/components/bs5/fullPageWrapper/manifest.json +1 -0
  59. package/src/components/bs5/globalAlert/GlobalAlert.mdx +1 -1
  60. package/src/components/bs5/globalAlert/globalAlert.test.js +3 -3
  61. package/src/components/bs5/globalAlert/manifest.json +1 -0
  62. package/src/components/bs5/head/manifest.json +1 -0
  63. package/src/components/bs5/header/Header.mdx +1 -1
  64. package/src/components/bs5/header/header.stories.js +1 -30
  65. package/src/components/bs5/header/manifest.json +1 -0
  66. package/src/components/bs5/icons/Icons.mdx +1 -1
  67. package/src/components/bs5/icons/manifest.json +1 -0
  68. package/src/components/bs5/icons/mdx/_IconsSizes.mdx +1 -1
  69. package/src/components/bs5/image/Image.mdx +1 -1
  70. package/src/components/bs5/inpageAlert/InpageAlert.mdx +1 -1
  71. package/src/components/bs5/inpageAlert/inpageAlert.stories.js +7 -23
  72. package/src/components/bs5/inpageAlert/manifest.json +1 -0
  73. package/src/components/bs5/inpagenav/Inpagenav.mdx +1 -1
  74. package/src/components/bs5/inpagenav/inpagenav.stories.js +4 -6
  75. package/src/components/bs5/inpagenav/manifest.json +1 -0
  76. package/src/components/bs5/link/link.mdx +1 -1
  77. package/src/components/bs5/link/link.stories.js +4 -6
  78. package/src/components/bs5/linkColumns/linkColumns.mdx +1 -1
  79. package/src/components/bs5/logo/Logo.mdx +1 -1
  80. package/src/components/bs5/mainContainerWrapper/manifest.json +1 -0
  81. package/src/components/bs5/metaDcTerms/manifest.json +1 -0
  82. package/src/components/bs5/metaOpenGraph/manifest.json +1 -0
  83. package/src/components/bs5/modal/Modal.mdx +1 -1
  84. package/src/components/bs5/modal/manifest.json +1 -0
  85. package/src/components/bs5/pagination/Pagination.mdx +1 -1
  86. package/src/components/bs5/pagination/manifest.json +1 -0
  87. package/src/components/bs5/pagination/pagination.stories.js +12 -21
  88. package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +1 -1
  89. package/src/components/bs5/quickexit/manifest.json +1 -0
  90. package/src/components/bs5/searchInput/SearchInput.mdx +1 -1
  91. package/src/components/bs5/searchInput/manifest.json +1 -0
  92. package/src/components/bs5/searchInput/searchInput.stories.js +10 -12
  93. package/src/components/bs5/select/manifest.json +1 -0
  94. package/src/components/bs5/sidenav/Sidenav.mdx +1 -1
  95. package/src/components/bs5/sidenav/manifest.json +1 -0
  96. package/src/components/bs5/sidenav/sidenav.stories.js +4 -7
  97. package/src/components/bs5/sidenavWrapper/manifest.json +1 -0
  98. package/src/components/bs5/skiplinks/SkipLinks.mdx +1 -1
  99. package/src/components/bs5/spinner/manifest.json +1 -0
  100. package/src/components/bs5/table/Table.mdx +1 -1
  101. package/src/components/bs5/table/manifest.json +1 -0
  102. package/src/components/bs5/tabs/Tabs.mdx +1 -1
  103. package/src/components/bs5/tabs/tabs.data.json +1 -2
  104. package/src/components/bs5/tabs/tabs.stories.js +38 -215
  105. package/src/components/bs5/tag/Tag.mdx +1 -1
  106. package/src/components/bs5/tag/manifest.json +1 -0
  107. package/src/components/bs5/textarea/manifest.json +1 -0
  108. package/src/components/bs5/textbox/manifest.json +1 -0
  109. package/src/components/bs5/typography/Typography.mdx +1 -1
  110. package/src/components/bs5/typography/manifest.json +1 -0
  111. package/src/components/bs5/typography/typography.data.json +1 -0
  112. package/src/components/bs5/typography/typography.stories.js +6 -24
  113. package/src/components/bs5/video/Video.mdx +1 -1
  114. package/src/components/bs5/video/manifest.json +1 -0
  115. package/src/components/bs5/video/video.stories.js +6 -24
  116. package/src/css/qld-print.scss +426 -304
  117. package/src/stories/Introduction.mdx +1 -1
  118. package/vite.config.js +17 -0
  119. package/.eslintrc.cjs +0 -52
  120. package/dist/assets/js/bootstrap.js +0 -6312
  121. package/dist/assets/js/handlebars.helpers.js +0 -292
  122. package/dist/assets/js/handlebars.init.cjs +0 -6
  123. package/dist/assets/js/handlebars.init.js +0 -34
  124. package/dist/components/handlebars.helpers.js +0 -292
  125. package/dist/components/handlebars.init.cjs +0 -6
  126. package/dist/components/handlebars.init.js +0 -34
  127. package/dist/components/handlebars.partials.js +0 -136
@@ -12,7 +12,7 @@ export default function buildlog() {
12
12
  log("yellow", "Starting build...\n");
13
13
  });
14
14
 
15
- // eslint-disable-next-line no-unused-vars
15
+
16
16
  build.onEnd((result) => {
17
17
  console.log("BUNDLING:");
18
18
  build.initialOptions.entryPoints.forEach((entry) => {
@@ -45,7 +45,7 @@ export default function buildlog() {
45
45
 
46
46
  });
47
47
 
48
- // eslint-disable-next-line no-unused-vars
48
+
49
49
  build.onEnd((result) => {
50
50
  console.log(`\n`);
51
51
  log("yellow", `✓ Build complete.\n\n`);
@@ -8,19 +8,16 @@ export default function copyPlugin() {
8
8
  verbose: false,
9
9
  watch: true,
10
10
  assets: [
11
- {from: ["./node_modules/bootstrap/dist/js/bootstrap.bundle.js"], to: ["./dist/assets/js/bootstrap.js"]},
12
11
  {from: ["./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"], to: ["./dist/assets/js/bootstrap.min.js"]},
13
12
  {from: ["./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map"], to: ["./dist/assets/js/bootstrap.min.js.map"]},
14
13
  {from: ["./node_modules/bootstrap/dist/js/bootstrap.bundle.*"], to: ["./dist/assets/js/"]},
15
14
 
16
15
  {from: ["./src/components/bs5/**/*.hbs"], to: ["./dist/assets/components/bs5/"],},
17
- {from: ["./src/js/handlebars.*"], to: ["./dist/assets/js/"],},
18
16
  {from: ["./src/img/*"], to: ["./dist/assets/img"]},
19
17
  // Sample data
20
18
  {from: ["./src/components/bs5/**/*.data.json"], to: ["./dist/sample-data/"],},
21
19
 
22
20
  // dist/components will be going away please use dist/assets/components
23
- {from: ["./src/js/handlebars.*"], to: ["./dist/components/"],},
24
21
  {from: ["./src/components/bs5/**/*.hbs"], to: ["./dist/components/bs5/"],},
25
22
 
26
23
  //Copy info files for reference
@@ -0,0 +1,10 @@
1
+ ## What stops Turbo Snapshots
2
+
3
+ The key files that will always trigger a full run if touched include:
4
+
5
+ * .storybook/main.js / .storybook/main.ts
6
+ * .storybook/preview.js / .storybook/preview.ts
7
+ * .storybook/manager.js
8
+ * Any addons.js or config imports that affect global decorators/parameters
9
+
10
+ Any file linked to preview.js i.e. transitive dependencies could also trigger a skip (i.e. if css is altered it would then run the full build to pick up regressions, if hbs files are just altered or a new story is added then it would not rebuild the full project)
@@ -1,7 +1,7 @@
1
1
  /** @type { import('@storybook/html-vite').StorybookConfig } */
2
+ // Is an ESM module now
2
3
 
3
4
  import path from "path";
4
- import fs from "fs";
5
5
 
6
6
  const config = {
7
7
  stories: [
@@ -17,11 +17,10 @@ const config = {
17
17
  //https://storybook.js.org/addons/
18
18
  "@storybook/addon-a11y",
19
19
  "@storybook/addon-themes",
20
- "@storybook/addon-essentials",
21
- "@storybook/addon-interactions",
22
20
  "@storybook/addon-links",
23
21
  "@chromatic-com/storybook",
24
22
  "storybook-addon-deep-controls",
23
+ "@storybook/addon-docs",
25
24
  ],
26
25
 
27
26
  framework: {
@@ -69,8 +68,8 @@ const config = {
69
68
  fs: {
70
69
  allow: [
71
70
  // Allow access to assets
72
- path.resolve(__dirname, "../src/assets"),
73
- path.resolve(__dirname, "../src/img"),
71
+ path.resolve(process.cwd(), "../src/assets"),
72
+ path.resolve(process.cwd(), "../src/img"),
74
73
  ],
75
74
  },
76
75
  };
@@ -7,25 +7,16 @@ export const allModes = {
7
7
  desktop: {
8
8
  viewport: "large",
9
9
  },
10
- "Light": {
10
+ Light: {
11
11
  theme: "light",
12
12
  },
13
13
  "Light alternative": {
14
14
  theme: "alt",
15
15
  },
16
- "Dark": {
16
+ Dark: {
17
17
  theme: "dark",
18
18
  },
19
19
  "Dark alternative": {
20
20
  theme: "dark-alt",
21
- }
21
+ },
22
22
  };
23
-
24
- export const allBackgrounds = {
25
- default: {name: 'default', value: '#FFFFFF'},
26
- "Light": {name: 'Light', value: "var(--qld-light-background)"},
27
- "Light alternative": {name: 'Light alternative', value: "var(--qld-light-grey-alt)"},
28
- "Dark": {name: 'Dark', value: "var(--qld-sapphire-blue)"},
29
- "Dark alternative": {name: 'Dark alternative', value: "var(--qld-dark-blue)"},
30
- }
31
-
@@ -2,6 +2,7 @@ import "../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js";
2
2
  import "../src/js/qld.bootstrap.js";
3
3
  import "../src/css/main.scss";
4
4
  import { withThemeByClassName } from "@storybook/addon-themes";
5
+ // import { allBackgrounds } from "./modes.js";
5
6
  import {
6
7
  withDynamicTheme,
7
8
  dynamicThemeGlobalTypes,
@@ -9,8 +10,7 @@ import {
9
10
 
10
11
  // Check if dynamic theme should be enabled via environment variable
11
12
  const ENABLE_DYNAMIC_THEME = import.meta.env.ENABLE_DYNAMIC_THEME;
12
- import { allBackgrounds } from "./modes.js";
13
- import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
13
+ import { INITIAL_VIEWPORTS } from "storybook/viewport";
14
14
  import init from "../src/js/handlebars.init.js";
15
15
  import Handlebars from "handlebars";
16
16
 
@@ -82,14 +82,14 @@ const preview = {
82
82
  },
83
83
  },
84
84
  backgrounds: {
85
- //default: 'default',
86
- values: [
87
- allBackgrounds["default"],
88
- allBackgrounds["Light"],
89
- allBackgrounds["Light alternative"],
90
- allBackgrounds["Dark"],
91
- allBackgrounds["Dark alternative"],
92
- ],
85
+ options: {
86
+ default: { name: "Default", value: "var(--qld-default-background)" },
87
+ light: { name: "Light", value: "var(--qld-light-background)" },
88
+ alt: { name: "Light Alt", value: "var(--qld-light-alt-background)" },
89
+ dark: { name: "Dark", value: "var(--qld-dark-background)" },
90
+ darkAlt: { name: "Dark Alt", value: "var(--qld-dark-alt-background)" },
91
+ },
92
+ disable: true,
93
93
  },
94
94
  options: {
95
95
  storySort: {
@@ -110,6 +110,9 @@ const preview = {
110
110
  restoreScroll: true,
111
111
  },
112
112
  },
113
+ initialGlobals: {
114
+ backgrounds: { value: "default" },
115
+ },
113
116
  },
114
117
 
115
118
  decorators: [
@@ -1,5 +1,5 @@
1
1
 
2
- <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.6","branch":"HEAD","tag":"v2.0.6","commit":"8e01e15b93ee3bf9a4f97638ef79324fdf6a97a7","majorVersion":"v2"} -->
2
+ <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.7","branch":"HEAD","tag":"v2.0.7","commit":"c204c02c3420408a069d8228b40be125edc579d8","majorVersion":"v2"} -->
3
3
 
4
4
  {{! Select environment, used verbatium if not using predefind key
5
5
  cdn := PROD|STAGING|BETA|TEST|DEV|???