From ade706b13b8d4e41163cff64da6ae8bf573eff59 Mon Sep 17 00:00:00 2001 From: waterplea Date: Thu, 21 Dec 2023 13:16:04 +0400 Subject: [PATCH] feat(experimental): `Textfield` add new component --- .cspell.json | 3 ++- .../experimental/textfield/textfield.module.ts | 2 -- projects/experimental/components/index.ts | 1 - projects/experimental/components/label/index.ts | 2 -- .../experimental/components/label/ng-package.json | 5 ----- .../experimental/components/textfield/index.ts | 2 ++ .../{label => textfield}/label.component.ts | 0 .../{label => textfield}/label.directive.ts | 2 +- .../{label => textfield}/label.style.less | 0 .../{label => textfield}/label.template.html | 0 .../components/textfield/textfield.component.ts | 2 +- .../components/textfield/textfield.module.ts | 15 +++++++++++++-- 12 files changed, 19 insertions(+), 15 deletions(-) delete mode 100644 projects/experimental/components/label/index.ts delete mode 100644 projects/experimental/components/label/ng-package.json rename projects/experimental/components/{label => textfield}/label.component.ts (100%) rename projects/experimental/components/{label => textfield}/label.directive.ts (88%) rename projects/experimental/components/{label => textfield}/label.style.less (100%) rename projects/experimental/components/{label => textfield}/label.template.html (100%) diff --git a/.cspell.json b/.cspell.json index 2473a8e76b0b..9a0fbcb02712 100644 --- a/.cspell.json +++ b/.cspell.json @@ -36,7 +36,8 @@ "retrowave", "replicants", "tuiiconbutton", - "hitbox" + "hitbox", + "texfieldd" ], "ignoreRegExpList": ["\\(https?://.*?\\)", "\\/{1}.+\\/{1}", "\\%2F.+", "\\%2C.+", "\\ɵ.+", "\\ыва.+"], "overrides": [ diff --git a/projects/demo/src/modules/experimental/textfield/textfield.module.ts b/projects/demo/src/modules/experimental/textfield/textfield.module.ts index 66b63bb2c1ea..c8584675738c 100644 --- a/projects/demo/src/modules/experimental/textfield/textfield.module.ts +++ b/projects/demo/src/modules/experimental/textfield/textfield.module.ts @@ -10,7 +10,6 @@ import { } from '@taiga-ui/core'; import { TuiIconModule, - TuiLabelDirective, TuiTextfieldModule, TuiTooltipModule, } from '@taiga-ui/experimental'; @@ -23,7 +22,6 @@ import {ExampleTuiTextfieldComponent} from './textfield.component'; CommonModule, FormsModule, TuiTextfieldModule, - TuiLabelDirective, TuiTooltipModule, TuiNotificationModule, TuiPrimitiveTextfieldModule, diff --git a/projects/experimental/components/index.ts b/projects/experimental/components/index.ts index df2492eea082..f20c65dfaa3d 100644 --- a/projects/experimental/components/index.ts +++ b/projects/experimental/components/index.ts @@ -8,7 +8,6 @@ export * from '@taiga-ui/experimental/components/checkbox'; export * from '@taiga-ui/experimental/components/chip'; export * from '@taiga-ui/experimental/components/compass'; export * from '@taiga-ui/experimental/components/icon'; -export * from '@taiga-ui/experimental/components/label'; export * from '@taiga-ui/experimental/components/pin'; export * from '@taiga-ui/experimental/components/radio'; export * from '@taiga-ui/experimental/components/rating'; diff --git a/projects/experimental/components/label/index.ts b/projects/experimental/components/label/index.ts deleted file mode 100644 index fc69af75fc46..000000000000 --- a/projects/experimental/components/label/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './label.component'; -export * from './label.directive'; diff --git a/projects/experimental/components/label/ng-package.json b/projects/experimental/components/label/ng-package.json deleted file mode 100644 index bebf62dcb5e5..000000000000 --- a/projects/experimental/components/label/ng-package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "lib": { - "entryFile": "index.ts" - } -} diff --git a/projects/experimental/components/textfield/index.ts b/projects/experimental/components/textfield/index.ts index ac0594302027..786a5b65f1a8 100644 --- a/projects/experimental/components/textfield/index.ts +++ b/projects/experimental/components/textfield/index.ts @@ -1,3 +1,5 @@ +export * from './label.component'; +export * from './label.directive'; export * from './textfield.component'; export * from './textfield.directive'; export * from './textfield.module'; diff --git a/projects/experimental/components/label/label.component.ts b/projects/experimental/components/textfield/label.component.ts similarity index 100% rename from projects/experimental/components/label/label.component.ts rename to projects/experimental/components/textfield/label.component.ts diff --git a/projects/experimental/components/label/label.directive.ts b/projects/experimental/components/textfield/label.directive.ts similarity index 88% rename from projects/experimental/components/label/label.directive.ts rename to projects/experimental/components/textfield/label.directive.ts index 4282317248d4..8236fcbe49b3 100644 --- a/projects/experimental/components/label/label.directive.ts +++ b/projects/experimental/components/textfield/label.directive.ts @@ -1,8 +1,8 @@ import {Directive, ElementRef, HostBinding, inject} from '@angular/core'; import {tuiWithStyles} from '@taiga-ui/cdk'; -import {TuiTextfieldComponent} from '@taiga-ui/experimental/components/textfield'; import {TuiLabelComponent} from './label.component'; +import {TuiTextfieldComponent} from './textfield.component'; @Directive({ standalone: true, diff --git a/projects/experimental/components/label/label.style.less b/projects/experimental/components/textfield/label.style.less similarity index 100% rename from projects/experimental/components/label/label.style.less rename to projects/experimental/components/textfield/label.style.less diff --git a/projects/experimental/components/label/label.template.html b/projects/experimental/components/textfield/label.template.html similarity index 100% rename from projects/experimental/components/label/label.template.html rename to projects/experimental/components/textfield/label.template.html diff --git a/projects/experimental/components/textfield/textfield.component.ts b/projects/experimental/components/textfield/textfield.component.ts index ff79b59e76a6..04ca8b923f46 100644 --- a/projects/experimental/components/textfield/textfield.component.ts +++ b/projects/experimental/components/textfield/textfield.component.ts @@ -16,11 +16,11 @@ import { } from '@taiga-ui/cdk'; import {TuiDropdownDirective, tuiDropdownOptionsProvider} from '@taiga-ui/core'; import {TuiButtonModule} from '@taiga-ui/experimental/components/button'; -import {TuiLabelDirective} from '@taiga-ui/experimental/components/label'; import {tuiAppearanceOptionsProvider} from '@taiga-ui/experimental/directives/appearance'; import {TuiIconsDirective} from '@taiga-ui/experimental/directives/icons'; import {PolymorpheusContent, PolymorpheusModule} from '@tinkoff/ng-polymorpheus'; +import {TuiLabelDirective} from './label.directive'; import {TuiTextfieldDirective} from './textfield.directive'; import {TUI_TEXTFIELD_OPTIONS, TuiTextfieldOptionsDirective} from './textfield.options'; diff --git a/projects/experimental/components/textfield/textfield.module.ts b/projects/experimental/components/textfield/textfield.module.ts index f46f57555393..d96ef857dc54 100644 --- a/projects/experimental/components/textfield/textfield.module.ts +++ b/projects/experimental/components/textfield/textfield.module.ts @@ -1,11 +1,22 @@ import {NgModule} from '@angular/core'; +import {TuiLabelDirective} from './label.directive'; import {TuiTextfieldComponent} from './textfield.component'; import {TuiTextfieldDirective} from './textfield.directive'; import {TuiTextfieldOptionsDirective} from './textfield.options'; @NgModule({ - imports: [TuiTextfieldComponent, TuiTextfieldDirective, TuiTextfieldOptionsDirective], - exports: [TuiTextfieldComponent, TuiTextfieldDirective, TuiTextfieldOptionsDirective], + imports: [ + TuiLabelDirective, + TuiTextfieldComponent, + TuiTextfieldDirective, + TuiTextfieldOptionsDirective, + ], + exports: [ + TuiLabelDirective, + TuiTextfieldComponent, + TuiTextfieldDirective, + TuiTextfieldOptionsDirective, + ], }) export class TuiTextfieldModule {}