From d265c64cb0f7a3eac12350bee5d0b4e87a0fad3a Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 27 Nov 2023 18:23:47 +0300 Subject: [PATCH] refactor(addon-doc): remove internal `TuiDocExampleCapitalizePipe` (#6102) Co-authored-by: taiga-family-bot --- .../components/example/example-capitalize.pipe.ts | 11 ----------- .../addon-doc/components/example/example.module.ts | 13 ++----------- .../addon-doc/components/example/example.style.less | 5 +++++ .../components/example/example.template.html | 4 ++-- projects/addon-doc/components/index.ts | 1 - .../markup/breakpoints/breakpoints.style.less | 4 ++++ .../markup/breakpoints/breakpoints.template.html | 3 ++- 7 files changed, 15 insertions(+), 26 deletions(-) delete mode 100644 projects/addon-doc/components/example/example-capitalize.pipe.ts diff --git a/projects/addon-doc/components/example/example-capitalize.pipe.ts b/projects/addon-doc/components/example/example-capitalize.pipe.ts deleted file mode 100644 index 1b2de0b5d14c..000000000000 --- a/projects/addon-doc/components/example/example-capitalize.pipe.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {Pipe, PipeTransform} from '@angular/core'; -import {tuiIsString} from '@taiga-ui/cdk'; -import {tuiCapitalizeFirstLetter} from '@taiga-ui/core'; -import {PolymorpheusContent} from '@tinkoff/ng-polymorpheus'; - -@Pipe({name: `tuiDocExampleCapitalize`}) -export class TuiDocExampleCapitalizePipe implements PipeTransform { - transform(content: PolymorpheusContent): PolymorpheusContent { - return tuiIsString(content) ? tuiCapitalizeFirstLetter(content) : content; - } -} diff --git a/projects/addon-doc/components/example/example.module.ts b/projects/addon-doc/components/example/example.module.ts index 545d9529f74e..e9bff70fa1ee 100644 --- a/projects/addon-doc/components/example/example.module.ts +++ b/projects/addon-doc/components/example/example.module.ts @@ -9,7 +9,6 @@ import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus'; import {TuiDocCodeModule} from '../code/code.module'; import {TuiDocCopyModule} from '../copy/copy.module'; import {TuiDocExampleComponent} from './example.component'; -import {TuiDocExampleCapitalizePipe} from './example-capitalize.pipe'; import {TuiDocExampleGetTabsPipe} from './example-get-tabs.pipe'; @NgModule({ @@ -24,15 +23,7 @@ import {TuiDocExampleGetTabsPipe} from './example-get-tabs.pipe'; TuiMapperPipeModule, TuiLoaderModule, ], - declarations: [ - TuiDocExampleComponent, - TuiDocExampleGetTabsPipe, - TuiDocExampleCapitalizePipe, - ], - exports: [ - TuiDocExampleComponent, - TuiDocExampleGetTabsPipe, - TuiDocExampleCapitalizePipe, - ], + declarations: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe], + exports: [TuiDocExampleComponent, TuiDocExampleGetTabsPipe], }) export class TuiDocExampleModule {} diff --git a/projects/addon-doc/components/example/example.style.less b/projects/addon-doc/components/example/example.style.less index f166294d3528..a6ba9314b8f2 100644 --- a/projects/addon-doc/components/example/example.style.less +++ b/projects/addon-doc/components/example/example.style.less @@ -26,6 +26,11 @@ margin: 0; } +.t-title:first-letter, +.t-description:first-letter { + text-transform: capitalize; +} + .t-example { position: relative; margin-top: 1.5rem; diff --git a/projects/addon-doc/components/example/example.template.html b/projects/addon-doc/components/example/example.template.html index 4e9b224f2aab..6cc9233e1a1b 100644 --- a/projects/addon-doc/components/example/example.template.html +++ b/projects/addon-doc/components/example/example.template.html @@ -3,7 +3,7 @@ class="t-title" >