@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.
Files changed (199) hide show
  1. package/data/cards/accordion.md +5 -2
  2. package/data/cards/animateonscroll.md +8 -5
  3. package/data/cards/autocomplete.md +8 -3
  4. package/data/cards/autofocus.md +4 -2
  5. package/data/cards/avatar.md +4 -2
  6. package/data/cards/badge.md +2 -1
  7. package/data/cards/breadcrumb.md +3 -1
  8. package/data/cards/button.md +8 -2
  9. package/data/cards/card.md +2 -1
  10. package/data/cards/carousel.md +7 -5
  11. package/data/cards/cascadeselect.md +2 -6
  12. package/data/cards/chart.md +9 -7
  13. package/data/cards/checkbox.md +4 -3
  14. package/data/cards/chip.md +2 -1
  15. package/data/cards/classnames.md +21 -3
  16. package/data/cards/colorpicker.md +2 -1
  17. package/data/cards/confirmdialog.md +35 -5
  18. package/data/cards/confirmpopup.md +25 -3
  19. package/data/cards/contextmenu.md +1 -7
  20. package/data/cards/dataview.md +28 -9
  21. package/data/cards/datepicker.md +4 -3
  22. package/data/cards/dialog.md +3 -3
  23. package/data/cards/divider.md +2 -1
  24. package/data/cards/dock.md +24 -3
  25. package/data/cards/dragdrop.md +5 -1
  26. package/data/cards/drawer.md +3 -3
  27. package/data/cards/dynamicdialog.md +41 -14
  28. package/data/cards/editor.md +1 -1
  29. package/data/cards/fieldset.md +2 -1
  30. package/data/cards/fileinput.md +1 -1
  31. package/data/cards/fileupload.md +7 -8
  32. package/data/cards/floatlabel.md +1 -1
  33. package/data/cards/fluid.md +7 -5
  34. package/data/cards/focustrap.md +6 -2
  35. package/data/cards/galleria.md +18 -25
  36. package/data/cards/iconfield.md +3 -2
  37. package/data/cards/iftalabel.md +1 -1
  38. package/data/cards/image.md +4 -2
  39. package/data/cards/imagecompare.md +4 -3
  40. package/data/cards/inplace.md +2 -1
  41. package/data/cards/inputgroup.md +14 -3
  42. package/data/cards/inputmask.md +2 -2
  43. package/data/cards/inputnumber.md +4 -3
  44. package/data/cards/inputotp.md +2 -2
  45. package/data/cards/inputtext.md +2 -2
  46. package/data/cards/keyfilter.md +2 -1
  47. package/data/cards/knob.md +3 -2
  48. package/data/cards/listbox.md +5 -3
  49. package/data/cards/megamenu.md +7 -8
  50. package/data/cards/menu.md +3 -7
  51. package/data/cards/menubar.md +3 -7
  52. package/data/cards/message.md +2 -1
  53. package/data/cards/metergroup.md +3 -7
  54. package/data/cards/multiselect.md +5 -9
  55. package/data/cards/orderlist.md +6 -4
  56. package/data/cards/organizationchart.md +33 -6
  57. package/data/cards/overlay.md +2 -1
  58. package/data/cards/paginator.md +2 -1
  59. package/data/cards/panel.md +2 -1
  60. package/data/cards/panelmenu.md +4 -13
  61. package/data/cards/password.md +6 -3
  62. package/data/cards/picklist.md +9 -5
  63. package/data/cards/popover.md +6 -5
  64. package/data/cards/progressbar.md +4 -3
  65. package/data/cards/progressspinner.md +2 -1
  66. package/data/cards/radiobutton.md +4 -3
  67. package/data/cards/rating.md +1 -1
  68. package/data/cards/ripple.md +2 -1
  69. package/data/cards/scrollpanel.md +2 -1
  70. package/data/cards/scrolltop.md +5 -3
  71. package/data/cards/select.md +2 -1
  72. package/data/cards/selectbutton.md +6 -2
  73. package/data/cards/skeleton.md +2 -1
  74. package/data/cards/slider.md +4 -3
  75. package/data/cards/speeddial.md +7 -4
  76. package/data/cards/splitbutton.md +21 -18
  77. package/data/cards/splitter.md +2 -1
  78. package/data/cards/stepper.md +8 -3
  79. package/data/cards/styleclass.md +4 -2
  80. package/data/cards/table.md +46 -11
  81. package/data/cards/tabs.md +2 -1
  82. package/data/cards/tag.md +2 -1
  83. package/data/cards/terminal.md +31 -22
  84. package/data/cards/textarea.md +3 -2
  85. package/data/cards/tieredmenu.md +1 -6
  86. package/data/cards/timeline.md +5 -5
  87. package/data/cards/toast.md +7 -8
  88. package/data/cards/togglebutton.md +1 -1
  89. package/data/cards/toggleswitch.md +4 -3
  90. package/data/cards/toolbar.md +8 -8
  91. package/data/cards/tooltip.md +2 -1
  92. package/data/cards/tree.md +3 -6
  93. package/data/cards/treeselect.md +6 -7
  94. package/data/cards/treetable.md +52 -31
  95. package/data/components/accordion.md +31 -23
  96. package/data/components/animateonscroll.md +18 -15
  97. package/data/components/autocomplete.md +162 -93
  98. package/data/components/autofocus.md +9 -7
  99. package/data/components/avatar.md +56 -43
  100. package/data/components/badge.md +27 -18
  101. package/data/components/blockui.md +15 -8
  102. package/data/components/breadcrumb.md +20 -14
  103. package/data/components/button.md +121 -94
  104. package/data/components/card.md +12 -10
  105. package/data/components/carousel.md +75 -53
  106. package/data/components/cascadeselect.md +271 -238
  107. package/data/components/chart.md +88 -74
  108. package/data/components/checkbox.md +107 -73
  109. package/data/components/chip.md +20 -16
  110. package/data/components/classnames.md +22 -4
  111. package/data/components/colorpicker.md +54 -36
  112. package/data/components/confirmdialog.md +146 -43
  113. package/data/components/confirmpopup.md +95 -22
  114. package/data/components/contextmenu.md +110 -39
  115. package/data/components/dataview.md +176 -83
  116. package/data/components/datepicker.md +171 -141
  117. package/data/components/dialog.md +80 -68
  118. package/data/components/divider.md +17 -12
  119. package/data/components/dock.md +63 -27
  120. package/data/components/dragdrop.md +26 -12
  121. package/data/components/drawer.md +67 -48
  122. package/data/components/dynamicdialog.md +22 -13
  123. package/data/components/editor.md +42 -33
  124. package/data/components/fieldset.md +20 -17
  125. package/data/components/fileinput.md +92 -35
  126. package/data/components/fileupload.md +101 -61
  127. package/data/components/floatlabel.md +20 -11
  128. package/data/components/fluid.md +11 -9
  129. package/data/components/focustrap.md +11 -7
  130. package/data/components/galleria.md +224 -83
  131. package/data/components/iconfield.md +23 -15
  132. package/data/components/iftalabel.md +15 -9
  133. package/data/components/image.md +31 -26
  134. package/data/components/imagecompare.md +8 -6
  135. package/data/components/inplace.md +27 -22
  136. package/data/components/inputgroup.md +53 -29
  137. package/data/components/inputmask.md +107 -85
  138. package/data/components/inputnumber.md +127 -89
  139. package/data/components/inputotp.md +55 -42
  140. package/data/components/inputtext.md +72 -50
  141. package/data/components/keyfilter.md +6 -3
  142. package/data/components/knob.md +70 -58
  143. package/data/components/listbox.md +171 -141
  144. package/data/components/megamenu.md +24 -23
  145. package/data/components/menu.md +37 -34
  146. package/data/components/menubar.md +27 -22
  147. package/data/components/message.md +44 -32
  148. package/data/components/metergroup.md +48 -17
  149. package/data/components/multiselect.md +232 -168
  150. package/data/components/orderlist.md +55 -48
  151. package/data/components/organizationchart.md +182 -13
  152. package/data/components/overlay.md +31 -26
  153. package/data/components/paginator.md +49 -34
  154. package/data/components/panel.md +23 -19
  155. package/data/components/panelmenu.md +51 -25
  156. package/data/components/password.md +104 -91
  157. package/data/components/picklist.md +92 -70
  158. package/data/components/popover.md +68 -46
  159. package/data/components/progressbar.md +28 -22
  160. package/data/components/progressspinner.md +13 -11
  161. package/data/components/radiobutton.md +69 -35
  162. package/data/components/rating.md +48 -40
  163. package/data/components/ripple.md +8 -6
  164. package/data/components/scroller.md +29 -29
  165. package/data/components/scrollpanel.md +9 -7
  166. package/data/components/scrolltop.md +20 -18
  167. package/data/components/select.md +248 -169
  168. package/data/components/selectbutton.md +118 -56
  169. package/data/components/skeleton.md +22 -18
  170. package/data/components/slider.md +73 -49
  171. package/data/components/speeddial.md +77 -59
  172. package/data/components/splitbutton.md +354 -329
  173. package/data/components/splitter.md +22 -18
  174. package/data/components/stepper.md +38 -21
  175. package/data/components/styleclass.md +12 -6
  176. package/data/components/table.md +523 -314
  177. package/data/components/tabs.md +44 -26
  178. package/data/components/tag.md +18 -14
  179. package/data/components/terminal.md +38 -27
  180. package/data/components/textarea.md +82 -47
  181. package/data/components/tieredmenu.md +34 -29
  182. package/data/components/timeline.md +29 -28
  183. package/data/components/toast.md +115 -57
  184. package/data/components/togglebutton.md +53 -39
  185. package/data/components/toggleswitch.md +41 -28
  186. package/data/components/toolbar.md +19 -18
  187. package/data/components/tooltip.md +43 -32
  188. package/data/components/tree.md +114 -81
  189. package/data/components/treeselect.md +176 -174
  190. package/data/components/treetable.md +1250 -1045
  191. package/data/components.json +4122 -4080
  192. package/data/llms-full.txt +8784 -6249
  193. package/data/manifest.json +154 -15
  194. package/data/pages/tailwind.md +20 -10
  195. package/data/snapshot.json +2 -2
  196. package/dist/index.d.mts +2 -0
  197. package/dist/index.mjs +3 -3
  198. package/dist/index.mjs.map +1 -1
  199. package/package.json +1 -1
@@ -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: [ButtonModule, TabsModule]
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, TabsModule]
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: any[];
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 | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
387
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
388
- | pt | InputSignal<TabsPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
389
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
390
- | value | ModelSignal<string \| number> | undefined | Value of the active tab. |
391
- | scrollable | InputSignalWithTransform<boolean, unknown> | false | When specified, enables horizontal and/or vertical scrolling. |
392
- | lazy | InputSignalWithTransform<boolean, unknown> | false | When enabled, tabs are not rendered until activation. |
393
- | selectOnFocus | InputSignalWithTransform<boolean, unknown> | false | When enabled, the focused tab is activated. |
394
- | showNavigators | InputSignalWithTransform<boolean, unknown> | true | Whether to display navigation buttons in container when scrollable is enabled. |
395
- | tabindex | InputSignalWithTransform<number, unknown> | 0 | Tabindex of the tab buttons. |
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
 
@@ -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 | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
142
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
143
- | pt | InputSignal<TagPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
144
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
145
- | severity | InputSignal<BadgeSeverity> | ... | Severity type of the tag. |
146
- | value | InputSignal<string> | ... | Value to display inside the tag. |
147
- | icon | InputSignal<string> | ... | Icon of the tag to display next to the value. |
148
- | rounded | InputSignalWithTransform<boolean, unknown> | ... | Whether the corners of the tag are 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
- let response;
33
- let argsIndex = text.indexOf(' ');
34
- let command = argsIndex !== -1 ? text.substring(0, argsIndex) : text;
35
- switch (command) {
36
- case 'date':
37
- response = 'Today is ' + new Date().toDateString();
38
- break;
39
- case 'greet':
40
- response = 'Hola ' + text.substring(argsIndex + 1);
41
- break;
42
- case 'random':
43
- response = Math.floor(Math.random() * 100);
44
- break;
45
- default:
46
- response = 'Unknown command: ' + command;
47
- }
48
- this.terminalService.sendResponse(response);
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 | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
69
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
70
- | pt | InputSignal<TerminalPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
71
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
72
- | welcomeMessage | InputSignal<string> | ... | Initial text to display on terminal. |
73
- | prompt | InputSignal<string> | ... | Prompt text for each command. |
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