Skip to content

Commit

Permalink
fix(theme): corrige quebra do tema
Browse files Browse the repository at this point in the history
This reverts commit 58425a1.
  • Loading branch information
anderson-gregorio-totvs committed Dec 10, 2024
1 parent 9610be6 commit e33052f
Show file tree
Hide file tree
Showing 21 changed files with 292 additions and 1,118 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ speed-measure-plugin.json
.vscode

# IDE - VSCode
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
Expand All @@ -36,7 +35,6 @@ speed-measure-plugin.json
.history/*

# misc
.angular
/.angular/cache
/.sass-cache
/connect.lock
Expand Down
1 change: 1 addition & 0 deletions projects/app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { PoModule } from '@po-ui/ng-components';

import { AppComponent } from './app.component';

@NgModule({
Expand Down
7 changes: 4 additions & 3 deletions projects/portal/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ export class AppComponent implements OnInit, OnDestroy {
private poTheme: PoThemeService,
public router: Router
) {
const _poTheme = this.poTheme.applyTheme();
const _poTheme = this.poTheme.persistThemeActive();
if (!_poTheme) {
this.theme = poThemeConstant.active;
this.poTheme.setTheme(poThemeConstant, this.theme);
} else {
this.theme = typeof _poTheme.active === 'object' ? _poTheme.active.type : _poTheme.active;
this.theme = _poTheme.active || 0;
}

this.poTheme.setTheme(poThemeConstant, this.theme);
}

async ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ p {
}
}

.widget-items > .po-widget {
height: 255px;
}

.widget-color > .po-widget {
background-color: var(--color-neutral-light-10);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<po-menu-filter class="menu-filter"></po-menu-filter>
</div>
</div> -->
<div class="po-row po-p-0 po-mt-2 po-mb-3" style="row-gap: 8px">
<div class="po-row po-p-0 po-mt-2 po-mb-3">
<po-widget [class.hide]="!botaoPrimaryView" class="widget-items po-sm-12 po-md-6 po-lg-4 po-xl-3 po-pl-0">
<po-widget class="widget-menu">
<div class="po-row row-menu">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,60 @@
[p-required]="required"
[p-show-required]="showRequired"
>
<div
#searchContainer
cdkOverlayOrigin
#trigger="cdkOverlayOrigin"
class="po-field-container-content po-combo-container-content"
>
<div class="po-combo-container-wrapper">
<div *ngIf="icon" class="po-field-icon-container-left">
<po-icon
class="po-field-icon po-icon-input"
[class.po-field-icon-disabled]="disabled"
[p-icon]="icon"
></po-icon>
</div>
<div cdkOverlayOrigin #trigger="cdkOverlayOrigin" class="po-field-container-content po-combo-container-content">
<div *ngIf="icon" class="po-field-icon-container-left">
<po-icon
class="po-field-icon po-icon-input"
[class.po-field-icon-disabled]="disabled"
[p-icon]="icon"
></po-icon>
</div>

<input
#inp
class="po-combo-input"
[ngClass]="clean && inp.value ? 'po-input-double-icon-right' : 'po-input-icon-right'"
[class.po-input-icon-left]="icon"
autocomplete="off"
type="text"
[attr.name]="name"
[disabled]="disabled"
[id]="id"
[placeholder]="disabled ? '' : placeholder"
[required]="required"
(click)="toggleComboVisibility()"
(keyup)="onKeyUp($event)"
(blur)="onBlur()"
(keyup)="searchOnEnterOrArrow($event, $event.target.value)"
(keydown)="onKeyDown($event)"
/>
<input
#inp
class="po-combo-input"
[ngClass]="clean && inp.value ? 'po-input-double-icon-right' : 'po-input-icon-right'"
[class.po-input-icon-left]="icon"
autocomplete="off"
type="text"
[attr.name]="name"
[disabled]="disabled"
[id]="id"
[placeholder]="disabled ? '' : placeholder"
[required]="required"
(click)="toggleComboVisibility()"
(keyup)="onKeyUp($event)"
(blur)="onBlur()"
(keyup)="searchOnEnterOrArrow($event, $event.target.value)"
(keydown)="onKeyDown($event)"
/>

<div class="po-field-icon-container-right">
<po-clean
tabindex="0"
role="button"
[attr.aria-label]="literals.clean"
class="po-combo-clean po-icon-input"
*ngIf="clean && !disabled && inp.value"
[p-element-ref]="inputEl"
(p-change-event)="clear($event)"
(click)="clear(null); $event.preventDefault()"
(keydown.enter)="clearAndFocus(); $event.preventDefault()"
>
</po-clean>
<div class="po-field-icon-container-right">
<po-clean
tabindex="0"
role="button"
[attr.aria-label]="literals.clean"
class="po-combo-clean po-icon-input"
*ngIf="clean && !disabled && inp.value"
[p-element-ref]="inputEl"
(p-change-event)="clear($event)"
(click)="clear(null); $event.preventDefault()"
(keydown.enter)="clearAndFocus(); $event.preventDefault()"
>
</po-clean>

<div
#iconArrow
class="po-combo-arrow po-field-icon"
[class.po-field-icon-disabled]="disabled"
(click)="toggleComboVisibility(true)"
>
<po-icon
[p-icon]="comboOpen ? 'ICON_ARROW_UP po-icon-input' : 'ICON_ARROW_DOWN po-icon-input'"
[class.po-field-icon]="!disabled"
[class.po-combo-default-border]="!disabled && inp.value"
[class.po-combo-background-arrow-up]="!disabled && comboOpen"
></po-icon>
</div>
<div
#iconArrow
class="po-combo-arrow po-field-icon"
[class.po-field-icon-disabled]="disabled"
(click)="toggleComboVisibility(true)"
>
<po-icon
[p-icon]="comboOpen ? 'ICON_ARROW_UP po-icon-input' : 'ICON_ARROW_DOWN po-icon-input'"
[class.po-field-icon]="!disabled"
[class.po-combo-default-border]="!disabled && inp.value"
[class.po-combo-background-arrow-up]="!disabled && comboOpen"
></po-icon>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,64 @@
[p-required]="required"
[p-show-required]="showRequired"
>
<div class="po-field-container-content">
<div class="po-field-container-input">
<div
#dateRangeField
class="po-datepicker-range-field po-input"
[class.po-datepicker-range-field-disabled]="disabled"
[attr.disabled]="disabled"
>
<div class="po-datepicker-range-start-date">
<input
#startDateInput
class="po-datepicker-range-input"
maxlength="10"
type="text"
[attr.aria-label]="label"
[autocomplete]="autocomplete"
[disabled]="disabled"
[name]="startDateInputName"
[readonly]="readonly"
(blur)="onBlur($event)"
(focus)="onFocus($event)"
(keydown)="onKeydown($event)"
(keyup)="onKeyup($event)"
(click)="eventOnClick($event)"
/>
</div>
<div
#dateRangeField
class="po-datepicker-range-field po-input"
[class.po-datepicker-range-field-disabled]="disabled"
[attr.disabled]="disabled"
>
<div class="po-datepicker-range-start-date">
<input
#startDateInput
class="po-datepicker-range-input"
maxlength="10"
type="text"
[attr.aria-label]="label"
[autocomplete]="autocomplete"
[disabled]="disabled"
[name]="startDateInputName"
[readonly]="readonly"
(blur)="onBlur($event)"
(focus)="onFocus($event)"
(keydown)="onKeydown($event)"
(keyup)="onKeyup($event)"
(click)="eventOnClick($event)"
/>
</div>

<div class="po-datepicker-range-separator">-</div>
<div class="po-datepicker-range-separator">-</div>

<div class="po-datepicker-range-end-date">
<input
#endDateInput
class="po-datepicker-range-input"
maxlength="10"
type="text"
[autocomplete]="autocomplete"
[disabled]="disabled"
[name]="endDateInputName"
[readonly]="readonly"
(blur)="onBlur($event)"
(focus)="onFocus($event)"
(keydown)="onKeydown($event)"
(keyup)="onKeyup($event)"
(click)="eventOnClick($event)"
/>
</div>
<div class="po-datepicker-range-end-date">
<input
#endDateInput
class="po-datepicker-range-input"
maxlength="10"
type="text"
[autocomplete]="autocomplete"
[disabled]="disabled"
[name]="endDateInputName"
[readonly]="readonly"
(blur)="onBlur($event)"
(focus)="onFocus($event)"
(keydown)="onKeydown($event)"
(keyup)="onKeyup($event)"
(click)="eventOnClick($event)"
/>
</div>

<div class="po-datepicker-range-icon">
<po-clean class="po-icon-input" *ngIf="enableCleaner" (p-change-event)="clear()"></po-clean>
</div>
<div class="po-datepicker-range-icon">
<po-clean class="po-icon-input" *ngIf="enableCleaner" (p-change-event)="clear()"></po-clean>
</div>

<div class="po-datepicker-range-icon">
<po-icon
#iconCalendar
[p-icon]="!disabled || !readonly ? 'ICON_CALENDAR po-clickable' : 'ICON_CALENDAR'"
class="po-field-icon {{ disabled ? 'po-icon-input-disabled' : 'po-icon-input' }}"
[class.po-field-icon-disabled]="disabled || readonly"
(click)="toggleCalendar()"
>
</po-icon>
</div>
</div>
<div class="po-datepicker-range-icon">
<po-icon
#iconCalendar
[p-icon]="!disabled || !readonly ? 'ICON_CALENDAR po-clickable' : 'ICON_CALENDAR'"
class="po-field-icon {{ disabled ? 'po-icon-input-disabled' : 'po-icon-input' }}"
[class.po-field-icon-disabled]="disabled || readonly"
(click)="toggleCalendar()"
>
</po-icon>
</div>
</div>

Expand Down
Loading

0 comments on commit e33052f

Please sign in to comment.