@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,752 @@
|
|
|
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:selector';
|
|
10
|
+
@use 'sass:string';
|
|
11
|
+
@use './custom-properties';
|
|
12
|
+
@use './selector-ext';
|
|
13
|
+
|
|
14
|
+
/// List of all valid states. When adding new state functions, add the name of
|
|
15
|
+
/// the state to this List.
|
|
16
|
+
$_valid-states: (
|
|
17
|
+
enabled,
|
|
18
|
+
disabled,
|
|
19
|
+
dragged,
|
|
20
|
+
error,
|
|
21
|
+
focus,
|
|
22
|
+
hover,
|
|
23
|
+
opened,
|
|
24
|
+
pressed,
|
|
25
|
+
selected,
|
|
26
|
+
unselected
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
/// Retrieves the default state from the provided parameter. The parameter may
|
|
30
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
31
|
+
/// describing each state's value.
|
|
32
|
+
///
|
|
33
|
+
/// @example
|
|
34
|
+
/// get-default-state(blue); // blue
|
|
35
|
+
/// get-default-state((default: blue)); // blue
|
|
36
|
+
/// get-default-state((hover: red)); // null
|
|
37
|
+
///
|
|
38
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
39
|
+
/// @return The default state if present, or null.
|
|
40
|
+
@function get-default-state($default-or-map) {
|
|
41
|
+
$state: _get-state($default-or-map, default);
|
|
42
|
+
@if $state == null and not _is-state-map($default-or-map) {
|
|
43
|
+
@return $default-or-map;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@return $state;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/// Retrieves the enabled state from the provided parameter. The parameter may
|
|
50
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
51
|
+
/// describing each state's value.
|
|
52
|
+
///
|
|
53
|
+
/// @example
|
|
54
|
+
/// get-enabled-state(blue); // blue
|
|
55
|
+
/// get-enabled-state((enabled: blue)); // blue
|
|
56
|
+
/// get-enabled-state((hover: red)); // null
|
|
57
|
+
///
|
|
58
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
59
|
+
/// @return The enabled state if present, or null.
|
|
60
|
+
@function get-enabled-state($default-or-map) {
|
|
61
|
+
@return _get-state($default-or-map, enabled);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// Retrieves the disabled state from the provided parameter. The parameter may
|
|
65
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
66
|
+
/// describing each state's value.
|
|
67
|
+
///
|
|
68
|
+
/// @example
|
|
69
|
+
/// get-disabled-state(blue); // null
|
|
70
|
+
/// get-disabled-state((disabled: red)); // red
|
|
71
|
+
/// get-disabled-state((default: blue)); // null
|
|
72
|
+
///
|
|
73
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
74
|
+
/// @return The disabled state if present, or null.
|
|
75
|
+
@function get-disabled-state($default-or-map) {
|
|
76
|
+
@return _get-state($default-or-map, disabled);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/// Retrieves the dragged state from the provided parameter. The parameter may
|
|
80
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
81
|
+
/// describing each state's value.
|
|
82
|
+
///
|
|
83
|
+
/// @example
|
|
84
|
+
/// get-dragged-state(blue); // null
|
|
85
|
+
/// get-dragged-state((dragged: red)); // red
|
|
86
|
+
/// get-dragged-state((default: blue)); // null
|
|
87
|
+
///
|
|
88
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
89
|
+
/// @return The dragged state if present, or null.
|
|
90
|
+
@function get-dragged-state($default-or-map) {
|
|
91
|
+
@return _get-state($default-or-map, dragged);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/// Retrieves the error state from the provided parameter. The parameter may
|
|
95
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
96
|
+
/// describing each state's value.
|
|
97
|
+
///
|
|
98
|
+
/// @example
|
|
99
|
+
/// get-error-state(blue); // null
|
|
100
|
+
/// get-error-state((error: red)); // red
|
|
101
|
+
/// get-error-state((default: blue)); // null
|
|
102
|
+
///
|
|
103
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
104
|
+
/// @return The error state if present, or null.
|
|
105
|
+
@function get-error-state($default-or-map) {
|
|
106
|
+
@return _get-state($default-or-map, error);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/// Retrieves the focus state from the provided parameter. The parameter may
|
|
110
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
111
|
+
/// describing each state's value.
|
|
112
|
+
///
|
|
113
|
+
/// @example
|
|
114
|
+
/// get-focus-state(blue); // null
|
|
115
|
+
/// get-focus-state((focus: red)); // red
|
|
116
|
+
/// get-focus-state((default: blue)); // null
|
|
117
|
+
///
|
|
118
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
119
|
+
/// @return The focus state if present, or null.
|
|
120
|
+
@function get-focus-state($default-or-map) {
|
|
121
|
+
@return _get-state($default-or-map, focus);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// Retrieves the hover state from the provided parameter. The parameter may
|
|
125
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
126
|
+
/// describing each state's value.
|
|
127
|
+
///
|
|
128
|
+
/// @example
|
|
129
|
+
/// get-hover-state(blue); // null
|
|
130
|
+
/// get-hover-state((hover: red)); // red
|
|
131
|
+
/// get-hover-state((default: blue)); // null
|
|
132
|
+
///
|
|
133
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
134
|
+
/// @return The hover state if present, or null.
|
|
135
|
+
@function get-hover-state($default-or-map) {
|
|
136
|
+
@return _get-state($default-or-map, hover);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/// Retrieves the opened state from the provided parameter. The parameter may
|
|
140
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
141
|
+
/// describing each state's value.
|
|
142
|
+
///
|
|
143
|
+
/// @example
|
|
144
|
+
/// get-opened-state(blue); // null
|
|
145
|
+
/// get-opened-state((opened: red)); // red
|
|
146
|
+
/// get-opened-state((default: blue)); // null
|
|
147
|
+
///
|
|
148
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
149
|
+
/// @return The opened state if present, or null.
|
|
150
|
+
@function get-opened-state($default-or-map) {
|
|
151
|
+
@return _get-state($default-or-map, opened);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/// Retrieves the pressed state from the provided parameter. The parameter may
|
|
155
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
156
|
+
/// describing each state's value.
|
|
157
|
+
///
|
|
158
|
+
/// @example
|
|
159
|
+
/// get-pressed-state(blue); // null
|
|
160
|
+
/// get-pressed-state((pressed: red)); // red
|
|
161
|
+
/// get-pressed-state((default: blue)); // null
|
|
162
|
+
///
|
|
163
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
164
|
+
/// @return The pressed state if present, or null.
|
|
165
|
+
@function get-pressed-state($default-or-map) {
|
|
166
|
+
@return _get-state($default-or-map, pressed);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/// Retrieves the selected state from the provided parameter. The parameter may
|
|
170
|
+
/// be the state's default value or a state Map. A state Map has individual keys
|
|
171
|
+
/// describing each state's value.
|
|
172
|
+
///
|
|
173
|
+
/// @example
|
|
174
|
+
/// get-selected-state(blue); // null
|
|
175
|
+
/// get-selected-state((selected: red)); // red
|
|
176
|
+
/// get-selected-state((default: blue)); // null
|
|
177
|
+
///
|
|
178
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
179
|
+
/// @return The selected state if present, or null.
|
|
180
|
+
@function get-selected-state($default-or-map) {
|
|
181
|
+
@return _get-state($default-or-map, selected);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/// Retrieves the unselected state from the provided parameter. The parameter
|
|
185
|
+
/// may be the state's default value or a state Map. A state Map has individual
|
|
186
|
+
/// key describing each state's value.
|
|
187
|
+
///
|
|
188
|
+
/// @example
|
|
189
|
+
/// get-unselected-state(blue); // null
|
|
190
|
+
/// get-unselected-state((unselected: red)); // red
|
|
191
|
+
/// get-unselected-state((default: blue)); // null
|
|
192
|
+
///
|
|
193
|
+
/// @param {*} $default-or-map - The state's default value or a state Map.
|
|
194
|
+
/// @return The unselected state if present, or null.
|
|
195
|
+
@function get-unselected-state($default-or-map) {
|
|
196
|
+
@return _get-state($default-or-map, unselected);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@function _get-state($default-or-map, $state) {
|
|
200
|
+
@if _is-state-map($default-or-map) {
|
|
201
|
+
@return map.get($default-or-map, $state);
|
|
202
|
+
} @else {
|
|
203
|
+
@return null;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@function _is-state-map($default-or-map) {
|
|
208
|
+
@return meta.type-of($default-or-map) == 'map' and not
|
|
209
|
+
custom-properties.is-custom-prop($default-or-map);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/// Appends the default state selector to the current parent.
|
|
213
|
+
///
|
|
214
|
+
/// @example - scss
|
|
215
|
+
/// .mdc-foo {
|
|
216
|
+
/// @include default($selectors) {
|
|
217
|
+
/// color: teal;
|
|
218
|
+
/// }
|
|
219
|
+
/// }
|
|
220
|
+
///
|
|
221
|
+
/// @example - css
|
|
222
|
+
/// .mdc-foo:enabled {
|
|
223
|
+
/// color: teal;
|
|
224
|
+
/// }
|
|
225
|
+
///
|
|
226
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
227
|
+
/// selectors.
|
|
228
|
+
@mixin default($selectors) {
|
|
229
|
+
@include enabled($selectors) {
|
|
230
|
+
@content;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/// Appends the enabled state selector to the current parent.
|
|
235
|
+
///
|
|
236
|
+
/// @example - scss
|
|
237
|
+
/// .mdc-foo {
|
|
238
|
+
/// @include enabled($selectors) {
|
|
239
|
+
/// color: teal;
|
|
240
|
+
/// }
|
|
241
|
+
/// }
|
|
242
|
+
///
|
|
243
|
+
/// @example - css
|
|
244
|
+
/// .mdc-foo:enabled {
|
|
245
|
+
/// color: teal;
|
|
246
|
+
/// }
|
|
247
|
+
///
|
|
248
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
249
|
+
/// selectors.
|
|
250
|
+
@mixin enabled($selectors) {
|
|
251
|
+
@include _selector($selectors, enabled) {
|
|
252
|
+
@content;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/// Appends the disabled state selector to the current parent.
|
|
257
|
+
///
|
|
258
|
+
/// @example - scss
|
|
259
|
+
/// .mdc-foo {
|
|
260
|
+
/// @include disabled($selectors) {
|
|
261
|
+
/// color: teal;
|
|
262
|
+
/// }
|
|
263
|
+
/// }
|
|
264
|
+
///
|
|
265
|
+
/// @example - css
|
|
266
|
+
/// .mdc-foo:disabled {
|
|
267
|
+
/// color: teal;
|
|
268
|
+
/// }
|
|
269
|
+
///
|
|
270
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
271
|
+
/// selectors.
|
|
272
|
+
@mixin disabled($selectors) {
|
|
273
|
+
@include _selector($selectors, disabled) {
|
|
274
|
+
@content;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/// Appends the dragged state selector to the current parent.
|
|
279
|
+
///
|
|
280
|
+
/// @example - scss
|
|
281
|
+
/// .mdc-foo {
|
|
282
|
+
/// @include dragged($selectors) {
|
|
283
|
+
/// color: teal;
|
|
284
|
+
/// }
|
|
285
|
+
/// }
|
|
286
|
+
///
|
|
287
|
+
/// @example - css
|
|
288
|
+
/// .mdc-foo:enabled.mdc-foo--dragged {
|
|
289
|
+
/// color: teal;
|
|
290
|
+
/// }
|
|
291
|
+
///
|
|
292
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
293
|
+
/// selectors.
|
|
294
|
+
@mixin dragged($selectors) {
|
|
295
|
+
@include enabled($selectors) {
|
|
296
|
+
@include _selector($selectors, dragged) {
|
|
297
|
+
@content;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/// Appends the error state selector to the current parent.
|
|
303
|
+
///
|
|
304
|
+
/// @example - scss
|
|
305
|
+
/// .mdc-foo {
|
|
306
|
+
/// @include error($selectors) {
|
|
307
|
+
/// color: teal;
|
|
308
|
+
/// }
|
|
309
|
+
/// }
|
|
310
|
+
///
|
|
311
|
+
/// @example - css
|
|
312
|
+
/// .mdc-foo:invalid {
|
|
313
|
+
/// color: teal;
|
|
314
|
+
/// }
|
|
315
|
+
///
|
|
316
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
317
|
+
/// selectors.
|
|
318
|
+
@mixin error($selectors) {
|
|
319
|
+
@include _selector($selectors, error) {
|
|
320
|
+
@content;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/// Appends the focus state selector to the current parent.
|
|
325
|
+
///
|
|
326
|
+
/// @example - scss
|
|
327
|
+
/// .mdc-foo {
|
|
328
|
+
/// @include focus($selectors) {
|
|
329
|
+
/// color: teal;
|
|
330
|
+
/// }
|
|
331
|
+
/// }
|
|
332
|
+
///
|
|
333
|
+
/// @example - css
|
|
334
|
+
/// .mdc-foo:enabled:focus:not(:active) {
|
|
335
|
+
/// color: teal;
|
|
336
|
+
/// }
|
|
337
|
+
///
|
|
338
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
339
|
+
/// selectors.
|
|
340
|
+
@mixin focus($selectors) {
|
|
341
|
+
@include enabled($selectors) {
|
|
342
|
+
@include _selector($selectors, focus) {
|
|
343
|
+
@content;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/// Appends the hover state selector to the current parent.
|
|
349
|
+
///
|
|
350
|
+
/// @example - scss
|
|
351
|
+
/// .mdc-foo {
|
|
352
|
+
/// @include hover($selectors) {
|
|
353
|
+
/// color: teal;
|
|
354
|
+
/// }
|
|
355
|
+
/// }
|
|
356
|
+
///
|
|
357
|
+
/// @example - css
|
|
358
|
+
/// .mdc-foo:enabled:hover:not(:focus):not(:active) {
|
|
359
|
+
/// color: teal;
|
|
360
|
+
/// }
|
|
361
|
+
///
|
|
362
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
363
|
+
/// selectors.
|
|
364
|
+
@mixin hover($selectors) {
|
|
365
|
+
@include enabled($selectors) {
|
|
366
|
+
@include _selector($selectors, hover) {
|
|
367
|
+
@content;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/// Appends the opened state selector to the current parent.
|
|
373
|
+
///
|
|
374
|
+
/// @example - scss
|
|
375
|
+
/// .mdc-foo {
|
|
376
|
+
/// @include opened($selectors) {
|
|
377
|
+
/// color: teal;
|
|
378
|
+
/// }
|
|
379
|
+
/// }
|
|
380
|
+
///
|
|
381
|
+
/// @example - css
|
|
382
|
+
/// .mdc-foo.mdc-foo--opened {
|
|
383
|
+
/// color: teal;
|
|
384
|
+
/// }
|
|
385
|
+
///
|
|
386
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
387
|
+
/// selectors.
|
|
388
|
+
@mixin opened($selectors) {
|
|
389
|
+
@include _selector($selectors, opened) {
|
|
390
|
+
@content;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/// Appends the pressed state selector to the current parent.
|
|
395
|
+
///
|
|
396
|
+
/// @example - scss
|
|
397
|
+
/// .mdc-foo {
|
|
398
|
+
/// @include pressed($selectors) {
|
|
399
|
+
/// color: teal;
|
|
400
|
+
/// }
|
|
401
|
+
/// }
|
|
402
|
+
///
|
|
403
|
+
/// @example - css
|
|
404
|
+
/// .mdc-foo:enabled:active {
|
|
405
|
+
/// color: teal;
|
|
406
|
+
/// }
|
|
407
|
+
///
|
|
408
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
409
|
+
/// selectors.
|
|
410
|
+
@mixin pressed($selectors) {
|
|
411
|
+
@include enabled($selectors) {
|
|
412
|
+
@include _selector($selectors, pressed) {
|
|
413
|
+
@content;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/// Appends the selected state selector to the current parent.
|
|
419
|
+
///
|
|
420
|
+
/// @example - scss
|
|
421
|
+
/// .mdc-foo {
|
|
422
|
+
/// @include selected($selectors) {
|
|
423
|
+
/// color: teal;
|
|
424
|
+
/// }
|
|
425
|
+
/// }
|
|
426
|
+
///
|
|
427
|
+
/// @example - css
|
|
428
|
+
/// .mdc-foo.mdc-foo--selected {
|
|
429
|
+
/// color: teal;
|
|
430
|
+
/// }
|
|
431
|
+
///
|
|
432
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
433
|
+
/// selectors.
|
|
434
|
+
@mixin selected($selectors) {
|
|
435
|
+
@include _selector($selectors, selected) {
|
|
436
|
+
@content;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/// Appends the unselected state selector to the current parent.
|
|
441
|
+
///
|
|
442
|
+
/// @example - scss
|
|
443
|
+
/// .mdc-foo {
|
|
444
|
+
/// @include unselected($selectors) {
|
|
445
|
+
/// color: teal;
|
|
446
|
+
/// }
|
|
447
|
+
/// }
|
|
448
|
+
///
|
|
449
|
+
/// @example - css
|
|
450
|
+
/// .mdc-foo.mdc-foo--unselected {
|
|
451
|
+
/// color: teal;
|
|
452
|
+
/// }
|
|
453
|
+
///
|
|
454
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
455
|
+
/// selectors.
|
|
456
|
+
@mixin unselected($selectors) {
|
|
457
|
+
@include _selector($selectors, unselected) {
|
|
458
|
+
@content;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/// Creates and returns a Map of independent selectors from a Map of simple
|
|
463
|
+
/// selectors.
|
|
464
|
+
///
|
|
465
|
+
/// This function ensures that each selector is independent given all possible
|
|
466
|
+
/// states provided. An "independent" selector does not rely on CSS override
|
|
467
|
+
/// order or specificity.
|
|
468
|
+
///
|
|
469
|
+
/// @example - scss
|
|
470
|
+
/// $selectors: state.create-selectors(
|
|
471
|
+
/// (
|
|
472
|
+
/// disabled: ':disabled',
|
|
473
|
+
/// hover: ':hover',
|
|
474
|
+
/// focus: ':focus',
|
|
475
|
+
/// pressed: ':active',
|
|
476
|
+
/// )
|
|
477
|
+
/// );
|
|
478
|
+
/// // (
|
|
479
|
+
/// // enabled: ':enabled',
|
|
480
|
+
/// // disabled: ':disabled',
|
|
481
|
+
/// // hover: ':hover:not(:focus):not(:active)',
|
|
482
|
+
/// // focus: ':focus:not(:active)',
|
|
483
|
+
/// // pressed: ':active',
|
|
484
|
+
/// // )
|
|
485
|
+
///
|
|
486
|
+
/// @see {function} _create-independent-selector
|
|
487
|
+
///
|
|
488
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
489
|
+
/// selectors.
|
|
490
|
+
/// @return {Map} A Map of state selectors.
|
|
491
|
+
@function _create-selectors($selectors) {
|
|
492
|
+
$new-selectors: ();
|
|
493
|
+
@each $state, $selector in $selectors {
|
|
494
|
+
@if not list.index($_valid-states, $state) {
|
|
495
|
+
@error 'Unsupported state #{$state}, must be one of #{$_valid-states}.';
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// Check if there are any dependent states for this state that we need to
|
|
499
|
+
// add to the selector with :not()
|
|
500
|
+
$dependent-states: ();
|
|
501
|
+
@each $group in $_dependent-state-groups {
|
|
502
|
+
$index: list.index($group, $state);
|
|
503
|
+
@if $index and $index < list.length($group) {
|
|
504
|
+
// State is part of this group. Add any remaining selectors as
|
|
505
|
+
// dependents, only if they haven't already been added (the state may be
|
|
506
|
+
// part of multiple groups with shared state dependents, like
|
|
507
|
+
// :hover:focus:active and :link:visited:hover:active)
|
|
508
|
+
@for $i from $index + 1 through list.length($group) {
|
|
509
|
+
$dependent: list.nth($group, $i);
|
|
510
|
+
@if not list.index($dependent-states, $dependent) {
|
|
511
|
+
$dependent-states: list.append($dependent-states, $dependent);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
$dependents: ();
|
|
518
|
+
@each $dependent-state in $dependent-states {
|
|
519
|
+
$dependent: map.get($selectors, $dependent-state);
|
|
520
|
+
@if $dependent and not list.index($_independent-states, $dependent-state)
|
|
521
|
+
{
|
|
522
|
+
$dependents: list.append($dependents, $dependent);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// Make the selector independent (if any dependents were found)
|
|
527
|
+
$selector: _create-independent-selector($selector, $dependents...);
|
|
528
|
+
$new-selectors: map.set($new-selectors, $state, $selector);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
$new-selectors: _add-default-enabled-selector($new-selectors);
|
|
532
|
+
|
|
533
|
+
@return $new-selectors;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/// Adds a default selector for the "enabled" state if one does not exist and if
|
|
537
|
+
/// it is possible to infer one from the provided Map of selectors.
|
|
538
|
+
///
|
|
539
|
+
/// @example - scss
|
|
540
|
+
/// _add-default-enabled-selector((disabled: ':disabled'));
|
|
541
|
+
/// // (
|
|
542
|
+
/// // disabled: ':disabled',
|
|
543
|
+
/// // enabled: ':enabled',
|
|
544
|
+
/// // )
|
|
545
|
+
///
|
|
546
|
+
/// _add-default-enabled-selector((disabled: '.mdc-foo--disabled'));
|
|
547
|
+
/// // (
|
|
548
|
+
/// // disabled: '.mdc-foo--disabled',
|
|
549
|
+
/// // enabled: ':not(.mdc-foo--disabled)',
|
|
550
|
+
/// // )
|
|
551
|
+
///
|
|
552
|
+
/// @param {Map} $selectors - A Map of state selectors.
|
|
553
|
+
/// @return {Map} The same Map of selectors, potentially with an additional
|
|
554
|
+
/// "enabled" key with the enabled selector value.
|
|
555
|
+
@function _add-default-enabled-selector($selectors) {
|
|
556
|
+
$enabled: map.get($selectors, enabled);
|
|
557
|
+
$disabled: map.get($selectors, disabled);
|
|
558
|
+
@if $disabled == ':disabled' {
|
|
559
|
+
@if $enabled and $enabled != ':enabled' {
|
|
560
|
+
// TODO(b/232779012): Clean up instances of :not(:disabled)
|
|
561
|
+
// Enabled selector was provided, but it was not :enabled. These
|
|
562
|
+
// can be cleaned up, but don't change them right now.
|
|
563
|
+
@warn 'Use :enabled instead of #{$enabled} when using :disabled.';
|
|
564
|
+
@return $selectors;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// For :disabled, use :enabled instead of the :not() variant
|
|
568
|
+
@return map.set($selectors, enabled, ':enabled');
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
@if $disabled and not $enabled {
|
|
572
|
+
@return map.set($selectors, enabled, selector-ext.negate($disabled));
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
@return $selectors;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/// A Map of override selectors. This can be used to temporarily change and
|
|
579
|
+
/// configure state selectors.
|
|
580
|
+
/// @type {Map}
|
|
581
|
+
/// @see {mixin} override-selectors
|
|
582
|
+
$_override-selectors: ();
|
|
583
|
+
|
|
584
|
+
/// Override the current selectors provided to a state mixin for the provided
|
|
585
|
+
/// content.
|
|
586
|
+
///
|
|
587
|
+
/// @example - scss
|
|
588
|
+
/// // Change theme so that focus styles only show during keyboard navigation
|
|
589
|
+
/// @include state.override-selectors((focus: ':focus-within')) {
|
|
590
|
+
/// @include foo.theme($theme);
|
|
591
|
+
/// }
|
|
592
|
+
///
|
|
593
|
+
/// @param {Map} $selectors A Map whose keys are states and values are string
|
|
594
|
+
/// selectors.
|
|
595
|
+
/// @content The styles to override state selectors for.
|
|
596
|
+
@mixin override-selectors($selectors) {
|
|
597
|
+
$reset: $_override-selectors;
|
|
598
|
+
$_override-selectors: $selectors !global;
|
|
599
|
+
@content;
|
|
600
|
+
$_override-selectors: $reset !global;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
$_independent-states: ();
|
|
604
|
+
|
|
605
|
+
/// Indicates that for the given content of state mixins, the provided states
|
|
606
|
+
/// are on their own independent elements and that they should ignore typical
|
|
607
|
+
/// dependent groupings, such as `:hover`, `:focus`, and `:active`.
|
|
608
|
+
///
|
|
609
|
+
/// This mixin is useful when multiple states within a typical dependency group
|
|
610
|
+
/// need to be visible at the same time (such as `:focus` and `:active`). To
|
|
611
|
+
/// achieve this, the states must be on their own independent elements (such as
|
|
612
|
+
/// separate `::before` and `::after` pseudo elements).
|
|
613
|
+
///
|
|
614
|
+
/// @example - scss
|
|
615
|
+
/// .broken-ripple {
|
|
616
|
+
/// @include state.hover {
|
|
617
|
+
/// &::before { opacity: 0.1; }
|
|
618
|
+
/// }
|
|
619
|
+
/// @include state.focus {
|
|
620
|
+
/// &::before { opacity: 0.2; }
|
|
621
|
+
/// }
|
|
622
|
+
/// @include state.pressed {
|
|
623
|
+
/// &::after { opacity: 0.3; }
|
|
624
|
+
/// }
|
|
625
|
+
/// }
|
|
626
|
+
///
|
|
627
|
+
/// .fixed-ripple {
|
|
628
|
+
/// @include state.independent-elements(pressed) {
|
|
629
|
+
/// @include state.hover {
|
|
630
|
+
/// &::before { opacity: 0.1; }
|
|
631
|
+
/// }
|
|
632
|
+
/// @include state.focus {
|
|
633
|
+
/// &::before { opacity: 0.2; }
|
|
634
|
+
/// }
|
|
635
|
+
/// @include state.pressed {
|
|
636
|
+
/// &::before { opacity: 0.3; }
|
|
637
|
+
/// }
|
|
638
|
+
/// }
|
|
639
|
+
/// }
|
|
640
|
+
///
|
|
641
|
+
/// @example - css
|
|
642
|
+
/// .broken-ripple:hover:not(:focus):not(:active)::before {
|
|
643
|
+
/// opacity: 0.1;
|
|
644
|
+
/// }
|
|
645
|
+
/// .broken-ripple:focus:not(:active)::before {
|
|
646
|
+
/// /* Focus styles will not be visible due to :not(:active)!! */
|
|
647
|
+
/// opacity: 0.2;
|
|
648
|
+
/// }
|
|
649
|
+
/// .broken-ripple:active::after {
|
|
650
|
+
/// opacity: 0.3;
|
|
651
|
+
/// }
|
|
652
|
+
///
|
|
653
|
+
/// .fixed-ripple:hover:not(:focus)::before {
|
|
654
|
+
/// opacity: 0.1;
|
|
655
|
+
/// }
|
|
656
|
+
/// .fixed-ripple:focus::before {
|
|
657
|
+
/// /* Both focus and pressed styles are visible during press. Only hover
|
|
658
|
+
/// and focus need to be independent of each other since they share an
|
|
659
|
+
/// element. */
|
|
660
|
+
/// opacity: 0.2;
|
|
661
|
+
/// }
|
|
662
|
+
/// .fixed-ripple:active::after {
|
|
663
|
+
/// opacity: 0.3;
|
|
664
|
+
/// }
|
|
665
|
+
///
|
|
666
|
+
/// @param {String...} $states - One or more states that should be considered
|
|
667
|
+
/// independent and on its own element.
|
|
668
|
+
/// @content Two or more state mixins that are part of a dependency group
|
|
669
|
+
/// involving the provided independent states.
|
|
670
|
+
@mixin independent-elements($states...) {
|
|
671
|
+
$reset: $_independent-states;
|
|
672
|
+
$_independent-states: $states !global;
|
|
673
|
+
@content;
|
|
674
|
+
$_independent-states: $reset !global;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/// A List of state groups that are dependent on each other for CSS override
|
|
678
|
+
/// order. These are used to determine which state selectors are needed for
|
|
679
|
+
/// `_create-independent-selector()`.
|
|
680
|
+
// Note: Sass syntax does not allow declaring nested Lists; an empty second List
|
|
681
|
+
// placeholder is added for the correct data structure.
|
|
682
|
+
$_dependent-state-groups: ((hover, focus, pressed), ());
|
|
683
|
+
|
|
684
|
+
/// Creates a selector that will be independent based on the other selectors
|
|
685
|
+
/// that are dependents of it.
|
|
686
|
+
///
|
|
687
|
+
/// Selector dependencies are selector groups that must follow a certain order
|
|
688
|
+
/// for CSS overrides. For example: `:hover`, `:focus`, `:active` or `:link`,
|
|
689
|
+
/// `:visited`, `:hover`, `:active`.
|
|
690
|
+
///
|
|
691
|
+
/// Selectors at the start of a group are dependencies of selectors at the end
|
|
692
|
+
/// of a group.
|
|
693
|
+
///
|
|
694
|
+
/// @example - scss
|
|
695
|
+
/// #{_create-independent-selector(':hover', ':focus', ':active')} {
|
|
696
|
+
/// color: teal;
|
|
697
|
+
/// }
|
|
698
|
+
///
|
|
699
|
+
/// #{_create-independent-selector(':focus', ':active')} {
|
|
700
|
+
/// color: magenta;
|
|
701
|
+
/// }
|
|
702
|
+
///
|
|
703
|
+
/// @example - css
|
|
704
|
+
/// :hover:not(:focus):not(:active) {
|
|
705
|
+
/// color: teal;
|
|
706
|
+
/// }
|
|
707
|
+
///
|
|
708
|
+
/// :focus:not(:active) {
|
|
709
|
+
/// color: magenta;
|
|
710
|
+
/// }
|
|
711
|
+
///
|
|
712
|
+
/// The returned selector is considered "independent" and does not rely on CSS
|
|
713
|
+
/// override order or specificity within its group. In other words, "hover"
|
|
714
|
+
/// styles can be customized after "focus" styles without hiding default focus
|
|
715
|
+
/// styles.
|
|
716
|
+
///
|
|
717
|
+
/// @example - css
|
|
718
|
+
/// /* Default focus styles */
|
|
719
|
+
/// :focus:not(:active) { color: magenta; }
|
|
720
|
+
///
|
|
721
|
+
/// /* New hover styles, does not prevent focus styles from being visible */
|
|
722
|
+
/// :hover:not(:focus):not(:active) { color: orange; }
|
|
723
|
+
///
|
|
724
|
+
/// @param {String} $selector - The main selector to target.
|
|
725
|
+
/// @param {String...} $dependents - Additional group dependents of the main
|
|
726
|
+
/// selector. They will be added as `:not()` selectors.
|
|
727
|
+
/// @return {List} A new independent selector in selector value format.
|
|
728
|
+
@function _create-independent-selector($selector, $dependents...) {
|
|
729
|
+
@each $dependent in $dependents {
|
|
730
|
+
@if $dependent {
|
|
731
|
+
$selector: selector-ext.append-strict(
|
|
732
|
+
$selector,
|
|
733
|
+
selector-ext.negate($dependent)
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
@return $selector;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
@mixin _selector($selectors, $state) {
|
|
742
|
+
$selectors: _create-selectors(map.merge($selectors, $_override-selectors));
|
|
743
|
+
@if not map.has-key($selectors, $state) {
|
|
744
|
+
@error 'Missing #{$state} from #{$selectors}';
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
@at-root {
|
|
748
|
+
#{selector-ext.append-strict(&, map.get($selectors, $state))} {
|
|
749
|
+
@content;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|