pure-react-ui 1.5.4 → 1.5.5

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
@@ -1,505 +1,505 @@
1
- # Pure React UI
2
-
3
- A pure React UI component library built with TypeScript. No external dependencies required (except React and ReactDOM as peer dependencies).
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install pure-react-ui
9
- ```
10
-
11
- ## Components
12
-
13
- ### Button
14
-
15
- A versatile button component with multiple variants and sizes.
16
-
17
- ```tsx
18
- import { Button } from 'pure-react-ui';
19
-
20
- <Button variant="primary" size="medium" onClick={handleClick}>
21
- Click Me
22
- </Button>
23
- ```
24
-
25
- **Props:**
26
- - `variant`: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' (default: 'primary')
27
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
28
- - `fullWidth`: boolean (default: false)
29
- - `loading`: boolean (default: false)
30
- - All standard button HTML attributes
31
-
32
- ### Card
33
-
34
- A flexible card component for displaying content.
35
-
36
- ```tsx
37
- import { Card } from 'pure-react-ui';
38
-
39
- <Card
40
- title="Card Title"
41
- subtitle="Card Subtitle"
42
- image="/path/to/image.jpg"
43
- hoverable
44
- shadow="medium"
45
- >
46
- Card content goes here
47
- </Card>
48
- ```
49
-
50
- **Props:**
51
- - `title`: string (optional)
52
- - `subtitle`: string (optional)
53
- - `image`: string (optional)
54
- - `imageAlt`: string (optional)
55
- - `footer`: React.ReactNode (optional)
56
- - `hoverable`: boolean (default: false)
57
- - `shadow`: 'none' | 'small' | 'medium' | 'large' (default: 'medium')
58
- - `onClick`: () => void (optional)
59
-
60
- ### Modal
61
-
62
- A modal dialog component with overlay and keyboard support.
63
-
64
- ```tsx
65
- import { Modal } from 'pure-react-ui';
66
-
67
- <Modal
68
- isOpen={isOpen}
69
- onClose={() => setIsOpen(false)}
70
- title="Modal Title"
71
- size="medium"
72
- >
73
- Modal content goes here
74
- </Modal>
75
- ```
76
-
77
- **Props:**
78
- - `isOpen`: boolean (required)
79
- - `onClose`: () => void (required)
80
- - `title`: string | React.ReactNode (optional) - Modal title or custom header content
81
- - `size`: 'small' | 'medium' | 'large' | 'fullscreen' (default: 'medium')
82
- - `position`: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' (default: 'center')
83
- - `variant`: 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'gradient-primary' | 'gradient-success' | 'gradient-danger' | 'gradient-info' (default: 'default')
84
- - `closeOnOverlayClick`: boolean (default: true)
85
- - `closeOnEscape`: boolean (default: true)
86
- - `showCloseButton`: boolean (default: true)
87
- - `scrollable`: boolean (default: true) - Enable scrolling for modal body
88
- - `topMargin`: number | string (optional) - Custom top margin for modal
89
- - `className`: string (optional) - Additional CSS classes
90
- - `overlayClassName`: string (optional) - Additional CSS classes for overlay
91
- - `headerClassName`: string (optional) - Additional CSS classes for header
92
- - `bodyClassName`: string (optional) - Additional CSS classes for body
93
-
94
- ### Icon
95
-
96
- A comprehensive icon component library with 100+ SVG icons.
97
-
98
- ```tsx
99
- import { Icon } from 'pure-react-ui';
100
-
101
- <Icon name="Home" size={24} color="#007bff" />
102
- <Icon name="Search" size={32} onClick={handleClick} />
103
- ```
104
-
105
- **Props:**
106
- - `name`: IconName (required) - Name of the icon to display
107
- - `size`: number | string (default: 24) - Size of the icon
108
- - `color`: string (default: 'currentColor') - Color of the icon
109
- - `className`: string (optional) - Additional CSS classes
110
- - `onClick`: () => void (optional) - Click handler (makes icon clickable)
111
-
112
- **Available Icons:**
113
-
114
- **Arrows & Navigation:**
115
- ArrowLeft, ArrowRight, ArrowUp, ArrowDown, ArrowUpRight, ArrowDownRight, ChevronLeft, ChevronRight, ChevronUp, ChevronDown, DoubleChevronLeft, DoubleChevronRight, Home, Menu, Close, Search, Filter
116
-
117
- **Actions:**
118
- Plus, Minus, Check, X, Edit, Trash, Save, Download, Upload, Copy, Share
119
-
120
- **Media:**
121
- Play, Pause, Stop, VolumeUp, VolumeDown, VolumeOff, Image, Video, Camera
122
-
123
- **Communication:**
124
- Mail, Message, Phone, Bell, Notification
125
-
126
- **Files:**
127
- File, Folder, FolderOpen, FileText, FilePdf
128
-
129
- **User:**
130
- User, Users, UserPlus, UserMinus, Settings, Logout
131
-
132
- **Status:**
133
- CheckCircle, XCircle, AlertCircle, Info, Warning, Star, Heart, Bookmark
134
-
135
- **Social:**
136
- Facebook, Twitter, Instagram, Linkedin, Github, Youtube
137
-
138
- **Technology:**
139
- Wifi, Bluetooth, Battery, Zap, Lock, Unlock, Shield
140
-
141
- **Shopping:**
142
- ShoppingCart, ShoppingBag, CreditCard, Gift
143
-
144
- **Time:**
145
- Clock, Calendar, Timer
146
-
147
- **Location:**
148
- MapPin, Globe, Navigation
149
-
150
- **Weather:**
151
- Sun, Moon, Cloud
152
-
153
- **Utility:**
154
- Eye, EyeOff, Refresh, MoreVertical, MoreHorizontal, Grid, List
155
-
156
- You can also import individual icons directly:
157
- ```tsx
158
- import { Home, Search, User } from 'pure-react-ui';
159
-
160
- <Home size={24} color="#007bff" />
161
- ```
162
-
163
- ### Space
164
-
165
- A layout component for adding consistent spacing between elements.
166
-
167
- ```tsx
168
- import { Space } from 'pure-react-ui';
169
-
170
- <Space size="medium" direction="horizontal">
171
- <Button>Button 1</Button>
172
- <Button>Button 2</Button>
173
- <Button>Button 3</Button>
174
- </Space>
175
-
176
- <Space size={20} direction="vertical" align="start">
177
- <Card>Card 1</Card>
178
- <Card>Card 2</Card>
179
- </Space>
180
- ```
181
-
182
- **Props:**
183
- - `size`: 'small' | 'medium' | 'large' | number (default: 'medium') - Spacing size between items
184
- - `direction`: 'horizontal' | 'vertical' (default: 'horizontal') - Direction of spacing
185
- - `align`: 'start' | 'end' | 'center' | 'baseline' | 'stretch' (default: 'center') - Alignment of items
186
- - `wrap`: boolean (default: false) - Whether items should wrap to next line
187
- - `className`: string (optional) - Additional CSS classes
188
-
189
- ### Flex
190
-
191
- A flexible container component based on CSS Flexbox.
192
-
193
- ```tsx
194
- import { Flex } from 'pure-react-ui';
195
-
196
- <Flex direction="row" justify="between" align="center" gap="medium">
197
- <Button>Left</Button>
198
- <Button>Center</Button>
199
- <Button>Right</Button>
200
- </Flex>
201
-
202
- <Flex direction="column" justify="start" align="stretch" gap={16}>
203
- <Card>Card 1</Card>
204
- <Card>Card 2</Card>
205
- </Flex>
206
- ```
207
-
208
- **Props:**
209
- - `direction`: 'row' | 'column' | 'row-reverse' | 'column-reverse' (default: 'row') - Flex direction
210
- - `justify`: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' (default: 'start') - Justify content
211
- - `align`: 'start' | 'end' | 'center' | 'baseline' | 'stretch' (default: 'start') - Align items
212
- - `wrap`: boolean | 'wrap' | 'nowrap' | 'wrap-reverse' (default: false) - Flex wrap behavior
213
- - `gap`: 'none' | 'small' | 'medium' | 'large' | number (default: 'none') - Gap between items
214
- - `className`: string (optional) - Additional CSS classes
215
- - `style`: React.CSSProperties (optional) - Additional inline styles
216
-
217
- ### Text
218
-
219
- A typography component for consistent text styling with various options.
220
-
221
- ```tsx
222
- import { Text } from 'pure-react-ui';
223
-
224
- <Text as="h1" size="2xl" weight="bold" color="primary">
225
- Heading Text
226
- </Text>
227
-
228
- <Text size="lg" color="muted" align="center">
229
- Centered paragraph text
230
- </Text>
231
-
232
- <Text as="span" size="sm" decoration="underline" transform="uppercase">
233
- Styled Text
234
- </Text>
235
- ```
236
-
237
- **Props:**
238
- - `as`: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'small' | 'strong' | 'em' | 'code' | 'pre' (default: 'p') - HTML element to render
239
- - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' (default: 'md') - Font size
240
- - `weight`: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' (default: 'normal') - Font weight
241
- - `color`: 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'muted' (default: 'default') - Text color
242
- - `align`: 'left' | 'center' | 'right' | 'justify' (default: 'left') - Text alignment
243
- - `transform`: 'none' | 'uppercase' | 'lowercase' | 'capitalize' (default: 'none') - Text transform
244
- - `decoration`: 'none' | 'underline' | 'line-through' | 'overline' (default: 'none') - Text decoration
245
- - `truncate`: boolean (default: false) - Truncate text with ellipsis
246
- - `className`: string (optional) - Additional CSS classes
247
-
248
- ### Form Components
249
-
250
- A comprehensive form component system with all form elements.
251
-
252
- #### Form
253
-
254
- The main form container component.
255
-
256
- ```tsx
257
- import { Form } from 'pure-react-ui';
258
-
259
- <Form layout="vertical" onSubmit={handleSubmit}>
260
- {/* Form fields */}
261
- </Form>
262
- ```
263
-
264
- **Props:**
265
- - `layout`: 'vertical' | 'horizontal' | 'inline' (default: 'vertical')
266
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
267
- - `onSubmit`: (e: React.FormEvent) => void (optional)
268
- - All standard form HTML attributes
269
-
270
- #### Input
271
-
272
- Text input field with validation and icons.
273
-
274
- ```tsx
275
- import { Input } from 'pure-react-ui';
276
-
277
- <Input
278
- label="Email"
279
- type="email"
280
- placeholder="Enter email"
281
- error={errors.email}
282
- helpText="We'll never share your email"
283
- leftIcon={<Icon name="Mail" />}
284
- fullWidth
285
- />
286
- ```
287
-
288
- **Props:**
289
- - `label`: string (optional)
290
- - `error`: string (optional) - Error message
291
- - `helpText`: string (optional) - Help text
292
- - `leftIcon`: React.ReactNode (optional)
293
- - `rightIcon`: React.ReactNode (optional)
294
- - `fullWidth`: boolean (default: false)
295
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
296
- - All standard input HTML attributes
297
-
298
- #### Textarea
299
-
300
- Multi-line text input.
301
-
302
- ```tsx
303
- import { Textarea } from 'pure-react-ui';
304
-
305
- <Textarea
306
- label="Message"
307
- placeholder="Enter your message"
308
- rows={4}
309
- resize="vertical"
310
- fullWidth
311
- />
312
- ```
313
-
314
- **Props:**
315
- - `label`: string (optional)
316
- - `error`: string (optional)
317
- - `helpText`: string (optional)
318
- - `fullWidth`: boolean (default: false)
319
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
320
- - `rows`: number (default: 4)
321
- - `resize`: 'none' | 'both' | 'horizontal' | 'vertical' (default: 'vertical')
322
- - All standard textarea HTML attributes
323
-
324
- #### Select
325
-
326
- Dropdown select component.
327
-
328
- ```tsx
329
- import { Select } from 'pure-react-ui';
330
-
331
- <Select
332
- label="Country"
333
- options={[
334
- { value: 'us', label: 'United States' },
335
- { value: 'uk', label: 'United Kingdom' }
336
- ]}
337
- placeholder="Choose a country"
338
- fullWidth
339
- />
340
- ```
341
-
342
- **Props:**
343
- - `label`: string (optional)
344
- - `error`: string (optional)
345
- - `helpText`: string (optional)
346
- - `options`: SelectOption[] (required)
347
- - `placeholder`: string (optional)
348
- - `fullWidth`: boolean (default: false)
349
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
350
- - All standard select HTML attributes
351
-
352
- #### Checkbox
353
-
354
- Checkbox input with custom styling.
355
-
356
- ```tsx
357
- import { Checkbox } from 'pure-react-ui';
358
-
359
- <Checkbox
360
- label="I agree to terms"
361
- checked={checked}
362
- onChange={(e) => setChecked(e.target.checked)}
363
- />
364
- ```
365
-
366
- **Props:**
367
- - `label`: string (optional)
368
- - `error`: string (optional)
369
- - `helpText`: string (optional)
370
- - `fullWidth`: boolean (default: false)
371
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
372
- - All standard checkbox HTML attributes
373
-
374
- #### Radio
375
-
376
- Radio button input.
377
-
378
- ```tsx
379
- import { Radio } from 'pure-react-ui';
380
-
381
- <Radio
382
- label="Option 1"
383
- name="option"
384
- value="1"
385
- checked={selected === '1'}
386
- onChange={(e) => setSelected(e.target.value)}
387
- />
388
- ```
389
-
390
- **Props:**
391
- - `label`: string (optional)
392
- - `error`: string (optional)
393
- - `helpText`: string (optional)
394
- - `fullWidth`: boolean (default: false)
395
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
396
- - All standard radio HTML attributes
397
-
398
- #### Switch
399
-
400
- Toggle switch component.
401
-
402
- ```tsx
403
- import { Switch } from 'pure-react-ui';
404
-
405
- <Switch
406
- label="Enable notifications"
407
- checked={enabled}
408
- onChange={(e) => setEnabled(e.target.checked)}
409
- />
410
- ```
411
-
412
- **Props:**
413
- - `label`: string (optional)
414
- - `error`: string (optional)
415
- - `helpText`: string (optional)
416
- - `fullWidth`: boolean (default: false)
417
- - `size`: 'small' | 'medium' | 'large' (default: 'medium')
418
- - All standard checkbox HTML attributes (used as switch)
419
-
420
- #### FormGroup
421
-
422
- Container for grouping form fields.
423
-
424
- ```tsx
425
- import { FormGroup } from 'pure-react-ui';
426
-
427
- <FormGroup label="Personal Information" required>
428
- <Input label="Name" />
429
- <Input label="Email" />
430
- </FormGroup>
431
- ```
432
-
433
- **Props:**
434
- - `label`: string (optional)
435
- - `error`: string (optional)
436
- - `helpText`: string (optional)
437
- - `required`: boolean (default: false)
438
- - `className`: string (optional)
439
-
440
- #### FormRow
441
-
442
- Horizontal row for form fields.
443
-
444
- ```tsx
445
- import { FormRow } from 'pure-react-ui';
446
-
447
- <FormRow gap="medium">
448
- <Input label="First Name" fullWidth />
449
- <Input label="Last Name" fullWidth />
450
- </FormRow>
451
- ```
452
-
453
- **Props:**
454
- - `gap`: 'small' | 'medium' | 'large' | number (default: 'medium')
455
- - `className`: string (optional)
456
-
457
- ## Styling
458
-
459
- All components include their own CSS files and use CSS classes with the `pure-` prefix. The CSS files are automatically imported with each component. You can also style them by targeting these classes:
460
-
461
- - **Button**: `pure-button`, `pure-button--primary`, `pure-button--secondary`, etc.
462
- - **Card**: `pure-card`, `pure-card--hoverable`, `pure-card--shadow-medium`, etc.
463
- - **Modal**: `pure-modal`, `pure-modal__overlay`, `pure-modal__header`, etc.
464
- - **Icon**: `pure-icon`, `pure-icon--clickable`, `pure-icon--small`, etc.
465
- - **Space**: `pure-space`, `pure-space--horizontal`, `pure-space--vertical`, etc.
466
- - **Flex**: `pure-flex`, `pure-flex--row`, `pure-flex--column`, etc.
467
- - **Text**: `pure-text`, `pure-text--lg`, `pure-text--bold`, etc.
468
- - **Form**: `pure-form`, `pure-form--vertical`, `pure-form--horizontal`, etc.
469
- - **Input**: `pure-input`, `pure-input--error`, `pure-input--small`, etc.
470
- - **Textarea**: `pure-textarea`, `pure-textarea--error`, etc.
471
- - **Select**: `pure-select`, `pure-select--error`, etc.
472
- - **Checkbox**: `pure-checkbox`, `pure-checkbox--error`, etc.
473
- - **Radio**: `pure-radio`, `pure-radio--error`, etc.
474
- - **Switch**: `pure-switch`, `pure-switch--error`, etc.
475
-
476
- Each component has its own CSS file located in:
477
- - `lib/components/Button/Button.css`
478
- - `lib/components/Card/Card.css`
479
- - `lib/components/Modal/Modal.css`
480
- - `lib/components/Icon/Icon.css`
481
- - `lib/components/Space/Space.css`
482
- - `lib/components/Flex/Flex.css`
483
- - `lib/components/Text/Text.css`
484
- - `lib/components/Form/Form.css`
485
-
486
- ## Examples
487
-
488
- A complete example application is available in the `example` directory. To run it:
489
-
490
- ```bash
491
- # From the root directory, build the package first
492
- npm run build
493
-
494
- # Then navigate to example directory
495
- cd example
496
- npm install
497
- npm run dev
498
- ```
499
-
500
- Or check out `EXAMPLES.md` for code examples and usage patterns.
501
-
502
- ## License
503
-
504
- MIT
505
-
1
+ # Pure React UI
2
+
3
+ A pure React UI component library built with TypeScript. No external dependencies required (except React and ReactDOM as peer dependencies).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install pure-react-ui
9
+ ```
10
+
11
+ ## Components
12
+
13
+ ### Button
14
+
15
+ A versatile button component with multiple variants and sizes.
16
+
17
+ ```tsx
18
+ import { Button } from 'pure-react-ui';
19
+
20
+ <Button variant="primary" size="medium" onClick={handleClick}>
21
+ Click Me
22
+ </Button>
23
+ ```
24
+
25
+ **Props:**
26
+ - `variant`: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' (default: 'primary')
27
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
28
+ - `fullWidth`: boolean (default: false)
29
+ - `loading`: boolean (default: false)
30
+ - All standard button HTML attributes
31
+
32
+ ### Card
33
+
34
+ A flexible card component for displaying content.
35
+
36
+ ```tsx
37
+ import { Card } from 'pure-react-ui';
38
+
39
+ <Card
40
+ title="Card Title"
41
+ subtitle="Card Subtitle"
42
+ image="/path/to/image.jpg"
43
+ hoverable
44
+ shadow="medium"
45
+ >
46
+ Card content goes here
47
+ </Card>
48
+ ```
49
+
50
+ **Props:**
51
+ - `title`: string (optional)
52
+ - `subtitle`: string (optional)
53
+ - `image`: string (optional)
54
+ - `imageAlt`: string (optional)
55
+ - `footer`: React.ReactNode (optional)
56
+ - `hoverable`: boolean (default: false)
57
+ - `shadow`: 'none' | 'small' | 'medium' | 'large' (default: 'medium')
58
+ - `onClick`: () => void (optional)
59
+
60
+ ### Modal
61
+
62
+ A modal dialog component with overlay and keyboard support.
63
+
64
+ ```tsx
65
+ import { Modal } from 'pure-react-ui';
66
+
67
+ <Modal
68
+ isOpen={isOpen}
69
+ onClose={() => setIsOpen(false)}
70
+ title="Modal Title"
71
+ size="medium"
72
+ >
73
+ Modal content goes here
74
+ </Modal>
75
+ ```
76
+
77
+ **Props:**
78
+ - `isOpen`: boolean (required)
79
+ - `onClose`: () => void (required)
80
+ - `title`: string | React.ReactNode (optional) - Modal title or custom header content
81
+ - `size`: 'small' | 'medium' | 'large' | 'fullscreen' (default: 'medium')
82
+ - `position`: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' (default: 'center')
83
+ - `variant`: 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'gradient-primary' | 'gradient-success' | 'gradient-danger' | 'gradient-info' (default: 'default')
84
+ - `closeOnOverlayClick`: boolean (default: true)
85
+ - `closeOnEscape`: boolean (default: true)
86
+ - `showCloseButton`: boolean (default: true)
87
+ - `scrollable`: boolean (default: true) - Enable scrolling for modal body
88
+ - `topMargin`: number | string (optional) - Custom top margin for modal
89
+ - `className`: string (optional) - Additional CSS classes
90
+ - `overlayClassName`: string (optional) - Additional CSS classes for overlay
91
+ - `headerClassName`: string (optional) - Additional CSS classes for header
92
+ - `bodyClassName`: string (optional) - Additional CSS classes for body
93
+
94
+ ### Icon
95
+
96
+ A comprehensive icon component library with 100+ SVG icons.
97
+
98
+ ```tsx
99
+ import { Icon } from 'pure-react-ui';
100
+
101
+ <Icon name="Home" size={24} color="#007bff" />
102
+ <Icon name="Search" size={32} onClick={handleClick} />
103
+ ```
104
+
105
+ **Props:**
106
+ - `name`: IconName (required) - Name of the icon to display
107
+ - `size`: number | string (default: 24) - Size of the icon
108
+ - `color`: string (default: 'currentColor') - Color of the icon
109
+ - `className`: string (optional) - Additional CSS classes
110
+ - `onClick`: () => void (optional) - Click handler (makes icon clickable)
111
+
112
+ **Available Icons:**
113
+
114
+ **Arrows & Navigation:**
115
+ ArrowLeft, ArrowRight, ArrowUp, ArrowDown, ArrowUpRight, ArrowDownRight, ChevronLeft, ChevronRight, ChevronUp, ChevronDown, DoubleChevronLeft, DoubleChevronRight, Home, Menu, Close, Search, Filter
116
+
117
+ **Actions:**
118
+ Plus, Minus, Check, X, Edit, Trash, Save, Download, Upload, Copy, Share
119
+
120
+ **Media:**
121
+ Play, Pause, Stop, VolumeUp, VolumeDown, VolumeOff, Image, Video, Camera
122
+
123
+ **Communication:**
124
+ Mail, Message, Phone, Bell, Notification
125
+
126
+ **Files:**
127
+ File, Folder, FolderOpen, FileText, FilePdf
128
+
129
+ **User:**
130
+ User, Users, UserPlus, UserMinus, Settings, Logout
131
+
132
+ **Status:**
133
+ CheckCircle, XCircle, AlertCircle, Info, Warning, Star, Heart, Bookmark
134
+
135
+ **Social:**
136
+ Facebook, Twitter, Instagram, Linkedin, Github, Youtube
137
+
138
+ **Technology:**
139
+ Wifi, Bluetooth, Battery, Zap, Lock, Unlock, Shield
140
+
141
+ **Shopping:**
142
+ ShoppingCart, ShoppingBag, CreditCard, Gift
143
+
144
+ **Time:**
145
+ Clock, Calendar, Timer
146
+
147
+ **Location:**
148
+ MapPin, Globe, Navigation
149
+
150
+ **Weather:**
151
+ Sun, Moon, Cloud
152
+
153
+ **Utility:**
154
+ Eye, EyeOff, Refresh, MoreVertical, MoreHorizontal, Grid, List
155
+
156
+ You can also import individual icons directly:
157
+ ```tsx
158
+ import { Home, Search, User } from 'pure-react-ui';
159
+
160
+ <Home size={24} color="#007bff" />
161
+ ```
162
+
163
+ ### Space
164
+
165
+ A layout component for adding consistent spacing between elements.
166
+
167
+ ```tsx
168
+ import { Space } from 'pure-react-ui';
169
+
170
+ <Space size="medium" direction="horizontal">
171
+ <Button>Button 1</Button>
172
+ <Button>Button 2</Button>
173
+ <Button>Button 3</Button>
174
+ </Space>
175
+
176
+ <Space size={20} direction="vertical" align="start">
177
+ <Card>Card 1</Card>
178
+ <Card>Card 2</Card>
179
+ </Space>
180
+ ```
181
+
182
+ **Props:**
183
+ - `size`: 'small' | 'medium' | 'large' | number (default: 'medium') - Spacing size between items
184
+ - `direction`: 'horizontal' | 'vertical' (default: 'horizontal') - Direction of spacing
185
+ - `align`: 'start' | 'end' | 'center' | 'baseline' | 'stretch' (default: 'center') - Alignment of items
186
+ - `wrap`: boolean (default: false) - Whether items should wrap to next line
187
+ - `className`: string (optional) - Additional CSS classes
188
+
189
+ ### Flex
190
+
191
+ A flexible container component based on CSS Flexbox.
192
+
193
+ ```tsx
194
+ import { Flex } from 'pure-react-ui';
195
+
196
+ <Flex direction="row" justify="between" align="center" gap="medium">
197
+ <Button>Left</Button>
198
+ <Button>Center</Button>
199
+ <Button>Right</Button>
200
+ </Flex>
201
+
202
+ <Flex direction="column" justify="start" align="stretch" gap={16}>
203
+ <Card>Card 1</Card>
204
+ <Card>Card 2</Card>
205
+ </Flex>
206
+ ```
207
+
208
+ **Props:**
209
+ - `direction`: 'row' | 'column' | 'row-reverse' | 'column-reverse' (default: 'row') - Flex direction
210
+ - `justify`: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' (default: 'start') - Justify content
211
+ - `align`: 'start' | 'end' | 'center' | 'baseline' | 'stretch' (default: 'start') - Align items
212
+ - `wrap`: boolean | 'wrap' | 'nowrap' | 'wrap-reverse' (default: false) - Flex wrap behavior
213
+ - `gap`: 'none' | 'small' | 'medium' | 'large' | number (default: 'none') - Gap between items
214
+ - `className`: string (optional) - Additional CSS classes
215
+ - `style`: React.CSSProperties (optional) - Additional inline styles
216
+
217
+ ### Text
218
+
219
+ A typography component for consistent text styling with various options.
220
+
221
+ ```tsx
222
+ import { Text } from 'pure-react-ui';
223
+
224
+ <Text as="h1" size="2xl" weight="bold" color="primary">
225
+ Heading Text
226
+ </Text>
227
+
228
+ <Text size="lg" color="muted" align="center">
229
+ Centered paragraph text
230
+ </Text>
231
+
232
+ <Text as="span" size="sm" decoration="underline" transform="uppercase">
233
+ Styled Text
234
+ </Text>
235
+ ```
236
+
237
+ **Props:**
238
+ - `as`: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'label' | 'small' | 'strong' | 'em' | 'code' | 'pre' (default: 'p') - HTML element to render
239
+ - `size`: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' (default: 'md') - Font size
240
+ - `weight`: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' (default: 'normal') - Font weight
241
+ - `color`: 'default' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'muted' (default: 'default') - Text color
242
+ - `align`: 'left' | 'center' | 'right' | 'justify' (default: 'left') - Text alignment
243
+ - `transform`: 'none' | 'uppercase' | 'lowercase' | 'capitalize' (default: 'none') - Text transform
244
+ - `decoration`: 'none' | 'underline' | 'line-through' | 'overline' (default: 'none') - Text decoration
245
+ - `truncate`: boolean (default: false) - Truncate text with ellipsis
246
+ - `className`: string (optional) - Additional CSS classes
247
+
248
+ ### Form Components
249
+
250
+ A comprehensive form component system with all form elements.
251
+
252
+ #### Form
253
+
254
+ The main form container component.
255
+
256
+ ```tsx
257
+ import { Form } from 'pure-react-ui';
258
+
259
+ <Form layout="vertical" onSubmit={handleSubmit}>
260
+ {/* Form fields */}
261
+ </Form>
262
+ ```
263
+
264
+ **Props:**
265
+ - `layout`: 'vertical' | 'horizontal' | 'inline' (default: 'vertical')
266
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
267
+ - `onSubmit`: (e: React.FormEvent) => void (optional)
268
+ - All standard form HTML attributes
269
+
270
+ #### Input
271
+
272
+ Text input field with validation and icons.
273
+
274
+ ```tsx
275
+ import { Input } from 'pure-react-ui';
276
+
277
+ <Input
278
+ label="Email"
279
+ type="email"
280
+ placeholder="Enter email"
281
+ error={errors.email}
282
+ helpText="We'll never share your email"
283
+ leftIcon={<Icon name="Mail" />}
284
+ fullWidth
285
+ />
286
+ ```
287
+
288
+ **Props:**
289
+ - `label`: string (optional)
290
+ - `error`: string (optional) - Error message
291
+ - `helpText`: string (optional) - Help text
292
+ - `leftIcon`: React.ReactNode (optional)
293
+ - `rightIcon`: React.ReactNode (optional)
294
+ - `fullWidth`: boolean (default: false)
295
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
296
+ - All standard input HTML attributes
297
+
298
+ #### Textarea
299
+
300
+ Multi-line text input.
301
+
302
+ ```tsx
303
+ import { Textarea } from 'pure-react-ui';
304
+
305
+ <Textarea
306
+ label="Message"
307
+ placeholder="Enter your message"
308
+ rows={4}
309
+ resize="vertical"
310
+ fullWidth
311
+ />
312
+ ```
313
+
314
+ **Props:**
315
+ - `label`: string (optional)
316
+ - `error`: string (optional)
317
+ - `helpText`: string (optional)
318
+ - `fullWidth`: boolean (default: false)
319
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
320
+ - `rows`: number (default: 4)
321
+ - `resize`: 'none' | 'both' | 'horizontal' | 'vertical' (default: 'vertical')
322
+ - All standard textarea HTML attributes
323
+
324
+ #### Select
325
+
326
+ Dropdown select component.
327
+
328
+ ```tsx
329
+ import { Select } from 'pure-react-ui';
330
+
331
+ <Select
332
+ label="Country"
333
+ options={[
334
+ { value: 'us', label: 'United States' },
335
+ { value: 'uk', label: 'United Kingdom' }
336
+ ]}
337
+ placeholder="Choose a country"
338
+ fullWidth
339
+ />
340
+ ```
341
+
342
+ **Props:**
343
+ - `label`: string (optional)
344
+ - `error`: string (optional)
345
+ - `helpText`: string (optional)
346
+ - `options`: SelectOption[] (required)
347
+ - `placeholder`: string (optional)
348
+ - `fullWidth`: boolean (default: false)
349
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
350
+ - All standard select HTML attributes
351
+
352
+ #### Checkbox
353
+
354
+ Checkbox input with custom styling.
355
+
356
+ ```tsx
357
+ import { Checkbox } from 'pure-react-ui';
358
+
359
+ <Checkbox
360
+ label="I agree to terms"
361
+ checked={checked}
362
+ onChange={(e) => setChecked(e.target.checked)}
363
+ />
364
+ ```
365
+
366
+ **Props:**
367
+ - `label`: string (optional)
368
+ - `error`: string (optional)
369
+ - `helpText`: string (optional)
370
+ - `fullWidth`: boolean (default: false)
371
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
372
+ - All standard checkbox HTML attributes
373
+
374
+ #### Radio
375
+
376
+ Radio button input.
377
+
378
+ ```tsx
379
+ import { Radio } from 'pure-react-ui';
380
+
381
+ <Radio
382
+ label="Option 1"
383
+ name="option"
384
+ value="1"
385
+ checked={selected === '1'}
386
+ onChange={(e) => setSelected(e.target.value)}
387
+ />
388
+ ```
389
+
390
+ **Props:**
391
+ - `label`: string (optional)
392
+ - `error`: string (optional)
393
+ - `helpText`: string (optional)
394
+ - `fullWidth`: boolean (default: false)
395
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
396
+ - All standard radio HTML attributes
397
+
398
+ #### Switch
399
+
400
+ Toggle switch component.
401
+
402
+ ```tsx
403
+ import { Switch } from 'pure-react-ui';
404
+
405
+ <Switch
406
+ label="Enable notifications"
407
+ checked={enabled}
408
+ onChange={(e) => setEnabled(e.target.checked)}
409
+ />
410
+ ```
411
+
412
+ **Props:**
413
+ - `label`: string (optional)
414
+ - `error`: string (optional)
415
+ - `helpText`: string (optional)
416
+ - `fullWidth`: boolean (default: false)
417
+ - `size`: 'small' | 'medium' | 'large' (default: 'medium')
418
+ - All standard checkbox HTML attributes (used as switch)
419
+
420
+ #### FormGroup
421
+
422
+ Container for grouping form fields.
423
+
424
+ ```tsx
425
+ import { FormGroup } from 'pure-react-ui';
426
+
427
+ <FormGroup label="Personal Information" required>
428
+ <Input label="Name" />
429
+ <Input label="Email" />
430
+ </FormGroup>
431
+ ```
432
+
433
+ **Props:**
434
+ - `label`: string (optional)
435
+ - `error`: string (optional)
436
+ - `helpText`: string (optional)
437
+ - `required`: boolean (default: false)
438
+ - `className`: string (optional)
439
+
440
+ #### FormRow
441
+
442
+ Horizontal row for form fields.
443
+
444
+ ```tsx
445
+ import { FormRow } from 'pure-react-ui';
446
+
447
+ <FormRow gap="medium">
448
+ <Input label="First Name" fullWidth />
449
+ <Input label="Last Name" fullWidth />
450
+ </FormRow>
451
+ ```
452
+
453
+ **Props:**
454
+ - `gap`: 'small' | 'medium' | 'large' | number (default: 'medium')
455
+ - `className`: string (optional)
456
+
457
+ ## Styling
458
+
459
+ All components include their own CSS files and use CSS classes with the `pure-` prefix. The CSS files are automatically imported with each component. You can also style them by targeting these classes:
460
+
461
+ - **Button**: `pure-button`, `pure-button--primary`, `pure-button--secondary`, etc.
462
+ - **Card**: `pure-card`, `pure-card--hoverable`, `pure-card--shadow-medium`, etc.
463
+ - **Modal**: `pure-modal`, `pure-modal__overlay`, `pure-modal__header`, etc.
464
+ - **Icon**: `pure-icon`, `pure-icon--clickable`, `pure-icon--small`, etc.
465
+ - **Space**: `pure-space`, `pure-space--horizontal`, `pure-space--vertical`, etc.
466
+ - **Flex**: `pure-flex`, `pure-flex--row`, `pure-flex--column`, etc.
467
+ - **Text**: `pure-text`, `pure-text--lg`, `pure-text--bold`, etc.
468
+ - **Form**: `pure-form`, `pure-form--vertical`, `pure-form--horizontal`, etc.
469
+ - **Input**: `pure-input`, `pure-input--error`, `pure-input--small`, etc.
470
+ - **Textarea**: `pure-textarea`, `pure-textarea--error`, etc.
471
+ - **Select**: `pure-select`, `pure-select--error`, etc.
472
+ - **Checkbox**: `pure-checkbox`, `pure-checkbox--error`, etc.
473
+ - **Radio**: `pure-radio`, `pure-radio--error`, etc.
474
+ - **Switch**: `pure-switch`, `pure-switch--error`, etc.
475
+
476
+ Each component has its own CSS file located in:
477
+ - `lib/components/Button/Button.css`
478
+ - `lib/components/Card/Card.css`
479
+ - `lib/components/Modal/Modal.css`
480
+ - `lib/components/Icon/Icon.css`
481
+ - `lib/components/Space/Space.css`
482
+ - `lib/components/Flex/Flex.css`
483
+ - `lib/components/Text/Text.css`
484
+ - `lib/components/Form/Form.css`
485
+
486
+ ## Examples
487
+
488
+ A complete example application is available in the `example` directory. To run it:
489
+
490
+ ```bash
491
+ # From the root directory, build the package first
492
+ npm run build
493
+
494
+ # Then navigate to example directory
495
+ cd example
496
+ npm install
497
+ npm run dev
498
+ ```
499
+
500
+ Or check out `EXAMPLES.md` for code examples and usage patterns.
501
+
502
+ ## License
503
+
504
+ MIT
505
+