otimus-library 0.2.46 → 0.2.47

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 (202) hide show
  1. package/README.md +26 -26
  2. package/ng-package.json +12 -0
  3. package/package.json +4 -13
  4. package/src/assets/images/loading.svg +0 -0
  5. package/src/assets/images/not-found-bg.jpg +0 -0
  6. package/src/lib/components/oc-accordion/oc-accordion.component.html +3 -0
  7. package/src/lib/components/oc-accordion/oc-accordion.component.scss +4 -0
  8. package/src/lib/components/oc-accordion/oc-accordion.component.ts +44 -0
  9. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.html +19 -0
  10. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.scss +86 -0
  11. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.ts +27 -0
  12. package/src/lib/components/oc-accordion-item/styles/oc-accordion-item.shui-component.scss +41 -0
  13. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.html +66 -0
  14. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.scss +157 -0
  15. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.ts +277 -0
  16. package/src/lib/components/oc-badge/oc-badge.component.html +7 -0
  17. package/src/lib/components/oc-badge/oc-badge.component.scss +125 -0
  18. package/src/lib/components/oc-badge/oc-badge.component.ts +22 -0
  19. package/src/lib/components/oc-checkbox/oc-checkbox.component.html +30 -0
  20. package/src/lib/components/oc-checkbox/oc-checkbox.component.scss +103 -0
  21. package/src/lib/components/oc-checkbox/oc-checkbox.component.ts +132 -0
  22. package/src/lib/components/oc-checkbox/styles/oc-checkbox.shui-component.scss +21 -0
  23. package/src/lib/components/oc-chip/oc-chip.component.html +20 -0
  24. package/src/lib/components/oc-chip/oc-chip.component.scss +102 -0
  25. package/src/lib/components/oc-chip/oc-chip.component.ts +32 -0
  26. package/src/lib/components/oc-filter/oc-filter.component.html +22 -0
  27. package/src/lib/components/oc-filter/oc-filter.component.scss +78 -0
  28. package/src/lib/components/oc-filter/oc-filter.component.spec.ts +23 -0
  29. package/src/lib/components/oc-filter/oc-filter.component.ts +30 -0
  30. package/src/lib/components/oc-input/oc-input.component.html +21 -0
  31. package/src/lib/components/oc-input/oc-input.component.scss +3 -0
  32. package/src/lib/components/oc-input/oc-input.component.ts +100 -0
  33. package/src/lib/components/oc-key-value/oc-key-value.component.html +12 -0
  34. package/src/lib/components/oc-key-value/oc-key-value.component.scss +26 -0
  35. package/src/lib/components/oc-key-value/oc-key-value.component.ts +23 -0
  36. package/src/lib/components/oc-key-value/styles/oc-key-value.shui-component.scss +26 -0
  37. package/src/lib/components/oc-log/oc-log.component.html +18 -0
  38. package/src/lib/components/oc-log/oc-log.component.scss +61 -0
  39. package/src/lib/components/oc-log/oc-log.component.ts +15 -0
  40. package/src/lib/components/oc-menu/oc-menu.component.html +31 -0
  41. package/src/lib/components/oc-menu/oc-menu.component.scss +101 -0
  42. package/src/lib/components/oc-menu/oc-menu.component.ts +84 -0
  43. package/src/lib/components/oc-modal/oc-modal.component.html +54 -0
  44. package/src/lib/components/oc-modal/oc-modal.component.scss +204 -0
  45. package/src/lib/components/oc-modal/oc-modal.component.ts +82 -0
  46. package/src/lib/components/oc-modal/styles/oc-modal.shui-component.scss +3 -0
  47. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.html +11 -0
  48. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.scss +27 -0
  49. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.ts +15 -0
  50. package/src/lib/components/oc-not-found/oc-not-found.component.html +14 -0
  51. package/src/lib/components/oc-not-found/oc-not-found.component.scss +153 -0
  52. package/src/lib/components/oc-not-found/oc-not-found.component.spec.ts +23 -0
  53. package/src/lib/components/oc-not-found/oc-not-found.component.ts +12 -0
  54. package/src/lib/components/oc-pagination/oc-pagination.component.html +32 -0
  55. package/src/lib/components/oc-pagination/oc-pagination.component.scss +80 -0
  56. package/src/lib/components/oc-pagination/oc-pagination.component.ts +46 -0
  57. package/src/lib/components/oc-profile/oc-profile.component.html +17 -0
  58. package/src/lib/components/oc-profile/oc-profile.component.scss +80 -0
  59. package/src/lib/components/oc-profile/oc-profile.component.ts +38 -0
  60. package/src/lib/components/oc-step/oc-step.component.html +32 -0
  61. package/src/lib/components/oc-step/oc-step.component.scss +106 -0
  62. package/src/lib/components/oc-step/oc-step.component.ts +39 -0
  63. package/src/lib/components/oc-step/styles/oc-step.shui-component.scss +52 -0
  64. package/src/lib/components/oc-stepper/oc-stepper.component.html +3 -0
  65. package/src/lib/components/oc-stepper/oc-stepper.component.scss +9 -0
  66. package/src/lib/components/oc-stepper/oc-stepper.component.ts +86 -0
  67. package/src/lib/components/oc-tab/oc-tab.component.html +3 -0
  68. package/src/lib/components/oc-tab/oc-tab.component.scss +0 -0
  69. package/src/lib/components/oc-tab/oc-tab.component.ts +15 -0
  70. package/src/lib/components/oc-table/oc-table.component.html +62 -0
  71. package/src/lib/components/oc-table/oc-table.component.scss +2 -0
  72. package/src/lib/components/oc-table/oc-table.component.ts +51 -0
  73. package/src/lib/components/oc-tabs/oc-tabs.component.html +13 -0
  74. package/src/lib/components/oc-tabs/oc-tabs.component.scss +47 -0
  75. package/src/lib/components/oc-tabs/oc-tabs.component.ts +46 -0
  76. package/src/lib/components/oc-tabs/styles/oc-tabs.shui-component.scss +25 -0
  77. package/src/lib/components/oc-toast/oc-toast.component.html +46 -0
  78. package/src/lib/components/oc-toast/oc-toast.component.scss +133 -0
  79. package/src/lib/components/oc-toast/oc-toast.component.ts +15 -0
  80. package/src/lib/components/oc-toggle/oc-toggle.component.html +4 -0
  81. package/src/lib/components/oc-toggle/oc-toggle.component.scss +73 -0
  82. package/src/lib/components/oc-toggle/oc-toggle.component.spec.ts +23 -0
  83. package/src/lib/components/oc-toggle/oc-toggle.component.ts +32 -0
  84. package/src/lib/directives/oc-tooltip/oc-tooltip.directive.ts +108 -0
  85. package/src/lib/interfaces/internal/languages.ts +16 -0
  86. package/src/lib/interfaces/oc-autocomplete.ts +6 -0
  87. package/src/lib/interfaces/oc-menu.ts +10 -0
  88. package/src/lib/interfaces/oc-style-theme.ts +3 -0
  89. package/src/lib/interfaces/oc-table.ts +12 -0
  90. package/src/lib/interfaces/oc-toast.ts +8 -0
  91. package/src/lib/otimus-library.component.ts +16 -0
  92. package/src/lib/otimus-library.service.ts +9 -0
  93. package/src/lib/services/internationalization.service.ts +73 -0
  94. package/src/lib/services/oc-toast.service.ts +107 -0
  95. package/src/lib/services/style-theme.service.ts +19 -0
  96. package/src/public-api.ts +30 -0
  97. package/{styles → src/styles}/colors.scss +70 -70
  98. package/{styles → src/styles}/components/buttons/buttons.scss +225 -225
  99. package/{styles → src/styles}/components/buttons/buttons.shui.scss +61 -61
  100. package/{styles → src/styles}/components/index.scss +2 -2
  101. package/{styles → src/styles}/components/inputs/inputs.scss +248 -248
  102. package/{styles → src/styles}/components/inputs/inputs.shui.scss +212 -212
  103. package/{styles → src/styles}/components/table/table.scss +69 -69
  104. package/{styles → src/styles}/components/table/table.shui.scss +50 -50
  105. package/{styles → src/styles}/components/tooltip.scss +26 -26
  106. package/{styles → src/styles}/grid.scss +1122 -1122
  107. package/{styles → src/styles}/patterns/shui/colors.shui.scss +154 -154
  108. package/{styles → src/styles}/patterns/shui/fonts.shui.scss +65 -65
  109. package/{styles → src/styles}/patterns/shui/index.shui.scss +24 -24
  110. package/{styles → src/styles}/patterns/shui/variables.shui.scss +22 -22
  111. package/{styles → src/styles}/states.scss +5 -5
  112. package/{styles → src/styles}/styles.scss +46 -46
  113. package/{styles → src/styles}/variables.scss +47 -47
  114. package/tsconfig.lib.json +14 -0
  115. package/tsconfig.lib.prod.json +10 -0
  116. package/tsconfig.spec.json +14 -0
  117. package/esm2022/lib/components/oc-accordion/oc-accordion.component.mjs +0 -48
  118. package/esm2022/lib/components/oc-accordion-item/oc-accordion-item.component.mjs +0 -35
  119. package/esm2022/lib/components/oc-autocomplete/oc-autocomplete.component.mjs +0 -275
  120. package/esm2022/lib/components/oc-badge/oc-badge.component.mjs +0 -30
  121. package/esm2022/lib/components/oc-checkbox/oc-checkbox.component.mjs +0 -133
  122. package/esm2022/lib/components/oc-chip/oc-chip.component.mjs +0 -45
  123. package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +0 -39
  124. package/esm2022/lib/components/oc-input/oc-input.component.mjs +0 -97
  125. package/esm2022/lib/components/oc-key-value/oc-key-value.component.mjs +0 -29
  126. package/esm2022/lib/components/oc-log/oc-log.component.mjs +0 -22
  127. package/esm2022/lib/components/oc-menu/oc-menu.component.mjs +0 -81
  128. package/esm2022/lib/components/oc-modal/oc-modal.component.mjs +0 -85
  129. package/esm2022/lib/components/oc-modal-footer/oc-modal-footer.component.mjs +0 -23
  130. package/esm2022/lib/components/oc-not-found/oc-not-found.component.mjs +0 -11
  131. package/esm2022/lib/components/oc-pagination/oc-pagination.component.mjs +0 -49
  132. package/esm2022/lib/components/oc-profile/oc-profile.component.mjs +0 -38
  133. package/esm2022/lib/components/oc-step/oc-step.component.mjs +0 -49
  134. package/esm2022/lib/components/oc-stepper/oc-stepper.component.mjs +0 -90
  135. package/esm2022/lib/components/oc-tab/oc-tab.component.mjs +0 -20
  136. package/esm2022/lib/components/oc-tabs/oc-tabs.component.mjs +0 -42
  137. package/esm2022/lib/components/oc-toast/oc-toast.component.mjs +0 -17
  138. package/esm2022/lib/components/oc-toggle/oc-toggle.component.mjs +0 -34
  139. package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +0 -117
  140. package/esm2022/lib/interfaces/oc-autocomplete.mjs +0 -2
  141. package/esm2022/lib/interfaces/oc-menu.mjs +0 -2
  142. package/esm2022/lib/interfaces/oc-style-theme.mjs +0 -2
  143. package/esm2022/lib/interfaces/oc-toast.mjs +0 -2
  144. package/esm2022/lib/otimus-library.component.mjs +0 -19
  145. package/esm2022/lib/otimus-library.service.mjs +0 -14
  146. package/esm2022/lib/services/internationalization.service.mjs +0 -68
  147. package/esm2022/lib/services/oc-toast.service.mjs +0 -81
  148. package/esm2022/lib/services/style-theme.service.mjs +0 -21
  149. package/esm2022/otimus-library.mjs +0 -5
  150. package/esm2022/public-api.mjs +0 -30
  151. package/fesm2022/otimus-library.mjs +0 -1513
  152. package/fesm2022/otimus-library.mjs.map +0 -1
  153. package/index.d.ts +0 -5
  154. package/lib/components/oc-accordion/oc-accordion.component.d.ts +0 -18
  155. package/lib/components/oc-accordion-item/oc-accordion-item.component.d.ts +0 -12
  156. package/lib/components/oc-autocomplete/oc-autocomplete.component.d.ts +0 -68
  157. package/lib/components/oc-badge/oc-badge.component.d.ts +0 -11
  158. package/lib/components/oc-checkbox/oc-checkbox.component.d.ts +0 -35
  159. package/lib/components/oc-chip/oc-chip.component.d.ts +0 -14
  160. package/lib/components/oc-filter/oc-filter.component.d.ts +0 -17
  161. package/lib/components/oc-input/oc-input.component.d.ts +0 -31
  162. package/lib/components/oc-key-value/oc-key-value.component.d.ts +0 -14
  163. package/lib/components/oc-log/oc-log.component.d.ts +0 -7
  164. package/lib/components/oc-menu/oc-menu.component.d.ts +0 -20
  165. package/lib/components/oc-modal/oc-modal.component.d.ts +0 -30
  166. package/lib/components/oc-modal-footer/oc-modal-footer.component.d.ts +0 -8
  167. package/lib/components/oc-not-found/oc-not-found.component.d.ts +0 -5
  168. package/lib/components/oc-pagination/oc-pagination.component.d.ts +0 -14
  169. package/lib/components/oc-profile/oc-profile.component.d.ts +0 -12
  170. package/lib/components/oc-step/oc-step.component.d.ts +0 -22
  171. package/lib/components/oc-stepper/oc-stepper.component.d.ts +0 -24
  172. package/lib/components/oc-tab/oc-tab.component.d.ts +0 -8
  173. package/lib/components/oc-tabs/oc-tabs.component.d.ts +0 -18
  174. package/lib/components/oc-toast/oc-toast.component.d.ts +0 -8
  175. package/lib/components/oc-toggle/oc-toggle.component.d.ts +0 -12
  176. package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +0 -20
  177. package/lib/interfaces/oc-autocomplete.d.ts +0 -5
  178. package/lib/interfaces/oc-menu.d.ts +0 -9
  179. package/lib/interfaces/oc-style-theme.d.ts +0 -2
  180. package/lib/interfaces/oc-toast.d.ts +0 -8
  181. package/lib/otimus-library.component.d.ts +0 -5
  182. package/lib/otimus-library.service.d.ts +0 -6
  183. package/lib/services/internationalization.service.d.ts +0 -17
  184. package/lib/services/oc-toast.service.d.ts +0 -14
  185. package/lib/services/style-theme.service.d.ts +0 -8
  186. package/public-api.d.ts +0 -26
  187. /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff +0 -0
  188. /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff2 +0 -0
  189. /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Regular.woff +0 -0
  190. /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Regular.woff2 +0 -0
  191. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Black.woff +0 -0
  192. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Black.woff2 +0 -0
  193. /package/{assets → src/assets}/fonts/siemens/SiemensSans-BlackItalic.woff +0 -0
  194. /package/{assets → src/assets}/fonts/siemens/SiemensSans-BlackItalic.woff2 +0 -0
  195. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Bold.woff +0 -0
  196. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Bold.woff2 +0 -0
  197. /package/{assets → src/assets}/fonts/siemens/SiemensSans-BoldItalic.woff +0 -0
  198. /package/{assets → src/assets}/fonts/siemens/SiemensSans-BoldItalic.woff2 +0 -0
  199. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Italic.woff +0 -0
  200. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Italic.woff2 +0 -0
  201. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Roman.woff +0 -0
  202. /package/{assets → src/assets}/fonts/siemens/SiemensSans-Roman.woff2 +0 -0
@@ -0,0 +1,101 @@
1
+ @use '../../../styles/variables.scss';
2
+
3
+ *{
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ .oc-menu{
8
+
9
+ display: flex;
10
+ flex-direction: column;
11
+ border-radius: 0px 8px 8px 8px;
12
+ background-color: variables.$color-gray-6;
13
+ border: 2px solid variables.$color-white;
14
+
15
+ position: absolute;
16
+ z-index: 1000;
17
+
18
+ max-height: 800px;
19
+
20
+ box-shadow: 0px 4px 8.7px 0px rgba(0, 0, 0, 0.13);
21
+
22
+ animation: showUp .15s ease;
23
+
24
+ ul {
25
+ display: flex;
26
+ flex-direction: column;
27
+ list-style: none;
28
+
29
+ margin: 0;
30
+ padding: 0;
31
+
32
+ width: 100%;
33
+
34
+ li{
35
+ text-align: left;
36
+ text-decoration: none;
37
+ width: 100%;
38
+ max-height: 30px;
39
+
40
+ display: flex;
41
+ align-items: center;
42
+ gap: .2rem;
43
+
44
+ white-space: nowrap;
45
+
46
+ .checkbox-opt{
47
+ min-width: 1.3rem;
48
+ }
49
+
50
+ a,button{
51
+ overflow: hidden;
52
+ text-overflow: ellipsis;
53
+ white-space: nowrap;
54
+ }
55
+
56
+ a, button, span, .checkbox-opt {
57
+ color: variables.$color-gray-3 ;
58
+
59
+ text-decoration: none;
60
+
61
+ font-size: 1rem;
62
+ font-weight: 400;
63
+ text-align: left;
64
+
65
+ padding: 0;
66
+ margin: 0;
67
+
68
+ border: none;
69
+ padding: 0.6rem;
70
+ background-color: transparent ;
71
+
72
+ width: 100%;
73
+ height: 100%;
74
+
75
+ cursor: pointer;
76
+
77
+ }
78
+
79
+ .material-symbols-outlined{
80
+ width: .3rem;
81
+ font-size: 1.1rem;
82
+ pointer-events: none;
83
+ }
84
+
85
+ &:hover{
86
+ background-color: variables.$color-white;
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+
93
+ @keyframes showUp {
94
+ from{
95
+ opacity: 0;
96
+ transform: scale(.7);
97
+ }to{
98
+ opacity: 1;
99
+ transform: scale(1);
100
+ }
101
+ }
@@ -0,0 +1,84 @@
1
+ import { Component,ElementRef,EventEmitter,Input, OnInit, Output, Renderer2, ViewChild } from '@angular/core';
2
+ import { CdkMenuModule } from '@angular/cdk/menu';
3
+ import { CommonModule } from '@angular/common';
4
+ import { OcMenuType } from '../../interfaces/oc-menu';
5
+ import { OcCheckboxComponent } from '../oc-checkbox/oc-checkbox.component';
6
+
7
+ @Component({
8
+ selector: 'oc-menu',
9
+ standalone: true,
10
+ imports: [CommonModule, CdkMenuModule, OcCheckboxComponent],
11
+ templateUrl: './oc-menu.component.html',
12
+ styleUrls: ['./oc-menu.component.scss']
13
+ })
14
+ export class OcMenuComponent implements OnInit {
15
+ constructor(private renderer: Renderer2) {}
16
+
17
+ @ViewChild('ocMenuEl') menu!: ElementRef;
18
+ @Output() ocChange = new EventEmitter()
19
+ @Input() ocMenu: OcMenuType[] = []
20
+ isMenuShown: boolean = false
21
+ buttonId?:string
22
+
23
+ open() {
24
+ this.isMenuShown = true
25
+
26
+ setTimeout(() => {
27
+ if(this.menu){
28
+ const parentButton = this.findParentButton(this.menu.nativeElement);
29
+ if (parentButton) {
30
+ this.buttonId = `oc-${Math.random()}`
31
+ this.renderer.setAttribute(parentButton, 'id', this.buttonId);
32
+ }
33
+ }
34
+ }, 100)
35
+ }
36
+
37
+ ngOnInit() {
38
+ this.closeOnClickOut()
39
+ }
40
+
41
+ findParentButton(element: HTMLElement): HTMLButtonElement | null {
42
+ let parent = element.parentElement;
43
+ while (parent) {
44
+ if (parent.tagName.toLowerCase() === 'button') {
45
+ return parent as HTMLButtonElement;
46
+ }
47
+ parent = parent.parentElement;
48
+ }
49
+ return null;
50
+ }
51
+
52
+ closeOnClickOut() {
53
+ this.renderer.listen('window', 'click',(e:any)=>{
54
+
55
+ const isCheckbox = Array.from(e.target.classList).includes('cbx')
56
+
57
+ if(isCheckbox) return
58
+ else if(!this.menu) return
59
+
60
+ if(this.buttonId && e.target.id !== this.buttonId) {
61
+ this.isMenuShown = false
62
+ return
63
+ }
64
+
65
+ })
66
+ }
67
+
68
+ changeCheckbox(name: string, checked: boolean) {
69
+ let foundItem
70
+ this.ocMenu.forEach(item => {
71
+ if(item.name === name && typeof checked === 'boolean') {
72
+ item.checked = checked
73
+
74
+ foundItem = item
75
+ }
76
+ })
77
+ this.ocChange.emit(foundItem)
78
+ return foundItem
79
+ }
80
+
81
+ typeof(key: any) {
82
+ return typeof key
83
+ }
84
+ }
@@ -0,0 +1,54 @@
1
+ @if (isOpen) {
2
+ <div
3
+ class="oc-modal-bg"
4
+ *ngIf="isOpen"
5
+ [ngClass]="{
6
+ 'closing-bg': closing,
7
+ shui: ocStyle === 'shui',
8
+ 'shui-modal': ocStyle === 'shui',
9
+ }"
10
+ >
11
+ <div
12
+ class="oc-modal"
13
+ [ngClass]="{
14
+ large: ocSize === 'large',
15
+ medium: ocSize === 'medium',
16
+ small: ocSize === 'small',
17
+ closing: closing,
18
+ 'total-white': ocBgColor === 'white',
19
+ }"
20
+ [ngStyle]="getModalStyles()"
21
+ >
22
+ <header class="oc-modal-header">
23
+ <h3 *ngIf="ocTitle && ocTitle.trim().length > 0">{{ ocTitle }}</h3>
24
+ @if (ocClose) {
25
+ <button
26
+ (click)="close()"
27
+ class="oc-close-btn"
28
+ >
29
+ <span
30
+ class="material-symbols-outlined md-18"
31
+ title="Fechar"
32
+ >close</span
33
+ >
34
+ </button>
35
+ }
36
+ </header>
37
+ <div
38
+ class="oc-modal-content"
39
+ [ngClass]="{
40
+ 'loading-content': ocLoading,
41
+ }"
42
+ >
43
+ @if (isOpen) {
44
+ <ng-content></ng-content>
45
+ }
46
+ @if (ocLoading) {
47
+ <div class="load-container">
48
+ <span class="loader material-symbols-outlined oc color p-1">progress_activity</span>
49
+ </div>
50
+ }
51
+ </div>
52
+ </div>
53
+ </div>
54
+ }
@@ -0,0 +1,204 @@
1
+ @use '../../../styles/variables.scss';
2
+ @import '../../../styles/styles.scss';
3
+
4
+ *{
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ .disabled-scroll{
9
+ margin: 0; height: 100%; overflow: hidden
10
+ }
11
+
12
+ .oc-modal-bg{
13
+ display: flex;
14
+ justify-content: center;
15
+ align-items: center;
16
+
17
+ padding: 1rem;
18
+
19
+ background-color: rgba($color: #000000, $alpha: 0.5);
20
+
21
+ position: fixed;
22
+ top: 0;
23
+ left: 0;
24
+ width: 100%;
25
+ height: 100%;
26
+
27
+ z-index: 20;
28
+ }
29
+
30
+
31
+ .oc-modal{
32
+ animation: show-up-modal 0.3s ease;
33
+
34
+ width: 100%;
35
+
36
+ padding: 1rem;
37
+
38
+ display: flex;
39
+ flex-direction: column;
40
+ justify-content: space-between;
41
+
42
+ background-color: variables.$color-gray-6;
43
+
44
+ border-radius: 1rem;
45
+ }
46
+
47
+ .oc-modal.total-white {
48
+ background-color: variables.$color-white;
49
+ }
50
+
51
+ .oc-modal-footer {
52
+ width: 100%;
53
+
54
+ display: flex;
55
+ justify-content: flex-end;
56
+ align-items: center;
57
+ gap: .5rem;
58
+
59
+ }
60
+
61
+ .oc-modal-content{
62
+ margin: 0;
63
+ padding: 1px 1px 0px 1px;
64
+
65
+ max-height: 80vh;
66
+ overflow-y: auto;
67
+
68
+ position: relative;
69
+
70
+ &.loading-content {
71
+ min-height: 200px;
72
+ overflow: hidden;
73
+ }
74
+
75
+ .load-container {
76
+ position: absolute;
77
+ top: 0;
78
+ z-index: 10;
79
+
80
+ width: 100%;
81
+ height: 100%;
82
+
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+
87
+ border-radius: 1rem;
88
+
89
+ backdrop-filter: blur(4px);
90
+
91
+ .loader {
92
+ animation: load 0.75s ease infinite;
93
+ font-size: 2rem;
94
+ }
95
+ }
96
+ }
97
+
98
+ .oc-modal-header{
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: space-between;
102
+
103
+ padding: 0;
104
+ margin: 0;
105
+
106
+ position: sticky;
107
+ top: 0;
108
+ width: 100%;
109
+
110
+ h3{
111
+ margin: 0;
112
+ padding: 0;
113
+ margin-bottom: 1.2rem;
114
+
115
+ font-size: 1.5rem;
116
+ color: variables.$color-gray-1;
117
+ }
118
+
119
+ .oc-close-btn{
120
+ margin: 0;
121
+ margin-right: .5rem;
122
+ padding: 0;
123
+ border: none;
124
+ border-radius: 50%;
125
+
126
+ background-color: transparent;
127
+
128
+ transition: 0.15s ease;
129
+
130
+ color: variables.$color-gray-4;
131
+
132
+ width: 15px;
133
+ height: 15px;
134
+
135
+ border-radius: 50%;
136
+ transition: 0.15s ease;
137
+
138
+ cursor: pointer;
139
+
140
+ span{
141
+ transition: .15s ease;
142
+ }
143
+
144
+ &:hover{
145
+ span{
146
+ color: variables.$color-gray-3;
147
+ }
148
+ }
149
+
150
+ position: absolute;
151
+ top: 0;
152
+ right: 0;
153
+ }
154
+ }
155
+
156
+ .oc-modal.small {
157
+ width: 400px;
158
+ }
159
+
160
+ .oc-modal.medium {
161
+ width: 600px;
162
+ }
163
+
164
+ .oc-modal.large {
165
+ width: 800px;
166
+ }
167
+
168
+ .closing{
169
+ animation: closeModal .15s ease;
170
+ }
171
+
172
+ .closing-bg{
173
+ transition: .1s ease;
174
+ opacity: 0;
175
+ }
176
+
177
+ @keyframes show-up-modal {
178
+ from{
179
+ opacity: 0.5;
180
+ transform: scale(0.8);
181
+ }to {
182
+ opacity: 1;
183
+ transform: scale(1);
184
+ }
185
+ }
186
+
187
+ @keyframes closeModal {
188
+ from{
189
+ opacity: 1;
190
+ }to{
191
+ opacity: 0.5;
192
+ transform: scale(0.5);
193
+ }
194
+ }
195
+
196
+ @keyframes load {
197
+ from {
198
+ transform: rotate(0deg)
199
+ } to {
200
+ transform: rotate(360deg)
201
+ }
202
+ }
203
+
204
+ @import './styles/oc-modal.shui-component.scss';
@@ -0,0 +1,82 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import {
3
+ AfterViewInit,
4
+ ChangeDetectorRef,
5
+ Component,
6
+ ElementRef,
7
+ EventEmitter,
8
+ Input,
9
+ Output,
10
+ ViewEncapsulation,
11
+ } from '@angular/core'
12
+ import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
13
+ import { StyleThemeService } from '../../services/style-theme.service'
14
+
15
+ @Component({
16
+ selector: 'oc-modal',
17
+ standalone: true,
18
+ imports: [CommonModule],
19
+ templateUrl: './oc-modal.component.html',
20
+ styleUrl: './oc-modal.component.scss',
21
+ encapsulation: ViewEncapsulation.None,
22
+ })
23
+ export class OcModalComponent implements AfterViewInit {
24
+ constructor(
25
+ private elRef: ElementRef,
26
+ private styleThemeService: StyleThemeService,
27
+ private cdr: ChangeDetectorRef
28
+ ) {}
29
+
30
+ @Input() ocClose: boolean = true
31
+ @Input() ocTitle: string = ''
32
+ @Input() ocSize: 'small' | 'medium' | 'large' | 'screen' = 'medium'
33
+ @Input() ocBgColor?: string
34
+ @Input() ocWidth: string = ''
35
+ @Input() ocMaxWidth: string = ''
36
+ @Input() ocStyle: OcStyleThemeType = 'otimus'
37
+ @Input() ocLoading: boolean = false
38
+ @Output() ocOnClose = new EventEmitter<any>()
39
+ @Output() ocOnOpen = new EventEmitter<any>()
40
+
41
+ @Input() isOpen: boolean = false
42
+ closing: boolean = false
43
+
44
+ ngAfterViewInit(): void {
45
+ this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
46
+ }
47
+
48
+ open(): void {
49
+ this.isOpen = true
50
+ this.elRef.nativeElement.ownerDocument.body.classList.add('disabled-scroll')
51
+ this.ocOnOpen.emit(this.isOpen)
52
+ }
53
+
54
+ close(): void {
55
+ this.closing = true
56
+ setTimeout(() => {
57
+ this.isOpen = false
58
+ this.closing = false
59
+
60
+ if (this.ocOnClose) {
61
+ this.ocOnClose.emit(this.isOpen)
62
+ }
63
+
64
+ this.elRef.nativeElement.ownerDocument.body.classList.remove('disabled-scroll')
65
+ this.cdr.detectChanges()
66
+ }, 100)
67
+ }
68
+
69
+ protected getModalStyles(): { [key: string]: string } {
70
+ const styles: { [key: string]: string } = {}
71
+ if (this.ocBgColor) {
72
+ styles['background-color'] = this.ocBgColor
73
+ }
74
+ if (this.ocWidth) {
75
+ styles['width'] = this.ocWidth
76
+ }
77
+ if (this.ocMaxWidth) {
78
+ styles['max-width'] = this.ocMaxWidth
79
+ }
80
+ return styles
81
+ }
82
+ }
@@ -0,0 +1,3 @@
1
+ .shui-modal .oc-modal {
2
+ border-radius: 0 ;
3
+ }
@@ -0,0 +1,11 @@
1
+ <footer class="oc-modal-footer" [ngClass]="{
2
+ 'left': ocSide === 'left',
3
+ 'right': ocSide === 'right',
4
+ 'fixed': ocFixed
5
+ }"
6
+ [ngStyle]="{
7
+ 'background-color': ocBgColor
8
+ }"
9
+ >
10
+ <ng-content></ng-content>
11
+ </footer>
@@ -0,0 +1,27 @@
1
+ @use '../../../styles/variables.scss';
2
+
3
+ .oc-modal-footer{
4
+ display: flex;
5
+ align-items: center;
6
+ gap: 1rem;
7
+
8
+ width: 100%;
9
+
10
+ margin-top: 1.5rem;
11
+
12
+ padding-bottom: 2px;
13
+ }
14
+
15
+ .left{
16
+ justify-content: flex-start;
17
+ }
18
+
19
+ .right{
20
+ justify-content: flex-end;
21
+ }
22
+
23
+ .fixed {
24
+ position: sticky;
25
+ bottom: 0;
26
+ background-color: variables.$color-gray-6;
27
+ }
@@ -0,0 +1,15 @@
1
+ import { CommonModule } from '@angular/common'
2
+ import { Component, Input } from '@angular/core'
3
+
4
+ @Component({
5
+ selector: 'oc-modal-footer',
6
+ standalone: true,
7
+ imports: [CommonModule],
8
+ templateUrl: './oc-modal-footer.component.html',
9
+ styleUrl: './oc-modal-footer.component.scss',
10
+ })
11
+ export class OcModalFooterComponent {
12
+ @Input() ocSide: 'left' | 'right' = 'right'
13
+ @Input() ocBgColor?: string
14
+ @Input() ocFixed: boolean = true
15
+ }
@@ -0,0 +1,14 @@
1
+ <main class="oc-not-found">
2
+ <div class="content">
3
+ <div class="main-title">
4
+ <h1>404</h1>
5
+ <span class="s-1">?</span>
6
+ <span class="s-2">?</span>
7
+ <span class="s-3">?</span>
8
+ </div>
9
+ <div class="not-found-msg">
10
+ <h2>Página não encontrada</h2>
11
+ <p>Não conseguimos encontrar a página que você está procurando</p>
12
+ </div>
13
+ </div>
14
+ </main>