@qld-gov-au/qgds-bootstrap5 2.0.2 → 2.0.4
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 +4 -1
- package/dist/assets/components/bs5/accordion/accordion.hbs +0 -3
- package/dist/assets/components/bs5/directionLinks/directionLinks.hbs +2 -1
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/header/header.hbs +6 -9
- package/dist/assets/components/bs5/navbar/navbar.hbs +21 -14
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
- package/dist/assets/components/bs5/pageLayout/templates/homePage.hbs +1 -1
- package/dist/assets/components/bs5/searchInput/searchInput.hbs +34 -35
- package/dist/assets/components/bs5/sidenav/sidenav.hbs +56 -37
- package/dist/assets/css/qld.bootstrap.css +1 -6
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/js/handlebars.init.min.js +263 -212
- package/dist/assets/js/handlebars.init.min.js.map +2 -2
- package/dist/assets/js/qld.bootstrap.min.js +5 -5
- package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
- package/dist/assets/node/handlebars.init.min.js +29 -25
- package/dist/assets/node/handlebars.init.min.js.map +2 -2
- package/dist/components/bs5/accordion/accordion.hbs +0 -3
- package/dist/components/bs5/directionLinks/directionLinks.hbs +2 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/header/header.hbs +6 -9
- package/dist/components/bs5/navbar/navbar.hbs +21 -14
- package/dist/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
- package/dist/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
- package/dist/components/bs5/pageLayout/templates/homePage.hbs +1 -1
- package/dist/components/bs5/searchInput/searchInput.hbs +34 -35
- package/dist/components/bs5/sidenav/sidenav.hbs +56 -37
- package/dist/package.json +2 -4
- package/dist/sample-data/navbar/navbar.data.json +91 -25
- package/dist/sample-data/pagination/pagination.data.json +19 -19
- package/dist/sample-data/searchInput/searchInput.data.json +0 -1
- package/dist/sample-data/sidenav/sidenav.data.json +81 -80
- package/package.json +2 -4
- package/src/components/bs5/accordion/Accordion.mdx +34 -10
- package/src/components/bs5/accordion/__snapshots__/accordion.test.js.snap +0 -3
- package/src/components/bs5/accordion/accordion.hbs +0 -3
- package/src/components/bs5/accordion/mdx/_designResources.mdx +6 -0
- package/src/components/bs5/accordion/mdx/_usageInstructions.mdx +10 -0
- package/src/components/bs5/blockquote/blockquote.scss +47 -7
- package/src/components/bs5/button/button.scss +4 -0
- package/src/components/bs5/directionLinks/directionLinks.hbs +2 -1
- package/src/components/bs5/directionLinks/directionLinks.scss +27 -80
- package/src/components/bs5/directionLinks/directionLinks.stories.js +7 -14
- package/src/components/bs5/header/header.hbs +6 -9
- package/src/components/bs5/header/header.scss +15 -27
- package/src/components/bs5/inpagenav/inpagenav.scss +7 -3
- package/src/components/bs5/logo/Logo.mdx +1 -1
- package/src/components/bs5/navbar/navbar.data.json +91 -25
- package/src/components/bs5/navbar/navbar.functions.js +4 -0
- package/src/components/bs5/navbar/navbar.hbs +21 -14
- package/src/components/bs5/navbar/navbar.scss +225 -170
- package/src/components/bs5/navbar/navbar.stories.js +31 -2
- package/src/components/bs5/pageLayout/pageLayout.stories.js +3 -1
- package/src/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
- package/src/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
- package/src/components/bs5/pageLayout/templates/homePage.hbs +1 -1
- package/src/components/bs5/pagination/pagination.data.json +19 -19
- package/src/components/bs5/pagination/pagination.scss +37 -63
- package/src/components/bs5/promotionalPanel/promotionalPanel.scss +23 -22
- package/src/components/bs5/quickexit/quickexit.functions.js +24 -37
- package/src/components/bs5/quickexit/quickexit.scss +4 -0
- package/src/components/bs5/searchInput/SearchInput.mdx +1 -1
- package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +32 -34
- package/src/components/bs5/searchInput/searchInput.data.json +0 -1
- package/src/components/bs5/searchInput/searchInput.hbs +34 -35
- package/src/components/bs5/searchInput/searchInput.scss +216 -195
- package/src/components/bs5/searchInput/searchInput.stories.js +42 -26
- package/src/components/bs5/sidenav/sidenav.data.json +81 -80
- package/src/components/bs5/sidenav/sidenav.hbs +56 -37
- package/src/components/bs5/sidenav/sidenav.scss +236 -151
- package/src/components/bs5/skiplinks/skipLinks.functions.js +0 -9
- package/src/components/bs5/skiplinks/skipLinks.test.js +0 -1
- package/src/components/bs5/tabs/tabs.scss +47 -40
- package/src/components/common/layout/container.scss +5 -0
- package/src/components/common/layout/content.scss +16 -8
- package/src/css/main.scss +0 -7
- package/src/css/mixins/focusable.scss +11 -3
- package/src/css/mixins/make-icon.scss +7 -1
- package/src/css/qld-theme.scss +1 -0
- package/src/css/utilities/_index.scss +1 -0
- package/src/css/utilities/sr-only.scss +5 -0
- package/src/js/qld.bootstrap.js +1 -9
- package/src/stories/documentation/_storybookDocsTabs.jsx +63 -0
- package/src/stories/documentation/storybook-documentation.scss +51 -0
- package/src/components/bs5/pagination/health-icon-sprite.svg +0 -156
- package/src/components/bs5/searchInput/_colours.scss +0 -63
|
@@ -1,31 +1,150 @@
|
|
|
1
|
-
|
|
2
|
-
// Search input - palettes and second hand variables:
|
|
3
|
-
@import "./colours";
|
|
1
|
+
@use "../../../css/mixins";
|
|
4
2
|
|
|
5
|
-
// ----------------------------------------------------------------------------------------------------------------------
|
|
6
3
|
.qld-search-input {
|
|
7
|
-
//
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
// Input variables
|
|
5
|
+
--background-color: var(--#{$prefix}white);
|
|
6
|
+
--border-color: var(--#{$prefix}light-border-alt);
|
|
7
|
+
--placeholder-color: var(--#{$prefix}light-text-lighter);
|
|
8
|
+
--qld-icon-color: var(--#{$prefix}light-text-lighter);
|
|
9
|
+
--text-color: var(--#{$prefix}light-text-text);
|
|
10
|
+
--text-heading: var(--#{$prefix}color-default-color-light-text-heading);
|
|
11
|
+
|
|
12
|
+
.dark &, .dark-alt & {
|
|
13
|
+
--text-heading: var(--#{$prefix}dark-text-lighter);
|
|
14
|
+
--qld-focus-color: var(--#{$prefix}dark-focus);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Suggestions variables
|
|
18
|
+
--suggestions-shadow:
|
|
19
|
+
0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 3px 1px rgba(0, 0, 0, 0.1);
|
|
20
|
+
--suggestions-bg: var(
|
|
21
|
+
--#{$prefix}color-default-color-light-background-default-shade
|
|
22
|
+
);
|
|
23
|
+
--suggestions-hover: var(
|
|
24
|
+
--#{$prefix}color-default-color-light-border-default
|
|
25
|
+
);
|
|
26
|
+
--suggestions-hover-border-color: var(
|
|
27
|
+
--#{$prefix}color-default-color-light-accent-design-accent
|
|
28
|
+
);
|
|
29
|
+
--suggestions-feature-bg: var(
|
|
30
|
+
--#{$prefix}color-default-color-dark-background-default
|
|
31
|
+
);
|
|
32
|
+
--suggestions-feature-hover: var(
|
|
33
|
+
--#{$prefix}color-default-color-dark-background-default-shade
|
|
34
|
+
);
|
|
35
|
+
--suggestions-feature-text-color: var(
|
|
36
|
+
--#{$prefix}color-default-color-dark-text-default
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
// local variables
|
|
40
|
+
$border-radius: 0.25rem;
|
|
41
|
+
--_size: 3rem;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
display: flex;
|
|
16
45
|
position: relative;
|
|
17
|
-
|
|
46
|
+
border-radius: $border-radius;
|
|
47
|
+
|
|
48
|
+
@include mixins.focusable($customSelector: ":has(.form-control:focus)");
|
|
49
|
+
|
|
50
|
+
&:has(.form-control:focus) {
|
|
51
|
+
> button {
|
|
52
|
+
border-bottom-right-radius: $border-radius;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
18
55
|
|
|
19
56
|
.form-control {
|
|
20
|
-
min-height:
|
|
57
|
+
min-height: var(--_size);
|
|
58
|
+
padding: 0 4rem 0 1rem;
|
|
59
|
+
border: {
|
|
60
|
+
color: var(--border-color);
|
|
61
|
+
style: solid;
|
|
62
|
+
top-width: 0.125rem;
|
|
63
|
+
right-width: 0;
|
|
64
|
+
bottom-width: 0.125rem;
|
|
65
|
+
left-width: 0.125rem;
|
|
66
|
+
radius: $border-radius 0 0 $border-radius;
|
|
67
|
+
}
|
|
68
|
+
background: var(--background-color);
|
|
69
|
+
padding-right: 7.5rem;
|
|
70
|
+
color: var(--text-color);
|
|
71
|
+
transition: {
|
|
72
|
+
property: border-color, background-color, color;
|
|
73
|
+
timing-function: ease-out;
|
|
74
|
+
duration: 0.2s;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&::placeholder {
|
|
78
|
+
color: var(--placeholder-color);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
--background-color: var(--#{$prefix}neutral-lightest);
|
|
83
|
+
--border-color: var(--#{$prefix}light-action-primary-hover);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:active,
|
|
87
|
+
&:focus {
|
|
88
|
+
--border-color: var(--#{$prefix}light-border-alt);
|
|
89
|
+
--background-color: var(--#{$prefix}white);
|
|
90
|
+
outline: none;
|
|
91
|
+
}
|
|
21
92
|
}
|
|
22
93
|
|
|
23
|
-
|
|
24
|
-
|
|
94
|
+
> button {
|
|
95
|
+
border-radius: 0 $border-radius $border-radius 0;
|
|
96
|
+
padding: 0;
|
|
97
|
+
margin: 0;
|
|
98
|
+
width: var(--_size);
|
|
99
|
+
box-shadow: none;
|
|
100
|
+
min-width: auto;
|
|
101
|
+
min-height: auto;
|
|
102
|
+
flex-shrink: 0;
|
|
103
|
+
|
|
104
|
+
&:hover,
|
|
105
|
+
&:focus {
|
|
106
|
+
box-shadow: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.btn-label {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//prep a button "search-icon" which is invoked at smaller screeen sizes below
|
|
114
|
+
.btn-icon {
|
|
115
|
+
@include mixins.make-icon($name: "search", $size: "md");
|
|
116
|
+
--qld-icon-color: currentColor;
|
|
117
|
+
}
|
|
25
118
|
}
|
|
26
119
|
|
|
27
|
-
@include media-breakpoint-up(
|
|
28
|
-
|
|
120
|
+
@include media-breakpoint-up(md) {
|
|
121
|
+
--_size: 3.25rem;
|
|
122
|
+
|
|
123
|
+
> button {
|
|
124
|
+
padding: calc(0.75rem - 0.125rem) var(--qld-btn-padding-x);
|
|
125
|
+
margin: 0;
|
|
126
|
+
width: auto;
|
|
127
|
+
|
|
128
|
+
.btn-label {
|
|
129
|
+
display: block;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.btn-icon {
|
|
133
|
+
display: none;
|
|
134
|
+
margin-left: 0;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.form-control {
|
|
139
|
+
padding: 0.75rem 1rem 0.75rem 2.5rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@include mixins.make-icon($name: "search", $size: "xs", $pseudo: "before") {
|
|
143
|
+
position: absolute;
|
|
144
|
+
top: 50%;
|
|
145
|
+
transform: translateY(-50%);
|
|
146
|
+
left: calc(1rem - 0.125rem);
|
|
147
|
+
}
|
|
29
148
|
}
|
|
30
149
|
|
|
31
150
|
//Search dropdown
|
|
@@ -36,10 +155,9 @@
|
|
|
36
155
|
width: 100%;
|
|
37
156
|
z-index: 1;
|
|
38
157
|
border-radius: 0.5rem;
|
|
39
|
-
background: var(
|
|
40
|
-
box-shadow: var(
|
|
41
|
-
border-bottom: solid 0.25rem
|
|
42
|
-
var(--#{$prefix}site-search-suggestions-hover__border_color);
|
|
158
|
+
background: var(--suggestions-bg);
|
|
159
|
+
box-shadow: var(--suggestions-shadow);
|
|
160
|
+
border-bottom: solid 0.25rem var(--suggestions-hover-border-color);
|
|
43
161
|
|
|
44
162
|
.suggestions-category {
|
|
45
163
|
&-view-more {
|
|
@@ -50,7 +168,7 @@
|
|
|
50
168
|
0.5
|
|
51
169
|
);
|
|
52
170
|
&:hover {
|
|
53
|
-
background-color: var(
|
|
171
|
+
background-color: var(--suggestions-hover);
|
|
54
172
|
text-decoration-color: rgba(
|
|
55
173
|
$color-default-color-light-text-default,
|
|
56
174
|
1
|
|
@@ -82,22 +200,20 @@
|
|
|
82
200
|
|
|
83
201
|
// Featured search result styles
|
|
84
202
|
.feature {
|
|
85
|
-
background-color: var(
|
|
203
|
+
background-color: var(--suggestions-feature-bg);
|
|
86
204
|
|
|
87
205
|
strong {
|
|
88
|
-
color: var(
|
|
206
|
+
color: var(--suggestions-feature-text-color);
|
|
89
207
|
}
|
|
90
208
|
|
|
91
209
|
ul {
|
|
92
210
|
li {
|
|
93
211
|
&:hover {
|
|
94
|
-
background-color: var(
|
|
95
|
-
--#{$prefix}site-search-suggestions-feature_hover
|
|
96
|
-
);
|
|
212
|
+
background-color: var(--suggestions-feature-hover);
|
|
97
213
|
}
|
|
98
214
|
|
|
99
215
|
a {
|
|
100
|
-
color: var(
|
|
216
|
+
color: var(--suggestions-feature-text-color);
|
|
101
217
|
}
|
|
102
218
|
}
|
|
103
219
|
}
|
|
@@ -113,15 +229,13 @@
|
|
|
113
229
|
|
|
114
230
|
a,
|
|
115
231
|
strong {
|
|
116
|
-
color: var(--site-search-input-color);
|
|
117
|
-
font-weight: 400;
|
|
118
232
|
font-size: 1rem;
|
|
119
233
|
text-decoration: none;
|
|
120
234
|
}
|
|
121
235
|
|
|
122
236
|
strong {
|
|
123
237
|
font-weight: 600;
|
|
124
|
-
color: var(
|
|
238
|
+
color: var(--text-heading);
|
|
125
239
|
}
|
|
126
240
|
|
|
127
241
|
ul {
|
|
@@ -143,7 +257,7 @@
|
|
|
143
257
|
}
|
|
144
258
|
|
|
145
259
|
&:hover {
|
|
146
|
-
background-color: var(
|
|
260
|
+
background-color: var(--suggestions-hover);
|
|
147
261
|
|
|
148
262
|
a {
|
|
149
263
|
text-decoration: underline;
|
|
@@ -161,186 +275,93 @@
|
|
|
161
275
|
max-width: 100%;
|
|
162
276
|
}
|
|
163
277
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
content: "";
|
|
167
|
-
position: absolute;
|
|
168
|
-
top: 50%;
|
|
169
|
-
transform: translateY(-50%);
|
|
170
|
-
left: calc(1rem - 0.125rem);
|
|
171
|
-
width: 1rem;
|
|
172
|
-
height: 1rem;
|
|
173
|
-
background-color: var(--icon-color);
|
|
174
|
-
mask: var(--icon) center center / 1rem no-repeat;
|
|
175
|
-
mask-size: contain;
|
|
176
|
-
-webkit-mask-size: contain;
|
|
177
|
-
-webkit-mask: var(--icon) center center / 1rem no-repeat;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
//Icon color is scoped against the parent container, not the input :(
|
|
181
|
-
&:has(.form-control:hover) {
|
|
182
|
-
--icon-color: var(--qld-dark-grey-muted);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&:has(.form-control:focus) {
|
|
186
|
-
--icon-color: var(--qld-text-grey);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.btn {
|
|
190
|
-
box-shadow: none;
|
|
191
|
-
min-width: auto;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.form-control {
|
|
195
|
-
padding: 0.75rem 1rem 0.75rem 2.5rem;
|
|
196
|
-
border-radius: 0.25rem;
|
|
197
|
-
border: 0.125rem solid var(--border-color);
|
|
198
|
-
background: var(--background-color);
|
|
199
|
-
padding-right: 7.5rem;
|
|
200
|
-
color: var(--text-color);
|
|
201
|
-
|
|
202
|
-
&::placeholder {
|
|
203
|
-
color: var(--placeholder-color);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&:hover {
|
|
207
|
-
//Rescope hover state
|
|
208
|
-
--icon-color: var(--qld-dark-grey-muted);
|
|
209
|
-
--text-color: var(--qld-text-grey);
|
|
210
|
-
--placeholder-color: var(--qld-text-grey);
|
|
211
|
-
--border-color: var(--qld-light-action-primary);
|
|
212
|
-
--background-color: var(--qld-default-background-shade);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
&:focus {
|
|
216
|
-
//Rescope focus state
|
|
217
|
-
--icon-color: var(--qld-text-grey);
|
|
218
|
-
--text-color: var(--qld-text-grey);
|
|
219
|
-
--placeholder-color: var(--qld-text-grey);
|
|
220
|
-
--border-color: var(--qld-soft-grey);
|
|
221
|
-
--background-color: var(--qld-white);
|
|
222
|
-
|
|
223
|
-
outline: 0.188rem solid var(--outline-color);
|
|
224
|
-
outline-offset: 0.125rem;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
button {
|
|
229
|
-
position: absolute;
|
|
230
|
-
top: 0;
|
|
231
|
-
bottom: 0;
|
|
232
|
-
right: 0;
|
|
233
|
-
border-radius: 0 0.25rem 0.25rem 0;
|
|
234
|
-
|
|
235
|
-
// Adjust button padding to allow for input borders of 2px top and bottom
|
|
236
|
-
padding-top: calc(0.75rem - 0.125rem);
|
|
237
|
-
padding-bottom: calc(0.75rem - 0.125rem);
|
|
238
|
-
|
|
239
|
-
//prep a button "search-icon" which is invoked at smaller screeen sizes below
|
|
240
|
-
span.btn-icon {
|
|
241
|
-
display: none;
|
|
242
|
-
width: 1.5rem;
|
|
243
|
-
height: 1.5rem;
|
|
244
|
-
height: 1.5rem;
|
|
245
|
-
margin-right: 0;
|
|
246
|
-
background-color: var(--icon-color-on-btn);
|
|
247
|
-
mask: var(--icon) center center / 1.25rem no-repeat;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
@include media-breakpoint-up(md) {
|
|
253
|
-
.qld-search-input {
|
|
254
|
-
button {
|
|
255
|
-
span.btn-label {
|
|
256
|
-
display: block;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
span.btn-icon {
|
|
260
|
-
display: none;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
//Adjustments for 991px and below
|
|
267
|
-
// Apply styles for medium screens and down
|
|
268
|
-
@include media-breakpoint-down(md) {
|
|
269
|
-
.qld-search-input {
|
|
270
|
-
button {
|
|
271
|
-
span.btn-label {
|
|
272
|
-
display: none;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
//Show the search icon (on button) on small screens
|
|
276
|
-
span.btn-icon {
|
|
277
|
-
display: block;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
278
|
+
&.is-filled {
|
|
279
|
+
--background-color: var(--#{$prefix}neutral-lightest);
|
|
280
280
|
|
|
281
281
|
.form-control {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
margin: 0;
|
|
290
|
-
width: 3rem;
|
|
282
|
+
border: {
|
|
283
|
+
top-width: 0;
|
|
284
|
+
right-width: 0;
|
|
285
|
+
bottom-width: 0.125rem;
|
|
286
|
+
left-width: 0;
|
|
287
|
+
radius: $border-radius 0 0 0;
|
|
288
|
+
}
|
|
291
289
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
}
|
|
290
|
+
&:active,
|
|
291
|
+
&:focus {
|
|
292
|
+
--border-color: var(--#{$prefix}neutral-lighter);
|
|
293
|
+
border-bottom-left-radius: $border-radius;
|
|
295
294
|
}
|
|
296
295
|
}
|
|
297
296
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
content: none;
|
|
297
|
+
> button {
|
|
298
|
+
border-radius: 0 $border-radius 0 0;
|
|
301
299
|
}
|
|
302
300
|
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.dark {
|
|
306
|
-
.qld-search-input {
|
|
307
|
-
// Rescope colours inside a dark container
|
|
308
|
-
|
|
309
|
-
// Default state - unfocused, unhovered
|
|
310
|
-
--icon-color: #deebf9;
|
|
311
|
-
--icon-color-on-btn: var(--qld-dark-action-text);
|
|
312
301
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
--
|
|
316
|
-
--
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
302
|
+
.dark &,
|
|
303
|
+
.dark-alt & {
|
|
304
|
+
--background-color: var(--#{$prefix}dark-background-background);
|
|
305
|
+
--border-color: var(--#{$prefix}dark-alt-border);
|
|
306
|
+
--placeholder-color: var(--${prefix}dark-text-lighter);
|
|
307
|
+
--qld-icon-color: var(--#{$prefix}white);
|
|
308
|
+
--text-color: var(--#{$prefix}dark-text-text);
|
|
309
|
+
|
|
310
|
+
// Suggestions variables
|
|
311
|
+
--suggestions-bg: var(
|
|
312
|
+
--#{$prefix}color-default-color-dark-background-default-shade
|
|
313
|
+
);
|
|
314
|
+
--suggestions-hover: var(
|
|
315
|
+
--#{$prefix}color-default-color-dark-background-default
|
|
316
|
+
);
|
|
317
|
+
--suggestions-hover-border-color: var(
|
|
318
|
+
--#{$prefix}color-default-color-dark-accent-design-accent
|
|
319
|
+
);
|
|
320
|
+
--suggestions-feature-bg: var(
|
|
321
|
+
--#{$prefix}color-default-color-dark-background-alt
|
|
322
|
+
);
|
|
323
|
+
--suggestions-feature-hover: var(
|
|
324
|
+
--#{$prefix}color-default-color-dark-background-alt-shade
|
|
325
|
+
);
|
|
326
|
+
--suggestions-feature-text-color: var(
|
|
327
|
+
--#{$prefix}color-default-color-dark-text-default
|
|
328
|
+
);
|
|
322
329
|
|
|
323
330
|
&:has(.form-control:focus) {
|
|
324
|
-
--icon-color: var(
|
|
325
|
-
--text-color: var(
|
|
331
|
+
--qld-icon-color: var(--#{$prefix}light-text-lighter);
|
|
332
|
+
--text-color: var(--#{$prefix}light-text-text);
|
|
326
333
|
}
|
|
327
334
|
|
|
328
335
|
.form-control {
|
|
329
336
|
&:hover {
|
|
330
|
-
|
|
331
|
-
--
|
|
332
|
-
--placeholder-color: var(--qld-white);
|
|
333
|
-
--background-color: var(--qld-dark-background-shade);
|
|
334
|
-
--border-color: var(--qld-dark-action-primary-hover);
|
|
337
|
+
--background-color: var(--#{$prefix}dark-background-shade);
|
|
338
|
+
--border-color: var(--#{$prefix}dark-action-primary-hover);
|
|
335
339
|
}
|
|
336
340
|
|
|
341
|
+
&:active,
|
|
337
342
|
&:focus {
|
|
338
|
-
|
|
339
|
-
--
|
|
340
|
-
--
|
|
341
|
-
|
|
342
|
-
|
|
343
|
+
--text-color: var(--#{$prefix}light-text-text);
|
|
344
|
+
--border-color: var(--#{$prefix}neutral-lighter);
|
|
345
|
+
--background-color: var(--#{$prefix}white);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&.is-filled {
|
|
350
|
+
--background-color: var(--#{$prefix}dark-background-shade);
|
|
351
|
+
|
|
352
|
+
.form-control {
|
|
353
|
+
&:hover {
|
|
354
|
+
--background-color: var(--#{$prefix}dark-background-shade);
|
|
355
|
+
--border-color: var(--#{$prefix}dark-action-primary-hover);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
&:active,
|
|
359
|
+
&:focus {
|
|
360
|
+
--background-color: var(--#{$prefix}white);
|
|
361
|
+
--border-color: var(--#{$prefix}neutral-lighter);
|
|
362
|
+
}
|
|
343
363
|
}
|
|
344
364
|
}
|
|
345
365
|
}
|
|
366
|
+
|
|
346
367
|
}
|
|
@@ -6,66 +6,82 @@ export default {
|
|
|
6
6
|
tags: ["autodocs"],
|
|
7
7
|
title: "3. Components/Search Input",
|
|
8
8
|
render: (args) => {
|
|
9
|
-
return `<form action="https://uat.forgov.qld.gov.au/search" class="site-search">${new SearchInput(args).html}</form>`;
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
argTypes: {
|
|
9
|
+
return `<form action="https://uat.forgov.qld.gov.au/search" class="site-search p-3">${new SearchInput(args).html}</form>`;
|
|
13
10
|
},
|
|
14
11
|
|
|
12
|
+
argTypes: {},
|
|
15
13
|
parameters: {
|
|
16
14
|
docs: {
|
|
17
15
|
controls: {
|
|
18
|
-
|
|
16
|
+
include: ["buttonLabel", "suggestions"],
|
|
19
17
|
},
|
|
18
|
+
story: { height: "400px" },
|
|
20
19
|
},
|
|
21
20
|
},
|
|
22
|
-
|
|
23
21
|
};
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Default Search Input
|
|
30
|
-
*/
|
|
31
23
|
export const Default = {
|
|
32
24
|
args: defaultdata,
|
|
25
|
+
name: "Default - Outline Variant",
|
|
33
26
|
};
|
|
34
27
|
|
|
35
28
|
/**
|
|
36
|
-
*
|
|
29
|
+
* With `customClass: is-filled`
|
|
37
30
|
*/
|
|
31
|
+
export const FilledVariant = {
|
|
32
|
+
args: { ...defaultdata, customClass: "is-filled" },
|
|
33
|
+
};
|
|
34
|
+
|
|
38
35
|
export const FullWidth = {
|
|
39
36
|
args: {
|
|
40
37
|
...defaultdata,
|
|
41
38
|
customClass: "full-width",
|
|
42
39
|
},
|
|
43
|
-
}
|
|
44
|
-
|
|
40
|
+
};
|
|
45
41
|
|
|
46
42
|
/**
|
|
47
43
|
* Dark themed Search Input
|
|
48
|
-
*
|
|
49
|
-
* Apply a class <code>.dark</code> to the parent container of the <code>.qld-search-input</code> element.
|
|
44
|
+
*
|
|
45
|
+
* Apply a class <code>.dark</code> to the parent container of the <code>.qld-search-input</code> element.
|
|
50
46
|
*/
|
|
51
|
-
|
|
52
47
|
export const Dark = {
|
|
53
|
-
args: {
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
args: {
|
|
49
|
+
...defaultdata,
|
|
50
|
+
},
|
|
51
|
+
parameters: {
|
|
52
|
+
backgrounds: {
|
|
53
|
+
default: "Dark",
|
|
54
|
+
values: [{ name: "Dark", value: "var(--qld-dark-background)" }],
|
|
55
|
+
},
|
|
56
56
|
},
|
|
57
|
+
decorators: [
|
|
58
|
+
(Story) => {
|
|
59
|
+
return `
|
|
60
|
+
<div class="dark">
|
|
61
|
+
${Story()}
|
|
62
|
+
</div>
|
|
63
|
+
`;
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Dark themed Search Input
|
|
70
|
+
*
|
|
71
|
+
* Apply a class <code>.dark</code> to the parent container of the <code>.qld-search-input</code> element.
|
|
72
|
+
*/
|
|
73
|
+
export const DarkFilled = {
|
|
74
|
+
args: { ...defaultdata, customClass: "is-filled" },
|
|
57
75
|
parameters: {
|
|
58
76
|
backgrounds: {
|
|
59
|
-
default:
|
|
60
|
-
values: [
|
|
61
|
-
{ name: 'Dark', value: 'var(--qld-brand-primary)' },
|
|
62
|
-
],
|
|
77
|
+
default: "Dark",
|
|
78
|
+
values: [{ name: "Dark", value: "var(--qld-dark-background)" }],
|
|
63
79
|
},
|
|
64
80
|
},
|
|
65
81
|
decorators: [
|
|
66
82
|
(Story) => {
|
|
67
83
|
return `
|
|
68
|
-
<div class="dark
|
|
84
|
+
<div class="dark">
|
|
69
85
|
${Story()}
|
|
70
86
|
</div>
|
|
71
87
|
`;
|