Skip to content

Commit

Permalink
refactor: move tuiFade to @taiga-ui/kit (#6928)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Mar 1, 2024
1 parent 32ed5b0 commit 6f1f6b9
Show file tree
Hide file tree
Showing 39 changed files with 72 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,11 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifier[] = [
moduleSpecifier: '@tinkoff/tui-editor',
},
},
{
from: {name: 'TuiFadeModule', moduleSpecifier: '@taiga-ui/experimental'},
to: {
name: 'TuiFadeDirective',
moduleSpecifier: '@taiga-ui/kit',
},
},
];
16 changes: 8 additions & 8 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,6 @@ export const ROUTES: Routes = [
title: 'Compass',
},
},
{
path: 'experimental/fade',
loadChildren: async () =>
(await import('../experimental/fade/fade.module')).ExampleTuiFadeModule,
data: {
title: 'Fade',
},
},
{
path: 'experimental/header',
loadChildren: async () =>
Expand Down Expand Up @@ -662,6 +654,14 @@ export const ROUTES: Routes = [
title: 'DropdownSelection',
},
},
{
path: 'directives/fade',
loadChildren: async () =>
(await import('../directives/fade/fade.module')).ExampleTuiFadeDirective,
data: {
title: 'Fade',
},
},
{
path: 'components/input-inline',
loadChildren: async () =>
Expand Down
12 changes: 6 additions & 6 deletions projects/demo/src/modules/app/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -890,12 +890,6 @@ export const pages: TuiDocPages = [
keywords: 'compass, user, point, dot, карта, точка',
route: '/experimental/compass',
},
{
section: 'Experimental',
title: 'Fade',
keywords: 'overflow, ellipsis, gradient, clamp, line',
route: '/experimental/fade',
},
{
section: 'Experimental',
title: 'Header',
Expand Down Expand Up @@ -1387,6 +1381,12 @@ export const pages: TuiDocPages = [
keywords: 'zoom, scale, pinch, зум, масштаб',
route: '/directives/zoom',
},
{
section: 'Tools',
title: 'Fade',
keywords: 'overflow, ellipsis, gradient, clamp, line',
route: '/directives/fade',
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
>
<tui-notification class="tui-space_bottom-4">
This example requires import of
<code>TuiFadeModule</code>
<code>TuiFadeDirective</code>
</tui-notification>
<tui-avatar-example-2></tui-avatar-example-2>
</tui-doc-example>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiAutoColorModule, TuiFadeModule} from '@taiga-ui/experimental';
import {TuiAvatarComponent} from '@taiga-ui/kit';
import {TuiAutoColorModule} from '@taiga-ui/experimental';
import {TuiAvatarComponent, TuiFadeDirective} from '@taiga-ui/kit';

@Component({
standalone: true,
selector: 'tui-avatar-example-2',
imports: [TuiAvatarComponent, TuiAutoColorModule, TuiFadeModule],
imports: [TuiAvatarComponent, TuiAutoColorModule, TuiFadeDirective],
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
Expand Down
10 changes: 7 additions & 3 deletions projects/demo/src/modules/components/avatar/examples/6/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import {AsyncPipe} from '@angular/common';
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiFadeModule, TuiFallbackSrcModule} from '@taiga-ui/experimental';
import {TuiAvatarComponent, TuiAvatarLabeledComponent} from '@taiga-ui/kit';
import {TuiFallbackSrcModule} from '@taiga-ui/experimental';
import {
TuiAvatarComponent,
TuiAvatarLabeledComponent,
TuiFadeDirective,
} from '@taiga-ui/kit';

@Component({
standalone: true,
Expand All @@ -13,7 +17,7 @@ import {TuiAvatarComponent, TuiAvatarLabeledComponent} from '@taiga-ui/kit';
TuiFallbackSrcModule,
TuiAvatarLabeledComponent,
TuiAvatarComponent,
TuiFadeModule,
TuiFadeDirective,
],
templateUrl: './index.html',
styleUrls: ['./index.less'],
Expand Down
6 changes: 3 additions & 3 deletions projects/demo/src/modules/components/badge/badge.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
TuiNotificationModule,
TuiTextfieldControllerModule,
} from '@taiga-ui/core';
import {TuiFadeModule, TuiIconModule} from '@taiga-ui/experimental';
import {TuiBadgeDirective, TuiRadioListModule} from '@taiga-ui/kit';
import {TuiIconModule} from '@taiga-ui/experimental';
import {TuiBadgeDirective, TuiFadeDirective, TuiRadioListModule} from '@taiga-ui/kit';

import {ExampleTuiBadgeComponent} from './badge.component';
import {TuiBadgeExample1} from './examples/1';
Expand All @@ -30,7 +30,7 @@ import {TuiBadgeExample6} from './examples/6';
TuiRadioListModule,
FormsModule,
CommonModule,
TuiFadeModule,
TuiFadeDirective,
TuiNotificationModule,
TuiBadgeDirective,
TuiTextfieldControllerModule,
Expand Down
5 changes: 2 additions & 3 deletions projects/demo/src/modules/components/block/block.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import {tuiGetDocModules} from '@taiga-ui/addon-doc';
import {TuiGroupDirective, TuiTooltipModule} from '@taiga-ui/core';
import {
TuiCheckboxModule,
TuiFadeModule,
TuiIconModule,
TuiRadioModule,
TuiTitleModule,
TuiToggleModule,
} from '@taiga-ui/experimental';
import {TuiAvatarComponent, TuiBlockDirective} from '@taiga-ui/kit';
import {TuiAvatarComponent, TuiBlockDirective, TuiFadeDirective} from '@taiga-ui/kit';

import {ExampleTuiBlockComponent} from './block.component';
import {TuiBlockExample1} from './examples/1';
Expand All @@ -30,7 +29,7 @@ import {TuiBlockExample3} from './examples/3';
TuiTooltipModule,
TuiCheckboxModule,
TuiRadioModule,
TuiFadeModule,
TuiFadeDirective,
TuiTitleModule,
TuiToggleModule,
TuiIconModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
```ts
import {NgModule} from '@angular/core';
import {TuiFadeModule} from '@taiga-ui/experimental';
import {TuiFadeDirective} from '@taiga-ui/kit';
// ...

@NgModule({
imports: [
// ...
TuiFadeModule,
TuiFadeDirective,
],
})
export class MyModule {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TuiScrollableDirective,
TuiScrollbarComponent,
} from '@taiga-ui/core';
import {TuiFadeModule} from '@taiga-ui/experimental';
import {TuiFadeDirective} from '@taiga-ui/kit';

import {TuiFadeExample1} from './examples/1';
import {TuiFadeExample2} from './examples/2';
Expand All @@ -17,7 +17,7 @@ import {ExampleTuiFadeComponent} from './fade.component';
@NgModule({
imports: [
CommonModule,
TuiFadeModule,
TuiFadeDirective,
TuiNotificationModule,
TuiScrollbarComponent,
TuiLinkModule,
Expand All @@ -32,4 +32,4 @@ import {ExampleTuiFadeComponent} from './fade.component';
],
exports: [ExampleTuiFadeComponent],
})
export class ExampleTuiFadeModule {}
export class ExampleTuiFadeDirective {}
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<tui-doc-page
header="Fade"
package="EXPERIMENTAL"
package="KIT"
type="directives"
>
<ng-template pageTab>
<tui-notification status="warning">
This code is
<strong>experimental</strong>
and is a subject to change. Expect final solution to be shipped in the next major version
</tui-notification>

<p>Directive that uses masking to fade out overflown content</p>

<tui-doc-example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {tuiGetDocModules} from '@taiga-ui/addon-doc';
import {TuiNotificationModule, TuiSvgModule} from '@taiga-ui/core';
import {
TuiButtonModule,
TuiButtonVerticalModule,
TuiFadeModule,
} from '@taiga-ui/experimental';
import {TuiAvatarComponent} from '@taiga-ui/kit';
import {TuiButtonModule, TuiButtonVerticalModule} from '@taiga-ui/experimental';
import {TuiAvatarComponent, TuiFadeDirective} from '@taiga-ui/kit';

import {ExampleTuiButtonVerticalComponent} from './button-vertical.component';
import {TuiButtonVerticalExample1} from './examples/1';
Expand All @@ -18,7 +14,7 @@ import {TuiButtonVerticalExample2} from './examples/2';
CommonModule,
TuiButtonModule,
TuiButtonVerticalModule,
TuiFadeModule,
TuiFadeDirective,
TuiAvatarComponent,
TuiNotificationModule,
TuiSvgModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
TuiButtonModule,
TuiCardModule,
TuiCellModule,
TuiFadeModule,
TuiFallbackSrcModule,
TuiHeaderDirective,
TuiIconModule,
Expand All @@ -34,6 +33,7 @@ import {
TuiAvatarComponent,
TuiAvatarStackComponent,
TuiBadgeDirective,
TuiFadeDirective,
} from '@taiga-ui/kit';

import {ExampleTuiCardLargeComponent} from './card-large.component';
Expand All @@ -59,7 +59,7 @@ import {TuiCardLargeExample12} from './examples/12';
TuiInitialsModule,
TuiNotificationModule,
TuiFallbackSrcModule,
TuiFadeModule,
TuiFadeDirective,
TuiCardModule,
TuiSurfaceModule,
TuiSvgModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
TuiButtonModule,
TuiCardModule,
TuiCellModule,
TuiFadeModule,
TuiFallbackSrcModule,
TuiHeaderDirective,
TuiIconModule,
Expand All @@ -33,6 +32,7 @@ import {
TuiAvatarComponent,
TuiAvatarStackComponent,
TuiBadgeDirective,
TuiFadeDirective,
} from '@taiga-ui/kit';

import {ExampleTuiCardMediumComponent} from './card-medium.component';
Expand All @@ -51,7 +51,7 @@ import {TuiCardMediumExample7} from './examples/7';
TuiInitialsModule,
TuiNotificationModule,
TuiFallbackSrcModule,
TuiFadeModule,
TuiFadeDirective,
TuiCardModule,
TuiSurfaceModule,
TuiSvgModule,
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/modules/experimental/cell/cell.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
TuiCardModule,
TuiCellModule,
TuiCheckboxModule,
TuiFadeModule,
TuiIconModule,
TuiSensitiveModule,
TuiSurfaceModule,
Expand All @@ -32,6 +31,7 @@ import {
TuiBadgedContentComponent,
TuiBadgeDirective,
TuiDataListWrapperModule,
TuiFadeDirective,
TuiProgressModule,
TuiSelectModule,
} from '@taiga-ui/kit';
Expand All @@ -55,7 +55,7 @@ import {TuiCellExample7} from './examples/7';
TuiBadgeNotificationModule,
TuiBadgedContentComponent,
TuiCellModule,
TuiFadeModule,
TuiFadeDirective,
TuiLinkModule,
TuiNotificationModule,
TuiProgressModule,
Expand Down
9 changes: 6 additions & 3 deletions projects/demo/src/modules/experimental/chip/chip.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ import {
TuiButtonModule,
TuiCheckboxModule,
TuiChipModule,
TuiFadeModule,
} from '@taiga-ui/experimental';
import {TuiAvatarComponent, TuiBadgedContentComponent} from '@taiga-ui/kit';
import {
TuiAvatarComponent,
TuiBadgedContentComponent,
TuiFadeDirective,
} from '@taiga-ui/kit';

import {ExampleTuiChipComponent} from './chip.component';
import {TuiChipExample1} from './examples/1';
Expand All @@ -27,7 +30,7 @@ import {TuiChipExample4} from './examples/4';
TuiAmountPipe,
TuiChipModule,
TuiRepeatTimesModule,
TuiFadeModule,
TuiFadeDirective,
TuiNotificationModule,
TuiButtonModule,
TuiAvatarComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
TuiBadgeNotificationModule,
TuiButtonModule,
TuiCardModule,
TuiFadeModule,
TuiHeaderDirective,
TuiIconModule,
TuiNavigationModule,
Expand All @@ -27,6 +26,7 @@ import {
TuiAvatarComponent,
TuiBadgeDirective,
TuiBreadcrumbsModule,
TuiFadeDirective,
TuiTabsModule,
} from '@taiga-ui/kit';

Expand All @@ -49,7 +49,7 @@ import {ExampleTuiNavigationComponent} from './navigation.component';
TuiBadgeNotificationModule,
TuiDropdownModule,
TuiDataListModule,
TuiFadeModule,
TuiFadeDirective,
TuiExpandModule,
TuiTabsModule,
TuiCardModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {TuiNotificationModule} from '@taiga-ui/core';
import {
TuiBadgeNotificationModule,
TuiButtonModule,
TuiFadeModule,
TuiIconModule,
TuiSegmentedComponent,
} from '@taiga-ui/experimental';
import {TuiFadeDirective} from '@taiga-ui/kit';

import {TuiSegmentedExample1} from './examples/1';
import {TuiSegmentedExample2} from './examples/2';
Expand All @@ -23,7 +23,7 @@ import {ExampleTuiSegmentedComponent} from './segmented.component';
TuiSegmentedComponent,
TuiNotificationModule,
TuiBadgeNotificationModule,
TuiFadeModule,
TuiFadeDirective,
tuiGetDocModules(ExampleTuiSegmentedComponent),
FormsModule,
TuiIconModule,
Expand Down
Loading

0 comments on commit 6f1f6b9

Please sign in to comment.