@exhaustive-ui/mcp 22.0.0-rc.2 → 22.0.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.
- package/data/components/accordion.md +1 -0
- package/data/components/autocomplete.md +59 -0
- package/data/components/cascadeselect.md +136 -0
- package/data/components/checkbox.md +56 -0
- package/data/components/colorpicker.md +49 -0
- package/data/components/confirmpopup.md +0 -7
- package/data/components/dataview.md +0 -2
- package/data/components/datepicker.md +52 -3
- package/data/components/drawer.md +1 -1
- package/data/components/editor.md +49 -0
- package/data/components/floatlabel.md +72 -0
- package/data/components/iftalabel.md +68 -0
- package/data/components/inputmask.md +54 -4
- package/data/components/inputnumber.md +52 -3
- package/data/components/inputotp.md +50 -0
- package/data/components/inputtext.md +63 -1
- package/data/components/knob.md +55 -0
- package/data/components/listbox.md +57 -2
- package/data/components/message.md +0 -1
- package/data/components/multiselect.md +59 -4
- package/data/components/orderlist.md +1 -3
- package/data/components/password.md +52 -3
- package/data/components/picklist.md +0 -3
- package/data/components/radiobutton.md +60 -0
- package/data/components/rating.md +49 -0
- package/data/components/select.md +58 -3
- package/data/components/selectbutton.md +50 -1
- package/data/components/slider.md +50 -0
- package/data/components/stepper.md +0 -1
- package/data/components/table.md +1 -1
- package/data/components/textarea.md +48 -0
- package/data/components/togglebutton.md +50 -0
- package/data/components/toggleswitch.md +49 -0
- package/data/components/tooltip.md +0 -1
- package/data/components/treeselect.md +61 -1
- package/data/components/treetable.md +1 -1
- package/data/components.json +774 -503
- package/data/llms-full.txt +3494 -819
- package/data/llms.txt +2 -1
- package/data/manifest.json +91 -476
- package/data/pages/accessibility.md +164 -6
- package/data/pages/animations.md +110 -5
- package/data/pages/configuration.md +107 -102
- package/data/pages/contribution.md +68 -7
- package/data/pages/customicons.md +8 -8
- package/data/pages/faq.md +103 -8
- package/data/pages/icons.md +24 -23
- package/data/pages/installation.md +77 -25
- package/data/pages/llms.md +71 -15
- package/data/pages/passthrough.md +96 -7
- package/data/pages/philosophy.md +80 -11
- package/data/pages/primeflex.md +41 -4
- package/data/pages/rtl.md +4 -1
- package/data/pages/styled.md +174 -66
- package/data/pages/tailwind.md +309 -218
- package/data/pages/unstyled.md +48 -7
- package/data/pages/update.md +42 -13
- package/data/pages/v22.md +218 -0
- package/data/snapshot.json +4 -4
- package/dist/index.mjs +72 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -316,6 +316,55 @@ export class PasswordReactiveformsDemo {
|
|
|
316
316
|
}
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
+
## Signal Forms
|
|
320
|
+
|
|
321
|
+
Password can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
322
|
+
|
|
323
|
+
```typescript
|
|
324
|
+
import { Component, inject, signal } from '@angular/core';
|
|
325
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
326
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
327
|
+
import { PasswordModule } from '@exhaustive-ui/core/password';
|
|
328
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
329
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
330
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
331
|
+
|
|
332
|
+
@Component({
|
|
333
|
+
template: `
|
|
334
|
+
<p-toast />
|
|
335
|
+
<div class="card flex justify-center">
|
|
336
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4 sm:w-56">
|
|
337
|
+
<div class="flex flex-col gap-1">
|
|
338
|
+
<p-password [formField]="exampleForm.value" [feedback]="false" autocomplete="off" fluid />
|
|
339
|
+
@let value = exampleForm.value();
|
|
340
|
+
@if (value.invalid() && value.touched()) {
|
|
341
|
+
<p-message severity="error" size="small" variant="simple">Password is required.</p-message>
|
|
342
|
+
}
|
|
343
|
+
</div>
|
|
344
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
345
|
+
</form>
|
|
346
|
+
</div>
|
|
347
|
+
`,
|
|
348
|
+
standalone: true,
|
|
349
|
+
imports: [MessageModule, PasswordModule, ToastModule, ButtonModule, FormField]
|
|
350
|
+
})
|
|
351
|
+
export class PasswordSignalformsDemo {
|
|
352
|
+
messageService = inject(MessageService);
|
|
353
|
+
model = signal({ value: '' });
|
|
354
|
+
exampleForm = form(this.model, (f) => {
|
|
355
|
+
required(f.value);
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
onSubmit(event: Event) {
|
|
359
|
+
event.preventDefault();
|
|
360
|
+
submit(this.exampleForm, async () => {
|
|
361
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
362
|
+
this.exampleForm().reset({ value: '' });
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
319
368
|
## Sizes
|
|
320
369
|
|
|
321
370
|
Password provides small and large sizes as alternatives to the base.
|
|
@@ -467,9 +516,9 @@ Password displays strength indicator for password fields.
|
|
|
467
516
|
| variant | InputSignal<"outlined" \| "filled"> | 'outlined' | Specifies the input variant of the component. |
|
|
468
517
|
| size | InputSignal<"small" \| "large"> | undefined | Specifies the size of the component. |
|
|
469
518
|
| inputSize | InputSignal<number> | undefined | Specifies the visible width of the input element in characters. |
|
|
470
|
-
| pattern |
|
|
471
|
-
| min |
|
|
472
|
-
| max |
|
|
519
|
+
| pattern | InputSignalWithTransform<string, string \| readonly RegExp[]> | undefined | Specifies the value must match the pattern. |
|
|
520
|
+
| min | InputSignalWithTransform<number, unknown> | undefined | The value must be greater than or equal to the value. |
|
|
521
|
+
| max | InputSignalWithTransform<number, unknown> | undefined | The value must be less than or equal to the value. |
|
|
473
522
|
| step | InputSignal<number> | undefined | Unless the step is set to the any literal, the value must be min + an integral multiple of the step. |
|
|
474
523
|
| minlength | InputSignal<number> | undefined | The number of characters (code points) must not be less than the value of the attribute, if non-empty. |
|
|
475
524
|
| maxlength | InputSignal<number> | undefined | The number of characters (code points) must not exceed the value of the attribute. |
|
|
@@ -297,9 +297,6 @@ PickList is used to reorder items between different lists.
|
|
|
297
297
|
| responsive | InputSignalWithTransform<boolean, unknown> | ... | When enabled orderlist adjusts its controls based on screen size. |
|
|
298
298
|
| filterBy | InputSignal<string> | ... | When specified displays an input field to filter the items on keyup and decides which field to search (Accepts multiple fields with a comma). |
|
|
299
299
|
| filterLocale | InputSignal<string> | ... | Locale to use in filtering. The default locale is the host environment's current locale. |
|
|
300
|
-
| trackBy | InputSignal<Function> | ... | Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. Use sourceTrackBy or targetTrackBy in case different algorithms are needed per list. |
|
|
301
|
-
| sourceTrackBy | InputSignal<Function> | ... | Function to optimize the dom operations by delegating to ngForTrackBy in source list, default algorithm checks for object identity. |
|
|
302
|
-
| targetTrackBy | InputSignal<Function> | ... | Function to optimize the dom operations by delegating to ngForTrackBy in target list, default algorithm checks for object identity. |
|
|
303
300
|
| showSourceFilter | InputSignalWithTransform<boolean, unknown> | ... | Whether to show filter input for source list when filterBy is enabled. |
|
|
304
301
|
| showTargetFilter | InputSignalWithTransform<boolean, unknown> | ... | Whether to show filter input for target list when filterBy is enabled. |
|
|
305
302
|
| metaKeySelection | InputSignalWithTransform<boolean, unknown> | ... | Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically. |
|
|
@@ -225,6 +225,66 @@ export class RadiobuttonReactiveformsDemo {
|
|
|
225
225
|
}
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
+
## Signal Forms
|
|
229
|
+
|
|
230
|
+
RadioButton can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
import { Component, inject, signal } from '@angular/core';
|
|
234
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
235
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
236
|
+
import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
237
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
238
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
239
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
240
|
+
|
|
241
|
+
interface Category {
|
|
242
|
+
name: string;
|
|
243
|
+
key: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@Component({
|
|
247
|
+
template: `
|
|
248
|
+
<p-toast />
|
|
249
|
+
<div class="card flex justify-center">
|
|
250
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
251
|
+
<div class="flex flex-wrap gap-4">
|
|
252
|
+
@for (category of categories; track category.key) {
|
|
253
|
+
<div class="flex items-center gap-2">
|
|
254
|
+
<p-radiobutton [formField]="exampleForm.selectedCategory" [inputId]="category.key" [value]="category" />
|
|
255
|
+
<label [for]="category.key"> {{ category.name }} </label>
|
|
256
|
+
</div>
|
|
257
|
+
}
|
|
258
|
+
</div>
|
|
259
|
+
@let selectedCategory = exampleForm.selectedCategory();
|
|
260
|
+
@if (selectedCategory.invalid() && selectedCategory.touched()) {
|
|
261
|
+
<p-message severity="error" size="small" variant="simple"> At least one ingredient must be selected. </p-message>
|
|
262
|
+
}
|
|
263
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
264
|
+
</form>
|
|
265
|
+
</div>
|
|
266
|
+
`,
|
|
267
|
+
standalone: true,
|
|
268
|
+
imports: [MessageModule, RadioButtonModule, ToastModule, ButtonModule, FormField]
|
|
269
|
+
})
|
|
270
|
+
export class RadiobuttonSignalformsDemo {
|
|
271
|
+
messageService = inject(MessageService);
|
|
272
|
+
categories: Category[];
|
|
273
|
+
model = signal<{ selectedCategory: Category | null }>({ selectedCategory: null });
|
|
274
|
+
exampleForm = form(this.model, (f) => {
|
|
275
|
+
required(f.selectedCategory);
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
onSubmit(event: Event) {
|
|
279
|
+
event.preventDefault();
|
|
280
|
+
submit(this.exampleForm, async () => {
|
|
281
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
282
|
+
this.exampleForm().reset({ selectedCategory: null });
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
228
288
|
## Sizes
|
|
229
289
|
|
|
230
290
|
RadioButton provides small and large sizes as alternatives to the base.
|
|
@@ -158,6 +158,55 @@ export class RatingReadonlyDemo {
|
|
|
158
158
|
}
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
+
## Signal Forms
|
|
162
|
+
|
|
163
|
+
Rating can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import { Component, inject, signal } from '@angular/core';
|
|
167
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
168
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
169
|
+
import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
170
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
171
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
172
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
173
|
+
|
|
174
|
+
@Component({
|
|
175
|
+
template: `
|
|
176
|
+
<p-toast />
|
|
177
|
+
<div class="card flex justify-center">
|
|
178
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4 w-40">
|
|
179
|
+
<div class="flex flex-col items-center gap-2">
|
|
180
|
+
<p-rating [formField]="exampleForm.ratingValue" />
|
|
181
|
+
@let ratingValue = exampleForm.ratingValue();
|
|
182
|
+
@if (ratingValue.invalid() && ratingValue.touched()) {
|
|
183
|
+
<p-message severity="error" size="small" variant="simple">Value is required.</p-message>
|
|
184
|
+
}
|
|
185
|
+
</div>
|
|
186
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
187
|
+
</form>
|
|
188
|
+
</div>
|
|
189
|
+
`,
|
|
190
|
+
standalone: true,
|
|
191
|
+
imports: [MessageModule, RatingModule, ToastModule, ButtonModule, FormField]
|
|
192
|
+
})
|
|
193
|
+
export class RatingSignalformsDemo {
|
|
194
|
+
messageService = inject(MessageService);
|
|
195
|
+
model = signal<{ ratingValue: number | null }>({ ratingValue: null });
|
|
196
|
+
exampleForm = form(this.model, (f) => {
|
|
197
|
+
required(f.ratingValue);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
onSubmit(event: Event) {
|
|
201
|
+
event.preventDefault();
|
|
202
|
+
submit(this.exampleForm, async () => {
|
|
203
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
204
|
+
this.exampleForm().reset({ ratingValue: null });
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
161
210
|
## Template
|
|
162
211
|
|
|
163
212
|
Templating allows customizing the content where the icon instance is available as the implicit variable.
|
|
@@ -768,6 +768,61 @@ export class SelectReactiveformsDemo {
|
|
|
768
768
|
}
|
|
769
769
|
```
|
|
770
770
|
|
|
771
|
+
## Signal Forms
|
|
772
|
+
|
|
773
|
+
Select can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
774
|
+
|
|
775
|
+
```typescript
|
|
776
|
+
import { Component, inject, signal } from '@angular/core';
|
|
777
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
778
|
+
import { SelectModule } from '@exhaustive-ui/core/select';
|
|
779
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
780
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
781
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
782
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
783
|
+
|
|
784
|
+
interface City {
|
|
785
|
+
name: string;
|
|
786
|
+
code: string;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
@Component({
|
|
790
|
+
template: `
|
|
791
|
+
<p-toast />
|
|
792
|
+
<div class="card flex justify-center">
|
|
793
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4 w-full sm:w-56">
|
|
794
|
+
<div class="flex flex-col gap-1">
|
|
795
|
+
<p-select [formField]="exampleForm.city" [options]="cities" optionLabel="name" placeholder="Select a City" class="w-full md:w-56" />
|
|
796
|
+
@let city = exampleForm.city();
|
|
797
|
+
@if (city.invalid() && city.touched()) {
|
|
798
|
+
<p-message severity="error" size="small" variant="simple">City is required.</p-message>
|
|
799
|
+
}
|
|
800
|
+
</div>
|
|
801
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
802
|
+
</form>
|
|
803
|
+
</div>
|
|
804
|
+
`,
|
|
805
|
+
standalone: true,
|
|
806
|
+
imports: [SelectModule, MessageModule, ToastModule, ButtonModule, FormField]
|
|
807
|
+
})
|
|
808
|
+
export class SelectSignalformsDemo {
|
|
809
|
+
messageService = inject(MessageService);
|
|
810
|
+
cities: City[];
|
|
811
|
+
model = signal<{ city: City | null }>({ city: null });
|
|
812
|
+
exampleForm = form(this.model, (f) => {
|
|
813
|
+
required(f.city);
|
|
814
|
+
});
|
|
815
|
+
|
|
816
|
+
onSubmit(event: Event) {
|
|
817
|
+
event.preventDefault();
|
|
818
|
+
submit(this.exampleForm, async () => {
|
|
819
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
820
|
+
this.exampleForm().reset({ city: null });
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
```
|
|
825
|
+
|
|
771
826
|
## Sizes
|
|
772
827
|
|
|
773
828
|
Select provides small and large sizes as alternatives to the base.
|
|
@@ -985,9 +1040,9 @@ Select is used to choose an item from a collection of options.
|
|
|
985
1040
|
| variant | InputSignal<"outlined" \| "filled"> | 'outlined' | Specifies the input variant of the component. |
|
|
986
1041
|
| size | InputSignal<"small" \| "large"> | undefined | Specifies the size of the component. |
|
|
987
1042
|
| inputSize | InputSignal<number> | undefined | Specifies the visible width of the input element in characters. |
|
|
988
|
-
| pattern |
|
|
989
|
-
| min |
|
|
990
|
-
| max |
|
|
1043
|
+
| pattern | InputSignalWithTransform<string, string \| readonly RegExp[]> | undefined | Specifies the value must match the pattern. |
|
|
1044
|
+
| min | InputSignalWithTransform<number, unknown> | undefined | The value must be greater than or equal to the value. |
|
|
1045
|
+
| max | InputSignalWithTransform<number, unknown> | undefined | The value must be less than or equal to the value. |
|
|
991
1046
|
| step | InputSignal<number> | undefined | Unless the step is set to the any literal, the value must be min + an integral multiple of the step. |
|
|
992
1047
|
| minlength | InputSignal<number> | undefined | The number of characters (code points) must not be less than the value of the attribute, if non-empty. |
|
|
993
1048
|
| maxlength | InputSignal<number> | undefined | The number of characters (code points) must not exceed the value of the attribute. |
|
|
@@ -188,6 +188,56 @@ export class SelectbuttonReactiveformsDemo {
|
|
|
188
188
|
}
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
+
## Signal Forms
|
|
192
|
+
|
|
193
|
+
SelectButton can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
import { Component, inject, signal } from '@angular/core';
|
|
197
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
198
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
199
|
+
import { SelectButtonModule } from '@exhaustive-ui/core/selectbutton';
|
|
200
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
201
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
202
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
203
|
+
|
|
204
|
+
@Component({
|
|
205
|
+
template: `
|
|
206
|
+
<p-toast />
|
|
207
|
+
<div class="card flex justify-center">
|
|
208
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
209
|
+
<div class="flex flex-col gap-1">
|
|
210
|
+
<p-selectbutton [options]="stateOptions" [formField]="exampleForm.value" optionLabel="label" optionValue="value" />
|
|
211
|
+
@let value = exampleForm.value();
|
|
212
|
+
@if (value.invalid() && value.touched()) {
|
|
213
|
+
<p-message severity="error" size="small" variant="simple">Selection is required</p-message>
|
|
214
|
+
}
|
|
215
|
+
</div>
|
|
216
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
217
|
+
</form>
|
|
218
|
+
</div>
|
|
219
|
+
`,
|
|
220
|
+
standalone: true,
|
|
221
|
+
imports: [MessageModule, SelectButtonModule, ToastModule, ButtonModule, FormField]
|
|
222
|
+
})
|
|
223
|
+
export class SelectbuttonSignalformsDemo {
|
|
224
|
+
messageService = inject(MessageService);
|
|
225
|
+
stateOptions: any[];
|
|
226
|
+
model = signal({ value: '' });
|
|
227
|
+
exampleForm = form(this.model, (f) => {
|
|
228
|
+
required(f.value);
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
onSubmit(event: Event) {
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
submit(this.exampleForm, async () => {
|
|
234
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
235
|
+
this.exampleForm().reset({ value: '' });
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
191
241
|
## Sizes
|
|
192
242
|
|
|
193
243
|
SelectButton provides small and large sizes as alternatives to the base.
|
|
@@ -308,7 +358,6 @@ SelectButton is used to choose single or multiple items from a list using button
|
|
|
308
358
|
| optionValue | InputSignal<string> | ... | Name of the value field of an option. |
|
|
309
359
|
| optionDisabled | InputSignal<string> | ... | Name of the disabled field of an option. |
|
|
310
360
|
| unselectable | InputSignalWithTransform<boolean, unknown> | ... | Whether selection can be cleared. |
|
|
311
|
-
| tabindex | InputSignalWithTransform<number, unknown> | ... | Index of the element in tabbing order. |
|
|
312
361
|
| multiple | InputSignalWithTransform<boolean, unknown> | ... | When specified, allows selecting multiple values. |
|
|
313
362
|
| allowEmpty | InputSignalWithTransform<boolean, unknown> | ... | Whether selection can not be cleared. |
|
|
314
363
|
| styleClass | InputSignal<string> | ... | Style class of the component. |
|
|
@@ -167,6 +167,56 @@ export class SliderReactiveformsDemo {
|
|
|
167
167
|
}
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
+
## Signal Forms
|
|
171
|
+
|
|
172
|
+
Slider can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { Component, inject, signal } from '@angular/core';
|
|
176
|
+
import { form, FormField, submit, validate } from '@angular/forms/signals';
|
|
177
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
178
|
+
import { SliderModule } from '@exhaustive-ui/core/slider';
|
|
179
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
180
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
181
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
182
|
+
|
|
183
|
+
@Component({
|
|
184
|
+
template: `
|
|
185
|
+
<p-toast />
|
|
186
|
+
<div class="card flex justify-center">
|
|
187
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
188
|
+
<div class="flex flex-col gap-4">
|
|
189
|
+
<p-slider [formField]="exampleForm.value" class="w-56" />
|
|
190
|
+
@let value = exampleForm.value();
|
|
191
|
+
@if (value.invalid() && value.touched()) {
|
|
192
|
+
<p-message severity="error" size="small" variant="simple">Must be greater than 25.</p-message>
|
|
193
|
+
}
|
|
194
|
+
</div>
|
|
195
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
196
|
+
</form>
|
|
197
|
+
</div>
|
|
198
|
+
`,
|
|
199
|
+
standalone: true,
|
|
200
|
+
imports: [MessageModule, SliderModule, ToastModule, ButtonModule, FormField]
|
|
201
|
+
})
|
|
202
|
+
export class SliderSignalformsDemo {
|
|
203
|
+
messageService = inject(MessageService);
|
|
204
|
+
model = signal({ value: 0 });
|
|
205
|
+
exampleForm = form(this.model, (f) => {
|
|
206
|
+
// min() would also set the start of the slider range, so the lower bound is checked by a validator
|
|
207
|
+
validate(f.value, ({ value }) => (value() > 25 ? null : { kind: 'min' }));
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
onSubmit(event: Event) {
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
submit(this.exampleForm, async () => {
|
|
213
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
214
|
+
this.exampleForm().reset({ value: 0 });
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
170
220
|
## Step
|
|
171
221
|
|
|
172
222
|
Size of each movement is defined with the step property.
|
|
@@ -351,7 +351,6 @@ Stepper is a component that streamlines a wizard-like workflow, organizing conte
|
|
|
351
351
|
| ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
|
|
352
352
|
| value | ModelSignal<number> | undefined | A model that can hold a numeric value or be undefined. |
|
|
353
353
|
| linear | InputSignalWithTransform<any, boolean> | false | A boolean variable that captures user input. |
|
|
354
|
-
| transitionOptions | InputSignal<string> | 400ms cubic-bezier(0.86, 0, 0.07, 1) | Transition options of the animation. **(Deprecated)** |
|
|
355
354
|
| motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
|
|
356
355
|
|
|
357
356
|
## Pass Through Options
|
package/data/components/table.md
CHANGED
|
@@ -4435,7 +4435,7 @@ Table displays data in tabular format.
|
|
|
4435
4435
|
|
|
4436
4436
|
| Name | Parameters | Description |
|
|
4437
4437
|
|------|------------|-------------|
|
|
4438
|
-
|
|
|
4438
|
+
| onSelectAllChange | event: TableSelectAllChangeEvent | Emits when the all of the items selected or unselected. |
|
|
4439
4439
|
| onRowSelect | event: TableRowSelectEvent<RowData | Callback to invoke when a row is selected. |
|
|
4440
4440
|
| onRowUnselect | event: TableRowUnSelectEvent<RowData | Callback to invoke when a row is unselected. |
|
|
4441
4441
|
| onPage | event: TablePageEvent | Callback to invoke when pagination occurs. |
|
|
@@ -271,6 +271,54 @@ export class TextareaReactiveformsDemo {
|
|
|
271
271
|
}
|
|
272
272
|
```
|
|
273
273
|
|
|
274
|
+
## Signal Forms
|
|
275
|
+
|
|
276
|
+
Textarea can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
import { Component, inject, signal } from '@angular/core';
|
|
280
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
281
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
282
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
283
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
284
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
285
|
+
|
|
286
|
+
@Component({
|
|
287
|
+
template: `
|
|
288
|
+
<p-toast />
|
|
289
|
+
<div class="card flex justify-center">
|
|
290
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4">
|
|
291
|
+
<div class="flex flex-col gap-1">
|
|
292
|
+
<textarea rows="5" cols="30" pTextarea [formField]="exampleForm.address"></textarea>
|
|
293
|
+
@let address = exampleForm.address();
|
|
294
|
+
@if (address.invalid() && address.touched()) {
|
|
295
|
+
<p-message severity="error" size="small" variant="simple">Address is required.</p-message>
|
|
296
|
+
}
|
|
297
|
+
</div>
|
|
298
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
299
|
+
</form>
|
|
300
|
+
</div>
|
|
301
|
+
`,
|
|
302
|
+
standalone: true,
|
|
303
|
+
imports: [MessageModule, ToastModule, ButtonModule, FormField]
|
|
304
|
+
})
|
|
305
|
+
export class TextareaSignalformsDemo {
|
|
306
|
+
messageService = inject(MessageService);
|
|
307
|
+
model = signal({ address: '' });
|
|
308
|
+
exampleForm = form(this.model, (f) => {
|
|
309
|
+
required(f.address);
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
onSubmit(event: Event) {
|
|
313
|
+
event.preventDefault();
|
|
314
|
+
submit(this.exampleForm, async () => {
|
|
315
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
316
|
+
this.exampleForm().reset({ address: '' });
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
274
322
|
## Sizes
|
|
275
323
|
|
|
276
324
|
Textarea provides small and large sizes as alternatives to the base.
|
|
@@ -179,6 +179,56 @@ export class TogglebuttonReactiveformsDemo {
|
|
|
179
179
|
}
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
+
## Signal Forms
|
|
183
|
+
|
|
184
|
+
ToggleButton can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
import { Component, inject, signal } from '@angular/core';
|
|
188
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
189
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
190
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
191
|
+
import { ToggleButtonModule } from '@exhaustive-ui/core/togglebutton';
|
|
192
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
193
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
194
|
+
|
|
195
|
+
@Component({
|
|
196
|
+
template: `
|
|
197
|
+
<p-toast />
|
|
198
|
+
<div class="card flex justify-center">
|
|
199
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col items-center gap-4">
|
|
200
|
+
<div class="flex flex-col items-center gap-1">
|
|
201
|
+
<p-togglebutton [formField]="exampleForm.checked" onLabel="Accept All" offLabel="Reject All" class="min-w-40" />
|
|
202
|
+
@let checked = exampleForm.checked();
|
|
203
|
+
@if (checked.invalid() && checked.touched()) {
|
|
204
|
+
<p-message severity="error" size="small" variant="simple">Consent is mandatory.</p-message>
|
|
205
|
+
}
|
|
206
|
+
</div>
|
|
207
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
208
|
+
</form>
|
|
209
|
+
</div>
|
|
210
|
+
`,
|
|
211
|
+
standalone: true,
|
|
212
|
+
imports: [MessageModule, ToastModule, ToggleButtonModule, ButtonModule, FormField]
|
|
213
|
+
})
|
|
214
|
+
export class TogglebuttonSignalformsDemo {
|
|
215
|
+
messageService = inject(MessageService);
|
|
216
|
+
model = signal({ checked: false });
|
|
217
|
+
exampleForm = form(this.model, (f) => {
|
|
218
|
+
// required() rejects false, like Validators.requiredTrue
|
|
219
|
+
required(f.checked);
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
onSubmit(event: Event) {
|
|
223
|
+
event.preventDefault();
|
|
224
|
+
submit(this.exampleForm, async () => {
|
|
225
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
226
|
+
this.exampleForm().reset({ checked: false });
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
182
232
|
## Sizes
|
|
183
233
|
|
|
184
234
|
ToggleButton provides small and large sizes as alternatives to the base.
|
|
@@ -156,6 +156,55 @@ export class ToggleswitchReactiveformsDemo {
|
|
|
156
156
|
}
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
+
## Signal Forms
|
|
160
|
+
|
|
161
|
+
ToggleSwitch can also be used with Angular Signal Forms , the @angular/forms/signals API of Angular 21 and newer. The form model is a signal, form() declares its validators and the [formField] directive binds the component to a field. The field also sets the invalid state of the component, so the component is styled as invalid before any interaction, while the messages below appear once the field is touched or the form is submitted.
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
import { Component, inject, signal } from '@angular/core';
|
|
165
|
+
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
166
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
167
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
168
|
+
import { ToggleSwitchModule } from '@exhaustive-ui/core/toggleswitch';
|
|
169
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
170
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
171
|
+
|
|
172
|
+
@Component({
|
|
173
|
+
template: `
|
|
174
|
+
<p-toast />
|
|
175
|
+
<div class="card flex justify-center">
|
|
176
|
+
<form novalidate (submit)="onSubmit($event)" class="flex flex-col gap-4 w-48">
|
|
177
|
+
<div class="flex flex-col items-center gap-2">
|
|
178
|
+
<p-toggleswitch [formField]="exampleForm.activation" />
|
|
179
|
+
@let activation = exampleForm.activation();
|
|
180
|
+
@if (activation.invalid() && activation.touched()) {
|
|
181
|
+
<p-message severity="error" size="small" variant="simple">Activation is required.</p-message>
|
|
182
|
+
}
|
|
183
|
+
</div>
|
|
184
|
+
<button pButton severity="secondary" type="submit"><span pButtonLabel>Submit</span></button>
|
|
185
|
+
</form>
|
|
186
|
+
</div>
|
|
187
|
+
`,
|
|
188
|
+
standalone: true,
|
|
189
|
+
imports: [MessageModule, ToastModule, ToggleSwitchModule, ButtonModule, FormField]
|
|
190
|
+
})
|
|
191
|
+
export class ToggleswitchSignalformsDemo {
|
|
192
|
+
messageService = inject(MessageService);
|
|
193
|
+
model = signal({ activation: false });
|
|
194
|
+
exampleForm = form(this.model, (f) => {
|
|
195
|
+
required(f.activation);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
onSubmit(event: Event) {
|
|
199
|
+
event.preventDefault();
|
|
200
|
+
submit(this.exampleForm, async () => {
|
|
201
|
+
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'Form is submitted', life: 3000 });
|
|
202
|
+
this.exampleForm().reset({ activation: false });
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
159
208
|
## Template
|
|
160
209
|
|
|
161
210
|
The handle template is available to display custom content.
|
|
@@ -175,7 +175,6 @@ Tooltip directive provides advisory information for a component.
|
|
|
175
175
|
| disabled | InputSignal<boolean> | false | When present, it specifies that the component should be disabled. |
|
|
176
176
|
| tooltipOptions | InputSignal<TooltipOptions> | ... | Specifies the tooltip configuration options for the component. |
|
|
177
177
|
| 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). |
|
|
178
|
-
| ptTooltip | InputSignal<TooltipPassThrough> | undefined | Used to pass attributes to DOM elements inside the Tooltip component. **(Deprecated)** |
|
|
179
178
|
| pTooltipPT | InputSignal<TooltipPassThrough> | undefined | Used to pass attributes to DOM elements inside the Tooltip component. |
|
|
180
179
|
| pTooltipUnstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
|
|
181
180
|
|