Skip to content

Commit 7a72112

Browse files
committed
fixup! refactor(material/progress-bar): change mat-progress-bar to use MDC's token API
1 parent d8f9b5d commit 7a72112

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/material/core/tokens/m2/mdc/_progress-bar.scss renamed to src/material/core/tokens/m2/mdc/_linear-progress.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@use 'sass:meta';
66

77
// The prefix used to generate the fully qualified name for tokens in this file.
8-
$prefix: (mdc, progress-bar);
8+
$prefix: (mdc, linear-progress);
99

1010
// Tokens that can't be configured through Angular Material's current theming API,
1111
// but may be in a future version of the theming API.

src/material/core/tokens/tests/test-validate-tokens.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@use '../m2/mdc/list' as tokens-mdc-list;
77

88
@use '@material/linear-progress/linear-progress-theme' as mdc-linear-progress-theme;
9-
@use '../m2/mdc/progress-bar' as tokens-mdc-progress-bar;
9+
@use '../m2/mdc/linear-progress' as tokens-mdc-linear-progress;
1010

1111
@mixin validate-slots($component, $slots, $reference) {
1212
@debug 'Validating #{$component}...';
@@ -27,7 +27,7 @@
2727
);
2828

2929
@include validate-slots(
30-
$component: 'm2.mdc.progress-bar',
31-
$slots: tokens-mdc-progress-bar.get-token-slots(),
30+
$component: 'm2.mdc.linear-progress',
31+
$slots: tokens-mdc-linear-progress.get-token-slots(),
3232
$reference: mdc-linear-progress-theme.$light-theme
3333
);

src/material/progress-bar/progress-bar.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
@use '../core/mdc-helpers/mdc-helpers';
22
@use '@material/linear-progress/linear-progress' as mdc-linear-progress;
33
@use '@material/linear-progress/linear-progress-theme' as mdc-linear-progress-theme;
4-
@use '../core/tokens/m2/mdc/progress-bar' as m2-mdc-progress-bar;
4+
@use '../core/tokens/m2/mdc/linear-progress' as m2-mdc-linear-progress;
55

66
@include mdc-helpers.disable-mdc-fallback-declarations {
7-
$mdc-progress-bar-token-slots: m2-mdc-progress-bar.get-token-slots();
7+
$mdc-progress-bar-token-slots: m2-mdc-linear-progress.get-token-slots();
88

99
// Add the MDC progress-bar static styles.
1010
@include mdc-linear-progress.static-styles();
@@ -14,7 +14,7 @@
1414

1515
// Add default values for tokens that aren't outputted by the theming API.
1616
.mat-mdc-progress-bar {
17-
@include mdc-linear-progress-theme.theme(m2-mdc-progress-bar.get-unthemable-tokens());
17+
@include mdc-linear-progress-theme.theme(m2-mdc-linear-progress.get-unthemable-tokens());
1818
}
1919
}
2020

0 commit comments

Comments
 (0)