@exhaustive-ui/mcp 0.0.0-stage → 22.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 e-xiste
4
+ Copyright (c) 2026 OpenNG (as per the Optimus UI license)
5
+ Copyright (c) 2016-2026 PrimeTek (as per the PrimeNG community version license)
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,168 @@
1
- # Temporary Holding Version
1
+ # @exhaustive-ui/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [Model Context Protocol](https://modelcontextprotocol.io/) server for the [ExhaustiveUI](https://exhaustive-ui.e-xiste.com) Angular component library (`@exhaustive-ui/core`).
4
+
5
+ It gives coding agents (Claude Code, Cursor, Claude Desktop, VS Code, Codex...) tools to read the ExhaustiveUI documentation and compiled API instead of guessing from PrimeNG memory: list and search components, read a component's docs and API, fetch complete code examples, read the setup guides and validate Angular templates against the real inputs, outputs and allowed values.
6
+
7
+ ```bash
8
+ npx -y @exhaustive-ui/mcp
9
+ ```
10
+
11
+ The package also exposes the `exhaustive-ui-mcp` bin when installed globally or through a package manager. Node.js 20 or later is required.
12
+
13
+ ## Setup
14
+
15
+ ### Claude Code
16
+
17
+ ```bash
18
+ claude mcp add exhaustive-ui -s user -- npx -y @exhaustive-ui/mcp
19
+ ```
20
+
21
+ Project-only setup (writes `.mcp.json` in the current project):
22
+
23
+ ```bash
24
+ claude mcp add exhaustive-ui -- npx -y @exhaustive-ui/mcp
25
+ ```
26
+
27
+ ### Cursor
28
+
29
+ Add `.cursor/mcp.json` in a project or edit `~/.cursor/mcp.json`:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "exhaustive-ui": {
35
+ "command": "npx",
36
+ "args": ["-y", "@exhaustive-ui/mcp"]
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ### Claude Desktop
43
+
44
+ Edit `claude_desktop_config.json` (Settings > Developer > Edit Config):
45
+
46
+ ```json
47
+ {
48
+ "mcpServers": {
49
+ "exhaustive-ui": {
50
+ "command": "npx",
51
+ "args": ["-y", "@exhaustive-ui/mcp"]
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ ### VS Code
58
+
59
+ Add `.vscode/mcp.json` in a project or configure the same server globally:
60
+
61
+ ```json
62
+ {
63
+ "servers": {
64
+ "exhaustive-ui": {
65
+ "command": "npx",
66
+ "args": ["-y", "@exhaustive-ui/mcp"]
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Codex
73
+
74
+ ```bash
75
+ codex mcp add exhaustive-ui -- npx -y @exhaustive-ui/mcp
76
+ ```
77
+
78
+ Or add it to `~/.codex/config.toml`:
79
+
80
+ ```toml
81
+ [mcp_servers.exhaustive-ui]
82
+ command = "npx"
83
+ args = ["-y", "@exhaustive-ui/mcp"]
84
+ ```
85
+
86
+ ## Tools
87
+
88
+ | Tool | Purpose |
89
+ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
90
+ | `list` | List components, directives, guides, code examples or MCP resources (`kind`, `limit`, `offset`). |
91
+ | `search` | Search component docs, guides, API members (inputs, outputs, templates, PT keys, CSS classes, tokens) and code examples (`query`, `scope`). |
92
+ | `get_component` | Read a component: selectors, import path, sections, available examples; optionally its API and compiled declarations (`includeApi`), example code (`includeExamples`) and the full Markdown document (`detail: "full"`). Accepts a batch of up to 10 `components`. |
93
+ | `get_guide` | Read a guide by name or route (`installation`, `configuration`, `theming/styled`, `tailwind`, `guides/accessibility`...), optionally one `section` or the full document. |
94
+ | `get_example` | Return one complete, source-backed code example of a component (a standalone Angular component with template and imports), by `section` or feature `variant`. |
95
+ | `get_setup` | Return the setup guidance for an `environment`: `angular-cli` (default), `configuration`, `styled`, `unstyled`, `tailwind`, `icons`, `custom-icons`, `passthrough`. |
96
+ | `validate_usage` | Check an Angular template or component source against the compiled API of a component: unknown inputs and outputs, invalid literal values, unsupported two-way bindings, deprecated inputs, wrong selectors and PrimeNG imports. Accepts a batch of `usages`. |
97
+ | `version` | Return the server version, the documented library version, where the docs are read from (live site, cache, offline snapshot) and the registered tools, resources and prompts. |
98
+
99
+ Component names are resolved loosely: `button`, `p-button`, `Button`, `[pTooltip]`, `@exhaustive-ui/core/select`, a docs URL, and the PrimeNG names of renamed components (`dropdown`, `calendar`, `sidebar`, `overlaypanel`, `inputswitch`, `tabview`...) all work.
100
+
101
+ Every tool answers with `structuredContent` and the same JSON serialized in its text content, so clients that only forward text see the whole answer.
102
+
103
+ ## Resources and prompts
104
+
105
+ Static resources:
106
+
107
+ - `exhaustive-ui://docs/llms.txt`
108
+ - `exhaustive-ui://docs/llms-full.txt`
109
+ - `exhaustive-ui://docs/manifest.json`
110
+ - `exhaustive-ui://docs/components.json`
111
+
112
+ Resource templates:
113
+
114
+ - `component-docs`: `exhaustive-ui://docs/components/{component}.md`
115
+ - `component-api`: `exhaustive-ui://docs/components/{component}/api.json`
116
+ - `guide-docs`: `exhaustive-ui://docs/pages/{guide}.md`
117
+ - `example-docs`: `exhaustive-ui://docs/examples/{component}/{section}.md`
118
+
119
+ Prompts: `use_component`, `build_form`, `theme_component`, `migrate_from_primeng`, `audit_component_usage`.
120
+
121
+ ## Where the docs come from
122
+
123
+ The docs site publishes machine-readable documentation under [`/llms/`](https://exhaustive-ui.e-xiste.com/llms): `llms.txt`, `llms-full.txt`, `manifest.json` (compiled selectors, inputs, outputs, templates, PT keys of every entry point), `components.json` (sections, examples and API of every component, plus the guides), and one Markdown file per component and guide.
124
+
125
+ The server reads these files from the live site at runtime and keeps them in memory for 15 minutes, so it always reflects the deployed documentation without republishing the package. A snapshot of the same files is bundled in the package (`data/`) and used when the site cannot be reached; after a connection failure the site is not retried for a minute so an offline session stays responsive. The `version` tool reports which source answered.
126
+
127
+ ## Environment variables
128
+
129
+ | Variable | Default | Purpose |
130
+ | --------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------ |
131
+ | `EXHAUSTIVE_UI_DOCS_URL` | `https://exhaustive-ui.e-xiste.com` | Docs site to read from, for instance a local `ng serve` of the docs app. |
132
+ | `EXHAUSTIVE_UI_MCP_CACHE_TTL` | `900` | Seconds a fetched document is reused before it is fetched again. |
133
+ | `EXHAUSTIVE_UI_MCP_FETCH_TIMEOUT` | `10000` | Milliseconds before a request to the docs site is abandoned. |
134
+ | `EXHAUSTIVE_UI_MCP_OFFLINE` | unset | Set to `1` to never contact the site and only use the bundled snapshot. |
135
+ | `EXHAUSTIVE_UI_MCP_SNAPSHOT_DIR` | the package's `data/` directory | Directory of the offline snapshot (a copy of the site's `/llms/` directory). |
136
+
137
+ Example, Claude Code pointed at a local docs server:
138
+
139
+ ```bash
140
+ claude mcp add exhaustive-ui -e EXHAUSTIVE_UI_DOCS_URL=http://localhost:4200 -- npx -y @exhaustive-ui/mcp
141
+ ```
142
+
143
+ ## Programmatic use
144
+
145
+ ```ts
146
+ import { createExhaustiveUiMcpServer } from '@exhaustive-ui/mcp';
147
+
148
+ const server = await createExhaustiveUiMcpServer({ config: { docsUrl: 'http://localhost:4200' } });
149
+ // connect `server` to any @modelcontextprotocol/sdk transport
150
+ ```
151
+
152
+ ## Development
153
+
154
+ ```bash
155
+ pnpm --filter @exhaustive-ui/mcp build # builds data/ from apps/docs/public/llms (or downloads it), then bundles dist/
156
+ pnpm --filter @exhaustive-ui/mcp test # vitest, against the fixture snapshot in test/fixtures (no network)
157
+ ```
158
+
159
+ ## Links
160
+
161
+ - [ExhaustiveUI documentation](https://exhaustive-ui.e-xiste.com/)
162
+ - [LLM documentation endpoints](https://exhaustive-ui.e-xiste.com/llms)
163
+ - [Model Context Protocol](https://modelcontextprotocol.io/)
164
+ - [GitHub repository](https://github.com/e-xiste/exhaustive-ui)
165
+
166
+ ## License
167
+
168
+ MIT
@@ -0,0 +1,421 @@
1
+ # Angular Accordion Component
2
+
3
+ Accordion groups a collection of contents in tabs.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Accordion header elements have a button role and use aria-controls to define the id of the content section along with aria-expanded for the visibility state. The value to read a header element defaults to the value of the header property and can be customized by defining an aria-label or aria-labelledby property. Each header has a heading role, for which the level is customized by headerAriaLevel and has a default level of 2 as per W3C specifications. Disabled accordions headers use aria-disabled and are excluded from the keybord navigation. The content uses region role, defines an id that matches the aria-controls of the header and aria-labelledby referring to the id of the header. Header Keyboard Support
8
+
9
+ ## Basic
10
+
11
+ Accordion is defined using AccordionPanel , AccordionHeader and AccordionContent components. Each AccordionPanel must contain a unique value property to specify the active item.
12
+
13
+ ```typescript
14
+ import { Component } from '@angular/core';
15
+ import { AccordionModule } from '@exhaustive-ui/core/accordion';
16
+
17
+ @Component({
18
+ template: `
19
+ <div class="card flex justify-center">
20
+ <p-accordion value="0">
21
+ <p-accordion-panel value="0">
22
+ <p-accordion-header>Header I</p-accordion-header>
23
+ <p-accordion-content>
24
+ <p class="m-0">
25
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
26
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
27
+ laborum.
28
+ </p>
29
+ </p-accordion-content>
30
+ </p-accordion-panel>
31
+ <p-accordion-panel value="1">
32
+ <p-accordion-header>Header II</p-accordion-header>
33
+ <p-accordion-content>
34
+ <p class="m-0">
35
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo
36
+ enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.
37
+ </p>
38
+ </p-accordion-content>
39
+ </p-accordion-panel>
40
+ <p-accordion-panel value="2">
41
+ <p-accordion-header>Header III</p-accordion-header>
42
+ <p-accordion-content>
43
+ <p class="m-0">
44
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo
45
+ enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.
46
+ </p>
47
+ </p-accordion-content>
48
+ </p-accordion-panel>
49
+ </p-accordion>
50
+ </div>
51
+ `,
52
+ standalone: true,
53
+ imports: [AccordionModule]
54
+ })
55
+ export class AccordionBasicDemo {}
56
+ ```
57
+
58
+ ## Controlled
59
+
60
+ Panels can be controlled programmatically using value property as a model.
61
+
62
+ ```typescript
63
+ import { Component } from '@angular/core';
64
+ import { AccordionModule } from '@exhaustive-ui/core/accordion';
65
+ import { ButtonModule } from '@exhaustive-ui/core/button';
66
+
67
+ @Component({
68
+ template: `
69
+ <div class="card">
70
+ <div class="flex mb-4 gap-2 justify-end">
71
+ <p-button (onClick)="active = '0'" [rounded]="true" label="1" styleClass="w-8 h-8 p-0" [outlined]="active !== '0'" />
72
+ <p-button (onClick)="active = '1'" [rounded]="true" label="2" styleClass="w-8 h-8 p-0" [outlined]="active !== '1'" />
73
+ <p-button (onClick)="active = '2'" [rounded]="true" label="3" styleClass="w-8 h-8 p-0" [outlined]="active !== '2'" />
74
+ </div>
75
+ <p-accordion [(value)]="active">
76
+ <p-accordion-panel value="0">
77
+ <p-accordion-header>Header I</p-accordion-header>
78
+ <p-accordion-content>
79
+ <p class="m-0">
80
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
81
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
82
+ laborum.
83
+ </p>
84
+ </p-accordion-content>
85
+ </p-accordion-panel>
86
+ <p-accordion-panel value="1">
87
+ <p-accordion-header>Header II</p-accordion-header>
88
+ <p-accordion-content>
89
+ <p class="m-0">
90
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo
91
+ enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.
92
+ </p>
93
+ </p-accordion-content>
94
+ </p-accordion-panel>
95
+ <p-accordion-panel value="2">
96
+ <p-accordion-header>Header III</p-accordion-header>
97
+ <p-accordion-content>
98
+ <p class="m-0">
99
+ At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in
100
+ culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.
101
+ </p>
102
+ </p-accordion-content>
103
+ </p-accordion-panel>
104
+ </p-accordion>
105
+ </div>
106
+ `,
107
+ standalone: true,
108
+ imports: [AccordionModule, ButtonModule]
109
+ })
110
+ export class AccordionControlledDemo {
111
+ active: string = '0';
112
+ }
113
+ ```
114
+
115
+ ## Disabled
116
+
117
+ Enabling disabled property of an AccordionPanel prevents user interaction.
118
+
119
+ ```typescript
120
+ import { Component } from '@angular/core';
121
+ import { AccordionModule } from '@exhaustive-ui/core/accordion';
122
+
123
+ @Component({
124
+ template: `
125
+ <div class="card flex justify-content-center">
126
+ <p-accordion [value]="['0']" [multiple]="true">
127
+ <p-accordion-panel value="0">
128
+ <p-accordion-header>Header I</p-accordion-header>
129
+ <p-accordion-content>
130
+ <p class="m-0">
131
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
132
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
133
+ laborum.
134
+ </p>
135
+ </p-accordion-content>
136
+ </p-accordion-panel>
137
+ <p-accordion-panel value="1">
138
+ <p-accordion-header>Header II</p-accordion-header>
139
+ <p-accordion-content>
140
+ <p class="m-0">
141
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo
142
+ enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.
143
+ </p>
144
+ </p-accordion-content>
145
+ </p-accordion-panel>
146
+ <p-accordion-panel value="2">
147
+ <p-accordion-header>Header III</p-accordion-header>
148
+ <p-accordion-content>
149
+ <p class="m-0">
150
+ At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in
151
+ culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.
152
+ </p>
153
+ </p-accordion-content>
154
+ </p-accordion-panel>
155
+ <p-accordion-panel value="3" [disabled]="true">
156
+ <p-accordion-header>Header IV</p-accordion-header>
157
+ </p-accordion-panel>
158
+ </p-accordion>
159
+ </div>
160
+ `,
161
+ standalone: true,
162
+ imports: [AccordionModule]
163
+ })
164
+ export class AccordionDisabledDemo {}
165
+ ```
166
+
167
+ ## Dynamic
168
+
169
+ AccordionPanel can be generated dynamically using the standard &#64;for block.
170
+
171
+ ```typescript
172
+ import { Component } from '@angular/core';
173
+ import { AccordionModule } from '@exhaustive-ui/core/accordion';
174
+
175
+ @Component({
176
+ template: `
177
+ <div class="card">
178
+ <p-accordion [value]="['0']">
179
+ @for (tab of tabs; track tab.title) {
180
+ <p-accordion-panel [value]="tab.value">
181
+ <p-accordion-header>{{ tab.title }}</p-accordion-header>
182
+ <p-accordion-content>
183
+ <p class="m-0">{{ tab.content }}</p>
184
+ </p-accordion-content>
185
+ </p-accordion-panel>
186
+ }
187
+ </p-accordion>
188
+ </div>
189
+ `,
190
+ standalone: true,
191
+ imports: [AccordionModule]
192
+ })
193
+ export class AccordionDynamicDemo {
194
+ tabs: any[];
195
+ }
196
+ ```
197
+
198
+ ## Multiple
199
+
200
+ Only one tab at a time can be active by default, enabling multiple property changes this behavior to allow multiple tabs. In this case value needs to be an array.
201
+
202
+ ```typescript
203
+ import { Component } from '@angular/core';
204
+ import { AccordionModule } from '@exhaustive-ui/core/accordion';
205
+
206
+ @Component({
207
+ template: `
208
+ <div class="card flex justify-content-center">
209
+ <p-accordion [value]="['0']" [multiple]="true">
210
+ <p-accordion-panel value="0">
211
+ <p-accordion-header>Header I</p-accordion-header>
212
+ <p-accordion-content>
213
+ <p class="m-0">
214
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
215
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
216
+ laborum.
217
+ </p>
218
+ </p-accordion-content>
219
+ </p-accordion-panel>
220
+ <p-accordion-panel value="1">
221
+ <p-accordion-header>Header II</p-accordion-header>
222
+ <p-accordion-content>
223
+ <p class="m-0">
224
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo
225
+ enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.
226
+ </p>
227
+ </p-accordion-content>
228
+ </p-accordion-panel>
229
+ <p-accordion-panel value="2">
230
+ <p-accordion-header>Header III</p-accordion-header>
231
+ <p-accordion-content>
232
+ <p class="m-0">
233
+ At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in
234
+ culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.
235
+ </p>
236
+ </p-accordion-content>
237
+ </p-accordion-panel>
238
+ </p-accordion>
239
+ </div>
240
+ `,
241
+ standalone: true,
242
+ imports: [AccordionModule]
243
+ })
244
+ export class AccordionMultipleDemo {}
245
+ ```
246
+
247
+ ## Template
248
+
249
+ Accordion is customized with toggleicon template.
250
+
251
+ ```typescript
252
+ import { Component } from '@angular/core';
253
+ import { AccordionModule } from '@exhaustive-ui/core/accordion';
254
+ import { AvatarModule } from '@exhaustive-ui/core/avatar';
255
+ import { BadgeModule } from '@exhaustive-ui/core/badge';
256
+
257
+ @Component({
258
+ template: `
259
+ <div class="card flex justify-content-center">
260
+ <p-accordion value="0">
261
+ <p-accordion-panel value="0">
262
+ <p-accordion-header>
263
+ <ng-template #toggleicon let-active="active">
264
+ @if (active) {
265
+ <i class="pi pi-minus"></i>
266
+ } @else {
267
+ <i class="pi pi-plus"></i>
268
+ }
269
+ </ng-template>
270
+ <span class="flex items-center gap-2 w-full">
271
+ <p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/amyelsner.png" shape="circle" />
272
+ <span class="font-bold whitespace-nowrap">Amy Elsner</span>
273
+ <p-badge value="3" class="ml-auto mr-2" />
274
+ </span>
275
+ </p-accordion-header>
276
+ <p-accordion-content>
277
+ <p class="m-0">
278
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
279
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
280
+ laborum.
281
+ </p>
282
+ </p-accordion-content>
283
+ </p-accordion-panel>
284
+ <p-accordion-panel value="1">
285
+ <p-accordion-header>
286
+ <ng-template #toggleicon let-active="active">
287
+ @if (active) {
288
+ <i class="pi pi-minus"></i>
289
+ } @else {
290
+ <i class="pi pi-plus"></i>
291
+ }
292
+ </ng-template>
293
+ <span class="flex items-center gap-2 w-full">
294
+ <p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/onyamalimba.png" shape="circle" />
295
+ <span class="font-bold whitespace-nowrap">Onyama Limba</span>
296
+ <p-badge value="4" class="ml-auto mr-2" />
297
+ </span>
298
+ </p-accordion-header>
299
+ <p-accordion-content>
300
+ <p class="m-0">
301
+ Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo
302
+ enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.
303
+ </p>
304
+ </p-accordion-content>
305
+ </p-accordion-panel>
306
+ <p-accordion-panel value="2">
307
+ <p-accordion-header>
308
+ <ng-template #toggleicon let-active="active">
309
+ @if (active) {
310
+ <i class="pi pi-minus"></i>
311
+ } @else {
312
+ <i class="pi pi-plus"></i>
313
+ }
314
+ </ng-template>
315
+ <span class="flex items-center gap-2 w-full">
316
+ <p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/ionibowcher.png" shape="circle" />
317
+ <span class="font-bold whitespace-nowrap">Ioni Bowcher</span>
318
+ <p-badge value="2" class="ml-auto mr-2" />
319
+ </span>
320
+ </p-accordion-header>
321
+ <p-accordion-content>
322
+ <p class="m-0">
323
+ At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in
324
+ culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.
325
+ </p>
326
+ </p-accordion-content>
327
+ </p-accordion-panel>
328
+ </p-accordion>
329
+ </div>
330
+ `,
331
+ standalone: true,
332
+ imports: [AccordionModule, AvatarModule, BadgeModule]
333
+ })
334
+ export class AccordionTemplateDemo {}
335
+ ```
336
+
337
+ ## Accordion
338
+
339
+ Accordion groups a collection of contents in tabs.
340
+
341
+ ### Props
342
+
343
+ | Name | Type | Default | Description |
344
+ |------|------|---------|-------------|
345
+ | value | ModelSignal<string \| number \| string[] \| number[]> | undefined | Value of the active tab. |
346
+ | multiple | InputSignalWithTransform<boolean, any> | false | When enabled, multiple tabs can be activated at the same time. |
347
+ | expandIcon | InputSignal<string> | ... | Icon of a collapsed tab. |
348
+ | collapseIcon | InputSignal<string> | ... | Icon of an expanded tab. |
349
+ | selectOnFocus | InputSignalWithTransform<boolean, any> | false | When enabled, the focused tab is activated. |
350
+ | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
351
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
352
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
353
+ | pt | InputSignal<AccordionPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
354
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
355
+
356
+ ### Emits
357
+
358
+ | Name | Parameters | Description |
359
+ |------|------------|-------------|
360
+ | onClose | event: AccordionTabCloseEvent | Callback to invoke when an active tab is collapsed by clicking on the header. |
361
+ | onOpen | event: AccordionTabOpenEvent | Callback to invoke when a tab gets expanded. |
362
+
363
+ ## Pass Through Options
364
+
365
+ | Name | Type | Description |
366
+ |------|------|-------------|
367
+ | root | PassThroughOption<HTMLElement, I> | Used to pass attributes to the root's DOM element. |
368
+ | motion | MotionOptions | Used to pass options to the motion component/directive. |
369
+
370
+ ## Theming
371
+
372
+ ### CSS Classes
373
+
374
+ | Class | Description |
375
+ |-------|-------------|
376
+ | p-accordion | Class name of the root element |
377
+ | p-accordioncontent | Class name of the content wrapper |
378
+ | p-accordioncontent-content | Class name of the content |
379
+ | p-accordionheader | Class name of the header |
380
+ | p-accordionheader-toggle-icon | Class name of the toggle icon |
381
+ | p-accordionpanel | Class name of the panel |
382
+
383
+ ### Design Tokens
384
+
385
+ | Token | CSS Variable | Description |
386
+ |-------|--------------|-------------|
387
+ | accordion.transition.duration | --p-accordion-transition-duration | Transition duration of root |
388
+ | accordion.panel.border.width | --p-accordion-panel-border-width | Border width of panel |
389
+ | accordion.panel.border.color | --p-accordion-panel-border-color | Border color of panel |
390
+ | accordion.header.color | --p-accordion-header-color | Color of header |
391
+ | accordion.header.hover.color | --p-accordion-header-hover-color | Hover color of header |
392
+ | accordion.header.active.color | --p-accordion-header-active-color | Active color of header |
393
+ | accordion.header.active.hover.color | --p-accordion-header-active-hover-color | Active hover color of header |
394
+ | accordion.header.padding | --p-accordion-header-padding | Padding of header |
395
+ | accordion.header.font.weight | --p-accordion-header-font-weight | Font weight of header |
396
+ | accordion.header.border.radius | --p-accordion-header-border-radius | Border radius of header |
397
+ | accordion.header.border.width | --p-accordion-header-border-width | Border width of header |
398
+ | accordion.header.border.color | --p-accordion-header-border-color | Border color of header |
399
+ | accordion.header.background | --p-accordion-header-background | Background of header |
400
+ | accordion.header.hover.background | --p-accordion-header-hover-background | Hover background of header |
401
+ | accordion.header.active.background | --p-accordion-header-active-background | Active background of header |
402
+ | accordion.header.active.hover.background | --p-accordion-header-active-hover-background | Active hover background of header |
403
+ | accordion.header.focus.ring.width | --p-accordion-header-focus-ring-width | Focus ring width of header |
404
+ | accordion.header.focus.ring.style | --p-accordion-header-focus-ring-style | Focus ring style of header |
405
+ | accordion.header.focus.ring.color | --p-accordion-header-focus-ring-color | Focus ring color of header |
406
+ | accordion.header.focus.ring.offset | --p-accordion-header-focus-ring-offset | Focus ring offset of header |
407
+ | accordion.header.focus.ring.shadow | --p-accordion-header-focus-ring-shadow | Focus ring shadow of header |
408
+ | accordion.header.toggle.icon.color | --p-accordion-header-toggle-icon-color | Toggle icon color of header |
409
+ | accordion.header.toggle.icon.hover.color | --p-accordion-header-toggle-icon-hover-color | Toggle icon hover color of header |
410
+ | accordion.header.toggle.icon.active.color | --p-accordion-header-toggle-icon-active-color | Toggle icon active color of header |
411
+ | accordion.header.toggle.icon.active.hover.color | --p-accordion-header-toggle-icon-active-hover-color | Toggle icon active hover color of header |
412
+ | accordion.header.first.top.border.radius | --p-accordion-header-first-top-border-radius | First top border radius of header |
413
+ | accordion.header.first.border.width | --p-accordion-header-first-border-width | First border width of header |
414
+ | accordion.header.last.bottom.border.radius | --p-accordion-header-last-bottom-border-radius | Last bottom border radius of header |
415
+ | accordion.header.last.active.bottom.border.radius | --p-accordion-header-last-active-bottom-border-radius | Last active bottom border radius of header |
416
+ | accordion.content.border.width | --p-accordion-content-border-width | Border width of content |
417
+ | accordion.content.border.color | --p-accordion-content-border-color | Border color of content |
418
+ | accordion.content.background | --p-accordion-content-background | Background of content |
419
+ | accordion.content.color | --p-accordion-content-color | Color of content |
420
+ | accordion.content.padding | --p-accordion-content-padding | Padding of content |
421
+