@material/web 0.1.0-alpha.0 → 0.1.0-alpha.1
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/actionelement/action-element.d.ts +1 -1
- package/actionelement/action-element.js +1 -1
- package/actionelement/action-element.js.map +1 -1
- package/autocomplete/_filled-autocomplete.scss +6 -0
- package/autocomplete/_outlined-autocomplete.scss +6 -0
- package/autocomplete/autocomplete-item.d.ts +19 -0
- package/autocomplete/autocomplete-item.js +22 -0
- package/autocomplete/autocomplete-item.js.map +1 -0
- package/autocomplete/autocomplete-list.d.ts +19 -0
- package/autocomplete/autocomplete-list.js +23 -0
- package/autocomplete/autocomplete-list.js.map +1 -0
- package/autocomplete/autocomplete-surface.d.ts +19 -0
- package/autocomplete/autocomplete-surface.js +23 -0
- package/autocomplete/autocomplete-surface.js.map +1 -0
- package/autocomplete/filled-autocomplete.d.ts +30 -0
- package/autocomplete/filled-autocomplete.js +53 -0
- package/autocomplete/filled-autocomplete.js.map +1 -0
- package/autocomplete/lib/_filled-autocomplete.scss +229 -0
- package/autocomplete/lib/_outlined-autocomplete.scss +217 -0
- package/autocomplete/lib/_shared.scss +34 -0
- package/autocomplete/lib/autocomplete.d.ts +58 -0
- package/autocomplete/lib/autocomplete.js +273 -0
- package/autocomplete/lib/autocomplete.js.map +1 -0
- package/autocomplete/lib/autocompleteitem/autocomplete-item.d.ts +11 -0
- package/autocomplete/lib/autocompleteitem/autocomplete-item.js +14 -0
- package/autocomplete/lib/autocompleteitem/autocomplete-item.js.map +1 -0
- package/autocomplete/lib/autocompleteitem/harness.d.ts +11 -0
- package/autocomplete/lib/autocompleteitem/harness.js +12 -0
- package/autocomplete/lib/autocompleteitem/harness.js.map +1 -0
- package/{field/lib/_field-theme.scss → autocomplete/lib/autocompletelist/_autocomplete-list.scss} +4 -6
- package/{elevation/lib/elevation-overlay-styles.css.d.ts → autocomplete/lib/autocompletelist/autocomplete-list-styles.css.d.ts} +0 -0
- package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js +9 -0
- package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js.map +1 -0
- package/{segmentedbutton/lib/segmented-button-styles.scss → autocomplete/lib/autocompletelist/autocomplete-list-styles.scss} +2 -2
- package/autocomplete/lib/autocompletelist/autocomplete-list.d.ts +14 -0
- package/autocomplete/lib/autocompletelist/autocomplete-list.js +21 -0
- package/autocomplete/lib/autocompletelist/autocomplete-list.js.map +1 -0
- package/autocomplete/lib/autocompletelist/harness.d.ts +11 -0
- package/autocomplete/lib/autocompletelist/harness.js +12 -0
- package/autocomplete/lib/autocompletelist/harness.js.map +1 -0
- package/autocomplete/lib/autocompletesurface/_autocomplete-surface.scss +13 -0
- package/{formfield/lib/formfield-styles.css.d.ts → autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.d.ts} +0 -0
- package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js +9 -0
- package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js.map +1 -0
- package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.scss +8 -0
- package/autocomplete/lib/autocompletesurface/autocomplete-surface.d.ts +13 -0
- package/autocomplete/lib/autocompletesurface/autocomplete-surface.js +21 -0
- package/autocomplete/lib/autocompletesurface/autocomplete-surface.js.map +1 -0
- package/{iconbutton/lib/icon-button-styles.css.d.ts → autocomplete/lib/filled-styles.css.d.ts} +0 -0
- package/autocomplete/lib/filled-styles.css.js +9 -0
- package/autocomplete/lib/filled-styles.css.js.map +1 -0
- package/autocomplete/lib/filled-styles.scss +8 -0
- package/{segmentedbutton/lib/segmented-button-styles.css.d.ts → autocomplete/lib/outlined-styles.css.d.ts} +0 -0
- package/autocomplete/lib/outlined-styles.css.js +9 -0
- package/autocomplete/lib/outlined-styles.css.js.map +1 -0
- package/autocomplete/lib/outlined-styles.scss +8 -0
- package/autocomplete/lib/shared-styles.css.d.ts +1 -0
- package/autocomplete/lib/shared-styles.css.js +9 -0
- package/autocomplete/lib/shared-styles.css.js.map +1 -0
- package/{iconbutton/lib/icon-button-styles.scss → autocomplete/lib/shared-styles.scss} +2 -2
- package/autocomplete/outlined-autocomplete.d.ts +30 -0
- package/autocomplete/outlined-autocomplete.js +53 -0
- package/autocomplete/outlined-autocomplete.js.map +1 -0
- package/badge/_badge.scss +6 -0
- package/badge/lib/_badge.scss +60 -21
- package/badge/lib/badge-styles.css.js +1 -1
- package/badge/lib/badge-styles.css.js.map +1 -1
- package/badge/lib/badge-styles.scss +1 -9
- package/button/_elevated-button.scss +1 -3
- package/button/_filled-button.scss +1 -3
- package/button/_outlined-button.scss +1 -3
- package/button/_text-button.scss +1 -3
- package/button/_tonal-button.scss +1 -3
- package/button/elevated-button.d.ts +18 -1
- package/button/elevated-button.js +20 -3
- package/button/elevated-button.js.map +1 -1
- package/button/elevated-link-button.d.ts +18 -1
- package/button/elevated-link-button.js +20 -3
- package/button/elevated-link-button.js.map +1 -1
- package/button/filled-button.d.ts +16 -1
- package/button/filled-button.js +18 -2
- package/button/filled-button.js.map +1 -1
- package/button/filled-link-button.d.ts +16 -1
- package/button/filled-link-button.js +18 -2
- package/button/filled-link-button.js.map +1 -1
- package/button/harness.d.ts +1 -1
- package/button/harness.js +1 -1
- package/button/harness.js.map +1 -1
- package/button/lib/_elevated-button.scss +51 -2
- package/button/lib/_elevation.scss +74 -0
- package/button/lib/_filled-button.scss +47 -2
- package/button/lib/_icon.scss +26 -18
- package/button/lib/_outlined-button.scss +70 -8
- package/button/lib/_shared.scss +180 -0
- package/button/lib/_text-button.scss +52 -2
- package/button/lib/_tonal-button.scss +50 -2
- package/button/lib/_touch-target.scss +7 -5
- package/button/lib/button.d.ts +45 -40
- package/button/lib/button.js +83 -88
- package/button/lib/button.js.map +1 -1
- package/button/lib/elevated-button.d.ts +2 -4
- package/button/lib/elevated-button.js +4 -5
- package/button/lib/elevated-button.js.map +1 -1
- package/button/lib/elevated-link-button.d.ts +2 -4
- package/button/lib/elevated-link-button.js +4 -5
- package/button/lib/elevated-link-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/elevated-styles.scss +1 -11
- package/button/lib/filled-button.d.ts +4 -2
- package/button/lib/filled-button.js +7 -2
- package/button/lib/filled-button.js.map +1 -1
- package/button/lib/filled-link-button.d.ts +4 -2
- package/button/lib/filled-link-button.js +7 -2
- package/button/lib/filled-link-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/filled-styles.scss +1 -9
- package/button/lib/link-button.d.ts +11 -3
- package/button/lib/link-button.js +29 -18
- package/button/lib/link-button.js.map +1 -1
- package/button/lib/outlined-button.d.ts +0 -3
- package/button/lib/outlined-button.js +1 -3
- package/button/lib/outlined-button.js.map +1 -1
- package/button/lib/outlined-link-button.d.ts +0 -3
- package/button/lib/outlined-link-button.js +1 -3
- package/button/lib/outlined-link-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/outlined-styles.scss +1 -11
- package/button/lib/shared-elevation-styles.css.d.ts +1 -0
- package/button/lib/shared-elevation-styles.css.js +9 -0
- package/button/lib/shared-elevation-styles.css.js.map +1 -0
- package/{ripple/_index.scss → button/lib/shared-elevation-styles.scss} +3 -1
- package/button/lib/shared-styles.css.js +1 -1
- package/button/lib/shared-styles.css.js.map +1 -1
- package/button/lib/shared-styles.scss +4 -4
- package/button/lib/text-button.d.ts +0 -2
- package/button/lib/text-button.js +1 -2
- package/button/lib/text-button.js.map +1 -1
- package/button/lib/text-link-button.d.ts +0 -2
- package/button/lib/text-link-button.js +1 -2
- package/button/lib/text-link-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/text-styles.scss +1 -9
- package/button/lib/tonal-button.d.ts +4 -2
- package/button/lib/tonal-button.js +7 -2
- package/button/lib/tonal-button.js.map +1 -1
- package/button/lib/tonal-link-button.d.ts +4 -2
- package/button/lib/tonal-link-button.js +7 -2
- package/button/lib/tonal-link-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/button/lib/tonal-styles.scss +1 -9
- package/button/outlined-button.d.ts +18 -1
- package/button/outlined-button.js +18 -1
- package/button/outlined-button.js.map +1 -1
- package/button/outlined-link-button.d.ts +18 -1
- package/button/outlined-link-button.js +18 -1
- package/button/outlined-link-button.js.map +1 -1
- package/button/text-button.d.ts +16 -1
- package/button/text-button.js +16 -1
- package/button/text-button.js.map +1 -1
- package/button/text-link-button.d.ts +16 -1
- package/button/text-link-button.js +16 -1
- package/button/text-link-button.js.map +1 -1
- package/button/tonal-button.d.ts +17 -1
- package/button/tonal-button.js +19 -2
- package/button/tonal-button.js.map +1 -1
- package/button/tonal-link-button.d.ts +17 -1
- package/button/tonal-link-button.js +19 -2
- package/button/tonal-link-button.js.map +1 -1
- package/checkbox/_checkbox.scss +6 -1
- package/checkbox/checkbox.d.ts +4 -1
- package/checkbox/checkbox.js +6 -2
- package/checkbox/checkbox.js.map +1 -1
- package/checkbox/harness.d.ts +1 -1
- package/checkbox/harness.js +1 -1
- package/checkbox/harness.js.map +1 -1
- package/checkbox/lib/_checkbox.scss +368 -334
- package/checkbox/lib/checkbox-styles.css.js +1 -1
- package/checkbox/lib/checkbox-styles.css.js.map +1 -1
- package/checkbox/lib/checkbox-styles.scss +1 -8
- package/checkbox/lib/checkbox.d.ts +30 -45
- package/checkbox/lib/checkbox.js +127 -177
- package/checkbox/lib/checkbox.js.map +1 -1
- package/checkbox/lib/forced-colors-styles.css.d.ts +1 -0
- package/checkbox/lib/forced-colors-styles.css.js +9 -0
- package/checkbox/lib/forced-colors-styles.css.js.map +1 -0
- package/checkbox/lib/forced-colors-styles.scss +47 -0
- package/{formfield/formfield.d.ts → chips/action/delete-action.d.ts} +3 -4
- package/chips/action/delete-action.js +20 -0
- package/chips/action/delete-action.js.map +1 -0
- package/chips/action/lib/action.d.ts +17 -4
- package/chips/action/lib/action.js +85 -6
- package/chips/action/lib/action.js.map +1 -1
- package/chips/action/lib/{trailing-action.d.ts → delete-action.d.ts} +3 -3
- package/chips/action/lib/{trailing-action.js → delete-action.js} +22 -19
- package/chips/action/lib/delete-action.js.map +1 -0
- package/chips/action/lib/events.d.ts +14 -0
- package/chips/action/lib/events.js +16 -0
- package/chips/action/lib/events.js.map +1 -0
- package/chips/action/lib/link-action.d.ts +2 -0
- package/chips/action/lib/link-action.js +13 -1
- package/chips/action/lib/link-action.js.map +1 -1
- package/chips/action/lib/primary-action.d.ts +0 -1
- package/chips/action/lib/primary-action.js +11 -6
- package/chips/action/lib/primary-action.js.map +1 -1
- package/chips/action/lib/selectable-action.js +11 -1
- package/chips/action/lib/selectable-action.js.map +1 -1
- package/chips/action/link-action.d.ts +18 -0
- package/chips/action/link-action.js +20 -0
- package/chips/action/link-action.js.map +1 -0
- package/chips/action/presentational-action.d.ts +18 -0
- package/chips/action/presentational-action.js +20 -0
- package/chips/action/presentational-action.js.map +1 -0
- package/chips/action/primary-action.d.ts +18 -0
- package/chips/action/primary-action.js +20 -0
- package/chips/action/primary-action.js.map +1 -0
- package/chips/action/selectable-action.d.ts +18 -0
- package/chips/action/selectable-action.js +20 -0
- package/chips/action/selectable-action.js.map +1 -0
- package/chips/chip/lib/_assist-chip-theme.scss +5 -11
- package/chips/chip/lib/_chip-theme.scss +182 -211
- package/chips/chip/lib/_chip.scss +78 -61
- package/chips/chip/lib/_filter-chip-theme.scss +5 -11
- package/chips/chip/lib/_input-chip-theme.scss +12 -18
- package/chips/chip/lib/_suggestion-chip-theme.scss +5 -11
- package/chips/chip/lib/action-chip.d.ts +18 -0
- package/chips/chip/lib/action-chip.js +39 -0
- package/chips/chip/lib/action-chip.js.map +1 -0
- package/{compat/animation → chips/chip/lib}/animationframe.d.ts +0 -0
- package/{compat/animation → chips/chip/lib}/animationframe.js +1 -0
- package/chips/chip/lib/animationframe.js.map +1 -0
- package/chips/chip/lib/chip.d.ts +42 -0
- package/chips/chip/lib/chip.js +133 -0
- package/chips/chip/lib/chip.js.map +1 -0
- package/chips/chip/lib/foundation.js +3 -4
- package/chips/chip/lib/foundation.js.map +1 -1
- package/chips/chip/lib/link-chip.d.ts +21 -0
- package/chips/chip/lib/link-chip.js +53 -0
- package/chips/chip/lib/link-chip.js.map +1 -0
- package/chips/chip/lib/presentational-chip.d.ts +18 -0
- package/chips/chip/lib/presentational-chip.js +39 -0
- package/chips/chip/lib/presentational-chip.js.map +1 -0
- package/chips/chip/lib/selectable-chip.d.ts +22 -0
- package/chips/chip/lib/selectable-chip.js +57 -0
- package/chips/chip/lib/selectable-chip.js.map +1 -0
- package/chips/chipset/lib/_chip-set-theme.scss +1 -1
- package/chips/chipset/lib/foundation.js +8 -10
- package/chips/chipset/lib/foundation.js.map +1 -1
- package/controller/events.d.ts +50 -0
- package/controller/events.js +86 -0
- package/controller/events.js.map +1 -1
- package/controller/form-associated.d.ts +14 -0
- package/controller/form-associated.js +12 -0
- package/controller/form-associated.js.map +1 -0
- package/controller/form-controller.d.ts +7 -0
- package/controller/form-controller.js +15 -1
- package/controller/form-controller.js.map +1 -1
- package/controller/is-rtl.d.ts +14 -0
- package/controller/is-rtl.js +18 -0
- package/controller/is-rtl.js.map +1 -0
- package/controller/shim-label-activation.d.ts +18 -0
- package/controller/shim-label-activation.js +72 -0
- package/controller/shim-label-activation.js.map +1 -0
- package/decorators/bound.d.ts +1 -1
- package/decorators/bound.js.map +1 -1
- package/elevation/_elevation.scss +6 -0
- package/elevation/elevation.d.ts +19 -0
- package/elevation/elevation.js +22 -0
- package/elevation/elevation.js.map +1 -0
- package/elevation/lib/_elevation.scss +218 -0
- package/elevation/lib/_md-comp-elevation.scss +23 -0
- package/elevation/lib/elevation-styles.css.d.ts +1 -0
- package/elevation/lib/elevation-styles.css.js +9 -0
- package/elevation/lib/elevation-styles.css.js.map +1 -0
- package/elevation/lib/elevation-styles.scss +8 -0
- package/elevation/lib/elevation.d.ts +20 -0
- package/elevation/lib/elevation.js +39 -0
- package/elevation/lib/elevation.js.map +1 -0
- package/{elevation → elevationold}/lib/_elevation-overlay-theme.scss +0 -0
- package/{elevation → elevationold}/lib/_elevation-overlay.scss +0 -0
- package/{elevation → elevationold}/lib/_elevation-theme.scss +3 -17
- package/{elevation → elevationold}/lib/_surface.scss +1 -4
- package/elevationold/lib/elevation-overlay-styles.css.d.ts +1 -0
- package/{elevation → elevationold}/lib/elevation-overlay-styles.css.js +0 -0
- package/{elevation → elevationold}/lib/elevation-overlay-styles.css.js.map +0 -0
- package/{elevation → elevationold}/lib/elevation-overlay-styles.scss +0 -0
- package/fab/_fab-extended.scss +1 -6
- package/fab/_fab.scss +1 -15
- package/fab/fab-extended.d.ts +1 -1
- package/fab/fab-extended.js +2 -2
- package/fab/fab-extended.js.map +1 -1
- package/fab/fab.d.ts +1 -1
- package/fab/fab.js +2 -2
- package/fab/fab.js.map +1 -1
- package/fab/harness.d.ts +1 -1
- package/fab/harness.js +1 -1
- package/fab/harness.js.map +1 -1
- package/fab/lib/_fab-extended.scss +55 -21
- package/fab/lib/_fab.scss +30 -6
- package/fab/lib/_shared.scss +209 -0
- package/fab/lib/fab-extended-styles.css.js +1 -1
- package/fab/lib/fab-extended-styles.css.js.map +1 -1
- package/fab/lib/fab-extended-styles.scss +1 -9
- package/fab/lib/fab-shared-styles.css.js +1 -1
- package/fab/lib/fab-shared-styles.css.js.map +1 -1
- package/fab/lib/fab-shared-styles.scss +2 -2
- package/fab/lib/fab-shared.d.ts +6 -5
- package/fab/lib/fab-shared.js +9 -8
- package/fab/lib/fab-shared.js.map +1 -1
- package/fab/lib/fab-styles.css.js +1 -1
- package/fab/lib/fab-styles.css.js.map +1 -1
- package/fab/lib/fab-styles.scss +1 -9
- package/field/_filled-field.scss +1 -3
- package/field/_outlined-field.scss +1 -3
- package/field/harness.d.ts +1 -1
- package/field/harness.js +1 -1
- package/field/harness.js.map +1 -1
- package/field/lib/_content.scss +51 -2
- package/field/lib/_filled-field.scss +167 -88
- package/field/lib/_label.scss +65 -2
- package/field/lib/_md-comp-filled-field.scss +72 -0
- package/field/lib/_md-comp-outlined-field.scss +74 -0
- package/field/lib/_outlined-field.scss +222 -118
- package/field/lib/{_field.scss → _shared.scss} +30 -1
- package/field/lib/_supporting-text.scss +64 -1
- package/field/lib/field.d.ts +1 -1
- package/field/lib/field.js +1 -1
- package/field/lib/field.js.map +1 -1
- package/field/lib/filled-field.d.ts +1 -0
- package/field/lib/filled-field.js +1 -0
- package/field/lib/filled-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/filled-styles.scss +1 -9
- package/field/lib/outlined-styles.css.js +1 -1
- package/field/lib/outlined-styles.css.js.map +1 -1
- package/field/lib/outlined-styles.scss +1 -10
- package/field/lib/shared-styles.css.js +1 -1
- package/field/lib/shared-styles.css.js.map +1 -1
- package/field/lib/shared-styles.scss +2 -8
- package/focus/_focus-ring.scss +6 -0
- package/focus/lib/_focus-ring.scss +48 -21
- package/focus/lib/_md-comp-focus-ring.scss +27 -0
- 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-styles.scss +1 -9
- package/focus/lib/focus-ring.d.ts +16 -3
- package/focus/lib/focus-ring.js +16 -3
- package/focus/lib/focus-ring.js.map +1 -1
- package/focus/strong-focus.d.ts +2 -0
- package/focus/strong-focus.js +6 -4
- package/focus/strong-focus.js.map +1 -1
- package/icon/_icon.scss +6 -0
- package/icon/lib/_icon.scss +54 -0
- package/icon/lib/_md-comp-icon.scss +19 -0
- package/icon/lib/icon-styles.css.js +1 -1
- package/icon/lib/icon-styles.css.js.map +1 -1
- package/icon/lib/icon-styles.scss +2 -19
- package/iconbutton/_filled-icon-button.scss +1 -2
- package/iconbutton/_filled-tonal-icon-button.scss +6 -0
- package/iconbutton/_outlined-icon-button.scss +1 -2
- package/iconbutton/_standard-icon-button.scss +1 -2
- package/iconbutton/filled-icon-button-toggle.d.ts +15 -3
- package/iconbutton/filled-icon-button-toggle.js +16 -4
- package/iconbutton/filled-icon-button-toggle.js.map +1 -1
- package/iconbutton/filled-icon-button.d.ts +15 -3
- package/iconbutton/filled-icon-button.js +16 -4
- package/iconbutton/filled-icon-button.js.map +1 -1
- package/iconbutton/filled-link-icon-button.d.ts +15 -3
- package/iconbutton/filled-link-icon-button.js +16 -4
- package/iconbutton/filled-link-icon-button.js.map +1 -1
- package/iconbutton/filled-tonal-icon-button-toggle.d.ts +15 -3
- package/iconbutton/filled-tonal-icon-button-toggle.js +16 -4
- package/iconbutton/filled-tonal-icon-button-toggle.js.map +1 -1
- package/iconbutton/filled-tonal-icon-button.d.ts +15 -3
- package/iconbutton/filled-tonal-icon-button.js +16 -4
- package/iconbutton/filled-tonal-icon-button.js.map +1 -1
- package/iconbutton/filled-tonal-link-icon-button.d.ts +15 -3
- package/iconbutton/filled-tonal-link-icon-button.js +16 -4
- package/iconbutton/filled-tonal-link-icon-button.js.map +1 -1
- package/iconbutton/harness.d.ts +1 -1
- package/iconbutton/harness.js +1 -1
- package/iconbutton/harness.js.map +1 -1
- package/iconbutton/lib/_filled-icon-button.scss +123 -2
- package/iconbutton/lib/_filled-tonal-icon-button.scss +123 -2
- package/iconbutton/lib/_outlined-icon-button.scss +133 -1
- package/iconbutton/lib/{_icon-button-theme.scss → _shared.scss} +76 -71
- package/iconbutton/lib/_standard-icon-button.scss +94 -2
- package/iconbutton/lib/filled-styles.css.js +1 -1
- package/iconbutton/lib/filled-styles.css.js.map +1 -1
- package/iconbutton/lib/filled-styles.scss +1 -11
- package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
- package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
- package/iconbutton/lib/filled-tonal-styles.scss +1 -11
- package/iconbutton/lib/icon-button-toggle.d.ts +42 -23
- package/iconbutton/lib/icon-button-toggle.js +64 -62
- package/iconbutton/lib/icon-button-toggle.js.map +1 -1
- package/iconbutton/lib/icon-button.d.ts +22 -30
- package/iconbutton/lib/icon-button.js +52 -71
- package/iconbutton/lib/icon-button.js.map +1 -1
- package/iconbutton/lib/link-icon-button.d.ts +11 -2
- package/iconbutton/lib/link-icon-button.js +23 -18
- package/iconbutton/lib/link-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/outlined-styles.scss +1 -11
- package/iconbutton/lib/shared-styles.css.d.ts +1 -0
- package/iconbutton/lib/shared-styles.css.js +9 -0
- package/iconbutton/lib/shared-styles.css.js.map +1 -0
- package/iconbutton/lib/shared-styles.scss +8 -0
- package/iconbutton/lib/standard-styles.css.js +1 -1
- package/iconbutton/lib/standard-styles.css.js.map +1 -1
- package/iconbutton/lib/standard-styles.scss +1 -11
- package/iconbutton/outlined-icon-button-toggle.d.ts +15 -3
- package/iconbutton/outlined-icon-button-toggle.js +16 -4
- package/iconbutton/outlined-icon-button-toggle.js.map +1 -1
- package/iconbutton/outlined-icon-button.d.ts +15 -3
- package/iconbutton/outlined-icon-button.js +16 -4
- package/iconbutton/outlined-icon-button.js.map +1 -1
- package/iconbutton/outlined-link-icon-button.d.ts +15 -3
- package/iconbutton/outlined-link-icon-button.js +16 -4
- package/iconbutton/outlined-link-icon-button.js.map +1 -1
- package/iconbutton/standard-icon-button-toggle.d.ts +15 -3
- package/iconbutton/standard-icon-button-toggle.js +16 -4
- package/iconbutton/standard-icon-button-toggle.js.map +1 -1
- package/iconbutton/standard-icon-button.d.ts +15 -3
- package/iconbutton/standard-icon-button.js +16 -4
- package/iconbutton/standard-icon-button.js.map +1 -1
- package/iconbutton/standard-link-icon-button.d.ts +15 -3
- package/iconbutton/standard-link-icon-button.js +16 -4
- package/iconbutton/standard-link-icon-button.js.map +1 -1
- package/list/_list-item.scss +1 -2
- package/list/_list.scss +1 -2
- package/list/harness.d.ts +1 -1
- package/list/harness.js +1 -1
- package/list/harness.js.map +1 -1
- package/list/lib/_list.scss +58 -21
- package/list/lib/_tokens.scss +2 -2
- package/list/lib/avatar/_list-item-avatar.scss +25 -1
- package/list/lib/avatar/list-item-avatar-styles.css.js +1 -1
- package/list/lib/avatar/list-item-avatar-styles.css.js.map +1 -1
- package/list/lib/avatar/list-item-avatar-styles.scss +1 -13
- package/list/lib/divider/_list-divider.scss +33 -1
- package/list/lib/divider/list-divider-styles.css.js +1 -1
- package/list/lib/divider/list-divider-styles.css.js.map +1 -1
- package/list/lib/divider/list-divider-styles.scss +1 -11
- package/list/lib/divider/list-divider.d.ts +1 -1
- package/list/lib/divider/list-divider.js +1 -1
- package/list/lib/divider/list-divider.js.map +1 -1
- package/list/lib/icon/_list-item-icon.scss +32 -2
- package/list/lib/icon/list-item-icon-styles.css.js +1 -1
- package/list/lib/icon/list-item-icon-styles.css.js.map +1 -1
- package/list/lib/icon/list-item-icon-styles.scss +1 -13
- package/list/lib/image/_list-item-image.scss +44 -1
- package/list/lib/image/list-item-image-styles.css.js +1 -1
- package/list/lib/image/list-item-image-styles.css.js.map +1 -1
- package/list/lib/image/list-item-image-styles.scss +1 -13
- package/list/lib/list-styles.css.js +1 -1
- package/list/lib/list-styles.css.js.map +1 -1
- package/list/lib/list-styles.scss +1 -9
- package/list/lib/list.d.ts +5 -1
- package/list/lib/list.js +13 -2
- package/list/lib/list.js.map +1 -1
- package/list/lib/listitem/_list-item.scss +156 -59
- package/list/lib/listitem/harness.d.ts +1 -1
- package/list/lib/listitem/harness.js +1 -1
- package/list/lib/listitem/harness.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-styles.scss +1 -9
- package/list/lib/listitem/list-item.d.ts +5 -5
- package/list/lib/listitem/list-item.js +6 -6
- package/list/lib/listitem/list-item.js.map +1 -1
- package/list/lib/video/_list-item-video.scss +45 -2
- package/list/lib/video/list-item-video-styles.css.js +1 -1
- package/list/lib/video/list-item-video-styles.css.js.map +1 -1
- package/list/lib/video/list-item-video-styles.scss +1 -13
- package/localization/localize.d.ts +15 -0
- package/localization/localize.js +18 -0
- package/localization/localize.js.map +1 -0
- package/menu/harness.d.ts +1 -1
- package/menu/harness.js +1 -1
- package/menu/harness.js.map +1 -1
- package/menu/lib/_menu-button.scss +1 -1
- package/menu/lib/_menu.scss +105 -2
- package/menu/lib/menu-button-styles.scss +5 -6
- package/menu/lib/menu-styles.css.js +1 -1
- package/menu/lib/menu-styles.css.js.map +1 -1
- package/menu/lib/menu-styles.scss +5 -14
- package/menu/lib/menu.js +3 -3
- package/menu/lib/menu.js.map +1 -1
- package/menu/lib/menuitem/harness.d.ts +1 -1
- package/menu/lib/menuitem/harness.js +1 -1
- package/menu/lib/menuitem/harness.js.map +1 -1
- package/menu/lib/menuitem/menu-item.d.ts +2 -2
- package/menu/lib/menuitem/menu-item.js +1 -1
- package/menu/lib/menuitem/menu-item.js.map +1 -1
- package/menusurface/_menu-surface.scss +1 -2
- package/menusurface/lib/_md-comp-menu-surface.scss +35 -0
- package/menusurface/lib/_menu-surface.scss +30 -1
- package/menusurface/lib/menu-surface-styles.css.js +1 -1
- package/menusurface/lib/menu-surface-styles.css.js.map +1 -1
- package/menusurface/lib/menu-surface-styles.scss +1 -9
- package/menusurface/lib/menu-surface.d.ts +5 -2
- package/menusurface/lib/menu-surface.js +48 -89
- package/menusurface/lib/menu-surface.js.map +1 -1
- package/navigationbar/_navigation-bar.scss +1 -2
- package/navigationbar/harness.d.ts +1 -1
- package/navigationbar/harness.js +1 -1
- package/navigationbar/harness.js.map +1 -1
- package/navigationbar/lib/_navigation-bar.scss +44 -6
- package/navigationbar/lib/constants.d.ts +1 -1
- package/navigationbar/lib/constants.js.map +1 -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-styles.scss +1 -13
- package/navigationbar/lib/navigation-bar.d.ts +4 -3
- package/navigationbar/lib/navigation-bar.js +35 -44
- package/navigationbar/lib/navigation-bar.js.map +1 -1
- package/navigationbar/lib/state.d.ts +1 -1
- package/navigationbar/lib/state.js.map +1 -1
- package/navigationdrawer/_navigation-drawer-modal.scss +1 -1
- package/navigationdrawer/_navigation-drawer.scss +1 -1
- package/navigationdrawer/lib/_navigation-drawer-modal.scss +54 -12
- package/navigationdrawer/lib/_navigation-drawer.scss +48 -9
- package/navigationdrawer/lib/_shared.scss +49 -0
- 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-styles.scss +1 -5
- package/navigationdrawer/lib/navigation-drawer-modal.d.ts +7 -7
- package/navigationdrawer/lib/navigation-drawer-modal.js +13 -14
- 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-styles.scss +1 -11
- package/navigationdrawer/lib/navigation-drawer.d.ts +6 -6
- package/navigationdrawer/lib/navigation-drawer.js +13 -14
- package/navigationdrawer/lib/navigation-drawer.js.map +1 -1
- package/navigationdrawer/lib/shared-styles.css.d.ts +1 -0
- package/navigationdrawer/lib/shared-styles.css.js +9 -0
- package/navigationdrawer/lib/shared-styles.css.js.map +1 -0
- package/navigationdrawer/lib/shared-styles.scss +8 -0
- package/navigationdrawer/navigation-drawer-modal.js +2 -1
- package/navigationdrawer/navigation-drawer-modal.js.map +1 -1
- package/navigationdrawer/navigation-drawer.js +2 -1
- package/navigationdrawer/navigation-drawer.js.map +1 -1
- package/navigationtab/_navigation-tab.scss +1 -2
- package/navigationtab/harness.d.ts +1 -1
- package/navigationtab/harness.js +1 -1
- package/navigationtab/harness.js.map +1 -1
- package/navigationtab/lib/_navigation-tab.scss +224 -77
- 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-styles.scss +1 -14
- package/navigationtab/lib/navigation-tab.d.ts +4 -4
- package/navigationtab/lib/navigation-tab.js +6 -6
- package/navigationtab/lib/navigation-tab.js.map +1 -1
- package/package.json +76 -12
- package/radio/harness.d.ts +1 -1
- package/radio/harness.js +1 -1
- package/radio/harness.js.map +1 -1
- package/radio/lib/_radio-theme.scss +7 -6
- package/radio/lib/_radio.scss +5 -5
- 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 +4 -7
- package/radio/lib/radio.js +11 -12
- package/radio/lib/radio.js.map +1 -1
- package/ripple/_ripple-theme.scss +13 -2
- package/ripple/_ripple.scss +6 -0
- package/ripple/directive.d.ts +63 -0
- package/ripple/directive.js +266 -0
- package/ripple/directive.js.map +1 -0
- package/ripple/lib/_md-comp-ripple.scss +29 -0
- package/ripple/lib/_ripple.scss +82 -53
- package/ripple/lib/ripple-styles.css.js +1 -1
- package/ripple/lib/ripple-styles.css.js.map +1 -1
- package/ripple/lib/ripple-styles.scss +1 -9
- package/ripple/lib/ripple.d.ts +1 -1
- package/ripple/lib/ripple.js +1 -1
- package/ripple/lib/ripple.js.map +1 -1
- package/sass/_assert.scss +5 -0
- package/sass/_color-scheme.scss +88 -0
- package/sass/_color.scss +30 -50
- package/sass/_feature-flags.scss +3 -3
- package/segmentedbutton/lib/_outlined-segmented-button.scss +26 -2
- package/segmentedbutton/lib/_shared.scss +388 -0
- package/segmentedbutton/lib/outlined-styles.css.js +1 -1
- package/segmentedbutton/lib/outlined-styles.css.js.map +1 -1
- package/segmentedbutton/lib/outlined-styles.scss +1 -10
- package/segmentedbutton/lib/segmented-button.d.ts +3 -3
- package/segmentedbutton/lib/segmented-button.js +5 -5
- package/segmentedbutton/lib/segmented-button.js.map +1 -1
- package/segmentedbutton/lib/shared-styles.css.d.ts +1 -0
- package/segmentedbutton/lib/shared-styles.css.js +9 -0
- package/segmentedbutton/lib/shared-styles.css.js.map +1 -0
- package/segmentedbutton/lib/shared-styles.scss +8 -0
- package/segmentedbutton/outlined-segmented-button.js +1 -1
- package/segmentedbutton/outlined-segmented-button.js.map +1 -1
- package/segmentedbuttonset/lib/_outlined-segmented-button-set.scss +22 -4
- package/segmentedbuttonset/lib/_shared.scss +46 -0
- package/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
- package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
- package/segmentedbuttonset/lib/outlined-styles.scss +1 -10
- package/segmentedbuttonset/lib/segmented-button-set.js +1 -1
- package/segmentedbuttonset/lib/segmented-button-set.js.map +1 -1
- package/segmentedbuttonset/lib/shared-styles.css.js +1 -1
- package/segmentedbuttonset/lib/shared-styles.css.js.map +1 -1
- package/segmentedbuttonset/lib/shared-styles.scss +2 -2
- package/switch/_switch.scss +1 -2
- package/switch/harness.d.ts +1 -1
- package/switch/harness.js +1 -1
- package/switch/harness.js.map +1 -1
- package/switch/lib/_handle.scss +121 -0
- package/switch/lib/_icon.scss +33 -0
- package/switch/lib/_switch.scss +211 -119
- package/switch/lib/_track.scss +57 -0
- package/switch/lib/switch-styles.css.js +1 -1
- package/switch/lib/switch-styles.css.js.map +1 -1
- package/switch/lib/switch-styles.scss +1 -4
- package/switch/lib/switch.d.ts +42 -18
- package/switch/lib/switch.js +86 -47
- package/switch/lib/switch.js.map +1 -1
- package/switch/switch.d.ts +6 -1
- package/switch/switch.js +6 -1
- package/switch/switch.js.map +1 -1
- package/textfield/_filled-text-field.scss +1 -4
- package/textfield/_outlined-text-field.scss +1 -4
- package/textfield/filled-text-field.d.ts +1 -1
- package/textfield/filled-text-field.js +1 -1
- package/textfield/filled-text-field.js.map +1 -1
- package/textfield/harness.d.ts +1 -1
- package/textfield/harness.js +1 -1
- package/textfield/harness.js.map +1 -1
- package/textfield/lib/_filled-text-field.scss +147 -0
- package/textfield/lib/_icon.scss +71 -1
- package/textfield/lib/_input.scss +65 -21
- package/textfield/lib/_outlined-text-field.scss +137 -0
- package/textfield/lib/_shared.scss +59 -0
- 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-forced-colors-styles.scss +17 -7
- package/textfield/lib/filled-styles.css.js +1 -1
- package/textfield/lib/filled-styles.css.js.map +1 -1
- package/textfield/lib/filled-styles.scss +2 -9
- 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-forced-colors-styles.scss +17 -7
- package/textfield/lib/outlined-styles.css.js +1 -1
- package/textfield/lib/outlined-styles.css.js.map +1 -1
- package/textfield/lib/outlined-styles.scss +2 -9
- package/textfield/lib/shared-styles.css.js +1 -1
- package/textfield/lib/shared-styles.css.js.map +1 -1
- package/textfield/lib/shared-styles.scss +2 -6
- package/textfield/lib/text-field.d.ts +88 -9
- package/textfield/lib/text-field.js +228 -70
- package/textfield/lib/text-field.js.map +1 -1
- package/textfield/outlined-text-field.d.ts +1 -1
- package/textfield/outlined-text-field.js +1 -1
- package/textfield/outlined-text-field.js.map +1 -1
- package/tokens/_index.scss +1 -1
- package/tokens/{latest → v0_144}/_index.scss +15 -94
- package/tokens/v0_144/_md-comp-assist-chip.scss +109 -0
- package/tokens/v0_144/_md-comp-badge.scss +58 -0
- package/tokens/v0_144/_md-comp-banner.scss +116 -0
- package/tokens/v0_144/_md-comp-bottom-app-bar.scss +36 -0
- package/tokens/v0_144/_md-comp-carousel-item.scss +65 -0
- package/tokens/v0_144/_md-comp-checkbox.scss +147 -0
- package/tokens/v0_144/_md-comp-circular-progress-indicator.scss +39 -0
- package/tokens/v0_144/_md-comp-data-table.scss +100 -0
- package/tokens/v0_144/_md-comp-date-input-modal.scss +89 -0
- package/tokens/v0_144/_md-comp-date-picker-docked.scss +246 -0
- package/tokens/v0_144/_md-comp-date-picker-modal.scss +305 -0
- package/tokens/v0_144/_md-comp-dialog.scss +146 -0
- package/tokens/{latest → v0_144}/_md-comp-divider.scss +5 -5
- package/tokens/v0_144/_md-comp-elevated-button.scss +91 -0
- package/tokens/v0_144/_md-comp-elevated-card.scss +59 -0
- package/tokens/v0_144/_md-comp-extended-fab-branded.scss +86 -0
- package/tokens/v0_144/_md-comp-extended-fab-primary.scss +94 -0
- package/tokens/v0_144/_md-comp-extended-fab-secondary.scss +95 -0
- package/tokens/v0_144/_md-comp-extended-fab-surface.scss +90 -0
- package/tokens/v0_144/_md-comp-extended-fab-tertiary.scss +97 -0
- package/tokens/v0_144/_md-comp-fab-branded-large.scss +61 -0
- package/tokens/v0_144/_md-comp-fab-branded.scss +60 -0
- package/tokens/v0_144/_md-comp-fab-primary-large.scss +65 -0
- package/tokens/v0_144/_md-comp-fab-primary-small.scss +65 -0
- package/tokens/v0_144/_md-comp-fab-primary.scss +65 -0
- package/tokens/v0_144/_md-comp-fab-secondary-large.scss +66 -0
- package/tokens/v0_144/_md-comp-fab-secondary-small.scss +66 -0
- package/tokens/v0_144/_md-comp-fab-secondary.scss +66 -0
- package/tokens/v0_144/_md-comp-fab-surface-large.scss +64 -0
- package/tokens/v0_144/_md-comp-fab-surface-small.scss +64 -0
- package/tokens/v0_144/_md-comp-fab-surface.scss +64 -0
- package/tokens/v0_144/_md-comp-fab-tertiary-large.scss +66 -0
- package/tokens/v0_144/_md-comp-fab-tertiary-small.scss +66 -0
- package/tokens/v0_144/_md-comp-fab-tertiary.scss +66 -0
- package/tokens/v0_144/_md-comp-filled-autocomplete.scss +268 -0
- package/tokens/v0_144/_md-comp-filled-button.scss +95 -0
- package/tokens/v0_144/_md-comp-filled-card.scss +60 -0
- package/tokens/v0_144/_md-comp-filled-icon-button.scss +79 -0
- package/tokens/v0_144/_md-comp-filled-menu-button.scss +98 -0
- package/tokens/v0_144/_md-comp-filled-select.scss +276 -0
- package/tokens/v0_144/_md-comp-filled-text-field.scss +190 -0
- package/tokens/v0_144/_md-comp-filled-tonal-button.scss +99 -0
- package/tokens/v0_144/_md-comp-filled-tonal-icon-button.scss +86 -0
- package/tokens/v0_144/_md-comp-filter-chip.scss +236 -0
- package/tokens/v0_144/_md-comp-full-screen-dialog.scss +161 -0
- package/tokens/v0_144/_md-comp-icon-button.scss +70 -0
- package/tokens/v0_144/_md-comp-input-chip.scss +234 -0
- package/tokens/v0_144/_md-comp-linear-progress-indicator.scss +41 -0
- package/tokens/v0_144/_md-comp-list.scss +257 -0
- package/tokens/v0_144/_md-comp-menu.scss +123 -0
- package/tokens/v0_144/_md-comp-navigation-bar.scss +121 -0
- package/tokens/v0_144/_md-comp-navigation-drawer.scss +168 -0
- package/tokens/v0_144/_md-comp-navigation-rail.scss +168 -0
- package/tokens/v0_144/_md-comp-outlined-autocomplete.scss +258 -0
- package/tokens/v0_144/_md-comp-outlined-button.scss +88 -0
- package/tokens/v0_144/_md-comp-outlined-card.scss +65 -0
- package/tokens/v0_144/_md-comp-outlined-icon-button.scss +81 -0
- package/tokens/v0_144/_md-comp-outlined-menu-button.scss +94 -0
- package/tokens/v0_144/_md-comp-outlined-segmented-button.scss +112 -0
- package/tokens/v0_144/_md-comp-outlined-select.scss +266 -0
- package/tokens/v0_144/_md-comp-outlined-text-field.scss +172 -0
- package/tokens/v0_144/_md-comp-plain-tooltip.scss +55 -0
- package/tokens/v0_144/_md-comp-primary-navigation-tab.scss +123 -0
- package/tokens/v0_144/_md-comp-radio-button.scss +68 -0
- package/tokens/v0_144/_md-comp-rich-tooltip.scss +121 -0
- package/tokens/{v0_93/_md-comp-divider.scss → v0_144/_md-comp-scrim.scss} +5 -5
- package/tokens/v0_144/_md-comp-search-bar.scss +99 -0
- package/tokens/v0_144/_md-comp-search-view.scss +93 -0
- package/tokens/v0_144/_md-comp-secondary-navigation-tab.scss +86 -0
- package/tokens/v0_144/_md-comp-sheet-bottom.scss +45 -0
- package/tokens/v0_144/_md-comp-sheet-floating.scss +34 -0
- package/tokens/v0_144/_md-comp-sheet-side.scss +89 -0
- package/tokens/v0_144/_md-comp-slider.scss +116 -0
- package/tokens/v0_144/_md-comp-snackbar.scss +103 -0
- package/tokens/v0_144/_md-comp-standard-menu-button.scss +98 -0
- package/tokens/v0_144/_md-comp-suggestion-chip.scss +125 -0
- package/tokens/v0_144/_md-comp-switch.scss +145 -0
- package/tokens/v0_144/_md-comp-text-button.scss +81 -0
- package/tokens/v0_144/_md-comp-time-input.scss +218 -0
- package/tokens/v0_144/_md-comp-time-picker.scss +267 -0
- package/tokens/v0_144/_md-comp-top-app-bar-large.scss +63 -0
- package/tokens/v0_144/_md-comp-top-app-bar-medium.scss +63 -0
- package/tokens/v0_144/_md-comp-top-app-bar-small-centered.scss +67 -0
- package/tokens/v0_144/_md-comp-top-app-bar-small.scss +65 -0
- package/tokens/v0_144/_md-ref-palette.scss +107 -0
- package/tokens/v0_144/_md-ref-typeface.scss +21 -0
- package/tokens/v0_144/_md-sys-color.scss +706 -0
- package/tokens/v0_144/_md-sys-elevation.scss +30 -0
- package/tokens/v0_144/_md-sys-motion.scss +53 -0
- package/tokens/v0_144/_md-sys-shape.scss +30 -0
- package/tokens/v0_144/_md-sys-state.scss +19 -0
- package/tokens/v0_144/_md-sys-typescale.scss +285 -0
- package/badge/lib/_badge-theme.scss +0 -118
- package/button/lib/_button-theme.scss +0 -204
- package/button/lib/_button.scss +0 -88
- package/button/lib/_elevated-button-theme.scss +0 -53
- package/button/lib/_elevation-theme.scss +0 -94
- package/button/lib/_filled-button-theme.scss +0 -53
- package/button/lib/_icon-theme.scss +0 -67
- package/button/lib/_outlined-button-theme.scss +0 -112
- package/button/lib/_text-button-theme.scss +0 -57
- package/button/lib/_tonal-button-theme.scss +0 -53
- package/checkbox/lib/_checkbox-theme.scss +0 -532
- package/chips/action/lib/adapter.d.ts +0 -21
- package/chips/action/lib/adapter.js +0 -7
- package/chips/action/lib/adapter.js.map +0 -1
- package/chips/action/lib/foundation.d.ts +0 -31
- package/chips/action/lib/foundation.js +0 -151
- package/chips/action/lib/foundation.js.map +0 -1
- package/chips/action/lib/primary-foundation.d.ts +0 -16
- package/chips/action/lib/primary-foundation.js +0 -24
- package/chips/action/lib/primary-foundation.js.map +0 -1
- package/chips/action/lib/trailing-action.js.map +0 -1
- package/chips/action/lib/trailing-foundation.d.ts +0 -16
- package/chips/action/lib/trailing-foundation.js +0 -23
- package/chips/action/lib/trailing-foundation.js.map +0 -1
- package/compat/animation/animationframe.js.map +0 -1
- package/compat/base/aria-property.d.ts +0 -39
- package/compat/base/aria-property.js +0 -93
- package/compat/base/aria-property.js.map +0 -1
- package/compat/base/foundation.d.ts +0 -44
- package/compat/base/foundation.js +0 -45
- package/compat/base/foundation.js.map +0 -1
- package/compat/base/observer.d.ts +0 -16
- package/compat/base/observer.js +0 -43
- package/compat/base/observer.js.map +0 -1
- package/compat/base/utils.d.ts +0 -7
- package/compat/base/utils.js +0 -39
- package/compat/base/utils.js.map +0 -1
- package/compat/density/_density.scss +0 -106
- package/compat/dom/keyboard.d.ts +0 -33
- package/compat/dom/keyboard.js +0 -109
- package/compat/dom/keyboard.js.map +0 -1
- package/compat/theme/_color-palette.scss +0 -277
- package/compat/theme/_css.scss +0 -92
- package/compat/theme/_custom-properties.scss +0 -309
- package/compat/theme/_gss.scss +0 -45
- package/compat/theme/_keys.scss +0 -507
- package/compat/theme/_map-ext.scss +0 -68
- package/compat/theme/_replace.scss +0 -108
- package/compat/theme/_selector-ext.scss +0 -522
- package/compat/theme/_shadow-dom.scss +0 -474
- package/compat/theme/_state.scss +0 -752
- package/compat/theme/_theme-color.scss +0 -344
- package/compat/theme/_theme.scss +0 -334
- package/compat/touchtarget/_touch-target.scss +0 -56
- package/fab/lib/_fab-extended-theme.scss +0 -108
- package/fab/lib/_fab-shared-theme.scss +0 -202
- package/fab/lib/_fab-shared.scss +0 -114
- package/fab/lib/_fab-theme.scss +0 -107
- package/field/lib/_content-theme.scss +0 -80
- package/field/lib/_filled-field-theme.scss +0 -382
- package/field/lib/_label-theme.scss +0 -123
- package/field/lib/_outlined-field-theme.scss +0 -311
- package/field/lib/_supporting-text-theme.scss +0 -107
- package/focus/lib/_focus-ring-theme.scss +0 -89
- package/formfield/formfield.js +0 -22
- package/formfield/formfield.js.map +0 -1
- package/formfield/lib/_formfield-theme.scss +0 -41
- package/formfield/lib/_formfield.scss +0 -40
- package/formfield/lib/formfield-styles.css.js +0 -9
- package/formfield/lib/formfield-styles.css.js.map +0 -1
- package/formfield/lib/formfield-styles.scss +0 -16
- package/formfield/lib/formfield.d.ts +0 -22
- package/formfield/lib/formfield.js +0 -73
- package/formfield/lib/formfield.js.map +0 -1
- package/iconbutton/lib/_filled-icon-button-theme.scss +0 -138
- package/iconbutton/lib/_filled-tonal-icon-button-theme.scss +0 -144
- package/iconbutton/lib/_icon-button.scss +0 -91
- package/iconbutton/lib/_outlined-icon-button-theme.scss +0 -187
- package/iconbutton/lib/_standard-icon-button-theme.scss +0 -107
- package/iconbutton/lib/icon-button-styles.css.js +0 -9
- package/iconbutton/lib/icon-button-styles.css.js.map +0 -1
- package/list/lib/_list-theme.scss +0 -51
- package/list/lib/avatar/_list-item-avatar-theme.scss +0 -30
- package/list/lib/divider/_list-divider-theme.scss +0 -30
- package/list/lib/icon/_list-item-icon-theme.scss +0 -32
- package/list/lib/image/_list-item-image-theme.scss +0 -36
- package/list/lib/listitem/_list-item-theme.scss +0 -337
- package/list/lib/video/_list-item-video-theme.scss +0 -36
- package/menu/lib/_menu-theme.scss +0 -118
- package/menusurface/lib/_menu-surface-theme.scss +0 -58
- package/navigationbar/lib/_navigation-bar-theme.scss +0 -87
- package/navigationdrawer/lib/_navigation-drawer-modal-theme.scss +0 -138
- package/navigationdrawer/lib/_navigation-drawer-theme.scss +0 -113
- package/navigationtab/lib/_navigation-tab-theme.scss +0 -343
- package/ripple/lib/_ripple-theme.scss +0 -98
- package/segmentedbutton/lib/_outlined-segmented-button-theme.scss +0 -167
- package/segmentedbutton/lib/_segmented-button-theme.scss +0 -316
- package/segmentedbutton/lib/_segmented-button.scss +0 -159
- package/segmentedbutton/lib/segmented-button-styles.css.js +0 -9
- package/segmentedbutton/lib/segmented-button-styles.css.js.map +0 -1
- package/segmentedbuttonset/lib/_outlined-segmented-button-set-theme.scss +0 -53
- package/segmentedbuttonset/lib/_segmented-button-set-theme.scss +0 -41
- package/segmentedbuttonset/lib/_segmented-button-set.scss +0 -21
- package/switch/lib/_switch-handle-theme.scss +0 -137
- package/switch/lib/_switch-icon-theme.scss +0 -52
- package/switch/lib/_switch-theme.scss +0 -232
- package/switch/lib/_switch-track-theme.scss +0 -117
- package/textfield/lib/_filled-text-field-theme.scss +0 -203
- package/textfield/lib/_icon-theme.scss +0 -100
- package/textfield/lib/_input-theme.scss +0 -91
- package/textfield/lib/_outlined-text-field-theme.scss +0 -186
- package/textfield/lib/_text-field.scss +0 -28
- package/tokens/latest/_md-comp-assist-chip.scss +0 -98
- package/tokens/latest/_md-comp-badge.scss +0 -51
- package/tokens/latest/_md-comp-banner.scss +0 -99
- package/tokens/latest/_md-comp-bottom-app-bar.scss +0 -36
- package/tokens/latest/_md-comp-checkbox.scss +0 -119
- package/tokens/latest/_md-comp-circular-progress-indicator.scss +0 -37
- package/tokens/latest/_md-comp-date-input-modal.scss +0 -76
- package/tokens/latest/_md-comp-date-picker-docked.scss +0 -210
- package/tokens/latest/_md-comp-date-picker-modal.scss +0 -254
- package/tokens/latest/_md-comp-dialog.scss +0 -115
- package/tokens/latest/_md-comp-elevated-button.scss +0 -83
- package/tokens/latest/_md-comp-elevated-card.scss +0 -59
- package/tokens/latest/_md-comp-extended-fab-branded.scss +0 -77
- package/tokens/latest/_md-comp-extended-fab-primary.scss +0 -80
- package/tokens/latest/_md-comp-extended-fab-secondary.scss +0 -83
- package/tokens/latest/_md-comp-extended-fab-surface.scss +0 -81
- package/tokens/latest/_md-comp-extended-fab-tertiary.scss +0 -80
- package/tokens/latest/_md-comp-fab-branded-large.scss +0 -59
- package/tokens/latest/_md-comp-fab-branded.scss +0 -58
- package/tokens/latest/_md-comp-fab-primary-large.scss +0 -61
- package/tokens/latest/_md-comp-fab-primary-small.scss +0 -61
- package/tokens/latest/_md-comp-fab-primary.scss +0 -61
- package/tokens/latest/_md-comp-fab-secondary-large.scss +0 -63
- package/tokens/latest/_md-comp-fab-secondary-small.scss +0 -62
- package/tokens/latest/_md-comp-fab-secondary.scss +0 -63
- package/tokens/latest/_md-comp-fab-surface-large.scss +0 -62
- package/tokens/latest/_md-comp-fab-surface-small.scss +0 -62
- package/tokens/latest/_md-comp-fab-surface.scss +0 -62
- package/tokens/latest/_md-comp-fab-tertiary-large.scss +0 -61
- package/tokens/latest/_md-comp-fab-tertiary-small.scss +0 -61
- package/tokens/latest/_md-comp-fab-tertiary.scss +0 -61
- package/tokens/latest/_md-comp-filled-autocomplete.scss +0 -235
- package/tokens/latest/_md-comp-filled-button.scss +0 -87
- package/tokens/latest/_md-comp-filled-card.scss +0 -59
- package/tokens/latest/_md-comp-filled-icon-button.scss +0 -72
- package/tokens/latest/_md-comp-filled-menu-button.scss +0 -89
- package/tokens/latest/_md-comp-filled-select.scss +0 -243
- package/tokens/latest/_md-comp-filled-text-field.scss +0 -146
- package/tokens/latest/_md-comp-filled-tonal-button.scss +0 -88
- package/tokens/latest/_md-comp-filled-tonal-icon-button.scss +0 -83
- package/tokens/latest/_md-comp-filter-chip.scss +0 -172
- package/tokens/latest/_md-comp-full-screen-dialog.scss +0 -131
- package/tokens/latest/_md-comp-icon-button.scss +0 -66
- package/tokens/latest/_md-comp-input-chip.scss +0 -112
- package/tokens/latest/_md-comp-linear-progress-indicator.scss +0 -39
- package/tokens/latest/_md-comp-list.scss +0 -205
- package/tokens/latest/_md-comp-menu.scss +0 -113
- package/tokens/latest/_md-comp-navigation-bar.scss +0 -97
- package/tokens/latest/_md-comp-navigation-drawer.scss +0 -137
- package/tokens/latest/_md-comp-navigation-rail.scss +0 -132
- package/tokens/latest/_md-comp-outlined-autocomplete.scss +0 -223
- package/tokens/latest/_md-comp-outlined-button.scss +0 -80
- package/tokens/latest/_md-comp-outlined-card.scss +0 -65
- package/tokens/latest/_md-comp-outlined-icon-button.scss +0 -68
- package/tokens/latest/_md-comp-outlined-menu-button.scss +0 -83
- package/tokens/latest/_md-comp-outlined-segmented-button.scss +0 -97
- package/tokens/latest/_md-comp-outlined-select.scss +0 -231
- package/tokens/latest/_md-comp-outlined-text-field.scss +0 -140
- package/tokens/latest/_md-comp-plain-tooltip.scss +0 -46
- package/tokens/latest/_md-comp-primary-navigation-tab.scss +0 -110
- package/tokens/latest/_md-comp-radio-button.scss +0 -58
- package/tokens/latest/_md-comp-rich-tooltip.scss +0 -98
- package/tokens/latest/_md-comp-search-bar.scss +0 -84
- package/tokens/latest/_md-comp-search-view.scss +0 -79
- package/tokens/latest/_md-comp-secondary-navigation-tab.scss +0 -78
- package/tokens/latest/_md-comp-sheet-bottom.scss +0 -41
- package/tokens/latest/_md-comp-sheet-floating.scss +0 -34
- package/tokens/latest/_md-comp-sheet-side.scss +0 -75
- package/tokens/latest/_md-comp-slider.scss +0 -105
- package/tokens/latest/_md-comp-snackbar.scss +0 -91
- package/tokens/latest/_md-comp-standard-menu-button.scss +0 -82
- package/tokens/latest/_md-comp-suggestion-chip.scss +0 -90
- package/tokens/latest/_md-comp-switch.scss +0 -126
- package/tokens/latest/_md-comp-text-button.scss +0 -75
- package/tokens/latest/_md-comp-time-input.scss +0 -184
- package/tokens/latest/_md-comp-time-picker.scss +0 -235
- package/tokens/latest/_md-comp-top-app-bar-large.scss +0 -57
- package/tokens/latest/_md-comp-top-app-bar-medium.scss +0 -56
- package/tokens/latest/_md-comp-top-app-bar-small-centered.scss +0 -60
- package/tokens/latest/_md-comp-top-app-bar-small.scss +0 -58
- package/tokens/latest/_md-ref-palette.scss +0 -95
- package/tokens/latest/_md-ref-typeface.scss +0 -20
- package/tokens/latest/_md-sys-color.scss +0 -1006
- package/tokens/latest/_md-sys-elevation.scss +0 -30
- package/tokens/latest/_md-sys-motion.scss +0 -51
- package/tokens/latest/_md-sys-shape.scss +0 -26
- package/tokens/latest/_md-sys-state.scss +0 -19
- package/tokens/latest/_md-sys-typescale.scss +0 -204
- package/tokens/v0_75/_index.scss +0 -154
- package/tokens/v0_75/_md-comp-assist-chip.scss +0 -98
- package/tokens/v0_75/_md-comp-badge.scss +0 -51
- package/tokens/v0_75/_md-comp-banner.scss +0 -99
- package/tokens/v0_75/_md-comp-bottom-app-bar.scss +0 -36
- package/tokens/v0_75/_md-comp-checkbox.scss +0 -59
- package/tokens/v0_75/_md-comp-circular-progress-indicator.scss +0 -37
- package/tokens/v0_75/_md-comp-dialog.scss +0 -102
- package/tokens/v0_75/_md-comp-elevated-button.scss +0 -83
- package/tokens/v0_75/_md-comp-elevated-card.scss +0 -56
- package/tokens/v0_75/_md-comp-extended-fab-branded.scss +0 -77
- package/tokens/v0_75/_md-comp-extended-fab-primary.scss +0 -80
- package/tokens/v0_75/_md-comp-extended-fab-secondary.scss +0 -83
- package/tokens/v0_75/_md-comp-extended-fab-surface.scss +0 -81
- package/tokens/v0_75/_md-comp-extended-fab-tertiary.scss +0 -80
- package/tokens/v0_75/_md-comp-fab-branded-large.scss +0 -59
- package/tokens/v0_75/_md-comp-fab-branded.scss +0 -58
- package/tokens/v0_75/_md-comp-fab-primary-large.scss +0 -61
- package/tokens/v0_75/_md-comp-fab-primary-small.scss +0 -61
- package/tokens/v0_75/_md-comp-fab-primary.scss +0 -61
- package/tokens/v0_75/_md-comp-fab-secondary-large.scss +0 -63
- package/tokens/v0_75/_md-comp-fab-secondary-small.scss +0 -62
- package/tokens/v0_75/_md-comp-fab-secondary.scss +0 -63
- package/tokens/v0_75/_md-comp-fab-surface-large.scss +0 -62
- package/tokens/v0_75/_md-comp-fab-surface-small.scss +0 -62
- package/tokens/v0_75/_md-comp-fab-surface.scss +0 -62
- package/tokens/v0_75/_md-comp-fab-tertiary-large.scss +0 -61
- package/tokens/v0_75/_md-comp-fab-tertiary-small.scss +0 -61
- package/tokens/v0_75/_md-comp-fab-tertiary.scss +0 -61
- package/tokens/v0_75/_md-comp-filled-button-tonal.scss +0 -84
- package/tokens/v0_75/_md-comp-filled-button.scss +0 -87
- package/tokens/v0_75/_md-comp-filled-card.scss +0 -56
- package/tokens/v0_75/_md-comp-filled-icon-button.scss +0 -72
- package/tokens/v0_75/_md-comp-filled-text-field.scss +0 -142
- package/tokens/v0_75/_md-comp-filled-tonal-button.scss +0 -88
- package/tokens/v0_75/_md-comp-filled-tonal-icon-button.scss +0 -83
- package/tokens/v0_75/_md-comp-filter-chip.scss +0 -172
- package/tokens/v0_75/_md-comp-full-screen-dialog.scss +0 -131
- package/tokens/v0_75/_md-comp-icon-button.scss +0 -79
- package/tokens/v0_75/_md-comp-input-chip.scss +0 -112
- package/tokens/v0_75/_md-comp-linear-progress-indicator.scss +0 -39
- package/tokens/v0_75/_md-comp-list.scss +0 -205
- package/tokens/v0_75/_md-comp-menu.scss +0 -113
- package/tokens/v0_75/_md-comp-navigation-bar.scss +0 -131
- package/tokens/v0_75/_md-comp-navigation-drawer.scss +0 -137
- package/tokens/v0_75/_md-comp-navigation-rail.scss +0 -136
- package/tokens/v0_75/_md-comp-outlined-button.scss +0 -80
- package/tokens/v0_75/_md-comp-outlined-card.scss +0 -62
- package/tokens/v0_75/_md-comp-outlined-icon-button.scss +0 -68
- package/tokens/v0_75/_md-comp-outlined-segmented-button.scss +0 -96
- package/tokens/v0_75/_md-comp-outlined-text-field.scss +0 -136
- package/tokens/v0_75/_md-comp-primary-navigation-tab.scss +0 -116
- package/tokens/v0_75/_md-comp-radio-button.scss +0 -58
- package/tokens/v0_75/_md-comp-rich-tooltip.scss +0 -98
- package/tokens/v0_75/_md-comp-secondary-navigation-tab.scss +0 -75
- package/tokens/v0_75/_md-comp-slider.scss +0 -129
- package/tokens/v0_75/_md-comp-snackbar.scss +0 -77
- package/tokens/v0_75/_md-comp-suggestion-chip.scss +0 -90
- package/tokens/v0_75/_md-comp-switch.scss +0 -92
- package/tokens/v0_75/_md-comp-text-button.scss +0 -75
- package/tokens/v0_75/_md-comp-top-app-bar-compact-centered.scss +0 -53
- package/tokens/v0_75/_md-comp-top-app-bar-compact.scss +0 -43
- package/tokens/v0_75/_md-comp-top-app-bar-large.scss +0 -57
- package/tokens/v0_75/_md-comp-top-app-bar-medium.scss +0 -56
- package/tokens/v0_75/_md-comp-top-app-bar-small-centered.scss +0 -60
- package/tokens/v0_75/_md-comp-top-app-bar-small.scss +0 -58
- package/tokens/v0_75/_md-ref-palette.scss +0 -186
- package/tokens/v0_75/_md-ref-typeface.scss +0 -25
- package/tokens/v0_75/_md-sys-color.scss +0 -86
- package/tokens/v0_75/_md-sys-elevation.scss +0 -30
- package/tokens/v0_75/_md-sys-motion.scss +0 -61
- package/tokens/v0_75/_md-sys-shape.scss +0 -29
- package/tokens/v0_75/_md-sys-state.scss +0 -19
- package/tokens/v0_75/_md-sys-typescale.scss +0 -252
- package/tokens/v0_93/_index.scss +0 -184
- package/tokens/v0_93/_md-comp-assist-chip.scss +0 -98
- package/tokens/v0_93/_md-comp-badge.scss +0 -51
- package/tokens/v0_93/_md-comp-banner.scss +0 -99
- package/tokens/v0_93/_md-comp-bottom-app-bar.scss +0 -36
- package/tokens/v0_93/_md-comp-checkbox.scss +0 -119
- package/tokens/v0_93/_md-comp-circular-progress-indicator.scss +0 -37
- package/tokens/v0_93/_md-comp-date-input-modal.scss +0 -76
- package/tokens/v0_93/_md-comp-date-picker-docked.scss +0 -210
- package/tokens/v0_93/_md-comp-date-picker-modal.scss +0 -254
- package/tokens/v0_93/_md-comp-dialog.scss +0 -101
- package/tokens/v0_93/_md-comp-elevated-button.scss +0 -83
- package/tokens/v0_93/_md-comp-elevated-card.scss +0 -59
- package/tokens/v0_93/_md-comp-extended-fab-branded.scss +0 -77
- package/tokens/v0_93/_md-comp-extended-fab-primary.scss +0 -80
- package/tokens/v0_93/_md-comp-extended-fab-secondary.scss +0 -83
- package/tokens/v0_93/_md-comp-extended-fab-surface.scss +0 -81
- package/tokens/v0_93/_md-comp-extended-fab-tertiary.scss +0 -80
- package/tokens/v0_93/_md-comp-fab-branded-large.scss +0 -59
- package/tokens/v0_93/_md-comp-fab-branded.scss +0 -58
- package/tokens/v0_93/_md-comp-fab-primary-large.scss +0 -61
- package/tokens/v0_93/_md-comp-fab-primary-small.scss +0 -61
- package/tokens/v0_93/_md-comp-fab-primary.scss +0 -61
- package/tokens/v0_93/_md-comp-fab-secondary-large.scss +0 -63
- package/tokens/v0_93/_md-comp-fab-secondary-small.scss +0 -62
- package/tokens/v0_93/_md-comp-fab-secondary.scss +0 -63
- package/tokens/v0_93/_md-comp-fab-surface-large.scss +0 -62
- package/tokens/v0_93/_md-comp-fab-surface-small.scss +0 -62
- package/tokens/v0_93/_md-comp-fab-surface.scss +0 -62
- package/tokens/v0_93/_md-comp-fab-tertiary-large.scss +0 -61
- package/tokens/v0_93/_md-comp-fab-tertiary-small.scss +0 -61
- package/tokens/v0_93/_md-comp-fab-tertiary.scss +0 -61
- package/tokens/v0_93/_md-comp-filled-autocomplete.scss +0 -235
- package/tokens/v0_93/_md-comp-filled-button.scss +0 -87
- package/tokens/v0_93/_md-comp-filled-card.scss +0 -59
- package/tokens/v0_93/_md-comp-filled-icon-button.scss +0 -72
- package/tokens/v0_93/_md-comp-filled-menu-button.scss +0 -89
- package/tokens/v0_93/_md-comp-filled-select.scss +0 -243
- package/tokens/v0_93/_md-comp-filled-text-field.scss +0 -146
- package/tokens/v0_93/_md-comp-filled-tonal-button.scss +0 -88
- package/tokens/v0_93/_md-comp-filled-tonal-icon-button.scss +0 -83
- package/tokens/v0_93/_md-comp-filter-chip.scss +0 -172
- package/tokens/v0_93/_md-comp-full-screen-dialog.scss +0 -131
- package/tokens/v0_93/_md-comp-icon-button.scss +0 -66
- package/tokens/v0_93/_md-comp-input-chip.scss +0 -112
- package/tokens/v0_93/_md-comp-linear-progress-indicator.scss +0 -39
- package/tokens/v0_93/_md-comp-list.scss +0 -205
- package/tokens/v0_93/_md-comp-menu.scss +0 -113
- package/tokens/v0_93/_md-comp-navigation-bar.scss +0 -97
- package/tokens/v0_93/_md-comp-navigation-drawer.scss +0 -137
- package/tokens/v0_93/_md-comp-navigation-rail.scss +0 -132
- package/tokens/v0_93/_md-comp-outlined-autocomplete.scss +0 -223
- package/tokens/v0_93/_md-comp-outlined-button.scss +0 -80
- package/tokens/v0_93/_md-comp-outlined-card.scss +0 -65
- package/tokens/v0_93/_md-comp-outlined-icon-button.scss +0 -68
- package/tokens/v0_93/_md-comp-outlined-menu-button.scss +0 -83
- package/tokens/v0_93/_md-comp-outlined-segmented-button.scss +0 -97
- package/tokens/v0_93/_md-comp-outlined-select.scss +0 -231
- package/tokens/v0_93/_md-comp-outlined-text-field.scss +0 -140
- package/tokens/v0_93/_md-comp-plain-tooltip.scss +0 -46
- package/tokens/v0_93/_md-comp-primary-navigation-tab.scss +0 -110
- package/tokens/v0_93/_md-comp-radio-button.scss +0 -58
- package/tokens/v0_93/_md-comp-rich-tooltip.scss +0 -98
- package/tokens/v0_93/_md-comp-search-bar.scss +0 -84
- package/tokens/v0_93/_md-comp-search-view.scss +0 -79
- package/tokens/v0_93/_md-comp-secondary-navigation-tab.scss +0 -78
- package/tokens/v0_93/_md-comp-sheet-bottom.scss +0 -41
- package/tokens/v0_93/_md-comp-sheet-side.scss +0 -75
- package/tokens/v0_93/_md-comp-slider.scss +0 -105
- package/tokens/v0_93/_md-comp-snackbar.scss +0 -91
- package/tokens/v0_93/_md-comp-standard-menu-button.scss +0 -82
- package/tokens/v0_93/_md-comp-suggestion-chip.scss +0 -90
- package/tokens/v0_93/_md-comp-switch.scss +0 -126
- package/tokens/v0_93/_md-comp-text-button.scss +0 -75
- package/tokens/v0_93/_md-comp-time-input.scss +0 -184
- package/tokens/v0_93/_md-comp-time-picker.scss +0 -235
- package/tokens/v0_93/_md-comp-top-app-bar-large.scss +0 -57
- package/tokens/v0_93/_md-comp-top-app-bar-medium.scss +0 -56
- package/tokens/v0_93/_md-comp-top-app-bar-small-centered.scss +0 -60
- package/tokens/v0_93/_md-comp-top-app-bar-small.scss +0 -58
- package/tokens/v0_93/_md-ref-palette.scss +0 -95
- package/tokens/v0_93/_md-ref-typeface.scss +0 -20
- package/tokens/v0_93/_md-sys-color.scss +0 -1006
- package/tokens/v0_93/_md-sys-elevation.scss +0 -30
- package/tokens/v0_93/_md-sys-motion.scss +0 -51
- package/tokens/v0_93/_md-sys-shape.scss +0 -26
- package/tokens/v0_93/_md-sys-state.scss +0 -19
- package/tokens/v0_93/_md-sys-typescale.scss +0 -204
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { noChange } from 'lit';
|
|
7
|
+
import { Directive, directive, PartType } from 'lit/directive.js';
|
|
8
|
+
/**
|
|
9
|
+
* Delay reacting to touch so that we do not show the ripple for a swipe or
|
|
10
|
+
* scroll interaction.
|
|
11
|
+
*/
|
|
12
|
+
const TOUCH_DELAY_MS = 150;
|
|
13
|
+
/**
|
|
14
|
+
* Interaction states for the ripple.
|
|
15
|
+
*
|
|
16
|
+
* On Touch:
|
|
17
|
+
* - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`
|
|
18
|
+
* - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`
|
|
19
|
+
*
|
|
20
|
+
* On Mouse or Pen:
|
|
21
|
+
* - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`
|
|
22
|
+
*/
|
|
23
|
+
var State;
|
|
24
|
+
(function (State) {
|
|
25
|
+
/**
|
|
26
|
+
* Initial state of the control, no touch in progress.
|
|
27
|
+
*
|
|
28
|
+
* Transitions:
|
|
29
|
+
* - on touch down: transition to `TOUCH_DELAY`.
|
|
30
|
+
* - on mouse down: transition to `WAITING_FOR_CLICK`.
|
|
31
|
+
*/
|
|
32
|
+
State[State["INACTIVE"] = 0] = "INACTIVE";
|
|
33
|
+
/**
|
|
34
|
+
* Touch down has been received, waiting to determine if it's a swipe or
|
|
35
|
+
* scroll.
|
|
36
|
+
*
|
|
37
|
+
* Transitions:
|
|
38
|
+
* - on touch up: beginPress(); transition to `WAITING_FOR_CLICK`.
|
|
39
|
+
* - on cancel: transition to `INACTIVE`.
|
|
40
|
+
* - after `TOUCH_DELAY_MS`: beginPress(); transition to `HOLDING`.
|
|
41
|
+
*/
|
|
42
|
+
State[State["TOUCH_DELAY"] = 1] = "TOUCH_DELAY";
|
|
43
|
+
/**
|
|
44
|
+
* A touch has been deemed to be a press
|
|
45
|
+
*
|
|
46
|
+
* Transitions:
|
|
47
|
+
* - on up: transition to `WAITING_FOR_CLICK`.
|
|
48
|
+
*/
|
|
49
|
+
State[State["HOLDING"] = 2] = "HOLDING";
|
|
50
|
+
/**
|
|
51
|
+
* The user touch has finished, transition into rest state.
|
|
52
|
+
*
|
|
53
|
+
* Transitions:
|
|
54
|
+
* - on click endPress(); transition to `INACTIVE`.
|
|
55
|
+
*/
|
|
56
|
+
State[State["WAITING_FOR_CLICK"] = 3] = "WAITING_FOR_CLICK";
|
|
57
|
+
})(State || (State = {}));
|
|
58
|
+
class RippleDirective extends Directive {
|
|
59
|
+
constructor(partInfo) {
|
|
60
|
+
super(partInfo);
|
|
61
|
+
this.rippleGetter = async () => null;
|
|
62
|
+
this.state = State.INACTIVE;
|
|
63
|
+
this.checkBoundsAfterContextMenu = false;
|
|
64
|
+
this.rippleStartEvent = null;
|
|
65
|
+
this.touchTimer = null;
|
|
66
|
+
this.clickTimer = null;
|
|
67
|
+
if (partInfo.type !== PartType.ELEMENT) {
|
|
68
|
+
throw new Error('The `ripple` directive must be used on an element');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
render(ripple) {
|
|
72
|
+
return noChange;
|
|
73
|
+
}
|
|
74
|
+
// Use EventListenerObject::handleEvent interface to handle events without
|
|
75
|
+
// generating bound event handlers
|
|
76
|
+
async handleEvent(event) {
|
|
77
|
+
const ripple = await this.rippleGetter();
|
|
78
|
+
if (!ripple) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
switch (event.type) {
|
|
82
|
+
case 'click':
|
|
83
|
+
this.click(ripple);
|
|
84
|
+
break;
|
|
85
|
+
case 'contextmenu':
|
|
86
|
+
this.contextMenu(ripple);
|
|
87
|
+
break;
|
|
88
|
+
case 'pointercancel':
|
|
89
|
+
this.pointerCancel(ripple, event);
|
|
90
|
+
break;
|
|
91
|
+
case 'pointerdown':
|
|
92
|
+
this.pointerDown(ripple, event);
|
|
93
|
+
break;
|
|
94
|
+
case 'pointerenter':
|
|
95
|
+
this.pointerEnter(ripple, event);
|
|
96
|
+
break;
|
|
97
|
+
case 'pointerleave':
|
|
98
|
+
this.pointerLeave(ripple, event);
|
|
99
|
+
break;
|
|
100
|
+
case 'pointerup':
|
|
101
|
+
this.pointerUp(ripple, event);
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
update(part, [ripple]) {
|
|
108
|
+
if (!this.element) {
|
|
109
|
+
// NOTE: addEventListener typing needs to be used with HTMLElements or a
|
|
110
|
+
// subclass
|
|
111
|
+
this.element = part.element;
|
|
112
|
+
this.element.addEventListener('click', this);
|
|
113
|
+
this.element.addEventListener('contextmenu', this);
|
|
114
|
+
this.element.addEventListener('pointercancel', this);
|
|
115
|
+
this.element.addEventListener('pointerdown', this);
|
|
116
|
+
this.element.addEventListener('pointerenter', this);
|
|
117
|
+
this.element.addEventListener('pointerleave', this);
|
|
118
|
+
this.element.addEventListener('pointerup', this);
|
|
119
|
+
}
|
|
120
|
+
// Normalize given ripple accessor
|
|
121
|
+
this.rippleGetter = typeof ripple === 'function' ? ripple : () => ripple;
|
|
122
|
+
return noChange;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Returns `true` if
|
|
126
|
+
* - the ripple element is enabled
|
|
127
|
+
* - the pointer is primary for the input type
|
|
128
|
+
* - the pointer is the pointer that started the interaction, or will start
|
|
129
|
+
* the interaction
|
|
130
|
+
* - the pointer is a touch, or the pointer state has the primary button
|
|
131
|
+
* held, or the pointer is hovering
|
|
132
|
+
*/
|
|
133
|
+
shouldReactToEvent(ripple, ev, hovering = false) {
|
|
134
|
+
const enabled = !ripple.disabled;
|
|
135
|
+
const isPrimaryPointer = ev.isPrimary;
|
|
136
|
+
const isInteractionPointer = this.rippleStartEvent === null ||
|
|
137
|
+
this.rippleStartEvent.pointerId === ev.pointerId;
|
|
138
|
+
const isPrimaryButton = ev.buttons === 1;
|
|
139
|
+
return enabled && isPrimaryPointer && isInteractionPointer &&
|
|
140
|
+
(this.isTouch(ev) || isPrimaryButton || hovering);
|
|
141
|
+
}
|
|
142
|
+
isTouch({ pointerType }) {
|
|
143
|
+
return pointerType === 'touch';
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Check if the event is within the bounds of the element.
|
|
147
|
+
*
|
|
148
|
+
* This is only needed for the "stuck" contextmenu longpress on Chrome.
|
|
149
|
+
*/
|
|
150
|
+
inBounds({ x, y }) {
|
|
151
|
+
const { top, left, bottom, right } = this.element.getBoundingClientRect();
|
|
152
|
+
return x >= left && x <= right && y >= top && y <= bottom;
|
|
153
|
+
}
|
|
154
|
+
beginPress(ripple) {
|
|
155
|
+
ripple.beginPress(this.rippleStartEvent);
|
|
156
|
+
}
|
|
157
|
+
endPress(ripple) {
|
|
158
|
+
ripple.endPress();
|
|
159
|
+
this.state = State.INACTIVE;
|
|
160
|
+
this.rippleStartEvent = null;
|
|
161
|
+
if (this.touchTimer) {
|
|
162
|
+
clearTimeout(this.touchTimer);
|
|
163
|
+
this.touchTimer = null;
|
|
164
|
+
}
|
|
165
|
+
if (this.clickTimer) {
|
|
166
|
+
clearTimeout(this.clickTimer);
|
|
167
|
+
this.clickTimer = null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
waitForTouchHold() {
|
|
171
|
+
if (this.touchTimer !== null) {
|
|
172
|
+
clearTimeout(this.touchTimer);
|
|
173
|
+
}
|
|
174
|
+
this.state = State.TOUCH_DELAY;
|
|
175
|
+
this.touchTimer = setTimeout(async () => {
|
|
176
|
+
const ripple = await this.rippleGetter();
|
|
177
|
+
if (ripple === null || this.state !== State.TOUCH_DELAY) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
this.state = State.HOLDING;
|
|
181
|
+
this.beginPress(ripple);
|
|
182
|
+
}, TOUCH_DELAY_MS);
|
|
183
|
+
}
|
|
184
|
+
click(ripple) {
|
|
185
|
+
// Click is a MouseEvent in Firefox and Safari, so we cannot use
|
|
186
|
+
// `shouldReactToEvent`
|
|
187
|
+
if (ripple.disabled) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (this.state === State.WAITING_FOR_CLICK) {
|
|
191
|
+
this.endPress(ripple);
|
|
192
|
+
}
|
|
193
|
+
else if (this.state === State.INACTIVE) {
|
|
194
|
+
// keyboard synthesized click event
|
|
195
|
+
this.beginPress(ripple);
|
|
196
|
+
this.endPress(ripple);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
contextMenu(ripple) {
|
|
200
|
+
if (!ripple.disabled) {
|
|
201
|
+
this.checkBoundsAfterContextMenu = true;
|
|
202
|
+
this.endPress(ripple);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
pointerDown(ripple, ev) {
|
|
206
|
+
if (!this.shouldReactToEvent(ripple, ev)) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
this.rippleStartEvent = ev;
|
|
210
|
+
if (this.isTouch(ev)) {
|
|
211
|
+
// after a longpress contextmenu event, an extra `pointerdown` can be
|
|
212
|
+
// dispatched to the pressed element. Check that the down is within
|
|
213
|
+
// bounds of the element in this case.
|
|
214
|
+
if (this.checkBoundsAfterContextMenu && !this.inBounds(ev)) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
this.checkBoundsAfterContextMenu = false;
|
|
218
|
+
this.waitForTouchHold();
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
222
|
+
this.beginPress(ripple);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
pointerUp(ripple, ev) {
|
|
226
|
+
if (!this.isTouch(ev) || !this.shouldReactToEvent(ripple, ev)) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
if (this.state === State.HOLDING) {
|
|
230
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
231
|
+
}
|
|
232
|
+
else if (this.state === State.TOUCH_DELAY) {
|
|
233
|
+
this.state = State.WAITING_FOR_CLICK;
|
|
234
|
+
this.beginPress(ripple);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
pointerCancel(ripple, ev) {
|
|
238
|
+
if (this.shouldReactToEvent(ripple, ev)) {
|
|
239
|
+
this.endPress(ripple);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
pointerEnter(ripple, ev) {
|
|
243
|
+
if (this.shouldReactToEvent(ripple, ev, true)) {
|
|
244
|
+
ripple.beginHover(ev);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
pointerLeave(ripple, ev) {
|
|
248
|
+
if (this.shouldReactToEvent(ripple, ev, true)) {
|
|
249
|
+
ripple.endHover();
|
|
250
|
+
// release a held mouse or pen press that moves outside the element
|
|
251
|
+
if (!this.isTouch(ev) && this.state !== State.INACTIVE) {
|
|
252
|
+
this.endPress(ripple);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Connects a Ripple element to a node that drives the interaction
|
|
259
|
+
*
|
|
260
|
+
* @param rippleGetter A function that returns an `md-ripple` element
|
|
261
|
+
* @param simulateKeyboardClick For elements that do not issue a click on
|
|
262
|
+
* keyboard interaction, pass `true` to enable press animations on Enter or
|
|
263
|
+
* Spacebar
|
|
264
|
+
*/
|
|
265
|
+
export const ripple = directive(RippleDirective);
|
|
266
|
+
//# sourceMappingURL=directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directive.js","sourceRoot":"","sources":["directive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAC,SAAS,EAAE,SAAS,EAA8C,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAI5G;;;GAGG;AACH,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B;;;;;;;;;GASG;AACH,IAAK,KAiCJ;AAjCD,WAAK,KAAK;IACR;;;;;;OAMG;IACH,yCAAQ,CAAA;IACR;;;;;;;;OAQG;IACH,+CAAW,CAAA;IACX;;;;;OAKG;IACH,uCAAO,CAAA;IACP;;;;;OAKG;IACH,2DAAiB,CAAA;AACnB,CAAC,EAjCI,KAAK,KAAL,KAAK,QAiCT;AASD,MAAM,eAAgB,SAAQ,SAAS;IASrC,YAAY,QAAkB;QAC5B,KAAK,CAAC,QAAQ,CAAC,CAAC;QATV,iBAAY,GAAmB,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC;QAEhD,UAAK,GAAU,KAAK,CAAC,QAAQ,CAAC;QAC9B,gCAA2B,GAAG,KAAK,CAAC;QACpC,qBAAgB,GAAsB,IAAI,CAAC;QAC3C,eAAU,GAAgB,IAAI,CAAC;QAC/B,eAAU,GAAgB,IAAI,CAAC;QAIrC,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;SACtE;IACH,CAAC;IAED,MAAM,CAAC,MAA2C;QAChD,OAAO,QAAQ,CAAC;IAClB,CAAC;IA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AM,MAAM,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {noChange} from 'lit';\nimport {Directive, directive, DirectiveParameters, ElementPart, PartInfo, PartType} from 'lit/directive.js';\n\nimport {Ripple} from './lib/ripple.js';\n\n/**\n * Delay reacting to touch so that we do not show the ripple for a swipe or\n * scroll interaction.\n */\nconst TOUCH_DELAY_MS = 150;\n\n/**\n * Interaction states for the ripple.\n *\n * On Touch:\n * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`\n * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`\n *\n * On Mouse or Pen:\n * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`\n */\nenum State {\n /**\n * Initial state of the control, no touch in progress.\n *\n * Transitions:\n * - on touch down: transition to `TOUCH_DELAY`.\n * - on mouse down: transition to `WAITING_FOR_CLICK`.\n */\n INACTIVE,\n /**\n * Touch down has been received, waiting to determine if it's a swipe or\n * scroll.\n *\n * Transitions:\n * - on touch up: beginPress(); transition to `WAITING_FOR_CLICK`.\n * - on cancel: transition to `INACTIVE`.\n * - after `TOUCH_DELAY_MS`: beginPress(); transition to `HOLDING`.\n */\n TOUCH_DELAY,\n /**\n * A touch has been deemed to be a press\n *\n * Transitions:\n * - on up: transition to `WAITING_FOR_CLICK`.\n */\n HOLDING,\n /**\n * The user touch has finished, transition into rest state.\n *\n * Transitions:\n * - on click endPress(); transition to `INACTIVE`.\n */\n WAITING_FOR_CLICK\n}\n\n/**\n * Normalized ripple accessor type.\n *\n * Use with `await rippleFunction()`\n */\ntype RippleFunction = () => Ripple|null|Promise<Ripple|null>;\n\nclass RippleDirective extends Directive {\n private rippleGetter: RippleFunction = async () => null;\n private element?: HTMLElement;\n private state: State = State.INACTIVE;\n private checkBoundsAfterContextMenu = false;\n private rippleStartEvent: PointerEvent|null = null;\n private touchTimer: number|null = null;\n private clickTimer: number|null = null;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error('The `ripple` directive must be used on an element');\n }\n }\n\n render(ripple: RippleFunction|Promise<Ripple|null>) {\n return noChange;\n }\n\n // Use EventListenerObject::handleEvent interface to handle events without\n // generating bound event handlers\n async handleEvent(event: Event) {\n const ripple = await this.rippleGetter();\n if (!ripple) {\n return;\n }\n switch (event.type) {\n case 'click':\n this.click(ripple);\n break;\n case 'contextmenu':\n this.contextMenu(ripple);\n break;\n case 'pointercancel':\n this.pointerCancel(ripple, event as PointerEvent);\n break;\n case 'pointerdown':\n this.pointerDown(ripple, event as PointerEvent);\n break;\n case 'pointerenter':\n this.pointerEnter(ripple, event as PointerEvent);\n break;\n case 'pointerleave':\n this.pointerLeave(ripple, event as PointerEvent);\n break;\n case 'pointerup':\n this.pointerUp(ripple, event as PointerEvent);\n break;\n default:\n break;\n }\n }\n\n override update(part: ElementPart, [ripple]: DirectiveParameters<this>) {\n if (!this.element) {\n // NOTE: addEventListener typing needs to be used with HTMLElements or a\n // subclass\n this.element = part.element as HTMLElement;\n this.element.addEventListener('click', this);\n this.element.addEventListener('contextmenu', this);\n this.element.addEventListener('pointercancel', this);\n this.element.addEventListener('pointerdown', this);\n this.element.addEventListener('pointerenter', this);\n this.element.addEventListener('pointerleave', this);\n this.element.addEventListener('pointerup', this);\n }\n // Normalize given ripple accessor\n this.rippleGetter = typeof ripple === 'function' ? ripple : () => ripple;\n return noChange;\n }\n\n /**\n * Returns `true` if\n * - the ripple element is enabled\n * - the pointer is primary for the input type\n * - the pointer is the pointer that started the interaction, or will start\n * the interaction\n * - the pointer is a touch, or the pointer state has the primary button\n * held, or the pointer is hovering\n */\n private shouldReactToEvent(\n ripple: Ripple, ev: PointerEvent, hovering = false) {\n const enabled = !ripple.disabled;\n const isPrimaryPointer = ev.isPrimary;\n const isInteractionPointer = this.rippleStartEvent === null ||\n this.rippleStartEvent.pointerId === ev.pointerId;\n const isPrimaryButton = ev.buttons === 1;\n return enabled && isPrimaryPointer && isInteractionPointer &&\n (this.isTouch(ev) || isPrimaryButton || hovering);\n }\n\n private isTouch({pointerType}: PointerEvent) {\n return pointerType === 'touch';\n }\n\n /**\n * Check if the event is within the bounds of the element.\n *\n * This is only needed for the \"stuck\" contextmenu longpress on Chrome.\n */\n private inBounds({x, y}: PointerEvent) {\n const {top, left, bottom, right} = this.element!.getBoundingClientRect();\n return x >= left && x <= right && y >= top && y <= bottom;\n }\n\n private beginPress(ripple: Ripple) {\n ripple.beginPress(this.rippleStartEvent);\n }\n\n private endPress(ripple: Ripple) {\n ripple.endPress();\n this.state = State.INACTIVE;\n this.rippleStartEvent = null;\n if (this.touchTimer) {\n clearTimeout(this.touchTimer);\n this.touchTimer = null;\n }\n if (this.clickTimer) {\n clearTimeout(this.clickTimer);\n this.clickTimer = null;\n }\n }\n\n private waitForTouchHold() {\n if (this.touchTimer !== null) {\n clearTimeout(this.touchTimer);\n }\n this.state = State.TOUCH_DELAY;\n this.touchTimer = setTimeout(async () => {\n const ripple = await this.rippleGetter();\n if (ripple === null || this.state !== State.TOUCH_DELAY) {\n return;\n }\n this.state = State.HOLDING;\n this.beginPress(ripple);\n }, TOUCH_DELAY_MS);\n }\n\n private click(ripple: Ripple) {\n // Click is a MouseEvent in Firefox and Safari, so we cannot use\n // `shouldReactToEvent`\n if (ripple.disabled) {\n return;\n }\n if (this.state === State.WAITING_FOR_CLICK) {\n this.endPress(ripple);\n } else if (this.state === State.INACTIVE) {\n // keyboard synthesized click event\n this.beginPress(ripple);\n this.endPress(ripple);\n }\n }\n\n private contextMenu(ripple: Ripple) {\n if (!ripple.disabled) {\n this.checkBoundsAfterContextMenu = true;\n this.endPress(ripple);\n }\n }\n\n private pointerDown(ripple: Ripple, ev: PointerEvent) {\n if (!this.shouldReactToEvent(ripple, ev)) {\n return;\n }\n this.rippleStartEvent = ev;\n if (this.isTouch(ev)) {\n // after a longpress contextmenu event, an extra `pointerdown` can be\n // dispatched to the pressed element. Check that the down is within\n // bounds of the element in this case.\n if (this.checkBoundsAfterContextMenu && !this.inBounds(ev)) {\n return;\n }\n this.checkBoundsAfterContextMenu = false;\n this.waitForTouchHold();\n } else {\n this.state = State.WAITING_FOR_CLICK;\n this.beginPress(ripple);\n }\n }\n\n private pointerUp(ripple: Ripple, ev: PointerEvent) {\n if (!this.isTouch(ev) || !this.shouldReactToEvent(ripple, ev)) {\n return;\n }\n if (this.state === State.HOLDING) {\n this.state = State.WAITING_FOR_CLICK;\n } else if (this.state === State.TOUCH_DELAY) {\n this.state = State.WAITING_FOR_CLICK;\n this.beginPress(ripple);\n }\n }\n\n private pointerCancel(ripple: Ripple, ev: PointerEvent) {\n if (this.shouldReactToEvent(ripple, ev)) {\n this.endPress(ripple);\n }\n }\n\n private pointerEnter(ripple: Ripple, ev: PointerEvent) {\n if (this.shouldReactToEvent(ripple, ev, true)) {\n ripple.beginHover(ev);\n }\n }\n\n private pointerLeave(ripple: Ripple, ev: PointerEvent) {\n if (this.shouldReactToEvent(ripple, ev, true)) {\n ripple.endHover();\n // release a held mouse or pen press that moves outside the element\n if (!this.isTouch(ev) && this.state !== State.INACTIVE) {\n this.endPress(ripple);\n }\n }\n }\n}\n\n/**\n * Connects a Ripple element to a node that drives the interaction\n *\n * @param rippleGetter A function that returns an `md-ripple` element\n * @param simulateKeyboardClick For elements that do not issue a click on\n * keyboard interaction, pass `true` to enable press animations on Enter or\n * Spacebar\n */\nexport const ripple = directive(RippleDirective);"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../../tokens';
|
|
8
|
+
|
|
9
|
+
@function values($exclude-hardcoded-values: false) {
|
|
10
|
+
$state-values: tokens.md-sys-state-values($exclude-hardcoded-values);
|
|
11
|
+
$default-shape: map.get(
|
|
12
|
+
tokens.md-sys-shape-values($exclude-hardcoded-values),
|
|
13
|
+
corner-none
|
|
14
|
+
);
|
|
15
|
+
$default-color: if($exclude-hardcoded-values, null, black);
|
|
16
|
+
// add missing tokens
|
|
17
|
+
$values: map.merge(
|
|
18
|
+
$state-values,
|
|
19
|
+
(
|
|
20
|
+
state-layer-shape: $default-shape,
|
|
21
|
+
focus-state-layer-color: $default-color,
|
|
22
|
+
hover-state-layer-color: $default-color,
|
|
23
|
+
pressed-state-layer-color: $default-color,
|
|
24
|
+
dragged-state-layer-color: $default-color,
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
@return $values;
|
|
29
|
+
}
|
package/ripple/lib/_ripple.scss
CHANGED
|
@@ -6,79 +6,108 @@
|
|
|
6
6
|
// stylelint-disable selector-class-pattern --
|
|
7
7
|
// Selector '.md3-*' should only be used in this project.
|
|
8
8
|
|
|
9
|
-
@
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host([disabled]) {
|
|
16
|
-
@include disabled;
|
|
17
|
-
}
|
|
9
|
+
@use 'sass:map';
|
|
10
|
+
@use '../../sass/theme';
|
|
11
|
+
@use '../../tokens';
|
|
12
|
+
@use './md-comp-ripple';
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.md3-ripple--focused {
|
|
25
|
-
@include focused;
|
|
26
|
-
}
|
|
14
|
+
@mixin theme($tokens) {
|
|
15
|
+
$tokens: theme.validate-theme(md-comp-ripple.values(), $tokens);
|
|
16
|
+
$tokens: theme.create-theme-vars($tokens, ripple);
|
|
27
17
|
|
|
28
|
-
.
|
|
29
|
-
@include pressed;
|
|
30
|
-
}
|
|
18
|
+
@include theme.emit-theme-vars($tokens);
|
|
31
19
|
}
|
|
32
20
|
|
|
33
|
-
@mixin
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
@mixin styles() {
|
|
22
|
+
$tokens: md-comp-ripple.values();
|
|
23
|
+
$tokens: theme.create-theme-vars($tokens, ripple);
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
25
|
+
:host {
|
|
26
|
+
@each $token, $value in $tokens {
|
|
27
|
+
--_#{$token}: #{$value};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
43
30
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
31
|
+
:host {
|
|
32
|
+
display: flex;
|
|
33
|
+
}
|
|
47
34
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
:host([disabled]) {
|
|
36
|
+
opacity: 0;
|
|
37
|
+
}
|
|
51
38
|
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
:host,
|
|
40
|
+
.md3-ripple-surface {
|
|
54
41
|
position: absolute;
|
|
55
|
-
|
|
42
|
+
inset: 0;
|
|
56
43
|
pointer-events: none;
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
// TODO(https://bugs.webkit.org/show_bug.cgi?id=247546)
|
|
46
|
+
// Remove Safari workaround for incorrect ripple overflow when addressed.
|
|
47
|
+
transform: scale(1);
|
|
59
48
|
}
|
|
60
49
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
.md3-ripple-surface {
|
|
51
|
+
border-radius: var(--_state-layer-shape);
|
|
52
|
+
outline: none;
|
|
53
|
+
-webkit-tap-highlight-color: transparent;
|
|
54
|
+
|
|
55
|
+
&::before,
|
|
56
|
+
&::after {
|
|
57
|
+
position: absolute;
|
|
58
|
+
opacity: 0;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
content: '';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&::before {
|
|
64
|
+
background-color: var(--_hover-state-layer-color);
|
|
65
|
+
transition: opacity 15ms linear, background-color 15ms linear;
|
|
66
|
+
inset: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::after {
|
|
70
|
+
// press ripple fade-out
|
|
71
|
+
background: radial-gradient(
|
|
72
|
+
closest-side,
|
|
73
|
+
var(--_pressed-state-layer-color) max(calc(100% - 70px), 65%),
|
|
74
|
+
transparent 100%
|
|
75
|
+
);
|
|
76
|
+
transition: opacity 375ms linear;
|
|
77
|
+
transform-origin: center center;
|
|
78
|
+
}
|
|
64
79
|
}
|
|
65
80
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
transform-origin: center center;
|
|
81
|
+
.md3-ripple--hovered::before {
|
|
82
|
+
background-color: var(--_hover-state-layer-color);
|
|
83
|
+
opacity: var(--_hover-state-layer-opacity);
|
|
70
84
|
}
|
|
71
|
-
}
|
|
72
85
|
|
|
73
|
-
|
|
74
|
-
|
|
86
|
+
.md3-ripple--focused::before {
|
|
87
|
+
background-color: var(--_focus-state-layer-color);
|
|
88
|
+
opacity: var(--_focus-state-layer-opacity);
|
|
75
89
|
transition-duration: 75ms;
|
|
76
90
|
}
|
|
77
|
-
}
|
|
78
91
|
|
|
79
|
-
|
|
80
|
-
&::after {
|
|
92
|
+
.md3-ripple--pressed::after {
|
|
81
93
|
// press ripple fade-in
|
|
94
|
+
opacity: var(--_pressed-state-layer-opacity);
|
|
82
95
|
transition-duration: 105ms;
|
|
83
96
|
}
|
|
97
|
+
|
|
98
|
+
.md3-ripple--unbounded {
|
|
99
|
+
$unbounded: (
|
|
100
|
+
state-layer-shape: map.get(tokens.md-sys-shape-values(), 'corner-full'),
|
|
101
|
+
);
|
|
102
|
+
$unbounded: theme.create-theme-vars($unbounded, ripple);
|
|
103
|
+
|
|
104
|
+
--_state-layer-shape: #{map.get($unbounded, 'state-layer-shape')};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// TODO(b/230630968): create a forced-colors-mode mixin
|
|
108
|
+
@media screen and (forced-colors: active) {
|
|
109
|
+
:host {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
84
113
|
}
|
|
@@ -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{
|
|
7
|
+
export const styles = css `:host{--_dragged-state-layer-opacity: var(--md-ripple-dragged-state-layer-opacity, 0.16);--_focus-state-layer-opacity: var(--md-ripple-focus-state-layer-opacity, 0.12);--_hover-state-layer-opacity: var(--md-ripple-hover-state-layer-opacity, 0.08);--_pressed-state-layer-opacity: var(--md-ripple-pressed-state-layer-opacity, 0.12);--_state-layer-shape: var(--md-ripple-state-layer-shape, 0px);--_focus-state-layer-color: var(--md-ripple-focus-state-layer-color, black);--_hover-state-layer-color: var(--md-ripple-hover-state-layer-color, black);--_pressed-state-layer-color: var(--md-ripple-pressed-state-layer-color, black);--_dragged-state-layer-color: var(--md-ripple-dragged-state-layer-color, black)}:host{display:flex}:host([disabled]){opacity:0}:host,.md3-ripple-surface{position:absolute;inset:0;pointer-events:none;overflow:hidden;transform:scale(1)}.md3-ripple-surface{border-radius:var(--_state-layer-shape);outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.md3-ripple-surface::before,.md3-ripple-surface::after{position:absolute;opacity:0;pointer-events:none;content:""}.md3-ripple-surface::before{background-color:var(--_hover-state-layer-color);transition:opacity 15ms linear,background-color 15ms linear;inset:0}.md3-ripple-surface::after{background:radial-gradient(closest-side, var(--_pressed-state-layer-color) max(100% - 70px, 65%), transparent 100%);transition:opacity 375ms linear;transform-origin:center center}.md3-ripple--hovered::before{background-color:var(--_hover-state-layer-color);opacity:var(--_hover-state-layer-opacity)}.md3-ripple--focused::before{background-color:var(--_focus-state-layer-color);opacity:var(--_focus-state-layer-opacity);transition-duration:75ms}.md3-ripple--pressed::after{opacity:var(--_pressed-state-layer-opacity);transition-duration:105ms}.md3-ripple--unbounded{--_state-layer-shape: var(--md-ripple-state-layer-shape, 9999px)}@media screen and (forced-colors: active){:host{display:none}}/*# sourceMappingURL=ripple-styles.css.map */
|
|
8
8
|
`;
|
|
9
9
|
//# sourceMappingURL=ripple-styles.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ripple-styles.css.js","sourceRoot":"","sources":["ripple-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`:host{
|
|
1
|
+
{"version":3,"file":"ripple-styles.css.js","sourceRoot":"","sources":["ripple-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`:host{--_dragged-state-layer-opacity: var(--md-ripple-dragged-state-layer-opacity, 0.16);--_focus-state-layer-opacity: var(--md-ripple-focus-state-layer-opacity, 0.12);--_hover-state-layer-opacity: var(--md-ripple-hover-state-layer-opacity, 0.08);--_pressed-state-layer-opacity: var(--md-ripple-pressed-state-layer-opacity, 0.12);--_state-layer-shape: var(--md-ripple-state-layer-shape, 0px);--_focus-state-layer-color: var(--md-ripple-focus-state-layer-color, black);--_hover-state-layer-color: var(--md-ripple-hover-state-layer-color, black);--_pressed-state-layer-color: var(--md-ripple-pressed-state-layer-color, black);--_dragged-state-layer-color: var(--md-ripple-dragged-state-layer-color, black)}:host{display:flex}:host([disabled]){opacity:0}:host,.md3-ripple-surface{position:absolute;inset:0;pointer-events:none;overflow:hidden;transform:scale(1)}.md3-ripple-surface{border-radius:var(--_state-layer-shape);outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.md3-ripple-surface::before,.md3-ripple-surface::after{position:absolute;opacity:0;pointer-events:none;content:\"\"}.md3-ripple-surface::before{background-color:var(--_hover-state-layer-color);transition:opacity 15ms linear,background-color 15ms linear;inset:0}.md3-ripple-surface::after{background:radial-gradient(closest-side, var(--_pressed-state-layer-color) max(100% - 70px, 65%), transparent 100%);transition:opacity 375ms linear;transform-origin:center center}.md3-ripple--hovered::before{background-color:var(--_hover-state-layer-color);opacity:var(--_hover-state-layer-opacity)}.md3-ripple--focused::before{background-color:var(--_focus-state-layer-color);opacity:var(--_focus-state-layer-opacity);transition-duration:75ms}.md3-ripple--pressed::after{opacity:var(--_pressed-state-layer-opacity);transition-duration:105ms}.md3-ripple--unbounded{--_state-layer-shape: var(--md-ripple-state-layer-shape, 9999px)}@media screen and (forced-colors: active){:host{display:none}}/*# sourceMappingURL=ripple-styles.css.map */\n`;\n "]}
|
|
@@ -3,14 +3,6 @@
|
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
//
|
|
5
5
|
|
|
6
|
-
// stylelint-disable selector-class-pattern --
|
|
7
|
-
// Selector '.md3-*' should only be used in this project.
|
|
8
|
-
|
|
9
6
|
@use './ripple';
|
|
10
|
-
@use './ripple-theme';
|
|
11
|
-
|
|
12
|
-
@include ripple.static-styles();
|
|
13
7
|
|
|
14
|
-
.
|
|
15
|
-
@include ripple-theme.theme-styles(ripple-theme.values());
|
|
16
|
-
}
|
|
8
|
+
@include ripple.styles;
|
package/ripple/lib/ripple.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class Ripple extends LitElement {
|
|
|
16
16
|
protected rippleSize: string;
|
|
17
17
|
protected rippleScale: string;
|
|
18
18
|
protected initialSize: number;
|
|
19
|
-
protected pressAnimationSignal: import("
|
|
19
|
+
protected pressAnimationSignal: import("../../motion/animation.js").AnimationSignal;
|
|
20
20
|
protected growAnimation: Animation | null;
|
|
21
21
|
protected delayedEndPressHandle: number | null;
|
|
22
22
|
/** @soyTemplate */
|
package/ripple/lib/ripple.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { __decorate, __metadata } from "tslib";
|
|
7
|
-
import { createAnimationSignal, Easing } from '@material/web/motion/animation.js';
|
|
8
7
|
import { html, LitElement } from 'lit';
|
|
9
8
|
import { property, query, state } from 'lit/decorators.js';
|
|
10
9
|
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { createAnimationSignal, Easing } from '../../motion/animation.js';
|
|
11
11
|
const PRESS_GROW_MS = 450;
|
|
12
12
|
const MINIMUM_PRESS_MS = 225;
|
|
13
13
|
const INITIAL_ORIGIN_SCALE = 0.2;
|
package/ripple/lib/ripple.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ripple.js","sourceRoot":"","sources":["ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,qBAAqB,EAAE,MAAM,EAAC,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAC,IAAI,EAAE,UAAU,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAY,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAEhE,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AACvC,MAAM,YAAY,GAAG,SAAS,CAAC;AAC/B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E;;uCAA2B;AAC1B;IAAR,KAAK,EAAE;;uCAA2B;AAC1B;IAAR,KAAK,EAAE;;uCAA2B","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {createAnimationSignal, Easing} from '@material/web/motion/animation.js';\nimport {html, LitElement, PropertyValues, TemplateResult} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport {ClassInfo, classMap} from 'lit/directives/class-map.js';\n\nconst PRESS_GROW_MS = 450;\nconst MINIMUM_PRESS_MS = 225;\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst PADDING = 10;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\nconst PRESS_PSEUDO = '::after';\nconst ANIMATION_FILL = 'forwards';\n\n/** @soyCompatible */\nexport class Ripple extends LitElement {\n @query('.md3-ripple-surface') mdRoot!: HTMLElement;\n\n @property({type: Boolean}) unbounded = false;\n @property({type: Boolean, reflect: true}) disabled = false;\n\n @state() protected hovered = false;\n @state() protected focused = false;\n @state() protected pressed = false;\n\n protected rippleSize = '';\n protected rippleScale = '';\n protected initialSize = 0;\n protected pressAnimationSignal = createAnimationSignal();\n protected growAnimation: Animation|null = null;\n protected delayedEndPressHandle: number|null = null;\n\n /** @soyTemplate */\n protected override render(): TemplateResult {\n return html`<div class=\"md3-ripple-surface ${\n classMap(this.getRenderRippleClasses())}\"></div>`;\n }\n\n /** @soyTemplate */\n protected getRenderRippleClasses(): ClassInfo {\n return {\n 'md3-ripple--hovered': this.hovered,\n 'md3-ripple--focused': this.focused,\n 'md3-ripple--pressed': this.pressed,\n 'md3-ripple--unbounded': this.unbounded,\n };\n }\n\n protected override update(changedProps: PropertyValues<this>) {\n if (changedProps.has('disabled') && this.disabled) {\n this.endHover();\n this.endFocus();\n this.endPress();\n }\n super.update(changedProps);\n }\n\n protected getDimensions() {\n return (this.parentElement ?? this).getBoundingClientRect();\n }\n\n protected determineRippleSize() {\n const {height, width} = this.getDimensions();\n const maxDim = Math.max(height, width);\n const softEdgeSize =\n Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);\n\n\n let maxRadius = maxDim;\n let initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n maxRadius = hypotenuse + PADDING;\n\n // ensure `initialSize` is even for unbounded\n if (this.unbounded) {\n initialSize = initialSize - (initialSize % 2);\n }\n\n this.initialSize = initialSize;\n this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n this.rippleSize = `${this.initialSize}px`;\n }\n\n protected getNormalizedPointerEventCoords(pointerEvent: PointerEvent):\n {x: number, y: number} {\n const {scrollX, scrollY} = window;\n const {left, top} = this.getDimensions();\n const documentX = scrollX + left;\n const documentY = scrollY + top;\n const {pageX, pageY} = pointerEvent;\n return {x: pageX - documentX, y: pageY - documentY};\n }\n\n protected getTranslationCoordinates(positionEvent?: Event|null) {\n const {height, width} = this.getDimensions();\n // end in the center\n const endPoint = {\n x: (width - this.initialSize) / 2,\n y: (height - this.initialSize) / 2,\n };\n\n let startPoint;\n if (positionEvent instanceof PointerEvent) {\n startPoint = this.getNormalizedPointerEventCoords(positionEvent);\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2,\n };\n }\n\n // center around start point\n startPoint = {\n x: startPoint.x - (this.initialSize / 2),\n y: startPoint.y - (this.initialSize / 2),\n };\n\n return {startPoint, endPoint};\n }\n\n protected startPressAnimation(positionEvent?: Event|null) {\n this.determineRippleSize();\n const {startPoint, endPoint} =\n this.getTranslationCoordinates(positionEvent);\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n\n const signal = this.pressAnimationSignal.start();\n\n const growAnimation = this.mdRoot.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [this.rippleSize, this.rippleSize],\n width: [this.rippleSize, this.rippleSize],\n transform: [\n `translate(${translateStart}) scale(1)`,\n `translate(${translateEnd}) scale(${this.rippleScale})`\n ],\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: Easing.STANDARD,\n fill: ANIMATION_FILL\n });\n\n growAnimation.addEventListener('finish', () => {\n this.pressAnimationSignal.finish();\n this.growAnimation = null;\n });\n\n signal.addEventListener('abort', () => {\n growAnimation.cancel();\n this.growAnimation = null;\n });\n\n this.growAnimation = growAnimation;\n }\n\n /**\n * @deprecated Use beginHover\n */\n startHover(hoverEvent?: Event) {\n this.beginHover(hoverEvent);\n }\n\n beginHover(hoverEvent?: Event) {\n if ((hoverEvent as PointerEvent)?.pointerType !== 'touch') {\n this.hovered = true;\n }\n }\n\n endHover() {\n this.hovered = false;\n }\n\n /**\n * @deprecated Use beginFocus\n */\n startFocus() {\n this.beginFocus();\n }\n\n beginFocus() {\n this.focused = true;\n }\n\n endFocus() {\n this.focused = false;\n }\n\n /**\n * @deprecated Use beginPress\n */\n startPress(positionEvent?: Event|null) {\n this.beginPress(positionEvent);\n }\n\n beginPress(positionEvent?: Event|null) {\n this.pressed = true;\n if (this.delayedEndPressHandle !== null) {\n clearTimeout(this.delayedEndPressHandle);\n this.delayedEndPressHandle = null;\n }\n this.startPressAnimation(positionEvent);\n }\n\n endPress() {\n const pressAnimationPlayState = this.growAnimation?.currentTime ?? Infinity;\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false;\n } else {\n this.delayedEndPressHandle = setTimeout(() => {\n this.pressed = false;\n this.delayedEndPressHandle = null;\n }, MINIMUM_PRESS_MS - pressAnimationPlayState);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ripple.js","sourceRoot":"","sources":["ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAE,KA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C,GAAG,EAAE;gBAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;gBACrB,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;YACpC,CAAC,EAAE,gBAAgB,GAAG,uBAAuB,CAAC,CAAC;SAChD;IACH,CAAC;CACF;AA5M+B;IAA7B,KAAK,CAAC,qBAAqB,CAAC;8BAAU,WAAW;sCAAC;AAExB;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;yCAAmB;AACH;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;wCAAkB;AAElD;IAAR,KAAK,EAAE;;uCAA2B;AAC1B;IAAR,KAAK,EAAE;;uCAA2B;AAC1B;IAAR,KAAK,EAAE;;uCAA2B","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, LitElement, PropertyValues, TemplateResult} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport {ClassInfo, classMap} from 'lit/directives/class-map.js';\n\nimport {createAnimationSignal, Easing} from '../../motion/animation.js';\n\nconst PRESS_GROW_MS = 450;\nconst MINIMUM_PRESS_MS = 225;\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst PADDING = 10;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\nconst PRESS_PSEUDO = '::after';\nconst ANIMATION_FILL = 'forwards';\n\n/** @soyCompatible */\nexport class Ripple extends LitElement {\n @query('.md3-ripple-surface') mdRoot!: HTMLElement;\n\n @property({type: Boolean}) unbounded = false;\n @property({type: Boolean, reflect: true}) disabled = false;\n\n @state() protected hovered = false;\n @state() protected focused = false;\n @state() protected pressed = false;\n\n protected rippleSize = '';\n protected rippleScale = '';\n protected initialSize = 0;\n protected pressAnimationSignal = createAnimationSignal();\n protected growAnimation: Animation|null = null;\n protected delayedEndPressHandle: number|null = null;\n\n /** @soyTemplate */\n protected override render(): TemplateResult {\n return html`<div class=\"md3-ripple-surface ${\n classMap(this.getRenderRippleClasses())}\"></div>`;\n }\n\n /** @soyTemplate */\n protected getRenderRippleClasses(): ClassInfo {\n return {\n 'md3-ripple--hovered': this.hovered,\n 'md3-ripple--focused': this.focused,\n 'md3-ripple--pressed': this.pressed,\n 'md3-ripple--unbounded': this.unbounded,\n };\n }\n\n protected override update(changedProps: PropertyValues<this>) {\n if (changedProps.has('disabled') && this.disabled) {\n this.endHover();\n this.endFocus();\n this.endPress();\n }\n super.update(changedProps);\n }\n\n protected getDimensions() {\n return (this.parentElement ?? this).getBoundingClientRect();\n }\n\n protected determineRippleSize() {\n const {height, width} = this.getDimensions();\n const maxDim = Math.max(height, width);\n const softEdgeSize =\n Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);\n\n\n let maxRadius = maxDim;\n let initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n maxRadius = hypotenuse + PADDING;\n\n // ensure `initialSize` is even for unbounded\n if (this.unbounded) {\n initialSize = initialSize - (initialSize % 2);\n }\n\n this.initialSize = initialSize;\n this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n this.rippleSize = `${this.initialSize}px`;\n }\n\n protected getNormalizedPointerEventCoords(pointerEvent: PointerEvent):\n {x: number, y: number} {\n const {scrollX, scrollY} = window;\n const {left, top} = this.getDimensions();\n const documentX = scrollX + left;\n const documentY = scrollY + top;\n const {pageX, pageY} = pointerEvent;\n return {x: pageX - documentX, y: pageY - documentY};\n }\n\n protected getTranslationCoordinates(positionEvent?: Event|null) {\n const {height, width} = this.getDimensions();\n // end in the center\n const endPoint = {\n x: (width - this.initialSize) / 2,\n y: (height - this.initialSize) / 2,\n };\n\n let startPoint;\n if (positionEvent instanceof PointerEvent) {\n startPoint = this.getNormalizedPointerEventCoords(positionEvent);\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2,\n };\n }\n\n // center around start point\n startPoint = {\n x: startPoint.x - (this.initialSize / 2),\n y: startPoint.y - (this.initialSize / 2),\n };\n\n return {startPoint, endPoint};\n }\n\n protected startPressAnimation(positionEvent?: Event|null) {\n this.determineRippleSize();\n const {startPoint, endPoint} =\n this.getTranslationCoordinates(positionEvent);\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n\n const signal = this.pressAnimationSignal.start();\n\n const growAnimation = this.mdRoot.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [this.rippleSize, this.rippleSize],\n width: [this.rippleSize, this.rippleSize],\n transform: [\n `translate(${translateStart}) scale(1)`,\n `translate(${translateEnd}) scale(${this.rippleScale})`\n ],\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: Easing.STANDARD,\n fill: ANIMATION_FILL\n });\n\n growAnimation.addEventListener('finish', () => {\n this.pressAnimationSignal.finish();\n this.growAnimation = null;\n });\n\n signal.addEventListener('abort', () => {\n growAnimation.cancel();\n this.growAnimation = null;\n });\n\n this.growAnimation = growAnimation;\n }\n\n /**\n * @deprecated Use beginHover\n */\n startHover(hoverEvent?: Event) {\n this.beginHover(hoverEvent);\n }\n\n beginHover(hoverEvent?: Event) {\n if ((hoverEvent as PointerEvent)?.pointerType !== 'touch') {\n this.hovered = true;\n }\n }\n\n endHover() {\n this.hovered = false;\n }\n\n /**\n * @deprecated Use beginFocus\n */\n startFocus() {\n this.beginFocus();\n }\n\n beginFocus() {\n this.focused = true;\n }\n\n endFocus() {\n this.focused = false;\n }\n\n /**\n * @deprecated Use beginPress\n */\n startPress(positionEvent?: Event|null) {\n this.beginPress(positionEvent);\n }\n\n beginPress(positionEvent?: Event|null) {\n this.pressed = true;\n if (this.delayedEndPressHandle !== null) {\n clearTimeout(this.delayedEndPressHandle);\n this.delayedEndPressHandle = null;\n }\n this.startPressAnimation(positionEvent);\n }\n\n endPress() {\n const pressAnimationPlayState = this.growAnimation?.currentTime ?? Infinity;\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false;\n } else {\n this.delayedEndPressHandle = setTimeout(() => {\n this.pressed = false;\n this.delayedEndPressHandle = null;\n }, MINIMUM_PRESS_MS - pressAnimationPlayState);\n }\n }\n}\n"]}
|