diff --git a/docs/content-services/directives/inherited-button.directive.md b/docs/content-services/directives/inherited-button.directive.md index f836e4ef4c..7671115f63 100644 --- a/docs/content-services/directives/inherited-button.directive.md +++ b/docs/content-services/directives/inherited-button.directive.md @@ -13,7 +13,6 @@ Update the current node by adding/removing the inherited permissions. ```html ``` diff --git a/docs/core/components/datatable.component.md b/docs/core/components/datatable.component.md index 5049053576..e21f440a8d 100644 --- a/docs/core/components/datatable.component.md +++ b/docs/core/components/datatable.component.md @@ -351,7 +351,6 @@ while the data for the table is loading: diff --git a/docs/core/components/header.component.md b/docs/core/components/header.component.md index 7a00e4c54b..5839170143 100644 --- a/docs/core/components/header.component.md +++ b/docs/core/components/header.component.md @@ -16,7 +16,6 @@ Reusable header for Alfresco applications. title="title" logo="logo.svg" [redirectUrl]="'/home'" - color="primary" (clicked)=toggleMenu($event)> ``` @@ -38,7 +37,7 @@ body of the element: | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| color | [`ThemePalette`](https://github.com/angular/components/blob/master/src/material/core/common-behaviors/color.ts) | | Background color for the header. It can be any hex color code or one of the Material theme colors: 'primary', 'accent' or 'warn'. | +| backgroundColor | [`string`] | Background color for the header. It can be any hex color code or CSS variable. | | expandedSidenav | `boolean` | true | expandedSidenav: Toggles the expanded state of the component. | | logo | `string` | | Path to an image file for the application logo. | | position | `string` | "start" | The side of the page that the drawer is attached to (can be 'start' or 'end') | @@ -58,5 +57,5 @@ body of the element: ## Details This component displays a customizable header that can be reused. Use the input properties to -configure the left side (title, button) and the primary color of the header. The right part of the +configure the left side (title, button) and the background color of the header. The right part of the header can contain other components which are transcluded in the header component. diff --git a/docs/core/components/toolbar.component.md b/docs/core/components/toolbar.component.md index 9d5bf4e8f0..2520f8e1c9 100644 --- a/docs/core/components/toolbar.component.md +++ b/docs/core/components/toolbar.component.md @@ -19,7 +19,6 @@ Simple container for headers, titles, actions and breadcrumbs. - [Properties](#properties) - [Details](#details) - [Dropdown menu](#dropdown-menu) - - [Custom color](#custom-color) - [See also](#see-also) ## Basic Usage @@ -74,7 +73,6 @@ pushed to the right by a spacer: | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| color | [`ThemePalette`](https://github.com/angular/components/blob/master/src/material/core/common-behaviors/color.ts) | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. | | title | `string` | "" | Toolbar title. | ## Details @@ -116,21 +114,6 @@ when you click the menu button: ![](../../docassets/images/adf-toolbar-04.png) -### Custom color - -Besides the default color you can use 'primary', 'accent', or 'warn' values: - -You might also want to change colors to follow your application's color -[theme](../../user-guide/theming.md): - -For example: - -![](../../docassets/images/adf-toolbar-05.png) - -![](../../docassets/images/adf-toolbar-06.png) - -![](../../docassets/images/adf-toolbar-07.png) - ## See also - [Toolbar Divider component](toolbar-divider.component.md) diff --git a/docs/core/services/process-content.service.md b/docs/core/services/process-content.service.md index 895f0b2064..1f335f490b 100644 --- a/docs/core/services/process-content.service.md +++ b/docs/core/services/process-content.service.md @@ -95,7 +95,7 @@ Let's say we have an upload button as follows: ```html
- diff --git a/docs/user-guide/theming.md b/docs/user-guide/theming.md index 543760da6f..1ff43f9f04 100644 --- a/docs/user-guide/theming.md +++ b/docs/user-guide/theming.md @@ -40,21 +40,6 @@ ADF is based on Angular Material library, which offers solutions for theming you If you already setup Angular Material theming in the application you use ADF in, there is no need for taking additional steps to theme ADF components - colors, typography and other parts of the theme will be taken from your setup. -## Customizing deprecated theme variables - -Currently we have an amount of custom variables around components to mange libraries look and feel consistently and globally. - -While they are getting deprecated to be replaced with [Angular Material system variables](https://material.angular.dev/guide/system-variables), for seamless integration with Angular Material's theming, you can provide values for those variables inside the `:root` element. - -For example: -```css -:root { - --theme-primary-color: --mat-sys-primary; - --theme-accent-color: --mat-sys-tertiary; -} -``` -**No new variables should be added to the project** - [Reference list of overridable variables](https://github.com/Alfresco/alfresco-ng2-components/blob/29d341cc3b6a0842a776464027dcb1154875a8f0/lib/core/src/lib/styles/_index.scss#L25) ## Default reusable class @@ -73,14 +58,14 @@ For example: Avoid adding css variables with names related to components: ``` ---my-component-nr-xxx-background-color: mat.get-color-from-palette($primary, 50), // bad ---theme-primary-color-50: mat.get-color-from-palette($primary, 50) // good +--my-component-nr-xxx-background-color: var(--mat-sys-primary), // bad +--theme-primary-color-50: var(--mat-sys-primary) // good ``` Avoid adding css variables with custom values, values should come from the theme: ``` --new-variable: yellow // bad ---new-variable: mat.get-color-from-palette($primary, 50), // good +--new-variable: var(--mat-sys-primary), // good ``` When styling components use Angular Material system variables (colors, typography, elevation): diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.html b/lib/content-services/src/lib/document-list/components/document-list.component.html index 4da58e75f3..2344337253 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.html +++ b/lib/content-services/src/lib/document-list/components/document-list.component.html @@ -75,7 +75,6 @@ id="adf-document-list-loading" class="adf-document-list-loading-margin" [attr.aria-label]="'ADF-DOCUMENT-LIST.LOADER_LABEL' | translate" - [color]="'primary'" [mode]="'indeterminate'" />
diff --git a/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html b/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html index a0c55ef8a8..84ef4ea93c 100644 --- a/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html +++ b/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html @@ -1,6 +1,6 @@
- +
diff --git a/lib/core/feature-flags/src/lib/components/flags/flags.component.html b/lib/core/feature-flags/src/lib/components/flags/flags.component.html index 3279ebe037..af435e067f 100644 --- a/lib/core/feature-flags/src/lib/components/flags/flags.component.html +++ b/lib/core/feature-flags/src/lib/components/flags/flags.component.html @@ -39,7 +39,7 @@
- + {{ title | translate }} diff --git a/lib/core/src/lib/toolbar/toolbar.component.stories.ts b/lib/core/src/lib/toolbar/toolbar.component.stories.ts index 48134f2479..2ad12bfb9c 100644 --- a/lib/core/src/lib/toolbar/toolbar.component.stories.ts +++ b/lib/core/src/lib/toolbar/toolbar.component.stories.ts @@ -40,15 +40,6 @@ const meta: Meta = { }) ], argTypes: { - color: { - control: 'radio', - options: ['primary', 'accent', 'warn', undefined], - description: 'Toolbar color.', - table: { - type: { summary: 'ThemePalette' }, - defaultValue: { summary: 'undefined' } - } - }, title: { control: 'text', description: 'Toolbar title.', @@ -112,7 +103,7 @@ export const Toolbar: Story = { render: (args: ToolbarComponent & { anyContentProjection: boolean } & { toolbarDivider: boolean } & { toolbarTitle: boolean }) => ({ props: args, template: ` - + Projected Title projected content diff --git a/lib/core/src/lib/toolbar/toolbar.component.ts b/lib/core/src/lib/toolbar/toolbar.component.ts index 856c4c67f7..eea315b024 100644 --- a/lib/core/src/lib/toolbar/toolbar.component.ts +++ b/lib/core/src/lib/toolbar/toolbar.component.ts @@ -16,7 +16,6 @@ */ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core'; -import { ThemePalette } from '@angular/material/core'; import { MatToolbarModule } from '@angular/material/toolbar'; import { TranslatePipe } from '@ngx-translate/core'; import { NgIf } from '@angular/common'; @@ -34,8 +33,4 @@ export class ToolbarComponent { /** Toolbar title. */ @Input() title: string = ''; - - /** Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. */ - @Input() - color: ThemePalette; } diff --git a/lib/core/src/lib/viewer/components/viewer.component.html b/lib/core/src/lib/viewer/components/viewer.component.html index 8e11eb011d..b1f8d1805a 100644 --- a/lib/core/src/lib/viewer/components/viewer.component.html +++ b/lib/core/src/lib/viewer/components/viewer.component.html @@ -16,9 +16,8 @@ [attr.aria-label]="'ADF_VIEWER.ACTIONS.INFO' | translate" title="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}" data-automation-id="adf-toolbar-left-sidebar" - [color]="showLeftSidebar ? 'accent' : null" (click)="toggleLeftSidebar()"> - + @@ -111,9 +110,8 @@ [attr.aria-label]="'ADF_VIEWER.ACTIONS.INFO' | translate" title="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}" data-automation-id="adf-toolbar-sidebar" - [color]="showRightSidebar ? 'accent' : null" (click)="toggleRightSidebar()"> - + diff --git a/lib/core/src/lib/viewer/components/viewer.component.scss b/lib/core/src/lib/viewer/components/viewer.component.scss index 70bad495d7..5b782beed6 100644 --- a/lib/core/src/lib/viewer/components/viewer.component.scss +++ b/lib/core/src/lib/viewer/components/viewer.component.scss @@ -15,6 +15,16 @@ width: auto; } + &-toolbar { + &-left-sidebar-icon { + color: var(--mat-sys-primary); + } + + &-right-sidebar-icon { + color: var(--mat-sys-secondary); + } + } + &-main { width: 0; } diff --git a/lib/insights/src/lib/analytics-process/components/analytics-generator.component.html b/lib/insights/src/lib/analytics-process/components/analytics-generator.component.html index 3a53934514..a7f8840215 100644 --- a/lib/insights/src/lib/analytics-process/components/analytics-generator.component.html +++ b/lib/insights/src/lib/analytics-process/components/analytics-generator.component.html @@ -4,10 +4,9 @@ mat-icon-button *ngFor="let report of reports; let idx = index" [title]="report.title" - [color]="isCurrent(idx) ? 'primary' : null" (click)="selectCurrent(idx)" > - {{ report.icon }} + {{ report.icon }}
diff --git a/lib/insights/src/lib/analytics-process/components/analytics-generator.component.scss b/lib/insights/src/lib/analytics-process/components/analytics-generator.component.scss index 0d1c7fdc81..19b2e5a079 100644 --- a/lib/insights/src/lib/analytics-process/components/analytics-generator.component.scss +++ b/lib/insights/src/lib/analytics-process/components/analytics-generator.component.scss @@ -10,6 +10,10 @@ .adf-report-icons { margin: 20px 0; float: left; + + &--selected { + color: var(--mat-sys-primary); + } } .adf-full-width { diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html index 291741c0bd..fe95e37114 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html @@ -124,7 +124,6 @@ @for (outcome of visibleOutcomes; track outcome.name) { diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html index 9ccfa33745..d33d1dc892 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.html @@ -29,7 +29,6 @@ diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list/service-task-list-cloud.component.html b/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list/service-task-list-cloud.component.html index 4827d3f7a8..9ec0733a21 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list/service-task-list-cloud.component.html +++ b/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list/service-task-list-cloud.component.html @@ -31,7 +31,6 @@ diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list/task-list-cloud.component.html b/lib/process-services-cloud/src/lib/task/task-list/components/task-list/task-list-cloud.component.html index 4827d3f7a8..9ec0733a21 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list/task-list-cloud.component.html +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list/task-list-cloud.component.html @@ -31,7 +31,6 @@ diff --git a/lib/process-services/src/lib/attachment/process-attachment-list/process-attachment-list.component.html b/lib/process-services/src/lib/attachment/process-attachment-list/process-attachment-list.component.html index 77fd487643..8ff2fb218e 100644 --- a/lib/process-services/src/lib/attachment/process-attachment-list/process-attachment-list.component.html +++ b/lib/process-services/src/lib/attachment/process-attachment-list/process-attachment-list.component.html @@ -27,7 +27,7 @@ - + diff --git a/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.html b/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.html index 88f6aeff4a..f5f345d1d9 100644 --- a/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.html +++ b/lib/process-services/src/lib/attachment/task-attachment-list/task-attachment-list.component.html @@ -25,7 +25,7 @@ - + diff --git a/lib/process-services/src/lib/form/form.component.html b/lib/process-services/src/lib/form/form.component.html index 9db1709b4c..0aa280d48e 100644 --- a/lib/process-services/src/lib/form/form.component.html +++ b/lib/process-services/src/lib/form/form.component.html @@ -34,7 +34,7 @@