@exhaustive-ui/mcp 0.0.0-stage → 22.0.0-alpha.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/LICENSE +23 -0
- package/README.md +167 -2
- package/data/components/accordion.md +421 -0
- package/data/components/animateonscroll.md +163 -0
- package/data/components/autocomplete.md +1077 -0
- package/data/components/autofocus.md +38 -0
- package/data/components/avatar.md +417 -0
- package/data/components/badge.md +234 -0
- package/data/components/blockui.md +108 -0
- package/data/components/breadcrumb.md +178 -0
- package/data/components/button.md +774 -0
- package/data/components/card.md +138 -0
- package/data/components/carousel.md +440 -0
- package/data/components/cascadeselect.md +1387 -0
- package/data/components/chart.md +1178 -0
- package/data/components/checkbox.md +529 -0
- package/data/components/chip.md +180 -0
- package/data/components/colorpicker.md +301 -0
- package/data/components/confirmdialog.md +287 -0
- package/data/components/confirmpopup.md +417 -0
- package/data/components/contextmenu.md +491 -0
- package/data/components/dataview.md +600 -0
- package/data/components/datepicker.md +1262 -0
- package/data/components/dialog.md +622 -0
- package/data/components/divider.md +250 -0
- package/data/components/dock.md +500 -0
- package/data/components/dragdrop.md +285 -0
- package/data/components/drawer.md +510 -0
- package/data/components/dynamicdialog.md +109 -0
- package/data/components/editor.md +291 -0
- package/data/components/fieldset.md +182 -0
- package/data/components/fileupload.md +430 -0
- package/data/components/floatlabel.md +155 -0
- package/data/components/fluid.md +72 -0
- package/data/components/focustrap.md +65 -0
- package/data/components/galleria.md +627 -0
- package/data/components/iconfield.md +246 -0
- package/data/components/iftalabel.md +105 -0
- package/data/components/imagecompare.md +97 -0
- package/data/components/inplace.md +233 -0
- package/data/components/inputgroup.md +306 -0
- package/data/components/inputmask.md +518 -0
- package/data/components/inputnumber.md +675 -0
- package/data/components/inputotp.md +336 -0
- package/data/components/inputtext.md +488 -0
- package/data/components/keyfilter.md +85 -0
- package/data/components/knob.md +462 -0
- package/data/components/listbox.md +798 -0
- package/data/components/llms.md +28 -0
- package/data/components/megamenu.md +587 -0
- package/data/components/menu.md +483 -0
- package/data/components/menubar.md +462 -0
- package/data/components/message.md +449 -0
- package/data/components/metergroup.md +241 -0
- package/data/components/multiselect.md +1047 -0
- package/data/components/orderlist.md +342 -0
- package/data/components/organizationchart.md +197 -0
- package/data/components/overlay.md +217 -0
- package/data/components/paginator.md +314 -0
- package/data/components/panel.md +214 -0
- package/data/components/panelmenu.md +699 -0
- package/data/components/password.md +570 -0
- package/data/components/picklist.md +420 -0
- package/data/components/popover.md +378 -0
- package/data/components/progressbar.md +181 -0
- package/data/components/progressspinner.md +91 -0
- package/data/components/radiobutton.md +377 -0
- package/data/components/rating.md +312 -0
- package/data/components/ripple.md +89 -0
- package/data/components/scroller.md +122 -0
- package/data/components/scrollpanel.md +149 -0
- package/data/components/scrolltop.md +105 -0
- package/data/components/select.md +1206 -0
- package/data/components/selectbutton.md +356 -0
- package/data/components/skeleton.md +242 -0
- package/data/components/slider.md +337 -0
- package/data/components/speeddial.md +589 -0
- package/data/components/splitbutton.md +945 -0
- package/data/components/splitter.md +196 -0
- package/data/components/stepper.md +411 -0
- package/data/components/styleclass.md +126 -0
- package/data/components/table.md +4557 -0
- package/data/components/tabs.md +467 -0
- package/data/components/tag.md +200 -0
- package/data/components/terminal.md +118 -0
- package/data/components/textarea.md +416 -0
- package/data/components/tieredmenu.md +578 -0
- package/data/components/timeline.md +310 -0
- package/data/components/toast.md +596 -0
- package/data/components/togglebutton.md +356 -0
- package/data/components/toggleswitch.md +285 -0
- package/data/components/toolbar.md +182 -0
- package/data/components/tooltip.md +211 -0
- package/data/components/tree.md +746 -0
- package/data/components/treeselect.md +912 -0
- package/data/components/treetable.md +2814 -0
- package/data/components.json +43751 -0
- package/data/llms-full.txt +47433 -0
- package/data/llms.txt +121 -0
- package/data/manifest.json +46513 -0
- package/data/pages/accessibility.md +28 -0
- package/data/pages/animations.md +28 -0
- package/data/pages/configuration.md +210 -0
- package/data/pages/contribution.md +20 -0
- package/data/pages/customicons.md +20 -0
- package/data/pages/faq.md +20 -0
- package/data/pages/icons.md +66 -0
- package/data/pages/installation.md +71 -0
- package/data/pages/llms.md +61 -0
- package/data/pages/passthrough.md +32 -0
- package/data/pages/philosophy.md +28 -0
- package/data/pages/primeflex.md +20 -0
- package/data/pages/rtl.md +12 -0
- package/data/pages/styled.md +132 -0
- package/data/pages/tailwind.md +40 -0
- package/data/pages/unstyled.md +39 -0
- package/data/snapshot.json +9 -0
- package/dist/index.d.mts +448 -0
- package/dist/index.mjs +2501 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -3
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
# Angular Speed Dial Component
|
|
2
|
+
|
|
3
|
+
SpeedDial is a floating button with a popup menu.
|
|
4
|
+
|
|
5
|
+
## Accessibility
|
|
6
|
+
|
|
7
|
+
Screen Reader SpeedDial component renders a native button element that implicitly includes any passed prop. Text to describe the button can be defined with the aria-labelledby or aria-label props. Addititonally the button includes includes aria-haspopup , aria-expanded for states along with aria-controls to define the relation between the popup and the button. The popup overlay uses menu role on the list and each action item has a menuitem role with an aria-label as the menuitem label. The id of the menu refers to the aria-controls of the button.
|
|
8
|
+
|
|
9
|
+
## Circle
|
|
10
|
+
|
|
11
|
+
Items can be displayed around the button when type is set to circle . Additional radius property defines the radius of the circle.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Component, OnInit, inject } from '@angular/core';
|
|
15
|
+
import { SpeedDialModule } from '@exhaustive-ui/core/speeddial';
|
|
16
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
17
|
+
import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
template: `
|
|
21
|
+
<div class="card">
|
|
22
|
+
<div style="position:relative; height: 500px;" class="flex items-center justify-center">
|
|
23
|
+
<p-toast />
|
|
24
|
+
<p-speeddial [model]="items" [radius]="80" type="circle" [style]="{ position: 'absolute' }" [buttonProps]="{ severity: 'warn', rounded: true }" />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
`,
|
|
28
|
+
standalone: true,
|
|
29
|
+
imports: [SpeedDialModule, ToastModule],
|
|
30
|
+
providers: [MessageService]
|
|
31
|
+
})
|
|
32
|
+
export class SpeeddialCircleDemo implements OnInit {
|
|
33
|
+
private messageService = inject(MessageService);
|
|
34
|
+
items: MenuItem[] | undefined;
|
|
35
|
+
|
|
36
|
+
ngOnInit() {
|
|
37
|
+
this.items = [
|
|
38
|
+
{
|
|
39
|
+
icon: 'pi pi-pencil',
|
|
40
|
+
command: () => {
|
|
41
|
+
this.messageService.add({ severity: 'info', summary: 'Add', detail: 'Data Added' });
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
icon: 'pi pi-refresh',
|
|
46
|
+
command: () => {
|
|
47
|
+
this.messageService.add({ severity: 'success', summary: 'Update', detail: 'Data Updated' });
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
icon: 'pi pi-trash',
|
|
52
|
+
command: () => {
|
|
53
|
+
this.messageService.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted' });
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
icon: 'pi pi-upload',
|
|
58
|
+
routerLink: ['/fileupload']
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
icon: 'pi pi-external-link',
|
|
62
|
+
target: '_blank',
|
|
63
|
+
url: 'https://angular.dev'
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Linear
|
|
71
|
+
|
|
72
|
+
SpeedDial items are defined with the model property based on MenuModel API. Default orientation of the items is linear and direction property is used to define the position of the items related to the button.
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { Component, OnInit, inject } from '@angular/core';
|
|
76
|
+
import { SpeedDialModule } from '@exhaustive-ui/core/speeddial';
|
|
77
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
78
|
+
import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
79
|
+
|
|
80
|
+
@Component({
|
|
81
|
+
template: `
|
|
82
|
+
<div class="card">
|
|
83
|
+
<div style="height: 500px; position: relative;">
|
|
84
|
+
<p-toast />
|
|
85
|
+
<p-speeddial [model]="items" direction="up" [style]="{ position: 'absolute', left: 'calc(50% - 2rem)', bottom: 0 }" />
|
|
86
|
+
<p-speeddial [model]="items" direction="down" [style]="{ position: 'absolute', left: 'calc(50% - 2rem)', top: 0 }" />
|
|
87
|
+
<p-speeddial [model]="items" direction="left" [style]="{ position: 'absolute', top: 'calc(50% - 2rem)', right: 0 }" />
|
|
88
|
+
<p-speeddial [model]="items" direction="right" [style]="{ position: 'absolute', top: 'calc(50% - 2rem)', left: 0 }" />
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
`,
|
|
92
|
+
standalone: true,
|
|
93
|
+
imports: [SpeedDialModule, ToastModule],
|
|
94
|
+
providers: [MessageService]
|
|
95
|
+
})
|
|
96
|
+
export class SpeeddialLinearDemo implements OnInit {
|
|
97
|
+
private messageService = inject(MessageService);
|
|
98
|
+
items: MenuItem[] | undefined;
|
|
99
|
+
|
|
100
|
+
ngOnInit() {
|
|
101
|
+
this.items = [
|
|
102
|
+
{
|
|
103
|
+
icon: 'pi pi-pencil',
|
|
104
|
+
command: () => {
|
|
105
|
+
this.messageService.add({ severity: 'info', summary: 'Add', detail: 'Data Added' });
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
icon: 'pi pi-refresh',
|
|
110
|
+
command: () => {
|
|
111
|
+
this.messageService.add({ severity: 'success', summary: 'Update', detail: 'Data Updated' });
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
icon: 'pi pi-trash',
|
|
116
|
+
command: () => {
|
|
117
|
+
this.messageService.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted' });
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
icon: 'pi pi-upload',
|
|
122
|
+
routerLink: ['/fileupload']
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
icon: 'pi pi-external-link',
|
|
126
|
+
target: '_blank',
|
|
127
|
+
url: 'https://angular.dev'
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Mask
|
|
135
|
+
|
|
136
|
+
Adding mask property displays a modal layer behind the popup items.
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
import { Component, OnInit, inject } from '@angular/core';
|
|
140
|
+
import { SpeedDialModule } from '@exhaustive-ui/core/speeddial';
|
|
141
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
142
|
+
import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
143
|
+
|
|
144
|
+
@Component({
|
|
145
|
+
template: `
|
|
146
|
+
<div class="card p-4">
|
|
147
|
+
<div [style]="{ position: 'relative', height: '350px' }">
|
|
148
|
+
<p-toast />
|
|
149
|
+
<p-speeddial [model]="items" direction="up" mask [style]="{ position: 'absolute', right: '1rem', bottom: '1rem' }" />
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
`,
|
|
153
|
+
standalone: true,
|
|
154
|
+
imports: [SpeedDialModule, ToastModule],
|
|
155
|
+
providers: [MessageService]
|
|
156
|
+
})
|
|
157
|
+
export class SpeeddialMaskDemo implements OnInit {
|
|
158
|
+
private messageService = inject(MessageService);
|
|
159
|
+
items: MenuItem[] | undefined;
|
|
160
|
+
|
|
161
|
+
ngOnInit() {
|
|
162
|
+
this.items = [
|
|
163
|
+
{
|
|
164
|
+
icon: 'pi pi-pencil',
|
|
165
|
+
command: () => {
|
|
166
|
+
this.messageService.add({ severity: 'info', summary: 'Add', detail: 'Data Added' });
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
icon: 'pi pi-refresh',
|
|
171
|
+
command: () => {
|
|
172
|
+
this.messageService.add({ severity: 'success', summary: 'Update', detail: 'Data Updated' });
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
icon: 'pi pi-trash',
|
|
177
|
+
command: () => {
|
|
178
|
+
this.messageService.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted' });
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
icon: 'pi pi-upload',
|
|
183
|
+
routerLink: ['/fileupload']
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
icon: 'pi pi-external-link',
|
|
187
|
+
target: '_blank',
|
|
188
|
+
url: 'https://angular.dev'
|
|
189
|
+
}
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Quarter Circle
|
|
196
|
+
|
|
197
|
+
When type is defined as quarter-circle , items are displayed in a half-circle around the button.
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
import { Component, OnInit, inject } from '@angular/core';
|
|
201
|
+
import { SpeedDialModule } from '@exhaustive-ui/core/speeddial';
|
|
202
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
203
|
+
import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
204
|
+
|
|
205
|
+
@Component({
|
|
206
|
+
template: `
|
|
207
|
+
<div class="card">
|
|
208
|
+
<div style="position: relative; height: 500px">
|
|
209
|
+
<p-toast />
|
|
210
|
+
<p-speeddial [model]="items" [radius]="120" type="quarter-circle" direction="up-left" [style]="{ position: 'absolute', right: 0, bottom: 0 }" />
|
|
211
|
+
<p-speeddial [model]="items" [radius]="120" type="quarter-circle" direction="up-right" [style]="{ position: 'absolute', left: 0, bottom: 0 }" />
|
|
212
|
+
<p-speeddial [model]="items" [radius]="120" type="quarter-circle" direction="down-left" [style]="{ position: 'absolute', right: 0, top: 0 }" />
|
|
213
|
+
<p-speeddial [model]="items" [radius]="120" type="quarter-circle" direction="down-right" [style]="{ position: 'absolute', left: 0, top: 0 }" />
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
`,
|
|
217
|
+
standalone: true,
|
|
218
|
+
imports: [SpeedDialModule, ToastModule],
|
|
219
|
+
providers: [MessageService]
|
|
220
|
+
})
|
|
221
|
+
export class SpeeddialQuartercircleDemo implements OnInit {
|
|
222
|
+
private messageService = inject(MessageService);
|
|
223
|
+
items: MenuItem[] | undefined;
|
|
224
|
+
|
|
225
|
+
ngOnInit() {
|
|
226
|
+
this.items = [
|
|
227
|
+
{
|
|
228
|
+
icon: 'pi pi-pencil',
|
|
229
|
+
command: () => {
|
|
230
|
+
this.messageService.add({ severity: 'info', summary: 'Add', detail: 'Data Added' });
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
icon: 'pi pi-refresh',
|
|
235
|
+
command: () => {
|
|
236
|
+
this.messageService.add({ severity: 'success', summary: 'Update', detail: 'Data Updated' });
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
icon: 'pi pi-trash',
|
|
241
|
+
command: () => {
|
|
242
|
+
this.messageService.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted' });
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
icon: 'pi pi-upload',
|
|
247
|
+
routerLink: ['/fileupload']
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
icon: 'pi pi-external-link',
|
|
251
|
+
target: '_blank',
|
|
252
|
+
url: 'https://angular.dev'
|
|
253
|
+
}
|
|
254
|
+
];
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Semi Circle
|
|
260
|
+
|
|
261
|
+
When type is defined as semi-circle , items are displayed in a half-circle around the button.
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
import { Component, OnInit, inject } from '@angular/core';
|
|
265
|
+
import { SpeedDialModule } from '@exhaustive-ui/core/speeddial';
|
|
266
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
267
|
+
import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
268
|
+
|
|
269
|
+
@Component({
|
|
270
|
+
template: `
|
|
271
|
+
<div class="card">
|
|
272
|
+
<div style="position: relative; height: 500px">
|
|
273
|
+
<p-toast />
|
|
274
|
+
<p-speeddial [model]="items" [radius]="80" type="semi-circle" direction="down" [style]="{ position: 'absolute', left: 'calc(50% - 2rem)', top: 0 }" />
|
|
275
|
+
<p-speeddial [model]="items" [radius]="80" type="semi-circle" direction="right" [style]="{ position: 'absolute', top: 'calc(50% - 2rem)', left: 0 }" />
|
|
276
|
+
<p-speeddial [model]="items" [radius]="80" type="semi-circle" direction="left" [style]="{ position: 'absolute', top: 'calc(50% - 2rem)', right: 0 }" />
|
|
277
|
+
<p-speeddial [model]="items" [radius]="80" type="semi-circle" direction="up" [style]="{ position: 'absolute', left: 'calc(50% - 2rem)', bottom: 0 }" />
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
`,
|
|
281
|
+
standalone: true,
|
|
282
|
+
imports: [SpeedDialModule, ToastModule],
|
|
283
|
+
providers: [MessageService]
|
|
284
|
+
})
|
|
285
|
+
export class SpeeddialSemicircleDemo implements OnInit {
|
|
286
|
+
private messageService = inject(MessageService);
|
|
287
|
+
items: MenuItem[] | undefined;
|
|
288
|
+
|
|
289
|
+
ngOnInit() {
|
|
290
|
+
this.items = [
|
|
291
|
+
{
|
|
292
|
+
icon: 'pi pi-pencil',
|
|
293
|
+
command: () => {
|
|
294
|
+
this.messageService.add({ severity: 'info', summary: 'Add', detail: 'Data Added' });
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
icon: 'pi pi-refresh',
|
|
299
|
+
command: () => {
|
|
300
|
+
this.messageService.add({ severity: 'success', summary: 'Update', detail: 'Data Updated' });
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
icon: 'pi pi-trash',
|
|
305
|
+
command: () => {
|
|
306
|
+
this.messageService.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted' });
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
icon: 'pi pi-upload',
|
|
311
|
+
routerLink: ['/fileupload']
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
icon: 'pi pi-external-link',
|
|
315
|
+
target: '_blank',
|
|
316
|
+
url: 'https://angular.dev'
|
|
317
|
+
}
|
|
318
|
+
];
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Template
|
|
324
|
+
|
|
325
|
+
SpeedDial offers item customization with the item template that receives the menuitem instance from the model as a parameter. The button has its own button template, additional template named icon is provided to embed icon content for default button.
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
import { Component, OnInit, inject } from '@angular/core';
|
|
329
|
+
import { ButtonModule } from '@exhaustive-ui/core/button';
|
|
330
|
+
import { SpeedDialModule } from '@exhaustive-ui/core/speeddial';
|
|
331
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
332
|
+
import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
333
|
+
|
|
334
|
+
@Component({
|
|
335
|
+
template: `
|
|
336
|
+
<div class="card">
|
|
337
|
+
<div class="flex items-end justify-center" style="position: 'relative'; height: '400px'">
|
|
338
|
+
<p-toast />
|
|
339
|
+
<p-speeddial [model]="items" direction="up" [transitionDelay]="80" style="position: 'absolute'">
|
|
340
|
+
<ng-template #button let-toggleCallback="toggleCallback">
|
|
341
|
+
<p-button outlined styleClass="border" (click)="toggleCallback($event)">
|
|
342
|
+
<svg width="31" height="33" viewBox="0 0 31 33" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
343
|
+
<path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--p-primary-color)" />
|
|
344
|
+
<mask id="mask0_1_52" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="31" height="33">
|
|
345
|
+
<path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--ground-background)" />
|
|
346
|
+
</mask>
|
|
347
|
+
<g mask="url(#mask0_1_52)">
|
|
348
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.1935 0V3.5994V3.58318V20.0075V20.0075V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1935 0Z" fill="var(--p-primary-color)" />
|
|
349
|
+
</g>
|
|
350
|
+
<path d="M19.6399 15.3776L18.1861 15.0547L19.3169 16.6695V21.6755L23.1938 18.4458V12.9554L21.4169 13.6013L19.6399 15.3776Z" fill="var(--ground-background)" />
|
|
351
|
+
<path d="M10.5936 15.3776L12.0474 15.0547L10.9166 16.6695V21.6755L7.03966 18.4458V12.9554L8.81661 13.6013L10.5936 15.3776Z" fill="var(--ground-background)" />
|
|
352
|
+
<path
|
|
353
|
+
fill-rule="evenodd"
|
|
354
|
+
clip-rule="evenodd"
|
|
355
|
+
d="M11.3853 16.9726L12.6739 15.0309L13.4793 15.5163H16.7008L17.5061 15.0309L18.7947 16.9726V24.254L17.8283 25.7103L16.7008 26.843H13.4793L12.3518 25.7103L11.3853 24.254V16.9726Z"
|
|
356
|
+
fill="var(--ground-background)"
|
|
357
|
+
/>
|
|
358
|
+
<path d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z" fill="var(--ground-background)" />
|
|
359
|
+
<path d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z" fill="var(--ground-background)" />
|
|
360
|
+
<path
|
|
361
|
+
fill-rule="evenodd"
|
|
362
|
+
clip-rule="evenodd"
|
|
363
|
+
d="M13.0167 5.68861L11.7244 8.7568L13.8244 14.8932H14.7936V5.68861H13.0167ZM15.4397 5.68861V14.8932H16.5706L18.5091 8.7568L17.2167 5.68861H15.4397Z"
|
|
364
|
+
fill="var(--ground-background)"
|
|
365
|
+
/>
|
|
366
|
+
<path d="M13.8244 14.8932L6.87813 12.3094L5.90888 8.27235L11.8859 8.7568L13.9859 14.8932H13.8244Z" fill="var(--ground-background)" />
|
|
367
|
+
<path d="M16.5706 14.8932L23.5169 12.3094L24.4861 8.27235L18.3476 8.7568L16.4091 14.8932H16.5706Z" fill="var(--ground-background)" />
|
|
368
|
+
<path d="M18.8321 8.27235L22.2245 7.94938L19.9629 5.68861H17.7013L18.8321 8.27235Z" fill="var(--ground-background)" />
|
|
369
|
+
<path d="M11.4013 8.27235L8.00893 7.94938L10.2705 5.68861H12.5321L11.4013 8.27235Z" fill="var(--ground-background)" />
|
|
370
|
+
</svg>
|
|
371
|
+
</p-button>
|
|
372
|
+
</ng-template>
|
|
373
|
+
<ng-template #item let-item let-toggleCallback="toggleCallback">
|
|
374
|
+
<div class="flex flex-col items-center justify-between gap-2 p-2 border rounded border-surface-200 dark:border-surface-700 w-20 cursor-pointer" (click)="toggleCallback($event, item)">
|
|
375
|
+
<span [class]="item.icon"></span>
|
|
376
|
+
<span>
|
|
377
|
+
{{ item.label }}
|
|
378
|
+
</span>
|
|
379
|
+
</div>
|
|
380
|
+
</ng-template>
|
|
381
|
+
</p-speeddial>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
`,
|
|
385
|
+
standalone: true,
|
|
386
|
+
imports: [ButtonModule, SpeedDialModule, ToastModule],
|
|
387
|
+
providers: [MessageService]
|
|
388
|
+
})
|
|
389
|
+
export class SpeeddialTemplateDemo implements OnInit {
|
|
390
|
+
private messageService = inject(MessageService);
|
|
391
|
+
items: MenuItem[] | undefined;
|
|
392
|
+
|
|
393
|
+
ngOnInit() {
|
|
394
|
+
this.items = [
|
|
395
|
+
{
|
|
396
|
+
label: 'Add',
|
|
397
|
+
icon: 'pi pi-pencil',
|
|
398
|
+
command: () => {
|
|
399
|
+
this.messageService.add({ severity: 'info', summary: 'Add', detail: 'Data Added' });
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
label: 'Update',
|
|
404
|
+
icon: 'pi pi-refresh',
|
|
405
|
+
command: () => {
|
|
406
|
+
this.messageService.add({ severity: 'success', summary: 'Update', detail: 'Data Updated' });
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
label: 'Delete',
|
|
411
|
+
icon: 'pi pi-trash',
|
|
412
|
+
command: () => {
|
|
413
|
+
this.messageService.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted' });
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
label: 'Upload',
|
|
418
|
+
icon: 'pi pi-upload',
|
|
419
|
+
command: () => {
|
|
420
|
+
this.router.navigate(['/fileupload']);
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
label: 'Website',
|
|
425
|
+
icon: 'pi pi-external-link',
|
|
426
|
+
command: () => {
|
|
427
|
+
window.open('https://angular.io/', '_blank');
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
## Tooltip
|
|
436
|
+
|
|
437
|
+
Items display a tooltip on hover when a standalone Tooltip is present with a target that matches the items.
|
|
438
|
+
|
|
439
|
+
```typescript
|
|
440
|
+
import { Component, OnInit, inject } from '@angular/core';
|
|
441
|
+
import { SpeedDialModule } from '@exhaustive-ui/core/speeddial';
|
|
442
|
+
import { ToastModule } from '@exhaustive-ui/core/toast';
|
|
443
|
+
import { MenuItem, MessageService } from '@exhaustive-ui/core/api';
|
|
444
|
+
|
|
445
|
+
@Component({
|
|
446
|
+
template: `
|
|
447
|
+
<div class="card">
|
|
448
|
+
<div [style]="{ position: 'relative', height: '350px' }">
|
|
449
|
+
<p-toast />
|
|
450
|
+
<p-speeddial [model]="items" direction="up" [style]="{ position: 'absolute', right: 0, bottom: 0 }" [buttonProps]="{ severity: 'help', rounded: true }" [tooltipOptions]="{ tooltipPosition: 'left' }" />
|
|
451
|
+
<p-speeddial [model]="items" direction="up" [style]="{ position: 'absolute', left: 0, bottom: 0 }" [buttonProps]="{ severity: 'danger', rounded: true }" [tooltipOptions]="{ tooltipPosition: 'right' }" />
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
`,
|
|
455
|
+
standalone: true,
|
|
456
|
+
imports: [SpeedDialModule, ToastModule],
|
|
457
|
+
providers: [MessageService]
|
|
458
|
+
})
|
|
459
|
+
export class SpeeddialTooltipDemo implements OnInit {
|
|
460
|
+
private messageService = inject(MessageService);
|
|
461
|
+
items: MenuItem[] | undefined;
|
|
462
|
+
|
|
463
|
+
ngOnInit() {
|
|
464
|
+
this.items = [
|
|
465
|
+
{
|
|
466
|
+
label: 'Add',
|
|
467
|
+
icon: 'pi pi-pencil',
|
|
468
|
+
command: () => {
|
|
469
|
+
this.messageService.add({ severity: 'info', summary: 'Add', detail: 'Data Added' });
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
label: 'Update',
|
|
474
|
+
icon: 'pi pi-refresh',
|
|
475
|
+
command: () => {
|
|
476
|
+
this.messageService.add({ severity: 'success', summary: 'Update', detail: 'Data Updated' });
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
label: 'Delete',
|
|
481
|
+
icon: 'pi pi-trash',
|
|
482
|
+
command: () => {
|
|
483
|
+
this.messageService.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted' });
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
label: 'Upload',
|
|
488
|
+
icon: 'pi pi-upload',
|
|
489
|
+
command: () => {
|
|
490
|
+
this.router.navigate(['/fileupload']);
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
label: 'Angular.dev',
|
|
495
|
+
icon: 'pi pi-external-link',
|
|
496
|
+
target: '_blank',
|
|
497
|
+
url: 'https://angular.dev'
|
|
498
|
+
}
|
|
499
|
+
];
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
## Speed Dial
|
|
505
|
+
|
|
506
|
+
When pressed, a floating action button can display multiple primary actions that can be performed on a page.
|
|
507
|
+
|
|
508
|
+
### Props
|
|
509
|
+
|
|
510
|
+
| Name | Type | Default | Description |
|
|
511
|
+
|------|------|---------|-------------|
|
|
512
|
+
| dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
|
|
513
|
+
| unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
|
|
514
|
+
| pt | InputSignal<SpeedDialPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
|
|
515
|
+
| ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
|
|
516
|
+
| id | InputSignal<string> | ... | List of items id. |
|
|
517
|
+
| model | InputSignal<MenuItem[]> | ... | MenuModel instance to define the action items. |
|
|
518
|
+
| visible | ModelSignal<boolean> | false | Specifies the visibility of the overlay, supports one or two-way binding as well. Emits `visibleChange` with the new value when the visibility of element changed. |
|
|
519
|
+
| style | InputSignal<{ [klass: string]: any }> | ... | Inline style of the element. |
|
|
520
|
+
| className | InputSignal<string> | ... | Style class of the element. |
|
|
521
|
+
| direction | InputSignal<"left" \| "right" \| "down" \| "up" \| "up-left" \| "up-right" \| "down-left" \| "down-right"> | ... | Specifies the opening direction of actions. |
|
|
522
|
+
| transitionDelay | InputSignalWithTransform<number, unknown> | ... | Transition delay step for each action item. |
|
|
523
|
+
| type | InputSignal<"circle" \| "linear" \| "semi-circle" \| "quarter-circle"> | ... | Specifies the opening type of actions. |
|
|
524
|
+
| radius | InputSignalWithTransform<number, unknown> | ... | Radius for *circle types. |
|
|
525
|
+
| mask | InputSignalWithTransform<boolean, unknown> | ... | Whether to show a mask element behind the speeddial. |
|
|
526
|
+
| disabled | InputSignalWithTransform<boolean, unknown> | ... | Whether the component is disabled. |
|
|
527
|
+
| hideOnClickOutside | InputSignalWithTransform<boolean, unknown> | ... | Whether the actions close when clicked outside. |
|
|
528
|
+
| buttonStyle | InputSignal<{ [klass: string]: any }> | ... | Inline style of the button element. |
|
|
529
|
+
| buttonClassName | InputSignal<string> | ... | Style class of the button element. |
|
|
530
|
+
| maskStyle | InputSignal<{ [klass: string]: any }> | ... | Inline style of the mask element. |
|
|
531
|
+
| maskClassName | InputSignal<string> | ... | Style class of the mask element. |
|
|
532
|
+
| showIcon | InputSignal<string> | ... | Show icon of the button element. |
|
|
533
|
+
| hideIcon | InputSignal<string> | ... | Hide icon of the button element. |
|
|
534
|
+
| rotateAnimation | InputSignalWithTransform<boolean, unknown> | ... | Defined to rotate showIcon when hideIcon is not present. |
|
|
535
|
+
| ariaLabel | InputSignal<string> | ... | Defines a string value that labels an interactive element. |
|
|
536
|
+
| ariaLabelledBy | InputSignal<string> | ... | Identifier of the underlying input element. |
|
|
537
|
+
| tooltipOptions | InputSignal<TooltipOptions> | ... | Whether to display the tooltip on items. The modifiers of Tooltip can be used like an object in it. Valid keys are 'event' and 'position'. |
|
|
538
|
+
| buttonProps | InputSignal<ButtonProps> | ... | Used to pass all properties of the ButtonProps to the Button component. |
|
|
539
|
+
|
|
540
|
+
### Emits
|
|
541
|
+
|
|
542
|
+
| Name | Parameters | Description |
|
|
543
|
+
|------|------------|-------------|
|
|
544
|
+
| onVisibleChange | value: boolean | Fired when the visibility of element changed. |
|
|
545
|
+
| onClick | event: MouseEvent | Fired when the button element clicked. |
|
|
546
|
+
| onShow | event: Event | Fired when the actions are visible. |
|
|
547
|
+
| onHide | event: Event | Fired when the actions are hidden. |
|
|
548
|
+
|
|
549
|
+
### Templates
|
|
550
|
+
|
|
551
|
+
| Name | Type | Description |
|
|
552
|
+
|------|------|-------------|
|
|
553
|
+
| button | TemplateRef<SpeedDialButtonTemplateContext> | Custom button template. |
|
|
554
|
+
| item | TemplateRef<SpeedDialItemTemplateContext> | Custom item template. |
|
|
555
|
+
| icon | TemplateRef<void> | Custom icon template. |
|
|
556
|
+
|
|
557
|
+
## Pass Through Options
|
|
558
|
+
|
|
559
|
+
| Name | Type | Description |
|
|
560
|
+
|------|------|-------------|
|
|
561
|
+
| root | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the root's DOM element. |
|
|
562
|
+
| pcButton | ButtonPassThrough | Used to pass attributes to the Button component. |
|
|
563
|
+
| list | PassThroughOption<HTMLUListElement, I> | Used to pass attributes to the list's DOM element. |
|
|
564
|
+
| item | PassThroughOption<HTMLLIElement, I> | Used to pass attributes to the item's DOM element. |
|
|
565
|
+
| pcAction | ButtonPassThrough | Used to pass attributes to the action's Button component. |
|
|
566
|
+
| actionIcon | PassThroughOption<HTMLSpanElement, I> | Used to pass attributes to the action icon's DOM element. |
|
|
567
|
+
| mask | PassThroughOption<HTMLDivElement, I> | Used to pass attributes to the mask's DOM element. |
|
|
568
|
+
|
|
569
|
+
## Theming
|
|
570
|
+
|
|
571
|
+
### CSS Classes
|
|
572
|
+
|
|
573
|
+
| Class | Description |
|
|
574
|
+
|-------|-------------|
|
|
575
|
+
| p-speeddial | Class name of the root element |
|
|
576
|
+
| p-speeddial-button | Class name of the button element |
|
|
577
|
+
| p-speeddial-list | Class name of the list element |
|
|
578
|
+
| p-speeddial-item | Class name of the item element |
|
|
579
|
+
| p-speeddial-action | Class name of the action element |
|
|
580
|
+
| p-speeddial-action-icon | Class name of the action icon element |
|
|
581
|
+
| p-speeddial-mask | Class name of the mask element |
|
|
582
|
+
|
|
583
|
+
### Design Tokens
|
|
584
|
+
|
|
585
|
+
| Token | CSS Variable | Description |
|
|
586
|
+
|-------|--------------|-------------|
|
|
587
|
+
| speeddial.gap | --p-speeddial-gap | Gap of root |
|
|
588
|
+
| speeddial.transition.duration | --p-speeddial-transition-duration | Transition duration of root |
|
|
589
|
+
|