[6a3a178] | 1 | @use 'sass:map';
|
---|
| 2 | @use '../core/theming/theming';
|
---|
| 3 | @use '../core/typography/typography';
|
---|
| 4 | @use '../core/typography/typography-utils';
|
---|
| 5 | @use '../core/density/private/compatibility';
|
---|
| 6 | @use './paginator-variables';
|
---|
| 7 |
|
---|
| 8 | @mixin color($config-or-theme) {
|
---|
| 9 | $config: theming.get-color-config($config-or-theme);
|
---|
| 10 | $foreground: map.get($config, foreground);
|
---|
| 11 | $background: map.get($config, background);
|
---|
| 12 |
|
---|
| 13 | .mat-paginator {
|
---|
| 14 | background: theming.get-color-from-palette($background, 'card');
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | .mat-paginator,
|
---|
| 18 | .mat-paginator-page-size .mat-select-trigger {
|
---|
| 19 | color: theming.get-color-from-palette($foreground, secondary-text);
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | .mat-paginator-decrement,
|
---|
| 23 | .mat-paginator-increment {
|
---|
| 24 | border-top: 2px solid theming.get-color-from-palette($foreground, 'icon');
|
---|
| 25 | border-right: 2px solid theming.get-color-from-palette($foreground, 'icon');
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | .mat-paginator-first,
|
---|
| 29 | .mat-paginator-last {
|
---|
| 30 | border-top: 2px solid theming.get-color-from-palette($foreground, 'icon');
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | .mat-icon-button[disabled] {
|
---|
| 34 | .mat-paginator-decrement,
|
---|
| 35 | .mat-paginator-increment,
|
---|
| 36 | .mat-paginator-first,
|
---|
| 37 | .mat-paginator-last {
|
---|
| 38 | border-color: theming.get-color-from-palette($foreground, 'disabled');
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | @mixin typography($config-or-theme) {
|
---|
| 44 | $config: typography.private-typography-to-2014-config(
|
---|
| 45 | theming.get-typography-config($config-or-theme));
|
---|
| 46 | .mat-paginator,
|
---|
| 47 | .mat-paginator-page-size .mat-select-trigger {
|
---|
| 48 | font: {
|
---|
| 49 | family: typography-utils.font-family($config, caption);
|
---|
| 50 | size: typography-utils.font-size($config, caption);
|
---|
| 51 | }
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | @mixin density($config-or-theme) {
|
---|
| 56 | $density-scale: theming.get-density-config($config-or-theme);
|
---|
| 57 | $height: compatibility.private-density-prop-value(paginator-variables.$density-config,
|
---|
| 58 | $density-scale, height);
|
---|
| 59 |
|
---|
| 60 | @include compatibility.private-density-legacy-compatibility() {
|
---|
| 61 | .mat-paginator-container {
|
---|
| 62 | min-height: $height;
|
---|
| 63 | }
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 |
|
---|
| 67 | @mixin theme($theme-or-color-config) {
|
---|
| 68 | $theme: theming.private-legacy-get-theme($theme-or-color-config);
|
---|
| 69 | @include theming.private-check-duplicate-theme-styles($theme, 'mat-paginator') {
|
---|
| 70 | $color: theming.get-color-config($theme);
|
---|
| 71 | $density: theming.get-density-config($theme);
|
---|
| 72 | $typography: theming.get-typography-config($theme);
|
---|
| 73 |
|
---|
| 74 | @if $color != null {
|
---|
| 75 | @include color($color);
|
---|
| 76 | }
|
---|
| 77 | @if $density != null {
|
---|
| 78 | @include density($density);
|
---|
| 79 | }
|
---|
| 80 | @if $typography != null {
|
---|
| 81 | @include typography($typography);
|
---|
| 82 | }
|
---|
| 83 | }
|
---|
| 84 | }
|
---|