@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
|
@@ -17,13 +17,14 @@ import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
|
17
17
|
@Component({
|
|
18
18
|
template: `
|
|
19
19
|
<div class="card">
|
|
20
|
-
<p-progress-bar [value]="50" />
|
|
20
|
+
<p-progress-bar aria-label="Task progress" [value]="50" />
|
|
21
21
|
</div>
|
|
22
22
|
`,
|
|
23
23
|
standalone: true,
|
|
24
24
|
imports: [ProgressBarModule]
|
|
25
25
|
})
|
|
26
|
-
export class ProgressbarBasicDemo {
|
|
26
|
+
export class ProgressbarBasicDemo {
|
|
27
|
+
}
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
## Dynamic
|
|
@@ -31,25 +32,28 @@ export class ProgressbarBasicDemo {}
|
|
|
31
32
|
Value is reactive so updating it dynamically changes the bar as well.
|
|
32
33
|
|
|
33
34
|
```typescript
|
|
34
|
-
import { Component, OnInit, inject } from '@angular/core';
|
|
35
|
+
import { Component, NgZone, OnDestroy, OnInit, inject } from '@angular/core';
|
|
36
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
35
37
|
import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
36
38
|
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
37
|
-
import { MessageService } from '@exhaustive-ui/core/api';
|
|
38
39
|
|
|
39
40
|
@Component({
|
|
40
41
|
template: `
|
|
41
42
|
<div class="card">
|
|
42
43
|
<p-toast />
|
|
43
|
-
<p-progress-bar [value]="value" />
|
|
44
|
+
<p-progress-bar aria-label="Task progress" [value]="value" />
|
|
44
45
|
</div>
|
|
45
46
|
`,
|
|
46
47
|
standalone: true,
|
|
47
48
|
imports: [ProgressBarModule, ToastModule],
|
|
48
49
|
providers: [MessageService]
|
|
49
50
|
})
|
|
50
|
-
export class ProgressbarDynamicDemo implements OnInit {
|
|
51
|
+
export class ProgressbarDynamicDemo implements OnInit, OnDestroy {
|
|
51
52
|
private messageService = inject(MessageService);
|
|
53
|
+
private ngZone = inject(NgZone);
|
|
54
|
+
|
|
52
55
|
value: number = 0;
|
|
56
|
+
|
|
53
57
|
interval: any;
|
|
54
58
|
|
|
55
59
|
ngOnInit() {
|
|
@@ -80,14 +84,14 @@ export class ProgressbarDynamicDemo implements OnInit {
|
|
|
80
84
|
For progresses with no value to track, set the mode property to indeterminate .
|
|
81
85
|
|
|
82
86
|
```typescript
|
|
83
|
-
import { Component
|
|
84
|
-
import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
87
|
+
import { Component } from '@angular/core';
|
|
85
88
|
import { MessageService } from '@exhaustive-ui/core/api';
|
|
89
|
+
import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
86
90
|
|
|
87
91
|
@Component({
|
|
88
92
|
template: `
|
|
89
93
|
<div class="card">
|
|
90
|
-
<p-progress-bar mode="indeterminate" [style]="{ height: '6px' }" />
|
|
94
|
+
<p-progress-bar aria-label="Loading" mode="indeterminate" [style]="{ height: '6px' }" />
|
|
91
95
|
</div>
|
|
92
96
|
`,
|
|
93
97
|
standalone: true,
|
|
@@ -95,7 +99,6 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
95
99
|
providers: [MessageService]
|
|
96
100
|
})
|
|
97
101
|
export class ProgressbarIndeterminateDemo {
|
|
98
|
-
private messageService = inject(MessageService);
|
|
99
102
|
}
|
|
100
103
|
```
|
|
101
104
|
|
|
@@ -110,7 +113,7 @@ import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
|
110
113
|
@Component({
|
|
111
114
|
template: `
|
|
112
115
|
<div class="card">
|
|
113
|
-
<p-progress-bar [value]="50">
|
|
116
|
+
<p-progress-bar aria-label="Task progress" [value]="50">
|
|
114
117
|
<ng-template #content let-value>
|
|
115
118
|
<span>{{ value }}/100</span>
|
|
116
119
|
</ng-template>
|
|
@@ -120,7 +123,8 @@ import { ProgressBarModule } from '@exhaustive-ui/core/progressbar';
|
|
|
120
123
|
standalone: true,
|
|
121
124
|
imports: [ProgressBarModule]
|
|
122
125
|
})
|
|
123
|
-
export class ProgressbarTemplateDemo {
|
|
126
|
+
export class ProgressbarTemplateDemo {
|
|
127
|
+
}
|
|
124
128
|
```
|
|
125
129
|
|
|
126
130
|
## Progress Bar
|
|
@@ -131,16 +135,18 @@ ProgressBar is a process status indicator.
|
|
|
131
135
|
|
|
132
136
|
| Name | Type | Default | Description |
|
|
133
137
|
|------|------|---------|-------------|
|
|
134
|
-
| dt |
|
|
135
|
-
| unstyled |
|
|
136
|
-
| pt |
|
|
137
|
-
| ptOptions |
|
|
138
|
-
| value |
|
|
139
|
-
| showValue |
|
|
140
|
-
| valueStyleClass |
|
|
141
|
-
| unit |
|
|
142
|
-
| mode |
|
|
143
|
-
| color |
|
|
138
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
139
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
140
|
+
| pt | ProgressBarPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
141
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
142
|
+
| value | number | - | Current value of the progress. |
|
|
143
|
+
| showValue | boolean | true | Whether to display the progress bar value. |
|
|
144
|
+
| valueStyleClass | string | - | Style class of the value element. |
|
|
145
|
+
| unit | string | '%' | Unit sign appended to the value. |
|
|
146
|
+
| mode | "indeterminate" \| "determinate" | 'determinate' | Defines the mode of the progress |
|
|
147
|
+
| color | string | - | Color for the background of the progress. |
|
|
148
|
+
| ariaLabel | string | - | Defines a string that labels the progress bar. |
|
|
149
|
+
| ariaLabelledBy | string | - | Establishes relationships between the progress bar and label(s) where its value should be one or more element IDs. |
|
|
144
150
|
|
|
145
151
|
### Templates
|
|
146
152
|
|
|
@@ -23,7 +23,8 @@ import { ProgressSpinnerModule } from '@exhaustive-ui/core/progressspinner';
|
|
|
23
23
|
standalone: true,
|
|
24
24
|
imports: [ProgressSpinnerModule]
|
|
25
25
|
})
|
|
26
|
-
export class ProgressspinnerBasicDemo {
|
|
26
|
+
export class ProgressspinnerBasicDemo {
|
|
27
|
+
}
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
## Custom
|
|
@@ -37,13 +38,14 @@ import { ProgressSpinnerModule } from '@exhaustive-ui/core/progressspinner';
|
|
|
37
38
|
@Component({
|
|
38
39
|
template: `
|
|
39
40
|
<div class="card flex justify-center">
|
|
40
|
-
<p-progress-spinner strokeWidth="8" fill="transparent" animationDuration=".5s" [style]="{ width: '50px', height: '50px' }" />
|
|
41
|
+
<p-progress-spinner ariaLabel="Loading" strokeWidth="8" fill="transparent" animationDuration=".5s" [style]="{ width: '50px', height: '50px' }" />
|
|
41
42
|
</div>
|
|
42
43
|
`,
|
|
43
44
|
standalone: true,
|
|
44
45
|
imports: [ProgressSpinnerModule]
|
|
45
46
|
})
|
|
46
|
-
export class ProgressspinnerCustomDemo {
|
|
47
|
+
export class ProgressspinnerCustomDemo {
|
|
48
|
+
}
|
|
47
49
|
```
|
|
48
50
|
|
|
49
51
|
## Progress Spinner
|
|
@@ -54,14 +56,14 @@ ProgressSpinner is a process status indicator.
|
|
|
54
56
|
|
|
55
57
|
| Name | Type | Default | Description |
|
|
56
58
|
|------|------|---------|-------------|
|
|
57
|
-
| dt |
|
|
58
|
-
| unstyled |
|
|
59
|
-
| pt |
|
|
60
|
-
| ptOptions |
|
|
61
|
-
| strokeWidth |
|
|
62
|
-
| fill |
|
|
63
|
-
| animationDuration |
|
|
64
|
-
| ariaLabel |
|
|
59
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
60
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
61
|
+
| pt | ProgressSpinnerPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
62
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
63
|
+
| strokeWidth | string | '2' | Width of the circle stroke. |
|
|
64
|
+
| fill | string | 'none' | Color for the background of the circle. |
|
|
65
|
+
| animationDuration | string | '2s' | Duration of the rotate animation. |
|
|
66
|
+
| ariaLabel | string | - | Used to define a aria label attribute the current element. |
|
|
65
67
|
|
|
66
68
|
## Pass Through Options
|
|
67
69
|
|
|
@@ -18,12 +18,12 @@ import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
|
18
18
|
@Component({
|
|
19
19
|
template: `
|
|
20
20
|
<div class="card flex justify-center gap-2">
|
|
21
|
-
<p-radio-button [(ngModel)]="value" [value]="1" [disabled]="true" />
|
|
22
|
-
<p-radio-button [(ngModel)]="value" [value]="2" [disabled]="true" />
|
|
21
|
+
<p-radio-button [(ngModel)]="value" [value]="1" [disabled]="true" ariaLabel="Option 1" />
|
|
22
|
+
<p-radio-button [(ngModel)]="value" [value]="2" [disabled]="true" ariaLabel="Option 2" />
|
|
23
23
|
</div>
|
|
24
24
|
`,
|
|
25
25
|
standalone: true,
|
|
26
|
-
imports: [
|
|
26
|
+
imports: [FormsModule, RadioButtonModule]
|
|
27
27
|
})
|
|
28
28
|
export class RadiobuttonDisabledDemo {
|
|
29
29
|
value: number = 2;
|
|
@@ -36,6 +36,7 @@ RadioButtons can be generated using a list of values.
|
|
|
36
36
|
|
|
37
37
|
```typescript
|
|
38
38
|
import { Component, OnInit } from '@angular/core';
|
|
39
|
+
import { CommonModule } from '@angular/common';
|
|
39
40
|
import { FormsModule } from '@angular/forms';
|
|
40
41
|
import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
41
42
|
|
|
@@ -51,11 +52,17 @@ import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
|
51
52
|
</div>
|
|
52
53
|
`,
|
|
53
54
|
standalone: true,
|
|
54
|
-
imports: [
|
|
55
|
+
imports: [CommonModule, FormsModule, RadioButtonModule]
|
|
55
56
|
})
|
|
56
57
|
export class RadiobuttonDynamicDemo implements OnInit {
|
|
57
58
|
selectedCategory: any = null;
|
|
58
|
-
|
|
59
|
+
|
|
60
|
+
categories: any[] = [
|
|
61
|
+
{ name: 'Accounting', key: 'A' },
|
|
62
|
+
{ name: 'Marketing', key: 'M' },
|
|
63
|
+
{ name: 'Production', key: 'P' },
|
|
64
|
+
{ name: 'Research', key: 'R' }
|
|
65
|
+
];
|
|
59
66
|
|
|
60
67
|
ngOnInit() {
|
|
61
68
|
this.selectedCategory = this.categories[1];
|
|
@@ -75,11 +82,11 @@ import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
|
75
82
|
@Component({
|
|
76
83
|
template: `
|
|
77
84
|
<div class="card flex justify-center">
|
|
78
|
-
<p-radio-button [(ngModel)]="checked" variant="filled" />
|
|
85
|
+
<p-radio-button [(ngModel)]="checked" variant="filled" ariaLabel="Option" />
|
|
79
86
|
</div>
|
|
80
87
|
`,
|
|
81
88
|
standalone: true,
|
|
82
|
-
imports: [
|
|
89
|
+
imports: [FormsModule, RadioButtonModule]
|
|
83
90
|
})
|
|
84
91
|
export class RadiobuttonFilledDemo {
|
|
85
92
|
checked: boolean = false;
|
|
@@ -119,7 +126,7 @@ import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
|
119
126
|
</div>
|
|
120
127
|
`,
|
|
121
128
|
standalone: true,
|
|
122
|
-
imports: [
|
|
129
|
+
imports: [FormsModule, RadioButtonModule]
|
|
123
130
|
})
|
|
124
131
|
export class RadiobuttonGroupDemo {
|
|
125
132
|
ingredient!: string;
|
|
@@ -138,11 +145,11 @@ import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
|
138
145
|
@Component({
|
|
139
146
|
template: `
|
|
140
147
|
<div class="card flex justify-center">
|
|
141
|
-
<p-radio-button [(ngModel)]="value" [invalid]="!value" />
|
|
148
|
+
<p-radio-button [(ngModel)]="value" [invalid]="!value" ariaLabel="Option" />
|
|
142
149
|
</div>
|
|
143
150
|
`,
|
|
144
151
|
standalone: true,
|
|
145
|
-
imports: [
|
|
152
|
+
imports: [FormsModule, RadioButtonModule]
|
|
146
153
|
})
|
|
147
154
|
export class RadiobuttonInvalidDemo {
|
|
148
155
|
value: boolean = false;
|
|
@@ -155,12 +162,13 @@ RadioButton can also be used with reactive forms. In this case, the formControlN
|
|
|
155
162
|
|
|
156
163
|
```typescript
|
|
157
164
|
import { Component, inject } from '@angular/core';
|
|
158
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
159
|
-
import {
|
|
165
|
+
import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
166
|
+
import { CommonModule } from '@angular/common';
|
|
167
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
160
168
|
import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
161
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
162
169
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
163
|
-
import {
|
|
170
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
171
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
164
172
|
|
|
165
173
|
@Component({
|
|
166
174
|
template: `
|
|
@@ -185,20 +193,29 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
185
193
|
</div>
|
|
186
194
|
`,
|
|
187
195
|
standalone: true,
|
|
188
|
-
imports: [
|
|
196
|
+
imports: [ReactiveFormsModule, RadioButtonModule, ButtonModule, ToastModule, MessageModule, CommonModule],
|
|
189
197
|
providers: [MessageService]
|
|
190
198
|
})
|
|
191
199
|
export class RadiobuttonReactiveformsDemo {
|
|
192
|
-
private
|
|
200
|
+
private fb = inject(FormBuilder);
|
|
201
|
+
|
|
193
202
|
messageService = inject(MessageService);
|
|
203
|
+
|
|
194
204
|
formSubmitted: boolean = false;
|
|
205
|
+
|
|
195
206
|
exampleForm: FormGroup;
|
|
196
|
-
|
|
207
|
+
|
|
208
|
+
categories: any[] = [
|
|
209
|
+
{ name: 'Cheese', key: 'C' },
|
|
210
|
+
{ name: 'Mushroom', key: 'M' },
|
|
211
|
+
{ name: 'Pepper', key: 'P' },
|
|
212
|
+
{ name: 'Onion', key: 'O' }
|
|
213
|
+
];
|
|
197
214
|
|
|
198
215
|
constructor() {
|
|
199
216
|
this.exampleForm = this.fb.group({
|
|
200
|
-
|
|
201
|
-
|
|
217
|
+
selectedCategory: ['', Validators.required]
|
|
218
|
+
});
|
|
202
219
|
}
|
|
203
220
|
|
|
204
221
|
isInvalid(controlName: string) {
|
|
@@ -208,7 +225,7 @@ export class RadiobuttonReactiveformsDemo {
|
|
|
208
225
|
|
|
209
226
|
onSubmit() {
|
|
210
227
|
this.formSubmitted = true;
|
|
211
|
-
|
|
228
|
+
|
|
212
229
|
if (this.exampleForm.valid) {
|
|
213
230
|
this.messageService.add({
|
|
214
231
|
severity: 'success',
|
|
@@ -216,9 +233,9 @@ export class RadiobuttonReactiveformsDemo {
|
|
|
216
233
|
detail: 'Form is submitted',
|
|
217
234
|
life: 3000
|
|
218
235
|
});
|
|
219
|
-
|
|
236
|
+
|
|
220
237
|
this.exampleForm.reset();
|
|
221
|
-
|
|
238
|
+
|
|
222
239
|
this.formSubmitted = false;
|
|
223
240
|
}
|
|
224
241
|
}
|
|
@@ -232,11 +249,11 @@ RadioButton can also be used with Angular Signal Forms , the @angular/forms/sign
|
|
|
232
249
|
```typescript
|
|
233
250
|
import { Component, inject, signal } from '@angular/core';
|
|
234
251
|
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
235
|
-
import {
|
|
252
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
236
253
|
import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
237
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
238
254
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
239
|
-
import {
|
|
255
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
256
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
240
257
|
|
|
241
258
|
interface Category {
|
|
242
259
|
name: string;
|
|
@@ -265,12 +282,21 @@ interface Category {
|
|
|
265
282
|
</div>
|
|
266
283
|
`,
|
|
267
284
|
standalone: true,
|
|
268
|
-
imports: [
|
|
285
|
+
imports: [FormField, RadioButtonModule, ButtonModule, ToastModule, MessageModule],
|
|
286
|
+
providers: [MessageService]
|
|
269
287
|
})
|
|
270
288
|
export class RadiobuttonSignalformsDemo {
|
|
271
289
|
messageService = inject(MessageService);
|
|
272
|
-
|
|
290
|
+
|
|
291
|
+
categories: Category[] = [
|
|
292
|
+
{ name: 'Cheese', key: 'C' },
|
|
293
|
+
{ name: 'Mushroom', key: 'M' },
|
|
294
|
+
{ name: 'Pepper', key: 'P' },
|
|
295
|
+
{ name: 'Onion', key: 'O' }
|
|
296
|
+
];
|
|
297
|
+
|
|
273
298
|
model = signal<{ selectedCategory: Category | null }>({ selectedCategory: null });
|
|
299
|
+
|
|
274
300
|
exampleForm = form(this.model, (f) => {
|
|
275
301
|
required(f.selectedCategory);
|
|
276
302
|
});
|
|
@@ -314,7 +340,7 @@ import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
|
314
340
|
</div>
|
|
315
341
|
`,
|
|
316
342
|
standalone: true,
|
|
317
|
-
imports: [
|
|
343
|
+
imports: [FormsModule, RadioButtonModule]
|
|
318
344
|
})
|
|
319
345
|
export class RadiobuttonSizesDemo {
|
|
320
346
|
size: any = false;
|
|
@@ -325,12 +351,13 @@ export class RadiobuttonSizesDemo {
|
|
|
325
351
|
|
|
326
352
|
```typescript
|
|
327
353
|
import { Component, inject } from '@angular/core';
|
|
328
|
-
import { FormsModule } from '@angular/forms';
|
|
329
|
-
import {
|
|
354
|
+
import { FormsModule, NgForm } from '@angular/forms';
|
|
355
|
+
import { CommonModule } from '@angular/common';
|
|
356
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
330
357
|
import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
|
|
331
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
332
358
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
333
|
-
import {
|
|
359
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
360
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
334
361
|
|
|
335
362
|
@Component({
|
|
336
363
|
template: `
|
|
@@ -355,15 +382,22 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
355
382
|
</div>
|
|
356
383
|
`,
|
|
357
384
|
standalone: true,
|
|
358
|
-
imports: [
|
|
385
|
+
imports: [FormsModule, RadioButtonModule, ButtonModule, ToastModule, MessageModule, CommonModule],
|
|
359
386
|
providers: [MessageService]
|
|
360
387
|
})
|
|
361
388
|
export class RadiobuttonTemplatedrivenformsDemo {
|
|
362
|
-
private messageService = inject(MessageService);
|
|
363
389
|
messageService = inject(MessageService);
|
|
390
|
+
|
|
364
391
|
formSubmitted: boolean = false;
|
|
392
|
+
|
|
365
393
|
ingredient!: any;
|
|
366
|
-
|
|
394
|
+
|
|
395
|
+
categories: any[] = [
|
|
396
|
+
{ name: 'Cheese', key: 'C' },
|
|
397
|
+
{ name: 'Mushroom', key: 'M' },
|
|
398
|
+
{ name: 'Pepper', key: 'P' },
|
|
399
|
+
{ name: 'Onion', key: 'O' }
|
|
400
|
+
];
|
|
367
401
|
|
|
368
402
|
isInvalid(form: NgForm) {
|
|
369
403
|
return !this.ingredient && form.submitted;
|
|
@@ -22,7 +22,7 @@ import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
|
22
22
|
</div>
|
|
23
23
|
`,
|
|
24
24
|
standalone: true,
|
|
25
|
-
imports: [
|
|
25
|
+
imports: [FormsModule, RatingModule]
|
|
26
26
|
})
|
|
27
27
|
export class RatingBasicDemo {
|
|
28
28
|
value!: number;
|
|
@@ -45,7 +45,7 @@ import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
|
45
45
|
</div>
|
|
46
46
|
`,
|
|
47
47
|
standalone: true,
|
|
48
|
-
imports: [
|
|
48
|
+
imports: [FormsModule, RatingModule]
|
|
49
49
|
})
|
|
50
50
|
export class RatingDisabledDemo {
|
|
51
51
|
value: number = 5;
|
|
@@ -68,7 +68,7 @@ import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
|
68
68
|
</div>
|
|
69
69
|
`,
|
|
70
70
|
standalone: true,
|
|
71
|
-
imports: [
|
|
71
|
+
imports: [FormsModule, RatingModule]
|
|
72
72
|
})
|
|
73
73
|
export class RatingNumberofstarsDemo {
|
|
74
74
|
value: number = 5;
|
|
@@ -81,12 +81,13 @@ Rating can also be used with reactive forms. In this case, the formControlName p
|
|
|
81
81
|
|
|
82
82
|
```typescript
|
|
83
83
|
import { Component, inject } from '@angular/core';
|
|
84
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
85
|
-
import {
|
|
84
|
+
import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
85
|
+
import { CommonModule } from '@angular/common';
|
|
86
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
86
87
|
import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
87
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
88
88
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
89
|
-
import {
|
|
89
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
90
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
90
91
|
|
|
91
92
|
@Component({
|
|
92
93
|
template: `
|
|
@@ -104,19 +105,22 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
104
105
|
</div>
|
|
105
106
|
`,
|
|
106
107
|
standalone: true,
|
|
107
|
-
imports: [
|
|
108
|
+
imports: [ReactiveFormsModule, RatingModule, ButtonModule, ToastModule, MessageModule, CommonModule],
|
|
108
109
|
providers: [MessageService]
|
|
109
110
|
})
|
|
110
111
|
export class RatingReactiveformsDemo {
|
|
111
|
-
private
|
|
112
|
+
private fb = inject(FormBuilder);
|
|
113
|
+
|
|
112
114
|
messageService = inject(MessageService);
|
|
115
|
+
|
|
113
116
|
exampleForm: FormGroup | undefined;
|
|
114
|
-
|
|
117
|
+
|
|
118
|
+
formSubmitted = false;
|
|
115
119
|
|
|
116
120
|
constructor() {
|
|
117
121
|
this.exampleForm = this.fb.group({
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
ratingValue: [undefined, Validators.required]
|
|
123
|
+
});
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
onSubmit() {
|
|
@@ -151,7 +155,7 @@ import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
|
151
155
|
</div>
|
|
152
156
|
`,
|
|
153
157
|
standalone: true,
|
|
154
|
-
imports: [
|
|
158
|
+
imports: [FormsModule, RatingModule]
|
|
155
159
|
})
|
|
156
160
|
export class RatingReadonlyDemo {
|
|
157
161
|
value: number = 3;
|
|
@@ -165,11 +169,11 @@ Rating can also be used with Angular Signal Forms , the @angular/forms/signals A
|
|
|
165
169
|
```typescript
|
|
166
170
|
import { Component, inject, signal } from '@angular/core';
|
|
167
171
|
import { form, FormField, required, submit } from '@angular/forms/signals';
|
|
168
|
-
import {
|
|
172
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
169
173
|
import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
170
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
171
174
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
172
|
-
import {
|
|
175
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
176
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
173
177
|
|
|
174
178
|
@Component({
|
|
175
179
|
template: `
|
|
@@ -188,11 +192,14 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
188
192
|
</div>
|
|
189
193
|
`,
|
|
190
194
|
standalone: true,
|
|
191
|
-
imports: [
|
|
195
|
+
imports: [FormField, RatingModule, ButtonModule, ToastModule, MessageModule],
|
|
196
|
+
providers: [MessageService]
|
|
192
197
|
})
|
|
193
198
|
export class RatingSignalformsDemo {
|
|
194
199
|
messageService = inject(MessageService);
|
|
200
|
+
|
|
195
201
|
model = signal<{ ratingValue: number | null }>({ ratingValue: null });
|
|
202
|
+
|
|
196
203
|
exampleForm = form(this.model, (f) => {
|
|
197
204
|
required(f.ratingValue);
|
|
198
205
|
});
|
|
@@ -221,16 +228,16 @@ import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
|
221
228
|
<div class="card flex justify-center">
|
|
222
229
|
<p-rating [(ngModel)]="value">
|
|
223
230
|
<ng-template #onicon>
|
|
224
|
-
<img src="https://exhaustive-ui.com/demo/rating/custom-icon-active.png" height="24" width="24" />
|
|
231
|
+
<img src="https://exhaustive-ui.com/demo/rating/custom-icon-active.png" alt="" height="24" width="24" />
|
|
225
232
|
</ng-template>
|
|
226
233
|
<ng-template #officon>
|
|
227
|
-
<img src="https://exhaustive-ui.com/demo/rating/custom-icon.png" height="24" width="24" />
|
|
234
|
+
<img src="https://exhaustive-ui.com/demo/rating/custom-icon.png" alt="" height="24" width="24" />
|
|
228
235
|
</ng-template>
|
|
229
236
|
</p-rating>
|
|
230
237
|
</div>
|
|
231
238
|
`,
|
|
232
239
|
standalone: true,
|
|
233
|
-
imports: [
|
|
240
|
+
imports: [FormsModule, RatingModule]
|
|
234
241
|
})
|
|
235
242
|
export class RatingTemplateDemo {
|
|
236
243
|
value!: number;
|
|
@@ -242,11 +249,12 @@ export class RatingTemplateDemo {
|
|
|
242
249
|
```typescript
|
|
243
250
|
import { Component, inject } from '@angular/core';
|
|
244
251
|
import { FormsModule } from '@angular/forms';
|
|
245
|
-
import {
|
|
252
|
+
import { CommonModule } from '@angular/common';
|
|
253
|
+
import { MessageService } from '@exhaustive-ui/core/api';
|
|
246
254
|
import { RatingModule } from '@exhaustive-ui/core/rating';
|
|
247
|
-
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
248
255
|
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
249
|
-
import {
|
|
256
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
257
|
+
import { MessageModule } from '@exhaustive-ui/core/message';
|
|
250
258
|
|
|
251
259
|
@Component({
|
|
252
260
|
template: `
|
|
@@ -264,12 +272,12 @@ import { MessageService } from '@exhaustive-ui/core/api';
|
|
|
264
272
|
</div>
|
|
265
273
|
`,
|
|
266
274
|
standalone: true,
|
|
267
|
-
imports: [
|
|
275
|
+
imports: [FormsModule, RatingModule, ButtonModule, ToastModule, MessageModule, CommonModule],
|
|
268
276
|
providers: [MessageService]
|
|
269
277
|
})
|
|
270
278
|
export class RatingTemplatedrivenformsDemo {
|
|
271
|
-
private messageService = inject(MessageService);
|
|
272
279
|
messageService = inject(MessageService);
|
|
280
|
+
|
|
273
281
|
value: any;
|
|
274
282
|
|
|
275
283
|
onSubmit(form: any) {
|
|
@@ -289,21 +297,21 @@ Rating is an extension to standard radio button element with theming.
|
|
|
289
297
|
|
|
290
298
|
| Name | Type | Default | Description |
|
|
291
299
|
|------|------|---------|-------------|
|
|
292
|
-
| dt |
|
|
293
|
-
| unstyled |
|
|
294
|
-
| pt |
|
|
295
|
-
| ptOptions |
|
|
296
|
-
| required |
|
|
297
|
-
| invalid |
|
|
298
|
-
| disabled |
|
|
299
|
-
| name |
|
|
300
|
-
| readonly |
|
|
301
|
-
| stars |
|
|
302
|
-
| iconOnClass |
|
|
303
|
-
| iconOnStyle |
|
|
304
|
-
| iconOffClass |
|
|
305
|
-
| iconOffStyle |
|
|
306
|
-
| autofocus |
|
|
300
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
301
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
302
|
+
| pt | RatingPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
303
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
304
|
+
| required | boolean | false | There must be a value (if set). |
|
|
305
|
+
| invalid | boolean | false | When present, it specifies that the component should have invalid state style. |
|
|
306
|
+
| disabled | boolean | false | When present, it specifies that the component should have disabled state style. |
|
|
307
|
+
| name | string | undefined | When present, it specifies that the name of the input. |
|
|
308
|
+
| readonly | boolean | - | When present, changing the value is not possible. |
|
|
309
|
+
| stars | number | 5 | Number of stars. |
|
|
310
|
+
| iconOnClass | string | - | Style class of the on icon. |
|
|
311
|
+
| iconOnStyle | { [klass: string]: any } | - | Inline style of the on icon. |
|
|
312
|
+
| iconOffClass | string | - | Style class of the off icon. |
|
|
313
|
+
| iconOffStyle | { [klass: string]: any } | - | Inline style of the off icon. |
|
|
314
|
+
| autofocus | boolean | - | When present, it specifies that the component should automatically get focus on load. |
|
|
307
315
|
|
|
308
316
|
### Emits
|
|
309
317
|
|
|
@@ -32,7 +32,8 @@ import { RippleModule } from '@exhaustive-ui/core/ripple';
|
|
|
32
32
|
standalone: true,
|
|
33
33
|
imports: [RippleModule]
|
|
34
34
|
})
|
|
35
|
-
export class RippleCustomDemo {
|
|
35
|
+
export class RippleCustomDemo {
|
|
36
|
+
}
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
## Default
|
|
@@ -57,7 +58,8 @@ import { RippleModule } from '@exhaustive-ui/core/ripple';
|
|
|
57
58
|
standalone: true,
|
|
58
59
|
imports: [RippleModule]
|
|
59
60
|
})
|
|
60
|
-
export class RippleDefaultDemo {
|
|
61
|
+
export class RippleDefaultDemo {
|
|
62
|
+
}
|
|
61
63
|
```
|
|
62
64
|
|
|
63
65
|
## Ripple
|
|
@@ -68,10 +70,10 @@ Ripple directive adds ripple effect to the host element.
|
|
|
68
70
|
|
|
69
71
|
| Name | Type | Default | Description |
|
|
70
72
|
|------|------|---------|-------------|
|
|
71
|
-
| dt |
|
|
72
|
-
| unstyled |
|
|
73
|
-
| pt |
|
|
74
|
-
| ptOptions |
|
|
73
|
+
| dt | Object | undefined | Defines scoped design tokens of the component. |
|
|
74
|
+
| unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
|
|
75
|
+
| pt | any | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
76
|
+
| ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
|
|
75
77
|
|
|
76
78
|
## Theming
|
|
77
79
|
|