reykit 1.0.26 → 1.0.28

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.
@@ -0,0 +1,18 @@
1
+ import { ReactNode, ComponentProps, MouseEvent } from 'react';
2
+ /**
3
+ * Button component of cycle display children.
4
+ *
5
+ * Parameters
6
+ * ----------
7
+ * @param data Children dictionary.
8
+ *
9
+ * Returns
10
+ * -------
11
+ * @returns React element.
12
+ */
13
+ export default function CycleButton({ data, onClick, ...props }: {
14
+ data: {
15
+ children: ReactNode;
16
+ handleClick: (event: MouseEvent<HTMLButtonElement>) => void;
17
+ }[];
18
+ } & ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
@@ -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 }: ComponentProps<'form'> & {
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;
package/dist/hook.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Hook of count number.
3
+ *
4
+ * Parameters
5
+ * ----------
6
+ * @param start Start number.
7
+ * @param step Count step.
8
+ * @param stop Stop number.
9
+ * @param loop Whether to loop count.
10
+ *
11
+ * Returns
12
+ * -------
13
+ * @returns Returns a stateful count value, and a function to automatic count it.
14
+ */
15
+ export declare function useCount(start?: number, step?: number, stop?: number, loop?: boolean): [number, () => void];
16
+ /**
17
+ * Hook of count array index.
18
+ *
19
+ * Parameters
20
+ * ----------
21
+ * @param array Array.
22
+ * @param loop Whether to loop count.
23
+ *
24
+ * Returns
25
+ * -------
26
+ * @returns Returns a stateful index value, and a function to automatic count it.
27
+ */
28
+ export declare function useIndex(array: any[], loop?: boolean): [number, () => void];
package/dist/index.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import { default as Form } from './component/Form';
2
+ import { default as CycleButton } from './component/CycleButton';
3
+ import { useCount } from './hook';
2
4
  import { renderReact } from './react';
3
5
  import { default as Storager } from './storage';
4
6
  import { cn } from './tailwindcss';
5
7
  declare const _default: {
6
8
  Form: typeof Form;
9
+ CycleButton: typeof CycleButton;
10
+ useCount: typeof useCount;
7
11
  renderReact: typeof renderReact;
8
12
  Storager: typeof Storager;
9
13
  cn: typeof cn;