automoby-kit 1.0.65 → 1.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,312 +1,312 @@
1
- # Automoby Kit
2
-
3
- A comprehensive React UI component library built with TypeScript and Tailwind CSS - created in war 2025.
4
-
5
- ![npm version](https://img.shields.io/badge/version-1.0.64-blue.svg)
6
- ![TypeScript](https://img.shields.io/badge/TypeScript-5.8.3-blue)
7
- ![React](https://img.shields.io/badge/React-19.1.0-blue)
8
-
9
- ## ✨ Features
10
-
11
- - 🎨 **15+ Production-Ready Components** - Comprehensive UI library for modern React applications
12
- - 📱 **Mobile-First Design** - Built-in mobile detection and responsive behavior
13
- - 🎯 **TypeScript Native** - Full type safety with complete TypeScript definitions
14
- - 🌳 **Tree-Shakeable** - Import only what you need for optimal bundle size
15
- - 🎨 **Tailwind CSS** - Styled with Tailwind for easy customization
16
- - ♿ **Accessible** - ARIA-compliant components following best practices
17
- - 🚀 **Modern React 19** - Built for the latest React features
18
-
19
- ## 🚀 Installation
20
-
21
- ```bash
22
- npm install automoby-kit
23
- ```
24
-
25
- ### Peer Dependencies
26
-
27
- Make sure you have these installed:
28
-
29
- ```bash
30
- npm install react react-dom clsx lucide-react tailwindcss ua-parser-js
31
- ```
32
-
33
- ## 📦 Usage
34
-
35
- ### Import All Components
36
-
37
- ```typescript
38
- import {
39
- Button,
40
- Typography,
41
- Input,
42
- Tabs,
43
- Dialog,
44
- Select
45
- } from 'automoby-kit';
46
-
47
- function App() {
48
- return (
49
- <div>
50
- <Typography variant="h1">Welcome to Automoby Kit</Typography>
51
- <Button variant="primary" size="lg">
52
- Click me!
53
- </Button>
54
- <Input placeholder="Enter text..." />
55
- </div>
56
- );
57
- }
58
- ```
59
-
60
- ### Import Individual Components (Tree-Shaking)
61
-
62
- For better bundle optimization, import components individually:
63
-
64
- ```typescript
65
- import { Button } from 'automoby-kit/Button';
66
- import { Typography } from 'automoby-kit/Typography';
67
- import { Input } from 'automoby-kit/Input';
68
-
69
- function App() {
70
- return (
71
- <div>
72
- <Typography variant="h1">Optimized Bundle</Typography>
73
- <Button variant="primary">Click me!</Button>
74
- <Input placeholder="Type here..." />
75
- </div>
76
- );
77
- }
78
- ```
79
-
80
- ## 🧩 Available Components
81
-
82
- ### Form Components
83
- - **Input** - Advanced input fields with label, error states, and various types
84
- - **Select** - Dropdown select with keyboard navigation and accessibility
85
- - **RadioGroup** - Radio button groups with customizable options
86
-
87
- ### Navigation Components
88
- - **Breadcrumb** - Navigation breadcrumbs for showing page hierarchy
89
- - **Menu** - Context menus and dropdowns with nested support
90
- - **Tabs** - Tabbed interfaces for organizing content
91
- - **Pagination** - Page navigation with mobile and desktop variants
92
-
93
- ### Display Components
94
- - **Typography** - Text rendering with various heading and body styles
95
- - **Button** - Interactive buttons with multiple variants and sizes
96
- - **Chips** - Tag-like elements for categories or filters
97
- - **Divider** - Visual separators for content sections
98
- - **Accordion** - Collapsible content sections
99
-
100
- ### Overlay Components
101
- - **Dialog** - Modal dialogs with customizable content and actions
102
- - **Drawer** - Slide-out panels from any direction
103
- - **Backdrop** - Overlay backgrounds for modals
104
-
105
- ## 🏗️ TypeScript Support
106
-
107
- All components come with full TypeScript support and exported types:
108
-
109
- ```typescript
110
- import {
111
- ButtonProps,
112
- ButtonVariant,
113
- ButtonSize,
114
- TypographyProps,
115
- TypographyVariant,
116
- InputProps,
117
- DialogProps,
118
- SelectProps,
119
- SelectOption
120
- } from 'automoby-kit';
121
-
122
- // Use types in your components
123
- const MyButton: React.FC<ButtonProps> = (props) => {
124
- return <Button {...props} />;
125
- };
126
-
127
- // Define variants with type safety
128
- const variant: ButtonVariant = 'primary';
129
- const size: ButtonSize = 'lg';
130
- ```
131
-
132
- ## 📱 Mobile Context
133
-
134
- The library includes a mobile detection context for responsive behavior:
135
-
136
- ```typescript
137
- import { MobileProvider, useMobile } from 'automoby-kit';
138
-
139
- function App() {
140
- return (
141
- <MobileProvider userAgent={navigator.userAgent}>
142
- <MyComponent />
143
- </MobileProvider>
144
- );
145
- }
146
-
147
- function MyComponent() {
148
- const isMobile = useMobile();
149
-
150
- return (
151
- <div>
152
- {isMobile ? (
153
- <p>Mobile View</p>
154
- ) : (
155
- <p>Desktop View</p>
156
- )}
157
- </div>
158
- );
159
- }
160
- ```
161
-
162
- ## 🎨 Component Examples
163
-
164
- ### Dialog
165
-
166
- ```typescript
167
- import { Dialog, DialogButton } from 'automoby-kit';
168
- import { useState } from 'react';
169
-
170
- function MyDialog() {
171
- const [isOpen, setIsOpen] = useState(false);
172
-
173
- return (
174
- <Dialog
175
- isOpen={isOpen}
176
- onClose={() => setIsOpen(false)}
177
- title="Confirm Action"
178
- content={<p>Are you sure you want to proceed?</p>}
179
- buttons={
180
- <>
181
- <DialogButton variant="primary" onClick={() => setIsOpen(false)}>
182
- Confirm
183
- </DialogButton>
184
- <DialogButton variant="secondary" onClick={() => setIsOpen(false)}>
185
- Cancel
186
- </DialogButton>
187
- </>
188
- }
189
- />
190
- );
191
- }
192
- ```
193
-
194
- ### Select
195
-
196
- ```typescript
197
- import { Select } from 'automoby-kit';
198
-
199
- function MySelect() {
200
- const options = [
201
- { value: '1', label: 'Option 1' },
202
- { value: '2', label: 'Option 2' },
203
- { value: '3', label: 'Option 3' },
204
- ];
205
-
206
- return (
207
- <Select
208
- label="Choose an option"
209
- placeholder="Select..."
210
- options={options}
211
- onChange={(value) => console.log('Selected:', value)}
212
- />
213
- );
214
- }
215
- ```
216
-
217
- ### Pagination
218
-
219
- ```typescript
220
- import { Pagination } from 'automoby-kit';
221
-
222
- function MyPagination() {
223
- return (
224
- <Pagination
225
- currentPage={1}
226
- totalPages={10}
227
- onPageChange={(page) => console.log('Page:', page)}
228
- />
229
- );
230
- }
231
- ```
232
-
233
- ## 🎯 Available Exports
234
-
235
- ### Components
236
- `Button`, `Typography`, `Input`, `Tabs`, `Drawer`, `Backdrop`, `Breadcrumb`, `Pagination`, `Accordion`, `Divider`, `RadioGroup`, `Chips`, `Menu`, `Dialog`, `DialogButton`, `Select`
237
-
238
- ### Context Providers
239
- `MobileProvider`, `useMobile`
240
-
241
- ### Utilities
242
- `cn` (classname utility from `automoby-kit/utils`)
243
-
244
- ### Types
245
- All component props and variants are exported for TypeScript users.
246
-
247
- ## 🛠️ Peer Dependencies
248
-
249
- ```json
250
- {
251
- "react": "^19.1.0",
252
- "react-dom": "^19.1.0",
253
- "clsx": "^2.1.1",
254
- "lucide-react": "^0.522.0",
255
- "tailwindcss": "^4.1.10",
256
- "typescript": "^5.8.3",
257
- "ua-parser-js": "^2.0.4"
258
- }
259
- ```
260
-
261
- ## 📦 Bundle Formats
262
-
263
- This package ships with multiple bundle formats:
264
-
265
- - **ESM** - `dist/esm` - ES Modules for modern bundlers
266
- - **CommonJS** - `dist/cjs` - CommonJS for Node.js compatibility
267
- - **TypeScript Definitions** - `dist/types` - Complete type definitions
268
-
269
- ## 🔧 Configuration
270
-
271
- If you're using Next.js 13+, add 'use client' directive when needed (automatically handled in pre-built bundles):
272
-
273
- ```typescript
274
- 'use client';
275
-
276
- import { Button } from 'automoby-kit';
277
- ```
278
-
279
- ## 🌟 Why Automoby Kit?
280
-
281
- - **Battle-Tested** - Built during production demands
282
- - **Developer Experience** - Intuitive API with excellent TypeScript support
283
- - **Performance** - Optimized bundle size with tree-shaking support
284
- - **Modern Stack** - Built with latest React 19 and TypeScript 5.8
285
- - **Accessible** - WCAG compliant components
286
- - **Customizable** - Easy to theme with Tailwind CSS
287
-
288
- ## 🆘 Support
289
-
290
- If you encounter any issues:
291
-
292
- 1. Check the [GitHub issues](https://github.com/yourusername/automoby-kit/issues)
293
- 2. Submit a detailed issue report
294
- 3. Provide a minimal reproduction example
295
-
296
- ## 👥 Authors
297
-
298
- - **Ghazal Kordi** - Co-creator
299
- - **Alireza Mirzaee** - Co-creator
300
-
301
- ## 📄 License
302
-
303
- ISC
304
-
305
- ## 🔄 Version History
306
-
307
- - **1.0.64** - Current stable release
308
- - **1.0.0** - Initial release
309
-
310
- ---
311
-
1
+ # Automoby Kit
2
+
3
+ A comprehensive React UI component library built with TypeScript and Tailwind CSS - created in war 2025.
4
+
5
+ ![npm version](https://img.shields.io/badge/version-1.0.64-blue.svg)
6
+ ![TypeScript](https://img.shields.io/badge/TypeScript-5.8.3-blue)
7
+ ![React](https://img.shields.io/badge/React-19.1.0-blue)
8
+
9
+ ## ✨ Features
10
+
11
+ - 🎨 **15+ Production-Ready Components** - Comprehensive UI library for modern React applications
12
+ - 📱 **Mobile-First Design** - Built-in mobile detection and responsive behavior
13
+ - 🎯 **TypeScript Native** - Full type safety with complete TypeScript definitions
14
+ - 🌳 **Tree-Shakeable** - Import only what you need for optimal bundle size
15
+ - 🎨 **Tailwind CSS** - Styled with Tailwind for easy customization
16
+ - ♿ **Accessible** - ARIA-compliant components following best practices
17
+ - 🚀 **Modern React 19** - Built for the latest React features
18
+
19
+ ## 🚀 Installation
20
+
21
+ ```bash
22
+ npm install automoby-kit
23
+ ```
24
+
25
+ ### Peer Dependencies
26
+
27
+ Make sure you have these installed:
28
+
29
+ ```bash
30
+ npm install react react-dom clsx lucide-react tailwindcss ua-parser-js
31
+ ```
32
+
33
+ ## 📦 Usage
34
+
35
+ ### Import All Components
36
+
37
+ ```typescript
38
+ import {
39
+ Button,
40
+ Typography,
41
+ Input,
42
+ Tabs,
43
+ Dialog,
44
+ Select
45
+ } from 'automoby-kit';
46
+
47
+ function App() {
48
+ return (
49
+ <div>
50
+ <Typography variant="h1">Welcome to Automoby Kit</Typography>
51
+ <Button variant="primary" size="lg">
52
+ Click me!
53
+ </Button>
54
+ <Input placeholder="Enter text..." />
55
+ </div>
56
+ );
57
+ }
58
+ ```
59
+
60
+ ### Import Individual Components (Tree-Shaking)
61
+
62
+ For better bundle optimization, import components individually:
63
+
64
+ ```typescript
65
+ import { Button } from 'automoby-kit/Button';
66
+ import { Typography } from 'automoby-kit/Typography';
67
+ import { Input } from 'automoby-kit/Input';
68
+
69
+ function App() {
70
+ return (
71
+ <div>
72
+ <Typography variant="h1">Optimized Bundle</Typography>
73
+ <Button variant="primary">Click me!</Button>
74
+ <Input placeholder="Type here..." />
75
+ </div>
76
+ );
77
+ }
78
+ ```
79
+
80
+ ## 🧩 Available Components
81
+
82
+ ### Form Components
83
+ - **Input** - Advanced input fields with label, error states, and various types
84
+ - **Select** - Dropdown select with keyboard navigation and accessibility
85
+ - **RadioGroup** - Radio button groups with customizable options
86
+
87
+ ### Navigation Components
88
+ - **Breadcrumb** - Navigation breadcrumbs for showing page hierarchy
89
+ - **Menu** - Context menus and dropdowns with nested support
90
+ - **Tabs** - Tabbed interfaces for organizing content
91
+ - **Pagination** - Page navigation with mobile and desktop variants
92
+
93
+ ### Display Components
94
+ - **Typography** - Text rendering with various heading and body styles
95
+ - **Button** - Interactive buttons with multiple variants and sizes
96
+ - **Chips** - Tag-like elements for categories or filters
97
+ - **Divider** - Visual separators for content sections
98
+ - **Accordion** - Collapsible content sections
99
+
100
+ ### Overlay Components
101
+ - **Dialog** - Modal dialogs with customizable content and actions
102
+ - **Drawer** - Slide-out panels from any direction
103
+ - **Backdrop** - Overlay backgrounds for modals
104
+
105
+ ## 🏗️ TypeScript Support
106
+
107
+ All components come with full TypeScript support and exported types:
108
+
109
+ ```typescript
110
+ import {
111
+ ButtonProps,
112
+ ButtonVariant,
113
+ ButtonSize,
114
+ TypographyProps,
115
+ TypographyVariant,
116
+ InputProps,
117
+ DialogProps,
118
+ SelectProps,
119
+ SelectOption
120
+ } from 'automoby-kit';
121
+
122
+ // Use types in your components
123
+ const MyButton: React.FC<ButtonProps> = (props) => {
124
+ return <Button {...props} />;
125
+ };
126
+
127
+ // Define variants with type safety
128
+ const variant: ButtonVariant = 'primary';
129
+ const size: ButtonSize = 'lg';
130
+ ```
131
+
132
+ ## 📱 Mobile Context
133
+
134
+ The library includes a mobile detection context for responsive behavior:
135
+
136
+ ```typescript
137
+ import { MobileProvider, useMobile } from 'automoby-kit';
138
+
139
+ function App() {
140
+ return (
141
+ <MobileProvider userAgent={navigator.userAgent}>
142
+ <MyComponent />
143
+ </MobileProvider>
144
+ );
145
+ }
146
+
147
+ function MyComponent() {
148
+ const isMobile = useMobile();
149
+
150
+ return (
151
+ <div>
152
+ {isMobile ? (
153
+ <p>Mobile View</p>
154
+ ) : (
155
+ <p>Desktop View</p>
156
+ )}
157
+ </div>
158
+ );
159
+ }
160
+ ```
161
+
162
+ ## 🎨 Component Examples
163
+
164
+ ### Dialog
165
+
166
+ ```typescript
167
+ import { Dialog, DialogButton } from 'automoby-kit';
168
+ import { useState } from 'react';
169
+
170
+ function MyDialog() {
171
+ const [isOpen, setIsOpen] = useState(false);
172
+
173
+ return (
174
+ <Dialog
175
+ isOpen={isOpen}
176
+ onClose={() => setIsOpen(false)}
177
+ title="Confirm Action"
178
+ content={<p>Are you sure you want to proceed?</p>}
179
+ buttons={
180
+ <>
181
+ <DialogButton variant="primary" onClick={() => setIsOpen(false)}>
182
+ Confirm
183
+ </DialogButton>
184
+ <DialogButton variant="secondary" onClick={() => setIsOpen(false)}>
185
+ Cancel
186
+ </DialogButton>
187
+ </>
188
+ }
189
+ />
190
+ );
191
+ }
192
+ ```
193
+
194
+ ### Select
195
+
196
+ ```typescript
197
+ import { Select } from 'automoby-kit';
198
+
199
+ function MySelect() {
200
+ const options = [
201
+ { value: '1', label: 'Option 1' },
202
+ { value: '2', label: 'Option 2' },
203
+ { value: '3', label: 'Option 3' },
204
+ ];
205
+
206
+ return (
207
+ <Select
208
+ label="Choose an option"
209
+ placeholder="Select..."
210
+ options={options}
211
+ onChange={(value) => console.log('Selected:', value)}
212
+ />
213
+ );
214
+ }
215
+ ```
216
+
217
+ ### Pagination
218
+
219
+ ```typescript
220
+ import { Pagination } from 'automoby-kit';
221
+
222
+ function MyPagination() {
223
+ return (
224
+ <Pagination
225
+ currentPage={1}
226
+ totalPages={10}
227
+ onPageChange={(page) => console.log('Page:', page)}
228
+ />
229
+ );
230
+ }
231
+ ```
232
+
233
+ ## 🎯 Available Exports
234
+
235
+ ### Components
236
+ `Button`, `Typography`, `Input`, `Tabs`, `Drawer`, `Backdrop`, `Breadcrumb`, `Pagination`, `Accordion`, `Divider`, `RadioGroup`, `Chips`, `Menu`, `Dialog`, `DialogButton`, `Select`
237
+
238
+ ### Context Providers
239
+ `MobileProvider`, `useMobile`
240
+
241
+ ### Utilities
242
+ `cn` (classname utility from `automoby-kit/utils`)
243
+
244
+ ### Types
245
+ All component props and variants are exported for TypeScript users.
246
+
247
+ ## 🛠️ Peer Dependencies
248
+
249
+ ```json
250
+ {
251
+ "react": "^19.1.0",
252
+ "react-dom": "^19.1.0",
253
+ "clsx": "^2.1.1",
254
+ "lucide-react": "^0.522.0",
255
+ "tailwindcss": "^4.1.10",
256
+ "typescript": "^5.8.3",
257
+ "ua-parser-js": "^2.0.4"
258
+ }
259
+ ```
260
+
261
+ ## 📦 Bundle Formats
262
+
263
+ This package ships with multiple bundle formats:
264
+
265
+ - **ESM** - `dist/esm` - ES Modules for modern bundlers
266
+ - **CommonJS** - `dist/cjs` - CommonJS for Node.js compatibility
267
+ - **TypeScript Definitions** - `dist/types` - Complete type definitions
268
+
269
+ ## 🔧 Configuration
270
+
271
+ If you're using Next.js 13+, add 'use client' directive when needed (automatically handled in pre-built bundles):
272
+
273
+ ```typescript
274
+ 'use client';
275
+
276
+ import { Button } from 'automoby-kit';
277
+ ```
278
+
279
+ ## 🌟 Why Automoby Kit?
280
+
281
+ - **Battle-Tested** - Built during production demands
282
+ - **Developer Experience** - Intuitive API with excellent TypeScript support
283
+ - **Performance** - Optimized bundle size with tree-shaking support
284
+ - **Modern Stack** - Built with latest React 19 and TypeScript 5.8
285
+ - **Accessible** - WCAG compliant components
286
+ - **Customizable** - Easy to theme with Tailwind CSS
287
+
288
+ ## 🆘 Support
289
+
290
+ If you encounter any issues:
291
+
292
+ 1. Check the [GitHub issues](https://github.com/yourusername/automoby-kit/issues)
293
+ 2. Submit a detailed issue report
294
+ 3. Provide a minimal reproduction example
295
+
296
+ ## 👥 Authors
297
+
298
+ - **Ghazal Kordi** - Co-creator
299
+ - **Alireza Mirzaee** - Co-creator
300
+
301
+ ## 📄 License
302
+
303
+ ISC
304
+
305
+ ## 🔄 Version History
306
+
307
+ - **1.0.64** - Current stable release
308
+ - **1.0.0** - Initial release
309
+
310
+ ---
311
+
312
312
  Built with ❤️ in 2025