@mohityadav0903/branintelle-mcp 1.0.0 → 2.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 -96
- package/components-data.js +246 -0
- package/design-tokens.json +1300 -0
- package/mcp-server.js +230 -110
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,154 +1,230 @@
|
|
|
1
|
-
# Branintelle
|
|
1
|
+
# Branintelle MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Version 2.0.0** - Enhanced Model Context Protocol server for Branintelle UI Library
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Provides comprehensive component documentation, design tokens, and usage patterns to LLMs via the Model Context Protocol.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🚀 Features
|
|
10
|
+
|
|
11
|
+
- **36 Angular Components** - Full metadata with inputs, outputs, and examples
|
|
12
|
+
- **Complete Design System** - 1300+ design tokens from Figma
|
|
13
|
+
- **Usage Patterns** - Best practices for common UI scenarios
|
|
14
|
+
- **Smart Search** - Find components by keyword or use case
|
|
15
|
+
- **Type Definitions** - Full TypeScript interfaces included
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📦 Installation
|
|
20
|
+
|
|
21
|
+
### Via npx (Recommended)
|
|
22
|
+
```bash
|
|
23
|
+
npx @mohityadav0903/branintelle-mcp
|
|
24
|
+
```
|
|
8
25
|
|
|
26
|
+
### Global Install
|
|
9
27
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
node test-mcp.js
|
|
28
|
+
npm install -g @mohityadav0903/branintelle-mcp
|
|
29
|
+
branintelle-mcp
|
|
13
30
|
```
|
|
14
31
|
|
|
15
|
-
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 🔌 Setup with Claude Desktop
|
|
16
35
|
|
|
17
|
-
|
|
18
|
-
Lists all 36 components, grouped by category
|
|
36
|
+
**Config file:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
19
37
|
|
|
20
38
|
```json
|
|
21
39
|
{
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"branintelle": {
|
|
42
|
+
"command": "npx",
|
|
43
|
+
"args": ["-y", "@mohityadav0903/branintelle-mcp"]
|
|
44
|
+
}
|
|
25
45
|
}
|
|
26
46
|
}
|
|
27
47
|
```
|
|
28
48
|
|
|
29
|
-
**
|
|
49
|
+
**Then restart Claude Desktop** and look for the 🔌 icon!
|
|
50
|
+
|
|
51
|
+
---
|
|
30
52
|
|
|
31
|
-
|
|
32
|
-
Get docs for specific components
|
|
53
|
+
## 🛠️ Available Tools
|
|
33
54
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"name": "get_component_docs",
|
|
37
|
-
"arguments": {
|
|
38
|
-
"components": ["CustomButton", "StatusPill"]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
```
|
|
55
|
+
### 1. `list_components`
|
|
56
|
+
Lists all 36 components with optional filtering and detail levels
|
|
42
57
|
|
|
43
|
-
|
|
58
|
+
```javascript
|
|
59
|
+
// Basic list
|
|
60
|
+
{ "category": "Buttons" }
|
|
44
61
|
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
// Detailed with full metadata
|
|
63
|
+
{ "category": "Tables", "detailed": true }
|
|
64
|
+
```
|
|
47
65
|
|
|
48
|
-
|
|
66
|
+
### 2. `get_component_docs`
|
|
67
|
+
Get comprehensive docs for specific components
|
|
68
|
+
|
|
69
|
+
```javascript
|
|
49
70
|
{
|
|
50
|
-
"
|
|
51
|
-
"arguments": {
|
|
52
|
-
"category": "colors" // "colors", "typography", or "all"
|
|
53
|
-
}
|
|
71
|
+
"components": ["CustomButton", "StatusPill", "ScrollableDataTable"]
|
|
54
72
|
}
|
|
55
73
|
```
|
|
56
74
|
|
|
57
|
-
**
|
|
75
|
+
**Returns:**
|
|
76
|
+
- Full TypeScript interfaces
|
|
77
|
+
- Input/Output properties
|
|
78
|
+
- Code examples
|
|
79
|
+
- Design tokens used
|
|
80
|
+
- Usage patterns
|
|
58
81
|
|
|
59
|
-
|
|
82
|
+
### 3. `get_design_tokens`
|
|
83
|
+
Access the complete Figma design system
|
|
60
84
|
|
|
61
|
-
|
|
85
|
+
```javascript
|
|
86
|
+
// All tokens with contexts
|
|
87
|
+
{ "category": "all", "includeContexts": true }
|
|
62
88
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
npm run build:lib
|
|
66
|
-
cd dist/lib
|
|
67
|
-
npm pack
|
|
68
|
-
# Publish to npm
|
|
89
|
+
// Just colors, no contexts
|
|
90
|
+
{ "category": "colors", "includeContexts": false }
|
|
69
91
|
```
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
**Returns:**
|
|
94
|
+
- 10 violet shades
|
|
95
|
+
- 9 text color variations
|
|
96
|
+
- Feedback colors (success, error, warning)
|
|
97
|
+
- Typography scales
|
|
98
|
+
- Usage contexts from Figma
|
|
72
99
|
|
|
73
|
-
|
|
100
|
+
### 4. `search_components`
|
|
101
|
+
Search by keyword or use case
|
|
74
102
|
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"branintelle": {
|
|
79
|
-
"command": "npx",
|
|
80
|
-
"args": ["-y", "@mohityadav0903/branintelle-ui-lib", "branintelle-mcp"]
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
```
|
|
103
|
+
```javascript
|
|
104
|
+
// Search by keyword
|
|
105
|
+
{ "query": "dropdown" }
|
|
85
106
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
"mcpServers": {
|
|
90
|
-
"branintelle": {
|
|
91
|
-
"command": "branintelle-mcp"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
107
|
+
// Filter by use case
|
|
108
|
+
{ "query": "select", "useCase": "forms" }
|
|
95
109
|
```
|
|
96
110
|
|
|
97
|
-
###
|
|
111
|
+
### 5. `get_usage_pattern`
|
|
112
|
+
Get recommended patterns and best practices
|
|
98
113
|
|
|
99
|
-
|
|
114
|
+
```javascript
|
|
115
|
+
{ "pattern": "primary-actions" }
|
|
116
|
+
{ "pattern": "multi-step-forms" }
|
|
117
|
+
{ "pattern": "data-display" }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Available patterns:**
|
|
121
|
+
- `primary-actions` - Main CTAs and buttons
|
|
122
|
+
- `status-indicators` - Status pills and badges
|
|
123
|
+
- `multi-step-forms` - Guided workflows
|
|
124
|
+
- `data-display` - Tables and lists
|
|
125
|
+
- `form-inputs` - Dropdowns and inputs
|
|
100
126
|
|
|
101
127
|
---
|
|
102
128
|
|
|
103
|
-
##
|
|
129
|
+
## 💡 Example Queries for LLMs
|
|
104
130
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
131
|
+
Once connected to Claude Desktop:
|
|
132
|
+
|
|
133
|
+
- *"What button components are available in Branintelle?"*
|
|
134
|
+
- *"Show me how to use the ScrollableDataTable with sorting"*
|
|
135
|
+
- *"What are the primary brand colors?"*
|
|
136
|
+
- *"Find all dropdown components"*
|
|
137
|
+
- *"Show me the multi-step-forms pattern"*
|
|
138
|
+
- *"Get design tokens for typography"*
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 📊 Component Categories
|
|
143
|
+
|
|
144
|
+
- **Buttons** (5) - CustomButton, ApproveButton, CancelButton, BackButton, ButtonImage
|
|
145
|
+
- **Status** (3) - StatusPill, PillBadge, PillBox
|
|
146
|
+
- **Progress** (2) - ProgressBar, SegmentedProgressBar
|
|
147
|
+
- **Navigation** (3) - VerticalStepper, CustomBreadcrumb, HeaderTabs
|
|
148
|
+
- **Text** (2) - TitleHeaderSubtext, HelpText
|
|
149
|
+
- **Forms** (2) - SearchBar, Checklist
|
|
150
|
+
- **Cards** (4) - HorizontalCard, InfoActionCard, ProgressDisplayCard, ProfileImageList
|
|
151
|
+
- **Dropdowns** (5) - SingleSelect, MultiSelect, DropdownWithStatus, MultilineOption, ExpandableMenu
|
|
152
|
+
- **Overlays** (2) - CustomTooltip, ConfirmWarning
|
|
153
|
+
- **Workflows** (3) - VerticalStages, UserSelection, Accordion
|
|
154
|
+
- **Filters** (2) - GeoTagFilter, TableActionMenu
|
|
155
|
+
- **Tables** (3) - ScrollableDataTable, CollapsableTable, CollapsableTableSmall
|
|
112
156
|
|
|
113
157
|
---
|
|
114
158
|
|
|
115
|
-
##
|
|
159
|
+
## 🎨 Design System
|
|
116
160
|
|
|
117
|
-
|
|
161
|
+
### Colors
|
|
162
|
+
- **10 Violet Shades** - Primary brand palette (#544d7c - #232034)
|
|
163
|
+
- **9 Text Colors** - From white to max contrast
|
|
164
|
+
- **Feedback Colors** - Success, error, warning, selected
|
|
165
|
+
- **State Colors** - Hover, active, disabled
|
|
118
166
|
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
|
|
167
|
+
### Typography
|
|
168
|
+
- **Font Family:** Lato
|
|
169
|
+
- **Scales:** Display, Heading (2XL-Small), Body (Large-XSmall), Caption, Code
|
|
170
|
+
- **Weights:** 400, 500, 600, 700
|
|
171
|
+
|
|
172
|
+
### All Design Tokens
|
|
173
|
+
- 1300+ tokens with usage contexts
|
|
174
|
+
- Extracted from Figma design files
|
|
175
|
+
- CSS variables available in demo app
|
|
124
176
|
|
|
125
177
|
---
|
|
126
178
|
|
|
127
|
-
##
|
|
179
|
+
## 🔗 Related Packages
|
|
128
180
|
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
- `test-mcp.js` - Test script
|
|
132
|
-
- `package.json` - Updated with `bin` and `type: "module"`
|
|
181
|
+
- **UI Library:** [@mohityadav0903/branintelle-ui-lib](https://www.npmjs.com/package/@mohityadav0903/branintelle-ui-lib)
|
|
182
|
+
- **Demo App:** Included with design tokens pre-configured
|
|
133
183
|
|
|
134
184
|
---
|
|
135
185
|
|
|
136
|
-
##
|
|
186
|
+
## 📝 What's New in v2.0
|
|
187
|
+
|
|
188
|
+
### Enhanced Component Metadata
|
|
189
|
+
- Full TypeScript interfaces for all components
|
|
190
|
+
- Input/Output property documentation
|
|
191
|
+
- Real code examples with data
|
|
192
|
+
- Design tokens mapping
|
|
193
|
+
|
|
194
|
+
### Complete Design System
|
|
195
|
+
- Full 1300+ Figma tokens included
|
|
196
|
+
- Usage contexts for each token
|
|
197
|
+
- Component-specific recommendations
|
|
198
|
+
|
|
199
|
+
### New Tools
|
|
200
|
+
- `search_components` - Smart component search
|
|
201
|
+
- `get_usage_pattern` - Best practice patterns
|
|
202
|
+
- Enhanced `get_design_tokens` with contexts
|
|
137
203
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
5. ⬜ **Add resources** - Component examples, migration guides
|
|
204
|
+
### Better Developer Experience
|
|
205
|
+
- Detailed TypeScript types
|
|
206
|
+
- Copy-paste ready examples
|
|
207
|
+
- Pattern-based recommendations
|
|
143
208
|
|
|
144
209
|
---
|
|
145
210
|
|
|
146
|
-
##
|
|
211
|
+
## 🤝 Contributing
|
|
212
|
+
|
|
213
|
+
This MCP server is part of the Branintelle UI ecosystem. For issues or feature requests, please visit our GitHub repository.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## 📄 License
|
|
218
|
+
|
|
219
|
+
MIT License - see LICENSE file for details
|
|
220
|
+
|
|
221
|
+
---
|
|
147
222
|
|
|
148
|
-
|
|
149
|
-
- Responses are **JSON-RPC 2.0** format
|
|
150
|
-
- Component data is currently **static** (can be auto-generated later)
|
|
151
|
-
- Design tokens are **simplified** (subset of full tokens.css)
|
|
223
|
+
## 🌟 Made for AI-First Development
|
|
152
224
|
|
|
153
|
-
|
|
225
|
+
Built specifically to make Branintelle UI components discoverable and usable by Large Language Models through the Model Context Protocol.
|
|
154
226
|
|
|
227
|
+
**Package:** `@mohityadav0903/branintelle-mcp`
|
|
228
|
+
**Version:** 2.0.0
|
|
229
|
+
**Protocol:** MCP (Model Context Protocol)
|
|
230
|
+
**Runtime:** Node.js 18+
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branintelle UI Library - Component Metadata
|
|
3
|
+
* Auto-generated component documentation with props, examples, and patterns
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const COMPONENTS_DATA = {
|
|
7
|
+
// ======================
|
|
8
|
+
// BUTTONS
|
|
9
|
+
// ======================
|
|
10
|
+
CustomButton: {
|
|
11
|
+
name: 'CustomButton',
|
|
12
|
+
category: 'Buttons',
|
|
13
|
+
selector: 'bi-custom-button',
|
|
14
|
+
description: 'Primary action button with loading states and customizable styling',
|
|
15
|
+
inputs: {
|
|
16
|
+
label: { type: 'string', required: true, description: 'Button text label' },
|
|
17
|
+
isActive: { type: 'boolean', default: true, description: 'Enable/disable button state' },
|
|
18
|
+
isLoading: { type: 'boolean', default: false, description: 'Show loading spinner' },
|
|
19
|
+
width: { type: 'string', default: 'auto', description: 'Button width (e.g., "200px", "100%")' },
|
|
20
|
+
height: { type: 'string', default: 'auto', description: 'Button height' },
|
|
21
|
+
fontSize: { type: 'string', default: '16px', description: 'Font size for label' },
|
|
22
|
+
padding: { type: 'string', default: '12px 24px', description: 'Button padding' }
|
|
23
|
+
},
|
|
24
|
+
outputs: {
|
|
25
|
+
onClick: { type: 'EventEmitter<void>', description: 'Emitted when button is clicked' }
|
|
26
|
+
},
|
|
27
|
+
example: `<bi-custom-button
|
|
28
|
+
[label]="'Submit'"
|
|
29
|
+
[isActive]="true"
|
|
30
|
+
[isLoading]="isSubmitting"
|
|
31
|
+
[width]="'200px'"
|
|
32
|
+
(onClick)="handleSubmit()">
|
|
33
|
+
</bi-custom-button>`,
|
|
34
|
+
usagePattern: 'primary-actions',
|
|
35
|
+
tokens: ['--violet-500', '--white', '--body-large-size']
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
StatusPill: {
|
|
39
|
+
name: 'StatusPill',
|
|
40
|
+
category: 'Status',
|
|
41
|
+
selector: 'bi-status-pill',
|
|
42
|
+
description: 'Status indicator pill with icon and colored background',
|
|
43
|
+
inputs: {
|
|
44
|
+
statusText: { type: 'string', required: true, description: 'Status text to display' },
|
|
45
|
+
statusImage: { type: 'string', required: false, description: 'Path to status icon image' },
|
|
46
|
+
statusColor: { type: 'string', required: true, description: 'Background color (hex)' },
|
|
47
|
+
statusTextColor: { type: 'string', required: true, description: 'Text color (hex)' }
|
|
48
|
+
},
|
|
49
|
+
outputs: {},
|
|
50
|
+
example: `<bi-status-pill
|
|
51
|
+
[statusText]="'Approved'"
|
|
52
|
+
[statusImage]="'assets/images/icons/check_green.svg'"
|
|
53
|
+
[statusColor]="'#beddc6'"
|
|
54
|
+
[statusTextColor]="'#2c9148'">
|
|
55
|
+
</bi-status-pill>`,
|
|
56
|
+
usagePattern: 'status-indicators',
|
|
57
|
+
tokens: ['--positive-high', '--positive-low', '--body-medium-size']
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
VerticalStepper: {
|
|
61
|
+
name: 'VerticalStepper',
|
|
62
|
+
category: 'Navigation',
|
|
63
|
+
selector: 'bi-vertical-stepper',
|
|
64
|
+
description: 'Vertical step indicator for multi-step workflows',
|
|
65
|
+
inputs: {
|
|
66
|
+
steps: { type: 'Step[]', required: true, description: 'Array of step objects with label, status, substeps' },
|
|
67
|
+
activeStep: { type: 'number', default: 0, description: 'Currently active step index' }
|
|
68
|
+
},
|
|
69
|
+
outputs: {
|
|
70
|
+
stepClick: { type: 'EventEmitter<number>', description: 'Emitted when step is clicked' }
|
|
71
|
+
},
|
|
72
|
+
interfaces: {
|
|
73
|
+
Step: `{
|
|
74
|
+
label: string;
|
|
75
|
+
status: 'completed' | 'active' | 'pending';
|
|
76
|
+
substeps?: { label: string; status: string }[];
|
|
77
|
+
}`
|
|
78
|
+
},
|
|
79
|
+
example: `<bi-vertical-stepper
|
|
80
|
+
[steps]="workflowSteps"
|
|
81
|
+
[activeStep]="currentStep"
|
|
82
|
+
(stepClick)="onStepChange($event)">
|
|
83
|
+
</bi-vertical-stepper>
|
|
84
|
+
|
|
85
|
+
// Component
|
|
86
|
+
workflowSteps: Step[] = [
|
|
87
|
+
{ label: 'Brief Details', status: 'completed' },
|
|
88
|
+
{ label: 'Requirements', status: 'active' },
|
|
89
|
+
{ label: 'Review', status: 'pending' }
|
|
90
|
+
];`,
|
|
91
|
+
usagePattern: 'multi-step-forms',
|
|
92
|
+
tokens: ['--violet-500', '--positive-high', '--text-300']
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
ScrollableDataTable: {
|
|
96
|
+
name: 'ScrollableDataTable',
|
|
97
|
+
category: 'Tables',
|
|
98
|
+
selector: 'bi-scrollable-data-table',
|
|
99
|
+
description: 'Feature-rich data table with sorting, filtering, and virtual scrolling',
|
|
100
|
+
inputs: {
|
|
101
|
+
columns: { type: 'TableColumn[]', required: true, description: 'Column definitions' },
|
|
102
|
+
data: { type: 'any[]', required: true, description: 'Table data rows' },
|
|
103
|
+
enableSort: { type: 'boolean', default: true, description: 'Enable column sorting' },
|
|
104
|
+
enableFilter: { type: 'boolean', default: true, description: 'Enable filtering' },
|
|
105
|
+
maxHeight: { type: 'string', default: '500px', description: 'Maximum table height' }
|
|
106
|
+
},
|
|
107
|
+
outputs: {
|
|
108
|
+
rowClick: { type: 'EventEmitter<any>', description: 'Emitted when row is clicked' },
|
|
109
|
+
sortChange: { type: 'EventEmitter<{column: string, direction: string}>', description: 'Sort change event' }
|
|
110
|
+
},
|
|
111
|
+
interfaces: {
|
|
112
|
+
TableColumn: `{
|
|
113
|
+
key: string;
|
|
114
|
+
label: string;
|
|
115
|
+
sortable?: boolean;
|
|
116
|
+
width?: string;
|
|
117
|
+
align?: 'left' | 'center' | 'right';
|
|
118
|
+
}`
|
|
119
|
+
},
|
|
120
|
+
example: `<bi-scrollable-data-table
|
|
121
|
+
[columns]="tableColumns"
|
|
122
|
+
[data]="tableData"
|
|
123
|
+
[enableSort]="true"
|
|
124
|
+
[maxHeight]="'600px'"
|
|
125
|
+
(rowClick)="handleRowClick($event)">
|
|
126
|
+
</bi-scrollable-data-table>
|
|
127
|
+
|
|
128
|
+
// Component
|
|
129
|
+
tableColumns: TableColumn[] = [
|
|
130
|
+
{ key: 'name', label: 'Name', sortable: true },
|
|
131
|
+
{ key: 'status', label: 'Status', width: '120px' },
|
|
132
|
+
{ key: 'amount', label: 'Amount', align: 'right' }
|
|
133
|
+
];`,
|
|
134
|
+
usagePattern: 'data-display',
|
|
135
|
+
tokens: ['--stroke-1', '--hover', '--text-400', '--body-medium-size']
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
SingleSelectDropdown: {
|
|
139
|
+
name: 'SingleSelectDropdown',
|
|
140
|
+
category: 'Dropdowns',
|
|
141
|
+
selector: 'bi-single-select-dropdown',
|
|
142
|
+
description: 'Single selection dropdown with search',
|
|
143
|
+
inputs: {
|
|
144
|
+
options: { type: 'DropdownItem[]', required: true, description: 'List of dropdown options' },
|
|
145
|
+
selectedValue: { type: 'string', required: false, description: 'Currently selected value' },
|
|
146
|
+
placeholder: { type: 'string', default: 'Select...', description: 'Placeholder text' },
|
|
147
|
+
searchable: { type: 'boolean', default: true, description: 'Enable search functionality' }
|
|
148
|
+
},
|
|
149
|
+
outputs: {
|
|
150
|
+
selectionChange: { type: 'EventEmitter<string>', description: 'Emitted when selection changes' }
|
|
151
|
+
},
|
|
152
|
+
interfaces: {
|
|
153
|
+
DropdownItem: `{
|
|
154
|
+
label: string;
|
|
155
|
+
value: string;
|
|
156
|
+
disabled?: boolean;
|
|
157
|
+
}`
|
|
158
|
+
},
|
|
159
|
+
example: `<bi-single-select-dropdown
|
|
160
|
+
[options]="categoryOptions"
|
|
161
|
+
[selectedValue]="selectedCategory"
|
|
162
|
+
[placeholder]="'Select category'"
|
|
163
|
+
(selectionChange)="onCategoryChange($event)">
|
|
164
|
+
</bi-single-select-dropdown>`,
|
|
165
|
+
usagePattern: 'form-inputs',
|
|
166
|
+
tokens: ['--stroke-1', '--violet-500', '--hover']
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// Add all other components...
|
|
171
|
+
export const COMPONENT_CATEGORIES = {
|
|
172
|
+
'Buttons': ['CustomButton', 'ApproveButton', 'CancelButton', 'BackButton', 'ButtonImage'],
|
|
173
|
+
'Status': ['StatusPill', 'PillBadge', 'PillBox'],
|
|
174
|
+
'Progress': ['ProgressBar', 'SegmentedProgressBar'],
|
|
175
|
+
'Navigation': ['VerticalStepper', 'CustomBreadcrumb', 'HeaderTabs'],
|
|
176
|
+
'Text': ['TitleHeaderSubtext', 'HelpText'],
|
|
177
|
+
'Forms': ['SearchBar', 'Checklist'],
|
|
178
|
+
'Cards': ['HorizontalCard', 'InfoActionCard', 'ProgressDisplayCard', 'ProfileImageList'],
|
|
179
|
+
'Dropdowns': ['SingleSelectDropdown', 'MultiSelectDropdown', 'DropdownWithStatus', 'MultilineOptionDropdown', 'ExpandableMenuDropdown'],
|
|
180
|
+
'Overlays': ['CustomTooltip', 'ConfirmWarning'],
|
|
181
|
+
'Workflows': ['VerticalStages', 'UserSelection', 'Accordion'],
|
|
182
|
+
'Filters': ['GeoTagFilter', 'TableActionMenu'],
|
|
183
|
+
'Tables': ['ScrollableDataTable', 'CollapsableTable', 'CollapsableTableSmall']
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export const USAGE_PATTERNS = {
|
|
187
|
+
'primary-actions': {
|
|
188
|
+
name: 'Primary Actions',
|
|
189
|
+
description: 'Main call-to-action buttons',
|
|
190
|
+
components: ['CustomButton', 'ApproveButton'],
|
|
191
|
+
example: `// Primary action button
|
|
192
|
+
<bi-custom-button
|
|
193
|
+
[label]="'Submit Form'"
|
|
194
|
+
[isActive]="formValid"
|
|
195
|
+
[isLoading]="isSubmitting"
|
|
196
|
+
(onClick)="submitForm()">
|
|
197
|
+
</bi-custom-button>`
|
|
198
|
+
},
|
|
199
|
+
'status-indicators': {
|
|
200
|
+
name: 'Status Indicators',
|
|
201
|
+
description: 'Show status with colored pills and badges',
|
|
202
|
+
components: ['StatusPill', 'PillBadge'],
|
|
203
|
+
example: `// Status pill with icon
|
|
204
|
+
<bi-status-pill
|
|
205
|
+
[statusText]="item.status"
|
|
206
|
+
[statusImage]="getStatusIcon(item.status)"
|
|
207
|
+
[statusColor]="getStatusColor(item.status)"
|
|
208
|
+
[statusTextColor]="getStatusTextColor(item.status)">
|
|
209
|
+
</bi-status-pill>`
|
|
210
|
+
},
|
|
211
|
+
'multi-step-forms': {
|
|
212
|
+
name: 'Multi-Step Forms',
|
|
213
|
+
description: 'Guided workflows with step indicators',
|
|
214
|
+
components: ['VerticalStepper', 'VerticalStages'],
|
|
215
|
+
example: `// Vertical stepper for workflow
|
|
216
|
+
<bi-vertical-stepper
|
|
217
|
+
[steps]="formSteps"
|
|
218
|
+
[activeStep]="currentStepIndex"
|
|
219
|
+
(stepClick)="navigateToStep($event)">
|
|
220
|
+
</bi-vertical-stepper>`
|
|
221
|
+
},
|
|
222
|
+
'data-display': {
|
|
223
|
+
name: 'Data Display',
|
|
224
|
+
description: 'Tables and lists for displaying data',
|
|
225
|
+
components: ['ScrollableDataTable', 'CollapsableTable'],
|
|
226
|
+
example: `// Data table with sorting
|
|
227
|
+
<bi-scrollable-data-table
|
|
228
|
+
[columns]="columns"
|
|
229
|
+
[data]="rows"
|
|
230
|
+
[enableSort]="true"
|
|
231
|
+
(rowClick)="viewDetails($event)">
|
|
232
|
+
</bi-scrollable-data-table>`
|
|
233
|
+
},
|
|
234
|
+
'form-inputs': {
|
|
235
|
+
name: 'Form Inputs',
|
|
236
|
+
description: 'Input controls for forms',
|
|
237
|
+
components: ['SingleSelectDropdown', 'MultiSelectDropdown', 'SearchBar'],
|
|
238
|
+
example: `// Dropdown with search
|
|
239
|
+
<bi-single-select-dropdown
|
|
240
|
+
[options]="options"
|
|
241
|
+
[selectedValue]="value"
|
|
242
|
+
(selectionChange)="onValueChange($event)">
|
|
243
|
+
</bi-single-select-dropdown>`
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
|