From aa2a357fb25ce36972e6f43252df52cd3036a988 Mon Sep 17 00:00:00 2001 From: David Olson <157068235+DavidOlson-Hyland@users.noreply.github.com> Date: Tue, 2 Jun 2026 08:54:26 -0500 Subject: [PATCH] AAE-46434 Fix read-only field styling on forms (#11928) --- .../components/form-renderer.component.scss | 47 +++++++++++++++++++ .../widgets/button/button.widget.html | 22 +++++---- .../widgets/checkbox/checkbox.widget.html | 4 +- .../widgets/date-time/date-time.widget.html | 1 + .../components/widgets/date/date.widget.html | 4 +- .../widgets/repeat/repeat.widget.scss | 6 +-- .../widgets/date/date-cloud.widget.html | 1 + .../components/group-cloud.component.html | 4 +- .../group/components/group-cloud.component.ts | 5 +- .../components/people-cloud.component.html | 2 +- 10 files changed, 75 insertions(+), 21 deletions(-) diff --git a/lib/core/src/lib/form/components/form-renderer.component.scss b/lib/core/src/lib/form/components/form-renderer.component.scss index 1270c3c57c..fc80c7f185 100644 --- a/lib/core/src/lib/form/components/form-renderer.component.scss +++ b/lib/core/src/lib/form/components/form-renderer.component.scss @@ -1,4 +1,5 @@ /* stylelint-disable selector-class-pattern */ +@use '@angular/material' as mat; @use '../../styles/flex' as flex; @use '../../styles/mat-selectors' as ms; @@ -274,3 +275,49 @@ form-field { width: 100%; } + +.adf-readonly { + @include mat.form-field-overrides( + ( + filled-disabled-input-text-color: var(--mat-sys-on-surface), + filled-disabled-label-text-color: var(--mat-sys-on-surface-variant), + filled-active-indicator-color: color-mix(in srgb, var(--mat-sys-on-surface) 6%, transparent), + filled-hover-active-indicator-color: color-mix(in srgb, var(--mat-sys-on-surface) 6%, transparent), + outlined-disabled-input-text-color: var(--mat-sys-on-surface), + outlined-disabled-label-text-color: var(--mat-sys-on-surface-variant), + outlined-outline-color: color-mix(in srgb, var(--mat-sys-on-surface) 6%, transparent), + outlined-hover-outline-color: color-mix(in srgb, var(--mat-sys-on-surface) 6%, transparent) + ) + ); + @include mat.select-overrides( + ( + disabled-trigger-text-color: var(--mat-sys-on-surface) + ) + ); + @include mat.checkbox-overrides( + ( + disabled-label-color: var(--mat-sys-on-surface), + disabled-selected-checkmark-color: var(--mat-sys-surface), + disabled-selected-icon-color: var(--mat-sys-outline) + ) + ); + @include mat.radio-overrides( + ( + disabled-label-color: var(--mat-sys-on-surface), + disabled-selected-icon-color: var(--mat-sys-primary) + ) + ); + @include mat.button-overrides( + ( + filled-disabled-label-text-color: var(--mat-sys-on-surface) + ) + ); + + .mat-datepicker-toggle.mat-mdc-button-disabled { + color: var(--mat-sys-on-surface-variant); + } + + .mat-mdc-chip-disabled { + opacity: 1; + } +} diff --git a/lib/core/src/lib/form/components/widgets/button/button.widget.html b/lib/core/src/lib/form/components/widgets/button/button.widget.html index f8d59e111c..6d25e69c5d 100644 --- a/lib/core/src/lib/form/components/widgets/button/button.widget.html +++ b/lib/core/src/lib/form/components/widgets/button/button.widget.html @@ -1,10 +1,12 @@ - +
+ +
diff --git a/lib/core/src/lib/form/components/widgets/checkbox/checkbox.widget.html b/lib/core/src/lib/form/components/widgets/checkbox/checkbox.widget.html index 7c73a8fe1f..b9c020a0c8 100644 --- a/lib/core/src/lib/form/components/widgets/checkbox/checkbox.widget.html +++ b/lib/core/src/lib/form/components/widgets/checkbox/checkbox.widget.html @@ -1,5 +1,7 @@