@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.
Files changed (173) hide show
  1. package/LICENSE.md +45 -21
  2. package/README.md +48 -250
  3. package/data/components.json +47269 -0
  4. package/data/llms/components/accordion.md +629 -0
  5. package/data/llms/components/animateonscroll.md +165 -0
  6. package/data/llms/components/autocomplete.md +995 -0
  7. package/data/llms/components/avatar.md +264 -0
  8. package/data/llms/components/badge.md +200 -0
  9. package/data/llms/components/blockui.md +99 -0
  10. package/data/llms/components/breadcrumb.md +269 -0
  11. package/data/llms/components/button.md +902 -0
  12. package/data/llms/components/card.md +209 -0
  13. package/data/llms/components/carousel.md +506 -0
  14. package/data/llms/components/cascadeselect.md +1207 -0
  15. package/data/llms/components/chart.md +1022 -0
  16. package/data/llms/components/checkbox.md +401 -0
  17. package/data/llms/components/chip.md +206 -0
  18. package/data/llms/components/colorpicker.md +213 -0
  19. package/data/llms/components/commandmenu.md +660 -0
  20. package/data/llms/components/compare.md +407 -0
  21. package/data/llms/components/confirmdialog.md +343 -0
  22. package/data/llms/components/confirmpopup.md +252 -0
  23. package/data/llms/components/contextmenu.md +522 -0
  24. package/data/llms/components/datatable.md +5266 -0
  25. package/data/llms/components/dataview.md +569 -0
  26. package/data/llms/components/datepicker.md +964 -0
  27. package/data/llms/components/deferredcontent.md +96 -0
  28. package/data/llms/components/dialog.md +702 -0
  29. package/data/llms/components/divider.md +152 -0
  30. package/data/llms/components/dock.md +488 -0
  31. package/data/llms/components/drawer.md +469 -0
  32. package/data/llms/components/dynamicdialog.md +214 -0
  33. package/data/llms/components/editor.md +205 -0
  34. package/data/llms/components/fieldset.md +253 -0
  35. package/data/llms/components/fileupload.md +459 -0
  36. package/data/llms/components/floatlabel.md +144 -0
  37. package/data/llms/components/fluid.md +104 -0
  38. package/data/llms/components/focustrap.md +59 -0
  39. package/data/llms/components/forms.md +344 -0
  40. package/data/llms/components/galleria.md +1119 -0
  41. package/data/llms/components/gallery.md +1003 -0
  42. package/data/llms/components/iconfield.md +283 -0
  43. package/data/llms/components/iftalabel.md +96 -0
  44. package/data/llms/components/image.md +179 -0
  45. package/data/llms/components/imagecompare.md +108 -0
  46. package/data/llms/components/inplace.md +183 -0
  47. package/data/llms/components/inputcolor.md +869 -0
  48. package/data/llms/components/inputgroup.md +419 -0
  49. package/data/llms/components/inputmask.md +345 -0
  50. package/data/llms/components/inputnumber.md +551 -0
  51. package/data/llms/components/inputotp.md +345 -0
  52. package/data/llms/components/inputpassword.md +738 -0
  53. package/data/llms/components/inputtags.md +432 -0
  54. package/data/llms/components/inputtext.md +569 -0
  55. package/data/llms/components/installation.md +1 -0
  56. package/data/llms/components/keyfilter.md +116 -0
  57. package/data/llms/components/knob.md +318 -0
  58. package/data/llms/components/label.md +151 -0
  59. package/data/llms/components/laravel.md +53 -0
  60. package/data/llms/components/listbox.md +636 -0
  61. package/data/llms/components/mask.md +203 -0
  62. package/data/llms/components/mcp.md +39 -0
  63. package/data/llms/components/megamenu.md +563 -0
  64. package/data/llms/components/menu.md +651 -0
  65. package/data/llms/components/menubar.md +446 -0
  66. package/data/llms/components/message.md +497 -0
  67. package/data/llms/components/metergroup.md +281 -0
  68. package/data/llms/components/multiselect.md +752 -0
  69. package/data/llms/components/orderlist.md +224 -0
  70. package/data/llms/components/organizationchart.md +418 -0
  71. package/data/llms/components/paginator.md +221 -0
  72. package/data/llms/components/panel.md +321 -0
  73. package/data/llms/components/panelmenu.md +703 -0
  74. package/data/llms/components/password.md +657 -0
  75. package/data/llms/components/picklist.md +286 -0
  76. package/data/llms/components/popover.md +145 -0
  77. package/data/llms/components/progressbar.md +242 -0
  78. package/data/llms/components/progressspinner.md +104 -0
  79. package/data/llms/components/radiobutton.md +427 -0
  80. package/data/llms/components/rating.md +312 -0
  81. package/data/llms/components/ripple.md +91 -0
  82. package/data/llms/components/scrollarea.md +700 -0
  83. package/data/llms/components/scrollpanel.md +131 -0
  84. package/data/llms/components/scrolltop.md +87 -0
  85. package/data/llms/components/select.md +1251 -0
  86. package/data/llms/components/selectbutton.md +268 -0
  87. package/data/llms/components/sidebar.md +2232 -0
  88. package/data/llms/components/skeleton.md +302 -0
  89. package/data/llms/components/slider.md +416 -0
  90. package/data/llms/components/speeddial.md +402 -0
  91. package/data/llms/components/splitbutton.md +840 -0
  92. package/data/llms/components/splitter.md +447 -0
  93. package/data/llms/components/stepper.md +551 -0
  94. package/data/llms/components/styleclass.md +226 -0
  95. package/data/llms/components/tabs.md +609 -0
  96. package/data/llms/components/tag.md +178 -0
  97. package/data/llms/components/terminal.md +123 -0
  98. package/data/llms/components/textarea.md +519 -0
  99. package/data/llms/components/tieredmenu.md +578 -0
  100. package/data/llms/components/timeline.md +494 -0
  101. package/data/llms/components/toast.md +472 -0
  102. package/data/llms/components/togglebutton.md +276 -0
  103. package/data/llms/components/toggleswitch.md +271 -0
  104. package/data/llms/components/toolbar.md +140 -0
  105. package/data/llms/components/tooltip.md +160 -0
  106. package/data/llms/components/tree.md +1076 -0
  107. package/data/llms/components/treeselect.md +660 -0
  108. package/data/llms/components/treetable.md +2493 -0
  109. package/data/llms/components/virtualscroller.md +265 -0
  110. package/data/llms/guides/autoimport.md +28 -0
  111. package/data/llms/guides/cdn.md +72 -0
  112. package/data/llms/guides/configuration.md +158 -0
  113. package/data/llms/guides/customicons.md +67 -0
  114. package/data/llms/guides/guides/accessibility.md +27 -0
  115. package/data/llms/guides/guides/animations.md +119 -0
  116. package/data/llms/guides/guides/rtl.md +7 -0
  117. package/data/llms/guides/icons.md +136 -0
  118. package/data/llms/guides/installation.md +3 -0
  119. package/data/llms/guides/laravel.md +66 -0
  120. package/data/llms/guides/llms.md +15 -0
  121. package/data/llms/guides/mcp.md +104 -0
  122. package/data/llms/guides/migration/v4.md +15 -0
  123. package/data/llms/guides/migration/v5.md +15 -0
  124. package/data/llms/guides/nuxt.md +141 -0
  125. package/data/llms/guides/passthrough.md +137 -0
  126. package/data/llms/guides/primeclt.md +43 -0
  127. package/data/llms/guides/tailwind.md +151 -0
  128. package/data/llms/guides/theming/styled.md +497 -0
  129. package/data/llms/guides/theming/unstyled.md +57 -0
  130. package/data/llms/guides/uikit.md +3 -0
  131. package/data/llms/guides/vite.md +90 -0
  132. package/data/llms/llms-full.txt +54465 -0
  133. package/data/llms/llms.txt +132 -0
  134. package/data/llms/pages/accessibility.md +27 -0
  135. package/data/llms/pages/animations.md +119 -0
  136. package/data/llms/pages/autoimport.md +28 -0
  137. package/data/llms/pages/cdn.md +72 -0
  138. package/data/llms/pages/configuration.md +158 -0
  139. package/data/llms/pages/contribution.md +31 -0
  140. package/data/llms/pages/customicons.md +67 -0
  141. package/data/llms/pages/designer.md +79 -0
  142. package/data/llms/pages/dynamicimports.md +7 -0
  143. package/data/llms/pages/forms.md +63 -0
  144. package/data/llms/pages/guides/accessibility.md +27 -0
  145. package/data/llms/pages/guides/animations.md +119 -0
  146. package/data/llms/pages/guides/rtl.md +7 -0
  147. package/data/llms/pages/icons.md +136 -0
  148. package/data/llms/pages/installation.md +3 -0
  149. package/data/llms/pages/introduction.md +23 -0
  150. package/data/llms/pages/laravel.md +66 -0
  151. package/data/llms/pages/llms.md +15 -0
  152. package/data/llms/pages/mcp.md +104 -0
  153. package/data/llms/pages/migration/v4.md +15 -0
  154. package/data/llms/pages/migration/v5.md +15 -0
  155. package/data/llms/pages/nuxt.md +141 -0
  156. package/data/llms/pages/passthrough.md +137 -0
  157. package/data/llms/pages/primeclt.md +43 -0
  158. package/data/llms/pages/rtl.md +7 -0
  159. package/data/llms/pages/setup.md +3 -0
  160. package/data/llms/pages/styled.md +497 -0
  161. package/data/llms/pages/tailwind.md +151 -0
  162. package/data/llms/pages/theming/styled.md +497 -0
  163. package/data/llms/pages/theming/unstyled.md +57 -0
  164. package/data/llms/pages/uikit.md +3 -0
  165. package/data/llms/pages/unstyled.md +57 -0
  166. package/data/llms/pages/v4.md +15 -0
  167. package/data/llms/pages/v5.md +15 -0
  168. package/data/llms/pages/vite.md +90 -0
  169. package/data/manifest.json +11117 -0
  170. package/data/mcp-data.json +55940 -0
  171. package/dist/index.d.ts +17 -1
  172. package/dist/index.js +66066 -72541
  173. package/package.json +10 -12
@@ -0,0 +1,569 @@
1
+ # InputText
2
+
3
+ InputText is an extension to standard input element with icons and theming.
4
+
5
+ ## Basic
6
+
7
+ InputText is used with the v-model property for two-way value binding.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <InputText type="text" v-model="value" placeholder="Enter text" />
13
+ </div>
14
+ </template>
15
+
16
+ <script setup>
17
+ import { ref } from 'vue';
18
+
19
+ const value = ref(null);
20
+ <\/script>
21
+ ```
22
+
23
+ ## Clear Icon
24
+
25
+ Combine InputText with IconField to display a clear icon that resets the value when clicked.
26
+
27
+ ```vue
28
+ <template>
29
+ <div class="flex justify-center">
30
+ <IconField>
31
+ <InputText v-model="value" class="w-56" placeholder="Type something" />
32
+ <InputIcon v-if="value" class="cursor-pointer" @click="value = ''">
33
+ <Times />
34
+ </InputIcon>
35
+ </IconField>
36
+ </div>
37
+ </template>
38
+
39
+ <script setup>
40
+ import { ref } from 'vue';
41
+ import Times from '@primeicons/vue/times';
42
+
43
+ const value = ref('');
44
+ <\/script>
45
+ ```
46
+
47
+ ## Sizes
48
+
49
+ InputText provides small and large sizes as alternatives to the standard.
50
+
51
+ ```vue
52
+ <template>
53
+ <div class="flex flex-col items-center gap-4">
54
+ <InputText v-model="value1" type="text" size="small" placeholder="Small" />
55
+ <InputText v-model="value2" type="text" placeholder="Normal" />
56
+ <InputText v-model="value3" type="text" size="large" placeholder="Large" />
57
+ </div>
58
+ </template>
59
+
60
+ <script setup>
61
+ import { ref } from 'vue';
62
+
63
+ const value1 = ref(null);
64
+ const value2 = ref(null);
65
+ const value3 = ref(null);
66
+ <\/script>
67
+ ```
68
+
69
+ ## Filled
70
+
71
+ Specify the variant property as filled to display the component with a higher visual emphasis than the default outlined style.
72
+
73
+ ```vue
74
+ <template>
75
+ <div class="flex justify-center">
76
+ <InputText v-model="value" type="text" variant="filled" placeholder="Enter text" />
77
+ </div>
78
+ </template>
79
+
80
+ <script setup>
81
+ import { ref } from 'vue';
82
+
83
+ const value = ref(null);
84
+ <\/script>
85
+ ```
86
+
87
+ ## Invalid
88
+
89
+ The invalid state is applied using the invalid property to indicate failed validation, which can be integrated with form validation.
90
+
91
+ ```vue
92
+ <template>
93
+ <div class="flex flex-wrap justify-center gap-4">
94
+ <InputText v-model="value1" :invalid="!value1" placeholder="Enter text" />
95
+ <InputText v-model="value2" :invalid="!value2" variant="filled" placeholder="Enter text" />
96
+ </div>
97
+ </template>
98
+
99
+ <script setup>
100
+ import { ref } from 'vue';
101
+
102
+ const value1 = ref('');
103
+ const value2 = ref('');
104
+ <\/script>
105
+ ```
106
+
107
+ ## Disabled
108
+
109
+ When disabled is present, the element cannot be edited and focused.
110
+
111
+ ```vue
112
+ <template>
113
+ <div class="flex justify-center">
114
+ <InputText v-model="value" disabled placeholder="Disabled" />
115
+ </div>
116
+ </template>
117
+
118
+ <script setup>
119
+ import { ref } from 'vue';
120
+
121
+ const value = ref(null);
122
+ <\/script>
123
+ ```
124
+
125
+ ## Float Label
126
+
127
+ FloatLabel visually integrates a label with its form element. Visit FloatLabel documentation for more information.
128
+
129
+ ```vue
130
+ <template>
131
+ <div class="flex flex-wrap justify-center items-end gap-4">
132
+ <FloatLabel>
133
+ <InputText id="over_label" v-model="value1" />
134
+ <label for="over_label">Over Label</label>
135
+ </FloatLabel>
136
+
137
+ <FloatLabel variant="in">
138
+ <InputText id="in_label" v-model="value2" />
139
+ <label for="in_label">In Label</label>
140
+ </FloatLabel>
141
+
142
+ <FloatLabel variant="on">
143
+ <InputText id="on_label" v-model="value3" />
144
+ <label for="on_label">On Label</label>
145
+ </FloatLabel>
146
+ </div>
147
+ </template>
148
+
149
+ <script setup>
150
+ import { ref } from 'vue';
151
+
152
+ const value1 = ref(null);
153
+ const value2 = ref(null);
154
+ const value3 = ref(null);
155
+ <\/script>
156
+ ```
157
+
158
+ ## Ifta Label
159
+
160
+ IftaLabel is used to create infield top aligned labels. Visit IftaLabel documentation for more information.
161
+
162
+ ```vue
163
+ <template>
164
+ <div class="flex justify-center">
165
+ <IftaLabel>
166
+ <InputText id="username" v-model="value" />
167
+ <label for="username">Username</label>
168
+ </IftaLabel>
169
+ </div>
170
+ </template>
171
+
172
+ <script setup>
173
+ import { ref } from 'vue';
174
+
175
+ const value = ref(null);
176
+ <\/script>
177
+ ```
178
+
179
+ ## Fluid
180
+
181
+ The fluid prop makes the component take up the full width of its container when set to true.
182
+
183
+ ```vue
184
+ <template>
185
+ <div class="flex justify-center">
186
+ <InputText type="text" v-model="value" fluid />
187
+ </div>
188
+ </template>
189
+
190
+ <script setup>
191
+ import { ref } from 'vue';
192
+
193
+ const value = ref(null);
194
+ <\/script>
195
+ ```
196
+
197
+ ## Help Text
198
+
199
+ An advisory text can be defined with the semantic small tag.
200
+
201
+ ```vue
202
+ <template>
203
+ <div class="flex justify-center">
204
+ <div class="flex flex-col gap-2">
205
+ <Label for="username">Username</Label>
206
+ <InputText id="username" v-model="value" aria-describedby="username-help" />
207
+ <small id="username-help" class="text-sm">Enter your username to reset your password.</small>
208
+ </div>
209
+ </div>
210
+ </template>
211
+
212
+ <script setup>
213
+ import { ref } from 'vue';
214
+
215
+ const value = ref(null);
216
+ <\/script>
217
+ ```
218
+
219
+ ## Forms
220
+
221
+ InputText integrates seamlessly with the PrimeVue Forms library.
222
+
223
+ ```vue
224
+ <template>
225
+ <div class="flex justify-center">
226
+ <Form v-slot="$form" :resolver="resolver" :initialValues="initialValues" @submit="onFormSubmit" class="flex flex-col gap-4 w-full sm:w-56">
227
+ <div class="flex flex-col gap-1">
228
+ <InputText name="username" type="text" placeholder="Username" fluid />
229
+ <Message v-if="$form.username?.invalid" severity="error" size="small" variant="simple">{{ $form.username.error?.message }}</Message>
230
+ </div>
231
+ <div class="flex flex-col gap-1">
232
+ <InputText name="email" type="text" placeholder="Email" fluid />
233
+ <Message v-if="$form.email?.invalid" severity="error" size="small" variant="simple">{{ $form.email.error?.message }}</Message>
234
+ </div>
235
+ <Button type="submit" severity="secondary">Submit</Button>
236
+ </Form>
237
+ </div>
238
+ </template>
239
+
240
+ <script setup>
241
+ import { ref } from 'vue';
242
+ import { zodResolver } from '@primevue/forms/resolvers/zod';
243
+ import { useToast } from "primevue/usetoast";
244
+ import { z } from 'zod';
245
+
246
+ const toast = useToast();
247
+ const initialValues = ref({
248
+ username: '',
249
+ email: ''
250
+ });
251
+
252
+ const resolver = ref(zodResolver(
253
+ z.object({
254
+ username: z.string().min(1, { message: 'Username is required.' }),
255
+ email: z.string().min(1, { message: 'Email is required.' }).email({ message: 'Invalid email address.' })
256
+ })
257
+ ));
258
+
259
+ const onFormSubmit = ({ valid }) => {
260
+ if (valid) {
261
+ toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
262
+ }
263
+ };
264
+ <\/script>
265
+ ```
266
+
267
+ ## Accessibility
268
+
269
+ Screen Reader InputText component renders a native input element that 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.
270
+
271
+ ```vue
272
+ <template>
273
+ <label for="firstname">Firstname</label>
274
+ <InputText id="firstname" />
275
+
276
+ <span id="lastname">Lastname</span>
277
+ <InputText aria-labelledby="lastname" />
278
+
279
+ <InputText aria-label="Age"/>
280
+ </template>
281
+ ```
282
+
283
+ ## Input Text API
284
+
285
+ ### Props
286
+
287
+ | Name |Type |Default |Description |
288
+ | --- | --- | --- | --- |
289
+ | aria-activedescendant | string | - | Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. |
290
+ | 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. |
291
+ | 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. |
292
+ | 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. |
293
+ | aria-checked | Booleanish \| "mixed" | - | Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. |
294
+ | aria-colcount | Numberish | - | Defines the total number of columns in a table, grid, or treegrid. |
295
+ | 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. |
296
+ | aria-colspan | Numberish | - | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
297
+ | aria-controls | string | - | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
298
+ | aria-current | Booleanish \| "page" \| "step" \| "location" \| "date" \| "time" | - | Indicates the element that represents the current item within a container or set of related elements. |
299
+ | aria-describedby | string | - | Identifies the element (or elements) that describes the object. |
300
+ | aria-details | string | - | Identifies the element that provides a detailed, extended description for the object. |
301
+ | aria-disabled | Booleanish | - | Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. |
302
+ | aria-dropeffect | "link" \| "none" \| "copy" \| "execute" \| "move" \| "popup" | - | Indicates what functions can be performed when a dragged object is released on the drop target. |
303
+ | aria-errormessage | string | - | Identifies the element that provides an error message for the object. |
304
+ | aria-expanded | Booleanish | - | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. |
305
+ | 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. |
306
+ | aria-grabbed | Booleanish | - | Indicates an element's "grabbed" state in a drag-and-drop operation. |
307
+ | 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. |
308
+ | aria-hidden | Booleanish | - | Indicates whether the element is exposed to an accessibility API. |
309
+ | aria-invalid | Booleanish \| "grammar" \| "spelling" | - | Indicates the entered value does not conform to the format expected by the application. |
310
+ | aria-keyshortcuts | string | - | Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. |
311
+ | aria-label | string | - | Defines a string value that labels the current element. |
312
+ | aria-labelledby | string | - | Identifies the element (or elements) that labels the current element. |
313
+ | aria-level | Numberish | - | Defines the hierarchical level of an element within a structure. |
314
+ | 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. |
315
+ | aria-modal | Booleanish | - | Indicates whether an element is modal when displayed. |
316
+ | aria-multiline | Booleanish | - | Indicates whether a text box accepts multiple lines of input or only a single line. |
317
+ | aria-multiselectable | Booleanish | - | Indicates that the user may select more than one item from the current selectable descendants. |
318
+ | aria-orientation | "horizontal" \| "vertical" | - | Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. |
319
+ | 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. |
320
+ | 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. |
321
+ | 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. |
322
+ | aria-pressed | Booleanish \| "mixed" | - | Indicates the current "pressed" state of toggle buttons. |
323
+ | aria-readonly | Booleanish | - | Indicates that the element is not editable, but is otherwise operable. |
324
+ | 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. |
325
+ | aria-required | Booleanish | - | Indicates that user input is required on the element before a form may be submitted. |
326
+ | aria-roledescription | string | - | Defines a human-readable, author-localized description for the role of an element. |
327
+ | aria-rowcount | Numberish | - | Defines the total number of rows in a table, grid, or treegrid. |
328
+ | 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. |
329
+ | aria-rowspan | Numberish | - | Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. |
330
+ | aria-selected | Booleanish | - | Indicates the current "selected" state of various widgets. |
331
+ | 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. |
332
+ | aria-sort | "none" \| "ascending" \| "descending" \| "other" | - | Indicates if items in a table or grid are sorted in ascending or descending order. |
333
+ | aria-valuemax | Numberish | - | Defines the maximum allowed value for a range widget. |
334
+ | aria-valuemin | Numberish | - | Defines the minimum allowed value for a range widget. |
335
+ | aria-valuenow | Numberish | - | Defines the current value for a range widget. |
336
+ | aria-valuetext | string | - | Defines the human readable text alternative of aria-valuenow for a range widget. |
337
+ | innerHTML | string | - | |
338
+ | class | ClassValue | - | |
339
+ | style | StyleValue | - | |
340
+ | accesskey | string | - | |
341
+ | contenteditable | Booleanish \| "inherit" \| "plaintext-only" | - | |
342
+ | contextmenu | string | - | |
343
+ | dir | string | - | |
344
+ | draggable | Booleanish | - | |
345
+ | enterkeyhint | "enter" \| "done" \| "go" \| "next" \| "previous" \| "search" \| "send" | - | |
346
+ | enterKeyHint | "enter" \| "done" \| "go" \| "next" \| "previous" \| "search" \| "send" | - | |
347
+ | hidden | "" \| Booleanish \| "hidden" \| "until-found" | - | |
348
+ | id | string | - | |
349
+ | inert | Booleanish | - | |
350
+ | lang | string | - | |
351
+ | spellcheck | Booleanish | - | |
352
+ | tabindex | Numberish | - | |
353
+ | title | string | - | |
354
+ | translate | "yes" \| "no" | - | |
355
+ | radiogroup | string | - | |
356
+ | role | string | - | |
357
+ | about | string | - | |
358
+ | datatype | string | - | |
359
+ | inlist | any | - | |
360
+ | prefix | string | - | |
361
+ | property | string | - | |
362
+ | resource | string | - | |
363
+ | typeof | string | - | |
364
+ | vocab | string | - | |
365
+ | autocapitalize | string | - | |
366
+ | autocorrect | string | - | |
367
+ | autosave | string | - | |
368
+ | color | string | - | |
369
+ | itemprop | string | - | |
370
+ | itemscope | Booleanish | - | |
371
+ | itemtype | string | - | |
372
+ | itemid | string | - | |
373
+ | itemref | string | - | |
374
+ | results | Numberish | - | |
375
+ | security | string | - | |
376
+ | unselectable | "on" \| "off" | - | |
377
+ | 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 |
378
+ | is | string | - | Specify that a standard HTML element should behave like a defined custom built-in element |
379
+ | exportparts | string | - | |
380
+ | part | string | - | |
381
+ | accept | string | - | |
382
+ | alt | string | - | |
383
+ | autocomplete | InputAutoCompleteAttribute | - | |
384
+ | autofocus | Booleanish | - | |
385
+ | capture | boolean \| "user" \| "environment" | - | |
386
+ | checked | any[] \| Set<any> \| Booleanish | - | |
387
+ | crossorigin | string | - | |
388
+ | disabled | Booleanish | - | |
389
+ | form | string | - | |
390
+ | formaction | string | - | |
391
+ | formenctype | string | - | |
392
+ | formmethod | string | - | |
393
+ | formnovalidate | Booleanish | - | |
394
+ | formtarget | string | - | |
395
+ | height | Numberish | - | |
396
+ | indeterminate | boolean | - | |
397
+ | list | string | - | |
398
+ | max | Numberish | - | |
399
+ | maxlength | Numberish | - | |
400
+ | min | Numberish | - | |
401
+ | minlength | Numberish | - | |
402
+ | multiple | Booleanish | - | |
403
+ | pattern | string | - | |
404
+ | placeholder | string | - | |
405
+ | readonly | Booleanish | - | |
406
+ | required | Booleanish | - | |
407
+ | src | string | - | |
408
+ | step | Numberish | - | |
409
+ | type | InputTypeHTMLAttribute | - | |
410
+ | value | any | - | |
411
+ | width | Numberish | - | |
412
+ | onCancel | Function | - | |
413
+ | onCopy | Function | - | |
414
+ | onCut | Function | - | |
415
+ | onPaste | Function | - | |
416
+ | onCompositionend | Function | - | |
417
+ | onCompositionstart | Function | - | |
418
+ | onCompositionupdate | Function | - | |
419
+ | onDrag | Function | - | |
420
+ | onDragend | Function | - | |
421
+ | onDragenter | Function | - | |
422
+ | onDragexit | Function | - | |
423
+ | onDragleave | Function | - | |
424
+ | onDragover | Function | - | |
425
+ | onDragstart | Function | - | |
426
+ | onDrop | Function | - | |
427
+ | onFocus | Function | - | |
428
+ | onFocusin | Function | - | |
429
+ | onFocusout | Function | - | |
430
+ | onBlur | Function | - | |
431
+ | onChange | Function | - | |
432
+ | onBeforeinput | Function | - | |
433
+ | onFormdata | Function | - | |
434
+ | onInput | Function | - | |
435
+ | onReset | Function | - | |
436
+ | onSubmit | Function | - | |
437
+ | onInvalid | Function | - | |
438
+ | onFullscreenchange | Function | - | |
439
+ | onFullscreenerror | Function | - | |
440
+ | onLoad | Function | - | |
441
+ | onError | Function | - | |
442
+ | onKeydown | Function | - | |
443
+ | onKeypress | Function | - | |
444
+ | onKeyup | Function | - | |
445
+ | onDblclick | Function | - | |
446
+ | onMousedown | Function | - | |
447
+ | onMouseenter | Function | - | |
448
+ | onMouseleave | Function | - | |
449
+ | onMousemove | Function | - | |
450
+ | onMouseout | Function | - | |
451
+ | onMouseover | Function | - | |
452
+ | onMouseup | Function | - | |
453
+ | onAbort | Function | - | |
454
+ | onCanplay | Function | - | |
455
+ | onCanplaythrough | Function | - | |
456
+ | onDurationchange | Function | - | |
457
+ | onEmptied | Function | - | |
458
+ | onEncrypted | Function | - | |
459
+ | onEnded | Function | - | |
460
+ | onLoadeddata | Function | - | |
461
+ | onLoadedmetadata | Function | - | |
462
+ | onLoadstart | Function | - | |
463
+ | onPause | Function | - | |
464
+ | onPlay | Function | - | |
465
+ | onPlaying | Function | - | |
466
+ | onProgress | Function | - | |
467
+ | onRatechange | Function | - | |
468
+ | onSeeked | Function | - | |
469
+ | onSeeking | Function | - | |
470
+ | onStalled | Function | - | |
471
+ | onSuspend | Function | - | |
472
+ | onTimeupdate | Function | - | |
473
+ | onVolumechange | Function | - | |
474
+ | onWaiting | Function | - | |
475
+ | onSelect | Function | - | |
476
+ | onScroll | Function | - | |
477
+ | onScrollend | Function | - | |
478
+ | onTouchcancel | Function | - | |
479
+ | onTouchend | Function | - | |
480
+ | onTouchmove | Function | - | |
481
+ | onTouchstart | Function | - | |
482
+ | onAuxclick | Function | - | |
483
+ | onClick | Function | - | |
484
+ | onContextmenu | Function | - | |
485
+ | onGotpointercapture | Function | - | |
486
+ | onLostpointercapture | Function | - | |
487
+ | onPointerdown | Function | - | |
488
+ | onPointermove | Function | - | |
489
+ | onPointerup | Function | - | |
490
+ | onPointercancel | Function | - | |
491
+ | onPointerenter | Function | - | |
492
+ | onPointerleave | Function | - | |
493
+ | onPointerover | Function | - | |
494
+ | onPointerout | Function | - | |
495
+ | onBeforetoggle | Function | - | |
496
+ | onToggle | Function | - | |
497
+ | onWheel | Function | - | |
498
+ | onAnimationcancel | Function | - | |
499
+ | onAnimationstart | Function | - | |
500
+ | onAnimationend | Function | - | |
501
+ | onAnimationiteration | Function | - | |
502
+ | onSecuritypolicyviolation | Function | - | |
503
+ | onTransitioncancel | Function | - | |
504
+ | onTransitionend | Function | - | |
505
+ | onTransitionrun | Function | - | |
506
+ | onTransitionstart | Function | - | |
507
+ | modelValue | Nullable<string> | - | Value of the component. |
508
+ | defaultValue | Nullable<string> | - | The default value for the input when not controlled by `modelValue` . |
509
+ | name | string | - | The name attribute for the element, typically used in form submissions. |
510
+ | size | null \| HintedString<"small" \| "large"> | - | Defines the size of the component. |
511
+ | invalid | null \| boolean | false | When present, it specifies that the component should have invalid state style. |
512
+ | variant | null \| HintedString<"outlined" \| "filled"> | null | Specifies the input variant of the component. |
513
+ | fluid | null \| boolean | null | Spans 100% width of the container when enabled. |
514
+ | formControl | Record<string, any> | - | Form control object, typically used for handling validation and form state. |
515
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
516
+ | pt | PassThrough<InputTextPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
517
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
518
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
519
+
520
+ ### Pass Through Options
521
+
522
+ | Name |Type |Description |
523
+ | --- | --- | --- |
524
+ | root | InputTextPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
525
+ | hooks | any | Used to manage all lifecycle hooks. |
526
+
527
+ ### Theming
528
+
529
+ ### CSS Classes
530
+
531
+ | Class |Description |
532
+ | --- | --- |
533
+ | p-inputtext | The class of root element |
534
+
535
+ ### Design Tokens
536
+
537
+ | Token |CSS Variable |Description |
538
+ | --- | --- | --- |
539
+ | inputtext.background | --p-inputtext-background | Background of root |
540
+ | inputtext.disabled.background | --p-inputtext-disabled-background | Disabled background of root |
541
+ | inputtext.filled.background | --p-inputtext-filled-background | Filled background of root |
542
+ | inputtext.filled.hover.background | --p-inputtext-filled-hover-background | Filled hover background of root |
543
+ | inputtext.filled.focus.background | --p-inputtext-filled-focus-background | Filled focus background of root |
544
+ | inputtext.border.color | --p-inputtext-border-color | Border color of root |
545
+ | inputtext.hover.border.color | --p-inputtext-hover-border-color | Hover border color of root |
546
+ | inputtext.focus.border.color | --p-inputtext-focus-border-color | Focus border color of root |
547
+ | inputtext.invalid.border.color | --p-inputtext-invalid-border-color | Invalid border color of root |
548
+ | inputtext.color | --p-inputtext-color | Color of root |
549
+ | inputtext.disabled.color | --p-inputtext-disabled-color | Disabled color of root |
550
+ | inputtext.placeholder.color | --p-inputtext-placeholder-color | Placeholder color of root |
551
+ | inputtext.invalid.placeholder.color | --p-inputtext-invalid-placeholder-color | Invalid placeholder color of root |
552
+ | inputtext.shadow | --p-inputtext-shadow | Shadow of root |
553
+ | inputtext.padding.x | --p-inputtext-padding-x | Padding x of root |
554
+ | inputtext.padding.y | --p-inputtext-padding-y | Padding y of root |
555
+ | inputtext.border.radius | --p-inputtext-border-radius | Border radius of root |
556
+ | inputtext.focus.ring.width | --p-inputtext-focus-ring-width | Focus ring width of root |
557
+ | inputtext.focus.ring.style | --p-inputtext-focus-ring-style | Focus ring style of root |
558
+ | inputtext.focus.ring.color | --p-inputtext-focus-ring-color | Focus ring color of root |
559
+ | inputtext.focus.ring.offset | --p-inputtext-focus-ring-offset | Focus ring offset of root |
560
+ | inputtext.focus.ring.shadow | --p-inputtext-focus-ring-shadow | Focus ring shadow of root |
561
+ | inputtext.transition.duration | --p-inputtext-transition-duration | Transition duration of root |
562
+ | inputtext.sm.font.size | --p-inputtext-sm-font-size | Sm font size of root |
563
+ | inputtext.sm.padding.x | --p-inputtext-sm-padding-x | Sm padding x of root |
564
+ | inputtext.sm.padding.y | --p-inputtext-sm-padding-y | Sm padding y of root |
565
+ | inputtext.lg.font.size | --p-inputtext-lg-font-size | Lg font size of root |
566
+ | inputtext.lg.padding.x | --p-inputtext-lg-padding-x | Lg padding x of root |
567
+ | inputtext.lg.padding.y | --p-inputtext-lg-padding-y | Lg padding y of root |
568
+ | inputtext.font.weight | --p-inputtext-font-weight | Font weight of root |
569
+ | inputtext.font.size | --p-inputtext-font-size | Font size of root |
@@ -0,0 +1 @@
1
+ # installation
@@ -0,0 +1,116 @@
1
+ # KeyFilter
2
+
3
+ KeyFilter is a directive to restrict individual key strokes. In order to restrict the whole input, use InputNumber or InputMask instead.
4
+
5
+ ## Presets
6
+
7
+ KeyFilter provides various presets configured with the v-keyfilter directive.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex flex-wrap gap-4 mb-6">
12
+ <div class="flex-auto">
13
+ <Label for="integer" class="font-bold! block mb-2 "> Integer </Label>
14
+ <InputText id="integer" v-model="integer" v-keyfilter.int class="w-full" />
15
+ </div>
16
+ <div class="flex-auto">
17
+ <Label for="number" class="font-bold! block mb-2 "> Number </Label>
18
+ <InputText id="number" v-model="number" v-keyfilter.num class="w-full" />
19
+ </div>
20
+ <div class="flex-auto">
21
+ <Label for="money" class="font-bold! block mb-2 "> Money </Label>
22
+ <InputText id="money" v-model="money" v-keyfilter.money class="w-full" />
23
+ </div>
24
+ </div>
25
+ <div class="flex flex-wrap gap-4">
26
+ <div class="flex-auto">
27
+ <Label for="hex" class="font-bold! block mb-2 "> Hex </Label>
28
+ <InputText id="hex" v-model="hex" v-keyfilter.hex class="w-full" />
29
+ </div>
30
+ <div class="flex-auto">
31
+ <Label for="alphabetic" class="font-bold! block mb-2 "> Alphabetic </Label>
32
+ <InputText id="alphabetic" v-model="alphabetic" v-keyfilter.alpha class="w-full" />
33
+ </div>
34
+ <div class="flex-auto">
35
+ <Label for="alphanumeric" class="font-bold! block mb-2 "> Alphanumeric </Label>
36
+ <InputText id="alphanumeric" v-model="alphanumeric" v-keyfilter.alphanum class="w-full" />
37
+ </div>
38
+ </div>
39
+ </template>
40
+
41
+ <script setup>
42
+ import { ref } from 'vue';
43
+
44
+ const integer = ref(null);
45
+ const number = ref(null);
46
+ const money = ref(null);
47
+ const hex = ref(null);
48
+ const alphabetic = ref(null);
49
+ const alphanumeric = ref(null);
50
+ <\/script>
51
+ ```
52
+
53
+ ## Regex
54
+
55
+ In addition to the presets, a regular expression can be configured for customization.
56
+
57
+ ```vue
58
+ <template>
59
+ <div class="flex flex-wrap gap-4">
60
+ <div class="flex-auto">
61
+ <label for="blockspace" class="text-sm font-bold block mb-2"> Block Space </label>
62
+ <InputText id="blockspace" v-model="blockSpaceValue" v-keyfilter="blockSpace" class="w-full" />
63
+ </div>
64
+ <div class="flex-auto">
65
+ <label for="block" class="text-sm font-bold block mb-2"> Block < > * ! </label>
66
+ <InputText id="block" v-model="blockCharsValue" v-keyfilter="blockChars" class="w-full" />
67
+ </div>
68
+ </div>
69
+ </template>
70
+
71
+ <script setup>
72
+ import { ref } from 'vue';
73
+
74
+ const blockSpaceValue = ref(null);
75
+ const blockCharsValue = ref(null);
76
+ const blockSpace = /^[^\s]+$/;
77
+ const blockChars = /^[^<>*!]+$/;
78
+ <\/script>
79
+ ```
80
+
81
+ ## Regex Word
82
+
83
+ Validation against the whole input is available with the validateOnly option enabled so that the keys are allowed only when the resulting value matches the pattern.
84
+
85
+ ```vue
86
+ <template>
87
+ <div class="flex justify-center">
88
+ <div>
89
+ <Label for="numkeys" class="font-bold! block mb-2">Block Numeric (allow "+" only once at start)</Label>
90
+ <InputText id="numkeys" v-model="text" v-keyfilter="blockNumeric" fluid />
91
+ </div>
92
+ </div>
93
+ </template>
94
+
95
+ <script setup>
96
+ import { ref } from 'vue';
97
+
98
+ const text = ref(null);
99
+ const blockNumeric = { pattern: /^[+]?(\\d{1,12})?$/, validateOnly: true };
100
+ <\/script>
101
+ ```
102
+
103
+ ## Accessibility
104
+
105
+ Refer to InputText for accessibility as KeyFilter is a built-in add-on of the InputText.
106
+
107
+ ## Key Filter API
108
+
109
+ ### Pass Through Options
110
+
111
+ | Name |Type |Description |
112
+ | --- | --- | --- |
113
+ | root | KeyFilterDirectivePassThroughOptionType | Used to pass attributes to the root's DOM element. |
114
+ | hooks | any | Used to manage all lifecycle hooks. |
115
+
116
+ ### Theming