@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.
- package/LICENSE +23 -0
- package/README.md +167 -2
- package/data/components/accordion.md +421 -0
- package/data/components/animateonscroll.md +163 -0
- package/data/components/autocomplete.md +1077 -0
- package/data/components/autofocus.md +38 -0
- package/data/components/avatar.md +417 -0
- package/data/components/badge.md +234 -0
- package/data/components/blockui.md +108 -0
- package/data/components/breadcrumb.md +178 -0
- package/data/components/button.md +774 -0
- package/data/components/card.md +138 -0
- package/data/components/carousel.md +440 -0
- package/data/components/cascadeselect.md +1387 -0
- package/data/components/chart.md +1178 -0
- package/data/components/checkbox.md +529 -0
- package/data/components/chip.md +180 -0
- package/data/components/colorpicker.md +301 -0
- package/data/components/confirmdialog.md +287 -0
- package/data/components/confirmpopup.md +417 -0
- package/data/components/contextmenu.md +491 -0
- package/data/components/dataview.md +600 -0
- package/data/components/datepicker.md +1262 -0
- package/data/components/dialog.md +622 -0
- package/data/components/divider.md +250 -0
- package/data/components/dock.md +500 -0
- package/data/components/dragdrop.md +285 -0
- package/data/components/drawer.md +510 -0
- package/data/components/dynamicdialog.md +109 -0
- package/data/components/editor.md +291 -0
- package/data/components/fieldset.md +182 -0
- package/data/components/fileupload.md +430 -0
- package/data/components/floatlabel.md +155 -0
- package/data/components/fluid.md +72 -0
- package/data/components/focustrap.md +65 -0
- package/data/components/galleria.md +627 -0
- package/data/components/iconfield.md +246 -0
- package/data/components/iftalabel.md +105 -0
- package/data/components/imagecompare.md +97 -0
- package/data/components/inplace.md +233 -0
- package/data/components/inputgroup.md +306 -0
- package/data/components/inputmask.md +518 -0
- package/data/components/inputnumber.md +675 -0
- package/data/components/inputotp.md +336 -0
- package/data/components/inputtext.md +488 -0
- package/data/components/keyfilter.md +85 -0
- package/data/components/knob.md +462 -0
- package/data/components/listbox.md +798 -0
- package/data/components/llms.md +28 -0
- package/data/components/megamenu.md +587 -0
- package/data/components/menu.md +483 -0
- package/data/components/menubar.md +462 -0
- package/data/components/message.md +449 -0
- package/data/components/metergroup.md +241 -0
- package/data/components/multiselect.md +1047 -0
- package/data/components/orderlist.md +342 -0
- package/data/components/organizationchart.md +197 -0
- package/data/components/overlay.md +217 -0
- package/data/components/paginator.md +314 -0
- package/data/components/panel.md +214 -0
- package/data/components/panelmenu.md +699 -0
- package/data/components/password.md +570 -0
- package/data/components/picklist.md +420 -0
- package/data/components/popover.md +378 -0
- package/data/components/progressbar.md +181 -0
- package/data/components/progressspinner.md +91 -0
- package/data/components/radiobutton.md +377 -0
- package/data/components/rating.md +312 -0
- package/data/components/ripple.md +89 -0
- package/data/components/scroller.md +122 -0
- package/data/components/scrollpanel.md +149 -0
- package/data/components/scrolltop.md +105 -0
- package/data/components/select.md +1206 -0
- package/data/components/selectbutton.md +356 -0
- package/data/components/skeleton.md +242 -0
- package/data/components/slider.md +337 -0
- package/data/components/speeddial.md +589 -0
- package/data/components/splitbutton.md +945 -0
- package/data/components/splitter.md +196 -0
- package/data/components/stepper.md +411 -0
- package/data/components/styleclass.md +126 -0
- package/data/components/table.md +4557 -0
- package/data/components/tabs.md +467 -0
- package/data/components/tag.md +200 -0
- package/data/components/terminal.md +118 -0
- package/data/components/textarea.md +416 -0
- package/data/components/tieredmenu.md +578 -0
- package/data/components/timeline.md +310 -0
- package/data/components/toast.md +596 -0
- package/data/components/togglebutton.md +356 -0
- package/data/components/toggleswitch.md +285 -0
- package/data/components/toolbar.md +182 -0
- package/data/components/tooltip.md +211 -0
- package/data/components/tree.md +746 -0
- package/data/components/treeselect.md +912 -0
- package/data/components/treetable.md +2814 -0
- package/data/components.json +43751 -0
- package/data/llms-full.txt +47433 -0
- package/data/llms.txt +121 -0
- package/data/manifest.json +46513 -0
- package/data/pages/accessibility.md +28 -0
- package/data/pages/animations.md +28 -0
- package/data/pages/configuration.md +210 -0
- package/data/pages/contribution.md +20 -0
- package/data/pages/customicons.md +20 -0
- package/data/pages/faq.md +20 -0
- package/data/pages/icons.md +66 -0
- package/data/pages/installation.md +71 -0
- package/data/pages/llms.md +61 -0
- package/data/pages/passthrough.md +32 -0
- package/data/pages/philosophy.md +28 -0
- package/data/pages/primeflex.md +20 -0
- package/data/pages/rtl.md +12 -0
- package/data/pages/styled.md +132 -0
- package/data/pages/tailwind.md +40 -0
- package/data/pages/unstyled.md +39 -0
- package/data/snapshot.json +9 -0
- package/dist/index.d.mts +448 -0
- package/dist/index.mjs +2501 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# LLMs.txt
|
|
2
|
+
|
|
3
|
+
LLM-optimized documentation endpoints for ExhaustiveUI components.
|
|
4
|
+
|
|
5
|
+
## Agent Skill
|
|
6
|
+
|
|
7
|
+
The markdown files above are also bundled as an Agent Skill , the SKILL.md format supported by coding agents such as Claude Code, Codex, Cursor and OpenCode. Once installed, the agent reads the component docs, API tables and guides from disk whenever it works on ExhaustiveUI code, instead of fetching them from this site each time. Install it with the skills CLI , which asks which agents to set it up for. By default the skill is installed into the current project, so your team gets it too. Add -g to install it for your user instead. You can also download the zip and extract it into a folder named exhaustive-ui in your agent's skills directory.
|
|
8
|
+
|
|
9
|
+
## /llms-full.txt
|
|
10
|
+
|
|
11
|
+
The llms-full.txt file is a complete list of all the pages in the ExhaustiveUI documentation. It is used to help AI models understand the entire documentation set.
|
|
12
|
+
|
|
13
|
+
## /llms.txt
|
|
14
|
+
|
|
15
|
+
The llms.txt file is an industry standard that helps AI models better understand and navigate the ExhaustiveUI documentation. It lists key pages in a structured format, making it easier for LLMs to retrieve relevant information.
|
|
16
|
+
|
|
17
|
+
## Manifest
|
|
18
|
+
|
|
19
|
+
/llms/manifest.json describes every component, directive, NgModule, service and exported type as structured data, for tools that need exact facts rather than prose: MCP servers, code generators, linters and design tool integrations. It is generated from the Angular metadata in the compiled library, so selectors and inputs match what the compiler accepts. Each entry point lists its import path, NgModule, services and exported types. Each component or directive lists its selector, inputs with type, allowed values, default, transform and two-way binding, outputs with payload type, templates with their context type, methods, forms support and pass-through keys.
|
|
20
|
+
|
|
21
|
+
## markdownextension-doc
|
|
22
|
+
|
|
23
|
+
Add a .md to a page's URL to display a Markdown version of that page.
|
|
24
|
+
|
|
25
|
+
## MCP Server
|
|
26
|
+
|
|
27
|
+
@exhaustive-ui/mcp is a Model Context Protocol server that gives coding agents such as Claude Code, Cursor, Claude Desktop, VS Code Copilot and Codex tools to query this documentation instead of guessing from PrimeNG memory: list and search components, read a component's docs and API, fetch a complete code example, read the setup guides, and validate an Angular template against the compiled API (unknown inputs or outputs, invalid literal values, unsupported two-way bindings, deprecated inputs, PrimeNG imports and selectors). The server reads the files described on this page from the live site, so it always reflects the deployed documentation without reinstalling the package, and keeps them in memory for 15 minutes. A snapshot of the same files is bundled in the package and used when the network is unavailable. Register it with Claude Code: Or add it to the MCP configuration of your client ( .cursor/mcp.json , claude_desktop_config.json , .vscode/mcp.json with a servers key, ...): The server exposes the list , search , get_component , get_guide , get_example , get_setup , validate_usage and version tools, the Markdown files of this page as MCP resources, and prompts for the usual tasks (use a component, build a form, theme a component, migrate from PrimeNG, audit usage). Set EXHAUSTIVE_UI_DOCS_URL to read another deployment of the docs, for instance a local ng serve , and EXHAUSTIVE_UI_MCP_OFFLINE=1 to only use the bundled snapshot. The package README lists every option.
|
|
28
|
+
|
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
# Angular MegaMenu Component
|
|
2
|
+
|
|
3
|
+
MegaMenu is navigation component that displays submenus together.
|
|
4
|
+
|
|
5
|
+
## Accessibility
|
|
6
|
+
|
|
7
|
+
Screen Reader MegaMenu component uses the menubar role along with aria-orientation and the value to describe the component 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 MegaMenu uses the menu role with an aria-labelledby defined as the id of the submenu root menuitem label. In addition, root menuitems that open a submenu have aria-haspopup , aria-expanded and aria-controls to define the relation between the item and the submenu. 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 If menuitem has a submenu, toggles the visibility of the submenu otherwise activates the menuitem and closes all open overlays. space If menuitem has a submenu, toggles the visibility of the submenu otherwise activates the menuitem and closes all open overlays. escape If focus is inside a popup submenu, closes the submenu and moves focus to the root item of the closed submenu. down arrow If focus is on a root element, open a submenu and moves focus to the first element in the submenu otherwise moves focus to the next menuitem within the submenu. up arrow If focus is on a root element, opens a submenu and moves focus to the last element in the submenu otherwise moves focus to the previous menuitem within the submenu. right arrow If focus is on a root element, moves focus to the next menuitem. If the focus in inside a submenu, moves focus to the first menuitem of the next menu group. left arrow If focus is on a root element, moves focus to the previous menuitem. If the focus in inside a submenu, moves focus to the first menuitem of the previous menu group. home Moves focus to the first menuitem within the submenu. end Moves focus to the last menuitem within the submenu.
|
|
8
|
+
|
|
9
|
+
## Basic
|
|
10
|
+
|
|
11
|
+
MegaMenu requires a collection of menuitems as its model .
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Component, OnInit } from '@angular/core';
|
|
15
|
+
import { MegaMenuModule } from '@exhaustive-ui/core/megamenu';
|
|
16
|
+
import { MegaMenuItem } from '@exhaustive-ui/core/api';
|
|
17
|
+
import { Table } from '@exhaustive-ui/core/table';
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
template: `
|
|
21
|
+
<div class="card">
|
|
22
|
+
<p-megamenu [model]="items" />
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
standalone: true,
|
|
26
|
+
imports: [MegaMenuModule]
|
|
27
|
+
})
|
|
28
|
+
export class MegamenuBasicDemo implements OnInit {
|
|
29
|
+
items: MegaMenuItem[] | undefined;
|
|
30
|
+
|
|
31
|
+
ngOnInit() {
|
|
32
|
+
this.items = [
|
|
33
|
+
{
|
|
34
|
+
label: 'Furniture',
|
|
35
|
+
icon: 'pi pi-box',
|
|
36
|
+
items: [
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
label: 'Living Room',
|
|
40
|
+
items: [{ label: 'Accessories' }, { label: 'Armchair' }, { label: 'Coffee Table' }, { label: 'Couch' }, { label: 'TV Stand' }]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
{
|
|
45
|
+
label: 'Kitchen',
|
|
46
|
+
items: [{ label: 'Bar stool' }, { label: 'Chair' }, { label: 'Table' }]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'Bathroom',
|
|
50
|
+
items: [{ label: 'Accessories' }]
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
{
|
|
55
|
+
label: 'Bedroom',
|
|
56
|
+
items: [{ label: 'Bed' }, { label: 'Chaise lounge' }, { label: 'Cupboard' }, { label: 'Dresser' }, { label: 'Wardrobe' }]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
{
|
|
61
|
+
label: 'Office',
|
|
62
|
+
items: [{ label: 'Bookcase' }, { label: 'Cabinet' }, { label: 'Chair' }, { label: 'Desk' }, { label: 'Executive Chair' }]
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: 'Electronics',
|
|
69
|
+
icon: 'pi pi-mobile',
|
|
70
|
+
items: [
|
|
71
|
+
[
|
|
72
|
+
{
|
|
73
|
+
label: 'Computer',
|
|
74
|
+
items: [{ label: 'Monitor' }, { label: 'Mouse' }, { label: 'Notebook' }, { label: 'Keyboard' }, { label: 'Printer' }, { label: 'Storage' }]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
{
|
|
79
|
+
label: 'Home Theater',
|
|
80
|
+
items: [{ label: 'Projector' }, { label: 'Speakers' }, { label: 'TVs' }]
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
label: 'Gaming',
|
|
86
|
+
items: [{ label: 'Accessories' }, { label: 'Console' }, { label: 'PC' }, { label: 'Video Games' }]
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
{
|
|
91
|
+
label: 'Appliances',
|
|
92
|
+
items: [{ label: 'Coffee Machine' }, { label: 'Fridge' }, { label: 'Oven' }, { label: 'Vaccum Cleaner' }, { label: 'Washing Machine' }]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
label: 'Sports',
|
|
99
|
+
icon: 'pi pi-clock',
|
|
100
|
+
items: [
|
|
101
|
+
[
|
|
102
|
+
{
|
|
103
|
+
label: 'Football',
|
|
104
|
+
items: [{ label: 'Kits' }, { label: 'Shoes' }, { label: 'Shorts' }, { label: 'Training' }]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
{
|
|
109
|
+
label: 'Running',
|
|
110
|
+
items: [{ label: 'Accessories' }, { label: 'Shoes' }, { label: 'T-Shirts' }, { label: 'Shorts' }]
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
{
|
|
115
|
+
label: 'Swimming',
|
|
116
|
+
items: [{ label: 'Kickboard' }, { label: 'Nose Clip' }, { label: 'Swimsuits' }, { label: 'Paddles' }]
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
{
|
|
121
|
+
label: 'Tennis',
|
|
122
|
+
items: [{ label: 'Balls' }, { label: 'Rackets' }, { label: 'Shoes' }, { label: 'Training' }]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Command
|
|
133
|
+
|
|
134
|
+
The command property of a menuitem defines the callback to run when an item is activated by click or a key event.
|
|
135
|
+
|
|
136
|
+
## Router
|
|
137
|
+
|
|
138
|
+
Menu items support navigation via routerLink, programmatic routing using commands, or external URLs.
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import { Component, OnInit } from '@angular/core';
|
|
142
|
+
import { MegaMenuModule } from '@exhaustive-ui/core/megamenu';
|
|
143
|
+
import { MegaMenuItem } from '@exhaustive-ui/core/api';
|
|
144
|
+
|
|
145
|
+
@Component({
|
|
146
|
+
template: `
|
|
147
|
+
<div class="card">
|
|
148
|
+
<p-megamenu [model]="items" />
|
|
149
|
+
</div>
|
|
150
|
+
`,
|
|
151
|
+
standalone: true,
|
|
152
|
+
imports: [MegaMenuModule]
|
|
153
|
+
})
|
|
154
|
+
export class MegamenuRouterDemo implements OnInit {
|
|
155
|
+
items: MegaMenuItem[] | undefined;
|
|
156
|
+
|
|
157
|
+
ngOnInit() {
|
|
158
|
+
this.items = [
|
|
159
|
+
{
|
|
160
|
+
label: 'Router',
|
|
161
|
+
icon: 'pi pi-palette',
|
|
162
|
+
items: [
|
|
163
|
+
[
|
|
164
|
+
{
|
|
165
|
+
label: 'RouterLink',
|
|
166
|
+
items: [{ label: 'Theming', routerLink: '/theming' }]
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
label: 'Programmatic',
|
|
173
|
+
icon: 'pi pi-link',
|
|
174
|
+
command: () => {
|
|
175
|
+
this.router.navigate(['/installation']);
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
label: 'External',
|
|
180
|
+
icon: 'pi pi-home',
|
|
181
|
+
items: [
|
|
182
|
+
[
|
|
183
|
+
{
|
|
184
|
+
label: 'External',
|
|
185
|
+
items: [
|
|
186
|
+
{ label: 'Angular', url: 'https://angular.dev/' },
|
|
187
|
+
{
|
|
188
|
+
label: 'Vite.js',
|
|
189
|
+
url: 'https://vitejs.dev/'
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Template
|
|
202
|
+
|
|
203
|
+
Custom content can be placed between p-megamenu tags. Megamenu should be horizontal for custom content.
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
import { Component, OnInit } from '@angular/core';
|
|
207
|
+
import { AvatarModule } from '@exhaustive-ui/core/avatar';
|
|
208
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
209
|
+
import { MegaMenuModule } from '@exhaustive-ui/core/megamenu';
|
|
210
|
+
import { RippleModule } from '@exhaustive-ui/core/ripple';
|
|
211
|
+
import { MegaMenuItem } from '@exhaustive-ui/core/api';
|
|
212
|
+
|
|
213
|
+
@Component({
|
|
214
|
+
template: `
|
|
215
|
+
<div class="card">
|
|
216
|
+
<p-megamenu [model]="items" [style]="{ 'border-radius': '3rem', display: 'flex' }" class="p-4 bg-surface-0 dark:bg-surface-900">
|
|
217
|
+
<ng-template #start>
|
|
218
|
+
<svg width="31" height="33" viewBox="0 0 31 33" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
219
|
+
<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)" />
|
|
220
|
+
<mask id="mask0_1_52" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="31" height="33">
|
|
221
|
+
<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)" />
|
|
222
|
+
</mask>
|
|
223
|
+
<g mask="url(#mask0_1_52)">
|
|
224
|
+
<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)" />
|
|
225
|
+
</g>
|
|
226
|
+
<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)" />
|
|
227
|
+
<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)" />
|
|
228
|
+
<path
|
|
229
|
+
fill-rule="evenodd"
|
|
230
|
+
clip-rule="evenodd"
|
|
231
|
+
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"
|
|
232
|
+
fill="var(--ground-background)"
|
|
233
|
+
/>
|
|
234
|
+
<path d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z" fill="var(--ground-background)" />
|
|
235
|
+
<path d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z" fill="var(--ground-background)" />
|
|
236
|
+
<path
|
|
237
|
+
fill-rule="evenodd"
|
|
238
|
+
clip-rule="evenodd"
|
|
239
|
+
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"
|
|
240
|
+
fill="var(--ground-background)"
|
|
241
|
+
/>
|
|
242
|
+
<path d="M13.8244 14.8932L6.87813 12.3094L5.90888 8.27235L11.8859 8.7568L13.9859 14.8932H13.8244Z" fill="var(--ground-background)" />
|
|
243
|
+
<path d="M16.5706 14.8932L23.5169 12.3094L24.4861 8.27235L18.3476 8.7568L16.4091 14.8932H16.5706Z" fill="var(--ground-background)" />
|
|
244
|
+
<path d="M18.8321 8.27235L22.2245 7.94938L19.9629 5.68861H17.7013L18.8321 8.27235Z" fill="var(--ground-background)" />
|
|
245
|
+
<path d="M11.4013 8.27235L8.00893 7.94938L10.2705 5.68861H12.5321L11.4013 8.27235Z" fill="var(--ground-background)" />
|
|
246
|
+
</svg>
|
|
247
|
+
</ng-template>
|
|
248
|
+
<ng-template #item let-item>
|
|
249
|
+
<a *ngIf="item.root" pRipple class="flex items-center cursor-pointer px-4 py-2 overflow-hidden relative font-semibold text-lg uppercase" style="border-radius: 2rem">
|
|
250
|
+
<i [ngClass]="item.icon"></i>
|
|
251
|
+
<span class="ml-2">{{ item.label }}</span>
|
|
252
|
+
</a>
|
|
253
|
+
<a *ngIf="!item.root && !item.image" class="flex items-center p-4 cursor-pointer mb-2 gap-2">
|
|
254
|
+
<span class="inline-flex items-center justify-center rounded-full bg-primary text-primary-contrast w-12 h-12">
|
|
255
|
+
<i [ngClass]="item.icon + ' text-lg'"></i>
|
|
256
|
+
</span>
|
|
257
|
+
<span class="inline-flex flex-col gap-1">
|
|
258
|
+
<span class="font-medium text-lg text-surface-900 dark:text-surface-0">{{ item.label }}</span>
|
|
259
|
+
<span class="whitespace-nowrap">{{ item.subtext }}</span>
|
|
260
|
+
</span>
|
|
261
|
+
</a>
|
|
262
|
+
<div *ngIf="item.image" class="flex flex-col items-start gap-4">
|
|
263
|
+
<img [src]="item.image" alt="megamenu-demo" class="w-full" />
|
|
264
|
+
<span>{{ item.subtext }}</span>
|
|
265
|
+
<p-button [label]="item.label" [outlined]="true"></p-button>
|
|
266
|
+
</div>
|
|
267
|
+
</ng-template>
|
|
268
|
+
<ng-template #end>
|
|
269
|
+
<p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/amyelsner.png" shape="circle" />
|
|
270
|
+
</ng-template>
|
|
271
|
+
</p-megamenu>
|
|
272
|
+
</div>
|
|
273
|
+
`,
|
|
274
|
+
standalone: true,
|
|
275
|
+
imports: [AvatarModule, ButtonModule, MegaMenuModule, RippleModule]
|
|
276
|
+
})
|
|
277
|
+
export class MegamenuTemplateDemo implements OnInit {
|
|
278
|
+
items: MegaMenuItem[] | undefined;
|
|
279
|
+
|
|
280
|
+
ngOnInit() {
|
|
281
|
+
this.items = [
|
|
282
|
+
{
|
|
283
|
+
label: 'Company',
|
|
284
|
+
root: true,
|
|
285
|
+
items: [
|
|
286
|
+
[
|
|
287
|
+
{
|
|
288
|
+
items: [
|
|
289
|
+
{ label: 'Features', icon: 'pi pi-list', subtext: 'Subtext of item' },
|
|
290
|
+
{ label: 'Customers', icon: 'pi pi-users', subtext: 'Subtext of item' },
|
|
291
|
+
{ label: 'Case Studies', icon: 'pi pi-file', subtext: 'Subtext of item' }
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
[
|
|
296
|
+
{
|
|
297
|
+
items: [
|
|
298
|
+
{ label: 'Solutions', icon: 'pi pi-shield', subtext: 'Subtext of item' },
|
|
299
|
+
{ label: 'Faq', icon: 'pi pi-question', subtext: 'Subtext of item' },
|
|
300
|
+
{ label: 'Library', icon: 'pi pi-search', subtext: 'Subtext of item' }
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
[
|
|
305
|
+
{
|
|
306
|
+
items: [
|
|
307
|
+
{ label: 'Community', icon: 'pi pi-comments', subtext: 'Subtext of item' },
|
|
308
|
+
{ label: 'Rewards', icon: 'pi pi-star', subtext: 'Subtext of item' },
|
|
309
|
+
{ label: 'Investors', icon: 'pi pi-globe', subtext: 'Subtext of item' }
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
label: 'Resources',
|
|
317
|
+
root: true
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
label: 'Contact',
|
|
321
|
+
root: true
|
|
322
|
+
}
|
|
323
|
+
];
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## Vertical
|
|
329
|
+
|
|
330
|
+
Layout of the MegaMenu is changed with the orientation property that accepts horizontal and vertical as options.
|
|
331
|
+
|
|
332
|
+
```typescript
|
|
333
|
+
import { Component, OnInit } from '@angular/core';
|
|
334
|
+
import { MegaMenu, MegaMenuModule } from '@exhaustive-ui/core/megamenu';
|
|
335
|
+
import { MegaMenuItem } from '@exhaustive-ui/core/api';
|
|
336
|
+
import { Table } from '@exhaustive-ui/core/table';
|
|
337
|
+
import { MegaMenu } from '@exhaustive-ui/core/megamenu';
|
|
338
|
+
|
|
339
|
+
@Component({
|
|
340
|
+
template: `
|
|
341
|
+
<div class="card">
|
|
342
|
+
<p-megamenu [model]="items" orientation="vertical" />
|
|
343
|
+
</div>
|
|
344
|
+
`,
|
|
345
|
+
standalone: true,
|
|
346
|
+
imports: [MegaMenuModule]
|
|
347
|
+
})
|
|
348
|
+
export class MegamenuVerticalDemo implements OnInit {
|
|
349
|
+
items: MegaMenuItem[] | undefined;
|
|
350
|
+
|
|
351
|
+
ngOnInit() {
|
|
352
|
+
this.items = [
|
|
353
|
+
{
|
|
354
|
+
label: 'Furniture',
|
|
355
|
+
icon: 'pi pi-box',
|
|
356
|
+
items: [
|
|
357
|
+
[
|
|
358
|
+
{
|
|
359
|
+
label: 'Living Room',
|
|
360
|
+
items: [{ label: 'Accessories' }, { label: 'Armchair' }, { label: 'Coffee Table' }, { label: 'Couch' }, { label: 'TV Stand' }]
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
[
|
|
364
|
+
{
|
|
365
|
+
label: 'Kitchen',
|
|
366
|
+
items: [{ label: 'Bar stool' }, { label: 'Chair' }, { label: 'Table' }]
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
label: 'Bathroom',
|
|
370
|
+
items: [{ label: 'Accessories' }]
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
[
|
|
374
|
+
{
|
|
375
|
+
label: 'Bedroom',
|
|
376
|
+
items: [{ label: 'Bed' }, { label: 'Chaise lounge' }, { label: 'Cupboard' }, { label: 'Dresser' }, { label: 'Wardrobe' }]
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
[
|
|
380
|
+
{
|
|
381
|
+
label: 'Office',
|
|
382
|
+
items: [{ label: 'Bookcase' }, { label: 'Cabinet' }, { label: 'Chair' }, { label: 'Desk' }, { label: 'Executive Chair' }]
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
label: 'Electronics',
|
|
389
|
+
icon: 'pi pi-mobile',
|
|
390
|
+
items: [
|
|
391
|
+
[
|
|
392
|
+
{
|
|
393
|
+
label: 'Computer',
|
|
394
|
+
items: [{ label: 'Monitor' }, { label: 'Mouse' }, { label: 'Notebook' }, { label: 'Keyboard' }, { label: 'Printer' }, { label: 'Storage' }]
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
[
|
|
398
|
+
{
|
|
399
|
+
label: 'Home Theater',
|
|
400
|
+
items: [{ label: 'Projector' }, { label: 'Speakers' }, { label: 'TVs' }]
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
[
|
|
404
|
+
{
|
|
405
|
+
label: 'Gaming',
|
|
406
|
+
items: [{ label: 'Accessories' }, { label: 'Console' }, { label: 'PC' }, { label: 'Video Games' }]
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
[
|
|
410
|
+
{
|
|
411
|
+
label: 'Appliances',
|
|
412
|
+
items: [{ label: 'Coffee Machine' }, { label: 'Fridge' }, { label: 'Oven' }, { label: 'Vaccum Cleaner' }, { label: 'Washing Machine' }]
|
|
413
|
+
}
|
|
414
|
+
]
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
label: 'Sports',
|
|
419
|
+
icon: 'pi pi-clock',
|
|
420
|
+
items: [
|
|
421
|
+
[
|
|
422
|
+
{
|
|
423
|
+
label: 'Football',
|
|
424
|
+
items: [{ label: 'Kits' }, { label: 'Shoes' }, { label: 'Shorts' }, { label: 'Training' }]
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
[
|
|
428
|
+
{
|
|
429
|
+
label: 'Running',
|
|
430
|
+
items: [{ label: 'Accessories' }, { label: 'Shoes' }, { label: 'T-Shirts' }, { label: 'Shorts' }]
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
[
|
|
434
|
+
{
|
|
435
|
+
label: 'Swimming',
|
|
436
|
+
items: [{ label: 'Kickboard' }, { label: 'Nose Clip' }, { label: 'Swimsuits' }, { label: 'Paddles' }]
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
[
|
|
440
|
+
{
|
|
441
|
+
label: 'Tennis',
|
|
442
|
+
items: [{ label: 'Balls' }, { label: 'Rackets' }, { label: 'Shoes' }, { label: 'Training' }]
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
]
|
|
446
|
+
}
|
|
447
|
+
];
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
## Mega Menu
|
|
453
|
+
|
|
454
|
+
MegaMenu is navigation component that displays submenus together.
|
|
455
|
+
|
|
456
|
+
### Props
|
|
457
|
+
|
|
458
|
+
| Name | Type | Default | Description |
|
|
459
|
+
|------|------|---------|-------------|
|
|
460
|
+
| dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
|
|
461
|
+
| unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
|
|
462
|
+
| pt | InputSignal<MegaMenuPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
463
|
+
| ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
|
|
464
|
+
| model | InputSignal<MegaMenuItem[]> | ... | An array of menuitems. |
|
|
465
|
+
| orientation | InputSignal<string> | ... | Defines the orientation. |
|
|
466
|
+
| id | InputSignal<string> | ... | Current id state as a string. |
|
|
467
|
+
| ariaLabel | InputSignal<string> | ... | Defines a string value that labels an interactive element. |
|
|
468
|
+
| ariaLabelledBy | InputSignal<string> | ... | Identifier of the underlying input element. |
|
|
469
|
+
| breakpoint | InputSignal<string> | ... | The breakpoint to define the maximum width boundary. |
|
|
470
|
+
| scrollHeight | InputSignal<string> | ... | Height of the viewport, a scrollbar is defined if height of list exceeds this value. |
|
|
471
|
+
| disabled | InputSignalWithTransform<boolean, unknown> | ... | When present, it specifies that the component should be disabled. |
|
|
472
|
+
| tabindex | InputSignalWithTransform<number, unknown> | ... | Index of the element in tabbing order. |
|
|
473
|
+
|
|
474
|
+
### Templates
|
|
475
|
+
|
|
476
|
+
| Name | Type | Description |
|
|
477
|
+
|------|------|-------------|
|
|
478
|
+
| start | TemplateRef<void> | Defines template option for start. |
|
|
479
|
+
| end | TemplateRef<void> | Defines template option for end. |
|
|
480
|
+
| submenuicon | TemplateRef<void> | Defines template option for submenu icon. |
|
|
481
|
+
| item | TemplateRef<MegaMenuItemTemplateContext> | Custom item template. |
|
|
482
|
+
| button | TemplateRef<void> | Custom menu button template on responsive mode. |
|
|
483
|
+
| buttonicon | TemplateRef<void> | Custom menu button icon template on responsive mode. |
|
|
484
|
+
|
|
485
|
+
## Pass Through Options
|
|
486
|
+
|
|
487
|
+
| Name | Type | Description |
|
|
488
|
+
|------|------|-------------|
|
|
489
|
+
| root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
|
|
490
|
+
| start | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the start's DOM element. |
|
|
491
|
+
| button | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the button's DOM element. |
|
|
492
|
+
| buttonIcon | PassThroughOption<HTMLElement, I> | Used to pass attributes to the button icon's DOM element. |
|
|
493
|
+
| rootList | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the root list's DOM element. |
|
|
494
|
+
| submenuLabel | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the submenu label's DOM element. |
|
|
495
|
+
| separator | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the separator's DOM element. |
|
|
496
|
+
| item | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the item's DOM element. |
|
|
497
|
+
| itemContent | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the item content's DOM element. |
|
|
498
|
+
| itemLink | PassThroughOption<HTMLAnchorElement, I> | Used to pass attributes to the item link's DOM element. |
|
|
499
|
+
| itemIcon | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the item icon's DOM element. |
|
|
500
|
+
| itemLabel | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the item label's DOM element. |
|
|
501
|
+
| submenuIcon | PassThroughOption<HTMLElement, I> | Used to pass attributes to the submenu icon's DOM element. |
|
|
502
|
+
| overlay | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the overlay's DOM element. |
|
|
503
|
+
| grid | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the grid's DOM element. |
|
|
504
|
+
| column | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the column's DOM element. |
|
|
505
|
+
| submenu | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the submenu's DOM element. |
|
|
506
|
+
| end | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the end's DOM element. |
|
|
507
|
+
|
|
508
|
+
## Theming
|
|
509
|
+
|
|
510
|
+
### CSS Classes
|
|
511
|
+
|
|
512
|
+
| Class | Description |
|
|
513
|
+
|-------|-------------|
|
|
514
|
+
| p-megamenu | Class name of the root element |
|
|
515
|
+
| p-megamenu-start | Class name of the start element |
|
|
516
|
+
| p-megamenu-button | Class name of the button element |
|
|
517
|
+
| p-megamenu-root-list | Class name of the root list element |
|
|
518
|
+
| p-megamenu-submenu-item | Class name of the submenu item element |
|
|
519
|
+
| p-megamenu-item | Class name of the item element |
|
|
520
|
+
| p-megamenu-item-content | Class name of the item content element |
|
|
521
|
+
| p-megamenu-item-link | Class name of the item link element |
|
|
522
|
+
| p-megamenu-item-icon | Class name of the item icon element |
|
|
523
|
+
| p-megamenu-item-label | Class name of the item label element |
|
|
524
|
+
| p-megamenu-submenu-icon | Class name of the submenu icon element |
|
|
525
|
+
| p-megamenu-panel | Class name of the panel element |
|
|
526
|
+
| p-megamenu-grid | Class name of the grid element |
|
|
527
|
+
| p-megamenu-submenu | Class name of the submenu element |
|
|
528
|
+
| p-megamenu-submenu-item-label | Class name of the submenu item label element |
|
|
529
|
+
| p-megamenu-separator | Class name of the separator element |
|
|
530
|
+
| p-megamenu-end | Class name of the end element |
|
|
531
|
+
|
|
532
|
+
### Design Tokens
|
|
533
|
+
|
|
534
|
+
| Token | CSS Variable | Description |
|
|
535
|
+
|-------|--------------|-------------|
|
|
536
|
+
| megamenu.background | --p-megamenu-background | Background of root |
|
|
537
|
+
| megamenu.border.color | --p-megamenu-border-color | Border color of root |
|
|
538
|
+
| megamenu.border.radius | --p-megamenu-border-radius | Border radius of root |
|
|
539
|
+
| megamenu.color | --p-megamenu-color | Color of root |
|
|
540
|
+
| megamenu.gap | --p-megamenu-gap | Gap of root |
|
|
541
|
+
| megamenu.vertical.orientation.padding | --p-megamenu-vertical-orientation-padding | Vertical orientation padding of root |
|
|
542
|
+
| megamenu.vertical.orientation.gap | --p-megamenu-vertical-orientation-gap | Vertical orientation gap of root |
|
|
543
|
+
| megamenu.horizontal.orientation.padding | --p-megamenu-horizontal-orientation-padding | Horizontal orientation padding of root |
|
|
544
|
+
| megamenu.horizontal.orientation.gap | --p-megamenu-horizontal-orientation-gap | Horizontal orientation gap of root |
|
|
545
|
+
| megamenu.transition.duration | --p-megamenu-transition-duration | Transition duration of root |
|
|
546
|
+
| megamenu.base.item.border.radius | --p-megamenu-base-item-border-radius | Border radius of base item |
|
|
547
|
+
| megamenu.base.item.padding | --p-megamenu-base-item-padding | Padding of base item |
|
|
548
|
+
| megamenu.item.focus.background | --p-megamenu-item-focus-background | Focus background of item |
|
|
549
|
+
| megamenu.item.active.background | --p-megamenu-item-active-background | Active background of item |
|
|
550
|
+
| megamenu.item.color | --p-megamenu-item-color | Color of item |
|
|
551
|
+
| megamenu.item.focus.color | --p-megamenu-item-focus-color | Focus color of item |
|
|
552
|
+
| megamenu.item.active.color | --p-megamenu-item-active-color | Active color of item |
|
|
553
|
+
| megamenu.item.padding | --p-megamenu-item-padding | Padding of item |
|
|
554
|
+
| megamenu.item.border.radius | --p-megamenu-item-border-radius | Border radius of item |
|
|
555
|
+
| megamenu.item.gap | --p-megamenu-item-gap | Gap of item |
|
|
556
|
+
| megamenu.item.icon.color | --p-megamenu-item-icon-color | Icon color of item |
|
|
557
|
+
| megamenu.item.icon.focus.color | --p-megamenu-item-icon-focus-color | Icon focus color of item |
|
|
558
|
+
| megamenu.item.icon.active.color | --p-megamenu-item-icon-active-color | Icon active color of item |
|
|
559
|
+
| megamenu.overlay.padding | --p-megamenu-overlay-padding | Padding of overlay |
|
|
560
|
+
| megamenu.overlay.background | --p-megamenu-overlay-background | Background of overlay |
|
|
561
|
+
| megamenu.overlay.border.color | --p-megamenu-overlay-border-color | Border color of overlay |
|
|
562
|
+
| megamenu.overlay.border.radius | --p-megamenu-overlay-border-radius | Border radius of overlay |
|
|
563
|
+
| megamenu.overlay.color | --p-megamenu-overlay-color | Color of overlay |
|
|
564
|
+
| megamenu.overlay.shadow | --p-megamenu-overlay-shadow | Shadow of overlay |
|
|
565
|
+
| megamenu.overlay.gap | --p-megamenu-overlay-gap | Gap of overlay |
|
|
566
|
+
| megamenu.submenu.padding | --p-megamenu-submenu-padding | Padding of submenu |
|
|
567
|
+
| megamenu.submenu.gap | --p-megamenu-submenu-gap | Gap of submenu |
|
|
568
|
+
| megamenu.submenu.label.padding | --p-megamenu-submenu-label-padding | Padding of submenu label |
|
|
569
|
+
| megamenu.submenu.label.font.weight | --p-megamenu-submenu-label-font-weight | Font weight of submenu label |
|
|
570
|
+
| megamenu.submenu.label.background | --p-megamenu-submenu-label-background | Background of submenu label |
|
|
571
|
+
| megamenu.submenu.label.color | --p-megamenu-submenu-label-color | Color of submenu label |
|
|
572
|
+
| megamenu.submenu.icon.size | --p-megamenu-submenu-icon-size | Size of submenu icon |
|
|
573
|
+
| megamenu.submenu.icon.color | --p-megamenu-submenu-icon-color | Color of submenu icon |
|
|
574
|
+
| megamenu.submenu.icon.focus.color | --p-megamenu-submenu-icon-focus-color | Focus color of submenu icon |
|
|
575
|
+
| megamenu.submenu.icon.active.color | --p-megamenu-submenu-icon-active-color | Active color of submenu icon |
|
|
576
|
+
| megamenu.separator.border.color | --p-megamenu-separator-border-color | Border color of separator |
|
|
577
|
+
| megamenu.mobile.button.border.radius | --p-megamenu-mobile-button-border-radius | Border radius of mobile button |
|
|
578
|
+
| megamenu.mobile.button.size | --p-megamenu-mobile-button-size | Size of mobile button |
|
|
579
|
+
| megamenu.mobile.button.color | --p-megamenu-mobile-button-color | Color of mobile button |
|
|
580
|
+
| megamenu.mobile.button.hover.color | --p-megamenu-mobile-button-hover-color | Hover color of mobile button |
|
|
581
|
+
| megamenu.mobile.button.hover.background | --p-megamenu-mobile-button-hover-background | Hover background of mobile button |
|
|
582
|
+
| megamenu.mobile.button.focus.ring.width | --p-megamenu-mobile-button-focus-ring-width | Focus ring width of mobile button |
|
|
583
|
+
| megamenu.mobile.button.focus.ring.style | --p-megamenu-mobile-button-focus-ring-style | Focus ring style of mobile button |
|
|
584
|
+
| megamenu.mobile.button.focus.ring.color | --p-megamenu-mobile-button-focus-ring-color | Focus ring color of mobile button |
|
|
585
|
+
| megamenu.mobile.button.focus.ring.offset | --p-megamenu-mobile-button-focus-ring-offset | Focus ring offset of mobile button |
|
|
586
|
+
| megamenu.mobile.button.focus.ring.shadow | --p-megamenu-mobile-button-focus-ring-shadow | Focus ring shadow of mobile button |
|
|
587
|
+
|