|
35 | 35 | ); |
36 | 36 | } |
37 | 37 |
|
| 38 | +/// Generates custom tokens for the mat-datepicker. |
| 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-datepicker |
| 42 | +@function datepicker($systems, $exclude-hardcoded) { |
| 43 | + @return ( |
| 44 | + calendar-date-in-range-state-background-color: |
| 45 | + map.get($systems, md-sys-color, primary-container), |
| 46 | + calendar-date-in-comparison-range-state-background-color: |
| 47 | + map.get($systems, md-sys-color, secondary-container), |
| 48 | + calendar-date-in-overlap-range-state-background-color: |
| 49 | + map.get($systems, md-sys-color, tertiary-container), |
| 50 | + calendar-date-in-overlap-range-selected-state-background-color: |
| 51 | + map.get($systems, md-sys-color, tertiary), |
| 52 | + calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-primary), |
| 53 | + calendar-date-selected-state-background-color: map.get($systems, md-sys-color, primary), |
| 54 | + calendar-date-selected-disabled-state-background-color: mat.private-safe-color-change( |
| 55 | + map.get($systems, md-sys-color, on-surface), |
| 56 | + $alpha: 0.38 |
| 57 | + ), |
| 58 | + calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, primary), |
| 59 | + calendar-date-focus-state-background-color: mat.private-safe-color-change( |
| 60 | + map.get($systems, md-sys-color, on-surface), |
| 61 | + $alpha: map.get($systems, md-sys-state, focus-state-layer-opacity) |
| 62 | + ), |
| 63 | + calendar-date-hover-state-background-color: mat.private-safe-color-change( |
| 64 | + map.get($systems, md-sys-color, on-surface), |
| 65 | + $alpha: map.get($systems, md-sys-state, hover-state-layer-opacity) |
| 66 | + ), |
| 67 | + toggle-active-state-icon-color: map.get($systems, md-sys-color, on-surface-variant), |
| 68 | + toggle-icon-color: map.get($systems, md-sys-color, on-surface-variant), |
| 69 | + calendar-body-label-text-color: map.get($systems, md-sys-color, on-surface), |
| 70 | + calendar-period-button-icon-color: map.get($systems, md-sys-color, on-surface-variant), |
| 71 | + calendar-navigation-button-icon-color: map.get($systems, md-sys-color, on-surface-variant), |
| 72 | + calendar-header-divider-color: map.get($systems, md-sys-color, outline-variant), |
| 73 | + calendar-header-text-color: map.get($systems, md-sys-color, on-surface-variant), |
| 74 | + calendar-date-today-outline-color: map.get($systems, md-sys-color, primary), |
| 75 | + calendar-date-today-disabled-state-outline-color: mat.private-safe-color-change( |
| 76 | + map.get($systems, md-sys-color, on-surface), |
| 77 | + $alpha: 0.38 |
| 78 | + ), |
| 79 | + calendar-date-text-color: map.get($systems, md-sys-color, on-surface), |
| 80 | + calendar-date-outline-color: _hardcode(transparent, $exclude-hardcoded), |
| 81 | + calendar-date-disabled-state-text-color: mat.private-safe-color-change( |
| 82 | + map.get($systems, md-sys-color, on-surface), |
| 83 | + $alpha: 0.38 |
| 84 | + ), |
| 85 | + calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, primary), |
| 86 | + range-input-separator-color: map.get($systems, md-sys-color, on-surface), |
| 87 | + range-input-disabled-state-separator-color: mat.private-safe-color-change( |
| 88 | + map.get($systems, md-sys-color, on-surface), |
| 89 | + $alpha: 0.38 |
| 90 | + ), |
| 91 | + range-input-disabled-state-text-color: mat.private-safe-color-change( |
| 92 | + map.get($systems, md-sys-color, on-surface), |
| 93 | + $alpha: 0.38 |
| 94 | + ), |
| 95 | + calendar-container-background-color: map.get($systems, md-sys-color, surface-container-high), |
| 96 | + calendar-container-text-color: map.get($systems, md-sys-color, on-surface), |
| 97 | + calendar-text-font: map.get($systems, md-sys-typescale, body-large-font), |
| 98 | + calendar-text-size: map.get($systems, md-sys-typescale, body-large-size), |
| 99 | + calendar-body-label-text-size: map.get($systems, md-sys-typescale, title-small-size), |
| 100 | + calendar-body-label-text-weight: map.get($systems, md-sys-typescale, title-small-weight), |
| 101 | + calendar-period-button-text-size: map.get($systems, md-sys-typescale, title-small-size), |
| 102 | + calendar-period-button-text-weight: map.get($systems, md-sys-typescale, title-small-weight), |
| 103 | + calendar-header-text-size: map.get($systems, md-sys-typescale, title-small-size), |
| 104 | + calendar-header-text-weight: map.get($systems, md-sys-typescale, title-small-weight), |
| 105 | + ); |
| 106 | +} |
| 107 | + |
38 | 108 | /// Generates custom tokens for the mat-divider. |
39 | 109 | /// @param {Map} $systems The MDC system tokens |
40 | 110 | /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values |
|
0 commit comments