@truenas/ui-components 0.3.9 → 0.3.10
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
|
@@ -1054,6 +1054,17 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
1054
1054
|
variant: _angular_core.InputSignal<"filled" | "outline">;
|
|
1055
1055
|
backgroundColor: _angular_core.InputSignal<string | undefined>;
|
|
1056
1056
|
label: _angular_core.InputSignal<string>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Optional icon rendered alongside the label. Accepts any name resolvable by
|
|
1059
|
+
* `tn-icon` (sprite/registry/library). Use `iconPosition` to place it before
|
|
1060
|
+
* or after the label.
|
|
1061
|
+
*/
|
|
1062
|
+
icon: _angular_core.InputSignal<string | undefined>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Side of the label the `icon` sits on. `left` (default) renders the icon
|
|
1065
|
+
* before the label; `right` renders it after. No effect when `icon` is unset.
|
|
1066
|
+
*/
|
|
1067
|
+
iconPosition: _angular_core.InputSignal<"left" | "right">;
|
|
1057
1068
|
disabled: _angular_core.InputSignal<boolean>;
|
|
1058
1069
|
/**
|
|
1059
1070
|
* Native `type` of the rendered `<button>`. Defaults to `button` so stray
|
|
@@ -1099,7 +1110,7 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
1099
1110
|
private innerRef;
|
|
1100
1111
|
ngAfterViewInit(): void;
|
|
1101
1112
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnButtonComponent, never>;
|
|
1102
|
-
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>;
|
|
1113
|
+
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; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "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>;
|
|
1103
1114
|
}
|
|
1104
1115
|
|
|
1105
1116
|
/**
|
|
@@ -1126,6 +1137,8 @@ declare class TnButtonHarness extends ComponentHarness {
|
|
|
1126
1137
|
*/
|
|
1127
1138
|
static hostSelector: string;
|
|
1128
1139
|
private _button;
|
|
1140
|
+
private _label;
|
|
1141
|
+
private _icon;
|
|
1129
1142
|
/**
|
|
1130
1143
|
* Gets a `HarnessPredicate` that can be used to search for a button
|
|
1131
1144
|
* with specific attributes.
|
|
@@ -1156,6 +1169,27 @@ declare class TnButtonHarness extends ComponentHarness {
|
|
|
1156
1169
|
* ```
|
|
1157
1170
|
*/
|
|
1158
1171
|
getLabel(): Promise<string>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Gets the `name` of the icon rendered inside the button, or `null` when the
|
|
1174
|
+
* button has no icon.
|
|
1175
|
+
*
|
|
1176
|
+
* @example
|
|
1177
|
+
* ```typescript
|
|
1178
|
+
* const saveBtn = await loader.getHarness(TnButtonHarness.with({ label: 'Save' }));
|
|
1179
|
+
* expect(await saveBtn.getIconName()).toBe('check');
|
|
1180
|
+
* ```
|
|
1181
|
+
*/
|
|
1182
|
+
getIconName(): Promise<string | null>;
|
|
1183
|
+
/**
|
|
1184
|
+
* Reports whether the button renders an icon.
|
|
1185
|
+
*
|
|
1186
|
+
* @example
|
|
1187
|
+
* ```typescript
|
|
1188
|
+
* const saveBtn = await loader.getHarness(TnButtonHarness.with({ label: 'Save' }));
|
|
1189
|
+
* expect(await saveBtn.hasIcon()).toBe(true);
|
|
1190
|
+
* ```
|
|
1191
|
+
*/
|
|
1192
|
+
hasIcon(): Promise<boolean>;
|
|
1159
1193
|
/**
|
|
1160
1194
|
* Checks whether the button is disabled.
|
|
1161
1195
|
*
|