otimus-library 0.2.46 → 0.2.48
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 +26 -26
- package/ng-package.json +12 -0
- package/package.json +4 -13
- package/src/assets/images/loading.svg +0 -0
- package/src/assets/images/not-found-bg.jpg +0 -0
- package/src/lib/components/oc-accordion/oc-accordion.component.html +3 -0
- package/src/lib/components/oc-accordion/oc-accordion.component.scss +4 -0
- package/src/lib/components/oc-accordion/oc-accordion.component.ts +44 -0
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.html +19 -0
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.scss +86 -0
- package/src/lib/components/oc-accordion-item/oc-accordion-item.component.ts +27 -0
- package/src/lib/components/oc-accordion-item/styles/oc-accordion-item.shui-component.scss +41 -0
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.html +66 -0
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.scss +157 -0
- package/src/lib/components/oc-autocomplete/oc-autocomplete.component.ts +277 -0
- package/src/lib/components/oc-badge/oc-badge.component.html +7 -0
- package/src/lib/components/oc-badge/oc-badge.component.scss +125 -0
- package/src/lib/components/oc-badge/oc-badge.component.ts +22 -0
- package/src/lib/components/oc-checkbox/oc-checkbox.component.html +30 -0
- package/src/lib/components/oc-checkbox/oc-checkbox.component.scss +103 -0
- package/src/lib/components/oc-checkbox/oc-checkbox.component.ts +132 -0
- package/src/lib/components/oc-checkbox/styles/oc-checkbox.shui-component.scss +21 -0
- package/src/lib/components/oc-chip/oc-chip.component.html +20 -0
- package/src/lib/components/oc-chip/oc-chip.component.scss +102 -0
- package/src/lib/components/oc-chip/oc-chip.component.ts +32 -0
- package/src/lib/components/oc-filter/oc-filter.component.html +22 -0
- package/src/lib/components/oc-filter/oc-filter.component.scss +78 -0
- package/src/lib/components/oc-filter/oc-filter.component.spec.ts +23 -0
- package/src/lib/components/oc-filter/oc-filter.component.ts +30 -0
- package/src/lib/components/oc-input/oc-input.component.html +21 -0
- package/src/lib/components/oc-input/oc-input.component.scss +3 -0
- package/src/lib/components/oc-input/oc-input.component.ts +100 -0
- package/src/lib/components/oc-key-value/oc-key-value.component.html +12 -0
- package/src/lib/components/oc-key-value/oc-key-value.component.scss +26 -0
- package/src/lib/components/oc-key-value/oc-key-value.component.ts +23 -0
- package/src/lib/components/oc-key-value/styles/oc-key-value.shui-component.scss +26 -0
- package/src/lib/components/oc-log/oc-log.component.html +18 -0
- package/src/lib/components/oc-log/oc-log.component.scss +61 -0
- package/src/lib/components/oc-log/oc-log.component.ts +15 -0
- package/src/lib/components/oc-menu/oc-menu.component.html +31 -0
- package/src/lib/components/oc-menu/oc-menu.component.scss +101 -0
- package/src/lib/components/oc-menu/oc-menu.component.ts +84 -0
- package/src/lib/components/oc-modal/oc-modal.component.html +54 -0
- package/src/lib/components/oc-modal/oc-modal.component.scss +204 -0
- package/src/lib/components/oc-modal/oc-modal.component.ts +82 -0
- package/src/lib/components/oc-modal/styles/oc-modal.shui-component.scss +3 -0
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.html +11 -0
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.scss +27 -0
- package/src/lib/components/oc-modal-footer/oc-modal-footer.component.ts +15 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.html +14 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.scss +153 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.spec.ts +23 -0
- package/src/lib/components/oc-not-found/oc-not-found.component.ts +12 -0
- package/src/lib/components/oc-pagination/oc-pagination.component.html +32 -0
- package/src/lib/components/oc-pagination/oc-pagination.component.scss +80 -0
- package/src/lib/components/oc-pagination/oc-pagination.component.ts +46 -0
- package/src/lib/components/oc-profile/oc-profile.component.html +17 -0
- package/src/lib/components/oc-profile/oc-profile.component.scss +80 -0
- package/src/lib/components/oc-profile/oc-profile.component.ts +38 -0
- package/src/lib/components/oc-step/oc-step.component.html +32 -0
- package/src/lib/components/oc-step/oc-step.component.scss +106 -0
- package/src/lib/components/oc-step/oc-step.component.ts +39 -0
- package/src/lib/components/oc-step/styles/oc-step.shui-component.scss +52 -0
- package/src/lib/components/oc-stepper/oc-stepper.component.html +3 -0
- package/src/lib/components/oc-stepper/oc-stepper.component.scss +9 -0
- package/src/lib/components/oc-stepper/oc-stepper.component.ts +86 -0
- package/src/lib/components/oc-tab/oc-tab.component.html +3 -0
- package/src/lib/components/oc-tab/oc-tab.component.scss +0 -0
- package/src/lib/components/oc-tab/oc-tab.component.ts +15 -0
- package/src/lib/components/oc-table/oc-table.component.html +62 -0
- package/src/lib/components/oc-table/oc-table.component.scss +2 -0
- package/src/lib/components/oc-table/oc-table.component.ts +51 -0
- package/src/lib/components/oc-tabs/oc-tabs.component.html +13 -0
- package/src/lib/components/oc-tabs/oc-tabs.component.scss +47 -0
- package/src/lib/components/oc-tabs/oc-tabs.component.ts +46 -0
- package/src/lib/components/oc-tabs/styles/oc-tabs.shui-component.scss +25 -0
- package/src/lib/components/oc-toast/oc-toast.component.html +46 -0
- package/src/lib/components/oc-toast/oc-toast.component.scss +133 -0
- package/src/lib/components/oc-toast/oc-toast.component.ts +15 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.html +4 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.scss +73 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.spec.ts +23 -0
- package/src/lib/components/oc-toggle/oc-toggle.component.ts +32 -0
- package/src/lib/directives/oc-tooltip/oc-tooltip.directive.ts +108 -0
- package/src/lib/interfaces/internal/languages.ts +16 -0
- package/src/lib/interfaces/oc-autocomplete.ts +6 -0
- package/src/lib/interfaces/oc-menu.ts +10 -0
- package/src/lib/interfaces/oc-style-theme.ts +3 -0
- package/src/lib/interfaces/oc-table.ts +12 -0
- package/src/lib/interfaces/oc-toast.ts +8 -0
- package/src/lib/otimus-library.component.ts +16 -0
- package/src/lib/otimus-library.service.ts +9 -0
- package/src/lib/services/internationalization.service.ts +73 -0
- package/src/lib/services/oc-toast.service.ts +107 -0
- package/src/lib/services/style-theme.service.ts +19 -0
- package/src/public-api.ts +30 -0
- package/{styles → src/styles}/colors.scss +70 -70
- package/{styles → src/styles}/components/buttons/buttons.scss +225 -225
- package/{styles → src/styles}/components/buttons/buttons.shui.scss +61 -61
- package/{styles → src/styles}/components/index.scss +2 -2
- package/{styles → src/styles}/components/inputs/inputs.scss +248 -248
- package/{styles → src/styles}/components/inputs/inputs.shui.scss +212 -212
- package/{styles → src/styles}/components/table/table.scss +69 -69
- package/{styles → src/styles}/components/table/table.shui.scss +50 -50
- package/{styles → src/styles}/components/tooltip.scss +26 -26
- package/{styles → src/styles}/grid.scss +1122 -1122
- package/{styles → src/styles}/patterns/shui/colors.shui.scss +154 -154
- package/{styles → src/styles}/patterns/shui/fonts.shui.scss +65 -65
- package/{styles → src/styles}/patterns/shui/index.shui.scss +24 -24
- package/{styles → src/styles}/patterns/shui/variables.shui.scss +22 -22
- package/{styles → src/styles}/states.scss +5 -5
- package/{styles → src/styles}/styles.scss +46 -46
- package/{styles → src/styles}/variables.scss +47 -47
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/oc-accordion/oc-accordion.component.mjs +0 -48
- package/esm2022/lib/components/oc-accordion-item/oc-accordion-item.component.mjs +0 -35
- package/esm2022/lib/components/oc-autocomplete/oc-autocomplete.component.mjs +0 -275
- package/esm2022/lib/components/oc-badge/oc-badge.component.mjs +0 -30
- package/esm2022/lib/components/oc-checkbox/oc-checkbox.component.mjs +0 -133
- package/esm2022/lib/components/oc-chip/oc-chip.component.mjs +0 -45
- package/esm2022/lib/components/oc-filter/oc-filter.component.mjs +0 -39
- package/esm2022/lib/components/oc-input/oc-input.component.mjs +0 -97
- package/esm2022/lib/components/oc-key-value/oc-key-value.component.mjs +0 -29
- package/esm2022/lib/components/oc-log/oc-log.component.mjs +0 -22
- package/esm2022/lib/components/oc-menu/oc-menu.component.mjs +0 -81
- package/esm2022/lib/components/oc-modal/oc-modal.component.mjs +0 -85
- package/esm2022/lib/components/oc-modal-footer/oc-modal-footer.component.mjs +0 -23
- package/esm2022/lib/components/oc-not-found/oc-not-found.component.mjs +0 -11
- package/esm2022/lib/components/oc-pagination/oc-pagination.component.mjs +0 -49
- package/esm2022/lib/components/oc-profile/oc-profile.component.mjs +0 -38
- package/esm2022/lib/components/oc-step/oc-step.component.mjs +0 -49
- package/esm2022/lib/components/oc-stepper/oc-stepper.component.mjs +0 -90
- package/esm2022/lib/components/oc-tab/oc-tab.component.mjs +0 -20
- package/esm2022/lib/components/oc-tabs/oc-tabs.component.mjs +0 -42
- package/esm2022/lib/components/oc-toast/oc-toast.component.mjs +0 -17
- package/esm2022/lib/components/oc-toggle/oc-toggle.component.mjs +0 -34
- package/esm2022/lib/directives/oc-tooltip/oc-tooltip.directive.mjs +0 -117
- package/esm2022/lib/interfaces/oc-autocomplete.mjs +0 -2
- package/esm2022/lib/interfaces/oc-menu.mjs +0 -2
- package/esm2022/lib/interfaces/oc-style-theme.mjs +0 -2
- package/esm2022/lib/interfaces/oc-toast.mjs +0 -2
- package/esm2022/lib/otimus-library.component.mjs +0 -19
- package/esm2022/lib/otimus-library.service.mjs +0 -14
- package/esm2022/lib/services/internationalization.service.mjs +0 -68
- package/esm2022/lib/services/oc-toast.service.mjs +0 -81
- package/esm2022/lib/services/style-theme.service.mjs +0 -21
- package/esm2022/otimus-library.mjs +0 -5
- package/esm2022/public-api.mjs +0 -30
- package/fesm2022/otimus-library.mjs +0 -1513
- package/fesm2022/otimus-library.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/oc-accordion/oc-accordion.component.d.ts +0 -18
- package/lib/components/oc-accordion-item/oc-accordion-item.component.d.ts +0 -12
- package/lib/components/oc-autocomplete/oc-autocomplete.component.d.ts +0 -68
- package/lib/components/oc-badge/oc-badge.component.d.ts +0 -11
- package/lib/components/oc-checkbox/oc-checkbox.component.d.ts +0 -35
- package/lib/components/oc-chip/oc-chip.component.d.ts +0 -14
- package/lib/components/oc-filter/oc-filter.component.d.ts +0 -17
- package/lib/components/oc-input/oc-input.component.d.ts +0 -31
- package/lib/components/oc-key-value/oc-key-value.component.d.ts +0 -14
- package/lib/components/oc-log/oc-log.component.d.ts +0 -7
- package/lib/components/oc-menu/oc-menu.component.d.ts +0 -20
- package/lib/components/oc-modal/oc-modal.component.d.ts +0 -30
- package/lib/components/oc-modal-footer/oc-modal-footer.component.d.ts +0 -8
- package/lib/components/oc-not-found/oc-not-found.component.d.ts +0 -5
- package/lib/components/oc-pagination/oc-pagination.component.d.ts +0 -14
- package/lib/components/oc-profile/oc-profile.component.d.ts +0 -12
- package/lib/components/oc-step/oc-step.component.d.ts +0 -22
- package/lib/components/oc-stepper/oc-stepper.component.d.ts +0 -24
- package/lib/components/oc-tab/oc-tab.component.d.ts +0 -8
- package/lib/components/oc-tabs/oc-tabs.component.d.ts +0 -18
- package/lib/components/oc-toast/oc-toast.component.d.ts +0 -8
- package/lib/components/oc-toggle/oc-toggle.component.d.ts +0 -12
- package/lib/directives/oc-tooltip/oc-tooltip.directive.d.ts +0 -20
- package/lib/interfaces/oc-autocomplete.d.ts +0 -5
- package/lib/interfaces/oc-menu.d.ts +0 -9
- package/lib/interfaces/oc-style-theme.d.ts +0 -2
- package/lib/interfaces/oc-toast.d.ts +0 -8
- package/lib/otimus-library.component.d.ts +0 -5
- package/lib/otimus-library.service.d.ts +0 -6
- package/lib/services/internationalization.service.d.ts +0 -17
- package/lib/services/oc-toast.service.d.ts +0 -14
- package/lib/services/style-theme.service.d.ts +0 -8
- package/public-api.d.ts +0 -26
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Oblique.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Regular.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SH-Bree-Headline-Regular.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Black.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Black.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BlackItalic.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BlackItalic.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Bold.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Bold.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BoldItalic.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-BoldItalic.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Italic.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Italic.woff2 +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Roman.woff +0 -0
- /package/{assets → src/assets}/fonts/siemens/SiemensSans-Roman.woff2 +0 -0
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# OtimusLibrary
|
|
2
|
-
|
|
3
|
-
Library utilizada pelo OTIMUS CLINIC, um produto da Innovo
|
|
4
|
-
|
|
5
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.0.
|
|
6
|
-
|
|
7
|
-
## Code scaffolding
|
|
8
|
-
|
|
9
|
-
Run `ng generate component component-name --project otimus-library` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project otimus-library`.
|
|
10
|
-
> Note: Don't forget to add `--project otimus-library` or else it will be added to the default project in your `angular.json` file.
|
|
11
|
-
|
|
12
|
-
## Build
|
|
13
|
-
|
|
14
|
-
Run `ng build otimus-library` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
15
|
-
|
|
16
|
-
## Publishing
|
|
17
|
-
|
|
18
|
-
After building your library with `ng build otimus-library`, go to the dist folder `cd dist/otimus-library` and run `npm publish`.
|
|
19
|
-
|
|
20
|
-
## Running unit tests
|
|
21
|
-
|
|
22
|
-
Run `ng test otimus-library` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
23
|
-
|
|
24
|
-
## Further help
|
|
25
|
-
|
|
26
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# OtimusLibrary
|
|
2
|
+
|
|
3
|
+
Library utilizada pelo OTIMUS CLINIC, um produto da Innovo
|
|
4
|
+
|
|
5
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.0.
|
|
6
|
+
|
|
7
|
+
## Code scaffolding
|
|
8
|
+
|
|
9
|
+
Run `ng generate component component-name --project otimus-library` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project otimus-library`.
|
|
10
|
+
> Note: Don't forget to add `--project otimus-library` or else it will be added to the default project in your `angular.json` file.
|
|
11
|
+
|
|
12
|
+
## Build
|
|
13
|
+
|
|
14
|
+
Run `ng build otimus-library` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
15
|
+
|
|
16
|
+
## Publishing
|
|
17
|
+
|
|
18
|
+
After building your library with `ng build otimus-library`, go to the dist folder `cd dist/otimus-library` and run `npm publish`.
|
|
19
|
+
|
|
20
|
+
## Running unit tests
|
|
21
|
+
|
|
22
|
+
Run `ng test otimus-library` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
23
|
+
|
|
24
|
+
## Further help
|
|
25
|
+
|
|
26
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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/assets/fonts", "glob": "**/*.*", "output": "assets/fonts" },
|
|
10
|
+
{ "input": "src/styles", "glob": "**/*.*", "output": "styles" }
|
|
11
|
+
]
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "otimus-library",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.48",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^18.2.14",
|
|
@@ -17,16 +17,7 @@
|
|
|
17
17
|
"sideEffects": false,
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
-
"sass": "./src/styles/styles.scss"
|
|
21
|
-
"types": "./index.d.ts",
|
|
22
|
-
"esm2022": "./esm2022/otimus-library.mjs",
|
|
23
|
-
"esm": "./esm2022/otimus-library.mjs",
|
|
24
|
-
"default": "./fesm2022/otimus-library.mjs"
|
|
25
|
-
},
|
|
26
|
-
"./package.json": {
|
|
27
|
-
"default": "./package.json"
|
|
20
|
+
"sass": "./src/styles/styles.scss"
|
|
28
21
|
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
"typings": "index.d.ts"
|
|
32
|
-
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AfterViewInit, Component, ContentChildren, Input, QueryList } from '@angular/core'
|
|
2
|
+
import { OcAccordionItemComponent } from '../oc-accordion-item/oc-accordion-item.component'
|
|
3
|
+
import { CommonModule } from '@angular/common'
|
|
4
|
+
import { OcStyleThemeType } from '../../interfaces/oc-style-theme'
|
|
5
|
+
import { StyleThemeService } from '../../services/style-theme.service'
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'oc-accordion',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule, OcAccordionItemComponent],
|
|
11
|
+
templateUrl: './oc-accordion.component.html',
|
|
12
|
+
styleUrl: './oc-accordion.component.scss',
|
|
13
|
+
})
|
|
14
|
+
export class OcAccordionComponent implements AfterViewInit {
|
|
15
|
+
@ContentChildren(OcAccordionItemComponent) items!: QueryList<OcAccordionItemComponent>
|
|
16
|
+
@Input() ocAlternate: boolean = true
|
|
17
|
+
@Input() ocCurrentIndex?: number
|
|
18
|
+
@Input() ocStyle: OcStyleThemeType = 'otimus'
|
|
19
|
+
|
|
20
|
+
constructor(private styleThemeService: StyleThemeService) {}
|
|
21
|
+
|
|
22
|
+
ngAfterViewInit(): void {
|
|
23
|
+
this.items.forEach((item, i) => {
|
|
24
|
+
item.ocStyle = this.styleThemeService.getStyleTheme() || this.ocStyle
|
|
25
|
+
item.closeAllItems.subscribe(() => this.closeAllItems())
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
closeAllItems(): void {
|
|
30
|
+
if (this.ocAlternate) {
|
|
31
|
+
this.items.forEach((item) => (item.ocIsOpen = false))
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
alternateToIndex(index: number): void {
|
|
36
|
+
this.items.forEach((item, i) => {
|
|
37
|
+
if (i === index) {
|
|
38
|
+
item.ocIsOpen = true
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
item.ocIsOpen = false
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div class="oc-accordion-item" [ngClass]="{
|
|
2
|
+
'shui': ocStyle === 'shui'
|
|
3
|
+
}">
|
|
4
|
+
<div class="item-header" [ngClass]="{
|
|
5
|
+
open: ocIsOpen
|
|
6
|
+
}" (click)="toggle()">
|
|
7
|
+
<h3>{{ocTitle}}</h3>
|
|
8
|
+
<span class="material-symbols-outlined">
|
|
9
|
+
keyboard_control_key
|
|
10
|
+
</span>
|
|
11
|
+
</div>
|
|
12
|
+
@if (ocIsOpen) {
|
|
13
|
+
<div class="oc-content" [ngClass]="{
|
|
14
|
+
open: ocIsOpen
|
|
15
|
+
}">
|
|
16
|
+
<ng-content></ng-content>
|
|
17
|
+
</div>
|
|
18
|
+
}
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@use '../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.oc-accordion-item {
|
|
4
|
+
width: 100%;
|
|
5
|
+
|
|
6
|
+
.item-header {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
|
|
9
|
+
transition: 0.1s ease;
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-items: center;
|
|
14
|
+
|
|
15
|
+
padding: 1.5rem;
|
|
16
|
+
border-radius: 1rem;
|
|
17
|
+
|
|
18
|
+
h3 {
|
|
19
|
+
color: variables.$color-gray-1;
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
span {
|
|
25
|
+
transition: 0.3s ease;
|
|
26
|
+
color: variables.$color-gray-2;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: variables.$color-gray-6;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:active {
|
|
34
|
+
transform: scale(0.99);
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.open {
|
|
39
|
+
background-color: variables.$color-gray-6;
|
|
40
|
+
|
|
41
|
+
border-bottom-left-radius: 0;
|
|
42
|
+
border-bottom-right-radius: 0;
|
|
43
|
+
h3 {
|
|
44
|
+
color: variables.$color-brand-p-1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
span {
|
|
48
|
+
color: variables.$color-brand-g-1;
|
|
49
|
+
transform: rotate(180deg);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.closed, closed *{
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.oc-content {
|
|
59
|
+
animation: show-up 0.15s ease;
|
|
60
|
+
padding-left: 1.5rem;
|
|
61
|
+
padding-right: 1.5rem;
|
|
62
|
+
padding-top: 2rem;
|
|
63
|
+
padding-bottom: 2.5rem;
|
|
64
|
+
|
|
65
|
+
border-radius: 16px;
|
|
66
|
+
|
|
67
|
+
border-top-left-radius: 0;
|
|
68
|
+
border-top-right-radius: 0;
|
|
69
|
+
|
|
70
|
+
&.open {
|
|
71
|
+
background-color: variables.$color-gray-6;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes show-up {
|
|
77
|
+
from {
|
|
78
|
+
opacity: 0;
|
|
79
|
+
transform: scale(0.5);
|
|
80
|
+
} to {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: scale(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@import './styles/oc-accordion-item.shui-component.scss';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { AfterViewInit, Component, EventEmitter, Input, Output } 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-accordion-item',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [CommonModule],
|
|
10
|
+
templateUrl: './oc-accordion-item.component.html',
|
|
11
|
+
styleUrl: './oc-accordion-item.component.scss',
|
|
12
|
+
})
|
|
13
|
+
export class OcAccordionItemComponent {
|
|
14
|
+
@Input() ocIsOpen: boolean = false
|
|
15
|
+
@Input() ocTitle: string = ''
|
|
16
|
+
@Input() ocStyle: OcStyleThemeType = 'otimus'
|
|
17
|
+
@Output() closeAllItems = new EventEmitter()
|
|
18
|
+
|
|
19
|
+
protected toggle(): void {
|
|
20
|
+
if (this.ocIsOpen) {
|
|
21
|
+
this.ocIsOpen = !this.ocIsOpen
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
this.closeAllItems.emit()
|
|
25
|
+
this.ocIsOpen = !this.ocIsOpen
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use '../../../../styles/variables.scss';
|
|
2
|
+
|
|
3
|
+
.oc-accordion-item.shui {
|
|
4
|
+
width: 100%;
|
|
5
|
+
|
|
6
|
+
.item-header {
|
|
7
|
+
|
|
8
|
+
border-radius: 0;
|
|
9
|
+
h3 {
|
|
10
|
+
color: rgba(variables.$color-shui-ui-1, 0.75);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
span {
|
|
14
|
+
color: variables.$color-shui-ui-5;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
background-color: variables.$color-shui-base-2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
&.open {
|
|
23
|
+
background-color: variables.$color-shui-base-2;
|
|
24
|
+
h3 {
|
|
25
|
+
color: variables.$color-shui-ui-8;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
span {
|
|
29
|
+
color: variables.$color-shui-ui-0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.oc-content {
|
|
35
|
+
border-radius: 0;
|
|
36
|
+
|
|
37
|
+
&.open {
|
|
38
|
+
background-color: rgba(variables.$color-shui-base-2, 0.4);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<div [ngClass]="{
|
|
2
|
+
'oc-input-box': !ocSemanticLike && ocStyle === 'otimus',
|
|
3
|
+
small: ocSize === 'small',
|
|
4
|
+
large: ocSize === 'large',
|
|
5
|
+
error: !!ocError,
|
|
6
|
+
prefix: hasPrefix,
|
|
7
|
+
suffix: hasSuffix || ocHasDeleteButton,
|
|
8
|
+
shui: ocStyle === 'shui',
|
|
9
|
+
'shui-input-box': ocStyle === 'shui',
|
|
10
|
+
}">
|
|
11
|
+
<ng-content></ng-content>
|
|
12
|
+
<input [placeholder]="ocPlaceholder" #input (click)="toggleOptions(); ocClick.emit()" type="text"
|
|
13
|
+
(input)="filterData(ocValue)" [(ngModel)]="ocValue" (ngModelChange)="ocValue = $event; ocValueChange.emit($event)"
|
|
14
|
+
[ngClass]="{
|
|
15
|
+
'semantic-input': ocSemanticLike || ocStyle === 'semantic',
|
|
16
|
+
}" [tabindex]="ocTabIndex" />
|
|
17
|
+
@if (!ocSemanticLike && ocStyle !== 'semantic') {
|
|
18
|
+
<label>
|
|
19
|
+
<span [innerHTML]="ocPlaceholder"></span>
|
|
20
|
+
@if (ocRequired) {
|
|
21
|
+
<span class="oc color error">*</span>
|
|
22
|
+
}
|
|
23
|
+
</label>
|
|
24
|
+
}
|
|
25
|
+
<small *ngIf="ocError" class="error-msg">{{ ocError }}</small>
|
|
26
|
+
<ng-content select="ocPrefix"></ng-content>
|
|
27
|
+
@if (ocHasDeleteButton) {
|
|
28
|
+
<button class="oc-has-close-button oc suffix" (click)="clearValue()">
|
|
29
|
+
<span class="material-symbols-outlined">backspace</span>
|
|
30
|
+
</button>
|
|
31
|
+
}
|
|
32
|
+
<ng-content select="ocSuffix"></ng-content>
|
|
33
|
+
|
|
34
|
+
<div class="oc-options-div">
|
|
35
|
+
@if (isOptionsShown && !ocLoading) {
|
|
36
|
+
<ul #options class="oc-options" [ngStyle]="{
|
|
37
|
+
'max-height': ocOptionsMaxHeight,
|
|
38
|
+
width: ocOptionsWidth,
|
|
39
|
+
}">
|
|
40
|
+
@if (!filteredData.length) {
|
|
41
|
+
<li class="no-options">
|
|
42
|
+
{{ ocNoAvailableOptionsText || 'Nenhum resultado disponível' }}
|
|
43
|
+
</li>
|
|
44
|
+
} @else {
|
|
45
|
+
@for (data of filteredData; track data.value; let i = $index) {
|
|
46
|
+
@if (!ocMaxResults || i < ocMaxResults) { <li>
|
|
47
|
+
<button type="button" (click)="selectValue(data.value)">
|
|
48
|
+
{{ data.name }}
|
|
49
|
+
</button>
|
|
50
|
+
</li>
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
@if (ocMaxResults && filteredData.length > ocMaxResults) {
|
|
54
|
+
<li class="no-options">
|
|
55
|
+
{{ ocTypeForMoreResultsText || 'Digite para ver mais resultados' }}
|
|
56
|
+
</li>
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</ul>
|
|
60
|
+
} @else if (isOptionsShown && ocLoading) {
|
|
61
|
+
<div class="oc-options loader">
|
|
62
|
+
<span class="material-symbols-outlined loading"> progress_activity </span>
|
|
63
|
+
</div>
|
|
64
|
+
}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
@use '../../../styles/variables.scss';
|
|
2
|
+
@import '../../../styles/components/inputs/inputs.scss';
|
|
3
|
+
|
|
4
|
+
.oc-input-box {
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.oc-options-div {
|
|
9
|
+
position: absolute;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.oc-has-close-button-input {
|
|
14
|
+
padding-right: 60px; /* Espaço para o botão */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.oc-has-close-button {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
|
|
22
|
+
position: absolute;
|
|
23
|
+
right: 0.5rem !important;
|
|
24
|
+
top: 8%;
|
|
25
|
+
height: 84%;
|
|
26
|
+
width: 2.2rem;
|
|
27
|
+
|
|
28
|
+
border: 2px solid transparent;
|
|
29
|
+
border-radius: 0.5rem;
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
|
|
32
|
+
padding: 0 !important;
|
|
33
|
+
|
|
34
|
+
transition:
|
|
35
|
+
border-color 0.2s ease,
|
|
36
|
+
box-shadow 0.2s ease;
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
border: 2px solid variables.$color-gray-3;
|
|
40
|
+
box-shadow: 0px 4px 8.7px 0px rgba(0, 0, 0, 0.13);
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
43
|
+
span {
|
|
44
|
+
padding: 0 !important;
|
|
45
|
+
margin: 0.3rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.oc-options {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
list-style: none;
|
|
53
|
+
|
|
54
|
+
max-height: 40vh;
|
|
55
|
+
|
|
56
|
+
background-color: variables.$color-gray-6;
|
|
57
|
+
border: 2px solid variables.$color-white;
|
|
58
|
+
box-shadow: 0px 4px 8.7px 0px rgba(0, 0, 0, 0.13);
|
|
59
|
+
|
|
60
|
+
padding: 0;
|
|
61
|
+
margin-block-start: 0;
|
|
62
|
+
|
|
63
|
+
border-radius: 0.5rem;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
|
|
66
|
+
width: 100%;
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 50%;
|
|
69
|
+
|
|
70
|
+
overflow-y: auto;
|
|
71
|
+
z-index: 15;
|
|
72
|
+
|
|
73
|
+
> li {
|
|
74
|
+
padding: 0;
|
|
75
|
+
margin: 0;
|
|
76
|
+
|
|
77
|
+
button {
|
|
78
|
+
width: 100%;
|
|
79
|
+
text-align: left;
|
|
80
|
+
padding: 0.6rem;
|
|
81
|
+
|
|
82
|
+
border: none;
|
|
83
|
+
background-color: variables.$color-gray-6;
|
|
84
|
+
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
&:hover {
|
|
87
|
+
filter: brightness(0.9);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.no-options {
|
|
94
|
+
padding: 0.6rem !important;
|
|
95
|
+
color: variables.$color-gray-3;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.oc-options.loader {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
span {
|
|
103
|
+
width: 24px;
|
|
104
|
+
margin: 3rem;
|
|
105
|
+
|
|
106
|
+
color: variables.$color-brand-p-1;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.loading {
|
|
111
|
+
animation: spinLoad 0.5s linear infinite;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.semantic-input {
|
|
115
|
+
display: inline-block;
|
|
116
|
+
width: 100%;
|
|
117
|
+
padding: 10px 12px;
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
line-height: 1.5;
|
|
120
|
+
color: #333;
|
|
121
|
+
background-color: #fff;
|
|
122
|
+
border: 1px solid #ccc;
|
|
123
|
+
border-radius: 4px;
|
|
124
|
+
box-shadow: 0 1px 2px rgba(34, 36, 38, 0.15);
|
|
125
|
+
transition:
|
|
126
|
+
border-color 0.2s ease,
|
|
127
|
+
box-shadow 0.2s ease;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Estilo ao passar o mouse */
|
|
131
|
+
.semantic-input:hover {
|
|
132
|
+
border-color: #b3b3b3;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Estilo ao focar */
|
|
136
|
+
.semantic-input:focus {
|
|
137
|
+
border-color: #85b7d9;
|
|
138
|
+
box-shadow: 0 0 0 2px rgba(34, 36, 38, 0.15);
|
|
139
|
+
outline: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Estilo para inputs desabilitados */
|
|
143
|
+
.semantic-input:disabled {
|
|
144
|
+
background-color: #f9f9f9;
|
|
145
|
+
color: #b3b3b3;
|
|
146
|
+
border-color: #ddd;
|
|
147
|
+
cursor: not-allowed;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@keyframes spinLoad {
|
|
151
|
+
from {
|
|
152
|
+
transform: rotate(0);
|
|
153
|
+
}
|
|
154
|
+
to {
|
|
155
|
+
transform: rotate(360deg);
|
|
156
|
+
}
|
|
157
|
+
}
|