@momentum-design/components 0.134.20 → 0.134.22
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 +481 -458
- package/dist/browser/index.js.map +4 -4
- 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 +25 -14
- package/dist/components/datepicker/datepicker.component.js +96 -35
- 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 +2 -20
- 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 +17 -39
- package/dist/components/menupopover/menupopover.component.js +4 -38
- 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 +47 -16
- package/dist/components/navmenuitem/navmenuitem.component.js +146 -20
- package/dist/components/navmenuitem/navmenuitem.constants.d.ts +1 -0
- package/dist/components/navmenuitem/navmenuitem.constants.js +1 -0
- package/dist/components/navmenuitem/navmenuitem.styles.js +16 -5
- 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 +64 -44
- package/dist/components/sidenavigation/sidenavigation.component.js +241 -43
- package/dist/components/sidenavigation/sidenavigation.constants.d.ts +6 -1
- package/dist/components/sidenavigation/sidenavigation.constants.js +6 -1
- package/dist/components/sidenavigation/sidenavigation.context.d.ts +6 -1
- package/dist/components/sidenavigation/sidenavigation.context.js +36 -11
- package/dist/components/sidenavigation/sidenavigation.types.d.ts +3 -2
- package/dist/components/sidenavigation/sidenavigationbase.d.ts +8 -0
- package/dist/components/sidenavigation/sidenavigationbase.js +7 -0
- 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 +334 -191
- package/dist/models/provider/provider.component.d.ts +2 -2
- package/dist/models/provider/provider.component.js +13 -0
- 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 +19 -16
- package/dist/react/navmenuitem/index.js +3 -12
- 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/package.json +1 -1
|
@@ -22,57 +22,6 @@ import styles from './screenreaderannouncer.styles';
|
|
|
22
22
|
const identityRefCount = new Map();
|
|
23
23
|
// End AI-Assisted
|
|
24
24
|
/**
|
|
25
|
-
* `mdc-screenreaderannouncer` can be used to announce messages with the screen reader.
|
|
26
|
-
*
|
|
27
|
-
* To make an announcement set `announcement` attribute on the `mdc-screenreaderannouncer` element.
|
|
28
|
-
*
|
|
29
|
-
* Consumers can also use the public `announce` function to trigger announcements programmatically
|
|
30
|
-
* by passing an options object where `announcement` is required and all other fields are optional.
|
|
31
|
-
*
|
|
32
|
-
* **Internal logic**
|
|
33
|
-
*
|
|
34
|
-
* When the screenreader announcer is connected to the DOM, if the `identity` attribute is not
|
|
35
|
-
* provided, it is set to `mdc-screenreaderannouncer-identity` and a `<div>` element with this id is created
|
|
36
|
-
* in the DOM. If the `identity` attribute is provided, the identity element is used and no new element
|
|
37
|
-
* is created in the DOM.
|
|
38
|
-
*
|
|
39
|
-
* If you provide a custom `identity`, you must ensure that the element exists and is visually hidden.
|
|
40
|
-
*
|
|
41
|
-
* Example CSS:
|
|
42
|
-
*
|
|
43
|
-
* ```css
|
|
44
|
-
* #your-custom-announcer-id {
|
|
45
|
-
* clip: rect(0 0 0 0);
|
|
46
|
-
* clip-path: inset(50%);
|
|
47
|
-
* height: 1px;
|
|
48
|
-
* overflow: hidden;
|
|
49
|
-
* position: absolute;
|
|
50
|
-
* white-space: nowrap;
|
|
51
|
-
* width: 1px;
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* When the `announcement` attribute is set, the screenreader announcer will create a `<div>` element with
|
|
56
|
-
* `aria-live` attribute set to the value of `data-aria-live` attribute and append it to the `identity` element.
|
|
57
|
-
* After delay of `delay` milliseconds, a `<p>` element with the announcement text is appended to the `<div>` element.
|
|
58
|
-
*
|
|
59
|
-
* The announcement `<div>` element is removed from the DOM after `timeout` milliseconds.
|
|
60
|
-
*
|
|
61
|
-
* When the screen announcer component is disconnected from the DOM, all the timeouts are cleared and
|
|
62
|
-
* all the announcement elements added are removed from the DOM and timeouts cleared.
|
|
63
|
-
*
|
|
64
|
-
* **Note**
|
|
65
|
-
* 1. The default delay of 150 miliseconds is used as we dynamically generate the
|
|
66
|
-
* aria-live region in the DOM and add the announcement text to it.
|
|
67
|
-
* 2. If multiple `mdc-screenreaderannouncer` instances use the same `identity`, `data-aria-live`
|
|
68
|
-
* for that identity is effectively determined by the first instance that creates announcements for it.
|
|
69
|
-
* Changing `data-aria-live` in later instances for the same identity will not update already-created
|
|
70
|
-
* live-region containers.
|
|
71
|
-
* 3. If no `identity` is provided, all the screen reader components will create and use only one
|
|
72
|
-
* `<div>` element with id `mdc-screenreaderannouncer-identity` in the DOM.
|
|
73
|
-
*
|
|
74
|
-
* Reference: https://patrickhlauke.github.io/aria/tests/live-regions/
|
|
75
|
-
*
|
|
76
25
|
* @tagname mdc-screenreaderannouncer
|
|
77
26
|
*/
|
|
78
27
|
class ScreenreaderAnnouncer extends Component {
|
|
@@ -2,35 +2,27 @@ import { CSSResult, PropertyValueMap } from 'lit';
|
|
|
2
2
|
import Input from '../input/input.component';
|
|
3
3
|
declare const Searchfield_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/ControlTypeMixin").ControlTypeMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyDownHandledMixin").KeyDownHandledMixinInterface> & typeof Input;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* -
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* **Accessibility:**
|
|
19
|
-
*
|
|
20
|
-
* NOTE: this component should not be used in combination with a Popover or Listbox component.
|
|
21
|
-
* Search results should be shown permanently on the page if using this component.
|
|
22
|
-
*
|
|
23
|
-
* For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.
|
|
24
|
-
*
|
|
5
|
+
* The searchfield is a single-line text input tailored for search. It renders a leading search icon, a trailing clear button, and an inline area in front of the text caret where chip filters can be slotted. Chips behave like single characters in the input flow: they share the cursor with the text and can be focused, navigated, and removed with the keyboard.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use it whenever the user types a query to search a list, table, or other content rendered on the same page.
|
|
10
|
+
* - Use it with slotted chip filters (`mdc-inputchip`, `mdc-chip`, `mdc-alertchip`) when the search query is refined by removable filter tokens that should appear inline with the input text.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Do not use it for a search that opens a popover / listbox of suggestions or results. Use `mdc-searchpopover` instead — pairing this component with a Popover or Listbox is not supported.
|
|
15
|
+
* - Do not use it for free-form text entry that is not a search query — use `mdc-input` (or `mdc-textarea`) directly.
|
|
16
|
+
*
|
|
25
17
|
* @tagname mdc-searchfield
|
|
26
|
-
*
|
|
18
|
+
*
|
|
27
19
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
28
20
|
* @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).
|
|
29
21
|
* @event focus - (React: onFocus) This event is dispatched when the input receives focus.
|
|
30
22
|
* @event blur - (React: onBlur) This event is dispatched when the input loses focus.
|
|
31
23
|
* @event clear - (React: onClear) This event is dispatched when the input text is cleared.
|
|
32
24
|
* @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In `uncontrolled` mode (default) the chip is removed from the DOM automatically; in `controlled` mode only the event is fired and the consumer is responsible for removing the chip.
|
|
33
|
-
*
|
|
25
|
+
*
|
|
34
26
|
* @slot filters - Slot for chip filters rendered inline with the input text
|
|
35
27
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
36
28
|
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
|
@@ -40,7 +32,7 @@ declare const Searchfield_base: import("../../utils/mixins/index.types").Constru
|
|
|
40
32
|
* @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
|
|
41
33
|
* @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
|
|
42
34
|
* @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.
|
|
43
|
-
*
|
|
35
|
+
*
|
|
44
36
|
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
45
37
|
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
46
38
|
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
@@ -56,7 +48,7 @@ declare const Searchfield_base: import("../../utils/mixins/index.types").Constru
|
|
|
56
48
|
* @cssproperty --mdc-input-support-text-color - Text color for the help text
|
|
57
49
|
* @cssproperty --mdc-input-selection-text-color - Text color for the selected text
|
|
58
50
|
* @cssproperty --mdc-input-selection-background-color - Background color for the selected text
|
|
59
|
-
*
|
|
51
|
+
*
|
|
60
52
|
* @csspart label - The label element.
|
|
61
53
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
62
54
|
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
@@ -19,26 +19,6 @@ import { TAG_NAME as INPUT_CHIP_TAG } from '../inputchip/inputchip.constants';
|
|
|
19
19
|
import styles from './searchfield.styles';
|
|
20
20
|
import { CHIP_SELECTOR, DEFAULTS } from './searchfield.constants';
|
|
21
21
|
/**
|
|
22
|
-
* `mdc-searchfield` component is used as an input field for search functionality.
|
|
23
|
-
*
|
|
24
|
-
* It supports any interactable Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)
|
|
25
|
-
* Chips are rendered inline with the search input text, behaving like single characters.
|
|
26
|
-
* Users can traverse the cursor between chips and text using arrow keys,
|
|
27
|
-
* and remove a chip by pressing Backspace when the cursor is adjacent to it.
|
|
28
|
-
*
|
|
29
|
-
* This component is built by extending the `mdc-input` component.
|
|
30
|
-
*
|
|
31
|
-
* Searchfield supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
|
|
32
|
-
* - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
|
|
33
|
-
* - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
|
|
34
|
-
*
|
|
35
|
-
* **Accessibility:**
|
|
36
|
-
*
|
|
37
|
-
* NOTE: this component should not be used in combination with a Popover or Listbox component.
|
|
38
|
-
* Search results should be shown permanently on the page if using this component.
|
|
39
|
-
*
|
|
40
|
-
* For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.
|
|
41
|
-
*
|
|
42
22
|
* @tagname mdc-searchfield
|
|
43
23
|
*
|
|
44
24
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
@@ -2,24 +2,20 @@ import { CSSResult } from 'lit';
|
|
|
2
2
|
import Searchfield from '../searchfield/searchfield.component';
|
|
3
3
|
import type { Placement } from './searchpopover.types';
|
|
4
4
|
/**
|
|
5
|
-
* `mdc-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* Searchpopover supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
|
|
18
|
-
* - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
|
|
19
|
-
* - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
|
|
20
|
-
*
|
|
5
|
+
* The searchpopover is a widget built on top of `mdc-searchfield` that adds a connected `mdc-popover` below the input. The input is exposed as a combobox that owns the popover, so assistive technologies can announce when the popover is open and which content it controls. It is intended for searches whose results are individually actionable (for example navigating to a different URL).
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use it when search results or suggestions appear in a popover anchored to the input and each result performs its own action.
|
|
10
|
+
* - Use it together with chip filters (`mdc-inputchip`, `mdc-chip`, `mdc-alertchip`) when the search query is refined by removable tokens.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Do not use it when search results render inline on the page — use `mdc-searchfield` instead.
|
|
15
|
+
* - Do not use it when the popover is a list of options being filtered down by the input — use `mdc-combobox` instead.
|
|
16
|
+
*
|
|
21
17
|
* @tagname mdc-searchpopover
|
|
22
|
-
*
|
|
18
|
+
*
|
|
23
19
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
24
20
|
* @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).
|
|
25
21
|
* @event focus - (React: onFocus) This event is dispatched when the input receives focus.
|
|
@@ -30,7 +26,7 @@ import type { Placement } from './searchpopover.types';
|
|
|
30
26
|
* In **uncontrolled** mode (default), the chip is removed from the DOM automatically.
|
|
31
27
|
* @event shown - (React: onShown) This event is dispatched when the popover is shown
|
|
32
28
|
* @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
|
|
33
|
-
*
|
|
29
|
+
*
|
|
34
30
|
* @slot default - Default slot (=children) for the popover content
|
|
35
31
|
* @slot filters - Slot for input chips
|
|
36
32
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
@@ -41,7 +37,7 @@ import type { Placement } from './searchpopover.types';
|
|
|
41
37
|
* @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
|
|
42
38
|
* @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
|
|
43
39
|
* @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.
|
|
44
|
-
*
|
|
40
|
+
*
|
|
45
41
|
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
46
42
|
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
47
43
|
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
@@ -60,7 +56,7 @@ import type { Placement } from './searchpopover.types';
|
|
|
60
56
|
* @cssproperty --mdc-searchpopover-width - Width of the searchpopover component
|
|
61
57
|
* @cssproperty --mdc-searchpopover-popover-width - Width of the popover within the searchpopover component
|
|
62
58
|
* @cssproperty --mdc-searchpopover-popover-height - Height of the popover within the searchpopover component
|
|
63
|
-
*
|
|
59
|
+
*
|
|
64
60
|
* @csspart label - The label element.
|
|
65
61
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
66
62
|
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
@@ -19,22 +19,6 @@ import { ROLE } from '../../utils/roles';
|
|
|
19
19
|
import styles from './searchpopover.styles';
|
|
20
20
|
import { DEFAULTS, TRIGGER_ID, POPOVER_ID } from './searchpopover.constants';
|
|
21
21
|
/**
|
|
22
|
-
* `mdc-searchpopover` widget is a combination of the Searchfield and Popover components, connected to ensure
|
|
23
|
-
* proper accessibility. This component should be used when search results or suggestions need to be displayed
|
|
24
|
-
* in a popover below the search input field, where the search results hold individual actions like navigating to a
|
|
25
|
-
* a different url etc.
|
|
26
|
-
*
|
|
27
|
-
* - Don't use this when search results are displayed inline on the page -\> use Searchfield component instead.
|
|
28
|
-
* - Don't use this when a list of options is filtered based on the search input -\> use Combobox component instead.
|
|
29
|
-
*
|
|
30
|
-
* It supports any Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)
|
|
31
|
-
*
|
|
32
|
-
* This component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.
|
|
33
|
-
*
|
|
34
|
-
* Searchpopover supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
|
|
35
|
-
* - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
|
|
36
|
-
* - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
|
|
37
|
-
*
|
|
38
22
|
* @tagname mdc-searchpopover
|
|
39
23
|
*
|
|
40
24
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
@@ -7,39 +7,43 @@ import type { PopoverStrategy } from '../popover/popover.types';
|
|
|
7
7
|
import type { Placement } from './select.types';
|
|
8
8
|
declare const Select_base: import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/ListNavigationMixin").ListNavigationMixinInterface & import("../../utils/mixins/KeyToActionMixin").KeyToActionInterface & import("../../utils/mixins/KeyDownHandledMixin").KeyDownHandledMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyToActionMixin").KeyToActionInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/lifecycle/CaptureDestroyEventForChildElement").CaptureDestroyEventForChildElementInterface> & import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
10
|
+
* The select is a form-associated dropdown control that lets the user pick a single value from a predefined list of options. It exposes the standard form field surface (label, help text, validation, required indicator, info toggletip) and renders a popover-backed listbox built from slotted `mdc-option` and `mdc-optgroup` children.
|
|
11
|
+
*
|
|
12
|
+
* The component is form-associated and participates in native form submission, validation, and reset.
|
|
13
|
+
*
|
|
14
|
+
* **When to use**
|
|
15
|
+
*
|
|
16
|
+
* - Use `mdc-select` when the user must pick a single value from a fixed list and typing-to-filter is not required.
|
|
17
|
+
* - Use it inside a form when you want native form submission and validation for the selected value.
|
|
18
|
+
* - Use it when options are grouped (`mdc-optgroup`) and an optional `mdc-divider` is needed between groups.
|
|
19
|
+
*
|
|
20
|
+
* **When not to use**
|
|
21
|
+
*
|
|
22
|
+
* - Use `mdc-combobox` when the user benefits from typing to filter the list.
|
|
23
|
+
* - Use `mdc-radiogroup` when there are only a handful of options and they should all be visible at once.
|
|
24
|
+
* - Use `mdc-input` when free-form text is the goal.
|
|
25
|
+
* - Use `mdc-searchfield` when the user is searching content rather than picking a single value.
|
|
26
|
+
*
|
|
27
|
+
* @tagname mdc-select
|
|
28
|
+
*
|
|
23
29
|
* @dependency mdc-button
|
|
24
30
|
* @dependency mdc-icon
|
|
25
31
|
* @dependency mdc-popover
|
|
26
32
|
* @dependency mdc-text
|
|
27
33
|
* @dependency mdc-toggletip
|
|
28
|
-
*
|
|
29
|
-
* @tagname mdc-select
|
|
30
|
-
*
|
|
34
|
+
*
|
|
31
35
|
* @event click - (React: onClick) This event is dispatched when the select is clicked.
|
|
32
36
|
* @event change - (React: onChange) This event is dispatched when the select is changed.
|
|
33
37
|
* @event input - (React: onInput) This event is dispatched when the select is changed.
|
|
34
38
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the select.
|
|
35
39
|
* @event focus - (React: onFocus) This event is dispatched when the select receives focus.
|
|
36
|
-
*
|
|
40
|
+
*
|
|
37
41
|
* @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
|
|
38
42
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
39
43
|
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
|
40
44
|
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
|
41
45
|
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
|
42
|
-
*
|
|
46
|
+
*
|
|
43
47
|
* @csspart label - The label element.
|
|
44
48
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
45
49
|
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
@@ -48,7 +52,7 @@ declare const Select_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
48
52
|
* @csspart help-text - The helper/validation text element.
|
|
49
53
|
* @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.
|
|
50
54
|
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
51
|
-
*
|
|
55
|
+
*
|
|
52
56
|
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
53
57
|
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
54
58
|
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
@@ -28,18 +28,7 @@ import { ACTIONS, KeyToActionMixin, NAV_MODES } from '../../utils/mixins/KeyToAc
|
|
|
28
28
|
import { ARROW_ICON, DEFAULTS, LISTBOX_ID, TRIGGER_ID } from './select.constants';
|
|
29
29
|
import styles from './select.styles';
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
* It is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.
|
|
33
|
-
* Optional: Add `mdc-divider` after each option group (`mdc-optgroup`) to separate groups visually.
|
|
34
|
-
*
|
|
35
|
-
* Every mdc-option should have a `value` attribute set to ensure proper form submission.
|
|
36
|
-
*
|
|
37
|
-
* To set a default option, use the `selected` attribute on the `mdc-option` element.
|
|
38
|
-
* You can also set the `value` attribute on the `mdc-select` element to match the value of the desired option. The component will select the corresponding option automatically.
|
|
39
|
-
*
|
|
40
|
-
* **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-select` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.
|
|
41
|
-
*
|
|
42
|
-
* If you need to use `mdc-tooltip` with any options, make sure to place the tooltip component outside the `mdc-select` element.
|
|
31
|
+
* @tagname mdc-select
|
|
43
32
|
*
|
|
44
33
|
* @dependency mdc-button
|
|
45
34
|
* @dependency mdc-icon
|
|
@@ -47,8 +36,6 @@ import styles from './select.styles';
|
|
|
47
36
|
* @dependency mdc-text
|
|
48
37
|
* @dependency mdc-toggletip
|
|
49
38
|
*
|
|
50
|
-
* @tagname mdc-select
|
|
51
|
-
*
|
|
52
39
|
* @event click - (React: onClick) This event is dispatched when the select is clicked.
|
|
53
40
|
* @event change - (React: onChange) This event is dispatched when the select is changed.
|
|
54
41
|
* @event input - (React: onInput) This event is dispatched when the select is changed.
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Component } from '../../models';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
3
|
+
* `mdc-selectlistbox` is a light-DOM wrapper that groups `mdc-option` (and `mdc-optgroup`) children and exposes them with `role="listbox"` so screen readers announce the option list correctly. It is required as a slotted child of `mdc-select` and `mdc-combobox`.
|
|
4
|
+
*
|
|
5
|
+
* **When to use**
|
|
6
|
+
*
|
|
7
|
+
* - Use `mdc-selectlistbox` as the direct child of `mdc-select` or `mdc-combobox`, wrapping the slotted `mdc-option` and `mdc-optgroup` elements.
|
|
8
|
+
*
|
|
9
|
+
* **When not to use**
|
|
10
|
+
*
|
|
11
|
+
* - Do not use it outside `mdc-select` or `mdc-combobox`. For a standalone listbox UI, use the dedicated `mdc-listbox` component instead.
|
|
12
|
+
* - Do not place `mdc-option` directly inside `mdc-select` or `mdc-combobox` without this wrapper — the listbox role and screen-reader semantics would be missing.
|
|
13
|
+
*
|
|
10
14
|
* @tagname mdc-selectlistbox
|
|
11
|
-
*
|
|
15
|
+
*
|
|
12
16
|
* @slot default - This is a default/unnamed slot, which can be used to insert mdc-option components.
|
|
13
17
|
*/
|
|
14
18
|
declare class Selectlistbox extends Component {
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { Component } from '../../models';
|
|
2
2
|
import { ROLE } from '../../utils/roles';
|
|
3
3
|
/**
|
|
4
|
-
* Selectlistbox component as Light DOM component to act as a simple wrapper
|
|
5
|
-
* for mdc-option components to ensure accessibility and proper role assignment.
|
|
6
|
-
*
|
|
7
|
-
* Once [ariaOwnsElements](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/ariaOwnsElements) is supported in browsers, this component can be removed
|
|
8
|
-
* and mdc-option can be used directly in the select component with a listbox in a different
|
|
9
|
-
* shadow root and aria-owns attribute to connect them.
|
|
10
|
-
*
|
|
11
4
|
* @tagname mdc-selectlistbox
|
|
12
5
|
*
|
|
13
6
|
* @slot default - This is a default/unnamed slot, which can be used to insert mdc-option components.
|
|
@@ -1,57 +1,38 @@
|
|
|
1
1
|
import { CSSResult, PropertyValues } from 'lit';
|
|
2
|
-
import {
|
|
3
|
-
import type { SideNavigationVariant } from './sidenavigation.types';
|
|
2
|
+
import type { SideNavigationSubmenuType, SideNavigationVariant } from './sidenavigation.types';
|
|
4
3
|
import SideNavigationContext from './sidenavigation.context';
|
|
4
|
+
import SideNavigationBase from './sidenavigationbase';
|
|
5
|
+
declare const SideNavigation_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyToActionMixin").KeyToActionInterface> & typeof SideNavigationBase;
|
|
5
6
|
/**
|
|
6
|
-
* The
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* - Set the `triggerId` on the corresponding `mdc-menupopover` to match the navmenuitem's `id`
|
|
23
|
-
* - Set `parent-nav-tooltip-text` with appropriate text that will display when a child menu item
|
|
24
|
-
* inside the nested menupopover is active, conveying which submenu item is currently selected
|
|
25
|
-
*
|
|
26
|
-
* 3. **Actionable navmenuitem (no submenu)**:
|
|
27
|
-
* - Performs an action such as navigation or alert trigger
|
|
28
|
-
* - Set `disable-aria-current="true"` to maintain visual active state without navigation behavior
|
|
29
|
-
*
|
|
30
|
-
* ### Recommendations:
|
|
31
|
-
* - Use `mdc-text` for section headers
|
|
32
|
-
* - Use `mdc-divider` with the attribute `variant="gradient"` for section dividers
|
|
33
|
-
* - For the brand logo, use an informative icon. Refer to `Momentum Informative Icons`
|
|
34
|
-
*
|
|
35
|
-
* #### Accessibility Notes:
|
|
36
|
-
* - Always provide meaningful `aria-label` attributes for both `mdc-navmenuitem` and `mdc-menubar`
|
|
37
|
-
* to ensure screen reader support
|
|
38
|
-
* - Set `grabber-btn-aria-label` to provide accessible labels for the expand/collapse grabber button
|
|
39
|
-
*
|
|
7
|
+
* The side navigation is a vertically stacked navigation landmark, typically used as a persistent or collapsible sidebar. It supports five layout variants, toggleable expand/collapse behaviour, an optional brand logo, an optional footer text, and acts as a context provider for nested `mdc-menubar` and `mdc-navmenuitem` elements.
|
|
8
|
+
*
|
|
9
|
+
* **When to use**
|
|
10
|
+
*
|
|
11
|
+
* - Use `mdc-sidenavigation` for primary, persistent in-app navigation rendered alongside the main content area.
|
|
12
|
+
* - Use it when you need an expandable/collapsible sidebar with icon-only and icon-plus-label modes.
|
|
13
|
+
* - Use it as the host of nested `mdc-menubar` and `mdc-navmenuitem` content (with optional submenus via `mdc-menupopover`).
|
|
14
|
+
*
|
|
15
|
+
* **When not to use**
|
|
16
|
+
*
|
|
17
|
+
* - Use `mdc-appheader` for top-of-page navigation.
|
|
18
|
+
* - Use `mdc-menubar` on its own when no expand/collapse, branding, or fixed footer area is needed.
|
|
19
|
+
* - Use `mdc-tablist` when navigation is scoped to switching between sibling views inside a single page.
|
|
20
|
+
*
|
|
21
|
+
* @tagname mdc-sidenavigation
|
|
22
|
+
*
|
|
40
23
|
* @dependency mdc-text
|
|
41
24
|
* @dependency mdc-button
|
|
42
25
|
* @dependency mdc-divider
|
|
43
26
|
* @dependency mdc-menubar
|
|
44
|
-
*
|
|
27
|
+
*
|
|
45
28
|
* @event activechange - (React: onActiveChange) Dispatched when the active state of the navmenuitem changes.
|
|
46
|
-
*
|
|
47
|
-
* @tagname mdc-sidenavigation
|
|
48
|
-
*
|
|
29
|
+
*
|
|
49
30
|
* @slot scrollable-section - Slot for the scrollable content area of the side navigation.
|
|
50
31
|
* @slot scrollable-menubar - Slot for the menubar inside the scrollable section.
|
|
51
32
|
* @slot fixed-section - Slot for the fixed content area of the side navigation.
|
|
52
33
|
* @slot fixed-menubar - Slot for the menubar inside the fixed section.
|
|
53
34
|
* @slot brand-logo - Slot for the brand logo (e.g., icon or img).
|
|
54
|
-
*
|
|
35
|
+
*
|
|
55
36
|
* @csspart side-navigation-container - The main container wrapping the entire side navigation.
|
|
56
37
|
* @csspart scrollable-section - The scrollable section of the side navigation.
|
|
57
38
|
* @csspart scrollable-menubar - The menubar inside the scrollable section.
|
|
@@ -62,10 +43,10 @@ import SideNavigationContext from './sidenavigation.context';
|
|
|
62
43
|
* @csspart footer-text - The footer text label in the fixed section.
|
|
63
44
|
* @csspart vertical-divider - The vertical divider between the scrollable and fixed sections.
|
|
64
45
|
* @csspart vertical-divider-button - The button inside the vertical divider used to toggle expand/collapse.
|
|
65
|
-
*
|
|
46
|
+
*
|
|
66
47
|
* @event toggle - (React: onToggle) Dispatched when the grabber button is clicked to expand/collapse the sidenavigation.
|
|
67
48
|
* @event activechange - (React: onActiveChange) Dispatched when the active state of a nested navmenuitem changes.
|
|
68
|
-
*
|
|
49
|
+
*
|
|
69
50
|
* @cssproperty --mdc-sidenavigation-expanded-width - width of the sideNavigation when expanded
|
|
70
51
|
* @cssproperty --mdc-sidenavigation-expanded-left-padding - padding for the left side of navmenuitems, when expanded
|
|
71
52
|
* @cssproperty --mdc-sidenavigation-expanded-right-padding - padding for the right side of navmenuitems, when expanded
|
|
@@ -76,7 +57,7 @@ import SideNavigationContext from './sidenavigation.context';
|
|
|
76
57
|
* @cssproperty --mdc-sidenavigation-bottom-padding - padding for the bottom of the scrollable section
|
|
77
58
|
* @cssproperty --mdc-sidenavigation-vertical-divider-button-z-index - z-index of the vertical divider button
|
|
78
59
|
*/
|
|
79
|
-
declare class SideNavigation extends
|
|
60
|
+
declare class SideNavigation extends SideNavigation_base {
|
|
80
61
|
/**
|
|
81
62
|
* Five variants of the sideNavigation
|
|
82
63
|
* - **fixed-collapsed**: Shows icons without labels and has fixed width, 4.5rem.
|
|
@@ -115,6 +96,17 @@ declare class SideNavigation extends Provider<SideNavigationContext> {
|
|
|
115
96
|
* @default false
|
|
116
97
|
*/
|
|
117
98
|
hideFixedSectionDivider: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Determines how sibling submenus are displayed. There are 2 types of submenus supported:
|
|
101
|
+
*
|
|
102
|
+
* - `flyout`: Submenus are shown with `mdc-menupopover`.
|
|
103
|
+
* - `dropdown`: A parent `mdc-navmenuitem` can render its submenu inside a sibling
|
|
104
|
+
* `div[data-trigger="<navmenuitem-id>"]` while the sidenavigation is expanded. In collapsed mode,
|
|
105
|
+
* dropdown submenus are converted to flyout menus.
|
|
106
|
+
*
|
|
107
|
+
* @default flyout
|
|
108
|
+
*/
|
|
109
|
+
submenuType: SideNavigationSubmenuType;
|
|
118
110
|
constructor();
|
|
119
111
|
connectedCallback(): void;
|
|
120
112
|
disconnectedCallback(): void;
|
|
@@ -174,6 +166,34 @@ declare class SideNavigation extends Provider<SideNavigationContext> {
|
|
|
174
166
|
* @internal
|
|
175
167
|
*/
|
|
176
168
|
private get navMenuItems();
|
|
169
|
+
/**
|
|
170
|
+
* Closes all open dropdown containers and resets their parent navmenuitems.
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
private closeAllDropdowns;
|
|
174
|
+
/**
|
|
175
|
+
* Hides all div[data-trigger] elements within the sidenavigation.
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
178
|
+
private hideAllDropdownContainers;
|
|
179
|
+
/**
|
|
180
|
+
* When collapsed with dropdown submenus, converts div[data-trigger] children into dynamically
|
|
181
|
+
* created menupopover elements for flyout behavior.
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
private convertDropdownsToFlyouts;
|
|
185
|
+
/**
|
|
186
|
+
* When expanding with dropdown submenus, converts dynamically created menupopover elements
|
|
187
|
+
* back to div[data-trigger] containers.
|
|
188
|
+
* @internal
|
|
189
|
+
*/
|
|
190
|
+
private convertFlyoutsToDropdowns;
|
|
191
|
+
/**
|
|
192
|
+
* Handles Escape key inside dropdown containers to close the dropdown
|
|
193
|
+
* and return focus to the parent trigger navmenuitem.
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
private handleDropdownKeyDown;
|
|
177
197
|
/**
|
|
178
198
|
* Sets the variant attribute for the sideNavigation component.
|
|
179
199
|
* If the provided variant is not included in the variant,
|