otimus-library 0.0.19 → 0.0.20

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.
Files changed (75) hide show
  1. package/ng-package.json +11 -0
  2. package/package.json +19 -28
  3. package/src/lib/components/oc-badge/oc-badge.component.html +7 -0
  4. package/src/lib/components/oc-badge/oc-badge.component.scss +125 -0
  5. package/src/lib/components/oc-badge/oc-badge.component.ts +22 -0
  6. package/src/lib/components/oc-chip/oc-chip.component.html +19 -0
  7. package/src/lib/components/oc-chip/oc-chip.component.scss +88 -0
  8. package/src/lib/components/oc-chip/oc-chip.component.ts +21 -0
  9. package/src/lib/components/oc-filter/oc-filter.component.html +20 -0
  10. package/src/lib/components/oc-filter/oc-filter.component.scss +78 -0
  11. package/src/lib/components/oc-filter/oc-filter.component.spec.ts +23 -0
  12. package/src/lib/components/oc-filter/oc-filter.component.ts +21 -0
  13. package/src/lib/components/oc-input/oc-input.component.html +12 -0
  14. package/src/lib/components/oc-input/oc-input.component.scss +114 -0
  15. package/src/lib/components/oc-input/oc-input.component.ts +31 -0
  16. package/src/lib/components/oc-key-value/oc-key-value.component.html +10 -0
  17. package/src/lib/components/oc-key-value/oc-key-value.component.scss +24 -0
  18. package/src/lib/components/oc-key-value/oc-key-value.component.spec.ts +23 -0
  19. package/src/lib/components/oc-key-value/oc-key-value.component.ts +14 -0
  20. package/src/lib/components/oc-menu/oc-menu.component.html +12 -0
  21. package/src/lib/components/oc-menu/oc-menu.component.scss +49 -0
  22. package/src/lib/components/oc-menu/oc-menu.component.spec.ts +23 -0
  23. package/src/lib/components/oc-menu/oc-menu.component.ts +24 -0
  24. package/src/lib/components/oc-modal/oc-modal.component.html +16 -0
  25. package/src/lib/components/oc-modal/oc-modal.component.scss +159 -0
  26. package/src/lib/components/oc-modal/oc-modal.component.spec.ts +23 -0
  27. package/src/lib/components/oc-modal/oc-modal.component.ts +29 -0
  28. package/src/lib/components/oc-table/oc-table.component.html +10 -0
  29. package/src/lib/components/oc-table/oc-table.component.scss +3 -0
  30. package/src/lib/components/oc-table/oc-table.component.ts +24 -0
  31. package/src/lib/directives/oc-tooltip/oc-tooltip.directive.ts +67 -0
  32. package/src/lib/otimus-library.component.ts +16 -0
  33. package/src/lib/otimus-library.service.ts +9 -0
  34. package/src/public-api.ts +15 -0
  35. package/src/styles/styles.scss +1 -0
  36. package/tsconfig.lib.json +14 -0
  37. package/tsconfig.lib.prod.json +10 -0
  38. package/tsconfig.spec.json +14 -0
  39. package/assets/iconfont/MaterialIcons-Outlined.woff2 +0 -0
  40. package/assets/iconfont/MaterialIcons-Regular.eot +0 -0
  41. package/assets/iconfont/MaterialIcons-Regular.ijmap +0 -1
  42. package/assets/iconfont/MaterialIcons-Regular.svg +0 -2373
  43. package/assets/iconfont/MaterialIcons-Regular.ttf +0 -0
  44. package/assets/iconfont/MaterialIcons-Regular.woff +0 -0
  45. package/assets/iconfont/MaterialIcons-Regular.woff2 +0 -0
  46. package/assets/iconfont/README.md +0 -9
  47. package/assets/iconfont/material-icons.scss +0 -51
  48. package/esm2022/lib/components/oc-badge/oc-badge.component.mjs +0 -30
  49. package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +0 -29
  50. package/esm2022/lib/components/oc-input/oc-input.component.mjs +0 -35
  51. package/esm2022/lib/components/oc-key-value/oc-key-value.component.mjs +0 -19
  52. package/esm2022/lib/components/oc-modal/oc-modal.component.mjs +0 -35
  53. package/esm2022/lib/components/oc-table/oc-table.component.mjs +0 -29
  54. package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +0 -76
  55. package/esm2022/lib/otimus-library.component.mjs +0 -19
  56. package/esm2022/lib/otimus-library.service.mjs +0 -14
  57. package/esm2022/otimus-library.mjs +0 -5
  58. package/esm2022/public-api.mjs +0 -13
  59. package/fesm2022/otimus-library.mjs +0 -272
  60. package/fesm2022/otimus-library.mjs.map +0 -1
  61. package/index.d.ts +0 -5
  62. package/lib/components/oc-badge/oc-badge.component.d.ts +0 -11
  63. package/lib/components/oc-filter/oc-filter.component.d.ts +0 -10
  64. package/lib/components/oc-input/oc-input.component.d.ts +0 -14
  65. package/lib/components/oc-key-value/oc-key-value.component.d.ts +0 -7
  66. package/lib/components/oc-modal/oc-modal.component.d.ts +0 -10
  67. package/lib/components/oc-table/oc-table.component.d.ts +0 -10
  68. package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +0 -15
  69. package/lib/otimus-library.component.d.ts +0 -5
  70. package/lib/otimus-library.service.d.ts +0 -6
  71. package/public-api.d.ts +0 -9
  72. package/styles/styles.scss +0 -2
  73. /package/{styles → src/styles}/components/buttons.scss +0 -0
  74. /package/{styles → src/styles}/components/index.scss +0 -0
  75. /package/{styles → src/styles}/variables.scss +0 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/otimus-library",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ },
7
+ "assets": [
8
+ { "input": "src/assets/iconfont", "glob": "**/*.*", "output": "assets/iconfont" },
9
+ { "input": "src/styles", "glob": "**/*.*", "output": "styles" }
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,28 +1,19 @@
1
- {
2
- "name": "otimus-library",
3
- "version": "0.0.19",
4
- "license": "MIT",
5
- "peerDependencies": {
6
- "@angular/cdk": "^17.0.2",
7
- "@angular/common": "^17.0.0",
8
- "@angular/core": "^17.0.0"
9
- },
10
- "dependencies": {
11
- "tslib": "^2.3.0"
12
- },
13
- "sideEffects": false,
14
- "exports": {
15
- ".": {
16
- "sass": "./src/styles/styles.scss",
17
- "types": "./index.d.ts",
18
- "esm2022": "./esm2022/otimus-library.mjs",
19
- "esm": "./esm2022/otimus-library.mjs",
20
- "default": "./fesm2022/otimus-library.mjs"
21
- },
22
- "./package.json": {
23
- "default": "./package.json"
24
- }
25
- },
26
- "module": "fesm2022/otimus-library.mjs",
27
- "typings": "index.d.ts"
28
- }
1
+ {
2
+ "name": "otimus-library",
3
+ "version": "0.0.20",
4
+ "license":"MIT",
5
+ "peerDependencies": {
6
+ "@angular/cdk": "^17.0.2",
7
+ "@angular/common": "^17.0.0",
8
+ "@angular/core": "^17.0.0"
9
+ },
10
+ "dependencies": {
11
+ "tslib": "^2.3.0"
12
+ },
13
+ "sideEffects": false,
14
+ "exports": {
15
+ ".": {
16
+ "sass": "./src/styles/styles.scss"
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,7 @@
1
+ <div>
2
+ <div class="oc-badge" [ngClass]="classList">
3
+ <ng-content>
4
+
5
+ </ng-content>
6
+ </div>
7
+ </div>
@@ -0,0 +1,125 @@
1
+ @use '../../../styles/variables.scss';
2
+
3
+
4
+ .oc-badge{
5
+ border-radius: 50%;
6
+
7
+ display: flex;
8
+ justify-content: center;
9
+ align-items: center;
10
+
11
+ color: variables.$color-gray-6;
12
+
13
+ > * {
14
+ color: variables.$color-gray-6;
15
+ font-weight: 600;
16
+ }
17
+ }
18
+
19
+ //Badge BG's
20
+ .notification{
21
+ background-color: variables.$color-error;
22
+ }
23
+
24
+ .brand-g{
25
+ background-color: variables.$color-brand-g-1;
26
+ }
27
+
28
+ .brand-p {
29
+ background-color: variables.$color-brand-p-1;
30
+ }
31
+
32
+ .success {
33
+ background-color: variables.$color-success;
34
+ }
35
+
36
+ .warning {
37
+ background-color: variables.$color-warning;
38
+ }
39
+
40
+
41
+ //Badge Sizes
42
+ .small{
43
+ width: 22px;
44
+ height: 22px;
45
+
46
+ font-size: 1rem;
47
+ }
48
+
49
+ .medium {
50
+ width: 28px;
51
+ height: 28px;
52
+
53
+ font-size: 1.25rem;
54
+ }
55
+
56
+ .large {
57
+ width: 34px;
58
+ height: 34px;
59
+ font-size: 1.5rem;
60
+ }
61
+
62
+ //Wave Effect
63
+ .waved{
64
+ position: relative;
65
+ z-index: 2;
66
+
67
+ &::before, &::after{
68
+ z-index: -1;
69
+
70
+ content: '';
71
+ position: absolute;
72
+ top: 0;
73
+
74
+ border-radius: 50%;
75
+ width: 100%;
76
+ height: 100%;
77
+
78
+ animation: wave infinite 2s;
79
+ }
80
+
81
+ &::after{
82
+ animation-delay: 600ms;
83
+ }
84
+ }
85
+
86
+ .waved.notification{
87
+ &::before, &::after{
88
+ background-color: variables.$color-error;
89
+ }
90
+ }
91
+
92
+ .waved.brand-g{
93
+ &::before, &::after{
94
+ background-color: variables.$color-brand-g-1;
95
+ }
96
+ }
97
+
98
+ .waved.brand-p{
99
+ &::before, &::after {
100
+ background-color: variables.$color-brand-p-1;
101
+ }
102
+ }
103
+
104
+ .waved.success{
105
+ &::before, &::after{
106
+ background-color: variables.$color-success;
107
+ }
108
+ }
109
+
110
+ .waved.warning{
111
+ &::before, &::after {
112
+ background-color: variables.$color-warning;
113
+ }
114
+ }
115
+
116
+
117
+ @keyframes wave{
118
+ from{
119
+ transform: scale(0);
120
+ }
121
+ to{
122
+ opacity: 0;
123
+ transform: scale(2);
124
+ }
125
+ }
@@ -0,0 +1,22 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, Input, OnInit } from '@angular/core';
3
+
4
+ @Component({
5
+ selector: 'oc-badge',
6
+ standalone: true,
7
+ imports: [CommonModule],
8
+ templateUrl: './oc-badge.component.html',
9
+ styleUrl: './oc-badge.component.scss'
10
+ })
11
+ export class OcBadgeComponent implements OnInit {
12
+ @Input() ocSize: 'small' | 'medium' | 'large' = 'small'
13
+ @Input() ocColor: 'notification' | 'brand-g' | 'brand-p' | 'success' | 'warning' = 'notification'
14
+ @Input() ocWaved: boolean = false
15
+
16
+ classList: string[] = []
17
+
18
+ ngOnInit(): void {
19
+ this.classList.push(this.ocSize, this.ocColor)
20
+ if(this.ocWaved) this.classList.push('waved')
21
+ }
22
+ }
@@ -0,0 +1,19 @@
1
+ <button
2
+ [ngClass]="{
3
+ 'oc-chip': true,
4
+ selected: ocSelected,
5
+ 'not-selectable': ocType !== 'select',
6
+ 'tag': ocType === 'tag',
7
+ 'remove': ocType === 'remove',
8
+ 'green-bg': ocBg === 'green',
9
+ 'red-bg': ocBg === 'red'
10
+ }"
11
+ type="button"
12
+ [title]="ocText"
13
+ (click)="ocType === 'select' ? ocEvent() : null"
14
+ >
15
+ <ng-content></ng-content>
16
+ @if (ocType === 'remove') {
17
+ <span class="material-symbols-outlined" (click)="ocEvent()">close</span>
18
+ }
19
+ </button>
@@ -0,0 +1,88 @@
1
+ @use '../../../styles/variables.scss';
2
+
3
+ .oc-chip {
4
+ background-color: variables.$color-gray-5;
5
+ color: variables.$color-gray-3;
6
+
7
+ border: 2px solid variables.$color-gray-4;
8
+ border-radius: 16px;
9
+
10
+ font-size: 1rem;
11
+ font-weight: 600;
12
+
13
+ padding: 3px 18px;
14
+ transition: 0.3s ease !important;
15
+
16
+ cursor: pointer;
17
+
18
+ &:hover {
19
+ filter: brightness(0.95);
20
+ }
21
+
22
+ &:active {
23
+ filter: brightness(0.85);
24
+ }
25
+ }
26
+
27
+ .selected {
28
+ background-color: #ccfbe6dc;
29
+ border: 2px solid variables.$color-brand-g-1;
30
+ color: variables.$color-brand-g-1;
31
+
32
+ &.red-bg{
33
+ color: variables.$color-error;
34
+ border-color: variables.$color-error;
35
+
36
+ background-color: #FFCACA;
37
+ }
38
+ }
39
+
40
+ .not-selectable {
41
+ border: none;
42
+ background-color: variables.$color-gray-5;
43
+ color: variables.$color-gray-3;
44
+
45
+ &:active {
46
+ cursor: not-allowed;
47
+ }
48
+
49
+ cursor: default;
50
+ }
51
+
52
+
53
+ .material-symbols-outlined{
54
+ font-size: 0.9rem;
55
+ width: 10px;
56
+ height: 10px;
57
+
58
+
59
+ }
60
+
61
+ .remove{
62
+ display: flex;
63
+ align-items: center;
64
+ gap: .5rem;
65
+
66
+ padding-right: .5rem;
67
+
68
+ &:hover{
69
+ filter: brightness(1);
70
+ }
71
+
72
+ span{
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ padding: 5px;
77
+
78
+ cursor: pointer;
79
+ border-radius: 50%;
80
+
81
+ transition: 0.1s ease;
82
+
83
+ &:hover{
84
+ background-color: variables.$color-gray-4;
85
+ }
86
+ }
87
+ }
88
+
@@ -0,0 +1,21 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
3
+
4
+ @Component({
5
+ selector: 'oc-chip',
6
+ standalone: true,
7
+ imports: [CommonModule],
8
+ templateUrl: './oc-chip.component.html',
9
+ styleUrl: './oc-chip.component.scss'
10
+ })
11
+ export class OcChipComponent {
12
+ @Input() ocSelected: boolean = false
13
+ @Input() ocType: 'select' | 'remove' | 'tag' = 'select'
14
+ @Input() ocBg: 'green' | 'red' = 'green'
15
+ @Input() ocText: string = ''
16
+ @Output() ocClick: EventEmitter<any> = new EventEmitter<any>
17
+
18
+ ocEvent() {
19
+ this.ocClick.emit()
20
+ }
21
+ }
@@ -0,0 +1,20 @@
1
+ <div class="oc-filter-row" [ngClass]="{
2
+ reverse: ocSide === 'right'
3
+ }">
4
+ <button class="oc-filter-btn" (click)="toggleOpen()">
5
+ <span class="material-symbols-outlined md-18">filter_list</span>
6
+ {{ocText}}
7
+ <div class="badge">
8
+ <oc-badge *ngIf="ocActive > 0" ocSize="small" ocColor="success" [ocWaved]="true">{{ocActive}}</oc-badge>
9
+ </div>
10
+ </button>
11
+
12
+ <div class="filter-row-content">
13
+ <ng-content select="[row]"></ng-content>
14
+ </div>
15
+
16
+ </div>
17
+ <div *ngIf="isOpen" class="oc-filter-content">
18
+ <ng-content select="[body]">
19
+ </ng-content>
20
+ </div>
@@ -0,0 +1,78 @@
1
+ @use '../../../styles/variables.scss';
2
+ @import '../../../styles/styles.scss';
3
+
4
+ .oc-filter-row{
5
+ width: 100%;
6
+ display: flex;
7
+ align-items: center;
8
+ gap: 1rem;
9
+
10
+ .filter-row-content{
11
+ width: 100%;
12
+ }
13
+ }
14
+
15
+ .reverse{
16
+ flex-direction: row-reverse;
17
+ }
18
+
19
+ .oc-filter-btn{
20
+ background-color: variables.$color-brand-p-1;
21
+ color: variables.$color-gray-6;
22
+
23
+ border: none;
24
+ border-radius: 0.5rem;
25
+
26
+ padding: 0.4rem 0.8rem;
27
+
28
+ font-weight: 600;
29
+
30
+ display: flex;
31
+ align-items: center;
32
+ gap: 0.2rem;
33
+
34
+ transition: 0.2s ease;
35
+
36
+ position: relative;
37
+
38
+ cursor: pointer;
39
+ &:hover{
40
+ filter: brightness(0.9);
41
+ }
42
+
43
+ .material-symbols-outlined{
44
+ font-size: 1rem;
45
+ color: variables.$color-gray-5;
46
+ }
47
+
48
+ img{
49
+ width: 15px;
50
+ filter: brightness(0) invert(1);
51
+ }
52
+
53
+ .badge{
54
+ position: absolute;
55
+ top: -8px;
56
+ right: -12px;
57
+ }
58
+ }
59
+
60
+
61
+ .oc-filter-content{
62
+ width: 100%;
63
+ animation: showing-up 0.15s ease;
64
+
65
+ overflow: hidden;
66
+
67
+ margin-top: 1rem;
68
+ }
69
+
70
+ @keyframes showing-up {
71
+ from{
72
+ height: 0px;
73
+ opacity: 0;
74
+ }to{
75
+ height: 100%;
76
+ opacity: 1;
77
+ }
78
+ }
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { OcFilterComponent } from './oc-filter.component';
4
+
5
+ describe('OcFilterComponent', () => {
6
+ let component: OcFilterComponent;
7
+ let fixture: ComponentFixture<OcFilterComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [OcFilterComponent]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(OcFilterComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,21 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, Input } from '@angular/core';
3
+ import { OcBadgeComponent } from '../oc-badge/oc-badge.component';
4
+
5
+ @Component({
6
+ selector: 'oc-filter',
7
+ standalone: true,
8
+ imports: [CommonModule, OcBadgeComponent],
9
+ templateUrl: './oc-filter.component.html',
10
+ styleUrl: './oc-filter.component.scss'
11
+ })
12
+ export class OcFilterComponent {
13
+ isOpen: boolean = false
14
+ @Input() ocText: string = 'Filtros'
15
+ @Input() ocActive: number = 0
16
+ @Input() ocSide: 'left' | 'right' = 'left'
17
+
18
+ toggleOpen() {
19
+ this.isOpen = !this.isOpen
20
+ }
21
+ }
@@ -0,0 +1,12 @@
1
+ <div class="oc-input-box" [ngClass]="{
2
+ 'small': ocSize === 'small',
3
+ 'large': ocSize === 'large',
4
+ error: !!ocError
5
+ }" [id]="inputId">
6
+ <ng-content></ng-content>
7
+ <label>{{ocPlaceholder}}</label>
8
+ <small
9
+ *ngIf="ocError"
10
+ class="error-msg"
11
+ >{{ocError}}</small>
12
+ </div>
@@ -0,0 +1,114 @@
1
+ @use '../../../styles/variables.scss';
2
+
3
+ .oc-input-box {
4
+ position: relative;
5
+
6
+ select * {
7
+ background-color: variables.$color-gray-6;
8
+ }
9
+
10
+ label {
11
+ position: absolute;
12
+ left: 0;
13
+ top: 0;
14
+ padding: 0.5rem 0.7rem;
15
+ font-size: 0.85rem;
16
+ color: variables.$color-gray-3;
17
+ pointer-events: none;
18
+ transition: 0.3s ease;
19
+ border-radius: 0.5rem;
20
+ }
21
+
22
+ input, textarea, select {
23
+ font-size: 1rem;
24
+ border-radius: 0.7rem;
25
+ background-color: variables.$color-gray-5;
26
+ border: 1px solid variables.$color-gray-4;
27
+ outline: none;
28
+ padding: 0.6rem 0.9rem;
29
+ width: 100%;
30
+ transition: 0.3s ease;
31
+ color: variables.$color-brand-p-2;
32
+ font-weight: 500;
33
+
34
+ &:focus {
35
+ border: 1px solid variables.$color-brand-g-1;
36
+ box-shadow: 0px 4px 3.2px 0px rgba(0, 221, 163, 0.08);
37
+ }
38
+ }
39
+
40
+ input:not(:placeholder-shown) ~ label,
41
+ input:focus ~ label,
42
+ textarea:not(:placeholder-shown) ~ label,
43
+ textarea:focus ~ label,
44
+ select:valid ~ label,
45
+ select:focus ~ label {
46
+ transform: translateY(-0.82rem) translateX(0.6rem);
47
+ color: variables.$color-gray-2;
48
+ font-weight: 600;
49
+ background-color: variables.$color-gray-6;
50
+ padding: 2px 10px;
51
+ }
52
+
53
+ }
54
+
55
+
56
+ .error {
57
+ input, textarea, select {
58
+ border: 1px solid variables.$color-error;
59
+ box-shadow: 0px 4px 6.1px 0px rgba(161, 0, 0, 0.08);
60
+ }
61
+
62
+ small, label {
63
+ color: variables.$color-error !important;
64
+ font-weight: 600;
65
+ }
66
+ }
67
+
68
+ .small {
69
+ input, textarea, select {
70
+ padding: 0.3rem 0.7rem;
71
+ border-radius: 0.5rem;
72
+ }
73
+
74
+ label {
75
+ padding: 0.5rem 0.7rem;
76
+ }
77
+
78
+ input:focus ~ label,
79
+ input:not(:placeholder-shown) ~ label,
80
+ textarea:focus ~ label,
81
+ textarea:not(:placeholder-shown) ~ label,
82
+ select:focus ~ label,
83
+ select:valid ~ label {
84
+ transform: translateY(-0.99rem) translateX(0.6rem);
85
+ color: variables.$color-gray-2;
86
+ font-weight: 600;
87
+ background-color: variables.$color-white;
88
+ padding: 2px 10px;
89
+ }
90
+ }
91
+
92
+ .large {
93
+ input, textarea, select {
94
+ padding: 1rem;
95
+ border-radius: 1rem;
96
+ }
97
+
98
+ label {
99
+ padding: 1rem 0.7rem;
100
+ }
101
+
102
+ input:focus ~ label,
103
+ input:not(:placeholder-shown) ~ label,
104
+ textarea:focus ~ label,
105
+ textarea:not(:placeholder-shown) ~ label,
106
+ select:focus ~ label,
107
+ select:valid ~ label {
108
+ transform: translateY(-0.77rem) translateX(0.6rem);
109
+ color: variables.$color-gray-2;
110
+ font-weight: 600;
111
+ background-color: variables.$color-white;
112
+ padding: 2px 10px;
113
+ }
114
+ }
@@ -0,0 +1,31 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { AfterViewInit, Component, ElementRef, Input, Renderer2, ViewEncapsulation } from '@angular/core';
3
+
4
+ @Component({
5
+ selector: 'oc-input',
6
+ standalone: true,
7
+ imports: [CommonModule],
8
+ templateUrl: './oc-input.component.html',
9
+ styleUrls: ['./oc-input.component.scss'],
10
+ encapsulation: ViewEncapsulation.None
11
+ })
12
+ export class OcInputComponent implements AfterViewInit {
13
+ @Input() ocError?: string;
14
+ @Input() ocSize?: 'small' | 'medium' | 'large' = 'medium';
15
+ @Input() ocPlaceholder: string = '';
16
+ inputId: string = `oc-${Math.random()}`;
17
+
18
+ constructor(private el: ElementRef, private renderer: Renderer2) {}
19
+
20
+ ngAfterViewInit() {
21
+ const inputBox = this.el.nativeElement;
22
+
23
+ if (inputBox) {
24
+ const inputElement = inputBox.querySelector('input');
25
+
26
+ if (inputElement) {
27
+ this.renderer.setAttribute(inputElement, 'placeholder', '');
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,10 @@
1
+ <div class="oc-key-value">
2
+ <!-- Ícone -->
3
+ <ng-content></ng-content>
4
+ <p>
5
+ @if (ocKey) {
6
+ <span>{{ocKey}}:</span>
7
+ }
8
+ {{ocValue}}
9
+ </p>
10
+ </div>
@@ -0,0 +1,24 @@
1
+ @use '../../../styles/variables.scss';
2
+
3
+ .oc-key-value{
4
+ display: flex;
5
+ align-items: center;
6
+ gap: 0.5rem;
7
+
8
+ font-size: 1rem;
9
+
10
+ p{
11
+ color: variables.$color-gray-2;
12
+ font-weight: 600;
13
+ }
14
+
15
+ span{
16
+ color: variables.$color-brand-p-1;
17
+
18
+ font-weight: 700;
19
+ }
20
+
21
+ .material-symbols-outlined{
22
+ color: variables.$color-brand-p-1;
23
+ }
24
+ }