@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.
- package/data/cards/accordion.md +5 -2
- package/data/cards/animateonscroll.md +8 -5
- package/data/cards/autocomplete.md +8 -3
- package/data/cards/autofocus.md +4 -2
- package/data/cards/avatar.md +4 -2
- package/data/cards/badge.md +2 -1
- package/data/cards/breadcrumb.md +3 -1
- package/data/cards/button.md +8 -2
- package/data/cards/card.md +2 -1
- package/data/cards/carousel.md +7 -5
- package/data/cards/cascadeselect.md +2 -6
- package/data/cards/chart.md +9 -7
- package/data/cards/checkbox.md +4 -3
- package/data/cards/chip.md +2 -1
- package/data/cards/classnames.md +21 -3
- package/data/cards/colorpicker.md +2 -1
- package/data/cards/confirmdialog.md +35 -5
- package/data/cards/confirmpopup.md +25 -3
- package/data/cards/contextmenu.md +1 -7
- package/data/cards/dataview.md +28 -9
- package/data/cards/datepicker.md +4 -3
- package/data/cards/dialog.md +3 -3
- package/data/cards/divider.md +2 -1
- package/data/cards/dock.md +24 -3
- package/data/cards/dragdrop.md +5 -1
- package/data/cards/drawer.md +3 -3
- package/data/cards/dynamicdialog.md +41 -14
- package/data/cards/editor.md +1 -1
- package/data/cards/fieldset.md +2 -1
- package/data/cards/fileinput.md +1 -1
- package/data/cards/fileupload.md +7 -8
- package/data/cards/floatlabel.md +1 -1
- package/data/cards/fluid.md +7 -5
- package/data/cards/focustrap.md +6 -2
- package/data/cards/galleria.md +18 -25
- package/data/cards/iconfield.md +3 -2
- package/data/cards/iftalabel.md +1 -1
- package/data/cards/image.md +4 -2
- package/data/cards/imagecompare.md +4 -3
- package/data/cards/inplace.md +2 -1
- package/data/cards/inputgroup.md +14 -3
- package/data/cards/inputmask.md +2 -2
- package/data/cards/inputnumber.md +4 -3
- package/data/cards/inputotp.md +2 -2
- package/data/cards/inputtext.md +2 -2
- package/data/cards/keyfilter.md +2 -1
- package/data/cards/knob.md +3 -2
- package/data/cards/listbox.md +5 -3
- package/data/cards/megamenu.md +7 -8
- package/data/cards/menu.md +3 -7
- package/data/cards/menubar.md +3 -7
- package/data/cards/message.md +2 -1
- package/data/cards/metergroup.md +3 -7
- package/data/cards/multiselect.md +5 -9
- package/data/cards/orderlist.md +6 -4
- package/data/cards/organizationchart.md +33 -6
- package/data/cards/overlay.md +2 -1
- package/data/cards/paginator.md +2 -1
- package/data/cards/panel.md +2 -1
- package/data/cards/panelmenu.md +4 -13
- package/data/cards/password.md +6 -3
- package/data/cards/picklist.md +9 -5
- package/data/cards/popover.md +6 -5
- package/data/cards/progressbar.md +4 -3
- package/data/cards/progressspinner.md +2 -1
- package/data/cards/radiobutton.md +4 -3
- package/data/cards/rating.md +1 -1
- package/data/cards/ripple.md +2 -1
- package/data/cards/scrollpanel.md +2 -1
- package/data/cards/scrolltop.md +5 -3
- package/data/cards/select.md +2 -1
- package/data/cards/selectbutton.md +6 -2
- package/data/cards/skeleton.md +2 -1
- package/data/cards/slider.md +4 -3
- package/data/cards/speeddial.md +7 -4
- package/data/cards/splitbutton.md +21 -18
- package/data/cards/splitter.md +2 -1
- package/data/cards/stepper.md +8 -3
- package/data/cards/styleclass.md +4 -2
- package/data/cards/table.md +46 -11
- package/data/cards/tabs.md +2 -1
- package/data/cards/tag.md +2 -1
- package/data/cards/terminal.md +31 -22
- package/data/cards/textarea.md +3 -2
- package/data/cards/tieredmenu.md +1 -6
- package/data/cards/timeline.md +5 -5
- package/data/cards/toast.md +7 -8
- package/data/cards/togglebutton.md +1 -1
- package/data/cards/toggleswitch.md +4 -3
- package/data/cards/toolbar.md +8 -8
- package/data/cards/tooltip.md +2 -1
- package/data/cards/tree.md +3 -6
- package/data/cards/treeselect.md +6 -7
- package/data/cards/treetable.md +52 -31
- package/data/components/accordion.md +31 -23
- package/data/components/animateonscroll.md +18 -15
- package/data/components/autocomplete.md +162 -93
- package/data/components/autofocus.md +9 -7
- package/data/components/avatar.md +56 -43
- package/data/components/badge.md +27 -18
- package/data/components/blockui.md +15 -8
- package/data/components/breadcrumb.md +20 -14
- package/data/components/button.md +121 -94
- package/data/components/card.md +12 -10
- package/data/components/carousel.md +75 -53
- package/data/components/cascadeselect.md +271 -238
- package/data/components/chart.md +88 -74
- package/data/components/checkbox.md +107 -73
- package/data/components/chip.md +20 -16
- package/data/components/classnames.md +22 -4
- package/data/components/colorpicker.md +54 -36
- package/data/components/confirmdialog.md +146 -43
- package/data/components/confirmpopup.md +95 -22
- package/data/components/contextmenu.md +110 -39
- package/data/components/dataview.md +176 -83
- package/data/components/datepicker.md +171 -141
- package/data/components/dialog.md +80 -68
- package/data/components/divider.md +17 -12
- package/data/components/dock.md +63 -27
- package/data/components/dragdrop.md +26 -12
- package/data/components/drawer.md +67 -48
- package/data/components/dynamicdialog.md +22 -13
- package/data/components/editor.md +42 -33
- package/data/components/fieldset.md +20 -17
- package/data/components/fileinput.md +92 -35
- package/data/components/fileupload.md +101 -61
- package/data/components/floatlabel.md +20 -11
- package/data/components/fluid.md +11 -9
- package/data/components/focustrap.md +11 -7
- package/data/components/galleria.md +224 -83
- package/data/components/iconfield.md +23 -15
- package/data/components/iftalabel.md +15 -9
- package/data/components/image.md +31 -26
- package/data/components/imagecompare.md +8 -6
- package/data/components/inplace.md +27 -22
- package/data/components/inputgroup.md +53 -29
- package/data/components/inputmask.md +107 -85
- package/data/components/inputnumber.md +127 -89
- package/data/components/inputotp.md +55 -42
- package/data/components/inputtext.md +72 -50
- package/data/components/keyfilter.md +6 -3
- package/data/components/knob.md +70 -58
- package/data/components/listbox.md +171 -141
- package/data/components/megamenu.md +24 -23
- package/data/components/menu.md +37 -34
- package/data/components/menubar.md +27 -22
- package/data/components/message.md +44 -32
- package/data/components/metergroup.md +48 -17
- package/data/components/multiselect.md +232 -168
- package/data/components/orderlist.md +55 -48
- package/data/components/organizationchart.md +182 -13
- package/data/components/overlay.md +31 -26
- package/data/components/paginator.md +49 -34
- package/data/components/panel.md +23 -19
- package/data/components/panelmenu.md +51 -25
- package/data/components/password.md +104 -91
- package/data/components/picklist.md +92 -70
- package/data/components/popover.md +68 -46
- package/data/components/progressbar.md +28 -22
- package/data/components/progressspinner.md +13 -11
- package/data/components/radiobutton.md +69 -35
- package/data/components/rating.md +48 -40
- package/data/components/ripple.md +8 -6
- package/data/components/scroller.md +29 -29
- package/data/components/scrollpanel.md +9 -7
- package/data/components/scrolltop.md +20 -18
- package/data/components/select.md +248 -169
- package/data/components/selectbutton.md +118 -56
- package/data/components/skeleton.md +22 -18
- package/data/components/slider.md +73 -49
- package/data/components/speeddial.md +77 -59
- package/data/components/splitbutton.md +354 -329
- package/data/components/splitter.md +22 -18
- package/data/components/stepper.md +38 -21
- package/data/components/styleclass.md +12 -6
- package/data/components/table.md +523 -314
- package/data/components/tabs.md +44 -26
- package/data/components/tag.md +18 -14
- package/data/components/terminal.md +38 -27
- package/data/components/textarea.md +82 -47
- package/data/components/tieredmenu.md +34 -29
- package/data/components/timeline.md +29 -28
- package/data/components/toast.md +115 -57
- package/data/components/togglebutton.md +53 -39
- package/data/components/toggleswitch.md +41 -28
- package/data/components/toolbar.md +19 -18
- package/data/components/tooltip.md +43 -32
- package/data/components/tree.md +114 -81
- package/data/components/treeselect.md +176 -174
- package/data/components/treetable.md +1250 -1045
- package/data/components.json +4122 -4080
- package/data/llms-full.txt +8784 -6249
- package/data/manifest.json +154 -15
- package/data/pages/tailwind.md +20 -10
- package/data/snapshot.json +2 -2
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -18,11 +18,11 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
18
18
|
@Component({
|
|
19
19
|
template: `
|
|
20
20
|
<div class="card flex justify-center gap-4">
|
|
21
|
-
<p-checkbox [(ngModel)]="checked" [binary]="true" />
|
|
21
|
+
<p-checkbox [(ngModel)]="checked" [binary]="true" ariaLabel="Accept" />
|
|
22
22
|
</div>
|
|
23
23
|
`,
|
|
24
24
|
standalone: true,
|
|
25
|
-
imports: [
|
|
25
|
+
imports: [FormsModule, CheckboxModule]
|
|
26
26
|
})
|
|
27
27
|
export class CheckboxBasicDemo {
|
|
28
28
|
checked: any = null;
|
|
@@ -41,15 +41,16 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
41
41
|
@Component({
|
|
42
42
|
template: `
|
|
43
43
|
<div class="card flex justify-center gap-2">
|
|
44
|
-
<p-checkbox [(ngModel)]="checked1" [binary]="true" [disabled]="true" />
|
|
45
|
-
<p-checkbox [(ngModel)]="checked2" [binary]="true" [disabled]="true" />
|
|
44
|
+
<p-checkbox [(ngModel)]="checked1" [binary]="true" ariaLabel="Unchecked option" [disabled]="true" />
|
|
45
|
+
<p-checkbox [(ngModel)]="checked2" [binary]="true" ariaLabel="Checked option" [disabled]="true" />
|
|
46
46
|
</div>
|
|
47
47
|
`,
|
|
48
48
|
standalone: true,
|
|
49
|
-
imports: [
|
|
49
|
+
imports: [FormsModule, CheckboxModule]
|
|
50
50
|
})
|
|
51
51
|
export class CheckboxDisabledDemo {
|
|
52
52
|
checked1: boolean = false;
|
|
53
|
+
|
|
53
54
|
checked2: boolean = true;
|
|
54
55
|
}
|
|
55
56
|
```
|
|
@@ -59,7 +60,8 @@ export class CheckboxDisabledDemo {
|
|
|
59
60
|
Checkboxes can be generated using a list of values.
|
|
60
61
|
|
|
61
62
|
```typescript
|
|
62
|
-
import { Component
|
|
63
|
+
import { Component } from '@angular/core';
|
|
64
|
+
import { CommonModule } from '@angular/common';
|
|
63
65
|
import { FormsModule } from '@angular/forms';
|
|
64
66
|
import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
65
67
|
|
|
@@ -75,11 +77,17 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
75
77
|
</div>
|
|
76
78
|
`,
|
|
77
79
|
standalone: true,
|
|
78
|
-
imports: [
|
|
80
|
+
imports: [CommonModule, FormsModule, CheckboxModule]
|
|
79
81
|
})
|
|
80
|
-
export class CheckboxDynamicDemo
|
|
82
|
+
export class CheckboxDynamicDemo {
|
|
81
83
|
selectedCategories: any[] = [];
|
|
82
|
-
|
|
84
|
+
|
|
85
|
+
categories: any[] = [
|
|
86
|
+
{ name: 'Accounting', key: 'A' },
|
|
87
|
+
{ name: 'Marketing', key: 'M' },
|
|
88
|
+
{ name: 'Production', key: 'P' },
|
|
89
|
+
{ name: 'Research', key: 'R' }
|
|
90
|
+
];
|
|
83
91
|
|
|
84
92
|
ngOnInit() {
|
|
85
93
|
this.selectedCategories = [this.categories[1]];
|
|
@@ -99,11 +107,11 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
99
107
|
@Component({
|
|
100
108
|
template: `
|
|
101
109
|
<div class="card flex justify-center">
|
|
102
|
-
<p-checkbox [(ngModel)]="checked" [binary]="true" variant="filled" />
|
|
110
|
+
<p-checkbox [(ngModel)]="checked" [binary]="true" variant="filled" ariaLabel="Accept" />
|
|
103
111
|
</div>
|
|
104
112
|
`,
|
|
105
113
|
standalone: true,
|
|
106
|
-
imports: [
|
|
114
|
+
imports: [FormsModule, CheckboxModule]
|
|
107
115
|
})
|
|
108
116
|
export class CheckboxFilledDemo {
|
|
109
117
|
checked: boolean = false;
|
|
@@ -122,11 +130,11 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
122
130
|
@Component({
|
|
123
131
|
template: `
|
|
124
132
|
<div class="card flex justify-center gap-4">
|
|
125
|
-
<p-checkbox [(ngModel)]="checked" [binary]="true" [indeterminate]="true" />
|
|
133
|
+
<p-checkbox [(ngModel)]="checked" [binary]="true" [indeterminate]="true" ariaLabel="Select all" />
|
|
126
134
|
</div>
|
|
127
135
|
`,
|
|
128
136
|
standalone: true,
|
|
129
|
-
imports: [
|
|
137
|
+
imports: [FormsModule, CheckboxModule]
|
|
130
138
|
})
|
|
131
139
|
export class CheckboxIndeterminateDemo {
|
|
132
140
|
checked: any = null;
|
|
@@ -145,11 +153,11 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
145
153
|
@Component({
|
|
146
154
|
template: `
|
|
147
155
|
<div class="card flex justify-center">
|
|
148
|
-
<p-checkbox [(ngModel)]="checked" [binary]="true" [invalid]="!checked" />
|
|
156
|
+
<p-checkbox [(ngModel)]="checked" [binary]="true" [invalid]="!checked" ariaLabel="Accept" />
|
|
149
157
|
</div>
|
|
150
158
|
`,
|
|
151
159
|
standalone: true,
|
|
152
|
-
imports: [
|
|
160
|
+
imports: [FormsModule, CheckboxModule]
|
|
153
161
|
})
|
|
154
162
|
export class CheckboxInvalidDemo {
|
|
155
163
|
checked: boolean = false;
|
|
@@ -187,7 +195,7 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
187
195
|
</div>
|
|
188
196
|
`,
|
|
189
197
|
standalone: true,
|
|
190
|
-
imports: [
|
|
198
|
+
imports: [FormsModule, CheckboxModule]
|
|
191
199
|
})
|
|
192
200
|
export class CheckboxMultipleDemo {
|
|
193
201
|
pizza: string[] = [];
|
|
@@ -200,12 +208,13 @@ Checkbox can also be used with reactive forms. In this case, the formControlName
|
|
|
200
208
|
|
|
201
209
|
```typescript
|
|
202
210
|
import { Component, inject } from '@angular/core';
|
|
203
|
-
import {
|
|
211
|
+
import { CommonModule } from '@angular/common';
|
|
212
|
+
import { ReactiveFormsModule, FormBuilder, FormGroup } from '@angular/forms';
|
|
213
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
204
214
|
import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
205
|
-
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
206
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
207
215
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
208
|
-
import {
|
|
216
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
217
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
209
218
|
|
|
210
219
|
@Component({
|
|
211
220
|
template: `
|
|
@@ -230,27 +239,35 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
230
239
|
</div>
|
|
231
240
|
`,
|
|
232
241
|
standalone: true,
|
|
233
|
-
imports: [
|
|
242
|
+
imports: [CommonModule, ReactiveFormsModule, CheckboxModule, ButtonModule, ToastModule, MessageModule],
|
|
243
|
+
providers: [MessageService]
|
|
234
244
|
})
|
|
235
245
|
export class CheckboxReactiveformsDemo {
|
|
246
|
+
private fb = inject(FormBuilder);
|
|
247
|
+
|
|
236
248
|
messageService = inject(MessageService);
|
|
249
|
+
|
|
237
250
|
formSubmitted: boolean = false;
|
|
251
|
+
|
|
238
252
|
exampleForm: FormGroup;
|
|
239
253
|
|
|
240
254
|
constructor() {
|
|
241
255
|
this.exampleForm = this.fb.group(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
256
|
+
{
|
|
257
|
+
cheese: [false],
|
|
258
|
+
mushroom: [false],
|
|
259
|
+
pepper: [false],
|
|
260
|
+
onion: [false]
|
|
261
|
+
},
|
|
262
|
+
{ validators: this.atLeastOneSelectedValidator }
|
|
263
|
+
);
|
|
250
264
|
}
|
|
251
265
|
|
|
252
|
-
|
|
253
|
-
|
|
266
|
+
get formKeys(): string[] {
|
|
267
|
+
return Object.keys(this.exampleForm.controls);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
atLeastOneSelectedValidator(group: FormGroup): { [key: string]: any } | null {
|
|
254
271
|
const anySelected = Object.values(group.controls).some((control) => control.value === true);
|
|
255
272
|
return anySelected ? null : { atLeastOneRequired: true };
|
|
256
273
|
}
|
|
@@ -266,7 +283,7 @@ export class CheckboxReactiveformsDemo {
|
|
|
266
283
|
|
|
267
284
|
onSubmit() {
|
|
268
285
|
this.formSubmitted = true;
|
|
269
|
-
|
|
286
|
+
|
|
270
287
|
if (this.exampleForm.valid) {
|
|
271
288
|
this.messageService.add({
|
|
272
289
|
severity: 'success',
|
|
@@ -274,14 +291,14 @@ export class CheckboxReactiveformsDemo {
|
|
|
274
291
|
detail: 'Form is submitted',
|
|
275
292
|
life: 3000
|
|
276
293
|
});
|
|
277
|
-
|
|
294
|
+
|
|
278
295
|
this.exampleForm.reset({
|
|
279
296
|
cheese: false,
|
|
280
297
|
mushroom: false,
|
|
281
298
|
pepper: false,
|
|
282
299
|
onion: false
|
|
283
300
|
});
|
|
284
|
-
|
|
301
|
+
|
|
285
302
|
this.formSubmitted = false;
|
|
286
303
|
}
|
|
287
304
|
}
|
|
@@ -295,11 +312,11 @@ Checkbox can also be used with Angular Signal Forms , the @angular/forms/signals
|
|
|
295
312
|
```typescript
|
|
296
313
|
import { Component, inject, signal } from '@angular/core';
|
|
297
314
|
import { form, FormField, submit, validate } from '@angular/forms/signals';
|
|
315
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
298
316
|
import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
299
|
-
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
300
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
301
317
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
302
|
-
import {
|
|
318
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
319
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
303
320
|
|
|
304
321
|
type Ingredient = 'cheese' | 'mushroom' | 'pepper' | 'onion';
|
|
305
322
|
|
|
@@ -324,12 +341,16 @@ type Ingredient = 'cheese' | 'mushroom' | 'pepper' | 'onion';
|
|
|
324
341
|
</div>
|
|
325
342
|
`,
|
|
326
343
|
standalone: true,
|
|
327
|
-
imports: [CheckboxModule,
|
|
344
|
+
imports: [FormField, CheckboxModule, ButtonModule, ToastModule, MessageModule],
|
|
345
|
+
providers: [MessageService]
|
|
328
346
|
})
|
|
329
347
|
export class CheckboxSignalformsDemo {
|
|
330
348
|
messageService = inject(MessageService);
|
|
349
|
+
|
|
331
350
|
formKeys: Ingredient[] = ['cheese', 'mushroom', 'pepper', 'onion'];
|
|
351
|
+
|
|
332
352
|
model = signal({ cheese: false, mushroom: false, pepper: false, onion: false });
|
|
353
|
+
|
|
333
354
|
exampleForm = form(this.model, (f) => {
|
|
334
355
|
validate(f, ({ value }) => (Object.values(value()).some(Boolean) ? null : { kind: 'atLeastOneRequired' }));
|
|
335
356
|
});
|
|
@@ -371,7 +392,7 @@ import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
|
371
392
|
</div>
|
|
372
393
|
`,
|
|
373
394
|
standalone: true,
|
|
374
|
-
imports: [
|
|
395
|
+
imports: [FormsModule, CheckboxModule]
|
|
375
396
|
})
|
|
376
397
|
export class CheckboxSizesDemo {
|
|
377
398
|
size: any = null;
|
|
@@ -382,12 +403,13 @@ export class CheckboxSizesDemo {
|
|
|
382
403
|
|
|
383
404
|
```typescript
|
|
384
405
|
import { Component, inject } from '@angular/core';
|
|
385
|
-
import {
|
|
406
|
+
import { CommonModule } from '@angular/common';
|
|
407
|
+
import { FormsModule, NgForm } from '@angular/forms';
|
|
408
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
386
409
|
import { CheckboxModule } from '@exhaustive-ui/core/checkbox';
|
|
387
|
-
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
388
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
389
410
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
390
|
-
import {
|
|
411
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
412
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
391
413
|
|
|
392
414
|
@Component({
|
|
393
415
|
template: `
|
|
@@ -412,12 +434,24 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
412
434
|
</div>
|
|
413
435
|
`,
|
|
414
436
|
standalone: true,
|
|
415
|
-
imports: [
|
|
437
|
+
imports: [CommonModule, FormsModule, CheckboxModule, ButtonModule, ToastModule, MessageModule],
|
|
438
|
+
providers: [MessageService]
|
|
416
439
|
})
|
|
417
440
|
export class CheckboxTemplatedrivenformsDemo {
|
|
418
441
|
messageService = inject(MessageService);
|
|
442
|
+
|
|
419
443
|
formSubmitted: boolean = false;
|
|
420
|
-
|
|
444
|
+
|
|
445
|
+
formModel = {
|
|
446
|
+
cheese: false,
|
|
447
|
+
mushroom: false,
|
|
448
|
+
pepper: false,
|
|
449
|
+
onion: false
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
get formKeys(): string[] {
|
|
453
|
+
return Object.keys(this.formModel);
|
|
454
|
+
}
|
|
421
455
|
|
|
422
456
|
isInvalid(): boolean {
|
|
423
457
|
return this.formSubmitted && !this.isAtLeastOneSelected();
|
|
@@ -429,7 +463,7 @@ export class CheckboxTemplatedrivenformsDemo {
|
|
|
429
463
|
|
|
430
464
|
onSubmit(form: NgForm) {
|
|
431
465
|
this.formSubmitted = true;
|
|
432
|
-
|
|
466
|
+
|
|
433
467
|
if (this.isAtLeastOneSelected()) {
|
|
434
468
|
this.messageService.add({
|
|
435
469
|
severity: 'success',
|
|
@@ -437,7 +471,7 @@ export class CheckboxTemplatedrivenformsDemo {
|
|
|
437
471
|
detail: 'Form is submitted',
|
|
438
472
|
life: 3000
|
|
439
473
|
});
|
|
440
|
-
|
|
474
|
+
|
|
441
475
|
this.formModel = {
|
|
442
476
|
cheese: false,
|
|
443
477
|
mushroom: false,
|
|
@@ -445,7 +479,7 @@ export class CheckboxTemplatedrivenformsDemo {
|
|
|
445
479
|
onion: false
|
|
446
480
|
};
|
|
447
481
|
form.resetForm(this.formModel);
|
|
448
|
-
|
|
482
|
+
|
|
449
483
|
this.formSubmitted = false;
|
|
450
484
|
}
|
|
451
485
|
}
|
|
@@ -460,31 +494,31 @@ Checkbox is an extension to standard checkbox element with theming.
|
|
|
460
494
|
|
|
461
495
|
| Name | Type | Default | Description |
|
|
462
496
|
|------|------|---------|-------------|
|
|
463
|
-
| dt |
|
|
464
|
-
| unstyled |
|
|
465
|
-
| pt |
|
|
466
|
-
| ptOptions |
|
|
467
|
-
| required |
|
|
468
|
-
| invalid |
|
|
469
|
-
| disabled |
|
|
470
|
-
| name |
|
|
471
|
-
| value |
|
|
472
|
-
| binary |
|
|
473
|
-
| ariaLabelledBy |
|
|
474
|
-
| ariaLabel |
|
|
475
|
-
| tabindex |
|
|
476
|
-
| inputId |
|
|
477
|
-
| inputStyle |
|
|
478
|
-
| inputClass |
|
|
479
|
-
| indeterminate |
|
|
480
|
-
| formControl |
|
|
481
|
-
| checkboxIcon |
|
|
482
|
-
| readonly |
|
|
483
|
-
| autofocus |
|
|
484
|
-
| trueValue |
|
|
485
|
-
| falseValue |
|
|
486
|
-
| variant |
|
|
487
|
-
| size |
|
|
497
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
498
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
499
|
+
| pt | CheckboxPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
500
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
501
|
+
| required | boolean | false | There must be a value (if set). |
|
|
502
|
+
| invalid | boolean | false | When present, it specifies that the component should have invalid state style. |
|
|
503
|
+
| disabled | boolean | false | When present, it specifies that the component should have disabled state style. |
|
|
504
|
+
| name | string | undefined | When present, it specifies that the name of the input. |
|
|
505
|
+
| value | any | - | Value of the checkbox. |
|
|
506
|
+
| binary | boolean | - | Allows to select a boolean value instead of multiple values. |
|
|
507
|
+
| ariaLabelledBy | string | - | Establishes relationships between the component and label(s) where its value should be one or more element IDs. |
|
|
508
|
+
| ariaLabel | string | - | Used to define a string that labels the input element. |
|
|
509
|
+
| tabindex | number | - | Index of the element in tabbing order. |
|
|
510
|
+
| inputId | string | - | Identifier of the focus input to match a label defined for the component. |
|
|
511
|
+
| inputStyle | { [klass: string]: any } | - | Inline style of the input element. |
|
|
512
|
+
| inputClass | string | - | Style class of the input element. |
|
|
513
|
+
| indeterminate | boolean | false | When present, it specifies input state as indeterminate. |
|
|
514
|
+
| formControl | FormControl<any> | - | Form control value. |
|
|
515
|
+
| checkboxIcon | string | - | Icon class of the checkbox icon. |
|
|
516
|
+
| readonly | boolean | - | When present, it specifies that the component cannot be edited. |
|
|
517
|
+
| autofocus | boolean | - | When present, it specifies that the component should automatically get focus on load. |
|
|
518
|
+
| trueValue | any | true | Value in checked state. |
|
|
519
|
+
| falseValue | any | false | Value in unchecked state. |
|
|
520
|
+
| variant | "outlined" \| "filled" | undefined | Specifies the input variant of the component. |
|
|
521
|
+
| size | "small" \| "large" | undefined | Specifies the size of the component. |
|
|
488
522
|
|
|
489
523
|
### Emits
|
|
490
524
|
|
package/data/components/chip.md
CHANGED
|
@@ -26,7 +26,8 @@ import { ChipModule } from '@exhaustive-ui/core/chip';
|
|
|
26
26
|
standalone: true,
|
|
27
27
|
imports: [ChipModule]
|
|
28
28
|
})
|
|
29
|
-
export class ChipBasicDemo {
|
|
29
|
+
export class ChipBasicDemo {
|
|
30
|
+
}
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
## Icon
|
|
@@ -49,7 +50,8 @@ import { ChipModule } from '@exhaustive-ui/core/chip';
|
|
|
49
50
|
standalone: true,
|
|
50
51
|
imports: [ChipModule]
|
|
51
52
|
})
|
|
52
|
-
export class ChipIconDemo {
|
|
53
|
+
export class ChipIconDemo {
|
|
54
|
+
}
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
## Image
|
|
@@ -72,7 +74,8 @@ import { ChipModule } from '@exhaustive-ui/core/chip';
|
|
|
72
74
|
standalone: true,
|
|
73
75
|
imports: [ChipModule]
|
|
74
76
|
})
|
|
75
|
-
export class ChipImageDemo {
|
|
77
|
+
export class ChipImageDemo {
|
|
78
|
+
}
|
|
76
79
|
```
|
|
77
80
|
|
|
78
81
|
## Template
|
|
@@ -95,7 +98,8 @@ import { ChipModule } from '@exhaustive-ui/core/chip';
|
|
|
95
98
|
standalone: true,
|
|
96
99
|
imports: [ChipModule]
|
|
97
100
|
})
|
|
98
|
-
export class ChipTemplateDemo {
|
|
101
|
+
export class ChipTemplateDemo {
|
|
102
|
+
}
|
|
99
103
|
```
|
|
100
104
|
|
|
101
105
|
## Chip
|
|
@@ -106,18 +110,18 @@ Chip represents people using icons, labels and images.
|
|
|
106
110
|
|
|
107
111
|
| Name | Type | Default | Description |
|
|
108
112
|
|------|------|---------|-------------|
|
|
109
|
-
| dt |
|
|
110
|
-
| unstyled |
|
|
111
|
-
| pt |
|
|
112
|
-
| ptOptions |
|
|
113
|
-
| label |
|
|
114
|
-
| icon |
|
|
115
|
-
| image |
|
|
116
|
-
| alt |
|
|
117
|
-
| disabled |
|
|
118
|
-
| removable |
|
|
119
|
-
| removeIcon |
|
|
120
|
-
| chipProps |
|
|
113
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
114
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
115
|
+
| pt | ChipPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
116
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
117
|
+
| label | string | - | Defines the text to display. |
|
|
118
|
+
| icon | string | - | Defines the icon to display. |
|
|
119
|
+
| image | string | - | Defines the image to display. |
|
|
120
|
+
| alt | string | - | Alt attribute of the image. |
|
|
121
|
+
| disabled | boolean | false | When present, it specifies that the element should be disabled. |
|
|
122
|
+
| removable | boolean | false | Whether to display a remove icon. |
|
|
123
|
+
| removeIcon | string | - | Icon of the remove element. |
|
|
124
|
+
| chipProps | ChipProps | - | Used to pass all properties of the chipProps to the Chip component. |
|
|
121
125
|
|
|
122
126
|
### Emits
|
|
123
127
|
|
|
@@ -7,7 +7,9 @@ ClassNames provides extended class binding functionality that is not possible wi
|
|
|
7
7
|
pClass directive accepts a string , array , object or any combination of these types with support for nesting. Angular's native class directive does not support combining multiple types with a single directive, nor white-space separated values in a single string. Note: For Tailwind Users, it is recommended to use the classAttributes configuration for intellisense support.
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
import {
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
11
|
+
import { Component, computed, signal } from '@angular/core';
|
|
12
|
+
import { ClassNamesModule } from '@exhaustive-ui/core/classnames';
|
|
11
13
|
|
|
12
14
|
@Component({
|
|
13
15
|
template: `
|
|
@@ -44,12 +46,28 @@ import { Component, signal } from '@angular/core';
|
|
|
44
46
|
</div>
|
|
45
47
|
`,
|
|
46
48
|
standalone: true,
|
|
47
|
-
imports: []
|
|
49
|
+
imports: [ClassNamesModule, CommonModule]
|
|
48
50
|
})
|
|
49
51
|
export class ClassnamesExamplesDemo {
|
|
50
52
|
active1 = signal<boolean>(false);
|
|
53
|
+
|
|
51
54
|
active2 = signal<boolean>(false);
|
|
52
|
-
|
|
55
|
+
|
|
56
|
+
nestedClasses = computed(() => [
|
|
57
|
+
'p-4',
|
|
58
|
+
'rounded-lg',
|
|
59
|
+
{
|
|
60
|
+
'bg-primary text-primary-contrast': this.active2()
|
|
61
|
+
},
|
|
62
|
+
[
|
|
63
|
+
'cursor-pointer select-none',
|
|
64
|
+
'border',
|
|
65
|
+
{
|
|
66
|
+
'bg-primary-100 text-primary-800': !this.active2()
|
|
67
|
+
},
|
|
68
|
+
['shadow-xs hover:shadow-lg', 'transition-all']
|
|
69
|
+
]
|
|
70
|
+
]);
|
|
53
71
|
|
|
54
72
|
toggle1() {
|
|
55
73
|
this.active1.set(!this.active1());
|
|
@@ -70,5 +88,5 @@ Supports strings, arrays, objects, and mixed combinations.
|
|
|
70
88
|
|
|
71
89
|
| Name | Type | Default | Description |
|
|
72
90
|
|------|------|---------|-------------|
|
|
73
|
-
| classNames |
|
|
91
|
+
| classNames | any | - | Class value(s) to be applied. Can be a string, array, object, or combination. |
|
|
74
92
|
|