@exhaustive-ui/mcp 22.5.0 → 22.6.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 (199) hide show
  1. package/data/cards/accordion.md +5 -2
  2. package/data/cards/animateonscroll.md +8 -5
  3. package/data/cards/autocomplete.md +8 -3
  4. package/data/cards/autofocus.md +4 -2
  5. package/data/cards/avatar.md +4 -2
  6. package/data/cards/badge.md +2 -1
  7. package/data/cards/breadcrumb.md +3 -1
  8. package/data/cards/button.md +8 -2
  9. package/data/cards/card.md +2 -1
  10. package/data/cards/carousel.md +7 -5
  11. package/data/cards/cascadeselect.md +2 -6
  12. package/data/cards/chart.md +9 -7
  13. package/data/cards/checkbox.md +4 -3
  14. package/data/cards/chip.md +2 -1
  15. package/data/cards/classnames.md +21 -3
  16. package/data/cards/colorpicker.md +2 -1
  17. package/data/cards/confirmdialog.md +35 -5
  18. package/data/cards/confirmpopup.md +25 -3
  19. package/data/cards/contextmenu.md +1 -7
  20. package/data/cards/dataview.md +28 -9
  21. package/data/cards/datepicker.md +4 -3
  22. package/data/cards/dialog.md +3 -3
  23. package/data/cards/divider.md +2 -1
  24. package/data/cards/dock.md +24 -3
  25. package/data/cards/dragdrop.md +5 -1
  26. package/data/cards/drawer.md +3 -3
  27. package/data/cards/dynamicdialog.md +41 -14
  28. package/data/cards/editor.md +1 -1
  29. package/data/cards/fieldset.md +2 -1
  30. package/data/cards/fileinput.md +1 -1
  31. package/data/cards/fileupload.md +7 -8
  32. package/data/cards/floatlabel.md +1 -1
  33. package/data/cards/fluid.md +7 -5
  34. package/data/cards/focustrap.md +6 -2
  35. package/data/cards/galleria.md +18 -25
  36. package/data/cards/iconfield.md +3 -2
  37. package/data/cards/iftalabel.md +1 -1
  38. package/data/cards/image.md +4 -2
  39. package/data/cards/imagecompare.md +4 -3
  40. package/data/cards/inplace.md +2 -1
  41. package/data/cards/inputgroup.md +14 -3
  42. package/data/cards/inputmask.md +2 -2
  43. package/data/cards/inputnumber.md +4 -3
  44. package/data/cards/inputotp.md +2 -2
  45. package/data/cards/inputtext.md +2 -2
  46. package/data/cards/keyfilter.md +2 -1
  47. package/data/cards/knob.md +3 -2
  48. package/data/cards/listbox.md +5 -3
  49. package/data/cards/megamenu.md +7 -8
  50. package/data/cards/menu.md +3 -7
  51. package/data/cards/menubar.md +3 -7
  52. package/data/cards/message.md +2 -1
  53. package/data/cards/metergroup.md +3 -7
  54. package/data/cards/multiselect.md +5 -9
  55. package/data/cards/orderlist.md +6 -4
  56. package/data/cards/organizationchart.md +33 -6
  57. package/data/cards/overlay.md +2 -1
  58. package/data/cards/paginator.md +2 -1
  59. package/data/cards/panel.md +2 -1
  60. package/data/cards/panelmenu.md +4 -13
  61. package/data/cards/password.md +6 -3
  62. package/data/cards/picklist.md +9 -5
  63. package/data/cards/popover.md +6 -5
  64. package/data/cards/progressbar.md +4 -3
  65. package/data/cards/progressspinner.md +2 -1
  66. package/data/cards/radiobutton.md +4 -3
  67. package/data/cards/rating.md +1 -1
  68. package/data/cards/ripple.md +2 -1
  69. package/data/cards/scrollpanel.md +2 -1
  70. package/data/cards/scrolltop.md +5 -3
  71. package/data/cards/select.md +2 -1
  72. package/data/cards/selectbutton.md +6 -2
  73. package/data/cards/skeleton.md +2 -1
  74. package/data/cards/slider.md +4 -3
  75. package/data/cards/speeddial.md +7 -4
  76. package/data/cards/splitbutton.md +21 -18
  77. package/data/cards/splitter.md +2 -1
  78. package/data/cards/stepper.md +8 -3
  79. package/data/cards/styleclass.md +4 -2
  80. package/data/cards/table.md +46 -11
  81. package/data/cards/tabs.md +2 -1
  82. package/data/cards/tag.md +2 -1
  83. package/data/cards/terminal.md +31 -22
  84. package/data/cards/textarea.md +3 -2
  85. package/data/cards/tieredmenu.md +1 -6
  86. package/data/cards/timeline.md +5 -5
  87. package/data/cards/toast.md +7 -8
  88. package/data/cards/togglebutton.md +1 -1
  89. package/data/cards/toggleswitch.md +4 -3
  90. package/data/cards/toolbar.md +8 -8
  91. package/data/cards/tooltip.md +2 -1
  92. package/data/cards/tree.md +3 -6
  93. package/data/cards/treeselect.md +6 -7
  94. package/data/cards/treetable.md +52 -31
  95. package/data/components/accordion.md +31 -23
  96. package/data/components/animateonscroll.md +18 -15
  97. package/data/components/autocomplete.md +162 -93
  98. package/data/components/autofocus.md +9 -7
  99. package/data/components/avatar.md +56 -43
  100. package/data/components/badge.md +27 -18
  101. package/data/components/blockui.md +15 -8
  102. package/data/components/breadcrumb.md +20 -14
  103. package/data/components/button.md +121 -94
  104. package/data/components/card.md +12 -10
  105. package/data/components/carousel.md +75 -53
  106. package/data/components/cascadeselect.md +271 -238
  107. package/data/components/chart.md +88 -74
  108. package/data/components/checkbox.md +107 -73
  109. package/data/components/chip.md +20 -16
  110. package/data/components/classnames.md +22 -4
  111. package/data/components/colorpicker.md +54 -36
  112. package/data/components/confirmdialog.md +146 -43
  113. package/data/components/confirmpopup.md +95 -22
  114. package/data/components/contextmenu.md +110 -39
  115. package/data/components/dataview.md +176 -83
  116. package/data/components/datepicker.md +171 -141
  117. package/data/components/dialog.md +80 -68
  118. package/data/components/divider.md +17 -12
  119. package/data/components/dock.md +63 -27
  120. package/data/components/dragdrop.md +26 -12
  121. package/data/components/drawer.md +67 -48
  122. package/data/components/dynamicdialog.md +22 -13
  123. package/data/components/editor.md +42 -33
  124. package/data/components/fieldset.md +20 -17
  125. package/data/components/fileinput.md +92 -35
  126. package/data/components/fileupload.md +101 -61
  127. package/data/components/floatlabel.md +20 -11
  128. package/data/components/fluid.md +11 -9
  129. package/data/components/focustrap.md +11 -7
  130. package/data/components/galleria.md +224 -83
  131. package/data/components/iconfield.md +23 -15
  132. package/data/components/iftalabel.md +15 -9
  133. package/data/components/image.md +31 -26
  134. package/data/components/imagecompare.md +8 -6
  135. package/data/components/inplace.md +27 -22
  136. package/data/components/inputgroup.md +53 -29
  137. package/data/components/inputmask.md +107 -85
  138. package/data/components/inputnumber.md +127 -89
  139. package/data/components/inputotp.md +55 -42
  140. package/data/components/inputtext.md +72 -50
  141. package/data/components/keyfilter.md +6 -3
  142. package/data/components/knob.md +70 -58
  143. package/data/components/listbox.md +171 -141
  144. package/data/components/megamenu.md +24 -23
  145. package/data/components/menu.md +37 -34
  146. package/data/components/menubar.md +27 -22
  147. package/data/components/message.md +44 -32
  148. package/data/components/metergroup.md +48 -17
  149. package/data/components/multiselect.md +232 -168
  150. package/data/components/orderlist.md +55 -48
  151. package/data/components/organizationchart.md +182 -13
  152. package/data/components/overlay.md +31 -26
  153. package/data/components/paginator.md +49 -34
  154. package/data/components/panel.md +23 -19
  155. package/data/components/panelmenu.md +51 -25
  156. package/data/components/password.md +104 -91
  157. package/data/components/picklist.md +92 -70
  158. package/data/components/popover.md +68 -46
  159. package/data/components/progressbar.md +28 -22
  160. package/data/components/progressspinner.md +13 -11
  161. package/data/components/radiobutton.md +69 -35
  162. package/data/components/rating.md +48 -40
  163. package/data/components/ripple.md +8 -6
  164. package/data/components/scroller.md +29 -29
  165. package/data/components/scrollpanel.md +9 -7
  166. package/data/components/scrolltop.md +20 -18
  167. package/data/components/select.md +248 -169
  168. package/data/components/selectbutton.md +118 -56
  169. package/data/components/skeleton.md +22 -18
  170. package/data/components/slider.md +73 -49
  171. package/data/components/speeddial.md +77 -59
  172. package/data/components/splitbutton.md +354 -329
  173. package/data/components/splitter.md +22 -18
  174. package/data/components/stepper.md +38 -21
  175. package/data/components/styleclass.md +12 -6
  176. package/data/components/table.md +523 -314
  177. package/data/components/tabs.md +44 -26
  178. package/data/components/tag.md +18 -14
  179. package/data/components/terminal.md +38 -27
  180. package/data/components/textarea.md +82 -47
  181. package/data/components/tieredmenu.md +34 -29
  182. package/data/components/timeline.md +29 -28
  183. package/data/components/toast.md +115 -57
  184. package/data/components/togglebutton.md +53 -39
  185. package/data/components/toggleswitch.md +41 -28
  186. package/data/components/toolbar.md +19 -18
  187. package/data/components/tooltip.md +43 -32
  188. package/data/components/tree.md +114 -81
  189. package/data/components/treeselect.md +176 -174
  190. package/data/components/treetable.md +1250 -1045
  191. package/data/components.json +4122 -4080
  192. package/data/llms-full.txt +8784 -6249
  193. package/data/manifest.json +154 -15
  194. package/data/pages/tailwind.md +20 -10
  195. package/data/snapshot.json +2 -2
  196. package/dist/index.d.mts +2 -0
  197. package/dist/index.mjs +3 -3
  198. package/dist/index.mjs.map +1 -1
  199. package/package.json +1 -1
@@ -12,6 +12,7 @@ ColorPicker is used as a controlled input with ngModel property.
12
12
 
13
13
  ```typescript
14
14
  import { Component } from '@angular/core';
15
+ import { CommonModule } from '@angular/common';
15
16
  import { FormsModule } from '@angular/forms';
16
17
  import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
17
18
 
@@ -22,7 +23,7 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
22
23
  </div>
23
24
  `,
24
25
  standalone: true,
25
- imports: [ColorPickerModule, FormsModule]
26
+ imports: [CommonModule, FormsModule, ColorPickerModule]
26
27
  })
27
28
  export class ColorpickerBasicDemo {
28
29
  color: string | undefined;
@@ -35,6 +36,7 @@ When disabled is present, the element cannot be edited and focused.
35
36
 
36
37
  ```typescript
37
38
  import { Component } from '@angular/core';
39
+ import { CommonModule } from '@angular/common';
38
40
  import { FormsModule } from '@angular/forms';
39
41
  import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
40
42
 
@@ -45,7 +47,7 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
45
47
  </div>
46
48
  `,
47
49
  standalone: true,
48
- imports: [ColorPickerModule, FormsModule]
50
+ imports: [CommonModule, FormsModule, ColorPickerModule]
49
51
  })
50
52
  export class ColorpickerDisabledDemo {
51
53
  color: string | undefined;
@@ -58,6 +60,7 @@ Default color format to use in value binding is hex and other possible values ca
58
60
 
59
61
  ```typescript
60
62
  import { Component } from '@angular/core';
63
+ import { CommonModule } from '@angular/common';
61
64
  import { FormsModule } from '@angular/forms';
62
65
  import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
63
66
 
@@ -82,11 +85,13 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
82
85
  </div>
83
86
  `,
84
87
  standalone: true,
85
- imports: [ColorPickerModule, FormsModule]
88
+ imports: [CommonModule, FormsModule, ColorPickerModule]
86
89
  })
87
90
  export class ColorpickerFormatDemo {
88
91
  color: string = '#6466f1';
92
+
89
93
  colorRGB: any = { r: 100, g: 102, b: 241 };
94
+
90
95
  colorHSB: any = { h: 239, s: 59, b: 95 };
91
96
  }
92
97
  ```
@@ -97,6 +102,7 @@ ColorPicker is displayed as a popup by default, add inline property to customize
97
102
 
98
103
  ```typescript
99
104
  import { Component } from '@angular/core';
105
+ import { CommonModule } from '@angular/common';
100
106
  import { FormsModule } from '@angular/forms';
101
107
  import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
102
108
 
@@ -107,7 +113,7 @@ import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
107
113
  </div>
108
114
  `,
109
115
  standalone: true,
110
- imports: [ColorPickerModule, FormsModule]
116
+ imports: [CommonModule, FormsModule, ColorPickerModule]
111
117
  })
112
118
  export class ColorpickerInlineDemo {
113
119
  color: string | undefined;
@@ -120,12 +126,13 @@ ColorPicker can also be used with reactive forms. In this case, the formControlN
120
126
 
121
127
  ```typescript
122
128
  import { Component, inject } from '@angular/core';
123
- import { ReactiveFormsModule } from '@angular/forms';
129
+ import { CommonModule } from '@angular/common';
130
+ import { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
131
+ import { MessageService } from '@exhaustive-ui/core/api';
124
132
  import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
133
+ import { ButtonModule } from '@exhaustive-ui/core/button';
125
134
  import { MessageModule } from '@exhaustive-ui/core/message';
126
135
  import { ToastModule } from '@exhaustive-ui/core/toast';
127
- import { ButtonModule } from '@exhaustive-ui/core/button';
128
- import { MessageService } from '@exhaustive-ui/core/api';
129
136
 
130
137
  @Component({
131
138
  template: `
@@ -143,17 +150,22 @@ import { MessageService } from '@exhaustive-ui/core/api';
143
150
  </div>
144
151
  `,
145
152
  standalone: true,
146
- imports: [ColorPickerModule, MessageModule, ToastModule, ButtonModule, ReactiveFormsModule]
153
+ imports: [CommonModule, ReactiveFormsModule, ColorPickerModule, ButtonModule, MessageModule, ToastModule],
154
+ providers: [MessageService]
147
155
  })
148
156
  export class ColorpickerReactiveformsDemo {
157
+ private fb = inject(FormBuilder);
158
+
149
159
  messageService = inject(MessageService);
160
+
150
161
  exampleForm: FormGroup;
151
- formSubmitted: boolean = false;
162
+
163
+ formSubmitted = false;
152
164
 
153
165
  constructor() {
154
166
  this.exampleForm = this.fb.group({
155
- color: ['', Validators.required]
156
- });
167
+ color: ['', Validators.required]
168
+ });
157
169
  }
158
170
 
159
171
  onSubmit() {
@@ -179,11 +191,11 @@ ColorPicker can also be used with Angular Signal Forms , the @angular/forms/sign
179
191
  ```typescript
180
192
  import { Component, inject, signal } from '@angular/core';
181
193
  import { form, FormField, required, submit } from '@angular/forms/signals';
194
+ import { MessageService } from '@exhaustive-ui/core/api';
182
195
  import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
183
- import { MessageModule } from '@exhaustive-ui/core/message';
184
- import { ToastModule } from '@exhaustive-ui/core/toast';
185
196
  import { ButtonModule } from '@exhaustive-ui/core/button';
186
- import { MessageService } from '@exhaustive-ui/core/api';
197
+ import { ToastModule } from '@exhaustive-ui/core/toast';
198
+ import { MessageModule } from '@exhaustive-ui/core/message';
187
199
 
188
200
  @Component({
189
201
  template: `
@@ -202,11 +214,14 @@ import { MessageService } from '@exhaustive-ui/core/api';
202
214
  </div>
203
215
  `,
204
216
  standalone: true,
205
- imports: [ColorPickerModule, MessageModule, ToastModule, ButtonModule, FormField]
217
+ imports: [FormField, ColorPickerModule, ButtonModule, ToastModule, MessageModule],
218
+ providers: [MessageService]
206
219
  })
207
220
  export class ColorpickerSignalformsDemo {
208
221
  messageService = inject(MessageService);
222
+
209
223
  model = signal({ color: '' });
224
+
210
225
  exampleForm = form(this.model, (f) => {
211
226
  required(f.color);
212
227
  });
@@ -225,12 +240,13 @@ export class ColorpickerSignalformsDemo {
225
240
 
226
241
  ```typescript
227
242
  import { Component, inject } from '@angular/core';
243
+ import { CommonModule } from '@angular/common';
228
244
  import { FormsModule } from '@angular/forms';
245
+ import { MessageService } from '@exhaustive-ui/core/api';
229
246
  import { ColorPickerModule } from '@exhaustive-ui/core/colorpicker';
247
+ import { ButtonModule } from '@exhaustive-ui/core/button';
230
248
  import { MessageModule } from '@exhaustive-ui/core/message';
231
249
  import { ToastModule } from '@exhaustive-ui/core/toast';
232
- import { ButtonModule } from '@exhaustive-ui/core/button';
233
- import { MessageService } from '@exhaustive-ui/core/api';
234
250
 
235
251
  @Component({
236
252
  template: `
@@ -248,10 +264,12 @@ import { MessageService } from '@exhaustive-ui/core/api';
248
264
  </div>
249
265
  `,
250
266
  standalone: true,
251
- imports: [ColorPickerModule, MessageModule, ToastModule, ButtonModule, FormsModule]
267
+ imports: [CommonModule, FormsModule, ColorPickerModule, ButtonModule, MessageModule, ToastModule],
268
+ providers: [MessageService]
252
269
  })
253
270
  export class ColorpickerTemplatedrivenformsDemo {
254
271
  messageService = inject(MessageService);
272
+
255
273
  color: string | undefined;
256
274
 
257
275
  onSubmit(form: any) {
@@ -271,24 +289,24 @@ ColorPicker groups a collection of contents in tabs.
271
289
 
272
290
  | Name | Type | Default | Description |
273
291
  |------|------|---------|-------------|
274
- | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
275
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
276
- | pt | InputSignal<ColorPickerPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
277
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
278
- | required | InputSignalWithTransform<boolean, unknown> | false | There must be a value (if set). |
279
- | invalid | InputSignalWithTransform<boolean, unknown> | false | When present, it specifies that the component should have invalid state style. |
280
- | disabled | InputSignalWithTransform<boolean, unknown> | false | When present, it specifies that the component should have disabled state style. |
281
- | name | InputSignal<string> | undefined | When present, it specifies that the name of the input. |
282
- | inline | InputSignalWithTransform<boolean, unknown> | ... | Whether to display as an overlay or not. |
283
- | format | InputSignal<"hex" \| "rgb" \| "hsb"> | ... | Format to use in value binding. |
284
- | tabindex | InputSignal<string> | ... | Index of the element in tabbing order. |
285
- | inputId | InputSignal<string> | ... | Identifier of the focus input to match a label defined for the dropdown. |
286
- | autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
287
- | autofocus | InputSignalWithTransform<boolean, unknown> | ... | When present, it specifies that the component should automatically get focus on load. |
288
- | defaultColor | InputSignal<string> | ... | Default color to display initially when model value is not present. |
289
- | 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). |
290
- | overlayOptions | InputSignal<OverlayOptions> | ... | Whether to use overlay API feature. The properties of overlay API can be used like an object in it. |
291
- | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
292
+ | dt | Object | undefined | Defines scoped design tokens of the component. |
293
+ | unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
294
+ | pt | ColorPickerPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
295
+ | ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
296
+ | required | boolean | false | There must be a value (if set). |
297
+ | invalid | boolean | false | When present, it specifies that the component should have invalid state style. |
298
+ | disabled | boolean | false | When present, it specifies that the component should have disabled state style. |
299
+ | name | string | undefined | When present, it specifies that the name of the input. |
300
+ | inline | boolean | - | Whether to display as an overlay or not. |
301
+ | format | "hex" \| "rgb" \| "hsb" | 'hex' | Format to use in value binding. |
302
+ | tabindex | string | - | Index of the element in tabbing order. |
303
+ | inputId | string | - | Identifier of the focus input to match a label defined for the dropdown. |
304
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
305
+ | autofocus | boolean | - | When present, it specifies that the component should automatically get focus on load. |
306
+ | defaultColor | string | 'ff0000' | Default color to display initially when model value is not present. |
307
+ | appendTo | 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). |
308
+ | overlayOptions | OverlayOptions | - | Whether to use overlay API feature. The properties of overlay API can be used like an object in it. |
309
+ | motionOptions | MotionOptions | - | The motion options. |
292
310
 
293
311
  ### Emits
294
312
 
@@ -12,10 +12,10 @@ ConfirmDialog is defined using p-confirm-dialog tag and an instance of Confirmat
12
12
 
13
13
  ```typescript
14
14
  import { Component, inject } from '@angular/core';
15
- import { ButtonModule } from '@exhaustive-ui/core/button';
15
+ import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
16
16
  import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
17
17
  import { ToastModule } from '@exhaustive-ui/core/toast';
18
- import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
18
+ import { ButtonModule } from '@exhaustive-ui/core/button';
19
19
 
20
20
  @Component({
21
21
  template: `
@@ -27,13 +27,43 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
27
27
  </div>
28
28
  `,
29
29
  standalone: true,
30
- imports: [ButtonModule, ConfirmDialogModule, ToastModule],
30
+ imports: [ConfirmDialogModule, ToastModule, ButtonModule],
31
31
  providers: [ConfirmationService, MessageService]
32
32
  })
33
33
  export class ConfirmdialogBasicDemo {
34
34
  private confirmationService = inject(ConfirmationService);
35
35
  private messageService = inject(MessageService);
36
36
 
37
+ confirm1(event: Event) {
38
+ this.confirmationService.confirm({
39
+ target: event.target as EventTarget,
40
+ message: 'Are you sure that you want to proceed?',
41
+ header: 'Confirmation',
42
+ closable: true,
43
+ closeOnEscape: true,
44
+ icon: 'pi pi-exclamation-triangle',
45
+ rejectButtonProps: {
46
+ label: 'Cancel',
47
+ severity: 'secondary',
48
+ outlined: true
49
+ },
50
+ acceptButtonProps: {
51
+ label: 'Save'
52
+ },
53
+ accept: () => {
54
+ this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted' });
55
+ },
56
+ reject: () => {
57
+ this.messageService.add({
58
+ severity: 'error',
59
+ summary: 'Rejected',
60
+ detail: 'You have rejected',
61
+ life: 3000
62
+ });
63
+ }
64
+ });
65
+ }
66
+
37
67
  confirm2(event: Event) {
38
68
  this.confirmationService.confirm({
39
69
  target: event.target as EventTarget,
@@ -50,7 +80,7 @@ export class ConfirmdialogBasicDemo {
50
80
  label: 'Delete',
51
81
  severity: 'danger'
52
82
  },
53
-
83
+
54
84
  accept: () => {
55
85
  this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'Record deleted' });
56
86
  },
@@ -67,11 +97,12 @@ export class ConfirmdialogBasicDemo {
67
97
  Headless mode allows you to customize the entire user interface instead of the default elements.
68
98
 
69
99
  ```typescript
100
+ import { CommonModule } from '@angular/common';
70
101
  import { Component, inject } from '@angular/core';
102
+ import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
71
103
  import { ButtonModule } from '@exhaustive-ui/core/button';
72
104
  import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
73
105
  import { ToastModule } from '@exhaustive-ui/core/toast';
74
- import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
75
106
 
76
107
  @Component({
77
108
  template: `
@@ -98,12 +129,25 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
98
129
  </div>
99
130
  `,
100
131
  standalone: true,
101
- imports: [ButtonModule, ConfirmDialogModule, ToastModule],
132
+ imports: [CommonModule, ConfirmDialogModule, ToastModule, ButtonModule],
102
133
  providers: [ConfirmationService, MessageService]
103
134
  })
104
135
  export class ConfirmdialogHeadlessDemo {
105
136
  private confirmationService = inject(ConfirmationService);
106
137
  private messageService = inject(MessageService);
138
+
139
+ confirm() {
140
+ this.confirmationService.confirm({
141
+ header: 'Are you sure?',
142
+ message: 'Please confirm to proceed.',
143
+ accept: () => {
144
+ this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted' });
145
+ },
146
+ reject: () => {
147
+ this.messageService.add({ severity: 'info', summary: 'Rejected', detail: 'You have rejected' });
148
+ }
149
+ });
150
+ }
107
151
  }
108
152
  ```
109
153
 
@@ -113,11 +157,10 @@ The position property of the confirm options is used to display a Dialog at all
113
157
 
114
158
  ```typescript
115
159
  import { Component, inject } from '@angular/core';
116
- import { ButtonModule } from '@exhaustive-ui/core/button';
160
+ import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
117
161
  import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
118
162
  import { ToastModule } from '@exhaustive-ui/core/toast';
119
- import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
120
- import { Dialog } from '@exhaustive-ui/core/dialog';
163
+ import { ButtonModule } from '@exhaustive-ui/core/button';
121
164
 
122
165
  @Component({
123
166
  template: `
@@ -141,12 +184,46 @@ import { Dialog } from '@exhaustive-ui/core/dialog';
141
184
  </div>
142
185
  `,
143
186
  standalone: true,
144
- imports: [ButtonModule, ConfirmDialogModule, ToastModule],
187
+ imports: [ConfirmDialogModule, ToastModule, ButtonModule],
145
188
  providers: [ConfirmationService, MessageService]
146
189
  })
147
190
  export class ConfirmdialogPositionDemo {
148
191
  private confirmationService = inject(ConfirmationService);
149
192
  private messageService = inject(MessageService);
193
+
194
+ position: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' = 'center';
195
+
196
+ confirmPosition(position: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright') {
197
+ this.position = position;
198
+
199
+ this.confirmationService.confirm({
200
+ message: 'Are you sure you want to proceed?',
201
+ header: 'Confirmation',
202
+ icon: 'pi pi-info-circle',
203
+ rejectButtonStyleClass: 'p-button-text',
204
+ rejectButtonProps: {
205
+ label: 'Cancel',
206
+ severity: 'secondary',
207
+ text: true
208
+ },
209
+ acceptButtonProps: {
210
+ label: 'Save',
211
+ text: true
212
+ },
213
+ accept: () => {
214
+ this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'Request submitted' });
215
+ },
216
+ reject: () => {
217
+ this.messageService.add({
218
+ severity: 'error',
219
+ summary: 'Rejected',
220
+ detail: 'Process incomplete',
221
+ life: 3000
222
+ });
223
+ },
224
+ key: 'positionDialog'
225
+ });
226
+ }
150
227
  }
151
228
  ```
152
229
 
@@ -155,11 +232,12 @@ export class ConfirmdialogPositionDemo {
155
232
  Properties of the dialog are defined in two ways, message , icon , header properties can either be defined using confirm method or declaratively on p-confirm-dialog ng-template by header , message , icon and footer templates. If these values are unlikely to change then declarative approach would be useful, still properties defined in a ng-template can be overridden with confirm method call. In addition, buttons at footer section can be customized by passing your own UI, important note to make confirmation work with a custom UI is defining a local ng-template variable for the dialog and assign accept()-reject() methods to your own buttons.
156
233
 
157
234
  ```typescript
235
+ import { CommonModule } from '@angular/common';
158
236
  import { Component, inject } from '@angular/core';
237
+ import { ConfirmationService, MessageService } from '@exhaustive-ui/core/api';
159
238
  import { ButtonModule } from '@exhaustive-ui/core/button';
160
239
  import { ConfirmDialogModule } from '@exhaustive-ui/core/confirmdialog';
161
240
  import { ToastModule } from '@exhaustive-ui/core/toast';
162
- import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
163
241
 
164
242
  @Component({
165
243
  template: `
@@ -179,12 +257,37 @@ import { MessageService, ConfirmationService } from '@exhaustive-ui/core/api';
179
257
  </div>
180
258
  `,
181
259
  standalone: true,
182
- imports: [ButtonModule, ConfirmDialogModule, ToastModule],
260
+ imports: [CommonModule, ConfirmDialogModule, ToastModule, ButtonModule],
183
261
  providers: [ConfirmationService, MessageService]
184
262
  })
185
263
  export class ConfirmdialogTemplateDemo {
186
264
  private confirmationService = inject(ConfirmationService);
187
265
  private messageService = inject(MessageService);
266
+
267
+ confirm() {
268
+ this.confirmationService.confirm({
269
+ header: 'Confirmation',
270
+ message: 'Please confirm to proceed moving forward.',
271
+ icon: 'pi pi-exclamation-circle',
272
+ rejectButtonProps: {
273
+ label: 'Cancel',
274
+ icon: 'pi pi-times',
275
+ variant: 'outlined',
276
+ size: 'small'
277
+ },
278
+ acceptButtonProps: {
279
+ label: 'Save',
280
+ icon: 'pi pi-check',
281
+ size: 'small'
282
+ },
283
+ accept: () => {
284
+ this.messageService.add({ severity: 'info', summary: 'Confirmed', detail: 'You have accepted', life: 3000 });
285
+ },
286
+ reject: () => {
287
+ this.messageService.add({ severity: 'error', summary: 'Rejected', detail: 'You have rejected', life: 3000 });
288
+ }
289
+ });
290
+ }
188
291
  }
189
292
  ```
190
293
 
@@ -196,37 +299,37 @@ ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API.
196
299
 
197
300
  | Name | Type | Default | Description |
198
301
  |------|------|---------|-------------|
199
- | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
200
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
201
- | pt | InputSignal<ConfirmDialogPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
202
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
203
- | header | InputSignal<string> | ... | Title text of the dialog. |
204
- | icon | InputSignal<string> | ... | Icon to display next to message. |
205
- | message | InputSignal<string> | ... | Message of the confirmation. |
206
- | style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the element. |
207
- | styleClass | InputSignal<string> | ... | Class of the element. |
208
- | maskStyleClass | InputSignal<string> | ... | Specify the CSS class(es) for styling the mask element |
209
- | acceptIcon | InputSignal<string> | ... | Icon of the accept button. |
210
- | acceptLabel | InputSignal<string> | ... | Label of the accept button. |
211
- | acceptVisible | InputSignalWithTransform<boolean, unknown> | ... | Visibility of the accept button. |
212
- | rejectIcon | InputSignal<string> | ... | Icon of the reject button. |
213
- | rejectLabel | InputSignal<string> | ... | Label of the reject button. |
214
- | rejectVisible | InputSignalWithTransform<boolean, unknown> | ... | Visibility of the reject button. |
215
- | acceptButtonStyleClass | InputSignal<string> | ... | Style class of the accept button. |
216
- | rejectButtonStyleClass | InputSignal<string> | ... | Style class of the reject button. |
217
- | closeOnEscape | InputSignalWithTransform<boolean, unknown> | ... | Specifies if pressing escape key should hide the dialog. |
218
- | dismissableMask | InputSignalWithTransform<boolean, unknown> | ... | Specifies if clicking the modal background should hide the dialog. |
219
- | blockScroll | InputSignalWithTransform<boolean, unknown> | ... | Determines whether scrolling behavior should be blocked within the component. |
220
- | closable | InputSignalWithTransform<boolean, unknown> | ... | Adds a close icon to the header to hide the dialog. |
221
- | appendTo | InputSignal<any> | 'body' | 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). |
222
- | key | InputSignal<string> | ... | Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. |
223
- | autoZIndex | InputSignalWithTransform<boolean, unknown> | ... | Whether to automatically manage layering. |
224
- | baseZIndex | InputSignalWithTransform<number, unknown> | ... | Base zIndex value to use in layering. |
225
- | breakpoints | InputSignal<any> | ... | Object literal to define widths per screen size. |
226
- | modal | InputSignalWithTransform<boolean, unknown> | ... | Defines if background should be blocked when dialog is displayed. |
227
- | visible | ModelSignal<any> | ... | Current visible state as a boolean. Emits `visibleChange` with the new value when the dialog is shown or hidden. |
228
- | position | InputSignal<"top" \| "bottom" \| "center" \| "left" \| "right" \| "topleft" \| "bottomleft" \| "topright" \| "bottomright"> | ... | Allows getting the position of the component. |
229
- | draggable | InputSignalWithTransform<boolean, unknown> | ... | Enables dragging to change the position using header. |
302
+ | dt | Object | undefined | Defines scoped design tokens of the component. |
303
+ | unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
304
+ | pt | ConfirmDialogPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
305
+ | ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
306
+ | header | string | - | Title text of the dialog. |
307
+ | icon | string | - | Icon to display next to message. |
308
+ | message | string | - | Message of the confirmation. |
309
+ | style | { [klass: string]: any } | - | Inline style of the element. |
310
+ | styleClass | string | - | Class of the element. |
311
+ | maskStyleClass | string | - | Specify the CSS class(es) for styling the mask element |
312
+ | acceptIcon | string | - | Icon of the accept button. |
313
+ | acceptLabel | string | - | Label of the accept button. |
314
+ | acceptVisible | boolean | true | Visibility of the accept button. |
315
+ | rejectIcon | string | - | Icon of the reject button. |
316
+ | rejectLabel | string | - | Label of the reject button. |
317
+ | rejectVisible | boolean | true | Visibility of the reject button. |
318
+ | acceptButtonStyleClass | string | - | Style class of the accept button. |
319
+ | rejectButtonStyleClass | string | - | Style class of the reject button. |
320
+ | closeOnEscape | boolean | true | Specifies if pressing escape key should hide the dialog. |
321
+ | dismissableMask | boolean | - | Specifies if clicking the modal background should hide the dialog. |
322
+ | blockScroll | boolean | true | Determines whether scrolling behavior should be blocked within the component. |
323
+ | closable | boolean | true | Adds a close icon to the header to hide the dialog. |
324
+ | appendTo | any | 'body' | 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). |
325
+ | key | string | - | Optional key to match the key of confirm object, necessary to use when component tree has multiple confirm dialogs. |
326
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
327
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
328
+ | breakpoints | { [maxWidth: string]: string } | - | Object literal to define widths per screen size. |
329
+ | modal | boolean | true | Defines if background should be blocked when dialog is displayed. |
330
+ | visible | boolean | - | Current visible state as a boolean. Emits `visibleChange` with the new value when the dialog is shown or hidden. |
331
+ | position | "top" \| "bottom" \| "center" \| "left" \| "right" \| "topleft" \| "bottomleft" \| "topright" \| "bottomright" | 'center' | Allows getting the position of the component. |
332
+ | draggable | boolean | true | Enables dragging to change the position using header. |
230
333
 
231
334
  ### Emits
232
335