@e280/shiny 0.1.0-1 → 0.1.0-10
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/README.md +110 -3
- package/package.json +3 -3
- package/s/{ui → components}/copy/component.ts +11 -6
- package/s/{ui → components}/copy/style.css.ts +6 -6
- package/s/components/drawer/component.ts +92 -0
- package/s/components/drawer/control.ts +31 -0
- package/s/components/drawer/style.css.ts +120 -0
- package/s/{ui → components}/example/component.ts +7 -5
- package/s/{ui → components}/example/style.css.ts +2 -2
- package/s/components/foundation.css.ts +15 -0
- package/s/components/framework.ts +10 -0
- package/s/components/raw-components.ts +13 -0
- package/s/components/tabs/component.ts +59 -0
- package/s/components/tabs/control.ts +31 -0
- package/s/components/tabs/style.css.ts +6 -0
- package/s/demo/aura-views.ts +6 -0
- package/s/demo/demo.bundle.ts +204 -14
- package/s/demo/demo.css +3 -1
- package/s/demo/utils/lipsum.ts +19 -0
- package/s/demo/views/demonstration/style.css.ts +10 -2
- package/s/demo/views/demonstration/view.ts +18 -14
- package/s/icons/tabler/menu-2.svg.ts +4 -0
- package/s/icons/tabler/x.svg.ts +4 -0
- package/s/index.html.ts +2 -2
- package/s/index.ts +16 -4
- package/s/install/aura.bundle.ts +9 -0
- package/s/install/plain.bundle.ts +9 -0
- package/s/shiny.ts +15 -0
- package/s/themes/aura.css.ts +48 -0
- package/s/themes/index.barrel.ts +2 -1
- package/s/themes/index.ts +1 -0
- package/s/themes/infra/css-vars.ts +33 -0
- package/s/themes/plain.css.ts +12 -0
- package/s/utils/states.ts +15 -0
- package/x/{ui → components}/copy/component.d.ts +8 -4
- package/x/{ui → components}/copy/component.js +10 -5
- package/x/components/copy/component.js.map +1 -0
- package/x/{ui → components}/copy/style.css.js +6 -6
- package/x/components/copy/style.css.js.map +1 -0
- package/x/components/drawer/component.d.ts +387 -0
- package/x/components/drawer/component.js +76 -0
- package/x/components/drawer/component.js.map +1 -0
- package/x/components/drawer/control.d.ts +9 -0
- package/x/components/drawer/control.js +24 -0
- package/x/components/drawer/control.js.map +1 -0
- package/x/components/drawer/style.css.js +119 -0
- package/x/components/drawer/style.css.js.map +1 -0
- package/x/{ui → components}/example/component.d.ts +3 -3
- package/x/{ui → components}/example/component.js +6 -4
- package/x/components/example/component.js.map +1 -0
- package/x/components/example/style.css.d.ts +2 -0
- package/x/components/example/style.css.js +10 -0
- package/x/components/example/style.css.js.map +1 -0
- package/x/components/foundation.css.d.ts +1 -0
- package/x/components/foundation.css.js +14 -0
- package/x/components/foundation.css.js.map +1 -0
- package/x/components/framework.d.ts +8 -0
- package/x/components/framework.js +5 -0
- package/x/components/framework.js.map +1 -0
- package/x/components/raw-components.d.ts +10 -0
- package/x/components/raw-components.js +11 -0
- package/x/components/raw-components.js.map +1 -0
- package/x/components/tabs/component.d.ts +374 -0
- package/x/components/tabs/component.js +49 -0
- package/x/components/tabs/component.js.map +1 -0
- package/x/components/tabs/control.d.ts +9 -0
- package/x/components/tabs/control.js +24 -0
- package/x/components/tabs/control.js.map +1 -0
- package/x/components/tabs/style.css.d.ts +2 -0
- package/x/components/tabs/style.css.js +5 -0
- package/x/components/tabs/style.css.js.map +1 -0
- package/x/demo/aura-views.d.ts +14 -0
- package/x/demo/aura-views.js +4 -0
- package/x/demo/aura-views.js.map +1 -0
- package/x/demo/demo.bundle.js +198 -14
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +383 -48
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +3 -1
- package/x/demo/utils/lipsum.d.ts +2 -0
- package/x/demo/utils/lipsum.js +11 -0
- package/x/demo/utils/lipsum.js.map +1 -0
- package/x/demo/views/demonstration/style.css.js +10 -2
- package/x/demo/views/demonstration/style.css.js.map +1 -1
- package/x/demo/views/demonstration/view.d.ts +6 -4
- package/x/demo/views/demonstration/view.js +16 -10
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/icons/tabler/menu-2.svg.d.ts +2 -0
- package/x/icons/tabler/menu-2.svg.js +3 -0
- package/x/icons/tabler/menu-2.svg.js.map +1 -0
- package/x/icons/tabler/x.svg.d.ts +2 -0
- package/x/icons/tabler/x.svg.js +3 -0
- package/x/icons/tabler/x.svg.js.map +1 -0
- package/x/index.d.ts +10 -4
- package/x/index.html +7 -5
- package/x/index.html.js +2 -2
- package/x/index.js +10 -4
- package/x/index.js.map +1 -1
- package/x/install/aura.bundle.d.ts +1 -0
- package/x/install/aura.bundle.js +5 -0
- package/x/install/aura.bundle.js.map +1 -0
- package/x/install/aura.bundle.min.js +321 -0
- package/x/install/aura.bundle.min.js.map +7 -0
- package/x/install/plain.bundle.d.ts +1 -0
- package/x/install/plain.bundle.js +5 -0
- package/x/install/plain.bundle.js.map +1 -0
- package/x/install/plain.bundle.min.js +287 -0
- package/x/install/plain.bundle.min.js.map +7 -0
- package/x/shiny.d.ts +42 -0
- package/x/shiny.js +8 -0
- package/x/shiny.js.map +1 -0
- package/x/themes/aura.css.d.ts +1 -0
- package/x/themes/aura.css.js +47 -0
- package/x/themes/aura.css.js.map +1 -0
- package/x/themes/index.barrel.d.ts +2 -1
- package/x/themes/index.barrel.js +2 -1
- package/x/themes/index.barrel.js.map +1 -1
- package/x/themes/index.d.ts +1 -0
- package/x/themes/infra/css-vars.d.ts +11 -0
- package/x/themes/infra/css-vars.js +18 -0
- package/x/themes/infra/css-vars.js.map +1 -0
- package/x/themes/plain.css.d.ts +1 -0
- package/x/themes/plain.css.js +11 -0
- package/x/themes/plain.css.js.map +1 -0
- package/x/utils/states.d.ts +5 -0
- package/x/utils/states.js +13 -0
- package/x/utils/states.js.map +1 -0
- package/s/themes/basic.css.ts +0 -18
- package/s/tools/untab.ts +0 -30
- package/s/ui/components.ts +0 -9
- package/s/ui/framework.ts +0 -8
- package/s/ui/themers.ts +0 -28
- package/x/themes/basic.css.d.ts +0 -1
- package/x/themes/basic.css.js +0 -17
- package/x/themes/basic.css.js.map +0 -1
- package/x/tools/untab.d.ts +0 -1
- package/x/tools/untab.js +0 -26
- package/x/tools/untab.js.map +0 -1
- package/x/ui/components.d.ts +0 -6
- package/x/ui/components.js +0 -7
- package/x/ui/components.js.map +0 -1
- package/x/ui/copy/component.js.map +0 -1
- package/x/ui/copy/style.css.js.map +0 -1
- package/x/ui/example/component.js.map +0 -1
- package/x/ui/example/style.css.js +0 -10
- package/x/ui/example/style.css.js.map +0 -1
- package/x/ui/framework.d.ts +0 -4
- package/x/ui/framework.js +0 -6
- package/x/ui/framework.js.map +0 -1
- package/x/ui/themers.d.ts +0 -8
- package/x/ui/themers.js +0 -12
- package/x/ui/themers.js.map +0 -1
- /package/x/{ui → components}/copy/style.css.d.ts +0 -0
- /package/x/{ui/example → components/drawer}/style.css.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../s/components/drawer/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoHhB,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShinyContext } from "../framework.js";
|
|
2
2
|
declare const ShinyExample_base: import("@e280/sly").ComponentClass<{
|
|
3
3
|
new (): {
|
|
4
4
|
attrs: import("@e280/sly").AttrTypes<{
|
|
5
5
|
start: NumberConstructor;
|
|
6
6
|
}>;
|
|
7
|
-
|
|
7
|
+
context: ShinyContext;
|
|
8
8
|
#private: any;
|
|
9
9
|
readonly shadow: ShadowRoot;
|
|
10
10
|
createShadow(): ShadowRoot;
|
|
@@ -365,7 +365,7 @@ declare const ShinyExample_base: import("@e280/sly").ComponentClass<{
|
|
|
365
365
|
focus(options?: FocusOptions): void;
|
|
366
366
|
};
|
|
367
367
|
styles: import("lit").CSSResultGroup | undefined;
|
|
368
|
-
}, [
|
|
368
|
+
}, [context: ShinyContext, start: number]>;
|
|
369
369
|
export declare class ShinyExample extends ShinyExample_base {
|
|
370
370
|
}
|
|
371
371
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { dom, view } from "@e280/sly";
|
|
2
1
|
import { html } from "lit";
|
|
2
|
+
import { dom, view } from "@e280/sly";
|
|
3
3
|
import styleCss from "./style.css.js";
|
|
4
|
+
import { foundationCss } from "../foundation.css.js";
|
|
4
5
|
import { ShinyElement } from "../framework.js";
|
|
5
|
-
export class ShinyExample extends (view(use => (
|
|
6
|
-
use.
|
|
6
|
+
export class ShinyExample extends (view(use => (context, start) => {
|
|
7
|
+
use.name("shiny-example");
|
|
8
|
+
use.styles(foundationCss, context.theme, styleCss);
|
|
7
9
|
const $count = use.signal(start);
|
|
8
10
|
const increment = () => { $count.value++; };
|
|
9
11
|
return html `
|
|
@@ -15,6 +17,6 @@ export class ShinyExample extends (view(use => (theme, start) => {
|
|
|
15
17
|
.component(class extends ShinyElement {
|
|
16
18
|
attrs = dom.attrs(this).spec({ start: Number });
|
|
17
19
|
})
|
|
18
|
-
.props(el => [el.
|
|
20
|
+
.props(el => [el.context, el.attrs.start ?? 1])) {
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/components/example/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAe,YAAY,EAAC,MAAM,iBAAiB,CAAA;AAE1D,MAAM,OAAO,YAAa,SAAQ,CACjC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAqB,EAAE,KAAa,EAAE,EAAE;IACpD,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IACzB,GAAG,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAElD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAChC,MAAM,SAAS,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA,CAAC,CAAC,CAAA;IAE1C,OAAO,IAAI,CAAA;qBACQ,SAAS;MACxB,MAAM,EAAE;;GAEX,CAAA;AACF,CAAC,CAAC;KACD,SAAS,CAAC,KAAM,SAAQ,YAAY;IACpC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,MAAM,EAAC,CAAC,CAAA;CAC7C,CAAC;KACD,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAU,CAAC,CACxD;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../s/components/example/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;;;;;;EAOhB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const foundationCss: import("lit").CSSResult;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { cssReset } from "@e280/sly";
|
|
3
|
+
export const foundationCss = css `
|
|
4
|
+
|
|
5
|
+
@layer reset, underlay, view, overlay;
|
|
6
|
+
|
|
7
|
+
${cssReset}
|
|
8
|
+
|
|
9
|
+
@layer overlay {
|
|
10
|
+
[hidden] { display: none !important; }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
`;
|
|
14
|
+
//# sourceMappingURL=foundation.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foundation.css.js","sourceRoot":"","sources":["../../s/components/foundation.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAA;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;EAI9B,QAAQ;;;;;;CAMT,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework.js","sourceRoot":"","sources":["../../s/components/framework.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAIrC,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC5C,OAAO,CAAe;CACtB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShinyCopy } from "./copy/component.js";
|
|
2
|
+
import { ShinyDrawer } from "./drawer/component.js";
|
|
3
|
+
import { ShinyExample } from "./example/component.js";
|
|
4
|
+
import { ShinyTabs } from "./tabs/component.js";
|
|
5
|
+
export declare const rawComponents: {
|
|
6
|
+
ShinyCopy: typeof ShinyCopy;
|
|
7
|
+
ShinyDrawer: typeof ShinyDrawer;
|
|
8
|
+
ShinyExample: typeof ShinyExample;
|
|
9
|
+
ShinyTabs: typeof ShinyTabs;
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ShinyCopy } from "./copy/component.js";
|
|
2
|
+
import { ShinyDrawer } from "./drawer/component.js";
|
|
3
|
+
import { ShinyExample } from "./example/component.js";
|
|
4
|
+
import { ShinyTabs } from "./tabs/component.js";
|
|
5
|
+
export const rawComponents = {
|
|
6
|
+
ShinyCopy,
|
|
7
|
+
ShinyDrawer,
|
|
8
|
+
ShinyExample,
|
|
9
|
+
ShinyTabs,
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=raw-components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-components.js","sourceRoot":"","sources":["../../s/components/raw-components.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAA;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,YAAY;IACZ,SAAS;CACT,CAAA"}
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { TabControl } from "./control.js";
|
|
2
|
+
import { ShinyContext } from "../framework.js";
|
|
3
|
+
declare const ShinyTabs_base: import("@e280/sly").ComponentClass<{
|
|
4
|
+
new (): {
|
|
5
|
+
control: TabControl;
|
|
6
|
+
get index(): number;
|
|
7
|
+
get length(): number;
|
|
8
|
+
setIndex: (index: number) => Promise<number>;
|
|
9
|
+
shimmy: (delta: number) => Promise<number>;
|
|
10
|
+
context: ShinyContext;
|
|
11
|
+
#private: any;
|
|
12
|
+
readonly shadow: ShadowRoot;
|
|
13
|
+
createShadow(): ShadowRoot;
|
|
14
|
+
render(_use: import("@e280/sly").Use): import("@e280/sly").Content;
|
|
15
|
+
updateNow: () => void;
|
|
16
|
+
update: import("@e280/stz").DebounceReturn<() => void>;
|
|
17
|
+
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
19
|
+
accessKey: string;
|
|
20
|
+
readonly accessKeyLabel: string;
|
|
21
|
+
autocapitalize: string;
|
|
22
|
+
autocorrect: boolean;
|
|
23
|
+
dir: string;
|
|
24
|
+
draggable: boolean;
|
|
25
|
+
hidden: boolean;
|
|
26
|
+
inert: boolean;
|
|
27
|
+
innerText: string;
|
|
28
|
+
lang: string;
|
|
29
|
+
readonly offsetHeight: number;
|
|
30
|
+
readonly offsetLeft: number;
|
|
31
|
+
readonly offsetParent: Element | null;
|
|
32
|
+
readonly offsetTop: number;
|
|
33
|
+
readonly offsetWidth: number;
|
|
34
|
+
outerText: string;
|
|
35
|
+
popover: string | null;
|
|
36
|
+
spellcheck: boolean;
|
|
37
|
+
title: string;
|
|
38
|
+
translate: boolean;
|
|
39
|
+
writingSuggestions: string;
|
|
40
|
+
attachInternals(): ElementInternals;
|
|
41
|
+
click(): void;
|
|
42
|
+
hidePopover(): void;
|
|
43
|
+
showPopover(): void;
|
|
44
|
+
togglePopover(options?: boolean): boolean;
|
|
45
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
46
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
47
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
48
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
49
|
+
readonly attributes: NamedNodeMap;
|
|
50
|
+
get classList(): DOMTokenList;
|
|
51
|
+
set classList(value: string);
|
|
52
|
+
className: string;
|
|
53
|
+
readonly clientHeight: number;
|
|
54
|
+
readonly clientLeft: number;
|
|
55
|
+
readonly clientTop: number;
|
|
56
|
+
readonly clientWidth: number;
|
|
57
|
+
readonly currentCSSZoom: number;
|
|
58
|
+
id: string;
|
|
59
|
+
innerHTML: string;
|
|
60
|
+
readonly localName: string;
|
|
61
|
+
readonly namespaceURI: string | null;
|
|
62
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
63
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
64
|
+
outerHTML: string;
|
|
65
|
+
readonly ownerDocument: Document;
|
|
66
|
+
get part(): DOMTokenList;
|
|
67
|
+
set part(value: string);
|
|
68
|
+
readonly prefix: string | null;
|
|
69
|
+
readonly scrollHeight: number;
|
|
70
|
+
scrollLeft: number;
|
|
71
|
+
scrollTop: number;
|
|
72
|
+
readonly scrollWidth: number;
|
|
73
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
74
|
+
slot: string;
|
|
75
|
+
readonly tagName: string;
|
|
76
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
77
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
78
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
79
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
80
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
81
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
82
|
+
computedStyleMap(): StylePropertyMapReadOnly;
|
|
83
|
+
getAttribute(qualifiedName: string): string | null;
|
|
84
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
85
|
+
getAttributeNames(): string[];
|
|
86
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
87
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
88
|
+
getBoundingClientRect(): DOMRect;
|
|
89
|
+
getClientRects(): DOMRectList;
|
|
90
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
91
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
92
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
93
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
94
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
95
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
96
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
97
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
98
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
99
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
100
|
+
getHTML(options?: GetHTMLOptions): string;
|
|
101
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
102
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
103
|
+
hasAttributes(): boolean;
|
|
104
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
105
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
106
|
+
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
107
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
108
|
+
matches(selectors: string): boolean;
|
|
109
|
+
releasePointerCapture(pointerId: number): void;
|
|
110
|
+
removeAttribute(qualifiedName: string): void;
|
|
111
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
112
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
113
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
114
|
+
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
115
|
+
scroll(options?: ScrollToOptions): void;
|
|
116
|
+
scroll(x: number, y: number): void;
|
|
117
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
118
|
+
scrollBy(x: number, y: number): void;
|
|
119
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
120
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
121
|
+
scrollTo(x: number, y: number): void;
|
|
122
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
123
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
124
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
125
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
126
|
+
setHTMLUnsafe(html: string): void;
|
|
127
|
+
setPointerCapture(pointerId: number): void;
|
|
128
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
129
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
130
|
+
get textContent(): string;
|
|
131
|
+
set textContent(value: string | null);
|
|
132
|
+
readonly baseURI: string;
|
|
133
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
134
|
+
readonly firstChild: ChildNode | null;
|
|
135
|
+
readonly isConnected: boolean;
|
|
136
|
+
readonly lastChild: ChildNode | null;
|
|
137
|
+
readonly nextSibling: ChildNode | null;
|
|
138
|
+
readonly nodeName: string;
|
|
139
|
+
readonly nodeType: number;
|
|
140
|
+
nodeValue: string | null;
|
|
141
|
+
readonly parentElement: HTMLElement | null;
|
|
142
|
+
readonly parentNode: ParentNode | null;
|
|
143
|
+
readonly previousSibling: ChildNode | null;
|
|
144
|
+
appendChild<T extends Node>(node: T): T;
|
|
145
|
+
cloneNode(subtree?: boolean): Node;
|
|
146
|
+
compareDocumentPosition(other: Node): number;
|
|
147
|
+
contains(other: Node | null): boolean;
|
|
148
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
149
|
+
hasChildNodes(): boolean;
|
|
150
|
+
insertBefore<T extends Node>(node: T, child: Node | null): T;
|
|
151
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
152
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
153
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
154
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
155
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
156
|
+
normalize(): void;
|
|
157
|
+
removeChild<T extends Node>(child: T): T;
|
|
158
|
+
replaceChild<T extends Node>(node: Node, child: T): T;
|
|
159
|
+
readonly ELEMENT_NODE: 1;
|
|
160
|
+
readonly ATTRIBUTE_NODE: 2;
|
|
161
|
+
readonly TEXT_NODE: 3;
|
|
162
|
+
readonly CDATA_SECTION_NODE: 4;
|
|
163
|
+
readonly ENTITY_REFERENCE_NODE: 5;
|
|
164
|
+
readonly ENTITY_NODE: 6;
|
|
165
|
+
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
166
|
+
readonly COMMENT_NODE: 8;
|
|
167
|
+
readonly DOCUMENT_NODE: 9;
|
|
168
|
+
readonly DOCUMENT_TYPE_NODE: 10;
|
|
169
|
+
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
170
|
+
readonly NOTATION_NODE: 12;
|
|
171
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
172
|
+
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
173
|
+
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
174
|
+
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
175
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
176
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
177
|
+
dispatchEvent(event: Event): boolean;
|
|
178
|
+
ariaActiveDescendantElement: Element | null;
|
|
179
|
+
ariaAtomic: string | null;
|
|
180
|
+
ariaAutoComplete: string | null;
|
|
181
|
+
ariaBrailleLabel: string | null;
|
|
182
|
+
ariaBrailleRoleDescription: string | null;
|
|
183
|
+
ariaBusy: string | null;
|
|
184
|
+
ariaChecked: string | null;
|
|
185
|
+
ariaColCount: string | null;
|
|
186
|
+
ariaColIndex: string | null;
|
|
187
|
+
ariaColIndexText: string | null;
|
|
188
|
+
ariaColSpan: string | null;
|
|
189
|
+
ariaControlsElements: ReadonlyArray<Element> | null;
|
|
190
|
+
ariaCurrent: string | null;
|
|
191
|
+
ariaDescribedByElements: ReadonlyArray<Element> | null;
|
|
192
|
+
ariaDescription: string | null;
|
|
193
|
+
ariaDetailsElements: ReadonlyArray<Element> | null;
|
|
194
|
+
ariaDisabled: string | null;
|
|
195
|
+
ariaErrorMessageElements: ReadonlyArray<Element> | null;
|
|
196
|
+
ariaExpanded: string | null;
|
|
197
|
+
ariaFlowToElements: ReadonlyArray<Element> | null;
|
|
198
|
+
ariaHasPopup: string | null;
|
|
199
|
+
ariaHidden: string | null;
|
|
200
|
+
ariaInvalid: string | null;
|
|
201
|
+
ariaKeyShortcuts: string | null;
|
|
202
|
+
ariaLabel: string | null;
|
|
203
|
+
ariaLabelledByElements: ReadonlyArray<Element> | null;
|
|
204
|
+
ariaLevel: string | null;
|
|
205
|
+
ariaLive: string | null;
|
|
206
|
+
ariaModal: string | null;
|
|
207
|
+
ariaMultiLine: string | null;
|
|
208
|
+
ariaMultiSelectable: string | null;
|
|
209
|
+
ariaOrientation: string | null;
|
|
210
|
+
ariaOwnsElements: ReadonlyArray<Element> | null;
|
|
211
|
+
ariaPlaceholder: string | null;
|
|
212
|
+
ariaPosInSet: string | null;
|
|
213
|
+
ariaPressed: string | null;
|
|
214
|
+
ariaReadOnly: string | null;
|
|
215
|
+
ariaRelevant: string | null;
|
|
216
|
+
ariaRequired: string | null;
|
|
217
|
+
ariaRoleDescription: string | null;
|
|
218
|
+
ariaRowCount: string | null;
|
|
219
|
+
ariaRowIndex: string | null;
|
|
220
|
+
ariaRowIndexText: string | null;
|
|
221
|
+
ariaRowSpan: string | null;
|
|
222
|
+
ariaSelected: string | null;
|
|
223
|
+
ariaSetSize: string | null;
|
|
224
|
+
ariaSort: string | null;
|
|
225
|
+
ariaValueMax: string | null;
|
|
226
|
+
ariaValueMin: string | null;
|
|
227
|
+
ariaValueNow: string | null;
|
|
228
|
+
ariaValueText: string | null;
|
|
229
|
+
role: string | null;
|
|
230
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
231
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
232
|
+
after(...nodes: (Node | string)[]): void;
|
|
233
|
+
before(...nodes: (Node | string)[]): void;
|
|
234
|
+
remove(): void;
|
|
235
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
236
|
+
readonly nextElementSibling: Element | null;
|
|
237
|
+
readonly previousElementSibling: Element | null;
|
|
238
|
+
readonly childElementCount: number;
|
|
239
|
+
readonly children: HTMLCollection;
|
|
240
|
+
readonly firstElementChild: Element | null;
|
|
241
|
+
readonly lastElementChild: Element | null;
|
|
242
|
+
append(...nodes: (Node | string)[]): void;
|
|
243
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
244
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
245
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
246
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
247
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
248
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
249
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
250
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
251
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
252
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
253
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
254
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
255
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
256
|
+
readonly attributeStyleMap: StylePropertyMap;
|
|
257
|
+
get style(): CSSStyleDeclaration;
|
|
258
|
+
set style(cssText: string);
|
|
259
|
+
contentEditable: string;
|
|
260
|
+
enterKeyHint: string;
|
|
261
|
+
inputMode: string;
|
|
262
|
+
readonly isContentEditable: boolean;
|
|
263
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
264
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
265
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
266
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
267
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
268
|
+
onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
269
|
+
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
270
|
+
onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
271
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
272
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
273
|
+
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
275
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
276
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
277
|
+
onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
278
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
279
|
+
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
280
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
281
|
+
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
282
|
+
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
283
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
284
|
+
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
285
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
286
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
287
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
288
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
289
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
290
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
291
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
292
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
293
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
294
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
295
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
296
|
+
onerror: OnErrorEventHandler;
|
|
297
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
298
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
299
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
300
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
301
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
302
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
303
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
304
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
305
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
306
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
307
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
308
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
309
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
310
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
311
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
312
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
313
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
314
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
315
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
316
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
317
|
+
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
318
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
319
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
320
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
321
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
322
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
323
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
324
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
325
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
326
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
327
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
328
|
+
onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
329
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
330
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
331
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
332
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
334
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
335
|
+
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
336
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
337
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
338
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
339
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
340
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
341
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
342
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
343
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
344
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
345
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
346
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
347
|
+
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
348
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
349
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
350
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
351
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
352
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
353
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
354
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
355
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
356
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
357
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
358
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
359
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
360
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
361
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
362
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
363
|
+
autofocus: boolean;
|
|
364
|
+
readonly dataset: DOMStringMap;
|
|
365
|
+
nonce?: string;
|
|
366
|
+
tabIndex: number;
|
|
367
|
+
blur(): void;
|
|
368
|
+
focus(options?: FocusOptions): void;
|
|
369
|
+
};
|
|
370
|
+
styles: import("lit").CSSResultGroup | undefined;
|
|
371
|
+
}, [context: ShinyContext, controlOption?: TabControl | undefined]>;
|
|
372
|
+
export declare class ShinyTabs extends ShinyTabs_base {
|
|
373
|
+
}
|
|
374
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { dom, view } from "@e280/sly";
|
|
3
|
+
import styleCss from "./style.css.js";
|
|
4
|
+
import { TabControl } from "./control.js";
|
|
5
|
+
import { foundationCss } from "../foundation.css.js";
|
|
6
|
+
import { ShinyElement } from "../framework.js";
|
|
7
|
+
export class ShinyTabs extends (view(use => (context, controlOption) => {
|
|
8
|
+
use.name("shiny-tabs");
|
|
9
|
+
use.styles(foundationCss, context.theme, styleCss);
|
|
10
|
+
const attrs = use.attrs.spec({ index: Number });
|
|
11
|
+
const control = use.once(() => controlOption ?? new TabControl(attrs.index ?? 0));
|
|
12
|
+
const $tabs = use.signal([]);
|
|
13
|
+
const $panels = use.signal([]);
|
|
14
|
+
async function tabchange(event) {
|
|
15
|
+
const slot = event.currentTarget;
|
|
16
|
+
await $tabs.set(slot.assignedElements());
|
|
17
|
+
}
|
|
18
|
+
async function panelchange(event) {
|
|
19
|
+
const slot = event.currentTarget;
|
|
20
|
+
await $panels.set(slot.assignedElements());
|
|
21
|
+
}
|
|
22
|
+
attrs.index = control.$index();
|
|
23
|
+
control.length = $tabs().length;
|
|
24
|
+
for (const [index, tab] of $tabs().entries()) {
|
|
25
|
+
const active = (index === control.index);
|
|
26
|
+
dom.attrs(tab).booleans.active = active;
|
|
27
|
+
dom.attrs(tab).booleans.disabled = active;
|
|
28
|
+
tab.onclick = () => control.setIndex(index);
|
|
29
|
+
}
|
|
30
|
+
for (const [index, tab] of $panels().entries()) {
|
|
31
|
+
const active = (index === control.index);
|
|
32
|
+
dom.attrs(tab).booleans.active = active;
|
|
33
|
+
dom.attrs(tab).booleans.hidden = !active;
|
|
34
|
+
}
|
|
35
|
+
return html `
|
|
36
|
+
<slot part=tabs @slotchange="${tabchange}"></slot>
|
|
37
|
+
<slot part=panels name=panel @slotchange="${panelchange}"></slot>
|
|
38
|
+
`;
|
|
39
|
+
})
|
|
40
|
+
.component(class extends ShinyElement {
|
|
41
|
+
control = new TabControl();
|
|
42
|
+
get index() { return this.control.index; }
|
|
43
|
+
get length() { return this.control.length; }
|
|
44
|
+
setIndex = this.control.setIndex.bind(this.control);
|
|
45
|
+
shimmy = this.control.shimmy.bind(this.control);
|
|
46
|
+
})
|
|
47
|
+
.props(el => [el.context, el.control])) {
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../s/components/tabs/component.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { signal } from "@e280/strata";
|
|
2
|
+
export class TabControl {
|
|
3
|
+
length = 1;
|
|
4
|
+
$index = signal(0);
|
|
5
|
+
constructor(start = 0) {
|
|
6
|
+
this.$index.value = start;
|
|
7
|
+
}
|
|
8
|
+
#clamp(index) {
|
|
9
|
+
index = Math.min(index, this.length - 1);
|
|
10
|
+
index = Math.max(index, 0);
|
|
11
|
+
return index;
|
|
12
|
+
}
|
|
13
|
+
get index() {
|
|
14
|
+
return this.#clamp(this.$index.get());
|
|
15
|
+
}
|
|
16
|
+
async setIndex(index) {
|
|
17
|
+
return this.$index.set(index);
|
|
18
|
+
}
|
|
19
|
+
async shimmy(delta) {
|
|
20
|
+
const index = this.#clamp(this.index + delta);
|
|
21
|
+
return this.setIndex(index);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../s/components/tabs/control.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAA;AAEnC,MAAM,OAAO,UAAU;IACtB,MAAM,GAAG,CAAC,CAAA;IACV,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;IAElB,YAAY,KAAK,GAAG,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;IAC1B,CAAC;IAED,MAAM,CAAC,KAAa;QACnB,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QACxC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QAC1B,OAAO,KAAK,CAAA;IACb,CAAC;IAED,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,KAAa;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAA;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC5B,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.css.js","sourceRoot":"","sources":["../../../s/components/tabs/style.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAA;AACvB,eAAe,GAAG,CAAA;;EAEhB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const auraViews: {
|
|
2
|
+
ShinyCopy: import("@e280/sly").View<[text: string | undefined, ms?: any]> & import("@e280/sly").View<[context: import("../index.js").ShinyContext, text: string | undefined, ms?: any]>;
|
|
3
|
+
ShinyDrawer: import("@e280/sly").View<[options: {
|
|
4
|
+
button: boolean;
|
|
5
|
+
side?: "left" | "right";
|
|
6
|
+
control?: import("../index.js").DrawerControl;
|
|
7
|
+
}]> & import("@e280/sly").View<[context: import("../index.js").ShinyContext, options: {
|
|
8
|
+
button: boolean;
|
|
9
|
+
side?: "left" | "right";
|
|
10
|
+
control?: import("../index.js").DrawerControl;
|
|
11
|
+
}]>;
|
|
12
|
+
ShinyExample: import("@e280/sly").View<[start: number]> & import("@e280/sly").View<[context: import("../index.js").ShinyContext, start: number]>;
|
|
13
|
+
ShinyTabs: import("@e280/sly").View<[controlOption?: import("../index.js").TabControl | undefined]> & import("@e280/sly").View<[context: import("../index.js").ShinyContext, controlOption?: import("../index.js").TabControl | undefined]>;
|
|
14
|
+
};
|