@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,738 @@
|
|
|
1
|
+
# InputPassword
|
|
2
|
+
|
|
3
|
+
InputPassword is an enhanced input for password entry with strength metering, mask toggling, and controlled or uncontrolled usage.
|
|
4
|
+
|
|
5
|
+
## Basic
|
|
6
|
+
|
|
7
|
+
InputPassword is used as a controlled input with v-model property.
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex justify-center">
|
|
12
|
+
<InputPassword v-model="value" />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { ref } from 'vue';
|
|
18
|
+
|
|
19
|
+
const value = ref('');
|
|
20
|
+
<\/script>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Toggle Mask
|
|
24
|
+
|
|
25
|
+
Adding a toggle icon to show or hide the password, allowing users to verify their input.
|
|
26
|
+
|
|
27
|
+
```vue
|
|
28
|
+
<template>
|
|
29
|
+
<div class="flex justify-center">
|
|
30
|
+
<IconField>
|
|
31
|
+
<InputPassword v-model="value" :mask="mask" />
|
|
32
|
+
<InputIcon class="cursor-pointer" @click="mask = !mask">
|
|
33
|
+
<Eye v-if="mask" />
|
|
34
|
+
<EyeSlash v-else />
|
|
35
|
+
</InputIcon>
|
|
36
|
+
</IconField>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup>
|
|
41
|
+
import Eye from '@primeicons/vue/eye';
|
|
42
|
+
import EyeSlash from '@primeicons/vue/eye-slash';
|
|
43
|
+
import { ref } from 'vue';
|
|
44
|
+
|
|
45
|
+
const value = ref('');
|
|
46
|
+
const mask = ref(true);
|
|
47
|
+
<\/script>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Requirements
|
|
51
|
+
|
|
52
|
+
Password requirements checklist with real-time validation feedback.
|
|
53
|
+
|
|
54
|
+
```vue
|
|
55
|
+
<template>
|
|
56
|
+
<div class="flex justify-center">
|
|
57
|
+
<div class="flex flex-col gap-2 w-64">
|
|
58
|
+
<InputPassword v-model="value" placeholder="Enter password" />
|
|
59
|
+
<ul class="flex flex-col gap-2 list-none ms-1 my-1 p-0">
|
|
60
|
+
<li v-for="req in requirements" :key="req.id" class="flex items-center gap-2 text-sm transition-all duration-300">
|
|
61
|
+
<CheckCircle :class="['transition-all duration-300 ease-out', req.test(value) ? 'text-green-500 scale-110 opacity-100' : 'text-surface-400 scale-90 opacity-70']" />
|
|
62
|
+
<span :class="['transition-all duration-300 ease-out', req.test(value) ? 'text-green-700 dark:text-green-400 line-through decoration-2 decoration-green-500/70' : 'text-surface-700 dark:text-surface-300 dark:opacity-70']">
|
|
63
|
+
{{ req.label }}
|
|
64
|
+
</span>
|
|
65
|
+
</li>
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script setup>
|
|
72
|
+
import CheckCircle from '@primeicons/vue/check-circle';
|
|
73
|
+
import { ref } from 'vue';
|
|
74
|
+
|
|
75
|
+
const value = ref('');
|
|
76
|
+
const requirements = [
|
|
77
|
+
{ id: 'minLength', label: 'At least 12 characters', test: (v) => v.length >= 12 },
|
|
78
|
+
{ id: 'uppercase', label: 'Contains uppercase letter', test: (v) => /[A-Z]/.test(v) },
|
|
79
|
+
{ id: 'lowercase', label: 'Contains lowercase letter', test: (v) => /[a-z]/.test(v) },
|
|
80
|
+
{ id: 'number', label: 'Contains number', test: (v) => /[0-9]/.test(v) },
|
|
81
|
+
{ id: 'symbol', label: 'Contains special character', test: (v) => /[^a-zA-Z0-9]/.test(v) }
|
|
82
|
+
];
|
|
83
|
+
<\/script>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Strength Meter
|
|
87
|
+
|
|
88
|
+
Visualize the overall password strength with an animated progress bar and a severity-based label that adapts as the password improves.
|
|
89
|
+
|
|
90
|
+
```vue
|
|
91
|
+
<template>
|
|
92
|
+
<div class="flex justify-center">
|
|
93
|
+
<div class="flex flex-col gap-2 w-64">
|
|
94
|
+
<InputPassword v-model="value" placeholder="Enter password" />
|
|
95
|
+
<div class="flex flex-col gap-2" :style="{ visibility: info ? 'visible' : 'hidden' }">
|
|
96
|
+
<ProgressBar :value="info?.percent ?? 0" :show-value="false" :pt="{ value: { style: { backgroundColor: info?.color } } }" style="height: 6px" />
|
|
97
|
+
<div class="flex justify-end">
|
|
98
|
+
<Tag :severity="info?.severity ?? 'info'" :value="info?.label ?? '—'" />
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</template>
|
|
104
|
+
|
|
105
|
+
<script setup>
|
|
106
|
+
import { computed, ref } from 'vue';
|
|
107
|
+
|
|
108
|
+
const strengthMap = {
|
|
109
|
+
weak: { label: 'Weak', percent: 25, color: 'var(--p-red-400)', severity: 'danger' },
|
|
110
|
+
medium: { label: 'Medium', percent: 50, color: 'var(--p-amber-400)', severity: 'warn' },
|
|
111
|
+
strong: { label: 'Strong', percent: 75, color: 'var(--p-blue-400)', severity: 'info' },
|
|
112
|
+
'very-strong': { label: 'Very Strong', percent: 100, color: 'var(--p-emerald-400)', severity: 'success' }
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
function getStrength(value) {
|
|
116
|
+
if (!value) return null;
|
|
117
|
+
|
|
118
|
+
let score = 0;
|
|
119
|
+
|
|
120
|
+
if (value.length >= 8) score++;
|
|
121
|
+
if (value.length >= 12) score++;
|
|
122
|
+
if (/[A-Z]/.test(value) && /[a-z]/.test(value)) score++;
|
|
123
|
+
if (/[0-9]/.test(value)) score++;
|
|
124
|
+
if (/[^a-zA-Z0-9]/.test(value)) score++;
|
|
125
|
+
|
|
126
|
+
if (score <= 1) return 'weak';
|
|
127
|
+
else if (score <= 2) return 'medium';
|
|
128
|
+
else if (score <= 3) return 'strong';
|
|
129
|
+
|
|
130
|
+
return 'very-strong';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const value = ref('');
|
|
134
|
+
const info = computed(() => {
|
|
135
|
+
const level = getStrength(value.value);
|
|
136
|
+
|
|
137
|
+
return level ? strengthMap[level] : null;
|
|
138
|
+
});
|
|
139
|
+
<\/script>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Popover
|
|
143
|
+
|
|
144
|
+
Combine a visibility toggle, strength meter, and requirements checklist into a fully custom password creation with Popover component.
|
|
145
|
+
|
|
146
|
+
```vue
|
|
147
|
+
<template>
|
|
148
|
+
<div class="flex justify-center">
|
|
149
|
+
<div class="flex flex-col gap-2">
|
|
150
|
+
<IconField>
|
|
151
|
+
<InputPassword v-model="value" :mask="mask" placeholder="Create a password" @focus="onFocus" @blur="onBlur" />
|
|
152
|
+
<InputIcon class="cursor-pointer" @click="mask = !mask">
|
|
153
|
+
<Eye v-if="mask" />
|
|
154
|
+
<EyeSlash v-else />
|
|
155
|
+
</InputIcon>
|
|
156
|
+
</IconField>
|
|
157
|
+
<Popover ref="op">
|
|
158
|
+
<div class="flex flex-col gap-3 w-72">
|
|
159
|
+
<div class="flex items-center justify-between">
|
|
160
|
+
<div class="flex items-center gap-2">
|
|
161
|
+
<Shield style="width: 1.25rem; height: 1.25rem" />
|
|
162
|
+
<span class="font-semibold text-sm">Password Strength</span>
|
|
163
|
+
</div>
|
|
164
|
+
<Tag :severity="severity" :value="label || '—'" :style="{ visibility: label ? 'visible' : 'hidden' }" />
|
|
165
|
+
</div>
|
|
166
|
+
<ProgressBar :value="score" :show-value="false" :pt="{ value: { style: { backgroundColor: color } } }" style="height: 6px" />
|
|
167
|
+
<ul class="flex flex-col gap-2 list-none m-0 p-0">
|
|
168
|
+
<li v-for="rule in rules" :key="rule.id" class="flex items-center gap-2 text-xs">
|
|
169
|
+
<Check v-if="rule.test(value)" class="text-green-500" />
|
|
170
|
+
<Times v-else class="text-red-400" />
|
|
171
|
+
<span :class="rule.test(value) ? 'text-surface-500' : 'text-surface-700'">{{ rule.label }}</span>
|
|
172
|
+
</li>
|
|
173
|
+
</ul>
|
|
174
|
+
</div>
|
|
175
|
+
</Popover>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<script setup>
|
|
181
|
+
import Check from '@primeicons/vue/check';
|
|
182
|
+
import Eye from '@primeicons/vue/eye';
|
|
183
|
+
import EyeSlash from '@primeicons/vue/eye-slash';
|
|
184
|
+
import Shield from '@primeicons/vue/shield';
|
|
185
|
+
import Times from '@primeicons/vue/times';
|
|
186
|
+
import { computed, ref } from 'vue';
|
|
187
|
+
|
|
188
|
+
const rules = [
|
|
189
|
+
{ id: 'length', label: 'At least 12 characters long', test: (v) => v.length >= 12, weight: 20 },
|
|
190
|
+
{ id: 'uppercase', label: 'Contains uppercase letter', test: (v) => /[A-Z]/.test(v), weight: 20 },
|
|
191
|
+
{ id: 'lowercase', label: 'Contains lowercase letter', test: (v) => /[a-z]/.test(v), weight: 20 },
|
|
192
|
+
{ id: 'number', label: 'Contains number', test: (v) => /[0-9]/.test(v), weight: 20 },
|
|
193
|
+
{ id: 'special', label: 'Contains special character (!@#$...)', test: (v) => /[^a-zA-Z0-9]/.test(v), weight: 20 }
|
|
194
|
+
];
|
|
195
|
+
|
|
196
|
+
const value = ref('');
|
|
197
|
+
const mask = ref(true);
|
|
198
|
+
const op = ref();
|
|
199
|
+
|
|
200
|
+
const score = computed(() => {
|
|
201
|
+
if (!value.value) return 0;
|
|
202
|
+
|
|
203
|
+
return rules.reduce((acc, rule) => acc + (rule.test(value.value) ? rule.weight : 0), 0);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
const severity = computed(() => {
|
|
207
|
+
if (score.value <= 20) return 'danger';
|
|
208
|
+
if (score.value <= 40) return 'warn';
|
|
209
|
+
if (score.value <= 60) return 'info';
|
|
210
|
+
|
|
211
|
+
return 'success';
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
const color = computed(() => {
|
|
215
|
+
switch (severity.value) {
|
|
216
|
+
case 'danger':
|
|
217
|
+
return 'var(--p-red-500)';
|
|
218
|
+
case 'warn':
|
|
219
|
+
return 'var(--p-amber-500)';
|
|
220
|
+
case 'info':
|
|
221
|
+
return 'var(--p-blue-500)';
|
|
222
|
+
default:
|
|
223
|
+
return 'var(--p-green-500)';
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
const label = computed(() => {
|
|
228
|
+
if (score.value === 0) return '';
|
|
229
|
+
if (score.value <= 20) return 'Too Weak';
|
|
230
|
+
if (score.value <= 40) return 'Weak';
|
|
231
|
+
if (score.value <= 60) return 'Fair';
|
|
232
|
+
if (score.value <= 80) return 'Strong';
|
|
233
|
+
|
|
234
|
+
return 'Very Strong';
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
const onFocus = (event) => op.value.show(event);
|
|
238
|
+
const onBlur = () => op.value.hide();
|
|
239
|
+
<\/script>
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Float Label
|
|
243
|
+
|
|
244
|
+
FloatLabel visually integrates a label with its form element. Visit FloatLabel documentation for more information.
|
|
245
|
+
|
|
246
|
+
```vue
|
|
247
|
+
<template>
|
|
248
|
+
<div class="flex flex-wrap justify-center items-end gap-4">
|
|
249
|
+
<FloatLabel>
|
|
250
|
+
<InputPassword id="over_label" v-model="value1" autocomplete="off" />
|
|
251
|
+
<label for="over_label">Password</label>
|
|
252
|
+
</FloatLabel>
|
|
253
|
+
|
|
254
|
+
<FloatLabel variant="in">
|
|
255
|
+
<InputPassword id="in_label" v-model="value2" autocomplete="off" />
|
|
256
|
+
<label for="in_label">Password</label>
|
|
257
|
+
</FloatLabel>
|
|
258
|
+
|
|
259
|
+
<FloatLabel variant="on">
|
|
260
|
+
<InputPassword id="on_label" v-model="value3" autocomplete="off" />
|
|
261
|
+
<label for="on_label">Password</label>
|
|
262
|
+
</FloatLabel>
|
|
263
|
+
</div>
|
|
264
|
+
</template>
|
|
265
|
+
|
|
266
|
+
<script setup>
|
|
267
|
+
import { ref } from 'vue';
|
|
268
|
+
|
|
269
|
+
const value1 = ref(null);
|
|
270
|
+
const value2 = ref(null);
|
|
271
|
+
const value3 = ref(null);
|
|
272
|
+
<\/script>
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## Ifta Label
|
|
276
|
+
|
|
277
|
+
IftaLabel is used to create infield top aligned labels. Visit IftaLabel documentation for more information.
|
|
278
|
+
|
|
279
|
+
```vue
|
|
280
|
+
<template>
|
|
281
|
+
<div class="flex justify-center">
|
|
282
|
+
<IftaLabel>
|
|
283
|
+
<InputPassword id="password" v-model="value" variant="filled" autocomplete="off" />
|
|
284
|
+
<label for="password">Password</label>
|
|
285
|
+
</IftaLabel>
|
|
286
|
+
</div>
|
|
287
|
+
</template>
|
|
288
|
+
|
|
289
|
+
<script setup>
|
|
290
|
+
import { ref } from 'vue';
|
|
291
|
+
|
|
292
|
+
const value = ref(null);
|
|
293
|
+
<\/script>
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
## Clear Icon
|
|
297
|
+
|
|
298
|
+
Use a custom clear action to reset the password input.
|
|
299
|
+
|
|
300
|
+
```vue
|
|
301
|
+
<template>
|
|
302
|
+
<div class="flex justify-center">
|
|
303
|
+
<IconField>
|
|
304
|
+
<InputPassword v-model="value" class="w-56" />
|
|
305
|
+
<InputIcon v-if="value" class="cursor-pointer" @click="value = ''">
|
|
306
|
+
<Times />
|
|
307
|
+
</InputIcon>
|
|
308
|
+
</IconField>
|
|
309
|
+
</div>
|
|
310
|
+
</template>
|
|
311
|
+
|
|
312
|
+
<script setup>
|
|
313
|
+
import Times from '@primeicons/vue/times';
|
|
314
|
+
import { ref } from 'vue';
|
|
315
|
+
|
|
316
|
+
const value = ref('');
|
|
317
|
+
<\/script>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Fluid
|
|
321
|
+
|
|
322
|
+
Fluid spans the full width of the container.
|
|
323
|
+
|
|
324
|
+
```vue
|
|
325
|
+
<template>
|
|
326
|
+
<div>
|
|
327
|
+
<InputPassword v-model="value" fluid />
|
|
328
|
+
</div>
|
|
329
|
+
</template>
|
|
330
|
+
|
|
331
|
+
<script setup>
|
|
332
|
+
import { ref } from 'vue';
|
|
333
|
+
|
|
334
|
+
const value = ref('');
|
|
335
|
+
<\/script>
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
## Sizes
|
|
339
|
+
|
|
340
|
+
InputPassword provides small and large sizes as alternatives to the base.
|
|
341
|
+
|
|
342
|
+
```vue
|
|
343
|
+
<template>
|
|
344
|
+
<div class="flex flex-col items-center gap-4">
|
|
345
|
+
<InputPassword v-model="value1" size="small" placeholder="Small" />
|
|
346
|
+
<InputPassword v-model="value2" placeholder="Normal" />
|
|
347
|
+
<InputPassword v-model="value3" size="large" placeholder="Large" />
|
|
348
|
+
</div>
|
|
349
|
+
</template>
|
|
350
|
+
|
|
351
|
+
<script setup>
|
|
352
|
+
import { ref } from 'vue';
|
|
353
|
+
|
|
354
|
+
const value1 = ref('');
|
|
355
|
+
const value2 = ref('');
|
|
356
|
+
const value3 = ref('');
|
|
357
|
+
<\/script>
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## Filled
|
|
361
|
+
|
|
362
|
+
Specify the variant property as filled to display the component with a higher visual emphasis than the default outlined style.
|
|
363
|
+
|
|
364
|
+
```vue
|
|
365
|
+
<template>
|
|
366
|
+
<div class="flex justify-center">
|
|
367
|
+
<InputPassword v-model="value" variant="filled" />
|
|
368
|
+
</div>
|
|
369
|
+
</template>
|
|
370
|
+
|
|
371
|
+
<script setup>
|
|
372
|
+
import { ref } from 'vue';
|
|
373
|
+
|
|
374
|
+
const value = ref('');
|
|
375
|
+
<\/script>
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## Disabled
|
|
379
|
+
|
|
380
|
+
When disabled is present, the element cannot be edited and focused.
|
|
381
|
+
|
|
382
|
+
```vue
|
|
383
|
+
<template>
|
|
384
|
+
<div class="flex justify-center">
|
|
385
|
+
<InputPassword disabled placeholder="Disabled" />
|
|
386
|
+
</div>
|
|
387
|
+
</template>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
## Invalid
|
|
391
|
+
|
|
392
|
+
The invalid state is applied using the invalid property to indicate failed validation, which can be integrated with form validation.
|
|
393
|
+
|
|
394
|
+
```vue
|
|
395
|
+
<template>
|
|
396
|
+
<div class="flex flex-wrap justify-center gap-4">
|
|
397
|
+
<InputPassword v-model="value1" :invalid="!value1" placeholder="Password" />
|
|
398
|
+
<InputPassword v-model="value2" :invalid="!value2" variant="filled" placeholder="Password" />
|
|
399
|
+
</div>
|
|
400
|
+
</template>
|
|
401
|
+
|
|
402
|
+
<script setup>
|
|
403
|
+
import { ref } from 'vue';
|
|
404
|
+
|
|
405
|
+
const value1 = ref('');
|
|
406
|
+
const value2 = ref('');
|
|
407
|
+
<\/script>
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
## Forms
|
|
411
|
+
|
|
412
|
+
InputPassword integrates seamlessly with the PrimeVue Forms library. This example validates password strength and confirms the value matches.
|
|
413
|
+
|
|
414
|
+
```vue
|
|
415
|
+
<template>
|
|
416
|
+
<div class="flex justify-center">
|
|
417
|
+
<Form v-slot="$form" :resolver="resolver" :initialValues="initialValues" @submit="onFormSubmit" class="flex flex-col gap-4 w-full sm:w-72">
|
|
418
|
+
<div class="flex flex-col gap-1">
|
|
419
|
+
<InputPassword name="password" placeholder="New password" autocomplete="off" fluid />
|
|
420
|
+
<Message v-if="$form.password?.invalid" severity="error" size="small" variant="simple">{{ $form.password.error?.message }}</Message>
|
|
421
|
+
</div>
|
|
422
|
+
<div class="flex flex-col gap-1">
|
|
423
|
+
<InputPassword name="confirmPassword" placeholder="Confirm password" autocomplete="off" fluid />
|
|
424
|
+
<Message v-if="$form.confirmPassword?.invalid" severity="error" size="small" variant="simple">{{ $form.confirmPassword.error?.message }}</Message>
|
|
425
|
+
</div>
|
|
426
|
+
<Button type="submit" severity="secondary">Submit</Button>
|
|
427
|
+
</Form>
|
|
428
|
+
</div>
|
|
429
|
+
</template>
|
|
430
|
+
|
|
431
|
+
<script setup>
|
|
432
|
+
import { ref } from 'vue';
|
|
433
|
+
import { zodResolver } from '@primevue/forms/resolvers/zod';
|
|
434
|
+
import { useToast } from "primevue/usetoast";
|
|
435
|
+
import { z } from 'zod';
|
|
436
|
+
|
|
437
|
+
const toast = useToast();
|
|
438
|
+
const initialValues = ref({
|
|
439
|
+
password: '',
|
|
440
|
+
confirmPassword: ''
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
const resolver = ref(zodResolver(
|
|
444
|
+
z
|
|
445
|
+
.object({
|
|
446
|
+
password: z
|
|
447
|
+
.string()
|
|
448
|
+
.min(1, { message: 'Password is required.' })
|
|
449
|
+
.min(8, { message: 'Password must be at least 8 characters.' })
|
|
450
|
+
.regex(/[a-z]/, { message: 'Must contain a lowercase letter.' })
|
|
451
|
+
.regex(/[A-Z]/, { message: 'Must contain an uppercase letter.' })
|
|
452
|
+
.regex(/[0-9]/, { message: 'Must contain a number.' })
|
|
453
|
+
.regex(/[^a-zA-Z0-9]/, { message: 'Must contain a special character.' }),
|
|
454
|
+
confirmPassword: z.string().min(1, { message: 'Please confirm your password.' })
|
|
455
|
+
})
|
|
456
|
+
.refine((data) => data.password === data.confirmPassword, {
|
|
457
|
+
message: 'Passwords do not match.',
|
|
458
|
+
path: ['confirmPassword']
|
|
459
|
+
})
|
|
460
|
+
));
|
|
461
|
+
|
|
462
|
+
const onFormSubmit = ({ valid }) => {
|
|
463
|
+
if (valid) {
|
|
464
|
+
toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
<\/script>
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
## Accessibility
|
|
471
|
+
|
|
472
|
+
Screen Reader InputPassword is applied to a native input element so it implicitly includes any passed prop. Value to describe the component can either be provided via label tag combined with id prop or using aria-labelledby , aria-label props. Keyboard Support Key Function tab Moves focus to the input.
|
|
473
|
+
|
|
474
|
+
```vue
|
|
475
|
+
<template>
|
|
476
|
+
<label for="pwd1">Password</label>
|
|
477
|
+
<InputPassword id="pwd1" />
|
|
478
|
+
|
|
479
|
+
<span id="pwd2">Password</span>
|
|
480
|
+
<InputPassword aria-labelledby="pwd2" />
|
|
481
|
+
|
|
482
|
+
<InputPassword aria-label="Password" />
|
|
483
|
+
</template>
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
## Input Password API
|
|
487
|
+
|
|
488
|
+
### Props
|
|
489
|
+
|
|
490
|
+
| Name |Type |Default |Description |
|
|
491
|
+
| --- | --- | --- | --- |
|
|
492
|
+
| aria-activedescendant | string | - | Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. |
|
|
493
|
+
| aria-atomic | Booleanish | - | Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. |
|
|
494
|
+
| aria-autocomplete | "none" \| "inline" \| "list" \| "both" | - | Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. |
|
|
495
|
+
| aria-busy | Booleanish | - | Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. |
|
|
496
|
+
| aria-checked | Booleanish \| "mixed" | - | Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. |
|
|
497
|
+
| aria-colcount | Numberish | - | Defines the total number of columns in a table, grid, or treegrid. |
|
|
498
|
+
| aria-colindex | Numberish | - | Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. |
|
|
499
|
+
| aria-colspan | Numberish | - | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
500
|
+
| aria-controls | string | - | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
501
|
+
| aria-current | Booleanish \| "page" \| "step" \| "location" \| "date" \| "time" | - | Indicates the element that represents the current item within a container or set of related elements. |
|
|
502
|
+
| aria-describedby | string | - | Identifies the element (or elements) that describes the object. |
|
|
503
|
+
| aria-details | string | - | Identifies the element that provides a detailed, extended description for the object. |
|
|
504
|
+
| aria-disabled | Booleanish | - | Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. |
|
|
505
|
+
| aria-dropeffect | "link" \| "none" \| "copy" \| "execute" \| "move" \| "popup" | - | Indicates what functions can be performed when a dragged object is released on the drop target. |
|
|
506
|
+
| aria-errormessage | string | - | Identifies the element that provides an error message for the object. |
|
|
507
|
+
| aria-expanded | Booleanish | - | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. |
|
|
508
|
+
| aria-flowto | string | - | Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. |
|
|
509
|
+
| aria-grabbed | Booleanish | - | Indicates an element's "grabbed" state in a drag-and-drop operation. |
|
|
510
|
+
| aria-haspopup | Booleanish \| "menu" \| "listbox" \| "tree" \| "grid" \| "dialog" | - | Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. |
|
|
511
|
+
| aria-hidden | Booleanish | - | Indicates whether the element is exposed to an accessibility API. |
|
|
512
|
+
| aria-invalid | Booleanish \| "grammar" \| "spelling" | - | Indicates the entered value does not conform to the format expected by the application. |
|
|
513
|
+
| aria-keyshortcuts | string | - | Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. |
|
|
514
|
+
| aria-label | string | - | Defines a string value that labels the current element. |
|
|
515
|
+
| aria-labelledby | string | - | Identifies the element (or elements) that labels the current element. |
|
|
516
|
+
| aria-level | Numberish | - | Defines the hierarchical level of an element within a structure. |
|
|
517
|
+
| aria-live | "off" \| "assertive" \| "polite" | - | Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. |
|
|
518
|
+
| aria-modal | Booleanish | - | Indicates whether an element is modal when displayed. |
|
|
519
|
+
| aria-multiline | Booleanish | - | Indicates whether a text box accepts multiple lines of input or only a single line. |
|
|
520
|
+
| aria-multiselectable | Booleanish | - | Indicates that the user may select more than one item from the current selectable descendants. |
|
|
521
|
+
| aria-orientation | "horizontal" \| "vertical" | - | Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. |
|
|
522
|
+
| aria-owns | string | - | Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. |
|
|
523
|
+
| aria-placeholder | string | - | Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. |
|
|
524
|
+
| aria-posinset | Numberish | - | Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. |
|
|
525
|
+
| aria-pressed | Booleanish \| "mixed" | - | Indicates the current "pressed" state of toggle buttons. |
|
|
526
|
+
| aria-readonly | Booleanish | - | Indicates that the element is not editable, but is otherwise operable. |
|
|
527
|
+
| aria-relevant | "text" \| "additions" \| "additions removals" \| "additions text" \| "all" \| "removals" \| "removals additions" \| "removals text" \| "text additions" \| "text removals" | - | Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. |
|
|
528
|
+
| aria-required | Booleanish | - | Indicates that user input is required on the element before a form may be submitted. |
|
|
529
|
+
| aria-roledescription | string | - | Defines a human-readable, author-localized description for the role of an element. |
|
|
530
|
+
| aria-rowcount | Numberish | - | Defines the total number of rows in a table, grid, or treegrid. |
|
|
531
|
+
| aria-rowindex | Numberish | - | Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. |
|
|
532
|
+
| aria-rowspan | Numberish | - | Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
533
|
+
| aria-selected | Booleanish | - | Indicates the current "selected" state of various widgets. |
|
|
534
|
+
| aria-setsize | Numberish | - | Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. |
|
|
535
|
+
| aria-sort | "none" \| "ascending" \| "descending" \| "other" | - | Indicates if items in a table or grid are sorted in ascending or descending order. |
|
|
536
|
+
| aria-valuemax | Numberish | - | Defines the maximum allowed value for a range widget. |
|
|
537
|
+
| aria-valuemin | Numberish | - | Defines the minimum allowed value for a range widget. |
|
|
538
|
+
| aria-valuenow | Numberish | - | Defines the current value for a range widget. |
|
|
539
|
+
| aria-valuetext | string | - | Defines the human readable text alternative of aria-valuenow for a range widget. |
|
|
540
|
+
| innerHTML | string | - | |
|
|
541
|
+
| class | ClassValue | - | |
|
|
542
|
+
| style | StyleValue | - | |
|
|
543
|
+
| accesskey | string | - | |
|
|
544
|
+
| contenteditable | Booleanish \| "inherit" \| "plaintext-only" | - | |
|
|
545
|
+
| contextmenu | string | - | |
|
|
546
|
+
| dir | string | - | |
|
|
547
|
+
| draggable | Booleanish | - | |
|
|
548
|
+
| enterkeyhint | "enter" \| "done" \| "go" \| "next" \| "previous" \| "search" \| "send" | - | |
|
|
549
|
+
| enterKeyHint | "enter" \| "done" \| "go" \| "next" \| "previous" \| "search" \| "send" | - | |
|
|
550
|
+
| hidden | "" \| Booleanish \| "hidden" \| "until-found" | - | |
|
|
551
|
+
| id | string | - | |
|
|
552
|
+
| inert | Booleanish | - | |
|
|
553
|
+
| lang | string | - | |
|
|
554
|
+
| spellcheck | Booleanish | - | |
|
|
555
|
+
| tabindex | Numberish | - | |
|
|
556
|
+
| title | string | - | |
|
|
557
|
+
| translate | "yes" \| "no" | - | |
|
|
558
|
+
| radiogroup | string | - | |
|
|
559
|
+
| role | string | - | |
|
|
560
|
+
| about | string | - | |
|
|
561
|
+
| datatype | string | - | |
|
|
562
|
+
| inlist | any | - | |
|
|
563
|
+
| prefix | string | - | |
|
|
564
|
+
| property | string | - | |
|
|
565
|
+
| resource | string | - | |
|
|
566
|
+
| typeof | string | - | |
|
|
567
|
+
| vocab | string | - | |
|
|
568
|
+
| autocapitalize | string | - | |
|
|
569
|
+
| autocorrect | string | - | |
|
|
570
|
+
| autosave | string | - | |
|
|
571
|
+
| color | string | - | |
|
|
572
|
+
| itemprop | string | - | |
|
|
573
|
+
| itemscope | Booleanish | - | |
|
|
574
|
+
| itemtype | string | - | |
|
|
575
|
+
| itemid | string | - | |
|
|
576
|
+
| itemref | string | - | |
|
|
577
|
+
| results | Numberish | - | |
|
|
578
|
+
| security | string | - | |
|
|
579
|
+
| unselectable | "on" \| "off" | - | |
|
|
580
|
+
| inputmode | "text" \| "search" \| "none" \| "tel" \| "url" \| "email" \| "numeric" \| "decimal" | - | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
581
|
+
| is | string | - | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
582
|
+
| exportparts | string | - | |
|
|
583
|
+
| part | string | - | |
|
|
584
|
+
| accept | string | - | |
|
|
585
|
+
| alt | string | - | |
|
|
586
|
+
| autocomplete | InputAutoCompleteAttribute | - | |
|
|
587
|
+
| autofocus | Booleanish | - | |
|
|
588
|
+
| capture | boolean \| "user" \| "environment" | - | |
|
|
589
|
+
| checked | any[] \| Set<any> \| Booleanish | - | |
|
|
590
|
+
| crossorigin | string | - | |
|
|
591
|
+
| form | string | - | |
|
|
592
|
+
| formaction | string | - | |
|
|
593
|
+
| formenctype | string | - | |
|
|
594
|
+
| formmethod | string | - | |
|
|
595
|
+
| formnovalidate | Booleanish | - | |
|
|
596
|
+
| formtarget | string | - | |
|
|
597
|
+
| height | Numberish | - | |
|
|
598
|
+
| indeterminate | boolean | - | |
|
|
599
|
+
| list | string | - | |
|
|
600
|
+
| max | Numberish | - | |
|
|
601
|
+
| maxlength | Numberish | - | |
|
|
602
|
+
| min | Numberish | - | |
|
|
603
|
+
| minlength | Numberish | - | |
|
|
604
|
+
| multiple | Booleanish | - | |
|
|
605
|
+
| pattern | string | - | |
|
|
606
|
+
| placeholder | string | - | |
|
|
607
|
+
| readonly | Booleanish | - | |
|
|
608
|
+
| required | Booleanish | - | |
|
|
609
|
+
| src | string | - | |
|
|
610
|
+
| step | Numberish | - | |
|
|
611
|
+
| type | InputTypeHTMLAttribute | - | |
|
|
612
|
+
| value | any | - | |
|
|
613
|
+
| width | Numberish | - | |
|
|
614
|
+
| onCancel | Function | - | |
|
|
615
|
+
| onCopy | Function | - | |
|
|
616
|
+
| onCut | Function | - | |
|
|
617
|
+
| onPaste | Function | - | |
|
|
618
|
+
| onCompositionend | Function | - | |
|
|
619
|
+
| onCompositionstart | Function | - | |
|
|
620
|
+
| onCompositionupdate | Function | - | |
|
|
621
|
+
| onDrag | Function | - | |
|
|
622
|
+
| onDragend | Function | - | |
|
|
623
|
+
| onDragenter | Function | - | |
|
|
624
|
+
| onDragexit | Function | - | |
|
|
625
|
+
| onDragleave | Function | - | |
|
|
626
|
+
| onDragover | Function | - | |
|
|
627
|
+
| onDragstart | Function | - | |
|
|
628
|
+
| onDrop | Function | - | |
|
|
629
|
+
| onFocus | Function | - | |
|
|
630
|
+
| onFocusin | Function | - | |
|
|
631
|
+
| onFocusout | Function | - | |
|
|
632
|
+
| onBlur | Function | - | |
|
|
633
|
+
| onChange | Function | - | |
|
|
634
|
+
| onBeforeinput | Function | - | |
|
|
635
|
+
| onFormdata | Function | - | |
|
|
636
|
+
| onInput | Function | - | |
|
|
637
|
+
| onReset | Function | - | |
|
|
638
|
+
| onSubmit | Function | - | |
|
|
639
|
+
| onInvalid | Function | - | |
|
|
640
|
+
| onFullscreenchange | Function | - | |
|
|
641
|
+
| onFullscreenerror | Function | - | |
|
|
642
|
+
| onLoad | Function | - | |
|
|
643
|
+
| onError | Function | - | |
|
|
644
|
+
| onKeydown | Function | - | |
|
|
645
|
+
| onKeypress | Function | - | |
|
|
646
|
+
| onKeyup | Function | - | |
|
|
647
|
+
| onDblclick | Function | - | |
|
|
648
|
+
| onMousedown | Function | - | |
|
|
649
|
+
| onMouseenter | Function | - | |
|
|
650
|
+
| onMouseleave | Function | - | |
|
|
651
|
+
| onMousemove | Function | - | |
|
|
652
|
+
| onMouseout | Function | - | |
|
|
653
|
+
| onMouseover | Function | - | |
|
|
654
|
+
| onMouseup | Function | - | |
|
|
655
|
+
| onAbort | Function | - | |
|
|
656
|
+
| onCanplay | Function | - | |
|
|
657
|
+
| onCanplaythrough | Function | - | |
|
|
658
|
+
| onDurationchange | Function | - | |
|
|
659
|
+
| onEmptied | Function | - | |
|
|
660
|
+
| onEncrypted | Function | - | |
|
|
661
|
+
| onEnded | Function | - | |
|
|
662
|
+
| onLoadeddata | Function | - | |
|
|
663
|
+
| onLoadedmetadata | Function | - | |
|
|
664
|
+
| onLoadstart | Function | - | |
|
|
665
|
+
| onPause | Function | - | |
|
|
666
|
+
| onPlay | Function | - | |
|
|
667
|
+
| onPlaying | Function | - | |
|
|
668
|
+
| onProgress | Function | - | |
|
|
669
|
+
| onRatechange | Function | - | |
|
|
670
|
+
| onSeeked | Function | - | |
|
|
671
|
+
| onSeeking | Function | - | |
|
|
672
|
+
| onStalled | Function | - | |
|
|
673
|
+
| onSuspend | Function | - | |
|
|
674
|
+
| onTimeupdate | Function | - | |
|
|
675
|
+
| onVolumechange | Function | - | |
|
|
676
|
+
| onWaiting | Function | - | |
|
|
677
|
+
| onSelect | Function | - | |
|
|
678
|
+
| onScroll | Function | - | |
|
|
679
|
+
| onScrollend | Function | - | |
|
|
680
|
+
| onTouchcancel | Function | - | |
|
|
681
|
+
| onTouchend | Function | - | |
|
|
682
|
+
| onTouchmove | Function | - | |
|
|
683
|
+
| onTouchstart | Function | - | |
|
|
684
|
+
| onAuxclick | Function | - | |
|
|
685
|
+
| onClick | Function | - | |
|
|
686
|
+
| onContextmenu | Function | - | |
|
|
687
|
+
| onGotpointercapture | Function | - | |
|
|
688
|
+
| onLostpointercapture | Function | - | |
|
|
689
|
+
| onPointerdown | Function | - | |
|
|
690
|
+
| onPointermove | Function | - | |
|
|
691
|
+
| onPointerup | Function | - | |
|
|
692
|
+
| onPointercancel | Function | - | |
|
|
693
|
+
| onPointerenter | Function | - | |
|
|
694
|
+
| onPointerleave | Function | - | |
|
|
695
|
+
| onPointerover | Function | - | |
|
|
696
|
+
| onPointerout | Function | - | |
|
|
697
|
+
| onBeforetoggle | Function | - | |
|
|
698
|
+
| onToggle | Function | - | |
|
|
699
|
+
| onWheel | Function | - | |
|
|
700
|
+
| onAnimationcancel | Function | - | |
|
|
701
|
+
| onAnimationstart | Function | - | |
|
|
702
|
+
| onAnimationend | Function | - | |
|
|
703
|
+
| onAnimationiteration | Function | - | |
|
|
704
|
+
| onSecuritypolicyviolation | Function | - | |
|
|
705
|
+
| onTransitioncancel | Function | - | |
|
|
706
|
+
| onTransitionend | Function | - | |
|
|
707
|
+
| onTransitionrun | Function | - | |
|
|
708
|
+
| onTransitionstart | Function | - | |
|
|
709
|
+
| modelValue | Nullable<string> | - | Value of the component. |
|
|
710
|
+
| defaultValue | Nullable<string> | - | The default value for the input when not controlled by `modelValue` . |
|
|
711
|
+
| name | string | - | The name attribute for the element, typically used in form submissions. |
|
|
712
|
+
| mask | boolean | true | Whether the password is rendered as masked. Use `v-model:mask` to make it two-way bindable. |
|
|
713
|
+
| size | null \| HintedString<"small" \| "large"> | - | Defines the size of the component. |
|
|
714
|
+
| invalid | null \| boolean | false | When present, it specifies that the component should have invalid state style. |
|
|
715
|
+
| disabled | boolean | false | When present, it specifies that the component should be disabled. |
|
|
716
|
+
| variant | null \| HintedString<"outlined" \| "filled"> | null | Specifies the input variant of the component. |
|
|
717
|
+
| fluid | null \| boolean | null | Spans 100% width of the container when enabled. |
|
|
718
|
+
| formControl | Record<string, any> | - | Form control object, typically used for handling validation and form state. |
|
|
719
|
+
| dt | any | - | It generates scoped CSS variables using design tokens for the component. |
|
|
720
|
+
| pt | PassThrough<InputPasswordPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
|
|
721
|
+
| ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
|
|
722
|
+
| unstyled | boolean | false | When enabled, it removes component related styles in the core. |
|
|
723
|
+
|
|
724
|
+
### Pass Through Options
|
|
725
|
+
|
|
726
|
+
| Name |Type |Description |
|
|
727
|
+
| --- | --- | --- |
|
|
728
|
+
| root | InputPasswordPassThroughOptionType | Used to pass attributes to the root's DOM element. |
|
|
729
|
+
| pcInputText | any | Used to pass attributes to the InputText component. |
|
|
730
|
+
| hooks | any | Used to manage all lifecycle hooks. |
|
|
731
|
+
|
|
732
|
+
### Theming
|
|
733
|
+
|
|
734
|
+
### CSS Classes
|
|
735
|
+
|
|
736
|
+
| Class |Description |
|
|
737
|
+
| --- | --- |
|
|
738
|
+
| p-inputpassword | Class name of the root element |
|