@angular/material-experimental 17.2.0-rc.0 → 17.2.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/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 +8 -8
- package/theming/_custom-tokens.scss +65 -29
- package/theming/_m3-density.scss +13 -1
- package/theming/_m3-tokens.scss +23 -3
|
@@ -70,15 +70,15 @@
|
|
|
70
70
|
small-size-container-size: _hardcode(6px, $exclude-hardcoded),
|
|
71
71
|
container-padding: _hardcode(0 4px, $exclude-hardcoded),
|
|
72
72
|
small-size-container-padding: _hardcode(0, $exclude-hardcoded),
|
|
73
|
-
container-offset: -12px 0,
|
|
74
|
-
small-size-container-offset: -6px 0,
|
|
75
|
-
container-overlap-offset: -12px,
|
|
76
|
-
small-size-container-overlap-offset: -6px,
|
|
73
|
+
container-offset: _hardcode(-12px 0, $exclude-hardcoded),
|
|
74
|
+
small-size-container-offset: _hardcode(-6px 0, $exclude-hardcoded),
|
|
75
|
+
container-overlap-offset: _hardcode(-12px, $exclude-hardcoded),
|
|
76
|
+
small-size-container-overlap-offset: _hardcode(-6px, $exclude-hardcoded),
|
|
77
77
|
|
|
78
78
|
// This size isn't in the M3 spec so we emit the same values as for `medium`.
|
|
79
79
|
large-size-container-size: _hardcode(16px, $exclude-hardcoded),
|
|
80
|
-
large-size-container-offset: -12px 0,
|
|
81
|
-
large-size-container-overlap-offset: -12px,
|
|
80
|
+
large-size-container-offset: _hardcode(-12px 0, $exclude-hardcoded),
|
|
81
|
+
large-size-container-overlap-offset: _hardcode(-12px, $exclude-hardcoded),
|
|
82
82
|
large-size-text-size: map.get($systems, md-sys-typescale, label-small-size),
|
|
83
83
|
large-size-container-padding: _hardcode(0 4px, $exclude-hardcoded),
|
|
84
84
|
legacy-large-size-container-size: _hardcode(unset, $exclude-hardcoded),
|
|
@@ -134,8 +134,10 @@
|
|
|
134
134
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
135
135
|
/// @return {Map} A set of custom tokens for the mat-button-toggle
|
|
136
136
|
@function button-toggle($systems, $exclude-hardcoded) {
|
|
137
|
-
@return (
|
|
138
|
-
|
|
137
|
+
@return mat.private-merge-all(
|
|
138
|
+
_generate-typography-tokens($systems, label-text, label-large),
|
|
139
|
+
(
|
|
140
|
+
shape: map.get($systems, md-sys-shape, corner-full),
|
|
139
141
|
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
140
142
|
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
141
143
|
text-color: map.get($systems, md-sys-color, on-surface),
|
|
@@ -157,7 +159,6 @@
|
|
|
157
159
|
$alpha: 0.12,
|
|
158
160
|
),
|
|
159
161
|
divider-color: map.get($systems, md-sys-color, outline),
|
|
160
|
-
text-font: map.get($systems, md-sys-typescale, label-large-font),
|
|
161
162
|
), (
|
|
162
163
|
// Color variants:
|
|
163
164
|
primary: (
|
|
@@ -341,9 +342,10 @@
|
|
|
341
342
|
toggle-active-state-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
342
343
|
toggle-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
343
344
|
calendar-body-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
345
|
+
calendar-period-button-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
344
346
|
calendar-period-button-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
345
347
|
calendar-navigation-button-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
346
|
-
calendar-header-divider-color:
|
|
348
|
+
calendar-header-divider-color: _hardcode(transparent, $exclude-hardcoded),
|
|
347
349
|
calendar-header-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
348
350
|
calendar-date-today-outline-color: map.get($systems, md-sys-color, primary),
|
|
349
351
|
calendar-date-today-disabled-state-outline-color: mat.private-safe-color-change(
|
|
@@ -368,6 +370,12 @@
|
|
|
368
370
|
),
|
|
369
371
|
calendar-container-background-color: map.get($systems, md-sys-color, surface-container-high),
|
|
370
372
|
calendar-container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
373
|
+
calendar-container-elevation-shadow: _hardcode(mdc-elevation.elevation-box-shadow(0),
|
|
374
|
+
$exclude-hardcoded),
|
|
375
|
+
calendar-container-touch-elevation-shadow: _hardcode(mdc-elevation.elevation-box-shadow(0),
|
|
376
|
+
$exclude-hardcoded),
|
|
377
|
+
calendar-container-shape: map.get($systems, md-sys-shape, corner-large),
|
|
378
|
+
calendar-container-touch-shape: map.get($systems, md-sys-shape, corner-extra-large),
|
|
371
379
|
calendar-text-font: map.get($systems, md-sys-typescale, body-large-font),
|
|
372
380
|
calendar-text-size: map.get($systems, md-sys-typescale, body-large-size),
|
|
373
381
|
calendar-body-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
@@ -423,7 +431,7 @@
|
|
|
423
431
|
@return (
|
|
424
432
|
container-max-width: _hardcode(560px, $exclude-hardcoded),
|
|
425
433
|
container-small-max-width: _hardcode(calc(100vw - 32px), $exclude-hardcoded),
|
|
426
|
-
container-min-width:
|
|
434
|
+
container-min-width: _hardcode(280px, $exclude-hardcoded),
|
|
427
435
|
actions-alignment: _hardcode(flex-end, $exclude-hardcoded),
|
|
428
436
|
content-padding: _hardcode(20px 24px, $exclude-hardcoded),
|
|
429
437
|
with-actions-content-padding: _hardcode(20px 24px 0, $exclude-hardcoded),
|
|
@@ -459,6 +467,8 @@
|
|
|
459
467
|
_generate-typography-tokens($systems, container-text, body-large),
|
|
460
468
|
(
|
|
461
469
|
container-shape: _hardcode(12px, $exclude-hardcoded),
|
|
470
|
+
legacy-header-indicator-display: _hardcode(none, $exclude-hardcoded),
|
|
471
|
+
header-indicator-display: _hardcode(inline-block, $exclude-hardcoded),
|
|
462
472
|
container-background-color: map.get($systems, md-sys-color, surface),
|
|
463
473
|
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
464
474
|
actions-divider-color: map.get($systems, md-sys-color, outline-variant),
|
|
@@ -649,6 +659,17 @@
|
|
|
649
659
|
));
|
|
650
660
|
}
|
|
651
661
|
|
|
662
|
+
/// Generates custom tokens for the mat-list.
|
|
663
|
+
/// @param {Map} $systems The MDC system tokens
|
|
664
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
665
|
+
/// @return {Map} A set of custom tokens for the mat-list
|
|
666
|
+
@function list($systems, $exclude-hardcoded) {
|
|
667
|
+
@return (
|
|
668
|
+
active-indicator-color: map.get($systems, md-sys-color, secondary-container),
|
|
669
|
+
active-indicator-shape: map.get($systems, md-sys-shape, corner-full),
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
|
|
652
673
|
/// Generates custom tokens for the mat-button.
|
|
653
674
|
/// @param {Map} $systems The MDC system tokens
|
|
654
675
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
@@ -856,9 +877,13 @@
|
|
|
856
877
|
@return mat.private-merge-all(
|
|
857
878
|
_generate-typography-tokens($systems, item-label-text, label-large),
|
|
858
879
|
(
|
|
859
|
-
container-shape:
|
|
880
|
+
container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
881
|
+
divider-color: map.get($systems, md-sys-color, surface-variant),
|
|
882
|
+
divider-bottom-spacing: _hardcode(8px, $exclude-hardcoded),
|
|
883
|
+
divider-top-spacing: _hardcode(8px, $exclude-hardcoded),
|
|
860
884
|
item-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
861
885
|
item-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
886
|
+
item-icon-size: _hardcode(24px, $exclude-hardcoded),
|
|
862
887
|
item-hover-state-layer-color: mat.private-safe-color-change(
|
|
863
888
|
map.get($systems, md-sys-color, on-surface),
|
|
864
889
|
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
@@ -867,6 +892,11 @@
|
|
|
867
892
|
map.get($systems, md-sys-color, on-surface),
|
|
868
893
|
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
869
894
|
),
|
|
895
|
+
item-spacing: _hardcode(12px, $exclude-hardcoded),
|
|
896
|
+
item-leading-spacing: _hardcode(12px, $exclude-hardcoded),
|
|
897
|
+
item-trailing-spacing: _hardcode(12px, $exclude-hardcoded),
|
|
898
|
+
item-with-icon-leading-spacing: _hardcode(12px, $exclude-hardcoded),
|
|
899
|
+
item-with-icon-trailing-spacing: _hardcode(12px, $exclude-hardcoded),
|
|
870
900
|
container-color: map.get($systems, md-sys-color, surface-container),
|
|
871
901
|
)
|
|
872
902
|
);
|
|
@@ -1160,28 +1190,34 @@
|
|
|
1160
1190
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
1161
1191
|
/// @return {Map} A set of custom tokens for the mat-slide-toggle
|
|
1162
1192
|
@function switch($systems, $exclude-hardcoded) {
|
|
1163
|
-
@return (
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
selected-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
unselected-
|
|
1193
|
+
@return (
|
|
1194
|
+
disabled-selected-handle-opacity: _hardcode(1, $exclude-hardcoded),
|
|
1195
|
+
disabled-unselected-handle-opacity: _hardcode(0.38, $exclude-hardcoded),
|
|
1196
|
+
unselected-handle-size: _hardcode(16px, $exclude-hardcoded),
|
|
1197
|
+
selected-handle-size: _hardcode(24px, $exclude-hardcoded),
|
|
1198
|
+
with-icon-handle-size: _hardcode(24px, $exclude-hardcoded),
|
|
1199
|
+
pressed-handle-size: _hardcode(28px, $exclude-hardcoded),
|
|
1200
|
+
selected-handle-horizontal-margin: _hardcode(0 24px, $exclude-hardcoded),
|
|
1201
|
+
selected-with-icon-handle-horizontal-margin: _hardcode(0 24px, $exclude-hardcoded),
|
|
1202
|
+
selected-pressed-handle-horizontal-margin: _hardcode(0 22px, $exclude-hardcoded),
|
|
1203
|
+
unselected-handle-horizontal-margin: _hardcode(0 8px, $exclude-hardcoded),
|
|
1204
|
+
unselected-with-icon-handle-horizontal-margin: _hardcode(0 4px, $exclude-hardcoded),
|
|
1205
|
+
unselected-pressed-handle-horizontal-margin: _hardcode(0 2px, $exclude-hardcoded),
|
|
1174
1206
|
// The hidden and visible track represent whichever track is visible or
|
|
1175
1207
|
// hidden in the ui. This could be the .mdc-switch__track :before or
|
|
1176
1208
|
// :after depending on whether the switch is selected or unselected.
|
|
1177
1209
|
//
|
|
1178
1210
|
// The m2 slide-toggle uses transforms to hide & show the tracks while
|
|
1179
1211
|
// the m3 slide-toggle uses opacity.
|
|
1180
|
-
visible-track-opacity: 1,
|
|
1181
|
-
hidden-track-opacity: 0,
|
|
1182
|
-
visible-track-transition: opacity 75ms,
|
|
1183
|
-
hidden-track-transition: opacity 75ms,
|
|
1184
|
-
|
|
1212
|
+
visible-track-opacity: _hardcode(1, $exclude-hardcoded),
|
|
1213
|
+
hidden-track-opacity: _hardcode(0, $exclude-hardcoded),
|
|
1214
|
+
visible-track-transition: _hardcode(opacity 75ms, $exclude-hardcoded),
|
|
1215
|
+
hidden-track-transition: _hardcode(opacity 75ms, $exclude-hardcoded),
|
|
1216
|
+
track-outline-width: _hardcode(2px, $exclude-hardcoded),
|
|
1217
|
+
track-outline-color: map.get($systems, md-sys-color, outline),
|
|
1218
|
+
disabled-unselected-track-outline-width: _hardcode(2px, $exclude-hardcoded),
|
|
1219
|
+
disabled-unselected-track-outline-color: map.get($systems, md-sys-color, on-surface),
|
|
1220
|
+
), ();
|
|
1185
1221
|
}
|
|
1186
1222
|
|
|
1187
1223
|
/// Generates custom tokens for the mat-snack-bar.
|
|
@@ -1282,7 +1318,7 @@
|
|
|
1282
1318
|
_generate-typography-tokens($systems, label-text, title-small),
|
|
1283
1319
|
(
|
|
1284
1320
|
divider-color: map.get($systems, md-sys-color, surface-variant),
|
|
1285
|
-
divider-height: 1px,
|
|
1321
|
+
divider-height: _hardcode(1px, $exclude-hardcoded),
|
|
1286
1322
|
disabled-ripple-color: null, // TODO(mmalerba): Figure out correct value.
|
|
1287
1323
|
pagination-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
1288
1324
|
inactive-label-text-color: map.get($systems, md-sys-color, on-surface),
|
package/theming/_m3-density.scss
CHANGED
|
@@ -95,6 +95,10 @@ $_density-tokens: (
|
|
|
95
95
|
(mat, icon-button): (
|
|
96
96
|
touch-target-display: (block, block, none, none),
|
|
97
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
|
+
),
|
|
98
102
|
(mat, text-button): (
|
|
99
103
|
touch-target-display: (block, block, none, none),
|
|
100
104
|
),
|
|
@@ -114,12 +118,20 @@ $_density-tokens: (
|
|
|
114
118
|
(mat, minimal-pseudo-checkbox): (),
|
|
115
119
|
(mat, paginator): (
|
|
116
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),
|
|
117
123
|
),
|
|
118
124
|
(mat, radio): (
|
|
119
125
|
touch-target-display: (block, block, none, none),
|
|
120
126
|
),
|
|
121
127
|
(mat, ripple): (),
|
|
122
|
-
(mat, select): (
|
|
128
|
+
(mat, select): (
|
|
129
|
+
arrow-transform: (
|
|
130
|
+
translateY(-8px),
|
|
131
|
+
translateY(-8px),
|
|
132
|
+
none,
|
|
133
|
+
),
|
|
134
|
+
),
|
|
123
135
|
(mat, sidenav): (),
|
|
124
136
|
(mat, slide-toggle): (),
|
|
125
137
|
(mat, slider): (),
|
package/theming/_m3-tokens.scss
CHANGED
|
@@ -446,7 +446,7 @@
|
|
|
446
446
|
headline-weight: subhead-weight,
|
|
447
447
|
));
|
|
448
448
|
|
|
449
|
-
@if
|
|
449
|
+
@if map.get($tokens, container-elevation) != null {
|
|
450
450
|
$tokens: map.merge($tokens, (
|
|
451
451
|
// The spec has the dialog at an elevation of 3 which is consistent with the current
|
|
452
452
|
// version of the tokens (0_161), however both the designs and MDC's implementation
|
|
@@ -472,7 +472,17 @@
|
|
|
472
472
|
// However, this interferes with the use case of placing a list on other components. For example,
|
|
473
473
|
// the bottom sheet's container color is `md.sys.color.surface-container-low`. Instead, allow the
|
|
474
474
|
// list to just display the colors for its background.
|
|
475
|
-
@
|
|
475
|
+
@if map.get($tokens, list-item-container-color) != null {
|
|
476
|
+
$tokens: map.set($tokens, list-item-container-color, transparent);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// Match spec, which has list-item-leading-icon-size of 24px. Current version of tokens (0_161)
|
|
480
|
+
// has 18px.
|
|
481
|
+
@if map.get($tokens, list-item-leading-icon-size) != null {
|
|
482
|
+
$tokens: map.set($tokens, list-item-leading-icon-size, 24px);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
@return $tokens;
|
|
476
486
|
}
|
|
477
487
|
|
|
478
488
|
/// Generates a set of namespaced tokens for all components.
|
|
@@ -826,6 +836,11 @@
|
|
|
826
836
|
custom-tokens.filled-button($systems, $exclude-hardcoded),
|
|
827
837
|
$token-slots
|
|
828
838
|
),
|
|
839
|
+
_namespace-tokens(
|
|
840
|
+
(mat, list),
|
|
841
|
+
custom-tokens.list($systems, $exclude-hardcoded),
|
|
842
|
+
$token-slots
|
|
843
|
+
),
|
|
829
844
|
_namespace-tokens(
|
|
830
845
|
// Note: in M3 the "protected" button is called "elevated".
|
|
831
846
|
(mat, protected-button),
|
|
@@ -976,7 +991,13 @@
|
|
|
976
991
|
mdc-tokens.md-sys-color-values-light($ref));
|
|
977
992
|
@return _generate-tokens(map.merge($ref, (
|
|
978
993
|
md-sys-color: $sys-color,
|
|
994
|
+
// Because the elevation values are always combined with color values to create the box shadow,
|
|
995
|
+
// elevation needs to be part of the color dimension.
|
|
979
996
|
md-sys-elevation: mdc-tokens.md-sys-elevation-values(),
|
|
997
|
+
// Because the state values are sometimes combined with color values to create rgba colors,
|
|
998
|
+
// state needs to be part of color dimension.
|
|
999
|
+
// TODO(mmalerba): If at some point we remove the need for these combined values, we can move
|
|
1000
|
+
// state to the base dimension.
|
|
980
1001
|
md-sys-state: mdc-tokens.md-sys-state-values(),
|
|
981
1002
|
)));
|
|
982
1003
|
}
|
|
@@ -1012,6 +1033,5 @@
|
|
|
1012
1033
|
@return _generate-tokens((
|
|
1013
1034
|
md-sys-motion: mdc-tokens.md-sys-motion-values(),
|
|
1014
1035
|
md-sys-shape: mdc-tokens.md-sys-shape-values(),
|
|
1015
|
-
md-sys-state: mdc-tokens.md-sys-state-values(),
|
|
1016
1036
|
), $include-non-systemized: true);
|
|
1017
1037
|
}
|