@primevue/mcp 4.5.5 → 5.0.0-rc.2
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.md +45 -21
- package/README.md +48 -250
- package/data/components.json +47269 -0
- package/data/llms/components/accordion.md +629 -0
- package/data/llms/components/animateonscroll.md +165 -0
- package/data/llms/components/autocomplete.md +995 -0
- package/data/llms/components/avatar.md +264 -0
- package/data/llms/components/badge.md +200 -0
- package/data/llms/components/blockui.md +99 -0
- package/data/llms/components/breadcrumb.md +269 -0
- package/data/llms/components/button.md +902 -0
- package/data/llms/components/card.md +209 -0
- package/data/llms/components/carousel.md +506 -0
- package/data/llms/components/cascadeselect.md +1207 -0
- package/data/llms/components/chart.md +1022 -0
- package/data/llms/components/checkbox.md +401 -0
- package/data/llms/components/chip.md +206 -0
- package/data/llms/components/colorpicker.md +213 -0
- package/data/llms/components/commandmenu.md +660 -0
- package/data/llms/components/compare.md +407 -0
- package/data/llms/components/confirmdialog.md +343 -0
- package/data/llms/components/confirmpopup.md +252 -0
- package/data/llms/components/contextmenu.md +522 -0
- package/data/llms/components/datatable.md +5266 -0
- package/data/llms/components/dataview.md +569 -0
- package/data/llms/components/datepicker.md +964 -0
- package/data/llms/components/deferredcontent.md +96 -0
- package/data/llms/components/dialog.md +702 -0
- package/data/llms/components/divider.md +152 -0
- package/data/llms/components/dock.md +488 -0
- package/data/llms/components/drawer.md +469 -0
- package/data/llms/components/dynamicdialog.md +214 -0
- package/data/llms/components/editor.md +205 -0
- package/data/llms/components/fieldset.md +253 -0
- package/data/llms/components/fileupload.md +459 -0
- package/data/llms/components/floatlabel.md +144 -0
- package/data/llms/components/fluid.md +104 -0
- package/data/llms/components/focustrap.md +59 -0
- package/data/llms/components/forms.md +344 -0
- package/data/llms/components/galleria.md +1119 -0
- package/data/llms/components/gallery.md +1003 -0
- package/data/llms/components/iconfield.md +283 -0
- package/data/llms/components/iftalabel.md +96 -0
- package/data/llms/components/image.md +179 -0
- package/data/llms/components/imagecompare.md +108 -0
- package/data/llms/components/inplace.md +183 -0
- package/data/llms/components/inputcolor.md +869 -0
- package/data/llms/components/inputgroup.md +419 -0
- package/data/llms/components/inputmask.md +345 -0
- package/data/llms/components/inputnumber.md +551 -0
- package/data/llms/components/inputotp.md +345 -0
- package/data/llms/components/inputpassword.md +738 -0
- package/data/llms/components/inputtags.md +432 -0
- package/data/llms/components/inputtext.md +569 -0
- package/data/llms/components/installation.md +1 -0
- package/data/llms/components/keyfilter.md +116 -0
- package/data/llms/components/knob.md +318 -0
- package/data/llms/components/label.md +151 -0
- package/data/llms/components/laravel.md +53 -0
- package/data/llms/components/listbox.md +636 -0
- package/data/llms/components/mask.md +203 -0
- package/data/llms/components/mcp.md +39 -0
- package/data/llms/components/megamenu.md +563 -0
- package/data/llms/components/menu.md +651 -0
- package/data/llms/components/menubar.md +446 -0
- package/data/llms/components/message.md +497 -0
- package/data/llms/components/metergroup.md +281 -0
- package/data/llms/components/multiselect.md +752 -0
- package/data/llms/components/orderlist.md +224 -0
- package/data/llms/components/organizationchart.md +418 -0
- package/data/llms/components/paginator.md +221 -0
- package/data/llms/components/panel.md +321 -0
- package/data/llms/components/panelmenu.md +703 -0
- package/data/llms/components/password.md +657 -0
- package/data/llms/components/picklist.md +286 -0
- package/data/llms/components/popover.md +145 -0
- package/data/llms/components/progressbar.md +242 -0
- package/data/llms/components/progressspinner.md +104 -0
- package/data/llms/components/radiobutton.md +427 -0
- package/data/llms/components/rating.md +312 -0
- package/data/llms/components/ripple.md +91 -0
- package/data/llms/components/scrollarea.md +700 -0
- package/data/llms/components/scrollpanel.md +131 -0
- package/data/llms/components/scrolltop.md +87 -0
- package/data/llms/components/select.md +1251 -0
- package/data/llms/components/selectbutton.md +268 -0
- package/data/llms/components/sidebar.md +2232 -0
- package/data/llms/components/skeleton.md +302 -0
- package/data/llms/components/slider.md +416 -0
- package/data/llms/components/speeddial.md +402 -0
- package/data/llms/components/splitbutton.md +840 -0
- package/data/llms/components/splitter.md +447 -0
- package/data/llms/components/stepper.md +551 -0
- package/data/llms/components/styleclass.md +226 -0
- package/data/llms/components/tabs.md +609 -0
- package/data/llms/components/tag.md +178 -0
- package/data/llms/components/terminal.md +123 -0
- package/data/llms/components/textarea.md +519 -0
- package/data/llms/components/tieredmenu.md +578 -0
- package/data/llms/components/timeline.md +494 -0
- package/data/llms/components/toast.md +472 -0
- package/data/llms/components/togglebutton.md +276 -0
- package/data/llms/components/toggleswitch.md +271 -0
- package/data/llms/components/toolbar.md +140 -0
- package/data/llms/components/tooltip.md +160 -0
- package/data/llms/components/tree.md +1076 -0
- package/data/llms/components/treeselect.md +660 -0
- package/data/llms/components/treetable.md +2493 -0
- package/data/llms/components/virtualscroller.md +265 -0
- package/data/llms/guides/autoimport.md +28 -0
- package/data/llms/guides/cdn.md +72 -0
- package/data/llms/guides/configuration.md +158 -0
- package/data/llms/guides/customicons.md +67 -0
- package/data/llms/guides/guides/accessibility.md +27 -0
- package/data/llms/guides/guides/animations.md +119 -0
- package/data/llms/guides/guides/rtl.md +7 -0
- package/data/llms/guides/icons.md +136 -0
- package/data/llms/guides/installation.md +3 -0
- package/data/llms/guides/laravel.md +66 -0
- package/data/llms/guides/llms.md +15 -0
- package/data/llms/guides/mcp.md +104 -0
- package/data/llms/guides/migration/v4.md +15 -0
- package/data/llms/guides/migration/v5.md +15 -0
- package/data/llms/guides/nuxt.md +141 -0
- package/data/llms/guides/passthrough.md +137 -0
- package/data/llms/guides/primeclt.md +43 -0
- package/data/llms/guides/tailwind.md +151 -0
- package/data/llms/guides/theming/styled.md +497 -0
- package/data/llms/guides/theming/unstyled.md +57 -0
- package/data/llms/guides/uikit.md +3 -0
- package/data/llms/guides/vite.md +90 -0
- package/data/llms/llms-full.txt +54465 -0
- package/data/llms/llms.txt +132 -0
- package/data/llms/pages/accessibility.md +27 -0
- package/data/llms/pages/animations.md +119 -0
- package/data/llms/pages/autoimport.md +28 -0
- package/data/llms/pages/cdn.md +72 -0
- package/data/llms/pages/configuration.md +158 -0
- package/data/llms/pages/contribution.md +31 -0
- package/data/llms/pages/customicons.md +67 -0
- package/data/llms/pages/designer.md +79 -0
- package/data/llms/pages/dynamicimports.md +7 -0
- package/data/llms/pages/forms.md +63 -0
- package/data/llms/pages/guides/accessibility.md +27 -0
- package/data/llms/pages/guides/animations.md +119 -0
- package/data/llms/pages/guides/rtl.md +7 -0
- package/data/llms/pages/icons.md +136 -0
- package/data/llms/pages/installation.md +3 -0
- package/data/llms/pages/introduction.md +23 -0
- package/data/llms/pages/laravel.md +66 -0
- package/data/llms/pages/llms.md +15 -0
- package/data/llms/pages/mcp.md +104 -0
- package/data/llms/pages/migration/v4.md +15 -0
- package/data/llms/pages/migration/v5.md +15 -0
- package/data/llms/pages/nuxt.md +141 -0
- package/data/llms/pages/passthrough.md +137 -0
- package/data/llms/pages/primeclt.md +43 -0
- package/data/llms/pages/rtl.md +7 -0
- package/data/llms/pages/setup.md +3 -0
- package/data/llms/pages/styled.md +497 -0
- package/data/llms/pages/tailwind.md +151 -0
- package/data/llms/pages/theming/styled.md +497 -0
- package/data/llms/pages/theming/unstyled.md +57 -0
- package/data/llms/pages/uikit.md +3 -0
- package/data/llms/pages/unstyled.md +57 -0
- package/data/llms/pages/v4.md +15 -0
- package/data/llms/pages/v5.md +15 -0
- package/data/llms/pages/vite.md +90 -0
- package/data/manifest.json +11117 -0
- package/data/mcp-data.json +55940 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +66066 -72541
- package/package.json +10 -12
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
# Speed Dial
|
|
2
|
+
|
|
3
|
+
SpeedDial is a floating button with a popup menu.
|
|
4
|
+
|
|
5
|
+
## Basic
|
|
6
|
+
|
|
7
|
+
SpeedDial displays related actions from a single trigger button.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<Toast />
|
|
12
|
+
<div style="position: relative; height: 240px">
|
|
13
|
+
<SpeedDial :model="items" direction="up" :style="{ position: 'absolute', right: 0, bottom: 0 }" />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup>
|
|
18
|
+
import { ref } from 'vue';
|
|
19
|
+
import { useToast } from 'primevue/usetoast';
|
|
20
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
21
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
22
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
23
|
+
import Trash from '@primeicons/vue/trash';
|
|
24
|
+
import Upload from '@primeicons/vue/upload';
|
|
25
|
+
|
|
26
|
+
const toast = useToast();
|
|
27
|
+
|
|
28
|
+
const items = ref([
|
|
29
|
+
{
|
|
30
|
+
icon: Pencil,
|
|
31
|
+
command: () => {
|
|
32
|
+
toast.add({ severity: 'info', summary: 'Add', detail: 'Data Added', life: 3000 });
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
icon: Refresh,
|
|
37
|
+
command: () => {
|
|
38
|
+
toast.add({ severity: 'success', summary: 'Update', detail: 'Data Updated', life: 3000 });
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
icon: Trash,
|
|
43
|
+
command: () => {
|
|
44
|
+
toast.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted', life: 3000 });
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
icon: Upload
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
icon: ExternalLink,
|
|
52
|
+
target: '_blank',
|
|
53
|
+
url: 'https://vuejs.org/'
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
<\/script>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Linear
|
|
60
|
+
|
|
61
|
+
When type is set to linear (default), items are displayed in a line based on the direction property. The direction can be up , down , left , or right .
|
|
62
|
+
|
|
63
|
+
```vue
|
|
64
|
+
<template>
|
|
65
|
+
<div style="position: relative; height: 500px">
|
|
66
|
+
<SpeedDial :model="items" direction="up" :style="{ position: 'absolute', left: 'calc(50% - 2rem)', bottom: 0 }" />
|
|
67
|
+
<SpeedDial :model="items" direction="down" :style="{ position: 'absolute', left: 'calc(50% - 2rem)', top: 0 }" />
|
|
68
|
+
<SpeedDial :model="items" direction="left" :style="{ position: 'absolute', top: 'calc(50% - 2rem)', right: 0 }" />
|
|
69
|
+
<SpeedDial :model="items" direction="right" :style="{ position: 'absolute', top: 'calc(50% - 2rem)', left: 0 }" />
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup>
|
|
74
|
+
import { ref } from 'vue';
|
|
75
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
76
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
77
|
+
import Trash from '@primeicons/vue/trash';
|
|
78
|
+
import Upload from '@primeicons/vue/upload';
|
|
79
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
80
|
+
|
|
81
|
+
const items = ref([{ icon: Pencil }, { icon: Refresh }, { icon: Trash }, { icon: Upload }, { icon: ExternalLink }]);
|
|
82
|
+
<\/script>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Circle
|
|
86
|
+
|
|
87
|
+
Items can be displayed around the button when type is set to circle . Additional radius property defines the radius of the circle.
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<template>
|
|
91
|
+
<div :style="{ position: 'relative', height: '500px' }" class="flex items-center justify-center">
|
|
92
|
+
<SpeedDial :model="items" :radius="80" type="circle" :style="{ position: 'absolute' }" :buttonProps="{ severity: 'warn', rounded: true, iconOnly: true }" />
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<script setup>
|
|
97
|
+
import { ref } from 'vue';
|
|
98
|
+
import Cog from '@primeicons/vue/cog';
|
|
99
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
100
|
+
import Heart from '@primeicons/vue/heart';
|
|
101
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
102
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
103
|
+
import Trash from '@primeicons/vue/trash';
|
|
104
|
+
import Upload from '@primeicons/vue/upload';
|
|
105
|
+
import User from '@primeicons/vue/user';
|
|
106
|
+
|
|
107
|
+
const items = ref([{ icon: Pencil }, { icon: Refresh }, { icon: Trash }, { icon: Upload }, { icon: ExternalLink }, { icon: Cog }, { icon: User }, { icon: Heart }]);
|
|
108
|
+
<\/script>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Semi Circle
|
|
112
|
+
|
|
113
|
+
When type is defined as semi-circle , items are displayed in a half-circle around the button.
|
|
114
|
+
|
|
115
|
+
```vue
|
|
116
|
+
<template>
|
|
117
|
+
<div style="position: relative; height: 500px">
|
|
118
|
+
<SpeedDial :model="items" :radius="80" type="semi-circle" direction="up" :style="{ position: 'absolute', left: 'calc(50% - 2rem)', bottom: 0 }" :buttonProps="{ severity: 'success', rounded: true , iconOnly: true }" />
|
|
119
|
+
<SpeedDial :model="items" :radius="80" type="semi-circle" direction="down" :style="{ position: 'absolute', left: 'calc(50% - 2rem)', top: 0 }" :buttonProps="{ severity: 'success', rounded: true , iconOnly: true }" />
|
|
120
|
+
<SpeedDial :model="items" :radius="80" type="semi-circle" direction="left" :style="{ position: 'absolute', top: 'calc(50% - 2rem)', right: 0 }" :buttonProps="{ severity: 'success', rounded: true , iconOnly: true }" />
|
|
121
|
+
<SpeedDial :model="items" :radius="80" type="semi-circle" direction="right" :style="{ position: 'absolute', top: 'calc(50% - 2rem)', left: 0 }" :buttonProps="{ severity: 'success', rounded: true , iconOnly: true }" />
|
|
122
|
+
</div>
|
|
123
|
+
</template>
|
|
124
|
+
|
|
125
|
+
<script setup>
|
|
126
|
+
import { ref } from 'vue';
|
|
127
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
128
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
129
|
+
import Trash from '@primeicons/vue/trash';
|
|
130
|
+
import Upload from '@primeicons/vue/upload';
|
|
131
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
132
|
+
|
|
133
|
+
const items = ref([{ icon: Pencil }, { icon: Refresh }, { icon: Trash }, { icon: Upload }, { icon: ExternalLink }]);
|
|
134
|
+
<\/script>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Quarter Circle
|
|
138
|
+
|
|
139
|
+
Setting type as quarter-circle displays the items at one of four corners of the button based on the direction .
|
|
140
|
+
|
|
141
|
+
```vue
|
|
142
|
+
<template>
|
|
143
|
+
<div style="position: relative; height: 500px">
|
|
144
|
+
<SpeedDial :model="items" :radius="120" type="quarter-circle" direction="up-left" :style="{ position: 'absolute', right: 0, bottom: 0 }" />
|
|
145
|
+
<SpeedDial :model="items" :radius="120" type="quarter-circle" direction="up-right" :style="{ position: 'absolute', left: 0, bottom: 0 }" />
|
|
146
|
+
<SpeedDial :model="items" :radius="120" type="quarter-circle" direction="down-left" :style="{ position: 'absolute', right: 0, top: 0 }" />
|
|
147
|
+
<SpeedDial :model="items" :radius="120" type="quarter-circle" direction="down-right" :style="{ position: 'absolute', left: 0, top: 0 }" />
|
|
148
|
+
</div>
|
|
149
|
+
</template>
|
|
150
|
+
|
|
151
|
+
<script setup>
|
|
152
|
+
import { ref } from 'vue';
|
|
153
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
154
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
155
|
+
import Trash from '@primeicons/vue/trash';
|
|
156
|
+
import Upload from '@primeicons/vue/upload';
|
|
157
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
158
|
+
|
|
159
|
+
const items = ref([{ icon: Pencil }, { icon: Refresh }, { icon: Trash }, { icon: Upload }, { icon: ExternalLink }]);
|
|
160
|
+
<\/script>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Transition Delay
|
|
164
|
+
|
|
165
|
+
The transitionDelay property specifies the delay in milliseconds between each action item's appearance animation.
|
|
166
|
+
|
|
167
|
+
```vue
|
|
168
|
+
<template>
|
|
169
|
+
<Toast />
|
|
170
|
+
<div class="flex justify-between" style="position: relative; height: 240px">
|
|
171
|
+
<SpeedDial :model="items" direction="up" :transitionDelay="0" :style="{ position: 'absolute', left: 0, bottom: 0 }" :buttonProps="{ severity: 'secondary', rounded: true, iconOnly: true }" />
|
|
172
|
+
<SpeedDial :model="items" direction="up" :transitionDelay="80" :style="{ position: 'absolute', left: 'calc(50% - 2rem)', bottom: 0 }" :buttonProps="{ severity: 'success', rounded: true, iconOnly: true }" />
|
|
173
|
+
<SpeedDial :model="items" direction="up" :transitionDelay="150" :style="{ position: 'absolute', right: 0, bottom: 0 }" :buttonProps="{ severity: 'info', rounded: true, iconOnly: true }" />
|
|
174
|
+
</div>
|
|
175
|
+
</template>
|
|
176
|
+
|
|
177
|
+
<script setup>
|
|
178
|
+
import { ref } from 'vue';
|
|
179
|
+
import { useToast } from 'primevue/usetoast';
|
|
180
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
181
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
182
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
183
|
+
import Trash from '@primeicons/vue/trash';
|
|
184
|
+
import Upload from '@primeicons/vue/upload';
|
|
185
|
+
|
|
186
|
+
const toast = useToast();
|
|
187
|
+
|
|
188
|
+
const items = ref([
|
|
189
|
+
{
|
|
190
|
+
icon: Pencil,
|
|
191
|
+
command: () => {
|
|
192
|
+
toast.add({ severity: 'info', summary: 'Add', detail: 'Data Added', life: 3000 });
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
icon: Refresh,
|
|
197
|
+
command: () => {
|
|
198
|
+
toast.add({ severity: 'success', summary: 'Update', detail: 'Data Updated', life: 3000 });
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
icon: Trash,
|
|
203
|
+
command: () => {
|
|
204
|
+
toast.add({ severity: 'error', summary: 'Delete', detail: 'Data Deleted', life: 3000 });
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
icon: Upload
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
icon: ExternalLink,
|
|
212
|
+
target: '_blank',
|
|
213
|
+
url: 'https://vuejs.org/'
|
|
214
|
+
}
|
|
215
|
+
]);
|
|
216
|
+
<\/script>
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Template
|
|
220
|
+
|
|
221
|
+
SpeedDial supports full customization of the trigger button and action items using the button and item templates.
|
|
222
|
+
|
|
223
|
+
```vue
|
|
224
|
+
<template>
|
|
225
|
+
<div class="flex justify-center" style="position: relative; height: 450px">
|
|
226
|
+
<SpeedDial :model="items" direction="down" :transitionDelay="50" :style="{ position: 'absolute', top: 0 }" :buttonProps="{ severity: 'warn', rounded: true, iconOnly: true, styleClass: 'w-12! h-12!' }">
|
|
227
|
+
<template #item="{ item, icon, toggleCallback }">
|
|
228
|
+
<div class="flex gap-3 cursor-pointer rounded-lg" @click="toggleCallback($event, item)">
|
|
229
|
+
<span class="flex items-center justify-center w-24 px-6 py-2 bg-surface-0 dark:bg-surface-900 border border-surface-200 dark:border-surface-700 rounded-lg text-surface-500 dark:text-surface-400 font-medium">
|
|
230
|
+
{{ item.label }}
|
|
231
|
+
</span>
|
|
232
|
+
<span class="flex items-center justify-center w-12 h-12 rounded-full bg-surface-0 dark:bg-surface-900 border border-surface-200 dark:border-surface-700 text-surface-500 dark:text-surface-400">
|
|
233
|
+
<component :is="icon" :size="20" />
|
|
234
|
+
</span>
|
|
235
|
+
</div>
|
|
236
|
+
</template>
|
|
237
|
+
</SpeedDial>
|
|
238
|
+
</div>
|
|
239
|
+
</template>
|
|
240
|
+
|
|
241
|
+
<script setup>
|
|
242
|
+
import { ref } from 'vue';
|
|
243
|
+
import Copy from '@primeicons/vue/copy';
|
|
244
|
+
import Heart from '@primeicons/vue/heart';
|
|
245
|
+
import Print from '@primeicons/vue/print';
|
|
246
|
+
import Save from '@primeicons/vue/save';
|
|
247
|
+
import ShareAlt from '@primeicons/vue/share-alt';
|
|
248
|
+
|
|
249
|
+
const items = ref([
|
|
250
|
+
{
|
|
251
|
+
label: 'Like',
|
|
252
|
+
icon: Heart
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: 'Share',
|
|
256
|
+
icon: ShareAlt
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
label: 'Print',
|
|
260
|
+
icon: Print
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
label: 'Save',
|
|
264
|
+
icon: Save
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
label: 'Copy',
|
|
268
|
+
icon: Copy
|
|
269
|
+
}
|
|
270
|
+
]);
|
|
271
|
+
<\/script>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Tooltip
|
|
275
|
+
|
|
276
|
+
SpeedDial can be combined with Tooltip to display labels for action items.
|
|
277
|
+
|
|
278
|
+
```vue
|
|
279
|
+
<template>
|
|
280
|
+
<div :style="{ position: 'relative', height: '350px' }">
|
|
281
|
+
<SpeedDial :model="items" direction="up" :style="{ position: 'absolute', right: 0, bottom: 0 }" :buttonProps="{ severity: 'help', rounded: true, iconOnly: true }" :tooltipOptions="{ position: 'left' }" />
|
|
282
|
+
<SpeedDial :model="items" direction="up" :style="{ position: 'absolute', left: 0, bottom: 0 }" :buttonProps="{ severity: 'danger', rounded: true, iconOnly: true }" :tooltipOptions="{ position: 'right' }" />
|
|
283
|
+
</div>
|
|
284
|
+
</template>
|
|
285
|
+
|
|
286
|
+
<script setup>
|
|
287
|
+
import { ref } from 'vue';
|
|
288
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
289
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
290
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
291
|
+
import Trash from '@primeicons/vue/trash';
|
|
292
|
+
import Upload from '@primeicons/vue/upload';
|
|
293
|
+
|
|
294
|
+
const items = ref([
|
|
295
|
+
{ label: 'Add', icon: Pencil },
|
|
296
|
+
{ label: 'Update', icon: Refresh },
|
|
297
|
+
{ label: 'Delete', icon: Trash },
|
|
298
|
+
{ label: 'Upload', icon: Upload },
|
|
299
|
+
{ label: 'External', icon: ExternalLink }
|
|
300
|
+
]);
|
|
301
|
+
<\/script>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Mask
|
|
305
|
+
|
|
306
|
+
Adding mask property displays a modal layer behind the popup items.
|
|
307
|
+
|
|
308
|
+
```vue
|
|
309
|
+
<template>
|
|
310
|
+
<div :style="{ position: 'relative', height: '360px' }">
|
|
311
|
+
<SpeedDial :model="items" direction="up" mask :style="{ position: 'absolute', right: '1rem', bottom: '1rem' }" />
|
|
312
|
+
</div>
|
|
313
|
+
</template>
|
|
314
|
+
|
|
315
|
+
<script setup>
|
|
316
|
+
import { ref } from 'vue';
|
|
317
|
+
import Pencil from '@primeicons/vue/pencil';
|
|
318
|
+
import Refresh from '@primeicons/vue/refresh';
|
|
319
|
+
import Trash from '@primeicons/vue/trash';
|
|
320
|
+
import Upload from '@primeicons/vue/upload';
|
|
321
|
+
import ExternalLink from '@primeicons/vue/external-link';
|
|
322
|
+
|
|
323
|
+
const items = ref([{ icon: Pencil }, { icon: Refresh }, { icon: Trash }, { icon: Upload }, { icon: ExternalLink }]);
|
|
324
|
+
<\/script>
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## Accessibility
|
|
328
|
+
|
|
329
|
+
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. Menu Button Keyboard Support Key Function enter Toggles the visibility of the menu. space Toggles the visibility of the menu. down arrow Opens the menu and moves focus to the first item. up arrow Opens the menu and moves focus to the last item. Menu Keyboard Support Key Function enter Activates the menuitem, closes the menu and sets focus on the menu button. escape Closes the menu and sets focus on the menu button. arrow keys Navigates between the menu items. home Moves focus to the first item. end Moves focus to the last item.
|
|
330
|
+
|
|
331
|
+
```vue
|
|
332
|
+
<template>
|
|
333
|
+
<SpeedDial aria-label="Options" />
|
|
334
|
+
</template>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
## Speed Dial API
|
|
338
|
+
|
|
339
|
+
### Props
|
|
340
|
+
|
|
341
|
+
| Name |Type |Default |Description |
|
|
342
|
+
| --- | --- | --- | --- |
|
|
343
|
+
| model | MenuItem[] | - | MenuModel instance to define the action items. |
|
|
344
|
+
| visible | boolean | false | Specifies the visibility of the overlay. |
|
|
345
|
+
| direction | HintedString<"left" \| "right" \| "up" \| "down" \| "up-left" \| "up-right" \| "down-left" \| "down-right"> | up | Specifies the opening direction of actions. |
|
|
346
|
+
| transitionDelay | number | 30 | Transition delay step for each action item. |
|
|
347
|
+
| type | HintedString<"circle" \| "linear" \| "semi-circle" \| "quarter-circle"> | linear | Specifies the opening type of actions. |
|
|
348
|
+
| radius | number | 0 | Radius for *circle types. |
|
|
349
|
+
| mask | boolean | false | Whether to show a mask element behind the speeddial. |
|
|
350
|
+
| disabled | boolean | false | Whether the component is disabled. |
|
|
351
|
+
| hideOnClickOutside | boolean | true | Whether the actions close when clicked outside. |
|
|
352
|
+
| buttonClass | any | - | Style class of the button element. |
|
|
353
|
+
| maskStyle | any | - | Inline style of the mask element. |
|
|
354
|
+
| maskClass | string | - | Style class of the mask element. |
|
|
355
|
+
| showIcon | string | - | Show icon of the button element. |
|
|
356
|
+
| hideIcon | string | - | Hide icon of the button element. |
|
|
357
|
+
| rotateAnimation | boolean | true | Defined to rotate showIcon when hideIcon is not present. |
|
|
358
|
+
| class | any | - | Style class of the element. |
|
|
359
|
+
| style | any | - | Inline style of the element. |
|
|
360
|
+
| tooltipOptions | SpeedDialTooltipOptions | - | 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'. |
|
|
361
|
+
| buttonProps | object | - | Used to pass all properties of the ButtonProps to the button component. |
|
|
362
|
+
| actionButtonProps | object | - | Used to pass all properties of the ButtonProps to the item component. |
|
|
363
|
+
| ariaLabel | string | - | Defines a string value that labels an interactive list element. |
|
|
364
|
+
| ariaLabelledby | string | - | Identifier of the underlying list element. |
|
|
365
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
366
|
+
| pt | PassThrough<SpeedDialPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
367
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
368
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
369
|
+
|
|
370
|
+
### Pass Through Options
|
|
371
|
+
|
|
372
|
+
| Name |Type |Description |
|
|
373
|
+
| --- | --- | --- |
|
|
374
|
+
| root | SpeedDialPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
375
|
+
| pcButton | any | Used to pass attributes to the Button component. |
|
|
376
|
+
| list | SpeedDialPassThroughOptionType | Used to pass attributes to the list's DOM element. |
|
|
377
|
+
| item | SpeedDialPassThroughOptionType | Used to pass attributes to the item's DOM element. |
|
|
378
|
+
| pcAction | any | Used to pass attributes to the action's Button component. |
|
|
379
|
+
| actionIcon | SpeedDialPassThroughOptionType | Used to pass attributes to the action icon's DOM element. |
|
|
380
|
+
| mask | SpeedDialPassThroughOptionType | Used to pass attributes to the mask's DOM element. |
|
|
381
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
382
|
+
|
|
383
|
+
### Theming
|
|
384
|
+
|
|
385
|
+
### CSS Classes
|
|
386
|
+
|
|
387
|
+
| Class |Description |
|
|
388
|
+
| --- | --- |
|
|
389
|
+
| p-speeddial | Class name of the root element |
|
|
390
|
+
| p-speeddial-button | Class name of the button element |
|
|
391
|
+
| p-speeddial-list | Class name of the list element |
|
|
392
|
+
| p-speeddial-item | Class name of the item element |
|
|
393
|
+
| p-speeddial-action | Class name of the action element |
|
|
394
|
+
| p-speeddial-action-icon | Class name of the action icon element |
|
|
395
|
+
| p-speeddial-mask | Class name of the mask element |
|
|
396
|
+
|
|
397
|
+
### Design Tokens
|
|
398
|
+
|
|
399
|
+
| Token |CSS Variable |Description |
|
|
400
|
+
| --- | --- | --- |
|
|
401
|
+
| speeddial.gap | --p-speeddial-gap | Gap of root |
|
|
402
|
+
| speeddial.transition.duration | --p-speeddial-transition-duration | Transition duration of root |
|