@godown/react 3.7.5 → 3.8.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/README.md +19 -1
- package/alert.d.ts +6 -4
- package/alert.d.ts.map +1 -0
- package/alert.js +6 -3
- package/alert.js.map +1 -0
- package/avatar.d.ts +5 -4
- package/avatar.d.ts.map +1 -0
- package/avatar.js +4 -3
- package/avatar.js.map +1 -0
- package/badge.d.ts +5 -4
- package/badge.d.ts.map +1 -0
- package/badge.js +4 -3
- package/badge.js.map +1 -0
- package/breath.d.ts +5 -4
- package/breath.d.ts.map +1 -0
- package/breath.js +4 -3
- package/breath.js.map +1 -0
- package/button.d.ts +5 -4
- package/button.d.ts.map +1 -0
- package/button.js +4 -3
- package/button.js.map +1 -0
- package/card.d.ts +5 -4
- package/card.d.ts.map +1 -0
- package/card.js +4 -3
- package/card.js.map +1 -0
- package/carousel.d.ts +6 -4
- package/carousel.d.ts.map +1 -0
- package/carousel.js +6 -3
- package/carousel.js.map +1 -0
- package/details.d.ts +6 -4
- package/details.d.ts.map +1 -0
- package/details.js +6 -3
- package/details.js.map +1 -0
- package/dialog.d.ts +6 -4
- package/dialog.d.ts.map +1 -0
- package/dialog.js +6 -3
- package/dialog.js.map +1 -0
- package/divider.d.ts +5 -4
- package/divider.d.ts.map +1 -0
- package/divider.js +4 -3
- package/divider.js.map +1 -0
- package/dragbox.d.ts +5 -4
- package/dragbox.d.ts.map +1 -0
- package/dragbox.js +4 -3
- package/dragbox.js.map +1 -0
- package/flex.d.ts +5 -4
- package/flex.d.ts.map +1 -0
- package/flex.js +4 -3
- package/flex.js.map +1 -0
- package/form.d.ts +5 -4
- package/form.d.ts.map +1 -0
- package/form.js +4 -3
- package/form.js.map +1 -0
- package/grid.d.ts +5 -4
- package/grid.d.ts.map +1 -0
- package/grid.js +4 -3
- package/grid.js.map +1 -0
- package/heading.d.ts +5 -4
- package/heading.d.ts.map +1 -0
- package/heading.js +4 -3
- package/heading.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -0
- package/input.d.ts +6 -4
- package/input.d.ts.map +1 -0
- package/input.js +7 -3
- package/input.js.map +1 -0
- package/layout.d.ts +5 -4
- package/layout.d.ts.map +1 -0
- package/layout.js +4 -3
- package/layout.js.map +1 -0
- package/lib/create.d.ts +12 -2
- package/lib/create.d.ts.map +1 -0
- package/lib/create.js +16 -3
- package/lib/create.js.map +1 -0
- package/lib/intrinsic.d.ts +1 -0
- package/lib/intrinsic.d.ts.map +1 -0
- package/lib/intrinsic.js +1 -0
- package/lib/intrinsic.js.map +1 -0
- package/link.d.ts +9 -4
- package/link.d.ts.map +1 -0
- package/link.js +6 -3
- package/link.js.map +1 -0
- package/package.json +5 -4
- package/progress.d.ts +5 -4
- package/progress.d.ts.map +1 -0
- package/progress.js +4 -3
- package/progress.js.map +1 -0
- package/range.d.ts +6 -4
- package/range.d.ts.map +1 -0
- package/range.js +6 -3
- package/range.js.map +1 -0
- package/rotate.d.ts +5 -4
- package/rotate.d.ts.map +1 -0
- package/rotate.js +4 -3
- package/rotate.js.map +1 -0
- package/router.d.ts +11 -4
- package/router.d.ts.map +1 -0
- package/router.js +6 -3
- package/router.js.map +1 -0
- package/select.d.ts +6 -4
- package/select.d.ts.map +1 -0
- package/select.js +8 -3
- package/select.js.map +1 -0
- package/skeleton.d.ts +5 -4
- package/skeleton.d.ts.map +1 -0
- package/skeleton.js +4 -3
- package/skeleton.js.map +1 -0
- package/split.d.ts +6 -4
- package/split.d.ts.map +1 -0
- package/split.js +7 -3
- package/split.js.map +1 -0
- package/src/alert.ts +24 -0
- package/src/avatar.ts +17 -0
- package/src/badge.ts +17 -0
- package/src/breath.ts +17 -0
- package/src/button.ts +17 -0
- package/src/card.ts +17 -0
- package/src/carousel.ts +24 -0
- package/src/details.ts +24 -0
- package/src/dialog.ts +24 -0
- package/src/divider.ts +17 -0
- package/src/dragbox.ts +17 -0
- package/src/flex.ts +17 -0
- package/src/form.ts +17 -0
- package/src/grid.ts +17 -0
- package/src/heading.ts +17 -0
- package/src/index.ts +31 -0
- package/src/input.ts +26 -0
- package/src/layout.ts +17 -0
- package/src/lib/create.ts +41 -0
- package/src/lib/intrinsic.ts +26 -0
- package/src/link.ts +30 -0
- package/src/progress.ts +17 -0
- package/src/range.ts +24 -0
- package/src/rotate.ts +17 -0
- package/src/router.ts +32 -0
- package/src/select.ts +28 -0
- package/src/skeleton.ts +17 -0
- package/src/split.ts +26 -0
- package/src/switch.ts +24 -0
- package/src/tabs.ts +24 -0
- package/src/text.ts +17 -0
- package/src/time.ts +24 -0
- package/src/tooltip.ts +24 -0
- package/src/typewriter.ts +26 -0
- package/switch.d.ts +6 -4
- package/switch.d.ts.map +1 -0
- package/switch.js +6 -3
- package/switch.js.map +1 -0
- package/tabs.d.ts +6 -4
- package/tabs.d.ts.map +1 -0
- package/tabs.js +6 -3
- package/tabs.js.map +1 -0
- package/text.d.ts +5 -4
- package/text.d.ts.map +1 -0
- package/text.js +4 -3
- package/text.js.map +1 -0
- package/time.d.ts +6 -4
- package/time.d.ts.map +1 -0
- package/time.js +6 -3
- package/time.js.map +1 -0
- package/tooltip.d.ts +6 -4
- package/tooltip.d.ts.map +1 -0
- package/tooltip.js +6 -3
- package/tooltip.js.map +1 -0
- package/typewriter.d.ts +6 -4
- package/typewriter.d.ts.map +1 -0
- package/typewriter.js +7 -3
- package/typewriter.js.map +1 -0
package/src/breath.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Breath from "godown/breath.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Breath);
|
8
|
+
|
9
|
+
export * from "godown/breath.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-breath": IntrinsicElement<Breath>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/button.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Button from "godown/button.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Button);
|
8
|
+
|
9
|
+
export * from "godown/button.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-button": IntrinsicElement<Button>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/card.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Card from "godown/card.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Card);
|
8
|
+
|
9
|
+
export * from "godown/card.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-card": IntrinsicElement<Card>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/carousel.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use client";
|
2
|
+
import Carousel from "godown/carousel.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Carousel,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<number, Carousel>;
|
11
|
+
}>({
|
12
|
+
onChange: "change",
|
13
|
+
}),
|
14
|
+
);
|
15
|
+
|
16
|
+
export * from "godown/carousel.js";
|
17
|
+
|
18
|
+
declare global {
|
19
|
+
namespace JSX {
|
20
|
+
interface IntrinsicElements {
|
21
|
+
"godown-carousel": IntrinsicElement<Carousel>;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
package/src/details.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use client";
|
2
|
+
import Details from "godown/details.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Details,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<boolean, Details>;
|
11
|
+
}>({
|
12
|
+
onChange: "change",
|
13
|
+
}),
|
14
|
+
);
|
15
|
+
|
16
|
+
export * from "godown/details.js";
|
17
|
+
|
18
|
+
declare global {
|
19
|
+
namespace JSX {
|
20
|
+
interface IntrinsicElements {
|
21
|
+
"godown-details": IntrinsicElement<Details>;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
package/src/dialog.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use client";
|
2
|
+
import Dialog from "godown/dialog.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Dialog,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<boolean, Dialog>;
|
11
|
+
}>({
|
12
|
+
onChange: "change",
|
13
|
+
}),
|
14
|
+
);
|
15
|
+
|
16
|
+
export * from "godown/dialog.js";
|
17
|
+
|
18
|
+
declare global {
|
19
|
+
namespace JSX {
|
20
|
+
interface IntrinsicElements {
|
21
|
+
"godown-dialog": IntrinsicElement<Dialog>;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
package/src/divider.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Divider from "godown/divider.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Divider);
|
8
|
+
|
9
|
+
export * from "godown/divider.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-divider": IntrinsicElement<Divider>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/dragbox.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Dragbox from "godown/dragbox.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Dragbox);
|
8
|
+
|
9
|
+
export * from "godown/dragbox.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-dragbox": IntrinsicElement<Dragbox>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/flex.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Flex from "godown/flex.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Flex);
|
8
|
+
|
9
|
+
export * from "godown/flex.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-flex": IntrinsicElement<Flex>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/form.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Form from "godown/form.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Form);
|
8
|
+
|
9
|
+
export * from "godown/form.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-form": IntrinsicElement<Form>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/grid.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Grid from "godown/grid.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Grid);
|
8
|
+
|
9
|
+
export * from "godown/grid.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-grid": IntrinsicElement<Grid>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/heading.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Heading from "godown/heading.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Heading);
|
8
|
+
|
9
|
+
export * from "godown/heading.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-heading": IntrinsicElement<Heading>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/index.ts
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
export { default as Alert } from "./alert.js";
|
2
|
+
export { default as Avatar } from "./avatar.js";
|
3
|
+
export { default as Badge } from "./badge.js";
|
4
|
+
export { default as Breath } from "./breath.js";
|
5
|
+
export { default as Button } from "./button.js";
|
6
|
+
export { default as Card } from "./card.js";
|
7
|
+
export { default as Carousel } from "./carousel.js";
|
8
|
+
export { default as Details } from "./details.js";
|
9
|
+
export { default as Dialog } from "./dialog.js";
|
10
|
+
export { default as Divider } from "./divider.js";
|
11
|
+
export { default as Dragbox } from "./dragbox.js";
|
12
|
+
export { default as Flex } from "./flex.js";
|
13
|
+
export { default as Form } from "./form.js";
|
14
|
+
export { default as Grid } from "./grid.js";
|
15
|
+
export { default as Heading } from "./heading.js";
|
16
|
+
export { default as Input } from "./input.js";
|
17
|
+
export { default as Layout } from "./layout.js";
|
18
|
+
export { default as Link } from "./link.js";
|
19
|
+
export { default as Progress } from "./progress.js";
|
20
|
+
export { default as Range } from "./range.js";
|
21
|
+
export { default as Rotate } from "./rotate.js";
|
22
|
+
export { default as Router } from "./router.js";
|
23
|
+
export { default as Select } from "./select.js";
|
24
|
+
export { default as Skeleton } from "./skeleton.js";
|
25
|
+
export { default as Split } from "./split.js";
|
26
|
+
export { default as Switch } from "./switch.js";
|
27
|
+
export { default as Tabs } from "./tabs.js";
|
28
|
+
export { default as Text } from "./text.js";
|
29
|
+
export { default as Time } from "./time.js";
|
30
|
+
export { default as Tooltip } from "./tooltip.js";
|
31
|
+
export { default as Typewriter } from "./typewriter.js";
|
package/src/input.ts
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
"use client";
|
2
|
+
import Input from "godown/input.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Input,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<string, Input>;
|
11
|
+
onInput: TargetedCustomEvent<string, Input>;
|
12
|
+
}>({
|
13
|
+
onChange: "change",
|
14
|
+
onInput: "input",
|
15
|
+
}),
|
16
|
+
);
|
17
|
+
|
18
|
+
export * from "godown/input.js";
|
19
|
+
|
20
|
+
declare global {
|
21
|
+
namespace JSX {
|
22
|
+
interface IntrinsicElements {
|
23
|
+
"godown-input": IntrinsicElement<Input>;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
package/src/layout.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Layout from "godown/layout.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Layout);
|
8
|
+
|
9
|
+
export * from "godown/layout.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-layout": IntrinsicElement<Layout>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { createComponent, type EventName } from "@lit/react";
|
2
|
+
import * as React from "react";
|
3
|
+
|
4
|
+
interface WithTagName<T> {
|
5
|
+
elementTagName?: string;
|
6
|
+
new(): T;
|
7
|
+
}
|
8
|
+
|
9
|
+
export type TargetedCustomEvent<D = any, T = HTMLElement> = Omit<CustomEvent<D>, "target"> & {
|
10
|
+
target: T;
|
11
|
+
};
|
12
|
+
|
13
|
+
type OrLower<N> = N extends string ? N | Lowercase<N> : never;
|
14
|
+
|
15
|
+
export const createReact = <G extends HTMLElement, E extends Record<string, any>>(
|
16
|
+
elementClass: WithTagName<G>,
|
17
|
+
events?: E,
|
18
|
+
) => {
|
19
|
+
return createComponent<G, E>({
|
20
|
+
elementClass,
|
21
|
+
tagName: elementClass.elementTagName,
|
22
|
+
react: React,
|
23
|
+
events,
|
24
|
+
});
|
25
|
+
};
|
26
|
+
|
27
|
+
export const eventMap = <T extends Record<string, any>>(
|
28
|
+
eMap: Record<keyof T, any>,
|
29
|
+
): Record<OrLower<keyof T>, EventName<T[keyof T]>> => {
|
30
|
+
if (!eMap) {
|
31
|
+
return;
|
32
|
+
}
|
33
|
+
for (const key in eMap) {
|
34
|
+
if (key === key.toLowerCase()) {
|
35
|
+
eMap[key] = undefined;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
return eMap;
|
39
|
+
};
|
40
|
+
|
41
|
+
export default createReact;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { WebComponentProps } from "@lit/react";
|
2
|
+
import type { DetailedHTMLProps, HTMLAttributes } from "react";
|
3
|
+
|
4
|
+
export type _IntrinsicElement<T extends HTMLElement> = DetailedHTMLProps<
|
5
|
+
HTMLAttributes<T> & Partial<Omit<T, keyof HTMLElement>>,
|
6
|
+
T
|
7
|
+
>;
|
8
|
+
export type IntrinsicElement<T extends HTMLElement> = WebComponentProps<T>;
|
9
|
+
export type IntrinsicTag<T extends keyof HTMLElementTagNameMap> = IntrinsicElement<HTMLElementTagNameMap[T]>;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* With `@types/react` 18.3.15+:
|
13
|
+
*
|
14
|
+
* ```ts
|
15
|
+
* import { type IntrinsicMap } from "@godown/react/lib/intrinsic.js";
|
16
|
+
*
|
17
|
+
* declare module "react" {
|
18
|
+
* namespace JSX {
|
19
|
+
* interface IntrinsicElements extends IntrinsicMap {}
|
20
|
+
* }
|
21
|
+
* }
|
22
|
+
* ```
|
23
|
+
*/
|
24
|
+
export type IntrinsicMap<K extends keyof HTMLElementTagNameMap = keyof HTMLElementTagNameMap> = {
|
25
|
+
[P in K]: IntrinsicTag<P>;
|
26
|
+
};
|
package/src/link.ts
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
"use client";
|
2
|
+
import Link from "godown/link.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Link,
|
9
|
+
eventMap<{
|
10
|
+
onNavigate: TargetedCustomEvent<
|
11
|
+
{
|
12
|
+
state: object;
|
13
|
+
pathname: string;
|
14
|
+
},
|
15
|
+
Link
|
16
|
+
>;
|
17
|
+
}>({
|
18
|
+
onNavigate: "navigate",
|
19
|
+
}),
|
20
|
+
);
|
21
|
+
|
22
|
+
export * from "godown/link.js";
|
23
|
+
|
24
|
+
declare global {
|
25
|
+
namespace JSX {
|
26
|
+
interface IntrinsicElements {
|
27
|
+
"godown-link": IntrinsicElement<Link>;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
package/src/progress.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Progress from "godown/progress.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Progress);
|
8
|
+
|
9
|
+
export * from "godown/progress.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-progress": IntrinsicElement<Progress>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/range.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use client";
|
2
|
+
import Range from "godown/range.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Range,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<string, Range>;
|
11
|
+
}>({
|
12
|
+
onChange: "change",
|
13
|
+
}),
|
14
|
+
);
|
15
|
+
|
16
|
+
export * from "godown/range.js";
|
17
|
+
|
18
|
+
declare global {
|
19
|
+
namespace JSX {
|
20
|
+
interface IntrinsicElements {
|
21
|
+
"godown-range": IntrinsicElement<Range>;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
package/src/rotate.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Rotate from "godown/rotate.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Rotate);
|
8
|
+
|
9
|
+
export * from "godown/rotate.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-rotate": IntrinsicElement<Rotate>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/router.ts
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
"use client";
|
2
|
+
import Router from "godown/router.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Router,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<
|
11
|
+
{
|
12
|
+
pathname: string;
|
13
|
+
params: Record<string, string>;
|
14
|
+
path: string;
|
15
|
+
component: unknown;
|
16
|
+
},
|
17
|
+
Router
|
18
|
+
>;
|
19
|
+
}>({
|
20
|
+
onChange: "change",
|
21
|
+
}),
|
22
|
+
);
|
23
|
+
|
24
|
+
export * from "godown/router.js";
|
25
|
+
|
26
|
+
declare global {
|
27
|
+
namespace JSX {
|
28
|
+
interface IntrinsicElements {
|
29
|
+
"godown-router": IntrinsicElement<Router>;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
package/src/select.ts
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
"use client";
|
2
|
+
import Select from "godown/select.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Select,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<string, Select>;
|
11
|
+
onInput: TargetedCustomEvent<string, Select>;
|
12
|
+
onSelect: TargetedCustomEvent<string | string[], Select>;
|
13
|
+
}>({
|
14
|
+
onInput: "input",
|
15
|
+
onChange: "change",
|
16
|
+
onSelect: "select",
|
17
|
+
}),
|
18
|
+
);
|
19
|
+
|
20
|
+
export * from "godown/select.js";
|
21
|
+
|
22
|
+
declare global {
|
23
|
+
namespace JSX {
|
24
|
+
interface IntrinsicElements {
|
25
|
+
"godown-select": IntrinsicElement<Select>;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
package/src/skeleton.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Skeleton from "godown/skeleton.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Skeleton);
|
8
|
+
|
9
|
+
export * from "godown/skeleton.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-skeleton": IntrinsicElement<Skeleton>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
package/src/split.ts
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
"use client";
|
2
|
+
import Split from "godown/split.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Split,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<string, Split>;
|
11
|
+
onInput: TargetedCustomEvent<string, Split>;
|
12
|
+
}>({
|
13
|
+
onChange: "change",
|
14
|
+
onInput: "input",
|
15
|
+
}),
|
16
|
+
);
|
17
|
+
|
18
|
+
export * from "godown/split.js";
|
19
|
+
|
20
|
+
declare global {
|
21
|
+
namespace JSX {
|
22
|
+
interface IntrinsicElements {
|
23
|
+
"godown-split": IntrinsicElement<Split>;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
package/src/switch.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use client";
|
2
|
+
import Switch from "godown/switch.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Switch,
|
9
|
+
eventMap<{
|
10
|
+
onChange: TargetedCustomEvent<boolean, Switch>;
|
11
|
+
}>({
|
12
|
+
onChange: "change",
|
13
|
+
}),
|
14
|
+
);
|
15
|
+
|
16
|
+
export * from "godown/switch.js";
|
17
|
+
|
18
|
+
declare global {
|
19
|
+
namespace JSX {
|
20
|
+
interface IntrinsicElements {
|
21
|
+
"godown-switch": IntrinsicElement<Switch>;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
package/src/tabs.ts
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
"use client";
|
2
|
+
import Tabs from "godown/tabs.js";
|
3
|
+
|
4
|
+
import { createReact, eventMap, type TargetedCustomEvent } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(
|
8
|
+
Tabs,
|
9
|
+
eventMap<{
|
10
|
+
onSelect: TargetedCustomEvent<number, Tabs>;
|
11
|
+
}>({
|
12
|
+
onSelect: "select",
|
13
|
+
}),
|
14
|
+
);
|
15
|
+
|
16
|
+
export * from "godown/tabs.js";
|
17
|
+
|
18
|
+
declare global {
|
19
|
+
namespace JSX {
|
20
|
+
interface IntrinsicElements {
|
21
|
+
"godown-tabs": IntrinsicElement<Tabs>;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
package/src/text.ts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use client";
|
2
|
+
import Text from "godown/text.js";
|
3
|
+
|
4
|
+
import { createReact } from "./lib/create.js";
|
5
|
+
import type { IntrinsicElement } from "./lib/intrinsic.js";
|
6
|
+
|
7
|
+
export default createReact(Text);
|
8
|
+
|
9
|
+
export * from "godown/text.js";
|
10
|
+
|
11
|
+
declare global {
|
12
|
+
namespace JSX {
|
13
|
+
interface IntrinsicElements {
|
14
|
+
"godown-text": IntrinsicElement<Text>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|