godown 1.1.4 → 1.1.6

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.
Files changed (179) hide show
  1. package/README.md +35 -35
  2. package/conf.d.ts +18 -18
  3. package/conf.js +22 -22
  4. package/deps.d.ts +7 -7
  5. package/deps.js +7 -7
  6. package/effect/index.d.ts +3 -3
  7. package/effect/index.js +3 -3
  8. package/effect/ov-effect.d.ts +23 -23
  9. package/effect/ov-effect.d.ts.map +1 -1
  10. package/effect/ov-effect.js +299 -275
  11. package/effect/ro-effect.d.ts +19 -19
  12. package/effect/ro-effect.d.ts.map +1 -1
  13. package/effect/ro-effect.js +125 -120
  14. package/effect/std.d.ts +3 -3
  15. package/effect/std.d.ts.map +1 -1
  16. package/effect/std.js +3 -3
  17. package/effect/tw-effect.d.ts +21 -21
  18. package/effect/tw-effect.d.ts.map +1 -1
  19. package/effect/tw-effect.js +108 -107
  20. package/glob.d.ts +8 -8
  21. package/glob.d.ts.map +1 -1
  22. package/glob.js +25 -24
  23. package/group/avatar-group.d.ts +20 -20
  24. package/group/avatar-group.d.ts.map +1 -1
  25. package/group/avatar-group.js +112 -88
  26. package/group/button-group.d.ts +12 -12
  27. package/group/button-group.d.ts.map +1 -1
  28. package/group/button-group.js +79 -74
  29. package/group/details-group.d.ts +16 -16
  30. package/group/details-group.d.ts.map +1 -1
  31. package/group/details-group.js +55 -53
  32. package/group/index.d.ts +3 -3
  33. package/group/index.js +3 -3
  34. package/group/std.d.ts +3 -3
  35. package/group/std.d.ts.map +1 -1
  36. package/group/std.js +3 -3
  37. package/index.d.ts +7 -7
  38. package/index.js +7 -7
  39. package/input-form/base-input.d.ts +32 -32
  40. package/input-form/base-input.d.ts.map +1 -1
  41. package/input-form/base-input.js +229 -226
  42. package/input-form/exp-input.d.ts +22 -22
  43. package/input-form/exp-input.d.ts.map +1 -1
  44. package/input-form/exp-input.js +218 -205
  45. package/input-form/index.d.ts +8 -8
  46. package/input-form/index.js +8 -8
  47. package/input-form/label-input.d.ts +21 -21
  48. package/input-form/label-input.d.ts.map +1 -1
  49. package/input-form/label-input.js +150 -137
  50. package/input-form/search-input.d.ts +36 -36
  51. package/input-form/search-input.d.ts.map +1 -1
  52. package/input-form/search-input.js +311 -297
  53. package/input-form/select-input.d.ts +31 -31
  54. package/input-form/select-input.d.ts.map +1 -1
  55. package/input-form/select-input.js +354 -330
  56. package/input-form/sign-form.d.ts +25 -23
  57. package/input-form/sign-form.d.ts.map +1 -1
  58. package/input-form/sign-form.js +165 -160
  59. package/input-form/split-input.d.ts +26 -26
  60. package/input-form/split-input.d.ts.map +1 -1
  61. package/input-form/split-input.js +181 -173
  62. package/input-form/std.d.ts +19 -19
  63. package/input-form/std.d.ts.map +1 -1
  64. package/input-form/std.js +72 -68
  65. package/input-form/switch-input.d.ts +22 -22
  66. package/input-form/switch-input.d.ts.map +1 -1
  67. package/input-form/switch-input.js +181 -175
  68. package/items/alert-item.d.ts +16 -16
  69. package/items/alert-item.d.ts.map +1 -1
  70. package/items/alert-item.js +143 -142
  71. package/items/avatar-anchor.d.ts +19 -19
  72. package/items/avatar-anchor.d.ts.map +1 -1
  73. package/items/avatar-anchor.js +150 -148
  74. package/items/base-button.d.ts +16 -16
  75. package/items/base-button.d.ts.map +1 -1
  76. package/items/base-button.js +170 -167
  77. package/items/dialog-item.d.ts +24 -24
  78. package/items/dialog-item.d.ts.map +1 -1
  79. package/items/dialog-item.js +157 -156
  80. package/items/index.d.ts +7 -7
  81. package/items/index.js +7 -7
  82. package/items/link-a.d.ts +19 -19
  83. package/items/link-a.d.ts.map +1 -1
  84. package/items/link-a.js +98 -97
  85. package/items/load-track.d.ts +20 -20
  86. package/items/load-track.d.ts.map +1 -1
  87. package/items/load-track.js +115 -109
  88. package/items/std.d.ts +3 -3
  89. package/items/std.d.ts.map +1 -1
  90. package/items/std.js +3 -3
  91. package/items/super-a.d.ts +15 -15
  92. package/items/super-a.d.ts.map +1 -1
  93. package/items/super-a.js +99 -88
  94. package/layout/div-line.d.ts +15 -15
  95. package/layout/div-line.d.ts.map +1 -1
  96. package/layout/div-line.js +71 -65
  97. package/layout/drag-box.d.ts +25 -25
  98. package/layout/drag-box.d.ts.map +1 -1
  99. package/layout/drag-box.js +95 -94
  100. package/layout/flex-flow.d.ts +13 -13
  101. package/layout/flex-flow.d.ts.map +1 -1
  102. package/layout/flex-flow.js +39 -34
  103. package/layout/index.d.ts +5 -5
  104. package/layout/index.js +5 -5
  105. package/layout/nav-aside.d.ts +13 -13
  106. package/layout/nav-aside.d.ts.map +1 -1
  107. package/layout/nav-aside.js +61 -54
  108. package/layout/nav-layout.d.ts +16 -16
  109. package/layout/nav-layout.d.ts.map +1 -1
  110. package/layout/nav-layout.js +167 -146
  111. package/layout/std.d.ts +4 -4
  112. package/layout/std.d.ts.map +1 -1
  113. package/layout/std.js +10 -8
  114. package/package.json +48 -40
  115. package/react/effect.d.ts +9 -9
  116. package/react/effect.d.ts.map +1 -1
  117. package/react/effect.js +33 -33
  118. package/react/group.d.ts +4 -4
  119. package/react/group.d.ts.map +1 -1
  120. package/react/group.js +19 -19
  121. package/react/index.d.ts +7 -7
  122. package/react/index.d.ts.map +1 -1
  123. package/react/index.js +7 -7
  124. package/react/input-form.d.ts +32 -32
  125. package/react/input-form.d.ts.map +1 -1
  126. package/react/input-form.js +65 -65
  127. package/react/items.d.ts +8 -8
  128. package/react/items.d.ts.map +1 -1
  129. package/react/items.js +39 -39
  130. package/react/layout.d.ts +6 -6
  131. package/react/layout.d.ts.map +1 -1
  132. package/react/layout.js +29 -29
  133. package/react/view.d.ts +6 -6
  134. package/react/view.d.ts.map +1 -1
  135. package/react/view.js +29 -29
  136. package/view/details-expand.d.ts +18 -18
  137. package/view/details-expand.d.ts.map +1 -1
  138. package/view/details-expand.js +85 -80
  139. package/view/down-drop.d.ts +18 -18
  140. package/view/down-drop.d.ts.map +1 -1
  141. package/view/down-drop.js +98 -94
  142. package/view/index.d.ts +5 -5
  143. package/view/index.js +5 -5
  144. package/view/menu-list.d.ts +16 -16
  145. package/view/menu-list.d.ts.map +1 -1
  146. package/view/menu-list.js +77 -72
  147. package/view/route-view.d.ts +57 -57
  148. package/view/route-view.d.ts.map +1 -1
  149. package/view/route-view.js +261 -258
  150. package/view/scroll-x.d.ts +14 -14
  151. package/view/scroll-x.d.ts.map +1 -1
  152. package/view/scroll-x.js +77 -72
  153. package/view/std.d.ts +4 -4
  154. package/view/std.d.ts.map +1 -1
  155. package/view/std.js +37 -37
  156. package/with.d.ts +27 -27
  157. package/with.d.ts.map +1 -1
  158. package/with.js +77 -78
  159. package/view/react/effect.d.ts +0 -10
  160. package/view/react/effect.d.ts.map +0 -1
  161. package/view/react/effect.js +0 -32
  162. package/view/react/group.d.ts +0 -5
  163. package/view/react/group.d.ts.map +0 -1
  164. package/view/react/group.js +0 -18
  165. package/view/react/index.d.ts +0 -7
  166. package/view/react/index.d.ts.map +0 -1
  167. package/view/react/index.js +0 -6
  168. package/view/react/input-form.d.ts +0 -33
  169. package/view/react/input-form.d.ts.map +0 -1
  170. package/view/react/input-form.js +0 -64
  171. package/view/react/items.d.ts +0 -9
  172. package/view/react/items.d.ts.map +0 -1
  173. package/view/react/items.js +0 -38
  174. package/view/react/layout.d.ts +0 -7
  175. package/view/react/layout.d.ts.map +0 -1
  176. package/view/react/layout.js +0 -28
  177. package/view/react/view.d.ts +0 -7
  178. package/view/react/view.d.ts.map +0 -1
  179. package/view/react/view.js +0 -28
@@ -1,297 +1,311 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, css, property, define, query, cssvar } from '../deps.js';
8
- import STD from './std.js';
9
- let SearchInput = class SearchInput extends STD {
10
- constructor() {
11
- super(...arguments);
12
- this.query = "";
13
- this.target = "";
14
- this.infer = false;
15
- this.remote = false;
16
- this.action = "./";
17
- this.method = "get";
18
- this.name = "q";
19
- this.value = "";
20
- this.pla = undefined;
21
- this.list = [];
22
- this.autofocus = false;
23
- this.useinfer = async (x) => {
24
- await new Promise((resolve) => {
25
- setTimeout(() => { resolve(); }, 400);
26
- });
27
- return ["Undefine: useinfer", `Use: useinfer(${x} :string)`, "Return Array<string>"];
28
- };
29
- }
30
- render() {
31
- var _a;
32
- return html `<form action=${this.action} method=${this.method}>
33
- <div>
34
- <input name=${this.name} @input=${this._handleInput} @change=${this._handleChange} value=${this.value} title="" placeholder=${this.pla} >
35
- <button @click=${this._handleSubmit}>
36
- <svg viewBox="0 0 1024 1024" width="95%" height="100%">
37
- <path fill="currentColor" d="M745.429333 655.658667c1.173333 0.746667 2.325333 1.578667 3.413334 2.496l114.410666 96a32 32 0 0 1-41.152 49.024l-114.389333-96a32 32 0 0 1-6.208-6.976A297.429333 297.429333 0 0 1 512 768c-164.949333 0-298.666667-133.717333-298.666667-298.666667S347.050667 170.666667 512 170.666667s298.666667 133.717333 298.666667 298.666666a297.386667 297.386667 0 0 1-65.237334 186.325334zM512 704c129.6 0 234.666667-105.066667 234.666667-234.666667s-105.066667-234.666667-234.666667-234.666666-234.666667 105.066667-234.666667 234.666666 105.066667 234.666667 234.666667 234.666667z" p-id="9859"></path>
38
- </svg>
39
- </button>
40
- </div>
41
- <slot></slot>
42
- ${((_a = this.list) === null || _a === void 0 ? void 0 : _a.length) ? html `<ul>${this.list.map((v, i) => html `<li key=${i}>${v}</li>`)}</ul>` : undefined}
43
- </form>`;
44
- }
45
- _handleSubmit(e) {
46
- if (!this.remote)
47
- e.preventDefault();
48
- this.dispatchEvent(new CustomEvent('submit', { detail: this.value }));
49
- }
50
- async _handleInput(e) {
51
- const value = e.target.value.trim();
52
- this.value = value;
53
- if (this.compositing)
54
- return;
55
- if (value && this.infer) {
56
- this.list = await this.useinfer(value);
57
- if (!this.value) {
58
- this.list = [];
59
- }
60
- }
61
- else {
62
- this.list = [];
63
- }
64
- if (this.target && this.query) {
65
- const targetElement = document.querySelector(this.target);
66
- const queryElementCollection = document.querySelectorAll(this.query);
67
- console.log();
68
- if (!value || !targetElement || !queryElementCollection.length) {
69
- document.querySelector(this.target).replaceChildren();
70
- return;
71
- }
72
- for (let e of queryElementCollection) {
73
- if (e.textContent.includes(value)) {
74
- targetElement.appendChild(e.cloneNode(true));
75
- }
76
- }
77
- }
78
- this.dispatchEvent(new CustomEvent("input", { detail: value }));
79
- this.dispatchEvent(new CustomEvent("change", { detail: value }));
80
- }
81
- };
82
- SearchInput.styles = [STD.styles, css `
83
- :host{
84
- color:var(${cssvar}--text);
85
- display: inline-block;
86
- min-height: 1.5rem;
87
- width:var(${cssvar}--input-width);
88
- border-radius:.75em;
89
- background:var(${cssvar}--input-background);
90
- }
91
- :host(:focus) form{
92
- outline-color: var(${cssvar}--input-outline);
93
- }
94
- div{
95
- flex: 1;
96
- display: flex;
97
- }
98
- form{
99
- min-height: 100%;
100
- outline: .145em solid transparent;
101
- display: flex;
102
- flex-direction: column;
103
- background:inherit;
104
- border-radius:inherit;
105
- padding:0;
106
- width:100%;
107
- margin:0;
108
- overflow:hidden;
109
- }
110
- ul{
111
- list-style:none;
112
- }
113
- li{
114
- padding: 0.1em 0.5em;
115
- font-size: .95rem;
116
- }
117
- li:hover{
118
- background:var(${cssvar}--input-background-hover);
119
- }
120
- button,input{
121
- border:0;background:none;outline:none;
122
- }
123
- button{
124
- width: 1.8rem;
125
- height: 1.5rem;
126
- }
127
- input{
128
- flex:1;
129
- min-width: 0;
130
- box-sizing: border-box;
131
- padding-left:.75em;
132
- padding-right: 0;
133
- font-size: 1rem;
134
- }`
135
- ];
136
- __decorate([
137
- query('input')
138
- ], SearchInput.prototype, "_input", void 0);
139
- __decorate([
140
- property()
141
- ], SearchInput.prototype, "query", void 0);
142
- __decorate([
143
- property()
144
- ], SearchInput.prototype, "target", void 0);
145
- __decorate([
146
- property({ type: Boolean })
147
- ], SearchInput.prototype, "infer", void 0);
148
- __decorate([
149
- property({ type: Boolean })
150
- ], SearchInput.prototype, "remote", void 0);
151
- __decorate([
152
- property()
153
- ], SearchInput.prototype, "action", void 0);
154
- __decorate([
155
- property()
156
- ], SearchInput.prototype, "method", void 0);
157
- __decorate([
158
- property()
159
- ], SearchInput.prototype, "name", void 0);
160
- __decorate([
161
- property()
162
- ], SearchInput.prototype, "value", void 0);
163
- __decorate([
164
- property()
165
- ], SearchInput.prototype, "pla", void 0);
166
- __decorate([
167
- property({ type: Array })
168
- ], SearchInput.prototype, "list", void 0);
169
- __decorate([
170
- property({ type: Boolean })
171
- ], SearchInput.prototype, "autofocus", void 0);
172
- __decorate([
173
- property({ attribute: false })
174
- ], SearchInput.prototype, "useinfer", void 0);
175
- SearchInput = __decorate([
176
- define('search-input')
177
- ], SearchInput);
178
- export { SearchInput };
179
- const e = [
180
- { action: "https://www.google.com/search", name: "q", pla: "Google" },
181
- { action: "https://quark.sm.cn/s", name: "q", pla: "Quark" },
182
- { action: "https://www.bing.com/search", name: "q", pla: "Bing" },
183
- { action: "https://www.sogou.com/web", name: "query", pla: "搜狗" },
184
- { action: "https://yandex.com/search/", name: "text", pla: "Yandex" },
185
- { action: "https://www.qwant.com/", name: "q", pla: "Qwant", },
186
- ];
187
- let SearchW = class SearchW extends STD {
188
- constructor() {
189
- super();
190
- Object.assign(this, e[Math.floor(Math.random() * e.length)]);
191
- }
192
- render() {
193
- if (this.origin) {
194
- Object.assign(this, e.find(v => v.pla === this.origin));
195
- }
196
- return html `<form action=${this.action} method="get" target="_blank">
197
- <input name=${this.name} placeholder=${this.pla} />
198
- <button type="submit" aria-label="Search">
199
- <svg viewBox="0 0 18 18"><path d="M7.25 0C3.254 0 0 3.254 0 7.25s3.254 7.25 7.25 7.25c1.727 0 3.316-.61 4.563-1.625l4.906 4.906a.757.757 0 0 0 .73.207.766.766 0 0 0 .54-.539.757.757 0 0 0-.208-.73l-4.906-4.907A7.202 7.202 0 0 0 14.5 7.25C14.5 3.254 11.246 0 7.25 0Zm0 1.5A5.74 5.74 0 0 1 13 7.25c0 1.55-.613 2.953-1.605 3.984a1.035 1.035 0 0 0-.16.16A5.726 5.726 0 0 1 7.25 13 5.74 5.74 0 0 1 1.5 7.25 5.74 5.74 0 0 1 7.25 1.5Z" fill="currentColor" fill-rule="nonzero"></path>
200
- </svg>
201
- </button>
202
- </form>`;
203
- }
204
- };
205
- SearchW.styles = [STD.styles, css `
206
- :host{
207
- width:10em;
208
- height:1.5em;
209
- display: inline-block;
210
- border-radius:.75em;
211
- box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .2);
212
- --search: aliceblue;
213
- --ground: currentColor;
214
- --search-hover: rgb(20 69 155);
215
- }
216
- form {
217
- color: currentColor;
218
- display: inline-flex;
219
- height: 100%;
220
- box-sizing: border-box;
221
- position: relative;
222
- border-radius:inherit;
223
- margin: 0;
224
- }
225
- input {
226
- border-top-left-radius: inherit;
227
- border-bottom-left-radius: inherit;
228
- border-right: 0 !important;
229
- box-sizing: border-box;
230
- height: 100%;
231
- width: 100%;
232
- margin-top: 0px;
233
- margin-bottom: 0px;
234
- margin-left: 0px;
235
- outline: none;
236
- flex: 1 1 0%;
237
- padding-left: 1em;
238
- padding-right: 3.05em;
239
- border-width: 0.08em;
240
- border-style: solid;
241
- border-image: initial;
242
- border-color: var(--ground);
243
- background-color: transparent;
244
- color: var(--ground);
245
- transition: all .2s;
246
- }
247
- button:hover {
248
- background-color: var(--search-hover);
249
- }
250
- button {
251
- background: currentColor;
252
- border-top-right-radius: inherit;
253
- border-bottom-right-radius: inherit;
254
- margin: 0;
255
- background: none transparent;
256
- border-spacing: 0;
257
- text-align: left;
258
- align-items: center;
259
- justify-content: center;
260
- outline: none;
261
- border: none;
262
- display: inline-flex;
263
- transition: all .2s;
264
- padding: 0;
265
- font-size: 1em;
266
- height: 100%;
267
- width: 2.5em;
268
- background-color: var(--ground);
269
- }
270
- svg {
271
- text-indent: 0;
272
- font-size: 1em;
273
- color: var(--search);
274
- width: .8em;
275
- height: .8em;
276
- }
277
- path{
278
- mix-blend-mode: exclusion;
279
- }
280
- `];
281
- __decorate([
282
- property()
283
- ], SearchW.prototype, "action", void 0);
284
- __decorate([
285
- property()
286
- ], SearchW.prototype, "name", void 0);
287
- __decorate([
288
- property()
289
- ], SearchW.prototype, "pla", void 0);
290
- __decorate([
291
- property()
292
- ], SearchW.prototype, "origin", void 0);
293
- SearchW = __decorate([
294
- define("search-w")
295
- ], SearchW);
296
- export { SearchW };
297
- export default SearchInput;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, css, property, define, query, cssvar } from "../deps.js";
8
+ import STD from "./std.js";
9
+ let SearchInput = class SearchInput extends STD {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.query = "";
13
+ this.target = "";
14
+ this.infer = false;
15
+ this.remote = false;
16
+ this.action = "./";
17
+ this.method = "get";
18
+ this.name = "q";
19
+ this.value = "";
20
+ this.pla = undefined;
21
+ this.list = [];
22
+ this.autofocus = false;
23
+ this.useinfer = async (x) => {
24
+ await new Promise((resolve) => {
25
+ setTimeout(() => {
26
+ resolve();
27
+ }, 400);
28
+ });
29
+ return ["Undefine: useinfer", `Use: useinfer(${x} :string)`, "Return Array<string>"];
30
+ };
31
+ }
32
+ render() {
33
+ var _a;
34
+ return html `<form action=${this.action} method=${this.method}>
35
+ <div>
36
+ <input name=${this.name} @input=${this._handleInput} @change=${this._handleChange} value=${this.value} title="" placeholder=${this.pla} />
37
+ <button @click=${this._handleSubmit}>
38
+ <svg viewBox="0 0 1024 1024" width="95%" height="100%">
39
+ <path fill="currentColor" d="M745.429333 655.658667c1.173333 0.746667 2.325333 1.578667 3.413334 2.496l114.410666 96a32 32 0 0 1-41.152 49.024l-114.389333-96a32 32 0 0 1-6.208-6.976A297.429333 297.429333 0 0 1 512 768c-164.949333 0-298.666667-133.717333-298.666667-298.666667S347.050667 170.666667 512 170.666667s298.666667 133.717333 298.666667 298.666666a297.386667 297.386667 0 0 1-65.237334 186.325334zM512 704c129.6 0 234.666667-105.066667 234.666667-234.666667s-105.066667-234.666667-234.666667-234.666666-234.666667 105.066667-234.666667 234.666666 105.066667 234.666667 234.666667 234.666667z" p-id="9859"></path>
40
+ </svg>
41
+ </button>
42
+ </div>
43
+ <slot></slot>
44
+ ${((_a = this.list) === null || _a === void 0 ? void 0 : _a.length)
45
+ ? html `<ul>
46
+ ${this.list.map((v, i) => html `<li key=${i}>${v}</li>`)}
47
+ </ul>`
48
+ : undefined}
49
+ </form>`;
50
+ }
51
+ _handleSubmit(e) {
52
+ if (!this.remote)
53
+ e.preventDefault();
54
+ this.dispatchEvent(new CustomEvent("submit", { detail: this.value }));
55
+ }
56
+ async _handleInput(e) {
57
+ const value = e.target.value.trim();
58
+ this.value = value;
59
+ if (this.compositing)
60
+ return;
61
+ if (value && this.infer) {
62
+ this.list = await this.useinfer(value);
63
+ if (!this.value) {
64
+ this.list = [];
65
+ }
66
+ }
67
+ else {
68
+ this.list = [];
69
+ }
70
+ if (this.target && this.query) {
71
+ const targetElement = document.querySelector(this.target);
72
+ const queryElementCollection = document.querySelectorAll(this.query);
73
+ console.log();
74
+ if (!value || !targetElement || !queryElementCollection.length) {
75
+ document.querySelector(this.target).replaceChildren();
76
+ return;
77
+ }
78
+ for (const e of queryElementCollection) {
79
+ if (e.textContent.includes(value)) {
80
+ targetElement.appendChild(e.cloneNode(true));
81
+ }
82
+ }
83
+ }
84
+ this.dispatchEvent(new CustomEvent("input", { detail: value }));
85
+ this.dispatchEvent(new CustomEvent("change", { detail: value }));
86
+ }
87
+ };
88
+ SearchInput.styles = [
89
+ STD.styles,
90
+ css `
91
+ :host {
92
+ color: var(${cssvar}--text);
93
+ display: inline-block;
94
+ min-height: 1.5rem;
95
+ width: var(${cssvar}--input-width);
96
+ border-radius: 0.75em;
97
+ background: var(${cssvar}--input-background);
98
+ }
99
+ :host(:focus) form {
100
+ outline-color: var(${cssvar}--input-outline);
101
+ }
102
+ div {
103
+ flex: 1;
104
+ display: flex;
105
+ }
106
+ form {
107
+ min-height: 100%;
108
+ outline: 0.145em solid transparent;
109
+ display: flex;
110
+ flex-direction: column;
111
+ background: inherit;
112
+ border-radius: inherit;
113
+ padding: 0;
114
+ width: 100%;
115
+ margin: 0;
116
+ overflow: hidden;
117
+ }
118
+ ul {
119
+ list-style: none;
120
+ }
121
+ li {
122
+ padding: 0.1em 0.5em;
123
+ font-size: 0.95rem;
124
+ }
125
+ li:hover {
126
+ background: var(${cssvar}--input-background-hover);
127
+ }
128
+ button,
129
+ input {
130
+ border: 0;
131
+ background: none;
132
+ outline: none;
133
+ }
134
+ button {
135
+ width: 1.8rem;
136
+ height: 1.5rem;
137
+ }
138
+ input {
139
+ flex: 1;
140
+ min-width: 0;
141
+ box-sizing: border-box;
142
+ padding-left: 0.75em;
143
+ padding-right: 0;
144
+ font-size: 1rem;
145
+ }
146
+ `,
147
+ ];
148
+ __decorate([
149
+ query("input")
150
+ ], SearchInput.prototype, "_input", void 0);
151
+ __decorate([
152
+ property()
153
+ ], SearchInput.prototype, "query", void 0);
154
+ __decorate([
155
+ property()
156
+ ], SearchInput.prototype, "target", void 0);
157
+ __decorate([
158
+ property({ type: Boolean })
159
+ ], SearchInput.prototype, "infer", void 0);
160
+ __decorate([
161
+ property({ type: Boolean })
162
+ ], SearchInput.prototype, "remote", void 0);
163
+ __decorate([
164
+ property()
165
+ ], SearchInput.prototype, "action", void 0);
166
+ __decorate([
167
+ property()
168
+ ], SearchInput.prototype, "method", void 0);
169
+ __decorate([
170
+ property()
171
+ ], SearchInput.prototype, "name", void 0);
172
+ __decorate([
173
+ property()
174
+ ], SearchInput.prototype, "value", void 0);
175
+ __decorate([
176
+ property()
177
+ ], SearchInput.prototype, "pla", void 0);
178
+ __decorate([
179
+ property({ type: Array })
180
+ ], SearchInput.prototype, "list", void 0);
181
+ __decorate([
182
+ property({ type: Boolean })
183
+ ], SearchInput.prototype, "autofocus", void 0);
184
+ __decorate([
185
+ property({ attribute: false })
186
+ ], SearchInput.prototype, "useinfer", void 0);
187
+ SearchInput = __decorate([
188
+ define("search-input")
189
+ ], SearchInput);
190
+ export { SearchInput };
191
+ const e = [
192
+ { action: "https://www.google.com/search", name: "q", pla: "Google" },
193
+ { action: "https://quark.sm.cn/s", name: "q", pla: "Quark" },
194
+ { action: "https://www.bing.com/search", name: "q", pla: "Bing" },
195
+ { action: "https://www.sogou.com/web", name: "query", pla: "搜狗" },
196
+ { action: "https://yandex.com/search/", name: "text", pla: "Yandex" },
197
+ { action: "https://www.qwant.com/", name: "q", pla: "Qwant" },
198
+ ];
199
+ let SearchW = class SearchW extends STD {
200
+ constructor() {
201
+ super();
202
+ Object.assign(this, e[Math.floor(Math.random() * e.length)]);
203
+ }
204
+ render() {
205
+ if (this.origin) {
206
+ Object.assign(this, e.find((v) => v.pla === this.origin));
207
+ }
208
+ return html `<form action=${this.action} method="get" target="_blank">
209
+ <input name=${this.name} placeholder=${this.pla} />
210
+ <button type="submit" aria-label="Search">
211
+ <svg viewBox="0 0 18 18"><path d="M7.25 0C3.254 0 0 3.254 0 7.25s3.254 7.25 7.25 7.25c1.727 0 3.316-.61 4.563-1.625l4.906 4.906a.757.757 0 0 0 .73.207.766.766 0 0 0 .54-.539.757.757 0 0 0-.208-.73l-4.906-4.907A7.202 7.202 0 0 0 14.5 7.25C14.5 3.254 11.246 0 7.25 0Zm0 1.5A5.74 5.74 0 0 1 13 7.25c0 1.55-.613 2.953-1.605 3.984a1.035 1.035 0 0 0-.16.16A5.726 5.726 0 0 1 7.25 13 5.74 5.74 0 0 1 1.5 7.25 5.74 5.74 0 0 1 7.25 1.5Z" fill="currentColor" fill-rule="nonzero"></path></svg>
212
+ </button>
213
+ </form>`;
214
+ }
215
+ };
216
+ SearchW.styles = [
217
+ STD.styles,
218
+ css `
219
+ :host {
220
+ width: 10em;
221
+ height: 1.5em;
222
+ display: inline-block;
223
+ border-radius: 0.75em;
224
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
225
+ --search: aliceblue;
226
+ --ground: currentColor;
227
+ --search-hover: rgb(20 69 155);
228
+ }
229
+ form {
230
+ color: currentColor;
231
+ display: inline-flex;
232
+ height: 100%;
233
+ box-sizing: border-box;
234
+ position: relative;
235
+ border-radius: inherit;
236
+ margin: 0;
237
+ }
238
+ input {
239
+ border-top-left-radius: inherit;
240
+ border-bottom-left-radius: inherit;
241
+ border-right: 0 !important;
242
+ box-sizing: border-box;
243
+ height: 100%;
244
+ width: 100%;
245
+ margin-top: 0px;
246
+ margin-bottom: 0px;
247
+ margin-left: 0px;
248
+ outline: none;
249
+ flex: 1 1 0%;
250
+ padding-left: 1em;
251
+ padding-right: 3.05em;
252
+ border-width: 0.08em;
253
+ border-style: solid;
254
+ border-image: initial;
255
+ border-color: var(--ground);
256
+ background-color: transparent;
257
+ color: var(--ground);
258
+ transition: all 0.2s;
259
+ }
260
+ button:hover {
261
+ background-color: var(--search-hover);
262
+ }
263
+ button {
264
+ background: currentColor;
265
+ border-top-right-radius: inherit;
266
+ border-bottom-right-radius: inherit;
267
+ margin: 0;
268
+ background: none transparent;
269
+ border-spacing: 0;
270
+ text-align: left;
271
+ align-items: center;
272
+ justify-content: center;
273
+ outline: none;
274
+ border: none;
275
+ display: inline-flex;
276
+ transition: all 0.2s;
277
+ padding: 0;
278
+ font-size: 1em;
279
+ height: 100%;
280
+ width: 2.5em;
281
+ background-color: var(--ground);
282
+ }
283
+ svg {
284
+ text-indent: 0;
285
+ font-size: 1em;
286
+ color: var(--search);
287
+ width: 0.8em;
288
+ height: 0.8em;
289
+ }
290
+ path {
291
+ mix-blend-mode: exclusion;
292
+ }
293
+ `,
294
+ ];
295
+ __decorate([
296
+ property()
297
+ ], SearchW.prototype, "action", void 0);
298
+ __decorate([
299
+ property()
300
+ ], SearchW.prototype, "name", void 0);
301
+ __decorate([
302
+ property()
303
+ ], SearchW.prototype, "pla", void 0);
304
+ __decorate([
305
+ property()
306
+ ], SearchW.prototype, "origin", void 0);
307
+ SearchW = __decorate([
308
+ define("search-w")
309
+ ], SearchW);
310
+ export { SearchW };
311
+ export default SearchInput;