@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
@@ -33,7 +33,9 @@ export default {
33
33
  type: "figma",
34
34
  url: "https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=5990-98115&mode=design&t=Ue7c77KjVYU1eTGj-0",
35
35
  },
36
+ backgrounds: { disable: false },
36
37
  },
38
+ globals: { backgrounds: { value: "default" } },
37
39
  };
38
40
 
39
41
  /**
@@ -41,6 +43,7 @@ export default {
41
43
  */
42
44
  export const Default = {
43
45
  args: defaultdata.default,
46
+ globals: { backgrounds: { value: "default" } },
44
47
  };
45
48
 
46
49
  /**
@@ -55,12 +58,7 @@ export const NoTitle = {
55
58
  */
56
59
  export const Light = {
57
60
  args: defaultdata.default,
58
- parameters: {
59
- backgrounds: {
60
- default: "Light",
61
- values: [{ name: "Light", value: "var(--qld-light-background)" }],
62
- },
63
- },
61
+ globals: { backgrounds: { value: "light" } },
64
62
  decorators: [
65
63
  (Story) => {
66
64
  return `
@@ -79,12 +77,7 @@ export const Light = {
79
77
  */
80
78
  export const Alternative = {
81
79
  args: defaultdata.default,
82
- parameters: {
83
- backgrounds: {
84
- default: "Alternative",
85
- values: [{ name: "Alternative", value: "var(--qld-light-grey-alt)" }],
86
- },
87
- },
80
+ globals: { backgrounds: { value: "alt" } },
88
81
  decorators: [
89
82
  (Story) => {
90
83
  return `
@@ -103,12 +96,7 @@ export const Alternative = {
103
96
  */
104
97
  export const Dark = {
105
98
  args: defaultdata.default,
106
- parameters: {
107
- backgrounds: {
108
- default: "Dark",
109
- values: [{ name: "Dark", value: "var(--qld-dark-background)" }],
110
- },
111
- },
99
+ globals: { backgrounds: { value: "dark" } },
112
100
  decorators: [
113
101
  (Story) => {
114
102
  return `
@@ -127,14 +115,7 @@ export const Dark = {
127
115
  */
128
116
  export const DarkAlternative = {
129
117
  args: defaultdata.default,
130
- parameters: {
131
- backgrounds: {
132
- default: "Dark alternative",
133
- values: [
134
- { name: "Dark alternative", value: "var(--qld-dark-alt-background)" },
135
- ],
136
- },
137
- },
118
+ globals: { backgrounds: { value: "darkAlt" } },
138
119
  decorators: [
139
120
  (Story) => {
140
121
  return `
@@ -0,0 +1 @@
1
+ {}
@@ -1,4 +1,4 @@
1
- import { Canvas, Meta, Story, Source } from "@storybook/blocks";
1
+ import { Canvas, Meta, Story, Source } from "@storybook/addon-docs/blocks";
2
2
  import * as CardStories from "./card--no-action.stories";
3
3
  import defaultdata from "./card.data.json";
4
4
 
@@ -0,0 +1 @@
1
+ {}
@@ -6,23 +6,22 @@ export default {
6
6
  tags: ["autodocs"],
7
7
  title: "3. Components/Forms/Dateinput",
8
8
  render: (args) => {
9
-
10
- //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
9
+ //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
11
10
  //We can't use commas on our class="..." attribute, so we need to replace the commas with spaces.
12
11
 
13
- if( typeof(args.customClass) === 'string' ) {
14
- args.customClass = args.customClass.replaceAll(","," ");
15
- } else if ( typeof(args.customClass) === 'object' ) {
12
+ if (typeof args.customClass === "string") {
13
+ args.customClass = args.customClass.replaceAll(",", " ");
14
+ } else if (typeof args.customClass === "object") {
16
15
  args.customClass = args.customClass.join(" ");
17
16
  }
18
-
17
+
19
18
  return new Dateinput(args).html;
20
-
21
19
  },
22
20
 
23
21
  //https://storybook.js.org/docs/api/arg-types
24
- argTypes: {
25
- },
22
+ argTypes: {},
23
+ globals: { backgrounds: { value: "default" } },
24
+ parameters: { backgrounds: { disable: false } },
26
25
  };
27
26
 
28
27
  /**
@@ -30,24 +29,18 @@ export default {
30
29
  */
31
30
  export const Default = {
32
31
  args: defaultdata,
32
+ globals: { backgrounds: { value: "default" } },
33
33
  };
34
34
 
35
35
  /**
36
36
  * Dark themed Date inputs
37
37
  */
38
38
  export const Dark = {
39
- args: {
40
- ...defaultdata,
41
- ...{isDisabled: false},
42
- },
43
- parameters: {
44
- backgrounds: {
45
- default: 'Dark',
46
- values: [
47
- { name: 'Dark', value: 'var(--qld-brand-primary)' },
48
- ],
49
- },
39
+ args: {
40
+ ...defaultdata,
41
+ ...{ isDisabled: false },
50
42
  },
43
+ globals: { backgrounds: { value: "dark" } },
51
44
  decorators: [
52
45
  (Story) => {
53
46
  return `
@@ -63,20 +56,19 @@ export const Dark = {
63
56
  * Filled style Date inputs
64
57
  */
65
58
  export const Filled = {
66
- args: {
67
- ...defaultdata,
68
- ...{customClass: "form-style-filled"},
59
+ args: {
60
+ ...defaultdata,
61
+ ...{ customClass: "form-style-filled" },
69
62
  },
70
63
  };
71
64
 
72
-
73
65
  /**
74
66
  * Disabled Date inputs
75
67
  */
76
68
  export const Disabled = {
77
- args: {
78
- ...defaultdata,
79
- ...{isDisabled: true},
69
+ args: {
70
+ ...defaultdata,
71
+ ...{ isDisabled: true },
80
72
  },
81
73
  };
82
74
 
@@ -85,8 +77,8 @@ export const Disabled = {
85
77
  */
86
78
  export const Valid = {
87
79
  args: {
88
- ...defaultdata,
89
- ...{customClass: "qld-input-success"},
80
+ ...defaultdata,
81
+ ...{ customClass: "qld-input-success" },
90
82
  },
91
83
  };
92
84
 
@@ -95,7 +87,7 @@ export const Valid = {
95
87
  */
96
88
  export const Invalid = {
97
89
  args: {
98
- ...defaultdata,
99
- ...{customClass: "qld-input-error"},
90
+ ...defaultdata,
91
+ ...{ customClass: "qld-input-error" },
100
92
  },
101
93
  };
@@ -1,4 +1,4 @@
1
- import { Canvas, Meta, Story } from "@storybook/blocks";
1
+ import { Canvas, Meta, Story } from "@storybook/addon-docs/blocks";
2
2
  import * as DirectionLinksStories from "./directionLinks.stories";
3
3
 
4
4
  <Meta of={DirectionLinksStories} />
@@ -10,6 +10,11 @@ import defaultdata from "./directionLinks.data.json";
10
10
  export default {
11
11
  tags: ["autodocs"],
12
12
  title: "3. Components/Direction Links",
13
+ globals: {
14
+ backgrounds: {
15
+ value: "default",
16
+ },
17
+ },
13
18
  render: (args) => {
14
19
  return `
15
20
  <!-- Grid container -->
@@ -51,6 +56,7 @@ export default {
51
56
  label: { control: "text" },
52
57
  },
53
58
  parameters: {
59
+ backgrounds: { disable: false },
54
60
  controls: { disable: true },
55
61
  design: {
56
62
  name: "QGDS Figma Reference",
@@ -69,10 +75,9 @@ export const Default = {};
69
75
  * Direction Link - Light
70
76
  * */
71
77
  export const Light = {
72
- parameters: {
78
+ globals: {
73
79
  backgrounds: {
74
- default: "Light",
75
- values: [{ name: "Light", value: "var(--qld-light-background)" }],
80
+ value: "light",
76
81
  },
77
82
  },
78
83
  decorators: [
@@ -90,10 +95,9 @@ export const Light = {
90
95
  * Direction Link - Light-Alt
91
96
  * */
92
97
  export const LightAlt = {
93
- parameters: {
98
+ globals: {
94
99
  backgrounds: {
95
- default: "LightAlt",
96
- values: [{ name: "LightAlt", value: "var(--qld-light-alt-background)" }],
100
+ value: "alt",
97
101
  },
98
102
  },
99
103
  decorators: [
@@ -111,10 +115,9 @@ export const LightAlt = {
111
115
  * Direction Link - Dark
112
116
  * */
113
117
  export const Dark = {
114
- parameters: {
118
+ globals: {
115
119
  backgrounds: {
116
- default: "Dark",
117
- values: [{ name: "Dark", value: "var(--qld-dark-background)" }],
120
+ value: "dark",
118
121
  },
119
122
  },
120
123
  decorators: [
@@ -132,10 +135,9 @@ export const Dark = {
132
135
  * Direction Link - Dark-Alt
133
136
  * */
134
137
  export const DarkAlt = {
135
- parameters: {
138
+ globals: {
136
139
  backgrounds: {
137
- default: "DarkAlt",
138
- values: [{ name: "DarkAlt", value: "var(--qld-dark-alt-background)" }],
140
+ value: "darkAlt",
139
141
  },
140
142
  },
141
143
  decorators: [
@@ -1,4 +1,4 @@
1
- import { Canvas, Meta, Story, Source } from "@storybook/blocks";
1
+ import { Canvas, Meta, Story, Source } from "@storybook/addon-docs/blocks";
2
2
  import * as FooterStories from "./footer.stories";
3
3
  import defaultdata from "./footer.data.json";
4
4
 
@@ -1,4 +1,4 @@
1
- import { Canvas, Meta, Story } from "@storybook/blocks";
1
+ import { Canvas, Meta, Story } from "@storybook/addon-docs/blocks";
2
2
  import * as FormCheckCheckboxStories from "./checkbox.stories";
3
3
 
4
4
  <Meta of={FormCheckCheckboxStories} />
@@ -1,35 +1,27 @@
1
1
  // FormcheckCheckbox.stories.js
2
- import { Formcheck } from '../../Formcheck.js';
3
- import defaultdata from './checkbox.data.json';
2
+ import { Formcheck } from "../../Formcheck.js";
3
+ import defaultdata from "./checkbox.data.json";
4
4
 
5
5
  export default {
6
- tags: ['autodocs'],
7
- title: '3. Components/Forms/Checkbox',
6
+ tags: ["autodocs"],
7
+ title: "3. Components/Forms/Checkbox",
8
8
  render: (args) => {
9
- return `${new Formcheck(args).html}`
9
+ return `${new Formcheck(args).html}`;
10
10
  },
11
- //https://storybook.js.org/docs/api/arg-types
12
- argTypes: {
13
- },
14
-
15
-
11
+ globals: { backgrounds: { value: "default" } },
12
+ parameters: { backgrounds: { disable: false } },
13
+ //https://storybook.js.org/docs/api/arg-types
14
+ argTypes: {},
16
15
  };
17
16
 
18
17
  export const Default = {
19
- args: {...defaultdata},
18
+ args: { ...defaultdata },
19
+ globals: { backgrounds: { value: "default" } },
20
20
  };
21
21
 
22
22
  export const CheckboxDark = {
23
-
24
- args: {...defaultdata},
25
- parameters: {
26
- backgrounds: {
27
- default: 'Dark',
28
- values: [
29
- { name: 'Dark', value: 'var(--qld-sapphire-blue)' },
30
- ],
31
- },
32
- },
23
+ args: { ...defaultdata },
24
+ globals: { backgrounds: { value: "dark" } },
33
25
  decorators: [
34
26
  (Story) => {
35
27
  return `
@@ -42,7 +34,7 @@ export const CheckboxDark = {
42
34
  };
43
35
 
44
36
  export const CheckboxSmall = {
45
- args: {...defaultdata, id: "checkboxSmall"},
37
+ args: { ...defaultdata, id: "checkboxSmall" },
46
38
  decorators: [
47
39
  (Story) => {
48
40
  return `
@@ -55,15 +47,8 @@ export const CheckboxSmall = {
55
47
  };
56
48
 
57
49
  export const CheckboxSmallDark = {
58
- args: {...defaultdata, id: "checkboxSmallDark"},
59
- parameters: {
60
- backgrounds: {
61
- default: 'Dark',
62
- values: [
63
- { name: 'Dark', value: 'var(--qld-sapphire-blue)' },
64
- ],
65
- },
66
- },
50
+ args: { ...defaultdata, id: "checkboxSmallDark" },
51
+ globals: { backgrounds: { value: "dark" } },
67
52
  decorators: [
68
53
  (Story) => {
69
54
  return `
@@ -78,39 +63,32 @@ export const CheckboxSmallDark = {
78
63
  };
79
64
 
80
65
  export const CheckboxValid = {
81
- args: {...defaultdata, id: "checkboxValid"},
66
+ args: { ...defaultdata, id: "checkboxValid" },
82
67
  render: (args) => {
83
68
  return `
84
69
  <div class="valid">${new Formcheck(args).html}</div>
85
- `
70
+ `;
86
71
  },
87
- }
72
+ };
88
73
 
89
74
  export const CheckboxValidSmall = {
90
- args: {...defaultdata, id: "checkboxValidSmall"},
75
+ args: { ...defaultdata, id: "checkboxValidSmall" },
91
76
  render: (args) => {
92
77
  return `
93
78
  <div class="small"><div class="valid">${new Formcheck(args).html}</div></div>
94
- `
79
+ `;
95
80
  },
96
- }
81
+ };
97
82
 
98
83
  export const CheckboxValidDark = {
99
- args: {...defaultdata, id: "checkboxValidDark"},
84
+ args: { ...defaultdata, id: "checkboxValidDark" },
100
85
  render: (args) => {
101
86
  return `
102
87
  <div class="dark">
103
88
  <div class="valid">${new Formcheck(args).html}</div></div>
104
- `
105
- },
106
- parameters: {
107
- backgrounds: {
108
- default: 'Dark',
109
- values: [
110
- { name: 'Dark', value: 'var(--qld-sapphire-blue)' },
111
- ],
112
- },
89
+ `;
113
90
  },
91
+ globals: { backgrounds: { value: "dark" } },
114
92
  decorators: [
115
93
  (Story) => {
116
94
  return `
@@ -120,24 +98,17 @@ export const CheckboxValidDark = {
120
98
  `;
121
99
  },
122
100
  ],
123
- }
101
+ };
124
102
 
125
103
  export const CheckboxValidSmallDark = {
126
- args: {...defaultdata, id: "checkboxValidSmallDark"},
104
+ args: { ...defaultdata, id: "checkboxValidSmallDark" },
127
105
  render: (args) => {
128
106
  return `
129
107
  <div class="dark">
130
108
  <div class="valid">${new Formcheck(args).html}</div></div>
131
- `
132
- },
133
- parameters: {
134
- backgrounds: {
135
- default: 'Dark',
136
- values: [
137
- { name: 'Dark', value: 'var(--qld-sapphire-blue)' },
138
- ],
139
- },
109
+ `;
140
110
  },
111
+ globals: { backgrounds: { value: "dark" } },
141
112
  decorators: [
142
113
  (Story) => {
143
114
  return `
@@ -147,42 +118,35 @@ export const CheckboxValidSmallDark = {
147
118
  `;
148
119
  },
149
120
  ],
150
- }
121
+ };
151
122
 
152
123
  export const CheckboxInvalid = {
153
- args: {...defaultdata, id: "checkboxInvalid"},
124
+ args: { ...defaultdata, id: "checkboxInvalid" },
154
125
  render: (args) => {
155
126
  return `
156
127
  <div class="invalid">${new Formcheck(args).html}</div>
157
- `
128
+ `;
158
129
  },
159
- }
130
+ };
160
131
 
161
132
  export const CheckboxInvalidSmall = {
162
- args: {...defaultdata, id: "checkboxInvalidSmall"},
133
+ args: { ...defaultdata, id: "checkboxInvalidSmall" },
163
134
  render: (args) => {
164
135
  return `
165
136
  <div class="small"><div class="invalid">${new Formcheck(args).html}</div></div>
166
- `
137
+ `;
167
138
  },
168
- }
139
+ };
169
140
 
170
141
  export const CheckboxInvalidDark = {
171
- args: {...defaultdata, id: "checkboxInvalidDark"},
142
+ args: { ...defaultdata, id: "checkboxInvalidDark" },
172
143
  render: (args) => {
173
144
  return `
174
145
  <div class="dark">
175
146
  <div class="invalid">${new Formcheck(args).html}</div></div>
176
- `
177
- },
178
- parameters: {
179
- backgrounds: {
180
- default: 'Dark',
181
- values: [
182
- { name: 'Dark', value: 'var(--qld-sapphire-blue)' },
183
- ],
184
- },
147
+ `;
185
148
  },
149
+ globals: { backgrounds: { value: "dark" } },
186
150
  decorators: [
187
151
  (Story) => {
188
152
  return `
@@ -192,24 +156,17 @@ export const CheckboxInvalidDark = {
192
156
  `;
193
157
  },
194
158
  ],
195
- }
159
+ };
196
160
 
197
161
  export const CheckboxInvalidSmallDark = {
198
- args: {...defaultdata, id: "checkboxInvalidSmallDark"},
162
+ args: { ...defaultdata, id: "checkboxInvalidSmallDark" },
199
163
  render: (args) => {
200
164
  return `
201
165
  <div class="dark">
202
166
  <div class="invalid">${new Formcheck(args).html}</div></div>
203
- `
204
- },
205
- parameters: {
206
- backgrounds: {
207
- default: 'Dark',
208
- values: [
209
- { name: 'Dark', value: 'var(--qld-sapphire-blue)' },
210
- ],
211
- },
167
+ `;
212
168
  },
169
+ globals: { backgrounds: { value: "dark" } },
213
170
  decorators: [
214
171
  (Story) => {
215
172
  return `
@@ -219,4 +176,4 @@ export const CheckboxInvalidSmallDark = {
219
176
  `;
220
177
  },
221
178
  ],
222
- }
179
+ };
@@ -1,4 +1,4 @@
1
- import { Canvas, Meta, Story } from "@storybook/blocks";
1
+ import { Canvas, Meta, Story } from "@storybook/addon-docs/blocks";
2
2
  import * as FormCheckRadioStories from "./radio.stories";
3
3
 
4
4
  <Meta of={FormCheckRadioStories} />
@@ -8,6 +8,8 @@ export default {
8
8
  render: (args) => {
9
9
  return `${new Formcheck(args).html}`;
10
10
  },
11
+ globals: { backgrounds: { value: "default" } },
12
+ parameters: { backgrounds: { disable: false } },
11
13
  //https://storybook.js.org/docs/api/arg-types
12
14
  argTypes: {},
13
15
  };
@@ -18,16 +20,12 @@ export const Default = {
18
20
  parameters: {
19
21
  controls: { include: `listitems` },
20
22
  },
23
+ globals: { backgrounds: { value: "default" } },
21
24
  };
22
25
 
23
26
  export const RadioDark = {
24
27
  args: { ...defaultdata },
25
- parameters: {
26
- backgrounds: {
27
- default: "Dark",
28
- values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
29
- },
30
- },
28
+ globals: { backgrounds: { value: "dark" } },
31
29
  decorators: [
32
30
  (Story) => {
33
31
  return `
@@ -54,12 +52,7 @@ export const RadioSmall = {
54
52
 
55
53
  export const RadioSmallDark = {
56
54
  args: { ...defaultdata, id: "radioSmallDark" },
57
- parameters: {
58
- backgrounds: {
59
- default: "Dark",
60
- values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
61
- },
62
- },
55
+ globals: { backgrounds: { value: "dark" } },
63
56
  decorators: [
64
57
  (Story) => {
65
58
  return `
@@ -97,12 +90,7 @@ export const RadioValidDark = {
97
90
  <div class="valid">${new Formcheck(args).html}</div></div>
98
91
  `;
99
92
  },
100
- parameters: {
101
- backgrounds: {
102
- default: "Dark",
103
- values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
104
- },
105
- },
93
+ globals: { backgrounds: { value: "dark" } },
106
94
  decorators: [
107
95
  (Story) => {
108
96
  return `
@@ -122,12 +110,7 @@ export const RadioValidSmallDark = {
122
110
  <div class="valid">${new Formcheck(args).html}</div></div>
123
111
  `;
124
112
  },
125
- parameters: {
126
- backgrounds: {
127
- default: "Dark",
128
- values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
129
- },
130
- },
113
+ globals: { backgrounds: { value: "dark" } },
131
114
  decorators: [
132
115
  (Story) => {
133
116
  return `
@@ -163,12 +146,7 @@ export const RadioInvalidDark = {
163
146
  <div class="invalid"><div class="dark">${new Formcheck(args).html}</div></div>
164
147
  `;
165
148
  },
166
- parameters: {
167
- backgrounds: {
168
- default: "Dark",
169
- values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
170
- },
171
- },
149
+ globals: { backgrounds: { value: "dark" } },
172
150
  decorators: [
173
151
  (Story) => {
174
152
  return `
@@ -188,12 +166,7 @@ export const RadioInvalidSmallDark = {
188
166
  <div class="invalid">${new Formcheck(args).html}</div></div>
189
167
  `;
190
168
  },
191
- parameters: {
192
- backgrounds: {
193
- default: "Dark",
194
- values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
195
- },
196
- },
169
+ globals: { backgrounds: { value: "dark" } },
197
170
  decorators: [
198
171
  (Story) => {
199
172
  return `
@@ -1,4 +1,4 @@
1
- import { Canvas, Meta, Story, Source } from "@storybook/blocks";
1
+ import { Canvas, Meta, Story, Source } from "@storybook/addon-docs/blocks";
2
2
  import * as GlobalAlertStories from "./globalAlert.stories";
3
3
  import defaultdata from "./globalAlert.data.json";
4
4
 
@@ -139,11 +139,11 @@ describe("initGlobalAlerts", () => {
139
139
  localStorage = localStorageMock;
140
140
 
141
141
  // Set global references for initGlobalAlerts
142
- // eslint-disable-next-line no-undef
142
+
143
143
  global.document = d;
144
- // eslint-disable-next-line no-undef
144
+
145
145
  global.window = window;
146
- // eslint-disable-next-line no-undef
146
+
147
147
  global.localStorage = localStorageMock;
148
148
 
149
149
  // Clear localStorage before each test