@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,283 @@
|
|
|
1
|
+
# IconField
|
|
2
|
+
|
|
3
|
+
IconField wraps an input and an icon.
|
|
4
|
+
|
|
5
|
+
## Basic
|
|
6
|
+
|
|
7
|
+
An input field with an embedded leading or trailing icon.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex flex-wrap justify-center gap-4">
|
|
12
|
+
<IconField>
|
|
13
|
+
<InputIcon>
|
|
14
|
+
<Search />
|
|
15
|
+
</InputIcon>
|
|
16
|
+
<InputText v-model="value1" type="text" placeholder="Search" />
|
|
17
|
+
</IconField>
|
|
18
|
+
<IconField>
|
|
19
|
+
<InputText v-model="value2" type="text" variant="filled" />
|
|
20
|
+
<InputIcon>
|
|
21
|
+
<Spinner class="animate-spin" />
|
|
22
|
+
</InputIcon>
|
|
23
|
+
</IconField>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { ref } from 'vue';
|
|
29
|
+
import Search from '@primeicons/vue/search';
|
|
30
|
+
import Spinner from '@primeicons/vue/spinner';
|
|
31
|
+
|
|
32
|
+
const value1 = ref(null);
|
|
33
|
+
const value2 = ref(null);
|
|
34
|
+
<\/script>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Float Label
|
|
38
|
+
|
|
39
|
+
FloatLabel visually integrates a label with its form element. Visit FloatLabel documentation for more information.
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<template>
|
|
43
|
+
<div class="flex flex-wrap justify-center items-end gap-4">
|
|
44
|
+
<FloatLabel>
|
|
45
|
+
<IconField>
|
|
46
|
+
<InputIcon>
|
|
47
|
+
<Search />
|
|
48
|
+
</InputIcon>
|
|
49
|
+
<InputText id="over_label" v-model="value1" autocomplete="off" />
|
|
50
|
+
</IconField>
|
|
51
|
+
<label for="over_label">Over Label</label>
|
|
52
|
+
</FloatLabel>
|
|
53
|
+
|
|
54
|
+
<FloatLabel variant="in">
|
|
55
|
+
<IconField>
|
|
56
|
+
<InputIcon>
|
|
57
|
+
<Search />
|
|
58
|
+
</InputIcon>
|
|
59
|
+
<InputText id="in_label" v-model="value2" autocomplete="off" variant="filled" />
|
|
60
|
+
</IconField>
|
|
61
|
+
<label for="in_label">In Label</label>
|
|
62
|
+
</FloatLabel>
|
|
63
|
+
|
|
64
|
+
<FloatLabel variant="on">
|
|
65
|
+
<IconField>
|
|
66
|
+
<InputIcon>
|
|
67
|
+
<Search />
|
|
68
|
+
</InputIcon>
|
|
69
|
+
<InputText id="on_label" v-model="value3" autocomplete="off" />
|
|
70
|
+
</IconField>
|
|
71
|
+
<label for="on_label">On Label</label>
|
|
72
|
+
</FloatLabel>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script setup>
|
|
77
|
+
import { ref } from 'vue';
|
|
78
|
+
import Search from '@primeicons/vue/search';
|
|
79
|
+
|
|
80
|
+
const value1 = ref(null);
|
|
81
|
+
const value2 = ref(null);
|
|
82
|
+
const value3 = ref(null);
|
|
83
|
+
<\/script>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Ifta Label
|
|
87
|
+
|
|
88
|
+
IftaLabel is used to create infield top aligned labels. Visit IftaLabel documentation for more information.
|
|
89
|
+
|
|
90
|
+
```vue
|
|
91
|
+
<template>
|
|
92
|
+
<div class="flex justify-center">
|
|
93
|
+
<IftaLabel>
|
|
94
|
+
<IconField>
|
|
95
|
+
<InputIcon>
|
|
96
|
+
<Envelope />
|
|
97
|
+
</InputIcon>
|
|
98
|
+
<InputText id="email" v-model="value" autocomplete="off" variant="filled" />
|
|
99
|
+
<InputIcon>
|
|
100
|
+
<Check />
|
|
101
|
+
</InputIcon>
|
|
102
|
+
</IconField>
|
|
103
|
+
<label for="email">Email</label>
|
|
104
|
+
</IftaLabel>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
|
|
108
|
+
<script setup>
|
|
109
|
+
import { ref } from 'vue';
|
|
110
|
+
import Check from '@primeicons/vue/check';
|
|
111
|
+
import Envelope from '@primeicons/vue/envelope';
|
|
112
|
+
|
|
113
|
+
const value = ref(null);
|
|
114
|
+
<\/script>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Clickable
|
|
118
|
+
|
|
119
|
+
Icons inside InputIcon can be interactive with event handlers like click.
|
|
120
|
+
|
|
121
|
+
```vue
|
|
122
|
+
<template>
|
|
123
|
+
<div class="flex flex-wrap justify-center gap-4">
|
|
124
|
+
<IconField>
|
|
125
|
+
<InputIcon>
|
|
126
|
+
<Search />
|
|
127
|
+
</InputIcon>
|
|
128
|
+
<InputText v-model="value" type="text" placeholder="Search" />
|
|
129
|
+
<InputIcon>
|
|
130
|
+
<Times class="cursor-pointer" @click="value = ''" />
|
|
131
|
+
</InputIcon>
|
|
132
|
+
</IconField>
|
|
133
|
+
</div>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<script setup>
|
|
137
|
+
import { ref } from 'vue';
|
|
138
|
+
import Search from '@primeicons/vue/search';
|
|
139
|
+
import Times from '@primeicons/vue/times';
|
|
140
|
+
|
|
141
|
+
const value = ref('PrimeVue');
|
|
142
|
+
<\/script>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Sizes
|
|
146
|
+
|
|
147
|
+
IconField is compatible with the size setting of the input field.
|
|
148
|
+
|
|
149
|
+
```vue
|
|
150
|
+
<template>
|
|
151
|
+
<div class="flex flex-col items-center gap-4">
|
|
152
|
+
<IconField>
|
|
153
|
+
<InputIcon>
|
|
154
|
+
<Search />
|
|
155
|
+
</InputIcon>
|
|
156
|
+
<InputText v-model="value1" placeholder="Small" size="small" />
|
|
157
|
+
</IconField>
|
|
158
|
+
|
|
159
|
+
<IconField>
|
|
160
|
+
<InputText v-model="value2" placeholder="Normal" />
|
|
161
|
+
<InputIcon>
|
|
162
|
+
<User />
|
|
163
|
+
</InputIcon>
|
|
164
|
+
</IconField>
|
|
165
|
+
|
|
166
|
+
<IconField>
|
|
167
|
+
<InputIcon>
|
|
168
|
+
<Lock />
|
|
169
|
+
</InputIcon>
|
|
170
|
+
<InputText v-model="value3" placeholder="Large" size="large" />
|
|
171
|
+
<InputIcon>
|
|
172
|
+
<Spinner class="animate-spin" />
|
|
173
|
+
</InputIcon>
|
|
174
|
+
</IconField>
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
|
|
178
|
+
<script setup>
|
|
179
|
+
import { ref } from 'vue';
|
|
180
|
+
import Lock from '@primeicons/vue/lock';
|
|
181
|
+
import Search from '@primeicons/vue/search';
|
|
182
|
+
import Spinner from '@primeicons/vue/spinner';
|
|
183
|
+
import User from '@primeicons/vue/user';
|
|
184
|
+
|
|
185
|
+
const value1 = ref(null);
|
|
186
|
+
const value2 = ref(null);
|
|
187
|
+
const value3 = ref(null);
|
|
188
|
+
<\/script>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Template
|
|
192
|
+
|
|
193
|
+
Custom content inside an InputIcon is defined as children.
|
|
194
|
+
|
|
195
|
+
```vue
|
|
196
|
+
<template>
|
|
197
|
+
<div class="flex justify-center">
|
|
198
|
+
<IconField>
|
|
199
|
+
<InputIcon>
|
|
200
|
+
<svg width="14" height="16" viewBox="0 0 35 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
201
|
+
<path
|
|
202
|
+
d="M25.87 18.05L23.16 17.45L25.27 20.46V29.78L32.49 23.76V13.53L29.18 14.73L25.87 18.04V18.05ZM25.27 35.49L29.18 31.58V27.67L25.27 30.98V35.49ZM20.16 17.14H20.03H20.17H20.16ZM30.1 5.19L34.89 4.81L33.08 12.33L24.1 15.67L30.08 5.2L30.1 5.19ZM5.72 14.74L2.41 13.54V23.77L9.63 29.79V20.47L11.74 17.46L9.03 18.06L5.72 14.75V14.74ZM9.63 30.98L5.72 27.67V31.58L9.63 35.49V30.98ZM4.8 5.2L10.78 15.67L1.81 12.33L0 4.81L4.79 5.19L4.8 5.2ZM24.37 21.05V34.59L22.56 37.29L20.46 39.4H14.44L12.34 37.29L10.53 34.59V21.05L12.42 18.23L17.45 26.8L22.48 18.23L24.37 21.05ZM22.85 0L22.57 0.69L17.45 13.08L12.33 0.69L12.05 0H22.85Z"
|
|
203
|
+
fill="var(--p-primary-color)"
|
|
204
|
+
/>
|
|
205
|
+
<path
|
|
206
|
+
d="M30.69 4.21L24.37 4.81L22.57 0.69L22.86 0H26.48L30.69 4.21ZM23.75 5.67L22.66 3.08L18.05 14.24V17.14H19.7H20.03H20.16H20.2L24.1 15.7L30.11 5.19L23.75 5.67ZM4.21002 4.21L10.53 4.81L12.33 0.69L12.05 0H8.43002L4.22002 4.21H4.21002ZM21.9 17.4L20.6 18.2H14.3L13 17.4L12.4 18.2L12.42 18.23L17.45 26.8L22.48 18.23L22.5 18.2L21.9 17.4ZM4.79002 5.19L10.8 15.7L14.7 17.14H14.74H15.2H16.85V14.24L12.24 3.09L11.15 5.68L4.79002 5.2V5.19Z"
|
|
207
|
+
fill="var(--p-text-color)"
|
|
208
|
+
/>
|
|
209
|
+
</svg>
|
|
210
|
+
</InputIcon>
|
|
211
|
+
<InputText v-model="value" type="text" placeholder="Search" />
|
|
212
|
+
</IconField>
|
|
213
|
+
</div>
|
|
214
|
+
</template>
|
|
215
|
+
|
|
216
|
+
<script setup>
|
|
217
|
+
import { ref } from 'vue';
|
|
218
|
+
|
|
219
|
+
const value = ref(null);
|
|
220
|
+
<\/script>
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Accessibility
|
|
224
|
+
|
|
225
|
+
Screen Reader IconField and InputIcon do not require any roles and attributes. Keyboard Support Components does not include any interactive elements.
|
|
226
|
+
|
|
227
|
+
## Icon Field API
|
|
228
|
+
|
|
229
|
+
### Props
|
|
230
|
+
|
|
231
|
+
| Name |Type |Default |Description |
|
|
232
|
+
| --- | --- | --- | --- |
|
|
233
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
234
|
+
| pt | PassThrough<IconFieldPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
|
|
235
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
236
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
237
|
+
|
|
238
|
+
### Pass Through Options
|
|
239
|
+
|
|
240
|
+
| Name |Type |Description |
|
|
241
|
+
| --- | --- | --- |
|
|
242
|
+
| root | IconFieldPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
|
|
243
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
244
|
+
|
|
245
|
+
### Theming
|
|
246
|
+
|
|
247
|
+
### CSS Classes
|
|
248
|
+
|
|
249
|
+
| Class |Description |
|
|
250
|
+
| --- | --- |
|
|
251
|
+
| p-iconfield | Class name of the root element |
|
|
252
|
+
|
|
253
|
+
### Design Tokens
|
|
254
|
+
|
|
255
|
+
| Token |CSS Variable |Description |
|
|
256
|
+
| --- | --- | --- |
|
|
257
|
+
| iconfield.icon.color | --p-iconfield-icon-color | Color of icon |
|
|
258
|
+
|
|
259
|
+
## Input Icon API
|
|
260
|
+
|
|
261
|
+
### Props
|
|
262
|
+
|
|
263
|
+
| Name |Type |Default |Description |
|
|
264
|
+
| --- | --- | --- | --- |
|
|
265
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
266
|
+
| pt | PassThrough<InputIconPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
|
|
267
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
268
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
269
|
+
|
|
270
|
+
### Pass Through Options
|
|
271
|
+
|
|
272
|
+
| Name |Type |Description |
|
|
273
|
+
| --- | --- | --- |
|
|
274
|
+
| root | InputIconPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
|
|
275
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
276
|
+
|
|
277
|
+
### Theming
|
|
278
|
+
|
|
279
|
+
### CSS Classes
|
|
280
|
+
|
|
281
|
+
| Class |Description |
|
|
282
|
+
| --- | --- |
|
|
283
|
+
| p-inputicon | Class name of the root element |
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# IftaLabel
|
|
2
|
+
|
|
3
|
+
IftaLabel is used to create infield top aligned labels.
|
|
4
|
+
|
|
5
|
+
## Basic
|
|
6
|
+
|
|
7
|
+
IftaLabel is used by wrapping the input and its label.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex justify-center">
|
|
12
|
+
<IftaLabel>
|
|
13
|
+
<InputText id="username" v-model="value" />
|
|
14
|
+
<label for="username">Username</label>
|
|
15
|
+
</IftaLabel>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { ref } from 'vue';
|
|
21
|
+
|
|
22
|
+
const value = ref(null);
|
|
23
|
+
<\/script>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Invalid
|
|
27
|
+
|
|
28
|
+
When the form element is invalid, the label is also highlighted.
|
|
29
|
+
|
|
30
|
+
```vue
|
|
31
|
+
<template>
|
|
32
|
+
<div class="flex justify-center">
|
|
33
|
+
<IftaLabel>
|
|
34
|
+
<InputText id="username" v-model="value" :invalid="!value" />
|
|
35
|
+
<label for="username">Username</label>
|
|
36
|
+
</IftaLabel>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup>
|
|
41
|
+
import { ref } from 'vue';
|
|
42
|
+
|
|
43
|
+
const value = ref('');
|
|
44
|
+
<\/script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Accessibility
|
|
48
|
+
|
|
49
|
+
Screen Reader IftaLabel does not require any roles and attributes. Keyboard Support Component does not include any interactive elements.
|
|
50
|
+
|
|
51
|
+
## Ifta Label API
|
|
52
|
+
|
|
53
|
+
### Props
|
|
54
|
+
|
|
55
|
+
| Name |Type |Default |Description |
|
|
56
|
+
| --- | --- | --- | --- |
|
|
57
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
58
|
+
| pt | PassThrough<IftaLabelPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
59
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
60
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
61
|
+
|
|
62
|
+
### Slots
|
|
63
|
+
|
|
64
|
+
| Name |Parameters |Description |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| default | Function | |
|
|
67
|
+
|
|
68
|
+
### Pass Through Options
|
|
69
|
+
|
|
70
|
+
| Name |Type |Description |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| root | IftaLabelPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
73
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
74
|
+
|
|
75
|
+
### Theming
|
|
76
|
+
|
|
77
|
+
### CSS Classes
|
|
78
|
+
|
|
79
|
+
| Class |Description |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| p-iftalabel | Class name of the root element |
|
|
82
|
+
|
|
83
|
+
### Design Tokens
|
|
84
|
+
|
|
85
|
+
| Token |CSS Variable |Description |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| iftalabel.color | --p-iftalabel-color | Color of root |
|
|
88
|
+
| iftalabel.focus.color | --p-iftalabel-focus-color | Focus color of root |
|
|
89
|
+
| iftalabel.invalid.color | --p-iftalabel-invalid-color | Invalid color of root |
|
|
90
|
+
| iftalabel.transition.duration | --p-iftalabel-transition-duration | Transition duration of root |
|
|
91
|
+
| iftalabel.position.x | --p-iftalabel-position-x | Position x of root |
|
|
92
|
+
| iftalabel.top | --p-iftalabel-top | Top of root |
|
|
93
|
+
| iftalabel.font.size | --p-iftalabel-font-size | Font size of root |
|
|
94
|
+
| iftalabel.font.weight | --p-iftalabel-font-weight | Font weight of root |
|
|
95
|
+
| iftalabel.input.padding.top | --p-iftalabel-input-padding-top | Padding top of input |
|
|
96
|
+
| iftalabel.input.padding.bottom | --p-iftalabel-input-padding-bottom | Padding bottom of input |
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Image
|
|
2
|
+
|
|
3
|
+
Displays an image with preview and tranformation options.
|
|
4
|
+
|
|
5
|
+
## Basic
|
|
6
|
+
|
|
7
|
+
Image is used as the native img element and supports all properties that the native element has. For multiple image, see Galleria.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex justify-center">
|
|
12
|
+
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria10.jpg" alt="Image" width="250" />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import Image from 'primevue/image';
|
|
18
|
+
<\/script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Preview
|
|
22
|
+
|
|
23
|
+
Preview mode displays a modal layer when the image is clicked that provides transformation options such as rotating and zooming.
|
|
24
|
+
|
|
25
|
+
```vue
|
|
26
|
+
<template>
|
|
27
|
+
<div class="flex justify-center">
|
|
28
|
+
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria10.jpg" alt="Image" width="250" preview />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script setup>
|
|
33
|
+
import Image from 'primevue/image';
|
|
34
|
+
<\/script>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Preview Image Source
|
|
38
|
+
|
|
39
|
+
In case that you want to show different image on preview, you can use the original slot. It could come handy when wanted to use smaller image version at first and bigger one on preview.
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<template>
|
|
43
|
+
<div class="flex justify-center">
|
|
44
|
+
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria11.jpg" alt="Image" width="250" preview>
|
|
45
|
+
<template #original="slotProps">
|
|
46
|
+
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria11.jpg" alt="preview" :style="slotProps.style" @click="slotProps.previewCallback" />
|
|
47
|
+
</template>
|
|
48
|
+
</Image>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup>
|
|
53
|
+
import Image from 'primevue/image';
|
|
54
|
+
<\/script>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Template
|
|
58
|
+
|
|
59
|
+
An eye icon is displayed by default when the image is hovered in preview mode. Use the previewicon slot for custom content.
|
|
60
|
+
|
|
61
|
+
```vue
|
|
62
|
+
<template>
|
|
63
|
+
<div class="flex justify-center">
|
|
64
|
+
<Image alt="Image" preview>
|
|
65
|
+
<template #previewicon>
|
|
66
|
+
<Search />
|
|
67
|
+
</template>
|
|
68
|
+
<template #image>
|
|
69
|
+
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria11.jpg" alt="image" width="250" />
|
|
70
|
+
</template>
|
|
71
|
+
<template #preview="slotProps">
|
|
72
|
+
<img src="https://primefaces.org/cdn/primevue/images/galleria/galleria11.jpg" alt="preview" :style="slotProps.style" @click="slotProps.previewCallback" />
|
|
73
|
+
</template>
|
|
74
|
+
</Image>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script setup>
|
|
79
|
+
import Image from 'primevue/image';
|
|
80
|
+
import Search from '@primeicons/vue/search';
|
|
81
|
+
<\/script>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Accessibility
|
|
85
|
+
|
|
86
|
+
Screen Reader The preview button is a native button element with an aria-label that refers to the aria.zoomImage property of the locale API by default. When preview is active, dialog role with aria-modal is applied to the overlay image container. Button controls use aria.rotateRight , aria.rotateLeft , aria.zoomIn , aria.zoomOut and aria.close from the locale API as aria-label . ButtonBar Keyboard Support When preview is activated, close button receives the initial focus. Key Function tab Moves focus through button bar. enter Activates the button. space Activates the button. esc Closes the image preview.
|
|
87
|
+
|
|
88
|
+
## Image API
|
|
89
|
+
|
|
90
|
+
### Props
|
|
91
|
+
|
|
92
|
+
| Name |Type |Default |Description |
|
|
93
|
+
| --- | --- | --- | --- |
|
|
94
|
+
| src | string | - | Image url. |
|
|
95
|
+
| preview | boolean | false | Controls the preview functionality. |
|
|
96
|
+
| imageStyle | any | - | Inline style of the image element. |
|
|
97
|
+
| imageClass | any | - | Style class of the image element. |
|
|
98
|
+
| indicatorIcon | string | - | Custom indicator icon. |
|
|
99
|
+
| previewIcon | string | - | Custom indicator icon. |
|
|
100
|
+
| zoomInDisabled | boolean | false | Disable the zoom-in button |
|
|
101
|
+
| zoomOutDisabled | boolean | false | Disable the zoom-out button |
|
|
102
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
103
|
+
| pt | PassThrough<ImagePassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
104
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
105
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
106
|
+
|
|
107
|
+
### Pass Through Options
|
|
108
|
+
|
|
109
|
+
| Name |Type |Description |
|
|
110
|
+
| --- | --- | --- |
|
|
111
|
+
| root | ImagePassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
112
|
+
| image | ImagePassThroughOptionType | Used to pass attributes to the image's DOM element. |
|
|
113
|
+
| previewMask | ImagePassThroughOptionType | Used to pass attributes to the preview mask's DOM element. |
|
|
114
|
+
| previewIcon | ImagePassThroughOptionType | Used to pass attributes to the preview icon's DOM element. |
|
|
115
|
+
| mask | ImagePassThroughOptionType | Used to pass attributes to the mask's DOM element. |
|
|
116
|
+
| toolbar | ImagePassThroughOptionType | Used to pass attributes to the toolbar's DOM element. |
|
|
117
|
+
| rotateRightButton | ImagePassThroughOptionType | Used to pass attributes to the rotate right button's DOM element. |
|
|
118
|
+
| rotateRightIcon | ImagePassThroughOptionType | Used to pass attributes to the rotate right icon's DOM element. |
|
|
119
|
+
| rotateLeftButton | ImagePassThroughOptionType | Used to pass attributes to the rotate left button's DOM element. |
|
|
120
|
+
| rotateLeftIcon | ImagePassThroughOptionType | Used to pass attributes to the rotate left icon's DOM element. |
|
|
121
|
+
| zoomOutButton | ImagePassThroughOptionType | Used to pass attributes to the zoom out button's DOM element. |
|
|
122
|
+
| zoomOutIcon | ImagePassThroughOptionType | Used to pass attributes to the zoom out icon's DOM element. |
|
|
123
|
+
| zoomInButton | ImagePassThroughOptionType | Used to pass attributes to the zoom in button's DOM element. |
|
|
124
|
+
| zoomInIcon | ImagePassThroughOptionType | Used to pass attributes to the zoom in icon's DOM element. |
|
|
125
|
+
| closeButton | ImagePassThroughOptionType | Used to pass attributes to the close button's DOM element. |
|
|
126
|
+
| closeIcon | ImagePassThroughOptionType | Used to pass attributes to the close icon's DOM element. |
|
|
127
|
+
| originalContainer | ImagePassThroughOptionType | Used to pass attributes to the original container's DOM element. |
|
|
128
|
+
| original | ImagePassThroughOptionType | Used to pass attributes to the original's DOM element. |
|
|
129
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
130
|
+
| transition | ImagePassThroughTransitionType | Used to control Vue Transition API. |
|
|
131
|
+
|
|
132
|
+
### Theming
|
|
133
|
+
|
|
134
|
+
### CSS Classes
|
|
135
|
+
|
|
136
|
+
| Class |Description |
|
|
137
|
+
| --- | --- |
|
|
138
|
+
| p-image | Class name of the root element |
|
|
139
|
+
| p-image-preview-mask | Class name of the preview mask element |
|
|
140
|
+
| p-image-preview-icon | Class name of the preview icon element |
|
|
141
|
+
| p-image-mask | Class name of the mask element |
|
|
142
|
+
| p-image-toolbar | Class name of the toolbar element |
|
|
143
|
+
| p-image-rotate-right-button | Class name of the rotate right button element |
|
|
144
|
+
| p-image-rotate-left-button | Class name of the rotate left button element |
|
|
145
|
+
| p-image-zoom-out-button | Class name of the zoom out button element |
|
|
146
|
+
| p-image-zoom-in-button | Class name of the zoom in button element |
|
|
147
|
+
| p-image-close-button | Class name of the close button element |
|
|
148
|
+
| p-image-original | Class name of the original element |
|
|
149
|
+
|
|
150
|
+
### Design Tokens
|
|
151
|
+
|
|
152
|
+
| Token |CSS Variable |Description |
|
|
153
|
+
| --- | --- | --- |
|
|
154
|
+
| image.transition.duration | --p-image-transition-duration | Transition duration of root |
|
|
155
|
+
| image.preview.icon.size | --p-image-preview-icon-size | Icon size of preview |
|
|
156
|
+
| image.preview.mask.background | --p-image-preview-mask-background | Mask background of preview |
|
|
157
|
+
| image.preview.mask.color | --p-image-preview-mask-color | Mask color of preview |
|
|
158
|
+
| image.toolbar.position.left | --p-image-toolbar-position-left | Position left of toolbar |
|
|
159
|
+
| image.toolbar.position.right | --p-image-toolbar-position-right | Position right of toolbar |
|
|
160
|
+
| image.toolbar.position.top | --p-image-toolbar-position-top | Position top of toolbar |
|
|
161
|
+
| image.toolbar.position.bottom | --p-image-toolbar-position-bottom | Position bottom of toolbar |
|
|
162
|
+
| image.toolbar.blur | --p-image-toolbar-blur | Blur of toolbar |
|
|
163
|
+
| image.toolbar.background | --p-image-toolbar-background | Background of toolbar |
|
|
164
|
+
| image.toolbar.border.color | --p-image-toolbar-border-color | Border color of toolbar |
|
|
165
|
+
| image.toolbar.border.width | --p-image-toolbar-border-width | Border width of toolbar |
|
|
166
|
+
| image.toolbar.border.radius | --p-image-toolbar-border-radius | Border radius of toolbar |
|
|
167
|
+
| image.toolbar.padding | --p-image-toolbar-padding | Padding of toolbar |
|
|
168
|
+
| image.toolbar.gap | --p-image-toolbar-gap | Gap of toolbar |
|
|
169
|
+
| image.action.hover.background | --p-image-action-hover-background | Hover background of action |
|
|
170
|
+
| image.action.color | --p-image-action-color | Color of action |
|
|
171
|
+
| image.action.hover.color | --p-image-action-hover-color | Hover color of action |
|
|
172
|
+
| image.action.size | --p-image-action-size | Size of action |
|
|
173
|
+
| image.action.icon.size | --p-image-action-icon-size | Icon size of action |
|
|
174
|
+
| image.action.border.radius | --p-image-action-border-radius | Border radius of action |
|
|
175
|
+
| image.action.focus.ring.width | --p-image-action-focus-ring-width | Focus ring width of action |
|
|
176
|
+
| image.action.focus.ring.style | --p-image-action-focus-ring-style | Focus ring style of action |
|
|
177
|
+
| image.action.focus.ring.color | --p-image-action-focus-ring-color | Focus ring color of action |
|
|
178
|
+
| image.action.focus.ring.offset | --p-image-action-focus-ring-offset | Focus ring offset of action |
|
|
179
|
+
| image.action.focus.ring.shadow | --p-image-action-focus-ring-shadow | Focus ring shadow of action |
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# ImageCompare
|
|
2
|
+
|
|
3
|
+
Compare two images side by side with a slider.
|
|
4
|
+
|
|
5
|
+
## Basic
|
|
6
|
+
|
|
7
|
+
Images are defined using templating with left and right templates. Use the style or class properties to define the size of the container.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex justify-center">
|
|
12
|
+
<ImageCompare class="shadow-lg rounded-2xl">
|
|
13
|
+
<template #left>
|
|
14
|
+
<img src="https://primefaces.org/cdn/primevue/images/compare/island1.jpg" />
|
|
15
|
+
</template>
|
|
16
|
+
<template #right>
|
|
17
|
+
<img src="https://primefaces.org/cdn/primevue/images/compare/island2.jpg" />
|
|
18
|
+
</template>
|
|
19
|
+
</ImageCompare>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Responsive
|
|
25
|
+
|
|
26
|
+
Apply responsive styles to the container element to optimize display per screen size.
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<template>
|
|
30
|
+
<div class="flex justify-center">
|
|
31
|
+
<ImageCompare class="sm:w-96! shadow-lg rounded-2xl">
|
|
32
|
+
<template #left>
|
|
33
|
+
<img src="https://primefaces.org/cdn/primevue/images/compare/island1.jpg" />
|
|
34
|
+
</template>
|
|
35
|
+
<template #right>
|
|
36
|
+
<img src="https://primefaces.org/cdn/primevue/images/compare/island2.jpg" />
|
|
37
|
+
</template>
|
|
38
|
+
</ImageCompare>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Accessibility
|
|
44
|
+
|
|
45
|
+
Screen Reader ImageComponent component uses a native range slider internally. Value to describe the component can be defined using aria-labelledby and aria-label props. Keyboard Support Key Function tab Moves focus to the component. left arrow up arrow Decrements the value. right arrow down arrow Increments the value. home Set the minimum value. end Set the maximum value. page up Increments the value by 10 steps. page down Decrements the value by 10 steps.
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<template>
|
|
49
|
+
<span id="image_label">Compare Images</span>
|
|
50
|
+
<ImageCompare class="shadow-lg rounded-2xl" aria-labelledby="image-label">
|
|
51
|
+
...
|
|
52
|
+
</ImageCompare>
|
|
53
|
+
|
|
54
|
+
<ImageCompare class="shadow-lg rounded-2xl" aria-label="Compare Images">
|
|
55
|
+
...
|
|
56
|
+
</ImageCompare>
|
|
57
|
+
</template>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Image Compare API
|
|
61
|
+
|
|
62
|
+
### Props
|
|
63
|
+
|
|
64
|
+
| Name |Type |Default |Description |
|
|
65
|
+
| --- | --- | --- | --- |
|
|
66
|
+
| tabindex | number | 0 | Index of the element in tabbing order. |
|
|
67
|
+
| ariaLabel | string | - | Defines a string value that labels an interactive element. |
|
|
68
|
+
| ariaLabelledby | string | - | Identifier of the underlying input element. |
|
|
69
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
70
|
+
| pt | PassThrough<ImageComparePassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
71
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
72
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
73
|
+
|
|
74
|
+
### Pass Through Options
|
|
75
|
+
|
|
76
|
+
| Name |Type |Description |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| root | ImageComparePassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
79
|
+
| slider | ImageComparePassThroughOptionType | Used to pass attributes to the slider's DOM element. |
|
|
80
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
81
|
+
|
|
82
|
+
### Theming
|
|
83
|
+
|
|
84
|
+
### CSS Classes
|
|
85
|
+
|
|
86
|
+
| Class |Description |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| p-imagecompare | Class name of the root element |
|
|
89
|
+
| p-imagecompare-slider | Class name of the slider element |
|
|
90
|
+
|
|
91
|
+
### Design Tokens
|
|
92
|
+
|
|
93
|
+
| Token |CSS Variable |Description |
|
|
94
|
+
| --- | --- | --- |
|
|
95
|
+
| imagecompare.handle.size | --p-imagecompare-handle-size | Size of handle |
|
|
96
|
+
| imagecompare.handle.hover.size | --p-imagecompare-handle-hover-size | Hover size of handle |
|
|
97
|
+
| imagecompare.handle.background | --p-imagecompare-handle-background | Background of handle |
|
|
98
|
+
| imagecompare.handle.hover.background | --p-imagecompare-handle-hover-background | Hover background of handle |
|
|
99
|
+
| imagecompare.handle.border.color | --p-imagecompare-handle-border-color | Border color of handle |
|
|
100
|
+
| imagecompare.handle.hover.border.color | --p-imagecompare-handle-hover-border-color | Hover border color of handle |
|
|
101
|
+
| imagecompare.handle.border.width | --p-imagecompare-handle-border-width | Border width of handle |
|
|
102
|
+
| imagecompare.handle.border.radius | --p-imagecompare-handle-border-radius | Border radius of handle |
|
|
103
|
+
| imagecompare.handle.transition.duration | --p-imagecompare-handle-transition-duration | Transition duration of handle |
|
|
104
|
+
| imagecompare.handle.focus.ring.width | --p-imagecompare-handle-focus-ring-width | Focus ring width of handle |
|
|
105
|
+
| imagecompare.handle.focus.ring.style | --p-imagecompare-handle-focus-ring-style | Focus ring style of handle |
|
|
106
|
+
| imagecompare.handle.focus.ring.color | --p-imagecompare-handle-focus-ring-color | Focus ring color of handle |
|
|
107
|
+
| imagecompare.handle.focus.ring.offset | --p-imagecompare-handle-focus-ring-offset | Focus ring offset of handle |
|
|
108
|
+
| imagecompare.handle.focus.ring.shadow | --p-imagecompare-handle-focus-ring-shadow | Focus ring shadow of handle |
|