@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,674 @@
|
|
|
1
|
+
# InputColor
|
|
2
|
+
|
|
3
|
+
InputColor is a component that allows the user to select a color.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
'use client';
|
|
7
|
+
import { ChevronDown } from '@primeicons/react/chevron-down';
|
|
8
|
+
import { EyeDropper } from '@primeicons/react/eye-dropper';
|
|
9
|
+
import { parseColor, type ColorSpace } from '@primereact/ui/inputcolor';
|
|
10
|
+
import { Button } from '@primereact/ui/button';
|
|
11
|
+
import { InputColor } from '@primereact/ui/inputcolor';
|
|
12
|
+
import { InputGroup } from '@primereact/ui/inputgroup';
|
|
13
|
+
import { InputText } from '@primereact/ui/inputtext';
|
|
14
|
+
import { Select, type SelectValueChangeEvent } from '@primereact/ui/select';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
const options = [
|
|
17
|
+
{ label: 'HEX', value: 'hex' },
|
|
18
|
+
{ label: 'RGBA', value: 'rgba' },
|
|
19
|
+
{ label: 'HSBA', value: 'hsba' },
|
|
20
|
+
{ label: 'HSLA', value: 'hsla' },
|
|
21
|
+
{ label: 'OKLCHA', value: 'oklcha' }
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export default function Preview() {
|
|
25
|
+
const [format, setFormat] = React.useState<ColorSpace | 'hex'>('hex');
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div className="max-w-xs mx-auto space-y-3">
|
|
29
|
+
<InputColor.Root format={format === 'hex' ? 'rgba' : format} defaultValue={parseColor('#276def')}>
|
|
30
|
+
<InputColor.Area>
|
|
31
|
+
<InputColor.AreaBackground />
|
|
32
|
+
<InputColor.AreaHandle />
|
|
33
|
+
</InputColor.Area>
|
|
34
|
+
<div className="flex items-center gap-2">
|
|
35
|
+
<div className="flex-1 space-y-1 mr-1">
|
|
36
|
+
<InputColor.Slider>
|
|
37
|
+
<InputColor.TransparencyGrid />
|
|
38
|
+
<InputColor.SliderTrack />
|
|
39
|
+
<InputColor.SliderHandle />
|
|
40
|
+
</InputColor.Slider>
|
|
41
|
+
<InputColor.Slider channel="alpha">
|
|
42
|
+
<InputColor.TransparencyGrid />
|
|
43
|
+
<InputColor.SliderTrack />
|
|
44
|
+
<InputColor.SliderHandle />
|
|
45
|
+
</InputColor.Slider>
|
|
46
|
+
</div>
|
|
47
|
+
<InputColor.Swatch>
|
|
48
|
+
<InputColor.TransparencyGrid />
|
|
49
|
+
<InputColor.SwatchBackground />
|
|
50
|
+
</InputColor.Swatch>
|
|
51
|
+
<InputColor.EyeDropper as={Button} iconOnly severity="secondary" variant="outlined">
|
|
52
|
+
<EyeDropper />
|
|
53
|
+
</InputColor.EyeDropper>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="flex items-center gap-2">
|
|
56
|
+
<Select.Root
|
|
57
|
+
value={format}
|
|
58
|
+
onValueChange={(e: SelectValueChangeEvent) => setFormat(e.value as ColorSpace | 'hex')}
|
|
59
|
+
options={options}
|
|
60
|
+
optionLabel="label"
|
|
61
|
+
optionValue="value"
|
|
62
|
+
>
|
|
63
|
+
<Select.Trigger>
|
|
64
|
+
<Select.Value placeholder="Select a format" />
|
|
65
|
+
<Select.Indicator>
|
|
66
|
+
<ChevronDown />
|
|
67
|
+
</Select.Indicator>
|
|
68
|
+
</Select.Trigger>
|
|
69
|
+
<Select.Portal>
|
|
70
|
+
<Select.Positioner>
|
|
71
|
+
<Select.Popup>
|
|
72
|
+
<Select.List />
|
|
73
|
+
</Select.Popup>
|
|
74
|
+
</Select.Positioner>
|
|
75
|
+
</Select.Portal>
|
|
76
|
+
</Select.Root>
|
|
77
|
+
<div className="flex-1">
|
|
78
|
+
{format === 'hex' && <InputColor.Input as={InputText} fluid channel="hex" />}
|
|
79
|
+
{format === 'oklcha' && <InputColor.Input as={InputText} fluid channel="css" />}
|
|
80
|
+
{format === 'rgba' && (
|
|
81
|
+
<InputGroup.Root>
|
|
82
|
+
<InputColor.Input as={InputText} fluid channel="red" />
|
|
83
|
+
<InputColor.Input as={InputText} fluid channel="green" />
|
|
84
|
+
<InputColor.Input as={InputText} fluid channel="blue" />
|
|
85
|
+
<InputColor.Input as={InputText} fluid channel="alpha" />
|
|
86
|
+
</InputGroup.Root>
|
|
87
|
+
)}
|
|
88
|
+
{format === 'hsba' && (
|
|
89
|
+
<InputGroup.Root>
|
|
90
|
+
<InputColor.Input as={InputText} fluid channel="hue" />
|
|
91
|
+
<InputColor.Input as={InputText} fluid channel="saturation" />
|
|
92
|
+
<InputColor.Input as={InputText} fluid channel="brightness" />
|
|
93
|
+
<InputColor.Input as={InputText} fluid channel="alpha" />
|
|
94
|
+
</InputGroup.Root>
|
|
95
|
+
)}
|
|
96
|
+
{format === 'hsla' && (
|
|
97
|
+
<InputGroup.Root>
|
|
98
|
+
<InputColor.Input as={InputText} fluid channel="hue" />
|
|
99
|
+
<InputColor.Input as={InputText} fluid channel="saturation" />
|
|
100
|
+
<InputColor.Input as={InputText} fluid channel="lightness" />
|
|
101
|
+
<InputColor.Input as={InputText} fluid channel="alpha" />
|
|
102
|
+
</InputGroup.Root>
|
|
103
|
+
)}
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</InputColor.Root>
|
|
107
|
+
</div>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Usage
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { InputColor } from '@primereact/ui/inputcolor';
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
<InputColor.Root>
|
|
120
|
+
<InputColor.Area>
|
|
121
|
+
<InputColor.AreaBackground />
|
|
122
|
+
<InputColor.AreaHandle />
|
|
123
|
+
</InputColor.Area>
|
|
124
|
+
<InputColor.Slider>
|
|
125
|
+
<InputColor.TransparencyGrid />
|
|
126
|
+
<InputColor.SliderTrack />
|
|
127
|
+
<InputColor.SliderHandle />
|
|
128
|
+
</InputColor.Slider>
|
|
129
|
+
<InputColor.Swatch>
|
|
130
|
+
<InputColor.TransparencyGrid />
|
|
131
|
+
<InputColor.SwatchBackground />
|
|
132
|
+
</InputColor.Swatch>
|
|
133
|
+
<InputColor.EyeDropper>
|
|
134
|
+
<EyeDropperIcon />
|
|
135
|
+
</InputColor.EyeDropper>
|
|
136
|
+
<InputColor.Input />
|
|
137
|
+
</InputColor.Root>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
<DocMessage>
|
|
141
|
+
`InputColor.EyeDropper` uses the native EyeDropper API, which is not supported in some browsers (e.g. Firefox, Safari).
|
|
142
|
+
</DocMessage>
|
|
143
|
+
|
|
144
|
+
## Examples
|
|
145
|
+
|
|
146
|
+
### Basic
|
|
147
|
+
|
|
148
|
+
Select a color via a visual picker interface.
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
'use client';
|
|
152
|
+
import { ChevronDown } from '@primeicons/react/chevron-down';
|
|
153
|
+
import { EyeDropper } from '@primeicons/react/eye-dropper';
|
|
154
|
+
import { parseColor, type ColorSpace } from '@primereact/ui/inputcolor';
|
|
155
|
+
import { Button } from '@primereact/ui/button';
|
|
156
|
+
import { InputColor } from '@primereact/ui/inputcolor';
|
|
157
|
+
import { InputGroup } from '@primereact/ui/inputgroup';
|
|
158
|
+
import { InputText } from '@primereact/ui/inputtext';
|
|
159
|
+
import { Select, type SelectValueChangeEvent } from '@primereact/ui/select';
|
|
160
|
+
import * as React from 'react';
|
|
161
|
+
const options = [
|
|
162
|
+
{ label: 'HEX', value: 'hex' },
|
|
163
|
+
{ label: 'RGBA', value: 'rgba' },
|
|
164
|
+
{ label: 'HSBA', value: 'hsba' },
|
|
165
|
+
{ label: 'HSLA', value: 'hsla' },
|
|
166
|
+
{ label: 'OKLCHA', value: 'oklcha' }
|
|
167
|
+
];
|
|
168
|
+
|
|
169
|
+
export default function Example() {
|
|
170
|
+
const [format, setFormat] = React.useState<ColorSpace | 'hex'>('hex');
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<div className="max-w-xs mx-auto space-y-3">
|
|
174
|
+
<InputColor.Root format={format === 'hex' ? 'rgba' : format} defaultValue={parseColor('#276def')}>
|
|
175
|
+
<InputColor.Area>
|
|
176
|
+
<InputColor.AreaBackground />
|
|
177
|
+
<InputColor.AreaHandle />
|
|
178
|
+
</InputColor.Area>
|
|
179
|
+
<div className="flex items-center gap-2">
|
|
180
|
+
<div className="flex-1 space-y-1 mr-1">
|
|
181
|
+
<InputColor.Slider>
|
|
182
|
+
<InputColor.TransparencyGrid />
|
|
183
|
+
<InputColor.SliderTrack />
|
|
184
|
+
<InputColor.SliderHandle />
|
|
185
|
+
</InputColor.Slider>
|
|
186
|
+
<InputColor.Slider channel="alpha">
|
|
187
|
+
<InputColor.TransparencyGrid />
|
|
188
|
+
<InputColor.SliderTrack />
|
|
189
|
+
<InputColor.SliderHandle />
|
|
190
|
+
</InputColor.Slider>
|
|
191
|
+
</div>
|
|
192
|
+
<InputColor.Swatch>
|
|
193
|
+
<InputColor.TransparencyGrid />
|
|
194
|
+
<InputColor.SwatchBackground />
|
|
195
|
+
</InputColor.Swatch>
|
|
196
|
+
<InputColor.EyeDropper as={Button} iconOnly severity="secondary" variant="outlined">
|
|
197
|
+
<EyeDropper />
|
|
198
|
+
</InputColor.EyeDropper>
|
|
199
|
+
</div>
|
|
200
|
+
<div className="flex items-center gap-2">
|
|
201
|
+
<Select.Root
|
|
202
|
+
value={format}
|
|
203
|
+
onValueChange={(e: SelectValueChangeEvent) => setFormat(e.value as ColorSpace | 'hex')}
|
|
204
|
+
options={options}
|
|
205
|
+
optionLabel="label"
|
|
206
|
+
optionValue="value"
|
|
207
|
+
className="w-full md:w-26"
|
|
208
|
+
>
|
|
209
|
+
<Select.Trigger>
|
|
210
|
+
<Select.Value placeholder="Select a format" />
|
|
211
|
+
<Select.Indicator>
|
|
212
|
+
<ChevronDown />
|
|
213
|
+
</Select.Indicator>
|
|
214
|
+
</Select.Trigger>
|
|
215
|
+
<Select.Portal>
|
|
216
|
+
<Select.Positioner>
|
|
217
|
+
<Select.Popup>
|
|
218
|
+
<Select.List />
|
|
219
|
+
</Select.Popup>
|
|
220
|
+
</Select.Positioner>
|
|
221
|
+
</Select.Portal>
|
|
222
|
+
</Select.Root>
|
|
223
|
+
<div className="flex-1">
|
|
224
|
+
{format === 'hex' && <InputColor.Input as={InputText} fluid channel="hex" />}
|
|
225
|
+
{format === 'oklcha' && <InputColor.Input as={InputText} fluid channel="css" />}
|
|
226
|
+
{format === 'rgba' && (
|
|
227
|
+
<InputGroup.Root>
|
|
228
|
+
<InputColor.Input as={InputText} fluid channel="red" />
|
|
229
|
+
<InputColor.Input as={InputText} fluid channel="green" />
|
|
230
|
+
<InputColor.Input as={InputText} fluid channel="blue" />
|
|
231
|
+
<InputColor.Input as={InputText} fluid channel="alpha" />
|
|
232
|
+
</InputGroup.Root>
|
|
233
|
+
)}
|
|
234
|
+
{format === 'hsba' && (
|
|
235
|
+
<InputGroup.Root>
|
|
236
|
+
<InputColor.Input as={InputText} fluid channel="hue" />
|
|
237
|
+
<InputColor.Input as={InputText} fluid channel="saturation" />
|
|
238
|
+
<InputColor.Input as={InputText} fluid channel="brightness" />
|
|
239
|
+
<InputColor.Input as={InputText} fluid channel="alpha" />
|
|
240
|
+
</InputGroup.Root>
|
|
241
|
+
)}
|
|
242
|
+
{format === 'hsla' && (
|
|
243
|
+
<InputGroup.Root>
|
|
244
|
+
<InputColor.Input as={InputText} fluid channel="hue" />
|
|
245
|
+
<InputColor.Input as={InputText} fluid channel="saturation" />
|
|
246
|
+
<InputColor.Input as={InputText} fluid channel="lightness" />
|
|
247
|
+
<InputColor.Input as={InputText} fluid channel="alpha" />
|
|
248
|
+
</InputGroup.Root>
|
|
249
|
+
)}
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
</InputColor.Root>
|
|
253
|
+
</div>
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### With Popover
|
|
259
|
+
|
|
260
|
+
Use the `InputColor` inside a `Popover` to put the `InputColor` to the top of the component.
|
|
261
|
+
|
|
262
|
+
```tsx
|
|
263
|
+
import { EyeDropper } from '@primeicons/react/eye-dropper';
|
|
264
|
+
import { Button } from '@primereact/ui/button';
|
|
265
|
+
import { InputColor } from '@primereact/ui/inputcolor';
|
|
266
|
+
import { InputText } from '@primereact/ui/inputtext';
|
|
267
|
+
import { Popover } from '@primereact/ui/popover';
|
|
268
|
+
|
|
269
|
+
function PopoverDemo() {
|
|
270
|
+
return (
|
|
271
|
+
<div className="flex items-center justify-center">
|
|
272
|
+
<InputColor.Root defaultColor="#0099ff">
|
|
273
|
+
<Popover.Root>
|
|
274
|
+
<Popover.Trigger>
|
|
275
|
+
<InputColor.Swatch>
|
|
276
|
+
<InputColor.TransparencyGrid />
|
|
277
|
+
<InputColor.SwatchBackground />
|
|
278
|
+
</InputColor.Swatch>
|
|
279
|
+
</Popover.Trigger>
|
|
280
|
+
<Popover.Portal>
|
|
281
|
+
<Popover.Positioner sideOffset={12} side="left" align="start">
|
|
282
|
+
<Popover.Popup className="w-72 p-3 space-y-3">
|
|
283
|
+
<Popover.Arrow />
|
|
284
|
+
<InputColor.Area>
|
|
285
|
+
<InputColor.AreaBackground />
|
|
286
|
+
<InputColor.AreaHandle />
|
|
287
|
+
</InputColor.Area>
|
|
288
|
+
<InputColor.Slider>
|
|
289
|
+
<InputColor.TransparencyGrid />
|
|
290
|
+
<InputColor.SliderTrack />
|
|
291
|
+
<InputColor.SliderHandle />
|
|
292
|
+
</InputColor.Slider>
|
|
293
|
+
<InputColor.Slider channel="alpha">
|
|
294
|
+
<InputColor.TransparencyGrid />
|
|
295
|
+
<InputColor.SliderTrack />
|
|
296
|
+
<InputColor.SliderHandle />
|
|
297
|
+
</InputColor.Slider>
|
|
298
|
+
<div className="flex items-center gap-2">
|
|
299
|
+
<InputColor.Input as={InputText} channel="hex" className="flex-1" />
|
|
300
|
+
<InputColor.EyeDropper as={Button} iconOnly severity="secondary" variant="outlined">
|
|
301
|
+
<EyeDropper />
|
|
302
|
+
</InputColor.EyeDropper>
|
|
303
|
+
</div>
|
|
304
|
+
</Popover.Popup>
|
|
305
|
+
</Popover.Positioner>
|
|
306
|
+
</Popover.Portal>
|
|
307
|
+
</Popover.Root>
|
|
308
|
+
</InputColor.Root>
|
|
309
|
+
</div>
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export default PopoverDemo;
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Vertical Slider
|
|
317
|
+
|
|
318
|
+
Use the `orientation` prop to change the orientation of the slider.
|
|
319
|
+
|
|
320
|
+
```tsx
|
|
321
|
+
import { InputColor } from '@primereact/ui/inputcolor';
|
|
322
|
+
|
|
323
|
+
function VerticalSliderDemo() {
|
|
324
|
+
return (
|
|
325
|
+
<div className="flex items-center justify-center">
|
|
326
|
+
<InputColor.Root format="hsba">
|
|
327
|
+
<div className="flex gap-4 max-w-md w-full mx-auto">
|
|
328
|
+
<InputColor.Area className="flex-1">
|
|
329
|
+
<InputColor.AreaBackground />
|
|
330
|
+
<InputColor.AreaHandle />
|
|
331
|
+
</InputColor.Area>
|
|
332
|
+
<InputColor.Slider orientation="vertical">
|
|
333
|
+
<InputColor.TransparencyGrid />
|
|
334
|
+
<InputColor.SliderTrack />
|
|
335
|
+
<InputColor.SliderHandle />
|
|
336
|
+
</InputColor.Slider>
|
|
337
|
+
<InputColor.Slider channel="saturation" orientation="vertical">
|
|
338
|
+
<InputColor.TransparencyGrid />
|
|
339
|
+
<InputColor.SliderTrack />
|
|
340
|
+
<InputColor.SliderHandle />
|
|
341
|
+
</InputColor.Slider>
|
|
342
|
+
<InputColor.Slider channel="brightness" orientation="vertical">
|
|
343
|
+
<InputColor.TransparencyGrid />
|
|
344
|
+
<InputColor.SliderTrack />
|
|
345
|
+
<InputColor.SliderHandle />
|
|
346
|
+
</InputColor.Slider>
|
|
347
|
+
<InputColor.Slider channel="alpha" orientation="vertical">
|
|
348
|
+
<InputColor.TransparencyGrid />
|
|
349
|
+
<InputColor.SliderTrack />
|
|
350
|
+
<InputColor.SliderHandle />
|
|
351
|
+
</InputColor.Slider>
|
|
352
|
+
</div>
|
|
353
|
+
</InputColor.Root>
|
|
354
|
+
</div>
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export default VerticalSliderDemo;
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Controlled
|
|
362
|
+
|
|
363
|
+
Use the `value` and `onColorChange` props to control the color.
|
|
364
|
+
|
|
365
|
+
```tsx
|
|
366
|
+
'use client';
|
|
367
|
+
import { EyeDropper } from '@primeicons/react/eye-dropper';
|
|
368
|
+
import { parseColor, type ColorInstance } from '@primereact/ui/inputcolor';
|
|
369
|
+
import { Button } from '@primereact/ui/button';
|
|
370
|
+
import { InputColor, type InputColorRootChangeEvent } from '@primereact/ui/inputcolor';
|
|
371
|
+
import { InputText } from '@primereact/ui/inputtext';
|
|
372
|
+
import * as React from 'react';
|
|
373
|
+
export default function ControlledDemo() {
|
|
374
|
+
const [value, setValue] = React.useState<ColorInstance>(parseColor('#000000'));
|
|
375
|
+
const [endValue, setEndValue] = React.useState<ColorInstance>(parseColor('#000000'));
|
|
376
|
+
|
|
377
|
+
return (
|
|
378
|
+
<div className="max-w-xs mx-auto space-y-3">
|
|
379
|
+
<div className="text-center font-mono text-sm text-surface-500 mb-4">onValueChange: {value.toString('hex')}</div>
|
|
380
|
+
<div className="text-center font-mono text-sm text-surface-500 mb-4">onValueChangeEnd: {endValue.toString('hex')}</div>
|
|
381
|
+
<InputColor.Root
|
|
382
|
+
value={value}
|
|
383
|
+
onValueChange={(e: InputColorRootChangeEvent) => setValue(e.value)}
|
|
384
|
+
onValueChangeEnd={(e: InputColorRootChangeEvent) => setEndValue(e.value)}
|
|
385
|
+
>
|
|
386
|
+
<InputColor.Area>
|
|
387
|
+
<InputColor.AreaBackground />
|
|
388
|
+
<InputColor.AreaHandle />
|
|
389
|
+
</InputColor.Area>
|
|
390
|
+
<div className="flex items-center gap-2">
|
|
391
|
+
<div className="flex-1 space-y-1 mr-1">
|
|
392
|
+
<InputColor.Slider>
|
|
393
|
+
<InputColor.TransparencyGrid />
|
|
394
|
+
<InputColor.SliderTrack />
|
|
395
|
+
<InputColor.SliderHandle />
|
|
396
|
+
</InputColor.Slider>
|
|
397
|
+
<InputColor.Slider channel="alpha">
|
|
398
|
+
<InputColor.TransparencyGrid />
|
|
399
|
+
<InputColor.SliderTrack />
|
|
400
|
+
<InputColor.SliderHandle />
|
|
401
|
+
</InputColor.Slider>
|
|
402
|
+
</div>
|
|
403
|
+
<InputColor.Swatch>
|
|
404
|
+
<InputColor.TransparencyGrid />
|
|
405
|
+
<InputColor.SwatchBackground />
|
|
406
|
+
</InputColor.Swatch>
|
|
407
|
+
<InputColor.EyeDropper as={Button} iconOnly severity="secondary" variant="outlined">
|
|
408
|
+
<EyeDropper />
|
|
409
|
+
</InputColor.EyeDropper>
|
|
410
|
+
</div>
|
|
411
|
+
<InputColor.Input as={InputText} fluid channel="hex" />
|
|
412
|
+
</InputColor.Root>
|
|
413
|
+
</div>
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### Advanced
|
|
419
|
+
|
|
420
|
+
```tsx
|
|
421
|
+
'use client';
|
|
422
|
+
import { ChevronDown } from '@primeicons/react/chevron-down';
|
|
423
|
+
import { EyeDropper } from '@primeicons/react/eye-dropper';
|
|
424
|
+
import { type ColorSpace } from '@primereact/ui/inputcolor';
|
|
425
|
+
import { Button } from '@primereact/ui/button';
|
|
426
|
+
import { FloatLabel } from '@primereact/ui/floatlabel';
|
|
427
|
+
import { InputColor } from '@primereact/ui/inputcolor';
|
|
428
|
+
import { InputGroup } from '@primereact/ui/inputgroup';
|
|
429
|
+
import { InputText } from '@primereact/ui/inputtext';
|
|
430
|
+
import { Label } from '@primereact/ui/label';
|
|
431
|
+
import { Select } from '@primereact/ui/select';
|
|
432
|
+
import { SelectValueChangeEvent } from '@primereact/ui/select';
|
|
433
|
+
import * as React from 'react';
|
|
434
|
+
|
|
435
|
+
const options = [
|
|
436
|
+
{ label: 'RGBA', value: 'rgba' },
|
|
437
|
+
{ label: 'HSBA', value: 'hsba' },
|
|
438
|
+
{ label: 'HSLA', value: 'hsla' },
|
|
439
|
+
{ label: 'OKLCHA', value: 'oklcha' }
|
|
440
|
+
];
|
|
441
|
+
|
|
442
|
+
export default function AdvancedDemo() {
|
|
443
|
+
const [format, setFormat] = React.useState<ColorSpace>('hsla');
|
|
444
|
+
|
|
445
|
+
return (
|
|
446
|
+
<div>
|
|
447
|
+
<div className="max-w-xs mx-auto space-y-3">
|
|
448
|
+
<Select.Root
|
|
449
|
+
value={format}
|
|
450
|
+
onValueChange={(e: SelectValueChangeEvent) => setFormat(e.value as ColorSpace)}
|
|
451
|
+
options={options}
|
|
452
|
+
optionLabel="label"
|
|
453
|
+
optionValue="value"
|
|
454
|
+
fluid
|
|
455
|
+
>
|
|
456
|
+
<Select.Trigger>
|
|
457
|
+
<Select.Value placeholder="Select a format" />
|
|
458
|
+
<Select.Indicator>
|
|
459
|
+
<ChevronDown />
|
|
460
|
+
</Select.Indicator>
|
|
461
|
+
</Select.Trigger>
|
|
462
|
+
<Select.Portal>
|
|
463
|
+
<Select.Positioner>
|
|
464
|
+
<Select.Popup>
|
|
465
|
+
<Select.List />
|
|
466
|
+
</Select.Popup>
|
|
467
|
+
</Select.Positioner>
|
|
468
|
+
</Select.Portal>
|
|
469
|
+
</Select.Root>
|
|
470
|
+
<InputColor.Root format={format}>
|
|
471
|
+
<InputColor.Area>
|
|
472
|
+
<InputColor.AreaBackground />
|
|
473
|
+
<InputColor.AreaHandle />
|
|
474
|
+
</InputColor.Area>
|
|
475
|
+
<InputColor.Slider>
|
|
476
|
+
<InputColor.TransparencyGrid />
|
|
477
|
+
<InputColor.SliderTrack />
|
|
478
|
+
<InputColor.SliderHandle />
|
|
479
|
+
</InputColor.Slider>
|
|
480
|
+
{format === 'rgba' && (
|
|
481
|
+
<>
|
|
482
|
+
<InputColor.Slider channel="red">
|
|
483
|
+
<InputColor.TransparencyGrid />
|
|
484
|
+
<InputColor.SliderTrack />
|
|
485
|
+
<InputColor.SliderHandle />
|
|
486
|
+
</InputColor.Slider>
|
|
487
|
+
<InputColor.Slider channel="green">
|
|
488
|
+
<InputColor.TransparencyGrid />
|
|
489
|
+
<InputColor.SliderTrack />
|
|
490
|
+
<InputColor.SliderHandle />
|
|
491
|
+
</InputColor.Slider>
|
|
492
|
+
<InputColor.Slider channel="blue">
|
|
493
|
+
<InputColor.TransparencyGrid />
|
|
494
|
+
<InputColor.SliderTrack />
|
|
495
|
+
<InputColor.SliderHandle />
|
|
496
|
+
</InputColor.Slider>
|
|
497
|
+
</>
|
|
498
|
+
)}
|
|
499
|
+
{format === 'hsba' && (
|
|
500
|
+
<>
|
|
501
|
+
<InputColor.Slider channel="saturation">
|
|
502
|
+
<InputColor.TransparencyGrid />
|
|
503
|
+
<InputColor.SliderTrack />
|
|
504
|
+
<InputColor.SliderHandle />
|
|
505
|
+
</InputColor.Slider>
|
|
506
|
+
<InputColor.Slider channel="brightness">
|
|
507
|
+
<InputColor.TransparencyGrid />
|
|
508
|
+
<InputColor.SliderTrack />
|
|
509
|
+
<InputColor.SliderHandle />
|
|
510
|
+
</InputColor.Slider>
|
|
511
|
+
</>
|
|
512
|
+
)}
|
|
513
|
+
|
|
514
|
+
{format === 'hsla' && (
|
|
515
|
+
<>
|
|
516
|
+
<InputColor.Slider channel="saturation">
|
|
517
|
+
<InputColor.TransparencyGrid />
|
|
518
|
+
<InputColor.SliderTrack />
|
|
519
|
+
<InputColor.SliderHandle />
|
|
520
|
+
</InputColor.Slider>
|
|
521
|
+
<InputColor.Slider channel="lightness">
|
|
522
|
+
<InputColor.TransparencyGrid />
|
|
523
|
+
<InputColor.SliderTrack />
|
|
524
|
+
<InputColor.SliderHandle />
|
|
525
|
+
</InputColor.Slider>
|
|
526
|
+
</>
|
|
527
|
+
)}
|
|
528
|
+
|
|
529
|
+
<InputColor.Slider channel="alpha">
|
|
530
|
+
<InputColor.TransparencyGrid />
|
|
531
|
+
<InputColor.SliderTrack />
|
|
532
|
+
<InputColor.SliderHandle />
|
|
533
|
+
</InputColor.Slider>
|
|
534
|
+
<div className="flex gap-2">
|
|
535
|
+
<InputColor.Swatch>
|
|
536
|
+
<InputColor.TransparencyGrid />
|
|
537
|
+
<InputColor.SwatchBackground />
|
|
538
|
+
</InputColor.Swatch>
|
|
539
|
+
<InputColor.EyeDropper as={Button} iconOnly severity="secondary" variant="outlined">
|
|
540
|
+
<EyeDropper />
|
|
541
|
+
</InputColor.EyeDropper>
|
|
542
|
+
<InputColor.Input as={InputText} channel="hex" className="flex-1" />
|
|
543
|
+
</div>
|
|
544
|
+
<InputGroup.Root>
|
|
545
|
+
<FloatLabel variant="in">
|
|
546
|
+
<InputColor.Input as={InputText} channel="red" type="text" size="small" />
|
|
547
|
+
<Label htmlFor="in_label">Red</Label>
|
|
548
|
+
</FloatLabel>
|
|
549
|
+
<FloatLabel variant="in">
|
|
550
|
+
<InputColor.Input as={InputText} channel="green" type="text" size="small" />
|
|
551
|
+
<Label htmlFor="in_label">Green</Label>
|
|
552
|
+
</FloatLabel>
|
|
553
|
+
<FloatLabel variant="in">
|
|
554
|
+
<InputColor.Input as={InputText} channel="blue" type="text" size="small" />
|
|
555
|
+
<Label htmlFor="in_label">Blue</Label>
|
|
556
|
+
</FloatLabel>
|
|
557
|
+
<FloatLabel variant="in">
|
|
558
|
+
<InputColor.Input as={InputText} channel="alpha" type="text" size="small" />
|
|
559
|
+
<Label htmlFor="in_label">Alpha</Label>
|
|
560
|
+
</FloatLabel>
|
|
561
|
+
</InputGroup.Root>
|
|
562
|
+
<InputGroup.Root>
|
|
563
|
+
<FloatLabel variant="in">
|
|
564
|
+
<InputColor.Input as={InputText} channel="hue" type="text" size="small" />
|
|
565
|
+
<Label htmlFor="in_label">Hue</Label>
|
|
566
|
+
</FloatLabel>
|
|
567
|
+
<FloatLabel variant="in">
|
|
568
|
+
<InputColor.Input as={InputText} channel="saturation" type="text" size="small" />
|
|
569
|
+
<Label htmlFor="in_label">Saturation</Label>
|
|
570
|
+
</FloatLabel>
|
|
571
|
+
<FloatLabel variant="in">
|
|
572
|
+
<InputColor.Input as={InputText} channel="brightness" type="text" size="small" />
|
|
573
|
+
<Label htmlFor="in_label">Brightness</Label>
|
|
574
|
+
</FloatLabel>
|
|
575
|
+
<FloatLabel variant="in">
|
|
576
|
+
<InputColor.Input as={InputText} channel="alpha" type="text" size="small" />
|
|
577
|
+
<Label htmlFor="in_label">Alpha</Label>
|
|
578
|
+
</FloatLabel>
|
|
579
|
+
</InputGroup.Root>
|
|
580
|
+
<InputGroup.Root>
|
|
581
|
+
<FloatLabel variant="in">
|
|
582
|
+
<InputColor.Input as={InputText} channel="hue" type="text" size="small" />
|
|
583
|
+
<Label htmlFor="in_label">Hue</Label>
|
|
584
|
+
</FloatLabel>
|
|
585
|
+
<FloatLabel variant="in">
|
|
586
|
+
<InputColor.Input as={InputText} channel="saturation" type="text" size="small" />
|
|
587
|
+
<Label htmlFor="in_label">Saturation</Label>
|
|
588
|
+
</FloatLabel>
|
|
589
|
+
<FloatLabel variant="in">
|
|
590
|
+
<InputColor.Input as={InputText} channel="lightness" type="text" size="small" />
|
|
591
|
+
<Label htmlFor="in_label">Lightness</Label>
|
|
592
|
+
</FloatLabel>
|
|
593
|
+
<FloatLabel variant="in">
|
|
594
|
+
<InputColor.Input as={InputText} channel="alpha" type="text" size="small" />
|
|
595
|
+
<Label htmlFor="in_label">Alpha</Label>
|
|
596
|
+
</FloatLabel>
|
|
597
|
+
</InputGroup.Root>
|
|
598
|
+
<InputGroup.Root>
|
|
599
|
+
<FloatLabel variant="in">
|
|
600
|
+
<InputColor.Input as={InputText} channel="L" type="text" size="small" />
|
|
601
|
+
<Label htmlFor="in_label">Lightness</Label>
|
|
602
|
+
</FloatLabel>
|
|
603
|
+
<FloatLabel variant="in">
|
|
604
|
+
<InputColor.Input as={InputText} channel="C" type="text" size="small" />
|
|
605
|
+
<Label htmlFor="in_label">Chroma</Label>
|
|
606
|
+
</FloatLabel>
|
|
607
|
+
<FloatLabel variant="in">
|
|
608
|
+
<InputColor.Input as={InputText} channel="H" type="text" size="small" />
|
|
609
|
+
<Label htmlFor="in_label">Hue</Label>
|
|
610
|
+
</FloatLabel>
|
|
611
|
+
<FloatLabel variant="in">
|
|
612
|
+
<InputColor.Input as={InputText} channel="alpha" type="text" size="small" />
|
|
613
|
+
<Label htmlFor="in_label">Alpha</Label>
|
|
614
|
+
</FloatLabel>
|
|
615
|
+
</InputGroup.Root>
|
|
616
|
+
|
|
617
|
+
<InputGroup.Root>
|
|
618
|
+
<InputGroup.Addon>CSS</InputGroup.Addon>
|
|
619
|
+
<InputColor.Input as={InputText} channel="css" type="text" fluid />
|
|
620
|
+
</InputGroup.Root>
|
|
621
|
+
</InputColor.Root>
|
|
622
|
+
</div>
|
|
623
|
+
</div>
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
## colorManager
|
|
629
|
+
|
|
630
|
+
### Color class
|
|
631
|
+
|
|
632
|
+
The `Color` class is the base class for all color classes. It provides the basic functionality for all color classes.
|
|
633
|
+
|
|
634
|
+
- `clone()`: Clones the color.
|
|
635
|
+
- `toString(format)`: Converts the color to a string.
|
|
636
|
+
- `toFormat(format)`: Converts the color to a specific format.
|
|
637
|
+
- `toJSON()`: Converts the color to a JSON object.
|
|
638
|
+
- `getChannelRange(channel)`: Returns the range of the channel.
|
|
639
|
+
- `getFormat()`: Returns the format of the color.
|
|
640
|
+
- `getChannels()`: Returns the channels of the color.
|
|
641
|
+
- `getChannelValue(channel)`: Returns the value of the channel.
|
|
642
|
+
- `getColorAxes(xyChannels)`: Returns the axes of the color.
|
|
643
|
+
- `incChannelValue(channel, step)`: Increments the value of the channel by the step.
|
|
644
|
+
- `decChannelValue(channel, step)`: Decrements the value of the channel by the step.
|
|
645
|
+
- `withChannelValue(channel, value)`: Returns a new color with the value of the channel changed.
|
|
646
|
+
|
|
647
|
+
## Related
|
|
648
|
+
|
|
649
|
+
### Sub-Components
|
|
650
|
+
|
|
651
|
+
See [Primitive API](/docs/primitive/components/inputcolor#api) for sub-component props, state, exposes, and data attributes.
|
|
652
|
+
|
|
653
|
+
### Hooks
|
|
654
|
+
|
|
655
|
+
See [Headless API](/docs/headless/components/inputcolor#api) for the `useInputColor` hook interface.
|
|
656
|
+
|
|
657
|
+
### Accessibility
|
|
658
|
+
|
|
659
|
+
See [InputColor Primitive](/docs/primitive/components/inputcolor#accessibility) for WAI-ARIA compliance details and keyboard support.
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
## Theming
|
|
663
|
+
|
|
664
|
+
### CSS Classes
|
|
665
|
+
|
|
666
|
+
List of class names used in the styled mode.
|
|
667
|
+
|
|
668
|
+
<DocTable name="InputColor" category="style" />
|
|
669
|
+
|
|
670
|
+
### Design Tokens
|
|
671
|
+
|
|
672
|
+
List of design tokens.
|
|
673
|
+
|
|
674
|
+
<DocTable name="InputColor" category="token" />
|