@angular/material 20.2.1 → 21.0.0-next.1
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 +1 -0
- package/chips/_m3-chip.scss +5 -2
- package/chips/index.d.ts +19 -18
- package/core/tokens/_classes.scss +413 -0
- package/fesm2022/chips.mjs +84 -72
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/package.json +6 -6
- package/schematics/migration.json +4 -4
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-update/index_bundled.js +4 -6831
- package/schematics/ng-update/index_bundled.js.map +3 -3
package/_index.scss
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
@forward 'core/tokens/system' show system-level-colors,
|
|
21
21
|
system-level-typography, system-level-elevation, system-level-shape,
|
|
22
22
|
system-level-motion, system-level-state, theme, theme-overrides, m2-theme;
|
|
23
|
+
@forward 'core/tokens/classes' show system-classes;
|
|
23
24
|
|
|
24
25
|
// Private/Internal
|
|
25
26
|
@forward './core/density/private/all-density' show all-component-densities;
|
package/chips/_m3-chip.scss
CHANGED
|
@@ -49,8 +49,11 @@
|
|
|
49
49
|
chip-selected-label-text-color: map.get($system, on-secondary-container),
|
|
50
50
|
chip-selected-trailing-action-state-layer-color: map.get($system, on-secondary-container),
|
|
51
51
|
chip-selected-trailing-icon-color: map.get($system, on-secondary-container),
|
|
52
|
-
|
|
53
|
-
chip-trailing-action-
|
|
52
|
+
// Parent chips will show focus/hover state as well so need stronger focus/hover styling here
|
|
53
|
+
chip-trailing-action-focus-state-layer-opacity:
|
|
54
|
+
calc(map.get($system, focus-state-layer-opacity) * 2),
|
|
55
|
+
chip-trailing-action-hover-state-layer-opacity:
|
|
56
|
+
calc(map.get($system, hover-state-layer-opacity) * 2),
|
|
54
57
|
chip-trailing-action-state-layer-color: map.get($system, on-surface-variant),
|
|
55
58
|
chip-with-icon-disabled-icon-color: map.get($system, on-surface),
|
|
56
59
|
chip-with-icon-icon-color: map.get($system, on-surface-variant),
|
package/chips/index.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ import '../ripple.d.js';
|
|
|
12
12
|
import '@angular/cdk/platform';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* A non-interactive section of a chip.
|
|
16
16
|
* @docs-private
|
|
17
17
|
*/
|
|
18
|
-
declare class
|
|
18
|
+
declare class MatChipContent {
|
|
19
19
|
_elementRef: ElementRef<HTMLElement>;
|
|
20
20
|
protected _parentChip: {
|
|
21
21
|
_handlePrimaryActionInteraction(): void;
|
|
@@ -24,8 +24,6 @@ declare class MatChipAction {
|
|
|
24
24
|
_edit(): void;
|
|
25
25
|
_isEditing?: boolean;
|
|
26
26
|
};
|
|
27
|
-
/** Whether the action is interactive. */
|
|
28
|
-
isInteractive: boolean;
|
|
29
27
|
/** Whether this is the primary action in the chip. */
|
|
30
28
|
_isPrimary: boolean;
|
|
31
29
|
/** Whether this is the leading action in the chip. */
|
|
@@ -44,18 +42,26 @@ declare class MatChipAction {
|
|
|
44
42
|
* Determine the value of the disabled attribute for this chip action.
|
|
45
43
|
*/
|
|
46
44
|
protected _getDisabledAttribute(): string | null;
|
|
45
|
+
constructor(...args: unknown[]);
|
|
46
|
+
focus(): void;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipContent, never>;
|
|
48
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipContent, "[matChipContent]", never, { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "_allowFocusWhenDisabled": { "alias": "_allowFocusWhenDisabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
49
|
+
static ngAcceptInputType_disabled: unknown;
|
|
50
|
+
static ngAcceptInputType_tabIndex: unknown;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Interactive section of a chip.
|
|
54
|
+
* @docs-private
|
|
55
|
+
*/
|
|
56
|
+
declare class MatChipAction extends MatChipContent {
|
|
47
57
|
/**
|
|
48
58
|
* Determine the value of the tabindex attribute for this chip action.
|
|
49
59
|
*/
|
|
50
60
|
protected _getTabindex(): string | null;
|
|
51
|
-
constructor(...args: unknown[]);
|
|
52
|
-
focus(): void;
|
|
53
61
|
_handleClick(event: MouseEvent): void;
|
|
54
62
|
_handleKeydown(event: KeyboardEvent): void;
|
|
55
63
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAction, never>;
|
|
56
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, {
|
|
57
|
-
static ngAcceptInputType_disabled: unknown;
|
|
58
|
-
static ngAcceptInputType_tabIndex: unknown;
|
|
64
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, {}, {}, never, never, true, never>;
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
/** Avatar image within a chip. */
|
|
@@ -64,12 +70,7 @@ declare class MatChipAvatar {
|
|
|
64
70
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never, never, true, never>;
|
|
65
71
|
}
|
|
66
72
|
/** Non-interactive trailing icon in a chip. */
|
|
67
|
-
declare class MatChipTrailingIcon extends
|
|
68
|
-
/**
|
|
69
|
-
* MDC considers all trailing actions as a remove icon,
|
|
70
|
-
* but we support non-interactive trailing icons.
|
|
71
|
-
*/
|
|
72
|
-
isInteractive: boolean;
|
|
73
|
+
declare class MatChipTrailingIcon extends MatChipContent {
|
|
73
74
|
_isPrimary: boolean;
|
|
74
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
|
|
75
76
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never, never, true, never>;
|
|
@@ -498,7 +499,7 @@ declare class MatChipSet implements AfterViewInit, OnDestroy {
|
|
|
498
499
|
* Determines if key manager should avoid putting a given chip action in the tab index. Skip
|
|
499
500
|
* non-interactive and disabled actions since the user can't do anything with them.
|
|
500
501
|
*/
|
|
501
|
-
protected _skipPredicate(action:
|
|
502
|
+
protected _skipPredicate(action: MatChipContent): boolean;
|
|
502
503
|
/** Listens to changes in the chip set and syncs up the state of the individual chips. */
|
|
503
504
|
private _trackChipSetChanges;
|
|
504
505
|
/** Starts tracking the destroyed chips in order to capture the focused one. */
|
|
@@ -694,9 +695,10 @@ declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterV
|
|
|
694
695
|
*/
|
|
695
696
|
readonly controlType: string;
|
|
696
697
|
/** The chip input to add more chips */
|
|
697
|
-
protected _chipInput
|
|
698
|
+
protected _chipInput?: MatChipTextControl;
|
|
698
699
|
protected _defaultRole: string;
|
|
699
700
|
private _errorStateTracker;
|
|
701
|
+
private _uid;
|
|
700
702
|
/**
|
|
701
703
|
* List of element ids to propagate to the chipInput's aria-describedby attribute.
|
|
702
704
|
*/
|
|
@@ -780,7 +782,6 @@ declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterV
|
|
|
780
782
|
set errorState(value: boolean);
|
|
781
783
|
constructor(...args: unknown[]);
|
|
782
784
|
ngAfterContentInit(): void;
|
|
783
|
-
ngAfterViewInit(): void;
|
|
784
785
|
ngDoCheck(): void;
|
|
785
786
|
ngOnDestroy(): void;
|
|
786
787
|
/** Associates an HTML input element with this chip grid. */
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
// Utility classes that can be used to style elements with the most commonly used system tokens in
|
|
2
|
+
// Material Design. Includes color, typography, elevation, and shape.
|
|
3
|
+
@mixin system-classes() {
|
|
4
|
+
|
|
5
|
+
// ***********************************************************************************************
|
|
6
|
+
// Background
|
|
7
|
+
// ***********************************************************************************************
|
|
8
|
+
|
|
9
|
+
// Styles an element with a primary color background and applies an accessible contrasting
|
|
10
|
+
// color for text and icons. Use for key components across the UI, such as buttons that
|
|
11
|
+
// have greater importance on the page. In Angular Material, this is used for the selected
|
|
12
|
+
// date in a datepicker, the handle of a slider, and the background of a checkbox.
|
|
13
|
+
.mat-bg-primary {
|
|
14
|
+
background-color: var(--mat-sys-primary);
|
|
15
|
+
color: var(--mat-sys-on-primary);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Styles an element with a primary container color background and applies an accessible
|
|
19
|
+
// contrasting color for text and icons. Use for filling components that should stand out
|
|
20
|
+
// on a surface. In Angular Material, this is used for
|
|
21
|
+
// the container of a floating action button.
|
|
22
|
+
.mat-bg-primary-container {
|
|
23
|
+
background-color: var(--mat-sys-primary-container);
|
|
24
|
+
color: var(--mat-sys-on-primary-container);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Styles an element with a secondary color background and applies an accessible contrasting
|
|
28
|
+
// color for text and icons. Use for less prominent components in the UI that have a different
|
|
29
|
+
// color scheme than the primary.
|
|
30
|
+
.mat-bg-secondary {
|
|
31
|
+
background-color: var(--mat-sys-secondary);
|
|
32
|
+
color: var(--mat-sys-on-secondary);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Styles an element with a secondary container color background and applies an accessible
|
|
36
|
+
// contrasting color for text and icons. Use for components that need less emphasis than
|
|
37
|
+
// secondary, such as filter chips. In Angular Material, this is used for selected items
|
|
38
|
+
// in a list and the container of a tonal button.
|
|
39
|
+
.mat-bg-secondary-container {
|
|
40
|
+
background-color: var(--mat-sys-secondary-container);
|
|
41
|
+
color: var(--mat-sys-on-secondary-container);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Styles an element with an error color background and applies an accessible contrasting
|
|
45
|
+
// color for text and icons. Use for indicating an error state, such as an invalid text field, or
|
|
46
|
+
// for the background of an important notification. In Angular Material, this is used for the
|
|
47
|
+
// background of a badge.
|
|
48
|
+
.mat-bg-error {
|
|
49
|
+
background-color: var(--mat-sys-error);
|
|
50
|
+
color: var(--mat-sys-on-error);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Styles an element with an error container color background and applies an accessible
|
|
54
|
+
// contrasting color for text and icons. Use for components that need less emphasis than
|
|
55
|
+
// error, such as a container for error text.
|
|
56
|
+
.mat-bg-error-container {
|
|
57
|
+
background-color: var(--mat-sys-error-container);
|
|
58
|
+
color: var(--mat-sys-on-error-container);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Styles an element with a surface color background and applies an accessible contrasting
|
|
62
|
+
// color for text and icons. Use for general surfaces of components. In Angular Material, this is
|
|
63
|
+
// used for the background of many components, like tables, dialogs, menus, and toolbars.
|
|
64
|
+
.mat-bg-surface {
|
|
65
|
+
background-color: var(--mat-sys-surface);
|
|
66
|
+
color: var(--mat-sys-on-surface);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Styles an element with a surface variant color background and applies an accessible
|
|
70
|
+
// contrasting color for text and icons. Use for surfaces that need to stand out from the
|
|
71
|
+
// main surface color. In Angular Material, this is used for the background of a filled
|
|
72
|
+
// form field and the track of a progress bar.
|
|
73
|
+
.mat-bg-surface-variant {
|
|
74
|
+
background-color: var(--mat-sys-surface-variant);
|
|
75
|
+
color: var(--mat-sys-on-surface-variant);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Styles an element with the "highest" surface container color background and applies an
|
|
79
|
+
// accessible contrasting color for text and icons. Use for surfaces that need the most
|
|
80
|
+
// emphasis against the main surface color. In Angular Material, this is used for the
|
|
81
|
+
// background of a filled card.
|
|
82
|
+
.mat-bg-surface-container-highest {
|
|
83
|
+
background-color: var(--mat-sys-surface-container-highest);
|
|
84
|
+
color: var(--mat-sys-on-surface);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Styles an element with a "high" surface container color background and applies an accessible
|
|
88
|
+
// contrasting color for text and icons. Use for surfaces that need more emphasis against
|
|
89
|
+
// the main surface color. In Angular Material, this is used for the background of a datepicker.
|
|
90
|
+
.mat-bg-surface-container-high {
|
|
91
|
+
background-color: var(--mat-sys-surface-container-high);
|
|
92
|
+
color: var(--mat-sys-on-surface);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Styles an element with a surface container color background and applies an accessible
|
|
96
|
+
// contrasting color for text and icons. Use for surfaces that need to stand out from the
|
|
97
|
+
// main surface color. In Angular Material, this is used for the background of a menu.
|
|
98
|
+
.mat-bg-surface-container {
|
|
99
|
+
background-color: var(--mat-sys-surface-container);
|
|
100
|
+
color: var(--mat-sys-on-surface);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Styles an element with a "low" surface container color background and applies an accessible
|
|
104
|
+
// contrasting color for text and icons. Use for surfaces that need less emphasis against
|
|
105
|
+
// the main surface color. In Angular Material, this is used for the background of a bottom sheet.
|
|
106
|
+
.mat-bg-surface-container-low {
|
|
107
|
+
background-color: var(--mat-sys-surface-container-low);
|
|
108
|
+
color: var(--mat-sys-on-surface);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Styles an element with the "lowest" surface container color background and applies an
|
|
112
|
+
// accessible contrasting color for text and icons. Use for surfaces that need the least
|
|
113
|
+
// emphasis against the main surface color.
|
|
114
|
+
.mat-bg-surface-container-lowest {
|
|
115
|
+
background-color: var(--mat-sys-surface-container-lowest);
|
|
116
|
+
color: var(--mat-sys-on-surface);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Styles an element with an inverse surface color background and applies an accessible
|
|
120
|
+
// contrasting color for text and icons. Use for making elements stand out against the
|
|
121
|
+
// default color scheme. Good for temporary notifications. In Angular Material, this is used for
|
|
122
|
+
// the background of a snackbar and a tooltip.
|
|
123
|
+
.mat-bg-inverse-surface {
|
|
124
|
+
background-color: var(--mat-sys-inverse-surface);
|
|
125
|
+
color: var(--mat-sys-inverse-on-surface);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Styles an element with a disabled color background and applies an accessible contrasting
|
|
129
|
+
// color for text and icons. Use for disabled components. In Angular Material, this is used
|
|
130
|
+
// for components generally filled with the primary color but are currently disabled.
|
|
131
|
+
.mat-bg-disabled {
|
|
132
|
+
color: color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent);
|
|
133
|
+
background-color: color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
// ***********************************************************************************************
|
|
138
|
+
// Text
|
|
139
|
+
// ***********************************************************************************************
|
|
140
|
+
|
|
141
|
+
// Styles the text of an element with the primary color. Use for text that needs to stand out.
|
|
142
|
+
// In Angular Material, this is used for the text of a text button and the selected tab label.
|
|
143
|
+
.mat-text-primary {
|
|
144
|
+
color: var(--mat-sys-primary);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Styles the text of an element with the secondary color. Use for text that needs less emphasis
|
|
148
|
+
// than primary text.
|
|
149
|
+
.mat-text-secondary {
|
|
150
|
+
color: var(--mat-sys-secondary);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Styles the text of an element with the error color. Use for text that indicates an error, such
|
|
154
|
+
// as validation messages. In Angular Material, this is used for the error text in a form field.
|
|
155
|
+
.mat-text-error {
|
|
156
|
+
color: var(--mat-sys-error);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Styles the text of an element with the disabled color. Use for text in disabled components.
|
|
160
|
+
// In Angular Material this is used to show text is disabled, generally on a "surface" background.
|
|
161
|
+
.mat-text-disabled {
|
|
162
|
+
color: color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
// ***********************************************************************************************
|
|
167
|
+
// Font
|
|
168
|
+
// ***********************************************************************************************
|
|
169
|
+
|
|
170
|
+
// Sets the font to the body small typeface. Use for small body text, such as captions. In Angular
|
|
171
|
+
// Material, this is used for the subscript text in a form field and the text in a paginator.
|
|
172
|
+
.mat-font-body-sm {
|
|
173
|
+
font: var(--mat-sys-body-small);
|
|
174
|
+
letter-spacing: var(--mat-sys-body-small-tracking);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Sets the font to the body medium typeface. Use for medium body text, this is the default
|
|
178
|
+
// body font. In Angular Material, this is used for the text in a table row and the supporting
|
|
179
|
+
// text in a dialog.
|
|
180
|
+
.mat-font-body-md {
|
|
181
|
+
font: var(--mat-sys-body-medium);
|
|
182
|
+
letter-spacing: var(--mat-sys-body-medium-tracking);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Sets the font to the body large typeface. Use for large body text, such as an introductory
|
|
186
|
+
// paragraph. In Angular Material, this is used for the text in a list item and the text in a
|
|
187
|
+
// select trigger.
|
|
188
|
+
.mat-font-body-lg {
|
|
189
|
+
font: var(--mat-sys-body-large);
|
|
190
|
+
letter-spacing: var(--mat-sys-body-large-tracking);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Sets the font to the display small typeface. Use for small display text, such as a date.
|
|
194
|
+
.mat-font-display-sm {
|
|
195
|
+
font: var(--mat-sys-display-small);
|
|
196
|
+
letter-spacing: var(--mat-sys-display-small-tracking);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Sets the font to the display medium typeface. Use for medium display text, such as a hero
|
|
200
|
+
// title.
|
|
201
|
+
.mat-font-display-md {
|
|
202
|
+
font: var(--mat-sys-display-medium);
|
|
203
|
+
letter-spacing: var(--mat-sys-display-medium-tracking);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Sets the font to the display large typeface. Use for large display text, such as a hero title.
|
|
207
|
+
.mat-font-display-lg {
|
|
208
|
+
font: var(--mat-sys-display-large);
|
|
209
|
+
letter-spacing: var(--mat-sys-display-large-tracking);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Sets the font to the headline small typeface. Use for small headlines, such as a page title. In
|
|
213
|
+
// Angular Material, this is used for the headline in a dialog.
|
|
214
|
+
.mat-font-headline-sm {
|
|
215
|
+
font: var(--mat-sys-headline-small);
|
|
216
|
+
letter-spacing: var(--mat-sys-headline-small-tracking);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Sets the font to the headline medium typeface. Use for medium headlines, such as a section
|
|
220
|
+
// title.
|
|
221
|
+
.mat-font-headline-md {
|
|
222
|
+
font: var(--mat-sys-headline-medium);
|
|
223
|
+
letter-spacing: var(--mat-sys-headline-medium-tracking);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Sets the font to the headline large typeface. Use for large headlines, such as a page title on
|
|
227
|
+
// a large screen.
|
|
228
|
+
.mat-font-headline-lg {
|
|
229
|
+
font: var(--mat-sys-headline-large);
|
|
230
|
+
letter-spacing: var(--mat-sys-headline-large-tracking);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Sets the font to the title small typeface. Use for small titles, such as a card title. In
|
|
234
|
+
// Angular Material, this is used for the header of a table and the label of an option group.
|
|
235
|
+
.mat-font-title-sm {
|
|
236
|
+
font: var(--mat-sys-title-small);
|
|
237
|
+
letter-spacing: var(--mat-sys-title-small-tracking);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Sets the font to the title medium typeface. Use for medium titles, such as a dialog title
|
|
241
|
+
// or the primary text in a list item. In Angular Material, this is used for the subtitle
|
|
242
|
+
// of a card and the header of an expansion panel.
|
|
243
|
+
.mat-font-title-md {
|
|
244
|
+
font: var(--mat-sys-title-medium);
|
|
245
|
+
letter-spacing: var(--mat-sys-title-medium-tracking);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Sets the font to the title large typeface. Use for large titles, such as a page title on a
|
|
249
|
+
// small screen. In Angular Material, this is used for the title of a card and the title of a
|
|
250
|
+
// toolbar.
|
|
251
|
+
.mat-font-title-lg {
|
|
252
|
+
font: var(--mat-sys-title-large);
|
|
253
|
+
letter-spacing: var(--mat-sys-title-large-tracking);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
// ***********************************************************************************************
|
|
258
|
+
// Corner
|
|
259
|
+
// ***********************************************************************************************
|
|
260
|
+
|
|
261
|
+
// Sets the border radius to extra small. Use for components that need a small amount of rounding,
|
|
262
|
+
// such as a chip. In Angular Material, this is used for the shape of a snackbar and a tooltip.
|
|
263
|
+
.mat-rounded-extra-sm {
|
|
264
|
+
border-radius: var(--mat-sys-corner-extra-small);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Sets the border radius to small. Use for components that need a small amount of rounding, such
|
|
268
|
+
// as a text field.
|
|
269
|
+
.mat-rounded-sm {
|
|
270
|
+
border-radius: var(--mat-sys-corner-small);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Sets the border radius to medium. Use for components that need a medium amount of rounding,
|
|
274
|
+
// such as a button. In Angular Material, this is used for the shape of a card.
|
|
275
|
+
.mat-rounded-md {
|
|
276
|
+
border-radius: var(--mat-sys-corner-medium);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Sets the border radius to large. Use for components that need a large amount of rounding, such
|
|
280
|
+
// as a card. In Angular Material, this is used for the shape of a floating action button and a
|
|
281
|
+
// datepicker.
|
|
282
|
+
.mat-rounded-lg {
|
|
283
|
+
border-radius: var(--mat-sys-corner-large);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Sets the border radius to extra large. Use for components that need a large amount of
|
|
287
|
+
// rounding. In Angular Material, this is used for the shape of a button toggle and the shape of
|
|
288
|
+
// a dialog.
|
|
289
|
+
.mat-rounded-xl {
|
|
290
|
+
border-radius: var(--mat-sys-corner-extra-large);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Sets the border radius to full. Use for components that are circular, such as a user avatar.
|
|
294
|
+
// In Angular Material, this is used for the shape of a badge and the shape of a button.
|
|
295
|
+
.mat-rounded-full {
|
|
296
|
+
border-radius: var(--mat-sys-corner-full);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
// ***********************************************************************************************
|
|
301
|
+
// Border
|
|
302
|
+
// ***********************************************************************************************
|
|
303
|
+
|
|
304
|
+
// Adds an outline to an element. Use for components that need a visible boundary. In Angular
|
|
305
|
+
// Material, this is used for the outline of an outlined button.
|
|
306
|
+
.mat-border {
|
|
307
|
+
border: 1px solid var(--mat-sys-outline);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Adds a less prominent outline to an element. Use for components that need a less obvious
|
|
311
|
+
// boundary. In Angular Material, this is used for the outline of an outlined card and the color
|
|
312
|
+
// of the divider
|
|
313
|
+
.mat-border-subtle {
|
|
314
|
+
border: 1px solid var(--mat-sys-outline-variant);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
// ***********************************************************************************************
|
|
319
|
+
// State
|
|
320
|
+
// ***********************************************************************************************
|
|
321
|
+
|
|
322
|
+
// Adds hover, focus, and active states to an element by applying varying shades of the surface
|
|
323
|
+
// color. Use for interactive components that are not based on a primary color.
|
|
324
|
+
.mat-stateful {
|
|
325
|
+
&:hover {
|
|
326
|
+
background: color-mix(
|
|
327
|
+
in srgb,
|
|
328
|
+
var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%),
|
|
329
|
+
transparent
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&:focus {
|
|
334
|
+
background: color-mix(
|
|
335
|
+
in srgb,
|
|
336
|
+
var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%),
|
|
337
|
+
transparent
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
&:active {
|
|
342
|
+
background: color-mix(
|
|
343
|
+
in srgb,
|
|
344
|
+
var(--mat-sys-on-surface) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%),
|
|
345
|
+
transparent
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Adds hover, focus, and active states to an element by applying varying shades of the primary
|
|
351
|
+
// color. Use for interactive components that are not based on a primary color.
|
|
352
|
+
.mat-stateful-primary {
|
|
353
|
+
&:hover {
|
|
354
|
+
background: color-mix(
|
|
355
|
+
in srgb,
|
|
356
|
+
var(--mat-sys-primary) calc(var(--mat-sys-hover-state-layer-opacity) * 100%),
|
|
357
|
+
transparent
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
&:focus {
|
|
362
|
+
background: color-mix(
|
|
363
|
+
in srgb,
|
|
364
|
+
var(--mat-sys-primary) calc(var(--mat-sys-focus-state-layer-opacity) * 100%),
|
|
365
|
+
transparent
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
&:active {
|
|
370
|
+
background: color-mix(
|
|
371
|
+
in srgb,
|
|
372
|
+
var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%),
|
|
373
|
+
transparent
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
// ***********************************************************************************************
|
|
380
|
+
// Elevation
|
|
381
|
+
// ***********************************************************************************************
|
|
382
|
+
|
|
383
|
+
// Use to slightly raise the appearance of a surface. In Angular Material, this is used for the
|
|
384
|
+
// elevation of an elevated card and the handle of a slider.
|
|
385
|
+
.mat-shadow-1 {
|
|
386
|
+
box-shadow: var(--mat-sys-level1);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// Use to raise the appearance of a surface. In Angular Material, this is used for the
|
|
390
|
+
// elevation of a menu and a select panel.
|
|
391
|
+
.mat-shadow-2 {
|
|
392
|
+
box-shadow: var(--mat-sys-level2);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// Used to raise the appearance of a surface. In Angular Material, this is used for the elevation
|
|
396
|
+
// of a floating action button.
|
|
397
|
+
.mat-shadow-3 {
|
|
398
|
+
box-shadow: var(--mat-sys-level3);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// Used to raise the appearance of a surface. This is generally reserved for elevation changes
|
|
402
|
+
// due to interaction like focus and hover. In Angular Material, this is used for the elevation
|
|
403
|
+
// of a hovered floating action button.
|
|
404
|
+
.mat-shadow-4 {
|
|
405
|
+
box-shadow: var(--mat-sys-level4);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// Used to greatly raise the appearance of a surface. This is generally reserved for elevation
|
|
409
|
+
// changes due to interaction like focus and hover.
|
|
410
|
+
.mat-shadow-5 {
|
|
411
|
+
box-shadow: var(--mat-sys-level5);
|
|
412
|
+
}
|
|
413
|
+
}
|