@momentum-design/components 0.134.20 → 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.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/package.json +1 -1
|
@@ -3,28 +3,32 @@ import FormfieldWrapper from '../formfieldwrapper';
|
|
|
3
3
|
import type { Variant } from './progressbar.types';
|
|
4
4
|
declare const Progressbar_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
6
|
+
* The progressbar is a determinate, linear progress indicator that visually represents the completion state of an ongoing process (loading, uploading, syncing, etc.). It renders an optional label, an optional helper/validation text, and a coloured bar that fills from 0 to 100 percent.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Use `mdc-progressbar` for a determinate task whose completion percentage is known.
|
|
11
|
+
* - Use the `default` variant when the progressbar should stand on its own with a label above it and a percentage readout.
|
|
12
|
+
* - Use the `inline` variant when the progressbar must sit on a single line next to its label (e.g. inside a list row).
|
|
13
|
+
*
|
|
14
|
+
* **When not to use**
|
|
15
|
+
*
|
|
16
|
+
* - Use `mdc-progressspinner` for a circular determinate indicator (for example to indicate progress in a compact area or to surface a completion/error glyph at 100%).
|
|
17
|
+
* - Use `mdc-spinner` for an indeterminate "work in progress" state where no percentage is known.
|
|
18
|
+
*
|
|
15
19
|
* @tagname mdc-progressbar
|
|
16
|
-
*
|
|
20
|
+
*
|
|
17
21
|
* @dependency mdc-icon
|
|
18
22
|
* @dependency mdc-text
|
|
19
|
-
*
|
|
23
|
+
*
|
|
20
24
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
21
25
|
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
|
22
|
-
*
|
|
26
|
+
*
|
|
23
27
|
* @csspart label - The label element.
|
|
24
28
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
25
29
|
* @csspart help-text - The helper/validation text element.
|
|
26
30
|
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
27
|
-
*
|
|
31
|
+
*
|
|
28
32
|
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
29
33
|
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
30
34
|
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
@@ -17,15 +17,6 @@ import { ROLE } from '../../utils/roles';
|
|
|
17
17
|
import { DEFAULTS, VARIANT, TAG_NAME as PROGRESSBAR_TAGNAME } from './progressbar.constants';
|
|
18
18
|
import styles from './progressbar.styles';
|
|
19
19
|
/**
|
|
20
|
-
* mdc-progressbar component visually represents a progress indicator, typically used to show
|
|
21
|
-
* the completion state of an ongoing process (e.g., loading, file upload, etc.).
|
|
22
|
-
* It contains an optional label and an optional helper text.
|
|
23
|
-
*
|
|
24
|
-
* - It supports mainly two types: Default and Inline
|
|
25
|
-
* - It supports three validation variants: Default, Success and Error.
|
|
26
|
-
*
|
|
27
|
-
* This component is created by extending FormfieldWrapper.
|
|
28
|
-
*
|
|
29
20
|
* @tagname mdc-progressbar
|
|
30
21
|
*
|
|
31
22
|
* @dependency mdc-icon
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
2
|
import Progressbar from '../progressbar/progressbar.component';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* The component supports different states:
|
|
17
|
-
* - **Default**: Circular spinner shows the progress.
|
|
18
|
-
* - **Success**: Displays a checkmark icon when progress reaches 100%.
|
|
19
|
-
* - **Error**: Displays an error icon when in an error state.
|
|
20
|
-
*
|
|
4
|
+
* The progressspinner is a determinate, circular progress indicator built from two concentric SVG arcs — one representing completed work and one representing remaining work. When the value reaches 100 the spinner is replaced by a check-circle success icon; when the component is in an error state it is replaced by an error icon.
|
|
5
|
+
*
|
|
6
|
+
* **When to use**
|
|
7
|
+
*
|
|
8
|
+
* - Use `mdc-progressspinner` for a determinate task whose completion percentage is known and where a compact, circular indicator fits better than a linear bar.
|
|
9
|
+
* - Use it when the final state should be communicated with a clear success or error glyph rather than a filled bar.
|
|
10
|
+
*
|
|
11
|
+
* **When not to use**
|
|
12
|
+
*
|
|
13
|
+
* - Use `mdc-progressbar` when a linear bar with an explicit percentage readout and label is more appropriate.
|
|
14
|
+
* - Use `mdc-spinner` for an indeterminate spinner where no percentage is known.
|
|
15
|
+
*
|
|
21
16
|
* @tagname mdc-progressspinner
|
|
22
|
-
*
|
|
17
|
+
*
|
|
23
18
|
* @cssproperty --mdc-spinner-size - The size of the spinner.
|
|
24
19
|
* @cssproperty --mdc-track-color - The color of the spinner track.
|
|
25
20
|
* @cssproperty --mdc-progress-color - The color of the spinner progress.
|
|
26
21
|
* @cssproperty --mdc-progress-success-color - The color of the spinner when in success state.
|
|
27
22
|
* @cssproperty --mdc-progress-error-color - The color of the spinner when in error state.
|
|
28
|
-
*
|
|
23
|
+
*
|
|
29
24
|
* @csspart error-icon - The error icon of the progressspinner.
|
|
30
25
|
* @csspart spinner-base - The base of the progressspinner.
|
|
31
26
|
* @csspart spinner-container - The container of the progressspinner.
|
|
@@ -6,23 +6,6 @@ import { getProgressArc, getProgressOffset, getRemainingArc, getRemainingOffset
|
|
|
6
6
|
import { DEFAULTS, ICON_NAME } from './progressspinner.constants';
|
|
7
7
|
import styles from './progressspinner.styles';
|
|
8
8
|
/**
|
|
9
|
-
* `mdc-progressspinner` is a customizable, circular progress indicator component.
|
|
10
|
-
* It visually represents the current completion state of a process, such as loading,
|
|
11
|
-
* syncing, uploading, or any ongoing task that has a measurable percentage.
|
|
12
|
-
*
|
|
13
|
-
* The spinner is built using SVG with two concentric `<circle>` elements:
|
|
14
|
-
* - The `progress` arc represents the portion of work completed.
|
|
15
|
-
* - The `track` arc represents the remaining part.
|
|
16
|
-
*
|
|
17
|
-
* A visual gap is maintained between the progress and track arcs to clearly
|
|
18
|
-
* distinguish the two segments. The component smoothly animates arc length
|
|
19
|
-
* and respects accessibility best practices with ARIA attributes.
|
|
20
|
-
*
|
|
21
|
-
* The component supports different states:
|
|
22
|
-
* - **Default**: Circular spinner shows the progress.
|
|
23
|
-
* - **Success**: Displays a checkmark icon when progress reaches 100%.
|
|
24
|
-
* - **Error**: Displays an error icon when in an error state.
|
|
25
|
-
*
|
|
26
9
|
* @tagname mdc-progressspinner
|
|
27
10
|
*
|
|
28
11
|
* @cssproperty --mdc-spinner-size - The size of the spinner.
|
|
@@ -3,58 +3,36 @@ import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
|
|
|
3
3
|
import { AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';
|
|
4
4
|
declare const Radio_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<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & typeof FormfieldWrapper;
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* Alternatively you can also set the `validation-message` attribute of the `mdc-radio`. This message will appear
|
|
23
|
-
* in a native tooltip when the radio is checked and invalid.
|
|
24
|
-
*
|
|
25
|
-
* ## Accessibility
|
|
26
|
-
*
|
|
27
|
-
* - Provide clear labels that describe each option
|
|
28
|
-
* - Use `data-aria-label` when a visual label is not present
|
|
29
|
-
* - Keyboard navigation: Arrow keys to move between options, Space to select, Tab to navigate groups, Enter to submit form
|
|
30
|
-
* - Group related radio buttons using the same `name` attribute or `mdc-radiogroup` component
|
|
31
|
-
*
|
|
32
|
-
* ## Styling
|
|
33
|
-
*
|
|
34
|
-
* Use the `radio-indicator` part to apply custom styles to the radio visual element.
|
|
35
|
-
* This part exposes the underlying [StaticRadio](?path=/docs/components-decorator-staticradio--docs) component for advanced styling.
|
|
36
|
-
*
|
|
37
|
-
* The `indicator` slot allows replacing the default radio circle with a custom element.
|
|
38
|
-
* When a custom indicator is slotted, the component automatically adds the `mdc-focus-ring`
|
|
39
|
-
* class to the host element. This shifts the focus ring from the default static radio to the
|
|
40
|
-
* entire host element, ensuring keyboard focus remains visible.
|
|
41
|
-
*
|
|
6
|
+
* The radio is a single, form-associated radio button that lets the user pick exactly one option from a set of mutually exclusive choices. Radios that share a `name` attribute are grouped together — selecting one unchecks the others — and arrow-key navigation moves focus and selection between members of the group.
|
|
7
|
+
*
|
|
8
|
+
* **When to use**
|
|
9
|
+
*
|
|
10
|
+
* - Use `mdc-radio` (typically inside `mdc-radiogroup`) when the user must pick exactly one option from a short, mutually exclusive list.
|
|
11
|
+
* - Use it in forms, surveys, and settings where every option needs to be visible at once.
|
|
12
|
+
*
|
|
13
|
+
* **When not to use**
|
|
14
|
+
*
|
|
15
|
+
* - Use `mdc-checkbox` when the user can pick zero, one, or more options.
|
|
16
|
+
* - Use `mdc-select` or `mdc-combobox` when the list of options is long or should be revealed on demand.
|
|
17
|
+
* - Use `mdc-cardradio` when each option should render as a larger, card-shaped surface.
|
|
18
|
+
* - Use `mdc-toggle` for an on/off binary control.
|
|
19
|
+
*
|
|
20
|
+
* @tagname mdc-radio
|
|
21
|
+
*
|
|
42
22
|
* @dependency mdc-button
|
|
43
23
|
* @dependency mdc-icon
|
|
44
24
|
* @dependency mdc-text
|
|
45
25
|
* @dependency mdc-staticradio
|
|
46
26
|
* @dependency mdc-toggletip
|
|
47
|
-
*
|
|
48
|
-
* @tagname mdc-radio
|
|
49
|
-
*
|
|
27
|
+
*
|
|
50
28
|
* @event input - (React: onInput) Event that gets dispatched when the radio state changes (before the change event).
|
|
51
29
|
* @event change - (React: onChange) Event that gets dispatched when the radio state changes (after the input event).
|
|
52
30
|
* @event focus - (React: onFocus) Event that gets dispatched when the radio receives focus.
|
|
53
|
-
*
|
|
31
|
+
*
|
|
54
32
|
* @csspart label - The label element.
|
|
55
33
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
56
34
|
* @csspart radio-indicator - The staticradio that provides the visual radio appearance.
|
|
57
|
-
*
|
|
35
|
+
*
|
|
58
36
|
* @slot indicator - Slot for the radio indicator element. If not provided, a default styled radio will be rendered.
|
|
59
37
|
* @slot label - Slot for the label of the radio.
|
|
60
38
|
*/
|
|
@@ -18,41 +18,7 @@ import { ACTIONS, KeyToActionMixin, NAV_MODES } from '../../utils/mixins/KeyToAc
|
|
|
18
18
|
import { KeyDownHandledMixin } from '../../utils/mixins/KeyDownHandledMixin';
|
|
19
19
|
import styles from './radio.styles';
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* Unlike checkboxes which allow multiple selections, radio buttons ensure only one option can be selected
|
|
23
|
-
* at a time within the same group. These are commonly used in forms, surveys, and settings where users
|
|
24
|
-
* need to make a single selection from multiple options.
|
|
25
|
-
*
|
|
26
|
-
* To create a group of radio buttons, use the `mdc-radiogroup` component or ensure all radio buttons
|
|
27
|
-
* share the same `name` attribute.
|
|
28
|
-
*
|
|
29
|
-
* ## Validation
|
|
30
|
-
*
|
|
31
|
-
* Radio component support native form validation. But it does not have default validation message.
|
|
32
|
-
* Also, `required` attribute does not render indicator (red asterisk) for the radio component.
|
|
33
|
-
*
|
|
34
|
-
* The recommended way to show validation message for radio groups is to wrap the `mdc-radio` with `mdc-radiogroup`
|
|
35
|
-
* and set the `help-text` of the `mdc-radiogroup` based on its validation state.
|
|
36
|
-
*
|
|
37
|
-
* Alternatively you can also set the `validation-message` attribute of the `mdc-radio`. This message will appear
|
|
38
|
-
* in a native tooltip when the radio is checked and invalid.
|
|
39
|
-
*
|
|
40
|
-
* ## Accessibility
|
|
41
|
-
*
|
|
42
|
-
* - Provide clear labels that describe each option
|
|
43
|
-
* - Use `data-aria-label` when a visual label is not present
|
|
44
|
-
* - Keyboard navigation: Arrow keys to move between options, Space to select, Tab to navigate groups, Enter to submit form
|
|
45
|
-
* - Group related radio buttons using the same `name` attribute or `mdc-radiogroup` component
|
|
46
|
-
*
|
|
47
|
-
* ## Styling
|
|
48
|
-
*
|
|
49
|
-
* Use the `radio-indicator` part to apply custom styles to the radio visual element.
|
|
50
|
-
* This part exposes the underlying [StaticRadio](?path=/docs/components-decorator-staticradio--docs) component for advanced styling.
|
|
51
|
-
*
|
|
52
|
-
* The `indicator` slot allows replacing the default radio circle with a custom element.
|
|
53
|
-
* When a custom indicator is slotted, the component automatically adds the `mdc-focus-ring`
|
|
54
|
-
* class to the host element. This shifts the focus ring from the default static radio to the
|
|
55
|
-
* entire host element, ensuring keyboard focus remains visible.
|
|
21
|
+
* @tagname mdc-radio
|
|
56
22
|
*
|
|
57
23
|
* @dependency mdc-button
|
|
58
24
|
* @dependency mdc-icon
|
|
@@ -60,8 +26,6 @@ import styles from './radio.styles';
|
|
|
60
26
|
* @dependency mdc-staticradio
|
|
61
27
|
* @dependency mdc-toggletip
|
|
62
28
|
*
|
|
63
|
-
* @tagname mdc-radio
|
|
64
|
-
*
|
|
65
29
|
* @event input - (React: onInput) Event that gets dispatched when the radio state changes (before the change event).
|
|
66
30
|
* @event change - (React: onChange) Event that gets dispatched when the radio state changes (after the input event).
|
|
67
31
|
* @event focus - (React: onFocus) Event that gets dispatched when the radio receives focus.
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
2
|
import FormfieldGroup from '../formfieldgroup';
|
|
3
3
|
/**
|
|
4
|
-
* `mdc-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The radiogroup is a labelled wrapper that bundles related `mdc-radio` (or `mdc-cardradio`) elements together. It renders an optional header label and helper text, propagates a shared `name` and `required` state to its radio children, and exposes the wrapped controls as a `radiogroup` to assistive technologies.
|
|
5
|
+
*
|
|
6
|
+
* **When to use**
|
|
7
|
+
*
|
|
8
|
+
* - Use `mdc-radiogroup` whenever you render a set of `mdc-radio` (or `mdc-cardradio`) options that belong to the same question.
|
|
9
|
+
* - Use it to surface a single label and a single helper/validation message for the whole group.
|
|
10
|
+
*
|
|
11
|
+
* **When not to use**
|
|
12
|
+
*
|
|
13
|
+
* - Use `mdc-formfieldgroup` directly when grouping checkbox or toggle controls instead of radios.
|
|
14
|
+
* - Use `mdc-select` or `mdc-combobox` when the user should pick one option from a long or dynamic list that does not need to be visible at once.
|
|
15
|
+
*
|
|
8
16
|
* @tagname mdc-radiogroup
|
|
9
|
-
*
|
|
10
17
|
*/
|
|
11
18
|
declare class RadioGroup extends FormfieldGroup {
|
|
12
19
|
/**
|
|
@@ -13,10 +13,6 @@ import { TAG_NAME as RADIO_TAGNAME } from '../radio/radio.constants';
|
|
|
13
13
|
import { TAG_NAME as CARD_RADIO_TAGNAME } from '../cardradio/cardradio.constants';
|
|
14
14
|
const isRadio = new RegExp(`^(${RADIO_TAGNAME}|${CARD_RADIO_TAGNAME})$`, 'i');
|
|
15
15
|
/**
|
|
16
|
-
* `mdc-radiogroup` - This is the wrapper component for radio buttons which are grouped together.
|
|
17
|
-
* It can have a header text and a description. It enables users to select a single option from a set of options.
|
|
18
|
-
* It is often used in forms, settings, and selection in lists. It automatically group the radio buttons inside it.
|
|
19
|
-
*
|
|
20
16
|
* @tagname mdc-radiogroup
|
|
21
17
|
*
|
|
22
18
|
*/
|
package/dist/components/responsivesettingsprovider/responsivesettingsprovider.component.d.ts
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
import { Provider } from '../../models';
|
|
2
2
|
import type { ResponsiveMediaType, ResponsivePopoverPositions, ResponsiveSettings } from './responsivesettingsprovider.types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* based on
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* ### Media
|
|
17
|
-
*
|
|
18
|
-
* Generic media type to enforce responsive behavior in child components.
|
|
19
|
-
* Consumer component can use the media type from the context or
|
|
20
|
-
* just use CSS selector like [media="mobile"] to apply responsive styles.
|
|
21
|
-
*
|
|
22
|
-
* It is "unknown" by default so components can fall back to there default behavior.
|
|
23
|
-
*
|
|
24
|
-
* ### Popover Positioning
|
|
25
|
-
*
|
|
26
|
-
* By default, popovers are positioned close to the trigger element. But on small screens (e.g.: mobile devices),
|
|
27
|
-
* it is often better to show popovers/menus at the center of the screen like dialogs.
|
|
28
|
-
*
|
|
29
|
-
* ### Force Fullscreen Dialog
|
|
30
|
-
*
|
|
31
|
-
* Some components like dialogs can be shown in fullscreen mode on small screens for better user experience.
|
|
32
|
-
*
|
|
4
|
+
* The responsivesettingsprovider is a provider component that supplies a shared responsive-settings context to every descendant component that consumes it. The provider does not detect screen size itself — the consumer chooses when and how to update its attributes (via media queries, device-detection scripts, or any other strategy) so the same descendant components can adapt their layout without each one re-implementing breakpoint logic.
|
|
5
|
+
*
|
|
6
|
+
* **When to use**
|
|
7
|
+
*
|
|
8
|
+
* - Wrap a subtree (typically near the application root) with `mdc-responsivesettingsprovider` when descendant components should adapt their layout based on a shared responsive signal — for example, rendering popovers centred on small screens or forcing dialogs to fullscreen on mobile.
|
|
9
|
+
*
|
|
10
|
+
* **When not to use**
|
|
11
|
+
*
|
|
12
|
+
* - Do not use it as a generic media-query helper for arbitrary CSS — components that don't read this context will not be affected.
|
|
13
|
+
* - Do not use it for theme tokens (use `mdc-themeprovider`) or icon set configuration (use `mdc-iconprovider`).
|
|
14
|
+
*
|
|
33
15
|
* @tagname mdc-responsivesettingsprovider
|
|
34
16
|
*/
|
|
35
17
|
declare class ResponsiveSettingsProvider extends Provider<ResponsiveSettings> {
|
|
@@ -12,35 +12,6 @@ import { Provider } from '../../models';
|
|
|
12
12
|
import ResponsiveSettingsContext from './responsiveSettingsContext';
|
|
13
13
|
import { DEFAULTS, VALID_MEDIA_VALUES, VALID_POPOVER_POSITIONING_VALUES } from './responsivesettingsprovider.constants';
|
|
14
14
|
/**
|
|
15
|
-
* `mdc-responsivesettingsprovider` is a provider component that supplies responsive settings
|
|
16
|
-
* context to its child components.
|
|
17
|
-
*
|
|
18
|
-
* This component does not make any assumptions about how the values are determined. Values can be set
|
|
19
|
-
* based on media queries or other device detection mechanisms.This way consumer can mix and match
|
|
20
|
-
* different settings depending on their target devices and use cases.
|
|
21
|
-
*
|
|
22
|
-
* For example, when the device has table screen size/resolution, but because it is fixed dialog like
|
|
23
|
-
* popovers provide better user experience.
|
|
24
|
-
*
|
|
25
|
-
* ## Responsive settings
|
|
26
|
-
*
|
|
27
|
-
* ### Media
|
|
28
|
-
*
|
|
29
|
-
* Generic media type to enforce responsive behavior in child components.
|
|
30
|
-
* Consumer component can use the media type from the context or
|
|
31
|
-
* just use CSS selector like [media="mobile"] to apply responsive styles.
|
|
32
|
-
*
|
|
33
|
-
* It is "unknown" by default so components can fall back to there default behavior.
|
|
34
|
-
*
|
|
35
|
-
* ### Popover Positioning
|
|
36
|
-
*
|
|
37
|
-
* By default, popovers are positioned close to the trigger element. But on small screens (e.g.: mobile devices),
|
|
38
|
-
* it is often better to show popovers/menus at the center of the screen like dialogs.
|
|
39
|
-
*
|
|
40
|
-
* ### Force Fullscreen Dialog
|
|
41
|
-
*
|
|
42
|
-
* Some components like dialogs can be shown in fullscreen mode on small screens for better user experience.
|
|
43
|
-
*
|
|
44
15
|
* @tagname mdc-responsivesettingsprovider
|
|
45
16
|
*/
|
|
46
17
|
class ResponsiveSettingsProvider extends Provider {
|
|
@@ -2,57 +2,18 @@ import type { CSSResult, PropertyValueMap } from 'lit';
|
|
|
2
2
|
import { Component } from '../../models';
|
|
3
3
|
import { AriaLive } from './screenreaderannouncer.types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* **
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* is created in the DOM.
|
|
18
|
-
*
|
|
19
|
-
* If you provide a custom `identity`, you must ensure that the element exists and is visually hidden.
|
|
20
|
-
*
|
|
21
|
-
* Example CSS:
|
|
22
|
-
*
|
|
23
|
-
* ```css
|
|
24
|
-
* #your-custom-announcer-id {
|
|
25
|
-
* clip: rect(0 0 0 0);
|
|
26
|
-
* clip-path: inset(50%);
|
|
27
|
-
* height: 1px;
|
|
28
|
-
* overflow: hidden;
|
|
29
|
-
* position: absolute;
|
|
30
|
-
* white-space: nowrap;
|
|
31
|
-
* width: 1px;
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* When the `announcement` attribute is set, the screenreader announcer will create a `<div>` element with
|
|
36
|
-
* `aria-live` attribute set to the value of `data-aria-live` attribute and append it to the `identity` element.
|
|
37
|
-
* After delay of `delay` milliseconds, a `<p>` element with the announcement text is appended to the `<div>` element.
|
|
38
|
-
*
|
|
39
|
-
* The announcement `<div>` element is removed from the DOM after `timeout` milliseconds.
|
|
40
|
-
*
|
|
41
|
-
* When the screen announcer component is disconnected from the DOM, all the timeouts are cleared and
|
|
42
|
-
* all the announcement elements added are removed from the DOM and timeouts cleared.
|
|
43
|
-
*
|
|
44
|
-
* **Note**
|
|
45
|
-
* 1. The default delay of 150 miliseconds is used as we dynamically generate the
|
|
46
|
-
* aria-live region in the DOM and add the announcement text to it.
|
|
47
|
-
* 2. If multiple `mdc-screenreaderannouncer` instances use the same `identity`, `data-aria-live`
|
|
48
|
-
* for that identity is effectively determined by the first instance that creates announcements for it.
|
|
49
|
-
* Changing `data-aria-live` in later instances for the same identity will not update already-created
|
|
50
|
-
* live-region containers.
|
|
51
|
-
* 3. If no `identity` is provided, all the screen reader components will create and use only one
|
|
52
|
-
* `<div>` element with id `mdc-screenreaderannouncer-identity` in the DOM.
|
|
53
|
-
*
|
|
54
|
-
* Reference: https://patrickhlauke.github.io/aria/tests/live-regions/
|
|
55
|
-
*
|
|
5
|
+
* The screenreaderannouncer is a non-visual helper component that pushes text into a shared aria-live region in the light DOM so that screen readers announce it. It manages the live-region container, debouncing, and clean-up so consumers only need to set an `announcement` (or call the public `announce()` method) when they want a message read out.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use it to surface a status update that has no visible UI counterpart — for example, "5 new messages", "Saved", or "Failed to load" — so screen-reader users hear the change.
|
|
10
|
+
* - Use it when a visible status message exists but is rendered outside the natural reading order or only briefly, and you want to guarantee assistive-technology announcement.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Do not use it for content that is already in a visible, ARIA-live container, or for content that the screen reader will naturally announce because of focus changes.
|
|
15
|
+
* - Do not use it as a logging or toast surface — it is not a UI component and renders nothing visible.
|
|
16
|
+
*
|
|
56
17
|
* @tagname mdc-screenreaderannouncer
|
|
57
18
|
*/
|
|
58
19
|
declare class ScreenreaderAnnouncer extends Component {
|
|
@@ -22,57 +22,6 @@ import styles from './screenreaderannouncer.styles';
|
|
|
22
22
|
const identityRefCount = new Map();
|
|
23
23
|
// End AI-Assisted
|
|
24
24
|
/**
|
|
25
|
-
* `mdc-screenreaderannouncer` can be used to announce messages with the screen reader.
|
|
26
|
-
*
|
|
27
|
-
* To make an announcement set `announcement` attribute on the `mdc-screenreaderannouncer` element.
|
|
28
|
-
*
|
|
29
|
-
* Consumers can also use the public `announce` function to trigger announcements programmatically
|
|
30
|
-
* by passing an options object where `announcement` is required and all other fields are optional.
|
|
31
|
-
*
|
|
32
|
-
* **Internal logic**
|
|
33
|
-
*
|
|
34
|
-
* When the screenreader announcer is connected to the DOM, if the `identity` attribute is not
|
|
35
|
-
* provided, it is set to `mdc-screenreaderannouncer-identity` and a `<div>` element with this id is created
|
|
36
|
-
* in the DOM. If the `identity` attribute is provided, the identity element is used and no new element
|
|
37
|
-
* is created in the DOM.
|
|
38
|
-
*
|
|
39
|
-
* If you provide a custom `identity`, you must ensure that the element exists and is visually hidden.
|
|
40
|
-
*
|
|
41
|
-
* Example CSS:
|
|
42
|
-
*
|
|
43
|
-
* ```css
|
|
44
|
-
* #your-custom-announcer-id {
|
|
45
|
-
* clip: rect(0 0 0 0);
|
|
46
|
-
* clip-path: inset(50%);
|
|
47
|
-
* height: 1px;
|
|
48
|
-
* overflow: hidden;
|
|
49
|
-
* position: absolute;
|
|
50
|
-
* white-space: nowrap;
|
|
51
|
-
* width: 1px;
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* When the `announcement` attribute is set, the screenreader announcer will create a `<div>` element with
|
|
56
|
-
* `aria-live` attribute set to the value of `data-aria-live` attribute and append it to the `identity` element.
|
|
57
|
-
* After delay of `delay` milliseconds, a `<p>` element with the announcement text is appended to the `<div>` element.
|
|
58
|
-
*
|
|
59
|
-
* The announcement `<div>` element is removed from the DOM after `timeout` milliseconds.
|
|
60
|
-
*
|
|
61
|
-
* When the screen announcer component is disconnected from the DOM, all the timeouts are cleared and
|
|
62
|
-
* all the announcement elements added are removed from the DOM and timeouts cleared.
|
|
63
|
-
*
|
|
64
|
-
* **Note**
|
|
65
|
-
* 1. The default delay of 150 miliseconds is used as we dynamically generate the
|
|
66
|
-
* aria-live region in the DOM and add the announcement text to it.
|
|
67
|
-
* 2. If multiple `mdc-screenreaderannouncer` instances use the same `identity`, `data-aria-live`
|
|
68
|
-
* for that identity is effectively determined by the first instance that creates announcements for it.
|
|
69
|
-
* Changing `data-aria-live` in later instances for the same identity will not update already-created
|
|
70
|
-
* live-region containers.
|
|
71
|
-
* 3. If no `identity` is provided, all the screen reader components will create and use only one
|
|
72
|
-
* `<div>` element with id `mdc-screenreaderannouncer-identity` in the DOM.
|
|
73
|
-
*
|
|
74
|
-
* Reference: https://patrickhlauke.github.io/aria/tests/live-regions/
|
|
75
|
-
*
|
|
76
25
|
* @tagname mdc-screenreaderannouncer
|
|
77
26
|
*/
|
|
78
27
|
class ScreenreaderAnnouncer extends Component {
|
|
@@ -2,35 +2,27 @@ import { CSSResult, PropertyValueMap } from 'lit';
|
|
|
2
2
|
import Input from '../input/input.component';
|
|
3
3
|
declare const Searchfield_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/ControlTypeMixin").ControlTypeMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/KeyDownHandledMixin").KeyDownHandledMixinInterface> & typeof Input;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* -
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* **Accessibility:**
|
|
19
|
-
*
|
|
20
|
-
* NOTE: this component should not be used in combination with a Popover or Listbox component.
|
|
21
|
-
* Search results should be shown permanently on the page if using this component.
|
|
22
|
-
*
|
|
23
|
-
* For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.
|
|
24
|
-
*
|
|
5
|
+
* The searchfield is a single-line text input tailored for search. It renders a leading search icon, a trailing clear button, and an inline area in front of the text caret where chip filters can be slotted. Chips behave like single characters in the input flow: they share the cursor with the text and can be focused, navigated, and removed with the keyboard.
|
|
6
|
+
*
|
|
7
|
+
* **When to use**
|
|
8
|
+
*
|
|
9
|
+
* - Use it whenever the user types a query to search a list, table, or other content rendered on the same page.
|
|
10
|
+
* - Use it with slotted chip filters (`mdc-inputchip`, `mdc-chip`, `mdc-alertchip`) when the search query is refined by removable filter tokens that should appear inline with the input text.
|
|
11
|
+
*
|
|
12
|
+
* **When not to use**
|
|
13
|
+
*
|
|
14
|
+
* - Do not use it for a search that opens a popover / listbox of suggestions or results. Use `mdc-searchpopover` instead — pairing this component with a Popover or Listbox is not supported.
|
|
15
|
+
* - Do not use it for free-form text entry that is not a search query — use `mdc-input` (or `mdc-textarea`) directly.
|
|
16
|
+
*
|
|
25
17
|
* @tagname mdc-searchfield
|
|
26
|
-
*
|
|
18
|
+
*
|
|
27
19
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
28
20
|
* @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).
|
|
29
21
|
* @event focus - (React: onFocus) This event is dispatched when the input receives focus.
|
|
30
22
|
* @event blur - (React: onBlur) This event is dispatched when the input loses focus.
|
|
31
23
|
* @event clear - (React: onClear) This event is dispatched when the input text is cleared.
|
|
32
24
|
* @event chipRemove - (React: onChipRemove) This event is dispatched when a chip filter is removed. The removed chip element is available in event.detail.chip. In `uncontrolled` mode (default) the chip is removed from the DOM automatically; in `controlled` mode only the event is fired and the consumer is responsible for removing the chip.
|
|
33
|
-
*
|
|
25
|
+
*
|
|
34
26
|
* @slot filters - Slot for chip filters rendered inline with the input text
|
|
35
27
|
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
36
28
|
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
|
@@ -40,7 +32,7 @@ declare const Searchfield_base: import("../../utils/mixins/index.types").Constru
|
|
|
40
32
|
* @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
|
|
41
33
|
* @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
|
|
42
34
|
* @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.
|
|
43
|
-
*
|
|
35
|
+
*
|
|
44
36
|
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
45
37
|
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
46
38
|
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
@@ -56,7 +48,7 @@ declare const Searchfield_base: import("../../utils/mixins/index.types").Constru
|
|
|
56
48
|
* @cssproperty --mdc-input-support-text-color - Text color for the help text
|
|
57
49
|
* @cssproperty --mdc-input-selection-text-color - Text color for the selected text
|
|
58
50
|
* @cssproperty --mdc-input-selection-background-color - Background color for the selected text
|
|
59
|
-
*
|
|
51
|
+
*
|
|
60
52
|
* @csspart label - The label element.
|
|
61
53
|
* @csspart label-text - The container for the label and required indicator elements.
|
|
62
54
|
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
@@ -19,26 +19,6 @@ import { TAG_NAME as INPUT_CHIP_TAG } from '../inputchip/inputchip.constants';
|
|
|
19
19
|
import styles from './searchfield.styles';
|
|
20
20
|
import { CHIP_SELECTOR, DEFAULTS } from './searchfield.constants';
|
|
21
21
|
/**
|
|
22
|
-
* `mdc-searchfield` component is used as an input field for search functionality.
|
|
23
|
-
*
|
|
24
|
-
* It supports any interactable Chip component as filters. (`mdc-inputchip`, `mdc-alertchip`, `mdc-chip`)
|
|
25
|
-
* Chips are rendered inline with the search input text, behaving like single characters.
|
|
26
|
-
* Users can traverse the cursor between chips and text using arrow keys,
|
|
27
|
-
* and remove a chip by pressing Backspace when the cursor is adjacent to it.
|
|
28
|
-
*
|
|
29
|
-
* This component is built by extending the `mdc-input` component.
|
|
30
|
-
*
|
|
31
|
-
* Searchfield supports controlled vs uncontrolled behavior for chip filters, which can be set via the `control-type` attribute:
|
|
32
|
-
* - In **uncontrolled** mode (default), when a chip is removed via the UI, it is automatically removed from the DOM and a `chipRemove` event is dispatched with the removed chip in the event detail. The consumer can listen to the `chipRemove` event but does not need to do anything to remove the chip from the DOM.
|
|
33
|
-
* - In **controlled** mode (`control-type="controlled"`), when a chip is removed via the UI, it is NOT removed from the DOM, but a `chipRemove` event is still dispatched with the "removed" chip in the event detail. The consumer must listen to the `chipRemove` event and handle removing the chip from the DOM themselves (e.g., by updating their state that controls which chips are rendered).
|
|
34
|
-
*
|
|
35
|
-
* **Accessibility:**
|
|
36
|
-
*
|
|
37
|
-
* NOTE: this component should not be used in combination with a Popover or Listbox component.
|
|
38
|
-
* Search results should be shown permanently on the page if using this component.
|
|
39
|
-
*
|
|
40
|
-
* For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.
|
|
41
|
-
*
|
|
42
22
|
* @tagname mdc-searchfield
|
|
43
23
|
*
|
|
44
24
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|