automoby-kit 1.0.0
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 +172 -0
- package/dist/index.cjs.js +3022 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +3006 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/types/components/Accordion/Accordion.d.ts +25 -0
- package/dist/types/components/Accordion/Accordion.stories.d.ts +174 -0
- package/dist/types/components/Backdrop/Backdrop.d.ts +20 -0
- package/dist/types/components/Backdrop/Backdrop.stories.d.ts +9 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/types/components/Breadcrumb/Breadcrumb.stories.d.ts +176 -0
- package/dist/types/components/Button/Button.d.ts +13 -0
- package/dist/types/components/Button/Button.stories.d.ts +100 -0
- package/dist/types/components/Chips/Chips.d.ts +37 -0
- package/dist/types/components/Chips/Chips.stories.d.ts +90 -0
- package/dist/types/components/Divider/Divider.d.ts +25 -0
- package/dist/types/components/Divider/Divider.stories.d.ts +88 -0
- package/dist/types/components/Drawer/Drawer.d.ts +12 -0
- package/dist/types/components/Drawer/Drawer.stories.d.ts +115 -0
- package/dist/types/components/Input/Input.d.ts +16 -0
- package/dist/types/components/Input/Input.stories.d.ts +130 -0
- package/dist/types/components/Menu/Menu.d.ts +39 -0
- package/dist/types/components/Menu/Menu.stories.d.ts +89 -0
- package/dist/types/components/Pagination/Pagination.d.ts +8 -0
- package/dist/types/components/Pagination/Pagination.stories.d.ts +61 -0
- package/dist/types/components/ProtectedComponent.d.ts +5 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +55 -0
- package/dist/types/components/RadioGroup/RadioGroup.stories.d.ts +86 -0
- package/dist/types/components/Tabs/Tabs.d.ts +43 -0
- package/dist/types/components/Tabs/Tabs.stories.d.ts +66 -0
- package/dist/types/components/Typography/Typography.d.ts +9 -0
- package/dist/types/components/Typography/Typography.stories.d.ts +57 -0
- package/dist/types/contexts/MobileContext.d.ts +13 -0
- package/dist/types/contexts/index.d.ts +2 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/licensing/LicenseManager.d.ts +41 -0
- package/dist/types/licensing/index.d.ts +30 -0
- package/dist/types/utils/cn.d.ts +2 -0
- package/package.json +90 -0
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Automoby Kit
|
|
2
|
+
|
|
3
|
+
A comprehensive React UI component library with built-in licensing system.
|
|
4
|
+
|
|
5
|
+
## 🚀 Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install automoby-kit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 🔑 License Initialization (Required)
|
|
12
|
+
|
|
13
|
+
**Important**: You must initialize Automoby Kit with a valid license key before using any components.
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { initializeAutomobiKit } from 'automoby-kit';
|
|
17
|
+
|
|
18
|
+
// Initialize with your license key (call this once at the start of your app)
|
|
19
|
+
const success = initializeAutomobiKit({
|
|
20
|
+
key: 'your-license-key-here'
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (success) {
|
|
24
|
+
console.log('✅ Automoby Kit initialized successfully');
|
|
25
|
+
} else {
|
|
26
|
+
console.error('❌ Failed to initialize Automoby Kit');
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
## 📦 Usage
|
|
30
|
+
|
|
31
|
+
After successful initialization, you can use any component:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import {
|
|
35
|
+
Button,
|
|
36
|
+
Typography,
|
|
37
|
+
Input,
|
|
38
|
+
Tabs,
|
|
39
|
+
initializeAutomobiKit
|
|
40
|
+
} from 'automoby-kit';
|
|
41
|
+
|
|
42
|
+
// Initialize first
|
|
43
|
+
initializeAutomobiKit({
|
|
44
|
+
key: '-------------------'
|
|
45
|
+
});
|
|
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
|
+
## 🧩 Available Components
|
|
61
|
+
|
|
62
|
+
- **Typography** - Text rendering with various styles
|
|
63
|
+
- **Button** - Interactive buttons with multiple variants
|
|
64
|
+
- **Input** - Form input fields
|
|
65
|
+
- **Tabs** - Tabbed interfaces
|
|
66
|
+
- **Drawer** - Slide-out panels
|
|
67
|
+
- **Backdrop** - Modal overlays
|
|
68
|
+
- **Breadcrumb** - Navigation breadcrumbs
|
|
69
|
+
- **Pagination** - Page navigation
|
|
70
|
+
- **Accordion** - Collapsible content sections
|
|
71
|
+
- **Divider** - Visual separators
|
|
72
|
+
- **RadioGroup** - Radio button groups
|
|
73
|
+
- **Chips** - Tag-like elements
|
|
74
|
+
|
|
75
|
+
## 🔧 License Management Functions
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import {
|
|
79
|
+
initializeAutomobiKit,
|
|
80
|
+
getLicenseStatus,
|
|
81
|
+
canUseComponents
|
|
82
|
+
} from 'automoby-kit';
|
|
83
|
+
|
|
84
|
+
// Check if components can be used
|
|
85
|
+
const canUse = canUseComponents();
|
|
86
|
+
|
|
87
|
+
// Get detailed license status
|
|
88
|
+
const status = getLicenseStatus();
|
|
89
|
+
console.log(status);
|
|
90
|
+
// {
|
|
91
|
+
// initialized: true,
|
|
92
|
+
// valid: true,
|
|
93
|
+
// key: "automoby-..."
|
|
94
|
+
// }
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## ⚠️ What Happens Without a Valid License?
|
|
98
|
+
|
|
99
|
+
If you try to use components without proper initialization or with an invalid key, you'll see a license error component instead of the actual component:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
🔒 License Required
|
|
103
|
+
Component "Button" requires a valid license key.
|
|
104
|
+
Please initialize Automoby Kit with your license key before using components.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 🏗️ TypeScript Support
|
|
108
|
+
|
|
109
|
+
All components come with full TypeScript support:
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
import { ButtonProps, TypographyVariant } from 'automoby-kit';
|
|
113
|
+
|
|
114
|
+
const MyButton: React.FC<ButtonProps> = (props) => {
|
|
115
|
+
return <Button {...props} />;
|
|
116
|
+
};
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 📱 Mobile Context
|
|
120
|
+
|
|
121
|
+
The library includes a mobile detection context:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import { MobileProvider, useMobile } from 'automoby-kit';
|
|
125
|
+
|
|
126
|
+
function App() {
|
|
127
|
+
return (
|
|
128
|
+
<MobileProvider>
|
|
129
|
+
<MyComponent />
|
|
130
|
+
</MobileProvider>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function MyComponent() {
|
|
135
|
+
const isMobile = useMobile();
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<div>
|
|
139
|
+
{isMobile ? 'Mobile view' : 'Desktop view'}
|
|
140
|
+
</div>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## 🛠️ Development
|
|
146
|
+
|
|
147
|
+
This package requires the following peer dependencies:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"react": "^19.1.0",
|
|
152
|
+
"react-dom": "^19.1.0",
|
|
153
|
+
"clsx": "^2.1.1",
|
|
154
|
+
"tailwindcss": "^4.1.10"
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## 📄 License
|
|
159
|
+
|
|
160
|
+
This is a commercial package. You need a valid license key to use it in production.
|
|
161
|
+
|
|
162
|
+
## 🆘 Support
|
|
163
|
+
|
|
164
|
+
If you need a license key or have issues:
|
|
165
|
+
|
|
166
|
+
1. Contact our sales team for licensing
|
|
167
|
+
2. Check the [GitHub issues](https://github.com/yourusername/automoby-kit/issues) for known problems
|
|
168
|
+
3. Make sure you're calling `initializeAutomobiKit()` before using any components
|
|
169
|
+
|
|
170
|
+
## 🔄 Version History
|
|
171
|
+
|
|
172
|
+
- **1.0.0** - Initial release with licensing system
|