godown 1.0.40 → 1.0.44
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.ts +35 -0
- package/out/conf.d.ts +18 -0
- package/out/conf.d.ts.map +1 -0
- package/out/conf.js +21 -0
- package/out/index.d.ts +1 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -1
- package/out/react/items.d.ts +1 -0
- package/out/react/items.d.ts.map +1 -1
- package/out/react/items.js +5 -0
- package/out/react/view.d.ts +1 -0
- package/out/react/view.d.ts.map +1 -1
- package/out/react/view.js +5 -0
- package/out/src/deps.d.ts +3 -3
- package/out/src/deps.d.ts.map +1 -1
- package/out/src/deps.js +3 -3
- package/out/src/effect/std.d.ts +2 -2
- package/out/src/effect/std.d.ts.map +1 -1
- package/out/src/effect/std.js +2 -2
- package/out/src/glob.d.ts +1 -1
- package/out/src/glob.d.ts.map +1 -1
- package/out/src/glob.js +3 -3
- package/out/src/group/std.d.ts +2 -2
- package/out/src/group/std.d.ts.map +1 -1
- package/out/src/group/std.js +2 -2
- package/out/src/input-form/base-input.d.ts +2 -2
- package/out/src/input-form/base-input.d.ts.map +1 -1
- package/out/src/input-form/base-input.js +16 -5
- package/out/src/input-form/exp-input.d.ts +1 -2
- package/out/src/input-form/exp-input.d.ts.map +1 -1
- package/out/src/input-form/exp-input.js +4 -3
- package/out/src/input-form/label-input.d.ts +1 -2
- package/out/src/input-form/label-input.d.ts.map +1 -1
- package/out/src/input-form/label-input.js +4 -3
- package/out/src/input-form/search-input.d.ts +1 -1
- package/out/src/input-form/search-input.d.ts.map +1 -1
- package/out/src/input-form/search-input.js +4 -3
- package/out/src/input-form/select-input.d.ts +6 -6
- package/out/src/input-form/select-input.d.ts.map +1 -1
- package/out/src/input-form/select-input.js +54 -45
- package/out/src/input-form/split-input.d.ts +3 -1
- package/out/src/input-form/split-input.d.ts.map +1 -1
- package/out/src/input-form/split-input.js +11 -3
- package/out/src/input-form/std.d.ts +7 -3
- package/out/src/input-form/std.d.ts.map +1 -1
- package/out/src/input-form/std.js +18 -5
- package/out/src/items/base-button.js +1 -1
- package/out/src/items/index.d.ts +1 -0
- package/out/src/items/index.d.ts.map +1 -1
- package/out/src/items/index.js +1 -0
- package/out/src/items/link-a.d.ts +19 -0
- package/out/src/items/link-a.d.ts.map +1 -0
- package/out/src/items/link-a.js +96 -0
- package/out/src/items/std.d.ts +2 -2
- package/out/src/items/std.d.ts.map +1 -1
- package/out/src/items/std.js +2 -2
- package/out/src/items/super-a.d.ts +0 -2
- package/out/src/items/super-a.d.ts.map +1 -1
- package/out/src/items/super-a.js +4 -14
- package/out/src/layout/div-line.js +1 -1
- package/out/src/layout/nav-layout.d.ts.map +1 -1
- package/out/src/layout/nav-layout.js +16 -2
- package/out/src/layout/std.d.ts +2 -2
- package/out/src/layout/std.d.ts.map +1 -1
- package/out/src/layout/std.js +2 -2
- package/out/src/view/index.d.ts +1 -0
- package/out/src/view/index.d.ts.map +1 -1
- package/out/src/view/index.js +1 -0
- package/out/src/view/route-view.d.ts +33 -0
- package/out/src/view/route-view.d.ts.map +1 -0
- package/out/src/view/route-view.js +239 -0
- package/out/src/view/std.d.ts +2 -2
- package/out/src/view/std.d.ts.map +1 -1
- package/out/src/view/std.js +2 -2
- package/out/src/with.d.ts.map +1 -1
- package/out/src/with.js +6 -5
- package/package.json +2 -1
package/conf.ts
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
const defconf: conftype = {
|
2
|
+
prefix: "",
|
3
|
+
suffix: "",
|
4
|
+
tag(origin) {
|
5
|
+
return this.prefix + origin + this.suffix;
|
6
|
+
},
|
7
|
+
enabled: [],
|
8
|
+
namemap: new Map(),
|
9
|
+
reflect: false,
|
10
|
+
cssvar: "godown-c",
|
11
|
+
};
|
12
|
+
export const init = (CONFObject: conftype) => {
|
13
|
+
Object.assign(defconf, CONFObject);
|
14
|
+
if (defconf.reflect) {
|
15
|
+
// Reflect conf to globalThis
|
16
|
+
globalThis.GodownWebComponentsCONF = defconf;
|
17
|
+
}
|
18
|
+
return defconf;
|
19
|
+
};
|
20
|
+
export const conf: conftype = { ...init(globalThis.GodownWebComponentsCONF) };
|
21
|
+
export default conf;
|
22
|
+
declare global {
|
23
|
+
interface globalThis {
|
24
|
+
GodownWebComponentsCONF: conftype;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
type conftype = {
|
28
|
+
prefix?: string;
|
29
|
+
suffix?: string;
|
30
|
+
tag?: (origin: string) => string;
|
31
|
+
enabled?: any[];
|
32
|
+
namemap?: Map<string, string>;
|
33
|
+
reflect?: boolean;
|
34
|
+
cssvar?: string;
|
35
|
+
};
|
package/out/conf.d.ts
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare const init: (CONFObject: conftype) => conftype;
|
2
|
+
export declare const conf: conftype;
|
3
|
+
export default conf;
|
4
|
+
declare global {
|
5
|
+
interface globalThis {
|
6
|
+
GodownWebComponentsCONF: conftype;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
declare type conftype = {
|
10
|
+
prefix?: string;
|
11
|
+
suffix?: string;
|
12
|
+
tag?: (origin: string) => string;
|
13
|
+
enabled?: any[];
|
14
|
+
namemap?: Map<string, string>;
|
15
|
+
reflect?: boolean;
|
16
|
+
cssvar?: string;
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=conf.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"conf.d.ts","sourceRoot":"","sources":["../conf.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,IAAI,eAAgB,QAAQ,aAOxC,CAAC;AACF,eAAO,MAAM,IAAI,EAAE,QAA0D,CAAC;AAC9E,eAAe,IAAI,CAAC;AACpB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB,uBAAuB,EAAE,QAAQ,CAAC;KACnC;CACF;AACD,aAAK,QAAQ,GAAG;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/out/conf.js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
const defconf = {
|
2
|
+
prefix: "",
|
3
|
+
suffix: "",
|
4
|
+
tag(origin) {
|
5
|
+
return this.prefix + origin + this.suffix;
|
6
|
+
},
|
7
|
+
enabled: [],
|
8
|
+
namemap: new Map(),
|
9
|
+
reflect: false,
|
10
|
+
cssvar: "godown-c",
|
11
|
+
};
|
12
|
+
export const init = (CONFObject) => {
|
13
|
+
Object.assign(defconf, CONFObject);
|
14
|
+
if (defconf.reflect) {
|
15
|
+
// Reflect conf to globalThis
|
16
|
+
globalThis.GodownWebComponentsCONF = defconf;
|
17
|
+
}
|
18
|
+
return defconf;
|
19
|
+
};
|
20
|
+
export const conf = { ...init(globalThis.GodownWebComponentsCONF) };
|
21
|
+
export default conf;
|
package/out/index.d.ts
CHANGED
package/out/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
package/out/index.js
CHANGED
package/out/react/items.d.ts
CHANGED
@@ -3,6 +3,7 @@ export declare const AvatarAnchor: import("@lit-labs/react").ReactWebComponent<X
|
|
3
3
|
export declare const BaseButton: import("@lit-labs/react").ReactWebComponent<X.BaseButton, {}>;
|
4
4
|
export declare const AlertItem: import("@lit-labs/react").ReactWebComponent<X.AlertItem, {}>;
|
5
5
|
export declare const DialogItem: import("@lit-labs/react").ReactWebComponent<X.DialogItem, {}>;
|
6
|
+
export declare const LinkAnchor: import("@lit-labs/react").ReactWebComponent<X.LinkAnchor, {}>;
|
6
7
|
export declare const LoadTrack: import("@lit-labs/react").ReactWebComponent<X.LoadTrack, {}>;
|
7
8
|
export declare const SuperAnchor: import("@lit-labs/react").ReactWebComponent<X.SuperAnchor, {}>;
|
8
9
|
//# sourceMappingURL=items.d.ts.map
|
package/out/react/items.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../react/items.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAE3C,eAAO,MAAM,YAAY,iEAIvB,CAAC;AACH,eAAO,MAAM,UAAU,+DAIrB,CAAC;AACH,eAAO,MAAM,SAAS,8DAIpB,CAAC;AACH,eAAO,MAAM,UAAU,+DAIrB,CAAC;AACH,eAAO,MAAM,SAAS,8DAIpB,CAAC;
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../react/items.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAE3C,eAAO,MAAM,YAAY,iEAIvB,CAAC;AACH,eAAO,MAAM,UAAU,+DAIrB,CAAC;AACH,eAAO,MAAM,SAAS,8DAIpB,CAAC;AACH,eAAO,MAAM,UAAU,+DAIrB,CAAC;AACH,eAAO,MAAM,UAAU,+DAIrB,CAAC;AACH,eAAO,MAAM,SAAS,8DAIpB,CAAC;AACH,eAAO,MAAM,WAAW,gEAItB,CAAC"}
|
package/out/react/items.js
CHANGED
@@ -21,6 +21,11 @@ export const DialogItem = createComponent({
|
|
21
21
|
elementClass: X.DialogItem,
|
22
22
|
react: React
|
23
23
|
});
|
24
|
+
export const LinkAnchor = createComponent({
|
25
|
+
tagName: 'link-a',
|
26
|
+
elementClass: X.LinkAnchor,
|
27
|
+
react: React
|
28
|
+
});
|
24
29
|
export const LoadTrack = createComponent({
|
25
30
|
tagName: 'load-track',
|
26
31
|
elementClass: X.LoadTrack,
|
package/out/react/view.d.ts
CHANGED
@@ -2,5 +2,6 @@ import * as X from "../src/view/index.js";
|
|
2
2
|
export declare const DetailsExpand: import("@lit-labs/react").ReactWebComponent<X.DetailsExpand, {}>;
|
3
3
|
export declare const DownDrop: import("@lit-labs/react").ReactWebComponent<X.DownDrop, {}>;
|
4
4
|
export declare const MenuList: import("@lit-labs/react").ReactWebComponent<X.MenuList, {}>;
|
5
|
+
export declare const RouteView: import("@lit-labs/react").ReactWebComponent<X.RouteView, {}>;
|
5
6
|
export declare const ScrollX: import("@lit-labs/react").ReactWebComponent<X.ScrollX, {}>;
|
6
7
|
//# sourceMappingURL=view.d.ts.map
|
package/out/react/view.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../react/view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,sBAAsB,CAAC;AAE1C,eAAO,MAAM,aAAa,kEAIxB,CAAC;AACH,eAAO,MAAM,QAAQ,6DAInB,CAAC;AACH,eAAO,MAAM,QAAQ,6DAInB,CAAC;AACH,eAAO,MAAM,OAAO,4DAIlB,CAAC"}
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../react/view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,sBAAsB,CAAC;AAE1C,eAAO,MAAM,aAAa,kEAIxB,CAAC;AACH,eAAO,MAAM,QAAQ,6DAInB,CAAC;AACH,eAAO,MAAM,QAAQ,6DAInB,CAAC;AACH,eAAO,MAAM,SAAS,8DAIpB,CAAC;AACH,eAAO,MAAM,OAAO,4DAIlB,CAAC"}
|
package/out/react/view.js
CHANGED
@@ -16,6 +16,11 @@ export const MenuList = createComponent({
|
|
16
16
|
elementClass: X.MenuList,
|
17
17
|
react: React
|
18
18
|
});
|
19
|
+
export const RouteView = createComponent({
|
20
|
+
tagName: 'route-view',
|
21
|
+
elementClass: X.RouteView,
|
22
|
+
react: React
|
23
|
+
});
|
19
24
|
export const ScrollX = createComponent({
|
20
25
|
tagName: 'scroll-x',
|
21
26
|
elementClass: X.ScrollX,
|
package/out/src/deps.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
export { CSSResultGroup, html, css } from 'lit';
|
1
|
+
export { CSSResultGroup, html, css, LitElement } from 'lit';
|
2
2
|
export { query, queryAll, property, state, customElement } from 'lit/decorators.js';
|
3
|
-
export { conf } from '
|
3
|
+
export { conf } from '../conf.js';
|
4
4
|
export { append, create, define, retag } from "./with.js";
|
5
5
|
export { ifDefined } from 'lit/directives/if-defined.js';
|
6
6
|
export { classMap } from "lit/directives/class-map.js";
|
7
|
-
export {
|
7
|
+
export { GLOBSTD, cssvar } from "./glob.js";
|
8
8
|
//# sourceMappingURL=deps.d.ts.map
|
package/out/src/deps.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/deps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/deps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC"}
|
package/out/src/deps.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
export { html, css } from 'lit';
|
1
|
+
export { html, css, LitElement } from 'lit';
|
2
2
|
export { query, queryAll, property, state, customElement } from 'lit/decorators.js';
|
3
|
-
export { conf } from '
|
3
|
+
export { conf } from '../conf.js';
|
4
4
|
export { append, create, define, retag } from "./with.js";
|
5
5
|
export { ifDefined } from 'lit/directives/if-defined.js';
|
6
6
|
export { classMap } from "lit/directives/class-map.js";
|
7
|
-
export {
|
7
|
+
export { GLOBSTD, cssvar } from "./glob.js";
|
package/out/src/effect/std.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/effect/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/effect/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,OAAO;CAAI"}
|
package/out/src/effect/std.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
export default class EffectSTD extends
|
1
|
+
import { GLOBSTD } from "../deps.js";
|
2
|
+
export default class EffectSTD extends GLOBSTD {
|
3
3
|
}
|
package/out/src/glob.d.ts
CHANGED
@@ -6,7 +6,7 @@ export declare const cssvar: import("lit").CSSResult;
|
|
6
6
|
/**
|
7
7
|
* Call customElements.define only customElements.get is undefined
|
8
8
|
*/
|
9
|
-
export declare class
|
9
|
+
export declare class GLOBSTD extends LitElement {
|
10
10
|
static styles: CSSResultGroup;
|
11
11
|
}
|
12
12
|
//# sourceMappingURL=glob.d.ts.map
|
package/out/src/glob.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACjE;;GAEG;AACH,eAAO,MAAM,MAAM,yBAA+D,CAAC;AACnF;;EAEE;AACF,qBAAa,
|
1
|
+
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACjE;;GAEG;AACH,eAAO,MAAM,MAAM,yBAA+D,CAAC;AACnF;;EAEE;AACF,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,iBAeQ;CACtB"}
|
package/out/src/glob.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { conf } from "
|
1
|
+
import { conf } from "../conf.js";
|
2
2
|
import { LitElement, css, unsafeCSS } from "lit";
|
3
3
|
/**
|
4
4
|
* Custom CSS variable,join with "--" ,only allow `a-Z,0-9,-`
|
@@ -7,9 +7,9 @@ export const cssvar = unsafeCSS("--" + conf.cssvar.replace(/[^a-zA-Z0-9\-]/g, ""
|
|
7
7
|
/**
|
8
8
|
* Call customElements.define only customElements.get is undefined
|
9
9
|
*/
|
10
|
-
export class
|
10
|
+
export class GLOBSTD extends LitElement {
|
11
11
|
}
|
12
|
-
|
12
|
+
GLOBSTD.styles = css `
|
13
13
|
:host{
|
14
14
|
${cssvar}--text-selection: rgb(80 255 255);
|
15
15
|
${cssvar}--text-selection-background: rgb(0 0 0 / 10%);
|
package/out/src/group/std.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/group/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../../src/group/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;CAAI"}
|
package/out/src/group/std.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
export default class GroupSTD extends
|
1
|
+
import { GLOBSTD } from "../deps.js";
|
2
|
+
export default class GroupSTD extends GLOBSTD {
|
3
3
|
}
|
@@ -10,11 +10,11 @@ export declare class BaseInput extends STD {
|
|
10
10
|
type: inputtype;
|
11
11
|
value: string | File | FileList;
|
12
12
|
def: string;
|
13
|
-
|
13
|
+
only: boolean;
|
14
14
|
min: number;
|
15
15
|
max: number;
|
16
16
|
step: number;
|
17
|
-
|
17
|
+
autofocus: boolean;
|
18
18
|
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag").CSSResultGroup[])[];
|
19
19
|
render(): import("lit-html").TemplateResult<1>;
|
20
20
|
connectedCallback(): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/base-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,aAAK,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACnO,qBACa,SAAU,SAAQ,GAAG;IAChB,MAAM,EAAE,gBAAgB,CAAC;IACtB,OAAO,EAAE,WAAW,CAAC;IAC5B,MAAM,MAAa;IACnB,KAAK,SAAM;IACX,IAAI,SAAM;IACV,GAAG,MAAa;IAChB,IAAI,EAAE,SAAS,CAAU;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAa;IAC5C,GAAG,EAAE,MAAM,CAAM;
|
1
|
+
{"version":3,"file":"base-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/base-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,aAAK,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACnO,qBACa,SAAU,SAAQ,GAAG;IAChB,MAAM,EAAE,gBAAgB,CAAC;IACtB,OAAO,EAAE,WAAW,CAAC;IAC5B,MAAM,MAAa;IACnB,KAAK,SAAM;IACX,IAAI,SAAM;IACV,GAAG,MAAa;IAChB,IAAI,EAAE,SAAS,CAAU;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAa;IAC5C,GAAG,EAAE,MAAM,CAAM;IACA,IAAI,UAAS;IACd,GAAG,SAAK;IACR,GAAG,SAAO;IACV,IAAI,SAAK;IACR,SAAS,UAAS;IAC/C,MAAM,CAAC,MAAM,yFA+FV;IACH,MAAM;IASN,iBAAiB,IAAI,IAAI;IAKzB,YAAY;IAUZ,YAAY,CAAC,CAAC,KAAA;IAKd,WAAW,CAAC,CAAC,KAAA;IAIb,KAAK;IAUL,aAAa;CAUd;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
@@ -16,10 +16,11 @@ let BaseInput = class BaseInput extends STD {
|
|
16
16
|
this.type = 'text';
|
17
17
|
this.value = undefined;
|
18
18
|
this.def = '';
|
19
|
-
this.
|
19
|
+
this.only = false;
|
20
20
|
this.min = 0;
|
21
21
|
this.max = 100;
|
22
22
|
this.step = 1;
|
23
|
+
this.autofocus = false;
|
23
24
|
}
|
24
25
|
render() {
|
25
26
|
var _a;
|
@@ -46,6 +47,7 @@ let BaseInput = class BaseInput extends STD {
|
|
46
47
|
this.shadowRoot.querySelector('div').style.margin = "0";
|
47
48
|
}
|
48
49
|
}
|
50
|
+
this._focusCheck();
|
49
51
|
this._compositionCheck();
|
50
52
|
}
|
51
53
|
_handleRange(e) {
|
@@ -54,7 +56,7 @@ let BaseInput = class BaseInput extends STD {
|
|
54
56
|
this.dispatchEvent(new CustomEvent('input', { detail: this.value }));
|
55
57
|
}
|
56
58
|
_handleFile(e) {
|
57
|
-
this.value = this.
|
59
|
+
this.value = !this.only ? e.target.files : e.target.files[0];
|
58
60
|
this.dispatchEvent(new CustomEvent('change', { detail: this.value }));
|
59
61
|
}
|
60
62
|
reset() {
|
@@ -73,7 +75,7 @@ let BaseInput = class BaseInput extends STD {
|
|
73
75
|
case "range":
|
74
76
|
return html `<input id="input" type="range" @input=${this._handleRange} min=${this.min} max=${this.max} step=${this.step} value=${this.value}><i></i>`;
|
75
77
|
case "file":
|
76
|
-
return html `<input id="input" accept=${ifDefined(this.accept)} ?multiple=${this.
|
78
|
+
return html `<input id="input" accept=${ifDefined(this.accept)} ?multiple=${!this.only} class="input" type=${this.type} @change=${this._handleFile}>`;
|
77
79
|
default:
|
78
80
|
return html `<input id="input" class="input" type=${this.type} placeholder=${this.pla} value=${this.value} @input=${this._handleInput}/>`;
|
79
81
|
}
|
@@ -96,6 +98,12 @@ BaseInput.styles = [STD.styles, , css `
|
|
96
98
|
outline: none;
|
97
99
|
height: auto;
|
98
100
|
}
|
101
|
+
:host([type="file"]){
|
102
|
+
height: auto;
|
103
|
+
width: auto;
|
104
|
+
min-height: .5em;
|
105
|
+
min-width: .5em;
|
106
|
+
}
|
99
107
|
div,label{
|
100
108
|
display: flex;
|
101
109
|
flex: 1;
|
@@ -197,8 +205,8 @@ __decorate([
|
|
197
205
|
property()
|
198
206
|
], BaseInput.prototype, "def", void 0);
|
199
207
|
__decorate([
|
200
|
-
property()
|
201
|
-
], BaseInput.prototype, "
|
208
|
+
property({ type: Boolean })
|
209
|
+
], BaseInput.prototype, "only", void 0);
|
202
210
|
__decorate([
|
203
211
|
property({ type: Number })
|
204
212
|
], BaseInput.prototype, "min", void 0);
|
@@ -208,6 +216,9 @@ __decorate([
|
|
208
216
|
__decorate([
|
209
217
|
property({ type: Number })
|
210
218
|
], BaseInput.prototype, "step", void 0);
|
219
|
+
__decorate([
|
220
|
+
property({ type: Boolean })
|
221
|
+
], BaseInput.prototype, "autofocus", void 0);
|
211
222
|
BaseInput = __decorate([
|
212
223
|
define('base-input')
|
213
224
|
], BaseInput);
|
@@ -10,10 +10,9 @@ export declare class ExpInput extends STD {
|
|
10
10
|
def: string;
|
11
11
|
base: "outline" | "filed" | "underline";
|
12
12
|
offset: string;
|
13
|
+
autofocus: boolean;
|
13
14
|
_input: HTMLInputElement;
|
14
|
-
compositing: boolean;
|
15
15
|
render(): import("lit-html").TemplateResult<1>;
|
16
|
-
firstUpdated(): void;
|
17
16
|
}
|
18
17
|
declare global {
|
19
18
|
interface HTMLElementTagNameMap {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"exp-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/exp-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,aAAK,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACnO,qBACa,QAAS,SAAQ,GAAG;IAC/B,MAAM,CAAC,MAAM,yFAuIX;IACU,KAAK,SAAM;IACX,IAAI,SAAM;IACV,GAAG,MAAa;IAChB,IAAI,EAAE,SAAS,GAAG,UAAU,CAAU;IACtC,KAAK,SAAM;IACX,GAAG,SAAM;IACT,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,CAAa;IACpD,MAAM,SAAM;
|
1
|
+
{"version":3,"file":"exp-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/exp-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,aAAK,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACnO,qBACa,QAAS,SAAQ,GAAG;IAC/B,MAAM,CAAC,MAAM,yFAuIX;IACU,KAAK,SAAM;IACX,IAAI,SAAM;IACV,GAAG,MAAa;IAChB,IAAI,EAAE,SAAS,GAAG,UAAU,CAAU;IACtC,KAAK,SAAM;IACX,GAAG,SAAM;IACT,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,CAAa;IACpD,MAAM,SAAM;IACK,SAAS,UAAS;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IAC1C,MAAM;CASP;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
@@ -17,6 +17,7 @@ let ExpInput = class ExpInput extends STD {
|
|
17
17
|
this.def = "";
|
18
18
|
this.base = "outline";
|
19
19
|
this.offset = "";
|
20
|
+
this.autofocus = false;
|
20
21
|
}
|
21
22
|
render() {
|
22
23
|
var _a;
|
@@ -29,9 +30,6 @@ let ExpInput = class ExpInput extends STD {
|
|
29
30
|
</fieldset><style>:valid~fieldset legend,:focus~fieldset legend{margin-left: ${this.offset || 0} !important;}</style>
|
30
31
|
</div>`;
|
31
32
|
}
|
32
|
-
firstUpdated() {
|
33
|
-
this._compositionCheck();
|
34
|
-
}
|
35
33
|
};
|
36
34
|
ExpInput.styles = [STD.styles, css `
|
37
35
|
:host{
|
@@ -193,6 +191,9 @@ __decorate([
|
|
193
191
|
__decorate([
|
194
192
|
property()
|
195
193
|
], ExpInput.prototype, "offset", void 0);
|
194
|
+
__decorate([
|
195
|
+
property({ type: Boolean })
|
196
|
+
], ExpInput.prototype, "autofocus", void 0);
|
196
197
|
__decorate([
|
197
198
|
query('.input')
|
198
199
|
], ExpInput.prototype, "_input", void 0);
|
@@ -7,11 +7,10 @@ export declare class LabelInput extends STD {
|
|
7
7
|
pla: any;
|
8
8
|
name: string;
|
9
9
|
value: string;
|
10
|
-
|
10
|
+
autofocus: boolean;
|
11
11
|
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag").CSSResultGroup[])[];
|
12
12
|
_input: HTMLInputElement;
|
13
13
|
render(): import("lit-html").TemplateResult<1>;
|
14
|
-
firstUpdated(): void;
|
15
14
|
_passwordSwitcher(): void;
|
16
15
|
}
|
17
16
|
declare global {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"label-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/label-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,aAAK,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACnO,qBACa,UAAW,SAAQ,GAAG;IACrB,IAAI,EAAE,SAAS,CAAU;IACzB,KAAK,SAAM;IACX,GAAG,SAAM;IACT,GAAG,MAAa;IAChB,IAAI,SAAM;IACV,KAAK,SAAM;
|
1
|
+
{"version":3,"file":"label-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/label-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,aAAK,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACnO,qBACa,UAAW,SAAQ,GAAG;IACrB,IAAI,EAAE,SAAS,CAAU;IACzB,KAAK,SAAM;IACX,GAAG,SAAM;IACT,GAAG,MAAa;IAChB,IAAI,SAAM;IACV,KAAK,SAAM;IACM,SAAS,UAAS;IAC/C,MAAM,CAAC,MAAM,yFAkET;IACY,MAAM,EAAE,gBAAgB,CAAC;IACzC,MAAM;IAWN,iBAAiB;CAOlB;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
@@ -15,6 +15,7 @@ let LabelInput = class LabelInput extends STD {
|
|
15
15
|
this.pla = undefined;
|
16
16
|
this.name = "";
|
17
17
|
this.value = "";
|
18
|
+
this.autofocus = false;
|
18
19
|
}
|
19
20
|
render() {
|
20
21
|
var _a;
|
@@ -29,9 +30,6 @@ let LabelInput = class LabelInput extends STD {
|
|
29
30
|
</fieldset>
|
30
31
|
</label>`;
|
31
32
|
}
|
32
|
-
firstUpdated() {
|
33
|
-
this._compositionCheck();
|
34
|
-
}
|
35
33
|
_passwordSwitcher() {
|
36
34
|
if (this._input.type === "password") {
|
37
35
|
this._input.type = "text";
|
@@ -126,6 +124,9 @@ __decorate([
|
|
126
124
|
__decorate([
|
127
125
|
property()
|
128
126
|
], LabelInput.prototype, "value", void 0);
|
127
|
+
__decorate([
|
128
|
+
property({ type: Boolean })
|
129
|
+
], LabelInput.prototype, "autofocus", void 0);
|
129
130
|
__decorate([
|
130
131
|
query('input')
|
131
132
|
], LabelInput.prototype, "_input", void 0);
|
@@ -11,10 +11,10 @@ export declare class SearchInput extends STD {
|
|
11
11
|
value: string;
|
12
12
|
pla: any;
|
13
13
|
list: any[];
|
14
|
+
autofocus: boolean;
|
14
15
|
useinfer: (x: string) => Promise<string[]>;
|
15
16
|
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag").CSSResultGroup[])[];
|
16
17
|
render(): import("lit-html").TemplateResult<1>;
|
17
|
-
firstUpdated(): void;
|
18
18
|
_handleSubmit(e: any): void;
|
19
19
|
_handleInput(e: any): Promise<void>;
|
20
20
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/search-input.ts"],"names":[],"mappings":"AACA,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;
|
1
|
+
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/search-input.ts"],"names":[],"mappings":"AACA,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;IACjB,QAAQ,MAAa,MAAM,uBAKvD;IACF,MAAM,CAAC,MAAM,yFAqDX;IACF,MAAM;IAUN,aAAa,CAAC,CAAC,KAAA;IAIT,YAAY,CAAC,CAAC,KAAA;CAgCrB;AAUD,qBACa,OAAQ,SAAQ,GAAG;IAC9B,MAAM,CAAC,MAAM,yFAuET;IACQ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;;IAK3B,MAAM;CAYP;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;QAC5B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
@@ -19,6 +19,7 @@ let SearchInput = class SearchInput extends STD {
|
|
19
19
|
this.value = "";
|
20
20
|
this.pla = undefined;
|
21
21
|
this.list = [];
|
22
|
+
this.autofocus = false;
|
22
23
|
this.useinfer = async (x) => {
|
23
24
|
await new Promise((resolve) => {
|
24
25
|
setTimeout(() => { resolve(); }, 400);
|
@@ -37,9 +38,6 @@ let SearchInput = class SearchInput extends STD {
|
|
37
38
|
${((_a = this.list) === null || _a === void 0 ? void 0 : _a.length) ? html `<ul>${this.list.map((v, i) => html `<li key=${i}>${v}</li>`)}</ul>` : undefined}
|
38
39
|
</form>`;
|
39
40
|
}
|
40
|
-
firstUpdated() {
|
41
|
-
this._compositionCheck();
|
42
|
-
}
|
43
41
|
_handleSubmit(e) {
|
44
42
|
if (!this.remote)
|
45
43
|
e.preventDefault();
|
@@ -166,6 +164,9 @@ __decorate([
|
|
166
164
|
__decorate([
|
167
165
|
property({ type: Array })
|
168
166
|
], SearchInput.prototype, "list", void 0);
|
167
|
+
__decorate([
|
168
|
+
property({ type: Boolean })
|
169
|
+
], SearchInput.prototype, "autofocus", void 0);
|
169
170
|
__decorate([
|
170
171
|
property({ type: Function })
|
171
172
|
], SearchInput.prototype, "useinfer", void 0);
|
@@ -1,24 +1,24 @@
|
|
1
1
|
import STD from './std.js';
|
2
2
|
export declare class SelectInput extends STD {
|
3
3
|
static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag").CSSResultGroup[])[];
|
4
|
+
open: boolean;
|
4
5
|
selcls: string;
|
5
6
|
pla: any;
|
6
|
-
|
7
|
+
only: boolean;
|
7
8
|
def: string;
|
8
|
-
autofocus: boolean;
|
9
9
|
value: any[];
|
10
10
|
name: string;
|
11
11
|
text: Array<string>;
|
12
|
+
autofocus: boolean;
|
12
13
|
get assigned(): any;
|
13
14
|
_input: HTMLInputElement;
|
14
15
|
_aside: HTMLInputElement;
|
15
16
|
render(): import("lit-html").TemplateResult<1>;
|
16
|
-
lists():
|
17
|
+
lists(): any[];
|
18
|
+
_focusCheck(): void;
|
19
|
+
focus(options?: FocusOptions): void;
|
17
20
|
firstUpdated(): void;
|
18
21
|
select(value: string, text?: string): void;
|
19
|
-
focus(): void;
|
20
|
-
close(): void;
|
21
|
-
open(): void;
|
22
22
|
_handleInput(): void;
|
23
23
|
namevalue(): any[];
|
24
24
|
reset(): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"select-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/select-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"select-input.d.ts","sourceRoot":"","sources":["../../../src/input-form/select-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,qBACa,WAAY,SAAQ,GAAG;IAClC,MAAM,CAAC,MAAM,yFA2EV;IACyC,IAAI,UAAS;IAC7C,MAAM,SAA0C;IAChD,GAAG,MAAa;IACC,IAAI,UAAS;IAC9B,GAAG,SAAM;IACM,KAAK,QAAM;IAC1B,IAAI,SAAY;IACnB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IACL,SAAS,UAAS;IAC/C,IAAI,QAAQ,IAAI,GAAG,CAElB;IACe,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,gBAAgB,CAAC;IACzC,MAAM;IAON,KAAK;IAUL,WAAW;IAMX,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAInC,YAAY;IAyBZ,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IA0DnC,YAAY;IAyCZ,SAAS;IAMT,KAAK;CA2BN;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|