@qoretechnologies/reqore 0.56.0 → 0.56.2

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.
Files changed (55) hide show
  1. package/dist/components/Button/index.d.ts +6 -0
  2. package/dist/components/Button/index.d.ts.map +1 -1
  3. package/dist/components/Button/index.js +3 -0
  4. package/dist/components/Button/index.js.map +1 -1
  5. package/dist/components/DatePicker/index.d.ts.map +1 -1
  6. package/dist/components/DatePicker/index.js +1 -1
  7. package/dist/components/DatePicker/index.js.map +1 -1
  8. package/dist/components/Dropdown/index.d.ts +1 -1
  9. package/dist/components/Dropdown/index.d.ts.map +1 -1
  10. package/dist/components/Dropdown/index.js +2 -2
  11. package/dist/components/Dropdown/index.js.map +1 -1
  12. package/dist/components/InternalPopover/index.d.ts +3 -0
  13. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  14. package/dist/components/InternalPopover/index.js +2 -2
  15. package/dist/components/InternalPopover/index.js.map +1 -1
  16. package/dist/components/Menu/index.d.ts +4 -1
  17. package/dist/components/Menu/index.d.ts.map +1 -1
  18. package/dist/components/Panel/index.d.ts +3 -0
  19. package/dist/components/Panel/index.d.ts.map +1 -1
  20. package/dist/components/Panel/index.js +18 -3
  21. package/dist/components/Panel/index.js.map +1 -1
  22. package/dist/components/Popover/index.d.ts +1 -0
  23. package/dist/components/Popover/index.d.ts.map +1 -1
  24. package/dist/components/Popover/index.js +129 -20
  25. package/dist/components/Popover/index.js.map +1 -1
  26. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  27. package/dist/components/RichTextEditor/index.js +55 -17
  28. package/dist/components/RichTextEditor/index.js.map +1 -1
  29. package/dist/components/Textarea/index.d.ts.map +1 -1
  30. package/dist/components/Textarea/index.js +1 -1
  31. package/dist/components/Textarea/index.js.map +1 -1
  32. package/dist/constants/sizes.d.ts +64 -2
  33. package/dist/constants/sizes.d.ts.map +1 -1
  34. package/dist/constants/sizes.js +99 -39
  35. package/dist/constants/sizes.js.map +1 -1
  36. package/dist/containers/UIProvider.d.ts +6 -0
  37. package/dist/containers/UIProvider.d.ts.map +1 -1
  38. package/dist/containers/UIProvider.js +3 -0
  39. package/dist/containers/UIProvider.js.map +1 -1
  40. package/dist/index.d.ts +5 -5
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +2 -2
  43. package/dist/index.js.map +1 -1
  44. package/docs/docs/components/button.mdx +391 -0
  45. package/docs/docs/components/input.mdx +328 -0
  46. package/docs/docs/components/panel.mdx +442 -0
  47. package/docs/docs/components/table.mdx +872 -0
  48. package/docs/docs/guides/effects.mdx +586 -0
  49. package/docs/docs/guides/getting-started.mdx +164 -0
  50. package/docs/docs/guides/theming.mdx +252 -0
  51. package/docs/docs/intro.md +98 -0
  52. package/docs/sidebars.js +23 -0
  53. package/package.json +11 -3
  54. package/tests.json +1 -1
  55. package/typedoc.json +10 -0
@@ -0,0 +1,328 @@
1
+ ---
2
+ sidebar_position: 3
3
+ ---
4
+
5
+ import LiveDemo from '../../src/components/LiveDemo';
6
+ import { ReqoreInput, ReqoreControlGroup, ReqoreButton } from '../../../src';
7
+
8
+ # Input
9
+
10
+ Text input fields for user data entry with validation, icons, and various configurations.
11
+
12
+ ## Props
13
+
14
+ | Prop | Type | Required | Default | Description |
15
+ | -------------- | ------------------ | -------- | ---------- | -------------------- |
16
+ | `value` | `string \| number` | - | - | Input value |
17
+ | `onChange` | `function` | - | - | Change handler |
18
+ | `placeholder` | `string` | - | - | Placeholder text |
19
+ | `label` | `string` | - | - | Input label |
20
+ | `type` | `string` | - | `'text'` | Input type |
21
+ | `icon` | `IReqoreIconName` | - | - | Left icon |
22
+ | `rightIcon` | `IReqoreIconName` | - | - | Right icon |
23
+ | `size` | `TSizes` | - | `'normal'` | Input size |
24
+ | `intent` | `TReqoreIntent` | - | - | Color intent |
25
+ | `disabled` | `boolean` | - | `false` | Disabled state |
26
+ | `readOnly` | `boolean` | - | `false` | Read only state |
27
+ | `onClearClick` | `function` | - | - | Clear button handler |
28
+ | `fluid` | `boolean` | - | `false` | Full width |
29
+ | `tooltip` | `string \| object` | - | - | Tooltip |
30
+ | `effect` | `IReqoreEffect` | - | - | Visual effects |
31
+ | `autoFocus` | `boolean` | - | `false` | Auto focus on mount |
32
+ | `minimal` | `boolean` | - | `false` | Minimal styling |
33
+ | `flat` | `boolean` | - | `true` | Flat styling |
34
+
35
+ ## Basic Usage
36
+
37
+ <LiveDemo vertical>
38
+ <ReqoreInput placeholder='Enter text...' />
39
+ </LiveDemo>
40
+
41
+ ```tsx
42
+ import { ReqoreInput } from '@qoretechnologies/reqore';
43
+
44
+ function Example() {
45
+ const [value, setValue] = useState('');
46
+
47
+ return (
48
+ <ReqoreInput
49
+ value={value}
50
+ onChange={(e) => setValue(e.target.value)}
51
+ placeholder='Enter text...'
52
+ />
53
+ );
54
+ }
55
+ ```
56
+
57
+ ## With Label
58
+
59
+ <LiveDemo vertical>
60
+ <ReqoreInput label='Email Address' placeholder='user@example.com' />
61
+ </LiveDemo>
62
+
63
+ ```tsx
64
+ <ReqoreInput label='Email Address' placeholder='user@example.com' />
65
+ ```
66
+
67
+ ## With Icons
68
+
69
+ <LiveDemo vertical>
70
+ <ReqoreInput icon='SearchLine' placeholder='Search...' />
71
+ <ReqoreInput icon='User3Line' rightIcon='MailLine' placeholder='Email' />
72
+ </LiveDemo>
73
+
74
+ ```tsx
75
+ <ReqoreInput
76
+ icon="SearchLine"
77
+ placeholder="Search..."
78
+ />
79
+
80
+ <ReqoreInput
81
+ icon="User3Line"
82
+ rightIcon="MailLine"
83
+ placeholder="Email"
84
+ />
85
+ ```
86
+
87
+ ## Input Types
88
+
89
+ <LiveDemo vertical>
90
+ <ReqoreInput type='text' placeholder='Text' />
91
+ <ReqoreInput type='email' placeholder='Email' />
92
+ <ReqoreInput type='password' placeholder='Password' />
93
+ <ReqoreInput type='number' placeholder='Number' />
94
+ </LiveDemo>
95
+
96
+ ```tsx
97
+ <ReqoreControlGroup vertical>
98
+ <ReqoreInput type='text' placeholder='Text' />
99
+ <ReqoreInput type='email' placeholder='Email' />
100
+ <ReqoreInput type='password' placeholder='Password' />
101
+ <ReqoreInput type='number' placeholder='Number' />
102
+ <ReqoreInput type='tel' placeholder='Phone' />
103
+ <ReqoreInput type='url' placeholder='URL' />
104
+ </ReqoreControlGroup>
105
+ ```
106
+
107
+ ## Sizes
108
+
109
+ <LiveDemo vertical>
110
+ <ReqoreInput size='micro' placeholder='Micro input' />
111
+ <ReqoreInput size='tiny' placeholder='Tiny input' />
112
+ <ReqoreInput size='small' placeholder='Small input' />
113
+ <ReqoreInput size='normal' placeholder='Normal input' />
114
+ <ReqoreInput size='big' placeholder='Big input' />
115
+ <ReqoreInput size='huge' placeholder='Huge input' />
116
+ <ReqoreInput size='massive' placeholder='Massive input' />
117
+ </LiveDemo>
118
+
119
+ ```tsx
120
+ <ReqoreControlGroup vertical>
121
+ <ReqoreInput size='micro' placeholder='Micro input' />
122
+ <ReqoreInput size='tiny' placeholder='Tiny input' />
123
+ <ReqoreInput size='small' placeholder='Small input' />
124
+ <ReqoreInput size='normal' placeholder='Normal input' />
125
+ <ReqoreInput size='big' placeholder='Big input' />
126
+ <ReqoreInput size='huge' placeholder='Huge input' />
127
+ <ReqoreInput size='massive' placeholder='Massive input' />
128
+ </ReqoreControlGroup>
129
+ ```
130
+
131
+ ## With Intent
132
+
133
+ <LiveDemo vertical>
134
+ <ReqoreInput intent='info' placeholder='Info' />
135
+ <ReqoreInput intent='success' placeholder='Valid input' />
136
+ <ReqoreInput intent='warning' placeholder='Warning' />
137
+ <ReqoreInput intent='danger' placeholder='Error' />
138
+ </LiveDemo>
139
+
140
+ ```tsx
141
+ <ReqoreControlGroup vertical>
142
+ <ReqoreInput intent='info' placeholder='Info' />
143
+ <ReqoreInput intent='success' placeholder='Valid input' />
144
+ <ReqoreInput intent='warning' placeholder='Warning' />
145
+ <ReqoreInput intent='danger' placeholder='Error' />
146
+ </ReqoreControlGroup>
147
+ ```
148
+
149
+ ## Clearable Input
150
+
151
+ <LiveDemo vertical>
152
+ <ReqoreInput
153
+ defaultValue='Clear me!'
154
+ onClearClick={() => alert('Cleared!')}
155
+ placeholder='Clearable input'
156
+ />
157
+ </LiveDemo>
158
+
159
+ ```tsx
160
+ <ReqoreInput
161
+ value={value}
162
+ onChange={(e) => setValue(e.target.value)}
163
+ onClearClick={() => setValue('')}
164
+ placeholder='Clearable input'
165
+ />
166
+ ```
167
+
168
+ ## Disabled & ReadOnly
169
+
170
+ <LiveDemo vertical>
171
+ <ReqoreInput disabled placeholder='Disabled' />
172
+ <ReqoreInput readOnly value='Read only value' />
173
+ </LiveDemo>
174
+
175
+ ```tsx
176
+ <ReqoreControlGroup vertical>
177
+ <ReqoreInput disabled placeholder='Disabled' />
178
+ <ReqoreInput readOnly value='Read only value' />
179
+ </ReqoreControlGroup>
180
+ ```
181
+
182
+ ## With Validation
183
+
184
+ ```tsx
185
+ function ValidatedInput() {
186
+ const [email, setEmail] = useState('');
187
+ const [error, setError] = useState('');
188
+
189
+ const validateEmail = (value) => {
190
+ if (!value.includes('@')) {
191
+ setError('Invalid email address');
192
+ return false;
193
+ }
194
+ setError('');
195
+ return true;
196
+ };
197
+
198
+ return (
199
+ <ReqoreInput
200
+ label='Email'
201
+ value={email}
202
+ onChange={(e) => {
203
+ setEmail(e.target.value);
204
+ validateEmail(e.target.value);
205
+ }}
206
+ intent={error ? 'danger' : 'success'}
207
+ tooltip={error || 'Valid email'}
208
+ />
209
+ );
210
+ }
211
+ ```
212
+
213
+ ## With Tooltip
214
+
215
+ ```tsx
216
+ <ReqoreInput label='Password' type='password' tooltip='Must be at least 8 characters' />
217
+ ```
218
+
219
+ ## Fluid Width
220
+
221
+ ```tsx
222
+ <ReqoreInput fluid placeholder='Full width input' />
223
+ ```
224
+
225
+ ## With Effect
226
+
227
+ ```tsx
228
+ <ReqoreInput
229
+ placeholder='Styled input'
230
+ effect={{
231
+ gradient: {
232
+ colors: { 0: 'info', 100: 'success' },
233
+ },
234
+ }}
235
+ />
236
+ ```
237
+
238
+ ## Focus on Mount
239
+
240
+ ```tsx
241
+ <ReqoreInput placeholder='Auto focused' autoFocus />
242
+ ```
243
+
244
+ ## Examples
245
+
246
+ ### Search Input
247
+
248
+ <LiveDemo vertical>
249
+ <ReqoreInput icon='SearchLine' placeholder='Search...' />
250
+ </LiveDemo>
251
+
252
+ ```tsx
253
+ function SearchInput() {
254
+ const [search, setSearch] = useState('');
255
+
256
+ return (
257
+ <ReqoreInput
258
+ icon='SearchLine'
259
+ placeholder='Search...'
260
+ value={search}
261
+ onChange={(e) => setSearch(e.target.value)}
262
+ onClearClick={() => setSearch('')}
263
+ fluid
264
+ />
265
+ );
266
+ }
267
+ ```
268
+
269
+ ### Login Form
270
+
271
+ <LiveDemo vertical>
272
+ <ReqoreControlGroup vertical>
273
+ <ReqoreInput label='Email' type='email' icon='MailLine' placeholder='user@example.com' />
274
+ <ReqoreInput label='Password' type='password' icon='LockLine' placeholder='••••••••' />
275
+ <ReqoreButton intent='success' fluid>
276
+ Sign In
277
+ </ReqoreButton>
278
+ </ReqoreControlGroup>
279
+ </LiveDemo>
280
+
281
+ ```tsx
282
+ function LoginForm() {
283
+ const [email, setEmail] = useState('');
284
+ const [password, setPassword] = useState('');
285
+
286
+ return (
287
+ <ReqoreControlGroup vertical>
288
+ <ReqoreInput
289
+ label='Email'
290
+ type='email'
291
+ icon='MailLine'
292
+ value={email}
293
+ onChange={(e) => setEmail(e.target.value)}
294
+ fluid
295
+ />
296
+ <ReqoreInput
297
+ label='Password'
298
+ type='password'
299
+ icon='LockLine'
300
+ value={password}
301
+ onChange={(e) => setPassword(e.target.value)}
302
+ fluid
303
+ />
304
+ <ReqoreButton intent='success' fluid>
305
+ Sign In
306
+ </ReqoreButton>
307
+ </ReqoreControlGroup>
308
+ );
309
+ }
310
+ ```
311
+
312
+ ### Input with Icons
313
+
314
+ <LiveDemo vertical>
315
+ <ReqoreControlGroup vertical>
316
+ <ReqoreInput icon='MailLine' placeholder='Email address' />
317
+ <ReqoreInput icon='LockLine' type='password' placeholder='Password' />
318
+ <ReqoreInput icon='PhoneLine' type='tel' placeholder='Phone number' />
319
+ </ReqoreControlGroup>
320
+ </LiveDemo>
321
+
322
+ ```tsx
323
+ <ReqoreControlGroup vertical>
324
+ <ReqoreInput icon='MailLine' placeholder='Email address' />
325
+ <ReqoreInput icon='LockLine' type='password' placeholder='Password' />
326
+ <ReqoreInput icon='PhoneLine' type='tel' placeholder='Phone number' />
327
+ </ReqoreControlGroup>
328
+ ```