@exmg/exm-search 1.0.4 → 1.0.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exmg/exm-search",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e7086831faea0bdfe8628b0de9b7ddcc45174558"
|
|
44
44
|
}
|
|
@@ -1,4 +1,178 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const style = css
|
|
3
|
-
|
|
2
|
+
export const style = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
--_hover-outline-color: var(--exm-search-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));
|
|
6
|
+
--_outline-width: var(--exm-search-outline-width, 1px);
|
|
7
|
+
--_outline-color: var(--exm-search-outline-color, var(--md-outlined-field-hover-outline-width, 1px));
|
|
8
|
+
--_container-shape: var(--exm-search-container-shape, 4px);
|
|
9
|
+
--_focus-input-text-color: var(--exm-search-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));
|
|
10
|
+
--_focus-label-text-color: var(--exm-search-focus-label-text-color, var(--md-sys-color-primary, #6750a4));
|
|
11
|
+
--_focus-icon-color: var(--exm-search-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
|
|
12
|
+
--_focus-outline-color: var(--exm-search-focus-outline-color, var(--md-sys-color-primary, #6750a4));
|
|
13
|
+
--_focus-outline-width: var(--exm-search-focus-outline-width, 1px);
|
|
14
|
+
--_hover-input-text-color: var(--exm-search-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));
|
|
15
|
+
--_hover-label-text-color: var(--exm-search-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));
|
|
16
|
+
--_hover-icon-color: var(--exm-search-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
|
|
17
|
+
--_hover-outline-color: var(--exm-search-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));
|
|
18
|
+
--_input-text-color: var(--exm-search-input-text-color, var(--md-sys-color-on-surface, #1d1b20));
|
|
19
|
+
--_input-text-font: var(
|
|
20
|
+
--exm-search-input-text-font,
|
|
21
|
+
var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto))
|
|
22
|
+
);
|
|
23
|
+
--_input-text-line-height: var(
|
|
24
|
+
--exm-search-input-text-line-height,
|
|
25
|
+
var(--md-sys-typescale-body-large-line-height, 1.5rem)
|
|
26
|
+
);
|
|
27
|
+
--_input-text-size: var(--exm-search-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));
|
|
28
|
+
--_input-text-weight: var(
|
|
29
|
+
--exm-search-input-text-weight,
|
|
30
|
+
var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400))
|
|
31
|
+
);
|
|
32
|
+
--_label-text-color: var(--exm-search-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));
|
|
33
|
+
--_label-text-font: var(
|
|
34
|
+
--exm-search-label-text-font,
|
|
35
|
+
var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto))
|
|
36
|
+
);
|
|
37
|
+
--_label-text-line-height: var(
|
|
38
|
+
--exm-search-label-text-line-height,
|
|
39
|
+
var(--md-sys-typescale-body-large-line-height, 1.5rem)
|
|
40
|
+
);
|
|
41
|
+
--_label-text-size: var(--exm-search-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));
|
|
42
|
+
--_label-text-weight: var(
|
|
43
|
+
--exm-search-label-text-weight,
|
|
44
|
+
var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400))
|
|
45
|
+
);
|
|
46
|
+
--_icon-color: var(--exm-search-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
|
|
47
|
+
--_icon-size: var(--exm-search-icon-size, 24px);
|
|
48
|
+
--_outline-color: var(--exm-search-outline-color, var(--md-sys-color-outline, #79747e));
|
|
49
|
+
--_outline-width: var(--exm-search-outline-width, 1px);
|
|
50
|
+
--md-focus-ring-shape: var(--_container-shape);
|
|
51
|
+
color: var(--_label-text-color);
|
|
52
|
+
background-color: var(--md-sys-color-surface-container-low);
|
|
53
|
+
border-radius: var(--_container-shape);
|
|
54
|
+
border-width: var(--_outline-width);
|
|
55
|
+
border-color: var(--_outline-color);
|
|
56
|
+
border-style: solid;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host(:hover) {
|
|
60
|
+
border-color: var(--_hover-outline-color);
|
|
61
|
+
color: var(--_hover-label-text-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host(:focus) {
|
|
65
|
+
border-color: var(--_focus-outline-color);
|
|
66
|
+
color: var(--_focus-label-text-color);
|
|
67
|
+
border-width: var(--_focus-outline-width);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host > div {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
height: 48px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
h2 {
|
|
79
|
+
max-width: 936px;
|
|
80
|
+
width: 100%;
|
|
81
|
+
margin: 20px auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
input {
|
|
85
|
+
width: 100%;
|
|
86
|
+
caret-color: var(--md-sys-color-on-surface);
|
|
87
|
+
color: var(--md-sys-color-on-surface);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host(:hover) input {
|
|
91
|
+
color: var(--_hover-input-text-color);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host(:focus) input {
|
|
95
|
+
color: var(--_focus-input-text-color);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
md-icon {
|
|
99
|
+
fill: var(--_icon-color);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
md-icon.search {
|
|
103
|
+
margin: 0 0.5rem 0 1rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host(:hover) md-icon {
|
|
107
|
+
fill: var(--_hover-icon-color);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:host(:focus) md-icon {
|
|
111
|
+
fill: var(--_focus-icon-color);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
md-icon-button.clear {
|
|
115
|
+
margin-right: 0.5rem;
|
|
116
|
+
min-width: 40px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:host > div > svg {
|
|
120
|
+
margin-right: 10px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
span.interactive-content {
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
font-size: var(--_label-text-size);
|
|
127
|
+
text-overflow: ellipsis;
|
|
128
|
+
letter-spacing: 0.005em;
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
line-height: var(--_label-text-line-height);
|
|
131
|
+
font-weight: var(--_label-text-weight);
|
|
132
|
+
cursor: text;
|
|
133
|
+
flex: 1;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.search {
|
|
137
|
+
display: absolute;
|
|
138
|
+
background: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.search > div {
|
|
142
|
+
width: 100%;
|
|
143
|
+
position: relative;
|
|
144
|
+
align-items: center;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.search input {
|
|
148
|
+
font-size: var(--_label-text-size);
|
|
149
|
+
height: inherit;
|
|
150
|
+
padding: 2px;
|
|
151
|
+
border: 0px;
|
|
152
|
+
width: 100%;
|
|
153
|
+
letter-spacing: 0.005em;
|
|
154
|
+
line-height: var(--_label-text-line-height);
|
|
155
|
+
font-weight: var(--_label-text-weight);
|
|
156
|
+
outline: none;
|
|
157
|
+
background: none;
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.mode-default {
|
|
162
|
+
display: flex;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.mode-input {
|
|
166
|
+
display: none;
|
|
167
|
+
height: inherit;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.search.hasFocus .mode-default {
|
|
171
|
+
display: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.search.hasFocus .mode-input {
|
|
175
|
+
display: flex;
|
|
176
|
+
}
|
|
177
|
+
`;
|
|
4
178
|
//# sourceMappingURL=exm-search-css.js.map
|
|
@@ -1,179 +0,0 @@
|
|
|
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
|
-
}
|