|
172 | 172 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
173 | 173 | /// @return {Map} A set of custom tokens for the mat-datepicker
|
174 | 174 | @function datepicker($systems, $exclude-hardcoded) {
|
175 |
| - @return ( |
| 175 | + @return (( |
176 | 176 | calendar-date-in-range-state-background-color:
|
177 | 177 | map.get($systems, md-sys-color, primary-container),
|
178 | 178 | calendar-date-in-comparison-range-state-background-color:
|
179 |
| - map.get($systems, md-sys-color, secondary-container), |
180 |
| - calendar-date-in-overlap-range-state-background-color: |
181 | 179 | map.get($systems, md-sys-color, tertiary-container),
|
| 180 | + calendar-date-in-overlap-range-state-background-color: |
| 181 | + map.get($systems, md-sys-color, secondary-container), |
182 | 182 | calendar-date-in-overlap-range-selected-state-background-color:
|
183 |
| - map.get($systems, md-sys-color, tertiary), |
| 183 | + map.get($systems, md-sys-color, secondary), |
184 | 184 | calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-primary),
|
185 | 185 | calendar-date-selected-state-background-color: map.get($systems, md-sys-color, primary),
|
186 | 186 | calendar-date-selected-disabled-state-background-color: mat.private-safe-color-change(
|
|
234 | 234 | calendar-period-button-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
235 | 235 | calendar-header-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
236 | 236 | calendar-header-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
237 |
| - ); |
| 237 | + ), ( |
| 238 | + // Color variants: |
| 239 | + primary: (), // Default, no overrides needed. |
| 240 | + secondary: ( |
| 241 | + calendar-date-in-range-state-background-color: |
| 242 | + map.get($systems, md-sys-color, secondary-container), |
| 243 | + calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-secondary), |
| 244 | + calendar-date-selected-state-background-color: map.get($systems, md-sys-color, secondary), |
| 245 | + calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, secondary), |
| 246 | + calendar-date-today-outline-color: map.get($systems, md-sys-color, secondary), |
| 247 | + calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, secondary), |
| 248 | + calendar-date-in-overlap-range-state-background-color: |
| 249 | + map.get($systems, md-sys-color, primary-container), |
| 250 | + calendar-date-in-overlap-range-selected-state-background-color: |
| 251 | + map.get($systems, md-sys-color, primary), |
| 252 | + ), |
| 253 | + tertiary: ( |
| 254 | + calendar-date-in-range-state-background-color: |
| 255 | + map.get($systems, md-sys-color, tertiary-container), |
| 256 | + calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-tertiary), |
| 257 | + calendar-date-selected-state-background-color: map.get($systems, md-sys-color, tertiary), |
| 258 | + calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, tertiary), |
| 259 | + calendar-date-today-outline-color: map.get($systems, md-sys-color, tertiary), |
| 260 | + calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, tertiary), |
| 261 | + calendar-date-in-comparison-range-state-background-color: |
| 262 | + map.get($systems, md-sys-color, primary-container), |
| 263 | + ), |
| 264 | + error: ( |
| 265 | + calendar-date-in-range-state-background-color: |
| 266 | + map.get($systems, md-sys-color, error-container), |
| 267 | + calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-error), |
| 268 | + calendar-date-selected-state-background-color: map.get($systems, md-sys-color, error), |
| 269 | + calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, error), |
| 270 | + calendar-date-today-outline-color: map.get($systems, md-sys-color, error), |
| 271 | + calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, error), |
| 272 | + ) |
| 273 | + )); |
238 | 274 | }
|
239 | 275 |
|
240 | 276 | /// Generates custom tokens for the mat-divider.
|
|
324 | 360 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
325 | 361 | /// @return {Map} A set of custom tokens for the mat-form-field
|
326 | 362 | @function form-field($systems, $exclude-hardcoded) {
|
327 |
| - @return mat.private-merge-all( |
| 363 | + @return (mat.private-merge-all( |
328 | 364 | _generate-typography-tokens($systems, container-text, body-large),
|
329 | 365 | _generate-typography-tokens($systems, subscript-text, body-small),
|
330 | 366 | (
|
|
343 | 379 | focus-select-arrow-color: map.get($systems, md-sys-color, primary),
|
344 | 380 | outlined-label-text-populated-size: map.get($systems, md-sys-typeface, body-large-size),
|
345 | 381 | )
|
346 |
| - ); |
| 382 | + ), ( |
| 383 | + // Color variants: |
| 384 | + primary: (), // Default, no overrides needed. |
| 385 | + secondary: ( |
| 386 | + focus-select-arrow-color: map.get($systems, md-sys-color, secondary), |
| 387 | + ), |
| 388 | + tertiary: ( |
| 389 | + focus-select-arrow-color: map.get($systems, md-sys-color, tertiary), |
| 390 | + ), |
| 391 | + error: ( |
| 392 | + focus-select-arrow-color: map.get($systems, md-sys-color, error), |
| 393 | + ) |
| 394 | + )); |
347 | 395 | }
|
348 | 396 |
|
349 | 397 | /// Generates custom tokens for the mat-grid-list.
|
|
1088 | 1136 | );
|
1089 | 1137 | }
|
1090 | 1138 |
|
| 1139 | +/// Generates custom token overrides for the mdc-radio color variants. |
| 1140 | +/// @param {Map} $systems The MDC system tokens |
| 1141 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 1142 | +/// @return {Map} A set of color variant token overrides for the mdc-radio |
1091 | 1143 | @function mdc-radio-color-variants($systems, $exclude-hardcoded) {
|
1092 | 1144 | @return (
|
1093 | 1145 | primary: (), // Default, no overrides needed
|
|
1120 | 1172 | ),
|
1121 | 1173 | );
|
1122 | 1174 | }
|
| 1175 | + |
| 1176 | +/// Generates custom token overrides for the mdc-circular-progress color variants. |
| 1177 | +/// @param {Map} $systems The MDC system tokens |
| 1178 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 1179 | +/// @return {Map} A set of color variant token overrides for the mdc-circular-progress |
| 1180 | +@function mdc-circular-progress-color-variants($systems, $exclude-hardcoded) { |
| 1181 | + @return ( |
| 1182 | + primary: (), // Default, no overrides needed |
| 1183 | + secondary: ( |
| 1184 | + active-indicator-color: map.get($systems, md-sys-color, secondary), |
| 1185 | + ), |
| 1186 | + tertiary: ( |
| 1187 | + active-indicator-color: map.get($systems, md-sys-color, tertiary), |
| 1188 | + ), |
| 1189 | + error: ( |
| 1190 | + active-indicator-color: map.get($systems, md-sys-color, error), |
| 1191 | + ) |
| 1192 | + ); |
| 1193 | +} |
| 1194 | + |
| 1195 | +/// Generates custom token overrides for the mdc-linear-progress color variants. |
| 1196 | +/// @param {Map} $systems The MDC system tokens |
| 1197 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 1198 | +/// @return {Map} A set of color variant token overrides for the mdc-linear-progress |
| 1199 | +@function mdc-linear-progress-color-variants($systems, $exclude-hardcoded) { |
| 1200 | + @return ( |
| 1201 | + primary: (), // Default, no overrides needed |
| 1202 | + secondary: ( |
| 1203 | + active-indicator-color: map.get($systems, md-sys-color, secondary), |
| 1204 | + ), |
| 1205 | + tertiary: ( |
| 1206 | + active-indicator-color: map.get($systems, md-sys-color, tertiary), |
| 1207 | + ), |
| 1208 | + error: ( |
| 1209 | + active-indicator-color: map.get($systems, md-sys-color, error), |
| 1210 | + ), |
| 1211 | + ); |
| 1212 | +} |
| 1213 | + |
| 1214 | +/// Generates custom token overrides for the mdc-filled-form-field color variants. |
| 1215 | +/// @param {Map} $systems The MDC system tokens |
| 1216 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 1217 | +/// @return {Map} A set of color variant token overrides for the mdc-filled-form-field |
| 1218 | +@function mdc-filled-text-field-color-variants($systems, $exclude-hardcoded) { |
| 1219 | + @return ( |
| 1220 | + primary: (), // Default, no overrides needed |
| 1221 | + secondary: ( |
| 1222 | + caret-color: map.get($systems, md-sys-color, secondary), |
| 1223 | + focus-active-indicator-color: map.get($systems, md-sys-color, secondary), |
| 1224 | + focus-label-text-color: map.get($systems, md-sys-color, secondary), |
| 1225 | + ), |
| 1226 | + tertiary: ( |
| 1227 | + caret-color: map.get($systems, md-sys-color, tertiary), |
| 1228 | + focus-active-indicator-color: map.get($systems, md-sys-color, tertiary), |
| 1229 | + focus-label-text-color: map.get($systems, md-sys-color, tertiary), |
| 1230 | + ), |
| 1231 | + error: ( |
| 1232 | + caret-color: map.get($systems, md-sys-color, error), |
| 1233 | + focus-active-indicator-color: map.get($systems, md-sys-color, error), |
| 1234 | + focus-label-text-color: map.get($systems, md-sys-color, error), |
| 1235 | + ), |
| 1236 | + ); |
| 1237 | +} |
| 1238 | + |
| 1239 | +/// Generates custom token overrides for the mdc-outlined-form-field color variants. |
| 1240 | +/// @param {Map} $systems The MDC system tokens |
| 1241 | +/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
| 1242 | +/// @return {Map} A set of color variant token overrides for the mdc-outlined-form-field |
| 1243 | +@function mdc-outlined-text-field-color-variants($systems, $exclude-hardcoded) { |
| 1244 | + @return ( |
| 1245 | + primary: (), // Default, no overrides needed |
| 1246 | + secondary: ( |
| 1247 | + caret-color: map.get($systems, md-sys-color, secondary), |
| 1248 | + focus-label-text-color: map.get($systems, md-sys-color, secondary), |
| 1249 | + focus-outline-color: map.get($systems, md-sys-color, secondary), |
| 1250 | + ), |
| 1251 | + tertiary: ( |
| 1252 | + caret-color: map.get($systems, md-sys-color, tertiary), |
| 1253 | + focus-label-text-color: map.get($systems, md-sys-color, tertiary), |
| 1254 | + focus-outline-color: map.get($systems, md-sys-color, tertiary), |
| 1255 | + ), |
| 1256 | + error: ( |
| 1257 | + caret-color: map.get($systems, md-sys-color, error), |
| 1258 | + focus-label-text-color: map.get($systems, md-sys-color, error), |
| 1259 | + focus-outline-color: map.get($systems, md-sys-color, error), |
| 1260 | + ), |
| 1261 | + ); |
| 1262 | +} |
0 commit comments