drab 6.5.1 → 7.0.0
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/dist/announcer/index.d.ts +2 -0
- package/dist/base/index.d.ts +101 -1536
- package/dist/base/index.js +87 -76
- package/dist/contextmenu/index.d.ts +1045 -3
- package/dist/contextmenu/index.js +15 -15
- package/dist/define.d.ts +11 -1
- package/dist/define.js +11 -5
- package/dist/dialog/index.d.ts +1047 -6
- package/dist/dialog/index.js +22 -22
- package/dist/editor/index.d.ts +1047 -12
- package/dist/editor/index.js +36 -36
- package/dist/fullscreen/index.d.ts +1045 -7
- package/dist/fullscreen/index.js +8 -8
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -3
- package/dist/intersect/index.d.ts +1059 -16
- package/dist/intersect/index.js +26 -33
- package/dist/prefetch/index.d.ts +706 -25
- package/dist/prefetch/index.js +25 -44
- package/dist/share/index.d.ts +1413 -11
- package/dist/share/index.js +50 -18
- package/dist/tablesort/index.d.ts +1390 -5
- package/dist/tablesort/index.js +5 -5
- package/dist/tabs/index.d.ts +702 -4
- package/dist/tabs/index.js +3 -3
- package/dist/types/index.d.ts +29 -0
- package/dist/wakelock/index.d.ts +1390 -6
- package/dist/wakelock/index.js +16 -16
- package/package.json +5 -24
- package/dist/base/define.js +0 -3
- package/dist/copy/define.d.ts +0 -1
- package/dist/copy/define.js +0 -3
- package/dist/copy/index.d.ts +0 -30
- package/dist/copy/index.js +0 -39
- package/dist/youtube/define.d.ts +0 -1
- package/dist/youtube/define.js +0 -3
- package/dist/youtube/index.d.ts +0 -31
- package/dist/youtube/index.js +0 -56
- /package/dist/{base/define.d.ts → types/index.js} +0 -0
package/dist/tabs/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Lifecycle, Trigger } from "../base/index.js";
|
2
2
|
/**
|
3
3
|
* Progressively enhance a list of links and content to be tabs by
|
4
4
|
* wrapping with the `Tabs` element. Each `trigger` should be an
|
@@ -27,7 +27,7 @@ import { Base } from "../base/index.js";
|
|
27
27
|
*
|
28
28
|
* Set `orientation="vertical"` if the `tablist` element is displayed vertically.
|
29
29
|
*/
|
30
|
-
export class Tabs extends
|
30
|
+
export class Tabs extends Lifecycle(Trigger()) {
|
31
31
|
/** Supported keys for keyboard navigation. */
|
32
32
|
#keys = ["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp", "Home", "End"];
|
33
33
|
/** Currently selected tab. */
|
@@ -40,7 +40,7 @@ export class Tabs extends Base {
|
|
40
40
|
return this.getAttribute("orientation") ?? "horizontal";
|
41
41
|
}
|
42
42
|
get #tabs() {
|
43
|
-
return this.
|
43
|
+
return this.triggers(HTMLAnchorElement);
|
44
44
|
}
|
45
45
|
/**
|
46
46
|
* @param tab
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import type { AnnouncerAttributes } from "../announcer/index.js";
|
2
|
+
import type { ContextMenuAttributes } from "../contextmenu/index.js";
|
3
|
+
import type { DialogAttributes } from "../dialog/index.js";
|
4
|
+
import type { EditorAttributes } from "../editor/index.js";
|
5
|
+
import type { FullscreenAttributes } from "../fullscreen/index.js";
|
6
|
+
import type { IntersectAttributes } from "../intersect/index.js";
|
7
|
+
import type { PrefetchAttributes } from "../prefetch/index.js";
|
8
|
+
import type { ShareAttributes } from "../share/index.js";
|
9
|
+
import type { TableSortAttributes } from "../tablesort/index.js";
|
10
|
+
import type { TabsAttributes } from "../tabs/index.js";
|
11
|
+
import type { WakeLockAttributes } from "../wakelock/index.js";
|
12
|
+
export interface Attributes {
|
13
|
+
announcer: AnnouncerAttributes;
|
14
|
+
contextmenu: ContextMenuAttributes;
|
15
|
+
dialog: DialogAttributes;
|
16
|
+
editor: EditorAttributes;
|
17
|
+
fullscreen: FullscreenAttributes;
|
18
|
+
intersect: IntersectAttributes;
|
19
|
+
prefetch: PrefetchAttributes;
|
20
|
+
share: ShareAttributes;
|
21
|
+
tablesort: TableSortAttributes;
|
22
|
+
tabs: TabsAttributes;
|
23
|
+
wakelock: WakeLockAttributes;
|
24
|
+
}
|
25
|
+
type Prefixed<Prefix extends string, GlobalAttributes, ElementAttributes extends Record<string, any>> = {
|
26
|
+
[K in keyof ElementAttributes as `${Prefix}-${Extract<K, string>}`]: ElementAttributes[K] & GlobalAttributes;
|
27
|
+
};
|
28
|
+
export type Elements<GlobalAttributes, Prefix extends string = "drab"> = Prefixed<Prefix, GlobalAttributes, Attributes>;
|
29
|
+
export {};
|