my-animated-components 1.0.6 → 1.0.8

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 (111) hide show
  1. package/dist/index.js +439 -2
  2. package/package.json +1 -1
  3. package/readme.md +6 -3
  4. package/dist/src/components/accordion/Accordion.d.ts +0 -16
  5. package/dist/src/components/alert/Alert.d.ts +0 -9
  6. package/dist/src/components/avatar/Avatar.d.ts +0 -9
  7. package/dist/src/components/badge/Badge.d.ts +0 -8
  8. package/dist/src/components/breadcrumb/Breadcrumb.d.ts +0 -12
  9. package/dist/src/components/buttons/Button.d.ts +0 -13
  10. package/dist/src/components/buttons/IconButton.d.ts +0 -14
  11. package/dist/src/components/card/Card.d.ts +0 -8
  12. package/dist/src/components/card/CardBody.d.ts +0 -8
  13. package/dist/src/components/card/CardFooter.d.ts +0 -8
  14. package/dist/src/components/card/CardHeader.d.ts +0 -8
  15. package/dist/src/components/dropdown/Dropdown.d.ts +0 -9
  16. package/dist/src/components/dropdown/DropdownItem.d.ts +0 -3
  17. package/dist/src/components/form/Checkbox.d.ts +0 -13
  18. package/dist/src/components/form/FileUpload.d.ts +0 -13
  19. package/dist/src/components/form/Input.d.ts +0 -10
  20. package/dist/src/components/form/Radio.d.ts +0 -15
  21. package/dist/src/components/form/Select.d.ts +0 -16
  22. package/dist/src/components/form/Switch.d.ts +0 -13
  23. package/dist/src/components/form/Textarea.d.ts +0 -14
  24. package/dist/src/components/layout/Container.d.ts +0 -9
  25. package/dist/src/components/layout/Flex.d.ts +0 -10
  26. package/dist/src/components/layout/Grid.d.ts +0 -8
  27. package/dist/src/components/list/List.d.ts +0 -7
  28. package/dist/src/components/list/ListItem.d.ts +0 -3
  29. package/dist/src/components/modal/Modal.d.ts +0 -8
  30. package/dist/src/components/modal/ModalBody.d.ts +0 -3
  31. package/dist/src/components/modal/ModalFooter.d.ts +0 -3
  32. package/dist/src/components/modal/ModalHeader.d.ts +0 -3
  33. package/dist/src/components/navigation/NavItem.d.ts +0 -8
  34. package/dist/src/components/navigation/Navbar.d.ts +0 -7
  35. package/dist/src/components/offcanvas/Offcanvas.d.ts +0 -9
  36. package/dist/src/components/offcanvas/OffcanvasBody.d.ts +0 -3
  37. package/dist/src/components/offcanvas/OffcanvasHeader.d.ts +0 -7
  38. package/dist/src/components/pagination/Pagination.d.ts +0 -13
  39. package/dist/src/components/progress/ProgressBar.d.ts +0 -12
  40. package/dist/src/components/skeleton/Skeleton.d.ts +0 -12
  41. package/dist/src/components/slider/RangeSlider.d.ts +0 -14
  42. package/dist/src/components/slider/Slider.d.ts +0 -14
  43. package/dist/src/components/stepper/Stepper.d.ts +0 -8
  44. package/dist/src/components/table/Table.d.ts +0 -10
  45. package/dist/src/components/table/TableBody.d.ts +0 -3
  46. package/dist/src/components/table/TableCell.d.ts +0 -7
  47. package/dist/src/components/table/TableHead.d.ts +0 -3
  48. package/dist/src/components/table/TableRow.d.ts +0 -3
  49. package/dist/src/components/tabs/Tabs.d.ts +0 -14
  50. package/dist/src/components/tooltip/Tooltip.d.ts +0 -12
  51. package/dist/src/components/typography/Heading.d.ts +0 -7
  52. package/dist/src/components/typography/Text.d.ts +0 -7
  53. package/dist/src/index.d.ts +0 -51
  54. package/dist/src/utils/motionVariants.d.ts +0 -2
  55. package/dist/types/common.d.ts +0 -14
  56. package/rollup.config.js +0 -19
  57. package/src/components/accordion/Accordion.tsx +0 -108
  58. package/src/components/alert/Alert.tsx +0 -61
  59. package/src/components/avatar/Avatar.tsx +0 -29
  60. package/src/components/badge/Badge.tsx +0 -48
  61. package/src/components/breadcrumb/Breadcrumb.tsx +0 -56
  62. package/src/components/buttons/Button.tsx +0 -81
  63. package/src/components/buttons/IconButton.tsx +0 -86
  64. package/src/components/card/Card.tsx +0 -23
  65. package/src/components/card/CardBody.tsx +0 -23
  66. package/src/components/card/CardFooter.tsx +0 -23
  67. package/src/components/card/CardHeader.tsx +0 -23
  68. package/src/components/dropdown/Dropdown.tsx +0 -55
  69. package/src/components/dropdown/DropdownItem.tsx +0 -15
  70. package/src/components/form/Checkbox.tsx +0 -52
  71. package/src/components/form/FileUpload.tsx +0 -71
  72. package/src/components/form/Input.tsx +0 -44
  73. package/src/components/form/Radio.tsx +0 -67
  74. package/src/components/form/Select.tsx +0 -64
  75. package/src/components/form/Switch.tsx +0 -60
  76. package/src/components/form/Textarea.tsx +0 -62
  77. package/src/components/layout/Container.tsx +0 -25
  78. package/src/components/layout/Flex.tsx +0 -33
  79. package/src/components/layout/Grid.tsx +0 -16
  80. package/src/components/list/List.tsx +0 -23
  81. package/src/components/list/ListItem.tsx +0 -17
  82. package/src/components/modal/Modal.tsx +0 -41
  83. package/src/components/modal/ModalBody.tsx +0 -11
  84. package/src/components/modal/ModalFooter.tsx +0 -11
  85. package/src/components/modal/ModalHeader.tsx +0 -11
  86. package/src/components/navigation/NavItem.tsx +0 -24
  87. package/src/components/navigation/Navbar.tsx +0 -30
  88. package/src/components/offcanvas/Offcanvas.tsx +0 -59
  89. package/src/components/offcanvas/OffcanvasBody.tsx +0 -11
  90. package/src/components/offcanvas/OffcanvasHeader.tsx +0 -24
  91. package/src/components/pagination/Pagination.tsx +0 -96
  92. package/src/components/progress/ProgressBar.tsx +0 -49
  93. package/src/components/skeleton/Skeleton.tsx +0 -40
  94. package/src/components/slider/RangeSlider.tsx +0 -81
  95. package/src/components/slider/Slider.tsx +0 -60
  96. package/src/components/stepper/Stepper.tsx +0 -50
  97. package/src/components/table/Table.tsx +0 -45
  98. package/src/components/table/TableBody.tsx +0 -11
  99. package/src/components/table/TableCell.tsx +0 -18
  100. package/src/components/table/TableHead.tsx +0 -11
  101. package/src/components/table/TableRow.tsx +0 -17
  102. package/src/components/tabs/Tabs.tsx +0 -65
  103. package/src/components/tooltip/Tooltip.tsx +0 -67
  104. package/src/components/typography/Heading.tsx +0 -31
  105. package/src/components/typography/Text.tsx +0 -30
  106. package/src/index.ts +0 -104
  107. package/src/styles/tailwind.css +0 -3
  108. package/src/utils/motionVariants.ts +0 -47
  109. package/tailwind.config.js +0 -10
  110. package/tsconfig.json +0 -17
  111. package/types/common.ts +0 -20
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ var css_248z = "@tailwind base;\r\n@tailwind components;\r\n@tailwind utilities;
32
32
  styleInject(css_248z);
33
33
 
34
34
  const motionVariants = {
35
+ null: {},
35
36
  fadeIn: {
36
37
  hidden: { opacity: 0 },
37
38
  visible: { opacity: 1, transition: { duration: 0.5 } },
@@ -75,6 +76,435 @@ const motionVariants = {
75
76
  hidden: { rotateY: 90, opacity: 0 },
76
77
  visible: { rotateY: 0, opacity: 1, transition: { duration: 0.5 } },
77
78
  },
79
+ fadeOut: {
80
+ hidden: { opacity: 1 },
81
+ visible: { opacity: 0, transition: { duration: 0.5 } },
82
+ },
83
+ zoomOut: {
84
+ hidden: { scale: 1, opacity: 1 },
85
+ visible: { scale: 0.8, opacity: 0, transition: { duration: 0.5 } },
86
+ },
87
+ scaleUp: {
88
+ hidden: { scale: 0.5, opacity: 0 },
89
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.5 } },
90
+ },
91
+ scaleDown: {
92
+ hidden: { scale: 1.2, opacity: 0 },
93
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.5 } },
94
+ },
95
+ fadeInUp: {
96
+ hidden: { opacity: 0, y: 50 },
97
+ visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
98
+ },
99
+ fadeInDown: {
100
+ hidden: { opacity: 0, y: -50 },
101
+ visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
102
+ },
103
+ fadeInLeft: {
104
+ hidden: { opacity: 0, x: -50 },
105
+ visible: { opacity: 1, x: 0, transition: { duration: 0.5 } },
106
+ },
107
+ fadeInRight: {
108
+ hidden: { opacity: 0, x: 50 },
109
+ visible: { opacity: 1, x: 0, transition: { duration: 0.5 } },
110
+ },
111
+ rotateBounce: {
112
+ hidden: { rotate: -45, opacity: 0 },
113
+ visible: { rotate: 0, opacity: 1, transition: { type: 'spring', stiffness: 100 } },
114
+ },
115
+ scaleBounce: {
116
+ hidden: { scale: 0.5 },
117
+ visible: { scale: 1.2, transition: { type: 'spring', stiffness: 100 } },
118
+ },
119
+ fadeInScale: {
120
+ hidden: { opacity: 0, scale: 0.8 },
121
+ visible: { opacity: 1, scale: 1, transition: { duration: 0.5 } },
122
+ },
123
+ bounceOut: {
124
+ hidden: { scale: 1.2 },
125
+ visible: { scale: 0.8, transition: { type: 'spring', stiffness: 100 } },
126
+ },
127
+ shake: {
128
+ hidden: { x: 0 },
129
+ visible: { x: [0, -10, 10, -10, 10, 0], transition: { duration: 0.6, repeat: Infinity } },
130
+ },
131
+ pulse: {
132
+ hidden: { scale: 1 },
133
+ visible: { scale: [1, 1.1, 1], transition: { duration: 1.5, repeat: Infinity } },
134
+ },
135
+ fadeInFast: {
136
+ hidden: { opacity: 0 },
137
+ visible: { opacity: 1, transition: { duration: 0.2 } },
138
+ },
139
+ slideUpFast: {
140
+ hidden: { y: 30, opacity: 0 },
141
+ visible: { y: 0, opacity: 1, transition: { duration: 0.3 } },
142
+ },
143
+ fadeUp: {
144
+ hidden: { opacity: 0, y: 50 },
145
+ visible: { opacity: 1, y: 0, transition: { duration: 0.4 } },
146
+ },
147
+ zoomInFast: {
148
+ hidden: { scale: 0.6, opacity: 0 },
149
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.3 } },
150
+ },
151
+ zoomOutFast: {
152
+ hidden: { scale: 1, opacity: 1 },
153
+ visible: { scale: 0.6, opacity: 0, transition: { duration: 0.3 } },
154
+ },
155
+ slideDownFast: {
156
+ hidden: { y: -30, opacity: 0 },
157
+ visible: { y: 0, opacity: 1, transition: { duration: 0.3 } },
158
+ },
159
+ rotateOut: {
160
+ hidden: { rotate: 180, opacity: 0 },
161
+ visible: { rotate: 0, opacity: 1, transition: { duration: 0.5 } },
162
+ },
163
+ flipFast: {
164
+ hidden: { rotateY: 90, opacity: 0 },
165
+ visible: { rotateY: 0, opacity: 1, transition: { duration: 0.3 } },
166
+ },
167
+ staggerUp: {
168
+ hidden: { opacity: 0 },
169
+ visible: {
170
+ opacity: 1,
171
+ transition: { staggerChildren: 0.15 },
172
+ },
173
+ },
174
+ flipIn: {
175
+ hidden: { rotateY: 180, opacity: 0 },
176
+ visible: { rotateY: 0, opacity: 1, transition: { duration: 0.5 } },
177
+ },
178
+ fadeInSlow: {
179
+ hidden: { opacity: 0 },
180
+ visible: { opacity: 1, transition: { duration: 1.5 } },
181
+ },
182
+ slideUpSlow: {
183
+ hidden: { y: 50, opacity: 0 },
184
+ visible: { y: 0, opacity: 1, transition: { duration: 1.5 } },
185
+ },
186
+ slideDownSlow: {
187
+ hidden: { y: -50, opacity: 0 },
188
+ visible: { y: 0, opacity: 1, transition: { duration: 1.5 } },
189
+ },
190
+ slideLeftSlow: {
191
+ hidden: { x: 50, opacity: 0 },
192
+ visible: { x: 0, opacity: 1, transition: { duration: 1.5 } },
193
+ },
194
+ slideRightSlow: {
195
+ hidden: { x: -50, opacity: 0 },
196
+ visible: { x: 0, opacity: 1, transition: { duration: 1.5 } },
197
+ },
198
+ bounceSlow: {
199
+ hidden: { scale: 0.8 },
200
+ visible: { scale: 1, transition: { type: 'spring', stiffness: 50 } },
201
+ },
202
+ rotateInSlow: {
203
+ hidden: { rotate: -90, opacity: 0 },
204
+ visible: { rotate: 0, opacity: 1, transition: { duration: 1.5 } },
205
+ },
206
+ staggerSlow: {
207
+ hidden: { opacity: 0 },
208
+ visible: {
209
+ opacity: 1,
210
+ transition: { staggerChildren: 0.5 },
211
+ },
212
+ },
213
+ flipSlow: {
214
+ hidden: { rotateY: 90, opacity: 0 },
215
+ visible: { rotateY: 0, opacity: 1, transition: { duration: 1.5 } },
216
+ },
217
+ scaleBounceSlow: {
218
+ hidden: { scale: 0.6 },
219
+ visible: { scale: 1, transition: { type: 'spring', stiffness: 50 } },
220
+ },
221
+ rotateOutFast: {
222
+ hidden: { rotate: 180, opacity: 0 },
223
+ visible: { rotate: 0, opacity: 1, transition: { duration: 0.3 } },
224
+ },
225
+ scaleUpFast: {
226
+ hidden: { scale: 0.5, opacity: 0 },
227
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.3 } },
228
+ },
229
+ scaleDownFast: {
230
+ hidden: { scale: 1.2, opacity: 0 },
231
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.3 } },
232
+ },
233
+ bounceFast: {
234
+ hidden: { scale: 0.8 },
235
+ visible: { scale: 1, transition: { type: 'spring', stiffness: 100 } },
236
+ },
237
+ flipInFast: {
238
+ hidden: { rotateY: 180, opacity: 0 },
239
+ visible: { rotateY: 0, opacity: 1, transition: { duration: 0.3 } },
240
+ },
241
+ fadeInLeftFast: {
242
+ hidden: { opacity: 0, x: -50 },
243
+ visible: { opacity: 1, x: 0, transition: { duration: 0.3 } },
244
+ },
245
+ fadeInRightFast: {
246
+ hidden: { opacity: 0, x: 50 },
247
+ visible: { opacity: 1, x: 0, transition: { duration: 0.3 } },
248
+ },
249
+ fadeInUpFast: {
250
+ hidden: { opacity: 0, y: 30 },
251
+ visible: { opacity: 1, y: 0, transition: { duration: 0.3 } },
252
+ },
253
+ fadeInDownFast: {
254
+ hidden: { opacity: 0, y: -30 },
255
+ visible: { opacity: 1, y: 0, transition: { duration: 0.3 } },
256
+ },
257
+ scaleUpSlow: {
258
+ hidden: { scale: 0.5, opacity: 0 },
259
+ visible: { scale: 1, opacity: 1, transition: { duration: 1.5 } },
260
+ },
261
+ scaleDownSlow: {
262
+ hidden: { scale: 1.2, opacity: 0 },
263
+ visible: { scale: 1, opacity: 1, transition: { duration: 1.5 } },
264
+ },
265
+ rotateInFast: {
266
+ hidden: { rotate: -90, opacity: 0 },
267
+ visible: { rotate: 0, opacity: 1, transition: { duration: 0.3 } },
268
+ },
269
+ staggerChildren: {
270
+ hidden: { opacity: 0 },
271
+ visible: {
272
+ opacity: 1,
273
+ transition: { staggerChildren: 0.25 },
274
+ },
275
+ },
276
+ fadeUpSlow: {
277
+ hidden: { opacity: 0, y: 50 },
278
+ visible: { opacity: 1, y: 0, transition: { duration: 1.5 } },
279
+ },
280
+ slideInFromLeft: {
281
+ hidden: { x: -100, opacity: 0 },
282
+ visible: { x: 0, opacity: 1, transition: { duration: 0.5 } },
283
+ },
284
+ slideInFromRight: {
285
+ hidden: { x: 100, opacity: 0 },
286
+ visible: { x: 0, opacity: 1, transition: { duration: 0.5 } },
287
+ },
288
+ slideInFromTop: {
289
+ hidden: { y: -100, opacity: 0 },
290
+ visible: { y: 0, opacity: 1, transition: { duration: 0.5 } },
291
+ },
292
+ slideInFromBottom: {
293
+ hidden: { y: 100, opacity: 0 },
294
+ visible: { y: 0, opacity: 1, transition: { duration: 0.5 } },
295
+ },
296
+ fadeInSlowFromTop: {
297
+ hidden: { opacity: 0, y: -50 },
298
+ visible: { opacity: 1, y: 0, transition: { duration: 1.5 } },
299
+ },
300
+ fadeInSlowFromBottom: {
301
+ hidden: { opacity: 0, y: 50 },
302
+ visible: { opacity: 1, y: 0, transition: { duration: 1.5 } },
303
+ },
304
+ fadeInSlowFromLeft: {
305
+ hidden: { opacity: 0, x: -50 },
306
+ visible: { opacity: 1, x: 0, transition: { duration: 1.5 } },
307
+ },
308
+ fadeInSlowFromRight: {
309
+ hidden: { opacity: 0, x: 50 },
310
+ visible: { opacity: 1, x: 0, transition: { duration: 1.5 } },
311
+ },
312
+ bounceIn: {
313
+ hidden: { scale: 0.8 },
314
+ visible: { scale: 1, transition: { type: 'spring', stiffness: 150 } },
315
+ },
316
+ zoomOutSlow: {
317
+ hidden: { scale: 1, opacity: 1 },
318
+ visible: { scale: 0.6, opacity: 0, transition: { duration: 1.5 } },
319
+ },
320
+ fadeInFastFromTop: {
321
+ hidden: { opacity: 0, y: -30 },
322
+ visible: { opacity: 1, y: 0, transition: { duration: 0.3 } },
323
+ },
324
+ fadeInFastFromBottom: {
325
+ hidden: { opacity: 0, y: 30 },
326
+ visible: { opacity: 1, y: 0, transition: { duration: 0.3 } },
327
+ },
328
+ slideInLeftFast: {
329
+ hidden: { x: -50, opacity: 0 },
330
+ visible: { x: 0, opacity: 1, transition: { duration: 0.3 } },
331
+ },
332
+ slideInRightFast: {
333
+ hidden: { x: 50, opacity: 0 },
334
+ visible: { x: 0, opacity: 1, transition: { duration: 0.3 } },
335
+ },
336
+ fadeInRotate: {
337
+ hidden: { opacity: 0, rotate: -45 },
338
+ visible: { opacity: 1, rotate: 0, transition: { duration: 0.5 } },
339
+ },
340
+ scaleInFast: {
341
+ hidden: { scale: 0.8 },
342
+ visible: { scale: 1, transition: { duration: 0.3 } },
343
+ },
344
+ zoomInBig: {
345
+ hidden: { scale: 0.3 },
346
+ visible: { scale: 1, transition: { duration: 1.5 } },
347
+ },
348
+ slideInDiagonal: {
349
+ hidden: { x: -100, y: -100, opacity: 0 },
350
+ visible: { x: 0, y: 0, opacity: 1, transition: { duration: 0.5 } },
351
+ },
352
+ rotate360: {
353
+ hidden: { rotate: 0, opacity: 0 },
354
+ visible: { rotate: 360, opacity: 1, transition: { duration: 1 } },
355
+ },
356
+ flipInX: {
357
+ hidden: { rotateX: 90, opacity: 0 },
358
+ visible: { rotateX: 0, opacity: 1, transition: { duration: 0.5 } },
359
+ },
360
+ staggerChildrenFast: {
361
+ hidden: { opacity: 0 },
362
+ visible: {
363
+ opacity: 1,
364
+ transition: { staggerChildren: 0.15, duration: 0.3 },
365
+ },
366
+ },
367
+ pulseFast: {
368
+ hidden: { scale: 1 },
369
+ visible: { scale: [1, 1.1, 1], transition: { duration: 0.8, repeat: Infinity } },
370
+ },
371
+ slideInDiagonalFast: {
372
+ hidden: { x: -80, y: -80, opacity: 0 },
373
+ visible: { x: 0, y: 0, opacity: 1, transition: { duration: 0.3 } },
374
+ },
375
+ fadeInRightSlow: {
376
+ hidden: { opacity: 0, x: 50 },
377
+ visible: { opacity: 1, x: 0, transition: { duration: 1.5 } },
378
+ },
379
+ zoomOutSlowFromCenter: {
380
+ hidden: { scale: 1.2, opacity: 0 },
381
+ visible: { scale: 1, opacity: 1, transition: { duration: 1.5 } },
382
+ },
383
+ flipBounce: {
384
+ hidden: { rotateY: 90, opacity: 0 },
385
+ visible: { rotateY: 0, opacity: 1, transition: { type: 'spring', stiffness: 150 } },
386
+ },
387
+ slideInFromTopFast: {
388
+ hidden: { y: -50, opacity: 0 },
389
+ visible: { y: 0, opacity: 1, transition: { duration: 0.3 } },
390
+ },
391
+ fadeInDiagonal: {
392
+ hidden: { opacity: 0, x: -50, y: -50 },
393
+ visible: { opacity: 1, x: 0, y: 0, transition: { duration: 0.5 } },
394
+ },
395
+ zoomInBounce: {
396
+ hidden: { scale: 0.5, opacity: 0 },
397
+ visible: { scale: 1.1, opacity: 1, transition: { type: 'spring', stiffness: 150 } },
398
+ },
399
+ rotateInOut: {
400
+ hidden: { rotate: -180, opacity: 0 },
401
+ visible: { rotate: 0, opacity: 1, transition: { duration: 1 } },
402
+ },
403
+ staggerUpFast: {
404
+ hidden: { opacity: 0 },
405
+ visible: {
406
+ opacity: 1,
407
+ transition: { staggerChildren: 0.1, duration: 0.3 },
408
+ },
409
+ },
410
+ fadeInRotateIn: {
411
+ hidden: { opacity: 0, rotate: -45 },
412
+ visible: { opacity: 1, rotate: 0, transition: { duration: 0.5 } },
413
+ },
414
+ scaleInQuick: {
415
+ hidden: { scale: 0.7, opacity: 0 },
416
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.2 } },
417
+ },
418
+ slideInFromBottomSlow: {
419
+ hidden: { y: 80, opacity: 0 },
420
+ visible: { y: 0, opacity: 1, transition: { duration: 1.5 } },
421
+ },
422
+ flipRotateOut: {
423
+ hidden: { rotateY: 180, opacity: 0 },
424
+ visible: { rotateY: 0, opacity: 1, transition: { duration: 0.5 } },
425
+ },
426
+ slideLeftFast: {
427
+ hidden: { x: -50, opacity: 0 },
428
+ visible: { x: 0, opacity: 1, transition: { duration: 0.3 } },
429
+ },
430
+ zoomInBigFast: {
431
+ hidden: { scale: 0.4, opacity: 0 },
432
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.2 } },
433
+ },
434
+ fadeInUpFastSlow: {
435
+ hidden: { opacity: 0, y: 30 },
436
+ visible: { opacity: 1, y: 0, transition: { duration: 0.4 } },
437
+ },
438
+ rotateOutSlow: {
439
+ hidden: { rotate: 90, opacity: 0 },
440
+ visible: { rotate: 0, opacity: 1, transition: { duration: 1.5 } },
441
+ },
442
+ staggerLeft: {
443
+ hidden: { opacity: 0 },
444
+ visible: {
445
+ opacity: 1,
446
+ transition: { staggerChildren: 0.2, duration: 0.6 },
447
+ },
448
+ },
449
+ rotateOutFastReverse: {
450
+ hidden: { rotate: 180, opacity: 0 },
451
+ visible: { rotate: 0, opacity: 1, transition: { duration: 0.3 } },
452
+ },
453
+ scaleDownBounce: {
454
+ hidden: { scale: 1.2 },
455
+ visible: { scale: 0.9, transition: { type: 'spring', stiffness: 100 } },
456
+ },
457
+ fadeInFastFromLeft: {
458
+ hidden: { opacity: 0, x: -50 },
459
+ visible: { opacity: 1, x: 0, transition: { duration: 0.2 } },
460
+ },
461
+ fadeInFastFromRight: {
462
+ hidden: { opacity: 0, x: 50 },
463
+ visible: { opacity: 1, x: 0, transition: { duration: 0.2 } },
464
+ },
465
+ bounceSlowFast: {
466
+ hidden: { scale: 0.6 },
467
+ visible: { scale: 1, transition: { type: 'spring', stiffness: 75 } },
468
+ },
469
+ slideInFromTopFastReverse: {
470
+ hidden: { y: -80, opacity: 0 },
471
+ visible: { y: 0, opacity: 1, transition: { duration: 0.3 } },
472
+ },
473
+ fadeOutFast: {
474
+ hidden: { opacity: 1 },
475
+ visible: { opacity: 0, transition: { duration: 0.3 } },
476
+ },
477
+ flipScaleUp: {
478
+ hidden: { rotateY: 90, opacity: 0, scale: 0.7 },
479
+ visible: { rotateY: 0, opacity: 1, scale: 1, transition: { duration: 0.5 } },
480
+ },
481
+ slideOutRight: {
482
+ hidden: { x: 0, opacity: 1 },
483
+ visible: { x: 100, opacity: 0, transition: { duration: 0.5 } },
484
+ },
485
+ zoomOutBounce: {
486
+ hidden: { scale: 1, opacity: 1 },
487
+ visible: { scale: 0.5, opacity: 0, transition: { type: 'spring', stiffness: 150 } },
488
+ },
489
+ fadeUpReverse: {
490
+ hidden: { opacity: 0, y: -50 },
491
+ visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
492
+ },
493
+ staggerUpReverse: {
494
+ hidden: { opacity: 0 },
495
+ visible: {
496
+ opacity: 1,
497
+ transition: { staggerChildren: 0.2, duration: 0.4 },
498
+ },
499
+ },
500
+ scaleInFromLeft: {
501
+ hidden: { scale: 0.7, opacity: 0 },
502
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.5 } },
503
+ },
504
+ flipOut: {
505
+ hidden: { rotateY: 0, opacity: 1 },
506
+ visible: { rotateY: 90, opacity: 0, transition: { duration: 0.3 } },
507
+ },
78
508
  };
79
509
 
80
510
  const Button = ({ children, className = '', color = 'primary', size = 'md', onClick, disabled = false, variant = 'solid', motionVariant = 'fadeIn', // Default motion variant
@@ -503,9 +933,16 @@ const ModalHeader = ({ children, className = '' }) => {
503
933
  React.createElement("h3", { className: "text-lg leading-6 font-medium text-gray-900" }, children)));
504
934
  };
505
935
 
506
- const NavItem = ({ children, className = '', href, active = false }) => {
936
+ const NavItem = ({ children, className = '', href, active = false, size = 'md', motionVariant = 'fadeIn', }) => {
507
937
  const activeClass = active ? 'text-gray-900 border-b-2 border-blue-500' : 'text-gray-500 hover:text-gray-700';
508
- return (React.createElement(motion.a, { href: href, className: `inline-flex items-center px-1 pt-1 text-sm font-medium ${activeClass} ${className}`, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 } }, children));
938
+ const sizeClasses = {
939
+ xs: 'text-xs px-1 py-0.5',
940
+ sm: 'text-sm px-2 py-1',
941
+ md: 'text-base px-3 py-2',
942
+ lg: 'text-lg px-4 py-3',
943
+ xl: 'text-xl px-5 py-4',
944
+ };
945
+ return (React.createElement(motion.a, { href: href, className: `inline-flex items-center ${sizeClasses[size]} ${activeClass} ${className}`, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible" }, children));
509
946
  };
510
947
 
511
948
  const Navbar = ({ children, className = '', brand }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-animated-components",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
package/readme.md CHANGED
@@ -43,9 +43,12 @@ Heading
43
43
  Text
44
44
 
45
45
  ## props
46
- color (optional): Sets the color of the component. Available values: primary, secondary, success, danger, warning, info.
47
- className
48
- children
46
+ onClick (function): The function to call when the button is clicked.
47
+ disabled (boolean): Disables the button.
48
+ variant (string): The button style, one of solid, outline, or ghost.
49
+ color (string): The button color, one of primary, secondary, success, danger, warning, or info.
50
+ size (string): The size of the button, one of xs, sm, md, lg, or xl.
51
+ motionVariant (string): A predefined motion animation for the button (fadeIn is the default).
49
52
 
50
53
  ## Example Usage
51
54
  import { Button } from 'my-animated-components';
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps, WithChildren } from '../../../types/common';
3
- import { motionVariants } from '../../utils/motionVariants';
4
- type Color = 'primary' | 'secondary' | 'danger' | 'success' | 'info' | 'warning';
5
- type Variant = 'solid' | 'outline' | 'ghost';
6
- interface AccordionProps extends BaseProps, WithChildren {
7
- items: {
8
- title: string;
9
- content: React.ReactNode;
10
- }[];
11
- color?: Color;
12
- variant?: Variant;
13
- motionVariant?: keyof typeof motionVariants;
14
- }
15
- export declare const Accordion: React.FC<AccordionProps>;
16
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps, WithChildren, ColorProps } from '../../../types/common';
3
- import { motionVariants } from '../../utils/motionVariants';
4
- interface AlertProps extends BaseProps, WithChildren, ColorProps {
5
- onClose?: () => void;
6
- motionVariant?: keyof typeof motionVariants;
7
- }
8
- export declare const Alert: React.FC<AlertProps>;
9
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps, SizeProps } from '../../../types/common';
3
- interface AvatarProps extends BaseProps, SizeProps {
4
- src?: string;
5
- alt?: string;
6
- initials?: string;
7
- }
8
- export declare const Avatar: React.FC<AvatarProps>;
9
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps, WithChildren, ColorProps, SizeProps } from '../../../types/common';
3
- import { motionVariants } from '../../utils/motionVariants';
4
- interface BadgeProps extends BaseProps, WithChildren, ColorProps, SizeProps {
5
- motionVariant?: keyof typeof motionVariants;
6
- }
7
- export declare const Badge: React.FC<BadgeProps>;
8
- export {};
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps } from '../../../types/common';
3
- import { motionVariants } from '../../utils/motionVariants';
4
- interface BreadcrumbProps extends BaseProps {
5
- items: {
6
- label: string;
7
- href: string;
8
- }[];
9
- motionVariant?: keyof typeof motionVariants;
10
- }
11
- export declare const Breadcrumb: React.FC<BreadcrumbProps>;
12
- export {};
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps, WithChildren, SizeProps } from '../../../types/common';
4
- type Color = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
5
- interface ButtonProps extends BaseProps, WithChildren, SizeProps {
6
- onClick?: () => void;
7
- disabled?: boolean;
8
- variant?: 'solid' | 'outline' | 'ghost';
9
- color?: Color;
10
- motionVariant?: keyof typeof motionVariants;
11
- }
12
- export declare const Button: React.FC<ButtonProps>;
13
- export {};
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps, SizeProps } from '../../../types/common';
4
- type Color = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
5
- interface IconButtonProps extends BaseProps, SizeProps {
6
- icon: React.ReactNode;
7
- onClick?: () => void;
8
- disabled?: boolean;
9
- variant?: 'solid' | 'outline' | 'ghost';
10
- color?: Color;
11
- motionVariant?: keyof typeof motionVariants;
12
- }
13
- export declare const IconButton: React.FC<IconButtonProps>;
14
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps, WithChildren } from '../../../types/common';
4
- interface CardProps extends BaseProps, WithChildren {
5
- motionVariant?: keyof typeof motionVariants;
6
- }
7
- export declare const Card: React.FC<CardProps>;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps, WithChildren } from '../../../types/common';
4
- interface CardBodyProps extends BaseProps, WithChildren {
5
- motionVariant?: keyof typeof motionVariants;
6
- }
7
- export declare const CardBody: React.FC<CardBodyProps>;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps, WithChildren } from '../../../types/common';
4
- interface CardFooterProps extends BaseProps, WithChildren {
5
- motionVariant?: keyof typeof motionVariants;
6
- }
7
- export declare const CardFooter: React.FC<CardFooterProps>;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps, WithChildren } from '../../../types/common';
4
- interface CardHeaderProps extends BaseProps, WithChildren {
5
- motionVariant?: keyof typeof motionVariants;
6
- }
7
- export declare const CardHeader: React.FC<CardHeaderProps>;
8
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps, WithChildren } from '../../../types/common';
4
- interface DropdownProps extends BaseProps, WithChildren {
5
- trigger: React.ReactNode;
6
- motionVariant?: keyof typeof motionVariants;
7
- }
8
- export declare const Dropdown: React.FC<DropdownProps>;
9
- export {};
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps, WithChildren } from '../../../types/common';
3
- export declare const DropdownItem: React.FC<BaseProps & WithChildren>;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps } from '../../../types/common';
4
- type CheckboxColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
5
- interface CheckboxProps extends BaseProps {
6
- label: string;
7
- checked?: boolean;
8
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
- color?: CheckboxColor;
10
- motionVariant?: keyof typeof motionVariants;
11
- }
12
- export declare const Checkbox: React.FC<CheckboxProps>;
13
- export {};
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { motionVariants } from '../../utils/motionVariants';
3
- import { BaseProps } from '../../../types/common';
4
- type ButtonColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
5
- interface FileUploadProps extends BaseProps {
6
- onChange: (file: File | null) => void;
7
- accept?: string;
8
- multiple?: boolean;
9
- buttonColor?: ButtonColor;
10
- motionVariant?: keyof typeof motionVariants;
11
- }
12
- export declare const FileUpload: React.FC<FileUploadProps>;
13
- export {};
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { BaseProps, SizeProps } from '../../../types/common';
3
- interface InputProps extends BaseProps, SizeProps {
4
- type?: 'text' | 'password' | 'email' | 'number';
5
- placeholder?: string;
6
- value?: string;
7
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
8
- }
9
- export declare const Input: React.FC<InputProps>;
10
- export {};