Skip to content

Commit

Permalink
fix(material/core): restore private- mixin prefix
Browse files Browse the repository at this point in the history
* In angular#21204 the `private-` prefix was unintentionally removed from all of the symbols. These changes restore the prefix.
* Fixes the prefixes on the expansion panel theming mixins.
  • Loading branch information
crisbeto committed Feb 24, 2021
1 parent c34511e commit acb1ff2
Show file tree
Hide file tree
Showing 125 changed files with 447 additions and 469 deletions.
2 changes: 1 addition & 1 deletion scripts/migrate-sass-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const materialPrefixes = [
'mat-pseudo-checkbox-',
'mat-elevation-',
'mat-optgroup-',
'mat-private-'
'mat-expansion-panel-'
];
const mdcPrefixes = [
...getPrefixes('material-experimental', 'mat'),
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/column-resize/_column-resize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-column-resize') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-column-resize') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-autocomplete') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-autocomplete') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
12 changes: 6 additions & 6 deletions src/material-experimental/mdc-button/_button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ $mat-button-state-target: '.mdc-button__ripple';
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-button') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-button') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down Expand Up @@ -269,8 +269,8 @@ $mat-button-state-target: '.mdc-button__ripple';
@mixin fab-density($config-or-theme) {}

@mixin fab-theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-fab') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-fab') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down Expand Up @@ -347,8 +347,8 @@ $mat-button-state-target: '.mdc-button__ripple';
}

@mixin icon-button-theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-icon-button') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-icon-button') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-card/_card-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-card') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-card') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-checkbox/_checkbox-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-checkbox') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-checkbox') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-chips/_chips-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-chips') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-chips') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-color/_all-color.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@mixin angular-material-mdc-color($config-or-theme) {
// In case a theme object has been passed instead of a configuration for
// the color system, extract the color config from the theme object.
$config: if(theming.is-theme-object($config-or-theme),
$config: if(theming.private-is-theme-object($config-or-theme),
theming.get-color-config($config-or-theme), $config-or-theme);

@if $config == null {
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-core/_core-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

// Mixin that renders all of the core styles that depend on the theme.
@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
$theme: theming.private-legacy-get-theme($theme-or-color-config);
// Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that
// there won't be multiple warnings. e.g. if `mat-mdc-core-theme` reports a warning, then
// the imported themes (such as `mat-ripple-theme`) should not report again.
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-core') {
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-core') {
@include option-theme.option-theme($theme);
@include optgroup-theme.theme($theme);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-optgroup') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-optgroup') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-core/option/_option-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
}

@mixin option-theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-option') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-option') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-density/_all-density.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@mixin angular-material-mdc-density($config-or-theme) {
// In case a theme object has been passed instead of a configuration for
// the density system, extract the density config from the theme object.
$config: if(theming.is-theme-object($config-or-theme),
$config: if(theming.private-is-theme-object($config-or-theme),
theming.get-density-config($config-or-theme), $config-or-theme);

@if $config == null {
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-dialog/_dialog-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-dialog') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-dialog') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-form-field') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-form-field') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
5 changes: 3 additions & 2 deletions src/material-experimental/mdc-helpers/_focus-indicators.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@
@include _mat-mdc-strong-focus-indicators-border-color($theme-or-color);
}
@else {
$theme: theming.legacy-get-theme($theme-or-color);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-strong-focus-indicators') {
$theme: theming.private-legacy-get-theme($theme-or-color);
@include theming.private-check-duplicate-theme-styles($theme,
'mat-mdc-strong-focus-indicators') {
$color: theming.get-color-config($theme);
@if $color != null {
@include strong-focus-indicators-color($color);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-helpers/_mdc-helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ $mat-typography-2018-level-mappings: (

// Converts an Angular Material typography level config to an MDC one.
@function mat-typography-level-config-to-mdc($mat-config, $mat-level) {
$mappings: if(typography.typography-is-2018-config($mat-config),
$mappings: if(typography.private-typography-is-2018-config($mat-config),
$mat-typography-2018-level-mappings, $mat-typography-2014-level-mappings);
$mdc-level: map.get(map.get($mappings, mat-to-mdc), $mat-level);

Expand Down Expand Up @@ -133,7 +133,7 @@ $mat-typography-2018-level-mappings: (
@function mat-typography-config-to-mdc($mat-config: typography.config()) {
$mdc-config: ();

$mappings: if(typography.typography-is-2018-config($mat-config),
$mappings: if(typography.private-typography-is-2018-config($mat-config),
$mat-typography-2018-level-mappings, $mat-typography-2014-level-mappings);

@each $mdc-level, $mat-level in map.get($mappings, mdc-to-mat) {
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-input/_input-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-input') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-input') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-list/_list-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-list') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-list') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-menu/_menu-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-menu') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-menu') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
8 changes: 4 additions & 4 deletions src/material-experimental/mdc-paginator/_paginator-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@

@mixin density($config-or-theme) {
$density-scale: theming.get-density-config($config-or-theme);
$height: compatibility.density-prop-value(
$height: compatibility.private-density-prop-value(
paginator-variables.$density-config, $density-scale, height);

@include compatibility.density-legacy-compatibility() {
@include compatibility.private-density-legacy-compatibility() {
.mat-mdc-paginator-container {
min-height: $height;
}
}
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-paginator') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-paginator') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-progress-bar') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-progress-bar') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-progress-spinner') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-progress-spinner') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-radio/_radio-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-radio') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-radio') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-select/_select-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-select') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-select') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-sidenav/_sidenav-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-sidenav') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-sidenav') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-slide-toggle') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-slide-toggle') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-slider/_slider-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-slider') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-slider') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-snack-bar/_snack-bar-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
@mixin density($config-or-theme) {}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-snack-bar') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-snack-bar') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-table/_table-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-table') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-table') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@import '@material/data-table/mixins.import';

@include mdc-data-table-core-styles($query: mdc-helpers.$mat-base-styles-without-animation-query);
@include table-flex-styles.table-flex-styles();
@include table-flex-styles.private-table-flex-styles();

.mat-mdc-table-sticky {
// Note that the table can either set this class or an inline style to make something sticky.
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-tabs/_tabs-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
}

@mixin theme($theme-or-color-config) {
$theme: theming.legacy-get-theme($theme-or-color-config);
@include theming.check-duplicate-theme-styles($theme, 'mat-mdc-tabs') {
$theme: theming.private-legacy-get-theme($theme-or-color-config);
@include theming.private-check-duplicate-theme-styles($theme, 'mat-mdc-tabs') {
$color: theming.get-color-config($theme);
$density: theming.get-density-config($theme);
$typography: theming.get-typography-config($theme);
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-tabs/tab-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

// The bottom section of the view; contains the tab bodies
.mat-mdc-tab-body-wrapper {
@include private.animation-noop();
@include private.private-animation-noop();
position: relative;
overflow: hidden;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-theming/_all-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

@mixin angular-material-mdc-theme($theme-or-color-config) {
$dedupe-key: 'angular-material-mdc-theme';
@include theming.check-duplicate-theme-styles($theme-or-color-config, $dedupe-key) {
@include theming.private-check-duplicate-theme-styles($theme-or-color-config, $dedupe-key) {
@include core-theme.theme($theme-or-color-config);
@include autocomplete-theme.theme($theme-or-color-config);
@include button-theme.theme($theme-or-color-config);
Expand Down
Loading

0 comments on commit acb1ff2

Please sign in to comment.