@angular/material 18.2.0-next.1 → 18.2.0-next.3
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/_index.scss +3 -1
- package/button/_button-base.scss +5 -11
- package/checkbox/_checkbox-common.scss +47 -15
- package/checkbox/index.d.ts +6 -1
- package/chips/index.d.ts +3 -8
- package/core/_core.scss +15 -18
- package/core/m2/_typography.scss +129 -2
- package/core/ripple/_ripple.scss +1 -1
- package/core/style/_elevation.scss +121 -27
- package/core/style/_sass-utils.scss +20 -2
- package/core/theming/_definition.scss +2 -0
- package/core/tokens/_m3-tokens.scss +118 -22
- package/core/tokens/_token-definition.scss +272 -0
- package/core/tokens/_token-utils.scss +68 -239
- package/core/tokens/m2/mat/_app.scss +4 -4
- package/core/tokens/m2/mat/_autocomplete.scss +4 -4
- package/core/tokens/m2/mat/_badge.scss +4 -4
- package/core/tokens/m2/mat/_bottom-sheet.scss +4 -4
- package/core/tokens/m2/mat/_card.scss +4 -4
- package/core/tokens/m2/mat/_checkbox.scss +4 -4
- package/core/tokens/m2/mat/_chip.scss +4 -4
- package/core/tokens/m2/mat/_datepicker.scss +4 -4
- package/core/tokens/m2/mat/_dialog.scss +4 -4
- package/core/tokens/m2/mat/_divider.scss +4 -4
- package/core/tokens/m2/mat/_expansion.scss +4 -4
- package/core/tokens/m2/mat/_fab-small.scss +7 -7
- package/core/tokens/m2/mat/_fab.scss +7 -7
- package/core/tokens/m2/mat/_filled-button.scss +7 -7
- package/core/tokens/m2/mat/_form-field.scss +4 -6
- package/core/tokens/m2/mat/_full-pseudo-checkbox.scss +4 -4
- package/core/tokens/m2/mat/_grid-list.scss +4 -4
- package/core/tokens/m2/mat/_icon-button.scss +4 -4
- package/core/tokens/m2/mat/_icon.scss +4 -4
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +4 -4
- package/core/tokens/m2/mat/_list.scss +4 -4
- package/core/tokens/m2/mat/_menu.scss +4 -4
- package/core/tokens/m2/mat/_minimal-pseudo-checkbox.scss +4 -4
- package/core/tokens/m2/mat/_optgroup.scss +4 -4
- package/core/tokens/m2/mat/_option.scss +4 -4
- package/core/tokens/m2/mat/_outlined-button.scss +4 -4
- package/core/tokens/m2/mat/_paginator.scss +4 -4
- package/core/tokens/m2/mat/_protected-button.scss +7 -7
- package/core/tokens/m2/mat/_radio.scss +4 -4
- package/core/tokens/m2/mat/_ripple.scss +4 -4
- package/core/tokens/m2/mat/_select.scss +7 -7
- package/core/tokens/m2/mat/_sidenav.scss +4 -4
- package/core/tokens/m2/mat/_slider.scss +4 -4
- package/core/tokens/m2/mat/_snack-bar.scss +4 -4
- package/core/tokens/m2/mat/_sort.scss +4 -4
- package/core/tokens/m2/mat/_standard-button-toggle.scss +4 -4
- package/core/tokens/m2/mat/_stepper.scss +4 -4
- package/core/tokens/m2/mat/_switch.scss +4 -4
- package/core/tokens/m2/mat/_tab-header-with-background.scss +4 -4
- package/core/tokens/m2/mat/_tab-header.scss +4 -4
- package/core/tokens/m2/mat/_table.scss +4 -4
- package/core/tokens/m2/mat/_text-button.scss +4 -4
- package/core/tokens/m2/mat/_toolbar.scss +4 -4
- package/core/tokens/m2/mat/_tree.scss +4 -4
- package/core/tokens/m2/mdc/_checkbox.scss +6 -7
- package/core/tokens/m2/mdc/_chip.scss +4 -4
- package/core/tokens/m2/mdc/_circular-progress.scss +4 -4
- package/core/tokens/m2/mdc/_dialog.scss +5 -5
- package/core/tokens/m2/mdc/_elevated-card.scss +4 -4
- package/core/tokens/m2/mdc/_extended-fab.scss +4 -4
- package/core/tokens/m2/mdc/_fab-small.scss +4 -4
- package/core/tokens/m2/mdc/_fab.scss +4 -4
- package/core/tokens/m2/mdc/_filled-button.scss +6 -7
- package/core/tokens/m2/mdc/_filled-text-field.scss +7 -7
- package/core/tokens/m2/mdc/_icon-button.scss +4 -4
- package/core/tokens/m2/mdc/_linear-progress.scss +4 -4
- package/core/tokens/m2/mdc/_list.scss +4 -4
- package/core/tokens/m2/mdc/_outlined-button.scss +5 -5
- package/core/tokens/m2/mdc/_outlined-card.scss +4 -4
- package/core/tokens/m2/mdc/_outlined-text-field.scss +7 -7
- package/core/tokens/m2/mdc/_plain-tooltip.scss +4 -4
- package/core/tokens/m2/mdc/_protected-button.scss +6 -7
- package/core/tokens/m2/mdc/_radio.scss +4 -4
- package/core/tokens/m2/mdc/_secondary-navigation-tab.scss +4 -4
- package/core/tokens/m2/mdc/_slider.scss +4 -4
- package/core/tokens/m2/mdc/_snack-bar.scss +4 -4
- package/core/tokens/m2/mdc/_switch.scss +4 -4
- package/core/tokens/m2/mdc/_tab-indicator.scss +4 -4
- package/core/tokens/m2/mdc/_text-button.scss +4 -4
- package/core/tokens/m3/definitions/_index.scss +94 -0
- package/core/tokens/m3/definitions/_md-comp-checkbox.scss +120 -0
- package/core/tokens/m3/definitions/_md-comp-circular-progress-indicator.scss +27 -0
- package/core/tokens/m3/definitions/_md-comp-data-table.scss +90 -0
- package/core/tokens/m3/definitions/_md-comp-dialog.scss +123 -0
- package/core/tokens/m3/definitions/_md-comp-elevated-button.scss +87 -0
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +53 -0
- package/core/tokens/m3/definitions/_md-comp-extended-fab-primary.scss +90 -0
- package/core/tokens/m3/definitions/_md-comp-extended-fab-secondary.scss +91 -0
- package/core/tokens/m3/definitions/_md-comp-extended-fab-tertiary.scss +91 -0
- package/core/tokens/m3/definitions/_md-comp-fab-primary-small.scss +59 -0
- package/core/tokens/m3/definitions/_md-comp-fab-primary.scss +59 -0
- package/core/tokens/m3/definitions/_md-comp-fab-secondary-small.scss +60 -0
- package/core/tokens/m3/definitions/_md-comp-fab-secondary.scss +60 -0
- package/core/tokens/m3/definitions/_md-comp-fab-tertiary-small.scss +60 -0
- package/core/tokens/m3/definitions/_md-comp-fab-tertiary.scss +60 -0
- package/core/tokens/m3/definitions/_md-comp-filled-button.scss +85 -0
- package/core/tokens/m3/definitions/_md-comp-filled-card.scss +52 -0
- package/core/tokens/m3/definitions/_md-comp-filled-icon-button.scss +73 -0
- package/core/tokens/m3/definitions/_md-comp-filled-text-field.scss +189 -0
- package/core/tokens/m3/definitions/_md-comp-icon-button.scss +64 -0
- package/core/tokens/m3/definitions/_md-comp-linear-progress-indicator.scss +29 -0
- package/core/tokens/m3/definitions/_md-comp-list.scss +252 -0
- package/core/tokens/m3/definitions/_md-comp-outlined-button.scss +80 -0
- package/core/tokens/m3/definitions/_md-comp-outlined-card.scss +59 -0
- package/core/tokens/m3/definitions/_md-comp-outlined-icon-button.scss +73 -0
- package/core/tokens/m3/definitions/_md-comp-outlined-text-field.scss +171 -0
- package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +51 -0
- package/core/tokens/m3/definitions/_md-comp-radio-button.scss +62 -0
- package/core/tokens/m3/definitions/_md-comp-secondary-navigation-tab.scss +80 -0
- package/core/tokens/m3/definitions/_md-comp-slider.scss +110 -0
- package/core/tokens/m3/definitions/_md-comp-snackbar.scss +125 -0
- package/core/tokens/m3/definitions/_md-comp-switch.scss +130 -0
- package/core/tokens/m3/definitions/_md-comp-text-button.scss +73 -0
- package/core/tokens/m3/definitions/_md-ref-palette.scss +100 -0
- package/core/tokens/m3/definitions/_md-ref-typeface.scss +14 -0
- package/core/tokens/m3/definitions/_md-sys-color.scss +126 -0
- package/core/tokens/m3/definitions/_md-sys-elevation.scss +15 -0
- package/core/tokens/m3/definitions/_md-sys-motion.scss +46 -0
- package/core/tokens/m3/definitions/_md-sys-shape.scss +24 -0
- package/core/tokens/m3/definitions/_md-sys-state.scss +13 -0
- package/core/tokens/m3/definitions/_md-sys-typescale.scss +308 -0
- package/core/tokens/m3/definitions/unused/_md-comp-assist-chip.scss +105 -0
- package/core/tokens/m3/definitions/unused/_md-comp-badge.scss +54 -0
- package/core/tokens/m3/definitions/unused/_md-comp-banner.scss +71 -0
- package/core/tokens/m3/definitions/unused/_md-comp-bottom-app-bar.scss +29 -0
- package/core/tokens/m3/definitions/unused/_md-comp-carousel-item.scss +59 -0
- package/core/tokens/m3/definitions/unused/_md-comp-date-input-modal.scss +87 -0
- package/core/tokens/m3/definitions/unused/_md-comp-date-picker-docked.scss +248 -0
- package/core/tokens/m3/definitions/unused/_md-comp-date-picker-modal.scss +313 -0
- package/core/tokens/m3/definitions/unused/_md-comp-divider.scss +19 -0
- package/core/tokens/m3/definitions/unused/_md-comp-extended-fab-branded.scss +82 -0
- package/core/tokens/m3/definitions/unused/_md-comp-extended-fab-surface.scss +86 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-branded-large.scss +54 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-branded.scss +54 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-primary-large.scss +59 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-secondary-large.scss +60 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-surface-large.scss +58 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-surface-small.scss +58 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-surface.scss +58 -0
- package/core/tokens/m3/definitions/unused/_md-comp-fab-tertiary-large.scss +60 -0
- package/core/tokens/m3/definitions/unused/_md-comp-filled-autocomplete.scss +269 -0
- package/core/tokens/m3/definitions/unused/_md-comp-filled-menu-button.scss +94 -0
- package/core/tokens/m3/definitions/unused/_md-comp-filled-select.scss +274 -0
- package/core/tokens/m3/definitions/unused/_md-comp-filled-tonal-button.scss +95 -0
- package/core/tokens/m3/definitions/unused/_md-comp-filled-tonal-icon-button.scss +80 -0
- package/core/tokens/m3/definitions/unused/_md-comp-filter-chip.scss +205 -0
- package/core/tokens/m3/definitions/unused/_md-comp-full-screen-dialog.scss +109 -0
- package/core/tokens/m3/definitions/unused/_md-comp-input-chip.scss +180 -0
- package/core/tokens/m3/definitions/unused/_md-comp-menu.scss +31 -0
- package/core/tokens/m3/definitions/unused/_md-comp-navigation-bar.scss +110 -0
- package/core/tokens/m3/definitions/unused/_md-comp-navigation-drawer.scss +162 -0
- package/core/tokens/m3/definitions/unused/_md-comp-navigation-rail.scss +127 -0
- package/core/tokens/m3/definitions/unused/_md-comp-outlined-autocomplete.scss +259 -0
- package/core/tokens/m3/definitions/unused/_md-comp-outlined-menu-button.scss +90 -0
- package/core/tokens/m3/definitions/unused/_md-comp-outlined-segmented-button.scss +108 -0
- package/core/tokens/m3/definitions/unused/_md-comp-outlined-select.scss +264 -0
- package/core/tokens/m3/definitions/unused/_md-comp-primary-navigation-tab.scss +117 -0
- package/core/tokens/m3/definitions/unused/_md-comp-rich-tooltip.scss +121 -0
- package/core/tokens/m3/definitions/unused/_md-comp-scrim.scss +19 -0
- package/core/tokens/m3/definitions/unused/_md-comp-search-bar.scss +97 -0
- package/core/tokens/m3/definitions/unused/_md-comp-search-view.scss +91 -0
- package/core/tokens/m3/definitions/unused/_md-comp-sheet-bottom.scss +39 -0
- package/core/tokens/m3/definitions/unused/_md-comp-sheet-floating.scss +28 -0
- package/core/tokens/m3/definitions/unused/_md-comp-sheet-side.scss +87 -0
- package/core/tokens/m3/definitions/unused/_md-comp-standard-menu-button.scss +94 -0
- package/core/tokens/m3/definitions/unused/_md-comp-suggestion-chip.scss +121 -0
- package/core/tokens/m3/definitions/unused/_md-comp-time-input.scss +222 -0
- package/core/tokens/m3/definitions/unused/_md-comp-time-picker.scss +268 -0
- package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-large.scss +59 -0
- package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-medium.scss +59 -0
- package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-small-centered.scss +62 -0
- package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-small.scss +60 -0
- package/core/tokens/m3/mat/_app.scss +6 -3
- package/core/tokens/m3/mat/_autocomplete.scss +3 -4
- package/core/tokens/m3/mat/_badge.scss +18 -18
- package/core/tokens/m3/mat/_bottom-sheet.scss +4 -4
- package/core/tokens/m3/mat/_card.scss +4 -4
- package/core/tokens/m3/mat/_checkbox.scss +2 -2
- package/core/tokens/m3/mat/_chip.scss +5 -5
- package/core/tokens/m3/mat/_datepicker.scss +7 -7
- package/core/tokens/m3/mat/_dialog.scss +12 -11
- package/core/tokens/m3/mat/_divider.scss +3 -3
- package/core/tokens/m3/mat/_expansion.scss +7 -7
- package/core/tokens/m3/mat/_fab-small.scss +2 -2
- package/core/tokens/m3/mat/_fab.scss +2 -2
- package/core/tokens/m3/mat/_filled-button.scss +5 -5
- package/core/tokens/m3/mat/_form-field.scss +5 -5
- package/core/tokens/m3/mat/_full-pseudo-checkbox.scss +2 -2
- package/core/tokens/m3/mat/_grid-list.scss +2 -2
- package/core/tokens/m3/mat/_icon-button.scss +2 -2
- package/core/tokens/m3/mat/_icon.scss +3 -3
- package/core/tokens/m3/mat/_list.scss +2 -2
- package/core/tokens/m3/mat/_menu.scss +12 -12
- package/core/tokens/m3/mat/_minimal-pseudo-checkbox.scss +2 -2
- package/core/tokens/m3/mat/_optgroup.scss +3 -3
- package/core/tokens/m3/mat/_option.scss +2 -2
- package/core/tokens/m3/mat/_outlined-button.scss +5 -5
- package/core/tokens/m3/mat/_paginator.scss +3 -3
- package/core/tokens/m3/mat/_protected-button.scss +5 -5
- package/core/tokens/m3/mat/_radio.scss +2 -2
- package/core/tokens/m3/mat/_ripple.scss +2 -2
- package/core/tokens/m3/mat/_select.scss +4 -4
- package/core/tokens/m3/mat/_sidenav.scss +6 -5
- package/core/tokens/m3/mat/_slider.scss +12 -10
- package/core/tokens/m3/mat/_snack-bar.scss +2 -2
- package/core/tokens/m3/mat/_sort.scss +2 -2
- package/core/tokens/m3/mat/_standard-button-toggle.scss +6 -5
- package/core/tokens/m3/mat/_stepper.scss +3 -3
- package/core/tokens/m3/mat/_switch.scss +27 -22
- package/core/tokens/m3/mat/_tab-header.scss +4 -4
- package/core/tokens/m3/mat/_table.scss +7 -6
- package/core/tokens/m3/mat/_text-button.scss +6 -6
- package/core/tokens/m3/mat/_toolbar.scss +3 -3
- package/core/tokens/m3/mat/_tree.scss +2 -2
- package/core/tokens/m3/mdc/_checkbox.scss +10 -8
- package/core/tokens/m3/mdc/_chip.scss +12 -11
- package/core/tokens/m3/mdc/_circular-progress.scss +5 -4
- package/core/tokens/m3/mdc/_dialog.scss +4 -4
- package/core/tokens/m3/mdc/_elevated-card.scss +3 -3
- package/core/tokens/m3/mdc/_extended-fab.scss +9 -5
- package/core/tokens/m3/mdc/_fab-small.scss +8 -5
- package/core/tokens/m3/mdc/_fab.scss +6 -5
- package/core/tokens/m3/mdc/_filled-button.scss +6 -6
- package/core/tokens/m3/mdc/_filled-text-field.scss +7 -6
- package/core/tokens/m3/mdc/_icon-button.scss +10 -8
- package/core/tokens/m3/mdc/_linear-progress.scss +5 -4
- package/core/tokens/m3/mdc/_list.scss +3 -3
- package/core/tokens/m3/mdc/_outlined-button.scss +7 -6
- package/core/tokens/m3/mdc/_outlined-card.scss +3 -3
- package/core/tokens/m3/mdc/_outlined-text-field.scss +7 -6
- package/core/tokens/m3/mdc/_plain-tooltip.scss +3 -3
- package/core/tokens/m3/mdc/_protected-button.scss +6 -6
- package/core/tokens/m3/mdc/_radio.scss +4 -3
- package/core/tokens/m3/mdc/_secondary-navigation-tab.scss +4 -3
- package/core/tokens/m3/mdc/_slider.scss +4 -3
- package/core/tokens/m3/mdc/_snack-bar.scss +3 -3
- package/core/tokens/m3/mdc/_switch.scss +4 -3
- package/core/tokens/m3/mdc/_tab-indicator.scss +5 -4
- package/core/tokens/m3/mdc/_text-button.scss +6 -6
- package/esm2022/autocomplete/animations.mjs +1 -2
- package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2022/autocomplete/autocomplete.mjs +5 -5
- package/esm2022/autocomplete/module.mjs +5 -5
- package/esm2022/badge/badge-module.mjs +5 -5
- package/esm2022/badge/badge.mjs +8 -8
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +5 -5
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2022/button/button-base.mjs +7 -7
- package/esm2022/button/button.mjs +9 -9
- package/esm2022/button/fab.mjs +17 -17
- package/esm2022/button/icon-button.mjs +9 -9
- package/esm2022/button/module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2022/button-toggle/button-toggle.mjs +8 -8
- package/esm2022/card/card.mjs +44 -44
- package/esm2022/card/module.mjs +5 -5
- package/esm2022/checkbox/checkbox-config.mjs +2 -1
- package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2022/checkbox/checkbox.mjs +13 -7
- package/esm2022/checkbox/module.mjs +9 -9
- package/esm2022/chips/chip-action.mjs +4 -4
- package/esm2022/chips/chip-edit-input.mjs +4 -4
- package/esm2022/chips/chip-grid.mjs +4 -4
- package/esm2022/chips/chip-icons.mjs +10 -10
- package/esm2022/chips/chip-input.mjs +4 -4
- package/esm2022/chips/chip-listbox.mjs +4 -4
- package/esm2022/chips/chip-option.mjs +6 -6
- package/esm2022/chips/chip-row.mjs +7 -7
- package/esm2022/chips/chip-set.mjs +4 -4
- package/esm2022/chips/chip.mjs +7 -28
- package/esm2022/chips/module.mjs +5 -5
- package/esm2022/core/common-behaviors/common-module.mjs +5 -5
- package/esm2022/core/datetime/index.mjs +9 -9
- package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2022/core/error/error-options.mjs +7 -7
- package/esm2022/core/internal-form-field/internal-form-field.mjs +4 -4
- package/esm2022/core/line/line.mjs +8 -8
- package/esm2022/core/option/index.mjs +5 -5
- package/esm2022/core/option/optgroup.mjs +5 -5
- package/esm2022/core/option/option.mjs +5 -5
- package/esm2022/core/private/ripple-loader.mjs +4 -4
- package/esm2022/core/ripple/index.mjs +5 -5
- package/esm2022/core/ripple/ripple.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -5
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +5 -5
- package/esm2022/datepicker/calendar.mjs +8 -8
- package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2022/datepicker/date-range-input.mjs +6 -6
- package/esm2022/datepicker/date-range-picker.mjs +4 -4
- package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2022/datepicker/date-selection-model.mjs +10 -10
- package/esm2022/datepicker/datepicker-actions.mjs +10 -10
- package/esm2022/datepicker/datepicker-base.mjs +8 -8
- package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
- package/esm2022/datepicker/datepicker-input.mjs +4 -4
- package/esm2022/datepicker/datepicker-intl.mjs +4 -4
- package/esm2022/datepicker/datepicker-module.mjs +5 -5
- package/esm2022/datepicker/datepicker-toggle.mjs +8 -8
- package/esm2022/datepicker/datepicker.mjs +4 -4
- package/esm2022/datepicker/month-view.mjs +4 -4
- package/esm2022/datepicker/multi-year-view.mjs +4 -4
- package/esm2022/datepicker/year-view.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +5 -8
- package/esm2022/dialog/dialog-content-directives.mjs +16 -16
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/dialog/module.mjs +5 -5
- package/esm2022/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +5 -5
- package/esm2022/expansion/accordion.mjs +4 -4
- package/esm2022/expansion/expansion-module.mjs +5 -5
- package/esm2022/expansion/expansion-panel-content.mjs +4 -4
- package/esm2022/expansion/expansion-panel-header.mjs +11 -11
- package/esm2022/expansion/expansion-panel.mjs +9 -9
- package/esm2022/form-field/directives/error.mjs +4 -4
- package/esm2022/form-field/directives/floating-label.mjs +4 -4
- package/esm2022/form-field/directives/hint.mjs +4 -4
- package/esm2022/form-field/directives/label.mjs +4 -4
- package/esm2022/form-field/directives/line-ripple.mjs +4 -4
- package/esm2022/form-field/directives/notched-outline.mjs +4 -4
- package/esm2022/form-field/directives/prefix.mjs +4 -4
- package/esm2022/form-field/directives/suffix.mjs +4 -4
- package/esm2022/form-field/form-field-control.mjs +4 -4
- package/esm2022/form-field/form-field.mjs +9 -6
- package/esm2022/form-field/module.mjs +5 -5
- package/esm2022/grid-list/grid-list-module.mjs +5 -5
- package/esm2022/grid-list/grid-list.mjs +6 -6
- package/esm2022/grid-list/grid-tile.mjs +17 -17
- package/esm2022/icon/icon-module.mjs +5 -5
- package/esm2022/icon/icon-registry.mjs +4 -4
- package/esm2022/icon/icon.mjs +4 -4
- package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
- package/esm2022/input/input.mjs +39 -6
- package/esm2022/input/module.mjs +5 -5
- package/esm2022/list/action-list.mjs +5 -5
- package/esm2022/list/list-base.mjs +7 -7
- package/esm2022/list/list-item-sections.mjs +19 -19
- package/esm2022/list/list-module.mjs +5 -5
- package/esm2022/list/list-option.mjs +6 -6
- package/esm2022/list/list.mjs +8 -8
- package/esm2022/list/nav-list.mjs +5 -5
- package/esm2022/list/selection-list.mjs +6 -6
- package/esm2022/list/subheader.mjs +4 -4
- package/esm2022/list/testing/selection-list-harness.mjs +2 -2
- package/esm2022/menu/menu-content.mjs +4 -4
- package/esm2022/menu/menu-item.mjs +4 -4
- package/esm2022/menu/menu-trigger.mjs +4 -4
- package/esm2022/menu/menu.mjs +5 -5
- package/esm2022/menu/module.mjs +5 -5
- package/esm2022/paginator/module.mjs +5 -5
- package/esm2022/paginator/paginator-intl.mjs +4 -4
- package/esm2022/paginator/paginator.mjs +5 -5
- package/esm2022/progress-bar/module.mjs +5 -5
- package/esm2022/progress-bar/progress-bar.mjs +5 -5
- package/esm2022/progress-spinner/module.mjs +5 -5
- package/esm2022/progress-spinner/progress-spinner.mjs +5 -5
- package/esm2022/radio/module.mjs +5 -5
- package/esm2022/radio/radio.mjs +62 -24
- package/esm2022/select/module.mjs +5 -5
- package/esm2022/select/select.mjs +9 -9
- package/esm2022/sidenav/drawer.mjs +12 -12
- package/esm2022/sidenav/sidenav-module.mjs +5 -5
- package/esm2022/sidenav/sidenav.mjs +12 -12
- package/esm2022/slide-toggle/module.mjs +9 -9
- package/esm2022/slide-toggle/slide-toggle-config.mjs +2 -2
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2022/slide-toggle/slide-toggle.mjs +17 -11
- package/esm2022/slider/module.mjs +5 -5
- package/esm2022/slider/slider-input.mjs +7 -7
- package/esm2022/slider/slider-thumb.mjs +4 -4
- package/esm2022/slider/slider.mjs +5 -5
- package/esm2022/snack-bar/module.mjs +5 -5
- package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2022/snack-bar/snack-bar-container.mjs +5 -5
- package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
- package/esm2022/snack-bar/snack-bar.mjs +4 -4
- package/esm2022/sort/sort-header-intl.mjs +4 -4
- package/esm2022/sort/sort-header.mjs +5 -5
- package/esm2022/sort/sort-module.mjs +5 -5
- package/esm2022/sort/sort.mjs +4 -4
- package/esm2022/stepper/step-content.mjs +4 -4
- package/esm2022/stepper/step-header.mjs +5 -5
- package/esm2022/stepper/step-label.mjs +4 -4
- package/esm2022/stepper/stepper-button.mjs +7 -7
- package/esm2022/stepper/stepper-icon.mjs +4 -4
- package/esm2022/stepper/stepper-intl.mjs +4 -4
- package/esm2022/stepper/stepper-module.mjs +5 -5
- package/esm2022/stepper/stepper.mjs +8 -8
- package/esm2022/table/cell.mjs +22 -22
- package/esm2022/table/module.mjs +5 -5
- package/esm2022/table/row.mjs +22 -22
- package/esm2022/table/table.mjs +9 -9
- package/esm2022/table/text-column.mjs +4 -4
- package/esm2022/tabs/ink-bar.mjs +4 -4
- package/esm2022/tabs/module.mjs +5 -5
- package/esm2022/tabs/paginated-tab-header.mjs +4 -4
- package/esm2022/tabs/tab-body.mjs +7 -7
- package/esm2022/tabs/tab-content.mjs +4 -4
- package/esm2022/tabs/tab-group.mjs +6 -6
- package/esm2022/tabs/tab-header.mjs +5 -5
- package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
- package/esm2022/tabs/tab-label.mjs +4 -4
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +12 -12
- package/esm2022/tabs/tab.mjs +4 -4
- package/esm2022/tabs/testing/tab-harness.mjs +2 -2
- package/esm2022/toolbar/toolbar-module.mjs +5 -5
- package/esm2022/toolbar/toolbar.mjs +8 -8
- package/esm2022/tooltip/module.mjs +5 -5
- package/esm2022/tooltip/tooltip.mjs +11 -8
- package/esm2022/tree/node.mjs +10 -10
- package/esm2022/tree/outlet.mjs +4 -4
- package/esm2022/tree/padding.mjs +4 -4
- package/esm2022/tree/toggle.mjs +4 -4
- package/esm2022/tree/tree-module.mjs +5 -5
- package/esm2022/tree/tree.mjs +5 -5
- package/fesm2022/autocomplete.mjs +14 -15
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -11
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +11 -11
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +11 -11
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +42 -42
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +47 -47
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +24 -17
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +48 -69
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +62 -62
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +88 -88
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +26 -29
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +28 -28
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +39 -36
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +25 -25
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +42 -9
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list/testing.mjs +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +56 -56
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +17 -17
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +11 -11
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +8 -8
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +65 -27
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +12 -12
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +26 -26
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +28 -22
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +17 -17
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +23 -23
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +14 -14
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +33 -33
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +57 -57
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +48 -48
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +11 -11
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +14 -11
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +26 -26
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-focus-overlay.scss +1 -1
- package/form-field/_mdc-text-field-density-overrides.scss +4 -4
- package/form-field/_mdc-text-field-structure.scss +6 -6
- package/input/index.d.ts +13 -1
- package/list/testing/index.d.ts +1 -1
- package/package.json +3 -51
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/radio/_radio-common.scss +26 -8
- package/radio/index.d.ts +19 -5
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/slide-toggle/index.d.ts +6 -1
- package/tabs/testing/index.d.ts +1 -1
- package/tooltip/index.d.ts +5 -0
- package/core/mdc-helpers/_mdc-helpers.scss +0 -60
package/_index.scss
CHANGED
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
@forward './core/typography/typography' show typography-hierarchy;
|
|
19
19
|
@forward './core/typography/typography-utils' show font-shorthand;
|
|
20
20
|
@forward './core/tokens/m2' show m2-tokens-from-theme;
|
|
21
|
-
@forward './core/tokens/m3-tokens' show system-level-colors,
|
|
21
|
+
@forward './core/tokens/m3-tokens' show system-level-colors,
|
|
22
|
+
system-level-typography, system-level-elevation, system-level-shape,
|
|
23
|
+
system-level-motion, system-level-state;
|
|
22
24
|
|
|
23
25
|
// Private/Internal
|
|
24
26
|
@forward './core/density/private/all-density' show all-component-densities;
|
package/button/_button-base.scss
CHANGED
|
@@ -112,16 +112,10 @@
|
|
|
112
112
|
// Adds an elevation shadow to a button.
|
|
113
113
|
@mixin mat-private-button-elevation($token-name) {
|
|
114
114
|
// MDC outputs a variable that is the same as the token name, but suffixed with `-shadow`.
|
|
115
|
-
box-shadow:
|
|
115
|
+
box-shadow: token-utils.get-token-variable($token-name + '-shadow');
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
@mixin mat-private-button-touch-target($is-square, $prefix, $slots) {
|
|
119
|
-
// Element used to ensure that the button has a touch target that meets the required minimum.
|
|
120
|
-
// Note that we use this, instead of MDC's built-in `mdc-button--touch` class, because the MDC
|
|
121
|
-
// class is implemented as `margin-top: 6px; margin-bottom: 6px` on the host element which
|
|
122
|
-
// goes against our rule of not having margins on the host node. Furthermore, having the margin on
|
|
123
|
-
// the button itself would require us to wrap it in another div. See:
|
|
124
|
-
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-button#making-buttons-accessible
|
|
125
119
|
.mat-mdc-button-touch-target {
|
|
126
120
|
position: absolute;
|
|
127
121
|
top: 50%;
|
|
@@ -145,14 +139,14 @@
|
|
|
145
139
|
|
|
146
140
|
@mixin mat-private-button-horizontal-layout($prefix, $slots, $has-with-icon-padding) {
|
|
147
141
|
@include token-utils.use-tokens($prefix, $slots) {
|
|
148
|
-
$icon-spacing: token-utils.get-token-variable
|
|
149
|
-
$icon-offset: token-utils.get-token-variable
|
|
150
|
-
$horizontal-padding: token-utils.get-token-variable
|
|
142
|
+
$icon-spacing: token-utils.get-token-variable(icon-spacing, true);
|
|
143
|
+
$icon-offset: token-utils.get-token-variable(icon-offset, true);
|
|
144
|
+
$horizontal-padding: token-utils.get-token-variable(horizontal-padding, true);
|
|
151
145
|
padding: 0 $horizontal-padding;
|
|
152
146
|
|
|
153
147
|
@if ($has-with-icon-padding) {
|
|
154
148
|
$with-icon-horizontal-padding:
|
|
155
|
-
token-utils.get-token-variable
|
|
149
|
+
token-utils.get-token-variable(with-icon-horizontal-padding, true);
|
|
156
150
|
|
|
157
151
|
// stylelint-disable-next-line selector-class-pattern
|
|
158
152
|
&:has(.material-icons, mat-icon, [matButtonIcon]) {
|
|
@@ -31,10 +31,9 @@ $_fallback-size: 40px;
|
|
|
31
31
|
vertical-align: bottom;
|
|
32
32
|
|
|
33
33
|
@include token-utils.use-tokens($prefix, $slots) {
|
|
34
|
-
$layer-size: token-utils.get-token-variable(state-layer-size);
|
|
35
|
-
padding: calc((
|
|
36
|
-
margin: calc((
|
|
37
|
-
var(#{$layer-size}, #{$_fallback-size})) / 2);
|
|
34
|
+
$layer-size: token-utils.get-token-variable(state-layer-size, $fallback: $_fallback-size);
|
|
35
|
+
padding: calc((#{$layer-size} - #{$_icon-size}) / 2);
|
|
36
|
+
margin: calc((#{$layer-size} - #{$layer-size}) / 2);
|
|
38
37
|
|
|
39
38
|
@if ($include-state-layer-styles) {
|
|
40
39
|
@include _state-layer-styles;
|
|
@@ -51,11 +50,10 @@ $_fallback-size: 40px;
|
|
|
51
50
|
cursor: inherit;
|
|
52
51
|
|
|
53
52
|
@include token-utils.use-tokens($prefix, $slots) {
|
|
54
|
-
$layer-size: token-utils.get-token-variable(state-layer-size);
|
|
55
|
-
$offset: calc((
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
height: var(#{$layer-size}, #{$_fallback-size});
|
|
53
|
+
$layer-size: token-utils.get-token-variable(state-layer-size, $fallback: $_fallback-size);
|
|
54
|
+
$offset: calc((#{$layer-size} - #{$layer-size}) / 2);
|
|
55
|
+
width: $layer-size;
|
|
56
|
+
height: $layer-size;
|
|
59
57
|
top: $offset;
|
|
60
58
|
right: $offset;
|
|
61
59
|
left: $offset;
|
|
@@ -85,8 +83,8 @@ $_fallback-size: 40px;
|
|
|
85
83
|
border-color $_transition-duration $_exit-curve;
|
|
86
84
|
|
|
87
85
|
@include token-utils.use-tokens($prefix, $slots) {
|
|
88
|
-
$layer-size: token-utils.get-token-variable(state-layer-size);
|
|
89
|
-
$offset: calc((
|
|
86
|
+
$layer-size: token-utils.get-token-variable(state-layer-size, $fallback: $_fallback-size);
|
|
87
|
+
$offset: calc((#{$layer-size} - #{$_icon-size}) / 2);
|
|
90
88
|
|
|
91
89
|
@include token-utils.create-token-slot(border-color, unselected-icon-color);
|
|
92
90
|
top: $offset;
|
|
@@ -138,6 +136,21 @@ $_fallback-size: 40px;
|
|
|
138
136
|
@include token-utils.create-token-slot(border-color, selected-focus-icon-color);
|
|
139
137
|
@include token-utils.create-token-slot(background-color, selected-focus-icon-color);
|
|
140
138
|
}
|
|
139
|
+
|
|
140
|
+
// Needs extra specificity to override the focus, hover, active states.
|
|
141
|
+
.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive {
|
|
142
|
+
.mdc-checkbox:hover .mdc-checkbox__native-control ~ .mdc-checkbox__background,
|
|
143
|
+
.mdc-checkbox .mdc-checkbox__native-control:focus ~ .mdc-checkbox__background,
|
|
144
|
+
.mdc-checkbox__background {
|
|
145
|
+
@include token-utils.create-token-slot(border-color, disabled-unselected-icon-color);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.mdc-checkbox__native-control:checked ~ .mdc-checkbox__background,
|
|
149
|
+
.mdc-checkbox__native-control:indeterminate ~ .mdc-checkbox__background {
|
|
150
|
+
@include token-utils.create-token-slot(background-color, disabled-selected-icon-color);
|
|
151
|
+
border-color: transparent;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
141
154
|
}
|
|
142
155
|
|
|
143
156
|
.mdc-checkbox__checkmark {
|
|
@@ -158,8 +171,12 @@ $_fallback-size: 40px;
|
|
|
158
171
|
}
|
|
159
172
|
|
|
160
173
|
@include token-utils.use-tokens($prefix, $slots) {
|
|
161
|
-
.mdc-checkbox--disabled
|
|
162
|
-
|
|
174
|
+
.mdc-checkbox--disabled {
|
|
175
|
+
&, &.mat-mdc-checkbox-disabled-interactive {
|
|
176
|
+
.mdc-checkbox__checkmark {
|
|
177
|
+
@include token-utils.create-token-slot(color, disabled-selected-checkmark-color);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
163
180
|
}
|
|
164
181
|
}
|
|
165
182
|
|
|
@@ -193,8 +210,12 @@ $_fallback-size: 40px;
|
|
|
193
210
|
}
|
|
194
211
|
|
|
195
212
|
@include token-utils.use-tokens($prefix, $slots) {
|
|
196
|
-
.mdc-checkbox--disabled
|
|
197
|
-
|
|
213
|
+
.mdc-checkbox--disabled {
|
|
214
|
+
&, &.mat-mdc-checkbox-disabled-interactive {
|
|
215
|
+
.mdc-checkbox__mixedmark {
|
|
216
|
+
@include token-utils.create-token-slot(border-color, disabled-selected-checkmark-color);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
198
219
|
}
|
|
199
220
|
}
|
|
200
221
|
|
|
@@ -520,4 +541,15 @@ $_fallback-size: 40px;
|
|
|
520
541
|
);
|
|
521
542
|
}
|
|
522
543
|
}
|
|
544
|
+
|
|
545
|
+
// Needs extra specificity to override the focus, hover, active states.
|
|
546
|
+
.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive & {
|
|
547
|
+
.mdc-checkbox__native-control ~ .mat-mdc-checkbox-ripple .mat-ripple-element,
|
|
548
|
+
.mdc-checkbox__native-control ~ .mdc-checkbox__ripple {
|
|
549
|
+
@include token-utils.create-token-slot(
|
|
550
|
+
background-color,
|
|
551
|
+
unselected-hover-state-layer-color
|
|
552
|
+
);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
523
555
|
}
|
package/checkbox/index.d.ts
CHANGED
|
@@ -117,6 +117,8 @@ export declare class MatCheckbox implements AfterViewInit, OnChanges, ControlVal
|
|
|
117
117
|
* https://material.angular.io/guide/theming#using-component-color-variants.
|
|
118
118
|
*/
|
|
119
119
|
color: string | undefined;
|
|
120
|
+
/** Whether the checkbox should remain interactive when it is disabled. */
|
|
121
|
+
disabledInteractive: boolean;
|
|
120
122
|
/**
|
|
121
123
|
* Reference to the MatRipple instance of the checkbox.
|
|
122
124
|
* @deprecated Considered an implementation detail. To be removed.
|
|
@@ -189,10 +191,11 @@ export declare class MatCheckbox implements AfterViewInit, OnChanges, ControlVal
|
|
|
189
191
|
*/
|
|
190
192
|
_preventBubblingFromLabel(event: MouseEvent): void;
|
|
191
193
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCheckbox, [null, null, null, { attribute: "tabindex"; }, { optional: true; }, { optional: true; }]>;
|
|
192
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatCheckbox, "mat-checkbox", ["matCheckbox"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "change": "change"; "indeterminateChange": "indeterminateChange"; }, never, ["*"], true, never>;
|
|
194
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatCheckbox, "mat-checkbox", ["matCheckbox"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "change": "change"; "indeterminateChange": "indeterminateChange"; }, never, ["*"], true, never>;
|
|
193
195
|
static ngAcceptInputType_required: unknown;
|
|
194
196
|
static ngAcceptInputType_disableRipple: unknown;
|
|
195
197
|
static ngAcceptInputType_tabIndex: unknown;
|
|
198
|
+
static ngAcceptInputType_disabledInteractive: unknown;
|
|
196
199
|
static ngAcceptInputType_checked: unknown;
|
|
197
200
|
static ngAcceptInputType_disabled: unknown;
|
|
198
201
|
static ngAcceptInputType_indeterminate: unknown;
|
|
@@ -227,6 +230,8 @@ export declare interface MatCheckboxDefaultOptions {
|
|
|
227
230
|
color?: ThemePalette;
|
|
228
231
|
/** Default checkbox click action for checkboxes. */
|
|
229
232
|
clickAction?: MatCheckboxClickAction;
|
|
233
|
+
/** Whether disabled checkboxes should be interactive. */
|
|
234
|
+
disabledInteractive?: boolean;
|
|
230
235
|
}
|
|
231
236
|
|
|
232
237
|
export declare class MatCheckboxModule {
|
package/chips/index.d.ts
CHANGED
|
@@ -205,8 +205,6 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
|
|
|
205
205
|
disableRipple: boolean;
|
|
206
206
|
/** Whether the chip is disabled. */
|
|
207
207
|
disabled: boolean;
|
|
208
|
-
/** Tab index of the chip. */
|
|
209
|
-
tabIndex: number;
|
|
210
208
|
/** Emitted when a chip is to be removed. */
|
|
211
209
|
readonly removed: EventEmitter<MatChipEvent>;
|
|
212
210
|
/** Emitted when the chip is destroyed. */
|
|
@@ -234,7 +232,7 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
|
|
|
234
232
|
*/
|
|
235
233
|
_rippleLoader: MatRippleLoader;
|
|
236
234
|
protected _injector: Injector;
|
|
237
|
-
constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _focusMonitor: FocusMonitor, _document: any, animationMode?: string, _globalRippleOptions?: RippleGlobalOptions | undefined
|
|
235
|
+
constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _focusMonitor: FocusMonitor, _document: any, animationMode?: string, _globalRippleOptions?: RippleGlobalOptions | undefined);
|
|
238
236
|
ngOnInit(): void;
|
|
239
237
|
ngAfterViewInit(): void;
|
|
240
238
|
ngAfterContentInit(): void;
|
|
@@ -260,17 +258,14 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
|
|
|
260
258
|
_getActions(): MatChipAction[];
|
|
261
259
|
/** Handles interactions with the primary action of the chip. */
|
|
262
260
|
_handlePrimaryActionInteraction(): void;
|
|
263
|
-
/** Gets the tabindex of the chip. */
|
|
264
|
-
_getTabIndex(): number | null;
|
|
265
261
|
/** Starts the focus monitoring process on the chip. */
|
|
266
262
|
private _monitorFocus;
|
|
267
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatChip, [null, null, null, null, null, { optional: true; }, { optional: true; }
|
|
268
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatChip, "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", ["matChip"], { "role": { "alias": "role"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaDescription": { "alias": "aria-description"; "required": false; }; "value": { "alias": "value"; "required": false; }; "color": { "alias": "color"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "highlighted": { "alias": "highlighted"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; };
|
|
263
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatChip, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
264
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatChip, "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", ["matChip"], { "role": { "alias": "role"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaDescription": { "alias": "aria-description"; "required": false; }; "value": { "alias": "value"; "required": false; }; "color": { "alias": "color"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "highlighted": { "alias": "highlighted"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "removed": "removed"; "destroyed": "destroyed"; }, ["leadingIcon", "trailingIcon", "removeIcon", "_allLeadingIcons", "_allTrailingIcons", "_allRemoveIcons"], ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
|
|
269
265
|
static ngAcceptInputType_removable: unknown;
|
|
270
266
|
static ngAcceptInputType_highlighted: unknown;
|
|
271
267
|
static ngAcceptInputType_disableRipple: unknown;
|
|
272
268
|
static ngAcceptInputType_disabled: unknown;
|
|
273
|
-
static ngAcceptInputType_tabIndex: unknown;
|
|
274
269
|
}
|
|
275
270
|
|
|
276
271
|
/**
|
package/core/_core.scss
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
@use './ripple/ripple';
|
|
5
5
|
@use './style/elevation';
|
|
6
6
|
@use './focus-indicators/private';
|
|
7
|
-
@use './mdc-helpers/mdc-helpers';
|
|
8
7
|
|
|
9
8
|
// Mixin that renders all of the core styles that are not theme-dependent.
|
|
10
9
|
@mixin core() {
|
|
@@ -20,24 +19,22 @@
|
|
|
20
19
|
// user's content isn't inside of a `mat-sidenav-container`.
|
|
21
20
|
@at-root {
|
|
22
21
|
// Note: we need to emit fallback values here to avoid errors in internal builds.
|
|
23
|
-
@include
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
22
|
+
@include token-utils.use-tokens(tokens-mat-app.$prefix, tokens-mat-app.get-token-slots()) {
|
|
23
|
+
.mat-app-background {
|
|
24
|
+
@include token-utils.create-token-slot(background-color, background-color, transparent);
|
|
25
|
+
@include token-utils.create-token-slot(color, text-color, inherit);
|
|
26
|
+
}
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
28
|
+
// Provides external CSS classes for each elevation value. Each CSS class is formatted as
|
|
29
|
+
// `mat-elevation-z$z-value` where `$z-value` corresponds to the z-space to which the element
|
|
30
|
+
// is elevated.
|
|
31
|
+
@for $z-value from 0 through 24 {
|
|
32
|
+
$selector: elevation.$prefix + $z-value;
|
|
33
|
+
// We need the `mat-mdc-elevation-specific`, because some MDC mixins
|
|
34
|
+
// come with elevation baked in and we don't have a way of removing it.
|
|
35
|
+
.#{$selector}, .mat-mdc-elevation-specific.#{$selector} {
|
|
36
|
+
@include token-utils.create-token-slot(box-shadow, 'elevation-shadow-level-#{$z-value}',
|
|
37
|
+
none);
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
}
|
package/core/m2/_typography.scss
CHANGED
|
@@ -2,10 +2,137 @@
|
|
|
2
2
|
@use 'sass:math';
|
|
3
3
|
@use 'sass:meta';
|
|
4
4
|
@use 'sass:string';
|
|
5
|
-
@use '@material/typography' as mdc-typography;
|
|
6
5
|
|
|
7
6
|
$_default-font-family: string.unquote('Roboto, sans-serif');
|
|
8
7
|
|
|
8
|
+
@function _px-to-rem($px) {
|
|
9
|
+
@return math.div($px, 16px) * 1rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@function _get-letter-spacing($tracking, $font-size) {
|
|
13
|
+
@return math.div($tracking, $font-size * 16) * 1em;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$_mdc-levels: (
|
|
17
|
+
headline1: (
|
|
18
|
+
font-family: $_default-font-family,
|
|
19
|
+
font-size: _px-to-rem(96px),
|
|
20
|
+
line-height: _px-to-rem(96px),
|
|
21
|
+
font-weight: 300,
|
|
22
|
+
letter-spacing: _get-letter-spacing(-1.5, 6),
|
|
23
|
+
text-decoration: inherit,
|
|
24
|
+
text-transform: inherit,
|
|
25
|
+
),
|
|
26
|
+
headline2: (
|
|
27
|
+
font-family: $_default-font-family,
|
|
28
|
+
font-size: _px-to-rem(60px),
|
|
29
|
+
line-height: _px-to-rem(60px),
|
|
30
|
+
font-weight: 300,
|
|
31
|
+
letter-spacing: _get-letter-spacing(-0.5, 3.75),
|
|
32
|
+
text-decoration: inherit,
|
|
33
|
+
text-transform: inherit,
|
|
34
|
+
),
|
|
35
|
+
headline3: (
|
|
36
|
+
font-family: $_default-font-family,
|
|
37
|
+
font-size: _px-to-rem(48px),
|
|
38
|
+
line-height: _px-to-rem(50px),
|
|
39
|
+
font-weight: 400,
|
|
40
|
+
letter-spacing: normal,
|
|
41
|
+
text-decoration: inherit,
|
|
42
|
+
text-transform: inherit,
|
|
43
|
+
),
|
|
44
|
+
headline4: (
|
|
45
|
+
font-family: $_default-font-family,
|
|
46
|
+
font-size: _px-to-rem(34px),
|
|
47
|
+
line-height: _px-to-rem(40px),
|
|
48
|
+
font-weight: 400,
|
|
49
|
+
letter-spacing: _get-letter-spacing(0.25, 2.125),
|
|
50
|
+
text-decoration: inherit,
|
|
51
|
+
text-transform: inherit,
|
|
52
|
+
),
|
|
53
|
+
headline5: (
|
|
54
|
+
font-family: $_default-font-family,
|
|
55
|
+
font-size: _px-to-rem(24px),
|
|
56
|
+
line-height: _px-to-rem(32px),
|
|
57
|
+
font-weight: 400,
|
|
58
|
+
letter-spacing: normal,
|
|
59
|
+
text-decoration: inherit,
|
|
60
|
+
text-transform: inherit,
|
|
61
|
+
),
|
|
62
|
+
headline6: (
|
|
63
|
+
font-family: $_default-font-family,
|
|
64
|
+
font-size: _px-to-rem(20px),
|
|
65
|
+
line-height: _px-to-rem(32px),
|
|
66
|
+
font-weight: 500,
|
|
67
|
+
letter-spacing: _get-letter-spacing(0.25, 1.25),
|
|
68
|
+
text-decoration: inherit,
|
|
69
|
+
text-transform: inherit,
|
|
70
|
+
),
|
|
71
|
+
subtitle1: (
|
|
72
|
+
font-family: $_default-font-family,
|
|
73
|
+
font-size: _px-to-rem(16px),
|
|
74
|
+
line-height: _px-to-rem(28px),
|
|
75
|
+
font-weight: 400,
|
|
76
|
+
letter-spacing: _get-letter-spacing(0.15, 1),
|
|
77
|
+
text-decoration: inherit,
|
|
78
|
+
text-transform: inherit,
|
|
79
|
+
),
|
|
80
|
+
subtitle2: (
|
|
81
|
+
font-family: $_default-font-family,
|
|
82
|
+
font-size: _px-to-rem(14px),
|
|
83
|
+
line-height: _px-to-rem(22px),
|
|
84
|
+
font-weight: 500,
|
|
85
|
+
letter-spacing: _get-letter-spacing(0.1, 0.875),
|
|
86
|
+
text-decoration: inherit,
|
|
87
|
+
text-transform: inherit,
|
|
88
|
+
),
|
|
89
|
+
body1: (
|
|
90
|
+
font-family: $_default-font-family,
|
|
91
|
+
font-size: _px-to-rem(16px),
|
|
92
|
+
line-height: _px-to-rem(24px),
|
|
93
|
+
font-weight: 400,
|
|
94
|
+
letter-spacing: _get-letter-spacing(0.5, 1),
|
|
95
|
+
text-decoration: inherit,
|
|
96
|
+
text-transform: inherit,
|
|
97
|
+
),
|
|
98
|
+
body2: (
|
|
99
|
+
font-family: $_default-font-family,
|
|
100
|
+
font-size: _px-to-rem(14px),
|
|
101
|
+
line-height: _px-to-rem(20px),
|
|
102
|
+
font-weight: 400,
|
|
103
|
+
letter-spacing: _get-letter-spacing(0.25, 0.875),
|
|
104
|
+
text-decoration: inherit,
|
|
105
|
+
text-transform: inherit,
|
|
106
|
+
),
|
|
107
|
+
caption: (
|
|
108
|
+
font-family: $_default-font-family,
|
|
109
|
+
font-size: _px-to-rem(12px),
|
|
110
|
+
line-height: _px-to-rem(20px),
|
|
111
|
+
font-weight: 400,
|
|
112
|
+
letter-spacing: _get-letter-spacing(0.4, 0.75),
|
|
113
|
+
text-decoration: inherit,
|
|
114
|
+
text-transform: inherit,
|
|
115
|
+
),
|
|
116
|
+
button: (
|
|
117
|
+
font-family: $_default-font-family,
|
|
118
|
+
font-size: _px-to-rem(14px),
|
|
119
|
+
line-height: _px-to-rem(36px),
|
|
120
|
+
font-weight: 500,
|
|
121
|
+
letter-spacing: _get-letter-spacing(1.25, 0.875),
|
|
122
|
+
text-decoration: none,
|
|
123
|
+
text-transform: uppercase,
|
|
124
|
+
),
|
|
125
|
+
overline: (
|
|
126
|
+
font-family: $_default-font-family,
|
|
127
|
+
font-size: _px-to-rem(12px),
|
|
128
|
+
line-height: _px-to-rem(32px),
|
|
129
|
+
font-weight: 500,
|
|
130
|
+
letter-spacing: _get-letter-spacing(2, 0.75),
|
|
131
|
+
text-decoration: none,
|
|
132
|
+
text-transform: uppercase,
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
|
|
9
136
|
/// Defines a typography level from the Material Design spec.
|
|
10
137
|
/// @param {String} $font-size The font-size for this level.
|
|
11
138
|
/// @param {String | Number} $line-height The line-height for this level.
|
|
@@ -217,7 +344,7 @@ $_default-font-family: string.unquote('Roboto, sans-serif');
|
|
|
217
344
|
|
|
218
345
|
// Converts an MDC typography level config to an Angular Material one.
|
|
219
346
|
@function typography-config-level-from-mdc($mdc-level, $font-family: null) {
|
|
220
|
-
$mdc-level-config: map.get(
|
|
347
|
+
$mdc-level-config: map.get($_mdc-levels, $mdc-level);
|
|
221
348
|
|
|
222
349
|
// Explicitly default the font family to null since we'll apply it globally
|
|
223
350
|
// through the `define-typgraphy-config`/`define-legacy-typography-config`.
|
package/core/ripple/_ripple.scss
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
@include token-utils.use-tokens(
|
|
41
41
|
tokens-mat-ripple.$prefix, tokens-mat-ripple.get-token-slots()) {
|
|
42
42
|
// We have to emit a fallback value here, because some internal builds depend on it.
|
|
43
|
-
background-color:
|
|
43
|
+
background-color: token-utils.get-token-variable(color, $fallback: rgba(#000, 0.1));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// In high contrast mode the ripple is opaque, causing it to obstruct the content.
|
|
@@ -1,7 +1,97 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:math';
|
|
2
3
|
@use 'sass:meta';
|
|
3
|
-
@use '
|
|
4
|
-
@use '
|
|
4
|
+
@use 'sass:string';
|
|
5
|
+
@use './variables';
|
|
6
|
+
@use './sass-utils';
|
|
7
|
+
|
|
8
|
+
$_umbra-opacity: 0.2;
|
|
9
|
+
$_penumbra-opacity: 0.14;
|
|
10
|
+
$_ambient-opacity: 0.12;
|
|
11
|
+
|
|
12
|
+
$_umbra-map: (
|
|
13
|
+
0: '0px 0px 0px 0px',
|
|
14
|
+
1: '0px 2px 1px -1px',
|
|
15
|
+
2: '0px 3px 1px -2px',
|
|
16
|
+
3: '0px 3px 3px -2px',
|
|
17
|
+
4: '0px 2px 4px -1px',
|
|
18
|
+
5: '0px 3px 5px -1px',
|
|
19
|
+
6: '0px 3px 5px -1px',
|
|
20
|
+
7: '0px 4px 5px -2px',
|
|
21
|
+
8: '0px 5px 5px -3px',
|
|
22
|
+
9: '0px 5px 6px -3px',
|
|
23
|
+
10: '0px 6px 6px -3px',
|
|
24
|
+
11: '0px 6px 7px -4px',
|
|
25
|
+
12: '0px 7px 8px -4px',
|
|
26
|
+
13: '0px 7px 8px -4px',
|
|
27
|
+
14: '0px 7px 9px -4px',
|
|
28
|
+
15: '0px 8px 9px -5px',
|
|
29
|
+
16: '0px 8px 10px -5px',
|
|
30
|
+
17: '0px 8px 11px -5px',
|
|
31
|
+
18: '0px 9px 11px -5px',
|
|
32
|
+
19: '0px 9px 12px -6px',
|
|
33
|
+
20: '0px 10px 13px -6px',
|
|
34
|
+
21: '0px 10px 13px -6px',
|
|
35
|
+
22: '0px 10px 14px -6px',
|
|
36
|
+
23: '0px 11px 14px -7px',
|
|
37
|
+
24: '0px 11px 15px -7px',
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
$_penumbra-map: (
|
|
41
|
+
0: '0px 0px 0px 0px',
|
|
42
|
+
1: '0px 1px 1px 0px',
|
|
43
|
+
2: '0px 2px 2px 0px',
|
|
44
|
+
3: '0px 3px 4px 0px',
|
|
45
|
+
4: '0px 4px 5px 0px',
|
|
46
|
+
5: '0px 5px 8px 0px',
|
|
47
|
+
6: '0px 6px 10px 0px',
|
|
48
|
+
7: '0px 7px 10px 1px',
|
|
49
|
+
8: '0px 8px 10px 1px',
|
|
50
|
+
9: '0px 9px 12px 1px',
|
|
51
|
+
10: '0px 10px 14px 1px',
|
|
52
|
+
11: '0px 11px 15px 1px',
|
|
53
|
+
12: '0px 12px 17px 2px',
|
|
54
|
+
13: '0px 13px 19px 2px',
|
|
55
|
+
14: '0px 14px 21px 2px',
|
|
56
|
+
15: '0px 15px 22px 2px',
|
|
57
|
+
16: '0px 16px 24px 2px',
|
|
58
|
+
17: '0px 17px 26px 2px',
|
|
59
|
+
18: '0px 18px 28px 2px',
|
|
60
|
+
19: '0px 19px 29px 2px',
|
|
61
|
+
20: '0px 20px 31px 3px',
|
|
62
|
+
21: '0px 21px 33px 3px',
|
|
63
|
+
22: '0px 22px 35px 3px',
|
|
64
|
+
23: '0px 23px 36px 3px',
|
|
65
|
+
24: '0px 24px 38px 3px',
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
$_ambient-map: (
|
|
69
|
+
0: '0px 0px 0px 0px',
|
|
70
|
+
1: '0px 1px 3px 0px',
|
|
71
|
+
2: '0px 1px 5px 0px',
|
|
72
|
+
3: '0px 1px 8px 0px',
|
|
73
|
+
4: '0px 1px 10px 0px',
|
|
74
|
+
5: '0px 1px 14px 0px',
|
|
75
|
+
6: '0px 1px 18px 0px',
|
|
76
|
+
7: '0px 2px 16px 1px',
|
|
77
|
+
8: '0px 3px 14px 2px',
|
|
78
|
+
9: '0px 3px 16px 2px',
|
|
79
|
+
10: '0px 4px 18px 3px',
|
|
80
|
+
11: '0px 4px 20px 3px',
|
|
81
|
+
12: '0px 5px 22px 4px',
|
|
82
|
+
13: '0px 5px 24px 4px',
|
|
83
|
+
14: '0px 5px 26px 4px',
|
|
84
|
+
15: '0px 6px 28px 5px',
|
|
85
|
+
16: '0px 6px 30px 5px',
|
|
86
|
+
17: '0px 6px 32px 5px',
|
|
87
|
+
18: '0px 7px 34px 6px',
|
|
88
|
+
19: '0px 7px 36px 6px',
|
|
89
|
+
20: '0px 8px 38px 7px',
|
|
90
|
+
21: '0px 8px 40px 7px',
|
|
91
|
+
22: '0px 8px 42px 7px',
|
|
92
|
+
23: '0px 9px 44px 8px',
|
|
93
|
+
24: '0px 9px 46px 8px',
|
|
94
|
+
);
|
|
5
95
|
|
|
6
96
|
// A collection of mixins and CSS classes that can be used to apply elevation to a material
|
|
7
97
|
// element.
|
|
@@ -37,29 +127,7 @@ $prefix: 'mat-elevation-z';
|
|
|
37
127
|
// Applies the correct css rules to an element to give it the elevation specified by $zValue.
|
|
38
128
|
// The $zValue must be between 0 and 24.
|
|
39
129
|
@mixin elevation($zValue, $color: $color, $opacity: null) {
|
|
40
|
-
|
|
41
|
-
@include mdc-elevation.elevation($zValue, $color);
|
|
42
|
-
}
|
|
43
|
-
@else {
|
|
44
|
-
// Copied from @material/elevation/_elevation-theme.scss#_box-shadow
|
|
45
|
-
// TODO(mmalerba): Add support for graceful handling of CSS var color to MDC.
|
|
46
|
-
$umbra-z-value: map.get(mdc-elevation.$umbra-map, $zValue);
|
|
47
|
-
$penumbra-z-value: map.get(mdc-elevation.$penumbra-map, $zValue);
|
|
48
|
-
$ambient-z-value: map.get(mdc-elevation.$ambient-map, $zValue);
|
|
49
|
-
|
|
50
|
-
$color-opacity: if($opacity != null, $opacity, 1);
|
|
51
|
-
$umbra-color: _compute-color-opacity($color, mdc-elevation.$umbra-opacity * $color-opacity);
|
|
52
|
-
$penumbra-color:
|
|
53
|
-
_compute-color-opacity($color, mdc-elevation.$penumbra-opacity * $color-opacity);
|
|
54
|
-
$ambient-color: _compute-color-opacity($color, mdc-elevation.$ambient-opacity * $color-opacity);
|
|
55
|
-
|
|
56
|
-
$box-shadow: (
|
|
57
|
-
#{'#{$umbra-z-value} #{$umbra-color}'},
|
|
58
|
-
#{'#{$penumbra-z-value} #{$penumbra-color}'},
|
|
59
|
-
#{$ambient-z-value} $ambient-color
|
|
60
|
-
);
|
|
61
|
-
@include mdc-elevation.shadow($box-shadow);
|
|
62
|
-
}
|
|
130
|
+
box-shadow: get-box-shadow($zValue, $color, $opacity);
|
|
63
131
|
}
|
|
64
132
|
|
|
65
133
|
// Applies the elevation to an element in a manner that allows
|
|
@@ -71,8 +139,34 @@ $prefix: 'mat-elevation-z';
|
|
|
71
139
|
}
|
|
72
140
|
|
|
73
141
|
// Gets the box shadow value for a specific elevation.
|
|
74
|
-
@function get-box-shadow($
|
|
75
|
-
@
|
|
142
|
+
@function get-box-shadow($zValue, $shadow-color: black, $opacity: null) {
|
|
143
|
+
@if $zValue == null {
|
|
144
|
+
@return null;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@if (sass-utils.is-css-var-name($zValue)) {
|
|
148
|
+
@return $zValue;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@if meta.type-of($zValue) != number or not math.is-unitless($zValue) {
|
|
152
|
+
@error '$zValue must be a unitless number, but received `#{$zValue}`';
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@if $zValue < 0 or $zValue > 24 {
|
|
156
|
+
@error '$zValue must be between 0 and 24, but received `#{$zValue}`';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
$umbra-z-value: map.get($_umbra-map, $zValue);
|
|
160
|
+
$penumbra-z-value: map.get($_penumbra-map, $zValue);
|
|
161
|
+
$ambient-z-value: map.get($_ambient-map, $zValue);
|
|
162
|
+
|
|
163
|
+
$color-opacity: if($opacity != null, $opacity, 1);
|
|
164
|
+
$umbra-color: _compute-color-opacity($shadow-color, $_umbra-opacity * $color-opacity);
|
|
165
|
+
$penumbra-color: _compute-color-opacity($shadow-color, $_penumbra-opacity * $color-opacity);
|
|
166
|
+
$ambient-color: _compute-color-opacity($shadow-color, $_ambient-opacity * $color-opacity);
|
|
167
|
+
|
|
168
|
+
@return string.unquote('#{$umbra-z-value} #{$umbra-color}, #{$penumbra-z-value} ' +
|
|
169
|
+
'#{$penumbra-color}, #{$ambient-z-value} #{$ambient-color}');
|
|
76
170
|
}
|
|
77
171
|
|
|
78
172
|
// Returns a string that can be used as the value for a transition property for elevation.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
+
@use 'sass:string';
|
|
2
3
|
@use 'sass:list';
|
|
3
4
|
@use 'sass:map';
|
|
4
5
|
@use 'sass:meta';
|
|
@@ -64,12 +65,23 @@ $use-system-typography-variables: false;
|
|
|
64
65
|
/// A version of the Sass `color.change` function that is safe ot use with CSS variables.
|
|
65
66
|
@function safe-color-change($color, $args...) {
|
|
66
67
|
$args: meta.keywords($args);
|
|
68
|
+
$use-color-mix: $use-system-color-variables or
|
|
69
|
+
(is-css-var-name($color) and string.index($color, '--mat') == 1);
|
|
67
70
|
@if (meta.type-of($color) == 'color') {
|
|
68
71
|
@return color.change($color, $args...);
|
|
69
72
|
}
|
|
70
|
-
@else if ($color != null and
|
|
73
|
+
@else if ($color != null and
|
|
74
|
+
map.get($args, alpha) != null and $use-color-mix) {
|
|
71
75
|
$opacity: map.get($args, alpha);
|
|
72
|
-
@
|
|
76
|
+
@if meta.type-of($opacity) == number {
|
|
77
|
+
$opacity: ($opacity * 100) + '%';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@if (is-css-var-name($color)) {
|
|
81
|
+
$color: var($color);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@return #{color-mix(in srgb, #{$color} #{$opacity}, transparent)};
|
|
73
85
|
}
|
|
74
86
|
@return $color;
|
|
75
87
|
}
|
|
@@ -91,3 +103,9 @@ $use-system-typography-variables: false;
|
|
|
91
103
|
}
|
|
92
104
|
@return $kwargs;
|
|
93
105
|
}
|
|
106
|
+
|
|
107
|
+
// Returns whether the $value is a CSS variable name based on whether it's a string prefixed
|
|
108
|
+
// by "--".
|
|
109
|
+
@function is-css-var-name($value) {
|
|
110
|
+
@return meta.type-of($value) == string and string.index($value, '--') == 1;
|
|
111
|
+
}
|
|
@@ -55,6 +55,7 @@ $theme-version: 1;
|
|
|
55
55
|
neutral-variant: map.get($primary, neutral-variant),
|
|
56
56
|
error: map.get($primary, error),
|
|
57
57
|
),
|
|
58
|
+
color-system-variables-prefix: $system-variables-prefix,
|
|
58
59
|
color-tokens: m3-tokens.generate-color-tokens(
|
|
59
60
|
$type, $primary, $tertiary, map.get($primary, error), $system-variables-prefix)
|
|
60
61
|
)
|
|
@@ -88,6 +89,7 @@ $theme-version: 1;
|
|
|
88
89
|
medium: $medium,
|
|
89
90
|
regular: $regular,
|
|
90
91
|
),
|
|
92
|
+
typography-system-variables-prefix: $system-variables-prefix,
|
|
91
93
|
typography-tokens: m3-tokens.generate-typography-tokens(
|
|
92
94
|
$brand, $plain, $bold, $medium, $regular, $system-variables-prefix)
|
|
93
95
|
)
|