@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,483 @@
1
+ # Angular Menu Component
2
+
3
+ Menu is a navigation / command component that supports dynamic and static positioning.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Menu component uses the menu role and the value to describe the menu can either be provided with aria-labelledby or aria-label props. Each list item has a presentation role whereas anchor elements have a menuitem role with aria-label referring to the label of the item and aria-disabled defined if the item is disabled. A submenu within a Menu uses the group role with an aria-labelledby defined as the id of the submenu root menuitem label. In popup mode, the component implicitly manages the aria-expanded , aria-haspopup and aria-controls attributes of the target element to define the relation between the target and the popup. Keyboard Support Key Function tab Add focus to the first item if focus moves in to the menu. If the focus is already within the menu, focus moves to the next focusable item in the page tab sequence. shift + tab Add focus to the last item if focus moves in to the menu. If the focus is already within the menu, focus moves to the previous focusable item in the page tab sequence. enter Activates the focused menuitem. If menu is in overlay mode, popup gets closes and focus moves to target. space Activates the focused menuitem. If menu is in overlay mode, popup gets closes and focus moves to target. escape If menu is in overlay mode, popup gets closes and focus moves to target. down arrow Moves focus to the next menuitem. up arrow Moves focus to the previous menuitem. home Moves focus to the first menuitem. end Moves focus to the last menuitem.
8
+
9
+ ## Basic
10
+
11
+ Menu requires a collection of menuitems as its model .
12
+
13
+ ```typescript
14
+ import { Component, OnInit } from '@angular/core';
15
+ import { MenuModule } from '@exhaustive-ui/core/menu';
16
+ import { MenuItem } from '@exhaustive-ui/core/api';
17
+
18
+ @Component({
19
+ template: `
20
+ <div class="card flex justify-center">
21
+ <p-menu [model]="items" />
22
+ </div>
23
+ `,
24
+ standalone: true,
25
+ imports: [MenuModule]
26
+ })
27
+ export class MenuBasicDemo implements OnInit {
28
+ items: MenuItem[] | undefined;
29
+
30
+ ngOnInit() {
31
+ this.items = [
32
+ { label: 'New', icon: 'pi pi-plus' },
33
+ { label: 'Search', icon: 'pi pi-search' }
34
+ ];
35
+ }
36
+ }
37
+ ```
38
+
39
+ ## Command
40
+
41
+ The function to invoke when an item is clicked is defined using the command property.
42
+
43
+ ```typescript
44
+ import { Component, OnInit, inject } from '@angular/core';
45
+ import { MenuModule } from '@exhaustive-ui/core/menu';
46
+ import { ToastModule } from '@exhaustive-ui/core/toast';
47
+ import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
48
+
49
+ @Component({
50
+ template: `
51
+ <div class="card flex justify-center">
52
+ <p-toast />
53
+ <p-menu [model]="items" />
54
+ </div>
55
+ `,
56
+ standalone: true,
57
+ imports: [MenuModule, ToastModule],
58
+ providers: [MessageService]
59
+ })
60
+ export class MenuCommandDemo implements OnInit {
61
+ private messageService = inject(MessageService);
62
+ items: MenuItem[] | undefined;
63
+
64
+ ngOnInit() {
65
+ this.items = [
66
+ {
67
+ label: 'New',
68
+ icon: 'pi pi-plus',
69
+ command: () => {
70
+ this.update();
71
+ }
72
+ },
73
+ {
74
+ label: 'Search',
75
+ icon: 'pi pi-search',
76
+ command: () => {
77
+ this.delete();
78
+ }
79
+ }
80
+ ];
81
+ }
82
+
83
+ update() {
84
+ this.messageService.add({ severity: 'success', summary: 'Success', detail: 'File created', life: 3000 });
85
+ }
86
+
87
+ delete() {
88
+ this.messageService.add({ severity: 'warn', summary: 'Search Completed', detail: 'No results found', life: 3000 });
89
+ }
90
+ }
91
+ ```
92
+
93
+ ## Group
94
+
95
+ Menu supports one level of nesting by defining children with items property.
96
+
97
+ ```typescript
98
+ import { Component, OnInit, inject } from '@angular/core';
99
+ import { MenuModule } from '@exhaustive-ui/core/menu';
100
+ import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
101
+
102
+ @Component({
103
+ template: `
104
+ <div class="card flex justify-center">
105
+ <p-menu [model]="items" />
106
+ </div>
107
+ `,
108
+ standalone: true,
109
+ imports: [MenuModule],
110
+ providers: [MessageService]
111
+ })
112
+ export class MenuGroupDemo implements OnInit {
113
+ private messageService = inject(MessageService);
114
+ items: MenuItem[] | undefined;
115
+
116
+ ngOnInit() {
117
+ this.items = [
118
+ {
119
+ label: 'Documents',
120
+ items: [
121
+ {
122
+ label: 'New',
123
+ icon: 'pi pi-plus'
124
+ },
125
+ {
126
+ label: 'Search',
127
+ icon: 'pi pi-search'
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ label: 'Profile',
133
+ items: [
134
+ {
135
+ label: 'Settings',
136
+ icon: 'pi pi-cog'
137
+ },
138
+ {
139
+ label: 'Logout',
140
+ icon: 'pi pi-sign-out'
141
+ }
142
+ ]
143
+ }
144
+ ];
145
+ }
146
+ }
147
+ ```
148
+
149
+ ## Popup
150
+
151
+ Popup mode is enabled by setting popup property to true and calling toggle method with an event of the target.
152
+
153
+ ```typescript
154
+ import { Component, OnInit, inject } from '@angular/core';
155
+ import { ButtonModule } from '@exhaustive-ui/core/button';
156
+ import { MenuModule } from '@exhaustive-ui/core/menu';
157
+ import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
158
+
159
+ @Component({
160
+ template: `
161
+ <div class="card flex justify-center">
162
+ <p-menu #menu [model]="items" [popup]="true" />
163
+ <p-button (click)="menu.toggle($event)" icon="pi pi-ellipsis-v" />
164
+ </div>
165
+ `,
166
+ standalone: true,
167
+ imports: [ButtonModule, MenuModule],
168
+ providers: [MessageService]
169
+ })
170
+ export class MenuPopupDemo implements OnInit {
171
+ private messageService = inject(MessageService);
172
+ items: MenuItem[] | undefined;
173
+
174
+ ngOnInit() {
175
+ this.items = [
176
+ {
177
+ label: 'Options',
178
+ items: [
179
+ {
180
+ label: 'Refresh',
181
+ icon: 'pi pi-refresh'
182
+ },
183
+ {
184
+ label: 'Export',
185
+ icon: 'pi pi-upload'
186
+ }
187
+ ]
188
+ }
189
+ ];
190
+ }
191
+ }
192
+ ```
193
+
194
+ ## Router
195
+
196
+ Menu items support navigation via routerLink, programmatic routing using commands, or external URLs.
197
+
198
+ ```typescript
199
+ import { Component, OnInit } from '@angular/core';
200
+ import { MenuModule } from '@exhaustive-ui/core/menu';
201
+ import { MenuItem } from '@exhaustive-ui/core/api';
202
+
203
+ @Component({
204
+ template: `
205
+ <div class="card flex justify-center">
206
+ <p-menu [model]="items" />
207
+ </div>
208
+ `,
209
+ standalone: true,
210
+ imports: [MenuModule]
211
+ })
212
+ export class MenuRouterDemo implements OnInit {
213
+ items: MenuItem[] | undefined;
214
+
215
+ ngOnInit() {
216
+ this.items = [
217
+ {
218
+ label: 'Navigate',
219
+ items: [
220
+ {
221
+ label: 'Router Link',
222
+ icon: 'pi pi-palette',
223
+ routerLink: '/theming'
224
+ },
225
+ {
226
+ label: 'Programmatic',
227
+ icon: 'pi pi-link',
228
+ command: () => {
229
+ this.router.navigate(['/installation']);
230
+ }
231
+ },
232
+ {
233
+ label: 'External',
234
+ icon: 'pi pi-home',
235
+ url: 'https://angular.io//'
236
+ }
237
+ ]
238
+ }
239
+ ];
240
+ }
241
+ }
242
+ ```
243
+
244
+ ## Template
245
+
246
+ Menu offers item customization with the item template that receives the menuitem instance from the model as a parameter. The submenu header has its own submenuheader template, additional slots named start and end are provided to embed content before or after the menu.
247
+
248
+ ```typescript
249
+ import { Component, OnInit } from '@angular/core';
250
+ import { AvatarModule } from '@exhaustive-ui/core/avatar';
251
+ import { BadgeModule } from '@exhaustive-ui/core/badge';
252
+ import { Menu, MenuModule } from '@exhaustive-ui/core/menu';
253
+ import { RippleModule } from '@exhaustive-ui/core/ripple';
254
+ import { MenuItem } from '@exhaustive-ui/core/api';
255
+
256
+ @Component({
257
+ template: `
258
+ <div class="card">
259
+ <p-menu [model]="items" class="flex justify-center" styleClass="w-full md:w-60">
260
+ <ng-template #start>
261
+ <span class="inline-flex items-center gap-1 px-2 py-2">
262
+ <svg width="31" height="33" viewBox="0 0 31 33" fill="none" xmlns="http://www.w3.org/2000/svg" class="block mx-auto">
263
+ <path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--p-primary-color)" />
264
+ <mask id="mask0_1_52" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="31" height="33">
265
+ <path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--ground-background)" />
266
+ </mask>
267
+ <g mask="url(#mask0_1_52)">
268
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.1935 0V3.5994V3.58318V20.0075V20.0075V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1935 0Z" fill="var(--p-primary-color)" />
269
+ </g>
270
+ <path d="M19.6399 15.3776L18.1861 15.0547L19.3169 16.6695V21.6755L23.1938 18.4458V12.9554L21.4169 13.6013L19.6399 15.3776Z" fill="var(--ground-background)" />
271
+ <path d="M10.5936 15.3776L12.0474 15.0547L10.9166 16.6695V21.6755L7.03966 18.4458V12.9554L8.81661 13.6013L10.5936 15.3776Z" fill="var(--ground-background)" />
272
+ <path
273
+ fill-rule="evenodd"
274
+ clip-rule="evenodd"
275
+ d="M11.3853 16.9726L12.6739 15.0309L13.4793 15.5163H16.7008L17.5061 15.0309L18.7947 16.9726V24.254L17.8283 25.7103L16.7008 26.843H13.4793L12.3518 25.7103L11.3853 24.254V16.9726Z"
276
+ fill="var(--ground-background)"
277
+ />
278
+ <path d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z" fill="var(--ground-background)" />
279
+ <path d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z" fill="var(--ground-background)" />
280
+ <path
281
+ fill-rule="evenodd"
282
+ clip-rule="evenodd"
283
+ d="M13.0167 5.68861L11.7244 8.7568L13.8244 14.8932H14.7936V5.68861H13.0167ZM15.4397 5.68861V14.8932H16.5706L18.5091 8.7568L17.2167 5.68861H15.4397Z"
284
+ fill="var(--ground-background)"
285
+ />
286
+ <path d="M13.8244 14.8932L6.87813 12.3094L5.90888 8.27235L11.8859 8.7568L13.9859 14.8932H13.8244Z" fill="var(--ground-background)" />
287
+ <path d="M16.5706 14.8932L23.5169 12.3094L24.4861 8.27235L18.3476 8.7568L16.4091 14.8932H16.5706Z" fill="var(--ground-background)" />
288
+ <path d="M18.8321 8.27235L22.2245 7.94938L19.9629 5.68861H17.7013L18.8321 8.27235Z" fill="var(--ground-background)" />
289
+ <path d="M11.4013 8.27235L8.00893 7.94938L10.2705 5.68861H12.5321L11.4013 8.27235Z" fill="var(--ground-background)" />
290
+ </svg>
291
+ <span class="text-xl font-semibold">PRIME<span class="text-primary">APP</span></span>
292
+ </span>
293
+ </ng-template>
294
+ <ng-template #submenuheader let-item>
295
+ <span class="text-primary font-bold">{{ item.label }}</span>
296
+ </ng-template>
297
+ <ng-template #item let-item>
298
+ <a pRipple class="flex items-center px-3 py-2 cursor-pointer" [class]="item.linkClass">
299
+ <span [class]="item.icon"></span>
300
+ <span class="ms-2">{{ item.label }}</span>
301
+ <p-badge *ngIf="item.badge" class="ms-auto" [value]="item.badge" />
302
+ <span *ngIf="item.shortcut" class="ms-auto border border-surface rounded bg-emphasis text-muted-color text-xs p-1">{{ item.shortcut }}</span>
303
+ </a>
304
+ </ng-template>
305
+ <ng-template #end>
306
+ <button pRipple class="relative overflow-hidden w-full border-0 bg-transparent flex items-start p-2 pl-4 hover:bg-surface-100 dark:hover:bg-surface-800 rounded-none cursor-pointer transition-colors duration-200">
307
+ <p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/amyelsner.png" class="mr-2" shape="circle" />
308
+ <span class="inline-flex flex-col items-start">
309
+ <span class="font-bold">Amy Elsner</span>
310
+ <span class="text-sm">Admin</span>
311
+ </span>
312
+ </button>
313
+ </ng-template>
314
+ </p-menu>
315
+ </div>
316
+ `,
317
+ standalone: true,
318
+ imports: [AvatarModule, BadgeModule, MenuModule, RippleModule]
319
+ })
320
+ export class MenuTemplateDemo implements OnInit {
321
+ items: MenuItem[] | undefined;
322
+
323
+ ngOnInit() {
324
+ this.items = [
325
+ {
326
+ separator: true
327
+ },
328
+ {
329
+ label: 'Documents',
330
+ items: [
331
+ {
332
+ label: 'New',
333
+ icon: 'pi pi-plus',
334
+ shortcut: '⌘+N'
335
+ },
336
+ {
337
+ label: 'Search',
338
+ icon: 'pi pi-search',
339
+ shortcut: '⌘+S'
340
+ }
341
+ ]
342
+ },
343
+ {
344
+ label: 'Profile',
345
+ items: [
346
+ {
347
+ label: 'Settings',
348
+ icon: 'pi pi-cog',
349
+ shortcut: '⌘+O'
350
+ },
351
+ {
352
+ label: 'Messages',
353
+ icon: 'pi pi-inbox',
354
+ badge: '2'
355
+ },
356
+ {
357
+ label: 'Logout',
358
+ icon: 'pi pi-sign-out',
359
+ shortcut: '⌘+Q',
360
+ linkClass: '!text-red-500 dark:!text-red-400'
361
+ }
362
+ ]
363
+ },
364
+ {
365
+ separator: true
366
+ }
367
+ ];
368
+ }
369
+ }
370
+ ```
371
+
372
+ ## Menu
373
+
374
+ Menu is a navigation / command component that supports dynamic and static positioning.
375
+
376
+ ### Props
377
+
378
+ | Name | Type | Default | Description |
379
+ |------|------|---------|-------------|
380
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
381
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
382
+ | pt | InputSignal<MenuPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
383
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
384
+ | model | InputSignal<MenuItem[]> | ... | An array of menuitems. |
385
+ | popup | InputSignalWithTransform<boolean, unknown> | ... | Defines if menu would displayed as a popup. |
386
+ | style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the component. |
387
+ | styleClass | InputSignal<string> | ... | Style class of the component. |
388
+ | autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
389
+ | baseZIndex | InputSignalWithTransform<number, unknown> | ... | Base zIndex value to use in layering. |
390
+ | ariaLabel | InputSignal<string> | ... | Defines a string value that labels an interactive element. |
391
+ | ariaLabelledBy | InputSignal<string> | ... | Identifier of the underlying input element. |
392
+ | id | InputSignal<string> | ... | Current id state as a string. |
393
+ | tabindex | InputSignalWithTransform<number, unknown> | ... | Index of the element in tabbing order. |
394
+ | appendTo | InputSignal<any> | 'self' | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
395
+ | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
396
+
397
+ ### Emits
398
+
399
+ | Name | Parameters | Description |
400
+ |------|------------|-------------|
401
+ | onShow | value: any | Callback to invoke when overlay menu is shown. |
402
+ | onHide | value: any | Callback to invoke when overlay menu is hidden. |
403
+ | onBlur | event: Event | Callback to invoke when the list loses focus. |
404
+ | onFocus | event: Event | Callback to invoke when the list receives focus. |
405
+
406
+ ### Templates
407
+
408
+ | Name | Type | Description |
409
+ |------|------|-------------|
410
+ | start | TemplateRef<void> | Defines template option for start. |
411
+ | end | TemplateRef<void> | Defines template option for end. |
412
+ | item | TemplateRef<MenuItemTemplateContext> | Custom item template. |
413
+ | submenuheader | TemplateRef<MenuSubmenuHeaderTemplateContext> | Custom submenu header template. |
414
+
415
+ ### Methods
416
+
417
+ | Name | Parameters | Return Type | Description |
418
+ |------|------------|-------------|-------------|
419
+ | toggle | event: Event | void | Toggles the visibility of the popup menu. |
420
+ | show | event: any | void | Displays the popup menu. |
421
+ | hide | | void | Hides the popup menu. |
422
+
423
+ ## Pass Through Options
424
+
425
+ | Name | Type | Description |
426
+ |------|------|-------------|
427
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
428
+ | start | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the start's DOM element. |
429
+ | list | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the list's DOM element. |
430
+ | submenuLabel | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the submenu label's DOM element. |
431
+ | separator | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the separator's DOM element. |
432
+ | item | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the item's DOM element. |
433
+ | itemContent | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the item content's DOM element. |
434
+ | itemLink | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the item link's DOM element. |
435
+ | itemIcon | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the item icon's DOM element. |
436
+ | itemLabel | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the item label's DOM element. |
437
+ | end | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the end's DOM element. |
438
+ | motion | MotionOptions | Used to pass options to the motion component/directive. |
439
+
440
+ ## Theming
441
+
442
+ ### CSS Classes
443
+
444
+ | Class | Description |
445
+ |-------|-------------|
446
+ | p-menu | Class name of the root element |
447
+ | p-menu-start | Class name of the start element |
448
+ | p-menu-list | Class name of the list element |
449
+ | p-menu-submenu-item | Class name of the submenu item element |
450
+ | p-menu-separator | Class name of the separator element |
451
+ | p-menu-end | Class name of the end element |
452
+ | p-menu-item | Class name of the item element |
453
+ | p-menu-item-content | Class name of the item content element |
454
+ | p-menu-item-link | Class name of the item link element |
455
+ | p-menu-item-icon | Class name of the item icon element |
456
+ | p-menu-item-label | Class name of the item label element |
457
+
458
+ ### Design Tokens
459
+
460
+ | Token | CSS Variable | Description |
461
+ |-------|--------------|-------------|
462
+ | menu.background | --p-menu-background | Background of root |
463
+ | menu.border.color | --p-menu-border-color | Border color of root |
464
+ | menu.color | --p-menu-color | Color of root |
465
+ | menu.border.radius | --p-menu-border-radius | Border radius of root |
466
+ | menu.shadow | --p-menu-shadow | Shadow of root |
467
+ | menu.transition.duration | --p-menu-transition-duration | Transition duration of root |
468
+ | menu.list.padding | --p-menu-list-padding | Padding of list |
469
+ | menu.list.gap | --p-menu-list-gap | Gap of list |
470
+ | menu.item.focus.background | --p-menu-item-focus-background | Focus background of item |
471
+ | menu.item.color | --p-menu-item-color | Color of item |
472
+ | menu.item.focus.color | --p-menu-item-focus-color | Focus color of item |
473
+ | menu.item.padding | --p-menu-item-padding | Padding of item |
474
+ | menu.item.border.radius | --p-menu-item-border-radius | Border radius of item |
475
+ | menu.item.gap | --p-menu-item-gap | Gap of item |
476
+ | menu.item.icon.color | --p-menu-item-icon-color | Icon color of item |
477
+ | menu.item.icon.focus.color | --p-menu-item-icon-focus-color | Icon focus color of item |
478
+ | menu.submenu.label.padding | --p-menu-submenu-label-padding | Padding of submenu label |
479
+ | menu.submenu.label.font.weight | --p-menu-submenu-label-font-weight | Font weight of submenu label |
480
+ | menu.submenu.label.background | --p-menu-submenu-label-background | Background of submenu label |
481
+ | menu.submenu.label.color | --p-menu-submenu-label-color | Color of submenu label |
482
+ | menu.separator.border.color | --p-menu-separator-border-color | Border color of separator |
483
+