From f9837ff2d2acc1b7c3cb40c8c603d1a68e1212ec Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Tue, 18 Jun 2024 16:54:55 +0300 Subject: [PATCH] refactor: rename `TuiScrollbarComponent` to `TuiScrollbar` (#7788) --- .../components/navigation/navigation.component.ts | 4 ++-- .../core/components/calendar/calendar.component.ts | 4 ++-- .../core/components/dialog/dialogs.component.ts | 9 +++------ projects/core/components/root/root.component.ts | 4 ++-- .../scrollbar/scroll-controls.component.ts | 6 +++--- .../components/scrollbar/scroll-ref.directive.ts | 2 +- .../components/scrollbar/scrollbar.component.ts | 14 +++++++------- .../core/directives/dropdown/dropdown.component.ts | 4 ++-- .../components/combo-box/examples/5/index.ts | 4 ++-- .../components/multi-select/examples/7/index.ts | 4 ++-- .../modules/components/pull-to-refresh/index.ts | 4 ++-- .../components/scrollbar/examples/1/index.ts | 4 ++-- .../components/scrollbar/examples/2/index.ts | 4 ++-- .../components/scrollbar/examples/3/index.ts | 6 +++--- .../components/scrollbar/examples/4/index.ts | 4 ++-- .../components/scrollbar/examples/5/index.ts | 4 ++-- .../components/scrollbar/examples/6/index.ts | 6 +++--- .../modules/components/select/examples/8/index.ts | 4 ++-- .../services/scroll-service/examples/1/index.ts | 4 ++-- .../modules/components/surface/examples/7/index.ts | 10 ++-------- .../modules/components/table/examples/3/index.ts | 4 ++-- .../modules/components/table/examples/5/index.ts | 5 ++--- .../modules/components/tabs/examples/7/index.ts | 4 ++-- .../directives/elastic-sticky/examples/1/index.ts | 4 ++-- .../modules/directives/fade/examples/1/index.ts | 4 ++-- .../modules/directives/fade/examples/3/index.ts | 4 ++-- .../components/navigation/navigation.module.ts | 9 ++------- .../calendar-month/calendar-month.component.ts | 4 ++-- .../components/input-tag/input-tag.component.ts | 4 ++-- .../components/input-tag/input-tag.module.ts | 4 ++-- .../components/input-year/input-year.module.ts | 4 ++-- projects/legacy/components/sheet/sheet.module.ts | 4 ++-- .../legacy/components/textarea/textarea.module.ts | 4 ++-- 33 files changed, 74 insertions(+), 89 deletions(-) diff --git a/projects/addon-doc/components/navigation/navigation.component.ts b/projects/addon-doc/components/navigation/navigation.component.ts index 88b8b46f9cce..cf9dc3bab819 100644 --- a/projects/addon-doc/components/navigation/navigation.component.ts +++ b/projects/addon-doc/components/navigation/navigation.component.ts @@ -32,7 +32,7 @@ import { TuiExpand, TuiIcon, TuiLink, - TuiScrollbarComponent, + TuiScrollbar, TuiTextfield, } from '@taiga-ui/core'; import {TuiAccordion} from '@taiga-ui/kit'; @@ -64,7 +64,7 @@ import { PolymorpheusOutlet, PolymorpheusTemplate, RouterLink, - TuiScrollbarComponent, + TuiScrollbar, TuiAccordion, NgTemplateOutlet, TuiLink, diff --git a/projects/core/components/calendar/calendar.component.ts b/projects/core/components/calendar/calendar.component.ts index 6c61330c465c..a2d4cb40dcfc 100644 --- a/projects/core/components/calendar/calendar.component.ts +++ b/projects/core/components/calendar/calendar.component.ts @@ -16,7 +16,7 @@ import { TuiMonth, tuiNullableSame, } from '@taiga-ui/cdk'; -import {TuiScrollbarComponent} from '@taiga-ui/core/components/scrollbar'; +import {TuiScrollbar} from '@taiga-ui/core/components/scrollbar'; import { TuiCalendarSheetComponent, @@ -30,7 +30,7 @@ import {TuiCalendarYearComponent} from './calendar-year.component'; selector: 'tui-calendar', imports: [ NgIf, - TuiScrollbarComponent, + TuiScrollbar, TuiCalendarYearComponent, TuiCalendarSpinComponent, TuiCalendarSheetComponent, diff --git a/projects/core/components/dialog/dialogs.component.ts b/projects/core/components/dialog/dialogs.component.ts index 99c6d7ad3744..ab63ab585b2a 100644 --- a/projects/core/components/dialog/dialogs.component.ts +++ b/projects/core/components/dialog/dialogs.component.ts @@ -3,10 +3,7 @@ import {ChangeDetectionStrategy, Component, inject} from '@angular/core'; import type {TuiPopover} from '@taiga-ui/cdk'; import {TuiFocusTrapDirective, tuiInjectElement} from '@taiga-ui/cdk'; import {tuiHost} from '@taiga-ui/core/animations'; -import { - TuiScrollControlsComponent, - TuiScrollRefDirective, -} from '@taiga-ui/core/components/scrollbar'; +import {TuiScrollControls, TuiScrollRef} from '@taiga-ui/core/components/scrollbar'; import {PolymorpheusOutlet, PolymorpheusTemplate} from '@taiga-ui/polymorpheus'; import type {Observable} from 'rxjs'; @@ -19,9 +16,9 @@ import {TUI_DIALOGS} from './dialog.tokens'; CommonModule, PolymorpheusOutlet, PolymorpheusTemplate, - TuiScrollRefDirective, - TuiScrollControlsComponent, TuiFocusTrapDirective, + TuiScrollControls, + TuiScrollRef, ], templateUrl: './dialogs.template.html', styleUrls: ['./dialogs.style.less'], diff --git a/projects/core/components/root/root.component.ts b/projects/core/components/root/root.component.ts index 9d3e0c6f0dc6..07ee95eb61ae 100644 --- a/projects/core/components/root/root.component.ts +++ b/projects/core/components/root/root.component.ts @@ -16,7 +16,7 @@ import { } from '@taiga-ui/cdk'; import {TuiAlertsComponent} from '@taiga-ui/core/components/alert'; import {TUI_DIALOGS, TuiDialogsComponent} from '@taiga-ui/core/components/dialog'; -import {TuiScrollControlsComponent} from '@taiga-ui/core/components/scrollbar'; +import {TuiScrollControls} from '@taiga-ui/core/components/scrollbar'; import {TuiDropdownsComponent} from '@taiga-ui/core/directives'; import {TuiHintsComponent} from '@taiga-ui/core/directives/hint'; import {TuiBreakpointService} from '@taiga-ui/core/services'; @@ -35,7 +35,7 @@ import {debounceTime, map, of} from 'rxjs'; TuiDialogsComponent, TuiAlertsComponent, TuiHintsComponent, - TuiScrollControlsComponent, + TuiScrollControls, ], templateUrl: './root.template.html', styleUrls: ['./root.style.less'], diff --git a/projects/core/components/scrollbar/scroll-controls.component.ts b/projects/core/components/scrollbar/scroll-controls.component.ts index 613a443d6f0e..e2e63774bb34 100644 --- a/projects/core/components/scrollbar/scroll-controls.component.ts +++ b/projects/core/components/scrollbar/scroll-controls.component.ts @@ -1,4 +1,4 @@ -import {CommonModule} from '@angular/common'; +import {AsyncPipe, NgIf} from '@angular/common'; import {ChangeDetectionStrategy, Component, inject, NgZone} from '@angular/core'; import {ANIMATION_FRAME} from '@ng-web-apis/common'; import {tuiZoneOptimized} from '@taiga-ui/cdk'; @@ -12,13 +12,13 @@ import {TuiScrollbarDirective} from './scrollbar.directive'; @Component({ standalone: true, selector: 'tui-scroll-controls', - imports: [CommonModule, TuiScrollbarDirective], + imports: [NgIf, AsyncPipe, TuiScrollbarDirective], templateUrl: './scroll-controls.template.html', styleUrls: ['./scroll-controls.style.less'], changeDetection: ChangeDetectionStrategy.OnPush, animations: [tuiFadeIn], }) -export class TuiScrollControlsComponent { +export class TuiScrollControls { private readonly scrollRef = inject(TUI_SCROLL_REF).nativeElement; protected readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED)); diff --git a/projects/core/components/scrollbar/scroll-ref.directive.ts b/projects/core/components/scrollbar/scroll-ref.directive.ts index e05b1c91be5f..6ca9972ac3ce 100644 --- a/projects/core/components/scrollbar/scroll-ref.directive.ts +++ b/projects/core/components/scrollbar/scroll-ref.directive.ts @@ -9,4 +9,4 @@ export const SCROLL_REF_SELECTOR = '[tuiScrollRef]'; selector: SCROLL_REF_SELECTOR, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], }) -export class TuiScrollRefDirective {} +export class TuiScrollRef {} diff --git a/projects/core/components/scrollbar/scrollbar.component.ts b/projects/core/components/scrollbar/scrollbar.component.ts index 9ed8a2fad294..c9ffb8f4e70a 100644 --- a/projects/core/components/scrollbar/scrollbar.component.ts +++ b/projects/core/components/scrollbar/scrollbar.component.ts @@ -10,15 +10,15 @@ import { import {TUI_IS_IOS, tuiGetElementOffset, tuiInjectElement} from '@taiga-ui/cdk'; import {TUI_SCROLL_REF} from '@taiga-ui/core/tokens'; -import {TuiScrollControlsComponent} from './scroll-controls.component'; +import {TuiScrollControls} from './scroll-controls.component'; /** - * An event for scrolling an element into view within {@link TuiScrollbarComponent}. + * An event for scrolling an element into view within {@link TuiScrollbar}. */ export const TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view'; /** - * An event to notify {@link TuiScrollbarComponent} that + * An event to notify {@link TuiScrollbar} that * it should control a nested element. */ export const TUI_SCROLLABLE = 'tui-scrollable'; @@ -26,19 +26,19 @@ export const TUI_SCROLLABLE = 'tui-scrollable'; @Component({ standalone: true, selector: 'tui-scrollbar', - imports: [NgIf, TuiScrollControlsComponent], + imports: [TuiScrollControls, NgIf], templateUrl: './scrollbar.template.html', styleUrls: ['./scrollbar.style.less'], - host: {'[class._native-hidden]': '!isIOS || hidden'}, changeDetection: ChangeDetectionStrategy.OnPush, providers: [ { provide: TUI_SCROLL_REF, - useFactory: () => inject(TuiScrollbarComponent).browserScrollRef, + useFactory: () => inject(TuiScrollbar).browserScrollRef, }, ], + host: {'[class._native-hidden]': '!isIOS || hidden'}, }) -export class TuiScrollbarComponent { +export class TuiScrollbar { private readonly el = tuiInjectElement(); protected readonly isIOS = inject(TUI_IS_IOS); diff --git a/projects/core/directives/dropdown/dropdown.component.ts b/projects/core/directives/dropdown/dropdown.component.ts index 04ae19a78a84..1b7503a6c23c 100644 --- a/projects/core/directives/dropdown/dropdown.component.ts +++ b/projects/core/directives/dropdown/dropdown.component.ts @@ -9,7 +9,7 @@ import { TuiRectAccessor, tuiRectAccessorFor, } from '@taiga-ui/core/classes'; -import {TuiScrollbarComponent} from '@taiga-ui/core/components/scrollbar'; +import {TuiScrollbar} from '@taiga-ui/core/components/scrollbar'; import {TuiPositionService, TuiVisualViewportService} from '@taiga-ui/core/services'; import {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens'; import {tuiToAnimationOptions} from '@taiga-ui/core/utils'; @@ -29,7 +29,7 @@ import {TuiDropdownPositionDirective} from './dropdown-position.directive'; @Component({ standalone: true, selector: 'tui-dropdown', - imports: [PolymorpheusOutlet, PolymorpheusTemplate, TuiScrollbarComponent], + imports: [PolymorpheusOutlet, PolymorpheusTemplate, TuiScrollbar], templateUrl: './dropdown.template.html', styleUrls: ['./dropdown.style.less'], // @bad TODO: OnPush diff --git a/projects/demo/src/modules/components/combo-box/examples/5/index.ts b/projects/demo/src/modules/components/combo-box/examples/5/index.ts index 11488f287bec..0f1f007132f5 100644 --- a/projects/demo/src/modules/components/combo-box/examples/5/index.ts +++ b/projects/demo/src/modules/components/combo-box/examples/5/index.ts @@ -4,7 +4,7 @@ import {FormsModule} from '@angular/forms'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; import {TuiLet} from '@taiga-ui/cdk'; -import {TuiDataList, TuiScrollableDirective} from '@taiga-ui/core'; +import {TuiDataList, TuiScrollbar} from '@taiga-ui/core'; import {TuiFilterByInputPipe} from '@taiga-ui/kit'; import {TuiComboBoxModule} from '@taiga-ui/legacy'; @@ -20,7 +20,7 @@ import {IndexChangeDirective} from './index-change.directive'; TuiDataList, TuiFilterByInputPipe, ScrollingModule, - TuiScrollableDirective, + TuiScrollbar, IndexChangeDirective, ], templateUrl: './index.html', diff --git a/projects/demo/src/modules/components/multi-select/examples/7/index.ts b/projects/demo/src/modules/components/multi-select/examples/7/index.ts index 749aa2df985b..2005a2155e85 100644 --- a/projects/demo/src/modules/components/multi-select/examples/7/index.ts +++ b/projects/demo/src/modules/components/multi-select/examples/7/index.ts @@ -11,7 +11,7 @@ import { TuiDataListComponent, TuiDataListDirective, TuiOptionComponent, - TuiScrollableDirective, + TuiScrollbar, } from '@taiga-ui/core'; import {TuiMultiSelectModule} from '@taiga-ui/legacy'; @@ -22,7 +22,7 @@ import {TuiMultiSelectModule} from '@taiga-ui/legacy'; FormsModule, CdkVirtualScrollViewport, TuiDataListDirective, - TuiScrollableDirective, + TuiScrollbar, CdkFixedSizeVirtualScroll, TuiDataListComponent, CdkVirtualForOf, diff --git a/projects/demo/src/modules/components/pull-to-refresh/index.ts b/projects/demo/src/modules/components/pull-to-refresh/index.ts index 0632fc5210bd..d3edcb0e932e 100644 --- a/projects/demo/src/modules/components/pull-to-refresh/index.ts +++ b/projects/demo/src/modules/components/pull-to-refresh/index.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {TuiDemo} from '@demo/utils'; -import {TuiNotificationComponent, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiNotificationComponent, TuiScrollbar} from '@taiga-ui/core'; import { PolymorpheusComponent, PolymorpheusOutlet, @@ -12,7 +12,7 @@ import { standalone: true, imports: [ TuiDemo, - TuiScrollbarComponent, + TuiScrollbar, TuiNotificationComponent, PolymorpheusOutlet, PolymorpheusTemplate, diff --git a/projects/demo/src/modules/components/scrollbar/examples/1/index.ts b/projects/demo/src/modules/components/scrollbar/examples/1/index.ts index 7141778d0b72..c86a09635566 100644 --- a/projects/demo/src/modules/components/scrollbar/examples/1/index.ts +++ b/projects/demo/src/modules/components/scrollbar/examples/1/index.ts @@ -1,11 +1,11 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; @Component({ standalone: true, - imports: [TuiScrollbarComponent], + imports: [TuiScrollbar], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/demo/src/modules/components/scrollbar/examples/2/index.ts b/projects/demo/src/modules/components/scrollbar/examples/2/index.ts index 7141778d0b72..c86a09635566 100644 --- a/projects/demo/src/modules/components/scrollbar/examples/2/index.ts +++ b/projects/demo/src/modules/components/scrollbar/examples/2/index.ts @@ -1,11 +1,11 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; @Component({ standalone: true, - imports: [TuiScrollbarComponent], + imports: [TuiScrollbar], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/demo/src/modules/components/scrollbar/examples/3/index.ts b/projects/demo/src/modules/components/scrollbar/examples/3/index.ts index 2c3ccf351a86..824af73865b4 100644 --- a/projects/demo/src/modules/components/scrollbar/examples/3/index.ts +++ b/projects/demo/src/modules/components/scrollbar/examples/3/index.ts @@ -1,20 +1,20 @@ import {Component, ElementRef, ViewChild} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiButton, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiButton, TuiScrollbar} from '@taiga-ui/core'; const SOME_OFFSET_CONST = 20; @Component({ standalone: true, - imports: [TuiButton, TuiScrollbarComponent], + imports: [TuiButton, TuiScrollbar], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, changeDetection, }) export default class Example { - @ViewChild(TuiScrollbarComponent, {read: ElementRef}) + @ViewChild(TuiScrollbar, {read: ElementRef}) private readonly scrollBar?: ElementRef; protected SOME_OFFSET_CONST = SOME_OFFSET_CONST; diff --git a/projects/demo/src/modules/components/scrollbar/examples/4/index.ts b/projects/demo/src/modules/components/scrollbar/examples/4/index.ts index 7141778d0b72..c86a09635566 100644 --- a/projects/demo/src/modules/components/scrollbar/examples/4/index.ts +++ b/projects/demo/src/modules/components/scrollbar/examples/4/index.ts @@ -1,11 +1,11 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; @Component({ standalone: true, - imports: [TuiScrollbarComponent], + imports: [TuiScrollbar], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/demo/src/modules/components/scrollbar/examples/5/index.ts b/projects/demo/src/modules/components/scrollbar/examples/5/index.ts index 7141778d0b72..c86a09635566 100644 --- a/projects/demo/src/modules/components/scrollbar/examples/5/index.ts +++ b/projects/demo/src/modules/components/scrollbar/examples/5/index.ts @@ -1,11 +1,11 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; @Component({ standalone: true, - imports: [TuiScrollbarComponent], + imports: [TuiScrollbar], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/demo/src/modules/components/scrollbar/examples/6/index.ts b/projects/demo/src/modules/components/scrollbar/examples/6/index.ts index a012bdeac7f5..60ed67568b07 100644 --- a/projects/demo/src/modules/components/scrollbar/examples/6/index.ts +++ b/projects/demo/src/modules/components/scrollbar/examples/6/index.ts @@ -6,16 +6,16 @@ import { import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollableDirective, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollableDirective, TuiScrollbar} from '@taiga-ui/core'; @Component({ standalone: true, imports: [ - TuiScrollbarComponent, - TuiScrollableDirective, CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf, + TuiScrollableDirective, + TuiScrollbar, ], templateUrl: './index.html', styleUrls: ['./index.less'], diff --git a/projects/demo/src/modules/components/select/examples/8/index.ts b/projects/demo/src/modules/components/select/examples/8/index.ts index f81f21d2be24..5930aa679f9a 100644 --- a/projects/demo/src/modules/components/select/examples/8/index.ts +++ b/projects/demo/src/modules/components/select/examples/8/index.ts @@ -11,7 +11,7 @@ import { TuiDataListComponent, TuiDataListDirective, TuiOptionComponent, - TuiScrollableDirective, + TuiScrollbar, } from '@taiga-ui/core'; import {TuiSelectModule} from '@taiga-ui/legacy'; @@ -22,7 +22,7 @@ import {TuiSelectModule} from '@taiga-ui/legacy'; FormsModule, CdkVirtualScrollViewport, TuiDataListDirective, - TuiScrollableDirective, + TuiScrollbar, CdkFixedSizeVirtualScroll, TuiDataListComponent, CdkVirtualForOf, diff --git a/projects/demo/src/modules/components/services/scroll-service/examples/1/index.ts b/projects/demo/src/modules/components/services/scroll-service/examples/1/index.ts index c1d1c386f751..43d65d37ab40 100644 --- a/projects/demo/src/modules/components/services/scroll-service/examples/1/index.ts +++ b/projects/demo/src/modules/components/services/scroll-service/examples/1/index.ts @@ -5,7 +5,7 @@ import {FormsModule} from '@angular/forms'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; import {TuiElementDirective, TuiScrollService} from '@taiga-ui/cdk'; -import {TuiButton, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiButton, TuiScrollbar} from '@taiga-ui/core'; import {TuiInputNumberModule} from '@taiga-ui/legacy'; @Component({ @@ -14,7 +14,7 @@ import {TuiInputNumberModule} from '@taiga-ui/legacy'; TuiInputNumberModule, FormsModule, TuiButton, - TuiScrollbarComponent, + TuiScrollbar, TuiElementDirective, ], templateUrl: './index.html', diff --git a/projects/demo/src/modules/components/surface/examples/7/index.ts b/projects/demo/src/modules/components/surface/examples/7/index.ts index 4d42b5f8756b..16951c2b6259 100644 --- a/projects/demo/src/modules/components/surface/examples/7/index.ts +++ b/projects/demo/src/modules/components/surface/examples/7/index.ts @@ -3,13 +3,7 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; import {TuiAmountPipe, TuiThumbnailCard} from '@taiga-ui/addon-commerce'; -import { - TuiButton, - TuiLink, - TuiScrollbarComponent, - TuiSurface, - TuiTitle, -} from '@taiga-ui/core'; +import {TuiButton, TuiLink, TuiScrollbar, TuiSurface, TuiTitle} from '@taiga-ui/core'; import {TuiAvatarComponent, TuiBadgeDirective} from '@taiga-ui/kit'; import {TuiCardLarge, TuiCell} from '@taiga-ui/layout'; @@ -26,7 +20,7 @@ import {TuiCardLarge, TuiCell} from '@taiga-ui/layout'; TuiCell, TuiCardLarge, CommonModule, - TuiScrollbarComponent, + TuiScrollbar, TuiTitle, ], templateUrl: './index.html', diff --git a/projects/demo/src/modules/components/table/examples/3/index.ts b/projects/demo/src/modules/components/table/examples/3/index.ts index 8a623424b45f..7d1e76395e3f 100644 --- a/projects/demo/src/modules/components/table/examples/3/index.ts +++ b/projects/demo/src/modules/components/table/examples/3/index.ts @@ -8,7 +8,7 @@ import {IntersectionObserverModule} from '@ng-web-apis/intersection-observer'; import type {TuiComparator} from '@taiga-ui/addon-table'; import {TuiTable} from '@taiga-ui/addon-table'; import {TuiDay, tuiDefaultSort, TuiLet, TuiValidatorDirective} from '@taiga-ui/cdk'; -import {TuiFormatNumberPipe, TuiIcon, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiFormatNumberPipe, TuiIcon, TuiScrollbar} from '@taiga-ui/core'; import {TuiDataListWrapper} from '@taiga-ui/kit'; import { TuiInputDateModule, @@ -40,7 +40,7 @@ interface Item { TuiSelectModule, NgForOf, TuiLet, - TuiScrollbarComponent, + TuiScrollbar, TuiFormatNumberPipe, AsyncPipe, TuiIcon, diff --git a/projects/demo/src/modules/components/table/examples/5/index.ts b/projects/demo/src/modules/components/table/examples/5/index.ts index 05f99b932635..32d32a9c8643 100644 --- a/projects/demo/src/modules/components/table/examples/5/index.ts +++ b/projects/demo/src/modules/components/table/examples/5/index.ts @@ -9,7 +9,7 @@ import {encapsulation} from '@demo/emulate/encapsulation'; import type {TuiComparator} from '@taiga-ui/addon-table'; import {TuiTable} from '@taiga-ui/addon-table'; import {TuiDay, tuiToInt} from '@taiga-ui/cdk'; -import {TuiScrollableDirective, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; interface User { readonly dob: TuiDay; @@ -63,10 +63,9 @@ function getAge({dob}: User): number { standalone: true, imports: [ TuiTable, - TuiScrollbarComponent, + TuiScrollbar, CdkFixedSizeVirtualScroll, CdkVirtualScrollViewport, - TuiScrollableDirective, CdkVirtualForOf, ], templateUrl: './index.html', diff --git a/projects/demo/src/modules/components/tabs/examples/7/index.ts b/projects/demo/src/modules/components/tabs/examples/7/index.ts index 8b999cbf768f..b1546d62d2e4 100644 --- a/projects/demo/src/modules/components/tabs/examples/7/index.ts +++ b/projects/demo/src/modules/components/tabs/examples/7/index.ts @@ -2,7 +2,7 @@ import {Component} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; import { TuiTabDirective, TuiTabsHorizontalDirective, @@ -17,7 +17,7 @@ import {TuiInputNumberModule} from '@taiga-ui/legacy'; TuiTabDirective, TuiInputNumberModule, FormsModule, - TuiScrollbarComponent, + TuiScrollbar, TuiTabsVerticalDirective, ], templateUrl: './index.html', diff --git a/projects/demo/src/modules/directives/elastic-sticky/examples/1/index.ts b/projects/demo/src/modules/directives/elastic-sticky/examples/1/index.ts index 9f10d81a9590..2a68407a6251 100644 --- a/projects/demo/src/modules/directives/elastic-sticky/examples/1/index.ts +++ b/projects/demo/src/modules/directives/elastic-sticky/examples/1/index.ts @@ -6,13 +6,13 @@ import {encapsulation} from '@demo/emulate/encapsulation'; import {TuiAmountPipe} from '@taiga-ui/addon-commerce'; import {TuiElasticStickyDirective} from '@taiga-ui/addon-mobile'; import {tuiClamp} from '@taiga-ui/cdk'; -import {TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; import type {Observable} from 'rxjs'; import {distinctUntilChanged, map, startWith} from 'rxjs'; @Component({ standalone: true, - imports: [TuiScrollbarComponent, TuiElasticStickyDirective, TuiAmountPipe, AsyncPipe], + imports: [TuiScrollbar, TuiElasticStickyDirective, TuiAmountPipe, AsyncPipe], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/demo/src/modules/directives/fade/examples/1/index.ts b/projects/demo/src/modules/directives/fade/examples/1/index.ts index 5e75d0961cc3..be442f4bcdd9 100644 --- a/projects/demo/src/modules/directives/fade/examples/1/index.ts +++ b/projects/demo/src/modules/directives/fade/examples/1/index.ts @@ -1,12 +1,12 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollableDirective, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; import {TuiFadeDirective} from '@taiga-ui/kit'; @Component({ standalone: true, - imports: [TuiScrollbarComponent, TuiFadeDirective, TuiScrollableDirective], + imports: [TuiScrollbar, TuiFadeDirective], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/demo/src/modules/directives/fade/examples/3/index.ts b/projects/demo/src/modules/directives/fade/examples/3/index.ts index 5e75d0961cc3..be442f4bcdd9 100644 --- a/projects/demo/src/modules/directives/fade/examples/3/index.ts +++ b/projects/demo/src/modules/directives/fade/examples/3/index.ts @@ -1,12 +1,12 @@ import {Component} from '@angular/core'; import {changeDetection} from '@demo/emulate/change-detection'; import {encapsulation} from '@demo/emulate/encapsulation'; -import {TuiScrollableDirective, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; import {TuiFadeDirective} from '@taiga-ui/kit'; @Component({ standalone: true, - imports: [TuiScrollbarComponent, TuiFadeDirective, TuiScrollableDirective], + imports: [TuiScrollbar, TuiFadeDirective], templateUrl: './index.html', styleUrls: ['./index.less'], encapsulation, diff --git a/projects/experimental/components/navigation/navigation.module.ts b/projects/experimental/components/navigation/navigation.module.ts index 037b032287ac..0856f556b14f 100644 --- a/projects/experimental/components/navigation/navigation.module.ts +++ b/projects/experimental/components/navigation/navigation.module.ts @@ -1,6 +1,6 @@ import {CommonModule} from '@angular/common'; import {NgModule} from '@angular/core'; -import {TuiScrollableDirective, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiScrollbar} from '@taiga-ui/core'; import {TuiFadeDirective} from '@taiga-ui/kit'; import {TuiAsideComponent} from './aside.component'; @@ -11,12 +11,7 @@ import {TuiMainComponent} from './main.component'; import {TuiNavComponent} from './nav.component'; @NgModule({ - imports: [ - CommonModule, - TuiScrollbarComponent, - TuiFadeDirective, - TuiScrollableDirective, - ], + imports: [CommonModule, TuiScrollbar, TuiFadeDirective], declarations: [ TuiHeaderComponent, TuiLogoComponent, diff --git a/projects/kit/components/calendar-month/calendar-month.component.ts b/projects/kit/components/calendar-month/calendar-month.component.ts index 819bc9a89f43..04cb39775557 100644 --- a/projects/kit/components/calendar-month/calendar-month.component.ts +++ b/projects/kit/components/calendar-month/calendar-month.component.ts @@ -26,7 +26,7 @@ import type {TuiRangeState} from '@taiga-ui/core'; import { TuiCalendarYearComponent, TuiLink, - TuiScrollbarComponent, + TuiScrollbar, TuiSpinButtonComponent, } from '@taiga-ui/core'; import {TUI_CALENDAR_MONTHS} from '@taiga-ui/kit/tokens'; @@ -42,7 +42,7 @@ const TODAY = TuiDay.currentLocal(); NgForOf, TuiCalendarYearComponent, TuiSpinButtonComponent, - TuiScrollbarComponent, + TuiScrollbar, TuiLink, TuiLet, TuiHoveredDirective, diff --git a/projects/legacy/components/input-tag/input-tag.component.ts b/projects/legacy/components/input-tag/input-tag.component.ts index 3de39d886bbe..b7455a983393 100644 --- a/projects/legacy/components/input-tag/input-tag.component.ts +++ b/projects/legacy/components/input-tag/input-tag.component.ts @@ -35,7 +35,7 @@ import { TuiDataListDirective, TuiDropdownOpenDirective, TuiHintOptionsDirective, - TuiScrollbarComponent, + TuiScrollbar, } from '@taiga-ui/core'; import type {TuiStringifiableItem} from '@taiga-ui/legacy/classes'; import {AbstractTuiMultipleControl, tuiAsControl} from '@taiga-ui/legacy/classes'; @@ -97,7 +97,7 @@ export class TuiInputTagComponent @ViewChild('cleaner', {read: ElementRef}) private readonly cleanerSvg?: ElementRef; - @ViewChild(TuiScrollbarComponent, {read: ElementRef}) + @ViewChild(TuiScrollbar, {read: ElementRef}) private readonly scrollBar?: ElementRef; private readonly el = tuiInjectElement(); diff --git a/projects/legacy/components/input-tag/input-tag.module.ts b/projects/legacy/components/input-tag/input-tag.module.ts index 42a22b190567..b433e6deb1d5 100644 --- a/projects/legacy/components/input-tag/input-tag.module.ts +++ b/projects/legacy/components/input-tag/input-tag.module.ts @@ -6,7 +6,7 @@ import { TuiAppearance, TuiDropdownModule, TuiIcon, - TuiScrollbarComponent, + TuiScrollbar, TuiTooltip, } from '@taiga-ui/core'; import {TuiTagModule} from '@taiga-ui/legacy/components/tag'; @@ -25,7 +25,7 @@ import {TuiInputTagComponent} from './input-tag.component'; PolymorpheusOutlet, PolymorpheusTemplate, TuiHoveredDirective, - TuiScrollbarComponent, + TuiScrollbar, TuiTooltip, TuiDropdownModule, TuiTagModule, diff --git a/projects/legacy/components/input-year/input-year.module.ts b/projects/legacy/components/input-year/input-year.module.ts index 2066fc5d554f..05350abb8f71 100644 --- a/projects/legacy/components/input-year/input-year.module.ts +++ b/projects/legacy/components/input-year/input-year.module.ts @@ -4,7 +4,7 @@ import { TuiCalendarYearComponent, TuiDropdownModule, TuiDropdownOpenDirective, - TuiScrollbarComponent, + TuiScrollbar, } from '@taiga-ui/core'; import { TuiPrimitiveTextfieldModule, @@ -21,7 +21,7 @@ import {TuiInputYearDirective} from './input-year.directive'; TuiDropdownModule, TuiDropdownOpenDirective, TuiPrimitiveTextfieldModule, - TuiScrollbarComponent, + TuiScrollbar, TuiCalendarYearComponent, TuiTextfieldControllerModule, ], diff --git a/projects/legacy/components/sheet/sheet.module.ts b/projects/legacy/components/sheet/sheet.module.ts index 83e43ee010da..1b1f63492e27 100644 --- a/projects/legacy/components/sheet/sheet.module.ts +++ b/projects/legacy/components/sheet/sheet.module.ts @@ -1,7 +1,7 @@ import {CommonModule} from '@angular/common'; import {NgModule, NO_ERRORS_SCHEMA} from '@angular/core'; import {TuiLet} from '@taiga-ui/cdk'; -import {TuiButton, TuiScrollbarComponent} from '@taiga-ui/core'; +import {TuiButton, TuiScrollbar} from '@taiga-ui/core'; import {PolymorpheusOutlet, PolymorpheusTemplate} from '@taiga-ui/polymorpheus'; import {TuiSheetComponent} from './components/sheet/sheet.component'; @@ -24,7 +24,7 @@ import {TuiSheetDirective} from './sheet.directive'; PolymorpheusTemplate, TuiLet, TuiButton, - TuiScrollbarComponent, + TuiScrollbar, ], declarations: [ TuiSheetsHostComponent, diff --git a/projects/legacy/components/textarea/textarea.module.ts b/projects/legacy/components/textarea/textarea.module.ts index da377380339a..b3ef830e99d1 100644 --- a/projects/legacy/components/textarea/textarea.module.ts +++ b/projects/legacy/components/textarea/textarea.module.ts @@ -1,7 +1,7 @@ import {CommonModule} from '@angular/common'; import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; -import {TuiAppearance, TuiIcon, TuiScrollbarComponent, TuiTooltip} from '@taiga-ui/core'; +import {TuiAppearance, TuiIcon, TuiScrollbar, TuiTooltip} from '@taiga-ui/core'; import { TuiPrimitiveTextfieldModule, TuiTextfieldComponent, @@ -16,7 +16,7 @@ import {TuiTextareaDirective} from './textarea.directive'; imports: [ CommonModule, FormsModule, - TuiScrollbarComponent, + TuiScrollbar, TuiTooltip, TuiWrapperModule, TuiPrimitiveTextfieldModule,