ng-cw-v12
Version:
Angular UI Component Library
99 lines (90 loc) • 5.98 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ng-cw-v12/animated-shiny-text', ['exports', '@angular/core', '@angular/common'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["ng-cw-v12"] = global["ng-cw-v12"] || {}, global["ng-cw-v12"]["animated-shiny-text"] = {}), global.ng.core, global.ng.common));
})(this, (function (exports, i0, common) { 'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
var AnimatedShinyTextComponent = /** @class */ (function () {
function AnimatedShinyTextComponent() {
/** 文本内容 */
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;
}
return AnimatedShinyTextComponent;
}());
AnimatedShinyTextComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AnimatedShinyTextComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
AnimatedShinyTextComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: AnimatedShinyTextComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'nc-animated-shiny-text',
templateUrl: './animated-shiny-text.component.html',
styleUrls: ['./animated-shiny-text.component.less'],
}]
}], propDecorators: { ncText: [{
type: i0.Input
}], ncShimmerWidth: [{
type: i0.Input
}], ncTextColor: [{
type: i0.Input
}], ncShinyColor: [{
type: i0.Input
}], ncDuration: [{
type: i0.Input
}] } });
var NcAnimatedShinyTextModule = /** @class */ (function () {
function NcAnimatedShinyTextModule() {
}
return NcAnimatedShinyTextModule;
}());
NcAnimatedShinyTextModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcAnimatedShinyTextModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
NcAnimatedShinyTextModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcAnimatedShinyTextModule, declarations: [AnimatedShinyTextComponent], imports: [common.CommonModule], exports: [AnimatedShinyTextComponent] });
NcAnimatedShinyTextModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcAnimatedShinyTextModule, imports: [[
common.CommonModule
]] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcAnimatedShinyTextModule, decorators: [{
type: i0.NgModule,
args: [{
declarations: [
AnimatedShinyTextComponent
],
imports: [
common.CommonModule
],
exports: [
AnimatedShinyTextComponent
]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
exports.AnimatedShinyTextComponent = AnimatedShinyTextComponent;
exports.NcAnimatedShinyTextModule = NcAnimatedShinyTextModule;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=ng-cw-v12-animated-shiny-text.umd.js.map