diff --git a/projects/addon-commerce/components/input-card-group/input-card-group.component.ts b/projects/addon-commerce/components/input-card-group/input-card-group.component.ts index 701abc142c24..ca286f17e2f1 100644 --- a/projects/addon-commerce/components/input-card-group/input-card-group.component.ts +++ b/projects/addon-commerce/components/input-card-group/input-card-group.component.ts @@ -45,6 +45,7 @@ import { TuiAppearance, tuiAppearance, tuiAppearanceFocus, + tuiAppearanceMode, tuiAppearanceState, } from '@taiga-ui/core/directives/appearance'; import { @@ -104,7 +105,6 @@ export interface TuiCard { ], host: { 'data-size': 'l', - '[attr.data-mode]': 'mode()', '(mousedown)': 'onMouseDown($event)', }, }) @@ -144,6 +144,7 @@ export class TuiInputCardGroup protected readonly texts = toSignal(inject(TUI_INPUT_CARD_GROUP_TEXTS)); protected readonly open = tuiDropdownOpen(); + protected readonly m = tuiAppearanceMode(this.mode); protected readonly appearance = tuiAppearance( inject(TUI_TEXTFIELD_OPTIONS).appearance, ); diff --git a/projects/addon-commerce/components/input-card-group/input-card-group.style.less b/projects/addon-commerce/components/input-card-group/input-card-group.style.less index 6a8ba3e31f9d..9a6576db798a 100644 --- a/projects/addon-commerce/components/input-card-group/input-card-group.style.less +++ b/projects/addon-commerce/components/input-card-group/input-card-group.style.less @@ -196,7 +196,7 @@ transform: translateY(-0.7em); } - :host([data-mode='invalid']) & { + :host([data-mode~='invalid']) & { color: var(--tui-text-negative); } diff --git a/projects/cdk/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.ts b/projects/cdk/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.ts index 4c28567b3016..8c8ffb1463bf 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.ts @@ -44,7 +44,7 @@ export const ATTR_WITH_VALUES_TO_REPLACE: ReplacementAttributeValue[] = [ }, { attrNames: ['[pseudoInvalid]'], - newAttrName: '[attr.data-mode]', + newAttrName: '[tuiAppearanceMode]', withTagNames: hasPseudoInvalid, valueReplacer: (condition) => `${condition} ? 'invalid' : null`, }, diff --git a/projects/cdk/schematics/ng-update/v4/steps/templates/migrate-button-appearance.ts b/projects/cdk/schematics/ng-update/v4/steps/templates/migrate-button-appearance.ts index b0c067e370f0..7e6c226e8fdc 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/templates/migrate-button-appearance.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/templates/migrate-button-appearance.ts @@ -68,7 +68,10 @@ export function migrateButtonAppearance({ startOffset + templateOffset, ` ${appearanceInputName}="whiteblock"`, ); - recorder.insertLeft(startOffset + templateOffset, ' data-mode="checked"'); + recorder.insertLeft( + startOffset + templateOffset, + ' tuiAppearanceMode="checked"', + ); } }); @@ -87,6 +90,6 @@ export function migrateButtonAppearance({ function addTodo(recorder: UpdateRecorder, templateOffset: number): void { recorder.insertRight( templateOffset, - '\n', + '\n', ); } diff --git a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-blocked.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-blocked.spec.ts index bfaea4247bbb..826523b375ac 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-blocked.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-blocked.spec.ts @@ -88,7 +88,7 @@ const TEMPLATE_BEFORE = ` `.trim(); const TEMPLATE_AFTER = ` - +