@lzzjokerzzl/react-ui-components 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 +174 -0
- package/dist/index.cjs +68 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15571 -0
- package/dist/index.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alex Buelvas
|
|
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,174 @@
|
|
|
1
|
+
# @alex-buelvas/react-ui-components
|
|
2
|
+
|
|
3
|
+
A comprehensive React UI component library with animations, built with TypeScript and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **Modern Design**: Clean and professional UI components
|
|
8
|
+
- âš¡ **Smooth Animations**: Powered by Framer Motion
|
|
9
|
+
- 🔧 **TypeScript Support**: Full type safety and IntelliSense
|
|
10
|
+
- 🎯 **Tailwind CSS**: Utility-first CSS framework integration
|
|
11
|
+
- 📱 **Responsive**: Mobile-first responsive design
|
|
12
|
+
- ♿ **Accessible**: ARIA compliant components
|
|
13
|
+
- 🎠**Customizable**: Flexible styling with variants
|
|
14
|
+
- 🚀 **Performance**: Optimized for production
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @alex-buelvas/react-ui-components
|
|
20
|
+
# or
|
|
21
|
+
yarn add @alex-buelvas/react-ui-components
|
|
22
|
+
# or
|
|
23
|
+
pnpm add @alex-buelvas/react-ui-components
|
|
24
|
+
# or
|
|
25
|
+
bun add @alex-buelvas/react-ui-components
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { Button, Badge, Modal } from '@alex-buelvas/react-ui-components';
|
|
32
|
+
import '@alex-buelvas/react-ui-components/styles';
|
|
33
|
+
|
|
34
|
+
function App() {
|
|
35
|
+
return (
|
|
36
|
+
<div>
|
|
37
|
+
<Badge content="5" variant="solid" color="primary">
|
|
38
|
+
<Button>Notifications</Button>
|
|
39
|
+
</Badge>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Components
|
|
46
|
+
|
|
47
|
+
### Basic Components
|
|
48
|
+
- **Avatar** - User profile pictures with initials fallback
|
|
49
|
+
- **Badge** - Notification indicators and labels
|
|
50
|
+
- **Button** - Interactive buttons with multiple variants
|
|
51
|
+
- **Chip** - Compact elements for labels and filters
|
|
52
|
+
- **Image** - Optimized images with loading states
|
|
53
|
+
- **Input** - Form inputs with validation states
|
|
54
|
+
- **Progress** - Progress indicators and loading bars
|
|
55
|
+
- **Spinner** - Loading spinners with different styles
|
|
56
|
+
- **Switch** - Toggle switches for boolean values
|
|
57
|
+
|
|
58
|
+
### Layout & Navigation
|
|
59
|
+
- **Modal** - Overlay dialogs and popups
|
|
60
|
+
- **Navbar** - Navigation bars and headers
|
|
61
|
+
- **Table** - Data tables with sorting and pagination
|
|
62
|
+
|
|
63
|
+
### Animation Components
|
|
64
|
+
- **AnimatedContainer** - Fade, slide, scale, bounce, flip, stagger, morphing, and parallax containers
|
|
65
|
+
- **Animation** - Basic animation components (FadeIn, SlideIn, ScaleIn, RotateIn, Bounce, Stagger)
|
|
66
|
+
- **TextAnimation** - Typewriter, reveal, counter, gradient, morphing, and glitch text effects
|
|
67
|
+
|
|
68
|
+
## Usage Examples
|
|
69
|
+
|
|
70
|
+
### Animated Containers
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
import { FadeContainer, SlideContainer, BounceContainer } from '@alex-buelvas/react-ui-components';
|
|
74
|
+
|
|
75
|
+
<FadeContainer triggerOnce>
|
|
76
|
+
<h1>This fades in when visible</h1>
|
|
77
|
+
</FadeContainer>
|
|
78
|
+
|
|
79
|
+
<SlideContainer direction="up" distance={50}>
|
|
80
|
+
<div>This slides up from bottom</div>
|
|
81
|
+
</SlideContainer>
|
|
82
|
+
|
|
83
|
+
<BounceContainer intensity="high">
|
|
84
|
+
<button>This bounces in</button>
|
|
85
|
+
</BounceContainer>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Text Animations
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { TypeWriter, RevealText, CounterText } from '@alex-buelvas/react-ui-components';
|
|
92
|
+
|
|
93
|
+
<TypeWriter
|
|
94
|
+
text="Hello, World!"
|
|
95
|
+
speed={100}
|
|
96
|
+
showCursor
|
|
97
|
+
/>
|
|
98
|
+
|
|
99
|
+
<RevealText
|
|
100
|
+
text="Revealing word by word"
|
|
101
|
+
mode="word"
|
|
102
|
+
preset="elegant"
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<CounterText
|
|
106
|
+
from={0}
|
|
107
|
+
to={1000}
|
|
108
|
+
duration={2000}
|
|
109
|
+
format="number"
|
|
110
|
+
/>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Interactive Components
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import { Modal, useModal, Switch, Progress } from '@alex-buelvas/react-ui-components';
|
|
117
|
+
|
|
118
|
+
function Example() {
|
|
119
|
+
const { isOpen, open, close } = useModal();
|
|
120
|
+
const [enabled, setEnabled] = useState(false);
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<>
|
|
124
|
+
<Switch
|
|
125
|
+
checked={enabled}
|
|
126
|
+
onChange={setEnabled}
|
|
127
|
+
size="lg"
|
|
128
|
+
color="primary"
|
|
129
|
+
/>
|
|
130
|
+
|
|
131
|
+
<Progress
|
|
132
|
+
value={75}
|
|
133
|
+
variant="gradient"
|
|
134
|
+
size="md"
|
|
135
|
+
showLabel
|
|
136
|
+
/>
|
|
137
|
+
|
|
138
|
+
<Modal isOpen={isOpen} onClose={close}>
|
|
139
|
+
<h2>Modal Content</h2>
|
|
140
|
+
</Modal>
|
|
141
|
+
</>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Styling
|
|
147
|
+
|
|
148
|
+
This library uses Tailwind CSS for styling. Make sure you have Tailwind CSS configured in your project, or import the included styles:
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
import '@alex-buelvas/react-ui-components/styles';
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## TypeScript Support
|
|
155
|
+
|
|
156
|
+
All components are built with TypeScript and include comprehensive type definitions:
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
import type {
|
|
160
|
+
ButtonProps,
|
|
161
|
+
ModalProps,
|
|
162
|
+
AnimatedContainerConfig,
|
|
163
|
+
TextAnimationPreset
|
|
164
|
+
} from '@alex-buelvas/react-ui-components';
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Requirements
|
|
168
|
+
|
|
169
|
+
- React >= 18.0.0
|
|
170
|
+
- React DOM >= 18.0.0
|
|
171
|
+
|
|
172
|
+
## License
|
|
173
|
+
|
|
174
|
+
MIT © Alex Buelvas
|