@primereact/mcp 11.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.
- package/LICENSE.md +45 -0
- package/README.md +94 -0
- package/data/llms/headless/add-ons/introduction.md +16 -0
- package/data/llms/headless/components/accordion/api.json +252 -0
- package/data/llms/headless/components/accordion.md +196 -0
- package/data/llms/headless/components/animateonscroll/api.json +88 -0
- package/data/llms/headless/components/animateonscroll.md +141 -0
- package/data/llms/headless/components/autocomplete/api.json +787 -0
- package/data/llms/headless/components/autocomplete.md +249 -0
- package/data/llms/headless/components/avatar/api.json +154 -0
- package/data/llms/headless/components/avatar.md +149 -0
- package/data/llms/headless/components/badge/api.json +68 -0
- package/data/llms/headless/components/badge.md +150 -0
- package/data/llms/headless/components/breadcrumb/api.json +142 -0
- package/data/llms/headless/components/breadcrumb.md +149 -0
- package/data/llms/headless/components/button/api.json +62 -0
- package/data/llms/headless/components/button.md +73 -0
- package/data/llms/headless/components/card/api.json +36 -0
- package/data/llms/headless/components/card.md +96 -0
- package/data/llms/headless/components/carousel/api.json +793 -0
- package/data/llms/headless/components/carousel.md +196 -0
- package/data/llms/headless/components/checkbox/api.json +593 -0
- package/data/llms/headless/components/checkbox.md +184 -0
- package/data/llms/headless/components/chip/api.json +107 -0
- package/data/llms/headless/components/chip.md +141 -0
- package/data/llms/headless/components/collapsible/api.json +301 -0
- package/data/llms/headless/components/collapsible.md +136 -0
- package/data/llms/headless/components/compare/api.json +533 -0
- package/data/llms/headless/components/compare.md +142 -0
- package/data/llms/headless/components/contextmenu/api.json +495 -0
- package/data/llms/headless/components/contextmenu.md +282 -0
- package/data/llms/headless/components/datatable/api.json +1680 -0
- package/data/llms/headless/components/datatable.md +258 -0
- package/data/llms/headless/components/dataview/api.json +199 -0
- package/data/llms/headless/components/dataview.md +147 -0
- package/data/llms/headless/components/datepicker/api.json +2796 -0
- package/data/llms/headless/components/datepicker.md +456 -0
- package/data/llms/headless/components/dialog/api.json +626 -0
- package/data/llms/headless/components/dialog.md +280 -0
- package/data/llms/headless/components/divider/api.json +130 -0
- package/data/llms/headless/components/divider.md +92 -0
- package/data/llms/headless/components/drawer/api.json +425 -0
- package/data/llms/headless/components/drawer.md +220 -0
- package/data/llms/headless/components/fieldset/api.json +195 -0
- package/data/llms/headless/components/fieldset.md +154 -0
- package/data/llms/headless/components/fileupload/api.json +905 -0
- package/data/llms/headless/components/fileupload.md +323 -0
- package/data/llms/headless/components/floatlabel/api.json +36 -0
- package/data/llms/headless/components/floatlabel.md +19 -0
- package/data/llms/headless/components/fluid/api.json +36 -0
- package/data/llms/headless/components/fluid.md +19 -0
- package/data/llms/headless/components/focustrap/api.json +135 -0
- package/data/llms/headless/components/focustrap.md +125 -0
- package/data/llms/headless/components/gallery/api.json +1349 -0
- package/data/llms/headless/components/gallery.md +355 -0
- package/data/llms/headless/components/iconfield/api.json +62 -0
- package/data/llms/headless/components/iconfield.md +19 -0
- package/data/llms/headless/components/iftalabel/api.json +62 -0
- package/data/llms/headless/components/iftalabel.md +19 -0
- package/data/llms/headless/components/inplace/api.json +340 -0
- package/data/llms/headless/components/inplace.md +153 -0
- package/data/llms/headless/components/inputcolor/api.json +469 -0
- package/data/llms/headless/components/inputcolor.md +253 -0
- package/data/llms/headless/components/inputgroup/api.json +62 -0
- package/data/llms/headless/components/inputgroup.md +19 -0
- package/data/llms/headless/components/inputnumber/api.json +554 -0
- package/data/llms/headless/components/inputnumber.md +167 -0
- package/data/llms/headless/components/inputotp/api.json +276 -0
- package/data/llms/headless/components/inputotp.md +130 -0
- package/data/llms/headless/components/inputpassword/api.json +180 -0
- package/data/llms/headless/components/inputpassword.md +117 -0
- package/data/llms/headless/components/inputtags/api.json +497 -0
- package/data/llms/headless/components/inputtags.md +298 -0
- package/data/llms/headless/components/inputtext/api.json +81 -0
- package/data/llms/headless/components/inputtext.md +109 -0
- package/data/llms/headless/components/knob/api.json +429 -0
- package/data/llms/headless/components/knob.md +151 -0
- package/data/llms/headless/components/label/api.json +62 -0
- package/data/llms/headless/components/label.md +19 -0
- package/data/llms/headless/components/listbox/api.json +814 -0
- package/data/llms/headless/components/listbox.md +194 -0
- package/data/llms/headless/components/menu/api.json +1247 -0
- package/data/llms/headless/components/menu.md +283 -0
- package/data/llms/headless/components/message/api.json +131 -0
- package/data/llms/headless/components/message.md +143 -0
- package/data/llms/headless/components/metergroup/api.json +266 -0
- package/data/llms/headless/components/metergroup.md +129 -0
- package/data/llms/headless/components/motion/api.json +237 -0
- package/data/llms/headless/components/motion.md +160 -0
- package/data/llms/headless/components/navigationmenu/api.json +220 -0
- package/data/llms/headless/components/navigationmenu.md +166 -0
- package/data/llms/headless/components/orderlist/api.json +196 -0
- package/data/llms/headless/components/orderlist.md +221 -0
- package/data/llms/headless/components/organizationchart/api.json +372 -0
- package/data/llms/headless/components/organizationchart.md +254 -0
- package/data/llms/headless/components/paginator/api.json +311 -0
- package/data/llms/headless/components/paginator.md +187 -0
- package/data/llms/headless/components/panel/api.json +195 -0
- package/data/llms/headless/components/panel.md +150 -0
- package/data/llms/headless/components/picklist/api.json +293 -0
- package/data/llms/headless/components/picklist.md +270 -0
- package/data/llms/headless/components/popover/api.json +405 -0
- package/data/llms/headless/components/popover.md +301 -0
- package/data/llms/headless/components/portal/api.json +56 -0
- package/data/llms/headless/components/portal.md +102 -0
- package/data/llms/headless/components/positioner/api.json +165 -0
- package/data/llms/headless/components/positioner.md +181 -0
- package/data/llms/headless/components/progressbar/api.json +87 -0
- package/data/llms/headless/components/progressbar.md +122 -0
- package/data/llms/headless/components/progressspinner/api.json +337 -0
- package/data/llms/headless/components/progressspinner.md +128 -0
- package/data/llms/headless/components/radiobutton/api.json +569 -0
- package/data/llms/headless/components/radiobutton.md +195 -0
- package/data/llms/headless/components/rating/api.json +347 -0
- package/data/llms/headless/components/rating.md +181 -0
- package/data/llms/headless/components/scrollarea/api.json +730 -0
- package/data/llms/headless/components/scrollarea.md +232 -0
- package/data/llms/headless/components/select/api.json +829 -0
- package/data/llms/headless/components/select.md +262 -0
- package/data/llms/headless/components/sidebar/api.json +433 -0
- package/data/llms/headless/components/sidebar.md +266 -0
- package/data/llms/headless/components/skeleton/api.json +68 -0
- package/data/llms/headless/components/skeleton.md +95 -0
- package/data/llms/headless/components/slider/api.json +559 -0
- package/data/llms/headless/components/slider.md +158 -0
- package/data/llms/headless/components/speeddial/api.json +459 -0
- package/data/llms/headless/components/speeddial.md +181 -0
- package/data/llms/headless/components/splitter/api.json +582 -0
- package/data/llms/headless/components/splitter.md +159 -0
- package/data/llms/headless/components/stepper/api.json +385 -0
- package/data/llms/headless/components/stepper.md +183 -0
- package/data/llms/headless/components/styleclass/api.json +134 -0
- package/data/llms/headless/components/styleclass.md +129 -0
- package/data/llms/headless/components/tabs/api.json +336 -0
- package/data/llms/headless/components/tabs.md +158 -0
- package/data/llms/headless/components/tag/api.json +62 -0
- package/data/llms/headless/components/tag.md +121 -0
- package/data/llms/headless/components/terminal/api.json +117 -0
- package/data/llms/headless/components/terminal.md +183 -0
- package/data/llms/headless/components/textarea/api.json +81 -0
- package/data/llms/headless/components/textarea.md +110 -0
- package/data/llms/headless/components/timeline/api.json +270 -0
- package/data/llms/headless/components/timeline.md +117 -0
- package/data/llms/headless/components/toast/api.json +455 -0
- package/data/llms/headless/components/toast.md +277 -0
- package/data/llms/headless/components/togglebutton/api.json +357 -0
- package/data/llms/headless/components/togglebutton.md +183 -0
- package/data/llms/headless/components/toggleswitch/api.json +326 -0
- package/data/llms/headless/components/toggleswitch.md +164 -0
- package/data/llms/headless/components/toolbar/api.json +68 -0
- package/data/llms/headless/components/toolbar.md +96 -0
- package/data/llms/headless/components/tooltip/api.json +478 -0
- package/data/llms/headless/components/tooltip.md +233 -0
- package/data/llms/headless/components/tree/api.json +1297 -0
- package/data/llms/headless/components/tree.md +297 -0
- package/data/llms/headless/components/treetable/api.json +1680 -0
- package/data/llms/headless/components/treetable.md +177 -0
- package/data/llms/headless/guides/ai/llms.md +25 -0
- package/data/llms/headless/guides/installation.md +126 -0
- package/data/llms/headless/guides/introduction.md +20 -0
- package/data/llms/headless/guides/misc/accessibility.md +228 -0
- package/data/llms/headless/llms.md +25 -0
- package/data/llms/headless/resources/introduction.md +15 -0
- package/data/llms/hooks/gettingstarted/introduction.md +34 -0
- package/data/llms/hooks/gettingstarted/setup.md +54 -0
- package/data/llms/hooks/use-attr-selector.md +25 -0
- package/data/llms/hooks/use-controlled-state.md +31 -0
- package/data/llms/hooks/use-event-listener.md +37 -0
- package/data/llms/hooks/use-filter.md +312 -0
- package/data/llms/hooks/use-hot-key.md +40 -0
- package/data/llms/hooks/use-id.md +24 -0
- package/data/llms/hooks/use-intersection-observer.md +42 -0
- package/data/llms/hooks/use-is-mobile.md +24 -0
- package/data/llms/hooks/use-key-filter.md +139 -0
- package/data/llms/hooks/use-local-storage.md +28 -0
- package/data/llms/hooks/use-mask.md +53 -0
- package/data/llms/hooks/use-match-media.md +28 -0
- package/data/llms/hooks/use-mount-effect.md +25 -0
- package/data/llms/hooks/use-mounted.md +36 -0
- package/data/llms/hooks/use-number-formatter.md +48 -0
- package/data/llms/hooks/use-presence.md +44 -0
- package/data/llms/hooks/use-previous.md +28 -0
- package/data/llms/hooks/use-props.md +37 -0
- package/data/llms/hooks/use-queue-task.md +29 -0
- package/data/llms/hooks/use-scrolltop.md +87 -0
- package/data/llms/hooks/use-sortable-list.md +226 -0
- package/data/llms/hooks/use-tree-filter.md +216 -0
- package/data/llms/hooks/use-unmount-effect.md +23 -0
- package/data/llms/hooks/use-update-effect.md +27 -0
- package/data/llms/hooks/use-view-transition.md +31 -0
- package/data/llms/hooks/use-visibility-change.md +30 -0
- package/data/llms/llms-full.txt +125291 -0
- package/data/llms/llms.txt +379 -0
- package/data/llms/manifest.json +12409 -0
- package/data/llms/mcp-data.json +14481 -0
- package/data/llms/primitive/add-ons/introduction.md +16 -0
- package/data/llms/primitive/components/accordion/api.json +1411 -0
- package/data/llms/primitive/components/accordion.md +231 -0
- package/data/llms/primitive/components/animateonscroll/api.json +193 -0
- package/data/llms/primitive/components/animateonscroll.md +91 -0
- package/data/llms/primitive/components/autocomplete/api.json +3167 -0
- package/data/llms/primitive/components/autocomplete.md +344 -0
- package/data/llms/primitive/components/avatar/api.json +703 -0
- package/data/llms/primitive/components/avatar.md +134 -0
- package/data/llms/primitive/components/badge/api.json +363 -0
- package/data/llms/primitive/components/badge.md +118 -0
- package/data/llms/primitive/components/breadcrumb/api.json +1162 -0
- package/data/llms/primitive/components/breadcrumb.md +196 -0
- package/data/llms/primitive/components/button/api.json +246 -0
- package/data/llms/primitive/components/button.md +114 -0
- package/data/llms/primitive/components/buttongroup/api.json +168 -0
- package/data/llms/primitive/components/buttongroup.md +43 -0
- package/data/llms/primitive/components/card/api.json +1252 -0
- package/data/llms/primitive/components/card.md +159 -0
- package/data/llms/primitive/components/carousel/api.json +1374 -0
- package/data/llms/primitive/components/carousel.md +220 -0
- package/data/llms/primitive/components/checkbox/api.json +697 -0
- package/data/llms/primitive/components/checkbox.md +160 -0
- package/data/llms/primitive/components/checkboxgroup/api.json +252 -0
- package/data/llms/primitive/components/checkboxgroup.md +58 -0
- package/data/llms/primitive/components/chip/api.json +853 -0
- package/data/llms/primitive/components/chip.md +135 -0
- package/data/llms/primitive/components/collapsible/api.json +581 -0
- package/data/llms/primitive/components/collapsible.md +133 -0
- package/data/llms/primitive/components/compare/api.json +909 -0
- package/data/llms/primitive/components/compare.md +156 -0
- package/data/llms/primitive/components/contextmenu/api.json +3454 -0
- package/data/llms/primitive/components/contextmenu.md +483 -0
- package/data/llms/primitive/components/datatable/api.json +7832 -0
- package/data/llms/primitive/components/datatable.md +561 -0
- package/data/llms/primitive/components/dataview/api.json +819 -0
- package/data/llms/primitive/components/dataview.md +163 -0
- package/data/llms/primitive/components/datepicker/api.json +9055 -0
- package/data/llms/primitive/components/datepicker.md +760 -0
- package/data/llms/primitive/components/dialog/api.json +2491 -0
- package/data/llms/primitive/components/dialog.md +276 -0
- package/data/llms/primitive/components/divider/api.json +214 -0
- package/data/llms/primitive/components/divider.md +96 -0
- package/data/llms/primitive/components/drawer/api.json +1879 -0
- package/data/llms/primitive/components/drawer.md +220 -0
- package/data/llms/primitive/components/fieldset/api.json +1116 -0
- package/data/llms/primitive/components/fieldset.md +183 -0
- package/data/llms/primitive/components/fileupload/api.json +2445 -0
- package/data/llms/primitive/components/fileupload.md +282 -0
- package/data/llms/primitive/components/floatlabel/api.json +176 -0
- package/data/llms/primitive/components/floatlabel.md +47 -0
- package/data/llms/primitive/components/focustrap/api.json +241 -0
- package/data/llms/primitive/components/focustrap.md +93 -0
- package/data/llms/primitive/components/gallery/api.json +3622 -0
- package/data/llms/primitive/components/gallery.md +387 -0
- package/data/llms/primitive/components/iconfield/api.json +322 -0
- package/data/llms/primitive/components/iconfield.md +53 -0
- package/data/llms/primitive/components/iftalabel/api.json +177 -0
- package/data/llms/primitive/components/iftalabel.md +47 -0
- package/data/llms/primitive/components/inplace/api.json +783 -0
- package/data/llms/primitive/components/inplace.md +141 -0
- package/data/llms/primitive/components/inputcolor/api.json +2211 -0
- package/data/llms/primitive/components/inputcolor.md +295 -0
- package/data/llms/primitive/components/inputnumber/api.json +469 -0
- package/data/llms/primitive/components/inputnumber.md +99 -0
- package/data/llms/primitive/components/inputotp/api.json +469 -0
- package/data/llms/primitive/components/inputotp.md +121 -0
- package/data/llms/primitive/components/inputpassword/api.json +278 -0
- package/data/llms/primitive/components/inputpassword.md +84 -0
- package/data/llms/primitive/components/inputtags/api.json +407 -0
- package/data/llms/primitive/components/inputtags.md +243 -0
- package/data/llms/primitive/components/inputtext/api.json +207 -0
- package/data/llms/primitive/components/inputtext.md +81 -0
- package/data/llms/primitive/components/knob/api.json +841 -0
- package/data/llms/primitive/components/knob.md +148 -0
- package/data/llms/primitive/components/label/api.json +177 -0
- package/data/llms/primitive/components/label.md +44 -0
- package/data/llms/primitive/components/listbox/api.json +1741 -0
- package/data/llms/primitive/components/listbox.md +206 -0
- package/data/llms/primitive/components/menu/api.json +3836 -0
- package/data/llms/primitive/components/menu.md +479 -0
- package/data/llms/primitive/components/message/api.json +863 -0
- package/data/llms/primitive/components/message.md +151 -0
- package/data/llms/primitive/components/metergroup/api.json +1222 -0
- package/data/llms/primitive/components/metergroup.md +209 -0
- package/data/llms/primitive/components/motion.md +112 -0
- package/data/llms/primitive/components/navigationmenu/api.json +298 -0
- package/data/llms/primitive/components/navigationmenu.md +184 -0
- package/data/llms/primitive/components/organizationchart.md +133 -0
- package/data/llms/primitive/components/paginator/api.json +1637 -0
- package/data/llms/primitive/components/paginator.md +223 -0
- package/data/llms/primitive/components/panel/api.json +1270 -0
- package/data/llms/primitive/components/panel.md +186 -0
- package/data/llms/primitive/components/popover/api.json +2281 -0
- package/data/llms/primitive/components/popover.md +277 -0
- package/data/llms/primitive/components/portal/api.json +176 -0
- package/data/llms/primitive/components/portal.md +79 -0
- package/data/llms/primitive/components/progressbar/api.json +857 -0
- package/data/llms/primitive/components/progressbar.md +153 -0
- package/data/llms/primitive/components/progressspinner/api.json +725 -0
- package/data/llms/primitive/components/progressspinner.md +133 -0
- package/data/llms/primitive/components/radiobutton/api.json +929 -0
- package/data/llms/primitive/components/radiobutton.md +201 -0
- package/data/llms/primitive/components/rating/api.json +878 -0
- package/data/llms/primitive/components/rating.md +160 -0
- package/data/llms/primitive/components/scrollarea/api.json +1187 -0
- package/data/llms/primitive/components/scrollarea.md +255 -0
- package/data/llms/primitive/components/select/api.json +3167 -0
- package/data/llms/primitive/components/select.md +351 -0
- package/data/llms/primitive/components/sidebar/api.json +3699 -0
- package/data/llms/primitive/components/sidebar.md +444 -0
- package/data/llms/primitive/components/skeleton/api.json +213 -0
- package/data/llms/primitive/components/skeleton.md +80 -0
- package/data/llms/primitive/components/slider/api.json +1066 -0
- package/data/llms/primitive/components/slider.md +161 -0
- package/data/llms/primitive/components/speeddial/api.json +1002 -0
- package/data/llms/primitive/components/speeddial.md +197 -0
- package/data/llms/primitive/components/splitter/api.json +901 -0
- package/data/llms/primitive/components/splitter.md +137 -0
- package/data/llms/primitive/components/stepper/api.json +2102 -0
- package/data/llms/primitive/components/stepper.md +253 -0
- package/data/llms/primitive/components/styleclass.md +399 -0
- package/data/llms/primitive/components/tabs/api.json +1705 -0
- package/data/llms/primitive/components/tabs.md +200 -0
- package/data/llms/primitive/components/tag/api.json +189 -0
- package/data/llms/primitive/components/tag.md +100 -0
- package/data/llms/primitive/components/terminal/api.json +1709 -0
- package/data/llms/primitive/components/terminal.md +227 -0
- package/data/llms/primitive/components/textarea/api.json +213 -0
- package/data/llms/primitive/components/textarea.md +83 -0
- package/data/llms/primitive/components/timeline/api.json +1180 -0
- package/data/llms/primitive/components/timeline.md +185 -0
- package/data/llms/primitive/components/toast/api.json +2102 -0
- package/data/llms/primitive/components/toast.md +291 -0
- package/data/llms/primitive/components/togglebutton/api.json +433 -0
- package/data/llms/primitive/components/togglebutton.md +161 -0
- package/data/llms/primitive/components/togglebuttongroup/api.json +276 -0
- package/data/llms/primitive/components/togglebuttongroup.md +61 -0
- package/data/llms/primitive/components/toggleswitch/api.json +681 -0
- package/data/llms/primitive/components/toggleswitch.md +149 -0
- package/data/llms/primitive/components/toolbar/api.json +646 -0
- package/data/llms/primitive/components/toolbar.md +126 -0
- package/data/llms/primitive/components/tooltip/api.json +1534 -0
- package/data/llms/primitive/components/tooltip.md +202 -0
- package/data/llms/primitive/components/tree/api.json +2952 -0
- package/data/llms/primitive/components/tree.md +292 -0
- package/data/llms/primitive/components/treetable.md +187 -0
- package/data/llms/primitive/components/visuallyhidden/api.json +186 -0
- package/data/llms/primitive/components/visuallyhidden.md +87 -0
- package/data/llms/primitive/guides/ai/llms.md +25 -0
- package/data/llms/primitive/guides/icons/customicons.md +47 -0
- package/data/llms/primitive/guides/icons/primeicons.md +112 -0
- package/data/llms/primitive/guides/installation.md +115 -0
- package/data/llms/primitive/guides/introduction.md +20 -0
- package/data/llms/primitive/guides/misc/accessibility.md +215 -0
- package/data/llms/primitive/guides/misc/passthrough.md +95 -0
- package/data/llms/primitive/guides/misc/rtl.md +27 -0
- package/data/llms/primitive/llms.md +25 -0
- package/data/llms/primitive/resources/introduction.md +15 -0
- package/data/llms/styled/add-ons/introduction.md +16 -0
- package/data/llms/styled/components/accordion.md +735 -0
- package/data/llms/styled/components/animateonscroll.md +264 -0
- package/data/llms/styled/components/autocomplete.md +1597 -0
- package/data/llms/styled/components/avatar.md +313 -0
- package/data/llms/styled/components/badge.md +213 -0
- package/data/llms/styled/components/breadcrumb.md +461 -0
- package/data/llms/styled/components/button/api.json +246 -0
- package/data/llms/styled/components/button.md +641 -0
- package/data/llms/styled/components/buttongroup.md +614 -0
- package/data/llms/styled/components/card.md +228 -0
- package/data/llms/styled/components/carousel.md +388 -0
- package/data/llms/styled/components/checkbox.md +329 -0
- package/data/llms/styled/components/checkboxgroup.md +619 -0
- package/data/llms/styled/components/chip.md +300 -0
- package/data/llms/styled/components/compare.md +271 -0
- package/data/llms/styled/components/contextmenu.md +550 -0
- package/data/llms/styled/components/datatable.md +8259 -0
- package/data/llms/styled/components/dataview.md +907 -0
- package/data/llms/styled/components/datepicker.md +2807 -0
- package/data/llms/styled/components/dialog.md +1047 -0
- package/data/llms/styled/components/divider.md +207 -0
- package/data/llms/styled/components/drawer.md +470 -0
- package/data/llms/styled/components/fieldset.md +334 -0
- package/data/llms/styled/components/fileupload.md +747 -0
- package/data/llms/styled/components/floatlabel/api.json +210 -0
- package/data/llms/styled/components/floatlabel.md +231 -0
- package/data/llms/styled/components/fluid/api.json +204 -0
- package/data/llms/styled/components/fluid.md +177 -0
- package/data/llms/styled/components/focustrap.md +203 -0
- package/data/llms/styled/components/gallery.md +553 -0
- package/data/llms/styled/components/iconfield/api.json +382 -0
- package/data/llms/styled/components/iconfield.md +385 -0
- package/data/llms/styled/components/iftalabel/api.json +237 -0
- package/data/llms/styled/components/iftalabel.md +158 -0
- package/data/llms/styled/components/inplace.md +312 -0
- package/data/llms/styled/components/inputcolor.md +674 -0
- package/data/llms/styled/components/inputgroup/api.json +399 -0
- package/data/llms/styled/components/inputgroup.md +604 -0
- package/data/llms/styled/components/inputmask.md +282 -0
- package/data/llms/styled/components/inputnumber.md +563 -0
- package/data/llms/styled/components/inputotp.md +335 -0
- package/data/llms/styled/components/inputpassword.md +630 -0
- package/data/llms/styled/components/inputtags.md +727 -0
- package/data/llms/styled/components/inputtext.md +190 -0
- package/data/llms/styled/components/keyfilter.md +289 -0
- package/data/llms/styled/components/knob.md +305 -0
- package/data/llms/styled/components/label/api.json +237 -0
- package/data/llms/styled/components/label.md +224 -0
- package/data/llms/styled/components/listbox.md +807 -0
- package/data/llms/styled/components/menu.md +1175 -0
- package/data/llms/styled/components/message.md +570 -0
- package/data/llms/styled/components/metergroup.md +449 -0
- package/data/llms/styled/components/navigationmenu.md +926 -0
- package/data/llms/styled/components/orderlist.md +519 -0
- package/data/llms/styled/components/organizationchart/api.json +1457 -0
- package/data/llms/styled/components/organizationchart.md +791 -0
- package/data/llms/styled/components/overlaymanager.md +519 -0
- package/data/llms/styled/components/paginator.md +506 -0
- package/data/llms/styled/components/panel.md +394 -0
- package/data/llms/styled/components/picklist.md +1004 -0
- package/data/llms/styled/components/popover.md +372 -0
- package/data/llms/styled/components/progressbar.md +438 -0
- package/data/llms/styled/components/progressspinner.md +128 -0
- package/data/llms/styled/components/radiobutton.md +488 -0
- package/data/llms/styled/components/rating/api.json +766 -0
- package/data/llms/styled/components/rating.md +518 -0
- package/data/llms/styled/components/scrollarea.md +627 -0
- package/data/llms/styled/components/select.md +2122 -0
- package/data/llms/styled/components/sidebar.md +1587 -0
- package/data/llms/styled/components/skeleton.md +226 -0
- package/data/llms/styled/components/slider.md +453 -0
- package/data/llms/styled/components/speeddial.md +723 -0
- package/data/llms/styled/components/splitter.md +536 -0
- package/data/llms/styled/components/stepper.md +614 -0
- package/data/llms/styled/components/tabs.md +543 -0
- package/data/llms/styled/components/tag.md +263 -0
- package/data/llms/styled/components/terminal.md +543 -0
- package/data/llms/styled/components/textarea.md +257 -0
- package/data/llms/styled/components/timeline.md +620 -0
- package/data/llms/styled/components/toast.md +1013 -0
- package/data/llms/styled/components/togglebutton.md +287 -0
- package/data/llms/styled/components/togglebuttongroup.md +328 -0
- package/data/llms/styled/components/toggleswitch.md +262 -0
- package/data/llms/styled/components/toolbar.md +187 -0
- package/data/llms/styled/components/tooltip.md +430 -0
- package/data/llms/styled/components/tree.md +1386 -0
- package/data/llms/styled/components/treetable.md +6842 -0
- package/data/llms/styled/guides/ai/llms.md +25 -0
- package/data/llms/styled/guides/configuration.md +151 -0
- package/data/llms/styled/guides/icons/customicons.md +47 -0
- package/data/llms/styled/guides/icons/primeicons.md +112 -0
- package/data/llms/styled/guides/installation/astro.md +97 -0
- package/data/llms/styled/guides/installation/manual.md +3 -0
- package/data/llms/styled/guides/installation/nextjs.md +129 -0
- package/data/llms/styled/guides/installation/react-router.md +88 -0
- package/data/llms/styled/guides/installation/tanstack.md +92 -0
- package/data/llms/styled/guides/installation/vite.md +91 -0
- package/data/llms/styled/guides/installation.md +42 -0
- package/data/llms/styled/guides/introduction.md +20 -0
- package/data/llms/styled/guides/misc/accessibility.md +211 -0
- package/data/llms/styled/guides/misc/animations.md +389 -0
- package/data/llms/styled/guides/misc/passthrough.md +95 -0
- package/data/llms/styled/guides/misc/rtl.md +27 -0
- package/data/llms/styled/guides/theming/styled.md +779 -0
- package/data/llms/styled/guides/theming/tailwind.md +473 -0
- package/data/llms/styled/guides/theming/unstyled.md +115 -0
- package/data/llms/styled/resources/introduction.md +15 -0
- package/data/llms/tailwind/add-ons/introduction.md +16 -0
- package/data/llms/tailwind/components/accordion.md +383 -0
- package/data/llms/tailwind/components/autocomplete.md +1346 -0
- package/data/llms/tailwind/components/avatar.md +305 -0
- package/data/llms/tailwind/components/badge.md +207 -0
- package/data/llms/tailwind/components/breadcrumb.md +387 -0
- package/data/llms/tailwind/components/button/api.json +246 -0
- package/data/llms/tailwind/components/button.md +617 -0
- package/data/llms/tailwind/components/buttongroup.md +599 -0
- package/data/llms/tailwind/components/card.md +224 -0
- package/data/llms/tailwind/components/carousel.md +329 -0
- package/data/llms/tailwind/components/checkbox.md +179 -0
- package/data/llms/tailwind/components/checkboxgroup.md +279 -0
- package/data/llms/tailwind/components/chip.md +304 -0
- package/data/llms/tailwind/components/compare.md +295 -0
- package/data/llms/tailwind/components/contextmenu.md +415 -0
- package/data/llms/tailwind/components/datatable.md +4062 -0
- package/data/llms/tailwind/components/dataview.md +864 -0
- package/data/llms/tailwind/components/datepicker.md +823 -0
- package/data/llms/tailwind/components/dialog.md +1216 -0
- package/data/llms/tailwind/components/divider.md +205 -0
- package/data/llms/tailwind/components/drawer.md +500 -0
- package/data/llms/tailwind/components/fieldset.md +326 -0
- package/data/llms/tailwind/components/fluid.md +117 -0
- package/data/llms/tailwind/components/iconfield.md +197 -0
- package/data/llms/tailwind/components/inplace.md +324 -0
- package/data/llms/tailwind/components/inputcolor.md +493 -0
- package/data/llms/tailwind/components/inputgroup.md +375 -0
- package/data/llms/tailwind/components/inputnumber.md +463 -0
- package/data/llms/tailwind/components/inputotp.md +255 -0
- package/data/llms/tailwind/components/inputpassword.md +543 -0
- package/data/llms/tailwind/components/inputtext.md +141 -0
- package/data/llms/tailwind/components/label.md +100 -0
- package/data/llms/tailwind/components/listbox.md +886 -0
- package/data/llms/tailwind/components/menu.md +1049 -0
- package/data/llms/tailwind/components/message.md +575 -0
- package/data/llms/tailwind/components/metergroup.md +510 -0
- package/data/llms/tailwind/components/navigationmenu.md +528 -0
- package/data/llms/tailwind/components/overlaymanager.md +567 -0
- package/data/llms/tailwind/components/paginator.md +306 -0
- package/data/llms/tailwind/components/panel.md +395 -0
- package/data/llms/tailwind/components/popover.md +424 -0
- package/data/llms/tailwind/components/progressbar.md +313 -0
- package/data/llms/tailwind/components/radiobutton.md +366 -0
- package/data/llms/tailwind/components/rating.md +300 -0
- package/data/llms/tailwind/components/scrollarea.md +638 -0
- package/data/llms/tailwind/components/select.md +1220 -0
- package/data/llms/tailwind/components/sidebar.md +1511 -0
- package/data/llms/tailwind/components/skeleton.md +236 -0
- package/data/llms/tailwind/components/slider.md +291 -0
- package/data/llms/tailwind/components/splitter.md +546 -0
- package/data/llms/tailwind/components/tabs.md +462 -0
- package/data/llms/tailwind/components/tag.md +255 -0
- package/data/llms/tailwind/components/textarea.md +170 -0
- package/data/llms/tailwind/components/timeline.md +656 -0
- package/data/llms/tailwind/components/toast.md +246 -0
- package/data/llms/tailwind/components/togglebutton.md +264 -0
- package/data/llms/tailwind/components/togglebuttongroup.md +262 -0
- package/data/llms/tailwind/components/toggleswitch.md +203 -0
- package/data/llms/tailwind/components/toolbar.md +192 -0
- package/data/llms/tailwind/components/tooltip.md +449 -0
- package/data/llms/tailwind/guides/ai/llms.md +25 -0
- package/data/llms/tailwind/guides/icons/customicons.md +47 -0
- package/data/llms/tailwind/guides/icons/primeicons.md +112 -0
- package/data/llms/tailwind/guides/installation/astro.md +165 -0
- package/data/llms/tailwind/guides/installation/manual.md +3 -0
- package/data/llms/tailwind/guides/installation/nextjs.md +169 -0
- package/data/llms/tailwind/guides/installation/react-router.md +157 -0
- package/data/llms/tailwind/guides/installation/tanstack.md +161 -0
- package/data/llms/tailwind/guides/installation/vite.md +160 -0
- package/data/llms/tailwind/guides/installation.md +42 -0
- package/data/llms/tailwind/guides/introduction.md +20 -0
- package/data/llms/tailwind/guides/misc/accessibility.md +205 -0
- package/data/llms/tailwind/guides/misc/passthrough.md +95 -0
- package/data/llms/tailwind/guides/misc/rtl.md +27 -0
- package/data/llms/tailwind/guides/theming/guide.md +179 -0
- package/data/llms/tailwind/guides/theming.md +191 -0
- package/data/llms/tailwind/llms.md +25 -0
- package/data/llms/tailwind/resources/introduction.md +15 -0
- package/data/manifest.json +12409 -0
- package/data/mcp-data.json +14481 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +2 -0
- package/package.json +61 -0
|
@@ -0,0 +1,1216 @@
|
|
|
1
|
+
# Dialog
|
|
2
|
+
|
|
3
|
+
Dialog is a container to display content in an overlay window.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
'use client';
|
|
7
|
+
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
|
8
|
+
import { Button } from '@/components/ui/button';
|
|
9
|
+
import {
|
|
10
|
+
Dialog,
|
|
11
|
+
DialogBackdrop,
|
|
12
|
+
DialogClose,
|
|
13
|
+
DialogContent,
|
|
14
|
+
DialogHeader,
|
|
15
|
+
DialogHeaderActions,
|
|
16
|
+
DialogPopup,
|
|
17
|
+
DialogPortal,
|
|
18
|
+
DialogPositioner,
|
|
19
|
+
DialogTitle,
|
|
20
|
+
DialogTrigger
|
|
21
|
+
} from '@/components/ui/dialog';
|
|
22
|
+
import { InputText } from '@/components/ui/inputtext';
|
|
23
|
+
import { Label } from '@/components/ui/label';
|
|
24
|
+
import { Times } from '@primeicons/react';
|
|
25
|
+
|
|
26
|
+
export default function Preview() {
|
|
27
|
+
return (
|
|
28
|
+
<div className="flex justify-center">
|
|
29
|
+
<Dialog draggable>
|
|
30
|
+
<DialogTrigger as={Button}>Edit Profile</DialogTrigger>
|
|
31
|
+
<DialogPortal>
|
|
32
|
+
<DialogBackdrop />
|
|
33
|
+
<DialogPositioner>
|
|
34
|
+
<DialogPopup style={{ width: '28rem' }}>
|
|
35
|
+
<DialogHeader>
|
|
36
|
+
<DialogTitle>Edit Profile</DialogTitle>
|
|
37
|
+
<DialogHeaderActions>
|
|
38
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
39
|
+
<Times />
|
|
40
|
+
</DialogClose>
|
|
41
|
+
</DialogHeaderActions>
|
|
42
|
+
</DialogHeader>
|
|
43
|
+
<DialogContent>
|
|
44
|
+
<div className="flex flex-col gap-6">
|
|
45
|
+
<div className="flex items-center gap-4">
|
|
46
|
+
<Avatar shape="circle" size="xlarge">
|
|
47
|
+
<AvatarImage src="https://primefaces.org/cdn/primevue/images/avatar/asiyajavayant.png" />
|
|
48
|
+
<AvatarFallback>AM</AvatarFallback>
|
|
49
|
+
</Avatar>
|
|
50
|
+
<div>
|
|
51
|
+
<p className="font-semibold text-lg mt-0 mb-1">Amanda Miller</p>
|
|
52
|
+
<p className="text-surface-500 dark:text-surface-400 mt-0 mb-0 text-sm">amanda@example.com</p>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="flex flex-col gap-1">
|
|
56
|
+
<Label htmlFor="tw-name" className="text-sm font-semibold">
|
|
57
|
+
Name
|
|
58
|
+
</Label>
|
|
59
|
+
<InputText id="tw-name" defaultValue="Amanda Miller" />
|
|
60
|
+
</div>
|
|
61
|
+
<div className="flex flex-col gap-1">
|
|
62
|
+
<Label htmlFor="tw-username" className="text-sm font-semibold">
|
|
63
|
+
Username
|
|
64
|
+
</Label>
|
|
65
|
+
<InputText id="tw-username" defaultValue="@amandamiller" />
|
|
66
|
+
</div>
|
|
67
|
+
<div className="flex flex-col gap-1">
|
|
68
|
+
<Label htmlFor="tw-email" className="text-sm font-semibold">
|
|
69
|
+
Email
|
|
70
|
+
</Label>
|
|
71
|
+
<InputText id="tw-email" defaultValue="amanda@example.com" />
|
|
72
|
+
</div>
|
|
73
|
+
<div className="flex justify-end gap-2">
|
|
74
|
+
<DialogClose as={Button} severity="secondary">
|
|
75
|
+
Cancel
|
|
76
|
+
</DialogClose>
|
|
77
|
+
<DialogClose as={Button}>Save Changes</DialogClose>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</DialogContent>
|
|
81
|
+
</DialogPopup>
|
|
82
|
+
</DialogPositioner>
|
|
83
|
+
</DialogPortal>
|
|
84
|
+
</Dialog>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Installation
|
|
91
|
+
|
|
92
|
+
<DocTabs value="CLI">
|
|
93
|
+
<DocTabsList>
|
|
94
|
+
<DocTabsTab value="CLI">Shadcn CLI</DocTabsTab>
|
|
95
|
+
<DocTabsTab value="Manual">Manual</DocTabsTab>
|
|
96
|
+
</DocTabsList>
|
|
97
|
+
<DocTabsPanel value="CLI">
|
|
98
|
+
```bash
|
|
99
|
+
npx shadcn@latest add https://primereact.dev/r/dialog.json
|
|
100
|
+
```
|
|
101
|
+
</DocTabsPanel>
|
|
102
|
+
<DocTabsPanel value="Manual">
|
|
103
|
+
Copy and paste the following code into your project
|
|
104
|
+
<DocSourceViewer name="components/ui/dialog" />
|
|
105
|
+
Update the import paths to match your project setup.
|
|
106
|
+
</DocTabsPanel>
|
|
107
|
+
</DocTabs>
|
|
108
|
+
|
|
109
|
+
## Usage
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import { Dialog, DialogBackdrop, DialogClose, DialogContent, DialogFooter, DialogHeader, DialogHeaderActions, DialogMaximizable, DialogPopup, DialogPortal, DialogPositioner, DialogTitle, DialogTrigger } from '@/components/ui/dialog';
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
<Dialog>
|
|
117
|
+
<DialogTrigger />
|
|
118
|
+
<DialogPortal>
|
|
119
|
+
<DialogBackdrop />
|
|
120
|
+
<DialogPositioner>
|
|
121
|
+
<DialogPopup>
|
|
122
|
+
<DialogHeader>
|
|
123
|
+
<DialogTitle />
|
|
124
|
+
<DialogHeaderActions>
|
|
125
|
+
<DialogMaximizable />
|
|
126
|
+
<DialogClose />
|
|
127
|
+
</DialogHeaderActions>
|
|
128
|
+
</DialogHeader>
|
|
129
|
+
<DialogContent />
|
|
130
|
+
<DialogFooter />
|
|
131
|
+
</DialogPopup>
|
|
132
|
+
</DialogPositioner>
|
|
133
|
+
</DialogPortal>
|
|
134
|
+
</Dialog>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Examples
|
|
138
|
+
|
|
139
|
+
### Basic
|
|
140
|
+
|
|
141
|
+
```tsx
|
|
142
|
+
'use client';
|
|
143
|
+
import { Button } from '@/components/ui/button';
|
|
144
|
+
import {
|
|
145
|
+
Dialog,
|
|
146
|
+
DialogBackdrop,
|
|
147
|
+
DialogClose,
|
|
148
|
+
DialogContent,
|
|
149
|
+
DialogFooter,
|
|
150
|
+
DialogHeader,
|
|
151
|
+
DialogHeaderActions,
|
|
152
|
+
DialogPopup,
|
|
153
|
+
DialogPortal,
|
|
154
|
+
DialogPositioner,
|
|
155
|
+
DialogTitle,
|
|
156
|
+
DialogTrigger
|
|
157
|
+
} from '@/components/ui/dialog';
|
|
158
|
+
import { InputText } from '@/components/ui/inputtext';
|
|
159
|
+
import { Label } from '@/components/ui/label';
|
|
160
|
+
import { Times } from '@primeicons/react';
|
|
161
|
+
|
|
162
|
+
export default function BasicDemo() {
|
|
163
|
+
return (
|
|
164
|
+
<div className="flex justify-center">
|
|
165
|
+
<Dialog>
|
|
166
|
+
<DialogTrigger as={Button}>Open Trigger</DialogTrigger>
|
|
167
|
+
|
|
168
|
+
<DialogPortal>
|
|
169
|
+
<DialogBackdrop />
|
|
170
|
+
<DialogPositioner>
|
|
171
|
+
<DialogPopup className="max-w-sm w-full">
|
|
172
|
+
<DialogHeader>
|
|
173
|
+
<DialogTitle>Edit Profile</DialogTitle>
|
|
174
|
+
<DialogHeaderActions>
|
|
175
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
176
|
+
<Times />
|
|
177
|
+
</DialogClose>
|
|
178
|
+
</DialogHeaderActions>
|
|
179
|
+
</DialogHeader>
|
|
180
|
+
<DialogContent>
|
|
181
|
+
<div className="flex flex-col gap-4">
|
|
182
|
+
<div className="flex flex-col gap-1.5">
|
|
183
|
+
<Label htmlFor="name">Name</Label>
|
|
184
|
+
<InputText id="name" defaultValue="Amanda Miller" />
|
|
185
|
+
</div>
|
|
186
|
+
<div className="flex flex-col gap-1.5">
|
|
187
|
+
<Label htmlFor="email">Email</Label>
|
|
188
|
+
<InputText id="email" defaultValue="amanda@example.com" />
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</DialogContent>
|
|
192
|
+
<DialogFooter>
|
|
193
|
+
<DialogClose as={Button} severity="secondary" variant="outlined">
|
|
194
|
+
Cancel
|
|
195
|
+
</DialogClose>
|
|
196
|
+
<DialogClose as={Button}>Save</DialogClose>
|
|
197
|
+
</DialogFooter>
|
|
198
|
+
</DialogPopup>
|
|
199
|
+
</DialogPositioner>
|
|
200
|
+
</DialogPortal>
|
|
201
|
+
</Dialog>
|
|
202
|
+
</div>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Draggable
|
|
208
|
+
|
|
209
|
+
A dialog can be repositioned by dragging its header when the `draggable` prop is enabled.
|
|
210
|
+
|
|
211
|
+
```tsx
|
|
212
|
+
'use client';
|
|
213
|
+
import { Times } from '@primeicons/react/times';
|
|
214
|
+
import { Button } from '@/components/ui/button';
|
|
215
|
+
import {
|
|
216
|
+
Dialog,
|
|
217
|
+
DialogBackdrop,
|
|
218
|
+
DialogClose,
|
|
219
|
+
DialogContent,
|
|
220
|
+
DialogFooter,
|
|
221
|
+
DialogHeader,
|
|
222
|
+
DialogHeaderActions,
|
|
223
|
+
DialogPopup,
|
|
224
|
+
DialogPortal,
|
|
225
|
+
DialogPositioner,
|
|
226
|
+
DialogTitle,
|
|
227
|
+
DialogTrigger
|
|
228
|
+
} from '@/components/ui/dialog';
|
|
229
|
+
|
|
230
|
+
export default function DraggableDemo() {
|
|
231
|
+
return (
|
|
232
|
+
<div className="flex justify-center">
|
|
233
|
+
<Dialog draggable>
|
|
234
|
+
<DialogTrigger as={Button}>Open Note</DialogTrigger>
|
|
235
|
+
<DialogPortal>
|
|
236
|
+
<DialogBackdrop />
|
|
237
|
+
<DialogPositioner>
|
|
238
|
+
<DialogPopup style={{ width: '24rem' }}>
|
|
239
|
+
<DialogHeader>
|
|
240
|
+
<DialogTitle>Quick Note</DialogTitle>
|
|
241
|
+
<DialogHeaderActions>
|
|
242
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
243
|
+
<Times />
|
|
244
|
+
</DialogClose>
|
|
245
|
+
</DialogHeaderActions>
|
|
246
|
+
</DialogHeader>
|
|
247
|
+
<DialogContent>
|
|
248
|
+
<div className="flex flex-col gap-4">
|
|
249
|
+
<p className="text-sm text-surface-500 dark:text-surface-400 mt-0 mb-0">
|
|
250
|
+
Drag this dialog by its header to reposition it anywhere on the screen.
|
|
251
|
+
</p>
|
|
252
|
+
<textarea
|
|
253
|
+
className="w-full h-32 p-3 rounded-md border border-surface-200 dark:border-surface-700 bg-surface-0 dark:bg-surface-900 text-surface-700 dark:text-surface-0 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
254
|
+
placeholder="Type your note here..."
|
|
255
|
+
defaultValue="Remember to review the design specs for the new dashboard layout before the meeting tomorrow."
|
|
256
|
+
/>
|
|
257
|
+
</div>
|
|
258
|
+
</DialogContent>
|
|
259
|
+
<DialogFooter>
|
|
260
|
+
<DialogClose as={Button} severity="secondary">
|
|
261
|
+
Discard
|
|
262
|
+
</DialogClose>
|
|
263
|
+
<DialogClose as={Button}>Save Note</DialogClose>
|
|
264
|
+
</DialogFooter>
|
|
265
|
+
</DialogPopup>
|
|
266
|
+
</DialogPositioner>
|
|
267
|
+
</DialogPortal>
|
|
268
|
+
</Dialog>
|
|
269
|
+
</div>
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Position
|
|
275
|
+
|
|
276
|
+
The position of the dialog can be customized with the `position` property. The available values are `top`, `top-left`, `top-right`, `bottom`, `bottom-left`, `bottom-right`, `left`, `right`, and `center`.
|
|
277
|
+
|
|
278
|
+
```tsx
|
|
279
|
+
'use client';
|
|
280
|
+
import { Button } from '@/components/ui/button';
|
|
281
|
+
import {
|
|
282
|
+
Dialog,
|
|
283
|
+
DialogBackdrop,
|
|
284
|
+
DialogClose,
|
|
285
|
+
DialogContent,
|
|
286
|
+
DialogHeader,
|
|
287
|
+
DialogHeaderActions,
|
|
288
|
+
DialogPopup,
|
|
289
|
+
DialogPortal,
|
|
290
|
+
DialogPositioner,
|
|
291
|
+
DialogTitle
|
|
292
|
+
} from '@/components/ui/dialog';
|
|
293
|
+
import { InputText } from '@/components/ui/inputtext';
|
|
294
|
+
import { Label } from '@/components/ui/label';
|
|
295
|
+
import { ArrowDown, ArrowDownLeft, ArrowDownRight, ArrowLeft, ArrowRight, ArrowUp, ArrowUpLeft, ArrowUpRight, Times } from '@primeicons/react';
|
|
296
|
+
import { DialogRootChangeEvent, DialogRootProps } from 'primereact/dialog';
|
|
297
|
+
import * as React from 'react';
|
|
298
|
+
|
|
299
|
+
export default function PositionDemo() {
|
|
300
|
+
const [open, setOpen] = React.useState<boolean>(false);
|
|
301
|
+
const [position, setPosition] = React.useState<DialogRootProps['position']>('center');
|
|
302
|
+
|
|
303
|
+
const openPosition = (position: DialogRootProps['position']) => {
|
|
304
|
+
setOpen(true);
|
|
305
|
+
setPosition(position);
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
return (
|
|
309
|
+
<div>
|
|
310
|
+
<div className="flex flex-wrap justify-center gap-2 mb-2">
|
|
311
|
+
<Button onClick={() => openPosition('left')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
312
|
+
Left
|
|
313
|
+
<ArrowLeft />
|
|
314
|
+
</Button>
|
|
315
|
+
<Button onClick={() => openPosition('right')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
316
|
+
Right
|
|
317
|
+
<ArrowRight />
|
|
318
|
+
</Button>
|
|
319
|
+
</div>
|
|
320
|
+
<div className="flex flex-wrap justify-center gap-2 mb-2">
|
|
321
|
+
<Button onClick={() => openPosition('topleft')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
322
|
+
TopLeft
|
|
323
|
+
<ArrowUpLeft />
|
|
324
|
+
</Button>
|
|
325
|
+
<Button onClick={() => openPosition('top')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
326
|
+
Top
|
|
327
|
+
<ArrowUp />
|
|
328
|
+
</Button>
|
|
329
|
+
<Button onClick={() => openPosition('topright')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
330
|
+
TopRight
|
|
331
|
+
<ArrowUpRight />
|
|
332
|
+
</Button>
|
|
333
|
+
</div>
|
|
334
|
+
<div className="flex flex-wrap justify-center gap-2">
|
|
335
|
+
<Button onClick={() => openPosition('bottomleft')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
336
|
+
BottomLeft
|
|
337
|
+
<ArrowDownLeft />
|
|
338
|
+
</Button>
|
|
339
|
+
<Button onClick={() => openPosition('bottom')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
340
|
+
Bottom
|
|
341
|
+
<ArrowDown />
|
|
342
|
+
</Button>
|
|
343
|
+
<Button onClick={() => openPosition('bottomright')} severity="secondary" style={{ minWidth: '10rem' }}>
|
|
344
|
+
BottomRight
|
|
345
|
+
<ArrowDownRight />
|
|
346
|
+
</Button>
|
|
347
|
+
</div>
|
|
348
|
+
<Dialog open={open} onOpenChange={(e: DialogRootChangeEvent) => setOpen(e.value as boolean)} position={position}>
|
|
349
|
+
<DialogPortal>
|
|
350
|
+
<DialogBackdrop />
|
|
351
|
+
<DialogPositioner>
|
|
352
|
+
<DialogPopup style={{ width: '25rem' }}>
|
|
353
|
+
<DialogHeader>
|
|
354
|
+
<DialogTitle>Edit Profile</DialogTitle>
|
|
355
|
+
<DialogHeaderActions>
|
|
356
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
357
|
+
<Times />
|
|
358
|
+
</DialogClose>
|
|
359
|
+
</DialogHeaderActions>
|
|
360
|
+
</DialogHeader>
|
|
361
|
+
<DialogContent>
|
|
362
|
+
<div className="flex flex-col gap-6">
|
|
363
|
+
<span className="text-surface-500 dark:text-surface-400">Update your information.</span>
|
|
364
|
+
<div className="flex flex-col gap-1">
|
|
365
|
+
<Label htmlFor="username" className="font-semibold">
|
|
366
|
+
Username
|
|
367
|
+
</Label>
|
|
368
|
+
<InputText id="username" />
|
|
369
|
+
</div>
|
|
370
|
+
<div className="flex flex-col gap-1">
|
|
371
|
+
<Label htmlFor="email" className="font-semibold">
|
|
372
|
+
Email
|
|
373
|
+
</Label>
|
|
374
|
+
<InputText id="email" />
|
|
375
|
+
</div>
|
|
376
|
+
<div className="flex justify-end gap-2">
|
|
377
|
+
<DialogClose as={Button} severity="secondary">
|
|
378
|
+
Cancel
|
|
379
|
+
</DialogClose>
|
|
380
|
+
<DialogClose as={Button}>Save</DialogClose>
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</DialogContent>
|
|
384
|
+
</DialogPopup>
|
|
385
|
+
</DialogPositioner>
|
|
386
|
+
</DialogPortal>
|
|
387
|
+
</Dialog>
|
|
388
|
+
</div>
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Maximizable
|
|
394
|
+
|
|
395
|
+
A dialog can be maximized by clicking the _Dialog.Maximizable_ button.
|
|
396
|
+
|
|
397
|
+
```tsx
|
|
398
|
+
'use client';
|
|
399
|
+
import { Button } from '@/components/ui/button';
|
|
400
|
+
import {
|
|
401
|
+
Dialog,
|
|
402
|
+
DialogBackdrop,
|
|
403
|
+
DialogClose,
|
|
404
|
+
DialogContent,
|
|
405
|
+
DialogFooter,
|
|
406
|
+
DialogHeader,
|
|
407
|
+
DialogHeaderActions,
|
|
408
|
+
DialogMaximizable,
|
|
409
|
+
DialogPopup,
|
|
410
|
+
DialogPortal,
|
|
411
|
+
DialogPositioner,
|
|
412
|
+
DialogTitle,
|
|
413
|
+
DialogTrigger
|
|
414
|
+
} from '@/components/ui/dialog';
|
|
415
|
+
import { Times, WindowMaximize, WindowMinimize } from '@primeicons/react';
|
|
416
|
+
|
|
417
|
+
export default function MaximizableDemo() {
|
|
418
|
+
return (
|
|
419
|
+
<div className="flex justify-center">
|
|
420
|
+
<Dialog>
|
|
421
|
+
<DialogTrigger as={Button}>Open Trigger</DialogTrigger>
|
|
422
|
+
<DialogPortal>
|
|
423
|
+
<DialogBackdrop />
|
|
424
|
+
<DialogPositioner>
|
|
425
|
+
<DialogPopup style={{ width: '50rem' }}>
|
|
426
|
+
<DialogHeader>
|
|
427
|
+
<DialogTitle>Article Preview</DialogTitle>
|
|
428
|
+
<DialogHeaderActions>
|
|
429
|
+
<DialogMaximizable as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
430
|
+
<WindowMaximize className="in-data-maximized:hidden!" />
|
|
431
|
+
<WindowMinimize className="in-data-minimized:hidden!" />
|
|
432
|
+
</DialogMaximizable>
|
|
433
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
434
|
+
<Times />
|
|
435
|
+
</DialogClose>
|
|
436
|
+
</DialogHeaderActions>
|
|
437
|
+
</DialogHeader>
|
|
438
|
+
<DialogContent>
|
|
439
|
+
<div className="flex flex-col gap-4">
|
|
440
|
+
<div className="flex items-center gap-2 text-sm text-surface-500 dark:text-surface-400">
|
|
441
|
+
<span>Published on Feb 1, 2026</span>
|
|
442
|
+
<span>·</span>
|
|
443
|
+
<span>5 min read</span>
|
|
444
|
+
</div>
|
|
445
|
+
<h2 className="text-xl font-bold mt-0 mb-0">Getting Started with Component-Driven Development</h2>
|
|
446
|
+
<p className="leading-relaxed mt-0 mb-0">
|
|
447
|
+
Component-driven development is an approach that focuses on building loosely coupled, independent components
|
|
448
|
+
that can be composed together to build complex user interfaces. This methodology promotes reusability,
|
|
449
|
+
testability, and maintainability.
|
|
450
|
+
</p>
|
|
451
|
+
<p className="leading-relaxed mt-0 mb-0">
|
|
452
|
+
By breaking down the UI into smaller, self-contained pieces, teams can work in parallel on different parts of
|
|
453
|
+
the application without stepping on each other's toes. Each component encapsulates its own logic, styles,
|
|
454
|
+
and behavior, making it easier to reason about and test in isolation.
|
|
455
|
+
</p>
|
|
456
|
+
<p className="leading-relaxed mt-0 mb-0">
|
|
457
|
+
Modern frameworks and libraries have embraced this pattern, providing tools and conventions that make it
|
|
458
|
+
straightforward to create, compose, and manage components at scale. The result is a more predictable,
|
|
459
|
+
scalable, and enjoyable development experience.
|
|
460
|
+
</p>
|
|
461
|
+
</div>
|
|
462
|
+
</DialogContent>
|
|
463
|
+
<DialogFooter>
|
|
464
|
+
<div className="flex items-center justify-between w-full text-sm text-surface-500 dark:text-surface-400">
|
|
465
|
+
<span>Last updated: Feb 1, 2026</span>
|
|
466
|
+
<span>Author: Jane Doe</span>
|
|
467
|
+
</div>
|
|
468
|
+
</DialogFooter>
|
|
469
|
+
</DialogPopup>
|
|
470
|
+
</DialogPositioner>
|
|
471
|
+
</DialogPortal>
|
|
472
|
+
</Dialog>
|
|
473
|
+
</div>
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Full Screen
|
|
479
|
+
|
|
480
|
+
The `fullScreen` prop opens the dialog in maximized mode. Without a _Dialog.Maximizable_ button, the dialog remains full screen until closed.
|
|
481
|
+
|
|
482
|
+
```tsx
|
|
483
|
+
'use client';
|
|
484
|
+
import { Button } from '@/components/ui/button';
|
|
485
|
+
import {
|
|
486
|
+
Dialog,
|
|
487
|
+
DialogBackdrop,
|
|
488
|
+
DialogClose,
|
|
489
|
+
DialogContent,
|
|
490
|
+
DialogHeader,
|
|
491
|
+
DialogHeaderActions,
|
|
492
|
+
DialogPopup,
|
|
493
|
+
DialogPortal,
|
|
494
|
+
DialogPositioner,
|
|
495
|
+
DialogTitle,
|
|
496
|
+
DialogTrigger
|
|
497
|
+
} from '@/components/ui/dialog';
|
|
498
|
+
import { Image as ImageIcon, Times } from '@primeicons/react';
|
|
499
|
+
|
|
500
|
+
const photos = Array.from({ length: 18 }, (_, i) => i + 1);
|
|
501
|
+
|
|
502
|
+
export default function FullScreenDemo() {
|
|
503
|
+
return (
|
|
504
|
+
<div className="flex justify-center">
|
|
505
|
+
<Dialog fullScreen>
|
|
506
|
+
<DialogTrigger as={Button}>Open Trigger</DialogTrigger>
|
|
507
|
+
<DialogPortal>
|
|
508
|
+
<DialogBackdrop />
|
|
509
|
+
<DialogPositioner>
|
|
510
|
+
<DialogPopup>
|
|
511
|
+
<DialogHeader>
|
|
512
|
+
<DialogTitle>Photo Gallery</DialogTitle>
|
|
513
|
+
<DialogHeaderActions>
|
|
514
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
515
|
+
<Times />
|
|
516
|
+
</DialogClose>
|
|
517
|
+
</DialogHeaderActions>
|
|
518
|
+
</DialogHeader>
|
|
519
|
+
<DialogContent>
|
|
520
|
+
<div className="flex flex-col gap-4">
|
|
521
|
+
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-3">
|
|
522
|
+
{photos.map((i) => (
|
|
523
|
+
<div
|
|
524
|
+
key={i}
|
|
525
|
+
className="aspect-square rounded-lg bg-surface-100 dark:bg-surface-800 flex items-center justify-center"
|
|
526
|
+
>
|
|
527
|
+
<ImageIcon className="text-2xl text-surface-400" />
|
|
528
|
+
</div>
|
|
529
|
+
))}
|
|
530
|
+
</div>
|
|
531
|
+
<p className="text-sm text-surface-500 dark:text-surface-400 mt-0 mb-0">Showing 18 of 64 photos</p>
|
|
532
|
+
</div>
|
|
533
|
+
</DialogContent>
|
|
534
|
+
</DialogPopup>
|
|
535
|
+
</DialogPositioner>
|
|
536
|
+
</DialogPortal>
|
|
537
|
+
</Dialog>
|
|
538
|
+
</div>
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Modal
|
|
544
|
+
|
|
545
|
+
A modal dialog with a backdrop that blocks interaction with the page. When `modal` and `dismissable` are both enabled, clicking outside the dialog closes it.
|
|
546
|
+
|
|
547
|
+
```tsx
|
|
548
|
+
'use client';
|
|
549
|
+
import { Times } from '@primeicons/react/times';
|
|
550
|
+
import { Button } from '@/components/ui/button';
|
|
551
|
+
import {
|
|
552
|
+
Dialog,
|
|
553
|
+
DialogBackdrop,
|
|
554
|
+
DialogClose,
|
|
555
|
+
DialogContent,
|
|
556
|
+
DialogHeader,
|
|
557
|
+
DialogHeaderActions,
|
|
558
|
+
DialogPopup,
|
|
559
|
+
DialogPortal,
|
|
560
|
+
DialogPositioner,
|
|
561
|
+
DialogTitle,
|
|
562
|
+
DialogTrigger
|
|
563
|
+
} from '@/components/ui/dialog';
|
|
564
|
+
import { InputText } from '@/components/ui/inputtext';
|
|
565
|
+
import { Label } from '@/components/ui/label';
|
|
566
|
+
|
|
567
|
+
export default function ModalDemo() {
|
|
568
|
+
return (
|
|
569
|
+
<div className="flex justify-center">
|
|
570
|
+
<Dialog modal dismissable>
|
|
571
|
+
<DialogTrigger as={Button}>Edit Profile</DialogTrigger>
|
|
572
|
+
<DialogPortal>
|
|
573
|
+
<DialogBackdrop />
|
|
574
|
+
<DialogPositioner>
|
|
575
|
+
<DialogPopup style={{ width: '25rem' }}>
|
|
576
|
+
<DialogHeader>
|
|
577
|
+
<DialogTitle>Edit Profile</DialogTitle>
|
|
578
|
+
<DialogHeaderActions>
|
|
579
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
580
|
+
<Times />
|
|
581
|
+
</DialogClose>
|
|
582
|
+
</DialogHeaderActions>
|
|
583
|
+
</DialogHeader>
|
|
584
|
+
<DialogContent>
|
|
585
|
+
<div className="flex flex-col gap-6">
|
|
586
|
+
<span className="text-surface-500 dark:text-surface-400">
|
|
587
|
+
Update your information. Click outside the dialog to dismiss.
|
|
588
|
+
</span>
|
|
589
|
+
<div className="flex flex-col gap-1">
|
|
590
|
+
<Label htmlFor="username" className="font-semibold">
|
|
591
|
+
Username
|
|
592
|
+
</Label>
|
|
593
|
+
<InputText id="username" />
|
|
594
|
+
</div>
|
|
595
|
+
<div className="flex flex-col gap-1">
|
|
596
|
+
<Label htmlFor="email" className="font-semibold">
|
|
597
|
+
Email
|
|
598
|
+
</Label>
|
|
599
|
+
<InputText id="email" />
|
|
600
|
+
</div>
|
|
601
|
+
<div className="flex justify-end gap-2">
|
|
602
|
+
<DialogClose as={Button} severity="secondary">
|
|
603
|
+
Cancel
|
|
604
|
+
</DialogClose>
|
|
605
|
+
<DialogClose as={Button}>Save</DialogClose>
|
|
606
|
+
</div>
|
|
607
|
+
</div>
|
|
608
|
+
</DialogContent>
|
|
609
|
+
</DialogPopup>
|
|
610
|
+
</DialogPositioner>
|
|
611
|
+
</DialogPortal>
|
|
612
|
+
</Dialog>
|
|
613
|
+
</div>
|
|
614
|
+
);
|
|
615
|
+
}
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
### Without Modal
|
|
619
|
+
|
|
620
|
+
A dialog without a modal layer. The page remains interactive behind the dialog.
|
|
621
|
+
|
|
622
|
+
```tsx
|
|
623
|
+
'use client';
|
|
624
|
+
import { Button } from '@/components/ui/button';
|
|
625
|
+
import {
|
|
626
|
+
Dialog,
|
|
627
|
+
DialogClose,
|
|
628
|
+
DialogContent,
|
|
629
|
+
DialogHeader,
|
|
630
|
+
DialogHeaderActions,
|
|
631
|
+
DialogPopup,
|
|
632
|
+
DialogPortal,
|
|
633
|
+
DialogPositioner,
|
|
634
|
+
DialogTitle,
|
|
635
|
+
DialogTrigger
|
|
636
|
+
} from '@/components/ui/dialog';
|
|
637
|
+
import { InputText } from '@/components/ui/inputtext';
|
|
638
|
+
import { Label } from '@/components/ui/label';
|
|
639
|
+
import { Times } from '@primeicons/react';
|
|
640
|
+
|
|
641
|
+
export default function WithoutModalDemo() {
|
|
642
|
+
return (
|
|
643
|
+
<div className="flex justify-center">
|
|
644
|
+
<Dialog>
|
|
645
|
+
<DialogTrigger as={Button}>Open Trigger</DialogTrigger>
|
|
646
|
+
<DialogPortal>
|
|
647
|
+
<DialogPositioner>
|
|
648
|
+
<DialogPopup style={{ width: '25rem' }}>
|
|
649
|
+
<DialogHeader>
|
|
650
|
+
<DialogTitle>Edit Profile</DialogTitle>
|
|
651
|
+
<DialogHeaderActions>
|
|
652
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
653
|
+
<Times />
|
|
654
|
+
</DialogClose>
|
|
655
|
+
</DialogHeaderActions>
|
|
656
|
+
</DialogHeader>
|
|
657
|
+
<DialogContent>
|
|
658
|
+
<div className="flex flex-col gap-6">
|
|
659
|
+
<span className="text-surface-500 dark:text-surface-400">Update your information.</span>
|
|
660
|
+
<div className="flex flex-col gap-1">
|
|
661
|
+
<Label htmlFor="username" className="font-semibold">
|
|
662
|
+
Username
|
|
663
|
+
</Label>
|
|
664
|
+
<InputText id="username" />
|
|
665
|
+
</div>
|
|
666
|
+
<div className="flex flex-col gap-1">
|
|
667
|
+
<Label htmlFor="email" className="font-semibold">
|
|
668
|
+
Email
|
|
669
|
+
</Label>
|
|
670
|
+
<InputText id="email" />
|
|
671
|
+
</div>
|
|
672
|
+
<div className="flex justify-end gap-2">
|
|
673
|
+
<DialogClose as={Button} severity="secondary">
|
|
674
|
+
Cancel
|
|
675
|
+
</DialogClose>
|
|
676
|
+
<DialogClose as={Button}>Save</DialogClose>
|
|
677
|
+
</div>
|
|
678
|
+
</div>
|
|
679
|
+
</DialogContent>
|
|
680
|
+
</DialogPopup>
|
|
681
|
+
</DialogPositioner>
|
|
682
|
+
</DialogPortal>
|
|
683
|
+
</Dialog>
|
|
684
|
+
</div>
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### Confirmation
|
|
690
|
+
|
|
691
|
+
A common pattern for confirmation dialogs with warning messages and action buttons.
|
|
692
|
+
|
|
693
|
+
```tsx
|
|
694
|
+
'use client';
|
|
695
|
+
import { Button } from '@/components/ui/button';
|
|
696
|
+
import {
|
|
697
|
+
Dialog,
|
|
698
|
+
DialogBackdrop,
|
|
699
|
+
DialogClose,
|
|
700
|
+
DialogContent,
|
|
701
|
+
DialogHeader,
|
|
702
|
+
DialogHeaderActions,
|
|
703
|
+
DialogPopup,
|
|
704
|
+
DialogPortal,
|
|
705
|
+
DialogPositioner,
|
|
706
|
+
DialogTitle,
|
|
707
|
+
DialogTrigger
|
|
708
|
+
} from '@/components/ui/dialog';
|
|
709
|
+
import { ExclamationTriangle, Times } from '@primeicons/react';
|
|
710
|
+
|
|
711
|
+
export default function ConfirmationDemo() {
|
|
712
|
+
return (
|
|
713
|
+
<div className="flex justify-center">
|
|
714
|
+
<Dialog>
|
|
715
|
+
<DialogTrigger as={Button}>Open Trigger</DialogTrigger>
|
|
716
|
+
<DialogPortal>
|
|
717
|
+
<DialogBackdrop />
|
|
718
|
+
<DialogPositioner>
|
|
719
|
+
<DialogPopup style={{ width: '26rem' }}>
|
|
720
|
+
<DialogHeader>
|
|
721
|
+
<DialogTitle>Confirm Deletion</DialogTitle>
|
|
722
|
+
<DialogHeaderActions>
|
|
723
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
724
|
+
<Times />
|
|
725
|
+
</DialogClose>
|
|
726
|
+
</DialogHeaderActions>
|
|
727
|
+
</DialogHeader>
|
|
728
|
+
<DialogContent>
|
|
729
|
+
<div className="flex flex-col gap-4">
|
|
730
|
+
<div className="flex items-start gap-3">
|
|
731
|
+
<ExclamationTriangle className="text-orange-500 w-16 h-16 mt-0.5" />
|
|
732
|
+
<div>
|
|
733
|
+
<p className="font-semibold mt-0 mb-2">Are you sure you want to delete your account?</p>
|
|
734
|
+
<p className="text-surface-500 dark:text-surface-400 text-sm mt-0 mb-0">
|
|
735
|
+
This action cannot be undone. All of your data, including projects, files, and settings will be
|
|
736
|
+
permanently removed.
|
|
737
|
+
</p>
|
|
738
|
+
</div>
|
|
739
|
+
</div>
|
|
740
|
+
<div className="flex justify-end gap-2">
|
|
741
|
+
<DialogClose as={Button} severity="secondary">
|
|
742
|
+
Cancel
|
|
743
|
+
</DialogClose>
|
|
744
|
+
<DialogClose as={Button} severity="danger">
|
|
745
|
+
Delete
|
|
746
|
+
</DialogClose>
|
|
747
|
+
</div>
|
|
748
|
+
</div>
|
|
749
|
+
</DialogContent>
|
|
750
|
+
</DialogPopup>
|
|
751
|
+
</DialogPositioner>
|
|
752
|
+
</DialogPortal>
|
|
753
|
+
</Dialog>
|
|
754
|
+
</div>
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
### Inside Scroll
|
|
760
|
+
|
|
761
|
+
When `scrollBehavior` is set to `inside`, the dialog content area scrolls while the header and footer remain fixed.
|
|
762
|
+
|
|
763
|
+
```tsx
|
|
764
|
+
'use client';
|
|
765
|
+
import { Times } from '@primeicons/react/times';
|
|
766
|
+
import { Button } from '@/components/ui/button';
|
|
767
|
+
import {
|
|
768
|
+
Dialog,
|
|
769
|
+
DialogBackdrop,
|
|
770
|
+
DialogClose,
|
|
771
|
+
DialogContent,
|
|
772
|
+
DialogFooter,
|
|
773
|
+
DialogHeader,
|
|
774
|
+
DialogHeaderActions,
|
|
775
|
+
DialogPopup,
|
|
776
|
+
DialogPortal,
|
|
777
|
+
DialogPositioner,
|
|
778
|
+
DialogTitle,
|
|
779
|
+
DialogTrigger
|
|
780
|
+
} from '@/components/ui/dialog';
|
|
781
|
+
import { Tag } from '@/components/ui/tag';
|
|
782
|
+
|
|
783
|
+
export default function InsideScrollDemo() {
|
|
784
|
+
return (
|
|
785
|
+
<div className="flex justify-center">
|
|
786
|
+
<Dialog scrollBehavior="inside">
|
|
787
|
+
<DialogTrigger as={Button}>Inside Scroll</DialogTrigger>
|
|
788
|
+
<DialogPortal>
|
|
789
|
+
<DialogBackdrop />
|
|
790
|
+
<DialogPositioner>
|
|
791
|
+
<DialogPopup style={{ width: '40rem' }}>
|
|
792
|
+
<DialogHeader>
|
|
793
|
+
<DialogTitle>Terms of Service</DialogTitle>
|
|
794
|
+
<DialogHeaderActions>
|
|
795
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
796
|
+
<Times />
|
|
797
|
+
</DialogClose>
|
|
798
|
+
</DialogHeaderActions>
|
|
799
|
+
</DialogHeader>
|
|
800
|
+
<DialogContent>
|
|
801
|
+
<div className="flex flex-col gap-4">
|
|
802
|
+
<div className="flex items-center gap-2">
|
|
803
|
+
<Tag severity="info">Updated</Tag>
|
|
804
|
+
<span className="text-sm text-surface-500 dark:text-surface-400">Last revised: January 1, 2026</span>
|
|
805
|
+
</div>
|
|
806
|
+
|
|
807
|
+
<div>
|
|
808
|
+
<h3 className="text-base font-semibold mt-0 mb-2">1. Acceptance of Terms</h3>
|
|
809
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
810
|
+
By accessing and using this service, you accept and agree to be bound by the terms and provision of this
|
|
811
|
+
agreement. If you do not agree to abide by the above, please do not use this service.
|
|
812
|
+
</p>
|
|
813
|
+
</div>
|
|
814
|
+
|
|
815
|
+
<div>
|
|
816
|
+
<h3 className="text-base font-semibold mt-0 mb-2">2. Use License</h3>
|
|
817
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
818
|
+
Permission is granted to temporarily download one copy of the materials on this service for personal,
|
|
819
|
+
non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under
|
|
820
|
+
this license you may not modify or copy the materials, use the materials for any commercial purpose, or
|
|
821
|
+
attempt to decompile or reverse engineer any software contained on this service.
|
|
822
|
+
</p>
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
<div>
|
|
826
|
+
<h3 className="text-base font-semibold mt-0 mb-2">3. Disclaimer</h3>
|
|
827
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
828
|
+
The materials on this service are provided on an 'as is' basis. We make no warranties, expressed
|
|
829
|
+
or implied, and hereby disclaim and negate all other warranties including, without limitation, implied
|
|
830
|
+
warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of
|
|
831
|
+
intellectual property or other violation of rights.
|
|
832
|
+
</p>
|
|
833
|
+
</div>
|
|
834
|
+
|
|
835
|
+
<div>
|
|
836
|
+
<h3 className="text-base font-semibold mt-0 mb-2">4. Limitations</h3>
|
|
837
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
838
|
+
In no event shall we or our suppliers be liable for any damages (including, without limitation, damages
|
|
839
|
+
for loss of data or profit, or due to business interruption) arising out of the use or inability to use
|
|
840
|
+
the materials on this service, even if we or an authorized representative has been notified orally or in
|
|
841
|
+
writing of the possibility of such damage.
|
|
842
|
+
</p>
|
|
843
|
+
</div>
|
|
844
|
+
|
|
845
|
+
<div>
|
|
846
|
+
<h3 className="text-base font-semibold mt-0 mb-2">5. Privacy Policy</h3>
|
|
847
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
848
|
+
Your privacy is important to us. Our Privacy Policy explains how we collect, use, and protect your
|
|
849
|
+
personal information when you use our service. By using our service, you agree to the collection and use
|
|
850
|
+
of information in accordance with our Privacy Policy. We are committed to ensuring that your information
|
|
851
|
+
is secure and handled responsibly.
|
|
852
|
+
</p>
|
|
853
|
+
</div>
|
|
854
|
+
|
|
855
|
+
<div>
|
|
856
|
+
<h3 className="text-base font-semibold mt-0 mb-2">6. User Accounts</h3>
|
|
857
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
858
|
+
When you create an account with us, you must provide information that is accurate, complete, and current
|
|
859
|
+
at all times. Failure to do so constitutes a breach of the Terms, which may result in immediate
|
|
860
|
+
termination of your account on our service. You are responsible for safeguarding the password that you use
|
|
861
|
+
to access the service and for any activities or actions under your password.
|
|
862
|
+
</p>
|
|
863
|
+
</div>
|
|
864
|
+
|
|
865
|
+
<div>
|
|
866
|
+
<h3 className="text-base font-semibold mt-0 mb-2">7. Intellectual Property</h3>
|
|
867
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
868
|
+
The service and its original content, features, and functionality are and will remain the exclusive
|
|
869
|
+
property of the company and its licensors. The service is protected by copyright, trademark, and other
|
|
870
|
+
laws of both domestic and foreign countries. Our trademarks and trade dress may not be used in connection
|
|
871
|
+
with any product or service without the prior written consent of the company.
|
|
872
|
+
</p>
|
|
873
|
+
</div>
|
|
874
|
+
|
|
875
|
+
<div>
|
|
876
|
+
<h3 className="text-base font-semibold mt-0 mb-2">8. Termination</h3>
|
|
877
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
878
|
+
We may terminate or suspend your account immediately, without prior notice or liability, for any reason
|
|
879
|
+
whatsoever, including without limitation if you breach the Terms. Upon termination, your right to use the
|
|
880
|
+
service will immediately cease. If you wish to terminate your account, you may simply discontinue using
|
|
881
|
+
the service or contact us to request account deletion.
|
|
882
|
+
</p>
|
|
883
|
+
</div>
|
|
884
|
+
|
|
885
|
+
<div>
|
|
886
|
+
<h3 className="text-base font-semibold mt-0 mb-2">9. Indemnification</h3>
|
|
887
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
888
|
+
You agree to defend, indemnify, and hold harmless the company and its licensee and licensors, and their
|
|
889
|
+
employees, contractors, agents, officers, and directors, from and against any and all claims, damages,
|
|
890
|
+
obligations, losses, liabilities, costs or debt, and expenses, including but not limited to
|
|
891
|
+
attorney's fees, resulting from or arising out of your use and access of the service, or a breach of
|
|
892
|
+
these Terms.
|
|
893
|
+
</p>
|
|
894
|
+
</div>
|
|
895
|
+
|
|
896
|
+
<div>
|
|
897
|
+
<h3 className="text-base font-semibold mt-0 mb-2">10. Governing Law</h3>
|
|
898
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
899
|
+
These terms and conditions are governed by and construed in accordance with applicable laws and you
|
|
900
|
+
irrevocably submit to the exclusive jurisdiction of the courts in that location. Any claim relating to
|
|
901
|
+
this service shall be governed by the laws without regard to its conflict of law provisions.
|
|
902
|
+
</p>
|
|
903
|
+
</div>
|
|
904
|
+
|
|
905
|
+
<div>
|
|
906
|
+
<h3 className="text-base font-semibold mt-0 mb-2">11. Changes to Terms</h3>
|
|
907
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
908
|
+
We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision
|
|
909
|
+
is material we will try to provide at least 30 days' notice prior to any new terms taking effect.
|
|
910
|
+
What constitutes a material change will be determined at our sole discretion. By continuing to access or
|
|
911
|
+
use our service after those revisions become effective, you agree to be bound by the revised terms.
|
|
912
|
+
</p>
|
|
913
|
+
</div>
|
|
914
|
+
</div>
|
|
915
|
+
</DialogContent>
|
|
916
|
+
<DialogFooter>
|
|
917
|
+
<DialogClose as={Button} severity="secondary">
|
|
918
|
+
Decline
|
|
919
|
+
</DialogClose>
|
|
920
|
+
<DialogClose as={Button}>Accept</DialogClose>
|
|
921
|
+
</DialogFooter>
|
|
922
|
+
</DialogPopup>
|
|
923
|
+
</DialogPositioner>
|
|
924
|
+
</DialogPortal>
|
|
925
|
+
</Dialog>
|
|
926
|
+
</div>
|
|
927
|
+
);
|
|
928
|
+
}
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
### Outside Scroll
|
|
932
|
+
|
|
933
|
+
When `scrollBehavior` is set to `outside`, the entire dialog scrolls within the positioner, allowing the full dialog to move as a single unit.
|
|
934
|
+
|
|
935
|
+
```tsx
|
|
936
|
+
'use client';
|
|
937
|
+
import { Times } from '@primeicons/react/times';
|
|
938
|
+
import { Button } from '@/components/ui/button';
|
|
939
|
+
import {
|
|
940
|
+
Dialog,
|
|
941
|
+
DialogBackdrop,
|
|
942
|
+
DialogClose,
|
|
943
|
+
DialogContent,
|
|
944
|
+
DialogFooter,
|
|
945
|
+
DialogHeader,
|
|
946
|
+
DialogHeaderActions,
|
|
947
|
+
DialogPopup,
|
|
948
|
+
DialogPortal,
|
|
949
|
+
DialogPositioner,
|
|
950
|
+
DialogTitle,
|
|
951
|
+
DialogTrigger
|
|
952
|
+
} from '@/components/ui/dialog';
|
|
953
|
+
import { Tag } from '@/components/ui/tag';
|
|
954
|
+
|
|
955
|
+
export default function OutsideScrollDemo() {
|
|
956
|
+
return (
|
|
957
|
+
<div className="flex justify-center">
|
|
958
|
+
<Dialog scrollBehavior="outside" draggable keepInViewport={false}>
|
|
959
|
+
<DialogTrigger as={Button}>Outside Scroll</DialogTrigger>
|
|
960
|
+
<DialogPortal>
|
|
961
|
+
<DialogBackdrop />
|
|
962
|
+
<DialogPositioner>
|
|
963
|
+
<DialogPopup style={{ width: '40rem' }}>
|
|
964
|
+
<DialogHeader>
|
|
965
|
+
<DialogTitle>Terms of Service</DialogTitle>
|
|
966
|
+
<DialogHeaderActions>
|
|
967
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
968
|
+
<Times />
|
|
969
|
+
</DialogClose>
|
|
970
|
+
</DialogHeaderActions>
|
|
971
|
+
</DialogHeader>
|
|
972
|
+
<DialogContent>
|
|
973
|
+
<div className="flex flex-col gap-4">
|
|
974
|
+
<div className="flex items-center gap-2">
|
|
975
|
+
<Tag severity="info">Updated</Tag>
|
|
976
|
+
<span className="text-sm text-surface-500 dark:text-surface-400">Last revised: January 1, 2026</span>
|
|
977
|
+
</div>
|
|
978
|
+
|
|
979
|
+
<div>
|
|
980
|
+
<h3 className="text-base font-semibold mt-0 mb-2">1. Acceptance of Terms</h3>
|
|
981
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
982
|
+
By accessing and using this service, you accept and agree to be bound by the terms and provision of this
|
|
983
|
+
agreement. If you do not agree to abide by the above, please do not use this service.
|
|
984
|
+
</p>
|
|
985
|
+
</div>
|
|
986
|
+
|
|
987
|
+
<div>
|
|
988
|
+
<h3 className="text-base font-semibold mt-0 mb-2">2. Use License</h3>
|
|
989
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
990
|
+
Permission is granted to temporarily download one copy of the materials on this service for personal,
|
|
991
|
+
non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under
|
|
992
|
+
this license you may not modify or copy the materials, use the materials for any commercial purpose, or
|
|
993
|
+
attempt to decompile or reverse engineer any software contained on this service.
|
|
994
|
+
</p>
|
|
995
|
+
</div>
|
|
996
|
+
|
|
997
|
+
<div>
|
|
998
|
+
<h3 className="text-base font-semibold mt-0 mb-2">3. Disclaimer</h3>
|
|
999
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1000
|
+
The materials on this service are provided on an 'as is' basis. We make no warranties, expressed
|
|
1001
|
+
or implied, and hereby disclaim and negate all other warranties including, without limitation, implied
|
|
1002
|
+
warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of
|
|
1003
|
+
intellectual property or other violation of rights.
|
|
1004
|
+
</p>
|
|
1005
|
+
</div>
|
|
1006
|
+
|
|
1007
|
+
<div>
|
|
1008
|
+
<h3 className="text-base font-semibold mt-0 mb-2">4. Limitations</h3>
|
|
1009
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1010
|
+
In no event shall we or our suppliers be liable for any damages (including, without limitation, damages
|
|
1011
|
+
for loss of data or profit, or due to business interruption) arising out of the use or inability to use
|
|
1012
|
+
the materials on this service, even if we or an authorized representative has been notified orally or in
|
|
1013
|
+
writing of the possibility of such damage.
|
|
1014
|
+
</p>
|
|
1015
|
+
</div>
|
|
1016
|
+
|
|
1017
|
+
<div>
|
|
1018
|
+
<h3 className="text-base font-semibold mt-0 mb-2">5. Privacy Policy</h3>
|
|
1019
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1020
|
+
Your privacy is important to us. Our Privacy Policy explains how we collect, use, and protect your
|
|
1021
|
+
personal information when you use our service. By using our service, you agree to the collection and use
|
|
1022
|
+
of information in accordance with our Privacy Policy. We are committed to ensuring that your information
|
|
1023
|
+
is secure and handled responsibly.
|
|
1024
|
+
</p>
|
|
1025
|
+
</div>
|
|
1026
|
+
|
|
1027
|
+
<div>
|
|
1028
|
+
<h3 className="text-base font-semibold mt-0 mb-2">6. User Accounts</h3>
|
|
1029
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1030
|
+
When you create an account with us, you must provide information that is accurate, complete, and current
|
|
1031
|
+
at all times. Failure to do so constitutes a breach of the Terms, which may result in immediate
|
|
1032
|
+
termination of your account on our service. You are responsible for safeguarding the password that you use
|
|
1033
|
+
to access the service and for any activities or actions under your password.
|
|
1034
|
+
</p>
|
|
1035
|
+
</div>
|
|
1036
|
+
|
|
1037
|
+
<div>
|
|
1038
|
+
<h3 className="text-base font-semibold mt-0 mb-2">7. Intellectual Property</h3>
|
|
1039
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1040
|
+
The service and its original content, features, and functionality are and will remain the exclusive
|
|
1041
|
+
property of the company and its licensors. The service is protected by copyright, trademark, and other
|
|
1042
|
+
laws of both domestic and foreign countries. Our trademarks and trade dress may not be used in connection
|
|
1043
|
+
with any product or service without the prior written consent of the company.
|
|
1044
|
+
</p>
|
|
1045
|
+
</div>
|
|
1046
|
+
|
|
1047
|
+
<div>
|
|
1048
|
+
<h3 className="text-base font-semibold mt-0 mb-2">8. Termination</h3>
|
|
1049
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1050
|
+
We may terminate or suspend your account immediately, without prior notice or liability, for any reason
|
|
1051
|
+
whatsoever, including without limitation if you breach the Terms. Upon termination, your right to use the
|
|
1052
|
+
service will immediately cease. If you wish to terminate your account, you may simply discontinue using
|
|
1053
|
+
the service or contact us to request account deletion.
|
|
1054
|
+
</p>
|
|
1055
|
+
</div>
|
|
1056
|
+
|
|
1057
|
+
<div>
|
|
1058
|
+
<h3 className="text-base font-semibold mt-0 mb-2">9. Indemnification</h3>
|
|
1059
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1060
|
+
You agree to defend, indemnify, and hold harmless the company and its licensee and licensors, and their
|
|
1061
|
+
employees, contractors, agents, officers, and directors, from and against any and all claims, damages,
|
|
1062
|
+
obligations, losses, liabilities, costs or debt, and expenses, including but not limited to
|
|
1063
|
+
attorney's fees, resulting from or arising out of your use and access of the service, or a breach of
|
|
1064
|
+
these Terms.
|
|
1065
|
+
</p>
|
|
1066
|
+
</div>
|
|
1067
|
+
|
|
1068
|
+
<div>
|
|
1069
|
+
<h3 className="text-base font-semibold mt-0 mb-2">10. Governing Law</h3>
|
|
1070
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1071
|
+
These terms and conditions are governed by and construed in accordance with applicable laws and you
|
|
1072
|
+
irrevocably submit to the exclusive jurisdiction of the courts in that location. Any claim relating to
|
|
1073
|
+
this service shall be governed by the laws without regard to its conflict of law provisions.
|
|
1074
|
+
</p>
|
|
1075
|
+
</div>
|
|
1076
|
+
|
|
1077
|
+
<div>
|
|
1078
|
+
<h3 className="text-base font-semibold mt-0 mb-2">11. Changes to Terms</h3>
|
|
1079
|
+
<p className="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
|
|
1080
|
+
We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision
|
|
1081
|
+
is material we will try to provide at least 30 days' notice prior to any new terms taking effect.
|
|
1082
|
+
What constitutes a material change will be determined at our sole discretion. By continuing to access or
|
|
1083
|
+
use our service after those revisions become effective, you agree to be bound by the revised terms.
|
|
1084
|
+
</p>
|
|
1085
|
+
</div>
|
|
1086
|
+
</div>
|
|
1087
|
+
</DialogContent>
|
|
1088
|
+
<DialogFooter>
|
|
1089
|
+
<DialogClose as={Button} severity="secondary">
|
|
1090
|
+
Decline
|
|
1091
|
+
</DialogClose>
|
|
1092
|
+
<DialogClose as={Button}>Accept</DialogClose>
|
|
1093
|
+
</DialogFooter>
|
|
1094
|
+
</DialogPopup>
|
|
1095
|
+
</DialogPositioner>
|
|
1096
|
+
</DialogPortal>
|
|
1097
|
+
</Dialog>
|
|
1098
|
+
</div>
|
|
1099
|
+
);
|
|
1100
|
+
}
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
### Responsive
|
|
1104
|
+
|
|
1105
|
+
Dialog width adapts to different screen sizes using responsive CSS classes on the _DialogPopup_.
|
|
1106
|
+
|
|
1107
|
+
```tsx
|
|
1108
|
+
'use client';
|
|
1109
|
+
import { Button } from '@/components/ui/button';
|
|
1110
|
+
import {
|
|
1111
|
+
Dialog,
|
|
1112
|
+
DialogBackdrop,
|
|
1113
|
+
DialogClose,
|
|
1114
|
+
DialogContent,
|
|
1115
|
+
DialogHeader,
|
|
1116
|
+
DialogHeaderActions,
|
|
1117
|
+
DialogPopup,
|
|
1118
|
+
DialogPortal,
|
|
1119
|
+
DialogPositioner,
|
|
1120
|
+
DialogTitle,
|
|
1121
|
+
DialogTrigger
|
|
1122
|
+
} from '@/components/ui/dialog';
|
|
1123
|
+
import { InputText } from '@/components/ui/inputtext';
|
|
1124
|
+
import { Label } from '@/components/ui/label';
|
|
1125
|
+
import { Times } from '@primeicons/react';
|
|
1126
|
+
|
|
1127
|
+
export default function ResponsiveDemo() {
|
|
1128
|
+
return (
|
|
1129
|
+
<div className="flex justify-center">
|
|
1130
|
+
<Dialog>
|
|
1131
|
+
<DialogTrigger as={Button}>Open Trigger</DialogTrigger>
|
|
1132
|
+
<DialogPortal>
|
|
1133
|
+
<DialogBackdrop />
|
|
1134
|
+
<DialogPositioner>
|
|
1135
|
+
<DialogPopup className="w-[90vw] md:w-[75vw] lg:w-[50vw]">
|
|
1136
|
+
<DialogHeader>
|
|
1137
|
+
<DialogTitle>Create Event</DialogTitle>
|
|
1138
|
+
<DialogHeaderActions>
|
|
1139
|
+
<DialogClose as={Button} iconOnly variant="text" rounded severity="secondary">
|
|
1140
|
+
<Times />
|
|
1141
|
+
</DialogClose>
|
|
1142
|
+
</DialogHeaderActions>
|
|
1143
|
+
</DialogHeader>
|
|
1144
|
+
<DialogContent>
|
|
1145
|
+
<div className="flex flex-col gap-4">
|
|
1146
|
+
<div className="flex flex-col gap-1">
|
|
1147
|
+
<Label htmlFor="eventName" className="text-sm font-semibold">
|
|
1148
|
+
Event Name
|
|
1149
|
+
</Label>
|
|
1150
|
+
<InputText id="eventName" placeholder="e.g. Team Standup" />
|
|
1151
|
+
</div>
|
|
1152
|
+
<div className="flex flex-col md:flex-row gap-4">
|
|
1153
|
+
<div className="flex flex-col gap-1 flex-1">
|
|
1154
|
+
<Label htmlFor="organizer" className="text-sm font-semibold">
|
|
1155
|
+
Organizer
|
|
1156
|
+
</Label>
|
|
1157
|
+
<InputText id="organizer" placeholder="Name" />
|
|
1158
|
+
</div>
|
|
1159
|
+
<div className="flex flex-col gap-1 flex-1">
|
|
1160
|
+
<Label htmlFor="email" className="text-sm font-semibold">
|
|
1161
|
+
Email
|
|
1162
|
+
</Label>
|
|
1163
|
+
<InputText id="email" placeholder="organizer@example.com" />
|
|
1164
|
+
</div>
|
|
1165
|
+
</div>
|
|
1166
|
+
<div className="flex flex-col gap-1">
|
|
1167
|
+
<Label htmlFor="location" className="text-sm font-semibold">
|
|
1168
|
+
Location
|
|
1169
|
+
</Label>
|
|
1170
|
+
<InputText id="location" placeholder="Add a location or video link" />
|
|
1171
|
+
</div>
|
|
1172
|
+
<div className="flex flex-col gap-1">
|
|
1173
|
+
<Label htmlFor="description" className="text-sm font-semibold">
|
|
1174
|
+
Description
|
|
1175
|
+
</Label>
|
|
1176
|
+
<InputText id="description" placeholder="Event details" />
|
|
1177
|
+
</div>
|
|
1178
|
+
<div className="flex flex-col sm:flex-row justify-end gap-2 mt-2">
|
|
1179
|
+
<DialogClose as={Button} severity="secondary">
|
|
1180
|
+
Cancel
|
|
1181
|
+
</DialogClose>
|
|
1182
|
+
<DialogClose as={Button}>Create Event</DialogClose>
|
|
1183
|
+
</div>
|
|
1184
|
+
</div>
|
|
1185
|
+
</DialogContent>
|
|
1186
|
+
</DialogPopup>
|
|
1187
|
+
</DialogPositioner>
|
|
1188
|
+
</DialogPortal>
|
|
1189
|
+
</Dialog>
|
|
1190
|
+
</div>
|
|
1191
|
+
);
|
|
1192
|
+
}
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
## Accessibility
|
|
1196
|
+
|
|
1197
|
+
### Screen Reader
|
|
1198
|
+
|
|
1199
|
+
Dialog component uses `dialog` role along with `aria-labelledby` referring to the header element however any attribute is passed to the root element so `aria-labelledby` can be used to override this default behavior. In addition `aria-modal` is added since focus is kept within the popup.
|
|
1200
|
+
|
|
1201
|
+
Trigger element also has aria-expanded and aria-controls to be handled explicitly.
|
|
1202
|
+
|
|
1203
|
+
### Overlay Keyboard Support
|
|
1204
|
+
|
|
1205
|
+
| Key | Function |
|
|
1206
|
+
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1207
|
+
| `tab` | Moves focus to the next the focusable element within the dialog if `modal` is true. Otherwise, the focusable element in the page tab sequence. |
|
|
1208
|
+
| `shift + tab` | Moves focus to the previous the focusable element within the dialog if `modal` is true. Otherwise, the focusable element in the page tab sequence. |
|
|
1209
|
+
| `escape` | Closes the dialog if `closeOnEscape` is true. |
|
|
1210
|
+
|
|
1211
|
+
### Close Button Keyboard Support
|
|
1212
|
+
|
|
1213
|
+
| Key | Function |
|
|
1214
|
+
| ------- | ------------------ |
|
|
1215
|
+
| `enter` | Closes the dialog. |
|
|
1216
|
+
| `space` | Closes the dialog. |
|