my-animated-components 1.0.4 → 1.0.6

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 (62) hide show
  1. package/dist/index.js +741 -49
  2. package/dist/src/components/accordion/Accordion.d.ts +6 -0
  3. package/dist/src/components/alert/Alert.d.ts +2 -0
  4. package/dist/src/components/badge/Badge.d.ts +2 -0
  5. package/dist/src/components/breadcrumb/Breadcrumb.d.ts +2 -0
  6. package/dist/src/components/buttons/Button.d.ts +3 -1
  7. package/dist/src/components/buttons/IconButton.d.ts +3 -1
  8. package/dist/src/components/card/Card.d.ts +6 -1
  9. package/dist/src/components/card/CardBody.d.ts +6 -1
  10. package/dist/src/components/card/CardFooter.d.ts +6 -1
  11. package/dist/src/components/card/CardHeader.d.ts +6 -1
  12. package/dist/src/components/dropdown/Dropdown.d.ts +2 -0
  13. package/dist/src/components/form/Checkbox.d.ts +4 -0
  14. package/dist/src/components/form/FileUpload.d.ts +4 -0
  15. package/dist/src/components/form/Radio.d.ts +6 -2
  16. package/dist/src/components/form/Select.d.ts +4 -0
  17. package/dist/src/components/form/Switch.d.ts +4 -0
  18. package/dist/src/components/form/Textarea.d.ts +4 -0
  19. package/dist/src/components/layout/Container.d.ts +2 -0
  20. package/dist/src/components/pagination/Pagination.d.ts +4 -0
  21. package/dist/src/components/progress/ProgressBar.d.ts +4 -0
  22. package/dist/src/components/skeleton/Skeleton.d.ts +4 -0
  23. package/dist/src/components/slider/RangeSlider.d.ts +3 -0
  24. package/dist/src/components/slider/Slider.d.ts +3 -0
  25. package/dist/src/components/table/Table.d.ts +9 -2
  26. package/dist/src/components/tabs/Tabs.d.ts +6 -2
  27. package/dist/src/components/tooltip/Tooltip.d.ts +4 -0
  28. package/dist/src/index.d.ts +50 -2
  29. package/dist/src/utils/motionVariants.d.ts +2 -0
  30. package/package.json +1 -1
  31. package/readme.md +90 -8
  32. package/rollup.config.js +1 -1
  33. package/src/components/accordion/Accordion.tsx +64 -12
  34. package/src/components/alert/Alert.tsx +20 -6
  35. package/src/components/badge/Badge.tsx +17 -5
  36. package/src/components/breadcrumb/Breadcrumb.tsx +27 -6
  37. package/src/components/buttons/Button.tsx +28 -4
  38. package/src/components/buttons/IconButton.tsx +30 -2
  39. package/src/components/card/Card.tsx +10 -4
  40. package/src/components/card/CardBody.tsx +16 -4
  41. package/src/components/card/CardFooter.tsx +16 -4
  42. package/src/components/card/CardHeader.tsx +16 -4
  43. package/src/components/dropdown/Dropdown.tsx +8 -6
  44. package/src/components/form/Checkbox.tsx +20 -2
  45. package/src/components/form/FileUpload.tsx +26 -3
  46. package/src/components/form/Radio.tsx +32 -5
  47. package/src/components/form/Select.tsx +20 -2
  48. package/src/components/form/Switch.tsx +32 -5
  49. package/src/components/form/Textarea.tsx +20 -2
  50. package/src/components/layout/Container.tsx +13 -4
  51. package/src/components/pagination/Pagination.tsx +56 -15
  52. package/src/components/progress/ProgressBar.tsx +14 -3
  53. package/src/components/skeleton/Skeleton.tsx +28 -5
  54. package/src/components/slider/RangeSlider.tsx +27 -6
  55. package/src/components/slider/Slider.tsx +27 -6
  56. package/src/components/table/Table.tsx +31 -5
  57. package/src/components/tabs/Tabs.tsx +25 -6
  58. package/src/components/tooltip/Tooltip.tsx +25 -4
  59. package/src/index.ts +101 -21
  60. package/src/utils/motionVariants.ts +47 -0
  61. package/dist/src/utils/Listfiles.d.ts +0 -1
  62. package/src/utils/Listfiles.ts +0 -36
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import fs from 'fs';
2
- import path from 'path';
1
+ import React, { useState, useRef, useEffect } from 'react';
2
+ import { motion, AnimatePresence } from 'framer-motion';
3
3
 
4
4
  function styleInject(css, ref) {
5
5
  if ( ref === undefined ) ref = {};
@@ -31,51 +31,743 @@ function styleInject(css, ref) {
31
31
  var css_248z = "@tailwind base;\r\n@tailwind components;\r\n@tailwind utilities;\r\n";
32
32
  styleInject(css_248z);
33
33
 
34
- // Dynamically import and load components, returning them for export
35
- const loadComponents = (componentsPath) => {
36
- return new Promise((resolve, reject) => {
37
- fs.readdir(componentsPath, { withFileTypes: true }, async (err, files) => {
38
- if (err) {
39
- reject('Error reading components directory:');
40
- return;
34
+ const motionVariants = {
35
+ fadeIn: {
36
+ hidden: { opacity: 0 },
37
+ visible: { opacity: 1, transition: { duration: 0.5 } },
38
+ },
39
+ zoomIn: {
40
+ hidden: { scale: 0.8, opacity: 0 },
41
+ visible: { scale: 1, opacity: 1, transition: { duration: 0.5 } },
42
+ },
43
+ slideUp: {
44
+ hidden: { y: 50, opacity: 0 },
45
+ visible: { y: 0, opacity: 1, transition: { duration: 0.5 } },
46
+ },
47
+ slideDown: {
48
+ hidden: { y: -50, opacity: 0 },
49
+ visible: { y: 0, opacity: 1, transition: { duration: 0.5 } },
50
+ },
51
+ slideLeft: {
52
+ hidden: { x: 50, opacity: 0 },
53
+ visible: { x: 0, opacity: 1, transition: { duration: 0.5 } },
54
+ },
55
+ slideRight: {
56
+ hidden: { x: -50, opacity: 0 },
57
+ visible: { x: 0, opacity: 1, transition: { duration: 0.5 } },
58
+ },
59
+ bounce: {
60
+ hidden: { scale: 0.8 },
61
+ visible: { scale: 1, transition: { type: 'spring', stiffness: 100 } },
62
+ },
63
+ rotateIn: {
64
+ hidden: { rotate: -90, opacity: 0 },
65
+ visible: { rotate: 0, opacity: 1, transition: { duration: 0.5 } },
66
+ },
67
+ stagger: {
68
+ hidden: { opacity: 0 },
69
+ visible: {
70
+ opacity: 1,
71
+ transition: { staggerChildren: 0.2 },
72
+ },
73
+ },
74
+ flip: {
75
+ hidden: { rotateY: 90, opacity: 0 },
76
+ visible: { rotateY: 0, opacity: 1, transition: { duration: 0.5 } },
77
+ },
78
+ };
79
+
80
+ const Button = ({ children, className = '', color = 'primary', size = 'md', onClick, disabled = false, variant = 'solid', motionVariant = 'fadeIn', // Default motion variant
81
+ }) => {
82
+ const baseClasses = 'font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2';
83
+ const colorClasses = {
84
+ primary: {
85
+ solid: 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',
86
+ outline: 'border border-blue-600 text-blue-600 hover:bg-blue-50 focus:ring-blue-500',
87
+ ghost: 'text-blue-600 hover:bg-blue-50 focus:ring-blue-500',
88
+ },
89
+ secondary: {
90
+ solid: 'bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500',
91
+ outline: 'border border-gray-600 text-gray-600 hover:bg-gray-50 focus:ring-gray-500',
92
+ ghost: 'text-gray-600 hover:bg-gray-50 focus:ring-gray-500',
93
+ },
94
+ success: {
95
+ solid: 'bg-green-600 text-white hover:bg-green-700 focus:ring-green-500',
96
+ outline: 'border border-green-600 text-green-600 hover:bg-green-50 focus:ring-green-500',
97
+ ghost: 'text-green-600 hover:bg-green-50 focus:ring-green-500',
98
+ },
99
+ danger: {
100
+ solid: 'bg-red-600 text-white hover:bg-red-700 focus:ring-red-500',
101
+ outline: 'border border-red-600 text-red-600 hover:bg-red-50 focus:ring-red-500',
102
+ ghost: 'text-red-600 hover:bg-red-50 focus:ring-red-500',
103
+ },
104
+ warning: {
105
+ solid: 'bg-yellow-500 text-white hover:bg-yellow-600 focus:ring-yellow-400',
106
+ outline: 'border border-yellow-500 text-yellow-500 hover:bg-yellow-50 focus:ring-yellow-400',
107
+ ghost: 'text-yellow-500 hover:bg-yellow-50 focus:ring-yellow-400',
108
+ },
109
+ info: {
110
+ solid: 'bg-blue-400 text-white hover:bg-blue-500 focus:ring-blue-300',
111
+ outline: 'border border-blue-400 text-blue-400 hover:bg-blue-50 focus:ring-blue-300',
112
+ ghost: 'text-blue-400 hover:bg-blue-50 focus:ring-blue-300',
113
+ },
114
+ };
115
+ const sizeClasses = {
116
+ xs: 'px-2.5 py-1.5 text-xs',
117
+ sm: 'px-3 py-2 text-sm',
118
+ md: 'px-4 py-2 text-base',
119
+ lg: 'px-4 py-2 text-lg',
120
+ xl: 'px-6 py-3 text-xl',
121
+ };
122
+ return (React.createElement(motion.button, { className: `${baseClasses} ${colorClasses[color][variant]} ${sizeClasses[size]} ${className}`, onClick: onClick, disabled: disabled, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible" }, children));
123
+ };
124
+
125
+ const IconButton = ({ className = '', color = 'primary', size = 'md', icon, onClick, disabled = false, variant = 'solid', motionVariant = 'fadeIn', // Default motion variant
126
+ }) => {
127
+ const baseClasses = 'rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2';
128
+ const colorClasses = {
129
+ primary: {
130
+ solid: 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',
131
+ outline: 'border border-blue-600 text-blue-600 hover:bg-blue-50 focus:ring-blue-500',
132
+ ghost: 'text-blue-600 hover:bg-blue-50 focus:ring-blue-500',
133
+ },
134
+ secondary: {
135
+ solid: 'bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500',
136
+ outline: 'border border-gray-600 text-gray-600 hover:bg-gray-50 focus:ring-gray-500',
137
+ ghost: 'text-gray-600 hover:bg-gray-50 focus:ring-gray-500',
138
+ },
139
+ success: {
140
+ solid: 'bg-green-600 text-white hover:bg-green-700 focus:ring-green-500',
141
+ outline: 'border border-green-600 text-green-600 hover:bg-green-50 focus:ring-green-500',
142
+ ghost: 'text-green-600 hover:bg-green-50 focus:ring-green-500',
143
+ },
144
+ danger: {
145
+ solid: 'bg-red-600 text-white hover:bg-red-700 focus:ring-red-500',
146
+ outline: 'border border-red-600 text-red-600 hover:bg-red-50 focus:ring-red-500',
147
+ ghost: 'text-red-600 hover:bg-red-50 focus:ring-red-500',
148
+ },
149
+ warning: {
150
+ solid: 'bg-yellow-500 text-white hover:bg-yellow-600 focus:ring-yellow-400',
151
+ outline: 'border border-yellow-500 text-yellow-500 hover:bg-yellow-50 focus:ring-yellow-400',
152
+ ghost: 'text-yellow-500 hover:bg-yellow-50 focus:ring-yellow-400',
153
+ },
154
+ info: {
155
+ solid: 'bg-blue-400 text-white hover:bg-blue-500 focus:ring-blue-300',
156
+ outline: 'border border-blue-400 text-blue-400 hover:bg-blue-50 focus:ring-blue-300',
157
+ ghost: 'text-blue-400 hover:bg-blue-50 focus:ring-blue-300',
158
+ },
159
+ };
160
+ const sizeClasses = {
161
+ xs: 'p-1',
162
+ sm: 'p-1.5',
163
+ md: 'p-2',
164
+ lg: 'p-2.5',
165
+ xl: 'p-3',
166
+ };
167
+ return (React.createElement(motion.button, { className: `${baseClasses} ${colorClasses[color][variant]} ${sizeClasses[size]} ${className}`, onClick: onClick, disabled: disabled, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", whileHover: { scale: 1.1 }, whileTap: { scale: 0.95 } }, icon));
168
+ };
169
+
170
+ const Accordion = ({ className = '', items, color = 'primary', variant = 'solid', motionVariant = 'fadeIn', }) => {
171
+ const [openIndex, setOpenIndex] = useState(null);
172
+ const toggleItem = (index) => {
173
+ setOpenIndex(openIndex === index ? null : index);
174
+ };
175
+ const colors = {
176
+ primary: {
177
+ solid: 'bg-blue-100 border-blue-400 text-blue-900',
178
+ outline: 'border-blue-400 text-blue-600',
179
+ ghost: 'text-blue-600 hover:bg-blue-50',
180
+ },
181
+ secondary: {
182
+ solid: 'bg-gray-100 border-gray-400 text-gray-900',
183
+ outline: 'border-gray-400 text-gray-600',
184
+ ghost: 'text-gray-600 hover:bg-gray-50',
185
+ },
186
+ danger: {
187
+ solid: 'bg-red-100 border-red-400 text-red-900',
188
+ outline: 'border-red-400 text-red-600',
189
+ ghost: 'text-red-600 hover:bg-red-50',
190
+ },
191
+ success: {
192
+ solid: 'bg-green-100 border-green-400 text-green-900',
193
+ outline: 'border-green-400 text-green-600',
194
+ ghost: 'text-green-600 hover:bg-green-50',
195
+ },
196
+ info: {
197
+ solid: 'bg-blue-100 border-blue-400 text-blue-900',
198
+ outline: 'border-blue-400 text-blue-600',
199
+ ghost: 'text-blue-600 hover:bg-blue-50',
200
+ },
201
+ warning: {
202
+ solid: 'bg-yellow-100 border-yellow-400 text-yellow-900',
203
+ outline: 'border-yellow-400 text-yellow-600',
204
+ ghost: 'text-yellow-600 hover:bg-yellow-50',
205
+ },
206
+ };
207
+ const variantClasses = colors[color][variant];
208
+ return (React.createElement("div", { className: `space-y-2 ${className}` }, items.map((item, index) => (React.createElement("div", { key: index, className: `border rounded-md ${variantClasses}` },
209
+ React.createElement("button", { className: `flex justify-between items-center w-full px-4 py-2 text-left focus:outline-none`, onClick: () => toggleItem(index) },
210
+ React.createElement("span", null, item.title),
211
+ React.createElement(motion.svg, { className: "w-5 h-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", animate: { rotate: openIndex === index ? 180 : 0 }, transition: { duration: 0.3 } },
212
+ React.createElement("path", { fillRule: "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", clipRule: "evenodd" }))),
213
+ React.createElement(AnimatePresence, null, openIndex === index && (React.createElement(motion.div, { variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", className: "px-4 py-2 border-t" }, item.content))))))));
214
+ };
215
+
216
+ const Alert = ({ children, className = '', color = 'primary', onClose, motionVariant = 'fadeIn', // Default motion variant
217
+ }) => {
218
+ const colorClasses = {
219
+ primary: 'bg-blue-100 text-blue-700',
220
+ secondary: 'bg-gray-100 text-gray-700',
221
+ success: 'bg-green-100 text-green-700',
222
+ danger: 'bg-red-100 text-red-700',
223
+ warning: 'bg-yellow-100 text-yellow-700',
224
+ info: 'bg-indigo-100 text-indigo-700',
225
+ };
226
+ return (React.createElement(motion.div, { className: `p-4 rounded-md ${colorClasses[color]} ${className}`, role: "alert", variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } },
227
+ React.createElement("div", { className: "flex" },
228
+ React.createElement("div", { className: "flex-grow" }, children),
229
+ onClose && (React.createElement("button", { type: "button", className: "ml-auto -mx-1.5 -my-1.5 rounded-lg focus:ring-2 focus:ring-blue-400 p-1.5 inline-flex h-8 w-8", onClick: onClose, "aria-label": "Close" },
230
+ React.createElement("span", { className: "sr-only" }, "Close"),
231
+ React.createElement("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg" },
232
+ React.createElement("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" })))))));
233
+ };
234
+
235
+ const Avatar = ({ className = '', size = 'md', src, alt, initials }) => {
236
+ const sizeClasses = {
237
+ xs: 'w-6 h-6 text-xs',
238
+ sm: 'w-8 h-8 text-sm',
239
+ md: 'w-10 h-10 text-base',
240
+ lg: 'w-12 h-12 text-lg',
241
+ xl: 'w-14 h-14 text-xl',
242
+ };
243
+ return (React.createElement("div", { className: `relative inline-flex items-center justify-center ${sizeClasses[size]} ${className} rounded-full bg-gray-200 overflow-hidden` }, src ? (React.createElement("img", { src: src, alt: alt || 'Avatar', className: "w-full h-full object-cover" })) : (React.createElement("span", { className: "font-medium text-gray-600" }, initials))));
244
+ };
245
+
246
+ const Badge = ({ children, className = '', color = 'primary', size = 'md', motionVariant = 'fadeIn', // Default motion variant
247
+ }) => {
248
+ const colorClasses = {
249
+ primary: 'bg-blue-100 text-blue-800',
250
+ secondary: 'bg-gray-100 text-gray-800',
251
+ success: 'bg-green-100 text-green-800',
252
+ danger: 'bg-red-100 text-red-800',
253
+ warning: 'bg-yellow-100 text-yellow-800',
254
+ info: 'bg-indigo-100 text-indigo-800',
255
+ };
256
+ const sizeClasses = {
257
+ xs: 'px-2 py-0.5 text-xs',
258
+ sm: 'px-2.5 py-0.5 text-sm',
259
+ md: 'px-3 py-1 text-sm',
260
+ lg: 'px-3.5 py-1.5 text-base',
261
+ xl: 'px-4 py-2 text-lg',
262
+ };
263
+ return (React.createElement(motion.span, { className: `inline-flex items-center font-medium rounded-full ${colorClasses[color]} ${sizeClasses[size]} ${className}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } }, children));
264
+ };
265
+
266
+ const Breadcrumb = ({ className = '', items, motionVariant = 'fadeIn' }) => {
267
+ return (React.createElement(motion.nav, { className: `flex ${className}`, "aria-label": "Breadcrumb", variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } },
268
+ React.createElement("ol", { className: "inline-flex items-center space-x-1 md:space-x-3" }, items.map((item, index) => (React.createElement("li", { key: index, className: "inline-flex items-center" },
269
+ index > 0 && (React.createElement("svg", { className: "w-6 h-6 text-gray-400", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg" },
270
+ React.createElement("path", { fillRule: "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", clipRule: "evenodd" }))),
271
+ React.createElement("a", { href: item.href, className: `ml-1 text-sm font-medium ${index === items.length - 1
272
+ ? 'text-gray-500 hover:text-gray-700'
273
+ : 'text-blue-600 hover:text-blue-800'}` }, item.label)))))));
274
+ };
275
+
276
+ const Card = ({ children, className = '', motionVariant = 'fadeIn' }) => {
277
+ return (React.createElement(motion.div, { className: `bg-white shadow rounded-lg overflow-hidden ${className}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } }, children));
278
+ };
279
+
280
+ const CardBody = ({ children, className = '', motionVariant = 'fadeIn' }) => {
281
+ return (React.createElement(motion.div, { className: `px-4 py-5 sm:p-6 ${className}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } }, children));
282
+ };
283
+
284
+ const CardFooter = ({ children, className = '', motionVariant = 'fadeIn' }) => {
285
+ return (React.createElement(motion.div, { className: `px-4 py-4 sm:px-6 ${className}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } }, children));
286
+ };
287
+
288
+ const CardHeader = ({ children, className = '', motionVariant = 'fadeIn' }) => {
289
+ return (React.createElement(motion.div, { className: `px-4 py-5 sm:px-6 ${className}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } }, children));
290
+ };
291
+
292
+ const Dropdown = ({ children, className = '', trigger, motionVariant = 'fadeIn' }) => {
293
+ const [isOpen, setIsOpen] = useState(false);
294
+ const dropdownRef = useRef(null);
295
+ useEffect(() => {
296
+ const handleClickOutside = (event) => {
297
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
298
+ setIsOpen(false);
41
299
  }
42
- const componentPromises = files.map(async (file) => {
43
- if (file.isDirectory()) {
44
- console.log(`Folder: ${file.name}`);
45
- }
46
- else {
47
- console.log(`Importing: ${file.name}`);
48
- try {
49
- const component = await import(path.join(componentsPath, file.name));
50
- return { name: file.name.replace('.tsx', ''), component };
51
- }
52
- catch (error) {
53
- console.error(`Error importing component ${file.name}:`, error);
54
- return null;
55
- }
56
- }
57
- });
58
- const components = await Promise.all(componentPromises);
59
- resolve(components.filter((comp) => comp !== null));
60
- });
61
- });
62
- };
63
-
64
- // Set the path to your components directory
65
- const componentsPath = './components';
66
- let componentsExports = {};
67
- // Dynamically load the components
68
- loadComponents(componentsPath)
69
- .then((components) => {
70
- components.forEach(({ name, component }) => {
71
- if (component) {
72
- // Dynamically assign each component to the componentsExports object
73
- componentsExports[name] = component;
74
- }
75
- });
76
- })
77
- .catch((err) => {
78
- console.error('Error loading components:', err);
79
- });
80
-
81
- export { componentsExports };
300
+ };
301
+ document.addEventListener('mousedown', handleClickOutside);
302
+ return () => {
303
+ document.removeEventListener('mousedown', handleClickOutside);
304
+ };
305
+ }, []);
306
+ return (React.createElement("div", { className: `relative inline-block text-left ${className}`, ref: dropdownRef },
307
+ React.createElement("div", null,
308
+ React.createElement("button", { type: "button", onClick: () => setIsOpen(prev => !prev) }, trigger),
309
+ React.createElement(AnimatePresence, null, isOpen && (React.createElement(motion.div, { variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden", transition: { duration: 0.3 } }, children))))));
310
+ };
311
+
312
+ const DropdownItem = ({ children, className = '' }) => {
313
+ return (React.createElement("a", { href: "#", className: `block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 ${className}`, role: "menuitem" }, children));
314
+ };
315
+
316
+ const Checkbox = ({ className = '', label, checked, onChange, color = 'primary', // Default color
317
+ motionVariant = 'fadeIn', // Default motion variant
318
+ }) => {
319
+ const colorClasses = {
320
+ primary: 'text-blue-600',
321
+ secondary: 'text-gray-600',
322
+ success: 'text-green-600',
323
+ danger: 'text-red-600',
324
+ warning: 'text-yellow-500',
325
+ info: 'text-blue-400',
326
+ };
327
+ return (React.createElement(motion.label, { className: `inline-flex items-center ${className}`, initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.3 }, variants: motionVariants[motionVariant] },
328
+ React.createElement("input", { type: "checkbox", className: `form-checkbox h-5 w-5 ${colorClasses[color]}`, checked: checked, onChange: onChange }),
329
+ React.createElement("span", { className: "ml-2 text-gray-700" }, label)));
330
+ };
331
+
332
+ const FileUpload = ({ className = '', onChange, accept, multiple, buttonColor = 'primary', // Default button color
333
+ motionVariant = 'fadeIn', // Default motion variant
334
+ }) => {
335
+ const fileInputRef = useRef(null);
336
+ const handleClick = () => {
337
+ fileInputRef.current?.click();
338
+ };
339
+ const handleChange = (event) => {
340
+ const file = event.target.files?.[0] || null;
341
+ onChange(file);
342
+ };
343
+ const buttonColorClasses = {
344
+ primary: 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',
345
+ secondary: 'bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500',
346
+ success: 'bg-green-600 text-white hover:bg-green-700 focus:ring-green-500',
347
+ danger: 'bg-red-600 text-white hover:bg-red-700 focus:ring-red-500',
348
+ warning: 'bg-yellow-500 text-white hover:bg-yellow-600 focus:ring-yellow-400',
349
+ info: 'bg-blue-400 text-white hover:bg-blue-500 focus:ring-blue-300',
350
+ };
351
+ return (React.createElement(motion.div, { className: `flex items-center ${className}`, initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.3 }, variants: motionVariants[motionVariant] },
352
+ React.createElement("button", { type: "button", onClick: handleClick, className: `px-4 py-2 text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 ${buttonColorClasses[buttonColor]}` }, "Choose File"),
353
+ React.createElement("input", { type: "file", ref: fileInputRef, onChange: handleChange, accept: accept, multiple: multiple, className: "hidden" })));
354
+ };
355
+
356
+ const Input = ({ className = '', size = 'md', type = 'text', placeholder, value, onChange, }) => {
357
+ const sizeClasses = {
358
+ xs: 'px-2 py-1 text-xs',
359
+ sm: 'px-3 py-2 text-sm',
360
+ md: 'px-4 py-2 text-base',
361
+ lg: 'px-4 py-3 text-lg',
362
+ xl: 'px-5 py-4 text-xl',
363
+ };
364
+ return (React.createElement(motion.div, { initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.3 } },
365
+ React.createElement("input", { type: type, className: `w-full border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 ${sizeClasses[size]} ${className}`, placeholder: placeholder, value: value, onChange: onChange })));
366
+ };
367
+
368
+ const Radio = ({ className = '', label, name, value, checked, onChange, color = 'primary', size = 'md', motionVariant = 'fadeIn', // Default motion variant
369
+ }) => {
370
+ const baseClasses = 'inline-flex items-center';
371
+ const colorClasses = {
372
+ primary: 'text-blue-600',
373
+ secondary: 'text-gray-600',
374
+ success: 'text-green-600',
375
+ danger: 'text-red-600',
376
+ warning: 'text-yellow-500',
377
+ info: 'text-blue-400',
378
+ };
379
+ const sizeClasses = {
380
+ xs: 'h-4 w-4',
381
+ sm: 'h-5 w-5',
382
+ md: 'h-6 w-6',
383
+ lg: 'h-7 w-7',
384
+ xl: 'h-8 w-8',
385
+ };
386
+ return (React.createElement(motion.label, { className: `${baseClasses} ${colorClasses[color]} ${sizeClasses[size]} ${className}`, initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, variants: motionVariants[motionVariant], transition: { duration: 0.3 } },
387
+ React.createElement("input", { type: "radio", className: "form-radio", name: name, value: value, checked: checked, onChange: onChange }),
388
+ React.createElement("span", { className: "ml-2 text-gray-700" }, label)));
389
+ };
390
+
391
+ const Select = ({ className = '', size = 'md', options, value, onChange, color = 'primary', motionVariant = 'fadeIn', // Default motion variant
392
+ }) => {
393
+ const baseClasses = 'w-full border rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2';
394
+ const colorClasses = {
395
+ primary: 'border-blue-600 focus:ring-blue-500 text-blue-600',
396
+ secondary: 'border-gray-600 focus:ring-gray-500 text-gray-600',
397
+ success: 'border-green-600 focus:ring-green-500 text-green-600',
398
+ danger: 'border-red-600 focus:ring-red-500 text-red-600',
399
+ warning: 'border-yellow-500 focus:ring-yellow-400 text-yellow-500',
400
+ info: 'border-blue-400 focus:ring-blue-300 text-blue-400',
401
+ };
402
+ const sizeClasses = {
403
+ xs: 'px-2 py-1 text-xs',
404
+ sm: 'px-3 py-2 text-sm',
405
+ md: 'px-4 py-2 text-base',
406
+ lg: 'px-4 py-3 text-lg',
407
+ xl: 'px-5 py-4 text-xl',
408
+ };
409
+ return (React.createElement(motion.div, { initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, variants: motionVariants[motionVariant], transition: { duration: 0.3 } },
410
+ React.createElement("select", { className: `${baseClasses} ${colorClasses[color]} ${sizeClasses[size]} ${className}`, value: value, onChange: onChange }, options.map((option) => (React.createElement("option", { key: option.value, value: option.value }, option.label))))));
411
+ };
412
+
413
+ const Switch = ({ className = '', checked, onChange, label, color = 'primary', motionVariant = 'fadeIn', // Default motion variant
414
+ }) => {
415
+ const baseClasses = 'inline-flex items-center cursor-pointer';
416
+ const colorClasses = {
417
+ primary: 'bg-blue-600',
418
+ secondary: 'bg-gray-600',
419
+ success: 'bg-green-600',
420
+ danger: 'bg-red-600',
421
+ warning: 'bg-yellow-500',
422
+ info: 'bg-blue-400',
423
+ };
424
+ return (React.createElement(motion.label, { className: `${baseClasses} ${className}`, initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, variants: motionVariants[motionVariant], transition: { duration: 0.3 } },
425
+ React.createElement("div", { className: "relative" },
426
+ React.createElement("input", { type: "checkbox", className: "sr-only", checked: checked, onChange: (e) => onChange(e.target.checked) }),
427
+ React.createElement("div", { className: `w-10 h-6 bg-gray-200 rounded-full shadow-inner ${checked ? colorClasses[color] : ''}` }),
428
+ React.createElement("div", { className: `absolute w-4 h-4 bg-white rounded-full shadow inset-y-1 left-1 transition-transform duration-200 ease-in-out ${checked ? 'transform translate-x-4' : ''}` })),
429
+ label && React.createElement("span", { className: "ml-3 text-sm font-medium text-gray-900" }, label)));
430
+ };
431
+
432
+ const Textarea = ({ className = '', size = 'md', placeholder, value, onChange, rows = 4, color = 'primary', motionVariant = 'fadeIn', // Default motion variant
433
+ }) => {
434
+ const baseClasses = 'w-full border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500';
435
+ const colorClasses = {
436
+ primary: 'focus:ring-blue-500 focus:border-blue-500',
437
+ secondary: 'focus:ring-gray-500 focus:border-gray-500',
438
+ success: 'focus:ring-green-500 focus:border-green-500',
439
+ danger: 'focus:ring-red-500 focus:border-red-500',
440
+ warning: 'focus:ring-yellow-400 focus:border-yellow-400',
441
+ info: 'focus:ring-blue-300 focus:border-blue-300',
442
+ };
443
+ const sizeClasses = {
444
+ xs: 'px-2 py-1 text-xs',
445
+ sm: 'px-3 py-2 text-sm',
446
+ md: 'px-4 py-2 text-base',
447
+ lg: 'px-4 py-3 text-lg',
448
+ xl: 'px-5 py-4 text-xl',
449
+ };
450
+ return (React.createElement(motion.div, { initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, variants: motionVariants[motionVariant], transition: { duration: 0.3 } },
451
+ React.createElement("textarea", { className: `${baseClasses} ${colorClasses[color]} ${sizeClasses[size]} ${className}`, placeholder: placeholder, value: value, onChange: onChange, rows: rows })));
452
+ };
453
+
454
+ const Container = ({ children, className = '', fluid = false, motionVariant = 'fadeIn' }) => {
455
+ const containerClass = fluid ? 'w-full' : 'max-w-7xl mx-auto px-4 sm:px-6 lg:px-8';
456
+ return (React.createElement(motion.div, { className: `${containerClass} ${className}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", exit: "hidden" }, children));
457
+ };
458
+
459
+ const Flex = ({ children, className = '', direction = 'row', justify = 'start', align = 'start', wrap = false, }) => {
460
+ const flexClass = `
461
+ flex
462
+ ${direction === 'col' ? 'flex-col' : 'flex-row'}
463
+ ${`justify-${justify}`}
464
+ ${`items-${align}`}
465
+ ${wrap ? 'flex-wrap' : 'flex-nowrap'}
466
+ `;
467
+ return (React.createElement("div", { className: `${flexClass} ${className}` }, children));
468
+ };
469
+
470
+ const Grid = ({ children, className = '', cols = 3, gap = 4 }) => {
471
+ return (React.createElement("div", { className: `grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-${cols} gap-${gap} ${className}` }, children));
472
+ };
473
+
474
+ const List = ({ children, className = '', as = 'ul' }) => {
475
+ const Tag = as;
476
+ return (React.createElement(motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 } },
477
+ React.createElement(Tag, { className: `space-y-1 ${className}` }, children)));
478
+ };
479
+
480
+ const ListItem = ({ children, className = '' }) => {
481
+ return (React.createElement(motion.li, { className: className, initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.3 } }, children));
482
+ };
483
+
484
+ const Modal = ({ children, className = '', isOpen, onClose }) => {
485
+ return (React.createElement(AnimatePresence, null, isOpen && (React.createElement(motion.div, { className: "fixed inset-0 z-50 overflow-y-auto", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 } },
486
+ React.createElement("div", { className: "flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0" },
487
+ React.createElement("div", { className: "fixed inset-0 transition-opacity", "aria-hidden": "true" },
488
+ React.createElement("div", { className: "absolute inset-0 bg-gray-500 opacity-75", onClick: onClose })),
489
+ React.createElement("span", { className: "hidden sm:inline-block sm:align-middle sm:h-screen", "aria-hidden": "true" }, "\u200B"),
490
+ React.createElement(motion.div, { className: `inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full ${className}`, initial: { opacity: 0, scale: 0.95 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.95 } }, children))))));
491
+ };
492
+
493
+ const ModalBody = ({ children, className = '' }) => {
494
+ return (React.createElement("div", { className: `px-4 pt-5 pb-4 sm:p-6 sm:pb-4 ${className}` }, children));
495
+ };
496
+
497
+ const ModalFooter = ({ children, className = '' }) => {
498
+ return (React.createElement("div", { className: `px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse ${className}` }, children));
499
+ };
500
+
501
+ const ModalHeader = ({ children, className = '' }) => {
502
+ return (React.createElement("div", { className: `px-4 pt-5 pb-4 sm:p-6 sm:pb-4 ${className}` },
503
+ React.createElement("h3", { className: "text-lg leading-6 font-medium text-gray-900" }, children)));
504
+ };
505
+
506
+ const NavItem = ({ children, className = '', href, active = false }) => {
507
+ 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));
509
+ };
510
+
511
+ const Navbar = ({ children, className = '', brand }) => {
512
+ return (React.createElement(motion.nav, { className: `bg-white shadow ${className}`, initial: { opacity: 0, y: -50 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 } },
513
+ React.createElement("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8" },
514
+ React.createElement("div", { className: "flex justify-between h-16" },
515
+ React.createElement("div", { className: "flex-shrink-0 flex items-center" }, brand),
516
+ React.createElement("div", { className: "flex items-center" }, children)))));
517
+ };
518
+
519
+ const Offcanvas = ({ children, className = '', isOpen, onClose, position = 'left' }) => {
520
+ const positionClasses = {
521
+ left: 'left-0 top-0 h-full',
522
+ right: 'right-0 top-0 h-full',
523
+ top: 'top-0 left-0 w-full',
524
+ bottom: 'bottom-0 left-0 w-full',
525
+ };
526
+ const variants = {
527
+ left: { x: '-100%' },
528
+ right: { x: '100%' },
529
+ top: { y: '-100%' },
530
+ bottom: { y: '100%' },
531
+ };
532
+ return (React.createElement(AnimatePresence, null, isOpen && (React.createElement("div", { className: "fixed inset-0 z-50 overflow-hidden" },
533
+ React.createElement("div", { className: "absolute inset-0 overflow-hidden" },
534
+ React.createElement(motion.div, { className: "absolute inset-0 bg-gray-500 bg-opacity-75 transition-opacity", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: onClose }),
535
+ React.createElement("section", { className: `absolute ${positionClasses[position]} max-w-md` },
536
+ React.createElement(motion.div, { className: `h-full w-full transform transition ease-in-out duration-300 ${className}`, initial: variants[position], animate: { x: 0, y: 0 }, exit: variants[position], transition: { duration: 0.3 } },
537
+ React.createElement("div", { className: "h-full bg-white shadow-xl" }, children))))))));
538
+ };
539
+
540
+ const OffcanvasBody = ({ children, className = '' }) => {
541
+ return (React.createElement("div", { className: `p-4 overflow-y-auto ${className}` }, children));
542
+ };
543
+
544
+ const OffcanvasHeader = ({ children, className = '', onClose }) => {
545
+ return (React.createElement("div", { className: `px-4 py-3 border-b border-gray-200 flex items-center justify-between ${className}` },
546
+ React.createElement("h2", { className: "text-lg font-semibold" }, children),
547
+ React.createElement("button", { onClick: onClose, className: "text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500" },
548
+ React.createElement("span", { className: "sr-only" }, "Close panel"),
549
+ React.createElement("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" },
550
+ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })))));
551
+ };
552
+
553
+ const Pagination = ({ className = '', currentPage, totalPages, onPageChange, color = 'primary', motionVariant = 'fadeIn', // Default motion variant
554
+ }) => {
555
+ const pageNumbers = [];
556
+ for (let i = 1; i <= totalPages; i++) {
557
+ pageNumbers.push(i);
558
+ }
559
+ const colorClasses = {
560
+ primary: 'text-blue-600 bg-blue-50 hover:bg-blue-100 hover:text-blue-700',
561
+ secondary: 'text-gray-600 bg-gray-50 hover:bg-gray-100 hover:text-gray-700',
562
+ success: 'text-green-600 bg-green-50 hover:bg-green-100 hover:text-green-700',
563
+ danger: 'text-red-600 bg-red-50 hover:bg-red-100 hover:text-red-700',
564
+ warning: 'text-yellow-600 bg-yellow-50 hover:bg-yellow-100 hover:text-yellow-700',
565
+ info: 'text-blue-400 bg-blue-50 hover:bg-blue-100 hover:text-blue-500',
566
+ };
567
+ return (React.createElement(motion.nav, { className: `flex justify-center ${className}`, initial: { opacity: 0, y: -50 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, variants: motionVariants[motionVariant] },
568
+ React.createElement("ul", { className: "flex items-center -space-x-px" },
569
+ React.createElement("li", null,
570
+ React.createElement(motion.button, { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: `block px-3 py-2 ml-0 leading-tight border border-gray-300 rounded-l-lg ${colorClasses[color]} ${currentPage === 1 && 'cursor-not-allowed opacity-50'}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible" }, "Previous")),
571
+ pageNumbers.map((number) => (React.createElement("li", { key: number },
572
+ React.createElement(motion.button, { onClick: () => onPageChange(number), className: `px-3 py-2 leading-tight border border-gray-300 ${colorClasses[color]} ${currentPage === number
573
+ ? 'bg-blue-100 text-blue-700 hover:bg-blue-200'
574
+ : 'bg-white hover:bg-gray-100'}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible" }, number)))),
575
+ React.createElement("li", null,
576
+ React.createElement(motion.button, { onClick: () => onPageChange(currentPage + 1), disabled: currentPage === totalPages, className: `block px-3 py-2 leading-tight border border-gray-300 rounded-r-lg ${colorClasses[color]} ${currentPage === totalPages && 'cursor-not-allowed opacity-50'}`, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible" }, "Next")))));
577
+ };
578
+
579
+ const ProgressBar = ({ className = '', color = 'primary', value, max = 100, motionVariant = 'fadeIn', // Default motion variant
580
+ }) => {
581
+ const percentage = Math.min(100, Math.max(0, (value / max) * 100));
582
+ const colorClasses = {
583
+ primary: 'bg-blue-600',
584
+ secondary: 'bg-gray-600',
585
+ success: 'bg-green-600',
586
+ danger: 'bg-red-600',
587
+ warning: 'bg-yellow-600',
588
+ info: 'bg-indigo-600',
589
+ };
590
+ return (React.createElement("div", { className: `w-full bg-gray-200 rounded-full h-2.5 ${className}` },
591
+ React.createElement(motion.div, { className: `h-2.5 rounded-full ${colorClasses[color]}`, style: { width: `${percentage}%` }, initial: { width: 0 }, animate: { width: `${percentage}%` }, transition: { duration: 0.5 }, variants: motionVariants[motionVariant], role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max })));
592
+ };
593
+
594
+ const Skeleton = ({ className = '', width = '100%', height = '20px', color = 'primary', motionVariant = 'fadeIn', // Default motion variant
595
+ }) => {
596
+ const colorClasses = {
597
+ primary: 'bg-blue-200',
598
+ secondary: 'bg-gray-300',
599
+ success: 'bg-green-200',
600
+ danger: 'bg-red-200',
601
+ warning: 'bg-yellow-200',
602
+ info: 'bg-indigo-200',
603
+ };
604
+ return (React.createElement(motion.div, { className: `animate-pulse rounded ${colorClasses[color]} ${className}`, style: { width, height }, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible" }));
605
+ };
606
+
607
+ const Slider = ({ className = '', min, max, value, onChange, step = 1, color = 'primary', // Default color set to primary
608
+ motionVariant = 'fadeIn', // Default motion variant
609
+ }) => {
610
+ const percentage = ((value - min) / (max - min)) * 100;
611
+ const colorClasses = {
612
+ primary: 'bg-blue-600',
613
+ secondary: 'bg-gray-600',
614
+ success: 'bg-green-600',
615
+ danger: 'bg-red-600',
616
+ warning: 'bg-yellow-600',
617
+ info: 'bg-indigo-600',
618
+ };
619
+ return (React.createElement("div", { className: `relative w-full h-2 bg-gray-200 rounded-full ${className}` },
620
+ React.createElement(motion.div, { className: `absolute h-full ${colorClasses[color]} rounded-full`, style: { width: `${percentage}%` }, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", transition: { duration: 0.3 } }),
621
+ React.createElement("input", { type: "range", min: min, max: max, value: value, onChange: (e) => onChange(Number(e.target.value)), step: step, className: "absolute w-full h-full opacity-0 cursor-pointer" })));
622
+ };
623
+
624
+ const RangeSlider = ({ className = '', min, max, values, onChange, step = 1, color = 'primary', // Default color set to primary
625
+ motionVariant = 'fadeIn', // Default motion variant
626
+ }) => {
627
+ const [minValue, maxValue] = values;
628
+ const minPercentage = ((minValue - min) / (max - min)) * 100;
629
+ const maxPercentage = ((maxValue - min) / (max - min)) * 100;
630
+ const colorClasses = {
631
+ primary: 'bg-blue-600',
632
+ secondary: 'bg-gray-600',
633
+ success: 'bg-green-600',
634
+ danger: 'bg-red-600',
635
+ warning: 'bg-yellow-600',
636
+ info: 'bg-indigo-600',
637
+ };
638
+ const handleMinChange = (e) => {
639
+ const newMinValue = Math.min(Number(e.target.value), maxValue - step);
640
+ onChange([newMinValue, maxValue]);
641
+ };
642
+ const handleMaxChange = (e) => {
643
+ const newMaxValue = Math.max(Number(e.target.value), minValue + step);
644
+ onChange([minValue, newMaxValue]);
645
+ };
646
+ return (React.createElement("div", { className: `relative w-full h-2 bg-gray-200 rounded-full ${className}` },
647
+ React.createElement(motion.div, { className: `absolute h-full ${colorClasses[color]} rounded-full`, style: { left: `${minPercentage}%`, right: `${100 - maxPercentage}%` }, variants: motionVariants[motionVariant], initial: "hidden", animate: "visible", transition: { duration: 0.3 } }),
648
+ React.createElement("input", { type: "range", min: min, max: max, value: minValue, onChange: handleMinChange, step: step, className: "absolute w-full h-full opacity-0 cursor-pointer" }),
649
+ React.createElement("input", { type: "range", min: min, max: max, value: maxValue, onChange: handleMaxChange, step: step, className: "absolute w-full h-full opacity-0 cursor-pointer" })));
650
+ };
651
+
652
+ const Stepper = ({ className = '', steps, currentStep }) => {
653
+ return (React.createElement("div", { className: `flex items-center ${className}` }, steps.map((step, index) => (React.createElement(React.Fragment, { key: index },
654
+ React.createElement("div", { className: "flex items-center" },
655
+ React.createElement("div", { className: `flex items-center justify-center w-8 h-8 rounded-full ${index < currentStep
656
+ ? 'bg-blue-600 text-white'
657
+ : index === currentStep
658
+ ? 'bg-blue-200 text-blue-600'
659
+ : 'bg-gray-200 text-gray-600'}` }, index < currentStep ? (React.createElement("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20" },
660
+ React.createElement("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }))) : (index + 1)),
661
+ index < steps.length - 1 && (React.createElement("div", { className: `flex-1 h-1 mx-2 ${index < currentStep ? 'bg-blue-600' : 'bg-gray-200'}` }))),
662
+ index < steps.length - 1 && (React.createElement("div", { className: "hidden sm:block text-xs text-center text-gray-500 mt-2" }, step)))))));
663
+ };
664
+
665
+ const Table = ({ children, className = '', motionVariant = 'fadeIn', // Default motion variant
666
+ color = 'primary', // Color customization
667
+ }) => {
668
+ const baseClasses = 'overflow-x-auto';
669
+ const colorClasses = {
670
+ primary: 'border-blue-600 text-blue-600',
671
+ secondary: 'border-gray-600 text-gray-600',
672
+ success: 'border-green-600 text-green-600',
673
+ danger: 'border-red-600 text-red-600',
674
+ warning: 'border-yellow-500 text-yellow-500',
675
+ info: 'border-blue-400 text-blue-400',
676
+ };
677
+ return (React.createElement(motion.div, { className: `${baseClasses} ${colorClasses[color]} ${className}`, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, variants: motionVariants[motionVariant] },
678
+ React.createElement("table", { className: "min-w-full divide-y divide-gray-200" }, children)));
679
+ };
680
+
681
+ const TableBody = ({ children, className = '' }) => {
682
+ return (React.createElement("tbody", { className: `bg-white divide-y divide-gray-200 ${className}` }, children));
683
+ };
684
+
685
+ const TableCell = ({ children, className = '', as = 'td' }) => {
686
+ const Tag = as;
687
+ const baseClass = as === 'th' ? 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider' : 'px-6 py-4 whitespace-nowrap text-sm text-gray-500';
688
+ return (React.createElement(Tag, { className: `${baseClass} ${className}` }, children));
689
+ };
690
+
691
+ const TableHead = ({ children, className = '' }) => {
692
+ return (React.createElement("thead", { className: `bg-gray-50 ${className}` }, children));
693
+ };
694
+
695
+ const TableRow = ({ children, className = '' }) => {
696
+ return (React.createElement(motion.tr, { className: className, initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.3 } }, children));
697
+ };
698
+
699
+ const Tabs = ({ className = '', tabs, motionVariant = 'fadeIn', // Default motion variant
700
+ color = 'primary', // Color customization
701
+ }) => {
702
+ const [activeTab, setActiveTab] = useState(0);
703
+ const colorClasses = {
704
+ primary: 'text-blue-600 border-blue-500',
705
+ secondary: 'text-gray-600 border-gray-500',
706
+ success: 'text-green-600 border-green-500',
707
+ danger: 'text-red-600 border-red-500',
708
+ warning: 'text-yellow-600 border-yellow-500',
709
+ info: 'text-blue-400 border-blue-400',
710
+ };
711
+ return (React.createElement("div", { className: className },
712
+ React.createElement("div", { className: "border-b border-gray-200" },
713
+ React.createElement("nav", { className: "-mb-px flex space-x-8", "aria-label": "Tabs" }, tabs.map((tab, index) => (React.createElement("button", { key: index, className: `
714
+ whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
715
+ ${activeTab === index
716
+ ? `${colorClasses[color]}`
717
+ : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'}
718
+ `, onClick: () => setActiveTab(index) }, tab.label))))),
719
+ React.createElement(motion.div, { key: activeTab, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, variants: motionVariants[motionVariant], className: "mt-4" }, tabs[activeTab].content)));
720
+ };
721
+
722
+ const Tooltip = ({ children, className = '', content, position = 'top', color = 'primary', motionVariant = 'fadeIn', }) => {
723
+ const [isVisible, setIsVisible] = useState(false);
724
+ const positionClasses = {
725
+ top: 'bottom-full left-1/2 transform -translate-x-1/2 mb-2',
726
+ right: 'left-full top-1/2 transform -translate-y-1/2 ml-2',
727
+ bottom: 'top-full left-1/2 transform -translate-x-1/2 mt-2',
728
+ left: 'right-full top-1/2 transform -translate-y-1/2 mr-2',
729
+ };
730
+ const colorClasses = {
731
+ primary: 'bg-blue-600',
732
+ secondary: 'bg-gray-600',
733
+ success: 'bg-green-600',
734
+ danger: 'bg-red-600',
735
+ warning: 'bg-yellow-500',
736
+ info: 'bg-blue-400',
737
+ };
738
+ return (React.createElement("div", { className: "relative inline-block" },
739
+ React.createElement("div", { onMouseEnter: () => setIsVisible(true), onMouseLeave: () => setIsVisible(false) }, children),
740
+ React.createElement(AnimatePresence, null, isVisible && (React.createElement(motion.div, { className: `absolute z-10 px-3 py-2 text-sm font-medium text-white rounded-lg shadow-sm ${positionClasses[position]} ${colorClasses[color]} ${className}`, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, variants: motionVariants[motionVariant] }, content)))));
741
+ };
742
+
743
+ const Heading = ({ children, className = '', as = 'h2', size = 'md' }) => {
744
+ const Tag = as;
745
+ const sizeClasses = {
746
+ xs: 'text-lg',
747
+ sm: 'text-xl',
748
+ md: 'text-2xl',
749
+ lg: 'text-3xl',
750
+ xl: 'text-4xl',
751
+ };
752
+ return (React.createElement(motion.div, { initial: { opacity: 0, y: -20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 } },
753
+ React.createElement(Tag, { className: `font-bold ${sizeClasses[size]} ${className}` }, children)));
754
+ };
755
+
756
+ const Text = ({ children, className = '', size = 'md', weight = 'normal' }) => {
757
+ const sizeClasses = {
758
+ xs: 'text-xs',
759
+ sm: 'text-sm',
760
+ md: 'text-base',
761
+ lg: 'text-lg',
762
+ xl: 'text-xl',
763
+ };
764
+ const weightClasses = {
765
+ normal: 'font-normal',
766
+ medium: 'font-medium',
767
+ semibold: 'font-semibold',
768
+ bold: 'font-bold',
769
+ };
770
+ return (React.createElement("p", { className: `${sizeClasses[size]} ${weightClasses[weight]} ${className}` }, children));
771
+ };
772
+
773
+ export { Accordion, Alert, Avatar, Badge, Breadcrumb, Button, Card, CardBody, CardFooter, CardHeader, Checkbox, Container, Dropdown, DropdownItem, FileUpload, Flex, Grid, Heading, IconButton, Input, List, ListItem, Modal, ModalBody, ModalFooter, ModalHeader, NavItem, Navbar, Offcanvas, OffcanvasBody, OffcanvasHeader, Pagination, ProgressBar, Radio, RangeSlider, Select, Skeleton, Slider, Stepper, Switch, Table, TableBody, TableCell, TableHead, TableRow, Tabs, Text, Textarea, Tooltip };