@truenas/ui-components 0.4.5 → 0.4.6
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
|
@@ -1254,6 +1254,11 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
1254
1254
|
*/
|
|
1255
1255
|
iconPosition: _angular_core.InputSignal<"left" | "right">;
|
|
1256
1256
|
disabled: _angular_core.InputSignal<boolean>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Stretches the button to the full width of its container instead of
|
|
1259
|
+
* shrink-wrapping the label. Use for buttons that head or foot a form column.
|
|
1260
|
+
*/
|
|
1261
|
+
fullWidth: _angular_core.InputSignal<boolean>;
|
|
1257
1262
|
/**
|
|
1258
1263
|
* Native `type` of the rendered `<button>`. Defaults to `button` so stray
|
|
1259
1264
|
* clicks never submit an enclosing form. Set to `submit` for a form's save
|
|
@@ -1298,7 +1303,7 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
1298
1303
|
private innerRef;
|
|
1299
1304
|
ngAfterViewInit(): void;
|
|
1300
1305
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnButtonComponent, never>;
|
|
1301
|
-
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>;
|
|
1306
|
+
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; }; "fullWidth": { "alias": "fullWidth"; "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>;
|
|
1302
1307
|
}
|
|
1303
1308
|
|
|
1304
1309
|
/**
|
|
@@ -3791,6 +3796,12 @@ declare class TnSlideToggleComponent implements AfterViewInit, OnDestroy, Contro
|
|
|
3791
3796
|
toggleEl: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
3792
3797
|
labelPosition: _angular_core.InputSignal<"before" | "after">;
|
|
3793
3798
|
label: _angular_core.InputSignal<string | undefined>;
|
|
3799
|
+
/**
|
|
3800
|
+
* Stretches the toggle to the full width of its container and pushes the label
|
|
3801
|
+
* and the track to opposite ends of the row, instead of shrink-wrapping them
|
|
3802
|
+
* side by side. Use for settings rows and option lists.
|
|
3803
|
+
*/
|
|
3804
|
+
fullWidth: _angular_core.InputSignal<boolean>;
|
|
3794
3805
|
disabled: _angular_core.InputSignal<boolean>;
|
|
3795
3806
|
required: _angular_core.InputSignal<boolean>;
|
|
3796
3807
|
color: _angular_core.InputSignal<SlideToggleColor>;
|
|
@@ -3821,7 +3832,7 @@ declare class TnSlideToggleComponent implements AfterViewInit, OnDestroy, Contro
|
|
|
3821
3832
|
classes: _angular_core.Signal<string[]>;
|
|
3822
3833
|
effectiveAriaLabel: _angular_core.Signal<string | undefined>;
|
|
3823
3834
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnSlideToggleComponent, never>;
|
|
3824
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnSlideToggleComponent, "tn-slide-toggle", never, { "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "change": "change"; "toggleChange": "toggleChange"; }, never, never, true, never>;
|
|
3835
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnSlideToggleComponent, "tn-slide-toggle", never, { "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "change": "change"; "toggleChange": "toggleChange"; }, never, never, true, never>;
|
|
3825
3836
|
}
|
|
3826
3837
|
|
|
3827
3838
|
/**
|
|
@@ -5728,22 +5739,56 @@ declare class TnListComponent {
|
|
|
5728
5739
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListComponent, "tn-list", never, { "dense": { "alias": "dense"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
5729
5740
|
}
|
|
5730
5741
|
|
|
5731
|
-
|
|
5742
|
+
/**
|
|
5743
|
+
* A single row of a `tn-list`.
|
|
5744
|
+
*
|
|
5745
|
+
* **The content directives must be imported by the component that declares the
|
|
5746
|
+
* row.** Every slot but the primary text is rendered only when a matching
|
|
5747
|
+
* directive *instance* is found, and directives apply only in the template that
|
|
5748
|
+
* declares them — importing `TnListItemComponent` alone does not bring them
|
|
5749
|
+
* into scope. Write `<span tnListIcon>` without `TnListIconDirective` in that
|
|
5750
|
+
* component's `imports` and the attribute is inert: no instance, so the leading
|
|
5751
|
+
* slot never renders and the icon silently disappears. The same holds for
|
|
5752
|
+
* `[tnListAvatar]`, `[tnListItemLine]`, `[tnListItemSecondary]` and
|
|
5753
|
+
* `[tnListItemTrailing]`. Import them alongside the component:
|
|
5754
|
+
*
|
|
5755
|
+
* ```ts
|
|
5756
|
+
* import {
|
|
5757
|
+
* TnListItemComponent,
|
|
5758
|
+
* TnListIconDirective,
|
|
5759
|
+
* TnListItemLineDirective,
|
|
5760
|
+
* TnListItemTrailingDirective,
|
|
5761
|
+
* } from '@truenas/ui-components';
|
|
5762
|
+
* ```
|
|
5763
|
+
*
|
|
5764
|
+
* The primary-text slot is the deliberate exception — it has no gate, so
|
|
5765
|
+
* `[tnListItemTitle]` and `[tnListItemPrimary]` render either way. See the
|
|
5766
|
+
* comment in `list-item.component.html` for why the asymmetry is there.
|
|
5767
|
+
*/
|
|
5768
|
+
declare class TnListItemComponent {
|
|
5732
5769
|
disabled: _angular_core.InputSignal<boolean>;
|
|
5733
5770
|
clickable: _angular_core.InputSignal<boolean>;
|
|
5771
|
+
/** Compact row: smaller minimum height and tighter vertical padding. */
|
|
5772
|
+
dense: _angular_core.InputSignal<boolean>;
|
|
5773
|
+
/**
|
|
5774
|
+
* Lets the primary and secondary text wrap onto multiple lines instead of
|
|
5775
|
+
* being truncated with an ellipsis. Use for rows whose content is a path, a
|
|
5776
|
+
* sentence, or anything else that should stay fully readable.
|
|
5777
|
+
*/
|
|
5778
|
+
wrap: _angular_core.InputSignal<boolean>;
|
|
5734
5779
|
itemClick: _angular_core.OutputEmitterRef<Event>;
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
private
|
|
5740
|
-
|
|
5741
|
-
|
|
5780
|
+
private leadingIcons;
|
|
5781
|
+
private leadingAvatars;
|
|
5782
|
+
private secondaryLines;
|
|
5783
|
+
private secondaryTexts;
|
|
5784
|
+
private trailing;
|
|
5785
|
+
protected hasLeadingContent: _angular_core.Signal<boolean>;
|
|
5786
|
+
protected hasTrailingContent: _angular_core.Signal<boolean>;
|
|
5742
5787
|
hasSecondaryText: _angular_core.Signal<boolean>;
|
|
5743
5788
|
hasThirdText: _angular_core.Signal<boolean>;
|
|
5744
5789
|
onClick(event: Event): void;
|
|
5745
5790
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemComponent, never>;
|
|
5746
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListItemComponent, "tn-list-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; },
|
|
5791
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListItemComponent, "tn-list-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "dense": { "alias": "dense"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, ["leadingIcons", "leadingAvatars", "secondaryLines", "secondaryTexts", "trailing"], ["[tnListIcon], [tnListAvatar]", "[tnListItemTitle], [tnListItemPrimary]", "*", "[tnListItemLine], [tnListItemSecondary]", "[tnListItemTrailing]"], true, never>;
|
|
5747
5792
|
}
|
|
5748
5793
|
|
|
5749
5794
|
declare class TnListSubheaderComponent {
|
|
@@ -5752,30 +5797,66 @@ declare class TnListSubheaderComponent {
|
|
|
5752
5797
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListSubheaderComponent, "tn-list-subheader", never, { "inset": { "alias": "inset"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
5753
5798
|
}
|
|
5754
5799
|
|
|
5800
|
+
/**
|
|
5801
|
+
* Leading icon of a list row.
|
|
5802
|
+
*
|
|
5803
|
+
* Requires importing `TnListIconDirective`, or the leading slot never renders.
|
|
5804
|
+
*/
|
|
5755
5805
|
declare class TnListIconDirective {
|
|
5756
5806
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListIconDirective, never>;
|
|
5757
5807
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListIconDirective, "[tnListIcon]", never, {}, {}, never, never, true, never>;
|
|
5758
5808
|
}
|
|
5809
|
+
/**
|
|
5810
|
+
* Leading avatar of a list row.
|
|
5811
|
+
*
|
|
5812
|
+
* Requires importing `TnListAvatarDirective`, or the leading slot never renders.
|
|
5813
|
+
*/
|
|
5759
5814
|
declare class TnListAvatarDirective {
|
|
5760
5815
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListAvatarDirective, never>;
|
|
5761
5816
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListAvatarDirective, "[tnListAvatar]", never, {}, {}, never, never, true, never>;
|
|
5762
5817
|
}
|
|
5818
|
+
/**
|
|
5819
|
+
* Primary text of a list row. Projects whether or not this directive is
|
|
5820
|
+
* imported — the primary slot is ungated — but import it for the styling.
|
|
5821
|
+
*/
|
|
5763
5822
|
declare class TnListItemTitleDirective {
|
|
5764
5823
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemTitleDirective, never>;
|
|
5765
5824
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemTitleDirective, "[tnListItemTitle]", never, {}, {}, never, never, true, never>;
|
|
5766
5825
|
}
|
|
5826
|
+
/**
|
|
5827
|
+
* Secondary line of a list row. Two or more make the row three-line.
|
|
5828
|
+
*
|
|
5829
|
+
* Requires importing `TnListItemLineDirective`, or the secondary slot never
|
|
5830
|
+
* renders and the row is not marked as multi-line.
|
|
5831
|
+
*/
|
|
5767
5832
|
declare class TnListItemLineDirective {
|
|
5768
5833
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemLineDirective, never>;
|
|
5769
5834
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemLineDirective, "[tnListItemLine]", never, {}, {}, never, never, true, never>;
|
|
5770
5835
|
}
|
|
5836
|
+
/**
|
|
5837
|
+
* Primary text of a list row. Projects whether or not this directive is
|
|
5838
|
+
* imported — the primary slot is ungated — but import it for the styling.
|
|
5839
|
+
*/
|
|
5771
5840
|
declare class TnListItemPrimaryDirective {
|
|
5772
5841
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemPrimaryDirective, never>;
|
|
5773
5842
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemPrimaryDirective, "[tnListItemPrimary]", never, {}, {}, never, never, true, never>;
|
|
5774
5843
|
}
|
|
5844
|
+
/**
|
|
5845
|
+
* Secondary text of a list row.
|
|
5846
|
+
*
|
|
5847
|
+
* Requires importing `TnListItemSecondaryDirective`, or the secondary slot
|
|
5848
|
+
* never renders and the row is not marked as multi-line.
|
|
5849
|
+
*/
|
|
5775
5850
|
declare class TnListItemSecondaryDirective {
|
|
5776
5851
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemSecondaryDirective, never>;
|
|
5777
5852
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemSecondaryDirective, "[tnListItemSecondary]", never, {}, {}, never, never, true, never>;
|
|
5778
5853
|
}
|
|
5854
|
+
/**
|
|
5855
|
+
* Trailing content of a list row — a control, a badge, a chevron.
|
|
5856
|
+
*
|
|
5857
|
+
* Requires importing `TnListItemTrailingDirective`, or the trailing slot never
|
|
5858
|
+
* renders.
|
|
5859
|
+
*/
|
|
5779
5860
|
declare class TnListItemTrailingDirective {
|
|
5780
5861
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemTrailingDirective, never>;
|
|
5781
5862
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemTrailingDirective, "[tnListItemTrailing]", never, {}, {}, never, never, true, never>;
|