@tedi-design-system/angular 8.1.0-rc.11 → 8.1.0-rc.12

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": "@tedi-design-system/angular",
3
- "version": "8.1.0-rc.11",
3
+ "version": "8.1.0-rc.12",
4
4
  "type": "module",
5
5
  "main": "community.mjs",
6
6
  "module": "fesm2022/tedi-design-system-angular.mjs",
package/tedi/index.d.ts CHANGED
@@ -5268,10 +5268,17 @@ declare class TruncateComponent {
5268
5268
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TruncateComponent, "tedi-truncate", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "ellipsis": { "alias": "ellipsis"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, never, true, never>;
5269
5269
  }
5270
5270
 
5271
- type DropdownTriggerAriaHasPopup = "menu" | "listbox" | "dialog" | "true";
5271
+ type DropdownTriggerAriaHasPopup = "menu" | "listbox" | "dialog" | "true" | "false";
5272
5272
  declare class DropdownTriggerDirective implements AfterViewInit {
5273
- /** Defines the aria-haspopup attribute for the trigger, informing assistive technologies whether it opens a menu or listbox. Improves accessibility by describing the type of popup. */
5274
- readonly ariaHaspopup: _angular_core.InputSignal<DropdownTriggerAriaHasPopup>;
5273
+ /**
5274
+ * The `aria-haspopup` value for the trigger, telling assistive technology
5275
+ * what kind of popup it opens.
5276
+ *
5277
+ * Defaults to the content's `dropdownRole`: `menu` for a menu, `listbox` for
5278
+ * a listbox, and no attribute for a plain `list`, which ARIA has no
5279
+ * `aria-haspopup` token for. `false` also omits the attribute.
5280
+ */
5281
+ readonly ariaHaspopup: _angular_core.InputSignal<DropdownTriggerAriaHasPopup | undefined>;
5275
5282
  readonly host: ElementRef<HTMLElement>;
5276
5283
  readonly dropdown: DropdownComponent;
5277
5284
  readonly overlayOrigin: CdkOverlayOrigin;
@@ -5284,6 +5291,7 @@ declare class DropdownTriggerDirective implements AfterViewInit {
5284
5291
  * would both be tab stops, and the ARIA state would land on the wrong element.
5285
5292
  */
5286
5293
  private readonly triggerElement;
5294
+ private readonly hasPopup;
5287
5295
  constructor();
5288
5296
  ngAfterViewInit(): void;
5289
5297
  focus(): void;
@@ -5292,6 +5300,7 @@ declare class DropdownTriggerDirective implements AfterViewInit {
5292
5300
  get focusableElement(): HTMLElement;
5293
5301
  onClick(): void;
5294
5302
  onKeydown(event: KeyboardEvent): void;
5303
+ private isWidgetContent;
5295
5304
  private resolveTriggerElement;
5296
5305
  private isNativelyFocusable;
5297
5306
  private openAndFocusFirst;
@@ -5300,6 +5309,18 @@ declare class DropdownTriggerDirective implements AfterViewInit {
5300
5309
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DropdownTriggerDirective, "[tedi-dropdown-trigger]", never, { "ariaHaspopup": { "alias": "ariaHaspopup"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof _angular_cdk_overlay.CdkOverlayOrigin; inputs: {}; outputs: {}; }]>;
5301
5310
  }
5302
5311
 
5312
+ /**
5313
+ * How the dropdown panel is exposed to assistive technology.
5314
+ *
5315
+ * - `menu`: a menu of actions. Composite widget, so it is a single tab stop
5316
+ * with arrow-key navigation and its items are `menuitem`s.
5317
+ * - `listbox`: a list of options, one of which can be selected. Composite
5318
+ * widget, like `menu`, and its items are `option`s.
5319
+ * - `list`: a plain list, not a widget. Items keep their own semantics, so
5320
+ * navigation links stay links and each is its own tab stop. Use this
5321
+ * whenever the panel is a set of links.
5322
+ */
5323
+ type DropdownRole = "menu" | "listbox" | "list";
5303
5324
  interface DropdownApi {
5304
5325
  /** Current value of the dropdown. Used to track the selected option in listbox mode. */
5305
5326
  value: WritableSignal<string | undefined>;
@@ -5329,7 +5350,9 @@ interface DropdownApi {
5329
5350
  declare const DROPDOWN_API: InjectionToken<DropdownApi>;
5330
5351
  interface DropdownContentApi {
5331
5352
  /** The ARIA role of the dropdown content. Determines keyboard interaction and accessibility semantics. */
5332
- dropdownRole: Signal<"menu" | "listbox">;
5353
+ dropdownRole: Signal<DropdownRole>;
5354
+ /** Whether the content is a composite widget (`menu`, `listbox`) rather than a plain `list`. Widgets own focus management and key handling; a plain list leaves both to the items' own controls. */
5355
+ isWidget: Signal<boolean>;
5333
5356
  }
5334
5357
  declare const DROPDOWN_CONTENT_API: InjectionToken<DropdownContentApi>;
5335
5358
 
@@ -5381,6 +5404,20 @@ declare class DropdownItemComponent {
5381
5404
  readonly value: _angular_core.InputSignal<string | undefined>;
5382
5405
  /** Is item disabled? */
5383
5406
  readonly disabled: _angular_core.InputSignal<boolean>;
5407
+ /**
5408
+ * Whether the projected content is itself the interactive control, e.g. a
5409
+ * button. In a `menu` or `listbox` the item role and the roving tabindex then
5410
+ * move onto that element instead of the host `li`, so assistive technology
5411
+ * reports one control per item and the control keeps its own activation
5412
+ * behaviour.
5413
+ *
5414
+ * A widget role replaces the control's own role, so a projected link stops
5415
+ * being announced as a link. For navigation links use
5416
+ * `dropdownRole="list"` instead, where this input is not needed: a plain list
5417
+ * adds no roles, and the links stay links and stay in the tab order.
5418
+ * @default false
5419
+ */
5420
+ readonly interactiveContent: _angular_core.InputSignal<boolean>;
5384
5421
  /**
5385
5422
  * Whether the item's label clips overflowing content (for text ellipsis).
5386
5423
  * Set `false` when projecting content with decorations that intentionally
@@ -5406,20 +5443,58 @@ declare class DropdownItemComponent {
5406
5443
  readonly dropdownContent: DropdownContentApi;
5407
5444
  /** Check if custom dropdown-item-value is provided */
5408
5445
  readonly customItemValue: _angular_core.Signal<DropdownItemValueComponent | undefined>;
5446
+ private readonly renderer;
5447
+ private readonly destroyRef;
5448
+ private control;
5449
+ constructor();
5450
+ /** The widget role for this item, or `null` in a plain `list`. */
5451
+ itemRole(): "menuitem" | "option" | null;
5452
+ hostRole(): "option" | "menuitem" | "none" | null;
5453
+ hostAriaSelected(): boolean | null;
5454
+ hostAriaDisabled(): "true" | null;
5455
+ hostTabindex(): "-1" | null;
5456
+ /**
5457
+ * Whether the item's ARIA state and focus belong on the projected control
5458
+ * rather than the host `li`. Always true in a plain `list`, where the
5459
+ * projected control is what the item is.
5460
+ */
5461
+ private controlOwnsSemantics;
5409
5462
  isSelected(): boolean;
5463
+ /**
5464
+ * The element that carries the item's role, roving tabindex and focus: the
5465
+ * projected control when it owns the item's semantics, the host `li`
5466
+ * otherwise.
5467
+ */
5468
+ focusTarget(): HTMLElement;
5410
5469
  focus(): void;
5470
+ setTabindex(value: string | null): void;
5471
+ private controlElement;
5411
5472
  onClick(): void;
5412
5473
  onMousedown(event: MouseEvent): void;
5413
5474
  onKeydown(event: KeyboardEvent): void;
5475
+ /** Returns whether the key was an activation key and has been dealt with. */
5476
+ private handleActivationKey;
5414
5477
  private onItemSelect;
5415
5478
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownItemComponent, never>;
5416
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownItemComponent, "li[tedi-dropdown-item]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clipContent": { "alias": "clipContent"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; }, ["customItemValue"], ["tedi-dropdown-item-value", "*"], true, never>;
5479
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownItemComponent, "li[tedi-dropdown-item]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "interactiveContent": { "alias": "interactiveContent"; "required": false; "isSignal": true; }; "clipContent": { "alias": "clipContent"; "required": false; "isSignal": true; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; }, ["customItemValue"], ["tedi-dropdown-item-value", "*"], true, never>;
5417
5480
  }
5418
5481
 
5419
- type DropdownRole = "menu" | "listbox";
5420
5482
  declare class DropdownContentComponent {
5421
5483
  /**
5422
- * Role for content, use listbox for list and menu for actions
5484
+ * How the panel is exposed to assistive technology: `menu` for actions,
5485
+ * `listbox` for selectable options, `list` for a plain list of links.
5486
+ *
5487
+ * `menu` and `listbox` are composite widgets, so the panel is a single tab
5488
+ * stop with arrow-key navigation and the items carry `menuitem` / `option`.
5489
+ * `list` is not a widget: it adds no item roles and no key handling, so
5490
+ * projected links keep the link role and each one is its own tab stop. A
5491
+ * panel of navigation links belongs in `list`, because a widget role would
5492
+ * replace the link role and screen readers would stop announcing them as
5493
+ * links. The `role="list"` it puts on the `ul` is redundant on paper but not
5494
+ * in Safari, which drops list semantics from a list with no marker. A `list`
5495
+ * panel also renders in the dropdown's own place in the DOM rather than at the
5496
+ * end of `<body>`, so it keeps its place in reading order for the screen
5497
+ * readers that navigate by DOM order instead of by `Tab`.
5423
5498
  * @default menu
5424
5499
  */
5425
5500
  readonly dropdownRole: _angular_core.InputSignal<DropdownRole>;
@@ -5427,6 +5502,7 @@ declare class DropdownContentComponent {
5427
5502
  private readonly dropdownApi;
5428
5503
  readonly containerId: _angular_core.Signal<string>;
5429
5504
  readonly items: _angular_core.Signal<readonly DropdownItemComponent[]>;
5505
+ readonly isWidget: _angular_core.Signal<boolean>;
5430
5506
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownContentComponent, never>;
5431
5507
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownContentComponent, "tedi-dropdown-content", never, { "dropdownRole": { "alias": "dropdownRole"; "required": false; "isSignal": true; }; }, {}, ["items"], ["*", "li[tedi-dropdown-item]"], true, never>;
5432
5508
  }
@@ -5476,6 +5552,7 @@ declare class DropdownComponent implements OnDestroy {
5476
5552
  private readonly platformId;
5477
5553
  private readonly document;
5478
5554
  private readonly renderer;
5555
+ private readonly overlayContainer;
5479
5556
  private scrollListener?;
5480
5557
  private skipNextGestureOutsideClick;
5481
5558
  constructor();
@@ -5486,6 +5563,12 @@ declare class DropdownComponent implements OnDestroy {
5486
5563
  onOutsideClick(event?: MouseEvent): void;
5487
5564
  handleFocusOut: (event: FocusEvent) => void;
5488
5565
  tabOutOfDropdown(shiftKey: boolean): void;
5566
+ /**
5567
+ * Focuses `target` and only then tears the panel down, so focus is never on a
5568
+ * detached element. `handleFocusOut` already closes on the resulting
5569
+ * `focusin`; the explicit call covers a target that refuses focus.
5570
+ */
5571
+ private moveFocusOut;
5489
5572
  focusFirstItem(): void;
5490
5573
  focusLastItem(): void;
5491
5574
  setActiveToSelectedOrFirst(): void;
@@ -5493,6 +5576,11 @@ declare class DropdownComponent implements OnDestroy {
5493
5576
  focusNextItem(fromEl: HTMLLIElement): void;
5494
5577
  focusPrevItem(fromEl: HTMLLIElement): void;
5495
5578
  updateTabindexes(): void;
5579
+ /** Moves focus to the first focusable element in the panel. */
5580
+ focusPanelStart(): void;
5581
+ onPanelKeydown(event: KeyboardEvent): void;
5582
+ private panelFocusables;
5583
+ private closeAndFocusTrigger;
5496
5584
  private setupScrollListener;
5497
5585
  private cleanupScrollListener;
5498
5586
  private findIndexByElement;
@@ -10054,9 +10142,19 @@ type RenderToken = {
10054
10142
  * the current page — add `aria-current="page"` to it yourself.
10055
10143
  *
10056
10144
  * Crumb links are underlined by default. Set `[underline]="false"` on the
10057
- * `tedi-link` for non-underlined crumbs — recommended for the `short` back-link.
10058
- * Crumbs collapsed into the ellipsis dropdown are always rendered without an
10059
- * underline, regardless of their `[underline]` setting.
10145
+ * `tedi-link` for non-underlined crumbs, which is recommended for the `short`
10146
+ * back-link. A collapsed crumb keeps its own `[underline]` setting, so it looks
10147
+ * the same in the ellipsis dropdown as it does in the trail. To restyle the
10148
+ * collapsed rows, target `.tedi-breadcrumbs__dropdown-item`, which travels with
10149
+ * them into the overlay.
10150
+ *
10151
+ * The ellipsis dropdown is a plain list (`dropdownRole="list"`), not a menu, so
10152
+ * the collapsed crumbs stay links: screen readers announce them as links and
10153
+ * each one is its own tab stop. Its panel renders inside the crumb it belongs
10154
+ * to, so the collapsed crumbs come between the ellipsis button and the next
10155
+ * crumb both in the tab order and for a screen reader that swipes through the
10156
+ * DOM. Opening it moves focus to the first collapsed crumb; Escape closes it
10157
+ * and returns focus to the button.
10060
10158
  */
10061
10159
  declare class BreadcrumbsComponent implements BreakpointInputs<BreadcrumbsInputs> {
10062
10160
  private readonly breakpointService;