@nextui-org/react 1.0.1-alpha.30 → 1.0.1-alpha.34

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 CHANGED
@@ -17,52 +17,44 @@
17
17
  </a>
18
18
  </p>
19
19
 
20
- ## Browser support
20
+ ## Getting Started
21
21
 
22
- Recent versions of Firefox, Chrome, Edge, Opera and Safari. IE11+
22
+ Visit <a aria-label="nextui learn" href="https://nextui.org/learn">https://nextui.org/guide</a> to get started with NextUI.
23
23
 
24
- ## Supporting through Patreon
24
+ ## Documentation
25
25
 
26
- Any additional information goes here
26
+ Visit [https://nextui.org/docs](https://nextui.org/docs) to view the full documentation.
27
27
 
28
- ## Introduction
28
+ ## Quick Start
29
29
 
30
- A brief description of what this project does and who it's for
31
-
32
- ## Support
33
-
34
- If you feel awesome and want to support us in a small way, please consider starring and sharing the repo! This helps us getting known and grow the community. 🙏
35
-
36
- ## Installation
37
-
38
- Install my-project with npm
30
+ 1. Installation: Inside your React project directory, install NextUI by running either of the following:
39
31
 
40
32
  ```bash
41
- npm install my-project
42
- cd my-project
33
+ yarn add @nextui-org/react
34
+ # or
35
+ npm i @nextui-org/react
43
36
  ```
44
37
 
45
- ## Components
38
+ 2. Setup: For NextUI to work correctly, you need to set up the CssBaseline at the root of your application.
46
39
 
47
- You can also view all developed components in [Storybook](https://linktodocumentation)
40
+ Go to the root of your application and do this:
48
41
 
49
- - [Component 1](https://linktodocumentation)
50
- - [Component 2](https://linktodocumentation)
51
- - [Component 3](https://linktodocumentation)
52
- - [Component 4](https://linktodocumentation)
53
- - [Component 5](https://linktodocumentation)
54
- - [Component 6](https://linktodocumentation)
55
- - [Component 7](https://linktodocumentation)
56
- - [Component 8](https://linktodocumentation)
42
+ ```jsx
43
+ import { CssBaseline } from '@nextui-org/react';
57
44
 
58
- ## Usage/Examples
45
+ const Application = () => (
46
+ <>
47
+ <CssBaseline /> // ---> Normalize styles
48
+ <AppComponent /> // ---> Your App Component
49
+ </>
50
+ );
51
+ ```
59
52
 
60
- ```javascript
61
- import Component from 'my-project';
53
+ 3. Using NextUI components: Once NextUI is installed you can use any of the components as follows.
62
54
 
63
- function App() {
64
- return <Component />;
65
- }
55
+ ```jsx
56
+ import { Button } from '@next-ui/react';
57
+ const Component = () => <Button>Click me</Button>;
66
58
  ```
67
59
 
68
60
  ## Contributing
@@ -73,13 +65,6 @@ See `CONTRIBUTING.md` for ways to get started.
73
65
 
74
66
  Please adhere to this project's `CODE_OF_CONDUCT`.
75
67
 
76
- ## Related
77
-
78
- Here are some related projects
79
-
80
- - [Vuesax](https://github.com/matiassingers/awesome-readme)
81
- - [Geist UI](https://github.com/matiassingers/awesome-readme)
82
-
83
68
  ## License
84
69
 
85
70
  [MIT](https://choosealicense.com/licenses/mit/)
@@ -11,7 +11,7 @@ interface Props {
11
11
  animated?: boolean;
12
12
  rounded?: boolean;
13
13
  ghost?: boolean;
14
- weight?: NormalWeights;
14
+ borderWeight?: NormalWeights;
15
15
  size?: NormalSizes;
16
16
  color?: NormalColors;
17
17
  className?: string;
@@ -27,7 +27,7 @@ declare const defaultProps: {
27
27
  animated: boolean;
28
28
  rounded: boolean;
29
29
  ghost: boolean;
30
- weight: "light" | "normal" | "bold";
30
+ borderWeight: "light" | "normal" | "bold" | undefined;
31
31
  size: "mini" | "small" | "medium" | "large" | "xlarge";
32
32
  color: "default" | "primary" | "secondary" | "success" | "warning" | "error" | "gradient";
33
33
  className: string;
@@ -45,9 +45,9 @@ declare const _default: React.ComponentType<Partial<{
45
45
  animated: boolean;
46
46
  rounded: boolean;
47
47
  ghost: boolean;
48
- weight: "light" | "normal" | "bold";
48
+ borderWeight: "light" | "normal" | "bold" | undefined;
49
49
  size: "mini" | "small" | "medium" | "large" | "xlarge";
50
50
  color: "default" | "primary" | "secondary" | "success" | "warning" | "error" | "gradient";
51
51
  className: string;
52
- }> & Omit<ButtonGroupProps, "light" | "className" | "animated" | "color" | "vertical" | "bordered" | "size" | "auto" | "weight" | "flat" | "disabled" | "rounded" | "shadow" | "ghost">>;
52
+ }> & Omit<ButtonGroupProps, "light" | "className" | "animated" | "color" | "vertical" | "bordered" | "size" | "auto" | "flat" | "disabled" | "rounded" | "shadow" | "ghost" | "borderWeight">>;
53
53
  export default _default;
@@ -14,7 +14,7 @@ export interface Props {
14
14
  disabled?: boolean;
15
15
  bordered?: boolean;
16
16
  ghost?: boolean;
17
- weight?: NormalWeights;
17
+ borderWeight?: NormalWeights;
18
18
  loaderType?: NormalLoaders;
19
19
  htmlType?: React.ButtonHTMLAttributes<unknown>['type'];
20
20
  icon?: React.ReactNode;
@@ -28,7 +28,7 @@ declare const defaultProps: {
28
28
  size: "mini" | "small" | "medium" | "large" | "xlarge";
29
29
  htmlType: "button" | "reset" | "submit" | undefined;
30
30
  loaderType: "default" | "gradient" | "points" | "points-opacity" | "spinner";
31
- weight: "light" | "normal" | "bold";
31
+ borderWeight: "light" | "normal" | "bold" | undefined;
32
32
  flat: boolean;
33
33
  light: boolean;
34
34
  loading: boolean;
@@ -35,6 +35,5 @@ export declare const getButtonColors: (palette: NextUIThemesPalette, props: Butt
35
35
  export declare const getLoadingSize: (size: NormalSizes) => NormalSizes;
36
36
  export declare const getLoadingBackground: (palette: NextUIThemesPalette, color: NormalColors | string) => string | null;
37
37
  export declare const getButtonCursor: (disabled: boolean, loading: boolean) => ButtonCursorGroup;
38
- export declare const getButtonRadius: (size: NormalSizes, rounded?: boolean | undefined) => string;
39
38
  export declare const getButtonSize: (size: "mini" | "small" | "medium" | "large" | "xlarge" | undefined, auto: boolean) => ButtonSizeGroup;
40
39
  export declare const getButtonDripColor: (palette: NextUIThemesPalette, props: ButtonProps) => string;
@@ -19,3 +19,4 @@ export { default as Code } from './code';
19
19
  export { default as Container } from './container';
20
20
  export { default as Snippet } from './snippet';
21
21
  export { default as Tooltip } from './tooltip';
22
+ export { default as Input } from './input';
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ interface Props {
3
+ width?: number;
4
+ height?: number;
5
+ size?: number;
6
+ fill?: string;
7
+ }
8
+ declare const _default: React.ComponentType<Partial<{
9
+ width: number;
10
+ height: number;
11
+ }> & Omit<Props, "height" | "width">>;
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import Input from './input';
2
+ export default Input;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { SimpleColors } from '../../utils/prop-types';
3
+ export interface InputBlockLabelLabel {
4
+ label: string;
5
+ htmlFor: string;
6
+ color?: string;
7
+ animated?: boolean;
8
+ bordered?: boolean;
9
+ selfValue?: string;
10
+ hasLeftContent?: boolean;
11
+ asPlaceholder?: boolean;
12
+ status?: SimpleColors;
13
+ placeholderColor?: string;
14
+ heightRatio?: string | undefined;
15
+ hover?: boolean;
16
+ }
17
+ declare const MemoInputBlockLabel: React.NamedExoticComponent<InputBlockLabelLabel>;
18
+ export default MemoInputBlockLabel;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { ContentPosition, SimpleColors } from '../../utils/prop-types';
3
+ export interface InputContentProps {
4
+ content: React.ReactNode;
5
+ ratio: string;
6
+ clickable: boolean;
7
+ onClick: (key: ContentPosition, e: React.MouseEvent<HTMLDivElement>) => void;
8
+ applyStyles?: boolean;
9
+ isLeft?: boolean;
10
+ hover?: boolean;
11
+ status?: SimpleColors;
12
+ }
13
+ declare const MemoContentIcon: React.NamedExoticComponent<InputContentProps>;
14
+ export default MemoContentIcon;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { SimpleColors } from '../../utils/prop-types';
3
+ interface Props {
4
+ visible: boolean;
5
+ hasContentRight?: boolean;
6
+ status?: SimpleColors;
7
+ onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
8
+ heightRatio?: string | undefined;
9
+ disabled?: boolean;
10
+ }
11
+ declare const MemoInputIconClear: React.NamedExoticComponent<Props>;
12
+ export default MemoInputIconClear;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { SimpleColors } from '../../utils/prop-types';
3
+ export interface InputLabelProps {
4
+ fontSize: string;
5
+ status?: SimpleColors;
6
+ bgColor?: string;
7
+ color?: string;
8
+ radius?: string;
9
+ isRight?: boolean;
10
+ bordered?: boolean;
11
+ underlined?: boolean;
12
+ borderWeight?: string;
13
+ }
14
+ declare const MemoInputLabel: React.NamedExoticComponent<React.PropsWithChildren<InputLabelProps>>;
15
+ export default MemoInputLabel;
@@ -0,0 +1,87 @@
1
+ import React from 'react';
2
+ import { Props } from './input-props';
3
+ interface PasswordProps extends Props {
4
+ hideToggle?: boolean;
5
+ visibleIcon?: React.ReactNode;
6
+ hiddenIcon?: React.ReactNode;
7
+ }
8
+ declare const passwordDefaultProps: {
9
+ hideToggle: boolean;
10
+ visibleIcon: JSX.Element;
11
+ hiddenIcon: JSX.Element;
12
+ disabled: boolean;
13
+ bordered: boolean;
14
+ readOnly: boolean;
15
+ clearable: boolean;
16
+ rounded: boolean;
17
+ animated: boolean;
18
+ underlined: boolean;
19
+ shadow: boolean;
20
+ contentClickable: boolean;
21
+ contentRightStyling: boolean;
22
+ contentLeftStyling: boolean;
23
+ required: boolean;
24
+ width: string;
25
+ size: "mini" | "small" | "medium" | "large" | "xlarge";
26
+ color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
27
+ status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
28
+ borderWeight: "light" | "normal" | "bold";
29
+ autoComplete: string;
30
+ className: string;
31
+ placeholder: string;
32
+ initialValue: string;
33
+ };
34
+ declare type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof PasswordProps>;
35
+ export declare type InputPasswordProps = PasswordProps & typeof passwordDefaultProps & NativeAttrs;
36
+ declare const _default: React.ComponentType<Partial<{
37
+ hideToggle: boolean;
38
+ visibleIcon: JSX.Element;
39
+ hiddenIcon: JSX.Element;
40
+ disabled: boolean;
41
+ bordered: boolean;
42
+ readOnly: boolean;
43
+ clearable: boolean;
44
+ rounded: boolean;
45
+ animated: boolean;
46
+ underlined: boolean;
47
+ shadow: boolean;
48
+ contentClickable: boolean;
49
+ contentRightStyling: boolean;
50
+ contentLeftStyling: boolean;
51
+ required: boolean;
52
+ width: string;
53
+ size: "mini" | "small" | "medium" | "large" | "xlarge";
54
+ color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
55
+ status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
56
+ borderWeight: "light" | "normal" | "bold";
57
+ autoComplete: string;
58
+ className: string;
59
+ placeholder: string;
60
+ initialValue: string;
61
+ }> & Omit<PasswordProps & {
62
+ hideToggle: boolean;
63
+ visibleIcon: JSX.Element;
64
+ hiddenIcon: JSX.Element;
65
+ disabled: boolean;
66
+ bordered: boolean;
67
+ readOnly: boolean;
68
+ clearable: boolean;
69
+ rounded: boolean;
70
+ animated: boolean;
71
+ underlined: boolean;
72
+ shadow: boolean;
73
+ contentClickable: boolean;
74
+ contentRightStyling: boolean;
75
+ contentLeftStyling: boolean;
76
+ required: boolean;
77
+ width: string;
78
+ size: "mini" | "small" | "medium" | "large" | "xlarge";
79
+ color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
80
+ status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
81
+ borderWeight: "light" | "normal" | "bold";
82
+ autoComplete: string;
83
+ className: string;
84
+ placeholder: string;
85
+ initialValue: string;
86
+ } & NativeAttrs & React.RefAttributes<HTMLInputElement>, "className" | "animated" | "placeholder" | "color" | "status" | "bordered" | "size" | "width" | "disabled" | "rounded" | "autoComplete" | "readOnly" | "required" | "initialValue" | "shadow" | "borderWeight" | "underlined" | "hideToggle" | "visibleIcon" | "hiddenIcon" | "contentClickable" | "contentRightStyling" | "contentLeftStyling" | "clearable">>;
87
+ export default _default;
@@ -0,0 +1,62 @@
1
+ import { NormalWeights } from './../../utils/prop-types';
2
+ import React from 'react';
3
+ import { NormalSizes, SimpleColors, ContentPosition } from '../../utils/prop-types';
4
+ export interface Props {
5
+ value?: string;
6
+ initialValue?: string;
7
+ placeholder?: string;
8
+ size?: NormalSizes;
9
+ color?: SimpleColors;
10
+ status?: SimpleColors;
11
+ readOnly?: boolean;
12
+ shadow?: boolean;
13
+ animated?: boolean;
14
+ disabled?: boolean;
15
+ required?: boolean;
16
+ label?: string;
17
+ helperText?: string;
18
+ labelPlaceholder?: string;
19
+ labelLeft?: string;
20
+ labelRight?: string;
21
+ contentLeft?: React.ReactNode;
22
+ contentRight?: React.ReactNode;
23
+ contentClickable?: boolean;
24
+ contentRightStyling?: boolean;
25
+ contentLeftStyling?: boolean;
26
+ rounded?: boolean;
27
+ bordered?: boolean;
28
+ underlined?: boolean;
29
+ borderWeight?: NormalWeights;
30
+ width?: string;
31
+ className?: string;
32
+ clearable?: boolean;
33
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
34
+ onClearClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
35
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
36
+ onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
37
+ onContentClick?: (key: ContentPosition, e: React.MouseEvent<HTMLDivElement>) => void;
38
+ autoComplete?: string;
39
+ }
40
+ export declare const defaultProps: {
41
+ disabled: boolean;
42
+ bordered: boolean;
43
+ readOnly: boolean;
44
+ clearable: boolean;
45
+ rounded: boolean;
46
+ animated: boolean;
47
+ underlined: boolean;
48
+ shadow: boolean;
49
+ contentClickable: boolean;
50
+ contentRightStyling: boolean;
51
+ contentLeftStyling: boolean;
52
+ required: boolean;
53
+ width: string;
54
+ size: "mini" | "small" | "medium" | "large" | "xlarge";
55
+ color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
56
+ status: "default" | "primary" | "secondary" | "success" | "warning" | "error";
57
+ borderWeight: "light" | "normal" | "bold";
58
+ autoComplete: string;
59
+ className: string;
60
+ placeholder: string;
61
+ initialValue: string;
62
+ };
@@ -0,0 +1,13 @@
1
+ import React, { PropsWithoutRef, RefAttributes } from 'react';
2
+ import Textarea from '../textarea/textarea';
3
+ import InputPassword from './input-password';
4
+ import { Props, defaultProps } from './input-props';
5
+ declare type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof Props>;
6
+ export declare type InputProps = Props & typeof defaultProps & NativeAttrs;
7
+ declare type InputComponent<T, P = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> & {
8
+ Textarea: typeof Textarea;
9
+ Password: typeof InputPassword;
10
+ };
11
+ declare type ComponentProps = Partial<typeof defaultProps> & Omit<Props, keyof typeof defaultProps> & NativeAttrs;
12
+ declare const _default: InputComponent<HTMLInputElement, ComponentProps>;
13
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ visible: boolean;
4
+ }
5
+ declare const MemoPasswordIcon: React.NamedExoticComponent<Props>;
6
+ export default MemoPasswordIcon;
@@ -0,0 +1,17 @@
1
+ import { NextUIThemes, NextUIThemesPalette } from '../../theme/index';
2
+ export declare type InputSize = {
3
+ heightRatio: string;
4
+ fontSize: string;
5
+ };
6
+ export declare const getSizes: (size?: "mini" | "small" | "medium" | "large" | "xlarge" | undefined) => InputSize;
7
+ export declare type InputColor = {
8
+ bgColor: string;
9
+ color: string;
10
+ placeholderColor: string;
11
+ helperColor: string;
12
+ borderColor: string;
13
+ hoverBorder: string;
14
+ shadowColor: string;
15
+ };
16
+ export declare const getShadowColor: (palette: NextUIThemesPalette, color?: "default" | "primary" | "secondary" | "success" | "warning" | "error" | undefined) => string;
17
+ export declare const getColors: (theme: NextUIThemes, color?: "default" | "primary" | "secondary" | "success" | "warning" | "error" | undefined, status?: "default" | "primary" | "secondary" | "success" | "warning" | "error" | undefined) => InputColor;
@@ -7,6 +7,9 @@ interface Props {
7
7
  filled?: boolean;
8
8
  width?: string;
9
9
  bordered?: boolean;
10
+ showTooltip?: boolean;
11
+ tooltipCopyText?: string;
12
+ tooltipCopiedText?: string;
10
13
  copy?: CopyTypes;
11
14
  type?: SnippetTypes;
12
15
  className?: string;
@@ -14,11 +17,14 @@ interface Props {
14
17
  declare const defaultProps: {
15
18
  filled: boolean;
16
19
  bordered: boolean;
20
+ showTooltip: boolean;
17
21
  symbol: string;
18
22
  toastText: string;
19
23
  width: string;
20
24
  copy: "default" | "slient" | "prevent";
21
25
  type: "default" | "primary" | "secondary" | "success" | "warning" | "error" | "gradient" | "invert";
26
+ tooltipCopyText: string;
27
+ tooltipCopiedText: string;
22
28
  className: string;
23
29
  };
24
30
  declare type NativeAttrs = Omit<React.HTMLAttributes<unknown>, keyof Props>;
@@ -26,11 +32,14 @@ export declare type SnippetProps = Props & typeof defaultProps & NativeAttrs;
26
32
  declare const _default: React.ComponentType<Partial<{
27
33
  filled: boolean;
28
34
  bordered: boolean;
35
+ showTooltip: boolean;
29
36
  symbol: string;
30
37
  toastText: string;
31
38
  width: string;
32
39
  copy: "default" | "slient" | "prevent";
33
40
  type: "default" | "primary" | "secondary" | "success" | "warning" | "error" | "gradient" | "invert";
41
+ tooltipCopyText: string;
42
+ tooltipCopiedText: string;
34
43
  className: string;
35
- }> & Omit<SnippetProps, "symbol" | "type" | "className" | "copy" | "bordered" | "width" | "filled" | "toastText">>;
44
+ }> & Omit<SnippetProps, "symbol" | "type" | "className" | "copy" | "bordered" | "width" | "filled" | "toastText" | "showTooltip" | "tooltipCopyText" | "tooltipCopiedText">>;
36
45
  export default _default;
@@ -0,0 +1,2 @@
1
+ import Textarea from './textarea';
2
+ export default Textarea;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { SimpleColors } from '../../utils/prop-types';
3
+ interface Props {
4
+ value?: string;
5
+ initialValue?: string;
6
+ placeholder?: string;
7
+ color?: SimpleColors;
8
+ width?: string;
9
+ minHeight?: string;
10
+ disabled?: boolean;
11
+ readOnly?: boolean;
12
+ onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
13
+ onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
14
+ onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
15
+ className?: string;
16
+ }
17
+ declare const defaultProps: {
18
+ initialValue: string;
19
+ color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
20
+ width: string;
21
+ minHeight: string;
22
+ disabled: boolean;
23
+ readOnly: boolean;
24
+ className: string;
25
+ };
26
+ declare type NativeAttrs = Omit<React.TextareaHTMLAttributes<any>, keyof Props>;
27
+ export declare type TextareaProps = Props & typeof defaultProps & NativeAttrs;
28
+ declare const _default: React.ComponentType<Partial<{
29
+ initialValue: string;
30
+ color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
31
+ width: string;
32
+ minHeight: string;
33
+ disabled: boolean;
34
+ readOnly: boolean;
35
+ className: string;
36
+ }> & Omit<Props & {
37
+ initialValue: string;
38
+ color: "default" | "primary" | "secondary" | "success" | "warning" | "error";
39
+ width: string;
40
+ minHeight: string;
41
+ disabled: boolean;
42
+ readOnly: boolean;
43
+ className: string;
44
+ } & NativeAttrs & React.RefAttributes<HTMLTextAreaElement>, "className" | "color" | "width" | "disabled" | "readOnly" | "initialValue" | "minHeight">>;
45
+ export default _default;
@@ -52,5 +52,5 @@ declare const _default: React.ComponentType<Partial<{
52
52
  className: string;
53
53
  portalClassName: string;
54
54
  onVisibleChange: TooltipOnVisibleChange;
55
- }> & Omit<React.PropsWithChildren<TooltipProps>, "className" | "color" | "textColor" | "rounded" | "shadow" | "offset" | "position" | "hideArrow" | "initialVisible" | "trigger" | "enterDelay" | "leaveDelay" | "portalClassName" | "onVisibleChange">>;
55
+ }> & Omit<React.PropsWithChildren<TooltipProps>, "className" | "color" | "textColor" | "rounded" | "shadow" | "offset" | "position" | "initialVisible" | "hideArrow" | "trigger" | "enterDelay" | "leaveDelay" | "portalClassName" | "onVisibleChange">>;
56
56
  export default _default;
@@ -7,3 +7,4 @@ export { default as useSSR } from './use-ssr';
7
7
  export { default as useBodyScroll } from './use-body-scroll';
8
8
  export { default as useClickAway } from './use-click-away';
9
9
  export { default as useClickAnywhere } from './use-click-anywhere';
10
+ export { default as useInput } from './use-input';
@@ -0,0 +1,13 @@
1
+ import React, { Dispatch, MutableRefObject, SetStateAction } from 'react';
2
+ export declare type BindingsChangeTarget = React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | string;
3
+ declare const useInput: (initialValue: string) => {
4
+ value: string;
5
+ setValue: Dispatch<SetStateAction<string>>;
6
+ currentRef: MutableRefObject<string>;
7
+ reset: () => void;
8
+ bindings: {
9
+ value: string;
10
+ onChange: (event: BindingsChangeTarget) => void;
11
+ };
12
+ };
13
+ export default useInput;