@pecb-ui/components 1.1.2 → 1.2.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/README.md +556 -556
- package/fesm2022/pecb-ui-components.mjs +3826 -1945
- package/fesm2022/pecb-ui-components.mjs.map +1 -1
- package/index.d.ts +3937 -3
- package/package.json +6 -8
- package/esm2022/lib/components/button/button.component.mjs +0 -171
- package/esm2022/lib/components/card/card.component.mjs +0 -182
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +0 -126
- package/esm2022/lib/components/datepicker/datepicker.component.mjs +0 -349
- package/esm2022/lib/components/dropdown/dropdown.component.mjs +0 -329
- package/esm2022/lib/components/input/input.component.mjs +0 -321
- package/esm2022/lib/components/pagination/pagination.component.mjs +0 -197
- package/esm2022/lib/components/radio/radio.component.mjs +0 -147
- package/esm2022/lib/components/right-modal/right-modal.component.mjs +0 -234
- package/esm2022/lib/components/sidebar/sidebar.component.mjs +0 -155
- package/esm2022/lib/components/status/status.component.mjs +0 -50
- package/esm2022/lib/components/tab/tab.component.mjs +0 -151
- package/esm2022/lib/components/table/table.component.mjs +0 -503
- package/esm2022/lib/components/toggle/toggle.component.mjs +0 -126
- package/esm2022/lib/pecb-components.module.mjs +0 -118
- package/esm2022/lib/services/loading.service.mjs +0 -182
- package/esm2022/lib/services/notification.service.mjs +0 -144
- package/esm2022/lib/services/theme.service.mjs +0 -232
- package/esm2022/lib/shared/interfaces/component.interfaces.mjs +0 -2
- package/esm2022/lib/shared/types/common.types.mjs +0 -6
- package/esm2022/lib/shared/utils/accessibility.utils.mjs +0 -223
- package/esm2022/lib/shared/utils/dom.utils.mjs +0 -240
- package/esm2022/lib/shared/utils/error.utils.mjs +0 -277
- package/esm2022/lib/shared/utils/string.utils.mjs +0 -204
- package/esm2022/pecb-ui-components.mjs +0 -5
- package/esm2022/public-api.mjs +0 -53
- package/lib/components/button/button.component.d.ts +0 -130
- package/lib/components/card/card.component.d.ts +0 -140
- package/lib/components/checkbox/checkbox.component.d.ts +0 -74
- package/lib/components/datepicker/datepicker.component.d.ts +0 -155
- package/lib/components/dropdown/dropdown.component.d.ts +0 -144
- package/lib/components/input/input.component.d.ts +0 -215
- package/lib/components/pagination/pagination.component.d.ts +0 -53
- package/lib/components/radio/radio.component.d.ts +0 -93
- package/lib/components/right-modal/right-modal.component.d.ts +0 -137
- package/lib/components/sidebar/sidebar.component.d.ts +0 -97
- package/lib/components/status/status.component.d.ts +0 -19
- package/lib/components/tab/tab.component.d.ts +0 -102
- package/lib/components/table/table.component.d.ts +0 -403
- package/lib/components/toggle/toggle.component.d.ts +0 -74
- package/lib/pecb-components.module.d.ts +0 -37
- package/lib/services/loading.service.d.ts +0 -129
- package/lib/services/notification.service.d.ts +0 -136
- package/lib/services/theme.service.d.ts +0 -142
- package/lib/shared/interfaces/component.interfaces.d.ts +0 -283
- package/lib/shared/types/common.types.d.ts +0 -86
- package/lib/shared/utils/accessibility.utils.d.ts +0 -167
- package/lib/shared/utils/dom.utils.d.ts +0 -108
- package/lib/shared/utils/error.utils.d.ts +0 -191
- package/lib/shared/utils/string.utils.d.ts +0 -144
- package/public-api.d.ts +0 -24
package/index.d.ts
CHANGED
|
@@ -1,5 +1,3939 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef, ChangeDetectorRef, TemplateRef, Type, OnInit, OnDestroy, AfterViewInit, QueryList, OnChanges } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
5
|
+
import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
|
|
6
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
|
+
|
|
9
|
+
type ButtonVariant = 'primary' | 'primary-outline' | 'primary-2' | 'primary-2-outline' | 'neutral' | 'neutral-outline' | 'secondary' | 'text' | 'text-muted' | 'text-brand' | 'destructive' | 'destructive-outline';
|
|
10
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
11
|
+
type ButtonIconStyle = 'none' | 'leading' | 'trailing' | 'icon-only';
|
|
12
|
+
declare class ButtonComponent {
|
|
13
|
+
private readonly sanitizer;
|
|
14
|
+
id: _angular_core.InputSignal<string>;
|
|
15
|
+
/**
|
|
16
|
+
* The visual style variant of the button
|
|
17
|
+
*/
|
|
18
|
+
variant: _angular_core.InputSignal<ButtonVariant>;
|
|
19
|
+
/**
|
|
20
|
+
* The size of the button
|
|
21
|
+
*/
|
|
22
|
+
size: _angular_core.InputSignal<ButtonSize>;
|
|
23
|
+
/**
|
|
24
|
+
* Icon placement style
|
|
25
|
+
*/
|
|
26
|
+
iconStyle: _angular_core.InputSignal<ButtonIconStyle>;
|
|
27
|
+
/**
|
|
28
|
+
* Icon to display (used with iconStyle)
|
|
29
|
+
*/
|
|
30
|
+
icon: _angular_core.InputSignal<string | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the button is disabled
|
|
33
|
+
*/
|
|
34
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the button should take full width
|
|
37
|
+
*/
|
|
38
|
+
fullWidth: _angular_core.InputSignal<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the button is in loading state
|
|
41
|
+
*/
|
|
42
|
+
loading: _angular_core.InputSignal<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Button type attribute
|
|
45
|
+
*/
|
|
46
|
+
type: _angular_core.InputSignal<"button" | "submit" | "reset">;
|
|
47
|
+
/**
|
|
48
|
+
* Accessible label for the button (required for icon-only buttons)
|
|
49
|
+
*/
|
|
50
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* ID of element that labels this button
|
|
53
|
+
*/
|
|
54
|
+
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* ID of element that describes this button
|
|
57
|
+
*/
|
|
58
|
+
ariaDescribedBy: _angular_core.InputSignal<string | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Indicates the button controls an expandable element
|
|
61
|
+
*/
|
|
62
|
+
ariaExpanded: _angular_core.InputSignal<boolean | undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* Indicates the pressed state for toggle buttons
|
|
65
|
+
*/
|
|
66
|
+
ariaPressed: _angular_core.InputSignal<boolean | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Indicates the button opens a popup (menu, listbox, dialog, etc.)
|
|
69
|
+
*/
|
|
70
|
+
ariaHasPopup: _angular_core.InputSignal<boolean | "dialog" | "menu" | "listbox" | "tree" | "grid" | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* ID of the element controlled by this button
|
|
73
|
+
*/
|
|
74
|
+
ariaControls: _angular_core.InputSignal<string | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* Event emitted when the button is clicked
|
|
77
|
+
*/
|
|
78
|
+
clicked: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
79
|
+
/**
|
|
80
|
+
* Host binding for the component's ID
|
|
81
|
+
*/
|
|
82
|
+
get hostId(): null;
|
|
83
|
+
/**
|
|
84
|
+
* Get CSS classes for the button
|
|
85
|
+
*/
|
|
86
|
+
get buttonClasses(): string[];
|
|
87
|
+
get showLeadingIcon(): boolean;
|
|
88
|
+
get showTrailingIcon(): boolean;
|
|
89
|
+
get isIconOnly(): boolean;
|
|
90
|
+
get loadingText(): string;
|
|
91
|
+
get isSvgIcon(): boolean;
|
|
92
|
+
get safeIconHtml(): SafeHtml;
|
|
93
|
+
onClick(event: MouseEvent): void;
|
|
94
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
95
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
96
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "pecb-button", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "iconStyle": { "alias": "iconStyle"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaPressed": { "alias": "ariaPressed"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
type CardElevation = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
100
|
+
type CardRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
|
1
101
|
/**
|
|
2
|
-
*
|
|
102
|
+
* Semantic role for the card component
|
|
3
103
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
104
|
+
type CardRole = 'article' | 'region' | 'group' | 'listitem' | 'none';
|
|
105
|
+
declare class CardComponent {
|
|
106
|
+
/**
|
|
107
|
+
* Unique ID for the card element
|
|
108
|
+
*/
|
|
109
|
+
id: _angular_core.InputSignal<string>;
|
|
110
|
+
/**
|
|
111
|
+
* The elevation level (shadow depth) of the card
|
|
112
|
+
*/
|
|
113
|
+
elevation: _angular_core.InputSignal<CardElevation>;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the card should be hoverable with elevation change
|
|
116
|
+
*/
|
|
117
|
+
hoverable: _angular_core.InputSignal<boolean>;
|
|
118
|
+
/**
|
|
119
|
+
* Whether to add padding to the card
|
|
120
|
+
*/
|
|
121
|
+
noPadding: _angular_core.InputSignal<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Border-radius: predefined token ('xs'|'sm'|'md'|'lg'|'none'|'full')
|
|
124
|
+
* or any CSS value e.g. '20px', '50%'
|
|
125
|
+
*/
|
|
126
|
+
radius: _angular_core.InputSignal<string>;
|
|
127
|
+
/**
|
|
128
|
+
* Semantic role for the card (article, region, group, listitem, or none)
|
|
129
|
+
* Use 'article' for self-contained content, 'region' for significant sections
|
|
130
|
+
*/
|
|
131
|
+
role: _angular_core.InputSignal<CardRole>;
|
|
132
|
+
/**
|
|
133
|
+
* Accessible label for the card
|
|
134
|
+
*/
|
|
135
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
136
|
+
/**
|
|
137
|
+
* ID of element that labels this card
|
|
138
|
+
*/
|
|
139
|
+
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* ID of element that describes this card
|
|
142
|
+
*/
|
|
143
|
+
ariaDescribedBy: _angular_core.InputSignal<string | undefined>;
|
|
144
|
+
/**
|
|
145
|
+
* Get CSS classes for the card
|
|
146
|
+
*/
|
|
147
|
+
get cardClasses(): string[];
|
|
148
|
+
get borderRadiusStyle(): string;
|
|
149
|
+
get roleAttribute(): string | null;
|
|
150
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
151
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardComponent, "pecb-card", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "elevation": { "alias": "elevation"; "required": false; "isSignal": true; }; "hoverable": { "alias": "hoverable"; "required": false; "isSignal": true; }; "noPadding": { "alias": "noPadding"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
152
|
+
}
|
|
153
|
+
declare class CardHeaderComponent {
|
|
154
|
+
headingLevel: _angular_core.InputSignal<number | null>;
|
|
155
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardHeaderComponent, never>;
|
|
156
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardHeaderComponent, "pecb-card-header", never, { "headingLevel": { "alias": "headingLevel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
157
|
+
}
|
|
158
|
+
declare class CardBodyComponent {
|
|
159
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardBodyComponent, never>;
|
|
160
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardBodyComponent, "pecb-card-body", never, {}, {}, never, ["*"], true, never>;
|
|
161
|
+
}
|
|
162
|
+
declare class CardFooterComponent {
|
|
163
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CardFooterComponent, never>;
|
|
164
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardFooterComponent, "pecb-card-footer", never, {}, {}, never, ["*"], true, never>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
type StatusType = 'warning' | 'action' | 'success' | 'error' | 'different' | 'disabled' | 'neutral';
|
|
168
|
+
type StatusVariant = 'accent' | 'filled' | 'outline' | 'custom';
|
|
169
|
+
type StatusSize = 'sm' | 'md' | 'lg';
|
|
170
|
+
declare class StatusComponent {
|
|
171
|
+
private readonly _id;
|
|
172
|
+
type: _angular_core.InputSignal<StatusType>;
|
|
173
|
+
variant: _angular_core.InputSignal<StatusVariant>;
|
|
174
|
+
size: _angular_core.InputSignal<StatusSize>;
|
|
175
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
176
|
+
text: _angular_core.InputSignal<string | undefined>;
|
|
177
|
+
customClass: _angular_core.InputSignal<string | undefined>;
|
|
178
|
+
get id(): string;
|
|
179
|
+
get statusClasses(): string[];
|
|
180
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StatusComponent, never>;
|
|
181
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StatusComponent, "pecb-status", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "customClass": { "alias": "customClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
type PaginationSize = 'sm' | 'md' | 'lg';
|
|
185
|
+
type PaginationVariant = 'full' | 'compact' | 'minimal' | 'centered';
|
|
186
|
+
interface PageChangeEvent {
|
|
187
|
+
page: number;
|
|
188
|
+
pageSize: number;
|
|
189
|
+
startIndex: number;
|
|
190
|
+
endIndex: number;
|
|
191
|
+
}
|
|
192
|
+
declare class PaginationComponent {
|
|
193
|
+
private elementRef;
|
|
194
|
+
private cdr;
|
|
195
|
+
totalItems: _angular_core.InputSignal<number>;
|
|
196
|
+
pageSize: _angular_core.ModelSignal<number>;
|
|
197
|
+
currentPage: _angular_core.ModelSignal<number>;
|
|
198
|
+
pageSizeOptions: _angular_core.InputSignal<number[]>;
|
|
199
|
+
size: _angular_core.InputSignal<PaginationSize>;
|
|
200
|
+
variant: _angular_core.InputSignal<PaginationVariant>;
|
|
201
|
+
showPageSizeSelector: _angular_core.InputSignal<boolean>;
|
|
202
|
+
showItemsInfo: _angular_core.InputSignal<boolean>;
|
|
203
|
+
maxVisiblePages: _angular_core.InputSignal<number>;
|
|
204
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
205
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
206
|
+
pageChange: _angular_core.OutputEmitterRef<PageChangeEvent>;
|
|
207
|
+
pageSizeChange: _angular_core.OutputEmitterRef<number>;
|
|
208
|
+
readonly totalPages: _angular_core.Signal<number>;
|
|
209
|
+
readonly visiblePages: _angular_core.Signal<(string | number)[]>;
|
|
210
|
+
isDropdownOpen: _angular_core.WritableSignal<boolean>;
|
|
211
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef);
|
|
212
|
+
onDocumentClick(event: MouseEvent): void;
|
|
213
|
+
get containerClasses(): string[];
|
|
214
|
+
get showPages(): boolean;
|
|
215
|
+
get showPageSize(): boolean;
|
|
216
|
+
get itemsInfoText(): string;
|
|
217
|
+
get startIndex(): number;
|
|
218
|
+
get endIndex(): number;
|
|
219
|
+
get canGoPrevious(): boolean;
|
|
220
|
+
get canGoNext(): boolean;
|
|
221
|
+
goToPage(page: number): void;
|
|
222
|
+
goToPrevious(): void;
|
|
223
|
+
goToNext(): void;
|
|
224
|
+
onPageSizeChange(newSize: number): void;
|
|
225
|
+
toggleDropdown(): void;
|
|
226
|
+
closeDropdown(): void;
|
|
227
|
+
isNumber(value: number | string): boolean;
|
|
228
|
+
trackByPage(index: number, page: number | string): number | string;
|
|
229
|
+
private emitPageChange;
|
|
230
|
+
private computeVisiblePages;
|
|
231
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
232
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PaginationComponent, "pecb-pagination", never, { "totalItems": { "alias": "totalItems"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "showPageSizeSelector": { "alias": "showPageSizeSelector"; "required": false; "isSignal": true; }; "showItemsInfo": { "alias": "showItemsInfo"; "required": false; "isSignal": true; }; "maxVisiblePages": { "alias": "maxVisiblePages"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, { "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, never, never, true, never>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
type TableSize = 'sm' | 'md' | 'lg';
|
|
236
|
+
type TableVariant = 'default' | 'striped' | 'bordered';
|
|
237
|
+
/**
|
|
238
|
+
* Defines built-in column types
|
|
239
|
+
*/
|
|
240
|
+
type PecbTableColumnType = 'text' | 'link' | 'status' | 'action' | 'user' | 'custom';
|
|
241
|
+
/**
|
|
242
|
+
* Defines built-in component names for columns
|
|
243
|
+
*/
|
|
244
|
+
type PecbTableColumnComponent = 'status' | 'action' | 'user';
|
|
245
|
+
interface TableAction {
|
|
246
|
+
id: string;
|
|
247
|
+
icon: 'view' | 'edit' | 'delete' | 'download' | 'copy' | 'custom';
|
|
248
|
+
tooltip?: string;
|
|
249
|
+
customIcon?: string;
|
|
250
|
+
disabled?: boolean;
|
|
251
|
+
variant?: 'default' | 'danger';
|
|
252
|
+
/** Whether to show a vertical divider before this action */
|
|
253
|
+
dividerBefore?: boolean;
|
|
254
|
+
/** Click handler for this specific action */
|
|
255
|
+
action?: (row: any, index: number) => void;
|
|
256
|
+
}
|
|
257
|
+
interface TableStatusConfig {
|
|
258
|
+
typeMap?: Record<string, string>;
|
|
259
|
+
variant?: 'accent' | 'filled' | 'outline';
|
|
260
|
+
size?: 'sm' | 'md' | 'lg';
|
|
261
|
+
}
|
|
262
|
+
interface TableUserConfig {
|
|
263
|
+
avatarKey?: string;
|
|
264
|
+
nameKey?: string;
|
|
265
|
+
secondaryKey?: string;
|
|
266
|
+
}
|
|
267
|
+
interface PecbTableColumn {
|
|
268
|
+
key: string;
|
|
269
|
+
label: string;
|
|
270
|
+
width?: string;
|
|
271
|
+
align?: 'left' | 'center' | 'right';
|
|
272
|
+
sortable?: boolean;
|
|
273
|
+
cellTemplate?: TemplateRef<any>;
|
|
274
|
+
headerTemplate?: TemplateRef<any>;
|
|
275
|
+
cssClass?: string;
|
|
276
|
+
type?: PecbTableColumnType;
|
|
277
|
+
component?: PecbTableColumnComponent;
|
|
278
|
+
dynamicComponent?: Type<any>;
|
|
279
|
+
componentInputs?: Record<string, any>;
|
|
280
|
+
componentInputsFn?: (row: any, value: any, index: number) => Record<string, any>;
|
|
281
|
+
actions?: TableAction[];
|
|
282
|
+
statusConfig?: TableStatusConfig;
|
|
283
|
+
userConfig?: TableUserConfig;
|
|
284
|
+
}
|
|
285
|
+
interface TableSortEvent {
|
|
286
|
+
column: string;
|
|
287
|
+
direction: 'asc' | 'desc' | null;
|
|
288
|
+
}
|
|
289
|
+
interface TableRowActionEvent {
|
|
290
|
+
action: string;
|
|
291
|
+
row: any;
|
|
292
|
+
index: number;
|
|
293
|
+
}
|
|
294
|
+
interface TableSelectionEvent {
|
|
295
|
+
selectedRows: any[];
|
|
296
|
+
selectedIndices: number[];
|
|
297
|
+
}
|
|
298
|
+
declare class TableComponent {
|
|
299
|
+
private sanitizer;
|
|
300
|
+
private cdr;
|
|
301
|
+
constructor(sanitizer: DomSanitizer, cdr: ChangeDetectorRef);
|
|
302
|
+
/**
|
|
303
|
+
* Column definitions for the table
|
|
304
|
+
*/
|
|
305
|
+
columns: _angular_core.InputSignal<PecbTableColumn[]>;
|
|
306
|
+
/**
|
|
307
|
+
* Data array to display in the table
|
|
308
|
+
*/
|
|
309
|
+
data: _angular_core.InputSignal<any[]>;
|
|
310
|
+
/**
|
|
311
|
+
* Size variant of the table
|
|
312
|
+
* @default 'md'
|
|
313
|
+
*/
|
|
314
|
+
size: _angular_core.InputSignal<TableSize>;
|
|
315
|
+
/**
|
|
316
|
+
* Visual variant of the table
|
|
317
|
+
* @default 'default'
|
|
318
|
+
*/
|
|
319
|
+
variant: _angular_core.InputSignal<TableVariant>;
|
|
320
|
+
/**
|
|
321
|
+
* Whether to show the table header
|
|
322
|
+
* @default true
|
|
323
|
+
*/
|
|
324
|
+
showHeader: _angular_core.InputSignal<boolean>;
|
|
325
|
+
/**
|
|
326
|
+
* Whether to enable row hover effect
|
|
327
|
+
* @default true
|
|
328
|
+
*/
|
|
329
|
+
hoverable: _angular_core.InputSignal<boolean>;
|
|
330
|
+
/**
|
|
331
|
+
* Whether to show pagination
|
|
332
|
+
* @default true
|
|
333
|
+
*/
|
|
334
|
+
showPagination: _angular_core.InputSignal<boolean>;
|
|
335
|
+
/**
|
|
336
|
+
* Total number of items for pagination
|
|
337
|
+
*/
|
|
338
|
+
totalItems: _angular_core.InputSignal<number>;
|
|
339
|
+
/**
|
|
340
|
+
* Current page number (1-based)
|
|
341
|
+
* @default 1
|
|
342
|
+
*/
|
|
343
|
+
currentPage: _angular_core.ModelSignal<number>;
|
|
344
|
+
/**
|
|
345
|
+
* Number of items per page
|
|
346
|
+
* @default 15
|
|
347
|
+
*/
|
|
348
|
+
pageSize: _angular_core.ModelSignal<number>;
|
|
349
|
+
/**
|
|
350
|
+
* Available page size options
|
|
351
|
+
*/
|
|
352
|
+
pageSizeOptions: _angular_core.InputSignal<number[]>;
|
|
353
|
+
/**
|
|
354
|
+
* Whether to show page size selector in pagination
|
|
355
|
+
* @default true
|
|
356
|
+
*/
|
|
357
|
+
showPageSizeSelector: _angular_core.InputSignal<boolean>;
|
|
358
|
+
/**
|
|
359
|
+
* Pagination variant
|
|
360
|
+
* @default 'full'
|
|
361
|
+
*/
|
|
362
|
+
paginationVariant: _angular_core.InputSignal<"full" | "compact" | "minimal" | "centered">;
|
|
363
|
+
/**
|
|
364
|
+
* Message to display when there is no data
|
|
365
|
+
*/
|
|
366
|
+
emptyMessage: _angular_core.InputSignal<string>;
|
|
367
|
+
/**
|
|
368
|
+
* Whether to show loading state
|
|
369
|
+
* @default false
|
|
370
|
+
*/
|
|
371
|
+
loading: _angular_core.InputSignal<boolean>;
|
|
372
|
+
/**
|
|
373
|
+
* Whether to enable row selection
|
|
374
|
+
* @default false
|
|
375
|
+
*/
|
|
376
|
+
selectable: _angular_core.InputSignal<boolean>;
|
|
377
|
+
/**
|
|
378
|
+
* Currently selected row indices
|
|
379
|
+
*/
|
|
380
|
+
selectedIndices: _angular_core.ModelSignal<number[]>;
|
|
381
|
+
/**
|
|
382
|
+
* Whether the table has a fixed header
|
|
383
|
+
* @default false
|
|
384
|
+
*/
|
|
385
|
+
stickyHeader: _angular_core.InputSignal<boolean>;
|
|
386
|
+
/**
|
|
387
|
+
* Maximum height of the table body (enables scrolling)
|
|
388
|
+
*/
|
|
389
|
+
maxHeight: _angular_core.InputSignal<string | undefined>;
|
|
390
|
+
/**
|
|
391
|
+
* Column key currently being sorted
|
|
392
|
+
*/
|
|
393
|
+
sortColumn: _angular_core.ModelSignal<string | undefined>;
|
|
394
|
+
/**
|
|
395
|
+
* Current sort direction
|
|
396
|
+
*/
|
|
397
|
+
sortDirection: _angular_core.ModelSignal<"desc" | "asc" | null>;
|
|
398
|
+
/**
|
|
399
|
+
* ARIA label for the table
|
|
400
|
+
*/
|
|
401
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
402
|
+
/**
|
|
403
|
+
* Emitted when a page change occurs
|
|
404
|
+
*/
|
|
405
|
+
pageChange: _angular_core.OutputEmitterRef<PageChangeEvent>;
|
|
406
|
+
/**
|
|
407
|
+
* Emitted when page size changes
|
|
408
|
+
*/
|
|
409
|
+
pageSizeChange: _angular_core.OutputEmitterRef<number>;
|
|
410
|
+
/**
|
|
411
|
+
* Emitted when a row is clicked
|
|
412
|
+
*/
|
|
413
|
+
rowClick: _angular_core.OutputEmitterRef<{
|
|
414
|
+
row: any;
|
|
415
|
+
index: number;
|
|
416
|
+
}>;
|
|
417
|
+
/**
|
|
418
|
+
* Emitted when a row action is triggered
|
|
419
|
+
*/
|
|
420
|
+
rowAction: _angular_core.OutputEmitterRef<TableRowActionEvent>;
|
|
421
|
+
/**
|
|
422
|
+
* Emitted when sorting changes
|
|
423
|
+
*/
|
|
424
|
+
sortChange: _angular_core.OutputEmitterRef<TableSortEvent>;
|
|
425
|
+
/**
|
|
426
|
+
* Emitted when row selection changes
|
|
427
|
+
*/
|
|
428
|
+
selectionChange: _angular_core.OutputEmitterRef<TableSelectionEvent>;
|
|
429
|
+
emptyTemplate?: TemplateRef<any>;
|
|
430
|
+
loadingTemplate?: TemplateRef<any>;
|
|
431
|
+
get containerClasses(): string;
|
|
432
|
+
get paginationClasses(): string;
|
|
433
|
+
get tableClasses(): string;
|
|
434
|
+
getCellValue(row: any, key: string): any;
|
|
435
|
+
getAlignmentClass(column: PecbTableColumn): string;
|
|
436
|
+
onRowClick(row: any, index: number): void;
|
|
437
|
+
onRowAction(action: string, row: any, index: number, event: Event): void;
|
|
438
|
+
onHeaderClick(column: PecbTableColumn): void;
|
|
439
|
+
toggleRowSelection(index: number): void;
|
|
440
|
+
toggleAllSelection(): void;
|
|
441
|
+
isRowSelected(index: number): boolean;
|
|
442
|
+
isAllSelected(): boolean;
|
|
443
|
+
isSomeSelected(): boolean;
|
|
444
|
+
onPageChange(event: PageChangeEvent): void;
|
|
445
|
+
onPageSizeChange(newSize: number): void;
|
|
446
|
+
getSortState(column: PecbTableColumn): 'asc' | 'desc' | 'none';
|
|
447
|
+
trackByIndex(index: number): number;
|
|
448
|
+
trackByKey(_: number, column: PecbTableColumn): string;
|
|
449
|
+
getColumnType(column: PecbTableColumn): string;
|
|
450
|
+
getStatusType(value: any, column: PecbTableColumn): any;
|
|
451
|
+
getStatusVariant(column: PecbTableColumn): any;
|
|
452
|
+
getStatusSize(column: PecbTableColumn): any;
|
|
453
|
+
getUserData(row: any, column: PecbTableColumn): {
|
|
454
|
+
avatar: string;
|
|
455
|
+
name: string;
|
|
456
|
+
secondary: string;
|
|
457
|
+
};
|
|
458
|
+
getActions(column: PecbTableColumn): TableAction[];
|
|
459
|
+
onActionClick(action: TableAction, row: any, index: number, event: Event): void;
|
|
460
|
+
getDynamicComponentInputs(row: any, column: PecbTableColumn, index: number): Record<string, any>;
|
|
461
|
+
hasDynamicComponent(column: PecbTableColumn): boolean;
|
|
462
|
+
getSafeIcon(iconSvg: string | undefined): SafeHtml;
|
|
463
|
+
/**
|
|
464
|
+
* Builds a safe href from a URL string, prepending https:// if missing
|
|
465
|
+
*/
|
|
466
|
+
getLinkHref(value: string): string;
|
|
467
|
+
private emitSelectionChange;
|
|
468
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
469
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "pecb-table", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "hoverable": { "alias": "hoverable"; "required": false; "isSignal": true; }; "showPagination": { "alias": "showPagination"; "required": false; "isSignal": true; }; "totalItems": { "alias": "totalItems"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showPageSizeSelector": { "alias": "showPageSizeSelector"; "required": false; "isSignal": true; }; "paginationVariant": { "alias": "paginationVariant"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selectedIndices": { "alias": "selectedIndices"; "required": false; "isSignal": true; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "sortColumn": { "alias": "sortColumn"; "required": false; "isSignal": true; }; "sortDirection": { "alias": "sortDirection"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, { "currentPage": "currentPageChange"; "pageSize": "pageSizeChange"; "selectedIndices": "selectedIndicesChange"; "sortColumn": "sortColumnChange"; "sortDirection": "sortDirectionChange"; "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; "rowClick": "rowClick"; "rowAction": "rowAction"; "sortChange": "sortChange"; "selectionChange": "selectionChange"; }, ["emptyTemplate", "loadingTemplate"], never, true, never>;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
type TabStyle = 'rounded' | 'line';
|
|
473
|
+
type TabSize = 'sm' | 'md';
|
|
474
|
+
declare class TabComponent {
|
|
475
|
+
id: _angular_core.InputSignal<string>;
|
|
476
|
+
tabStyle: _angular_core.InputSignal<TabStyle>;
|
|
477
|
+
size: _angular_core.InputSignal<TabSize>;
|
|
478
|
+
label: _angular_core.InputSignal<string>;
|
|
479
|
+
icon: _angular_core.InputSignal<number | undefined>;
|
|
480
|
+
active: _angular_core.InputSignal<boolean>;
|
|
481
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
482
|
+
closable: _angular_core.InputSignal<boolean>;
|
|
483
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
484
|
+
ariaControls: _angular_core.InputSignal<string | undefined>;
|
|
485
|
+
ariaSelected: _angular_core.InputSignal<boolean | undefined>;
|
|
486
|
+
clicked: _angular_core.OutputEmitterRef<string>;
|
|
487
|
+
closed: _angular_core.OutputEmitterRef<string>;
|
|
488
|
+
get tabClasses(): string[];
|
|
489
|
+
onClick(event: MouseEvent): void;
|
|
490
|
+
onClose(event: MouseEvent): void;
|
|
491
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
492
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabComponent, never>;
|
|
493
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabComponent, "pecb-tab", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "tabStyle": { "alias": "tabStyle"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "ariaSelected": { "alias": "ariaSelected"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; "closed": "closed"; }, never, never, true, never>;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
type DatepickerSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
497
|
+
interface CalendarDay {
|
|
498
|
+
date: Date;
|
|
499
|
+
day: number;
|
|
500
|
+
isCurrentMonth: boolean;
|
|
501
|
+
isSelected: boolean;
|
|
502
|
+
isToday: boolean;
|
|
503
|
+
}
|
|
504
|
+
declare class DatepickerComponent implements ControlValueAccessor {
|
|
505
|
+
private readonly elementRef;
|
|
506
|
+
inputElement?: ElementRef<HTMLInputElement>;
|
|
507
|
+
/**
|
|
508
|
+
* Unique ID for the datepicker element
|
|
509
|
+
*/
|
|
510
|
+
id: _angular_core.InputSignal<string>;
|
|
511
|
+
/**
|
|
512
|
+
* Label text to display above the input
|
|
513
|
+
*/
|
|
514
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
515
|
+
/**
|
|
516
|
+
* Placeholder text for the input
|
|
517
|
+
*/
|
|
518
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
519
|
+
/**
|
|
520
|
+
* The size of the datepicker
|
|
521
|
+
*/
|
|
522
|
+
size: _angular_core.InputSignal<DatepickerSize>;
|
|
523
|
+
/**
|
|
524
|
+
* Width of the datepicker (any valid CSS value, e.g. '300px', '50%', '100%')
|
|
525
|
+
* Defaults to 100% via CSS
|
|
526
|
+
*/
|
|
527
|
+
width: _angular_core.InputSignal<string | undefined>;
|
|
528
|
+
/**
|
|
529
|
+
* Whether the field is required
|
|
530
|
+
*/
|
|
531
|
+
required: _angular_core.InputSignal<boolean>;
|
|
532
|
+
/**
|
|
533
|
+
* Whether the datepicker is disabled
|
|
534
|
+
*/
|
|
535
|
+
disabled: _angular_core.ModelSignal<boolean>;
|
|
536
|
+
/**
|
|
537
|
+
* Date format for display (default: MM/DD/YYYY)
|
|
538
|
+
*/
|
|
539
|
+
dateFormat: _angular_core.InputSignal<string>;
|
|
540
|
+
/**
|
|
541
|
+
* Minimum selectable date
|
|
542
|
+
*/
|
|
543
|
+
minDate: _angular_core.InputSignal<Date | undefined>;
|
|
544
|
+
/**
|
|
545
|
+
* Maximum selectable date
|
|
546
|
+
*/
|
|
547
|
+
maxDate: _angular_core.InputSignal<Date | undefined>;
|
|
548
|
+
/**
|
|
549
|
+
* Event emitted when date is selected
|
|
550
|
+
*/
|
|
551
|
+
dateChange: _angular_core.OutputEmitterRef<Date | null>;
|
|
552
|
+
/**
|
|
553
|
+
* Event emitted when calendar is opened
|
|
554
|
+
*/
|
|
555
|
+
opened: _angular_core.OutputEmitterRef<void>;
|
|
556
|
+
/**
|
|
557
|
+
* Event emitted when calendar is closed
|
|
558
|
+
*/
|
|
559
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
560
|
+
selectedDate: _angular_core.WritableSignal<Date | null>;
|
|
561
|
+
isCalendarOpen: _angular_core.WritableSignal<boolean>;
|
|
562
|
+
currentMonth: _angular_core.WritableSignal<Date>;
|
|
563
|
+
calendarDays: _angular_core.WritableSignal<CalendarDay[]>;
|
|
564
|
+
weekDays: string[];
|
|
565
|
+
monthNames: string[];
|
|
566
|
+
private onChange;
|
|
567
|
+
private onTouched;
|
|
568
|
+
constructor();
|
|
569
|
+
get wrapperClasses(): string[];
|
|
570
|
+
get displayValue(): string;
|
|
571
|
+
get monthYearDisplay(): string;
|
|
572
|
+
toggleCalendar(): void;
|
|
573
|
+
closeCalendar(): void;
|
|
574
|
+
previousMonth(): void;
|
|
575
|
+
nextMonth(): void;
|
|
576
|
+
selectDate(day: CalendarDay): void;
|
|
577
|
+
clearDate(event: MouseEvent): void;
|
|
578
|
+
onDocumentClick(event: MouseEvent): void;
|
|
579
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
580
|
+
private generateCalendar;
|
|
581
|
+
private formatDate;
|
|
582
|
+
writeValue(value: Date | null): void;
|
|
583
|
+
registerOnChange(fn: (value: Date | null) => void): void;
|
|
584
|
+
registerOnTouched(fn: () => void): void;
|
|
585
|
+
setDisabledState(isDisabled: boolean): void;
|
|
586
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatepickerComponent, never>;
|
|
587
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatepickerComponent, "pecb-datepicker", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "dateChange": "dateChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search';
|
|
591
|
+
type InputSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
592
|
+
/**
|
|
593
|
+
* A professional input component with floating label and multiple types.
|
|
594
|
+
* Fully accessible with WCAG 2.1 AA compliance and reactive forms support.
|
|
595
|
+
*
|
|
596
|
+
* @example
|
|
597
|
+
* ```html
|
|
598
|
+
* <pecb-input
|
|
599
|
+
* label="Email"
|
|
600
|
+
* type="email"
|
|
601
|
+
* placeholder="Enter your email"
|
|
602
|
+
* [(ngModel)]="email"
|
|
603
|
+
* ></pecb-input>
|
|
604
|
+
*
|
|
605
|
+
* <!-- With predefined icon -->
|
|
606
|
+
* <pecb-input
|
|
607
|
+
* label="Email"
|
|
608
|
+
* type="email"
|
|
609
|
+
* icon="email"
|
|
610
|
+
* iconPosition="left"
|
|
611
|
+
* ></pecb-input>
|
|
612
|
+
*
|
|
613
|
+
* <!-- With custom SVG icon -->
|
|
614
|
+
* <pecb-input
|
|
615
|
+
* label="Phone"
|
|
616
|
+
* type="tel"
|
|
617
|
+
* [icon]="'<svg>...</svg>'"
|
|
618
|
+
* iconPosition="left"
|
|
619
|
+
* ></pecb-input>
|
|
620
|
+
*
|
|
621
|
+
* <!-- With error state -->
|
|
622
|
+
* <pecb-input
|
|
623
|
+
* label="Password"
|
|
624
|
+
* type="password"
|
|
625
|
+
* [error]="true"
|
|
626
|
+
* errorMessage="Password is required"
|
|
627
|
+
* ></pecb-input>
|
|
628
|
+
* ```
|
|
629
|
+
*
|
|
630
|
+
* @publicApi
|
|
631
|
+
*/
|
|
632
|
+
declare class InputComponent implements ControlValueAccessor {
|
|
633
|
+
private readonly sanitizer;
|
|
634
|
+
inputElement?: ElementRef<HTMLInputElement>;
|
|
635
|
+
/**
|
|
636
|
+
* Unique ID for the input element
|
|
637
|
+
*/
|
|
638
|
+
id: _angular_core.InputSignal<string>;
|
|
639
|
+
/**
|
|
640
|
+
* Input type
|
|
641
|
+
*/
|
|
642
|
+
type: _angular_core.InputSignal<InputType>;
|
|
643
|
+
/**
|
|
644
|
+
* Label text to display
|
|
645
|
+
*/
|
|
646
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
647
|
+
/**
|
|
648
|
+
* Placeholder text (shown when label is not present)
|
|
649
|
+
*/
|
|
650
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
651
|
+
/**
|
|
652
|
+
* The size of the input
|
|
653
|
+
*/
|
|
654
|
+
size: _angular_core.InputSignal<InputSize>;
|
|
655
|
+
/**
|
|
656
|
+
* Width of the input wrapper — any valid CSS value e.g. '300px', '50%', '100%'
|
|
657
|
+
* Defaults to 100% (full width of parent)
|
|
658
|
+
*/
|
|
659
|
+
width: _angular_core.InputSignal<string | undefined>;
|
|
660
|
+
/**
|
|
661
|
+
* Whether the field is required
|
|
662
|
+
*/
|
|
663
|
+
required: _angular_core.InputSignal<boolean>;
|
|
664
|
+
/**
|
|
665
|
+
* Whether the input is disabled
|
|
666
|
+
*/
|
|
667
|
+
disabled: _angular_core.ModelSignal<boolean>;
|
|
668
|
+
/**
|
|
669
|
+
* Whether the input is readonly
|
|
670
|
+
*/
|
|
671
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
672
|
+
/**
|
|
673
|
+
* Whether to show error state
|
|
674
|
+
*/
|
|
675
|
+
error: _angular_core.InputSignal<boolean>;
|
|
676
|
+
/**
|
|
677
|
+
* Error message to display
|
|
678
|
+
*/
|
|
679
|
+
errorMessage: _angular_core.InputSignal<string | undefined>;
|
|
680
|
+
/**
|
|
681
|
+
* Helper text to display below input
|
|
682
|
+
*/
|
|
683
|
+
helperText: _angular_core.InputSignal<string | undefined>;
|
|
684
|
+
/**
|
|
685
|
+
* Icon to display - can be a predefined name ('email', 'search', 'user') or custom SVG string
|
|
686
|
+
*/
|
|
687
|
+
icon: _angular_core.InputSignal<string | undefined>;
|
|
688
|
+
/**
|
|
689
|
+
* Icon position (left or right)
|
|
690
|
+
*/
|
|
691
|
+
iconPosition: _angular_core.InputSignal<"left" | "right">;
|
|
692
|
+
/**
|
|
693
|
+
* Left icon name or HTML (deprecated - use icon with iconPosition instead)
|
|
694
|
+
*/
|
|
695
|
+
leftIcon: _angular_core.InputSignal<string | undefined>;
|
|
696
|
+
/**
|
|
697
|
+
* Right icon name or HTML (deprecated - use icon with iconPosition instead)
|
|
698
|
+
*/
|
|
699
|
+
rightIcon: _angular_core.InputSignal<string | undefined>;
|
|
700
|
+
/**
|
|
701
|
+
* Whether to show clear button
|
|
702
|
+
*/
|
|
703
|
+
clearable: _angular_core.InputSignal<boolean>;
|
|
704
|
+
/**
|
|
705
|
+
* Maximum length of input
|
|
706
|
+
*/
|
|
707
|
+
maxLength: _angular_core.InputSignal<number | undefined>;
|
|
708
|
+
/**
|
|
709
|
+
* Minimum value (for number type)
|
|
710
|
+
*/
|
|
711
|
+
min: _angular_core.InputSignal<number | undefined>;
|
|
712
|
+
/**
|
|
713
|
+
* Maximum value (for number type)
|
|
714
|
+
*/
|
|
715
|
+
max: _angular_core.InputSignal<number | undefined>;
|
|
716
|
+
/**
|
|
717
|
+
* Step value (for number type)
|
|
718
|
+
*/
|
|
719
|
+
step: _angular_core.InputSignal<number | undefined>;
|
|
720
|
+
/**
|
|
721
|
+
* Autocomplete attribute
|
|
722
|
+
*/
|
|
723
|
+
autocomplete: _angular_core.InputSignal<string | undefined>;
|
|
724
|
+
/**
|
|
725
|
+
* Show info icon next to the label
|
|
726
|
+
*/
|
|
727
|
+
showInfoIcon: _angular_core.InputSignal<boolean>;
|
|
728
|
+
/**
|
|
729
|
+
* Event emitted when value changes
|
|
730
|
+
*/
|
|
731
|
+
valueChange: _angular_core.OutputEmitterRef<string>;
|
|
732
|
+
/**
|
|
733
|
+
* Event emitted on blur
|
|
734
|
+
*/
|
|
735
|
+
blurred: _angular_core.OutputEmitterRef<void>;
|
|
736
|
+
/**
|
|
737
|
+
* Event emitted on focus
|
|
738
|
+
*/
|
|
739
|
+
focused: _angular_core.OutputEmitterRef<void>;
|
|
740
|
+
/**
|
|
741
|
+
* Event emitted when clear button is clicked
|
|
742
|
+
*/
|
|
743
|
+
cleared: _angular_core.OutputEmitterRef<void>;
|
|
744
|
+
value: _angular_core.WritableSignal<string>;
|
|
745
|
+
isFocused: _angular_core.WritableSignal<boolean>;
|
|
746
|
+
showPassword: _angular_core.WritableSignal<boolean>;
|
|
747
|
+
private onChange;
|
|
748
|
+
private onTouched;
|
|
749
|
+
get wrapperClasses(): string[];
|
|
750
|
+
get inputType(): string;
|
|
751
|
+
get showClearButton(): boolean;
|
|
752
|
+
get showPasswordToggle(): boolean;
|
|
753
|
+
get computedLeftIcon(): string | undefined;
|
|
754
|
+
get computedRightIcon(): string | undefined;
|
|
755
|
+
onInput(event: Event): void;
|
|
756
|
+
onFocus(): void;
|
|
757
|
+
onBlur(): void;
|
|
758
|
+
clearValue(event: MouseEvent): void;
|
|
759
|
+
togglePasswordVisibility(event: MouseEvent): void;
|
|
760
|
+
focus(): void;
|
|
761
|
+
sanitizeIcon(icon: string | undefined): SafeHtml;
|
|
762
|
+
writeValue(value: string): void;
|
|
763
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
764
|
+
registerOnTouched(fn: () => void): void;
|
|
765
|
+
setDisabledState(isDisabled: boolean): void;
|
|
766
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
767
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputComponent, "pecb-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "leftIcon": { "alias": "leftIcon"; "required": false; "isSignal": true; }; "rightIcon": { "alias": "rightIcon"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "showInfoIcon": { "alias": "showInfoIcon"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "valueChange": "valueChange"; "blurred": "blurred"; "focused": "focused"; "cleared": "cleared"; }, never, never, true, never>;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
type RadioVariant = 'dot' | 'filled';
|
|
771
|
+
type RadioLabelPosition = 'right' | 'left';
|
|
772
|
+
declare class RadioComponent implements ControlValueAccessor {
|
|
773
|
+
id: _angular_core.InputSignal<string>;
|
|
774
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
775
|
+
value: _angular_core.InputSignal<unknown>;
|
|
776
|
+
variant: _angular_core.InputSignal<RadioVariant>;
|
|
777
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
778
|
+
description: _angular_core.InputSignal<string | undefined>;
|
|
779
|
+
labelPosition: _angular_core.InputSignal<RadioLabelPosition>;
|
|
780
|
+
disabled: _angular_core.ModelSignal<boolean>;
|
|
781
|
+
selectionChange: _angular_core.OutputEmitterRef<unknown>;
|
|
782
|
+
checked: _angular_core.WritableSignal<boolean>;
|
|
783
|
+
private onChange;
|
|
784
|
+
private onTouched;
|
|
785
|
+
get wrapperClasses(): string[];
|
|
786
|
+
onRadioChange(event: Event): void;
|
|
787
|
+
onBlur(): void;
|
|
788
|
+
writeValue(value: unknown): void;
|
|
789
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
790
|
+
registerOnTouched(fn: () => void): void;
|
|
791
|
+
setDisabledState(isDisabled: boolean): void;
|
|
792
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RadioComponent, never>;
|
|
793
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RadioComponent, "pecb-radio", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
type CheckboxLabelPosition = 'right' | 'left';
|
|
797
|
+
declare class CheckboxComponent implements ControlValueAccessor {
|
|
798
|
+
id: _angular_core.InputSignal<string>;
|
|
799
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
800
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
801
|
+
description: _angular_core.InputSignal<string | undefined>;
|
|
802
|
+
labelPosition: _angular_core.InputSignal<CheckboxLabelPosition>;
|
|
803
|
+
disabled: _angular_core.ModelSignal<boolean>;
|
|
804
|
+
checkedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
805
|
+
checked: _angular_core.WritableSignal<boolean>;
|
|
806
|
+
private onChange;
|
|
807
|
+
private onTouched;
|
|
808
|
+
get wrapperClasses(): string[];
|
|
809
|
+
onCheckboxChange(event: Event): void;
|
|
810
|
+
onBlur(): void;
|
|
811
|
+
writeValue(value: boolean): void;
|
|
812
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
813
|
+
registerOnTouched(fn: () => void): void;
|
|
814
|
+
setDisabledState(isDisabled: boolean): void;
|
|
815
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxComponent, never>;
|
|
816
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxComponent, "pecb-checkbox", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "checkedChange": "checkedChange"; }, never, never, true, never>;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
type ToggleLabelPosition = 'right' | 'left';
|
|
820
|
+
declare class ToggleComponent implements ControlValueAccessor {
|
|
821
|
+
id: _angular_core.InputSignal<string>;
|
|
822
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
823
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
824
|
+
description: _angular_core.InputSignal<string | undefined>;
|
|
825
|
+
labelPosition: _angular_core.InputSignal<ToggleLabelPosition>;
|
|
826
|
+
disabled: _angular_core.ModelSignal<boolean>;
|
|
827
|
+
toggleChange: _angular_core.OutputEmitterRef<boolean>;
|
|
828
|
+
checked: _angular_core.WritableSignal<boolean>;
|
|
829
|
+
private onChange;
|
|
830
|
+
private onTouched;
|
|
831
|
+
get wrapperClasses(): string[];
|
|
832
|
+
onToggleChange(event: Event): void;
|
|
833
|
+
onBlur(): void;
|
|
834
|
+
writeValue(value: boolean): void;
|
|
835
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
836
|
+
registerOnTouched(fn: () => void): void;
|
|
837
|
+
setDisabledState(isDisabled: boolean): void;
|
|
838
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToggleComponent, never>;
|
|
839
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToggleComponent, "pecb-toggle", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "toggleChange": "toggleChange"; }, never, never, true, never>;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
interface DropdownOption {
|
|
843
|
+
label: string;
|
|
844
|
+
value: unknown;
|
|
845
|
+
disabled?: boolean;
|
|
846
|
+
}
|
|
847
|
+
type DropdownSize = 'sm' | 'md' | 'lg';
|
|
848
|
+
declare class DropdownComponent implements ControlValueAccessor {
|
|
849
|
+
searchInput?: ElementRef<HTMLInputElement>;
|
|
850
|
+
private readonly elementRef;
|
|
851
|
+
id: _angular_core.InputSignal<string>;
|
|
852
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
853
|
+
size: _angular_core.InputSignal<DropdownSize>;
|
|
854
|
+
options: _angular_core.InputSignal<DropdownOption[]>;
|
|
855
|
+
multiple: _angular_core.InputSignal<boolean>;
|
|
856
|
+
searchable: _angular_core.InputSignal<boolean>;
|
|
857
|
+
maxHeight: _angular_core.InputSignal<number>;
|
|
858
|
+
disabled: _angular_core.ModelSignal<boolean>;
|
|
859
|
+
required: _angular_core.InputSignal<boolean>;
|
|
860
|
+
error: _angular_core.InputSignal<boolean>;
|
|
861
|
+
errorMessage: _angular_core.InputSignal<string | undefined>;
|
|
862
|
+
helperText: _angular_core.InputSignal<string | undefined>;
|
|
863
|
+
selectionChange: _angular_core.OutputEmitterRef<unknown>;
|
|
864
|
+
isOpen: _angular_core.WritableSignal<boolean>;
|
|
865
|
+
searchQuery: _angular_core.WritableSignal<string>;
|
|
866
|
+
selectedValues: _angular_core.WritableSignal<unknown[]>;
|
|
867
|
+
focusedIndex: _angular_core.WritableSignal<number>;
|
|
868
|
+
private onChange;
|
|
869
|
+
private onTouched;
|
|
870
|
+
get wrapperClasses(): string[];
|
|
871
|
+
get hasValue(): boolean;
|
|
872
|
+
get filteredOptions(): DropdownOption[];
|
|
873
|
+
get displayText(): string;
|
|
874
|
+
clearAll(event: MouseEvent): void;
|
|
875
|
+
toggleDropdown(): void;
|
|
876
|
+
selectOption(option: DropdownOption): void;
|
|
877
|
+
isSelected(option: DropdownOption): boolean;
|
|
878
|
+
onSearchInput(event: Event): void;
|
|
879
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
880
|
+
onDocumentClick(event: MouseEvent): void;
|
|
881
|
+
writeValue(value: unknown): void;
|
|
882
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
883
|
+
registerOnTouched(fn: () => void): void;
|
|
884
|
+
setDisabledState(isDisabled: boolean): void;
|
|
885
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownComponent, never>;
|
|
886
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownComponent, "pecb-dropdown", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
type RightModalSize = 'sm' | 'md' | 'lg';
|
|
890
|
+
declare class RightModalComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
891
|
+
id: _angular_core.InputSignal<string>;
|
|
892
|
+
isOpen: _angular_core.InputSignal<boolean>;
|
|
893
|
+
size: _angular_core.InputSignal<RightModalSize>;
|
|
894
|
+
closeOnBackdropClick: _angular_core.InputSignal<boolean>;
|
|
895
|
+
closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
896
|
+
showCloseButton: _angular_core.InputSignal<boolean>;
|
|
897
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
898
|
+
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
899
|
+
ariaDescribedBy: _angular_core.InputSignal<string | undefined>;
|
|
900
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
901
|
+
opened: _angular_core.OutputEmitterRef<void>;
|
|
902
|
+
modalPanel: ElementRef<HTMLElement>;
|
|
903
|
+
private cleanupFocusTrap;
|
|
904
|
+
private cleanupBodyScroll;
|
|
905
|
+
private previousActiveElement;
|
|
906
|
+
ngOnInit(): void;
|
|
907
|
+
ngAfterViewInit(): void;
|
|
908
|
+
ngOnDestroy(): void;
|
|
909
|
+
get modalClasses(): string[];
|
|
910
|
+
get panelClasses(): string[];
|
|
911
|
+
onBackdropClick(event: MouseEvent): void;
|
|
912
|
+
onKeydown(event: KeyboardEvent): void;
|
|
913
|
+
close(): void;
|
|
914
|
+
private onOpen;
|
|
915
|
+
private setupFocusTrap;
|
|
916
|
+
private cleanup;
|
|
917
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RightModalComponent, never>;
|
|
918
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RightModalComponent, "pecb-right-modal", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "opened": "opened"; }, never, ["[pecbRightModalHeader]", "[pecbRightModalContent]", "*", "[pecbRightModalFooter]"], true, never>;
|
|
919
|
+
}
|
|
920
|
+
declare class RightModalHeaderDirective {
|
|
921
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RightModalHeaderDirective, never>;
|
|
922
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RightModalHeaderDirective, "[pecbRightModalHeader]", never, {}, {}, never, never, true, never>;
|
|
923
|
+
}
|
|
924
|
+
declare class RightModalContentDirective {
|
|
925
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RightModalContentDirective, never>;
|
|
926
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RightModalContentDirective, "[pecbRightModalContent]", never, {}, {}, never, never, true, never>;
|
|
927
|
+
}
|
|
928
|
+
declare class RightModalFooterDirective {
|
|
929
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RightModalFooterDirective, never>;
|
|
930
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RightModalFooterDirective, "[pecbRightModalFooter]", never, {}, {}, never, never, true, never>;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
interface SidebarMenuItem {
|
|
934
|
+
id: string;
|
|
935
|
+
label: string;
|
|
936
|
+
icon?: string;
|
|
937
|
+
route?: string;
|
|
938
|
+
active?: boolean;
|
|
939
|
+
children?: SidebarMenuItem[];
|
|
940
|
+
expanded?: boolean;
|
|
941
|
+
}
|
|
942
|
+
interface SidebarSection {
|
|
943
|
+
id: string;
|
|
944
|
+
title?: string;
|
|
945
|
+
items: SidebarMenuItem[];
|
|
946
|
+
}
|
|
947
|
+
declare class SidebarComponent {
|
|
948
|
+
private readonly sanitizer;
|
|
949
|
+
sections: _angular_core.InputSignal<SidebarSection[]>;
|
|
950
|
+
showHeader: _angular_core.InputSignal<boolean>;
|
|
951
|
+
logoSrc: _angular_core.InputSignal<string | undefined>;
|
|
952
|
+
sidebarLogo: _angular_core.InputSignal<string | undefined>;
|
|
953
|
+
collapsedLogo: _angular_core.InputSignal<string | undefined>;
|
|
954
|
+
showFooter: _angular_core.InputSignal<boolean>;
|
|
955
|
+
collapsed: _angular_core.ModelSignal<boolean>;
|
|
956
|
+
itemClick: _angular_core.OutputEmitterRef<SidebarMenuItem>;
|
|
957
|
+
collapseChange: _angular_core.OutputEmitterRef<boolean>;
|
|
958
|
+
activePopupItem: _angular_core.WritableSignal<SidebarMenuItem | null>;
|
|
959
|
+
popupTopPosition: _angular_core.WritableSignal<number>;
|
|
960
|
+
onItemClick(item: SidebarMenuItem, event: Event): void;
|
|
961
|
+
closePopup(): void;
|
|
962
|
+
onPopupItemClick(child: SidebarMenuItem, event: Event): void;
|
|
963
|
+
toggleCollapse(): void;
|
|
964
|
+
getSafeIcon(icon: string): SafeHtml;
|
|
965
|
+
trackBySection(_index: number, section: SidebarSection): string;
|
|
966
|
+
trackByItem(_index: number, item: SidebarMenuItem): string;
|
|
967
|
+
hasActiveDescendant(item: SidebarMenuItem): boolean;
|
|
968
|
+
getItemClasses(item: SidebarMenuItem, isChild?: boolean, isNested?: boolean): string[];
|
|
969
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
970
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarComponent, "pecb-sidebar", never, { "sections": { "alias": "sections"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "logoSrc": { "alias": "logoSrc"; "required": false; "isSignal": true; }; "sidebarLogo": { "alias": "sidebarLogo"; "required": false; "isSignal": true; }; "collapsedLogo": { "alias": "collapsedLogo"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "itemClick": "itemClick"; "collapseChange": "collapseChange"; }, never, ["[sidebar-header]", "[sidebar-footer]"], true, never>;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
type ConfirmationIconType = 'success' | 'warning' | 'error' | 'info';
|
|
974
|
+
declare class ConfirmationComponent implements OnDestroy, AfterViewInit {
|
|
975
|
+
id: _angular_core.InputSignal<string>;
|
|
976
|
+
/**
|
|
977
|
+
* Whether the dialog is visible. Manages its own state internally —
|
|
978
|
+
* no consumer binding required. Supports [(isOpen)] for controlled mode.
|
|
979
|
+
*/
|
|
980
|
+
isOpen: _angular_core.ModelSignal<boolean>;
|
|
981
|
+
title: _angular_core.InputSignal<string>;
|
|
982
|
+
message: _angular_core.InputSignal<string>;
|
|
983
|
+
confirmText: _angular_core.InputSignal<string>;
|
|
984
|
+
cancelText: _angular_core.InputSignal<string>;
|
|
985
|
+
iconType: _angular_core.InputSignal<ConfirmationIconType>;
|
|
986
|
+
showCloseButton: _angular_core.InputSignal<boolean>;
|
|
987
|
+
closeOnBackdropClick: _angular_core.InputSignal<boolean>;
|
|
988
|
+
closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
989
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
990
|
+
ariaDescribedBy: _angular_core.InputSignal<string | undefined>;
|
|
991
|
+
confirmed: _angular_core.OutputEmitterRef<void>;
|
|
992
|
+
cancelled: _angular_core.OutputEmitterRef<void>;
|
|
993
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
994
|
+
dialogPanel: ElementRef<HTMLElement>;
|
|
995
|
+
private cleanupFocusTrap;
|
|
996
|
+
private cleanupBodyScroll;
|
|
997
|
+
private previousActiveElement;
|
|
998
|
+
constructor();
|
|
999
|
+
ngAfterViewInit(): void;
|
|
1000
|
+
ngOnDestroy(): void;
|
|
1001
|
+
get dialogClasses(): string[];
|
|
1002
|
+
get iconContainerClass(): string;
|
|
1003
|
+
get titleId(): string;
|
|
1004
|
+
get messageId(): string;
|
|
1005
|
+
onBackdropClick(event: MouseEvent): void;
|
|
1006
|
+
onKeydown(event: KeyboardEvent): void;
|
|
1007
|
+
onConfirm(): void;
|
|
1008
|
+
onCancel(): void;
|
|
1009
|
+
close(): void;
|
|
1010
|
+
private onOpen;
|
|
1011
|
+
private setupFocusTrap;
|
|
1012
|
+
private cleanup;
|
|
1013
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmationComponent, never>;
|
|
1014
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmationComponent, "pecb-confirmation", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "confirmText": { "alias": "confirmText"; "required": false; "isSignal": true; }; "cancelText": { "alias": "cancelText"; "required": false; "isSignal": true; }; "iconType": { "alias": "iconType"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; "confirmed": "confirmed"; "cancelled": "cancelled"; "closed": "closed"; }, never, never, true, never>;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
declare class BottomSheetComponent implements OnDestroy, AfterViewInit {
|
|
1018
|
+
id: _angular_core.InputSignal<string>;
|
|
1019
|
+
/**
|
|
1020
|
+
* Whether the sheet is visible. Manages its own state internally —
|
|
1021
|
+
* no consumer binding required. Supports [(isOpen)] for controlled mode.
|
|
1022
|
+
*/
|
|
1023
|
+
isOpen: _angular_core.ModelSignal<boolean>;
|
|
1024
|
+
title: _angular_core.InputSignal<string>;
|
|
1025
|
+
primaryText: _angular_core.InputSignal<string>;
|
|
1026
|
+
secondaryText: _angular_core.InputSignal<string>;
|
|
1027
|
+
showCloseButton: _angular_core.InputSignal<boolean>;
|
|
1028
|
+
closeOnBackdropClick: _angular_core.InputSignal<boolean>;
|
|
1029
|
+
closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
1030
|
+
primaryClicked: _angular_core.OutputEmitterRef<void>;
|
|
1031
|
+
secondaryClicked: _angular_core.OutputEmitterRef<void>;
|
|
1032
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
1033
|
+
sheetPanel: ElementRef<HTMLElement>;
|
|
1034
|
+
private cleanupFocusTrap;
|
|
1035
|
+
private cleanupBodyScroll;
|
|
1036
|
+
private previousActiveElement;
|
|
1037
|
+
constructor();
|
|
1038
|
+
get titleId(): string;
|
|
1039
|
+
ngAfterViewInit(): void;
|
|
1040
|
+
ngOnDestroy(): void;
|
|
1041
|
+
onBackdropClick(event: MouseEvent): void;
|
|
1042
|
+
onKeydown(event: KeyboardEvent): void;
|
|
1043
|
+
close(): void;
|
|
1044
|
+
private onOpen;
|
|
1045
|
+
private setupFocusTrap;
|
|
1046
|
+
private cleanup;
|
|
1047
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BottomSheetComponent, never>;
|
|
1048
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BottomSheetComponent, "pecb-bottom-sheet", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "primaryText": { "alias": "primaryText"; "required": false; "isSignal": true; }; "secondaryText": { "alias": "secondaryText"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; "primaryClicked": "primaryClicked"; "secondaryClicked": "secondaryClicked"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
type QuizType = 'Multiple Choice' | 'True/False' | 'Scenario' | 'Essay' | string;
|
|
1052
|
+
type AccordionVariant = 'basic' | 'actions';
|
|
1053
|
+
/**
|
|
1054
|
+
* Large accordion item — used for exam questions / evaluation sections.
|
|
1055
|
+
*
|
|
1056
|
+
* Works standalone with no consumer state management needed:
|
|
1057
|
+
* @example
|
|
1058
|
+
* <pecb-accordion-item [number]="1" title="Question title">
|
|
1059
|
+
* Body content goes here.
|
|
1060
|
+
* </pecb-accordion-item>
|
|
1061
|
+
*
|
|
1062
|
+
* Supports two-way binding for controlled state:
|
|
1063
|
+
* @example
|
|
1064
|
+
* <pecb-accordion-item [(isOpen)]="expanded" (editClicked)="onEdit()" (deleteClicked)="onDelete()">
|
|
1065
|
+
* Body content goes here.
|
|
1066
|
+
* </pecb-accordion-item>
|
|
1067
|
+
*/
|
|
1068
|
+
declare class AccordionItemComponent {
|
|
1069
|
+
/** Variant: 'basic' keeps full radius when open, 'actions' changes radius and adds body background */
|
|
1070
|
+
variant: _angular_core.InputSignal<AccordionVariant>;
|
|
1071
|
+
/** Number displayed in the left badge */
|
|
1072
|
+
number: _angular_core.InputSignal<number>;
|
|
1073
|
+
/** Show/hide the number badge */
|
|
1074
|
+
showNumber: _angular_core.InputSignal<boolean>;
|
|
1075
|
+
/** Small subtitle text (12px, muted colour) */
|
|
1076
|
+
label: _angular_core.InputSignal<string>;
|
|
1077
|
+
/** Primary title text (13px, medium weight) */
|
|
1078
|
+
title: _angular_core.InputSignal<string>;
|
|
1079
|
+
/** Quiz type badge — 'Multiple Choice' | 'True/False' | 'Scenario' | 'Essay'. Leave empty to hide. */
|
|
1080
|
+
quizType: _angular_core.InputSignal<string>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Whether the item is expanded. Manages its own state internally —
|
|
1083
|
+
* no consumer binding required. Supports [(isOpen)] for controlled mode.
|
|
1084
|
+
*/
|
|
1085
|
+
isOpen: _angular_core.ModelSignal<boolean>;
|
|
1086
|
+
/** Show/hide the move icon button */
|
|
1087
|
+
showMove: _angular_core.InputSignal<boolean>;
|
|
1088
|
+
/** Show/hide the edit icon button */
|
|
1089
|
+
showEdit: _angular_core.InputSignal<boolean>;
|
|
1090
|
+
/** Show/hide the expand/collapse chevron button */
|
|
1091
|
+
showToggleBtn: _angular_core.InputSignal<boolean>;
|
|
1092
|
+
/** Show/hide the delete icon button */
|
|
1093
|
+
showDelete: _angular_core.InputSignal<boolean>;
|
|
1094
|
+
moveClicked: _angular_core.OutputEmitterRef<void>;
|
|
1095
|
+
editClicked: _angular_core.OutputEmitterRef<void>;
|
|
1096
|
+
deleteClicked: _angular_core.OutputEmitterRef<void>;
|
|
1097
|
+
toggle(): void;
|
|
1098
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
|
|
1099
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionItemComponent, "pecb-accordion-item", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "number": { "alias": "number"; "required": false; "isSignal": true; }; "showNumber": { "alias": "showNumber"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "quizType": { "alias": "quizType"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "showMove": { "alias": "showMove"; "required": false; "isSignal": true; }; "showEdit": { "alias": "showEdit"; "required": false; "isSignal": true; }; "showToggleBtn": { "alias": "showToggleBtn"; "required": false; "isSignal": true; }; "showDelete": { "alias": "showDelete"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; "moveClicked": "moveClicked"; "editClicked": "editClicked"; "deleteClicked": "deleteClicked"; }, never, ["*"], true, never>;
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Small accordion item — used for language / domain list rows.
|
|
1103
|
+
*
|
|
1104
|
+
* Works standalone with no consumer state management needed:
|
|
1105
|
+
* @example
|
|
1106
|
+
* <pecb-accordion-small label="English" parentId="519456">
|
|
1107
|
+
* <span pecbLeading>🇬🇧</span>
|
|
1108
|
+
* Body content here.
|
|
1109
|
+
* </pecb-accordion-small>
|
|
1110
|
+
*
|
|
1111
|
+
* Supports two-way binding for controlled state:
|
|
1112
|
+
* @example
|
|
1113
|
+
* <pecb-accordion-small label="English" [(isActive)]="active">
|
|
1114
|
+
* <span pecbLeading>🇬🇧</span>
|
|
1115
|
+
* </pecb-accordion-small>
|
|
1116
|
+
*/
|
|
1117
|
+
declare class AccordionSmallComponent {
|
|
1118
|
+
/** Main label text */
|
|
1119
|
+
label: _angular_core.InputSignal<string>;
|
|
1120
|
+
/** Optional metadata value displayed next to the prefix — leave empty to hide */
|
|
1121
|
+
parentId: _angular_core.InputSignal<string>;
|
|
1122
|
+
/** Prefix text shown before the parentId value */
|
|
1123
|
+
metaLabel: _angular_core.InputSignal<string>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Whether the item is expanded. Manages its own state internally —
|
|
1126
|
+
* no consumer binding required. Supports [(isActive)] for controlled mode.
|
|
1127
|
+
*/
|
|
1128
|
+
isActive: _angular_core.ModelSignal<boolean>;
|
|
1129
|
+
/** Show/hide the toggle switch */
|
|
1130
|
+
showToggle: _angular_core.InputSignal<boolean>;
|
|
1131
|
+
/** Two-way bindable toggle switch value. Supports [(toggleValue)]. */
|
|
1132
|
+
toggleValue: _angular_core.ModelSignal<boolean>;
|
|
1133
|
+
/** Show/hide the download icon */
|
|
1134
|
+
showDownload: _angular_core.InputSignal<boolean>;
|
|
1135
|
+
/** Show/hide the save icon */
|
|
1136
|
+
showSave: _angular_core.InputSignal<boolean>;
|
|
1137
|
+
/** Show/hide the edit icon */
|
|
1138
|
+
showEdit: _angular_core.InputSignal<boolean>;
|
|
1139
|
+
/** Show/hide the delete icon */
|
|
1140
|
+
showDelete: _angular_core.InputSignal<boolean>;
|
|
1141
|
+
/** Show/hide the move icon */
|
|
1142
|
+
showMove: _angular_core.InputSignal<boolean>;
|
|
1143
|
+
downloadClicked: _angular_core.OutputEmitterRef<void>;
|
|
1144
|
+
saveClicked: _angular_core.OutputEmitterRef<void>;
|
|
1145
|
+
editClicked: _angular_core.OutputEmitterRef<void>;
|
|
1146
|
+
deleteClicked: _angular_core.OutputEmitterRef<void>;
|
|
1147
|
+
moveClicked: _angular_core.OutputEmitterRef<void>;
|
|
1148
|
+
onHeaderClick(): void;
|
|
1149
|
+
/** ngModel bridge for the toggle */
|
|
1150
|
+
get toggleChecked(): boolean;
|
|
1151
|
+
set toggleChecked(value: boolean);
|
|
1152
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionSmallComponent, never>;
|
|
1153
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionSmallComponent, "pecb-accordion-small", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "parentId": { "alias": "parentId"; "required": false; "isSignal": true; }; "metaLabel": { "alias": "metaLabel"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "showToggle": { "alias": "showToggle"; "required": false; "isSignal": true; }; "toggleValue": { "alias": "toggleValue"; "required": false; "isSignal": true; }; "showDownload": { "alias": "showDownload"; "required": false; "isSignal": true; }; "showSave": { "alias": "showSave"; "required": false; "isSignal": true; }; "showEdit": { "alias": "showEdit"; "required": false; "isSignal": true; }; "showDelete": { "alias": "showDelete"; "required": false; "isSignal": true; }; "showMove": { "alias": "showMove"; "required": false; "isSignal": true; }; }, { "isActive": "isActiveChange"; "toggleValue": "toggleValueChange"; "downloadClicked": "downloadClicked"; "saveClicked": "saveClicked"; "editClicked": "editClicked"; "deleteClicked": "deleteClicked"; "moveClicked": "moveClicked"; }, never, ["[pecbLeading]", "*"], true, never>;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
type ButtonGroupItemPosition = 'first' | 'middle' | 'last' | 'more';
|
|
1157
|
+
type ButtonGroupIconMode = 'both' | 'leading' | 'trailing' | 'none';
|
|
1158
|
+
declare class ButtonGroupItemComponent {
|
|
1159
|
+
private sanitizer;
|
|
1160
|
+
label: _angular_core.InputSignal<string>;
|
|
1161
|
+
position: _angular_core.InputSignal<ButtonGroupItemPosition>;
|
|
1162
|
+
/** Custom SVG string for the leading icon. When set, overrides the default chevron. */
|
|
1163
|
+
leadingIconSvg: _angular_core.InputSignal<string>;
|
|
1164
|
+
/** Custom SVG string for the trailing icon. When set, overrides the default chevron. */
|
|
1165
|
+
trailingIconSvg: _angular_core.InputSignal<string>;
|
|
1166
|
+
safeLeadingIconSvg: _angular_core.Signal<_angular_platform_browser.SafeHtml>;
|
|
1167
|
+
safeTrailingIconSvg: _angular_core.Signal<_angular_platform_browser.SafeHtml>;
|
|
1168
|
+
/**
|
|
1169
|
+
* Whether this item is selected/active. Manages its own state internally —
|
|
1170
|
+
* no consumer binding required. Supports [(selected)] for controlled mode.
|
|
1171
|
+
*/
|
|
1172
|
+
selected: _angular_core.ModelSignal<boolean>;
|
|
1173
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
1174
|
+
iconMode: _angular_core.InputSignal<ButtonGroupIconMode>;
|
|
1175
|
+
clicked: _angular_core.OutputEmitterRef<void>;
|
|
1176
|
+
onClick(): void;
|
|
1177
|
+
get hostClasses(): string;
|
|
1178
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonGroupItemComponent, never>;
|
|
1179
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonGroupItemComponent, "pecb-button-group-item", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "leadingIconSvg": { "alias": "leadingIconSvg"; "required": false; "isSignal": true; }; "trailingIconSvg": { "alias": "trailingIconSvg"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "iconMode": { "alias": "iconMode"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "clicked": "clicked"; }, never, never, true, never>;
|
|
1180
|
+
}
|
|
1181
|
+
declare class ButtonGroupComponent {
|
|
1182
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
1183
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonGroupComponent, never>;
|
|
1184
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonGroupComponent, "pecb-button-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
type TooltipPointerPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left-top' | 'left-center' | 'left-bottom' | 'right-top' | 'right-center' | 'right-bottom';
|
|
1188
|
+
type TooltipTheme = 'dark' | 'light';
|
|
1189
|
+
declare class TooltipComponent {
|
|
1190
|
+
title: _angular_core.InputSignal<string>;
|
|
1191
|
+
message: _angular_core.InputSignal<string>;
|
|
1192
|
+
pointerPosition: _angular_core.InputSignal<TooltipPointerPosition>;
|
|
1193
|
+
theme: _angular_core.InputSignal<TooltipTheme>;
|
|
1194
|
+
primaryCta: _angular_core.InputSignal<string | undefined>;
|
|
1195
|
+
secondaryCta: _angular_core.InputSignal<string | undefined>;
|
|
1196
|
+
showClose: _angular_core.InputSignal<boolean>;
|
|
1197
|
+
/**
|
|
1198
|
+
* Whether the tooltip is visible. Manages its own state internally —
|
|
1199
|
+
* no consumer binding required. Supports [(visible)] for controlled mode.
|
|
1200
|
+
*/
|
|
1201
|
+
visible: _angular_core.ModelSignal<boolean>;
|
|
1202
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
1203
|
+
primaryCtaClick: _angular_core.OutputEmitterRef<void>;
|
|
1204
|
+
secondaryCtaClick: _angular_core.OutputEmitterRef<void>;
|
|
1205
|
+
close(): void;
|
|
1206
|
+
get hasButtons(): boolean;
|
|
1207
|
+
get pointerSide(): 'top' | 'bottom' | 'left' | 'right';
|
|
1208
|
+
/** SVG fill for the outer (border) triangle layer */
|
|
1209
|
+
get ptrBorderFill(): string;
|
|
1210
|
+
/** SVG fill for the inner (body) triangle layer */
|
|
1211
|
+
get ptrBodyFill(): string;
|
|
1212
|
+
get hostClasses(): string;
|
|
1213
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
1214
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipComponent, "pecb-tooltip", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "pointerPosition": { "alias": "pointerPosition"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "primaryCta": { "alias": "primaryCta"; "required": false; "isSignal": true; }; "secondaryCta": { "alias": "secondaryCta"; "required": false; "isSignal": true; }; "showClose": { "alias": "showClose"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "closed": "closed"; "primaryCtaClick": "primaryCtaClick"; "secondaryCtaClick": "secondaryCtaClick"; }, never, never, true, never>;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
declare class TooltipDirective implements OnDestroy {
|
|
1218
|
+
/** Tooltip body message */
|
|
1219
|
+
pecbTooltip: _angular_core.InputSignal<string>;
|
|
1220
|
+
/** Optional bold title above the message */
|
|
1221
|
+
tooltipTitle: _angular_core.InputSignal<string>;
|
|
1222
|
+
/** dark (default) or light */
|
|
1223
|
+
tooltipTheme: _angular_core.InputSignal<TooltipTheme>;
|
|
1224
|
+
/** Where the pointer arrow appears relative to the tooltip body */
|
|
1225
|
+
tooltipPosition: _angular_core.InputSignal<TooltipPointerPosition>;
|
|
1226
|
+
/** hover (default) or click */
|
|
1227
|
+
tooltipTrigger: _angular_core.InputSignal<"click" | "hover">;
|
|
1228
|
+
/** Optional primary CTA label (red link) */
|
|
1229
|
+
tooltipPrimaryCta: _angular_core.InputSignal<string>;
|
|
1230
|
+
/** Optional secondary CTA label (muted link) */
|
|
1231
|
+
tooltipSecondaryCta: _angular_core.InputSignal<string>;
|
|
1232
|
+
/** Emits when the primary CTA is clicked */
|
|
1233
|
+
tooltipPrimaryCtaClick: _angular_core.OutputEmitterRef<void>;
|
|
1234
|
+
/** Emits when the secondary CTA is clicked */
|
|
1235
|
+
tooltipSecondaryCtaClick: _angular_core.OutputEmitterRef<void>;
|
|
1236
|
+
private el;
|
|
1237
|
+
private appRef;
|
|
1238
|
+
private injector;
|
|
1239
|
+
private ref?;
|
|
1240
|
+
onMouseEnter(): void;
|
|
1241
|
+
onMouseLeave(): void;
|
|
1242
|
+
onClick(): void;
|
|
1243
|
+
ngOnDestroy(): void;
|
|
1244
|
+
/** Flip the side so the arrow points back toward the trigger element. */
|
|
1245
|
+
private invertedPointerPosition;
|
|
1246
|
+
private show;
|
|
1247
|
+
private hide;
|
|
1248
|
+
private position;
|
|
1249
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
1250
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TooltipDirective, "[pecbTooltip]", never, { "pecbTooltip": { "alias": "pecbTooltip"; "required": false; "isSignal": true; }; "tooltipTitle": { "alias": "tooltipTitle"; "required": false; "isSignal": true; }; "tooltipTheme": { "alias": "tooltipTheme"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; "tooltipTrigger": { "alias": "tooltipTrigger"; "required": false; "isSignal": true; }; "tooltipPrimaryCta": { "alias": "tooltipPrimaryCta"; "required": false; "isSignal": true; }; "tooltipSecondaryCta": { "alias": "tooltipSecondaryCta"; "required": false; "isSignal": true; }; }, { "tooltipPrimaryCtaClick": "tooltipPrimaryCtaClick"; "tooltipSecondaryCtaClick": "tooltipSecondaryCtaClick"; }, never, never, true, never>;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
type MessageItemStatus = 'default' | 'read' | 'typing' | 'unread' | 'warning';
|
|
1254
|
+
type MessageBubbleType = 'text' | 'document' | 'audio' | 'image';
|
|
1255
|
+
type MessageDirection = 'incoming' | 'outgoing';
|
|
1256
|
+
declare class MessageItemComponent {
|
|
1257
|
+
/** Avatar image URL — if empty, falls back to initials */
|
|
1258
|
+
avatarSrc: _angular_core.InputSignal<string>;
|
|
1259
|
+
/** Explicit initials override — auto-derived from name when empty */
|
|
1260
|
+
avatarInitials: _angular_core.InputSignal<string>;
|
|
1261
|
+
/** Sender / contact display name */
|
|
1262
|
+
name: _angular_core.InputSignal<string>;
|
|
1263
|
+
/** Timestamp string, e.g. "12:30" */
|
|
1264
|
+
time: _angular_core.InputSignal<string>;
|
|
1265
|
+
/** Message preview text shown below the name */
|
|
1266
|
+
preview: _angular_core.InputSignal<string>;
|
|
1267
|
+
/** Visual state of the list item */
|
|
1268
|
+
status: _angular_core.InputSignal<MessageItemStatus>;
|
|
1269
|
+
/** Unread badge count — shown when status is "unread" */
|
|
1270
|
+
unreadCount: _angular_core.InputSignal<number>;
|
|
1271
|
+
/** Whether this item is currently selected / active */
|
|
1272
|
+
selected: _angular_core.InputSignal<boolean>;
|
|
1273
|
+
/** Emitted when the item is clicked */
|
|
1274
|
+
itemClicked: _angular_core.OutputEmitterRef<void>;
|
|
1275
|
+
initials: _angular_core.Signal<string>;
|
|
1276
|
+
get hostClasses(): string;
|
|
1277
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageItemComponent, never>;
|
|
1278
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageItemComponent, "pecb-message-item", never, { "avatarSrc": { "alias": "avatarSrc"; "required": false; "isSignal": true; }; "avatarInitials": { "alias": "avatarInitials"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "time": { "alias": "time"; "required": false; "isSignal": true; }; "preview": { "alias": "preview"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "unreadCount": { "alias": "unreadCount"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "itemClicked": "itemClicked"; }, never, never, true, never>;
|
|
1279
|
+
}
|
|
1280
|
+
declare class MessageBubbleComponent {
|
|
1281
|
+
/** Visual type of the message */
|
|
1282
|
+
type: _angular_core.InputSignal<MessageBubbleType>;
|
|
1283
|
+
/** Whether the message was sent by the current user or received */
|
|
1284
|
+
direction: _angular_core.InputSignal<MessageDirection>;
|
|
1285
|
+
/** Single text message string — alias for passing one item via messages */
|
|
1286
|
+
text: _angular_core.InputSignal<string>;
|
|
1287
|
+
/**
|
|
1288
|
+
* Array of text strings to render as stacked bubbles.
|
|
1289
|
+
* When provided, takes precedence over `text`.
|
|
1290
|
+
*/
|
|
1291
|
+
messages: _angular_core.InputSignal<string[]>;
|
|
1292
|
+
/** Sender display name (shown for incoming) */
|
|
1293
|
+
senderName: _angular_core.InputSignal<string>;
|
|
1294
|
+
/** Timestamp string, e.g. "4:59 PM" */
|
|
1295
|
+
time: _angular_core.InputSignal<string>;
|
|
1296
|
+
/** Show read-receipt checkmark below the bubble (outgoing only) */
|
|
1297
|
+
showReadReceipt: _angular_core.InputSignal<boolean>;
|
|
1298
|
+
/** Avatar image URL */
|
|
1299
|
+
avatarSrc: _angular_core.InputSignal<string>;
|
|
1300
|
+
/** Explicit initials override — auto-derived from senderName when empty */
|
|
1301
|
+
avatarInitials: _angular_core.InputSignal<string>;
|
|
1302
|
+
/** File name, e.g. "Filename.pdf" */
|
|
1303
|
+
fileName: _angular_core.InputSignal<string>;
|
|
1304
|
+
/** File metadata string, e.g. "1 page • PDF • 4MB" */
|
|
1305
|
+
fileMeta: _angular_core.InputSignal<string>;
|
|
1306
|
+
/** Thumbnail image URL for document / image types */
|
|
1307
|
+
thumbnailSrc: _angular_core.InputSignal<string>;
|
|
1308
|
+
/** Audio duration string, e.g. "0:30" */
|
|
1309
|
+
audioDuration: _angular_core.InputSignal<string>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Custom waveform bar heights (values 1–20).
|
|
1312
|
+
* Defaults to a built-in decorative pattern when not supplied.
|
|
1313
|
+
*/
|
|
1314
|
+
waveformData: _angular_core.InputSignal<number[]>;
|
|
1315
|
+
/** Image URL for image-type messages */
|
|
1316
|
+
imageSrc: _angular_core.InputSignal<string>;
|
|
1317
|
+
/** Alt text for image */
|
|
1318
|
+
imageAlt: _angular_core.InputSignal<string>;
|
|
1319
|
+
/** Emitted when the download button is clicked (document type, incoming) */
|
|
1320
|
+
downloadClicked: _angular_core.OutputEmitterRef<void>;
|
|
1321
|
+
/** Emitted when the play button is clicked (audio type) */
|
|
1322
|
+
playClicked: _angular_core.OutputEmitterRef<void>;
|
|
1323
|
+
initials: _angular_core.Signal<string>;
|
|
1324
|
+
displayMessages: _angular_core.Signal<string[]>;
|
|
1325
|
+
waveformBars: _angular_core.Signal<number[]>;
|
|
1326
|
+
get hostClasses(): string;
|
|
1327
|
+
get senderLabel(): string;
|
|
1328
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageBubbleComponent, never>;
|
|
1329
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageBubbleComponent, "pecb-message-bubble", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "senderName": { "alias": "senderName"; "required": false; "isSignal": true; }; "time": { "alias": "time"; "required": false; "isSignal": true; }; "showReadReceipt": { "alias": "showReadReceipt"; "required": false; "isSignal": true; }; "avatarSrc": { "alias": "avatarSrc"; "required": false; "isSignal": true; }; "avatarInitials": { "alias": "avatarInitials"; "required": false; "isSignal": true; }; "fileName": { "alias": "fileName"; "required": false; "isSignal": true; }; "fileMeta": { "alias": "fileMeta"; "required": false; "isSignal": true; }; "thumbnailSrc": { "alias": "thumbnailSrc"; "required": false; "isSignal": true; }; "audioDuration": { "alias": "audioDuration"; "required": false; "isSignal": true; }; "waveformData": { "alias": "waveformData"; "required": false; "isSignal": true; }; "imageSrc": { "alias": "imageSrc"; "required": false; "isSignal": true; }; "imageAlt": { "alias": "imageAlt"; "required": false; "isSignal": true; }; }, { "downloadClicked": "downloadClicked"; "playClicked": "playClicked"; }, never, never, true, never>;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
declare class FullscreenModalContentDirective {
|
|
1333
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FullscreenModalContentDirective, never>;
|
|
1334
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FullscreenModalContentDirective, "[pecbFullscreenModalContent]", never, {}, {}, never, never, true, never>;
|
|
1335
|
+
}
|
|
1336
|
+
declare class FullscreenModalFooterDirective {
|
|
1337
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FullscreenModalFooterDirective, never>;
|
|
1338
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FullscreenModalFooterDirective, "[pecbFullscreenModalFooter]", never, {}, {}, never, never, true, never>;
|
|
1339
|
+
}
|
|
1340
|
+
declare class FullscreenModalComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
1341
|
+
/** Unique id forwarded to the dialog element */
|
|
1342
|
+
id: _angular_core.InputSignal<string>;
|
|
1343
|
+
/** Controls visibility */
|
|
1344
|
+
isOpen: _angular_core.ModelSignal<boolean>;
|
|
1345
|
+
/** Title rendered in the modal header */
|
|
1346
|
+
title: _angular_core.InputSignal<string>;
|
|
1347
|
+
/** Show or hide the built-in close (×) button */
|
|
1348
|
+
showCloseButton: _angular_core.InputSignal<boolean>;
|
|
1349
|
+
/** Close modal when clicking the backdrop */
|
|
1350
|
+
closeOnBackdropClick: _angular_core.InputSignal<boolean>;
|
|
1351
|
+
/** Close modal when pressing Escape */
|
|
1352
|
+
closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
1353
|
+
/** Accessible label for the dialog (used when no visible title exists) */
|
|
1354
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
1355
|
+
/** ID of the element that labels this dialog */
|
|
1356
|
+
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
1357
|
+
/** ID of the element that describes this dialog */
|
|
1358
|
+
ariaDescribedBy: _angular_core.InputSignal<string | undefined>;
|
|
1359
|
+
/** Emitted when the modal has been closed */
|
|
1360
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
1361
|
+
/** Emitted when the modal has been opened */
|
|
1362
|
+
opened: _angular_core.OutputEmitterRef<void>;
|
|
1363
|
+
modalPanel: ElementRef<HTMLElement>;
|
|
1364
|
+
private cleanupFocusTrap;
|
|
1365
|
+
private cleanupBodyScroll;
|
|
1366
|
+
private previousActiveElement;
|
|
1367
|
+
ngOnInit(): void;
|
|
1368
|
+
ngAfterViewInit(): void;
|
|
1369
|
+
ngOnDestroy(): void;
|
|
1370
|
+
onBackdropClick(event: MouseEvent): void;
|
|
1371
|
+
onKeydown(event: KeyboardEvent): void;
|
|
1372
|
+
close(): void;
|
|
1373
|
+
/** Generated title id used for aria-labelledby when no override is given */
|
|
1374
|
+
get titleId(): string;
|
|
1375
|
+
get resolvedLabelledBy(): string | undefined;
|
|
1376
|
+
private onOpen;
|
|
1377
|
+
private setupFocusTrap;
|
|
1378
|
+
private cleanup;
|
|
1379
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FullscreenModalComponent, never>;
|
|
1380
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FullscreenModalComponent, "pecb-fullscreen-modal", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; "closed": "closed"; "opened": "opened"; }, never, ["[pecbFullscreenModalHeader]", "[pecbFullscreenModalContent]", "*", "[pecbFullscreenModalFooter]"], true, never>;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
type StepperType = 'basic' | 'dot' | 'custom-icon' | 'navigation' | 'inline';
|
|
1384
|
+
type StepperSize = 'sm' | 'md';
|
|
1385
|
+
type StepperDirection = 'horizontal' | 'vertical';
|
|
1386
|
+
type StepState = 'finish' | 'process' | 'progress' | 'wait' | 'error';
|
|
1387
|
+
type StepperTailStyle = 'default' | 'bold';
|
|
1388
|
+
type StepOrder = 'first' | 'center' | 'last' | 'only';
|
|
1389
|
+
interface StepItem {
|
|
1390
|
+
label: string;
|
|
1391
|
+
description?: string;
|
|
1392
|
+
icon?: string;
|
|
1393
|
+
time?: string;
|
|
1394
|
+
state?: StepState;
|
|
1395
|
+
}
|
|
1396
|
+
declare class StepperComponent {
|
|
1397
|
+
id: _angular_core.InputSignal<string>;
|
|
1398
|
+
type: _angular_core.InputSignal<StepperType>;
|
|
1399
|
+
size: _angular_core.InputSignal<StepperSize>;
|
|
1400
|
+
direction: _angular_core.InputSignal<StepperDirection>;
|
|
1401
|
+
tailStyle: _angular_core.InputSignal<StepperTailStyle>;
|
|
1402
|
+
steps: _angular_core.InputSignal<StepItem[]>;
|
|
1403
|
+
currentStep: _angular_core.InputSignal<number>;
|
|
1404
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1405
|
+
stepClicked: _angular_core.OutputEmitterRef<number>;
|
|
1406
|
+
resolvedSteps: _angular_core.Signal<{
|
|
1407
|
+
index: number;
|
|
1408
|
+
resolvedState: StepState;
|
|
1409
|
+
order: StepOrder;
|
|
1410
|
+
label: string;
|
|
1411
|
+
description?: string;
|
|
1412
|
+
icon?: string;
|
|
1413
|
+
time?: string;
|
|
1414
|
+
state?: StepState;
|
|
1415
|
+
}[]>;
|
|
1416
|
+
get stepperClasses(): string[];
|
|
1417
|
+
getStepClasses(step: {
|
|
1418
|
+
resolvedState: StepState;
|
|
1419
|
+
index: number;
|
|
1420
|
+
order: StepOrder;
|
|
1421
|
+
}): string[];
|
|
1422
|
+
getConnectorClasses(step: {
|
|
1423
|
+
resolvedState: StepState;
|
|
1424
|
+
}): string[];
|
|
1425
|
+
getLeftConnectorClasses(step: {
|
|
1426
|
+
resolvedState: StepState;
|
|
1427
|
+
index: number;
|
|
1428
|
+
}): string[];
|
|
1429
|
+
getRightConnectorClasses(step: {
|
|
1430
|
+
resolvedState: StepState;
|
|
1431
|
+
}): string[];
|
|
1432
|
+
onStepClick(index: number): void;
|
|
1433
|
+
onStepKeyDown(event: KeyboardEvent, index: number): void;
|
|
1434
|
+
private computeState;
|
|
1435
|
+
private computeOrder;
|
|
1436
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StepperComponent, never>;
|
|
1437
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StepperComponent, "pecb-stepper", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "tailStyle": { "alias": "tailStyle"; "required": false; "isSignal": true; }; "steps": { "alias": "steps"; "required": false; "isSignal": true; }; "currentStep": { "alias": "currentStep"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "stepClicked": "stepClicked"; }, never, never, true, never>;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Predefined gap sizes mapped to the PECB spacing tokens.
|
|
1442
|
+
*
|
|
1443
|
+
* | Token | Value |
|
|
1444
|
+
* |-------|-------|
|
|
1445
|
+
* | none | 0 |
|
|
1446
|
+
* | xs | 6px |
|
|
1447
|
+
* | sm | 8px |
|
|
1448
|
+
* | md | 16px |
|
|
1449
|
+
* | lg | 20px |
|
|
1450
|
+
* | xl | 24px |
|
|
1451
|
+
* | 2xl | 32px |
|
|
1452
|
+
*/
|
|
1453
|
+
type GridGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
1454
|
+
/**
|
|
1455
|
+
* Predefined padding sizes mapped to the PECB spacing tokens.
|
|
1456
|
+
*
|
|
1457
|
+
* | Token | Value |
|
|
1458
|
+
* |-------|-------|
|
|
1459
|
+
* | none | 0 |
|
|
1460
|
+
* | xs | 6px |
|
|
1461
|
+
* | sm | 8px |
|
|
1462
|
+
* | md | 16px |
|
|
1463
|
+
* | lg | 20px |
|
|
1464
|
+
* | xl | 24px |
|
|
1465
|
+
* | 2xl | 32px |
|
|
1466
|
+
*/
|
|
1467
|
+
type GridPadding = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
1468
|
+
/**
|
|
1469
|
+
* Number of columns the grid can display.
|
|
1470
|
+
* Use 'auto' for auto-fit behaviour based on minChildWidth.
|
|
1471
|
+
*/
|
|
1472
|
+
type GridColumns = 1 | 2 | 3 | 4 | 6 | 12 | 'auto';
|
|
1473
|
+
/**
|
|
1474
|
+
* Horizontal alignment of grid items.
|
|
1475
|
+
*/
|
|
1476
|
+
type GridAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
1477
|
+
/**
|
|
1478
|
+
* Vertical alignment of grid items.
|
|
1479
|
+
*/
|
|
1480
|
+
type GridVerticalAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
1481
|
+
/**
|
|
1482
|
+
* Number of columns a single grid item can span.
|
|
1483
|
+
*/
|
|
1484
|
+
type GridItemSpan = 1 | 2 | 3 | 4 | 6 | 12 | 'full';
|
|
1485
|
+
/**
|
|
1486
|
+
* Predefined spacer sizes.
|
|
1487
|
+
*
|
|
1488
|
+
* | Token | Value |
|
|
1489
|
+
* |-------|-------|
|
|
1490
|
+
* | xs | 6px |
|
|
1491
|
+
* | sm | 8px |
|
|
1492
|
+
* | md | 16px |
|
|
1493
|
+
* | lg | 20px |
|
|
1494
|
+
* | xl | 24px |
|
|
1495
|
+
* | 2xl | 32px |
|
|
1496
|
+
* | 3xl | 40px |
|
|
1497
|
+
* | 4xl | 48px |
|
|
1498
|
+
*/
|
|
1499
|
+
type SpacerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
|
|
1500
|
+
declare class GridComponent {
|
|
1501
|
+
/** Unique element ID */
|
|
1502
|
+
id: _angular_core.InputSignal<string>;
|
|
1503
|
+
/** Number of columns (1-12 or 'auto' for auto-fit) */
|
|
1504
|
+
columns: _angular_core.InputSignal<GridColumns>;
|
|
1505
|
+
/**
|
|
1506
|
+
* Minimum child width when columns='auto'.
|
|
1507
|
+
* Accepts any CSS length value. Defaults to '200px'.
|
|
1508
|
+
*/
|
|
1509
|
+
minChildWidth: _angular_core.InputSignal<string>;
|
|
1510
|
+
/** Gap between all grid items (row and column). Overridden by rowGap / columnGap. */
|
|
1511
|
+
gap: _angular_core.InputSignal<GridGap>;
|
|
1512
|
+
/** Row gap — overrides `gap` for the vertical axis */
|
|
1513
|
+
rowGap: _angular_core.InputSignal<GridGap | undefined>;
|
|
1514
|
+
/** Column gap — overrides `gap` for the horizontal axis */
|
|
1515
|
+
columnGap: _angular_core.InputSignal<GridGap | undefined>;
|
|
1516
|
+
/** Padding inside the grid container */
|
|
1517
|
+
padding: _angular_core.InputSignal<GridPadding>;
|
|
1518
|
+
/** Horizontal alignment of items within their cells */
|
|
1519
|
+
align: _angular_core.InputSignal<GridAlign>;
|
|
1520
|
+
/** Vertical alignment of items within their cells */
|
|
1521
|
+
verticalAlign: _angular_core.InputSignal<GridVerticalAlign>;
|
|
1522
|
+
/** Accessible label for the grid region */
|
|
1523
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
1524
|
+
/** CSS classes for the grid container */
|
|
1525
|
+
gridClasses: _angular_core.Signal<string[]>;
|
|
1526
|
+
/** Inline style for auto-fit min width */
|
|
1527
|
+
gridStyle: _angular_core.Signal<{
|
|
1528
|
+
'--pecb-grid-min-child-width': string;
|
|
1529
|
+
} | {
|
|
1530
|
+
'--pecb-grid-min-child-width'?: undefined;
|
|
1531
|
+
}>;
|
|
1532
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridComponent, never>;
|
|
1533
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GridComponent, "pecb-grid", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "minChildWidth": { "alias": "minChildWidth"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "rowGap": { "alias": "rowGap"; "required": false; "isSignal": true; }; "columnGap": { "alias": "columnGap"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "verticalAlign": { "alias": "verticalAlign"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1534
|
+
}
|
|
1535
|
+
declare class GridItemComponent {
|
|
1536
|
+
/** Number of columns this item should span */
|
|
1537
|
+
span: _angular_core.InputSignal<GridItemSpan>;
|
|
1538
|
+
/** Number of columns to span on small screens (>=768px) */
|
|
1539
|
+
spanSm: _angular_core.InputSignal<GridItemSpan | undefined>;
|
|
1540
|
+
/** Number of columns to span on medium screens (>=1024px) */
|
|
1541
|
+
spanMd: _angular_core.InputSignal<GridItemSpan | undefined>;
|
|
1542
|
+
/** Number of columns to span on large screens (>=1280px) */
|
|
1543
|
+
spanLg: _angular_core.InputSignal<GridItemSpan | undefined>;
|
|
1544
|
+
/** Semantic role for the grid item */
|
|
1545
|
+
role: _angular_core.InputSignal<string | null>;
|
|
1546
|
+
/** CSS classes for the grid item */
|
|
1547
|
+
itemClasses: _angular_core.Signal<string>;
|
|
1548
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridItemComponent, never>;
|
|
1549
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GridItemComponent, "pecb-grid-item", never, { "span": { "alias": "span"; "required": false; "isSignal": true; }; "spanSm": { "alias": "spanSm"; "required": false; "isSignal": true; }; "spanMd": { "alias": "spanMd"; "required": false; "isSignal": true; }; "spanLg": { "alias": "spanLg"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1550
|
+
}
|
|
1551
|
+
declare class SpacerComponent {
|
|
1552
|
+
/** Vertical space size */
|
|
1553
|
+
size: _angular_core.InputSignal<SpacerSize>;
|
|
1554
|
+
/** Whether the spacer is horizontal (inline) instead of vertical */
|
|
1555
|
+
inline: _angular_core.InputSignal<boolean>;
|
|
1556
|
+
/** CSS classes for the spacer */
|
|
1557
|
+
spacerClasses: _angular_core.Signal<string>;
|
|
1558
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpacerComponent, never>;
|
|
1559
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpacerComponent, "pecb-spacer", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
type DashboardGridLayout = '1' | '2' | '3' | '4' | 'sidebar-1col' | 'sidebar-2col' | 'sidebar-3col' | 'sidebar-4col' | 'custom';
|
|
1563
|
+
type DashboardGridGap = 'none' | 'sm' | 'md' | 'lg';
|
|
1564
|
+
declare class DashboardGridComponent {
|
|
1565
|
+
id: _angular_core.InputSignal<string>;
|
|
1566
|
+
layout: _angular_core.InputSignal<DashboardGridLayout>;
|
|
1567
|
+
gap: _angular_core.InputSignal<DashboardGridGap>;
|
|
1568
|
+
columns: _angular_core.InputSignal<string>;
|
|
1569
|
+
minHeight: _angular_core.InputSignal<string>;
|
|
1570
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1571
|
+
gridStyle: _angular_core.Signal<Record<string, string>>;
|
|
1572
|
+
get gridClasses(): string[];
|
|
1573
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DashboardGridComponent, never>;
|
|
1574
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DashboardGridComponent, "pecb-dashboard-grid", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
type ProgressType = 'bar' | 'circle' | 'spinner';
|
|
1578
|
+
type ProgressBarSize = 'sm' | 'lg';
|
|
1579
|
+
type ProgressCircleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1580
|
+
declare class SpinnerComponent {
|
|
1581
|
+
id: _angular_core.InputSignal<string>;
|
|
1582
|
+
size: _angular_core.InputSignal<number>;
|
|
1583
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1584
|
+
sizeValue: _angular_core.Signal<number>;
|
|
1585
|
+
strokeWidth: _angular_core.Signal<number>;
|
|
1586
|
+
radius: _angular_core.Signal<number>;
|
|
1587
|
+
circumference: _angular_core.Signal<number>;
|
|
1588
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpinnerComponent, never>;
|
|
1589
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpinnerComponent, "pecb-spinner", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1590
|
+
}
|
|
1591
|
+
declare class ProgressBarComponent {
|
|
1592
|
+
id: _angular_core.InputSignal<string>;
|
|
1593
|
+
value: _angular_core.InputSignal<number>;
|
|
1594
|
+
size: _angular_core.InputSignal<ProgressBarSize>;
|
|
1595
|
+
label: _angular_core.InputSignal<string>;
|
|
1596
|
+
metadata: _angular_core.InputSignal<string>;
|
|
1597
|
+
showPercentage: _angular_core.InputSignal<boolean>;
|
|
1598
|
+
color: _angular_core.InputSignal<string>;
|
|
1599
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1600
|
+
clampedValue: _angular_core.Signal<number>;
|
|
1601
|
+
fillColor: _angular_core.Signal<string>;
|
|
1602
|
+
get barClasses(): string[];
|
|
1603
|
+
private getColorForProgress;
|
|
1604
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProgressBarComponent, never>;
|
|
1605
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProgressBarComponent, "pecb-progress-bar", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "metadata": { "alias": "metadata"; "required": false; "isSignal": true; }; "showPercentage": { "alias": "showPercentage"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1606
|
+
}
|
|
1607
|
+
declare class ProgressCircleComponent {
|
|
1608
|
+
id: _angular_core.InputSignal<string>;
|
|
1609
|
+
value: _angular_core.InputSignal<number>;
|
|
1610
|
+
size: _angular_core.InputSignal<ProgressCircleSize>;
|
|
1611
|
+
showPercentage: _angular_core.InputSignal<boolean>;
|
|
1612
|
+
color: _angular_core.InputSignal<string>;
|
|
1613
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1614
|
+
private readonly sizeMap;
|
|
1615
|
+
private readonly fontSizeMap;
|
|
1616
|
+
sizeValue: _angular_core.Signal<number>;
|
|
1617
|
+
fontSize: _angular_core.Signal<number>;
|
|
1618
|
+
strokeWidth: _angular_core.Signal<9 | 4 | 5 | 6 | 7>;
|
|
1619
|
+
radius: _angular_core.Signal<number>;
|
|
1620
|
+
circumference: _angular_core.Signal<number>;
|
|
1621
|
+
clampedValue: _angular_core.Signal<number>;
|
|
1622
|
+
dashOffset: _angular_core.Signal<number>;
|
|
1623
|
+
fillColor: _angular_core.Signal<string>;
|
|
1624
|
+
get circleClasses(): string[];
|
|
1625
|
+
private getColorForProgress;
|
|
1626
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProgressCircleComponent, never>;
|
|
1627
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProgressCircleComponent, "pecb-progress-circle", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showPercentage": { "alias": "showPercentage"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
type CodeInputState = 'default' | 'error';
|
|
1631
|
+
type CodeInputDirection = 'horizontal' | 'vertical';
|
|
1632
|
+
declare class CodeInputComponent implements ControlValueAccessor {
|
|
1633
|
+
cellInputs: QueryList<ElementRef<HTMLInputElement>>;
|
|
1634
|
+
id: _angular_core.InputSignal<string>;
|
|
1635
|
+
length: _angular_core.InputSignal<number>;
|
|
1636
|
+
direction: _angular_core.InputSignal<CodeInputDirection>;
|
|
1637
|
+
state: _angular_core.InputSignal<CodeInputState>;
|
|
1638
|
+
errorMessage: _angular_core.InputSignal<string>;
|
|
1639
|
+
showClearAll: _angular_core.InputSignal<boolean>;
|
|
1640
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
1641
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1642
|
+
completed: _angular_core.OutputEmitterRef<string>;
|
|
1643
|
+
cleared: _angular_core.OutputEmitterRef<void>;
|
|
1644
|
+
cells: _angular_core.WritableSignal<string[]>;
|
|
1645
|
+
focusedIndex: _angular_core.WritableSignal<number>;
|
|
1646
|
+
cellIndices: _angular_core.Signal<number[]>;
|
|
1647
|
+
private onChange;
|
|
1648
|
+
private onTouched;
|
|
1649
|
+
constructor();
|
|
1650
|
+
writeValue(value: string | null): void;
|
|
1651
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
1652
|
+
registerOnTouched(fn: () => void): void;
|
|
1653
|
+
getCellClasses(index: number): string[];
|
|
1654
|
+
onCellInput(event: Event, index: number): void;
|
|
1655
|
+
onCellKeyDown(event: KeyboardEvent, index: number): void;
|
|
1656
|
+
onCellPaste(event: ClipboardEvent, index: number): void;
|
|
1657
|
+
onCellFocus(index: number): void;
|
|
1658
|
+
onCellBlur(): void;
|
|
1659
|
+
onClearAll(): void;
|
|
1660
|
+
private initCells;
|
|
1661
|
+
private focusCell;
|
|
1662
|
+
private syncInputValues;
|
|
1663
|
+
private emitValue;
|
|
1664
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CodeInputComponent, never>;
|
|
1665
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CodeInputComponent, "pecb-code-input", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "length": { "alias": "length"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "showClearAll": { "alias": "showClearAll"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "completed": "completed"; "cleared": "cleared"; }, never, never, true, never>;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* Shadow type — soft (diffused) or hard (sharp, pronounced).
|
|
1670
|
+
*/
|
|
1671
|
+
type ShadowType = 'soft' | 'hard';
|
|
1672
|
+
/**
|
|
1673
|
+
* Shadow Soft sizes — 8 levels of increasing depth.
|
|
1674
|
+
*
|
|
1675
|
+
* | Token | Description |
|
|
1676
|
+
* |-----------|--------------------------|
|
|
1677
|
+
* | xxsmall | Barely visible lift |
|
|
1678
|
+
* | xsmall | Subtle depth hint |
|
|
1679
|
+
* | small | Light card shadow |
|
|
1680
|
+
* | medium | Default card elevation |
|
|
1681
|
+
* | large | Raised element |
|
|
1682
|
+
* | xlarge | Floating panel |
|
|
1683
|
+
* | xxlarge | Modal / overlay |
|
|
1684
|
+
* | xxxlarge | Maximum depth |
|
|
1685
|
+
*/
|
|
1686
|
+
type ShadowSoftSize = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
|
|
1687
|
+
/**
|
|
1688
|
+
* Shadow Hard sizes — 4 levels of increasing depth.
|
|
1689
|
+
*
|
|
1690
|
+
* | Token | Description |
|
|
1691
|
+
* |---------|----------------------------|
|
|
1692
|
+
* | xxsmall | Tight hard edge |
|
|
1693
|
+
* | xsmall | Defined border shadow |
|
|
1694
|
+
* | small | Prominent hard shadow |
|
|
1695
|
+
* | medium | Maximum hard shadow depth |
|
|
1696
|
+
*/
|
|
1697
|
+
type ShadowHardSize = 'xxsmall' | 'xsmall' | 'small' | 'medium';
|
|
1698
|
+
/**
|
|
1699
|
+
* Combined shadow size (used when type is specified separately).
|
|
1700
|
+
*/
|
|
1701
|
+
type ShadowSize = ShadowSoftSize | ShadowHardSize;
|
|
1702
|
+
/**
|
|
1703
|
+
* Blur intensity levels.
|
|
1704
|
+
*
|
|
1705
|
+
* | Token | Value | Description |
|
|
1706
|
+
* |---------|-------|------------------------|
|
|
1707
|
+
* | none | 0 | No blur |
|
|
1708
|
+
* | xsmall | 2px | Barely noticeable |
|
|
1709
|
+
* | small | 4px | Slight softening |
|
|
1710
|
+
* | medium | 8px | Moderate blur |
|
|
1711
|
+
* | large | 16px | Heavy blur |
|
|
1712
|
+
* | xlarge | 32px | Near-opaque blur |
|
|
1713
|
+
*/
|
|
1714
|
+
type BlurSize = 'none' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
1715
|
+
/**
|
|
1716
|
+
* Applies a shadow to the host element.
|
|
1717
|
+
*
|
|
1718
|
+
* @example
|
|
1719
|
+
* ```html
|
|
1720
|
+
* <!-- Soft shadow (default) -->
|
|
1721
|
+
* <div pecbShadow="medium">Soft medium shadow</div>
|
|
1722
|
+
*
|
|
1723
|
+
* <!-- Specify type explicitly -->
|
|
1724
|
+
* <div pecbShadow="small" shadowType="hard">Hard small shadow</div>
|
|
1725
|
+
*
|
|
1726
|
+
* <!-- Dynamic binding -->
|
|
1727
|
+
* <div [pecbShadow]="currentSize" [shadowType]="currentType">Dynamic</div>
|
|
1728
|
+
* ```
|
|
1729
|
+
*/
|
|
1730
|
+
declare class ShadowDirective implements OnInit, OnChanges {
|
|
1731
|
+
/** Shadow size token */
|
|
1732
|
+
pecbShadow: _angular_core.InputSignal<ShadowSize>;
|
|
1733
|
+
/** Shadow type — 'soft' (default) or 'hard' */
|
|
1734
|
+
shadowType: _angular_core.InputSignal<ShadowType>;
|
|
1735
|
+
private el;
|
|
1736
|
+
private renderer;
|
|
1737
|
+
private currentClass;
|
|
1738
|
+
ngOnInit(): void;
|
|
1739
|
+
ngOnChanges(): void;
|
|
1740
|
+
private applyClass;
|
|
1741
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShadowDirective, never>;
|
|
1742
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ShadowDirective, "[pecbShadow]", never, { "pecbShadow": { "alias": "pecbShadow"; "required": false; "isSignal": true; }; "shadowType": { "alias": "shadowType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
* Applies a CSS blur filter to the host element.
|
|
1746
|
+
*
|
|
1747
|
+
* @example
|
|
1748
|
+
* ```html
|
|
1749
|
+
* <!-- Element blur -->
|
|
1750
|
+
* <img pecbBlur="medium" src="photo.jpg" />
|
|
1751
|
+
*
|
|
1752
|
+
* <!-- Backdrop blur (glass-morphism) -->
|
|
1753
|
+
* <div pecbBlur="small" [backdrop]="true">Frosted glass</div>
|
|
1754
|
+
* ```
|
|
1755
|
+
*/
|
|
1756
|
+
declare class BlurDirective implements OnInit, OnChanges {
|
|
1757
|
+
/** Blur size token */
|
|
1758
|
+
pecbBlur: _angular_core.InputSignal<BlurSize>;
|
|
1759
|
+
/** Apply as backdrop-filter instead of filter */
|
|
1760
|
+
backdrop: _angular_core.InputSignal<boolean>;
|
|
1761
|
+
private el;
|
|
1762
|
+
private renderer;
|
|
1763
|
+
private currentClass;
|
|
1764
|
+
ngOnInit(): void;
|
|
1765
|
+
ngOnChanges(): void;
|
|
1766
|
+
private applyClass;
|
|
1767
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlurDirective, never>;
|
|
1768
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BlurDirective, "[pecbBlur]", never, { "pecbBlur": { "alias": "pecbBlur"; "required": false; "isSignal": true; }; "backdrop": { "alias": "backdrop"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Divider visual variants derived from the Figma design system.
|
|
1773
|
+
*
|
|
1774
|
+
* | Type | Description |
|
|
1775
|
+
* |---------------------|----------------------------------------------------|
|
|
1776
|
+
* | default | Simple horizontal line |
|
|
1777
|
+
* | with-icon | Line with a centered icon (ng-content) |
|
|
1778
|
+
* | with-label | Left-aligned label text, line fills remaining space|
|
|
1779
|
+
* | with-title | Centered title text over the line |
|
|
1780
|
+
* | with-button | Centered button over the line |
|
|
1781
|
+
* | with-title-button | Left title, line, right button |
|
|
1782
|
+
*/
|
|
1783
|
+
type DividerType = 'default' | 'with-icon' | 'with-label' | 'with-title' | 'with-button' | 'with-title-button';
|
|
1784
|
+
declare class DividerComponent {
|
|
1785
|
+
/** Unique element ID */
|
|
1786
|
+
id: _angular_core.InputSignal<string>;
|
|
1787
|
+
/** Divider variant */
|
|
1788
|
+
type: _angular_core.InputSignal<DividerType>;
|
|
1789
|
+
/**
|
|
1790
|
+
* Title text displayed on the divider.
|
|
1791
|
+
* Used by 'with-label', 'with-title', and 'with-title-button' types.
|
|
1792
|
+
*/
|
|
1793
|
+
title: _angular_core.InputSignal<string>;
|
|
1794
|
+
/**
|
|
1795
|
+
* Button label text.
|
|
1796
|
+
* Used by 'with-button' and 'with-title-button' types.
|
|
1797
|
+
*/
|
|
1798
|
+
buttonLabel: _angular_core.InputSignal<string>;
|
|
1799
|
+
/**
|
|
1800
|
+
* Whether to show the icon inside the button.
|
|
1801
|
+
* Defaults to true.
|
|
1802
|
+
*/
|
|
1803
|
+
showButtonIcon: _angular_core.InputSignal<boolean>;
|
|
1804
|
+
/**
|
|
1805
|
+
* Whether to show the default + icon for the 'with-icon' type
|
|
1806
|
+
* when no content is projected via [dividerIcon].
|
|
1807
|
+
* Defaults to true.
|
|
1808
|
+
*/
|
|
1809
|
+
showDefaultIcon: _angular_core.InputSignal<boolean>;
|
|
1810
|
+
/** Accessible label for the divider */
|
|
1811
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
1812
|
+
/** Emits when the button is clicked (for with-button and with-title-button types) */
|
|
1813
|
+
buttonClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
1814
|
+
/** CSS class for the host wrapper */
|
|
1815
|
+
dividerClasses: _angular_core.Signal<string[]>;
|
|
1816
|
+
onButtonClick(event: MouseEvent): void;
|
|
1817
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DividerComponent, never>;
|
|
1818
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DividerComponent, "pecb-divider", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; "isSignal": true; }; "showButtonIcon": { "alias": "showButtonIcon"; "required": false; "isSignal": true; }; "showDefaultIcon": { "alias": "showDefaultIcon"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; }, never, ["[dividerIcon]"], true, never>;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
type CodeSnippetTheme = 'light' | 'dark';
|
|
1822
|
+
type CodeSnippetVariant = 'default' | 'filename' | 'filename-actions' | 'copy-banner' | 'gutter';
|
|
1823
|
+
declare class CodeSnippetComponent {
|
|
1824
|
+
private readonly sanitizer;
|
|
1825
|
+
id: _angular_core.InputSignal<string>;
|
|
1826
|
+
code: _angular_core.InputSignal<string>;
|
|
1827
|
+
highlightedCode: _angular_core.InputSignal<string>;
|
|
1828
|
+
language: _angular_core.InputSignal<string>;
|
|
1829
|
+
theme: _angular_core.InputSignal<CodeSnippetTheme>;
|
|
1830
|
+
variant: _angular_core.InputSignal<CodeSnippetVariant>;
|
|
1831
|
+
filename: _angular_core.InputSignal<string>;
|
|
1832
|
+
showLineNumbers: _angular_core.InputSignal<boolean>;
|
|
1833
|
+
showCopy: _angular_core.InputSignal<boolean>;
|
|
1834
|
+
showFooter: _angular_core.InputSignal<boolean>;
|
|
1835
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
1836
|
+
copied: _angular_core.OutputEmitterRef<string>;
|
|
1837
|
+
copyLabel: _angular_core.WritableSignal<string>;
|
|
1838
|
+
codeLines: _angular_core.Signal<string[]>;
|
|
1839
|
+
safeHighlightedCode: _angular_core.Signal<SafeHtml>;
|
|
1840
|
+
useHighlighted: _angular_core.Signal<boolean>;
|
|
1841
|
+
charCount: _angular_core.Signal<number>;
|
|
1842
|
+
lineCount: _angular_core.Signal<number>;
|
|
1843
|
+
get snippetClasses(): string[];
|
|
1844
|
+
onCopy(): void;
|
|
1845
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CodeSnippetComponent, never>;
|
|
1846
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CodeSnippetComponent, "pecb-code-snippet", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "code": { "alias": "code"; "required": false; "isSignal": true; }; "highlightedCode": { "alias": "highlightedCode"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "filename": { "alias": "filename"; "required": false; "isSignal": true; }; "showLineNumbers": { "alias": "showLineNumbers"; "required": false; "isSignal": true; }; "showCopy": { "alias": "showCopy"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "copied": "copied"; }, never, ["[codeActions]"], true, never>;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* Common type definitions for PECB UI Components
|
|
1851
|
+
* @module types
|
|
1852
|
+
*/
|
|
1853
|
+
/**
|
|
1854
|
+
* Standard size variants used across components
|
|
1855
|
+
*/
|
|
1856
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1857
|
+
/**
|
|
1858
|
+
* Standard component size mapping
|
|
1859
|
+
*/
|
|
1860
|
+
type ComponentSize = 'small' | 'medium' | 'large';
|
|
1861
|
+
/**
|
|
1862
|
+
* Semantic color variants
|
|
1863
|
+
*/
|
|
1864
|
+
type ColorVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
1865
|
+
/**
|
|
1866
|
+
* Extended color variants including neutral options
|
|
1867
|
+
*/
|
|
1868
|
+
type ExtendedColorVariant = ColorVariant | 'neutral' | 'muted';
|
|
1869
|
+
/**
|
|
1870
|
+
* Component state variants
|
|
1871
|
+
*/
|
|
1872
|
+
type StateVariant = 'default' | 'hover' | 'active' | 'focus' | 'disabled';
|
|
1873
|
+
/**
|
|
1874
|
+
* Position options for overlays and popups
|
|
1875
|
+
*/
|
|
1876
|
+
type Position = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
1877
|
+
/**
|
|
1878
|
+
* Alignment options
|
|
1879
|
+
*/
|
|
1880
|
+
type Alignment = 'start' | 'center' | 'end' | 'stretch';
|
|
1881
|
+
/**
|
|
1882
|
+
* Direction options for layouts
|
|
1883
|
+
*/
|
|
1884
|
+
type Direction = 'horizontal' | 'vertical';
|
|
1885
|
+
/**
|
|
1886
|
+
* Orientation alias for direction
|
|
1887
|
+
*/
|
|
1888
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
1889
|
+
/**
|
|
1890
|
+
* Spacing scale values
|
|
1891
|
+
*/
|
|
1892
|
+
type SpacingScale = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
1893
|
+
/**
|
|
1894
|
+
* Border radius scale values
|
|
1895
|
+
*/
|
|
1896
|
+
type RadiusScale = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
1897
|
+
/**
|
|
1898
|
+
* Shadow elevation levels
|
|
1899
|
+
*/
|
|
1900
|
+
type ElevationLevel = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1901
|
+
/**
|
|
1902
|
+
* Animation timing presets
|
|
1903
|
+
*/
|
|
1904
|
+
type AnimationTiming = 'instant' | 'fast' | 'normal' | 'slow';
|
|
1905
|
+
/**
|
|
1906
|
+
* Breakpoint names
|
|
1907
|
+
*/
|
|
1908
|
+
type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
1909
|
+
/**
|
|
1910
|
+
* Form validation state
|
|
1911
|
+
*/
|
|
1912
|
+
type ValidationState = 'valid' | 'invalid' | 'pending' | 'pristine';
|
|
1913
|
+
/**
|
|
1914
|
+
* Generic callback function type
|
|
1915
|
+
*/
|
|
1916
|
+
type Callback<T = void> = () => T;
|
|
1917
|
+
/**
|
|
1918
|
+
* Generic event handler type
|
|
1919
|
+
*/
|
|
1920
|
+
type EventHandler<T = Event> = (event: T) => void;
|
|
1921
|
+
/**
|
|
1922
|
+
* Make specific properties required
|
|
1923
|
+
*/
|
|
1924
|
+
type RequireProps<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
1925
|
+
/**
|
|
1926
|
+
* Make specific properties optional
|
|
1927
|
+
*/
|
|
1928
|
+
type OptionalProps<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
1929
|
+
/**
|
|
1930
|
+
* Extract non-nullable type
|
|
1931
|
+
*/
|
|
1932
|
+
type NonNullableProps<T> = {
|
|
1933
|
+
[K in keyof T]: NonNullable<T[K]>;
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* Common interface for components that can be disabled
|
|
1938
|
+
*/
|
|
1939
|
+
interface Disableable {
|
|
1940
|
+
/** Whether the component is disabled */
|
|
1941
|
+
disabled: boolean;
|
|
1942
|
+
}
|
|
1943
|
+
/**
|
|
1944
|
+
* Common interface for components with loading state
|
|
1945
|
+
*/
|
|
1946
|
+
interface Loadable {
|
|
1947
|
+
/** Whether the component is in a loading state */
|
|
1948
|
+
loading: boolean;
|
|
1949
|
+
}
|
|
1950
|
+
/**
|
|
1951
|
+
* Common interface for components with size variants
|
|
1952
|
+
*/
|
|
1953
|
+
interface Sizeable {
|
|
1954
|
+
/** The size of the component */
|
|
1955
|
+
size: ComponentSize;
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* Common interface for components with color variants
|
|
1959
|
+
*/
|
|
1960
|
+
interface Colorable {
|
|
1961
|
+
/** The color variant of the component */
|
|
1962
|
+
variant: ColorVariant;
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Common interface for focusable components
|
|
1966
|
+
*/
|
|
1967
|
+
interface Focusable {
|
|
1968
|
+
/** Focus the component programmatically */
|
|
1969
|
+
focus(): void;
|
|
1970
|
+
/** Blur the component programmatically */
|
|
1971
|
+
blur(): void;
|
|
1972
|
+
}
|
|
1973
|
+
/**
|
|
1974
|
+
* Base interface for form control components
|
|
1975
|
+
*/
|
|
1976
|
+
interface FormControlBase extends Disableable {
|
|
1977
|
+
/** Unique identifier for the control */
|
|
1978
|
+
id: string;
|
|
1979
|
+
/** Name attribute for form submission */
|
|
1980
|
+
name: string;
|
|
1981
|
+
/** Whether the field is required */
|
|
1982
|
+
required: boolean;
|
|
1983
|
+
/** Whether the field is readonly */
|
|
1984
|
+
readonly: boolean;
|
|
1985
|
+
/** Placeholder text */
|
|
1986
|
+
placeholder?: string;
|
|
1987
|
+
/** Accessible label */
|
|
1988
|
+
ariaLabel?: string;
|
|
1989
|
+
/** ID of element that labels this control */
|
|
1990
|
+
ariaLabelledBy?: string;
|
|
1991
|
+
/** ID of element that describes this control */
|
|
1992
|
+
ariaDescribedBy?: string;
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* Interface for components with validation
|
|
1996
|
+
*/
|
|
1997
|
+
interface Validatable {
|
|
1998
|
+
/** Current validation state */
|
|
1999
|
+
validationState: ValidationState;
|
|
2000
|
+
/** Error message to display */
|
|
2001
|
+
errorMessage?: string;
|
|
2002
|
+
/** Success message to display */
|
|
2003
|
+
successMessage?: string;
|
|
2004
|
+
/** Helper text to display */
|
|
2005
|
+
helperText?: string;
|
|
2006
|
+
}
|
|
2007
|
+
/**
|
|
2008
|
+
* Interface for selectable items (dropdown, list, etc.)
|
|
2009
|
+
*/
|
|
2010
|
+
interface SelectableItem<T = unknown> {
|
|
2011
|
+
/** Unique value for the item */
|
|
2012
|
+
value: T;
|
|
2013
|
+
/** Display label */
|
|
2014
|
+
label: string;
|
|
2015
|
+
/** Whether the item is disabled */
|
|
2016
|
+
disabled?: boolean;
|
|
2017
|
+
/** Optional icon name */
|
|
2018
|
+
icon?: string;
|
|
2019
|
+
/** Optional description */
|
|
2020
|
+
description?: string;
|
|
2021
|
+
/** Optional group name for categorization */
|
|
2022
|
+
group?: string;
|
|
2023
|
+
/** Additional metadata */
|
|
2024
|
+
metadata?: Record<string, unknown>;
|
|
2025
|
+
}
|
|
2026
|
+
/**
|
|
2027
|
+
* Interface for components that support custom templates
|
|
2028
|
+
*/
|
|
2029
|
+
interface Templatable {
|
|
2030
|
+
/** Custom template for rendering */
|
|
2031
|
+
template?: TemplateRef<unknown>;
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
* Interface for overlay components (modal, popover, tooltip)
|
|
2035
|
+
*/
|
|
2036
|
+
interface OverlayComponent {
|
|
2037
|
+
/** Whether the overlay is currently visible */
|
|
2038
|
+
isOpen: boolean;
|
|
2039
|
+
/** Open the overlay */
|
|
2040
|
+
open(): void;
|
|
2041
|
+
/** Close the overlay */
|
|
2042
|
+
close(): void;
|
|
2043
|
+
/** Toggle the overlay state */
|
|
2044
|
+
toggle(): void;
|
|
2045
|
+
}
|
|
2046
|
+
/**
|
|
2047
|
+
* Interface for components with before/after close hooks
|
|
2048
|
+
*/
|
|
2049
|
+
interface ClosableWithHooks {
|
|
2050
|
+
/** Called before the component closes. Return false to prevent closing */
|
|
2051
|
+
beforeClose?: () => boolean | Promise<boolean>;
|
|
2052
|
+
/** Called after the component closes */
|
|
2053
|
+
afterClose?: () => void;
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* Interface for table column definition
|
|
2057
|
+
*/
|
|
2058
|
+
interface TableColumn<T = unknown> {
|
|
2059
|
+
/** Unique column key */
|
|
2060
|
+
key: string;
|
|
2061
|
+
/** Column header label */
|
|
2062
|
+
label: string;
|
|
2063
|
+
/** Property path to access data (supports dot notation) */
|
|
2064
|
+
field?: keyof T | string;
|
|
2065
|
+
/** Whether the column is sortable */
|
|
2066
|
+
sortable?: boolean;
|
|
2067
|
+
/** Whether the column is filterable */
|
|
2068
|
+
filterable?: boolean;
|
|
2069
|
+
/** Column width (CSS value) */
|
|
2070
|
+
width?: string;
|
|
2071
|
+
/** Minimum column width */
|
|
2072
|
+
minWidth?: string;
|
|
2073
|
+
/** Maximum column width */
|
|
2074
|
+
maxWidth?: string;
|
|
2075
|
+
/** Text alignment */
|
|
2076
|
+
align?: 'left' | 'center' | 'right';
|
|
2077
|
+
/** Whether the column is visible */
|
|
2078
|
+
visible?: boolean;
|
|
2079
|
+
/** Whether the column is sticky */
|
|
2080
|
+
sticky?: 'start' | 'end';
|
|
2081
|
+
/** Custom cell template */
|
|
2082
|
+
cellTemplate?: TemplateRef<unknown>;
|
|
2083
|
+
/** Custom header template */
|
|
2084
|
+
headerTemplate?: TemplateRef<unknown>;
|
|
2085
|
+
/** Value formatter function */
|
|
2086
|
+
formatter?: (value: unknown, row: T) => string;
|
|
2087
|
+
}
|
|
2088
|
+
/**
|
|
2089
|
+
* Interface for pagination state
|
|
2090
|
+
*/
|
|
2091
|
+
interface PaginationState {
|
|
2092
|
+
/** Current page (1-indexed) */
|
|
2093
|
+
currentPage: number;
|
|
2094
|
+
/** Number of items per page */
|
|
2095
|
+
pageSize: number;
|
|
2096
|
+
/** Total number of items */
|
|
2097
|
+
totalItems: number;
|
|
2098
|
+
/** Total number of pages (calculated) */
|
|
2099
|
+
totalPages: number;
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
* Interface for sort state
|
|
2103
|
+
*/
|
|
2104
|
+
interface SortState {
|
|
2105
|
+
/** Column key to sort by */
|
|
2106
|
+
column: string;
|
|
2107
|
+
/** Sort direction */
|
|
2108
|
+
direction: 'asc' | 'desc' | null;
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2111
|
+
* Interface for filter state
|
|
2112
|
+
*/
|
|
2113
|
+
interface FilterState {
|
|
2114
|
+
/** Column key to filter */
|
|
2115
|
+
column: string;
|
|
2116
|
+
/** Filter operator */
|
|
2117
|
+
operator: 'equals' | 'contains' | 'startsWith' | 'endsWith' | 'gt' | 'lt' | 'gte' | 'lte' | 'between' | 'in';
|
|
2118
|
+
/** Filter value(s) */
|
|
2119
|
+
value: unknown;
|
|
2120
|
+
}
|
|
2121
|
+
/**
|
|
2122
|
+
* Interface for tree node structure
|
|
2123
|
+
*/
|
|
2124
|
+
interface TreeNode<T = unknown> {
|
|
2125
|
+
/** Unique node identifier */
|
|
2126
|
+
id: string | number;
|
|
2127
|
+
/** Node data */
|
|
2128
|
+
data: T;
|
|
2129
|
+
/** Child nodes */
|
|
2130
|
+
children?: TreeNode<T>[];
|
|
2131
|
+
/** Whether the node is expanded */
|
|
2132
|
+
expanded?: boolean;
|
|
2133
|
+
/** Whether the node is selected */
|
|
2134
|
+
selected?: boolean;
|
|
2135
|
+
/** Whether the node is disabled */
|
|
2136
|
+
disabled?: boolean;
|
|
2137
|
+
/** Whether the node is a leaf (no children) */
|
|
2138
|
+
leaf?: boolean;
|
|
2139
|
+
/** Parent node ID */
|
|
2140
|
+
parentId?: string | number;
|
|
2141
|
+
/** Node level in the tree (0-indexed) */
|
|
2142
|
+
level?: number;
|
|
2143
|
+
}
|
|
2144
|
+
/**
|
|
2145
|
+
* Interface for breadcrumb item
|
|
2146
|
+
*/
|
|
2147
|
+
interface BreadcrumbItem {
|
|
2148
|
+
/** Display label */
|
|
2149
|
+
label: string;
|
|
2150
|
+
/** Navigation URL or route */
|
|
2151
|
+
url?: string;
|
|
2152
|
+
/** Route path array for routerLink */
|
|
2153
|
+
routerLink?: string | string[];
|
|
2154
|
+
/** Query parameters */
|
|
2155
|
+
queryParams?: Record<string, string>;
|
|
2156
|
+
/** Icon name */
|
|
2157
|
+
icon?: string;
|
|
2158
|
+
/** Icon color (CSS color value). Overrides the global iconColor. */
|
|
2159
|
+
iconColor?: string;
|
|
2160
|
+
/** Whether this is the active/current item */
|
|
2161
|
+
active?: boolean;
|
|
2162
|
+
/** Whether the item is disabled */
|
|
2163
|
+
disabled?: boolean;
|
|
2164
|
+
}
|
|
2165
|
+
/**
|
|
2166
|
+
* Interface for tab item
|
|
2167
|
+
*/
|
|
2168
|
+
interface TabItem {
|
|
2169
|
+
/** Unique tab identifier */
|
|
2170
|
+
id: string;
|
|
2171
|
+
/** Tab label */
|
|
2172
|
+
label: string;
|
|
2173
|
+
/** Tab icon */
|
|
2174
|
+
icon?: string;
|
|
2175
|
+
/** Whether the tab is disabled */
|
|
2176
|
+
disabled?: boolean;
|
|
2177
|
+
/** Whether the tab is closable */
|
|
2178
|
+
closable?: boolean;
|
|
2179
|
+
/** Badge content */
|
|
2180
|
+
badge?: string | number;
|
|
2181
|
+
/** Content template */
|
|
2182
|
+
content?: TemplateRef<unknown>;
|
|
2183
|
+
}
|
|
2184
|
+
/**
|
|
2185
|
+
* Interface for menu item
|
|
2186
|
+
*/
|
|
2187
|
+
interface MenuItem {
|
|
2188
|
+
/** Unique item identifier */
|
|
2189
|
+
id?: string;
|
|
2190
|
+
/** Display label */
|
|
2191
|
+
label: string;
|
|
2192
|
+
/** Icon name */
|
|
2193
|
+
icon?: string;
|
|
2194
|
+
/** Command to execute on click */
|
|
2195
|
+
command?: () => void;
|
|
2196
|
+
/** URL for navigation */
|
|
2197
|
+
url?: string;
|
|
2198
|
+
/** Router link */
|
|
2199
|
+
routerLink?: string | string[];
|
|
2200
|
+
/** Query parameters */
|
|
2201
|
+
queryParams?: Record<string, string>;
|
|
2202
|
+
/** Whether the item is disabled */
|
|
2203
|
+
disabled?: boolean;
|
|
2204
|
+
/** Whether the item is visible */
|
|
2205
|
+
visible?: boolean;
|
|
2206
|
+
/** Child items for submenu */
|
|
2207
|
+
items?: MenuItem[];
|
|
2208
|
+
/** Whether this is a separator */
|
|
2209
|
+
separator?: boolean;
|
|
2210
|
+
/** Additional CSS class */
|
|
2211
|
+
styleClass?: string;
|
|
2212
|
+
/** Tooltip text */
|
|
2213
|
+
tooltip?: string;
|
|
2214
|
+
/** Badge content */
|
|
2215
|
+
badge?: string | number;
|
|
2216
|
+
/** Badge color variant */
|
|
2217
|
+
badgeVariant?: ColorVariant;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* Separator style between breadcrumb items.
|
|
2222
|
+
*
|
|
2223
|
+
* | Type | Description |
|
|
2224
|
+
* |---------|---------------------------|
|
|
2225
|
+
* | slash | Forward slash `/` |
|
|
2226
|
+
* | arrow | Right chevron arrow `>` |
|
|
2227
|
+
* | custom | Custom template separator |
|
|
2228
|
+
*/
|
|
2229
|
+
type BreadcrumbSeparator = 'slash' | 'arrow' | 'custom';
|
|
2230
|
+
declare class BreadcrumbsComponent {
|
|
2231
|
+
private readonly registry;
|
|
2232
|
+
private readonly sanitizer;
|
|
2233
|
+
/** Unique element ID */
|
|
2234
|
+
id: _angular_core.InputSignal<string>;
|
|
2235
|
+
/** Array of breadcrumb items to display */
|
|
2236
|
+
items: _angular_core.InputSignal<BreadcrumbItem[]>;
|
|
2237
|
+
/** Separator style between items */
|
|
2238
|
+
separator: _angular_core.InputSignal<BreadcrumbSeparator>;
|
|
2239
|
+
/** Custom separator template (used when separator is 'custom') */
|
|
2240
|
+
separatorTemplate: _angular_core.InputSignal<TemplateRef<unknown> | null>;
|
|
2241
|
+
/**
|
|
2242
|
+
* Global icon color (CSS color value).
|
|
2243
|
+
* Applied to all icons unless overridden by the item's `iconColor`.
|
|
2244
|
+
* When not set, icons inherit the text color (red for links, gray for current).
|
|
2245
|
+
*/
|
|
2246
|
+
iconColor: _angular_core.InputSignal<string>;
|
|
2247
|
+
/** Accessible label for the breadcrumb navigation */
|
|
2248
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
2249
|
+
/** Emits the clicked breadcrumb item */
|
|
2250
|
+
itemClick: _angular_core.OutputEmitterRef<BreadcrumbItem>;
|
|
2251
|
+
/** CSS classes for the host wrapper */
|
|
2252
|
+
breadcrumbClasses: _angular_core.Signal<string[]>;
|
|
2253
|
+
/** Whether an item is the last in the list (current page) */
|
|
2254
|
+
isLastItem(index: number): boolean;
|
|
2255
|
+
/** Resolve an icon name to a trusted SVG string */
|
|
2256
|
+
getIconSvg(iconName: string | undefined): SafeHtml | null;
|
|
2257
|
+
/** Resolve icon color: per-item iconColor > global iconColor > inherit */
|
|
2258
|
+
getIconColor(item: BreadcrumbItem): string | null;
|
|
2259
|
+
onItemClick(event: Event, item: BreadcrumbItem): void;
|
|
2260
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BreadcrumbsComponent, never>;
|
|
2261
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BreadcrumbsComponent, "pecb-breadcrumbs", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": true; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "separatorTemplate": { "alias": "separatorTemplate"; "required": false; "isSignal": true; }; "iconColor": { "alias": "iconColor"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
/**
|
|
2265
|
+
* Search bar mode.
|
|
2266
|
+
*
|
|
2267
|
+
* | Mode | Description |
|
|
2268
|
+
* |----------|----------------------------------------------------|
|
|
2269
|
+
* | none | No search bar |
|
|
2270
|
+
* | simple | Compact search input only |
|
|
2271
|
+
* | advanced | Search input with a toggle button for filter fields |
|
|
2272
|
+
*/
|
|
2273
|
+
type SearchMode = 'none' | 'simple' | 'advanced';
|
|
2274
|
+
/**
|
|
2275
|
+
* A positioning layout component that enforces the PECB design system rules
|
|
2276
|
+
* for buttons, tabs, search bars, and banners on any page.
|
|
2277
|
+
*
|
|
2278
|
+
* **Design rules (from Figma):**
|
|
2279
|
+
* - Buttons are always on the **left**
|
|
2280
|
+
* - Search bar is always on the **right**
|
|
2281
|
+
* - When a banner exists, buttons go **above** it, search goes **below** it
|
|
2282
|
+
* - When buttons + tabs coexist without a banner, a **divider** separates them
|
|
2283
|
+
* - Tabs + search share the same row (tabs left, search right)
|
|
2284
|
+
*
|
|
2285
|
+
* **Content projection slots:**
|
|
2286
|
+
* - `[toolbarButtons]` — action buttons (left side)
|
|
2287
|
+
* - `[toolbarTabs]` — tab navigation (left side, below banner or after divider)
|
|
2288
|
+
* - `[toolbarSearch]` — search bar (right side)
|
|
2289
|
+
* - `[toolbarBanner]` — profile banner / header area
|
|
2290
|
+
* - `[toolbarAdvancedSearch]` — expandable advanced filter fields
|
|
2291
|
+
* - `[toolbarBackButton]` — go-back navigation (top-left, above everything)
|
|
2292
|
+
*
|
|
2293
|
+
* @example
|
|
2294
|
+
* ```html
|
|
2295
|
+
* <!-- Simple: buttons left, search right -->
|
|
2296
|
+
* <pecb-general>
|
|
2297
|
+
* <ng-container toolbarButtons>
|
|
2298
|
+
* <button>Primary</button>
|
|
2299
|
+
* </ng-container>
|
|
2300
|
+
* <ng-container toolbarSearch>
|
|
2301
|
+
* <input placeholder="Search..." />
|
|
2302
|
+
* </ng-container>
|
|
2303
|
+
* </pecb-general>
|
|
2304
|
+
*
|
|
2305
|
+
* <!-- With banner: buttons above, tabs+search below -->
|
|
2306
|
+
* <pecb-general [hasBanner]="true" [hasTabs]="true">
|
|
2307
|
+
* <ng-container toolbarButtons>...</ng-container>
|
|
2308
|
+
* <ng-container toolbarBanner>...</ng-container>
|
|
2309
|
+
* <ng-container toolbarTabs>...</ng-container>
|
|
2310
|
+
* <ng-container toolbarSearch>...</ng-container>
|
|
2311
|
+
* </pecb-general>
|
|
2312
|
+
* ```
|
|
2313
|
+
*/
|
|
2314
|
+
declare class GeneralComponent {
|
|
2315
|
+
/** Unique element ID */
|
|
2316
|
+
id: _angular_core.InputSignal<string>;
|
|
2317
|
+
/** Whether the toolbar has action buttons */
|
|
2318
|
+
hasButtons: _angular_core.InputSignal<boolean>;
|
|
2319
|
+
/** Whether the toolbar has tab navigation */
|
|
2320
|
+
hasTabs: _angular_core.InputSignal<boolean>;
|
|
2321
|
+
/** Whether the toolbar has a banner/profile header */
|
|
2322
|
+
hasBanner: _angular_core.InputSignal<boolean>;
|
|
2323
|
+
/** Whether the toolbar has a back button */
|
|
2324
|
+
hasBackButton: _angular_core.InputSignal<boolean>;
|
|
2325
|
+
/** Search bar mode: 'none', 'simple', or 'advanced' */
|
|
2326
|
+
searchMode: _angular_core.InputSignal<SearchMode>;
|
|
2327
|
+
/** Whether the advanced search panel is currently expanded */
|
|
2328
|
+
advancedSearchOpen: _angular_core.InputSignal<boolean>;
|
|
2329
|
+
/** Emits when the advanced search toggle is clicked */
|
|
2330
|
+
advancedSearchToggle: _angular_core.OutputEmitterRef<boolean>;
|
|
2331
|
+
/** Accessible label for the toolbar region */
|
|
2332
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
2333
|
+
/** Whether a search bar is present */
|
|
2334
|
+
hasSearch: _angular_core.Signal<boolean>;
|
|
2335
|
+
/**
|
|
2336
|
+
* Whether to show a divider between buttons and tabs.
|
|
2337
|
+
* Only when both exist AND there is no banner.
|
|
2338
|
+
*/
|
|
2339
|
+
showDivider: _angular_core.Signal<boolean>;
|
|
2340
|
+
/**
|
|
2341
|
+
* Layout mode determines the overall structure.
|
|
2342
|
+
*
|
|
2343
|
+
* - 'flat': no banner — everything in stacked rows
|
|
2344
|
+
* - 'banner': banner present — buttons above, tabs+search below
|
|
2345
|
+
*/
|
|
2346
|
+
layoutMode: _angular_core.Signal<"flat" | "banner">;
|
|
2347
|
+
onAdvancedSearchToggle(): void;
|
|
2348
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GeneralComponent, never>;
|
|
2349
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GeneralComponent, "pecb-general", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "hasButtons": { "alias": "hasButtons"; "required": false; "isSignal": true; }; "hasTabs": { "alias": "hasTabs"; "required": false; "isSignal": true; }; "hasBanner": { "alias": "hasBanner"; "required": false; "isSignal": true; }; "hasBackButton": { "alias": "hasBackButton"; "required": false; "isSignal": true; }; "searchMode": { "alias": "searchMode"; "required": false; "isSignal": true; }; "advancedSearchOpen": { "alias": "advancedSearchOpen"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "advancedSearchToggle": "advancedSearchToggle"; }, never, ["[toolbarBackButton]", "[toolbarButtons]", "[toolbarBanner]", "[toolbarTabs]", "[toolbarSearch]", "[toolbarAdvancedSearch]"], true, never>;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* PECB UI Components Module
|
|
2354
|
+
*
|
|
2355
|
+
* A professional Angular components library with TypeScript and SCSS.
|
|
2356
|
+
* Import this module to use all PECB UI components in your application.
|
|
2357
|
+
*
|
|
2358
|
+
* @example
|
|
2359
|
+
* ```typescript
|
|
2360
|
+
* import { PecbComponentsModule } from '@pecb-ui/components';
|
|
2361
|
+
*
|
|
2362
|
+
* @NgModule({
|
|
2363
|
+
* imports: [PecbComponentsModule]
|
|
2364
|
+
* })
|
|
2365
|
+
* export class AppModule { }
|
|
2366
|
+
* ```
|
|
2367
|
+
*/
|
|
2368
|
+
declare class PecbComponentsModule {
|
|
2369
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PecbComponentsModule, never>;
|
|
2370
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<PecbComponentsModule, never, [typeof i1.CommonModule, typeof ButtonComponent, typeof CardComponent, typeof CardHeaderComponent, typeof CardBodyComponent, typeof CardFooterComponent, typeof StatusComponent, typeof PaginationComponent, typeof TableComponent, typeof TabComponent, typeof DatepickerComponent, typeof InputComponent, typeof RadioComponent, typeof CheckboxComponent, typeof ToggleComponent, typeof DropdownComponent, typeof RightModalComponent, typeof RightModalHeaderDirective, typeof RightModalContentDirective, typeof RightModalFooterDirective, typeof SidebarComponent, typeof ConfirmationComponent, typeof BottomSheetComponent, typeof AccordionItemComponent, typeof AccordionSmallComponent, typeof ButtonGroupComponent, typeof ButtonGroupItemComponent, typeof TooltipComponent, typeof TooltipDirective, typeof MessageItemComponent, typeof MessageBubbleComponent, typeof FullscreenModalComponent, typeof FullscreenModalContentDirective, typeof FullscreenModalFooterDirective, typeof StepperComponent, typeof GridComponent, typeof GridItemComponent, typeof SpacerComponent, typeof DashboardGridComponent, typeof SpinnerComponent, typeof ProgressBarComponent, typeof ProgressCircleComponent, typeof CodeInputComponent, typeof ShadowDirective, typeof BlurDirective, typeof DividerComponent, typeof CodeSnippetComponent, typeof BreadcrumbsComponent, typeof GeneralComponent], [typeof ButtonComponent, typeof CardComponent, typeof CardHeaderComponent, typeof CardBodyComponent, typeof CardFooterComponent, typeof StatusComponent, typeof PaginationComponent, typeof TableComponent, typeof TabComponent, typeof DatepickerComponent, typeof InputComponent, typeof RadioComponent, typeof CheckboxComponent, typeof ToggleComponent, typeof DropdownComponent, typeof RightModalComponent, typeof RightModalHeaderDirective, typeof RightModalContentDirective, typeof RightModalFooterDirective, typeof SidebarComponent, typeof ConfirmationComponent, typeof BottomSheetComponent, typeof AccordionItemComponent, typeof AccordionSmallComponent, typeof ButtonGroupComponent, typeof ButtonGroupItemComponent, typeof TooltipComponent, typeof TooltipDirective, typeof MessageItemComponent, typeof MessageBubbleComponent, typeof FullscreenModalComponent, typeof FullscreenModalContentDirective, typeof FullscreenModalFooterDirective, typeof StepperComponent, typeof GridComponent, typeof GridItemComponent, typeof SpacerComponent, typeof DashboardGridComponent, typeof SpinnerComponent, typeof ProgressBarComponent, typeof ProgressCircleComponent, typeof CodeInputComponent, typeof ShadowDirective, typeof BlurDirective, typeof DividerComponent, typeof CodeSnippetComponent, typeof BreadcrumbsComponent, typeof GeneralComponent]>;
|
|
2371
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<PecbComponentsModule>;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
type AlertType = 'info' | 'success' | 'warning' | 'error';
|
|
2375
|
+
type AlertVariant = 'banner' | 'filled';
|
|
2376
|
+
declare class AlertComponent {
|
|
2377
|
+
type: _angular_core.InputSignal<AlertType>;
|
|
2378
|
+
variant: _angular_core.InputSignal<AlertVariant>;
|
|
2379
|
+
title: _angular_core.InputSignal<string>;
|
|
2380
|
+
message: _angular_core.InputSignal<string>;
|
|
2381
|
+
dismissible: _angular_core.InputSignal<boolean>;
|
|
2382
|
+
primaryAction: _angular_core.InputSignal<string | undefined>;
|
|
2383
|
+
secondaryAction: _angular_core.InputSignal<string | undefined>;
|
|
2384
|
+
/**
|
|
2385
|
+
* Whether the alert is visible. Manages its own state internally —
|
|
2386
|
+
* no consumer binding required. Supports [(visible)] for controlled mode.
|
|
2387
|
+
*/
|
|
2388
|
+
visible: _angular_core.ModelSignal<boolean>;
|
|
2389
|
+
dismissed: _angular_core.OutputEmitterRef<void>;
|
|
2390
|
+
primaryActionClick: _angular_core.OutputEmitterRef<void>;
|
|
2391
|
+
secondaryActionClick: _angular_core.OutputEmitterRef<void>;
|
|
2392
|
+
dismiss(): void;
|
|
2393
|
+
get hasActions(): boolean;
|
|
2394
|
+
get hostClasses(): string;
|
|
2395
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
2396
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertComponent, "pecb-alert", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "primaryAction": { "alias": "primaryAction"; "required": false; "isSignal": true; }; "secondaryAction": { "alias": "secondaryAction"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "dismissed": "dismissed"; "primaryActionClick": "primaryActionClick"; "secondaryActionClick": "secondaryActionClick"; }, never, never, true, never>;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
type MetricsCardVariation = '1' | '2' | '3' | '4' | '5' | '6';
|
|
2400
|
+
type MetricsCardType = 'data+cta' | 'data-only';
|
|
2401
|
+
type MetricsCardOrientation = 'left-aligned' | 'center';
|
|
2402
|
+
type MetricsCardBadgeStatus = 'success' | 'warning' | 'error' | 'info';
|
|
2403
|
+
type MetricsCardIconBg = 'white' | 'pending' | 'success' | 'error' | 'info' | 'purple';
|
|
2404
|
+
declare class MetricsCardComponent {
|
|
2405
|
+
private sanitizer;
|
|
2406
|
+
/** Layout variation (1–6) matching the Figma design */
|
|
2407
|
+
variation: _angular_core.InputSignal<MetricsCardVariation>;
|
|
2408
|
+
/** Whether to render a CTA button/link */
|
|
2409
|
+
type: _angular_core.InputSignal<MetricsCardType>;
|
|
2410
|
+
/**
|
|
2411
|
+
* Content alignment — only variation 6 supports 'center'.
|
|
2412
|
+
* All others default to 'left-aligned'.
|
|
2413
|
+
*/
|
|
2414
|
+
orientation: _angular_core.InputSignal<MetricsCardOrientation>;
|
|
2415
|
+
/** Metric label/title text */
|
|
2416
|
+
label: _angular_core.InputSignal<string>;
|
|
2417
|
+
/** Main metric value displayed prominently */
|
|
2418
|
+
value: _angular_core.InputSignal<string>;
|
|
2419
|
+
/** Show or hide the badge */
|
|
2420
|
+
hasBadge: _angular_core.InputSignal<boolean>;
|
|
2421
|
+
/** Badge text (e.g. "10%", "Label", "Paid") */
|
|
2422
|
+
badgeText: _angular_core.InputSignal<string>;
|
|
2423
|
+
/** Badge color theme */
|
|
2424
|
+
badgeStatus: _angular_core.InputSignal<MetricsCardBadgeStatus>;
|
|
2425
|
+
/** Show or hide the description text next to the badge */
|
|
2426
|
+
hasDescription: _angular_core.InputSignal<boolean>;
|
|
2427
|
+
/** Description text shown next to the percentage badge */
|
|
2428
|
+
description: _angular_core.InputSignal<string>;
|
|
2429
|
+
/** CTA button label (used for both inline links and footer buttons) */
|
|
2430
|
+
ctaText: _angular_core.InputSignal<string>;
|
|
2431
|
+
/** Show or hide the icon (variations 2, 3, 4, 6) */
|
|
2432
|
+
hasIcon: _angular_core.InputSignal<boolean>;
|
|
2433
|
+
/** Custom SVG string for the icon — falls back to a refresh icon when empty */
|
|
2434
|
+
iconSvg: _angular_core.InputSignal<string>;
|
|
2435
|
+
/** Icon container background color (mainly variation 4) */
|
|
2436
|
+
iconBg: _angular_core.InputSignal<MetricsCardIconBg>;
|
|
2437
|
+
/** Date string shown on the right side of variation 1 */
|
|
2438
|
+
date: _angular_core.InputSignal<string>;
|
|
2439
|
+
/** Secondary metric text shown below the value in variation 5 */
|
|
2440
|
+
subtext: _angular_core.InputSignal<string>;
|
|
2441
|
+
/** Emitted when any CTA button or link is clicked */
|
|
2442
|
+
ctaClicked: _angular_core.OutputEmitterRef<void>;
|
|
2443
|
+
safeIconSvg: _angular_core.Signal<_angular_platform_browser.SafeHtml | null>;
|
|
2444
|
+
get hostClasses(): string;
|
|
2445
|
+
/** Footer CTA renders for variations 2, 3, 4 (left-aligned) and 6 (center) */
|
|
2446
|
+
get showFooterCta(): boolean;
|
|
2447
|
+
/** Inline CTA link renders for variations 1 and 5 */
|
|
2448
|
+
get showInlineCta(): boolean;
|
|
2449
|
+
/** Footer CTA arrow renders only for left-aligned variations (2, 3, 4) */
|
|
2450
|
+
get showFooterArrow(): boolean;
|
|
2451
|
+
/** Icon wrapper size class driven by variation */
|
|
2452
|
+
get iconSizeClass(): string;
|
|
2453
|
+
/** Icon background class driven by iconBg input */
|
|
2454
|
+
get iconBgClass(): string;
|
|
2455
|
+
onCtaClick(): void;
|
|
2456
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MetricsCardComponent, never>;
|
|
2457
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MetricsCardComponent, "pecb-metrics-card", never, { "variation": { "alias": "variation"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "hasBadge": { "alias": "hasBadge"; "required": false; "isSignal": true; }; "badgeText": { "alias": "badgeText"; "required": false; "isSignal": true; }; "badgeStatus": { "alias": "badgeStatus"; "required": false; "isSignal": true; }; "hasDescription": { "alias": "hasDescription"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "ctaText": { "alias": "ctaText"; "required": false; "isSignal": true; }; "hasIcon": { "alias": "hasIcon"; "required": false; "isSignal": true; }; "iconSvg": { "alias": "iconSvg"; "required": false; "isSignal": true; }; "iconBg": { "alias": "iconBg"; "required": false; "isSignal": true; }; "date": { "alias": "date"; "required": false; "isSignal": true; }; "subtext": { "alias": "subtext"; "required": false; "isSignal": true; }; }, { "ctaClicked": "ctaClicked"; }, never, never, true, never>;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
interface FloatButtonAction {
|
|
2461
|
+
/** Unique identifier used for tracking and emitting click events */
|
|
2462
|
+
id: string;
|
|
2463
|
+
/** Label text displayed in the action button */
|
|
2464
|
+
label: string;
|
|
2465
|
+
/** Optional SVG string for the leading icon */
|
|
2466
|
+
iconSvg?: string;
|
|
2467
|
+
/**
|
|
2468
|
+
* Whether to render the icon even when `iconSvg` is provided.
|
|
2469
|
+
* Set to false to hide the icon for a specific item without removing the SVG string.
|
|
2470
|
+
* @default true
|
|
2471
|
+
*/
|
|
2472
|
+
showIcon?: boolean;
|
|
2473
|
+
/**
|
|
2474
|
+
* Whether this item is rendered in the list.
|
|
2475
|
+
* Use this to dynamically show/hide individual actions without changing the array.
|
|
2476
|
+
* @default true
|
|
2477
|
+
*/
|
|
2478
|
+
visible?: boolean;
|
|
2479
|
+
/** Whether this action is disabled */
|
|
2480
|
+
disabled?: boolean;
|
|
2481
|
+
/**
|
|
2482
|
+
* Per-item click handler. Called in addition to the global `actionClick` output.
|
|
2483
|
+
* Use this when each action needs its own dedicated function.
|
|
2484
|
+
* @example { id: 'audio', label: 'Audio', onClick: () => this.startRecording() }
|
|
2485
|
+
*/
|
|
2486
|
+
onClick?: () => void;
|
|
2487
|
+
}
|
|
2488
|
+
type FloatButtonPosition = 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
|
|
2489
|
+
/**
|
|
2490
|
+
* Individual action pill item rendered inside the float button list.
|
|
2491
|
+
*
|
|
2492
|
+
* @example
|
|
2493
|
+
* <pecb-float-button-item label="Audio" [iconSvg]="micSvg" (itemClick)="onAudio()">
|
|
2494
|
+
* </pecb-float-button-item>
|
|
2495
|
+
*/
|
|
2496
|
+
declare class FloatButtonItemComponent {
|
|
2497
|
+
private sanitizer;
|
|
2498
|
+
label: _angular_core.InputSignal<string>;
|
|
2499
|
+
iconSvg: _angular_core.InputSignal<string>;
|
|
2500
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
2501
|
+
itemClick: _angular_core.OutputEmitterRef<void>;
|
|
2502
|
+
safeIcon: _angular_core.Signal<SafeHtml>;
|
|
2503
|
+
hostClasses: _angular_core.Signal<string>;
|
|
2504
|
+
onClick(): void;
|
|
2505
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FloatButtonItemComponent, never>;
|
|
2506
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FloatButtonItemComponent, "pecb-float-button-item", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "iconSvg": { "alias": "iconSvg"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
2507
|
+
}
|
|
2508
|
+
/**
|
|
2509
|
+
* Floating action button with an expandable list of 1–5 action items.
|
|
2510
|
+
*
|
|
2511
|
+
* Manages open/closed state internally — no consumer binding required.
|
|
2512
|
+
* Supports `[(isOpen)]` for controlled mode.
|
|
2513
|
+
*
|
|
2514
|
+
* @example
|
|
2515
|
+
* <!-- Uncontrolled -->
|
|
2516
|
+
* <pecb-float-button [actions]="myActions" (actionClick)="onAction($event)">
|
|
2517
|
+
* </pecb-float-button>
|
|
2518
|
+
*
|
|
2519
|
+
* @example
|
|
2520
|
+
* <!-- Controlled -->
|
|
2521
|
+
* <pecb-float-button [actions]="myActions" [(isOpen)]="menuOpen" (actionClick)="onAction($event)">
|
|
2522
|
+
* </pecb-float-button>
|
|
2523
|
+
*/
|
|
2524
|
+
declare class FloatButtonComponent {
|
|
2525
|
+
/**
|
|
2526
|
+
* List of action items to display (1–5 items as per design spec).
|
|
2527
|
+
* Items render in order, closest to the trigger first.
|
|
2528
|
+
*/
|
|
2529
|
+
actions: _angular_core.InputSignal<FloatButtonAction[]>;
|
|
2530
|
+
/**
|
|
2531
|
+
* Whether the action list is open. Manages its own state internally —
|
|
2532
|
+
* no consumer binding required. Supports [(isOpen)] for controlled mode.
|
|
2533
|
+
*/
|
|
2534
|
+
isOpen: _angular_core.ModelSignal<boolean>;
|
|
2535
|
+
/**
|
|
2536
|
+
* Corner position when `fixed` is true.
|
|
2537
|
+
* @default 'bottom-right'
|
|
2538
|
+
*/
|
|
2539
|
+
position: _angular_core.InputSignal<FloatButtonPosition>;
|
|
2540
|
+
/**
|
|
2541
|
+
* When true, the component is positioned fixed to the viewport corner
|
|
2542
|
+
* defined by `position`. When false, it is relative/inline.
|
|
2543
|
+
* @default false
|
|
2544
|
+
*/
|
|
2545
|
+
fixed: _angular_core.InputSignal<boolean>;
|
|
2546
|
+
/** Accessible label for the trigger button */
|
|
2547
|
+
triggerAriaLabel: _angular_core.InputSignal<string>;
|
|
2548
|
+
/** Emits the action that was clicked */
|
|
2549
|
+
actionClick: _angular_core.OutputEmitterRef<FloatButtonAction>;
|
|
2550
|
+
/** Emits when the list opens */
|
|
2551
|
+
opened: _angular_core.OutputEmitterRef<void>;
|
|
2552
|
+
/** Emits when the list closes */
|
|
2553
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
2554
|
+
/** Filters hidden items then enforces the 1–5 item constraint */
|
|
2555
|
+
visibleActions: _angular_core.Signal<FloatButtonAction[]>;
|
|
2556
|
+
hostClasses: _angular_core.Signal<string>;
|
|
2557
|
+
toggle(): void;
|
|
2558
|
+
onActionClick(action: FloatButtonAction): void;
|
|
2559
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FloatButtonComponent, never>;
|
|
2560
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FloatButtonComponent, "pecb-float-button", never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "fixed": { "alias": "fixed"; "required": false; "isSignal": true; }; "triggerAriaLabel": { "alias": "triggerAriaLabel"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; "actionClick": "actionClick"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
/**
|
|
2564
|
+
* The visual type of skeleton item to render.
|
|
2565
|
+
*
|
|
2566
|
+
* - `heading` — Single short line mimicking a section title
|
|
2567
|
+
* - `paragraph` — Multiple stacked lines mimicking body text
|
|
2568
|
+
* - `input` — Input field placeholder
|
|
2569
|
+
* - `button` — Button placeholder (combine with `shape` for circle/round)
|
|
2570
|
+
* - `image` — Square image/thumbnail placeholder with a photo icon
|
|
2571
|
+
* - `avatar` — User avatar placeholder (combine with `shape` for circle/square)
|
|
2572
|
+
*/
|
|
2573
|
+
type SkeletonType = 'heading' | 'paragraph' | 'input' | 'button' | 'image' | 'avatar';
|
|
2574
|
+
/** Size scale shared across input, button, and avatar types */
|
|
2575
|
+
type SkeletonSize = 'sm' | 'md' | 'lg';
|
|
2576
|
+
/**
|
|
2577
|
+
* Shape variant.
|
|
2578
|
+
* - Button types: `default` | `circle` | `round`
|
|
2579
|
+
* - Avatar types: `circle` | `square`
|
|
2580
|
+
*/
|
|
2581
|
+
type SkeletonShape = 'default' | 'circle' | 'round' | 'square';
|
|
2582
|
+
/**
|
|
2583
|
+
* `SkeletonComponent` renders a single animated placeholder that mirrors the
|
|
2584
|
+
* shape of real content while data is loading.
|
|
2585
|
+
*
|
|
2586
|
+
* Compose multiple instances to build full-page skeleton layouts.
|
|
2587
|
+
*
|
|
2588
|
+
* @example
|
|
2589
|
+
* <!-- Heading + paragraph block -->
|
|
2590
|
+
* <pecb-skeleton type="heading" />
|
|
2591
|
+
* <pecb-skeleton type="paragraph" [lines]="3" />
|
|
2592
|
+
*
|
|
2593
|
+
* @example
|
|
2594
|
+
* <!-- Row with avatar and text -->
|
|
2595
|
+
* <pecb-skeleton type="avatar" shape="circle" size="md" />
|
|
2596
|
+
* <pecb-skeleton type="paragraph" [lines]="2" />
|
|
2597
|
+
*
|
|
2598
|
+
* @example
|
|
2599
|
+
* <!-- Form fields -->
|
|
2600
|
+
* <pecb-skeleton type="input" size="lg" />
|
|
2601
|
+
* <pecb-skeleton type="button" size="md" />
|
|
2602
|
+
* <pecb-skeleton type="button" shape="round" size="sm" />
|
|
2603
|
+
*/
|
|
2604
|
+
declare class SkeletonComponent {
|
|
2605
|
+
/** Type of skeleton item to render */
|
|
2606
|
+
type: _angular_core.InputSignal<SkeletonType>;
|
|
2607
|
+
/**
|
|
2608
|
+
* Size variant — applies to `input`, `button`, and `avatar` types.
|
|
2609
|
+
* @default 'md'
|
|
2610
|
+
*/
|
|
2611
|
+
size: _angular_core.InputSignal<SkeletonSize>;
|
|
2612
|
+
/**
|
|
2613
|
+
* Shape variant.
|
|
2614
|
+
* - For `button`: `default` (rect) | `circle` | `round` (pill)
|
|
2615
|
+
* - For `avatar`: `circle` | `square`
|
|
2616
|
+
* @default 'default'
|
|
2617
|
+
*/
|
|
2618
|
+
shape: _angular_core.InputSignal<SkeletonShape>;
|
|
2619
|
+
/**
|
|
2620
|
+
* Number of lines rendered for `paragraph` type.
|
|
2621
|
+
* The last line is automatically shortened to ~60% width.
|
|
2622
|
+
* @default 3
|
|
2623
|
+
*/
|
|
2624
|
+
lines: _angular_core.InputSignal<number>;
|
|
2625
|
+
/**
|
|
2626
|
+
* Override the width with any valid CSS value (e.g. `'70%'`, `'200px'`).
|
|
2627
|
+
* Applies to `heading`, `paragraph` lines, and `input` types.
|
|
2628
|
+
*/
|
|
2629
|
+
width: _angular_core.InputSignal<string | undefined>;
|
|
2630
|
+
/**
|
|
2631
|
+
* Whether to show the shimmer sweep animation.
|
|
2632
|
+
* Set to `false` for a static placeholder.
|
|
2633
|
+
* @default true
|
|
2634
|
+
*/
|
|
2635
|
+
animated: _angular_core.InputSignal<boolean>;
|
|
2636
|
+
/** @internal Line widths for paragraph type */
|
|
2637
|
+
readonly paragraphLines: _angular_core.Signal<string[]>;
|
|
2638
|
+
/** @internal Host CSS classes */
|
|
2639
|
+
readonly hostClasses: _angular_core.Signal<string>;
|
|
2640
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkeletonComponent, never>;
|
|
2641
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkeletonComponent, "pecb-skeleton", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "animated": { "alias": "animated"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
interface ColorPaletteItem {
|
|
2645
|
+
/** Hex color value, e.g. "#A11E29" */
|
|
2646
|
+
hex: string;
|
|
2647
|
+
/** Optional accessible name for the swatch */
|
|
2648
|
+
name?: string;
|
|
2649
|
+
}
|
|
2650
|
+
interface ColorPaletteGroup {
|
|
2651
|
+
/** Section heading displayed above the swatches */
|
|
2652
|
+
title: string;
|
|
2653
|
+
/** List of colors in this group */
|
|
2654
|
+
colors: ColorPaletteItem[];
|
|
2655
|
+
}
|
|
2656
|
+
declare const PECB_COLOR_PALETTE: ColorPaletteGroup[];
|
|
2657
|
+
/**
|
|
2658
|
+
* Displays a color palette as a grid of labelled swatches grouped by category.
|
|
2659
|
+
*
|
|
2660
|
+
* Uses the full PECB design-system palette by default. Pass custom `groups` to
|
|
2661
|
+
* render any set of colors.
|
|
2662
|
+
*
|
|
2663
|
+
* @example
|
|
2664
|
+
* <!-- Default PECB palette -->
|
|
2665
|
+
* <pecb-color-palette></pecb-color-palette>
|
|
2666
|
+
*
|
|
2667
|
+
* @example
|
|
2668
|
+
* <!-- Custom groups -->
|
|
2669
|
+
* <pecb-color-palette [groups]="myGroups"></pecb-color-palette>
|
|
2670
|
+
*/
|
|
2671
|
+
declare class ColorPaletteComponent {
|
|
2672
|
+
/**
|
|
2673
|
+
* Color groups to display. Each group has a title and a list of hex colors.
|
|
2674
|
+
* Defaults to the full PECB design-system palette.
|
|
2675
|
+
*/
|
|
2676
|
+
groups: _angular_core.InputSignal<ColorPaletteGroup[]>;
|
|
2677
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPaletteComponent, never>;
|
|
2678
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColorPaletteComponent, "pecb-color-palette", never, { "groups": { "alias": "groups"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
type ProfileSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
2682
|
+
type ProfileIndicator = 'none' | 'online' | 'offline';
|
|
2683
|
+
type ProfileBadge = 'none' | 'verified' | 'camera';
|
|
2684
|
+
declare class ProfileComponent {
|
|
2685
|
+
src: _angular_core.InputSignal<string | undefined>;
|
|
2686
|
+
initials: _angular_core.InputSignal<string | undefined>;
|
|
2687
|
+
alt: _angular_core.InputSignal<string>;
|
|
2688
|
+
size: _angular_core.InputSignal<ProfileSize>;
|
|
2689
|
+
indicator: _angular_core.InputSignal<ProfileIndicator>;
|
|
2690
|
+
badge: _angular_core.InputSignal<ProfileBadge>;
|
|
2691
|
+
cameraClick: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
2692
|
+
hostClass: _angular_core.Signal<string>;
|
|
2693
|
+
showImage: _angular_core.Signal<boolean>;
|
|
2694
|
+
showInitials: _angular_core.Signal<boolean>;
|
|
2695
|
+
showIcon: _angular_core.Signal<boolean>;
|
|
2696
|
+
imgSize: _angular_core.Signal<number>;
|
|
2697
|
+
onCameraClick(event: MouseEvent): void;
|
|
2698
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProfileComponent, never>;
|
|
2699
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProfileComponent, "pecb-profile", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "indicator": { "alias": "indicator"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; }, { "cameraClick": "cameraClick"; }, never, never, true, never>;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
type ProfileGroupSize = 'sm' | 'md' | 'lg';
|
|
2703
|
+
interface ProfileGroupItem {
|
|
2704
|
+
src?: string;
|
|
2705
|
+
initials?: string;
|
|
2706
|
+
alt?: string;
|
|
2707
|
+
}
|
|
2708
|
+
declare class ProfileGroupComponent {
|
|
2709
|
+
avatars: _angular_core.InputSignal<ProfileGroupItem[]>;
|
|
2710
|
+
size: _angular_core.InputSignal<ProfileGroupSize>;
|
|
2711
|
+
max: _angular_core.InputSignal<number>;
|
|
2712
|
+
hostClass: _angular_core.Signal<string>;
|
|
2713
|
+
visible: _angular_core.Signal<ProfileGroupItem[]>;
|
|
2714
|
+
overflow: _angular_core.Signal<number>;
|
|
2715
|
+
overflowLabel: _angular_core.Signal<string>;
|
|
2716
|
+
imgSize: _angular_core.Signal<number>;
|
|
2717
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProfileGroupComponent, never>;
|
|
2718
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ProfileGroupComponent, "pecb-profile-group", never, { "avatars": { "alias": "avatars"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* One entry in the modular type scale table (Typefaces panel).
|
|
2723
|
+
*/
|
|
2724
|
+
interface TypographyScaleEntry {
|
|
2725
|
+
/** Font size in pixels */
|
|
2726
|
+
px: number;
|
|
2727
|
+
/** Equivalent rem value displayed as a label, e.g. "3.812" */
|
|
2728
|
+
rem: string;
|
|
2729
|
+
/** Custom sample sentence. Defaults to the component's `scaleSampleText`. */
|
|
2730
|
+
sample?: string;
|
|
2731
|
+
}
|
|
2732
|
+
/**
|
|
2733
|
+
* One named text style in the font catalogue (Fonts panel).
|
|
2734
|
+
*/
|
|
2735
|
+
interface TypographyStyleEntry {
|
|
2736
|
+
/** Display name, e.g. "Hero 1 bold", "Body 14", "Caption" */
|
|
2737
|
+
name: string;
|
|
2738
|
+
/** CSS font-size value, e.g. "64px" */
|
|
2739
|
+
fontSize: string;
|
|
2740
|
+
/** Numeric font-weight */
|
|
2741
|
+
fontWeight: 400 | 500 | 700;
|
|
2742
|
+
/** CSS line-height value, e.g. "1.2", "normal", "18px" */
|
|
2743
|
+
lineHeight: string;
|
|
2744
|
+
/** Optional CSS text-transform — use "uppercase" for caption styles */
|
|
2745
|
+
textTransform?: 'uppercase';
|
|
2746
|
+
}
|
|
2747
|
+
/** Modular type scale used by the PECB design system (base 16 px, ratio 1.25). */
|
|
2748
|
+
declare const PECB_TYPE_SCALE: TypographyScaleEntry[];
|
|
2749
|
+
/** All named text styles defined in the PECB design system. */
|
|
2750
|
+
declare const PECB_FONT_STYLES: TypographyStyleEntry[];
|
|
2751
|
+
/**
|
|
2752
|
+
* Displays the typography system as two visual sections:
|
|
2753
|
+
*
|
|
2754
|
+
* 1. **Type Scale** — A table showing "The quick brown fox…" rendered at every
|
|
2755
|
+
* step of the modular scale, with px and rem labels.
|
|
2756
|
+
*
|
|
2757
|
+
* 2. **Font Styles** — A catalogue of every named text style, each rendered in
|
|
2758
|
+
* its own visual treatment.
|
|
2759
|
+
*
|
|
2760
|
+
* Uses the full PECB design system by default; pass custom data via inputs to
|
|
2761
|
+
* document any other type system.
|
|
2762
|
+
*
|
|
2763
|
+
* @example
|
|
2764
|
+
* <!-- Default PECB typography -->
|
|
2765
|
+
* <pecb-typography></pecb-typography>
|
|
2766
|
+
*
|
|
2767
|
+
* @example
|
|
2768
|
+
* <!-- Scale only -->
|
|
2769
|
+
* <pecb-typography [showStyles]="false"></pecb-typography>
|
|
2770
|
+
*
|
|
2771
|
+
* @example
|
|
2772
|
+
* <!-- Custom data -->
|
|
2773
|
+
* <pecb-typography [scaleEntries]="myScale" [styleEntries]="myStyles"></pecb-typography>
|
|
2774
|
+
*/
|
|
2775
|
+
declare class TypographyComponent {
|
|
2776
|
+
/** Name of the typeface shown in the Fonts panel header. */
|
|
2777
|
+
fontName: _angular_core.InputSignal<string>;
|
|
2778
|
+
/**
|
|
2779
|
+
* Type scale entries rendered in the Typefaces panel.
|
|
2780
|
+
* Defaults to the PECB modular scale.
|
|
2781
|
+
*/
|
|
2782
|
+
scaleEntries: _angular_core.InputSignal<TypographyScaleEntry[]>;
|
|
2783
|
+
/**
|
|
2784
|
+
* Named text styles rendered in the Fonts panel.
|
|
2785
|
+
* Defaults to the full PECB font catalogue.
|
|
2786
|
+
*/
|
|
2787
|
+
styleEntries: _angular_core.InputSignal<TypographyStyleEntry[]>;
|
|
2788
|
+
/** Whether to render the Type Scale (Typefaces) panel. @default true */
|
|
2789
|
+
showScale: _angular_core.InputSignal<boolean>;
|
|
2790
|
+
/** Whether to render the Font Styles (Fonts) panel. @default true */
|
|
2791
|
+
showStyles: _angular_core.InputSignal<boolean>;
|
|
2792
|
+
/** Base value label shown in the type scale header. @default 16 */
|
|
2793
|
+
scaleBaseValue: _angular_core.InputSignal<number>;
|
|
2794
|
+
/** Ratio label shown in the type scale header. @default 1.25 */
|
|
2795
|
+
scaleFactor: _angular_core.InputSignal<number>;
|
|
2796
|
+
/** Sample sentence used in every scale row (overrideable per-entry via `sample`). */
|
|
2797
|
+
scaleSampleText: _angular_core.InputSignal<string>;
|
|
2798
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TypographyComponent, never>;
|
|
2799
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TypographyComponent, "pecb-typography", never, { "fontName": { "alias": "fontName"; "required": false; "isSignal": true; }; "scaleEntries": { "alias": "scaleEntries"; "required": false; "isSignal": true; }; "styleEntries": { "alias": "styleEntries"; "required": false; "isSignal": true; }; "showScale": { "alias": "showScale"; "required": false; "isSignal": true; }; "showStyles": { "alias": "showStyles"; "required": false; "isSignal": true; }; "scaleBaseValue": { "alias": "scaleBaseValue"; "required": false; "isSignal": true; }; "scaleFactor": { "alias": "scaleFactor"; "required": false; "isSignal": true; }; "scaleSampleText": { "alias": "scaleSampleText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
/**
|
|
2803
|
+
* Notification types supported by the service
|
|
2804
|
+
*/
|
|
2805
|
+
type NotificationType = 'success' | 'error' | 'warning' | 'info';
|
|
2806
|
+
/**
|
|
2807
|
+
* Notification position on screen
|
|
2808
|
+
*/
|
|
2809
|
+
type NotificationPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
|
|
2810
|
+
/**
|
|
2811
|
+
* Notification configuration options
|
|
2812
|
+
*/
|
|
2813
|
+
interface NotificationConfig {
|
|
2814
|
+
/** Notification message */
|
|
2815
|
+
message: string;
|
|
2816
|
+
/** Notification title (optional) */
|
|
2817
|
+
title?: string;
|
|
2818
|
+
/** Type of notification */
|
|
2819
|
+
type: NotificationType;
|
|
2820
|
+
/** Duration in milliseconds (0 for persistent) */
|
|
2821
|
+
duration?: number;
|
|
2822
|
+
/** Whether the notification can be dismissed */
|
|
2823
|
+
dismissible?: boolean;
|
|
2824
|
+
/** Position on screen */
|
|
2825
|
+
position?: NotificationPosition;
|
|
2826
|
+
/** Custom CSS class */
|
|
2827
|
+
customClass?: string;
|
|
2828
|
+
/** Unique identifier */
|
|
2829
|
+
id?: string;
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* Notification object with all properties
|
|
2833
|
+
*/
|
|
2834
|
+
interface Notification extends Required<Omit<NotificationConfig, 'title' | 'customClass'>> {
|
|
2835
|
+
title?: string;
|
|
2836
|
+
customClass?: string;
|
|
2837
|
+
timestamp: Date;
|
|
2838
|
+
}
|
|
2839
|
+
/**
|
|
2840
|
+
* A stateless, injectable notification service for displaying toast notifications.
|
|
2841
|
+
*
|
|
2842
|
+
* This service provides a reactive way to manage notifications across the application.
|
|
2843
|
+
* It uses RxJS Subjects to emit notification events that can be consumed by notification
|
|
2844
|
+
* display components.
|
|
2845
|
+
*
|
|
2846
|
+
* @example
|
|
2847
|
+
* ```typescript
|
|
2848
|
+
* import { NotificationService } from '@pecb-ui/components';
|
|
2849
|
+
*
|
|
2850
|
+
* @Component({...})
|
|
2851
|
+
* export class MyComponent {
|
|
2852
|
+
* constructor(private notificationService: NotificationService) {}
|
|
2853
|
+
*
|
|
2854
|
+
* showSuccess(): void {
|
|
2855
|
+
* this.notificationService.success('Operation completed successfully!');
|
|
2856
|
+
* }
|
|
2857
|
+
*
|
|
2858
|
+
* showError(): void {
|
|
2859
|
+
* this.notificationService.error('An error occurred', 'Error Title');
|
|
2860
|
+
* }
|
|
2861
|
+
* }
|
|
2862
|
+
* ```
|
|
2863
|
+
*
|
|
2864
|
+
* @publicApi
|
|
2865
|
+
*/
|
|
2866
|
+
declare class NotificationService {
|
|
2867
|
+
private readonly notificationSubject;
|
|
2868
|
+
private readonly dismissSubject;
|
|
2869
|
+
private readonly clearSubject;
|
|
2870
|
+
/** Default duration for notifications in milliseconds */
|
|
2871
|
+
private readonly defaultDuration;
|
|
2872
|
+
/** Default position for notifications */
|
|
2873
|
+
private readonly defaultPosition;
|
|
2874
|
+
/**
|
|
2875
|
+
* Observable stream of notifications
|
|
2876
|
+
*/
|
|
2877
|
+
get notifications$(): Observable<Notification>;
|
|
2878
|
+
/**
|
|
2879
|
+
* Observable stream of dismissed notification IDs
|
|
2880
|
+
*/
|
|
2881
|
+
get dismiss$(): Observable<string>;
|
|
2882
|
+
/**
|
|
2883
|
+
* Observable stream for clear all events
|
|
2884
|
+
*/
|
|
2885
|
+
get clear$(): Observable<void>;
|
|
2886
|
+
/**
|
|
2887
|
+
* Show a success notification
|
|
2888
|
+
* @param message - The notification message
|
|
2889
|
+
* @param title - Optional title
|
|
2890
|
+
* @param config - Optional additional configuration
|
|
2891
|
+
*/
|
|
2892
|
+
success(message: string, title?: string, config?: Partial<NotificationConfig>): string;
|
|
2893
|
+
/**
|
|
2894
|
+
* Show an error notification
|
|
2895
|
+
* @param message - The notification message
|
|
2896
|
+
* @param title - Optional title
|
|
2897
|
+
* @param config - Optional additional configuration
|
|
2898
|
+
*/
|
|
2899
|
+
error(message: string, title?: string, config?: Partial<NotificationConfig>): string;
|
|
2900
|
+
/**
|
|
2901
|
+
* Show a warning notification
|
|
2902
|
+
* @param message - The notification message
|
|
2903
|
+
* @param title - Optional title
|
|
2904
|
+
* @param config - Optional additional configuration
|
|
2905
|
+
*/
|
|
2906
|
+
warning(message: string, title?: string, config?: Partial<NotificationConfig>): string;
|
|
2907
|
+
/**
|
|
2908
|
+
* Show an info notification
|
|
2909
|
+
* @param message - The notification message
|
|
2910
|
+
* @param title - Optional title
|
|
2911
|
+
* @param config - Optional additional configuration
|
|
2912
|
+
*/
|
|
2913
|
+
info(message: string, title?: string, config?: Partial<NotificationConfig>): string;
|
|
2914
|
+
/**
|
|
2915
|
+
* Show a notification with custom configuration
|
|
2916
|
+
* @param config - Full notification configuration
|
|
2917
|
+
* @returns The notification ID
|
|
2918
|
+
*/
|
|
2919
|
+
show(config: NotificationConfig): string;
|
|
2920
|
+
/**
|
|
2921
|
+
* Dismiss a specific notification by ID
|
|
2922
|
+
* @param id - The notification ID to dismiss
|
|
2923
|
+
*/
|
|
2924
|
+
dismiss(id: string): void;
|
|
2925
|
+
/**
|
|
2926
|
+
* Clear all notifications
|
|
2927
|
+
*/
|
|
2928
|
+
clearAll(): void;
|
|
2929
|
+
/**
|
|
2930
|
+
* Generate a unique notification ID
|
|
2931
|
+
*/
|
|
2932
|
+
private generateId;
|
|
2933
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationService, never>;
|
|
2934
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NotificationService>;
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
/**
|
|
2938
|
+
* Available theme modes
|
|
2939
|
+
*/
|
|
2940
|
+
type ThemeMode = 'light' | 'dark' | 'system';
|
|
2941
|
+
/**
|
|
2942
|
+
* Theme configuration interface
|
|
2943
|
+
*/
|
|
2944
|
+
interface ThemeConfig {
|
|
2945
|
+
/** Current theme mode */
|
|
2946
|
+
mode: ThemeMode;
|
|
2947
|
+
/** Resolved theme (light or dark, never system) */
|
|
2948
|
+
resolvedTheme: 'light' | 'dark';
|
|
2949
|
+
/** CSS class to apply to the document */
|
|
2950
|
+
cssClass: string;
|
|
2951
|
+
}
|
|
2952
|
+
/**
|
|
2953
|
+
* Custom theme variables that can be overridden
|
|
2954
|
+
*/
|
|
2955
|
+
interface ThemeVariables {
|
|
2956
|
+
/** Primary color */
|
|
2957
|
+
primaryColor?: string;
|
|
2958
|
+
/** Secondary color */
|
|
2959
|
+
secondaryColor?: string;
|
|
2960
|
+
/** Background color */
|
|
2961
|
+
backgroundColor?: string;
|
|
2962
|
+
/** Text color */
|
|
2963
|
+
textColor?: string;
|
|
2964
|
+
/** Border radius */
|
|
2965
|
+
borderRadius?: string;
|
|
2966
|
+
/** Font family */
|
|
2967
|
+
fontFamily?: string;
|
|
2968
|
+
/** Custom CSS variables */
|
|
2969
|
+
[key: string]: string | undefined;
|
|
2970
|
+
}
|
|
2971
|
+
/**
|
|
2972
|
+
* A stateless, injectable theme service for managing application themes.
|
|
2973
|
+
*
|
|
2974
|
+
* This service provides reactive theme management with support for light/dark modes,
|
|
2975
|
+
* system preference detection, and custom CSS variable overrides.
|
|
2976
|
+
*
|
|
2977
|
+
* @example
|
|
2978
|
+
* ```typescript
|
|
2979
|
+
* import { ThemeService } from '@pecb-ui/components';
|
|
2980
|
+
*
|
|
2981
|
+
* @Component({...})
|
|
2982
|
+
* export class MyComponent {
|
|
2983
|
+
* constructor(private themeService: ThemeService) {}
|
|
2984
|
+
*
|
|
2985
|
+
* toggleTheme(): void {
|
|
2986
|
+
* this.themeService.toggleTheme();
|
|
2987
|
+
* }
|
|
2988
|
+
*
|
|
2989
|
+
* setDarkMode(): void {
|
|
2990
|
+
* this.themeService.setTheme('dark');
|
|
2991
|
+
* }
|
|
2992
|
+
* }
|
|
2993
|
+
* ```
|
|
2994
|
+
*
|
|
2995
|
+
* @publicApi
|
|
2996
|
+
*/
|
|
2997
|
+
declare class ThemeService {
|
|
2998
|
+
private readonly themeSubject;
|
|
2999
|
+
private readonly isBrowser;
|
|
3000
|
+
private mediaQuery;
|
|
3001
|
+
constructor(platformId: object);
|
|
3002
|
+
/**
|
|
3003
|
+
* Observable stream of theme configuration changes
|
|
3004
|
+
*/
|
|
3005
|
+
get theme$(): Observable<ThemeConfig>;
|
|
3006
|
+
/**
|
|
3007
|
+
* Get the current theme configuration
|
|
3008
|
+
*/
|
|
3009
|
+
get currentTheme(): ThemeConfig;
|
|
3010
|
+
/**
|
|
3011
|
+
* Get the current theme mode
|
|
3012
|
+
*/
|
|
3013
|
+
get currentMode(): ThemeMode;
|
|
3014
|
+
/**
|
|
3015
|
+
* Check if the current resolved theme is dark
|
|
3016
|
+
*/
|
|
3017
|
+
get isDarkMode(): boolean;
|
|
3018
|
+
/**
|
|
3019
|
+
* Set the theme mode
|
|
3020
|
+
* @param mode - The theme mode to set (light, dark, or system)
|
|
3021
|
+
*/
|
|
3022
|
+
setTheme(mode: ThemeMode): void;
|
|
3023
|
+
/**
|
|
3024
|
+
* Toggle between light and dark themes
|
|
3025
|
+
* If currently using system preference, switches to the opposite of the resolved theme
|
|
3026
|
+
*/
|
|
3027
|
+
toggleTheme(): void;
|
|
3028
|
+
/**
|
|
3029
|
+
* Reset to system preference
|
|
3030
|
+
*/
|
|
3031
|
+
useSystemTheme(): void;
|
|
3032
|
+
/**
|
|
3033
|
+
* Apply custom CSS variables to the document
|
|
3034
|
+
* @param variables - Object containing CSS variable overrides
|
|
3035
|
+
*/
|
|
3036
|
+
setCustomVariables(variables: ThemeVariables): void;
|
|
3037
|
+
/**
|
|
3038
|
+
* Remove custom CSS variables from the document
|
|
3039
|
+
* @param variableNames - Array of variable names to remove
|
|
3040
|
+
*/
|
|
3041
|
+
removeCustomVariables(variableNames: string[]): void;
|
|
3042
|
+
/**
|
|
3043
|
+
* Get the initial theme from storage or system preference
|
|
3044
|
+
*/
|
|
3045
|
+
private getInitialTheme;
|
|
3046
|
+
/**
|
|
3047
|
+
* Create a theme configuration object
|
|
3048
|
+
*/
|
|
3049
|
+
private createThemeConfig;
|
|
3050
|
+
/**
|
|
3051
|
+
* Resolve the actual theme from mode (handles 'system' mode)
|
|
3052
|
+
*/
|
|
3053
|
+
private resolveTheme;
|
|
3054
|
+
/**
|
|
3055
|
+
* Get the system color scheme preference
|
|
3056
|
+
*/
|
|
3057
|
+
private getSystemPreference;
|
|
3058
|
+
/**
|
|
3059
|
+
* Setup listener for system theme changes
|
|
3060
|
+
*/
|
|
3061
|
+
private setupSystemThemeListener;
|
|
3062
|
+
/**
|
|
3063
|
+
* Apply the theme to the document
|
|
3064
|
+
*/
|
|
3065
|
+
private applyTheme;
|
|
3066
|
+
/**
|
|
3067
|
+
* Persist theme preference to storage
|
|
3068
|
+
*/
|
|
3069
|
+
private persistTheme;
|
|
3070
|
+
/**
|
|
3071
|
+
* Convert camelCase property name to CSS variable name
|
|
3072
|
+
*/
|
|
3073
|
+
private toCssVariableName;
|
|
3074
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
3075
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
/**
|
|
3079
|
+
* Loading state for a specific operation
|
|
3080
|
+
*/
|
|
3081
|
+
interface LoadingState {
|
|
3082
|
+
/** Unique identifier for the loading operation */
|
|
3083
|
+
id: string;
|
|
3084
|
+
/** Whether this operation is currently loading */
|
|
3085
|
+
isLoading: boolean;
|
|
3086
|
+
/** Optional message to display */
|
|
3087
|
+
message?: string;
|
|
3088
|
+
/** Optional progress percentage (0-100) */
|
|
3089
|
+
progress?: number;
|
|
3090
|
+
}
|
|
3091
|
+
/**
|
|
3092
|
+
* A stateless, injectable loading service for managing loading states.
|
|
3093
|
+
*
|
|
3094
|
+
* This service provides a centralized way to track loading states across
|
|
3095
|
+
* the application, supporting multiple concurrent loading operations with
|
|
3096
|
+
* individual tracking capabilities.
|
|
3097
|
+
*
|
|
3098
|
+
* @example
|
|
3099
|
+
* ```typescript
|
|
3100
|
+
* import { LoadingService } from '@pecb-ui/components';
|
|
3101
|
+
*
|
|
3102
|
+
* @Component({...})
|
|
3103
|
+
* export class MyComponent {
|
|
3104
|
+
* isLoading$ = this.loadingService.isLoading$('my-operation');
|
|
3105
|
+
*
|
|
3106
|
+
* constructor(private loadingService: LoadingService) {}
|
|
3107
|
+
*
|
|
3108
|
+
* async loadData(): Promise<void> {
|
|
3109
|
+
* this.loadingService.start('my-operation', 'Loading data...');
|
|
3110
|
+
* try {
|
|
3111
|
+
* await this.fetchData();
|
|
3112
|
+
* } finally {
|
|
3113
|
+
* this.loadingService.stop('my-operation');
|
|
3114
|
+
* }
|
|
3115
|
+
* }
|
|
3116
|
+
* }
|
|
3117
|
+
* ```
|
|
3118
|
+
*
|
|
3119
|
+
* @publicApi
|
|
3120
|
+
*/
|
|
3121
|
+
declare class LoadingService {
|
|
3122
|
+
private readonly loadingStates;
|
|
3123
|
+
private readonly statesSubject;
|
|
3124
|
+
/** Default loading operation ID */
|
|
3125
|
+
private readonly defaultId;
|
|
3126
|
+
/**
|
|
3127
|
+
* Observable of all loading states
|
|
3128
|
+
*/
|
|
3129
|
+
get states$(): Observable<Map<string, LoadingState>>;
|
|
3130
|
+
/**
|
|
3131
|
+
* Observable that emits true when any loading operation is active
|
|
3132
|
+
*/
|
|
3133
|
+
get isAnyLoading$(): Observable<boolean>;
|
|
3134
|
+
/**
|
|
3135
|
+
* Get observable for a specific loading operation
|
|
3136
|
+
* @param id - The loading operation identifier
|
|
3137
|
+
*/
|
|
3138
|
+
isLoading$(id?: string): Observable<boolean>;
|
|
3139
|
+
/**
|
|
3140
|
+
* Get observable for loading state with message
|
|
3141
|
+
* @param id - The loading operation identifier
|
|
3142
|
+
*/
|
|
3143
|
+
getState$(id?: string): Observable<LoadingState | undefined>;
|
|
3144
|
+
/**
|
|
3145
|
+
* Check if a specific operation is currently loading (synchronous)
|
|
3146
|
+
* @param id - The loading operation identifier
|
|
3147
|
+
*/
|
|
3148
|
+
isLoading(id?: string): boolean;
|
|
3149
|
+
/**
|
|
3150
|
+
* Check if any operation is currently loading (synchronous)
|
|
3151
|
+
*/
|
|
3152
|
+
isAnyLoading(): boolean;
|
|
3153
|
+
/**
|
|
3154
|
+
* Start a loading operation
|
|
3155
|
+
* @param id - The loading operation identifier
|
|
3156
|
+
* @param message - Optional message to display
|
|
3157
|
+
*/
|
|
3158
|
+
start(id?: string, message?: string): void;
|
|
3159
|
+
/**
|
|
3160
|
+
* Stop a loading operation
|
|
3161
|
+
* @param id - The loading operation identifier
|
|
3162
|
+
*/
|
|
3163
|
+
stop(id?: string): void;
|
|
3164
|
+
/**
|
|
3165
|
+
* Update progress for a loading operation
|
|
3166
|
+
* @param id - The loading operation identifier
|
|
3167
|
+
* @param progress - Progress percentage (0-100)
|
|
3168
|
+
* @param message - Optional updated message
|
|
3169
|
+
*/
|
|
3170
|
+
setProgress(id: string, progress: number, message?: string): void;
|
|
3171
|
+
/**
|
|
3172
|
+
* Update the message for a loading operation
|
|
3173
|
+
* @param id - The loading operation identifier
|
|
3174
|
+
* @param message - New message to display
|
|
3175
|
+
*/
|
|
3176
|
+
setMessage(id: string, message: string): void;
|
|
3177
|
+
/**
|
|
3178
|
+
* Stop all loading operations
|
|
3179
|
+
*/
|
|
3180
|
+
stopAll(): void;
|
|
3181
|
+
/**
|
|
3182
|
+
* Remove a loading state completely
|
|
3183
|
+
* @param id - The loading operation identifier
|
|
3184
|
+
*/
|
|
3185
|
+
remove(id: string): void;
|
|
3186
|
+
/**
|
|
3187
|
+
* Execute an async operation with automatic loading state management
|
|
3188
|
+
* @param id - The loading operation identifier
|
|
3189
|
+
* @param operation - The async operation to execute
|
|
3190
|
+
* @param message - Optional loading message
|
|
3191
|
+
* @returns The result of the operation
|
|
3192
|
+
*/
|
|
3193
|
+
withLoading<T>(id: string, operation: () => Promise<T>, message?: string): Promise<T>;
|
|
3194
|
+
/**
|
|
3195
|
+
* Update a loading state
|
|
3196
|
+
*/
|
|
3197
|
+
private updateState;
|
|
3198
|
+
/**
|
|
3199
|
+
* Emit current states to subscribers
|
|
3200
|
+
*/
|
|
3201
|
+
private emitStates;
|
|
3202
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoadingService, never>;
|
|
3203
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LoadingService>;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
/**
|
|
3207
|
+
* String utility functions for PECB UI Components
|
|
3208
|
+
* @module utils/string
|
|
3209
|
+
*/
|
|
3210
|
+
/**
|
|
3211
|
+
* Convert a string to kebab-case
|
|
3212
|
+
* @param str - The string to convert
|
|
3213
|
+
* @returns The kebab-case string
|
|
3214
|
+
*
|
|
3215
|
+
* @example
|
|
3216
|
+
* toKebabCase('myComponentName') // 'my-component-name'
|
|
3217
|
+
* toKebabCase('MyComponentName') // 'my-component-name'
|
|
3218
|
+
*/
|
|
3219
|
+
declare function toKebabCase(str: string): string;
|
|
3220
|
+
/**
|
|
3221
|
+
* Convert a string to camelCase
|
|
3222
|
+
* @param str - The string to convert
|
|
3223
|
+
* @returns The camelCase string
|
|
3224
|
+
*
|
|
3225
|
+
* @example
|
|
3226
|
+
* toCamelCase('my-component-name') // 'myComponentName'
|
|
3227
|
+
* toCamelCase('my_component_name') // 'myComponentName'
|
|
3228
|
+
*/
|
|
3229
|
+
declare function toCamelCase(str: string): string;
|
|
3230
|
+
/**
|
|
3231
|
+
* Convert a string to PascalCase
|
|
3232
|
+
* @param str - The string to convert
|
|
3233
|
+
* @returns The PascalCase string
|
|
3234
|
+
*
|
|
3235
|
+
* @example
|
|
3236
|
+
* toPascalCase('my-component-name') // 'MyComponentName'
|
|
3237
|
+
*/
|
|
3238
|
+
declare function toPascalCase(str: string): string;
|
|
3239
|
+
/**
|
|
3240
|
+
* Convert a string to snake_case
|
|
3241
|
+
* @param str - The string to convert
|
|
3242
|
+
* @returns The snake_case string
|
|
3243
|
+
*
|
|
3244
|
+
* @example
|
|
3245
|
+
* toSnakeCase('myComponentName') // 'my_component_name'
|
|
3246
|
+
*/
|
|
3247
|
+
declare function toSnakeCase(str: string): string;
|
|
3248
|
+
/**
|
|
3249
|
+
* Capitalize the first letter of a string
|
|
3250
|
+
* @param str - The string to capitalize
|
|
3251
|
+
* @returns The capitalized string
|
|
3252
|
+
*
|
|
3253
|
+
* @example
|
|
3254
|
+
* capitalize('hello world') // 'Hello world'
|
|
3255
|
+
*/
|
|
3256
|
+
declare function capitalize(str: string): string;
|
|
3257
|
+
/**
|
|
3258
|
+
* Truncate a string to a specified length
|
|
3259
|
+
* @param str - The string to truncate
|
|
3260
|
+
* @param maxLength - Maximum length
|
|
3261
|
+
* @param suffix - Suffix to append when truncated (default: '...')
|
|
3262
|
+
* @returns The truncated string
|
|
3263
|
+
*
|
|
3264
|
+
* @example
|
|
3265
|
+
* truncate('Hello World', 8) // 'Hello...'
|
|
3266
|
+
* truncate('Hello World', 8, '…') // 'Hello W…'
|
|
3267
|
+
*/
|
|
3268
|
+
declare function truncate(str: string, maxLength: number, suffix?: string): string;
|
|
3269
|
+
/**
|
|
3270
|
+
* Check if a string is empty or contains only whitespace
|
|
3271
|
+
* @param str - The string to check
|
|
3272
|
+
* @returns True if the string is empty or whitespace
|
|
3273
|
+
*
|
|
3274
|
+
* @example
|
|
3275
|
+
* isBlank('') // true
|
|
3276
|
+
* isBlank(' ') // true
|
|
3277
|
+
* isBlank('hello') // false
|
|
3278
|
+
*/
|
|
3279
|
+
declare function isBlank(str: string | null | undefined): boolean;
|
|
3280
|
+
/**
|
|
3281
|
+
* Check if a string is not empty and contains non-whitespace characters
|
|
3282
|
+
* @param str - The string to check
|
|
3283
|
+
* @returns True if the string is not empty
|
|
3284
|
+
*/
|
|
3285
|
+
declare function isNotBlank(str: string | null | undefined): str is string;
|
|
3286
|
+
/**
|
|
3287
|
+
* Generate a slug from a string (URL-friendly)
|
|
3288
|
+
* @param str - The string to convert
|
|
3289
|
+
* @returns URL-friendly slug
|
|
3290
|
+
*
|
|
3291
|
+
* @example
|
|
3292
|
+
* slugify('Hello World!') // 'hello-world'
|
|
3293
|
+
* slugify('Café Latte') // 'cafe-latte'
|
|
3294
|
+
*/
|
|
3295
|
+
declare function slugify(str: string): string;
|
|
3296
|
+
/**
|
|
3297
|
+
* Escape HTML special characters
|
|
3298
|
+
* @param str - The string to escape
|
|
3299
|
+
* @returns The escaped string
|
|
3300
|
+
*
|
|
3301
|
+
* @example
|
|
3302
|
+
* escapeHtml('<script>alert("XSS")</script>') // '<script>alert("XSS")</script>'
|
|
3303
|
+
*/
|
|
3304
|
+
declare function escapeHtml(str: string): string;
|
|
3305
|
+
/**
|
|
3306
|
+
* Strip HTML tags from a string
|
|
3307
|
+
* @param str - The string containing HTML
|
|
3308
|
+
* @returns The string without HTML tags
|
|
3309
|
+
*
|
|
3310
|
+
* @example
|
|
3311
|
+
* stripHtml('<p>Hello <strong>World</strong></p>') // 'Hello World'
|
|
3312
|
+
*/
|
|
3313
|
+
declare function stripHtml(str: string): string;
|
|
3314
|
+
/**
|
|
3315
|
+
* Generate initials from a name
|
|
3316
|
+
* @param name - The name to extract initials from
|
|
3317
|
+
* @param maxLength - Maximum number of initials (default: 2)
|
|
3318
|
+
* @returns The initials in uppercase
|
|
3319
|
+
*
|
|
3320
|
+
* @example
|
|
3321
|
+
* getInitials('John Doe') // 'JD'
|
|
3322
|
+
* getInitials('John Michael Doe', 3) // 'JMD'
|
|
3323
|
+
*/
|
|
3324
|
+
declare function getInitials(name: string, maxLength?: number): string;
|
|
3325
|
+
/**
|
|
3326
|
+
* Pluralize a word based on count
|
|
3327
|
+
* @param count - The count to check
|
|
3328
|
+
* @param singular - Singular form
|
|
3329
|
+
* @param plural - Plural form (optional, defaults to singular + 's')
|
|
3330
|
+
* @returns The appropriate form of the word
|
|
3331
|
+
*
|
|
3332
|
+
* @example
|
|
3333
|
+
* pluralize(1, 'item') // 'item'
|
|
3334
|
+
* pluralize(5, 'item') // 'items'
|
|
3335
|
+
* pluralize(2, 'child', 'children') // 'children'
|
|
3336
|
+
*/
|
|
3337
|
+
declare function pluralize(count: number, singular: string, plural?: string): string;
|
|
3338
|
+
/**
|
|
3339
|
+
* Format a number as a string with count and pluralized label
|
|
3340
|
+
* @param count - The count
|
|
3341
|
+
* @param singular - Singular form of the label
|
|
3342
|
+
* @param plural - Plural form (optional)
|
|
3343
|
+
* @returns Formatted string like "5 items"
|
|
3344
|
+
*
|
|
3345
|
+
* @example
|
|
3346
|
+
* formatCount(1, 'item') // '1 item'
|
|
3347
|
+
* formatCount(5, 'item') // '5 items'
|
|
3348
|
+
*/
|
|
3349
|
+
declare function formatCount(count: number, singular: string, plural?: string): string;
|
|
3350
|
+
|
|
3351
|
+
/**
|
|
3352
|
+
* DOM utility functions for PECB UI Components
|
|
3353
|
+
* @module utils/dom
|
|
3354
|
+
*/
|
|
3355
|
+
/**
|
|
3356
|
+
* Check if code is running in a browser environment
|
|
3357
|
+
* @returns True if running in browser
|
|
3358
|
+
*/
|
|
3359
|
+
declare function isBrowser(): boolean;
|
|
3360
|
+
/**
|
|
3361
|
+
* Generate a unique ID for DOM elements
|
|
3362
|
+
* @param prefix - Optional prefix for the ID
|
|
3363
|
+
* @returns A unique ID string
|
|
3364
|
+
*
|
|
3365
|
+
* @example
|
|
3366
|
+
* generateUniqueId('btn') // 'btn-a1b2c3d4'
|
|
3367
|
+
*/
|
|
3368
|
+
declare function generateUniqueId(prefix?: string): string;
|
|
3369
|
+
/**
|
|
3370
|
+
* Check if an element matches a CSS selector
|
|
3371
|
+
* @param element - The element to check
|
|
3372
|
+
* @param selector - The CSS selector
|
|
3373
|
+
* @returns True if the element matches
|
|
3374
|
+
*/
|
|
3375
|
+
declare function matchesSelector(element: Element, selector: string): boolean;
|
|
3376
|
+
/**
|
|
3377
|
+
* Find the closest ancestor matching a selector
|
|
3378
|
+
* @param element - Starting element
|
|
3379
|
+
* @param selector - CSS selector to match
|
|
3380
|
+
* @returns The matching ancestor or null
|
|
3381
|
+
*/
|
|
3382
|
+
declare function closestElement<T extends Element>(element: Element, selector: string): T | null;
|
|
3383
|
+
/**
|
|
3384
|
+
* Check if an element is visible in the viewport
|
|
3385
|
+
* @param element - The element to check
|
|
3386
|
+
* @param partial - Whether partial visibility counts
|
|
3387
|
+
* @returns True if visible
|
|
3388
|
+
*/
|
|
3389
|
+
declare function isElementVisible(element: Element, partial?: boolean): boolean;
|
|
3390
|
+
/**
|
|
3391
|
+
* Get all focusable elements within a container
|
|
3392
|
+
* @param container - The container element
|
|
3393
|
+
* @returns Array of focusable elements
|
|
3394
|
+
*/
|
|
3395
|
+
declare function getFocusableElements(container: Element): HTMLElement[];
|
|
3396
|
+
/**
|
|
3397
|
+
* Trap focus within a container (useful for modals)
|
|
3398
|
+
* @param container - The container to trap focus in
|
|
3399
|
+
* @returns Cleanup function to remove the trap
|
|
3400
|
+
*/
|
|
3401
|
+
declare function trapFocus(container: HTMLElement): () => void;
|
|
3402
|
+
/**
|
|
3403
|
+
* Scroll an element into view smoothly
|
|
3404
|
+
* @param element - The element to scroll to
|
|
3405
|
+
* @param options - Scroll options
|
|
3406
|
+
*/
|
|
3407
|
+
declare function scrollIntoView(element: Element, options?: ScrollIntoViewOptions): void;
|
|
3408
|
+
/**
|
|
3409
|
+
* Get the scroll parent of an element
|
|
3410
|
+
* @param element - The element to find scroll parent for
|
|
3411
|
+
* @returns The scroll parent element
|
|
3412
|
+
*/
|
|
3413
|
+
declare function getScrollParent(element: Element): Element | null;
|
|
3414
|
+
/**
|
|
3415
|
+
* Disable body scroll (useful for modals)
|
|
3416
|
+
* @returns Cleanup function to re-enable scroll
|
|
3417
|
+
*/
|
|
3418
|
+
declare function disableBodyScroll(): () => void;
|
|
3419
|
+
/**
|
|
3420
|
+
* Copy text to clipboard
|
|
3421
|
+
* @param text - The text to copy
|
|
3422
|
+
* @returns Promise that resolves when copied
|
|
3423
|
+
*/
|
|
3424
|
+
declare function copyToClipboard(text: string): Promise<void>;
|
|
3425
|
+
/**
|
|
3426
|
+
* Check if an element has a specific CSS class
|
|
3427
|
+
* @param element - The element to check
|
|
3428
|
+
* @param className - The class name
|
|
3429
|
+
* @returns True if the element has the class
|
|
3430
|
+
*/
|
|
3431
|
+
declare function hasClass(element: Element, className: string): boolean;
|
|
3432
|
+
/**
|
|
3433
|
+
* Add CSS class(es) to an element
|
|
3434
|
+
* @param element - The element to modify
|
|
3435
|
+
* @param classNames - Class name(s) to add
|
|
3436
|
+
*/
|
|
3437
|
+
declare function addClass(element: Element, ...classNames: string[]): void;
|
|
3438
|
+
/**
|
|
3439
|
+
* Remove CSS class(es) from an element
|
|
3440
|
+
* @param element - The element to modify
|
|
3441
|
+
* @param classNames - Class name(s) to remove
|
|
3442
|
+
*/
|
|
3443
|
+
declare function removeClass(element: Element, ...classNames: string[]): void;
|
|
3444
|
+
/**
|
|
3445
|
+
* Toggle a CSS class on an element
|
|
3446
|
+
* @param element - The element to modify
|
|
3447
|
+
* @param className - The class name to toggle
|
|
3448
|
+
* @param force - Optional force add (true) or remove (false)
|
|
3449
|
+
* @returns True if the class is now present
|
|
3450
|
+
*/
|
|
3451
|
+
declare function toggleClass(element: Element, className: string, force?: boolean): boolean;
|
|
3452
|
+
/**
|
|
3453
|
+
* Get computed CSS property value
|
|
3454
|
+
* @param element - The element to check
|
|
3455
|
+
* @param property - CSS property name
|
|
3456
|
+
* @returns The computed value
|
|
3457
|
+
*/
|
|
3458
|
+
declare function getComputedStyleValue(element: Element, property: string): string;
|
|
3459
|
+
|
|
3460
|
+
/**
|
|
3461
|
+
* Accessibility utility functions for PECB UI Components
|
|
3462
|
+
* Helps ensure WCAG 2.1 compliance
|
|
3463
|
+
* @module utils/accessibility
|
|
3464
|
+
*/
|
|
3465
|
+
/**
|
|
3466
|
+
* ARIA live region politeness levels
|
|
3467
|
+
*/
|
|
3468
|
+
type AriaLive = 'off' | 'polite' | 'assertive';
|
|
3469
|
+
/**
|
|
3470
|
+
* ARIA roles commonly used in components
|
|
3471
|
+
*/
|
|
3472
|
+
type AriaRole = 'alert' | 'alertdialog' | 'button' | 'checkbox' | 'combobox' | 'dialog' | 'grid' | 'gridcell' | 'link' | 'listbox' | 'menu' | 'menubar' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'option' | 'progressbar' | 'radio' | 'radiogroup' | 'scrollbar' | 'searchbox' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'tablist' | 'tabpanel' | 'textbox' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
|
|
3473
|
+
/**
|
|
3474
|
+
* Standard ARIA attributes interface for components
|
|
3475
|
+
*/
|
|
3476
|
+
interface AriaAttributes {
|
|
3477
|
+
role?: AriaRole;
|
|
3478
|
+
'aria-label'?: string;
|
|
3479
|
+
'aria-labelledby'?: string;
|
|
3480
|
+
'aria-describedby'?: string;
|
|
3481
|
+
'aria-expanded'?: boolean;
|
|
3482
|
+
'aria-selected'?: boolean;
|
|
3483
|
+
'aria-checked'?: boolean | 'mixed';
|
|
3484
|
+
'aria-disabled'?: boolean;
|
|
3485
|
+
'aria-hidden'?: boolean;
|
|
3486
|
+
'aria-invalid'?: boolean;
|
|
3487
|
+
'aria-required'?: boolean;
|
|
3488
|
+
'aria-readonly'?: boolean;
|
|
3489
|
+
'aria-pressed'?: boolean | 'mixed';
|
|
3490
|
+
'aria-current'?: boolean | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
3491
|
+
'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
3492
|
+
'aria-controls'?: string;
|
|
3493
|
+
'aria-owns'?: string;
|
|
3494
|
+
'aria-live'?: AriaLive;
|
|
3495
|
+
'aria-atomic'?: boolean;
|
|
3496
|
+
'aria-busy'?: boolean;
|
|
3497
|
+
'aria-valuemin'?: number;
|
|
3498
|
+
'aria-valuemax'?: number;
|
|
3499
|
+
'aria-valuenow'?: number;
|
|
3500
|
+
'aria-valuetext'?: string;
|
|
3501
|
+
'aria-orientation'?: 'horizontal' | 'vertical';
|
|
3502
|
+
'aria-activedescendant'?: string;
|
|
3503
|
+
'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both';
|
|
3504
|
+
'aria-multiselectable'?: boolean;
|
|
3505
|
+
'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other';
|
|
3506
|
+
'aria-level'?: number;
|
|
3507
|
+
'aria-setsize'?: number;
|
|
3508
|
+
'aria-posinset'?: number;
|
|
3509
|
+
tabindex?: number;
|
|
3510
|
+
}
|
|
3511
|
+
/**
|
|
3512
|
+
* Generate ARIA attributes for a button component
|
|
3513
|
+
* @param options - Button accessibility options
|
|
3514
|
+
* @returns ARIA attributes object
|
|
3515
|
+
*/
|
|
3516
|
+
declare function getButtonAriaAttributes(options: {
|
|
3517
|
+
label?: string;
|
|
3518
|
+
pressed?: boolean;
|
|
3519
|
+
expanded?: boolean;
|
|
3520
|
+
disabled?: boolean;
|
|
3521
|
+
controls?: string;
|
|
3522
|
+
haspopup?: AriaAttributes['aria-haspopup'];
|
|
3523
|
+
describedby?: string;
|
|
3524
|
+
}): AriaAttributes;
|
|
3525
|
+
/**
|
|
3526
|
+
* Generate ARIA attributes for a dialog/modal component
|
|
3527
|
+
* @param options - Dialog accessibility options
|
|
3528
|
+
* @returns ARIA attributes object
|
|
3529
|
+
*/
|
|
3530
|
+
declare function getDialogAriaAttributes(options: {
|
|
3531
|
+
labelledby?: string;
|
|
3532
|
+
describedby?: string;
|
|
3533
|
+
modal?: boolean;
|
|
3534
|
+
}): AriaAttributes;
|
|
3535
|
+
/**
|
|
3536
|
+
* Generate ARIA attributes for a form input
|
|
3537
|
+
* @param options - Input accessibility options
|
|
3538
|
+
* @returns ARIA attributes object
|
|
3539
|
+
*/
|
|
3540
|
+
declare function getInputAriaAttributes(options: {
|
|
3541
|
+
label?: string;
|
|
3542
|
+
labelledby?: string;
|
|
3543
|
+
describedby?: string;
|
|
3544
|
+
invalid?: boolean;
|
|
3545
|
+
required?: boolean;
|
|
3546
|
+
readonly?: boolean;
|
|
3547
|
+
disabled?: boolean;
|
|
3548
|
+
errorId?: string;
|
|
3549
|
+
helperId?: string;
|
|
3550
|
+
}): AriaAttributes;
|
|
3551
|
+
/**
|
|
3552
|
+
* Generate ARIA attributes for a progress bar
|
|
3553
|
+
* @param options - Progress accessibility options
|
|
3554
|
+
* @returns ARIA attributes object
|
|
3555
|
+
*/
|
|
3556
|
+
declare function getProgressAriaAttributes(options: {
|
|
3557
|
+
value: number;
|
|
3558
|
+
min?: number;
|
|
3559
|
+
max?: number;
|
|
3560
|
+
label?: string;
|
|
3561
|
+
valueText?: string;
|
|
3562
|
+
}): AriaAttributes;
|
|
3563
|
+
/**
|
|
3564
|
+
* Generate ARIA attributes for a tab component
|
|
3565
|
+
* @param options - Tab accessibility options
|
|
3566
|
+
* @returns ARIA attributes for tab and tabpanel
|
|
3567
|
+
*/
|
|
3568
|
+
declare function getTabAriaAttributes(options: {
|
|
3569
|
+
tabId: string;
|
|
3570
|
+
panelId: string;
|
|
3571
|
+
selected: boolean;
|
|
3572
|
+
disabled?: boolean;
|
|
3573
|
+
}): {
|
|
3574
|
+
tab: AriaAttributes;
|
|
3575
|
+
panel: AriaAttributes;
|
|
3576
|
+
};
|
|
3577
|
+
/**
|
|
3578
|
+
* Generate ARIA attributes for a listbox option
|
|
3579
|
+
* @param options - Option accessibility options
|
|
3580
|
+
* @returns ARIA attributes object
|
|
3581
|
+
*/
|
|
3582
|
+
declare function getOptionAriaAttributes(options: {
|
|
3583
|
+
selected: boolean;
|
|
3584
|
+
disabled?: boolean;
|
|
3585
|
+
setsize?: number;
|
|
3586
|
+
posinset?: number;
|
|
3587
|
+
}): AriaAttributes;
|
|
3588
|
+
/**
|
|
3589
|
+
* Generate linked IDs for label and input association
|
|
3590
|
+
* @param baseName - Base name for generating IDs
|
|
3591
|
+
* @returns Object with inputId, labelId, errorId, and helperId
|
|
3592
|
+
*/
|
|
3593
|
+
declare function generateLinkedIds(baseName?: string): {
|
|
3594
|
+
inputId: string;
|
|
3595
|
+
labelId: string;
|
|
3596
|
+
errorId: string;
|
|
3597
|
+
helperId: string;
|
|
3598
|
+
};
|
|
3599
|
+
/**
|
|
3600
|
+
* Create a visually hidden element for screen readers
|
|
3601
|
+
* @returns CSS styles for visually hidden content
|
|
3602
|
+
*/
|
|
3603
|
+
declare function getVisuallyHiddenStyles(): Record<string, string>;
|
|
3604
|
+
/**
|
|
3605
|
+
* Check if the user has enabled reduced motion preference
|
|
3606
|
+
* @returns True if user prefers reduced motion
|
|
3607
|
+
*/
|
|
3608
|
+
declare function prefersReducedMotion(): boolean;
|
|
3609
|
+
/**
|
|
3610
|
+
* Check if the user has enabled high contrast mode
|
|
3611
|
+
* @returns True if high contrast mode is enabled
|
|
3612
|
+
*/
|
|
3613
|
+
declare function prefersHighContrast(): boolean;
|
|
3614
|
+
/**
|
|
3615
|
+
* Announce a message to screen readers using aria-live regions
|
|
3616
|
+
* @param message - The message to announce
|
|
3617
|
+
* @param politeness - The urgency level (polite or assertive)
|
|
3618
|
+
*/
|
|
3619
|
+
declare function announceToScreenReader(message: string, politeness?: 'polite' | 'assertive'): void;
|
|
3620
|
+
/**
|
|
3621
|
+
* Get the appropriate aria-current value for navigation items
|
|
3622
|
+
* @param isActive - Whether the item is active/current
|
|
3623
|
+
* @param type - The type of current indicator
|
|
3624
|
+
* @returns The aria-current value or undefined
|
|
3625
|
+
*/
|
|
3626
|
+
declare function getAriaCurrent(isActive: boolean, type?: 'page' | 'step' | 'location' | 'date' | 'time'): AriaAttributes['aria-current'];
|
|
3627
|
+
|
|
3628
|
+
/**
|
|
3629
|
+
* Error handling utility functions for PECB UI Components
|
|
3630
|
+
* Provides standardized error handling patterns
|
|
3631
|
+
* @module utils/error
|
|
3632
|
+
*/
|
|
3633
|
+
/**
|
|
3634
|
+
* Error severity levels
|
|
3635
|
+
*/
|
|
3636
|
+
type ErrorSeverity = 'info' | 'warning' | 'error' | 'critical';
|
|
3637
|
+
/**
|
|
3638
|
+
* Error categories for classification
|
|
3639
|
+
*/
|
|
3640
|
+
type ErrorCategory = 'validation' | 'network' | 'authentication' | 'authorization' | 'configuration' | 'runtime' | 'unknown';
|
|
3641
|
+
/**
|
|
3642
|
+
* Standard error interface for PECB components
|
|
3643
|
+
*/
|
|
3644
|
+
interface PecbError {
|
|
3645
|
+
/** Unique error code */
|
|
3646
|
+
code: string;
|
|
3647
|
+
/** Human-readable error message */
|
|
3648
|
+
message: string;
|
|
3649
|
+
/** Error severity level */
|
|
3650
|
+
severity: ErrorSeverity;
|
|
3651
|
+
/** Error category */
|
|
3652
|
+
category: ErrorCategory;
|
|
3653
|
+
/** Original error if wrapping another error */
|
|
3654
|
+
originalError?: Error;
|
|
3655
|
+
/** Additional context data */
|
|
3656
|
+
context?: Record<string, unknown>;
|
|
3657
|
+
/** Timestamp when error occurred */
|
|
3658
|
+
timestamp: Date;
|
|
3659
|
+
/** Suggested recovery action */
|
|
3660
|
+
recoveryAction?: string;
|
|
3661
|
+
/** Whether the error is recoverable */
|
|
3662
|
+
recoverable: boolean;
|
|
3663
|
+
}
|
|
3664
|
+
/**
|
|
3665
|
+
* Validation error details
|
|
3666
|
+
*/
|
|
3667
|
+
interface ValidationError {
|
|
3668
|
+
/** Field name that failed validation */
|
|
3669
|
+
field: string;
|
|
3670
|
+
/** Validation rule that failed */
|
|
3671
|
+
rule: string;
|
|
3672
|
+
/** Error message */
|
|
3673
|
+
message: string;
|
|
3674
|
+
/** Expected value or format */
|
|
3675
|
+
expected?: string;
|
|
3676
|
+
/** Actual value received */
|
|
3677
|
+
actual?: unknown;
|
|
3678
|
+
}
|
|
3679
|
+
/**
|
|
3680
|
+
* Error factory options
|
|
3681
|
+
*/
|
|
3682
|
+
interface ErrorOptions {
|
|
3683
|
+
code?: string;
|
|
3684
|
+
severity?: ErrorSeverity;
|
|
3685
|
+
category?: ErrorCategory;
|
|
3686
|
+
context?: Record<string, unknown>;
|
|
3687
|
+
recoveryAction?: string;
|
|
3688
|
+
recoverable?: boolean;
|
|
3689
|
+
originalError?: Error;
|
|
3690
|
+
}
|
|
3691
|
+
/**
|
|
3692
|
+
* Create a standardized PECB error
|
|
3693
|
+
* @param message - Error message
|
|
3694
|
+
* @param options - Additional error options
|
|
3695
|
+
* @returns A standardized PecbError object
|
|
3696
|
+
*
|
|
3697
|
+
* @example
|
|
3698
|
+
* const error = createError('Invalid input', {
|
|
3699
|
+
* code: 'VALIDATION_001',
|
|
3700
|
+
* category: 'validation',
|
|
3701
|
+
* severity: 'warning',
|
|
3702
|
+
* recoverable: true
|
|
3703
|
+
* });
|
|
3704
|
+
*/
|
|
3705
|
+
declare function createError(message: string, options?: ErrorOptions): PecbError;
|
|
3706
|
+
/**
|
|
3707
|
+
* Create a validation error
|
|
3708
|
+
* @param field - Field name that failed validation
|
|
3709
|
+
* @param rule - Validation rule that failed
|
|
3710
|
+
* @param message - Error message
|
|
3711
|
+
* @returns A ValidationError object
|
|
3712
|
+
*
|
|
3713
|
+
* @example
|
|
3714
|
+
* const error = createValidationError('email', 'format', 'Invalid email format');
|
|
3715
|
+
*/
|
|
3716
|
+
declare function createValidationError(field: string, rule: string, message: string, details?: {
|
|
3717
|
+
expected?: string;
|
|
3718
|
+
actual?: unknown;
|
|
3719
|
+
}): ValidationError;
|
|
3720
|
+
/**
|
|
3721
|
+
* Wrap an unknown error in a PecbError
|
|
3722
|
+
* @param error - The error to wrap
|
|
3723
|
+
* @param options - Additional options
|
|
3724
|
+
* @returns A standardized PecbError
|
|
3725
|
+
*
|
|
3726
|
+
* @example
|
|
3727
|
+
* try {
|
|
3728
|
+
* await riskyOperation();
|
|
3729
|
+
* } catch (e) {
|
|
3730
|
+
* const error = wrapError(e, { category: 'network' });
|
|
3731
|
+
* handleError(error);
|
|
3732
|
+
* }
|
|
3733
|
+
*/
|
|
3734
|
+
declare function wrapError(error: unknown, options?: ErrorOptions): PecbError;
|
|
3735
|
+
/**
|
|
3736
|
+
* Type guard to check if an object is a PecbError
|
|
3737
|
+
* @param error - The object to check
|
|
3738
|
+
* @returns True if the object is a PecbError
|
|
3739
|
+
*/
|
|
3740
|
+
declare function isPecbError(error: unknown): error is PecbError;
|
|
3741
|
+
/**
|
|
3742
|
+
* Type guard to check if an error is recoverable
|
|
3743
|
+
* @param error - The error to check
|
|
3744
|
+
* @returns True if the error is recoverable
|
|
3745
|
+
*/
|
|
3746
|
+
declare function isRecoverableError(error: PecbError): boolean;
|
|
3747
|
+
/**
|
|
3748
|
+
* Format an error for display to users
|
|
3749
|
+
* @param error - The error to format
|
|
3750
|
+
* @param includeCode - Whether to include the error code
|
|
3751
|
+
* @returns Formatted error message
|
|
3752
|
+
*/
|
|
3753
|
+
declare function formatErrorMessage(error: PecbError, includeCode?: boolean): string;
|
|
3754
|
+
/**
|
|
3755
|
+
* Format an error for logging
|
|
3756
|
+
* @param error - The error to format
|
|
3757
|
+
* @returns Formatted error string for logging
|
|
3758
|
+
*/
|
|
3759
|
+
declare function formatErrorForLog(error: PecbError): string;
|
|
3760
|
+
/**
|
|
3761
|
+
* Create a network error
|
|
3762
|
+
* @param message - Error message
|
|
3763
|
+
* @param statusCode - HTTP status code if applicable
|
|
3764
|
+
* @param originalError - Original error
|
|
3765
|
+
* @returns A network category PecbError
|
|
3766
|
+
*/
|
|
3767
|
+
declare function createNetworkError(message: string, statusCode?: number, originalError?: Error): PecbError;
|
|
3768
|
+
/**
|
|
3769
|
+
* Create an authentication error
|
|
3770
|
+
* @param message - Error message
|
|
3771
|
+
* @param originalError - Original error
|
|
3772
|
+
* @returns An authentication category PecbError
|
|
3773
|
+
*/
|
|
3774
|
+
declare function createAuthError(message: string, originalError?: Error): PecbError;
|
|
3775
|
+
/**
|
|
3776
|
+
* Create an authorization error
|
|
3777
|
+
* @param message - Error message
|
|
3778
|
+
* @param resource - The resource that access was denied to
|
|
3779
|
+
* @returns An authorization category PecbError
|
|
3780
|
+
*/
|
|
3781
|
+
declare function createAuthorizationError(message: string, resource?: string): PecbError;
|
|
3782
|
+
/**
|
|
3783
|
+
* Create a configuration error
|
|
3784
|
+
* @param message - Error message
|
|
3785
|
+
* @param configKey - The configuration key that is invalid
|
|
3786
|
+
* @returns A configuration category PecbError
|
|
3787
|
+
*/
|
|
3788
|
+
declare function createConfigError(message: string, configKey?: string): PecbError;
|
|
3789
|
+
/**
|
|
3790
|
+
* Error handler type
|
|
3791
|
+
*/
|
|
3792
|
+
type ErrorHandler = (error: PecbError) => void;
|
|
3793
|
+
/**
|
|
3794
|
+
* Register an error handler for a category
|
|
3795
|
+
* @param category - The error category to handle
|
|
3796
|
+
* @param handler - The handler function
|
|
3797
|
+
* @returns Cleanup function to unregister
|
|
3798
|
+
*/
|
|
3799
|
+
declare function registerErrorHandler(category: ErrorCategory, handler: ErrorHandler): () => void;
|
|
3800
|
+
/**
|
|
3801
|
+
* Handle an error by invoking registered handlers
|
|
3802
|
+
* @param error - The error to handle
|
|
3803
|
+
*/
|
|
3804
|
+
declare function handleError(error: PecbError): void;
|
|
3805
|
+
/**
|
|
3806
|
+
* Try to execute an operation and return a result or error
|
|
3807
|
+
* @param operation - The operation to execute
|
|
3808
|
+
* @param errorOptions - Options for error wrapping
|
|
3809
|
+
* @returns A tuple of [result, null] or [null, error]
|
|
3810
|
+
*/
|
|
3811
|
+
declare function tryAsync<T>(operation: () => Promise<T>, errorOptions?: ErrorOptions): Promise<[T, null] | [null, PecbError]>;
|
|
3812
|
+
/**
|
|
3813
|
+
* Synchronous version of tryAsync
|
|
3814
|
+
* @param operation - The operation to execute
|
|
3815
|
+
* @param errorOptions - Options for error wrapping
|
|
3816
|
+
* @returns A tuple of [result, null] or [null, error]
|
|
3817
|
+
*/
|
|
3818
|
+
declare function trySync<T>(operation: () => T, errorOptions?: ErrorOptions): [T, null] | [null, PecbError];
|
|
3819
|
+
|
|
3820
|
+
/**
|
|
3821
|
+
* All available icon names in the PECB icon library.
|
|
3822
|
+
* Use with `<pecb-icon name="icon-name">` for built-in icons.
|
|
3823
|
+
*/
|
|
3824
|
+
type IconName = 'activity' | 'add-square-01' | 'add-square-02' | 'add-square-03' | 'add-square-04' | 'alarm-01' | 'alarm-02' | 'alarm-03' | 'alarm-04' | 'alarm-05' | 'alarm-06' | 'alarm-check' | 'alarm-minus' | 'alarm-off' | 'alarm-plus' | 'alert-circle' | 'alert-square' | 'alert-triangle' | 'align-center' | 'align-down-01' | 'align-down-02' | 'align-horizontal-center-01' | 'align-horizontal-center-02' | 'align-horizontal-center-03' | 'align-justify' | 'align-left' | 'align-left-01' | 'align-left-02' | 'align-right' | 'align-right-01' | 'align-right-02' | 'align-up-01' | 'align-up-02' | 'align-vertical-center-01' | 'align-vertical-center-02' | 'align-vertical-center-03' | 'annotation' | 'annotation-alert' | 'annotation-check' | 'annotation-information' | 'annotation-plus' | 'annotation-typing' | 'annotation-x' | 'atom' | 'attatchment-01' | 'attatchment-02' | 'audio-settings-01' | 'audio-settings-02' | 'bag-01' | 'bag-02' | 'bag-03' | 'bag-04' | 'bag-05' | 'bank' | 'bank-note-01' | 'bank-note-02' | 'bank-note-03' | 'bank-note-04' | 'bank-note-05' | 'bank-note-06' | 'bar-chart-01' | 'bar-chart-02' | 'bar-chart-03' | 'bar-chart-04' | 'bar-chart-05' | 'bar-chart-square-01' | 'bar-chart-square-02' | 'bar-chart-square-03' | 'bar-chart-square-down-01' | 'bar-chart-square-down-02' | 'bar-chart-square-up-01' | 'bar-group-01' | 'bar-group-02' | 'bar-group-03' | 'battery-01' | 'battery-02' | 'battery-03' | 'battery-04' | 'battery-empty' | 'battery-fill-01' | 'battery-fill-02' | 'battery-fill-04' | 'bell-01' | 'bell-02' | 'bell-03' | 'bell-04' | 'bell-off-01' | 'bell-off-02' | 'bell-ringing-01' | 'bell-ringing-02' | 'bell-ringing-03' | 'bell-ringing-04' | 'bezier-01' | 'bezier-02' | 'bluetooth-01' | 'bluetooth-02' | 'bold-01' | 'bold-02' | 'book-01' | 'book-02' | 'book-03' | 'book-04' | 'book-05' | 'book-06' | 'box' | 'brackets' | 'brackets-check' | 'brackets-minus' | 'brackets-plus' | 'brackets-slash' | 'brackets-typing' | 'calculator-01' | 'calculator-02' | 'calendar-01' | 'calendar-02' | 'calendar-03' | 'calendar-04' | 'calendar-05' | 'calendar-06' | 'calendar-07' | 'calendar-check' | 'calendar-minus' | 'calendar-number' | 'calendar-plus' | 'camera-01' | 'camera-02' | 'camera-lens' | 'camera-off' | 'cancel-left' | 'cancel-right' | 'car' | 'card-01' | 'card-02' | 'card-add' | 'card-check' | 'card-down' | 'card-edit' | 'card-lock' | 'card-minus' | 'card-number' | 'card-shield' | 'card-up' | 'card-x' | 'cart' | 'center' | 'chart-breakout-circle' | 'chart-breakout-square' | 'check-01' | 'check-02' | 'check-broken' | 'check-contained' | 'check-square-broken' | 'check-square-contained' | 'chevron-double-down' | 'chevron-double-left' | 'chevron-double-right' | 'chevron-double-up' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chromecast' | 'circle' | 'clock-01' | 'clock-backward' | 'clock-check' | 'clock-forward' | 'clock-plus' | 'cloud-01' | 'cloud-02' | 'cloud-03' | 'cloud-04' | 'cloud-lightning' | 'cloud-rain' | 'cloud-snow' | 'cloud-sun' | 'code-01' | 'code-02' | 'code-03' | 'code-04' | 'coin-broken' | 'coin-hand' | 'coin-number' | 'coin-unbroken' | 'coins' | 'coins-rotate' | 'color-picker' | 'color-swatch-01' | 'color-swatch-02' | 'colors-01' | 'colors-02' | 'column-horizontal-01' | 'column-horizontal-02' | 'column-horizontal-03' | 'column-vertical-01' | 'column-vertical-02' | 'column-vertical-03' | 'compare' | 'compass' | 'component' | 'computer' | 'contrast' | 'copy-left' | 'copy-right' | 'crop-01' | 'crop-02' | 'currency-bath' | 'currency-bitcoin' | 'currency-cent' | 'currency-coin-bath' | 'currency-coin-bitcoin' | 'currency-coin-cent' | 'currency-coin-dollar' | 'currency-coin-euro' | 'currency-coin-pound' | 'currency-coin-rubel' | 'currency-coin-rupee' | 'currency-coin-yen' | 'currency-dollar' | 'currency-euro' | 'currency-pound' | 'currency-rubel' | 'currency-rupee' | 'currency-yen' | 'cursor-01' | 'cursor-02' | 'cursor-03' | 'cursor-04' | 'cursor-05' | 'cursor-06' | 'cursor-grab' | 'cursor-grabbed' | 'cursor-pointer' | 'dash' | 'data-01' | 'data-02' | 'data-03' | 'data-04' | 'delete' | 'delivery' | 'diamond' | 'disc' | 'discount-circle' | 'discount-square' | 'discount-star-01' | 'discount-star-02' | 'discount-star-03' | 'divider' | 'dot-horizontal' | 'dot-vertical' | 'download' | 'download-01' | 'download-02' | 'drop' | 'edit-01' | 'edit-02' | 'edit-03' | 'edit-04' | 'edit-contained' | 'email' | 'embed' | 'equals' | 'equals-not' | 'eraser-01' | 'eraser-02' | 'expand' | 'expand-02' | 'eye-closed' | 'eye-open' | 'face-id-01' | 'face-id-02' | 'fast-backward' | 'fast-forward' | 'favourite' | 'feather-01' | 'feather-02' | 'file' | 'file-01' | 'file-02' | 'file-03' | 'file-04' | 'file-05' | 'file-06' | 'file-attach-01' | 'file-attach-02' | 'file-attach-03' | 'file-branch' | 'file-check-01' | 'file-check-02' | 'file-code' | 'file-down-01' | 'file-down-02' | 'file-edit-01' | 'file-edit-02' | 'file-eye-01' | 'file-eye-02' | 'file-lock-01' | 'file-lock-02' | 'file-lock-03' | 'file-minus-01' | 'file-minus-02' | 'file-multiple' | 'file-none' | 'file-plus-01' | 'file-plus-02' | 'file-question-01' | 'file-question-02' | 'file-return-01' | 'file-return-02' | 'file-search-01' | 'file-search-02' | 'file-shield-01' | 'file-shield-02' | 'file-shield-03' | 'file-shred' | 'file-up-01' | 'file-up-02' | 'file-x-02' | 'filter' | 'fingerpint-01' | 'fingerpint-02' | 'flame-01' | 'flash-off' | 'flash-on' | 'flex-align-bottom-01' | 'flex-align-center-01' | 'flex-align-left-01' | 'flex-align-right-01' | 'flex-align-spaced-01' | 'flex-align-top-01' | 'flex-columns' | 'flip-01' | 'flip-02' | 'flip-left' | 'flip-right' | 'folder' | 'folder-code' | 'folder-down-01' | 'folder-down-02' | 'folder-minus-01' | 'folder-open-01' | 'folder-open-02' | 'folder-open-03' | 'folder-plus-01' | 'folder-plus-02' | 'folder-search-01' | 'folder-search-02' | 'folder-shield' | 'folder-up-01' | 'folder-up-02' | 'folder-x-01' | 'folder-x-02' | 'gear' | 'gift-01' | 'gift-02' | 'git-branch-01' | 'git-branch-02' | 'git-branch-03' | 'git-branch-04' | 'git-branch-05' | 'glasses-01' | 'glasses-02' | 'globe' | 'globe-01' | 'globe-02' | 'globe-03' | 'globe-04' | 'globe-05' | 'graduation-cap-01' | 'graduation-cap-02' | 'grid-01' | 'grid-02' | 'grid-03' | 'grid-04-filled' | 'hash-01' | 'hash-02' | 'header-01' | 'header-02' | 'headphones' | 'heart' | 'help' | 'help-circle-contained' | 'help-square-contained' | 'hexagon' | 'home-01' | 'home-02' | 'home-03' | 'home-04' | 'home-05' | 'horizontal-chart-01' | 'horizontal-chart-02' | 'horizontal-chart-03' | 'hourglass-01' | 'hourglass-02' | 'hourglass-03' | 'image' | 'image-01' | 'image-02' | 'image-03' | 'image-04' | 'image-add' | 'image-avatar' | 'image-check' | 'image-down' | 'image-focus' | 'image-indent-left' | 'image-indent-right' | 'image-minus' | 'image-no-borders' | 'image-question' | 'image-up' | 'image-x' | 'inbox-01' | 'inbox-02' | 'indent-decrease' | 'indent-increase' | 'indent-left' | 'indent-right' | 'info-square-01-contained' | 'info-square-02-contained-filled' | 'information-circle-contained' | 'intersect' | 'iphone-02' | 'italics-01' | 'italics-02' | 'key-01' | 'key-02' | 'keyboard' | 'laptop-01' | 'laptop-02' | 'layers-01' | 'layers-02' | 'layers-03' | 'layers-04' | 'layers-05' | 'layout-01' | 'layout-02' | 'layout-03' | 'layout-04' | 'layout-bottom' | 'layout-grid-01' | 'layout-left' | 'layout-right' | 'layout-scale' | 'layout-top' | 'letter-spacing-01' | 'letter-spacing-02' | 'letter-spacing-03' | 'lightbulb-01' | 'lightbulb-02' | 'lightbulb-03' | 'lightning-01' | 'lightning-02' | 'lightning-circle-contained' | 'lightning-filled' | 'lightning-square-contained' | 'line-chart-down-01' | 'line-chart-down-02' | 'line-chart-up-01' | 'line-chart-up-02' | 'line-height' | 'link' | 'link-angled' | 'link-broken' | 'link-external' | 'list' | 'list-numbers' | 'loader-01' | 'loader-02' | 'lock-01' | 'lock-02' | 'lock-03' | 'lock-04' | 'lock-open-01' | 'lock-open-02' | 'lock-open-03' | 'lock-open-04' | 'logout-01' | 'logout-02' | 'logout-03' | 'logout-04' | 'luggage-01' | 'luggage-02' | 'luggage-03' | 'luggage-04' | 'mail-01' | 'mail-02' | 'mail-03' | 'mail-04' | 'mail-05' | 'map-01' | 'map-02' | 'map-03' | 'map-04' | 'marker-01' | 'marker-02' | 'marker-03' | 'marker-04' | 'marker-05' | 'marker-06' | 'maximise-01' | 'maximise-02' | 'media-strip-01' | 'media-strip-02' | 'menu-01' | 'menu-02' | 'menu-03' | 'menu-04' | 'menu-05' | 'message-alert-circle' | 'message-alert-plus' | 'message-chat-01' | 'message-circle' | 'message-notify-circle' | 'message-notify-square' | 'message-square' | 'message-square-information' | 'message-square-plus' | 'message-square-typing' | 'message-square-x' | 'message-text-01' | 'message-text-02' | 'message-typing' | 'message-x' | 'microphone-01' | 'microphone-02' | 'microphone-off-01' | 'microphone-off-02' | 'minimise-01' | 'minimise-02' | 'minus-circle-contained' | 'minus-square-contained' | 'moon-01' | 'moon-02' | 'mouse' | 'move' | 'note-01' | 'note-02' | 'notification-box' | 'notification-bubble' | 'notification-square-01' | 'notification-square-02' | 'octagon' | 'overlap' | 'package-01' | 'package-02' | 'package-check' | 'package-minus' | 'package-plus' | 'package-x' | 'paint-bucket-01' | 'paint-bucket-02' | 'palette' | 'paperclip' | 'paperclip-01' | 'paperclip-02' | 'passport' | 'password-01' | 'password-02' | 'pause-01' | 'pause-02' | 'pause-03' | 'pen-tool-01' | 'pen-tool-02' | 'pen-tool-03' | 'pen-tool-04' | 'pencil-01' | 'pencil-02' | 'pencil-03' | 'pentagon' | 'percent-01' | 'percent-02' | 'percent-03' | 'perspective' | 'phone' | 'phone-call-01' | 'phone-call-02' | 'phone-down' | 'phone-incoming-01' | 'phone-incoming-02' | 'phone-off' | 'phone-outgoing-01' | 'phone-outgoing-02' | 'phone-up' | 'phone-x' | 'pie-chart-01' | 'pie-chart-02' | 'pie-chart-03' | 'plane' | 'play-01' | 'play-02' | 'play-03' | 'plug-01' | 'plus-01' | 'plus-02' | 'plus-03' | 'pointer-01' | 'pointer-02' | 'power' | 'presentation-01' | 'presentation-02' | 'presentation-03' | 'progress' | 'quote' | 'receipt' | 'receipt-lines' | 'refresh-01' | 'rss' | 'ruler' | 'save-01' | 'save-02' | 'scale-01' | 'scale-02' | 'scale-03' | 'scan' | 'scissors-01' | 'scissors-02' | 'scissors-03' | 'scissors-04' | 'search-01' | 'search-02' | 'send-01' | 'send-02' | 'send-03' | 'server-01' | 'server-02' | 'server-03' | 'server-04' | 'server-05' | 'server-06' | 'server-down' | 'server-up' | 'settings' | 'share' | 'shield-01' | 'shield-02' | 'shield-check' | 'shield-plus' | 'shuffle' | 'signal' | 'skew' | 'skip-back' | 'skip-forward' | 'slash-01-backward' | 'slash-01-forward' | 'slash-02-forward' | 'smiley-happy' | 'smiley-happy-plus' | 'smiley-neutral' | 'smiley-sad' | 'smiley-wink' | 'snowflake' | 'sort-horizontal' | 'sort-vertical-01' | 'sort-vertical-02' | 'space-height' | 'space-horizontal' | 'space-vertical' | 'space-width' | 'speaker' | 'square' | 'star-01' | 'star-02' | 'stars' | 'stop-01' | 'stop-02' | 'stopwatch-01' | 'stopwatch-02' | 'stopwatch-03' | 'stopwatch-04' | 'stopwatch-05' | 'stopwatch-off' | 'stopwatch-snooze' | 'sun-01' | 'sun-02' | 'sun-03' | 'sun-down' | 'sun-up' | 'superscript' | 'table' | 'tag' | 'target-01' | 'target-02' | 'target-03' | 'target-04' | 'temperature-01' | 'temperature-02' | 'temperature-03' | 'temperature-04' | 'terminal' | 'text-input-01' | 'text-input-02' | 'thumb-down' | 'thumb-up' | 'ticket-01' | 'ticket-02' | 'toggle-right' | 'toogle-left' | 'train' | 'transform' | 'trash-01' | 'trash-02' | 'trash-03' | 'trash-04' | 'trend-down-01' | 'trend-down-02' | 'trend-up-01' | 'trend-up-02' | 'triangle' | 'truck' | 'tv' | 'type-01' | 'type-02' | 'type-03' | 'type-strike-01' | 'type-strike-02' | 'umbrella' | 'umbrella-01' | 'umbrella-02' | 'underline-01' | 'underline-02' | 'union' | 'upload-01' | 'upload-02' | 'upload-03' | 'upload-04' | 'user-profile-01' | 'user-profile-02' | 'user-profile-03' | 'user-profile-add-01' | 'user-profile-add-02' | 'user-profile-check' | 'user-profile-circle' | 'user-profile-down' | 'user-profile-group' | 'user-profile-left' | 'user-profile-minus' | 'user-profile-right' | 'user-profile-square' | 'user-profile-star' | 'user-profile-up' | 'user-profile-x' | 'users-profiles-01' | 'users-profiles-02' | 'users-profiles-03' | 'users-profiles-check' | 'users-profiles-down' | 'users-profiles-left' | 'users-profiles-minus' | 'users-profiles-plus' | 'users-profiles-right' | 'users-profiles-up' | 'users-profiles-x' | 'variant' | 'video-off' | 'video-on' | 'volume-01' | 'volume-02' | 'volume-03' | 'volume-04' | 'volume-05' | 'volume-06' | 'volume-07' | 'wallert-04' | 'wallet-01' | 'wallet-02' | 'wallet-03' | 'watch-01' | 'watch-02' | 'waveform' | 'webcam' | 'wifi-off' | 'wifi-on' | 'wind-01' | 'wind-02' | 'wind-03' | 'wrench' | 'x-01' | 'x-02' | 'x-03' | 'x-circle-contained' | 'x-square-contained' | 'youtube' | 'zoom-in' | 'zoom-out' | 'custom-warning-xs-neutral';
|
|
3825
|
+
|
|
3826
|
+
/**
|
|
3827
|
+
* Custom icon names — self-contained icons with built-in background and color.
|
|
3828
|
+
*
|
|
3829
|
+
* Naming: `custom-{state}-{size}-{style}`
|
|
3830
|
+
*
|
|
3831
|
+
* | State | Description |
|
|
3832
|
+
* |------------------|------------------------------------|
|
|
3833
|
+
* | check | Checkmark / completed |
|
|
3834
|
+
* | certificate | Certificate / credential |
|
|
3835
|
+
* | view | Eye / visibility |
|
|
3836
|
+
* | add | Plus / create |
|
|
3837
|
+
* | delete | Trash / remove |
|
|
3838
|
+
* | download | Download arrow |
|
|
3839
|
+
* | upload | Upload arrow |
|
|
3840
|
+
* | time | Clock / duration |
|
|
3841
|
+
* | slide | Presentation / slideshow |
|
|
3842
|
+
* | tools | Wrench / settings |
|
|
3843
|
+
* | doc | Document / file |
|
|
3844
|
+
* | info | Information circle |
|
|
3845
|
+
* | warning | Warning triangle |
|
|
3846
|
+
* | not-applicable | N/A / disabled |
|
|
3847
|
+
*
|
|
3848
|
+
* Sizes: xs (24), sm (32), md (40), lg (48), xl (56), 2xl (64)
|
|
3849
|
+
* Styles: active (colored), neutral (gray)
|
|
3850
|
+
*/
|
|
3851
|
+
type CustomIconName = 'custom-add-2xl-active' | 'custom-add-2xl-neutral' | 'custom-add-lg-active' | 'custom-add-lg-neutral' | 'custom-add-md-active' | 'custom-add-md-neutral' | 'custom-add-sm-active' | 'custom-add-sm-neutral' | 'custom-add-xl-active' | 'custom-add-xl-neutral' | 'custom-add-xs-active' | 'custom-add-xs-neutral' | 'custom-certificate-2xl-active' | 'custom-certificate-2xl-neutral' | 'custom-certificate-lg-active' | 'custom-certificate-lg-neutral' | 'custom-certificate-md-active' | 'custom-certificate-md-neutral' | 'custom-certificate-sm-active' | 'custom-certificate-sm-neutral' | 'custom-certificate-xl-active' | 'custom-certificate-xl-neutral' | 'custom-certificate-xs-active' | 'custom-certificate-xs-neutral' | 'custom-check-2xl-active' | 'custom-check-2xl-neutral' | 'custom-check-lg-active' | 'custom-check-lg-neutral' | 'custom-check-md-active' | 'custom-check-md-neutral' | 'custom-check-sm-active' | 'custom-check-sm-neutral' | 'custom-check-xl-active' | 'custom-check-xl-neutral' | 'custom-check-xs-active' | 'custom-check-xs-neutral' | 'custom-delete-2xl-active' | 'custom-delete-2xl-neutral' | 'custom-delete-lg-active' | 'custom-delete-lg-neutral' | 'custom-delete-md-active' | 'custom-delete-md-neutral' | 'custom-delete-sm-active' | 'custom-delete-sm-neutral' | 'custom-delete-xl-active' | 'custom-delete-xl-neutral' | 'custom-delete-xs-active' | 'custom-delete-xs-neutral' | 'custom-doc-2xl-active' | 'custom-doc-2xl-neutral' | 'custom-doc-lg-active' | 'custom-doc-lg-neutral' | 'custom-doc-md-active' | 'custom-doc-md-neutral' | 'custom-doc-sm-active' | 'custom-doc-sm-neutral' | 'custom-doc-xl-active' | 'custom-doc-xl-neutral' | 'custom-doc-xs-active' | 'custom-doc-xs-neutral' | 'custom-download-2xl-active' | 'custom-download-2xl-neutral' | 'custom-download-lg-active' | 'custom-download-lg-neutral' | 'custom-download-md-active' | 'custom-download-md-neutral' | 'custom-download-sm-active' | 'custom-download-sm-neutral' | 'custom-download-xl-active' | 'custom-download-xl-neutral' | 'custom-download-xs-active' | 'custom-download-xs-neutral' | 'custom-info-2xl-active' | 'custom-info-2xl-neutral' | 'custom-info-lg-active' | 'custom-info-lg-neutral' | 'custom-info-md-active' | 'custom-info-md-neutral' | 'custom-info-sm-active' | 'custom-info-sm-neutral' | 'custom-info-xl-active' | 'custom-info-xl-neutral' | 'custom-info-xs-active' | 'custom-info-xs-neutral' | 'custom-not-applicable-2xl-active' | 'custom-not-applicable-2xl-neutral' | 'custom-not-applicable-lg-active' | 'custom-not-applicable-lg-neutral' | 'custom-not-applicable-md-active' | 'custom-not-applicable-md-neutral' | 'custom-not-applicable-sm-active' | 'custom-not-applicable-sm-neutral' | 'custom-not-applicable-xl-active' | 'custom-not-applicable-xl-neutral' | 'custom-not-applicable-xs-active' | 'custom-not-applicable-xs-neutral' | 'custom-slide-2xl-active' | 'custom-slide-2xl-neutral' | 'custom-slide-lg-active' | 'custom-slide-lg-neutral' | 'custom-slide-md-active' | 'custom-slide-md-neutral' | 'custom-slide-sm-active' | 'custom-slide-sm-neutral' | 'custom-slide-xl-active' | 'custom-slide-xl-neutral' | 'custom-slide-xs-active' | 'custom-slide-xs-neutral' | 'custom-time-2xl-active' | 'custom-time-2xl-neutral' | 'custom-time-lg-active' | 'custom-time-lg-neutral' | 'custom-time-md-active' | 'custom-time-md-neutral' | 'custom-time-sm-active' | 'custom-time-sm-neutral' | 'custom-time-xl-active' | 'custom-time-xl-neutral' | 'custom-time-xs-active' | 'custom-time-xs-neutral' | 'custom-tools-2xl-active' | 'custom-tools-2xl-neutral' | 'custom-tools-lg-active' | 'custom-tools-lg-neutral' | 'custom-tools-md-active' | 'custom-tools-md-neutral' | 'custom-tools-sm-active' | 'custom-tools-sm-neutral' | 'custom-tools-xl-active' | 'custom-tools-xl-neutral' | 'custom-tools-xs-active' | 'custom-tools-xs-neutral' | 'custom-upload-2xl-active' | 'custom-upload-2xl-neutral' | 'custom-upload-lg-active' | 'custom-upload-lg-neutral' | 'custom-upload-md-active' | 'custom-upload-md-neutral' | 'custom-upload-sm-active' | 'custom-upload-sm-neutral' | 'custom-upload-xl-active' | 'custom-upload-xl-neutral' | 'custom-upload-xs-active' | 'custom-upload-xs-neutral' | 'custom-view-2xl-active' | 'custom-view-2xl-neutral' | 'custom-view-lg-active' | 'custom-view-lg-neutral' | 'custom-view-md-active' | 'custom-view-md-neutral' | 'custom-view-sm-active' | 'custom-view-sm-neutral' | 'custom-view-xl-active' | 'custom-view-xl-neutral' | 'custom-view-xs-active' | 'custom-view-xs-neutral' | 'custom-warning' | 'custom-warning-2xl-active' | 'custom-warning-2xl-neutral' | 'custom-warning-lg-active' | 'custom-warning-lg-neutral' | 'custom-warning-md-active' | 'custom-warning-md-neutral' | 'custom-warning-sm-active' | 'custom-warning-sm-neutral' | 'custom-warning-xl-active' | 'custom-warning-xl-neutral' | 'custom-warning-xs-active';
|
|
3852
|
+
|
|
3853
|
+
/** Container size. The inner icon is always 50 % of the container. */
|
|
3854
|
+
type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3855
|
+
/**
|
|
3856
|
+
* Background colour of the icon container.
|
|
3857
|
+
* Each variant also sets a matching `color` so SVGs using `currentColor` inherit
|
|
3858
|
+
* the correct stroke/fill automatically.
|
|
3859
|
+
*/
|
|
3860
|
+
type IconColor = 'none' | 'primary' | 'gray' | 'white' | 'error' | 'warning' | 'success';
|
|
3861
|
+
/** Border-radius shape of the container. */
|
|
3862
|
+
type IconShape = 'round' | 'square';
|
|
3863
|
+
/**
|
|
3864
|
+
* A coloured icon container that wraps any SVG icon.
|
|
3865
|
+
*
|
|
3866
|
+
* Supports three ways to provide an icon:
|
|
3867
|
+
*
|
|
3868
|
+
* 1. **By name** — pass a registered `IconName` via `[name]`.
|
|
3869
|
+
* The component looks up the SVG from the `IconRegistry`.
|
|
3870
|
+
* 2. **By SVG string** — pass an inline SVG string via `[svgIcon]`.
|
|
3871
|
+
* 3. **By content projection** — project an `<svg>` element as child content.
|
|
3872
|
+
*
|
|
3873
|
+
* Priority: `name` > `svgIcon` > content projection.
|
|
3874
|
+
*
|
|
3875
|
+
* @example
|
|
3876
|
+
* <!-- By name (requires icon to be registered in IconRegistry) -->
|
|
3877
|
+
* <pecb-icon name="check-01" color="success" size="md"></pecb-icon>
|
|
3878
|
+
*
|
|
3879
|
+
* @example
|
|
3880
|
+
* <!-- SVG string input -->
|
|
3881
|
+
* <pecb-icon [svgIcon]="alertSvg" color="error" size="md" shape="round">
|
|
3882
|
+
* </pecb-icon>
|
|
3883
|
+
*
|
|
3884
|
+
* @example
|
|
3885
|
+
* <!-- Content projection -->
|
|
3886
|
+
* <pecb-icon color="success" size="lg" shape="square">
|
|
3887
|
+
* <svg width="24" height="24" ...>...</svg>
|
|
3888
|
+
* </pecb-icon>
|
|
3889
|
+
*/
|
|
3890
|
+
declare class IconComponent {
|
|
3891
|
+
private readonly sanitizer;
|
|
3892
|
+
private readonly registry;
|
|
3893
|
+
/**
|
|
3894
|
+
* Registered icon name. When provided, the SVG is resolved from the
|
|
3895
|
+
* `IconRegistry`. Takes highest priority.
|
|
3896
|
+
*/
|
|
3897
|
+
name: _angular_core.InputSignal<IconName | CustomIconName | undefined>;
|
|
3898
|
+
/**
|
|
3899
|
+
* Inline SVG string to render inside the container.
|
|
3900
|
+
* When provided, this takes precedence over projected content.
|
|
3901
|
+
*/
|
|
3902
|
+
svgIcon: _angular_core.InputSignal<string>;
|
|
3903
|
+
/**
|
|
3904
|
+
* Container (and colour) size.
|
|
3905
|
+
* @default 'md' → 40 × 40 px container, 20 × 20 px icon
|
|
3906
|
+
*/
|
|
3907
|
+
size: _angular_core.InputSignal<IconSize>;
|
|
3908
|
+
/**
|
|
3909
|
+
* Background colour variant.
|
|
3910
|
+
* Also applies the matching foreground colour so `currentColor` SVGs are
|
|
3911
|
+
* correctly tinted without any extra configuration.
|
|
3912
|
+
* @default 'primary'
|
|
3913
|
+
*/
|
|
3914
|
+
color: _angular_core.InputSignal<IconColor>;
|
|
3915
|
+
/**
|
|
3916
|
+
* Container shape.
|
|
3917
|
+
* - `round` — fully circular (border-radius 50 %)
|
|
3918
|
+
* - `square` — softly rounded rectangle (border-radius 8 px)
|
|
3919
|
+
* @default 'round'
|
|
3920
|
+
*/
|
|
3921
|
+
shape: _angular_core.InputSignal<IconShape>;
|
|
3922
|
+
/**
|
|
3923
|
+
* Accessible label for the icon. When provided the container receives
|
|
3924
|
+
* `role="img"` and `aria-label`. When omitted the icon is treated as
|
|
3925
|
+
* decorative (`aria-hidden="true"`).
|
|
3926
|
+
*/
|
|
3927
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
3928
|
+
hostClasses: _angular_core.Signal<string>;
|
|
3929
|
+
/** Inner icon dimension in px (= container ÷ 2). */
|
|
3930
|
+
innerSize: _angular_core.Signal<number>;
|
|
3931
|
+
/** Resolved SVG string: name lookup → svgIcon input → empty. */
|
|
3932
|
+
resolvedSvg: _angular_core.Signal<string>;
|
|
3933
|
+
safeIcon: _angular_core.Signal<SafeHtml>;
|
|
3934
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
3935
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconComponent, "pecb-icon", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "svgIcon": { "alias": "svgIcon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3936
|
+
}
|
|
3937
|
+
|
|
3938
|
+
export { AccordionItemComponent, AccordionSmallComponent, AlertComponent, BlurDirective, BottomSheetComponent, BreadcrumbsComponent, ButtonComponent, ButtonGroupComponent, ButtonGroupItemComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckboxComponent, CodeInputComponent, CodeSnippetComponent, ColorPaletteComponent, ConfirmationComponent, DashboardGridComponent, DatepickerComponent, DividerComponent, DropdownComponent, FloatButtonComponent, FloatButtonItemComponent, FullscreenModalComponent, FullscreenModalContentDirective, FullscreenModalFooterDirective, GeneralComponent, GridComponent, GridItemComponent, IconComponent, InputComponent, LoadingService, MessageBubbleComponent, MessageItemComponent, MetricsCardComponent, NotificationService, PECB_COLOR_PALETTE, PECB_FONT_STYLES, PECB_TYPE_SCALE, PaginationComponent, PecbComponentsModule, ProfileComponent, ProfileGroupComponent, ProgressBarComponent, ProgressCircleComponent, RadioComponent, RightModalComponent, RightModalContentDirective, RightModalFooterDirective, RightModalHeaderDirective, ShadowDirective, SidebarComponent, SkeletonComponent, SpacerComponent, SpinnerComponent, StatusComponent, StepperComponent, TabComponent, TableComponent, ThemeService, ToggleComponent, TooltipComponent, TooltipDirective, TypographyComponent, addClass, announceToScreenReader, capitalize, closestElement, copyToClipboard, createAuthError, createAuthorizationError, createConfigError, createError, createNetworkError, createValidationError, disableBodyScroll, escapeHtml, formatCount, formatErrorForLog, formatErrorMessage, generateLinkedIds, generateUniqueId, getAriaCurrent, getButtonAriaAttributes, getComputedStyleValue, getDialogAriaAttributes, getFocusableElements, getInitials, getInputAriaAttributes, getOptionAriaAttributes, getProgressAriaAttributes, getScrollParent, getTabAriaAttributes, getVisuallyHiddenStyles, handleError, hasClass, isBlank, isBrowser, isElementVisible, isNotBlank, isPecbError, isRecoverableError, matchesSelector, pluralize, prefersHighContrast, prefersReducedMotion, registerErrorHandler, removeClass, scrollIntoView, slugify, stripHtml, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, toggleClass, trapFocus, truncate, tryAsync, trySync, wrapError };
|
|
3939
|
+
export type { AccordionVariant, AlertType, AlertVariant, Alignment, AnimationTiming, AriaAttributes, AriaLive, AriaRole, BlurSize, BreadcrumbItem, BreadcrumbSeparator, Breakpoint, ButtonGroupIconMode, ButtonGroupItemPosition, ButtonIconStyle, ButtonSize, ButtonVariant, Callback, CardElevation, CardRadius, CardRole, CheckboxLabelPosition, ClosableWithHooks, CodeInputDirection, CodeInputState, CodeSnippetTheme, CodeSnippetVariant, ColorPaletteGroup, ColorPaletteItem, ColorVariant, Colorable, ComponentSize, ConfirmationIconType, DashboardGridGap, DashboardGridLayout, DatepickerSize, Direction, Disableable, DividerType, DropdownOption, DropdownSize, ElevationLevel, ErrorCategory, ErrorHandler, ErrorOptions, ErrorSeverity, EventHandler, ExtendedColorVariant, FilterState, FloatButtonAction, FloatButtonPosition, Focusable, FormControlBase, GridAlign, GridColumns, GridGap, GridItemSpan, GridPadding, GridVerticalAlign, IconColor, IconShape, IconSize, InputSize, InputType, Loadable, LoadingState, MenuItem, MessageBubbleType, MessageDirection, MessageItemStatus, MetricsCardBadgeStatus, MetricsCardIconBg, MetricsCardOrientation, MetricsCardType, MetricsCardVariation, NonNullableProps, Notification, NotificationConfig, NotificationPosition, NotificationType, OptionalProps, Orientation, OverlayComponent, PageChangeEvent, PaginationSize, PaginationState, PaginationVariant, PecbError, PecbTableColumn, PecbTableColumnComponent, PecbTableColumnType, Position, ProfileBadge, ProfileGroupItem, ProfileGroupSize, ProfileIndicator, ProfileSize, ProgressBarSize, ProgressCircleSize, ProgressType, QuizType, RadioLabelPosition, RadioVariant, RadiusScale, RequireProps, RightModalSize, SearchMode, SelectableItem, ShadowHardSize, ShadowSize, ShadowSoftSize, ShadowType, SidebarMenuItem, SidebarSection, Size, Sizeable, SkeletonShape, SkeletonSize, SkeletonType, SortState, SpacerSize, SpacingScale, StateVariant, StatusSize, StatusType, StatusVariant, StepItem, StepOrder, StepState, StepperDirection, StepperSize, StepperTailStyle, StepperType, TabItem, TabSize, TabStyle, TableAction, TableColumn, TableRowActionEvent, TableSelectionEvent, TableSize, TableSortEvent, TableStatusConfig, TableUserConfig, TableVariant, Templatable, ThemeConfig, ThemeMode, ThemeVariables, ToggleLabelPosition, TooltipPointerPosition, TooltipTheme, TreeNode, TypographyScaleEntry, TypographyStyleEntry, Validatable, ValidationError, ValidationState };
|