@momentum-design/components 0.134.19 → 0.134.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +2 -2
- package/dist/components/accordion/accordion.component.d.ts +15 -5
- package/dist/components/accordionbutton/accordionbutton.component.d.ts +14 -26
- package/dist/components/accordionbutton/accordionbutton.component.js +0 -22
- package/dist/components/accordiongroup/accordiongroup.component.d.ts +12 -16
- package/dist/components/accordiongroup/accordiongroup.component.js +0 -14
- package/dist/components/alertchip/alertchip.component.d.ts +15 -11
- package/dist/components/alertchip/alertchip.component.js +0 -7
- package/dist/components/animation/animation.component.d.ts +14 -6
- package/dist/components/animation/animation.component.js +0 -5
- package/dist/components/announcementdialog/announcementdialog.component.d.ts +18 -25
- package/dist/components/announcementdialog/announcementdialog.component.js +1 -20
- package/dist/components/appheader/appheader.component.d.ts +13 -12
- package/dist/components/appheader/appheader.component.js +0 -9
- package/dist/components/avatar/avatar.component.d.ts +14 -34
- package/dist/components/avatar/avatar.component.js +1 -31
- package/dist/components/avatarbutton/avatarbutton.component.d.ts +15 -14
- package/dist/components/avatarbutton/avatarbutton.component.js +1 -10
- package/dist/components/badge/badge.component.d.ts +16 -20
- package/dist/components/badge/badge.component.js +1 -17
- package/dist/components/banner/banner.component.d.ts +17 -17
- package/dist/components/banner/banner.component.js +1 -13
- package/dist/components/brandvisual/brandvisual.component.d.ts +15 -12
- package/dist/components/brandvisual/brandvisual.component.js +0 -10
- package/dist/components/bullet/bullet.component.d.ts +15 -16
- package/dist/components/bullet/bullet.component.js +0 -15
- package/dist/components/button/button.component.d.ts +21 -52
- package/dist/components/button/button.component.js +1 -47
- package/dist/components/buttongroup/buttongroup.component.d.ts +17 -20
- package/dist/components/buttongroup/buttongroup.component.js +0 -17
- package/dist/components/buttonlink/buttonlink.component.d.ts +19 -16
- package/dist/components/buttonlink/buttonlink.component.js +1 -11
- package/dist/components/buttonsimple/buttonsimple.component.d.ts +16 -25
- package/dist/components/buttonsimple/buttonsimple.component.js +0 -22
- package/dist/components/calendar/calendar.component.d.ts +17 -11
- package/dist/components/calendar/calendar.component.js +0 -8
- package/dist/components/card/card.component.d.ts +18 -17
- package/dist/components/card/card.component.js +0 -13
- package/dist/components/cardbutton/cardbutton.component.d.ts +20 -14
- package/dist/components/cardbutton/cardbutton.component.js +0 -9
- package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +20 -19
- package/dist/components/cardcheckbox/cardcheckbox.component.js +0 -14
- package/dist/components/cardradio/cardradio.component.d.ts +20 -20
- package/dist/components/cardradio/cardradio.component.js +0 -15
- package/dist/components/checkbox/checkbox.component.d.ts +22 -26
- package/dist/components/checkbox/checkbox.component.js +1 -22
- package/dist/components/chip/chip.component.d.ts +20 -13
- package/dist/components/chip/chip.component.js +0 -9
- package/dist/components/coachmark/coachmark.component.d.ts +22 -22
- package/dist/components/coachmark/coachmark.component.js +1 -18
- package/dist/components/combobox/combobox.component.d.ts +27 -37
- package/dist/components/combobox/combobox.component.js +1 -32
- package/dist/components/controltypeprovider/controltypeprovider.component.d.ts +19 -11
- package/dist/components/controltypeprovider/controltypeprovider.component.js +0 -10
- package/dist/components/datepicker/datepicker.component.d.ts +20 -14
- package/dist/components/datepicker/datepicker.component.js +0 -9
- package/dist/components/dialog/dialog.component.d.ts +25 -40
- package/dist/components/dialog/dialog.component.js +1 -35
- package/dist/components/divider/divider.component.d.ts +23 -25
- package/dist/components/divider/divider.component.js +0 -23
- package/dist/components/filterchip/filterchip.component.d.ts +20 -9
- package/dist/components/filterchip/filterchip.component.js +0 -5
- package/dist/components/formfieldgroup/formfieldgroup.component.d.ts +18 -19
- package/dist/components/formfieldgroup/formfieldgroup.component.js +0 -15
- package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +16 -8
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +0 -4
- package/dist/components/icon/icon.component.d.ts +16 -41
- package/dist/components/icon/icon.component.js +0 -39
- package/dist/components/iconprovider/iconprovider.component.d.ts +14 -24
- package/dist/components/iconprovider/iconprovider.component.js +0 -23
- package/dist/components/illustration/illustration.component.d.ts +16 -32
- package/dist/components/illustration/illustration.component.js +0 -30
- package/dist/components/illustrationprovider/illustrationprovider.component.d.ts +14 -24
- package/dist/components/illustrationprovider/illustrationprovider.component.js +0 -23
- package/dist/components/input/input.component.d.ts +21 -16
- package/dist/components/input/input.component.js +0 -11
- package/dist/components/inputchip/inputchip.component.d.ts +19 -13
- package/dist/components/inputchip/inputchip.component.js +0 -7
- package/dist/components/link/link.component.d.ts +18 -12
- package/dist/components/link/link.component.js +1 -9
- package/dist/components/linkbutton/linkbutton.component.d.ts +19 -12
- package/dist/components/linkbutton/linkbutton.component.js +1 -8
- package/dist/components/linksimple/linksimple.component.d.ts +17 -10
- package/dist/components/linksimple/linksimple.component.js +0 -7
- package/dist/components/list/list.component.d.ts +17 -7
- package/dist/components/list/list.component.js +0 -5
- package/dist/components/listbox/listbox.component.d.ts +21 -16
- package/dist/components/listbox/listbox.component.js +1 -11
- package/dist/components/listheader/listheader.component.d.ts +14 -6
- package/dist/components/listheader/listheader.component.js +0 -3
- package/dist/components/listitem/listitem.component.d.ts +20 -18
- package/dist/components/listitem/listitem.component.js +0 -13
- package/dist/components/marker/marker.component.d.ts +15 -16
- package/dist/components/marker/marker.component.js +0 -15
- package/dist/components/menubar/menubar.component.d.ts +12 -19
- package/dist/components/menubar/menubar.component.js +0 -19
- package/dist/components/menuitem/menuitem.component.d.ts +18 -19
- package/dist/components/menuitem/menuitem.component.js +1 -15
- package/dist/components/menuitemcheckbox/menuitemcheckbox.component.d.ts +19 -30
- package/dist/components/menuitemcheckbox/menuitemcheckbox.component.js +1 -25
- package/dist/components/menuitemradio/menuitemradio.component.d.ts +18 -31
- package/dist/components/menuitemradio/menuitemradio.component.js +1 -26
- package/dist/components/menupopover/menupopover.component.d.ts +16 -38
- package/dist/components/menupopover/menupopover.component.js +0 -34
- package/dist/components/menusection/menusection.component.d.ts +16 -12
- package/dist/components/menusection/menusection.component.js +0 -8
- package/dist/components/navmenuitem/navmenuitem.component.d.ts +16 -15
- package/dist/components/navmenuitem/navmenuitem.component.js +0 -11
- package/dist/components/optgroup/optgroup.component.d.ts +17 -7
- package/dist/components/optgroup/optgroup.component.js +1 -3
- package/dist/components/option/option.component.d.ts +17 -19
- package/dist/components/option/option.component.js +1 -15
- package/dist/components/password/password.component.d.ts +18 -17
- package/dist/components/password/password.component.js +0 -11
- package/dist/components/popover/popover.component.d.ts +20 -52
- package/dist/components/popover/popover.component.js +1 -47
- package/dist/components/presence/presence.component.d.ts +17 -10
- package/dist/components/presence/presence.component.js +1 -7
- package/dist/components/progressbar/progressbar.component.d.ts +17 -13
- package/dist/components/progressbar/progressbar.component.js +0 -9
- package/dist/components/progressspinner/progressspinner.component.d.ts +14 -19
- package/dist/components/progressspinner/progressspinner.component.js +0 -17
- package/dist/components/radio/radio.component.d.ts +19 -41
- package/dist/components/radio/radio.component.js +1 -37
- package/dist/components/radiogroup/radiogroup.component.d.ts +12 -5
- package/dist/components/radiogroup/radiogroup.component.js +0 -4
- package/dist/components/responsivesettingsprovider/responsivesettingsprovider.component.d.ts +11 -29
- package/dist/components/responsivesettingsprovider/responsivesettingsprovider.component.js +0 -29
- package/dist/components/screenreaderannouncer/screenreaderannouncer.component.d.ts +12 -51
- package/dist/components/screenreaderannouncer/screenreaderannouncer.component.js +0 -51
- package/dist/components/searchfield/searchfield.component.d.ts +16 -24
- package/dist/components/searchfield/searchfield.component.js +0 -20
- package/dist/components/searchpopover/searchpopover.component.d.ts +16 -20
- package/dist/components/searchpopover/searchpopover.component.js +0 -16
- package/dist/components/select/select.component.d.ts +23 -19
- package/dist/components/select/select.component.js +1 -14
- package/dist/components/selectlistbox/selectlistbox.component.d.ts +12 -8
- package/dist/components/selectlistbox/selectlistbox.component.js +0 -7
- package/dist/components/sidenavigation/sidenavigation.component.d.ts +21 -41
- package/dist/components/sidenavigation/sidenavigation.component.js +1 -35
- package/dist/components/skeleton/skeleton.component.d.ts +14 -15
- package/dist/components/skeleton/skeleton.component.js +0 -13
- package/dist/components/slider/slider.component.d.ts +17 -15
- package/dist/components/slider/slider.component.js +0 -11
- package/dist/components/spatialnavigationprovider/spatialnavigationprovider.component.d.ts +15 -215
- package/dist/components/spatialnavigationprovider/spatialnavigationprovider.component.js +1 -215
- package/dist/components/spinner/spinner.component.d.ts +15 -27
- package/dist/components/spinner/spinner.component.js +0 -25
- package/dist/components/staticcheckbox/staticcheckbox.component.d.ts +16 -21
- package/dist/components/staticcheckbox/staticcheckbox.component.js +0 -17
- package/dist/components/staticchip/staticchip.component.d.ts +17 -8
- package/dist/components/staticchip/staticchip.component.js +0 -5
- package/dist/components/staticradio/staticradio.component.d.ts +15 -19
- package/dist/components/staticradio/staticradio.component.js +0 -16
- package/dist/components/statictoggle/statictoggle.component.d.ts +16 -21
- package/dist/components/statictoggle/statictoggle.component.js +0 -17
- package/dist/components/stepper/stepper.component.d.ts +13 -5
- package/dist/components/stepper/stepper.component.js +0 -3
- package/dist/components/stepperconnector/stepperconnector.component.d.ts +13 -6
- package/dist/components/stepperconnector/stepperconnector.component.js +0 -4
- package/dist/components/stepperitem/stepperitem.component.d.ts +16 -14
- package/dist/components/stepperitem/stepperitem.component.js +1 -10
- package/dist/components/tab/tab.component.d.ts +20 -23
- package/dist/components/tab/tab.component.js +1 -16
- package/dist/components/tablist/tablist.component.d.ts +18 -30
- package/dist/components/tablist/tablist.component.js +0 -24
- package/dist/components/text/text.component.d.ts +12 -13
- package/dist/components/text/text.component.js +0 -12
- package/dist/components/textarea/textarea.component.d.ts +17 -39
- package/dist/components/textarea/textarea.component.js +0 -34
- package/dist/components/themeprovider/themeprovider.component.d.ts +13 -27
- package/dist/components/themeprovider/themeprovider.component.js +0 -25
- package/dist/components/timepicker/timepicker.component.d.ts +17 -19
- package/dist/components/timepicker/timepicker.component.js +0 -14
- package/dist/components/toast/toast.component.d.ts +20 -12
- package/dist/components/toast/toast.component.js +1 -7
- package/dist/components/toggle/toggle.component.d.ts +18 -24
- package/dist/components/toggle/toggle.component.js +1 -21
- package/dist/components/toggletip/toggletip.component.d.ts +18 -28
- package/dist/components/toggletip/toggletip.component.js +1 -24
- package/dist/components/tooltip/tooltip.component.d.ts +16 -16
- package/dist/components/tooltip/tooltip.component.js +0 -13
- package/dist/components/typewriter/typewriter.component.d.ts +18 -34
- package/dist/components/typewriter/typewriter.component.js +1 -31
- package/dist/components/verticaltablist/verticaltablist.component.d.ts +17 -30
- package/dist/components/verticaltablist/verticaltablist.component.js +0 -26
- package/dist/components/virtualizedlist/virtualizedlist.component.d.ts +16 -58
- package/dist/components/virtualizedlist/virtualizedlist.component.js +0 -55
- package/dist/custom-elements.json +190 -190
- package/dist/react/accordion/index.d.ts +15 -5
- package/dist/react/accordionbutton/index.d.ts +14 -26
- package/dist/react/accordionbutton/index.js +0 -22
- package/dist/react/accordiongroup/index.d.ts +12 -16
- package/dist/react/accordiongroup/index.js +0 -14
- package/dist/react/alertchip/index.d.ts +15 -11
- package/dist/react/alertchip/index.js +0 -7
- package/dist/react/animation/index.d.ts +14 -6
- package/dist/react/animation/index.js +0 -5
- package/dist/react/announcementdialog/index.d.ts +18 -25
- package/dist/react/announcementdialog/index.js +1 -20
- package/dist/react/appheader/index.d.ts +13 -12
- package/dist/react/appheader/index.js +0 -9
- package/dist/react/avatar/index.d.ts +14 -34
- package/dist/react/avatar/index.js +1 -31
- package/dist/react/avatarbutton/index.d.ts +15 -14
- package/dist/react/avatarbutton/index.js +1 -10
- package/dist/react/badge/index.d.ts +16 -20
- package/dist/react/badge/index.js +1 -17
- package/dist/react/banner/index.d.ts +17 -17
- package/dist/react/banner/index.js +1 -13
- package/dist/react/brandvisual/index.d.ts +15 -12
- package/dist/react/brandvisual/index.js +0 -10
- package/dist/react/bullet/index.d.ts +15 -16
- package/dist/react/bullet/index.js +0 -15
- package/dist/react/button/index.d.ts +21 -52
- package/dist/react/button/index.js +1 -47
- package/dist/react/buttongroup/index.d.ts +17 -20
- package/dist/react/buttongroup/index.js +0 -17
- package/dist/react/buttonlink/index.d.ts +19 -16
- package/dist/react/buttonlink/index.js +1 -11
- package/dist/react/buttonsimple/index.d.ts +16 -25
- package/dist/react/buttonsimple/index.js +0 -22
- package/dist/react/calendar/index.d.ts +17 -11
- package/dist/react/calendar/index.js +0 -8
- package/dist/react/card/index.d.ts +18 -17
- package/dist/react/card/index.js +0 -13
- package/dist/react/cardbutton/index.d.ts +20 -14
- package/dist/react/cardbutton/index.js +0 -9
- package/dist/react/cardcheckbox/index.d.ts +20 -19
- package/dist/react/cardcheckbox/index.js +0 -14
- package/dist/react/cardradio/index.d.ts +20 -20
- package/dist/react/cardradio/index.js +0 -15
- package/dist/react/checkbox/index.d.ts +22 -26
- package/dist/react/checkbox/index.js +1 -22
- package/dist/react/chip/index.d.ts +20 -13
- package/dist/react/chip/index.js +0 -9
- package/dist/react/coachmark/index.d.ts +22 -22
- package/dist/react/coachmark/index.js +1 -18
- package/dist/react/combobox/index.d.ts +27 -37
- package/dist/react/combobox/index.js +1 -32
- package/dist/react/controltypeprovider/index.d.ts +19 -11
- package/dist/react/controltypeprovider/index.js +0 -10
- package/dist/react/datepicker/index.d.ts +20 -14
- package/dist/react/datepicker/index.js +0 -9
- package/dist/react/dialog/index.d.ts +25 -40
- package/dist/react/dialog/index.js +1 -35
- package/dist/react/divider/index.d.ts +23 -25
- package/dist/react/divider/index.js +0 -23
- package/dist/react/filterchip/index.d.ts +20 -9
- package/dist/react/filterchip/index.js +0 -5
- package/dist/react/formfieldgroup/index.d.ts +18 -19
- package/dist/react/formfieldgroup/index.js +0 -15
- package/dist/react/formfieldwrapper/index.d.ts +16 -8
- package/dist/react/formfieldwrapper/index.js +0 -4
- package/dist/react/icon/index.d.ts +16 -41
- package/dist/react/icon/index.js +0 -39
- package/dist/react/iconprovider/index.d.ts +14 -24
- package/dist/react/iconprovider/index.js +0 -23
- package/dist/react/illustration/index.d.ts +16 -32
- package/dist/react/illustration/index.js +0 -30
- package/dist/react/illustrationprovider/index.d.ts +14 -24
- package/dist/react/illustrationprovider/index.js +0 -23
- package/dist/react/input/index.d.ts +21 -16
- package/dist/react/input/index.js +0 -11
- package/dist/react/inputchip/index.d.ts +19 -13
- package/dist/react/inputchip/index.js +0 -7
- package/dist/react/link/index.d.ts +18 -12
- package/dist/react/link/index.js +1 -9
- package/dist/react/linkbutton/index.d.ts +19 -12
- package/dist/react/linkbutton/index.js +1 -8
- package/dist/react/linksimple/index.d.ts +17 -10
- package/dist/react/linksimple/index.js +0 -7
- package/dist/react/list/index.d.ts +17 -7
- package/dist/react/list/index.js +0 -5
- package/dist/react/listbox/index.d.ts +21 -16
- package/dist/react/listbox/index.js +1 -11
- package/dist/react/listheader/index.d.ts +14 -6
- package/dist/react/listheader/index.js +0 -3
- package/dist/react/listitem/index.d.ts +20 -18
- package/dist/react/listitem/index.js +0 -13
- package/dist/react/marker/index.d.ts +15 -16
- package/dist/react/marker/index.js +0 -15
- package/dist/react/menubar/index.d.ts +12 -19
- package/dist/react/menubar/index.js +0 -19
- package/dist/react/menuitem/index.d.ts +18 -19
- package/dist/react/menuitem/index.js +1 -15
- package/dist/react/menuitemcheckbox/index.d.ts +19 -30
- package/dist/react/menuitemcheckbox/index.js +1 -25
- package/dist/react/menuitemradio/index.d.ts +18 -31
- package/dist/react/menuitemradio/index.js +1 -26
- package/dist/react/menupopover/index.d.ts +16 -38
- package/dist/react/menupopover/index.js +0 -34
- package/dist/react/menusection/index.d.ts +16 -12
- package/dist/react/menusection/index.js +0 -8
- package/dist/react/navmenuitem/index.d.ts +16 -15
- package/dist/react/navmenuitem/index.js +0 -11
- package/dist/react/optgroup/index.d.ts +17 -7
- package/dist/react/optgroup/index.js +1 -3
- package/dist/react/option/index.d.ts +17 -19
- package/dist/react/option/index.js +1 -15
- package/dist/react/password/index.d.ts +18 -17
- package/dist/react/password/index.js +0 -11
- package/dist/react/popover/index.d.ts +20 -52
- package/dist/react/popover/index.js +1 -47
- package/dist/react/presence/index.d.ts +17 -10
- package/dist/react/presence/index.js +1 -7
- package/dist/react/progressbar/index.d.ts +17 -13
- package/dist/react/progressbar/index.js +0 -9
- package/dist/react/progressspinner/index.d.ts +14 -19
- package/dist/react/progressspinner/index.js +0 -17
- package/dist/react/radio/index.d.ts +19 -41
- package/dist/react/radio/index.js +1 -37
- package/dist/react/radiogroup/index.d.ts +12 -5
- package/dist/react/radiogroup/index.js +0 -4
- package/dist/react/responsivesettingsprovider/index.d.ts +11 -29
- package/dist/react/responsivesettingsprovider/index.js +0 -29
- package/dist/react/screenreaderannouncer/index.d.ts +12 -51
- package/dist/react/screenreaderannouncer/index.js +0 -51
- package/dist/react/searchfield/index.d.ts +16 -24
- package/dist/react/searchfield/index.js +0 -20
- package/dist/react/searchpopover/index.d.ts +16 -20
- package/dist/react/searchpopover/index.js +0 -16
- package/dist/react/select/index.d.ts +23 -19
- package/dist/react/select/index.js +1 -14
- package/dist/react/selectlistbox/index.d.ts +12 -8
- package/dist/react/selectlistbox/index.js +0 -7
- package/dist/react/sidenavigation/index.d.ts +21 -41
- package/dist/react/sidenavigation/index.js +1 -35
- package/dist/react/skeleton/index.d.ts +14 -15
- package/dist/react/skeleton/index.js +0 -13
- package/dist/react/slider/index.d.ts +17 -15
- package/dist/react/slider/index.js +0 -11
- package/dist/react/spatialnavigationprovider/index.d.ts +15 -215
- package/dist/react/spatialnavigationprovider/index.js +1 -214
- package/dist/react/spinner/index.d.ts +15 -27
- package/dist/react/spinner/index.js +0 -25
- package/dist/react/staticcheckbox/index.d.ts +16 -21
- package/dist/react/staticcheckbox/index.js +0 -17
- package/dist/react/staticchip/index.d.ts +17 -8
- package/dist/react/staticchip/index.js +0 -5
- package/dist/react/staticradio/index.d.ts +15 -19
- package/dist/react/staticradio/index.js +0 -16
- package/dist/react/statictoggle/index.d.ts +16 -21
- package/dist/react/statictoggle/index.js +0 -17
- package/dist/react/stepper/index.d.ts +13 -5
- package/dist/react/stepper/index.js +0 -3
- package/dist/react/stepperconnector/index.d.ts +13 -6
- package/dist/react/stepperconnector/index.js +0 -4
- package/dist/react/stepperitem/index.d.ts +16 -14
- package/dist/react/stepperitem/index.js +1 -10
- package/dist/react/tab/index.d.ts +20 -23
- package/dist/react/tab/index.js +1 -16
- package/dist/react/tablist/index.d.ts +18 -30
- package/dist/react/tablist/index.js +0 -24
- package/dist/react/text/index.d.ts +12 -13
- package/dist/react/text/index.js +0 -12
- package/dist/react/textarea/index.d.ts +17 -39
- package/dist/react/textarea/index.js +0 -34
- package/dist/react/themeprovider/index.d.ts +13 -27
- package/dist/react/themeprovider/index.js +0 -25
- package/dist/react/timepicker/index.d.ts +17 -19
- package/dist/react/timepicker/index.js +0 -14
- package/dist/react/toast/index.d.ts +20 -12
- package/dist/react/toast/index.js +1 -7
- package/dist/react/toggle/index.d.ts +18 -24
- package/dist/react/toggle/index.js +1 -21
- package/dist/react/toggletip/index.d.ts +18 -28
- package/dist/react/toggletip/index.js +1 -24
- package/dist/react/tooltip/index.d.ts +16 -16
- package/dist/react/tooltip/index.js +0 -13
- package/dist/react/typewriter/index.d.ts +18 -34
- package/dist/react/typewriter/index.js +1 -31
- package/dist/react/verticaltablist/index.d.ts +17 -30
- package/dist/react/verticaltablist/index.js +0 -26
- package/dist/react/virtualizedlist/index.d.ts +16 -58
- package/dist/react/virtualizedlist/index.js +0 -55
- package/dist/utils/dom.js +1 -1
- package/package.json +1 -1
|
@@ -4,59 +4,37 @@ import type { AutoCapitalizeType } from '../input/input.types';
|
|
|
4
4
|
import type { WrapType, AutoCompleteType } from './textarea.types';
|
|
5
5
|
declare const Textarea_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/CharacterLimitMixin").CharacterLimitMixinInterface> & 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<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;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* -
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* - maxCharacterLimit - the maximum number of characters allowed in the textarea field,
|
|
20
|
-
* - value - the current value of the textarea field,
|
|
21
|
-
*
|
|
22
|
-
* **Note**: Consumers must set the help-text-type with 'error' and
|
|
23
|
-
* help-text attribute with the error message using limitexceeded event.
|
|
24
|
-
* The same help-text value will be used for the validation message to be displayed.
|
|
25
|
-
*
|
|
26
|
-
* ### Accessibility
|
|
27
|
-
*
|
|
28
|
-
* #### Resize
|
|
29
|
-
*
|
|
30
|
-
* Accessible text area resizing can be turned on with the `resizable`.
|
|
31
|
-
* It is strongly recommended to set the `resize-button-aria-label` attribute as well to describe what it is and what are the shortcuts (up/down arrows) of the button.
|
|
32
|
-
*
|
|
33
|
-
* #### Best practices
|
|
34
|
-
*
|
|
35
|
-
* - Always provide a `label` for screen readers to identify the textarea's purpose
|
|
36
|
-
* - Use `help-text` to provide additional context or instructions
|
|
37
|
-
* - When using `max-character-limit`, consider providing `character-limit-announcement` for screen reader updates
|
|
38
|
-
* - Use appropriate `help-text-type` (error, warning, success) to convey validation state
|
|
39
|
-
* - Ensure `validation-message` is set for form validation errors
|
|
40
|
-
*
|
|
7
|
+
* The textarea is a form-associated multi-line text input. It renders a label, an optional info toggletip, the multi-line input, an optional character counter, helper or validation text, and an optional resize button that grows or shrinks the visible rows.
|
|
8
|
+
*
|
|
9
|
+
* **When to use**
|
|
10
|
+
*
|
|
11
|
+
* - Use when users need to enter free-form text that may span multiple lines (messages, comments, descriptions).
|
|
12
|
+
* - Use when you want consistent label, helper-text, validation, and character-count chrome around a multi-line input.
|
|
13
|
+
*
|
|
14
|
+
* **When not to use**
|
|
15
|
+
*
|
|
16
|
+
* - Do not use for short, single-line inputs — use `mdc-input` instead.
|
|
17
|
+
* - Do not use for structured values (email, time, password); use the dedicated form components.
|
|
18
|
+
*
|
|
41
19
|
* @tagname mdc-textarea
|
|
42
|
-
*
|
|
20
|
+
*
|
|
43
21
|
* @event input - (React: onInput) This event is dispatched when the value of the textarea field changes (every press).
|
|
44
22
|
* @event change - (React: onChange) This event is dispatched when the value of the textarea field changes (on blur).
|
|
45
23
|
* @event focus - (React: onFocus) This event is dispatched when the textarea receives focus.
|
|
46
24
|
* @event blur - (React: onBlur) This event is dispatched when the textarea loses focus.
|
|
47
25
|
* @event limitexceeded - (React: onLimitExceeded) This event is dispatched once when the character limit
|
|
48
26
|
* exceeds or restored.
|
|
49
|
-
*
|
|
27
|
+
*
|
|
50
28
|
* @dependency mdc-button
|
|
51
29
|
* @dependency mdc-icon
|
|
52
30
|
* @dependency mdc-text
|
|
53
31
|
* @dependency mdc-toggletip
|
|
54
|
-
*
|
|
32
|
+
*
|
|
55
33
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
56
34
|
* @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.
|
|
57
35
|
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
|
58
36
|
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
|
59
|
-
*
|
|
37
|
+
*
|
|
60
38
|
* @csspart label - The label element.
|
|
61
39
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
62
40
|
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
@@ -70,7 +48,7 @@ declare const Textarea_base: import("../../utils/mixins/index.types").Constructo
|
|
|
70
48
|
* @csspart help-text - The helper/validation text element.
|
|
71
49
|
* @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.
|
|
72
50
|
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
73
|
-
*
|
|
51
|
+
*
|
|
74
52
|
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
75
53
|
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
76
54
|
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
@@ -22,40 +22,6 @@ import { CharacterLimitMixin } from '../../utils/mixins/CharacterLimitMixin';
|
|
|
22
22
|
import { AUTO_COMPLETE, WRAP, DEFAULTS } from './textarea.constants';
|
|
23
23
|
import styles from './textarea.styles';
|
|
24
24
|
/**
|
|
25
|
-
* mdc-textarea component, which is used to get the multi-line text input from the user.
|
|
26
|
-
* It contains:
|
|
27
|
-
* - label: It is the title of the textarea field.
|
|
28
|
-
* - required: A boolean attribute depicting that the textarea field is required.
|
|
29
|
-
* - Textarea: It is the multi-line text input field.
|
|
30
|
-
* - helper-text: It is the text that provides additional information about the textarea field.
|
|
31
|
-
* - max-character-limit: It is the text that shows the character count of the textarea field.
|
|
32
|
-
* - Error, Warning, Success, Priority Help Text type: It is the text that provides additional information
|
|
33
|
-
* about the textarea field based on the validation state.
|
|
34
|
-
* - limitexceeded: It is the event that is dispatched when the character limit exceeds or restored.
|
|
35
|
-
* This event exposes 3 properties:
|
|
36
|
-
* - currentCharacterCount - the current number of characters in the textarea field,
|
|
37
|
-
* - maxCharacterLimit - the maximum number of characters allowed in the textarea field,
|
|
38
|
-
* - value - the current value of the textarea field,
|
|
39
|
-
*
|
|
40
|
-
* **Note**: Consumers must set the help-text-type with 'error' and
|
|
41
|
-
* help-text attribute with the error message using limitexceeded event.
|
|
42
|
-
* The same help-text value will be used for the validation message to be displayed.
|
|
43
|
-
*
|
|
44
|
-
* ### Accessibility
|
|
45
|
-
*
|
|
46
|
-
* #### Resize
|
|
47
|
-
*
|
|
48
|
-
* Accessible text area resizing can be turned on with the `resizable`.
|
|
49
|
-
* It is strongly recommended to set the `resize-button-aria-label` attribute as well to describe what it is and what are the shortcuts (up/down arrows) of the button.
|
|
50
|
-
*
|
|
51
|
-
* #### Best practices
|
|
52
|
-
*
|
|
53
|
-
* - Always provide a `label` for screen readers to identify the textarea's purpose
|
|
54
|
-
* - Use `help-text` to provide additional context or instructions
|
|
55
|
-
* - When using `max-character-limit`, consider providing `character-limit-announcement` for screen reader updates
|
|
56
|
-
* - Use appropriate `help-text-type` (error, warning, success) to convey validation state
|
|
57
|
-
* - Ensure `validation-message` is set for form validation errors
|
|
58
|
-
*
|
|
59
25
|
* @tagname mdc-textarea
|
|
60
26
|
*
|
|
61
27
|
* @event input - (React: onInput) This event is dispatched when the value of the textarea field changes (every press).
|
|
@@ -2,35 +2,21 @@ import { CSSResult } from 'lit';
|
|
|
2
2
|
import { Provider } from '../../models';
|
|
3
3
|
import ThemeProviderContext from './themeprovider.context';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `mds-theme-stable-darkIndigoWebex`, `mds-theme-stable-lightIndigoWebex`
|
|
18
|
-
*
|
|
19
|
-
* `mds-theme-stable-darkJadeWebex`, `mds-theme-stable-lightJadeWebex`
|
|
20
|
-
*
|
|
21
|
-
* `mds-theme-stable-darkLavenderWebex`, `mds-theme-stable-lightLavenderWebex`
|
|
22
|
-
*
|
|
23
|
-
* `mds-theme-stable-darkRoseWebex`, `mds-theme-stable-lightRoseWebex`
|
|
24
|
-
*
|
|
25
|
-
* Themeclass context can be be consumed from Lit child components
|
|
26
|
-
* (see providerUtils.consume for how to consume)
|
|
27
|
-
*
|
|
28
|
-
* ThemeProvider also includes basic font defaults for text.
|
|
29
|
-
*
|
|
5
|
+
* The theme provider applies a Momentum theme class to its host element and exposes it as a context for descendant Lit components. CSS variables defined by the theme class drive token-based styling (colour, fonts, scrollbar). It also sets sensible defaults for text rendering (font family, weight, default text colour).
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Wrap the section of the app that should render with Momentum tokens. A single provider at the application root is the most common pattern.
|
|
10
|
+
* - Use nested providers to render a region (for example a modal or preview pane) with a different theme — switching themes adds the new class and removes the previous one automatically.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Do not use to scope behaviour unrelated to theming.
|
|
15
|
+
*
|
|
30
16
|
* @tagname mdc-themeprovider
|
|
31
|
-
*
|
|
17
|
+
*
|
|
32
18
|
* @slot - children
|
|
33
|
-
*
|
|
19
|
+
*
|
|
34
20
|
* @cssproperty --mdc-themeprovider-color-default - Option to override the default color,
|
|
35
21
|
* default: color-theme-text-primary-normal
|
|
36
22
|
* @cssproperty --mdc-themeprovider-font-family - Option to override the font family,
|
|
@@ -13,31 +13,6 @@ import { DEFAULTS } from './themeprovider.constants';
|
|
|
13
13
|
import ThemeProviderContext from './themeprovider.context';
|
|
14
14
|
import styles from './themeprovider.styles';
|
|
15
15
|
/**
|
|
16
|
-
* ThemeProvider component, which sets the passed in themeclass as class.
|
|
17
|
-
* If the themeclass switches, the existing themeclass will be removed as a class
|
|
18
|
-
* and the new themeclass will be added.
|
|
19
|
-
*
|
|
20
|
-
* CSS variables defined in the themeclass will be used for the styling of child dom nodes.
|
|
21
|
-
*
|
|
22
|
-
* Available Momentum theme classes:
|
|
23
|
-
*
|
|
24
|
-
* `mds-theme-stable-darkWebex`, `mds-theme-stable-lightWebex`
|
|
25
|
-
*
|
|
26
|
-
* `mds-theme-stable-darkBronzeWebex`, `mds-theme-stable-lightBronzeWebex`
|
|
27
|
-
*
|
|
28
|
-
* `mds-theme-stable-darkIndigoWebex`, `mds-theme-stable-lightIndigoWebex`
|
|
29
|
-
*
|
|
30
|
-
* `mds-theme-stable-darkJadeWebex`, `mds-theme-stable-lightJadeWebex`
|
|
31
|
-
*
|
|
32
|
-
* `mds-theme-stable-darkLavenderWebex`, `mds-theme-stable-lightLavenderWebex`
|
|
33
|
-
*
|
|
34
|
-
* `mds-theme-stable-darkRoseWebex`, `mds-theme-stable-lightRoseWebex`
|
|
35
|
-
*
|
|
36
|
-
* Themeclass context can be be consumed from Lit child components
|
|
37
|
-
* (see providerUtils.consume for how to consume)
|
|
38
|
-
*
|
|
39
|
-
* ThemeProvider also includes basic font defaults for text.
|
|
40
|
-
*
|
|
41
16
|
* @tagname mdc-themeprovider
|
|
42
17
|
*
|
|
43
18
|
* @slot - children
|
|
@@ -7,46 +7,44 @@ import type { IconNames } from '../icon/icon.types';
|
|
|
7
7
|
import type { OptionLabelFormatter, Placement, TimeFormat } from './timepicker.types';
|
|
8
8
|
declare const TimePicker_base: 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
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* -
|
|
21
|
-
*
|
|
22
|
-
* - Selecting a predefined time from the dropdown menu
|
|
23
|
-
*
|
|
10
|
+
* The time picker is a composite form control for selecting a time. It exposes hour, minute, and (in 12-hour mode) AM/PM segments as ARIA spinbuttons that accept arrow-key adjustments and direct digit input, plus a dropdown arrow button that opens a list of preset times at a configurable interval.
|
|
11
|
+
*
|
|
12
|
+
* **When to use**
|
|
13
|
+
*
|
|
14
|
+
* - Use when users need to enter or pick a time of day, manually or from a preset list.
|
|
15
|
+
* - Use inside a form when the time value should participate in form submission and validation.
|
|
16
|
+
*
|
|
17
|
+
* **When not to use**
|
|
18
|
+
*
|
|
19
|
+
* - Do not use for date selection — use `mdc-datepicker` instead.
|
|
20
|
+
* - Do not use when you only need a free-form text field.
|
|
21
|
+
*
|
|
24
22
|
* @tagname mdc-timepicker
|
|
25
|
-
*
|
|
23
|
+
*
|
|
26
24
|
* @dependency mdc-button
|
|
27
25
|
* @dependency mdc-icon
|
|
28
26
|
* @dependency mdc-option
|
|
29
27
|
* @dependency mdc-popover
|
|
30
28
|
* @dependency mdc-text
|
|
31
29
|
* @dependency mdc-toggletip
|
|
32
|
-
*
|
|
30
|
+
*
|
|
33
31
|
* @event input - (React: onInput) This event is dispatched when the time value changes.
|
|
34
32
|
* @event change - (React: onChange) This event is dispatched when the time value is committed.
|
|
35
33
|
* @event focus - (React: onFocus) This event is dispatched when the timepicker receives focus.
|
|
36
34
|
* @event blur - (React: onBlur) This event is dispatched when the timepicker loses focus.
|
|
37
|
-
*
|
|
35
|
+
*
|
|
38
36
|
* @slot label - Slot for the label element.
|
|
39
37
|
* @slot toggletip - Slot for the toggletip info icon button.
|
|
40
38
|
* @slot help-icon - Slot for the helper/validation icon.
|
|
41
39
|
* @slot help-text - Slot for the helper/validation text.
|
|
42
|
-
*
|
|
40
|
+
*
|
|
43
41
|
* @cssproperty --mdc-timepicker-background-color - Background color of the timepicker input.
|
|
44
42
|
* @cssproperty --mdc-timepicker-border-color - Border color of the timepicker input.
|
|
45
43
|
* @cssproperty --mdc-timepicker-text-color - Text color of the timepicker input.
|
|
46
44
|
* @cssproperty --mdc-timepicker-height - The height of the timepicker trigger control.
|
|
47
45
|
* @cssproperty --mdc-timepicker-width - Width of the timepicker component.
|
|
48
46
|
* @cssproperty --mdc-timepicker-listbox-height - The max-height of the dropdown listbox. Default shows ~6 items.
|
|
49
|
-
*
|
|
47
|
+
*
|
|
50
48
|
* @csspart label - The label element.
|
|
51
49
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
52
50
|
* @csspart required-indicator - The required indicator element.
|
|
@@ -18,20 +18,6 @@ import { POPOVER_PLACEMENT, TRIGGER, DEFAULTS as POPOVER_DEFAULTS } from '../pop
|
|
|
18
18
|
import { ARROW_ICON, DEFAULTS, TIME_FORMAT, TRIGGER_ID, LISTBOX_ID } from './timepicker.constants';
|
|
19
19
|
import styles from './timepicker.styles';
|
|
20
20
|
/**
|
|
21
|
-
* mdc-timepicker is a component that allows users to select a specific time
|
|
22
|
-
* or enter a time manually. It supports both 12-hour and 24-hour formats.
|
|
23
|
-
*
|
|
24
|
-
* The component consists of:
|
|
25
|
-
* - label - describes the time picker field
|
|
26
|
-
* - input field - made up of 2-3 spinbuttons (hours, minutes, optional AM/PM period)
|
|
27
|
-
* - dropdown arrow button - opens a flyout menu with predefined time intervals
|
|
28
|
-
* - helper text - displayed below the input field
|
|
29
|
-
*
|
|
30
|
-
* Users can input values by:
|
|
31
|
-
* - Manually entering numbers/characters in spinbuttons
|
|
32
|
-
* - Navigating using arrow keys to increment/decrement values
|
|
33
|
-
* - Selecting a predefined time from the dropdown menu
|
|
34
|
-
*
|
|
35
21
|
* @tagname mdc-timepicker
|
|
36
22
|
*
|
|
37
23
|
* @dependency mdc-button
|
|
@@ -5,27 +5,35 @@ import type { TagName } from '../text/text.types';
|
|
|
5
5
|
import type { ToastVariant } from './toast.types';
|
|
6
6
|
declare const Toast_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FooterMixin").FooterMixinInterface> & typeof Component;
|
|
7
7
|
/**
|
|
8
|
-
* `mdc-toast` is a lightweight, non-blocking alert used to inform users about application processes.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* `mdc-toast` is a lightweight, non-blocking alert used to inform users about application processes. It supports `success`, `warning`, `error`, and `custom` variants, can optionally collapse/expand a detailed body, and is designed to be controlled externally (the host application decides when to show, hide, or auto-dismiss it).
|
|
9
|
+
*
|
|
10
|
+
* **When to use**
|
|
11
|
+
*
|
|
12
|
+
* - Surface short status messages about background or asynchronous processes (success confirmations, recoverable errors, warnings).
|
|
13
|
+
* - Provide a place to expose primary/secondary actions tied to a transient notification (e.g. "Undo", "Retry").
|
|
14
|
+
* - Show detailed information that the user can optionally expand via a show more/show less toggle.
|
|
15
|
+
*
|
|
16
|
+
* **When not to use**
|
|
17
|
+
*
|
|
18
|
+
* - Use `mdc-banner` for persistent, in-flow messaging tied to a region of the page.
|
|
19
|
+
* - Use `mdc-announcementdialog` or `mdc-dialog` for modal interruptions that require acknowledgement.
|
|
20
|
+
* - Use `mdc-alertchip` for status indicators inline with content rather than a floating notification surface.
|
|
21
|
+
*
|
|
22
|
+
* @tagname mdc-toast
|
|
23
|
+
*
|
|
14
24
|
* @dependency mdc-icon
|
|
15
25
|
* @dependency mdc-text
|
|
16
26
|
* @dependency mdc-button
|
|
17
|
-
*
|
|
27
|
+
*
|
|
18
28
|
* @slot content-prefix - Slot for custom content before the icon (only for custom variant).
|
|
19
29
|
* @slot toast-body-normal - Slot for the main body content of the toast.
|
|
20
30
|
* @slot toast-body-detailed - Slot for additional detailed content, shown when expanded.
|
|
21
31
|
* @slot footer - Slot for custom footer content. Prefer using footer-button-primary and footer-button-secondary slots.
|
|
22
32
|
* @slot footer-button-primary - Slot for passing the primary variant of `mdc-button` in the footer.
|
|
23
33
|
* @slot footer-button-secondary - Slot for passing the secondary variant of `mdc-button` in the footer.
|
|
24
|
-
*
|
|
25
|
-
* @tagname mdc-toast
|
|
26
|
-
*
|
|
34
|
+
*
|
|
27
35
|
* @event close - (React: onClose) Dispatched when the Close Button is clicked using mouse or keyboard.
|
|
28
|
-
*
|
|
36
|
+
*
|
|
29
37
|
* @csspart content-container - The container for the toast's main content, including icon, text, and close button.
|
|
30
38
|
* @csspart toast-prefix-icon - The icon shown at the start of the toast, styled by variant.
|
|
31
39
|
* @csspart toast-content - The container for the header and body content of the toast.
|
|
@@ -34,7 +42,7 @@ declare const Toast_base: import("../../utils/mixins/index.types").Constructor<i
|
|
|
34
42
|
* @csspart footer-button-toggle - The toggle button for showing/hiding detailed content.
|
|
35
43
|
* @csspart toast-close-btn - The close button for the toast.
|
|
36
44
|
* @csspart has-footer-buttons - Applied to the footer when it contains buttons or a toggle button.
|
|
37
|
-
*
|
|
45
|
+
*
|
|
38
46
|
* @cssproperty --mdc-toast-background-color - Background color of the toast.
|
|
39
47
|
* @cssproperty --mdc-toast-border-color - Border color of the toast.
|
|
40
48
|
* @cssproperty --mdc-toast-header-text-color - Color of the header text in the toast.
|
|
@@ -18,11 +18,7 @@ import { DEFAULTS } from './toast.constants';
|
|
|
18
18
|
import { getIconNameForVariant } from './toast.utils';
|
|
19
19
|
import styles from './toast.styles';
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* It supports success, warning, error, and custom messages, and is designed to be controlled externally.
|
|
23
|
-
*
|
|
24
|
-
* **Note**: When using `slot="toast-body-normal"` and `slot="toast-body-detailed"`, it's strongly recommended to wrap the content with `<mdc-text tagname="span">`.
|
|
25
|
-
* If not used, ensure your custom content is styled appropriately to match the design and alignment expectations of the toast component.
|
|
21
|
+
* @tagname mdc-toast
|
|
26
22
|
*
|
|
27
23
|
* @dependency mdc-icon
|
|
28
24
|
* @dependency mdc-text
|
|
@@ -35,8 +31,6 @@ import styles from './toast.styles';
|
|
|
35
31
|
* @slot footer-button-primary - Slot for passing the primary variant of `mdc-button` in the footer.
|
|
36
32
|
* @slot footer-button-secondary - Slot for passing the secondary variant of `mdc-button` in the footer.
|
|
37
33
|
*
|
|
38
|
-
* @tagname mdc-toast
|
|
39
|
-
*
|
|
40
34
|
* @event close - (React: onClose) Dispatched when the Close Button is clicked using mouse or keyboard.
|
|
41
35
|
*
|
|
42
36
|
* @csspart content-container - The container for the toast's main content, including icon, text, and close button.
|
|
@@ -4,37 +4,31 @@ import FormfieldWrapper from '../formfieldwrapper';
|
|
|
4
4
|
import type { ToggleSize } from './toggle.types';
|
|
5
5
|
declare const Toggle_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyToActionMixin").KeyToActionInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/ControlTypeMixin").ControlTypeMixinInterface> & 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;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* -
|
|
20
|
-
*
|
|
21
|
-
* -
|
|
22
|
-
*
|
|
23
|
-
* ## Styling
|
|
24
|
-
* Use the `static-toggle` part to apply custom styles to the toggle switch visual element.
|
|
25
|
-
* This part exposes the underlying [StaticToggle](?path=/docs/components-decorator-statictoggle--docs) component for advanced styling.
|
|
26
|
-
*
|
|
7
|
+
* `mdc-toggle` is an interactive switch control used to flip between two mutually exclusive states, such as on/off or active/inactive. Changes take effect immediately and the component participates in HTML forms via the platform's element internals API.
|
|
8
|
+
*
|
|
9
|
+
* **When to use**
|
|
10
|
+
*
|
|
11
|
+
* - Binary settings where the change applies immediately (e.g. enabling a feature, switching a preference on or off).
|
|
12
|
+
* - Inside settings panels, preference dialogs, or forms where users need to flip a single option.
|
|
13
|
+
* - As a member of a group of related options grouped together via `mdc-formfieldgroup`.
|
|
14
|
+
*
|
|
15
|
+
* **When not to use**
|
|
16
|
+
*
|
|
17
|
+
* - Use `mdc-checkbox` for options that require an explicit submit step before they take effect, or for selecting multiple items from a list.
|
|
18
|
+
* - Use `mdc-radio` (with `mdc-radiogroup`) when a user must choose one of several mutually exclusive options.
|
|
19
|
+
* - Use `mdc-button` for one-off actions that don't represent a persistent state.
|
|
20
|
+
*
|
|
21
|
+
* @tagname mdc-toggle
|
|
22
|
+
*
|
|
27
23
|
* @dependency mdc-button
|
|
28
24
|
* @dependency mdc-icon
|
|
29
25
|
* @dependency mdc-statictoggle
|
|
30
26
|
* @dependency mdc-text
|
|
31
27
|
* @dependency mdc-toggletip
|
|
32
|
-
*
|
|
33
|
-
* @tagname mdc-toggle
|
|
34
|
-
*
|
|
28
|
+
*
|
|
35
29
|
* @event change - (React: onChange) Event that gets dispatched when the toggle state changes.
|
|
36
30
|
* @event focus - (React: onFocus) Event that gets dispatched when the toggle receives focus.
|
|
37
|
-
*
|
|
31
|
+
*
|
|
38
32
|
* @csspart label - The label element.
|
|
39
33
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
40
34
|
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
@@ -21,25 +21,7 @@ import { ACTIONS, KeyToActionMixin, NAV_MODES } from '../../utils/mixins/KeyToAc
|
|
|
21
21
|
import { DEFAULTS, TOGGLE_SIZE } from './toggle.constants';
|
|
22
22
|
import styles from './toggle.styles';
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* such as On/Off or Active/Inactive. It is commonly used in settings panels, forms, and preference selections
|
|
26
|
-
* where users need to enable or disable a feature.
|
|
27
|
-
*
|
|
28
|
-
* To create a group of toggles, use the `mdc-formfieldgroup` component.
|
|
29
|
-
*
|
|
30
|
-
* **Note:** This component internally renders a native checkbox input element with the `switch` role, styled as a toggle switch.
|
|
31
|
-
*
|
|
32
|
-
* ## When to use
|
|
33
|
-
* Use toggles for binary choices where the change takes effect immediately, such as enabling/disabling settings or features.
|
|
34
|
-
*
|
|
35
|
-
* ## Accessibility
|
|
36
|
-
* - Provide clear labels that describe what the toggle controls
|
|
37
|
-
* - Use `data-aria-label` when a visual label is not present
|
|
38
|
-
* - Keyboard navigation: Space to toggle, Tab to navigate, Enter to submit form
|
|
39
|
-
*
|
|
40
|
-
* ## Styling
|
|
41
|
-
* Use the `static-toggle` part to apply custom styles to the toggle switch visual element.
|
|
42
|
-
* This part exposes the underlying [StaticToggle](?path=/docs/components-decorator-statictoggle--docs) component for advanced styling.
|
|
24
|
+
* @tagname mdc-toggle
|
|
43
25
|
*
|
|
44
26
|
* @dependency mdc-button
|
|
45
27
|
* @dependency mdc-icon
|
|
@@ -47,8 +29,6 @@ import styles from './toggle.styles';
|
|
|
47
29
|
* @dependency mdc-text
|
|
48
30
|
* @dependency mdc-toggletip
|
|
49
31
|
*
|
|
50
|
-
* @tagname mdc-toggle
|
|
51
|
-
*
|
|
52
32
|
* @event change - (React: onChange) Event that gets dispatched when the toggle state changes.
|
|
53
33
|
* @event focus - (React: onFocus) Event that gets dispatched when the toggle receives focus.
|
|
54
34
|
*
|
|
@@ -2,43 +2,33 @@ import { CSSResult, PropertyValueMap } from 'lit';
|
|
|
2
2
|
import Popover from '../popover/popover.component';
|
|
3
3
|
import { PopoverPlacement } from '../popover/popover.types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* ## Accessibility
|
|
22
|
-
* - Toggletip content is announced to screen readers when shown
|
|
23
|
-
* - Use `screenreader-announcer-identity` attribute to control announcement placement in the DOM
|
|
24
|
-
* - Focus is trapped within the toggletip when open, allowing navigation of interactive elements
|
|
25
|
-
* - Keyboard shortcuts: Escape to close, Tab to move between elements
|
|
26
|
-
* - Focus returns to the trigger element when the toggletip is closed
|
|
27
|
-
*
|
|
5
|
+
* `mdc-toggletip` is a click-triggered overlay used to surface contextual help text or interactive content (links, buttons) next to a target element. It stays visible until the user dismisses it via the close button, an outside click, or the Escape key, and announces its content to screen readers when it appears.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Reveal additional information or interactive controls that the user needs time to read or interact with (e.g. an info button next to a form label).
|
|
10
|
+
* - Group an action with a small amount of explanatory content that should remain visible after the user opens it.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Use `mdc-tooltip` for short, non-interactive hints that should appear on hover or focus and disappear automatically.
|
|
15
|
+
* - Use `mdc-popover` directly when you need full control over trigger semantics, placement defaults, or behavior beyond a click-triggered tip.
|
|
16
|
+
* - Use `mdc-dialog` for modal flows that require explicit user acknowledgement or block the rest of the page.
|
|
17
|
+
*
|
|
18
|
+
* @tagname mdc-toggletip
|
|
19
|
+
*
|
|
28
20
|
* @dependency mdc-screenreaderannouncer
|
|
29
21
|
* @dependency mdc-button
|
|
30
|
-
*
|
|
31
|
-
* @tagname mdc-toggletip
|
|
32
|
-
*
|
|
22
|
+
*
|
|
33
23
|
* @event shown - (React: onShown) This event is dispatched when the toggletip is shown
|
|
34
24
|
* @event hidden - (React: onHidden) This event is dispatched when the toggletip is hidden
|
|
35
25
|
* @event created - (React: onCreated) This event is dispatched when the toggletip is created (added to the DOM)
|
|
36
26
|
* @event destroyed - (React: onDestroyed) This event is dispatched when the toggletip is destroyed (removed from the DOM)
|
|
37
|
-
*
|
|
27
|
+
*
|
|
38
28
|
* @cssproperty --mdc-toggletip-max-width - The maximum width of the toggletip.
|
|
39
29
|
* @cssproperty --mdc-toggletip-text-color - The text color of the toggletip.
|
|
40
30
|
* @cssproperty --mdc-toggletip-text-color-contrast - The text color of the toggletip when the color is contrast.
|
|
41
|
-
*
|
|
31
|
+
*
|
|
42
32
|
* @slot - Default slot for the toggletip content
|
|
43
33
|
*/
|
|
44
34
|
declare class ToggleTip extends Popover {
|
|
@@ -15,34 +15,11 @@ import { POPOVER_PLACEMENT } from '../popover/popover.constants';
|
|
|
15
15
|
import { DEFAULTS } from './toggletip.constants';
|
|
16
16
|
import styles from './toggletip.styles';
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* Unlike tooltips which disappear on blur, toggletips remain visible until explicitly dismissed
|
|
20
|
-
* by clicking outside, pressing escape, or clicking the optional close button.
|
|
21
|
-
*
|
|
22
|
-
* Toggletips are ideal for displaying contextual help text, additional information, or interactive
|
|
23
|
-
* elements like links and buttons that users need time to read and interact with.
|
|
24
|
-
*
|
|
25
|
-
* The component uses [mdc-screenreaderannouncer](?path=/docs/components-screenreaderannouncer--docs) internally to announce the toggletip content
|
|
26
|
-
* to screen readers when shown, ensuring proper accessibility support.
|
|
27
|
-
*
|
|
28
|
-
* **Note:** This component extends the Popover component with toggletip-specific defaults.
|
|
29
|
-
*
|
|
30
|
-
* ## When to use
|
|
31
|
-
* Use toggletips when you need to display interactive content or detailed information that requires
|
|
32
|
-
* user interaction. For simple, non-interactive text hints, use tooltips instead.
|
|
33
|
-
*
|
|
34
|
-
* ## Accessibility
|
|
35
|
-
* - Toggletip content is announced to screen readers when shown
|
|
36
|
-
* - Use `screenreader-announcer-identity` attribute to control announcement placement in the DOM
|
|
37
|
-
* - Focus is trapped within the toggletip when open, allowing navigation of interactive elements
|
|
38
|
-
* - Keyboard shortcuts: Escape to close, Tab to move between elements
|
|
39
|
-
* - Focus returns to the trigger element when the toggletip is closed
|
|
18
|
+
* @tagname mdc-toggletip
|
|
40
19
|
*
|
|
41
20
|
* @dependency mdc-screenreaderannouncer
|
|
42
21
|
* @dependency mdc-button
|
|
43
22
|
*
|
|
44
|
-
* @tagname mdc-toggletip
|
|
45
|
-
*
|
|
46
23
|
* @event shown - (React: onShown) This event is dispatched when the toggletip is shown
|
|
47
24
|
* @event hidden - (React: onHidden) This event is dispatched when the toggletip is hidden
|
|
48
25
|
* @event created - (React: onCreated) This event is dispatched when the toggletip is created (added to the DOM)
|
|
@@ -3,31 +3,31 @@ import type { CSSResult } from 'lit';
|
|
|
3
3
|
import Popover from '../popover/popover.component';
|
|
4
4
|
import type { TooltipType } from './tooltip.types';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
6
|
+
* `mdc-tooltip` is a lightweight overlay that surfaces a short, non-interactive hint about a target element. It opens on hover or keyboard focus of the trigger and disappears when the pointer leaves or focus moves away. It can be configured to act as the trigger's accessible description, label, or as a purely visual hint.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Reveal short, text-only context for a control whose purpose isn't fully clear from its visual presentation (e.g. icon-only buttons).
|
|
11
|
+
* - Provide an accessible name or description for a trigger that has no visible label.
|
|
12
|
+
* - Show the full text of a truncated label only when it is actually overflowing.
|
|
13
|
+
*
|
|
14
|
+
* **When not to use**
|
|
15
|
+
*
|
|
16
|
+
* - Use `mdc-toggletip` when the content needs to remain visible after activation or includes interactive elements (links, buttons).
|
|
17
|
+
* - Use `mdc-popover` for richer overlay content, click-triggered surfaces, or when you need explicit control over open/close behavior.
|
|
18
|
+
* - Avoid tooltips for critical information — users on touch devices and some assistive technologies may not surface hover-triggered content.
|
|
19
|
+
*
|
|
19
20
|
* @tagname mdc-tooltip
|
|
20
|
-
*
|
|
21
|
+
*
|
|
21
22
|
* @event shown - (React: onShown) This event is dispatched when the tooltip is shown
|
|
22
23
|
* @event hidden - (React: onHidden) This event is dispatched when the tooltip is hidden
|
|
23
24
|
* @event created - (React: onCreated) This event is dispatched when the tooltip is created (added to the DOM)
|
|
24
25
|
* @event destroyed - (React: onDestroyed) This event is dispatched when the tooltip is destroyed (removed from the DOM)
|
|
25
|
-
*
|
|
26
|
+
*
|
|
26
27
|
* @cssproperty --mdc-tooltip-max-width - The maximum width of the tooltip.
|
|
27
28
|
* @cssproperty --mdc-tooltip-padding - The padding of the tooltip.
|
|
28
29
|
* @cssproperty --mdc-tooltip-text-color - The text color of the tooltip.
|
|
29
30
|
* @cssproperty --mdc-tooltip-text-color-contrast - The text color of the tooltip when the color is contrast.
|
|
30
|
-
*
|
|
31
31
|
*/
|
|
32
32
|
declare class Tooltip extends Popover {
|
|
33
33
|
/**
|