@material/web 0.1.0-alpha.0
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/LICENSE +202 -0
- package/README.md +34 -0
- package/actionelement/action-element.d.ts +79 -0
- package/actionelement/action-element.js +97 -0
- package/actionelement/action-element.js.map +1 -0
- package/badge/badge.d.ts +19 -0
- package/badge/badge.js +22 -0
- package/badge/badge.js.map +1 -0
- package/badge/lib/_badge-theme.scss +118 -0
- package/badge/lib/_badge.scss +41 -0
- package/badge/lib/badge-styles.css.d.ts +1 -0
- package/badge/lib/badge-styles.css.js +9 -0
- package/badge/lib/badge-styles.css.js.map +1 -0
- package/badge/lib/badge-styles.scss +16 -0
- package/badge/lib/badge.d.ts +15 -0
- package/badge/lib/badge.js +31 -0
- package/badge/lib/badge.js.map +1 -0
- package/button/_elevated-button.scss +8 -0
- package/button/_filled-button.scss +8 -0
- package/button/_outlined-button.scss +8 -0
- package/button/_text-button.scss +8 -0
- package/button/_tonal-button.scss +8 -0
- package/button/elevated-button.d.ts +19 -0
- package/button/elevated-button.js +24 -0
- package/button/elevated-button.js.map +1 -0
- package/button/elevated-link-button.d.ts +19 -0
- package/button/elevated-link-button.js +24 -0
- package/button/elevated-link-button.js.map +1 -0
- package/button/filled-button.d.ts +19 -0
- package/button/filled-button.js +23 -0
- package/button/filled-button.js.map +1 -0
- package/button/filled-link-button.d.ts +19 -0
- package/button/filled-link-button.js +23 -0
- package/button/filled-link-button.js.map +1 -0
- package/button/harness.d.ts +13 -0
- package/button/harness.js +16 -0
- package/button/harness.js.map +1 -0
- package/button/lib/_button-theme.scss +204 -0
- package/button/lib/_button.scss +88 -0
- package/button/lib/_elevated-button-theme.scss +53 -0
- package/button/lib/_elevated-button.scss +8 -0
- package/button/lib/_elevation-theme.scss +94 -0
- package/button/lib/_filled-button-theme.scss +53 -0
- package/button/lib/_filled-button.scss +8 -0
- package/button/lib/_icon-theme.scss +67 -0
- package/button/lib/_icon.scss +49 -0
- package/button/lib/_outlined-button-theme.scss +112 -0
- package/button/lib/_outlined-button.scss +25 -0
- package/button/lib/_text-button-theme.scss +57 -0
- package/button/lib/_text-button.scss +8 -0
- package/button/lib/_tonal-button-theme.scss +53 -0
- package/button/lib/_tonal-button.scss +8 -0
- package/button/lib/_touch-target.scss +16 -0
- package/button/lib/button.d.ts +76 -0
- package/button/lib/button.js +238 -0
- package/button/lib/button.js.map +1 -0
- package/button/lib/elevated-button.d.ts +15 -0
- package/button/lib/elevated-button.js +22 -0
- package/button/lib/elevated-button.js.map +1 -0
- package/button/lib/elevated-link-button.d.ts +15 -0
- package/button/lib/elevated-link-button.js +22 -0
- package/button/lib/elevated-link-button.js.map +1 -0
- package/button/lib/elevated-styles.css.d.ts +1 -0
- package/button/lib/elevated-styles.css.js +9 -0
- package/button/lib/elevated-styles.css.js.map +1 -0
- package/button/lib/elevated-styles.scss +18 -0
- package/button/lib/filled-button.d.ts +12 -0
- package/button/lib/filled-button.js +17 -0
- package/button/lib/filled-button.js.map +1 -0
- package/button/lib/filled-link-button.d.ts +12 -0
- package/button/lib/filled-link-button.js +17 -0
- package/button/lib/filled-link-button.js.map +1 -0
- package/button/lib/filled-styles.css.d.ts +1 -0
- package/button/lib/filled-styles.css.js +9 -0
- package/button/lib/filled-styles.css.js.map +1 -0
- package/button/lib/filled-styles.scss +16 -0
- package/button/lib/link-button.d.ts +17 -0
- package/button/lib/link-button.js +53 -0
- package/button/lib/link-button.js.map +1 -0
- package/button/lib/outlined-button.d.ts +15 -0
- package/button/lib/outlined-button.js +22 -0
- package/button/lib/outlined-button.js.map +1 -0
- package/button/lib/outlined-link-button.d.ts +15 -0
- package/button/lib/outlined-link-button.js +22 -0
- package/button/lib/outlined-link-button.js.map +1 -0
- package/button/lib/outlined-styles.css.d.ts +1 -0
- package/button/lib/outlined-styles.css.js +9 -0
- package/button/lib/outlined-styles.css.js.map +1 -0
- package/button/lib/outlined-styles.scss +18 -0
- package/button/lib/shared-styles.css.d.ts +1 -0
- package/button/lib/shared-styles.css.js +9 -0
- package/button/lib/shared-styles.css.js.map +1 -0
- package/button/lib/shared-styles.scss +12 -0
- package/button/lib/state.d.ts +10 -0
- package/button/lib/state.js +7 -0
- package/button/lib/state.js.map +1 -0
- package/button/lib/text-button.d.ts +12 -0
- package/button/lib/text-button.js +17 -0
- package/button/lib/text-button.js.map +1 -0
- package/button/lib/text-link-button.d.ts +12 -0
- package/button/lib/text-link-button.js +17 -0
- package/button/lib/text-link-button.js.map +1 -0
- package/button/lib/text-styles.css.d.ts +1 -0
- package/button/lib/text-styles.css.js +9 -0
- package/button/lib/text-styles.css.js.map +1 -0
- package/button/lib/text-styles.scss +16 -0
- package/button/lib/tonal-button.d.ts +12 -0
- package/button/lib/tonal-button.js +17 -0
- package/button/lib/tonal-button.js.map +1 -0
- package/button/lib/tonal-link-button.d.ts +12 -0
- package/button/lib/tonal-link-button.js +17 -0
- package/button/lib/tonal-link-button.js.map +1 -0
- package/button/lib/tonal-styles.css.d.ts +1 -0
- package/button/lib/tonal-styles.css.js +9 -0
- package/button/lib/tonal-styles.css.js.map +1 -0
- package/button/lib/tonal-styles.scss +16 -0
- package/button/outlined-button.d.ts +19 -0
- package/button/outlined-button.js +23 -0
- package/button/outlined-button.js.map +1 -0
- package/button/outlined-link-button.d.ts +19 -0
- package/button/outlined-link-button.js +23 -0
- package/button/outlined-link-button.js.map +1 -0
- package/button/text-button.d.ts +19 -0
- package/button/text-button.js +23 -0
- package/button/text-button.js.map +1 -0
- package/button/text-link-button.d.ts +19 -0
- package/button/text-link-button.js +23 -0
- package/button/text-link-button.js.map +1 -0
- package/button/tonal-button.d.ts +19 -0
- package/button/tonal-button.js +23 -0
- package/button/tonal-button.js.map +1 -0
- package/button/tonal-link-button.d.ts +19 -0
- package/button/tonal-link-button.js +23 -0
- package/button/tonal-link-button.js.map +1 -0
- package/checkbox/_checkbox.scss +1 -0
- package/checkbox/checkbox.d.ts +15 -0
- package/checkbox/checkbox.js +18 -0
- package/checkbox/checkbox.js.map +1 -0
- package/checkbox/harness.d.ts +13 -0
- package/checkbox/harness.js +16 -0
- package/checkbox/harness.js.map +1 -0
- package/checkbox/lib/_checkbox-theme.scss +532 -0
- package/checkbox/lib/_checkbox.scss +424 -0
- package/checkbox/lib/checkbox-styles.css.d.ts +1 -0
- package/checkbox/lib/checkbox-styles.css.js +9 -0
- package/checkbox/lib/checkbox-styles.css.js.map +1 -0
- package/checkbox/lib/checkbox-styles.scss +15 -0
- package/checkbox/lib/checkbox.d.ts +56 -0
- package/checkbox/lib/checkbox.js +238 -0
- package/checkbox/lib/checkbox.js.map +1 -0
- package/chips/action/lib/action.d.ts +34 -0
- package/chips/action/lib/action.js +83 -0
- package/chips/action/lib/action.js.map +1 -0
- package/chips/action/lib/adapter.d.ts +21 -0
- package/chips/action/lib/adapter.js +7 -0
- package/chips/action/lib/adapter.js.map +1 -0
- package/chips/action/lib/constants.d.ts +62 -0
- package/chips/action/lib/constants.js +69 -0
- package/chips/action/lib/constants.js.map +1 -0
- package/chips/action/lib/foundation.d.ts +31 -0
- package/chips/action/lib/foundation.js +151 -0
- package/chips/action/lib/foundation.js.map +1 -0
- package/chips/action/lib/link-action.d.ts +17 -0
- package/chips/action/lib/link-action.js +43 -0
- package/chips/action/lib/link-action.js.map +1 -0
- package/chips/action/lib/presentational-action.d.ts +15 -0
- package/chips/action/lib/presentational-action.js +30 -0
- package/chips/action/lib/presentational-action.js.map +1 -0
- package/chips/action/lib/primary-action.d.ts +29 -0
- package/chips/action/lib/primary-action.js +83 -0
- package/chips/action/lib/primary-action.js.map +1 -0
- package/chips/action/lib/primary-foundation.d.ts +16 -0
- package/chips/action/lib/primary-foundation.js +24 -0
- package/chips/action/lib/primary-foundation.js.map +1 -0
- package/chips/action/lib/selectable-action.d.ts +17 -0
- package/chips/action/lib/selectable-action.js +57 -0
- package/chips/action/lib/selectable-action.js.map +1 -0
- package/chips/action/lib/trailing-action.d.ts +20 -0
- package/chips/action/lib/trailing-action.js +62 -0
- package/chips/action/lib/trailing-action.js.map +1 -0
- package/chips/action/lib/trailing-foundation.d.ts +16 -0
- package/chips/action/lib/trailing-foundation.js +23 -0
- package/chips/action/lib/trailing-foundation.js.map +1 -0
- package/chips/action/lib/types.d.ts +23 -0
- package/chips/action/lib/types.js +7 -0
- package/chips/action/lib/types.js.map +1 -0
- package/chips/chip/lib/_assist-chip-theme.scss +101 -0
- package/chips/chip/lib/_chip-theme.scss +1329 -0
- package/chips/chip/lib/_chip.scss +427 -0
- package/chips/chip/lib/_filter-chip-theme.scss +132 -0
- package/chips/chip/lib/_input-chip-theme.scss +103 -0
- package/chips/chip/lib/_suggestion-chip-theme.scss +94 -0
- package/chips/chip/lib/adapter.d.ts +50 -0
- package/chips/chip/lib/adapter.js +7 -0
- package/chips/chip/lib/adapter.js.map +1 -0
- package/chips/chip/lib/constants.d.ts +43 -0
- package/chips/chip/lib/constants.js +48 -0
- package/chips/chip/lib/constants.js.map +1 -0
- package/chips/chip/lib/foundation.d.ts +41 -0
- package/chips/chip/lib/foundation.js +256 -0
- package/chips/chip/lib/foundation.js.map +1 -0
- package/chips/chip/lib/types.d.ts +42 -0
- package/chips/chip/lib/types.js +7 -0
- package/chips/chip/lib/types.js.map +1 -0
- package/chips/chipset/lib/_chip-set-theme.scss +48 -0
- package/chips/chipset/lib/_chip-set.scss +46 -0
- package/chips/chipset/lib/adapter.d.ts +45 -0
- package/chips/chipset/lib/adapter.js +7 -0
- package/chips/chipset/lib/adapter.js.map +1 -0
- package/chips/chipset/lib/constants.d.ts +26 -0
- package/chips/chipset/lib/constants.js +30 -0
- package/chips/chipset/lib/constants.js.map +1 -0
- package/chips/chipset/lib/foundation.d.ts +68 -0
- package/chips/chipset/lib/foundation.js +316 -0
- package/chips/chipset/lib/foundation.js.map +1 -0
- package/chips/chipset/lib/types.d.ts +41 -0
- package/chips/chipset/lib/types.js +7 -0
- package/chips/chipset/lib/types.js.map +1 -0
- package/compat/animation/animationframe.d.ts +31 -0
- package/compat/animation/animationframe.js +65 -0
- package/compat/animation/animationframe.js.map +1 -0
- package/compat/base/aria-property.d.ts +39 -0
- package/compat/base/aria-property.js +93 -0
- package/compat/base/aria-property.js.map +1 -0
- package/compat/base/foundation.d.ts +44 -0
- package/compat/base/foundation.js +45 -0
- package/compat/base/foundation.js.map +1 -0
- package/compat/base/observer.d.ts +16 -0
- package/compat/base/observer.js +43 -0
- package/compat/base/observer.js.map +1 -0
- package/compat/base/utils.d.ts +7 -0
- package/compat/base/utils.js +39 -0
- package/compat/base/utils.js.map +1 -0
- package/compat/density/_density.scss +106 -0
- package/compat/dom/keyboard.d.ts +33 -0
- package/compat/dom/keyboard.js +109 -0
- package/compat/dom/keyboard.js.map +1 -0
- package/compat/theme/_color-palette.scss +277 -0
- package/compat/theme/_css.scss +92 -0
- package/compat/theme/_custom-properties.scss +309 -0
- package/compat/theme/_gss.scss +45 -0
- package/compat/theme/_keys.scss +507 -0
- package/compat/theme/_map-ext.scss +68 -0
- package/compat/theme/_replace.scss +108 -0
- package/compat/theme/_selector-ext.scss +522 -0
- package/compat/theme/_shadow-dom.scss +474 -0
- package/compat/theme/_state.scss +752 -0
- package/compat/theme/_theme-color.scss +344 -0
- package/compat/theme/_theme.scss +334 -0
- package/compat/touchtarget/_touch-target.scss +56 -0
- package/controller/action-controller.d.ts +147 -0
- package/controller/action-controller.js +286 -0
- package/controller/action-controller.js.map +1 -0
- package/controller/events.d.ts +27 -0
- package/controller/events.js +40 -0
- package/controller/events.js.map +1 -0
- package/controller/form-controller.d.ts +59 -0
- package/controller/form-controller.js +68 -0
- package/controller/form-controller.js.map +1 -0
- package/controller/foundation.d.ts +24 -0
- package/controller/foundation.js +18 -0
- package/controller/foundation.js.map +1 -0
- package/controller/observer-foundation.d.ts +25 -0
- package/controller/observer-foundation.js +37 -0
- package/controller/observer-foundation.js.map +1 -0
- package/controller/observer.d.ts +52 -0
- package/controller/observer.js +149 -0
- package/controller/observer.js.map +1 -0
- package/controller/string-converter.d.ts +9 -0
- package/controller/string-converter.js +14 -0
- package/controller/string-converter.js.map +1 -0
- package/decorators/aria-property.d.ts +32 -0
- package/decorators/aria-property.js +99 -0
- package/decorators/aria-property.js.map +1 -0
- package/decorators/bound.d.ts +40 -0
- package/decorators/bound.js +49 -0
- package/decorators/bound.js.map +1 -0
- package/elevation/lib/_elevation-overlay-theme.scss +31 -0
- package/elevation/lib/_elevation-overlay.scss +18 -0
- package/elevation/lib/_elevation-theme.scss +88 -0
- package/elevation/lib/_surface.scss +18 -0
- package/elevation/lib/elevation-overlay-styles.css.d.ts +1 -0
- package/elevation/lib/elevation-overlay-styles.css.js +9 -0
- package/elevation/lib/elevation-overlay-styles.css.js.map +1 -0
- package/elevation/lib/elevation-overlay-styles.scss +9 -0
- package/fab/_fab-extended.scss +11 -0
- package/fab/_fab.scss +20 -0
- package/fab/fab-extended.d.ts +23 -0
- package/fab/fab-extended.js +30 -0
- package/fab/fab-extended.js.map +1 -0
- package/fab/fab.d.ts +23 -0
- package/fab/fab.js +30 -0
- package/fab/fab.js.map +1 -0
- package/fab/harness.d.ts +14 -0
- package/fab/harness.js +16 -0
- package/fab/harness.js.map +1 -0
- package/fab/lib/_fab-extended-theme.scss +108 -0
- package/fab/lib/_fab-extended.scss +39 -0
- package/fab/lib/_fab-shared-theme.scss +202 -0
- package/fab/lib/_fab-shared.scss +114 -0
- package/fab/lib/_fab-theme.scss +107 -0
- package/fab/lib/_fab.scss +17 -0
- package/fab/lib/fab-extended-styles.css.d.ts +1 -0
- package/fab/lib/fab-extended-styles.css.js +9 -0
- package/fab/lib/fab-extended-styles.css.js.map +1 -0
- package/fab/lib/fab-extended-styles.scss +16 -0
- package/fab/lib/fab-extended.d.ts +19 -0
- package/fab/lib/fab-extended.js +28 -0
- package/fab/lib/fab-extended.js.map +1 -0
- package/fab/lib/fab-shared-styles.css.d.ts +1 -0
- package/fab/lib/fab-shared-styles.css.js +9 -0
- package/fab/lib/fab-shared-styles.css.js.map +1 -0
- package/fab/lib/fab-shared-styles.scss +8 -0
- package/fab/lib/fab-shared.d.ts +50 -0
- package/fab/lib/fab-shared.js +138 -0
- package/fab/lib/fab-shared.js.map +1 -0
- package/fab/lib/fab-styles.css.d.ts +1 -0
- package/fab/lib/fab-styles.css.js +9 -0
- package/fab/lib/fab-styles.css.js.map +1 -0
- package/fab/lib/fab-styles.scss +16 -0
- package/fab/lib/fab.d.ts +17 -0
- package/fab/lib/fab.js +23 -0
- package/fab/lib/fab.js.map +1 -0
- package/field/_filled-field.scss +8 -0
- package/field/_outlined-field.scss +8 -0
- package/field/filled-field.d.ts +19 -0
- package/field/filled-field.js +23 -0
- package/field/filled-field.js.map +1 -0
- package/field/harness.d.ts +16 -0
- package/field/harness.js +29 -0
- package/field/harness.js.map +1 -0
- package/field/lib/_content-theme.scss +80 -0
- package/field/lib/_content.scss +63 -0
- package/field/lib/_field-theme.scss +15 -0
- package/field/lib/_field.scss +52 -0
- package/field/lib/_filled-field-theme.scss +382 -0
- package/field/lib/_filled-field.scss +129 -0
- package/field/lib/_label-theme.scss +123 -0
- package/field/lib/_label.scss +49 -0
- package/field/lib/_outlined-field-theme.scss +311 -0
- package/field/lib/_outlined-field.scss +194 -0
- package/field/lib/_supporting-text-theme.scss +107 -0
- package/field/lib/_supporting-text.scss +20 -0
- package/field/lib/field.d.ts +56 -0
- package/field/lib/field.js +253 -0
- package/field/lib/field.js.map +1 -0
- package/field/lib/filled-field.d.ts +23 -0
- package/field/lib/filled-field.js +83 -0
- package/field/lib/filled-field.js.map +1 -0
- package/field/lib/filled-styles.css.d.ts +1 -0
- package/field/lib/filled-styles.css.js +9 -0
- package/field/lib/filled-styles.css.js.map +1 -0
- package/field/lib/filled-styles.scss +16 -0
- package/field/lib/outlined-field.d.ts +19 -0
- package/field/lib/outlined-field.js +46 -0
- package/field/lib/outlined-field.js.map +1 -0
- package/field/lib/outlined-styles.css.d.ts +1 -0
- package/field/lib/outlined-styles.css.js +9 -0
- package/field/lib/outlined-styles.css.js.map +1 -0
- package/field/lib/outlined-styles.scss +16 -0
- package/field/lib/shared-styles.css.d.ts +1 -0
- package/field/lib/shared-styles.css.js +9 -0
- package/field/lib/shared-styles.css.js.map +1 -0
- package/field/lib/shared-styles.scss +14 -0
- package/field/outlined-field.d.ts +19 -0
- package/field/outlined-field.js +23 -0
- package/field/outlined-field.js.map +1 -0
- package/focus/focus-ring.d.ts +19 -0
- package/focus/focus-ring.js +22 -0
- package/focus/focus-ring.js.map +1 -0
- package/focus/lib/_focus-ring-theme.scss +89 -0
- package/focus/lib/_focus-ring.scss +41 -0
- package/focus/lib/focus-ring-styles.css.d.ts +1 -0
- package/focus/lib/focus-ring-styles.css.js +9 -0
- package/focus/lib/focus-ring-styles.css.js.map +1 -0
- package/focus/lib/focus-ring-styles.scss +16 -0
- package/focus/lib/focus-ring.d.ts +15 -0
- package/focus/lib/focus-ring.js +31 -0
- package/focus/lib/focus-ring.js.map +1 -0
- package/focus/strong-focus.d.ts +43 -0
- package/focus/strong-focus.js +84 -0
- package/focus/strong-focus.js.map +1 -0
- package/formfield/formfield.d.ts +19 -0
- package/formfield/formfield.js +22 -0
- package/formfield/formfield.js.map +1 -0
- package/formfield/lib/_formfield-theme.scss +41 -0
- package/formfield/lib/_formfield.scss +40 -0
- package/formfield/lib/formfield-styles.css.d.ts +1 -0
- package/formfield/lib/formfield-styles.css.js +9 -0
- package/formfield/lib/formfield-styles.css.js.map +1 -0
- package/formfield/lib/formfield-styles.scss +16 -0
- package/formfield/lib/formfield.d.ts +22 -0
- package/formfield/lib/formfield.js +73 -0
- package/formfield/lib/formfield.js.map +1 -0
- package/icon/icon.d.ts +19 -0
- package/icon/icon.js +22 -0
- package/icon/icon.js.map +1 -0
- package/icon/lib/icon-styles.css.d.ts +1 -0
- package/icon/lib/icon-styles.css.js +9 -0
- package/icon/lib/icon-styles.css.js.map +1 -0
- package/icon/lib/icon-styles.scss +25 -0
- package/icon/lib/icon.d.ts +11 -0
- package/icon/lib/icon.js +14 -0
- package/icon/lib/icon.js.map +1 -0
- package/iconbutton/_filled-icon-button.scss +7 -0
- package/iconbutton/_outlined-icon-button.scss +7 -0
- package/iconbutton/_standard-icon-button.scss +7 -0
- package/iconbutton/filled-icon-button-toggle.d.ts +19 -0
- package/iconbutton/filled-icon-button-toggle.js +28 -0
- package/iconbutton/filled-icon-button-toggle.js.map +1 -0
- package/iconbutton/filled-icon-button.d.ts +19 -0
- package/iconbutton/filled-icon-button.js +27 -0
- package/iconbutton/filled-icon-button.js.map +1 -0
- package/iconbutton/filled-link-icon-button.d.ts +19 -0
- package/iconbutton/filled-link-icon-button.js +27 -0
- package/iconbutton/filled-link-icon-button.js.map +1 -0
- package/iconbutton/filled-tonal-icon-button-toggle.d.ts +19 -0
- package/iconbutton/filled-tonal-icon-button-toggle.js +28 -0
- package/iconbutton/filled-tonal-icon-button-toggle.js.map +1 -0
- package/iconbutton/filled-tonal-icon-button.d.ts +19 -0
- package/iconbutton/filled-tonal-icon-button.js +27 -0
- package/iconbutton/filled-tonal-icon-button.js.map +1 -0
- package/iconbutton/filled-tonal-link-icon-button.d.ts +19 -0
- package/iconbutton/filled-tonal-link-icon-button.js +27 -0
- package/iconbutton/filled-tonal-link-icon-button.js.map +1 -0
- package/iconbutton/harness.d.ts +14 -0
- package/iconbutton/harness.js +16 -0
- package/iconbutton/harness.js.map +1 -0
- package/iconbutton/lib/_filled-icon-button-theme.scss +138 -0
- package/iconbutton/lib/_filled-icon-button.scss +8 -0
- package/iconbutton/lib/_filled-tonal-icon-button-theme.scss +144 -0
- package/iconbutton/lib/_filled-tonal-icon-button.scss +8 -0
- package/iconbutton/lib/_icon-button-theme.scss +163 -0
- package/iconbutton/lib/_icon-button.scss +91 -0
- package/iconbutton/lib/_outlined-icon-button-theme.scss +187 -0
- package/iconbutton/lib/_outlined-icon-button.scss +30 -0
- package/iconbutton/lib/_standard-icon-button-theme.scss +107 -0
- package/iconbutton/lib/_standard-icon-button.scss +13 -0
- package/iconbutton/lib/filled-styles.css.d.ts +1 -0
- package/iconbutton/lib/filled-styles.css.js +9 -0
- package/iconbutton/lib/filled-styles.css.js.map +1 -0
- package/iconbutton/lib/filled-styles.scss +18 -0
- package/iconbutton/lib/filled-tonal-styles.css.d.ts +1 -0
- package/iconbutton/lib/filled-tonal-styles.css.js +9 -0
- package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -0
- package/iconbutton/lib/filled-tonal-styles.scss +18 -0
- package/iconbutton/lib/icon-button-styles.css.d.ts +1 -0
- package/iconbutton/lib/icon-button-styles.css.js +9 -0
- package/iconbutton/lib/icon-button-styles.css.js.map +1 -0
- package/iconbutton/lib/icon-button-styles.scss +8 -0
- package/iconbutton/lib/icon-button-toggle.d.ts +44 -0
- package/iconbutton/lib/icon-button-toggle.js +155 -0
- package/iconbutton/lib/icon-button-toggle.js.map +1 -0
- package/iconbutton/lib/icon-button.d.ts +50 -0
- package/iconbutton/lib/icon-button.js +154 -0
- package/iconbutton/lib/icon-button.js.map +1 -0
- package/iconbutton/lib/link-icon-button.d.ts +14 -0
- package/iconbutton/lib/link-icon-button.js +53 -0
- package/iconbutton/lib/link-icon-button.js.map +1 -0
- package/iconbutton/lib/outlined-styles.css.d.ts +1 -0
- package/iconbutton/lib/outlined-styles.css.js +9 -0
- package/iconbutton/lib/outlined-styles.css.js.map +1 -0
- package/iconbutton/lib/outlined-styles.scss +18 -0
- package/iconbutton/lib/standard-styles.css.d.ts +1 -0
- package/iconbutton/lib/standard-styles.css.js +9 -0
- package/iconbutton/lib/standard-styles.css.js.map +1 -0
- package/iconbutton/lib/standard-styles.scss +18 -0
- package/iconbutton/outlined-icon-button-toggle.d.ts +19 -0
- package/iconbutton/outlined-icon-button-toggle.js +27 -0
- package/iconbutton/outlined-icon-button-toggle.js.map +1 -0
- package/iconbutton/outlined-icon-button.d.ts +19 -0
- package/iconbutton/outlined-icon-button.js +27 -0
- package/iconbutton/outlined-icon-button.js.map +1 -0
- package/iconbutton/outlined-link-icon-button.d.ts +19 -0
- package/iconbutton/outlined-link-icon-button.js +27 -0
- package/iconbutton/outlined-link-icon-button.js.map +1 -0
- package/iconbutton/standard-icon-button-toggle.d.ts +19 -0
- package/iconbutton/standard-icon-button-toggle.js +27 -0
- package/iconbutton/standard-icon-button-toggle.js.map +1 -0
- package/iconbutton/standard-icon-button.d.ts +19 -0
- package/iconbutton/standard-icon-button.js +27 -0
- package/iconbutton/standard-icon-button.js.map +1 -0
- package/iconbutton/standard-link-icon-button.d.ts +19 -0
- package/iconbutton/standard-link-icon-button.js +27 -0
- package/iconbutton/standard-link-icon-button.js.map +1 -0
- package/list/_list-item.scss +7 -0
- package/list/_list.scss +7 -0
- package/list/harness.d.ts +19 -0
- package/list/harness.js +24 -0
- package/list/harness.js.map +1 -0
- package/list/lib/_list-theme.scss +51 -0
- package/list/lib/_list.scss +41 -0
- package/list/lib/_tokens.scss +80 -0
- package/list/lib/avatar/_list-item-avatar-theme.scss +30 -0
- package/list/lib/avatar/_list-item-avatar.scss +14 -0
- package/list/lib/avatar/list-item-avatar-styles.css.d.ts +1 -0
- package/list/lib/avatar/list-item-avatar-styles.css.js +9 -0
- package/list/lib/avatar/list-item-avatar-styles.css.js.map +1 -0
- package/list/lib/avatar/list-item-avatar-styles.scss +20 -0
- package/list/lib/avatar/list-item-avatar.d.ts +16 -0
- package/list/lib/avatar/list-item-avatar.js +35 -0
- package/list/lib/avatar/list-item-avatar.js.map +1 -0
- package/list/lib/divider/_list-divider-theme.scss +30 -0
- package/list/lib/divider/_list-divider.scss +14 -0
- package/list/lib/divider/list-divider-styles.css.d.ts +1 -0
- package/list/lib/divider/list-divider-styles.css.js +9 -0
- package/list/lib/divider/list-divider-styles.css.js.map +1 -0
- package/list/lib/divider/list-divider-styles.scss +18 -0
- package/list/lib/divider/list-divider.d.ts +13 -0
- package/list/lib/divider/list-divider.js +30 -0
- package/list/lib/divider/list-divider.js.map +1 -0
- package/list/lib/icon/_list-item-icon-theme.scss +32 -0
- package/list/lib/icon/_list-item-icon.scss +35 -0
- package/list/lib/icon/list-item-icon-styles.css.d.ts +1 -0
- package/list/lib/icon/list-item-icon-styles.css.js +9 -0
- package/list/lib/icon/list-item-icon-styles.css.js.map +1 -0
- package/list/lib/icon/list-item-icon-styles.scss +20 -0
- package/list/lib/icon/list-item-icon.d.ts +12 -0
- package/list/lib/icon/list-item-icon.js +26 -0
- package/list/lib/icon/list-item-icon.js.map +1 -0
- package/list/lib/image/_list-item-image-theme.scss +36 -0
- package/list/lib/image/_list-item-image.scss +16 -0
- package/list/lib/image/list-item-image-styles.css.d.ts +1 -0
- package/list/lib/image/list-item-image-styles.css.js +9 -0
- package/list/lib/image/list-item-image-styles.css.js.map +1 -0
- package/list/lib/image/list-item-image-styles.scss +20 -0
- package/list/lib/image/list-item-image.d.ts +14 -0
- package/list/lib/image/list-item-image.js +37 -0
- package/list/lib/image/list-item-image.js.map +1 -0
- package/list/lib/list-styles.css.d.ts +1 -0
- package/list/lib/list-styles.css.js +9 -0
- package/list/lib/list-styles.css.js.map +1 -0
- package/list/lib/list-styles.scss +16 -0
- package/list/lib/list.d.ts +41 -0
- package/list/lib/list.js +168 -0
- package/list/lib/list.js.map +1 -0
- package/list/lib/listitem/_list-item-theme.scss +337 -0
- package/list/lib/listitem/_list-item.scss +133 -0
- package/list/lib/listitem/harness.d.ts +13 -0
- package/list/lib/listitem/harness.js +16 -0
- package/list/lib/listitem/harness.js.map +1 -0
- package/list/lib/listitem/list-item-styles.css.d.ts +1 -0
- package/list/lib/listitem/list-item-styles.css.js +9 -0
- package/list/lib/listitem/list-item-styles.css.js.map +1 -0
- package/list/lib/listitem/list-item-styles.scss +16 -0
- package/list/lib/listitem/list-item.d.ts +73 -0
- package/list/lib/listitem/list-item.js +258 -0
- package/list/lib/listitem/list-item.js.map +1 -0
- package/list/lib/video/_list-item-video-theme.scss +36 -0
- package/list/lib/video/_list-item-video.scss +18 -0
- package/list/lib/video/list-item-video-styles.css.d.ts +1 -0
- package/list/lib/video/list-item-video-styles.css.js +9 -0
- package/list/lib/video/list-item-video-styles.css.js.map +1 -0
- package/list/lib/video/list-item-video-styles.scss +20 -0
- package/list/lib/video/list-item-video.d.ts +14 -0
- package/list/lib/video/list-item-video.js +37 -0
- package/list/lib/video/list-item-video.js.map +1 -0
- package/list/list-divider.d.ts +19 -0
- package/list/list-divider.js +22 -0
- package/list/list-divider.js.map +1 -0
- package/list/list-item-avatar.d.ts +19 -0
- package/list/list-item-avatar.js +22 -0
- package/list/list-item-avatar.js.map +1 -0
- package/list/list-item-icon.d.ts +19 -0
- package/list/list-item-icon.js +22 -0
- package/list/list-item-icon.js.map +1 -0
- package/list/list-item-image.d.ts +19 -0
- package/list/list-item-image.js +22 -0
- package/list/list-item-image.js.map +1 -0
- package/list/list-item-video.d.ts +19 -0
- package/list/list-item-video.js +22 -0
- package/list/list-item-video.js.map +1 -0
- package/list/list-item.d.ts +19 -0
- package/list/list-item.js +22 -0
- package/list/list-item.js.map +1 -0
- package/list/list.d.ts +19 -0
- package/list/list.js +22 -0
- package/list/list.js.map +1 -0
- package/menu/harness.d.ts +15 -0
- package/menu/harness.js +17 -0
- package/menu/harness.js.map +1 -0
- package/menu/lib/_menu-button.scss +14 -0
- package/menu/lib/_menu-theme.scss +118 -0
- package/menu/lib/_menu.scss +8 -0
- package/menu/lib/adapter.d.ts +66 -0
- package/menu/lib/adapter.js +7 -0
- package/menu/lib/adapter.js.map +1 -0
- package/menu/lib/constants.d.ts +22 -0
- package/menu/lib/constants.js +23 -0
- package/menu/lib/constants.js.map +1 -0
- package/menu/lib/foundation.d.ts +49 -0
- package/menu/lib/foundation.js +123 -0
- package/menu/lib/foundation.js.map +1 -0
- package/menu/lib/menu-button-styles.css.d.ts +1 -0
- package/menu/lib/menu-button-styles.css.js +9 -0
- package/menu/lib/menu-button-styles.css.js.map +1 -0
- package/menu/lib/menu-button-styles.scss +9 -0
- package/menu/lib/menu-button.d.ts +27 -0
- package/menu/lib/menu-button.js +93 -0
- package/menu/lib/menu-button.js.map +1 -0
- package/menu/lib/menu-styles.css.d.ts +1 -0
- package/menu/lib/menu-styles.css.js +9 -0
- package/menu/lib/menu-styles.css.js.map +1 -0
- package/menu/lib/menu-styles.scss +17 -0
- package/menu/lib/menu.d.ts +62 -0
- package/menu/lib/menu.js +334 -0
- package/menu/lib/menu.js.map +1 -0
- package/menu/lib/menuitem/harness.d.ts +11 -0
- package/menu/lib/menuitem/harness.js +12 -0
- package/menu/lib/menuitem/harness.js.map +1 -0
- package/menu/lib/menuitem/menu-item.d.ts +11 -0
- package/menu/lib/menuitem/menu-item.js +14 -0
- package/menu/lib/menuitem/menu-item.js.map +1 -0
- package/menu/lib/types.d.ts +23 -0
- package/menu/lib/types.js +7 -0
- package/menu/lib/types.js.map +1 -0
- package/menu/menu-button.d.ts +14 -0
- package/menu/menu-button.js +17 -0
- package/menu/menu-button.js.map +1 -0
- package/menu/menu-item.d.ts +14 -0
- package/menu/menu-item.js +17 -0
- package/menu/menu-item.js.map +1 -0
- package/menu/menu.d.ts +14 -0
- package/menu/menu.js +17 -0
- package/menu/menu.js.map +1 -0
- package/menusurface/_menu-surface.scss +7 -0
- package/menusurface/lib/_menu-surface-theme.scss +58 -0
- package/menusurface/lib/_menu-surface.scss +85 -0
- package/menusurface/lib/adapter.d.ts +46 -0
- package/menusurface/lib/adapter.js +7 -0
- package/menusurface/lib/adapter.js.map +1 -0
- package/menusurface/lib/constants.d.ts +71 -0
- package/menusurface/lib/constants.js +83 -0
- package/menusurface/lib/constants.js.map +1 -0
- package/menusurface/lib/foundation.d.ts +176 -0
- package/menusurface/lib/foundation.js +544 -0
- package/menusurface/lib/foundation.js.map +1 -0
- package/menusurface/lib/menu-surface-styles.css.d.ts +1 -0
- package/menusurface/lib/menu-surface-styles.css.js +9 -0
- package/menusurface/lib/menu-surface-styles.css.js.map +1 -0
- package/menusurface/lib/menu-surface-styles.scss +16 -0
- package/menusurface/lib/menu-surface.d.ts +58 -0
- package/menusurface/lib/menu-surface.js +386 -0
- package/menusurface/lib/menu-surface.js.map +1 -0
- package/menusurface/lib/types.d.ts +19 -0
- package/menusurface/lib/types.js +7 -0
- package/menusurface/lib/types.js.map +1 -0
- package/menusurface/menu-surface.d.ts +14 -0
- package/menusurface/menu-surface.js +17 -0
- package/menusurface/menu-surface.js.map +1 -0
- package/motion/_animation.scss +33 -0
- package/motion/animation.d.ts +63 -0
- package/motion/animation.js +66 -0
- package/motion/animation.js.map +1 -0
- package/navigationbar/_navigation-bar.scss +7 -0
- package/navigationbar/harness.d.ts +19 -0
- package/navigationbar/harness.js +29 -0
- package/navigationbar/harness.js.map +1 -0
- package/navigationbar/lib/_navigation-bar-theme.scss +87 -0
- package/navigationbar/lib/_navigation-bar.scss +28 -0
- package/navigationbar/lib/constants.d.ts +17 -0
- package/navigationbar/lib/constants.js +7 -0
- package/navigationbar/lib/constants.js.map +1 -0
- package/navigationbar/lib/navigation-bar-styles.css.d.ts +1 -0
- package/navigationbar/lib/navigation-bar-styles.css.js +9 -0
- package/navigationbar/lib/navigation-bar-styles.css.js.map +1 -0
- package/navigationbar/lib/navigation-bar-styles.scss +20 -0
- package/navigationbar/lib/navigation-bar.d.ts +26 -0
- package/navigationbar/lib/navigation-bar.js +150 -0
- package/navigationbar/lib/navigation-bar.js.map +1 -0
- package/navigationbar/lib/state.d.ts +23 -0
- package/navigationbar/lib/state.js +7 -0
- package/navigationbar/lib/state.js.map +1 -0
- package/navigationbar/navigation-bar.d.ts +19 -0
- package/navigationbar/navigation-bar.js +22 -0
- package/navigationbar/navigation-bar.js.map +1 -0
- package/navigationdrawer/_navigation-drawer-modal.scss +6 -0
- package/navigationdrawer/_navigation-drawer.scss +6 -0
- package/navigationdrawer/lib/_navigation-drawer-modal-theme.scss +138 -0
- package/navigationdrawer/lib/_navigation-drawer-modal.scss +78 -0
- package/navigationdrawer/lib/_navigation-drawer-theme.scss +113 -0
- package/navigationdrawer/lib/_navigation-drawer.scss +64 -0
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.d.ts +1 -0
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js +9 -0
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js.map +1 -0
- package/navigationdrawer/lib/navigation-drawer-modal-styles.scss +12 -0
- package/navigationdrawer/lib/navigation-drawer-modal.d.ts +24 -0
- package/navigationdrawer/lib/navigation-drawer-modal.js +106 -0
- package/navigationdrawer/lib/navigation-drawer-modal.js.map +1 -0
- package/navigationdrawer/lib/navigation-drawer-styles.css.d.ts +1 -0
- package/navigationdrawer/lib/navigation-drawer-styles.css.js +9 -0
- package/navigationdrawer/lib/navigation-drawer-styles.css.js.map +1 -0
- package/navigationdrawer/lib/navigation-drawer-styles.scss +18 -0
- package/navigationdrawer/lib/navigation-drawer.d.ts +20 -0
- package/navigationdrawer/lib/navigation-drawer.js +87 -0
- package/navigationdrawer/lib/navigation-drawer.js.map +1 -0
- package/navigationdrawer/navigation-drawer-modal.d.ts +19 -0
- package/navigationdrawer/navigation-drawer-modal.js +22 -0
- package/navigationdrawer/navigation-drawer-modal.js.map +1 -0
- package/navigationdrawer/navigation-drawer.d.ts +19 -0
- package/navigationdrawer/navigation-drawer.js +22 -0
- package/navigationdrawer/navigation-drawer.js.map +1 -0
- package/navigationtab/_navigation-tab.scss +7 -0
- package/navigationtab/harness.d.ts +13 -0
- package/navigationtab/harness.js +16 -0
- package/navigationtab/harness.js.map +1 -0
- package/navigationtab/lib/_navigation-tab-theme.scss +343 -0
- package/navigationtab/lib/_navigation-tab.scss +127 -0
- package/navigationtab/lib/navigation-tab-styles.css.d.ts +1 -0
- package/navigationtab/lib/navigation-tab-styles.css.js +9 -0
- package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -0
- package/navigationtab/lib/navigation-tab-styles.scss +21 -0
- package/navigationtab/lib/navigation-tab.d.ts +48 -0
- package/navigationtab/lib/navigation-tab.js +174 -0
- package/navigationtab/lib/navigation-tab.js.map +1 -0
- package/navigationtab/lib/state.d.ts +24 -0
- package/navigationtab/lib/state.js +7 -0
- package/navigationtab/lib/state.js.map +1 -0
- package/navigationtab/navigation-tab.d.ts +19 -0
- package/navigationtab/navigation-tab.js +22 -0
- package/navigationtab/navigation-tab.js.map +1 -0
- package/package.json +48 -0
- package/radio/_radio.scss +1 -0
- package/radio/harness.d.ts +13 -0
- package/radio/harness.js +16 -0
- package/radio/harness.js.map +1 -0
- package/radio/lib/_radio-theme.scss +376 -0
- package/radio/lib/_radio.scss +131 -0
- package/radio/lib/radio-styles.css.d.ts +1 -0
- package/radio/lib/radio-styles.css.js +9 -0
- package/radio/lib/radio-styles.css.js.map +1 -0
- package/radio/lib/radio-styles.scss +14 -0
- package/radio/lib/radio.d.ts +93 -0
- package/radio/lib/radio.js +302 -0
- package/radio/lib/radio.js.map +1 -0
- package/radio/lib/single-selection-controller.d.ts +167 -0
- package/radio/lib/single-selection-controller.js +289 -0
- package/radio/lib/single-selection-controller.js.map +1 -0
- package/radio/radio.d.ts +15 -0
- package/radio/radio.js +18 -0
- package/radio/radio.js.map +1 -0
- package/ripple/_index.scss +6 -0
- package/ripple/_ripple-theme.scss +6 -0
- package/ripple/lib/_ripple-theme.scss +98 -0
- package/ripple/lib/_ripple.scss +84 -0
- package/ripple/lib/ripple-styles.css.d.ts +1 -0
- package/ripple/lib/ripple-styles.css.js +9 -0
- package/ripple/lib/ripple-styles.css.js.map +1 -0
- package/ripple/lib/ripple-styles.scss +16 -0
- package/ripple/lib/ripple.d.ts +62 -0
- package/ripple/lib/ripple.js +215 -0
- package/ripple/lib/ripple.js.map +1 -0
- package/ripple/ripple.d.ts +19 -0
- package/ripple/ripple.js +22 -0
- package/ripple/ripple.js.map +1 -0
- package/sass/_assert.scss +16 -0
- package/sass/_color.scss +186 -0
- package/sass/_dom.scss +52 -0
- package/sass/_elevation.scss +155 -0
- package/sass/_feature-flags.scss +117 -0
- package/sass/_map-ext.scss +25 -0
- package/sass/_resolvers.scss +16 -0
- package/sass/_shape.scss +106 -0
- package/sass/_string-ext.scss +128 -0
- package/sass/_theme.scss +245 -0
- package/sass/_touch-target.scss +22 -0
- package/sass/_typography.scss +114 -0
- package/sass/_var.scss +241 -0
- package/segmentedbutton/lib/_outlined-segmented-button-theme.scss +167 -0
- package/segmentedbutton/lib/_outlined-segmented-button.scss +18 -0
- package/segmentedbutton/lib/_segmented-button-theme.scss +316 -0
- package/segmentedbutton/lib/_segmented-button.scss +159 -0
- package/segmentedbutton/lib/outlined-segmented-button.d.ts +15 -0
- package/segmentedbutton/lib/outlined-segmented-button.js +22 -0
- package/segmentedbutton/lib/outlined-segmented-button.js.map +1 -0
- package/segmentedbutton/lib/outlined-styles.css.d.ts +1 -0
- package/segmentedbutton/lib/outlined-styles.css.js +9 -0
- package/segmentedbutton/lib/outlined-styles.css.js.map +1 -0
- package/segmentedbutton/lib/outlined-styles.scss +17 -0
- package/segmentedbutton/lib/segmented-button-styles.css.d.ts +1 -0
- package/segmentedbutton/lib/segmented-button-styles.css.js +9 -0
- package/segmentedbutton/lib/segmented-button-styles.css.js.map +1 -0
- package/segmentedbutton/lib/segmented-button-styles.scss +8 -0
- package/segmentedbutton/lib/segmented-button.d.ts +60 -0
- package/segmentedbutton/lib/segmented-button.js +229 -0
- package/segmentedbutton/lib/segmented-button.js.map +1 -0
- package/segmentedbutton/outlined-segmented-button.d.ts +21 -0
- package/segmentedbutton/outlined-segmented-button.js +25 -0
- package/segmentedbutton/outlined-segmented-button.js.map +1 -0
- package/segmentedbuttonset/lib/_outlined-segmented-button-set-theme.scss +53 -0
- package/segmentedbuttonset/lib/_outlined-segmented-button-set.scss +12 -0
- package/segmentedbuttonset/lib/_segmented-button-set-theme.scss +41 -0
- package/segmentedbuttonset/lib/_segmented-button-set.scss +21 -0
- package/segmentedbuttonset/lib/outlined-segmented-button-set.d.ts +12 -0
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js +17 -0
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js.map +1 -0
- package/segmentedbuttonset/lib/outlined-styles.css.d.ts +1 -0
- package/segmentedbuttonset/lib/outlined-styles.css.js +9 -0
- package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -0
- package/segmentedbuttonset/lib/outlined-styles.scss +17 -0
- package/segmentedbuttonset/lib/segmented-button-set.d.ts +34 -0
- package/segmentedbuttonset/lib/segmented-button-set.js +118 -0
- package/segmentedbuttonset/lib/segmented-button-set.js.map +1 -0
- package/segmentedbuttonset/lib/shared-styles.css.d.ts +1 -0
- package/segmentedbuttonset/lib/shared-styles.css.js +9 -0
- package/segmentedbuttonset/lib/shared-styles.css.js.map +1 -0
- package/segmentedbuttonset/lib/shared-styles.scss +8 -0
- package/segmentedbuttonset/outlined-segmented-button-set.d.ts +21 -0
- package/segmentedbuttonset/outlined-segmented-button-set.js +25 -0
- package/segmentedbuttonset/outlined-segmented-button-set.js.map +1 -0
- package/switch/_switch.scss +7 -0
- package/switch/harness.d.ts +13 -0
- package/switch/harness.js +16 -0
- package/switch/harness.js.map +1 -0
- package/switch/lib/_switch-handle-theme.scss +137 -0
- package/switch/lib/_switch-icon-theme.scss +52 -0
- package/switch/lib/_switch-theme.scss +232 -0
- package/switch/lib/_switch-track-theme.scss +117 -0
- package/switch/lib/_switch.scss +210 -0
- package/switch/lib/switch-styles.css.d.ts +1 -0
- package/switch/lib/switch-styles.css.js +9 -0
- package/switch/lib/switch-styles.css.js.map +1 -0
- package/switch/lib/switch-styles.scss +11 -0
- package/switch/lib/switch.d.ts +59 -0
- package/switch/lib/switch.js +223 -0
- package/switch/lib/switch.js.map +1 -0
- package/switch/switch.d.ts +19 -0
- package/switch/switch.js +22 -0
- package/switch/switch.js.map +1 -0
- package/textfield/_filled-text-field.scss +9 -0
- package/textfield/_outlined-text-field.scss +9 -0
- package/textfield/filled-text-field.d.ts +21 -0
- package/textfield/filled-text-field.js +31 -0
- package/textfield/filled-text-field.js.map +1 -0
- package/textfield/harness.d.ts +51 -0
- package/textfield/harness.js +118 -0
- package/textfield/harness.js.map +1 -0
- package/textfield/lib/_filled-text-field-theme.scss +203 -0
- package/textfield/lib/_icon-theme.scss +100 -0
- package/textfield/lib/_icon.scss +18 -0
- package/textfield/lib/_input-theme.scss +91 -0
- package/textfield/lib/_input.scss +38 -0
- package/textfield/lib/_outlined-text-field-theme.scss +186 -0
- package/textfield/lib/_text-field.scss +28 -0
- package/textfield/lib/filled-forced-colors-styles.css.d.ts +1 -0
- package/textfield/lib/filled-forced-colors-styles.css.js +9 -0
- package/textfield/lib/filled-forced-colors-styles.css.js.map +1 -0
- package/textfield/lib/filled-forced-colors-styles.scss +17 -0
- package/textfield/lib/filled-styles.css.d.ts +1 -0
- package/textfield/lib/filled-styles.css.js +9 -0
- package/textfield/lib/filled-styles.css.js.map +1 -0
- package/textfield/lib/filled-styles.scss +15 -0
- package/textfield/lib/filled-text-field.d.ts +12 -0
- package/textfield/lib/filled-text-field.js +17 -0
- package/textfield/lib/filled-text-field.js.map +1 -0
- package/textfield/lib/outlined-forced-colors-styles.css.d.ts +1 -0
- package/textfield/lib/outlined-forced-colors-styles.css.js +9 -0
- package/textfield/lib/outlined-forced-colors-styles.css.js.map +1 -0
- package/textfield/lib/outlined-forced-colors-styles.scss +17 -0
- package/textfield/lib/outlined-styles.css.d.ts +1 -0
- package/textfield/lib/outlined-styles.css.js +9 -0
- package/textfield/lib/outlined-styles.css.js.map +1 -0
- package/textfield/lib/outlined-styles.scss +15 -0
- package/textfield/lib/outlined-text-field.d.ts +12 -0
- package/textfield/lib/outlined-text-field.js +17 -0
- package/textfield/lib/outlined-text-field.js.map +1 -0
- package/textfield/lib/shared-styles.css.d.ts +1 -0
- package/textfield/lib/shared-styles.css.js +9 -0
- package/textfield/lib/shared-styles.css.js.map +1 -0
- package/textfield/lib/shared-styles.scss +12 -0
- package/textfield/lib/text-field.d.ts +319 -0
- package/textfield/lib/text-field.js +707 -0
- package/textfield/lib/text-field.js.map +1 -0
- package/textfield/outlined-text-field.d.ts +21 -0
- package/textfield/outlined-text-field.js +31 -0
- package/textfield/outlined-text-field.js.map +1 -0
- package/tokens/_index.scss +6 -0
- package/tokens/latest/_index.scss +186 -0
- package/tokens/latest/_md-comp-assist-chip.scss +98 -0
- package/tokens/latest/_md-comp-badge.scss +51 -0
- package/tokens/latest/_md-comp-banner.scss +99 -0
- package/tokens/latest/_md-comp-bottom-app-bar.scss +36 -0
- package/tokens/latest/_md-comp-checkbox.scss +119 -0
- package/tokens/latest/_md-comp-circular-progress-indicator.scss +37 -0
- package/tokens/latest/_md-comp-date-input-modal.scss +76 -0
- package/tokens/latest/_md-comp-date-picker-docked.scss +210 -0
- package/tokens/latest/_md-comp-date-picker-modal.scss +254 -0
- package/tokens/latest/_md-comp-dialog.scss +115 -0
- package/tokens/latest/_md-comp-divider.scss +25 -0
- package/tokens/latest/_md-comp-elevated-button.scss +83 -0
- package/tokens/latest/_md-comp-elevated-card.scss +59 -0
- package/tokens/latest/_md-comp-extended-fab-branded.scss +77 -0
- package/tokens/latest/_md-comp-extended-fab-primary.scss +80 -0
- package/tokens/latest/_md-comp-extended-fab-secondary.scss +83 -0
- package/tokens/latest/_md-comp-extended-fab-surface.scss +81 -0
- package/tokens/latest/_md-comp-extended-fab-tertiary.scss +80 -0
- package/tokens/latest/_md-comp-fab-branded-large.scss +59 -0
- package/tokens/latest/_md-comp-fab-branded.scss +58 -0
- package/tokens/latest/_md-comp-fab-primary-large.scss +61 -0
- package/tokens/latest/_md-comp-fab-primary-small.scss +61 -0
- package/tokens/latest/_md-comp-fab-primary.scss +61 -0
- package/tokens/latest/_md-comp-fab-secondary-large.scss +63 -0
- package/tokens/latest/_md-comp-fab-secondary-small.scss +62 -0
- package/tokens/latest/_md-comp-fab-secondary.scss +63 -0
- package/tokens/latest/_md-comp-fab-surface-large.scss +62 -0
- package/tokens/latest/_md-comp-fab-surface-small.scss +62 -0
- package/tokens/latest/_md-comp-fab-surface.scss +62 -0
- package/tokens/latest/_md-comp-fab-tertiary-large.scss +61 -0
- package/tokens/latest/_md-comp-fab-tertiary-small.scss +61 -0
- package/tokens/latest/_md-comp-fab-tertiary.scss +61 -0
- package/tokens/latest/_md-comp-filled-autocomplete.scss +235 -0
- package/tokens/latest/_md-comp-filled-button.scss +87 -0
- package/tokens/latest/_md-comp-filled-card.scss +59 -0
- package/tokens/latest/_md-comp-filled-icon-button.scss +72 -0
- package/tokens/latest/_md-comp-filled-menu-button.scss +89 -0
- package/tokens/latest/_md-comp-filled-select.scss +243 -0
- package/tokens/latest/_md-comp-filled-text-field.scss +146 -0
- package/tokens/latest/_md-comp-filled-tonal-button.scss +88 -0
- package/tokens/latest/_md-comp-filled-tonal-icon-button.scss +83 -0
- package/tokens/latest/_md-comp-filter-chip.scss +172 -0
- package/tokens/latest/_md-comp-full-screen-dialog.scss +131 -0
- package/tokens/latest/_md-comp-icon-button.scss +66 -0
- package/tokens/latest/_md-comp-input-chip.scss +112 -0
- package/tokens/latest/_md-comp-linear-progress-indicator.scss +39 -0
- package/tokens/latest/_md-comp-list.scss +205 -0
- package/tokens/latest/_md-comp-menu.scss +113 -0
- package/tokens/latest/_md-comp-navigation-bar.scss +97 -0
- package/tokens/latest/_md-comp-navigation-drawer.scss +137 -0
- package/tokens/latest/_md-comp-navigation-rail.scss +132 -0
- package/tokens/latest/_md-comp-outlined-autocomplete.scss +223 -0
- package/tokens/latest/_md-comp-outlined-button.scss +80 -0
- package/tokens/latest/_md-comp-outlined-card.scss +65 -0
- package/tokens/latest/_md-comp-outlined-icon-button.scss +68 -0
- package/tokens/latest/_md-comp-outlined-menu-button.scss +83 -0
- package/tokens/latest/_md-comp-outlined-segmented-button.scss +97 -0
- package/tokens/latest/_md-comp-outlined-select.scss +231 -0
- package/tokens/latest/_md-comp-outlined-text-field.scss +140 -0
- package/tokens/latest/_md-comp-plain-tooltip.scss +46 -0
- package/tokens/latest/_md-comp-primary-navigation-tab.scss +110 -0
- package/tokens/latest/_md-comp-radio-button.scss +58 -0
- package/tokens/latest/_md-comp-rich-tooltip.scss +98 -0
- package/tokens/latest/_md-comp-search-bar.scss +84 -0
- package/tokens/latest/_md-comp-search-view.scss +79 -0
- package/tokens/latest/_md-comp-secondary-navigation-tab.scss +78 -0
- package/tokens/latest/_md-comp-sheet-bottom.scss +41 -0
- package/tokens/latest/_md-comp-sheet-floating.scss +34 -0
- package/tokens/latest/_md-comp-sheet-side.scss +75 -0
- package/tokens/latest/_md-comp-slider.scss +105 -0
- package/tokens/latest/_md-comp-snackbar.scss +91 -0
- package/tokens/latest/_md-comp-standard-menu-button.scss +82 -0
- package/tokens/latest/_md-comp-suggestion-chip.scss +90 -0
- package/tokens/latest/_md-comp-switch.scss +126 -0
- package/tokens/latest/_md-comp-text-button.scss +75 -0
- package/tokens/latest/_md-comp-time-input.scss +184 -0
- package/tokens/latest/_md-comp-time-picker.scss +235 -0
- package/tokens/latest/_md-comp-top-app-bar-large.scss +57 -0
- package/tokens/latest/_md-comp-top-app-bar-medium.scss +56 -0
- package/tokens/latest/_md-comp-top-app-bar-small-centered.scss +60 -0
- package/tokens/latest/_md-comp-top-app-bar-small.scss +58 -0
- package/tokens/latest/_md-ref-palette.scss +95 -0
- package/tokens/latest/_md-ref-typeface.scss +20 -0
- package/tokens/latest/_md-sys-color.scss +1006 -0
- package/tokens/latest/_md-sys-elevation.scss +30 -0
- package/tokens/latest/_md-sys-motion.scss +51 -0
- package/tokens/latest/_md-sys-shape.scss +26 -0
- package/tokens/latest/_md-sys-state.scss +19 -0
- package/tokens/latest/_md-sys-typescale.scss +204 -0
- package/tokens/v0_75/_index.scss +154 -0
- package/tokens/v0_75/_md-comp-assist-chip.scss +98 -0
- package/tokens/v0_75/_md-comp-badge.scss +51 -0
- package/tokens/v0_75/_md-comp-banner.scss +99 -0
- package/tokens/v0_75/_md-comp-bottom-app-bar.scss +36 -0
- package/tokens/v0_75/_md-comp-checkbox.scss +59 -0
- package/tokens/v0_75/_md-comp-circular-progress-indicator.scss +37 -0
- package/tokens/v0_75/_md-comp-dialog.scss +102 -0
- package/tokens/v0_75/_md-comp-elevated-button.scss +83 -0
- package/tokens/v0_75/_md-comp-elevated-card.scss +56 -0
- package/tokens/v0_75/_md-comp-extended-fab-branded.scss +77 -0
- package/tokens/v0_75/_md-comp-extended-fab-primary.scss +80 -0
- package/tokens/v0_75/_md-comp-extended-fab-secondary.scss +83 -0
- package/tokens/v0_75/_md-comp-extended-fab-surface.scss +81 -0
- package/tokens/v0_75/_md-comp-extended-fab-tertiary.scss +80 -0
- package/tokens/v0_75/_md-comp-fab-branded-large.scss +59 -0
- package/tokens/v0_75/_md-comp-fab-branded.scss +58 -0
- package/tokens/v0_75/_md-comp-fab-primary-large.scss +61 -0
- package/tokens/v0_75/_md-comp-fab-primary-small.scss +61 -0
- package/tokens/v0_75/_md-comp-fab-primary.scss +61 -0
- package/tokens/v0_75/_md-comp-fab-secondary-large.scss +63 -0
- package/tokens/v0_75/_md-comp-fab-secondary-small.scss +62 -0
- package/tokens/v0_75/_md-comp-fab-secondary.scss +63 -0
- package/tokens/v0_75/_md-comp-fab-surface-large.scss +62 -0
- package/tokens/v0_75/_md-comp-fab-surface-small.scss +62 -0
- package/tokens/v0_75/_md-comp-fab-surface.scss +62 -0
- package/tokens/v0_75/_md-comp-fab-tertiary-large.scss +61 -0
- package/tokens/v0_75/_md-comp-fab-tertiary-small.scss +61 -0
- package/tokens/v0_75/_md-comp-fab-tertiary.scss +61 -0
- package/tokens/v0_75/_md-comp-filled-button-tonal.scss +84 -0
- package/tokens/v0_75/_md-comp-filled-button.scss +87 -0
- package/tokens/v0_75/_md-comp-filled-card.scss +56 -0
- package/tokens/v0_75/_md-comp-filled-icon-button.scss +72 -0
- package/tokens/v0_75/_md-comp-filled-text-field.scss +142 -0
- package/tokens/v0_75/_md-comp-filled-tonal-button.scss +88 -0
- package/tokens/v0_75/_md-comp-filled-tonal-icon-button.scss +83 -0
- package/tokens/v0_75/_md-comp-filter-chip.scss +172 -0
- package/tokens/v0_75/_md-comp-full-screen-dialog.scss +131 -0
- package/tokens/v0_75/_md-comp-icon-button.scss +79 -0
- package/tokens/v0_75/_md-comp-input-chip.scss +112 -0
- package/tokens/v0_75/_md-comp-linear-progress-indicator.scss +39 -0
- package/tokens/v0_75/_md-comp-list.scss +205 -0
- package/tokens/v0_75/_md-comp-menu.scss +113 -0
- package/tokens/v0_75/_md-comp-navigation-bar.scss +131 -0
- package/tokens/v0_75/_md-comp-navigation-drawer.scss +137 -0
- package/tokens/v0_75/_md-comp-navigation-rail.scss +136 -0
- package/tokens/v0_75/_md-comp-outlined-button.scss +80 -0
- package/tokens/v0_75/_md-comp-outlined-card.scss +62 -0
- package/tokens/v0_75/_md-comp-outlined-icon-button.scss +68 -0
- package/tokens/v0_75/_md-comp-outlined-segmented-button.scss +96 -0
- package/tokens/v0_75/_md-comp-outlined-text-field.scss +136 -0
- package/tokens/v0_75/_md-comp-primary-navigation-tab.scss +116 -0
- package/tokens/v0_75/_md-comp-radio-button.scss +58 -0
- package/tokens/v0_75/_md-comp-rich-tooltip.scss +98 -0
- package/tokens/v0_75/_md-comp-secondary-navigation-tab.scss +75 -0
- package/tokens/v0_75/_md-comp-slider.scss +129 -0
- package/tokens/v0_75/_md-comp-snackbar.scss +77 -0
- package/tokens/v0_75/_md-comp-suggestion-chip.scss +90 -0
- package/tokens/v0_75/_md-comp-switch.scss +92 -0
- package/tokens/v0_75/_md-comp-text-button.scss +75 -0
- package/tokens/v0_75/_md-comp-top-app-bar-compact-centered.scss +53 -0
- package/tokens/v0_75/_md-comp-top-app-bar-compact.scss +43 -0
- package/tokens/v0_75/_md-comp-top-app-bar-large.scss +57 -0
- package/tokens/v0_75/_md-comp-top-app-bar-medium.scss +56 -0
- package/tokens/v0_75/_md-comp-top-app-bar-small-centered.scss +60 -0
- package/tokens/v0_75/_md-comp-top-app-bar-small.scss +58 -0
- package/tokens/v0_75/_md-ref-palette.scss +186 -0
- package/tokens/v0_75/_md-ref-typeface.scss +25 -0
- package/tokens/v0_75/_md-sys-color.scss +86 -0
- package/tokens/v0_75/_md-sys-elevation.scss +30 -0
- package/tokens/v0_75/_md-sys-motion.scss +61 -0
- package/tokens/v0_75/_md-sys-shape.scss +29 -0
- package/tokens/v0_75/_md-sys-state.scss +19 -0
- package/tokens/v0_75/_md-sys-typescale.scss +252 -0
- package/tokens/v0_93/_index.scss +184 -0
- package/tokens/v0_93/_md-comp-assist-chip.scss +98 -0
- package/tokens/v0_93/_md-comp-badge.scss +51 -0
- package/tokens/v0_93/_md-comp-banner.scss +99 -0
- package/tokens/v0_93/_md-comp-bottom-app-bar.scss +36 -0
- package/tokens/v0_93/_md-comp-checkbox.scss +119 -0
- package/tokens/v0_93/_md-comp-circular-progress-indicator.scss +37 -0
- package/tokens/v0_93/_md-comp-date-input-modal.scss +76 -0
- package/tokens/v0_93/_md-comp-date-picker-docked.scss +210 -0
- package/tokens/v0_93/_md-comp-date-picker-modal.scss +254 -0
- package/tokens/v0_93/_md-comp-dialog.scss +101 -0
- package/tokens/v0_93/_md-comp-divider.scss +25 -0
- package/tokens/v0_93/_md-comp-elevated-button.scss +83 -0
- package/tokens/v0_93/_md-comp-elevated-card.scss +59 -0
- package/tokens/v0_93/_md-comp-extended-fab-branded.scss +77 -0
- package/tokens/v0_93/_md-comp-extended-fab-primary.scss +80 -0
- package/tokens/v0_93/_md-comp-extended-fab-secondary.scss +83 -0
- package/tokens/v0_93/_md-comp-extended-fab-surface.scss +81 -0
- package/tokens/v0_93/_md-comp-extended-fab-tertiary.scss +80 -0
- package/tokens/v0_93/_md-comp-fab-branded-large.scss +59 -0
- package/tokens/v0_93/_md-comp-fab-branded.scss +58 -0
- package/tokens/v0_93/_md-comp-fab-primary-large.scss +61 -0
- package/tokens/v0_93/_md-comp-fab-primary-small.scss +61 -0
- package/tokens/v0_93/_md-comp-fab-primary.scss +61 -0
- package/tokens/v0_93/_md-comp-fab-secondary-large.scss +63 -0
- package/tokens/v0_93/_md-comp-fab-secondary-small.scss +62 -0
- package/tokens/v0_93/_md-comp-fab-secondary.scss +63 -0
- package/tokens/v0_93/_md-comp-fab-surface-large.scss +62 -0
- package/tokens/v0_93/_md-comp-fab-surface-small.scss +62 -0
- package/tokens/v0_93/_md-comp-fab-surface.scss +62 -0
- package/tokens/v0_93/_md-comp-fab-tertiary-large.scss +61 -0
- package/tokens/v0_93/_md-comp-fab-tertiary-small.scss +61 -0
- package/tokens/v0_93/_md-comp-fab-tertiary.scss +61 -0
- package/tokens/v0_93/_md-comp-filled-autocomplete.scss +235 -0
- package/tokens/v0_93/_md-comp-filled-button.scss +87 -0
- package/tokens/v0_93/_md-comp-filled-card.scss +59 -0
- package/tokens/v0_93/_md-comp-filled-icon-button.scss +72 -0
- package/tokens/v0_93/_md-comp-filled-menu-button.scss +89 -0
- package/tokens/v0_93/_md-comp-filled-select.scss +243 -0
- package/tokens/v0_93/_md-comp-filled-text-field.scss +146 -0
- package/tokens/v0_93/_md-comp-filled-tonal-button.scss +88 -0
- package/tokens/v0_93/_md-comp-filled-tonal-icon-button.scss +83 -0
- package/tokens/v0_93/_md-comp-filter-chip.scss +172 -0
- package/tokens/v0_93/_md-comp-full-screen-dialog.scss +131 -0
- package/tokens/v0_93/_md-comp-icon-button.scss +66 -0
- package/tokens/v0_93/_md-comp-input-chip.scss +112 -0
- package/tokens/v0_93/_md-comp-linear-progress-indicator.scss +39 -0
- package/tokens/v0_93/_md-comp-list.scss +205 -0
- package/tokens/v0_93/_md-comp-menu.scss +113 -0
- package/tokens/v0_93/_md-comp-navigation-bar.scss +97 -0
- package/tokens/v0_93/_md-comp-navigation-drawer.scss +137 -0
- package/tokens/v0_93/_md-comp-navigation-rail.scss +132 -0
- package/tokens/v0_93/_md-comp-outlined-autocomplete.scss +223 -0
- package/tokens/v0_93/_md-comp-outlined-button.scss +80 -0
- package/tokens/v0_93/_md-comp-outlined-card.scss +65 -0
- package/tokens/v0_93/_md-comp-outlined-icon-button.scss +68 -0
- package/tokens/v0_93/_md-comp-outlined-menu-button.scss +83 -0
- package/tokens/v0_93/_md-comp-outlined-segmented-button.scss +97 -0
- package/tokens/v0_93/_md-comp-outlined-select.scss +231 -0
- package/tokens/v0_93/_md-comp-outlined-text-field.scss +140 -0
- package/tokens/v0_93/_md-comp-plain-tooltip.scss +46 -0
- package/tokens/v0_93/_md-comp-primary-navigation-tab.scss +110 -0
- package/tokens/v0_93/_md-comp-radio-button.scss +58 -0
- package/tokens/v0_93/_md-comp-rich-tooltip.scss +98 -0
- package/tokens/v0_93/_md-comp-search-bar.scss +84 -0
- package/tokens/v0_93/_md-comp-search-view.scss +79 -0
- package/tokens/v0_93/_md-comp-secondary-navigation-tab.scss +78 -0
- package/tokens/v0_93/_md-comp-sheet-bottom.scss +41 -0
- package/tokens/v0_93/_md-comp-sheet-side.scss +75 -0
- package/tokens/v0_93/_md-comp-slider.scss +105 -0
- package/tokens/v0_93/_md-comp-snackbar.scss +91 -0
- package/tokens/v0_93/_md-comp-standard-menu-button.scss +82 -0
- package/tokens/v0_93/_md-comp-suggestion-chip.scss +90 -0
- package/tokens/v0_93/_md-comp-switch.scss +126 -0
- package/tokens/v0_93/_md-comp-text-button.scss +75 -0
- package/tokens/v0_93/_md-comp-time-input.scss +184 -0
- package/tokens/v0_93/_md-comp-time-picker.scss +235 -0
- package/tokens/v0_93/_md-comp-top-app-bar-large.scss +57 -0
- package/tokens/v0_93/_md-comp-top-app-bar-medium.scss +56 -0
- package/tokens/v0_93/_md-comp-top-app-bar-small-centered.scss +60 -0
- package/tokens/v0_93/_md-comp-top-app-bar-small.scss +58 -0
- package/tokens/v0_93/_md-ref-palette.scss +95 -0
- package/tokens/v0_93/_md-ref-typeface.scss +20 -0
- package/tokens/v0_93/_md-sys-color.scss +1006 -0
- package/tokens/v0_93/_md-sys-elevation.scss +30 -0
- package/tokens/v0_93/_md-sys-motion.scss +51 -0
- package/tokens/v0_93/_md-sys-shape.scss +26 -0
- package/tokens/v0_93/_md-sys-state.scss +19 -0
- package/tokens/v0_93/_md-sys-typescale.scss +204 -0
- package/types/aria.d.ts +48 -0
- package/types/keys.d.ts +57 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate, __metadata } from "tslib";
|
|
7
|
+
import { createAnimationSignal, Easing } from '@material/web/motion/animation.js';
|
|
8
|
+
import { html, LitElement } from 'lit';
|
|
9
|
+
import { property, query, state } from 'lit/decorators.js';
|
|
10
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
11
|
+
const PRESS_GROW_MS = 450;
|
|
12
|
+
const MINIMUM_PRESS_MS = 225;
|
|
13
|
+
const INITIAL_ORIGIN_SCALE = 0.2;
|
|
14
|
+
const PADDING = 10;
|
|
15
|
+
const SOFT_EDGE_MINIMUM_SIZE = 75;
|
|
16
|
+
const SOFT_EDGE_CONTAINER_RATIO = 0.35;
|
|
17
|
+
const PRESS_PSEUDO = '::after';
|
|
18
|
+
const ANIMATION_FILL = 'forwards';
|
|
19
|
+
/** @soyCompatible */
|
|
20
|
+
export class Ripple extends LitElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.unbounded = false;
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
this.hovered = false;
|
|
26
|
+
this.focused = false;
|
|
27
|
+
this.pressed = false;
|
|
28
|
+
this.rippleSize = '';
|
|
29
|
+
this.rippleScale = '';
|
|
30
|
+
this.initialSize = 0;
|
|
31
|
+
this.pressAnimationSignal = createAnimationSignal();
|
|
32
|
+
this.growAnimation = null;
|
|
33
|
+
this.delayedEndPressHandle = null;
|
|
34
|
+
}
|
|
35
|
+
/** @soyTemplate */
|
|
36
|
+
render() {
|
|
37
|
+
return html `<div class="md3-ripple-surface ${classMap(this.getRenderRippleClasses())}"></div>`;
|
|
38
|
+
}
|
|
39
|
+
/** @soyTemplate */
|
|
40
|
+
getRenderRippleClasses() {
|
|
41
|
+
return {
|
|
42
|
+
'md3-ripple--hovered': this.hovered,
|
|
43
|
+
'md3-ripple--focused': this.focused,
|
|
44
|
+
'md3-ripple--pressed': this.pressed,
|
|
45
|
+
'md3-ripple--unbounded': this.unbounded,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
update(changedProps) {
|
|
49
|
+
if (changedProps.has('disabled') && this.disabled) {
|
|
50
|
+
this.endHover();
|
|
51
|
+
this.endFocus();
|
|
52
|
+
this.endPress();
|
|
53
|
+
}
|
|
54
|
+
super.update(changedProps);
|
|
55
|
+
}
|
|
56
|
+
getDimensions() {
|
|
57
|
+
return (this.parentElement ?? this).getBoundingClientRect();
|
|
58
|
+
}
|
|
59
|
+
determineRippleSize() {
|
|
60
|
+
const { height, width } = this.getDimensions();
|
|
61
|
+
const maxDim = Math.max(height, width);
|
|
62
|
+
const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);
|
|
63
|
+
let maxRadius = maxDim;
|
|
64
|
+
let initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);
|
|
65
|
+
const hypotenuse = Math.sqrt(width ** 2 + height ** 2);
|
|
66
|
+
maxRadius = hypotenuse + PADDING;
|
|
67
|
+
// ensure `initialSize` is even for unbounded
|
|
68
|
+
if (this.unbounded) {
|
|
69
|
+
initialSize = initialSize - (initialSize % 2);
|
|
70
|
+
}
|
|
71
|
+
this.initialSize = initialSize;
|
|
72
|
+
this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;
|
|
73
|
+
this.rippleSize = `${this.initialSize}px`;
|
|
74
|
+
}
|
|
75
|
+
getNormalizedPointerEventCoords(pointerEvent) {
|
|
76
|
+
const { scrollX, scrollY } = window;
|
|
77
|
+
const { left, top } = this.getDimensions();
|
|
78
|
+
const documentX = scrollX + left;
|
|
79
|
+
const documentY = scrollY + top;
|
|
80
|
+
const { pageX, pageY } = pointerEvent;
|
|
81
|
+
return { x: pageX - documentX, y: pageY - documentY };
|
|
82
|
+
}
|
|
83
|
+
getTranslationCoordinates(positionEvent) {
|
|
84
|
+
const { height, width } = this.getDimensions();
|
|
85
|
+
// end in the center
|
|
86
|
+
const endPoint = {
|
|
87
|
+
x: (width - this.initialSize) / 2,
|
|
88
|
+
y: (height - this.initialSize) / 2,
|
|
89
|
+
};
|
|
90
|
+
let startPoint;
|
|
91
|
+
if (positionEvent instanceof PointerEvent) {
|
|
92
|
+
startPoint = this.getNormalizedPointerEventCoords(positionEvent);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
startPoint = {
|
|
96
|
+
x: width / 2,
|
|
97
|
+
y: height / 2,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
// center around start point
|
|
101
|
+
startPoint = {
|
|
102
|
+
x: startPoint.x - (this.initialSize / 2),
|
|
103
|
+
y: startPoint.y - (this.initialSize / 2),
|
|
104
|
+
};
|
|
105
|
+
return { startPoint, endPoint };
|
|
106
|
+
}
|
|
107
|
+
startPressAnimation(positionEvent) {
|
|
108
|
+
this.determineRippleSize();
|
|
109
|
+
const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent);
|
|
110
|
+
const translateStart = `${startPoint.x}px, ${startPoint.y}px`;
|
|
111
|
+
const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;
|
|
112
|
+
const signal = this.pressAnimationSignal.start();
|
|
113
|
+
const growAnimation = this.mdRoot.animate({
|
|
114
|
+
top: [0, 0],
|
|
115
|
+
left: [0, 0],
|
|
116
|
+
height: [this.rippleSize, this.rippleSize],
|
|
117
|
+
width: [this.rippleSize, this.rippleSize],
|
|
118
|
+
transform: [
|
|
119
|
+
`translate(${translateStart}) scale(1)`,
|
|
120
|
+
`translate(${translateEnd}) scale(${this.rippleScale})`
|
|
121
|
+
],
|
|
122
|
+
}, {
|
|
123
|
+
pseudoElement: PRESS_PSEUDO,
|
|
124
|
+
duration: PRESS_GROW_MS,
|
|
125
|
+
easing: Easing.STANDARD,
|
|
126
|
+
fill: ANIMATION_FILL
|
|
127
|
+
});
|
|
128
|
+
growAnimation.addEventListener('finish', () => {
|
|
129
|
+
this.pressAnimationSignal.finish();
|
|
130
|
+
this.growAnimation = null;
|
|
131
|
+
});
|
|
132
|
+
signal.addEventListener('abort', () => {
|
|
133
|
+
growAnimation.cancel();
|
|
134
|
+
this.growAnimation = null;
|
|
135
|
+
});
|
|
136
|
+
this.growAnimation = growAnimation;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated Use beginHover
|
|
140
|
+
*/
|
|
141
|
+
startHover(hoverEvent) {
|
|
142
|
+
this.beginHover(hoverEvent);
|
|
143
|
+
}
|
|
144
|
+
beginHover(hoverEvent) {
|
|
145
|
+
if (hoverEvent?.pointerType !== 'touch') {
|
|
146
|
+
this.hovered = true;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
endHover() {
|
|
150
|
+
this.hovered = false;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated Use beginFocus
|
|
154
|
+
*/
|
|
155
|
+
startFocus() {
|
|
156
|
+
this.beginFocus();
|
|
157
|
+
}
|
|
158
|
+
beginFocus() {
|
|
159
|
+
this.focused = true;
|
|
160
|
+
}
|
|
161
|
+
endFocus() {
|
|
162
|
+
this.focused = false;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @deprecated Use beginPress
|
|
166
|
+
*/
|
|
167
|
+
startPress(positionEvent) {
|
|
168
|
+
this.beginPress(positionEvent);
|
|
169
|
+
}
|
|
170
|
+
beginPress(positionEvent) {
|
|
171
|
+
this.pressed = true;
|
|
172
|
+
if (this.delayedEndPressHandle !== null) {
|
|
173
|
+
clearTimeout(this.delayedEndPressHandle);
|
|
174
|
+
this.delayedEndPressHandle = null;
|
|
175
|
+
}
|
|
176
|
+
this.startPressAnimation(positionEvent);
|
|
177
|
+
}
|
|
178
|
+
endPress() {
|
|
179
|
+
const pressAnimationPlayState = this.growAnimation?.currentTime ?? Infinity;
|
|
180
|
+
if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {
|
|
181
|
+
this.pressed = false;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this.delayedEndPressHandle = setTimeout(() => {
|
|
185
|
+
this.pressed = false;
|
|
186
|
+
this.delayedEndPressHandle = null;
|
|
187
|
+
}, MINIMUM_PRESS_MS - pressAnimationPlayState);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
__decorate([
|
|
192
|
+
query('.md3-ripple-surface'),
|
|
193
|
+
__metadata("design:type", HTMLElement)
|
|
194
|
+
], Ripple.prototype, "mdRoot", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
property({ type: Boolean }),
|
|
197
|
+
__metadata("design:type", Object)
|
|
198
|
+
], Ripple.prototype, "unbounded", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
property({ type: Boolean, reflect: true }),
|
|
201
|
+
__metadata("design:type", Object)
|
|
202
|
+
], Ripple.prototype, "disabled", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
state(),
|
|
205
|
+
__metadata("design:type", Object)
|
|
206
|
+
], Ripple.prototype, "hovered", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
state(),
|
|
209
|
+
__metadata("design:type", Object)
|
|
210
|
+
], Ripple.prototype, "focused", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
state(),
|
|
213
|
+
__metadata("design:type", Object)
|
|
214
|
+
], Ripple.prototype, "pressed", void 0);
|
|
215
|
+
//# sourceMappingURL=ripple.js.map
|
|
@@ -0,0 +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,6BAA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C,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 {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"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Ripple } from './lib/ripple.js';
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'md-ripple': MdRipple;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @soyCompatible
|
|
14
|
+
* @final
|
|
15
|
+
* @suppress {visibility}
|
|
16
|
+
*/
|
|
17
|
+
export declare class MdRipple extends Ripple {
|
|
18
|
+
static styles: import("lit").CSSResult[];
|
|
19
|
+
}
|
package/ripple/ripple.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { customElement } from 'lit/decorators.js';
|
|
8
|
+
import { Ripple } from './lib/ripple.js';
|
|
9
|
+
import { styles } from './lib/ripple-styles.css.js';
|
|
10
|
+
/**
|
|
11
|
+
* @soyCompatible
|
|
12
|
+
* @final
|
|
13
|
+
* @suppress {visibility}
|
|
14
|
+
*/
|
|
15
|
+
let MdRipple = class MdRipple extends Ripple {
|
|
16
|
+
};
|
|
17
|
+
MdRipple.styles = [styles];
|
|
18
|
+
MdRipple = __decorate([
|
|
19
|
+
customElement('md-ripple')
|
|
20
|
+
], MdRipple);
|
|
21
|
+
export { MdRipple };
|
|
22
|
+
//# sourceMappingURL=ripple.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple.js","sourceRoot":"","sources":["ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;AAQlD;;;;GAIG;AAEH,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,MAAM;CAEnC,CAAA;AADiB,eAAM,GAAG,CAAC,MAAM,CAAE,CAAA;AADvB,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAEpB;SAFY,QAAQ","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {customElement} from 'lit/decorators.js';\n\nimport {Ripple} from './lib/ripple.js';\nimport {styles} from './lib/ripple-styles.css.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-ripple': MdRipple;\n }\n}\n\n/**\n * @soyCompatible\n * @final\n * @suppress {visibility}\n */\n@customElement('md-ripple')\nexport class MdRipple extends Ripple {\n static override styles = [styles];\n}"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'sass:meta';
|
|
2
|
+
|
|
3
|
+
///
|
|
4
|
+
/// is-type returns the given value if it matches the given type. If not, it
|
|
5
|
+
/// throws an error.
|
|
6
|
+
/// @param {*} $val - the value to check the type of.
|
|
7
|
+
/// @param {String} $type - the type we expect $val to be.
|
|
8
|
+
/// @return {*} returns $val assuming it is of type $type.
|
|
9
|
+
///
|
|
10
|
+
@function is-type($val, $type) {
|
|
11
|
+
$actual: meta.type-of($val);
|
|
12
|
+
@if $actual != $type {
|
|
13
|
+
@error 'expected "#{$val}" to be of type "#{$type}"; was type "#{$actual}"';
|
|
14
|
+
}
|
|
15
|
+
@return $val;
|
|
16
|
+
}
|
package/sass/_color.scss
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@use 'sass:list';
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
@use 'sass:meta';
|
|
9
|
+
@use 'sass:string';
|
|
10
|
+
@use './assert';
|
|
11
|
+
@use './string-ext';
|
|
12
|
+
@use './var';
|
|
13
|
+
|
|
14
|
+
$_hex: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' 'a' 'b' 'c' 'd' 'e' 'f';
|
|
15
|
+
|
|
16
|
+
///
|
|
17
|
+
/// @example - scss
|
|
18
|
+
/// @debug color-var-hex-to-rgba(var(--foo-color-on-surface, #8ab4f8), 0.38);
|
|
19
|
+
/// // rgb(var(--foo-color-on-surface-rgb, 138, 180, 248), 0.38))
|
|
20
|
+
/// @param {String} $var - CSS custom property string in var(--foo, #hex) format.
|
|
21
|
+
/// @param {Number} $opacity - Opacity to mix with given color.
|
|
22
|
+
/// @return {String} Returns color string in rgb() format containing
|
|
23
|
+
/// CSS custom property for comma separated rgb color.
|
|
24
|
+
@function color-var-hex-to-rgba($var, $opacity) {
|
|
25
|
+
@if not var.is-var($var) {
|
|
26
|
+
@error '"#{$var}" is not a valid custom property.';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@if meta.type-of($opacity) != 'number' {
|
|
30
|
+
@error '"#{$opacity}" is not a valid number. Expecting to combine it with "#{$var}"';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
$fallback: var.fallback($var);
|
|
34
|
+
// var(--foo-color-rgb, 31,31,31)
|
|
35
|
+
$var-rgb: var.create('#{var.name($var)}-rgb', hex-to-rgb($fallback));
|
|
36
|
+
@return string.unquote('rgb(#{$var-rgb}, #{$opacity})');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/// @example - scss
|
|
40
|
+
/// @debug hex-to-rgb('#8ab4f8'); // 138, 180, 248
|
|
41
|
+
/// @param {String} $string - CSS hex color in string format including '#'.
|
|
42
|
+
/// @return {String} Returns comma separated rgb values in string format.
|
|
43
|
+
@function hex-to-rgb($string) {
|
|
44
|
+
@if not string-ext.has-prefix($string, '#') {
|
|
45
|
+
@error '#{$string} is not in CSS hex color format.';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
$string-lower: string.to-lower-case($string);
|
|
49
|
+
$r: '';
|
|
50
|
+
$g: '';
|
|
51
|
+
$b: '';
|
|
52
|
+
$length: string.length($string);
|
|
53
|
+
$max: if($length == 4, 1, 2);
|
|
54
|
+
|
|
55
|
+
// Check for length accuracy
|
|
56
|
+
@if $length != 4 and $length != 7 {
|
|
57
|
+
@return $string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Loop from the second character (omitting #)
|
|
61
|
+
@for $i from 2 through $length {
|
|
62
|
+
$c: string.slice($string-lower, $i, $i);
|
|
63
|
+
|
|
64
|
+
// If wrong character, return
|
|
65
|
+
@if list.index($_hex, $c) == null {
|
|
66
|
+
@return $string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@if string.length($r) < $max {
|
|
70
|
+
$r: $r + $c;
|
|
71
|
+
} @else if string.length($g) < $max {
|
|
72
|
+
$g: $g + $c;
|
|
73
|
+
} @else if string.length($b) < $max {
|
|
74
|
+
$b: $b + $c;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@if $length == 4 {
|
|
79
|
+
$r: $r + $r;
|
|
80
|
+
$g: $g + $g;
|
|
81
|
+
$b: $b + $b;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@return #{_hex-to-dec($r), _hex-to-dec($g), _hex-to-dec($b)};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
///
|
|
88
|
+
/// replace-as-rgba returns a map with the color key transformed to an RGBA
|
|
89
|
+
/// color value created by joining the color key value with the opacity key
|
|
90
|
+
/// value. The opacity key is removed from the map. This function is
|
|
91
|
+
/// non-destructive and returns a new instance of the given map. It should only
|
|
92
|
+
/// be used for disabled colors.
|
|
93
|
+
///
|
|
94
|
+
/// If $color is a var string then we would convert the color value to comma
|
|
95
|
+
/// separated rgb value.
|
|
96
|
+
///
|
|
97
|
+
/// @example
|
|
98
|
+
///. replace-as-rgba((
|
|
99
|
+
/// foo: red,
|
|
100
|
+
///. bar: 0.5
|
|
101
|
+
///. ), foo, bar) = (foo: rgba(255, 0, 0, 0.5))
|
|
102
|
+
/// @example
|
|
103
|
+
///. replace-as-rgba((
|
|
104
|
+
/// foo: var(--foo-color, #8ab4f8),
|
|
105
|
+
///. bar: 0.5
|
|
106
|
+
///. ), foo, bar) = (foo: rgb(var(--foo-color-rgb, 138, 180, 248), 0.5))
|
|
107
|
+
///
|
|
108
|
+
/// @param {Map} $map - the map with the given keys.
|
|
109
|
+
/// @param {String} $color-key - the color key in the map.
|
|
110
|
+
/// @param {String} $opacity-key - the opacity key in the map.
|
|
111
|
+
/// @return {Map} The map with the color key replaced by an RGBA representation.
|
|
112
|
+
@function replace-as-rgba($map, $color-key, $opacity-key) {
|
|
113
|
+
// Make a non-destructive copy of the map.
|
|
114
|
+
$out: map.merge($map, ());
|
|
115
|
+
|
|
116
|
+
$color: map.get($out, $color-key);
|
|
117
|
+
@if var.is-var($color) {
|
|
118
|
+
// TODO(b/213331407): Convert color from hex to rgba CSS color format to
|
|
119
|
+
// enable mixing rgb value with alpha using custom properties.
|
|
120
|
+
// (e.g., rgb(var(--foo-sys-color-on-surface-rgb, 31,31,31), 0.38))
|
|
121
|
+
// Remove once the attached bug is resolved.
|
|
122
|
+
$color: color-var-hex-to-rgba($color, map.get($out, $opacity-key));
|
|
123
|
+
} @else if meta.type-of($color) == 'color' {
|
|
124
|
+
$opacity: assert.is-type(map.get($out, $opacity-key), 'number');
|
|
125
|
+
$color: rgba($color, $opacity);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
$out: map.set($out, $color-key, $color);
|
|
129
|
+
@return $out;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
///
|
|
133
|
+
/// join-color-and-opacity-pairs returns a map with all given color and opacity
|
|
134
|
+
/// keys joined to create an RGBA color value. This function is non-destructive
|
|
135
|
+
/// and returns a new instance of the given map. It should only be used for
|
|
136
|
+
/// disabled colors.
|
|
137
|
+
///
|
|
138
|
+
/// @example
|
|
139
|
+
/// join-color-and-opacity-pairs((
|
|
140
|
+
/// foo-color: red,
|
|
141
|
+
/// foo-opacity: 0.2,
|
|
142
|
+
/// bar-color: green,
|
|
143
|
+
/// bar-opacity: 0.3,
|
|
144
|
+
/// ), (
|
|
145
|
+
/// (color-key: 'foo-color', opacity-key: 'foo-opacity'),
|
|
146
|
+
/// (color-key: 'bar-color', opacity-key: 'bar-opacity'),
|
|
147
|
+
/// )) = (foo-color: rgba(255, 0, 0, 0.2), bar-color: rgba(0, 255, 0, 0.3))
|
|
148
|
+
///
|
|
149
|
+
/// @param {Map} $map - the map with the values to modify.
|
|
150
|
+
/// @param {List<Map>} $color-opacity-key-pairs - the list of color/opacity key
|
|
151
|
+
/// pairs to join on the list.
|
|
152
|
+
/// @return {$Map} The map with the given color/opacity key pairs replaced by
|
|
153
|
+
/// RGBA representations.
|
|
154
|
+
///
|
|
155
|
+
@function join-color-and-opacity-pairs($map, $color-opacity-key-pairs) {
|
|
156
|
+
// Make a non-destructive copy of the map.
|
|
157
|
+
$out: map.merge($map, ());
|
|
158
|
+
@each $pair in $color-opacity-key-pairs {
|
|
159
|
+
$color-key: map.get($pair, color-key);
|
|
160
|
+
$opacity-key: map.get($pair, opacity-key);
|
|
161
|
+
$has-keys: map.has-key($out, $color-key) and
|
|
162
|
+
map.has-key($out, $opacity-key);
|
|
163
|
+
@if $has-keys {
|
|
164
|
+
$out: replace-as-rgba($out, $color-key, $opacity-key);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
@return $out;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/// @example - scss
|
|
171
|
+
/// @debug _hex-to-dec('f8'); // 248
|
|
172
|
+
/// @param {String} $string - Hex number in string format.
|
|
173
|
+
/// @return {Number} Returns decimal number for given hex number.
|
|
174
|
+
@function _hex-to-dec($string) {
|
|
175
|
+
$string: string.to-lower-case($string);
|
|
176
|
+
$length: string.length($string);
|
|
177
|
+
|
|
178
|
+
$dec: 0;
|
|
179
|
+
@for $i from 1 through $length {
|
|
180
|
+
$factor: 1 + (15 * ($length - $i));
|
|
181
|
+
$index: list.index($_hex, string.slice($string, $i, $i));
|
|
182
|
+
$dec: $dec + $factor * ($index - 1);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@return $dec;
|
|
186
|
+
}
|
package/sass/_dom.scss
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
///
|
|
7
|
+
/// Emits necessary layout styles to set a transparent border around an element
|
|
8
|
+
/// without interfering with the rest of its component layout. The border is
|
|
9
|
+
/// only visible in high-contrast mode. The target element should be a child of
|
|
10
|
+
/// a relatively positioned top-level element (i.e. a ::before pseudo-element).
|
|
11
|
+
///
|
|
12
|
+
/// @param {number} $border-width - The width of the transparent border.
|
|
13
|
+
/// @param {string} $border-style - The style of the transparent border.
|
|
14
|
+
///
|
|
15
|
+
@mixin transparent-border($border-width: 1px, $border-style: solid) {
|
|
16
|
+
position: absolute;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
border: $border-width $border-style transparent;
|
|
23
|
+
border-radius: inherit;
|
|
24
|
+
content: '';
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
///
|
|
29
|
+
/// Visually hides text content for accessibility. This text should only be
|
|
30
|
+
/// visible to screen reader users.
|
|
31
|
+
/// See https://a11yproject.com/posts/how-to-hide-content/
|
|
32
|
+
///
|
|
33
|
+
@mixin visually-hidden() {
|
|
34
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
35
|
+
height: 1px;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
position: absolute;
|
|
38
|
+
white-space: nowrap; /* added line */
|
|
39
|
+
width: 1px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
///
|
|
43
|
+
/// While in `forced-colors` mode, only system colors should be used.
|
|
44
|
+
///
|
|
45
|
+
/// @link https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#system_colors
|
|
46
|
+
/// @link https://developer.mozilla.org/en-US/docs/Web/CSS/@media/forced-colors
|
|
47
|
+
/// @content styles to emit in `forced-colors` mode
|
|
48
|
+
@mixin forced-colors-mode() {
|
|
49
|
+
@media screen and (forced-colors: active) {
|
|
50
|
+
@content;
|
|
51
|
+
}
|
|
52
|
+
}
|