@wildmason/aegis 1.7.6 → 1.9.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.
@@ -7,8 +7,24 @@ import * as rxjs from 'rxjs';
7
7
  /**
8
8
  * WmModal — Lightweight modal backdrop with Escape key and click-outside dismissal.
9
9
  *
10
- * Owns the fixed backdrop, centering, and keyboard/pointer dismissal so individual
11
- * modal components don't need to repeat this logic or add their own HostListeners.
10
+ * Owns the fixed backdrop, centering, keyboard/pointer dismissal AND the focus trap,
11
+ * so individual modal components don't need to repeat this logic or add their own
12
+ * HostListeners.
13
+ *
14
+ * ## Focus is trapped here, and it has to be
15
+ *
16
+ * The trap lives on the wrapper INSIDE this component's `@if (visible())`, exactly as
17
+ * `wm-dialog` does. That placement is not a style preference — it is the only placement
18
+ * that works. `CdkTrapFocus.ngAfterContentInit` calls `attachAnchors()`, which is a
19
+ * no-op unless the element already has a `parentNode`. An element the consumer projects
20
+ * in through `<ng-content/>` does not have one at that moment, so a consumer-applied
21
+ * `cdkTrapFocus` attaches zero anchors and silently traps nothing — `autoCapture` still
22
+ * pulls focus in, which makes it look like it works, while Tab walks straight out the
23
+ * back of the dialog. Three Helm surfaces shipped that way before it was measured.
24
+ *
25
+ * Consumers must therefore NOT add their own `cdkTrapFocus`; nesting a second trap
26
+ * inside this one only creates a conflict. Consumers DO still own `role="dialog"`,
27
+ * `aria-modal` and the accessible name, because only they know what the dialog is.
12
28
  *
13
29
  * Usage:
14
30
  * <wm-modal [visible]="visible()" (dismiss)="close()">
@@ -240,9 +256,20 @@ declare class WmAutoFocus implements AfterViewInit {
240
256
 
241
257
  declare class WmTab {
242
258
  readonly value: _angular_core.InputSignal<string>;
259
+ /**
260
+ * Keeps a prerequisite-gated tab discoverable while preventing activation.
261
+ * Unlike a native disabled button, unavailable tabs remain in the roving
262
+ * focus order so keyboard and assistive-technology users can learn why the
263
+ * destination cannot be opened yet.
264
+ */
265
+ readonly unavailable: _angular_core.InputSignal<boolean>;
266
+ /** Exact prerequisite guidance exposed to both pointer and AT users. */
267
+ readonly unavailableReason: _angular_core.InputSignal<string>;
268
+ /** Render a non-interactive group divider immediately before this tab. */
269
+ readonly separatorBefore: _angular_core.InputSignal<boolean>;
243
270
  readonly tmpl: _angular_core.Signal<TemplateRef<void>>;
244
271
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WmTab, never>;
245
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WmTab, "wm-tab", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
272
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WmTab, "wm-tab", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "unavailable": { "alias": "unavailable"; "required": false; "isSignal": true; }; "unavailableReason": { "alias": "unavailableReason"; "required": false; "isSignal": true; }; "separatorBefore": { "alias": "separatorBefore"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
246
273
  }
247
274
 
248
275
  declare class WmTabs {
@@ -251,7 +278,7 @@ declare class WmTabs {
251
278
  readonly select: _angular_core.OutputEmitterRef<string>;
252
279
  protected readonly tabs: _angular_core.Signal<readonly WmTab[]>;
253
280
  protected focusedIndex: _angular_core.WritableSignal<number>;
254
- protected selectTab(value: string, index: number): void;
281
+ protected selectTab(tab: WmTab, index: number): void;
255
282
  protected onBlur(): void;
256
283
  protected onKeyDown(event: KeyboardEvent, container: HTMLElement): void;
257
284
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WmTabs, never>;
@@ -565,6 +592,22 @@ declare class WmCombobox implements ControlValueAccessor, OnDestroy {
565
592
  readonly allowFreeform: _angular_core.InputSignal<boolean>;
566
593
  /** Placeholder text for the input. */
567
594
  readonly placeholder: _angular_core.InputSignal<string>;
595
+ /**
596
+ * Accessible name for the combobox input.
597
+ *
598
+ * Required unless `ariaLabelledby` is supplied. The host `<wm-combobox>` is
599
+ * not a labelable element, so a consumer's `<label for="\u2026">` cannot reach the
600
+ * inner input \u2014 and the placeholder is blanked as soon as a chip is selected,
601
+ * so in multi-select mode there is otherwise no accessible name at all once
602
+ * the user picks anything.
603
+ */
604
+ readonly ariaLabel: _angular_core.InputSignal<string>;
605
+ /**
606
+ * ID of a visible element that names this combobox. Prefer this over
607
+ * `ariaLabel` when a visible caption exists, so the accessible name matches
608
+ * the visible text (WCAG 2.5.3, Label in Name).
609
+ */
610
+ readonly ariaLabelledby: _angular_core.InputSignal<string>;
568
611
  /** Disable the combobox. */
569
612
  readonly disabled: _angular_core.InputSignal<boolean>;
570
613
  /** Custom async filter function. Overrides default substring matching. */
@@ -646,7 +689,7 @@ declare class WmCombobox implements ControlValueAccessor, OnDestroy {
646
689
  * look like a no-op after close(). */
647
690
  private syncInputToSelection;
648
691
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WmCombobox, never>;
649
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WmCombobox, "wm-combobox", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "allowFreeform": { "alias": "allowFreeform"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "filterFn": { "alias": "filterFn"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxPanelHeight": { "alias": "maxPanelHeight"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "values": "valuesChange"; "query": "query"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
692
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WmCombobox, "wm-combobox", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "allowFreeform": { "alias": "allowFreeform"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "filterFn": { "alias": "filterFn"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxPanelHeight": { "alias": "maxPanelHeight"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "values": "valuesChange"; "query": "query"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
650
693
  }
651
694
 
652
695
  type ToastType = 'success' | 'error' | 'info' | 'progress';