my-animated-components 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +8 -1
  2. package/package.json +45 -8
  3. package/readme.md +73 -186
package/dist/index.js CHANGED
@@ -933,11 +933,18 @@ const NavItem = ({ children, className = '', href, active = false, size = 'md',
933
933
  };
934
934
 
935
935
  const Navbar = ({ children, className = '', brand }) => {
936
+ const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
936
937
  return (React.createElement(motion.nav, { className: `bg-white shadow ${className}`, initial: { opacity: 0, y: -50 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 } },
937
938
  React.createElement("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8" },
938
939
  React.createElement("div", { className: "flex justify-between h-16" },
939
940
  React.createElement("div", { className: "flex-shrink-0 flex items-center" }, brand),
940
- React.createElement("div", { className: "flex items-center" }, children)))));
941
+ React.createElement("div", { className: "hidden md:flex items-center space-x-4" }, children),
942
+ React.createElement("div", { className: "flex md:hidden items-center" },
943
+ React.createElement("button", { type: "button", className: "text-gray-800 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-400", onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen) }, isMobileMenuOpen ? (React.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
944
+ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }))) : (React.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
945
+ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 6h16M4 12h16M4 18h16" }))))))),
946
+ isMobileMenuOpen && (React.createElement("div", { className: "md:hidden bg-white shadow-md" },
947
+ React.createElement("div", { className: "space-y-2 px-4 py-2" }, React.Children.map(children, (child) => (React.createElement("div", { className: "text-gray-800 hover:text-gray-600" }, child))))))));
941
948
  };
942
949
 
943
950
  const Offcanvas = ({ children, className = '', isOpen, onClose, position = 'left' }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-animated-components",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
@@ -10,21 +10,58 @@
10
10
  },
11
11
  "keywords": [
12
12
  "react",
13
+ "react-components",
13
14
  "react-hooks",
15
+ "react-ui",
16
+ "animated-components",
17
+ "animation-library",
18
+ "motion-effects",
19
+ "motion-ui",
20
+ "framer-motion",
21
+ "tailwindcss",
22
+ "ui-library",
23
+ "responsive-ui",
24
+ "responsive-design",
25
+ "modern-ui",
26
+ "beautiful-ui",
27
+ "design-system",
28
+ "react-animations",
29
+ "css-animations",
30
+ "motion-animations",
31
+ "page-transitions",
32
+ "page-animations",
33
+ "interactive-ui",
34
+ "frontend-library",
35
+ "ui-kit",
36
+ "react-ui-kit",
37
+ "component-library",
38
+ "dynamic-components",
39
+ "custom-hooks",
14
40
  "useState",
15
41
  "useEffect",
16
42
  "useRef",
17
43
  "useContext",
18
44
  "useReducer",
19
- "custom-hook",
20
- "component",
21
- "frontend",
22
- "UI",
23
45
  "navigation",
24
46
  "routing",
25
- "navigate",
47
+ "page-navigation",
26
48
  "router",
27
- "page-navigation"
49
+ "menu-transitions",
50
+ "interactive-design",
51
+ "material-ui-alternative",
52
+ "bootstrap-alternative",
53
+ "animation-toolkit",
54
+ "transition-effects",
55
+ "micro-interactions",
56
+ "react-motion",
57
+ "motion-components",
58
+ "professional-ui",
59
+ "easy-to-use",
60
+ "developer-friendly",
61
+ "reusable-components",
62
+ "high-performance-ui",
63
+ "typescript-support",
64
+ "my-animated-components"
28
65
  ],
29
66
  "author": "",
30
67
  "license": "ISC",
@@ -46,4 +83,4 @@
46
83
  "tslib": "^2.6.2",
47
84
  "typescript": "^5.7.3"
48
85
  }
49
- }
86
+ }
package/readme.md CHANGED
@@ -1,219 +1,106 @@
1
1
  # My Animated Components
2
2
 
3
- **My Animated Components** is a collection of customizable React components built with Framer Motion for smooth animations. It provides buttons, icon buttons, and other interactive UI elements with different styles, sizes, and animations.
3
+ A comprehensive React component library with built-in animations and customization options.
4
4
 
5
- ---
6
5
  ## Documentation
7
6
 
8
7
  For detailed documentation and examples, visit the [official documentation](https://mukeshdev.vercel.app/my-animated-components).
9
8
 
10
9
  ## Features
11
10
 
12
- - **Customizable Buttons**: Supports different variants (solid, outline, ghost) and colors (primary, secondary, etc.).
13
- - **Icon Button**: Use any custom icon inside the button for more flexibility.
14
- - **Framer Motion Animations**: Interactive hover and tap animations to enhance user experience.
15
- - **Various UI Elements**: Includes components like Accordion, Alert, Badge, Modal, Dropdown, and more.
11
+ - 🎨 Customizable colors and sizes
12
+ - 🌟 Built-in animations using Framer Motion
13
+ - 📱 Responsive design
14
+ - 🎭 Accessible components
15
+ - 🧩 Easy to use and integrate
16
+
17
+ ## Installation
18
+
19
+ Install the package using npm:
20
+
21
+ ```bash
22
+ npm install my-animated-components
23
+ ```
24
+
25
+ Or using yarn:
26
+
27
+ ```bash
28
+ yarn add my-animated-components
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ Import the components you need in your React application:
34
+
35
+ ```jsx
36
+ import { Button, Card, Modal } from 'my-animated-components';
37
+ ```
38
+
39
+ Then use them in your components:
40
+
41
+ ```jsx
42
+ function MyComponent() {
43
+ return (
44
+ <Card>
45
+ <h2>Welcome to My App</h2>
46
+ <Button color="primary" motionVariant="fadeIn">
47
+ Click me!
48
+ </Button>
49
+ </Card>
50
+ );
51
+ }
52
+ ```
16
53
 
17
54
  ## Available Components
18
55
 
19
- - Button
20
- - IconButton
21
56
  - Accordion
22
57
  - Alert
23
58
  - Avatar
24
59
  - Badge
25
60
  - Breadcrumb
26
- - Card
27
- - CardBody
28
- - CardFooter
29
- - CardHeader
30
- - Dropdown
31
- - DropdownItem
61
+ - Button
62
+ - Card (with CardBody, CardFooter, CardHeader)
32
63
  - Checkbox
33
- - FileUpload
34
- - Input
35
- - Radio
36
- - Select
37
- - Switch
38
- - Textarea
39
64
  - Container
65
+ - Dropdown
66
+ - FileUpload
40
67
  - Flex
41
68
  - Grid
42
- - List
43
- - ListItem
44
- - Modal
45
- - ModalBody
46
- - ModalFooter
47
- - ModalHeader
69
+ - Heading
70
+ - IconButton
71
+ - Input
72
+ - List (with ListItem)
73
+ - Modal (with ModalBody, ModalFooter, ModalHeader)
48
74
  - NavItem
49
75
  - Navbar
50
- - Offcanvas
51
- - OffcanvasBody
52
- - OffcanvasHeader
76
+ - Offcanvas (with OffcanvasBody, OffcanvasHeader)
53
77
  - Pagination
54
78
  - ProgressBar
79
+ - Radio
80
+ - RangeSlider
81
+ - Select
55
82
  - Skeleton
56
83
  - Slider
57
- - RangeSlider
58
84
  - Stepper
59
- - Table
60
- - TableBody
61
- - TableCell
62
- - TableHead
63
- - TableRow
85
+ - Switch
86
+ - Table (with TableBody, TableCell, TableHead, TableRow)
64
87
  - Tabs
65
- - Tooltip
66
- - Heading
67
88
  - Text
89
+ - Textarea
90
+ - Tooltip
68
91
 
92
+ ## Customization
69
93
 
70
- ---
71
-
72
- ## Props
73
-
74
- Here are the common props for the **Button** component:
75
-
76
- | Prop | Type | Description |
77
- |---------------|-----------|---------------------------------------------------------------|
78
- | `onClick` | function | The function to call when the button is clicked. |
79
- | `disabled` | boolean | Disables the button if set to true. |
80
- | `variant` | string | The button style, one of `solid`, `outline`, or `ghost`. |
81
- | `color` | string | The button color, one of `primary`, `secondary`, `success`, `danger`, `warning`, or `info`. |
82
- | `size` | string | The size of the button, one of `xs`, `sm`, `md`, `lg`, or `xl`. |
83
- | `motionVariant` | string | A predefined motion animation for the button (default is `fadeIn`). |
84
-
85
- ---
86
-
87
- ## Available Motion Variants
88
-
89
- - null
90
- - fadeIn
91
- - zoomIn
92
- - slideUp
93
- - slideDown
94
- - slideLeft
95
- - slideRight
96
- - bounce
97
- - rotateIn
98
- - stagger
99
- - flip
100
- - fadeOut
101
- - zoomOut
102
- - scaleUp
103
- - scaleDown
104
- - fadeInUp
105
- - fadeInDown
106
- - fadeInLeft
107
- - fadeInRight
108
- - rotateBounce
109
- - scaleBounce
110
- - fadeInScale
111
- - bounceOut
112
- - shake
113
- - pulse
114
- - fadeInFast
115
- - slideUpFast
116
- - fadeUp
117
- - zoomInFast
118
- - zoomOutFast
119
- - slideDownFast
120
- - rotateOut
121
- - flipFast
122
- - staggerUp
123
- - flipIn
124
- - fadeInSlow
125
- - slideUpSlow
126
- - slideDownSlow
127
- - slideLeftSlow
128
- - slideRightSlow
129
- - bounceSlow
130
- - rotateInSlow
131
- - staggerSlow
132
- - flipSlow
133
- - scaleBounceSlow
134
- - rotateOutFast
135
- - scaleUpFast
136
- - scaleDownFast
137
- - bounceFast
138
- - flipInFast
139
- - fadeInLeftFast
140
- - fadeInRightFast
141
- - fadeInUpFast
142
- - fadeInDownFast
143
- - scaleUpSlow
144
- - scaleDownSlow
145
- - rotateInFast
146
- - staggerChildren
147
- - fadeUpSlow
148
- - slideInFromLeft
149
- - slideInFromRight
150
- - slideInFromTop
151
- - slideInFromBottom
152
- - fadeInSlowFromTop
153
- - fadeInSlowFromBottom
154
- - fadeInSlowFromLeft
155
- - fadeInSlowFromRight
156
- - bounceIn
157
- - zoomOutSlow
158
- - fadeInFastFromTop
159
- - fadeInFastFromBottom
160
- - slideInLeftFast
161
- - slideInRightFast
162
- - fadeInRotate
163
- - scaleInFast
164
- - zoomInBig
165
- - slideInDiagonal
166
- - rotate360
167
- - flipInX
168
- - staggerChildrenFast
169
- - pulseFast
170
- - slideInDiagonalFast
171
- - fadeInRightSlow
172
- - zoomOutSlowFromCenter
173
- - flipBounce
174
- - slideInFromTopFast
175
- - fadeInDiagonal
176
- - zoomInBounce
177
- - rotateInOut
178
- - staggerUpFast
179
- - fadeInRotateIn
180
- - scaleInQuick
181
- - slideInFromBottomSlow
182
- - flipRotateOut
183
- - slideLeftFast
184
- - zoomInBigFast
185
- - fadeInUpFastSlow
186
- - rotateOutSlow
187
- - staggerLeft
188
- - rotateOutFastReverse
189
- - scaleDownBounce
190
- - fadeInFastFromLeft
191
- - fadeInFastFromRight
192
- - bounceSlowFast
193
- - slideInFromTopFastReverse
194
- - fadeOutFast
195
- - flipScaleUp
196
- - slideOutRight
197
- - zoomOutBounce
198
- - fadeUpReverse
199
- - staggerUpReverse
200
- - scaleInFromLeft
201
- - flipOut
202
-
203
- ---
204
-
205
- ## Example Usage
206
-
207
- ### Button Example
208
-
209
- ```tsx
210
- import { Button } from 'my-animated-components';
211
-
212
- const MyComponent = () => {
213
- return (
214
- <Button color="primary" size="md" className="my-custom-class" motionVariant='slideUp'>
215
- Click Me
216
- </Button>
217
- );
218
- };
94
+ Most components accept props for customization, including:
95
+
96
+ - `color`: Choose from 'primary', 'secondary', 'success', 'danger', 'warning', 'info'
97
+ - `size`: Usually 'xs', 'sm', 'md', 'lg', 'xl'
98
+ - `motionVariant`: Animation variant (e.g., 'fadeIn', 'slideUp', 'zoomIn')
99
+
100
+ ## Contributing
101
+
102
+ Contributions are welcome! Please feel free to submit a Pull Request.
103
+
104
+ ## License
219
105
 
106
+ This project is licensed under the MIT License.