|
35 | 35 | );
|
36 | 36 | }
|
37 | 37 |
|
| 38 | +/// Generates custom tokens for the mat-divider. |
| 39 | +/// @param {Map} $systems The MDC system tokens |
| 40 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 41 | +/// @return {Map} A set of custom tokens for the mat-divider |
| 42 | +@function divider($systems, $exclude-hardcoded) { |
| 43 | + @return ( |
| 44 | + width: _hardcode(1px, $exclude-hardcoded), |
| 45 | + color: map.get($systems, md-sys-color, outline-variant), |
| 46 | + ); |
| 47 | +} |
| 48 | + |
38 | 49 | /// Generates custom tokens for the mat-form-field.
|
39 | 50 | /// @param {Map} $systems The MDC system tokens
|
40 | 51 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
85 | 96 | );
|
86 | 97 | }
|
87 | 98 |
|
88 |
| -/// Generates custom tokens for the mat-toolbar. |
| 99 | +/// Generates custom tokens for the mat-menu. |
89 | 100 | /// @param {Map} $systems The MDC system tokens
|
90 | 101 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
91 |
| -/// @return {Map} A set of custom tokens for the mat-toolbar |
92 |
| -@function toolbar($systems, $exclude-hardcoded) { |
| 102 | +/// @return {Map} A set of custom tokens for the mat-menu |
| 103 | +@function menu($systems, $exclude-hardcoded) { |
93 | 104 | @return mat.private-merge-all(
|
94 |
| - _generate-typography-tokens($systems, title-text, title-large), |
| 105 | + _generate-typography-tokens($systems, item-label-text, label-large), |
95 | 106 | (
|
96 |
| - container-background-color: map.get($systems, md-sys-color, surface), |
97 |
| - container-text-color: map.get($systems, md-sys-color, on-surface), |
| 107 | + container-shape: _hardcode(4px, $exclude-hardcoded), |
| 108 | + item-label-text-color: map.get($systems, md-sys-color, on-surface), |
| 109 | + item-icon-color: map.get($systems, md-sys-color, on-surface-variant), |
| 110 | + item-hover-state-layer-color: mat.private-safe-color-change( |
| 111 | + map.get($systems, md-sys-color, on-surface), |
| 112 | + $alpha: map.get($systems, md-sys-state, hover-state-layer-opacity) |
| 113 | + ), |
| 114 | + item-focus-state-layer-color: mat.private-safe-color-change( |
| 115 | + map.get($systems, md-sys-color, on-surface), |
| 116 | + $alpha: map.get($systems, md-sys-state, focus-state-layer-opacity) |
| 117 | + ), |
| 118 | + container-color: map.get($systems, md-sys-color, surface-container), |
98 | 119 | )
|
99 | 120 | );
|
100 | 121 | }
|
101 | 122 |
|
102 |
| -/// Generates custom tokens for the mat-slide-toggle. |
103 |
| -/// @param {Map} $systems The MDC system tokens |
104 |
| -/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
105 |
| -/// @return {Map} A set of custom tokens for the mat-slide-toggle |
106 |
| -@function slide-toggle($systems, $exclude-hardcoded) { |
107 |
| - @return _generate-typography-tokens($systems, label-text, label-large); |
108 |
| -} |
109 |
| - |
110 |
| -/// Generates custom tokens for the mat-slider. |
111 |
| -/// @param {Map} $systems The MDC system tokens |
112 |
| -/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
113 |
| -/// @return {Map} A set of custom tokens for the mat-slider |
114 |
| -@function slider($systems, $exclude-hardcoded) { |
115 |
| - @return ( |
116 |
| - value-indicator-opacity: _hardcode(1, $exclude-hardcoded), |
117 |
| - ); |
118 |
| -} |
119 |
| - |
120 |
| -/// Generates custom tokens for the mat-snack-bar. |
121 |
| -/// @param {Map} $systems The MDC system tokens |
122 |
| -/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
123 |
| -/// @return {Map} A set of custom tokens for the mat-snack-bar |
124 |
| -@function snack-bar($systems, $exclude-hardcoded) { |
125 |
| - @return ( |
126 |
| - button-color: map.get($systems, md-sys-color, inverse-primary), |
127 |
| - ); |
128 |
| -} |
129 |
| - |
130 | 123 | /// Generates custom tokens for the mat-radio.
|
131 | 124 | /// @param {Map} $systems The MDC system tokens
|
132 | 125 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
166 | 159 | );
|
167 | 160 | }
|
168 | 161 |
|
| 162 | +/// Generates custom tokens for the mat-slide-toggle. |
| 163 | +/// @param {Map} $systems The MDC system tokens |
| 164 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 165 | +/// @return {Map} A set of custom tokens for the mat-slide-toggle |
| 166 | +@function slide-toggle($systems, $exclude-hardcoded) { |
| 167 | + @return _generate-typography-tokens($systems, label-text, label-large); |
| 168 | +} |
| 169 | + |
| 170 | +/// Generates custom tokens for the mat-slider. |
| 171 | +/// @param {Map} $systems The MDC system tokens |
| 172 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 173 | +/// @return {Map} A set of custom tokens for the mat-slider |
| 174 | +@function slider($systems, $exclude-hardcoded) { |
| 175 | + @return ( |
| 176 | + value-indicator-opacity: _hardcode(1, $exclude-hardcoded), |
| 177 | + ); |
| 178 | +} |
| 179 | + |
| 180 | +/// Generates custom tokens for the mat-snack-bar. |
| 181 | +/// @param {Map} $systems The MDC system tokens |
| 182 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 183 | +/// @return {Map} A set of custom tokens for the mat-snack-bar |
| 184 | +@function snack-bar($systems, $exclude-hardcoded) { |
| 185 | + @return ( |
| 186 | + button-color: map.get($systems, md-sys-color, inverse-primary), |
| 187 | + ); |
| 188 | +} |
| 189 | + |
169 | 190 | /// Generates custom tokens for the mat-sort.
|
170 | 191 | /// @param {Map} $systems The MDC system tokens
|
171 | 192 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
221 | 242 | @return mat.private-merge-all(
|
222 | 243 | _generate-typography-tokens($systems, label-text, title-small),
|
223 | 244 | (
|
224 |
| - disabled-ripple-color: blue, // TODO(mmalerba): Figure out correct value. |
| 245 | + disabled-ripple-color: null, // TODO(mmalerba): Figure out correct value. |
225 | 246 | pagination-icon-color: map.get($systems, md-sys-color, on-surface),
|
226 | 247 | inactive-label-text-color: map.get($systems, md-sys-color, on-surface),
|
227 | 248 | active-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
270 | 291 | );
|
271 | 292 | }
|
272 | 293 |
|
| 294 | +/// Generates custom tokens for the mat-toolbar. |
| 295 | +/// @param {Map} $systems The MDC system tokens |
| 296 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 297 | +/// @return {Map} A set of custom tokens for the mat-toolbar |
| 298 | +@function toolbar($systems, $exclude-hardcoded) { |
| 299 | + @return mat.private-merge-all( |
| 300 | + _generate-typography-tokens($systems, title-text, title-large), |
| 301 | + ( |
| 302 | + container-background-color: map.get($systems, md-sys-color, surface), |
| 303 | + container-text-color: map.get($systems, md-sys-color, on-surface), |
| 304 | + ) |
| 305 | + ); |
| 306 | +} |
| 307 | + |
273 | 308 | /// Generates custom tokens for the mat-tree.
|
274 | 309 | /// @param {Map} $systems The MDC system tokens
|
275 | 310 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
0 commit comments