zenput 1.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/LICENSE +21 -0
- package/README.md +271 -0
- package/dist/cjs/index.js +1126 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/AutoComplete/AutoComplete.d.ts +3 -0
- package/dist/cjs/types/components/AutoComplete/AutoComplete.types.d.ts +27 -0
- package/dist/cjs/types/components/AutoComplete/index.d.ts +2 -0
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/cjs/types/components/Checkbox/Checkbox.types.d.ts +6 -0
- package/dist/cjs/types/components/Checkbox/index.d.ts +2 -0
- package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
- package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.types.d.ts +20 -0
- package/dist/cjs/types/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/cjs/types/components/ColorInput/ColorInput.d.ts +3 -0
- package/dist/cjs/types/components/ColorInput/ColorInput.types.d.ts +6 -0
- package/dist/cjs/types/components/ColorInput/index.d.ts +2 -0
- package/dist/cjs/types/components/DataTable/DataTable.d.ts +5 -0
- package/dist/cjs/types/components/DataTable/DataTable.types.d.ts +31 -0
- package/dist/cjs/types/components/DataTable/index.d.ts +2 -0
- package/dist/cjs/types/components/DateInput/DateInput.d.ts +3 -0
- package/dist/cjs/types/components/DateInput/DateInput.types.d.ts +8 -0
- package/dist/cjs/types/components/DateInput/index.d.ts +2 -0
- package/dist/cjs/types/components/FileInput/FileInput.d.ts +3 -0
- package/dist/cjs/types/components/FileInput/FileInput.types.d.ts +10 -0
- package/dist/cjs/types/components/FileInput/index.d.ts +2 -0
- package/dist/cjs/types/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/cjs/types/components/NumberInput/NumberInput.types.d.ts +18 -0
- package/dist/cjs/types/components/NumberInput/index.d.ts +2 -0
- package/dist/cjs/types/components/OTPInput/OTPInput.d.ts +3 -0
- package/dist/cjs/types/components/OTPInput/OTPInput.types.d.ts +20 -0
- package/dist/cjs/types/components/OTPInput/index.d.ts +2 -0
- package/dist/cjs/types/components/PasswordInput/PasswordInput.d.ts +3 -0
- package/dist/cjs/types/components/PasswordInput/PasswordInput.types.d.ts +10 -0
- package/dist/cjs/types/components/PasswordInput/index.d.ts +2 -0
- package/dist/cjs/types/components/PhoneInput/PhoneInput.d.ts +3 -0
- package/dist/cjs/types/components/PhoneInput/PhoneInput.types.d.ts +20 -0
- package/dist/cjs/types/components/PhoneInput/index.d.ts +2 -0
- package/dist/cjs/types/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/cjs/types/components/RadioGroup/RadioGroup.types.d.ts +22 -0
- package/dist/cjs/types/components/RadioGroup/index.d.ts +2 -0
- package/dist/cjs/types/components/RangeInput/RangeInput.d.ts +3 -0
- package/dist/cjs/types/components/RangeInput/RangeInput.types.d.ts +14 -0
- package/dist/cjs/types/components/RangeInput/index.d.ts +2 -0
- package/dist/cjs/types/components/SearchInput/SearchInput.d.ts +3 -0
- package/dist/cjs/types/components/SearchInput/SearchInput.types.d.ts +10 -0
- package/dist/cjs/types/components/SearchInput/index.d.ts +2 -0
- package/dist/cjs/types/components/SelectInput/SelectInput.d.ts +3 -0
- package/dist/cjs/types/components/SelectInput/SelectInput.types.d.ts +13 -0
- package/dist/cjs/types/components/SelectInput/index.d.ts +2 -0
- package/dist/cjs/types/components/TextArea/TextArea.d.ts +3 -0
- package/dist/cjs/types/components/TextArea/TextArea.types.d.ts +8 -0
- package/dist/cjs/types/components/TextArea/index.d.ts +2 -0
- package/dist/cjs/types/components/TextInput/TextInput.d.ts +3 -0
- package/dist/cjs/types/components/TextInput/TextInput.types.d.ts +4 -0
- package/dist/cjs/types/components/TextInput/index.d.ts +2 -0
- package/dist/cjs/types/components/TimeInput/TimeInput.d.ts +3 -0
- package/dist/cjs/types/components/TimeInput/TimeInput.types.d.ts +8 -0
- package/dist/cjs/types/components/TimeInput/index.d.ts +2 -0
- package/dist/cjs/types/components/Toggle/Toggle.d.ts +3 -0
- package/dist/cjs/types/components/Toggle/Toggle.types.d.ts +6 -0
- package/dist/cjs/types/components/Toggle/index.d.ts +2 -0
- package/dist/cjs/types/components/index.d.ts +19 -0
- package/dist/cjs/types/context/ThemeProvider.d.ts +27 -0
- package/dist/cjs/types/context/index.d.ts +1 -0
- package/dist/cjs/types/hooks/index.d.ts +2 -0
- package/dist/cjs/types/hooks/useControllable.d.ts +7 -0
- package/dist/cjs/types/hooks/useFormField.d.ts +25 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/cjs/types/types/common.d.ts +52 -0
- package/dist/cjs/types/types/index.d.ts +1 -0
- package/dist/cjs/types/utils/classNames.d.ts +3 -0
- package/dist/cjs/types/utils/constants.d.ts +9 -0
- package/dist/cjs/types/utils/index.d.ts +3 -0
- package/dist/cjs/types/utils/validation.d.ts +23 -0
- package/dist/esm/index.js +1102 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/AutoComplete/AutoComplete.d.ts +3 -0
- package/dist/esm/types/components/AutoComplete/AutoComplete.types.d.ts +27 -0
- package/dist/esm/types/components/AutoComplete/index.d.ts +2 -0
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/esm/types/components/Checkbox/Checkbox.types.d.ts +6 -0
- package/dist/esm/types/components/Checkbox/index.d.ts +2 -0
- package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.d.ts +3 -0
- package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.types.d.ts +20 -0
- package/dist/esm/types/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/esm/types/components/ColorInput/ColorInput.d.ts +3 -0
- package/dist/esm/types/components/ColorInput/ColorInput.types.d.ts +6 -0
- package/dist/esm/types/components/ColorInput/index.d.ts +2 -0
- package/dist/esm/types/components/DataTable/DataTable.d.ts +5 -0
- package/dist/esm/types/components/DataTable/DataTable.types.d.ts +31 -0
- package/dist/esm/types/components/DataTable/index.d.ts +2 -0
- package/dist/esm/types/components/DateInput/DateInput.d.ts +3 -0
- package/dist/esm/types/components/DateInput/DateInput.types.d.ts +8 -0
- package/dist/esm/types/components/DateInput/index.d.ts +2 -0
- package/dist/esm/types/components/FileInput/FileInput.d.ts +3 -0
- package/dist/esm/types/components/FileInput/FileInput.types.d.ts +10 -0
- package/dist/esm/types/components/FileInput/index.d.ts +2 -0
- package/dist/esm/types/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/esm/types/components/NumberInput/NumberInput.types.d.ts +18 -0
- package/dist/esm/types/components/NumberInput/index.d.ts +2 -0
- package/dist/esm/types/components/OTPInput/OTPInput.d.ts +3 -0
- package/dist/esm/types/components/OTPInput/OTPInput.types.d.ts +20 -0
- package/dist/esm/types/components/OTPInput/index.d.ts +2 -0
- package/dist/esm/types/components/PasswordInput/PasswordInput.d.ts +3 -0
- package/dist/esm/types/components/PasswordInput/PasswordInput.types.d.ts +10 -0
- package/dist/esm/types/components/PasswordInput/index.d.ts +2 -0
- package/dist/esm/types/components/PhoneInput/PhoneInput.d.ts +3 -0
- package/dist/esm/types/components/PhoneInput/PhoneInput.types.d.ts +20 -0
- package/dist/esm/types/components/PhoneInput/index.d.ts +2 -0
- package/dist/esm/types/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/esm/types/components/RadioGroup/RadioGroup.types.d.ts +22 -0
- package/dist/esm/types/components/RadioGroup/index.d.ts +2 -0
- package/dist/esm/types/components/RangeInput/RangeInput.d.ts +3 -0
- package/dist/esm/types/components/RangeInput/RangeInput.types.d.ts +14 -0
- package/dist/esm/types/components/RangeInput/index.d.ts +2 -0
- package/dist/esm/types/components/SearchInput/SearchInput.d.ts +3 -0
- package/dist/esm/types/components/SearchInput/SearchInput.types.d.ts +10 -0
- package/dist/esm/types/components/SearchInput/index.d.ts +2 -0
- package/dist/esm/types/components/SelectInput/SelectInput.d.ts +3 -0
- package/dist/esm/types/components/SelectInput/SelectInput.types.d.ts +13 -0
- package/dist/esm/types/components/SelectInput/index.d.ts +2 -0
- package/dist/esm/types/components/TextArea/TextArea.d.ts +3 -0
- package/dist/esm/types/components/TextArea/TextArea.types.d.ts +8 -0
- package/dist/esm/types/components/TextArea/index.d.ts +2 -0
- package/dist/esm/types/components/TextInput/TextInput.d.ts +3 -0
- package/dist/esm/types/components/TextInput/TextInput.types.d.ts +4 -0
- package/dist/esm/types/components/TextInput/index.d.ts +2 -0
- package/dist/esm/types/components/TimeInput/TimeInput.d.ts +3 -0
- package/dist/esm/types/components/TimeInput/TimeInput.types.d.ts +8 -0
- package/dist/esm/types/components/TimeInput/index.d.ts +2 -0
- package/dist/esm/types/components/Toggle/Toggle.d.ts +3 -0
- package/dist/esm/types/components/Toggle/Toggle.types.d.ts +6 -0
- package/dist/esm/types/components/Toggle/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +19 -0
- package/dist/esm/types/context/ThemeProvider.d.ts +27 -0
- package/dist/esm/types/context/index.d.ts +1 -0
- package/dist/esm/types/hooks/index.d.ts +2 -0
- package/dist/esm/types/hooks/useControllable.d.ts +7 -0
- package/dist/esm/types/hooks/useFormField.d.ts +25 -0
- package/dist/esm/types/index.d.ts +4 -0
- package/dist/esm/types/types/common.d.ts +52 -0
- package/dist/esm/types/types/index.d.ts +1 -0
- package/dist/esm/types/utils/classNames.d.ts +3 -0
- package/dist/esm/types/utils/constants.d.ts +9 -0
- package/dist/esm/types/utils/index.d.ts +3 -0
- package/dist/esm/types/utils/validation.d.ts +23 -0
- package/dist/index.d.ts +401 -0
- package/package.json +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 konarsubhojit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Zenput
|
|
2
|
+
|
|
3
|
+
A production-ready, accessible React TypeScript input components library with 18 fully-featured components.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎯 **18 input components** — TextInput, TextArea, NumberInput, PasswordInput, SelectInput, Checkbox, CheckboxGroup, RadioGroup, Toggle, DateInput, TimeInput, FileInput, RangeInput, ColorInput, SearchInput, PhoneInput, OTPInput, AutoComplete
|
|
8
|
+
- ♿ **Fully accessible** — ARIA attributes, keyboard navigation, screen reader support
|
|
9
|
+
- 🎨 **Themeable** — CSS custom properties with `ThemeProvider`
|
|
10
|
+
- 📐 **3 sizes** — `sm`, `md`, `lg`
|
|
11
|
+
- 🖼️ **3 variants** — `outlined`, `filled`, `underlined`
|
|
12
|
+
- ✅ **Validation states** — `default`, `error`, `success`, `warning`
|
|
13
|
+
- 🔒 **TypeScript strict** — No `any` types, full type safety
|
|
14
|
+
- 📦 **Tree-shakeable** — ESM + CJS dual output
|
|
15
|
+
- 🧪 **Tested** — comprehensive test coverage with React Testing Library
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install zenput
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { TextInput, ThemeProvider } from 'zenput';
|
|
27
|
+
|
|
28
|
+
function App() {
|
|
29
|
+
return (
|
|
30
|
+
<ThemeProvider theme={{ primaryColor: '#6366f1' }}>
|
|
31
|
+
<TextInput
|
|
32
|
+
label="Email"
|
|
33
|
+
placeholder="you@example.com"
|
|
34
|
+
required
|
|
35
|
+
fullWidth
|
|
36
|
+
/>
|
|
37
|
+
</ThemeProvider>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Components
|
|
43
|
+
|
|
44
|
+
### TextInput
|
|
45
|
+
```tsx
|
|
46
|
+
<TextInput
|
|
47
|
+
label="Username"
|
|
48
|
+
placeholder="Enter username"
|
|
49
|
+
size="md"
|
|
50
|
+
variant="outlined"
|
|
51
|
+
validationState="error"
|
|
52
|
+
errorMessage="Username is required"
|
|
53
|
+
required
|
|
54
|
+
fullWidth
|
|
55
|
+
/>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### TextArea
|
|
59
|
+
```tsx
|
|
60
|
+
<TextArea
|
|
61
|
+
label="Bio"
|
|
62
|
+
placeholder="Tell us about yourself"
|
|
63
|
+
autoResize
|
|
64
|
+
showCharCount
|
|
65
|
+
maxLength={500}
|
|
66
|
+
rows={4}
|
|
67
|
+
/>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### NumberInput
|
|
71
|
+
```tsx
|
|
72
|
+
<NumberInput
|
|
73
|
+
label="Quantity"
|
|
74
|
+
min={0}
|
|
75
|
+
max={100}
|
|
76
|
+
step={1}
|
|
77
|
+
defaultValue={1}
|
|
78
|
+
/>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### PasswordInput
|
|
82
|
+
```tsx
|
|
83
|
+
<PasswordInput
|
|
84
|
+
label="Password"
|
|
85
|
+
showStrengthIndicator
|
|
86
|
+
/>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### SelectInput
|
|
90
|
+
```tsx
|
|
91
|
+
<SelectInput
|
|
92
|
+
label="Country"
|
|
93
|
+
options={[
|
|
94
|
+
{ value: 'us', label: 'United States' },
|
|
95
|
+
{ value: 'uk', label: 'United Kingdom' },
|
|
96
|
+
]}
|
|
97
|
+
placeholder="Select a country"
|
|
98
|
+
/>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Checkbox
|
|
102
|
+
```tsx
|
|
103
|
+
<Checkbox label="I agree to the terms" required />
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### CheckboxGroup
|
|
107
|
+
```tsx
|
|
108
|
+
<CheckboxGroup
|
|
109
|
+
label="Interests"
|
|
110
|
+
options={[
|
|
111
|
+
{ value: 'react', label: 'React' },
|
|
112
|
+
{ value: 'typescript', label: 'TypeScript' },
|
|
113
|
+
{ value: 'node', label: 'Node.js' },
|
|
114
|
+
]}
|
|
115
|
+
value={['react']}
|
|
116
|
+
onChange={(values) => console.log(values)}
|
|
117
|
+
/>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### RadioGroup
|
|
121
|
+
```tsx
|
|
122
|
+
<RadioGroup
|
|
123
|
+
label="Plan"
|
|
124
|
+
options={[
|
|
125
|
+
{ value: 'free', label: 'Free' },
|
|
126
|
+
{ value: 'pro', label: 'Pro' },
|
|
127
|
+
{ value: 'enterprise', label: 'Enterprise' },
|
|
128
|
+
]}
|
|
129
|
+
value="free"
|
|
130
|
+
onChange={(value) => console.log(value)}
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Toggle
|
|
135
|
+
```tsx
|
|
136
|
+
<Toggle label="Enable notifications" defaultChecked />
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### DateInput
|
|
140
|
+
```tsx
|
|
141
|
+
<DateInput label="Date of birth" min="1900-01-01" max="2024-12-31" />
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### TimeInput
|
|
145
|
+
```tsx
|
|
146
|
+
<TimeInput label="Meeting time" />
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### FileInput
|
|
150
|
+
```tsx
|
|
151
|
+
<FileInput label="Upload avatar" accept="image/*" />
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### RangeInput
|
|
155
|
+
```tsx
|
|
156
|
+
<RangeInput label="Volume" min={0} max={100} defaultValue={50} showValue />
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### ColorInput
|
|
160
|
+
```tsx
|
|
161
|
+
<ColorInput label="Brand color" defaultValue="#3b82f6" />
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### SearchInput
|
|
165
|
+
```tsx
|
|
166
|
+
<SearchInput
|
|
167
|
+
label="Search"
|
|
168
|
+
placeholder="Search..."
|
|
169
|
+
onSearch={(q) => console.log(q)}
|
|
170
|
+
/>
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### PhoneInput
|
|
174
|
+
```tsx
|
|
175
|
+
<PhoneInput
|
|
176
|
+
label="Phone number"
|
|
177
|
+
defaultDialCode="+1"
|
|
178
|
+
/>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### OTPInput
|
|
182
|
+
```tsx
|
|
183
|
+
<OTPInput
|
|
184
|
+
label="Verification code"
|
|
185
|
+
length={6}
|
|
186
|
+
onChange={(value) => console.log(value)}
|
|
187
|
+
/>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### AutoComplete
|
|
191
|
+
```tsx
|
|
192
|
+
<AutoComplete
|
|
193
|
+
label="City"
|
|
194
|
+
options={[
|
|
195
|
+
{ value: 'nyc', label: 'New York' },
|
|
196
|
+
{ value: 'la', label: 'Los Angeles' },
|
|
197
|
+
{ value: 'chi', label: 'Chicago' },
|
|
198
|
+
]}
|
|
199
|
+
onSearch={(q) => console.log(q)}
|
|
200
|
+
/>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Theming
|
|
204
|
+
|
|
205
|
+
Use `ThemeProvider` to customise the design tokens:
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
import { ThemeProvider } from 'zenput';
|
|
209
|
+
|
|
210
|
+
<ThemeProvider
|
|
211
|
+
theme={{
|
|
212
|
+
primaryColor: '#6366f1',
|
|
213
|
+
errorColor: '#dc2626',
|
|
214
|
+
successColor: '#16a34a',
|
|
215
|
+
warningColor: '#d97706',
|
|
216
|
+
borderRadius: '8px',
|
|
217
|
+
fontFamily: 'Inter, sans-serif',
|
|
218
|
+
}}
|
|
219
|
+
>
|
|
220
|
+
{/* your app */}
|
|
221
|
+
</ThemeProvider>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Props
|
|
225
|
+
|
|
226
|
+
### Common props (all components inherit `BaseInputProps`)
|
|
227
|
+
|
|
228
|
+
| Prop | Type | Default | Description |
|
|
229
|
+
|------|------|---------|-------------|
|
|
230
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Visual size |
|
|
231
|
+
| `variant` | `'outlined' \| 'filled' \| 'underlined'` | `'outlined'` | Visual variant |
|
|
232
|
+
| `validationState` | `'default' \| 'error' \| 'success' \| 'warning'` | `'default'` | Validation state |
|
|
233
|
+
| `label` | `string` | — | Label text |
|
|
234
|
+
| `helperText` | `string` | — | Helper text below input |
|
|
235
|
+
| `errorMessage` | `string` | — | Error message (shown when `validationState='error'`) |
|
|
236
|
+
| `successMessage` | `string` | — | Success message |
|
|
237
|
+
| `warningMessage` | `string` | — | Warning message |
|
|
238
|
+
| `required` | `boolean` | `false` | Mark field as required |
|
|
239
|
+
| `disabled` | `boolean` | `false` | Disable the input |
|
|
240
|
+
| `readOnly` | `boolean` | `false` | Make the input read-only |
|
|
241
|
+
| `prefixIcon` | `React.ReactNode` | — | Icon/element before the input |
|
|
242
|
+
| `suffixIcon` | `React.ReactNode` | — | Icon/element after the input |
|
|
243
|
+
| `fullWidth` | `boolean` | `false` | Expand to full container width |
|
|
244
|
+
| `wrapperClassName` | `string` | — | Class for the wrapper element |
|
|
245
|
+
| `inputClassName` | `string` | — | Class for the input element |
|
|
246
|
+
|
|
247
|
+
## Development
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
# Install dependencies
|
|
251
|
+
npm install
|
|
252
|
+
|
|
253
|
+
# Run tests
|
|
254
|
+
npm test
|
|
255
|
+
|
|
256
|
+
# Run tests with coverage
|
|
257
|
+
npm run test:coverage
|
|
258
|
+
|
|
259
|
+
# Build the library
|
|
260
|
+
npm run build
|
|
261
|
+
|
|
262
|
+
# Lint
|
|
263
|
+
npm run lint
|
|
264
|
+
|
|
265
|
+
# Type check
|
|
266
|
+
npm run type-check
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## License
|
|
270
|
+
|
|
271
|
+
MIT © konarsubhojit
|