@exmg/exmg-searchbar
Version:
An element to search the needle in a haystack.
77 lines (74 loc) • 3.02 kB
JavaScript
/**
@license
Copyright 2018 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { css } from 'lit-element';
/**
!Note: This file is autogenerated and any changes here may be silently overridden
*/
export const style = css `
:host {
--exmg-searchbar-primary-color: #0071dc;
--exmg-searchbar-error-color: #b00020;
--exmg-searchbar-text-color: rgba(0, 0, 0, 0.87);
--exmg-searchbar-hint-color: rgba(0, 0, 0, 0.6);
--exmg-searchbar-width: 100%;
--exmg-searchbar-suggestions-spinner-color: #0071dc;
--exmg-searchbar-suggestions-spinner-width: 3px;
--exmg-searchbar-suggestions-min-height: 48px;
--exmg-searchbar-suggestions-text-color: rgba(0, 0, 0, 0.6);
--exmg-searchbar-suggestions-background-color: #ffffff;
--exmg-searchbar-suggestions-z-index: 1;
--exmg-searchbar-suggestions-max-visible-suggestions: 6;
width: var(--exmg-searchbar-width);
display: block;
position: relative;
}
mwc-textfield {
--mdc-theme-primary: var(--exmg-searchbar-primary-color);
--mdc-theme-error: var(--exmg-searchbar-error-color);
--mdc-text-field-ink-color: var(--exmg-searchbar-text-color);
--mdc-text-field-label-ink-color: var(--exmg-searchbar-hint-color);
width: var(--exmg-searchbar-width);
}
.exmg-searchbar-suggestions {
z-index: var(--exmg-searchbar-suggestions-z-index);
position: absolute;
right: 0;
left: 0;
}
.exmg-searchbar-suggestions paper-item.suggestion {
--paper-item-min-height: var(--exmg-searchbar-suggestions-min-height);
color: var(--exmg-searchbar-suggestions-text-color);
}
.exmg-searchbar-suggestions paper-item.loader {
display: flex;
justify-content: center;
--paper-item-min-height: var(--exmg-searchbar-suggestions-min-height);
--paper-spinner-color: var(--exmg-searchbar-suggestions-spinner-color);
--paper-spinner-stroke-width: var(--exmg-searchbar-suggestions-spinner-width);
}
.exmg-searchbar-suggestions .suggestions-list {
overflow-y: scroll;
overflow-x: hidden;
max-height: calc(var(--exmg-searchbar-suggestions-min-height) * var(--exmg-searchbar-suggestions-max-visible-suggestions));
background-color: var(--exmg-searchbar-suggestions-background-color);
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
-ms-overflow-style: none;
}
.exmg-searchbar-suggestions .suggestions-list::-webkit-scrollbar {
display: none;
}
`;
export default style;
//# sourceMappingURL=exmg-searchbar-styles.js.map