@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,264 @@
1
+ # Avatar
2
+
3
+ Avatar represents people using icons, labels and images.
4
+
5
+ ## Basic
6
+
7
+ Displays a user representation using an image, icon, or label initials.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex items-center justify-center gap-4">
12
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" size="large" shape="circle" />
13
+ </div>
14
+ </template>
15
+
16
+ <script setup>
17
+ import Avatar from 'primevue/avatar';
18
+ <\/script>
19
+ ```
20
+
21
+ ## Image
22
+
23
+ Use the image property to display an image as an Avatar.
24
+
25
+ ```vue
26
+ <template>
27
+ <div class="flex items-center justify-center gap-4">
28
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" size="large" shape="circle" />
29
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/asiyajavayant.png" size="large" shape="circle" />
30
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/onyamalimba.png" size="large" shape="circle" />
31
+ </div>
32
+ </template>
33
+
34
+ <script setup>
35
+ import Avatar from 'primevue/avatar';
36
+ <\/script>
37
+ ```
38
+
39
+ ## Badge
40
+
41
+ A Badge can be used to display a badge on an Avatar.
42
+
43
+ ```vue
44
+ <template>
45
+ <div class="flex items-center justify-center gap-8">
46
+ <OverlayBadge value="2" size="small" severity="success">
47
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/onyamalimba.png" size="large" shape="circle" />
48
+ </OverlayBadge>
49
+ <OverlayBadge severity="danger">
50
+ <Avatar image="https://primefaces.org/cdn/primevue/images/organization/walter.jpg" size="large" />
51
+ </OverlayBadge>
52
+ </div>
53
+ </template>
54
+
55
+ <script setup>
56
+ import Avatar from 'primevue/avatar';
57
+ import OverlayBadge from 'primevue/overlaybadge';
58
+ <\/script>
59
+ ```
60
+
61
+ ## Shape
62
+
63
+ Avatar comes in two different styles specified with the shape property, square is the default and circle is the alternative.
64
+
65
+ ```vue
66
+ <template>
67
+ <div class="flex items-center justify-center gap-4">
68
+ <Avatar image="https://primefaces.org/cdn/primevue/images/organization/walter.jpg" shape="circle" size="large" />
69
+ <Avatar image="https://primefaces.org/cdn/primevue/images/organization/walter.jpg" shape="square" size="large" />
70
+ </div>
71
+ </template>
72
+
73
+ <script setup>
74
+ import Avatar from 'primevue/avatar';
75
+ <\/script>
76
+ ```
77
+
78
+ ## Sizes
79
+
80
+ Use the size property to change the size of an avatar.
81
+
82
+ ```vue
83
+ <template>
84
+ <div class="flex flex-col items-center gap-4">
85
+ <div class="flex items-center justify-center gap-4">
86
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
87
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" size="large" />
88
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" size="xlarge" />
89
+ </div>
90
+ <div class="flex items-center justify-center gap-4">
91
+ <Avatar label="AB" shape="circle" />
92
+ <Avatar label="AB" shape="circle" size="large" />
93
+ <Avatar label="AB" shape="circle" size="xlarge" />
94
+ </div>
95
+ </div>
96
+ </template>
97
+
98
+ <script setup>
99
+ import Avatar from 'primevue/avatar';
100
+ <\/script>
101
+ ```
102
+
103
+ ## AvatarGroup
104
+
105
+ Grouping is available by wrapping multiple Avatar components inside an AvatarGroup .
106
+
107
+ ```vue
108
+ <template>
109
+ <div class="flex justify-center">
110
+ <AvatarGroup>
111
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
112
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/asiyajavayant.png" shape="circle" />
113
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/onyamalimba.png" shape="circle" />
114
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/ionibowcher.png" shape="circle" />
115
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/xuxuefeng.png" shape="circle" />
116
+ <Avatar label="+2" shape="circle" />
117
+ </AvatarGroup>
118
+ </div>
119
+ </template>
120
+
121
+ <script setup>
122
+ import Avatar from 'primevue/avatar';
123
+ import AvatarGroup from 'primevue/avatargroup';
124
+ <\/script>
125
+ ```
126
+
127
+ ## Template
128
+
129
+ Content can easily be customized with the dynamic content instead of using the built-in modes.
130
+
131
+ ```vue
132
+ <template>
133
+ <div class="flex justify-center">
134
+ <Avatar size="xlarge">
135
+ <svg width="31" height="33" viewBox="0 0 31 33" fill="none" xmlns="http://www.w3.org/2000/svg" class="block mx-auto">
136
+ <path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--p-primary-color)" />
137
+ <mask id="mask0_1_52" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="31" height="33">
138
+ <path d="M15.1934 0V0V0L0.0391235 5.38288L2.35052 25.3417L15.1934 32.427V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1934 0Z" fill="var(--ground-background)" />
139
+ </mask>
140
+ <g mask="url(#mask0_1_52)">
141
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.1935 0V3.5994V3.58318V20.0075V20.0075V32.427V32.427L28.0364 25.3417L30.3478 5.38288L15.1935 0Z" fill="var(--p-primary-color)" />
142
+ </g>
143
+ <path d="M19.6399 15.3776L18.1861 15.0547L19.3169 16.6695V21.6755L23.1938 18.4458V12.9554L21.4169 13.6013L19.6399 15.3776Z" fill="var(--ground-background)" />
144
+ <path d="M10.5936 15.3776L12.0474 15.0547L10.9166 16.6695V21.6755L7.03966 18.4458V12.9554L8.81661 13.6013L10.5936 15.3776Z" fill="var(--ground-background)" />
145
+ <path
146
+ fill-rule="evenodd"
147
+ clip-rule="evenodd"
148
+ d="M11.3853 16.9726L12.6739 15.0309L13.4793 15.5163H16.7008L17.5061 15.0309L18.7947 16.9726V24.254L17.8283 25.7103L16.7008 26.843H13.4793L12.3518 25.7103L11.3853 24.254V16.9726Z"
149
+ fill="var(--ground-background)"
150
+ />
151
+ <path d="M19.3168 24.7437L21.4168 22.6444V20.5451L19.3168 22.3214V24.7437Z" fill="var(--ground-background)" />
152
+ <path d="M10.9166 24.7437L8.81662 22.6444V20.5451L10.9166 22.3214V24.7437Z" fill="var(--ground-background)" />
153
+ <path
154
+ fill-rule="evenodd"
155
+ clip-rule="evenodd"
156
+ d="M13.0167 5.68861L11.7244 8.7568L13.8244 14.8932H14.7936V5.68861H13.0167ZM15.4397 5.68861V14.8932H16.5706L18.5091 8.7568L17.2167 5.68861H15.4397Z"
157
+ fill="var(--ground-background)"
158
+ />
159
+ <path d="M13.8244 14.8932L6.87813 12.3094L5.90888 8.27235L11.8859 8.7568L13.9859 14.8932H13.8244Z" fill="var(--ground-background)" />
160
+ <path d="M16.5706 14.8932L23.5169 12.3094L24.4861 8.27235L18.3476 8.7568L16.4091 14.8932H16.5706Z" fill="var(--ground-background)" />
161
+ <path d="M18.8321 8.27235L22.2245 7.94938L19.9629 5.68861H17.7013L18.8321 8.27235Z" fill="var(--ground-background)" />
162
+ <path d="M11.4013 8.27235L8.00893 7.94938L10.2705 5.68861H12.5321L11.4013 8.27235Z" fill="var(--ground-background)" />
163
+ </svg>
164
+ </Avatar>
165
+ </div>
166
+ </template>
167
+
168
+ <script setup>
169
+ import Avatar from 'primevue/avatar';
170
+ <\/script>
171
+ ```
172
+
173
+ ## Accessibility
174
+
175
+ Screen Reader Avatar does not include any roles and attributes by default. Any attribute is passed to the root element so you may add a role like img along with aria-labelledby or aria-label to describe the component. In case avatars need to be tabbable, tabIndex can be added as well to implement custom key handlers. Keyboard Support Component does not include any interactive elements.
176
+
177
+ ## Avatar API
178
+
179
+ ### Props
180
+
181
+ | Name |Type |Default |Description |
182
+ | --- | --- | --- | --- |
183
+ | label | string | - | Defines the text to display. |
184
+ | icon | string | - | Defines the icon to display. |
185
+ | image | string | - | Defines the image to display. |
186
+ | size | HintedString<"large" \| "normal" \| "xlarge"> | normal | Size of the element. |
187
+ | shape | HintedString<"square" \| "circle"> | square | Shape of the element. |
188
+ | ariaLabel | string | - | Establishes a string value that labels the component. |
189
+ | ariaLabelledby | string | - | Establishes relationships between the component and label(s) where its value should be one or more element IDs. |
190
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
191
+ | pt | PassThrough<AvatarPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
192
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
193
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
194
+
195
+ ### Pass Through Options
196
+
197
+ | Name |Type |Description |
198
+ | --- | --- | --- |
199
+ | root | AvatarPassThroughOptionType | Used to pass attributes to the root's DOM element. |
200
+ | label | AvatarPassThroughOptionType | Used to pass attributes to the label's DOM element. |
201
+ | icon | AvatarPassThroughOptionType | Used to pass attributes to the icon's DOM element. |
202
+ | image | AvatarPassThroughOptionType | Used to pass attributes to the image's DOM element. |
203
+ | hooks | any | Used to manage all lifecycle hooks. |
204
+
205
+ ### Theming
206
+
207
+ ### CSS Classes
208
+
209
+ | Class |Description |
210
+ | --- | --- |
211
+ | p-avatar | Class name of the root element |
212
+ | p-avatar-label | Class name of the label element |
213
+ | p-avatar-icon | Class name of the icon element |
214
+
215
+ ### Design Tokens
216
+
217
+ | Token |CSS Variable |Description |
218
+ | --- | --- | --- |
219
+ | avatar.width | --p-avatar-width | Width of root |
220
+ | avatar.height | --p-avatar-height | Height of root |
221
+ | avatar.font.weight | --p-avatar-font-weight | Font weight of root |
222
+ | avatar.font.size | --p-avatar-font-size | Font size of root |
223
+ | avatar.background | --p-avatar-background | Background of root |
224
+ | avatar.color | --p-avatar-color | Color of root |
225
+ | avatar.border.radius | --p-avatar-border-radius | Border radius of root |
226
+ | avatar.icon.size | --p-avatar-icon-size | Size of icon |
227
+ | avatar.group.border.color | --p-avatar-group-border-color | Border color of group |
228
+ | avatar.group.offset | --p-avatar-group-offset | Offset of group |
229
+ | avatar.lg.width | --p-avatar-lg-width | Width of lg |
230
+ | avatar.lg.height | --p-avatar-lg-height | Height of lg |
231
+ | avatar.lg.font.size | --p-avatar-lg-font-size | Font size of lg |
232
+ | avatar.lg.icon.size | --p-avatar-lg-icon-size | Icon size of lg |
233
+ | avatar.lg.group.offset | --p-avatar-lg-group-offset | Group offset of lg |
234
+ | avatar.xl.width | --p-avatar-xl-width | Width of xl |
235
+ | avatar.xl.height | --p-avatar-xl-height | Height of xl |
236
+ | avatar.xl.font.size | --p-avatar-xl-font-size | Font size of xl |
237
+ | avatar.xl.icon.size | --p-avatar-xl-icon-size | Icon size of xl |
238
+ | avatar.xl.group.offset | --p-avatar-xl-group-offset | Group offset of xl |
239
+
240
+ ## Avatar Group API
241
+
242
+ ### Props
243
+
244
+ | Name |Type |Default |Description |
245
+ | --- | --- | --- | --- |
246
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
247
+ | pt | PassThrough<AvatarGroupPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
248
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
249
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
250
+
251
+ ### Pass Through Options
252
+
253
+ | Name |Type |Description |
254
+ | --- | --- | --- |
255
+ | root | AvatarGroupPassThroughOptionType | Used to pass attributes to the root's DOM element. |
256
+ | hooks | any | Used to manage all lifecycle hooks. |
257
+
258
+ ### Theming
259
+
260
+ ### CSS Classes
261
+
262
+ | Class |Description |
263
+ | --- | --- |
264
+ | p-avatar-group | |
@@ -0,0 +1,200 @@
1
+ # Badge
2
+
3
+ Badge is a small status indicator for another element.
4
+
5
+ ## Basic
6
+
7
+ A small overlay on another element to indicate a count or status.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <Badge value="Badge" />
13
+ </div>
14
+ </template>
15
+ ```
16
+
17
+ ## Severity
18
+
19
+ The severity property defines the visual style of a badge.
20
+
21
+ ```vue
22
+ <template>
23
+ <div class="flex flex-wrap justify-center gap-2">
24
+ <Badge value="Default" />
25
+ <Badge value="Secondary" severity="secondary" />
26
+ <Badge value="Success" severity="success" />
27
+ <Badge value="Info" severity="info" />
28
+ <Badge value="Warning" severity="warn" />
29
+ <Badge value="Danger" severity="danger" />
30
+ <Badge value="Contrast" severity="contrast" />
31
+ </div>
32
+ </template>
33
+ ```
34
+
35
+ ## Size
36
+
37
+ Use the size property to change the size of a badge.
38
+
39
+ ```vue
40
+ <template>
41
+ <div class="flex flex-wrap items-center justify-center gap-2">
42
+ <Badge value="Small" size="small" />
43
+ <Badge value="Default" />
44
+ <Badge value="Large" size="large" />
45
+ <Badge value="XLarge" size="xlarge" />
46
+ </div>
47
+ </template>
48
+ ```
49
+
50
+ ## Overlay
51
+
52
+ A badge can be added to any element by encapsulating the content with the OverlayBadge component.
53
+
54
+ ```vue
55
+ <template>
56
+ <div class="flex flex-wrap justify-center gap-6">
57
+ <OverlayBadge value="2">
58
+ <Bell :size="24" />
59
+ </OverlayBadge>
60
+ <OverlayBadge value="4" severity="danger">
61
+ <CalendarIcon :size="24" />
62
+ </OverlayBadge>
63
+ <OverlayBadge severity="danger">
64
+ <Envelope :size="24" />
65
+ </OverlayBadge>
66
+ </div>
67
+ </template>
68
+
69
+ <script setup>
70
+ import Bell from '@primeicons/vue/bell';
71
+ import CalendarIcon from '@primeicons/vue/calendar';
72
+ import Envelope from '@primeicons/vue/envelope';
73
+ <\/script>
74
+ ```
75
+
76
+ ## Button
77
+
78
+ Buttons have built-in support for badges to display a badge inline.
79
+
80
+ ```vue
81
+ <template>
82
+ <div class="flex justify-center flex-wrap gap-4">
83
+ <Button type="button">Emails<Badge value="8" severity="secondary" /></Button>
84
+ <Button type="button" variant="outlined"><Users />Messages<Badge value="2" severity="contrast" /></Button>
85
+ <OverlayBadge severity="info" class="animate-pulse">
86
+ <Button type="button" variant="outlined" iconOnly><Bell /></Button>
87
+ </OverlayBadge>
88
+ </div>
89
+ </template>
90
+
91
+ <script setup>
92
+ import Bell from '@primeicons/vue/bell';
93
+ import Users from '@primeicons/vue/users';
94
+ <\/script>
95
+ ```
96
+
97
+ ## Accessibility
98
+
99
+ Screen Reader Badge does not include any roles and attributes by default, any attribute is passed to the root element so aria roles and attributes can be added if required. If the badges are dynamic, aria-live may be utilized as well. In case badges need to be tabbable, tabIndex can be added to implement custom key handlers. Keyboard Support Component does not include any interactive elements.
100
+
101
+ ## Badge API
102
+
103
+ ### Props
104
+
105
+ | Name |Type |Default |Description |
106
+ | --- | --- | --- | --- |
107
+ | value | string \| number | - | Value to display inside the badge. |
108
+ | severity | null \| HintedString<"secondary" \| "info" \| "success" \| "warn" \| "danger" \| "contrast"> | - | Severity type of the badge. |
109
+ | size | null \| HintedString<"small" \| "large" \| "xlarge"> | - | Size of the badge, valid options are 'small', 'large', and 'xlarge'. |
110
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
111
+ | pt | PassThrough<BadgePassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
112
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
113
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
114
+
115
+ ### Pass Through Options
116
+
117
+ | Name |Type |Description |
118
+ | --- | --- | --- |
119
+ | root | BadgePassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
120
+ | hooks | any | Used to manage all lifecycle hooks. |
121
+
122
+ ### Theming
123
+
124
+ ### CSS Classes
125
+
126
+ | Class |Description |
127
+ | --- | --- |
128
+ | p-badge | Class name of the root element |
129
+
130
+ ### Design Tokens
131
+
132
+ | Token |CSS Variable |Description |
133
+ | --- | --- | --- |
134
+ | badge.border.radius | --p-badge-border-radius | Border radius of root |
135
+ | badge.padding | --p-badge-padding | Padding of root |
136
+ | badge.font.size | --p-badge-font-size | Font size of root |
137
+ | badge.font.weight | --p-badge-font-weight | Font weight of root |
138
+ | badge.min.width | --p-badge-min-width | Min width of root |
139
+ | badge.height | --p-badge-height | Height of root |
140
+ | badge.dot.size | --p-badge-dot-size | Size of dot |
141
+ | badge.sm.font.size | --p-badge-sm-font-size | Font size of sm |
142
+ | badge.sm.min.width | --p-badge-sm-min-width | Min width of sm |
143
+ | badge.sm.height | --p-badge-sm-height | Height of sm |
144
+ | badge.lg.font.size | --p-badge-lg-font-size | Font size of lg |
145
+ | badge.lg.min.width | --p-badge-lg-min-width | Min width of lg |
146
+ | badge.lg.height | --p-badge-lg-height | Height of lg |
147
+ | badge.xl.font.size | --p-badge-xl-font-size | Font size of xl |
148
+ | badge.xl.min.width | --p-badge-xl-min-width | Min width of xl |
149
+ | badge.xl.height | --p-badge-xl-height | Height of xl |
150
+ | badge.primary.background | --p-badge-primary-background | Background of primary |
151
+ | badge.primary.color | --p-badge-primary-color | Color of primary |
152
+ | badge.secondary.background | --p-badge-secondary-background | Background of secondary |
153
+ | badge.secondary.color | --p-badge-secondary-color | Color of secondary |
154
+ | badge.success.background | --p-badge-success-background | Background of success |
155
+ | badge.success.color | --p-badge-success-color | Color of success |
156
+ | badge.info.background | --p-badge-info-background | Background of info |
157
+ | badge.info.color | --p-badge-info-color | Color of info |
158
+ | badge.warn.background | --p-badge-warn-background | Background of warn |
159
+ | badge.warn.color | --p-badge-warn-color | Color of warn |
160
+ | badge.danger.background | --p-badge-danger-background | Background of danger |
161
+ | badge.danger.color | --p-badge-danger-color | Color of danger |
162
+ | badge.contrast.background | --p-badge-contrast-background | Background of contrast |
163
+ | badge.contrast.color | --p-badge-contrast-color | Color of contrast |
164
+
165
+ ## Overlay Badge API
166
+
167
+ ### Props
168
+
169
+ | Name |Type |Default |Description |
170
+ | --- | --- | --- | --- |
171
+ | value | string \| number | - | Value to display inside the badge. |
172
+ | severity | null \| HintedString<"secondary" \| "info" \| "success" \| "warn" \| "danger" \| "contrast"> | - | Severity type of the badge. |
173
+ | size | null \| HintedString<"small" \| "large" \| "xlarge"> | - | Size of the badge, valid options are 'small', 'large', and 'xlarge'. |
174
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
175
+ | pt | PassThrough<OverlayBadgePassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
176
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
177
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
178
+
179
+ ### Pass Through Options
180
+
181
+ | Name |Type |Description |
182
+ | --- | --- | --- |
183
+ | root | OverlayBadgePassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
184
+ | pcBadge | any | Used to pass attributes to the Badge. |
185
+ | hooks | any | Used to manage all lifecycle hooks. |
186
+
187
+ ### Theming
188
+
189
+ ### CSS Classes
190
+
191
+ | Class |Description |
192
+ | --- | --- |
193
+ | p-overlaybadge | Class name of the root element |
194
+
195
+ ### Design Tokens
196
+
197
+ | Token |CSS Variable |Description |
198
+ | --- | --- | --- |
199
+ | overlaybadge.outline.width | --p-overlaybadge-outline-width | Outline width of root |
200
+ | overlaybadge.outline.color | --p-overlaybadge-outline-color | Outline color of root |
@@ -0,0 +1,99 @@
1
+ # BlockUI
2
+
3
+ BlockUI can either block other components or the whole page.
4
+
5
+ ## Basic
6
+
7
+ The element to block should be placed as a child of BlockUI and blocked property is required to control the state.
8
+
9
+ ```vue
10
+ <template>
11
+ <div>
12
+ <div class="mb-4">
13
+ <Button @click="blocked = true" class="me-2" severity="secondary">Block</Button>
14
+ <Button @click="blocked = false" severity="secondary">Unblock</Button>
15
+ </div>
16
+ <BlockUI :blocked="blocked">
17
+ <Panel header="Header">
18
+ <p class="m-0 text-sm">
19
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
20
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
21
+ </p>
22
+ </Panel>
23
+ </BlockUI>
24
+ </div>
25
+ </template>
26
+
27
+ <script setup>
28
+ import { ref } from "vue";
29
+
30
+ const blocked = ref(false);
31
+ <\/script>
32
+ ```
33
+
34
+ ## Document
35
+
36
+ If the target element is not specified, BlockUI blocks the document by default.
37
+
38
+ ```vue
39
+ <template>
40
+ <div>
41
+ <BlockUI :blocked="blocked" fullScreen />
42
+ <Button @click="blockDocument">Block</Button>
43
+ </div>
44
+ </template>
45
+
46
+ <script setup>
47
+ import { ref } from "vue";
48
+
49
+ const blocked = ref(false);
50
+ const blockDocument = () => {
51
+ blocked.value = true;
52
+
53
+ setTimeout(() => {
54
+ blocked.value = false;
55
+ }, 3000);
56
+ }
57
+ <\/script>
58
+ ```
59
+
60
+ ## Accessibility
61
+
62
+ Screen Reader BlockUI manages aria-busy state attribute when the UI gets blocked and unblocked. Any valid attribute is passed to the root element so additional attributes like role and aria-live can be used to define live regions. Keyboard Support Component does not include any interactive elements.
63
+
64
+ ## Block UI API
65
+
66
+ ### Props
67
+
68
+ | Name |Type |Default |Description |
69
+ | --- | --- | --- | --- |
70
+ | blocked | boolean | false | Controls the blocked state. |
71
+ | fullScreen | boolean | false | When enabled, the whole document gets blocked. |
72
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
73
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
74
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
75
+ | pt | PassThrough<BlockUIPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
76
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
77
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
78
+
79
+ ### Pass Through Options
80
+
81
+ | Name |Type |Description |
82
+ | --- | --- | --- |
83
+ | root | BlockUIPassThroughOptionType | Used to pass attributes to the root's DOM element. |
84
+ | mask | BlockUIPassThroughOptionType | Used to pass attributes to the mask's DOM element. |
85
+ | hooks | any | Used to manage all lifecycle hooks. |
86
+
87
+ ### Theming
88
+
89
+ ### CSS Classes
90
+
91
+ | Class |Description |
92
+ | --- | --- |
93
+ | p-blockui | Class name of the root element |
94
+
95
+ ### Design Tokens
96
+
97
+ | Token |CSS Variable |Description |
98
+ | --- | --- | --- |
99
+ | blockui.border.radius | --p-blockui-border-radius | Border radius of root |