mta-design-system 0.1.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 +198 -0
- package/dist/cli/src/index.cjs +1234 -0
- package/dist/cli/src/index.cjs.map +1 -0
- package/dist/index.cjs +2269 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +350 -0
- package/dist/index.d.ts +350 -0
- package/dist/index.js +2151 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/src/index.cjs +1351 -0
- package/dist/mcp/src/index.cjs.map +1 -0
- package/dist/styles.css +171 -0
- package/package.json +120 -0
package/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# MTA Design System
|
|
2
|
+
|
|
3
|
+
A comprehensive React component library with multiple brand themes (ClaimMind, Owlexa, BPJS). Built with TypeScript, Tailwind CSS, and Radix UI primitives.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install mta-design-system
|
|
9
|
+
# or
|
|
10
|
+
yarn add mta-design-system
|
|
11
|
+
# or
|
|
12
|
+
pnpm add mta-design-system
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### 1. Import the CSS
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import 'mta-design-system/styles.css';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### 2. Import Components
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Button, Card, Input } from 'mta-design-system';
|
|
27
|
+
|
|
28
|
+
function App() {
|
|
29
|
+
return (
|
|
30
|
+
<Button variant="primary">Click me</Button>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## CLI Usage
|
|
36
|
+
|
|
37
|
+
Use the CLI to initialize your project or add individual components (shadcn-style):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Initialize MTA Design System in your project
|
|
41
|
+
npx mta-ds init
|
|
42
|
+
|
|
43
|
+
# List all available components
|
|
44
|
+
npx mta-ds list
|
|
45
|
+
|
|
46
|
+
# Show component details
|
|
47
|
+
npx mta-ds show Button
|
|
48
|
+
|
|
49
|
+
# Add a component to your project (copies source)
|
|
50
|
+
npx mta-ds add Button -o ./src/components/ui
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### CLI Commands
|
|
54
|
+
|
|
55
|
+
| Command | Description |
|
|
56
|
+
|---------|-------------|
|
|
57
|
+
| `init` | Initialize MTA Design System in your project |
|
|
58
|
+
| `list` | List all available components |
|
|
59
|
+
| `show <component>` | Show detailed component information |
|
|
60
|
+
| `add <component>` | Copy component source to your project |
|
|
61
|
+
|
|
62
|
+
### CLI Options
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx mta-ds add <component> [options]
|
|
66
|
+
|
|
67
|
+
Options:
|
|
68
|
+
-o, --output <path> Output directory (default: "./src/components/ui")
|
|
69
|
+
-t, --theme <theme> Theme variant (Default, Owlexa, BPJS)
|
|
70
|
+
--overwrite Overwrite existing files
|
|
71
|
+
-a, --alias <alias> Import alias to use (default: "@/")
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## MCP Server (AI Integration)
|
|
75
|
+
|
|
76
|
+
MTA Design System includes a Model Context Protocol (MCP) server for AI assistants like Claude.
|
|
77
|
+
|
|
78
|
+
### Using with Claude Desktop
|
|
79
|
+
|
|
80
|
+
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"mcpServers": {
|
|
85
|
+
"mta-design-system": {
|
|
86
|
+
"command": "npx",
|
|
87
|
+
"args": ["-y", "mta-design-system", "mcp"]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Or using the dedicated MCP binary:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"mcpServers": {
|
|
98
|
+
"mta-design-system": {
|
|
99
|
+
"command": "npx",
|
|
100
|
+
"args": ["-y", "mta-mcp"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Running MCP Directly
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npx mta-mcp
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### MCP Resources
|
|
113
|
+
|
|
114
|
+
The MCP server provides these resources:
|
|
115
|
+
|
|
116
|
+
| URI | Description |
|
|
117
|
+
|-----|-------------|
|
|
118
|
+
| `mta://components` | List all components |
|
|
119
|
+
| `mta://components/{name}` | Get component details |
|
|
120
|
+
| `mta://themes` | List all themes |
|
|
121
|
+
| `mta://themes/{name}` | Get theme tokens |
|
|
122
|
+
| `mta://examples` | List all examples |
|
|
123
|
+
| `mta://examples/{name}` | Get component examples |
|
|
124
|
+
|
|
125
|
+
### MCP Tools
|
|
126
|
+
|
|
127
|
+
| Tool | Description |
|
|
128
|
+
|------|-------------|
|
|
129
|
+
| `search-components` | Search components by name, description, or props |
|
|
130
|
+
| `get-component-props` | Get TypeScript props interface for a component |
|
|
131
|
+
| `generate-code` | Generate usage code snippet for a component |
|
|
132
|
+
| `get-theme-variables` | Get CSS custom properties for a theme |
|
|
133
|
+
|
|
134
|
+
## Themes
|
|
135
|
+
|
|
136
|
+
The design system supports three brand themes:
|
|
137
|
+
|
|
138
|
+
- **Default** - Base MTA theme
|
|
139
|
+
- **Owlexa** - Owlexa brand colors and styling
|
|
140
|
+
- **BPJS** - BPJS brand colors and styling
|
|
141
|
+
|
|
142
|
+
### Applying Themes
|
|
143
|
+
|
|
144
|
+
Wrap your app with the theme provider:
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
import { ThemeProvider } from 'mta-design-system';
|
|
148
|
+
|
|
149
|
+
function App() {
|
|
150
|
+
return (
|
|
151
|
+
<ThemeProvider theme="Owlexa">
|
|
152
|
+
<YourApp />
|
|
153
|
+
</ThemeProvider>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Peer Dependencies
|
|
159
|
+
|
|
160
|
+
Make sure you have these installed:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"react": ">=18.0.0",
|
|
165
|
+
"react-dom": ">=18.0.0",
|
|
166
|
+
"next": ">=14.0.0"
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Development
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Install dependencies
|
|
174
|
+
npm install
|
|
175
|
+
|
|
176
|
+
# Start development server
|
|
177
|
+
npm run dev
|
|
178
|
+
|
|
179
|
+
# Build the library
|
|
180
|
+
npm run build:lib
|
|
181
|
+
|
|
182
|
+
# Start Storybook
|
|
183
|
+
npm run storybook
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Publishing
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Build before publishing
|
|
190
|
+
npm run build:lib
|
|
191
|
+
|
|
192
|
+
# Publish to npm
|
|
193
|
+
npm publish --access public
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## License
|
|
197
|
+
|
|
198
|
+
MIT © MTA
|