40 |
Active theme: {{ _themeService.activeTheme$ | async }}
41 |
Dark theme is active: {{ _themeService.darkTheme$ | async }}
42 |
Light theme is active: {{ _themeService.lightTheme$ | async }}
43 |
44 | Theme map: {{ _themeService.map({ 'dark-theme': 'hacker vibes 👩💻', 'light-theme': 'miami vibes 🏖️' }) | async }}
45 |
46 |
47 | ```
48 |
--------------------------------------------------------------------------------
/src/lib/theme/_all-theme.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * All theme imports
3 | */
4 | // Order here is important
5 | @import 'palette';
6 | @import 'mixins';
7 | @import 'theme';
8 | @import 'overrides';
9 | @import 'default-variables';
10 |
--------------------------------------------------------------------------------
/src/lib/theme/_default-variables.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * DEFAULT VARIABLES FOR VANTAGE UIs
3 | */
4 |
5 | // Light theme
6 | $td-accent: mat-palette($td-teal, 900, 200, 900);
7 | $td-primary: mat-palette($td-slate, 500, 200, 800);
8 | $td-warn: mat-palette($mat-red, 900);
9 |
10 | // Dark theme
11 | $td-dark-accent: mat-palette($td-teal, 300, 100, 1200);
12 | $td-dark-primary: mat-palette($td-slate, 300, 200, 900);
13 | $td-dark-warn: mat-palette($mat-red, 400);
14 |
--------------------------------------------------------------------------------
/src/lib/theme/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Helper mixins for Teradata Brand palettes
2 | //
3 | // Mixins here loop over Teradata brand palette and create classes to be used
4 | // in Teradata Products.
5 |
6 | // Text color palette mixin
7 | @mixin tc($palette, $name, $default) {
8 | .tc-#{$name} {
9 | color: map-get($palette, $default);
10 | }
11 | @each $size, $color in $palette {
12 | @if $size != contrast {
13 | .tc-#{$name}-#{$size} {
14 | color: $color;
15 | }
16 | }
17 | }
18 | }
19 |
20 | // Background color palette mixin
21 | @mixin bgc($palette, $name, $default) {
22 | .bgc-#{$name} {
23 | background-color: map-get($palette, $default);
24 | }
25 | @each $size, $color in $palette {
26 | @if $size != contrast {
27 | .bgc-#{$name}-#{$size} {
28 | background-color: $color;
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/lib/theme/_theme.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * FONTS
3 | */
4 |
5 | // Teradata Font
6 | $td-font-default: 'Arial, Helvetica, sans-serif';
7 |
8 | $td-font-display-regular: '"RidleyGrotesk", "RidleyGrotesk-Regular", Arial, Helvetica, sans-serif';
9 | $td-font-display-medium: '"RidleyGrotesk", "RidleyGrotesk-Medium", Arial, Helvetica, sans-serif';
10 | $td-font-display-semibold: '"RidleyGrotesk","RidleyGrotesk-Semibold", Arial, Helvetica, sans-serif';
11 | $td-font-display-bold: '"RidleyGrotesk","RidleyGrotesk-Bold", Arial, Helvetica, sans-serif';
12 |
13 | $fontConfig: (
14 | font-family: $td-font-default,
15 | display-4: mat-typography-level(96px, 120px, 500, $td-font-display-medium, -1.5px),
16 | display-3: mat-typography-level(60px, 84px, 600, $td-font-display-semibold, -0.5px),
17 | display-2: mat-typography-level(48px, 64px, 600, $td-font-display-semibold, 0),
18 | display-1: mat-typography-level(34px, 48px, 700, $td-font-display-bold, 0.25px),
19 | headline: mat-typography-level(24px, 36px, 700, $td-font-display-bold, 0),
20 | title: mat-typography-level(20px, 28px, 600, $td-font-display-semibold, 0.15px),
21 | subheading-2: mat-typography-level(16px, 24px, 600, $td-font-display-semibold, 0.15px),
22 | subheading-1: mat-typography-level(14px, 20px, 600, $td-font-display-semibold, 0.1px),
23 | body-1: mat-typography-level(14px, 20px, 400, $td-font-default, 0.25px),
24 | body-2: mat-typography-level(14px, 20px, 700, $td-font-default, 0.25px),
25 | button: mat-typography-level(14px, 16px, 600, $td-font-display-semibold, 0.5px),
26 | caption: mat-typography-level(12px, 16px, 400, $td-font-default, 0.4px),
27 | input: mat-typography-level(inherit, 1.125, 400, $td-font-default, 0.4px),
28 | overline: mat-typography-level(10px, 12px, 400, $td-font-default, 1.5px),
29 | );
30 |
31 | @include mat-core($fontConfig);
32 |
33 | .mat-card-title {
34 | @include mat-typography-level-to-styles($fontConfig, title);
35 | }
36 |
37 | .mat-overline {
38 | text-transform: uppercase;
39 | @include mat-typography-level-to-styles($fontConfig, overline);
40 | }
41 |
42 | // Teradata Palette utility classes
43 | body {
44 | font-family: #{$td-font-default} !important;
45 | // Teradata Slate - foreground & background
46 | @include tc($td-slate, td-slate, 500);
47 | @include bgc($td-slate, td-slate, 500);
48 |
49 | // Teradata Orange - foreground & background
50 | @include tc($td-orange, td-orange, 800);
51 | @include bgc($td-orange, td-orange, 500);
52 |
53 | // Teradata Yellow - foreground & background
54 | @include tc($td-yellow, td-yellow, 900);
55 | @include bgc($td-yellow, td-yellow, 500);
56 |
57 | // Teradata Teal - foreground & background
58 | @include tc($td-teal, td-teal, 900);
59 | @include bgc($td-teal, td-teal, 500);
60 |
61 | // Teradata Blue - foreground & background
62 | @include tc($td-blue, td-blue, 700);
63 | @include bgc($td-blue, td-blue, 500);
64 | }
65 |
--------------------------------------------------------------------------------
/src/lib/theme/icons/teradata-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |