ng-cw-v12
Version:
Angular UI Component Library
68 lines (63 loc) • 4.05 kB
JavaScript
import * as i0 from '@angular/core';
import { Component, Input, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
class AnimatedShinyTextComponent {
constructor() {
/** 文本内容 */
this.ncText = '';
/** 闪光条宽度 */
this.ncShimmerWidth = 100;
/** 文本颜色 */
this.ncTextColor = 'rgba(82, 82, 82, 0.7)';
/** 闪光颜色 */
this.ncShinyColor = 'rgba(0, 0, 0, 0.8)';
/** 动画时长,单位ms */
this.ncDuration = 8000;
}
}
AnimatedShinyTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: AnimatedShinyTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
AnimatedShinyTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: AnimatedShinyTextComponent, selector: "nc-animated-shiny-text", inputs: { ncText: "ncText", ncShimmerWidth: "ncShimmerWidth", ncTextColor: "ncTextColor", ncShinyColor: "ncShinyColor", ncDuration: "ncDuration" }, ngImport: i0, template: "<span class=\"nc-animated-shiny-text\"\r\n style=\"--shiny-width: {{ncShimmerWidth}}px; --text-color: {{ncTextColor}}; --shiny-color: {{ncShinyColor}}; --animation-duration: {{ncDuration}}ms;\">\r\n {{ncText}}\r\n</span>", styles: [".nc-animated-shiny-text{background-clip:text;-webkit-background-clip:text;background-repeat:no-repeat;background-position:0 0;background-size:var(--shiny-width) 100%;color:var(--text-color);background-image:linear-gradient(to right,transparent,var(--shiny-color) 50%,transparent);animation:shiny-text var(--animation-duration) cubic-bezier(0,0,.2,1) infinite}@keyframes shiny-text{0%,90%,to{background-position:calc(-100% - var(--shiny-width)) 0}30%,60%{background-position:calc(100% + var(--shiny-width)) 0}}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: AnimatedShinyTextComponent, decorators: [{
type: Component,
args: [{
selector: 'nc-animated-shiny-text',
templateUrl: './animated-shiny-text.component.html',
styleUrls: ['./animated-shiny-text.component.less'],
}]
}], propDecorators: { ncText: [{
type: Input
}], ncShimmerWidth: [{
type: Input
}], ncTextColor: [{
type: Input
}], ncShinyColor: [{
type: Input
}], ncDuration: [{
type: Input
}] } });
class NcAnimatedShinyTextModule {
}
NcAnimatedShinyTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: NcAnimatedShinyTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NcAnimatedShinyTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: NcAnimatedShinyTextModule, declarations: [AnimatedShinyTextComponent], imports: [CommonModule], exports: [AnimatedShinyTextComponent] });
NcAnimatedShinyTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: NcAnimatedShinyTextModule, imports: [[
CommonModule
]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0, type: NcAnimatedShinyTextModule, decorators: [{
type: NgModule,
args: [{
declarations: [
AnimatedShinyTextComponent
],
imports: [
CommonModule
],
exports: [
AnimatedShinyTextComponent
]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { AnimatedShinyTextComponent, NcAnimatedShinyTextModule };
//# sourceMappingURL=ng-cw-v12-animated-shiny-text.js.map