automoby-kit 1.0.42 → 1.0.44
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 +99 -99
- package/dist/cjs/Accordion.js +1 -1
- package/dist/cjs/Pagination.js +1 -1
- package/dist/esm/Accordion.js +1 -1
- package/dist/esm/Pagination.js +1 -1
- package/dist/types/Accordion.js +2 -2
- package/dist/types/Pagination.js +5 -5
- package/dist/types/components/Accordion/Accordion.d.ts +2 -0
- package/package.json +176 -176
package/README.md
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
# Automoby Kit
|
|
2
|
-
|
|
3
|
-
A comprehensive React UI component library - created in war 2025.
|
|
4
|
-
|
|
5
|
-
## 🚀 Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install automoby-kit
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 📦 Usage
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import {
|
|
15
|
-
Button,
|
|
16
|
-
Typography,
|
|
17
|
-
Input,
|
|
18
|
-
Tabs
|
|
19
|
-
} from 'automoby-kit';
|
|
20
|
-
|
|
21
|
-
function App() {
|
|
22
|
-
return (
|
|
23
|
-
<div>
|
|
24
|
-
<Typography variant="h1">Welcome to Automoby Kit</Typography>
|
|
25
|
-
<Button variant="primary" size="lg">
|
|
26
|
-
Click me!
|
|
27
|
-
</Button>
|
|
28
|
-
<Input placeholder="Enter text..." />
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## 🧩 Available Components
|
|
35
|
-
|
|
36
|
-
- **Typography** - Text rendering with various styles
|
|
37
|
-
- **Button** - Interactive buttons with multiple variants
|
|
38
|
-
- **Input** - Form input fields
|
|
39
|
-
- **Tabs** - Tabbed interfaces
|
|
40
|
-
- **Drawer** - Slide-out panels
|
|
41
|
-
- **Backdrop** - Modal overlays
|
|
42
|
-
- **Breadcrumb** - Navigation breadcrumbs
|
|
43
|
-
- **Pagination** - Page navigation
|
|
44
|
-
- **Accordion** - Collapsible content sections
|
|
45
|
-
- **Divider** - Visual separators
|
|
46
|
-
- **RadioGroup** - Radio button groups
|
|
47
|
-
- **Chips** - Tag-like elements
|
|
48
|
-
- **Menu** - Context menus and dropdowns
|
|
49
|
-
|
|
50
|
-
## 🏗️ TypeScript Support
|
|
51
|
-
|
|
52
|
-
All components come with full TypeScript support:
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
import { ButtonProps, TypographyVariant } from 'automoby-kit';
|
|
56
|
-
|
|
57
|
-
const MyButton: React.FC<ButtonProps> = (props) => {
|
|
58
|
-
return <Button {...props} />;
|
|
59
|
-
};
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## 📱 Mobile Context
|
|
63
|
-
|
|
64
|
-
The library includes a mobile detection context:
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
import { MobileProvider } from 'automoby-kit';
|
|
68
|
-
|
|
69
|
-
function App() {
|
|
70
|
-
return (
|
|
71
|
-
<MobileProvider userAgent={navigator.userAgent}>
|
|
72
|
-
<MyComponent />
|
|
73
|
-
</MobileProvider>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## 🛠️ Development
|
|
79
|
-
|
|
80
|
-
This package requires the following peer dependencies:
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"react": "^19.1.0",
|
|
85
|
-
"react-dom": "^19.1.0",
|
|
86
|
-
"clsx": "^2.1.1",
|
|
87
|
-
"tailwindcss": "^4.1.10"
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## 🆘 Support
|
|
92
|
-
|
|
93
|
-
If you have issues:
|
|
94
|
-
|
|
95
|
-
1. Check the [GitHub issues](https://github.com/yourusername/automoby-kit/issues) for known problems
|
|
96
|
-
2. Submit a new issue with detailed information about your problem
|
|
97
|
-
|
|
98
|
-
## 🔄 Version History
|
|
99
|
-
|
|
1
|
+
# Automoby Kit
|
|
2
|
+
|
|
3
|
+
A comprehensive React UI component library - created in war 2025.
|
|
4
|
+
|
|
5
|
+
## 🚀 Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install automoby-kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 📦 Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import {
|
|
15
|
+
Button,
|
|
16
|
+
Typography,
|
|
17
|
+
Input,
|
|
18
|
+
Tabs
|
|
19
|
+
} from 'automoby-kit';
|
|
20
|
+
|
|
21
|
+
function App() {
|
|
22
|
+
return (
|
|
23
|
+
<div>
|
|
24
|
+
<Typography variant="h1">Welcome to Automoby Kit</Typography>
|
|
25
|
+
<Button variant="primary" size="lg">
|
|
26
|
+
Click me!
|
|
27
|
+
</Button>
|
|
28
|
+
<Input placeholder="Enter text..." />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 🧩 Available Components
|
|
35
|
+
|
|
36
|
+
- **Typography** - Text rendering with various styles
|
|
37
|
+
- **Button** - Interactive buttons with multiple variants
|
|
38
|
+
- **Input** - Form input fields
|
|
39
|
+
- **Tabs** - Tabbed interfaces
|
|
40
|
+
- **Drawer** - Slide-out panels
|
|
41
|
+
- **Backdrop** - Modal overlays
|
|
42
|
+
- **Breadcrumb** - Navigation breadcrumbs
|
|
43
|
+
- **Pagination** - Page navigation
|
|
44
|
+
- **Accordion** - Collapsible content sections
|
|
45
|
+
- **Divider** - Visual separators
|
|
46
|
+
- **RadioGroup** - Radio button groups
|
|
47
|
+
- **Chips** - Tag-like elements
|
|
48
|
+
- **Menu** - Context menus and dropdowns
|
|
49
|
+
|
|
50
|
+
## 🏗️ TypeScript Support
|
|
51
|
+
|
|
52
|
+
All components come with full TypeScript support:
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { ButtonProps, TypographyVariant } from 'automoby-kit';
|
|
56
|
+
|
|
57
|
+
const MyButton: React.FC<ButtonProps> = (props) => {
|
|
58
|
+
return <Button {...props} />;
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 📱 Mobile Context
|
|
63
|
+
|
|
64
|
+
The library includes a mobile detection context:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { MobileProvider } from 'automoby-kit';
|
|
68
|
+
|
|
69
|
+
function App() {
|
|
70
|
+
return (
|
|
71
|
+
<MobileProvider userAgent={navigator.userAgent}>
|
|
72
|
+
<MyComponent />
|
|
73
|
+
</MobileProvider>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 🛠️ Development
|
|
79
|
+
|
|
80
|
+
This package requires the following peer dependencies:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"react": "^19.1.0",
|
|
85
|
+
"react-dom": "^19.1.0",
|
|
86
|
+
"clsx": "^2.1.1",
|
|
87
|
+
"tailwindcss": "^4.1.10"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 🆘 Support
|
|
92
|
+
|
|
93
|
+
If you have issues:
|
|
94
|
+
|
|
95
|
+
1. Check the [GitHub issues](https://github.com/yourusername/automoby-kit/issues) for known problems
|
|
96
|
+
2. Submit a new issue with detailed information about your problem
|
|
97
|
+
|
|
98
|
+
## 🔄 Version History
|
|
99
|
+
|
|
100
100
|
- **1.0.0** - Initial release
|
package/dist/cjs/Accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";var e=require("react/jsx-runtime"),r=require("react"),a=require("./utils.js"),i=require("./contexts.js"),
|
|
1
|
+
"use client";"use strict";var e=require("react/jsx-runtime"),r=require("react"),a=require("./utils.js"),i=require("./contexts.js"),t=require("./Typography.js"),s=require("./chunks/createLucideIcon-BqJVOzoK.js");const n=s.createLucideIcon("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),o=s.createLucideIcon("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),d=r.forwardRef(({title:s,body:d,startIcon:l,isExpanded:c,onToggle:u,defaultExpanded:h=!1,className:m,id:x,disabled:p=!1,isMobile:f,contentBackgroundColor:y,...b},j)=>{const v=i.useMobile(),g=f??v,[N,k]=r.useState(h),w=void 0!==c?c:N,q=x||`accordion-${Math.random().toString(36).substr(2,9)}`,I=`${q}-header`,T=`${q}-content`,z=g?20:24,L=g?"body-s-heavy":"body-l-heavy",M=g?"body-s-medium":"body-m-medium";return e.jsxs("div",{ref:j,className:a("rounded-2xl border-0 overflow-hidden","transition-all duration-200 ease-in-out",m),...b,children:[e.jsxs("button",{id:I,type:"button",onClick:()=>{if(p)return;const e=!w;void 0===c&&k(e),u?.(e)},disabled:p,"aria-expanded":w,"aria-controls":T,className:a("w-full flex items-center justify-between",g?"p-3":"p-4","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed","transition-all duration-200 ease-in-out",!p&&"hover:bg-neutral-lighter"),children:[e.jsx("div",{className:"flex-shrink-0 mr-4",children:w?e.jsx(o,{size:z,className:"text-neutral-darker transition-transform duration-200","aria-hidden":"true"}):e.jsx(n,{size:z,className:"text-neutral-darker transition-transform duration-200","aria-hidden":"true"})}),e.jsxs("div",{className:a("flex items-center flex-1",g?"gap-3":"gap-4"),children:[e.jsx("div",{className:"flex-1 text-right",children:e.jsx(t.Typography,{variant:L,color:"neutral-darker",children:s})}),l&&e.jsx("div",{className:a("flex-shrink-0 flex items-center justify-center",g?"w-6 h-6":"w-8 h-8"),children:l})]})]}),e.jsx("div",{id:T,role:"region","aria-labelledby":I,className:a("w-full overflow-hidden transition-all duration-300 ease-in-out",w?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:e.jsx("div",{className:a(g?"pb-3 mt-1":"pb-4 mt-1.5"),children:e.jsx("div",{className:a(y||"bg-neutral-lighter","rounded-lg",g?"p-3":"p-4"),children:e.jsx(t.Typography,{variant:M,color:"neutral-dark",children:d})})})})]})});d.displayName="Accordion",exports.Accordion=d;
|
package/dist/cjs/Pagination.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";var e=require("react/jsx-runtime"),i=require("react"),n=require("./utils.js"),t=require("./contexts.js"),a=require("./chunks/createLucideIcon-BqJVOzoK.js"),r=require("./chunks/chevron-left-Do__K6cA.js");const s=a.createLucideIcon("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),o=a.createLucideIcon("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),c=a.createLucideIcon("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),l=a.createLucideIcon("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function PaginationRoot({className:i,...t}){return e.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:n("mx-auto flex w-full justify-center",i),...t})}function PaginationContent({className:i,device:t,...a}){return e.jsx("ul",{"data-slot":"pagination-content",className:n("flex flex-row items-center","mobile"===t?"gap-
|
|
1
|
+
"use client";"use strict";var e=require("react/jsx-runtime"),i=require("react"),n=require("./utils.js"),t=require("./contexts.js"),a=require("./chunks/createLucideIcon-BqJVOzoK.js"),r=require("./chunks/chevron-left-Do__K6cA.js");const s=a.createLucideIcon("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),o=a.createLucideIcon("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),c=a.createLucideIcon("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),l=a.createLucideIcon("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function PaginationRoot({className:i,...t}){return e.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:n("mx-auto flex w-full justify-center",i),...t})}function PaginationContent({className:i,device:t,...a}){return e.jsx("ul",{"data-slot":"pagination-content",className:n("flex flex-row items-center","mobile"===t?"gap-1.5":"gap-2",i),...a})}function PaginationItem({...i}){return e.jsx("li",{"data-slot":"pagination-item",...i})}function PaginationLink({className:i,device:t,variant:a,isActive:r,linkComponent:s,...o}){const c=s??"a";return e.jsx(c,{"aria-current":r?"page":void 0,"data-slot":"pagination-link","data-active":r,className:n(buttonVariants({variant:"nextPrev"===a?a:r?"active":"outline",device:t}),i),tabIndex:o["aria-disabled"]?-1:0,...o})}function PaginationPrevious({className:i,device:n,variant:t,...a}){const r="mobile"===n,o={mobile:e.jsx(s,{size:18}),desktop:e.jsxs(e.Fragment,{children:[e.jsx(c,{size:20})," ",e.jsx("span",{children:"قبلی"})]})};return e.jsx(PaginationLink,{"aria-label":"Go to previous page",className:r?"ml-2.5":"flex justify-center items-center gap-2 w-20 h-12 ml-4",device:n,variant:"nextPrev",...a,children:"mobile"===n?o.mobile:o.desktop})}function PaginationNext({className:i,device:n,variant:t,...a}){const s="mobile"===n,c={mobile:e.jsx(r.ChevronLeft,{size:18}),desktop:e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"بعدی"}),e.jsx(o,{size:20})]})};return e.jsx(PaginationLink,{"aria-label":"Go to next page",className:s?"mr-2.5":"flex justify-center items-center gap-2 w-20 h-12 mr-4",device:n,variant:"nextPrev",...a,children:"mobile"===n?c.mobile:c.desktop})}function PaginationEllipsis({className:i,...t}){return e.jsx("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:n("flex size-9 items-center justify-center",i),...t,children:e.jsx(l,{className:"size-4"})})}function buttonVariants({variant:e,device:i}){const t="mobile"===i;return[n({"flex items-center justify-center rounded-[6px]":!0,"w-10 h-10 text-s font-heavy":t,"w-12 h-12 text-l font-heavy":!t}),{outline:"border border-neutral-light bg-white text-neutral-darker",active:"bg-primary text-white",nextPrev:"border border-neutral-light bg-white text-neutral-darker"}[e]].join(" ")}exports.Pagination=({pageCount:n,page:a,defaultPage:r=1,onPageChange:s,className:o,isMobile:c,baseUrl:l,linkComponent:d,...u})=>{const h=t.useMobile(),m=c??h,x=void 0!==a,[p,v]=i.useState(r),g=x?a:p,f=m?"mobile":"desktop";i.useEffect(()=>{x||v(r)},[r,x]);const changePage=e=>{x||v(e),s?.(e)},buildHref=e=>{if(!l)return"#";try{const i=new URL(l,"http://localhost");i.searchParams.set("page",String(e));const{pathname:n,search:t,hash:a}=i;return`${n}${t}${a}`}catch{const i=l.includes("?");return`${l}${i?"&":"?"}page=${e}`}};return e.jsx(PaginationRoot,{className:o,...u,children:e.jsxs(PaginationContent,{device:f,children:[e.jsx(PaginationItem,{children:e.jsx(PaginationPrevious,{href:buildHref(Math.max(1,g-1)),linkComponent:d,onClick:e=>{s&&e.preventDefault(),g>1&&changePage(g-1)},variant:"nextPrev",device:f,"aria-disabled":1===g,tabIndex:1===g?-1:0})}),function(){const i=[];if(n<=5)for(let t=1;t<=n;t++)i.push(e.jsx(PaginationItem,{children:e.jsx(PaginationLink,{href:buildHref(t),isActive:g===t,variant:"main",device:f,linkComponent:d,onClick:e=>{s&&e.preventDefault(),g!==t&&changePage(t)},"aria-disabled":g===t,tabIndex:g===t?-1:0,children:t})},t));else{i.push(e.jsx(PaginationItem,{children:e.jsx(PaginationLink,{href:buildHref(1),isActive:1===g,device:f,variant:"main",linkComponent:d,onClick:e=>{s&&e.preventDefault(),1!==g&&changePage(1)},"aria-disabled":1===g,tabIndex:1===g?-1:0,children:"1"})},1)),g>3&&i.push(e.jsx(PaginationItem,{children:e.jsx(PaginationEllipsis,{})},"start-ellipsis"));const t=Math.max(2,g-1),a=Math.min(n-1,g+1);for(let n=t;n<=a;n++)i.push(e.jsx(PaginationItem,{children:e.jsx(PaginationLink,{href:buildHref(n),isActive:g===n,device:f,variant:"main",linkComponent:d,onClick:e=>{s&&e.preventDefault(),g!==n&&changePage(n)},"aria-disabled":g===n,tabIndex:g===n?-1:0,children:n})},n));g<n-2&&i.push(e.jsx(PaginationItem,{children:e.jsx(PaginationEllipsis,{})},"end-ellipsis")),i.push(e.jsx(PaginationItem,{children:e.jsx(PaginationLink,{href:buildHref(n),isActive:g===n,device:f,variant:"main",linkComponent:d,onClick:e=>{s&&e.preventDefault(),g!==n&&changePage(n)},"aria-disabled":g===n,tabIndex:g===n?-1:0,children:n})},n))}return i}(),e.jsx(PaginationItem,{children:e.jsx(PaginationNext,{href:buildHref(Math.min(n,g+1)),linkComponent:d,onClick:e=>{s&&e.preventDefault(),g<n&&changePage(g+1)},variant:"nextPrev",device:f,"aria-disabled":g===n,tabIndex:g===n?-1:0})})]})})};
|
package/dist/esm/Accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as r}from"react/jsx-runtime";import i,{useState as a}from"react";import t from"./utils.js";import{useMobile as o}from"./contexts.js";import{Typography as n}from"./Typography.js";import{c as d}from"./chunks/createLucideIcon-DGp0SoUT.js";const l=d("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),s=d("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),c=i.forwardRef(({title:i,body:d,startIcon:c,isExpanded:m,onToggle:u,defaultExpanded:h=!1,className:f,id:p,disabled:b=!1,isMobile:y,...
|
|
1
|
+
"use client";import{jsxs as e,jsx as r}from"react/jsx-runtime";import i,{useState as a}from"react";import t from"./utils.js";import{useMobile as o}from"./contexts.js";import{Typography as n}from"./Typography.js";import{c as d}from"./chunks/createLucideIcon-DGp0SoUT.js";const l=d("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),s=d("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),c=i.forwardRef(({title:i,body:d,startIcon:c,isExpanded:m,onToggle:u,defaultExpanded:h=!1,className:f,id:p,disabled:b=!1,isMobile:y,contentBackgroundColor:v,...x},g)=>{const N=o(),k=y??N,[w,j]=a(h),$=void 0!==m?m:w,z=p||`accordion-${Math.random().toString(36).substr(2,9)}`,C=`${z}-header`,E=`${z}-content`,I=k?20:24,M=k?"body-s-heavy":"body-l-heavy",T=k?"body-s-medium":"body-m-medium";return e("div",{ref:g,className:t("rounded-2xl border-0 overflow-hidden","transition-all duration-200 ease-in-out",f),...x,children:[e("button",{id:C,type:"button",onClick:()=>{if(b)return;const e=!$;void 0===m&&j(e),u?.(e)},disabled:b,"aria-expanded":$,"aria-controls":E,className:t("w-full flex items-center justify-between",k?"p-3":"p-4","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed","transition-all duration-200 ease-in-out",!b&&"hover:bg-neutral-lighter"),children:[r("div",{className:"flex-shrink-0 mr-4",children:r($?s:l,{size:I,className:"text-neutral-darker transition-transform duration-200","aria-hidden":"true"})}),e("div",{className:t("flex items-center flex-1",k?"gap-3":"gap-4"),children:[r("div",{className:"flex-1 text-right",children:r(n,{variant:M,color:"neutral-darker",children:i})}),c&&r("div",{className:t("flex-shrink-0 flex items-center justify-center",k?"w-6 h-6":"w-8 h-8"),children:c})]})]}),r("div",{id:E,role:"region","aria-labelledby":C,className:t("w-full overflow-hidden transition-all duration-300 ease-in-out",$?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:r("div",{className:t(k?"pb-3 mt-1":"pb-4 mt-1.5"),children:r("div",{className:t(v||"bg-neutral-lighter","rounded-lg",k?"p-3":"p-4"),children:r(n,{variant:T,color:"neutral-dark",children:d})})})})]})});c.displayName="Accordion";export{c as Accordion};
|
package/dist/esm/Pagination.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as t,useEffect as a}from"react";import r from"./utils.js";import{useMobile as o}from"./contexts.js";import{c as l}from"./chunks/createLucideIcon-DGp0SoUT.js";import{C as s}from"./chunks/chevron-left-4HSuTes3.js";const c=l("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),d=l("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),m=l("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),
|
|
1
|
+
"use client";import{jsx as e,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as t,useEffect as a}from"react";import r from"./utils.js";import{useMobile as o}from"./contexts.js";import{c as l}from"./chunks/createLucideIcon-DGp0SoUT.js";import{C as s}from"./chunks/chevron-left-4HSuTes3.js";const c=l("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),d=l("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),m=l("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),h=l("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function PaginationRoot({className:i,...n}){return e("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:r("mx-auto flex w-full justify-center",i),...n})}function PaginationContent({className:i,device:n,...t}){return e("ul",{"data-slot":"pagination-content",className:r("flex flex-row items-center","mobile"===n?"gap-1.5":"gap-2",i),...t})}function PaginationItem({...i}){return e("li",{"data-slot":"pagination-item",...i})}function PaginationLink({className:i,device:n,variant:t,isActive:a,linkComponent:o,...l}){return e(o??"a",{"aria-current":a?"page":void 0,"data-slot":"pagination-link","data-active":a,className:r(buttonVariants({variant:"nextPrev"===t?t:a?"active":"outline",device:n}),i),tabIndex:l["aria-disabled"]?-1:0,...l})}function PaginationPrevious({className:t,device:a,variant:r,...o}){const l="mobile"===a,s={mobile:e(c,{size:18}),desktop:i(n,{children:[e(m,{size:20})," ",e("span",{children:"قبلی"})]})};return e(PaginationLink,{"aria-label":"Go to previous page",className:l?"ml-2.5":"flex justify-center items-center gap-2 w-20 h-12 ml-4",device:a,variant:"nextPrev",...o,children:"mobile"===a?s.mobile:s.desktop})}function PaginationNext({className:t,device:a,variant:r,...o}){const l="mobile"===a,c={mobile:e(s,{size:18}),desktop:i(n,{children:[e("span",{children:"بعدی"}),e(d,{size:20})]})};return e(PaginationLink,{"aria-label":"Go to next page",className:l?"mr-2.5":"flex justify-center items-center gap-2 w-20 h-12 mr-4",device:a,variant:"nextPrev",...o,children:"mobile"===a?c.mobile:c.desktop})}function PaginationEllipsis({className:i,...n}){return e("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:r("flex size-9 items-center justify-center",i),...n,children:e(h,{className:"size-4"})})}function buttonVariants({variant:e,device:i}){const n="mobile"===i;return[r({"flex items-center justify-center rounded-[6px]":!0,"w-10 h-10 text-s font-heavy":n,"w-12 h-12 text-l font-heavy":!n}),{outline:"border border-neutral-light bg-white text-neutral-darker",active:"bg-primary text-white",nextPrev:"border border-neutral-light bg-white text-neutral-darker"}[e]].join(" ")}const Pagination=({pageCount:n,page:r,defaultPage:l=1,onPageChange:s,className:c,isMobile:d,baseUrl:m,linkComponent:h,...p})=>{const u=o(),v=d??u,g=void 0!==r,[f,x]=t(l),b=g?r:f,k=v?"mobile":"desktop";a(()=>{g||x(l)},[l,g]);const changePage=e=>{g||x(e),s?.(e)},buildHref=e=>{if(!m)return"#";try{const i=new URL(m,"http://localhost");i.searchParams.set("page",String(e));const{pathname:n,search:t,hash:a}=i;return`${n}${t}${a}`}catch{const i=m.includes("?");return`${m}${i?"&":"?"}page=${e}`}};return e(PaginationRoot,{className:c,...p,children:i(PaginationContent,{device:k,children:[e(PaginationItem,{children:e(PaginationPrevious,{href:buildHref(Math.max(1,b-1)),linkComponent:h,onClick:e=>{s&&e.preventDefault(),b>1&&changePage(b-1)},variant:"nextPrev",device:k,"aria-disabled":1===b,tabIndex:1===b?-1:0})}),function(){const i=[];if(n<=5)for(let t=1;t<=n;t++)i.push(e(PaginationItem,{children:e(PaginationLink,{href:buildHref(t),isActive:b===t,variant:"main",device:k,linkComponent:h,onClick:e=>{s&&e.preventDefault(),b!==t&&changePage(t)},"aria-disabled":b===t,tabIndex:b===t?-1:0,children:t})},t));else{i.push(e(PaginationItem,{children:e(PaginationLink,{href:buildHref(1),isActive:1===b,device:k,variant:"main",linkComponent:h,onClick:e=>{s&&e.preventDefault(),1!==b&&changePage(1)},"aria-disabled":1===b,tabIndex:1===b?-1:0,children:"1"})},1)),b>3&&i.push(e(PaginationItem,{children:e(PaginationEllipsis,{})},"start-ellipsis"));const t=Math.max(2,b-1),a=Math.min(n-1,b+1);for(let n=t;n<=a;n++)i.push(e(PaginationItem,{children:e(PaginationLink,{href:buildHref(n),isActive:b===n,device:k,variant:"main",linkComponent:h,onClick:e=>{s&&e.preventDefault(),b!==n&&changePage(n)},"aria-disabled":b===n,tabIndex:b===n?-1:0,children:n})},n));b<n-2&&i.push(e(PaginationItem,{children:e(PaginationEllipsis,{})},"end-ellipsis")),i.push(e(PaginationItem,{children:e(PaginationLink,{href:buildHref(n),isActive:b===n,device:k,variant:"main",linkComponent:h,onClick:e=>{s&&e.preventDefault(),b!==n&&changePage(n)},"aria-disabled":b===n,tabIndex:b===n?-1:0,children:n})},n))}return i}(),e(PaginationItem,{children:e(PaginationNext,{href:buildHref(Math.min(n,b+1)),linkComponent:h,onClick:e=>{s&&e.preventDefault(),b<n&&changePage(b+1)},variant:"nextPrev",device:k,"aria-disabled":b===n,tabIndex:b===n?-1:0})})]})})};export{Pagination};
|
package/dist/types/Accordion.js
CHANGED
|
@@ -27,7 +27,7 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$1);
|
|
|
27
27
|
const __iconNode = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
28
28
|
const ChevronUp = createLucideIcon("chevron-up", __iconNode);
|
|
29
29
|
|
|
30
|
-
const Accordion = React.forwardRef(({ title, body, startIcon, isExpanded: controlledExpanded, onToggle, defaultExpanded = false, className, id, disabled = false, isMobile, ...props }, ref) => {
|
|
30
|
+
const Accordion = React.forwardRef(({ title, body, startIcon, isExpanded: controlledExpanded, onToggle, defaultExpanded = false, className, id, disabled = false, isMobile, contentBackgroundColor, ...props }, ref) => {
|
|
31
31
|
const detectedIsMobile = useMobile();
|
|
32
32
|
const actualIsMobile = isMobile ?? detectedIsMobile;
|
|
33
33
|
const [internalExpanded, setInternalExpanded] = useState(defaultExpanded);
|
|
@@ -50,7 +50,7 @@ const Accordion = React.forwardRef(({ title, body, startIcon, isExpanded: contro
|
|
|
50
50
|
// Typography variants based on device
|
|
51
51
|
const titleVariant = actualIsMobile ? 'body-s-heavy' : 'body-l-heavy';
|
|
52
52
|
const bodyVariant = actualIsMobile ? 'body-s-medium' : 'body-m-medium';
|
|
53
|
-
return (jsxs("div", { ref: ref, className: cn('rounded-2xl border-0 overflow-hidden', 'transition-all duration-200 ease-in-out', className), ...props, children: [jsxs("button", { id: headerId, type: "button", onClick: handleToggle, disabled: disabled, "aria-expanded": isExpanded, "aria-controls": contentId, className: cn('w-full flex items-center justify-between', actualIsMobile ? 'p-3' : 'p-4', 'focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2', 'disabled:opacity-50 disabled:cursor-not-allowed', 'transition-all duration-200 ease-in-out', !disabled && 'hover:bg-neutral-lighter'), children: [jsx("div", { className: "flex-shrink-0 mr-4", children: isExpanded ? (jsx(ChevronUp, { size: iconSize, className: "text-neutral-darker transition-transform duration-200", "aria-hidden": "true" })) : (jsx(ChevronDown, { size: iconSize, className: "text-neutral-darker transition-transform duration-200", "aria-hidden": "true" })) }), jsxs("div", { className: cn('flex items-center flex-1', actualIsMobile ? 'gap-3' : 'gap-4'), children: [jsx("div", { className: "flex-1 text-right", children: jsx(Typography, { variant: titleVariant, color: "neutral-darker", children: title }) }), startIcon && (jsx("div", { className: cn('flex-shrink-0 flex items-center justify-center', actualIsMobile ? 'w-6 h-6' : 'w-8 h-8'), children: startIcon }))] })] }), jsx("div", { id: contentId, role: "region", "aria-labelledby": headerId, className: cn('w-full overflow-hidden transition-all duration-300 ease-in-out', isExpanded ? 'max-h-screen opacity-100' : 'max-h-0 opacity-0'), children: jsx("div", { className: cn(actualIsMobile ? 'pb-3 mt-1' : 'pb-4 mt-1.5'), children: jsx("div", { className: cn('bg-neutral-lighter rounded-lg', actualIsMobile ? 'p-3' : 'p-4'), children: jsx(Typography, { variant: bodyVariant, color: "neutral-dark", children: body }) }) }) })] }));
|
|
53
|
+
return (jsxs("div", { ref: ref, className: cn('rounded-2xl border-0 overflow-hidden', 'transition-all duration-200 ease-in-out', className), ...props, children: [jsxs("button", { id: headerId, type: "button", onClick: handleToggle, disabled: disabled, "aria-expanded": isExpanded, "aria-controls": contentId, className: cn('w-full flex items-center justify-between', actualIsMobile ? 'p-3' : 'p-4', 'focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2', 'disabled:opacity-50 disabled:cursor-not-allowed', 'transition-all duration-200 ease-in-out', !disabled && 'hover:bg-neutral-lighter'), children: [jsx("div", { className: "flex-shrink-0 mr-4", children: isExpanded ? (jsx(ChevronUp, { size: iconSize, className: "text-neutral-darker transition-transform duration-200", "aria-hidden": "true" })) : (jsx(ChevronDown, { size: iconSize, className: "text-neutral-darker transition-transform duration-200", "aria-hidden": "true" })) }), jsxs("div", { className: cn('flex items-center flex-1', actualIsMobile ? 'gap-3' : 'gap-4'), children: [jsx("div", { className: "flex-1 text-right", children: jsx(Typography, { variant: titleVariant, color: "neutral-darker", children: title }) }), startIcon && (jsx("div", { className: cn('flex-shrink-0 flex items-center justify-center', actualIsMobile ? 'w-6 h-6' : 'w-8 h-8'), children: startIcon }))] })] }), jsx("div", { id: contentId, role: "region", "aria-labelledby": headerId, className: cn('w-full overflow-hidden transition-all duration-300 ease-in-out', isExpanded ? 'max-h-screen opacity-100' : 'max-h-0 opacity-0'), children: jsx("div", { className: cn(actualIsMobile ? 'pb-3 mt-1' : 'pb-4 mt-1.5'), children: jsx("div", { className: cn(contentBackgroundColor || 'bg-neutral-lighter', 'rounded-lg', actualIsMobile ? 'p-3' : 'p-4'), children: jsx(Typography, { variant: bodyVariant, color: "neutral-dark", children: body }) }) }) })] }));
|
|
54
54
|
});
|
|
55
55
|
Accordion.displayName = 'Accordion';
|
|
56
56
|
|
package/dist/types/Pagination.js
CHANGED
|
@@ -63,7 +63,7 @@ function PaginationRoot({ className, ...props }) {
|
|
|
63
63
|
return (jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn('mx-auto flex w-full justify-center', className), ...props }));
|
|
64
64
|
}
|
|
65
65
|
function PaginationContent({ className, device, ...props }) {
|
|
66
|
-
return (jsx("ul", { "data-slot": "pagination-content", className: cn('flex flex-row items-center', device === 'mobile' ? 'gap-
|
|
66
|
+
return (jsx("ul", { "data-slot": "pagination-content", className: cn('flex flex-row items-center', device === 'mobile' ? 'gap-1.5' : 'gap-2', className), ...props }));
|
|
67
67
|
}
|
|
68
68
|
function PaginationItem({ ...props }) {
|
|
69
69
|
return jsx("li", { "data-slot": "pagination-item", ...props });
|
|
@@ -82,7 +82,7 @@ function PaginationPrevious({ className, device, variant, ...props }) {
|
|
|
82
82
|
desktop: (jsxs(Fragment, { children: [jsx(ChevronsRight, { size: 20 }), " ", jsx("span", { children: "\u0642\u0628\u0644\u06CC" })] })),
|
|
83
83
|
};
|
|
84
84
|
return (jsx(PaginationLink, { "aria-label": "Go to previous page", className: !isMobile
|
|
85
|
-
? 'flex justify-center items-center gap-2 w-
|
|
85
|
+
? 'flex justify-center items-center gap-2 w-20 h-12 ml-4'
|
|
86
86
|
: 'ml-2.5', device: device, variant: "nextPrev", ...props, children: device === 'mobile' ? content.mobile : content.desktop }));
|
|
87
87
|
}
|
|
88
88
|
function PaginationNext({ className, device, variant, ...props }) {
|
|
@@ -92,7 +92,7 @@ function PaginationNext({ className, device, variant, ...props }) {
|
|
|
92
92
|
desktop: (jsxs(Fragment, { children: [jsx("span", { children: "\u0628\u0639\u062F\u06CC" }), jsx(ChevronsLeft, { size: 20 })] })),
|
|
93
93
|
};
|
|
94
94
|
return (jsx(PaginationLink, { "aria-label": "Go to next page", className: !isMobile
|
|
95
|
-
? 'flex justify-center items-center gap-2 w-
|
|
95
|
+
? 'flex justify-center items-center gap-2 w-20 h-12 mr-4'
|
|
96
96
|
: 'mr-2.5', device: device, variant: "nextPrev", ...props, children: device === 'mobile' ? content.mobile : content.desktop }));
|
|
97
97
|
}
|
|
98
98
|
function PaginationEllipsis({ className, ...props }) {
|
|
@@ -102,8 +102,8 @@ function buttonVariants({ variant, device, }) {
|
|
|
102
102
|
const isMobile = device === 'mobile';
|
|
103
103
|
const base = cn({
|
|
104
104
|
'flex items-center justify-center rounded-[6px]': true,
|
|
105
|
-
'w-
|
|
106
|
-
'w-
|
|
105
|
+
'w-10 h-10 text-s font-heavy': isMobile,
|
|
106
|
+
'w-12 h-12 text-l font-heavy': !isMobile,
|
|
107
107
|
});
|
|
108
108
|
const variants = {
|
|
109
109
|
outline: 'border border-neutral-light bg-white text-neutral-darker',
|
|
@@ -20,6 +20,8 @@ export interface AccordionProps {
|
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
/** Whether the component is in mobile mode (optional, auto-detected if not provided) */
|
|
22
22
|
isMobile?: boolean;
|
|
23
|
+
/** Background color for the content area (defaults to bg-neutral-lighter) */
|
|
24
|
+
contentBackgroundColor?: string;
|
|
23
25
|
}
|
|
24
26
|
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
27
|
export { Accordion };
|
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.44",
|
|
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
|
+
}
|