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/items/base-button.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
export declare class BaseButton extends STD {
|
3
|
-
static styles: import("lit").CSSResult[];
|
4
|
-
disabled: boolean;
|
5
|
-
ghost: boolean;
|
6
|
-
href: string;
|
7
|
-
target: string;
|
8
|
-
color: "black" | "white" | "yellow" | "gary" | "red" | "blue" | "green";
|
9
|
-
render(): import("lit-html").TemplateResult<1>;
|
10
|
-
}
|
11
|
-
export default BaseButton;
|
12
|
-
declare global {
|
13
|
-
interface HTMLElementTagNameMap {
|
14
|
-
"base-button": BaseButton;
|
15
|
-
}
|
16
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
export declare class BaseButton extends STD {
|
3
|
+
static styles: import("lit").CSSResult[];
|
4
|
+
disabled: boolean;
|
5
|
+
ghost: boolean;
|
6
|
+
href: string;
|
7
|
+
target: string;
|
8
|
+
color: "black" | "white" | "yellow" | "gary" | "red" | "blue" | "green";
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
10
|
+
}
|
11
|
+
export default BaseButton;
|
12
|
+
declare global {
|
13
|
+
interface HTMLElementTagNameMap {
|
14
|
+
"base-button": BaseButton;
|
15
|
+
}
|
16
|
+
}
|
17
17
|
//# sourceMappingURL=base-button.d.ts.map
|
package/items/base-button.js
CHANGED
@@ -1,11 +1,11 @@
|
|
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, classMap, ifDefined, define } from "../deps.js";
|
8
|
-
import STD from "./std.js";
|
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, classMap, ifDefined, define } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
9
|
const originstyle = css `
|
10
10
|
:host {
|
11
11
|
display: inline-block;
|
@@ -60,7 +60,7 @@ const originstyle = css `
|
|
60
60
|
border-color: var(--border-disabled);
|
61
61
|
background-color: var(--background-disabled);
|
62
62
|
}
|
63
|
-
`;
|
63
|
+
`;
|
64
64
|
const colorful = css `
|
65
65
|
.black {
|
66
66
|
--color: #f0f0f0;
|
@@ -133,38 +133,38 @@ const colorful = css `
|
|
133
133
|
--background-active: #248067;
|
134
134
|
--border-active: #44444420;
|
135
135
|
}
|
136
|
-
`;
|
137
|
-
let BaseButton = class BaseButton extends STD {
|
138
|
-
constructor() {
|
139
|
-
super(...arguments);
|
140
|
-
this.disabled = false;
|
141
|
-
this.ghost = false;
|
142
|
-
this.href = undefined;
|
143
|
-
this.target = undefined;
|
144
|
-
this.color = "black";
|
145
|
-
}
|
146
|
-
render() {
|
147
|
-
return html `<a href=${ifDefined(this.href)} target=${ifDefined(this.target)} ?disabled=${this.disabled} class=${classMap({ ghost: this.ghost, [this.color]: this.color })}> <slot name="pre"></slot><slot></slot><slot name="suf"></slot> </a>`;
|
148
|
-
}
|
149
|
-
};
|
150
|
-
BaseButton.styles = [originstyle, colorful];
|
151
|
-
__decorate([
|
152
|
-
property({ type: Boolean })
|
153
|
-
], BaseButton.prototype, "disabled", void 0);
|
154
|
-
__decorate([
|
155
|
-
property({ type: Boolean })
|
156
|
-
], BaseButton.prototype, "ghost", void 0);
|
157
|
-
__decorate([
|
158
|
-
property()
|
159
|
-
], BaseButton.prototype, "href", void 0);
|
160
|
-
__decorate([
|
161
|
-
property()
|
162
|
-
], BaseButton.prototype, "target", void 0);
|
163
|
-
__decorate([
|
164
|
-
property()
|
165
|
-
], BaseButton.prototype, "color", void 0);
|
166
|
-
BaseButton = __decorate([
|
167
|
-
define("base-button")
|
168
|
-
], BaseButton);
|
169
|
-
export { BaseButton };
|
170
|
-
export default BaseButton;
|
136
|
+
`;
|
137
|
+
let BaseButton = class BaseButton extends STD {
|
138
|
+
constructor() {
|
139
|
+
super(...arguments);
|
140
|
+
this.disabled = false;
|
141
|
+
this.ghost = false;
|
142
|
+
this.href = undefined;
|
143
|
+
this.target = undefined;
|
144
|
+
this.color = "black";
|
145
|
+
}
|
146
|
+
render() {
|
147
|
+
return html `<a href=${ifDefined(this.href)} target=${ifDefined(this.target)} ?disabled=${this.disabled} class=${classMap({ ghost: this.ghost, [this.color]: this.color })}> <slot name="pre"></slot><slot></slot><slot name="suf"></slot> </a>`;
|
148
|
+
}
|
149
|
+
};
|
150
|
+
BaseButton.styles = [originstyle, colorful];
|
151
|
+
__decorate([
|
152
|
+
property({ type: Boolean })
|
153
|
+
], BaseButton.prototype, "disabled", void 0);
|
154
|
+
__decorate([
|
155
|
+
property({ type: Boolean })
|
156
|
+
], BaseButton.prototype, "ghost", void 0);
|
157
|
+
__decorate([
|
158
|
+
property()
|
159
|
+
], BaseButton.prototype, "href", void 0);
|
160
|
+
__decorate([
|
161
|
+
property()
|
162
|
+
], BaseButton.prototype, "target", void 0);
|
163
|
+
__decorate([
|
164
|
+
property()
|
165
|
+
], BaseButton.prototype, "color", void 0);
|
166
|
+
BaseButton = __decorate([
|
167
|
+
define("base-button")
|
168
|
+
], BaseButton);
|
169
|
+
export { BaseButton };
|
170
|
+
export default BaseButton;
|
package/items/dialog-item.d.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
export declare class DialogItem extends STD {
|
3
|
-
static styles: import("lit").CSSResult;
|
4
|
-
open: boolean;
|
5
|
-
key: string;
|
6
|
-
scale: boolean;
|
7
|
-
modal: boolean;
|
8
|
-
call: "left" | "center" | "right" | "top" | "bottom";
|
9
|
-
get _div(): HTMLDivElement;
|
10
|
-
render(): import("lit-html").TemplateResult<1>;
|
11
|
-
firstUpdated(): void;
|
12
|
-
show(): void;
|
13
|
-
showModal(): void;
|
14
|
-
close(): void;
|
15
|
-
_handleWheel(e: any): void;
|
16
|
-
_handleKeydown(e: KeyboardEvent): void;
|
17
|
-
_handleModal(e: Event): void;
|
18
|
-
}
|
19
|
-
export default DialogItem;
|
20
|
-
declare global {
|
21
|
-
interface HTMLElementTagNameMap {
|
22
|
-
"dialog-item": DialogItem;
|
23
|
-
}
|
24
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
export declare class DialogItem extends STD {
|
3
|
+
static styles: import("lit").CSSResult;
|
4
|
+
open: boolean;
|
5
|
+
key: string;
|
6
|
+
scale: boolean;
|
7
|
+
modal: boolean;
|
8
|
+
call: "left" | "center" | "right" | "top" | "bottom";
|
9
|
+
get _div(): HTMLDivElement;
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
11
|
+
firstUpdated(): void;
|
12
|
+
show(): void;
|
13
|
+
showModal(): void;
|
14
|
+
close(): void;
|
15
|
+
_handleWheel(e: any): void;
|
16
|
+
_handleKeydown(e: KeyboardEvent): void;
|
17
|
+
_handleModal(e: Event): void;
|
18
|
+
}
|
19
|
+
export default DialogItem;
|
20
|
+
declare global {
|
21
|
+
interface HTMLElementTagNameMap {
|
22
|
+
"dialog-item": DialogItem;
|
23
|
+
}
|
24
|
+
}
|
25
25
|
//# sourceMappingURL=dialog-item.d.ts.map
|
package/items/dialog-item.js
CHANGED
@@ -1,76 +1,76 @@
|
|
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 } from "../deps.js";
|
8
|
-
import STD from "./std.js";
|
9
|
-
let DialogItem = class DialogItem extends STD {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
this.open = false;
|
13
|
-
this.key = "Escape";
|
14
|
-
this.scale = false;
|
15
|
-
this.modal = false;
|
16
|
-
this.call = "center";
|
17
|
-
}
|
18
|
-
get _div() {
|
19
|
-
return this.shadowRoot.querySelector("div");
|
20
|
-
}
|
21
|
-
render() {
|
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 } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
|
+
let DialogItem = class DialogItem extends STD {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.open = false;
|
13
|
+
this.key = "Escape";
|
14
|
+
this.scale = false;
|
15
|
+
this.modal = false;
|
16
|
+
this.call = "center";
|
17
|
+
}
|
18
|
+
get _div() {
|
19
|
+
return this.shadowRoot.querySelector("div");
|
20
|
+
}
|
21
|
+
render() {
|
22
22
|
return html `<div ?open=${this.open} ?modal=${this.modal}>
|
23
23
|
<slot class=${this.call}></slot>
|
24
|
-
</div>`;
|
25
|
-
}
|
26
|
-
firstUpdated() {
|
27
|
-
this.addEventListener("submit", (e) => {
|
28
|
-
if (e.target.method === "dialog")
|
29
|
-
this.close();
|
30
|
-
});
|
31
|
-
if (this.scale)
|
32
|
-
this.addEventListener("wheel", this._handleWheel);
|
33
|
-
if (this.key)
|
34
|
-
document.addEventListener("keydown", (e) => this._handleKeydown(e));
|
35
|
-
if (this.open)
|
36
|
-
this.show();
|
37
|
-
}
|
38
|
-
show() {
|
39
|
-
this.open = true;
|
40
|
-
if (this.modal) {
|
41
|
-
this.showModal();
|
42
|
-
}
|
43
|
-
}
|
44
|
-
showModal() {
|
45
|
-
this.modal = true;
|
46
|
-
this.open = true;
|
47
|
-
this._div.addEventListener("click", this._handleModal);
|
48
|
-
}
|
49
|
-
close() {
|
50
|
-
this.open = false;
|
51
|
-
if (this.modal)
|
52
|
-
this._div.removeEventListener("click", this._handleModal);
|
53
|
-
}
|
54
|
-
_handleWheel(e) {
|
55
|
-
const s = this._div.style.transform.match(/scale\((.*)\)/);
|
56
|
-
let scale = 1;
|
57
|
-
if (s)
|
58
|
-
scale = Number(s[1]);
|
59
|
-
if (e.deltaY > 0)
|
60
|
-
scale -= 0.1;
|
61
|
-
else
|
62
|
-
scale += 0.1;
|
63
|
-
this._div.style.transform = `scale(${scale})`;
|
64
|
-
}
|
65
|
-
_handleKeydown(e) {
|
66
|
-
const keys = this.key.split(/[^a-zA-Z0-9]/).filter((e) => e !== "");
|
67
|
-
if (keys.includes(e.key) || keys.includes(e.code))
|
68
|
-
this.close();
|
69
|
-
}
|
70
|
-
_handleModal(e) {
|
71
|
-
e.stopPropagation();
|
72
|
-
}
|
73
|
-
};
|
24
|
+
</div>`;
|
25
|
+
}
|
26
|
+
firstUpdated() {
|
27
|
+
this.addEventListener("submit", (e) => {
|
28
|
+
if (e.target.method === "dialog")
|
29
|
+
this.close();
|
30
|
+
});
|
31
|
+
if (this.scale)
|
32
|
+
this.addEventListener("wheel", this._handleWheel);
|
33
|
+
if (this.key)
|
34
|
+
document.addEventListener("keydown", (e) => this._handleKeydown(e));
|
35
|
+
if (this.open)
|
36
|
+
this.show();
|
37
|
+
}
|
38
|
+
show() {
|
39
|
+
this.open = true;
|
40
|
+
if (this.modal) {
|
41
|
+
this.showModal();
|
42
|
+
}
|
43
|
+
}
|
44
|
+
showModal() {
|
45
|
+
this.modal = true;
|
46
|
+
this.open = true;
|
47
|
+
this._div.addEventListener("click", this._handleModal);
|
48
|
+
}
|
49
|
+
close() {
|
50
|
+
this.open = false;
|
51
|
+
if (this.modal)
|
52
|
+
this._div.removeEventListener("click", this._handleModal);
|
53
|
+
}
|
54
|
+
_handleWheel(e) {
|
55
|
+
const s = this._div.style.transform.match(/scale\((.*)\)/);
|
56
|
+
let scale = 1;
|
57
|
+
if (s)
|
58
|
+
scale = Number(s[1]);
|
59
|
+
if (e.deltaY > 0)
|
60
|
+
scale -= 0.1;
|
61
|
+
else
|
62
|
+
scale += 0.1;
|
63
|
+
this._div.style.transform = `scale(${scale})`;
|
64
|
+
}
|
65
|
+
_handleKeydown(e) {
|
66
|
+
const keys = this.key.split(/[^a-zA-Z0-9]/).filter((e) => e !== "");
|
67
|
+
if (keys.includes(e.key) || keys.includes(e.code))
|
68
|
+
this.close();
|
69
|
+
}
|
70
|
+
_handleModal(e) {
|
71
|
+
e.stopPropagation();
|
72
|
+
}
|
73
|
+
};
|
74
74
|
DialogItem.styles = css `
|
75
75
|
:host {
|
76
76
|
position: fixed;
|
@@ -134,24 +134,24 @@ DialogItem.styles = css `
|
|
134
134
|
margin-left: 0;
|
135
135
|
transform: translateX(-15%);
|
136
136
|
}
|
137
|
-
`;
|
138
|
-
__decorate([
|
139
|
-
property({ type: Boolean, reflect: true })
|
140
|
-
], DialogItem.prototype, "open", void 0);
|
141
|
-
__decorate([
|
142
|
-
property({ type: String })
|
143
|
-
], DialogItem.prototype, "key", void 0);
|
144
|
-
__decorate([
|
145
|
-
property({ type: Boolean })
|
146
|
-
], DialogItem.prototype, "scale", void 0);
|
147
|
-
__decorate([
|
148
|
-
property({ type: Boolean })
|
149
|
-
], DialogItem.prototype, "modal", void 0);
|
150
|
-
__decorate([
|
151
|
-
property({ type: String })
|
152
|
-
], DialogItem.prototype, "call", void 0);
|
153
|
-
DialogItem = __decorate([
|
154
|
-
define("dialog-item")
|
155
|
-
], DialogItem);
|
156
|
-
export { DialogItem };
|
157
|
-
export default DialogItem;
|
137
|
+
`;
|
138
|
+
__decorate([
|
139
|
+
property({ type: Boolean, reflect: true })
|
140
|
+
], DialogItem.prototype, "open", void 0);
|
141
|
+
__decorate([
|
142
|
+
property({ type: String })
|
143
|
+
], DialogItem.prototype, "key", void 0);
|
144
|
+
__decorate([
|
145
|
+
property({ type: Boolean })
|
146
|
+
], DialogItem.prototype, "scale", void 0);
|
147
|
+
__decorate([
|
148
|
+
property({ type: Boolean })
|
149
|
+
], DialogItem.prototype, "modal", void 0);
|
150
|
+
__decorate([
|
151
|
+
property({ type: String })
|
152
|
+
], DialogItem.prototype, "call", void 0);
|
153
|
+
DialogItem = __decorate([
|
154
|
+
define("dialog-item")
|
155
|
+
], DialogItem);
|
156
|
+
export { DialogItem };
|
157
|
+
export default DialogItem;
|
package/items/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
export * from "./alert-item.js";
|
2
|
-
export * from "./avatar-anchor.js";
|
3
|
-
export * from "./base-button.js";
|
4
|
-
export * from "./dialog-item.js";
|
5
|
-
export * from "./link-a.js";
|
6
|
-
export * from "./load-track.js";
|
7
|
-
export * from "./super-a.js";
|
1
|
+
export * from "./alert-item.js";
|
2
|
+
export * from "./avatar-anchor.js";
|
3
|
+
export * from "./base-button.js";
|
4
|
+
export * from "./dialog-item.js";
|
5
|
+
export * from "./link-a.js";
|
6
|
+
export * from "./load-track.js";
|
7
|
+
export * from "./super-a.js";
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/items/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
export * from "./alert-item.js";
|
2
|
-
export * from "./avatar-anchor.js";
|
3
|
-
export * from "./base-button.js";
|
4
|
-
export * from "./dialog-item.js";
|
5
|
-
export * from "./link-a.js";
|
6
|
-
export * from "./load-track.js";
|
7
|
-
export * from "./super-a.js";
|
1
|
+
export * from "./alert-item.js";
|
2
|
+
export * from "./avatar-anchor.js";
|
3
|
+
export * from "./base-button.js";
|
4
|
+
export * from "./dialog-item.js";
|
5
|
+
export * from "./link-a.js";
|
6
|
+
export * from "./load-track.js";
|
7
|
+
export * from "./super-a.js";
|
package/items/link-a.d.ts
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
import { SuperAnchor } from "./super-a.js";
|
2
|
-
export declare class LinkAnchor extends SuperAnchor {
|
3
|
-
active: string;
|
4
|
-
replace: boolean;
|
5
|
-
static styles: import("lit").CSSResult;
|
6
|
-
firstUpdated(): void;
|
7
|
-
useActive(): void;
|
8
|
-
_handleClick(e: MouseEvent): void;
|
9
|
-
pushState(url?: string): void;
|
10
|
-
replaceState(url?: string): void;
|
11
|
-
static pushState(data: any, unused: string, url?: string): void;
|
12
|
-
static replaceState(data: any, unused: string, url?: string): void;
|
13
|
-
}
|
14
|
-
export default LinkAnchor;
|
15
|
-
declare global {
|
16
|
-
interface HTMLElementTagNameMap {
|
17
|
-
"link-a": LinkAnchor;
|
18
|
-
}
|
19
|
-
}
|
1
|
+
import { SuperAnchor } from "./super-a.js";
|
2
|
+
export declare class LinkAnchor extends SuperAnchor {
|
3
|
+
active: string;
|
4
|
+
replace: boolean;
|
5
|
+
static styles: import("lit").CSSResult;
|
6
|
+
firstUpdated(): void;
|
7
|
+
useActive(): void;
|
8
|
+
_handleClick(e: MouseEvent): void;
|
9
|
+
pushState(url?: string): void;
|
10
|
+
replaceState(url?: string): void;
|
11
|
+
static pushState(data: any, unused: string, url?: string): void;
|
12
|
+
static replaceState(data: any, unused: string, url?: string): void;
|
13
|
+
}
|
14
|
+
export default LinkAnchor;
|
15
|
+
declare global {
|
16
|
+
interface HTMLElementTagNameMap {
|
17
|
+
"link-a": LinkAnchor;
|
18
|
+
}
|
19
|
+
}
|
20
20
|
//# sourceMappingURL=link-a.d.ts.map
|
package/items/link-a.js
CHANGED
@@ -1,67 +1,67 @@
|
|
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
|
-
var LinkAnchor_1;
|
8
|
-
import { css, property, define } from "../deps.js";
|
9
|
-
import { SuperAnchor } from "./super-a.js";
|
10
|
-
import { RouteView } from "../view/route-view.js";
|
11
|
-
let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
|
12
|
-
constructor() {
|
13
|
-
super(...arguments);
|
14
|
-
this.active = "";
|
15
|
-
this.replace = false;
|
16
|
-
}
|
17
|
-
firstUpdated() {
|
18
|
-
this.shadowRoot.querySelector("a").addEventListener("click", this._handleClick.bind(this));
|
19
|
-
if (this.active) {
|
20
|
-
window.addEventListener("popstate", this.useActive.bind(this));
|
21
|
-
}
|
22
|
-
}
|
23
|
-
useActive() {
|
24
|
-
const url = new URL(this.href, window.location.href);
|
25
|
-
if (url.origin === window.location.origin) {
|
26
|
-
if (url.pathname === window.location.pathname) {
|
27
|
-
this.classList.add(this.active);
|
28
|
-
}
|
29
|
-
else {
|
30
|
-
this.classList.remove(this.active);
|
31
|
-
}
|
32
|
-
}
|
33
|
-
}
|
34
|
-
_handleClick(e) {
|
35
|
-
if (this.target !== "_self")
|
36
|
-
return;
|
37
|
-
const url = new URL(this.href, window.location.href);
|
38
|
-
if (url.origin === window.location.origin) {
|
39
|
-
e.preventDefault();
|
40
|
-
if (this.replace) {
|
41
|
-
this.replaceState();
|
42
|
-
}
|
43
|
-
else {
|
44
|
-
this.pushState();
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
pushState(url = this.href) {
|
49
|
-
LinkAnchor_1.pushState(null, "", url);
|
50
|
-
this.active && this.useActive();
|
51
|
-
}
|
52
|
-
replaceState(url = this.href) {
|
53
|
-
LinkAnchor_1.replaceState(null, "", url);
|
54
|
-
this.active && this.useActive();
|
55
|
-
}
|
56
|
-
static pushState(data, unused, url) {
|
57
|
-
history.pushState(data, unused, url);
|
58
|
-
RouteView.updateAll();
|
59
|
-
}
|
60
|
-
static replaceState(data, unused, url) {
|
61
|
-
history.replaceState(data, unused, url);
|
62
|
-
RouteView.updateAll();
|
63
|
-
}
|
64
|
-
};
|
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
|
+
var LinkAnchor_1;
|
8
|
+
import { css, property, define } from "../deps.js";
|
9
|
+
import { SuperAnchor } from "./super-a.js";
|
10
|
+
import { RouteView } from "../view/route-view.js";
|
11
|
+
let LinkAnchor = LinkAnchor_1 = class LinkAnchor extends SuperAnchor {
|
12
|
+
constructor() {
|
13
|
+
super(...arguments);
|
14
|
+
this.active = "";
|
15
|
+
this.replace = false;
|
16
|
+
}
|
17
|
+
firstUpdated() {
|
18
|
+
this.shadowRoot.querySelector("a").addEventListener("click", this._handleClick.bind(this));
|
19
|
+
if (this.active) {
|
20
|
+
window.addEventListener("popstate", this.useActive.bind(this));
|
21
|
+
}
|
22
|
+
}
|
23
|
+
useActive() {
|
24
|
+
const url = new URL(this.href, window.location.href);
|
25
|
+
if (url.origin === window.location.origin) {
|
26
|
+
if (url.pathname === window.location.pathname) {
|
27
|
+
this.classList.add(this.active);
|
28
|
+
}
|
29
|
+
else {
|
30
|
+
this.classList.remove(this.active);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
_handleClick(e) {
|
35
|
+
if (this.target !== "_self")
|
36
|
+
return;
|
37
|
+
const url = new URL(this.href, window.location.href);
|
38
|
+
if (url.origin === window.location.origin) {
|
39
|
+
e.preventDefault();
|
40
|
+
if (this.replace) {
|
41
|
+
this.replaceState();
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
this.pushState();
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
pushState(url = this.href) {
|
49
|
+
LinkAnchor_1.pushState(null, "", url);
|
50
|
+
this.active && this.useActive();
|
51
|
+
}
|
52
|
+
replaceState(url = this.href) {
|
53
|
+
LinkAnchor_1.replaceState(null, "", url);
|
54
|
+
this.active && this.useActive();
|
55
|
+
}
|
56
|
+
static pushState(data, unused, url) {
|
57
|
+
history.pushState(data, unused, url);
|
58
|
+
RouteView.updateAll();
|
59
|
+
}
|
60
|
+
static replaceState(data, unused, url) {
|
61
|
+
history.replaceState(data, unused, url);
|
62
|
+
RouteView.updateAll();
|
63
|
+
}
|
64
|
+
};
|
65
65
|
LinkAnchor.styles = css `
|
66
66
|
:host {
|
67
67
|
display: inline-block;
|
@@ -84,15 +84,15 @@ LinkAnchor.styles = css `
|
|
84
84
|
display: inline-flex;
|
85
85
|
border-radius: 20%;
|
86
86
|
}
|
87
|
-
`;
|
88
|
-
__decorate([
|
89
|
-
property()
|
90
|
-
], LinkAnchor.prototype, "active", void 0);
|
91
|
-
__decorate([
|
92
|
-
property({ type: Boolean })
|
93
|
-
], LinkAnchor.prototype, "replace", void 0);
|
94
|
-
LinkAnchor = LinkAnchor_1 = __decorate([
|
95
|
-
define("link-a")
|
96
|
-
], LinkAnchor);
|
97
|
-
export { LinkAnchor };
|
98
|
-
export default LinkAnchor;
|
87
|
+
`;
|
88
|
+
__decorate([
|
89
|
+
property()
|
90
|
+
], LinkAnchor.prototype, "active", void 0);
|
91
|
+
__decorate([
|
92
|
+
property({ type: Boolean })
|
93
|
+
], LinkAnchor.prototype, "replace", void 0);
|
94
|
+
LinkAnchor = LinkAnchor_1 = __decorate([
|
95
|
+
define("link-a")
|
96
|
+
], LinkAnchor);
|
97
|
+
export { LinkAnchor };
|
98
|
+
export default LinkAnchor;
|
package/items/load-track.d.ts
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
export declare class LoadTrack extends STD {
|
3
|
-
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
4
|
-
current: number;
|
5
|
-
isValue: boolean;
|
6
|
-
max: number;
|
7
|
-
min: number;
|
8
|
-
modify: boolean;
|
9
|
-
set value(val: string);
|
10
|
-
get value(): string;
|
11
|
-
render(): import("lit-html").TemplateResult<1>;
|
12
|
-
parsePercent(s?: string | number): number;
|
13
|
-
_handleClick(e: any): void;
|
14
|
-
}
|
15
|
-
export default LoadTrack;
|
16
|
-
declare global {
|
17
|
-
interface HTMLElementTagNameMap {
|
18
|
-
"load-track": LoadTrack;
|
19
|
-
}
|
20
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
export declare class LoadTrack extends STD {
|
3
|
+
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
4
|
+
current: number;
|
5
|
+
isValue: boolean;
|
6
|
+
max: number;
|
7
|
+
min: number;
|
8
|
+
modify: boolean;
|
9
|
+
set value(val: string);
|
10
|
+
get value(): string;
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
12
|
+
parsePercent(s?: string | number): number;
|
13
|
+
_handleClick(e: any): void;
|
14
|
+
}
|
15
|
+
export default LoadTrack;
|
16
|
+
declare global {
|
17
|
+
interface HTMLElementTagNameMap {
|
18
|
+
"load-track": LoadTrack;
|
19
|
+
}
|
20
|
+
}
|
21
21
|
//# sourceMappingURL=load-track.d.ts.map
|