@exmg/exm-search 1.0.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.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # `<exm-search>` [![Published on npm](https://img.shields.io/npm/v/@exmg/exm-search.svg)](https://www.npmjs.com/package/@exmg/exm-search)
2
+
3
+ # exm-search
4
+
5
+ Exmg search provides an search input in material 3 style
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install @exmg/exm-search
11
+ ```
12
+
13
+ ## Example Usage
14
+
15
+ ```html
16
+ <exm-search placeHolder="Filter table.." @search-value-change="${() => console.log('update')}"></exm-search>
17
+ ```
18
+
19
+ ## API
20
+
21
+ ### Properties/Attributes
22
+
23
+ | Name | Type | Default | Description |
24
+ | ------------- | --------- | -------- | ----------------------------------------------- |
25
+ | `bubbles` | `boolean` | _false_ | Whether or not the change events need to bubble |
26
+ | `placeHolder` | `string` | `Search` | Default value for placeholder |
27
+
28
+ ## Styles
29
+
30
+ | Custom property | Description | Default |
31
+ | ------------------------------------- | ---------------------- | -------------------------------------------- |
32
+ | `--exm-search-outline-color` | outline color | `--md-outlined-field-hover-outline-width`; |
33
+ | `--exm-search-outline-width` | outline width | `1px`; |
34
+ | `--exm-search-container-shape` | container shape | `4px`; |
35
+ | `--exm-search-focus-input-text-color` | focus input text color | `--md-sys-color-on-surface`; |
36
+ | `--exm-search-focus-label-text-color` | focus label text color | `--md-sys-color-primary`; |
37
+ | `--exm-search-focus-icon-color` | focus icon color | `--md-sys-color-on-surface-variant`; |
38
+ | `--exm-search-focus-outline-color` | focus outline color | `--md-sys-color-primary`; |
39
+ | `--exm-search-focus-outline-width` | focus outline width | `1px`; |
40
+ | `--exm-search-hover-input-text-color` | hover input text color | `--md-sys-color-on-surface`; |
41
+ | `--exm-search-hover-label-text-color` | hover label text color | `--md-sys-color-on-surface`; |
42
+ | `--exm-search-hover-outline-color` | hover outline color | `--md-sys-color-on-surface` |
43
+ | `--exm-search-input-text-color` | input text color | `--md-sys-color-on-surface`; |
44
+ | `--exm-search-input-text-font` | input text font | `--md-sys-typescale-body-large-font`; |
45
+ | `--exm-search-input-text-line-height` | input text line height | `--md-sys-typescale-body-large-line-height`; |
46
+ | `--exm-search-input-text-size` | input text size | `--md-sys-typescale-body-large-size`; |
47
+ | `--exm-search-input-text-weight` | input text weight | `--md-sys-typescale-body-large-weight`; |
48
+ | `--exm-search-label-text-color` | label text color | `md-sys-color-on-surface-variant`; |
49
+ | `--exm-search-label-text-font` | label text font | `--md-sys-typescale-body-large-font`; |
50
+ | `--exm-search-label-text-line-height` | label line height | `--md-sys-typescale-body-large-line-height`; |
51
+ | `--exm-search-label-text-size` | label text size | `--md-sys-typescale-body-large-size`; |
52
+ | `--exm-search-label-text-weight` | label weight | `--md-sys-typescale-body-large-weight`; |
53
+ | `--exm-search-icon-color` | icon color | `--md-sys-color-on-surface-variant`; |
54
+ | `--exm-search-icon-size` | icon size | `24px`; |
55
+ | `--exm-search-outline-color` | outline color | `--md-sys-color-outline`; |
56
+ | `--exm-search-outline-width` | outline color width | `1px`; |
57
+
58
+ ## Additional references
59
+
60
+ - [Demo](https://exmg.github.io/exmachina-web-components/demo/?el=exm-search)
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { ExmgSearch } from './src/exm-search.js';
2
+ export { ExmgSearchBase } from './src/exm-search-base.js';
3
+ export { style as exmgSearchStyles } from './src/styles/exm-search-css.js';
package/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { ExmgSearch } from './src/exm-search.js';
2
+ export { ExmgSearchBase } from './src/exm-search-base.js';
3
+ export { style as exmgSearchStyles } from './src/styles/exm-search-css.js';
4
+ //# sourceMappingURL=index.js.map
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@exmg/exm-search",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "module": "index.js",
7
+ "exports": {
8
+ ".": "./index.js",
9
+ "./exm-search.js": "./src/exm-search.js"
10
+ },
11
+ "dependencies": {
12
+ "@exmg/lit-base": "^2.0.1",
13
+ "@material/web": "^1.3.0",
14
+ "lit": "^3.0.0",
15
+ "tslib": "^2.6.2"
16
+ },
17
+ "devDependencies": {
18
+ "@exmg/lit-cli": "1.1.13"
19
+ },
20
+ "keywords": [
21
+ "web-components",
22
+ "lit",
23
+ "search"
24
+ ],
25
+ "files": [
26
+ "**/*.scss",
27
+ "**/*.js",
28
+ "**/*.d.ts"
29
+ ],
30
+ "homepage": "https://github.com/exmg/exmachina-web-components",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git@github.com:exmg/exm-web-components.git",
34
+ "directory": "packages/exm-search"
35
+ },
36
+ "license": "MIT",
37
+ "scripts": {
38
+ "build:styles": "exmg-lit-cli sass -f \"./**/*.scss\""
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "gitHead": "0907b55c89325d59902b98a64c352bf6e1fc81ff"
44
+ }
@@ -0,0 +1,21 @@
1
+ import { ExmgElement } from '@exmg/lit-base';
2
+ import '@material/web/icon/icon.js';
3
+ import '@material/web/iconbutton/icon-button.js';
4
+ import '@material/web/focus/md-focus-ring.js';
5
+ export declare class ExmgSearchBase extends ExmgElement {
6
+ bubbles: boolean;
7
+ _hasFocus: boolean;
8
+ filterValue?: string | null;
9
+ placeHolder: string;
10
+ search?: HTMLInputElement;
11
+ constructor();
12
+ protected fire<T>(eventName: string, detail?: T, bubbles?: boolean): void;
13
+ focus(): void;
14
+ render(): import("lit-html").TemplateResult<1>;
15
+ _getValue(): string;
16
+ _notifyChange(): void;
17
+ _handleClear(e: CustomEvent): void;
18
+ _handleKeyUp(e: KeyboardEvent): void;
19
+ _handleInputBlur(): void;
20
+ updated(changedProperties: Map<string, any>): void;
21
+ }
@@ -0,0 +1,117 @@
1
+ import { __decorate } from "tslib";
2
+ import { ExmgElement } from '@exmg/lit-base';
3
+ import { html, nothing } from 'lit';
4
+ import { property, query, state } from 'lit/decorators.js';
5
+ import { classMap } from 'lit/directives/class-map.js';
6
+ import '@material/web/icon/icon.js';
7
+ import '@material/web/iconbutton/icon-button.js';
8
+ import '@material/web/focus/md-focus-ring.js';
9
+ export class ExmgSearchBase extends ExmgElement {
10
+ constructor() {
11
+ super();
12
+ this.bubbles = false;
13
+ this._hasFocus = true;
14
+ this.placeHolder = 'Search';
15
+ // Set default tabindex to 0
16
+ const tabindex = this.getAttribute('tabindex');
17
+ this.setAttribute('tabindex', tabindex || '0');
18
+ // Add focus event listener to focus input
19
+ this.addEventListener('focus', () => {
20
+ this.focus();
21
+ });
22
+ }
23
+ fire(eventName, detail, bubbles) {
24
+ this.dispatchEvent(new CustomEvent(eventName, {
25
+ bubbles: bubbles || this.bubbles,
26
+ composed: true,
27
+ detail,
28
+ }));
29
+ }
30
+ focus() {
31
+ this._hasFocus = true;
32
+ }
33
+ render() {
34
+ const classMapValues = {
35
+ search: true,
36
+ hasFocus: this._hasFocus,
37
+ };
38
+ return html `
39
+ <div class=${classMap(classMapValues)}>
40
+ <div class="mode-input">
41
+ <md-focus-ring for="searchInput" inward></md-focus-ring>
42
+ <md-icon class="search">search</md-icon>
43
+ <input
44
+ id="searchInput"
45
+ placeholder=${this.placeHolder}
46
+ value=${this.filterValue ? this.filterValue : ''}
47
+ onfocus="let value = this.value; this.value = null; this.value = value"
48
+ @keyup=${this._handleKeyUp}
49
+ @blur=${this._handleInputBlur}
50
+ />
51
+ ${this.filterValue
52
+ ? html `
53
+ <md-icon-button class="clear" @click=${this._handleClear}><md-icon>clear</md-icon></md-icon-button>
54
+ `
55
+ : nothing}
56
+ </div>
57
+ <div class="mode-default" @click=${() => (this._hasFocus = true)}>
58
+ <md-icon class="search">search</md-icon>
59
+ <span class="interactive-content">${this._getValue()}</span>
60
+ ${this.filterValue
61
+ ? html `
62
+ <md-icon-button class="clear" @click=${this._handleClear}><md-icon>clear</md-icon></md-icon-button>
63
+ `
64
+ : nothing}
65
+ </div>
66
+ </div>
67
+ `;
68
+ }
69
+ _getValue() {
70
+ return this.filterValue || this.placeHolder;
71
+ }
72
+ _notifyChange() {
73
+ this.fire('search-value-change', { value: this.filterValue }, this.bubbles);
74
+ }
75
+ _handleClear(e) {
76
+ e.preventDefault();
77
+ this.filterValue = null;
78
+ if (this.search) {
79
+ this.search.value = '';
80
+ }
81
+ this._notifyChange();
82
+ }
83
+ _handleKeyUp(e) {
84
+ const input = e.target;
85
+ if (this.filterValue !== input.value) {
86
+ this.filterValue = input.value;
87
+ this._notifyChange();
88
+ }
89
+ if (e.key === 'Escape') {
90
+ this._hasFocus = false;
91
+ }
92
+ }
93
+ _handleInputBlur() {
94
+ this._hasFocus = false;
95
+ }
96
+ updated(changedProperties) {
97
+ if (changedProperties.has('_hasFocus')) {
98
+ // after _hasFocus changed to true, focus the input
99
+ if (this._hasFocus) {
100
+ this.shadowRoot.querySelector('#searchInput').focus();
101
+ }
102
+ }
103
+ }
104
+ }
105
+ __decorate([
106
+ state()
107
+ ], ExmgSearchBase.prototype, "_hasFocus", void 0);
108
+ __decorate([
109
+ property({ type: String })
110
+ ], ExmgSearchBase.prototype, "filterValue", void 0);
111
+ __decorate([
112
+ property({ type: String })
113
+ ], ExmgSearchBase.prototype, "placeHolder", void 0);
114
+ __decorate([
115
+ query('#searchInput')
116
+ ], ExmgSearchBase.prototype, "search", void 0);
117
+ //# sourceMappingURL=exm-search-base.js.map
@@ -0,0 +1,10 @@
1
+ import '@material/web/progress/circular-progress.js';
2
+ import { ExmgSearchBase } from './exm-search-base.js';
3
+ export declare class ExmgSearch extends ExmgSearchBase {
4
+ static styles: import("lit").CSSResult[];
5
+ }
6
+ declare global {
7
+ interface HTMLElementTagNameMap {
8
+ 'exm-search': ExmgSearch;
9
+ }
10
+ }
@@ -0,0 +1,13 @@
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from 'lit/decorators/custom-element.js';
3
+ import '@material/web/progress/circular-progress.js';
4
+ import { ExmgSearchBase } from './exm-search-base.js';
5
+ import { style } from './styles/exm-search-css.js';
6
+ let ExmgSearch = class ExmgSearch extends ExmgSearchBase {
7
+ };
8
+ ExmgSearch.styles = [style];
9
+ ExmgSearch = __decorate([
10
+ customElement('exm-search')
11
+ ], ExmgSearch);
12
+ export { ExmgSearch };
13
+ //# sourceMappingURL=exm-search.js.map
@@ -0,0 +1,2 @@
1
+ export declare const style: import("lit").CSSResult;
2
+ export default style;
@@ -0,0 +1,4 @@
1
+ import { css } from 'lit';
2
+ export const style = css `:host{display:block;--_hover-outline-color: var(--exm-search-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-width: var(--exm-search-outline-width, 1px);--_outline-color: var(--exm-search-outline-color, var(--md-outlined-field-hover-outline-width, 1px));--_container-shape: var(--exm-search-container-shape, 4px);--_focus-input-text-color: var(--exm-search-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--exm-search-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-icon-color: var(--exm-search-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--exm-search-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--exm-search-focus-outline-width, 1px);--_hover-input-text-color: var(--exm-search-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--exm-search-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--exm-search-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--exm-search-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-color: var(--exm-search-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var( --exm-search-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)) );--_input-text-line-height: var( --exm-search-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem) );--_input-text-size: var(--exm-search-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-weight: var( --exm-search-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)) );--_label-text-color: var(--exm-search-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var( --exm-search-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)) );--_label-text-line-height: var( --exm-search-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem) );--_label-text-size: var(--exm-search-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var( --exm-search-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)) );--_icon-color: var(--exm-search-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_icon-size: var(--exm-search-icon-size, 24px);--_outline-color: var(--exm-search-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--exm-search-outline-width, 1px);--md-focus-ring-shape: var(--_container-shape);color:var(--_label-text-color);background-color:var(--md-sys-color-surface-container-low);border-radius:var(--_container-shape);border-width:var(--_outline-width);border-color:var(--_outline-color);border-style:solid}:host(:hover){border-color:var(--_hover-outline-color);color:var(--_hover-label-text-color)}:host(:focus){border-color:var(--_focus-outline-color);color:var(--_focus-label-text-color);border-width:var(--_focus-outline-width)}:host>div{display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px}h2{max-width:936px;width:100%;margin:20px auto}input{width:100%;caret-color:var(--md-sys-color-on-surface);color:var(--md-sys-color-on-surface)}:host(:hover) input{color:var(--_hover-input-text-color)}:host(:focus) input{color:var(--_focus-input-text-color)}md-icon{fill:var(--_icon-color)}md-icon.search{margin:0 .5rem 0 1rem}:host(:hover) md-icon{fill:var(--_hover-icon-color)}:host(:focus) md-icon{fill:var(--_focus-icon-color)}md-icon-button.clear{margin-right:.5rem;min-width:40px}:host>div>svg{margin-right:10px}span.interactive-content{white-space:nowrap;overflow:hidden;font-size:var(--_label-text-size);text-overflow:ellipsis;letter-spacing:.005em;box-sizing:border-box;line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);cursor:text;flex:1}.search{display:absolute;background:none}.search>div{width:100%;position:relative;align-items:center}.search input{font-size:var(--_label-text-size);height:inherit;padding:2px;border:0px;width:100%;letter-spacing:.005em;line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);outline:none;background:none;box-sizing:border-box}.mode-default{display:flex}.mode-input{display:none;height:inherit}.search.hasFocus .mode-default{display:none}.search.hasFocus .mode-input{display:flex}`;
3
+ export default style;
4
+ //# sourceMappingURL=exm-search-css.js.map
@@ -0,0 +1,179 @@
1
+ :host {
2
+ display: block;
3
+
4
+ --_hover-outline-color: var(--exm-search-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));
5
+ --_outline-width: var(--exm-search-outline-width, 1px);
6
+ --_outline-color: var(--exm-search-outline-color, var(--md-outlined-field-hover-outline-width, 1px));
7
+ --_container-shape: var(--exm-search-container-shape, 4px);
8
+ --_focus-input-text-color: var(--exm-search-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));
9
+ --_focus-label-text-color: var(--exm-search-focus-label-text-color, var(--md-sys-color-primary, #6750a4));
10
+ --_focus-icon-color: var(--exm-search-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
11
+ --_focus-outline-color: var(--exm-search-focus-outline-color, var(--md-sys-color-primary, #6750a4));
12
+ --_focus-outline-width: var(--exm-search-focus-outline-width, 1px);
13
+ --_hover-input-text-color: var(--exm-search-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));
14
+ --_hover-label-text-color: var(--exm-search-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));
15
+ --_hover-icon-color: var(--exm-search-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
16
+ --_hover-outline-color: var(--exm-search-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));
17
+ --_input-text-color: var(--exm-search-input-text-color, var(--md-sys-color-on-surface, #1d1b20));
18
+ --_input-text-font: var(
19
+ --exm-search-input-text-font,
20
+ var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto))
21
+ );
22
+ --_input-text-line-height: var(
23
+ --exm-search-input-text-line-height,
24
+ var(--md-sys-typescale-body-large-line-height, 1.5rem)
25
+ );
26
+ --_input-text-size: var(--exm-search-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));
27
+ --_input-text-weight: var(
28
+ --exm-search-input-text-weight,
29
+ var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400))
30
+ );
31
+ --_label-text-color: var(--exm-search-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));
32
+ --_label-text-font: var(
33
+ --exm-search-label-text-font,
34
+ var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto))
35
+ );
36
+ --_label-text-line-height: var(
37
+ --exm-search-label-text-line-height,
38
+ var(--md-sys-typescale-body-large-line-height, 1.5rem)
39
+ );
40
+ --_label-text-size: var(--exm-search-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));
41
+ --_label-text-weight: var(
42
+ --exm-search-label-text-weight,
43
+ var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400))
44
+ );
45
+ --_icon-color: var(--exm-search-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
46
+ --_icon-size: var(--exm-search-icon-size, 24px);
47
+ --_outline-color: var(--exm-search-outline-color, var(--md-sys-color-outline, #79747e));
48
+ --_outline-width: var(--exm-search-outline-width, 1px);
49
+
50
+ --md-focus-ring-shape: var(--_container-shape);
51
+
52
+ color: var(--_label-text-color);
53
+ background-color: var(--md-sys-color-surface-container-low);
54
+ border-radius: var(--_container-shape);
55
+ border-width: var(--_outline-width);
56
+ border-color: var(--_outline-color);
57
+ border-style: solid;
58
+ }
59
+
60
+ :host(:hover) {
61
+ border-color: var(--_hover-outline-color);
62
+ color: var(--_hover-label-text-color);
63
+ }
64
+
65
+ :host(:focus) {
66
+ border-color: var(--_focus-outline-color);
67
+ color: var(--_focus-label-text-color);
68
+ border-width: var(--_focus-outline-width);
69
+ }
70
+
71
+ :host > div {
72
+ display: flex;
73
+ flex-direction: row;
74
+ justify-content: center;
75
+ align-items: center;
76
+ height: 48px;
77
+ }
78
+
79
+ h2 {
80
+ max-width: 936px;
81
+ width: 100%;
82
+ margin: 20px auto;
83
+ }
84
+
85
+ input {
86
+ width: 100%;
87
+ caret-color: var(--md-sys-color-on-surface);
88
+ color: var(--md-sys-color-on-surface);
89
+ }
90
+
91
+ :host(:hover) input {
92
+ color: var(--_hover-input-text-color);
93
+ }
94
+
95
+ :host(:focus) input {
96
+ color: var(--_focus-input-text-color);
97
+ }
98
+
99
+ md-icon {
100
+ fill: var(--_icon-color);
101
+ }
102
+
103
+ md-icon.search {
104
+ margin: 0 0.5rem 0 1rem;
105
+ }
106
+
107
+ :host(:hover) md-icon {
108
+ fill: var(--_hover-icon-color);
109
+ }
110
+
111
+ :host(:focus) md-icon {
112
+ fill: var(--_focus-icon-color);
113
+ }
114
+
115
+ md-icon-button.clear {
116
+ margin-right: 0.5rem;
117
+ min-width: 40px;
118
+ }
119
+
120
+ :host > div > svg {
121
+ margin-right: 10px;
122
+ }
123
+
124
+ span.interactive-content {
125
+ white-space: nowrap;
126
+ overflow: hidden;
127
+ font-size: var(--_label-text-size);
128
+
129
+ text-overflow: ellipsis;
130
+ letter-spacing: 0.005em;
131
+ box-sizing: border-box;
132
+ line-height: var(--_label-text-line-height);
133
+ font-weight: var(--_label-text-weight);
134
+ cursor: text;
135
+ flex: 1;
136
+ }
137
+
138
+ .search {
139
+ display: absolute;
140
+ background: none;
141
+ }
142
+
143
+ .search > div {
144
+ width: 100%;
145
+ position: relative;
146
+ align-items: center;
147
+ }
148
+
149
+ .search input {
150
+ font-size: var(--_label-text-size);
151
+ height: inherit;
152
+ padding: 2px;
153
+ border: 0px;
154
+ width: 100%;
155
+ letter-spacing: 0.005em;
156
+ line-height: var(--_label-text-line-height);
157
+ font-weight: var(--_label-text-weight);
158
+ outline: none;
159
+ background: none;
160
+ box-sizing: border-box;
161
+ }
162
+
163
+ .mode-default {
164
+ display: flex;
165
+ }
166
+
167
+ .mode-input {
168
+ display: none;
169
+ height: inherit;
170
+ }
171
+
172
+ .search.hasFocus {
173
+ .mode-default {
174
+ display: none;
175
+ }
176
+ .mode-input {
177
+ display: flex;
178
+ }
179
+ }