Skip to content

Commit

Permalink
chore: remove legacy checkboxes (#7098)
Browse files Browse the repository at this point in the history
Co-authored-by: taiga-family-bot <[email protected]>
  • Loading branch information
waterplea and taiga-family-bot authored Mar 27, 2024
1 parent 0fbd98c commit 0b3e35f
Show file tree
Hide file tree
Showing 80 changed files with 307 additions and 1,255 deletions.
4 changes: 2 additions & 2 deletions projects/addon-doc/components/demo/demo.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '@taiga-ui/core';
import {
TuiBlockDirective,
TuiCheckboxLabeledModule,
TuiCheckboxComponent,
TuiDataListWrapperModule,
TuiSelectModule,
} from '@taiga-ui/kit';
Expand All @@ -37,7 +37,7 @@ import {TuiDocDemoComponent} from './demo.component';
TuiGroupDirective,
TuiTooltipModule,
TuiModeModule,
TuiCheckboxLabeledModule,
TuiCheckboxComponent,
TuiSvgModule,
TuiDataListWrapperModule,
TuiDataListModule,
Expand Down
2 changes: 2 additions & 0 deletions projects/addon-doc/components/demo/demo.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@

.t-group,
.t-checkbox {
display: flex;
align-items: center;
margin-left: 0.75rem;
}

Expand Down
15 changes: 10 additions & 5 deletions projects/addon-doc/components/demo/demo.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,19 @@
</label>
</div>
</ng-template>
<tui-checkbox-labeled
size="m"
<label
class="t-checkbox"
[ngModel]="opaque"
(ngModelChange)="changeOpaque($event)"
[style.gap.rem]="0.5"
>
<input
size="s"
tuiCheckbox
type="checkbox"
[ngModel]="opaque"
(ngModelChange)="changeOpaque($event)"
/>
{{ texts[1] }}
</tui-checkbox-labeled>
</label>
</div>
<div
tuiResizeable
Expand Down
4 changes: 2 additions & 2 deletions projects/cdk/constants/used-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ export const TUI_USED_ICONS = [
'tuiIconCheckCircle',
'tuiIconXCircle',
'tuiIconAlertCircle',
'tuiIconCheck',
'tuiIconMinusLarge',
'tuiIconChevronUp',
'tuiIconHelpCircle',
'tuiIconClose',
'tuiIconCheck',
'tuiIconChevronRight',
'tuiIconChevronLeft',
'tuiIconCalendarLarge',
'tuiIconStarLarge',
'tuiIconChevronDown',
'tuiIconChevronDownLarge',
'tuiIconMinusLarge',
'tuiIconFileLarge',
'tuiIconCheckCircleLarge',
'tuiIconAlertCircleLarge',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifier[] = [
},
{
from: {name: 'TuiCheckboxModule', moduleSpecifier: '@taiga-ui/experimental'},
to: {name: 'TuiCheckboxModule', moduleSpecifier: '@taiga-ui/kit'},
to: {name: 'TuiCheckboxComponent', moduleSpecifier: '@taiga-ui/kit'},
},
{
from: {name: 'TuiSwipeActionsModule', moduleSpecifier: '@taiga-ui/experimental'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import { TuiCheckboxModule } from "@taiga-ui/experimental";
export class TestComponent {
}`;

const COMPONENT_AFTER = `import { TuiCheckboxModule } from "@taiga-ui/kit";
const COMPONENT_AFTER = `import { TuiCheckboxComponent } from "@taiga-ui/kit";
@Component({
standalone: true,
templateUrl: './test.template.html',
imports: [TuiCheckboxModule]
imports: [TuiCheckboxComponent]
})
export class TestComponent {
}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('ng-update', () => {
expect(tree.readContent('test/app/test.template.html')).toEqual(TEMPLATE_AFTER);
});

it('should migrate checkbox references in ts files', async () => {
it('should migrate radio references in ts files', async () => {
const tree = await runner.runSchematic(
'updateToV4',
{'skip-logs': process.env['TUI_CI'] === 'true'} as Partial<TuiSchema>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
TUI_DATA_LIST_HOST,
TUI_OPTION_CONTENT,
} from '@taiga-ui/core/tokens';
import type {TuiOptionRole, TuiSizeL, TuiSizeXS} from '@taiga-ui/core/types';
import type {TuiOptionRole} from '@taiga-ui/core/types';
import {shouldCall} from '@tinkoff/ng-event-plugins';

import {TuiDataListComponent} from '../data-list.component';
Expand Down Expand Up @@ -50,11 +50,6 @@ export class TuiOptionComponent<T = unknown> implements OnDestroy {
optional: true,
});

/** @deprecated use size on {@link TuiDataListComponent} instead */
@Input()
@HostBinding('attr.data-size')
public size: TuiSizeL | TuiSizeXS | null = null;

@Input()
@HostBinding('attr.role')
public role: TuiOptionRole = 'option';
Expand Down
1 change: 0 additions & 1 deletion projects/core/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export * from '@taiga-ui/core/components/link';
export * from '@taiga-ui/core/components/loader';
export * from '@taiga-ui/core/components/notification';
export * from '@taiga-ui/core/components/primitive-calendar';
export * from '@taiga-ui/core/components/primitive-checkbox';
export * from '@taiga-ui/core/components/primitive-spin-button';
export * from '@taiga-ui/core/components/primitive-textfield';
export * from '@taiga-ui/core/components/primitive-year-picker';
Expand Down
46 changes: 0 additions & 46 deletions projects/core/components/primitive-checkbox/checkbox.options.ts

This file was deleted.

3 changes: 0 additions & 3 deletions projects/core/components/primitive-checkbox/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions projects/core/components/primitive-checkbox/ng-package.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 4 additions & 17 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,6 @@ export const ROUTES: Routes = [
title: 'Chip',
},
},
{
path: 'experimental/checkbox',
loadChildren: async () =>
(await import('../experimental/checkbox/checkbox.module'))
.ExampleTuiCheckboxModule,
data: {
title: 'Checkbox ',
},
},
{
path: 'experimental/radio',
loadChildren: async () =>
Expand Down Expand Up @@ -438,15 +429,11 @@ export const ROUTES: Routes = [
title: 'ThumbnailCard',
},
},
{
route({
path: 'components/checkbox',
loadChildren: async () =>
(await import('../components/checkbox/checkbox.module'))
.ExampleTuiCheckboxModule,
data: {
title: 'Checkbox',
},
},
title: 'Checkbox',
loadComponent: async () => import('../components/checkbox'),
}),
{
path: 'components/combo-box',
loadChildren: async () =>
Expand Down
6 changes: 0 additions & 6 deletions projects/demo/src/modules/app/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,12 +971,6 @@ export const pages: TuiDocPages = [
keywords: 'tooltip, тултип, hint, подсказка, помощь, help',
route: '/experimental/tooltip',
},
{
section: 'Experimental',
title: 'Checkbox ',
keywords: 'чек, радио, ввод, форма, form, checkbox, radio, toggle',
route: '/experimental/checkbox',
},
{
section: 'Experimental',
title: 'Radio ',
Expand Down
Loading

0 comments on commit 0b3e35f

Please sign in to comment.