@exhaustive-ui/mcp 0.0.0-stage → 3.0.0-alpha.1

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 (121) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +167 -2
  3. package/data/components/accordion.md +421 -0
  4. package/data/components/animateonscroll.md +163 -0
  5. package/data/components/autocomplete.md +1077 -0
  6. package/data/components/autofocus.md +38 -0
  7. package/data/components/avatar.md +417 -0
  8. package/data/components/badge.md +234 -0
  9. package/data/components/blockui.md +108 -0
  10. package/data/components/breadcrumb.md +178 -0
  11. package/data/components/button.md +774 -0
  12. package/data/components/card.md +138 -0
  13. package/data/components/carousel.md +440 -0
  14. package/data/components/cascadeselect.md +1387 -0
  15. package/data/components/chart.md +1178 -0
  16. package/data/components/checkbox.md +529 -0
  17. package/data/components/chip.md +180 -0
  18. package/data/components/colorpicker.md +301 -0
  19. package/data/components/confirmdialog.md +287 -0
  20. package/data/components/confirmpopup.md +417 -0
  21. package/data/components/contextmenu.md +491 -0
  22. package/data/components/dataview.md +600 -0
  23. package/data/components/datepicker.md +1262 -0
  24. package/data/components/dialog.md +622 -0
  25. package/data/components/divider.md +250 -0
  26. package/data/components/dock.md +500 -0
  27. package/data/components/dragdrop.md +285 -0
  28. package/data/components/drawer.md +510 -0
  29. package/data/components/dynamicdialog.md +109 -0
  30. package/data/components/editor.md +291 -0
  31. package/data/components/fieldset.md +182 -0
  32. package/data/components/fileupload.md +430 -0
  33. package/data/components/floatlabel.md +155 -0
  34. package/data/components/fluid.md +72 -0
  35. package/data/components/focustrap.md +65 -0
  36. package/data/components/galleria.md +627 -0
  37. package/data/components/iconfield.md +246 -0
  38. package/data/components/iftalabel.md +105 -0
  39. package/data/components/imagecompare.md +97 -0
  40. package/data/components/inplace.md +233 -0
  41. package/data/components/inputgroup.md +306 -0
  42. package/data/components/inputmask.md +518 -0
  43. package/data/components/inputnumber.md +675 -0
  44. package/data/components/inputotp.md +336 -0
  45. package/data/components/inputtext.md +488 -0
  46. package/data/components/keyfilter.md +85 -0
  47. package/data/components/knob.md +462 -0
  48. package/data/components/listbox.md +798 -0
  49. package/data/components/llms.md +28 -0
  50. package/data/components/megamenu.md +587 -0
  51. package/data/components/menu.md +483 -0
  52. package/data/components/menubar.md +462 -0
  53. package/data/components/message.md +449 -0
  54. package/data/components/metergroup.md +241 -0
  55. package/data/components/multiselect.md +1047 -0
  56. package/data/components/orderlist.md +342 -0
  57. package/data/components/organizationchart.md +197 -0
  58. package/data/components/overlay.md +217 -0
  59. package/data/components/paginator.md +314 -0
  60. package/data/components/panel.md +214 -0
  61. package/data/components/panelmenu.md +699 -0
  62. package/data/components/password.md +570 -0
  63. package/data/components/picklist.md +420 -0
  64. package/data/components/popover.md +378 -0
  65. package/data/components/progressbar.md +181 -0
  66. package/data/components/progressspinner.md +91 -0
  67. package/data/components/radiobutton.md +377 -0
  68. package/data/components/rating.md +312 -0
  69. package/data/components/ripple.md +89 -0
  70. package/data/components/scroller.md +122 -0
  71. package/data/components/scrollpanel.md +149 -0
  72. package/data/components/scrolltop.md +105 -0
  73. package/data/components/select.md +1206 -0
  74. package/data/components/selectbutton.md +356 -0
  75. package/data/components/skeleton.md +242 -0
  76. package/data/components/slider.md +337 -0
  77. package/data/components/speeddial.md +589 -0
  78. package/data/components/splitbutton.md +945 -0
  79. package/data/components/splitter.md +196 -0
  80. package/data/components/stepper.md +411 -0
  81. package/data/components/styleclass.md +126 -0
  82. package/data/components/table.md +4557 -0
  83. package/data/components/tabs.md +467 -0
  84. package/data/components/tag.md +200 -0
  85. package/data/components/terminal.md +118 -0
  86. package/data/components/textarea.md +416 -0
  87. package/data/components/tieredmenu.md +578 -0
  88. package/data/components/timeline.md +310 -0
  89. package/data/components/toast.md +596 -0
  90. package/data/components/togglebutton.md +356 -0
  91. package/data/components/toggleswitch.md +285 -0
  92. package/data/components/toolbar.md +182 -0
  93. package/data/components/tooltip.md +211 -0
  94. package/data/components/tree.md +746 -0
  95. package/data/components/treeselect.md +912 -0
  96. package/data/components/treetable.md +2814 -0
  97. package/data/components.json +43751 -0
  98. package/data/llms-full.txt +47433 -0
  99. package/data/llms.txt +121 -0
  100. package/data/manifest.json +46513 -0
  101. package/data/pages/accessibility.md +28 -0
  102. package/data/pages/animations.md +28 -0
  103. package/data/pages/configuration.md +210 -0
  104. package/data/pages/contribution.md +20 -0
  105. package/data/pages/customicons.md +20 -0
  106. package/data/pages/faq.md +20 -0
  107. package/data/pages/icons.md +66 -0
  108. package/data/pages/installation.md +71 -0
  109. package/data/pages/llms.md +61 -0
  110. package/data/pages/passthrough.md +32 -0
  111. package/data/pages/philosophy.md +28 -0
  112. package/data/pages/primeflex.md +20 -0
  113. package/data/pages/rtl.md +12 -0
  114. package/data/pages/styled.md +132 -0
  115. package/data/pages/tailwind.md +40 -0
  116. package/data/pages/unstyled.md +39 -0
  117. package/data/snapshot.json +9 -0
  118. package/dist/index.d.mts +448 -0
  119. package/dist/index.mjs +2501 -0
  120. package/dist/index.mjs.map +1 -0
  121. package/package.json +67 -3
@@ -0,0 +1,699 @@
1
+ # Angular PanelMenu Component
2
+
3
+ PanelMenu is a hybrid of Accordion and Tree components.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Accordion header elements have a button role, an aria-label defined using the label property of the menuitem model and aria-controls to define the id of the content section along with aria-expanded for the visibility state. The content of an accordion panel uses region role, defines an id that matches the aria-controls of the header and aria-labelledby referring to the id of the header. The tree elements has a tree as the role and each menu item has a treeitem role along with aria-label , aria-selected and aria-expanded attributes. The container element of a treenode has the group role. The aria-setsize , aria-posinset and aria-level attributes are calculated implicitly and added to each treeitem. Header Keyboard Support Key Function tab Adds focus to the first header when focus moves in to the component, if there is already a focused tab header then moves the focus out of the component based on the page tab sequence. enter Toggles the visibility of the content. space Toggles the visibility of the content. down arrow If panel is collapsed then moves focus to the next header, otherwise first treenode of the panel receives the focus. up arrow If previous panel is collapsed then moves focus to the previous header, otherwise last treenode of the previous panel receives the focus. home Moves focus to the first header. end Moves focus to the last header. Tree Keyboard Support Key Function tab Moves focus to the next focusable element in the page tab order. shift + tab Moves focus to the previous focusable element in the page tab order. enter Activates the focused treenode. space Activates the focused treenode. down arrow Moves focus to the next treenode. up arrow Moves focus to the previous treenode. right arrow If node is closed, opens the node otherwise moves focus to the first child node. left arrow If node is open, closes the node otherwise moves focus to the parent node.
8
+
9
+ ## Basic
10
+
11
+ PanelMenu requires a collection of menuitems as its model .
12
+
13
+ ```typescript
14
+ import { Component, OnInit } from '@angular/core';
15
+ import { PanelMenu, PanelMenuModule } from '@exhaustive-ui/core/panelmenu';
16
+ import { MenuItem } from '@exhaustive-ui/core/api';
17
+ import { PanelMenu } from '@exhaustive-ui/core/panelmenu';
18
+
19
+ @Component({
20
+ template: `
21
+ <div class="card flex justify-center">
22
+ <p-panelmenu [model]="items" class="w-full md:w-80" />
23
+ </div>
24
+ `,
25
+ standalone: true,
26
+ imports: [PanelMenuModule]
27
+ })
28
+ export class PanelmenuBasicDemo implements OnInit {
29
+ items: MenuItem[];
30
+
31
+ ngOnInit() {
32
+ this.items = [
33
+ {
34
+ label: 'Files',
35
+ icon: 'pi pi-file',
36
+ items: [
37
+ {
38
+ label: 'Documents',
39
+ icon: 'pi pi-file',
40
+ items: [
41
+ {
42
+ label: 'Invoices',
43
+ icon: 'pi pi-file-pdf',
44
+ items: [
45
+ {
46
+ label: 'Pending',
47
+ icon: 'pi pi-stop'
48
+ },
49
+ {
50
+ label: 'Paid',
51
+ icon: 'pi pi-check-circle'
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ label: 'Clients',
57
+ icon: 'pi pi-users'
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ label: 'Images',
63
+ icon: 'pi pi-image',
64
+ items: [
65
+ {
66
+ label: 'Logos',
67
+ icon: 'pi pi-image'
68
+ }
69
+ ]
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ label: 'Cloud',
75
+ icon: 'pi pi-cloud',
76
+ items: [
77
+ {
78
+ label: 'Upload',
79
+ icon: 'pi pi-cloud-upload'
80
+ },
81
+ {
82
+ label: 'Download',
83
+ icon: 'pi pi-cloud-download'
84
+ },
85
+ {
86
+ label: 'Sync',
87
+ icon: 'pi pi-refresh'
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ label: 'Devices',
93
+ icon: 'pi pi-desktop',
94
+ items: [
95
+ {
96
+ label: 'Phone',
97
+ icon: 'pi pi-mobile'
98
+ },
99
+ {
100
+ label: 'Desktop',
101
+ icon: 'pi pi-desktop'
102
+ },
103
+ {
104
+ label: 'Tablet',
105
+ icon: 'pi pi-tablet'
106
+ }
107
+ ]
108
+ }
109
+ ];
110
+ }
111
+ }
112
+ ```
113
+
114
+ ## Command
115
+
116
+ The command property defines the callback to run when an item is activated by click or a key event.
117
+
118
+ ```typescript
119
+ import { Component, OnInit, inject } from '@angular/core';
120
+ import { PanelMenu, PanelMenuModule } from '@exhaustive-ui/core/panelmenu';
121
+ import { ToastModule } from '@exhaustive-ui/core/toast';
122
+ import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
123
+ import { PanelMenu } from '@exhaustive-ui/core/panelmenu';
124
+
125
+ @Component({
126
+ template: `
127
+ <div class="card flex justify-center">
128
+ <p-toast />
129
+ <p-panelmenu [model]="items" class="w-full md:w-80" />
130
+ </div>
131
+ `,
132
+ standalone: true,
133
+ imports: [PanelMenuModule, ToastModule],
134
+ providers: [MessageService]
135
+ })
136
+ export class PanelmenuCommandDemo implements OnInit {
137
+ private messageService = inject(MessageService);
138
+ items: MenuItem[];
139
+
140
+ ngOnInit() {
141
+ this.items = [
142
+ {
143
+ label: 'Files',
144
+ icon: 'pi pi-file',
145
+ items: [
146
+ {
147
+ label: 'New',
148
+ icon: 'pi pi-plus',
149
+ command: () => {
150
+ this.messageService.add({ severity: 'success', summary: 'Success', detail: 'File created', life: 3000 });
151
+ }
152
+ },
153
+ {
154
+ label: 'Search',
155
+ icon: 'pi pi-search',
156
+ command: () => {
157
+ this.messageService.add({
158
+ severity: 'warn',
159
+ summary: 'Search Results',
160
+ detail: 'No results found',
161
+ life: 3000
162
+ });
163
+ }
164
+ },
165
+ {
166
+ label: 'Print',
167
+ icon: 'pi pi-print',
168
+ command: () => {
169
+ this.messageService.add({ severity: 'error', summary: 'Error', detail: 'No printer connected', life: 3000 });
170
+ }
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ label: 'Sync',
176
+ icon: 'pi pi-cloud',
177
+ items: [
178
+ {
179
+ label: 'Import',
180
+ icon: 'pi pi-cloud-download',
181
+ command: () => {
182
+ this.messageService.add({
183
+ severity: 'info',
184
+ summary: 'Downloads',
185
+ detail: 'Downloaded from cloud',
186
+ life: 3000
187
+ });
188
+ }
189
+ },
190
+ {
191
+ label: 'Export',
192
+ icon: 'pi pi-cloud-upload',
193
+ command: () => {
194
+ this.messageService.add({ severity: 'info', summary: 'Shared', detail: 'Exported to cloud', life: 3000 });
195
+ }
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ label: 'Sign Out',
201
+ icon: 'pi pi-sign-out',
202
+ command: () => {
203
+ this.messageService.add({ severity: 'info', summary: 'Signed out', detail: 'User logged out', life: 3000 });
204
+ }
205
+ }
206
+ ];
207
+ }
208
+ }
209
+ ```
210
+
211
+ ## Controlled
212
+
213
+ Menu items can be controlled programmatically.
214
+
215
+ ```typescript
216
+ import { Component, OnInit } from '@angular/core';
217
+ import { ButtonModule } from '@exhaustive-ui/core/button';
218
+ import { PanelMenu, PanelMenuModule } from '@exhaustive-ui/core/panelmenu';
219
+ import { MenuItem } from '@exhaustive-ui/core/api';
220
+ import { PanelMenu } from '@exhaustive-ui/core/panelmenu';
221
+
222
+ @Component({
223
+ template: `
224
+ <div class="card flex flex-col items-center gap-4">
225
+ <p-button label="Toggle All" [text]="true" (onClick)="toggleAll()" />
226
+ <p-panelmenu [model]="items" class="w-full md:w-80" />
227
+ </div>
228
+ `,
229
+ standalone: true,
230
+ imports: [ButtonModule, PanelMenuModule]
231
+ })
232
+ export class PanelmenuControlledDemo implements OnInit {
233
+ items: MenuItem[];
234
+
235
+ ngOnInit() {
236
+ this.items = [
237
+ {
238
+ key: '0',
239
+ label: 'Users',
240
+ icon: 'pi pi-users',
241
+ items: [
242
+ {
243
+ key: '0_1',
244
+ label: 'New',
245
+ items: [
246
+ {
247
+ key: '0_1_0',
248
+ label: 'Member'
249
+ },
250
+ {
251
+ key: '0_1_1',
252
+ label: 'Group'
253
+ }
254
+ ]
255
+ },
256
+ {
257
+ key: '0_2',
258
+ label: 'Search'
259
+ }
260
+ ]
261
+ },
262
+ {
263
+ key: '1',
264
+ label: 'Tasks',
265
+ icon: 'pi pi-server',
266
+ items: [
267
+ {
268
+ key: '1_0',
269
+ label: 'Add New'
270
+ },
271
+ {
272
+ key: '1_1',
273
+ label: 'Pending'
274
+ },
275
+ {
276
+ key: '1_2',
277
+ label: 'Overdue'
278
+ }
279
+ ]
280
+ },
281
+ {
282
+ key: '2',
283
+ label: 'Calendar',
284
+ icon: 'pi pi-calendar',
285
+ items: [
286
+ {
287
+ key: '2_0',
288
+ label: 'New Event'
289
+ },
290
+ {
291
+ key: '2_1',
292
+ label: 'Today'
293
+ },
294
+ {
295
+ key: '2_2',
296
+ label: 'This Week'
297
+ }
298
+ ]
299
+ }
300
+ ];
301
+ }
302
+
303
+ toggleAll() {
304
+ const expanded = !this.areAllItemsExpanded();
305
+ this.items = this.toggleAllRecursive(this.items, expanded);
306
+ }
307
+ }
308
+ ```
309
+
310
+ ## Multiple
311
+
312
+ Only one single root menuitem can be active by default, enable multiple property to be able to open more than one items.
313
+
314
+ ```typescript
315
+ import { Component, OnInit } from '@angular/core';
316
+ import { PanelMenu, PanelMenuModule } from '@exhaustive-ui/core/panelmenu';
317
+ import { MenuItem } from '@exhaustive-ui/core/api';
318
+ import { PanelMenu } from '@exhaustive-ui/core/panelmenu';
319
+
320
+ @Component({
321
+ template: `
322
+ <div class="card flex justify-center">
323
+ <p-panelmenu [model]="items" class="w-full md:w-80" [multiple]="true" />
324
+ </div>
325
+ `,
326
+ standalone: true,
327
+ imports: [PanelMenuModule]
328
+ })
329
+ export class PanelmenuMultipleDemo implements OnInit {
330
+ items: MenuItem[];
331
+
332
+ ngOnInit() {
333
+ this.items = [
334
+ {
335
+ label: 'Files',
336
+ icon: 'pi pi-file',
337
+ items: [
338
+ {
339
+ label: 'Documents',
340
+ icon: 'pi pi-file',
341
+ items: [
342
+ {
343
+ label: 'Invoices',
344
+ icon: 'pi pi-file-pdf',
345
+ items: [
346
+ {
347
+ label: 'Pending',
348
+ icon: 'pi pi-stop'
349
+ },
350
+ {
351
+ label: 'Paid',
352
+ icon: 'pi pi-check-circle'
353
+ }
354
+ ]
355
+ },
356
+ {
357
+ label: 'Clients',
358
+ icon: 'pi pi-users'
359
+ }
360
+ ]
361
+ },
362
+ {
363
+ label: 'Images',
364
+ icon: 'pi pi-image',
365
+ items: [
366
+ {
367
+ label: 'Logos',
368
+ icon: 'pi pi-image'
369
+ }
370
+ ]
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ label: 'Cloud',
376
+ icon: 'pi pi-cloud',
377
+ items: [
378
+ {
379
+ label: 'Upload',
380
+ icon: 'pi pi-cloud-upload'
381
+ },
382
+ {
383
+ label: 'Download',
384
+ icon: 'pi pi-cloud-download'
385
+ },
386
+ {
387
+ label: 'Sync',
388
+ icon: 'pi pi-refresh'
389
+ }
390
+ ]
391
+ },
392
+ {
393
+ label: 'Devices',
394
+ icon: 'pi pi-desktop',
395
+ items: [
396
+ {
397
+ label: 'Phone',
398
+ icon: 'pi pi-mobile'
399
+ },
400
+ {
401
+ label: 'Desktop',
402
+ icon: 'pi pi-desktop'
403
+ },
404
+ {
405
+ label: 'Tablet',
406
+ icon: 'pi pi-tablet'
407
+ }
408
+ ]
409
+ }
410
+ ];
411
+ }
412
+ }
413
+ ```
414
+
415
+ ## Router
416
+
417
+ Menu items support navigation via routerLink, programmatic routing using commands, or external URLs.
418
+
419
+ ```typescript
420
+ import { Component, OnInit, inject } from '@angular/core';
421
+ import { PanelMenu, PanelMenuModule } from '@exhaustive-ui/core/panelmenu';
422
+ import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
423
+ import { PanelMenu } from '@exhaustive-ui/core/panelmenu';
424
+
425
+ @Component({
426
+ template: `
427
+ <div class="card flex justify-center">
428
+ <p-panelmenu [model]="items" class="w-full md:w-80" />
429
+ </div>
430
+ `,
431
+ standalone: true,
432
+ imports: [PanelMenuModule],
433
+ providers: [MessageService]
434
+ })
435
+ export class PanelmenuRouterDemo implements OnInit {
436
+ private messageService = inject(MessageService);
437
+ items: MenuItem[];
438
+
439
+ ngOnInit() {
440
+ this.items = [
441
+ {
442
+ label: 'Router',
443
+ icon: 'pi pi-palette',
444
+ items: [
445
+ {
446
+ label: 'Installation',
447
+ icon: 'pi pi-eraser',
448
+ routerLink: '/installation'
449
+ },
450
+ {
451
+ label: 'Configuration',
452
+ icon: 'pi pi-heart',
453
+ routerLink: '/configuration'
454
+ }
455
+ ]
456
+ },
457
+ {
458
+ label: 'Programmatic',
459
+ icon: 'pi pi-link',
460
+ command: () => {
461
+ this.router.navigate(['/installation']);
462
+ }
463
+ },
464
+ {
465
+ label: 'External',
466
+ icon: 'pi pi-home',
467
+ items: [
468
+ {
469
+ label: 'Angular',
470
+ icon: 'pi pi-star',
471
+ url: 'https://angular.io/'
472
+ },
473
+ {
474
+ label: 'Vite.js',
475
+ icon: 'pi pi-bookmark',
476
+ url: 'https://vitejs.dev/'
477
+ }
478
+ ]
479
+ }
480
+ ];
481
+ }
482
+ }
483
+ ```
484
+
485
+ ## Template
486
+
487
+ PanelMenu requires a collection of menuitems as its model .
488
+
489
+ ```typescript
490
+ import { Component, OnInit } from '@angular/core';
491
+ import { BadgeModule } from '@exhaustive-ui/core/badge';
492
+ import { PanelMenu, PanelMenuModule } from '@exhaustive-ui/core/panelmenu';
493
+ import { RippleModule } from '@exhaustive-ui/core/ripple';
494
+ import { MenuItem } from '@exhaustive-ui/core/api';
495
+ import { PanelMenu } from '@exhaustive-ui/core/panelmenu';
496
+
497
+ @Component({
498
+ template: `
499
+ <div class="card flex flex-col items-center">
500
+ <p-panelmenu [model]="items" class="w-full md:w-80">
501
+ <ng-template #item let-item>
502
+ <a pRipple class="flex items-center px-4 py-2 cursor-pointer group">
503
+ <i [class]="item.icon + ' text-primary group-hover:text-inherit'"></i>
504
+ <span class="ms-2">{{ item.label }}</span>
505
+ <p-badge *ngIf="item.badge" class="ms-auto" [value]="item.badge" />
506
+ <span *ngIf="item.shortcut" class="ms-auto border border-surface rounded bg-emphasis text-muted-color text-xs p-1">{{ item.shortcut }}</span>
507
+ </a>
508
+ </ng-template>
509
+ </p-panelmenu>
510
+ </div>
511
+ `,
512
+ standalone: true,
513
+ imports: [BadgeModule, PanelMenuModule, RippleModule]
514
+ })
515
+ export class PanelmenuTemplateDemo implements OnInit {
516
+ items: MenuItem[];
517
+
518
+ ngOnInit() {
519
+ this.items = [
520
+ {
521
+ label: 'Mail',
522
+ icon: 'pi pi-envelope',
523
+ badge: '5',
524
+ items: [
525
+ {
526
+ label: 'Compose',
527
+ icon: 'pi pi-file-edit',
528
+ shortcut: '⌘+N'
529
+ },
530
+ {
531
+ label: 'Inbox',
532
+ icon: 'pi pi-inbox',
533
+ badge: '5'
534
+ },
535
+ {
536
+ label: 'Sent',
537
+ icon: 'pi pi-send',
538
+ shortcut: '⌘+S'
539
+ },
540
+ {
541
+ label: 'Trash',
542
+ icon: 'pi pi-trash',
543
+ shortcut: '⌘+T'
544
+ }
545
+ ]
546
+ },
547
+ {
548
+ label: 'Reports',
549
+ icon: 'pi pi-chart-bar',
550
+ shortcut: '⌘+R',
551
+ items: [
552
+ {
553
+ label: 'Sales',
554
+ icon: 'pi pi-chart-line',
555
+ badge: '3'
556
+ },
557
+ {
558
+ label: 'Products',
559
+ icon: 'pi pi-list',
560
+ badge: '6'
561
+ }
562
+ ]
563
+ },
564
+ {
565
+ label: 'Profile',
566
+ icon: 'pi pi-user',
567
+ shortcut: '⌘+W',
568
+ items: [
569
+ {
570
+ label: 'Settings',
571
+ icon: 'pi pi-cog',
572
+ shortcut: '⌘+O'
573
+ },
574
+ {
575
+ label: 'Privacy',
576
+ icon: 'pi pi-shield',
577
+ shortcut: '⌘+P'
578
+ }
579
+ ]
580
+ }
581
+ ];
582
+ }
583
+
584
+ toggleAll() {
585
+ const expanded = !this.areAllItemsExpanded();
586
+ this.items = this.toggleAllRecursive(this.items, expanded);
587
+ }
588
+ }
589
+ ```
590
+
591
+ ## Panel Menu
592
+
593
+ PanelMenu is a hybrid of Accordion and Tree components.
594
+
595
+ ### Props
596
+
597
+ | Name | Type | Default | Description |
598
+ |------|------|---------|-------------|
599
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
600
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
601
+ | pt | InputSignal<PanelMenuPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
602
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
603
+ | model | InputSignal<MenuItem[]> | ... | An array of menuitems. |
604
+ | multiple | InputSignalWithTransform<boolean, unknown> | ... | Whether multiple tabs can be activated at the same time or not. |
605
+ | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
606
+ | id | InputSignal<string> | ... | Current id state as a string. |
607
+
608
+ ### Templates
609
+
610
+ | Name | Type | Description |
611
+ |------|------|-------------|
612
+ | submenuicon | TemplateRef<void> | Template option of submenu icon. |
613
+ | headericon | TemplateRef<void> | Template option of header icon. |
614
+ | item | TemplateRef<PanelMenuItemTemplateContext> | Template option of item. |
615
+
616
+ ### Methods
617
+
618
+ | Name | Parameters | Return Type | Description |
619
+ |------|------------|-------------|-------------|
620
+ | collapseAll | | void | Collapses open panels. |
621
+
622
+ ## Pass Through Options
623
+
624
+ | Name | Type | Description |
625
+ |------|------|-------------|
626
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
627
+ | panel | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the panel's DOM element. |
628
+ | header | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the header's DOM element. |
629
+ | headerContent | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the header content's DOM element. |
630
+ | headerLink | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the header link's DOM element. |
631
+ | submenuIcon | PassThroughOption<SVGElement, I> | Used to pass attributes to the submenu icon's DOM element. |
632
+ | headerIcon | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the header icon's DOM element. |
633
+ | headerLabel | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the header label's DOM element. |
634
+ | contentContainer | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the toggleable content's DOM element. |
635
+ | contentWrapper | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the toggleable content's DOM element. |
636
+ | content | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the menu content's DOM element. |
637
+ | rootList | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the root list's DOM element. |
638
+ | submenu | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the submenu's DOM element. |
639
+ | item | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the item's DOM element. |
640
+ | itemContent | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the item content's DOM element. |
641
+ | itemLink | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the item link's DOM element. |
642
+ | itemIcon | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the item icon's DOM element. |
643
+ | itemLabel | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the item label's DOM element. |
644
+ | separator | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the separator's DOM element. |
645
+ | motion | MotionOptions | Used to pass options to the motion component/directive. |
646
+
647
+ ## Theming
648
+
649
+ ### CSS Classes
650
+
651
+ | Class | Description |
652
+ |-------|-------------|
653
+ | p-panelmenu | Class name of the root element |
654
+ | p-panelmenu-panel | Class name of the panel element |
655
+ | p-panelmenu-header | Class name of the header element |
656
+ | p-panelmenu-header-content | Class name of the header content element |
657
+ | p-panelmenu-header-link | Class name of the header link element |
658
+ | p-panelmenu-header-icon | Class name of the header icon element |
659
+ | p-panelmenu-header-label | Class name of the header label element |
660
+ | p-panelmenu-content-container | Class name of the content container element |
661
+ | p-panelmenu-content | Class name of the content element |
662
+ | p-panelmenu-root-list | Class name of the root list element |
663
+ | p-panelmenu-item | Class name of the item element |
664
+ | p-panelmenu-item-content | Class name of the item content element |
665
+ | p-panelmenu-item-link | Class name of the item link element |
666
+ | p-panelmenu-item-icon | Class name of the item icon element |
667
+ | p-panelmenu-item-label | Class name of the item label element |
668
+ | p-panelmenu-submenu-icon | Class name of the submenu icon element |
669
+ | p-panelmenu-submenu | Class name of the submenu element |
670
+ | p-menuitem-separator | |
671
+
672
+ ### Design Tokens
673
+
674
+ | Token | CSS Variable | Description |
675
+ |-------|--------------|-------------|
676
+ | panelmenu.gap | --p-panelmenu-gap | Gap of root |
677
+ | panelmenu.transition.duration | --p-panelmenu-transition-duration | Transition duration of root |
678
+ | panelmenu.panel.background | --p-panelmenu-panel-background | Background of panel |
679
+ | panelmenu.panel.border.color | --p-panelmenu-panel-border-color | Border color of panel |
680
+ | panelmenu.panel.border.width | --p-panelmenu-panel-border-width | Border width of panel |
681
+ | panelmenu.panel.color | --p-panelmenu-panel-color | Color of panel |
682
+ | panelmenu.panel.padding | --p-panelmenu-panel-padding | Padding of panel |
683
+ | panelmenu.panel.border.radius | --p-panelmenu-panel-border-radius | Border radius of panel |
684
+ | panelmenu.panel.first.border.width | --p-panelmenu-panel-first-border-width | First border width of panel |
685
+ | panelmenu.panel.first.top.border.radius | --p-panelmenu-panel-first-top-border-radius | First top border radius of panel |
686
+ | panelmenu.panel.last.border.width | --p-panelmenu-panel-last-border-width | Last border width of panel |
687
+ | panelmenu.panel.last.bottom.border.radius | --p-panelmenu-panel-last-bottom-border-radius | Last bottom border radius of panel |
688
+ | panelmenu.item.focus.background | --p-panelmenu-item-focus-background | Focus background of item |
689
+ | panelmenu.item.color | --p-panelmenu-item-color | Color of item |
690
+ | panelmenu.item.focus.color | --p-panelmenu-item-focus-color | Focus color of item |
691
+ | panelmenu.item.gap | --p-panelmenu-item-gap | Gap of item |
692
+ | panelmenu.item.padding | --p-panelmenu-item-padding | Padding of item |
693
+ | panelmenu.item.border.radius | --p-panelmenu-item-border-radius | Border radius of item |
694
+ | panelmenu.item.icon.color | --p-panelmenu-item-icon-color | Icon color of item |
695
+ | panelmenu.item.icon.focus.color | --p-panelmenu-item-icon-focus-color | Icon focus color of item |
696
+ | panelmenu.submenu.indent | --p-panelmenu-submenu-indent | Indent of submenu |
697
+ | panelmenu.submenu.icon.color | --p-panelmenu-submenu-icon-color | Color of submenu icon |
698
+ | panelmenu.submenu.icon.focus.color | --p-panelmenu-submenu-icon-focus-color | Focus color of submenu icon |
699
+