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/input-form/std.js
CHANGED
@@ -1,56 +1,56 @@
|
|
1
|
-
import { GLOBSTD, css, cssvar } from "../deps.js";
|
2
|
-
|
3
|
-
namevalue() {
|
4
|
-
return [this.name, this.value];
|
5
|
-
}
|
6
|
-
reset() {
|
7
|
-
this.value = this.def;
|
8
|
-
this._input.value = this.def;
|
9
|
-
}
|
10
|
-
_handleInput(e) {
|
11
|
-
e.stopPropagation();
|
12
|
-
this.value = e.target.value;
|
13
|
-
if (this.compositing)
|
14
|
-
return;
|
15
|
-
this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
|
16
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
|
17
|
-
}
|
18
|
-
_handleChange() {
|
19
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
|
20
|
-
}
|
21
|
-
connectedCallback() {
|
22
|
-
super.connectedCallback();
|
23
|
-
if (!this.def)
|
24
|
-
this.def = this.value || "";
|
25
|
-
if (!this.value)
|
26
|
-
this.value = this.def;
|
27
|
-
}
|
28
|
-
_compositionCheck() {
|
29
|
-
var _a, _b;
|
30
|
-
(_a = this._input) === null || _a === void 0 ? void 0 : _a.addEventListener("compositionstart", () => {
|
31
|
-
this.compositing = true;
|
32
|
-
});
|
33
|
-
(_b = this._input) === null || _b === void 0 ? void 0 : _b.addEventListener("compositionend", (e) => {
|
34
|
-
this.compositing = false;
|
35
|
-
this._handleInput(e);
|
36
|
-
});
|
37
|
-
}
|
38
|
-
_focusCheck() {
|
39
|
-
if (this.autofocus) {
|
40
|
-
this.focus();
|
41
|
-
}
|
42
|
-
}
|
43
|
-
focus(options) {
|
44
|
-
var _a;
|
45
|
-
(_a = this._input) === null || _a === void 0 ? void 0 : _a.focus(options);
|
46
|
-
}
|
47
|
-
firstUpdated() {
|
48
|
-
this._focusCheck();
|
49
|
-
this._compositionCheck();
|
50
|
-
}
|
51
|
-
}
|
52
|
-
InputFormSTD.styles = [
|
53
|
-
GLOBSTD.styles,
|
1
|
+
import { GLOBSTD, css, cssvar } from "../deps.js";
|
2
|
+
class InputFormSTD extends GLOBSTD {
|
3
|
+
namevalue() {
|
4
|
+
return [this.name, this.value];
|
5
|
+
}
|
6
|
+
reset() {
|
7
|
+
this.value = this.def;
|
8
|
+
this._input.value = this.def;
|
9
|
+
}
|
10
|
+
_handleInput(e) {
|
11
|
+
e.stopPropagation();
|
12
|
+
this.value = e.target.value;
|
13
|
+
if (this.compositing)
|
14
|
+
return;
|
15
|
+
this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
|
16
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
|
17
|
+
}
|
18
|
+
_handleChange() {
|
19
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
|
20
|
+
}
|
21
|
+
connectedCallback() {
|
22
|
+
super.connectedCallback();
|
23
|
+
if (!this.def)
|
24
|
+
this.def = this.value || "";
|
25
|
+
if (!this.value)
|
26
|
+
this.value = this.def;
|
27
|
+
}
|
28
|
+
_compositionCheck() {
|
29
|
+
var _a, _b;
|
30
|
+
(_a = this._input) === null || _a === void 0 ? void 0 : _a.addEventListener("compositionstart", () => {
|
31
|
+
this.compositing = true;
|
32
|
+
});
|
33
|
+
(_b = this._input) === null || _b === void 0 ? void 0 : _b.addEventListener("compositionend", (e) => {
|
34
|
+
this.compositing = false;
|
35
|
+
this._handleInput(e);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
_focusCheck() {
|
39
|
+
if (this.autofocus) {
|
40
|
+
this.focus();
|
41
|
+
}
|
42
|
+
}
|
43
|
+
focus(options) {
|
44
|
+
var _a;
|
45
|
+
(_a = this._input) === null || _a === void 0 ? void 0 : _a.focus(options);
|
46
|
+
}
|
47
|
+
firstUpdated() {
|
48
|
+
this._focusCheck();
|
49
|
+
this._compositionCheck();
|
50
|
+
}
|
51
|
+
}
|
52
|
+
InputFormSTD.styles = [
|
53
|
+
GLOBSTD.styles,
|
54
54
|
css `
|
55
55
|
:host {
|
56
56
|
${cssvar}--text:rgb(240 240 240);
|
@@ -67,5 +67,6 @@ InputFormSTD.styles = [
|
|
67
67
|
background-color: var(${cssvar}--input-true);
|
68
68
|
border-radius: 0.1rem;
|
69
69
|
}
|
70
|
-
`,
|
71
|
-
];
|
70
|
+
`,
|
71
|
+
];
|
72
|
+
export default InputFormSTD;
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
export declare class SwitchInput extends STD {
|
3
|
-
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
4
|
-
checked: boolean;
|
5
|
-
disabled: boolean;
|
6
|
-
base: "fat" | "rect";
|
7
|
-
def: string;
|
8
|
-
name: string;
|
9
|
-
value: string;
|
10
|
-
_input: HTMLInputElement;
|
11
|
-
render(): import("lit-html").TemplateResult<1>;
|
12
|
-
reset(): void;
|
13
|
-
connectedCallback(): void;
|
14
|
-
_handleChange(): void;
|
15
|
-
namevalue(): [string, boolean];
|
16
|
-
}
|
17
|
-
export default SwitchInput;
|
18
|
-
declare global {
|
19
|
-
interface HTMLElementTagNameMap {
|
20
|
-
"switch-input": SwitchInput;
|
21
|
-
}
|
22
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
export declare class SwitchInput extends STD {
|
3
|
+
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
|
4
|
+
checked: boolean;
|
5
|
+
disabled: boolean;
|
6
|
+
base: "fat" | "rect";
|
7
|
+
def: string;
|
8
|
+
name: string;
|
9
|
+
value: string;
|
10
|
+
_input: HTMLInputElement;
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
12
|
+
reset(): void;
|
13
|
+
connectedCallback(): void;
|
14
|
+
_handleChange(): void;
|
15
|
+
namevalue(): [string, boolean];
|
16
|
+
}
|
17
|
+
export default SwitchInput;
|
18
|
+
declare global {
|
19
|
+
interface HTMLElementTagNameMap {
|
20
|
+
"switch-input": SwitchInput;
|
21
|
+
}
|
22
|
+
}
|
23
23
|
//# sourceMappingURL=switch-input.d.ts.map
|
@@ -1,22 +1,22 @@
|
|
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 SwitchInput = class SwitchInput extends STD {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
this.checked = false;
|
13
|
-
this.disabled = false;
|
14
|
-
this.base = "rect";
|
15
|
-
this.def = "false";
|
16
|
-
this.name = "checkbox";
|
17
|
-
this.value = "on";
|
18
|
-
}
|
19
|
-
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, query, define, cssvar } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
|
+
let SwitchInput = class SwitchInput extends STD {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.checked = false;
|
13
|
+
this.disabled = false;
|
14
|
+
this.base = "rect";
|
15
|
+
this.def = "false";
|
16
|
+
this.name = "checkbox";
|
17
|
+
this.value = "on";
|
18
|
+
}
|
19
|
+
render() {
|
20
20
|
return html `<span class=${this.base}>
|
21
21
|
<input @change=${this._handleChange} ?disabled=${this.disabled} ?checked=${this.checked} name=${this.name} value=${this.value} type="checkbox" />
|
22
22
|
<aside>
|
@@ -24,32 +24,32 @@ let SwitchInput = class SwitchInput extends STD {
|
|
24
24
|
<div class="always"><slot></slot><slot name="always"></slot></div>
|
25
25
|
<div class="true"><slot name="true"></slot></div>
|
26
26
|
</aside>
|
27
|
-
</span>`;
|
28
|
-
}
|
29
|
-
reset() {
|
30
|
-
this.checked = this.def === "true";
|
31
|
-
this._input.checked = this.checked;
|
32
|
-
}
|
33
|
-
connectedCallback() {
|
34
|
-
super.connectedCallback();
|
35
|
-
if (this.checked) {
|
36
|
-
this.def = "true";
|
37
|
-
}
|
38
|
-
else if (this.def === "true") {
|
39
|
-
this.checked = true;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
_handleChange() {
|
43
|
-
this.checked = this._input.checked;
|
44
|
-
this.dispatchEvent(new CustomEvent("input", { detail: this.checked, bubbles: true, composed: true }));
|
45
|
-
this.dispatchEvent(new CustomEvent("change", { detail: this.checked, composed: true }));
|
46
|
-
}
|
47
|
-
namevalue() {
|
48
|
-
return [this.name, this.checked];
|
49
|
-
}
|
50
|
-
};
|
51
|
-
SwitchInput.styles = [
|
52
|
-
STD.styles,
|
27
|
+
</span>`;
|
28
|
+
}
|
29
|
+
reset() {
|
30
|
+
this.checked = this.def === "true";
|
31
|
+
this._input.checked = this.checked;
|
32
|
+
}
|
33
|
+
connectedCallback() {
|
34
|
+
super.connectedCallback();
|
35
|
+
if (this.checked) {
|
36
|
+
this.def = "true";
|
37
|
+
}
|
38
|
+
else if (this.def === "true") {
|
39
|
+
this.checked = true;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
_handleChange() {
|
43
|
+
this.checked = this._input.checked;
|
44
|
+
this.dispatchEvent(new CustomEvent("input", { detail: this.checked, bubbles: true, composed: true }));
|
45
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.checked, composed: true }));
|
46
|
+
}
|
47
|
+
namevalue() {
|
48
|
+
return [this.name, this.checked];
|
49
|
+
}
|
50
|
+
};
|
51
|
+
SwitchInput.styles = [
|
52
|
+
STD.styles,
|
53
53
|
css `
|
54
54
|
:host {
|
55
55
|
width: 3em;
|
@@ -151,31 +151,31 @@ SwitchInput.styles = [
|
|
151
151
|
.fat div.true {
|
152
152
|
display: none;
|
153
153
|
}
|
154
|
-
`,
|
155
|
-
];
|
156
|
-
__decorate([
|
157
|
-
property({ type: Boolean })
|
158
|
-
], SwitchInput.prototype, "checked", void 0);
|
159
|
-
__decorate([
|
160
|
-
property({ type: Boolean })
|
161
|
-
], SwitchInput.prototype, "disabled", void 0);
|
162
|
-
__decorate([
|
163
|
-
property()
|
164
|
-
], SwitchInput.prototype, "base", void 0);
|
165
|
-
__decorate([
|
166
|
-
property()
|
167
|
-
], SwitchInput.prototype, "def", void 0);
|
168
|
-
__decorate([
|
169
|
-
property()
|
170
|
-
], SwitchInput.prototype, "name", void 0);
|
171
|
-
__decorate([
|
172
|
-
property()
|
173
|
-
], SwitchInput.prototype, "value", void 0);
|
174
|
-
__decorate([
|
175
|
-
query("input")
|
176
|
-
], SwitchInput.prototype, "_input", void 0);
|
177
|
-
SwitchInput = __decorate([
|
178
|
-
define("switch-input")
|
179
|
-
], SwitchInput);
|
180
|
-
export { SwitchInput };
|
181
|
-
export default SwitchInput;
|
154
|
+
`,
|
155
|
+
];
|
156
|
+
__decorate([
|
157
|
+
property({ type: Boolean })
|
158
|
+
], SwitchInput.prototype, "checked", void 0);
|
159
|
+
__decorate([
|
160
|
+
property({ type: Boolean })
|
161
|
+
], SwitchInput.prototype, "disabled", void 0);
|
162
|
+
__decorate([
|
163
|
+
property()
|
164
|
+
], SwitchInput.prototype, "base", void 0);
|
165
|
+
__decorate([
|
166
|
+
property()
|
167
|
+
], SwitchInput.prototype, "def", void 0);
|
168
|
+
__decorate([
|
169
|
+
property()
|
170
|
+
], SwitchInput.prototype, "name", void 0);
|
171
|
+
__decorate([
|
172
|
+
property()
|
173
|
+
], SwitchInput.prototype, "value", void 0);
|
174
|
+
__decorate([
|
175
|
+
query("input")
|
176
|
+
], SwitchInput.prototype, "_input", void 0);
|
177
|
+
SwitchInput = __decorate([
|
178
|
+
define("switch-input")
|
179
|
+
], SwitchInput);
|
180
|
+
export { SwitchInput };
|
181
|
+
export default SwitchInput;
|
package/items/alert-item.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
export declare class AlertItem extends STD {
|
3
|
-
static styles: import("lit").CSSResult;
|
4
|
-
call: "success" | "info" | "warning" | "danger" | "hide";
|
5
|
-
autoclose: number;
|
6
|
-
title: string;
|
7
|
-
content: string;
|
8
|
-
render(): import("lit-html").TemplateResult<1>;
|
9
|
-
close(): void;
|
10
|
-
}
|
11
|
-
export default AlertItem;
|
12
|
-
declare global {
|
13
|
-
interface HTMLElementTagNameMap {
|
14
|
-
"alert-item": AlertItem;
|
15
|
-
}
|
16
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
export declare class AlertItem extends STD {
|
3
|
+
static styles: import("lit").CSSResult;
|
4
|
+
call: "success" | "info" | "warning" | "danger" | "hide";
|
5
|
+
autoclose: number;
|
6
|
+
title: string;
|
7
|
+
content: string;
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
9
|
+
close(): void;
|
10
|
+
}
|
11
|
+
export default AlertItem;
|
12
|
+
declare global {
|
13
|
+
interface HTMLElementTagNameMap {
|
14
|
+
"alert-item": AlertItem;
|
15
|
+
}
|
16
|
+
}
|
17
17
|
//# sourceMappingURL=alert-item.d.ts.map
|
package/items/alert-item.js
CHANGED
@@ -1,22 +1,22 @@
|
|
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 AlertItem = class AlertItem extends STD {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
this.call = "info";
|
13
|
-
this.autoclose = 3000;
|
14
|
-
this.title = "";
|
15
|
-
this.content = "";
|
16
|
-
}
|
17
|
-
render() {
|
18
|
-
if (this.autoclose)
|
19
|
-
setTimeout(() => this.close(), this.autoclose);
|
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 AlertItem = class AlertItem extends STD {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.call = "info";
|
13
|
+
this.autoclose = 3000;
|
14
|
+
this.title = "";
|
15
|
+
this.content = "";
|
16
|
+
}
|
17
|
+
render() {
|
18
|
+
if (this.autoclose)
|
19
|
+
setTimeout(() => this.close(), this.autoclose);
|
20
20
|
return html `<div class="${this.call} alert" role="alert">
|
21
21
|
<section class="content">
|
22
22
|
<strong><slot name="title"></slot>${this.title}</strong>
|
@@ -28,15 +28,15 @@ let AlertItem = class AlertItem extends STD {
|
|
28
28
|
<path d="M14 34L34 14" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
|
29
29
|
</svg>
|
30
30
|
</aside>
|
31
|
-
</div>`;
|
32
|
-
}
|
33
|
-
close() {
|
34
|
-
this.shadowRoot.querySelector(".alert").classList.add("hide");
|
35
|
-
setTimeout(() => {
|
36
|
-
this.remove();
|
37
|
-
}, 300);
|
38
|
-
}
|
39
|
-
};
|
31
|
+
</div>`;
|
32
|
+
}
|
33
|
+
close() {
|
34
|
+
this.shadowRoot.querySelector(".alert").classList.add("hide");
|
35
|
+
setTimeout(() => {
|
36
|
+
this.remove();
|
37
|
+
}, 300);
|
38
|
+
}
|
39
|
+
};
|
40
40
|
AlertItem.styles = css `
|
41
41
|
:host {
|
42
42
|
margin: 0.1em auto;
|
@@ -123,21 +123,21 @@ AlertItem.styles = css `
|
|
123
123
|
font-weight: bold;
|
124
124
|
color: var(--super);
|
125
125
|
}
|
126
|
-
`;
|
127
|
-
__decorate([
|
128
|
-
property()
|
129
|
-
], AlertItem.prototype, "call", void 0);
|
130
|
-
__decorate([
|
131
|
-
property({ type: Number })
|
132
|
-
], AlertItem.prototype, "autoclose", void 0);
|
133
|
-
__decorate([
|
134
|
-
property()
|
135
|
-
], AlertItem.prototype, "title", void 0);
|
136
|
-
__decorate([
|
137
|
-
property()
|
138
|
-
], AlertItem.prototype, "content", void 0);
|
139
|
-
AlertItem = __decorate([
|
140
|
-
define("alert-item")
|
141
|
-
], AlertItem);
|
142
|
-
export { AlertItem };
|
143
|
-
export default AlertItem;
|
126
|
+
`;
|
127
|
+
__decorate([
|
128
|
+
property()
|
129
|
+
], AlertItem.prototype, "call", void 0);
|
130
|
+
__decorate([
|
131
|
+
property({ type: Number })
|
132
|
+
], AlertItem.prototype, "autoclose", void 0);
|
133
|
+
__decorate([
|
134
|
+
property()
|
135
|
+
], AlertItem.prototype, "title", void 0);
|
136
|
+
__decorate([
|
137
|
+
property()
|
138
|
+
], AlertItem.prototype, "content", void 0);
|
139
|
+
AlertItem = __decorate([
|
140
|
+
define("alert-item")
|
141
|
+
], AlertItem);
|
142
|
+
export { AlertItem };
|
143
|
+
export default AlertItem;
|
package/items/avatar-anchor.d.ts
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
import STD from "./std.js";
|
2
|
-
export declare class AvatarAnchor extends STD {
|
3
|
-
src: string;
|
4
|
-
href: any;
|
5
|
-
name: string;
|
6
|
-
more: number;
|
7
|
-
call: "left" | "center" | "right";
|
8
|
-
gap: boolean;
|
9
|
-
static styles: import("lit").CSSResult;
|
10
|
-
constructor();
|
11
|
-
render(): import("lit-html").TemplateResult<1>;
|
12
|
-
ava(): import("lit-html").TemplateResult<1>;
|
13
|
-
}
|
14
|
-
export default AvatarAnchor;
|
15
|
-
declare global {
|
16
|
-
interface HTMLElementTagNameMap {
|
17
|
-
"avatar-anchor": AvatarAnchor;
|
18
|
-
}
|
19
|
-
}
|
1
|
+
import STD from "./std.js";
|
2
|
+
export declare class AvatarAnchor extends STD {
|
3
|
+
src: string;
|
4
|
+
href: any;
|
5
|
+
name: string;
|
6
|
+
more: number;
|
7
|
+
call: "left" | "center" | "right";
|
8
|
+
gap: boolean;
|
9
|
+
static styles: import("lit").CSSResult;
|
10
|
+
constructor();
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
12
|
+
ava(): import("lit-html").TemplateResult<1>;
|
13
|
+
}
|
14
|
+
export default AvatarAnchor;
|
15
|
+
declare global {
|
16
|
+
interface HTMLElementTagNameMap {
|
17
|
+
"avatar-anchor": AvatarAnchor;
|
18
|
+
}
|
19
|
+
}
|
20
20
|
//# sourceMappingURL=avatar-anchor.d.ts.map
|
package/items/avatar-anchor.js
CHANGED
@@ -1,23 +1,23 @@
|
|
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
|
-
let AvatarAnchor = class AvatarAnchor extends STD {
|
10
|
-
constructor() {
|
11
|
-
super();
|
12
|
-
this.src = "";
|
13
|
-
this.href = undefined;
|
14
|
-
this.name = "";
|
15
|
-
this.more = 0;
|
16
|
-
this.call = "center";
|
17
|
-
this.gap = false;
|
18
|
-
this.call = "center";
|
19
|
-
}
|
20
|
-
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, classMap, ifDefined, define } from "../deps.js";
|
8
|
+
import STD from "./std.js";
|
9
|
+
let AvatarAnchor = class AvatarAnchor extends STD {
|
10
|
+
constructor() {
|
11
|
+
super();
|
12
|
+
this.src = "";
|
13
|
+
this.href = undefined;
|
14
|
+
this.name = "";
|
15
|
+
this.more = 0;
|
16
|
+
this.call = "center";
|
17
|
+
this.gap = false;
|
18
|
+
this.call = "center";
|
19
|
+
}
|
20
|
+
render() {
|
21
21
|
return html `<div class=${classMap({ gap: this.gap, [this.call]: this.call })}>
|
22
22
|
<header>
|
23
23
|
<a href=${ifDefined(this.href)}>
|
@@ -30,24 +30,24 @@ let AvatarAnchor = class AvatarAnchor extends STD {
|
|
30
30
|
</section>
|
31
31
|
</header>
|
32
32
|
${!this.gap ? html `<article><slot></slot></article>` : ""}
|
33
|
-
</div>`;
|
34
|
-
}
|
35
|
-
ava() {
|
36
|
-
if (this.src) {
|
37
|
-
return html `<img src=${this.src} />`;
|
38
|
-
}
|
39
|
-
else if (this.name) {
|
40
|
-
let name = this.name.slice(0, 2);
|
41
|
-
name = name[0].toUpperCase() + name.slice(1);
|
42
|
-
return html `<span>${name}</span>`;
|
43
|
-
}
|
44
|
-
else if (this.more) {
|
45
|
-
const more = this.more > 99 ? "..." : this.more;
|
46
|
-
return html `<span>+${more}</span>`;
|
47
|
-
}
|
48
|
-
return html `<slot name="avatar"></slot>`;
|
49
|
-
}
|
50
|
-
};
|
33
|
+
</div>`;
|
34
|
+
}
|
35
|
+
ava() {
|
36
|
+
if (this.src) {
|
37
|
+
return html `<img src=${this.src} />`;
|
38
|
+
}
|
39
|
+
else if (this.name) {
|
40
|
+
let name = this.name.slice(0, 2);
|
41
|
+
name = name[0].toUpperCase() + name.slice(1);
|
42
|
+
return html `<span>${name}</span>`;
|
43
|
+
}
|
44
|
+
else if (this.more) {
|
45
|
+
const more = this.more > 99 ? "..." : this.more;
|
46
|
+
return html `<span>+${more}</span>`;
|
47
|
+
}
|
48
|
+
return html `<slot name="avatar"></slot>`;
|
49
|
+
}
|
50
|
+
};
|
51
51
|
AvatarAnchor.styles = css `
|
52
52
|
:host {
|
53
53
|
display: inline-block;
|
@@ -124,27 +124,27 @@ AvatarAnchor.styles = css `
|
|
124
124
|
.right section {
|
125
125
|
justify-content: flex-end;
|
126
126
|
}
|
127
|
-
`;
|
128
|
-
__decorate([
|
129
|
-
property()
|
130
|
-
], AvatarAnchor.prototype, "src", void 0);
|
131
|
-
__decorate([
|
132
|
-
property()
|
133
|
-
], AvatarAnchor.prototype, "href", void 0);
|
134
|
-
__decorate([
|
135
|
-
property()
|
136
|
-
], AvatarAnchor.prototype, "name", void 0);
|
137
|
-
__decorate([
|
138
|
-
property({ type: Number })
|
139
|
-
], AvatarAnchor.prototype, "more", void 0);
|
140
|
-
__decorate([
|
141
|
-
property()
|
142
|
-
], AvatarAnchor.prototype, "call", void 0);
|
143
|
-
__decorate([
|
144
|
-
property({ type: Boolean })
|
145
|
-
], AvatarAnchor.prototype, "gap", void 0);
|
146
|
-
AvatarAnchor = __decorate([
|
147
|
-
define("avatar-anchor")
|
148
|
-
], AvatarAnchor);
|
149
|
-
export { AvatarAnchor };
|
150
|
-
export default AvatarAnchor;
|
127
|
+
`;
|
128
|
+
__decorate([
|
129
|
+
property()
|
130
|
+
], AvatarAnchor.prototype, "src", void 0);
|
131
|
+
__decorate([
|
132
|
+
property()
|
133
|
+
], AvatarAnchor.prototype, "href", void 0);
|
134
|
+
__decorate([
|
135
|
+
property()
|
136
|
+
], AvatarAnchor.prototype, "name", void 0);
|
137
|
+
__decorate([
|
138
|
+
property({ type: Number })
|
139
|
+
], AvatarAnchor.prototype, "more", void 0);
|
140
|
+
__decorate([
|
141
|
+
property()
|
142
|
+
], AvatarAnchor.prototype, "call", void 0);
|
143
|
+
__decorate([
|
144
|
+
property({ type: Boolean })
|
145
|
+
], AvatarAnchor.prototype, "gap", void 0);
|
146
|
+
AvatarAnchor = __decorate([
|
147
|
+
define("avatar-anchor")
|
148
|
+
], AvatarAnchor);
|
149
|
+
export { AvatarAnchor };
|
150
|
+
export default AvatarAnchor;
|