@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,510 @@
1
+ # Angular Drawer Component
2
+
3
+ Drawer is a container component displayed as an overlay.
4
+
5
+ ## Accessibility
6
+
7
+ Screen Reader Drawer component uses complementary role by default, since any attribute is passed to the root element aria role can be changed depending on your use case and additional attributes like aria-labelledby can be added. In addition aria-modal is added since focus is kept within the drawer when opened. It is recommended to use a trigger component that can be accessed with keyboard such as a button, if not adding tabIndex would be necessary. Trigger element also requires aria-expanded and aria-controls to be handled explicitly. Overlay Keyboard Support Key Function tab Moves focus to the next the focusable element within the drawer. shift + tab Moves focus to the previous the focusable element within the drawer. escape Closes the dialog if closeOnEscape is true. Close Button Keyboard Support Key Function enter Closes the drawer. space Closes the drawer.
8
+
9
+ ## Basic
10
+
11
+ Drawer is used as a container and visibility is controlled with a binding to visible .
12
+
13
+ ```typescript
14
+ import { Component } from '@angular/core';
15
+ import { ButtonModule } from '@exhaustive-ui/core/button';
16
+ import { DrawerModule } from '@exhaustive-ui/core/drawer';
17
+
18
+ @Component({
19
+ template: `
20
+ <div class="card flex justify-center">
21
+ <p-drawer [(visible)]="visible" header="Drawer">
22
+ <p>
23
+ 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
24
+ consequat.
25
+ </p>
26
+ </p-drawer>
27
+ <p-button (click)="visible = true" icon="pi pi-arrow-right" />
28
+ </div>
29
+ `,
30
+ standalone: true,
31
+ imports: [ButtonModule, DrawerModule]
32
+ })
33
+ export class DrawerBasicDemo {
34
+ visible: boolean = false;
35
+ }
36
+ ```
37
+
38
+ ## Full Screen
39
+
40
+ Drawer can cover the whole page when fullScreen property is enabled.
41
+
42
+ ```typescript
43
+ import { Component } from '@angular/core';
44
+ import { ButtonModule } from '@exhaustive-ui/core/button';
45
+ import { DrawerModule } from '@exhaustive-ui/core/drawer';
46
+
47
+ @Component({
48
+ template: `
49
+ <div class="card flex justify-center">
50
+ <p-drawer header="Drawer" [(visible)]="visible" [fullScreen]="true">
51
+ <p>
52
+ 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
53
+ consequat.
54
+ </p>
55
+ </p-drawer>
56
+ <p-button (click)="visible = true" icon="pi pi-window-maximize" />
57
+ </div>
58
+ `,
59
+ standalone: true,
60
+ imports: [ButtonModule, DrawerModule]
61
+ })
62
+ export class DrawerFullscreenDemo {
63
+ visible: boolean = false;
64
+ }
65
+ ```
66
+
67
+ ## Headless
68
+
69
+ Headless mode allows you to customize the entire user interface instead of the default elements.
70
+
71
+ ```typescript
72
+ import { Component } from '@angular/core';
73
+ import { AvatarModule } from '@exhaustive-ui/core/avatar';
74
+ import { ButtonModule } from '@exhaustive-ui/core/button';
75
+ import { Drawer, DrawerModule } from '@exhaustive-ui/core/drawer';
76
+ import { RippleModule } from '@exhaustive-ui/core/ripple';
77
+
78
+ @Component({
79
+ template: `
80
+ <div class="card flex justify-center">
81
+ <p-drawer #drawerRef [(visible)]="visible">
82
+ <ng-template #headless>
83
+ <div class="flex flex-col h-full">
84
+ <div class="flex items-center justify-between px-6 pt-4 shrink-0">
85
+ <span class="inline-flex items-center gap-2">
86
+ <svg width="31" height="33" viewBox="0 0 31 33" fill="none" xmlns="http://www.w3.org/2000/svg" class="block mx-auto">
87
+ <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)" />
88
+ <mask id="mask0_1_52" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="31" height="33">
89
+ <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)" />
90
+ </mask>
91
+ <g mask="url(#mask0_1_52)">
92
+ <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)" />
93
+ </g>
94
+ <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)" />
95
+ <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)" />
96
+ <path
97
+ fill-rule="evenodd"
98
+ clip-rule="evenodd"
99
+ 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"
100
+ fill="var(--ground-background)"
101
+ />
102
+ <path d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z" fill="var(--ground-background)" />
103
+ <path d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z" fill="var(--ground-background)" />
104
+ <path
105
+ fill-rule="evenodd"
106
+ clip-rule="evenodd"
107
+ 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"
108
+ fill="var(--ground-background)"
109
+ />
110
+ <path d="M13.8244 14.8932L6.87813 12.3094L5.90888 8.27235L11.8859 8.7568L13.9859 14.8932H13.8244Z" fill="var(--ground-background)" />
111
+ <path d="M16.5706 14.8932L23.5169 12.3094L24.4861 8.27235L18.3476 8.7568L16.4091 14.8932H16.5706Z" fill="var(--ground-background)" />
112
+ <path d="M18.8321 8.27235L22.2245 7.94938L19.9629 5.68861H17.7013L18.8321 8.27235Z" fill="var(--ground-background)" />
113
+ <path d="M11.4013 8.27235L8.00893 7.94938L10.2705 5.68861H12.5321L11.4013 8.27235Z" fill="var(--ground-background)" />
114
+ </svg>
115
+ <span class="font-semibold text-2xl text-primary">Your Logo</span>
116
+ </span>
117
+ <span>
118
+ <p-button type="button" (click)="closeCallback($event)" icon="pi pi-times" rounded="true" outlined="true" styleClass="h-8 w-8"></p-button>
119
+ </span>
120
+ </div>
121
+ <div class="overflow-y-auto">
122
+ <ul class="list-none p-4 m-0">
123
+ <li>
124
+ <div
125
+ pRipple
126
+ pStyleClass="@next"
127
+ enterFromClass="hidden"
128
+ enterActiveClass="animate-slidedown"
129
+ leaveToClass="hidden"
130
+ leaveActiveClass="animate-slideup"
131
+ class="p-4 flex items-center justify-between text-surface-600 dark:text-surface-200 cursor-pointer p-ripple"
132
+ >
133
+ <span class="font-medium">FAVORITES</span>
134
+ <i class="pi pi-chevron-down"></i>
135
+ </div>
136
+ <ul class="list-none p-0 m-0 overflow-hidden">
137
+ <li>
138
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
139
+ <i class="pi pi-home mr-2"></i>
140
+ <span class="font-medium">Dashboard</span>
141
+ </a>
142
+ </li>
143
+ <li>
144
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
145
+ <i class="pi pi-bookmark mr-2"></i>
146
+ <span class="font-medium">Bookmarks</span>
147
+ </a>
148
+ </li>
149
+ <li>
150
+ <a
151
+ pRipple
152
+ pStyleClass="@next"
153
+ enterFromClass="hidden"
154
+ enterActiveClass="animate-slidedown"
155
+ leaveToClass="hidden"
156
+ leaveActiveClass="animate-slideup"
157
+ class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple"
158
+ >
159
+ <i class="pi pi-chart-line mr-2"></i>
160
+ <span class="font-medium">Reports</span>
161
+ <i class="pi pi-chevron-down ml-auto"></i>
162
+ </a>
163
+ <ul class="list-none py-0 pl-4 pr-0 m-0 hidden overflow-y-hidden transition-all duration-[400ms] ease-in-out">
164
+ <li>
165
+ <a
166
+ pRipple
167
+ pStyleClass="@next"
168
+ enterFromClass="hidden"
169
+ enterActiveClass="animate-slidedown"
170
+ leaveToClass="hidden"
171
+ leaveActiveClass="animate-slideup"
172
+ class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple"
173
+ >
174
+ <i class="pi pi-chart-line mr-2"></i>
175
+ <span class="font-medium">Revenue</span>
176
+ <i class="pi pi-chevron-down ml-auto"></i>
177
+ </a>
178
+ <ul class="list-none py-0 pl-4 pr-0 m-0 hidden overflow-y-hidden transition-all duration-[400ms] ease-in-out">
179
+ <li>
180
+ <a
181
+ pRipple
182
+ class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple"
183
+ >
184
+ <i class="pi pi-table mr-2"></i>
185
+ <span class="font-medium">View</span>
186
+ </a>
187
+ </li>
188
+ <li>
189
+ <a
190
+ pRipple
191
+ class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple"
192
+ >
193
+ <i class="pi pi-search mr-2"></i>
194
+ <span class="font-medium">Search</span>
195
+ </a>
196
+ </li>
197
+ </ul>
198
+ </li>
199
+ <li>
200
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
201
+ <i class="pi pi-chart-line mr-2"></i>
202
+ <span class="font-medium">Expenses</span>
203
+ </a>
204
+ </li>
205
+ </ul>
206
+ </li>
207
+ <li>
208
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
209
+ <i class="pi pi-users mr-2"></i>
210
+ <span class="font-medium">Team</span>
211
+ </a>
212
+ </li>
213
+ <li>
214
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
215
+ <i class="pi pi-comments mr-2"></i>
216
+ <span class="font-medium">Messages</span>
217
+ <span class="inline-flex items-center justify-center ml-auto bg-primary text-primary-contrast rounded-full" style="min-width: 1.5rem; height: 1.5rem">3</span>
218
+ </a>
219
+ </li>
220
+ <li>
221
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
222
+ <i class="pi pi-calendar mr-2"></i>
223
+ <span class="font-medium">Calendar</span>
224
+ </a>
225
+ </li>
226
+ <li>
227
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
228
+ <i class="pi pi-cog mr-2"></i>
229
+ <span class="font-medium">Settings</span>
230
+ </a>
231
+ </li>
232
+ </ul>
233
+ </li>
234
+ </ul>
235
+ <ul class="list-none p-4 m-0">
236
+ <li>
237
+ <div
238
+ pRipple
239
+ pStyleClass="@next"
240
+ enterFromClass="hidden"
241
+ enterActiveClass="animate-slidedown"
242
+ leaveToClass="hidden"
243
+ leaveActiveClass="animate-slideup"
244
+ class="p-4 flex items-center justify-between text-surface-600 dark:text-surface-200 cursor-pointer p-ripple"
245
+ >
246
+ <span class="font-medium">APPLICATION</span>
247
+ <i class="pi pi-chevron-down"></i>
248
+ </div>
249
+ <ul class="list-none p-0 m-0 overflow-hidden">
250
+ <li>
251
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
252
+ <i class="pi pi-folder mr-2"></i>
253
+ <span class="font-medium">Projects</span>
254
+ </a>
255
+ </li>
256
+ <li>
257
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
258
+ <i class="pi pi-chart-bar mr-2"></i>
259
+ <span class="font-medium">Performance</span>
260
+ </a>
261
+ </li>
262
+ <li>
263
+ <a pRipple class="flex items-center cursor-pointer p-4 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
264
+ <i class="pi pi-cog mr-2"></i>
265
+ <span class="font-medium">Settings</span>
266
+ </a>
267
+ </li>
268
+ </ul>
269
+ </li>
270
+ </ul>
271
+ </div>
272
+ <div class="mt-auto">
273
+ <hr class="mb-4 mx-4 border-t border-0 border-surface" />
274
+ <a pRipple class="m-4 flex items-center cursor-pointer p-4 gap-2 rounded-border text-surface-700 dark:text-surface-100 hover:bg-surface-100 dark:hover:bg-surface-700 duration-150 transition-colors p-ripple">
275
+ <p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/amyelsner.png" shape="circle" />
276
+ <span class="font-bold">Amy Elsner</span>
277
+ </a>
278
+ </div>
279
+ </div>
280
+ </ng-template>
281
+ </p-drawer>
282
+ <p-button (click)="visible = true" icon="pi pi-bars" />
283
+ </div>
284
+ `,
285
+ standalone: true,
286
+ imports: [AvatarModule, ButtonModule, DrawerModule, RippleModule]
287
+ })
288
+ export class DrawerHeadlessDemo {
289
+ visible: boolean = false;
290
+
291
+ closeCallback(e): void {
292
+ this.drawerRef.close(e);
293
+ }
294
+ }
295
+ ```
296
+
297
+ ## Position
298
+
299
+ Drawer location is configured with the position property that can take left , right , top and bottom as a value.
300
+
301
+ ```typescript
302
+ import { Component } from '@angular/core';
303
+ import { ButtonModule } from '@exhaustive-ui/core/button';
304
+ import { Drawer, DrawerModule } from '@exhaustive-ui/core/drawer';
305
+
306
+ @Component({
307
+ template: `
308
+ <div class="card">
309
+ <p-drawer header="Left Drawer" [(visible)]="visible1" position="left">
310
+ <p>
311
+ 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
312
+ consequat.
313
+ </p>
314
+ </p-drawer>
315
+ <p-drawer header="Right Drawer" [(visible)]="visible2" position="right">
316
+ <p>
317
+ 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
318
+ consequat.
319
+ </p>
320
+ </p-drawer>
321
+ <p-drawer header="Top Drawer" [(visible)]="visible3" position="top" [style]="{ height: 'auto' }">
322
+ <p>
323
+ 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
324
+ consequat.
325
+ </p>
326
+ </p-drawer>
327
+ <p-drawer header="Bottom Drawer" [(visible)]="visible4" position="bottom" [style]="{ height: 'auto' }">
328
+ <p>
329
+ 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
330
+ consequat.
331
+ </p>
332
+ </p-drawer>
333
+ <div class="flex gap-2 justify-center">
334
+ <p-button type="button" (click)="visible1 = true" icon="pi pi-arrow-right" />
335
+ <p-button type="button" (click)="visible2 = true" icon="pi pi-arrow-left" />
336
+ <p-button type="button" (click)="visible3 = true" icon="pi pi-arrow-down" />
337
+ <p-button type="button" (click)="visible4 = true" icon="pi pi-arrow-up" />
338
+ </div>
339
+ </div>
340
+ `,
341
+ standalone: true,
342
+ imports: [ButtonModule, DrawerModule]
343
+ })
344
+ export class DrawerPositionDemo {
345
+ visible1: boolean = false;
346
+ visible2: boolean = false;
347
+ visible3: boolean = false;
348
+ visible4: boolean = false;
349
+ }
350
+ ```
351
+
352
+ ## Size
353
+
354
+ Drawer dimension can be defined with style or class properties, this responsive example utilizes Tailwind.
355
+
356
+ ```typescript
357
+ import { Component } from '@angular/core';
358
+ import { ButtonModule } from '@exhaustive-ui/core/button';
359
+ import { DrawerModule } from '@exhaustive-ui/core/drawer';
360
+
361
+ @Component({
362
+ template: `
363
+ <div class="card flex justify-center">
364
+ <p-drawer header="Drawer" [(visible)]="visible" styleClass="!w-full md:!w-80 lg:!w-[30rem]">
365
+ <p>
366
+ 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
367
+ consequat.
368
+ </p>
369
+ </p-drawer>
370
+ <p-button (click)="visible = true" icon="pi pi-arrow-right" />
371
+ </div>
372
+ `,
373
+ standalone: true,
374
+ imports: [ButtonModule, DrawerModule]
375
+ })
376
+ export class DrawerSizeDemo {
377
+ visible: boolean = false;
378
+ }
379
+ ```
380
+
381
+ ## Template
382
+
383
+ Drawer is customizable by header , content , footer templates.
384
+
385
+ ```typescript
386
+ import { Component } from '@angular/core';
387
+ import { AvatarModule } from '@exhaustive-ui/core/avatar';
388
+ import { DrawerModule } from '@exhaustive-ui/core/drawer';
389
+ import { ButtonModule } from '@exhaustive-ui/core/button';
390
+
391
+ @Component({
392
+ template: `
393
+ <div class="card flex justify-center">
394
+ <p-drawer [(visible)]="visible" [closable]="false">
395
+ <ng-template #header>
396
+ <div class="flex items-center gap-2">
397
+ <p-avatar image="https://exhaustive-ui.e-xiste.com/demo/avatar/amyelsner.png" shape="circle" />
398
+ <span class="font-bold">Amy Elsner</span>
399
+ </div>
400
+ </ng-template>
401
+ <p>
402
+ 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
403
+ consequat.
404
+ </p>
405
+ <ng-template #footer>
406
+ <div class="flex items-center gap-2">
407
+ <button pButton label="Account" icon="pi pi-user" class="w-full" outlined></button>
408
+ <button pButton label="Logout" icon="pi pi-sign-out" class="w-full" severity="danger" text></button>
409
+ </div>
410
+ </ng-template>
411
+ </p-drawer>
412
+ <button pButton (click)="visible = true" icon="pi pi-plus"></button>
413
+ </div>
414
+ `,
415
+ standalone: true,
416
+ imports: [AvatarModule, DrawerModule, ButtonModule]
417
+ })
418
+ export class DrawerTemplateDemo {
419
+ visible: boolean = false;
420
+ }
421
+ ```
422
+
423
+ ## Drawer
424
+
425
+ Sidebar is a panel component displayed as an overlay at the edges of the screen.
426
+
427
+ ### Props
428
+
429
+ | Name | Type | Default | Description |
430
+ |------|------|---------|-------------|
431
+ | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
432
+ | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
433
+ | pt | InputSignal<DrawerPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
434
+ | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
435
+ | 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). |
436
+ | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
437
+ | blockScroll | InputSignalWithTransform<boolean, unknown> | ... | Whether to block scrolling of the document when drawer is active. |
438
+ | style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the component. |
439
+ | styleClass | InputSignal<string> | ... | Style class of the component. |
440
+ | ariaCloseLabel | InputSignal<string> | ... | Aria label of the close icon. |
441
+ | autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
442
+ | baseZIndex | InputSignalWithTransform<number, unknown> | ... | Base zIndex value to use in layering. |
443
+ | modal | InputSignalWithTransform<boolean, unknown> | ... | Whether an overlay mask is displayed behind the drawer. |
444
+ | closeButtonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the Button component. |
445
+ | dismissible | InputSignalWithTransform<boolean, unknown> | ... | Whether to dismiss drawer on click of the mask. |
446
+ | closeOnEscape | InputSignalWithTransform<boolean, unknown> | ... | Specifies if pressing escape key should hide the drawer. |
447
+ | visible | ModelSignal<boolean> | false | The visible property is an input that determines the visibility of the component. Emits `visibleChange` with the new value when the visibility of the component changes. |
448
+ | position | InputSignal<"top" \| "bottom" \| "left" \| "right" \| "full"> | 'left' | Specifies the position of the drawer, valid values are "left", "right", "bottom" and "top". |
449
+ | fullScreen | InputSignal<boolean> | false | Adds a close icon to the header to hide the dialog. |
450
+ | header | InputSignal<string> | ... | Title content of the dialog. |
451
+ | maskStyle | InputSignal<{ [klass: string]: any }> | ... | Style of the mask. |
452
+ | closable | InputSignalWithTransform<boolean, unknown> | true | Whether to display close button. |
453
+
454
+ ### Emits
455
+
456
+ | Name | Parameters | Description |
457
+ |------|------------|-------------|
458
+ | onShow | value: any | Callback to invoke when dialog is shown. |
459
+ | onHide | value: any | Callback to invoke when dialog is hidden. |
460
+
461
+ ### Templates
462
+
463
+ | Name | Type | Description |
464
+ |------|------|-------------|
465
+ | header | TemplateRef<void> | Custom header template. |
466
+ | footer | TemplateRef<void> | Custom footer template. |
467
+ | content | TemplateRef<void> | Custom content template. |
468
+ | closeicon | TemplateRef<void> | Custom close icon template. |
469
+ | headless | TemplateRef<void> | Custom headless template to replace the entire drawer content. |
470
+
471
+ ## Pass Through Options
472
+
473
+ | Name | Type | Description |
474
+ |------|------|-------------|
475
+ | host | PassThroughOption<HTMLElement, I> | Used to pass attributes to the host's DOM element. |
476
+ | root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
477
+ | header | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the header's DOM element. |
478
+ | title | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the title's DOM element. |
479
+ | pcCloseButton | ButtonPassThrough | Used to pass attributes to the close Button component. |
480
+ | content | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the content's DOM element. |
481
+ | footer | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the footer's DOM element. |
482
+ | motion | MotionOptions | Used to pass options to the motion component/directive. |
483
+
484
+ ## Theming
485
+
486
+ ### CSS Classes
487
+
488
+ | Class | Description |
489
+ |-------|-------------|
490
+ | p-drawer-mask | Class name of the mask element |
491
+ | p-drawer | Class name of the root element |
492
+ | p-drawer-header | Class name of the header element |
493
+ | p-drawer-title | Class name of the title element |
494
+ | p-drawer-close-button | Class name of the close button element |
495
+ | p-drawer-content | Class name of the content element |
496
+
497
+ ### Design Tokens
498
+
499
+ | Token | CSS Variable | Description |
500
+ |-------|--------------|-------------|
501
+ | drawer.background | --p-drawer-background | Background of root |
502
+ | drawer.border.color | --p-drawer-border-color | Border color of root |
503
+ | drawer.color | --p-drawer-color | Color of root |
504
+ | drawer.shadow | --p-drawer-shadow | Shadow of root |
505
+ | drawer.header.padding | --p-drawer-header-padding | Padding of header |
506
+ | drawer.title.font.size | --p-drawer-title-font-size | Font size of title |
507
+ | drawer.title.font.weight | --p-drawer-title-font-weight | Font weight of title |
508
+ | drawer.content.padding | --p-drawer-content-padding | Padding of content |
509
+ | drawer.footer.padding | --p-drawer-footer-padding | Padding of footer |
510
+
@@ -0,0 +1,109 @@
1
+ # Angular Dynamic Dialog Component
2
+
3
+ Dialogs can be created dynamically with any component as the content using a DialogService.
4
+
5
+ ## Closing a Dialog
6
+
7
+ Most of the time, requirement is returning a value from the dialog. DialogRef's close method is used for this purpose where the parameter passed will be available at the onClose event at the caller. Here is an example on how to close the dialog from the ProductListDemo by passing a selected product.
8
+
9
+ ## Customization
10
+
11
+ DynamicDialog uses the Dialog component internally, visit dialog for more information about the available props.
12
+
13
+ ## Example
14
+
15
+ Dynamic dialogs require an instance of a DialogService that is responsible for displaying a dialog with a component as its content. Calling open method of DialogService will display dynamic dialog. First parameter of open method is the type of component to load and the second parameter is the configuration of the Dialog such as header , width and more.
16
+
17
+ ```typescript
18
+ import { Component, inject } from '@angular/core';
19
+ import { ButtonModule } from '@exhaustive-ui/core/button';
20
+ import { ToastModule } from '@exhaustive-ui/core/toast';
21
+ import { MessageService, DialogService } from '@exhaustive-ui/core/api';
22
+ import { Product } from '@/domain/product';
23
+ import { Dialog } from '@exhaustive-ui/core/dialog';
24
+
25
+ @Component({
26
+ template: `
27
+ <div class="card flex justify-center">
28
+ <p-toast />
29
+ <p-button (click)="show()" icon="pi pi-search" label="Select a Product" />
30
+ </div>
31
+ `,
32
+ standalone: true,
33
+ imports: [ButtonModule, ToastModule],
34
+ providers: [DialogService, MessageService]
35
+ })
36
+ export class DynamicdialogExampleDemo {
37
+ private dialogService = inject(DialogService);
38
+ private messageService = inject(MessageService);
39
+
40
+ show() {
41
+ this.ref = this.dialogService.open(ProductListDemo, {
42
+ header: 'Product List',
43
+ modal: true,
44
+ width: '50vw',
45
+ closable: true,
46
+ contentStyle: { overflow: 'auto' },
47
+ breakpoints: {
48
+ '960px': '75vw',
49
+ '640px': '90vw'
50
+ },
51
+ templates: {
52
+ footer: Footer
53
+ }
54
+ });
55
+
56
+ this.ref.onClose.subscribe((data: any) => {
57
+ let summary_and_detail;
58
+ if (data) {
59
+ const buttonType = data?.buttonType;
60
+ summary_and_detail = buttonType ? { summary: 'No Product Selected', detail: `Pressed '${buttonType}' button` } : { summary: 'Product Selected', detail: data?.name };
61
+ } else {
62
+ summary_and_detail = { summary: 'No Product Selected', detail: 'Pressed Close button' };
63
+ }
64
+ this.messageService.add({ severity: 'info', ...summary_and_detail, life: 3000 });
65
+ });
66
+
67
+ this.ref.onMaximize.subscribe((value) => {
68
+ this.messageService.add({
69
+ severity: 'info',
70
+ summary: 'Maximized',
71
+ detail: `maximized: ${value.maximized}`
72
+ });
73
+ });
74
+ }
75
+ }
76
+ ```
77
+
78
+ ## Opening a Dialog
79
+
80
+ The open method of the DialogService is used to open a Dialog. First parameter is the component to load and second one is the configuration object to customize the Dialog.
81
+
82
+ ## Passing Data
83
+
84
+ To pass data to a dynamically loaded component, you can use either the data or inputValues property, depending on your requirements. The data property is ideal for passing generic information that is not directly tied to the component's inputs, while inputValues allows you to set specific input properties on the component in a more structured and type-safe way. Both properties can be used together or independently, offering flexibility to meet different use cases. Additionally, the loaded component can control the dialog using the DynamicDialogRef API, providing complete control over the dialog lifecycle. Both DynamicDialogConfig and DynamicDialogRef are injectable through the constructor.
85
+
86
+ ## style-doc
87
+
88
+ Following is the list of structural style classes, for theming classes visit theming page.
89
+
90
+ ## Usage
91
+
92
+ To use dynamic dialog, a reference should be declared as DynamicDialogRef after the DialogService injected into the component.
93
+
94
+ ## Theming
95
+
96
+ ### CSS Classes
97
+
98
+ | Class | Description |
99
+ |-------|-------------|
100
+ | p-dialog-mask | Class name of the mask element |
101
+ | p-dialog | Class name of the root element |
102
+ | p-dialog-header | Class name of the header element |
103
+ | p-dialog-title | Class name of the title element |
104
+ | p-dialog-header-actions | Class name of the header actions element |
105
+ | p-dialog-maximize-button | Class name of the maximize button element |
106
+ | p-dialog-close-button | Class name of the close button element |
107
+ | p-dialog-content | Class name of the content element |
108
+ | p-dialog-footer | Class name of the footer element |
109
+