@mohityadav0903/branintelle-mcp 2.0.0 → 2.0.2

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.
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Branintelle UI Library - Component Metadata
3
+ * AUTO-GENERATED FROM SOURCE CODE - DO NOT MANUALLY EDIT
4
+ *
5
+ * This file contains REAL component APIs extracted directly from TypeScript source files.
6
+ * Every @Input(), @Output(), interface, and type is verified against the actual codebase.
7
+ */
8
+
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+
12
+ // Load raw API data
13
+ const rawApiData = JSON.parse(
14
+ fs.readFileSync(path.join(__dirname, 'real-component-api.cjs.json'), 'utf-8')
15
+ );
16
+
17
+ // Helper to convert kebab-case to PascalCase
18
+ function formatComponentName(kebabName) {
19
+ return kebabName
20
+ .split('-')
21
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1))
22
+ .join('') + 'Component';
23
+ }
24
+
25
+ // Categorize components
26
+ function categorizeComponent(name) {
27
+ if (name.includes('button')) return 'Buttons';
28
+ if (name.includes('dropdown') || name.includes('select')) return 'Dropdowns';
29
+ if (name.includes('table')) return 'Tables';
30
+ if (name.includes('pill') || name === 'status-pill') return 'Status & Pills';
31
+ if (name.includes('progress')) return 'Progress';
32
+ if (name.includes('card')) return 'Cards';
33
+ if (name.includes('stepper') || name.includes('stages')) return 'Stages & Workflows';
34
+ if (name.includes('search') || name.includes('filter') || name === 'checklist') return 'Search & Filters';
35
+ if (name === 'accordion') return 'Accordion & Expandable';
36
+ if (name.includes('tooltip')) return 'Tooltips & Overlays';
37
+ if (name === 'confirm-warning') return 'Dialogs & Modals';
38
+ if (name.includes('breadcrumb') || name.includes('tabs')) return 'Navigation & Breadcrumb';
39
+ if (name.includes('user')) return 'User Management';
40
+ if (name.includes('text') || name.includes('header')) return 'Text & Headers';
41
+ if (name.includes('menu')) return 'Filters & Menus';
42
+ return 'Components';
43
+ }
44
+
45
+ // Generate description
46
+ function generateDescription(name, data) {
47
+ const descriptions = {
48
+ 'custom-button': 'Primary action button with loading state and custom styling',
49
+ 'approve-button': 'Specialized approve button with loading state',
50
+ 'cancel-button': 'Cancel button with configurable styling',
51
+ 'back-button': 'Navigation back button',
52
+ 'button-image': 'Button with image/icon and text',
53
+ 'status-pill': 'Status indicator pill with icon and customizable colors',
54
+ 'pill-badge': 'Badge with icon and text',
55
+ 'pill-box': 'Simple colored text pill',
56
+ 'progress-bar': 'Linear progress bar with numeric values',
57
+ 'segmented-progress-bar': 'Multi-segment progress bar with legend',
58
+ 'vertical-stepper': 'Vertical step indicator for multi-step workflows',
59
+ 'custom-breadcrumb': 'Breadcrumb navigation component',
60
+ 'title-header-subtext': 'Header with title, description, and optional pill',
61
+ 'help-text': 'Help text component',
62
+ 'header-tabs': 'Tabbed navigation with status icons and counts',
63
+ 'search-bar': 'Search input with clear functionality',
64
+ 'checklist': 'Checkbox list with search',
65
+ 'horizontal-card': 'Horizontal card layout with multiple data fields',
66
+ 'info-action-card': 'Action card with image, title, and description',
67
+ 'progress-display-card': 'Card displaying progress information',
68
+ 'profile-image-list': 'List of user profile images with overflow indicator',
69
+ 'single-select-dropdown': 'Single selection dropdown',
70
+ 'multi-select-dropdown': 'Multiple selection dropdown with chips',
71
+ 'dropdown-with-status': 'Dropdown with status indicators',
72
+ 'multiline-option-dropdown': 'Advanced dropdown with multi-line options and search',
73
+ 'expandable-menu-dropdown': 'Collapsible menu with icons',
74
+ 'custom-tooltip': 'Custom tooltip with numeric values',
75
+ 'confirm-warning': 'Confirmation dialog with customizable buttons',
76
+ 'vertical-stages': 'Vertical workflow stages with user assignment',
77
+ 'user-selection': 'User selection component with search and load more',
78
+ 'accordion': 'Accordion menu with submenu items',
79
+ 'geo-tag-filter': 'Multi-tab filter with apply/reset functionality',
80
+ 'table-action-menu': 'Context menu for table actions',
81
+ 'scrollable-data-table': 'Advanced data table with grouping, sorting, search, and infinite scroll',
82
+ 'collapsable-table': 'Budget table with collapsible groups and Excel export',
83
+ 'collapsable-table-small': 'Compact budget table with collapsible groups'
84
+ };
85
+ return descriptions[name] || `${formatComponentName(name)}`;
86
+ }
87
+
88
+ // Generate usage example
89
+ function generateUsageExample(name, data) {
90
+ const inputs = Object.entries(data.inputs || {}).slice(0, 3); // Show first 3 inputs
91
+ const outputs = Object.entries(data.outputs || {}).slice(0, 2); // Show first 2 outputs
92
+
93
+ const inputBindings = inputs.map(([key, value]) => {
94
+ let exampleValue = value.default || '';
95
+ if (!exampleValue) {
96
+ if (value.type.includes('[]')) exampleValue = '[]';
97
+ else if (value.type === 'boolean') exampleValue = 'false';
98
+ else if (value.type === 'number') exampleValue = '0';
99
+ else if (value.type === 'string') exampleValue = "'example'";
100
+ else exampleValue = '{}';
101
+ }
102
+ return ` [${key}]="${exampleValue}"`;
103
+ }).join('\n');
104
+
105
+ const outputBindings = outputs.map(([key]) => {
106
+ return ` (${key})="on${key.charAt(0).toUpperCase() + key.slice(1)}($event)"`;
107
+ }).join('\n');
108
+
109
+ const allBindings = [inputBindings, outputBindings].filter(Boolean).join('\n');
110
+
111
+ return `<${data.selector}\n${allBindings}>\n</${data.selector}>`;
112
+ }
113
+
114
+ // Helper to format component data
115
+ function formatComponent(name, data) {
116
+ const inputs = Object.entries(data.inputs || {}).map(([key, value]) => ({
117
+ name: key,
118
+ type: value.type,
119
+ required: value.required,
120
+ default: value.default ? value.default.replace(/^'|'$/g, '') : undefined // Remove quotes from defaults
121
+ }));
122
+
123
+ const outputs = Object.entries(data.outputs || {}).map(([key, value]) => ({
124
+ name: key,
125
+ type: value.type
126
+ }));
127
+
128
+ const interfaces = Object.entries(data.interfaces || {}).map(([key, value]) => ({
129
+ name: key,
130
+ definition: value
131
+ }));
132
+
133
+ const types = Object.entries(data.types || {}).map(([key, value]) => ({
134
+ name: key,
135
+ definition: value
136
+ }));
137
+
138
+ return {
139
+ name: formatComponentName(name),
140
+ selector: data.selector,
141
+ inputs,
142
+ outputs,
143
+ interfaces,
144
+ types,
145
+ category: categorizeComponent(name),
146
+ description: generateDescription(name, data),
147
+ usageExample: generateUsageExample(name, data)
148
+ };
149
+ }
150
+
151
+ // Build components object
152
+ const components = {};
153
+ for (const [name, data] of Object.entries(rawApiData)) {
154
+ components[formatComponentName(name)] = formatComponent(name, data);
155
+ }
156
+
157
+ module.exports = components;
@@ -1,246 +1,223 @@
1
1
  /**
2
2
  * Branintelle UI Library - Component Metadata
3
- * Auto-generated component documentation with props, examples, and patterns
3
+ * AUTO-GENERATED FROM SOURCE CODE - DO NOT MANUALLY EDIT
4
+ *
5
+ * This file contains REAL component APIs extracted directly from TypeScript source files.
6
+ * Every @Input(), @Output(), interface, and type is verified against the actual codebase.
4
7
  */
5
8
 
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
- },
9
+ import { readFileSync } from 'fs';
10
+ import { fileURLToPath } from 'url';
11
+ import { dirname, join } from 'path';
37
12
 
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
- },
13
+ const __filename = fileURLToPath(import.meta.url);
14
+ const __dirname = dirname(__filename);
59
15
 
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
- },
16
+ // Load raw API data
17
+ const rawApiData = JSON.parse(
18
+ readFileSync(join(__dirname, 'real-component-api.cjs.json'), 'utf-8')
19
+ );
94
20
 
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
- },
21
+ // Helper to convert kebab-case to PascalCase
22
+ function formatComponentName(kebabName) {
23
+ return kebabName
24
+ .split('-')
25
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1))
26
+ .join('') + 'Component';
27
+ }
137
28
 
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
- };
29
+ // Categorize components
30
+ function categorizeComponent(name) {
31
+ if (name.includes('button')) return 'Buttons';
32
+ if (name.includes('dropdown') || name.includes('select')) return 'Dropdowns';
33
+ if (name.includes('table')) return 'Tables';
34
+ if (name.includes('pill') || name === 'status-pill') return 'Status & Pills';
35
+ if (name.includes('progress')) return 'Progress';
36
+ if (name.includes('card')) return 'Cards';
37
+ if (name.includes('stepper') || name.includes('stages')) return 'Stages & Workflows';
38
+ if (name.includes('search') || name.includes('filter') || name === 'checklist') return 'Search & Filters';
39
+ if (name === 'accordion') return 'Accordion & Expandable';
40
+ if (name.includes('tooltip')) return 'Tooltips & Overlays';
41
+ if (name === 'confirm-warning') return 'Dialogs & Modals';
42
+ if (name.includes('breadcrumb') || name.includes('tabs')) return 'Navigation & Breadcrumb';
43
+ if (name.includes('user')) return 'User Management';
44
+ if (name.includes('text') || name.includes('header')) return 'Text & Headers';
45
+ if (name.includes('menu')) return 'Filters & Menus';
46
+ return 'Components';
47
+ }
169
48
 
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
- };
49
+ // Generate description
50
+ function generateDescription(name, data) {
51
+ const descriptions = {
52
+ 'custom-button': 'Primary action button with loading state and custom styling',
53
+ 'approve-button': 'Specialized approve button with loading state',
54
+ 'cancel-button': 'Cancel button with configurable styling',
55
+ 'back-button': 'Navigation back button',
56
+ 'button-image': 'Button with image/icon and text',
57
+ 'status-pill': 'Status indicator pill with icon and customizable colors',
58
+ 'pill-badge': 'Badge with icon and text',
59
+ 'pill-box': 'Simple colored text pill',
60
+ 'progress-bar': 'Linear progress bar with numeric values',
61
+ 'segmented-progress-bar': 'Multi-segment progress bar with legend',
62
+ 'vertical-stepper': 'Vertical step indicator for multi-step workflows',
63
+ 'custom-breadcrumb': 'Breadcrumb navigation component',
64
+ 'title-header-subtext': 'Header with title, description, and optional pill',
65
+ 'help-text': 'Help text component',
66
+ 'header-tabs': 'Tabbed navigation with status icons and counts',
67
+ 'search-bar': 'Search input with clear functionality',
68
+ 'checklist': 'Checkbox list with search',
69
+ 'horizontal-card': 'Horizontal card layout with multiple data fields',
70
+ 'info-action-card': 'Action card with image, title, and description',
71
+ 'progress-display-card': 'Card displaying progress information',
72
+ 'profile-image-list': 'List of user profile images with overflow indicator',
73
+ 'single-select-dropdown': 'Single selection dropdown',
74
+ 'multi-select-dropdown': 'Multiple selection dropdown with chips',
75
+ 'dropdown-with-status': 'Dropdown with status indicators',
76
+ 'multiline-option-dropdown': 'Advanced dropdown with multi-line options and search',
77
+ 'expandable-menu-dropdown': 'Collapsible menu with icons',
78
+ 'custom-tooltip': 'Custom tooltip with numeric values',
79
+ 'confirm-warning': 'Confirmation dialog with customizable buttons',
80
+ 'vertical-stages': 'Vertical workflow stages with user assignment',
81
+ 'user-selection': 'User selection component with search and load more',
82
+ 'accordion': 'Accordion menu with submenu items',
83
+ 'geo-tag-filter': 'Multi-tab filter with apply/reset functionality',
84
+ 'table-action-menu': 'Context menu for table actions',
85
+ 'scrollable-data-table': 'Advanced data table with grouping, sorting, search, and infinite scroll',
86
+ 'collapsable-table': 'Budget table with collapsible groups and Excel export',
87
+ 'collapsable-table-small': 'Compact budget table with collapsible groups'
88
+ };
89
+ return descriptions[name] || `${formatComponentName(name)}`;
90
+ }
91
+
92
+ // Generate usage example
93
+ function generateUsageExample(name, data) {
94
+ const inputs = Object.entries(data.inputs || {}).slice(0, 3); // Show first 3 inputs
95
+ const outputs = Object.entries(data.outputs || {}).slice(0, 2); // Show first 2 outputs
96
+
97
+ const inputBindings = inputs.map(([key, value]) => {
98
+ let exampleValue = value.default || '';
99
+ if (!exampleValue) {
100
+ if (value.type.includes('[]')) exampleValue = '[]';
101
+ else if (value.type === 'boolean') exampleValue = 'false';
102
+ else if (value.type === 'number') exampleValue = '0';
103
+ else if (value.type === 'string') exampleValue = "'example'";
104
+ else exampleValue = '{}';
105
+ }
106
+ return ` [${key}]="${exampleValue}"`;
107
+ }).join('\n');
108
+
109
+ const outputBindings = outputs.map(([key]) => {
110
+ return ` (${key})="on${key.charAt(0).toUpperCase() + key.slice(1)}($event)"`;
111
+ }).join('\n');
112
+
113
+ const allBindings = [inputBindings, outputBindings].filter(Boolean).join('\n');
114
+
115
+ return `<${data.selector}\n${allBindings}>\n</${data.selector}>`;
116
+ }
117
+
118
+ // Helper to format component data
119
+ function formatComponent(name, data) {
120
+ const inputs = Object.entries(data.inputs || {}).map(([key, value]) => ({
121
+ name: key,
122
+ type: value.type,
123
+ required: value.required,
124
+ default: value.default ? value.default.replace(/^'|'$/g, '') : undefined // Remove quotes from defaults
125
+ }));
126
+
127
+ const outputs = Object.entries(data.outputs || {}).map(([key, value]) => ({
128
+ name: key,
129
+ type: value.type
130
+ }));
185
131
 
186
- export const USAGE_PATTERNS = {
132
+ const interfaces = Object.entries(data.interfaces || {}).map(([key, value]) => ({
133
+ name: key,
134
+ definition: value
135
+ }));
136
+
137
+ const types = Object.entries(data.types || {}).map(([key, value]) => ({
138
+ name: key,
139
+ definition: value
140
+ }));
141
+
142
+ return {
143
+ name: formatComponentName(name),
144
+ selector: data.selector,
145
+ inputs,
146
+ outputs,
147
+ interfaces,
148
+ types,
149
+ category: categorizeComponent(name),
150
+ description: generateDescription(name, data),
151
+ usageExample: generateUsageExample(name, data)
152
+ };
153
+ }
154
+
155
+ // Build components object
156
+ const COMPONENTS_DATA = {};
157
+ for (const [name, data] of Object.entries(rawApiData)) {
158
+ COMPONENTS_DATA[formatComponentName(name)] = formatComponent(name, data);
159
+ }
160
+
161
+ // Build categories
162
+ const COMPONENT_CATEGORIES = {};
163
+ for (const component of Object.values(COMPONENTS_DATA)) {
164
+ if (!COMPONENT_CATEGORIES[component.category]) {
165
+ COMPONENT_CATEGORIES[component.category] = [];
166
+ }
167
+ COMPONENT_CATEGORIES[component.category].push(component.name);
168
+ }
169
+
170
+ // Usage patterns
171
+ const USAGE_PATTERNS = {
187
172
  '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()">
173
+ title: 'Primary Actions',
174
+ description: 'Use CustomButtonComponent for primary actions and ApproveButtonComponent for approval workflows',
175
+ components: ['CustomButtonComponent', 'ApproveButtonComponent'],
176
+ example: `<bi-custom-button
177
+ [label]="'Save Changes'"
178
+ [showLoader]="isSaving"
179
+ (clickEvent)="onSave($event)">
197
180
  </bi-custom-button>`
198
181
  },
199
182
  '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)">
183
+ title: 'Status Indicators',
184
+ description: 'Use StatusPillComponent for workflow statuses and PillBadgeComponent for counts',
185
+ components: ['StatusPillComponent', 'PillBadgeComponent', 'PillBoxComponent'],
186
+ example: `<bi-status-pill
187
+ [text]="'In Progress'"
188
+ [backgroundColor]="'#F0F2FF'"
189
+ [iconSrc]="'assets/icons/in_progress.svg'">
209
190
  </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
191
  },
222
192
  '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
193
+ title: 'Data Display',
194
+ description: 'Use ScrollableDataTableComponent for large datasets with grouping and sorting',
195
+ components: ['ScrollableDataTableComponent', 'CollapsableTableComponent'],
196
+ example: `<bi-scrollable-data-table
197
+ [data]="tableData"
228
198
  [columns]="columns"
229
- [data]="rows"
230
- [enableSort]="true"
231
- (rowClick)="viewDetails($event)">
199
+ (action)="handleAction($event)">
232
200
  </bi-scrollable-data-table>`
233
201
  },
234
202
  '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)">
203
+ title: 'Form Inputs',
204
+ description: 'Use dropdown components for selection and SearchBarComponent for filtering',
205
+ components: ['SingleSelectDropdownComponent', 'MultiSelectDropdownComponent', 'SearchBarComponent'],
206
+ example: `<bi-single-select-dropdown
207
+ [items]="options"
208
+ [placeholder]="'Select option'"
209
+ (selectionChange)="onSelect($event)">
243
210
  </bi-single-select-dropdown>`
211
+ },
212
+ 'multi-step-forms': {
213
+ title: 'Multi-step Forms',
214
+ description: 'Use VerticalStepperComponent for step-by-step workflows',
215
+ components: ['VerticalStepperComponent', 'VerticalStagesComponent'],
216
+ example: `<bi-vertical-stepper
217
+ [steps]="workflowSteps"
218
+ (stepClicked)="onStepChange($event)">
219
+ </bi-vertical-stepper>`
244
220
  }
245
221
  };
246
222
 
223
+ export { COMPONENTS_DATA, COMPONENT_CATEGORIES, USAGE_PATTERNS };
package/mcp-server.js CHANGED
@@ -184,7 +184,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
184
184
  if (name === 'get_component_docs') {
185
185
  const componentNames = args?.components || [];
186
186
  const docs = componentNames.map(name => {
187
- const comp = COMPONENTS_DATA[name];
187
+ // Normalize component name (accept both "CustomButton" and "CustomButtonComponent")
188
+ let lookupName = name;
189
+ if (!name.endsWith('Component')) {
190
+ lookupName = name + 'Component';
191
+ }
192
+
193
+ const comp = COMPONENTS_DATA[lookupName];
188
194
  if (!comp) return { name, error: 'Component not found' };
189
195
 
190
196
  return {
@@ -192,13 +198,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
192
198
  category: comp.category,
193
199
  selector: comp.selector,
194
200
  description: comp.description,
195
- import: `import { ${comp.name}Component } from '@mohityadav0903/branintelle-ui-lib';`,
201
+ import: `import { ${comp.name} } from '@mohityadav0903/branintelle-ui-lib';`,
196
202
  inputs: comp.inputs,
197
203
  outputs: comp.outputs,
198
204
  interfaces: comp.interfaces,
199
- example: comp.example,
200
- usagePattern: comp.usagePattern,
201
- designTokens: comp.tokens,
205
+ types: comp.types,
206
+ usageExample: comp.usageExample,
202
207
  package: '@mohityadav0903/branintelle-ui-lib',
203
208
  version: '1.7.0'
204
209
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohityadav0903/branintelle-mcp",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "description": "MCP server for Branintelle UI Library - provides component documentation via Model Context Protocol",
6
6
  "main": "mcp-server.js",