@po-ui/ng-components 21.4.0 → 21.6.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 +1894 -256
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/po-accordion/po-accordion-base.component.d.ts +3 -0
- package/lib/components/po-breadcrumb/po-breadcrumb-base.component.d.ts +3 -0
- package/lib/components/po-button/po-button-base.component.d.ts +3 -0
- package/lib/components/po-button-group/po-button-group-base.component.d.ts +3 -0
- package/lib/components/po-calendar/po-calendar-base.component.d.ts +3 -0
- package/lib/components/po-dropdown/po-dropdown-base.component.d.ts +3 -0
- package/lib/components/po-dynamic/po-dynamic-form/interfaces/po-dynamic-form-field.interface.d.ts +35 -0
- package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-base.component.d.ts +3 -0
- package/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-fields/po-dynamic-form-fields-base.component.d.ts +3 -0
- package/lib/components/po-dynamic/po-dynamic-view/po-dynamic-view-base.component.d.ts +3 -0
- package/lib/components/po-field/po-checkbox/po-checkbox-base.component.d.ts +45 -1
- package/lib/components/po-field/po-checkbox-group/po-checkbox-group-base.component.d.ts +42 -0
- package/lib/components/po-field/po-combo/po-combo-base.component.d.ts +45 -1
- package/lib/components/po-field/po-datepicker/po-datepicker-base.component.d.ts +44 -0
- package/lib/components/po-field/po-datepicker-range/po-datepicker-range-base.component.d.ts +42 -0
- package/lib/components/po-field/po-field-container/po-field-container.component.d.ts +15 -0
- package/lib/components/po-field/po-input/po-input-base.component.d.ts +44 -0
- package/lib/components/po-field/po-lookup/po-lookup-base.component.d.ts +42 -0
- package/lib/components/po-field/po-multiselect/po-multiselect-base.component.d.ts +44 -0
- package/lib/components/po-field/po-radio/po-radio.component.d.ts +3 -0
- package/lib/components/po-field/po-radio-group/po-radio-group-base.component.d.ts +46 -1
- package/lib/components/po-field/po-radio-group/po-radio-group.component.d.ts +0 -1
- package/lib/components/po-field/po-rich-text/po-rich-text-base.component.d.ts +42 -0
- package/lib/components/po-field/po-select/po-select.component.d.ts +44 -0
- package/lib/components/po-field/po-switch/po-switch.component.d.ts +43 -0
- package/lib/components/po-field/po-textarea/po-textarea-base.component.d.ts +44 -0
- package/lib/components/po-field/po-upload/po-upload-base.component.d.ts +45 -0
- package/lib/components/po-helper/po-helper-base.component.d.ts +1 -0
- package/lib/components/po-info/po-info-base.component.d.ts +3 -0
- package/lib/components/po-list-view/po-list-view-base.component.d.ts +3 -0
- package/lib/components/po-listbox/po-listbox-base.component.d.ts +3 -0
- package/lib/components/po-menu/po-menu-base.component.d.ts +3 -0
- package/lib/components/po-modal/po-modal-base.component.d.ts +3 -0
- package/lib/components/po-page/po-page-default/po-page-default-base.component.d.ts +3 -0
- package/lib/components/po-page/po-page-detail/po-page-detail-base.component.d.ts +3 -0
- package/lib/components/po-page/po-page-edit/po-page-edit-base.component.d.ts +3 -0
- package/lib/components/po-page/po-page-list/po-page-list-base.component.d.ts +3 -0
- package/lib/components/po-page/po-page-slide/po-page-slide-base.component.d.ts +3 -0
- package/lib/components/po-progress/po-progress-base.component.d.ts +3 -0
- package/lib/components/po-search/po-search-base.component.d.ts +3 -0
- package/lib/components/po-skeleton/enums/po-skeleton-animation.enum.d.ts +15 -0
- package/lib/components/po-skeleton/enums/po-skeleton-size.enum.d.ts +21 -0
- package/lib/components/po-skeleton/enums/po-skeleton-type.enum.d.ts +15 -0
- package/lib/components/po-skeleton/enums/po-skeleton-variant.enum.d.ts +17 -0
- package/lib/components/po-skeleton/index.d.ts +6 -0
- package/lib/components/po-skeleton/po-skeleton-base.component.d.ts +208 -0
- package/lib/components/po-skeleton/po-skeleton.component.d.ts +59 -0
- package/lib/components/po-skeleton/po-skeleton.module.d.ts +7 -0
- package/lib/components/po-table/po-table-base.component.d.ts +5 -0
- package/lib/components/po-tabs/po-tabs-base.component.d.ts +3 -0
- package/lib/components/po-toaster/po-toaster-base.component.d.ts +4 -0
- package/lib/components/po-tree-view/po-tree-view-base.component.d.ts +3 -0
- package/lib/components/po-widget/po-widget-base.component.d.ts +3 -0
- package/lib/services/po-dialog/po-dialog.component.d.ts +3 -0
- package/lib/services/po-theme/po-theme.service.d.ts +18 -6
- package/package.json +4 -4
- package/po-ui-ng-components-21.6.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/v21/index.js +1 -1
- 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/types/po-ui-ng-components.d.ts +1135 -26
- package/po-ui-ng-components-21.4.0.tgz +0 -0
|
@@ -36,6 +36,9 @@ export declare const poUploadLiteralsDefault: {
|
|
|
36
36
|
*
|
|
37
37
|
* | Propriedade | Descrição | Valor Padrão |
|
|
38
38
|
* |----------------------------------------|-------------------------------------------------------|---------------------------------------------------|
|
|
39
|
+
* | **FIELD CONTAINER** | | |
|
|
40
|
+
* | `--field-container-title-justify` | Alinhamento horizontal do título (`justify-content`) | `space-between` |
|
|
41
|
+
* | `--field-container-title-flex` | Flex do título (`flex`) | `1 auto` |
|
|
39
42
|
* | **TEXT SUPPORT** | | |
|
|
40
43
|
* | `--font-family-text-support` | Família tipográfica usada no texto de suporte | `var(--font-family-theme)` |
|
|
41
44
|
* | `--text-color-text-support` | Cor da fonte no texto de suporte | `var(--color-neutral-dark-90)` |
|
|
@@ -124,6 +127,45 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
124
127
|
dragDropHeight: number;
|
|
125
128
|
/** Rótulo do campo. */
|
|
126
129
|
label?: string;
|
|
130
|
+
/**
|
|
131
|
+
* @Input
|
|
132
|
+
*
|
|
133
|
+
* @optional
|
|
134
|
+
*
|
|
135
|
+
* @description
|
|
136
|
+
* Define se o título do campo será exibido de forma compacta.
|
|
137
|
+
*
|
|
138
|
+
* Quando habilitado (`true`), o modo compacto afeta o conjunto composto por:
|
|
139
|
+
* - `po-label`
|
|
140
|
+
* - `p-requirement (showRequired)`
|
|
141
|
+
* - `po-helper`
|
|
142
|
+
*
|
|
143
|
+
* Ou seja, todos os elementos relacionados ao título do campo
|
|
144
|
+
* (rótulo, indicador de obrigatoriedade e componente auxiliar) passam
|
|
145
|
+
* a seguir o comportamento de layout compacto.
|
|
146
|
+
*
|
|
147
|
+
* Também é possível definir esse comportamento de forma global,
|
|
148
|
+
* uma única vez, na folha de estilo geral da aplicação, por meio
|
|
149
|
+
* da customização dos tokens CSS:
|
|
150
|
+
*
|
|
151
|
+
* - `--field-container-title-justify`
|
|
152
|
+
* - `--field-container-title-flex`
|
|
153
|
+
*
|
|
154
|
+
* Exemplo:
|
|
155
|
+
*
|
|
156
|
+
* ```
|
|
157
|
+
* :root {
|
|
158
|
+
* --field-container-title-justify: flex-start;
|
|
159
|
+
* --field-container-title-flex: 0 1 auto;
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* Dessa forma, o layout compacto passa a ser o padrão da aplicação,
|
|
164
|
+
* sem a necessidade de definir a propriedade individualmente em cada campo.
|
|
165
|
+
*
|
|
166
|
+
* @default `false`
|
|
167
|
+
*/
|
|
168
|
+
compactLabel: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
127
169
|
/** Texto de apoio para o campo. */
|
|
128
170
|
help?: string;
|
|
129
171
|
/** URL que deve ser feita a requisição com os arquivos selecionados. */
|
|
@@ -460,6 +502,7 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
460
502
|
private _literals?;
|
|
461
503
|
private _required?;
|
|
462
504
|
private _size?;
|
|
505
|
+
private _initialSize?;
|
|
463
506
|
private language;
|
|
464
507
|
private validatorChange;
|
|
465
508
|
/**
|
|
@@ -637,6 +680,7 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
637
680
|
set size(value: string);
|
|
638
681
|
get size(): string;
|
|
639
682
|
constructor(uploadService: PoUploadService, languageService: PoLanguageService, cd: ChangeDetectorRef);
|
|
683
|
+
protected onThemeChange(): void;
|
|
640
684
|
setDisabledState(isDisabled: boolean): void;
|
|
641
685
|
registerOnChange(fn: any): void;
|
|
642
686
|
registerOnTouched(fn: any): void;
|
|
@@ -656,6 +700,7 @@ export declare abstract class PoUploadBaseComponent implements ControlValueAcces
|
|
|
656
700
|
private setAllowedExtensions;
|
|
657
701
|
private initRestrictions;
|
|
658
702
|
private updateExistsFileInFiles;
|
|
703
|
+
private applySizeBasedOnA11y;
|
|
659
704
|
abstract sendFeedback(file?: any): void;
|
|
660
705
|
abstract setDirectoryAttribute(value: boolean): any;
|
|
661
706
|
}
|
|
@@ -16,6 +16,7 @@ export declare class PoInfoBaseComponent {
|
|
|
16
16
|
private _labelSize;
|
|
17
17
|
private _orientation;
|
|
18
18
|
private _size?;
|
|
19
|
+
private _initialSize?;
|
|
19
20
|
/**
|
|
20
21
|
* @optional
|
|
21
22
|
*
|
|
@@ -58,4 +59,6 @@ export declare class PoInfoBaseComponent {
|
|
|
58
59
|
*/
|
|
59
60
|
set size(value: string);
|
|
60
61
|
get size(): string;
|
|
62
|
+
protected onThemeChange(): void;
|
|
63
|
+
private applySizeBasedOnA11y;
|
|
61
64
|
}
|
|
@@ -59,6 +59,7 @@ export declare class PoListViewBaseComponent {
|
|
|
59
59
|
showHeader: boolean;
|
|
60
60
|
private _actions;
|
|
61
61
|
private _componentsSize;
|
|
62
|
+
private _initialComponentsSize;
|
|
62
63
|
private _height;
|
|
63
64
|
private _hideSelectAll;
|
|
64
65
|
private _items;
|
|
@@ -186,6 +187,8 @@ export declare class PoListViewBaseComponent {
|
|
|
186
187
|
runTitleAction(listItem: any): void;
|
|
187
188
|
selectAllListItems(): void;
|
|
188
189
|
selectListItem(row: any): void;
|
|
190
|
+
protected onThemeChange(): void;
|
|
191
|
+
private applySizeBasedOnA11y;
|
|
189
192
|
private deleteInternalAttrs;
|
|
190
193
|
private checkIfItemsAreSelected;
|
|
191
194
|
private showMainHeader;
|
|
@@ -22,6 +22,7 @@ export declare class PoListBoxBaseComponent {
|
|
|
22
22
|
private _literals;
|
|
23
23
|
private language;
|
|
24
24
|
private _size?;
|
|
25
|
+
private _initialSize?;
|
|
25
26
|
listboxSubitems: boolean;
|
|
26
27
|
visible: boolean;
|
|
27
28
|
set type(value: string);
|
|
@@ -76,4 +77,6 @@ export declare class PoListBoxBaseComponent {
|
|
|
76
77
|
clickItem: EventEmitter<any>;
|
|
77
78
|
footerActionListboxEvent: EventEmitter<any>;
|
|
78
79
|
constructor(languageService: PoLanguageService);
|
|
80
|
+
protected onThemeChange(): void;
|
|
81
|
+
private applySizeBasedOnA11y;
|
|
79
82
|
}
|
|
@@ -90,6 +90,7 @@ export declare abstract class PoMenuBaseComponent {
|
|
|
90
90
|
readonly literals: any;
|
|
91
91
|
private _collapsed;
|
|
92
92
|
private _componentsSize;
|
|
93
|
+
private _initialComponentsSize;
|
|
93
94
|
private _filter;
|
|
94
95
|
private _searchTreeItems;
|
|
95
96
|
private _level;
|
|
@@ -287,6 +288,7 @@ export declare abstract class PoMenuBaseComponent {
|
|
|
287
288
|
set logoLink(value: boolean | string);
|
|
288
289
|
get logoLink(): boolean | string;
|
|
289
290
|
constructor(menuGlobalService: PoMenuGlobalService, menuService: PoMenuService, languageService: PoLanguageService);
|
|
291
|
+
protected onThemeChange(): void;
|
|
290
292
|
protected setMenuExtraProperties(): void;
|
|
291
293
|
protected setMenuItemProperties(menuItem: PoMenuItem): void;
|
|
292
294
|
protected validateMenus(menus: any): void;
|
|
@@ -296,6 +298,7 @@ export declare abstract class PoMenuBaseComponent {
|
|
|
296
298
|
private removeBadgeAlert;
|
|
297
299
|
private setMenuBadgeAlert;
|
|
298
300
|
private validateMenu;
|
|
301
|
+
private applySizeBasedOnA11y;
|
|
299
302
|
protected abstract checkActiveMenuByUrl(urlRouter: any): any;
|
|
300
303
|
protected abstract checkingRouterChildrenFragments(): any;
|
|
301
304
|
protected abstract validateCollapseClass(): any;
|
|
@@ -56,6 +56,7 @@ export declare class PoModalBaseComponent {
|
|
|
56
56
|
isHidden: boolean;
|
|
57
57
|
onXClosed: EventEmitter<boolean>;
|
|
58
58
|
private _componentsSize?;
|
|
59
|
+
private _initialComponentsSize?;
|
|
59
60
|
private _hideClose?;
|
|
60
61
|
private _size?;
|
|
61
62
|
/**
|
|
@@ -139,4 +140,6 @@ export declare class PoModalBaseComponent {
|
|
|
139
140
|
/** Função para abrir a modal. */
|
|
140
141
|
open(): void;
|
|
141
142
|
validPrimaryAction(): void;
|
|
143
|
+
protected onThemeChange(): void;
|
|
144
|
+
private applySizeBasedOnA11y;
|
|
142
145
|
}
|
|
@@ -36,6 +36,7 @@ export declare abstract class PoPageDefaultBaseComponent {
|
|
|
36
36
|
protected language: string;
|
|
37
37
|
private _actions?;
|
|
38
38
|
private _componentsSize?;
|
|
39
|
+
private _initialComponentsSize?;
|
|
39
40
|
private _literals;
|
|
40
41
|
private _title;
|
|
41
42
|
/**
|
|
@@ -110,6 +111,8 @@ export declare abstract class PoPageDefaultBaseComponent {
|
|
|
110
111
|
*/
|
|
111
112
|
subtitle: string;
|
|
112
113
|
constructor(languageService: PoLanguageService);
|
|
114
|
+
protected onThemeChange(): void;
|
|
115
|
+
private applySizeBasedOnA11y;
|
|
113
116
|
abstract setDropdownActions(): any;
|
|
114
117
|
abstract getVisibleActions(): any;
|
|
115
118
|
}
|
|
@@ -67,6 +67,7 @@ export declare class PoPageDetailBaseComponent {
|
|
|
67
67
|
*/
|
|
68
68
|
remove: EventEmitter<any>;
|
|
69
69
|
private _componentsSize?;
|
|
70
|
+
private _initialComponentsSize?;
|
|
70
71
|
private _literals;
|
|
71
72
|
private _title;
|
|
72
73
|
private language;
|
|
@@ -136,4 +137,6 @@ export declare class PoPageDetailBaseComponent {
|
|
|
136
137
|
*/
|
|
137
138
|
subtitle: string;
|
|
138
139
|
constructor(languageService: PoLanguageService);
|
|
140
|
+
protected onThemeChange(): void;
|
|
141
|
+
private applySizeBasedOnA11y;
|
|
139
142
|
}
|
|
@@ -73,6 +73,7 @@ export declare class PoPageEditBaseComponent {
|
|
|
73
73
|
*/
|
|
74
74
|
saveNew: EventEmitter<any>;
|
|
75
75
|
private _componentsSize?;
|
|
76
|
+
private _initialComponentsSize?;
|
|
76
77
|
private _literals;
|
|
77
78
|
private _title;
|
|
78
79
|
private language;
|
|
@@ -142,4 +143,6 @@ export declare class PoPageEditBaseComponent {
|
|
|
142
143
|
*/
|
|
143
144
|
subtitle: string;
|
|
144
145
|
constructor(languageService: PoLanguageService);
|
|
146
|
+
protected onThemeChange(): void;
|
|
147
|
+
private applySizeBasedOnA11y;
|
|
145
148
|
}
|
|
@@ -69,6 +69,7 @@ export declare abstract class PoPageListBaseComponent {
|
|
|
69
69
|
private _actions?;
|
|
70
70
|
private _disclaimerGroup?;
|
|
71
71
|
private _componentsSize?;
|
|
72
|
+
private _initialComponentsSize?;
|
|
72
73
|
private _literals;
|
|
73
74
|
private _title;
|
|
74
75
|
/**
|
|
@@ -152,5 +153,7 @@ export declare abstract class PoPageListBaseComponent {
|
|
|
152
153
|
*/
|
|
153
154
|
subtitle: string;
|
|
154
155
|
constructor(languageService: PoLanguageService);
|
|
156
|
+
protected onThemeChange(): void;
|
|
157
|
+
private applySizeBasedOnA11y;
|
|
155
158
|
abstract setDropdownActions(): any;
|
|
156
159
|
}
|
|
@@ -138,6 +138,7 @@ export declare class PoPageSlideBaseComponent {
|
|
|
138
138
|
closePageSlide: EventEmitter<any>;
|
|
139
139
|
hidden: boolean;
|
|
140
140
|
private _componentsSize?;
|
|
141
|
+
private _initialComponentsSize?;
|
|
141
142
|
private _size;
|
|
142
143
|
/**
|
|
143
144
|
* @optional
|
|
@@ -175,6 +176,8 @@ export declare class PoPageSlideBaseComponent {
|
|
|
175
176
|
*/
|
|
176
177
|
set componentsSize(value: string);
|
|
177
178
|
get componentsSize(): string;
|
|
179
|
+
protected onThemeChange(): void;
|
|
180
|
+
private applySizeBasedOnA11y;
|
|
178
181
|
/**
|
|
179
182
|
* Ativa a visualização da página.
|
|
180
183
|
*
|
|
@@ -185,6 +185,7 @@ export declare class PoProgressBaseComponent {
|
|
|
185
185
|
private _value?;
|
|
186
186
|
private _size;
|
|
187
187
|
private _sizeActions;
|
|
188
|
+
private _initialSizeActions;
|
|
188
189
|
/**
|
|
189
190
|
* @optional
|
|
190
191
|
*
|
|
@@ -254,5 +255,7 @@ export declare class PoProgressBaseComponent {
|
|
|
254
255
|
* @default `false`
|
|
255
256
|
*/
|
|
256
257
|
showPercentage: boolean;
|
|
258
|
+
protected onThemeChange(): void;
|
|
259
|
+
private applySizeActionsBasedOnA11y;
|
|
257
260
|
private isProgressRangeValue;
|
|
258
261
|
}
|
|
@@ -80,6 +80,7 @@ export declare class PoSearchBaseComponent {
|
|
|
80
80
|
private _ariaLabel?;
|
|
81
81
|
private _filterSelect?;
|
|
82
82
|
private _size?;
|
|
83
|
+
private _initialSize?;
|
|
83
84
|
private _keysLabel?;
|
|
84
85
|
private _disabled?;
|
|
85
86
|
private _loading;
|
|
@@ -419,6 +420,8 @@ export declare class PoSearchBaseComponent {
|
|
|
419
420
|
*/
|
|
420
421
|
footerAction: EventEmitter<any>;
|
|
421
422
|
constructor(languageService: PoLanguageService);
|
|
423
|
+
protected onThemeChange(): void;
|
|
422
424
|
ensureFilterSelectOption(values: any): any[];
|
|
423
425
|
mapSizeToIcon(size: string): string;
|
|
426
|
+
private applySizeBasedOnA11y;
|
|
424
427
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoSkeletonComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define os tipos de animação do componente `po-skeleton`.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PoSkeletonAnimation {
|
|
9
|
+
/** Sem animação */
|
|
10
|
+
none = "none",
|
|
11
|
+
/** Animação de pulsação */
|
|
12
|
+
pulse = "pulse",
|
|
13
|
+
/** Animação de brilho deslizante */
|
|
14
|
+
shimmer = "shimmer"
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoSkeletonComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define os tamanhos disponíveis para o componente `po-skeleton`.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PoSkeletonSize {
|
|
9
|
+
/** Tamanho extra pequeno */
|
|
10
|
+
xs = "xs",
|
|
11
|
+
/** Tamanho pequeno */
|
|
12
|
+
sm = "sm",
|
|
13
|
+
/** Tamanho médio */
|
|
14
|
+
md = "md",
|
|
15
|
+
/** Tamanho grande */
|
|
16
|
+
lg = "lg",
|
|
17
|
+
/** Tamanho extra grande */
|
|
18
|
+
xl = "xl",
|
|
19
|
+
/** Tamanho extra extra grande */
|
|
20
|
+
xxl = "2xl"
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoSkeletonComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define os tipos visuais disponíveis para o componente `po-skeleton`.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PoSkeletonType {
|
|
9
|
+
/** Tipo padrão com cor neutra clara */
|
|
10
|
+
normal = "normal",
|
|
11
|
+
/** Tipo primário com cor neutra média */
|
|
12
|
+
primary = "primary",
|
|
13
|
+
/** Tipo de conteúdo com fundo branco */
|
|
14
|
+
content = "content"
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @usedBy PoSkeletonComponent
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
*
|
|
6
|
+
* Define as variantes visuais do componente `po-skeleton`.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PoSkeletonVariant {
|
|
9
|
+
/** Variante para simular texto */
|
|
10
|
+
text = "text",
|
|
11
|
+
/** Variante retangular (largura maior que altura) */
|
|
12
|
+
rectangle = "rectangle",
|
|
13
|
+
/** Variante quadrada (largura igual à altura) */
|
|
14
|
+
square = "square",
|
|
15
|
+
/** Variante circular */
|
|
16
|
+
circle = "circle"
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './enums/po-skeleton-animation.enum';
|
|
2
|
+
export * from './enums/po-skeleton-size.enum';
|
|
3
|
+
export * from './enums/po-skeleton-type.enum';
|
|
4
|
+
export * from './enums/po-skeleton-variant.enum';
|
|
5
|
+
export * from './po-skeleton.component';
|
|
6
|
+
export * from './po-skeleton.module';
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { PoSkeletonAnimation } from './enums/po-skeleton-animation.enum';
|
|
2
|
+
import { PoSkeletonSize } from './enums/po-skeleton-size.enum';
|
|
3
|
+
import { PoSkeletonType } from './enums/po-skeleton-type.enum';
|
|
4
|
+
import { PoSkeletonVariant } from './enums/po-skeleton-variant.enum';
|
|
5
|
+
/**
|
|
6
|
+
* @description
|
|
7
|
+
*
|
|
8
|
+
* O componente `po-skeleton` é utilizado para exibir placeholders durante o carregamento de conteúdo,
|
|
9
|
+
* melhorando a experiência do usuário ao indicar que a informação está sendo processada.
|
|
10
|
+
*
|
|
11
|
+
* Ele oferece diferentes variantes visuais (texto, retângulo, círculo) e animações (pulse, shimmer)
|
|
12
|
+
* para simular diversos tipos de conteúdo em estado de carregamento.
|
|
13
|
+
*
|
|
14
|
+
* #### Tokens customizáveis
|
|
15
|
+
*
|
|
16
|
+
* É possível alterar o estilo do componente usando os seguintes tokens (CSS):
|
|
17
|
+
*
|
|
18
|
+
* > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
|
|
19
|
+
*
|
|
20
|
+
* | Propriedade | Descrição | Valor Padrão |
|
|
21
|
+
* |----------------------------------------|------------------------------------------------------|---------------------------------|
|
|
22
|
+
* | **Cores** | | |
|
|
23
|
+
* | `--color` | Cor de fundo do skeleton (tipo normal) | `var(--color-neutral-light-20)` |
|
|
24
|
+
* | `--color-primary` | Cor de fundo do skeleton (tipo primary) | `var(--color-neutral-mid-40)` |
|
|
25
|
+
* | `--color-content` | Cor de fundo do skeleton (tipo content) | `var(--color-neutral-light-00)` |
|
|
26
|
+
* | `--shimmer-highlight` | Cor de destaque do shimmer (tipo normal) | `var(--color-neutral-light-30)` |
|
|
27
|
+
* | `--shimmer-highlight-primary` | Cor de destaque do shimmer (tipo primary) | `var(--color-neutral-light-20)` |
|
|
28
|
+
* | `--shimmer-highlight-content` | Cor de destaque do shimmer (tipo content) | `var(--color-neutral-light-05)` |
|
|
29
|
+
* | **Espaçamento** | | |
|
|
30
|
+
* | `--margin-bottom` | Margem inferior do skeleton | `var(--spacing-xs)` |
|
|
31
|
+
* | **Bordas** | | |
|
|
32
|
+
* | `--border-radius` | Raio da borda do skeleton | `var(--border-radius-md)` |
|
|
33
|
+
* | `--border-radius-text` | Raio da borda para a variante text | `var(--border-radius-md)` |
|
|
34
|
+
* | `--border-radius-primary` | Raio da borda do skeleton (tipo primary) | `var(--border-radius-md)` |
|
|
35
|
+
* | `--border-radius-content` | Raio da borda do skeleton (tipo content) | `var(--border-radius-lg)` |
|
|
36
|
+
* | **Transições** | | |
|
|
37
|
+
* | `--transition-property` | Propriedade CSS da transição | `all` |
|
|
38
|
+
* | `--transition-duration` | Duração da transição de cor | `var(--duration-moderate)` |
|
|
39
|
+
* | `--transition-timing` | Função de temporização da transição/animação | `var(--timing-continuous)` |
|
|
40
|
+
* | **Animações** | | |
|
|
41
|
+
* | `--animation-duration-pulse` | Duração da animação de pulsação | `var(--duration-very-slow)` |
|
|
42
|
+
* | `--animation-duration-shimmer` | Duração da animação de brilho deslizante | `var(--duration-ultra-slow)` |
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
export declare class PoSkeletonBaseComponent {
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @Input
|
|
49
|
+
*
|
|
50
|
+
* @optional
|
|
51
|
+
*
|
|
52
|
+
* @description
|
|
53
|
+
*
|
|
54
|
+
* Define a variante visual do skeleton.
|
|
55
|
+
*
|
|
56
|
+
* Valores válidos:
|
|
57
|
+
* - `text`: Simula uma linha de texto (altura padrão: 1em)
|
|
58
|
+
* - `rectangle`: Forma retangular (proporção 3:1 por padrão)
|
|
59
|
+
* - `square`: Forma quadrada (largura e altura iguais)
|
|
60
|
+
* - `circle`: Forma circular (largura e altura iguais)
|
|
61
|
+
*
|
|
62
|
+
* @default `text`
|
|
63
|
+
*/
|
|
64
|
+
variant: import("@angular/core").InputSignal<PoSkeletonVariant>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @Input
|
|
68
|
+
*
|
|
69
|
+
* @optional
|
|
70
|
+
*
|
|
71
|
+
* @description
|
|
72
|
+
*
|
|
73
|
+
* Define o tipo visual do skeleton, alterando sua cor de fundo.
|
|
74
|
+
*
|
|
75
|
+
* Valores válidos:
|
|
76
|
+
* - `normal`: Cor neutra clara (padrão)
|
|
77
|
+
* - `primary`: Cor neutra média
|
|
78
|
+
* - `content`: Fundo branco
|
|
79
|
+
*
|
|
80
|
+
* @default `normal`
|
|
81
|
+
*/
|
|
82
|
+
type: import("@angular/core").InputSignal<PoSkeletonType>;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @Input
|
|
86
|
+
*
|
|
87
|
+
* @optional
|
|
88
|
+
*
|
|
89
|
+
* @description
|
|
90
|
+
*
|
|
91
|
+
* Define o tipo de animação do skeleton.
|
|
92
|
+
*
|
|
93
|
+
* Valores válidos:
|
|
94
|
+
* - `none`: Sem animação
|
|
95
|
+
* - `pulse`: Animação de pulsação
|
|
96
|
+
* - `shimmer`: Animação de brilho deslizante
|
|
97
|
+
*
|
|
98
|
+
* @default `shimmer`
|
|
99
|
+
*/
|
|
100
|
+
animation: import("@angular/core").InputSignal<PoSkeletonAnimation>;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @Input
|
|
104
|
+
*
|
|
105
|
+
* @optional
|
|
106
|
+
*
|
|
107
|
+
* @description
|
|
108
|
+
*
|
|
109
|
+
* Define o tamanho do skeleton para as variantes pré-definidas (`rectangle`, `square`, `circle`).
|
|
110
|
+
*
|
|
111
|
+
* Valores válidos:
|
|
112
|
+
* - `xs`: Extra pequeno (24px para square/circle, 72px x 24px para rectangle)
|
|
113
|
+
* - `sm`: Pequeno (32px para square/circle, 96px x 32px para rectangle)
|
|
114
|
+
* - `md`: Médio (48px para square/circle, 144px x 48px para rectangle)
|
|
115
|
+
* - `lg`: Grande (64px para square/circle, 192px x 64px para rectangle)
|
|
116
|
+
* - `xl`: Extra grande (96px para square/circle, 288px x 96px para rectangle)
|
|
117
|
+
* - `2xl`: Extra extra grande (144px para square/circle, 432px x 144px para rectangle)
|
|
118
|
+
*
|
|
119
|
+
* Esta propriedade é ignorada quando `p-width` ou `p-height` são definidos explicitamente.
|
|
120
|
+
*
|
|
121
|
+
* @default `md`
|
|
122
|
+
*/
|
|
123
|
+
size: import("@angular/core").InputSignal<PoSkeletonSize>;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @Input
|
|
127
|
+
*
|
|
128
|
+
* @optional
|
|
129
|
+
*
|
|
130
|
+
* @description
|
|
131
|
+
*
|
|
132
|
+
* Define a largura do skeleton.
|
|
133
|
+
* Aceita valores CSS válidos (px, %, em, rem).
|
|
134
|
+
*
|
|
135
|
+
* Quando definido, sobrescreve a largura padrão da variante.
|
|
136
|
+
*
|
|
137
|
+
* @default `100%` para variante `text`, tamanho baseado em `p-size` para outras variantes
|
|
138
|
+
*/
|
|
139
|
+
width: import("@angular/core").InputSignal<string>;
|
|
140
|
+
/**
|
|
141
|
+
* @Input
|
|
142
|
+
*
|
|
143
|
+
* @optional
|
|
144
|
+
*
|
|
145
|
+
* @description
|
|
146
|
+
*
|
|
147
|
+
* Define a altura do skeleton.
|
|
148
|
+
* Aceita valores CSS válidos (px, %, em, rem).
|
|
149
|
+
*
|
|
150
|
+
* Quando definido, sobrescreve a altura padrão da variante.
|
|
151
|
+
*/
|
|
152
|
+
height: import("@angular/core").InputSignal<string>;
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @Input
|
|
156
|
+
*
|
|
157
|
+
* @optional
|
|
158
|
+
*
|
|
159
|
+
* @description
|
|
160
|
+
*
|
|
161
|
+
* Define o raio da borda do skeleton.
|
|
162
|
+
* Aceita valores CSS válidos (px, %, em, rem).
|
|
163
|
+
*
|
|
164
|
+
* Esta propriedade sobrescreve o border-radius padrão de cada variante.
|
|
165
|
+
*/
|
|
166
|
+
borderRadius: import("@angular/core").InputSignal<string>;
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @Input
|
|
170
|
+
*
|
|
171
|
+
* @optional
|
|
172
|
+
*
|
|
173
|
+
* @description
|
|
174
|
+
*
|
|
175
|
+
* Define a descrição acessível do conteúdo que está sendo carregado.
|
|
176
|
+
*
|
|
177
|
+
* Este texto será anunciado por leitores de tela, garantindo que usuários de tecnologias assistivas
|
|
178
|
+
* sejam informados sobre o estado de carregamento.
|
|
179
|
+
*
|
|
180
|
+
* **Quando usar:**
|
|
181
|
+
* - Use em **skeletons únicos** ou no **primeiro skeleton de um grupo** com descrição contextual
|
|
182
|
+
* - Evite usar em múltiplos skeletons dentro da mesma área sem contexto, para não causar repetição excessiva
|
|
183
|
+
*
|
|
184
|
+
* **Exemplos de uso:**
|
|
185
|
+
*
|
|
186
|
+
* ```html
|
|
187
|
+
* <!-- ✅ BOM: Skeleton único com contexto -->
|
|
188
|
+
* <po-skeleton p-aria-label="Carregando perfil do usuário"></po-skeleton>
|
|
189
|
+
*
|
|
190
|
+
* <!-- ✅ BOM: Grupo de skeletons - apenas o primeiro anuncia -->
|
|
191
|
+
* <po-skeleton p-aria-label="Carregando lista de produtos"></po-skeleton>
|
|
192
|
+
* <po-skeleton p-type="primary"></po-skeleton>
|
|
193
|
+
* <po-skeleton p-variant="circle"></po-skeleton>
|
|
194
|
+
*
|
|
195
|
+
* <!-- ❌ EVITE: Múltiplos skeletons com a mesma label -->
|
|
196
|
+
* <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" -->
|
|
197
|
+
* <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" -->
|
|
198
|
+
* <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" (repetitivo!) -->
|
|
199
|
+
* ```
|
|
200
|
+
*
|
|
201
|
+
* > **Boas práticas de acessibilidade:**
|
|
202
|
+
* > - Forneça contexto específico na label para que os usuários entendam o que está carregando
|
|
203
|
+
*
|
|
204
|
+
* > - Em casos complexos, considere usar um único `<div role="status">` para todo o grupo
|
|
205
|
+
* > de skeletons, ao invés de múltiplas labels idênticas, para evitar repetição excessiva de anúncios
|
|
206
|
+
*/
|
|
207
|
+
ariaLabel: import("@angular/core").InputSignal<string>;
|
|
208
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PoSkeletonBaseComponent } from './po-skeleton-base.component';
|
|
2
|
+
/**
|
|
3
|
+
* @docsExtends PoSkeletonBaseComponent
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
*
|
|
7
|
+
* <example name="po-skeleton-basic" title="PO Skeleton Basic">
|
|
8
|
+
* <file name="sample-po-skeleton-basic/sample-po-skeleton-basic.component.html"> </file>
|
|
9
|
+
* <file name="sample-po-skeleton-basic/sample-po-skeleton-basic.component.ts"> </file>
|
|
10
|
+
* </example>
|
|
11
|
+
*
|
|
12
|
+
* <example name="po-skeleton-labs" title="PO Skeleton Labs">
|
|
13
|
+
* <file name="sample-po-skeleton-labs/sample-po-skeleton-labs.component.html"> </file>
|
|
14
|
+
* <file name="sample-po-skeleton-labs/sample-po-skeleton-labs.component.ts"> </file>
|
|
15
|
+
* </example>
|
|
16
|
+
*
|
|
17
|
+
* <example name="po-skeleton-credit-card" title="PO Skeleton - Credit Card">
|
|
18
|
+
* <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.html"> </file>
|
|
19
|
+
* <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.ts"> </file>
|
|
20
|
+
* <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.css"> </file>
|
|
21
|
+
* </example>
|
|
22
|
+
*
|
|
23
|
+
* <example name="po-skeleton-widget-card" title="PO Skeleton - Widget Card">
|
|
24
|
+
* <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.html"> </file>
|
|
25
|
+
* <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.ts"> </file>
|
|
26
|
+
* <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.css"> </file>
|
|
27
|
+
* </example>
|
|
28
|
+
*
|
|
29
|
+
* <example name="po-skeleton-user-profile" title="PO Skeleton - User Profile">
|
|
30
|
+
* <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.html"> </file>
|
|
31
|
+
* <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.ts"> </file>
|
|
32
|
+
* <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.css"> </file>
|
|
33
|
+
* </example>
|
|
34
|
+
*
|
|
35
|
+
* <example name="po-skeleton-social-post" title="PO Skeleton - Social Post">
|
|
36
|
+
* <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.html"> </file>
|
|
37
|
+
* <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.ts"> </file>
|
|
38
|
+
* <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.css"> </file>
|
|
39
|
+
* </example>
|
|
40
|
+
*
|
|
41
|
+
* <example name="po-skeleton-article" title="PO Skeleton - Article">
|
|
42
|
+
* <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.html"> </file>
|
|
43
|
+
* <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.ts"> </file>
|
|
44
|
+
* <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.css"> </file>
|
|
45
|
+
* </example>
|
|
46
|
+
*/
|
|
47
|
+
export declare class PoSkeletonComponent extends PoSkeletonBaseComponent {
|
|
48
|
+
private readonly sizeMap;
|
|
49
|
+
private readonly defaultTextDimensions;
|
|
50
|
+
private readonly defaultBorderRadius;
|
|
51
|
+
computedStyles: import("@angular/core").Signal<{
|
|
52
|
+
[key: string]: string;
|
|
53
|
+
}>;
|
|
54
|
+
computedClasses: import("@angular/core").Signal<{
|
|
55
|
+
[x: string]: boolean;
|
|
56
|
+
'po-skeleton': boolean;
|
|
57
|
+
}>;
|
|
58
|
+
private getDimensions;
|
|
59
|
+
}
|