ps-helix 5.1.2 → 6.0.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 +1188 -1188
- package/THEME.md +446 -446
- package/fesm2022/ps-helix.mjs +1949 -1012
- 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/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 +291 -67
package/types/ps-helix.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ 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
|
|
@@ -124,7 +123,7 @@ declare class PshAvatarComponent {
|
|
|
124
123
|
hasIcon: _angular_core.Signal<boolean>;
|
|
125
124
|
computedAriaLabel: _angular_core.Signal<string>;
|
|
126
125
|
statusColor: _angular_core.Signal<string | undefined>;
|
|
127
|
-
state: _angular_core.Signal<
|
|
126
|
+
state: _angular_core.Signal<"default" | AvatarStatus>;
|
|
128
127
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshAvatarComponent, never>;
|
|
129
128
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PshAvatarComponent, "psh-avatar", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "size": "sizeChange"; "shape": "shapeChange"; "src": "srcChange"; "alt": "altChange"; }, never, never, true, never>;
|
|
130
129
|
}
|
|
@@ -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) */
|
|
@@ -288,7 +288,7 @@ declare class PshCardComponent implements OnDestroy {
|
|
|
288
288
|
/** État désactivé - réduit l'opacité */
|
|
289
289
|
disabled: _angular_core.InputSignal<boolean>;
|
|
290
290
|
/** Émis lors du clic sur la carte (si interactive) */
|
|
291
|
-
clicked: _angular_core.OutputEmitterRef<
|
|
291
|
+
clicked: _angular_core.OutputEmitterRef<KeyboardEvent | MouseEvent>;
|
|
292
292
|
/** Classes CSS calculées selon les propriétés */
|
|
293
293
|
computedClasses: _angular_core.Signal<string>;
|
|
294
294
|
/** Styles calculés */
|
|
@@ -356,7 +356,7 @@ declare class PshStatCardComponent {
|
|
|
356
356
|
/** Active la direction row pour le card-body (icône et contenu côte à côte en flex-row) */
|
|
357
357
|
rowDirection: _angular_core.InputSignal<boolean>;
|
|
358
358
|
/** Émis lors du clic sur la carte */
|
|
359
|
-
clicked: _angular_core.OutputEmitterRef<
|
|
359
|
+
clicked: _angular_core.OutputEmitterRef<KeyboardEvent | MouseEvent>;
|
|
360
360
|
private computedValue;
|
|
361
361
|
private computedDescription;
|
|
362
362
|
private computedIcon;
|
|
@@ -450,7 +450,7 @@ declare class PshHorizontalCardComponent {
|
|
|
450
450
|
/** Hauteur du contenu latéral sur mobile (utiliser les tokens de sizing) */
|
|
451
451
|
mobileHeight: _angular_core.InputSignal<string>;
|
|
452
452
|
/** Émis lors du clic sur la carte */
|
|
453
|
-
clicked: _angular_core.OutputEmitterRef<
|
|
453
|
+
clicked: _angular_core.OutputEmitterRef<KeyboardEvent | MouseEvent>;
|
|
454
454
|
/** Classes CSS calculées selon les propriétés */
|
|
455
455
|
computedClasses: _angular_core.Signal<string>;
|
|
456
456
|
/** Styles calculés */
|
|
@@ -560,7 +560,7 @@ declare class PshInfoCardComponent implements AfterContentInit, OnDestroy {
|
|
|
560
560
|
/** Whether the card is disabled */
|
|
561
561
|
disabled: _angular_core.InputSignal<boolean>;
|
|
562
562
|
/** Emitted when card is clicked */
|
|
563
|
-
clicked: _angular_core.OutputEmitterRef<
|
|
563
|
+
clicked: _angular_core.OutputEmitterRef<KeyboardEvent | MouseEvent>;
|
|
564
564
|
/** Whether to show copy buttons on rows (opt-in) */
|
|
565
565
|
copyable: _angular_core.InputSignal<boolean>;
|
|
566
566
|
/** Label prefix for the copy button aria-label */
|
|
@@ -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';
|
|
@@ -973,7 +1006,7 @@ declare class PshTextareaComponent implements ControlValueAccessor, FormValueCon
|
|
|
973
1006
|
hasError: _angular_core.Signal<boolean>;
|
|
974
1007
|
computedAriaLabel: _angular_core.Signal<string | null>;
|
|
975
1008
|
describedBy: _angular_core.Signal<string | null>;
|
|
976
|
-
state: _angular_core.Signal<"
|
|
1009
|
+
state: _angular_core.Signal<"default" | "success" | "disabled" | "error" | "readonly" | "focused">;
|
|
977
1010
|
characterCountLabel: "caractères";
|
|
978
1011
|
constructor();
|
|
979
1012
|
private onChange;
|
|
@@ -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,9 @@ 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 injector;
|
|
1653
|
+
protected readonly resolvedSide: _angular_core.WritableSignal<"top" | "bottom">;
|
|
1616
1654
|
protected readonly selectId: string;
|
|
1617
1655
|
readonly value: _angular_core.ModelSignal<T | T[] | null>;
|
|
1618
1656
|
readonly disabled: _angular_core.ModelSignal<boolean>;
|
|
@@ -1646,7 +1684,7 @@ declare class PshSelectComponent<T = unknown> implements ControlValueAccessor, F
|
|
|
1646
1684
|
scrollEnd: _angular_core.OutputEmitterRef<void>;
|
|
1647
1685
|
isOpen: _angular_core.Signal<boolean>;
|
|
1648
1686
|
searchTerm: _angular_core.Signal<string>;
|
|
1649
|
-
state: _angular_core.Signal<"
|
|
1687
|
+
state: _angular_core.Signal<"default" | "success" | "disabled" | "error">;
|
|
1650
1688
|
computedAriaLabel: _angular_core.Signal<string>;
|
|
1651
1689
|
describedBy: _angular_core.Signal<"error-message" | "success-message" | "hint-message" | null>;
|
|
1652
1690
|
flatFilteredOptions: _angular_core.Signal<FlatOption<T>[]>;
|
|
@@ -1654,11 +1692,12 @@ declare class PshSelectComponent<T = unknown> implements ControlValueAccessor, F
|
|
|
1654
1692
|
selectedLabel: _angular_core.Signal<string>;
|
|
1655
1693
|
filteredOptions: _angular_core.Signal<(SelectOption<T> | SelectOptionGroup<T>)[]>;
|
|
1656
1694
|
constructor();
|
|
1695
|
+
private reposition;
|
|
1657
1696
|
private onChange;
|
|
1658
1697
|
private onTouched;
|
|
1659
1698
|
writeValue(value: unknown): void;
|
|
1660
|
-
registerOnChange(fn:
|
|
1661
|
-
registerOnTouched(fn:
|
|
1699
|
+
registerOnChange(fn: (value: T | T[] | null) => void): void;
|
|
1700
|
+
registerOnTouched(fn: () => void): void;
|
|
1662
1701
|
setDisabledState(isDisabled: boolean): void;
|
|
1663
1702
|
toggle(): void;
|
|
1664
1703
|
close(): void;
|
|
@@ -1678,7 +1717,7 @@ declare class PshSelectComponent<T = unknown> implements ControlValueAccessor, F
|
|
|
1678
1717
|
private focusFirst;
|
|
1679
1718
|
private focusLast;
|
|
1680
1719
|
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,
|
|
1720
|
+
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
1721
|
}
|
|
1683
1722
|
|
|
1684
1723
|
/**
|
|
@@ -1714,9 +1753,8 @@ interface SidebarConfig {
|
|
|
1714
1753
|
declare const SIDEBAR_CONFIG: InjectionToken<Partial<SidebarConfig>>;
|
|
1715
1754
|
declare class PshSidebarComponent implements OnDestroy {
|
|
1716
1755
|
private readonly config;
|
|
1717
|
-
private readonly elementRef;
|
|
1718
1756
|
private readonly platformId;
|
|
1719
|
-
private
|
|
1757
|
+
private readonly document;
|
|
1720
1758
|
private mediaQueryList;
|
|
1721
1759
|
private mediaQueryHandler;
|
|
1722
1760
|
open: _angular_core.ModelSignal<boolean>;
|
|
@@ -1738,7 +1776,6 @@ declare class PshSidebarComponent implements OnDestroy {
|
|
|
1738
1776
|
effectiveMode: _angular_core.Signal<SidebarMode>;
|
|
1739
1777
|
state: _angular_core.Signal<string>;
|
|
1740
1778
|
private readonly escapeHandler;
|
|
1741
|
-
private readonly focusTrapHandler;
|
|
1742
1779
|
private getState;
|
|
1743
1780
|
constructor();
|
|
1744
1781
|
private setupMediaQuery;
|
|
@@ -1750,7 +1787,6 @@ declare class PshSidebarComponent implements OnDestroy {
|
|
|
1750
1787
|
toggleSidebar(): void;
|
|
1751
1788
|
closeSidebar(): void;
|
|
1752
1789
|
handleBackdropClick(): void;
|
|
1753
|
-
private trapFocus;
|
|
1754
1790
|
ngOnDestroy(): void;
|
|
1755
1791
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshSidebarComponent, never>;
|
|
1756
1792
|
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 +1819,7 @@ interface SpinLoaderConfig {
|
|
|
1783
1819
|
declare const SPINLOADER_CONFIG: InjectionToken<Partial<SpinLoaderConfig>>;
|
|
1784
1820
|
declare class PshSpinLoaderComponent {
|
|
1785
1821
|
private config;
|
|
1822
|
+
private readonly document;
|
|
1786
1823
|
variant: _angular_core.InputSignal<SpinLoaderVariant>;
|
|
1787
1824
|
size: _angular_core.InputSignal<SpinLoaderSize>;
|
|
1788
1825
|
color: _angular_core.InputSignal<SpinLoaderColor>;
|
|
@@ -2138,7 +2175,7 @@ interface TableColumn {
|
|
|
2138
2175
|
/** Template personnalisé */
|
|
2139
2176
|
template?: TemplateRef<TableCellContext>;
|
|
2140
2177
|
/** Fonction de tri personnalisée */
|
|
2141
|
-
sortFn?: (a:
|
|
2178
|
+
sortFn?: (a: TableRow, b: TableRow) => number;
|
|
2142
2179
|
}
|
|
2143
2180
|
/**
|
|
2144
2181
|
* Interface for a row of the table
|
|
@@ -2148,8 +2185,8 @@ interface TableRow {
|
|
|
2148
2185
|
id: string | number;
|
|
2149
2186
|
/** Lignes enfants (un seul niveau) */
|
|
2150
2187
|
children?: TableRow[];
|
|
2151
|
-
/** Données de la ligne */
|
|
2152
|
-
[key: string]:
|
|
2188
|
+
/** Données de la ligne (valeurs arbitraires — l'appelant restreint le type) */
|
|
2189
|
+
[key: string]: unknown;
|
|
2153
2190
|
}
|
|
2154
2191
|
interface TableRowExpandEvent {
|
|
2155
2192
|
id: string | number;
|
|
@@ -2217,7 +2254,7 @@ declare const TABLE_CONFIG: InjectionToken<Partial<TableConfig>>;
|
|
|
2217
2254
|
declare class PshTableComponent {
|
|
2218
2255
|
private config;
|
|
2219
2256
|
variant: _angular_core.InputSignal<"default" | "outline">;
|
|
2220
|
-
size: _angular_core.InputSignal<"
|
|
2257
|
+
size: _angular_core.InputSignal<"medium" | "small" | "large">;
|
|
2221
2258
|
striped: _angular_core.InputSignal<boolean>;
|
|
2222
2259
|
hoverable: _angular_core.InputSignal<boolean>;
|
|
2223
2260
|
bordered: _angular_core.InputSignal<boolean>;
|
|
@@ -2251,6 +2288,10 @@ declare class PshTableComponent {
|
|
|
2251
2288
|
* Trie les données
|
|
2252
2289
|
*/
|
|
2253
2290
|
private sortData;
|
|
2291
|
+
/**
|
|
2292
|
+
* Compare deux valeurs inconnues (numérique si possible, sinon lexicographique).
|
|
2293
|
+
*/
|
|
2294
|
+
private compareValues;
|
|
2254
2295
|
/**
|
|
2255
2296
|
* Filtre les données
|
|
2256
2297
|
*/
|
|
@@ -2262,7 +2303,7 @@ declare class PshTableComponent {
|
|
|
2262
2303
|
handleSort(column: TableColumn): void;
|
|
2263
2304
|
onSearchValueChange(value: string): void;
|
|
2264
2305
|
handleRowClick(row: TableRow): void;
|
|
2265
|
-
protected getCellValue(row: TableRow, column: TableColumn):
|
|
2306
|
+
protected getCellValue(row: TableRow, column: TableColumn): unknown;
|
|
2266
2307
|
totalColumns: _angular_core.Signal<number>;
|
|
2267
2308
|
isRowExpandable(row: TableRow): boolean;
|
|
2268
2309
|
isRowExpanded(row: TableRow): boolean;
|
|
@@ -2346,7 +2387,8 @@ declare class PshTabsComponent {
|
|
|
2346
2387
|
tabs: _angular_core.InputSignal<Tab[]>;
|
|
2347
2388
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
2348
2389
|
ariaOrientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
2349
|
-
|
|
2390
|
+
activeIndexInput: _angular_core.InputSignal<number>;
|
|
2391
|
+
activeIndex: _angular_core.WritableSignal<number>;
|
|
2350
2392
|
tabComponents: _angular_core.Signal<readonly PshTabComponent[]>;
|
|
2351
2393
|
tabsToDisplay: _angular_core.Signal<Tab[]>;
|
|
2352
2394
|
hasContentProjection: _angular_core.Signal<boolean>;
|
|
@@ -2354,7 +2396,7 @@ declare class PshTabsComponent {
|
|
|
2354
2396
|
tabChange: _angular_core.OutputEmitterRef<TabChangeEvent>;
|
|
2355
2397
|
hostClasses: _angular_core.Signal<string>;
|
|
2356
2398
|
constructor();
|
|
2357
|
-
handleKeyDown(event: KeyboardEvent,
|
|
2399
|
+
handleKeyDown(event: KeyboardEvent, _index: number): void;
|
|
2358
2400
|
selectTab(index: number): void;
|
|
2359
2401
|
selectNext(): void;
|
|
2360
2402
|
selectPrevious(): void;
|
|
@@ -2363,7 +2405,7 @@ declare class PshTabsComponent {
|
|
|
2363
2405
|
getActiveTab(): Tab | undefined;
|
|
2364
2406
|
getTabComponent(index: number): PshTabComponent | undefined;
|
|
2365
2407
|
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; }; "
|
|
2408
|
+
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
2409
|
}
|
|
2368
2410
|
|
|
2369
2411
|
/**
|
|
@@ -2498,6 +2540,7 @@ declare const TOOLTIP_CONFIG: InjectionToken<Partial<TooltipConfig>>;
|
|
|
2498
2540
|
declare class PshTooltipComponent implements AfterViewInit, OnDestroy {
|
|
2499
2541
|
private config;
|
|
2500
2542
|
private elementRef;
|
|
2543
|
+
private readonly overlayPosition;
|
|
2501
2544
|
variant: _angular_core.InputSignal<TooltipVariant>;
|
|
2502
2545
|
position: _angular_core.InputSignal<TooltipPosition>;
|
|
2503
2546
|
showDelay: _angular_core.InputSignal<number>;
|
|
@@ -2556,6 +2599,8 @@ declare const PSH_THEME_OPTIONS: InjectionToken<PshThemeOptions>;
|
|
|
2556
2599
|
declare class ThemeService {
|
|
2557
2600
|
private customerContext;
|
|
2558
2601
|
private options;
|
|
2602
|
+
private readonly document;
|
|
2603
|
+
private readonly isBrowser;
|
|
2559
2604
|
private isDarkThemeSignal;
|
|
2560
2605
|
private themeNameSignal;
|
|
2561
2606
|
private lastChangeSignal;
|
|
@@ -2583,22 +2628,24 @@ declare class ThemeService {
|
|
|
2583
2628
|
private derivePalette;
|
|
2584
2629
|
private ensureIfInteractive;
|
|
2585
2630
|
private initializeTheme;
|
|
2631
|
+
/** True when the OS/browser requests a dark colour scheme. */
|
|
2632
|
+
private prefersDarkScheme;
|
|
2586
2633
|
private saveThemePreference;
|
|
2587
2634
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
2588
2635
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
2589
2636
|
}
|
|
2590
2637
|
|
|
2591
2638
|
interface TranslationProvider {
|
|
2592
|
-
translate(key: string, params?: Record<string,
|
|
2593
|
-
translateAsync(key: string, params?: Record<string,
|
|
2639
|
+
translate(key: string, params?: Record<string, unknown>): string;
|
|
2640
|
+
translateAsync(key: string, params?: Record<string, unknown>): Observable<string>;
|
|
2594
2641
|
setLanguage(lang: string): void;
|
|
2595
2642
|
getCurrentLanguage(): string;
|
|
2596
2643
|
onLangChange(): Observable<string>;
|
|
2597
2644
|
}
|
|
2598
2645
|
declare class NgxTranslateProvider implements TranslationProvider {
|
|
2599
2646
|
private translateService;
|
|
2600
|
-
translate(key: string, params?: Record<string,
|
|
2601
|
-
translateAsync(key: string, params?: Record<string,
|
|
2647
|
+
translate(key: string, params?: Record<string, unknown>): string;
|
|
2648
|
+
translateAsync(key: string, params?: Record<string, unknown>): Observable<string>;
|
|
2602
2649
|
setLanguage(lang: string): void;
|
|
2603
2650
|
getCurrentLanguage(): string;
|
|
2604
2651
|
onLangChange(): Observable<string>;
|
|
@@ -2621,11 +2668,188 @@ interface TranslationEntry {
|
|
|
2621
2668
|
}
|
|
2622
2669
|
|
|
2623
2670
|
declare class ScrollService {
|
|
2624
|
-
private router;
|
|
2625
|
-
|
|
2671
|
+
private readonly router;
|
|
2672
|
+
private readonly document;
|
|
2673
|
+
private readonly isBrowser;
|
|
2674
|
+
constructor();
|
|
2626
2675
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollService, never>;
|
|
2627
2676
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScrollService>;
|
|
2628
2677
|
}
|
|
2629
2678
|
|
|
2630
|
-
|
|
2631
|
-
|
|
2679
|
+
/**
|
|
2680
|
+
* Headless focus-trap primitive.
|
|
2681
|
+
*
|
|
2682
|
+
* Apply to a container element and toggle activation with `[pshFocusTrap]`.
|
|
2683
|
+
* When active it:
|
|
2684
|
+
* - remembers the element that had focus before activation,
|
|
2685
|
+
* - moves focus to the first focusable element inside the container
|
|
2686
|
+
* (deterministically, after the next render — no `setTimeout`),
|
|
2687
|
+
* - keeps Tab / Shift+Tab focus cycling within the container, and
|
|
2688
|
+
* - restores focus to the previously focused element on deactivation/destroy.
|
|
2689
|
+
*
|
|
2690
|
+
* Handles the case where focus is currently outside the container.
|
|
2691
|
+
*
|
|
2692
|
+
* @example
|
|
2693
|
+
* ```html
|
|
2694
|
+
* <div [pshFocusTrap]="isOpen()">…</div>
|
|
2695
|
+
* ```
|
|
2696
|
+
*/
|
|
2697
|
+
declare class PshFocusTrapDirective {
|
|
2698
|
+
private readonly host;
|
|
2699
|
+
private readonly document;
|
|
2700
|
+
private readonly injector;
|
|
2701
|
+
private readonly isBrowser;
|
|
2702
|
+
/** Whether the trap is active. */
|
|
2703
|
+
readonly pshFocusTrap: _angular_core.InputSignal<boolean>;
|
|
2704
|
+
/** Whether to restore focus to the previously focused element on deactivation. */
|
|
2705
|
+
readonly pshFocusTrapRestore: _angular_core.InputSignal<boolean>;
|
|
2706
|
+
/**
|
|
2707
|
+
* Whether to move focus into the container when the trap activates.
|
|
2708
|
+
* Set to false to trap + restore focus without stealing initial focus.
|
|
2709
|
+
*/
|
|
2710
|
+
readonly pshFocusTrapAutoFocus: _angular_core.InputSignal<boolean>;
|
|
2711
|
+
private previouslyFocused;
|
|
2712
|
+
private active;
|
|
2713
|
+
constructor();
|
|
2714
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2715
|
+
private activate;
|
|
2716
|
+
private deactivate;
|
|
2717
|
+
private restoreFocus;
|
|
2718
|
+
private getFocusableElements;
|
|
2719
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshFocusTrapDirective, never>;
|
|
2720
|
+
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>;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
type AnnouncerPoliteness = 'polite' | 'assertive';
|
|
2724
|
+
/**
|
|
2725
|
+
* Centralised ARIA live-region announcer.
|
|
2726
|
+
*
|
|
2727
|
+
* Provides a single pair of visually-hidden `aria-live` regions (polite and
|
|
2728
|
+
* assertive) shared across the whole application, instead of every component
|
|
2729
|
+
* rendering its own live region. Inject it and call {@link announce} to read a
|
|
2730
|
+
* message to assistive technology (toasts, async loading, form validation…).
|
|
2731
|
+
*
|
|
2732
|
+
* @example
|
|
2733
|
+
* ```typescript
|
|
2734
|
+
* private announcer = inject(PshLiveAnnouncerService);
|
|
2735
|
+
* this.announcer.announce('3 results found');
|
|
2736
|
+
* this.announcer.announce('Save failed', 'assertive');
|
|
2737
|
+
* ```
|
|
2738
|
+
*/
|
|
2739
|
+
declare class PshLiveAnnouncerService {
|
|
2740
|
+
private readonly document;
|
|
2741
|
+
private readonly isBrowser;
|
|
2742
|
+
private politeRegion;
|
|
2743
|
+
private assertiveRegion;
|
|
2744
|
+
constructor();
|
|
2745
|
+
/**
|
|
2746
|
+
* Announces a message in the requested live region.
|
|
2747
|
+
* The region is cleared first so the same message announced twice is re-read.
|
|
2748
|
+
*/
|
|
2749
|
+
announce(message: string, politeness?: AnnouncerPoliteness): void;
|
|
2750
|
+
/** Clears both live regions. */
|
|
2751
|
+
clear(): void;
|
|
2752
|
+
private getRegion;
|
|
2753
|
+
private createRegion;
|
|
2754
|
+
private dispose;
|
|
2755
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshLiveAnnouncerService, never>;
|
|
2756
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PshLiveAnnouncerService>;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
/** A cardinal side an overlay can be placed on, relative to its anchor. */
|
|
2760
|
+
type OverlaySide = 'top' | 'bottom' | 'left' | 'right';
|
|
2761
|
+
/** Options describing the (estimated) overlay size and the gap to the anchor. */
|
|
2762
|
+
interface OverlayPositionOptions {
|
|
2763
|
+
/** Estimated overlay width in px (used for left/right flipping and align flipping). */
|
|
2764
|
+
overlayWidth?: number;
|
|
2765
|
+
/** Estimated overlay height in px (used for top/bottom flipping). */
|
|
2766
|
+
overlayHeight?: number;
|
|
2767
|
+
/** Minimum gap between anchor and overlay in px. */
|
|
2768
|
+
offset?: number;
|
|
2769
|
+
}
|
|
2770
|
+
/**
|
|
2771
|
+
* Shared anchored-positioning primitive with viewport collision detection.
|
|
2772
|
+
*
|
|
2773
|
+
* Computes whether an overlay (tooltip, dropdown, select panel, menu…) fits on
|
|
2774
|
+
* its preferred side of an anchor element and flips it to the opposite side
|
|
2775
|
+
* when there is not enough room and the opposite side has more. Based on
|
|
2776
|
+
* `getBoundingClientRect`, so it must be called when the anchor is laid out
|
|
2777
|
+
* (i.e. in the browser, on open / scroll / resize).
|
|
2778
|
+
*
|
|
2779
|
+
* This generalises the collision logic that previously lived only inside the
|
|
2780
|
+
* tooltip, so dropdown / select / menu popovers can stop overflowing too.
|
|
2781
|
+
*/
|
|
2782
|
+
declare class PshOverlayPositionService {
|
|
2783
|
+
private readonly document;
|
|
2784
|
+
/**
|
|
2785
|
+
* Resolves the best cardinal side for an overlay, flipping `preferred` to its
|
|
2786
|
+
* opposite when it would overflow the viewport and the opposite has more room.
|
|
2787
|
+
*/
|
|
2788
|
+
flipSide(anchor: HTMLElement, preferred: OverlaySide, options?: OverlayPositionOptions): OverlaySide;
|
|
2789
|
+
/**
|
|
2790
|
+
* Resolves a `"<side>"` or `"<side>-<align>"` placement string (e.g. `top`,
|
|
2791
|
+
* `bottom-start`, `top-end`), flipping the side to fit the viewport while
|
|
2792
|
+
* preserving the alignment. Unknown placements are returned unchanged.
|
|
2793
|
+
*
|
|
2794
|
+
* @example
|
|
2795
|
+
* ```typescript
|
|
2796
|
+
* // Near the bottom of the viewport with no room below:
|
|
2797
|
+
* positions.flipPlacement(trigger, 'bottom-start', { overlayHeight: 240 });
|
|
2798
|
+
* // => 'top-start'
|
|
2799
|
+
* ```
|
|
2800
|
+
*/
|
|
2801
|
+
flipPlacement(anchor: HTMLElement, preferred: string, options?: OverlayPositionOptions): string;
|
|
2802
|
+
private isSide;
|
|
2803
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshOverlayPositionService, never>;
|
|
2804
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PshOverlayPositionService>;
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
/** A handle for a registered overlay layer. */
|
|
2808
|
+
interface OverlayHandle {
|
|
2809
|
+
/** Unique id of the layer, used to release it. */
|
|
2810
|
+
readonly id: number;
|
|
2811
|
+
/** z-index assigned to this layer (higher = on top). */
|
|
2812
|
+
readonly zIndex: number;
|
|
2813
|
+
}
|
|
2814
|
+
/**
|
|
2815
|
+
* Central overlay stacking authority.
|
|
2816
|
+
*
|
|
2817
|
+
* Hands out monotonically increasing z-indexes so that stacked overlays
|
|
2818
|
+
* (modals, dropdowns, tooltips, popovers…) always layer in open order, and
|
|
2819
|
+
* exposes which layer is on top. This replaces per-component, ad-hoc z-index
|
|
2820
|
+
* management. The counter resets once every layer is released, keeping z-index
|
|
2821
|
+
* values bounded.
|
|
2822
|
+
*
|
|
2823
|
+
* @example
|
|
2824
|
+
* ```typescript
|
|
2825
|
+
* private overlay = inject(PshOverlayService);
|
|
2826
|
+
* // on open:
|
|
2827
|
+
* this.handle = this.overlay.push(); // { id, zIndex }
|
|
2828
|
+
* // on close:
|
|
2829
|
+
* this.overlay.remove(this.handle.id);
|
|
2830
|
+
* ```
|
|
2831
|
+
*/
|
|
2832
|
+
declare class PshOverlayService {
|
|
2833
|
+
/** z-index of the first (bottom) overlay layer. */
|
|
2834
|
+
private readonly baseZIndex;
|
|
2835
|
+
/** z-index increment between stacked layers. */
|
|
2836
|
+
private readonly step;
|
|
2837
|
+
private sequence;
|
|
2838
|
+
private readonly stack;
|
|
2839
|
+
/** Number of currently-open overlay layers. */
|
|
2840
|
+
readonly activeCount: _angular_core.Signal<number>;
|
|
2841
|
+
/**
|
|
2842
|
+
* Registers a new topmost overlay layer.
|
|
2843
|
+
* @returns a handle with a unique id and the z-index to apply.
|
|
2844
|
+
*/
|
|
2845
|
+
push(): OverlayHandle;
|
|
2846
|
+
/** Releases a previously registered layer. */
|
|
2847
|
+
remove(id: number): void;
|
|
2848
|
+
/** Returns true if the given layer is currently on top of the stack. */
|
|
2849
|
+
isTopmost(id: number): boolean;
|
|
2850
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PshOverlayService, never>;
|
|
2851
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PshOverlayService>;
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2854
|
+
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, 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 };
|
|
2855
|
+
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, 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 };
|