@ucd-lib/theme-elements 3.1.0 → 3.1.2

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.
@@ -45,6 +45,14 @@ export function styles() {
45
45
  .mega-focus .primary-nav__top-link a:focus::after {
46
46
  background-color: rgb(255, 191, 0);
47
47
  }
48
+
49
+ .primary-nav li:focus > .primary-nav__top-link a::before,
50
+ .primary-nav li:focus-within > .primary-nav__top-link a::before,
51
+ .primary-nav li:focus > .primary-nav__top-link a::after,
52
+ .primary-nav li:focus-within > .primary-nav__top-link a::after {
53
+ background-color: rgb(255, 191, 0);
54
+ }
55
+
48
56
  .mega-focus > ul {
49
57
  background-color: rgb(255, 251, 237);
50
58
  }
@@ -29,7 +29,8 @@ export default class UcdThemeSearchForm extends LitElement {
29
29
  formClass: {type: String, attribute: "form-class"},
30
30
  labelText: {type: String, attribute: "label-text"},
31
31
  inputClass: {type: String, attribute: "input-class"},
32
- queryParam: {type: String, attribute: "query-param"}
32
+ queryParam: {type: String, attribute: "query-param"},
33
+ clearOnSearch: {type: Boolean, attribute: "clear-on-search"}
33
34
  };
34
35
  }
35
36
 
@@ -48,6 +49,7 @@ export default class UcdThemeSearchForm extends LitElement {
48
49
  this.inputClass = "";
49
50
  this.value = "";
50
51
  this.queryParam = "searchterm";
52
+ this.clearOnSearch = false;
51
53
  }
52
54
 
53
55
  /**
@@ -87,10 +89,11 @@ export default class UcdThemeSearchForm extends LitElement {
87
89
  },
88
90
  bubbles: true,
89
91
  composed: true });
90
-
92
+
91
93
  this.dispatchEvent(e);
92
- }
93
94
 
95
+ if( this.clearOnSearch ) this.value = '';
96
+ }
94
97
  }
95
98
 
96
99
  customElements.define('ucd-theme-search-form', UcdThemeSearchForm);
@@ -48,7 +48,7 @@ return html`
48
48
  class="search-form__input ${this.inputClass}"
49
49
  name=${this.queryParam}
50
50
  @input="${this._onInput}"
51
- value="${this.value}">
51
+ .value="${this.value}">
52
52
  <button type="submit" class="search-form__submit">&#xf002;</button>
53
53
 
54
54
  </form>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucd-lib/theme-elements",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Custom elements for the UCD brand theme",
5
5
  "main": "index.js",
6
6
  "scripts": {