@lzzjokerzzl/react-ui-components 1.1.1 → 1.2.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @alex-buelvas/react-ui-components
1
+ # @lzzjokerzzl/react-ui-components
2
2
 
3
3
  A comprehensive React UI component library with animations, built with TypeScript and Tailwind CSS.
4
4
 
@@ -16,20 +16,20 @@ A comprehensive React UI component library with animations, built with TypeScrip
16
16
  ## Installation
17
17
 
18
18
  ```bash
19
- npm install @alex-buelvas/react-ui-components
19
+ npm install @lzzjokerzzl/react-ui-components
20
20
  # or
21
- yarn add @alex-buelvas/react-ui-components
22
- # or
23
- pnpm add @alex-buelvas/react-ui-components
21
+ yarn add @lzzjokerzzl/react-ui-components
24
22
  # or
25
- bun add @alex-buelvas/react-ui-components
23
+ pnpm add @lzzjokerzzl/react-ui-components
24
+ # or
25
+ bun add @lzzjokerzzl/react-ui-components
26
26
  ```
27
27
 
28
28
  ## Quick Start
29
29
 
30
30
  ```tsx
31
- import { Button, Badge, Modal } from '@alex-buelvas/react-ui-components';
32
- import '@alex-buelvas/react-ui-components/styles';
31
+ import { Button, Badge, Modal } from "@lzzjokerzzl/react-ui-components";
32
+ import "@lzzjokerzzl/react-ui-components/styles";
33
33
 
34
34
  function App() {
35
35
  return (
@@ -45,22 +45,41 @@ function App() {
45
45
  ## Components
46
46
 
47
47
  ### Basic Components
48
+
49
+ - **Accordion** - Collapsible content sections
50
+ - **Autocomplete** - Search input with suggestions
48
51
  - **Avatar** - User profile pictures with initials fallback
49
- - **Badge** - Notification indicators and labels
52
+ - **Badge** - Notification indicators and labels
50
53
  - **Button** - Interactive buttons with multiple variants
54
+ - **Card** - Content containers with various styles
55
+ - **Checkbox** - Checkbox inputs with custom styling
51
56
  - **Chip** - Compact elements for labels and filters
52
57
  - **Image** - Optimized images with loading states
53
58
  - **Input** - Form inputs with validation states
59
+ - **Pagination** - Page navigation controls
54
60
  - **Progress** - Progress indicators and loading bars
55
61
  - **Spinner** - Loading spinners with different styles
56
62
  - **Switch** - Toggle switches for boolean values
63
+ - **Toast** - Notification messages and alerts
64
+ - **Tooltip** - Contextual information overlays
65
+ - **User** - User profile display components
57
66
 
58
67
  ### Layout & Navigation
68
+
69
+ - **Breadcrumb** - Navigation breadcrumbs with router support
59
70
  - **Modal** - Overlay dialogs and popups
60
71
  - **Navbar** - Navigation bars and headers
72
+ - **Sidebar** - Collapsible sidebar navigation with router integration
61
73
  - **Table** - Data tables with sorting and pagination
62
74
 
75
+ ### Router Components
76
+
77
+ - **LibraryLink** - Enhanced Link component with active state management
78
+ - **Navigation** - Navigation components with React Router integration
79
+ - **useLibraryNavigation** - Hook for programmatic navigation
80
+
63
81
  ### Animation Components
82
+
64
83
  - **AnimatedContainer** - Fade, slide, scale, bounce, flip, stagger, morphing, and parallax containers
65
84
  - **Animation** - Basic animation components (FadeIn, SlideIn, ScaleIn, RotateIn, Bounce, Stagger)
66
85
  - **TextAnimation** - Typewriter, reveal, counter, gradient, morphing, and glitch text effects
@@ -70,7 +89,7 @@ function App() {
70
89
  ### Animated Containers
71
90
 
72
91
  ```tsx
73
- import { FadeContainer, SlideContainer, BounceContainer } from '@alex-buelvas/react-ui-components';
92
+ import { FadeContainer, SlideContainer, BounceContainer } from '@lzzjokerzzl/react-ui-components';
74
93
 
75
94
  <FadeContainer triggerOnce>
76
95
  <h1>This fades in when visible</h1>
@@ -88,21 +107,21 @@ import { FadeContainer, SlideContainer, BounceContainer } from '@alex-buelvas/re
88
107
  ### Text Animations
89
108
 
90
109
  ```tsx
91
- import { TypeWriter, RevealText, CounterText } from '@alex-buelvas/react-ui-components';
110
+ import { TypeWriter, RevealText, CounterText } from '@lzzjokerzzl/react-ui-components';
92
111
 
93
- <TypeWriter
94
- text="Hello, World!"
112
+ <TypeWriter
113
+ text="Hello, World!"
95
114
  speed={100}
96
115
  showCursor
97
116
  />
98
117
 
99
- <RevealText
118
+ <RevealText
100
119
  text="Revealing word by word"
101
120
  mode="word"
102
121
  preset="elegant"
103
122
  />
104
123
 
105
- <CounterText
124
+ <CounterText
106
125
  from={0}
107
126
  to={1000}
108
127
  duration={2000}
@@ -113,28 +132,28 @@ import { TypeWriter, RevealText, CounterText } from '@alex-buelvas/react-ui-comp
113
132
  ### Interactive Components
114
133
 
115
134
  ```tsx
116
- import { Modal, useModal, Switch, Progress } from '@alex-buelvas/react-ui-components';
135
+ import {
136
+ Modal,
137
+ useModal,
138
+ Switch,
139
+ Progress,
140
+ } from "@lzzjokerzzl/react-ui-components";
117
141
 
118
142
  function Example() {
119
143
  const { isOpen, open, close } = useModal();
120
144
  const [enabled, setEnabled] = useState(false);
121
-
145
+
122
146
  return (
123
147
  <>
124
- <Switch
148
+ <Switch
125
149
  checked={enabled}
126
150
  onChange={setEnabled}
127
151
  size="lg"
128
152
  color="primary"
129
153
  />
130
-
131
- <Progress
132
- value={75}
133
- variant="gradient"
134
- size="md"
135
- showLabel
136
- />
137
-
154
+
155
+ <Progress value={75} variant="gradient" size="md" showLabel />
156
+
138
157
  <Modal isOpen={isOpen} onClose={close}>
139
158
  <h2>Modal Content</h2>
140
159
  </Modal>
@@ -143,12 +162,156 @@ function Example() {
143
162
  }
144
163
  ```
145
164
 
165
+ ## Router Integration
166
+
167
+ The library includes router components that integrate seamlessly with React Router while maintaining backward compatibility.
168
+
169
+ ### Setup
170
+
171
+ For router functionality, install React Router as a peer dependency:
172
+
173
+ ```bash
174
+ npm install react-router
175
+ # or
176
+ yarn add react-router
177
+ ```
178
+
179
+ ### Navigation Components
180
+
181
+ #### Breadcrumb with Router Support
182
+
183
+ ```tsx
184
+ import { Breadcrumb, BreadcrumbItem } from '@lzzjokerzzl/react-ui-components';
185
+
186
+ function Navigation() {
187
+ return (
188
+ <Breadcrumb>
189
+ <BreadcrumbItem to="/">Home</BreadcrumbItem>
190
+ <BreadcrumbItem to="/products">Products</BreadcrumbItem>
191
+ <BreadcrumbItem isCurrent>Laptop</BreadcrumbItem>
192
+ </Breadcrumb>
193
+ );
194
+ }
195
+ ```
196
+
197
+ #### Sidebar Navigation
198
+
199
+ ```tsx
200
+ import {
201
+ Sidebar,
202
+ SidebarHeader,
203
+ SidebarContent,
204
+ SidebarItem,
205
+ SidebarFooter
206
+ } from '@lzzjokerzzl/react-ui-components';
207
+
208
+ function AppSidebar() {
209
+ return (
210
+ <Sidebar>
211
+ <SidebarHeader>
212
+ <h2>My App</h2>
213
+ </SidebarHeader>
214
+
215
+ <SidebarContent>
216
+ <SidebarItem to="/dashboard" icon={<DashboardIcon />}>
217
+ Dashboard
218
+ </SidebarItem>
219
+ <SidebarItem to="/profile" icon={<ProfileIcon />}>
220
+ Profile
221
+ </SidebarItem>
222
+ <SidebarItem to="/settings" icon={<SettingsIcon />}>
223
+ Settings
224
+ </SidebarItem>
225
+ </SidebarContent>
226
+
227
+ <SidebarFooter>
228
+ <SidebarItem to="/logout" icon={<LogoutIcon />}>
229
+ Logout
230
+ </SidebarItem>
231
+ </SidebarFooter>
232
+ </Sidebar>
233
+ );
234
+ }
235
+ ```
236
+
237
+ #### LibraryLink Component
238
+
239
+ ```tsx
240
+ import { LibraryLink } from '@lzzjokerzzl/react-ui-components';
241
+
242
+ function CustomNavigation() {
243
+ return (
244
+ <nav>
245
+ <LibraryLink
246
+ to="/dashboard"
247
+ activeClassName="text-blue-500 font-bold"
248
+ exact
249
+ >
250
+ Dashboard
251
+ </LibraryLink>
252
+
253
+ <LibraryLink
254
+ to="/profile"
255
+ activeClassName="text-blue-500 font-bold"
256
+ >
257
+ Profile
258
+ </LibraryLink>
259
+ </nav>
260
+ );
261
+ }
262
+ ```
263
+
264
+ #### Programmatic Navigation
265
+
266
+ ```tsx
267
+ import { useLibraryNavigation } from '@lzzjokerzzl/react-ui-components';
268
+
269
+ function MyComponent() {
270
+ const { navigate, goBack, goForward } = useLibraryNavigation();
271
+
272
+ const handleSaveAndRedirect = async () => {
273
+ await saveData();
274
+ navigate('/success', { replace: true });
275
+ };
276
+
277
+ return (
278
+ <div>
279
+ <button onClick={() => navigate('/profile')}>
280
+ Go to Profile
281
+ </button>
282
+ <button onClick={goBack}>
283
+ Go Back
284
+ </button>
285
+ <button onClick={handleSaveAndRedirect}>
286
+ Save and Continue
287
+ </button>
288
+ </div>
289
+ );
290
+ }
291
+ ```
292
+
293
+ ### Backward Compatibility
294
+
295
+ All navigation components support both old (`href`) and new (`to`) props:
296
+
297
+ ```tsx
298
+ // Old way (still supported)
299
+ <BreadcrumbItem href="/home">Home</BreadcrumbItem>
300
+ <SidebarItem href="/dashboard">Dashboard</SidebarItem>
301
+
302
+ // New way (recommended for React Router integration)
303
+ <BreadcrumbItem to="/home">Home</BreadcrumbItem>
304
+ <SidebarItem to="/dashboard">Dashboard</SidebarItem>
305
+ ```
306
+
307
+ When both props are provided, `to` takes precedence, allowing for gradual migration.
308
+
146
309
  ## Styling
147
310
 
148
311
  This library uses Tailwind CSS for styling. Make sure you have Tailwind CSS configured in your project, or import the included styles:
149
312
 
150
313
  ```tsx
151
- import '@alex-buelvas/react-ui-components/styles';
314
+ import "@lzzjokerzzl/react-ui-components/styles";
152
315
  ```
153
316
 
154
317
  ## TypeScript Support
@@ -156,18 +319,19 @@ import '@alex-buelvas/react-ui-components/styles';
156
319
  All components are built with TypeScript and include comprehensive type definitions:
157
320
 
158
321
  ```tsx
159
- import type {
160
- ButtonProps,
161
- ModalProps,
322
+ import type {
323
+ ButtonProps,
324
+ ModalProps,
162
325
  AnimatedContainerConfig,
163
- TextAnimationPreset
164
- } from '@alex-buelvas/react-ui-components';
326
+ TextAnimationPreset,
327
+ } from "@lzzjokerzzl/react-ui-components";
165
328
  ```
166
329
 
167
330
  ## Requirements
168
331
 
169
332
  - React >= 18.0.0
170
333
  - React DOM >= 18.0.0
334
+ - React Router >= 6.0.0 (optional, for router components)
171
335
 
172
336
  ## License
173
337