godown 1.1.5 → 1.2.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/LICENSE +9 -9
- package/conf.d.ts +17 -18
- package/conf.d.ts.map +1 -1
- package/conf.js +24 -22
- package/deps.d.ts +7 -7
- package/deps.d.ts.map +1 -1
- package/deps.js +7 -7
- package/effect/index.d.ts +3 -3
- package/effect/index.js +3 -3
- package/effect/ov-effect.d.ts +23 -23
- package/effect/ov-effect.js +85 -85
- package/effect/ro-effect.d.ts +19 -19
- package/effect/ro-effect.js +76 -76
- package/effect/std.d.ts +3 -3
- package/effect/std.js +3 -3
- package/effect/tw-effect.d.ts +21 -21
- package/effect/tw-effect.js +90 -90
- package/glob.d.ts +11 -8
- package/glob.d.ts.map +1 -1
- package/glob.js +20 -9
- package/group/avatar-group.d.ts +20 -20
- package/group/avatar-group.js +88 -88
- package/group/button-group.d.ts +12 -12
- package/group/button-group.js +26 -26
- package/group/details-group.d.ts +16 -16
- package/group/details-group.js +51 -51
- package/group/index.d.ts +3 -3
- package/group/index.js +3 -3
- package/group/std.d.ts +3 -3
- package/group/std.js +3 -3
- package/index.d.ts +7 -7
- package/index.js +7 -7
- package/input-form/base-input.d.ts +33 -32
- package/input-form/base-input.d.ts.map +1 -1
- package/input-form/base-input.js +129 -129
- package/input-form/exp-input.d.ts +23 -22
- package/input-form/exp-input.d.ts.map +1 -1
- package/input-form/exp-input.js +67 -67
- package/input-form/index.d.ts +8 -8
- package/input-form/index.js +8 -8
- package/input-form/label-input.d.ts +22 -21
- package/input-form/label-input.d.ts.map +1 -1
- package/input-form/label-input.js +69 -69
- package/input-form/search-input.d.ts +37 -36
- package/input-form/search-input.d.ts.map +1 -1
- package/input-form/search-input.js +163 -163
- package/input-form/select-input.d.ts +35 -31
- package/input-form/select-input.d.ts.map +1 -1
- package/input-form/select-input.js +290 -259
- package/input-form/sign-form.d.ts +26 -25
- package/input-form/sign-form.d.ts.map +1 -1
- package/input-form/sign-form.js +147 -147
- package/input-form/split-input.d.ts +27 -26
- package/input-form/split-input.d.ts.map +1 -1
- package/input-form/split-input.js +127 -127
- package/input-form/std.d.ts +20 -19
- package/input-form/std.d.ts.map +1 -1
- package/input-form/std.js +56 -55
- package/input-form/switch-input.d.ts +23 -22
- package/input-form/switch-input.d.ts.map +1 -1
- package/input-form/switch-input.js +73 -73
- package/items/alert-item.d.ts +16 -16
- package/items/alert-item.js +69 -69
- package/items/avatar-anchor.d.ts +19 -19
- package/items/avatar-anchor.js +71 -71
- package/items/base-button.d.ts +16 -16
- package/items/base-button.js +117 -117
- package/items/dialog-item.d.ts +24 -24
- package/items/dialog-item.js +92 -92
- package/items/index.d.ts +7 -7
- package/items/index.js +7 -7
- package/items/link-a.d.ts +19 -19
- package/items/link-a.js +76 -76
- package/items/load-track.d.ts +21 -20
- package/items/load-track.d.ts.map +1 -1
- package/items/load-track.js +76 -76
- package/items/std.d.ts +3 -3
- package/items/std.js +3 -3
- package/items/super-a.d.ts +15 -15
- package/items/super-a.js +46 -46
- package/layout/div-line.d.ts +15 -15
- package/layout/div-line.js +39 -39
- package/layout/drag-box.d.ts +25 -25
- package/layout/drag-box.js +88 -88
- package/layout/flex-flow.d.ts +13 -13
- package/layout/flex-flow.js +32 -32
- package/layout/index.d.ts +5 -5
- package/layout/index.js +5 -5
- package/layout/nav-aside.d.ts +14 -13
- package/layout/nav-aside.d.ts.map +1 -1
- package/layout/nav-aside.js +38 -38
- package/layout/nav-layout.d.ts +17 -16
- package/layout/nav-layout.d.ts.map +1 -1
- package/layout/nav-layout.js +51 -51
- package/layout/std.d.ts +4 -4
- package/layout/std.js +4 -4
- package/package.json +17 -13
- package/react/effect.d.ts +9 -9
- package/react/effect.d.ts.map +1 -1
- package/react/effect.js +33 -33
- package/react/group.d.ts +4 -4
- package/react/group.d.ts.map +1 -1
- package/react/group.js +19 -19
- package/react/index.d.ts +7 -7
- package/react/index.d.ts.map +1 -1
- package/react/index.js +7 -7
- package/react/input-form.d.ts +32 -32
- package/react/input-form.d.ts.map +1 -1
- package/react/input-form.js +65 -65
- package/react/items.d.ts +8 -8
- package/react/items.d.ts.map +1 -1
- package/react/items.js +39 -39
- package/react/layout.d.ts +6 -6
- package/react/layout.d.ts.map +1 -1
- package/react/layout.js +29 -29
- package/react/view.d.ts +6 -6
- package/react/view.d.ts.map +1 -1
- package/react/view.js +29 -29
- package/view/details-expand.d.ts +19 -18
- package/view/details-expand.d.ts.map +1 -1
- package/view/details-expand.js +53 -53
- package/view/down-drop.d.ts +19 -18
- package/view/down-drop.d.ts.map +1 -1
- package/view/down-drop.js +71 -71
- package/view/index.d.ts +5 -5
- package/view/index.js +5 -5
- package/view/menu-list.d.ts +17 -16
- package/view/menu-list.d.ts.map +1 -1
- package/view/menu-list.js +48 -48
- package/view/route-view.d.ts +46 -57
- package/view/route-view.d.ts.map +1 -1
- package/view/route-view.js +256 -257
- package/view/scroll-x.d.ts +14 -14
- package/view/scroll-x.js +47 -47
- package/view/std.d.ts +4 -4
- package/view/std.js +4 -4
- package/with.d.ts +23 -27
- package/with.d.ts.map +1 -1
- package/with.js +70 -77
- package/items/no-support.d.ts +0 -7
- package/items/no-support.d.ts.map +0 -1
- package/items/no-support.js +0 -23
@@ -1,55 +1,55 @@
|
|
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, query, define, cssvar } from "../deps.js";
|
8
|
-
import STD from "./std.js";
|
9
|
-
let LabelInput = class LabelInput extends STD {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
this.type = "text";
|
13
|
-
this.label = "";
|
14
|
-
this.def = "";
|
15
|
-
this.pla = undefined;
|
16
|
-
this.name = "";
|
17
|
-
this.value = "";
|
18
|
-
this.autofocus = false;
|
19
|
-
}
|
20
|
-
render() {
|
21
|
-
var _a;
|
22
|
-
if (!this.name)
|
23
|
-
this.name = ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || this.type;
|
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, query, define, cssvar } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
|
+
let LabelInput = class LabelInput extends STD {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.type = "text";
|
13
|
+
this.label = "";
|
14
|
+
this.def = "";
|
15
|
+
this.pla = undefined;
|
16
|
+
this.name = "";
|
17
|
+
this.value = "";
|
18
|
+
this.autofocus = false;
|
19
|
+
}
|
20
|
+
render() {
|
21
|
+
var _a;
|
22
|
+
if (!this.name)
|
23
|
+
this.name = ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || this.type;
|
24
24
|
return html `<label for=${this.name}>
|
25
25
|
<span>${this.label}<slot></slot></span>
|
26
26
|
<fieldset>
|
27
27
|
<i><slot name="pre"></slot></i>
|
28
28
|
<input @input=${this._handleInput} @change=${this._handleChange} id=${this.name} type=${this.type} placeholder=${this.pla} class=${this.type} />
|
29
29
|
<i><slot name="suf"></slot></i>
|
30
|
-
${this.type === "password" && !this.querySelector(`[slot="suf"]`)
|
30
|
+
${this.type === "password" && !this.querySelector(`[slot="suf"]`)
|
31
31
|
? html `<i @mousedown=${this._passwordSwitcher} @mouseup=${() => (this._input.type = "password")} @mouseleave=${() => (this._input.type = "password")}>
|
32
32
|
<svg viewBox="0 0 48 48" fill="none">
|
33
33
|
<path d="M9.85786 18C6.23858 21 4 24 4 24C4 24 12.9543 36 24 36C25.3699 36 26.7076 35.8154 28 35.4921M20.0318 12.5C21.3144 12.1816 22.6414 12 24 12C35.0457 12 44 24 44 24C44 24 41.7614 27 38.1421 30" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
|
34
34
|
<path d="M20.3142 20.6211C19.4981 21.5109 19 22.6972 19 23.9998C19 26.7612 21.2386 28.9998 24 28.9998C25.3627 28.9998 26.5981 28.4546 27.5 27.5705" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
|
35
35
|
<path d="M42 42L6 6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
|
36
36
|
</svg>
|
37
|
-
</i>`
|
37
|
+
</i>`
|
38
38
|
: undefined}
|
39
39
|
</fieldset>
|
40
|
-
</label>`;
|
41
|
-
}
|
42
|
-
_passwordSwitcher() {
|
43
|
-
if (this._input.type === "password") {
|
44
|
-
this._input.type = "text";
|
45
|
-
}
|
46
|
-
else {
|
47
|
-
this._input.type = "password";
|
48
|
-
}
|
49
|
-
}
|
50
|
-
};
|
51
|
-
LabelInput.styles = [
|
52
|
-
STD.styles,
|
40
|
+
</label>`;
|
41
|
+
}
|
42
|
+
_passwordSwitcher() {
|
43
|
+
if (this._input.type === "password") {
|
44
|
+
this._input.type = "text";
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
this._input.type = "password";
|
48
|
+
}
|
49
|
+
}
|
50
|
+
};
|
51
|
+
LabelInput.styles = [
|
52
|
+
STD.styles,
|
53
53
|
css `
|
54
54
|
:host {
|
55
55
|
background-color: inherit;
|
@@ -117,34 +117,34 @@ LabelInput.styles = [
|
|
117
117
|
::-ms-reveal {
|
118
118
|
display: none;
|
119
119
|
}
|
120
|
-
`,
|
121
|
-
];
|
122
|
-
__decorate([
|
123
|
-
property()
|
124
|
-
], LabelInput.prototype, "type", void 0);
|
125
|
-
__decorate([
|
126
|
-
property()
|
127
|
-
], LabelInput.prototype, "label", void 0);
|
128
|
-
__decorate([
|
129
|
-
property()
|
130
|
-
], LabelInput.prototype, "def", void 0);
|
131
|
-
__decorate([
|
132
|
-
property()
|
133
|
-
], LabelInput.prototype, "pla", void 0);
|
134
|
-
__decorate([
|
135
|
-
property()
|
136
|
-
], LabelInput.prototype, "name", void 0);
|
137
|
-
__decorate([
|
138
|
-
property()
|
139
|
-
], LabelInput.prototype, "value", void 0);
|
140
|
-
__decorate([
|
141
|
-
property({ type: Boolean })
|
142
|
-
], LabelInput.prototype, "autofocus", void 0);
|
143
|
-
__decorate([
|
144
|
-
query("input")
|
145
|
-
], LabelInput.prototype, "_input", void 0);
|
146
|
-
LabelInput = __decorate([
|
147
|
-
define("label-input")
|
148
|
-
], LabelInput);
|
149
|
-
export { LabelInput };
|
150
|
-
export default LabelInput;
|
120
|
+
`,
|
121
|
+
];
|
122
|
+
__decorate([
|
123
|
+
property()
|
124
|
+
], LabelInput.prototype, "type", void 0);
|
125
|
+
__decorate([
|
126
|
+
property()
|
127
|
+
], LabelInput.prototype, "label", void 0);
|
128
|
+
__decorate([
|
129
|
+
property()
|
130
|
+
], LabelInput.prototype, "def", void 0);
|
131
|
+
__decorate([
|
132
|
+
property()
|
133
|
+
], LabelInput.prototype, "pla", void 0);
|
134
|
+
__decorate([
|
135
|
+
property()
|
136
|
+
], LabelInput.prototype, "name", void 0);
|
137
|
+
__decorate([
|
138
|
+
property()
|
139
|
+
], LabelInput.prototype, "value", void 0);
|
140
|
+
__decorate([
|
141
|
+
property({ type: Boolean })
|
142
|
+
], LabelInput.prototype, "autofocus", void 0);
|
143
|
+
__decorate([
|
144
|
+
query("input")
|
145
|
+
], LabelInput.prototype, "_input", void 0);
|
146
|
+
LabelInput = __decorate([
|
147
|
+
define("label-input")
|
148
|
+
], LabelInput);
|
149
|
+
export { LabelInput };
|
150
|
+
export default LabelInput;
|
@@ -1,37 +1,38 @@
|
|
1
|
-
import
|
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
|
-
"search-
|
35
|
-
|
36
|
-
}
|
1
|
+
import { CSSResultGroup } from "../deps.js";
|
2
|
+
import STD from "./std.js";
|
3
|
+
export declare class SearchInput extends STD {
|
4
|
+
_input: HTMLInputElement;
|
5
|
+
query: string;
|
6
|
+
target: string;
|
7
|
+
infer: boolean;
|
8
|
+
remote: boolean;
|
9
|
+
action: string;
|
10
|
+
method: "get" | "post";
|
11
|
+
name: string;
|
12
|
+
value: string;
|
13
|
+
pla: any;
|
14
|
+
list: any[];
|
15
|
+
autofocus: boolean;
|
16
|
+
useinfer: (x: string) => Promise<string[]>;
|
17
|
+
static styles: CSSResultGroup[];
|
18
|
+
render(): import("lit").TemplateResult<1>;
|
19
|
+
_handleSubmit(e: any): void;
|
20
|
+
_handleInput(e: any): Promise<void>;
|
21
|
+
}
|
22
|
+
export declare class SearchW extends STD {
|
23
|
+
static styles: (import("lit").CSSResult | CSSResultGroup[])[];
|
24
|
+
action: string;
|
25
|
+
name: string;
|
26
|
+
pla: string;
|
27
|
+
origin: string;
|
28
|
+
constructor();
|
29
|
+
render(): import("lit").TemplateResult<1>;
|
30
|
+
}
|
31
|
+
export default SearchInput;
|
32
|
+
declare global {
|
33
|
+
interface HTMLElementTagNameMap {
|
34
|
+
"search-input": SearchInput;
|
35
|
+
"search-w": SearchW;
|
36
|
+
}
|
37
|
+
}
|
37
38
|
//# sourceMappingURL=search-input.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../src/input-form/search-input.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../src/input-form/search-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,cAAc,EAAE,MAAM,YAAY,CAAC;AACxF,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,qBACa,WAAY,SAAQ,GAAG;IAClB,MAAM,EAAG,gBAAgB,CAAC;IAC9B,KAAK,SAAM;IACX,MAAM,SAAM;IACK,KAAK,UAAS;IACd,MAAM,UAAS;IAChC,MAAM,SAAQ;IACd,MAAM,EAAE,KAAK,GAAG,MAAM,CAAS;IAC/B,IAAI,SAAO;IACX,KAAK,SAAM;IACX,GAAG,MAAa;IACD,IAAI,EAAE,GAAG,EAAE,CAAM;IACf,SAAS,UAAS;IACf,QAAQ,MAAa,MAAM,uBAOzD;IACF,MAAM,CAAC,MAAM,mBA2DS;IACtB,MAAM;IAkBN,aAAa,CAAC,CAAC,KAAA;IAIT,YAAY,CAAC,CAAC,KAAA;CA6BrB;AASD,qBACa,OAAQ,SAAQ,GAAG;IAC9B,MAAM,CAAC,MAAM,iDA8EX;IACU,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;;IAK3B,MAAM;CAcP;AACD,eAAe,WAAW,CAAC;AAC3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;QAC5B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
@@ -1,92 +1,92 @@
|
|
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;
|
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
34
|
return html `<form action=${this.action} method=${this.method}>
|
35
35
|
<div>
|
36
36
|
<input name=${this.name} @input=${this._handleInput} @change=${this._handleChange} value=${this.value} title="" placeholder=${this.pla} />
|
37
37
|
<button @click=${this._handleSubmit}>
|
38
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"
|
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"></path>
|
40
40
|
</svg>
|
41
41
|
</button>
|
42
42
|
</div>
|
43
43
|
<slot></slot>
|
44
|
-
${((_a = this.list) === null || _a === void 0 ? void 0 : _a.length)
|
44
|
+
${((_a = this.list) === null || _a === void 0 ? void 0 : _a.length)
|
45
45
|
? html `<ul>
|
46
46
|
${this.list.map((v, i) => html `<li key=${i}>${v}</li>`)}
|
47
|
-
</ul>`
|
47
|
+
</ul>`
|
48
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,
|
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
90
|
css `
|
91
91
|
:host {
|
92
92
|
color: var(${cssvar}--text);
|
@@ -143,78 +143,78 @@ SearchInput.styles = [
|
|
143
143
|
padding-right: 0;
|
144
144
|
font-size: 1rem;
|
145
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
|
-
}
|
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
208
|
return html `<form action=${this.action} method="get" target="_blank">
|
209
209
|
<input name=${this.name} placeholder=${this.pla} />
|
210
210
|
<button type="submit" aria-label="Search">
|
211
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
212
|
</button>
|
213
|
-
</form>`;
|
214
|
-
}
|
215
|
-
};
|
216
|
-
SearchW.styles = [
|
217
|
-
STD.styles,
|
213
|
+
</form>`;
|
214
|
+
}
|
215
|
+
};
|
216
|
+
SearchW.styles = [
|
217
|
+
STD.styles,
|
218
218
|
css `
|
219
219
|
:host {
|
220
220
|
width: 10em;
|
@@ -290,22 +290,22 @@ SearchW.styles = [
|
|
290
290
|
path {
|
291
291
|
mix-blend-mode: exclusion;
|
292
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;
|
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;
|