blob: 2d1c626f84d7e28d3aea0e91a8ff7843b68955b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
<style>
:host {
background-color: #fff;
overflow: hidden;
}
input {
border: 0;
box-sizing: border-box;
height: 100%;
margin:0;
padding: 1em 1em 1em .5em;
width: 100%;
}
input:focus {
outline: none;
}
#input-row {
align-items: center;
box-sizing: border-box;
display: flex;
height: 48px;
width: 100%;
}
.chip {
background-color: var(--google-blue-50);
border-radius: 100px;
box-sizing: border-box;
color: var(--google-blue-700);
display: inline-block;
height: 32px;
margin-inline-start: 12px;
padding: 8px;
text-align: center;
white-space: nowrap;
}
::-webkit-scrollbar {
display: none;
}
iron-icon {
margin-inline-start: 1em;
--iron-icon-fill-color: #999;
}
</style>
<div id="input-row">
<iron-icon icon="cr:search"></iron-icon>
<template is="dom-if" if="[[computeShowChip_(promptText_)]]">
<div class="chip">[[promptText_]]</div>
</template>
<input id="input" type="text" on-input="onInput_"
on-keydown="onKeydown_" autofocus></input>
</div>
<template id="options" is="dom-repeat" on-dom-change="onDomChange_"
items="[[options_]]">
<commander-option class$="[[getOptionClass_(index, focusedIndex_)]]"
model="[[item]]" on-click="onOptionClick_"></commander-option>
</template>
|