@material/web 1.0.0-pre.6 → 1.0.0-pre.8
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/README.md +8 -8
- package/aria/aria.d.ts +43 -0
- package/aria/aria.js +80 -0
- package/aria/aria.js.map +1 -0
- package/aria/delegate.d.ts +37 -0
- package/aria/delegate.js +53 -0
- package/aria/delegate.js.map +1 -0
- package/badge/badge.d.ts +0 -1
- package/badge/badge.js +0 -1
- package/badge/badge.js.map +1 -1
- package/badge/lib/badge.d.ts +5 -7
- package/badge/lib/badge.js +9 -12
- package/badge/lib/badge.js.map +1 -1
- package/button/lib/_elevated-button.scss +35 -6
- package/button/lib/_elevation.scss +13 -3
- package/button/lib/_filled-button.scss +35 -3
- package/button/lib/_outlined-button.scss +35 -6
- package/button/lib/_shared.scss +4 -2
- package/button/lib/_text-button.scss +35 -6
- package/button/lib/_tonal-button.scss +34 -7
- package/button/lib/button.d.ts +24 -38
- package/button/lib/button.js +40 -89
- package/button/lib/button.js.map +1 -1
- package/button/lib/elevated-button.d.ts +6 -4
- package/button/lib/elevated-button.js.map +1 -1
- package/button/lib/elevated-styles.css.js +1 -1
- package/button/lib/elevated-styles.css.js.map +1 -1
- package/button/lib/filled-button.d.ts +6 -4
- package/button/lib/filled-button.js.map +1 -1
- package/button/lib/filled-styles.css.js +1 -1
- package/button/lib/filled-styles.css.js.map +1 -1
- package/button/lib/outlined-button.d.ts +6 -4
- package/button/lib/outlined-button.js.map +1 -1
- package/button/lib/outlined-styles.css.js +1 -1
- package/button/lib/outlined-styles.css.js.map +1 -1
- package/button/lib/shared-elevation-styles.css.js +1 -1
- package/button/lib/shared-elevation-styles.css.js.map +1 -1
- package/button/lib/shared-styles.css.js +1 -1
- package/button/lib/shared-styles.css.js.map +1 -1
- package/button/lib/text-button.d.ts +5 -2
- package/button/lib/text-button.js.map +1 -1
- package/button/lib/text-styles.css.js +1 -1
- package/button/lib/text-styles.css.js.map +1 -1
- package/button/lib/tonal-button.d.ts +6 -4
- package/button/lib/tonal-button.js.map +1 -1
- package/button/lib/tonal-styles.css.js +1 -1
- package/button/lib/tonal-styles.css.js.map +1 -1
- package/checkbox/lib/_checkbox.scss +48 -47
- package/checkbox/lib/checkbox-styles.css.js +1 -1
- package/checkbox/lib/checkbox-styles.css.js.map +1 -1
- package/checkbox/lib/checkbox.d.ts +2 -7
- package/checkbox/lib/checkbox.js +35 -62
- package/checkbox/lib/checkbox.js.map +1 -1
- package/checkbox/lib/forced-colors-styles.css.js +1 -1
- package/checkbox/lib/forced-colors-styles.css.js.map +1 -1
- package/chips/_filter-chip.scss +6 -0
- package/chips/assist-chip.js +2 -1
- package/chips/assist-chip.js.map +1 -1
- package/chips/filter-chip.d.ts +20 -0
- package/chips/filter-chip.js +25 -0
- package/chips/filter-chip.js.map +1 -0
- package/chips/lib/_assist-chip.scss +37 -3
- package/chips/lib/_elevated.scss +60 -0
- package/chips/lib/_filter-chip.scss +175 -0
- package/chips/lib/_shared.scss +48 -84
- package/chips/lib/_suggestion-chip.scss +36 -5
- package/chips/lib/assist-chip.d.ts +12 -0
- package/chips/lib/assist-chip.js +64 -0
- package/chips/lib/assist-chip.js.map +1 -1
- package/chips/lib/assist-styles.css.js +1 -1
- package/chips/lib/assist-styles.css.js.map +1 -1
- package/chips/lib/chip.d.ts +24 -16
- package/chips/lib/chip.js +53 -74
- package/chips/lib/chip.js.map +1 -1
- package/chips/lib/elevated-styles.css.js +9 -0
- package/chips/lib/elevated-styles.css.js.map +1 -0
- package/{fab/lib/fab-extended-styles.scss → chips/lib/elevated-styles.scss} +3 -3
- package/chips/lib/filter-chip.d.ts +26 -0
- package/chips/lib/filter-chip.js +80 -0
- package/chips/lib/filter-chip.js.map +1 -0
- package/chips/lib/filter-styles.css.js +9 -0
- package/chips/lib/filter-styles.css.js.map +1 -0
- package/chips/lib/filter-styles.scss +10 -0
- package/chips/lib/shared-styles.css.js +1 -1
- package/chips/lib/shared-styles.css.js.map +1 -1
- package/chips/lib/suggestion-chip.d.ts +2 -2
- package/chips/lib/suggestion-chip.js +4 -2
- package/chips/lib/suggestion-chip.js.map +1 -1
- package/chips/lib/suggestion-styles.css.js +1 -1
- package/chips/lib/suggestion-styles.css.js.map +1 -1
- package/chips/suggestion-chip.js +2 -1
- package/chips/suggestion-chip.js.map +1 -1
- package/circularprogress/harness.d.ts +1 -0
- package/circularprogress/harness.js +4 -0
- package/circularprogress/harness.js.map +1 -1
- package/circularprogress/lib/_circular-progress.scss +13 -7
- package/circularprogress/lib/circular-progress-styles.css.js +1 -1
- package/circularprogress/lib/circular-progress-styles.css.js.map +1 -1
- package/circularprogress/lib/circular-progress.d.ts +5 -7
- package/circularprogress/lib/circular-progress.js +17 -21
- package/circularprogress/lib/circular-progress.js.map +1 -1
- package/dialog/lib/_dialog.scss +8 -9
- package/dialog/lib/_tokens.scss +0 -1
- package/dialog/lib/dialog-styles.css.js +1 -1
- package/dialog/lib/dialog-styles.css.js.map +1 -1
- package/dialog/lib/dialog.d.ts +10 -10
- package/dialog/lib/dialog.js +33 -56
- package/dialog/lib/dialog.js.map +1 -1
- package/divider/lib/divider.js +4 -7
- package/divider/lib/divider.js.map +1 -1
- package/elevation/lib/_elevation.scss +5 -7
- package/elevation/lib/elevation-styles.css.js +1 -1
- package/elevation/lib/elevation-styles.css.js.map +1 -1
- package/elevation/lib/elevation.d.ts +1 -1
- package/elevation/lib/elevation.js.map +1 -1
- package/fab/_fab.scss +1 -0
- package/fab/branded-fab.d.ts +56 -0
- package/fab/branded-fab.js +56 -0
- package/fab/branded-fab.js.map +1 -0
- package/fab/fab.d.ts +25 -5
- package/fab/fab.js +27 -10
- package/fab/fab.js.map +1 -1
- package/fab/harness.d.ts +1 -2
- package/fab/harness.js +1 -1
- package/fab/harness.js.map +1 -1
- package/fab/lib/_fab-branded.scss +81 -0
- package/fab/lib/_fab.scss +221 -19
- package/fab/lib/_shared.scss +161 -131
- package/fab/lib/fab-branded-styles.css.d.ts +1 -0
- package/fab/lib/fab-branded-styles.css.js +9 -0
- package/fab/lib/fab-branded-styles.css.js.map +1 -0
- package/fab/lib/fab-branded-styles.scss +10 -0
- package/fab/lib/fab-styles.css.js +1 -1
- package/fab/lib/fab-styles.css.js.map +1 -1
- package/fab/lib/fab.d.ts +18 -10
- package/fab/lib/fab.js +19 -12
- package/fab/lib/fab.js.map +1 -1
- package/fab/lib/forced-colors-styles.css.d.ts +1 -0
- package/fab/lib/forced-colors-styles.css.js +9 -0
- package/fab/lib/forced-colors-styles.css.js.map +1 -0
- package/fab/lib/forced-colors-styles.scss +26 -0
- package/fab/lib/shared-styles.css.d.ts +1 -0
- package/fab/lib/shared-styles.css.js +9 -0
- package/fab/lib/shared-styles.css.js.map +1 -0
- package/fab/lib/{fab-shared-styles.scss → shared-styles.scss} +1 -1
- package/fab/lib/shared.d.ts +49 -0
- package/fab/lib/shared.js +113 -0
- package/fab/lib/shared.js.map +1 -0
- package/field/lib/_filled-field.scss +47 -12
- package/field/lib/_outlined-field.scss +39 -12
- package/field/lib/field.js +14 -27
- package/field/lib/field.js.map +1 -1
- package/field/lib/filled-styles.css.js +1 -1
- package/field/lib/filled-styles.css.js.map +1 -1
- package/field/lib/outlined-styles.css.js +1 -1
- package/field/lib/outlined-styles.css.js.map +1 -1
- package/focus/focus-ring.d.ts +2 -1
- package/focus/focus-ring.js +2 -1
- package/focus/focus-ring.js.map +1 -1
- package/focus/lib/_focus-ring.scss +49 -34
- package/focus/lib/focus-ring-styles.css.js +1 -1
- package/focus/lib/focus-ring-styles.css.js.map +1 -1
- package/focus/lib/focus-ring.d.ts +59 -12
- package/focus/lib/focus-ring.js +118 -14
- package/focus/lib/focus-ring.js.map +1 -1
- package/icon/icon.d.ts +0 -1
- package/icon/icon.js +0 -1
- package/icon/icon.js.map +1 -1
- package/icon/lib/_icon.scss +2 -0
- package/icon/lib/icon-styles.css.js +1 -1
- package/icon/lib/icon-styles.css.js.map +1 -1
- package/icon/lib/icon.d.ts +5 -4
- package/icon/lib/icon.js +3 -2
- package/icon/lib/icon.js.map +1 -1
- package/iconbutton/filled-icon-button.d.ts +6 -2
- package/iconbutton/filled-icon-button.js.map +1 -1
- package/iconbutton/filled-tonal-icon-button.d.ts +6 -2
- package/iconbutton/filled-tonal-icon-button.js.map +1 -1
- package/iconbutton/harness.d.ts +1 -1
- package/iconbutton/harness.js +4 -1
- package/iconbutton/harness.js.map +1 -1
- package/iconbutton/lib/_filled-icon-button.scss +38 -13
- package/iconbutton/lib/_filled-tonal-icon-button.scss +38 -11
- package/iconbutton/lib/_outlined-icon-button.scss +38 -13
- package/iconbutton/lib/_shared.scss +4 -6
- package/iconbutton/lib/_standard-icon-button.scss +14 -14
- package/iconbutton/lib/filled-styles.css.js +1 -1
- package/iconbutton/lib/filled-styles.css.js.map +1 -1
- package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
- package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
- package/iconbutton/lib/icon-button.d.ts +17 -25
- package/iconbutton/lib/icon-button.js +37 -73
- package/iconbutton/lib/icon-button.js.map +1 -1
- package/iconbutton/lib/outlined-styles.css.js +1 -1
- package/iconbutton/lib/outlined-styles.css.js.map +1 -1
- package/iconbutton/lib/shared-styles.css.js +1 -1
- package/iconbutton/lib/shared-styles.css.js.map +1 -1
- package/iconbutton/lib/standard-styles.css.js +1 -1
- package/iconbutton/lib/standard-styles.css.js.map +1 -1
- package/iconbutton/outlined-icon-button.d.ts +5 -2
- package/iconbutton/outlined-icon-button.js.map +1 -1
- package/iconbutton/standard-icon-button.d.ts +5 -2
- package/iconbutton/standard-icon-button.js.map +1 -1
- package/linearprogress/_linear-progress.scss +6 -0
- package/linearprogress/harness.d.ts +13 -0
- package/linearprogress/harness.js +18 -0
- package/linearprogress/harness.js.map +1 -0
- package/linearprogress/lib/_linear-progress.scss +386 -0
- package/linearprogress/lib/linear-progress-styles.css.d.ts +1 -0
- package/linearprogress/lib/linear-progress-styles.css.js +9 -0
- package/linearprogress/lib/linear-progress-styles.css.js.map +1 -0
- package/linearprogress/lib/linear-progress-styles.scss +8 -0
- package/linearprogress/lib/linear-progress.d.ts +35 -0
- package/linearprogress/lib/linear-progress.js +127 -0
- package/linearprogress/lib/linear-progress.js.map +1 -0
- package/linearprogress/linear-progress.d.ts +23 -0
- package/linearprogress/linear-progress.js +26 -0
- package/linearprogress/linear-progress.js.map +1 -0
- package/list/lib/_list.scss +9 -50
- package/list/lib/list-styles.css.js +1 -1
- package/list/lib/list-styles.css.js.map +1 -1
- package/list/lib/list.d.ts +8 -15
- package/list/lib/list.js +20 -45
- package/list/lib/list.js.map +1 -1
- package/list/lib/listitem/_list-item.scss +17 -72
- package/list/lib/listitem/forced-colors-styles.css.js +1 -1
- package/list/lib/listitem/forced-colors-styles.css.js.map +1 -1
- package/list/lib/listitem/list-item-styles.css.js +1 -1
- package/list/lib/listitem/list-item-styles.css.js.map +1 -1
- package/list/lib/listitem/list-item.d.ts +29 -31
- package/list/lib/listitem/list-item.js +26 -80
- package/list/lib/listitem/list-item.js.map +1 -1
- package/list/lib/listitemlink/list-item-link.js +5 -9
- package/list/lib/listitemlink/list-item-link.js.map +1 -1
- package/menu/lib/_menu.scss +9 -29
- package/menu/lib/menu-styles.css.js +1 -1
- package/menu/lib/menu-styles.css.js.map +1 -1
- package/menu/lib/menu.d.ts +32 -41
- package/menu/lib/menu.js +51 -82
- package/menu/lib/menu.js.map +1 -1
- package/menu/lib/menuitem/_menu-item.scss +16 -33
- package/menu/lib/menuitem/menu-item-styles.css.js +1 -1
- package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -1
- package/menu/lib/menuitem/menu-item.d.ts +1 -1
- package/menu/lib/menuitem/menu-item.js +4 -6
- package/menu/lib/menuitem/menu-item.js.map +1 -1
- package/menu/lib/menuitemlink/menu-item-link.d.ts +0 -2
- package/menu/lib/menuitemlink/menu-item-link.js +3 -6
- package/menu/lib/menuitemlink/menu-item-link.js.map +1 -1
- package/menu/lib/shared.d.ts +20 -2
- package/menu/lib/shared.js +18 -0
- package/menu/lib/shared.js.map +1 -1
- package/menu/lib/submenuitem/sub-menu-item.d.ts +16 -13
- package/menu/lib/submenuitem/sub-menu-item.js +27 -18
- package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
- package/menu/lib/typeaheadController.d.ts +9 -9
- package/menu/lib/typeaheadController.js.map +1 -1
- package/navigationbar/lib/_navigation-bar.scss +7 -1
- package/navigationbar/lib/navigation-bar-styles.css.js +1 -1
- package/navigationbar/lib/navigation-bar-styles.css.js.map +1 -1
- package/navigationbar/lib/navigation-bar.d.ts +6 -6
- package/navigationbar/lib/navigation-bar.js +17 -18
- package/navigationbar/lib/navigation-bar.js.map +1 -1
- package/navigationbar/navigation-bar.d.ts +0 -1
- package/navigationbar/navigation-bar.js +0 -1
- package/navigationbar/navigation-bar.js.map +1 -1
- package/navigationdrawer/lib/_navigation-drawer-modal.scss +0 -3
- package/navigationdrawer/lib/_navigation-drawer.scss +0 -3
- package/navigationdrawer/lib/_shared.scss +1 -4
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js +1 -1
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js.map +1 -1
- package/navigationdrawer/lib/navigation-drawer-modal.d.ts +7 -12
- package/navigationdrawer/lib/navigation-drawer-modal.js +19 -41
- package/navigationdrawer/lib/navigation-drawer-modal.js.map +1 -1
- package/navigationdrawer/lib/navigation-drawer-styles.css.js +1 -1
- package/navigationdrawer/lib/navigation-drawer-styles.css.js.map +1 -1
- package/navigationdrawer/lib/navigation-drawer.d.ts +6 -10
- package/navigationdrawer/lib/navigation-drawer.js +17 -38
- package/navigationdrawer/lib/navigation-drawer.js.map +1 -1
- package/navigationdrawer/lib/shared-styles.css.js +1 -1
- package/navigationdrawer/lib/shared-styles.css.js.map +1 -1
- package/navigationdrawer/navigation-drawer-modal.d.ts +0 -1
- package/navigationdrawer/navigation-drawer-modal.js +0 -1
- package/navigationdrawer/navigation-drawer-modal.js.map +1 -1
- package/navigationdrawer/navigation-drawer.d.ts +0 -1
- package/navigationdrawer/navigation-drawer.js +0 -1
- package/navigationdrawer/navigation-drawer.js.map +1 -1
- package/navigationtab/lib/_navigation-tab.scss +2 -2
- package/navigationtab/lib/navigation-tab-styles.css.js +1 -1
- package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -1
- package/navigationtab/lib/navigation-tab.d.ts +16 -29
- package/navigationtab/lib/navigation-tab.js +49 -88
- package/navigationtab/lib/navigation-tab.js.map +1 -1
- package/navigationtab/lib/state.d.ts +1 -1
- package/navigationtab/lib/state.js.map +1 -1
- package/navigationtab/navigation-tab.d.ts +0 -1
- package/navigationtab/navigation-tab.js +0 -1
- package/navigationtab/navigation-tab.js.map +1 -1
- package/package.json +1 -1
- package/radio/lib/_radio.scss +1 -1
- package/radio/lib/radio-styles.css.js +1 -1
- package/radio/lib/radio-styles.css.js.map +1 -1
- package/radio/lib/radio.d.ts +2 -8
- package/radio/lib/radio.js +31 -58
- package/radio/lib/radio.js.map +1 -1
- package/ripple/lib/ripple.js +11 -13
- package/ripple/lib/ripple.js.map +1 -1
- package/segmentedbutton/lib/outlined-segmented-button.d.ts +16 -7
- package/segmentedbutton/lib/outlined-segmented-button.js +3 -3
- package/segmentedbutton/lib/outlined-segmented-button.js.map +1 -1
- package/segmentedbutton/lib/segmented-button.d.ts +28 -40
- package/segmentedbutton/lib/segmented-button.js +42 -96
- package/segmentedbutton/lib/segmented-button.js.map +1 -1
- package/segmentedbutton/outlined-segmented-button.d.ts +0 -1
- package/segmentedbutton/outlined-segmented-button.js +0 -1
- package/segmentedbutton/outlined-segmented-button.js.map +1 -1
- package/segmentedbuttonset/lib/_outlined-segmented-button-set.scss +32 -13
- package/segmentedbuttonset/lib/outlined-segmented-button-set.d.ts +6 -4
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js +3 -2
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js.map +1 -1
- package/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
- package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
- package/segmentedbuttonset/lib/segmented-button-set.d.ts +3 -9
- package/segmentedbuttonset/lib/segmented-button-set.js +14 -20
- package/segmentedbuttonset/lib/segmented-button-set.js.map +1 -1
- package/segmentedbuttonset/outlined-segmented-button-set.d.ts +0 -1
- package/segmentedbuttonset/outlined-segmented-button-set.js +0 -1
- package/segmentedbuttonset/outlined-segmented-button-set.js.map +1 -1
- package/select/_filled-select.scss +6 -0
- package/select/_outlined-select.scss +6 -0
- package/select/filled-select.d.ts +41 -0
- package/select/filled-select.js +46 -0
- package/select/filled-select.js.map +1 -0
- package/select/harness.d.ts +24 -0
- package/select/harness.js +53 -0
- package/select/harness.js.map +1 -0
- package/select/lib/_filled-select.scss +222 -0
- package/select/lib/_outlined-select.scss +180 -0
- package/select/lib/_shared.scss +48 -0
- package/select/lib/filled-forced-colors-styles.css.d.ts +1 -0
- package/select/lib/filled-forced-colors-styles.css.js +9 -0
- package/select/lib/filled-forced-colors-styles.css.js.map +1 -0
- package/select/lib/filled-forced-colors-styles.scss +29 -0
- package/select/lib/filled-select-styles.css.d.ts +1 -0
- package/select/lib/filled-select-styles.css.js +9 -0
- package/select/lib/filled-select-styles.css.js.map +1 -0
- package/select/lib/filled-select-styles.scss +10 -0
- package/select/lib/filled-select.d.ts +10 -0
- package/select/lib/filled-select.js +16 -0
- package/select/lib/filled-select.js.map +1 -0
- package/select/lib/outlined-forced-colors-styles.css.d.ts +1 -0
- package/select/lib/outlined-forced-colors-styles.css.js +9 -0
- package/select/lib/outlined-forced-colors-styles.css.js.map +1 -0
- package/select/lib/outlined-forced-colors-styles.scss +29 -0
- package/select/lib/outlined-select-styles.css.d.ts +1 -0
- package/select/lib/outlined-select-styles.css.js +9 -0
- package/select/lib/outlined-select-styles.css.js.map +1 -0
- package/select/lib/outlined-select-styles.scss +10 -0
- package/select/lib/outlined-select.d.ts +10 -0
- package/select/lib/outlined-select.js +16 -0
- package/select/lib/outlined-select.js.map +1 -0
- package/select/lib/select.d.ts +216 -0
- package/select/lib/select.js +589 -0
- package/select/lib/select.js.map +1 -0
- package/select/lib/selectoption/harness.d.ts +11 -0
- package/select/lib/selectoption/harness.js +12 -0
- package/select/lib/selectoption/harness.js.map +1 -0
- package/select/lib/selectoption/select-option.d.ts +30 -0
- package/select/lib/selectoption/select-option.js +71 -0
- package/select/lib/selectoption/select-option.js.map +1 -0
- package/select/lib/shared-styles.css.d.ts +1 -0
- package/select/lib/shared-styles.css.js +9 -0
- package/select/lib/shared-styles.css.js.map +1 -0
- package/select/lib/shared-styles.scss +10 -0
- package/select/lib/shared.d.ts +52 -0
- package/select/lib/shared.js +41 -0
- package/select/lib/shared.js.map +1 -0
- package/select/outlined-select.d.ts +41 -0
- package/select/outlined-select.js +46 -0
- package/select/outlined-select.js.map +1 -0
- package/select/select-option.d.ts +44 -0
- package/select/select-option.js +51 -0
- package/select/select-option.js.map +1 -0
- package/slider/harness.d.ts +2 -1
- package/slider/harness.js +14 -9
- package/slider/harness.js.map +1 -1
- package/slider/lib/_slider.scss +149 -167
- package/slider/lib/forced-colors-styles.css.js +1 -1
- package/slider/lib/forced-colors-styles.css.js.map +1 -1
- package/slider/lib/forced-colors-styles.scss +2 -2
- package/slider/lib/slider-styles.css.js +1 -1
- package/slider/lib/slider-styles.css.js.map +1 -1
- package/slider/lib/slider.d.ts +23 -57
- package/slider/lib/slider.js +77 -167
- package/slider/lib/slider.js.map +1 -1
- package/switch/lib/_switch.scss +63 -18
- package/switch/lib/switch-styles.css.js +1 -1
- package/switch/lib/switch-styles.css.js.map +1 -1
- package/switch/lib/switch.d.ts +0 -7
- package/switch/lib/switch.js +32 -79
- package/switch/lib/switch.js.map +1 -1
- package/textfield/harness.d.ts +1 -1
- package/textfield/harness.js.map +1 -1
- package/textfield/lib/_filled-text-field.scss +70 -14
- package/textfield/lib/_outlined-text-field.scss +60 -35
- package/textfield/lib/filled-forced-colors-styles.css.js +1 -1
- package/textfield/lib/filled-forced-colors-styles.css.js.map +1 -1
- package/textfield/lib/filled-styles.css.js +1 -1
- package/textfield/lib/filled-styles.css.js.map +1 -1
- package/textfield/lib/outlined-forced-colors-styles.css.js +1 -1
- package/textfield/lib/outlined-forced-colors-styles.css.js.map +1 -1
- package/textfield/lib/outlined-styles.css.js +1 -1
- package/textfield/lib/outlined-styles.css.js.map +1 -1
- package/textfield/lib/text-field.d.ts +1 -11
- package/textfield/lib/text-field.js +45 -115
- package/textfield/lib/text-field.js.map +1 -1
- package/tokens/_index.scss +5 -18
- package/tokens/_md-comp-assist-chip.scss +25 -29
- package/tokens/_md-comp-checkbox.scss +78 -1
- package/tokens/_md-comp-circular-progress-indicator.scss +39 -13
- package/tokens/_md-comp-elevated-button.scss +0 -10
- package/tokens/_md-comp-elevation.scss +0 -4
- package/tokens/_md-comp-fab-branded.scss +84 -1
- package/tokens/_md-comp-fab.scss +249 -0
- package/tokens/_md-comp-filled-button.scss +0 -10
- package/{field/lib → tokens}/_md-comp-filled-field.scss +91 -9
- package/tokens/_md-comp-filled-icon-button.scss +46 -1
- package/tokens/_md-comp-filled-select.scss +124 -1
- package/tokens/_md-comp-filled-text-field.scss +93 -9
- package/tokens/_md-comp-filled-tonal-button.scss +0 -11
- package/tokens/_md-comp-filled-tonal-icon-button.scss +45 -3
- package/tokens/_md-comp-filter-chip.scss +103 -103
- package/tokens/_md-comp-focus-ring.scss +23 -24
- package/tokens/_md-comp-icon-button.scss +37 -1
- package/tokens/_md-comp-input-chip.scss +77 -95
- package/tokens/_md-comp-linear-progress-indicator.scss +31 -3
- package/tokens/_md-comp-list-item.scss +174 -0
- package/tokens/_md-comp-list.scss +81 -26
- package/tokens/_md-comp-menu-item.scss +50 -0
- package/tokens/_md-comp-menu.scss +29 -2
- package/tokens/_md-comp-outlined-button.scss +0 -10
- package/{field/lib → tokens}/_md-comp-outlined-field.scss +85 -9
- package/tokens/_md-comp-outlined-icon-button.scss +41 -1
- package/tokens/_md-comp-outlined-segmented-button.scss +57 -11
- package/tokens/_md-comp-outlined-select.scss +123 -1
- package/tokens/_md-comp-outlined-text-field.scss +85 -8
- package/tokens/_md-comp-slider.scss +13 -1
- package/tokens/_md-comp-suggestion-chip.scss +29 -30
- package/tokens/_md-comp-switch.scss +81 -1
- package/tokens/_md-comp-text-button.scss +0 -10
- package/tokens/_values.scss +2 -4
- package/types/aria.d.ts +59 -1
- package/actionelement/action-element.d.ts +0 -79
- package/actionelement/action-element.js +0 -97
- package/actionelement/action-element.js.map +0 -1
- package/button/lib/state.d.ts +0 -10
- package/button/lib/state.js +0 -7
- package/button/lib/state.js.map +0 -1
- package/controller/action-controller.d.ts +0 -147
- package/controller/action-controller.js +0 -286
- package/controller/action-controller.js.map +0 -1
- package/decorators/aria-property.d.ts +0 -32
- package/decorators/aria-property.js +0 -99
- package/decorators/aria-property.js.map +0 -1
- package/fab/_fab-extended.scss +0 -6
- package/fab/fab-extended.d.ts +0 -23
- package/fab/fab-extended.js +0 -29
- package/fab/fab-extended.js.map +0 -1
- package/fab/lib/_fab-extended.scss +0 -73
- package/fab/lib/fab-extended-styles.css.js +0 -9
- package/fab/lib/fab-extended-styles.css.js.map +0 -1
- package/fab/lib/fab-extended.d.ts +0 -19
- package/fab/lib/fab-extended.js +0 -28
- package/fab/lib/fab-extended.js.map +0 -1
- package/fab/lib/fab-shared-styles.css.js +0 -9
- package/fab/lib/fab-shared-styles.css.js.map +0 -1
- package/fab/lib/fab-shared.d.ts +0 -44
- package/fab/lib/fab-shared.js +0 -121
- package/fab/lib/fab-shared.js.map +0 -1
- package/focus/strong-focus.d.ts +0 -56
- package/focus/strong-focus.js +0 -96
- package/focus/strong-focus.js.map +0 -1
- package/sass/_shape.scss +0 -154
- package/slider/lib/_tokens.scss +0 -65
- package/tokens/_md-comp-extended-fab-branded.scss +0 -45
- package/tokens/_md-comp-extended-fab-primary.scss +0 -45
- package/tokens/_md-comp-extended-fab-secondary.scss +0 -48
- package/tokens/_md-comp-extended-fab-surface.scss +0 -45
- package/tokens/_md-comp-extended-fab-tertiary.scss +0 -48
- package/tokens/_md-comp-fab-branded-large.scss +0 -23
- package/tokens/_md-comp-fab-primary-large.scss +0 -23
- package/tokens/_md-comp-fab-primary-small.scss +0 -23
- package/tokens/_md-comp-fab-primary.scss +0 -23
- package/tokens/_md-comp-fab-secondary-large.scss +0 -23
- package/tokens/_md-comp-fab-secondary-small.scss +0 -23
- package/tokens/_md-comp-fab-secondary.scss +0 -23
- package/tokens/_md-comp-fab-surface-large.scss +0 -23
- package/tokens/_md-comp-fab-surface-small.scss +0 -23
- package/tokens/_md-comp-fab-surface.scss +0 -23
- package/tokens/_md-comp-fab-tertiary-large.scss +0 -23
- package/tokens/_md-comp-fab-tertiary-small.scss +0 -23
- package/tokens/_md-comp-fab-tertiary.scss +0 -23
- /package/{fab/lib/fab-extended-styles.css.d.ts → chips/lib/elevated-styles.css.d.ts} +0 -0
- /package/{fab/lib/fab-shared-styles.css.d.ts → chips/lib/filter-styles.css.d.ts} +0 -0
package/switch/lib/switch.js
CHANGED
|
@@ -3,19 +3,17 @@
|
|
|
3
3
|
* Copyright 2021 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var _a;
|
|
7
|
+
import { __decorate } from "tslib";
|
|
8
8
|
import '../../focus/focus-ring.js';
|
|
9
9
|
import '../../ripple/ripple.js';
|
|
10
|
-
import { html, LitElement } from 'lit';
|
|
11
|
-
import {
|
|
10
|
+
import { html, isServer, LitElement, nothing } from 'lit';
|
|
11
|
+
import { property, query, queryAsync, state } from 'lit/decorators.js';
|
|
12
12
|
import { classMap } from 'lit/directives/class-map.js';
|
|
13
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
14
13
|
import { when } from 'lit/directives/when.js';
|
|
14
|
+
import { requestUpdateOnAriaChange } from '../../aria/delegate.js';
|
|
15
15
|
import { dispatchActivationClick, isActivationClick } from '../../controller/events.js';
|
|
16
16
|
import { FormController, getFormValue } from '../../controller/form-controller.js';
|
|
17
|
-
import { ariaProperty } from '../../decorators/aria-property.js';
|
|
18
|
-
import { pointerPress as focusRingPointerPress, shouldShowStrongFocus } from '../../focus/strong-focus.js';
|
|
19
17
|
import { ripple } from '../../ripple/directive.js';
|
|
20
18
|
/**
|
|
21
19
|
* @fires input {InputEvent} Fired whenever `selected` changes due to user
|
|
@@ -53,8 +51,6 @@ export class Switch extends LitElement {
|
|
|
53
51
|
* overrides the behavior of the `icons` property.
|
|
54
52
|
*/
|
|
55
53
|
this.showOnlySelectedIcon = false;
|
|
56
|
-
this.ariaLabelledBy = '';
|
|
57
|
-
this.showFocusRing = false;
|
|
58
54
|
this.showRipple = false;
|
|
59
55
|
/**
|
|
60
56
|
* The HTML name to use in form submission.
|
|
@@ -79,24 +75,21 @@ export class Switch extends LitElement {
|
|
|
79
75
|
this.showRipple = true;
|
|
80
76
|
return this.ripple;
|
|
81
77
|
};
|
|
82
|
-
this.renderFocusRing = () => {
|
|
83
|
-
return html `<md-focus-ring visible></md-focus-ring>`;
|
|
84
|
-
};
|
|
85
78
|
this.addController(new FormController(this));
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
79
|
+
if (!isServer) {
|
|
80
|
+
this.addEventListener('click', (event) => {
|
|
81
|
+
if (!isActivationClick(event)) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.button?.focus();
|
|
85
|
+
if (this.button != null) {
|
|
86
|
+
// this triggers the click behavior, and the ripple
|
|
87
|
+
dispatchActivationClick(this.button);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
96
91
|
}
|
|
97
92
|
render() {
|
|
98
|
-
const ariaLabelValue = this.ariaLabel ? this.ariaLabel : undefined;
|
|
99
|
-
const ariaLabelledByValue = this.ariaLabelledBy ? this.ariaLabelledBy : undefined;
|
|
100
93
|
// NOTE: buttons must use only [phrasing
|
|
101
94
|
// content](https://html.spec.whatwg.org/multipage/dom.html#phrasing-content)
|
|
102
95
|
// children, which includes custom elements, but not `div`s
|
|
@@ -106,16 +99,12 @@ export class Switch extends LitElement {
|
|
|
106
99
|
class="md3-switch ${classMap(this.getRenderClasses())}"
|
|
107
100
|
role="switch"
|
|
108
101
|
aria-checked="${this.selected}"
|
|
109
|
-
aria-label
|
|
110
|
-
aria-labelledby="${ifDefined(ariaLabelledByValue)}"
|
|
102
|
+
aria-label=${this.ariaLabel || nothing}
|
|
111
103
|
?disabled=${this.disabled}
|
|
112
104
|
@click=${this.handleClick}
|
|
113
|
-
@focus="${this.handleFocus}"
|
|
114
|
-
@blur="${this.handleBlur}"
|
|
115
|
-
@pointerdown=${this.handlePointerDown}
|
|
116
105
|
${ripple(this.getRipple)}
|
|
117
106
|
>
|
|
118
|
-
|
|
107
|
+
<md-focus-ring></md-focus-ring>
|
|
119
108
|
<span class="md3-switch__track">
|
|
120
109
|
${this.renderHandle()}
|
|
121
110
|
</span>
|
|
@@ -129,7 +118,6 @@ export class Switch extends LitElement {
|
|
|
129
118
|
};
|
|
130
119
|
}
|
|
131
120
|
renderHandle() {
|
|
132
|
-
/** @classMap */
|
|
133
121
|
const classes = {
|
|
134
122
|
'md3-switch__handle--big': this.icons && !this.showOnlySelectedIcon,
|
|
135
123
|
};
|
|
@@ -187,76 +175,41 @@ export class Switch extends LitElement {
|
|
|
187
175
|
// Additionally, native change event is not an InputEvent.
|
|
188
176
|
this.dispatchEvent(new Event('change', { bubbles: true }));
|
|
189
177
|
}
|
|
190
|
-
handleFocus() {
|
|
191
|
-
this.showFocusRing = shouldShowStrongFocus();
|
|
192
|
-
}
|
|
193
|
-
handleBlur() {
|
|
194
|
-
this.showFocusRing = false;
|
|
195
|
-
}
|
|
196
|
-
handlePointerDown() {
|
|
197
|
-
focusRingPointerPress();
|
|
198
|
-
this.showFocusRing = false;
|
|
199
|
-
}
|
|
200
178
|
}
|
|
179
|
+
_a = Switch;
|
|
180
|
+
(() => {
|
|
181
|
+
requestUpdateOnAriaChange(_a);
|
|
182
|
+
})();
|
|
201
183
|
Switch.shadowRootOptions = { mode: 'open', delegatesFocus: true };
|
|
202
184
|
/**
|
|
203
185
|
* @nocollapse
|
|
204
186
|
*/
|
|
205
187
|
Switch.formAssociated = true;
|
|
206
188
|
__decorate([
|
|
207
|
-
property({ type: Boolean, reflect: true })
|
|
208
|
-
__metadata("design:type", Object)
|
|
189
|
+
property({ type: Boolean, reflect: true })
|
|
209
190
|
], Switch.prototype, "disabled", void 0);
|
|
210
191
|
__decorate([
|
|
211
|
-
property({ type: Boolean })
|
|
212
|
-
__metadata("design:type", Object)
|
|
192
|
+
property({ type: Boolean })
|
|
213
193
|
], Switch.prototype, "selected", void 0);
|
|
214
194
|
__decorate([
|
|
215
|
-
property({ type: Boolean })
|
|
216
|
-
__metadata("design:type", Object)
|
|
195
|
+
property({ type: Boolean })
|
|
217
196
|
], Switch.prototype, "icons", void 0);
|
|
218
197
|
__decorate([
|
|
219
|
-
property({ type: Boolean })
|
|
220
|
-
__metadata("design:type", Object)
|
|
198
|
+
property({ type: Boolean })
|
|
221
199
|
], Switch.prototype, "showOnlySelectedIcon", void 0);
|
|
222
200
|
__decorate([
|
|
223
|
-
|
|
224
|
-
property({ type: String, attribute: 'data-aria-label', noAccessor: true }),
|
|
225
|
-
__metadata("design:type", String)
|
|
226
|
-
], Switch.prototype, "ariaLabel", void 0);
|
|
227
|
-
__decorate([
|
|
228
|
-
ariaProperty,
|
|
229
|
-
property({ type: String, attribute: 'data-aria-labelledby', noAccessor: true }),
|
|
230
|
-
__metadata("design:type", Object)
|
|
231
|
-
], Switch.prototype, "ariaLabelledBy", void 0);
|
|
232
|
-
__decorate([
|
|
233
|
-
state(),
|
|
234
|
-
__metadata("design:type", Object)
|
|
235
|
-
], Switch.prototype, "showFocusRing", void 0);
|
|
236
|
-
__decorate([
|
|
237
|
-
state(),
|
|
238
|
-
__metadata("design:type", Object)
|
|
201
|
+
state()
|
|
239
202
|
], Switch.prototype, "showRipple", void 0);
|
|
240
203
|
__decorate([
|
|
241
|
-
queryAsync('md-ripple')
|
|
242
|
-
__metadata("design:type", Promise)
|
|
204
|
+
queryAsync('md-ripple')
|
|
243
205
|
], Switch.prototype, "ripple", void 0);
|
|
244
206
|
__decorate([
|
|
245
|
-
query('button')
|
|
246
|
-
__metadata("design:type", HTMLButtonElement)
|
|
207
|
+
query('button')
|
|
247
208
|
], Switch.prototype, "button", void 0);
|
|
248
209
|
__decorate([
|
|
249
|
-
property({
|
|
250
|
-
__metadata("design:type", Object)
|
|
210
|
+
property({ reflect: true })
|
|
251
211
|
], Switch.prototype, "name", void 0);
|
|
252
212
|
__decorate([
|
|
253
|
-
property(
|
|
254
|
-
__metadata("design:type", Object)
|
|
213
|
+
property()
|
|
255
214
|
], Switch.prototype, "value", void 0);
|
|
256
|
-
__decorate([
|
|
257
|
-
eventOptions({ passive: true }),
|
|
258
|
-
__metadata("design:type", Function),
|
|
259
|
-
__metadata("design:paramtypes", []),
|
|
260
|
-
__metadata("design:returntype", void 0)
|
|
261
|
-
], Switch.prototype, "handlePointerDown", null);
|
|
262
215
|
//# sourceMappingURL=switch.js.map
|
package/switch/lib/switch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sourceRoot":"","sources":["switch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,mCAAmC;AAEnC,OAAO,2BAA2B,CAAC;AACnC,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAY,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAC,I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I,EAAC,CAAC;;8CAC1D;AAEpB;IAAC,KAAK,EAAE;;6CAA+B;AACvC;IAAC,KAAK,EAAE;;0CAA4B;AAGpC;IAAC,UAAU,CAAC,WAAW,CAAC;;sCAAkD;AAG1E;IAAC,KAAK,CAAC,QAAQ,CAAC;8BAA2B,iBAAiB;sCAAM;AAYlE;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;oCAAW;AAMnD;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;qCAAc;AA0JvC;IAAC,YAAY,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;;;;+CAI7B","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// tslint:disable:no-new-decorators\n\nimport '../../focus/focus-ring.js';\nimport '../../ripple/ripple.js';\n\nimport {html, LitElement, TemplateResult} from 'lit';\nimport {eventOptions, property, query, queryAsync, state} from 'lit/decorators.js';\nimport {ClassInfo, classMap} from 'lit/directives/class-map.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\nimport {when} from 'lit/directives/when.js';\n\nimport {dispatchActivationClick, isActivationClick} from '../../controller/events.js';\nimport {FormController, getFormValue} from '../../controller/form-controller.js';\nimport {ariaProperty} from '../../decorators/aria-property.js';\nimport {pointerPress as focusRingPointerPress, shouldShowStrongFocus} from '../../focus/strong-focus.js';\nimport {ripple} from '../../ripple/directive.js';\nimport {MdRipple} from '../../ripple/ripple.js';\n\n/**\n * @fires input {InputEvent} Fired whenever `selected` changes due to user\n * interaction (bubbles and composed).\n * @fires change {Event} Fired whenever `selected` changes due to user\n * interaction (bubbles).\n */\nexport class Switch extends LitElement {\n static override shadowRootOptions:\n ShadowRootInit = {mode: 'open', delegatesFocus: true};\n\n /**\n * @nocollapse\n */\n static formAssociated = true;\n\n /**\n * Disables the switch and makes it non-interactive.\n */\n @property({type: Boolean, reflect: true}) disabled = false;\n\n /**\n * Puts the switch in the selected state and sets the form submission value to\n * the `value` property.\n */\n @property({type: Boolean}) selected = false;\n\n /**\n * Shows both the selected and deselected icons.\n */\n @property({type: Boolean}) icons = false;\n\n /**\n * Shows only the selected icon, and not the deselected icon. If `true`,\n * overrides the behavior of the `icons` property.\n */\n @property({type: Boolean}) showOnlySelectedIcon = false;\n\n @ariaProperty\n @property({type: String, attribute: 'data-aria-label', noAccessor: true})\n override ariaLabel!: string;\n\n @ariaProperty\n @property({type: String, attribute: 'data-aria-labelledby', noAccessor: true})\n ariaLabelledBy = '';\n\n @state() private showFocusRing = false;\n @state() private showRipple = false;\n\n // Ripple\n @queryAsync('md-ripple') private readonly ripple!: Promise<MdRipple|null>;\n\n // Button\n @query('button') private readonly button!: HTMLButtonElement|null;\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.closest('form');\n }\n\n /**\n * The HTML name to use in form submission.\n */\n @property({type: String, reflect: true}) name = '';\n\n /**\n * The value associated with this switch on form submission. `null` is\n * submitted when `selected` is `false`.\n */\n @property({type: String}) value = 'on';\n\n [getFormValue]() {\n return this.selected ? this.value : null;\n }\n\n constructor() {\n super();\n this.addController(new FormController(this));\n this.addEventListener('click', (event: MouseEvent) => {\n if (!isActivationClick(event)) {\n return;\n }\n this.button?.focus();\n if (this.button != null) {\n // this triggers the click behavior, and the ripple\n dispatchActivationClick(this.button);\n }\n });\n }\n\n protected override render(): TemplateResult {\n const ariaLabelValue = this.ariaLabel ? this.ariaLabel : undefined;\n const ariaLabelledByValue =\n this.ariaLabelledBy ? this.ariaLabelledBy : undefined;\n // NOTE: buttons must use only [phrasing\n // content](https://html.spec.whatwg.org/multipage/dom.html#phrasing-content)\n // children, which includes custom elements, but not `div`s\n return html`\n <button\n type=\"button\"\n class=\"md3-switch ${classMap(this.getRenderClasses())}\"\n role=\"switch\"\n aria-checked=\"${this.selected}\"\n aria-label=\"${ifDefined(ariaLabelValue)}\"\n aria-labelledby=\"${ifDefined(ariaLabelledByValue)}\"\n ?disabled=${this.disabled}\n @click=${this.handleClick}\n @focus=\"${this.handleFocus}\"\n @blur=\"${this.handleBlur}\"\n @pointerdown=${this.handlePointerDown}\n ${ripple(this.getRipple)}\n >\n ${when(this.showFocusRing, this.renderFocusRing)}\n <span class=\"md3-switch__track\">\n ${this.renderHandle()}\n </span>\n </button>\n `;\n }\n\n private getRenderClasses(): ClassInfo {\n return {\n 'md3-switch--selected': this.selected,\n 'md3-switch--unselected': !this.selected,\n };\n }\n\n private readonly renderRipple = () => {\n return html`\n <span class=\"md3-switch__ripple\">\n <md-ripple\n ?disabled=\"${this.disabled}\"\n unbounded>\n </md-ripple>\n </span>\n `;\n };\n\n private readonly getRipple = () => {\n this.showRipple = true;\n return this.ripple;\n };\n\n private readonly renderFocusRing = () => {\n return html`<md-focus-ring visible></md-focus-ring>`;\n };\n\n private renderHandle(): TemplateResult {\n /** @classMap */\n const classes = {\n 'md3-switch__handle--big': this.icons && !this.showOnlySelectedIcon,\n };\n return html`\n <span class=\"md3-switch__handle-container\">\n ${when(this.showRipple, this.renderRipple)}\n <span class=\"md3-switch__handle ${classMap(classes)}\">\n ${this.shouldShowIcons() ? this.renderIcons() : html``}\n </span>\n ${this.renderTouchTarget()}\n </span>\n `;\n }\n\n private renderIcons(): TemplateResult {\n return html`\n <div class=\"md3-switch__icons\">\n ${this.renderOnIcon()}\n ${this.showOnlySelectedIcon ? html`` : this.renderOffIcon()}\n </div>\n `;\n }\n\n /**\n * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024\n */\n private renderOnIcon(): TemplateResult {\n return html`\n <svg class=\"md3-switch__icon md3-switch__icon--on\" viewBox=\"0 0 24 24\">\n <path d=\"M9.55 18.2 3.65 12.3 5.275 10.675 9.55 14.95 18.725 5.775 20.35 7.4Z\"/>\n </svg>\n `;\n }\n\n /**\n * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aclose%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024\n */\n private renderOffIcon(): TemplateResult {\n return html`\n <svg class=\"md3-switch__icon md3-switch__icon--off\" viewBox=\"0 0 24 24\">\n <path d=\"M6.4 19.2 4.8 17.6 10.4 12 4.8 6.4 6.4 4.8 12 10.4 17.6 4.8 19.2 6.4 13.6 12 19.2 17.6 17.6 19.2 12 13.6Z\"/>\n </svg>\n `;\n }\n\n private renderTouchTarget(): TemplateResult {\n return html`<span class=\"md3-switch__touch\"></span>`;\n }\n\n private shouldShowIcons(): boolean {\n return this.icons || this.showOnlySelectedIcon;\n }\n\n private handleClick() {\n if (this.disabled) {\n return;\n }\n\n this.selected = !this.selected;\n this.dispatchEvent(\n new InputEvent('input', {bubbles: true, composed: true}));\n // Bubbles but does not compose to mimic native browser <input> & <select>\n // Additionally, native change event is not an InputEvent.\n this.dispatchEvent(new Event('change', {bubbles: true}));\n }\n\n private handleFocus() {\n this.showFocusRing = shouldShowStrongFocus();\n }\n\n private handleBlur() {\n this.showFocusRing = false;\n }\n\n @eventOptions({passive: true})\n private handlePointerDown() {\n focusRingPointerPress();\n this.showFocusRing = false;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["switch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAY,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAE5C,OAAO,EAAC,yBAAyB,EAAC,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAC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AC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;qCAAe;AAMd;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;oDAA8B;AAE/C;IAAR,KAAK,EAAE;0CAA4B;AAGX;IAAxB,UAAU,CAAC,WAAW,CAAC;sCAAkD;AAGzD;IAAhB,KAAK,CAAC,QAAQ,CAAC;sCAAkD;AAYvC;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;oCAAW;AAMzB;IAAX,QAAQ,EAAE;qCAAc","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../focus/focus-ring.js';\nimport '../../ripple/ripple.js';\n\nimport {html, isServer, LitElement, nothing, TemplateResult} from 'lit';\nimport {property, query, queryAsync, state} from 'lit/decorators.js';\nimport {ClassInfo, classMap} from 'lit/directives/class-map.js';\nimport {when} from 'lit/directives/when.js';\n\nimport {requestUpdateOnAriaChange} from '../../aria/delegate.js';\nimport {dispatchActivationClick, isActivationClick} from '../../controller/events.js';\nimport {FormController, getFormValue} from '../../controller/form-controller.js';\nimport {ripple} from '../../ripple/directive.js';\nimport {MdRipple} from '../../ripple/ripple.js';\n\n/**\n * @fires input {InputEvent} Fired whenever `selected` changes due to user\n * interaction (bubbles and composed).\n * @fires change {Event} Fired whenever `selected` changes due to user\n * interaction (bubbles).\n */\nexport class Switch extends LitElement {\n static {\n requestUpdateOnAriaChange(this);\n }\n\n static override shadowRootOptions:\n ShadowRootInit = {mode: 'open', delegatesFocus: true};\n\n /**\n * @nocollapse\n */\n static formAssociated = true;\n\n /**\n * Disables the switch and makes it non-interactive.\n */\n @property({type: Boolean, reflect: true}) disabled = false;\n\n /**\n * Puts the switch in the selected state and sets the form submission value to\n * the `value` property.\n */\n @property({type: Boolean}) selected = false;\n\n /**\n * Shows both the selected and deselected icons.\n */\n @property({type: Boolean}) icons = false;\n\n /**\n * Shows only the selected icon, and not the deselected icon. If `true`,\n * overrides the behavior of the `icons` property.\n */\n @property({type: Boolean}) showOnlySelectedIcon = false;\n\n @state() private showRipple = false;\n\n // Ripple\n @queryAsync('md-ripple') private readonly ripple!: Promise<MdRipple|null>;\n\n // Button\n @query('button') private readonly button!: HTMLButtonElement|null;\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.closest('form');\n }\n\n /**\n * The HTML name to use in form submission.\n */\n @property({reflect: true}) name = '';\n\n /**\n * The value associated with this switch on form submission. `null` is\n * submitted when `selected` is `false`.\n */\n @property() value = 'on';\n\n [getFormValue]() {\n return this.selected ? this.value : null;\n }\n\n constructor() {\n super();\n this.addController(new FormController(this));\n if (!isServer) {\n this.addEventListener('click', (event: MouseEvent) => {\n if (!isActivationClick(event)) {\n return;\n }\n this.button?.focus();\n if (this.button != null) {\n // this triggers the click behavior, and the ripple\n dispatchActivationClick(this.button);\n }\n });\n }\n }\n\n protected override render(): TemplateResult {\n // NOTE: buttons must use only [phrasing\n // content](https://html.spec.whatwg.org/multipage/dom.html#phrasing-content)\n // children, which includes custom elements, but not `div`s\n return html`\n <button\n type=\"button\"\n class=\"md3-switch ${classMap(this.getRenderClasses())}\"\n role=\"switch\"\n aria-checked=\"${this.selected}\"\n aria-label=${(this as ARIAMixin).ariaLabel || nothing}\n ?disabled=${this.disabled}\n @click=${this.handleClick}\n ${ripple(this.getRipple)}\n >\n <md-focus-ring></md-focus-ring>\n <span class=\"md3-switch__track\">\n ${this.renderHandle()}\n </span>\n </button>\n `;\n }\n\n private getRenderClasses(): ClassInfo {\n return {\n 'md3-switch--selected': this.selected,\n 'md3-switch--unselected': !this.selected,\n };\n }\n\n private readonly renderRipple = () => {\n return html`\n <span class=\"md3-switch__ripple\">\n <md-ripple\n ?disabled=\"${this.disabled}\"\n unbounded>\n </md-ripple>\n </span>\n `;\n };\n\n private readonly getRipple = () => {\n this.showRipple = true;\n return this.ripple;\n };\n\n private renderHandle() {\n const classes = {\n 'md3-switch__handle--big': this.icons && !this.showOnlySelectedIcon,\n };\n return html`\n <span class=\"md3-switch__handle-container\">\n ${when(this.showRipple, this.renderRipple)}\n <span class=\"md3-switch__handle ${classMap(classes)}\">\n ${this.shouldShowIcons() ? this.renderIcons() : html``}\n </span>\n ${this.renderTouchTarget()}\n </span>\n `;\n }\n\n private renderIcons() {\n return html`\n <div class=\"md3-switch__icons\">\n ${this.renderOnIcon()}\n ${this.showOnlySelectedIcon ? html`` : this.renderOffIcon()}\n </div>\n `;\n }\n\n /**\n * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024\n */\n private renderOnIcon() {\n return html`\n <svg class=\"md3-switch__icon md3-switch__icon--on\" viewBox=\"0 0 24 24\">\n <path d=\"M9.55 18.2 3.65 12.3 5.275 10.675 9.55 14.95 18.725 5.775 20.35 7.4Z\"/>\n </svg>\n `;\n }\n\n /**\n * https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aclose%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024\n */\n private renderOffIcon() {\n return html`\n <svg class=\"md3-switch__icon md3-switch__icon--off\" viewBox=\"0 0 24 24\">\n <path d=\"M6.4 19.2 4.8 17.6 10.4 12 4.8 6.4 6.4 4.8 12 10.4 17.6 4.8 19.2 6.4 13.6 12 19.2 17.6 17.6 19.2 12 13.6Z\"/>\n </svg>\n `;\n }\n\n private renderTouchTarget() {\n return html`<span class=\"md3-switch__touch\"></span>`;\n }\n\n private shouldShowIcons(): boolean {\n return this.icons || this.showOnlySelectedIcon;\n }\n\n private handleClick() {\n if (this.disabled) {\n return;\n }\n\n this.selected = !this.selected;\n this.dispatchEvent(\n new InputEvent('input', {bubbles: true, composed: true}));\n // Bubbles but does not compose to mimic native browser <input> & <select>\n // Additionally, native change event is not an InputEvent.\n this.dispatchEvent(new Event('change', {bubbles: true}));\n }\n}\n"]}
|
package/textfield/harness.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { TextField } from './lib/text-field.js';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class TextFieldHarness extends Harness<TextField> {
|
|
12
12
|
/** Used to track whether or not a change event should be dispatched. */
|
|
13
|
-
|
|
13
|
+
private valueBeforeChange;
|
|
14
14
|
/**
|
|
15
15
|
* Simulates a user typing a value one character at a time. This will fire
|
|
16
16
|
* multiple input events.
|
package/textfield/harness.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness.js","sourceRoot":"","sources":["harness.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAI9C;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAkB;IAAxD;;QACE,wEAAwE;
|
|
1
|
+
{"version":3,"file":"harness.js","sourceRoot":"","sources":["harness.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAI9C;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,OAAkB;IAAxD;;QACE,wEAAwE;QAChE,sBAAiB,GAAG,EAAE,CAAC;IA0HjC,CAAC;IAxHC;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,UAAU,CAAC,KAAa;QAC5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACxB,IAAI,CAAC,gBAAgB,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,CAAC,CAAC;YAChE,IAAI,CAAC,aAAa,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9D;IACH,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,WAAW,CAAC,UAAmB,EAAE,QAAiB;QACtD,IAAI,CAAC,gBAAgB,CAAC,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,WAAW,CAAC,CAAC;QACvE,IAAI,CA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from '../testing/harness.js';\n\nimport {TextField} from './lib/text-field.js';\n\n/**\n * Test harness for text field elements.\n */\nexport class TextFieldHarness extends Harness<TextField> {\n /** Used to track whether or not a change event should be dispatched. */\n private valueBeforeChange = '';\n\n /**\n * Simulates a user typing a value one character at a time. This will fire\n * multiple input events.\n *\n * Use focus/blur to ensure change events are fired.\n *\n * @example\n * await harness.focusWithKeyboard();\n * await harness.inputValue('value'); // input events\n * await harness.blur(); // change event\n *\n * @param value The value to simulating typing.\n */\n async inputValue(value: string) {\n for (const char of value) {\n this.simulateKeypress(await this.getInteractiveElement(), char);\n this.simulateInput(await this.getInteractiveElement(), char);\n }\n }\n\n /**\n * Simulates a user deleting part of a value with the backspace key.\n * By default, the entire value is deleted. This will fire a single input\n * event.\n *\n * Use focus/blur to ensure change events are fired.\n *\n * @example\n * await harness.focusWithKeyboard();\n * await harness.deleteValue(); // input event\n * await harness.blur(); // change event\n *\n * @param beginIndex The starting index of the value to delete.\n * @param endIndex The ending index of the value to delete.\n */\n async deleteValue(beginIndex?: number, endIndex?: number) {\n this.simulateKeypress(await this.getInteractiveElement(), 'Backspace');\n this.simulateDeletion(\n await this.getInteractiveElement(), beginIndex, endIndex);\n }\n\n override async reset() {\n this.element.reset();\n this.valueBeforeChange = this.element.value;\n await super.reset();\n }\n\n override async blur() {\n await super.blur();\n this.simulateChangeIfNeeded(await this.getInteractiveElement());\n }\n\n protected override simulatePointerFocus(input: HTMLElement) {\n const textField = this.element;\n if (textField.disabled) {\n return;\n }\n\n this.valueBeforeChange = textField.value;\n super.simulatePointerFocus(input);\n\n const prevFocus = input.focus;\n if (prevFocus === HTMLElement.prototype.focus) {\n // Swap to a no-op if nobody is spying on this method so that we don't\n // generate side-effects when we actually call focus().\n input.focus = () => {};\n }\n\n // Call focus() as a side-effect since delegatesFocus won't be triggered\n // with this simulation. Replace input.focus() with a no-op if needed to\n // avoid actually calling focus.\n textField.focus();\n input.focus = prevFocus;\n }\n\n protected simulateInput(\n element: HTMLInputElement, charactersToAppend: string,\n init?: InputEventInit) {\n element.value += charactersToAppend;\n if (!init) {\n init = {\n inputType: 'insertText',\n isComposing: false,\n data: charactersToAppend,\n };\n }\n\n element.dispatchEvent(new InputEvent('input', init));\n }\n\n protected simulateDeletion(\n element: HTMLInputElement, beginIndex?: number, endIndex?: number,\n init?: InputEventInit) {\n const deletedCharacters = element.value.slice(beginIndex, endIndex);\n element.value = element.value.substring(0, beginIndex ?? 0) +\n element.value.substring(endIndex ?? element.value.length);\n if (!init) {\n init = {\n inputType: 'deleteContentBackward',\n isComposing: false,\n data: deletedCharacters,\n };\n }\n\n element.dispatchEvent(new InputEvent('input', init));\n }\n\n protected simulateChangeIfNeeded(element: HTMLInputElement) {\n if (this.valueBeforeChange === element.value) {\n return;\n }\n\n this.valueBeforeChange = element.value;\n element.dispatchEvent(new Event('change'));\n }\n\n protected override async getInteractiveElement() {\n await this.element.updateComplete;\n return this.element.renderRoot.querySelector('input')!;\n }\n}\n"]}
|
|
@@ -4,34 +4,87 @@
|
|
|
4
4
|
//
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
|
+
@use 'sass:list';
|
|
7
8
|
@use 'sass:map';
|
|
9
|
+
@use 'sass:meta';
|
|
8
10
|
// go/keep-sorted end
|
|
9
11
|
// go/keep-sorted start
|
|
10
12
|
@use '../../field/filled-field';
|
|
11
|
-
@use '../../sass/shape';
|
|
12
|
-
@use '../../sass/theme';
|
|
13
13
|
@use '../../tokens';
|
|
14
|
-
@use './shared';
|
|
15
14
|
// go/keep-sorted end
|
|
16
15
|
|
|
17
16
|
@mixin theme($tokens) {
|
|
18
|
-
$
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
$supported-tokens: list.join(
|
|
18
|
+
tokens.$md-comp-filled-text-field-supported-tokens,
|
|
19
|
+
(
|
|
20
|
+
'container-shape-start-start',
|
|
21
|
+
'container-shape-start-end',
|
|
22
|
+
'container-shape-end-end',
|
|
23
|
+
'container-shape-end-start',
|
|
24
|
+
'container-padding-horizontal',
|
|
25
|
+
'container-padding-vertical',
|
|
26
|
+
'input-text-prefix-padding',
|
|
27
|
+
'input-text-suffix-padding',
|
|
28
|
+
'focus-caret-color'
|
|
29
|
+
)
|
|
30
|
+
);
|
|
23
31
|
|
|
24
|
-
@
|
|
32
|
+
@each $token, $value in $tokens {
|
|
33
|
+
@if list.index($supported-tokens, $token) == null {
|
|
34
|
+
@error 'Token `#{$token}` is not a supported token.';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@if $token == 'container-shape' and meta.type-of($value) == 'list' {
|
|
38
|
+
@error 'Filled text field `container-shape` may not be specified as a list. Use logical (`*-start-start`) tokens instead.';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@if $value {
|
|
42
|
+
--md-filled-text-field-#{$token}: #{$value};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
25
45
|
}
|
|
26
46
|
|
|
27
47
|
@mixin styles() {
|
|
28
|
-
$tokens:
|
|
29
|
-
|
|
30
|
-
$tokens:
|
|
48
|
+
$tokens: tokens.md-comp-filled-text-field-values();
|
|
49
|
+
// Add missing tokens
|
|
50
|
+
$tokens: map.merge(
|
|
51
|
+
(
|
|
52
|
+
'container-padding-horizontal': 16px,
|
|
53
|
+
'container-padding-vertical': 16px,
|
|
54
|
+
'input-text-prefix-padding': 2px,
|
|
55
|
+
'input-text-suffix-padding': 2px,
|
|
56
|
+
'with-label-container-padding-vertical': 8px,
|
|
57
|
+
// TODO(b/270705687): remove when focus-caret-color token added
|
|
58
|
+
'focus-caret-color':
|
|
59
|
+
map.get(tokens.md-sys-color-values-light(), 'primary'),
|
|
60
|
+
),
|
|
61
|
+
$tokens
|
|
62
|
+
);
|
|
31
63
|
|
|
32
64
|
:host {
|
|
33
65
|
@each $token, $value in $tokens {
|
|
34
|
-
|
|
66
|
+
@if $token == 'container-shape' {
|
|
67
|
+
// Support logical shape properties. Filled text field has a default
|
|
68
|
+
// oblong shape, which is why the fallback value is unique per corner.
|
|
69
|
+
--_container-shape-start-start: var(
|
|
70
|
+
--md-filled-text-field-container-shape-start-start,
|
|
71
|
+
var(--md-filled-text-field-container-shape, #{list.nth($value, 1)})
|
|
72
|
+
);
|
|
73
|
+
--_container-shape-start-end: var(
|
|
74
|
+
--md-filled-text-field-container-shape-start-end,
|
|
75
|
+
var(--md-filled-text-field-container-shape, #{list.nth($value, 2)})
|
|
76
|
+
);
|
|
77
|
+
--_container-shape-end-end: var(
|
|
78
|
+
--md-filled-text-field-container-shape-end-end,
|
|
79
|
+
var(--md-filled-text-field-container-shape, #{list.nth($value, 3)})
|
|
80
|
+
);
|
|
81
|
+
--_container-shape-end-start: var(
|
|
82
|
+
--md-filled-text-field-container-shape-end-start,
|
|
83
|
+
var(--md-filled-text-field-container-shape, #{list.nth($value, 4)})
|
|
84
|
+
);
|
|
85
|
+
} @else {
|
|
86
|
+
--_#{$token}: var(--md-filled-text-field-#{$token}, #{$value});
|
|
87
|
+
}
|
|
35
88
|
}
|
|
36
89
|
|
|
37
90
|
@include filled-field.theme(
|
|
@@ -42,7 +95,10 @@
|
|
|
42
95
|
'container-color': var(--_container-color),
|
|
43
96
|
'container-padding-horizontal': var(--_container-padding-horizontal),
|
|
44
97
|
'container-padding-vertical': var(--_container-padding-vertical),
|
|
45
|
-
'container-shape':
|
|
98
|
+
'container-shape-end-end': var(--_container-shape-end-end),
|
|
99
|
+
'container-shape-end-start': var(--_container-shape-end-start),
|
|
100
|
+
'container-shape-start-end': var(--_container-shape-start-end),
|
|
101
|
+
'container-shape-start-start': var(--_container-shape-start-start),
|
|
46
102
|
'content-color': var(--_input-text-color),
|
|
47
103
|
'content-type': var(--_input-text-type),
|
|
48
104
|
'disabled-active-indicator-color':
|
|
@@ -4,44 +4,89 @@
|
|
|
4
4
|
//
|
|
5
5
|
|
|
6
6
|
// go/keep-sorted start
|
|
7
|
+
@use 'sass:list';
|
|
7
8
|
@use 'sass:map';
|
|
8
9
|
// go/keep-sorted end
|
|
9
10
|
// go/keep-sorted start
|
|
10
11
|
@use '../../field/outlined-field';
|
|
11
|
-
@use '../../sass/shape';
|
|
12
|
-
@use '../../sass/theme';
|
|
13
12
|
@use '../../tokens';
|
|
14
|
-
@use './shared';
|
|
15
13
|
// go/keep-sorted end
|
|
16
14
|
|
|
17
15
|
@mixin theme($tokens) {
|
|
18
|
-
$
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
$supported-tokens: list.join(
|
|
17
|
+
tokens.$md-comp-outlined-text-field-supported-tokens,
|
|
18
|
+
(
|
|
19
|
+
'container-shape-start-start',
|
|
20
|
+
'container-shape-start-end',
|
|
21
|
+
'container-shape-end-end',
|
|
22
|
+
'container-shape-end-start',
|
|
23
|
+
'container-padding-horizontal',
|
|
24
|
+
'container-padding-vertical',
|
|
25
|
+
'input-text-prefix-padding',
|
|
26
|
+
'input-text-suffix-padding',
|
|
27
|
+
'focus-caret-color'
|
|
28
|
+
)
|
|
29
|
+
);
|
|
23
30
|
|
|
24
|
-
@
|
|
31
|
+
@each $token, $value in $tokens {
|
|
32
|
+
@if list.index($supported-tokens, $token) == null {
|
|
33
|
+
@error 'Token `#{$token}` is not a supported token.';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@if $value {
|
|
37
|
+
--md-outlined-text-field-#{$token}: #{$value};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
25
40
|
}
|
|
26
41
|
|
|
27
42
|
@mixin styles() {
|
|
28
|
-
$tokens:
|
|
29
|
-
|
|
30
|
-
$tokens:
|
|
43
|
+
$tokens: tokens.md-comp-outlined-text-field-values();
|
|
44
|
+
// Add missing tokens
|
|
45
|
+
$tokens: map.merge(
|
|
46
|
+
(
|
|
47
|
+
'container-padding-horizontal': 16px,
|
|
48
|
+
'container-padding-vertical': 16px,
|
|
49
|
+
'input-text-prefix-padding': 2px,
|
|
50
|
+
'input-text-suffix-padding': 2px,
|
|
51
|
+
// TODO(b/270705687): remove when focus-caret-color token added
|
|
52
|
+
'focus-caret-color':
|
|
53
|
+
map.get(tokens.md-sys-color-values-light(), 'primary'),
|
|
54
|
+
),
|
|
55
|
+
$tokens
|
|
56
|
+
);
|
|
31
57
|
|
|
32
58
|
:host {
|
|
33
59
|
@each $token, $value in $tokens {
|
|
34
|
-
--_#{$token}: #{$value};
|
|
60
|
+
--_#{$token}: var(--md-outlined-text-field-#{$token}, #{$value});
|
|
35
61
|
}
|
|
36
62
|
|
|
37
|
-
|
|
63
|
+
// Support logical shape properties
|
|
64
|
+
--_container-shape-start-start: var(
|
|
65
|
+
--md-outlined-text-field-container-shape-start-start,
|
|
66
|
+
var(--_container-shape)
|
|
67
|
+
);
|
|
68
|
+
--_container-shape-start-end: var(
|
|
69
|
+
--md-outlined-text-field-container-shape-start-end,
|
|
70
|
+
var(--_container-shape)
|
|
71
|
+
);
|
|
72
|
+
--_container-shape-end-end: var(
|
|
73
|
+
--md-outlined-text-field-container-shape-end-end,
|
|
74
|
+
var(--_container-shape)
|
|
75
|
+
);
|
|
76
|
+
--_container-shape-end-start: var(
|
|
77
|
+
--md-outlined-text-field-container-shape-end-start,
|
|
78
|
+
var(--_container-shape)
|
|
79
|
+
);
|
|
38
80
|
|
|
39
81
|
@include outlined-field.theme(
|
|
40
82
|
(
|
|
41
83
|
// go/keep-sorted start
|
|
42
84
|
'container-padding-horizontal': var(--_container-padding-horizontal),
|
|
43
85
|
'container-padding-vertical': var(--_container-padding-vertical),
|
|
44
|
-
'container-shape':
|
|
86
|
+
'container-shape-end-end': var(--_container-shape-end-end),
|
|
87
|
+
'container-shape-end-start': var(--_container-shape-end-start),
|
|
88
|
+
'container-shape-start-end': var(--_container-shape-start-end),
|
|
89
|
+
'container-shape-start-start': var(--_container-shape-start-start),
|
|
45
90
|
'content-color': var(--_input-text-color),
|
|
46
91
|
'content-type': var(--_input-text-type),
|
|
47
92
|
'disabled-content-color': var(--_disabled-input-text-color),
|
|
@@ -114,23 +159,3 @@
|
|
|
114
159
|
);
|
|
115
160
|
}
|
|
116
161
|
}
|
|
117
|
-
|
|
118
|
-
@function _resolve-tokens($tokens, $exclude-hardcoded-values: false) {
|
|
119
|
-
@if not $exclude-hardcoded-values {
|
|
120
|
-
// Add missing tokens
|
|
121
|
-
$tokens: map.merge(
|
|
122
|
-
(
|
|
123
|
-
'container-padding-horizontal': 16px,
|
|
124
|
-
'container-padding-vertical': 16px,
|
|
125
|
-
'input-text-prefix-padding': 2px,
|
|
126
|
-
'input-text-suffix-padding': 2px,
|
|
127
|
-
// TODO(b/270705687): remove when focus-caret-color token added
|
|
128
|
-
'focus-caret-color':
|
|
129
|
-
map.get(tokens.md-sys-color-values-light(), 'primary'),
|
|
130
|
-
),
|
|
131
|
-
$tokens
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@return $tokens;
|
|
136
|
-
}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { css } from 'lit';
|
|
7
|
-
export const styles = css `@media(forced-colors: active){:host{--md-filled-text-field-disabled-active-indicator-color:GrayText;--md-filled-text-field-disabled-active-indicator-opacity:1;--md-filled-text-field-disabled-input-text-color:GrayText;--md-filled-text-field-disabled-input-text-opacity:1;--md-filled-text-field-disabled-label-text-color:GrayText;--md-filled-text-field-disabled-label-text-opacity:1;--md-filled-text-field-disabled-leading-icon-color:GrayText;--md-filled-text-field-disabled-leading-icon-opacity:1;--md-filled-text-field-disabled-supporting-text-color:GrayText;--md-filled-text-field-disabled-supporting-text-opacity:1;--md-filled-text-field-disabled-trailing-icon-color:GrayText;--md-filled-text-field-disabled-trailing-icon-opacity:1}}/*# sourceMappingURL=filled-forced-colors-styles.css.map */
|
|
7
|
+
export const styles = css `@media(forced-colors: active){:host{--md-filled-text-field-disabled-active-indicator-color: GrayText;--md-filled-text-field-disabled-active-indicator-opacity: 1;--md-filled-text-field-disabled-input-text-color: GrayText;--md-filled-text-field-disabled-input-text-opacity: 1;--md-filled-text-field-disabled-label-text-color: GrayText;--md-filled-text-field-disabled-label-text-opacity: 1;--md-filled-text-field-disabled-leading-icon-color: GrayText;--md-filled-text-field-disabled-leading-icon-opacity: 1;--md-filled-text-field-disabled-supporting-text-color: GrayText;--md-filled-text-field-disabled-supporting-text-opacity: 1;--md-filled-text-field-disabled-trailing-icon-color: GrayText;--md-filled-text-field-disabled-trailing-icon-opacity: 1}}/*# sourceMappingURL=filled-forced-colors-styles.css.map */
|
|
8
8
|
`;
|
|
9
9
|
//# sourceMappingURL=filled-forced-colors-styles.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filled-forced-colors-styles.css.js","sourceRoot":"","sources":["filled-forced-colors-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`@media(forced-colors: active){:host{--md-filled-text-field-disabled-active-indicator-color:GrayText;--md-filled-text-field-disabled-active-indicator-opacity:1;--md-filled-text-field-disabled-input-text-color:GrayText;--md-filled-text-field-disabled-input-text-opacity:1;--md-filled-text-field-disabled-label-text-color:GrayText;--md-filled-text-field-disabled-label-text-opacity:1;--md-filled-text-field-disabled-leading-icon-color:GrayText;--md-filled-text-field-disabled-leading-icon-opacity:1;--md-filled-text-field-disabled-supporting-text-color:GrayText;--md-filled-text-field-disabled-supporting-text-opacity:1;--md-filled-text-field-disabled-trailing-icon-color:GrayText;--md-filled-text-field-disabled-trailing-icon-opacity:1}}/*# sourceMappingURL=filled-forced-colors-styles.css.map */\n`;\n "]}
|
|
1
|
+
{"version":3,"file":"filled-forced-colors-styles.css.js","sourceRoot":"","sources":["filled-forced-colors-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`@media(forced-colors: active){:host{--md-filled-text-field-disabled-active-indicator-color: GrayText;--md-filled-text-field-disabled-active-indicator-opacity: 1;--md-filled-text-field-disabled-input-text-color: GrayText;--md-filled-text-field-disabled-input-text-opacity: 1;--md-filled-text-field-disabled-label-text-color: GrayText;--md-filled-text-field-disabled-label-text-opacity: 1;--md-filled-text-field-disabled-leading-icon-color: GrayText;--md-filled-text-field-disabled-leading-icon-opacity: 1;--md-filled-text-field-disabled-supporting-text-color: GrayText;--md-filled-text-field-disabled-supporting-text-opacity: 1;--md-filled-text-field-disabled-trailing-icon-color: GrayText;--md-filled-text-field-disabled-trailing-icon-opacity: 1}}/*# sourceMappingURL=filled-forced-colors-styles.css.map */\n`;\n "]}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { css } from 'lit';
|
|
7
|
-
export const styles = css `:host{--_container-shape-start-start: var(--md-filled-text-field-container-shape-start-start, var(--md-filled-text-field-container-shape, 4px));--_container-shape-start-end: var(--md-filled-text-field-container-shape-start-end, var(--md-filled-text-field-container-shape, 4px));--_container-shape-end-end: var(--md-filled-text-field-container-shape-end-end, var(--md-filled-text-field-container-shape, 0px));--_container-shape-end-start: var(--md-filled-text-field-container-shape-end-start, var(--md-filled-text-field-container-shape, 0px));--_container-padding-horizontal: var(--md-filled-text-field-container-padding-horizontal, 16px);--_container-padding-vertical: var(--md-filled-text-field-container-padding-vertical, 16px);--_input-text-prefix-padding: var(--md-filled-text-field-input-text-prefix-padding, 2px);--_input-text-suffix-padding: var(--md-filled-text-field-input-text-suffix-padding, 2px);--_with-label-container-padding-vertical: var(--md-filled-text-field-with-label-container-padding-vertical, 8px);--_focus-caret-color: var(--md-filled-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-color: var(--md-filled-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-text-field-active-indicator-height, 1px);--_caret-color: var(--md-filled-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-color: var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-active-indicator-color: var(--md-filled-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-text-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-text-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-text-field-disabled-container-opacity, 0.04);--_disabled-input-text-color: var(--md-filled-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-filled-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filled-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filled-text-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-caret-color: var(--md-filled-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-filled-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-filled-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-input-text-color: var(--md-filled-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-text-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-filled-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-filled-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-text-field-focus-active-indicator-height, 2px);--_focus-input-text-color: var(--md-filled-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-text-field-hover-active-indicator-height, 1px);--_hover-input-text-color: var(--md-filled-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-text-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-text-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-filled-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-placeholder-color: var(--md-filled-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-filled-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-suffix-color: var(--md-filled-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-type: var(--md-filled-text-field-input-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_label-text-color: var(--md-filled-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-populated-line-height: var(--md-filled-text-field-label-text-populated-line-height, 1rem);--_label-text-populated-size: var(--md-filled-text-field-label-text-populated-size, 0.75rem);--_label-text-type: var(--md-filled-text-field-label-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_leading-icon-color: var(--md-filled-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-text-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-filled-text-field-supporting-text-type, var(--md-sys-typescale-body-small, 400 0.75rem / 1rem var(--md-ref-typeface-plain, Roboto)));--_trailing-icon-color: var(--md-filled-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-text-field-trailing-icon-size, 24px);--md-filled-field-container-shape-start-start:var(--md-filled-field-container-shape, var(--_container-shape-start-start));--md-filled-field-container-shape-start-end:var(--md-filled-field-container-shape, var(--_container-shape-start-end));--md-filled-field-container-shape-end-end:var(--md-filled-field-container-shape, var(--_container-shape-end-end));--md-filled-field-container-shape-end-start:var(--md-filled-field-container-shape, var(--_container-shape-end-start));--md-filled-field-active-indicator-color:var(--_active-indicator-color);--md-filled-field-active-indicator-height:var(--_active-indicator-height);--md-filled-field-container-color:var(--_container-color);--md-filled-field-container-padding-horizontal:var(--_container-padding-horizontal);--md-filled-field-container-padding-vertical:var(--_container-padding-vertical);--md-filled-field-content-color:var(--_input-text-color);--md-filled-field-content-type:var(--_input-text-type);--md-filled-field-disabled-active-indicator-color:var(--_disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height:var(--_disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity:var(--_disabled-active-indicator-opacity);--md-filled-field-disabled-container-color:var(--_disabled-container-color);--md-filled-field-disabled-container-opacity:var(--_disabled-container-opacity);--md-filled-field-disabled-content-color:var(--_disabled-input-text-color);--md-filled-field-disabled-content-opacity:var(--_disabled-input-text-opacity);--md-filled-field-disabled-label-text-color:var(--_disabled-label-text-color);--md-filled-field-disabled-label-text-opacity:var(--_disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color:var(--_disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity:var(--_disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color:var(--_disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity:var(--_disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color:var(--_disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity:var(--_disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color:var(--_error-active-indicator-color);--md-filled-field-error-content-color:var(--_error-input-text-color);--md-filled-field-error-focus-active-indicator-color:var(--_error-focus-active-indicator-color);--md-filled-field-error-focus-content-color:var(--_error-focus-input-text-color);--md-filled-field-error-focus-label-text-color:var(--_error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color:var(--_error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color:var(--_error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color:var(--_error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color:var(--_error-hover-active-indicator-color);--md-filled-field-error-hover-content-color:var(--_error-hover-input-text-color);--md-filled-field-error-hover-label-text-color:var(--_error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color:var(--_error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color:var(--_error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity:var(--_error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color:var(--_error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color:var(--_error-hover-trailing-icon-color);--md-filled-field-error-label-text-color:var(--_error-label-text-color);--md-filled-field-error-leading-content-color:var(--_error-leading-icon-color);--md-filled-field-error-supporting-text-color:var(--_error-supporting-text-color);--md-filled-field-error-trailing-content-color:var(--_error-trailing-icon-color);--md-filled-field-focus-active-indicator-color:var(--_focus-active-indicator-color);--md-filled-field-focus-active-indicator-height:var(--_focus-active-indicator-height);--md-filled-field-focus-content-color:var(--_focus-input-text-color);--md-filled-field-focus-label-text-color:var(--_focus-label-text-color);--md-filled-field-focus-leading-content-color:var(--_focus-leading-icon-color);--md-filled-field-focus-supporting-text-color:var(--_focus-supporting-text-color);--md-filled-field-focus-trailing-content-color:var(--_focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color:var(--_hover-active-indicator-color);--md-filled-field-hover-active-indicator-height:var(--_hover-active-indicator-height);--md-filled-field-hover-content-color:var(--_hover-input-text-color);--md-filled-field-hover-label-text-color:var(--_hover-label-text-color);--md-filled-field-hover-leading-content-color:var(--_hover-leading-icon-color);--md-filled-field-hover-state-layer-color:var(--_hover-state-layer-color);--md-filled-field-hover-state-layer-opacity:var(--_hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color:var(--_hover-supporting-text-color);--md-filled-field-hover-trailing-content-color:var(--_hover-trailing-icon-color);--md-filled-field-label-text-color:var(--_label-text-color);--md-filled-field-label-text-populated-line-height:var(--_label-text-populated-line-height);--md-filled-field-label-text-populated-size:var(--_label-text-populated-size);--md-filled-field-label-text-type:var(--_label-text-type);--md-filled-field-leading-content-color:var(--_leading-icon-color);--md-filled-field-supporting-text-color:var(--_supporting-text-color);--md-filled-field-supporting-text-type:var(--_supporting-text-type);--md-filled-field-trailing-content-color:var(--_trailing-icon-color);--md-filled-field-with-label-container-padding-vertical:var(--_with-label-container-padding-vertical)}/*# sourceMappingURL=filled-styles.css.map */
|
|
7
|
+
export const styles = css `:host{--_container-padding-horizontal: var(--md-filled-text-field-container-padding-horizontal, 16px);--_container-padding-vertical: var(--md-filled-text-field-container-padding-vertical, 16px);--_input-text-prefix-padding: var(--md-filled-text-field-input-text-prefix-padding, 2px);--_input-text-suffix-padding: var(--md-filled-text-field-input-text-suffix-padding, 2px);--_with-label-container-padding-vertical: var(--md-filled-text-field-with-label-container-padding-vertical, 8px);--_focus-caret-color: var(--md-filled-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-color: var(--md-filled-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-text-field-active-indicator-height, 1px);--_caret-color: var(--md-filled-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-color: var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_container-shape-start-start: var( --md-filled-text-field-container-shape-start-start, var(--md-filled-text-field-container-shape, 4px) );--_container-shape-start-end: var( --md-filled-text-field-container-shape-start-end, var(--md-filled-text-field-container-shape, 4px) );--_container-shape-end-end: var( --md-filled-text-field-container-shape-end-end, var(--md-filled-text-field-container-shape, 0px) );--_container-shape-end-start: var( --md-filled-text-field-container-shape-end-start, var(--md-filled-text-field-container-shape, 0px) );--_disabled-active-indicator-color: var(--md-filled-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-text-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-text-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-text-field-disabled-container-opacity, 0.04);--_disabled-input-text-color: var(--md-filled-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-filled-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filled-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filled-text-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-caret-color: var(--md-filled-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-filled-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-filled-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-input-text-color: var(--md-filled-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-text-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-filled-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-filled-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-text-field-focus-active-indicator-height, 2px);--_focus-input-text-color: var(--md-filled-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-text-field-hover-active-indicator-height, 1px);--_hover-input-text-color: var(--md-filled-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-text-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-text-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-filled-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-placeholder-color: var(--md-filled-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-filled-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-suffix-color: var(--md-filled-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-type: var(--md-filled-text-field-input-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_label-text-color: var(--md-filled-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-populated-line-height: var(--md-filled-text-field-label-text-populated-line-height, 1rem);--_label-text-populated-size: var(--md-filled-text-field-label-text-populated-size, 0.75rem);--_label-text-type: var(--md-filled-text-field-label-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_leading-icon-color: var(--md-filled-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-text-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-filled-text-field-supporting-text-type, var(--md-sys-typescale-body-small, 400 0.75rem / 1rem var(--md-ref-typeface-plain, Roboto)));--_trailing-icon-color: var(--md-filled-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-text-field-trailing-icon-size, 24px);--md-filled-field-active-indicator-color: var(--_active-indicator-color);--md-filled-field-active-indicator-height: var(--_active-indicator-height);--md-filled-field-container-color: var(--_container-color);--md-filled-field-container-padding-horizontal: var(--_container-padding-horizontal);--md-filled-field-container-padding-vertical: var(--_container-padding-vertical);--md-filled-field-container-shape-end-end: var(--_container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_container-shape-start-start);--md-filled-field-content-color: var(--_input-text-color);--md-filled-field-content-type: var(--_input-text-type);--md-filled-field-disabled-active-indicator-color: var(--_disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_error-active-indicator-color);--md-filled-field-error-content-color: var(--_error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_error-label-text-color);--md-filled-field-error-leading-content-color: var(--_error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_label-text-color);--md-filled-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_label-text-populated-size);--md-filled-field-label-text-type: var(--_label-text-type);--md-filled-field-leading-content-color: var(--_leading-icon-color);--md-filled-field-supporting-text-color: var(--_supporting-text-color);--md-filled-field-supporting-text-type: var(--_supporting-text-type);--md-filled-field-trailing-content-color: var(--_trailing-icon-color);--md-filled-field-with-label-container-padding-vertical: var(--_with-label-container-padding-vertical)}/*# sourceMappingURL=filled-styles.css.map */
|
|
8
8
|
`;
|
|
9
9
|
//# sourceMappingURL=filled-styles.css.js.map
|