ngx-opalbytes-components 1.3.0 → 1.5.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.
package/README.md
CHANGED
|
@@ -1,63 +1,111 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 📦 ngx-opalbytes-components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Uma biblioteca de componentes de UI reutilizáveis para aplicações Angular, projetada para acelerar o desenvolvimento e manter a consistência visual.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
|
+
## Compatibilidade
|
|
7
|
+
|Tecnologia | Versão | Descrição |
|
|
8
|
+
|------------|----------|-------------------------------------|
|
|
9
|
+
| Angular | ^21.0.0 | Framework principal da biblioteca |
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
## Instalação
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
13
|
+
Para instalar a biblioteca, execute o seguinte comando:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
npm install ngx-opalbytes-components
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
## Building
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
## Dependências
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
ng build ngx-opalbytes-components
|
|
25
|
-
```
|
|
22
|
+
Esta biblioteca possui as seguintes dependências:
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
### `peerDependencies`
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
| Pacote | Versão |
|
|
27
|
+
| :----- | :----- |
|
|
28
|
+
| `@angular/common` | `^21.0.0` |
|
|
29
|
+
| `@angular/core` | `^21.0.0` |
|
|
30
|
+
| `@angular/material` | `^21.0.3` |
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
### `dependencies`
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
34
|
+
| Pacote | Versão |
|
|
35
|
+
| :----- | :----- |
|
|
36
|
+
| `tslib` | `^2.3.0` |
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
npm publish
|
|
41
|
-
```
|
|
38
|
+
---
|
|
39
|
+
## Como Usar
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
Os componentes nesta biblioteca são `standalone`, o que significa que você pode importá-los diretamente nos seus componentes ou módulos.
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
**Exemplo de importação em um componente:**
|
|
46
44
|
|
|
47
|
-
```
|
|
48
|
-
|
|
45
|
+
```typescript
|
|
46
|
+
import { Component } from '@angular/core';
|
|
47
|
+
// Importe o componente desejado
|
|
48
|
+
import { BaseButton } from 'ngx-opalbytes-components';
|
|
49
|
+
|
|
50
|
+
@Component({
|
|
51
|
+
selector: 'app-exemplo',
|
|
52
|
+
standalone: true,
|
|
53
|
+
imports: [
|
|
54
|
+
BaseButton // Adicione o componente aos imports
|
|
55
|
+
],
|
|
56
|
+
template: `
|
|
57
|
+
<cao-base-button buttonText="Clique Aqui"></cao-base-button>
|
|
58
|
+
`
|
|
59
|
+
})
|
|
60
|
+
export class ExemploComponent { }
|
|
49
61
|
```
|
|
50
62
|
|
|
51
|
-
|
|
63
|
+
---
|
|
52
64
|
|
|
53
|
-
|
|
65
|
+
## Organização de Pastas
|
|
54
66
|
|
|
55
|
-
|
|
56
|
-
|
|
67
|
+
Dentro da pasta `src/lib/`, os componentes são organizados em `shared/components/` e cada componente reside em sua própria pasta, contendo seus arquivos (`.ts`, `.html`, `.css`, `.spec.ts`).
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
src/
|
|
71
|
+
└── lib/
|
|
72
|
+
└── shared/
|
|
73
|
+
└── components/
|
|
74
|
+
├── base-alert/
|
|
75
|
+
└── base-button/
|
|
57
76
|
```
|
|
58
77
|
|
|
59
|
-
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Componentes Disponíveis
|
|
81
|
+
|
|
82
|
+
| Componente | Seletor | Descrição |
|
|
83
|
+
| :--- | :--- | :--- |
|
|
84
|
+
| `BaseButton` | `<cao-base-button>` | Um botão customizável com suporte a ícones, estado de loading e tooltip. |
|
|
85
|
+
| `BaseAlert` | `<cao-base-alert>` | Um componente para exibir alertas de sucesso, erro, informação ou aviso. |
|
|
86
|
+
| `BaseDialog` | `<cao-base-dialog>` | Exibe uma caixa de diálogo modal para interações que exigem confirmação do usuário. |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 📜 Como Contribuir
|
|
91
|
+
|
|
92
|
+
Para adicionar um novo componente a esta biblioteca, siga os passos abaixo:
|
|
93
|
+
|
|
94
|
+
1. **Crie os arquivos** do seu componente dentro da pasta `src/lib/shared/components/`, seguindo a estrutura de pastas existente.
|
|
95
|
+
2. **Exponha o componente** na API pública da biblioteca, adicionando uma linha de exportação no arquivo `src/public-api.ts`.
|
|
96
|
+
3. **Adicione ou atualize os testes unitários** para garantir a cobertura e o funcionamento esperado.
|
|
97
|
+
4. **Faça o commit** seguindo as [regras de commit do projeto](/README.md#룰-regras-de-commit-com-escopo-obrigatório), usando o escopo `components`.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
git commit -m "feat(components): add new component"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 📜 Regras e Convenções
|
|
106
|
+
|
|
107
|
+
### Prefixo
|
|
60
108
|
|
|
61
|
-
|
|
109
|
+
O prefixo para componentes nesta biblioteca é `cao`.
|
|
62
110
|
|
|
63
|
-
|
|
111
|
+
- **Componentes**: Utilize o prefixo `<cao-...>` nos seletores dos elementos.
|
|
@@ -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: "
|
|
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: '
|
|
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: [{
|
|
@@ -92,11 +75,11 @@ class BaseAlert {
|
|
|
92
75
|
return `title-${type}`;
|
|
93
76
|
}
|
|
94
77
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: BaseAlert, isStandalone: true, selector: "
|
|
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"] }] });
|
|
96
79
|
}
|
|
97
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseAlert, decorators: [{
|
|
98
81
|
type: Component,
|
|
99
|
-
args: [{ selector: '
|
|
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" }]
|
|
100
83
|
}] });
|
|
101
84
|
|
|
102
85
|
class BaseDialog {
|
|
@@ -123,11 +106,11 @@ class BaseDialog {
|
|
|
123
106
|
this.closeDialog();
|
|
124
107
|
}
|
|
125
108
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: BaseDialog, isStandalone: true, selector: "
|
|
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"] }] });
|
|
127
110
|
}
|
|
128
111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: BaseDialog, decorators: [{
|
|
129
112
|
type: Component,
|
|
130
|
-
args: [{ selector: '
|
|
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" }]
|
|
131
114
|
}], propDecorators: { config: [{
|
|
132
115
|
type: Input
|
|
133
116
|
}] } });
|
|
@@ -140,5 +123,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
|
|
|
140
123
|
* Generated bundle index. Do not edit.
|
|
141
124
|
*/
|
|
142
125
|
|
|
143
|
-
export { BaseAlert, BaseButton, BaseDialog
|
|
126
|
+
export { BaseAlert, BaseButton, BaseDialog };
|
|
144
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/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 { 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","import { CommonModule } 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: 'lib-base-alert',\n imports: [CommonModule],\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 [src]=\"data.alertIcon\" alt=\"R-Clinicas Logo\" class=\"logo\" />\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 [src]=\"getIconPath(data.type)\" alt=\"Alert Icon\" class=\"alert-icon\" />\n </div>\n </div>\n </div>\n</div>\n","import { CommonModule } 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: 'lib-base-dialog',\n imports: [CommonModule],\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}","<div class=\"dialog-container\">\n <div class=\"dialog-content\">\n <img [src]=\"config.logoIcon\" alt=\"Logo\" class=\"logo\" />\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 class=\"cancel-button\"\n (click)=\"handleCancel()\"\n [attr.data-cy]=\"config.cancelButtonText\">\n {{ config.cancelButtonText }}\n </button>\n } @if (config.confirmButtonText) {\n <button\n class=\"confirm-button\"\n [ngClass]=\"config.type\"\n (click)=\"handleConfirm()\"\n [attr.data-cy]=\"config.confirmButtonText\">\n {{ config.confirmButtonText }}\n </button>\n }\n </div>\n </div>\n <div class=\"icon-container\">\n <img [src]=\"getIconPath()\" alt=\"Dialog Icon\" class=\"alert-icon\" />\n </div>\n </div>\n </div>\n</div>\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'\nexport * from './lib/shared/components/base-alert/base-alert'\nexport * from './lib/shared/components/base-dialog/base-dialog'\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,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,QAAA,IAAI,EAAE,8BAA8B;AACpC,QAAA,OAAO,EAAE,8BAA8B;KACxC;IAEO,IAAI,GAAA;QACV;IACF;IAEA,WAAW,GAAA;QACT,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IACzC;IAEA,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI;QACzB,IAAI,CAAC,WAAW,EAAE;IACpB;IAEA,YAAY,GAAA;AACV,QAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI;QACxB,IAAI,CAAC,WAAW,EAAE;IACpB;uGA5BW,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtBvB,2oCAgCA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDdY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIX,UAAU,EAAA,UAAA,EAAA,CAAA;kBANtB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,2oCAAA,EAAA;;sBAKtB;;;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. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAUa,UAAU,CAAA;AACF,IAAA,WAAW,GAAG,IAAI,YAAY,EAAQ;IAEhD,UAAU,GAAG,SAAS;IACtB,UAAU,GAAG,KAAK;IAClB,UAAU,GAAG,KAAK;IAClB,SAAS,GAAG,KAAK;IACjB,gBAAgB,GAAG,KAAK;IACxB,QAAQ,GAAG,EAAE;AAEb,IAAA,OAAO;AACP,IAAA,YAAY;AACZ,IAAA,WAAW;AACX,IAAA,MAAM;IAEf,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;AAChB,YAAA,IAAI,CAAC,MAAM,GAAG,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;QAC3E;AAEA,QAAA,IAAG,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,EAAE,EAAC;AAC/C,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU;QAChC;IACF;IAEA,OAAO,GAAA;QACL,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACvC,YAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;QACzB;IACF;uGA7BW,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AA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AA;kBANtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,ivCAAA,EAAA;;sBAKxC;;;AEvBH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -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,7 @@ 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, "
|
|
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>;
|
|
25
20
|
}
|
|
26
21
|
|
|
27
22
|
type AlertType = "success" | "error" | "info" | "warning";
|
|
@@ -42,7 +37,7 @@ declare class BaseAlert {
|
|
|
42
37
|
getIconPath(type: AlertType): string;
|
|
43
38
|
getTitleClass(type: AlertType): string;
|
|
44
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseAlert, never>;
|
|
45
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaseAlert, "
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseAlert, "cao-base-alert", never, {}, {}, never, never, true, never>;
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
type DialogType = "success" | "error" | "info" | "warning";
|
|
@@ -65,8 +60,8 @@ declare class BaseDialog {
|
|
|
65
60
|
handleConfirm(): void;
|
|
66
61
|
handleCancel(): void;
|
|
67
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseDialog, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaseDialog, "
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseDialog, "cao-base-dialog", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
69
64
|
}
|
|
70
65
|
|
|
71
|
-
export { BaseAlert, BaseButton, BaseDialog
|
|
66
|
+
export { BaseAlert, BaseButton, BaseDialog };
|
|
72
67
|
export type { AlertType, DialogType, IAlertConfig, IDialogConfig };
|