cps-ui-kit 22.0.1 → 22.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "22.0.1",
3
+ "version": "22.1.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.1.3",
6
6
  "@angular/core": "^22.1.3",
@@ -160,6 +160,7 @@ declare class CpsTooltipDirective implements OnDestroy {
160
160
  private _document;
161
161
  private _platformId;
162
162
  private _domSanitizer;
163
+ private _liveAnnouncer;
163
164
  constructor();
164
165
  ngOnDestroy(): void;
165
166
  onMouseEnter(): void;
@@ -184,7 +185,6 @@ declare class CpsTooltipDirective implements OnDestroy {
184
185
  private _getCoordsForPosition;
185
186
  private _focusableIn;
186
187
  private _resolveAriaTarget;
187
- private _announce;
188
188
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsTooltipDirective, never>;
189
189
  static ɵdir: i0.ɵɵDirectiveDeclaration<CpsTooltipDirective, "[cpsTooltip]", never, { "tooltip": { "alias": "cpsTooltip"; "required": true; "isSignal": true; }; "tooltipOpenDelay": { "alias": "tooltipOpenDelay"; "required": false; "isSignal": true; }; "tooltipCloseDelay": { "alias": "tooltipCloseDelay"; "required": false; "isSignal": true; }; "tooltipOpenOn": { "alias": "tooltipOpenOn"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; "tooltipPersistent": { "alias": "tooltipPersistent"; "required": false; "isSignal": true; }; "tooltipDisabled": { "alias": "tooltipDisabled"; "required": false; "isSignal": true; }; "tooltipMaxWidth": { "alias": "tooltipMaxWidth"; "required": false; "isSignal": true; }; "tooltipContentClass": { "alias": "tooltipContentClass"; "required": false; "isSignal": true; }; "tooltipOffset": { "alias": "tooltipOffset"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
190
190
  }
@@ -17524,13 +17524,21 @@ declare class CpsFocusService {
17524
17524
  */
17525
17525
  suppressNextFocusRing(el: HTMLElement): void;
17526
17526
  /**
17527
- * Focuses `el`, conditionally suppressing the focus-visible ring.
17527
+ * Focuses `el`, optionally suppressing its focus ring and passing native
17528
+ * focus options through to `HTMLElement.focus`.
17528
17529
  *
17529
- * When `showFocusRing` is `false`, adds the `suppress-focus-visible` CSS
17530
- * class to the element before focusing and removes it on the next `blur`
17531
- * event. This keeps the UI clean for pointer-initiated closes.
17530
+ * @param el - The element to focus.
17531
+ * @param showFocusRing - Whether the focus ring should be shown. When false, adds
17532
+ * the suppress-focus-visible CSS class to the element before focusing and removes
17533
+ * it on the next blur event to keep the UI clean for pointer-initiated closes.
17534
+ * @param options - Native focus options, e.g. `{ preventScroll: true }`.
17535
+ *
17536
+ * @example
17537
+ * ```ts
17538
+ * focusService.focusElement(button, true, { preventScroll: true });
17539
+ * ```
17532
17540
  */
17533
- focusElement(el: HTMLElement, showFocusRing: boolean): void;
17541
+ focusElement(el: HTMLElement, showFocusRing: boolean, options?: Parameters<HTMLElement['focus']>[0]): void;
17534
17542
  /**
17535
17543
  * Installs a Tab key focus trap on `container`.
17536
17544
  *
@@ -17900,11 +17908,11 @@ declare class CpsLiveAnnouncerService implements OnDestroy {
17900
17908
  /**
17901
17909
  * Announces a message through the appropriate live region. Clears any
17902
17910
  * existing text first so the same message can be re-announced, then writes
17903
- * the new text on the next tick so screen readers observe the content change.
17904
- * After `duration` ms the region is cleared automatically; pass `0` to keep
17905
- * the message indefinitely. Defaults to 5000ms.
17911
+ * the new text after `delayMs` so screen readers observe the content change.
17912
+ * After `durationMs` the region is cleared automatically; pass `0` to keep
17913
+ * the message indefinitely. Defaults to a next-tick write and 5000ms duration.
17906
17914
  */
17907
- announce(message: string, politeness?: CpsLiveAnnouncerPoliteness, durationMs?: number): void;
17915
+ announce(message: string, politeness?: CpsLiveAnnouncerPoliteness, durationMs?: number, delayMs?: number): void;
17908
17916
  /**
17909
17917
  * Clears the live region without making a new announcement.
17910
17918
  */