@qld-gov-au/qgds-bootstrap5 1.1.39 → 1.1.41

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 (161) hide show
  1. package/dist/assets/components/bs5/backToTop/backToTop.hbs +1 -1
  2. package/dist/assets/components/bs5/breadcrumbs/breadcrumbs.hbs +19 -15
  3. package/dist/assets/components/bs5/button/button.hbs +48 -30
  4. package/dist/assets/components/bs5/containerLayout/containerLayout.hbs +100 -0
  5. package/dist/assets/components/bs5/contentFooter/contentFooter.hbs +15 -4
  6. package/dist/assets/components/bs5/formcheck/formcheck.hbs +1 -1
  7. package/dist/assets/components/bs5/head/head.hbs +1 -1
  8. package/dist/assets/components/bs5/iconLink/iconLink.hbs +41 -0
  9. package/dist/assets/components/bs5/logo/logo.hbs +7 -0
  10. package/dist/assets/components/bs5/logo/logoCOALandscape.hbs +58 -0
  11. package/dist/assets/components/bs5/logo/logoCOALandscape2Lines.hbs +58 -0
  12. package/dist/assets/components/bs5/navbar/navbar.hbs +65 -245
  13. package/dist/assets/components/bs5/pageLayout/pageLayout.hbs +11 -10
  14. package/dist/assets/components/bs5/pageLayout/templates/contentPageWithForm.hbs +78 -0
  15. package/dist/assets/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +103 -0
  16. package/dist/assets/components/bs5/pageLayout/templates/fullWidthLandingPage.hbs +61 -0
  17. package/dist/assets/components/bs5/searchInput/searchInput.hbs +8 -10
  18. package/dist/assets/css/qld.bootstrap.css +1 -1
  19. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  20. package/dist/assets/js/bootstrap.bundle.js +3 -6
  21. package/dist/assets/js/bootstrap.bundle.js.map +1 -1
  22. package/dist/assets/js/bootstrap.bundle.min.js +2 -2
  23. package/dist/assets/js/bootstrap.bundle.min.js.map +1 -1
  24. package/dist/assets/js/bootstrap.js +3 -6
  25. package/dist/assets/js/bootstrap.min.js +2 -2
  26. package/dist/assets/js/bootstrap.min.js.map +1 -1
  27. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  28. package/dist/assets/js/handlebars.helpers.bundle.js.map +3 -3
  29. package/dist/assets/js/handlebars.helpers.js +51 -40
  30. package/dist/assets/js/handlebars.init.min.js +698 -347
  31. package/dist/assets/js/handlebars.init.min.js.map +4 -4
  32. package/dist/assets/js/handlebars.partials.js +16 -0
  33. package/dist/assets/js/qld.bootstrap.min.js +9 -9
  34. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  35. package/dist/assets/node/handlebars.init.min.js +359 -72
  36. package/dist/assets/node/handlebars.init.min.js.map +3 -3
  37. package/dist/components/bs5/backToTop/backToTop.hbs +1 -1
  38. package/dist/components/bs5/breadcrumbs/breadcrumbs.hbs +19 -15
  39. package/dist/components/bs5/button/button.hbs +48 -30
  40. package/dist/components/bs5/containerLayout/containerLayout.hbs +100 -0
  41. package/dist/components/bs5/contentFooter/contentFooter.hbs +15 -4
  42. package/dist/components/bs5/formcheck/formcheck.hbs +1 -1
  43. package/dist/components/bs5/head/head.hbs +1 -1
  44. package/dist/components/bs5/iconLink/iconLink.hbs +41 -0
  45. package/dist/components/bs5/logo/logo.hbs +7 -0
  46. package/dist/components/bs5/logo/logoCOALandscape.hbs +58 -0
  47. package/dist/components/bs5/logo/logoCOALandscape2Lines.hbs +58 -0
  48. package/dist/components/bs5/navbar/navbar.hbs +65 -245
  49. package/dist/components/bs5/pageLayout/pageLayout.hbs +11 -10
  50. package/dist/components/bs5/pageLayout/templates/contentPageWithForm.hbs +78 -0
  51. package/dist/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +103 -0
  52. package/dist/components/bs5/pageLayout/templates/fullWidthLandingPage.hbs +61 -0
  53. package/dist/components/bs5/searchInput/searchInput.hbs +8 -10
  54. package/dist/components/handlebars.helpers.js +51 -40
  55. package/dist/components/handlebars.partials.js +16 -0
  56. package/dist/package.json +2 -2
  57. package/dist/sample-data/breadcrumbs/breadcrumbs.data.json +113 -49
  58. package/dist/sample-data/button/button.data.json +10 -8
  59. package/dist/sample-data/contentFooter/contentFooter.data.json +9 -1
  60. package/dist/sample-data/formcheck/stories/checkbox/checkbox.data.json +51 -46
  61. package/dist/sample-data/formcheck/stories/radio/radio.data.json +51 -46
  62. package/dist/sample-data/iconLink/iconLink.data.json +77 -0
  63. package/dist/sample-data/logo/logo.data.json +6 -0
  64. package/dist/sample-data/navbar/navbar.data.json +191 -0
  65. package/dist/sample-data/searchInput/searchInput.data.json +2 -3
  66. package/dist/sample-data/tabs/tabs.data.json +45 -44
  67. package/package.json +2 -2
  68. package/src/components/bs5/backToTop/backToTop.hbs +1 -1
  69. package/src/components/bs5/banner/banner.scss +52 -46
  70. package/src/components/bs5/breadcrumbs/__snapshots__/breadcrumbs.test.js.snap +49 -0
  71. package/src/components/bs5/breadcrumbs/breadcrumbs.data.json +113 -49
  72. package/src/components/bs5/breadcrumbs/breadcrumbs.functions.js +169 -0
  73. package/src/components/bs5/breadcrumbs/breadcrumbs.hbs +19 -15
  74. package/src/components/bs5/breadcrumbs/breadcrumbs.scss +164 -43
  75. package/src/components/bs5/breadcrumbs/breadcrumbs.stories.js +16 -2
  76. package/src/components/bs5/breadcrumbs/breadcrumbs.test.js +136 -0
  77. package/src/components/bs5/button/button.data.json +10 -8
  78. package/src/components/bs5/button/button.hbs +48 -30
  79. package/src/components/bs5/button/button.scss +365 -244
  80. package/src/components/bs5/button/button.stories.js +116 -30
  81. package/src/components/bs5/containerLayout/containerLayout.hbs +100 -0
  82. package/src/components/bs5/containerLayout/containerLayout.stories.js +83 -0
  83. package/src/components/bs5/contentFooter/contentFooter.data.json +9 -1
  84. package/src/components/bs5/contentFooter/contentFooter.hbs +15 -4
  85. package/src/components/bs5/formcheck/formcheck.hbs +1 -1
  86. package/src/components/bs5/formcheck/formcheck.scss +161 -139
  87. package/src/components/bs5/formcheck/stories/checkbox/checkbox.data.json +51 -46
  88. package/src/components/bs5/formcheck/stories/radio/radio.data.json +51 -46
  89. package/src/components/bs5/iconLink/iconLink.data.json +77 -0
  90. package/src/components/bs5/iconLink/iconLink.hbs +41 -0
  91. package/src/components/bs5/iconLink/iconLink.js +20 -0
  92. package/src/components/bs5/iconLink/iconLink.mdx +16 -0
  93. package/src/components/bs5/iconLink/iconLink.scss +57 -0
  94. package/src/components/bs5/iconLink/iconLink.stories.js +127 -0
  95. package/src/components/bs5/icons/icons.scss +79 -72
  96. package/src/components/bs5/inpagenav/inpagenav.scss +37 -37
  97. package/src/components/bs5/logo/Logo.js +20 -0
  98. package/src/components/bs5/logo/Logo.mdx +10 -0
  99. package/src/components/bs5/logo/logo.data.json +6 -0
  100. package/src/components/bs5/logo/logo.hbs +7 -0
  101. package/src/components/bs5/logo/logo.stories.js +32 -0
  102. package/src/components/bs5/logo/logoCOALandscape.hbs +58 -0
  103. package/src/components/bs5/logo/logoCOALandscape2Lines.hbs +58 -0
  104. package/src/components/bs5/navbar/Navbar.js +2 -9
  105. package/src/components/bs5/navbar/navbar.data.json +191 -0
  106. package/src/components/bs5/navbar/navbar.functions.js +48 -196
  107. package/src/components/bs5/navbar/navbar.hbs +65 -245
  108. package/src/components/bs5/navbar/navbar.scss +585 -518
  109. package/src/components/bs5/navbar/navbar.stories.js +532 -0
  110. package/src/components/bs5/pageLayout/ContentPageWithForm.js +8 -0
  111. package/src/components/bs5/pageLayout/ContentPageWithSideNavigation.js +8 -0
  112. package/src/components/bs5/pageLayout/FullWidthLandingPage.js +8 -0
  113. package/src/components/bs5/pageLayout/pageLayout.hbs +11 -10
  114. package/src/components/bs5/pageLayout/pageLayout.stories.js +230 -6
  115. package/src/components/bs5/pageLayout/templates/contentPageWithForm.hbs +78 -0
  116. package/src/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +103 -0
  117. package/src/components/bs5/pageLayout/templates/fullWidthLandingPage.hbs +61 -0
  118. package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +9 -8
  119. package/src/components/bs5/searchInput/search.functions.js +94 -63
  120. package/src/components/bs5/searchInput/searchInput.data.json +2 -3
  121. package/src/components/bs5/searchInput/searchInput.hbs +8 -10
  122. package/src/components/bs5/searchInput/searchInput.scss +296 -255
  123. package/src/components/bs5/searchInput/searchInput.test.js +98 -89
  124. package/src/components/bs5/sidenav/sidenav.stories.js +17 -15
  125. package/src/components/bs5/tabs/tabs.data.json +45 -44
  126. package/src/components/bs5/tabs/tabs.scss +544 -500
  127. package/src/components/bs5/tabs/tabs.stories.js +81 -51
  128. package/src/components/common/footer/footer.scss +137 -140
  129. package/src/components/common/layout/container.scss +22 -0
  130. package/src/components/common/layout/content.scss +11 -4
  131. package/src/components/common/layout/grid.scss +26 -0
  132. package/src/css/main.scss +5 -4
  133. package/src/css/qld-variables.scss +102 -81
  134. package/src/js/handlebars.helpers.js +51 -40
  135. package/src/js/handlebars.partials.js +16 -0
  136. package/src/js/qld.bootstrap.js +17 -9
  137. package/src/components/bs5/backToTop/backToTop.scss +0 -9
  138. package/src/components/bs5/breadcrumbs/breadcrumb.functions.js +0 -95
  139. package/src/components/bs5/breadcumbsWrapper/breadcrumbsWrapper.stories.js +0 -34
  140. package/src/components/bs5/contentFooterWrapper/contentFooterWrapper.stories.js +0 -36
  141. package/src/components/bs5/contentWrapper/contentWrapper.stories.js +0 -65
  142. package/src/components/bs5/fullPageWrapper/fullPage.stories.js +0 -63
  143. package/src/components/bs5/mainContainerWrapper/mainContainerWrapper.stories.js +0 -50
  144. package/src/components/bs5/navbar/_colours.scss +0 -85
  145. package/src/components/bs5/navbar/_icons.scss +0 -64
  146. package/src/components/bs5/sidenavWrapper/SidenavWrapper.mdx +0 -11
  147. package/src/components/bs5/sidenavWrapper/sidenavWrapper.stories.js +0 -65
  148. package/src/stories/integration/MainIntegration.js +0 -28
  149. package/src/stories/integration/MainIntegration.mdx +0 -10
  150. package/src/stories/integration/breadcrumb.data.json +0 -28
  151. package/src/stories/integration/content.data.json +0 -3
  152. package/src/stories/integration/contentFooter.data.json +0 -3
  153. package/src/stories/integration/footer.data.json +0 -111
  154. package/src/stories/integration/globalAlert.data.json +0 -10
  155. package/src/stories/integration/header.data.json +0 -173
  156. package/src/stories/integration/inpagenav.data.json +0 -26
  157. package/src/stories/integration/integration.stories.js +0 -147
  158. package/src/stories/integration/main.hbs +0 -13
  159. package/src/stories/integration/navigation.data.json +0 -22
  160. package/src/stories/integration/search.data.json +0 -20
  161. package/src/stories/integration/sidenav.data.json +0 -88
@@ -25,7 +25,8 @@ $input-transition:
25
25
  // Checks and radios (LARGE)
26
26
  $form-check-input-width: 2rem;
27
27
 
28
- $form-check-input-width-small: 22px;
28
+ // Checks and radios (SMALL)
29
+ $form-check-input-width-small: 1.375rem;
29
30
 
30
31
  $form-check-min-height: $font-size-base * $line-height-base;
31
32
  $form-check-padding-start: $form-check-input-width + 0.5rem;
@@ -37,13 +38,13 @@ $form-check-transition: null;
37
38
  $form-check-input-active-filter: brightness(100%);
38
39
 
39
40
  $form-check-input-bg: $input-bg;
40
- $form-check-input-border: 2px solid var(--#{$prefix}soft-grey);
41
+ $form-check-input-border: 2px solid var(--#{$prefix}light-text-text);
41
42
  $form-check-input-border-radius: 0.25em;
42
43
  $form-check-radio-border-radius: 50%;
43
44
 
44
- $form-check-input-checked-color: #414141;
45
+ $form-check-input-checked-color: var(--#{$prefix}light-text-text);
45
46
  $form-check-input-checked-bg-color: transparent;
46
- $form-check-input-checked-border-color: var(--#{$prefix}soft-grey);
47
+ $form-check-input-checked-border-color: var(--#{$prefix}light-text-text);
47
48
 
48
49
  $form-check-hover: var(--#{$prefix}dark-hover);
49
50
 
@@ -58,25 +59,27 @@ $form-check-input-outline-dark: 3px solid var(--#{$prefix}dark-focus);
58
59
  $form-check-input-border-width-small: 2px;
59
60
 
60
61
  // DARK ICON
61
- $form-check-input-checked-color-dark: #fff;
62
+ $form-check-input-checked-color-dark: var(--#{$prefix}dark-text-text);
62
63
 
63
64
  // DARK BORDER
64
- $form-check-input-border-dark: 0.15em solid var(--#{$prefix}dark-alt-border);
65
+ $form-check-input-border-dark: var(--#{$prefix}dark-text-text);
65
66
 
66
67
  // RADIO CHECKED LIGHT
67
- $form-radio-bg-image: url("data:image/svg+xml,<svg viewBox='-2 -2 4 4' xmlns='http://www.w3.org/2000/svg'><circle r='1.8' fill='#{$form-check-input-checked-color}'/></svg>");
68
+ $form-radio-bg-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none"><circle cx="16" cy="16" r="11" fill="#000000"/></svg>');
69
+ $form-radio-bg-image-small: url('data:image/svg+xml,<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 17.5C14.5899 17.5 17.5 14.5899 17.5 11C17.5 7.41015 14.5899 4.5 11 4.5C7.41015 4.5 4.5 7.41015 4.5 11C4.5 14.5899 7.41015 17.5 11 17.5Z" fill="#000000"/></svg>');
68
70
 
69
71
  // RADIO CHECKED DARK
70
72
  $form-radio-bg-image-dark: url("data:image/svg+xml,<svg viewBox='-2 -2 4 4' xmlns='http://www.w3.org/2000/svg'><circle r='1.8' fill='#{$form-check-input-checked-color-dark}'/></svg>");
71
73
 
72
74
  // CHECKBOX CHECKED LIGHT
73
- $form-check-bg-image: url("data:image/svg+xml,<svg width='18' height='13' viewBox='0 0 18 13' fill='#{$form-check-input-checked-color}' xmlns='http://www.w3.org/2000/svg'><path d='M17.5547 0.445312C17.7891 0.679688 17.7891 1.10938 17.5547 1.34375L6.92969 11.9688C6.69531 12.2031 6.26562 12.2031 6.03125 11.9688L0.40625 6.34375C0.171875 6.10938 0.171875 5.67969 0.40625 5.44531C0.640625 5.21094 1.07031 5.21094 1.30469 5.44531L6.5 10.6406L16.6562 0.445312C16.8906 0.210938 17.3203 0.210938 17.5547 0.445312Z' /></svg>");
75
+ $form-check-bg-image: url("data:image/svg+xml,%3Csvg width='18' height='14' viewBox='0 0 18 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5498 13.8L0.0498047 7.30002L2.2998 5.05002L6.5498 9.30002L15.6998 0.150024L17.9498 2.40002L6.5498 13.8Z' fill='currentColor'/%3E%3C/svg%3E%0A");
74
76
 
75
77
  // CHECKBOX CHECKED DARK
76
- $form-check-bg-image-dark: url("data:image/svg+xml,<svg width='18' height='13' viewBox='0 0 18 13' fill='#{$form-check-input-checked-color-dark}' xmlns='http://www.w3.org/2000/svg'><path d='M17.5547 0.445312C17.7891 0.679688 17.7891 1.10938 17.5547 1.34375L6.92969 11.9688C6.69531 12.2031 6.26562 12.2031 6.03125 11.9688L0.40625 6.34375C0.171875 6.10938 0.171875 5.67969 0.40625 5.44531C0.640625 5.21094 1.07031 5.21094 1.30469 5.44531L6.5 10.6406L16.6562 0.445312C16.8906 0.210938 17.3203 0.210938 17.5547 0.445312Z' /></svg>");
78
+ $form-check-bg-image-dark: url("data:image/svg+xml,%3Csvg width='18' height='14' viewBox='0 0 18 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5498 13.8L0.0498047 7.30002L2.2998 5.05002L6.5498 9.30002L15.6998 0.150024L17.9498 2.40002L6.5498 13.8Z' fill='#{$form-check-input-checked-color-dark}'/%3E%3C/svg%3E");
77
79
 
78
80
  // ESCAPE SVGs FOR ICONS
79
81
  $form-radio-button: #{escape-svg($form-radio-bg-image)};
82
+ $form-radio-button-small: #{escape-svg($form-radio-bg-image-small)};
80
83
  $form-radio-button-dark: #{escape-svg($form-radio-bg-image-dark)};
81
84
  $form-checkbox-button: #{escape-svg($form-check-bg-image)};
82
85
  $form-checkbox-button-dark: #{escape-svg($form-check-bg-image-dark)};
@@ -92,21 +95,6 @@ $form-check-btn-check-disabled-opacity: $btn-disabled-opacity;
92
95
 
93
96
  $form-check-inline-margin-end: 1rem;
94
97
 
95
- .small {
96
- .form-check .form-check-input {
97
- width: $form-check-input-width-small;
98
- height: $form-check-input-width-small;
99
-
100
- &[type="checkbox"],
101
- &[type="radio"] {
102
- border-width: #{$form-check-input-border-width-small};
103
- &:checked {
104
- background-size: 14px 14px;
105
- }
106
- }
107
- }
108
- }
109
-
110
98
  .form-label {
111
99
  font-weight: 600;
112
100
  line-height: 1.5;
@@ -138,158 +126,192 @@ $form-check-inline-margin-end: 1rem;
138
126
  &:active,
139
127
  &:focus {
140
128
  border-color: var(--#{$prefix}input-border-color-hover);
141
- outline: #{$form-check-input-outline};
129
+ outline: $form-check-input-outline;
142
130
  outline-offset: 2px;
143
131
  box-shadow: none;
144
132
  }
145
133
  }
146
134
 
147
- .form-check {
148
- display: flex;
149
- align-items: center;
150
- margin-bottom: $form-check-margin-bottom;
151
-
152
- .form-check-input {
153
- width: $form-check-input-width;
154
- height: $form-check-input-width;
155
- margin-top: 0;
156
-
157
- &:hover,
158
- &:focus {
159
- cursor: pointer;
160
- background-color: var(--#{$prefix}extra-light-grey);
135
+ .form-check-input {
136
+ // hides the original input element, and + label recreates it visually
137
+ background-size: calc(2rem - 8px);
138
+ border: 0;
139
+ clip-path: inset(0 0 0 0);
140
+ width: 1px;
141
+ height: 1px;
142
+ margin: -1px;
143
+ overflow: hidden;
144
+ padding: 0;
145
+ position: absolute;
146
+ margin-top: 0;
147
+
148
+ + label {
149
+ --_background-color: transparent;
150
+ cursor: pointer;
151
+ position: relative;
152
+ vertical-align: bottom;
153
+ line-height: 2rem;
154
+ padding-left: 2.5rem;
155
+ margin-left: -1.5em;
156
+
157
+ // before is the outer box with border,
158
+ // after is the check or radio icon
159
+ &::before,
160
+ &::after {
161
+ visibility: visible;
162
+ content: " ";
163
+ display: block;
164
+ position: absolute;
165
+ top: 0;
166
+ left: 0;
167
+ box-sizing: border-box;
168
+ background-repeat: no-repeat;
169
+ z-index: 9;
170
+ border: $form-check-input-border;
171
+ width: 2rem;
172
+ height: 2rem;
161
173
  }
162
- &:active,
163
- &:focus {
164
- border-color: var(--#{$prefix}input-border-color-hover);
165
- outline: #{$form-check-input-outline};
166
- outline-offset: 3px;
167
- box-shadow: none;
174
+ &::before {
175
+ background-color: var(--_background-color);
176
+ border-color: $form-check-input-checked-border-color;
177
+ background-image: none !important;
178
+ }
179
+
180
+ &::after {
181
+ z-index: 101;
182
+ background-color: transparent;
168
183
  }
169
184
  }
170
185
 
171
- // DEFAULT RADIO
172
- .form-check-input[type="radio"] {
186
+ &:active + label::before,
187
+ &:focus + label::before {
188
+ border-color: var(--#{$prefix}input-border-color-hover);
189
+ outline: $form-check-input-outline;
190
+ outline-offset: 2px;
191
+ box-shadow: none;
192
+ }
193
+
194
+ &:hover + label {
195
+ --_background-color: var(--#{$prefix}extra-light-grey);
196
+ }
197
+
198
+ &:checked {
199
+ background-color: transparent;
173
200
  background-image: none;
174
- background-size: calc(2rem - 8px);
175
- border: $form-check-input-border;
176
201
 
177
- &:checked {
178
- background-color: transparent;
179
- background-image: #{$form-radio-button};
180
- background-size: calc(2rem - 8px);
202
+ & + label::after {
203
+ content: "";
204
+ display: block;
205
+ mask-repeat: no-repeat;
206
+ mask-position: center;
207
+ background-color: $form-check-input-checked-color;
181
208
  }
182
209
  }
183
210
 
184
- // DEFAULT CHECKBOX
185
- .form-check-input[type="checkbox"] {
186
- background-size: calc(2rem - 8px);
187
- border: $form-check-input-border;
211
+ &[type="checkbox"] {
188
212
  border-radius: 0;
189
213
 
190
214
  &:checked {
191
- background-image: #{$form-checkbox-button};
192
- background-color: #{$form-check-input-checked-bg-color};
193
- background-size: 1.125rem;
194
- background-position: center;
195
- border-color: #{$form-check-input-checked-border-color};
215
+ + label::after {
216
+ mask-image: $form-check-bg-image;
217
+ mask-size: 1.125rem;
218
+ }
196
219
  }
197
220
  }
198
221
 
199
- // DEFAULT VALID
200
- .valid & {
201
- .form-check-input[type="radio"],
202
- .form-check-input[type="checkbox"] {
203
- outline: #{$form-check-valid-color} solid 2px;
204
-
205
- &:focus {
206
- outline: #{$form-check-input-outline};
207
- outline-offset: 2px;
208
- box-shadow: none;
222
+ &[type="radio"] {
223
+ background-image: none;
224
+
225
+ + label {
226
+ //
227
+ &::before,
228
+ &::after {
229
+ border-radius: 50%;
209
230
  }
210
- &:checked:focus {
211
- outline: #{$form-check-input-outline};
231
+
232
+ &::after {
233
+ mask-image: $form-radio-button;
234
+ mask-size: 100%;
212
235
  }
213
236
  }
214
237
  }
215
- // DEFAULT INVALID
238
+
239
+ // DEFAULT VALID & INVALID
240
+ .valid &,
241
+ .invalid & {
242
+ &:focus + label::before {
243
+ outline: $form-check-input-outline;
244
+ outline-offset: 2px;
245
+ box-shadow: none;
246
+ }
247
+ }
248
+ .valid & {
249
+ + label::before {
250
+ outline: $form-check-valid-color solid 2px;
251
+ }
252
+ }
216
253
  .invalid & {
217
- .form-check-input[type="radio"],
218
- .form-check-input[type="checkbox"] {
219
- outline: #{$form-check-invalid-color} solid 2px;
220
-
221
- &:focus {
222
- outline: #{$form-check-input-outline};
223
- outline-offset: 2px;
224
- box-shadow: none;
225
- }
226
- &:checked:focus {
227
- outline: #{$form-check-input-outline};
228
- }
254
+ + label::before {
255
+ outline: $form-check-invalid-color solid 2px;
229
256
  }
230
257
  }
231
- // DARK
232
- .dark &,
233
- .dark-alt & {
234
- .form-check-input {
235
- &:hover,
236
- &:focus {
237
- background-color: #{$form-check-hover};
238
- }
258
+
259
+ .small & {
260
+ &:checked + label::before {
261
+ background-size: 22px 22px;
239
262
  }
240
- .form-check-input[type="checkbox"]:checked {
241
- background-image: #{$form-checkbox-button-dark};
263
+
264
+ &[type="checkbox"]:checked + label:after {
265
+ mask-size: 0.84906rem 0.63988rem;
242
266
  }
243
- .form-check-input[type="radio"]:checked {
244
- background-image: #{$form-radio-button-dark};
267
+
268
+ + label {
269
+ font-size: 1rem;
270
+ font-style: normal;
271
+ font-weight: 400;
272
+ line-height: $input-line-height;
273
+ padding-left: 1.875rem;
274
+
275
+ &:before,
276
+ &:after {
277
+ width: $form-check-input-width-small;
278
+ height: $form-check-input-width-small;
279
+ border-width: $form-check-input-border-width-small;
280
+ }
245
281
  }
246
- .form-check-input,
247
- .form-check-input:checked {
248
- border: #{$form-check-input-border-dark};
282
+
283
+ &[type="radio"] + label::after {
284
+ mask-image: $form-radio-button-small;
249
285
  }
250
- .form-check-input:focus {
251
- outline: #{$form-check-input-outline-dark};
286
+ }
287
+
288
+ .dark &,
289
+ .dark-alt & {
290
+ &:hover + label {
291
+ --_background-color: $form-check-hover;
252
292
  }
253
- .small & {
254
- .form-check-input[type="checkbox"],
255
- .form-check-input[type="radio"] {
256
- &:checked {
257
- background-color: transparent;
258
- background-size: 14px 14px;
259
- }
260
- }
293
+ &:hover + label::after {
294
+ background-color: $form-check-hover;
261
295
  }
262
- // DARK VALID
263
- .valid & {
264
- .form-check-input[type="radio"],
265
- .form-check-input[type="checkbox"] {
266
- outline: #{$form-check-valid-color} solid 2px;
267
- &:focus {
268
- outline: #{$form-check-input-outline-dark};
269
- outline-offset: 2px;
270
- box-shadow: none;
271
- }
272
- &:checked:focus {
273
- outline: #{$form-check-input-outline-dark};
274
- }
275
- }
296
+ + label::before,
297
+ + label::after {
298
+ border-color: $form-check-input-border-dark;
276
299
  }
277
- // DARK INVALID
278
- .invalid & {
279
- .form-check-input[type="radio"],
280
- .form-check-input[type="checkbox"] {
281
- outline: #{$form-check-invalid-color} solid 2px;
282
- &:focus {
283
- outline: #{$form-check-input-outline-dark};
284
- outline-offset: 2px;
285
- box-shadow: none;
286
- }
287
- &:checked:focus {
288
- outline: #{$form-check-input-outline-dark};
289
- }
300
+ &:checked {
301
+ & + label::after {
302
+ background-color: $form-check-input-checked-color-dark;
290
303
  }
291
304
  }
305
+ :focus {
306
+ outline: $form-check-input-outline-dark;
307
+ }
292
308
  }
309
+ }
310
+
311
+ .form-check {
312
+ display: flex;
313
+ align-items: center;
314
+ margin-bottom: $form-check-margin-bottom;
293
315
  &-label {
294
316
  margin-left: 0.5rem;
295
317
  }
@@ -1,48 +1,53 @@
1
1
  {
2
- "questionLabel": "Which service do you need?",
3
- "optionalLabel": "(Optional)",
4
- "hintLabel": "Hint label",
5
- "listClasses": "field-required",
6
- "listitems": [
7
- {
8
- "type": "checkbox",
9
- "id": "checkboxItem1",
10
- "name": "checkboxOption",
11
- "label": "Option 1",
12
- "value": "1",
13
- "isDisabled": false
14
- },
15
- {
16
- "type": "checkbox",
17
- "id": "checkboxItem2",
18
- "name": "checkboxOption",
19
- "label": "Option 2",
20
- "value": "2",
21
- "isDisabled": false
22
- },
23
- {
24
- "type": "checkbox",
25
- "id": "checkboxItem3",
26
- "name": "checkboxOption",
27
- "label": "Option 3",
28
- "value": "3",
29
- "isDisabled": false
30
- },
31
- {
32
- "type": "checkbox",
33
- "id": "checkboxItem4",
34
- "name": "checkboxOption",
35
- "label": "Option 4",
36
- "value": "4",
37
- "isDisabled": false
38
- },
39
- {
40
- "type": "checkbox",
41
- "id": "checkboxItem5",
42
- "name": "checkboxOption",
43
- "label": "Disabled",
44
- "value": "",
45
- "isDisabled": true
46
- }
47
- ]
2
+ "questionLabel": "Which service do you need?",
3
+ "optionalLabel": "(Optional)",
4
+ "hintLabel": "Hint label",
5
+ "listClasses": "field-required",
6
+ "listitems": [
7
+ {
8
+ "type": "checkbox",
9
+ "id": "checkboxItem1",
10
+ "name": "checkboxOption",
11
+ "label": "Option 1",
12
+ "value": "1",
13
+ "isDisabled": false,
14
+ "isChecked": false
15
+ },
16
+ {
17
+ "type": "checkbox",
18
+ "id": "checkboxItem2",
19
+ "name": "checkboxOption",
20
+ "label": "Option 2",
21
+ "value": "2",
22
+ "isDisabled": false,
23
+ "isChecked": false
24
+ },
25
+ {
26
+ "type": "checkbox",
27
+ "id": "checkboxItem3",
28
+ "name": "checkboxOption",
29
+ "label": "Option 3",
30
+ "value": "3",
31
+ "isDisabled": false,
32
+ "isChecked": false
33
+ },
34
+ {
35
+ "type": "checkbox",
36
+ "id": "checkboxItem4",
37
+ "name": "checkboxOption",
38
+ "label": "Option 4",
39
+ "value": "4",
40
+ "isDisabled": false,
41
+ "isChecked": true
42
+ },
43
+ {
44
+ "type": "checkbox",
45
+ "id": "checkboxItem5",
46
+ "name": "checkboxOption",
47
+ "label": "Disabled",
48
+ "value": "",
49
+ "isDisabled": true,
50
+ "isChecked": false
51
+ }
52
+ ]
48
53
  }
@@ -1,48 +1,53 @@
1
1
  {
2
- "questionLabel": "Which service do you need?",
3
- "optionalLabel": "(Optional)",
4
- "hintLabel": "Hint label",
5
- "listClasses": "field-required",
6
- "listitems": [
7
- {
8
- "type": "radio",
9
- "id": "radioItem1",
10
- "name": "radioOption",
11
- "label": "Option 1",
12
- "value": "1",
13
- "isDisabled": false
14
- },
15
- {
16
- "type": "radio",
17
- "id": "radioItem2",
18
- "name": "radioOption",
19
- "label": "Option 2",
20
- "value": "2",
21
- "isDisabled": false
22
- },
23
- {
24
- "type": "radio",
25
- "id": "radioItem3",
26
- "name": "radioOption",
27
- "label": "Option 3",
28
- "value": "3",
29
- "isDisabled": false
30
- },
31
- {
32
- "type": "radio",
33
- "id": "radioItem4",
34
- "name": "radioOption",
35
- "label": "Option 4",
36
- "value": "4",
37
- "isDisabled": false
38
- },
39
- {
40
- "type": "radio",
41
- "id": "radioItem5",
42
- "name": "radioOption",
43
- "label": "Disabled",
44
- "value": "",
45
- "isDisabled": true
46
- }
47
- ]
2
+ "questionLabel": "Which service do you need?",
3
+ "optionalLabel": "(Optional)",
4
+ "hintLabel": "Hint label",
5
+ "listClasses": "field-required",
6
+ "listitems": [
7
+ {
8
+ "type": "radio",
9
+ "id": "radioItem1",
10
+ "name": "radioOption",
11
+ "label": "Option 1",
12
+ "value": "1",
13
+ "isDisabled": false,
14
+ "isChecked": false
15
+ },
16
+ {
17
+ "type": "radio",
18
+ "id": "radioItem2",
19
+ "name": "radioOption",
20
+ "label": "Option 2",
21
+ "value": "2",
22
+ "isDisabled": false,
23
+ "isChecked": false
24
+ },
25
+ {
26
+ "type": "radio",
27
+ "id": "radioItem3",
28
+ "name": "radioOption",
29
+ "label": "Option 3",
30
+ "value": "3",
31
+ "isDisabled": false,
32
+ "isChecked": true
33
+ },
34
+ {
35
+ "type": "radio",
36
+ "id": "radioItem4",
37
+ "name": "radioOption",
38
+ "label": "Option 4",
39
+ "value": "4",
40
+ "isDisabled": false,
41
+ "isChecked": false
42
+ },
43
+ {
44
+ "type": "radio",
45
+ "id": "radioItem5",
46
+ "name": "radioOption",
47
+ "label": "Disabled",
48
+ "value": "",
49
+ "isDisabled": true,
50
+ "isChecked": false
51
+ }
52
+ ]
48
53
  }
@@ -0,0 +1,77 @@
1
+ {
2
+ "default": {
3
+ "url": "",
4
+ "id": "",
5
+ "label": "Document title (PDF 2.5 MB)",
6
+ "target": "_self",
7
+ "arialabel": "Document title (PDF 2.5 MB)",
8
+ "iconClass": "qld-icon-document-pdf",
9
+ "iconPosition": "leading",
10
+ "download": null
11
+ },
12
+ "linkGroup": {
13
+ "title": "Link group title",
14
+ "linkList": [
15
+ {
16
+ "url": "",
17
+ "id": "doc-1",
18
+ "label": "Document title (DOC 2.5 MB)",
19
+ "target": "_self",
20
+ "arialabel": "Document title (DOC 2.5 MB)",
21
+ "iconClass": "qld-icon-document-word",
22
+ "iconPosition": "leading",
23
+ "download": null
24
+ },
25
+ {
26
+ "url": "",
27
+ "id": "doc-2",
28
+ "label": "JPG image file (JPG 2.5 KB)",
29
+ "target": "_self",
30
+ "arialabel": "JPG image file (JPG 2.5 KB)",
31
+ "iconClass": "qld-icon-image",
32
+ "iconPosition": "leading",
33
+ "download": null
34
+ },
35
+ {
36
+ "url": "",
37
+ "id": "doc-3",
38
+ "label": "PNG image file (PNG 2.5 KB)",
39
+ "target": "_self",
40
+ "arialabel": "PNG image file (PNG 2.5 KB)",
41
+ "iconClass": "qld-icon-image",
42
+ "iconPosition": "leading",
43
+ "download": null
44
+ },
45
+ {
46
+ "url": "",
47
+ "id": "doc-4",
48
+ "label": "Document title (PDF 2.5 MB)",
49
+ "target": "_self",
50
+ "arialabel": "Document title (PDF 2.5 MB)",
51
+ "iconClass": "qld-icon-document-pdf",
52
+ "iconPosition": "leading",
53
+ "download": null
54
+ },
55
+ {
56
+ "url": "",
57
+ "id": "doc-5",
58
+ "label": "Document title (CSV 2.5 MB)",
59
+ "target": "_self",
60
+ "arialabel": "Document title (CSV 2.5 MB)",
61
+ "iconClass": "qld-icon-document-spreadsheet",
62
+ "iconPosition": "leading",
63
+ "download": null
64
+ },
65
+ {
66
+ "url": "",
67
+ "id": "doc-6",
68
+ "label": "Document title (PDF 2.5 MB)",
69
+ "target": "_self",
70
+ "arialabel": "Document title (PDF 2.5 MB)",
71
+ "iconClass": "qld-icon-document-pdf",
72
+ "iconPosition": "leading",
73
+ "download": null
74
+ }
75
+ ]
76
+ }
77
+ }