ps-helix 5.1.3 → 6.0.1
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 +1188 -1188
- package/THEME.md +446 -446
- package/fesm2022/ps-helix.mjs +2065 -1015
- package/fesm2022/ps-helix.mjs.map +1 -1
- package/package.json +6 -5
- package/src/lib/styles/base/global.css +48 -32
- package/src/lib/styles/themes/dark.css +200 -200
- package/src/lib/styles/themes/light.css +278 -278
- package/src/lib/styles/tokens/breakpoints.tokens.css +20 -0
- package/src/lib/styles/tokens/effects.tokens.css +39 -38
- package/src/lib/styles/tokens/sizing.tokens.css +94 -94
- package/src/lib/styles/tokens/spacing.tokens.css +27 -27
- package/src/lib/styles/utilities/animations.utils.css +157 -157
- package/src/lib/styles/utilities/colors.utils.css +223 -223
- package/src/lib/styles/utilities/focus.utils.css +56 -62
- package/src/lib/styles/utilities/layout.utils.css +135 -135
- package/src/lib/styles/utilities/responsive.utils.css +219 -226
- package/src/lib/styles/utilities/spacing.utils.css +150 -150
- package/src/lib/styles/utilities/typography.utils.css +36 -36
- package/styles.css +34 -33
- package/types/ps-helix.d.ts +330 -61
package/types/ps-helix.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { AfterContentChecked, OnDestroy, AfterContentInit, InjectionToken, AfterViewInit, EventEmitter, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { AfterContentChecked, OnDestroy, AfterContentInit, InjectionToken, AfterViewInit, EventEmitter, TemplateRef, Type, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { FormCheckboxControl, FormValueControl } from '@angular/forms/signals';
|
|
5
5
|
import * as ps_helix from 'ps-helix';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
|
-
import { Router } from '@angular/router';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* Types d'alertes disponibles
|
|
@@ -253,6 +252,7 @@ type CardActionsAlignment = 'left' | 'center' | 'right' | 'space-between';
|
|
|
253
252
|
*/
|
|
254
253
|
declare class PshCardComponent implements OnDestroy {
|
|
255
254
|
private platformId;
|
|
255
|
+
private readonly document;
|
|
256
256
|
private resizeObserver?;
|
|
257
257
|
isMobile: _angular_core.WritableSignal<boolean>;
|
|
258
258
|
/** Variante visuelle de la carte (default, elevated, outlined) */
|
|
@@ -578,6 +578,7 @@ declare class PshInfoCardComponent implements AfterContentInit, OnDestroy {
|
|
|
578
578
|
/** Signal to track if viewport is mobile */
|
|
579
579
|
isMobile: _angular_core.WritableSignal<boolean>;
|
|
580
580
|
private platformId;
|
|
581
|
+
private readonly document;
|
|
581
582
|
private resizeObserver?;
|
|
582
583
|
private feedbackTimeout?;
|
|
583
584
|
/** Determines if the empty state should be shown */
|
|
@@ -671,6 +672,7 @@ declare class PshCheckboxComponent implements ControlValueAccessor, FormCheckbox
|
|
|
671
672
|
registerOnTouched(fn: () => void): void;
|
|
672
673
|
setDisabledState(isDisabled: boolean): void;
|
|
673
674
|
focus(): void;
|
|
675
|
+
blur(): void;
|
|
674
676
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshCheckboxComponent, never>;
|
|
675
677
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshCheckboxComponent, "psh-checkbox", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "disabled": "disabledChange"; "indeterminate": "indeterminateChange"; "touched": "touchedChange"; }, never, ["*"], true, never>;
|
|
676
678
|
}
|
|
@@ -761,9 +763,40 @@ interface DropdownConfig {
|
|
|
761
763
|
iconOnlyText?: string;
|
|
762
764
|
}
|
|
763
765
|
|
|
764
|
-
|
|
766
|
+
/**
|
|
767
|
+
* Emits when a click occurs outside the host element.
|
|
768
|
+
*
|
|
769
|
+
* Shared primitive replacing the per-component document click listeners used by
|
|
770
|
+
* select / dropdown to close on outside click. Typically consumed as a host
|
|
771
|
+
* directive:
|
|
772
|
+
*
|
|
773
|
+
* @example
|
|
774
|
+
* ```typescript
|
|
775
|
+
* @Component({ hostDirectives: [PshClickOutsideDirective] })
|
|
776
|
+
* export class MyPopover {
|
|
777
|
+
* constructor() {
|
|
778
|
+
* inject(PshClickOutsideDirective).pshClickOutside.subscribe(() => this.close());
|
|
779
|
+
* }
|
|
780
|
+
* }
|
|
781
|
+
* ```
|
|
782
|
+
*/
|
|
783
|
+
declare class PshClickOutsideDirective {
|
|
784
|
+
private readonly host;
|
|
785
|
+
private readonly document;
|
|
786
|
+
private readonly isBrowser;
|
|
787
|
+
/** Emitted when a click lands outside the host element. */
|
|
788
|
+
readonly pshClickOutside: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
789
|
+
constructor();
|
|
790
|
+
private readonly onDocumentClick;
|
|
791
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshClickOutsideDirective, never>;
|
|
792
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PshClickOutsideDirective, "[pshClickOutside]", never, {}, { "pshClickOutside": "pshClickOutside"; }, never, never, true, never>;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
declare class PshDropdownComponent<T = string> {
|
|
765
796
|
private elementRef;
|
|
766
|
-
private
|
|
797
|
+
private readonly isBrowser;
|
|
798
|
+
private readonly overlayPosition;
|
|
799
|
+
private readonly injector;
|
|
767
800
|
appearance: _angular_core.InputSignal<DropdownAppearance>;
|
|
768
801
|
variant: _angular_core.InputSignal<DropdownVariant>;
|
|
769
802
|
size: _angular_core.InputSignal<DropdownSize>;
|
|
@@ -778,6 +811,7 @@ declare class PshDropdownComponent<T = string> implements OnDestroy {
|
|
|
778
811
|
private isOpenSignal;
|
|
779
812
|
private selectedItemSignal;
|
|
780
813
|
private focusedItemIndex;
|
|
814
|
+
protected readonly resolvedPlacement: _angular_core.WritableSignal<DropdownPlacement>;
|
|
781
815
|
selected: _angular_core.OutputEmitterRef<DropdownItem<T>>;
|
|
782
816
|
opened: _angular_core.OutputEmitterRef<void>;
|
|
783
817
|
closed: _angular_core.OutputEmitterRef<void>;
|
|
@@ -788,20 +822,19 @@ declare class PshDropdownComponent<T = string> implements OnDestroy {
|
|
|
788
822
|
state: _angular_core.Signal<string>;
|
|
789
823
|
private getState;
|
|
790
824
|
constructor();
|
|
791
|
-
private
|
|
825
|
+
private reposition;
|
|
792
826
|
toggleDropdown(): void;
|
|
793
827
|
selectItem(item: DropdownItem<T>): void;
|
|
794
828
|
close(): void;
|
|
795
829
|
handleTriggerKeyDown(event: KeyboardEvent): void;
|
|
796
|
-
handleItemKeyDown(event: KeyboardEvent, item: DropdownItem<T>,
|
|
830
|
+
handleItemKeyDown(event: KeyboardEvent, item: DropdownItem<T>, _index: number): void;
|
|
797
831
|
private focusNextItem;
|
|
798
832
|
private focusPreviousItem;
|
|
799
833
|
private focusFirstItem;
|
|
800
834
|
private focusLastItem;
|
|
801
835
|
private focusItemAtIndex;
|
|
802
|
-
ngOnDestroy(): void;
|
|
803
836
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshDropdownComponent<any>, never>;
|
|
804
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshDropdownComponent<any>, "psh-dropdown", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "iconOnlyText": { "alias": "iconOnlyText"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "selected": "selected"; "opened": "opened"; "closed": "closed"; }, never, ["[dropdown-trigger]", "[dropdown-menu]"], true,
|
|
837
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshDropdownComponent<any>, "psh-dropdown", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "iconOnlyText": { "alias": "iconOnlyText"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "selected": "selected"; "opened": "opened"; "closed": "closed"; }, never, ["[dropdown-trigger]", "[dropdown-menu]"], true, [{ directive: typeof PshClickOutsideDirective; inputs: {}; outputs: {}; }]>;
|
|
805
838
|
}
|
|
806
839
|
|
|
807
840
|
type InputType = 'text' | 'password' | 'email' | 'tel' | 'url' | 'search' | 'date' | 'number';
|
|
@@ -1027,6 +1060,7 @@ interface MenuItem<T = string> {
|
|
|
1027
1060
|
}
|
|
1028
1061
|
|
|
1029
1062
|
declare class PshMenuComponent<T = string> {
|
|
1063
|
+
private readonly document;
|
|
1030
1064
|
mode: _angular_core.InputSignal<MenuMode>;
|
|
1031
1065
|
variant: _angular_core.InputSignal<MenuVariant>;
|
|
1032
1066
|
collapsible: _angular_core.InputSignal<boolean>;
|
|
@@ -1119,11 +1153,19 @@ declare const MODAL_CONFIG: InjectionToken<Partial<ModalConfig>>;
|
|
|
1119
1153
|
*/
|
|
1120
1154
|
declare class ModalService {
|
|
1121
1155
|
private config;
|
|
1156
|
+
/**
|
|
1157
|
+
* Ordered stack of open modal ids (insertion order = visual stacking order).
|
|
1158
|
+
* The last entry is the topmost (most recently opened) modal.
|
|
1159
|
+
*/
|
|
1122
1160
|
private modalsSignal;
|
|
1123
1161
|
/**
|
|
1124
1162
|
* Computed signal exposing the number of active modals
|
|
1125
1163
|
*/
|
|
1126
1164
|
readonly activeModalsCount: _angular_core.Signal<number>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Computed signal exposing the id of the topmost modal, or null if none are open
|
|
1167
|
+
*/
|
|
1168
|
+
readonly topmostModalId: _angular_core.Signal<string | null | undefined>;
|
|
1127
1169
|
/**
|
|
1128
1170
|
* Returns the global modal configuration
|
|
1129
1171
|
*/
|
|
@@ -1133,12 +1175,12 @@ declare class ModalService {
|
|
|
1133
1175
|
*/
|
|
1134
1176
|
generateId(): string;
|
|
1135
1177
|
/**
|
|
1136
|
-
* Registers a modal instance when it opens
|
|
1178
|
+
* Registers a modal instance when it opens, pushing it onto the stack
|
|
1137
1179
|
* @param id - Unique modal identifier
|
|
1138
1180
|
*/
|
|
1139
1181
|
register(id: string): void;
|
|
1140
1182
|
/**
|
|
1141
|
-
* Unregisters a modal instance when it closes
|
|
1183
|
+
* Unregisters a modal instance when it closes, removing it from the stack
|
|
1142
1184
|
* @param id - Unique modal identifier
|
|
1143
1185
|
*/
|
|
1144
1186
|
unregister(id: string): void;
|
|
@@ -1147,6 +1189,12 @@ declare class ModalService {
|
|
|
1147
1189
|
* @param id - Unique modal identifier
|
|
1148
1190
|
*/
|
|
1149
1191
|
isRegistered(id: string): boolean;
|
|
1192
|
+
/**
|
|
1193
|
+
* Checks if a modal is the topmost (most recently opened) open modal.
|
|
1194
|
+
* Used to ensure Escape / backdrop only dismiss the modal on top of the stack.
|
|
1195
|
+
* @param id - Unique modal identifier
|
|
1196
|
+
*/
|
|
1197
|
+
isTopmost(id: string): boolean;
|
|
1150
1198
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
|
|
1151
1199
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
|
|
1152
1200
|
}
|
|
@@ -1173,10 +1221,15 @@ declare class ModalService {
|
|
|
1173
1221
|
declare class PshModalComponent implements AfterViewInit, OnDestroy {
|
|
1174
1222
|
private readonly config;
|
|
1175
1223
|
private readonly modalService;
|
|
1224
|
+
private readonly overlay;
|
|
1176
1225
|
private readonly renderer;
|
|
1177
1226
|
private readonly platformId;
|
|
1227
|
+
private readonly document;
|
|
1228
|
+
private readonly isBrowser;
|
|
1178
1229
|
private readonly modalId;
|
|
1179
|
-
private
|
|
1230
|
+
private overlayHandle;
|
|
1231
|
+
/** z-index assigned by the overlay stack while open (keeps stacked modals layered). */
|
|
1232
|
+
protected readonly zIndex: _angular_core.WritableSignal<number | null>;
|
|
1180
1233
|
private modalElement?;
|
|
1181
1234
|
private isAttachedToBody;
|
|
1182
1235
|
private resizeListener?;
|
|
@@ -1266,10 +1319,6 @@ declare class PshModalComponent implements AfterViewInit, OnDestroy {
|
|
|
1266
1319
|
* Keyboard event handler for Escape key
|
|
1267
1320
|
*/
|
|
1268
1321
|
private readonly escapeHandler;
|
|
1269
|
-
/**
|
|
1270
|
-
* Keyboard event handler for focus trap
|
|
1271
|
-
*/
|
|
1272
|
-
private readonly focusTrapHandler;
|
|
1273
1322
|
/**
|
|
1274
1323
|
* Computed signal indicating if a custom footer is projected
|
|
1275
1324
|
*/
|
|
@@ -1300,6 +1349,8 @@ declare class PshModalComponent implements AfterViewInit, OnDestroy {
|
|
|
1300
1349
|
* Handles all cleanup when modal closes
|
|
1301
1350
|
*/
|
|
1302
1351
|
private onModalClose;
|
|
1352
|
+
/** Releases this modal's overlay layer and clears its z-index. */
|
|
1353
|
+
private releaseOverlay;
|
|
1303
1354
|
/**
|
|
1304
1355
|
* Checks if the current screen size is mobile
|
|
1305
1356
|
*/
|
|
@@ -1320,22 +1371,6 @@ declare class PshModalComponent implements AfterViewInit, OnDestroy {
|
|
|
1320
1371
|
* Removes keyboard event listeners
|
|
1321
1372
|
*/
|
|
1322
1373
|
private removeEventListeners;
|
|
1323
|
-
/**
|
|
1324
|
-
* Focuses the first focusable element in the modal
|
|
1325
|
-
*/
|
|
1326
|
-
private focusFirstElement;
|
|
1327
|
-
/**
|
|
1328
|
-
* Restores focus to the element that opened the modal
|
|
1329
|
-
*/
|
|
1330
|
-
private restoreFocus;
|
|
1331
|
-
/**
|
|
1332
|
-
* Handles focus trap to keep focus within the modal
|
|
1333
|
-
*/
|
|
1334
|
-
private handleFocusTrap;
|
|
1335
|
-
/**
|
|
1336
|
-
* Gets all focusable elements within a container
|
|
1337
|
-
*/
|
|
1338
|
-
private getFocusableElements;
|
|
1339
1374
|
/**
|
|
1340
1375
|
* Closes the modal and emits the closed event
|
|
1341
1376
|
*/
|
|
@@ -1410,7 +1445,8 @@ declare class PshPaginationComponent {
|
|
|
1410
1445
|
private readonly uniqueId;
|
|
1411
1446
|
currentPage: _angular_core.ModelSignal<number>;
|
|
1412
1447
|
totalPages: _angular_core.ModelSignal<number>;
|
|
1413
|
-
|
|
1448
|
+
itemsPerPageInput: _angular_core.InputSignal<number>;
|
|
1449
|
+
itemsPerPage: _angular_core.WritableSignal<number>;
|
|
1414
1450
|
constructor();
|
|
1415
1451
|
readonly size: _angular_core.InputSignalWithTransform<PaginationSize, PaginationSize>;
|
|
1416
1452
|
readonly variant: _angular_core.InputSignalWithTransform<PaginationVariant, PaginationVariant>;
|
|
@@ -1451,7 +1487,7 @@ declare class PshPaginationComponent {
|
|
|
1451
1487
|
onItemsPerPageChange(event: Event): void;
|
|
1452
1488
|
protected onKeydown(event: KeyboardEvent): void;
|
|
1453
1489
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshPaginationComponent, never>;
|
|
1454
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshPaginationComponent, "psh-pagination", never, { "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "totalPages": { "alias": "totalPages"; "required": false; "isSignal": true; }; "
|
|
1490
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshPaginationComponent, "psh-pagination", never, { "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "totalPages": { "alias": "totalPages"; "required": false; "isSignal": true; }; "itemsPerPageInput": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "showFirstLast": { "alias": "showFirstLast"; "required": false; "isSignal": true; }; "showPrevNext": { "alias": "showPrevNext"; "required": false; "isSignal": true; }; "maxVisiblePages": { "alias": "maxVisiblePages"; "required": false; "isSignal": true; }; "showItemsPerPage": { "alias": "showItemsPerPage"; "required": false; "isSignal": true; }; "itemsPerPageOptions": { "alias": "itemsPerPageOptions"; "required": false; "isSignal": true; }; "firstLabel": { "alias": "firstLabel"; "required": false; "isSignal": true; }; "previousLabel": { "alias": "previousLabel"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "lastLabel": { "alias": "lastLabel"; "required": false; "isSignal": true; }; "pageLabel": { "alias": "pageLabel"; "required": false; "isSignal": true; }; "itemsLabel": { "alias": "itemsLabel"; "required": false; "isSignal": true; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "currentPage": "currentPageChange"; "totalPages": "totalPagesChange"; "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; "navigationError": "navigationError"; }, never, never, true, never>;
|
|
1455
1491
|
}
|
|
1456
1492
|
|
|
1457
1493
|
/**
|
|
@@ -1534,7 +1570,7 @@ interface RadioConfig {
|
|
|
1534
1570
|
/** Nom du groupe */
|
|
1535
1571
|
name: string;
|
|
1536
1572
|
/** Valeur associée */
|
|
1537
|
-
value:
|
|
1573
|
+
value: unknown;
|
|
1538
1574
|
/** Taille du radio */
|
|
1539
1575
|
size: RadioSize;
|
|
1540
1576
|
/** Position du label */
|
|
@@ -1560,15 +1596,14 @@ declare class PshRadioComponent {
|
|
|
1560
1596
|
error: _angular_core.InputSignal<string>;
|
|
1561
1597
|
success: _angular_core.InputSignal<string>;
|
|
1562
1598
|
name: _angular_core.InputSignal<string>;
|
|
1563
|
-
value: _angular_core.InputSignal<
|
|
1599
|
+
value: _angular_core.InputSignal<unknown>;
|
|
1564
1600
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
1565
1601
|
size: _angular_core.InputSignal<RadioSize>;
|
|
1566
1602
|
labelPosition: _angular_core.InputSignal<"left" | "right">;
|
|
1567
|
-
private radioText;
|
|
1568
1603
|
protected hasProjectedContent: _angular_core.WritableSignal<boolean>;
|
|
1569
1604
|
checkedChange: EventEmitter<boolean>;
|
|
1570
1605
|
disabledChange: EventEmitter<boolean>;
|
|
1571
|
-
valueChange: _angular_core.OutputEmitterRef<
|
|
1606
|
+
valueChange: _angular_core.OutputEmitterRef<unknown>;
|
|
1572
1607
|
customStyles: _angular_core.Signal<any>;
|
|
1573
1608
|
state: _angular_core.Signal<string>;
|
|
1574
1609
|
computedAriaLabel: _angular_core.Signal<string | undefined>;
|
|
@@ -1583,7 +1618,7 @@ declare class PshRadioComponent {
|
|
|
1583
1618
|
private focusNextRadio;
|
|
1584
1619
|
private focusPreviousRadio;
|
|
1585
1620
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshRadioComponent, never>;
|
|
1586
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshRadioComponent, "psh-radio", never, { "checkedInput": { "alias": "checked"; "required": false; }; "disabledInput": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; }, { "checkedChange": "checkedChange"; "disabledChange": "disabledChange"; "valueChange": "valueChange"; },
|
|
1621
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshRadioComponent, "psh-radio", never, { "checkedInput": { "alias": "checked"; "required": false; }; "disabledInput": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; }, { "checkedChange": "checkedChange"; "disabledChange": "disabledChange"; "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
1587
1622
|
}
|
|
1588
1623
|
|
|
1589
1624
|
interface SelectOption<T> {
|
|
@@ -1613,6 +1648,13 @@ interface FlatOption<T> {
|
|
|
1613
1648
|
declare class PshSelectComponent<T = unknown> implements ControlValueAccessor, FormValueControl<T | T[] | null> {
|
|
1614
1649
|
private readonly elementRef;
|
|
1615
1650
|
private readonly destroyRef;
|
|
1651
|
+
private readonly overlayPosition;
|
|
1652
|
+
private readonly portal;
|
|
1653
|
+
private readonly viewContainer;
|
|
1654
|
+
private readonly panelTpl;
|
|
1655
|
+
private portalRef;
|
|
1656
|
+
private readonly repositionHandler;
|
|
1657
|
+
protected readonly resolvedSide: _angular_core.WritableSignal<"top" | "bottom">;
|
|
1616
1658
|
protected readonly selectId: string;
|
|
1617
1659
|
readonly value: _angular_core.ModelSignal<T | T[] | null>;
|
|
1618
1660
|
readonly disabled: _angular_core.ModelSignal<boolean>;
|
|
@@ -1654,11 +1696,15 @@ declare class PshSelectComponent<T = unknown> implements ControlValueAccessor, F
|
|
|
1654
1696
|
selectedLabel: _angular_core.Signal<string>;
|
|
1655
1697
|
filteredOptions: _angular_core.Signal<(SelectOption<T> | SelectOptionGroup<T>)[]>;
|
|
1656
1698
|
constructor();
|
|
1699
|
+
/** Teleports the options panel to the body-level overlay layer and positions it. */
|
|
1700
|
+
private openPanel;
|
|
1701
|
+
private closePanel;
|
|
1702
|
+
private reposition;
|
|
1657
1703
|
private onChange;
|
|
1658
1704
|
private onTouched;
|
|
1659
1705
|
writeValue(value: unknown): void;
|
|
1660
|
-
registerOnChange(fn:
|
|
1661
|
-
registerOnTouched(fn:
|
|
1706
|
+
registerOnChange(fn: (value: T | T[] | null) => void): void;
|
|
1707
|
+
registerOnTouched(fn: () => void): void;
|
|
1662
1708
|
setDisabledState(isDisabled: boolean): void;
|
|
1663
1709
|
toggle(): void;
|
|
1664
1710
|
close(): void;
|
|
@@ -1678,7 +1724,7 @@ declare class PshSelectComponent<T = unknown> implements ControlValueAccessor, F
|
|
|
1678
1724
|
private focusFirst;
|
|
1679
1725
|
private focusLast;
|
|
1680
1726
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshSelectComponent<any>, never>;
|
|
1681
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshSelectComponent<any>, "psh-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiplePlaceholder": { "alias": "multiplePlaceholder"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "maxSelections": { "alias": "maxSelections"; "required": false; "isSignal": true; }; "minSelections": { "alias": "minSelections"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "searchConfig": { "alias": "searchConfig"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; "touched": "touchedChange"; "opened": "opened"; "closed": "closed"; "searched": "searched"; "scrollEnd": "scrollEnd"; }, never, never, true,
|
|
1727
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshSelectComponent<any>, "psh-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiplePlaceholder": { "alias": "multiplePlaceholder"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "success": { "alias": "success"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "maxSelections": { "alias": "maxSelections"; "required": false; "isSignal": true; }; "minSelections": { "alias": "minSelections"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "searchConfig": { "alias": "searchConfig"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; "touched": "touchedChange"; "opened": "opened"; "closed": "closed"; "searched": "searched"; "scrollEnd": "scrollEnd"; }, never, never, true, [{ directive: typeof PshClickOutsideDirective; inputs: {}; outputs: {}; }]>;
|
|
1682
1728
|
}
|
|
1683
1729
|
|
|
1684
1730
|
/**
|
|
@@ -1714,9 +1760,8 @@ interface SidebarConfig {
|
|
|
1714
1760
|
declare const SIDEBAR_CONFIG: InjectionToken<Partial<SidebarConfig>>;
|
|
1715
1761
|
declare class PshSidebarComponent implements OnDestroy {
|
|
1716
1762
|
private readonly config;
|
|
1717
|
-
private readonly elementRef;
|
|
1718
1763
|
private readonly platformId;
|
|
1719
|
-
private
|
|
1764
|
+
private readonly document;
|
|
1720
1765
|
private mediaQueryList;
|
|
1721
1766
|
private mediaQueryHandler;
|
|
1722
1767
|
open: _angular_core.ModelSignal<boolean>;
|
|
@@ -1738,7 +1783,6 @@ declare class PshSidebarComponent implements OnDestroy {
|
|
|
1738
1783
|
effectiveMode: _angular_core.Signal<SidebarMode>;
|
|
1739
1784
|
state: _angular_core.Signal<string>;
|
|
1740
1785
|
private readonly escapeHandler;
|
|
1741
|
-
private readonly focusTrapHandler;
|
|
1742
1786
|
private getState;
|
|
1743
1787
|
constructor();
|
|
1744
1788
|
private setupMediaQuery;
|
|
@@ -1750,7 +1794,6 @@ declare class PshSidebarComponent implements OnDestroy {
|
|
|
1750
1794
|
toggleSidebar(): void;
|
|
1751
1795
|
closeSidebar(): void;
|
|
1752
1796
|
handleBackdropClick(): void;
|
|
1753
|
-
private trapFocus;
|
|
1754
1797
|
ngOnDestroy(): void;
|
|
1755
1798
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshSidebarComponent, never>;
|
|
1756
1799
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshSidebarComponent, "psh-sidebar", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "breakpoint": { "alias": "breakpoint"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "toggle": "toggle"; "opened": "opened"; "closed": "closed"; "transitionStart": "transitionStart"; }, never, ["*"], true, never>;
|
|
@@ -1783,6 +1826,7 @@ interface SpinLoaderConfig {
|
|
|
1783
1826
|
declare const SPINLOADER_CONFIG: InjectionToken<Partial<SpinLoaderConfig>>;
|
|
1784
1827
|
declare class PshSpinLoaderComponent {
|
|
1785
1828
|
private config;
|
|
1829
|
+
private readonly document;
|
|
1786
1830
|
variant: _angular_core.InputSignal<SpinLoaderVariant>;
|
|
1787
1831
|
size: _angular_core.InputSignal<SpinLoaderSize>;
|
|
1788
1832
|
color: _angular_core.InputSignal<SpinLoaderColor>;
|
|
@@ -2138,7 +2182,7 @@ interface TableColumn {
|
|
|
2138
2182
|
/** Template personnalisé */
|
|
2139
2183
|
template?: TemplateRef<TableCellContext>;
|
|
2140
2184
|
/** Fonction de tri personnalisée */
|
|
2141
|
-
sortFn?: (a:
|
|
2185
|
+
sortFn?: (a: TableRow, b: TableRow) => number;
|
|
2142
2186
|
}
|
|
2143
2187
|
/**
|
|
2144
2188
|
* Interface for a row of the table
|
|
@@ -2148,8 +2192,8 @@ interface TableRow {
|
|
|
2148
2192
|
id: string | number;
|
|
2149
2193
|
/** Lignes enfants (un seul niveau) */
|
|
2150
2194
|
children?: TableRow[];
|
|
2151
|
-
/** Données de la ligne */
|
|
2152
|
-
[key: string]:
|
|
2195
|
+
/** Données de la ligne (valeurs arbitraires — l'appelant restreint le type) */
|
|
2196
|
+
[key: string]: unknown;
|
|
2153
2197
|
}
|
|
2154
2198
|
interface TableRowExpandEvent {
|
|
2155
2199
|
id: string | number;
|
|
@@ -2229,7 +2273,7 @@ declare class PshTableComponent {
|
|
|
2229
2273
|
emptyMessage: _angular_core.InputSignal<string>;
|
|
2230
2274
|
noResultsMessage: _angular_core.InputSignal<string>;
|
|
2231
2275
|
globalSearchPlaceholder: _angular_core.InputSignal<string>;
|
|
2232
|
-
tableLayout: _angular_core.InputSignal<"
|
|
2276
|
+
tableLayout: _angular_core.InputSignal<"fixed" | "auto">;
|
|
2233
2277
|
truncateText: _angular_core.InputSignal<boolean>;
|
|
2234
2278
|
expandable: _angular_core.InputSignal<boolean>;
|
|
2235
2279
|
singleExpand: _angular_core.InputSignal<boolean>;
|
|
@@ -2251,6 +2295,10 @@ declare class PshTableComponent {
|
|
|
2251
2295
|
* Trie les données
|
|
2252
2296
|
*/
|
|
2253
2297
|
private sortData;
|
|
2298
|
+
/**
|
|
2299
|
+
* Compare deux valeurs inconnues (numérique si possible, sinon lexicographique).
|
|
2300
|
+
*/
|
|
2301
|
+
private compareValues;
|
|
2254
2302
|
/**
|
|
2255
2303
|
* Filtre les données
|
|
2256
2304
|
*/
|
|
@@ -2262,7 +2310,7 @@ declare class PshTableComponent {
|
|
|
2262
2310
|
handleSort(column: TableColumn): void;
|
|
2263
2311
|
onSearchValueChange(value: string): void;
|
|
2264
2312
|
handleRowClick(row: TableRow): void;
|
|
2265
|
-
protected getCellValue(row: TableRow, column: TableColumn):
|
|
2313
|
+
protected getCellValue(row: TableRow, column: TableColumn): unknown;
|
|
2266
2314
|
totalColumns: _angular_core.Signal<number>;
|
|
2267
2315
|
isRowExpandable(row: TableRow): boolean;
|
|
2268
2316
|
isRowExpanded(row: TableRow): boolean;
|
|
@@ -2346,7 +2394,8 @@ declare class PshTabsComponent {
|
|
|
2346
2394
|
tabs: _angular_core.InputSignal<Tab[]>;
|
|
2347
2395
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
2348
2396
|
ariaOrientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
2349
|
-
|
|
2397
|
+
activeIndexInput: _angular_core.InputSignal<number>;
|
|
2398
|
+
activeIndex: _angular_core.WritableSignal<number>;
|
|
2350
2399
|
tabComponents: _angular_core.Signal<readonly PshTabComponent[]>;
|
|
2351
2400
|
tabsToDisplay: _angular_core.Signal<Tab[]>;
|
|
2352
2401
|
hasContentProjection: _angular_core.Signal<boolean>;
|
|
@@ -2354,7 +2403,7 @@ declare class PshTabsComponent {
|
|
|
2354
2403
|
tabChange: _angular_core.OutputEmitterRef<TabChangeEvent>;
|
|
2355
2404
|
hostClasses: _angular_core.Signal<string>;
|
|
2356
2405
|
constructor();
|
|
2357
|
-
handleKeyDown(event: KeyboardEvent,
|
|
2406
|
+
handleKeyDown(event: KeyboardEvent, _index: number): void;
|
|
2358
2407
|
selectTab(index: number): void;
|
|
2359
2408
|
selectNext(): void;
|
|
2360
2409
|
selectPrevious(): void;
|
|
@@ -2363,7 +2412,7 @@ declare class PshTabsComponent {
|
|
|
2363
2412
|
getActiveTab(): Tab | undefined;
|
|
2364
2413
|
getTabComponent(index: number): PshTabComponent | undefined;
|
|
2365
2414
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshTabsComponent, never>;
|
|
2366
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshTabsComponent, "psh-tabs", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "animated": { "alias": "animated"; "required": false; "isSignal": true; }; "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaOrientation": { "alias": "ariaOrientation"; "required": false; "isSignal": true; }; "
|
|
2415
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshTabsComponent, "psh-tabs", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "animated": { "alias": "animated"; "required": false; "isSignal": true; }; "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaOrientation": { "alias": "ariaOrientation"; "required": false; "isSignal": true; }; "activeIndexInput": { "alias": "activeIndex"; "required": false; "isSignal": true; }; }, { "activeIndexChange": "activeIndexChange"; "tabChange": "tabChange"; }, ["tabComponents"], ["*"], true, never>;
|
|
2367
2416
|
}
|
|
2368
2417
|
|
|
2369
2418
|
/**
|
|
@@ -2498,6 +2547,7 @@ declare const TOOLTIP_CONFIG: InjectionToken<Partial<TooltipConfig>>;
|
|
|
2498
2547
|
declare class PshTooltipComponent implements AfterViewInit, OnDestroy {
|
|
2499
2548
|
private config;
|
|
2500
2549
|
private elementRef;
|
|
2550
|
+
private readonly overlayPosition;
|
|
2501
2551
|
variant: _angular_core.InputSignal<TooltipVariant>;
|
|
2502
2552
|
position: _angular_core.InputSignal<TooltipPosition>;
|
|
2503
2553
|
showDelay: _angular_core.InputSignal<number>;
|
|
@@ -2556,6 +2606,8 @@ declare const PSH_THEME_OPTIONS: InjectionToken<PshThemeOptions>;
|
|
|
2556
2606
|
declare class ThemeService {
|
|
2557
2607
|
private customerContext;
|
|
2558
2608
|
private options;
|
|
2609
|
+
private readonly document;
|
|
2610
|
+
private readonly isBrowser;
|
|
2559
2611
|
private isDarkThemeSignal;
|
|
2560
2612
|
private themeNameSignal;
|
|
2561
2613
|
private lastChangeSignal;
|
|
@@ -2583,22 +2635,24 @@ declare class ThemeService {
|
|
|
2583
2635
|
private derivePalette;
|
|
2584
2636
|
private ensureIfInteractive;
|
|
2585
2637
|
private initializeTheme;
|
|
2638
|
+
/** True when the OS/browser requests a dark colour scheme. */
|
|
2639
|
+
private prefersDarkScheme;
|
|
2586
2640
|
private saveThemePreference;
|
|
2587
2641
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
2588
2642
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
2589
2643
|
}
|
|
2590
2644
|
|
|
2591
2645
|
interface TranslationProvider {
|
|
2592
|
-
translate(key: string, params?: Record<string,
|
|
2593
|
-
translateAsync(key: string, params?: Record<string,
|
|
2646
|
+
translate(key: string, params?: Record<string, unknown>): string;
|
|
2647
|
+
translateAsync(key: string, params?: Record<string, unknown>): Observable<string>;
|
|
2594
2648
|
setLanguage(lang: string): void;
|
|
2595
2649
|
getCurrentLanguage(): string;
|
|
2596
2650
|
onLangChange(): Observable<string>;
|
|
2597
2651
|
}
|
|
2598
2652
|
declare class NgxTranslateProvider implements TranslationProvider {
|
|
2599
2653
|
private translateService;
|
|
2600
|
-
translate(key: string, params?: Record<string,
|
|
2601
|
-
translateAsync(key: string, params?: Record<string,
|
|
2654
|
+
translate(key: string, params?: Record<string, unknown>): string;
|
|
2655
|
+
translateAsync(key: string, params?: Record<string, unknown>): Observable<string>;
|
|
2602
2656
|
setLanguage(lang: string): void;
|
|
2603
2657
|
getCurrentLanguage(): string;
|
|
2604
2658
|
onLangChange(): Observable<string>;
|
|
@@ -2621,11 +2675,226 @@ interface TranslationEntry {
|
|
|
2621
2675
|
}
|
|
2622
2676
|
|
|
2623
2677
|
declare class ScrollService {
|
|
2624
|
-
private router;
|
|
2625
|
-
|
|
2678
|
+
private readonly router;
|
|
2679
|
+
private readonly document;
|
|
2680
|
+
private readonly isBrowser;
|
|
2681
|
+
constructor();
|
|
2626
2682
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollService, never>;
|
|
2627
2683
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScrollService>;
|
|
2628
2684
|
}
|
|
2629
2685
|
|
|
2630
|
-
|
|
2631
|
-
|
|
2686
|
+
/**
|
|
2687
|
+
* Headless focus-trap primitive.
|
|
2688
|
+
*
|
|
2689
|
+
* Apply to a container element and toggle activation with `[pshFocusTrap]`.
|
|
2690
|
+
* When active it:
|
|
2691
|
+
* - remembers the element that had focus before activation,
|
|
2692
|
+
* - moves focus to the first focusable element inside the container
|
|
2693
|
+
* (deterministically, after the next render — no `setTimeout`),
|
|
2694
|
+
* - keeps Tab / Shift+Tab focus cycling within the container, and
|
|
2695
|
+
* - restores focus to the previously focused element on deactivation/destroy.
|
|
2696
|
+
*
|
|
2697
|
+
* Handles the case where focus is currently outside the container.
|
|
2698
|
+
*
|
|
2699
|
+
* @example
|
|
2700
|
+
* ```html
|
|
2701
|
+
* <div [pshFocusTrap]="isOpen()">…</div>
|
|
2702
|
+
* ```
|
|
2703
|
+
*/
|
|
2704
|
+
declare class PshFocusTrapDirective {
|
|
2705
|
+
private readonly host;
|
|
2706
|
+
private readonly document;
|
|
2707
|
+
private readonly injector;
|
|
2708
|
+
private readonly isBrowser;
|
|
2709
|
+
/** Whether the trap is active. */
|
|
2710
|
+
readonly pshFocusTrap: _angular_core.InputSignal<boolean>;
|
|
2711
|
+
/** Whether to restore focus to the previously focused element on deactivation. */
|
|
2712
|
+
readonly pshFocusTrapRestore: _angular_core.InputSignal<boolean>;
|
|
2713
|
+
/**
|
|
2714
|
+
* Whether to move focus into the container when the trap activates.
|
|
2715
|
+
* Set to false to trap + restore focus without stealing initial focus.
|
|
2716
|
+
*/
|
|
2717
|
+
readonly pshFocusTrapAutoFocus: _angular_core.InputSignal<boolean>;
|
|
2718
|
+
private previouslyFocused;
|
|
2719
|
+
private active;
|
|
2720
|
+
constructor();
|
|
2721
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2722
|
+
private activate;
|
|
2723
|
+
private deactivate;
|
|
2724
|
+
private restoreFocus;
|
|
2725
|
+
private getFocusableElements;
|
|
2726
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshFocusTrapDirective, never>;
|
|
2727
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PshFocusTrapDirective, "[pshFocusTrap]", never, { "pshFocusTrap": { "alias": "pshFocusTrap"; "required": false; "isSignal": true; }; "pshFocusTrapRestore": { "alias": "pshFocusTrapRestore"; "required": false; "isSignal": true; }; "pshFocusTrapAutoFocus": { "alias": "pshFocusTrapAutoFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
type AnnouncerPoliteness = 'polite' | 'assertive';
|
|
2731
|
+
/**
|
|
2732
|
+
* Centralised ARIA live-region announcer.
|
|
2733
|
+
*
|
|
2734
|
+
* Provides a single pair of visually-hidden `aria-live` regions (polite and
|
|
2735
|
+
* assertive) shared across the whole application, instead of every component
|
|
2736
|
+
* rendering its own live region. Inject it and call {@link announce} to read a
|
|
2737
|
+
* message to assistive technology (toasts, async loading, form validation…).
|
|
2738
|
+
*
|
|
2739
|
+
* @example
|
|
2740
|
+
* ```typescript
|
|
2741
|
+
* private announcer = inject(PshLiveAnnouncerService);
|
|
2742
|
+
* this.announcer.announce('3 results found');
|
|
2743
|
+
* this.announcer.announce('Save failed', 'assertive');
|
|
2744
|
+
* ```
|
|
2745
|
+
*/
|
|
2746
|
+
declare class PshLiveAnnouncerService {
|
|
2747
|
+
private readonly document;
|
|
2748
|
+
private readonly isBrowser;
|
|
2749
|
+
private politeRegion;
|
|
2750
|
+
private assertiveRegion;
|
|
2751
|
+
constructor();
|
|
2752
|
+
/**
|
|
2753
|
+
* Announces a message in the requested live region.
|
|
2754
|
+
* The region is cleared first so the same message announced twice is re-read.
|
|
2755
|
+
*/
|
|
2756
|
+
announce(message: string, politeness?: AnnouncerPoliteness): void;
|
|
2757
|
+
/** Clears both live regions. */
|
|
2758
|
+
clear(): void;
|
|
2759
|
+
private getRegion;
|
|
2760
|
+
private createRegion;
|
|
2761
|
+
private dispose;
|
|
2762
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshLiveAnnouncerService, never>;
|
|
2763
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PshLiveAnnouncerService>;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
/** A cardinal side an overlay can be placed on, relative to its anchor. */
|
|
2767
|
+
type OverlaySide = 'top' | 'bottom' | 'left' | 'right';
|
|
2768
|
+
/** Options describing the (estimated) overlay size and the gap to the anchor. */
|
|
2769
|
+
interface OverlayPositionOptions {
|
|
2770
|
+
/** Estimated overlay width in px (used for left/right flipping and align flipping). */
|
|
2771
|
+
overlayWidth?: number;
|
|
2772
|
+
/** Estimated overlay height in px (used for top/bottom flipping). */
|
|
2773
|
+
overlayHeight?: number;
|
|
2774
|
+
/** Minimum gap between anchor and overlay in px. */
|
|
2775
|
+
offset?: number;
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Shared anchored-positioning primitive with viewport collision detection.
|
|
2779
|
+
*
|
|
2780
|
+
* Computes whether an overlay (tooltip, dropdown, select panel, menu…) fits on
|
|
2781
|
+
* its preferred side of an anchor element and flips it to the opposite side
|
|
2782
|
+
* when there is not enough room and the opposite side has more. Based on
|
|
2783
|
+
* `getBoundingClientRect`, so it must be called when the anchor is laid out
|
|
2784
|
+
* (i.e. in the browser, on open / scroll / resize).
|
|
2785
|
+
*
|
|
2786
|
+
* This generalises the collision logic that previously lived only inside the
|
|
2787
|
+
* tooltip, so dropdown / select / menu popovers can stop overflowing too.
|
|
2788
|
+
*/
|
|
2789
|
+
declare class PshOverlayPositionService {
|
|
2790
|
+
private readonly document;
|
|
2791
|
+
/**
|
|
2792
|
+
* Resolves the best cardinal side for an overlay, flipping `preferred` to its
|
|
2793
|
+
* opposite when it would overflow the viewport and the opposite has more room.
|
|
2794
|
+
*/
|
|
2795
|
+
flipSide(anchor: HTMLElement, preferred: OverlaySide, options?: OverlayPositionOptions): OverlaySide;
|
|
2796
|
+
/**
|
|
2797
|
+
* Resolves a `"<side>"` or `"<side>-<align>"` placement string (e.g. `top`,
|
|
2798
|
+
* `bottom-start`, `top-end`), flipping the side to fit the viewport while
|
|
2799
|
+
* preserving the alignment. Unknown placements are returned unchanged.
|
|
2800
|
+
*
|
|
2801
|
+
* @example
|
|
2802
|
+
* ```typescript
|
|
2803
|
+
* // Near the bottom of the viewport with no room below:
|
|
2804
|
+
* positions.flipPlacement(trigger, 'bottom-start', { overlayHeight: 240 });
|
|
2805
|
+
* // => 'top-start'
|
|
2806
|
+
* ```
|
|
2807
|
+
*/
|
|
2808
|
+
flipPlacement(anchor: HTMLElement, preferred: string, options?: OverlayPositionOptions): string;
|
|
2809
|
+
private isSide;
|
|
2810
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshOverlayPositionService, never>;
|
|
2811
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PshOverlayPositionService>;
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
/** A handle for a registered overlay layer. */
|
|
2815
|
+
interface OverlayHandle {
|
|
2816
|
+
/** Unique id of the layer, used to release it. */
|
|
2817
|
+
readonly id: number;
|
|
2818
|
+
/** z-index assigned to this layer (higher = on top). */
|
|
2819
|
+
readonly zIndex: number;
|
|
2820
|
+
}
|
|
2821
|
+
/**
|
|
2822
|
+
* Central overlay stacking authority.
|
|
2823
|
+
*
|
|
2824
|
+
* Hands out monotonically increasing z-indexes so that stacked overlays
|
|
2825
|
+
* (modals, dropdowns, tooltips, popovers…) always layer in open order, and
|
|
2826
|
+
* exposes which layer is on top. This replaces per-component, ad-hoc z-index
|
|
2827
|
+
* management. The counter resets once every layer is released, keeping z-index
|
|
2828
|
+
* values bounded.
|
|
2829
|
+
*
|
|
2830
|
+
* @example
|
|
2831
|
+
* ```typescript
|
|
2832
|
+
* private overlay = inject(PshOverlayService);
|
|
2833
|
+
* // on open:
|
|
2834
|
+
* this.handle = this.overlay.push(); // { id, zIndex }
|
|
2835
|
+
* // on close:
|
|
2836
|
+
* this.overlay.remove(this.handle.id);
|
|
2837
|
+
* ```
|
|
2838
|
+
*/
|
|
2839
|
+
declare class PshOverlayService {
|
|
2840
|
+
/** z-index of the first (bottom) overlay layer. */
|
|
2841
|
+
private readonly baseZIndex;
|
|
2842
|
+
/** z-index increment between stacked layers. */
|
|
2843
|
+
private readonly step;
|
|
2844
|
+
private sequence;
|
|
2845
|
+
private readonly stack;
|
|
2846
|
+
/** Number of currently-open overlay layers. */
|
|
2847
|
+
readonly activeCount: _angular_core.Signal<number>;
|
|
2848
|
+
/**
|
|
2849
|
+
* Registers a new topmost overlay layer.
|
|
2850
|
+
* @returns a handle with a unique id and the z-index to apply.
|
|
2851
|
+
*/
|
|
2852
|
+
push(): OverlayHandle;
|
|
2853
|
+
/** Releases a previously registered layer. */
|
|
2854
|
+
remove(id: number): void;
|
|
2855
|
+
/** Returns true if the given layer is currently on top of the stack. */
|
|
2856
|
+
isTopmost(id: number): boolean;
|
|
2857
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshOverlayService, never>;
|
|
2858
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PshOverlayService>;
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
/** A handle to a teleported overlay panel. */
|
|
2862
|
+
interface PshPortalRef {
|
|
2863
|
+
/** The panel's root element — use it to position and to scope click-outside. */
|
|
2864
|
+
readonly panel: HTMLElement;
|
|
2865
|
+
/**
|
|
2866
|
+
* Positions the panel as `fixed` relative to `anchor`'s viewport rect, on the
|
|
2867
|
+
* given side with `gap` px of spacing. Bounds `max-height` to the available
|
|
2868
|
+
* viewport space so the panel never overflows the screen.
|
|
2869
|
+
*/
|
|
2870
|
+
position(anchor: HTMLElement, side: 'top' | 'bottom', gap: number): void;
|
|
2871
|
+
/** Destroys the embedded view and removes the panel from the overlay layer. */
|
|
2872
|
+
detach(): void;
|
|
2873
|
+
}
|
|
2874
|
+
/**
|
|
2875
|
+
* Teleports a `TemplateRef` into a single body-level overlay layer so popover
|
|
2876
|
+
* panels (select / dropdown / menu…) escape any ancestor `overflow`, `transform`
|
|
2877
|
+
* or stacking context and can layer above modals.
|
|
2878
|
+
*
|
|
2879
|
+
* A lightweight, CDK-free "manual portal": the embedded view is created from the
|
|
2880
|
+
* consumer's `ViewContainerRef` (so it stays in that component's change-detection
|
|
2881
|
+
* tree and keeps its bindings reactive), then its root nodes are moved into the
|
|
2882
|
+
* shared `.psh-overlay-layer`. The layer is `position: fixed; inset: 0;
|
|
2883
|
+
* pointer-events: none` at `z-index: var(--z-index-overlay)`; panels re-enable
|
|
2884
|
+
* pointer events. The layer is created lazily and removed once empty.
|
|
2885
|
+
*/
|
|
2886
|
+
declare class PshPortalService {
|
|
2887
|
+
private readonly document;
|
|
2888
|
+
private layer;
|
|
2889
|
+
private count;
|
|
2890
|
+
/** Teleports `tpl` into the overlay layer and returns a handle to control it. */
|
|
2891
|
+
attach(tpl: TemplateRef<unknown>, vcr: ViewContainerRef): PshPortalRef;
|
|
2892
|
+
private position;
|
|
2893
|
+
private detach;
|
|
2894
|
+
private ensureLayer;
|
|
2895
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshPortalService, never>;
|
|
2896
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PshPortalService>;
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
export { CHECKBOX_CONFIG, CUSTOMER_CONTEXT_SERVICE, INPUT_LABELS, MODAL_CONFIG, ModalService, NgxTranslateProvider, PAGINATION_CONFIG, PROGRESSBAR_CONFIG, PSH_THEME_OPTIONS, PshAlertComponent, PshAvatarComponent, PshBadgeComponent, PshButtonComponent, PshCardComponent, PshCheckboxComponent, PshClickOutsideDirective, PshCollapseComponent, PshDropdownComponent, PshFlowStepComponent, PshFocusTrapDirective, PshHorizontalCardComponent, PshInfoCardComponent, PshInputComponent, PshLiveAnnouncerService, PshMenuComponent, PshModalComponent, PshOverlayPositionService, PshOverlayService, PshPaginationComponent, PshPortalService, PshProgressbarComponent, PshRadioComponent, PshSelectComponent, PshSidebarComponent, PshSpinLoaderComponent, PshStatCardComponent, PshStateFlowIndicatorComponent, PshStepComponent, PshStepperComponent, PshSwitchComponent, PshTabBarComponent, PshTabComponent, PshTableComponent, PshTabsComponent, PshTagComponent, PshTextareaComponent, PshToastComponent, PshToastService, PshTooltipComponent, RADIO_CONFIG, RADIO_STYLES, SIDEBAR_CONFIG, SPINLOADER_CONFIG, STATE_FLOW_INDICATOR_CONFIG, STEPPER_CONFIG, SWITCH_CONFIG, ScrollService, TABLE_CONFIG, TABS_CONFIG, TAB_BAR_CONFIG, TAG_CONFIG, TEXTAREA_LABELS, TOAST_CONFIG, TOOLTIP_CONFIG, TRANSLATION_PROVIDER, ThemeService, ToastComponent, ToastService, provideTranslation };
|
|
2900
|
+
export type { AlertConfig, AlertLabels, AlertRole, AlertSize, AlertType, AnnouncerPoliteness, AutocompleteConfig, AvatarConfig, AvatarShape, AvatarSize, AvatarStatus, BadgeDisplayType, BadgePosition, BadgeSize, BadgeVariant, ButtonAppearance, ButtonIconPosition, ButtonSize, ButtonVariant, CardActionsAlignment, CardColorVariant, CardDensity, CardVariant, CheckboxConfig, CheckboxLabelPosition, CheckboxSize, CollapseSize, CollapseVariant, CustomerContextService, DropdownAppearance, DropdownConfig, DropdownItem, DropdownPlacement, DropdownSize, DropdownVariant, FlowStepConfig, IconPosition, InfoCardData, InfoCardOptions, InfoCardVariant, InputConfig, InputSize, InputType, InputVariant, MenuItem, MenuMode, MenuVariant, ModalConfig, ModalSize, OverlayHandle, OverlayPositionOptions, OverlaySide, PaginationConfig, PaginationSize, PaginationVariant, ProgressbarConfig, ProgressbarLabelPosition, ProgressbarMode, ProgressbarSize, ProgressbarVariant, PshPortalRef, PshThemeOptions, RadioConfig, RadioSize, SearchConfig, SelectOption, SelectOptionGroup, SelectSize, SelectVariant, SidebarConfig, SidebarMode, SidebarPosition, SpinLoaderColor, SpinLoaderConfig, SpinLoaderSize, SpinLoaderVariant, StatCardLayout, StatCardVariant, StatTagVariant, StateFlowIndicatorAriaLabels, StateFlowIndicatorConfig, StateFlowIndicatorSize, StepConfig, StepperAriaLabels, StepperConfig, StepperVariant, SuggestionResult, SwitchConfig, SwitchSize, Tab, TabBarChangeEvent, TabBarConfig, TabBarItem, TabChangeEvent, TableCellContext, TableColumn, TableConfig, TableExpandedRowContext, TableRow, TableRowClickEvent, TableRowExpandEvent, TableSort, TabsConfig, TabsSize, TabsVariant, TagConfig, TagSize, TagVariant, TextareaConfig, TextareaResize, TextareaSize, TextareaVariant, Theme, ThemeConfig, Toast, ToastConfig, ToastPosition, ToastType, TooltipConfig, TooltipPosition, TooltipVariant, TranslationConfig, TranslationEntry, TranslationProvider };
|