Skip to content

Commit d801d6f

Browse files
committed
checkin
1 parent f93178b commit d801d6f

File tree

225 files changed

+1920
-2094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+1920
-2094
lines changed

src/material/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@forward './core/theming/theming' as private-* show private-clamp-density;
1818
@forward './core/typography/typography' show typography-hierarchy;
1919
@forward './core/typography/typography-utils' show font-shorthand;
20-
@forward './core/tokens/m2' show m2-tokens-from-theme;
20+
@forward 'core/tokens/m2-tokens' show m2-tokens-from-theme;
2121
@forward './core/tokens/m3-system' show system-level-colors,
2222
system-level-typography, system-level-elevation, system-level-shape,
2323
system-level-motion, system-level-state, theme, theme-overrides;

src/material/autocomplete/_autocomplete-theme.scss

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
@use '../core/typography/typography';
66
@use '../core/style/sass-utils';
77
@use '../core/tokens/token-utils';
8-
@use './m2/autocomplete' as tokens-mat-autocomplete;
8+
@use 'm2-autocomplete';
99

1010
@mixin base($theme) {
1111
@if inspection.get-theme-version($theme) == 1 {
1212
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
1313
} @else {
1414
@include sass-utils.current-selector-or-root() {
1515
@include token-utils.create-token-values-mixed(
16-
tokens-mat-autocomplete.$prefix,
17-
tokens-mat-autocomplete.get-unthemable-tokens()
16+
m2-autocomplete.$prefix,
17+
m2-autocomplete.get-unthemable-tokens()
1818
);
1919
}
2020
}
@@ -26,8 +26,8 @@
2626
} @else {
2727
@include sass-utils.current-selector-or-root() {
2828
@include token-utils.create-token-values-mixed(
29-
tokens-mat-autocomplete.$prefix,
30-
tokens-mat-autocomplete.get-color-tokens($theme)
29+
m2-autocomplete.$prefix,
30+
m2-autocomplete.get-color-tokens($theme)
3131
);
3232
}
3333
}
@@ -39,8 +39,8 @@
3939
} @else {
4040
@include sass-utils.current-selector-or-root() {
4141
@include token-utils.create-token-values-mixed(
42-
tokens-mat-autocomplete.$prefix,
43-
tokens-mat-autocomplete.get-typography-tokens($theme)
42+
m2-autocomplete.$prefix,
43+
m2-autocomplete.get-typography-tokens($theme)
4444
);
4545
}
4646
}
@@ -52,8 +52,8 @@
5252
} @else {
5353
@include sass-utils.current-selector-or-root() {
5454
@include token-utils.create-token-values-mixed(
55-
tokens-mat-autocomplete.$prefix,
56-
tokens-mat-autocomplete.get-density-tokens($theme)
55+
m2-autocomplete.$prefix,
56+
m2-autocomplete.get-density-tokens($theme)
5757
);
5858
}
5959
}
@@ -63,8 +63,8 @@
6363
@function _define-overrides() {
6464
@return (
6565
(
66-
namespace: tokens-mat-autocomplete.$prefix,
67-
tokens: tokens-mat-autocomplete.get-token-slots(),
66+
namespace: m2-autocomplete.$prefix,
67+
tokens: m2-autocomplete.get-token-slots(),
6868
),
6969
);
7070
}
@@ -98,8 +98,8 @@
9898
);
9999
@if ($tokens != ()) {
100100
@include token-utils.create-token-values(
101-
tokens-mat-autocomplete.$prefix,
102-
map.get($tokens, tokens-mat-autocomplete.$prefix)
101+
m2-autocomplete.$prefix,
102+
map.get($tokens, m2-autocomplete.$prefix)
103103
);
104104
}
105105
}

src/material/autocomplete/m2/_autocomplete.scss renamed to src/material/autocomplete/_m2-autocomplete.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@use '../../core/tokens/token-definition';
2-
@use '../../core/theming/inspection';
3-
@use '../../core/style/elevation';
4-
@use '../../core/style/sass-utils';
1+
@use '../core/tokens/token-definition';
2+
@use '../core/theming/inspection';
3+
@use '../core/style/elevation';
4+
@use '../core/style/sass-utils';
55

66
// The prefix used to generate the fully qualified name for tokens in this file.
77
$prefix: (mat, autocomplete);

src/material/autocomplete/m3/_autocomplete.scss renamed to src/material/autocomplete/_m3-autocomplete.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use 'sass:map';
2-
@use '../../core/style/elevation';
3-
@use '../../core/tokens/token-definition';
2+
@use '../core/style/elevation';
3+
@use '../core/tokens/token-definition';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
66
$prefix: (mat, autocomplete);

src/material/autocomplete/autocomplete.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
@use '@angular/cdk';
2+
@use './m2-autocomplete';
23
@use '../core/tokens/token-utils';
3-
@use './m2/autocomplete' as tokens-mat-autocomplete;
4+
5+
$token-prefix: m2-autocomplete.$prefix;
6+
$token-slots: m2-autocomplete.get-token-slots();
47

58
// Even though we don't use the MDC styles, we need to keep the classes in the
69
// DOM for the Gmat versions to work. We need to bump up the specificity here
@@ -17,8 +20,7 @@ div.mat-mdc-autocomplete-panel {
1720
// Workaround in case other MDC menu surface styles bleed in.
1821
position: static;
1922

20-
@include token-utils.use-tokens(
21-
tokens-mat-autocomplete.$prefix, tokens-mat-autocomplete.get-token-slots()) {
23+
@include token-utils.use-tokens($token-prefix, $token-slots) {
2224
border-radius: token-utils.slot(container-shape);
2325
box-shadow: token-utils.slot(container-elevation-shadow);
2426
background-color: token-utils.slot(background-color);

src/material/badge/_badge-theme.scss

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@use '../core/theming/inspection';
44
@use '../core/theming/validation';
55
@use '../core/typography/typography';
6-
@use './m2/badge' as tokens-mat-badge;
6+
@use './m2-badge';
77
@use '../core/tokens/token-utils';
88
@use '../core/style/sass-utils';
99

@@ -16,8 +16,8 @@
1616
} @else {
1717
@include sass-utils.current-selector-or-root() {
1818
@include token-utils.create-token-values-mixed(
19-
tokens-mat-badge.$prefix,
20-
tokens-mat-badge.get-unthemable-tokens()
19+
m2-badge.$prefix,
20+
m2-badge.get-unthemable-tokens()
2121
);
2222
}
2323
}
@@ -34,22 +34,22 @@
3434
} @else {
3535
@include sass-utils.current-selector-or-root() {
3636
@include token-utils.create-token-values-mixed(
37-
tokens-mat-badge.$prefix,
38-
tokens-mat-badge.get-color-tokens($theme)
37+
m2-badge.$prefix,
38+
m2-badge.get-color-tokens($theme)
3939
);
4040
}
4141

4242
.mat-badge-accent {
4343
@include token-utils.create-token-values-mixed(
44-
tokens-mat-badge.$prefix,
45-
tokens-mat-badge.private-get-color-palette-color-tokens($theme, accent)
44+
m2-badge.$prefix,
45+
m2-badge.private-get-color-palette-color-tokens($theme, accent)
4646
);
4747
}
4848

4949
.mat-badge-warn {
5050
@include token-utils.create-token-values-mixed(
51-
tokens-mat-badge.$prefix,
52-
tokens-mat-badge.private-get-color-palette-color-tokens($theme, warn)
51+
m2-badge.$prefix,
52+
m2-badge.private-get-color-palette-color-tokens($theme, warn)
5353
);
5454
}
5555
}
@@ -63,8 +63,8 @@
6363
} @else {
6464
@include sass-utils.current-selector-or-root() {
6565
@include token-utils.create-token-values-mixed(
66-
tokens-mat-badge.$prefix,
67-
tokens-mat-badge.get-typography-tokens($theme)
66+
m2-badge.$prefix,
67+
m2-badge.get-typography-tokens($theme)
6868
);
6969
}
7070
}
@@ -83,8 +83,8 @@
8383
@function _define-overrides() {
8484
@return (
8585
(
86-
namespace: tokens-mat-badge.$prefix,
87-
tokens: tokens-mat-badge.get-token-slots(),
86+
namespace: m2-badge.$prefix,
87+
tokens: m2-badge.get-token-slots(),
8888
),
8989
);
9090
}
@@ -123,6 +123,6 @@
123123
@include validation.selector-defined(
124124
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
125125
);
126-
$mat-badge-tokens: token-utils.get-tokens-for($tokens, tokens-mat-badge.$prefix, $options...);
127-
@include token-utils.create-token-values(tokens-mat-badge.$prefix, $mat-badge-tokens);
126+
$mat-badge-tokens: token-utils.get-tokens-for($tokens, m2-badge.$prefix, $options...);
127+
@include token-utils.create-token-values(m2-badge.$prefix, $mat-badge-tokens);
128128
}

src/material/badge/m2/_badge.scss renamed to src/material/badge/_m2-badge.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
@use 'sass:map';
33
@use 'sass:math';
44
@use 'sass:color';
5-
@use '../../core/tokens/token-definition';
6-
@use '../../core/theming/inspection';
7-
@use '../../core/style/sass-utils';
5+
@use '../core/tokens/token-definition';
6+
@use '../core/theming/inspection';
7+
@use '../core/style/sass-utils';
88

99
$_default-size: 22px;
1010
$_small-size: $_default-size - 6px;

src/material/badge/m3/_badge.scss renamed to src/material/badge/_m3-badge.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use 'sass:map';
2-
@use '../../core/style/sass-utils';
3-
@use '../../core/tokens/token-definition';
2+
@use '../core/style/sass-utils';
3+
@use '../core/tokens/token-definition';
44

55
// The prefix used to generate the fully qualified name for tokens in this file.
66
$prefix: (mat, badge);

src/material/badge/badge.scss

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
@use 'sass:color';
22
@use '@angular/cdk';
3-
@use './m2/badge' as tokens-mat-badge;
3+
@use './m2-badge';
44
@use '../core/tokens/token-utils';
55

66
$default-size: 22px !default;
77
$small-size: $default-size - 6;
88
$large-size: $default-size + 6;
99

10+
$token-prefix: m2-badge.$prefix;
11+
$token-slots: m2-badge.get-token-slots();
12+
1013
@mixin _badge-size($size) {
11-
@include token-utils.use-tokens(tokens-mat-badge.$prefix, tokens-mat-badge.get-token-slots()) {
14+
@include token-utils.use-tokens($token-prefix, $token-slots) {
1215
$prefix: if($size == 'medium', '', $size + '-size-');
1316
$legacy-size-var-name: 'legacy-#{$prefix}container-size';
1417
$size-var-name: '#{$prefix}container-size';
@@ -62,7 +65,7 @@ $large-size: $default-size + 6;
6265
box-sizing: border-box;
6366
pointer-events: none;
6467

65-
@include token-utils.use-tokens(tokens-mat-badge.$prefix, tokens-mat-badge.get-token-slots()) {
68+
@include token-utils.use-tokens($token-prefix, $token-slots) {
6669
background-color: token-utils.slot(background-color);
6770
color: token-utils.slot(text-color);
6871
font-family: token-utils.slot(text-font);
@@ -103,7 +106,7 @@ $large-size: $default-size + 6;
103106
}
104107

105108
.mat-badge-disabled .mat-badge-content {
106-
@include token-utils.use-tokens(tokens-mat-badge.$prefix, tokens-mat-badge.get-token-slots()) {
109+
@include token-utils.use-tokens($token-prefix, $token-slots) {
107110
background-color: token-utils.slot(disabled-state-background-color);
108111
color: token-utils.slot(disabled-state-text-color);
109112
}

src/material/bottom-sheet/_bottom-sheet-theme.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
@use '../core/theming/validation';
66
@use '../core/style/sass-utils';
77
@use '../core/tokens/token-utils';
8-
@use './m2/bottom-sheet' as tokens-mat-bottom-sheet;
8+
@use './m2-bottom-sheet';
99

1010
@mixin base($theme) {
1111
@if inspection.get-theme-version($theme) == 1 {
1212
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
1313
} @else {
1414
@include sass-utils.current-selector-or-root() {
1515
@include token-utils.create-token-values-mixed(
16-
tokens-mat-bottom-sheet.$prefix,
17-
tokens-mat-bottom-sheet.get-unthemable-tokens()
16+
m2-bottom-sheet.$prefix,
17+
m2-bottom-sheet.get-unthemable-tokens()
1818
);
1919
}
2020
}
@@ -26,8 +26,8 @@
2626
} @else {
2727
@include sass-utils.current-selector-or-root() {
2828
@include token-utils.create-token-values-mixed(
29-
tokens-mat-bottom-sheet.$prefix,
30-
tokens-mat-bottom-sheet.get-color-tokens($theme)
29+
m2-bottom-sheet.$prefix,
30+
m2-bottom-sheet.get-color-tokens($theme)
3131
);
3232
}
3333
}
@@ -39,8 +39,8 @@
3939
} @else {
4040
@include sass-utils.current-selector-or-root() {
4141
@include token-utils.create-token-values-mixed(
42-
tokens-mat-bottom-sheet.$prefix,
43-
tokens-mat-bottom-sheet.get-typography-tokens($theme)
42+
m2-bottom-sheet.$prefix,
43+
m2-bottom-sheet.get-typography-tokens($theme)
4444
);
4545
}
4646
}
@@ -57,8 +57,8 @@
5757
@function _define-overrides() {
5858
@return (
5959
(
60-
namespace: tokens-mat-bottom-sheet.$prefix,
61-
tokens: tokens-mat-bottom-sheet.get-token-slots(),
60+
namespace: m2-bottom-sheet.$prefix,
61+
tokens: m2-bottom-sheet.get-token-slots(),
6262
),
6363
);
6464
}
@@ -92,8 +92,8 @@
9292
);
9393
@if ($tokens != ()) {
9494
@include token-utils.create-token-values(
95-
tokens-mat-bottom-sheet.$prefix,
96-
map.get($tokens, tokens-mat-bottom-sheet.$prefix)
95+
m2-bottom-sheet.$prefix,
96+
map.get($tokens, m2-bottom-sheet.$prefix)
9797
);
9898
}
9999
}

0 commit comments

Comments
 (0)