Skip to content

Commit b547474

Browse files
anabyealinelariguet
authored andcommitted
feat(components): reduz tamanhos de fonte
fixes DTHFUI-12051
1 parent 38ad525 commit b547474

File tree

77 files changed

+569
-251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+569
-251
lines changed

docs/guides/theme-service.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,12 @@ export const corporateTheme: PoTheme = {
200200
onRoot: {
201201
'--font-family': "'Inter', sans-serif",
202202
'--border-radius': '6px',
203-
'--po-density-header-padding': '2rem'; /* Padding em headers (inclui pages, page slide, modal, widget) */
204-
'--po-density-content-padding': '1rem'; /* Padding em contents (inclui pages, container, list view, page slide, widget, stepper, disclaimer-group) */
203+
'--po-density-header-padding': '2rem'; /* Padding em headers (inclui pages, page slide e modal) */
204+
'--po-density-content-padding': '1rem'; /* Padding em contents (inclui pages, container, list view, page slide, modal, stepper, disclaimer-group) */
205205
'--po-density-footer-padding': '1rem'; /* Padding em footers (inclui modal e page slide) */
206206
'--po-density-gap-header-content': '1rem'; /* Espaço interno entre o header e o content (inclui pages, tabs e stepper) */
207207
'--po-density-gap-spacing': '1rem'; /* Espaço interno entre blocos de conteúdo presentes no header e content (inclui dividers e gaps) */
208+
'--po-density-floating-padding': '0.5rem'; /* Padding interno de componentes flutuantes como tooltip e popover */
208209
},
209210
perComponent: {
210211
'po-button': {
@@ -277,11 +278,12 @@ setAcessibilidade(nivel: PoThemeA11yEnum) {
277278
/* styles.scss */
278279
:root .override-theme {
279280
--color-brand-01-base: #FF0000;
280-
--po-density-header-padding: 2rem; /* Padding em headers (inclui pages, page slide, modal, widget) */
281-
--po-density-content-padding: 1rem; /* Padding em contents (inclui pages, container, list view, page slide, widget, stepper, disclaimer-group) */
282-
--po-density-footer-padding: 1rem; /* Padding em footers (inclui modal e page slide) */
281+
--po-density-header-padding: 2rem; /* Padding interno em headers (inclui pages, dynamics, page slide e modal) */
282+
--po-density-content-padding: 1rem; /* Padding interno em contents (inclui pages, dynamics, container, list view, page slide, modal, stepper e disclaimer-group) */
283+
--po-density-footer-padding: 1rem; /* Padding interno em footers (inclui modal e page slide) */
283284
--po-density-gap-header-content: 1rem; /* Espaço interno entre o header e o content (inclui pages, tabs e stepper) */
284285
--po-density-gap-spacing: 1rem; /* Espaço interno entre blocos de conteúdo presentes no header e content (inclui dividers e gaps) */
286+
--po-density-floating-padding: 0.5rem; /* Padding interno de componentes flutuantes como tooltip e popover */
285287
}
286288
```
287289

projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77
background-color: #060402c7;
88
color: #f7f6f5;
99
}
10+
11+
po-button {
12+
margin-top: auto;
13+
padding-bottom: var(--spacing-xs);
14+
}

projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.html

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@
1515
>
1616
</po-input>
1717

18-
<button
19-
class="po-button po-button-primary po-sm-4 po-md-2 po-mt-4 po-mb-1"
20-
type="submit"
21-
[disabled]="generatorForm.invalid"
22-
>
23-
Adicionar
24-
</button>
18+
<po-button [p-disabled]="generatorForm.invalid" p-label="Adicionar" [p-type]="buttonAddType"></po-button>
2519
</div>
2620

2721
<div class="po-row">

projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
PoTableColumn,
1212
PoToasterOrientation
1313
} from '@po-ui/ng-components';
14+
import { PoButtonType } from 'projects/ui/src/lib';
1415

1516
@Component({
1617
selector: 'app-tools-dynamic-form',
@@ -39,6 +40,8 @@ export class ToolsDynamicFormComponent {
3940
quickField = <any>{};
4041
editFieldId;
4142

43+
buttonAddType: PoButtonType = PoButtonType.Submit;
44+
4245
readonly columns: Array<PoTableColumn> = [
4346
{ property: 'property' },
4447
{ property: 'type' },

projects/portal/src/styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
body {
1212
background-color: #fafbfb;
13-
color: #333;
13+
color: var(--color-neutral-dark-90);
1414
}
1515

1616
html.potheme-dark-AA #logo-totvs,
@@ -255,7 +255,7 @@ pre code {
255255
}
256256

257257
.docs-sample-container {
258-
background: var(--color-neutral-light-00);
258+
background: var(--color-neutral-light-05);
259259
box-shadow: 0 10px 6px -6px rgba(0, 0, 0, 0.2);
260260
-moz-box-shadow: 0 10px 6px -6px rgba(0, 0, 0, 0.2);
261261
-webkit-box-shadow: 0 10px 6px -6px rgba(0, 0, 0, 0.2);
@@ -633,7 +633,7 @@ blockquote {
633633
}
634634

635635
.app-portal-home .po-page .po-page-content {
636-
padding: 0;
636+
padding: 0 0 4.5rem;
637637
}
638638

639639
.guides-grid-system-box {
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div class="po-field-container-bottom-text-error po-field-container-error-item">
22
<po-icon p-icon="ICON_EXCLAMATION"></po-icon>
3-
<span class="po-field-container-error-text">{{ text }}</span>
3+
<span class="po-field-error-message">{{ text }}</span>
44
</div>

projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.component.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ describe('PoModalPasswordRecoveryComponent:', () => {
10581058
expect(expectedContent.innerHTML).not.toContain(component.emailModalPhrases.firstPhrase);
10591059
});
10601060

1061-
it('should contain `po-field-container-error-text` class if `invalidEmail` and control are true', () => {
1061+
it('should contain `po-field-error-message` class if `invalidEmail` and control are true', () => {
10621062
component.control = <any>{
10631063
dirty: true
10641064
};
@@ -1067,10 +1067,10 @@ describe('PoModalPasswordRecoveryComponent:', () => {
10671067
component.recoveryModalElement.open();
10681068
fixture.detectChanges();
10691069

1070-
expect(debugElement.querySelector('.po-field-container-error-text')).toBeTruthy();
1070+
expect(debugElement.querySelector('.po-field-error-message')).toBeTruthy();
10711071
});
10721072

1073-
it('shouldn`t contain `po-field-container-error-text` class if `invalidEmail` is false', () => {
1073+
it('shouldn`t contain `po-field-error-message` class if `invalidEmail` is false', () => {
10741074
component.control = <any>{
10751075
dirty: true
10761076
};
@@ -1079,29 +1079,29 @@ describe('PoModalPasswordRecoveryComponent:', () => {
10791079
component.recoveryModalElement.open();
10801080
fixture.detectChanges();
10811081

1082-
expect(debugElement.querySelector('.po-field-container-error-text')).toBeFalsy();
1082+
expect(debugElement.querySelector('.po-field-error-message')).toBeFalsy();
10831083
});
10841084

1085-
it('shouldn`t contain `po-field-container-error-text` class if `showCustomCodeError` is false', () => {
1085+
it('shouldn`t contain `po-field-error-message` class if `showCustomCodeError` is false', () => {
10861086
component.modalType = PoModalPasswordRecoveryModalContent.SMSCode;
10871087
component.type = PoModalPasswordRecoveryType.Email;
10881088
component.showCustomCodeError = false;
10891089

10901090
component.recoveryModalElement.open();
10911091
fixture.detectChanges();
10921092

1093-
expect(debugElement.querySelector('.po-field-container-error-text')).toBeFalsy();
1093+
expect(debugElement.querySelector('.po-field-error-message')).toBeFalsy();
10941094
});
10951095

1096-
it('should contain `po-field-container-error-text` class if `showCustomCodeError` is true', () => {
1096+
it('should contain `po-field-error-message` class if `showCustomCodeError` is true', () => {
10971097
component.modalType = PoModalPasswordRecoveryModalContent.SMSCode;
10981098
component.type = PoModalPasswordRecoveryType.Email;
10991099
component.showCustomCodeError = true;
11001100

11011101
component.recoveryModalElement.open();
11021102
fixture.detectChanges();
11031103

1104-
expect(debugElement.querySelector('.po-field-container-error-text')).toBeTruthy();
1104+
expect(debugElement.querySelector('.po-field-error-message')).toBeTruthy();
11051105
});
11061106
});
11071107
});

projects/templates/src/lib/components/po-page-dynamic-detail/po-page-dynamic-detail.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[p-title]="title"
66
>
77
@if (model) {
8-
<po-dynamic-view [p-fields]="fields" [p-value]="model"> </po-dynamic-view>
8+
<po-dynamic-view [p-components-size]="componentsSize" [p-fields]="fields" [p-value]="model"> </po-dynamic-view>
99
} @else {
10-
<po-widget>
10+
<po-widget [p-size]="componentsSize">
1111
<po-icon p-icon="ICON_INFO"></po-icon>
1212
<span class="po-font-text-large">
1313
{{ literals.registerNotFound }}

projects/templates/src/lib/components/po-page-dynamic-edit/po-page-dynamic-edit.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div>
2828
}
2929
} @else {
30-
<po-widget>
30+
<po-widget [p-size]="componentsSize">
3131
<po-icon p-icon="ICON_INFO"></po-icon>
3232
<span class="po-font-text-large">
3333
{{ literals.registerNotFound }}

projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler-summary/po-page-job-scheduler-summary.component.html

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,62 @@
11
<div class="po-md-12">
22
@if (!noParameters) {
3-
<po-info [p-label]="literals.process" [p-orientation]="infoOrientation" [p-value]="value.processID"> </po-info>
3+
<po-info
4+
[p-label]="literals.process"
5+
[p-orientation]="infoOrientation"
6+
[p-size]="componentsSize"
7+
[p-value]="value.processID"
8+
>
9+
</po-info>
410
}
511

6-
<po-info [p-label]="literals.periodicity" [p-orientation]="infoOrientation" [p-value]="periodicityValue"> </po-info>
12+
<po-info
13+
[p-label]="literals.periodicity"
14+
[p-orientation]="infoOrientation"
15+
[p-size]="componentsSize"
16+
[p-value]="periodicityValue"
17+
>
18+
</po-info>
719

820
@if (frequencyValue !== '') {
9-
<po-info [p-label]="literals.frequency" [p-orientation]="infoOrientation" [p-value]="frequencyValue"> </po-info>
21+
<po-info
22+
[p-label]="literals.frequency"
23+
[p-orientation]="infoOrientation"
24+
[p-size]="componentsSize"
25+
[p-value]="frequencyValue"
26+
>
27+
</po-info>
1028
}
1129

1230
@if (value.periodicity !== 'single') {
13-
<po-info [p-label]="literals.execution" [p-orientation]="infoOrientation" [p-value]="executionValue"> </po-info>
31+
<po-info
32+
[p-label]="literals.execution"
33+
[p-orientation]="infoOrientation"
34+
[p-size]="componentsSize"
35+
[p-value]="executionValue"
36+
>
37+
</po-info>
1438
}
1539

16-
<po-info [p-label]="literals.recurrent" [p-orientation]="infoOrientation" [p-value]="recurrentValue"> </po-info>
40+
<po-info
41+
[p-label]="literals.recurrent"
42+
[p-orientation]="infoOrientation"
43+
[p-size]="componentsSize"
44+
[p-value]="recurrentValue"
45+
>
46+
</po-info>
1747

18-
<po-info [p-label]="literals.firstExecution" [p-orientation]="infoOrientation" [p-value]="firstExecutionValue">
48+
<po-info
49+
[p-label]="literals.firstExecution"
50+
[p-orientation]="infoOrientation"
51+
[p-size]="componentsSize"
52+
[p-value]="firstExecutionValue"
53+
>
1954
</po-info>
2055
</div>
2156
@if (parameters && parameters.length && !jobSchedulerSummaryTemplate) {
22-
<po-widget class="po-pt-1 po-pb-1 po-md-12" [p-title]="literals.parameters">
23-
<po-dynamic-view [p-fields]="parameters" [p-value]="value.executionParameter"> </po-dynamic-view>
57+
<po-widget class="po-pt-1 po-pb-1 po-md-12" [p-size]="componentsSize" [p-title]="literals.parameters">
58+
<po-dynamic-view [p-components-size]="componentsSize" [p-fields]="parameters" [p-value]="value.executionParameter">
59+
</po-dynamic-view>
2460
</po-widget>
2561
}
2662
@if (jobSchedulerSummaryTemplate) {

0 commit comments

Comments
 (0)