@po-ui/ng-components 20.6.0 → 20.8.0
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/fesm2022/po-ui-ng-components.mjs +3523 -2688
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/index.d.ts +636 -452
- package/lib/components/po-breadcrumb/po-breadcrumb-base.component.d.ts +15 -0
- package/lib/components/po-chart/interfaces/po-chart-serie.interface.d.ts +3 -2
- package/lib/components/po-dropdown/po-dropdown-action.interface.d.ts +10 -0
- package/lib/components/po-dropdown/po-dropdown.component.d.ts +5 -0
- package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +10 -5
- package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form.component.d.ts +2 -2
- package/lib/components/po-dynamic/po-dynamic-view/po-dynamic-view-base.component.d.ts +15 -0
- package/lib/components/po-field/po-checkbox/po-checkbox-base.component.d.ts +6 -8
- package/lib/components/po-field/po-checkbox/po-checkbox.component.d.ts +3 -12
- package/lib/components/po-field/po-checkbox-group/po-checkbox-group-base.component.d.ts +6 -8
- package/lib/components/po-field/po-checkbox-group/po-checkbox-group.component.d.ts +7 -12
- package/lib/components/po-field/po-combo/po-combo-base.component.d.ts +6 -8
- package/lib/components/po-field/po-combo/po-combo.component.d.ts +5 -12
- package/lib/components/po-field/po-datepicker/po-datepicker-base.component.d.ts +5 -7
- package/lib/components/po-field/po-datepicker/po-datepicker.component.d.ts +7 -14
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.d.ts +5 -7
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.d.ts +4 -12
- package/lib/components/po-field/po-decimal/po-decimal.component.d.ts +3 -4
- package/lib/components/po-field/po-email/po-email.component.d.ts +3 -3
- package/lib/components/po-field/po-field-container/po-field-container-bottom/po-field-container-bottom.component.d.ts +2 -0
- package/lib/components/po-field/po-field-container/po-field-container.component.d.ts +2 -0
- package/lib/components/po-field/po-field.model.d.ts +7 -16
- package/lib/components/po-field/po-input/po-input-base.component.d.ts +12 -19
- package/lib/components/po-field/po-input/po-input.component.d.ts +3 -3
- package/lib/components/po-field/po-input-generic/po-input-generic.d.ts +0 -2
- package/lib/components/po-field/po-login/po-login.component.d.ts +3 -1
- package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +6 -8
- package/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal.component.d.ts +1 -1
- package/lib/components/po-field/po-lookup/po-lookup.component.d.ts +8 -14
- package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +6 -8
- package/lib/components/po-field/po-multiselect/po-multiselect.component.d.ts +4 -12
- package/lib/components/po-field/po-number/po-number.component.d.ts +3 -2
- package/lib/components/po-field/po-password/po-password.component.d.ts +3 -1
- package/lib/components/po-field/po-radio/po-radio.component.d.ts +9 -0
- package/lib/components/po-field/po-radio-group/po-radio-group-base.component.d.ts +6 -8
- package/lib/components/po-field/po-radio-group/po-radio-group.component.d.ts +7 -12
- package/lib/components/po-field/po-rich-text/po-rich-text-base.component.d.ts +6 -8
- package/lib/components/po-field/po-rich-text/po-rich-text-body/po-rich-text-body.component.d.ts +1 -2
- package/lib/components/po-field/po-rich-text/po-rich-text.component.d.ts +4 -10
- package/lib/components/po-field/po-select/po-select.component.d.ts +7 -14
- package/lib/components/po-field/po-switch/po-switch.component.d.ts +33 -6
- package/lib/components/po-field/po-textarea/po-textarea-base.component.d.ts +6 -8
- package/lib/components/po-field/po-textarea/po-textarea.component.d.ts +7 -12
- package/lib/components/po-field/po-upload/po-upload-base.component.d.ts +6 -8
- package/lib/components/po-field/po-upload/po-upload.component.d.ts +5 -11
- package/lib/components/po-field/po-url/po-url.component.d.ts +3 -2
- package/lib/components/po-helper/po-helper-base.component.d.ts +11 -0
- package/lib/components/po-helper/po-helper.component.d.ts +1 -0
- package/lib/components/po-info/po-info-base.component.d.ts +15 -0
- package/lib/components/po-listbox/interfaces/po-listbox-literals.interface.d.ts +2 -0
- package/lib/components/po-listbox/po-item-list/po-item-list-base.component.d.ts +1 -0
- package/lib/components/po-listbox/po-listbox-base.component.d.ts +8 -7
- package/lib/components/po-listbox/po-listbox.component.d.ts +14 -3
- package/lib/components/po-loading/po-loading-base.component.d.ts +7 -4
- package/lib/components/po-page/interfaces/po-page-action.interface.d.ts +6 -5
- package/lib/components/po-page/po-page-default/po-page-default-base.component.d.ts +9 -8
- package/lib/components/po-page/po-page-detail/po-page-detail-base.component.d.ts +14 -0
- package/lib/components/po-page/po-page-edit/po-page-edit-base.component.d.ts +14 -0
- package/lib/components/po-page/po-page-header/po-page-header-base.component.d.ts +2 -0
- package/lib/components/po-page/po-page-list/po-page-list-base.component.d.ts +14 -0
- package/lib/components/po-popover/po-popover-base.component.d.ts +12 -0
- package/lib/components/po-popover/po-popover.component.d.ts +11 -0
- package/lib/components/po-popup/po-popup-action.interface.d.ts +36 -4
- package/lib/components/po-popup/po-popup-base.component.d.ts +1 -0
- package/lib/components/po-search/po-search-base.component.d.ts +16 -0
- package/lib/components/po-search/po-search.component.d.ts +1 -1
- package/lib/components/po-table/enums/po-table-spacing.enum.d.ts +1 -1
- package/lib/components/po-tag/po-tag-base.component.d.ts +1 -0
- package/lib/enums/po-density-mode.enum.d.ts +14 -0
- package/lib/enums/po-field-size.enum.d.ts +5 -3
- package/lib/services/po-theme/helpers/accessibilities/po-theme-density.constant.d.ts +12 -0
- package/lib/services/po-theme/helpers/types/po-theme-dark-defaults-AA.constant.d.ts +4 -0
- package/lib/services/po-theme/helpers/types/po-theme-dark-defaults.constant.d.ts +5 -0
- package/lib/services/po-theme/po-theme.module.d.ts +1 -1
- package/lib/services/po-theme/po-theme.service.d.ts +39 -11
- package/lib/utils/util.d.ts +9 -2
- package/package.json +4 -4
- package/po-ui-ng-components-20.8.0.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v20/index.js +2 -2
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-20.6.0.tgz +0 -0
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { PoListBoxBaseComponent } from './po-listbox-base.component';
|
|
3
3
|
import { PoItemListOptionGroup } from './po-item-list/interfaces/po-item-list-option-group.interface';
|
|
4
4
|
import { PoItemListOption } from './po-item-list/interfaces/po-item-list-option.interface';
|
|
5
5
|
import { PoSearchListComponent } from './po-search-list/po-search-list.component';
|
|
6
|
+
import { PoDropdownAction } from '../po-dropdown/po-dropdown-action.interface';
|
|
6
7
|
import { Observable } from 'rxjs';
|
|
7
|
-
export declare class PoListBoxComponent extends PoListBoxBaseComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
8
|
+
export declare class PoListBoxComponent extends PoListBoxBaseComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {
|
|
8
9
|
element: ElementRef<any>;
|
|
10
|
+
currentItems: Array<PoDropdownAction>;
|
|
11
|
+
currentGroup: PoDropdownAction | null;
|
|
12
|
+
private readonly navigationStack;
|
|
9
13
|
private readonly renderer;
|
|
10
14
|
private readonly router;
|
|
11
15
|
private readonly changeDetector;
|
|
12
16
|
listbox: ElementRef;
|
|
13
17
|
listboxItemList: ElementRef;
|
|
18
|
+
listboxGroupHeader: ElementRef;
|
|
14
19
|
searchElement: PoSearchListComponent;
|
|
15
20
|
popupHeaderContainer: ElementRef;
|
|
21
|
+
listboxItems: QueryList<ElementRef>;
|
|
16
22
|
private scrollEvent$;
|
|
17
23
|
private subscriptionScrollEvent;
|
|
18
24
|
constructor();
|
|
25
|
+
ngOnInit(): void;
|
|
19
26
|
ngAfterViewInit(): void;
|
|
20
27
|
ngOnChanges(changes?: SimpleChanges): void;
|
|
21
28
|
ngOnDestroy(): void;
|
|
22
|
-
|
|
29
|
+
openGroup(group: PoDropdownAction, event?: MouseEvent | KeyboardEvent): void;
|
|
30
|
+
goBack(event: MouseEvent | KeyboardEvent): void;
|
|
31
|
+
onKeydownGoBack(event: KeyboardEvent): void;
|
|
32
|
+
onSelectItem(itemListAction: PoItemListOption | PoItemListOptionGroup | any, event?: MouseEvent | KeyboardEvent): void | Promise<boolean>;
|
|
23
33
|
onSelectAllCheckboxKeyDown(event: KeyboardEvent): void;
|
|
24
34
|
onKeyDown(itemListAction: PoItemListOption | PoItemListOptionGroup | any, event?: KeyboardEvent): void;
|
|
25
35
|
checkboxClicked({ option, selected }: {
|
|
@@ -46,6 +56,7 @@ export declare class PoListBoxComponent extends PoListBoxBaseComponent implement
|
|
|
46
56
|
private includeInfiniteScroll;
|
|
47
57
|
protected returnBooleanValue(itemListAction: any, property: string): any;
|
|
48
58
|
private setListBoxMaxHeight;
|
|
59
|
+
private setListBoxWidth;
|
|
49
60
|
private openUrl;
|
|
50
61
|
onClickTabs(tab: any): void;
|
|
51
62
|
formatItemList(item: any): string;
|
|
@@ -15,7 +15,7 @@ export declare const poLoadingLiteralsDefault: {
|
|
|
15
15
|
* ou aguardando a resposta de alguma requisição.
|
|
16
16
|
*/
|
|
17
17
|
export declare class PoLoadingBaseComponent {
|
|
18
|
-
|
|
18
|
+
protected languageService: PoLanguageService;
|
|
19
19
|
private _text?;
|
|
20
20
|
private _size?;
|
|
21
21
|
/**
|
|
@@ -25,14 +25,17 @@ export declare class PoLoadingBaseComponent {
|
|
|
25
25
|
get text(): string;
|
|
26
26
|
/**
|
|
27
27
|
* Define o tamanho do ícone.
|
|
28
|
-
*
|
|
29
|
-
* @default `lg`
|
|
30
|
-
*
|
|
31
28
|
* Valores válidos:
|
|
32
29
|
* - `xs`: 16px
|
|
33
30
|
* - `sm`: 24px
|
|
34
31
|
* - `md`: 32px
|
|
35
32
|
* - `lg`: 80px
|
|
33
|
+
*
|
|
34
|
+
* > Em nível de acessibilidade **AA**, caso o valor de `p-size` não seja definido, o valor padrão será `sm`
|
|
35
|
+
* > quando o valor padrão dos componentes for configurado como `small` no
|
|
36
|
+
* > [serviço de tema](https://po-ui.io/documentation/po-theme).
|
|
37
|
+
*
|
|
38
|
+
* @default `lg`
|
|
36
39
|
*/
|
|
37
40
|
set size(value: string);
|
|
38
41
|
get size(): string;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PoDropdownAction } from '../../po-dropdown';
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Interface para as ações dos componentes po-page-default e po-page-list.
|
|
5
5
|
*
|
|
6
|
-
* >
|
|
7
|
-
*
|
|
6
|
+
* > Quando o array de actions possui quatro ou mais registros, os dois últimos e os seguintes são automaticamente agrupados no po-dropdown.
|
|
7
|
+
* A partir desse ponto, as propriedades `selected`, `separator`, `type` e `subItems` passam a ter efeito apenas nas ações exibidas dentro do dropdown, ou seja, a partir da terceira ação.
|
|
8
|
+
* Dessa forma, o uso de subItems (agrupadores dentro do dropdown) só terá efeito quando houver pelo menos quatro ações definidas.
|
|
8
9
|
*
|
|
9
|
-
* @docsExtends
|
|
10
|
+
* @docsExtends PoDropdownAction
|
|
10
11
|
*
|
|
11
12
|
* @ignoreExtendedDescription
|
|
12
13
|
*
|
|
13
14
|
* @usedBy PoPageDefaultComponent, PoPageListComponent
|
|
14
15
|
*/
|
|
15
|
-
export interface PoPageAction extends
|
|
16
|
+
export interface PoPageAction extends PoDropdownAction {
|
|
16
17
|
}
|
|
@@ -18,14 +18,15 @@ export declare const poPageDefaultLiteralsDefault: {
|
|
|
18
18
|
*
|
|
19
19
|
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
20
20
|
*
|
|
21
|
-
* | Propriedade
|
|
22
|
-
*
|
|
23
|
-
* | **
|
|
24
|
-
* | `--padding`
|
|
25
|
-
* | `--gap`
|
|
26
|
-
* | `--
|
|
27
|
-
* | `--
|
|
28
|
-
* |
|
|
21
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
22
|
+
* |---------------------|---------------------------------------------|---------------------------------------|
|
|
23
|
+
* | **Header** | | |
|
|
24
|
+
* | `--padding` | Espaçamento do header | `var(--spacing-xs) var(--spacing-md)` |
|
|
25
|
+
* | `--gap` | Espaçamento entre os breadcrumbs e o título | `var(--spacing-md)` |
|
|
26
|
+
* | `--gap-actions` | Espaçamento entre as ações | `var(--spacing-xs)` |
|
|
27
|
+
* | `--font-family` | Família tipográfica do título | `var(--font-family-theme)` |
|
|
28
|
+
* | **Content** | | |
|
|
29
|
+
* | `--padding-content` | Espaçamento do conteúdo | `var(--spacing-xs) var(--spacing-sm)` |
|
|
29
30
|
*/
|
|
30
31
|
export declare abstract class PoPageDefaultBaseComponent {
|
|
31
32
|
poPageContent: PoPageContentComponent;
|
|
@@ -14,6 +14,20 @@ export declare const poPageDetailLiteralsDefault: {
|
|
|
14
14
|
*
|
|
15
15
|
* O componente **po-page-detail** é utilizado como container principal para a tela de
|
|
16
16
|
* detalhamento de um registro, tendo a possibilidade de usar as ações de "Voltar", "Editar" e "Remover".
|
|
17
|
+
*
|
|
18
|
+
* #### Tokens customizáveis
|
|
19
|
+
*
|
|
20
|
+
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
21
|
+
*
|
|
22
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
23
|
+
* |---------------------|---------------------------------------------|---------------------------------------|
|
|
24
|
+
* | **Header** | | |
|
|
25
|
+
* | `--padding` | Espaçamento do header | `var(--spacing-xs) var(--spacing-md)` |
|
|
26
|
+
* | `--gap` | Espaçamento entre os breadcrumbs e o título | `var(--spacing-md)` |
|
|
27
|
+
* | `--gap-actions` | Espaçamento entre as ações | `var(--spacing-xs)` |
|
|
28
|
+
* | `--font-family` | Família tipográfica do título | `var(--font-family-theme)` |
|
|
29
|
+
* | **Content** | | |
|
|
30
|
+
* | `--padding-content` | Espaçamento do conteúdo | `var(--spacing-xs) var(--spacing-sm)` |
|
|
17
31
|
*/
|
|
18
32
|
export declare class PoPageDetailBaseComponent {
|
|
19
33
|
poPageContent: PoPageContentComponent;
|
|
@@ -18,6 +18,20 @@ export declare const poPageEditLiteralsDefault: {
|
|
|
18
18
|
* Os botões "Salvar" e "Salvar e Novo" podem ser habilitados/desabilitados utilizando a propriedade `p-disable-submit`.
|
|
19
19
|
* Esta propriedade pode ser utilizada para desabilitar os botões caso exista um formulário inválido na página ou alguma
|
|
20
20
|
* regra de negócio não tenha sido atendida.
|
|
21
|
+
*
|
|
22
|
+
* #### Tokens customizáveis
|
|
23
|
+
*
|
|
24
|
+
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
25
|
+
*
|
|
26
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
27
|
+
* |---------------------|---------------------------------------------|---------------------------------------|
|
|
28
|
+
* | **Header** | | |
|
|
29
|
+
* | `--padding` | Espaçamento do header | `var(--spacing-xs) var(--spacing-md)` |
|
|
30
|
+
* | `--gap` | Espaçamento entre os breadcrumbs e o título | `var(--spacing-md)` |
|
|
31
|
+
* | `--gap-actions` | Espaçamento entre as ações | `var(--spacing-xs)` |
|
|
32
|
+
* | `--font-family` | Família tipográfica do título | `var(--font-family-theme)` |
|
|
33
|
+
* | **Content** | | |
|
|
34
|
+
* | `--padding-content` | Espaçamento do conteúdo | `var(--spacing-xs) var(--spacing-sm)` |
|
|
21
35
|
*/
|
|
22
36
|
export declare class PoPageEditBaseComponent {
|
|
23
37
|
poPageContent: PoPageContentComponent;
|
|
@@ -10,6 +10,8 @@ import { PoBreadcrumb } from '../../po-breadcrumb/po-breadcrumb.interface';
|
|
|
10
10
|
export declare class PoPageHeaderBaseComponent {
|
|
11
11
|
/** Título da página. */
|
|
12
12
|
title: string;
|
|
13
|
+
/** Define o tamanho dos componentes no header. */
|
|
14
|
+
size: string;
|
|
13
15
|
/** Subtítulo da página. */
|
|
14
16
|
subtitle: string;
|
|
15
17
|
private _breadcrumb;
|
|
@@ -23,6 +23,20 @@ export declare const poPageListLiteralsDefault: {
|
|
|
23
23
|
*
|
|
24
24
|
* Para facilitar a manipulação e visualização dos filtros aplicados, é possível também utilizar o componente
|
|
25
25
|
* [`po-disclaimer-group`](/documentation/po-disclaimer-group).
|
|
26
|
+
*
|
|
27
|
+
* #### Tokens customizáveis
|
|
28
|
+
*
|
|
29
|
+
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
30
|
+
*
|
|
31
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
32
|
+
* |---------------------|---------------------------------------------|---------------------------------------|
|
|
33
|
+
* | **Header** | | |
|
|
34
|
+
* | `--padding` | Espaçamento do header | `var(--spacing-xs) var(--spacing-md)` |
|
|
35
|
+
* | `--gap` | Espaçamento entre os breadcrumbs e o título | `var(--spacing-md)` |
|
|
36
|
+
* | `--gap-actions` | Espaçamento entre as ações | `var(--spacing-xs)` |
|
|
37
|
+
* | `--font-family` | Família tipográfica do título | `var(--font-family-theme)` |
|
|
38
|
+
* | **Content** | | |
|
|
39
|
+
* | `--padding-content` | Espaçamento do conteúdo | `var(--spacing-xs) var(--spacing-sm)` |
|
|
26
40
|
*/
|
|
27
41
|
export declare abstract class PoPageListBaseComponent {
|
|
28
42
|
poPageContent: PoPageContentComponent;
|
|
@@ -140,4 +140,16 @@ export declare class PoPopoverBaseComponent {
|
|
|
140
140
|
*/
|
|
141
141
|
set trigger(value: string);
|
|
142
142
|
get trigger(): string;
|
|
143
|
+
/**
|
|
144
|
+
* @Input
|
|
145
|
+
*
|
|
146
|
+
* @optional
|
|
147
|
+
*
|
|
148
|
+
* @description
|
|
149
|
+
* Permite a inclusão de classes CSS customizadas ao componente.
|
|
150
|
+
*
|
|
151
|
+
* Exemplo: `p-custom-classes="minha-classe-1 minha-classe-2"`.
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
customClasses: import("@angular/core").InputSignal<string>;
|
|
143
155
|
}
|
|
@@ -31,7 +31,10 @@ export declare class PoPopoverComponent extends PoPopoverBaseComponent implement
|
|
|
31
31
|
timeoutResize: any;
|
|
32
32
|
targetElement: any;
|
|
33
33
|
afterViewInitWasCalled: boolean;
|
|
34
|
+
private keydownTargetListener?;
|
|
35
|
+
private keydownPopoverListener?;
|
|
34
36
|
eventListenerFunction: () => void;
|
|
37
|
+
private readonly tabbableSelector;
|
|
35
38
|
constructor(renderer: Renderer2, poControlPosition: PoControlPositionService, cd: ChangeDetectorRef);
|
|
36
39
|
ngOnChanges(changes: SimpleChanges): void;
|
|
37
40
|
ngAfterViewInit(): void;
|
|
@@ -49,4 +52,12 @@ export declare class PoPopoverComponent extends PoPopoverBaseComponent implement
|
|
|
49
52
|
private initEventListenerFunction;
|
|
50
53
|
private removeListeners;
|
|
51
54
|
private setElementsControlPosition;
|
|
55
|
+
private focusOnTarget;
|
|
56
|
+
private focusOnFirstFocusable;
|
|
57
|
+
private attachPopoverKeydown;
|
|
58
|
+
private isVisible;
|
|
59
|
+
private getTabbablesIn;
|
|
60
|
+
private getDocumentTabbables;
|
|
61
|
+
private focusNextAfterTarget;
|
|
62
|
+
private focusPrevBeforeTarget;
|
|
52
63
|
}
|
|
@@ -7,11 +7,21 @@ import { TemplateRef } from '@angular/core';
|
|
|
7
7
|
* Interface para lista de ações do componente.
|
|
8
8
|
*/
|
|
9
9
|
export interface PoPopupAction {
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
*
|
|
13
|
+
* Rótulo da ação.
|
|
14
|
+
*
|
|
15
|
+
* No componente `po-dropdown`, a label também pode representar o agrupador de subitens.
|
|
16
|
+
*/
|
|
11
17
|
label: string;
|
|
12
18
|
/**
|
|
19
|
+
* @description
|
|
20
|
+
*
|
|
13
21
|
* Ação que será executada, sendo possível passar o nome ou a referência da função.
|
|
14
22
|
*
|
|
23
|
+
* No componente `po-dropdown`, a action também pode ser executada para o agrupador de subitens.
|
|
24
|
+
*
|
|
15
25
|
* > Para que a função seja executada no contexto do elemento filho o mesmo deve ser passado utilizando *bind*.
|
|
16
26
|
*
|
|
17
27
|
* Exemplo: `action: this.myFunction.bind(this)`
|
|
@@ -58,12 +68,20 @@ export interface PoPopupAction {
|
|
|
58
68
|
* ```
|
|
59
69
|
*/
|
|
60
70
|
icon?: string | TemplateRef<void>;
|
|
61
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* @description
|
|
73
|
+
*
|
|
74
|
+
* Atribui uma linha separadora acima do item.
|
|
75
|
+
*
|
|
76
|
+
* */
|
|
62
77
|
separator?: boolean;
|
|
63
78
|
/**
|
|
79
|
+
* @description
|
|
80
|
+
*
|
|
64
81
|
* Função que deve retornar um booleano para habilitar ou desabilitar a ação para o registro selecionado.
|
|
65
82
|
*
|
|
66
83
|
* Também é possível informar diretamente um valor booleano que vai habilitar ou desabilitar a ação para todos os registros.
|
|
84
|
+
*
|
|
67
85
|
*/
|
|
68
86
|
disabled?: boolean | Function;
|
|
69
87
|
/**
|
|
@@ -76,9 +94,23 @@ export interface PoPopupAction {
|
|
|
76
94
|
* - `danger` - indicado para ações exclusivas (excluir, sair).
|
|
77
95
|
*/
|
|
78
96
|
type?: string;
|
|
79
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* @description
|
|
99
|
+
*
|
|
100
|
+
* URL utilizada para redirecionamento das páginas.
|
|
101
|
+
*
|
|
102
|
+
* No componente `po-dropdown`, a url também pode ser configurada para o agrupador de subitens.
|
|
103
|
+
* Entretanto, quando a `url` é informada em um agrupador, o clique **não abrirá os subitens**, pois o item será
|
|
104
|
+
* tratado como um link e o redirecionamento terá prioridade sobre a exibição da lista.
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
80
107
|
url?: string;
|
|
81
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* @description
|
|
110
|
+
*
|
|
111
|
+
* Define se a ação está selecionada.
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
82
114
|
selected?: boolean;
|
|
83
115
|
/**
|
|
84
116
|
* @description
|
|
@@ -75,6 +75,7 @@ export declare class PoPopupBaseComponent {
|
|
|
75
75
|
private _position?;
|
|
76
76
|
private _size?;
|
|
77
77
|
private _target;
|
|
78
|
+
listboxSubitems: boolean;
|
|
78
79
|
/** Lista de ações que serão exibidas no componente. */
|
|
79
80
|
set actions(value: Array<PoPopupAction>);
|
|
80
81
|
get actions(): Array<PoPopupAction>;
|
|
@@ -328,6 +328,22 @@ export declare class PoSearchBaseComponent {
|
|
|
328
328
|
* > Incompatível com a propriedade `p-search-type` do tipo `locate`.
|
|
329
329
|
*/
|
|
330
330
|
filteredItemsChange: EventEmitter<any[]>;
|
|
331
|
+
/**
|
|
332
|
+
* @optional
|
|
333
|
+
*
|
|
334
|
+
* @description
|
|
335
|
+
*
|
|
336
|
+
* Evento emitido quando o campo de entrada (input) recebe foco.
|
|
337
|
+
*/
|
|
338
|
+
focusEvent: EventEmitter<any>;
|
|
339
|
+
/**
|
|
340
|
+
* @optional
|
|
341
|
+
*
|
|
342
|
+
* @description
|
|
343
|
+
* Evento disparado quando uma tecla é pressionada enquanto o foco está no componente.
|
|
344
|
+
* Retorna um objeto `KeyboardEvent` com informações sobre a tecla.
|
|
345
|
+
*/
|
|
346
|
+
keydown: EventEmitter<KeyboardEvent>;
|
|
331
347
|
/**
|
|
332
348
|
* @optional
|
|
333
349
|
*
|
|
@@ -123,7 +123,7 @@ export declare class PoSearchComponent extends PoSearchBaseComponent implements
|
|
|
123
123
|
getInputValue(): any;
|
|
124
124
|
createDropdownFilterSelect(): void;
|
|
125
125
|
isSelected(filterOption: PoSearchFilterSelect): boolean;
|
|
126
|
-
changeFilterSelect(filterOption: PoSearchFilterSelect): void;
|
|
126
|
+
changeFilterSelect(filterOption: PoSearchFilterSelect, focus?: boolean): void;
|
|
127
127
|
handlerFooterActionListbox(): void;
|
|
128
128
|
private openListboxFooterAction;
|
|
129
129
|
private handlerPlaceholderListbox;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Tipos de espaçamento interno (padding) das células (**p-spacing**) do po-table.
|
|
6
6
|
*/
|
|
7
7
|
export declare enum PoTableColumnSpacing {
|
|
8
|
-
/** Espaçamento extra pequeno: 0.25rem (vertical) x
|
|
8
|
+
/** Espaçamento extra pequeno: 0.25rem (vertical) x 0.5rem (horizontal). */
|
|
9
9
|
ExtraSmall = "extraSmall",
|
|
10
10
|
/** Espaçamento pequeno: 0.5rem (vertical) x 1rem (horizontal). */
|
|
11
11
|
Small = "small",
|
|
@@ -41,6 +41,7 @@ export declare const PoTagLiteralsDefault: {
|
|
|
41
41
|
* | `--font-size` | Tamanho da fonte | `var(--font-size-sm)` |
|
|
42
42
|
* | `--line-height` | Tamanho da label | `var(---line-height-sm)` |
|
|
43
43
|
* | `--border-radius` | Contém o valor do raio dos cantos do elemento | `var(--border-radius-pill)` |
|
|
44
|
+
* | `--gap` | Espaçamento entre o label e o value | `var(--spacing-xs)` |
|
|
44
45
|
* | **Neutral** | | |
|
|
45
46
|
* | `--color-neutral` | Cor principal no estado neutral | `var(--color-neutral-light-10)` |
|
|
46
47
|
* | `--text-color-positive` | Cor do texto no estado neutral | `var(--color-neutral-dark-80)` |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @docsPrivate
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define o nível de densidade (espaçamento) aplicado em componentes agrupadores. Pode ser ajustado conforme a
|
|
7
|
+
* preferência do usuário ou requisitos de acessibilidade.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum PoDensityMode {
|
|
10
|
+
/** Define espaçamentos mais compactos entre os elementos. */
|
|
11
|
+
Small = "small",
|
|
12
|
+
/** Define espaçamentos mais amplos e confortáveis. */
|
|
13
|
+
Medium = "medium"
|
|
14
|
+
}
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @description
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Define o tamanho padrão utilizado em componentes interativos. Este enum também é usado pelo serviço de tema para
|
|
7
|
+
* definir a preferência global de tamanho dos componentes. Por padrão, os componentes utilizam o tamanho `medium` por
|
|
8
|
+
* ser mais acessível (conforme diretrizes WCAG nível AAA).
|
|
9
|
+
*
|
|
10
|
+
* > O tamanho `small` está disponível apenas em contextos com acessibilidade AA.
|
|
7
11
|
*/
|
|
8
12
|
export declare enum PoFieldSize {
|
|
9
|
-
/** Define a altura do input como 32px. */
|
|
10
13
|
Small = "small",
|
|
11
|
-
/** Define a altura do input como 44px. */
|
|
12
14
|
Medium = "medium"
|
|
13
15
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const poThemeDensity: {
|
|
2
|
+
small: {
|
|
3
|
+
'--default-spacing-0': string;
|
|
4
|
+
'--default-spacing-xs': string;
|
|
5
|
+
'--default-spacing-sm': string;
|
|
6
|
+
'--default-spacing-md': string;
|
|
7
|
+
'--default-spacing-lg': string;
|
|
8
|
+
'--default-spacing-xl': string;
|
|
9
|
+
'--default-line-height-xs': string;
|
|
10
|
+
'--default-spacing-squish-xs': string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -53,6 +53,10 @@ declare const poThemeDefaultDarkValuesAA: {
|
|
|
53
53
|
'po-select': {
|
|
54
54
|
'--color-hover': string;
|
|
55
55
|
};
|
|
56
|
+
'.po-listbox-group-header .po-tag': {
|
|
57
|
+
color: string;
|
|
58
|
+
'background-color': string;
|
|
59
|
+
};
|
|
56
60
|
};
|
|
57
61
|
onRoot: {
|
|
58
62
|
'--color-caption-categorical-01': string;
|
|
@@ -72,6 +72,11 @@ declare const poThemeDefaultDarkValues: {
|
|
|
72
72
|
'po-select': {
|
|
73
73
|
'--color-hover': string;
|
|
74
74
|
};
|
|
75
|
+
/** DROPDOWN */
|
|
76
|
+
'.po-listbox-group-header .po-tag': {
|
|
77
|
+
color: string;
|
|
78
|
+
'background-color': string;
|
|
79
|
+
};
|
|
75
80
|
};
|
|
76
81
|
onRoot: {
|
|
77
82
|
'--color-neutral': string;
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { RendererFactory2 } from '@angular/core';
|
|
2
|
+
import { PoDensityMode } from '../../enums/po-density-mode.enum';
|
|
2
3
|
import { PoThemeA11yEnum } from './enum/po-theme-a11y.enum';
|
|
3
4
|
import { PoThemeTypeEnum } from './enum/po-theme-type.enum';
|
|
4
5
|
import { PoTheme, PoThemeActive } from './interfaces/po-theme.interface';
|
|
5
6
|
/**
|
|
6
7
|
* @description
|
|
7
8
|
*
|
|
8
|
-
* O `PoThemeService`
|
|
9
|
+
* O serviço `PoThemeService` permite customizar as cores do tema padrão do `PO-UI` e definir o nível de acessibilidade
|
|
10
|
+
* mais adequado ao projeto.
|
|
9
11
|
*
|
|
10
|
-
*
|
|
12
|
+
* O nível **AAA** (padrão) garante maior contraste, áreas clicáveis amplas e espaçamentos maiores entre os elementos,
|
|
13
|
+
* enquanto o nível **AA** mantém a conformidade com as diretrizes de acessibilidade, mas com proporções mais equilibradas
|
|
14
|
+
* e contornos mais sutis.
|
|
11
15
|
*
|
|
12
|
-
*
|
|
16
|
+
* O serviço também possibilita configurar a **densidade de espaçamentos**, permitindo ajustar o espaço entre e dentro dos
|
|
17
|
+
* componentes. Essa configuração pode ser utilizada com qualquer nível de acessibilidade.
|
|
18
|
+
*
|
|
19
|
+
* > Observação: a customização das cores de `feedback` não é recomendada por motivos de acessibilidade e usabilidade.
|
|
20
|
+
*
|
|
21
|
+
* > Para saber mais sobre como customizar o tema padrão, consulte o item
|
|
22
|
+
* [Customização de Temas usando o serviço PO-UI](guides/theme-service) na aba `Guias`.
|
|
13
23
|
*/
|
|
14
24
|
/**
|
|
15
25
|
* @example
|
|
@@ -38,7 +48,8 @@ export declare class PoThemeService {
|
|
|
38
48
|
* @param {PoTheme} themeConfig - Configuração de tema a ser aplicada ao componente.
|
|
39
49
|
* @param {PoThemeTypeEnum} [themeType=PoThemeTypeEnum.light] - (Opcional) Tipo de tema, podendo ser 'light' (claro) ou 'dark' (escuro). O tema claro é o padrão.
|
|
40
50
|
* @param {PoThemeA11yEnum} [a11yLevel=PoThemeA11yEnum.AAA] - (Opcional) Nível de acessibilidade dos componentes, podendo ser AA ou AAA. Padrão é AAA.
|
|
41
|
-
* @param {boolean} [persistPreference=true] - (Opcional) Define se a preferência de tema deve ser salva no
|
|
51
|
+
* @param {boolean} [persistPreference=true] - (Opcional) Define se a preferência de tema deve ser salva no
|
|
52
|
+
* localStorage para persistência. Por padrão é `true`, ou seja, a preferência será salva automaticamente.
|
|
42
53
|
*/
|
|
43
54
|
setTheme(themeConfig: PoTheme, themeType?: PoThemeTypeEnum, a11yLevel?: PoThemeA11yEnum, persistPreference?: boolean): void;
|
|
44
55
|
private setDataDefaultSizeHTML;
|
|
@@ -49,18 +60,35 @@ export declare class PoThemeService {
|
|
|
49
60
|
*/
|
|
50
61
|
getA11yLevel(): PoThemeA11yEnum;
|
|
51
62
|
/**
|
|
52
|
-
* Define o tamanho `small` como padrão para componentes de formulário que não possuem um tamanho definido.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
63
|
+
* Define o tamanho `small` como padrão para componentes de formulário que não possuem um tamanho definido. Essa
|
|
64
|
+
* configuração é aplicada globalmente apenas quando o nível de acessibilidade for `AA`. O valor definido é salvo no
|
|
65
|
+
* `localStorage` sob a chave `po-default-size`.
|
|
55
66
|
*
|
|
56
67
|
* > Para garantir que o tamanho `small` seja aplicado corretamente a todos os componentes, recomendamos
|
|
57
68
|
* definir esta configuração **junto com o nível de acessibilidade `AA` na inicialização da aplicação**.
|
|
58
69
|
* Se for aplicada em tempo de execução, será necessário recarregar a aplicação (`reload`)
|
|
59
70
|
* para que os estilos sejam aplicados corretamente.
|
|
71
|
+
* > Para ajustar a densidade visual dos componentes agrupadores (como pages, container, etc.), utilize também
|
|
72
|
+
* o método `setDensityMode` conforme necessário.
|
|
60
73
|
*
|
|
61
74
|
* @param {boolean} enable Habilita ou desabilita o tamanho `small` globalmente.
|
|
62
75
|
*/
|
|
63
76
|
setA11yDefaultSizeSmall(enable: boolean): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Retorna o modo de adensamento dos componentes agrupadores.
|
|
79
|
+
* Se não estiver configurado, retorna `medium` como padrão.
|
|
80
|
+
* @returns {PoDensityMode} O modo de adensamento, que pode ser `small` ou `medium`.
|
|
81
|
+
*/
|
|
82
|
+
getDensityMode(): PoDensityMode;
|
|
83
|
+
/**
|
|
84
|
+
* Aplica o modo de adensamento compacto (`small`) ou espaçoso (`medium`) para os componentes agrupadores,
|
|
85
|
+
* independentemente do nível de acessibilidade. O valor definido é salvo no `localStorage` sob a chave
|
|
86
|
+
* `po-density-mode`.
|
|
87
|
+
*
|
|
88
|
+
* @param {'small' | 'medium'} mode Define o modo de densidade: `small` para compacto, `medium` para espaçoso.
|
|
89
|
+
* O valor padrão é `medium`.
|
|
90
|
+
*/
|
|
91
|
+
setDensityMode(mode: string): void;
|
|
64
92
|
/**
|
|
65
93
|
* @docsPrivate
|
|
66
94
|
* Retorna a preferência global de tamanho dos componentes.
|
|
@@ -142,11 +170,10 @@ export declare class PoThemeService {
|
|
|
142
170
|
private applyThemeStyles;
|
|
143
171
|
private changeThemeType;
|
|
144
172
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* Este método recupera os dados do tema armazenados e os aplica ao aplicativo.
|
|
173
|
+
* Restaura e aplica as preferências visuais do usuário para o tema da aplicação, garantindo que essas preferências
|
|
174
|
+
* sejam persistidas no `localStorage` para uso em recarregamentos futuros.
|
|
148
175
|
*
|
|
149
|
-
* @returns {PoTheme}
|
|
176
|
+
* @returns {PoTheme} O tema atualmente aplicado.
|
|
150
177
|
*/
|
|
151
178
|
persistThemeActive(): PoTheme;
|
|
152
179
|
private formatTheme;
|
|
@@ -168,6 +195,7 @@ export declare class PoThemeService {
|
|
|
168
195
|
cleanThemeActive(persistPreference?: boolean): void;
|
|
169
196
|
private getActiveTypeFromTheme;
|
|
170
197
|
private getActiveA11yFromTheme;
|
|
198
|
+
private isValidA11yLevel;
|
|
171
199
|
/**
|
|
172
200
|
* @docsPrivate
|
|
173
201
|
*
|
package/lib/utils/util.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PoThemeA11yEnum } from '../services/po-theme/enum/po-theme-a11y.enum';
|
|
1
|
+
import { PoDensityMode } from '../enums/po-density-mode.enum';
|
|
3
2
|
import { ElementRef } from '@angular/core';
|
|
3
|
+
import { PoThemeA11yEnum } from '../services/po-theme/enum/po-theme-a11y.enum';
|
|
4
|
+
import { PoThemeService } from '../services/po-theme/po-theme.service';
|
|
4
5
|
/**
|
|
5
6
|
* Converte e formata os bytes em formato mais legível para o usuário.
|
|
6
7
|
*
|
|
@@ -273,6 +274,12 @@ export declare function getA11yDefaultSize(): string;
|
|
|
273
274
|
* @returns {PoThemeA11yEnum} O nível de acessibilidade, que pode ser `AA` ou `AAA`.
|
|
274
275
|
*/
|
|
275
276
|
export declare function getA11yLevel(): PoThemeA11yEnum;
|
|
277
|
+
/**
|
|
278
|
+
* Retorna o modo de adensamento dos componentes agrupadores.
|
|
279
|
+
* Se não estiver configurado, retorna `medium` como padrão.
|
|
280
|
+
* @returns {PoDensityMode} O modo de adensamento, que pode ser `small` ou `medium`.
|
|
281
|
+
*/
|
|
282
|
+
export declare function getDensityMode(): PoDensityMode;
|
|
276
283
|
/**
|
|
277
284
|
* Realiza a tradução das propriedades de ajuda dos componentes.
|
|
278
285
|
* Type do Helper default é 'help' e size 'medium'.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.8.0",
|
|
4
4
|
"description": "PO UI - Components",
|
|
5
5
|
"author": "PO UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@angular/cdk": "~20.0.3",
|
|
25
|
-
"@po-ui/style": "20.
|
|
26
|
-
"@po-ui/ng-schematics": "20.
|
|
25
|
+
"@po-ui/style": "20.8.0",
|
|
26
|
+
"@po-ui/ng-schematics": "20.8.0",
|
|
27
27
|
"echarts": "^5.6.0",
|
|
28
28
|
"tslib": "^2.3.0"
|
|
29
29
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@angular/platform-browser-dynamic": "^20",
|
|
39
39
|
"@angular/router": "^20",
|
|
40
40
|
"@angular-devkit/schematics": "^20",
|
|
41
|
-
"@po-ui/style": "20.
|
|
41
|
+
"@po-ui/style": "20.8.0",
|
|
42
42
|
"rxjs": "~7.8.1",
|
|
43
43
|
"zone.js": "~0.15.0"
|
|
44
44
|
},
|
|
Binary file
|
|
@@ -18,7 +18,7 @@ function default_1(options) {
|
|
|
18
18
|
}
|
|
19
19
|
function addPoPackageAndInstall() {
|
|
20
20
|
return (tree, context) => {
|
|
21
|
-
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '20.
|
|
21
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '20.8.0');
|
|
22
22
|
// install packages
|
|
23
23
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
24
24
|
};
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('20.8.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|