@taiga-ui/kit
Version:
Taiga UI Angular main components kit
51 lines (46 loc) • 2.08 kB
JavaScript
import { __decorate, __param } from 'tslib';
import { Inject, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import { sizeBigger, TuiHostedDropdownComponent, TuiTextfieldSizeDirective, TUI_TEXTFIELD_SIZE, TuiSvgModule } from '@taiga-ui/core';
import { PolymorpheusComponent } from '@tinkoff/ng-polymorpheus';
import { CommonModule } from '@angular/common';
let TuiArrowComponent = class TuiArrowComponent {
constructor(dropdown, textfieldSize) {
this.dropdown = dropdown;
this.textfieldSize = textfieldSize;
}
get arrowIcon() {
return sizeBigger(this.textfieldSize.size)
? 'tuiIconChevronDownLarge'
: 'tuiIconChevronDown';
}
};
TuiArrowComponent.ctorParameters = () => [
{ type: TuiHostedDropdownComponent, decorators: [{ type: Inject, args: [TuiHostedDropdownComponent,] }] },
{ type: TuiTextfieldSizeDirective, decorators: [{ type: Inject, args: [TUI_TEXTFIELD_SIZE,] }] }
];
TuiArrowComponent = __decorate([
Component({
selector: 'tui-arrow',
template: "<tui-svg\n class=\"icon\"\n [class.icon_rotated]=\"dropdown.openChange | async\"\n [src]=\"arrowIcon\"\n></tui-svg>\n",
changeDetection: ChangeDetectionStrategy.OnPush,
styles: [".icon{transition-property:transform;transition-duration:.3s;transition-timing-function:ease-in-out;cursor:pointer}.icon_rotated{transform:rotate(180deg)}"]
}),
__param(0, Inject(TuiHostedDropdownComponent)),
__param(1, Inject(TUI_TEXTFIELD_SIZE))
], TuiArrowComponent);
const TUI_ARROW = new PolymorpheusComponent(TuiArrowComponent);
let TuiArrowModule = class TuiArrowModule {
};
TuiArrowModule = __decorate([
NgModule({
imports: [CommonModule, TuiSvgModule],
declarations: [TuiArrowComponent],
exports: [TuiArrowComponent],
entryComponents: [TuiArrowComponent],
})
], TuiArrowModule);
/**
* Generated bundle index. Do not edit.
*/
export { TUI_ARROW, TuiArrowComponent, TuiArrowModule };
//# sourceMappingURL=taiga-ui-kit-components-arrow.js.map