@tedi-design-system/angular 6.5.0-rc.4 → 6.5.0-rc.5

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": "6.5.0-rc.4",
3
+ "version": "6.5.0-rc.5",
4
4
  "type": "module",
5
5
  "main": "community.mjs",
6
6
  "module": "fesm2022/tedi-design-system-angular.mjs",
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-item.component.d.ts","sourceRoot":"","sources":["../../../../../../tedi/components/overlay/dropdown/dropdown-item/dropdown-item.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EAMX,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,WAAW,EACX,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;;AAGlG,qBAkBa,qBAAqB;IAChC,iBAAiB;IACjB,QAAQ,CAAC,KAAK,0DAAmB;IAEjC,wBAAwB;IACxB,QAAQ,CAAC,QAAQ,+CAAgB;IAEjC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,+CAAe;IAErC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,iDAAkB;IAErC,QAAQ,CAAC,IAAI,4BAAiD;IAC9D,QAAQ,CAAC,QAAQ,cAAqC;IACtD,QAAQ,CAAC,eAAe,qBAAoD;IAE5E,sDAAsD;IACtD,QAAQ,CAAC,eAAe,yEAA4C;IAEpE,UAAU;IAIV,KAAK;IAKL,OAAO;IAOP,SAAS,CAAC,KAAK,EAAE,aAAa;IA2C9B,OAAO,CAAC,YAAY;yCAxFT,qBAAqB;2CAArB,qBAAqB;CAoGjC"}
1
+ {"version":3,"file":"dropdown-item.component.d.ts","sourceRoot":"","sources":["../../../../../../tedi/components/overlay/dropdown/dropdown-item/dropdown-item.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EAMX,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,WAAW,EACX,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;;AAGlG,qBAkBa,qBAAqB;IAChC,iBAAiB;IACjB,QAAQ,CAAC,KAAK,0DAAmB;IAEjC,wBAAwB;IACxB,QAAQ,CAAC,QAAQ,+CAAgB;IAEjC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,+CAAe;IAErC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,iDAAkB;IAErC,QAAQ,CAAC,IAAI,4BAAiD;IAC9D,QAAQ,CAAC,QAAQ,cAAqC;IACtD,QAAQ,CAAC,eAAe,qBAAoD;IAE5E,sDAAsD;IACtD,QAAQ,CAAC,eAAe,yEAA4C;IAEpE,UAAU;IAIV,KAAK;IAKL,OAAO;IAOP,SAAS,CAAC,KAAK,EAAE,aAAa;IAgD9B,OAAO,CAAC,YAAY;yCA7FT,qBAAqB;2CAArB,qBAAqB;CAyGjC"}
@@ -1,15 +1,31 @@
1
- import { ElementRef } from "@angular/core";
1
+ import { AfterViewInit, ElementRef } from "@angular/core";
2
2
  import { DropdownComponent } from "../dropdown.component";
3
3
  import * as i0 from "@angular/core";
4
4
  export type DropdownTriggerAriaHasPopup = "menu" | "listbox" | "dialog" | "true";
5
- export declare class DropdownTriggerDirective {
5
+ export declare class DropdownTriggerDirective implements AfterViewInit {
6
6
  /** 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. */
7
7
  readonly ariaHaspopup: import("@angular/core").InputSignal<DropdownTriggerAriaHasPopup>;
8
8
  readonly host: ElementRef<HTMLElement>;
9
9
  readonly dropdown: DropdownComponent;
10
- get isButton(): boolean;
10
+ private readonly renderer;
11
+ /**
12
+ * The element that actually receives focus and ARIA semantics. When the directive
13
+ * sits on a native `<button>`/`<a href>` that element is used directly. When it wraps
14
+ * a button component (e.g. `<app-button>` that renders its own native button), the
15
+ * inner focusable element is used instead — otherwise the wrapper and the inner button
16
+ * would both be tab stops, and the ARIA state would land on the wrong element.
17
+ */
18
+ private readonly triggerElement;
19
+ constructor();
20
+ ngAfterViewInit(): void;
21
+ focus(): void;
22
+ /** The element that is actually in the tab order — the resolved interactive
23
+ * element, which may be a button nested inside a wrapping component. */
24
+ get focusableElement(): HTMLElement;
11
25
  onClick(): void;
12
26
  onKeydown(event: KeyboardEvent): void;
27
+ private resolveTriggerElement;
28
+ private isNativelyFocusable;
13
29
  private openAndFocusFirst;
14
30
  private openAndFocusLast;
15
31
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownTriggerDirective, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-trigger.directive.d.ts","sourceRoot":"","sources":["../../../../../../tedi/components/overlay/dropdown/dropdown-trigger/dropdown-trigger.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAIX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;;AAE1D,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEjF,qBAYa,wBAAwB;IACnC,wLAAwL;IACxL,QAAQ,CAAC,YAAY,mEAA8C;IAEnE,QAAQ,CAAC,IAAI,0BAA+C;IAC5D,QAAQ,CAAC,QAAQ,oBAA6B;IAE9C,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAGD,OAAO;IAKP,SAAS,CAAC,KAAK,EAAE,aAAa;IAsB9B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;yCA9Cb,wBAAwB;2CAAxB,wBAAwB;CAoDpC"}
1
+ {"version":3,"file":"dropdown-trigger.directive.d.ts","sourceRoot":"","sources":["../../../../../../tedi/components/overlay/dropdown/dropdown-trigger/dropdown-trigger.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,UAAU,EAOX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;;AAE1D,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAIjF,qBAIa,wBAAyB,YAAW,aAAa;IAC5D,wLAAwL;IACxL,QAAQ,CAAC,YAAY,mEAA8C;IAEnE,QAAQ,CAAC,IAAI,0BAA+C;IAC5D,QAAQ,CAAC,QAAQ,oBAA6B;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAoC;;IA2BnE,eAAe;IAIf,KAAK;IAIL;4EACwE;IACxE,IAAI,gBAAgB,IAAI,WAAW,CAElC;IAGD,OAAO;IAKP,SAAS,CAAC,KAAK,EAAE,aAAa;IAsB9B,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;yCAvGb,wBAAwB;2CAAxB,wBAAwB;CA6GpC"}
@@ -23,6 +23,11 @@ export declare class DropdownComponent implements AfterContentChecked, OnDestroy
23
23
  * @default ""
24
24
  */
25
25
  readonly appendTo: import("@angular/core").InputSignal<string>;
26
+ /**
27
+ * Does the dropdown hide when the page scrolls?
28
+ * @default false
29
+ */
30
+ readonly hideOnScroll: import("@angular/core").InputSignal<boolean>;
26
31
  readonly dropdownTrigger: import("@angular/core").Signal<DropdownTriggerDirective>;
27
32
  readonly dropdownContent: import("@angular/core").Signal<DropdownContentComponent>;
28
33
  readonly floatUiComponent: import("@angular/core").Signal<NgxFloatUiContentComponent>;
@@ -30,7 +35,11 @@ export declare class DropdownComponent implements AfterContentChecked, OnDestroy
30
35
  readonly containerId: import("@angular/core").WritableSignal<string>;
31
36
  readonly isContentHovered: import("@angular/core").WritableSignal<boolean>;
32
37
  readonly floatUiDisplay: import("@angular/core").WritableSignal<"inline" | "block">;
38
+ readonly opened: import("@angular/core").Signal<boolean>;
33
39
  private readonly platformId;
40
+ private readonly document;
41
+ private readonly renderer;
42
+ private scrollListener?;
34
43
  constructor();
35
44
  ngOnDestroy(): void;
36
45
  ngAfterContentChecked(): void;
@@ -38,6 +47,8 @@ export declare class DropdownComponent implements AfterContentChecked, OnDestroy
38
47
  hideDropdown(): void;
39
48
  toggleDropdown(): void;
40
49
  handleOutsideClick: (event: Event) => void;
50
+ handleFocusOut: (event: FocusEvent) => void;
51
+ tabOutOfDropdown(shiftKey: boolean): void;
41
52
  focusFirstItem(): void;
42
53
  focusLastItem(): void;
43
54
  setActiveToSelectedOrFirst(): void;
@@ -45,10 +56,12 @@ export declare class DropdownComponent implements AfterContentChecked, OnDestroy
45
56
  focusNextItem(fromEl: HTMLLIElement): void;
46
57
  focusPrevItem(fromEl: HTMLLIElement): void;
47
58
  updateTabindexes(): void;
59
+ private setupScrollListener;
60
+ private cleanupScrollListener;
48
61
  private findIndexByElement;
49
62
  private getNextEnabledIndex;
50
63
  private getPrevEnabledIndex;
51
64
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "tedi-dropdown", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "preventOverflow": { "alias": "preventOverflow"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["dropdownTrigger", "dropdownContent"], ["[tedi-dropdown-trigger]", "tedi-dropdown-content"], true, never>;
65
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "tedi-dropdown", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "preventOverflow": { "alias": "preventOverflow"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "hideOnScroll": { "alias": "hideOnScroll"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["dropdownTrigger", "dropdownContent"], ["[tedi-dropdown-trigger]", "tedi-dropdown-content"], true, never>;
53
66
  }
54
67
  //# sourceMappingURL=dropdown.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.component.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/overlay/dropdown/dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,mBAAmB,EACnB,SAAS,EAIV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,0BAA0B,EAE1B,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;;AAIzF,MAAM,MAAM,gBAAgB,GAAG,GAAG,oBAAoB,EAAE,CAAC;AAEzD,qBAea,iBAAkB,YAAW,mBAAmB,EAAE,SAAS;IACtE,oDAAoD;IACpD,QAAQ,CAAC,KAAK,0DAAmB;IAEjC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,oOAA2C;IAE5D;;;OAGG;IACH,QAAQ,CAAC,eAAe,+CAAe;IAEvC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,8CAAa;IAE9B,QAAQ,CAAC,eAAe,2DAAmD;IAC3E,QAAQ,CAAC,eAAe,2DAAmD;IAC3E,QAAQ,CAAC,gBAAgB,6DAAkD;IAE3E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAC3D,QAAQ,CAAC,WAAW,iDAAc;IAClC,QAAQ,CAAC,gBAAgB,kDAAiB;IAC1C,QAAQ,CAAC,cAAc,6DAAwC;IAE/D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;;IAQlD,WAAW;IAUX,qBAAqB,IAAI,IAAI;IAc7B,YAAY;IAqBZ,YAAY;IASZ,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AAC,cAAc,6DAAwC;IAC/D,QAAQ,CAAC,MAAM,0CAAqD;IAEpE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,cAAc,CAAC,CAAa;;IASpC,WAAW;IAYX,qBAAqB,IAAI,IAAI;IAc7B,YAAY;IAyBZ,YAAY;IAUZ,cAAc;IAQd,kBAAkB,GAAI,OAAO,KAAK,UAgBhC;IAEF,cAAc,GAAI,OAAO,UAAU,UAejC;IAEF,gBAAgB,CAAC,QAAQ,EAAE,OAAO;IAoBlC,cAAc;IAWd,aAAa;IAab,0BAA0B;IAoB1B,eAAe;IAef,aAAa,CAAC,MAAM,EAAE,aAAa;IAanC,aAAa,CAAC,MAAM,EAAE,aAAa;IAanC,gBAAgB;IAoBhB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,mBAAmB;yCA9ThB,iBAAiB;2CAAjB,iBAAiB;CAuU7B"}
@@ -14,11 +14,15 @@ export interface DropdownApi {
14
14
  focusLastItem(): void;
15
15
  /** Close the dropdown and reset active item state. */
16
16
  hideDropdown(): void;
17
- /** Reference to the dropdown trigger directive. Used to read trigger dimensions and return focus. */
17
+ /** Close the dropdown and move focus to the element before (Shift+Tab) or after (Tab) the trigger in document tab order, so tabbing exits the menu as if it weren't there. */
18
+ tabOutOfDropdown(shiftKey: boolean): void;
19
+ /** Reference to the dropdown trigger directive. `host` is the element the directive sits on (used for positioning and dimensions); `focus()` moves focus to the actual interactive trigger element, which may be a button nested inside a wrapping component; `focusableElement` is that same interactive element. */
18
20
  dropdownTrigger(): {
19
21
  host: {
20
22
  nativeElement: HTMLElement;
21
23
  };
24
+ focus(): void;
25
+ focusableElement: HTMLElement;
22
26
  } | undefined;
23
27
  }
24
28
  export declare const DROPDOWN_API: InjectionToken<DropdownApi>;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.tokens.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/overlay/dropdown/dropdown.tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,WAAW,WAAW;IAC1B,wFAAwF;IACxF,KAAK,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1C,gGAAgG;IAChG,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,mEAAmE;IACnE,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3C,wEAAwE;IACxE,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3C,4DAA4D;IAC5D,cAAc,IAAI,IAAI,CAAC;IACvB,2DAA2D;IAC3D,aAAa,IAAI,IAAI,CAAC;IACtB,sDAAsD;IACtD,YAAY,IAAI,IAAI,CAAC;IACrB,qGAAqG;IACrG,eAAe,IAAI;QAAE,IAAI,EAAE;YAAE,aAAa,EAAE,WAAW,CAAA;SAAE,CAAA;KAAE,GAAG,SAAS,CAAC;CACzE;AAED,eAAO,MAAM,YAAY,6BAAiD,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,0GAA0G;IAC1G,YAAY,EAAE,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,oBAAoB,oCAEhC,CAAC"}
1
+ {"version":3,"file":"dropdown.tokens.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/overlay/dropdown/dropdown.tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,WAAW,WAAW;IAC1B,wFAAwF;IACxF,KAAK,EAA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