@exhaustive-ui/mcp 22.5.0 → 22.6.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/data/cards/accordion.md +5 -2
- package/data/cards/animateonscroll.md +8 -5
- package/data/cards/autocomplete.md +8 -3
- package/data/cards/autofocus.md +4 -2
- package/data/cards/avatar.md +4 -2
- package/data/cards/badge.md +2 -1
- package/data/cards/breadcrumb.md +3 -1
- package/data/cards/button.md +8 -2
- package/data/cards/card.md +2 -1
- package/data/cards/carousel.md +7 -5
- package/data/cards/cascadeselect.md +2 -6
- package/data/cards/chart.md +9 -7
- package/data/cards/checkbox.md +4 -3
- package/data/cards/chip.md +2 -1
- package/data/cards/classnames.md +21 -3
- package/data/cards/colorpicker.md +2 -1
- package/data/cards/confirmdialog.md +35 -5
- package/data/cards/confirmpopup.md +25 -3
- package/data/cards/contextmenu.md +1 -7
- package/data/cards/dataview.md +28 -9
- package/data/cards/datepicker.md +4 -3
- package/data/cards/dialog.md +3 -3
- package/data/cards/divider.md +2 -1
- package/data/cards/dock.md +24 -3
- package/data/cards/dragdrop.md +5 -1
- package/data/cards/drawer.md +3 -3
- package/data/cards/dynamicdialog.md +41 -14
- package/data/cards/editor.md +1 -1
- package/data/cards/fieldset.md +2 -1
- package/data/cards/fileinput.md +1 -1
- package/data/cards/fileupload.md +7 -8
- package/data/cards/floatlabel.md +1 -1
- package/data/cards/fluid.md +7 -5
- package/data/cards/focustrap.md +6 -2
- package/data/cards/galleria.md +18 -25
- package/data/cards/iconfield.md +3 -2
- package/data/cards/iftalabel.md +1 -1
- package/data/cards/image.md +4 -2
- package/data/cards/imagecompare.md +4 -3
- package/data/cards/inplace.md +2 -1
- package/data/cards/inputgroup.md +14 -3
- package/data/cards/inputmask.md +2 -2
- package/data/cards/inputnumber.md +4 -3
- package/data/cards/inputotp.md +2 -2
- package/data/cards/inputtext.md +2 -2
- package/data/cards/keyfilter.md +2 -1
- package/data/cards/knob.md +3 -2
- package/data/cards/listbox.md +5 -3
- package/data/cards/megamenu.md +7 -8
- package/data/cards/menu.md +3 -7
- package/data/cards/menubar.md +3 -7
- package/data/cards/message.md +2 -1
- package/data/cards/metergroup.md +3 -7
- package/data/cards/multiselect.md +5 -9
- package/data/cards/orderlist.md +6 -4
- package/data/cards/organizationchart.md +33 -6
- package/data/cards/overlay.md +2 -1
- package/data/cards/paginator.md +2 -1
- package/data/cards/panel.md +2 -1
- package/data/cards/panelmenu.md +4 -13
- package/data/cards/password.md +6 -3
- package/data/cards/picklist.md +9 -5
- package/data/cards/popover.md +6 -5
- package/data/cards/progressbar.md +4 -3
- package/data/cards/progressspinner.md +2 -1
- package/data/cards/radiobutton.md +4 -3
- package/data/cards/rating.md +1 -1
- package/data/cards/ripple.md +2 -1
- package/data/cards/scrollpanel.md +2 -1
- package/data/cards/scrolltop.md +5 -3
- package/data/cards/select.md +2 -1
- package/data/cards/selectbutton.md +6 -2
- package/data/cards/skeleton.md +2 -1
- package/data/cards/slider.md +4 -3
- package/data/cards/speeddial.md +7 -4
- package/data/cards/splitbutton.md +21 -18
- package/data/cards/splitter.md +2 -1
- package/data/cards/stepper.md +8 -3
- package/data/cards/styleclass.md +4 -2
- package/data/cards/table.md +46 -11
- package/data/cards/tabs.md +2 -1
- package/data/cards/tag.md +2 -1
- package/data/cards/terminal.md +31 -22
- package/data/cards/textarea.md +3 -2
- package/data/cards/tieredmenu.md +1 -6
- package/data/cards/timeline.md +5 -5
- package/data/cards/toast.md +7 -8
- package/data/cards/togglebutton.md +1 -1
- package/data/cards/toggleswitch.md +4 -3
- package/data/cards/toolbar.md +8 -8
- package/data/cards/tooltip.md +2 -1
- package/data/cards/tree.md +3 -6
- package/data/cards/treeselect.md +6 -7
- package/data/cards/treetable.md +52 -31
- package/data/components/accordion.md +31 -23
- package/data/components/animateonscroll.md +18 -15
- package/data/components/autocomplete.md +162 -93
- package/data/components/autofocus.md +9 -7
- package/data/components/avatar.md +56 -43
- package/data/components/badge.md +27 -18
- package/data/components/blockui.md +15 -8
- package/data/components/breadcrumb.md +20 -14
- package/data/components/button.md +121 -94
- package/data/components/card.md +12 -10
- package/data/components/carousel.md +75 -53
- package/data/components/cascadeselect.md +271 -238
- package/data/components/chart.md +88 -74
- package/data/components/checkbox.md +107 -73
- package/data/components/chip.md +20 -16
- package/data/components/classnames.md +22 -4
- package/data/components/colorpicker.md +54 -36
- package/data/components/confirmdialog.md +146 -43
- package/data/components/confirmpopup.md +95 -22
- package/data/components/contextmenu.md +110 -39
- package/data/components/dataview.md +176 -83
- package/data/components/datepicker.md +171 -141
- package/data/components/dialog.md +80 -68
- package/data/components/divider.md +17 -12
- package/data/components/dock.md +63 -27
- package/data/components/dragdrop.md +26 -12
- package/data/components/drawer.md +67 -48
- package/data/components/dynamicdialog.md +22 -13
- package/data/components/editor.md +42 -33
- package/data/components/fieldset.md +20 -17
- package/data/components/fileinput.md +92 -35
- package/data/components/fileupload.md +101 -61
- package/data/components/floatlabel.md +20 -11
- package/data/components/fluid.md +11 -9
- package/data/components/focustrap.md +11 -7
- package/data/components/galleria.md +224 -83
- package/data/components/iconfield.md +23 -15
- package/data/components/iftalabel.md +15 -9
- package/data/components/image.md +31 -26
- package/data/components/imagecompare.md +8 -6
- package/data/components/inplace.md +27 -22
- package/data/components/inputgroup.md +53 -29
- package/data/components/inputmask.md +107 -85
- package/data/components/inputnumber.md +127 -89
- package/data/components/inputotp.md +55 -42
- package/data/components/inputtext.md +72 -50
- package/data/components/keyfilter.md +6 -3
- package/data/components/knob.md +70 -58
- package/data/components/listbox.md +171 -141
- package/data/components/megamenu.md +24 -23
- package/data/components/menu.md +37 -34
- package/data/components/menubar.md +27 -22
- package/data/components/message.md +44 -32
- package/data/components/metergroup.md +48 -17
- package/data/components/multiselect.md +232 -168
- package/data/components/orderlist.md +55 -48
- package/data/components/organizationchart.md +182 -13
- package/data/components/overlay.md +31 -26
- package/data/components/paginator.md +49 -34
- package/data/components/panel.md +23 -19
- package/data/components/panelmenu.md +51 -25
- package/data/components/password.md +104 -91
- package/data/components/picklist.md +92 -70
- package/data/components/popover.md +68 -46
- package/data/components/progressbar.md +28 -22
- package/data/components/progressspinner.md +13 -11
- package/data/components/radiobutton.md +69 -35
- package/data/components/rating.md +48 -40
- package/data/components/ripple.md +8 -6
- package/data/components/scroller.md +29 -29
- package/data/components/scrollpanel.md +9 -7
- package/data/components/scrolltop.md +20 -18
- package/data/components/select.md +248 -169
- package/data/components/selectbutton.md +118 -56
- package/data/components/skeleton.md +22 -18
- package/data/components/slider.md +73 -49
- package/data/components/speeddial.md +77 -59
- package/data/components/splitbutton.md +354 -329
- package/data/components/splitter.md +22 -18
- package/data/components/stepper.md +38 -21
- package/data/components/styleclass.md +12 -6
- package/data/components/table.md +523 -314
- package/data/components/tabs.md +44 -26
- package/data/components/tag.md +18 -14
- package/data/components/terminal.md +38 -27
- package/data/components/textarea.md +82 -47
- package/data/components/tieredmenu.md +34 -29
- package/data/components/timeline.md +29 -28
- package/data/components/toast.md +115 -57
- package/data/components/togglebutton.md +53 -39
- package/data/components/toggleswitch.md +41 -28
- package/data/components/toolbar.md +19 -18
- package/data/components/tooltip.md +43 -32
- package/data/components/tree.md +114 -81
- package/data/components/treeselect.md +176 -174
- package/data/components/treetable.md +1250 -1045
- package/data/components.json +4122 -4080
- package/data/llms-full.txt +8784 -6249
- package/data/manifest.json +154 -15
- package/data/pages/tailwind.md +20 -10
- package/data/snapshot.json +2 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/data/components/tabs.md
CHANGED
|
@@ -50,7 +50,8 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
50
50
|
standalone: true,
|
|
51
51
|
imports: [TabsModule]
|
|
52
52
|
})
|
|
53
|
-
export class TabsBasicDemo {
|
|
53
|
+
export class TabsBasicDemo {
|
|
54
|
+
}
|
|
54
55
|
```
|
|
55
56
|
|
|
56
57
|
## Controlled
|
|
@@ -59,8 +60,8 @@ Tabs can be controlled programmatically using value property as a model.
|
|
|
59
60
|
|
|
60
61
|
```typescript
|
|
61
62
|
import { Component } from '@angular/core';
|
|
62
|
-
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
63
63
|
import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
64
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
64
65
|
|
|
65
66
|
@Component({
|
|
66
67
|
template: `
|
|
@@ -101,7 +102,7 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
101
102
|
</div>
|
|
102
103
|
`,
|
|
103
104
|
standalone: true,
|
|
104
|
-
imports: [
|
|
105
|
+
imports: [TabsModule, ButtonModule]
|
|
105
106
|
})
|
|
106
107
|
export class TabsControlledDemo {
|
|
107
108
|
value: number = 0;
|
|
@@ -114,9 +115,9 @@ Custom content for a tab is defined with the default ng-content.
|
|
|
114
115
|
|
|
115
116
|
```typescript
|
|
116
117
|
import { Component } from '@angular/core';
|
|
118
|
+
import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
117
119
|
import { AvatarModule } from '@exhaustive-ui/core/avatar';
|
|
118
120
|
import { BadgeModule } from '@exhaustive-ui/core/badge';
|
|
119
|
-
import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
120
121
|
|
|
121
122
|
@Component({
|
|
122
123
|
template: `
|
|
@@ -127,15 +128,15 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
127
128
|
<i class="pi pi-minus"></i>
|
|
128
129
|
</ng-template>
|
|
129
130
|
<p-tab value="0" class="flex items-center gap-2!">
|
|
130
|
-
<p-avatar image="https://exhaustive-ui.com/demo/avatar/amyelsner.png" shape="circle" />
|
|
131
|
+
<p-avatar image="https://exhaustive-ui.com/demo/avatar/amyelsner.png" ariaLabel="Amy Elsner" shape="circle" />
|
|
131
132
|
<span class="font-bold whitespace-nowrap">Amy Elsner</span>
|
|
132
133
|
</p-tab>
|
|
133
134
|
<p-tab value="1" class="flex items-center gap-2!">
|
|
134
|
-
<p-avatar image="https://exhaustive-ui.com/demo/avatar/onyamalimba.png" shape="circle" />
|
|
135
|
+
<p-avatar image="https://exhaustive-ui.com/demo/avatar/onyamalimba.png" ariaLabel="Onyama Limba" shape="circle" />
|
|
135
136
|
<span class="font-bold whitespace-nowrap">Onyama Limba</span>
|
|
136
137
|
</p-tab>
|
|
137
138
|
<p-tab value="2" class="flex items-center gap-2!">
|
|
138
|
-
<p-avatar image="https://exhaustive-ui.com/demo/avatar/ionibowcher.png" shape="circle" />
|
|
139
|
+
<p-avatar image="https://exhaustive-ui.com/demo/avatar/ionibowcher.png" ariaLabel="Ioni Bowcher" shape="circle" />
|
|
139
140
|
<span class="font-bold whitespace-nowrap">Ioni Bowcher</span>
|
|
140
141
|
<p-badge value="2" />
|
|
141
142
|
</p-tab>
|
|
@@ -168,9 +169,10 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
168
169
|
</div>
|
|
169
170
|
`,
|
|
170
171
|
standalone: true,
|
|
171
|
-
imports: [AvatarModule, BadgeModule
|
|
172
|
+
imports: [TabsModule, AvatarModule, BadgeModule]
|
|
172
173
|
})
|
|
173
|
-
export class TabsCustomtemplateDemo {
|
|
174
|
+
export class TabsCustomtemplateDemo {
|
|
175
|
+
}
|
|
174
176
|
```
|
|
175
177
|
|
|
176
178
|
## Disabled
|
|
@@ -218,7 +220,8 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
218
220
|
standalone: true,
|
|
219
221
|
imports: [TabsModule]
|
|
220
222
|
})
|
|
221
|
-
export class TabsDisabledDemo {
|
|
223
|
+
export class TabsDisabledDemo {
|
|
224
|
+
}
|
|
222
225
|
```
|
|
223
226
|
|
|
224
227
|
## Dynamic
|
|
@@ -227,6 +230,7 @@ Tabs can be generated dynamically using the standard @for block.
|
|
|
227
230
|
|
|
228
231
|
```typescript
|
|
229
232
|
import { Component, OnInit } from '@angular/core';
|
|
233
|
+
import { CommonModule } from '@angular/common';
|
|
230
234
|
import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
231
235
|
|
|
232
236
|
@Component({
|
|
@@ -249,9 +253,11 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
249
253
|
</div>
|
|
250
254
|
`,
|
|
251
255
|
standalone: true,
|
|
252
|
-
imports: [TabsModule]
|
|
256
|
+
imports: [CommonModule, TabsModule]
|
|
253
257
|
})
|
|
254
258
|
export class TabsDynamicDemo implements OnInit {
|
|
259
|
+
tabs: { title: string; value: string; content: string }[] = [];
|
|
260
|
+
|
|
255
261
|
ngOnInit() {
|
|
256
262
|
this.tabs = [
|
|
257
263
|
{ title: 'Tab 1', value: '0', content: 'Tab 1 Content' },
|
|
@@ -303,7 +309,8 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
303
309
|
standalone: true,
|
|
304
310
|
imports: [TabsModule]
|
|
305
311
|
})
|
|
306
|
-
export class TabsLazyDemo {
|
|
312
|
+
export class TabsLazyDemo {
|
|
313
|
+
}
|
|
307
314
|
```
|
|
308
315
|
|
|
309
316
|
## Scrollable
|
|
@@ -312,6 +319,7 @@ Adding scrollable property displays navigational buttons at each side to scroll
|
|
|
312
319
|
|
|
313
320
|
```typescript
|
|
314
321
|
import { Component } from '@angular/core';
|
|
322
|
+
import { CommonModule } from '@angular/common';
|
|
315
323
|
import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
316
324
|
|
|
317
325
|
@Component({
|
|
@@ -336,10 +344,14 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
336
344
|
</div>
|
|
337
345
|
`,
|
|
338
346
|
standalone: true,
|
|
339
|
-
imports: [TabsModule]
|
|
347
|
+
imports: [CommonModule, TabsModule]
|
|
340
348
|
})
|
|
341
349
|
export class TabsScrollableDemo {
|
|
342
|
-
scrollableTabs: any[]
|
|
350
|
+
scrollableTabs: any[] = Array.from({ length: 50 }, (_, i) => ({
|
|
351
|
+
title: `Tab ${i + 1}`,
|
|
352
|
+
content: `Tab ${i + 1} Content`,
|
|
353
|
+
value: `${i}`
|
|
354
|
+
}));
|
|
343
355
|
}
|
|
344
356
|
```
|
|
345
357
|
|
|
@@ -349,6 +361,7 @@ A navigation menu is implemented using tabs without the panels where the content
|
|
|
349
361
|
|
|
350
362
|
```typescript
|
|
351
363
|
import { Component } from '@angular/core';
|
|
364
|
+
import { CommonModule } from '@angular/common';
|
|
352
365
|
import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
353
366
|
|
|
354
367
|
@Component({
|
|
@@ -368,10 +381,15 @@ import { TabsModule } from '@exhaustive-ui/core/tabs';
|
|
|
368
381
|
</div>
|
|
369
382
|
`,
|
|
370
383
|
standalone: true,
|
|
371
|
-
imports: [TabsModule]
|
|
384
|
+
imports: [CommonModule, TabsModule]
|
|
372
385
|
})
|
|
373
386
|
export class TabsTabmenuDemo {
|
|
374
|
-
tabs
|
|
387
|
+
tabs = [
|
|
388
|
+
{ route: 'dashboard', label: 'Dashboard', icon: 'pi pi-home' },
|
|
389
|
+
{ route: 'transactions', label: 'Transactions', icon: 'pi pi-chart-line' },
|
|
390
|
+
{ route: 'products', label: 'Products', icon: 'pi pi-list' },
|
|
391
|
+
{ route: 'messages', label: 'Messages', icon: 'pi pi-inbox' }
|
|
392
|
+
];
|
|
375
393
|
}
|
|
376
394
|
```
|
|
377
395
|
|
|
@@ -383,16 +401,16 @@ Tabs facilitates seamless switching between different views.
|
|
|
383
401
|
|
|
384
402
|
| Name | Type | Default | Description |
|
|
385
403
|
|------|------|---------|-------------|
|
|
386
|
-
| dt |
|
|
387
|
-
| unstyled |
|
|
388
|
-
| pt |
|
|
389
|
-
| ptOptions |
|
|
390
|
-
| value |
|
|
391
|
-
| scrollable |
|
|
392
|
-
| lazy |
|
|
393
|
-
| selectOnFocus |
|
|
394
|
-
| showNavigators |
|
|
395
|
-
| tabindex |
|
|
404
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
405
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
406
|
+
| pt | TabsPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
407
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
408
|
+
| value | string \| number | undefined | Value of the active tab. |
|
|
409
|
+
| scrollable | boolean | false | When specified, enables horizontal and/or vertical scrolling. |
|
|
410
|
+
| lazy | boolean | false | When enabled, tabs are not rendered until activation. |
|
|
411
|
+
| selectOnFocus | boolean | false | When enabled, the focused tab is activated. |
|
|
412
|
+
| showNavigators | boolean | true | Whether to display navigation buttons in container when scrollable is enabled. |
|
|
413
|
+
| tabindex | number | 0 | Tabindex of the tab buttons. |
|
|
396
414
|
|
|
397
415
|
## Pass Through Options
|
|
398
416
|
|
package/data/components/tag.md
CHANGED
|
@@ -23,7 +23,8 @@ import { TagModule } from '@exhaustive-ui/core/tag';
|
|
|
23
23
|
standalone: true,
|
|
24
24
|
imports: [TagModule]
|
|
25
25
|
})
|
|
26
|
-
export class TagBasicDemo {
|
|
26
|
+
export class TagBasicDemo {
|
|
27
|
+
}
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
## Icon
|
|
@@ -49,7 +50,8 @@ import { TagModule } from '@exhaustive-ui/core/tag';
|
|
|
49
50
|
standalone: true,
|
|
50
51
|
imports: [TagModule]
|
|
51
52
|
})
|
|
52
|
-
export class TagIconDemo {
|
|
53
|
+
export class TagIconDemo {
|
|
54
|
+
}
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
## Pill
|
|
@@ -75,7 +77,8 @@ import { TagModule } from '@exhaustive-ui/core/tag';
|
|
|
75
77
|
standalone: true,
|
|
76
78
|
imports: [TagModule]
|
|
77
79
|
})
|
|
78
|
-
export class TagPillDemo {
|
|
80
|
+
export class TagPillDemo {
|
|
81
|
+
}
|
|
79
82
|
```
|
|
80
83
|
|
|
81
84
|
## Severity
|
|
@@ -101,7 +104,8 @@ import { TagModule } from '@exhaustive-ui/core/tag';
|
|
|
101
104
|
standalone: true,
|
|
102
105
|
imports: [TagModule]
|
|
103
106
|
})
|
|
104
|
-
export class TagSeverityDemo {
|
|
107
|
+
export class TagSeverityDemo {
|
|
108
|
+
}
|
|
105
109
|
```
|
|
106
110
|
|
|
107
111
|
## Template
|
|
@@ -111,7 +115,6 @@ Children of the component are passed as the content for templating.
|
|
|
111
115
|
```typescript
|
|
112
116
|
import { Component } from '@angular/core';
|
|
113
117
|
import { TagModule } from '@exhaustive-ui/core/tag';
|
|
114
|
-
import { Country } from '@/domain/customer';
|
|
115
118
|
|
|
116
119
|
@Component({
|
|
117
120
|
template: `
|
|
@@ -127,7 +130,8 @@ import { Country } from '@/domain/customer';
|
|
|
127
130
|
standalone: true,
|
|
128
131
|
imports: [TagModule]
|
|
129
132
|
})
|
|
130
|
-
export class TagTemplateDemo {
|
|
133
|
+
export class TagTemplateDemo {
|
|
134
|
+
}
|
|
131
135
|
```
|
|
132
136
|
|
|
133
137
|
## Tag
|
|
@@ -138,14 +142,14 @@ Tag component is used to categorize content.
|
|
|
138
142
|
|
|
139
143
|
| Name | Type | Default | Description |
|
|
140
144
|
|------|------|---------|-------------|
|
|
141
|
-
| dt |
|
|
142
|
-
| unstyled |
|
|
143
|
-
| pt |
|
|
144
|
-
| ptOptions |
|
|
145
|
-
| severity |
|
|
146
|
-
| value |
|
|
147
|
-
| icon |
|
|
148
|
-
| rounded |
|
|
145
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
146
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
147
|
+
| pt | TagPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
148
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
149
|
+
| severity | BadgeSeverity | - | Severity type of the tag. |
|
|
150
|
+
| value | string | - | Value to display inside the tag. |
|
|
151
|
+
| icon | string | - | Icon of the tag to display next to the value. |
|
|
152
|
+
| rounded | boolean | - | Whether the corners of the tag are rounded. |
|
|
149
153
|
|
|
150
154
|
### Templates
|
|
151
155
|
|
|
@@ -11,8 +11,10 @@ Screen Reader Terminal component has an input element that can be described with
|
|
|
11
11
|
Commands are processed using observables via the TerminalService . Import this service into your component and subscribe to commandHandler to process commands by sending replies with sendResponse function.
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Component } from '@angular/core';
|
|
14
|
+
import { Component, OnDestroy, inject } from '@angular/core';
|
|
15
|
+
import { TerminalService } from '@exhaustive-ui/core/terminal';
|
|
15
16
|
import { TerminalModule } from '@exhaustive-ui/core/terminal';
|
|
17
|
+
import { Subscription } from 'rxjs';
|
|
16
18
|
|
|
17
19
|
@Component({
|
|
18
20
|
template: `
|
|
@@ -22,31 +24,38 @@ import { TerminalModule } from '@exhaustive-ui/core/terminal';
|
|
|
22
24
|
</div>
|
|
23
25
|
`,
|
|
24
26
|
standalone: true,
|
|
25
|
-
imports: [TerminalModule]
|
|
27
|
+
imports: [TerminalModule],
|
|
28
|
+
providers: [TerminalService]
|
|
26
29
|
})
|
|
27
|
-
export class TerminalBasicDemo {
|
|
30
|
+
export class TerminalBasicDemo implements OnDestroy {
|
|
31
|
+
private terminalService = inject(TerminalService);
|
|
32
|
+
|
|
28
33
|
subscription: Subscription;
|
|
29
34
|
|
|
30
35
|
constructor() {
|
|
31
36
|
this.subscription = this.terminalService.commandHandler.subscribe((text) => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
let response;
|
|
38
|
+
let argsIndex = text.indexOf(' ');
|
|
39
|
+
let command = argsIndex !== -1 ? text.substring(0, argsIndex) : text;
|
|
40
|
+
|
|
41
|
+
switch (command) {
|
|
42
|
+
case 'date':
|
|
43
|
+
response = 'Today is ' + new Date().toDateString();
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case 'greet':
|
|
47
|
+
response = 'Hola ' + text.substring(argsIndex + 1);
|
|
48
|
+
break;
|
|
49
|
+
|
|
50
|
+
case 'random':
|
|
51
|
+
response = Math.floor(Math.random() * 100);
|
|
52
|
+
break;
|
|
53
|
+
|
|
54
|
+
default:
|
|
55
|
+
response = 'Unknown command: ' + command;
|
|
56
|
+
}
|
|
57
|
+
this.terminalService.sendResponse(response);
|
|
58
|
+
});
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
ngOnDestroy() {
|
|
@@ -65,12 +74,14 @@ Terminal is a text based user interface.
|
|
|
65
74
|
|
|
66
75
|
| Name | Type | Default | Description |
|
|
67
76
|
|------|------|---------|-------------|
|
|
68
|
-
| dt |
|
|
69
|
-
| unstyled |
|
|
70
|
-
| pt |
|
|
71
|
-
| ptOptions |
|
|
72
|
-
| welcomeMessage |
|
|
73
|
-
| prompt |
|
|
77
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
78
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
79
|
+
| pt | TerminalPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
80
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
81
|
+
| welcomeMessage | string | - | Initial text to display on terminal. |
|
|
82
|
+
| prompt | string | - | Prompt text for each command. |
|
|
83
|
+
| ariaLabel | string | - | Defines a string that labels the command input. When neither ariaLabel nor ariaLabelledBy is set, the input is labelled by the prompt text. |
|
|
84
|
+
| ariaLabelledBy | string | - | Establishes relationships between the command input and label(s) where its value should be one or more element IDs. |
|
|
74
85
|
|
|
75
86
|
## Pass Through Options
|
|
76
87
|
|