@wizishop/angular-components 0.0.52 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular-components.scss +3687 -3625
- package/bundles/wizishop-angular-components.umd.js +24 -5
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/button/button.component.js +15 -2
- package/fesm2015/wizishop-angular-components.js +14 -1
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/button/button.component.d.ts +6 -0
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.53.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.52.tgz +0 -0
|
@@ -230,10 +230,16 @@
|
|
|
230
230
|
r[k] = a[j];
|
|
231
231
|
return r;
|
|
232
232
|
}
|
|
233
|
-
function __spreadArray(to, from) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
233
|
+
function __spreadArray(to, from, pack) {
|
|
234
|
+
if (pack || arguments.length === 2)
|
|
235
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
236
|
+
if (ar || !(i in from)) {
|
|
237
|
+
if (!ar)
|
|
238
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
239
|
+
ar[i] = from[i];
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
237
243
|
}
|
|
238
244
|
function __await(v) {
|
|
239
245
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -909,9 +915,13 @@
|
|
|
909
915
|
this.disabled = false;
|
|
910
916
|
this.whiteSpaceNowrap = false;
|
|
911
917
|
this.opacity = false;
|
|
918
|
+
this.animation = false;
|
|
919
|
+
this.animationRight = false;
|
|
920
|
+
this.animationText = '';
|
|
912
921
|
this.click = new i0.EventEmitter();
|
|
913
922
|
this.isLoading = false;
|
|
914
923
|
this.interval = null;
|
|
924
|
+
this.buttonMaxWidth = '0px';
|
|
915
925
|
this.currentLoading = 0;
|
|
916
926
|
}
|
|
917
927
|
ButtonComponent.prototype.launchLoading = function () {
|
|
@@ -934,6 +944,12 @@
|
|
|
934
944
|
}
|
|
935
945
|
}, 200);
|
|
936
946
|
};
|
|
947
|
+
ButtonComponent.prototype.addMaxWidth = function (size) {
|
|
948
|
+
this.buttonMaxWidth = size + 'px';
|
|
949
|
+
};
|
|
950
|
+
ButtonComponent.prototype.resetMaxWidth = function () {
|
|
951
|
+
this.buttonMaxWidth = '0px';
|
|
952
|
+
};
|
|
937
953
|
ButtonComponent.prototype.onButtonClick = function (event) {
|
|
938
954
|
event.stopPropagation();
|
|
939
955
|
if (!this.disabled) {
|
|
@@ -948,7 +964,7 @@
|
|
|
948
964
|
ButtonComponent.decorators = [
|
|
949
965
|
{ type: i0.Component, args: [{
|
|
950
966
|
selector: 'wac-button',
|
|
951
|
-
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)\"\n [ngClass]=\"[label === '' ? 'alone' : '', isLoading ? 'is-loading' : '', opacity ? 'opacity' : '', disabled ? 'disabled' : '', widthAuto ? 'width-auto' : '', whiteSpaceNowrap ? 'white-space-no-wrap' : '']\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n </span>\n</a>\n"
|
|
967
|
+
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)\"\n (mouseleave)=\"animation ? resetMaxWidth() : ''\"\n (mouseenter)=\"animation ? addMaxWidth(animationText.length * 7 + 30) : ''\"\n [ngClass]=\"[label === '' ? 'alone' : '',animationRight ? 'animation-right' : '', animation ? 'animationText' : '', isLoading ? 'is-loading' : '', opacity ? 'opacity' : '', disabled ? 'disabled' : '', widthAuto ? 'width-auto' : '', whiteSpaceNowrap ? 'white-space-no-wrap' : '']\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"animationText.length * 7 + 30 + 'px'\" *ngIf=\"animation && !label\">\n <span class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n\n </span>\n</a>\n"
|
|
952
968
|
},] }
|
|
953
969
|
];
|
|
954
970
|
ButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -963,6 +979,9 @@
|
|
|
963
979
|
disabled: [{ type: i0.Input }],
|
|
964
980
|
whiteSpaceNowrap: [{ type: i0.Input }],
|
|
965
981
|
opacity: [{ type: i0.Input }],
|
|
982
|
+
animation: [{ type: i0.Input }],
|
|
983
|
+
animationRight: [{ type: i0.Input }],
|
|
984
|
+
animationText: [{ type: i0.Input }],
|
|
966
985
|
click: [{ type: i0.Output }]
|
|
967
986
|
};
|
|
968
987
|
|