From 253906e9a3f419ea7815b84537c5b0ccba43c6d0 Mon Sep 17 00:00:00 2001 From: mdlufy Date: Fri, 20 Sep 2024 11:01:25 +0300 Subject: [PATCH] fix(layout): `CardLarge` with headless `Cell` list --- .../card-large/examples/13/index.html | 33 +++++++++++ .../card-large/examples/13/index.less | 0 .../card-large/examples/13/index.ts | 14 +++++ .../card-large/examples/8/index.html | 55 ++++++++----------- .../card-large/examples/8/index.less | 6 -- .../components/card-large/examples/8/index.ts | 7 ++- .../card-large/examples/9/index.html | 44 ++++++++++----- .../card-large/examples/9/index.less | 6 ++ .../components/card-large/examples/9/index.ts | 16 +++++- .../modules/components/card-large/index.ts | 3 +- .../layout/components/card/card.styles.less | 4 ++ 11 files changed, 130 insertions(+), 58 deletions(-) create mode 100644 projects/demo/src/modules/components/card-large/examples/13/index.html create mode 100644 projects/demo/src/modules/components/card-large/examples/13/index.less create mode 100644 projects/demo/src/modules/components/card-large/examples/13/index.ts diff --git a/projects/demo/src/modules/components/card-large/examples/13/index.html b/projects/demo/src/modules/components/card-large/examples/13/index.html new file mode 100644 index 000000000000..72cf5200e8c3 --- /dev/null +++ b/projects/demo/src/modules/components/card-large/examples/13/index.html @@ -0,0 +1,33 @@ +
+
+

+ Title + Subtitle +

+
+ +
+ +
+ +
+ +
+
diff --git a/projects/demo/src/modules/components/card-large/examples/13/index.less b/projects/demo/src/modules/components/card-large/examples/13/index.less new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/projects/demo/src/modules/components/card-large/examples/13/index.ts b/projects/demo/src/modules/components/card-large/examples/13/index.ts new file mode 100644 index 000000000000..4549512f1582 --- /dev/null +++ b/projects/demo/src/modules/components/card-large/examples/13/index.ts @@ -0,0 +1,14 @@ +import {Component} from '@angular/core'; +import {changeDetection} from '@demo/emulate/change-detection'; +import {encapsulation} from '@demo/emulate/encapsulation'; +import {TuiButton, TuiSurface} from '@taiga-ui/core'; +import {TuiCardLarge, TuiHeader} from '@taiga-ui/layout'; + +@Component({ + standalone: true, + imports: [TuiButton, TuiCardLarge, TuiHeader, TuiSurface], + templateUrl: './index.html', + encapsulation, + changeDetection, +}) +export default class Example {} diff --git a/projects/demo/src/modules/components/card-large/examples/8/index.html b/projects/demo/src/modules/components/card-large/examples/8/index.html index ca5517dca016..019c88826ae8 100644 --- a/projects/demo/src/modules/components/card-large/examples/8/index.html +++ b/projects/demo/src/modules/components/card-large/examples/8/index.html @@ -2,11 +2,10 @@ tuiCardLarge tuiSurface="elevated" > -
-

Title

-
- -
+
Title
Description
- - +
-
-

Title

-
- - Some text - -
- -
+
+ +
+ Title +
Description
+
+
+
diff --git a/projects/demo/src/modules/components/card-large/examples/8/index.less b/projects/demo/src/modules/components/card-large/examples/8/index.less index 659872604718..e69de29bb2d1 100644 --- a/projects/demo/src/modules/components/card-large/examples/8/index.less +++ b/projects/demo/src/modules/components/card-large/examples/8/index.less @@ -1,6 +0,0 @@ -:host { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 1rem; - inline-size: 30rem; -} diff --git a/projects/demo/src/modules/components/card-large/examples/8/index.ts b/projects/demo/src/modules/components/card-large/examples/8/index.ts index 635369d30919..fa599740bd8a 100644 --- a/projects/demo/src/modules/components/card-large/examples/8/index.ts +++ b/projects/demo/src/modules/components/card-large/examples/8/index.ts @@ -1,7 +1,8 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiButton, TuiSurface, TuiTitle} from '@taiga-ui/core'; +import {TuiRepeatTimes} from '@taiga-ui/cdk'; +import {TuiButton, TuiSurface} from '@taiga-ui/core'; import {TuiAvatar} from '@taiga-ui/kit'; import {TuiCardLarge, TuiCell, TuiHeader} from '@taiga-ui/layout'; @@ -13,11 +14,11 @@ import {TuiCardLarge, TuiCell, TuiHeader} from '@taiga-ui/layout'; TuiCardLarge, TuiCell, TuiHeader, + TuiRepeatTimes, TuiSurface, - TuiTitle, ], templateUrl: './index.html', - styleUrls: ['./index.less'], + styles: [':host { display: flex; flex-direction: column; gap: 2rem}'], encapsulation, changeDetection, }) diff --git a/projects/demo/src/modules/components/card-large/examples/9/index.html b/projects/demo/src/modules/components/card-large/examples/9/index.html index 72cf5200e8c3..ca5517dca016 100644 --- a/projects/demo/src/modules/components/card-large/examples/9/index.html +++ b/projects/demo/src/modules/components/card-large/examples/9/index.html @@ -3,22 +3,40 @@ tuiSurface="elevated" >
-

+

Title

+
+ +
+ +
Title - Subtitle - +
Description
+
+
+ + + +
+
+

Title

-
- -
+ Some text