godown 1.1.5 → 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.
- package/conf.d.ts +18 -18
- package/conf.js +22 -22
- package/deps.d.ts +7 -7
- 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 +63 -63
- 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 +8 -8
- package/glob.js +9 -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 +32 -32
- package/input-form/base-input.js +129 -129
- package/input-form/exp-input.d.ts +22 -22
- 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 +21 -21
- package/input-form/label-input.js +69 -69
- package/input-form/search-input.d.ts +36 -36
- package/input-form/search-input.js +162 -162
- package/input-form/select-input.d.ts +31 -31
- package/input-form/select-input.js +256 -256
- package/input-form/sign-form.d.ts +25 -25
- package/input-form/sign-form.js +147 -147
- package/input-form/split-input.d.ts +26 -26
- package/input-form/split-input.js +127 -127
- package/input-form/std.d.ts +19 -19
- package/input-form/std.js +56 -55
- package/input-form/switch-input.d.ts +22 -22
- package/input-form/switch-input.js +73 -73
- package/items/alert-item.d.ts +16 -16
- package/items/alert-item.js +46 -46
- package/items/avatar-anchor.d.ts +19 -19
- package/items/avatar-anchor.js +62 -62
- package/items/base-button.d.ts +16 -16
- package/items/base-button.js +44 -44
- 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 +20 -20
- 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 +13 -13
- package/layout/nav-aside.js +38 -38
- package/layout/nav-layout.d.ts +16 -16
- package/layout/nav-layout.js +51 -51
- package/layout/std.d.ts +4 -4
- package/layout/std.js +4 -4
- package/package.json +6 -5
- 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 +18 -18
- package/view/details-expand.js +53 -53
- package/view/down-drop.d.ts +18 -18
- 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 +16 -16
- package/view/menu-list.js +48 -48
- package/view/route-view.d.ts +57 -57
- package/view/route-view.js +257 -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 +27 -27
- package/with.js +77 -77
package/group/details-group.js
CHANGED
@@ -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 { css, define, html, property } from "../deps.js";
|
8
|
-
import STD from "./std.js";
|
9
|
-
let DetailsGroup = class DetailsGroup extends STD {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
this.index = -1;
|
13
|
-
this.only = false;
|
14
|
-
}
|
15
|
-
render() {
|
16
|
-
return html `<slot></slot>`;
|
17
|
-
}
|
18
|
-
get assigned() {
|
19
|
-
return this.shadowRoot.querySelector("slot").assignedElements();
|
20
|
-
}
|
21
|
-
async firstUpdated() {
|
22
|
-
var _a;
|
23
|
-
await this.updateComplete;
|
24
|
-
if (this.index >= 0) {
|
25
|
-
(_a = this.assigned[this.index]) === null || _a === void 0 ? void 0 : _a.setAttribute("open", "");
|
26
|
-
}
|
27
|
-
this.addEventListener("click", this._handleClick);
|
28
|
-
}
|
29
|
-
_handleClick(e) {
|
30
|
-
if (this.only) {
|
31
|
-
this.index = this.assigned.indexOf(e.target);
|
32
|
-
this.assigned.forEach((e, i) => {
|
33
|
-
if (i != this.index) {
|
34
|
-
e.removeAttribute("open");
|
35
|
-
}
|
36
|
-
});
|
37
|
-
}
|
38
|
-
}
|
39
|
-
};
|
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 { css, define, html, property } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
|
+
let DetailsGroup = class DetailsGroup extends STD {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.index = -1;
|
13
|
+
this.only = false;
|
14
|
+
}
|
15
|
+
render() {
|
16
|
+
return html `<slot></slot>`;
|
17
|
+
}
|
18
|
+
get assigned() {
|
19
|
+
return this.shadowRoot.querySelector("slot").assignedElements();
|
20
|
+
}
|
21
|
+
async firstUpdated() {
|
22
|
+
var _a;
|
23
|
+
await this.updateComplete;
|
24
|
+
if (this.index >= 0) {
|
25
|
+
(_a = this.assigned[this.index]) === null || _a === void 0 ? void 0 : _a.setAttribute("open", "");
|
26
|
+
}
|
27
|
+
this.addEventListener("click", this._handleClick);
|
28
|
+
}
|
29
|
+
_handleClick(e) {
|
30
|
+
if (this.only) {
|
31
|
+
this.index = this.assigned.indexOf(e.target);
|
32
|
+
this.assigned.forEach((e, i) => {
|
33
|
+
if (i != this.index) {
|
34
|
+
e.removeAttribute("open");
|
35
|
+
}
|
36
|
+
});
|
37
|
+
}
|
38
|
+
}
|
39
|
+
};
|
40
40
|
DetailsGroup.styles = css `
|
41
41
|
:host {
|
42
42
|
display: block;
|
43
43
|
}
|
44
|
-
`;
|
45
|
-
__decorate([
|
46
|
-
property({ type: Number })
|
47
|
-
], DetailsGroup.prototype, "index", void 0);
|
48
|
-
__decorate([
|
49
|
-
property({ type: Boolean })
|
50
|
-
], DetailsGroup.prototype, "only", void 0);
|
51
|
-
DetailsGroup = __decorate([
|
52
|
-
define("details-group")
|
53
|
-
], DetailsGroup);
|
54
|
-
export { DetailsGroup };
|
55
|
-
export default DetailsGroup;
|
44
|
+
`;
|
45
|
+
__decorate([
|
46
|
+
property({ type: Number })
|
47
|
+
], DetailsGroup.prototype, "index", void 0);
|
48
|
+
__decorate([
|
49
|
+
property({ type: Boolean })
|
50
|
+
], DetailsGroup.prototype, "only", void 0);
|
51
|
+
DetailsGroup = __decorate([
|
52
|
+
define("details-group")
|
53
|
+
], DetailsGroup);
|
54
|
+
export { DetailsGroup };
|
55
|
+
export default DetailsGroup;
|
package/group/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export * from "./avatar-group.js";
|
2
|
-
export * from "./button-group.js";
|
3
|
-
export * from "./details-group.js";
|
1
|
+
export * from "./avatar-group.js";
|
2
|
+
export * from "./button-group.js";
|
3
|
+
export * from "./details-group.js";
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/group/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./avatar-group.js";
|
2
|
-
export * from "./button-group.js";
|
3
|
-
export * from "./details-group.js";
|
1
|
+
export * from "./avatar-group.js";
|
2
|
+
export * from "./button-group.js";
|
3
|
+
export * from "./details-group.js";
|
package/group/std.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { GLOBSTD } from "../deps.js";
|
2
|
-
export default class GroupSTD extends GLOBSTD {
|
3
|
-
}
|
1
|
+
import { GLOBSTD } from "../deps.js";
|
2
|
+
export default class GroupSTD extends GLOBSTD {
|
3
|
+
}
|
4
4
|
//# sourceMappingURL=std.d.ts.map
|
package/group/std.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import { GLOBSTD } from "../deps.js";
|
2
|
-
export default class GroupSTD extends GLOBSTD {
|
3
|
-
}
|
1
|
+
import { GLOBSTD } from "../deps.js";
|
2
|
+
export default class GroupSTD extends GLOBSTD {
|
3
|
+
}
|
package/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
export * from "./conf.js";
|
2
|
-
export * from "./effect/index.js";
|
3
|
-
export * from "./group/index.js";
|
4
|
-
export * from "./input-form/index.js";
|
5
|
-
export * from "./items/index.js";
|
6
|
-
export * from "./layout/index.js";
|
7
|
-
export * from "./view/index.js";
|
1
|
+
export * from "./conf.js";
|
2
|
+
export * from "./effect/index.js";
|
3
|
+
export * from "./group/index.js";
|
4
|
+
export * from "./input-form/index.js";
|
5
|
+
export * from "./items/index.js";
|
6
|
+
export * from "./layout/index.js";
|
7
|
+
export * from "./view/index.js";
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
export * from "./conf.js";
|
2
|
-
export * from "./effect/index.js";
|
3
|
-
export * from "./group/index.js";
|
4
|
-
export * from "./input-form/index.js";
|
5
|
-
export * from "./items/index.js";
|
6
|
-
export * from "./layout/index.js";
|
7
|
-
export * from "./view/index.js";
|
1
|
+
export * from "./conf.js";
|
2
|
+
export * from "./effect/index.js";
|
3
|
+
export * from "./group/index.js";
|
4
|
+
export * from "./input-form/index.js";
|
5
|
+
export * from "./items/index.js";
|
6
|
+
export * from "./layout/index.js";
|
7
|
+
export * from "./view/index.js";
|
@@ -1,33 +1,33 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
type inputtype = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
|
3
|
-
export declare class BaseInput extends STD {
|
4
|
-
_input: HTMLInputElement;
|
5
|
-
_ranged: HTMLElement;
|
6
|
-
accept: any;
|
7
|
-
label: string;
|
8
|
-
name: string;
|
9
|
-
pla: any;
|
10
|
-
type: inputtype;
|
11
|
-
value: string | File | FileList;
|
12
|
-
def: string;
|
13
|
-
only: boolean;
|
14
|
-
min: number;
|
15
|
-
max: number;
|
16
|
-
step: number;
|
17
|
-
autofocus: boolean;
|
18
|
-
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
19
|
-
render(): import("lit-html").TemplateResult<1>;
|
20
|
-
connectedCallback(): void;
|
21
|
-
firstUpdated(): void;
|
22
|
-
_handleRange(e: any): void;
|
23
|
-
_handleFile(e: any): void;
|
24
|
-
reset(): void;
|
25
|
-
_typeSwitcher(): import("lit-html").TemplateResult<1>;
|
26
|
-
}
|
27
|
-
export default BaseInput;
|
28
|
-
declare global {
|
29
|
-
interface HTMLElementTagNameMap {
|
30
|
-
"base-input": BaseInput;
|
31
|
-
}
|
32
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
type inputtype = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
|
3
|
+
export declare class BaseInput extends STD {
|
4
|
+
_input: HTMLInputElement;
|
5
|
+
_ranged: HTMLElement;
|
6
|
+
accept: any;
|
7
|
+
label: string;
|
8
|
+
name: string;
|
9
|
+
pla: any;
|
10
|
+
type: inputtype;
|
11
|
+
value: string | File | FileList;
|
12
|
+
def: string;
|
13
|
+
only: boolean;
|
14
|
+
min: number;
|
15
|
+
max: number;
|
16
|
+
step: number;
|
17
|
+
autofocus: boolean;
|
18
|
+
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
19
|
+
render(): import("lit-html").TemplateResult<1>;
|
20
|
+
connectedCallback(): void;
|
21
|
+
firstUpdated(): void;
|
22
|
+
_handleRange(e: any): void;
|
23
|
+
_handleFile(e: any): void;
|
24
|
+
reset(): void;
|
25
|
+
_typeSwitcher(): import("lit-html").TemplateResult<1>;
|
26
|
+
}
|
27
|
+
export default BaseInput;
|
28
|
+
declare global {
|
29
|
+
interface HTMLElementTagNameMap {
|
30
|
+
"base-input": BaseInput;
|
31
|
+
}
|
32
|
+
}
|
33
33
|
//# sourceMappingURL=base-input.d.ts.map
|
package/input-form/base-input.js
CHANGED
@@ -1,88 +1,88 @@
|
|
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, ifDefined, define, cssvar } from "../deps.js";
|
8
|
-
import STD from "./std.js";
|
9
|
-
let BaseInput = class BaseInput extends STD {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
this.accept = undefined;
|
13
|
-
this.label = "";
|
14
|
-
this.name = "";
|
15
|
-
this.pla = undefined;
|
16
|
-
this.type = "text";
|
17
|
-
this.value = undefined;
|
18
|
-
this.def = "";
|
19
|
-
this.only = false;
|
20
|
-
this.min = 0;
|
21
|
-
this.max = 100;
|
22
|
-
this.step = 1;
|
23
|
-
this.autofocus = false;
|
24
|
-
}
|
25
|
-
render() {
|
26
|
-
var _a;
|
27
|
-
if (!this.name)
|
28
|
-
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, ifDefined, define, cssvar } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
|
+
let BaseInput = class BaseInput extends STD {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.accept = undefined;
|
13
|
+
this.label = "";
|
14
|
+
this.name = "";
|
15
|
+
this.pla = undefined;
|
16
|
+
this.type = "text";
|
17
|
+
this.value = undefined;
|
18
|
+
this.def = "";
|
19
|
+
this.only = false;
|
20
|
+
this.min = 0;
|
21
|
+
this.max = 100;
|
22
|
+
this.step = 1;
|
23
|
+
this.autofocus = false;
|
24
|
+
}
|
25
|
+
render() {
|
26
|
+
var _a;
|
27
|
+
if (!this.name)
|
28
|
+
this.name = ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || this.type;
|
29
29
|
return html `<label for="input">
|
30
30
|
<slot name="pre"></slot>
|
31
31
|
<slot></slot>
|
32
32
|
<div class=${this.type}>${this._typeSwitcher()}</div>
|
33
33
|
<slot name="suf"></slot>
|
34
|
-
</label>`;
|
35
|
-
}
|
36
|
-
connectedCallback() {
|
37
|
-
super.connectedCallback();
|
38
|
-
if (!this.def && this.type !== "file")
|
39
|
-
this.def = this.value || "";
|
40
|
-
if (!this.value)
|
41
|
-
this.value = this.def;
|
42
|
-
}
|
43
|
-
firstUpdated() {
|
44
|
-
if (this.type === "range") {
|
45
|
-
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
46
|
-
if (this.childNodes.length) {
|
47
|
-
this.shadowRoot.querySelector("div").style.margin = "0";
|
48
|
-
}
|
49
|
-
}
|
50
|
-
this._focusCheck();
|
51
|
-
this._compositionCheck();
|
52
|
-
}
|
53
|
-
_handleRange(e) {
|
54
|
-
this.value = e.target.value;
|
55
|
-
this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + "%";
|
56
|
-
this.dispatchEvent(new CustomEvent("input", { detail: this.value }));
|
57
|
-
}
|
58
|
-
_handleFile(e) {
|
59
|
-
this.value = !this.only ? e.target.files : e.target.files[0];
|
60
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
|
61
|
-
}
|
62
|
-
reset() {
|
63
|
-
if (this.type === "range") {
|
64
|
-
this._input.value = this.def || ((this.max - this.min) / 2).toString();
|
65
|
-
this.value = this._input.value;
|
66
|
-
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
67
|
-
}
|
68
|
-
else {
|
69
|
-
this._input.value = this.def.toString();
|
70
|
-
this.value = this.def;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
_typeSwitcher() {
|
74
|
-
switch (this.type) {
|
75
|
-
case "range":
|
76
|
-
return html `<input id="input" type="range" min=${this.min} max=${this.max} step=${this.step} value=${this.value} @input=${this._handleRange} @change=${this._handleChange} /><i></i>`;
|
77
|
-
case "file":
|
78
|
-
return html `<input id="input" type="file" accept=${ifDefined(this.accept)} ?multiple=${!this.only} class="input" @change=${this._handleFile} />`;
|
79
|
-
default:
|
80
|
-
return html `<input id="input" class="input" type=${this.type} placeholder=${this.pla} value=${this.value} @input=${this._handleInput} @change=${this._handleChange} />`;
|
81
|
-
}
|
82
|
-
}
|
83
|
-
};
|
84
|
-
BaseInput.styles = [
|
85
|
-
STD.styles,
|
34
|
+
</label>`;
|
35
|
+
}
|
36
|
+
connectedCallback() {
|
37
|
+
super.connectedCallback();
|
38
|
+
if (!this.def && this.type !== "file")
|
39
|
+
this.def = this.value || "";
|
40
|
+
if (!this.value)
|
41
|
+
this.value = this.def;
|
42
|
+
}
|
43
|
+
firstUpdated() {
|
44
|
+
if (this.type === "range") {
|
45
|
+
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
46
|
+
if (this.childNodes.length) {
|
47
|
+
this.shadowRoot.querySelector("div").style.margin = "0";
|
48
|
+
}
|
49
|
+
}
|
50
|
+
this._focusCheck();
|
51
|
+
this._compositionCheck();
|
52
|
+
}
|
53
|
+
_handleRange(e) {
|
54
|
+
this.value = e.target.value;
|
55
|
+
this._ranged.style.width = (100 * parseInt(e.target.value)) / (this.max - this.min) + "%";
|
56
|
+
this.dispatchEvent(new CustomEvent("input", { detail: this.value }));
|
57
|
+
}
|
58
|
+
_handleFile(e) {
|
59
|
+
this.value = !this.only ? e.target.files : e.target.files[0];
|
60
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
|
61
|
+
}
|
62
|
+
reset() {
|
63
|
+
if (this.type === "range") {
|
64
|
+
this._input.value = this.def || ((this.max - this.min) / 2).toString();
|
65
|
+
this.value = this._input.value;
|
66
|
+
this._ranged.style.width = 100 * (parseInt(this.value) / (this.max - this.min)) + "%";
|
67
|
+
}
|
68
|
+
else {
|
69
|
+
this._input.value = this.def.toString();
|
70
|
+
this.value = this.def;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
_typeSwitcher() {
|
74
|
+
switch (this.type) {
|
75
|
+
case "range":
|
76
|
+
return html `<input id="input" type="range" min=${this.min} max=${this.max} step=${this.step} value=${this.value} @input=${this._handleRange} @change=${this._handleChange} /><i></i>`;
|
77
|
+
case "file":
|
78
|
+
return html `<input id="input" type="file" accept=${ifDefined(this.accept)} ?multiple=${!this.only} class="input" @change=${this._handleFile} />`;
|
79
|
+
default:
|
80
|
+
return html `<input id="input" class="input" type=${this.type} placeholder=${this.pla} value=${this.value} @input=${this._handleInput} @change=${this._handleChange} />`;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
};
|
84
|
+
BaseInput.styles = [
|
85
|
+
STD.styles,
|
86
86
|
css `
|
87
87
|
:host {
|
88
88
|
width: var(${cssvar}--input-width);
|
@@ -178,52 +178,52 @@ BaseInput.styles = [
|
|
178
178
|
border: solid 0.125em rgba(0, 221, 255, 0.5);
|
179
179
|
box-shadow: 0 0.1em 0.1em var(${cssvar}--shadow);
|
180
180
|
}
|
181
|
-
`,
|
182
|
-
];
|
183
|
-
__decorate([
|
184
|
-
query("input")
|
185
|
-
], BaseInput.prototype, "_input", void 0);
|
186
|
-
__decorate([
|
187
|
-
query(".range i")
|
188
|
-
], BaseInput.prototype, "_ranged", void 0);
|
189
|
-
__decorate([
|
190
|
-
property()
|
191
|
-
], BaseInput.prototype, "accept", void 0);
|
192
|
-
__decorate([
|
193
|
-
property()
|
194
|
-
], BaseInput.prototype, "label", void 0);
|
195
|
-
__decorate([
|
196
|
-
property()
|
197
|
-
], BaseInput.prototype, "name", void 0);
|
198
|
-
__decorate([
|
199
|
-
property()
|
200
|
-
], BaseInput.prototype, "pla", void 0);
|
201
|
-
__decorate([
|
202
|
-
property()
|
203
|
-
], BaseInput.prototype, "type", void 0);
|
204
|
-
__decorate([
|
205
|
-
property()
|
206
|
-
], BaseInput.prototype, "value", void 0);
|
207
|
-
__decorate([
|
208
|
-
property()
|
209
|
-
], BaseInput.prototype, "def", void 0);
|
210
|
-
__decorate([
|
211
|
-
property({ type: Boolean })
|
212
|
-
], BaseInput.prototype, "only", void 0);
|
213
|
-
__decorate([
|
214
|
-
property({ type: Number })
|
215
|
-
], BaseInput.prototype, "min", void 0);
|
216
|
-
__decorate([
|
217
|
-
property({ type: Number })
|
218
|
-
], BaseInput.prototype, "max", void 0);
|
219
|
-
__decorate([
|
220
|
-
property({ type: Number })
|
221
|
-
], BaseInput.prototype, "step", void 0);
|
222
|
-
__decorate([
|
223
|
-
property({ type: Boolean })
|
224
|
-
], BaseInput.prototype, "autofocus", void 0);
|
225
|
-
BaseInput = __decorate([
|
226
|
-
define("base-input")
|
227
|
-
], BaseInput);
|
228
|
-
export { BaseInput };
|
229
|
-
export default BaseInput;
|
181
|
+
`,
|
182
|
+
];
|
183
|
+
__decorate([
|
184
|
+
query("input")
|
185
|
+
], BaseInput.prototype, "_input", void 0);
|
186
|
+
__decorate([
|
187
|
+
query(".range i")
|
188
|
+
], BaseInput.prototype, "_ranged", void 0);
|
189
|
+
__decorate([
|
190
|
+
property()
|
191
|
+
], BaseInput.prototype, "accept", void 0);
|
192
|
+
__decorate([
|
193
|
+
property()
|
194
|
+
], BaseInput.prototype, "label", void 0);
|
195
|
+
__decorate([
|
196
|
+
property()
|
197
|
+
], BaseInput.prototype, "name", void 0);
|
198
|
+
__decorate([
|
199
|
+
property()
|
200
|
+
], BaseInput.prototype, "pla", void 0);
|
201
|
+
__decorate([
|
202
|
+
property()
|
203
|
+
], BaseInput.prototype, "type", void 0);
|
204
|
+
__decorate([
|
205
|
+
property()
|
206
|
+
], BaseInput.prototype, "value", void 0);
|
207
|
+
__decorate([
|
208
|
+
property()
|
209
|
+
], BaseInput.prototype, "def", void 0);
|
210
|
+
__decorate([
|
211
|
+
property({ type: Boolean })
|
212
|
+
], BaseInput.prototype, "only", void 0);
|
213
|
+
__decorate([
|
214
|
+
property({ type: Number })
|
215
|
+
], BaseInput.prototype, "min", void 0);
|
216
|
+
__decorate([
|
217
|
+
property({ type: Number })
|
218
|
+
], BaseInput.prototype, "max", void 0);
|
219
|
+
__decorate([
|
220
|
+
property({ type: Number })
|
221
|
+
], BaseInput.prototype, "step", void 0);
|
222
|
+
__decorate([
|
223
|
+
property({ type: Boolean })
|
224
|
+
], BaseInput.prototype, "autofocus", void 0);
|
225
|
+
BaseInput = __decorate([
|
226
|
+
define("base-input")
|
227
|
+
], BaseInput);
|
228
|
+
export { BaseInput };
|
229
|
+
export default BaseInput;
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
type inputtype = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
|
3
|
-
export declare class ExpInput extends STD {
|
4
|
-
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
5
|
-
label: string;
|
6
|
-
name: string;
|
7
|
-
pla: any;
|
8
|
-
type: inputtype | "textarea";
|
9
|
-
value: string;
|
10
|
-
def: string;
|
11
|
-
base: "outline" | "filed" | "underline";
|
12
|
-
offset: string;
|
13
|
-
autofocus: boolean;
|
14
|
-
_input: HTMLInputElement;
|
15
|
-
render(): import("lit-html").TemplateResult<1>;
|
16
|
-
}
|
17
|
-
export default ExpInput;
|
18
|
-
declare global {
|
19
|
-
interface HTMLElementTagNameMap {
|
20
|
-
"exp-input": ExpInput;
|
21
|
-
}
|
22
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
type inputtype = "hidden" | "text" | "search" | "tel" | "url" | "email" | "password" | "datetime" | "date" | "month" | "week" | "time" | "datetime-local" | "number" | "range" | "color" | "checkbox" | "radio" | "file" | "image";
|
3
|
+
export declare class ExpInput extends STD {
|
4
|
+
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
5
|
+
label: string;
|
6
|
+
name: string;
|
7
|
+
pla: any;
|
8
|
+
type: inputtype | "textarea";
|
9
|
+
value: string;
|
10
|
+
def: string;
|
11
|
+
base: "outline" | "filed" | "underline";
|
12
|
+
offset: string;
|
13
|
+
autofocus: boolean;
|
14
|
+
_input: HTMLInputElement;
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
16
|
+
}
|
17
|
+
export default ExpInput;
|
18
|
+
declare global {
|
19
|
+
interface HTMLElementTagNameMap {
|
20
|
+
"exp-input": ExpInput;
|
21
|
+
}
|
22
|
+
}
|
23
23
|
//# sourceMappingURL=exp-input.d.ts.map
|