reykit 1.0.27 → 1.0.29
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/component/Button.d.ts +21 -0
- package/dist/component/Form.d.ts +2 -2
- package/dist/component/Toggle.d.ts +19 -0
- package/dist/hook.d.ts +41 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +4183 -4134
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode, ComponentProps, MouseEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Button component of cycle display children.
|
|
4
|
+
*
|
|
5
|
+
* Parameters
|
|
6
|
+
* ----------
|
|
7
|
+
* @param childrens Children array.
|
|
8
|
+
* @param handleCycle Handle cycle.
|
|
9
|
+
*
|
|
10
|
+
* Returns
|
|
11
|
+
* -------
|
|
12
|
+
* @returns React element.
|
|
13
|
+
*/
|
|
14
|
+
export declare function CycleButton({ childrens, handleCycle, onClick, ...props }: {
|
|
15
|
+
childrens: ReactNode[];
|
|
16
|
+
handleCycle: (index: number) => void;
|
|
17
|
+
data: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
handleClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
20
|
+
}[];
|
|
21
|
+
} & ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
|
package/dist/component/Form.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { ComponentProps } from 'react';
|
|
|
11
11
|
* -------
|
|
12
12
|
* @returns React element.
|
|
13
13
|
*/
|
|
14
|
-
export default function Form({ handleFormData, link, onSubmit, ...props }:
|
|
14
|
+
export default function Form({ handleFormData, link, onSubmit, ...props }: {
|
|
15
15
|
handleFormData?: (formData: FormData) => void;
|
|
16
16
|
link?: string;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
} & ComponentProps<'form'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode, ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Toggle component of with icon.
|
|
4
|
+
*
|
|
5
|
+
* Parameters
|
|
6
|
+
* ----------
|
|
7
|
+
* @param childrens Children array.
|
|
8
|
+
* @param handleCycle Handle cycle.
|
|
9
|
+
*
|
|
10
|
+
* Returns
|
|
11
|
+
* -------
|
|
12
|
+
* @returns React element.
|
|
13
|
+
*/
|
|
14
|
+
export declare function IconToggle({ openIcon, closeIcon, handleOpen, defaultOpen, onClick, ...props }: {
|
|
15
|
+
openIcon: ReactNode;
|
|
16
|
+
closeIcon: ReactNode;
|
|
17
|
+
handleOpen: (open: boolean) => void;
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
} & ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
|
package/dist/hook.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook of toggle.
|
|
3
|
+
*
|
|
4
|
+
* Parameters
|
|
5
|
+
* ----------
|
|
6
|
+
* @param array Array.
|
|
7
|
+
* @param loop Whether to loop count.
|
|
8
|
+
*
|
|
9
|
+
* Returns
|
|
10
|
+
* -------
|
|
11
|
+
* @returns Returns a stateful open value, and a function to automatic count it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useOpen(defaultOpen?: boolean): [boolean, () => void];
|
|
14
|
+
/**
|
|
15
|
+
* Hook of count number.
|
|
16
|
+
*
|
|
17
|
+
* Parameters
|
|
18
|
+
* ----------
|
|
19
|
+
* @param start Start number.
|
|
20
|
+
* @param step Count step.
|
|
21
|
+
* @param stop Stop number.
|
|
22
|
+
* @param loop Whether to loop count.
|
|
23
|
+
*
|
|
24
|
+
* Returns
|
|
25
|
+
* -------
|
|
26
|
+
* @returns Returns a stateful count value, and a function to automatic count it.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useCount(start?: number, step?: number, stop?: number, loop?: boolean): [number, () => void];
|
|
29
|
+
/**
|
|
30
|
+
* Hook of count array index.
|
|
31
|
+
*
|
|
32
|
+
* Parameters
|
|
33
|
+
* ----------
|
|
34
|
+
* @param array Array.
|
|
35
|
+
* @param loop Whether to loop count.
|
|
36
|
+
*
|
|
37
|
+
* Returns
|
|
38
|
+
* -------
|
|
39
|
+
* @returns Returns a stateful index value, and a function to automatic count it.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useIndex(array: any[], loop?: boolean): [number, () => void];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
import { CycleButton } from './component/Button';
|
|
1
2
|
import { default as Form } from './component/Form';
|
|
3
|
+
import { IconToggle } from './component/Toggle';
|
|
4
|
+
import { useOpen, useCount, useIndex } from './hook';
|
|
2
5
|
import { renderReact } from './react';
|
|
3
6
|
import { default as Storager } from './storage';
|
|
4
7
|
import { cn } from './tailwindcss';
|
|
5
8
|
declare const _default: {
|
|
9
|
+
CycleButton: typeof CycleButton;
|
|
6
10
|
Form: typeof Form;
|
|
11
|
+
IconToggle: typeof IconToggle;
|
|
12
|
+
useOpen: typeof useOpen;
|
|
13
|
+
useCount: typeof useCount;
|
|
14
|
+
useIndex: typeof useIndex;
|
|
7
15
|
renderReact: typeof renderReact;
|
|
8
16
|
Storager: typeof Storager;
|
|
9
17
|
cn: typeof cn;
|