automoby-kit 1.0.63 → 1.0.65
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 +312 -100
- package/dist/cjs/Input.js +1 -1
- package/dist/esm/Input.js +1 -1
- package/dist/types/Input.js +31 -37
- package/package.json +176 -176
package/README.md
CHANGED
|
@@ -1,100 +1,312 @@
|
|
|
1
|
-
# Automoby Kit
|
|
2
|
-
|
|
3
|
-
A comprehensive React UI component library - created in war 2025.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
import {
|
|
68
|
-
|
|
69
|
-
function App() {
|
|
70
|
-
return (
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
1
|
+
# Automoby Kit
|
|
2
|
+
|
|
3
|
+
A comprehensive React UI component library built with TypeScript and Tailwind CSS - created in war 2025.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
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
|
+
Built with ❤️ in 2025
|
package/dist/cjs/Input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";var
|
|
1
|
+
"use client";"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./utils.js"),l=require("./contexts.js");const a=t.forwardRef(({state:a="default",label:n,value:i,onChange:s,helperText:o,startIcon:u,endIcon:d,type:x="text",placeholder:h,isMobile:p,containerClassName:c,...m},f)=>{const[b,g]=t.useState(!1),j=t.useId(),w=l.useMobile(),v=p??w,y=b||""!==i&&null!=i,N="disabled"===a,I=r("relative flex items-center border rounded-lg transition-all duration-300 w-full",{"h-12":v,"h-14":!v},"transition-all duration-300",{"border-neutral-light":"default"===a&&!b,"border-primary":"default"===a&&b,"border-error":"error"===a,"bg-white border-neutral-light cursor-not-allowed":N},c),q=r("absolute pointer-events-none transition-all duration-300",{"-top-2.5 bg-white px-1 mx-3 font-medium":y,"text-xs":y&&v,"text-s":y&&!v,"text-s font-medium":!y&&v,"text-m font-medium":!y&&!v,"right-3":!u,"top-1/2 -translate-y-1/2":!y,"right-11":!y&&u,"right-4":!y&&!u,"text-neutral-main":!b&&"default"===a,"text-neutral-light":N,"text-primary":b&&"default"===a,"text-error":y&&"error"===a}),C=r("peer w-full h-full bg-transparent outline-none font-medium disabled:text-neutral-light",{"text-s":v,"text-m":!v},{"pr-10":u,"pl-10":d,"px-3":!u&&!d,"pr-3 pl-10":!u&&d,"pl-3 pr-10":u&&!d,"cursor-not-allowed text-red-500":N,"text-neutral-dark":!b,"text-neutral-darker":b}),F=r("absolute transition-colors duration-300",{"h-4 w-4":v,"h-5 w-5":!v},{"text-neutral-main":"error"!==a&&!b,"text-primary":"default"===a&&b,"text-error":"error"===a,"text-neutral-light":N}),k=r("font-light mt-1 h-4 px-3",{"text-xs":v,"text-s":!v},{"text-neutral-main":"default"===a,"text-primary":"default"===a&&b,"text-error":"error"===a,"text-neutral-light":N}),B=h&&!b?void 0:h;return e.jsxs("div",{children:[e.jsxs("div",{className:I,children:[d&&e.jsx("span",{className:r(F,"left-3"),children:d}),e.jsx("label",{htmlFor:j,className:q,children:n}),e.jsx("input",{ref:f,id:j,type:x,value:i,onChange:s,onFocus:e=>{N||(g(!0),m.onFocus?.(e))},onBlur:e=>{N||(g(!1),m.onBlur?.(e))},disabled:N,placeholder:B,className:C,...m}),u&&e.jsx("span",{className:r(F,"right-3"),children:u})]}),o&&e.jsx("p",{className:k,children:o})]})});a.displayName="Input",exports.Input=a;
|
package/dist/esm/Input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as t,jsx as
|
|
1
|
+
"use client";import{jsxs as t,jsx as e}from"react/jsx-runtime";import r,{useState as l,useId as a}from"react";import n from"./utils.js";import{useMobile as o}from"./contexts.js";const i=r.forwardRef(({state:r="default",label:i,value:s,onChange:d,helperText:u,startIcon:m,endIcon:x,type:p="text",placeholder:h,isMobile:c,containerClassName:f,...g},b)=>{const[w,y]=l(!1),N=a(),v=o(),j=c??v,C=w||""!==s&&null!=s,F="disabled"===r,I=n("relative flex items-center border rounded-lg transition-all duration-300 w-full",{"h-12":j,"h-14":!j},"transition-all duration-300",{"border-neutral-light":"default"===r&&!w,"border-primary":"default"===r&&w,"border-error":"error"===r,"bg-white border-neutral-light cursor-not-allowed":F},f),k=n("absolute pointer-events-none transition-all duration-300",{"-top-2.5 bg-white px-1 mx-3 font-medium":C,"text-xs":C&&j,"text-s":C&&!j,"text-s font-medium":!C&&j,"text-m font-medium":!C&&!j,"right-3":!m,"top-1/2 -translate-y-1/2":!C,"right-11":!C&&m,"right-4":!C&&!m,"text-neutral-main":!w&&"default"===r,"text-neutral-light":F,"text-primary":w&&"default"===r,"text-error":C&&"error"===r}),B=n("peer w-full h-full bg-transparent outline-none font-medium disabled:text-neutral-light",{"text-s":j,"text-m":!j},{"pr-10":m,"pl-10":x,"px-3":!m&&!x,"pr-3 pl-10":!m&&x,"pl-3 pr-10":m&&!x,"cursor-not-allowed text-red-500":F,"text-neutral-dark":!w,"text-neutral-darker":w}),M=n("absolute transition-colors duration-300",{"h-4 w-4":j,"h-5 w-5":!j},{"text-neutral-main":"error"!==r&&!w,"text-primary":"default"===r&&w,"text-error":"error"===r,"text-neutral-light":F}),R=n("font-light mt-1 h-4 px-3",{"text-xs":j,"text-s":!j},{"text-neutral-main":"default"===r,"text-primary":"default"===r&&w,"text-error":"error"===r,"text-neutral-light":F}),T=h&&!w?void 0:h;return t("div",{children:[t("div",{className:I,children:[x&&e("span",{className:n(M,"left-3"),children:x}),e("label",{htmlFor:N,className:k,children:i}),e("input",{ref:b,id:N,type:p,value:s,onChange:d,onFocus:t=>{F||(y(!0),g.onFocus?.(t))},onBlur:t=>{F||(y(!1),g.onBlur?.(t))},disabled:F,placeholder:T,className:B,...g}),m&&e("span",{className:n(M,"right-3"),children:m})]}),u&&e("p",{className:R,children:u})]})});i.displayName="Input";export{i as Input};
|
package/dist/types/Input.js
CHANGED
|
@@ -25,18 +25,16 @@ const Input = React.forwardRef(({ state = 'default', label, value, onChange, hel
|
|
|
25
25
|
props.onBlur?.(e);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
const baseContainerClasses = 'relative flex items-center border rounded-lg transition-all duration-300 w-full
|
|
28
|
+
const baseContainerClasses = 'relative flex items-center border rounded-lg transition-all duration-300 w-full';
|
|
29
29
|
const baseLabelClasses = 'absolute pointer-events-none transition-all duration-300';
|
|
30
30
|
const baseInputClasses = 'peer w-full h-full bg-transparent outline-none font-medium disabled:text-neutral-light';
|
|
31
31
|
const baseIconClasses = 'absolute transition-colors duration-300';
|
|
32
32
|
const containerClasses = cn(baseContainerClasses,
|
|
33
|
-
//
|
|
33
|
+
// SSR-safe height based on mobile detection
|
|
34
34
|
{
|
|
35
|
-
'h-
|
|
36
|
-
'h-
|
|
37
|
-
},
|
|
38
|
-
// Enhanced responsive breakpoints for client-side optimization
|
|
39
|
-
'transition-all duration-300', {
|
|
35
|
+
'h-12': actualIsMobile,
|
|
36
|
+
'h-14': !actualIsMobile,
|
|
37
|
+
}, 'transition-all duration-300', {
|
|
40
38
|
'border-neutral-light': state === 'default' && !isFocused,
|
|
41
39
|
'border-primary': state === 'default' && isFocused,
|
|
42
40
|
'border-error': state === 'error',
|
|
@@ -44,18 +42,16 @@ const Input = React.forwardRef(({ state = 'default', label, value, onChange, hel
|
|
|
44
42
|
}, containerClassName);
|
|
45
43
|
const labelClasses = cn(baseLabelClasses, {
|
|
46
44
|
'-top-2.5 bg-white px-1 mx-3 font-medium': isLabelFloated,
|
|
47
|
-
//
|
|
48
|
-
'text-xs
|
|
49
|
-
'text-s
|
|
50
|
-
'text-s
|
|
51
|
-
'text-m
|
|
52
|
-
//
|
|
53
|
-
'right-
|
|
54
|
-
'right-3 sm:right-3 md:right-4 lg:right-5 xl:right-5': !startIcon,
|
|
45
|
+
// SSR-safe label text sizes
|
|
46
|
+
'text-xs': isLabelFloated && actualIsMobile,
|
|
47
|
+
'text-s': isLabelFloated && !actualIsMobile,
|
|
48
|
+
'text-s font-medium': !isLabelFloated && actualIsMobile,
|
|
49
|
+
'text-m font-medium': !isLabelFloated && !actualIsMobile,
|
|
50
|
+
// Positioning
|
|
51
|
+
'right-3': !startIcon,
|
|
55
52
|
'top-1/2 -translate-y-1/2': !isLabelFloated,
|
|
56
|
-
|
|
57
|
-
'right-
|
|
58
|
-
'right-4 sm:right-5 md:right-6 lg:right-7 xl:right-7': !isLabelFloated && !startIcon,
|
|
53
|
+
'right-11': !isLabelFloated && startIcon,
|
|
54
|
+
'right-4': !isLabelFloated && !startIcon,
|
|
59
55
|
// Colors
|
|
60
56
|
'text-neutral-main': !isFocused && state === 'default',
|
|
61
57
|
'text-neutral-light': isDisabled,
|
|
@@ -63,39 +59,37 @@ const Input = React.forwardRef(({ state = 'default', label, value, onChange, hel
|
|
|
63
59
|
'text-error': isLabelFloated && state === 'error',
|
|
64
60
|
});
|
|
65
61
|
const inputClasses = cn(baseInputClasses,
|
|
66
|
-
//
|
|
62
|
+
// SSR-safe text size
|
|
67
63
|
{
|
|
68
|
-
'text-s
|
|
69
|
-
'text-m
|
|
64
|
+
'text-s': actualIsMobile,
|
|
65
|
+
'text-m': !actualIsMobile,
|
|
70
66
|
}, {
|
|
71
|
-
//
|
|
72
|
-
'pr-
|
|
73
|
-
'pl-
|
|
74
|
-
'px-
|
|
75
|
-
'pr-
|
|
76
|
-
'pl-
|
|
67
|
+
// Padding with icons
|
|
68
|
+
'pr-10': startIcon,
|
|
69
|
+
'pl-10': endIcon,
|
|
70
|
+
'px-3': !startIcon && !endIcon,
|
|
71
|
+
'pr-3 pl-10': !startIcon && endIcon,
|
|
72
|
+
'pl-3 pr-10': startIcon && !endIcon,
|
|
77
73
|
// States
|
|
78
74
|
'cursor-not-allowed text-red-500': isDisabled,
|
|
79
75
|
'text-neutral-dark': !isFocused,
|
|
80
76
|
'text-neutral-darker': isFocused,
|
|
81
77
|
});
|
|
82
78
|
const iconClasses = cn(baseIconClasses,
|
|
83
|
-
//
|
|
79
|
+
// SSR-safe icon size
|
|
84
80
|
{
|
|
85
|
-
'h-
|
|
86
|
-
'h-
|
|
81
|
+
'h-4 w-4': actualIsMobile,
|
|
82
|
+
'h-5 w-5': !actualIsMobile,
|
|
87
83
|
}, {
|
|
88
84
|
'text-neutral-main': state !== 'error' && !isFocused,
|
|
89
85
|
'text-primary': state === 'default' && isFocused,
|
|
90
86
|
'text-error': state === 'error',
|
|
91
87
|
'text-neutral-light': isDisabled,
|
|
92
88
|
});
|
|
93
|
-
const helperTextClasses = cn('font-light mt-1 h-4',
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
'text-xs sm:text-s md:text-m lg:text-l xl:text-l': actualIsMobile,
|
|
98
|
-
'text-s sm:text-m md:text-l lg:text-xl xl:text-xl': !actualIsMobile,
|
|
89
|
+
const helperTextClasses = cn('font-light mt-1 h-4 px-3', {
|
|
90
|
+
// SSR-safe text sizing
|
|
91
|
+
'text-xs': actualIsMobile,
|
|
92
|
+
'text-s': !actualIsMobile,
|
|
99
93
|
}, {
|
|
100
94
|
'text-neutral-main': state === 'default',
|
|
101
95
|
'text-primary': state === 'default' && isFocused,
|
|
@@ -104,7 +98,7 @@ const Input = React.forwardRef(({ state = 'default', label, value, onChange, hel
|
|
|
104
98
|
});
|
|
105
99
|
// If both label and placeholder are provided, hide placeholder when not focused
|
|
106
100
|
const computedPlaceholder = placeholder && !isFocused ? undefined : placeholder;
|
|
107
|
-
return (jsxs("div", { children: [jsxs("div", { className: containerClasses, children: [endIcon && (jsx("span", { className: cn(iconClasses, 'left-
|
|
101
|
+
return (jsxs("div", { children: [jsxs("div", { className: containerClasses, children: [endIcon && (jsx("span", { className: cn(iconClasses, 'left-3'), children: endIcon })), jsx("label", { htmlFor: id, className: labelClasses, children: label }), jsx("input", { ref: ref, id: id, type: type, value: value, onChange: onChange, onFocus: handleFocus, onBlur: handleBlur, disabled: isDisabled, placeholder: computedPlaceholder, className: inputClasses, ...props }), startIcon && (jsx("span", { className: cn(iconClasses, 'right-3'), children: startIcon }))] }), helperText && jsx("p", { className: helperTextClasses, children: helperText })] }));
|
|
108
102
|
});
|
|
109
103
|
Input.displayName = 'Input';
|
|
110
104
|
|
package/package.json
CHANGED
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "automoby-kit",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A comprehensive React UI component library - created in war 2025",
|
|
5
|
-
"main": "dist/cjs/index.js",
|
|
6
|
-
"module": "dist/esm/index.js",
|
|
7
|
-
"types": "dist/types/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/esm/index.js",
|
|
14
|
-
"require": "./dist/cjs/index.js",
|
|
15
|
-
"types": "./dist/types/index.d.ts"
|
|
16
|
-
},
|
|
17
|
-
"./Typography": {
|
|
18
|
-
"import": "./dist/esm/Typography.js",
|
|
19
|
-
"require": "./dist/cjs/Typography.js",
|
|
20
|
-
"types": "./dist/types/components/Typography/Typography.d.ts"
|
|
21
|
-
},
|
|
22
|
-
"./Button": {
|
|
23
|
-
"import": "./dist/esm/Button.js",
|
|
24
|
-
"require": "./dist/cjs/Button.js",
|
|
25
|
-
"types": "./dist/types/components/Button/Button.d.ts"
|
|
26
|
-
},
|
|
27
|
-
"./Input": {
|
|
28
|
-
"import": "./dist/esm/Input.js",
|
|
29
|
-
"require": "./dist/cjs/Input.js",
|
|
30
|
-
"types": "./dist/types/components/Input/Input.d.ts"
|
|
31
|
-
},
|
|
32
|
-
"./Tabs": {
|
|
33
|
-
"import": "./dist/esm/Tabs.js",
|
|
34
|
-
"require": "./dist/cjs/Tabs.js",
|
|
35
|
-
"types": "./dist/types/components/Tabs/Tabs.d.ts"
|
|
36
|
-
},
|
|
37
|
-
"./Drawer": {
|
|
38
|
-
"import": "./dist/esm/Drawer.js",
|
|
39
|
-
"require": "./dist/cjs/Drawer.js",
|
|
40
|
-
"types": "./dist/types/components/Drawer/Drawer.d.ts"
|
|
41
|
-
},
|
|
42
|
-
"./Backdrop": {
|
|
43
|
-
"import": "./dist/esm/Backdrop.js",
|
|
44
|
-
"require": "./dist/cjs/Backdrop.js",
|
|
45
|
-
"types": "./dist/types/components/Backdrop/Backdrop.d.ts"
|
|
46
|
-
},
|
|
47
|
-
"./Breadcrumb": {
|
|
48
|
-
"import": "./dist/esm/Breadcrumb.js",
|
|
49
|
-
"require": "./dist/cjs/Breadcrumb.js",
|
|
50
|
-
"types": "./dist/types/components/Breadcrumb/Breadcrumb.d.ts"
|
|
51
|
-
},
|
|
52
|
-
"./Pagination": {
|
|
53
|
-
"import": "./dist/esm/Pagination.js",
|
|
54
|
-
"require": "./dist/cjs/Pagination.js",
|
|
55
|
-
"types": "./dist/types/components/Pagination/Pagination.d.ts"
|
|
56
|
-
},
|
|
57
|
-
"./Accordion": {
|
|
58
|
-
"import": "./dist/esm/Accordion.js",
|
|
59
|
-
"require": "./dist/cjs/Accordion.js",
|
|
60
|
-
"types": "./dist/types/components/Accordion/Accordion.d.ts"
|
|
61
|
-
},
|
|
62
|
-
"./Divider": {
|
|
63
|
-
"import": "./dist/esm/Divider.js",
|
|
64
|
-
"require": "./dist/cjs/Divider.js",
|
|
65
|
-
"types": "./dist/types/components/Divider/Divider.d.ts"
|
|
66
|
-
},
|
|
67
|
-
"./RadioGroup": {
|
|
68
|
-
"import": "./dist/esm/RadioGroup.js",
|
|
69
|
-
"require": "./dist/cjs/RadioGroup.js",
|
|
70
|
-
"types": "./dist/types/components/RadioGroup/RadioGroup.d.ts"
|
|
71
|
-
},
|
|
72
|
-
"./Chips": {
|
|
73
|
-
"import": "./dist/esm/Chips.js",
|
|
74
|
-
"require": "./dist/cjs/Chips.js",
|
|
75
|
-
"types": "./dist/types/components/Chips/Chips.d.ts"
|
|
76
|
-
},
|
|
77
|
-
"./Menu": {
|
|
78
|
-
"import": "./dist/esm/Menu.js",
|
|
79
|
-
"require": "./dist/cjs/Menu.js",
|
|
80
|
-
"types": "./dist/types/components/Menu/Menu.d.ts"
|
|
81
|
-
},
|
|
82
|
-
"./contexts": {
|
|
83
|
-
"import": "./dist/esm/contexts.js",
|
|
84
|
-
"require": "./dist/cjs/contexts.js",
|
|
85
|
-
"types": "./dist/types/contexts/index.d.ts"
|
|
86
|
-
},
|
|
87
|
-
"./utils": {
|
|
88
|
-
"import": "./dist/esm/utils.js",
|
|
89
|
-
"require": "./dist/cjs/utils.js",
|
|
90
|
-
"types": "./dist/types/utils/cn.d.ts"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
"keywords": [
|
|
94
|
-
"react",
|
|
95
|
-
"ui",
|
|
96
|
-
"components",
|
|
97
|
-
"typescript",
|
|
98
|
-
"tailwind",
|
|
99
|
-
"kit"
|
|
100
|
-
],
|
|
101
|
-
"scripts": {
|
|
102
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
103
|
-
"lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\" --fix",
|
|
104
|
-
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
|
|
105
|
-
"check-format": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
|
|
106
|
-
"check-lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\"",
|
|
107
|
-
"check-types": "tsc --noEmit",
|
|
108
|
-
"prepare": "husky",
|
|
109
|
-
"prepublishOnly": "npm run build",
|
|
110
|
-
"storybook": "storybook dev -p 6006",
|
|
111
|
-
"storybook:dev": "concurrently \"npm:build:storybook:css:watch\" \"cross-env STORYBOOK_FORCE_MOBILE=true storybook dev -p 6006 \"",
|
|
112
|
-
"storybook:dev:mobile": "concurrently \"npm:build:storybook:css:watch\" \"cross-env STORYBOOK_FORCE_MOBILE=true storybook dev -p 6006 \"",
|
|
113
|
-
"storybook:dev:desktop": "concurrently \"npm:build:storybook:css:watch\" \"cross-env STORYBOOK_FORCE_MOBILE=false storybook dev -p 6006 \"",
|
|
114
|
-
"build-storybook": "storybook build",
|
|
115
|
-
"build:storybook:css:watch": "npx @tailwindcss/cli -i ./.storybook/tailwind.css -o ./tailwind-build/tailwind.build.css --watch",
|
|
116
|
-
"build:storybook:css": "npx @tailwindcss/cli -i ./.storybook/tailwind.css -o ./tailwind-build/tailwind.build.css",
|
|
117
|
-
"clean": "rimraf dist",
|
|
118
|
-
"build": "npm run clean && rollup -c"
|
|
119
|
-
},
|
|
120
|
-
"author": "Ghazal_kordi Alireza_mirzaee",
|
|
121
|
-
"license": "ISC",
|
|
122
|
-
"peerDependencies": {
|
|
123
|
-
"clsx": "^2.1.1",
|
|
124
|
-
"lucide-react": "^0.522.0",
|
|
125
|
-
"react": "^19.1.0",
|
|
126
|
-
"react-dom": "^19.1.0",
|
|
127
|
-
"tailwindcss": "^4.1.10",
|
|
128
|
-
"typescript": "^5.8.3",
|
|
129
|
-
"ua-parser-js": "^2.0.4"
|
|
130
|
-
},
|
|
131
|
-
"devDependencies": {
|
|
132
|
-
"@rollup/plugin-alias": "^5.1.1",
|
|
133
|
-
"@rollup/plugin-commonjs": "^28.0.6",
|
|
134
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
135
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
136
|
-
"@rollup/plugin-typescript": "^12.1.3",
|
|
137
|
-
"@storybook/addon-docs": "^9.0.6",
|
|
138
|
-
"@storybook/addon-onboarding": "^9.0.6",
|
|
139
|
-
"@storybook/react-vite": "^9.0.6",
|
|
140
|
-
"@tailwindcss/cli": "^4.1.10",
|
|
141
|
-
"@tailwindcss/postcss": "^4.1.10",
|
|
142
|
-
"@types/node": "^24.0.3",
|
|
143
|
-
"@types/react": "^19.1.4",
|
|
144
|
-
"@types/react-dom": "^19.1.5",
|
|
145
|
-
"@types/ua-parser-js": "^0.7.39",
|
|
146
|
-
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
147
|
-
"@typescript-eslint/parser": "^7.18.0",
|
|
148
|
-
"autoprefixer": "^10.4.21",
|
|
149
|
-
"clsx": "^2.1.1",
|
|
150
|
-
"concurrently": "^9.2.0",
|
|
151
|
-
"cross-env": "^7.0.3",
|
|
152
|
-
"eslint": "^8.57.0",
|
|
153
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
154
|
-
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
155
|
-
"eslint-config-prettier": "^10.1.5",
|
|
156
|
-
"eslint-import-resolver-typescript": "^4.4.3",
|
|
157
|
-
"eslint-plugin-import": "^2.32.0",
|
|
158
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
159
|
-
"eslint-plugin-prettier": "^5.5.0",
|
|
160
|
-
"eslint-plugin-react": "^7.37.5",
|
|
161
|
-
"eslint-plugin-storybook": "^9.0.6",
|
|
162
|
-
"husky": "^9.1.7",
|
|
163
|
-
"lucide-react": "^0.522.0",
|
|
164
|
-
"prettier": "^3.5.3",
|
|
165
|
-
"react": "^19.1.0",
|
|
166
|
-
"react-dom": "^19.1.0",
|
|
167
|
-
"rimraf": "^6.0.1",
|
|
168
|
-
"rollup": "^4.44.0",
|
|
169
|
-
"serve": "^14.2.4",
|
|
170
|
-
"storybook": "^9.0.6",
|
|
171
|
-
"tailwind-merge": "^3.3.1",
|
|
172
|
-
"tailwindcss": "^4.1.10",
|
|
173
|
-
"typescript": "^5.8.3",
|
|
174
|
-
"ua-parser-js": "^2.0.4"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "automoby-kit",
|
|
3
|
+
"version": "1.0.65",
|
|
4
|
+
"description": "A comprehensive React UI component library - created in war 2025",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/esm/index.js",
|
|
14
|
+
"require": "./dist/cjs/index.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./Typography": {
|
|
18
|
+
"import": "./dist/esm/Typography.js",
|
|
19
|
+
"require": "./dist/cjs/Typography.js",
|
|
20
|
+
"types": "./dist/types/components/Typography/Typography.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./Button": {
|
|
23
|
+
"import": "./dist/esm/Button.js",
|
|
24
|
+
"require": "./dist/cjs/Button.js",
|
|
25
|
+
"types": "./dist/types/components/Button/Button.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./Input": {
|
|
28
|
+
"import": "./dist/esm/Input.js",
|
|
29
|
+
"require": "./dist/cjs/Input.js",
|
|
30
|
+
"types": "./dist/types/components/Input/Input.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./Tabs": {
|
|
33
|
+
"import": "./dist/esm/Tabs.js",
|
|
34
|
+
"require": "./dist/cjs/Tabs.js",
|
|
35
|
+
"types": "./dist/types/components/Tabs/Tabs.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./Drawer": {
|
|
38
|
+
"import": "./dist/esm/Drawer.js",
|
|
39
|
+
"require": "./dist/cjs/Drawer.js",
|
|
40
|
+
"types": "./dist/types/components/Drawer/Drawer.d.ts"
|
|
41
|
+
},
|
|
42
|
+
"./Backdrop": {
|
|
43
|
+
"import": "./dist/esm/Backdrop.js",
|
|
44
|
+
"require": "./dist/cjs/Backdrop.js",
|
|
45
|
+
"types": "./dist/types/components/Backdrop/Backdrop.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"./Breadcrumb": {
|
|
48
|
+
"import": "./dist/esm/Breadcrumb.js",
|
|
49
|
+
"require": "./dist/cjs/Breadcrumb.js",
|
|
50
|
+
"types": "./dist/types/components/Breadcrumb/Breadcrumb.d.ts"
|
|
51
|
+
},
|
|
52
|
+
"./Pagination": {
|
|
53
|
+
"import": "./dist/esm/Pagination.js",
|
|
54
|
+
"require": "./dist/cjs/Pagination.js",
|
|
55
|
+
"types": "./dist/types/components/Pagination/Pagination.d.ts"
|
|
56
|
+
},
|
|
57
|
+
"./Accordion": {
|
|
58
|
+
"import": "./dist/esm/Accordion.js",
|
|
59
|
+
"require": "./dist/cjs/Accordion.js",
|
|
60
|
+
"types": "./dist/types/components/Accordion/Accordion.d.ts"
|
|
61
|
+
},
|
|
62
|
+
"./Divider": {
|
|
63
|
+
"import": "./dist/esm/Divider.js",
|
|
64
|
+
"require": "./dist/cjs/Divider.js",
|
|
65
|
+
"types": "./dist/types/components/Divider/Divider.d.ts"
|
|
66
|
+
},
|
|
67
|
+
"./RadioGroup": {
|
|
68
|
+
"import": "./dist/esm/RadioGroup.js",
|
|
69
|
+
"require": "./dist/cjs/RadioGroup.js",
|
|
70
|
+
"types": "./dist/types/components/RadioGroup/RadioGroup.d.ts"
|
|
71
|
+
},
|
|
72
|
+
"./Chips": {
|
|
73
|
+
"import": "./dist/esm/Chips.js",
|
|
74
|
+
"require": "./dist/cjs/Chips.js",
|
|
75
|
+
"types": "./dist/types/components/Chips/Chips.d.ts"
|
|
76
|
+
},
|
|
77
|
+
"./Menu": {
|
|
78
|
+
"import": "./dist/esm/Menu.js",
|
|
79
|
+
"require": "./dist/cjs/Menu.js",
|
|
80
|
+
"types": "./dist/types/components/Menu/Menu.d.ts"
|
|
81
|
+
},
|
|
82
|
+
"./contexts": {
|
|
83
|
+
"import": "./dist/esm/contexts.js",
|
|
84
|
+
"require": "./dist/cjs/contexts.js",
|
|
85
|
+
"types": "./dist/types/contexts/index.d.ts"
|
|
86
|
+
},
|
|
87
|
+
"./utils": {
|
|
88
|
+
"import": "./dist/esm/utils.js",
|
|
89
|
+
"require": "./dist/cjs/utils.js",
|
|
90
|
+
"types": "./dist/types/utils/cn.d.ts"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"keywords": [
|
|
94
|
+
"react",
|
|
95
|
+
"ui",
|
|
96
|
+
"components",
|
|
97
|
+
"typescript",
|
|
98
|
+
"tailwind",
|
|
99
|
+
"kit"
|
|
100
|
+
],
|
|
101
|
+
"scripts": {
|
|
102
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
103
|
+
"lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\" --fix",
|
|
104
|
+
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
|
|
105
|
+
"check-format": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
|
|
106
|
+
"check-lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\"",
|
|
107
|
+
"check-types": "tsc --noEmit",
|
|
108
|
+
"prepare": "husky",
|
|
109
|
+
"prepublishOnly": "npm run build",
|
|
110
|
+
"storybook": "storybook dev -p 6006",
|
|
111
|
+
"storybook:dev": "concurrently \"npm:build:storybook:css:watch\" \"cross-env STORYBOOK_FORCE_MOBILE=true storybook dev -p 6006 \"",
|
|
112
|
+
"storybook:dev:mobile": "concurrently \"npm:build:storybook:css:watch\" \"cross-env STORYBOOK_FORCE_MOBILE=true storybook dev -p 6006 \"",
|
|
113
|
+
"storybook:dev:desktop": "concurrently \"npm:build:storybook:css:watch\" \"cross-env STORYBOOK_FORCE_MOBILE=false storybook dev -p 6006 \"",
|
|
114
|
+
"build-storybook": "storybook build",
|
|
115
|
+
"build:storybook:css:watch": "npx @tailwindcss/cli -i ./.storybook/tailwind.css -o ./tailwind-build/tailwind.build.css --watch",
|
|
116
|
+
"build:storybook:css": "npx @tailwindcss/cli -i ./.storybook/tailwind.css -o ./tailwind-build/tailwind.build.css",
|
|
117
|
+
"clean": "rimraf dist",
|
|
118
|
+
"build": "npm run clean && rollup -c"
|
|
119
|
+
},
|
|
120
|
+
"author": "Ghazal_kordi Alireza_mirzaee",
|
|
121
|
+
"license": "ISC",
|
|
122
|
+
"peerDependencies": {
|
|
123
|
+
"clsx": "^2.1.1",
|
|
124
|
+
"lucide-react": "^0.522.0",
|
|
125
|
+
"react": "^19.1.0",
|
|
126
|
+
"react-dom": "^19.1.0",
|
|
127
|
+
"tailwindcss": "^4.1.10",
|
|
128
|
+
"typescript": "^5.8.3",
|
|
129
|
+
"ua-parser-js": "^2.0.4"
|
|
130
|
+
},
|
|
131
|
+
"devDependencies": {
|
|
132
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
133
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
134
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
135
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
136
|
+
"@rollup/plugin-typescript": "^12.1.3",
|
|
137
|
+
"@storybook/addon-docs": "^9.0.6",
|
|
138
|
+
"@storybook/addon-onboarding": "^9.0.6",
|
|
139
|
+
"@storybook/react-vite": "^9.0.6",
|
|
140
|
+
"@tailwindcss/cli": "^4.1.10",
|
|
141
|
+
"@tailwindcss/postcss": "^4.1.10",
|
|
142
|
+
"@types/node": "^24.0.3",
|
|
143
|
+
"@types/react": "^19.1.4",
|
|
144
|
+
"@types/react-dom": "^19.1.5",
|
|
145
|
+
"@types/ua-parser-js": "^0.7.39",
|
|
146
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
147
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
148
|
+
"autoprefixer": "^10.4.21",
|
|
149
|
+
"clsx": "^2.1.1",
|
|
150
|
+
"concurrently": "^9.2.0",
|
|
151
|
+
"cross-env": "^7.0.3",
|
|
152
|
+
"eslint": "^8.57.0",
|
|
153
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
154
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
155
|
+
"eslint-config-prettier": "^10.1.5",
|
|
156
|
+
"eslint-import-resolver-typescript": "^4.4.3",
|
|
157
|
+
"eslint-plugin-import": "^2.32.0",
|
|
158
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
159
|
+
"eslint-plugin-prettier": "^5.5.0",
|
|
160
|
+
"eslint-plugin-react": "^7.37.5",
|
|
161
|
+
"eslint-plugin-storybook": "^9.0.6",
|
|
162
|
+
"husky": "^9.1.7",
|
|
163
|
+
"lucide-react": "^0.522.0",
|
|
164
|
+
"prettier": "^3.5.3",
|
|
165
|
+
"react": "^19.1.0",
|
|
166
|
+
"react-dom": "^19.1.0",
|
|
167
|
+
"rimraf": "^6.0.1",
|
|
168
|
+
"rollup": "^4.44.0",
|
|
169
|
+
"serve": "^14.2.4",
|
|
170
|
+
"storybook": "^9.0.6",
|
|
171
|
+
"tailwind-merge": "^3.3.1",
|
|
172
|
+
"tailwindcss": "^4.1.10",
|
|
173
|
+
"typescript": "^5.8.3",
|
|
174
|
+
"ua-parser-js": "^2.0.4"
|
|
175
|
+
}
|
|
176
|
+
}
|