From 6a9ac9645397f1f0b5537688f75889b403d856a8 Mon Sep 17 00:00:00 2001 From: Bruno Severino Date: Wed, 28 Aug 2024 12:45:00 -0300 Subject: [PATCH] =?UTF-8?q?feat(theme):=20melhoria=20no=20tema=20para=20di?= =?UTF-8?q?ferentes=20acessibilidades=20adicionado=20possibilidade=20de=20?= =?UTF-8?q?passar=20mais=20de=20uma=20op=C3=A7=C3=A3o=20de=20tema=20de=20a?= =?UTF-8?q?cessibilidade=20como=20exemplo:=20=E2=80=98AA=E2=80=99=20e=20?= =?UTF-8?q?=E2=80=98AAA=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes DTHFUI-9037 --- .gitignore | 2 + projects/app/src/app/app.module.ts | 3 +- projects/portal/src/app/app.component.ts | 7 +- .../theme-builder/theme-builder.component.css | 4 - .../theme-builder.component.html | 2 +- .../tools-dynamic-form.component.css | 4 + .../tools-dynamic-form.component.html | 14 +- .../po-field/po-combo/po-combo.component.html | 16 +- .../po-field/po-combo/po-combo.component.ts | 9 + .../po-datepicker-range.component.html | 112 ++-- .../po-lookup/po-lookup.component.html | 74 +-- .../po-search/po-search.component.html | 119 ++-- .../components/po-search/po-search.module.ts | 4 +- .../po-table/po-table.component.html | 6 +- projects/ui/src/lib/po.module.ts | 9 +- .../po-theme/enum/po-theme-a11y.enum.ts | 29 + .../po-theme/enum/po-theme-type.enum.ts | 3 + .../po-theme-dark-defaults.constant.ts | 65 ++- .../po-theme-light-defaults.constant.ts | 30 +- .../helpers/po-theme-poui.constant.ts | 62 +- .../ui/src/lib/services/po-theme/index.ts | 1 + .../po-theme/interfaces/po-theme.interface.ts | 25 +- .../po-theme/po-theme.service.spec.ts | 539 +++++++++++++++++- .../lib/services/po-theme/po-theme.service.ts | 282 +++++++-- .../sample-po-theme-labs.component.ts | 5 +- 25 files changed, 1146 insertions(+), 280 deletions(-) create mode 100644 projects/ui/src/lib/services/po-theme/enum/po-theme-a11y.enum.ts diff --git a/.gitignore b/.gitignore index 9ba6898df4..8763be9ad1 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ speed-measure-plugin.json .vscode # IDE - VSCode +.vscode .vscode/* !.vscode/settings.json !.vscode/tasks.json @@ -35,6 +36,7 @@ speed-measure-plugin.json .history/* # misc +.angular /.angular/cache /.sass-cache /connect.lock diff --git a/projects/app/src/app/app.module.ts b/projects/app/src/app/app.module.ts index 6123cf53d9..5a1bab657d 100644 --- a/projects/app/src/app/app.module.ts +++ b/projects/app/src/app/app.module.ts @@ -4,9 +4,8 @@ import { FormsModule } from '@angular/forms'; import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { PoModule } from '@po-ui/ng-components'; - import { AppComponent } from './app.component'; +import { PoModule } from '../../../ui/src/lib'; @NgModule({ declarations: [AppComponent], diff --git a/projects/portal/src/app/app.component.ts b/projects/portal/src/app/app.component.ts index 5736160fb8..ea41214cd8 100644 --- a/projects/portal/src/app/app.component.ts +++ b/projects/portal/src/app/app.component.ts @@ -30,14 +30,13 @@ export class AppComponent implements OnInit, OnDestroy { private poTheme: PoThemeService, public router: Router ) { - const _poTheme = this.poTheme.persistThemeActive(); + const _poTheme = this.poTheme.applyTheme(); if (!_poTheme) { this.theme = poThemeConstant.active; + this.poTheme.setTheme(poThemeConstant, this.theme); } else { - this.theme = _poTheme.active || 0; + this.theme = typeof _poTheme.active === 'object' ? _poTheme.active.type : _poTheme.active; } - - this.poTheme.setTheme(poThemeConstant, this.theme); } async ngOnInit() { diff --git a/projects/portal/src/app/theme-builder/theme-builder.component.css b/projects/portal/src/app/theme-builder/theme-builder.component.css index 79c3e40964..781093c20b 100644 --- a/projects/portal/src/app/theme-builder/theme-builder.component.css +++ b/projects/portal/src/app/theme-builder/theme-builder.component.css @@ -238,10 +238,6 @@ p { } } -.widget-items > .po-widget { - height: 255px; -} - .widget-color > .po-widget { background-color: var(--color-neutral-light-10); } diff --git a/projects/portal/src/app/theme-builder/theme-builder.component.html b/projects/portal/src/app/theme-builder/theme-builder.component.html index bdd8d58760..1052a2b46e 100644 --- a/projects/portal/src/app/theme-builder/theme-builder.component.html +++ b/projects/portal/src/app/theme-builder/theme-builder.component.html @@ -152,7 +152,7 @@ --> -
+
diff --git a/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.css b/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.css index 887a35a605..8ceda2b082 100644 --- a/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.css +++ b/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.css @@ -7,3 +7,7 @@ background-color: #060402c7; color: #f7f6f5; } + +.items-end { + align-items: end; +} diff --git a/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.html b/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.html index b965f8fa2c..38c0d3d994 100644 --- a/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.html +++ b/projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.html @@ -3,7 +3,7 @@
-
+
- +
diff --git a/projects/ui/src/lib/components/po-field/po-combo/po-combo.component.html b/projects/ui/src/lib/components/po-field/po-combo/po-combo.component.html index f6625b774c..7df29b426c 100644 --- a/projects/ui/src/lib/components/po-field/po-combo/po-combo.component.html +++ b/projects/ui/src/lib/components/po-field/po-combo/po-combo.component.html @@ -7,8 +7,18 @@ [p-required]="required" [p-show-required]="showRequired" > -
-
+
+
-
+
-
-
- -
+
+
+
+
+ +
-
-
+
-
-
- -
+
+ +
-
- -
+
+ +
-
- - +
+ + +
+
diff --git a/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.html b/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.html index 28655695a1..2cf5bc7869 100644 --- a/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.html +++ b/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.html @@ -6,39 +6,49 @@ [p-required]="required" [p-show-required]="showRequired" > -
- -
- - + [placeholder]="placeholder" + [required]="required" + (blur)="searchEvent()" + /> + +
+ + +
+ +
+
diff --git a/projects/ui/src/lib/components/po-search/po-search.component.html b/projects/ui/src/lib/components/po-search/po-search.component.html index 9dd606a2ba..5b0001ae79 100644 --- a/projects/ui/src/lib/components/po-search/po-search.component.html +++ b/projects/ui/src/lib/components/po-search/po-search.component.html @@ -1,58 +1,77 @@ -