monkey-style-guide-v2 0.0.75 → 0.0.77

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.
@@ -1748,6 +1748,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1748
1748
  }]
1749
1749
  }], ctorParameters: () => [] });
1750
1750
 
1751
+ /* eslint-disable no-console */
1752
+ /** ************************
1753
+ * Copyright Monkey Exchange. All Rights Reserved
1754
+ * This style guide was developed by Monkey Exchange Team
1755
+ * MIT Licence
1756
+ ************************* */
1757
+ class MonkeyEcxFileCacheService {
1758
+ constructor() {
1759
+ this.cache = new Map();
1760
+ this.EXPIRATION_MS = 15 * 60 * 1000;
1761
+ }
1762
+ isExpired(timestamp) {
1763
+ return Date.now() - timestamp > this.EXPIRATION_MS;
1764
+ }
1765
+ saveFile(filename, blob) {
1766
+ this.cache.set(filename, { filename, blob, timestamp: Date.now() });
1767
+ }
1768
+ hasFile(filename) {
1769
+ const file = this.cache.get(filename);
1770
+ if (!file)
1771
+ return false;
1772
+ if (this.isExpired(file.timestamp)) {
1773
+ this.cache.delete(filename);
1774
+ return false;
1775
+ }
1776
+ return true;
1777
+ }
1778
+ getFile(filename) {
1779
+ const file = this.cache.get(filename);
1780
+ if (!file)
1781
+ return null;
1782
+ if (this.isExpired(file.timestamp)) {
1783
+ this.cache.delete(filename);
1784
+ return null;
1785
+ }
1786
+ return file;
1787
+ }
1788
+ download(filename) {
1789
+ const file = this.getFile(filename);
1790
+ if (!file)
1791
+ return;
1792
+ const url = URL.createObjectURL(file.blob);
1793
+ const a = document.createElement('a');
1794
+ a.href = url;
1795
+ a.download = file.filename;
1796
+ a.click();
1797
+ URL.revokeObjectURL(url);
1798
+ }
1799
+ deleteFile(filename) {
1800
+ this.cache.delete(filename);
1801
+ }
1802
+ clear() {
1803
+ this.cache.clear();
1804
+ }
1805
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyEcxFileCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1806
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyEcxFileCacheService, providedIn: 'root' }); }
1807
+ }
1808
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyEcxFileCacheService, decorators: [{
1809
+ type: Injectable,
1810
+ args: [{
1811
+ providedIn: 'root'
1812
+ }]
1813
+ }] });
1814
+
1751
1815
  /** ************************
1752
1816
  * Copyright Monkey Exchange. All Rights Reserved
1753
1817
  * This style guide was developed by Monkey Exchange Team
@@ -3211,7 +3275,7 @@ class MonkeyButtonComponent {
3211
3275
  return this.elementRef.nativeElement;
3212
3276
  }
3213
3277
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3214
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyButtonComponent, isStandalone: true, selector: "monkey-button", inputs: { disabled: "disabled", color: "color", size: "size", type: "type", loading: "loading", id: "id" }, host: { attributes: { "data-testid": "monkey-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-button {{ type }} {{ size }} {{ color }}\" [disabled]=\"disabled || loading\">\n <div class=\"content\">\n <ng-content *ngIf=\"!loading\" select=\"[first]\"></ng-content>\n <span><ng-content></ng-content></span>\n <ng-content *ngIf=\"!loading\" select=\"[last]\"></ng-content>\n @if (loading) {\n <util-icon class=\"mecx-button-loading\" name=\"loading\" />\n }\n </div>\n</button>\n", styles: ["monkey-button{display:inline-block}monkey-button .mecx-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-button .mecx-button .content{display:flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);padding:0px var(--mecx-spaces-small);flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-button .mecx-button .content span{width:100%}monkey-button .mecx-button .content .mk-i{display:flex}monkey-button .mecx-button.secondary{border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white)}monkey-button .mecx-button.secondary:disabled{border-width:1px}monkey-button .mecx-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-button .mecx-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-button .mecx-button .mecx-button-loading{display:flex;background:transparent}monkey-button .mecx-button .mecx-button-loading svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary.error{color:var(--mecx-color-white);background:var(--mecx-color-error-500)}monkey-button .mecx-button.primary.success{color:var(--mecx-color-white);background:var(--mecx-color-success-500)}monkey-button .mecx-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled).error{background:var(--mecx-color-error-600)}monkey-button .mecx-button.primary:hover:not(:disabled).success{background:var(--mecx-color-success-600)}monkey-button .mecx-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.secondary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.tertiary{background:unset}monkey-button .mecx-button.tertiary span{text-decoration:underline}monkey-button .mecx-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-button .mecx-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.tertiary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.sm{height:32px}monkey-button .mecx-button.sm .mk-i{font-size:20px}monkey-button .mecx-button.md{height:40px}monkey-button .mecx-button.md .mk-i{font-size:22px}monkey-button .mecx-button.lg{height:48px;text-align:center;font-size:16px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.48px}monkey-button .mecx-button.lg .mk-i{font-size:24px}monkey-button .mecx-button.full-width{width:100%}monkey-button .mecx-button:focus-visible{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-button .mecx-button:focus-visible.error{outline-color:var(--mecx-color-error-500)}monkey-button .mecx-button:focus-visible.success{outline-color:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled){opacity:.8;outline:none}monkey-button .mecx-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main)}monkey-button .mecx-button:active:not(:disabled).primary.error{background:var(--mecx-color-error-500)}monkey-button .mecx-button:active:not(:disabled).primary.success{background:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
3278
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyButtonComponent, isStandalone: true, selector: "monkey-button", inputs: { disabled: "disabled", color: "color", size: "size", type: "type", loading: "loading", id: "id" }, host: { attributes: { "data-testid": "monkey-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-button {{ type }} {{ size }} {{ color }}\" [disabled]=\"disabled || loading\">\n <div class=\"content\">\n <ng-content *ngIf=\"!loading\" select=\"[first]\"></ng-content>\n <span><ng-content></ng-content></span>\n <ng-content *ngIf=\"!loading\" select=\"[last]\"></ng-content>\n @if (loading) {\n <util-icon class=\"mecx-button-loading\" name=\"loading\" />\n }\n </div>\n</button>\n", styles: ["monkey-button{display:inline-block}monkey-button.has-progress button:disabled{position:relative;overflow:hidden;border:2px solid var(--mecx-color-gray-400)}monkey-button.has-progress button:disabled:before,monkey-button.has-progress button:disabled:after{content:\"\";position:absolute;inset:42px 0 0;width:100%;height:105px;left:calc(var(--mecx-button-progress) - 47%);background-color:var(--mecx-color-theme-300);border-radius:45% 47% 43% 46%;transform:translate(-50%,-70%) rotate(0);animation:rotate 6s linear infinite;z-index:1}monkey-button.has-progress button:disabled:after{border-radius:47% 60% 46% 44%;background-color:var(--mecx-color-theme-main);transform:translate(-50%,-70%) rotate(0);animation:rotate 7s linear -4s infinite;z-index:2}@keyframes rotate{50%{transform:translate(-50%,-73%) rotate(180deg)}to{transform:translate(-50%,-70%) rotate(360deg)}}monkey-button .mecx-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-button .mecx-button .content{display:flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);padding:0px var(--mecx-spaces-small);flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-button .mecx-button .content span{width:100%}monkey-button .mecx-button .content .mk-i{display:flex}monkey-button .mecx-button.secondary{border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white)}monkey-button .mecx-button.secondary:disabled{border-width:1px}monkey-button .mecx-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-button .mecx-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-button .mecx-button .mecx-button-loading{display:flex;background:transparent}monkey-button .mecx-button .mecx-button-loading svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary.error{color:var(--mecx-color-white);background:var(--mecx-color-error-500)}monkey-button .mecx-button.primary.success{color:var(--mecx-color-white);background:var(--mecx-color-success-500)}monkey-button .mecx-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled).error{background:var(--mecx-color-error-600)}monkey-button .mecx-button.primary:hover:not(:disabled).success{background:var(--mecx-color-success-600)}monkey-button .mecx-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.secondary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.tertiary{background:unset}monkey-button .mecx-button.tertiary span{text-decoration:underline}monkey-button .mecx-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-button .mecx-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.tertiary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.sm{height:32px}monkey-button .mecx-button.sm .mk-i{font-size:20px}monkey-button .mecx-button.md{height:40px}monkey-button .mecx-button.md .mk-i{font-size:22px}monkey-button .mecx-button.lg{height:48px;text-align:center;font-size:16px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.48px}monkey-button .mecx-button.lg .mk-i{font-size:24px}monkey-button .mecx-button.full-width{width:100%}monkey-button .mecx-button:focus-visible{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-button .mecx-button:focus-visible.error{outline-color:var(--mecx-color-error-500)}monkey-button .mecx-button:focus-visible.success{outline-color:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled){opacity:.8;outline:none}monkey-button .mecx-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main)}monkey-button .mecx-button:active:not(:disabled).primary.error{background:var(--mecx-color-error-500)}monkey-button .mecx-button:active:not(:disabled).primary.success{background:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
3215
3279
  }
3216
3280
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyButtonComponent, decorators: [{
3217
3281
  type: Component,
@@ -3219,7 +3283,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3219
3283
  'data-testid': 'monkey-button',
3220
3284
  '[attr.id]': 'id',
3221
3285
  '[id]': 'id'
3222
- }, template: "<button class=\"mecx-button {{ type }} {{ size }} {{ color }}\" [disabled]=\"disabled || loading\">\n <div class=\"content\">\n <ng-content *ngIf=\"!loading\" select=\"[first]\"></ng-content>\n <span><ng-content></ng-content></span>\n <ng-content *ngIf=\"!loading\" select=\"[last]\"></ng-content>\n @if (loading) {\n <util-icon class=\"mecx-button-loading\" name=\"loading\" />\n }\n </div>\n</button>\n", styles: ["monkey-button{display:inline-block}monkey-button .mecx-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-button .mecx-button .content{display:flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);padding:0px var(--mecx-spaces-small);flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-button .mecx-button .content span{width:100%}monkey-button .mecx-button .content .mk-i{display:flex}monkey-button .mecx-button.secondary{border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white)}monkey-button .mecx-button.secondary:disabled{border-width:1px}monkey-button .mecx-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-button .mecx-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-button .mecx-button .mecx-button-loading{display:flex;background:transparent}monkey-button .mecx-button .mecx-button-loading svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary.error{color:var(--mecx-color-white);background:var(--mecx-color-error-500)}monkey-button .mecx-button.primary.success{color:var(--mecx-color-white);background:var(--mecx-color-success-500)}monkey-button .mecx-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled).error{background:var(--mecx-color-error-600)}monkey-button .mecx-button.primary:hover:not(:disabled).success{background:var(--mecx-color-success-600)}monkey-button .mecx-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.secondary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.tertiary{background:unset}monkey-button .mecx-button.tertiary span{text-decoration:underline}monkey-button .mecx-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-button .mecx-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.tertiary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.sm{height:32px}monkey-button .mecx-button.sm .mk-i{font-size:20px}monkey-button .mecx-button.md{height:40px}monkey-button .mecx-button.md .mk-i{font-size:22px}monkey-button .mecx-button.lg{height:48px;text-align:center;font-size:16px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.48px}monkey-button .mecx-button.lg .mk-i{font-size:24px}monkey-button .mecx-button.full-width{width:100%}monkey-button .mecx-button:focus-visible{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-button .mecx-button:focus-visible.error{outline-color:var(--mecx-color-error-500)}monkey-button .mecx-button:focus-visible.success{outline-color:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled){opacity:.8;outline:none}monkey-button .mecx-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main)}monkey-button .mecx-button:active:not(:disabled).primary.error{background:var(--mecx-color-error-500)}monkey-button .mecx-button:active:not(:disabled).primary.success{background:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"] }]
3286
+ }, template: "<button class=\"mecx-button {{ type }} {{ size }} {{ color }}\" [disabled]=\"disabled || loading\">\n <div class=\"content\">\n <ng-content *ngIf=\"!loading\" select=\"[first]\"></ng-content>\n <span><ng-content></ng-content></span>\n <ng-content *ngIf=\"!loading\" select=\"[last]\"></ng-content>\n @if (loading) {\n <util-icon class=\"mecx-button-loading\" name=\"loading\" />\n }\n </div>\n</button>\n", styles: ["monkey-button{display:inline-block}monkey-button.has-progress button:disabled{position:relative;overflow:hidden;border:2px solid var(--mecx-color-gray-400)}monkey-button.has-progress button:disabled:before,monkey-button.has-progress button:disabled:after{content:\"\";position:absolute;inset:42px 0 0;width:100%;height:105px;left:calc(var(--mecx-button-progress) - 47%);background-color:var(--mecx-color-theme-300);border-radius:45% 47% 43% 46%;transform:translate(-50%,-70%) rotate(0);animation:rotate 6s linear infinite;z-index:1}monkey-button.has-progress button:disabled:after{border-radius:47% 60% 46% 44%;background-color:var(--mecx-color-theme-main);transform:translate(-50%,-70%) rotate(0);animation:rotate 7s linear -4s infinite;z-index:2}@keyframes rotate{50%{transform:translate(-50%,-73%) rotate(180deg)}to{transform:translate(-50%,-70%) rotate(360deg)}}monkey-button .mecx-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-button .mecx-button .content{display:flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);padding:0px var(--mecx-spaces-small);flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-button .mecx-button .content span{width:100%}monkey-button .mecx-button .content .mk-i{display:flex}monkey-button .mecx-button.secondary{border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white)}monkey-button .mecx-button.secondary:disabled{border-width:1px}monkey-button .mecx-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-button .mecx-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-button .mecx-button .mecx-button-loading{display:flex;background:transparent}monkey-button .mecx-button .mecx-button-loading svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary.error{color:var(--mecx-color-white);background:var(--mecx-color-error-500)}monkey-button .mecx-button.primary.success{color:var(--mecx-color-white);background:var(--mecx-color-success-500)}monkey-button .mecx-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-600)}monkey-button .mecx-button.primary:hover:not(:disabled).error{background:var(--mecx-color-error-600)}monkey-button .mecx-button.primary:hover:not(:disabled).success{background:var(--mecx-color-success-600)}monkey-button .mecx-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.secondary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.secondary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.tertiary{background:unset}monkey-button .mecx-button.tertiary span{text-decoration:underline}monkey-button .mecx-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-button .mecx-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled) util-icon svg path{fill:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary:hover:not(:disabled).error{color:var(--mecx-color-error-500)}monkey-button .mecx-button.tertiary:hover:not(:disabled).success{color:var(--mecx-color-success-500)}monkey-button .mecx-button.sm{height:32px}monkey-button .mecx-button.sm .mk-i{font-size:20px}monkey-button .mecx-button.md{height:40px}monkey-button .mecx-button.md .mk-i{font-size:22px}monkey-button .mecx-button.lg{height:48px;text-align:center;font-size:16px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.48px}monkey-button .mecx-button.lg .mk-i{font-size:24px}monkey-button .mecx-button.full-width{width:100%}monkey-button .mecx-button:focus-visible{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-button .mecx-button:focus-visible.error{outline-color:var(--mecx-color-error-500)}monkey-button .mecx-button:focus-visible.success{outline-color:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled){opacity:.8;outline:none}monkey-button .mecx-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main)}monkey-button .mecx-button:active:not(:disabled).primary.error{background:var(--mecx-color-error-500)}monkey-button .mecx-button:active:not(:disabled).primary.success{background:var(--mecx-color-success-500)}monkey-button .mecx-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"] }]
3223
3287
  }], ctorParameters: () => [], propDecorators: { disabled: [{
3224
3288
  type: Input
3225
3289
  }], color: [{
@@ -4493,6 +4557,124 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4493
4557
  * MIT Licence
4494
4558
  ************************* */
4495
4559
 
4560
+ /** ************************
4561
+ * Copyright Monkey Exchange. All Rights Reserved
4562
+ * This style guide was developed by Monkey Exchange Team
4563
+ * MIT Licence
4564
+ ************************* */
4565
+ class MonkeyDownloadButtonComponent {
4566
+ get id() {
4567
+ return this._id;
4568
+ }
4569
+ set id(value) {
4570
+ this._id = value || this._uid;
4571
+ }
4572
+ get safeProgress() {
4573
+ return Math.min(Math.max(this.progress, 0), 100);
4574
+ }
4575
+ get hasProgress() {
4576
+ return typeof this.progress === 'number' && this.progress > 0;
4577
+ }
4578
+ constructor() {
4579
+ this.progress = 0;
4580
+ this.color = 'default';
4581
+ this.size = 'md';
4582
+ this.type = 'primary';
4583
+ this.tabIndex = -1;
4584
+ this.onChange = new EventEmitter();
4585
+ this._fileCacheService = inject(MonkeyEcxFileCacheService);
4586
+ this._uid = inject(IdGenerator).getId('monkey-download-button-');
4587
+ // eslint-disable-next-line no-self-assign
4588
+ this.id = this.id;
4589
+ }
4590
+ onDownload() {
4591
+ this.onChange.emit({ component: this });
4592
+ }
4593
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyDownloadButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4594
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyDownloadButtonComponent, isStandalone: true, selector: "monkey-download-button", inputs: { progress: "progress", disabled: "disabled", color: "color", size: "size", type: "type", loading: "loading", tabIndex: "tabIndex", id: "id" }, outputs: { onChange: "onChange" }, host: { properties: { "attr.data-testid": "'monkey-download-button'", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-input-upload" }, ngImport: i0, template: `
4595
+ <monkey-button
4596
+ [type]="type"
4597
+ [color]="color"
4598
+ [size]="size"
4599
+ [style.--mecx-button-progress]="hasProgress ? safeProgress + '%' : null"
4600
+ [class.has-progress]="hasProgress"
4601
+ [disabled]="hasProgress"
4602
+ (click)="onDownload()"
4603
+ >
4604
+ <div class="content-download">
4605
+ <ng-content *ngIf="!loading" select="[first]"></ng-content>
4606
+ <span><ng-content></ng-content></span>
4607
+ <ng-content *ngIf="!loading" select="[last]"></ng-content>
4608
+ </div>
4609
+
4610
+ <div
4611
+ class="content-download-progress"
4612
+ [style.--mecx-button-progress]="hasProgress ? safeProgress + '%' : null"
4613
+ *ngIf="hasProgress"
4614
+ >
4615
+ {{ safeProgress }}%
4616
+ </div>
4617
+ </monkey-button>
4618
+ `, isInline: true, styles: [":host{position:relative;display:inline-block}:host .content-download{display:flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);padding:0px var(--mecx-spaces-small);flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}:host .content-download-progress{position:absolute;left:0;top:0;height:100%;color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main);z-index:3;font-weight:500;display:flex;align-items:center;justify-content:flex-end;width:calc(var(--mecx-button-progress) - 10%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "color", "size", "type", "loading", "id"] }] }); }
4619
+ }
4620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyDownloadButtonComponent, decorators: [{
4621
+ type: Component,
4622
+ args: [{ selector: 'monkey-download-button', imports: [CommonModule, MonkeyButtonComponent], template: `
4623
+ <monkey-button
4624
+ [type]="type"
4625
+ [color]="color"
4626
+ [size]="size"
4627
+ [style.--mecx-button-progress]="hasProgress ? safeProgress + '%' : null"
4628
+ [class.has-progress]="hasProgress"
4629
+ [disabled]="hasProgress"
4630
+ (click)="onDownload()"
4631
+ >
4632
+ <div class="content-download">
4633
+ <ng-content *ngIf="!loading" select="[first]"></ng-content>
4634
+ <span><ng-content></ng-content></span>
4635
+ <ng-content *ngIf="!loading" select="[last]"></ng-content>
4636
+ </div>
4637
+
4638
+ <div
4639
+ class="content-download-progress"
4640
+ [style.--mecx-button-progress]="hasProgress ? safeProgress + '%' : null"
4641
+ *ngIf="hasProgress"
4642
+ >
4643
+ {{ safeProgress }}%
4644
+ </div>
4645
+ </monkey-button>
4646
+ `, host: {
4647
+ '[attr.data-testid]': "'monkey-download-button'",
4648
+ class: 'mecx-input-upload',
4649
+ '[attr.id]': 'id',
4650
+ '[attr.tabindex]': 'disabled ? -1 : tabIndex'
4651
+ }, styles: [":host{position:relative;display:inline-block}:host .content-download{display:flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);padding:0px var(--mecx-spaces-small);flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}:host .content-download-progress{position:absolute;left:0;top:0;height:100%;color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main);z-index:3;font-weight:500;display:flex;align-items:center;justify-content:flex-end;width:calc(var(--mecx-button-progress) - 10%)}\n"] }]
4652
+ }], ctorParameters: () => [], propDecorators: { progress: [{
4653
+ type: Input
4654
+ }], disabled: [{
4655
+ type: Input
4656
+ }], color: [{
4657
+ type: Input
4658
+ }], size: [{
4659
+ type: Input
4660
+ }], type: [{
4661
+ type: Input
4662
+ }], loading: [{
4663
+ type: Input
4664
+ }], tabIndex: [{
4665
+ type: Input
4666
+ }], onChange: [{
4667
+ type: Output
4668
+ }], id: [{
4669
+ type: Input
4670
+ }] } });
4671
+
4672
+ /** ************************
4673
+ * Copyright Monkey Exchange. All Rights Reserved
4674
+ * This style guide was developed by Monkey Exchange Team
4675
+ * MIT Licence
4676
+ ************************* */
4677
+
4496
4678
  /** ************************
4497
4679
  * Copyright Monkey Exchange. All Rights Reserved
4498
4680
  * This style guide was developed by Monkey Exchange Team
@@ -6033,7 +6215,7 @@ class MonkeyInputUploadComponent {
6033
6215
  { provide: MonkeyFormFieldControl, useExisting: MonkeyInputUploadComponent }
6034
6216
  ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
6035
6217
  <div class="mecx-input-upload-value" [class.has-value]="value">
6036
- {{ value?.fileName || placeholder }}
6218
+ {{ value?.filename || value?.fileName || placeholder }}
6037
6219
  </div>
6038
6220
  <input
6039
6221
  (change)="onFileSelected($event)"
@@ -6053,7 +6235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
6053
6235
  type: Component,
6054
6236
  args: [{ selector: 'monkey-input-upload', imports: [], template: `
6055
6237
  <div class="mecx-input-upload-value" [class.has-value]="value">
6056
- {{ value?.fileName || placeholder }}
6238
+ {{ value?.filename || value?.fileName || placeholder }}
6057
6239
  </div>
6058
6240
  <input
6059
6241
  (change)="onFileSelected($event)"
@@ -8837,5 +9019,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
8837
9019
  * Generated bundle index. Do not edit.
8838
9020
  */
8839
9021
 
8840
- export { MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyEcxAddressService, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, getCurrencySymbol, injectTokenWithWarning };
9022
+ export { MECX_COUNTRY_ISO_CODE, MECX_GOOGLE_API_KEY, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAutocompleteAddressComponent, MonkeyAutocompleteComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDictionaryService, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyDownloadButtonComponent, MonkeyEcxAddressService, MonkeyEcxFileCacheService, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, getCurrencySymbol, injectTokenWithWarning };
8841
9023
  //# sourceMappingURL=monkey-style-guide-v2.mjs.map