@qld-gov-au/qgds-bootstrap5 2.0.12 → 2.1.0

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 (73) hide show
  1. package/.esbuild/plugins/qgds-plugin-generate-icon-assets.js +31 -24
  2. package/dist/assets/components/bs5/button/button.hbs +1 -1
  3. package/dist/assets/components/bs5/footer/customLinks.hbs +1 -1
  4. package/dist/assets/components/bs5/footer/followLinks.hbs +1 -1
  5. package/dist/assets/components/bs5/head/head.hbs +1 -1
  6. package/dist/assets/components/bs5/inpageAlert/inpageAlert.hbs +10 -2
  7. package/dist/assets/components/bs5/searchInput/searchInput.hbs +9 -7
  8. package/dist/assets/css/qld.bootstrap.css +2 -2
  9. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  10. package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
  11. package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
  12. package/dist/assets/img/icons-sprite.svg +24 -24
  13. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  14. package/dist/assets/js/handlebars.init.min.js +33 -23
  15. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  16. package/dist/assets/js/handlebars.partials.js +33 -23
  17. package/dist/assets/js/handlebars.partials.js.map +2 -2
  18. package/dist/assets/js/qld.bootstrap.min.js +6 -6
  19. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  20. package/dist/assets/node/handlebars.init.min.js +14 -12
  21. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  22. package/dist/components/bs5/button/button.hbs +1 -1
  23. package/dist/components/bs5/footer/customLinks.hbs +1 -1
  24. package/dist/components/bs5/footer/followLinks.hbs +1 -1
  25. package/dist/components/bs5/head/head.hbs +1 -1
  26. package/dist/components/bs5/inpageAlert/inpageAlert.hbs +10 -2
  27. package/dist/components/bs5/searchInput/searchInput.hbs +9 -7
  28. package/dist/package.json +1 -1
  29. package/dist/sample-data/footer/footer.data.json +3 -0
  30. package/dist/sample-data/inpageAlert/inpageAlert.data.json +1 -1
  31. package/dist/sample-data/searchInput/searchInput.data.json +1 -0
  32. package/package.json +1 -1
  33. package/src/components/bs5/breadcrumbs/breadcrumbs.scss +3 -4
  34. package/src/components/bs5/button/Button.js +32 -6
  35. package/src/components/bs5/button/button.hbs +1 -1
  36. package/src/components/bs5/button/button.scss +0 -5
  37. package/src/components/bs5/card/card.scss +2 -0
  38. package/src/components/bs5/footer/customLinks.hbs +1 -1
  39. package/src/components/bs5/footer/followLinks.hbs +1 -1
  40. package/src/components/bs5/footer/footer.data.json +3 -0
  41. package/src/components/bs5/formcheck/_form-variables.scss +36 -0
  42. package/src/components/bs5/formcheck/formcheck.scss +54 -14
  43. package/src/components/bs5/header/header.scss +1 -2
  44. package/src/components/bs5/icons/_icons.list.js +7 -7
  45. package/src/components/bs5/icons/_icons.list.scss +113 -112
  46. package/src/components/bs5/icons/_icons.variables.scss +7 -6
  47. package/src/components/bs5/icons/icons.scss +2 -1
  48. package/src/components/bs5/inpageAlert/inpageAlert.data.json +1 -1
  49. package/src/components/bs5/inpageAlert/inpageAlert.hbs +10 -2
  50. package/src/components/bs5/inpageAlert/inpageAlert.scss +49 -51
  51. package/src/components/bs5/inpageAlert/inpageAlert.stories.js +54 -3
  52. package/src/components/bs5/pageLayout/PaletteShowcase.stories.js +4 -3
  53. package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +14 -14
  54. package/src/components/bs5/searchInput/search.functions.js +64 -69
  55. package/src/components/bs5/searchInput/searchInput.data.json +1 -0
  56. package/src/components/bs5/searchInput/searchInput.hbs +9 -7
  57. package/src/components/bs5/searchInput/searchInput.scss +91 -38
  58. package/src/components/bs5/searchInput/searchInput.test.js +91 -119
  59. package/src/components/bs5/skiplinks/skipLinks.scss +12 -4
  60. package/src/components/common/focus-styles/focusStyles.mdx +20 -0
  61. package/src/components/common/focus-styles/focusStyles.stories.js +58 -0
  62. package/src/css/functions/_index.scss +3 -0
  63. package/src/css/functions/color-icon.scss +31 -0
  64. package/src/css/functions/string-replace.scss +49 -0
  65. package/src/css/functions/svg-encode.scss +22 -0
  66. package/src/css/mixins/make-icon.scss +1 -1
  67. package/src/css/mixins/make-link.scss +13 -10
  68. package/src/css/qld-palettes.scss +20 -12
  69. package/src/css/qld-type.scss +5 -1
  70. package/src/css/qld-utilities.scss +9 -1
  71. package/src/css/qld-variables.scss +1 -1
  72. package/src/img/icons-sprite.svg +24 -24
  73. package/src/js/qld.bootstrap.js +3 -55
@@ -10,7 +10,7 @@
10
10
 
11
11
  {{#unless islink}}
12
12
 
13
- <button class="btn {{variantClass}} {{#if isprogress}}btn-progress{{/if}} {{label}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if isprogress}}disabled aria-live="polite"{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}} {{#if progressLabel}}data-progress-label="{{progressLabel}}"{{/if}}>
13
+ <button class="btn {{variantClass}} {{#if isprogress}}btn-progress{{/if}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if isprogress}}disabled aria-live="polite"{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}} {{#if progressLabel}}data-progress-label="{{progressLabel}}"{{/if}}>
14
14
  {{#if isprogress}}
15
15
  {{~>progressSpinner~}}
16
16
  {{else}}
@@ -1,5 +1,5 @@
1
1
  {{#if customLinks }}
2
- <ul class="nav footer-link-list footer-link-list--custom flex-column">
2
+ <ul class="nav footer-link-list footer-link-list--custom flex-column">
3
3
  {{#each customLinks }}
4
4
  <li><a class="nav-link" href="{{ link }}" {{#if target }} target="_blank" {{/if}}>{{ label }}</a></li>
5
5
  {{/each }}
@@ -6,7 +6,7 @@
6
6
  <span class="qld-icon qld-icon-md qld-icon-{{icon}} d-lg-none" aria-hidden="true"></span>
7
7
  <span class="qld-icon qld-icon-sm qld-icon-{{icon}} d-none d-lg-block" aria-hidden="true"></span>
8
8
  <span class="nav-link-label d-none d-lg-block">{{ label }}</span>
9
- <span class="sr-only">{{ label }}</span>
9
+ <span class="sr-only">{{isdefined accessibleLabel label}}</span>
10
10
  </a>
11
11
  </li>
12
12
  {{/each }}
@@ -1,5 +1,5 @@
1
1
 
2
- <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.0.12","branch":"HEAD","tag":"v2.0.12","commit":"8a144c9ab3a88493219cbc779eb61a0ca8b8d059","majorVersion":"v2"} -->
2
+ <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"2.1.0","branch":"HEAD","tag":"v2.1.0","commit":"1610f625e3e2ba5c9420ba3ef0ebb53ed35820f6","majorVersion":"v2"} -->
3
3
 
4
4
  {{! Select environment, used verbatium if not using predefind key
5
5
  cdn := PROD|STAGING|BETA|TEST|DEV|???
@@ -1,5 +1,13 @@
1
- <div class="alert {{variantClass}} {{customClass}}" role="alert"
2
- {{#if alertType}}aria-label="{{alertType}}"{{/if}}>
1
+ <div class="alert {{variantClass}} {{customClass}}" role="alert"
2
+ {{#if ariaLabel}}
3
+ aria-label="{{ ariaLabel }}"
4
+ {{else}}
5
+ {{#ifCond variantClass "==" "alert-info"}}aria-label="Information alert"{{/ifCond}}
6
+ {{#ifCond variantClass "==" "alert-success"}}aria-label="Success alert"{{/ifCond}}
7
+ {{#ifCond variantClass "==" "alert-error"}}aria-label="Error alert"{{/ifCond}}
8
+ {{#ifCond variantClass "==" "alert-warning"}}aria-label="Warning alert"{{/ifCond}}
9
+ {{/if}}
10
+ >
3
11
  {{#if heading}}
4
12
  {{#if headingTag}}
5
13
  <{{headingTag}} class="alert-heading">{{{ heading }}}</{{headingTag}}>
@@ -3,38 +3,40 @@
3
3
  -->
4
4
  <div class="qld-search-input {{customClass}}">
5
5
  <input id="{{ inputID }}" name="{{ inputName }}" class="form-control" type="text" autocomplete="off"
6
- aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} />
6
+ aria-label="{{ ariaLabel }}" {{#each tags}} data-{{@key}}="{{this}}" {{/each}} placeholder="{{placeholder}}" />
7
7
  <button class="btn btn-primary" type="{{ buttonType }}" id="{{ buttonID }}">
8
8
  <span class="btn-icon"></span>
9
9
  <span class="btn-label">{{ buttonLabel }}</span>
10
10
  </button>
11
11
  {{#ifCond hasDynamicSuggestions '||' hasDefaultSuggestions}}
12
- <div class="suggestions suggestions__group d-none default">
12
+
13
+ <div class="suggestions suggestions__group default">
13
14
  {{#if hasDefaultSuggestions}}
14
15
  <div class="default-suggestions">
15
16
  <div class="suggestions-category">
16
17
  <strong class="suggestions-category-label d-block">{{defaultSuggestions.popularServicesTitle}}</strong>
17
18
  <ul>
18
19
  {{#each defaultSuggestions.popularServices}}
19
- <li><a href="{{link}}">{{title}}</a></li>
20
+ <li><a tabindex="0" href="{{link}}">{{title}}</a></li>
20
21
  {{/each}}
21
22
  {{#if defaultSuggestions.popularServicesLink}}
22
- <li><a href="{{defaultSuggestions.popularServicesLink.href}}" class="view-more">{{#if defaultSuggestions.popularServicesLink.label}}{{defaultSuggestions.popularServicesLink.label}}{{else}}View More{{/if}}</a></li>
23
+ <li><a tabindex="0" href="{{defaultSuggestions.popularServicesLink.href}}" class="view-more">{{#if defaultSuggestions.popularServicesLink.label}}{{defaultSuggestions.popularServicesLink.label}}{{else}}View More{{/if}}</a></li>
23
24
  {{/if}}
24
25
  </ul>
25
26
  </div>
26
-
27
+ {{#if defaultSuggestions.categories}}
27
28
  <div class="suggestions-category">
28
29
  <strong class="suggestions-category-label d-block">{{defaultSuggestions.categoriesTitle}}</strong>
29
30
  <ul>
30
31
  {{#each defaultSuggestions.categories}}
31
- <li><a href="{{link}}">{{title}}</a></li>
32
+ <li><a tabindex="0"href="{{link}}">{{title}}</a></li>
32
33
  {{/each}}
33
34
  {{#if defaultSuggestions.categoriesLink}}
34
- <li><a href="{{defaultSuggestions.categoriesLink.href}}" class="view-more">{{#if defaultSuggestions.categoriesLink.label}}{{defaultSuggestions.categoriesLink.label}}{{else}}View More{{/if}}</a></li>
35
+ <li><a tabindex="0" href="{{defaultSuggestions.categoriesLink.href}}" class="view-more">{{#if defaultSuggestions.categoriesLink.label}}{{defaultSuggestions.categoriesLink.label}}{{else}}View More{{/if}}</a></li>
35
36
  {{/if}}
36
37
  </ul>
37
38
  </div>
39
+ {{/if}}
38
40
  </div>
39
41
  {{/if}}
40
42
  {{#if hasDynamicSuggestions}}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qld-gov-au/qgds-bootstrap5",
3
- "version": "2.0.12",
3
+ "version": "2.1.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -61,18 +61,21 @@
61
61
  "followLinks": [
62
62
  {
63
63
  "label": "Facebook",
64
+ "accessibleLabel": "Facebook page",
64
65
  "link": "#",
65
66
  "icon": "facebook",
66
67
  "target": "_blank"
67
68
  },
68
69
  {
69
70
  "label": "LinkedIn",
71
+ "accessibleLabel": "LinkedIn page",
70
72
  "link": "#",
71
73
  "icon": "linkedin",
72
74
  "target": "_blank"
73
75
  },
74
76
  {
75
77
  "label": "X (Twitter)",
78
+ "accessibleLabel": "X page",
76
79
  "link": "#",
77
80
  "icon": "x",
78
81
  "target": "_blank"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "variantClass": "alert-success",
3
- "alertType": "",
3
+ "ariaLabel": "Success alert",
4
4
  "heading": "Alert heading",
5
5
  "headingTag": "h2",
6
6
  "content": "<p>This is an alert notice with some important information. <a href='#'>Find out more</a>.</p>"
@@ -6,6 +6,7 @@
6
6
  "buttonType": "submit",
7
7
  "buttonLabel": "Search",
8
8
  "ariaLabel": "Search website",
9
+ "placeholder": "",
9
10
  "tags": {
10
11
  "collection": "qgov~sp-search",
11
12
  "profile": "qld",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qld-gov-au/qgds-bootstrap5",
3
- "version": "2.0.12",
3
+ "version": "2.1.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -85,10 +85,9 @@ $expander-icon-color: $qld-light-link;
85
85
  );
86
86
  background-color: $core-default-color-neutral-lighter;
87
87
  }
88
- @include m.focusable($offsetOutline: 3px);
89
- &:focus {
90
- outline-offset: -3px;
91
- }
88
+
89
+ --qld-focus-color: var(--qld-light-focus);
90
+ @include m.focusable($offsetOutline: -6px);
92
91
  }
93
92
  }
94
93
  .breadcrumb-collapse-wrapper {
@@ -1,13 +1,39 @@
1
- import Component from '../../../js/QGDSComponent.js'
1
+ import Component from "../../../js/QGDSComponent.js";
2
2
  import template from "./button.hbs?raw";
3
+ import data from "./button.data.json";
3
4
 
4
- export class Button {
5
+ /**
6
+ * @typedef {Object} ButtonArgs
7
+ * @prop {"btn-primary" | "btn-secondary" | "btn-tertiary" } variantClass
8
+ * @prop {string} label The label description
9
+ * @prop {string} [onclick]
10
+ * @prop {boolean} [islink]
11
+ * @prop {boolean} [isdisabled]
12
+ * @prop {boolean} [isProgress]
13
+ * @prop {string} [progressLabel]
14
+ * @prop {string} [iconClass]
15
+ * @prop {"leading" | "trailing"} [iconPosition]
16
+ * @prop {string} [href]
17
+ * @prop {"_blank" | "_self" | "_parent" | "_top" | "_unfencedTop" } [target]
18
+ */
19
+
20
+ /** @type {ButtonArgs}*/
21
+ export const defaultArgs = {
22
+ ...data,
23
+ onclick: "() => false",
24
+ islink: false,
25
+ href: "#",
26
+ target: null,
27
+ };
5
28
 
29
+ export class Button {
6
30
  // Use the global Component class to create a new instance of the Button component.
7
- // A data object, containing the Handlebars placeholder replacement strings, should be provided as an argument.
8
-
9
- constructor( data = {} ) {
31
+ // A data object, containing the Handlebars placeholder replacement strings, should be provided as an argument.
32
+ /**
33
+ *
34
+ * @param {ButtonArgs} data
35
+ */
36
+ constructor(data = defaultArgs) {
10
37
  return new Component(template, data);
11
38
  }
12
-
13
39
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  {{#unless islink}}
12
12
 
13
- <button class="btn {{variantClass}} {{#if isprogress}}btn-progress{{/if}} {{label}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if isprogress}}disabled aria-live="polite"{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}} {{#if progressLabel}}data-progress-label="{{progressLabel}}"{{/if}}>
13
+ <button class="btn {{variantClass}} {{#if isprogress}}btn-progress{{/if}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if isprogress}}disabled aria-live="polite"{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}} {{#if progressLabel}}data-progress-label="{{progressLabel}}"{{/if}}>
14
14
  {{#if isprogress}}
15
15
  {{~>progressSpinner~}}
16
16
  {{else}}
@@ -340,11 +340,6 @@ a.btn,
340
340
  }
341
341
  }
342
342
 
343
- &:focus {
344
- outline: var(--#{$prefix}dark-focus) solid 3px;
345
- outline-offset: 2px;
346
- }
347
-
348
343
  // Progress state focus for dark mode
349
344
  &.btn-progress:focus {
350
345
  outline: var(--#{$prefix}dark-focus) solid 3px;
@@ -303,6 +303,8 @@
303
303
  a {
304
304
  color: var(--#{$prefix}card-link-color);
305
305
  text-decoration-color: var(--#{$prefix}card-link-color);
306
+ outline-style: none;
307
+
306
308
  &:visited,
307
309
  &:hover,
308
310
  &:visited:hover {
@@ -1,5 +1,5 @@
1
1
  {{#if customLinks }}
2
- <ul class="nav footer-link-list footer-link-list--custom flex-column">
2
+ <ul class="nav footer-link-list footer-link-list--custom flex-column">
3
3
  {{#each customLinks }}
4
4
  <li><a class="nav-link" href="{{ link }}" {{#if target }} target="_blank" {{/if}}>{{ label }}</a></li>
5
5
  {{/each }}
@@ -6,7 +6,7 @@
6
6
  <span class="qld-icon qld-icon-md qld-icon-{{icon}} d-lg-none" aria-hidden="true"></span>
7
7
  <span class="qld-icon qld-icon-sm qld-icon-{{icon}} d-none d-lg-block" aria-hidden="true"></span>
8
8
  <span class="nav-link-label d-none d-lg-block">{{ label }}</span>
9
- <span class="sr-only">{{ label }}</span>
9
+ <span class="sr-only">{{isdefined accessibleLabel label}}</span>
10
10
  </a>
11
11
  </li>
12
12
  {{/each }}
@@ -61,18 +61,21 @@
61
61
  "followLinks": [
62
62
  {
63
63
  "label": "Facebook",
64
+ "accessibleLabel": "Facebook page",
64
65
  "link": "#",
65
66
  "icon": "facebook",
66
67
  "target": "_blank"
67
68
  },
68
69
  {
69
70
  "label": "LinkedIn",
71
+ "accessibleLabel": "LinkedIn page",
70
72
  "link": "#",
71
73
  "icon": "linkedin",
72
74
  "target": "_blank"
73
75
  },
74
76
  {
75
77
  "label": "X (Twitter)",
78
+ "accessibleLabel": "X page",
76
79
  "link": "#",
77
80
  "icon": "x",
78
81
  "target": "_blank"
@@ -1,5 +1,13 @@
1
1
  // Expand this file with all themable shared form variables
2
2
  // @extend %form-variables in all input and form components.
3
+ @use "../../../css/functions" as f;
4
+
5
+ /// Custom colored icons for dropdown chevron in all states.
6
+ /// Select input cannot use ::before or ::after so need a svg cbackground image via url(data);
7
+ @function _dropdown-icon($color) {
8
+ @return url(f.svg-encode(f.color-icon("chevron-down", $color)));
9
+ }
10
+
3
11
  %form-control-variables {
4
12
  &,
5
13
  .default &,
@@ -108,6 +116,34 @@
108
116
  }
109
117
  }
110
118
 
119
+ %form-select-variables {
120
+ &,
121
+ .default &,
122
+ .light &,
123
+ .alt & {
124
+ --#{$prefix}icon-url: #{_dropdown-icon($qld-light-action-secondary)};
125
+ --#{$prefix}icon-hover-url: #{_dropdown-icon(
126
+ $qld-light-action-secondary-hover
127
+ )};
128
+ --#{$prefix}icon-disabled-url: #{_dropdown-icon(
129
+ $color-default-color-light-text-lighter
130
+ )};
131
+ --#{$prefix}icon-error-url: #{_dropdown-icon($qld-notify-warning)};
132
+ --#{$prefix}icon-success-url: #{_dropdown-icon($qld-notify-success)};
133
+ --#{$prefix}icon-focus-url: #{_dropdown-icon($qld-light-action-secondary)};
134
+ }
135
+
136
+ .dark &,
137
+ .dark-alt & {
138
+ --#{$prefix}icon-url: #{_dropdown-icon($qld-dark-action-secondary)};
139
+ --#{$prefix}icon-hover-url: #{_dropdown-icon($qld-dark-action-secondary)};
140
+ --#{$prefix}icon-disabled-url: #{_dropdown-icon(
141
+ $color-default-color-dark-text-lighter
142
+ )};
143
+ --#{$prefix}icon-focus-url: #{_dropdown-icon($qld-light-action-secondary)};
144
+ }
145
+ }
146
+
111
147
  %form-valid-feedback-variables {
112
148
  &,
113
149
  :is(.default, .light, .alt) & {
@@ -1,5 +1,6 @@
1
1
  @use "../../../css/mixins" as m;
2
2
  @use "../../../css/functions" as f;
3
+ @use "../icons/icons.list" as icons;
3
4
  @import "form-variables";
4
5
  // NTGOV Form Controls, radios, checkboxes and input groups
5
6
  // https://getbootstrap.com/docs/5.2/forms/form-control/#variables
@@ -172,7 +173,10 @@ $form-check-inline-margin-end: 1rem;
172
173
  ); // already scoped to .valid/.invalid.
173
174
  // USe the same padding value as default state, and remove the background image icon.
174
175
  padding: $_padding;
175
- background-image: none;
176
+
177
+ &:not(.form-select, .qld-select) {
178
+ background-image: none;
179
+ }
176
180
 
177
181
  &:focus {
178
182
  border-color: var(
@@ -190,38 +194,74 @@ $form-check-inline-margin-end: 1rem;
190
194
  .form-select,
191
195
  .qld-select {
192
196
  @extend %form-control;
197
+ @extend %form-select-variables;
198
+
199
+ $_background-position: right 1rem center;
200
+ $_background-size: f.remify(20px);
193
201
 
194
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23008635' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
202
+ background-image: var(--#{$prefix}icon-url);
195
203
  background-repeat: no-repeat;
196
204
  appearance: none;
197
- background-position: right 1rem center;
198
- background-size: f.remify(20px);
205
+ background-position: $_background-position;
206
+ background-size: $_background-size;
199
207
  background-origin: border-box;
200
208
  width: 100%;
209
+ cursor: pointer;
210
+
211
+ &:hover {
212
+ --#{$prefix}icon-url: var(--#{$prefix}icon-hover-url);
213
+ }
201
214
 
202
215
  &.disabled,
203
216
  &:disabled,
204
217
  &.is-disabled {
205
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23636363' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
218
+ --#{$prefix}icon-url: var(--#{$prefix}icon-disabled-url);
206
219
  }
207
220
 
221
+ .was-validated &:invalid,
208
222
  &.qld-input-error,
209
223
  &.is-invalid {
210
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23E22339' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
224
+ --#{$prefix}icon-url: var(--#{$prefix}icon-error-url);
225
+ }
211
226
 
212
- &:not([multiple]):not([size]),
213
- &:not([multiple])[size="1"] {
214
- background-size: 1rem auto;
215
- }
227
+ .was-validated &:valid,
228
+ &.qld-input-success,
229
+ &.is-valid {
230
+ --#{$prefix}icon-url: var(--#{$prefix}icon-success-url);
216
231
  }
217
232
 
233
+ .was-validated &:invalid,
234
+ &.qld-input-error,
235
+ &.is-invalid,
236
+ .was-validated &:valid,
218
237
  &.qld-input-success,
219
238
  &.is-valid {
220
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23339d37' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
239
+ // some bs specificity war stuff
240
+ &:not([multiple]):not([size]) {
241
+ padding-right: $input-padding-x;
242
+ background-position: $_background-position;
243
+ background-size: $_background-size;
244
+ }
245
+ }
246
+
247
+ &:focus {
248
+ --#{$prefix}icon-url: var(--#{$prefix}icon-focus-url);
249
+ }
250
+
251
+ // A select doesn't have a `placeholder` attribute, instead it may have an option with a null or empty string value, which is used instead.
252
+ &:has(option[value=""]:checked) {
253
+ color: var(--#{$prefix}placeholder-color);
254
+
255
+ .dark &:focus {
256
+ --#{$prefix}placeholder-color: #{$color-default-color-light-text-lighter};
257
+ }
258
+ }
259
+
260
+ > option {
261
+ color: $color-default-color-light-text-default;
221
262
 
222
- &:not([multiple]):not([size]),
223
- &:not([multiple])[size="1"] {
224
- background-size: 1rem auto;
263
+ &[value=""] {
264
+ color: $color-default-color-light-text-lighter;
225
265
  }
226
266
  }
227
267
  }
@@ -425,9 +425,8 @@
425
425
  position: absolute;
426
426
  left: 0;
427
427
  right: 0;
428
- top: 0.4rem;
429
428
  padding: 1rem var(--qld-container-padding-x);
430
- background-color: var(--#{$prefix}header-color-bg);
429
+ background-color: var(--#{$prefix}body-bg);
431
430
 
432
431
  &.is-open {
433
432
  display: block;
@@ -1,10 +1,4 @@
1
1
  export default [
2
- "spinner-step-1",
3
- "spinner-step-2",
4
- "spinner-step-3",
5
- "spinner-step-4",
6
- "x",
7
- "youtube",
8
2
  "accessibility",
9
3
  "alert-cancel",
10
4
  "alert-danger",
@@ -94,6 +88,10 @@ export default [
94
88
  "show",
95
89
  "sort-alpha",
96
90
  "speech",
91
+ "spinner-step-1",
92
+ "spinner-step-2",
93
+ "spinner-step-3",
94
+ "spinner-step-4",
97
95
  "spreadsheet",
98
96
  "status-cancel",
99
97
  "status-danger",
@@ -110,5 +108,7 @@ export default [
110
108
  "video",
111
109
  "view-all",
112
110
  "wheelchair",
113
- "zoom",
111
+ "x",
112
+ "youtube",
113
+ "zoom"
114
114
  ];