ngx-opalbytes-components 1.2.0 → 1.4.0

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.
@@ -1,27 +1,10 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, EventEmitter, Input, Output } from '@angular/core';
3
1
  import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
2
+ import { CommonModule, NgOptimizedImage } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, Input, Output, Component } from '@angular/core';
5
5
  import * as i2 from '@angular/material/tooltip';
6
6
  import { MatTooltipModule } from '@angular/material/tooltip';
7
7
 
8
- class NgxOpalbytesComponents {
9
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: NgxOpalbytesComponents, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.2", type: NgxOpalbytesComponents, isStandalone: true, selector: "lib-ngx-opalbytes-components", ngImport: i0, template: `
11
- <p>
12
- ngx-opalbytes-components works!
13
- </p>
14
- `, isInline: true, styles: [""] });
15
- }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: NgxOpalbytesComponents, decorators: [{
17
- type: Component,
18
- args: [{ selector: 'lib-ngx-opalbytes-components', imports: [], template: `
19
- <p>
20
- ngx-opalbytes-components works!
21
- </p>
22
- ` }]
23
- }] });
24
-
25
8
  class BaseButton {
26
9
  buttonClick = new EventEmitter();
27
10
  buttonText = "Clique!";
@@ -48,11 +31,11 @@ class BaseButton {
48
31
  }
49
32
  }
50
33
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: BaseButton, isStandalone: true, selector: "lib-base-button", inputs: { buttonText: "buttonText", isDarkMode: "isDarkMode", isDisabled: "isDisabled", isLoading: "isLoading", useMaterialIcons: "useMaterialIcons", btnClass: "btnClass", tooltip: "tooltip", trailingIcon: "trailingIcon", leadingIcon: "leadingIcon", dataCy: "dataCy" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<button\n [matTooltip]=\"tooltip\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"custom-arrow-tooltip\"\n [matTooltipDisabled]=\"!tooltip\"\n [disabled]=\"isDisabled || isLoading\"\n [class.darkMode]=\"isDarkMode\"\n [class.disabled]=\"isDisabled\"\n [class.loading]=\"isLoading\"\n [ngClass]=\"btnClass\"\n [attr.data-cy]=\"dataCy\"\n (click)=\"onClick()\">\n @if (leadingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons leading-icon' : 'leading-icon'\">\n @if(useMaterialIcons) { {{ leadingIcon }} } @else {\n <img [src]=\"leadingIcon\" alt=\"icon\" />\n }\n </span>\n } {{ buttonText }} @if (trailingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons trailing-icon' : 'trailing-icon'\">\n @if(useMaterialIcons){ {{ trailingIcon }} } @else {\n <img [src]=\"trailingIcon\" alt=\"icon\" />\n }\n </span>\n } @if (isLoading) {\n <span class=\"loader\"></span>\n }\n</button>\n", styles: ["button:hover{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
34
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: BaseButton, isStandalone: true, selector: "cao-base-button", inputs: { buttonText: "buttonText", isDarkMode: "isDarkMode", isDisabled: "isDisabled", isLoading: "isLoading", useMaterialIcons: "useMaterialIcons", btnClass: "btnClass", tooltip: "tooltip", trailingIcon: "trailingIcon", leadingIcon: "leadingIcon", dataCy: "dataCy" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<button\n type=\"button\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"custom-arrow-tooltip\"\n [matTooltip]=\"tooltip\"\n [matTooltipDisabled]=\"!tooltip\"\n [disabled]=\"isDisabled || isLoading\"\n [class.darkMode]=\"isDarkMode\"\n [class.disabled]=\"isDisabled\"\n [class.loading]=\"isLoading\"\n [ngClass]=\"btnClass\"\n [attr.data-cy]=\"dataCy\"\n (click)=\"onClick()\">\n @if (leadingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons leading-icon' : 'leading-icon'\">\n @if(useMaterialIcons) { {{ leadingIcon }} } @else {\n <img alt=\"icon\" [ngSrc]=\"leadingIcon\" />\n }\n </span>\n } {{ buttonText }} @if (trailingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons trailing-icon' : 'trailing-icon'\">\n @if(useMaterialIcons){ {{ trailingIcon }} } @else {\n <img alt=\"icon\" [ngSrc]=\"trailingIcon\" />\n }\n </span>\n } @if (isLoading) {\n <span class=\"loader\"></span>\n }\n</button>\n", styles: ["button:hover{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }] });
52
35
  }
53
36
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseButton, decorators: [{
54
37
  type: Component,
55
- args: [{ selector: 'lib-base-button', imports: [CommonModule, MatTooltipModule], template: "<button\n [matTooltip]=\"tooltip\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"custom-arrow-tooltip\"\n [matTooltipDisabled]=\"!tooltip\"\n [disabled]=\"isDisabled || isLoading\"\n [class.darkMode]=\"isDarkMode\"\n [class.disabled]=\"isDisabled\"\n [class.loading]=\"isLoading\"\n [ngClass]=\"btnClass\"\n [attr.data-cy]=\"dataCy\"\n (click)=\"onClick()\">\n @if (leadingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons leading-icon' : 'leading-icon'\">\n @if(useMaterialIcons) { {{ leadingIcon }} } @else {\n <img [src]=\"leadingIcon\" alt=\"icon\" />\n }\n </span>\n } {{ buttonText }} @if (trailingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons trailing-icon' : 'trailing-icon'\">\n @if(useMaterialIcons){ {{ trailingIcon }} } @else {\n <img [src]=\"trailingIcon\" alt=\"icon\" />\n }\n </span>\n } @if (isLoading) {\n <span class=\"loader\"></span>\n }\n</button>\n", styles: ["button:hover{cursor:pointer}\n"] }]
38
+ args: [{ selector: 'cao-base-button', imports: [CommonModule, MatTooltipModule, NgOptimizedImage], template: "<button\n type=\"button\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"custom-arrow-tooltip\"\n [matTooltip]=\"tooltip\"\n [matTooltipDisabled]=\"!tooltip\"\n [disabled]=\"isDisabled || isLoading\"\n [class.darkMode]=\"isDarkMode\"\n [class.disabled]=\"isDisabled\"\n [class.loading]=\"isLoading\"\n [ngClass]=\"btnClass\"\n [attr.data-cy]=\"dataCy\"\n (click)=\"onClick()\">\n @if (leadingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons leading-icon' : 'leading-icon'\">\n @if(useMaterialIcons) { {{ leadingIcon }} } @else {\n <img alt=\"icon\" [ngSrc]=\"leadingIcon\" />\n }\n </span>\n } {{ buttonText }} @if (trailingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons trailing-icon' : 'trailing-icon'\">\n @if(useMaterialIcons){ {{ trailingIcon }} } @else {\n <img alt=\"icon\" [ngSrc]=\"trailingIcon\" />\n }\n </span>\n } @if (isLoading) {\n <span class=\"loader\"></span>\n }\n</button>\n", styles: ["button:hover{cursor:pointer}\n"] }]
56
39
  }], propDecorators: { buttonClick: [{
57
40
  type: Output
58
41
  }], buttonText: [{
@@ -77,6 +60,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
77
60
  type: Input
78
61
  }] } });
79
62
 
63
+ class BaseAlert {
64
+ data;
65
+ iconPaths = {
66
+ success: "https://placehold.co/600x400",
67
+ error: "https://placehold.co/600x400",
68
+ info: "https://placehold.co/600x400",
69
+ warning: "https://placehold.co/600x400",
70
+ };
71
+ getIconPath(type) {
72
+ return this.iconPaths[type];
73
+ }
74
+ getTitleClass(type) {
75
+ return `title-${type}`;
76
+ }
77
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
78
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: BaseAlert, isStandalone: true, selector: "cao-base-alert", ngImport: i0, template: "<div class=\"dialog-container\">\n <div class=\"dialog-content\">\n <img alt=\"R-Clinicas Logo\" class=\"logo\" [ngSrc]=\"data.alertIcon ?? ''\" [fill]=\"true\" />\n <div class=\"alert-wrapper\">\n <div class=\"text-content\">\n @if (data.title) {\n <div class=\"title\" [ngClass]=\"getTitleClass(data.type)\">{{ data.title }}</div>\n } @if (data.title && data.message) {\n <div class=\"message-spacer\"></div>\n } @if (data.message) {\n <div class=\"message\">{{ data.message }}</div>\n }\n </div>\n <div class=\"icon-container\">\n <img alt=\"Alert Icon\" class=\"alert-icon\" [ngSrc]=\"getIconPath(data.type)\" [fill]=\"true\" />\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }] });
79
+ }
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseAlert, decorators: [{
81
+ type: Component,
82
+ args: [{ selector: 'cao-base-alert', imports: [CommonModule, NgOptimizedImage], template: "<div class=\"dialog-container\">\n <div class=\"dialog-content\">\n <img alt=\"R-Clinicas Logo\" class=\"logo\" [ngSrc]=\"data.alertIcon ?? ''\" [fill]=\"true\" />\n <div class=\"alert-wrapper\">\n <div class=\"text-content\">\n @if (data.title) {\n <div class=\"title\" [ngClass]=\"getTitleClass(data.type)\">{{ data.title }}</div>\n } @if (data.title && data.message) {\n <div class=\"message-spacer\"></div>\n } @if (data.message) {\n <div class=\"message\">{{ data.message }}</div>\n }\n </div>\n <div class=\"icon-container\">\n <img alt=\"Alert Icon\" class=\"alert-icon\" [ngSrc]=\"getIconPath(data.type)\" [fill]=\"true\" />\n </div>\n </div>\n </div>\n</div>\n" }]
83
+ }] });
84
+
85
+ class BaseDialog {
86
+ config;
87
+ closeDialog = this.noop;
88
+ iconPaths = {
89
+ success: "https://placehold.co/600x400",
90
+ error: "https://placehold.co/600x400",
91
+ info: "https://placehold.co/600x400",
92
+ warning: "https://placehold.co/600x400",
93
+ };
94
+ noop() {
95
+ return;
96
+ }
97
+ getIconPath() {
98
+ return this.iconPaths[this.config.type];
99
+ }
100
+ handleConfirm() {
101
+ this.config.onConfirm?.();
102
+ this.closeDialog();
103
+ }
104
+ handleCancel() {
105
+ this.config.onCancel?.();
106
+ this.closeDialog();
107
+ }
108
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: BaseDialog, isStandalone: true, selector: "cao-base-dialog", inputs: { config: "config" }, ngImport: i0, template: "\n<div class=\"dialog-container\">\n <div class=\"dialog-content\">\n <img alt=\"Logo\" class=\"logo\" [fill]=\"true\" [ngSrc]=\"config.logoIcon ?? ''\" />\n <div class=\"alert-wrapper\">\n <div class=\"text-content\" [ngClass]=\"config.type\">\n <div class=\"title\">{{ config.title }}</div>\n <div class=\"message\">{{ config.message }}</div>\n <div class=\"button-container\">\n @if (config.cancelButtonText) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n [attr.data-cy]=\"config.cancelButtonText\"\n (click)=\"handleCancel()\">\n {{ config.cancelButtonText }}\n </button>\n } @if (config.confirmButtonText) {\n <button\n type=\"button\"\n class=\"confirm-button\"\n [ngClass]=\"config.type\"\n [attr.data-cy]=\"config.confirmButtonText\"\n (click)=\"handleConfirm()\">\n {{ config.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n <div class=\"icon-container\">\n <img alt=\"Dialog Icon\" class=\"alert-icon\" [fill]=\"true\" [ngSrc]=\"getIconPath()\" />\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }] });
110
+ }
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseDialog, decorators: [{
112
+ type: Component,
113
+ args: [{ selector: 'cao-base-dialog', imports: [CommonModule, NgOptimizedImage], template: "\n<div class=\"dialog-container\">\n <div class=\"dialog-content\">\n <img alt=\"Logo\" class=\"logo\" [fill]=\"true\" [ngSrc]=\"config.logoIcon ?? ''\" />\n <div class=\"alert-wrapper\">\n <div class=\"text-content\" [ngClass]=\"config.type\">\n <div class=\"title\">{{ config.title }}</div>\n <div class=\"message\">{{ config.message }}</div>\n <div class=\"button-container\">\n @if (config.cancelButtonText) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n [attr.data-cy]=\"config.cancelButtonText\"\n (click)=\"handleCancel()\">\n {{ config.cancelButtonText }}\n </button>\n } @if (config.confirmButtonText) {\n <button\n type=\"button\"\n class=\"confirm-button\"\n [ngClass]=\"config.type\"\n [attr.data-cy]=\"config.confirmButtonText\"\n (click)=\"handleConfirm()\">\n {{ config.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n <div class=\"icon-container\">\n <img alt=\"Dialog Icon\" class=\"alert-icon\" [fill]=\"true\" [ngSrc]=\"getIconPath()\" />\n </div>\n </div>\n </div>\n</div>\n" }]
114
+ }], propDecorators: { config: [{
115
+ type: Input
116
+ }] } });
117
+
80
118
  /*
81
119
  * Public API Surface of ngx-opalbytes-components
82
120
  */
@@ -85,5 +123,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
85
123
  * Generated bundle index. Do not edit.
86
124
  */
87
125
 
88
- export { BaseButton, NgxOpalbytesComponents };
126
+ export { BaseAlert, BaseButton, BaseDialog };
89
127
  //# sourceMappingURL=ngx-opalbytes-components.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-opalbytes-components.mjs","sources":["../../../projects/ngx-opalbytes-components/src/lib/ngx-opalbytes-components.ts","../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-button/base-button.ts","../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-button/base-button.html","../../../projects/ngx-opalbytes-components/src/public-api.ts","../../../projects/ngx-opalbytes-components/src/ngx-opalbytes-components.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-ngx-opalbytes-components',\n imports: [],\n template: `\n <p>\n ngx-opalbytes-components works!\n </p>\n `,\n styles: ``,\n})\nexport class NgxOpalbytesComponents {\n\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@Component({\n selector: 'lib-base-button',\n imports: [CommonModule, MatTooltipModule],\n templateUrl: './base-button.html',\n styleUrl: './base-button.css',\n})\nexport class BaseButton implements OnInit {\n @Output() readonly buttonClick = new EventEmitter<void>();\n\n @Input() buttonText = \"Clique!\";\n @Input() isDarkMode = false;\n @Input() isDisabled = false;\n @Input() isLoading = false;\n @Input() useMaterialIcons = false;\n @Input() btnClass = \"\";\n\n @Input() tooltip?:string;\n @Input() trailingIcon?: string;\n @Input() leadingIcon?: string;\n @Input() dataCy?: string;\n\n ngOnInit(): void {\n if (!this.dataCy) {\n this.dataCy = `btn-${this.buttonText.replace(/\\s+/g, '-').toLowerCase()}`;\n }\n\n if(!this.tooltip && this.buttonText.length >= 20){\n this.tooltip = this.buttonText\n }\n }\n\n onClick(): void {\n if (!this.isDisabled && !this.isLoading) {\n this.buttonClick.emit();\n }\n }\n}\n","<button\n [matTooltip]=\"tooltip\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"custom-arrow-tooltip\"\n [matTooltipDisabled]=\"!tooltip\"\n [disabled]=\"isDisabled || isLoading\"\n [class.darkMode]=\"isDarkMode\"\n [class.disabled]=\"isDisabled\"\n [class.loading]=\"isLoading\"\n [ngClass]=\"btnClass\"\n [attr.data-cy]=\"dataCy\"\n (click)=\"onClick()\">\n @if (leadingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons leading-icon' : 'leading-icon'\">\n @if(useMaterialIcons) { {{ leadingIcon }} } @else {\n <img [src]=\"leadingIcon\" alt=\"icon\" />\n }\n </span>\n } {{ buttonText }} @if (trailingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons trailing-icon' : 'trailing-icon'\">\n @if(useMaterialIcons){ {{ trailingIcon }} } @else {\n <img [src]=\"trailingIcon\" alt=\"icon\" />\n }\n </span>\n } @if (isLoading) {\n <span class=\"loader\"></span>\n }\n</button>\n","/*\n * Public API Surface of ngx-opalbytes-components\n */\n\nexport * from './lib/ngx-opalbytes-components';\nexport * from './lib/shared/components/base-button/base-button'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAYa,sBAAsB,CAAA;uGAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPvB;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;+BACE,8BAA8B,EAAA,OAAA,EAC/B,EAAE,EAAA,QAAA,EACD;;;;AAIT,EAAA,CAAA,EAAA;;;MCCU,UAAU,CAAA;AACF,IAAA,WAAW,GAAG,IAAI,YAAY,EAAQ;IAEhD,UAAU,GAAG,SAAS;IACtB,UAAU,GAAG,KAAK;IAClB,UAAU,GAAG,KA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EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVvB,86BA4BA,EAAA,MAAA,EAAA,CAAA,gCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDtBY,YAAY,4HAAE,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,4BAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,yBAAA,EAAA,YAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAI7B,UAAU,EAAA,UAAA,EAAA,CAAA;kBANtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,86BAAA,EAAA,MAAA,EAAA,CAAA,gCAAA,CAAA,EAAA;;sBAKxC;;sBAEA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;;AEvBH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-opalbytes-components.mjs","sources":["../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-button/base-button.ts","../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-button/base-button.html","../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-alert/base-alert.ts","../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-alert/base-alert.html","../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-dialog/base-dialog.ts","../../../projects/ngx-opalbytes-components/src/lib/shared/components/base-dialog/base-dialog.html","../../../projects/ngx-opalbytes-components/src/public-api.ts","../../../projects/ngx-opalbytes-components/src/ngx-opalbytes-components.ts"],"sourcesContent":["import { CommonModule, NgOptimizedImage } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@Component({\n selector: 'cao-base-button',\n imports: [CommonModule, MatTooltipModule, NgOptimizedImage],\n templateUrl: './base-button.html',\n styleUrl: './base-button.css',\n})\nexport class BaseButton implements OnInit {\n @Output() readonly buttonClick = new EventEmitter<void>();\n\n @Input() buttonText = \"Clique!\";\n @Input() isDarkMode = false;\n @Input() isDisabled = false;\n @Input() isLoading = false;\n @Input() useMaterialIcons = false;\n @Input() btnClass = \"\";\n\n @Input() tooltip?:string;\n @Input() trailingIcon?: string;\n @Input() leadingIcon?: string;\n @Input() dataCy?: string;\n\n ngOnInit(): void {\n if (!this.dataCy) {\n this.dataCy = `btn-${this.buttonText.replace(/\\s+/g, '-').toLowerCase()}`;\n }\n\n if(!this.tooltip && this.buttonText.length >= 20){\n this.tooltip = this.buttonText\n }\n }\n\n onClick(): void {\n if (!this.isDisabled && !this.isLoading) {\n this.buttonClick.emit();\n }\n }\n}\n","<button\n type=\"button\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"custom-arrow-tooltip\"\n [matTooltip]=\"tooltip\"\n [matTooltipDisabled]=\"!tooltip\"\n [disabled]=\"isDisabled || isLoading\"\n [class.darkMode]=\"isDarkMode\"\n [class.disabled]=\"isDisabled\"\n [class.loading]=\"isLoading\"\n [ngClass]=\"btnClass\"\n [attr.data-cy]=\"dataCy\"\n (click)=\"onClick()\">\n @if (leadingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons leading-icon' : 'leading-icon'\">\n @if(useMaterialIcons) { {{ leadingIcon }} } @else {\n <img alt=\"icon\" [ngSrc]=\"leadingIcon\" />\n }\n </span>\n } {{ buttonText }} @if (trailingIcon) {\n <span [class]=\"useMaterialIcons ? 'material-icons trailing-icon' : 'trailing-icon'\">\n @if(useMaterialIcons){ {{ trailingIcon }} } @else {\n <img alt=\"icon\" [ngSrc]=\"trailingIcon\" />\n }\n </span>\n } @if (isLoading) {\n <span class=\"loader\"></span>\n }\n</button>\n","import { CommonModule, NgOptimizedImage } from '@angular/common';\nimport { Component } from '@angular/core';\n\nexport type AlertType = \"success\" | \"error\" | \"info\" | \"warning\";\n\nexport interface IAlertConfig {\n type: AlertType;\n title: string;\n message: string;\n alertIcon?: string; \n}\n\n\n@Component({\n selector: 'cao-base-alert',\n imports: [CommonModule, NgOptimizedImage],\n templateUrl: './base-alert.html',\n styleUrl: './base-alert.css',\n})\nexport class BaseAlert {\n data!: {\n type: AlertType;\n title: string;\n message: string;\n alertIcon?: string\n };\n\n private iconPaths: Record<AlertType, string> = {\n success: \"https://placehold.co/600x400\",\n error: \"https://placehold.co/600x400\",\n info: \"https://placehold.co/600x400\",\n warning: \"https://placehold.co/600x400\",\n };\n\n getIconPath(type: AlertType): string {\n return this.iconPaths[type];\n }\n\n getTitleClass(type: AlertType): string {\n return `title-${type}`;\n }\n}\n","<div class=\"dialog-container\">\n <div class=\"dialog-content\">\n <img alt=\"R-Clinicas Logo\" class=\"logo\" [ngSrc]=\"data.alertIcon ?? ''\" [fill]=\"true\" />\n <div class=\"alert-wrapper\">\n <div class=\"text-content\">\n @if (data.title) {\n <div class=\"title\" [ngClass]=\"getTitleClass(data.type)\">{{ data.title }}</div>\n } @if (data.title && data.message) {\n <div class=\"message-spacer\"></div>\n } @if (data.message) {\n <div class=\"message\">{{ data.message }}</div>\n }\n </div>\n <div class=\"icon-container\">\n <img alt=\"Alert Icon\" class=\"alert-icon\" [ngSrc]=\"getIconPath(data.type)\" [fill]=\"true\" />\n </div>\n </div>\n </div>\n</div>\n","import { CommonModule, NgOptimizedImage } from '@angular/common';\nimport { Component, Input } from '@angular/core';\n\nexport type DialogType = \"success\" | \"error\" | \"info\" | \"warning\";\n\nexport interface IDialogConfig {\n type: DialogType;\n title: string;\n logoIcon?: string;\n message: string;\n confirmButtonText: string;\n cancelButtonText: string;\n onConfirm: () => void;\n onCancel: () => void;\n}\n\n@Component({\n selector: 'cao-base-dialog',\n imports: [CommonModule, NgOptimizedImage],\n templateUrl: './base-dialog.html',\n styleUrl: './base-dialog.css',\n})\nexport class BaseDialog {\n @Input() config!: IDialogConfig;\n\n closeDialog: () => void = this.noop;\n\n protected iconPaths: Record<DialogType, string> = {\n success: \"https://placehold.co/600x400\",\n error: \"https://placehold.co/600x400\",\n info: \"https://placehold.co/600x400\",\n warning: \"https://placehold.co/600x400\",\n };\n\n private noop(): void {\n return\n }\n\n getIconPath(): string {\n return this.iconPaths[this.config.type];\n }\n\n handleConfirm(): void {\n this.config.onConfirm?.();\n this.closeDialog();\n }\n\n handleCancel(): void {\n this.config.onCancel?.();\n this.closeDialog();\n }\n}","\n<div class=\"dialog-container\">\n <div class=\"dialog-content\">\n <img alt=\"Logo\" class=\"logo\" [fill]=\"true\" [ngSrc]=\"config.logoIcon ?? ''\" />\n <div class=\"alert-wrapper\">\n <div class=\"text-content\" [ngClass]=\"config.type\">\n <div class=\"title\">{{ config.title }}</div>\n <div class=\"message\">{{ config.message }}</div>\n <div class=\"button-container\">\n @if (config.cancelButtonText) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n [attr.data-cy]=\"config.cancelButtonText\"\n (click)=\"handleCancel()\">\n {{ config.cancelButtonText }}\n </button>\n } @if (config.confirmButtonText) {\n <button\n type=\"button\"\n class=\"confirm-button\"\n [ngClass]=\"config.type\"\n [attr.data-cy]=\"config.confirmButtonText\"\n (click)=\"handleConfirm()\">\n {{ config.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n <div class=\"icon-container\">\n <img alt=\"Dialog Icon\" class=\"alert-icon\" [fill]=\"true\" [ngSrc]=\"getIconPath()\" />\n </div>\n </div>\n </div>\n</div>\n","/*\n * Public API Surface of ngx-opalbytes-components\n */\n\nexport * from './lib/shared/components/base-button/base-button'\nexport * from './lib/shared/components/base-alert/base-alert'\nexport * from './lib/shared/components/base-dialog/base-dialog'","/**\n * Generated bundle index.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 "version": "1.4.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0",
@@ -1,11 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnInit, EventEmitter } from '@angular/core';
3
3
 
4
- declare class NgxOpalbytesComponents {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxOpalbytesComponents, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxOpalbytesComponents, "lib-ngx-opalbytes-components", never, {}, {}, never, never, true, never>;
7
- }
8
-
9
4
  declare class BaseButton implements OnInit {
10
5
  readonly buttonClick: EventEmitter<void>;
11
6
  buttonText: string;
@@ -21,7 +16,52 @@ declare class BaseButton implements OnInit {
21
16
  ngOnInit(): void;
22
17
  onClick(): void;
23
18
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseButton, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseButton, "lib-base-button", never, { "buttonText": { "alias": "buttonText"; "required": false; }; "isDarkMode": { "alias": "isDarkMode"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "useMaterialIcons": { "alias": "useMaterialIcons"; "required": false; }; "btnClass": { "alias": "btnClass"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; }; "dataCy": { "alias": "dataCy"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseButton, "cao-base-button", never, { "buttonText": { "alias": "buttonText"; "required": false; }; "isDarkMode": { "alias": "isDarkMode"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "useMaterialIcons": { "alias": "useMaterialIcons"; "required": false; }; "btnClass": { "alias": "btnClass"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; }; "dataCy": { "alias": "dataCy"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
20
+ }
21
+
22
+ type AlertType = "success" | "error" | "info" | "warning";
23
+ interface IAlertConfig {
24
+ type: AlertType;
25
+ title: string;
26
+ message: string;
27
+ alertIcon?: string;
28
+ }
29
+ declare class BaseAlert {
30
+ data: {
31
+ type: AlertType;
32
+ title: string;
33
+ message: string;
34
+ alertIcon?: string;
35
+ };
36
+ private iconPaths;
37
+ getIconPath(type: AlertType): string;
38
+ getTitleClass(type: AlertType): string;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseAlert, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseAlert, "cao-base-alert", never, {}, {}, never, never, true, never>;
41
+ }
42
+
43
+ type DialogType = "success" | "error" | "info" | "warning";
44
+ interface IDialogConfig {
45
+ type: DialogType;
46
+ title: string;
47
+ logoIcon?: string;
48
+ message: string;
49
+ confirmButtonText: string;
50
+ cancelButtonText: string;
51
+ onConfirm: () => void;
52
+ onCancel: () => void;
53
+ }
54
+ declare class BaseDialog {
55
+ config: IDialogConfig;
56
+ closeDialog: () => void;
57
+ protected iconPaths: Record<DialogType, string>;
58
+ private noop;
59
+ getIconPath(): string;
60
+ handleConfirm(): void;
61
+ handleCancel(): void;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseDialog, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseDialog, "cao-base-dialog", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
25
64
  }
26
65
 
27
- export { BaseButton, NgxOpalbytesComponents };
66
+ export { BaseAlert, BaseButton, BaseDialog };
67
+ export type { AlertType, DialogType, IAlertConfig, IDialogConfig };