Skip to content

Commit

Permalink
fix(kit): Radio, Checkbox, Switch remove non-functioning `appea…
Browse files Browse the repository at this point in the history
…rance` input (#9221)
  • Loading branch information
r0ss0neri authored Sep 30, 2024
1 parent 737100e commit 6dc4ce0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
11 changes: 9 additions & 2 deletions projects/kit/components/checkbox/checkbox.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';
import {tuiControlValue} from '@taiga-ui/cdk/observables';
import {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';
import {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';
import {TuiAppearance, TuiWithAppearance} from '@taiga-ui/core/directives/appearance';
import {TuiAppearance} from '@taiga-ui/core/directives/appearance';
import {tuiInjectIconResolver} from '@taiga-ui/core/tokens';
import type {TuiSizeS} from '@taiga-ui/core/types';

Expand All @@ -26,7 +26,14 @@ import {TUI_CHECKBOX_OPTIONS} from './checkbox.options';
styles: ['@import "@taiga-ui/kit/styles/components/checkbox.less";'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
hostDirectives: [TuiWithAppearance, TuiNativeValidator],
hostDirectives: [
{
directive: TuiAppearance,
inputs: ['tuiAppearanceState', 'tuiAppearanceFocus'],
},

TuiNativeValidator,
],
host: {
'[disabled]': '!control || control.disabled',
'[attr.data-size]': 'size',
Expand Down
10 changes: 8 additions & 2 deletions projects/kit/components/radio/radio.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {NgControl} from '@angular/forms';
import {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';
import {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';
import {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';
import {TuiAppearance, TuiWithAppearance} from '@taiga-ui/core/directives/appearance';
import {TuiAppearance} from '@taiga-ui/core/directives/appearance';
import type {TuiSizeS} from '@taiga-ui/core/types';

import {TUI_RADIO_OPTIONS} from './radio.options';
Expand All @@ -22,7 +22,13 @@ import {TUI_RADIO_OPTIONS} from './radio.options';
styles: ['@import "@taiga-ui/kit/styles/components/radio.less";'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
hostDirectives: [TuiWithAppearance, TuiNativeValidator],
hostDirectives: [
{
directive: TuiAppearance,
inputs: ['tuiAppearanceState', 'tuiAppearanceFocus'],
},
TuiNativeValidator,
],
host: {
'[disabled]': '!control || control.disabled',
'[attr.data-size]': 'size',
Expand Down
10 changes: 8 additions & 2 deletions projects/kit/components/switch/switch.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {NgControl} from '@angular/forms';
import {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';
import {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';
import {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';
import {TuiAppearance, TuiWithAppearance} from '@taiga-ui/core/directives/appearance';
import {TuiAppearance} from '@taiga-ui/core/directives/appearance';
import {tuiInjectIconResolver} from '@taiga-ui/core/tokens';
import type {TuiSizeS} from '@taiga-ui/core/types';

Expand All @@ -23,7 +23,13 @@ import {TUI_SWITCH_OPTIONS} from './switch.options';
styles: ['@import "@taiga-ui/kit/styles/components/switch.less";'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
hostDirectives: [TuiWithAppearance, TuiNativeValidator],
hostDirectives: [
{
directive: TuiAppearance,
inputs: ['tuiAppearanceState', 'tuiAppearanceFocus'],
},
TuiNativeValidator,
],
host: {
role: 'switch',
'[disabled]': '!control || control.disabled',
Expand Down

0 comments on commit 6dc4ce0

Please sign in to comment.