mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[MIGRATION] - updated style to use still material 2 and postpone material migration
This commit is contained in:
parent
547085fc99
commit
b1f8b51277
@ -5,12 +5,12 @@
|
||||
$config: mat.get-color-config($theme);
|
||||
$foreground-palette: map.get($config, foreground);
|
||||
$primary-palette: map.get($config, primary);
|
||||
$text-color: mat.get-color-from-palette($foreground-palette, text);
|
||||
$primary: mat.get-color-from-palette($primary-palette, text);
|
||||
$text-color: mat.m2-get-color-from-palette($foreground-palette, text);
|
||||
$primary: mat.m2-get-color-from-palette($primary-palette, text);
|
||||
|
||||
adf-breadcrumb {
|
||||
.adf-breadcrumb__show-all-button-icon--rotate {
|
||||
color: mat.get-color-from-palette($primary-palette, 500);
|
||||
color: mat.m2-get-color-from-palette($primary-palette, 500);
|
||||
}
|
||||
|
||||
.adf-breadcrumb__item-wrapper {
|
||||
|
@ -2,22 +2,19 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import './theme/theme-data';
|
||||
|
||||
$custom-theme: mat.define-light-theme(
|
||||
$custom-theme: mat.m2-define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: map.get($palettes, primary),
|
||||
accent: map.get($palettes, accent),
|
||||
warn: map.get($palettes, warning),
|
||||
warn: map.get($palettes, warning)
|
||||
),
|
||||
typography: $app-typography,
|
||||
typography: $app-typography
|
||||
)
|
||||
);
|
||||
|
||||
@if $background-color {
|
||||
$custom-theme: get-custom-background-color(
|
||||
$background-color,
|
||||
$custom-theme
|
||||
);
|
||||
$custom-theme: get-custom-background-color($background-color, $custom-theme);
|
||||
}
|
||||
|
||||
@if $text-color {
|
||||
|
@ -1,31 +1,27 @@
|
||||
@use '@angular/material' as mat;
|
||||
@import './default-colors.scss';
|
||||
@import './custom-palette-creator.scss';
|
||||
@import './default-colors';
|
||||
@import './custom-palette-creator';
|
||||
|
||||
@function get-mat-palettes($primary-color, $accent-color) {
|
||||
$mat-primary-palette: null;
|
||||
|
||||
@if ($primary-color) {
|
||||
$custom-theme-primary-palette: create-color-palette($primary-color, 'primary');
|
||||
$mat-primary-palette: mat.define-palette($custom-theme-primary-palette, 500);
|
||||
$mat-primary-palette: mat.m2-define-palette($custom-theme-primary-palette, 500);
|
||||
} @else {
|
||||
$mat-primary-palette: mat.define-palette($default-primary, A100);
|
||||
$mat-primary-palette: mat.m2-define-palette($default-primary, A100);
|
||||
}
|
||||
|
||||
$mat-accent-palette: null;
|
||||
|
||||
@if ($accent-color) {
|
||||
$custom-theme-accent-palette: create-color-palette($accent-color, 'accent');
|
||||
$mat-accent-palette: mat.define-palette($custom-theme-accent-palette, 500);
|
||||
$mat-accent-palette: mat.m2-define-palette($custom-theme-accent-palette, 500);
|
||||
} @else {
|
||||
$mat-accent-palette: mat.define-palette($default-accent);
|
||||
$mat-accent-palette: mat.m2-define-palette($default-accent);
|
||||
}
|
||||
|
||||
$mat-warn-palette: mat.define-palette($default-warn, A100);
|
||||
$mat-warn-palette: mat.m2-define-palette($default-warn, A100);
|
||||
|
||||
@return (
|
||||
primary: $mat-primary-palette,
|
||||
accent: $mat-accent-palette,
|
||||
warning: $mat-warn-palette,
|
||||
);
|
||||
@return (primary: $mat-primary-palette, accent: $mat-accent-palette, warning: $mat-warn-palette);
|
||||
}
|
||||
|
@ -3,37 +3,37 @@
|
||||
@import '../variables/font-family';
|
||||
|
||||
@function get-mat-typography($base-font-size, $font-family) {
|
||||
$custom-typography: mat.define-typography-config(
|
||||
$custom-typography: mat.m2-define-typography-config(
|
||||
$font-family: 'Muli, Roboto, "Helvetica Neue", sans-serif',
|
||||
$headline-1: mat.define-typography-level(112px, 112px, 300),
|
||||
$headline-2: mat.define-typography-level(56px, 56px, 400),
|
||||
$headline-3: mat.define-typography-level(45px, 48px, 400),
|
||||
$headline-4: mat.define-typography-level(34px, 40px, 400),
|
||||
$headline-5: mat.define-typography-level(24px, 32px, 400),
|
||||
$headline-6: mat.define-typography-level(20px, 32px, 500),
|
||||
$subtitle-1: mat.define-typography-level(16px, 28px, 400),
|
||||
$body-1: mat.define-typography-level(15px, 24px, 400),
|
||||
$subtitle-2: mat.define-typography-level(14px, 24px, 500),
|
||||
$body-2: mat.define-typography-level(14px, 20px, 400),
|
||||
$caption: mat.define-typography-level(12px, 20px, 400),
|
||||
$button: mat.define-typography-level(14px, 14px, 500),
|
||||
$headline-1: mat.m2-define-typography-level(112px, 112px, 300),
|
||||
$headline-2: mat.m2-define-typography-level(56px, 56px, 400),
|
||||
$headline-3: mat.m2-define-typography-level(45px, 48px, 400),
|
||||
$headline-4: mat.m2-define-typography-level(34px, 40px, 400),
|
||||
$headline-5: mat.m2-define-typography-level(24px, 32px, 400),
|
||||
$headline-6: mat.m2-define-typography-level(20px, 32px, 500),
|
||||
$subtitle-1: mat.m2-define-typography-level(16px, 28px, 400),
|
||||
$body-1: mat.m2-define-typography-level(15px, 24px, 400),
|
||||
$subtitle-2: mat.m2-define-typography-level(14px, 24px, 500),
|
||||
$body-2: mat.m2-define-typography-level(14px, 20px, 400),
|
||||
$caption: mat.m2-define-typography-level(12px, 20px, 400),
|
||||
$button: mat.m2-define-typography-level(14px, 14px, 500),
|
||||
// Line-height must be unit-less fraction of the font-size.
|
||||
);
|
||||
|
||||
@if $base-font-size {
|
||||
$custom-typography: mat.define-typography-config(
|
||||
$headline-1: mat.define-typography-level(8rem, 8rem, 300),
|
||||
$headline-2: mat.define-typography-level(4rem, 4rem, 400),
|
||||
$headline-3: mat.define-typography-level(3.21rem, 3.21rem, 400),
|
||||
$headline-4: mat.define-typography-level(2.42rem, 2.85rem, 400),
|
||||
$headline-5: mat.define-typography-level(1.71rem, 2.28rem, 400),
|
||||
$headline-6: mat.define-typography-level(1.42rem, 2.28rem, 500),
|
||||
$subtitle-1: mat.define-typography-level(1.14rem, 2rem, 400),
|
||||
$body-1: mat.define-typography-level(1.07rem, 1.71rem, 400),
|
||||
$subtitle-2: mat.define-typography-level(1rem, 1.71rem, 500),
|
||||
$body-2: mat.define-typography-level(1rem, 1.42rem, 400),
|
||||
$caption: mat.define-typography-level(0.86rem, 1.42rem, 400),
|
||||
$button: mat.define-typography-level(1rem, 1rem, 500),
|
||||
$custom-typography: mat.m2-define-typography-config(
|
||||
$headline-1: mat.m2-define-typography-level(8rem, 8rem, 300),
|
||||
$headline-2: mat.m2-define-typography-level(4rem, 4rem, 400),
|
||||
$headline-3: mat.m2-define-typography-level(3.21rem, 3.21rem, 400),
|
||||
$headline-4: mat.m2-define-typography-level(2.42rem, 2.85rem, 400),
|
||||
$headline-5: mat.m2-define-typography-level(1.71rem, 2.28rem, 400),
|
||||
$headline-6: mat.m2-define-typography-level(1.42rem, 2.28rem, 500),
|
||||
$subtitle-1: mat.m2-define-typography-level(1.14rem, 2rem, 400),
|
||||
$body-1: mat.m2-define-typography-level(1.07rem, 1.71rem, 400),
|
||||
$subtitle-2: mat.m2-define-typography-level(1rem, 1.71rem, 500),
|
||||
$body-2: mat.m2-define-typography-level(1rem, 1.42rem, 400),
|
||||
$caption: mat.m2-define-typography-level(0.86rem, 1.42rem, 400),
|
||||
$button: mat.m2-define-typography-level(1rem, 1rem, 500),
|
||||
$font-family: $default-font-family
|
||||
);
|
||||
}
|
||||
|
@ -26,70 +26,70 @@
|
||||
// map SCSS variables to expose as CSS variables
|
||||
$defaults: (
|
||||
// theme colors
|
||||
--theme-primary-color: mat.get-color-from-palette($primary),
|
||||
--theme-primary-color-default-contrast: mat.get-color-from-palette($primary, default-contrast),
|
||||
--theme-header-text-color: mat.get-color-from-palette($primary, default-contrast),
|
||||
--adf-theme-primary-50: mat.get-color-from-palette($primary, 50),
|
||||
--adf-theme-primary-100: mat.get-color-from-palette($primary, 100),
|
||||
--adf-theme-primary-300: mat.get-color-from-palette($primary, 300),
|
||||
--adf-theme-primary-900: mat.get-color-from-palette($primary, 900),
|
||||
--theme-warn-color: mat.get-color-from-palette($warn),
|
||||
--theme-warn-color-a700: mat.get-color-from-palette($warn, A700),
|
||||
--theme-warn-color-default-contrast: mat.get-color-from-palette($warn, default-contrast),
|
||||
--theme-accent-color: mat.get-color-from-palette($accent),
|
||||
--theme-accent-color-a200: mat.get-color-from-palette($accent, A200),
|
||||
--theme-accent-color-default-contrast: mat.get-color-from-palette($accent, default-contrast),
|
||||
--theme-accent-500: mat.get-color-from-palette($accent, 500),
|
||||
--adf-theme-foreground-base-color: mat.get-color-from-palette($foreground, base),
|
||||
--adf-theme-foreground-base-color-065: mat.get-color-from-palette($foreground, base, 0.65),
|
||||
--adf-theme-foreground-base-color-045: mat.get-color-from-palette($foreground, base, 0.45),
|
||||
--adf-theme-foreground-disabled-text-color: mat.get-color-from-palette($foreground, disabled-text),
|
||||
--adf-theme-foreground-divider-color: mat.get-color-from-palette($foreground, divider),
|
||||
--adf-theme-foreground-icon-color: mat.get-color-from-palette($foreground, icon),
|
||||
--adf-theme-foreground-icon-color-054: mat.get-color-from-palette($foreground, icon, 0.54),
|
||||
--adf-theme-foreground-secondary-text-color: mat.get-color-from-palette($foreground, secondary-text),
|
||||
--adf-theme-foreground-text-color: mat.get-color-from-palette($foreground, text),
|
||||
--adf-theme-foreground-text-color-087: mat.get-color-from-palette($foreground, text, 0.87),
|
||||
--adf-theme-foreground-text-color-075: mat.get-color-from-palette($foreground, text, 0.75),
|
||||
--adf-theme-foreground-text-color-064: mat.get-color-from-palette($foreground, text, 0.64),
|
||||
--adf-theme-foreground-text-color-054: mat.get-color-from-palette($foreground, text, 0.54),
|
||||
--adf-theme-foreground-text-color-040: mat.get-color-from-palette($foreground, text, 0.4),
|
||||
--adf-theme-foreground-text-color-027: mat.get-color-from-palette($foreground, text, 0.27),
|
||||
--adf-theme-foreground-text-color-025: mat.get-color-from-palette($foreground, text, 0.25),
|
||||
--adf-theme-foreground-text-color-014: mat.get-color-from-palette($foreground, text, 0.14),
|
||||
--adf-theme-foreground-text-color-007: mat.get-color-from-palette($foreground, text, 0.07),
|
||||
--adf-theme-background-card-color: mat.get-color-from-palette($background, card),
|
||||
--adf-theme-background-card-color-087: mat.get-color-from-palette($background, card, 0.87),
|
||||
--theme-background-color: mat.get-color-from-palette($background, background),
|
||||
--adf-theme-background-dialog-color: mat.get-color-from-palette($background, dialog),
|
||||
--adf-theme-background-hover-color: mat.get-color-from-palette($background, hover),
|
||||
--adf-theme-background-selected-button-color: mat.get-color-from-palette($background, selected-button),
|
||||
--adf-theme-background-status-bar-color: mat.get-color-from-palette($background, status-bar),
|
||||
--adf-theme-background-unselected-chip-color: mat.get-color-from-palette($background, unselected-chip),
|
||||
--theme-primary-color: mat.m2-get-color-from-palette($primary),
|
||||
--theme-primary-color-default-contrast: mat.m2-get-color-from-palette($primary, default-contrast),
|
||||
--theme-header-text-color: mat.m2-get-color-from-palette($primary, default-contrast),
|
||||
--adf-theme-primary-50: mat.m2-get-color-from-palette($primary, 50),
|
||||
--adf-theme-primary-100: mat.m2-get-color-from-palette($primary, 100),
|
||||
--adf-theme-primary-300: mat.m2-get-color-from-palette($primary, 300),
|
||||
--adf-theme-primary-900: mat.m2-get-color-from-palette($primary, 900),
|
||||
--theme-warn-color: mat.m2-get-color-from-palette($warn),
|
||||
--theme-warn-color-a700: mat.m2-get-color-from-palette($warn, A700),
|
||||
--theme-warn-color-default-contrast: mat.m2-get-color-from-palette($warn, default-contrast),
|
||||
--theme-accent-color: mat.m2-get-color-from-palette($accent),
|
||||
--theme-accent-color-a200: mat.m2-get-color-from-palette($accent, A200),
|
||||
--theme-accent-color-default-contrast: mat.m2-get-color-from-palette($accent, default-contrast),
|
||||
--theme-accent-500: mat.m2-get-color-from-palette($accent, 500),
|
||||
--adf-theme-foreground-base-color: mat.m2-get-color-from-palette($foreground, base),
|
||||
--adf-theme-foreground-base-color-065: mat.m2-get-color-from-palette($foreground, base, 0.65),
|
||||
--adf-theme-foreground-base-color-045: mat.m2-get-color-from-palette($foreground, base, 0.45),
|
||||
--adf-theme-foreground-disabled-text-color: mat.m2-get-color-from-palette($foreground, disabled-text),
|
||||
--adf-theme-foreground-divider-color: mat.m2-get-color-from-palette($foreground, divider),
|
||||
--adf-theme-foreground-icon-color: mat.m2-get-color-from-palette($foreground, icon),
|
||||
--adf-theme-foreground-icon-color-054: mat.m2-get-color-from-palette($foreground, icon, 0.54),
|
||||
--adf-theme-foreground-secondary-text-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||
--adf-theme-foreground-text-color: mat.m2-get-color-from-palette($foreground, text),
|
||||
--adf-theme-foreground-text-color-087: mat.m2-get-color-from-palette($foreground, text, 0.87),
|
||||
--adf-theme-foreground-text-color-075: mat.m2-get-color-from-palette($foreground, text, 0.75),
|
||||
--adf-theme-foreground-text-color-064: mat.m2-get-color-from-palette($foreground, text, 0.64),
|
||||
--adf-theme-foreground-text-color-054: mat.m2-get-color-from-palette($foreground, text, 0.54),
|
||||
--adf-theme-foreground-text-color-040: mat.m2-get-color-from-palette($foreground, text, 0.4),
|
||||
--adf-theme-foreground-text-color-027: mat.m2-get-color-from-palette($foreground, text, 0.27),
|
||||
--adf-theme-foreground-text-color-025: mat.m2-get-color-from-palette($foreground, text, 0.25),
|
||||
--adf-theme-foreground-text-color-014: mat.m2-get-color-from-palette($foreground, text, 0.14),
|
||||
--adf-theme-foreground-text-color-007: mat.m2-get-color-from-palette($foreground, text, 0.07),
|
||||
--adf-theme-background-card-color: mat.m2-get-color-from-palette($background, card),
|
||||
--adf-theme-background-card-color-087: mat.m2-get-color-from-palette($background, card, 0.87),
|
||||
--theme-background-color: mat.m2-get-color-from-palette($background, background),
|
||||
--adf-theme-background-dialog-color: mat.m2-get-color-from-palette($background, dialog),
|
||||
--adf-theme-background-hover-color: mat.m2-get-color-from-palette($background, hover),
|
||||
--adf-theme-background-selected-button-color: mat.m2-get-color-from-palette($background, selected-button),
|
||||
--adf-theme-background-status-bar-color: mat.m2-get-color-from-palette($background, status-bar),
|
||||
--adf-theme-background-unselected-chip-color: mat.m2-get-color-from-palette($background, unselected-chip),
|
||||
// typography
|
||||
--theme-font-family: mat.font-family($typography),
|
||||
--theme-font-family: mat.m2-font-family($typography),
|
||||
--theme-font-weight: normal,
|
||||
--theme-body-1-font-size: mat.font-size($typography, body-2),
|
||||
--theme-body-2-font-size: mat.font-size($typography, subtitle-2),
|
||||
--theme-body-1-line-height: mat.line-height($typography, body-2),
|
||||
--theme-display-1-font-size: mat.font-size($typography, headline-4),
|
||||
--theme-display-3-font-size: mat.font-size($typography, headline-2),
|
||||
--theme-display-4-font-size: mat.font-size($typography, headline-1),
|
||||
--theme-caption-font-size: mat.font-size($typography, caption),
|
||||
--theme-title-font-size: mat.font-size($typography, headline-6),
|
||||
--theme-subheading-1-font-size: mat.font-size($typography, body-1),
|
||||
--theme-subheading-2-font-size: mat.font-size($typography, subtitle-1),
|
||||
--theme-button-font-size: mat.font-size($typography, button),
|
||||
--theme-headline-font-size: mat.font-size($typography, headline-5),
|
||||
--theme-headline-line-height: mat.line-height($typography, headline-5),
|
||||
--theme-body-1-font-size: mat.m2-font-size($typography, body-2),
|
||||
--theme-body-2-font-size: mat.m2-font-size($typography, subtitle-2),
|
||||
--theme-body-1-line-height: mat.m2-line-height($typography, body-2),
|
||||
--theme-display-1-font-size: mat.m2-font-size($typography, headline-4),
|
||||
--theme-display-3-font-size: mat.m2-font-size($typography, headline-2),
|
||||
--theme-display-4-font-size: mat.m2-font-size($typography, headline-1),
|
||||
--theme-caption-font-size: mat.m2-font-size($typography, caption),
|
||||
--theme-title-font-size: mat.m2-font-size($typography, headline-6),
|
||||
--theme-subheading-1-font-size: mat.m2-font-size($typography, body-1),
|
||||
--theme-subheading-2-font-size: mat.m2-font-size($typography, subtitle-1),
|
||||
--theme-button-font-size: mat.m2-font-size($typography, button),
|
||||
--theme-headline-font-size: mat.m2-font-size($typography, headline-5),
|
||||
--theme-headline-line-height: mat.m2-line-height($typography, headline-5),
|
||||
--theme-adf-icon-1-font-size: map-get($custom-css-variables, 'theme-adf-icon-1-font-size'),
|
||||
--theme-adf-picture-1-font-size: map-get($custom-css-variables, 'theme-adf-picture-1-font-size'),
|
||||
--theme-adf-task-footer-font-size: map-get($custom-css-variables, 'theme-adf-task-footer-font-size'),
|
||||
--theme-adf-task-title-font-size: map-get($custom-css-variables, 'theme-adf-task-title-font-size'),
|
||||
// specific colors
|
||||
--adf-theme-mat-grey-color-a200: mat.get-color-from-palette(mat.$grey-palette, A200),
|
||||
--adf-theme-mat-grey-color-a400: mat.get-color-from-palette(mat.$grey-palette, A400),
|
||||
--adf-theme-mat-grey-color-50: mat.get-color-from-palette(mat.$grey-palette, 50),
|
||||
--adf-theme-mat-grey-color-a200: mat.m2-get-color-from-palette(mat.$m2-grey-palette, 'A200'),
|
||||
--adf-theme-mat-grey-color-a400: mat.m2-get-color-from-palette(mat.$m2-grey-palette, 'A400'),
|
||||
--adf-theme-mat-grey-color-50: mat.m2-get-color-from-palette(mat.$m2-grey-palette, 50),
|
||||
// spacing
|
||||
--adf-theme-spacing: map-get($custom-css-variables, 'theme-adf-spacing'),
|
||||
// components
|
||||
|
@ -1,18 +1,18 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
$alfresco-typography: mat.define-typography-config(
|
||||
$alfresco-typography: mat.m2-define-typography-config(
|
||||
$font-family: 'Roboto, "Helvetica Neue", sans-serif',
|
||||
$headline-1: mat.define-typography-level(112px, 112px, 300),
|
||||
$headline-2: mat.define-typography-level(56px, 56px, 400),
|
||||
$headline-3: mat.define-typography-level(45px, 48px, 400),
|
||||
$headline-4: mat.define-typography-level(34px, 40px, 400),
|
||||
$headline-5: mat.define-typography-level(24px, 32px, 400),
|
||||
$headline-6: mat.define-typography-level(20px, 32px, 500),
|
||||
$subtitle-1: mat.define-typography-level(16px, 28px, 400),
|
||||
$body-1: mat.define-typography-level(15px, 24px, 400),
|
||||
$subtitle-2: mat.define-typography-level(14px, 24px, 500),
|
||||
$body-2: mat.define-typography-level(14px, 20px, 400),
|
||||
$caption: mat.define-typography-level(12px, 20px, 400),
|
||||
$button: mat.define-typography-level(14px, 14px, 500),
|
||||
$headline-1: mat.m2-define-typography-level(112px, 112px, 300),
|
||||
$headline-2: mat.m2-define-typography-level(56px, 56px, 400),
|
||||
$headline-3: mat.m2-define-typography-level(45px, 48px, 400),
|
||||
$headline-4: mat.m2-define-typography-level(34px, 40px, 400),
|
||||
$headline-5: mat.m2-define-typography-level(24px, 32px, 400),
|
||||
$headline-6: mat.m2-define-typography-level(20px, 32px, 500),
|
||||
$subtitle-1: mat.m2-define-typography-level(16px, 28px, 400),
|
||||
$body-1: mat.m2-define-typography-level(15px, 24px, 400),
|
||||
$subtitle-2: mat.m2-define-typography-level(14px, 24px, 500),
|
||||
$body-2: mat.m2-define-typography-level(14px, 20px, 400),
|
||||
$caption: mat.m2-define-typography-level(12px, 20px, 400),
|
||||
$button: mat.m2-define-typography-level(14px, 14px, 500),
|
||||
// Line-height must be unit-less fraction of the font-size.
|
||||
);
|
||||
|
4470
package-lock.json
generated
4470
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -30,13 +30,13 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/animations": "18.2.13",
|
||||
"@angular/cdk": "18.2.13",
|
||||
"@angular/cdk": "18.2.14",
|
||||
"@angular/common": "18.2.13",
|
||||
"@angular/compiler": "18.2.13",
|
||||
"@angular/core": "18.2.13",
|
||||
"@angular/forms": "18.2.13",
|
||||
"@angular/material": "18.2.13",
|
||||
"@angular/material-date-fns-adapter": "18.2.13",
|
||||
"@angular/material": "18.2.14",
|
||||
"@angular/material-date-fns-adapter": "18.2.14",
|
||||
"@angular/platform-browser": "18.2.13",
|
||||
"@angular/platform-browser-dynamic": "18.2.13",
|
||||
"@angular/router": "18.2.13",
|
||||
|
Loading…
x
Reference in New Issue
Block a user