@taiga-ui/kit
Version:
Taiga UI Angular main components kit
59 lines (54 loc) • 2.46 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';
var TuiArrowComponent = /** @class */ (function () {
function TuiArrowComponent(dropdown, textfieldSize) {
this.dropdown = dropdown;
this.textfieldSize = textfieldSize;
}
Object.defineProperty(TuiArrowComponent.prototype, "arrowIcon", {
get: function () {
return sizeBigger(this.textfieldSize.size)
? 'tuiIconChevronDownLarge'
: 'tuiIconChevronDown';
},
enumerable: true,
configurable: true
});
TuiArrowComponent.ctorParameters = function () { return [
{ 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);
return TuiArrowComponent;
}());
var TUI_ARROW = new PolymorpheusComponent(TuiArrowComponent);
var TuiArrowModule = /** @class */ (function () {
function TuiArrowModule() {
}
TuiArrowModule = __decorate([
NgModule({
imports: [CommonModule, TuiSvgModule],
declarations: [TuiArrowComponent],
exports: [TuiArrowComponent],
entryComponents: [TuiArrowComponent],
})
], TuiArrowModule);
return TuiArrowModule;
}());
/**
* Generated bundle index. Do not edit.
*/
export { TUI_ARROW, TuiArrowComponent, TuiArrowModule };
//# sourceMappingURL=taiga-ui-kit-components-arrow.js.map