@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,213 @@
1
+ # ColorPicker
2
+
3
+ ColorPicker is an input component to select a color.
4
+
5
+ ## Basic
6
+
7
+ ColorPicker is used as a controlled input with v-model property.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <ColorPicker v-model="color" />
13
+ </div>
14
+ </template>
15
+
16
+ <script setup>
17
+ import { ref } from "vue";
18
+
19
+ const color = ref();
20
+ <\/script>
21
+ ```
22
+
23
+ ## Inline
24
+
25
+ ColorPicker is displayed as a popup by default, add inline property to customize this behavior.
26
+
27
+ ```vue
28
+ <template>
29
+ <div class="flex justify-center">
30
+ <ColorPicker v-model="color" inline />
31
+ </div>
32
+ </template>
33
+
34
+ <script setup>
35
+ import { ref } from "vue";
36
+
37
+ const color = ref();
38
+ <\/script>
39
+ ```
40
+
41
+ ## Format
42
+
43
+ Default color format to use in value binding is hex and other possible values can be rgb and hsb using the format property.
44
+
45
+ ```vue
46
+ <template>
47
+ <div class="flex flex-wrap gap-4">
48
+ <div class="flex-1 flex flex-col items-center">
49
+ <label for="cp-hex" class="text-sm font-bold block mb-2"> HEX </label>
50
+ <ColorPicker v-model="color" inputId="cp-hex" class="mb-4" />
51
+ <span class="text-sm">{{ color }}</span>
52
+ </div>
53
+ <div class="flex-1 flex flex-col items-center">
54
+ <label for="cp-rgb" class="text-sm font-bold block mb-2"> RGB </label>
55
+ <ColorPicker v-model="colorRGB" format="rgb" inputId="cp-rgb" class="mb-4" />
56
+ <span class="text-sm">{{ 'r:' + colorRGB.r + ' g:' + colorRGB.g + ' b:' + colorRGB.b }}</span>
57
+ </div>
58
+ <div class="flex-1 flex flex-col items-center">
59
+ <label for="cp-hsb" class="text-sm font-bold block mb-2"> HSB </label>
60
+ <ColorPicker v-model="colorHSB" format="hsb" inputId="cp-hsb" class="mb-4" />
61
+ <span class="text-sm">{{ 'h:' + colorHSB.h + ' s:' + colorHSB.s + ' b:' + colorHSB.b }}</span>
62
+ </div>
63
+ </div>
64
+ </template>
65
+
66
+ <script setup>
67
+ import { ref } from "vue";
68
+
69
+ const color = ref('#6466f1');
70
+ const colorRGB = ref({ r: 100, g: 102, b: 241 });
71
+ const colorHSB = ref({ h: 239, s: 59, b: 95 });
72
+ <\/script>
73
+ ```
74
+
75
+ ## Disabled
76
+
77
+ When disabled is present, the element cannot be edited and focused.
78
+
79
+ ```vue
80
+ <template>
81
+ <div class="flex justify-center">
82
+ <ColorPicker v-model="color" disabled />
83
+ </div>
84
+ </template>
85
+
86
+ <script setup>
87
+ import { ref } from "vue";
88
+
89
+ const color = ref();
90
+ <\/script>
91
+ ```
92
+
93
+ ## Forms
94
+
95
+ ColorPicker integrates seamlessly with the PrimeVue Forms library.
96
+
97
+ ```vue
98
+ <template>
99
+ <div class="flex justify-center">
100
+ <Form v-slot="$form" :resolver="resolver" :initialValues="initialValues" @submit="onFormSubmit" class="flex flex-col gap-4">
101
+ <div class="flex flex-col items-center gap-2">
102
+ <ColorPicker name="color" defaultColor="989898" />
103
+ <Message v-if="$form.color?.invalid" severity="error" size="small" variant="simple">{{ $form.color.error?.message }}</Message>
104
+ </div>
105
+ <Button type="submit" severity="secondary">Submit</Button>
106
+ </Form>
107
+ </div>
108
+ </template>
109
+
110
+ <script setup>
111
+ import { ref } from 'vue';
112
+ import { zodResolver } from '@primevue/forms/resolvers/zod';
113
+ import { useToast } from "primevue/usetoast";
114
+ import { z } from 'zod';
115
+
116
+ const toast = useToast();
117
+ const initialValues = ref({
118
+ color: null
119
+ });
120
+ const resolver = ref(zodResolver(
121
+ z.object({
122
+ color: z.union([z.string(), z.literal(null)]).refine((value) => value !== null, { message: 'Color is required.' })
123
+ })
124
+ ));
125
+
126
+ const onFormSubmit = ({ valid }) => {
127
+ if (valid) {
128
+ toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
129
+ }
130
+ };
131
+ <\/script>
132
+ ```
133
+
134
+ ## Accessibility
135
+
136
+ Screen Reader Specification does not cover a color picker yet and using a semantic native color picker is not consistent across browsers so currently component is not compatible with screen readers. In the upcoming versions, text fields will be introduced below the slider section to be able to pick a color using accessible text boxes in hsl, rgba and hex formats. Closed State Keyboard Support of Popup ColorPicker Key Function tab Moves focus to the color picker button. space Opens the popup and moves focus to the color slider. Popup Keyboard Support Key Function enter Selects the color and closes the popup. space Selects the color and closes the popup. escape Closes the popup, moves focus to the input. Color Picker Slider Key Function arrow keys Changes color. Hue Slider Key Function up arrow down arrow Changes hue.
137
+
138
+ ## Color Picker API
139
+
140
+ ### Props
141
+
142
+ | Name |Type |Default |Description |
143
+ | --- | --- | --- | --- |
144
+ | modelValue | any | - | Value of the component. |
145
+ | defaultColor | any | ff0000 | Initial color to display when value is not defined. |
146
+ | defaultValue | any | - | The default value for the input when not controlled by `modelValue` . |
147
+ | name | string | - | The name attribute for the element, typically used in form submissions. |
148
+ | inline | boolean | false | Whether to display as an overlay or not. |
149
+ | format | HintedString<"hex" \| "rgb" \| "hsb"> | hex | Format to use in value binding, supported formats are 'hex', 'rgb' and 'hsb'. |
150
+ | invalid | boolean | false | When present, it specifies that the component should have invalid state style. |
151
+ | disabled | boolean | false | When present, it specifies that the component should be disabled. |
152
+ | tabindex | string | - | Index of the element in tabbing order. |
153
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
154
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
155
+ | inputId | string | - | Identifier of the focus input to match a label defined for the dropdown. |
156
+ | panelClass | any | - | Style class of the overlay panel. |
157
+ | overlayClass | any | - | Style class of the overlay panel. |
158
+ | appendTo | HTMLElement \| HintedString<"body" \| "self"> | body | A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself. |
159
+ | formControl | Record<string, any> | - | Form control object, typically used for handling validation and form state. |
160
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
161
+ | pt | PassThrough<ColorPickerPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
162
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
163
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
164
+
165
+ ### Pass Through Options
166
+
167
+ | Name |Type |Description |
168
+ | --- | --- | --- |
169
+ | root | ColorPickerPassThroughOptionType | Used to pass attributes to the root's DOM element. |
170
+ | preview | ColorPickerPassThroughOptionType | Used to pass attributes to the preview's DOM element. |
171
+ | overlay | ColorPickerPassThroughOptionType | Used to pass attributes to the panel's DOM element. |
172
+ | content | ColorPickerPassThroughOptionType | Used to pass attributes to the content's DOM element. |
173
+ | colorSelector | ColorPickerPassThroughOptionType | Used to pass attributes to the color selector's DOM element. |
174
+ | colorBackground | ColorPickerPassThroughOptionType | Used to pass attributes to the color background's DOM element. |
175
+ | colorHandle | ColorPickerPassThroughOptionType | Used to pass attributes to the color handler's DOM element. |
176
+ | hue | ColorPickerPassThroughOptionType | Used to pass attributes to the hue's DOM element. |
177
+ | hueHandle | ColorPickerPassThroughOptionType | Used to pass attributes to the hue handler's DOM element. |
178
+ | hooks | any | Used to manage all lifecycle hooks. |
179
+ | transition | ColorPickerPassThroughTransitionType | Used to control Vue Transition API. |
180
+
181
+ ### Theming
182
+
183
+ ### CSS Classes
184
+
185
+ | Class |Description |
186
+ | --- | --- |
187
+ | p-colorpicker | Class name of the root element |
188
+ | p-colorpicker-preview | Class name of the preview element |
189
+ | p-colorpicker-panel | Class name of the panel element |
190
+ | p-colorpicker-color-selector | Class name of the color selector element |
191
+ | p-colorpicker-color-background | Class name of the color background element |
192
+ | p-colorpicker-color-handle | Class name of the color handle element |
193
+ | p-colorpicker-hue | Class name of the hue element |
194
+ | p-colorpicker-hue-handle | Class name of the hue handle element |
195
+
196
+ ### Design Tokens
197
+
198
+ | Token |CSS Variable |Description |
199
+ | --- | --- | --- |
200
+ | colorpicker.transition.duration | --p-colorpicker-transition-duration | Transition duration of root |
201
+ | colorpicker.preview.width | --p-colorpicker-preview-width | Width of preview |
202
+ | colorpicker.preview.height | --p-colorpicker-preview-height | Height of preview |
203
+ | colorpicker.preview.border.radius | --p-colorpicker-preview-border-radius | Border radius of preview |
204
+ | colorpicker.preview.focus.ring.width | --p-colorpicker-preview-focus-ring-width | Focus ring width of preview |
205
+ | colorpicker.preview.focus.ring.style | --p-colorpicker-preview-focus-ring-style | Focus ring style of preview |
206
+ | colorpicker.preview.focus.ring.color | --p-colorpicker-preview-focus-ring-color | Focus ring color of preview |
207
+ | colorpicker.preview.focus.ring.offset | --p-colorpicker-preview-focus-ring-offset | Focus ring offset of preview |
208
+ | colorpicker.preview.focus.ring.shadow | --p-colorpicker-preview-focus-ring-shadow | Focus ring shadow of preview |
209
+ | colorpicker.panel.shadow | --p-colorpicker-panel-shadow | Shadow of panel |
210
+ | colorpicker.panel.border.radius | --p-colorpicker-panel-border-radius | Border radius of panel |
211
+ | colorpicker.panel.background | --p-colorpicker-panel-background | Background of panel |
212
+ | colorpicker.panel.border.color | --p-colorpicker-panel-border-color | Border color of panel |
213
+ | colorpicker.handle.color | --p-colorpicker-handle-color | Color of handle |