@eagami/ui 5.93.1 → 5.95.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": "@eagami/ui",
3
- "version": "5.93.1",
3
+ "version": "5.95.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -8873,10 +8873,12 @@ export type TransferListHeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
8873
8873
  * four direction buttons to move them.
8874
8874
  *
8875
8875
  * Each pane is a `role="listbox"` with `aria-multiselectable="true"`; rows
8876
- * are `role="option"` with `aria-selected`.
8876
+ * are `role="option"` with `aria-selected`. Integrates with Angular forms via
8877
+ * `ControlValueAccessor`, with the target ids as the form value.
8877
8878
  */
8878
- export declare class TransferListComponent {
8879
+ export declare class TransferListComponent implements ControlValueAccessor {
8879
8880
  private readonly i18n;
8881
+ private readonly host;
8880
8882
  readonly items: import("@angular/core").InputSignal<readonly TransferListItem[]>;
8881
8883
  /** Ids currently on the target (right) side. */
8882
8884
  readonly selectedIds: import("@angular/core").ModelSignal<readonly string[]>;
@@ -8896,6 +8898,10 @@ export declare class TransferListComponent {
8896
8898
  readonly headingLevel: import("@angular/core").InputSignal<TransferListHeadingLevel>;
8897
8899
  readonly size: import("@angular/core").InputSignal<EaSize>;
8898
8900
  readonly disabled: import("@angular/core").InputSignal<boolean>;
8901
+ private readonly _formDisabled;
8902
+ private onChange;
8903
+ private onTouched;
8904
+ protected readonly isDisabled: import("@angular/core").Signal<boolean>;
8899
8905
  protected readonly messages: import("@angular/core").Signal<import("@eagami/ui").EagamiMessages>;
8900
8906
  private readonly leftHighlighted;
8901
8907
  private readonly rightHighlighted;
@@ -8915,6 +8921,11 @@ export declare class TransferListComponent {
8915
8921
  protected readonly resolvedTargetLabel: import("@angular/core").Signal<string>;
8916
8922
  protected readonly announcement: import("@angular/core").WritableSignal<string>;
8917
8923
  protected readonly hostClasses: import("@angular/core").Signal<string[]>;
8924
+ writeValue(val: readonly string[] | null | undefined): void;
8925
+ registerOnChange(fn: (value: readonly string[]) => void): void;
8926
+ registerOnTouched(fn: () => void): void;
8927
+ setDisabledState(isDisabled: boolean): void;
8928
+ protected onFocusOut(event: FocusEvent): void;
8918
8929
  protected isHighlighted(pane: 'source' | 'target', id: string): boolean;
8919
8930
  protected itemTabindex(pane: 'source' | 'target', index: number, item: TransferListItem): number;
8920
8931
  protected onItemClick(pane: 'source' | 'target', item: TransferListItem, event: MouseEvent): void;
@@ -8929,6 +8940,7 @@ export declare class TransferListComponent {
8929
8940
  protected moveAllRight(): void;
8930
8941
  protected moveSelectedLeft(): void;
8931
8942
  protected moveAllLeft(): void;
8943
+ private commit;
8932
8944
  private announceMove;
8933
8945
  static ɵfac: i0.ɵɵFactoryDeclaration<TransferListComponent, never>;
8934
8946
  static ɵcmp: i0.ɵɵComponentDeclaration<TransferListComponent, "ea-transfer-list", never, {
@@ -9010,7 +9022,9 @@ export type TreeSize = EaSize;
9010
9022
  * keyboard navigation (Arrow keys, Home, End, Enter / Space, and typeahead
9011
9023
  * on node labels). Selection and expansion state are model signals: pass
9012
9024
  * `[selectedId]` / `[expandedIds]` to control them, or bind
9013
- * `[(selectedId)]` / `[(expandedIds)]` for two-way sync.
9025
+ * `[(selectedId)]` / `[(expandedIds)]` for two-way sync. Integrates with
9026
+ * Angular forms via `ControlValueAccessor`, with the selected id as the form
9027
+ * value.
9014
9028
  *
9015
9029
  * The component implements the ARIA `tree` pattern:
9016
9030
  * - The outer `<ul>` carries `role="tree"`
@@ -9018,7 +9032,7 @@ export type TreeSize = EaSize;
9018
9032
  * `aria-setsize`, `aria-expanded` (branches only), and `aria-selected`
9019
9033
  * - Roving tabindex: only the currently-focused node has `tabindex="0"`
9020
9034
  */
9021
- export declare class TreeComponent {
9035
+ export declare class TreeComponent implements ControlValueAccessor {
9022
9036
  private readonly hostEl;
9023
9037
  readonly nodes: import("@angular/core").InputSignal<readonly TreeNode<unknown>[]>;
9024
9038
  readonly size: import("@angular/core").InputSignal<EaSize>;
@@ -9030,6 +9044,10 @@ export declare class TreeComponent {
9030
9044
  /** Optional aria-label for the tree itself. */
9031
9045
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
9032
9046
  readonly nodeClick: import("@angular/core").OutputEmitterRef<TreeNode<unknown>>;
9047
+ private readonly _formDisabled;
9048
+ private onChange;
9049
+ private onTouched;
9050
+ protected readonly isDisabled: Signal<boolean>;
9033
9051
  private readonly listEl;
9034
9052
  private readonly _focusedId;
9035
9053
  private readonly typeahead;
@@ -9042,10 +9060,15 @@ export declare class TreeComponent {
9042
9060
  protected readonly focusedId: Signal<string>;
9043
9061
  protected readonly hostClasses: Signal<string[]>;
9044
9062
  constructor();
9063
+ writeValue(val: string | null | undefined): void;
9064
+ registerOnChange(fn: (value: string | null) => void): void;
9065
+ registerOnTouched(fn: () => void): void;
9066
+ setDisabledState(isDisabled: boolean): void;
9045
9067
  protected onNodeSelect(node: TreeNode): void;
9046
9068
  protected onNodeToggle(id: string): void;
9047
9069
  protected onKeydown(event: KeyboardEvent): void;
9048
9070
  protected onTreeFocus(event: FocusEvent): void;
9071
+ protected onTreeFocusOut(event: FocusEvent): void;
9049
9072
  private focusNode;
9050
9073
  private findNode;
9051
9074
  private findParentId;