diff --git a/projects/demo/src/modules/app/app.routes.ts b/projects/demo/src/modules/app/app.routes.ts index 71d7401aefc6c..536461d6d9fc4 100644 --- a/projects/demo/src/modules/app/app.routes.ts +++ b/projects/demo/src/modules/app/app.routes.ts @@ -1,5 +1,6 @@ import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; +import {tuiProvideRoutePageTab as route} from '@taiga-ui/addon-doc'; export const ROUTES: Routes = [ { @@ -173,14 +174,11 @@ export const ROUTES: Routes = [ title: 'Action', }, }, - { + route({ path: 'components/avatar', - loadChildren: async () => - (await import('../components/avatar/avatar.module')).ExampleTuiAvatarModule, - data: { - title: 'Avatar', - }, - }, + loadComponent: async () => import('../components/avatar/avatar.component'), + title: 'Avatar', + }), { path: 'components/badge', loadChildren: async () => @@ -224,14 +222,6 @@ export const ROUTES: Routes = [ title: 'Appearance', }, }, - { - path: 'experimental/avatar', - loadChildren: async () => - (await import('../experimental/avatar/avatar.module')).ExampleTuiAvatarModule, - data: { - title: 'Avatar ', - }, - }, { path: 'experimental/chip', loadChildren: async () => diff --git a/projects/demo/src/modules/app/pages.ts b/projects/demo/src/modules/app/pages.ts index 024a9d61a92ff..5def5b5aefa9b 100644 --- a/projects/demo/src/modules/app/pages.ts +++ b/projects/demo/src/modules/app/pages.ts @@ -153,7 +153,8 @@ export const pages: TuiDocPages = [ { section: 'Components', title: 'Avatar', - keywords: 'аватар, image, pic, картинка, изображение, avatar, stack', + keywords: + 'аватар, image, pic, icon, картинка, изображение, avatar, stack, labeled', route: '/components/avatar', }, { @@ -858,12 +859,6 @@ export const pages: TuiDocPages = [ route: '/icons/overview/Component', }, // Experimental - { - section: 'Experimental', - title: 'Avatar ', - keywords: 'аватар, image, pic, icon, картинка, изображение, avatar, stack', - route: '/experimental/avatar', - }, { section: 'Experimental', title: 'Badge', diff --git a/projects/demo/src/modules/components/avatar/avatar.component.ts b/projects/demo/src/modules/components/avatar/avatar.component.ts index 708c6320456e1..f23214fba6b9b 100644 --- a/projects/demo/src/modules/components/avatar/avatar.component.ts +++ b/projects/demo/src/modules/components/avatar/avatar.component.ts @@ -1,19 +1,47 @@ -import {Component} from '@angular/core'; +import {Component, Inject} from '@angular/core'; +import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser'; import {changeDetection} from '@demo/emulate/change-detection'; -import {TuiDocExample, TuiRawLoaderContent} from '@taiga-ui/addon-doc'; -import {TuiSafeHtml} from '@taiga-ui/cdk'; -import {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core'; +import { + TuiDocCodeModule, + TuiDocDemoModule, + TuiDocDocumentationModule, + TuiDocExample, + TuiDocExampleModule, + TuiDocPageModule, + TuiRawLoaderContent, +} from '@taiga-ui/addon-doc'; +import {TuiNotificationModule, TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; + +import {TuiAvatarExample1} from './examples/1'; +import {TuiAvatarExample2} from './examples/2'; +import {TuiAvatarExample3} from './examples/3'; +import {TuiAvatarExample4} from './examples/4'; +import {TuiAvatarExample5} from './examples/5'; +import {TuiAvatarExample6} from './examples/6'; @Component({ + standalone: true, selector: 'example-avatar', + imports: [ + TuiDocPageModule, + TuiDocExampleModule, + TuiNotificationModule, + TuiAvatarExample1, + TuiAvatarExample2, + TuiAvatarExample3, + TuiAvatarExample4, + TuiAvatarExample5, + TuiAvatarExample6, + TuiDocDemoModule, + TuiAvatarComponent, + TuiDocDocumentationModule, + TuiDocCodeModule, + ], templateUrl: './avatar.template.html', changeDetection, }) -export class ExampleTuiAvatarComponent { - readonly exampleOptions: TuiRawLoaderContent = import( - './examples/import/define-options.md?raw' - ); - +export default class ExampleTuiAvatarComponent { readonly exampleModule: TuiRawLoaderContent = import( './examples/import/import-module.md?raw' ); @@ -30,6 +58,7 @@ export class ExampleTuiAvatarComponent { readonly example2: TuiDocExample = { TypeScript: import('./examples/2/index.ts?raw'), HTML: import('./examples/2/index.html?raw'), + LESS: import('./examples/2/index.less?raw'), }; readonly example3: TuiDocExample = { @@ -40,7 +69,6 @@ export class ExampleTuiAvatarComponent { readonly example4: TuiDocExample = { TypeScript: import('./examples/4/index.ts?raw'), HTML: import('./examples/4/index.html?raw'), - LESS: import('./examples/4/index.less?raw'), }; readonly example5: TuiDocExample = { @@ -54,28 +82,7 @@ export class ExampleTuiAvatarComponent { LESS: import('./examples/6/index.less?raw'), }; - readonly avatarUrlVariants: readonly string[] = [ - 'https://ng-web-apis.github.io/dist/assets/images/web-api.svg', - 'https://taiga-ui.dev/assets/images/test-not-found.png', - ]; - - readonly fallbackVariants: readonly TuiSafeHtml[] = [ - 'tuiIconUserLarge', - '', - ]; - - avatarUrl: string | null = null; - - fallback: TuiSafeHtml | null = this.fallbackVariants[0]; - - text = 'daenerys targaryen'; - - rounded = false; - - autoColor = false; - - readonly sizeVariants: ReadonlyArray = [ + readonly sizes: ReadonlyArray = [ 'xxs', 'xs', 's', @@ -85,11 +92,21 @@ export class ExampleTuiAvatarComponent { 'xxl', ]; - size = this.sizeVariants[3]; + size = this.sizes[3]; + + readonly srcVariants: ReadonlyArray = [ + 'MW', + 'https://avatars.githubusercontent.com/u/11832552', + 'https://taiga-ui.dev/assets/images/test-not-found.png', + 'tuiIconUserLarge', + this.sanitizer.bypassSecurityTrustResourceUrl( + 'https://avatars.githubusercontent.com/u/10106368', + ), + ]; - border = 'var(--tui-base-01)'; + src = this.srcVariants[0]; - color = 'var(--tui-text-01)'; + round = true; - background = 'var(--tui-secondary-active)'; + constructor(@Inject(DomSanitizer) private readonly sanitizer: DomSanitizer) {} } diff --git a/projects/demo/src/modules/components/avatar/avatar.module.ts b/projects/demo/src/modules/components/avatar/avatar.module.ts deleted file mode 100644 index 24a8136fd1f66..0000000000000 --- a/projects/demo/src/modules/components/avatar/avatar.module.ts +++ /dev/null @@ -1,35 +0,0 @@ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; -import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; -import {TuiNotificationModule} from '@taiga-ui/core'; -import {TuiAvatarModule} from '@taiga-ui/kit'; - -import {ExampleTuiAvatarComponent} from './avatar.component'; -import {TuiAvatarExample1} from './examples/1'; -import {TuiAvatarExample2} from './examples/2'; -import {TuiAvatarExample3} from './examples/3'; -import {TuiAvatarExample4} from './examples/4'; -import {TuiAvatarExample5} from './examples/5'; -import {TuiAvatarExample6} from './examples/6'; - -@NgModule({ - imports: [ - CommonModule, - TuiAvatarModule, - TuiNotificationModule, - TuiAddonDocModule, - RouterModule.forChild(tuiGenerateRoutes(ExampleTuiAvatarComponent)), - ], - declarations: [ - ExampleTuiAvatarComponent, - TuiAvatarExample1, - TuiAvatarExample2, - TuiAvatarExample3, - TuiAvatarExample4, - TuiAvatarExample5, - TuiAvatarExample6, - ], - exports: [ExampleTuiAvatarComponent], -}) -export class ExampleTuiAvatarModule {} diff --git a/projects/demo/src/modules/components/avatar/avatar.template.html b/projects/demo/src/modules/components/avatar/avatar.template.html index 767f7fcfdff9e..ce9c76986fdc2 100644 --- a/projects/demo/src/modules/components/avatar/avatar.template.html +++ b/projects/demo/src/modules/components/avatar/avatar.template.html @@ -1,30 +1,38 @@ -

Use Avatar to view person or company. It can be photo, icon or first letters of name.

+

New version for Avatar component following updated design specs for displaying text, pictures and icons.

+ + This example requires import of + TuiFallbackSrcModule + + + This example requires import of + TuiFadeModule + @@ -32,40 +40,27 @@ - Use special - tui-avatar-stack - class to enable stacking + This example requires import of + TuiAvatarStackComponent - - Sizes were updated and synced with - - MarkerIcon - - . To prevent breaking changes - new - attribute has to be added to enable new sizes. - @@ -75,91 +70,39 @@ - Auto color if there is no image - - - Avatar URL or Taiga UI icon name - - - Avatar URL or Taiga UI icon name - - - Rounded mode + Use round shape Size - Name (Avatar shows first letters of name if there is no image) - - - - - Color of the border for stacking avatars - - - Color of the text - - - Background + Initials, image URL, or icon name. Alternatively you can pass text as + ng-content + which would be styled differently from initials and fade if overflown @@ -167,11 +110,7 @@
  1. -

    - Import - TuiAvatarModule - into a module where you want to use our component -

    +

    Import module:

  2. - -
  3. -

    - Optionally use the - TUI_AVATAR_OPTIONS - injection token to override the default options for the component. -

    - - -
diff --git a/projects/demo/src/modules/components/avatar/examples/1/index.html b/projects/demo/src/modules/components/avatar/examples/1/index.html index df6655e2c7d9c..eaf75bc5fed59 100644 --- a/projects/demo/src/modules/components/avatar/examples/1/index.html +++ b/projects/demo/src/modules/components/avatar/examples/1/index.html @@ -1,14 +1,31 @@ + - - + +99+ + + + + Alex Inkin + + + + + diff --git a/projects/demo/src/modules/experimental/avatar/examples/1/index.less b/projects/demo/src/modules/components/avatar/examples/1/index.less similarity index 100% rename from projects/demo/src/modules/experimental/avatar/examples/1/index.less rename to projects/demo/src/modules/components/avatar/examples/1/index.less diff --git a/projects/demo/src/modules/components/avatar/examples/1/index.ts b/projects/demo/src/modules/components/avatar/examples/1/index.ts index f87fbcb6adeac..7885891bf1373 100644 --- a/projects/demo/src/modules/components/avatar/examples/1/index.ts +++ b/projects/demo/src/modules/components/avatar/examples/1/index.ts @@ -1,13 +1,17 @@ +import {AsyncPipe} from '@angular/common'; import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; +import {TuiFallbackSrcModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; @Component({ + standalone: true, selector: 'tui-avatar-example-1', + imports: [TuiAvatarComponent, TuiFallbackSrcModule, AsyncPipe], templateUrl: './index.html', + styleUrls: ['./index.less'], encapsulation, changeDetection, }) -export class TuiAvatarExample1 { - avatar = 'https://ng-web-apis.github.io/dist/assets/images/web-api.svg'; -} +export class TuiAvatarExample1 {} diff --git a/projects/demo/src/modules/components/avatar/examples/2/index.html b/projects/demo/src/modules/components/avatar/examples/2/index.html index 5f18e2cdbe4e0..3c93cc27b5562 100644 --- a/projects/demo/src/modules/components/avatar/examples/2/index.html +++ b/projects/demo/src/modules/components/avatar/examples/2/index.html @@ -1,19 +1,12 @@ - - + +
Fading
+
diff --git a/projects/demo/src/modules/components/avatar/examples/2/index.less b/projects/demo/src/modules/components/avatar/examples/2/index.less index af9ab4815f296..7c34c000eadfe 100644 --- a/projects/demo/src/modules/components/avatar/examples/2/index.less +++ b/projects/demo/src/modules/components/avatar/examples/2/index.less @@ -1,4 +1,9 @@ -.custom { - --tui-avatar-color: #fff; - --tui-avatar-background: linear-gradient(to bottom right, #cd56c2, #6e48aa); +:host { + display: flex; + gap: 1rem; +} + +.text { + background: var(--tui-base-05); + color: var(--tui-text-01-night); } diff --git a/projects/demo/src/modules/components/avatar/examples/2/index.ts b/projects/demo/src/modules/components/avatar/examples/2/index.ts index e75c6c3ef780d..14b8680420ee8 100644 --- a/projects/demo/src/modules/components/avatar/examples/2/index.ts +++ b/projects/demo/src/modules/components/avatar/examples/2/index.ts @@ -1,9 +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'; @Component({ + standalone: true, selector: 'tui-avatar-example-2', + imports: [TuiAvatarComponent, TuiAutoColorModule, TuiFadeModule], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/demo/src/modules/components/avatar/examples/3/index.html b/projects/demo/src/modules/components/avatar/examples/3/index.html index 4946d4efa6abf..58b3e218997aa 100644 --- a/projects/demo/src/modules/components/avatar/examples/3/index.html +++ b/projects/demo/src/modules/components/avatar/examples/3/index.html @@ -1,4 +1,7 @@ - +XXL +XL +L +M +S +XS +XXS diff --git a/projects/demo/src/modules/experimental/avatar/examples/3/index.less b/projects/demo/src/modules/components/avatar/examples/3/index.less similarity index 100% rename from projects/demo/src/modules/experimental/avatar/examples/3/index.less rename to projects/demo/src/modules/components/avatar/examples/3/index.less diff --git a/projects/demo/src/modules/components/avatar/examples/3/index.ts b/projects/demo/src/modules/components/avatar/examples/3/index.ts index 70a5de48bf1f0..505eead3c095d 100644 --- a/projects/demo/src/modules/components/avatar/examples/3/index.ts +++ b/projects/demo/src/modules/components/avatar/examples/3/index.ts @@ -1,19 +1,17 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {tuiAvatarOptionsProvider} from '@taiga-ui/kit'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; @Component({ + standalone: true, selector: 'tui-avatar-example-3', + imports: [TuiAvatarComponent], templateUrl: './index.html', + styleUrls: ['./index.less'], encapsulation, changeDetection, - providers: [ - tuiAvatarOptionsProvider({ - size: 'l', - autoColor: true, - rounded: true, - }), - ], }) -export class TuiAvatarExample3 {} +export class TuiAvatarExample3 { + readonly names = ['Jason Statham', 'Silvester Stallone', 'Jackie Chan']; +} diff --git a/projects/demo/src/modules/components/avatar/examples/4/index.html b/projects/demo/src/modules/components/avatar/examples/4/index.html index 680580682a986..c73e5d628a62a 100644 --- a/projects/demo/src/modules/components/avatar/examples/4/index.html +++ b/projects/demo/src/modules/components/avatar/examples/4/index.html @@ -1,17 +1,20 @@ -
+ -
- -
-
+ [round]="odd" + [size]="size" + > + 99+ + + diff --git a/projects/demo/src/modules/components/avatar/examples/4/index.less b/projects/demo/src/modules/components/avatar/examples/4/index.less deleted file mode 100644 index eabebfa1790af..0000000000000 --- a/projects/demo/src/modules/components/avatar/examples/4/index.less +++ /dev/null @@ -1,4 +0,0 @@ -.reversed { - flex-direction: row-reverse; - margin-top: 1rem; -} diff --git a/projects/demo/src/modules/components/avatar/examples/4/index.ts b/projects/demo/src/modules/components/avatar/examples/4/index.ts index d325a83a9623e..8db1a8ce1aeeb 100644 --- a/projects/demo/src/modules/components/avatar/examples/4/index.ts +++ b/projects/demo/src/modules/components/avatar/examples/4/index.ts @@ -1,19 +1,34 @@ +import {NgForOf} from '@angular/common'; import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; +import {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core'; +import {TuiAutoColorModule, TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent, TuiAvatarStackComponent} from '@taiga-ui/kit'; @Component({ + standalone: true, selector: 'tui-avatar-example-4', + imports: [ + TuiAvatarStackComponent, + NgForOf, + TuiAvatarComponent, + TuiInitialsModule, + TuiAutoColorModule, + ], templateUrl: './index.html', - styleUrls: ['./index.less'], encapsulation, changeDetection, }) export class TuiAvatarExample4 { - readonly users = [ - 'Alex Inkin', - 'Vladimir Potekhin', - 'Nikita Barsukov', - 'Maxim Ivanov', + readonly names = ['Jason Statham', 'Silvester Stallone', 'Jackie Chan']; + readonly sizes: ReadonlyArray = [ + 'xxl', + 'xl', + 'l', + 'm', + 's', + 'xs', + 'xxs', ]; } diff --git a/projects/demo/src/modules/components/avatar/examples/5/index.html b/projects/demo/src/modules/components/avatar/examples/5/index.html index a92a087806c4e..2b74bf735f1a2 100644 --- a/projects/demo/src/modules/components/avatar/examples/5/index.html +++ b/projects/demo/src/modules/components/avatar/examples/5/index.html @@ -1,46 +1 @@ - - - - - - - + diff --git a/projects/demo/src/modules/components/avatar/examples/5/index.ts b/projects/demo/src/modules/components/avatar/examples/5/index.ts index 61abb00b12f1e..dac85d2eeec7e 100644 --- a/projects/demo/src/modules/components/avatar/examples/5/index.ts +++ b/projects/demo/src/modules/components/avatar/examples/5/index.ts @@ -1,11 +1,15 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; +import {TuiAvatarComponent, tuiAvatarOptionsProvider} from '@taiga-ui/kit'; @Component({ + standalone: true, selector: 'tui-avatar-example-5', + imports: [TuiAvatarComponent], templateUrl: './index.html', encapsulation, changeDetection, + providers: [tuiAvatarOptionsProvider({size: 'l'})], }) export class TuiAvatarExample5 {} diff --git a/projects/demo/src/modules/components/avatar/examples/6/index.html b/projects/demo/src/modules/components/avatar/examples/6/index.html index 3a9fbbae55070..09cdaa5b4fa51 100644 --- a/projects/demo/src/modules/components/avatar/examples/6/index.html +++ b/projects/demo/src/modules/components/avatar/examples/6/index.html @@ -1,12 +1,34 @@ - - - + + + +
MarsiBarsi
+
+ + + + +
Inkin
+
Alexander
+
+ + + + +
Potekhin
+
Vladimir
+
+ + + + +
Barsukov
+
Nikita
+
diff --git a/projects/demo/src/modules/components/avatar/examples/6/index.less b/projects/demo/src/modules/components/avatar/examples/6/index.less index e7969422a645d..d8787b7d1879d 100644 --- a/projects/demo/src/modules/components/avatar/examples/6/index.less +++ b/projects/demo/src/modules/components/avatar/examples/6/index.less @@ -1,15 +1,8 @@ -@import '@taiga-ui/core/styles/taiga-ui-local'; - :host { display: flex; + gap: 1rem; } -.avatar { - box-shadow: var(--tui-shadow); - background: transparent; - border: 1px solid; - - &:hover { - box-shadow: var(--tui-shadow-hover); - } +tui-avatar { + border: 1px solid var(--tui-base-04); } diff --git a/projects/demo/src/modules/components/avatar/examples/6/index.ts b/projects/demo/src/modules/components/avatar/examples/6/index.ts index 7b4b6333b7de5..372416059646a 100644 --- a/projects/demo/src/modules/components/avatar/examples/6/index.ts +++ b/projects/demo/src/modules/components/avatar/examples/6/index.ts @@ -1,15 +1,23 @@ +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'; @Component({ + standalone: true, selector: 'tui-avatar-example-6', + imports: [ + TuiFallbackSrcModule, + AsyncPipe, + TuiAvatarLabeledComponent, + TuiAvatarComponent, + TuiFadeModule, + ], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, changeDetection, }) -export class TuiAvatarExample6 { - readonly waterplea = 'https://avatars.githubusercontent.com/u/11832552?v=4'; - readonly wrongUrl = 'https://taiga-ui.dev/assets/images/test-not-found.png'; -} +export class TuiAvatarExample6 {} diff --git a/projects/demo/src/modules/components/avatar/examples/import/define-options.md b/projects/demo/src/modules/components/avatar/examples/import/define-options.md deleted file mode 100644 index 547c4e019f857..0000000000000 --- a/projects/demo/src/modules/components/avatar/examples/import/define-options.md +++ /dev/null @@ -1,15 +0,0 @@ -```ts -import {tuiAvatarOptionsProvider} from '@taiga-ui/kit'; -// ... - -@NgModule({ - providers: [ - tuiAvatarOptionsProvider({ - size: 'l', - autoColor: true, - rounded: true, - }), - ], -}) -export class MyModule {} -``` diff --git a/projects/demo/src/modules/components/avatar/examples/import/import-module.md b/projects/demo/src/modules/components/avatar/examples/import/import-module.md index fa397d5c8819d..c498d9ead48be 100644 --- a/projects/demo/src/modules/components/avatar/examples/import/import-module.md +++ b/projects/demo/src/modules/components/avatar/examples/import/import-module.md @@ -1,13 +1,14 @@ ```ts import {NgModule} from '@angular/core'; -import {TuiAvatarModule} from '@taiga-ui/kit'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; // ... -@NgModule({ +@Component({ + standalone: true, imports: [ // ... - TuiAvatarModule, + TuiAvatarComponent, ], }) -export class MyModule {} +export class MyComponent {} ``` diff --git a/projects/demo/src/modules/components/avatar/examples/import/insert-template.md b/projects/demo/src/modules/components/avatar/examples/import/insert-template.md index a9f89e91ed0b2..02d2e7ed2b7da 100644 --- a/projects/demo/src/modules/components/avatar/examples/import/insert-template.md +++ b/projects/demo/src/modules/components/avatar/examples/import/insert-template.md @@ -1,3 +1,3 @@ ```html - +Batman ``` diff --git a/projects/demo/src/modules/components/badged-content/badged-content.module.ts b/projects/demo/src/modules/components/badged-content/badged-content.module.ts index c402647dc8fe9..cae900635b2d3 100644 --- a/projects/demo/src/modules/components/badged-content/badged-content.module.ts +++ b/projects/demo/src/modules/components/badged-content/badged-content.module.ts @@ -5,13 +5,13 @@ import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; import {TuiPlatformModule} from '@taiga-ui/cdk'; import {TuiNotificationModule} from '@taiga-ui/core'; import { - TuiAvatarModule, TuiBadgeNotificationModule, TuiButtonModule, TuiFallbackSrcModule, TuiIconModule, } from '@taiga-ui/experimental'; import { + TuiAvatarComponent, TuiBadgedContentComponent, TuiBadgeDirective, TuiInputModule, @@ -29,7 +29,7 @@ import {TuiBadgedContentExample3} from './examples/3'; TuiIconModule, TuiBadgeDirective, TuiBadgedContentComponent, - TuiAvatarModule, + TuiAvatarComponent, TuiFallbackSrcModule, TuiInputModule, TuiButtonModule, diff --git a/projects/demo/src/modules/components/block-status/block-status.module.ts b/projects/demo/src/modules/components/block-status/block-status.module.ts index 7422e9da57495..2bab17573d3c0 100644 --- a/projects/demo/src/modules/components/block-status/block-status.module.ts +++ b/projects/demo/src/modules/components/block-status/block-status.module.ts @@ -4,7 +4,8 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {RouterModule} from '@angular/router'; import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; import {TuiButtonModule, TuiLinkModule} from '@taiga-ui/core'; -import {TuiAvatarModule} from '@taiga-ui/kit'; +import {TuiAutoColorModule, TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; import {TuiBlockStatusModule} from '@taiga-ui/layout'; import {ExampleTuiBlockStatusComponent} from './block-status.component'; @@ -22,8 +23,10 @@ import {TuiBlockStatusExample4} from './examples/4'; ReactiveFormsModule, TuiAddonDocModule, TuiButtonModule, - TuiAvatarModule, + TuiAvatarComponent, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiBlockStatusComponent)), + TuiInitialsModule, + TuiAutoColorModule, ], declarations: [ ExampleTuiBlockStatusComponent, diff --git a/projects/demo/src/modules/components/block-status/examples/4/index.html b/projects/demo/src/modules/components/block-status/examples/4/index.html index a54b3765f1b57..3863cfee85a5e 100644 --- a/projects/demo/src/modules/components/block-status/examples/4/index.html +++ b/projects/demo/src/modules/components/block-status/examples/4/index.html @@ -10,10 +10,11 @@ + [round]="true" + [style.background]="user | tuiAutoColor" + > + {{ user | tuiInitials }} + You can put other content instead of image using diff --git a/projects/demo/src/modules/components/button/button.module.ts b/projects/demo/src/modules/components/button/button.module.ts index de759c7a22ec3..d2bca54399a93 100644 --- a/projects/demo/src/modules/components/button/button.module.ts +++ b/projects/demo/src/modules/components/button/button.module.ts @@ -14,7 +14,7 @@ import { TuiNotificationModule, TuiSvgModule, } from '@taiga-ui/core'; -import {TuiArrowModule, TuiAvatarModule, TuiToggleModule} from '@taiga-ui/kit'; +import {TuiArrowModule, TuiAvatarComponent, TuiToggleModule} from '@taiga-ui/kit'; import {InheritedDocumentationModule} from '../abstract/inherited-documentation/inherited-documentation.module'; import {ExampleTuiButtonComponent} from './button.component'; @@ -30,7 +30,7 @@ import {TuiButtonExample6} from './examples/6'; CommonModule, FormsModule, TuiThumbnailCardModule, - TuiAvatarModule, + TuiAvatarComponent, TuiSvgModule, TuiToggleModule, TuiFocusableModule, diff --git a/projects/demo/src/modules/components/button/examples/1/index.html b/projects/demo/src/modules/components/button/examples/1/index.html index e9381e9e274f7..4d68e9abc8fa3 100644 --- a/projects/demo/src/modules/components/button/examples/1/index.html +++ b/projects/demo/src/modules/components/button/examples/1/index.html @@ -1,8 +1,8 @@

button[tuiButton]

diff --git a/projects/demo/src/modules/components/checkbox-block/checkbox-block.module.ts b/projects/demo/src/modules/components/checkbox-block/checkbox-block.module.ts index a8144fcffeb7d..baa28fc773c52 100644 --- a/projects/demo/src/modules/components/checkbox-block/checkbox-block.module.ts +++ b/projects/demo/src/modules/components/checkbox-block/checkbox-block.module.ts @@ -4,7 +4,12 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {RouterModule} from '@angular/router'; import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; import {TuiButtonModule, TuiGroupModule, TuiTooltipModule} from '@taiga-ui/core'; -import {TuiAvatarModule, TuiCheckboxBlockModule, TuiRadioListModule} from '@taiga-ui/kit'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; +import { + TuiAvatarComponent, + TuiCheckboxBlockModule, + TuiRadioListModule, +} from '@taiga-ui/kit'; import {InheritedDocumentationModule} from '../abstract/inherited-documentation/inherited-documentation.module'; import {ExampleTuiCheckboxBlockComponent} from './checkbox-block.component'; @@ -22,11 +27,12 @@ import {TuiCheckboxBlockExample3} from './examples/3'; InheritedDocumentationModule, ReactiveFormsModule, CommonModule, - TuiAvatarModule, + TuiAvatarComponent, TuiRadioListModule, TuiButtonModule, TuiTooltipModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiCheckboxBlockComponent)), + TuiInitialsModule, ], declarations: [ TuiCheckboxBlockExample1, diff --git a/projects/demo/src/modules/components/checkbox-block/examples/3/index.html b/projects/demo/src/modules/components/checkbox-block/examples/3/index.html index 8224749701753..72d0ce7f34344 100644 --- a/projects/demo/src/modules/components/checkbox-block/examples/3/index.html +++ b/projects/demo/src/modules/components/checkbox-block/examples/3/index.html @@ -10,10 +10,11 @@
+ [round]="true" + > + {{ 'Heading' | tuiInitials }} + Heading
@@ -26,10 +27,11 @@
+ [round]="true" + > + {{ 'Placeholder' | tuiInitials }} +
Label
Placeholder diff --git a/projects/demo/src/modules/components/combo-box/combo-box.module.ts b/projects/demo/src/modules/components/combo-box/combo-box.module.ts index 1b2aeee3051ee..83f1e413898b5 100644 --- a/projects/demo/src/modules/components/combo-box/combo-box.module.ts +++ b/projects/demo/src/modules/components/combo-box/combo-box.module.ts @@ -21,8 +21,9 @@ import { TuiSvgModule, TuiTextfieldControllerModule, } from '@taiga-ui/core'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; import { - TuiAvatarModule, + TuiAvatarComponent, TuiComboBoxModule, TuiDataListWrapperModule, TuiFilterByInputPipeModule, @@ -52,7 +53,7 @@ import {TuiComboBoxExample8} from './examples/8'; TuiComboBoxModule, TuiButtonModule, TuiLinkModule, - TuiAvatarModule, + TuiAvatarComponent, TuiSvgModule, TuiDataListModule, TuiLoaderModule, @@ -69,6 +70,7 @@ import {TuiComboBoxExample8} from './examples/8'; InheritedDocumentationModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiComboBoxComponent)), TuiTextCodeModule, + TuiInitialsModule, ], declarations: [ ExampleTuiComboBoxComponent, diff --git a/projects/demo/src/modules/components/combo-box/examples/1/index.html b/projects/demo/src/modules/components/combo-box/examples/1/index.html index 7cd996495fa3c..4fc75fc881dad 100644 --- a/projects/demo/src/modules/components/combo-box/examples/1/index.html +++ b/projects/demo/src/modules/components/combo-box/examples/1/index.html @@ -63,11 +63,12 @@ >
+ [src]="data.avatarUrl" + > + {{ data.toString() | tuiInitials }} +
{{ data }}
diff --git a/projects/demo/src/modules/components/combo-box/examples/2/index.html b/projects/demo/src/modules/components/combo-box/examples/2/index.html index 28abfca7c87e6..6c2d4382f12e2 100644 --- a/projects/demo/src/modules/components/combo-box/examples/2/index.html +++ b/projects/demo/src/modules/components/combo-box/examples/2/index.html @@ -21,9 +21,10 @@ + [src]="item.avatarUrl" + > + {{ item.toString() | tuiInitials }} + {{ item }} @@ -37,9 +38,10 @@ + [src]="item.avatarUrl" + > + {{ item.toString() | tuiInitials }} + {{ item }} diff --git a/projects/demo/src/modules/components/input-phone/examples/3/index.html b/projects/demo/src/modules/components/input-phone/examples/3/index.html index 00ce62f5b54d2..0b48e9312dab8 100644 --- a/projects/demo/src/modules/components/input-phone/examples/3/index.html +++ b/projects/demo/src/modules/components/input-phone/examples/3/index.html @@ -19,9 +19,10 @@ + [src]="item.avatarUrl" + > + {{ item.firstName | tuiInitials }} + {{ item.firstName }} {{ item.lastName }} {{ item.phone }} @@ -34,9 +35,10 @@ + [round]="true" + [src]="user.avatarUrl" + > + {{ user.firstName | tuiInitials }} +

Value: {{ value }}

diff --git a/projects/demo/src/modules/components/input-phone/input-phone.module.ts b/projects/demo/src/modules/components/input-phone/input-phone.module.ts index b07e16b169a04..c816810f37016 100644 --- a/projects/demo/src/modules/components/input-phone/input-phone.module.ts +++ b/projects/demo/src/modules/components/input-phone/input-phone.module.ts @@ -14,7 +14,8 @@ import { TuiSvgModule, TuiTextfieldControllerModule, } from '@taiga-ui/core'; -import {TuiAvatarModule, TuiInputPhoneModule} from '@taiga-ui/kit'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent, TuiInputPhoneModule} from '@taiga-ui/kit'; import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus'; import {InheritedDocumentationModule} from '../abstract/inherited-documentation/inherited-documentation.module'; @@ -33,7 +34,7 @@ import {ExampleTuiInputPhoneComponent} from './input-phone.component'; TuiDataListModule, TuiButtonModule, TuiSvgModule, - TuiAvatarModule, + TuiAvatarComponent, TuiDropdownModule, TuiTextfieldControllerModule, TuiHintModule, @@ -43,6 +44,7 @@ import {ExampleTuiInputPhoneComponent} from './input-phone.component'; InheritedDocumentationModule, TuiAddonDocModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiInputPhoneComponent)), + TuiInitialsModule, ], declarations: [ ExampleTuiInputPhoneComponent, diff --git a/projects/demo/src/modules/components/input/examples/4/index.html b/projects/demo/src/modules/components/input/examples/4/index.html index aec4c4cc69bd2..fd22cc4cf3e21 100644 --- a/projects/demo/src/modules/components/input/examples/4/index.html +++ b/projects/demo/src/modules/components/input/examples/4/index.html @@ -23,9 +23,10 @@ {{ user }} + [src]="user.avatarUrl" + > + {{ user.toString() | tuiInitials }} + @@ -34,10 +35,11 @@ + [round]="true" + [src]="lastUser.avatarUrl" + > + {{ lastUser.toString() | tuiInitials }} + + [src]="item.avatarUrl" + > + {{ item.toString() | tuiInitials }} + {{ item }} diff --git a/projects/demo/src/modules/components/input/input.module.ts b/projects/demo/src/modules/components/input/input.module.ts index 3109565172755..9cc15c37a5b8d 100644 --- a/projects/demo/src/modules/components/input/input.module.ts +++ b/projects/demo/src/modules/components/input/input.module.ts @@ -24,8 +24,9 @@ import { TuiSvgModule, TuiTextfieldControllerModule, } from '@taiga-ui/core'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; import { - TuiAvatarModule, + TuiAvatarComponent, TuiDataListWrapperModule, TuiInputDateModule, TuiInputModule, @@ -72,7 +73,7 @@ import {ExampleTuiInputComponent} from './input.component'; TuiRadioListModule, TuiButtonModule, TuiInputCardModule, - TuiAvatarModule, + TuiAvatarComponent, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiHintModule, @@ -86,6 +87,7 @@ import {ExampleTuiInputComponent} from './input.component'; TuiTextCodeModule, MaskitoModule, TuiUnmaskHandlerModule, + TuiInitialsModule, ], declarations: [ ExampleTuiInputComponent, diff --git a/projects/demo/src/modules/components/multi-select/examples/2/index.html b/projects/demo/src/modules/components/multi-select/examples/2/index.html index 32d0e2a4ab738..a68e76d63656c 100644 --- a/projects/demo/src/modules/components/multi-select/examples/2/index.html +++ b/projects/demo/src/modules/components/multi-select/examples/2/index.html @@ -26,9 +26,10 @@ + [src]="data.avatarUrl" + > + {{ data.toString() | tuiInitials }} + {{ data }}
diff --git a/projects/demo/src/modules/components/multi-select/multi-select.module.ts b/projects/demo/src/modules/components/multi-select/multi-select.module.ts index 3a0650c65991f..e8af2fd5a4e9f 100644 --- a/projects/demo/src/modules/components/multi-select/multi-select.module.ts +++ b/projects/demo/src/modules/components/multi-select/multi-select.module.ts @@ -15,8 +15,9 @@ import { TuiScrollbarModule, TuiTextfieldControllerModule, } from '@taiga-ui/core'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; import { - TuiAvatarModule, + TuiAvatarComponent, TuiDataListWrapperModule, TuiMultiSelectModule, TuiRadioListModule, @@ -49,7 +50,7 @@ import {ExampleTuiMultiSelectComponent} from './multi-select.component'; TuiRadioListModule, TuiButtonModule, TuiLinkModule, - TuiAvatarModule, + TuiAvatarComponent, TuiDataListModule, TuiDataListWrapperModule, TuiLetModule, @@ -62,6 +63,7 @@ import {ExampleTuiMultiSelectComponent} from './multi-select.component'; TuiLabelModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiMultiSelectComponent)), PolymorpheusModule, + TuiInitialsModule, ], declarations: [ ExampleTuiMultiSelectComponent, diff --git a/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.module.ts b/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.module.ts index 958b2d42b1e67..153714f848f63 100644 --- a/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.module.ts +++ b/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.module.ts @@ -14,7 +14,8 @@ import { TuiTextfieldControllerModule, TuiWrapperModule, } from '@taiga-ui/core'; -import {TuiAvatarModule, TuiRadioListModule} from '@taiga-ui/kit'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent, TuiRadioListModule} from '@taiga-ui/kit'; import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus'; import {TuiCustomizationModule} from '../../app/customization/customization.module'; @@ -37,7 +38,7 @@ import {ExampleTuiPrimitiveTextfieldComponent} from './primitive-textfield.compo TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiNotificationModule, - TuiAvatarModule, + TuiAvatarComponent, TuiLinkModule, TuiSvgModule, TuiButtonModule, @@ -50,6 +51,7 @@ import {ExampleTuiPrimitiveTextfieldComponent} from './primitive-textfield.compo ThemesModule, TuiAddonDocModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiPrimitiveTextfieldComponent)), + TuiInitialsModule, ], declarations: [ ExampleTuiPrimitiveTextfieldComponent, diff --git a/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.template.html b/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.template.html index 85060cae8d7d9..b18c8a6b25ef6 100644 --- a/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.template.html +++ b/projects/demo/src/modules/components/primitive-textfield/primitive-textfield.template.html @@ -86,8 +86,9 @@ + > + {{ item | tuiInitials }} + {{ item }} diff --git a/projects/demo/src/modules/components/radio-block/examples/3/index.html b/projects/demo/src/modules/components/radio-block/examples/3/index.html index d79793e88005a..fc4dec2c2e564 100644 --- a/projects/demo/src/modules/components/radio-block/examples/3/index.html +++ b/projects/demo/src/modules/components/radio-block/examples/3/index.html @@ -11,10 +11,11 @@
+ [round]="true" + > + {{ 'Heading' | tuiInitials }} + Heading
@@ -28,10 +29,11 @@
+ [round]="true" + > + {{ 'Heading' | tuiInitials }} +
Label
Placeholder diff --git a/projects/demo/src/modules/components/radio-block/radio-block.module.ts b/projects/demo/src/modules/components/radio-block/radio-block.module.ts index b910fd5a5bd20..552adec8e0239 100644 --- a/projects/demo/src/modules/components/radio-block/radio-block.module.ts +++ b/projects/demo/src/modules/components/radio-block/radio-block.module.ts @@ -4,7 +4,8 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import {RouterModule} from '@angular/router'; import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; import {TuiButtonModule, TuiGroupModule, TuiTooltipModule} from '@taiga-ui/core'; -import {TuiAvatarModule, TuiRadioBlockModule, TuiRadioListModule} from '@taiga-ui/kit'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent, TuiRadioBlockModule, TuiRadioListModule} from '@taiga-ui/kit'; import {InheritedDocumentationModule} from '../abstract/inherited-documentation/inherited-documentation.module'; import {TuiRadioBlockExample1} from './examples/1'; @@ -19,7 +20,7 @@ import {ExampleTuiRadioBlockComponent} from './radio-block.component'; FormsModule, TuiRadioBlockModule, ReactiveFormsModule, - TuiAvatarModule, + TuiAvatarComponent, TuiRadioListModule, TuiButtonModule, TuiGroupModule, @@ -27,6 +28,7 @@ import {ExampleTuiRadioBlockComponent} from './radio-block.component'; InheritedDocumentationModule, TuiAddonDocModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiRadioBlockComponent)), + TuiInitialsModule, ], declarations: [ TuiRadioBlockExample1, diff --git a/projects/demo/src/modules/components/select/examples/6/index.html b/projects/demo/src/modules/components/select/examples/6/index.html index e96b7daa1bf16..b207891869f3e 100644 --- a/projects/demo/src/modules/components/select/examples/6/index.html +++ b/projects/demo/src/modules/components/select/examples/6/index.html @@ -21,9 +21,10 @@ + [src]="data.avatarUrl" + > + {{ data.toString() | tuiInitials }} +
{{ data }}
diff --git a/projects/demo/src/modules/components/select/select.module.ts b/projects/demo/src/modules/components/select/select.module.ts index a95330b0145b6..a18e06615d4de 100644 --- a/projects/demo/src/modules/components/select/select.module.ts +++ b/projects/demo/src/modules/components/select/select.module.ts @@ -19,8 +19,9 @@ import { TuiSvgModule, TuiTextfieldControllerModule, } from '@taiga-ui/core'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; import { - TuiAvatarModule, + TuiAvatarComponent, TuiDataListWrapperModule, TuiMarkerIconModule, TuiMultiSelectModule, @@ -61,7 +62,7 @@ import {ExampleTuiSelectComponent} from './select.component'; TuiButtonModule, TuiLinkModule, TuiMoneyModule, - TuiAvatarModule, + TuiAvatarComponent, TuiSvgModule, TuiDropdownModule, TuiTextfieldControllerModule, @@ -78,6 +79,7 @@ import {ExampleTuiSelectComponent} from './select.component'; TuiMarkerIconModule, TuiMapperPipeModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiSelectComponent)), + TuiInitialsModule, ], declarations: [ ExampleTuiSelectComponent, diff --git a/projects/demo/src/modules/components/sheet-dialog/examples/4/index.html b/projects/demo/src/modules/components/sheet-dialog/examples/4/index.html index 5f38b49d4c711..93d360cd21b08 100644 --- a/projects/demo/src/modules/components/sheet-dialog/examples/4/index.html +++ b/projects/demo/src/modules/components/sheet-dialog/examples/4/index.html @@ -30,11 +30,7 @@ class="item" (click)="toggle(false)" > - + {{ user | tuiInitials }} {{ user }}
diff --git a/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.module.ts b/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.module.ts index 99bba319c781f..6c2102be73002 100644 --- a/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.module.ts +++ b/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.module.ts @@ -12,7 +12,8 @@ import { TuiNotificationModule, TuiTextfieldControllerModule, } from '@taiga-ui/core'; -import {TuiAvatarModule, TuiInputModule} from '@taiga-ui/kit'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent, TuiInputModule} from '@taiga-ui/kit'; import {TuiSheetDialogExample1} from './examples/1'; import {TuiSheetDialogExample2} from './examples/2'; @@ -29,12 +30,13 @@ import {ExampleTuiSheetDialogComponent} from './sheet-dialog.component'; TuiButtonModule, TuiLabelModule, TuiMoneyModule, - TuiAvatarModule, + TuiAvatarComponent, TuiNotificationModule, TuiSheetDialogModule, TuiAddonDocModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiSheetDialogComponent)), TuiSwipeModule, + TuiInitialsModule, ], declarations: [ ExampleTuiSheetDialogComponent, diff --git a/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.template.html b/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.template.html index ed675a66b5208..28480b42d3e1e 100644 --- a/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.template.html +++ b/projects/demo/src/modules/components/sheet-dialog/sheet-dialog.template.html @@ -59,9 +59,10 @@
+ [round]="true" + > + {{ 'Karl Gambolputty' | tuiInitials }} +
diff --git a/projects/demo/src/modules/components/sheet/sheet.module.ts b/projects/demo/src/modules/components/sheet/sheet.module.ts index 275b77e6efa75..09d9457eb5e61 100644 --- a/projects/demo/src/modules/components/sheet/sheet.module.ts +++ b/projects/demo/src/modules/components/sheet/sheet.module.ts @@ -11,7 +11,8 @@ import { TuiLinkModule, TuiNotificationModule, } from '@taiga-ui/core'; -import {TuiAvatarModule} from '@taiga-ui/kit'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; import {TuiSheetExample1} from './examples/1'; import {TuiSheetExample2} from './examples/2'; @@ -27,7 +28,7 @@ import {ExampleTuiSheetComponent} from './sheet.component'; TuiButtonModule, TuiLabelModule, TuiMoneyModule, - TuiAvatarModule, + TuiAvatarComponent, TuiNotificationModule, TuiLinkModule, TuiElasticStickyModule, @@ -35,6 +36,7 @@ import {ExampleTuiSheetComponent} from './sheet.component'; IntersectionObserverModule, TuiAddonDocModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiSheetComponent)), + TuiInitialsModule, ], declarations: [ ExampleTuiSheetComponent, diff --git a/projects/demo/src/modules/components/sheet/sheet.template.html b/projects/demo/src/modules/components/sheet/sheet.template.html index 8b88ab2eecf12..7e0cd5d1a5e3e 100644 --- a/projects/demo/src/modules/components/sheet/sheet.template.html +++ b/projects/demo/src/modules/components/sheet/sheet.template.html @@ -104,9 +104,10 @@
+ [round]="true" + > + {{ 'Karl Gambolputty' | tuiInitials }} +

Karl Gambolputty

diff --git a/projects/demo/src/modules/components/tooltip/examples/2/index.html b/projects/demo/src/modules/components/tooltip/examples/2/index.html index 833ddb7f90b6f..2919c2a1776e6 100644 --- a/projects/demo/src/modules/components/tooltip/examples/2/index.html +++ b/projects/demo/src/modules/components/tooltip/examples/2/index.html @@ -12,13 +12,14 @@ +> + ❤ +
What is diff --git a/projects/demo/src/modules/components/tooltip/tooltip.module.ts b/projects/demo/src/modules/components/tooltip/tooltip.module.ts index 53e06c0f851fb..4a65df9c43c9b 100644 --- a/projects/demo/src/modules/components/tooltip/tooltip.module.ts +++ b/projects/demo/src/modules/components/tooltip/tooltip.module.ts @@ -11,7 +11,8 @@ import { TuiTextfieldControllerModule, TuiTooltipModule, } from '@taiga-ui/core'; -import {TuiAvatarModule, TuiInputModule} from '@taiga-ui/kit'; +import {TuiAutoColorModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent, TuiInputModule} from '@taiga-ui/kit'; import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus'; import {TuiTooltipExample1} from './examples/1'; @@ -25,7 +26,7 @@ import {ExampleTuiTooltipComponent} from './tooltip.component'; TuiTooltipModule, TuiHintModule, TuiLinkModule, - TuiAvatarModule, + TuiAvatarComponent, TuiLoaderModule, TuiInputModule, PolymorpheusModule, @@ -35,6 +36,7 @@ import {ExampleTuiTooltipComponent} from './tooltip.component'; FormsModule, TuiTextfieldControllerModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiTooltipComponent)), + TuiAutoColorModule, ], declarations: [ ExampleTuiTooltipComponent, diff --git a/projects/demo/src/modules/customization/dialogs/dialogs.module.ts b/projects/demo/src/modules/customization/dialogs/dialogs.module.ts index 01324546dd144..bad9238e703d2 100644 --- a/projects/demo/src/modules/customization/dialogs/dialogs.module.ts +++ b/projects/demo/src/modules/customization/dialogs/dialogs.module.ts @@ -3,7 +3,7 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; import {TuiButtonModule} from '@taiga-ui/core'; -import {TuiAvatarModule} from '@taiga-ui/kit'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; import {DialogsComponent} from './dialogs.component'; import {TuiDialogsExample1} from './examples/1'; @@ -14,7 +14,7 @@ import {PromptModule} from './examples/1/prompt/prompt.module'; CommonModule, PromptModule, TuiButtonModule, - TuiAvatarModule, + TuiAvatarComponent, TuiAddonDocModule, RouterModule.forChild(tuiGenerateRoutes(DialogsComponent)), ], diff --git a/projects/demo/src/modules/customization/dialogs/examples/1/index.html b/projects/demo/src/modules/customization/dialogs/examples/1/index.html index c4bb5ea5fc40a..ffc7b7025c867 100644 --- a/projects/demo/src/modules/customization/dialogs/examples/1/index.html +++ b/projects/demo/src/modules/customization/dialogs/examples/1/index.html @@ -8,10 +8,10 @@
«Choose wisely»
@@ -19,9 +19,9 @@
«You chose poorly»
@@ -30,9 +30,9 @@
«You have chosen wisely»
diff --git a/projects/demo/src/modules/customization/portals/portals.module.ts b/projects/demo/src/modules/customization/portals/portals.module.ts index 716787e66671c..efa0107942a90 100644 --- a/projects/demo/src/modules/customization/portals/portals.module.ts +++ b/projects/demo/src/modules/customization/portals/portals.module.ts @@ -3,7 +3,7 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; import {TuiButtonModule, TuiSvgModule} from '@taiga-ui/core'; -import {TuiAvatarModule} from '@taiga-ui/kit'; +import {TuiAvatarComponent} from '@taiga-ui/kit'; import {TuiPortalsExample1} from './examples/1'; import {CustomHostModule} from './examples/1/portal/custom-host.module'; @@ -14,7 +14,7 @@ import {PortalsComponent} from './portals.component'; CommonModule, CustomHostModule, TuiButtonModule, - TuiAvatarModule, + TuiAvatarComponent, TuiAddonDocModule, TuiSvgModule, RouterModule.forChild(tuiGenerateRoutes(PortalsComponent)), diff --git a/projects/demo/src/modules/directives/dropdown-selection/dropdown-selection.module.ts b/projects/demo/src/modules/directives/dropdown-selection/dropdown-selection.module.ts index c17db17fb0a19..fce97c3f46339 100644 --- a/projects/demo/src/modules/directives/dropdown-selection/dropdown-selection.module.ts +++ b/projects/demo/src/modules/directives/dropdown-selection/dropdown-selection.module.ts @@ -4,7 +4,8 @@ import {FormsModule} from '@angular/forms'; import {RouterModule} from '@angular/router'; import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc'; import {TuiButtonModule, TuiDataListModule, TuiDropdownModule} from '@taiga-ui/core'; -import {TuiAvatarModule, TuiTextareaModule} from '@taiga-ui/kit'; +import {TuiInitialsModule} from '@taiga-ui/experimental'; +import {TuiAvatarComponent, TuiTextareaModule} from '@taiga-ui/kit'; import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus'; import {DropdownDocumentationModule} from '../../components/abstract/dropdown-documentation/dropdown-documentation.module'; @@ -20,11 +21,12 @@ import {TuiDropdownSelectionExample2} from './examples/2'; TuiDropdownModule, TuiButtonModule, TuiTextareaModule, - TuiAvatarModule, + TuiAvatarComponent, TuiDataListModule, TuiAddonDocModule, RouterModule.forChild(tuiGenerateRoutes(ExampleTuiDropdownSelectionComponent)), DropdownDocumentationModule, + TuiInitialsModule, ], declarations: [ ExampleTuiDropdownSelectionComponent, diff --git a/projects/demo/src/modules/directives/dropdown-selection/examples/2/index.html b/projects/demo/src/modules/directives/dropdown-selection/examples/2/index.html index 7329bdfbcc38e..160ac20eeb3a3 100644 --- a/projects/demo/src/modules/directives/dropdown-selection/examples/2/index.html +++ b/projects/demo/src/modules/directives/dropdown-selection/examples/2/index.html @@ -24,10 +24,11 @@ {{ item.name }} + [round]="true" + [src]="item.avatar" + > + {{ item.name | tuiInitials }} +
diff --git a/projects/demo/src/modules/directives/dropdown/dropdown.module.ts b/projects/demo/src/modules/directives/dropdown/dropdown.module.ts index 6e4fc34f0e0a7..48f2e67af1f51 100644 --- a/projects/demo/src/modules/directives/dropdown/dropdown.module.ts +++ b/projects/demo/src/modules/directives/dropdown/dropdown.module.ts @@ -11,7 +11,7 @@ import { TuiNotificationModule, } from '@taiga-ui/core'; import { - TuiAvatarModule, + TuiAvatarComponent, TuiInputModule, TuiSelectModule, TuiToggleModule, @@ -31,7 +31,7 @@ import {TuiDropdownExample4} from './examples/4'; FormsModule, PolymorpheusModule, TuiLinkModule, - TuiAvatarModule, + TuiAvatarComponent, TuiButtonModule, TuiDropdownModule, TuiSelectModule, diff --git a/projects/demo/src/modules/directives/dropdown/examples/2/index.html b/projects/demo/src/modules/directives/dropdown/examples/2/index.html index 28e4fea8508e2..cce1a6a67126a 100644 --- a/projects/demo/src/modules/directives/dropdown/examples/2/index.html +++ b/projects/demo/src/modules/directives/dropdown/examples/2/index.html @@ -30,8 +30,8 @@