otimus-library 0.2.48 → 0.2.50

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 (201) hide show
  1. package/esm2022/lib/components/oc-accordion/oc-accordion.component.mjs +48 -0
  2. package/esm2022/lib/components/oc-accordion-item/oc-accordion-item.component.mjs +35 -0
  3. package/esm2022/lib/components/oc-autocomplete/oc-autocomplete.component.mjs +275 -0
  4. package/esm2022/lib/components/oc-badge/oc-badge.component.mjs +30 -0
  5. package/esm2022/lib/components/oc-checkbox/oc-checkbox.component.mjs +133 -0
  6. package/esm2022/lib/components/oc-chip/oc-chip.component.mjs +45 -0
  7. package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +39 -0
  8. package/esm2022/lib/components/oc-input/oc-input.component.mjs +97 -0
  9. package/esm2022/lib/components/oc-key-value/oc-key-value.component.mjs +29 -0
  10. package/esm2022/lib/components/oc-log/oc-log.component.mjs +22 -0
  11. package/esm2022/lib/components/oc-menu/oc-menu.component.mjs +81 -0
  12. package/esm2022/lib/components/oc-modal/oc-modal.component.mjs +85 -0
  13. package/esm2022/lib/components/oc-modal-footer/oc-modal-footer.component.mjs +23 -0
  14. package/esm2022/lib/components/oc-not-found/oc-not-found.component.mjs +11 -0
  15. package/esm2022/lib/components/oc-pagination/oc-pagination.component.mjs +49 -0
  16. package/esm2022/lib/components/oc-profile/oc-profile.component.mjs +38 -0
  17. package/esm2022/lib/components/oc-step/oc-step.component.mjs +49 -0
  18. package/esm2022/lib/components/oc-stepper/oc-stepper.component.mjs +90 -0
  19. package/esm2022/lib/components/oc-tab/oc-tab.component.mjs +20 -0
  20. package/esm2022/lib/components/oc-tabs/oc-tabs.component.mjs +42 -0
  21. package/esm2022/lib/components/oc-toast/oc-toast.component.mjs +17 -0
  22. package/esm2022/lib/components/oc-toggle/oc-toggle.component.mjs +34 -0
  23. package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +117 -0
  24. package/esm2022/lib/interfaces/oc-autocomplete.mjs +2 -0
  25. package/esm2022/lib/interfaces/oc-menu.mjs +2 -0
  26. package/esm2022/lib/interfaces/oc-style-theme.mjs +2 -0
  27. package/esm2022/lib/interfaces/oc-toast.mjs +2 -0
  28. package/esm2022/lib/otimus-library.component.mjs +19 -0
  29. package/esm2022/lib/otimus-library.service.mjs +14 -0
  30. package/esm2022/lib/services/internationalization.service.mjs +68 -0
  31. package/esm2022/lib/services/oc-toast.service.mjs +81 -0
  32. package/esm2022/lib/services/style-theme.service.mjs +21 -0
  33. package/esm2022/otimus-library.mjs +5 -0
  34. package/esm2022/public-api.mjs +30 -0
  35. package/fesm2022/otimus-library.mjs +1513 -0
  36. package/fesm2022/otimus-library.mjs.map +1 -0
  37. package/index.d.ts +5 -0
  38. package/lib/components/oc-accordion/oc-accordion.component.d.ts +18 -0
  39. package/lib/components/oc-accordion-item/oc-accordion-item.component.d.ts +12 -0
  40. package/lib/components/oc-autocomplete/oc-autocomplete.component.d.ts +68 -0
  41. package/lib/components/oc-badge/oc-badge.component.d.ts +11 -0
  42. package/lib/components/oc-checkbox/oc-checkbox.component.d.ts +35 -0
  43. package/lib/components/oc-chip/oc-chip.component.d.ts +14 -0
  44. package/lib/components/oc-filter/oc-filter.component.d.ts +17 -0
  45. package/lib/components/oc-input/oc-input.component.d.ts +31 -0
  46. package/lib/components/oc-key-value/oc-key-value.component.d.ts +14 -0
  47. package/lib/components/oc-log/oc-log.component.d.ts +7 -0
  48. package/lib/components/oc-menu/oc-menu.component.d.ts +20 -0
  49. package/lib/components/oc-modal/oc-modal.component.d.ts +30 -0
  50. package/lib/components/oc-modal-footer/oc-modal-footer.component.d.ts +8 -0
  51. package/lib/components/oc-not-found/oc-not-found.component.d.ts +5 -0
  52. package/lib/components/oc-pagination/oc-pagination.component.d.ts +14 -0
  53. package/lib/components/oc-profile/oc-profile.component.d.ts +12 -0
  54. package/lib/components/oc-step/oc-step.component.d.ts +22 -0
  55. package/lib/components/oc-stepper/oc-stepper.component.d.ts +24 -0
  56. package/lib/components/oc-tab/oc-tab.component.d.ts +8 -0
  57. package/lib/components/oc-tabs/oc-tabs.component.d.ts +18 -0
  58. package/lib/components/oc-toast/oc-toast.component.d.ts +8 -0
  59. package/lib/components/oc-toggle/oc-toggle.component.d.ts +12 -0
  60. package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +20 -0
  61. package/lib/interfaces/oc-autocomplete.d.ts +5 -0
  62. package/lib/interfaces/oc-menu.d.ts +9 -0
  63. package/lib/interfaces/oc-style-theme.d.ts +2 -0
  64. package/lib/interfaces/oc-toast.d.ts +8 -0
  65. package/lib/otimus-library.component.d.ts +5 -0
  66. package/lib/otimus-library.service.d.ts +6 -0
  67. package/lib/services/internationalization.service.d.ts +17 -0
  68. package/lib/services/oc-toast.service.d.ts +14 -0
  69. package/lib/services/style-theme.service.d.ts +8 -0
  70. package/package.json +13 -4
  71. package/public-api.d.ts +26 -0
  72. package/ng-package.json +0 -12
  73. package/src/assets/images/loading.svg +0 -0
  74. package/src/assets/images/not-found-bg.jpg +0 -0
  75. package/src/lib/components/oc-accordion/oc-accordion.component.html +0 -3
  76. package/src/lib/components/oc-accordion/oc-accordion.component.scss +0 -4
  77. package/src/lib/components/oc-accordion/oc-accordion.component.ts +0 -44
  78. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.html +0 -19
  79. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.scss +0 -86
  80. package/src/lib/components/oc-accordion-item/oc-accordion-item.component.ts +0 -27
  81. package/src/lib/components/oc-accordion-item/styles/oc-accordion-item.shui-component.scss +0 -41
  82. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.html +0 -66
  83. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.scss +0 -157
  84. package/src/lib/components/oc-autocomplete/oc-autocomplete.component.ts +0 -277
  85. package/src/lib/components/oc-badge/oc-badge.component.html +0 -7
  86. package/src/lib/components/oc-badge/oc-badge.component.scss +0 -125
  87. package/src/lib/components/oc-badge/oc-badge.component.ts +0 -22
  88. package/src/lib/components/oc-checkbox/oc-checkbox.component.html +0 -30
  89. package/src/lib/components/oc-checkbox/oc-checkbox.component.scss +0 -103
  90. package/src/lib/components/oc-checkbox/oc-checkbox.component.ts +0 -132
  91. package/src/lib/components/oc-checkbox/styles/oc-checkbox.shui-component.scss +0 -21
  92. package/src/lib/components/oc-chip/oc-chip.component.html +0 -20
  93. package/src/lib/components/oc-chip/oc-chip.component.scss +0 -102
  94. package/src/lib/components/oc-chip/oc-chip.component.ts +0 -32
  95. package/src/lib/components/oc-filter/oc-filter.component.html +0 -22
  96. package/src/lib/components/oc-filter/oc-filter.component.scss +0 -78
  97. package/src/lib/components/oc-filter/oc-filter.component.spec.ts +0 -23
  98. package/src/lib/components/oc-filter/oc-filter.component.ts +0 -30
  99. package/src/lib/components/oc-input/oc-input.component.html +0 -21
  100. package/src/lib/components/oc-input/oc-input.component.scss +0 -3
  101. package/src/lib/components/oc-input/oc-input.component.ts +0 -100
  102. package/src/lib/components/oc-key-value/oc-key-value.component.html +0 -12
  103. package/src/lib/components/oc-key-value/oc-key-value.component.scss +0 -26
  104. package/src/lib/components/oc-key-value/oc-key-value.component.ts +0 -23
  105. package/src/lib/components/oc-key-value/styles/oc-key-value.shui-component.scss +0 -26
  106. package/src/lib/components/oc-log/oc-log.component.html +0 -18
  107. package/src/lib/components/oc-log/oc-log.component.scss +0 -61
  108. package/src/lib/components/oc-log/oc-log.component.ts +0 -15
  109. package/src/lib/components/oc-menu/oc-menu.component.html +0 -31
  110. package/src/lib/components/oc-menu/oc-menu.component.scss +0 -101
  111. package/src/lib/components/oc-menu/oc-menu.component.ts +0 -84
  112. package/src/lib/components/oc-modal/oc-modal.component.html +0 -54
  113. package/src/lib/components/oc-modal/oc-modal.component.scss +0 -204
  114. package/src/lib/components/oc-modal/oc-modal.component.ts +0 -82
  115. package/src/lib/components/oc-modal/styles/oc-modal.shui-component.scss +0 -3
  116. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.html +0 -11
  117. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.scss +0 -27
  118. package/src/lib/components/oc-modal-footer/oc-modal-footer.component.ts +0 -15
  119. package/src/lib/components/oc-not-found/oc-not-found.component.html +0 -14
  120. package/src/lib/components/oc-not-found/oc-not-found.component.scss +0 -153
  121. package/src/lib/components/oc-not-found/oc-not-found.component.spec.ts +0 -23
  122. package/src/lib/components/oc-not-found/oc-not-found.component.ts +0 -12
  123. package/src/lib/components/oc-pagination/oc-pagination.component.html +0 -32
  124. package/src/lib/components/oc-pagination/oc-pagination.component.scss +0 -80
  125. package/src/lib/components/oc-pagination/oc-pagination.component.ts +0 -46
  126. package/src/lib/components/oc-profile/oc-profile.component.html +0 -17
  127. package/src/lib/components/oc-profile/oc-profile.component.scss +0 -80
  128. package/src/lib/components/oc-profile/oc-profile.component.ts +0 -38
  129. package/src/lib/components/oc-step/oc-step.component.html +0 -32
  130. package/src/lib/components/oc-step/oc-step.component.scss +0 -106
  131. package/src/lib/components/oc-step/oc-step.component.ts +0 -39
  132. package/src/lib/components/oc-step/styles/oc-step.shui-component.scss +0 -52
  133. package/src/lib/components/oc-stepper/oc-stepper.component.html +0 -3
  134. package/src/lib/components/oc-stepper/oc-stepper.component.scss +0 -9
  135. package/src/lib/components/oc-stepper/oc-stepper.component.ts +0 -86
  136. package/src/lib/components/oc-tab/oc-tab.component.html +0 -3
  137. package/src/lib/components/oc-tab/oc-tab.component.scss +0 -0
  138. package/src/lib/components/oc-tab/oc-tab.component.ts +0 -15
  139. package/src/lib/components/oc-table/oc-table.component.html +0 -62
  140. package/src/lib/components/oc-table/oc-table.component.scss +0 -2
  141. package/src/lib/components/oc-table/oc-table.component.ts +0 -51
  142. package/src/lib/components/oc-tabs/oc-tabs.component.html +0 -13
  143. package/src/lib/components/oc-tabs/oc-tabs.component.scss +0 -47
  144. package/src/lib/components/oc-tabs/oc-tabs.component.ts +0 -46
  145. package/src/lib/components/oc-tabs/styles/oc-tabs.shui-component.scss +0 -25
  146. package/src/lib/components/oc-toast/oc-toast.component.html +0 -46
  147. package/src/lib/components/oc-toast/oc-toast.component.scss +0 -133
  148. package/src/lib/components/oc-toast/oc-toast.component.ts +0 -15
  149. package/src/lib/components/oc-toggle/oc-toggle.component.html +0 -4
  150. package/src/lib/components/oc-toggle/oc-toggle.component.scss +0 -73
  151. package/src/lib/components/oc-toggle/oc-toggle.component.spec.ts +0 -23
  152. package/src/lib/components/oc-toggle/oc-toggle.component.ts +0 -32
  153. package/src/lib/directives/oc-tooltip/oc-tooltip.directive.ts +0 -108
  154. package/src/lib/interfaces/internal/languages.ts +0 -16
  155. package/src/lib/interfaces/oc-autocomplete.ts +0 -6
  156. package/src/lib/interfaces/oc-menu.ts +0 -10
  157. package/src/lib/interfaces/oc-style-theme.ts +0 -3
  158. package/src/lib/interfaces/oc-table.ts +0 -12
  159. package/src/lib/interfaces/oc-toast.ts +0 -8
  160. package/src/lib/otimus-library.component.ts +0 -16
  161. package/src/lib/otimus-library.service.ts +0 -9
  162. package/src/lib/services/internationalization.service.ts +0 -73
  163. package/src/lib/services/oc-toast.service.ts +0 -107
  164. package/src/lib/services/style-theme.service.ts +0 -19
  165. package/src/public-api.ts +0 -30
  166. package/tsconfig.lib.json +0 -14
  167. package/tsconfig.lib.prod.json +0 -10
  168. package/tsconfig.spec.json +0 -14
  169. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff +0 -0
  170. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff2 +0 -0
  171. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Regular.woff +0 -0
  172. /package/{src/assets → assets}/fonts/siemens/SH-Bree-Headline-Regular.woff2 +0 -0
  173. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Black.woff +0 -0
  174. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Black.woff2 +0 -0
  175. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BlackItalic.woff +0 -0
  176. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BlackItalic.woff2 +0 -0
  177. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Bold.woff +0 -0
  178. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Bold.woff2 +0 -0
  179. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BoldItalic.woff +0 -0
  180. /package/{src/assets → assets}/fonts/siemens/SiemensSans-BoldItalic.woff2 +0 -0
  181. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Italic.woff +0 -0
  182. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Italic.woff2 +0 -0
  183. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Roman.woff +0 -0
  184. /package/{src/assets → assets}/fonts/siemens/SiemensSans-Roman.woff2 +0 -0
  185. /package/{src/styles → styles}/colors.scss +0 -0
  186. /package/{src/styles → styles}/components/buttons/buttons.scss +0 -0
  187. /package/{src/styles → styles}/components/buttons/buttons.shui.scss +0 -0
  188. /package/{src/styles → styles}/components/index.scss +0 -0
  189. /package/{src/styles → styles}/components/inputs/inputs.scss +0 -0
  190. /package/{src/styles → styles}/components/inputs/inputs.shui.scss +0 -0
  191. /package/{src/styles → styles}/components/table/table.scss +0 -0
  192. /package/{src/styles → styles}/components/table/table.shui.scss +0 -0
  193. /package/{src/styles → styles}/components/tooltip.scss +0 -0
  194. /package/{src/styles → styles}/grid.scss +0 -0
  195. /package/{src/styles → styles}/patterns/shui/colors.shui.scss +0 -0
  196. /package/{src/styles → styles}/patterns/shui/fonts.shui.scss +0 -0
  197. /package/{src/styles → styles}/patterns/shui/index.shui.scss +0 -0
  198. /package/{src/styles → styles}/patterns/shui/variables.shui.scss +0 -0
  199. /package/{src/styles → styles}/states.scss +0 -0
  200. /package/{src/styles → styles}/styles.scss +0 -0
  201. /package/{src/styles → styles}/variables.scss +0 -0
@@ -1,12 +0,0 @@
1
- <div class="oc-key-value" [ngClass]="{
2
- shui: ocStyle === 'shui'
3
- }">
4
- <!-- Ícone -->
5
- <ng-content></ng-content>
6
- <p>
7
- @if (ocKey) {
8
- <span [innerHTML]="ocKey + ':'"></span>
9
- }
10
- {{ocValue}}
11
- </p>
12
- </div>
@@ -1,26 +0,0 @@
1
- @use '../../../styles/variables.scss';
2
-
3
- .oc-key-value{
4
- display: flex;
5
- align-items: center;
6
- gap: 0.1rem;
7
-
8
- font-size: 1rem;
9
-
10
- p{
11
- color: variables.$color-gray-2;
12
- font-weight: 500;
13
- }
14
-
15
- span{
16
- color: variables.$color-brand-p-1;
17
- font-weight: 500;
18
- }
19
-
20
- .material-symbols-outlined{
21
- color: variables.$color-brand-p-1;
22
- font-size: 0.95rem;
23
- }
24
- }
25
-
26
- @import './styles/oc-key-value.shui-component.scss';
@@ -1,23 +0,0 @@
1
- import { CommonModule } from '@angular/common'
2
- import { AfterViewInit, Component, Input, ViewEncapsulation } from '@angular/core'
3
- import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
4
- import { StyleThemeService } from '../../services/style-theme.service'
5
-
6
- @Component({
7
- selector: 'oc-key-value',
8
- standalone: true,
9
- imports: [CommonModule],
10
- templateUrl: './oc-key-value.component.html',
11
- styleUrl: './oc-key-value.component.scss',
12
- encapsulation: ViewEncapsulation.None,
13
- })
14
- export class OcKeyValueComponent implements AfterViewInit {
15
- constructor(private styleThemeService: StyleThemeService) {}
16
- @Input() ocKey: string = ''
17
- @Input() ocValue: string = ''
18
- @Input() ocStyle: OcStyleThemeType = 'otimus'
19
-
20
- ngAfterViewInit(): void {
21
- this.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
22
- }
23
- }
@@ -1,26 +0,0 @@
1
- @use '../../../../styles/variables.scss';
2
-
3
- .shui {
4
- &.oc-key-value{
5
- display: flex;
6
- align-items: center;
7
- gap: 0.1rem;
8
-
9
- font-size: 1rem;
10
-
11
- p{
12
- color: variables.$color-shui-ui-5;
13
- font-weight: 500;
14
- }
15
-
16
- span{
17
- color: variables.$color-shui-ui-8;
18
- font-weight: 500;
19
- }
20
-
21
- .material-symbols-outlined{
22
- color: variables.$color-shui-ui-8;
23
- font-size: 0.95rem;
24
- }
25
- }
26
- }
@@ -1,18 +0,0 @@
1
- <div class="oc-log">
2
- <div class="left-side" [ngClass]="{
3
- 'has-profile': ocProfilePic || ocUserName
4
- }">
5
- @if(ocProfilePic || ocUserName) {
6
- <oc-profile [ocProfilePic]="ocProfilePic" [ocUserName]="ocUserName">
7
- </oc-profile>
8
- } @else {
9
- <div class="dot"></div>
10
- }
11
- </div>
12
-
13
- <div class="content" [ngClass]="{
14
- 'has-profile-content': ocProfilePic || ocUserName
15
- }" selector="[content]">
16
- <ng-content></ng-content>
17
- </div>
18
- </div>
@@ -1,61 +0,0 @@
1
- @use '../../../styles/variables.scss';
2
-
3
- .oc-log{
4
- width: 100%;
5
-
6
- margin: 0;
7
-
8
- border-left: 3px solid variables.$color-gray-4;
9
- position: relative;
10
-
11
- padding: 4rem 0;
12
- padding-top: 0;
13
-
14
- border-radius: 1rem;
15
- border-bottom-left-radius: 0;
16
- border-top-left-radius: 0;
17
-
18
- transition: .2s ease;
19
-
20
- &:hover{
21
- background-color: variables.$color-gray-5;
22
- }
23
-
24
- .has-profile{
25
- left: -2.1rem !important;
26
- }
27
-
28
- .left-side{
29
- position: absolute;
30
- z-index: 8;
31
- left: -.6rem;
32
- top: 0;
33
- height: 100%;
34
- display: flex;
35
- align-items: flex-start;
36
-
37
- .dot{
38
- width: 1rem;
39
- height: 1rem;
40
-
41
- border-radius: .2rem;
42
- transform: rotate(45deg);
43
-
44
- background-color: variables.$color-brand-p-1;
45
- }
46
- }
47
- }
48
-
49
- .content{
50
- display: flex;
51
- flex-direction: row;
52
- align-items: flex-start;
53
- justify-content: space-between;
54
-
55
- padding-left: 2rem;
56
- padding-top: 1.5rem;
57
- }
58
-
59
- .has-profile-content{
60
- padding-left: 3rem;
61
- }
@@ -1,15 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { OcProfileComponent } from '../oc-profile/oc-profile.component';
3
- import { CommonModule } from '@angular/common';
4
-
5
- @Component({
6
- selector: 'oc-log',
7
- standalone: true,
8
- imports: [CommonModule, OcProfileComponent],
9
- templateUrl: './oc-log.component.html',
10
- styleUrl: './oc-log.component.scss'
11
- })
12
- export class OcLogComponent {
13
- @Input() ocProfilePic?: string = ''
14
- @Input() ocUserName?: string = ''
15
- }
@@ -1,31 +0,0 @@
1
- <div class="oc-menu" *ngIf="isMenuShown" cdkMenu #ocMenuEl>
2
- <ul>
3
- @for(option of ocMenu; track $index) {
4
- <li
5
- [ngClass]="{
6
- 'checkbox-option cbx': typeof(option.checked) === 'boolean'
7
- }"
8
- >
9
- @if(typeof(option.checked) === 'boolean'){
10
- <div class="checkbox-opt cbx">
11
- <oc-checkbox (ocChange)="changeCheckbox(option.name, $event)" [ocChecked]="option.checked!" class="cbx" ocSize="tiny" [ocLabel]="option.name" ocBorderColor="gray"/>
12
- </div>
13
- }
14
- @if(option.icon) {
15
- <span class="material-symbols-outlined">
16
- {{option.icon}}
17
- </span>
18
- }
19
- @if(option.callback){
20
- <button (click)="option.callback()">{{option.name}}</button>
21
- }
22
- @if(option.url){
23
- <a [href]="option.url" [target]="option.targetBlank ? '_blank' : ''">{{option.name}}</a>
24
- }
25
- @if (!option.callback && !option.url && typeof(option.checked) !== 'boolean') {
26
- <span>{{option.name}}</span>
27
- }
28
- </li>
29
- }
30
- </ul>
31
- </div>
@@ -1,101 +0,0 @@
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
- }
@@ -1,84 +0,0 @@
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
- }
@@ -1,54 +0,0 @@
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
- }
@@ -1,204 +0,0 @@
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';