@momentum-design/components 0.134.19 → 0.134.21
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/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/components/accordion/accordion.component.d.ts +15 -5
- package/dist/components/accordionbutton/accordionbutton.component.d.ts +14 -26
- package/dist/components/accordionbutton/accordionbutton.component.js +0 -22
- package/dist/components/accordiongroup/accordiongroup.component.d.ts +12 -16
- package/dist/components/accordiongroup/accordiongroup.component.js +0 -14
- package/dist/components/alertchip/alertchip.component.d.ts +15 -11
- package/dist/components/alertchip/alertchip.component.js +0 -7
- package/dist/components/animation/animation.component.d.ts +14 -6
- package/dist/components/animation/animation.component.js +0 -5
- package/dist/components/announcementdialog/announcementdialog.component.d.ts +18 -25
- package/dist/components/announcementdialog/announcementdialog.component.js +1 -20
- package/dist/components/appheader/appheader.component.d.ts +13 -12
- package/dist/components/appheader/appheader.component.js +0 -9
- package/dist/components/avatar/avatar.component.d.ts +14 -34
- package/dist/components/avatar/avatar.component.js +1 -31
- package/dist/components/avatarbutton/avatarbutton.component.d.ts +15 -14
- package/dist/components/avatarbutton/avatarbutton.component.js +1 -10
- package/dist/components/badge/badge.component.d.ts +16 -20
- package/dist/components/badge/badge.component.js +1 -17
- package/dist/components/banner/banner.component.d.ts +17 -17
- package/dist/components/banner/banner.component.js +1 -13
- package/dist/components/brandvisual/brandvisual.component.d.ts +15 -12
- package/dist/components/brandvisual/brandvisual.component.js +0 -10
- package/dist/components/bullet/bullet.component.d.ts +15 -16
- package/dist/components/bullet/bullet.component.js +0 -15
- package/dist/components/button/button.component.d.ts +21 -52
- package/dist/components/button/button.component.js +1 -47
- package/dist/components/buttongroup/buttongroup.component.d.ts +17 -20
- package/dist/components/buttongroup/buttongroup.component.js +0 -17
- package/dist/components/buttonlink/buttonlink.component.d.ts +19 -16
- package/dist/components/buttonlink/buttonlink.component.js +1 -11
- package/dist/components/buttonsimple/buttonsimple.component.d.ts +16 -25
- package/dist/components/buttonsimple/buttonsimple.component.js +0 -22
- package/dist/components/calendar/calendar.component.d.ts +17 -11
- package/dist/components/calendar/calendar.component.js +0 -8
- package/dist/components/card/card.component.d.ts +18 -17
- package/dist/components/card/card.component.js +0 -13
- package/dist/components/cardbutton/cardbutton.component.d.ts +20 -14
- package/dist/components/cardbutton/cardbutton.component.js +0 -9
- package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +20 -19
- package/dist/components/cardcheckbox/cardcheckbox.component.js +0 -14
- package/dist/components/cardradio/cardradio.component.d.ts +20 -20
- package/dist/components/cardradio/cardradio.component.js +0 -15
- package/dist/components/checkbox/checkbox.component.d.ts +22 -26
- package/dist/components/checkbox/checkbox.component.js +1 -22
- package/dist/components/chip/chip.component.d.ts +20 -13
- package/dist/components/chip/chip.component.js +0 -9
- package/dist/components/coachmark/coachmark.component.d.ts +22 -22
- package/dist/components/coachmark/coachmark.component.js +1 -18
- package/dist/components/combobox/combobox.component.d.ts +27 -37
- package/dist/components/combobox/combobox.component.js +1 -32
- package/dist/components/controltypeprovider/controltypeprovider.component.d.ts +19 -11
- package/dist/components/controltypeprovider/controltypeprovider.component.js +0 -10
- package/dist/components/datepicker/datepicker.component.d.ts +20 -14
- package/dist/components/datepicker/datepicker.component.js +0 -9
- package/dist/components/dialog/dialog.component.d.ts +25 -40
- package/dist/components/dialog/dialog.component.js +1 -35
- package/dist/components/divider/divider.component.d.ts +23 -25
- package/dist/components/divider/divider.component.js +0 -23
- package/dist/components/filterchip/filterchip.component.d.ts +20 -9
- package/dist/components/filterchip/filterchip.component.js +0 -5
- package/dist/components/formfieldgroup/formfieldgroup.component.d.ts +18 -19
- package/dist/components/formfieldgroup/formfieldgroup.component.js +0 -15
- package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +16 -8
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +0 -4
- package/dist/components/icon/icon.component.d.ts +16 -41
- package/dist/components/icon/icon.component.js +0 -39
- package/dist/components/iconprovider/iconprovider.component.d.ts +14 -24
- package/dist/components/iconprovider/iconprovider.component.js +0 -23
- package/dist/components/illustration/illustration.component.d.ts +16 -32
- package/dist/components/illustration/illustration.component.js +0 -30
- package/dist/components/illustrationprovider/illustrationprovider.component.d.ts +14 -24
- package/dist/components/illustrationprovider/illustrationprovider.component.js +0 -23
- package/dist/components/input/input.component.d.ts +21 -16
- package/dist/components/input/input.component.js +0 -11
- package/dist/components/inputchip/inputchip.component.d.ts +19 -13
- package/dist/components/inputchip/inputchip.component.js +0 -7
- package/dist/components/link/link.component.d.ts +18 -12
- package/dist/components/link/link.component.js +1 -9
- package/dist/components/linkbutton/linkbutton.component.d.ts +19 -12
- package/dist/components/linkbutton/linkbutton.component.js +1 -8
- package/dist/components/linksimple/linksimple.component.d.ts +17 -10
- package/dist/components/linksimple/linksimple.component.js +0 -7
- package/dist/components/list/list.component.d.ts +17 -7
- package/dist/components/list/list.component.js +0 -5
- package/dist/components/listbox/listbox.component.d.ts +21 -16
- package/dist/components/listbox/listbox.component.js +1 -11
- package/dist/components/listheader/listheader.component.d.ts +14 -6
- package/dist/components/listheader/listheader.component.js +0 -3
- package/dist/components/listitem/listitem.component.d.ts +20 -18
- package/dist/components/listitem/listitem.component.js +0 -13
- package/dist/components/marker/marker.component.d.ts +15 -16
- package/dist/components/marker/marker.component.js +0 -15
- package/dist/components/menubar/menubar.component.d.ts +12 -19
- package/dist/components/menubar/menubar.component.js +0 -19
- package/dist/components/menuitem/menuitem.component.d.ts +18 -19
- package/dist/components/menuitem/menuitem.component.js +1 -15
- package/dist/components/menuitemcheckbox/menuitemcheckbox.component.d.ts +19 -30
- package/dist/components/menuitemcheckbox/menuitemcheckbox.component.js +1 -25
- package/dist/components/menuitemradio/menuitemradio.component.d.ts +18 -31
- package/dist/components/menuitemradio/menuitemradio.component.js +1 -26
- package/dist/components/menupopover/menupopover.component.d.ts +16 -38
- package/dist/components/menupopover/menupopover.component.js +0 -34
- package/dist/components/menusection/menusection.component.d.ts +16 -12
- package/dist/components/menusection/menusection.component.js +0 -8
- package/dist/components/navmenuitem/navmenuitem.component.d.ts +16 -15
- package/dist/components/navmenuitem/navmenuitem.component.js +0 -11
- package/dist/components/optgroup/optgroup.component.d.ts +17 -7
- package/dist/components/optgroup/optgroup.component.js +1 -3
- package/dist/components/option/option.component.d.ts +17 -19
- package/dist/components/option/option.component.js +1 -15
- package/dist/components/password/password.component.d.ts +18 -17
- package/dist/components/password/password.component.js +0 -11
- package/dist/components/popover/popover.component.d.ts +20 -52
- package/dist/components/popover/popover.component.js +1 -47
- package/dist/components/presence/presence.component.d.ts +17 -10
- package/dist/components/presence/presence.component.js +1 -7
- package/dist/components/progressbar/progressbar.component.d.ts +17 -13
- package/dist/components/progressbar/progressbar.component.js +0 -9
- package/dist/components/progressspinner/progressspinner.component.d.ts +14 -19
- package/dist/components/progressspinner/progressspinner.component.js +0 -17
- package/dist/components/radio/radio.component.d.ts +19 -41
- package/dist/components/radio/radio.component.js +1 -37
- package/dist/components/radiogroup/radiogroup.component.d.ts +12 -5
- package/dist/components/radiogroup/radiogroup.component.js +0 -4
- package/dist/components/responsivesettingsprovider/responsivesettingsprovider.component.d.ts +11 -29
- package/dist/components/responsivesettingsprovider/responsivesettingsprovider.component.js +0 -29
- package/dist/components/screenreaderannouncer/screenreaderannouncer.component.d.ts +12 -51
- package/dist/components/screenreaderannouncer/screenreaderannouncer.component.js +0 -51
- package/dist/components/searchfield/searchfield.component.d.ts +16 -24
- package/dist/components/searchfield/searchfield.component.js +0 -20
- package/dist/components/searchpopover/searchpopover.component.d.ts +16 -20
- package/dist/components/searchpopover/searchpopover.component.js +0 -16
- package/dist/components/select/select.component.d.ts +23 -19
- package/dist/components/select/select.component.js +1 -14
- package/dist/components/selectlistbox/selectlistbox.component.d.ts +12 -8
- package/dist/components/selectlistbox/selectlistbox.component.js +0 -7
- package/dist/components/sidenavigation/sidenavigation.component.d.ts +21 -41
- package/dist/components/sidenavigation/sidenavigation.component.js +1 -35
- package/dist/components/skeleton/skeleton.component.d.ts +14 -15
- package/dist/components/skeleton/skeleton.component.js +0 -13
- package/dist/components/slider/slider.component.d.ts +17 -15
- package/dist/components/slider/slider.component.js +0 -11
- package/dist/components/spatialnavigationprovider/spatialnavigationprovider.component.d.ts +15 -215
- package/dist/components/spatialnavigationprovider/spatialnavigationprovider.component.js +1 -215
- package/dist/components/spinner/spinner.component.d.ts +15 -27
- package/dist/components/spinner/spinner.component.js +0 -25
- package/dist/components/staticcheckbox/staticcheckbox.component.d.ts +16 -21
- package/dist/components/staticcheckbox/staticcheckbox.component.js +0 -17
- package/dist/components/staticchip/staticchip.component.d.ts +17 -8
- package/dist/components/staticchip/staticchip.component.js +0 -5
- package/dist/components/staticradio/staticradio.component.d.ts +15 -19
- package/dist/components/staticradio/staticradio.component.js +0 -16
- package/dist/components/statictoggle/statictoggle.component.d.ts +16 -21
- package/dist/components/statictoggle/statictoggle.component.js +0 -17
- package/dist/components/stepper/stepper.component.d.ts +13 -5
- package/dist/components/stepper/stepper.component.js +0 -3
- package/dist/components/stepperconnector/stepperconnector.component.d.ts +13 -6
- package/dist/components/stepperconnector/stepperconnector.component.js +0 -4
- package/dist/components/stepperitem/stepperitem.component.d.ts +16 -14
- package/dist/components/stepperitem/stepperitem.component.js +1 -10
- package/dist/components/tab/tab.component.d.ts +20 -23
- package/dist/components/tab/tab.component.js +1 -16
- package/dist/components/tablist/tablist.component.d.ts +18 -30
- package/dist/components/tablist/tablist.component.js +0 -24
- package/dist/components/text/text.component.d.ts +12 -13
- package/dist/components/text/text.component.js +0 -12
- package/dist/components/textarea/textarea.component.d.ts +17 -39
- package/dist/components/textarea/textarea.component.js +0 -34
- package/dist/components/themeprovider/themeprovider.component.d.ts +13 -27
- package/dist/components/themeprovider/themeprovider.component.js +0 -25
- package/dist/components/timepicker/timepicker.component.d.ts +17 -19
- package/dist/components/timepicker/timepicker.component.js +0 -14
- package/dist/components/toast/toast.component.d.ts +20 -12
- package/dist/components/toast/toast.component.js +1 -7
- package/dist/components/toggle/toggle.component.d.ts +18 -24
- package/dist/components/toggle/toggle.component.js +1 -21
- package/dist/components/toggletip/toggletip.component.d.ts +18 -28
- package/dist/components/toggletip/toggletip.component.js +1 -24
- package/dist/components/tooltip/tooltip.component.d.ts +16 -16
- package/dist/components/tooltip/tooltip.component.js +0 -13
- package/dist/components/typewriter/typewriter.component.d.ts +18 -34
- package/dist/components/typewriter/typewriter.component.js +1 -31
- package/dist/components/verticaltablist/verticaltablist.component.d.ts +17 -30
- package/dist/components/verticaltablist/verticaltablist.component.js +0 -26
- package/dist/components/virtualizedlist/virtualizedlist.component.d.ts +16 -58
- package/dist/components/virtualizedlist/virtualizedlist.component.js +0 -55
- package/dist/custom-elements.json +190 -190
- package/dist/react/accordion/index.d.ts +15 -5
- package/dist/react/accordionbutton/index.d.ts +14 -26
- package/dist/react/accordionbutton/index.js +0 -22
- package/dist/react/accordiongroup/index.d.ts +12 -16
- package/dist/react/accordiongroup/index.js +0 -14
- package/dist/react/alertchip/index.d.ts +15 -11
- package/dist/react/alertchip/index.js +0 -7
- package/dist/react/animation/index.d.ts +14 -6
- package/dist/react/animation/index.js +0 -5
- package/dist/react/announcementdialog/index.d.ts +18 -25
- package/dist/react/announcementdialog/index.js +1 -20
- package/dist/react/appheader/index.d.ts +13 -12
- package/dist/react/appheader/index.js +0 -9
- package/dist/react/avatar/index.d.ts +14 -34
- package/dist/react/avatar/index.js +1 -31
- package/dist/react/avatarbutton/index.d.ts +15 -14
- package/dist/react/avatarbutton/index.js +1 -10
- package/dist/react/badge/index.d.ts +16 -20
- package/dist/react/badge/index.js +1 -17
- package/dist/react/banner/index.d.ts +17 -17
- package/dist/react/banner/index.js +1 -13
- package/dist/react/brandvisual/index.d.ts +15 -12
- package/dist/react/brandvisual/index.js +0 -10
- package/dist/react/bullet/index.d.ts +15 -16
- package/dist/react/bullet/index.js +0 -15
- package/dist/react/button/index.d.ts +21 -52
- package/dist/react/button/index.js +1 -47
- package/dist/react/buttongroup/index.d.ts +17 -20
- package/dist/react/buttongroup/index.js +0 -17
- package/dist/react/buttonlink/index.d.ts +19 -16
- package/dist/react/buttonlink/index.js +1 -11
- package/dist/react/buttonsimple/index.d.ts +16 -25
- package/dist/react/buttonsimple/index.js +0 -22
- package/dist/react/calendar/index.d.ts +17 -11
- package/dist/react/calendar/index.js +0 -8
- package/dist/react/card/index.d.ts +18 -17
- package/dist/react/card/index.js +0 -13
- package/dist/react/cardbutton/index.d.ts +20 -14
- package/dist/react/cardbutton/index.js +0 -9
- package/dist/react/cardcheckbox/index.d.ts +20 -19
- package/dist/react/cardcheckbox/index.js +0 -14
- package/dist/react/cardradio/index.d.ts +20 -20
- package/dist/react/cardradio/index.js +0 -15
- package/dist/react/checkbox/index.d.ts +22 -26
- package/dist/react/checkbox/index.js +1 -22
- package/dist/react/chip/index.d.ts +20 -13
- package/dist/react/chip/index.js +0 -9
- package/dist/react/coachmark/index.d.ts +22 -22
- package/dist/react/coachmark/index.js +1 -18
- package/dist/react/combobox/index.d.ts +27 -37
- package/dist/react/combobox/index.js +1 -32
- package/dist/react/controltypeprovider/index.d.ts +19 -11
- package/dist/react/controltypeprovider/index.js +0 -10
- package/dist/react/datepicker/index.d.ts +20 -14
- package/dist/react/datepicker/index.js +0 -9
- package/dist/react/dialog/index.d.ts +25 -40
- package/dist/react/dialog/index.js +1 -35
- package/dist/react/divider/index.d.ts +23 -25
- package/dist/react/divider/index.js +0 -23
- package/dist/react/filterchip/index.d.ts +20 -9
- package/dist/react/filterchip/index.js +0 -5
- package/dist/react/formfieldgroup/index.d.ts +18 -19
- package/dist/react/formfieldgroup/index.js +0 -15
- package/dist/react/formfieldwrapper/index.d.ts +16 -8
- package/dist/react/formfieldwrapper/index.js +0 -4
- package/dist/react/icon/index.d.ts +16 -41
- package/dist/react/icon/index.js +0 -39
- package/dist/react/iconprovider/index.d.ts +14 -24
- package/dist/react/iconprovider/index.js +0 -23
- package/dist/react/illustration/index.d.ts +16 -32
- package/dist/react/illustration/index.js +0 -30
- package/dist/react/illustrationprovider/index.d.ts +14 -24
- package/dist/react/illustrationprovider/index.js +0 -23
- package/dist/react/input/index.d.ts +21 -16
- package/dist/react/input/index.js +0 -11
- package/dist/react/inputchip/index.d.ts +19 -13
- package/dist/react/inputchip/index.js +0 -7
- package/dist/react/link/index.d.ts +18 -12
- package/dist/react/link/index.js +1 -9
- package/dist/react/linkbutton/index.d.ts +19 -12
- package/dist/react/linkbutton/index.js +1 -8
- package/dist/react/linksimple/index.d.ts +17 -10
- package/dist/react/linksimple/index.js +0 -7
- package/dist/react/list/index.d.ts +17 -7
- package/dist/react/list/index.js +0 -5
- package/dist/react/listbox/index.d.ts +21 -16
- package/dist/react/listbox/index.js +1 -11
- package/dist/react/listheader/index.d.ts +14 -6
- package/dist/react/listheader/index.js +0 -3
- package/dist/react/listitem/index.d.ts +20 -18
- package/dist/react/listitem/index.js +0 -13
- package/dist/react/marker/index.d.ts +15 -16
- package/dist/react/marker/index.js +0 -15
- package/dist/react/menubar/index.d.ts +12 -19
- package/dist/react/menubar/index.js +0 -19
- package/dist/react/menuitem/index.d.ts +18 -19
- package/dist/react/menuitem/index.js +1 -15
- package/dist/react/menuitemcheckbox/index.d.ts +19 -30
- package/dist/react/menuitemcheckbox/index.js +1 -25
- package/dist/react/menuitemradio/index.d.ts +18 -31
- package/dist/react/menuitemradio/index.js +1 -26
- package/dist/react/menupopover/index.d.ts +16 -38
- package/dist/react/menupopover/index.js +0 -34
- package/dist/react/menusection/index.d.ts +16 -12
- package/dist/react/menusection/index.js +0 -8
- package/dist/react/navmenuitem/index.d.ts +16 -15
- package/dist/react/navmenuitem/index.js +0 -11
- package/dist/react/optgroup/index.d.ts +17 -7
- package/dist/react/optgroup/index.js +1 -3
- package/dist/react/option/index.d.ts +17 -19
- package/dist/react/option/index.js +1 -15
- package/dist/react/password/index.d.ts +18 -17
- package/dist/react/password/index.js +0 -11
- package/dist/react/popover/index.d.ts +20 -52
- package/dist/react/popover/index.js +1 -47
- package/dist/react/presence/index.d.ts +17 -10
- package/dist/react/presence/index.js +1 -7
- package/dist/react/progressbar/index.d.ts +17 -13
- package/dist/react/progressbar/index.js +0 -9
- package/dist/react/progressspinner/index.d.ts +14 -19
- package/dist/react/progressspinner/index.js +0 -17
- package/dist/react/radio/index.d.ts +19 -41
- package/dist/react/radio/index.js +1 -37
- package/dist/react/radiogroup/index.d.ts +12 -5
- package/dist/react/radiogroup/index.js +0 -4
- package/dist/react/responsivesettingsprovider/index.d.ts +11 -29
- package/dist/react/responsivesettingsprovider/index.js +0 -29
- package/dist/react/screenreaderannouncer/index.d.ts +12 -51
- package/dist/react/screenreaderannouncer/index.js +0 -51
- package/dist/react/searchfield/index.d.ts +16 -24
- package/dist/react/searchfield/index.js +0 -20
- package/dist/react/searchpopover/index.d.ts +16 -20
- package/dist/react/searchpopover/index.js +0 -16
- package/dist/react/select/index.d.ts +23 -19
- package/dist/react/select/index.js +1 -14
- package/dist/react/selectlistbox/index.d.ts +12 -8
- package/dist/react/selectlistbox/index.js +0 -7
- package/dist/react/sidenavigation/index.d.ts +21 -41
- package/dist/react/sidenavigation/index.js +1 -35
- package/dist/react/skeleton/index.d.ts +14 -15
- package/dist/react/skeleton/index.js +0 -13
- package/dist/react/slider/index.d.ts +17 -15
- package/dist/react/slider/index.js +0 -11
- package/dist/react/spatialnavigationprovider/index.d.ts +15 -215
- package/dist/react/spatialnavigationprovider/index.js +1 -214
- package/dist/react/spinner/index.d.ts +15 -27
- package/dist/react/spinner/index.js +0 -25
- package/dist/react/staticcheckbox/index.d.ts +16 -21
- package/dist/react/staticcheckbox/index.js +0 -17
- package/dist/react/staticchip/index.d.ts +17 -8
- package/dist/react/staticchip/index.js +0 -5
- package/dist/react/staticradio/index.d.ts +15 -19
- package/dist/react/staticradio/index.js +0 -16
- package/dist/react/statictoggle/index.d.ts +16 -21
- package/dist/react/statictoggle/index.js +0 -17
- package/dist/react/stepper/index.d.ts +13 -5
- package/dist/react/stepper/index.js +0 -3
- package/dist/react/stepperconnector/index.d.ts +13 -6
- package/dist/react/stepperconnector/index.js +0 -4
- package/dist/react/stepperitem/index.d.ts +16 -14
- package/dist/react/stepperitem/index.js +1 -10
- package/dist/react/tab/index.d.ts +20 -23
- package/dist/react/tab/index.js +1 -16
- package/dist/react/tablist/index.d.ts +18 -30
- package/dist/react/tablist/index.js +0 -24
- package/dist/react/text/index.d.ts +12 -13
- package/dist/react/text/index.js +0 -12
- package/dist/react/textarea/index.d.ts +17 -39
- package/dist/react/textarea/index.js +0 -34
- package/dist/react/themeprovider/index.d.ts +13 -27
- package/dist/react/themeprovider/index.js +0 -25
- package/dist/react/timepicker/index.d.ts +17 -19
- package/dist/react/timepicker/index.js +0 -14
- package/dist/react/toast/index.d.ts +20 -12
- package/dist/react/toast/index.js +1 -7
- package/dist/react/toggle/index.d.ts +18 -24
- package/dist/react/toggle/index.js +1 -21
- package/dist/react/toggletip/index.d.ts +18 -28
- package/dist/react/toggletip/index.js +1 -24
- package/dist/react/tooltip/index.d.ts +16 -16
- package/dist/react/tooltip/index.js +0 -13
- package/dist/react/typewriter/index.d.ts +18 -34
- package/dist/react/typewriter/index.js +1 -31
- package/dist/react/verticaltablist/index.d.ts +17 -30
- package/dist/react/verticaltablist/index.js +0 -26
- package/dist/react/virtualizedlist/index.d.ts +16 -58
- package/dist/react/virtualizedlist/index.js +0 -55
- package/dist/utils/dom.js +1 -1
- package/package.json +1 -1
|
@@ -2,23 +2,25 @@ import { type EventName } from '@lit/react';
|
|
|
2
2
|
import Component from '../../components/listitem';
|
|
3
3
|
import type { Events } from '../../components/listitem/listitem.types';
|
|
4
4
|
/**
|
|
5
|
-
* mdc-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
5
|
+
* The listitem is a single row inside an `mdc-list`. It supports a leading control (radio, checkbox, avatar, icon), a trailing control (toggle, badge, icon), three leading text slots (primary / secondary / tertiary label), and two trailing text slots (side header, subline). The listitem is focusable, activates on click, `Enter`, or `Space` (dispatching a `click` event), and exposes life-cycle events (`enabled`, `disabled`, `created`, `destroyed`) that the surrounding list uses to track its items.
|
|
6
|
+
*
|
|
7
|
+
* Three visual variants are available: `full-width` (default), `rectangle`, and `pill`. The `active` flag is a visual-only state that bolds the primary label; the canonical active / selected state belongs to the parent list pattern.
|
|
8
|
+
*
|
|
9
|
+
* **When to use**
|
|
10
|
+
*
|
|
11
|
+
* - Use `mdc-listitem` as a row inside an `mdc-list`. Even a single listitem should be wrapped in `mdc-list` for screen-reader semantics.
|
|
12
|
+
* - Use it whenever a row needs to combine an icon / avatar / control with a label and optional trailing content.
|
|
13
|
+
*
|
|
14
|
+
* **When not to use**
|
|
15
|
+
*
|
|
16
|
+
* - Use `mdc-option` inside `mdc-listbox` / `mdc-selectlistbox` when the row represents a selectable option in a listbox pattern.
|
|
17
|
+
* - Use `mdc-menuitem`, `mdc-menuitemcheckbox`, or `mdc-menuitemradio` inside menu patterns rather than `mdc-listitem`.
|
|
18
|
+
* - Use `mdc-navmenuitem` when the row is a navigation entry inside `mdc-sidenavigation`.
|
|
19
|
+
*
|
|
18
20
|
* @tagname mdc-listitem
|
|
19
|
-
*
|
|
21
|
+
*
|
|
20
22
|
* @dependency mdc-text
|
|
21
|
-
*
|
|
23
|
+
*
|
|
22
24
|
* @slot leading-controls - slot for list item controls to appear of leading end.
|
|
23
25
|
* @slot leading-text-primary-label - slot for list item primary label.
|
|
24
26
|
* @slot leading-text-secondary-label - slot for list item secondary label.
|
|
@@ -28,7 +30,7 @@ import type { Events } from '../../components/listitem/listitem.types';
|
|
|
28
30
|
* @slot trailing-controls - slot for list item controls to appear of trailing end.
|
|
29
31
|
* @slot content - content slot can be used to override the content completely. Be aware that
|
|
30
32
|
* this will override the default content of the list item.
|
|
31
|
-
*
|
|
33
|
+
*
|
|
32
34
|
* @cssproperty --mdc-listitem-default-background-color - Allows customization of the default background color.
|
|
33
35
|
* @cssproperty --mdc-listitem-background-color-hover - Allows customization of the background color on hover.
|
|
34
36
|
* @cssproperty --mdc-listitem-background-color-active - Allows customization of the background color when pressed.
|
|
@@ -43,12 +45,12 @@ import type { Events } from '../../components/listitem/listitem.types';
|
|
|
43
45
|
* @cssproperty --mdc-listitem-cursor - Allows customization of the cursor.
|
|
44
46
|
* @cssproperty --mdc-listitem-width - Allows customization of the width of the list item.
|
|
45
47
|
* @cssproperty --mdc-listitem-height - Allows customization of the height of the list item.
|
|
46
|
-
*
|
|
48
|
+
*
|
|
47
49
|
* @csspart leading - Allows customization of the leading part.
|
|
48
50
|
* @csspart leading-text - Allows customization of the leading text part.
|
|
49
51
|
* @csspart trailing - Allows customization of the trailing part.
|
|
50
52
|
* @csspart trailing-text - Allows customization of the trailing text part.
|
|
51
|
-
*
|
|
53
|
+
*
|
|
52
54
|
* @event click - (React: onClick) This event is dispatched when the listitem is clicked.
|
|
53
55
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.
|
|
54
56
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the listitem.
|
|
@@ -3,19 +3,6 @@ import { createComponent } from '@lit/react';
|
|
|
3
3
|
import Component from '../../components/listitem';
|
|
4
4
|
import { TAG_NAME } from '../../components/listitem/listitem.constants';
|
|
5
5
|
/**
|
|
6
|
-
* mdc-listitem component is used to display a label with different types of controls.
|
|
7
|
-
* There can be three types of controls, a radio button, a checkbox on the
|
|
8
|
-
* leading side and a toggle on the trailing side.
|
|
9
|
-
* The list item can contain an avatar on the leading side and a badge on the trailing side.
|
|
10
|
-
* Additionally, the list item can contain a side header and a subline text.
|
|
11
|
-
*
|
|
12
|
-
* The leading and trailing slots can be used to display controls and text. <br/>
|
|
13
|
-
* Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>
|
|
14
|
-
* Please use mdc-list as a parent element even when there is only listitem for a11y purpose.
|
|
15
|
-
*
|
|
16
|
-
* **Note**: If a listitem contains a long text, it is recommended to create a tooltip for the listitem that displays the full text on hover.
|
|
17
|
-
* Consumers need to add a unique ID to this listitem and use that ID in the tooltip's `triggerID` attribute. We are not creating the tooltip automatically, consumers need to add `<mdc-tooltip>` element manually and associate it with the listitem using the `triggerID` attribute.
|
|
18
|
-
*
|
|
19
6
|
* @tagname mdc-listitem
|
|
20
7
|
*
|
|
21
8
|
* @dependency mdc-text
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import Component from '../../components/marker';
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Use
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
16
|
-
*
|
|
17
|
-
*
|
|
3
|
+
* The marker is a thin vertical line (0.25rem wide by default) used to draw the eye to a piece of content — typically rendered alongside a list item, card, or content block to indicate status, priority, or categorisation. Two visual variants are available: `solid` (a single coloured line) and `striped` (a line with diagonal stripes for a high-attention variant).
|
|
4
|
+
*
|
|
5
|
+
* The marker is purely presentational; its meaning must be conveyed elsewhere (label, status text, icon) because it has no accessible name.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use `mdc-marker` to draw attention to important content, signal priority, or visually categorise items inside a layout.
|
|
10
|
+
* - Use it as a decorative companion to a list item, card, or content block — never as the sole signal for the information.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Use a label, status text, or an icon when the meaning must be announced to screen readers — the marker alone is invisible to assistive technology.
|
|
15
|
+
* - Use `mdc-divider` for separating content sections rather than highlighting a single block.
|
|
16
|
+
*
|
|
18
17
|
* @tagname mdc-marker
|
|
19
|
-
*
|
|
18
|
+
*
|
|
20
19
|
* @cssproperty --mdc-marker-solid-background-color - Background color for solid variant markers.
|
|
21
20
|
* @cssproperty --mdc-marker-striped-color - Stripe color for striped variant markers.
|
|
22
21
|
* @cssproperty --mdc-marker-striped-background-color - Background color for striped variant markers.
|
|
@@ -3,21 +3,6 @@ import { createComponent } from '@lit/react';
|
|
|
3
3
|
import Component from '../../components/marker';
|
|
4
4
|
import { TAG_NAME } from '../../components/marker/marker.constants';
|
|
5
5
|
/**
|
|
6
|
-
* The Marker component displays a vertical line (0.25rem wide) used to draw attention to specific content
|
|
7
|
-
* or signify important information. It provides visual emphasis through color and pattern variations.
|
|
8
|
-
*
|
|
9
|
-
* Markers are commonly used alongside list items, cards, or content blocks to indicate status,
|
|
10
|
-
* priority, or categorization.
|
|
11
|
-
*
|
|
12
|
-
* ## When to use
|
|
13
|
-
* Use markers to highlight important content, indicate status or priority levels, or provide
|
|
14
|
-
* visual categorization in lists and layouts.
|
|
15
|
-
*
|
|
16
|
-
* ## Accessibility
|
|
17
|
-
* - Markers are purely decorative and should not convey information solely through color
|
|
18
|
-
* - Always pair markers with text labels or other indicators to convey meaning
|
|
19
|
-
* - Ensure sufficient color contrast for visibility
|
|
20
|
-
*
|
|
21
6
|
* @tagname mdc-marker
|
|
22
7
|
*
|
|
23
8
|
* @cssproperty --mdc-marker-solid-background-color - Background color for solid variant markers.
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import Component from '../../components/menubar';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* The component automatically handles ARIA attributes and follows WAI-ARIA menu design patterns.
|
|
16
|
-
* It works in conjunction with `mdc-menuitem` and `mdc-menupopover` to create accessible menu structures.
|
|
17
|
-
*
|
|
18
|
-
* **Note:** A menubar contains three types of menu items, including menuitem, menuitemradio and menuitemcheckbox. These menu items may optionally be nested in one or more group containers. Groups or items may optionally by separated with separator elements.
|
|
19
|
-
*
|
|
20
|
-
* `mdc-menubar` contains a group that wraps all its chilren passed within the default slot. This has been added to ensure the right accessibility behavior while using screen readers.
|
|
21
|
-
*
|
|
3
|
+
* `mdc-menubar` is a navigational menu container that holds a fixed list of menu items and manages keyboard navigation, focus, and the opening of nested submenus. It wraps its children in an internal group so screen readers announce the menu structure correctly.
|
|
4
|
+
*
|
|
5
|
+
* **When to use**
|
|
6
|
+
*
|
|
7
|
+
* - Use `mdc-menubar` when grouping a set of `mdc-menuitem`, `mdc-menuitemcheckbox`, or `mdc-menuitemradio` entries that may also expose nested submenus via `mdc-menupopover`.
|
|
8
|
+
* - Use it as the root for a persistent menu region (for example, the navigation tree inside `mdc-sidenavigation`).
|
|
9
|
+
*
|
|
10
|
+
* **When not to use**
|
|
11
|
+
*
|
|
12
|
+
* - Do not use `mdc-menubar` for a single overlay menu opened from a trigger button — use `mdc-menupopover` directly.
|
|
13
|
+
* - Do not use it for selection lists where users pick a value to submit with a form — use `mdc-listbox` with `mdc-option` (typically inside `mdc-select`).
|
|
14
|
+
*
|
|
22
15
|
* @tagname mdc-menubar
|
|
23
16
|
* @slot default - Contains the menu items and their associated popovers
|
|
24
17
|
*/
|
|
@@ -3,25 +3,6 @@ import { createComponent } from '@lit/react';
|
|
|
3
3
|
import Component from '../../components/menubar';
|
|
4
4
|
import { TAG_NAME } from '../../components/menubar/menubar.constants';
|
|
5
5
|
/**
|
|
6
|
-
* Menubar is a navigational menu component that provides a vertical fixed list of menu items,
|
|
7
|
-
* with support for nested submenus and keyboard navigation. It serves as a container
|
|
8
|
-
* for menu items and manages their interaction patterns, including:
|
|
9
|
-
* - Keyboard navigation (Arrow keys, Home, End)
|
|
10
|
-
* - Menu item activation (Enter/Space)
|
|
11
|
-
* - Submenu toggling (Right/Left arrow keys)
|
|
12
|
-
* - Focus management
|
|
13
|
-
* - Integration with MenuPopover for nested menus
|
|
14
|
-
*
|
|
15
|
-
* A menubar will contain a set of menu items and their associated popovers.
|
|
16
|
-
* Each menu item can have a popover for nested menus.
|
|
17
|
-
*
|
|
18
|
-
* The component automatically handles ARIA attributes and follows WAI-ARIA menu design patterns.
|
|
19
|
-
* It works in conjunction with `mdc-menuitem` and `mdc-menupopover` to create accessible menu structures.
|
|
20
|
-
*
|
|
21
|
-
* **Note:** A menubar contains three types of menu items, including menuitem, menuitemradio and menuitemcheckbox. These menu items may optionally be nested in one or more group containers. Groups or items may optionally by separated with separator elements.
|
|
22
|
-
*
|
|
23
|
-
* `mdc-menubar` contains a group that wraps all its chilren passed within the default slot. This has been added to ensure the right accessibility behavior while using screen readers.
|
|
24
|
-
*
|
|
25
6
|
* @tagname mdc-menubar
|
|
26
7
|
* @slot default - Contains the menu items and their associated popovers
|
|
27
8
|
*/
|
|
@@ -2,25 +2,24 @@ import { type EventName } from '@lit/react';
|
|
|
2
2
|
import Component from '../../components/menuitem';
|
|
3
3
|
import type { Events as EventsInherited } from '../../components/listitem/listitem.types';
|
|
4
4
|
/**
|
|
5
|
-
* menuitem
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
5
|
+
* `mdc-menuitem` is an actionable entry placed inside a `mdc-menubar` or `mdc-menupopover`. It exposes leading and trailing slots for controls and text, supports an optional arrow indicator for items that open submenus, and emits a click event when activated by mouse, `Enter`, or `Space`.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use `mdc-menuitem` for the individual entries inside a menubar or menu popover that perform an action or open a submenu.
|
|
10
|
+
* - Use it as the trigger element for a nested `mdc-menupopover` by giving it a unique `id` and pointing the popover's `triggerid` at it.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Do not use `mdc-menuitem` for toggleable state — use `mdc-menuitemcheckbox` or `mdc-menuitemradio`.
|
|
15
|
+
* - Do not use it inside `mdc-listbox`/`mdc-select` (selection lists) — use `mdc-option` there.
|
|
16
|
+
* - Do not use it as a stand-alone clickable row outside of a `menu`/`menubar`/`menupopover` context; use `mdc-listitem` for generic lists.
|
|
17
|
+
*
|
|
18
|
+
* @tagname mdc-menuitem
|
|
19
|
+
*
|
|
19
20
|
* @dependency mdc-text
|
|
20
21
|
* @dependency mdc-icon
|
|
21
|
-
*
|
|
22
|
-
* @tagname mdc-menuitem
|
|
23
|
-
*
|
|
22
|
+
*
|
|
24
23
|
* @slot leading-controls - slot for menu item controls to appear of leading end.
|
|
25
24
|
* @slot leading-text-primary-label - slot for menu item primary label.
|
|
26
25
|
* @slot leading-text-secondary-label - slot for menu item secondary label.
|
|
@@ -28,7 +27,7 @@ import type { Events as EventsInherited } from '../../components/listitem/listit
|
|
|
28
27
|
* @slot trailing-text-side-header - slot for menu item side header text.
|
|
29
28
|
* @slot trailing-text-subline - slot for menu item subline text.
|
|
30
29
|
* @slot trailing-controls - slot for menu item controls to appear of trailing end.
|
|
31
|
-
*
|
|
30
|
+
*
|
|
32
31
|
* @event click - (React: onClick) This event is dispatched when the menuitem is clicked.
|
|
33
32
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the menuitem.
|
|
34
33
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the menuitem.
|
|
@@ -37,7 +36,7 @@ import type { Events as EventsInherited } from '../../components/listitem/listit
|
|
|
37
36
|
* @event disabled - (React: onDisabled) This event is dispatched after the menuitem is disabled
|
|
38
37
|
* @event created - (React: onCreated) This event is dispatched after the menuitem is created (added to the DOM)
|
|
39
38
|
* @event destroyed - (React: onDestroyed) This event is dispatched after the menuitem is destroyed (removed from the DOM)
|
|
40
|
-
*
|
|
39
|
+
*
|
|
41
40
|
* @csspart leading - Allows customization of the leading part.
|
|
42
41
|
* @csspart leading-arrow - Allows customization of leading arrow icon.
|
|
43
42
|
* @csspart leading-text - Allows customization of the leading text part.
|
|
@@ -3,25 +3,11 @@ import { createComponent } from '@lit/react';
|
|
|
3
3
|
import Component from '../../components/menuitem';
|
|
4
4
|
import { TAG_NAME } from '../../components/menuitem/menuitem.constants';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* A menu item can contain an icon on the leading or trailing side.
|
|
8
|
-
*
|
|
9
|
-
* The leading and trailing slots can be used to display controls and text.<br/>
|
|
10
|
-
* Based on the leading/trailing slot, the position of the controls and text can be adjusted.
|
|
11
|
-
*
|
|
12
|
-
* Please use element with role=menu as a parent element even when there is only menuitem for a11y purpose.
|
|
13
|
-
* For example mdc-menupopover or mdc-menubar.
|
|
14
|
-
*
|
|
15
|
-
* Menu item has `name` and `value` attribute that can be used to identify the menu item when it is selected.
|
|
16
|
-
*
|
|
17
|
-
* **Note**: If a menuitem contains a long text, it is recommended to create a tooltip for the menuitem that displays the full text on hover.
|
|
18
|
-
* Consumers need to add a unique ID to this menuitem and use that ID in the tooltip's `triggerID` attribute. We are not creating the tooltip automatically, consumers need to add `<mdc-tooltip>` element manually and associate it with the menuitem using the `triggerID` attribute.
|
|
6
|
+
* @tagname mdc-menuitem
|
|
19
7
|
*
|
|
20
8
|
* @dependency mdc-text
|
|
21
9
|
* @dependency mdc-icon
|
|
22
10
|
*
|
|
23
|
-
* @tagname mdc-menuitem
|
|
24
|
-
*
|
|
25
11
|
* @slot leading-controls - slot for menu item controls to appear of leading end.
|
|
26
12
|
* @slot leading-text-primary-label - slot for menu item primary label.
|
|
27
13
|
* @slot leading-text-secondary-label - slot for menu item secondary label.
|
|
@@ -3,36 +3,25 @@ import Component from '../../components/menuitemcheckbox';
|
|
|
3
3
|
import type { Events } from '../../components/menuitemcheckbox/menuitemcheckbox.types';
|
|
4
4
|
import type { Events as EventsInherited } from '../../components/listitem/listitem.types';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* then the checkmark will be displayed. if not, then no indicator will be displayed.
|
|
22
|
-
*
|
|
23
|
-
* The forth options for the `indicator` is <b>none</b>, which will not display any indicator at all.
|
|
24
|
-
* It is intended to be used for customised menu items where the indicator is implemented differently.
|
|
25
|
-
* For example, you can use a custom icon or a different visual element to indicate the state of the menu item.
|
|
26
|
-
* Make sure the new indicator is accessible.
|
|
27
|
-
*
|
|
28
|
-
* If you want only one item in a group to be checked, consider using menuitemradio component.
|
|
29
|
-
*
|
|
6
|
+
* `mdc-menuitemcheckbox` is a checkable menu item used inside a `mdc-menupopover`, `mdc-menubar`, or `mdc-menusection`. Its checked state can be toggled independently of other items in the same group and is reflected to assistive technology through `aria-checked`. Visual feedback is provided by a checkbox (leading), toggle (trailing), checkmark (trailing), or no indicator at all.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Use `mdc-menuitemcheckbox` for menu entries that toggle an independent on/off setting.
|
|
11
|
+
* - Use it when several items in the same menu can be checked at the same time.
|
|
12
|
+
*
|
|
13
|
+
* **When not to use**
|
|
14
|
+
*
|
|
15
|
+
* - Use `mdc-menuitemradio` when only one item in a group may be selected.
|
|
16
|
+
* - Use `mdc-menuitem` for actions that do not have a checked state.
|
|
17
|
+
* - Do not use `mdc-checkbox` directly inside a menu; the dedicated `mdc-menuitemcheckbox` provides the correct role and keyboard behaviour.
|
|
18
|
+
*
|
|
19
|
+
* @tagname mdc-menuitemcheckbox
|
|
20
|
+
*
|
|
30
21
|
* @dependency mdc-staticcheckbox
|
|
31
22
|
* @dependency mdc-statictoggle
|
|
32
23
|
* @dependency mdc-icon
|
|
33
|
-
*
|
|
34
|
-
* @tagname mdc-menuitemcheckbox
|
|
35
|
-
*
|
|
24
|
+
*
|
|
36
25
|
* @slot leading-controls - slot for menu item checkbox controls to appear of leading end.
|
|
37
26
|
* @slot leading-text-primary-label - slot for menu item checkbox primary label.
|
|
38
27
|
* @slot leading-text-secondary-label - slot for menu item checkbox secondary label.
|
|
@@ -40,13 +29,13 @@ import type { Events as EventsInherited } from '../../components/listitem/listit
|
|
|
40
29
|
* @slot trailing-text-side-header - slot for menu item checkbox side header text.
|
|
41
30
|
* @slot trailing-text-subline - slot for menu item checkbox subline text.
|
|
42
31
|
* @slot trailing-controls - slot for menu item checkbox controls to appear of trailing end.
|
|
43
|
-
*
|
|
32
|
+
*
|
|
44
33
|
* @event change - (React: onChange) This event is dispatched when the menuitemcheckbox changes.
|
|
45
34
|
* @event click - (React: onClick) This event is dispatched when the menuitemcheckbox is clicked.
|
|
46
35
|
* @event focus - (React: onFocus) This event is dispatched when the menuitemcheckbox receives focus.
|
|
47
|
-
*
|
|
36
|
+
*
|
|
48
37
|
* @cssproperty --mdc-listitem-padding-left-and-right - Controls the padding on the left and right of the menuitemcheckbox.
|
|
49
|
-
*
|
|
38
|
+
*
|
|
50
39
|
* @csspart checkmark-icon - Allows customization of the checkmark icon.
|
|
51
40
|
* @csspart leading - Allows customization of the leading part.
|
|
52
41
|
* @csspart leading-arrow - Allows customization of leading arrow icon.
|
|
@@ -3,36 +3,12 @@ import { createComponent } from '@lit/react';
|
|
|
3
3
|
import Component from '../../components/menuitemcheckbox';
|
|
4
4
|
import { TAG_NAME } from '../../components/menuitemcheckbox/menuitemcheckbox.constants';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* There should be no focusable descendants inside this menuitemcheckbox component.
|
|
8
|
-
*
|
|
9
|
-
* The `checked` attribute indicates whether the menuitemcheckbox is checked or not.
|
|
10
|
-
*
|
|
11
|
-
* Menu item checkbox has `name` and `value` attribute that can be used to identify the menu item when it is selected.
|
|
12
|
-
*
|
|
13
|
-
* The `indicator` attribute is used to differentiate between <b>checkbox</b>, <b>checkmark</b>, <b>toggle</b> and <b>none</b>.
|
|
14
|
-
* By default, the `indicator` is set to <b>checkbox</b>.<br/>
|
|
15
|
-
*
|
|
16
|
-
* The checkbox will always be positioned on the leading side of the menuitem label and
|
|
17
|
-
* the toggle and checkmark will always be positioned on the trailing side.
|
|
18
|
-
*
|
|
19
|
-
* The checkbox will have the possible states of `true` or `false`.
|
|
20
|
-
* If the indicator is set to <b>checkmark</b> and if the `checked` attribute is set to `true`,
|
|
21
|
-
* then the checkmark will be displayed. if not, then no indicator will be displayed.
|
|
22
|
-
*
|
|
23
|
-
* The forth options for the `indicator` is <b>none</b>, which will not display any indicator at all.
|
|
24
|
-
* It is intended to be used for customised menu items where the indicator is implemented differently.
|
|
25
|
-
* For example, you can use a custom icon or a different visual element to indicate the state of the menu item.
|
|
26
|
-
* Make sure the new indicator is accessible.
|
|
27
|
-
*
|
|
28
|
-
* If you want only one item in a group to be checked, consider using menuitemradio component.
|
|
6
|
+
* @tagname mdc-menuitemcheckbox
|
|
29
7
|
*
|
|
30
8
|
* @dependency mdc-staticcheckbox
|
|
31
9
|
* @dependency mdc-statictoggle
|
|
32
10
|
* @dependency mdc-icon
|
|
33
11
|
*
|
|
34
|
-
* @tagname mdc-menuitemcheckbox
|
|
35
|
-
*
|
|
36
12
|
* @slot leading-controls - slot for menu item checkbox controls to appear of leading end.
|
|
37
13
|
* @slot leading-text-primary-label - slot for menu item checkbox primary label.
|
|
38
14
|
* @slot leading-text-secondary-label - slot for menu item checkbox secondary label.
|
|
@@ -3,38 +3,25 @@ import Component from '../../components/menuitemradio';
|
|
|
3
3
|
import type { Events } from '../../components/menuitemradio/menuitemradio.types';
|
|
4
4
|
import type { Events as EventsInherited } from '../../components/listitem/listitem.types';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* the checkmark will always be positioned on the trailing side.
|
|
21
|
-
*
|
|
22
|
-
* The radio will have the possible states of `true` or `false`.
|
|
23
|
-
* If the indicator is set to <b>checkmark</b> and if the `checked` attribute is set to `true`,
|
|
24
|
-
* then the checkmark will be displayed. if not, then no indicator will be displayed.
|
|
25
|
-
*
|
|
26
|
-
* The third options for the `indicator` is <b>none</b>, which will not display any indicator at all.
|
|
27
|
-
* It is intended to be used for customised menu items where the indicator is implemented differently.
|
|
28
|
-
* For example, you can use a custom icon or a different visual element to indicate the state of the menu item.
|
|
29
|
-
* Make sure the new indicator is accessible.
|
|
30
|
-
*
|
|
6
|
+
* `mdc-menuitemradio` is a checkable menu item used for single-selection within a group of related items. When checked, the component automatically un-checks every other `mdc-menuitemradio` that shares the same `name` inside the closest `mdc-menusection` or `mdc-menupopover`.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Use `mdc-menuitemradio` for mutually exclusive options inside a menu (only one item in the group may be selected at a time).
|
|
11
|
+
* - Group related items by giving them the same `name` and placing them inside the same `mdc-menusection` or `mdc-menupopover`.
|
|
12
|
+
*
|
|
13
|
+
* **When not to use**
|
|
14
|
+
*
|
|
15
|
+
* - Use `mdc-menuitemcheckbox` when more than one item in the group can be checked simultaneously.
|
|
16
|
+
* - Use `mdc-menuitem` for actions that do not have a selected state.
|
|
17
|
+
*
|
|
18
|
+
* @tagname mdc-menuitemradio
|
|
19
|
+
*
|
|
31
20
|
* @dependency mdc-icon
|
|
32
21
|
* @dependency mdc-staticradio
|
|
33
22
|
* @dependency mdc-text
|
|
34
23
|
* @dependency mdc-tooltip
|
|
35
|
-
*
|
|
36
|
-
* @tagname mdc-menuitemradio
|
|
37
|
-
*
|
|
24
|
+
*
|
|
38
25
|
* @slot leading-controls - slot for menu item radio controls to appear of leading end.
|
|
39
26
|
* @slot leading-text-primary-label - slot for menu item radio primary label.
|
|
40
27
|
* @slot leading-text-secondary-label - slot for menu item radio secondary label.
|
|
@@ -42,13 +29,13 @@ import type { Events as EventsInherited } from '../../components/listitem/listit
|
|
|
42
29
|
* @slot trailing-text-side-header - slot for menu item radio side header text.
|
|
43
30
|
* @slot trailing-text-subline - slot for menu item radio subline text.
|
|
44
31
|
* @slot trailing-controls - slot for menu item radio controls to appear of trailing end.
|
|
45
|
-
*
|
|
32
|
+
*
|
|
46
33
|
* @event change - (React: onChange) This event is dispatched when the menuitemradio changes.
|
|
47
34
|
* @event click - (React: onClick) This event is dispatched when the menuitemradio is clicked.
|
|
48
35
|
* @event focus - (React: onFocus) This event is dispatched when the menuitemradio receives focus.
|
|
49
|
-
*
|
|
36
|
+
*
|
|
50
37
|
* @cssproperty --mdc-listitem-padding-left-and-right - Controls the padding on the left and right of the menuitemradio.
|
|
51
|
-
*
|
|
38
|
+
*
|
|
52
39
|
* @csspart checkmark-icon - Allows customization of the checkmark icon.
|
|
53
40
|
* @csspart leading - Allows customization of the leading part.
|
|
54
41
|
* @csspart leading-arrow - Allows customization of leading arrow icon.
|
|
@@ -3,38 +3,13 @@ import { createComponent } from '@lit/react';
|
|
|
3
3
|
import Component from '../../components/menuitemradio';
|
|
4
4
|
import { TAG_NAME } from '../../components/menuitemradio/menuitemradio.constants';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* A menuitemradio should be checked only one at a time. <br/>
|
|
8
|
-
* There should be no focusable descendants inside this menuitemradio component.
|
|
9
|
-
*
|
|
10
|
-
* The `checked` menuitemradio attribute is used to indicate that the menuitemradio is checked or not.
|
|
11
|
-
*
|
|
12
|
-
* Menu item radio has `name` and `value` attribute that can be used to identify the menu item when it is selected.
|
|
13
|
-
*
|
|
14
|
-
* If you want more than one item in a group to be checked, consider using menuitemcheckbox component.
|
|
15
|
-
*
|
|
16
|
-
* The `indicator` attribute is used to differentiate between <b>radio</b>, <b>checkmark</b> and <b>none</b>.
|
|
17
|
-
* By default, the `indicator` is set to <b>radio</b>.<br/>
|
|
18
|
-
*
|
|
19
|
-
* The checkbox will always be positioned on the leading side of the menuitem label and
|
|
20
|
-
* the checkmark will always be positioned on the trailing side.
|
|
21
|
-
*
|
|
22
|
-
* The radio will have the possible states of `true` or `false`.
|
|
23
|
-
* If the indicator is set to <b>checkmark</b> and if the `checked` attribute is set to `true`,
|
|
24
|
-
* then the checkmark will be displayed. if not, then no indicator will be displayed.
|
|
25
|
-
*
|
|
26
|
-
* The third options for the `indicator` is <b>none</b>, which will not display any indicator at all.
|
|
27
|
-
* It is intended to be used for customised menu items where the indicator is implemented differently.
|
|
28
|
-
* For example, you can use a custom icon or a different visual element to indicate the state of the menu item.
|
|
29
|
-
* Make sure the new indicator is accessible.
|
|
6
|
+
* @tagname mdc-menuitemradio
|
|
30
7
|
*
|
|
31
8
|
* @dependency mdc-icon
|
|
32
9
|
* @dependency mdc-staticradio
|
|
33
10
|
* @dependency mdc-text
|
|
34
11
|
* @dependency mdc-tooltip
|
|
35
12
|
*
|
|
36
|
-
* @tagname mdc-menuitemradio
|
|
37
|
-
*
|
|
38
13
|
* @slot leading-controls - slot for menu item radio controls to appear of leading end.
|
|
39
14
|
* @slot leading-text-primary-label - slot for menu item radio primary label.
|
|
40
15
|
* @slot leading-text-secondary-label - slot for menu item radio secondary label.
|
|
@@ -3,49 +3,27 @@ import Component from '../../components/menupopover';
|
|
|
3
3
|
import type { Events } from '../../components/menupopover/menupopover.types';
|
|
4
4
|
import type { Events as EventsInherited } from '../../components/popover/popover.types';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* to work as a submenu (right-aligned, shows on hover).
|
|
19
|
-
*
|
|
20
|
-
* The orientation of the menu popover is always set to `vertical`.
|
|
21
|
-
*
|
|
22
|
-
* Submenu opens when:
|
|
23
|
-
* - Clicked on a menu item with a submenu
|
|
24
|
-
* - Enter or Space key pressed on a menu item with a submenu
|
|
25
|
-
*
|
|
26
|
-
* Menu closes completely (with all sub menus) when:
|
|
27
|
-
* - A menu item is clicked that does not have a submenu
|
|
28
|
-
* - Enter key pressed on a menu item (not a submenu trigger), menu item radio or menu item checkbox
|
|
29
|
-
* - Click outside the menu popover (on the backdrop)
|
|
30
|
-
*
|
|
31
|
-
* Close submenus when:
|
|
32
|
-
* - Esc key pressed, only the current submenu closed
|
|
33
|
-
* - Arrow Left key pressed, only the current submenu closed
|
|
34
|
-
* - Open another submenu with Click, Enter or Space key,
|
|
35
|
-
* closes recursively all submenus until the selected item's submenu
|
|
36
|
-
*
|
|
37
|
-
* Menu does not close when:
|
|
38
|
-
* - Space key pressed on a menu item radio or menu item checkbox
|
|
39
|
-
*
|
|
6
|
+
* `mdc-menupopover` is a floating overlay that hosts menu items (`mdc-menuitem`, `mdc-menuitemcheckbox`, `mdc-menuitemradio`) optionally grouped in `mdc-menusection`. It is anchored to a trigger element via the `triggerid` attribute and provides keyboard navigation, focus trapping, dismissal, and automatic submenu behaviour when nested inside another `mdc-menupopover` or used with `mdc-menubar`.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Use `mdc-menupopover` to surface a menu of actions from a trigger button or menu item.
|
|
11
|
+
* - Use it as a submenu by nesting it under another `mdc-menupopover` or by anchoring it to an `mdc-menuitem` inside an `mdc-menubar`.
|
|
12
|
+
*
|
|
13
|
+
* **When not to use**
|
|
14
|
+
*
|
|
15
|
+
* - Do not use `mdc-menupopover` for generic non-menu overlays — use `mdc-popover` for those.
|
|
16
|
+
* - Do not use it to host a single non-menu item or arbitrary form controls; the contents should be menu items.
|
|
17
|
+
*
|
|
40
18
|
* @tagname mdc-menupopover
|
|
41
|
-
*
|
|
19
|
+
*
|
|
42
20
|
* @slot - Default slot for the menu popover content
|
|
43
|
-
*
|
|
21
|
+
*
|
|
44
22
|
* @event change - (React: onChange) This event is dispatched when a `menuitemcheckbox`, or `menuitemradio` changes.
|
|
45
23
|
* @event action - (React: onAction) This event is dispatched when a menuItem selected and the menu closes.
|
|
46
|
-
*
|
|
24
|
+
*
|
|
47
25
|
* @slot default - Contains the menu items to be displayed in the popover
|
|
48
|
-
*
|
|
26
|
+
*
|
|
49
27
|
* @csspart popover-close - The close button of the menupopover.
|
|
50
28
|
* @csspart popover-content - The content of the menupopover.
|
|
51
29
|
* @csspart popover-hover-bridge - The hover bridge of the menupopover.
|