@truenas/ui-components 0.3.21 → 0.3.23
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,10 +1,10 @@
|
|
|
1
|
+
import * as _truenas_ui_components from '@truenas/ui-components';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { Signal, InjectionToken, Renderer2, OnDestroy, ElementRef, AfterViewInit, OnInit, TemplateRef, AfterContentInit, Provider, ChangeDetectorRef, TrackByFunction, OnChanges, DoCheck, SimpleChanges, PipeTransform, ViewContainerRef, AfterViewChecked, ComponentRef } from '@angular/core';
|
|
3
4
|
import { ControlValueAccessor, NgControl, AbstractControl } from '@angular/forms';
|
|
4
5
|
import { ComponentHarness, BaseHarnessFilters, HarnessPredicate, TestKey, HarnessLoader } from '@angular/cdk/testing';
|
|
5
6
|
import { SafeHtml, SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
|
|
6
7
|
import { ComponentFixture } from '@angular/core/testing';
|
|
7
|
-
import * as _truenas_ui_components from '@truenas/ui-components';
|
|
8
8
|
import { SelectionModel, DataSource } from '@angular/cdk/collections';
|
|
9
9
|
import * as rxjs from 'rxjs';
|
|
10
10
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
@@ -119,6 +119,31 @@ declare function composeTestId(type: string | null | undefined, value: TnTestIdV
|
|
|
119
119
|
*/
|
|
120
120
|
declare function controlTestId(testId: Signal<TnTestIdValue>): Signal<TnTestIdValue>;
|
|
121
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Minimal structural shape of a dropdown option for test-id derivation.
|
|
124
|
+
* Satisfied by `TnSelectOption` / `TnAutocompleteOption` (and any future
|
|
125
|
+
* option-like shape) without coupling the test-id module to component types.
|
|
126
|
+
*/
|
|
127
|
+
interface TnOptionTestIdSource {
|
|
128
|
+
label: string;
|
|
129
|
+
value?: unknown;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Derive the test-id segments for a dropdown option row, consumed by
|
|
133
|
+
* `[tnTestId]` with `tnTestIdType="option"`. The component's resolved base
|
|
134
|
+
* (explicit `testId`, else the bound control name) scopes a per-option
|
|
135
|
+
* discriminator so ids stay unique across instances: base `user` + option
|
|
136
|
+
* value `jane-doe` → `option-user-jane-doe`; with no base → `option-jane-doe`.
|
|
137
|
+
*
|
|
138
|
+
* The discriminator comes from `extractor` when provided (a component's
|
|
139
|
+
* `optionTestIdKey` input), else the option's primitive `value`, else its
|
|
140
|
+
* `label`. Shared by `tn-select` and `tn-autocomplete` so the derivation
|
|
141
|
+
* rules can't drift between dropdown components; synthetic rows with fixed
|
|
142
|
+
* discriminators (e.g. select's `allowEmpty` option) are handled by the
|
|
143
|
+
* caller before delegating here.
|
|
144
|
+
*/
|
|
145
|
+
declare function optionTestId<O extends TnOptionTestIdSource>(base: TnTestIdValue, option: O, extractor?: (option: O) => string | number | null | undefined): (string | number | null | undefined)[];
|
|
146
|
+
|
|
122
147
|
/**
|
|
123
148
|
* Test-id attribute names supported by the library.
|
|
124
149
|
*
|
|
@@ -229,12 +254,26 @@ declare class TnSelectComponent<T = unknown> implements ControlValueAccessor, On
|
|
|
229
254
|
optionGroups: _angular_core.InputSignal<TnSelectOptionGroup<T>[]>;
|
|
230
255
|
placeholder: _angular_core.InputSignal<string>;
|
|
231
256
|
/**
|
|
232
|
-
*
|
|
233
|
-
* trigger's `aria-label` instead of the visible `placeholder` — useful in
|
|
257
|
+
* Explicit accessible label for the select trigger. When set, this is used as
|
|
258
|
+
* the trigger's `aria-label` instead of the visible `placeholder` — useful in
|
|
234
259
|
* contexts (e.g. a pager's page-size dropdown) where the placeholder text
|
|
235
|
-
* doesn't accurately describe the field's purpose to screen readers.
|
|
260
|
+
* doesn't accurately describe the field's purpose to screen readers. Inside a
|
|
261
|
+
* `tn-form-field` the field's label is associated automatically (via
|
|
262
|
+
* `aria-labelledby`) and takes precedence over the placeholder fallback;
|
|
263
|
+
* setting this overrides both.
|
|
236
264
|
*/
|
|
237
265
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
266
|
+
/**
|
|
267
|
+
* ARIA wiring from an enclosing `tn-form-field` (label, error/hint,
|
|
268
|
+
* invalid, required). All-null when standalone or when `ariaLabel` overrides.
|
|
269
|
+
*/
|
|
270
|
+
protected readonly fieldAria: _truenas_ui_components.TnFormFieldAriaBindings;
|
|
271
|
+
/**
|
|
272
|
+
* `aria-label` for the trigger. An explicit `ariaLabel` always wins; the
|
|
273
|
+
* `placeholder` fallback only applies while no form-field label is wired via
|
|
274
|
+
* `aria-labelledby`, so the trigger never advertises two names at once.
|
|
275
|
+
*/
|
|
276
|
+
protected triggerAriaLabel: _angular_core.Signal<string | null>;
|
|
238
277
|
/**
|
|
239
278
|
* Message shown inside the dropdown when no options (and no option groups)
|
|
240
279
|
* are available. Defaults to the English `'No options available'`; consumers
|
|
@@ -343,11 +382,8 @@ declare class TnSelectComponent<T = unknown> implements ControlValueAccessor, On
|
|
|
343
382
|
isOptionFocused(option: TnSelectOption<T>): boolean;
|
|
344
383
|
/**
|
|
345
384
|
* Test-id segments for an option row, consumed by `[tnTestId]` with
|
|
346
|
-
* `tnTestIdType="option"
|
|
347
|
-
*
|
|
348
|
-
* base `quick-filters` + option value `ssd` → `option-quick-filters-ssd`; with
|
|
349
|
-
* no base → `option-ssd`. The discriminator comes from `optionTestIdKey` when
|
|
350
|
-
* provided, else the option's primitive `value`, else its `label`.
|
|
385
|
+
* `tnTestIdType="option"` — see {@link optionTestId} for the derivation
|
|
386
|
+
* rules (shared with `tn-autocomplete`).
|
|
351
387
|
*/
|
|
352
388
|
protected optionTestIdParts(option: TnSelectOption<T>): (string | number | null | undefined)[];
|
|
353
389
|
private onChange;
|
|
@@ -547,8 +583,35 @@ declare class TnAutocompleteComponent<T = unknown> implements ControlValueAccess
|
|
|
547
583
|
* custom property so it can also be themed in CSS.
|
|
548
584
|
*/
|
|
549
585
|
panelMaxHeight: _angular_core.InputSignal<string | number>;
|
|
586
|
+
/**
|
|
587
|
+
* Explicit accessible name for the text field. Inside a `tn-form-field` the
|
|
588
|
+
* field's label is associated automatically (via `aria-labelledby`), so leave
|
|
589
|
+
* this unset there unless the announced name must differ from the visible
|
|
590
|
+
* label — when set, it wins. Standalone without either, the input has no
|
|
591
|
+
* accessible name (the placeholder is not one).
|
|
592
|
+
*/
|
|
593
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
550
594
|
/** Test ID attribute */
|
|
551
595
|
testId: _angular_core.InputSignal<TnTestIdValue>;
|
|
596
|
+
/** Test-id base, falling back to the bound control name when `testId` is unset. */
|
|
597
|
+
protected resolvedTestId: _angular_core.Signal<TnTestIdValue>;
|
|
598
|
+
/**
|
|
599
|
+
* Optional extractor for the per-option test-id discriminator. Defaults to
|
|
600
|
+
* the option's `value` (when a string/number) or its `label`. Provide this
|
|
601
|
+
* when option values are objects, or to pick a more stable/unique key —
|
|
602
|
+
* mirrors `tn-select`'s input of the same name.
|
|
603
|
+
*
|
|
604
|
+
* @example
|
|
605
|
+
* ```html
|
|
606
|
+
* <tn-autocomplete testId="user" [optionTestIdKey]="(o) => o.value.id" ... />
|
|
607
|
+
* ```
|
|
608
|
+
*/
|
|
609
|
+
optionTestIdKey: _angular_core.InputSignal<((option: TnAutocompleteOption<T>) => string | number | null | undefined) | undefined>;
|
|
610
|
+
/**
|
|
611
|
+
* ARIA wiring from an enclosing `tn-form-field` (label, error/hint,
|
|
612
|
+
* invalid, required). All-null when standalone or when `ariaLabel` overrides.
|
|
613
|
+
*/
|
|
614
|
+
protected readonly fieldAria: _truenas_ui_components.TnFormFieldAriaBindings;
|
|
552
615
|
/** Emits the full option (label + value) when one is selected */
|
|
553
616
|
optionSelected: _angular_core.OutputEmitterRef<TnAutocompleteOption<T>>;
|
|
554
617
|
/**
|
|
@@ -637,6 +700,21 @@ declare class TnAutocompleteComponent<T = unknown> implements ControlValueAccess
|
|
|
637
700
|
* cursor (which is conveyed via `aria-activedescendant`).
|
|
638
701
|
*/
|
|
639
702
|
protected isOptionSelected(option: TnAutocompleteOption<T>): boolean;
|
|
703
|
+
/**
|
|
704
|
+
* Test-id segments for an option row, consumed by `[tnTestId]` with
|
|
705
|
+
* `tnTestIdType="option"` — see {@link optionTestId} for the derivation
|
|
706
|
+
* rules (shared with `tn-select`).
|
|
707
|
+
*/
|
|
708
|
+
protected optionTestIdParts(option: TnAutocompleteOption<T>): (string | number | null | undefined)[];
|
|
709
|
+
/**
|
|
710
|
+
* Test-id segments for the loading / no-results status rows, consumed by
|
|
711
|
+
* `[tnTestId]` with `tnTestIdType="autocomplete"` so they nest under the
|
|
712
|
+
* input's own id: base `user` → `autocomplete-user-loading` /
|
|
713
|
+
* `autocomplete-user-no-results` (unscoped `autocomplete-loading` /
|
|
714
|
+
* `autocomplete-no-results` with no base). Mirrors webui's ix-combobox,
|
|
715
|
+
* which stamps its status option so automation can assert on those states.
|
|
716
|
+
*/
|
|
717
|
+
protected statusTestIdParts(status: 'loading' | 'no-results'): (string | number | null | undefined)[];
|
|
640
718
|
/**
|
|
641
719
|
* Index of the committed value's option in the visible list, or -1 when
|
|
642
720
|
* nothing is committed or the match is absent/disabled. Used to seed the
|
|
@@ -686,7 +764,7 @@ declare class TnAutocompleteComponent<T = unknown> implements ControlValueAccess
|
|
|
686
764
|
private detachOverlay;
|
|
687
765
|
private scrollToHighlighted;
|
|
688
766
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnAutocompleteComponent<any>, never>;
|
|
689
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnAutocompleteComponent<any>, "tn-autocomplete", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "requireSelection": { "alias": "requireSelection"; "required": false; "isSignal": true; }; "allowCustomValue": { "alias": "allowCustomValue"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "filterFn": { "alias": "filterFn"; "required": false; "isSignal": true; }; "noResultsText": { "alias": "noResultsText"; "required": false; "isSignal": true; }; "maxResults": { "alias": "maxResults"; "required": false; "isSignal": true; }; "panelMaxHeight": { "alias": "panelMaxHeight"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; }, { "optionSelected": "optionSelected"; "searchChange": "searchChange"; "loadMore": "loadMore"; "opened": "opened"; }, never, never, true, never>;
|
|
767
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnAutocompleteComponent<any>, "tn-autocomplete", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "requireSelection": { "alias": "requireSelection"; "required": false; "isSignal": true; }; "allowCustomValue": { "alias": "allowCustomValue"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "filterFn": { "alias": "filterFn"; "required": false; "isSignal": true; }; "noResultsText": { "alias": "noResultsText"; "required": false; "isSignal": true; }; "maxResults": { "alias": "maxResults"; "required": false; "isSignal": true; }; "panelMaxHeight": { "alias": "panelMaxHeight"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "optionTestIdKey": { "alias": "optionTestIdKey"; "required": false; "isSignal": true; }; }, { "optionSelected": "optionSelected"; "searchChange": "searchChange"; "loadMore": "loadMore"; "opened": "opened"; }, never, never, true, never>;
|
|
690
768
|
}
|
|
691
769
|
|
|
692
770
|
/**
|
|
@@ -1718,13 +1796,18 @@ declare class TnInputComponent implements AfterViewInit, OnDestroy, ControlValue
|
|
|
1718
1796
|
multiline: _angular_core.InputSignal<boolean>;
|
|
1719
1797
|
rows: _angular_core.InputSignal<number>;
|
|
1720
1798
|
/**
|
|
1721
|
-
*
|
|
1722
|
-
*
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
* the a11y tree.
|
|
1799
|
+
* Explicit accessible name for the control. Rendered as `aria-label` on the
|
|
1800
|
+
* input/textarea. Inside a `tn-form-field` the field's label is associated
|
|
1801
|
+
* automatically (via `aria-labelledby`), so leave this unset there unless the
|
|
1802
|
+
* announced name must differ from the visible label — when set, it wins. Set
|
|
1803
|
+
* it for standalone usage so the control isn't unnamed in the a11y tree.
|
|
1726
1804
|
*/
|
|
1727
1805
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
1806
|
+
/**
|
|
1807
|
+
* ARIA wiring from an enclosing `tn-form-field` (label, error/hint,
|
|
1808
|
+
* invalid, required). All-null when standalone or when `ariaLabel` overrides.
|
|
1809
|
+
*/
|
|
1810
|
+
protected readonly fieldAria: _truenas_ui_components.TnFormFieldAriaBindings;
|
|
1728
1811
|
/**
|
|
1729
1812
|
* Native `autocomplete` hint rendered on the input/textarea. Pass the standard
|
|
1730
1813
|
* autofill tokens (`'username'`, `'current-password'`, `'new-password'`,
|
|
@@ -2730,8 +2813,18 @@ declare class TnChipInputComponent<T = string> implements ControlValueAccessor,
|
|
|
2730
2813
|
* provide this when values are objects (e.g. `(a, b) => a?.id === b?.id`).
|
|
2731
2814
|
*/
|
|
2732
2815
|
compareWith: _angular_core.InputSignal<((a: T | null, b: T | null) => boolean) | undefined>;
|
|
2733
|
-
/**
|
|
2816
|
+
/**
|
|
2817
|
+
* Explicit accessible name for the text field. Inside a `tn-form-field` the
|
|
2818
|
+
* field's label is associated automatically (via `aria-labelledby`), so leave
|
|
2819
|
+
* this unset there unless the announced name must differ from the visible
|
|
2820
|
+
* label — when set, it wins.
|
|
2821
|
+
*/
|
|
2734
2822
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
2823
|
+
/**
|
|
2824
|
+
* ARIA wiring from an enclosing `tn-form-field` (label, error/hint,
|
|
2825
|
+
* invalid, required). All-null when standalone or when `ariaLabel` overrides.
|
|
2826
|
+
*/
|
|
2827
|
+
protected readonly fieldAria: _truenas_ui_components.TnFormFieldAriaBindings;
|
|
2735
2828
|
/**
|
|
2736
2829
|
* Semantic test-id base. The library prepends the `chip-input` element type
|
|
2737
2830
|
* (e.g. `testId="tags"` → `chip-input-tags`); each chip and suggestion is
|
|
@@ -4499,8 +4592,72 @@ declare class TnKeyboardShortcutComponent {
|
|
|
4499
4592
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnKeyboardShortcutComponent, "tn-keyboard-shortcut", never, { "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "platform": { "alias": "platform"; "required": false; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
4500
4593
|
}
|
|
4501
4594
|
|
|
4595
|
+
/**
|
|
4596
|
+
* Contract between `tn-form-field` and its projected form control, published
|
|
4597
|
+
* over DI so the control can wire its ARIA attributes to the field's chrome
|
|
4598
|
+
* without the consumer duplicating anything (e.g. re-passing the label as
|
|
4599
|
+
* `ariaLabel`).
|
|
4600
|
+
*
|
|
4601
|
+
* `tn-form-field` provides itself under {@link TN_FORM_FIELD_CONTEXT}; a
|
|
4602
|
+
* projected control injects it optionally (absent when used standalone) and
|
|
4603
|
+
* binds:
|
|
4604
|
+
*
|
|
4605
|
+
* - `aria-labelledby` ← {@link labelId} — the field's visible label names the control
|
|
4606
|
+
* - `aria-describedby` ← {@link describedBy} — the currently shown error or hint
|
|
4607
|
+
* - `aria-invalid` ← {@link errorState} — mirrors the field's visual error state
|
|
4608
|
+
* - `aria-required` ← {@link requiredState} — forced or inferred from validators
|
|
4609
|
+
*
|
|
4610
|
+
* Library controls consume this via {@link injectTnFormFieldAria} rather than
|
|
4611
|
+
* hand-rolling the bindings.
|
|
4612
|
+
*/
|
|
4613
|
+
interface TnFormFieldContext {
|
|
4614
|
+
/** Id of the visible label text, or `null` when the field has no label. */
|
|
4615
|
+
labelId: Signal<string | null>;
|
|
4616
|
+
/** Id of the currently shown error or hint message, or `null` when neither renders. */
|
|
4617
|
+
describedBy: Signal<string | null>;
|
|
4618
|
+
/**
|
|
4619
|
+
* Whether the field currently shows its error state (invalid AND interacted —
|
|
4620
|
+
* the same gate as the visual error message, so `aria-invalid` never fires on
|
|
4621
|
+
* a pristine required field).
|
|
4622
|
+
*/
|
|
4623
|
+
errorState: Signal<boolean>;
|
|
4624
|
+
/** Whether the field is required — forced via input or inferred from validators. */
|
|
4625
|
+
requiredState: Signal<boolean>;
|
|
4626
|
+
}
|
|
4627
|
+
/** DI token under which `tn-form-field` exposes its {@link TnFormFieldContext}. */
|
|
4628
|
+
declare const TN_FORM_FIELD_CONTEXT: InjectionToken<TnFormFieldContext>;
|
|
4629
|
+
/** Ready-to-bind ARIA attribute values derived from an enclosing `tn-form-field`. */
|
|
4630
|
+
interface TnFormFieldAriaBindings {
|
|
4631
|
+
/** Value for `aria-labelledby`; `null` standalone, without a field label, or when `ariaLabel` overrides. */
|
|
4632
|
+
labelledby: Signal<string | null>;
|
|
4633
|
+
/** Value for `aria-describedby`; the shown error/hint id or `null`. */
|
|
4634
|
+
describedby: Signal<string | null>;
|
|
4635
|
+
/** Value for `aria-invalid`; `true` while the field shows an error, else `null` (attribute omitted). */
|
|
4636
|
+
invalid: Signal<true | null>;
|
|
4637
|
+
/** Value for `aria-required`; `true` when the field is required, else `null` (attribute omitted). */
|
|
4638
|
+
required: Signal<true | null>;
|
|
4639
|
+
}
|
|
4640
|
+
/**
|
|
4641
|
+
* Wires a form control to an enclosing `tn-form-field`'s accessibility context.
|
|
4642
|
+
* Must be called in an injection context (field initializer or constructor).
|
|
4643
|
+
*
|
|
4644
|
+
* Standalone usage (no enclosing field) yields all-`null` signals, so the
|
|
4645
|
+
* attribute bindings simply render nothing.
|
|
4646
|
+
*
|
|
4647
|
+
* @param ariaLabel The control's own explicit accessible-name input, when it has
|
|
4648
|
+
* one. While set, it wins: `labelledby` goes `null` so the explicit
|
|
4649
|
+
* `aria-label` is what assistive tech announces.
|
|
4650
|
+
*/
|
|
4651
|
+
declare function injectTnFormFieldAria(ariaLabel?: Signal<string | undefined>): TnFormFieldAriaBindings;
|
|
4652
|
+
|
|
4502
4653
|
type SubscriptSizing = 'fixed' | 'dynamic';
|
|
4503
|
-
declare class TnFormFieldComponent implements AfterContentInit {
|
|
4654
|
+
declare class TnFormFieldComponent implements AfterContentInit, TnFormFieldContext {
|
|
4655
|
+
/** Unique instance id namespacing the label/error/hint ids for ARIA linkage. */
|
|
4656
|
+
private readonly uid;
|
|
4657
|
+
/** Id carried by the error message element (only meaningful while it renders). */
|
|
4658
|
+
protected readonly errorId: string;
|
|
4659
|
+
/** Id carried by the hint element (only meaningful while it renders). */
|
|
4660
|
+
protected readonly hintId: string;
|
|
4504
4661
|
label: _angular_core.InputSignal<string>;
|
|
4505
4662
|
hint: _angular_core.InputSignal<string>;
|
|
4506
4663
|
/**
|
|
@@ -4510,9 +4667,10 @@ declare class TnFormFieldComponent implements AfterContentInit {
|
|
|
4510
4667
|
* see the requirement — e.g. a validator wrapped in `Validators.compose(...)`
|
|
4511
4668
|
* or a custom validator that emits a `required`-style error.
|
|
4512
4669
|
*
|
|
4513
|
-
*
|
|
4514
|
-
*
|
|
4515
|
-
* the native
|
|
4670
|
+
* Library form controls surface this state as `aria-required` automatically
|
|
4671
|
+
* (via {@link TnFormFieldContext}); pairing it with the projected control's
|
|
4672
|
+
* own `required` input (e.g. `tn-input`'s, which renders the native
|
|
4673
|
+
* attribute) additionally blocks native form submission.
|
|
4516
4674
|
*/
|
|
4517
4675
|
required: _angular_core.InputSignal<boolean>;
|
|
4518
4676
|
testId: _angular_core.InputSignal<TnTestIdValue>;
|
|
@@ -4594,6 +4752,18 @@ declare class TnFormFieldComponent implements AfterContentInit {
|
|
|
4594
4752
|
showError: _angular_core.Signal<boolean>;
|
|
4595
4753
|
showHint: _angular_core.Signal<boolean>;
|
|
4596
4754
|
protected showSubscript: _angular_core.Signal<boolean>;
|
|
4755
|
+
/**
|
|
4756
|
+
* Id of the label *text* span — deliberately not the whole `<label>`, so an
|
|
4757
|
+
* `aria-labelledby` pointing here never picks up the required asterisk's
|
|
4758
|
+
* "required" into the accessible name (that state travels as `aria-required`).
|
|
4759
|
+
*/
|
|
4760
|
+
labelId: _angular_core.Signal<string | null>;
|
|
4761
|
+
/** Id of the currently shown error or hint (they are mutually exclusive), or null. */
|
|
4762
|
+
describedBy: _angular_core.Signal<string | null>;
|
|
4763
|
+
/** Mirrors the visual error state (invalid AND interacted) for `aria-invalid`. */
|
|
4764
|
+
errorState: _angular_core.Signal<boolean>;
|
|
4765
|
+
/** Forced or validator-inferred required state, for `aria-required`. */
|
|
4766
|
+
requiredState: _angular_core.Signal<boolean>;
|
|
4597
4767
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnFormFieldComponent, never>;
|
|
4598
4768
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnFormFieldComponent, "tn-form-field", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; }, {}, ["control"], ["*"], true, never>;
|
|
4599
4769
|
}
|
|
@@ -9240,5 +9410,5 @@ declare const TN_THEME_DEFINITIONS: readonly TnThemeDefinition[];
|
|
|
9240
9410
|
*/
|
|
9241
9411
|
declare const THEME_MAP: Map<TnTheme, TnThemeDefinition>;
|
|
9242
9412
|
|
|
9243
|
-
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, StripMntPrefixPipe, THEME_MAP, THEME_STORAGE_KEY, TN_FORM_FIELD_ERRORS, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarComponent, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnStepperHarness, TnStepperNextDirective, TnStepperPreviousDirective, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeNodeComponent, TnTreeNodeOutletDirective, TnTreeVirtualScrollNodeOutletDirective, TnTreeVirtualScrollViewComponent, TnTreeVirtualScrollViewHarness, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, composeTestId, controlTestId, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, defaultTreeItemSize, formatSize, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
9244
|
-
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, CreateFolderEvent, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, PathSegment, PlatformType, ProgressBarMode, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, StepperHarnessFilters, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TnTreeVirtualNodeData, TnTreeVirtualScrollViewHarnessFilters, TooltipPosition, YearCell };
|
|
9413
|
+
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, StripMntPrefixPipe, THEME_MAP, THEME_STORAGE_KEY, TN_FORM_FIELD_CONTEXT, TN_FORM_FIELD_ERRORS, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarComponent, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnStepperHarness, TnStepperNextDirective, TnStepperPreviousDirective, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeNodeComponent, TnTreeNodeOutletDirective, TnTreeVirtualScrollNodeOutletDirective, TnTreeVirtualScrollViewComponent, TnTreeVirtualScrollViewHarness, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, composeTestId, controlTestId, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, defaultTreeItemSize, formatSize, injectTnFormFieldAria, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, optionTestId, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
9414
|
+
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, CreateFolderEvent, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, PathSegment, PlatformType, ProgressBarMode, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, StepperHarnessFilters, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldAriaBindings, TnFormFieldContext, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnOptionTestIdSource, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TnTreeVirtualNodeData, TnTreeVirtualScrollViewHarnessFilters, TooltipPosition, YearCell };
|