@truenas/ui-components 0.1.76 → 0.1.77
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
|
@@ -713,6 +713,14 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
713
713
|
backgroundColor: _angular_core.InputSignal<string | undefined>;
|
|
714
714
|
label: _angular_core.InputSignal<string>;
|
|
715
715
|
disabled: _angular_core.InputSignal<boolean>;
|
|
716
|
+
/**
|
|
717
|
+
* Native `type` of the rendered `<button>`. Defaults to `button` so stray
|
|
718
|
+
* clicks never submit an enclosing form. Set to `submit` for a form's save
|
|
719
|
+
* button — this is what makes pressing Enter in a form field fire the
|
|
720
|
+
* form's `(submit)`/`(ngSubmit)` handler; a `(onClick)` binding alone does
|
|
721
|
+
* not. Ignored in anchor mode (`href`/`routerLink`).
|
|
722
|
+
*/
|
|
723
|
+
type: _angular_core.InputSignal<"button" | "submit" | "reset">;
|
|
716
724
|
/**
|
|
717
725
|
* Semantic test-id base for the rendered element. The library prepends the
|
|
718
726
|
* element type (`button`) and renders the result under whichever attribute
|
|
@@ -749,7 +757,7 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
749
757
|
private innerRef;
|
|
750
758
|
ngAfterViewInit(): void;
|
|
751
759
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnButtonComponent, never>;
|
|
752
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnButtonComponent, "tn-button", never, { "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
760
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnButtonComponent, "tn-button", never, { "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
753
761
|
}
|
|
754
762
|
|
|
755
763
|
/**
|
|
@@ -818,6 +826,17 @@ declare class TnButtonHarness extends ComponentHarness {
|
|
|
818
826
|
* ```
|
|
819
827
|
*/
|
|
820
828
|
isDisabled(): Promise<boolean>;
|
|
829
|
+
/**
|
|
830
|
+
* Gets the native `type` of the rendered `<button>` (`button`, `submit`, or
|
|
831
|
+
* `reset`). Returns `null` for anchor-mode renders.
|
|
832
|
+
*
|
|
833
|
+
* @example
|
|
834
|
+
* ```typescript
|
|
835
|
+
* const saveBtn = await loader.getHarness(TnButtonHarness.with({ label: 'Save' }));
|
|
836
|
+
* expect(await saveBtn.getType()).toBe('submit');
|
|
837
|
+
* ```
|
|
838
|
+
*/
|
|
839
|
+
getType(): Promise<string | null>;
|
|
821
840
|
/**
|
|
822
841
|
* Gets the resolved URL of the rendered element. Returns the `href` for
|
|
823
842
|
* anchor-mode renders (both plain `href` and `routerLink`) and `null` for
|