diff --git a/projects/addon-mobile/styles/common/card-large.less b/projects/addon-mobile/styles/common/card-large.less index 34a672f59b690..b2acd387e9c7f 100644 --- a/projects/addon-mobile/styles/common/card-large.less +++ b/projects/addon-mobile/styles/common/card-large.less @@ -1,13 +1,12 @@ -[tuiCard='l'] { - &[data-size='l'] { - &[data-space='normal'] { - padding: 1.25rem; - gap: 1.25rem; - } +[tuiCardLarge] { + &[data-space='normal'] { + --t-padding: 1.25rem; + --t-gap: 1.25rem; + } - &[data-space='compact'] { - padding: 1rem; - gap: 1rem; - } + &[data-space='compact'] { + --t-padding: 1rem; + --t-gap: 1rem; + --t-comp: -0.125rem; } } diff --git a/projects/core/styles/theme/appearance/outline.less b/projects/core/styles/theme/appearance/outline.less index 395f44c7fa147..8052809093541 100644 --- a/projects/core/styles/theme/appearance/outline.less +++ b/projects/core/styles/theme/appearance/outline.less @@ -9,6 +9,7 @@ .appearance-hover({ background: var(--tui-clear); box-shadow: inset 0 0 0 1px var(--tui-base-05); + cursor: pointer; }); .appearance-active({ diff --git a/projects/demo/src/modules/experimental/card/card.module.ts b/projects/demo/src/modules/experimental/card/card.module.ts index a3a5f20b25871..a017c3f4a337e 100644 --- a/projects/demo/src/modules/experimental/card/card.module.ts +++ b/projects/demo/src/modules/experimental/card/card.module.ts @@ -14,6 +14,7 @@ import { TuiSvgModule, } from '@taiga-ui/core'; import { + TuiAppearanceModule, TuiAutoColorModule, TuiAvatarModule, TuiAvatarStackModule, @@ -31,7 +32,6 @@ import { TuiThumbnailCardModule, TuiTitleModule, } from '@taiga-ui/experimental'; -import {TuiProgressModule} from '@taiga-ui/kit'; import {ExampleTuiCardComponent} from './card.component'; import {TuiCardExample1} from './examples/1'; @@ -82,10 +82,10 @@ import {TuiCardExample19} from './examples/19'; TuiRepeatTimesModule, TuiDataListModule, TuiHostedDropdownModule, - TuiProgressModule, TuiButtonCloseModule, TuiPlatformModule, TuiLinkModule, + TuiAppearanceModule, ], declarations: [ ExampleTuiCardComponent, diff --git a/projects/demo/src/modules/experimental/card/card.template.html b/projects/demo/src/modules/experimental/card/card.template.html index 0bc306bc42e0e..f5fa6125ecb6a 100644 --- a/projects/demo/src/modules/experimental/card/card.template.html +++ b/projects/demo/src/modules/experimental/card/card.template.html @@ -10,6 +10,18 @@ and is a subject to change. Expect final solution to be shipped in the next major version +

+ A layout component used to create various cards for the interface. Define visual styles of the cards + yourself or combine with + + Surface + + for visual presets. +

+ @@ -119,15 +131,15 @@ diff --git a/projects/demo/src/modules/experimental/card/examples/1/index.html b/projects/demo/src/modules/experimental/card/examples/1/index.html index f5ebe33cc50bf..c54eaaa5678b6 100644 --- a/projects/demo/src/modules/experimental/card/examples/1/index.html +++ b/projects/demo/src/modules/experimental/card/examples/1/index.html @@ -1,4 +1,7 @@ -
+
-
+

-
+

Title Subtitle diff --git a/projects/demo/src/modules/experimental/card/examples/10/index.html b/projects/demo/src/modules/experimental/card/examples/10/index.html index 4cffc1243342e..35a4776929184 100644 --- a/projects/demo/src/modules/experimental/card/examples/10/index.html +++ b/projects/demo/src/modules/experimental/card/examples/10/index.html @@ -1,74 +1,64 @@
diff --git a/projects/demo/src/modules/experimental/card/examples/10/index.less b/projects/demo/src/modules/experimental/card/examples/10/index.less index 728927259d172..e13863a293d55 100644 --- a/projects/demo/src/modules/experimental/card/examples/10/index.less +++ b/projects/demo/src/modules/experimental/card/examples/10/index.less @@ -2,18 +2,11 @@ display: flex; flex-direction: column; gap: 1.25rem; - - [tuiCard][data-size='l'] { - padding: 1rem 1.5rem; - } + width: 20rem; } .actions { - display: flex; + display: grid; + grid-template-columns: 1fr 1fr; gap: 1.25rem; - - button { - flex: 1; - height: 3.75rem; - } } diff --git a/projects/demo/src/modules/experimental/card/examples/11/index.html b/projects/demo/src/modules/experimental/card/examples/11/index.html index e32f80a517c24..bea2b059d2dd5 100644 --- a/projects/demo/src/modules/experimental/card/examples/11/index.html +++ b/projects/demo/src/modules/experimental/card/examples/11/index.html @@ -1,5 +1,5 @@
@@ -11,8 +11,9 @@

@@ -9,21 +9,19 @@

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

diff --git a/projects/demo/src/modules/experimental/card/examples/13/index.less b/projects/demo/src/modules/experimental/card/examples/13/index.less index 2c7a3b16833c4..294ee2562724c 100644 --- a/projects/demo/src/modules/experimental/card/examples/13/index.less +++ b/projects/demo/src/modules/experimental/card/examples/13/index.less @@ -1,8 +1,5 @@ -section { - display: flex; - gap: 1.5rem; -} - -aside { - flex: 1; +.actions { + display: grid; + grid-template-columns: 1fr 1fr; + gap: inherit; } diff --git a/projects/demo/src/modules/experimental/card/examples/14/index.html b/projects/demo/src/modules/experimental/card/examples/14/index.html index b84a0a642ff56..ddf01b2df22f6 100644 --- a/projects/demo/src/modules/experimental/card/examples/14/index.html +++ b/projects/demo/src/modules/experimental/card/examples/14/index.html @@ -1,5 +1,5 @@
@@ -9,43 +9,36 @@

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

- Title - Subtitle -

+

Title

-
- + +
+ Title +
Description
+
+

+ +
+ +
+
+
+
+

Title

+
+ + Some text
- - +
diff --git a/projects/demo/src/modules/experimental/card/examples/17/index.less b/projects/demo/src/modules/experimental/card/examples/17/index.less index 4c2ab50c5a424..a3ce92c035a07 100644 --- a/projects/demo/src/modules/experimental/card/examples/17/index.less +++ b/projects/demo/src/modules/experimental/card/examples/17/index.less @@ -1,4 +1,3 @@ .image { - background: url('/assets/images/illustration.jpg') no-repeat; - background-size: cover; + background: url(/assets/images/illustration.jpg) no-repeat top right / 250%; } diff --git a/projects/demo/src/modules/experimental/card/examples/18/index.html b/projects/demo/src/modules/experimental/card/examples/18/index.html index 5ec4a97c204a0..132a80af4fcda 100644 --- a/projects/demo/src/modules/experimental/card/examples/18/index.html +++ b/projects/demo/src/modules/experimental/card/examples/18/index.html @@ -1,28 +1,25 @@
-
-

- Title - Subtitle -

+

+ Title + Subtitle +

- -
+ Close + +
diff --git a/projects/demo/src/modules/experimental/card/examples/18/index.less b/projects/demo/src/modules/experimental/card/examples/18/index.less index 35f64bafedafb..ebc56a8e640a8 100644 --- a/projects/demo/src/modules/experimental/card/examples/18/index.less +++ b/projects/demo/src/modules/experimental/card/examples/18/index.less @@ -1,6 +1,5 @@ -.image-dark { - background: url('/assets/images/road-illustration.jpg') no-repeat center; - background-size: cover; +.image { + background: url('/assets/images/road-illustration.jpg') no-repeat center / cover; &:before { background: rgba(0, 0, 0, 0.5); diff --git a/projects/demo/src/modules/experimental/card/examples/19/index.html b/projects/demo/src/modules/experimental/card/examples/19/index.html index a7173cae35738..e8889f447bba6 100644 --- a/projects/demo/src/modules/experimental/card/examples/19/index.html +++ b/projects/demo/src/modules/experimental/card/examples/19/index.html @@ -2,11 +2,10 @@

Desktop

-
+

Normal Radius: 24, padding: 24/20 @@ -26,12 +25,11 @@

-
+

Compact Radius: 16, padding: 20/16 @@ -55,11 +53,10 @@

iOS/Android

-
+

Normal Radius: 24, padding: 20/16 @@ -79,12 +76,11 @@

-
+

Compact Radius: 16, padding: 16/14 diff --git a/projects/demo/src/modules/experimental/card/examples/2/index.html b/projects/demo/src/modules/experimental/card/examples/2/index.html index 2973ba7f336da..8a96ad6c3dc42 100644 --- a/projects/demo/src/modules/experimental/card/examples/2/index.html +++ b/projects/demo/src/modules/experimental/card/examples/2/index.html @@ -1,4 +1,7 @@ -
+

-
+

Title Subtitle diff --git a/projects/demo/src/modules/experimental/card/examples/3/index.html b/projects/demo/src/modules/experimental/card/examples/3/index.html index b2e9450c93bdb..c497103883156 100644 --- a/projects/demo/src/modules/experimental/card/examples/3/index.html +++ b/projects/demo/src/modules/experimental/card/examples/3/index.html @@ -1,4 +1,7 @@ -
+

-
+

Title Subtitle diff --git a/projects/demo/src/modules/experimental/card/examples/4/index.html b/projects/demo/src/modules/experimental/card/examples/4/index.html index 80edf46d4e3dc..8a25550db16b6 100644 --- a/projects/demo/src/modules/experimental/card/examples/4/index.html +++ b/projects/demo/src/modules/experimental/card/examples/4/index.html @@ -1,4 +1,7 @@ -
+

-
+

Title Subtitle diff --git a/projects/demo/src/modules/experimental/card/examples/5/index.html b/projects/demo/src/modules/experimental/card/examples/5/index.html index 58088d8418863..28763b559b418 100644 --- a/projects/demo/src/modules/experimental/card/examples/5/index.html +++ b/projects/demo/src/modules/experimental/card/examples/5/index.html @@ -1,5 +1,5 @@
@@ -18,7 +18,7 @@

@@ -34,7 +34,7 @@

Flights

@@ -52,7 +52,7 @@

diff --git a/projects/demo/src/modules/experimental/card/examples/5/index.less b/projects/demo/src/modules/experimental/card/examples/5/index.less index 659262ce86738..994070ff005da 100644 --- a/projects/demo/src/modules/experimental/card/examples/5/index.less +++ b/projects/demo/src/modules/experimental/card/examples/5/index.less @@ -9,12 +9,12 @@ color: #333; } -.money[tuiSurface] { +.money { background: #ffdd2d; color: #333; } -.poster[tuiSurface] { +.poster { background: rgb(88, 192, 190); padding: 0.75rem; color: #fff; @@ -34,7 +34,7 @@ } } -.fly[tuiSurface] { +.fly { background: rgb(101, 174, 234); padding: 0.75rem; color: #fff; @@ -50,8 +50,8 @@ } } -.google[tuiSurface], -.microsoft[tuiSurface] { +.google, +.microsoft { padding: 0.75rem; background: var(--tui-base-02); height: 8rem; @@ -62,7 +62,7 @@ } } -.google[tuiSurface] { +.google { [tuiSubtitle] { color: red; } @@ -72,7 +72,7 @@ } } -.microsoft[tuiSurface] { +.microsoft { [tuiSubtitle] { color: #00b92d; } diff --git a/projects/demo/src/modules/experimental/card/examples/6/index.html b/projects/demo/src/modules/experimental/card/examples/6/index.html index e6fd9331b63ae..8030ad639fc31 100644 --- a/projects/demo/src/modules/experimental/card/examples/6/index.html +++ b/projects/demo/src/modules/experimental/card/examples/6/index.html @@ -1,46 +1,44 @@ -
-

- - - Lorem Ipsum is simply dummy text of the printing and typesetting industry. - - +
+ + Lorem Ipsum is simply dummy text of the printing and typesetting industry. + - - - - It is a long established fact that a reader will be distracted by the readable content of a page - when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal - distribution of letters, as opposed to using 'Content here, content here', making it look like - readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their - default model text. - - - -

+ + It is a long established fact that a reader will be distracted by the readable content of a page when looking at + its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as + opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing + packages and web page editors now use Lorem Ipsum as their default model text. +
-
-

Text without fade out when overflow content

+
+ Text without fade out when overflow content
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text.
- {{ text.innerText }}
diff --git a/projects/demo/src/modules/experimental/card/examples/6/index.less b/projects/demo/src/modules/experimental/card/examples/6/index.less index 2cc57e51845ad..e252245e982bf 100644 --- a/projects/demo/src/modules/experimental/card/examples/6/index.less +++ b/projects/demo/src/modules/experimental/card/examples/6/index.less @@ -6,7 +6,6 @@ } .fade { - .scrollbar-hidden(); width: 100%; height: 2rem; white-space: nowrap; @@ -14,7 +13,6 @@ } .fade-vertical { - .scrollbar-hidden(); height: 5rem; overflow: auto; } diff --git a/projects/demo/src/modules/experimental/card/examples/7/index.html b/projects/demo/src/modules/experimental/card/examples/7/index.html index 96c8272f7a08e..630e9682ab679 100644 --- a/projects/demo/src/modules/experimental/card/examples/7/index.html +++ b/projects/demo/src/modules/experimental/card/examples/7/index.html @@ -1,18 +1,13 @@ -
- - -
+
+ +
-
+ -
+ +
+ + 2222 + +
+ - - -
- - 2222 - -
-
-
+ diff --git a/projects/demo/src/modules/experimental/card/examples/7/index.less b/projects/demo/src/modules/experimental/card/examples/7/index.less index 1b720d2235e64..2281d1fdc1f3a 100644 --- a/projects/demo/src/modules/experimental/card/examples/7/index.less +++ b/projects/demo/src/modules/experimental/card/examples/7/index.less @@ -5,17 +5,9 @@ gap: 1rem; } -.surface[tuiSurface] { +.card { height: 6.5rem; width: 6.5rem; - padding: 0.75rem; - background: var(--tui-base-02); - cursor: pointer; -} - -.selected { - z-index: 1; - color: var(--tui-primary); } .mir { @@ -26,19 +18,12 @@ background: linear-gradient(45deg, #ffaa00d1, #ffaa00), url(/assets/taiga-ui/icons/tuiIconStarLarge.svg); } -.card-list { - .scrollbar-hidden(); +.cards { display: flex; flex-direction: row; gap: 0.25rem; - width: 100%; - overflow-x: scroll; - overflow-y: hidden; - margin-left: -0.4375rem; - padding-left: 0.4375rem; - z-index: 2; - - tui-thumbnail-card { - flex-shrink: 0; - } + width: stretch; + margin: 0 -0.4375rem; + padding: 0 0.4375rem; + overflow: auto; } diff --git a/projects/demo/src/modules/experimental/card/examples/8/index.html b/projects/demo/src/modules/experimental/card/examples/8/index.html index 28db44b053ca1..a700adde4bbd4 100644 --- a/projects/demo/src/modules/experimental/card/examples/8/index.html +++ b/projects/demo/src/modules/experimental/card/examples/8/index.html @@ -2,7 +2,7 @@

Desktop

@@ -24,7 +24,7 @@

Header

@@ -40,7 +40,7 @@

Header

iOS/Android

@@ -71,7 +71,7 @@

Header

diff --git a/projects/demo/src/modules/experimental/card/examples/9/index.html b/projects/demo/src/modules/experimental/card/examples/9/index.html index 5d684fc6b0634..fbab751614b9d 100644 --- a/projects/demo/src/modules/experimental/card/examples/9/index.html +++ b/projects/demo/src/modules/experimental/card/examples/9/index.html @@ -2,7 +2,7 @@

Desktop

@@ -36,7 +36,7 @@

iOS/Android

diff --git a/projects/demo/src/modules/experimental/card/examples/import/insert-template.md b/projects/demo/src/modules/experimental/card/examples/import/insert-template.md index 2334deb74f1ff..e1f776077d081 100644 --- a/projects/demo/src/modules/experimental/card/examples/import/insert-template.md +++ b/projects/demo/src/modules/experimental/card/examples/import/insert-template.md @@ -1,6 +1,6 @@ ```html -
+
diff --git a/projects/demo/src/modules/experimental/surface/examples/1/base.less b/projects/demo/src/modules/experimental/surface/examples/1/base.less index 3d14b1f311452..edb78291a157d 100644 --- a/projects/demo/src/modules/experimental/surface/examples/1/base.less +++ b/projects/demo/src/modules/experimental/surface/examples/1/base.less @@ -12,8 +12,7 @@ } } -.highlight { - background: var(--tui-primary); - box-shadow: none; - color: var(--tui-primary-text); +[tuiSurface] { + padding: 1.25rem; + border-radius: var(--tui-radius-l); } diff --git a/projects/demo/src/modules/experimental/surface/examples/1/index.html b/projects/demo/src/modules/experimental/surface/examples/1/index.html index 0bb4487a36a12..49a01f7ec1ac9 100644 --- a/projects/demo/src/modules/experimental/surface/examples/1/index.html +++ b/projects/demo/src/modules/experimental/surface/examples/1/index.html @@ -11,6 +11,7 @@ Overlay
diff --git a/projects/demo/src/modules/experimental/surface/examples/5/index.html b/projects/demo/src/modules/experimental/surface/examples/5/index.html index 4243d64a6d075..b6a70c46eb57c 100644 --- a/projects/demo/src/modules/experimental/surface/examples/5/index.html +++ b/projects/demo/src/modules/experimental/surface/examples/5/index.html @@ -1,6 +1,8 @@