chore: update Taiga UI and remove unnecessary styles (#2200)

* chore: update Taiga UI and remove unnecessary styles

* update workflow and package lock

---------

Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
This commit is contained in:
Alex Inkin
2023-03-11 01:15:38 +08:00
committed by GitHub
parent f7793976fb
commit 181b44e117
14 changed files with 95 additions and 161 deletions

View File

@@ -1,3 +0,0 @@
<div class="wrapper" (elasticContainer)="height = $event">
<ng-content></ng-content>
</div>

View File

@@ -1,10 +0,0 @@
:host {
display: block;
overflow: hidden;
transition: height 0.25s;
}
.wrapper {
padding-top: 1px;
margin-top: -1px;
}

View File

@@ -1,12 +0,0 @@
import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core'
@Component({
selector: 'elastic-container',
templateUrl: './elastic-container.component.html',
styleUrls: ['./elastic-container.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ElasticContainerComponent {
@HostBinding('style.height.px')
height = NaN
}

View File

@@ -1,35 +0,0 @@
import { Directive, ElementRef, inject, Output } from '@angular/core'
import { ResizeObserverService } from '@ng-web-apis/resize-observer'
import {
MUTATION_OBSERVER_INIT,
MutationObserverService,
} from '@ng-web-apis/mutation-observer'
import { distinctUntilChanged, map, merge } from 'rxjs'
@Directive({
selector: '[elasticContainer]',
providers: [
ResizeObserverService,
MutationObserverService,
{
provide: MUTATION_OBSERVER_INIT,
useValue: {
childList: true,
characterData: true,
subtree: true,
},
},
],
})
export class ElasticContainerDirective {
private readonly elementRef = inject(ElementRef)
@Output()
readonly elasticContainer = merge(
inject(ResizeObserverService),
inject(MutationObserverService),
).pipe(
map(() => this.elementRef.nativeElement.clientHeight - 1), // Compensate for padding
distinctUntilChanged(),
)
}

View File

@@ -1,10 +0,0 @@
import { NgModule } from '@angular/core'
import { ElasticContainerComponent } from './elastic-container.component'
import { ElasticContainerDirective } from './elastic-container.directive'
@NgModule({
declarations: [ElasticContainerComponent, ElasticContainerDirective],
exports: [ElasticContainerComponent],
})
export class ElasticContainerModule {}

View File

@@ -9,9 +9,6 @@ export * from './components/alert/alert.component'
export * from './components/alert/alert.module'
export * from './components/alert/alert-button.directive'
export * from './components/alert/alert-input.directive'
export * from './components/elastic-container/elastic-container.component'
export * from './components/elastic-container/elastic-container.directive'
export * from './components/elastic-container/elastic-container.module'
export * from './components/markdown/markdown.component'
export * from './components/markdown/markdown.component.module'
export * from './components/text-spinner/text-spinner.component'