@ui-sdk/web 0.0.0-stage → 0.1.0-beta.1
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 +202 -0
- package/README.md +10 -2
- package/browser/web/accordion.js +1 -0
- package/browser/web/alert-dialog.js +1 -0
- package/browser/web/autocomplete.js +1 -0
- package/browser/web/avatar.js +1 -0
- package/browser/web/button.js +1 -0
- package/browser/web/calendar.js +1 -0
- package/browser/web/carousel.js +1 -0
- package/browser/web/checkbox.js +1 -0
- package/browser/web/chunks/0eRGibL6.js +1 -0
- package/browser/web/chunks/2bIEUO6_.js +1 -0
- package/browser/web/chunks/5A9w2ULz.js +1 -0
- package/browser/web/chunks/5RSyydjV.js +1 -0
- package/browser/web/chunks/9pWTy2wl.js +1 -0
- package/browser/web/chunks/B0f2j6zz.js +1 -0
- package/browser/web/chunks/B1rux6br.js +1 -0
- package/browser/web/chunks/B3-APaNf.js +1 -0
- package/browser/web/chunks/B7EgSgjQ.js +1 -0
- package/browser/web/chunks/B8QcOzJU.js +1 -0
- package/browser/web/chunks/BFueEkwm.js +3 -0
- package/browser/web/chunks/BJj3oS29.js +1 -0
- package/browser/web/chunks/BNSvTCpr.js +1 -0
- package/browser/web/chunks/BPD0kAZB.js +1 -0
- package/browser/web/chunks/BQeduZqT.js +1 -0
- package/browser/web/chunks/B_CVFyiz.js +1 -0
- package/browser/web/chunks/B_ns1YHO.js +1 -0
- package/browser/web/chunks/BcwkVTsR.js +1 -0
- package/browser/web/chunks/BeaQ6TYM.js +1 -0
- package/browser/web/chunks/BgBB013u.js +1 -0
- package/browser/web/chunks/BgsKhHDm.js +1 -0
- package/browser/web/chunks/BjMcbuhi.js +9 -0
- package/browser/web/chunks/Bjiy_F2N.js +1 -0
- package/browser/web/chunks/BqScCLwv.js +1 -0
- package/browser/web/chunks/BqX3Utqx.js +1 -0
- package/browser/web/chunks/BtVkQf3z.js +1 -0
- package/browser/web/chunks/By30h-7B.js +1 -0
- package/browser/web/chunks/C1zqYpy2.js +1 -0
- package/browser/web/chunks/C436juFf.js +1 -0
- package/browser/web/chunks/C4_bULs1.js +1 -0
- package/browser/web/chunks/C4omqJEz.js +1 -0
- package/browser/web/chunks/C7tt0T3n.js +1 -0
- package/browser/web/chunks/C8w7s5dg.js +1 -0
- package/browser/web/chunks/CElY4erO.js +1 -0
- package/browser/web/chunks/CFODo-m2.js +1 -0
- package/browser/web/chunks/CL4wjam9.js +1 -0
- package/browser/web/chunks/CMg-8UVf.js +1 -0
- package/browser/web/chunks/COWKfakj.js +1 -0
- package/browser/web/chunks/CQBU0qZ4.js +1 -0
- package/browser/web/chunks/CV6uABgc.js +1 -0
- package/browser/web/chunks/C_SWFpWQ.js +1 -0
- package/browser/web/chunks/C_Uanbrl.js +1 -0
- package/browser/web/chunks/Ce_CSanC.js +1 -0
- package/browser/web/chunks/Cg-ZmRhS.js +1 -0
- package/browser/web/chunks/Cgf2wPI_.js +1 -0
- package/browser/web/chunks/Cuep_3Vf.js +1 -0
- package/browser/web/chunks/D02PaHn6.js +1 -0
- package/browser/web/chunks/D5LiaI5R.js +1 -0
- package/browser/web/chunks/D9UgVYvF.js +1 -0
- package/browser/web/chunks/DC08tnkE.js +2 -0
- package/browser/web/chunks/DG8YGSvu.js +1 -0
- package/browser/web/chunks/DIQd0FYD.js +1 -0
- package/browser/web/chunks/DMLqacE8.js +1 -0
- package/browser/web/chunks/DSUI3yI-.js +1 -0
- package/browser/web/chunks/DT3Hb76X.js +1 -0
- package/browser/web/chunks/DY75g3-W.js +1 -0
- package/browser/web/chunks/DZpNQKZ9.js +1 -0
- package/browser/web/chunks/Db-W1wrC.js +1 -0
- package/browser/web/chunks/Dc1xK3Ii.js +1 -0
- package/browser/web/chunks/DdF6awFs.js +1 -0
- package/browser/web/chunks/DdaCLml8.js +1 -0
- package/browser/web/chunks/Dh8MLjQO.js +1 -0
- package/browser/web/chunks/DiuslJRy.js +1 -0
- package/browser/web/chunks/DjRcw3Y0.js +1 -0
- package/browser/web/chunks/Djdv-16J.js +1 -0
- package/browser/web/chunks/DnFXe_lF.js +1 -0
- package/browser/web/chunks/DneGv1oC.js +1 -0
- package/browser/web/chunks/DsVxP-p-.js +1 -0
- package/browser/web/chunks/DwDilCo2.js +1 -0
- package/browser/web/chunks/DwV48AXv.js +1 -0
- package/browser/web/chunks/F37aF4-L.js +1 -0
- package/browser/web/chunks/LyB6XIbN.js +1 -0
- package/browser/web/chunks/NKnbYGjC.js +1 -0
- package/browser/web/chunks/Vk-rVi16.js +1 -0
- package/browser/web/chunks/XsM0J1Ex.js +1 -0
- package/browser/web/chunks/asSN9iEp.js +1 -0
- package/browser/web/chunks/c-AjHfdF.js +1 -0
- package/browser/web/chunks/dR-12TPY.js +1 -0
- package/browser/web/chunks/hR4xM0EC.js +1 -0
- package/browser/web/chunks/hqOaBxAg.js +1 -0
- package/browser/web/chunks/kMKqqeG4.js +1 -0
- package/browser/web/chunks/kXboBcfi.js +1 -0
- package/browser/web/chunks/l4aQIg22.js +1 -0
- package/browser/web/chunks/tJC0JSU4.js +1 -0
- package/browser/web/chunks/wHdS_QYM.js +1 -0
- package/browser/web/chunks/yv8dTvNI.js +1 -0
- package/browser/web/chunks/yw9M3nfi.js +1 -0
- package/browser/web/collapsible.js +1 -0
- package/browser/web/color-picker.js +1 -0
- package/browser/web/combobox.js +2 -0
- package/browser/web/command.js +1 -0
- package/browser/web/core.js +5 -0
- package/browser/web/date-input.js +1 -0
- package/browser/web/date-picker.js +1 -0
- package/browser/web/dialog.js +1 -0
- package/browser/web/drawer.js +1 -0
- package/browser/web/field.js +1 -0
- package/browser/web/file-input.js +1 -0
- package/browser/web/hover-card.js +1 -0
- package/browser/web/image-cropper.js +1 -0
- package/browser/web/input.js +1 -0
- package/browser/web/label.js +1 -0
- package/browser/web/listbox.js +1 -0
- package/browser/web/menu.js +1 -0
- package/browser/web/menubar.js +1 -0
- package/browser/web/meter.js +1 -0
- package/browser/web/navigation-menu.js +1 -0
- package/browser/web/number-input.js +1 -0
- package/browser/web/otp-input.js +2 -0
- package/browser/web/overlays.js +1 -0
- package/browser/web/pagination.js +1 -0
- package/browser/web/password-input.js +1 -0
- package/browser/web/popover.js +1 -0
- package/browser/web/preferences.js +1 -0
- package/browser/web/progress.js +1 -0
- package/browser/web/radio.js +1 -0
- package/browser/web/rating.js +1 -0
- package/browser/web/resizable.js +1 -0
- package/browser/web/scroll-area.js +1 -0
- package/browser/web/segmented-control.js +1 -0
- package/browser/web/select.js +1 -0
- package/browser/web/separator.js +1 -0
- package/browser/web/slider.js +1 -0
- package/browser/web/switch.js +1 -0
- package/browser/web/tabs.js +1 -0
- package/browser/web/textarea.js +1 -0
- package/browser/web/time-input.js +1 -0
- package/browser/web/timeline.js +1 -0
- package/browser/web/toast.js +1 -0
- package/browser/web/toggle.js +1 -0
- package/browser/web/token-input.js +8 -0
- package/browser/web/toolbar.js +1 -0
- package/browser/web/tooltip.js +1 -0
- package/browser/web/tree.js +1 -0
- package/browser/web/trigger-menu.js +4 -0
- package/browser/web/waterfall.js +1 -0
- package/browser/web.css +3378 -0
- package/browser/web.js +3 -0
- package/custom-elements.json +32315 -0
- package/dist/accordion.d.ts +2 -0
- package/dist/accordion.js +57 -0
- package/dist/action.d.ts +16 -0
- package/dist/action.js +39 -0
- package/dist/agent.d.ts +2 -0
- package/dist/agent.js +7 -0
- package/dist/autocomplete.d.ts +2 -0
- package/dist/autocomplete.js +120 -0
- package/dist/autoload.d.ts +18 -0
- package/dist/autoload.js +63 -0
- package/dist/avatar.d.ts +2 -0
- package/dist/avatar.js +27 -0
- package/dist/browser-core.d.ts +2 -0
- package/dist/browser-core.js +8 -0
- package/dist/button.d.ts +2 -0
- package/dist/button.js +35 -0
- package/dist/calendar.d.ts +23 -0
- package/dist/calendar.js +429 -0
- package/dist/carousel.d.ts +2 -0
- package/dist/carousel.js +54 -0
- package/dist/checkbox.d.ts +4 -0
- package/dist/checkbox.js +75 -0
- package/dist/collapsible.d.ts +2 -0
- package/dist/collapsible.js +28 -0
- package/dist/color-picker.d.ts +2 -0
- package/dist/color-picker.js +64 -0
- package/dist/combobox.d.ts +2 -0
- package/dist/combobox.js +334 -0
- package/dist/command.d.ts +2 -0
- package/dist/command.js +122 -0
- package/dist/date-input.d.ts +3 -0
- package/dist/date-input.js +87 -0
- package/dist/date-picker.d.ts +2 -0
- package/dist/date-picker.js +174 -0
- package/dist/default-text.d.ts +3 -0
- package/dist/default-text.js +24 -0
- package/dist/define-element.d.ts +404 -0
- package/dist/define-element.js +1489 -0
- package/dist/dialog.d.ts +3 -0
- package/dist/dialog.js +94 -0
- package/dist/drawer.d.ts +2 -0
- package/dist/drawer.js +96 -0
- package/dist/entries/accordion.d.ts +3 -0
- package/dist/entries/accordion.js +7 -0
- package/dist/entries/alert-dialog.d.ts +3 -0
- package/dist/entries/alert-dialog.js +13 -0
- package/dist/entries/autocomplete.d.ts +3 -0
- package/dist/entries/autocomplete.js +7 -0
- package/dist/entries/avatar.d.ts +2 -0
- package/dist/entries/avatar.js +3 -0
- package/dist/entries/button.d.ts +2 -0
- package/dist/entries/button.js +3 -0
- package/dist/entries/calendar.d.ts +3 -0
- package/dist/entries/calendar.js +7 -0
- package/dist/entries/carousel.d.ts +3 -0
- package/dist/entries/carousel.js +7 -0
- package/dist/entries/checkbox.d.ts +3 -0
- package/dist/entries/checkbox.js +15 -0
- package/dist/entries/collapsible.d.ts +3 -0
- package/dist/entries/collapsible.js +7 -0
- package/dist/entries/color-picker.d.ts +3 -0
- package/dist/entries/color-picker.js +7 -0
- package/dist/entries/combobox.d.ts +3 -0
- package/dist/entries/combobox.js +7 -0
- package/dist/entries/command.d.ts +3 -0
- package/dist/entries/command.js +7 -0
- package/dist/entries/date-input.d.ts +3 -0
- package/dist/entries/date-input.js +7 -0
- package/dist/entries/date-picker.d.ts +3 -0
- package/dist/entries/date-picker.js +7 -0
- package/dist/entries/dialog.d.ts +3 -0
- package/dist/entries/dialog.js +7 -0
- package/dist/entries/drawer.d.ts +3 -0
- package/dist/entries/drawer.js +8 -0
- package/dist/entries/field.d.ts +2 -0
- package/dist/entries/field.js +3 -0
- package/dist/entries/file-input.d.ts +3 -0
- package/dist/entries/file-input.js +13 -0
- package/dist/entries/hover-card.d.ts +3 -0
- package/dist/entries/hover-card.js +7 -0
- package/dist/entries/image-cropper.d.ts +3 -0
- package/dist/entries/image-cropper.js +7 -0
- package/dist/entries/input.d.ts +3 -0
- package/dist/entries/input.js +8 -0
- package/dist/entries/label.d.ts +2 -0
- package/dist/entries/label.js +3 -0
- package/dist/entries/listbox.d.ts +3 -0
- package/dist/entries/listbox.js +7 -0
- package/dist/entries/menu.d.ts +3 -0
- package/dist/entries/menu.js +7 -0
- package/dist/entries/menubar.d.ts +3 -0
- package/dist/entries/menubar.js +7 -0
- package/dist/entries/meter.d.ts +2 -0
- package/dist/entries/meter.js +3 -0
- package/dist/entries/navigation-menu.d.ts +3 -0
- package/dist/entries/navigation-menu.js +7 -0
- package/dist/entries/number-input.d.ts +3 -0
- package/dist/entries/number-input.js +7 -0
- package/dist/entries/otp-input.d.ts +3 -0
- package/dist/entries/otp-input.js +7 -0
- package/dist/entries/overlays.d.ts +2 -0
- package/dist/entries/overlays.js +3 -0
- package/dist/entries/pagination.d.ts +3 -0
- package/dist/entries/pagination.js +11 -0
- package/dist/entries/password-input.d.ts +3 -0
- package/dist/entries/password-input.js +7 -0
- package/dist/entries/popover.d.ts +3 -0
- package/dist/entries/popover.js +7 -0
- package/dist/entries/preferences.d.ts +3 -0
- package/dist/entries/preferences.js +13 -0
- package/dist/entries/progress.d.ts +2 -0
- package/dist/entries/progress.js +3 -0
- package/dist/entries/radio.d.ts +3 -0
- package/dist/entries/radio.js +7 -0
- package/dist/entries/rating.d.ts +3 -0
- package/dist/entries/rating.js +8 -0
- package/dist/entries/resizable.d.ts +3 -0
- package/dist/entries/resizable.js +11 -0
- package/dist/entries/scroll-area.d.ts +3 -0
- package/dist/entries/scroll-area.js +7 -0
- package/dist/entries/segmented-control.d.ts +3 -0
- package/dist/entries/segmented-control.js +7 -0
- package/dist/entries/select.d.ts +3 -0
- package/dist/entries/select.js +7 -0
- package/dist/entries/separator.d.ts +2 -0
- package/dist/entries/separator.js +3 -0
- package/dist/entries/slider.d.ts +3 -0
- package/dist/entries/slider.js +7 -0
- package/dist/entries/switch.d.ts +3 -0
- package/dist/entries/switch.js +7 -0
- package/dist/entries/tabs.d.ts +3 -0
- package/dist/entries/tabs.js +7 -0
- package/dist/entries/textarea.d.ts +3 -0
- package/dist/entries/textarea.js +7 -0
- package/dist/entries/time-input.d.ts +3 -0
- package/dist/entries/time-input.js +7 -0
- package/dist/entries/timeline.d.ts +3 -0
- package/dist/entries/timeline.js +7 -0
- package/dist/entries/toast.d.ts +2 -0
- package/dist/entries/toast.js +3 -0
- package/dist/entries/toggle.d.ts +3 -0
- package/dist/entries/toggle.js +12 -0
- package/dist/entries/token-input.d.ts +3 -0
- package/dist/entries/token-input.js +17 -0
- package/dist/entries/toolbar.d.ts +3 -0
- package/dist/entries/toolbar.js +7 -0
- package/dist/entries/tooltip.d.ts +3 -0
- package/dist/entries/tooltip.js +7 -0
- package/dist/entries/tree.d.ts +3 -0
- package/dist/entries/tree.js +17 -0
- package/dist/entries/trigger-menu.d.ts +3 -0
- package/dist/entries/trigger-menu.js +11 -0
- package/dist/entries/waterfall.d.ts +3 -0
- package/dist/entries/waterfall.js +11 -0
- package/dist/events.d.ts +1658 -0
- package/dist/events.js +0 -0
- package/dist/field.d.ts +2 -0
- package/dist/field.js +101 -0
- package/dist/file-input.d.ts +2 -0
- package/dist/file-input.js +140 -0
- package/dist/forward-attributes.d.ts +2 -0
- package/dist/forward-attributes.js +22 -0
- package/dist/history.d.ts +2 -0
- package/dist/history.js +11 -0
- package/dist/hover-card.d.ts +2 -0
- package/dist/hover-card.js +31 -0
- package/dist/image-cropper.d.ts +2 -0
- package/dist/image-cropper.js +66 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +269 -0
- package/dist/input.d.ts +3 -0
- package/dist/input.js +69 -0
- package/dist/label.d.ts +2 -0
- package/dist/label.js +11 -0
- package/dist/list.d.ts +40 -0
- package/dist/list.js +192 -0
- package/dist/listbox.d.ts +2 -0
- package/dist/listbox.js +84 -0
- package/dist/menu.d.ts +4 -0
- package/dist/menu.js +295 -0
- package/dist/menubar.d.ts +4 -0
- package/dist/menubar.js +30 -0
- package/dist/meter.d.ts +2 -0
- package/dist/meter.js +22 -0
- package/dist/navigation-menu.d.ts +2 -0
- package/dist/navigation-menu.js +114 -0
- package/dist/number-input.d.ts +2 -0
- package/dist/number-input.js +73 -0
- package/dist/observe.d.ts +2 -0
- package/dist/observe.js +7 -0
- package/dist/otp-input.d.ts +2 -0
- package/dist/otp-input.js +72 -0
- package/dist/overlays.d.ts +13 -0
- package/dist/overlays.js +156 -0
- package/dist/pagination.d.ts +2 -0
- package/dist/pagination.js +127 -0
- package/dist/password-input.d.ts +2 -0
- package/dist/password-input.js +57 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +64 -0
- package/dist/popup.d.ts +40 -0
- package/dist/popup.js +112 -0
- package/dist/preferences.d.ts +2 -0
- package/dist/preferences.js +56 -0
- package/dist/progress.d.ts +2 -0
- package/dist/progress.js +22 -0
- package/dist/radio.d.ts +2 -0
- package/dist/radio.js +33 -0
- package/dist/rating.d.ts +2 -0
- package/dist/rating.js +64 -0
- package/dist/resizable.d.ts +2 -0
- package/dist/resizable.js +42 -0
- package/dist/scroll-area.d.ts +2 -0
- package/dist/scroll-area.js +45 -0
- package/dist/segmented-control.d.ts +2 -0
- package/dist/segmented-control.js +28 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +239 -0
- package/dist/separator.d.ts +2 -0
- package/dist/separator.js +11 -0
- package/dist/slider.d.ts +2 -0
- package/dist/slider.js +77 -0
- package/dist/tabs.d.ts +2 -0
- package/dist/tabs.js +37 -0
- package/dist/timeline.d.ts +2 -0
- package/dist/timeline.js +27 -0
- package/dist/toast.d.ts +20 -0
- package/dist/toast.js +177 -0
- package/dist/toggle.d.ts +3 -0
- package/dist/toggle.js +64 -0
- package/dist/token-input.d.ts +2 -0
- package/dist/token-input.js +103 -0
- package/dist/toolbar.d.ts +2 -0
- package/dist/toolbar.js +36 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tooltip.js +35 -0
- package/dist/tree.d.ts +2 -0
- package/dist/tree.js +147 -0
- package/dist/trigger-menu.d.ts +2 -0
- package/dist/trigger-menu.js +133 -0
- package/dist/waterfall.d.ts +2 -0
- package/dist/waterfall.js +140 -0
- package/docs/README.md +89 -0
- package/docs/agents.md +1523 -0
- package/docs/components/accordion.md +1401 -0
- package/docs/components/alert-dialog.md +788 -0
- package/docs/components/autocomplete.md +1692 -0
- package/docs/components/avatar.md +261 -0
- package/docs/components/button.md +441 -0
- package/docs/components/calendar.md +1536 -0
- package/docs/components/carousel.md +1055 -0
- package/docs/components/checkbox.md +1045 -0
- package/docs/components/collapsible.md +535 -0
- package/docs/components/color-picker.md +651 -0
- package/docs/components/combobox.md +3274 -0
- package/docs/components/command.md +1431 -0
- package/docs/components/date-input.md +563 -0
- package/docs/components/date-picker.md +1136 -0
- package/docs/components/dialog.md +1360 -0
- package/docs/components/drawer.md +1201 -0
- package/docs/components/field.md +519 -0
- package/docs/components/file-input.md +617 -0
- package/docs/components/hover-card.md +486 -0
- package/docs/components/image-cropper.md +489 -0
- package/docs/components/input.md +327 -0
- package/docs/components/label.md +208 -0
- package/docs/components/listbox.md +1015 -0
- package/docs/components/menu.md +1212 -0
- package/docs/components/menubar.md +460 -0
- package/docs/components/meter.md +298 -0
- package/docs/components/navigation-menu.md +1573 -0
- package/docs/components/number-input.md +1087 -0
- package/docs/components/otp-input.md +558 -0
- package/docs/components/pagination.md +639 -0
- package/docs/components/password-input.md +649 -0
- package/docs/components/popover.md +1433 -0
- package/docs/components/preferences.md +243 -0
- package/docs/components/progress.md +406 -0
- package/docs/components/radio.md +855 -0
- package/docs/components/rating.md +431 -0
- package/docs/components/resizable.md +866 -0
- package/docs/components/scroll-area.md +898 -0
- package/docs/components/segmented-control.md +421 -0
- package/docs/components/select.md +1957 -0
- package/docs/components/separator.md +238 -0
- package/docs/components/slider.md +1018 -0
- package/docs/components/switch.md +583 -0
- package/docs/components/tabs.md +948 -0
- package/docs/components/textarea.md +331 -0
- package/docs/components/time-input.md +235 -0
- package/docs/components/timeline.md +622 -0
- package/docs/components/toast.md +1223 -0
- package/docs/components/toggle.md +522 -0
- package/docs/components/token-input.md +854 -0
- package/docs/components/toolbar.md +815 -0
- package/docs/components/tooltip.md +860 -0
- package/docs/components/tree.md +1243 -0
- package/docs/components/trigger-menu.md +1110 -0
- package/docs/components/waterfall.md +709 -0
- package/docs/controllers.md +66 -0
- package/docs/core.md +8027 -0
- package/docs/custom-parts.md +91 -0
- package/docs/first-component.md +88 -0
- package/docs/forms.md +125 -0
- package/docs/installation.md +141 -0
- package/docs/introduction.md +32 -0
- package/docs/lists-and-menus.md +166 -0
- package/docs/llms.txt +1566 -0
- package/docs/parts-and-composition.md +57 -0
- package/docs/popups.md +92 -0
- package/docs/rendering.md +71 -0
- package/docs/server-rendering.md +118 -0
- package/docs/state-and-events.md +134 -0
- package/docs/styling-and-animation.md +104 -0
- package/docs/utilities/async-options.md +332 -0
- package/docs/utilities/shortcuts.md +184 -0
- package/html-custom-data.json +14792 -0
- package/package.json +302 -3
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# Rating
|
|
2
|
+
|
|
3
|
+
Pick a score from a row of stars, whole or half, with a preview as the pointer moves over them.
|
|
4
|
+
|
|
5
|
+
Use a rating to collect a score, like how a stay went, or to show one, like an average. Each star is a radio, so it works like a radio group, with one value and a single tab stop.
|
|
6
|
+
|
|
7
|
+
```ts title="basic.ts"
|
|
8
|
+
import "@ui-sdk/web/rating"
|
|
9
|
+
import { createElement, Star } from "lucide"
|
|
10
|
+
|
|
11
|
+
const star = createElement(Star, { "aria-hidden": "true" }).outerHTML
|
|
12
|
+
|
|
13
|
+
function mount(root: HTMLElement) {
|
|
14
|
+
root.innerHTML = `
|
|
15
|
+
<ui-rating aria-label="Rating" default-value="3">
|
|
16
|
+
<template><ui-rating-item>${star}</ui-rating-item></template>
|
|
17
|
+
</ui-rating>
|
|
18
|
+
`
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { mount }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Choose a star, then use the arrow keys to change the score.
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install @ui-sdk/web @ui-sdk/core
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Import the component, and the field if you use it, to register their elements. The import is safe on the server.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import "@ui-sdk/web/rating"
|
|
36
|
+
import "@ui-sdk/web/field"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Composition
|
|
40
|
+
|
|
41
|
+
Use the following composition to build a `ui-rating`:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
ui-rating
|
|
45
|
+
└── template
|
|
46
|
+
└── ui-rating-item
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`ui-rating` renders a `ui-rating-item` per star, copied from the one in its `<template>`, and the radios inside each. Without a template, the items are empty.
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
Import the parts and put them together:
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<script type="module">
|
|
57
|
+
import "@ui-sdk/web/rating"
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<ui-rating aria-label="Rating" default-value="3">
|
|
61
|
+
<template>
|
|
62
|
+
<ui-rating-item>
|
|
63
|
+
<svg
|
|
64
|
+
viewBox="0 0 24 24"
|
|
65
|
+
fill="none"
|
|
66
|
+
stroke="currentColor"
|
|
67
|
+
stroke-width="2"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
>
|
|
70
|
+
<path
|
|
71
|
+
d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"
|
|
72
|
+
/>
|
|
73
|
+
</svg>
|
|
74
|
+
</ui-rating-item>
|
|
75
|
+
</template>
|
|
76
|
+
</ui-rating>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Name the rating with `aria-label`, or put it in a [Field](./field.md) whose label names it. Without `default-value`, nothing starts checked and Tab enters on the first star.
|
|
80
|
+
|
|
81
|
+
## Stars
|
|
82
|
+
|
|
83
|
+
Put your icon in `ui-rating-item`. Each item says how much of its star the shown score covers: `--rating-fill` goes from 0 to 1, `data-filled` marks a whole star and `data-partial` the star a score ends partway through. The radios that pick the score sit over the icon, so it needs no events of its own.
|
|
84
|
+
|
|
85
|
+
```css
|
|
86
|
+
[data-slot="rating-item"] {
|
|
87
|
+
color: lightgray;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[data-slot="rating-item"][data-filled] {
|
|
91
|
+
color: gold;
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For half stars and averages, paint the icon up to `calc(var(--rating-fill) * 100%)`, like with a gradient behind a star-shaped mask.
|
|
96
|
+
|
|
97
|
+
## Half Stars
|
|
98
|
+
|
|
99
|
+
Set `step="0.5"` to split each star in two. Each half is its own radio, named like "2.5 stars", and a press on the first half of a star picks the half score.
|
|
100
|
+
|
|
101
|
+
```ts title="half-stars.ts"
|
|
102
|
+
import "@ui-sdk/web/rating"
|
|
103
|
+
import { createElement, Star } from "lucide"
|
|
104
|
+
|
|
105
|
+
const star = createElement(Star, { "aria-hidden": "true" }).outerHTML
|
|
106
|
+
|
|
107
|
+
function mount(root: HTMLElement) {
|
|
108
|
+
root.innerHTML = `
|
|
109
|
+
<ui-rating aria-label="Rating" step="0.5" default-value="3.5">
|
|
110
|
+
<template><ui-rating-item>${star}</ui-rating-item></template>
|
|
111
|
+
</ui-rating>
|
|
112
|
+
`
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { mount }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Choose the first half of a star. Its star fills halfway.
|
|
119
|
+
|
|
120
|
+
## Preview
|
|
121
|
+
|
|
122
|
+
While a pointer moves over the stars, they show the score under it: `--rating-fill` follows the pointer, and `data-highlighted` marks the stars up to it. Leaving the stars shows the score again. Touch has no preview, since a tap picks the score at once.
|
|
123
|
+
|
|
124
|
+
## Deselectable
|
|
125
|
+
|
|
126
|
+
Set `deselectable` to let people clear their score: a press on the checked star, or Space on it, sets the score back to `null`.
|
|
127
|
+
|
|
128
|
+
```ts title="deselectable.ts"
|
|
129
|
+
import "@ui-sdk/web/rating"
|
|
130
|
+
import { createElement, Star } from "lucide"
|
|
131
|
+
|
|
132
|
+
const star = createElement(Star, { "aria-hidden": "true" }).outerHTML
|
|
133
|
+
|
|
134
|
+
function mount(root: HTMLElement) {
|
|
135
|
+
root.innerHTML = `
|
|
136
|
+
<ui-rating aria-label="Rating" default-value="4" deselectable>
|
|
137
|
+
<template><ui-rating-item>${star}</ui-rating-item></template>
|
|
138
|
+
</ui-rating>
|
|
139
|
+
`
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { mount }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Press the fourth star. The score clears.
|
|
146
|
+
|
|
147
|
+
## Read-Only
|
|
148
|
+
|
|
149
|
+
Set `read-only` to show a score that can't change, like an average. Any score shows, like 4.2, which fills a fifth of the last star. The rating becomes one image for screen readers, and its radios are hidden from them.
|
|
150
|
+
|
|
151
|
+
Name a read-only rating with the `getValueLabel` property, so its name includes the score. An `aria-label` would replace it.
|
|
152
|
+
|
|
153
|
+
```ts title="read-only.ts"
|
|
154
|
+
import type { UiRatingElement } from "@ui-sdk/web"
|
|
155
|
+
import "@ui-sdk/web/rating"
|
|
156
|
+
import { createElement, Star } from "lucide"
|
|
157
|
+
|
|
158
|
+
const star = createElement(Star, { "aria-hidden": "true" }).outerHTML
|
|
159
|
+
|
|
160
|
+
function mount(root: HTMLElement) {
|
|
161
|
+
root.innerHTML = `
|
|
162
|
+
<ui-rating value="4.2" read-only>
|
|
163
|
+
<template><ui-rating-item>${star}</ui-rating-item></template>
|
|
164
|
+
</ui-rating>
|
|
165
|
+
`
|
|
166
|
+
const rating = root.querySelector("ui-rating") as UiRatingElement
|
|
167
|
+
rating.getValueLabel = (value, max) => `Rated ${value} out of ${max}`
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export { mount }
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
An average of 4.2, named Rated 4.2 out of 5.
|
|
174
|
+
|
|
175
|
+
## Disabled
|
|
176
|
+
|
|
177
|
+
Set `disabled` to stop every star from being focused or changed. A disabled rating submits nothing.
|
|
178
|
+
|
|
179
|
+
```ts title="disabled.ts"
|
|
180
|
+
import "@ui-sdk/web/rating"
|
|
181
|
+
import { createElement, Star } from "lucide"
|
|
182
|
+
|
|
183
|
+
const star = createElement(Star, { "aria-hidden": "true" }).outerHTML
|
|
184
|
+
|
|
185
|
+
function mount(root: HTMLElement) {
|
|
186
|
+
root.innerHTML = `
|
|
187
|
+
<ui-rating aria-label="Rating" default-value="2" disabled>
|
|
188
|
+
<template><ui-rating-item>${star}</ui-rating-item></template>
|
|
189
|
+
</ui-rating>
|
|
190
|
+
`
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export { mount }
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
The rating is disabled, so the stars can't be focused or pressed.
|
|
197
|
+
|
|
198
|
+
## Controlled
|
|
199
|
+
|
|
200
|
+
Listen to `valuechange` for each change and its reason. Call `event.preventDefault()` to keep the current score. The element's `api` property has the same methods, like `api.setValue(null)` for the Clear Rating button below.
|
|
201
|
+
|
|
202
|
+
```ts title="controlled.ts"
|
|
203
|
+
import "@ui-sdk/web/rating"
|
|
204
|
+
import { createElement, Star } from "lucide"
|
|
205
|
+
import { log } from "./log"
|
|
206
|
+
|
|
207
|
+
const star = createElement(Star, { "aria-hidden": "true" }).outerHTML
|
|
208
|
+
|
|
209
|
+
function mount(root: HTMLElement) {
|
|
210
|
+
root.innerHTML = `
|
|
211
|
+
<div>
|
|
212
|
+
<div data-slot="controls">
|
|
213
|
+
<button type="button">Clear Rating</button>
|
|
214
|
+
</div>
|
|
215
|
+
<ui-rating aria-label="Rating" default-value="4">
|
|
216
|
+
<template><ui-rating-item>${star}</ui-rating-item></template>
|
|
217
|
+
</ui-rating>
|
|
218
|
+
</div>
|
|
219
|
+
`
|
|
220
|
+
const rating = root.querySelector("ui-rating")!
|
|
221
|
+
rating.addEventListener("valuechange", (event) => {
|
|
222
|
+
const { value, reason } = event.detail
|
|
223
|
+
log(root, `value: ${value} (${reason})`)
|
|
224
|
+
})
|
|
225
|
+
root
|
|
226
|
+
.querySelector('[data-slot="controls"] button')!
|
|
227
|
+
.addEventListener("click", () => rating.api.setValue(null))
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export { mount }
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Choose a star, then press Clear Rating. The console logs each change and its reason.
|
|
234
|
+
|
|
235
|
+
See [State and Events](../state-and-events.md) for controlled state, cancellation and debugging.
|
|
236
|
+
|
|
237
|
+
## Form
|
|
238
|
+
|
|
239
|
+
The rating takes part in forms through `ElementInternals`. Set `name` to submit the score; nothing submits without a name or a score. `required` blocks submission until there's a score, and a reset returns to `default-value`.
|
|
240
|
+
|
|
241
|
+
```ts title="form.ts"
|
|
242
|
+
import "@ui-sdk/web/field"
|
|
243
|
+
import "@ui-sdk/web/rating"
|
|
244
|
+
import { createElement, Star } from "lucide"
|
|
245
|
+
import { log } from "./log"
|
|
246
|
+
|
|
247
|
+
const star = createElement(Star, { "aria-hidden": "true" }).outerHTML
|
|
248
|
+
|
|
249
|
+
function mount(root: HTMLElement) {
|
|
250
|
+
root.innerHTML = `
|
|
251
|
+
<form data-slot="stack">
|
|
252
|
+
<ui-field>
|
|
253
|
+
<ui-field-label>Rate your stay</ui-field-label>
|
|
254
|
+
<ui-rating name="stay" required>
|
|
255
|
+
<template><ui-rating-item>${star}</ui-rating-item></template>
|
|
256
|
+
</ui-rating>
|
|
257
|
+
</ui-field>
|
|
258
|
+
<div data-slot="row">
|
|
259
|
+
<button type="submit" data-variant="solid">Send Review</button>
|
|
260
|
+
<button type="reset">Reset</button>
|
|
261
|
+
</div>
|
|
262
|
+
</form>
|
|
263
|
+
`
|
|
264
|
+
const form = root.querySelector("form")!
|
|
265
|
+
form.addEventListener("submit", (event) => {
|
|
266
|
+
event.preventDefault()
|
|
267
|
+
log(root, `Submitted stay=${new FormData(form).get("stay")}`)
|
|
268
|
+
})
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export { mount }
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Press Send Review without a score to see the browser's message. Choose a star and send it again.
|
|
275
|
+
|
|
276
|
+
## Stars and Labels
|
|
277
|
+
|
|
278
|
+
Set `max` for the number of stars, and `loop` to let the arrow keys wrap from the last star to the first. Each radio is named by the `getValueLabel` property, which gets the score and `max` and says "1 star" or "3 stars" by default.
|
|
279
|
+
|
|
280
|
+
```html
|
|
281
|
+
<ui-rating aria-label="Difficulty" max="10" loop></ui-rating>
|
|
282
|
+
<script type="module">
|
|
283
|
+
document.querySelector("ui-rating").getValueLabel = (value, max) =>
|
|
284
|
+
`${value} of ${max}`
|
|
285
|
+
</script>
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Styling
|
|
289
|
+
|
|
290
|
+
Parts are unstyled. Use `data-filled`, `data-partial`, `data-checked` and `data-highlighted` on each star, and `--rating-fill` for how full it is. `data-disabled`, `data-readonly` and `data-required` are on the rating and its stars.
|
|
291
|
+
|
|
292
|
+
Each part has a `data-slot`, such as `rating-item`, and its state attributes are listed under [Data Attributes](#data-attributes).
|
|
293
|
+
|
|
294
|
+
### ui-rating-item
|
|
295
|
+
- `--rating-fill`: How much of the star the shown score covers, from 0 to 1.
|
|
296
|
+
|
|
297
|
+
## Data Attributes
|
|
298
|
+
|
|
299
|
+
### ui-rating
|
|
300
|
+
`[data-slot="rating"]`
|
|
301
|
+
|
|
302
|
+
- `data-required`: Present when the rating is required.
|
|
303
|
+
- `data-readonly`: Present when the rating only shows its score.
|
|
304
|
+
- `data-disabled`: Present when the rating is disabled, by its own prop or a `<fieldset>`.
|
|
305
|
+
|
|
306
|
+
### ui-rating-item
|
|
307
|
+
`[data-slot="rating-item"]`
|
|
308
|
+
|
|
309
|
+
- `data-filled`: Present on stars the shown score covers whole.
|
|
310
|
+
- `data-partial`: Present on the star the shown score covers part of, like the last of 2.5.
|
|
311
|
+
- `data-checked`: Present on the star the score ends in.
|
|
312
|
+
- `data-disabled`: Present when the rating is disabled, by its own prop or a `<fieldset>`.
|
|
313
|
+
- `data-readonly`: Present when the rating only shows its score.
|
|
314
|
+
- `data-highlighted`: Present on the stars up to the score a pointer previews.
|
|
315
|
+
|
|
316
|
+
## API Reference
|
|
317
|
+
|
|
318
|
+
Props are attributes in kebab case, like `default-value` and `read-only`. `getValueLabel` and `controller` are properties. `value` is a live property and attribute. Callbacks are DOM events.
|
|
319
|
+
|
|
320
|
+
### ui-rating
|
|
321
|
+
|
|
322
|
+
- `value?` (`number | null`): The score. Pass it to control the rating. `null` means no score yet.
|
|
323
|
+
- `defaultValue?` (`number | null`): The score at first, when uncontrolled. A form reset returns to it.
|
|
324
|
+
- `valuechange event`: Runs when a user or a form reset wants to change the score. `details.reason` says why, and `details.cancel()` stops it.
|
|
325
|
+
- `max?` (`number`): How many stars there are.
|
|
326
|
+
- `step?` (`number`): The smallest change, as a fraction of a star: `0.5` makes half stars, each half its own radio.
|
|
327
|
+
- `deselectable?` (`boolean`): Lets a press on the checked star clear the score.
|
|
328
|
+
- `disabled?` (`boolean`): Disables every star: they can't be focused or changed, and the score isn't submitted.
|
|
329
|
+
- `readOnly?` (`boolean`): Shows the score as an image, named by `getValueLabel`, that can't be changed. Any score shows, like an average of 4.2.
|
|
330
|
+
- `required?` (`boolean`): Blocks form submission until there's a score, with the browser's own message.
|
|
331
|
+
- `name?` (`string`): The name the score submits under. Without one, the rating submits nothing.
|
|
332
|
+
- `form?` (`string`): The id of a form to belong to, when the rating isn't inside that form.
|
|
333
|
+
- `loop?` (`boolean`): Whether arrow keys wrap from the last star to the first.
|
|
334
|
+
- `getValueLabel?` (`((value: number, max: number) => string)`): Names a score, for each star's radio and for a read-only rating.
|
|
335
|
+
- `controller?` (`{ getValue: () => number | null; setValue: (value: number | null, details?: RatingChangeOptions) => boolean; focus: () => void; }`): Sets the score from anywhere. Create one with `createRatingController()`.
|
|
336
|
+
- `debug?` (`boolean`): Logs every state change with its reason to the console, in development builds.
|
|
337
|
+
|
|
338
|
+
### State
|
|
339
|
+
|
|
340
|
+
The same state shows as data attributes on each element.
|
|
341
|
+
|
|
342
|
+
- `value` (`number | null`): The score, or `null` before anyone rates.
|
|
343
|
+
- `highlighted` (`number | null`): The score a pointer previews over the stars, or `null` while none does.
|
|
344
|
+
- `disabled` (`boolean`): Whether the rating is disabled, by itself or by a `<fieldset>`.
|
|
345
|
+
- `readOnly` (`boolean`): Whether the rating only shows its score.
|
|
346
|
+
- `required` (`boolean`): Whether a form won't submit until there's a score.
|
|
347
|
+
|
|
348
|
+
- `index` (`number`): Which star this is, from 1.
|
|
349
|
+
- `fill` (`number`): How much of this star the shown score covers, from 0 to 1. Also `--rating-fill`.
|
|
350
|
+
- `checked` (`boolean`): Whether the score ends in this star.
|
|
351
|
+
- `highlighted` (`boolean`): Whether a pointer previews a score that reaches this star.
|
|
352
|
+
- `disabled` (`boolean`): Whether the rating is disabled, by itself or by a `<fieldset>`.
|
|
353
|
+
- `readOnly` (`boolean`): Whether the rating only shows its score.
|
|
354
|
+
|
|
355
|
+
### Reasons
|
|
356
|
+
|
|
357
|
+
`event.detail.reason` says why the score changed.
|
|
358
|
+
|
|
359
|
+
- `item-press` (`MouseEvent | KeyboardEvent`): A member of a collection was chosen: a menu item, a tab, a radio or a checkbox item.
|
|
360
|
+
- `list-navigation` (`KeyboardEvent`): Arrow, Home or End keys moved the selection, typing picked an item, or Ctrl or ⌘ with A selected every item of a listbox.
|
|
361
|
+
- `reset` (`none`): A form reset.
|
|
362
|
+
- `restore` (`none`): The browser restored state, like after going back, or a saved value was read back from storage.
|
|
363
|
+
- `imperative` (`none`): A controller or `api` call, or a property set on a web component.
|
|
364
|
+
|
|
365
|
+
### Controller
|
|
366
|
+
|
|
367
|
+
The element's `api` property has the same methods. The `value` property reads and sets the score.
|
|
368
|
+
|
|
369
|
+
Every write method takes an optional `{ reason, event }`, fires the change event like a press, and returns `false` when the change is canceled.
|
|
370
|
+
|
|
371
|
+
- `getValue()` (`() => number | null`): The score, or `null` before anyone rates.
|
|
372
|
+
- `setValue(value, details?)` (`(value: number | null, details?: RatingChangeOptions | undefined) => boolean`): Sets the score, as a user would. Disabled and read-only ratings ignore it.
|
|
373
|
+
- `focus()` (`() => void`): Moves focus to the checked star, or the first one.
|
|
374
|
+
|
|
375
|
+
### Events
|
|
376
|
+
|
|
377
|
+
Events fire on their own element and don't bubble, with the new score in `event.detail.value` and the `reason` and `event` beside it. Calling `preventDefault()` cancels the change.
|
|
378
|
+
|
|
379
|
+
| Member | On | Description |
|
|
380
|
+
| --------------------------- | ----------- | --------------------------------------------------------------------- |
|
|
381
|
+
| `value` property, attribute | `ui-rating` | The score, or `null`. The attribute sets where it starts, and is live |
|
|
382
|
+
| `api` property | `ui-rating` | The [controller](#controller) |
|
|
383
|
+
| `valuechange` event | `ui-rating` | `detail: { value, reason, event, source }` |
|
|
384
|
+
|
|
385
|
+
## Accessibility
|
|
386
|
+
|
|
387
|
+
A rating is a radio group, so it follows the [WAI-ARIA radio group pattern](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) and behaves like native radios that share a name. Each star holds a `ui-rating-radio` per score it can pick, with the `radio` role, and the rating takes part in forms through `ElementInternals`, without hidden inputs. Icons inside the stars should be hidden from screen readers with `aria-hidden`, since each radio is already named. A read-only rating has the `img` role instead, named by the `getValueLabel` property.
|
|
388
|
+
|
|
389
|
+
### Keyboard
|
|
390
|
+
|
|
391
|
+
| Key | Does |
|
|
392
|
+
| ---------- | ------------------------------------------------------------------------------------------ |
|
|
393
|
+
| Tab | Moves into the rating, onto the checked star or the first one |
|
|
394
|
+
| Arrow keys | Move to the next or previous score and check it, stopping at the ends unless `loop` is set |
|
|
395
|
+
| Space | Checks the focused star, or clears it when it's checked and `deselectable` |
|
|
396
|
+
| Enter | Submits its form |
|
|
397
|
+
|
|
398
|
+
### Tested Behavior
|
|
399
|
+
|
|
400
|
+
Every line below is an automated test.
|
|
401
|
+
|
|
402
|
+
**Selection**
|
|
403
|
+
|
|
404
|
+
- The default score is checked, and the stars up to it are full.
|
|
405
|
+
- Clicking a star checks it and says why.
|
|
406
|
+
- A half star fills half of its star.
|
|
407
|
+
- Clicking the checked star clears a deselectable rating, and only that one.
|
|
408
|
+
- A change can be cancelled.
|
|
409
|
+
- A controller sets the score.
|
|
410
|
+
|
|
411
|
+
**Preview**
|
|
412
|
+
|
|
413
|
+
- A pointer over a star previews its score, and leaving shows the score again.
|
|
414
|
+
|
|
415
|
+
**Keyboard**
|
|
416
|
+
|
|
417
|
+
- Tab lands on the checked star, and the next Tab leaves.
|
|
418
|
+
- Arrow keys change the score by a step, and stop at the ends.
|
|
419
|
+
- Space on the checked star clears a deselectable rating.
|
|
420
|
+
|
|
421
|
+
**Read-only**
|
|
422
|
+
|
|
423
|
+
- A read-only rating is one image, named by its label, that shows any score.
|
|
424
|
+
|
|
425
|
+
**Forms**
|
|
426
|
+
|
|
427
|
+
- Each score submits under its rating's name.
|
|
428
|
+
- A form reset returns to the default score.
|
|
429
|
+
- A disabled rating submits nothing, and its stars can't be focused or checked.
|
|
430
|
+
|
|
431
|
+
Runs in React, Vue and web components.
|