@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
|
@@ -13,25 +13,14 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
13
13
|
import { v4 } from 'uuid';
|
|
14
14
|
import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
|
|
15
15
|
import { TAG_NAME as MENUPOPOVER_TAGNAME } from '../menupopover/menupopover.constants';
|
|
16
|
+
import { TAG_NAME as TOOLTIP_TAG_NAME } from '../tooltip/tooltip.constants';
|
|
16
17
|
import MenuItem from '../menuitem/menuitem.component';
|
|
17
18
|
import providerUtils from '../../utils/provider';
|
|
18
19
|
import SideNavigation from '../sidenavigation/sidenavigation.component';
|
|
19
|
-
import { TAG_NAME as TOOLTIP_TAG_NAME } from '../tooltip/tooltip.constants';
|
|
20
20
|
import { getIconNameWithoutStyle } from '../button/button.utils';
|
|
21
|
-
import { ALLOWED_BADGE_TYPES, DEFAULTS, ICON_NAME } from './navmenuitem.constants';
|
|
21
|
+
import { ALLOWED_BADGE_TYPES, DEFAULTS, ICON_NAME, TAG_NAME as NAVMENUITEM_TAGNAME } from './navmenuitem.constants';
|
|
22
22
|
import styles from './navmenuitem.styles';
|
|
23
23
|
/**
|
|
24
|
-
* `mdc-navmenuitem` is a menuitem styled to work as a navigation tab.
|
|
25
|
-
* It supports a leading icon, optional badge and dynamic text rendering.
|
|
26
|
-
*
|
|
27
|
-
* The navmenuitem can be in an active or inactive state, indicating whether it is currently selected.
|
|
28
|
-
*
|
|
29
|
-
* Note: `mdc-navmenuitem` is intended to be used inside `mdc-menubar` as part of the sideNavigation
|
|
30
|
-
* component. Its structure, spacing, and interactions are designed to align with
|
|
31
|
-
* the visual and functional requirements of side navigation layouts.
|
|
32
|
-
*
|
|
33
|
-
* By providing the tooltip-text attribute, a tooltip will be displayed on hover of the navmenuitem. This tooltip is useful when an active navmenuitem is present within a submenu of the sidenavigation component.
|
|
34
|
-
*
|
|
35
24
|
* @tagname mdc-navmenuitem
|
|
36
25
|
*
|
|
37
26
|
* @dependency mdc-icon
|
|
@@ -52,6 +41,7 @@ import styles from './navmenuitem.styles';
|
|
|
52
41
|
* @cssproperty --mdc-navmenuitem-in-sidenav-collapsed-margin-left - Left margin of the navmenuitem, when collapsed.
|
|
53
42
|
* @cssproperty --mdc-navmenuitem-in-sidenav-collapsed-margin-right - Right margin of the navmenuitem, when collapsed.
|
|
54
43
|
* @cssproperty --mdc-navmenuitem-color - Text color of the navmenuitem in its normal state.
|
|
44
|
+
* @cssproperty --mdc-navmenuitem-notch-color - Notch color of the navmenuitem (if applicable) when active.
|
|
55
45
|
* @cssproperty --mdc-navmenuitem-disabled-color - Text color of the navmenuitem when disabled.
|
|
56
46
|
* @cssproperty --mdc-navmenuitem-rest-active-background-color - Background color of the active nav item in its rest state.
|
|
57
47
|
* @cssproperty --mdc-navmenuitem-hover-background-color - Background color of the navmenuitem when hovered.
|
|
@@ -65,7 +55,8 @@ import styles from './navmenuitem.styles';
|
|
|
65
55
|
* @csspart badge - The badge of the navmenuitem.
|
|
66
56
|
* @csspart icon-container - The container of the icon.
|
|
67
57
|
* @csspart text-container - The container of the text.
|
|
68
|
-
* @csspart trailing-arrow - The trailing arrow of the navmenuitem.
|
|
58
|
+
* @csspart trailing-arrow - The trailing arrow of the navmenuitem when it has a flyout menu.
|
|
59
|
+
* @csspart trailing-arrow-dropdown - The trailing arrow of the navmenuitem when it has a dropdown menu.
|
|
69
60
|
*/
|
|
70
61
|
class NavMenuItem extends MenuItem {
|
|
71
62
|
constructor() {
|
|
@@ -107,6 +98,11 @@ class NavMenuItem extends MenuItem {
|
|
|
107
98
|
* @internal
|
|
108
99
|
*/
|
|
109
100
|
this.hasActiveChild = false;
|
|
101
|
+
/**
|
|
102
|
+
* Tracks whether the dropdown submenu controlled by this navmenuitem is currently open.
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
this.dropdownOpen = false;
|
|
110
106
|
/**
|
|
111
107
|
* @internal
|
|
112
108
|
*/
|
|
@@ -133,6 +129,8 @@ class NavMenuItem extends MenuItem {
|
|
|
133
129
|
}
|
|
134
130
|
// Set in-menupopover attribute if nested
|
|
135
131
|
this.toggleAttribute('in-menupopover', this.isNested());
|
|
132
|
+
// Set in-dropdown-container attribute if inside a dropdown div
|
|
133
|
+
this.toggleAttribute('in-dropdown-container', this.isInsideDropdownContainer());
|
|
136
134
|
}
|
|
137
135
|
disconnectedCallback() {
|
|
138
136
|
super.disconnectedCallback();
|
|
@@ -150,7 +148,8 @@ class NavMenuItem extends MenuItem {
|
|
|
150
148
|
super.updated(changedProperties);
|
|
151
149
|
if (changedProperties.has('tooltipText') ||
|
|
152
150
|
changedProperties.has('showLabel') ||
|
|
153
|
-
changedProperties.has('hasActiveChild')
|
|
151
|
+
changedProperties.has('hasActiveChild') ||
|
|
152
|
+
changedProperties.has('dropdownOpen')) {
|
|
154
153
|
this.renderDynamicTooltip();
|
|
155
154
|
}
|
|
156
155
|
if (changedProperties.has('showLabel')) {
|
|
@@ -163,11 +162,36 @@ class NavMenuItem extends MenuItem {
|
|
|
163
162
|
if (!context)
|
|
164
163
|
return;
|
|
165
164
|
// Determine expansion state
|
|
166
|
-
this.showLabel = this.isNested() ? true : context.expanded;
|
|
165
|
+
this.showLabel = this.isNested() || this.isInsideDropdownContainer() ? true : context.expanded;
|
|
166
|
+
// When sidenavigation collapses, close any open dropdown
|
|
167
|
+
if (!context.expanded && this.dropdownOpen) {
|
|
168
|
+
this.closeDropdown();
|
|
169
|
+
}
|
|
170
|
+
// When dropdown submenu type is turned off, close any open dropdown
|
|
171
|
+
if (!context.isDropdownSubmenuType && this.dropdownOpen) {
|
|
172
|
+
this.closeDropdown();
|
|
173
|
+
}
|
|
174
|
+
// In dropdown mode, manage parent active styling based on expanded state:
|
|
175
|
+
// Expanded + dropdown open: only the child should appear active, not the parent.
|
|
176
|
+
// Expanded + dropdown closed: parent should appear active when it has an active child.
|
|
177
|
+
// Collapsed (icon-only): parent should appear active when it has an active child.
|
|
178
|
+
if (context.isDropdownSubmenuType && this.hasActiveChild && context.isDropDownParent(this)) {
|
|
179
|
+
if (context.expanded && this.dropdownOpen) {
|
|
180
|
+
this.removeAttribute('active');
|
|
181
|
+
this.active = false;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this.setAttribute('active', '');
|
|
185
|
+
this.active = true;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
167
188
|
}
|
|
168
189
|
renderDynamicTooltip() {
|
|
169
190
|
var _a;
|
|
170
191
|
this.removeTooltip();
|
|
192
|
+
if (this.disabled || this.dropdownOpen) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
171
195
|
if (this.hasActiveChild && !this.isActiveParentTooltipText) {
|
|
172
196
|
return;
|
|
173
197
|
}
|
|
@@ -217,11 +241,90 @@ class NavMenuItem extends MenuItem {
|
|
|
217
241
|
}
|
|
218
242
|
return false;
|
|
219
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* Check whether the navmenuitem is inside a dropdown container (div[data-trigger]).
|
|
246
|
+
* @internal
|
|
247
|
+
*/
|
|
248
|
+
isInsideDropdownContainer() {
|
|
249
|
+
let parent = this.parentElement;
|
|
250
|
+
while (parent) {
|
|
251
|
+
if (parent.matches('div[data-trigger]')) {
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
parent = parent.parentElement;
|
|
255
|
+
}
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
220
258
|
handleClickEvent() {
|
|
221
|
-
|
|
259
|
+
var _a;
|
|
260
|
+
if (this.disabled || this.cannotActivate || this.softDisabled)
|
|
261
|
+
return;
|
|
262
|
+
const context = (_a = this.sideNavigationContext) === null || _a === void 0 ? void 0 : _a.value;
|
|
263
|
+
if ((context === null || context === void 0 ? void 0 : context.isDropdownSubmenuType) && (context === null || context === void 0 ? void 0 : context.expanded) && (context === null || context === void 0 ? void 0 : context.isDropDownParent(this))) {
|
|
264
|
+
this.toggleDropdown();
|
|
265
|
+
// move the focus to the first navmenuitem in the dropdown when opening the dropdown
|
|
266
|
+
if (this.dropdownOpen) {
|
|
267
|
+
const dropdownContainer = this.getDropdownContainer();
|
|
268
|
+
const firstNavMenuItem = dropdownContainer === null || dropdownContainer === void 0 ? void 0 : dropdownContainer.querySelector(NAVMENUITEM_TAGNAME);
|
|
269
|
+
firstNavMenuItem === null || firstNavMenuItem === void 0 ? void 0 : firstNavMenuItem.focus();
|
|
270
|
+
}
|
|
222
271
|
return;
|
|
272
|
+
}
|
|
223
273
|
this.emitNavMenuItemActiveChange(this.active);
|
|
224
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Toggles the visibility of the dropdown container associated with this navmenuitem.
|
|
277
|
+
* @internal
|
|
278
|
+
*/
|
|
279
|
+
toggleDropdown() {
|
|
280
|
+
const dropdownContainer = this.getDropdownContainer();
|
|
281
|
+
if (!dropdownContainer)
|
|
282
|
+
return;
|
|
283
|
+
this.dropdownOpen = !this.dropdownOpen;
|
|
284
|
+
dropdownContainer.style.display = this.dropdownOpen ? 'flex' : 'none';
|
|
285
|
+
if (this.dropdownOpen) {
|
|
286
|
+
this.setAttribute('aria-expanded', 'true');
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
this.removeAttribute('aria-expanded');
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Opens the dropdown if it is closed.
|
|
294
|
+
*/
|
|
295
|
+
openDropdown() {
|
|
296
|
+
if (this.dropdownOpen)
|
|
297
|
+
return;
|
|
298
|
+
const dropdownContainer = this.getDropdownContainer();
|
|
299
|
+
if (dropdownContainer) {
|
|
300
|
+
dropdownContainer.style.display = 'flex';
|
|
301
|
+
}
|
|
302
|
+
this.dropdownOpen = true;
|
|
303
|
+
this.setAttribute('aria-expanded', 'true');
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Closes the dropdown if it is open.
|
|
307
|
+
*/
|
|
308
|
+
closeDropdown() {
|
|
309
|
+
if (!this.dropdownOpen)
|
|
310
|
+
return;
|
|
311
|
+
const dropdownContainer = this.getDropdownContainer();
|
|
312
|
+
if (dropdownContainer) {
|
|
313
|
+
dropdownContainer.style.display = 'none';
|
|
314
|
+
}
|
|
315
|
+
this.dropdownOpen = false;
|
|
316
|
+
this.removeAttribute('aria-expanded');
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Returns the sibling div[data-trigger] element associated with this navmenuitem.
|
|
320
|
+
* @internal
|
|
321
|
+
*/
|
|
322
|
+
getDropdownContainer() {
|
|
323
|
+
var _a;
|
|
324
|
+
if (!this.id)
|
|
325
|
+
return null;
|
|
326
|
+
return (_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.querySelector(`div[data-trigger="${this.id}"]`);
|
|
327
|
+
}
|
|
225
328
|
getFilledIconName() {
|
|
226
329
|
if (!this.iconName) {
|
|
227
330
|
return undefined;
|
|
@@ -252,10 +355,20 @@ class NavMenuItem extends MenuItem {
|
|
|
252
355
|
render() {
|
|
253
356
|
var _a;
|
|
254
357
|
const context = (_a = this.sideNavigationContext) === null || _a === void 0 ? void 0 : _a.value;
|
|
358
|
+
const isDropdownMode = (context === null || context === void 0 ? void 0 : context.isDropdownSubmenuType) && (context === null || context === void 0 ? void 0 : context.expanded);
|
|
359
|
+
const isDropDownParent = context === null || context === void 0 ? void 0 : context.isDropDownParent(this);
|
|
360
|
+
const hasFlyoutSibling = context === null || context === void 0 ? void 0 : context.hasSiblingWithTriggerId(this);
|
|
255
361
|
return html `
|
|
256
362
|
<div part="icon-container">
|
|
257
|
-
|
|
258
|
-
|
|
363
|
+
${this.iconName
|
|
364
|
+
? html `<mdc-icon
|
|
365
|
+
name="${this.iconName}"
|
|
366
|
+
size="1.5"
|
|
367
|
+
length-unit="rem"
|
|
368
|
+
part="regular-icon"
|
|
369
|
+
></mdc-icon>`
|
|
370
|
+
: nothing}
|
|
371
|
+
${!this.cannotActivate && this.iconName
|
|
259
372
|
? html `<mdc-icon
|
|
260
373
|
name="${this.getFilledIconName()}"
|
|
261
374
|
size="1.5"
|
|
@@ -277,7 +390,16 @@ class NavMenuItem extends MenuItem {
|
|
|
277
390
|
${this.renderBadge(this.showLabel)}
|
|
278
391
|
`
|
|
279
392
|
: nothing}
|
|
280
|
-
${
|
|
393
|
+
${isDropdownMode && isDropDownParent
|
|
394
|
+
? html ` <mdc-icon
|
|
395
|
+
name=${ICON_NAME.DOWN_ARROW}
|
|
396
|
+
length-unit="rem"
|
|
397
|
+
part="trailing-arrow-dropdown"
|
|
398
|
+
class="${this.dropdownOpen ? 'arrow-rotated' : ''}"
|
|
399
|
+
>
|
|
400
|
+
</mdc-icon>`
|
|
401
|
+
: nothing}
|
|
402
|
+
${hasFlyoutSibling
|
|
281
403
|
? html ` <mdc-icon name=${ICON_NAME.RIGHT_ARROW} length-unit="rem" part="trailing-arrow"> </mdc-icon>`
|
|
282
404
|
: nothing}
|
|
283
405
|
`;
|
|
@@ -352,4 +474,8 @@ __decorate([
|
|
|
352
474
|
state(),
|
|
353
475
|
__metadata("design:type", Boolean)
|
|
354
476
|
], NavMenuItem.prototype, "hasActiveChild", void 0);
|
|
477
|
+
__decorate([
|
|
478
|
+
state(),
|
|
479
|
+
__metadata("design:type", Boolean)
|
|
480
|
+
], NavMenuItem.prototype, "dropdownOpen", void 0);
|
|
355
481
|
export default NavMenuItem;
|
|
@@ -12,6 +12,7 @@ const styles = [
|
|
|
12
12
|
--mdc-navmenuitem-in-sidenav-collapsed-margin-right: var(--mdc-sidenavigation-collapsed-right-padding, 1rem);
|
|
13
13
|
|
|
14
14
|
--mdc-navmenuitem-color: var(--mds-color-theme-text-primary-normal);
|
|
15
|
+
--mdc-navmenuitem-notch-color: var(--mds-color-theme-text-primary-normal);
|
|
15
16
|
--mdc-navmenuitem-disabled-color: var(--mds-color-theme-text-primary-disabled);
|
|
16
17
|
|
|
17
18
|
/* Background color when in default (normal) or active state */
|
|
@@ -25,6 +26,7 @@ const styles = [
|
|
|
25
26
|
|
|
26
27
|
position: relative;
|
|
27
28
|
flex-shrink: 0;
|
|
29
|
+
height: 2.5rem;
|
|
28
30
|
display: flex;
|
|
29
31
|
align-items: center;
|
|
30
32
|
gap: 0.5rem;
|
|
@@ -54,8 +56,10 @@ const styles = [
|
|
|
54
56
|
display: none;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
:host([in-menupopover])
|
|
59
|
+
:host([in-menupopover]),
|
|
60
|
+
:host([in-dropdown-container]) {
|
|
58
61
|
width: 100%;
|
|
62
|
+
padding: 1rem;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
:host(:not([in-menupopover])) {
|
|
@@ -112,11 +116,12 @@ const styles = [
|
|
|
112
116
|
background-color: var(--mdc-navmenuitem-pressed-active-background-color);
|
|
113
117
|
}
|
|
114
118
|
|
|
115
|
-
:host(:not([in-menupopover]))::before
|
|
119
|
+
:host(:not([in-menupopover]))::before,
|
|
120
|
+
:host([in-dropdown-container])::before {
|
|
116
121
|
content: '';
|
|
117
122
|
display: block;
|
|
118
123
|
position: absolute;
|
|
119
|
-
background-color: var(--mdc-navmenuitem-color);
|
|
124
|
+
background-color: var(--mdc-navmenuitem-notch-color);
|
|
120
125
|
width: 0.25rem;
|
|
121
126
|
height: 1rem;
|
|
122
127
|
pointer-events: none;
|
|
@@ -175,14 +180,20 @@ const styles = [
|
|
|
175
180
|
flex-shrink: 0;
|
|
176
181
|
|
|
177
182
|
position: absolute;
|
|
178
|
-
inset-inline-end: -0.
|
|
183
|
+
inset-inline-end: -0.125rem;
|
|
179
184
|
top: 0.875rem;
|
|
180
185
|
}
|
|
181
186
|
|
|
182
|
-
:host([show-label])::part(trailing-arrow)
|
|
187
|
+
:host([show-label])::part(trailing-arrow),
|
|
188
|
+
:host([show-label])::part(trailing-arrow-dropdown) {
|
|
183
189
|
flex-shrink: 0;
|
|
184
190
|
}
|
|
185
191
|
|
|
192
|
+
/* Arrow rotation when dropdown is open */
|
|
193
|
+
.arrow-rotated {
|
|
194
|
+
transform: rotate(180deg);
|
|
195
|
+
}
|
|
196
|
+
|
|
186
197
|
:host mdc-badge {
|
|
187
198
|
--mdc-badge-dot-width: 1rem;
|
|
188
199
|
--mdc-badge-dot-height: 1rem;
|
|
@@ -3,16 +3,26 @@ import { CSSResult } from 'lit';
|
|
|
3
3
|
import { Component } from '../../models';
|
|
4
4
|
declare const OptGroup_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DisabledMixin").DisabledMixinInterface> & typeof Component;
|
|
5
5
|
/**
|
|
6
|
-
* optgroup
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* `mdc-optgroup` groups a set of `mdc-option` elements under a shared label inside a listbox (typically the `mdc-selectlistbox` rendered by `mdc-select`). It exposes the grouping to assistive technology via `role="group"` and an associated label.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Use `mdc-optgroup` to organise related options inside an `mdc-selectlistbox` or `mdc-listbox` (for example, grouping countries by continent).
|
|
11
|
+
* - Use it to disable a whole set of options at once via the `disabled` attribute.
|
|
12
|
+
*
|
|
13
|
+
* **When not to use**
|
|
14
|
+
*
|
|
15
|
+
* - Do not use `mdc-optgroup` for grouping menu items — use `mdc-menusection` inside `mdc-menupopover` or `mdc-menubar`.
|
|
16
|
+
* - Do not nest `mdc-optgroup` inside another `mdc-optgroup`.
|
|
17
|
+
*
|
|
10
18
|
* @tagname mdc-optgroup
|
|
11
|
-
*
|
|
19
|
+
*
|
|
20
|
+
* @dependency mdc-text
|
|
21
|
+
*
|
|
12
22
|
* @slot default - This is a default slot for mdc-option elements.
|
|
13
|
-
*
|
|
23
|
+
*
|
|
14
24
|
* @cssproperty --mdc-optgroup-disabled-color - Allows customization of the disabled option color.
|
|
15
|
-
*
|
|
25
|
+
*
|
|
16
26
|
* @csspart header-text - The header text of the optgroup.
|
|
17
27
|
*/
|
|
18
28
|
declare class OptGroup extends OptGroup_base {
|
|
@@ -18,12 +18,10 @@ import { TAG_NAME as OPTION_TAGNAME } from '../option/option.constants';
|
|
|
18
18
|
import { HEADER_ID } from './optgroup.constants';
|
|
19
19
|
import styles from './optgroup.styles';
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* @tagname mdc-optgroup
|
|
22
22
|
*
|
|
23
23
|
* @dependency mdc-text
|
|
24
24
|
*
|
|
25
|
-
* @tagname mdc-optgroup
|
|
26
|
-
*
|
|
27
25
|
* @slot default - This is a default slot for mdc-option elements.
|
|
28
26
|
*
|
|
29
27
|
* @cssproperty --mdc-optgroup-disabled-color - Allows customization of the disabled option color.
|
|
@@ -3,33 +3,31 @@ import type { IconNames } from '../icon/icon.types';
|
|
|
3
3
|
import ListItem from '../listitem/listitem.component';
|
|
4
4
|
declare const Option_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & typeof ListItem;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
6
|
+
* `mdc-option` is a selectable entry rendered inside a listbox (`mdc-selectlistbox` / `mdc-listbox`), typically as a child of `mdc-select`. It supports a primary and secondary label, an optional prefix icon, and renders a checkmark on the trailing side when selected. The component participates in form submission through its associated form-control behaviour.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Use `mdc-option` for each selectable value inside an `mdc-select`, `mdc-selectlistbox`, or `mdc-listbox`.
|
|
11
|
+
* - Group related options together with `mdc-optgroup`.
|
|
12
|
+
*
|
|
13
|
+
* **When not to use**
|
|
14
|
+
*
|
|
15
|
+
* - Do not use `mdc-option` inside menus — use `mdc-menuitem`, `mdc-menuitemcheckbox`, or `mdc-menuitemradio` inside `mdc-menupopover`/`mdc-menubar`.
|
|
16
|
+
* - Do not use it as a stand-alone list row; use `mdc-listitem` for generic lists.
|
|
17
|
+
*
|
|
18
|
+
* @tagname mdc-option
|
|
19
|
+
*
|
|
20
20
|
* @dependency mdc-icon
|
|
21
21
|
* @dependency mdc-text
|
|
22
|
-
*
|
|
23
|
-
* @tagname mdc-option
|
|
24
|
-
*
|
|
22
|
+
*
|
|
25
23
|
* @event click - (React: onClick) This event is dispatched when the option is clicked.
|
|
26
24
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the option.
|
|
27
25
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the option.
|
|
28
26
|
* @event focus - (React: onFocus) This event is dispatched when the option receives focus.
|
|
29
|
-
*
|
|
27
|
+
*
|
|
30
28
|
* @cssproperty --mdc-listitem-column-gap - gap between columns in the option
|
|
31
29
|
* @cssproperty --mdc-option-icon-width - width of the icon in the option
|
|
32
|
-
*
|
|
30
|
+
*
|
|
33
31
|
* @csspart leading - Allows customization of the leading part.
|
|
34
32
|
* @csspart leading-text - Allows customization of the leading text part.
|
|
35
33
|
* @csspart trailing - Allows customization of the trailing part.
|
|
@@ -17,25 +17,11 @@ import { TYPE } from '../text/text.constants';
|
|
|
17
17
|
import { SELECTED_ICON_NAME } from './option.constants';
|
|
18
18
|
import styles from './option.styles';
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* The label and secondary label of the option can be set using the `label` and `secondaryLabel` properties respectively.
|
|
23
|
-
* The `label` is the primary text displayed in the option, while the `secondaryLabel` is the secondary text displayed below the primary label.
|
|
24
|
-
*
|
|
25
|
-
* The `selected` property is used to indicate whether the option is selected or not.
|
|
26
|
-
* When the `selected` property is set to true, a checkmark icon will be displayed
|
|
27
|
-
* on the right side of the option to indicate that it is selected.
|
|
28
|
-
*
|
|
29
|
-
* The `prefixIcon` property can be used to display an icon on the left side of the option label.
|
|
30
|
-
*
|
|
31
|
-
* **Note**: If an option contains a long text, it is recommended to create a tooltip for the option that displays the full text on hover.
|
|
32
|
-
* Consumers need to add a unique ID to this option 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 option using the `triggerID` attribute.
|
|
20
|
+
* @tagname mdc-option
|
|
33
21
|
*
|
|
34
22
|
* @dependency mdc-icon
|
|
35
23
|
* @dependency mdc-text
|
|
36
24
|
*
|
|
37
|
-
* @tagname mdc-option
|
|
38
|
-
*
|
|
39
25
|
* @event click - (React: onClick) This event is dispatched when the option is clicked.
|
|
40
26
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the option.
|
|
41
27
|
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the option.
|
|
@@ -2,29 +2,31 @@ import { CSSResult, nothing } from 'lit';
|
|
|
2
2
|
import Input from '../input/input.component';
|
|
3
3
|
import type { InputType } from '../input/input.types';
|
|
4
4
|
/**
|
|
5
|
-
* `mdc-password` is a
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - `password`
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* -
|
|
15
|
-
*
|
|
5
|
+
* `mdc-password` is a form-associated password input. It renders the same label, help-text, validation, prefix, and leading-icon surface as `mdc-input`, but the input type defaults to `password` and a trailing show/hide button is always present so users can reveal or mask the entered value.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use `mdc-password` whenever the user needs to enter a credential or other secret string that should be visually masked.
|
|
10
|
+
* - Use it as the password field in sign-in, sign-up, and credential-change forms inside a `form` element.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Do not use `mdc-password` for regular text — use `mdc-input` instead.
|
|
15
|
+
* - Do not use it for multi-line secrets — use `mdc-textarea`.
|
|
16
|
+
* - Do not use it for one-time codes that should be visible as the user types — use `mdc-input`.
|
|
17
|
+
*
|
|
16
18
|
* @tagname mdc-password
|
|
17
|
-
*
|
|
19
|
+
*
|
|
18
20
|
* @event input - (React: onInput) This event is dispatched when the value of the password field changes (every press).
|
|
19
21
|
* @event change - (React: onChange) This event is dispatched when the value of the password field changes (on blur).
|
|
20
22
|
* @event focus - (React: onFocus) This event is dispatched when the password receives focus.
|
|
21
23
|
* @event blur - (React: onBlur) This event is dispatched when the password loses focus.
|
|
22
|
-
*
|
|
24
|
+
*
|
|
23
25
|
* @dependency mdc-icon
|
|
24
26
|
* @dependency mdc-text
|
|
25
27
|
* @dependency mdc-button
|
|
26
28
|
* @dependency mdc-toggletip
|
|
27
|
-
*
|
|
29
|
+
*
|
|
28
30
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
29
31
|
* @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.
|
|
30
32
|
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
|
@@ -33,7 +35,7 @@ import type { InputType } from '../input/input.types';
|
|
|
33
35
|
* @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.
|
|
34
36
|
* @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.
|
|
35
37
|
* @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.
|
|
36
|
-
*
|
|
38
|
+
*
|
|
37
39
|
* @csspart input-container - The container that wraps the input field, leading icon, prefix text, and trailing button.
|
|
38
40
|
* @csspart input-section - The container that wraps the input field and prefix text.
|
|
39
41
|
* @csspart input-text - The input field element.
|
|
@@ -43,7 +45,7 @@ import type { InputType } from '../input/input.types';
|
|
|
43
45
|
* @csspart helper-icon - The helper/validation icon element.
|
|
44
46
|
* @csspart toggletip - The toggletip icon button element.
|
|
45
47
|
* @csspart toggletip-text - The toggletip text element.
|
|
46
|
-
*
|
|
48
|
+
*
|
|
47
49
|
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
48
50
|
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
49
51
|
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
@@ -58,7 +60,6 @@ import type { InputType } from '../input/input.types';
|
|
|
58
60
|
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
59
61
|
* @cssproperty --mdc-input-selection-text-color - Text color for the selected text
|
|
60
62
|
* @cssproperty --mdc-input-selection-background-color - Background color for the selected text
|
|
61
|
-
*
|
|
62
63
|
*/
|
|
63
64
|
declare class Password extends Input {
|
|
64
65
|
/**
|
|
@@ -16,17 +16,6 @@ import { DEFAULTS } from '../formfieldwrapper/formfieldwrapper.constants';
|
|
|
16
16
|
import { PASSWORD_VISIBILITY_ICONS } from './password.constants';
|
|
17
17
|
import styles from './password.styles';
|
|
18
18
|
/**
|
|
19
|
-
* `mdc-password` is a component that allows users to input their password.
|
|
20
|
-
* It extends the `mdc-input` component and provides additional features specific to password fields.
|
|
21
|
-
* It contains:
|
|
22
|
-
* - `label` field - describe the password field.
|
|
23
|
-
* - `password` field - contains the value
|
|
24
|
-
* - `help-text` or `validation-message` - displayed below the password field.
|
|
25
|
-
* - `help-text-type` - type of the help text, can be 'default', 'error', 'warning', 'success', 'priority'.
|
|
26
|
-
* - `show-button-aria-label` - aria label for the trailing show button.
|
|
27
|
-
* - `hide-button-aria-label` - aria label for the trailing hide button.
|
|
28
|
-
* - all the attributes of the native password field.
|
|
29
|
-
*
|
|
30
19
|
* @tagname mdc-password
|
|
31
20
|
*
|
|
32
21
|
* @event input - (React: onInput) This event is dispatched when the value of the password field changes (every press).
|
|
@@ -5,61 +5,29 @@ import { DepthManager, StackChange, StackedOverlayComponent } from '../../utils/
|
|
|
5
5
|
import { PopoverBoundaryRoot, PopoverColor, PopoverPlacement, PopoverStrategy, PopoverTrigger } from './popover.types';
|
|
6
6
|
declare const Popover_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyDownHandledMixin").KeyDownHandledMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyToActionMixin").KeyToActionInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/BackdropMixin").BackdropMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/PreventScrollMixin").PreventScrollMixinInterface> & import("../../utils/mixins/index.types").Constructor<Component & import("../../utils/mixins/focus/FocusTrapMixin").FocusTrapClassInterface> & typeof Component;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* To prevent unexpected attribute changes on the trigger `disable-aria-expanded` attribute must be set on all linked
|
|
24
|
-
* Popovers except one.
|
|
25
|
-
*
|
|
26
|
-
* ### React Popover with append-to attribute
|
|
27
|
-
*
|
|
28
|
-
* React mounts the popover based on the virtual DOM, but when the append-to attribute is set, the popover removes itself
|
|
29
|
-
* and mounts to the specified element. React will not know about the move and will not know about the
|
|
30
|
-
* newly created mdc-popoverportal element either. This throws a `NotFoundError` error when the Popover is directly
|
|
31
|
-
* added/removed by React, for example:
|
|
32
|
-
*
|
|
33
|
-
* ```tsx
|
|
34
|
-
* const SomeComponent = () => {
|
|
35
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
36
|
-
* return (<div>
|
|
37
|
-
* {isOpen && <Popover append-to="some-element-id">...</mdc-popover>}
|
|
38
|
-
* </div>);
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
* As a workaround Popover need to wrap with any other element/component, for example:
|
|
42
|
-
* ```tsx
|
|
43
|
-
* const SomeComponent = () => {
|
|
44
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
45
|
-
* return (<div>
|
|
46
|
-
* {isOpen && <div>
|
|
47
|
-
* <Popover append-to="some-element-id">...</mdc-popover>
|
|
48
|
-
* <div>}
|
|
49
|
-
* </div>);
|
|
50
|
-
* }
|
|
51
|
-
* ```
|
|
52
|
-
* Note the wrapper <div> around the Popover component (React.Fragment does not work).
|
|
53
|
-
*
|
|
54
|
-
* @dependency mdc-button
|
|
55
|
-
*
|
|
8
|
+
* The popover is a generic overlay that can be anchored to any actionable element on the page (identified by its `id`) and used to host tooltips, dropdowns, menus, or any other contextual content. It automatically positions itself based on available space, can resize to fit the viewport, and uses [Floating UI](https://floating-ui.com/) to keep its position correct as the page scrolls or resizes.
|
|
9
|
+
*
|
|
10
|
+
* **When to use**
|
|
11
|
+
*
|
|
12
|
+
* - Use `mdc-popover` to render contextual UI floating next to a trigger element — additional information, action menus, or interactive panels.
|
|
13
|
+
* - Use it when you need fine control over trigger events (click, hover, focus, manual), placement, offset, arrow, focus trap, or backdrop behaviour.
|
|
14
|
+
*
|
|
15
|
+
* **When not to use**
|
|
16
|
+
*
|
|
17
|
+
* - Use `mdc-tooltip` for short, non-interactive descriptive text shown on hover/focus.
|
|
18
|
+
* - Use `mdc-toggletip` for short text shown on click that does not need focus trapping.
|
|
19
|
+
* - Use `mdc-dialog` for modal flows that interrupt the user, render in the centre of the viewport, and own their own header/footer chrome.
|
|
20
|
+
* - Use `mdc-menupopover` / `mdc-coachmark` / `mdc-searchpopover` when one of those higher-level widgets already composes a popover for the use case.
|
|
21
|
+
*
|
|
56
22
|
* @tagname mdc-popover
|
|
57
|
-
*
|
|
23
|
+
*
|
|
24
|
+
* @dependency mdc-button
|
|
25
|
+
*
|
|
58
26
|
* @event shown - (React: onShown) This event is dispatched when the popover is shown
|
|
59
27
|
* @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
|
|
60
28
|
* @event created - (React: onCreated) This event is dispatched when the popover is created (added to the DOM)
|
|
61
29
|
* @event destroyed - (React: onDestroyed) This event is dispatched when the popover is destroyed (removed from the DOM)
|
|
62
|
-
*
|
|
30
|
+
*
|
|
63
31
|
* @cssproperty --mdc-popover-arrow-border-radius - radius of the arrow border
|
|
64
32
|
* @cssproperty --mdc-popover-arrow-border - border of the arrow
|
|
65
33
|
* @cssproperty --mdc-popover-primary-background-color - primary background color of the popover
|
|
@@ -72,9 +40,9 @@ declare const Popover_base: import("../../utils/mixins/index.types").Constructor
|
|
|
72
40
|
* @cssproperty --mdc-popover-max-height - max height of the popover
|
|
73
41
|
* @cssproperty --mdc-popover-width - width of the popover
|
|
74
42
|
* @cssproperty --mdc-popover-backdrop-color - background color of the backdrop (if backdrop is enabled)
|
|
75
|
-
*
|
|
43
|
+
*
|
|
76
44
|
* @slot - Default slot for the popover content
|
|
77
|
-
*
|
|
45
|
+
*
|
|
78
46
|
* @csspart popover-close - The close button of the popover.
|
|
79
47
|
* @csspart popover-content - The content of the popover.
|
|
80
48
|
* @csspart popover-hover-bridge - The hover bridge of the popover.
|