myrta-ui 0.0.1
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/README.md +18 -0
- package/esm2020/lib/components/button/Button.enum.mjs +29 -0
- package/esm2020/lib/components/button/button.component.mjs +99 -0
- package/esm2020/lib/components/button/button.module.mjs +21 -0
- package/esm2020/lib/components/loader/loader.component.mjs +26 -0
- package/esm2020/lib/components/loader/loader.enum.mjs +20 -0
- package/esm2020/lib/components/loader/loader.module.mjs +19 -0
- package/esm2020/lib/pipes/safe/safe.module.mjs +22 -0
- package/esm2020/lib/pipes/safe/safe.pipe.mjs +20 -0
- package/esm2020/myrta-ui.mjs +5 -0
- package/esm2020/public-api.mjs +6 -0
- package/fesm2015/myrta-ui.mjs +244 -0
- package/fesm2015/myrta-ui.mjs.map +1 -0
- package/fesm2020/myrta-ui.mjs +244 -0
- package/fesm2020/myrta-ui.mjs.map +1 -0
- package/lib/components/button/Button.enum.d.ts +28 -0
- package/lib/components/button/button.component.d.ts +30 -0
- package/lib/components/button/button.module.d.ts +10 -0
- package/lib/components/loader/loader.component.d.ts +10 -0
- package/lib/components/loader/loader.enum.d.ts +19 -0
- package/lib/components/loader/loader.module.d.ts +8 -0
- package/lib/pipes/safe/safe.module.d.ts +8 -0
- package/lib/pipes/safe/safe.pipe.d.ts +10 -0
- package/myrta-ui.d.ts +5 -0
- package/package.json +31 -0
- package/public-api.d.ts +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Команда создания модуля
|
|
2
|
+
ng g m button --project=myrta-ui
|
|
3
|
+
|
|
4
|
+
# Команда создания компонента
|
|
5
|
+
ng g c button --project=myrta-ui
|
|
6
|
+
|
|
7
|
+
# поднять ручками версию
|
|
8
|
+
|
|
9
|
+
# сборку производить от директории myrta
|
|
10
|
+
# Команда сборки проекта
|
|
11
|
+
ng build myrta-ui
|
|
12
|
+
|
|
13
|
+
# publish из dist директории проекта
|
|
14
|
+
|
|
15
|
+
# Команда публикации проекта
|
|
16
|
+
npm publish
|
|
17
|
+
|
|
18
|
+
style-dictionary build
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export var ButtonTypesEnum;
|
|
2
|
+
(function (ButtonTypesEnum) {
|
|
3
|
+
ButtonTypesEnum["primary"] = "mrx-btn-primary";
|
|
4
|
+
ButtonTypesEnum["secondary"] = "mrx-btn-secondary";
|
|
5
|
+
ButtonTypesEnum["tertiary"] = "mrx-btn-tertiary";
|
|
6
|
+
})(ButtonTypesEnum || (ButtonTypesEnum = {}));
|
|
7
|
+
export var ButtonSizesEnum;
|
|
8
|
+
(function (ButtonSizesEnum) {
|
|
9
|
+
ButtonSizesEnum["small"] = "mrx-btn-sm";
|
|
10
|
+
ButtonSizesEnum["medium"] = "mrx-btn-md";
|
|
11
|
+
ButtonSizesEnum["large"] = "mrx-btn-lg";
|
|
12
|
+
})(ButtonSizesEnum || (ButtonSizesEnum = {}));
|
|
13
|
+
export var ButtonColorsEnum;
|
|
14
|
+
(function (ButtonColorsEnum) {
|
|
15
|
+
ButtonColorsEnum["default"] = "";
|
|
16
|
+
ButtonColorsEnum["red"] = "red";
|
|
17
|
+
ButtonColorsEnum["yellow"] = "yellow";
|
|
18
|
+
ButtonColorsEnum["green"] = "green";
|
|
19
|
+
ButtonColorsEnum["attention"] = "color-attention";
|
|
20
|
+
ButtonColorsEnum["positive"] = "color-positive";
|
|
21
|
+
ButtonColorsEnum["negative"] = "color-negative";
|
|
22
|
+
})(ButtonColorsEnum || (ButtonColorsEnum = {}));
|
|
23
|
+
export var ButtonIconPositionEnum;
|
|
24
|
+
(function (ButtonIconPositionEnum) {
|
|
25
|
+
ButtonIconPositionEnum["none"] = "";
|
|
26
|
+
ButtonIconPositionEnum["left"] = "icon-left";
|
|
27
|
+
ButtonIconPositionEnum["right"] = "icon-right";
|
|
28
|
+
})(ButtonIconPositionEnum || (ButtonIconPositionEnum = {}));
|
|
29
|
+
//# sourceMappingURL=data:application/json;base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CBlbnVtIEJ1dHRvbkljb25Qb3NpdGlvbkVudW0ge1xyXG4gICdub25lJz0gJycsXHJcbiAgJ2xlZnQnID0gJ2ljb24tbGVmdCcsXHJcbiAgJ3JpZ2h0JyA9ICdpY29uLXJpZ2h0JyxcclxufVxyXG5cclxuZXhwb3J0IHR5cGUgQnV0dG9uSWNvblBvc2l0aW9uVHlwZXM9ICdub25lJyB8ICdsZWZ0JyB8ICdyaWdodCdcclxuIl19
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { ButtonColorsEnum, ButtonIconPositionEnum, ButtonSizesEnum, ButtonTypesEnum } from './Button.enum';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../loader/loader.component";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "../../pipes/safe/safe.pipe";
|
|
7
|
+
export class ButtonComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.size = 'large';
|
|
10
|
+
this.type = 'primary';
|
|
11
|
+
this.color = 'default';
|
|
12
|
+
this.iconPosition = 'left';
|
|
13
|
+
this.active = false;
|
|
14
|
+
this.disabled = false;
|
|
15
|
+
this.isLoading = false;
|
|
16
|
+
this.iconOnly = false;
|
|
17
|
+
this.customClasses = '';
|
|
18
|
+
this.label = '';
|
|
19
|
+
this.icon = '';
|
|
20
|
+
this.iconClass = '';
|
|
21
|
+
this.mrxClick = new EventEmitter();
|
|
22
|
+
}
|
|
23
|
+
get getLabel() {
|
|
24
|
+
return this.iconOnly ? null : this.label;
|
|
25
|
+
}
|
|
26
|
+
get isIcon() {
|
|
27
|
+
return this.iconPosition !== 'none';
|
|
28
|
+
}
|
|
29
|
+
get isIconLeft() {
|
|
30
|
+
return this.iconPosition === 'left';
|
|
31
|
+
}
|
|
32
|
+
get isIconRight() {
|
|
33
|
+
return this.iconPosition === 'right';
|
|
34
|
+
}
|
|
35
|
+
get getClasses() {
|
|
36
|
+
return `${ButtonSizesEnum[this.size]} ${ButtonTypesEnum[this.type]} ${ButtonColorsEnum[this.color]} ${this.customClasses} ${ButtonIconPositionEnum[this.iconPosition]}`;
|
|
37
|
+
}
|
|
38
|
+
get getLoaderColor() {
|
|
39
|
+
if (this.disabled) {
|
|
40
|
+
return 'black';
|
|
41
|
+
}
|
|
42
|
+
if (this.color === 'default') {
|
|
43
|
+
return this.type === 'primary' ? 'white' : 'brand';
|
|
44
|
+
}
|
|
45
|
+
else if (this.type === 'primary') {
|
|
46
|
+
return 'white';
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return this.color;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
get getLoaderSize() {
|
|
53
|
+
return this.size === 'large' ? 'small' : this.size === 'medium' ? 'small' : 'extra-small';
|
|
54
|
+
}
|
|
55
|
+
get getReplacedIcon() {
|
|
56
|
+
return this.icon.replace(/"([^"]+)"/g, '\'$1\'');
|
|
57
|
+
}
|
|
58
|
+
buttonClick($event) {
|
|
59
|
+
if (!this.disabled) {
|
|
60
|
+
this.mrxClick.emit($event);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
$event.stopPropagation();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ButtonComponent, selector: "mrx-button", inputs: { size: "size", type: "type", color: "color", iconPosition: "iconPosition", active: "active", disabled: "disabled", isLoading: "isLoading", iconOnly: "iconOnly", customClasses: "customClasses", label: "label", icon: "icon", iconClass: "iconClass" }, outputs: { mrxClick: "mrxClick" }, ngImport: i0, template: "<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n", components: [{ type: i1.LoaderComponent, selector: "mrx-loader", inputs: ["size", "color", "customClasses"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "safe": i3.SafePipe } });
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{ selector: 'mrx-button', template: "<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n" }]
|
|
72
|
+
}], propDecorators: { size: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], type: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], color: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], iconPosition: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], active: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], disabled: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], isLoading: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], iconOnly: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], customClasses: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], label: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], icon: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], iconClass: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], mrxClick: [{
|
|
97
|
+
type: Output
|
|
98
|
+
}] } });
|
|
99
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL215cnRhLXVpL3NyYy9saWIvY29tcG9uZW50cy9idXR0b24vYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL215cnRhLXVpL3NyYy9saWIvY29tcG9uZW50cy9idXR0b24vYnV0dG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFT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1cImlzTG9hZGluZyAmJiAhZGlzYWJsZWRcIlxyXG4gICAgW2Rpc2FibGVkXT1cImRpc2FibGVkXCJcclxuICAgIChjbGljayk9XCJidXR0b25DbGljaygkZXZlbnQpXCJcclxuPlxyXG4gIDxuZy10ZW1wbGF0ZSAjc3Bpbm5lcj5cclxuICAgIDxtcngtbG9hZGVyXHJcbiAgICAgICAgW2NvbG9yXT1cImdldExvYWRlckNvbG9yXCJcclxuICAgICAgICBbc2l6ZV09XCJnZXRMb2FkZXJTaXplXCJcclxuICAgID48L21yeC1sb2FkZXI+XHJcbiAgPC9uZy10ZW1wbGF0ZT5cclxuXHJcbiAgPG5nLWNvbnRhaW5lciAqbmdJZj1cImlzSWNvbkxlZnQgJiYgaXNMb2FkaW5nICYmICFkaXNhYmxlZFwiPlxyXG4gICAgPGRpdlxyXG4gICAgICAgIGNsYXNzPVwiaWNvbi13cmFwcGVyXCJcclxuICAgICAgICBbY2xhc3MubXItMV09XCJzaXplID09PSAnc21hbGwnICYmICFpY29uT25seVwiXHJcbiAgICAgICAgW2NsYXNzLm1yLTJdPVwiKHNpemUgPT09ICdsYXJnZScgfHwgc2l6ZSA9PT0gJ21lZGl1bScpICYmICFpY29uT25seVwiXHJcbiAgICA+XHJcbiAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJzcGlubmVyXCI+PC9uZy1jb250YWluZXI+XHJcbiAgICA8L2Rpdj5cclxuICA8L25nLWNvbnRhaW5lcj5cclxuXHJcbiAgPGRpdlxyXG4gICAgICBjbGFzcz1cImljb24td3JhcHBlclwiXHJcbiAgICAgIFtjbGFzcy5tci0xXT1cInNpemUgPT09ICdzbWFsbCcgJiYgIWljb25Pbmx5XCJcclxuICAgICAgW2NsYXNzLm1yLTJdPVwiKHNpemUgPT09ICdsYXJnZScgfHwgc2l6ZSA9PT0gJ21lZGl1bScpICYmICFpY29uT25seVwiXHJcbiAgICAgICpuZ0lmPVwiaWNvbiAmJiBpc0ljb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cmdlJyB8fCBzaXplID09PSAnbWVkaXVtJykgJiYgIWljb25Pbmx5XCJcclxuICAgID5cclxuICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cInNwaW5uZXJcIj48L25nLWNvbnRhaW5lcj5cclxuICAgIDwvZGl2PlxyXG4gIDwvbmctY29udGFpbmVyPlxyXG48L2J1dHRvbj5cclxuIl19
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ButtonComponent } from './button.component';
|
|
4
|
+
import { SafeModule } from '../../pipes/safe/safe.module';
|
|
5
|
+
import { LoaderModule } from '../loader/loader.module';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class ButtonModule {
|
|
8
|
+
}
|
|
9
|
+
ButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
|
+
ButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, SafeModule, LoaderModule], exports: [ButtonComponent] });
|
|
11
|
+
ButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, imports: [[CommonModule, SafeModule, LoaderModule]] });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, decorators: [{
|
|
13
|
+
type: NgModule,
|
|
14
|
+
args: [{
|
|
15
|
+
declarations: [ButtonComponent],
|
|
16
|
+
imports: [CommonModule, SafeModule, LoaderModule],
|
|
17
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
18
|
+
exports: [ButtonCom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lbnQiOlsiaW1wb3J0IHsgQ1VTVE9NX0VMRU1FTlRTX1NDSEVNQSwgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHsgQ29tbW9uTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uJztcclxuaW1wb3J0IHsgQnV0dG9uQ29tcG9uZW50IH0gZnJvbSAnLi9idXR0b24uY29tcG9uZW50JztcclxuaW1wb3J0IHsgU2FmZU1vZHVsZSB9IGZyb20gJy4uLy4uL3BpcGVzL3NhZmUvc2FmZS5tb2R1bGUnO1xyXG5pbXBvcnQgeyBMb2FkZXJNb2R1bGUgfSBmcm9tICcuLi9sb2FkZXIvbG9hZGVyLm1vZHVsZSc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gIGRlY2xhcmF0aW9uczogW0J1dHRvbkNvbXBvbmVudF0sXHJcbiAgaW1wb3J0czogW0NvbW1vbk1vZHVsZSwgU2FmZU1vZHVsZSwgTG9hZGVyTW9kdWxlXSxcclxuICBzY2hlbWFzOiBbQ1VTVE9NX0VMRU1FTlRTX1NDSEVNQV0sXHJcbiAgZXhwb3J0czogW0J1dHRvbkNvbXBvbmVudF0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBCdXR0b25Nb2R1bGUge31cclxuIl19
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { LoaderColorEnum, LoaderSizesEnum } from './loader.enum';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class LoaderComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.size = 'small';
|
|
7
|
+
this.color = 'black';
|
|
8
|
+
this.customClasses = '';
|
|
9
|
+
}
|
|
10
|
+
get getClasses() {
|
|
11
|
+
return `${LoaderSizesEnum[this.size]} ${LoaderColorEnum[this.color]} ${this.customClasses}`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: LoaderComponent, selector: "mrx-loader", inputs: { size: "size", color: "color", customClasses: "customClasses" }, ngImport: i0, template: "<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n" });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
17
|
+
type: Component,
|
|
18
|
+
args: [{ selector: 'mrx-loader', template: "<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n" }]
|
|
19
|
+
}], propDecorators: { size: [{
|
|
20
|
+
type: Input
|
|
21
|
+
}], color: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}], customClasses: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}] } });
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL215cnRhLXVpL3NyYy9saWIvY29tcG9uZW50cy9sb2FkZXIvbG9hZGVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL215cnRhLXVpL3NyYy9saWIvY29tcG9uZW50cy9sb2FkZXIvbG9hZGVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2pELE9BQU8sRUFBRSxlQUFlLEVBQW9CLGVBQWUsRUFBb0IsTUFBTSxlQUFlLENBQUM7O0FBTXJHLE1BQU0sT0FBTyxlQUFlO0lBSjVCO1FBS1csU0FBSSxHQUFxQixPQUFPLENBQUE7UUFDaEMsVUFBSyxHQUFxQixPQUFPLENBQUE7UUFDakMsa0JBQWEsR0FBRyxFQUFFLENBQUM7S0FLN0I7SUFIQyxJQUFXLFVBQVU7UUFDbkIsT0FBTyxHQUFHLGVBQWUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksZUFBZSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7SUFDOUYsQ0FBQzs7NEdBUFUsZUFBZTtnR0FBZixlQUFlLDRIQ1A1QixvbkJBYUE7MkZETmEsZUFBZTtr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+XG4gICAgPGcgY2xpcC1wYXRoPVwidXJsKCNjbGlwMF8xNzYxMl8xNDE4MylcIj5cbiAgICAgIDxjaXJjbGUgY2xhc3M9XCJtcngtbG9hZGVyLS1jaXJjbGVcIiBjeD1cIjE2XCIgY3k9XCIxNlwiIHI9XCIxNC4xNzE0XCIgc3Ryb2tlLXdpZHRoPVwiM1wiLz5cbiAgICAgIDxwYXRoIGNsYXNzPVwibXJ4LWxvYWRlci0tbGluZVwiIGQ9XCJNMzAuMTcxNCAxNkMzMC4xNzE0IDguMTczMzQgMjMuODI2NyAxLjgyODU3IDE2IDEuODI4NTdcIiBzdHJva2Utd2lkdGg9XCIzXCIgc3Ryb2tlLWxpbmVjYXA9XCJyb3VuZFwiIHN0cm9rZS1saW5lam9pbj1cInJvdW5kXCIvPlxuICAgIDwvZz5cbiAgICA8ZGVmcz5cbiAgICAgIDxjbGlwUGF0aCBpZD1cImNsaXAwXzE3NjEyXzE0MTgzXCI+XG4gICAgICAgIDxyZWN0IHdpZHRoPVwiMzJcIiBoZWlnaHQ9XCIzMlwiIGZpbGw9XCJ3aGl0ZVwiLz5cbiAgICAgIDwvY2xpcFBhdGg+XG4gICAgPC9kZWZzPlxuICA8L3N2Zz5cbjwvZGl2PlxuIl19
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var LoaderSizesEnum;
|
|
2
|
+
(function (LoaderSizesEnum) {
|
|
3
|
+
LoaderSizesEnum["extra-small"] = "mrx-loader-extra-sm";
|
|
4
|
+
LoaderSizesEnum["small"] = "mrx-loader-sm";
|
|
5
|
+
LoaderSizesEnum["medium"] = "mrx-loader-md";
|
|
6
|
+
LoaderSizesEnum["large"] = "mrx-loader-lg";
|
|
7
|
+
})(LoaderSizesEnum || (LoaderSizesEnum = {}));
|
|
8
|
+
export var LoaderColorEnum;
|
|
9
|
+
(function (LoaderColorEnum) {
|
|
10
|
+
LoaderColorEnum["black"] = "color-black";
|
|
11
|
+
LoaderColorEnum["white"] = "color-white";
|
|
12
|
+
LoaderColorEnum["brand"] = "color-brand";
|
|
13
|
+
LoaderColorEnum["negative"] = "color-negative";
|
|
14
|
+
LoaderColorEnum["positive"] = "color-positive";
|
|
15
|
+
LoaderColorEnum["attention"] = "color-attention";
|
|
16
|
+
LoaderColorEnum["red"] = "color-negative";
|
|
17
|
+
LoaderColorEnum["green"] = "color-positive";
|
|
18
|
+
LoaderColorEnum["yellow"] = "color-attention";
|
|
19
|
+
})(LoaderColorEnum || (LoaderColorEnum = {}));
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9teXJ0YS11aS9zcmMvbGliL2NvbXBvbmVudHMvbG9hZGVyL2xvYWRlci5lbnVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLGVBS1g7QUFMRCxXQUFZLGVBQWU7SUFDekIsc0RBQXFDLENBQUE7SUFDckMsMENBQXlCLENBQUE7SUFDekIsMkNBQTBCLENBQUE7SUFDMUIsMENBQXlCLENBQUE7QUFDM0IsQ0FBQyxFQUxXLGVBQWUsS0FBZixlQUFlLFFBSzFCO0FBSUQsTUFBTSxDQUFOLElBQVksZUFVWDtBQVZELFdBQVksZUFBZTtJQUN6Qix3Q0FBdUIsQ0FBQTtJQUN2Qix3Q0FBdUIsQ0FBQTtJQUN2Qix3Q0FBdUIsQ0FBQTtJQUN2Qiw4Q0FBNkIsQ0FBQTtJQUM3Qiw4Q0FBNkIsQ0FBQTtJQUM3QixnREFBK0IsQ0FBQTtJQUMvQix5Q0FBd0IsQ0FBQTtJQUN4QiwyQ0FBMEIsQ0FBQTtJQUMxQiw2Q0FBNEIsQ0FBQTtBQUM5QixDQUFDLEVBVlcsZUFBZSxLQUFmLGVBQWUsUUFVMUIiLCJzb3Vy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EMA, NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { LoaderComponent } from './loader.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class LoaderModule {
|
|
6
|
+
}
|
|
7
|
+
LoaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
+
LoaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, declarations: [LoaderComponent], imports: [CommonModule], exports: [LoaderComponent] });
|
|
9
|
+
LoaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, imports: [[CommonModule]] });
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, decorators: [{
|
|
11
|
+
type: NgModule,
|
|
12
|
+
args: [{
|
|
13
|
+
declarations: [LoaderComponent],
|
|
14
|
+
imports: [CommonModule],
|
|
15
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
16
|
+
exports: [LoaderComponent]
|
|
17
|
+
}]
|
|
18
|
+
}] });
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL215cnRhLXVpL3NyYy9saWIvY29tcG9uZW50cy9sb2FkZXIvbG9hZGVyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2pFLE9BQU8s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afePipe } from "./safe.pipe";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class SafeModule {
|
|
6
|
+
}
|
|
7
|
+
SafeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8
|
+
SafeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, declarations: [SafePipe], imports: [CommonModule], exports: [SafePipe] });
|
|
9
|
+
SafeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, imports: [[
|
|
10
|
+
CommonModule
|
|
11
|
+
]] });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, decorators: [{
|
|
13
|
+
type: NgModule,
|
|
14
|
+
args: [{
|
|
15
|
+
declarations: [SafePipe],
|
|
16
|
+
imports: [
|
|
17
|
+
CommonModule
|
|
18
|
+
],
|
|
19
|
+
exports: [SafePipe]
|
|
20
|
+
}]
|
|
21
|
+
}] });
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2FmZS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9teXJ0YS11aS9zcmMvbGliL3BpcGVzL3NhZmUvc2FmZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGFBQWEsQ0FBQzs7QUFXdkMsTUFBTSxPQUFPLFVBQVU7O3VHQUFWLFVBQVU7d0dBQVYsVUFBVSxpQkFOTixRQUFRLGFBRXJCLFlBQVksYUFFSixRQUFRO3dHQUVQLFVBQVUsWUFMWjtZQUNQLFlBQVk7U0FDYjsyRkFHVSxVQUFVO2tCQVB0QixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxDQUFDLFFBQVEsQ0FBQztvQkFDeEIsT0FBTyxFQUFFO3dCQUNQLFlBQVk7cUJBQ2I7b0JBQ0QsT0FBTyxFQUFFLENBQUMsUUFBUSxDQUFDO2lCQUNwQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XHJcbmltcG9ydCB7IFNhZmVQaXBlIH0gZnJvbSBcIi4vc2FmZS5waXBlXCI7XHJcblxyXG5cclxuXHJcbkBOZ01vZHVsZSh7XHJcbiAgZGVjbGFyYXRpb25zOiBbU2FmZVBpcGVdLFxyXG4gIGltcG9ydHM6IFtcclxuICAgIENvbW1vbk1vZHVsZVxyXG4gIF0sXHJcbiAgZXhwb3J0czogW1NhZmVQaXBlXVxyXG59KVxyXG5leHBvcnQgY2xhc3MgU2FmZU1vZHVsZSB7IH1cclxuIl19
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/platform-browser";
|
|
4
|
+
export class SafePipe {
|
|
5
|
+
constructor(sanitizer) {
|
|
6
|
+
this.sanitizer = sanitizer;
|
|
7
|
+
}
|
|
8
|
+
transform(html) {
|
|
9
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
SafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
13
|
+
SafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, name: "safe" });
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, decorators: [{
|
|
15
|
+
type: Pipe,
|
|
16
|
+
args: [{
|
|
17
|
+
name: 'safe'
|
|
18
|
+
}]
|
|
19
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2FmZS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbXlydGEtdWkvc3JjL2xpYi9waXBlcy9zYWZlL3NhZmUucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7O0FBTXBELE1BQU0sT0FBTyxRQUFRO0lBRW5CLFlBQW9CLFNBQXNCO1FBQXRCLGNBQVMsR0FBVCxTQUFTLENBQWE7SUFBRSxDQUFDO0lBRTdDLFNBQVMsQ0FBQyxJQUFTO1FBQ2pCLE9BQU8sSUFBSSxDQUFDLFNBQVMsQ0FBQyx1QkFBdUIsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN0RCxDQUFDOztxR0FOVSxRQUFRO21HQUFSLFFBQVE7MkZBQVIsUUFBUTtrQkFIcEIsSUFBSTttQkFBQztvQkFDSixJQUFJLEVBQUUsTUFBTTtpQkFDYiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBpcGUsIFBpcGVUcmFuc2Zvcm0gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHsgRG9tU2FuaXRpemVyIH0gZnJvbSBcIkBhbmd1bGFyL3BsYXRmb3JtLWJyb3dzZXJcIjtcclxuXHJcbkBQaXBlKHtcclxuICBuYW1lOiAnc2FmZSdcclxufSlcclxuZXhwb3J0IGNsYXNzIFNhZmVQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XHJcblxyXG4gIGNvbnN0cnVjdG9yKHByaXZhdGUgc2FuaXRpemVyOkRvbVNhbml0aXplcil7fVxyXG5cclxuICB0cmFuc2Zvcm0oaHRtbDogYW55KSB7XHJcbiAgICByZXR1cm4gdGhpcy5zYW5pdGl6ZXIuYnlwYXNzU2VjdXJpdHlUcnVzdEh0bWwoaHRtbCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXlydGEtdWkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9teXJ0YS11aS9zcmMvbXlydGEtdWkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// COMPONENTS
|
|
2
|
+
export * from './lib/components/button/button.module';
|
|
3
|
+
export * from './lib/components/button/button.component';
|
|
4
|
+
export * from './lib/components/loader/loader.module';
|
|
5
|
+
export * from './lib/components/loader/loader.component';
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL215cnRhLXVpL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGFBQWE7QUFDYixjQUFjLHVDQUF1QyxDQUFDO0FBQ3RELGNBQWMsMENBQTBDLENBQUM7QUFFekQsY0FBYyx1Q0FBdUMsQ0FBQztBQUN0RCxjQUFjLDBDQUEwQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ09NUE9ORU5UU1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9idXR0b24vYnV0dG9uLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL2J1dHRvbi9idXR0b24uY29tcG9uZW50JztcblxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9sb2FkZXIvbG9hZGVyLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL2xvYWRlci9sb2FkZXIuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, Input, Pipe, EventEmitter, Output, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/platform-browser';
|
|
6
|
+
|
|
7
|
+
var ButtonTypesEnum;
|
|
8
|
+
(function (ButtonTypesEnum) {
|
|
9
|
+
ButtonTypesEnum["primary"] = "mrx-btn-primary";
|
|
10
|
+
ButtonTypesEnum["secondary"] = "mrx-btn-secondary";
|
|
11
|
+
ButtonTypesEnum["tertiary"] = "mrx-btn-tertiary";
|
|
12
|
+
})(ButtonTypesEnum || (ButtonTypesEnum = {}));
|
|
13
|
+
var ButtonSizesEnum;
|
|
14
|
+
(function (ButtonSizesEnum) {
|
|
15
|
+
ButtonSizesEnum["small"] = "mrx-btn-sm";
|
|
16
|
+
ButtonSizesEnum["medium"] = "mrx-btn-md";
|
|
17
|
+
ButtonSizesEnum["large"] = "mrx-btn-lg";
|
|
18
|
+
})(ButtonSizesEnum || (ButtonSizesEnum = {}));
|
|
19
|
+
var ButtonColorsEnum;
|
|
20
|
+
(function (ButtonColorsEnum) {
|
|
21
|
+
ButtonColorsEnum["default"] = "";
|
|
22
|
+
ButtonColorsEnum["red"] = "red";
|
|
23
|
+
ButtonColorsEnum["yellow"] = "yellow";
|
|
24
|
+
ButtonColorsEnum["green"] = "green";
|
|
25
|
+
ButtonColorsEnum["attention"] = "color-attention";
|
|
26
|
+
ButtonColorsEnum["positive"] = "color-positive";
|
|
27
|
+
ButtonColorsEnum["negative"] = "color-negative";
|
|
28
|
+
})(ButtonColorsEnum || (ButtonColorsEnum = {}));
|
|
29
|
+
var ButtonIconPositionEnum;
|
|
30
|
+
(function (ButtonIconPositionEnum) {
|
|
31
|
+
ButtonIconPositionEnum["none"] = "";
|
|
32
|
+
ButtonIconPositionEnum["left"] = "icon-left";
|
|
33
|
+
ButtonIconPositionEnum["right"] = "icon-right";
|
|
34
|
+
})(ButtonIconPositionEnum || (ButtonIconPositionEnum = {}));
|
|
35
|
+
|
|
36
|
+
var LoaderSizesEnum;
|
|
37
|
+
(function (LoaderSizesEnum) {
|
|
38
|
+
LoaderSizesEnum["extra-small"] = "mrx-loader-extra-sm";
|
|
39
|
+
LoaderSizesEnum["small"] = "mrx-loader-sm";
|
|
40
|
+
LoaderSizesEnum["medium"] = "mrx-loader-md";
|
|
41
|
+
LoaderSizesEnum["large"] = "mrx-loader-lg";
|
|
42
|
+
})(LoaderSizesEnum || (LoaderSizesEnum = {}));
|
|
43
|
+
var LoaderColorEnum;
|
|
44
|
+
(function (LoaderColorEnum) {
|
|
45
|
+
LoaderColorEnum["black"] = "color-black";
|
|
46
|
+
LoaderColorEnum["white"] = "color-white";
|
|
47
|
+
LoaderColorEnum["brand"] = "color-brand";
|
|
48
|
+
LoaderColorEnum["negative"] = "color-negative";
|
|
49
|
+
LoaderColorEnum["positive"] = "color-positive";
|
|
50
|
+
LoaderColorEnum["attention"] = "color-attention";
|
|
51
|
+
LoaderColorEnum["red"] = "color-negative";
|
|
52
|
+
LoaderColorEnum["green"] = "color-positive";
|
|
53
|
+
LoaderColorEnum["yellow"] = "color-attention";
|
|
54
|
+
})(LoaderColorEnum || (LoaderColorEnum = {}));
|
|
55
|
+
|
|
56
|
+
class LoaderComponent {
|
|
57
|
+
constructor() {
|
|
58
|
+
this.size = 'small';
|
|
59
|
+
this.color = 'black';
|
|
60
|
+
this.customClasses = '';
|
|
61
|
+
}
|
|
62
|
+
get getClasses() {
|
|
63
|
+
return `${LoaderSizesEnum[this.size]} ${LoaderColorEnum[this.color]} ${this.customClasses}`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: LoaderComponent, selector: "mrx-loader", inputs: { size: "size", color: "color", customClasses: "customClasses" }, ngImport: i0, template: "<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n" });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{ selector: 'mrx-loader', template: "<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n" }]
|
|
71
|
+
}], propDecorators: { size: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], color: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], customClasses: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}] } });
|
|
78
|
+
|
|
79
|
+
class SafePipe {
|
|
80
|
+
constructor(sanitizer) {
|
|
81
|
+
this.sanitizer = sanitizer;
|
|
82
|
+
}
|
|
83
|
+
transform(html) {
|
|
84
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
SafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
88
|
+
SafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, name: "safe" });
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, decorators: [{
|
|
90
|
+
type: Pipe,
|
|
91
|
+
args: [{
|
|
92
|
+
name: 'safe'
|
|
93
|
+
}]
|
|
94
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
95
|
+
|
|
96
|
+
class ButtonComponent {
|
|
97
|
+
constructor() {
|
|
98
|
+
this.size = 'large';
|
|
99
|
+
this.type = 'primary';
|
|
100
|
+
this.color = 'default';
|
|
101
|
+
this.iconPosition = 'left';
|
|
102
|
+
this.active = false;
|
|
103
|
+
this.disabled = false;
|
|
104
|
+
this.isLoading = false;
|
|
105
|
+
this.iconOnly = false;
|
|
106
|
+
this.customClasses = '';
|
|
107
|
+
this.label = '';
|
|
108
|
+
this.icon = '';
|
|
109
|
+
this.iconClass = '';
|
|
110
|
+
this.mrxClick = new EventEmitter();
|
|
111
|
+
}
|
|
112
|
+
get getLabel() {
|
|
113
|
+
return this.iconOnly ? null : this.label;
|
|
114
|
+
}
|
|
115
|
+
get isIcon() {
|
|
116
|
+
return this.iconPosition !== 'none';
|
|
117
|
+
}
|
|
118
|
+
get isIconLeft() {
|
|
119
|
+
return this.iconPosition === 'left';
|
|
120
|
+
}
|
|
121
|
+
get isIconRight() {
|
|
122
|
+
return this.iconPosition === 'right';
|
|
123
|
+
}
|
|
124
|
+
get getClasses() {
|
|
125
|
+
return `${ButtonSizesEnum[this.size]} ${ButtonTypesEnum[this.type]} ${ButtonColorsEnum[this.color]} ${this.customClasses} ${ButtonIconPositionEnum[this.iconPosition]}`;
|
|
126
|
+
}
|
|
127
|
+
get getLoaderColor() {
|
|
128
|
+
if (this.disabled) {
|
|
129
|
+
return 'black';
|
|
130
|
+
}
|
|
131
|
+
if (this.color === 'default') {
|
|
132
|
+
return this.type === 'primary' ? 'white' : 'brand';
|
|
133
|
+
}
|
|
134
|
+
else if (this.type === 'primary') {
|
|
135
|
+
return 'white';
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
return this.color;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
get getLoaderSize() {
|
|
142
|
+
return this.size === 'large' ? 'small' : this.size === 'medium' ? 'small' : 'extra-small';
|
|
143
|
+
}
|
|
144
|
+
get getReplacedIcon() {
|
|
145
|
+
return this.icon.replace(/"([^"]+)"/g, '\'$1\'');
|
|
146
|
+
}
|
|
147
|
+
buttonClick($event) {
|
|
148
|
+
if (!this.disabled) {
|
|
149
|
+
this.mrxClick.emit($event);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
$event.stopPropagation();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
157
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ButtonComponent, selector: "mrx-button", inputs: { size: "size", type: "type", color: "color", iconPosition: "iconPosition", active: "active", disabled: "disabled", isLoading: "isLoading", iconOnly: "iconOnly", customClasses: "customClasses", label: "label", icon: "icon", iconClass: "iconClass" }, outputs: { mrxClick: "mrxClick" }, ngImport: i0, template: "<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n", components: [{ type: LoaderComponent, selector: "mrx-loader", inputs: ["size", "color", "customClasses"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "safe": SafePipe } });
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
159
|
+
type: Component,
|
|
160
|
+
args: [{ selector: 'mrx-button', template: "<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n" }]
|
|
161
|
+
}], propDecorators: { size: [{
|
|
162
|
+
type: Input
|
|
163
|
+
}], type: [{
|
|
164
|
+
type: Input
|
|
165
|
+
}], color: [{
|
|
166
|
+
type: Input
|
|
167
|
+
}], iconPosition: [{
|
|
168
|
+
type: Input
|
|
169
|
+
}], active: [{
|
|
170
|
+
type: Input
|
|
171
|
+
}], disabled: [{
|
|
172
|
+
type: Input
|
|
173
|
+
}], isLoading: [{
|
|
174
|
+
type: Input
|
|
175
|
+
}], iconOnly: [{
|
|
176
|
+
type: Input
|
|
177
|
+
}], customClasses: [{
|
|
178
|
+
type: Input
|
|
179
|
+
}], label: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}], icon: [{
|
|
182
|
+
type: Input
|
|
183
|
+
}], iconClass: [{
|
|
184
|
+
type: Input
|
|
185
|
+
}], mrxClick: [{
|
|
186
|
+
type: Output
|
|
187
|
+
}] } });
|
|
188
|
+
|
|
189
|
+
class SafeModule {
|
|
190
|
+
}
|
|
191
|
+
SafeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
192
|
+
SafeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, declarations: [SafePipe], imports: [CommonModule], exports: [SafePipe] });
|
|
193
|
+
SafeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, imports: [[
|
|
194
|
+
CommonModule
|
|
195
|
+
]] });
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, decorators: [{
|
|
197
|
+
type: NgModule,
|
|
198
|
+
args: [{
|
|
199
|
+
declarations: [SafePipe],
|
|
200
|
+
imports: [
|
|
201
|
+
CommonModule
|
|
202
|
+
],
|
|
203
|
+
exports: [SafePipe]
|
|
204
|
+
}]
|
|
205
|
+
}] });
|
|
206
|
+
|
|
207
|
+
class LoaderModule {
|
|
208
|
+
}
|
|
209
|
+
LoaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
210
|
+
LoaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, declarations: [LoaderComponent], imports: [CommonModule], exports: [LoaderComponent] });
|
|
211
|
+
LoaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, imports: [[CommonModule]] });
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, decorators: [{
|
|
213
|
+
type: NgModule,
|
|
214
|
+
args: [{
|
|
215
|
+
declarations: [LoaderComponent],
|
|
216
|
+
imports: [CommonModule],
|
|
217
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
218
|
+
exports: [LoaderComponent]
|
|
219
|
+
}]
|
|
220
|
+
}] });
|
|
221
|
+
|
|
222
|
+
class ButtonModule {
|
|
223
|
+
}
|
|
224
|
+
ButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
225
|
+
ButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, SafeModule, LoaderModule], exports: [ButtonComponent] });
|
|
226
|
+
ButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, imports: [[CommonModule, SafeModule, LoaderModule]] });
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, decorators: [{
|
|
228
|
+
type: NgModule,
|
|
229
|
+
args: [{
|
|
230
|
+
declarations: [ButtonComponent],
|
|
231
|
+
imports: [CommonModule, SafeModule, LoaderModule],
|
|
232
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
233
|
+
exports: [ButtonComponent],
|
|
234
|
+
}]
|
|
235
|
+
}] });
|
|
236
|
+
|
|
237
|
+
// COMPONENTS
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Generated bundle index. Do not edit.
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
export { ButtonComponent, ButtonModule, LoaderComponent, LoaderModule };
|
|
244
|
+
//# sourceMappingURL=myrta-ui.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"myrta-ui.mjs","sources":["../../../projects/myrta-ui/src/lib/components/button/Button.enum.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.enum.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.component.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.component.html","../../../projects/myrta-ui/src/lib/pipes/safe/safe.pipe.ts","../../../projects/myrta-ui/src/lib/components/button/button.component.ts","../../../projects/myrta-ui/src/lib/components/button/button.component.html","../../../projects/myrta-ui/src/lib/pipes/safe/safe.module.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.module.ts","../../../projects/myrta-ui/src/lib/components/button/button.module.ts","../../../projects/myrta-ui/src/public-api.ts","../../../projects/myrta-ui/src/myrta-ui.ts"],"sourcesContent":["export enum ButtonTypesEnum {\r\n 'primary' = 'mrx-btn-primary',\r\n 'secondary' = 'mrx-btn-secondary',\r\n 'tertiary' = 'mrx-btn-tertiary',\r\n}\r\n\r\nexport type ButtonTypes = 'primary' | 'secondary' | 'tertiary'\r\n\r\nexport enum ButtonSizesEnum {\r\n 'small' = 'mrx-btn-sm',\r\n 'medium' = 'mrx-btn-md',\r\n 'large' = 'mrx-btn-lg',\r\n}\r\n\r\nexport type ButtonSizesTypes = 'small' | 'medium' | 'large'\r\n\r\nexport enum ButtonColorsEnum {\r\n 'default'= '',\r\n 'red' = 'red',\r\n 'yellow' = 'yellow',\r\n 'green' = 'green',\r\n 'attention' = 'color-attention',\r\n 'positive' = 'color-positive',\r\n 'negative' = 'color-negative',\r\n}\r\n\r\nexport type ButtonColorsTypes= 'red' | 'green' | 'yellow' | 'default' | 'attention' | 'positive' | 'negative'\r\n\r\nexport enum ButtonIconPositionEnum {\r\n 'none'= '',\r\n 'left' = 'icon-left',\r\n 'right' = 'icon-right',\r\n}\r\n\r\nexport type ButtonIconPositionTypes= 'none' | 'left' | 'right'\r\n","export enum LoaderSizesEnum {\r\n 'extra-small' = 'mrx-loader-extra-sm',\r\n 'small' = 'mrx-loader-sm',\r\n 'medium' = 'mrx-loader-md',\r\n 'large' = 'mrx-loader-lg',\r\n}\r\n\r\nexport type LoaderSizesTypes = 'extra-small' | 'small' | 'medium' | 'large'\r\n\r\nexport enum LoaderColorEnum {\r\n 'black' = 'color-black',\r\n 'white' = 'color-white',\r\n 'brand' = 'color-brand',\r\n 'negative' = 'color-negative',\r\n 'positive' = 'color-positive',\r\n 'attention' = 'color-attention',\r\n 'red' = 'color-negative',\r\n 'green' = 'color-positive',\r\n 'yellow' = 'color-attention'\r\n}\r\n\r\nexport type LoaderColorTypes = 'black' | 'white' | 'brand' | 'red' | 'green' | 'yellow' | 'attention' | 'positive' | 'negative'\r\n","import { Component, Input } from '@angular/core';\r\nimport { LoaderColorEnum, LoaderColorTypes, LoaderSizesEnum, LoaderSizesTypes } from './loader.enum';\r\n\r\n@Component({\r\n selector: 'mrx-loader',\r\n templateUrl: './loader.component.html',\r\n})\r\nexport class LoaderComponent {\r\n @Input() size: LoaderSizesTypes = 'small'\r\n @Input() color: LoaderColorTypes = 'black'\r\n @Input() customClasses = '';\r\n\r\n public get getClasses(): string {\r\n return `${LoaderSizesEnum[this.size]} ${LoaderColorEnum[this.color]} ${this.customClasses}`;\r\n }\r\n}\r\n","<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\n\r\n@Pipe({\r\n name: 'safe'\r\n})\r\nexport class SafePipe implements PipeTransform {\r\n\r\n constructor(private sanitizer:DomSanitizer){}\r\n\r\n transform(html: any) {\r\n return this.sanitizer.bypassSecurityTrustHtml(html);\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport {\r\n ButtonColorsEnum,\r\n ButtonColorsTypes, ButtonIconPositionEnum,\r\n ButtonIconPositionTypes,\r\n ButtonSizesEnum,\r\n ButtonSizesTypes,\r\n ButtonTypes,\r\n ButtonTypesEnum\r\n} from './Button.enum';\r\nimport { LoaderColorTypes, LoaderSizesTypes } from '../loader/loader.enum';\r\n\r\n@Component({\r\n selector: 'mrx-button',\r\n templateUrl: 'button.component.html'\r\n})\r\nexport class ButtonComponent {\r\n @Input() size: ButtonSizesTypes = 'large';\r\n @Input() type: ButtonTypes = 'primary';\r\n @Input() color: ButtonColorsTypes = 'default';\r\n @Input() iconPosition: ButtonIconPositionTypes = 'left';\r\n @Input() active: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() isLoading: boolean = false;\r\n @Input() iconOnly: boolean = false;\r\n @Input() customClasses: string = '';\r\n @Input() label: string = '';\r\n @Input() icon: string = '';\r\n @Input() iconClass: string = '';\r\n\r\n @Output() mrxClick = new EventEmitter<MouseEvent>();\r\n\r\n public get getLabel(): null | string {\r\n return this.iconOnly ? null : this.label\r\n }\r\n\r\n public get isIcon(): boolean {\r\n return this.iconPosition !== 'none'\r\n }\r\n\r\n public get isIconLeft(): boolean {\r\n return this.iconPosition === 'left'\r\n }\r\n\r\n public get isIconRight(): boolean {\r\n return this.iconPosition === 'right'\r\n }\r\n\r\n public get getClasses(): string {\r\n return `${ButtonSizesEnum[this.size]} ${ButtonTypesEnum[this.type]} ${ButtonColorsEnum[this.color]} ${this.customClasses} ${ButtonIconPositionEnum[this.iconPosition]}`;\r\n }\r\n\r\n public get getLoaderColor(): LoaderColorTypes {\r\n if (this.disabled) {\r\n return 'black'\r\n }\r\n if (this.color === 'default') {\r\n return this.type === 'primary' ? 'white' : 'brand'\r\n } else if (this.type === 'primary') {\r\n return 'white'\r\n } else {\r\n return this.color\r\n }\r\n }\r\n\r\n public get getLoaderSize(): LoaderSizesTypes {\r\n return this.size === 'large' ? 'small' : this.size === 'medium' ? 'small' : 'extra-small'\r\n }\r\n\r\n public get getReplacedIcon(): string {\r\n return this.icon.replace(/\"([^\"]+)\"/g, '\\'$1\\'')\r\n }\r\n\r\n public buttonClick($event: MouseEvent): void {\r\n if (!this.disabled) {\r\n this.mrxClick.emit($event)\r\n } else {\r\n $event.stopPropagation()\r\n }\r\n }\r\n}\r\n","<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SafePipe } from \"./safe.pipe\";\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [SafePipe],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [SafePipe]\r\n})\r\nexport class SafeModule { }\r\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LoaderComponent } from './loader.component';\n\n@NgModule({\n declarations: [LoaderComponent],\n imports: [CommonModule],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n exports: [LoaderComponent]\n})\nexport class LoaderModule { }\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ButtonComponent } from './button.component';\r\nimport { SafeModule } from '../../pipes/safe/safe.module';\r\nimport { LoaderModule } from '../loader/loader.module';\r\n\r\n@NgModule({\r\n declarations: [ButtonComponent],\r\n imports: [CommonModule, SafeModule, LoaderModule],\r\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\r\n exports: [ButtonComponent],\r\n})\r\nexport class ButtonModule {}\r\n","// COMPONENTS\nexport * from './lib/components/button/button.module';\nexport * from './lib/components/button/button.component';\n\nexport * from './lib/components/loader/loader.module';\nexport * from './lib/components/loader/loader.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.LoaderComponent","i3.SafePipe"],"mappings":";;;;;;AAAA,IAAY,eAIX,CAAA;AAJD,CAAA,UAAY,eAAe,EAAA;AACzB,IAA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pipe, EventEmitter, Output, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/platform-browser';
|
|
6
|
+
|
|
7
|
+
var ButtonTypesEnum;
|
|
8
|
+
(function (ButtonTypesEnum) {
|
|
9
|
+
ButtonTypesEnum["primary"] = "mrx-btn-primary";
|
|
10
|
+
ButtonTypesEnum["secondary"] = "mrx-btn-secondary";
|
|
11
|
+
ButtonTypesEnum["tertiary"] = "mrx-btn-tertiary";
|
|
12
|
+
})(ButtonTypesEnum || (ButtonTypesEnum = {}));
|
|
13
|
+
var ButtonSizesEnum;
|
|
14
|
+
(function (ButtonSizesEnum) {
|
|
15
|
+
ButtonSizesEnum["small"] = "mrx-btn-sm";
|
|
16
|
+
ButtonSizesEnum["medium"] = "mrx-btn-md";
|
|
17
|
+
ButtonSizesEnum["large"] = "mrx-btn-lg";
|
|
18
|
+
})(ButtonSizesEnum || (ButtonSizesEnum = {}));
|
|
19
|
+
var ButtonColorsEnum;
|
|
20
|
+
(function (ButtonColorsEnum) {
|
|
21
|
+
ButtonColorsEnum["default"] = "";
|
|
22
|
+
ButtonColorsEnum["red"] = "red";
|
|
23
|
+
ButtonColorsEnum["yellow"] = "yellow";
|
|
24
|
+
ButtonColorsEnum["green"] = "green";
|
|
25
|
+
ButtonColorsEnum["attention"] = "color-attention";
|
|
26
|
+
ButtonColorsEnum["positive"] = "color-positive";
|
|
27
|
+
ButtonColorsEnum["negative"] = "color-negative";
|
|
28
|
+
})(ButtonColorsEnum || (ButtonColorsEnum = {}));
|
|
29
|
+
var ButtonIconPositionEnum;
|
|
30
|
+
(function (ButtonIconPositionEnum) {
|
|
31
|
+
ButtonIconPositionEnum["none"] = "";
|
|
32
|
+
ButtonIconPositionEnum["left"] = "icon-left";
|
|
33
|
+
ButtonIconPositionEnum["right"] = "icon-right";
|
|
34
|
+
})(ButtonIconPositionEnum || (ButtonIconPositionEnum = {}));
|
|
35
|
+
|
|
36
|
+
var LoaderSizesEnum;
|
|
37
|
+
(function (LoaderSizesEnum) {
|
|
38
|
+
LoaderSizesEnum["extra-small"] = "mrx-loader-extra-sm";
|
|
39
|
+
LoaderSizesEnum["small"] = "mrx-loader-sm";
|
|
40
|
+
LoaderSizesEnum["medium"] = "mrx-loader-md";
|
|
41
|
+
LoaderSizesEnum["large"] = "mrx-loader-lg";
|
|
42
|
+
})(LoaderSizesEnum || (LoaderSizesEnum = {}));
|
|
43
|
+
var LoaderColorEnum;
|
|
44
|
+
(function (LoaderColorEnum) {
|
|
45
|
+
LoaderColorEnum["black"] = "color-black";
|
|
46
|
+
LoaderColorEnum["white"] = "color-white";
|
|
47
|
+
LoaderColorEnum["brand"] = "color-brand";
|
|
48
|
+
LoaderColorEnum["negative"] = "color-negative";
|
|
49
|
+
LoaderColorEnum["positive"] = "color-positive";
|
|
50
|
+
LoaderColorEnum["attention"] = "color-attention";
|
|
51
|
+
LoaderColorEnum["red"] = "color-negative";
|
|
52
|
+
LoaderColorEnum["green"] = "color-positive";
|
|
53
|
+
LoaderColorEnum["yellow"] = "color-attention";
|
|
54
|
+
})(LoaderColorEnum || (LoaderColorEnum = {}));
|
|
55
|
+
|
|
56
|
+
class LoaderComponent {
|
|
57
|
+
constructor() {
|
|
58
|
+
this.size = 'small';
|
|
59
|
+
this.color = 'black';
|
|
60
|
+
this.customClasses = '';
|
|
61
|
+
}
|
|
62
|
+
get getClasses() {
|
|
63
|
+
return `${LoaderSizesEnum[this.size]} ${LoaderColorEnum[this.color]} ${this.customClasses}`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
LoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
LoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: LoaderComponent, selector: "mrx-loader", inputs: { size: "size", color: "color", customClasses: "customClasses" }, ngImport: i0, template: "<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n" });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{ selector: 'mrx-loader', template: "<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n" }]
|
|
71
|
+
}], propDecorators: { size: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], color: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], customClasses: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}] } });
|
|
78
|
+
|
|
79
|
+
class SafePipe {
|
|
80
|
+
constructor(sanitizer) {
|
|
81
|
+
this.sanitizer = sanitizer;
|
|
82
|
+
}
|
|
83
|
+
transform(html) {
|
|
84
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
SafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
88
|
+
SafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, name: "safe" });
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafePipe, decorators: [{
|
|
90
|
+
type: Pipe,
|
|
91
|
+
args: [{
|
|
92
|
+
name: 'safe'
|
|
93
|
+
}]
|
|
94
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
95
|
+
|
|
96
|
+
class ButtonComponent {
|
|
97
|
+
constructor() {
|
|
98
|
+
this.size = 'large';
|
|
99
|
+
this.type = 'primary';
|
|
100
|
+
this.color = 'default';
|
|
101
|
+
this.iconPosition = 'left';
|
|
102
|
+
this.active = false;
|
|
103
|
+
this.disabled = false;
|
|
104
|
+
this.isLoading = false;
|
|
105
|
+
this.iconOnly = false;
|
|
106
|
+
this.customClasses = '';
|
|
107
|
+
this.label = '';
|
|
108
|
+
this.icon = '';
|
|
109
|
+
this.iconClass = '';
|
|
110
|
+
this.mrxClick = new EventEmitter();
|
|
111
|
+
}
|
|
112
|
+
get getLabel() {
|
|
113
|
+
return this.iconOnly ? null : this.label;
|
|
114
|
+
}
|
|
115
|
+
get isIcon() {
|
|
116
|
+
return this.iconPosition !== 'none';
|
|
117
|
+
}
|
|
118
|
+
get isIconLeft() {
|
|
119
|
+
return this.iconPosition === 'left';
|
|
120
|
+
}
|
|
121
|
+
get isIconRight() {
|
|
122
|
+
return this.iconPosition === 'right';
|
|
123
|
+
}
|
|
124
|
+
get getClasses() {
|
|
125
|
+
return `${ButtonSizesEnum[this.size]} ${ButtonTypesEnum[this.type]} ${ButtonColorsEnum[this.color]} ${this.customClasses} ${ButtonIconPositionEnum[this.iconPosition]}`;
|
|
126
|
+
}
|
|
127
|
+
get getLoaderColor() {
|
|
128
|
+
if (this.disabled) {
|
|
129
|
+
return 'black';
|
|
130
|
+
}
|
|
131
|
+
if (this.color === 'default') {
|
|
132
|
+
return this.type === 'primary' ? 'white' : 'brand';
|
|
133
|
+
}
|
|
134
|
+
else if (this.type === 'primary') {
|
|
135
|
+
return 'white';
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
return this.color;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
get getLoaderSize() {
|
|
142
|
+
return this.size === 'large' ? 'small' : this.size === 'medium' ? 'small' : 'extra-small';
|
|
143
|
+
}
|
|
144
|
+
get getReplacedIcon() {
|
|
145
|
+
return this.icon.replace(/"([^"]+)"/g, '\'$1\'');
|
|
146
|
+
}
|
|
147
|
+
buttonClick($event) {
|
|
148
|
+
if (!this.disabled) {
|
|
149
|
+
this.mrxClick.emit($event);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
$event.stopPropagation();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
157
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ButtonComponent, selector: "mrx-button", inputs: { size: "size", type: "type", color: "color", iconPosition: "iconPosition", active: "active", disabled: "disabled", isLoading: "isLoading", iconOnly: "iconOnly", customClasses: "customClasses", label: "label", icon: "icon", iconClass: "iconClass" }, outputs: { mrxClick: "mrxClick" }, ngImport: i0, template: "<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n", components: [{ type: LoaderComponent, selector: "mrx-loader", inputs: ["size", "color", "customClasses"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "safe": SafePipe } });
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
159
|
+
type: Component,
|
|
160
|
+
args: [{ selector: 'mrx-button', template: "<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n" }]
|
|
161
|
+
}], propDecorators: { size: [{
|
|
162
|
+
type: Input
|
|
163
|
+
}], type: [{
|
|
164
|
+
type: Input
|
|
165
|
+
}], color: [{
|
|
166
|
+
type: Input
|
|
167
|
+
}], iconPosition: [{
|
|
168
|
+
type: Input
|
|
169
|
+
}], active: [{
|
|
170
|
+
type: Input
|
|
171
|
+
}], disabled: [{
|
|
172
|
+
type: Input
|
|
173
|
+
}], isLoading: [{
|
|
174
|
+
type: Input
|
|
175
|
+
}], iconOnly: [{
|
|
176
|
+
type: Input
|
|
177
|
+
}], customClasses: [{
|
|
178
|
+
type: Input
|
|
179
|
+
}], label: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}], icon: [{
|
|
182
|
+
type: Input
|
|
183
|
+
}], iconClass: [{
|
|
184
|
+
type: Input
|
|
185
|
+
}], mrxClick: [{
|
|
186
|
+
type: Output
|
|
187
|
+
}] } });
|
|
188
|
+
|
|
189
|
+
class SafeModule {
|
|
190
|
+
}
|
|
191
|
+
SafeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
192
|
+
SafeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, declarations: [SafePipe], imports: [CommonModule], exports: [SafePipe] });
|
|
193
|
+
SafeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, imports: [[
|
|
194
|
+
CommonModule
|
|
195
|
+
]] });
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SafeModule, decorators: [{
|
|
197
|
+
type: NgModule,
|
|
198
|
+
args: [{
|
|
199
|
+
declarations: [SafePipe],
|
|
200
|
+
imports: [
|
|
201
|
+
CommonModule
|
|
202
|
+
],
|
|
203
|
+
exports: [SafePipe]
|
|
204
|
+
}]
|
|
205
|
+
}] });
|
|
206
|
+
|
|
207
|
+
class LoaderModule {
|
|
208
|
+
}
|
|
209
|
+
LoaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
210
|
+
LoaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, declarations: [LoaderComponent], imports: [CommonModule], exports: [LoaderComponent] });
|
|
211
|
+
LoaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, imports: [[CommonModule]] });
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LoaderModule, decorators: [{
|
|
213
|
+
type: NgModule,
|
|
214
|
+
args: [{
|
|
215
|
+
declarations: [LoaderComponent],
|
|
216
|
+
imports: [CommonModule],
|
|
217
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
218
|
+
exports: [LoaderComponent]
|
|
219
|
+
}]
|
|
220
|
+
}] });
|
|
221
|
+
|
|
222
|
+
class ButtonModule {
|
|
223
|
+
}
|
|
224
|
+
ButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
225
|
+
ButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, declarations: [ButtonComponent], imports: [CommonModule, SafeModule, LoaderModule], exports: [ButtonComponent] });
|
|
226
|
+
ButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, imports: [[CommonModule, SafeModule, LoaderModule]] });
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ButtonModule, decorators: [{
|
|
228
|
+
type: NgModule,
|
|
229
|
+
args: [{
|
|
230
|
+
declarations: [ButtonComponent],
|
|
231
|
+
imports: [CommonModule, SafeModule, LoaderModule],
|
|
232
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
233
|
+
exports: [ButtonComponent],
|
|
234
|
+
}]
|
|
235
|
+
}] });
|
|
236
|
+
|
|
237
|
+
// COMPONENTS
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Generated bundle index. Do not edit.
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
export { ButtonComponent, ButtonModule, LoaderComponent, LoaderModule };
|
|
244
|
+
//# sourceMappingURL=myrta-ui.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"myrta-ui.mjs","sources":["../../../projects/myrta-ui/src/lib/components/button/Button.enum.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.enum.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.component.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.component.html","../../../projects/myrta-ui/src/lib/pipes/safe/safe.pipe.ts","../../../projects/myrta-ui/src/lib/components/button/button.component.ts","../../../projects/myrta-ui/src/lib/components/button/button.component.html","../../../projects/myrta-ui/src/lib/pipes/safe/safe.module.ts","../../../projects/myrta-ui/src/lib/components/loader/loader.module.ts","../../../projects/myrta-ui/src/lib/components/button/button.module.ts","../../../projects/myrta-ui/src/public-api.ts","../../../projects/myrta-ui/src/myrta-ui.ts"],"sourcesContent":["export enum ButtonTypesEnum {\r\n 'primary' = 'mrx-btn-primary',\r\n 'secondary' = 'mrx-btn-secondary',\r\n 'tertiary' = 'mrx-btn-tertiary',\r\n}\r\n\r\nexport type ButtonTypes = 'primary' | 'secondary' | 'tertiary'\r\n\r\nexport enum ButtonSizesEnum {\r\n 'small' = 'mrx-btn-sm',\r\n 'medium' = 'mrx-btn-md',\r\n 'large' = 'mrx-btn-lg',\r\n}\r\n\r\nexport type ButtonSizesTypes = 'small' | 'medium' | 'large'\r\n\r\nexport enum ButtonColorsEnum {\r\n 'default'= '',\r\n 'red' = 'red',\r\n 'yellow' = 'yellow',\r\n 'green' = 'green',\r\n 'attention' = 'color-attention',\r\n 'positive' = 'color-positive',\r\n 'negative' = 'color-negative',\r\n}\r\n\r\nexport type ButtonColorsTypes= 'red' | 'green' | 'yellow' | 'default' | 'attention' | 'positive' | 'negative'\r\n\r\nexport enum ButtonIconPositionEnum {\r\n 'none'= '',\r\n 'left' = 'icon-left',\r\n 'right' = 'icon-right',\r\n}\r\n\r\nexport type ButtonIconPositionTypes= 'none' | 'left' | 'right'\r\n","export enum LoaderSizesEnum {\r\n 'extra-small' = 'mrx-loader-extra-sm',\r\n 'small' = 'mrx-loader-sm',\r\n 'medium' = 'mrx-loader-md',\r\n 'large' = 'mrx-loader-lg',\r\n}\r\n\r\nexport type LoaderSizesTypes = 'extra-small' | 'small' | 'medium' | 'large'\r\n\r\nexport enum LoaderColorEnum {\r\n 'black' = 'color-black',\r\n 'white' = 'color-white',\r\n 'brand' = 'color-brand',\r\n 'negative' = 'color-negative',\r\n 'positive' = 'color-positive',\r\n 'attention' = 'color-attention',\r\n 'red' = 'color-negative',\r\n 'green' = 'color-positive',\r\n 'yellow' = 'color-attention'\r\n}\r\n\r\nexport type LoaderColorTypes = 'black' | 'white' | 'brand' | 'red' | 'green' | 'yellow' | 'attention' | 'positive' | 'negative'\r\n","import { Component, Input } from '@angular/core';\r\nimport { LoaderColorEnum, LoaderColorTypes, LoaderSizesEnum, LoaderSizesTypes } from './loader.enum';\r\n\r\n@Component({\r\n selector: 'mrx-loader',\r\n templateUrl: './loader.component.html',\r\n})\r\nexport class LoaderComponent {\r\n @Input() size: LoaderSizesTypes = 'small'\r\n @Input() color: LoaderColorTypes = 'black'\r\n @Input() customClasses = '';\r\n\r\n public get getClasses(): string {\r\n return `${LoaderSizesEnum[this.size]} ${LoaderColorEnum[this.color]} ${this.customClasses}`;\r\n }\r\n}\r\n","<div class=\"mrx-loader\" [class]=\"getClasses\">\n <svg viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_17612_14183)\">\n <circle class=\"mrx-loader--circle\" cx=\"16\" cy=\"16\" r=\"14.1714\" stroke-width=\"3\"/>\n <path class=\"mrx-loader--line\" d=\"M30.1714 16C30.1714 8.17334 23.8267 1.82857 16 1.82857\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_17612_14183\">\n <rect width=\"32\" height=\"32\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n</div>\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\n\r\n@Pipe({\r\n name: 'safe'\r\n})\r\nexport class SafePipe implements PipeTransform {\r\n\r\n constructor(private sanitizer:DomSanitizer){}\r\n\r\n transform(html: any) {\r\n return this.sanitizer.bypassSecurityTrustHtml(html);\r\n }\r\n}\r\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport {\r\n ButtonColorsEnum,\r\n ButtonColorsTypes, ButtonIconPositionEnum,\r\n ButtonIconPositionTypes,\r\n ButtonSizesEnum,\r\n ButtonSizesTypes,\r\n ButtonTypes,\r\n ButtonTypesEnum\r\n} from './Button.enum';\r\nimport { LoaderColorTypes, LoaderSizesTypes } from '../loader/loader.enum';\r\n\r\n@Component({\r\n selector: 'mrx-button',\r\n templateUrl: 'button.component.html'\r\n})\r\nexport class ButtonComponent {\r\n @Input() size: ButtonSizesTypes = 'large';\r\n @Input() type: ButtonTypes = 'primary';\r\n @Input() color: ButtonColorsTypes = 'default';\r\n @Input() iconPosition: ButtonIconPositionTypes = 'left';\r\n @Input() active: boolean = false;\r\n @Input() disabled: boolean = false;\r\n @Input() isLoading: boolean = false;\r\n @Input() iconOnly: boolean = false;\r\n @Input() customClasses: string = '';\r\n @Input() label: string = '';\r\n @Input() icon: string = '';\r\n @Input() iconClass: string = '';\r\n\r\n @Output() mrxClick = new EventEmitter<MouseEvent>();\r\n\r\n public get getLabel(): null | string {\r\n return this.iconOnly ? null : this.label\r\n }\r\n\r\n public get isIcon(): boolean {\r\n return this.iconPosition !== 'none'\r\n }\r\n\r\n public get isIconLeft(): boolean {\r\n return this.iconPosition === 'left'\r\n }\r\n\r\n public get isIconRight(): boolean {\r\n return this.iconPosition === 'right'\r\n }\r\n\r\n public get getClasses(): string {\r\n return `${ButtonSizesEnum[this.size]} ${ButtonTypesEnum[this.type]} ${ButtonColorsEnum[this.color]} ${this.customClasses} ${ButtonIconPositionEnum[this.iconPosition]}`;\r\n }\r\n\r\n public get getLoaderColor(): LoaderColorTypes {\r\n if (this.disabled) {\r\n return 'black'\r\n }\r\n if (this.color === 'default') {\r\n return this.type === 'primary' ? 'white' : 'brand'\r\n } else if (this.type === 'primary') {\r\n return 'white'\r\n } else {\r\n return this.color\r\n }\r\n }\r\n\r\n public get getLoaderSize(): LoaderSizesTypes {\r\n return this.size === 'large' ? 'small' : this.size === 'medium' ? 'small' : 'extra-small'\r\n }\r\n\r\n public get getReplacedIcon(): string {\r\n return this.icon.replace(/\"([^\"]+)\"/g, '\\'$1\\'')\r\n }\r\n\r\n public buttonClick($event: MouseEvent): void {\r\n if (!this.disabled) {\r\n this.mrxClick.emit($event)\r\n } else {\r\n $event.stopPropagation()\r\n }\r\n }\r\n}\r\n","<button\r\n class=\"mrx-btn\"\r\n [class]=\"getClasses\"\r\n [class.active]=\"active\"\r\n [class.icon-only]=\"iconOnly\"\r\n [class.icon-loading]=\"isLoading && !disabled\"\r\n [disabled]=\"disabled\"\r\n (click)=\"buttonClick($event)\"\r\n>\r\n <ng-template #spinner>\r\n <mrx-loader\r\n [color]=\"getLoaderColor\"\r\n [size]=\"getLoaderSize\"\r\n ></mrx-loader>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isIconLeft && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconLeft && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.mr-1]=\"size === 'small' && !iconOnly\"\r\n [class.mr-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconLeft && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div class=\"mrx-btn-label\">{{ getLabel }}\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"iconClass && isIconRight && !isLoading\"\r\n >\r\n <span\r\n class=\"mrx-icon\"\r\n [class]=\"iconClass\"\r\n [class.icon-font-24]=\"size === 'large' || size === 'medium'\"\r\n [class.icon-font-20]=\"size === 'small'\"\r\n ></span>\r\n </div>\r\n\r\n <div\r\n class=\"icon-wrapper\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n *ngIf=\"icon && isIconRight && !isLoading\" [innerHTML]=\"getReplacedIcon | safe\"\r\n ></div>\r\n\r\n <ng-container *ngIf=\"isIconRight && isLoading && !disabled\">\r\n <div\r\n class=\"icon-wrapper\"\r\n (click)=\"$event.preventDefault()\"\r\n [class.ml-1]=\"size === 'small' && !iconOnly\"\r\n [class.ml-2]=\"(size === 'large' || size === 'medium') && !iconOnly\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"spinner\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</button>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SafePipe } from \"./safe.pipe\";\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [SafePipe],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: [SafePipe]\r\n})\r\nexport class SafeModule { }\r\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LoaderComponent } from './loader.component';\n\n@NgModule({\n declarations: [LoaderComponent],\n imports: [CommonModule],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n exports: [LoaderComponent]\n})\nexport class LoaderModule { }\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ButtonComponent } from './button.component';\r\nimport { SafeModule } from '../../pipes/safe/safe.module';\r\nimport { LoaderModule } from '../loader/loader.module';\r\n\r\n@NgModule({\r\n declarations: [ButtonComponent],\r\n imports: [CommonModule, SafeModule, LoaderModule],\r\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\r\n exports: [ButtonComponent],\r\n})\r\nexport class ButtonModule {}\r\n","// COMPONENTS\nexport * from './lib/components/button/button.module';\nexport * from './lib/components/button/button.component';\n\nexport * from './lib/components/loader/loader.module';\nexport * from './lib/components/loader/loader.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.LoaderComponent","i3.SafePipe"],"mappings":";;;;;;AAAA,IAAY,eAIX,CAAA;AAJD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,SAAA,CAAA,GAAA,iBAA6B,CAAA;AAC7B,IAAA,eAAA,CAAA,WAAA,CAAA,GAAA,mBAAiC,CAAA;AACjC,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,kBAA+B,CAAA;AACjC,CAAC,EAJW,eAAe,KAAf,eAAe,GAI1B,EAAA,CAAA,CAAA,CAAA;AAID,IAAY,eAIX,CAAA;AAJD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,YAAsB,CAAA;AACtB,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,YAAuB,CAAA;AACvB,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,YAAsB,CAAA;AACxB,CAAC,EAJW,eAAe,KAAf,eAAe,GAI1B,EAAA,CAAA,CAAA,CAAA;AAID,IAAY,gBAQX,CAAA;AARD,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,EAAa,CAAA;AACb,IAAA,gBAAA,CAAA,KAAA,CAAA,GAAA,KAAa,CAAA;AACb,IAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,QAAmB,CAAA;AACnB,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAiB,CAAA;AACjB,IAAA,gBAAA,CAAA,WAAA,CAAA,GAAA,iBAA+B,CAAA;AAC/B,IAAA,gBAAA,CAAA,UAAA,CAAA,GAAA,gBAA6B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AAC/B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC;oBACjD,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,OAAO,EAAE,CAAC,eAAe,CAAC;AAC3B,iBAAA,CAAA;;;ACXD;;ACAA;;AAEG;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum ButtonTypesEnum {
|
|
2
|
+
'primary' = "mrx-btn-primary",
|
|
3
|
+
'secondary' = "mrx-btn-secondary",
|
|
4
|
+
'tertiary' = "mrx-btn-tertiary"
|
|
5
|
+
}
|
|
6
|
+
export declare type ButtonTypes = 'primary' | 'secondary' | 'tertiary';
|
|
7
|
+
export declare enum ButtonSizesEnum {
|
|
8
|
+
'small' = "mrx-btn-sm",
|
|
9
|
+
'medium' = "mrx-btn-md",
|
|
10
|
+
'large' = "mrx-btn-lg"
|
|
11
|
+
}
|
|
12
|
+
export declare type ButtonSizesTypes = 'small' | 'medium' | 'large';
|
|
13
|
+
export declare enum ButtonColorsEnum {
|
|
14
|
+
'default' = "",
|
|
15
|
+
'red' = "red",
|
|
16
|
+
'yellow' = "yellow",
|
|
17
|
+
'green' = "green",
|
|
18
|
+
'attention' = "color-attention",
|
|
19
|
+
'positive' = "color-positive",
|
|
20
|
+
'negative' = "color-negative"
|
|
21
|
+
}
|
|
22
|
+
export declare type ButtonColorsTypes = 'red' | 'green' | 'yellow' | 'default' | 'attention' | 'positive' | 'negative';
|
|
23
|
+
export declare enum ButtonIconPositionEnum {
|
|
24
|
+
'none' = "",
|
|
25
|
+
'left' = "icon-left",
|
|
26
|
+
'right' = "icon-right"
|
|
27
|
+
}
|
|
28
|
+
export declare type ButtonIconPositionTypes = 'none' | 'left' | 'right';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ButtonColorsTypes, ButtonIconPositionTypes, ButtonSizesTypes, ButtonTypes } from './Button.enum';
|
|
3
|
+
import { LoaderColorTypes, LoaderSizesTypes } from '../loader/loader.enum';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ButtonComponent {
|
|
6
|
+
size: ButtonSizesTypes;
|
|
7
|
+
type: ButtonTypes;
|
|
8
|
+
color: ButtonColorsTypes;
|
|
9
|
+
iconPosition: ButtonIconPositionTypes;
|
|
10
|
+
active: boolean;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
iconOnly: boolean;
|
|
14
|
+
customClasses: string;
|
|
15
|
+
label: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
iconClass: string;
|
|
18
|
+
mrxClick: EventEmitter<MouseEvent>;
|
|
19
|
+
get getLabel(): null | string;
|
|
20
|
+
get isIcon(): boolean;
|
|
21
|
+
get isIconLeft(): boolean;
|
|
22
|
+
get isIconRight(): boolean;
|
|
23
|
+
get getClasses(): string;
|
|
24
|
+
get getLoaderColor(): LoaderColorTypes;
|
|
25
|
+
get getLoaderSize(): LoaderSizesTypes;
|
|
26
|
+
get getReplacedIcon(): string;
|
|
27
|
+
buttonClick($event: MouseEvent): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "mrx-button", never, { "size": "size"; "type": "type"; "color": "color"; "iconPosition": "iconPosition"; "active": "active"; "disabled": "disabled"; "isLoading": "isLoading"; "iconOnly": "iconOnly"; "customClasses": "customClasses"; "label": "label"; "icon": "icon"; "iconClass": "iconClass"; }, { "mrxClick": "mrxClick"; }, never, ["*"]>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./button.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../../pipes/safe/safe.module";
|
|
5
|
+
import * as i4 from "../loader/loader.module";
|
|
6
|
+
export declare class ButtonModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonModule, [typeof i1.ButtonComponent], [typeof i2.CommonModule, typeof i3.SafeModule, typeof i4.LoaderModule], [typeof i1.ButtonComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ButtonModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LoaderColorTypes, LoaderSizesTypes } from './loader.enum';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LoaderComponent {
|
|
4
|
+
size: LoaderSizesTypes;
|
|
5
|
+
color: LoaderColorTypes;
|
|
6
|
+
customClasses: string;
|
|
7
|
+
get getClasses(): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoaderComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoaderComponent, "mrx-loader", never, { "size": "size"; "color": "color"; "customClasses": "customClasses"; }, {}, never, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum LoaderSizesEnum {
|
|
2
|
+
'extra-small' = "mrx-loader-extra-sm",
|
|
3
|
+
'small' = "mrx-loader-sm",
|
|
4
|
+
'medium' = "mrx-loader-md",
|
|
5
|
+
'large' = "mrx-loader-lg"
|
|
6
|
+
}
|
|
7
|
+
export declare type LoaderSizesTypes = 'extra-small' | 'small' | 'medium' | 'large';
|
|
8
|
+
export declare enum LoaderColorEnum {
|
|
9
|
+
'black' = "color-black",
|
|
10
|
+
'white' = "color-white",
|
|
11
|
+
'brand' = "color-brand",
|
|
12
|
+
'negative' = "color-negative",
|
|
13
|
+
'positive' = "color-positive",
|
|
14
|
+
'attention' = "color-attention",
|
|
15
|
+
'red' = "color-negative",
|
|
16
|
+
'green' = "color-positive",
|
|
17
|
+
'yellow' = "color-attention"
|
|
18
|
+
}
|
|
19
|
+
export declare type LoaderColorTypes = 'black' | 'white' | 'brand' | 'red' | 'green' | 'yellow' | 'attention' | 'positive' | 'negative';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./loader.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class LoaderModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoaderModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LoaderModule, [typeof i1.LoaderComponent], [typeof i2.CommonModule], [typeof i1.LoaderComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LoaderModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./safe.pipe";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class SafeModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SafeModule, [typeof i1.SafePipe], [typeof i2.CommonModule], [typeof i1.SafePipe]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SafeModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SafePipe implements PipeTransform {
|
|
5
|
+
private sanitizer;
|
|
6
|
+
constructor(sanitizer: DomSanitizer);
|
|
7
|
+
transform(html: any): import("@angular/platform-browser").SafeHtml;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafePipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafePipe, "safe">;
|
|
10
|
+
}
|
package/myrta-ui.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "myrta-ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^13.3.0",
|
|
6
|
+
"@angular/core": "^13.3.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"module": "fesm2015/myrta-ui.mjs",
|
|
12
|
+
"es2020": "fesm2020/myrta-ui.mjs",
|
|
13
|
+
"esm2020": "esm2020/myrta-ui.mjs",
|
|
14
|
+
"fesm2020": "fesm2020/myrta-ui.mjs",
|
|
15
|
+
"fesm2015": "fesm2015/myrta-ui.mjs",
|
|
16
|
+
"typings": "myrta-ui.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
"./package.json": {
|
|
19
|
+
"default": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./myrta-ui.d.ts",
|
|
23
|
+
"esm2020": "./esm2020/myrta-ui.mjs",
|
|
24
|
+
"es2020": "./fesm2020/myrta-ui.mjs",
|
|
25
|
+
"es2015": "./fesm2015/myrta-ui.mjs",
|
|
26
|
+
"node": "./fesm2015/myrta-ui.mjs",
|
|
27
|
+
"default": "./fesm2020/myrta-ui.mjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": false
|
|
31
|
+
}
|
package/public-api.d.ts
ADDED