From 7224463e100abd5b19eb7fb63c4ea77ce05cec5b Mon Sep 17 00:00:00 2001 From: splincode Date: Thu, 1 Feb 2024 19:47:44 +0300 Subject: [PATCH] fix(experimental): fix problem with tuiCell --- projects/demo/src/modules/app/app.routes.ts | 3 +- .../card-medium/card-medium.component.ts | 4 +-- .../card-medium/card-medium.module.ts | 14 ++++---- .../card-medium/card-medium.template.html | 2 +- .../card-medium/examples/4/index.ts | 2 +- .../modules/experimental/cell/cell.module.ts | 2 ++ .../experimental/cell/examples/7/index.html | 34 +++++++++---------- .../experimental/cell/examples/7/index.less | 13 ------- .../directives/card/card.styles.less | 2 +- 9 files changed, 33 insertions(+), 43 deletions(-) diff --git a/projects/demo/src/modules/app/app.routes.ts b/projects/demo/src/modules/app/app.routes.ts index f0fd2853d8df4..c9857721a74eb 100644 --- a/projects/demo/src/modules/app/app.routes.ts +++ b/projects/demo/src/modules/app/app.routes.ts @@ -294,7 +294,8 @@ export const ROUTES: Routes = [ { path: 'experimental/card-medium', loadChildren: async () => - (await import('../experimental/card-medium/card-medium.module')).ExampleTuiCardModule, + (await import('../experimental/card-medium/card-medium.module')) + .ExampleTuiCardMediumModule, data: { title: 'CardMedium', }, diff --git a/projects/demo/src/modules/experimental/card-medium/card-medium.component.ts b/projects/demo/src/modules/experimental/card-medium/card-medium.component.ts index 1ce9951eb413e..d943a0e80f2a3 100644 --- a/projects/demo/src/modules/experimental/card-medium/card-medium.component.ts +++ b/projects/demo/src/modules/experimental/card-medium/card-medium.component.ts @@ -3,11 +3,11 @@ import {changeDetection} from '@demo/emulate/change-detection'; import {TuiDocExample, TuiRawLoaderContent} from '@taiga-ui/addon-doc'; @Component({ - selector: 'example-card', + selector: 'example-card-medium', templateUrl: './card-medium.template.html', changeDetection, }) -export class ExampleTuiCardComponent { +export class ExampleTuiCardMediumComponent { readonly exampleModule: TuiRawLoaderContent = import( './examples/import/import-module.md?raw' ); diff --git a/projects/demo/src/modules/experimental/card-medium/card-medium.module.ts b/projects/demo/src/modules/experimental/card-medium/card-medium.module.ts index 152d36057207a..f176b305129b5 100644 --- a/projects/demo/src/modules/experimental/card-medium/card-medium.module.ts +++ b/projects/demo/src/modules/experimental/card-medium/card-medium.module.ts @@ -33,11 +33,11 @@ import { TuiTitleModule, } from '@taiga-ui/experimental'; -import {ExampleTuiCardComponent} from './card-medium.component'; +import {ExampleTuiCardMediumComponent} from './card-medium.component'; import {TuiCardMediumExample1} from './examples/1'; import {TuiCardMediumExample2} from './examples/2'; import {TuiCardMediumExample3} from './examples/3'; -import {TuiCardExample4} from './examples/4'; +import {TuiCardMediumExample4} from './examples/4'; import {TuiCardMediumExample5} from './examples/5'; import {TuiCardMediumExample6} from './examples/6'; import {TuiCardMediumExample7} from './examples/7'; @@ -66,7 +66,7 @@ import {TuiCardMediumExample7} from './examples/7'; TuiButtonModule, TuiHeaderModule, TuiCellModule, - tuiGetDocModules(ExampleTuiCardComponent), + tuiGetDocModules(ExampleTuiCardMediumComponent), TuiRepeatTimesModule, TuiDataListModule, TuiHostedDropdownModule, @@ -76,15 +76,15 @@ import {TuiCardMediumExample7} from './examples/7'; TuiAppearanceModule, ], declarations: [ - ExampleTuiCardComponent, + ExampleTuiCardMediumComponent, TuiCardMediumExample1, TuiCardMediumExample2, TuiCardMediumExample3, - TuiCardExample4, + TuiCardMediumExample4, TuiCardMediumExample5, TuiCardMediumExample6, TuiCardMediumExample7, ], - exports: [ExampleTuiCardComponent], + exports: [ExampleTuiCardMediumComponent], }) -export class ExampleTuiCardModule {} +export class ExampleTuiCardMediumModule {} diff --git a/projects/demo/src/modules/experimental/card-medium/card-medium.template.html b/projects/demo/src/modules/experimental/card-medium/card-medium.template.html index 894af7caf4b6f..1b9ebb0895050 100644 --- a/projects/demo/src/modules/experimental/card-medium/card-medium.template.html +++ b/projects/demo/src/modules/experimental/card-medium/card-medium.template.html @@ -3,7 +3,7 @@ package="EXPERIMENTAL" type="components" > - + This code is experimental diff --git a/projects/demo/src/modules/experimental/card-medium/examples/4/index.ts b/projects/demo/src/modules/experimental/card-medium/examples/4/index.ts index a3d2702411869..dc08dd24df204 100644 --- a/projects/demo/src/modules/experimental/card-medium/examples/4/index.ts +++ b/projects/demo/src/modules/experimental/card-medium/examples/4/index.ts @@ -9,7 +9,7 @@ import {encapsulation} from '@demo/emulate/encapsulation'; encapsulation, changeDetection, }) -export class TuiCardExample4 { +export class TuiCardMediumExample4 { readonly urls = [ 'https://avatars.githubusercontent.com/u/11832552', 'https://avatars.githubusercontent.com/u/10106368', diff --git a/projects/demo/src/modules/experimental/cell/cell.module.ts b/projects/demo/src/modules/experimental/cell/cell.module.ts index b1978843be28a..3510c57b0099d 100644 --- a/projects/demo/src/modules/experimental/cell/cell.module.ts +++ b/projects/demo/src/modules/experimental/cell/cell.module.ts @@ -19,6 +19,7 @@ import { TuiBadgeModule, TuiBadgeNotificationModule, TuiButtonModule, + TuiCardModule, TuiCellModule, TuiCheckboxModule, TuiFadeModule, @@ -75,6 +76,7 @@ import {TuiCellExample7} from './examples/7'; TuiHostedDropdownModule, TuiGroupModule, tuiGetDocModules(ExampleTuiCellComponent), + TuiCardModule, ], declarations: [ ExampleTuiCellComponent, diff --git a/projects/demo/src/modules/experimental/cell/examples/7/index.html b/projects/demo/src/modules/experimental/cell/examples/7/index.html index 2ccbebcccdccd..fab03f44926b3 100644 --- a/projects/demo/src/modules/experimental/cell/examples/7/index.html +++ b/projects/demo/src/modules/experimental/cell/examples/7/index.html @@ -1,21 +1,21 @@ -
+

Inside a block

-
- -
+