@qld-gov-au/qgds-bootstrap5 2.0.3 → 2.0.5
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/.esbuild/helpers/scssOverrideTheme.js +40 -0
- package/.esbuild/plugins/qgds-plugin-handlebar-partial-builder.js +4 -0
- package/.storybook/dynamicThemeDecorator.js +155 -0
- package/.storybook/main.js +6 -0
- package/.storybook/preview.js +20 -1
- package/README.md +26 -18
- package/dist/README.md +26 -18
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/searchInput/searchInput.hbs +34 -35
- package/dist/assets/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/js/handlebars.init.min.js +36 -38
- package/dist/assets/js/handlebars.init.min.js.map +2 -2
- package/dist/assets/node/handlebars.init.min.js +2 -2
- package/dist/assets/node/handlebars.init.min.js.map +1 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/searchInput/searchInput.hbs +34 -35
- package/dist/package.json +6 -2
- package/dist/sample-data/searchInput/searchInput.data.json +0 -1
- package/esbuild.js +34 -9
- package/package.json +6 -2
- package/src/components/bs5/card/card--icon-list-footer.stories.js +171 -0
- package/src/components/bs5/card/card.scss +15 -0
- package/src/components/bs5/header/header.scss +23 -27
- package/src/components/bs5/logo/Logo.mdx +1 -1
- package/src/components/bs5/navbar/navbar.scss +7 -5
- package/src/components/bs5/navbar/navbar.stories.js +1 -1
- package/src/components/bs5/pageLayout/pageLayout.stories.js +2 -2
- 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/searchInput/searchInput.test.js +21 -5
- package/src/components/bs5/tabs/tabs.scss +47 -40
- package/src/css/main.masterbrand.scss +137 -0
- package/src/css/mixins/focusable.scss +11 -3
- package/src/css/mixins/make-icon.scss +7 -1
- package/src/css/qld-tokens.scss +95 -0
- package/src/css/qld-variables.scss +10 -3
- package/src/css/readme.md +6 -1
- package/src/css/themes/masterbrand.scss +109 -0
- package/src/components/bs5/searchInput/_colours.scss +0 -63
|
@@ -4,44 +4,42 @@ exports[`SearchInput > Renders as expected 1`] = `
|
|
|
4
4
|
"<!--
|
|
5
5
|
QGDS Component: Search input
|
|
6
6
|
-->
|
|
7
|
-
<div class="
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
autocomplete="off" aria-label="Search website" data-collection="qgov~sp-search" data-profile="qld" data-numranks="10" data-tiers="off" data-suggestions="https://discover.search.qld.gov.au/s/suggest.json" data-results-url="https://discover.search.qld.gov.au/s/search.json" />
|
|
7
|
+
<div class="qld-search-input ">
|
|
8
|
+
<input id="search" name="query" class="form-control" type="text" autocomplete="off"
|
|
9
|
+
aria-label="Search website" data-collection="qgov~sp-search" data-profile="qld" data-numranks="10" data-tiers="off" data-suggestions="https://discover.search.qld.gov.au/s/suggest.json" data-results-url="https://discover.search.qld.gov.au/s/search.json" />
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
<div class="suggestions suggestions__group d-none">
|
|
12
|
+
<div class="default-suggestions">
|
|
13
|
+
<div class="suggestions-category mt-16">
|
|
14
|
+
<strong class="suggestions-category-label d-block">Popular services</strong>
|
|
15
|
+
<ul class="mt-2">
|
|
16
|
+
<li><a href="https://www.forgov.qld.gov.au/pay-benefits-and-policy/leave/submit-a-leave-application">Apply for leave</a></li>
|
|
17
|
+
<li><a href="https://www.forgov.qld.gov.au/recruitment-performance-and-career/starting-a-new-job/apply-for-higher-duties-or-relieving-at-level">Apply for higher duties or relieving at level</a></li>
|
|
18
|
+
<li><a href="https://www.forgov.qld.gov.au/recruitment-performance-and-career/recruitment/extending-my-job/extend-a-temporary-or-casual-employee">Extend a temporary or casual employee</a></li>
|
|
19
|
+
<li><a href="https://www.forgov.qld.gov.au/recruitment-performance-and-career/recruitment">Hire a staff member (recruitment)</a></li>
|
|
20
|
+
</ul>
|
|
21
|
+
</div>
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
<div class="suggestions-category mt-16">
|
|
24
|
+
<strong class="suggestions-category-label d-block">Browse by category</strong>
|
|
25
|
+
<ul class="mt-12 mb-0">
|
|
26
|
+
<li><a href="https://www.forgov.qld.gov.au/pay-benefits-and-policy/directives-policies-circulars-and-guidelines">Search for directives, policies, circulars, and guidelines</a></li>
|
|
27
|
+
<li><a href="https://www.forgov.qld.gov.au/pay-benefits-and-policy/benefits/employee-pay-and-benefits">Employee pay and benefits</a></li>
|
|
28
|
+
<li><a href="https://www.forgov.qld.gov.au/sandbox/archive/queensland-shared-services">Queensland Shared Services</a></li>
|
|
29
|
+
<li><a href="https://www.forgov.qld.gov.au/recruitment-performance-and-career/career-development">Career development</a></li>
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</
|
|
33
|
+
<div class="suggestions-category">
|
|
34
|
+
<a class="px-16 pt-12 pb-16 d-block suggestions-category-view-more"
|
|
35
|
+
href="/queenslanders">Browse all categories</a>
|
|
37
36
|
</div>
|
|
38
|
-
<div class="dynamic-suggestions"></div>
|
|
39
37
|
</div>
|
|
40
|
-
<
|
|
41
|
-
<span class="btn-icon mx-0"></span>
|
|
42
|
-
<span class="btn-label">Search</span>
|
|
43
|
-
</button>
|
|
38
|
+
<div class="dynamic-suggestions"></div>
|
|
44
39
|
</div>
|
|
45
|
-
|
|
46
|
-
"
|
|
40
|
+
<button class="btn btn-primary" type="submit" id="search-button">
|
|
41
|
+
<span class="btn-icon"></span>
|
|
42
|
+
<span class="btn-label">Search</span>
|
|
43
|
+
</button>
|
|
44
|
+
</div>"
|
|
47
45
|
`;
|
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
QGDS Component: Search input
|
|
3
3
|
-->
|
|
4
|
-
<div class="
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
autocomplete="off" aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} />
|
|
4
|
+
<div class="qld-search-input {{customClass}}">
|
|
5
|
+
<input id="{{ inputID }}" name="{{ inputName }}" class="form-control" type="text" autocomplete="off"
|
|
6
|
+
aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} />
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
{{#if suggestions}}
|
|
9
|
+
<div class="suggestions suggestions__group d-none">
|
|
10
|
+
<div class="default-suggestions">
|
|
11
|
+
<div class="suggestions-category mt-16">
|
|
12
|
+
<strong class="suggestions-category-label d-block">Popular services</strong>
|
|
13
|
+
<ul class="mt-2">
|
|
14
|
+
{{#each default_suggestions.popular_services}}
|
|
15
|
+
<li><a href="{{link}}">{{title}}</a></li>
|
|
16
|
+
{{/each}}
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
<div class="suggestions-category mt-16">
|
|
21
|
+
<strong class="suggestions-category-label d-block">Browse by category</strong>
|
|
22
|
+
<ul class="mt-12 mb-0">
|
|
23
|
+
{{#each default_suggestions.categories}}
|
|
24
|
+
<li><a href="{{link}}">{{title}}</a></li>
|
|
25
|
+
{{/each}}
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</
|
|
34
|
-
{{/if}}
|
|
29
|
+
{{#if default_suggestions.options.view_more}}
|
|
30
|
+
<div class="suggestions-category">
|
|
31
|
+
<a class="px-16 pt-12 pb-16 d-block suggestions-category-view-more"
|
|
32
|
+
href="{{default_suggestions.options.href}}">{{default_suggestions.options.label}}</a>
|
|
35
33
|
</div>
|
|
36
|
-
|
|
34
|
+
{{/if}}
|
|
37
35
|
</div>
|
|
38
|
-
|
|
39
|
-
<button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}">
|
|
40
|
-
<span class="btn-icon mx-0"></span>
|
|
41
|
-
<span class="btn-label">{{ buttonLabel }}</span>
|
|
42
|
-
</button>
|
|
36
|
+
<div class="dynamic-suggestions"></div>
|
|
43
37
|
</div>
|
|
44
|
-
|
|
38
|
+
{{/if}}
|
|
39
|
+
<button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}">
|
|
40
|
+
<span class="btn-icon"></span>
|
|
41
|
+
<span class="btn-label">{{ buttonLabel }}</span>
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
@@ -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
|
}
|