@mohityadav0903/branintelle-mcp 2.0.1 → 2.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/components-data.cjs +157 -0
- package/components-data.js +207 -1091
- package/mcp-server.js +10 -5
- package/package.json +1 -1
- package/real-component-api.cjs.json +1240 -0
package/components-data.js
CHANGED
|
@@ -1,1107 +1,223 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Branintelle UI Library -
|
|
3
|
-
*
|
|
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.
|
|
4
7
|
*/
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
[
|
|
162
|
-
|
|
163
|
-
</bi-pill-badge>`,
|
|
164
|
-
usagePattern: 'status-indicators',
|
|
165
|
-
tokens: ['--violet-500', '--white']
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
PillBox: {
|
|
169
|
-
name: 'PillBox',
|
|
170
|
-
category: 'Status',
|
|
171
|
-
selector: 'bi-pill-box',
|
|
172
|
-
description: 'Tag-style pill component',
|
|
173
|
-
inputs: {
|
|
174
|
-
text: { type: 'string', required: true, description: 'Pill text' },
|
|
175
|
-
backgroundColor: { type: 'string', required: true, description: 'Background color' },
|
|
176
|
-
textColor: { type: 'string', required: true, description: 'Text color' }
|
|
177
|
-
},
|
|
178
|
-
outputs: {},
|
|
179
|
-
example: `<bi-pill-box
|
|
180
|
-
[text]="'Premium'"
|
|
181
|
-
[backgroundColor]="'#f0f2ff'"
|
|
182
|
-
[textColor]="'#544d7c'">
|
|
183
|
-
</bi-pill-box>`,
|
|
184
|
-
usagePattern: 'status-indicators',
|
|
185
|
-
tokens: ['--selected-low', '--violet-500']
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
// ======================
|
|
189
|
-
// PROGRESS (2)
|
|
190
|
-
// ======================
|
|
191
|
-
ProgressBar: {
|
|
192
|
-
name: 'ProgressBar',
|
|
193
|
-
category: 'Progress',
|
|
194
|
-
selector: 'bi-progress-bar',
|
|
195
|
-
description: 'Linear progress indicator',
|
|
196
|
-
inputs: {
|
|
197
|
-
progress: { type: 'number', required: true, description: 'Progress percentage (0-100)' },
|
|
198
|
-
height: { type: 'string', default: '8px', description: 'Bar height' },
|
|
199
|
-
color: { type: 'string', default: '#544d7c', description: 'Progress bar color' }
|
|
200
|
-
},
|
|
201
|
-
outputs: {},
|
|
202
|
-
example: `<bi-progress-bar
|
|
203
|
-
[progress]="75"
|
|
204
|
-
[height]="'10px'"
|
|
205
|
-
[color]="'#544d7c'">
|
|
206
|
-
</bi-progress-bar>`,
|
|
207
|
-
usagePattern: 'status-indicators',
|
|
208
|
-
tokens: ['--violet-500', '--violet-100']
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
SegmentedProgressBar: {
|
|
212
|
-
name: 'SegmentedProgressBar',
|
|
213
|
-
category: 'Progress',
|
|
214
|
-
selector: 'bi-segmented-progress-bar',
|
|
215
|
-
description: 'Multi-segment progress bar',
|
|
216
|
-
inputs: {
|
|
217
|
-
segments: { type: 'ProgressSegment[]', required: true, description: 'Array of progress segments' },
|
|
218
|
-
height: { type: 'string', default: '8px', description: 'Bar height' }
|
|
219
|
-
},
|
|
220
|
-
outputs: {},
|
|
221
|
-
interfaces: {
|
|
222
|
-
ProgressSegment: `{
|
|
223
|
-
value: number;
|
|
224
|
-
color: string;
|
|
225
|
-
label?: string;
|
|
226
|
-
}`
|
|
227
|
-
},
|
|
228
|
-
example: `<bi-segmented-progress-bar
|
|
229
|
-
[segments]="progressSegments"
|
|
230
|
-
[height]="'12px'">
|
|
231
|
-
</bi-segmented-progress-bar>
|
|
232
|
-
|
|
233
|
-
// Component
|
|
234
|
-
progressSegments = [
|
|
235
|
-
{ value: 30, color: '#2c9148', label: 'Complete' },
|
|
236
|
-
{ value: 50, color: '#544d7c', label: 'In Progress' },
|
|
237
|
-
{ value: 20, color: '#dedfe0', label: 'Remaining' }
|
|
238
|
-
];`,
|
|
239
|
-
usagePattern: 'status-indicators',
|
|
240
|
-
tokens: ['--violet-500', '--positive-high', '--stroke-1']
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
// ======================
|
|
244
|
-
// NAVIGATION (3)
|
|
245
|
-
// ======================
|
|
246
|
-
VerticalStepper: {
|
|
247
|
-
name: 'VerticalStepper',
|
|
248
|
-
category: 'Navigation',
|
|
249
|
-
selector: 'bi-vertical-stepper',
|
|
250
|
-
description: 'Vertical step indicator for multi-step workflows',
|
|
251
|
-
inputs: {
|
|
252
|
-
steps: { type: 'Step[]', required: true, description: 'Array of step objects with label, status, substeps' },
|
|
253
|
-
activeStep: { type: 'number', default: 0, description: 'Currently active step index' }
|
|
254
|
-
},
|
|
255
|
-
outputs: {
|
|
256
|
-
stepClick: { type: 'EventEmitter<number>', description: 'Emitted when step is clicked' }
|
|
257
|
-
},
|
|
258
|
-
interfaces: {
|
|
259
|
-
Step: `{
|
|
260
|
-
label: string;
|
|
261
|
-
status: 'completed' | 'active' | 'pending';
|
|
262
|
-
substeps?: { label: string; status: string }[];
|
|
263
|
-
}`
|
|
264
|
-
},
|
|
265
|
-
example: `<bi-vertical-stepper
|
|
266
|
-
[steps]="workflowSteps"
|
|
267
|
-
[activeStep]="currentStep"
|
|
268
|
-
(stepClick)="onStepChange($event)">
|
|
269
|
-
</bi-vertical-stepper>
|
|
270
|
-
|
|
271
|
-
// Component
|
|
272
|
-
workflowSteps: Step[] = [
|
|
273
|
-
{ label: 'Brief Details', status: 'completed' },
|
|
274
|
-
{ label: 'Requirements', status: 'active' },
|
|
275
|
-
{ label: 'Review', status: 'pending' }
|
|
276
|
-
];`,
|
|
277
|
-
usagePattern: 'multi-step-forms',
|
|
278
|
-
tokens: ['--violet-500', '--positive-high', '--text-300']
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
CustomBreadcrumb: {
|
|
282
|
-
name: 'CustomBreadcrumb',
|
|
283
|
-
category: 'Navigation',
|
|
284
|
-
selector: 'bi-custom-breadcrumb',
|
|
285
|
-
description: 'Breadcrumb navigation component',
|
|
286
|
-
inputs: {
|
|
287
|
-
items: { type: 'string[]', required: true, description: 'Breadcrumb items array' },
|
|
288
|
-
separator: { type: 'string', default: '/', description: 'Separator character' }
|
|
289
|
-
},
|
|
290
|
-
outputs: {
|
|
291
|
-
itemClick: { type: 'EventEmitter<number>', description: 'Breadcrumb item clicked' }
|
|
292
|
-
},
|
|
293
|
-
example: `<bi-custom-breadcrumb
|
|
294
|
-
[items]="['Home', 'Products', 'Details']"
|
|
295
|
-
[separator]="'>'"
|
|
296
|
-
(itemClick)="navigateTo($event)">
|
|
297
|
-
</bi-custom-breadcrumb>`,
|
|
298
|
-
usagePattern: 'navigation',
|
|
299
|
-
tokens: ['--text-300', '--violet-500']
|
|
300
|
-
},
|
|
301
|
-
|
|
302
|
-
HeaderTabs: {
|
|
303
|
-
name: 'HeaderTabs',
|
|
304
|
-
category: 'Navigation',
|
|
305
|
-
selector: 'bi-header-tabs',
|
|
306
|
-
description: 'Tab navigation with status counts',
|
|
307
|
-
inputs: {
|
|
308
|
-
tabs: { type: 'StatusItem[]', required: true, description: 'Array of tab items with counts' },
|
|
309
|
-
activeTab: { type: 'number', default: 0, description: 'Active tab index' }
|
|
310
|
-
},
|
|
311
|
-
outputs: {
|
|
312
|
-
tabChange: { type: 'EventEmitter<number>', description: 'Tab changed event' }
|
|
313
|
-
},
|
|
314
|
-
interfaces: {
|
|
315
|
-
StatusItem: `{
|
|
316
|
-
label: string;
|
|
317
|
-
count?: number;
|
|
318
|
-
status?: string;
|
|
319
|
-
}`
|
|
320
|
-
},
|
|
321
|
-
example: `<bi-header-tabs
|
|
322
|
-
[tabs]="statusTabs"
|
|
323
|
-
[activeTab]="0"
|
|
324
|
-
(tabChange)="onTabChange($event)">
|
|
325
|
-
</bi-header-tabs>
|
|
326
|
-
|
|
327
|
-
// Component
|
|
328
|
-
statusTabs = [
|
|
329
|
-
{ label: 'All', count: 42 },
|
|
330
|
-
{ label: 'Active', count: 15 },
|
|
331
|
-
{ label: 'Completed', count: 27 }
|
|
332
|
-
];`,
|
|
333
|
-
usagePattern: 'navigation',
|
|
334
|
-
tokens: ['--violet-500', '--text-300', '--stroke-1']
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
// ======================
|
|
338
|
-
// TEXT (2)
|
|
339
|
-
// ======================
|
|
340
|
-
TitleHeaderSubtext: {
|
|
341
|
-
name: 'TitleHeaderSubtext',
|
|
342
|
-
category: 'Text',
|
|
343
|
-
selector: 'bi-title-header-subtext',
|
|
344
|
-
description: 'Title with subtitle component',
|
|
345
|
-
inputs: {
|
|
346
|
-
title: { type: 'string', required: true, description: 'Main title text' },
|
|
347
|
-
subtitle: { type: 'string', required: true, description: 'Subtitle text' }
|
|
348
|
-
},
|
|
349
|
-
outputs: {},
|
|
350
|
-
example: `<bi-title-header-subtext
|
|
351
|
-
[title]="'Dashboard'"
|
|
352
|
-
[subtitle]="'Overview of your projects'">
|
|
353
|
-
</bi-title-header-subtext>`,
|
|
354
|
-
usagePattern: 'content',
|
|
355
|
-
tokens: ['--text-600', '--text-300', '--heading-large-size']
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
HelpText: {
|
|
359
|
-
name: 'HelpText',
|
|
360
|
-
category: 'Text',
|
|
361
|
-
selector: 'bi-help-text',
|
|
362
|
-
description: 'Helper text with info icon',
|
|
363
|
-
inputs: {
|
|
364
|
-
text: { type: 'string', required: true, description: 'Help text content' }
|
|
365
|
-
},
|
|
366
|
-
outputs: {},
|
|
367
|
-
example: `<bi-help-text
|
|
368
|
-
[text]="'Enter a valid email address'">
|
|
369
|
-
</bi-help-text>`,
|
|
370
|
-
usagePattern: 'form-inputs',
|
|
371
|
-
tokens: ['--text-300', '--body-small-size']
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
// ======================
|
|
375
|
-
// FORMS (2)
|
|
376
|
-
// ======================
|
|
377
|
-
SearchBar: {
|
|
378
|
-
name: 'SearchBar',
|
|
379
|
-
category: 'Forms',
|
|
380
|
-
selector: 'bi-search-bar',
|
|
381
|
-
description: 'Search input with icon',
|
|
382
|
-
inputs: {
|
|
383
|
-
placeholder: { type: 'string', default: 'Search...', description: 'Placeholder text' },
|
|
384
|
-
value: { type: 'string', required: false, description: 'Search value' }
|
|
385
|
-
},
|
|
386
|
-
outputs: {
|
|
387
|
-
searchChange: { type: 'EventEmitter<string>', description: 'Search value changed' },
|
|
388
|
-
searchSubmit: { type: 'EventEmitter<string>', description: 'Search submitted' }
|
|
389
|
-
},
|
|
390
|
-
example: `<bi-search-bar
|
|
391
|
-
[placeholder]="'Search products...'"
|
|
392
|
-
[value]="searchQuery"
|
|
393
|
-
(searchChange)="onSearch($event)">
|
|
394
|
-
</bi-search-bar>`,
|
|
395
|
-
usagePattern: 'form-inputs',
|
|
396
|
-
tokens: ['--stroke-1', '--text-400', '--body-medium-size']
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
Checklist: {
|
|
400
|
-
name: 'Checklist',
|
|
401
|
-
category: 'Forms',
|
|
402
|
-
selector: 'bi-checklist',
|
|
403
|
-
description: 'Checklist with selectable items',
|
|
404
|
-
inputs: {
|
|
405
|
-
items: { type: 'any[]', required: true, description: 'Checklist items' },
|
|
406
|
-
selectedItems: { type: 'any[]', required: false, description: 'Pre-selected items' }
|
|
407
|
-
},
|
|
408
|
-
outputs: {
|
|
409
|
-
selectionChange: { type: 'EventEmitter<any[]>', description: 'Selection changed' }
|
|
410
|
-
},
|
|
411
|
-
example: `<bi-checklist
|
|
412
|
-
[items]="taskList"
|
|
413
|
-
[selectedItems]="completedTasks"
|
|
414
|
-
(selectionChange)="onTasksChange($event)">
|
|
415
|
-
</bi-checklist>`,
|
|
416
|
-
usagePattern: 'form-inputs',
|
|
417
|
-
tokens: ['--violet-500', '--stroke-1']
|
|
418
|
-
},
|
|
419
|
-
|
|
420
|
-
// ======================
|
|
421
|
-
// CARDS (4)
|
|
422
|
-
// ======================
|
|
423
|
-
HorizontalCard: {
|
|
424
|
-
name: 'HorizontalCard',
|
|
425
|
-
category: 'Cards',
|
|
426
|
-
selector: 'bi-horizontal-card',
|
|
427
|
-
description: 'Horizontal layout card',
|
|
428
|
-
inputs: {
|
|
429
|
-
items: { type: 'HorizontalCardItem[]', required: true, description: 'Card items array' }
|
|
430
|
-
},
|
|
431
|
-
outputs: {
|
|
432
|
-
itemClick: { type: 'EventEmitter<any>', description: 'Card item clicked' }
|
|
433
|
-
},
|
|
434
|
-
interfaces: {
|
|
435
|
-
HorizontalCardItem: `{
|
|
436
|
-
title: string;
|
|
437
|
-
value: string;
|
|
438
|
-
icon?: string;
|
|
439
|
-
}`
|
|
440
|
-
},
|
|
441
|
-
example: `<bi-horizontal-card
|
|
442
|
-
[items]="cardItems"
|
|
443
|
-
(itemClick)="handleClick($event)">
|
|
444
|
-
</bi-horizontal-card>`,
|
|
445
|
-
usagePattern: 'data-display',
|
|
446
|
-
tokens: ['--stroke-1', '--text-500', '--text-300']
|
|
447
|
-
},
|
|
448
|
-
|
|
449
|
-
InfoActionCard: {
|
|
450
|
-
name: 'InfoActionCard',
|
|
451
|
-
category: 'Cards',
|
|
452
|
-
selector: 'bi-info-action-card',
|
|
453
|
-
description: 'Card with action buttons',
|
|
454
|
-
inputs: {
|
|
455
|
-
cardData: { type: 'InfoActionCardInput', required: true, description: 'Card configuration' },
|
|
456
|
-
size: { type: 'CardSize', default: 'medium', description: 'Card size' }
|
|
457
|
-
},
|
|
458
|
-
outputs: {
|
|
459
|
-
actionClick: { type: 'EventEmitter<string>', description: 'Action button clicked' }
|
|
460
|
-
},
|
|
461
|
-
interfaces: {
|
|
462
|
-
InfoActionCardInput: `{
|
|
463
|
-
title: string;
|
|
464
|
-
description: string;
|
|
465
|
-
actions: { label: string; value: string }[];
|
|
466
|
-
}`,
|
|
467
|
-
CardSize: `'small' | 'medium' | 'large'`
|
|
468
|
-
},
|
|
469
|
-
example: `<bi-info-action-card
|
|
470
|
-
[cardData]="{
|
|
471
|
-
title: 'Confirm Action',
|
|
472
|
-
description: 'Are you sure?',
|
|
473
|
-
actions: [{label: 'Confirm', value: 'confirm'}]
|
|
474
|
-
}"
|
|
475
|
-
(actionClick)="onAction($event)">
|
|
476
|
-
</bi-info-action-card>`,
|
|
477
|
-
usagePattern: 'content',
|
|
478
|
-
tokens: ['--stroke-1', '--violet-500']
|
|
479
|
-
},
|
|
480
|
-
|
|
481
|
-
ProgressDisplayCard: {
|
|
482
|
-
name: 'ProgressDisplayCard',
|
|
483
|
-
category: 'Cards',
|
|
484
|
-
selector: 'bi-progress-display-card',
|
|
485
|
-
description: 'Card showing progress information',
|
|
486
|
-
inputs: {
|
|
487
|
-
title: { type: 'string', required: true, description: 'Card title' },
|
|
488
|
-
progress: { type: 'number', required: true, description: 'Progress percentage' },
|
|
489
|
-
description: { type: 'string', required: false, description: 'Additional description' }
|
|
490
|
-
},
|
|
491
|
-
outputs: {},
|
|
492
|
-
example: `<bi-progress-display-card
|
|
493
|
-
[title]="'Project Completion'"
|
|
494
|
-
[progress]="75"
|
|
495
|
-
[description]="'3 of 4 tasks done'">
|
|
496
|
-
</bi-progress-display-card>`,
|
|
497
|
-
usagePattern: 'data-display',
|
|
498
|
-
tokens: ['--violet-500', '--text-500']
|
|
499
|
-
},
|
|
500
|
-
|
|
501
|
-
ProfileImageList: {
|
|
502
|
-
name: 'ProfileImageList',
|
|
503
|
-
category: 'Cards',
|
|
504
|
-
selector: 'bi-profile-image-list',
|
|
505
|
-
description: 'Avatar stack component',
|
|
506
|
-
inputs: {
|
|
507
|
-
users: { type: 'ProfileUser[]', required: true, description: 'Array of user profile objects' },
|
|
508
|
-
maxDisplay: { type: 'number', default: 4, description: 'Maximum avatars to display' }
|
|
509
|
-
},
|
|
510
|
-
outputs: {},
|
|
511
|
-
interfaces: {
|
|
512
|
-
ProfileUser: `{
|
|
513
|
-
name: string;
|
|
514
|
-
imageUrl?: string;
|
|
515
|
-
initials?: string;
|
|
516
|
-
}`
|
|
517
|
-
},
|
|
518
|
-
example: `<bi-profile-image-list
|
|
519
|
-
[users]="teamMembers"
|
|
520
|
-
[maxDisplay]="3">
|
|
521
|
-
</bi-profile-image-list>`,
|
|
522
|
-
usagePattern: 'data-display',
|
|
523
|
-
tokens: ['--violet-500', '--white']
|
|
524
|
-
},
|
|
525
|
-
|
|
526
|
-
// ======================
|
|
527
|
-
// DROPDOWNS (5)
|
|
528
|
-
// ======================
|
|
529
|
-
SingleSelectDropdown: {
|
|
530
|
-
name: 'SingleSelectDropdown',
|
|
531
|
-
category: 'Dropdowns',
|
|
532
|
-
selector: 'bi-single-select-dropdown',
|
|
533
|
-
description: 'Single selection dropdown with search',
|
|
534
|
-
inputs: {
|
|
535
|
-
options: { type: 'DropdownItem[]', required: true, description: 'List of dropdown options' },
|
|
536
|
-
selectedValue: { type: 'string', required: false, description: 'Currently selected value' },
|
|
537
|
-
placeholder: { type: 'string', default: 'Select...', description: 'Placeholder text' },
|
|
538
|
-
searchable: { type: 'boolean', default: true, description: 'Enable search functionality' }
|
|
539
|
-
},
|
|
540
|
-
outputs: {
|
|
541
|
-
selectionChange: { type: 'EventEmitter<string>', description: 'Emitted when selection changes' }
|
|
542
|
-
},
|
|
543
|
-
interfaces: {
|
|
544
|
-
DropdownItem: `{
|
|
545
|
-
label: string;
|
|
546
|
-
value: string;
|
|
547
|
-
disabled?: boolean;
|
|
548
|
-
}`
|
|
549
|
-
},
|
|
550
|
-
example: `<bi-single-select-dropdown
|
|
551
|
-
[options]="categoryOptions"
|
|
552
|
-
[selectedValue]="selectedCategory"
|
|
553
|
-
[placeholder]="'Select category'"
|
|
554
|
-
(selectionChange)="onCategoryChange($event)">
|
|
555
|
-
</bi-single-select-dropdown>`,
|
|
556
|
-
usagePattern: 'form-inputs',
|
|
557
|
-
tokens: ['--stroke-1', '--violet-500', '--hover']
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
MultiSelectDropdown: {
|
|
561
|
-
name: 'MultiSelectDropdown',
|
|
562
|
-
category: 'Dropdowns',
|
|
563
|
-
selector: 'bi-multi-select-dropdown',
|
|
564
|
-
description: 'Multi-selection dropdown with chips',
|
|
565
|
-
inputs: {
|
|
566
|
-
options: { type: 'MultiSelectOption[]', required: true, description: 'Dropdown options' },
|
|
567
|
-
selectedValues: { type: 'string[]', required: false, description: 'Selected values array' },
|
|
568
|
-
placeholder: { type: 'string', default: 'Select multiple...', description: 'Placeholder' }
|
|
569
|
-
},
|
|
570
|
-
outputs: {
|
|
571
|
-
selectionChange: { type: 'EventEmitter<string[]>', description: 'Selection array changed' }
|
|
572
|
-
},
|
|
573
|
-
interfaces: {
|
|
574
|
-
MultiSelectOption: `{
|
|
575
|
-
label: string;
|
|
576
|
-
value: string;
|
|
577
|
-
disabled?: boolean;
|
|
578
|
-
}`
|
|
579
|
-
},
|
|
580
|
-
example: `<bi-multi-select-dropdown
|
|
581
|
-
[options]="tagOptions"
|
|
582
|
-
[selectedValues]="selectedTags"
|
|
583
|
-
(selectionChange)="onTagsChange($event)">
|
|
584
|
-
</bi-multi-select-dropdown>`,
|
|
585
|
-
usagePattern: 'form-inputs',
|
|
586
|
-
tokens: ['--stroke-1', '--violet-500', '--selected-low']
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
DropdownWithStatus: {
|
|
590
|
-
name: 'DropdownWithStatus',
|
|
591
|
-
category: 'Dropdowns',
|
|
592
|
-
selector: 'bi-dropdown-with-status',
|
|
593
|
-
description: 'Dropdown with status indicators',
|
|
594
|
-
inputs: {
|
|
595
|
-
options: { type: 'StatusDropdownItem[]', required: true, description: 'Options with status' },
|
|
596
|
-
selectedValue: { type: 'string', required: false, description: 'Selected value' }
|
|
597
|
-
},
|
|
598
|
-
outputs: {
|
|
599
|
-
selectionChange: { type: 'EventEmitter<string>', description: 'Selection changed' }
|
|
600
|
-
},
|
|
601
|
-
interfaces: {
|
|
602
|
-
StatusDropdownItem: `{
|
|
603
|
-
label: string;
|
|
604
|
-
value: string;
|
|
605
|
-
status: string;
|
|
606
|
-
statusColor: string;
|
|
607
|
-
}`
|
|
608
|
-
},
|
|
609
|
-
example: `<bi-dropdown-with-status
|
|
610
|
-
[options]="statusOptions"
|
|
611
|
-
[selectedValue]="currentStatus"
|
|
612
|
-
(selectionChange)="onStatusChange($event)">
|
|
613
|
-
</bi-dropdown-with-status>`,
|
|
614
|
-
usagePattern: 'form-inputs',
|
|
615
|
-
tokens: ['--stroke-1', '--positive-high', '--negative-high']
|
|
616
|
-
},
|
|
617
|
-
|
|
618
|
-
MultilineOptionDropdown: {
|
|
619
|
-
name: 'MultilineOptionDropdown',
|
|
620
|
-
category: 'Dropdowns',
|
|
621
|
-
selector: 'bi-multiline-option-dropdown',
|
|
622
|
-
description: 'Dropdown with multiline options',
|
|
623
|
-
inputs: {
|
|
624
|
-
options: { type: 'MultilineDropdownItem[]', required: true, description: 'Multiline options' },
|
|
625
|
-
selectedValue: { type: 'string', required: false, description: 'Selected value' }
|
|
626
|
-
},
|
|
627
|
-
outputs: {
|
|
628
|
-
selectionChange: { type: 'EventEmitter<string>', description: 'Selection event' }
|
|
629
|
-
},
|
|
630
|
-
interfaces: {
|
|
631
|
-
MultilineDropdownItem: `{
|
|
632
|
-
title: string;
|
|
633
|
-
subtitle: string;
|
|
634
|
-
value: string;
|
|
635
|
-
}`
|
|
636
|
-
},
|
|
637
|
-
example: `<bi-multiline-option-dropdown
|
|
638
|
-
[options]="vendorOptions"
|
|
639
|
-
[selectedValue]="selectedVendor"
|
|
640
|
-
(selectionChange)="onVendorSelect($event)">
|
|
641
|
-
</bi-multiline-option-dropdown>`,
|
|
642
|
-
usagePattern: 'form-inputs',
|
|
643
|
-
tokens: ['--stroke-1', '--text-500', '--text-300']
|
|
644
|
-
},
|
|
645
|
-
|
|
646
|
-
ExpandableMenuDropdown: {
|
|
647
|
-
name: 'ExpandableMenuDropdown',
|
|
648
|
-
category: 'Dropdowns',
|
|
649
|
-
selector: 'bi-expandable-menu-dropdown',
|
|
650
|
-
description: 'Nested menu dropdown with expandable sections',
|
|
651
|
-
inputs: {
|
|
652
|
-
menuItems: { type: 'MenuDropdownItem[]', required: true, description: 'Nested menu structure' }
|
|
653
|
-
},
|
|
654
|
-
outputs: {
|
|
655
|
-
itemSelect: { type: 'EventEmitter<any>', description: 'Menu item selected' }
|
|
656
|
-
},
|
|
657
|
-
interfaces: {
|
|
658
|
-
MenuDropdownItem: `{
|
|
659
|
-
label: string;
|
|
660
|
-
value: string;
|
|
661
|
-
children?: MenuDropdownItem[];
|
|
662
|
-
}`
|
|
663
|
-
},
|
|
664
|
-
example: `<bi-expandable-menu-dropdown
|
|
665
|
-
[menuItems]="navigationMenu"
|
|
666
|
-
(itemSelect)="onMenuSelect($event)">
|
|
667
|
-
</bi-expandable-menu-dropdown>`,
|
|
668
|
-
usagePattern: 'navigation',
|
|
669
|
-
tokens: ['--stroke-1', '--hover', '--violet-500']
|
|
670
|
-
},
|
|
671
|
-
|
|
672
|
-
// ======================
|
|
673
|
-
// OVERLAYS (2)
|
|
674
|
-
// ======================
|
|
675
|
-
CustomTooltip: {
|
|
676
|
-
name: 'CustomTooltip',
|
|
677
|
-
category: 'Overlays',
|
|
678
|
-
selector: 'bi-custom-tooltip',
|
|
679
|
-
description: 'Customizable tooltip component',
|
|
680
|
-
inputs: {
|
|
681
|
-
text: { type: 'string', required: true, description: 'Tooltip text' },
|
|
682
|
-
position: { type: 'string', default: 'top', description: 'Tooltip position' }
|
|
683
|
-
},
|
|
684
|
-
outputs: {},
|
|
685
|
-
example: `<bi-custom-tooltip
|
|
686
|
-
[text]="'Click to edit'"
|
|
687
|
-
[position]="'right'">
|
|
688
|
-
<button>Edit</button>
|
|
689
|
-
</bi-custom-tooltip>`,
|
|
690
|
-
usagePattern: 'content',
|
|
691
|
-
tokens: ['--violet-800', '--white', '--body-small-size']
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
ConfirmWarning: {
|
|
695
|
-
name: 'ConfirmWarning',
|
|
696
|
-
category: 'Overlays',
|
|
697
|
-
selector: 'bi-confirm-warning',
|
|
698
|
-
description: 'Confirmation dialog with warning',
|
|
699
|
-
inputs: {
|
|
700
|
-
title: { type: 'string', required: true, description: 'Dialog title' },
|
|
701
|
-
message: { type: 'string', required: true, description: 'Warning message' },
|
|
702
|
-
confirmLabel: { type: 'string', default: 'Confirm', description: 'Confirm button label' },
|
|
703
|
-
cancelLabel: { type: 'string', default: 'Cancel', description: 'Cancel button label' }
|
|
704
|
-
},
|
|
705
|
-
outputs: {
|
|
706
|
-
confirm: { type: 'EventEmitter<void>', description: 'User confirmed' },
|
|
707
|
-
cancel: { type: 'EventEmitter<void>', description: 'User cancelled' }
|
|
708
|
-
},
|
|
709
|
-
example: `<bi-confirm-warning
|
|
710
|
-
[title]="'Delete Item'"
|
|
711
|
-
[message]="'This action cannot be undone'"
|
|
712
|
-
(confirm)="deleteItem()"
|
|
713
|
-
(cancel)="closeDialog()">
|
|
714
|
-
</bi-confirm-warning>`,
|
|
715
|
-
usagePattern: 'content',
|
|
716
|
-
tokens: ['--negative-high', '--stroke-1']
|
|
717
|
-
},
|
|
718
|
-
|
|
719
|
-
// ======================
|
|
720
|
-
// WORKFLOWS (3)
|
|
721
|
-
// ======================
|
|
722
|
-
VerticalStages: {
|
|
723
|
-
name: 'VerticalStages',
|
|
724
|
-
category: 'Workflows',
|
|
725
|
-
selector: 'bi-vertical-stages',
|
|
726
|
-
description: 'Vertical stage indicator for workflows',
|
|
727
|
-
inputs: {
|
|
728
|
-
stages: { type: 'StageItem[]', required: true, description: 'Workflow stages' },
|
|
729
|
-
currentStage: { type: 'number', default: 0, description: 'Current stage index' }
|
|
730
|
-
},
|
|
731
|
-
outputs: {},
|
|
732
|
-
interfaces: {
|
|
733
|
-
StageItem: `{
|
|
734
|
-
label: string;
|
|
735
|
-
status: 'completed' | 'current' | 'pending';
|
|
736
|
-
}`
|
|
737
|
-
},
|
|
738
|
-
example: `<bi-vertical-stages
|
|
739
|
-
[stages]="workflowStages"
|
|
740
|
-
[currentStage]="2">
|
|
741
|
-
</bi-vertical-stages>`,
|
|
742
|
-
usagePattern: 'multi-step-forms',
|
|
743
|
-
tokens: ['--violet-500', '--positive-high', '--text-300']
|
|
744
|
-
},
|
|
745
|
-
|
|
746
|
-
UserSelection: {
|
|
747
|
-
name: 'UserSelection',
|
|
748
|
-
category: 'Workflows',
|
|
749
|
-
selector: 'bi-user-selection',
|
|
750
|
-
description: 'User selection component with search',
|
|
751
|
-
inputs: {
|
|
752
|
-
users: { type: 'UserSelectionUser[]', required: true, description: 'Available users' },
|
|
753
|
-
selectedUsers: { type: 'any[]', required: false, description: 'Pre-selected users' }
|
|
754
|
-
},
|
|
755
|
-
outputs: {
|
|
756
|
-
selectionChange: { type: 'EventEmitter<any[]>', description: 'User selection changed' }
|
|
757
|
-
},
|
|
758
|
-
interfaces: {
|
|
759
|
-
UserSelectionUser: `{
|
|
760
|
-
id: string;
|
|
761
|
-
name: string;
|
|
762
|
-
email: string;
|
|
763
|
-
avatar?: string;
|
|
764
|
-
}`
|
|
765
|
-
},
|
|
766
|
-
example: `<bi-user-selection
|
|
767
|
-
[users]="allUsers"
|
|
768
|
-
[selectedUsers]="assignedUsers"
|
|
769
|
-
(selectionChange)="onUsersChange($event)">
|
|
770
|
-
</bi-user-selection>`,
|
|
771
|
-
usagePattern: 'form-inputs',
|
|
772
|
-
tokens: ['--stroke-1', '--violet-500']
|
|
773
|
-
},
|
|
774
|
-
|
|
775
|
-
Accordion: {
|
|
776
|
-
name: 'Accordion',
|
|
777
|
-
category: 'Workflows',
|
|
778
|
-
selector: 'bi-accordion',
|
|
779
|
-
description: 'Collapsible accordion component',
|
|
780
|
-
inputs: {
|
|
781
|
-
items: { type: 'AccordionMenu[]', required: true, description: 'Accordion items' },
|
|
782
|
-
config: { type: 'AccordionConfig', required: false, description: 'Accordion configuration' }
|
|
783
|
-
},
|
|
784
|
-
outputs: {
|
|
785
|
-
itemClick: { type: 'EventEmitter<any>', description: 'Accordion item clicked' }
|
|
786
|
-
},
|
|
787
|
-
interfaces: {
|
|
788
|
-
AccordionMenu: `{
|
|
789
|
-
label: string;
|
|
790
|
-
value: string;
|
|
791
|
-
children?: AccordionSubmenu[];
|
|
792
|
-
}`,
|
|
793
|
-
AccordionSubmenu: `{
|
|
794
|
-
label: string;
|
|
795
|
-
value: string;
|
|
796
|
-
}`,
|
|
797
|
-
AccordionConfig: `{
|
|
798
|
-
allowMultiple?: boolean;
|
|
799
|
-
expandFirst?: boolean;
|
|
800
|
-
}`
|
|
801
|
-
},
|
|
802
|
-
example: `<bi-accordion
|
|
803
|
-
[items]="menuItems"
|
|
804
|
-
[config]="{allowMultiple: false}"
|
|
805
|
-
(itemClick)="onItemSelect($event)">
|
|
806
|
-
</bi-accordion>`,
|
|
807
|
-
usagePattern: 'navigation',
|
|
808
|
-
tokens: ['--stroke-1', '--hover', '--violet-500']
|
|
809
|
-
},
|
|
810
|
-
|
|
811
|
-
// ======================
|
|
812
|
-
// FILTERS (2)
|
|
813
|
-
// ======================
|
|
814
|
-
GeoTagFilter: {
|
|
815
|
-
name: 'GeoTagFilter',
|
|
816
|
-
category: 'Filters',
|
|
817
|
-
selector: 'bi-geo-tag-filter',
|
|
818
|
-
description: 'Geographic tag filter with tabs',
|
|
819
|
-
inputs: {
|
|
820
|
-
tabs: { type: 'FilterTab[]', required: true, description: 'Filter tabs' },
|
|
821
|
-
options: { type: 'FilterOption[]', required: true, description: 'Filter options' }
|
|
822
|
-
},
|
|
823
|
-
outputs: {
|
|
824
|
-
filterChange: { type: 'EventEmitter<any>', description: 'Filter selection changed' }
|
|
825
|
-
},
|
|
826
|
-
interfaces: {
|
|
827
|
-
FilterTab: `{
|
|
828
|
-
label: string;
|
|
829
|
-
value: string;
|
|
830
|
-
}`,
|
|
831
|
-
FilterOption: `{
|
|
832
|
-
label: string;
|
|
833
|
-
value: string;
|
|
834
|
-
count?: number;
|
|
835
|
-
}`
|
|
836
|
-
},
|
|
837
|
-
example: `<bi-geo-tag-filter
|
|
838
|
-
[tabs]="regionTabs"
|
|
839
|
-
[options]="locationOptions"
|
|
840
|
-
(filterChange)="onFilterChange($event)">
|
|
841
|
-
</bi-geo-tag-filter>`,
|
|
842
|
-
usagePattern: 'data-display',
|
|
843
|
-
tokens: ['--violet-500', '--stroke-1', '--selected-low']
|
|
844
|
-
},
|
|
845
|
-
|
|
846
|
-
TableActionMenu: {
|
|
847
|
-
name: 'TableActionMenu',
|
|
848
|
-
category: 'Filters',
|
|
849
|
-
selector: 'bi-table-action-menu',
|
|
850
|
-
description: 'Action menu for table rows',
|
|
851
|
-
inputs: {
|
|
852
|
-
actions: { type: 'ActionMenuItem[]', required: true, description: 'Available actions' }
|
|
853
|
-
},
|
|
854
|
-
outputs: {
|
|
855
|
-
actionSelect: { type: 'EventEmitter<string>', description: 'Action selected' }
|
|
856
|
-
},
|
|
857
|
-
interfaces: {
|
|
858
|
-
ActionMenuItem: `{
|
|
859
|
-
label: string;
|
|
860
|
-
value: string;
|
|
861
|
-
icon?: string;
|
|
862
|
-
destructive?: boolean;
|
|
863
|
-
}`
|
|
864
|
-
},
|
|
865
|
-
example: `<bi-table-action-menu
|
|
866
|
-
[actions]="rowActions"
|
|
867
|
-
(actionSelect)="handleAction($event)">
|
|
868
|
-
</bi-table-action-menu>`,
|
|
869
|
-
usagePattern: 'data-display',
|
|
870
|
-
tokens: ['--stroke-1', '--hover', '--negative-high']
|
|
871
|
-
},
|
|
872
|
-
|
|
873
|
-
// ======================
|
|
874
|
-
// TABLES (3)
|
|
875
|
-
// ======================
|
|
876
|
-
ScrollableDataTable: {
|
|
877
|
-
name: 'ScrollableDataTable',
|
|
878
|
-
category: 'Tables',
|
|
879
|
-
selector: 'bi-scrollable-data-table',
|
|
880
|
-
description: 'Feature-rich data table with sorting, filtering, and virtual scrolling',
|
|
881
|
-
inputs: {
|
|
882
|
-
columns: { type: 'TableColumn[]', required: true, description: 'Column definitions' },
|
|
883
|
-
data: { type: 'any[]', required: true, description: 'Table data rows' },
|
|
884
|
-
enableSort: { type: 'boolean', default: true, description: 'Enable column sorting' },
|
|
885
|
-
enableFilter: { type: 'boolean', default: true, description: 'Enable filtering' },
|
|
886
|
-
maxHeight: { type: 'string', default: '500px', description: 'Maximum table height' }
|
|
887
|
-
},
|
|
888
|
-
outputs: {
|
|
889
|
-
rowClick: { type: 'EventEmitter<any>', description: 'Emitted when row is clicked' },
|
|
890
|
-
sortChange: { type: 'EventEmitter<{column: string, direction: string}>', description: 'Sort change event' }
|
|
891
|
-
},
|
|
892
|
-
interfaces: {
|
|
893
|
-
TableColumn: `{
|
|
894
|
-
key: string;
|
|
895
|
-
label: string;
|
|
896
|
-
sortable?: boolean;
|
|
897
|
-
width?: string;
|
|
898
|
-
align?: 'left' | 'center' | 'right';
|
|
899
|
-
}`
|
|
900
|
-
},
|
|
901
|
-
example: `<bi-scrollable-data-table
|
|
902
|
-
[columns]="tableColumns"
|
|
903
|
-
[data]="tableData"
|
|
904
|
-
[enableSort]="true"
|
|
905
|
-
[maxHeight]="'600px'"
|
|
906
|
-
(rowClick)="handleRowClick($event)">
|
|
907
|
-
</bi-scrollable-data-table>
|
|
908
|
-
|
|
909
|
-
// Component
|
|
910
|
-
tableColumns: TableColumn[] = [
|
|
911
|
-
{ key: 'name', label: 'Name', sortable: true },
|
|
912
|
-
{ key: 'status', label: 'Status', width: '120px' },
|
|
913
|
-
{ key: 'amount', label: 'Amount', align: 'right' }
|
|
914
|
-
];`,
|
|
915
|
-
usagePattern: 'data-display',
|
|
916
|
-
tokens: ['--stroke-1', '--hover', '--text-400', '--body-medium-size']
|
|
917
|
-
},
|
|
918
|
-
|
|
919
|
-
CollapsableTable: {
|
|
920
|
-
name: 'CollapsableTable',
|
|
921
|
-
category: 'Tables',
|
|
922
|
-
selector: 'bi-collapsable-table',
|
|
923
|
-
description: 'Budget table with collapsible rows and Excel export',
|
|
924
|
-
inputs: {
|
|
925
|
-
data: { type: 'any', required: true, description: 'Hierarchical table data' },
|
|
926
|
-
columns: { type: 'string[]', required: true, description: 'Month column names' },
|
|
927
|
-
editable: { type: 'boolean', default: true, description: 'Enable inline editing' }
|
|
928
|
-
},
|
|
929
|
-
outputs: {
|
|
930
|
-
dataChange: { type: 'EventEmitter<any>', description: 'Data modified' },
|
|
931
|
-
export: { type: 'EventEmitter<void>', description: 'Export triggered' }
|
|
932
|
-
},
|
|
933
|
-
example: `<bi-collapsable-table
|
|
934
|
-
[data]="budgetData"
|
|
935
|
-
[columns]="monthColumns"
|
|
936
|
-
[editable]="true"
|
|
937
|
-
(dataChange)="onBudgetChange($event)">
|
|
938
|
-
</bi-collapsable-table>`,
|
|
939
|
-
usagePattern: 'data-display',
|
|
940
|
-
tokens: ['--stroke-1', '--violet-100', '--text-400']
|
|
941
|
-
},
|
|
942
|
-
|
|
943
|
-
CollapsableTableSmall: {
|
|
944
|
-
name: 'CollapsableTableSmall',
|
|
945
|
-
category: 'Tables',
|
|
946
|
-
selector: 'bi-collapsable-table-small',
|
|
947
|
-
description: 'Compact collapsible budget table',
|
|
948
|
-
inputs: {
|
|
949
|
-
data: { type: 'any', required: true, description: 'Table data' },
|
|
950
|
-
columns: { type: 'string[]', required: true, description: 'Column headers' },
|
|
951
|
-
compact: { type: 'boolean', default: true, description: 'Use compact layout' }
|
|
952
|
-
},
|
|
953
|
-
outputs: {
|
|
954
|
-
dataChange: { type: 'EventEmitter<any>', description: 'Data updated' }
|
|
955
|
-
},
|
|
956
|
-
example: `<bi-collapsable-table-small
|
|
957
|
-
[data]="compactBudgetData"
|
|
958
|
-
[columns]="quarters"
|
|
959
|
-
(dataChange)="onDataUpdate($event)">
|
|
960
|
-
</bi-collapsable-table-small>`,
|
|
961
|
-
usagePattern: 'data-display',
|
|
962
|
-
tokens: ['--stroke-1', '--violet-100', '--body-small-size']
|
|
9
|
+
import { readFileSync } from 'fs';
|
|
10
|
+
import { fileURLToPath } from 'url';
|
|
11
|
+
import { dirname, join } from 'path';
|
|
12
|
+
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = dirname(__filename);
|
|
15
|
+
|
|
16
|
+
// Load raw API data
|
|
17
|
+
const rawApiData = JSON.parse(
|
|
18
|
+
readFileSync(join(__dirname, 'real-component-api.cjs.json'), 'utf-8')
|
|
19
|
+
);
|
|
20
|
+
|
|
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
|
+
}
|
|
28
|
+
|
|
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
|
+
}
|
|
48
|
+
|
|
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
|
+
}));
|
|
131
|
+
|
|
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] = [];
|
|
963
166
|
}
|
|
964
|
-
|
|
167
|
+
COMPONENT_CATEGORIES[component.category].push(component.name);
|
|
168
|
+
}
|
|
965
169
|
|
|
966
|
-
//
|
|
967
|
-
|
|
968
|
-
'Buttons': ['CustomButton', 'ApproveButton', 'CancelButton', 'BackButton', 'ButtonImage'],
|
|
969
|
-
'Status': ['StatusPill', 'PillBadge', 'PillBox'],
|
|
970
|
-
'Progress': ['ProgressBar', 'SegmentedProgressBar'],
|
|
971
|
-
'Navigation': ['VerticalStepper', 'CustomBreadcrumb', 'HeaderTabs'],
|
|
972
|
-
'Text': ['TitleHeaderSubtext', 'HelpText'],
|
|
973
|
-
'Forms': ['SearchBar', 'Checklist'],
|
|
974
|
-
'Cards': ['HorizontalCard', 'InfoActionCard', 'ProgressDisplayCard', 'ProfileImageList'],
|
|
975
|
-
'Dropdowns': ['SingleSelectDropdown', 'MultiSelectDropdown', 'DropdownWithStatus', 'MultilineOptionDropdown', 'ExpandableMenuDropdown'],
|
|
976
|
-
'Overlays': ['CustomTooltip', 'ConfirmWarning'],
|
|
977
|
-
'Workflows': ['VerticalStages', 'UserSelection', 'Accordion'],
|
|
978
|
-
'Filters': ['GeoTagFilter', 'TableActionMenu'],
|
|
979
|
-
'Tables': ['ScrollableDataTable', 'CollapsableTable', 'CollapsableTableSmall']
|
|
980
|
-
};
|
|
981
|
-
|
|
982
|
-
// Usage patterns with recommendations
|
|
983
|
-
export const USAGE_PATTERNS = {
|
|
170
|
+
// Usage patterns
|
|
171
|
+
const USAGE_PATTERNS = {
|
|
984
172
|
'primary-actions': {
|
|
985
|
-
|
|
986
|
-
description: '
|
|
987
|
-
components: ['
|
|
988
|
-
example:
|
|
989
|
-
|
|
990
|
-
[
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
(onClick)="submitForm()">
|
|
994
|
-
</bi-custom-button>
|
|
995
|
-
|
|
996
|
-
// Approve with confirmation
|
|
997
|
-
<bi-approve-button
|
|
998
|
-
[label]="'Approve Request'"
|
|
999
|
-
[isActive]="canApprove"
|
|
1000
|
-
(onClick)="handleApproval()">
|
|
1001
|
-
</bi-approve-button>`
|
|
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)">
|
|
180
|
+
</bi-custom-button>`
|
|
1002
181
|
},
|
|
1003
182
|
'status-indicators': {
|
|
1004
|
-
|
|
1005
|
-
description: '
|
|
1006
|
-
components: ['
|
|
1007
|
-
example:
|
|
1008
|
-
|
|
1009
|
-
[
|
|
1010
|
-
[
|
|
1011
|
-
|
|
1012
|
-
[statusTextColor]="getStatusTextColor(item.status)">
|
|
1013
|
-
</bi-status-pill>
|
|
1014
|
-
|
|
1015
|
-
// Count badge
|
|
1016
|
-
<bi-pill-badge [count]="notificationCount">
|
|
1017
|
-
</bi-pill-badge>`
|
|
1018
|
-
},
|
|
1019
|
-
'multi-step-forms': {
|
|
1020
|
-
name: 'Multi-Step Forms',
|
|
1021
|
-
description: 'Guided workflows with step indicators and stage tracking',
|
|
1022
|
-
components: ['VerticalStepper', 'VerticalStages'],
|
|
1023
|
-
example: `// Vertical stepper for workflow
|
|
1024
|
-
<bi-vertical-stepper
|
|
1025
|
-
[steps]="formSteps"
|
|
1026
|
-
[activeStep]="currentStepIndex"
|
|
1027
|
-
(stepClick)="navigateToStep($event)">
|
|
1028
|
-
</bi-vertical-stepper>
|
|
1029
|
-
|
|
1030
|
-
// Stages indicator
|
|
1031
|
-
<bi-vertical-stages
|
|
1032
|
-
[stages]="processStages"
|
|
1033
|
-
[currentStage]="activeStage">
|
|
1034
|
-
</bi-vertical-stages>`
|
|
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'">
|
|
190
|
+
</bi-status-pill>`
|
|
1035
191
|
},
|
|
1036
192
|
'data-display': {
|
|
1037
|
-
|
|
1038
|
-
description: '
|
|
1039
|
-
components: ['
|
|
1040
|
-
example:
|
|
1041
|
-
|
|
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"
|
|
1042
198
|
[columns]="columns"
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
(rowClick)="viewDetails($event)">
|
|
1046
|
-
</bi-scrollable-data-table>
|
|
1047
|
-
|
|
1048
|
-
// Collapsible budget table
|
|
1049
|
-
<bi-collapsable-table
|
|
1050
|
-
[data]="budgetData"
|
|
1051
|
-
[columns]="months"
|
|
1052
|
-
[editable]="true"
|
|
1053
|
-
(dataChange)="onBudgetUpdate($event)">
|
|
1054
|
-
</bi-collapsable-table>`
|
|
199
|
+
(action)="handleAction($event)">
|
|
200
|
+
</bi-scrollable-data-table>`
|
|
1055
201
|
},
|
|
1056
202
|
'form-inputs': {
|
|
1057
|
-
|
|
1058
|
-
description: '
|
|
1059
|
-
components: ['
|
|
1060
|
-
example:
|
|
1061
|
-
|
|
1062
|
-
[
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
(selectionChange)="onValueChange($event)">
|
|
1066
|
-
</bi-single-select-dropdown>
|
|
1067
|
-
|
|
1068
|
-
// Multi-select with chips
|
|
1069
|
-
<bi-multi-select-dropdown
|
|
1070
|
-
[options]="tags"
|
|
1071
|
-
[selectedValues]="selectedTags"
|
|
1072
|
-
(selectionChange)="onTagsUpdate($event)">
|
|
1073
|
-
</bi-multi-select-dropdown>`
|
|
1074
|
-
},
|
|
1075
|
-
'navigation': {
|
|
1076
|
-
name: 'Navigation',
|
|
1077
|
-
description: 'Navigation elements like breadcrumbs, tabs, and menus',
|
|
1078
|
-
components: ['CustomBreadcrumb', 'HeaderTabs', 'ExpandableMenuDropdown', 'Accordion'],
|
|
1079
|
-
example: `// Breadcrumb navigation
|
|
1080
|
-
<bi-custom-breadcrumb
|
|
1081
|
-
[items]="['Home', 'Products', 'Details']"
|
|
1082
|
-
(itemClick)="navigateTo($event)">
|
|
1083
|
-
</bi-custom-breadcrumb>
|
|
1084
|
-
|
|
1085
|
-
// Tab navigation
|
|
1086
|
-
<bi-header-tabs
|
|
1087
|
-
[tabs]="tabs"
|
|
1088
|
-
[activeTab]="currentTab"
|
|
1089
|
-
(tabChange)="onTabChange($event)">
|
|
1090
|
-
</bi-header-tabs>`
|
|
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)">
|
|
210
|
+
</bi-single-select-dropdown>`
|
|
1091
211
|
},
|
|
1092
|
-
'
|
|
1093
|
-
|
|
1094
|
-
description: '
|
|
1095
|
-
components: ['
|
|
1096
|
-
example:
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
</bi-title-header-subtext>
|
|
1101
|
-
|
|
1102
|
-
// Tooltip
|
|
1103
|
-
<bi-custom-tooltip [text]="'Click to edit'">
|
|
1104
|
-
<button>Edit</button>
|
|
1105
|
-
</bi-custom-tooltip>`
|
|
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>`
|
|
1106
220
|
}
|
|
1107
221
|
};
|
|
222
|
+
|
|
223
|
+
export { COMPONENTS_DATA, COMPONENT_CATEGORIES, USAGE_PATTERNS };
|