@angular/material-experimental 18.0.0-next.4 → 18.0.0-next.6
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 +0 -7
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize.mjs +3 -3
- package/esm2022/column-resize/column-resize-module.mjs +12 -12
- package/esm2022/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/column-resize/resizable-directives/default-enabled-resizable.mjs +3 -3
- package/esm2022/column-resize/resizable-directives/resizable.mjs +3 -3
- package/esm2022/column-resize/resize-strategy.mjs +3 -3
- package/esm2022/menubar/menubar-item.mjs +3 -3
- package/esm2022/menubar/menubar-module.mjs +4 -4
- package/esm2022/menubar/menubar.mjs +3 -3
- package/esm2022/popover-edit/lens-directives.mjs +9 -9
- package/esm2022/popover-edit/popover-edit-module.mjs +4 -4
- package/esm2022/popover-edit/table-directives.mjs +12 -12
- package/esm2022/selection/row-selection.mjs +3 -3
- package/esm2022/selection/select-all.mjs +3 -3
- package/esm2022/selection/selection-column.mjs +3 -3
- package/esm2022/selection/selection-module.mjs +4 -4
- package/esm2022/selection/selection-toggle.mjs +3 -3
- package/esm2022/selection/selection.mjs +3 -3
- package/esm2022/version.mjs +1 -1
- package/fesm2022/column-resize.mjs +36 -36
- package/fesm2022/material-experimental.mjs +1 -1
- package/fesm2022/material-experimental.mjs.map +1 -1
- package/fesm2022/menubar.mjs +10 -10
- package/fesm2022/popover-edit.mjs +25 -25
- package/fesm2022/selection.mjs +19 -19
- package/package.json +4 -3
- package/theming/_color-api-back-compat.scss +0 -111
- package/theming/_config-validation.scss +0 -166
- package/theming/_custom-tokens.scss +0 -1918
- package/theming/_definition.scss +0 -104
- package/theming/_format-tokens.scss +0 -5
- package/theming/_m3-density.scss +0 -191
- package/theming/_m3-palettes.scss +0 -947
- package/theming/_m3-tokens.scss +0 -1042
package/theming/_definition.scss
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// This file contains functions used to define Angular Material theme objects.
|
|
2
|
-
|
|
3
|
-
@use 'sass:map';
|
|
4
|
-
@use '@angular/material' as mat;
|
|
5
|
-
@use './m3-palettes';
|
|
6
|
-
@use './m3-tokens';
|
|
7
|
-
@use './config-validation';
|
|
8
|
-
|
|
9
|
-
/// Map key used to store internals of theme config.
|
|
10
|
-
$internals: _mat-theming-internals-do-not-access;
|
|
11
|
-
/// The theme version of generated themes.
|
|
12
|
-
$theme-version: 1;
|
|
13
|
-
|
|
14
|
-
/// Defines an Angular Material theme object with color, typography, and density settings.
|
|
15
|
-
/// @param {Map} $config The theme configuration
|
|
16
|
-
/// @return {Map} A theme object
|
|
17
|
-
@function define-theme($config: ()) {
|
|
18
|
-
$err: config-validation.validate-theme-config($config);
|
|
19
|
-
@if $err {
|
|
20
|
-
@error $err;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@return mat.private-deep-merge-all(
|
|
24
|
-
define-colors(map.get($config, color) or ()),
|
|
25
|
-
define-typography(map.get($config, typography) or ()),
|
|
26
|
-
define-density(map.get($config, density) or ()),
|
|
27
|
-
($internals: (base-tokens: m3-tokens.generate-base-tokens())),
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/// Defines an Angular Material theme object with color settings.
|
|
32
|
-
/// @param {Map} $config The color configuration
|
|
33
|
-
/// @return {Map} A theme object
|
|
34
|
-
@function define-colors($config: ()) {
|
|
35
|
-
$err: config-validation.validate-color-config($config);
|
|
36
|
-
@if $err {
|
|
37
|
-
@error $err;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
$type: map.get($config, theme-type) or light;
|
|
41
|
-
$primary: map.get($config, primary) or m3-palettes.$violet-palette;
|
|
42
|
-
$tertiary: map.get($config, tertiary) or $primary;
|
|
43
|
-
|
|
44
|
-
@return (
|
|
45
|
-
$internals: (
|
|
46
|
-
theme-version: $theme-version,
|
|
47
|
-
theme-type: $type,
|
|
48
|
-
palettes: (
|
|
49
|
-
primary: map.remove($primary, neutral, neutral-variant, secondary),
|
|
50
|
-
secondary: map.get($primary, secondary),
|
|
51
|
-
tertiary: map.remove($tertiary, neutral, neutral-variant, secondary),
|
|
52
|
-
neutral: map.get($primary, neutral),
|
|
53
|
-
neutral-variant: map.get($primary, neutral-variant),
|
|
54
|
-
error: map.get($primary, error),
|
|
55
|
-
),
|
|
56
|
-
color-tokens: m3-tokens.generate-color-tokens(
|
|
57
|
-
$type, $primary, $tertiary, map.get($primary, error))
|
|
58
|
-
)
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/// Defines an Angular Material theme object with typography settings.
|
|
63
|
-
/// @param {Map} $config The typography configuration
|
|
64
|
-
/// @return {Map} A theme object
|
|
65
|
-
@function define-typography($config: ()) {
|
|
66
|
-
$err: config-validation.validate-typography-config($config);
|
|
67
|
-
@if $err {
|
|
68
|
-
@error $err;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
$plain: map.get($config, plain-family) or (Roboto, sans-serif);
|
|
72
|
-
$brand: map.get($config, brand-family) or $plain;
|
|
73
|
-
$bold: map.get($config, bold-weight) or 700;
|
|
74
|
-
$medium: map.get($config, medium-weight) or 500;
|
|
75
|
-
$regular: map.get($config, regular-weight) or 400;
|
|
76
|
-
|
|
77
|
-
@return (
|
|
78
|
-
$internals: (
|
|
79
|
-
theme-version: $theme-version,
|
|
80
|
-
typography-tokens: m3-tokens.generate-typography-tokens(
|
|
81
|
-
$brand, $plain, $bold, $medium, $regular)
|
|
82
|
-
)
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/// Defines an Angular Material theme object with density settings.
|
|
87
|
-
/// @param {Map} $config The density configuration
|
|
88
|
-
/// @return {Map} A theme object
|
|
89
|
-
@function define-density($config: ()) {
|
|
90
|
-
$err: config-validation.validate-density-config($config);
|
|
91
|
-
@if $err {
|
|
92
|
-
@error $err;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
$density-scale: map.get($config, scale) or 0;
|
|
96
|
-
|
|
97
|
-
@return (
|
|
98
|
-
$internals: (
|
|
99
|
-
theme-version: $theme-version,
|
|
100
|
-
density-scale: $density-scale,
|
|
101
|
-
density-tokens: m3-tokens.generate-density-tokens($density-scale)
|
|
102
|
-
)
|
|
103
|
-
);
|
|
104
|
-
}
|
package/theming/_m3-density.scss
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
@use 'sass:list';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use '@angular/material' as mat;
|
|
4
|
-
|
|
5
|
-
/// Maps namespaced tokens to per-density-scale values.
|
|
6
|
-
/// This is used as a temporary solution for density, since Material Design currently does not have
|
|
7
|
-
/// systemized density.
|
|
8
|
-
/// Format:
|
|
9
|
-
/// (
|
|
10
|
-
/// (mdc, comp): (
|
|
11
|
-
/// token: (<scale 0 value>, <scale -1 value>, <scale -2 value>, ...),
|
|
12
|
-
/// ...
|
|
13
|
-
/// ),
|
|
14
|
-
/// ...
|
|
15
|
-
/// )
|
|
16
|
-
// TODO(mmalerba): Add density tokens for remaining components.
|
|
17
|
-
$_density-tokens: (
|
|
18
|
-
// MDC tokens
|
|
19
|
-
(mdc, checkbox): (
|
|
20
|
-
state-layer-size: (40px, 36px, 32px, 28px),
|
|
21
|
-
),
|
|
22
|
-
(mdc, chip): (
|
|
23
|
-
container-height: (32px, 28px, 24px),
|
|
24
|
-
),
|
|
25
|
-
(mdc, circular-progress): (),
|
|
26
|
-
(mdc, dialog): (),
|
|
27
|
-
(mdc, elevated-card): (),
|
|
28
|
-
(mdc, extended-fab): (),
|
|
29
|
-
(mdc, fab): (),
|
|
30
|
-
(mdc, fab-small): (),
|
|
31
|
-
(mdc, filled-text-field): (),
|
|
32
|
-
(mdc, text-button): (
|
|
33
|
-
container-height: (40px, 36px, 32px, 28px),
|
|
34
|
-
),
|
|
35
|
-
(mdc, protected-button): (
|
|
36
|
-
container-height: (40px, 36px, 32px, 28px),
|
|
37
|
-
),
|
|
38
|
-
(mdc, filled-button): (
|
|
39
|
-
container-height: (40px, 36px, 32px, 28px),
|
|
40
|
-
),
|
|
41
|
-
(mdc, outlined-button): (
|
|
42
|
-
container-height: (40px, 36px, 32px, 28px),
|
|
43
|
-
),
|
|
44
|
-
(mdc, icon-button): (
|
|
45
|
-
// The size caps out at 24px, because anything lower will be smaller than the icon.
|
|
46
|
-
state-layer-size: (40px, 36px, 32px, 28px, 24px, 24px),
|
|
47
|
-
),
|
|
48
|
-
(mdc, linear-progress): (),
|
|
49
|
-
(mdc, list): (
|
|
50
|
-
list-item-one-line-container-height: (48px, 44px, 40px, 36px, 32px, 24px),
|
|
51
|
-
list-item-two-line-container-height: (64px, 60px, 56px, 52px, 48px, 48px),
|
|
52
|
-
list-item-three-line-container-height: (88px, 84px, 80px, 76px, 72px, 56px),
|
|
53
|
-
),
|
|
54
|
-
(mdc, outlined-card): (),
|
|
55
|
-
(mdc, outlined-text-field): (),
|
|
56
|
-
(mdc, plain-tooltip): (),
|
|
57
|
-
(mdc, radio): (
|
|
58
|
-
state-layer-size: (40px, 36px, 32px, 28px),
|
|
59
|
-
),
|
|
60
|
-
(mdc, slider): (),
|
|
61
|
-
(mdc, snackbar): (),
|
|
62
|
-
(mdc, switch): (),
|
|
63
|
-
(mdc, tab): (
|
|
64
|
-
container-height: (48px, 44px, 40px, 36px, 32px)
|
|
65
|
-
),
|
|
66
|
-
(mdc, tab-indicator): (),
|
|
67
|
-
|
|
68
|
-
// Custom Angular Material tokens
|
|
69
|
-
(mat, autocomplete): (),
|
|
70
|
-
(mat, badge): (),
|
|
71
|
-
(mat, bottom-sheet): (),
|
|
72
|
-
(mat, card): (),
|
|
73
|
-
(mat, checkbox): (
|
|
74
|
-
touch-target-display: (block, block, none, none),
|
|
75
|
-
),
|
|
76
|
-
(mat, dialog): (),
|
|
77
|
-
(mat, datepicker): (),
|
|
78
|
-
(mat, divider): (),
|
|
79
|
-
(mat, expansion): (
|
|
80
|
-
header-collapsed-state-height: (48px, 44px, 40px, 36px),
|
|
81
|
-
header-expanded-state-height: (64px, 60px, 56px, 48px),
|
|
82
|
-
),
|
|
83
|
-
(mat, fab): (
|
|
84
|
-
touch-target-display: (block, block, none, none),
|
|
85
|
-
),
|
|
86
|
-
(mat, form-field): (
|
|
87
|
-
container-height: (56px, 52px, 48px, 44px, 40px, 36px),
|
|
88
|
-
filled-label-display: (block, block, none, none, none, none),
|
|
89
|
-
container-vertical-padding: (16px, 14px, 12px, 10px, 8px, 6px),
|
|
90
|
-
filled-with-label-container-padding-top: (24px, 22px, 12px, 10px, 8px, 6px),
|
|
91
|
-
filled-with-label-container-padding-bottom: (8px, 6px, 12px, 10px, 8px, 6px),
|
|
92
|
-
),
|
|
93
|
-
(mat, grid-list): (),
|
|
94
|
-
(mat, icon): (),
|
|
95
|
-
(mat, icon-button): (
|
|
96
|
-
touch-target-display: (block, block, none, none),
|
|
97
|
-
),
|
|
98
|
-
(mat, list): (
|
|
99
|
-
list-item-leading-icon-start-space: (16px, 12px, 8px, 4px),
|
|
100
|
-
list-item-leading-icon-end-space: (16px, 12px, 8px, 4px),
|
|
101
|
-
),
|
|
102
|
-
(mat, text-button): (
|
|
103
|
-
touch-target-display: (block, block, none, none),
|
|
104
|
-
),
|
|
105
|
-
(mat, protected-button): (
|
|
106
|
-
touch-target-display: (block, block, none, none),
|
|
107
|
-
),
|
|
108
|
-
(mat, filled-button): (
|
|
109
|
-
touch-target-display: (block, block, none, none),
|
|
110
|
-
),
|
|
111
|
-
(mat, outlined-button): (
|
|
112
|
-
touch-target-display: (block, block, none, none),
|
|
113
|
-
),
|
|
114
|
-
(mat, menu): (),
|
|
115
|
-
(mat, optgroup): (),
|
|
116
|
-
(mat, option): (),
|
|
117
|
-
(mat, full-pseudo-checkbox): (),
|
|
118
|
-
(mat, minimal-pseudo-checkbox): (),
|
|
119
|
-
(mat, paginator): (
|
|
120
|
-
container-size: (56px, 52px, 48px, 40px),
|
|
121
|
-
form-field-container-height: (40px, 40px, 40px, 40px, 40px, 36px),
|
|
122
|
-
form-field-container-vertical-padding: (8px, 8px, 8px, 8px, 8px, 6px),
|
|
123
|
-
),
|
|
124
|
-
(mat, radio): (
|
|
125
|
-
touch-target-display: (block, block, none, none),
|
|
126
|
-
),
|
|
127
|
-
(mat, ripple): (),
|
|
128
|
-
(mat, select): (
|
|
129
|
-
arrow-transform: (
|
|
130
|
-
translateY(-8px),
|
|
131
|
-
translateY(-8px),
|
|
132
|
-
none,
|
|
133
|
-
),
|
|
134
|
-
),
|
|
135
|
-
(mat, sidenav): (),
|
|
136
|
-
(mat, slide-toggle): (),
|
|
137
|
-
(mat, slider): (),
|
|
138
|
-
(mat, snack-bar): (),
|
|
139
|
-
(mat, sort): (),
|
|
140
|
-
(mat, standard-button-toggle): (
|
|
141
|
-
height: (40px, 40px, 40px, 36px, 24px),
|
|
142
|
-
),
|
|
143
|
-
(mat, stepper): (
|
|
144
|
-
header-height: (72px, 68px, 64px, 60px, 42px),
|
|
145
|
-
),
|
|
146
|
-
(mat, tab-header): (),
|
|
147
|
-
(mat, table): (
|
|
148
|
-
header-container-height: (56px, 52px, 48px, 44px, 40px),
|
|
149
|
-
footer-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
150
|
-
row-item-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
151
|
-
),
|
|
152
|
-
(mat, toolbar): (
|
|
153
|
-
standard-height: (64px, 60px, 56px, 52px),
|
|
154
|
-
mobile-height: (56px, 52px, 48px, 44px),
|
|
155
|
-
),
|
|
156
|
-
(mat, tree): (
|
|
157
|
-
node-min-height: (48px, 44px, 40px, 36px, 28px),
|
|
158
|
-
),
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
/// Gets the value for the given density scale from the given set of density values.
|
|
162
|
-
/// @param {List} $density-values The list of values for each density scale.
|
|
163
|
-
/// @param {Number} $scale The density scale to get the value for.
|
|
164
|
-
/// @return {*} The value for the given scale.
|
|
165
|
-
@function _get-value-for-scale($density-values, $scale) {
|
|
166
|
-
$scale: mat.private-clamp-density($scale, -1 * list.length($density-values) + 1);
|
|
167
|
-
$index: -$scale + 1;
|
|
168
|
-
@return list.nth($density-values, $index);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/// Gets a map of all density tokens for the given scale
|
|
172
|
-
/// @param {Number} $scale The density scale
|
|
173
|
-
/// @return {Map} Map of all fully qualified density tokens for the given scale.
|
|
174
|
-
@function get-tokens-for-scale($scale) {
|
|
175
|
-
$result: ();
|
|
176
|
-
@each $namespace, $tokens in $_density-tokens {
|
|
177
|
-
@each $token, $density-values in $tokens {
|
|
178
|
-
$tokens: map.set($tokens, $token, _get-value-for-scale($density-values, $scale));
|
|
179
|
-
}
|
|
180
|
-
$result: map.set($result, $namespace, $tokens);
|
|
181
|
-
}
|
|
182
|
-
@return $result;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/// Checks whether the given token is systemized by Angular Material's made up density system.
|
|
186
|
-
/// @param {List} $namespace The namespace of the token
|
|
187
|
-
/// @param {String} $token The name of the token
|
|
188
|
-
/// @return {Boolean} Whether the token is systemized by the density system
|
|
189
|
-
@function is-systemized($namespace, $token) {
|
|
190
|
-
@return map.get($_density-tokens, $namespace, $token) != null;
|
|
191
|
-
}
|