godown 1.1.0 → 1.1.1
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 +1 -1
- package/conf.d.ts.map +1 -1
- package/deps.d.ts +4 -4
- package/deps.js +4 -4
- package/effect/ov-effect.d.ts +3 -3
- package/effect/ro-effect.js +6 -6
- package/effect/tw-effect.js +6 -6
- package/group/avatar-group.d.ts +3 -3
- package/group/avatar-group.d.ts.map +1 -1
- package/group/avatar-group.js +12 -23
- package/input-form/base-input.d.ts +2 -2
- package/input-form/base-input.d.ts.map +1 -1
- package/input-form/base-input.js +13 -13
- package/input-form/exp-input.d.ts +3 -3
- package/input-form/exp-input.d.ts.map +1 -1
- package/input-form/exp-input.js +5 -4
- package/input-form/label-input.d.ts +3 -3
- package/input-form/label-input.d.ts.map +1 -1
- package/input-form/label-input.js +5 -5
- package/input-form/search-input.d.ts.map +1 -1
- package/input-form/search-input.js +23 -18
- package/input-form/select-input.js +1 -1
- package/input-form/split-input.d.ts.map +1 -1
- package/input-form/split-input.js +5 -2
- package/input-form/std.js +1 -1
- package/input-form/switch-input.d.ts +1 -1
- package/input-form/switch-input.d.ts.map +1 -1
- package/input-form/switch-input.js +12 -15
- package/items/alert-item.js +1 -1
- package/items/avatar-anchor.d.ts +1 -1
- package/items/avatar-anchor.d.ts.map +1 -1
- package/items/avatar-anchor.js +8 -7
- package/items/dialog-item.js +8 -8
- package/items/link-a.d.ts +1 -1
- package/items/link-a.js +1 -1
- package/items/load-track.d.ts +1 -1
- package/items/load-track.js +1 -1
- package/items/super-a.d.ts +2 -2
- package/items/super-a.d.ts.map +1 -1
- package/items/super-a.js +3 -1
- package/layout/div-line.d.ts +2 -2
- package/layout/div-line.js +3 -3
- package/layout/drag-box.d.ts +2 -2
- package/layout/drag-box.js +13 -13
- package/layout/nav-aside.d.ts +2 -2
- package/layout/nav-aside.js +3 -3
- package/layout/nav-layout.d.ts +2 -2
- package/layout/nav-layout.js +6 -6
- package/layout/std.js +1 -1
- package/package.json +3 -3
- package/react/effect.js +7 -7
- package/react/group.js +5 -5
- package/react/input-form.js +14 -14
- package/react/items.js +9 -9
- package/react/layout.js +7 -7
- package/react/view.js +7 -7
- package/view/details-expand.js +1 -1
- package/view/down-drop.d.ts +2 -2
- package/view/down-drop.js +7 -7
- package/view/menu-list.d.ts +0 -1
- package/view/menu-list.d.ts.map +1 -1
- package/view/menu-list.js +12 -11
- package/view/react/effect.d.ts +10 -0
- package/view/react/effect.d.ts.map +1 -0
- package/view/react/effect.js +32 -0
- package/view/react/group.d.ts +5 -0
- package/view/react/group.d.ts.map +1 -0
- package/view/react/group.js +18 -0
- package/view/react/index.d.ts +7 -0
- package/view/react/index.d.ts.map +1 -0
- package/view/react/index.js +6 -0
- package/view/react/input-form.d.ts +33 -0
- package/view/react/input-form.d.ts.map +1 -0
- package/view/react/input-form.js +64 -0
- package/view/react/items.d.ts +9 -0
- package/view/react/items.d.ts.map +1 -0
- package/view/react/items.js +38 -0
- package/view/react/layout.d.ts +7 -0
- package/view/react/layout.d.ts.map +1 -0
- package/view/react/layout.js +28 -0
- package/view/react/view.d.ts +7 -0
- package/view/react/view.d.ts.map +1 -0
- package/view/react/view.js +28 -0
- package/view/route-view.d.ts +4 -4
- package/view/route-view.js +1 -1
- package/view/scroll-x.d.ts.map +1 -1
- package/view/scroll-x.js +18 -9
- package/with.d.ts +7 -2
- package/with.d.ts.map +1 -1
- package/with.js +6 -6
package/view/scroll-x.js
CHANGED
@@ -8,26 +8,35 @@ import { css, define, html } from "../deps.js";
|
|
8
8
|
import STD from "./std.js";
|
9
9
|
let ScrollX = class ScrollX extends STD {
|
10
10
|
get _section() {
|
11
|
-
return this.shadowRoot.querySelector(
|
11
|
+
return this.shadowRoot.querySelector("section");
|
12
12
|
}
|
13
13
|
render() {
|
14
14
|
return html `<section><main><span><slot></slot></span></main></section>`;
|
15
15
|
}
|
16
16
|
firstUpdated() {
|
17
|
-
this._section.addEventListener(
|
18
|
-
this.dispatchEvent(new CustomEvent(
|
17
|
+
this._section.addEventListener("scroll", (e) => {
|
18
|
+
this.dispatchEvent(new CustomEvent("scroll", { detail: e.target.scrollTop }));
|
19
19
|
});
|
20
20
|
this.resize();
|
21
|
-
window.addEventListener(
|
21
|
+
window.addEventListener("resize", () => {
|
22
22
|
this.resize();
|
23
23
|
});
|
24
24
|
}
|
25
25
|
resize() {
|
26
|
-
|
27
|
-
if (!
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
const child = this.firstElementChild;
|
27
|
+
if (!child)
|
28
|
+
return;
|
29
|
+
const ClientHeight = child.clientHeight || 0;
|
30
|
+
if (ClientHeight) {
|
31
|
+
this._section.style.width = ClientHeight + "px";
|
32
|
+
this._section.style.height = getComputedStyle(this).width;
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
const ComputedHeight = getComputedStyle(child).height;
|
36
|
+
this.style.height = ComputedHeight;
|
37
|
+
this._section.style.width = ComputedHeight;
|
38
|
+
this._section.style.height = getComputedStyle(this).width;
|
39
|
+
}
|
31
40
|
}
|
32
41
|
};
|
33
42
|
ScrollX.styles = css `
|
package/with.d.ts
CHANGED
@@ -4,7 +4,7 @@ export declare const define: (name: string, options?: ElementDefinitionOptions)
|
|
4
4
|
* @param target Appended target element or use document.querySelector(target) or document.body
|
5
5
|
* @param args tag:tag name, props:attribute, children:appended chindren, html:innerHTML
|
6
6
|
*/
|
7
|
-
export declare const append: (target
|
7
|
+
export declare const append: (target?: string | object, args?: string | {
|
8
8
|
tag: any;
|
9
9
|
props?: any;
|
10
10
|
children?: any;
|
@@ -14,7 +14,12 @@ export declare const append: (target: string | object, args: {
|
|
14
14
|
* Create element from args
|
15
15
|
* @param args tag:tag name, props:attribute, children:appended chindren, html:innerHTML
|
16
16
|
*/
|
17
|
-
export declare const create: (args
|
17
|
+
export declare const create: (args?: string | {
|
18
|
+
tag: any;
|
19
|
+
props?: any;
|
20
|
+
children?: any;
|
21
|
+
html?: any;
|
22
|
+
}) => any;
|
18
23
|
/**
|
19
24
|
* Create element with args append to target
|
20
25
|
* @param map Map of key:selector, value:args
|
package/with.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../src/with.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,SAAU,MAAM,YAAY,wBAAwB,mBAAmB,wBAAwB,SAOjH,CAAC;AACF;;;;EAIE;AACF,eAAO,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../src/with.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,SAAU,MAAM,YAAY,wBAAwB,mBAAmB,wBAAwB,SAOjH,CAAC;AACF;;;;EAIE;AACF,eAAO,MAAM,MAAM,YAAY,MAAM,GAAG,MAAM,SAAiB,MAAM,GAAG;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAC;CAAE,SAK7H,CAAC;AACF;;;EAGE;AACF,eAAO,MAAM,MAAM,UAAU,MAAM,GAAG;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAC;CAAE,QAqB3F,CAAC;AACF;;;EAGE;AACF,eAAO,MAAM,KAAK,oBAuBjB,CAAC"}
|
package/with.js
CHANGED
@@ -13,10 +13,10 @@ export const define = (name, options) => (constructor) => {
|
|
13
13
|
* @param target Appended target element or use document.querySelector(target) or document.body
|
14
14
|
* @param args tag:tag name, props:attribute, children:appended chindren, html:innerHTML
|
15
15
|
*/
|
16
|
-
export const append = (target, args) => {
|
16
|
+
export const append = (target = "body", args = "div") => {
|
17
17
|
if (!args)
|
18
18
|
return;
|
19
|
-
target = (typeof target ===
|
19
|
+
target = (typeof target === "string" ? document.querySelector(target) : target) || document.body;
|
20
20
|
const element = create(args);
|
21
21
|
target.appendChild(element);
|
22
22
|
};
|
@@ -24,14 +24,14 @@ export const append = (target, args) => {
|
|
24
24
|
* Create element from args
|
25
25
|
* @param args tag:tag name, props:attribute, children:appended chindren, html:innerHTML
|
26
26
|
*/
|
27
|
-
export const create = (args) => {
|
28
|
-
const tag = (typeof args ===
|
27
|
+
export const create = (args = "div") => {
|
28
|
+
const tag = (typeof args === "string" ? args : args === null || args === void 0 ? void 0 : args.tag) || "div";
|
29
29
|
const { props, children, html } = args || {};
|
30
30
|
const element = document.createElement(tag);
|
31
31
|
if (props) {
|
32
32
|
Object.keys(props).forEach((prop) => {
|
33
33
|
// element[prop] = props[prop];
|
34
|
-
element.setAttribute(prop, props[prop] === true ?
|
34
|
+
element.setAttribute(prop, props[prop] === true ? "" : props[prop]);
|
35
35
|
});
|
36
36
|
}
|
37
37
|
;
|
@@ -59,7 +59,7 @@ export const retag = (map) => {
|
|
59
59
|
for (let [key, args] of map) {
|
60
60
|
for (let i = document.querySelectorAll(key).length - 1; i >= 0; i--) {
|
61
61
|
const element = document.querySelectorAll(key)[i];
|
62
|
-
const tag = (typeof args ===
|
62
|
+
const tag = (typeof args === "string" ? args : args === null || args === void 0 ? void 0 : args.tag) || "div";
|
63
63
|
let props = args.props || {};
|
64
64
|
const { children, html = "" } = args;
|
65
65
|
[...element.attributes].reduce((acc, attr) => {
|