@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,286 @@
1
+ # PickList
2
+
3
+ PickList is used to reorder items between different lists.
4
+
5
+ ## Basic
6
+
7
+ PickList is used as a controlled input with a multidimensional array bound via v-model , where the first element is the source list and the second is the target list. Content of a list item needs to be defined with the option slot that receives an object in the list as parameter.
8
+
9
+ ```vue
10
+ <template>
11
+ <div>
12
+ <PickList v-model="people" :responsive="true" breakpoint="1400px">
13
+ <template #sourceheader>
14
+ <Label class="ml-1.5">Available Members</Label>
15
+ </template>
16
+ <template #targetheader>
17
+ <Label class="ml-1.5">Team Members</Label>
18
+ </template>
19
+ <template #option="{ option }">
20
+ {{ option.name }}
21
+ </template>
22
+ </PickList>
23
+ </div>
24
+ </template>
25
+
26
+ <script setup>
27
+ import { ref } from 'vue';
28
+
29
+ const people = ref([
30
+ [
31
+ { name: 'Amy Elsner' },
32
+ { name: 'Asiya Javayant' },
33
+ { name: 'Onyama Limba' },
34
+ { name: 'Anna Fali' },
35
+ { name: 'Bernardo Dominic' },
36
+ { name: 'Elwin Sharvill' },
37
+ { name: 'Ioni Bowcher' },
38
+ { name: 'Stephen Shaw' },
39
+ { name: 'Ivan Magalhaes' },
40
+ { name: 'Xuxue Feng' }
41
+ ],
42
+ []
43
+ ]);
44
+ <\/script>
45
+ ```
46
+
47
+ ## Checkbox
48
+
49
+ Combine with Checkbox and a select-all header for batch selection alongside drag-and-drop.
50
+
51
+ ```vue
52
+ <template>
53
+ <PickList v-model="people" v-model:selection="selection" dataKey="name" breakpoint="1400px">
54
+ <template #sourceheader>
55
+ <div class="flex flex-col -mx-2 -mb-0.5">
56
+ <div class="px-2 pb-1.5">
57
+ <Label class="ml-1.5">Available Members</Label>
58
+ </div>
59
+ <div class="flex items-center gap-2 px-3.5 py-1" @click.stop>
60
+ <Checkbox :modelValue="isAllSourceSelected" binary :indeterminate="isSourceIndeterminate" :tabindex="-1" @update:modelValue="toggleAllSource" />
61
+ </div>
62
+ </div>
63
+ </template>
64
+ <template #targetheader>
65
+ <div class="flex flex-col -mx-2 -mb-0.5">
66
+ <div class="px-2 pb-1.5">
67
+ <Label class="ml-1.5">Team Members</Label>
68
+ </div>
69
+ <div class="flex items-center gap-2 px-3.5 py-1" @click.stop>
70
+ <Checkbox :modelValue="isAllTargetSelected" binary :indeterminate="isTargetIndeterminate" :tabindex="-1" @update:modelValue="toggleAllTarget" />
71
+ </div>
72
+ </div>
73
+ </template>
74
+ <template #option="{ option, selected }">
75
+ <div class="flex items-center gap-2 w-full min-w-0">
76
+ <Checkbox :modelValue="selected" binary readonly :tabindex="-1" />
77
+ <span class="truncate">{{ option.name }}</span>
78
+ </div>
79
+ </template>
80
+ </PickList>
81
+ </template>
82
+
83
+ <script setup>
84
+ import { ref, computed } from 'vue';
85
+
86
+ const people = ref([
87
+ [
88
+ { name: 'Amy Elsner' },
89
+ { name: 'Asiya Javayant' },
90
+ { name: 'Onyama Limba' },
91
+ { name: 'Anna Fali' },
92
+ { name: 'Bernardo Dominic' },
93
+ { name: 'Elwin Sharvill' },
94
+ { name: 'Ioni Bowcher' },
95
+ { name: 'Stephen Shaw' },
96
+ { name: 'Ivan Magalhaes' },
97
+ { name: 'Xuxue Feng' }
98
+ ],
99
+ []
100
+ ]);
101
+ const selection = ref([[], []]);
102
+
103
+ const isAllSourceSelected = computed(() => people.value[0].length > 0 && selection.value[0].length === people.value[0].length);
104
+ const isSourceIndeterminate = computed(() => selection.value[0].length > 0 && selection.value[0].length < people.value[0].length);
105
+ const isAllTargetSelected = computed(() => people.value[1].length > 0 && selection.value[1].length === people.value[1].length);
106
+ const isTargetIndeterminate = computed(() => selection.value[1].length > 0 && selection.value[1].length < people.value[1].length);
107
+
108
+ const toggleAllSource = (checked) => {
109
+ selection.value = [checked ? [...people.value[0]] : [], selection.value[1]];
110
+ };
111
+ const toggleAllTarget = (checked) => {
112
+ selection.value = [selection.value[0], checked ? [...people.value[1]] : []];
113
+ };
114
+ <\/script>
115
+ ```
116
+
117
+ ## Filter
118
+
119
+ Filter value is checked against the property of an object configured with the filterBy property.
120
+
121
+ ```vue
122
+ <template>
123
+ <div>
124
+ <PickList v-model="products" dataKey="id" filterBy="name" sourceFilterPlaceholder="Search by name" targetFilterPlaceholder="Search by name" breakpoint="1400px" scrollHeight="20rem">
125
+ <template #option="{ option , selected }">
126
+ <div class="flex flex-wrap p-1 items-center gap-4 w-full">
127
+ <img class="w-12 shrink-0 rounded" :src="'https://primefaces.org/cdn/primevue/images/product/' + option.image" :alt="option.name" />
128
+ <div class="flex-1 flex flex-col">
129
+ <span class="font-medium text-sm">{{ option.name }}</span>
130
+ <span :class="['text-sm', { 'text-surface-500 dark:text-surface-400': !selected, 'text-inherit': selected }]">{{ option.category }}</span>
131
+ </div>
132
+ <span class="font-bold sm:ml-8">\${{ option.price }}</span>
133
+ </div>
134
+ </template>
135
+ </PickList>
136
+ </div>
137
+ </template>
138
+
139
+ <script setup>
140
+ import { ref, onMounted } from 'vue';
141
+ import { ProductService } from '@/service/ProductService'
142
+
143
+ const products = ref(null);
144
+
145
+ onMounted(() => {
146
+ ProductService.getProductsSmall().then((data) => (products.value = [data, []]));
147
+ });
148
+ <\/script>
149
+ ```
150
+
151
+ ## Template
152
+
153
+ For custom content support define an option template that gets the item instance as a parameter. In addition sourceheader and targetheader slots are provided for further customization.
154
+
155
+ ```vue
156
+ <template>
157
+ <div>
158
+ <PickList v-model="products" dataKey="id" breakpoint="1400px" scrollHeight="20rem">
159
+ <template #option="{ option , selected }">
160
+ <div class="flex flex-wrap p-1 items-center gap-4 w-full">
161
+ <img class="w-12 shrink-0 rounded" :src="'https://primefaces.org/cdn/primevue/images/product/' + option.image" :alt="option.name" />
162
+ <div class="flex-1 flex flex-col">
163
+ <span class="font-medium text-sm">{{ option.name }}</span>
164
+ <span :class="['text-sm', { 'text-surface-500 dark:text-surface-400': !selected, 'text-inherit': selected }]">{{ option.category }}</span>
165
+ </div>
166
+ <span class="font-bold sm:ml-8">\${{ option.price }}</span>
167
+ </div>
168
+ </template>
169
+ </PickList>
170
+ </div>
171
+ </template>
172
+
173
+ <script setup>
174
+ import { ref, onMounted } from 'vue';
175
+ import { ProductService } from '@/service/ProductService'
176
+
177
+ const products = ref(null);
178
+
179
+ onMounted(() => {
180
+ ProductService.getProductsSmall().then((data) => (products.value = [data, []]));
181
+ });
182
+ <\/script>
183
+ ```
184
+
185
+ ## Accessibility
186
+
187
+ Screen Reader Value to describe the source listbox and target listbox can be provided with sourceListProps and targetListProps by passing aria-labelledby or aria-label props. The list elements has a listbox role with the aria-multiselectable attribute. Each list item has an option role with aria-selected as their attributes. Controls buttons are button elements with an aria-label that refers to the aria.moveTop , aria.moveUp , aria.moveDown , aria.moveBottom , aria.moveToTarget , aria.moveAllToTarget , aria.moveToSource and aria.moveAllToSource properties of the locale API by default, alternatively you may use moveTopButtonProps , moveUpButtonProps , moveDownButtonProps , moveToButtonProps , moveAllToButtonProps , moveFromButtonProps , moveFromButtonProps moveAllFromButtonProps moveToTargetProps , moveAllToTargetProps , moveToSourceProps and moveAllToSourceProps to customize the buttons like overriding the default aria-label attributes. ListBox Keyboard Support Key Function tab Moves focus to the first selected option, if there is none then first option receives the focus. up arrow Moves focus to the previous option. down arrow Moves focus to the next option. enter Toggles the selected state of the focused option. space Toggles the selected state of the focused option. home Moves focus to the first option. end Moves focus to the last option. shift + down arrow Moves focus to the next option and toggles the selection state. shift + up arrow Moves focus to the previous option and toggles the selection state. shift + space Selects the items between the most recently selected option and the focused option. control + shift + home Selects the focused options and all the options up to the first one. control + shift + end Selects the focused options and all the options down to the first one. control + a Selects all options. Buttons Keyboard Support Key Function enter Executes button action. space Executes button action.
188
+
189
+ ```vue
190
+ <template>
191
+ <span id="lb">Options</span>
192
+ <PickList aria-labelledby="lb" />
193
+
194
+ <PickList aria-label="City" />
195
+ </template>
196
+ ```
197
+
198
+ ## Pick List API
199
+
200
+ ### Props
201
+
202
+ | Name |Type |Default |Description |
203
+ | --- | --- | --- | --- |
204
+ | modelValue | any[][] | - | Value of the component as a multidimensional array. |
205
+ | selection | any[][] | - | Selected items in the list as a multidimensional array. |
206
+ | dataKey | string | - | Name of the field that uniquely identifies the a record in the data. |
207
+ | metaKeySelection | boolean | false | Defines whether metaKey is requred or not for the selection. When true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically. |
208
+ | autoOptionFocus | boolean | true | Whether to focus on the first visible or selected element. |
209
+ | focusOnHover | boolean | true | When enabled, the focus is placed on the hovered option. |
210
+ | listStyle | any | - | Inline style of the the list element. |
211
+ | responsive | boolean | true | Whether the list optimizes layout based on screen size. |
212
+ | breakpoint | string | 960px | The breakpoint to define the maximum width boundary when responsiveness is enabled. |
213
+ | scrollHeight | string | 14rem | Height of the viewport, a scrollbar is defined if height of list exceeds this value. |
214
+ | filterBy | string \| string[] | - | When specified displays an input field to filter the items, the value is checked against this property. |
215
+ | filterLocale | string | - | Locale to use in filtering. The default locale is the host environment's current locale. |
216
+ | filterMatchMode | "startsWith" \| "contains" \| "endsWith" | contains | Defines the filtering algorithm to use when searching the options. |
217
+ | showSourceFilter | boolean | true | Whether to show the filter input for the source list when filtering is enabled. |
218
+ | showTargetFilter | boolean | true | Whether to show the filter input for the target list when filtering is enabled. |
219
+ | sourceFilterPlaceholder | string | - | Placeholder text on the source filter input. |
220
+ | targetFilterPlaceholder | string | - | Placeholder text on the target filter input. |
221
+ | filterMessage | string | - | Text to be displayed in hidden accessible field when filtering returns any results. |
222
+ | emptyFilterMessage | string | - | Text to be displayed when filtering does not return any results. |
223
+ | emptyMessage | string | - | Text to be displayed when there are no options available. |
224
+ | striped | boolean | false | Whether to displays rows with alternating colors. |
225
+ | showSourceControls | boolean | true | Whether to show buttons of source list. |
226
+ | showTargetControls | boolean | true | Whether to show buttons of target list. |
227
+ | buttonProps | object | - | Used to pass all properties of the ButtonProps to the move up button inside the component. |
228
+ | moveUpButtonProps | object | - | Used to pass all properties of the ButtonProps to the move up button inside the component. |
229
+ | moveTopButtonProps | object | - | Used to pass all properties of the ButtonProps to the move top button inside the component. |
230
+ | moveDownButtonProps | object | - | Used to pass all properties of the ButtonProps to the move down button inside the component. |
231
+ | moveBottomButtonProps | object | - | Used to pass all properties of the ButtonProps to the move bottom button inside the component. |
232
+ | moveToTargetProps | object | - | Used to pass all properties of the ButtonProps to the move to target button inside the component. |
233
+ | moveAllToTargetProps | object | - | Used to pass all properties of the ButtonProps to the move all to target button inside the component. |
234
+ | moveToSourceProps | object | - | Used to pass all properties of the ButtonProps to the move to source button inside the component. |
235
+ | moveAllToSourceProps | object | - | Used to pass all properties of the ButtonProps to the move all to source button inside the component. |
236
+ | tabindex | string \| number | - | Index of the list element in tabbing order. |
237
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
238
+ | pt | PassThrough<PickListPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
239
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
240
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
241
+
242
+ ### Pass Through Options
243
+
244
+ | Name |Type |Description |
245
+ | --- | --- | --- |
246
+ | root | PickListPassThroughOptionType | Used to pass attributes to the root's DOM element. |
247
+ | sourceControls | PickListPassThroughOptionType | Used to pass attributes to the source controls' DOM element. |
248
+ | pcSourceMoveUpButton | any | Used to pass attributes to the Button component. |
249
+ | pcSourceMoveTopButton | any | Used to pass attributes to the Button component. |
250
+ | pcSourceMoveDownButton | any | Used to pass attributes to the Button component. |
251
+ | pcSourceMoveBottomButton | any | Used to pass attributes to the Button component. |
252
+ | pcListbox | any | Used to pass attributes to the Listbox component. |
253
+ | sourceListContainer | PickListPassThroughOptionType | Used to pass attributes to the source list containerr's DOM element. |
254
+ | transferControls | PickListPassThroughOptionType | Used to pass attributes to the transfer controls' DOM element. |
255
+ | pcMoveToTargetButton | any | Used to pass attributes to the Button component. |
256
+ | pcMoveAllToTargetButton | any | Used to pass attributes to the Button component. |
257
+ | pcMoveToSourceButton | any | Used to pass attributes to the Button component. |
258
+ | pcMoveAllToSourceButton | any | Used to pass attributes to the Button component. |
259
+ | targetListContainer | PickListPassThroughOptionType | Used to pass attributes to the target list container's DOM element. |
260
+ | targetControls | PickListPassThroughOptionType | Used to pass attributes to the target controls' DOM element. |
261
+ | pcTargetMoveUpButton | any | Used to pass attributes to the Button component. |
262
+ | pcTargetMoveTopButton | any | Used to pass attributes to the Button component. |
263
+ | pcTargetMoveDownButton | any | Used to pass attributes to the Button component. |
264
+ | pcTargetMoveBottomButton | any | Used to pass attributes to the Button component. |
265
+ | hooks | any | Used to manage all lifecycle hooks. |
266
+ | transition | PickListPassThroughTransitionType | Used to control Vue Transition API. |
267
+
268
+ ### Theming
269
+
270
+ ### CSS Classes
271
+
272
+ | Class |Description |
273
+ | --- | --- |
274
+ | p-picklist | Class name of the root element |
275
+ | p-picklist-source-controls | Class name of the source controls element |
276
+ | p-picklist-source-list-container | Class name of the source list container element |
277
+ | p-picklist-transfer-controls | Class name of the transfer controls element |
278
+ | p-picklist-target-list-container | Class name of the target list container element |
279
+ | p-picklist-target-controls | Class name of the target controls element |
280
+
281
+ ### Design Tokens
282
+
283
+ | Token |CSS Variable |Description |
284
+ | --- | --- | --- |
285
+ | picklist.gap | --p-picklist-gap | Gap of root |
286
+ | picklist.controls.gap | --p-picklist-controls-gap | Gap of controls |
@@ -0,0 +1,145 @@
1
+ # Popover
2
+
3
+ Popover is a container component that can overlay other components on page.
4
+
5
+ ## Basic
6
+
7
+ Popover is accessed via its ref and visibility is controlled using toggle , show and hide functions with an event of the target.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <Button type="button" severity="secondary" variant="outlined" @click="toggle">Show Popover</Button>
13
+ <Popover ref="op">
14
+ <div class="max-w-72 w-full">
15
+ <div class="flex items-center justify-between">
16
+ <span class="font-semibold">Create a New Workspace</span>
17
+ </div>
18
+ <p class="text-sm text-muted-color mt-2 mb-0!">Name your workspace to get started. You can always change this later.</p>
19
+ <InputText placeholder="Workspace Name" class="mt-3 w-full" />
20
+ <div class="flex items-center justify-between mt-4">
21
+ <span class="text-xs text-surface-500 dark:text-surface-400">Lowercase letters and dashes only</span>
22
+ <div class="flex items-center gap-2">
23
+ <Button type="button" severity="secondary" variant="outlined" size="small" @click="hide">Cancel</Button>
24
+ <Button type="button" size="small" @click="hide">Create</Button>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </Popover>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup>
33
+ import { ref } from "vue";
34
+
35
+ const op = ref();
36
+
37
+ const toggle = (event) => {
38
+ op.value.toggle(event);
39
+ }
40
+
41
+ const hide = () => {
42
+ op.value.hide();
43
+ }
44
+ <\/script>
45
+ ```
46
+
47
+ ## Controlled
48
+
49
+ Popover visibility can be controlled from outside by accessing the component with a template ref and calling its show , hide and toggle methods. Pass the trigger element as the second argument to keep the overlay anchored to it.
50
+
51
+ ```vue
52
+ <template>
53
+ <div class="flex gap-4 justify-center items-center">
54
+ <Button type="button" @click="toggleFromOutside">Show Popover</Button>
55
+ <Button ref="trigger" type="button" severity="secondary" variant="outlined" @click="toggle">Popover Trigger</Button>
56
+ <Popover ref="op">
57
+ <div class="max-w-72 w-full">
58
+ <div class="flex items-center justify-between">
59
+ <span class="font-semibold text-sm">Create a New Workspace</span>
60
+ </div>
61
+ <p class="text-sm text-muted-color mt-2 mb-0!">Name your workspace to get started. You can always change this later.</p>
62
+ <InputText placeholder="Workspace Name" class="mt-3 w-full" />
63
+ <div class="flex items-center justify-between mt-4">
64
+ <span class="text-xs text-surface-500 dark:text-surface-400">Lowercase letters and dashes only</span>
65
+ <div class="flex items-center gap-2">
66
+ <Button type="button" severity="secondary" variant="outlined" size="small" @click="hide">Cancel</Button>
67
+ <Button type="button" size="small" @click="hide">Create</Button>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </Popover>
72
+ </div>
73
+ </template>
74
+
75
+ <script setup>
76
+ import { ref } from "vue";
77
+
78
+ const op = ref();
79
+ const trigger = ref();
80
+
81
+ const toggle = (event) => {
82
+ op.value.toggle(event);
83
+ }
84
+
85
+ const toggleFromOutside = (event) => {
86
+ op.value.toggle(event, trigger.value.$el);
87
+ }
88
+
89
+ const hide = () => {
90
+ op.value.hide();
91
+ }
92
+ <\/script>
93
+ ```
94
+
95
+ ## Accessibility
96
+
97
+ Screen Reader Popover component uses dialog role and since any attribute is passed to the root element you may define attributes like aria-label or aria-labelledby to describe the popup contents. In addition aria-modal is added since focus is kept within the popup. It is recommended to use a trigger component that can be accessed with keyboard such as a button, if not adding tabIndex would be necessary. Popover adds aria-expanded state attribute and aria-controls to the trigger so that the relation between the trigger and the popup is defined. Popover Keyboard Support When the popup gets opened, the first focusable element receives the focus and this can be customized by adding autofocus to an element within the popup. Key Function tab Moves focus to the next the focusable element within the popup. shift + tab Moves focus to the previous the focusable element within the popup. escape Closes the popup and moves focus to the trigger. Close Button Keyboard Support Key Function enter Closes the popup and moves focus to the trigger. space Closes the popup and moves focus to the trigger.
98
+
99
+ ## Popover API
100
+
101
+ ### Props
102
+
103
+ | Name |Type |Default |Description |
104
+ | --- | --- | --- | --- |
105
+ | dismissable | boolean | true | Enables to hide the overlay when outside is clicked. |
106
+ | appendTo | HTMLElement \| HintedString<"body" \| "self"> | body | A valid query selector or an HTMLElement to specify where the overlay gets attached. |
107
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
108
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
109
+ | breakpoints | PopoverBreakpoints | - | Object literal to define widths per screen size. |
110
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
111
+ | pt | PassThrough<PopoverPassThroughOptions> | - | 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
+ | closeOnEscape | boolean | true | Specifies if pressing escape key should hide the dialog. |
115
+
116
+ ### Pass Through Options
117
+
118
+ | Name |Type |Description |
119
+ | --- | --- | --- |
120
+ | root | PopoverPassThroughOptionType | Used to pass attributes to the root's DOM element. |
121
+ | content | PopoverPassThroughOptionType | Used to pass attributes to the content's DOM element. |
122
+ | hooks | any | Used to manage all lifecycle hooks. |
123
+ | transition | PopoverPassThroughTransitionType | Used to control Vue Transition API. |
124
+
125
+ ### Theming
126
+
127
+ ### CSS Classes
128
+
129
+ | Class |Description |
130
+ | --- | --- |
131
+ | p-popover | Class name of the root element |
132
+ | p-popover-content | Class name of the content element |
133
+
134
+ ### Design Tokens
135
+
136
+ | Token |CSS Variable |Description |
137
+ | --- | --- | --- |
138
+ | popover.background | --p-popover-background | Background of root |
139
+ | popover.border.color | --p-popover-border-color | Border color of root |
140
+ | popover.color | --p-popover-color | Color of root |
141
+ | popover.border.radius | --p-popover-border-radius | Border radius of root |
142
+ | popover.shadow | --p-popover-shadow | Shadow of root |
143
+ | popover.gutter | --p-popover-gutter | Gutter of root |
144
+ | popover.arrow.offset | --p-popover-arrow-offset | Arrow offset of root |
145
+ | popover.content.padding | --p-popover-content-padding | Padding of content |
@@ -0,0 +1,242 @@
1
+ # ProgressBar
2
+
3
+ ProgressBar is a process status indicator.
4
+
5
+ ## Basic
6
+
7
+ Reflects the completion percentage of an ongoing process.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="max-w-sm mx-auto">
12
+ <ProgressBar :value="50" />
13
+ </div>
14
+ </template>
15
+ ```
16
+
17
+ ## Dynamic
18
+
19
+ Value is reactive so updating it dynamically changes the bar as well.
20
+
21
+ ```vue
22
+ <template>
23
+ <div class="max-w-sm mx-auto">
24
+ <div class="text-color font-medium text-sm mb-2">Uploading Files</div>
25
+ <ProgressBar :value="value" />
26
+ </div>
27
+ </template>
28
+
29
+ <script setup>
30
+ import { ref, onMounted, onBeforeUnmount } from 'vue';
31
+
32
+ const value = ref(0);
33
+ const interval = ref(null);
34
+
35
+ onMounted(() => {
36
+ interval.value = setInterval(() => {
37
+ const newValue = Math.round(value.value + Math.random() * 40 + 1);
38
+
39
+ if (newValue >= 100) {
40
+ value.value = 100;
41
+ clearInterval(interval.value);
42
+ } else {
43
+ value.value = newValue;
44
+ }
45
+ }, 2000);
46
+ });
47
+
48
+ onBeforeUnmount(() => {
49
+ if (interval.value) {
50
+ clearInterval(interval.value);
51
+ }
52
+ });
53
+ <\/script>
54
+ ```
55
+
56
+ ## Template
57
+
58
+ The displayed value can be formatted freely and the bar restyled through passthrough; here several bars share the same animated progress with different formatters.
59
+
60
+ ```vue
61
+ <template>
62
+ <div class="max-w-sm mx-auto space-y-8">
63
+ <div>
64
+ <div class="flex items-center justify-between mb-3 text-sm">
65
+ <span class="font-medium">Basic Percentage</span>
66
+ <span>{{ basicLabel }}</span>
67
+ </div>
68
+ <ProgressBar :value="percent" :showValue="false" :pt="{ root: 'h-1.5! rounded-full!', value: 'bg-blue-600! rounded-full!' }" />
69
+ </div>
70
+
71
+ <div>
72
+ <div class="flex items-center justify-between mb-3 text-sm">
73
+ <span class="font-medium">File Size Progress</span>
74
+ <span>{{ fileSizeLabel }}</span>
75
+ </div>
76
+ <ProgressBar :value="percent" :showValue="false" :pt="{ root: 'h-1.5! rounded-full!', value: 'bg-emerald-600! rounded-full!' }" />
77
+ </div>
78
+
79
+ <div>
80
+ <div class="flex items-center justify-between mb-3 text-sm">
81
+ <span class="font-medium">Time Remaining</span>
82
+ <span>{{ timeLabel }}</span>
83
+ </div>
84
+ <ProgressBar :value="percent" :showValue="false" :pt="{ root: 'h-1.5! rounded-full!', value: 'bg-purple-600! rounded-full!' }" />
85
+ </div>
86
+
87
+ <div>
88
+ <div class="flex items-center justify-between mb-3 text-sm">
89
+ <span class="font-medium">Upload Status Steps</span>
90
+ <span>{{ statusLabel }}</span>
91
+ </div>
92
+ <ProgressBar :value="percent" :showValue="false" :pt="{ root: 'h-1.5! rounded-full!', value: 'bg-orange-600! rounded-full!' }" />
93
+ </div>
94
+ </div>
95
+ </template>
96
+
97
+ <script setup>
98
+ import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
99
+
100
+ const uploadedFileSize = ref(0);
101
+ const maxFileSize = 5000;
102
+ let interval = null;
103
+
104
+ const percent = computed(() => (uploadedFileSize.value / maxFileSize) * 100);
105
+
106
+ const formatFileSize = (bytes) => {
107
+ if (bytes < 1024) return bytes.toFixed(2) + ' B';
108
+ else if (bytes < 1048576) return (bytes / 1024).toFixed(2) + ' KB';
109
+ else return (bytes / 1048576).toFixed(2) + ' MB';
110
+ };
111
+
112
+ const basicLabel = computed(() => \`\${percent.value.toFixed(1)}%\`);
113
+ const fileSizeLabel = computed(() => \`\${formatFileSize((percent.value / 100) * maxFileSize)} / \${formatFileSize(maxFileSize)}\`);
114
+ const timeLabel = computed(() => {
115
+ const remaining = ((maxFileSize - uploadedFileSize.value) / 200).toFixed(0);
116
+
117
+ return \`\${percent.value.toFixed(0)}% (\${remaining}s remaining)\`;
118
+ });
119
+ const statusLabel = computed(() => {
120
+ const v = percent.value;
121
+
122
+ if (v < 40) return 'Preparing file...';
123
+ else if (v < 60) return 'Uploading file...';
124
+ else if (v < 99) return 'Finalizing...';
125
+ else return 'Upload complete';
126
+ });
127
+
128
+ onMounted(() => {
129
+ interval = setInterval(() => {
130
+ const newValue = uploadedFileSize.value + Math.floor(Math.random() * 200) + 1;
131
+
132
+ uploadedFileSize.value = newValue >= maxFileSize ? maxFileSize : newValue;
133
+ }, 500);
134
+ });
135
+
136
+ onBeforeUnmount(() => clearInterval(interval));
137
+ <\/script>
138
+ ```
139
+
140
+ ## Indeterminate
141
+
142
+ For progresses with no value to track, set the mode property to indeterminate .
143
+
144
+ ```vue
145
+ <template>
146
+ <div class="max-w-sm mx-auto">
147
+ <ProgressBar mode="indeterminate" :style="{ height: '6px' }" />
148
+ </div>
149
+ </template>
150
+ ```
151
+
152
+ ## As Steps
153
+
154
+ Steps are used to display a progress with multiple steps.
155
+
156
+ ```vue
157
+ <template>
158
+ <div class="max-w-sm mx-auto">
159
+ <div class="mb-3 font-medium text-sm">{{ orderProgress[step].status }}</div>
160
+ <ProgressBar :value="stepValue" />
161
+ <div class="flex items-center justify-between mt-6">
162
+ <Button type="button" :rounded="true" variant="text" severity="contrast" @click="prevStep()" :disabled="step === 0">Previous</Button>
163
+ <Button type="button" :rounded="true" variant="text" severity="contrast" @click="nextStep()" :disabled="step === orderProgress.length - 1">Next</Button>
164
+ </div>
165
+ </div>
166
+ </template>
167
+
168
+ <script setup>
169
+ import { ref, computed } from 'vue';
170
+
171
+ const orderProgress = ref([{ status: 'Place Order' }, { status: 'Order Placed' }, { status: 'Processing' }, { status: 'Shipped' }, { status: 'Delivered' }]);
172
+ const step = ref(1);
173
+
174
+ const stepValue = computed(() => (step.value / (orderProgress.value.length - 1)) * 100);
175
+
176
+ const nextStep = () => {
177
+ step.value = Math.min(step.value + 1, orderProgress.value.length - 1);
178
+ };
179
+
180
+ const prevStep = () => {
181
+ step.value = Math.max(step.value - 1, 0);
182
+ };
183
+ <\/script>
184
+ ```
185
+
186
+ ## Accessibility
187
+
188
+ Screen Reader ProgressBar components uses progressbar role along with aria-valuemin , aria-valuemax and aria-valuenow attributes. Value to describe the component can be defined using aria-labelledby and aria-label props. Keyboard Support Not applicable.
189
+
190
+ ```vue
191
+ <template>
192
+ <span id="label_status">Status</span>
193
+ <ProgressBar aria-labelledby="label_status" />
194
+
195
+ <ProgressBar aria-label="Status" />
196
+ </template>
197
+ ```
198
+
199
+ ## Progress Bar API
200
+
201
+ ### Props
202
+
203
+ | Name |Type |Default |Description |
204
+ | --- | --- | --- | --- |
205
+ | value | number | - | Current value of the progress. |
206
+ | mode | "indeterminate" \| "determinate" | determinate | Defines the mode of the progress |
207
+ | showValue | boolean | true | Whether to display the progress bar value. |
208
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
209
+ | pt | PassThrough<ProgressBarPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
210
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
211
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
212
+
213
+ ### Pass Through Options
214
+
215
+ | Name |Type |Description |
216
+ | --- | --- | --- |
217
+ | root | ProgressBarPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
218
+ | value | ProgressBarPassThroughOptionType<T> | Used to pass attributes to the value's DOM element. |
219
+ | label | ProgressBarPassThroughOptionType<T> | Used to pass attributes to the label's DOM element. |
220
+ | hooks | any | Used to manage all lifecycle hooks. |
221
+
222
+ ### Theming
223
+
224
+ ### CSS Classes
225
+
226
+ | Class |Description |
227
+ | --- | --- |
228
+ | p-progressbar | Class name of the root element |
229
+ | p-progressbar-value | Class name of the value element |
230
+ | p-progressbar-label | Class name of the label element |
231
+
232
+ ### Design Tokens
233
+
234
+ | Token |CSS Variable |Description |
235
+ | --- | --- | --- |
236
+ | progressbar.background | --p-progressbar-background | Background of root |
237
+ | progressbar.border.radius | --p-progressbar-border-radius | Border radius of root |
238
+ | progressbar.height | --p-progressbar-height | Height of root |
239
+ | progressbar.value.background | --p-progressbar-value-background | Background of value |
240
+ | progressbar.label.color | --p-progressbar-label-color | Color of label |
241
+ | progressbar.label.font.size | --p-progressbar-label-font-size | Font size of label |
242
+ | progressbar.label.font.weight | --p-progressbar-label-font-weight | Font weight of label |