@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,214 @@
1
+ # Dynamic Dialog
2
+
3
+ Dialogs can be created dynamically with any component as the content using a DialogService.
4
+
5
+ ## Dialog Service
6
+
7
+ A single shared dialog instance is required in the application, ideal location would be defining it once at the main application template. A dynamic dialog is controlled via the DialogService that needs to be installed as an application plugin. The service is available with the useDialog function for Composition API or using the $dialog property of the application for Options API.
8
+
9
+ ## Opening a Dialog
10
+
11
+ The open function of the DialogService is used to open a Dialog. First parameter is the component to load and second one is the configuration object to customize the Dialog. The component can also be loaded asynchronously, this approach is useful in conditional cases and to improve initial load times as well.
12
+
13
+ ## Customization
14
+
15
+ DynamicDialog uses the Dialog component internally, visit dialog for more information about the available props.
16
+
17
+ ```vue
18
+ import ProductListDemo from './ProductListDemo';
19
+ import { useDialog } from 'primevue/usedialog';
20
+
21
+ const dialog = useDialog();
22
+
23
+ const showProducts = () => {
24
+ dialog.open(ProductListDemo, {
25
+ props: {
26
+ header: 'Product List',
27
+ style: {
28
+ width: '50vw',
29
+ },
30
+ breakpoints:{
31
+ '960px': '75vw',
32
+ '640px': '90vw'
33
+ },
34
+ modal: true
35
+ }
36
+ });
37
+ }
38
+ ```
39
+
40
+ ## Passing Data
41
+
42
+ Use the data property to pass parameters when opening a Dialog, the internal component can later access this data using dialogRef . Similarly when hiding a Dialog, any parameter passed to the close function is received from the onClose callback.
43
+
44
+ ## Closing a Dialog
45
+
46
+ Most of the time, the requirement is returning a value from the dialog. The close function of the dialogRef is used for this purpose where the parameter passed will be available through the onClose callback at the caller. The dialogRef is injected to the component loaded by the dialog.
47
+
48
+ ## Events
49
+
50
+ The emits object defines callbacks to handle events emitted by the component within the Dialog.
51
+
52
+ ## Example
53
+
54
+ A sample implementation to demonstrate loading components asynchronously, nested content and passing data.
55
+
56
+ ```vue
57
+ <template>
58
+ <div class="flex justify-center">
59
+ <Button @click="showProducts">
60
+ <Search />
61
+ Select a Product
62
+ </Button>
63
+ <Toast />
64
+ <DynamicDialog />
65
+ </div>
66
+ </template>
67
+
68
+ <script setup>
69
+ import Search from '@primeicons/vue/search';
70
+ import { markRaw, defineAsyncComponent } from 'vue';
71
+ import { useDialog } from 'primevue/usedialog';
72
+ import { useToast } from 'primevue/usetoast';
73
+ import Button from 'primevue/button';
74
+ const ProductListDemo = defineAsyncComponent(() => import('./components/ProductListDemo.vue'));
75
+ const FooterDemo = defineAsyncComponent(() => import('./components/FooterDemo.vue'));
76
+
77
+ const dialog = useDialog();
78
+ const toast = useToast();
79
+
80
+ const showProducts = () => {
81
+ const dialogRef = dialog.open(ProductListDemo, {
82
+ props: {
83
+ header: 'Product List',
84
+ style: {
85
+ width: '50vw',
86
+ },
87
+ breakpoints:{
88
+ '960px': '75vw',
89
+ '640px': '90vw'
90
+ },
91
+ modal: true
92
+ },
93
+ templates: {
94
+ footer: markRaw(FooterDemo)
95
+ },
96
+ onClose: (options) => {
97
+ const data = options.data;
98
+ if (data) {
99
+ const buttonType = data.buttonType;
100
+ const summary_and_detail = buttonType ? { summary: 'No Product Selected', detail: \`Pressed '\${buttonType}' button\` } : { summary: 'Product Selected', detail: data.name };
101
+
102
+ toast.add({ severity:'info', ...summary_and_detail, life: 3000 });
103
+ }
104
+ }
105
+ });
106
+ }
107
+ <\/script>
108
+ ```
109
+
110
+ ## Accessibility
111
+
112
+ Visit accessibility section of dialog component for more information.
113
+
114
+ ## Dynamic Dialog API
115
+
116
+ ### Props
117
+
118
+ | Name |Type |Default |Description |
119
+ | --- | --- | --- | --- |
120
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
121
+
122
+ ### Theming
123
+
124
+ ## Dialog API
125
+
126
+ ### Props
127
+
128
+ | Name |Type |Default |Description |
129
+ | --- | --- | --- | --- |
130
+ | header | string | - | Title content of the dialog. |
131
+ | footer | string | - | Footer content of the dialog. |
132
+ | visible | boolean | false | Specifies the visibility of the dialog. |
133
+ | modal | boolean | false | Defines if background should be blocked when dialog is displayed. |
134
+ | contentStyle | any | - | Style of the content section. |
135
+ | contentClass | any | - | Style class of the content section. |
136
+ | contentProps | HTMLAttributes | - | Used to pass all properties of the HTMLDivElement to the overlay Dialog inside the component. |
137
+ | closable | boolean | true | Adds a close icon to the header to hide the dialog. |
138
+ | dismissableMask | boolean | false | Specifies if clicking the modal background should hide the dialog. |
139
+ | closeOnEscape | boolean | true | Specifies if pressing escape key should hide the dialog. |
140
+ | showHeader | boolean | true | Whether to show the header or not. |
141
+ | blockScroll | boolean | false | Whether background scroll should be blocked when dialog is visible. |
142
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
143
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
144
+ | position | HintedString<"left" \| "right" \| "top" \| "bottom" \| "center" \| "topleft" \| "topright" \| "bottomleft" \| "bottomright"> | center | Position of the dialog. |
145
+ | maximizable | boolean | false | Whether the dialog can be displayed full screen. |
146
+ | breakpoints | DialogBreakpoints | - | Object literal to define widths per screen size. |
147
+ | draggable | boolean | true | Enables dragging to change the position using header. |
148
+ | keepInViewport | boolean | true | Keeps dialog in the viewport when dragging. |
149
+ | minX | number | 0. | Minimum value for the left coordinate of dialog in dragging. |
150
+ | minY | number | 0 | Minimum value for the top coordinate of dialog in dragging. |
151
+ | appendTo | HTMLElement \| HintedString<"body" \| "self"> | body | A valid query selector or an HTMLElement to specify where the dialog gets attached. |
152
+ | style | any | - | Style of the dynamic dialog. |
153
+ | closeIcon | string | - | Icon to display in the dialog close button. |
154
+ | maximizeIcon | string | - | Icon to display in the dialog maximize button when dialog is not maximized. |
155
+ | minimizeIcon | string | - | Icon to display in the dialog maximize button when dialog is minimized. |
156
+ | closeButtonProps | object | - | Used to pass all properties of the ButtonProps to the Button component. |
157
+ | maximizeButtonProps | object | - | Used to pass all properties of the ButtonProps to the Button component. |
158
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
159
+ | pt | PassThrough<DialogPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
160
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
161
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
162
+
163
+ ### Pass Through Options
164
+
165
+ | Name |Type |Description |
166
+ | --- | --- | --- |
167
+ | root | DialogPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
168
+ | header | DialogPassThroughOptionType<T> | Used to pass attributes to the header's DOM element. |
169
+ | title | DialogPassThroughOptionType<T> | Used to pass attributes to the header title's DOM element. |
170
+ | headerActions | DialogPassThroughOptionType<T> | Used to pass attributes to the header actions' DOM element. |
171
+ | pcMaximizeButton | any | Used to pass attributes to the maximize Button component. |
172
+ | pcCloseButton | any | Used to pass attributes to the close Button component. |
173
+ | content | DialogPassThroughOptionType<T> | Used to pass attributes to the content's DOM element. |
174
+ | footer | DialogPassThroughOptionType<T> | Used to pass attributes to the footer's DOM element. |
175
+ | mask | DialogPassThroughOptionType<T> | Used to pass attributes to the mask's DOM element. |
176
+ | hooks | any | Used to manage all lifecycle hooks. |
177
+ | transition | DialogPassThroughTransitionType<T> | Used to control Vue Transition API. |
178
+
179
+ ### Theming
180
+
181
+ ### CSS Classes
182
+
183
+ | Class |Description |
184
+ | --- | --- |
185
+ | p-dialog-mask | Class name of the mask element |
186
+ | p-dialog | Class name of the root element |
187
+ | p-dialog-header | Class name of the header element |
188
+ | p-dialog-title | Class name of the title element |
189
+ | p-dialog-header-actions | Class name of the header actions element |
190
+ | p-dialog-maximize-button | Class name of the maximize button element |
191
+ | p-dialog-close-button | Class name of the close button element |
192
+ | p-dialog-content | Class name of the content element |
193
+ | p-dialog-footer | Class name of the footer element |
194
+
195
+ ### Design Tokens
196
+
197
+ | Token |CSS Variable |Description |
198
+ | --- | --- | --- |
199
+ | dialog.background | --p-dialog-background | Background of root |
200
+ | dialog.border.color | --p-dialog-border-color | Border color of root |
201
+ | dialog.color | --p-dialog-color | Color of root |
202
+ | dialog.border.radius | --p-dialog-border-radius | Border radius of root |
203
+ | dialog.shadow | --p-dialog-shadow | Shadow of root |
204
+ | dialog.header.padding | --p-dialog-header-padding | Padding of header |
205
+ | dialog.header.gap | --p-dialog-header-gap | Gap of header |
206
+ | dialog.title.font.size | --p-dialog-title-font-size | Font size of title |
207
+ | dialog.title.font.weight | --p-dialog-title-font-weight | Font weight of title |
208
+ | dialog.content.padding | --p-dialog-content-padding | Padding of content |
209
+ | dialog.footer.padding | --p-dialog-footer-padding | Padding of footer |
210
+ | dialog.footer.gap | --p-dialog-footer-gap | Gap of footer |
211
+
212
+ ## Dialog Service Use Dialog API
213
+
214
+ ## Dynamic Dialog Options API
@@ -0,0 +1,205 @@
1
+ # Editor
2
+
3
+ Editor is rich text editor component based on Quill.
4
+
5
+ ## Quill
6
+
7
+ Editor uses Quill editor underneath so it needs to be installed as a dependency.
8
+
9
+ ```vue
10
+ npm install quill
11
+ ```
12
+
13
+ ## Basic
14
+
15
+ A model can be bound using the standard v-model directive.
16
+
17
+ ```vue
18
+ <template>
19
+ <div>
20
+ <Editor v-model="value" editorStyle="height: 320px" />
21
+ </div>
22
+ </template>
23
+
24
+ <script setup>
25
+ import { ref } from "vue";
26
+
27
+ const value = ref('');
28
+ <\/script>
29
+ ```
30
+
31
+ ## ReadOnly
32
+
33
+ When readonly is present, the value cannot be edited.
34
+
35
+ ```vue
36
+ <template>
37
+ <div>
38
+ <Editor v-model="value" editorStyle="height: 320px" readonly />
39
+ </div>
40
+ </template>
41
+
42
+ <script setup>
43
+ import { ref } from "vue";
44
+
45
+ const value = ref('Always bet on Prime!');
46
+ <\/script>
47
+ ```
48
+
49
+ ## Template
50
+
51
+ Editor provides a default toolbar with common options, to customize it define your elements inside the header element. Refer to Quill documentation for available controls.
52
+
53
+ ```vue
54
+ <template>
55
+ <div>
56
+ <Editor v-model="value" editorStyle="height: 320px">
57
+ <template v-slot:toolbar>
58
+ <span class="ql-formats">
59
+ <button type="button" class="ql-bold" aria-label="Bold"></button>
60
+ <button type="button" class="ql-italic" aria-label="Italic"></button>
61
+ <button type="button" class="ql-underline" aria-label="Underline"></button>
62
+ </span>
63
+ </template>
64
+ </Editor>
65
+ </div>
66
+ </template>
67
+
68
+ <script setup>
69
+ import { ref } from "vue";
70
+
71
+ const value = ref('<div>Hello World!</div><div>PrimeVue <b>Editor</b> Rocks</div><div><br></div>');
72
+ <\/script>
73
+ ```
74
+
75
+ ## Forms
76
+
77
+ Editor integrates seamlessly with the PrimeVue Forms library.
78
+
79
+ ```vue
80
+ <template>
81
+ <div>
82
+ <Form v-slot="$form" :resolver="resolver" :initialValues="initialValues" @submit="onFormSubmit" class="flex flex-col gap-4">
83
+ <div class="flex flex-col gap-1">
84
+ <Editor name="content" editorStyle="height: 320px" />
85
+ <Message v-if="$form.content?.invalid" severity="error" size="small" variant="simple">{{ $form.content.error?.message }}</Message>
86
+ </div>
87
+ <Button type="submit" severity="secondary">Submit</Button>
88
+ </Form>
89
+ </div>
90
+ </template>
91
+
92
+ <script setup>
93
+ import { ref } from 'vue';
94
+ import { zodResolver } from '@primevue/forms/resolvers/zod';
95
+ import { useToast } from "primevue/usetoast";
96
+ import { z } from 'zod';
97
+
98
+ const toast = useToast();
99
+ const initialValues = ref({
100
+ content: ''
101
+ });
102
+ const resolver = ref(zodResolver(
103
+ z.object({
104
+ content: z.string().min(1, { message: 'Content is required.' })
105
+ })
106
+ ));
107
+
108
+ const onFormSubmit = ({ valid }) => {
109
+ if (valid) {
110
+ toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
111
+ }
112
+ };
113
+ <\/script>
114
+ ```
115
+
116
+ ## Accessibility
117
+
118
+ Quill performs generally well in terms of accessibility. The elements in the toolbar can be tabbed and have the necessary ARIA roles/attributes for screen readers. One known limitation is the lack of arrow key support for dropdowns in the toolbar that may be overcome with a custom toolbar.
119
+
120
+ ## Editor API
121
+
122
+ ### Props
123
+
124
+ | Name |Type |Default |Description |
125
+ | --- | --- | --- | --- |
126
+ | modelValue | string | - | Value of the content. |
127
+ | defaultValue | any | - | The default value for the input when not controlled by `modelValue` . |
128
+ | name | string | - | The name attribute for the element, typically used in form submissions. |
129
+ | placeholder | string | - | Placeholder text to show when editor is empty. |
130
+ | readonly | boolean | false | Whether to instantiate the editor to readonly mode. |
131
+ | invalid | boolean | false | When present, it specifies that the component should have invalid state style. |
132
+ | formats | any[] | - | Whitelist of formats to display, see <a target="_blank" href="https://quilljs.com/docs/formats/">here</a> for available options. |
133
+ | editorStyle | any | - | Inline style of the container. |
134
+ | modules | any | - | Modules configuration, see <a target="_blank" href="https://quilljs.com/docs/modules/">here</a> for available options. |
135
+ | formControl | Record<string, any> | - | Form control object, typically used for handling validation and form state. |
136
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
137
+ | pt | PassThrough<EditorPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
138
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
139
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
140
+
141
+ ### Slots
142
+
143
+ | Name |Parameters |Description |
144
+ | --- | --- | --- |
145
+ | toolbar | Function | |
146
+
147
+ ### Pass Through Options
148
+
149
+ | Name |Type |Description |
150
+ | --- | --- | --- |
151
+ | root | EditorPassThroughOptionType | Used to pass attributes to the root's DOM element. |
152
+ | toolbar | EditorPassThroughOptionType | Used to pass attributes to the toolbar's DOM element. |
153
+ | formats | EditorPassThroughOptionType | Used to pass attributes to the formats' DOM element. |
154
+ | header | EditorPassThroughOptionType | Used to pass attributes to the header's DOM element. |
155
+ | option | EditorPassThroughOptionType | Used to pass attributes to the option's DOM element. |
156
+ | bold | EditorPassThroughOptionType | Used to pass attributes to the bold's DOM element. |
157
+ | italic | EditorPassThroughOptionType | Used to pass attributes to the italic's DOM element. |
158
+ | underline | EditorPassThroughOptionType | Used to pass attributes to the underline's DOM element. |
159
+ | color | EditorPassThroughOptionType | Used to pass attributes to the color's DOM element. |
160
+ | background | EditorPassThroughOptionType | Used to pass attributes to the background's DOM element. |
161
+ | list | EditorPassThroughOptionType | Used to pass attributes to the list's DOM element. |
162
+ | select | EditorPassThroughOptionType | Used to pass attributes to the select's DOM element. |
163
+ | link | EditorPassThroughOptionType | Used to pass attributes to the link's DOM element. |
164
+ | image | EditorPassThroughOptionType | Used to pass attributes to the image's DOM element. |
165
+ | codeBlock | EditorPassThroughOptionType | Used to pass attributes to the code block's DOM element. |
166
+ | clean | EditorPassThroughOptionType | Used to pass attributes to the clean's DOM element. |
167
+ | content | EditorPassThroughOptionType | Used to pass attributes to the content's DOM element. |
168
+ | hooks | any | Used to manage all lifecycle hooks. |
169
+
170
+ ### Theming
171
+
172
+ ### CSS Classes
173
+
174
+ | Class |Description |
175
+ | --- | --- |
176
+ | p-editor | Class name of the root element |
177
+ | p-editor-toolbar | Class name of the toolbar element |
178
+ | p-editor-content | Class name of the content element |
179
+
180
+ ### Design Tokens
181
+
182
+ | Token |CSS Variable |Description |
183
+ | --- | --- | --- |
184
+ | editor.toolbar.background | --p-editor-toolbar-background | Background of toolbar |
185
+ | editor.toolbar.border.color | --p-editor-toolbar-border-color | Border color of toolbar |
186
+ | editor.toolbar.border.radius | --p-editor-toolbar-border-radius | Border radius of toolbar |
187
+ | editor.toolbar.item.color | --p-editor-toolbar-item-color | Color of toolbar item |
188
+ | editor.toolbar.item.hover.color | --p-editor-toolbar-item-hover-color | Hover color of toolbar item |
189
+ | editor.toolbar.item.active.color | --p-editor-toolbar-item-active-color | Active color of toolbar item |
190
+ | editor.toolbar.item.padding | --p-editor-toolbar-item-padding | Padding of toolbar item |
191
+ | editor.overlay.background | --p-editor-overlay-background | Background of overlay |
192
+ | editor.overlay.border.color | --p-editor-overlay-border-color | Border color of overlay |
193
+ | editor.overlay.border.radius | --p-editor-overlay-border-radius | Border radius of overlay |
194
+ | editor.overlay.color | --p-editor-overlay-color | Color of overlay |
195
+ | editor.overlay.shadow | --p-editor-overlay-shadow | Shadow of overlay |
196
+ | editor.overlay.padding | --p-editor-overlay-padding | Padding of overlay |
197
+ | editor.overlay.option.focus.background | --p-editor-overlay-option-focus-background | Focus background of overlay option |
198
+ | editor.overlay.option.color | --p-editor-overlay-option-color | Color of overlay option |
199
+ | editor.overlay.option.focus.color | --p-editor-overlay-option-focus-color | Focus color of overlay option |
200
+ | editor.overlay.option.padding | --p-editor-overlay-option-padding | Padding of overlay option |
201
+ | editor.overlay.option.border.radius | --p-editor-overlay-option-border-radius | Border radius of overlay option |
202
+ | editor.content.background | --p-editor-content-background | Background of content |
203
+ | editor.content.border.color | --p-editor-content-border-color | Border color of content |
204
+ | editor.content.color | --p-editor-content-color | Color of content |
205
+ | editor.content.border.radius | --p-editor-content-border-radius | Border radius of content |
@@ -0,0 +1,253 @@
1
+ # Fieldset
2
+
3
+ Fieldset is a grouping component with a content toggle feature.
4
+
5
+ ## Basic
6
+
7
+ A simple Fieldset is created with a legend property along with the content as children.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <Fieldset legend="Invoice #1024" class="max-w-xs w-full">
13
+ <div class="flex flex-col text-sm p-2">
14
+ <div class="flex justify-between">
15
+ <span class="text-color">Design Service</span>
16
+ <span class="text-muted-color">$120.00</span>
17
+ </div>
18
+ <div class="flex justify-between mt-3">
19
+ <span class="text-color">Hosting</span>
20
+ <span class="text-muted-color">$30.00</span>
21
+ </div>
22
+ <Divider />
23
+ <div class="flex justify-between">
24
+ <span class="text-color font-medium">Total</span>
25
+ <span class="text-color font-medium">$150.00</span>
26
+ </div>
27
+ </div>
28
+ </Fieldset>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup>
33
+ <\/script>
34
+ ```
35
+
36
+ ## Toggleable
37
+
38
+ Content of the fieldset can be expanded and collapsed using the toggleable property.
39
+
40
+ ```vue
41
+ <template>
42
+ <div class="flex justify-center">
43
+ <Fieldset legend="Invoice #1024" :toggleable="true" class="max-w-xs w-full">
44
+ <div class="flex flex-col text-sm p-2">
45
+ <div class="flex justify-between">
46
+ <span class="text-color">Design Service</span>
47
+ <span class="text-muted-color">$120.00</span>
48
+ </div>
49
+ <div class="flex justify-between mt-3">
50
+ <span class="text-color">Hosting</span>
51
+ <span class="text-muted-color">$30.00</span>
52
+ </div>
53
+ <Divider />
54
+ <div class="flex justify-between">
55
+ <span class="text-color font-medium">Total</span>
56
+ <span class="text-color font-medium">$150.00</span>
57
+ </div>
58
+ </div>
59
+ </Fieldset>
60
+ </div>
61
+ </template>
62
+
63
+ <script setup>
64
+ <\/script>
65
+ ```
66
+
67
+ ## Controlled
68
+
69
+ The collapsed property with two-way binding controls the open state programmatically.
70
+
71
+ ```vue
72
+ <template>
73
+ <div class="flex justify-center">
74
+ <div class="space-y-4 max-w-xs w-full">
75
+ <div class="flex gap-2 justify-center">
76
+ <Button :severity="!collapsed ? 'primary' : 'secondary'" @click="collapsed = false">Open</Button>
77
+ <Button :severity="collapsed ? 'primary' : 'secondary'" @click="collapsed = true">Close</Button>
78
+ </div>
79
+ <Fieldset legend="Invoice #1024" :toggleable="true" v-model:collapsed="collapsed">
80
+ <div class="flex flex-col text-sm p-2">
81
+ <div class="flex justify-between">
82
+ <span class="text-color">Design Service</span>
83
+ <span class="text-muted-color">$120.00</span>
84
+ </div>
85
+ <div class="flex justify-between mt-3">
86
+ <span class="text-color">Hosting</span>
87
+ <span class="text-muted-color">$30.00</span>
88
+ </div>
89
+ <Divider />
90
+ <div class="flex justify-between">
91
+ <span class="text-color font-medium">Total</span>
92
+ <span class="text-color font-medium">$150.00</span>
93
+ </div>
94
+ </div>
95
+ </Fieldset>
96
+ </div>
97
+ </div>
98
+ </template>
99
+
100
+ <script setup>
101
+ import { ref } from 'vue';
102
+
103
+ const collapsed = ref(false);
104
+ <\/script>
105
+ ```
106
+
107
+ ## Indicator
108
+
109
+ The toggleicon slot customizes the indicator. It can switch between two icons using the collapsed context variable, or render a single icon that animates purely with CSS by targeting the toggle button's aria-expanded state.
110
+
111
+ ```vue
112
+ <template>
113
+ <div class="flex flex-col gap-8 max-w-xs mx-auto">
114
+ <div>
115
+ <h3 class="text-sm! font-medium! text-surface-500! mb-2">Match open / closed</h3>
116
+ <Fieldset legend="Invoice #1024" :toggleable="true" class="w-full">
117
+ <template #toggleicon="{ collapsed }">
118
+ <Plus v-if="collapsed" />
119
+ <Minus v-else />
120
+ </template>
121
+ <div class="flex flex-col text-sm p-2">
122
+ <div class="flex justify-between">
123
+ <span class="text-color">Design Service</span>
124
+ <span class="text-muted-color">$120.00</span>
125
+ </div>
126
+ <div class="flex justify-between mt-3">
127
+ <span class="text-color">Hosting</span>
128
+ <span class="text-muted-color">$30.00</span>
129
+ </div>
130
+ <Divider />
131
+ <div class="flex justify-between">
132
+ <span class="text-color font-medium">Total</span>
133
+ <span class="text-color font-medium">$150.00</span>
134
+ </div>
135
+ </div>
136
+ </Fieldset>
137
+ </div>
138
+
139
+ <div>
140
+ <h3 class="text-sm! font-medium! text-surface-500! mb-2">CSS-only with data attributes</h3>
141
+ <Fieldset legend="Invoice #1024" :toggleable="true" class="w-full">
142
+ <template #toggleicon>
143
+ <ChevronDown class="transition-transform duration-200 in-aria-expanded:rotate-180" />
144
+ </template>
145
+ <div class="flex flex-col text-sm p-2">
146
+ <div class="flex justify-between">
147
+ <span class="text-color">Design Service</span>
148
+ <span class="text-muted-color">$120.00</span>
149
+ </div>
150
+ <div class="flex justify-between mt-3">
151
+ <span class="text-color">Hosting</span>
152
+ <span class="text-muted-color">$30.00</span>
153
+ </div>
154
+ <Divider />
155
+ <div class="flex justify-between">
156
+ <span class="text-color font-medium">Total</span>
157
+ <span class="text-color font-medium">$150.00</span>
158
+ </div>
159
+ </div>
160
+ </Fieldset>
161
+ </div>
162
+ </div>
163
+ </template>
164
+
165
+ <script setup>
166
+ import ChevronDown from '@primeicons/vue/chevron-down';
167
+ import Minus from '@primeicons/vue/minus';
168
+ import Plus from '@primeicons/vue/plus';
169
+ <\/script>
170
+ ```
171
+
172
+ ## Accessibility
173
+
174
+ Screen Reader Fieldset component uses the semantic fieldset element. When toggleable option is enabled, a clickable element with button role is included inside the legend element, this button has aria-controls to define the id of the content section along with aria-expanded for the visibility state. The value to read the button defaults to the value of the legend property and can be customized by defining an aria-label or aria-labelledby via the toggleButtonProps property. The content uses region , defines an id that matches the aria-controls of the content toggle button and aria-labelledby referring to the id of the header. Content Toggle Button Keyboard Support Key Function tab Moves focus to the next the focusable element in the page tab sequence. shift + tab Moves focus to the previous the focusable element in the page tab sequence. enter Toggles the visibility of the content. space Toggles the visibility of the content.
175
+
176
+ ## Fieldset API
177
+
178
+ ### Props
179
+
180
+ | Name |Type |Default |Description |
181
+ | --- | --- | --- | --- |
182
+ | legend | string | - | Header text of the fieldset. |
183
+ | toggleable | boolean | false | When specified, content can toggled by clicking the legend. |
184
+ | collapsed | boolean | false | Defines the default visibility state of the content. |
185
+ | toggleButtonProps | AnchorHTMLAttributes | - | Used to pass the custom value to read for the AnchorHTMLAttributes inside the component. |
186
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
187
+ | pt | PassThrough<FieldsetPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
188
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
189
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
190
+
191
+ ### Slots
192
+
193
+ | Name |Parameters |Description |
194
+ | --- | --- | --- |
195
+ | default | Function | |
196
+
197
+ ### Pass Through Options
198
+
199
+ | Name |Type |Description |
200
+ | --- | --- | --- |
201
+ | root | FieldsetPassThroughOptionType | Used to pass attributes to the root's DOM element. |
202
+ | legend | FieldsetPassThroughOptionType | Used to pass attributes to the legend's DOM element. |
203
+ | toggleButton | FieldsetPassThroughOptionType | Used to pass attributes to the toggle button's DOM element. |
204
+ | toggleIcon | FieldsetPassThroughOptionType | Used to pass attributes to the toggle icon's DOM element. |
205
+ | legendLabel | FieldsetPassThroughOptionType | Used to pass attributes to the legend label's DOM element. |
206
+ | contentContainer | FieldsetPassThroughOptionType | Used to pass attributes to the content container's DOM element. |
207
+ | contentWrapper | FieldsetPassThroughOptionType | Used to pass attributes to the content wrapper DOM element. |
208
+ | content | FieldsetPassThroughOptionType | Used to pass attributes to the content's DOM element. |
209
+ | hooks | any | Used to manage all lifecycle hooks. |
210
+ | transition | FieldsetPassThroughTransitionType | Used to control Vue Transition API. |
211
+
212
+ ### Theming
213
+
214
+ ### CSS Classes
215
+
216
+ | Class |Description |
217
+ | --- | --- |
218
+ | p-fieldset | Class name of the root element |
219
+ | p-fieldset-legend | Class name of the legend element |
220
+ | p-fieldset-legend-label | Class name of the legend label element |
221
+ | p-fieldset-toggle-icon | Class name of the toggle icon element |
222
+ | p-fieldset-content-container | Class name of the content container element |
223
+ | p-fieldset-content | Class name of the content element |
224
+
225
+ ### Design Tokens
226
+
227
+ | Token |CSS Variable |Description |
228
+ | --- | --- | --- |
229
+ | fieldset.background | --p-fieldset-background | Background of root |
230
+ | fieldset.border.color | --p-fieldset-border-color | Border color of root |
231
+ | fieldset.border.radius | --p-fieldset-border-radius | Border radius of root |
232
+ | fieldset.color | --p-fieldset-color | Color of root |
233
+ | fieldset.padding | --p-fieldset-padding | Padding of root |
234
+ | fieldset.transition.duration | --p-fieldset-transition-duration | Transition duration of root |
235
+ | fieldset.legend.background | --p-fieldset-legend-background | Background of legend |
236
+ | fieldset.legend.hover.background | --p-fieldset-legend-hover-background | Hover background of legend |
237
+ | fieldset.legend.color | --p-fieldset-legend-color | Color of legend |
238
+ | fieldset.legend.hover.color | --p-fieldset-legend-hover-color | Hover color of legend |
239
+ | fieldset.legend.border.radius | --p-fieldset-legend-border-radius | Border radius of legend |
240
+ | fieldset.legend.border.width | --p-fieldset-legend-border-width | Border width of legend |
241
+ | fieldset.legend.border.color | --p-fieldset-legend-border-color | Border color of legend |
242
+ | fieldset.legend.padding | --p-fieldset-legend-padding | Padding of legend |
243
+ | fieldset.legend.gap | --p-fieldset-legend-gap | Gap of legend |
244
+ | fieldset.legend.font.weight | --p-fieldset-legend-font-weight | Font weight of legend |
245
+ | fieldset.legend.font.size | --p-fieldset-legend-font-size | Font size of legend |
246
+ | fieldset.legend.focus.ring.width | --p-fieldset-legend-focus-ring-width | Focus ring width of legend |
247
+ | fieldset.legend.focus.ring.style | --p-fieldset-legend-focus-ring-style | Focus ring style of legend |
248
+ | fieldset.legend.focus.ring.color | --p-fieldset-legend-focus-ring-color | Focus ring color of legend |
249
+ | fieldset.legend.focus.ring.offset | --p-fieldset-legend-focus-ring-offset | Focus ring offset of legend |
250
+ | fieldset.legend.focus.ring.shadow | --p-fieldset-legend-focus-ring-shadow | Focus ring shadow of legend |
251
+ | fieldset.toggle.icon.color | --p-fieldset-toggle-icon-color | Color of toggle icon |
252
+ | fieldset.toggle.icon.hover.color | --p-fieldset-toggle-icon-hover-color | Hover color of toggle icon |
253
+ | fieldset.content.padding | --p-fieldset-content-padding | Padding of content |