@truenas/ui-components 0.8.18 → 0.8.20
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/README.md
CHANGED
|
@@ -541,7 +541,7 @@ function createTnOptionsDataSource(config) {
|
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
let nextId$
|
|
544
|
+
let nextId$12 = 0;
|
|
545
545
|
const TN_AUTOCOMPLETE_DEFAULT_LABELS = {
|
|
546
546
|
placeholder: "Type to search...",
|
|
547
547
|
loading: "Loading...",
|
|
@@ -555,7 +555,7 @@ var TnAutocompleteComponent = class TnAutocompleteComponent {
|
|
|
555
555
|
elementRef = inject(ElementRef);
|
|
556
556
|
overlay = inject(Overlay);
|
|
557
557
|
viewContainerRef = inject(ViewContainerRef);
|
|
558
|
-
uid = `tn-autocomplete-${nextId$
|
|
558
|
+
uid = `tn-autocomplete-${nextId$12++}`;
|
|
559
559
|
options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
560
560
|
compareWith = input(void 0, ...ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []);
|
|
561
561
|
placeholder = input(void 0, ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
@@ -3941,6 +3941,7 @@ const ARROW_HALF_WIDTH_PROPERTY = "--tn-tooltip-arrow-half-width";
|
|
|
3941
3941
|
const PANEL_RADIUS_PROPERTY = "--tn-tooltip-radius";
|
|
3942
3942
|
const FALLBACK_ARROW_HALF_WIDTH = 6;
|
|
3943
3943
|
const FALLBACK_PANEL_RADIUS = 4;
|
|
3944
|
+
let nextId$11 = 0;
|
|
3944
3945
|
var TnTooltipDirective = class TnTooltipDirective {
|
|
3945
3946
|
message = input("", {
|
|
3946
3947
|
...ngDevMode ? { debugName: "message" } : /* istanbul ignore next */ {},
|
|
@@ -3991,7 +3992,7 @@ var TnTooltipDirective = class TnTooltipDirective {
|
|
|
3991
3992
|
_outsideClickSub = null;
|
|
3992
3993
|
_dismissSub = null;
|
|
3993
3994
|
_focusSub = null;
|
|
3994
|
-
_tooltipId = `tn-tooltip-${
|
|
3995
|
+
_tooltipId = `tn-tooltip-${nextId$11++}`;
|
|
3995
3996
|
_overlay = inject(Overlay);
|
|
3996
3997
|
_elementRef = inject(ElementRef);
|
|
3997
3998
|
_viewContainerRef = inject(ViewContainerRef);
|
|
@@ -5151,7 +5152,7 @@ function tnIconMarker(iconName, library) {
|
|
|
5151
5152
|
function libIconMarker(iconName) {
|
|
5152
5153
|
return iconName;
|
|
5153
5154
|
}
|
|
5154
|
-
let nextId$
|
|
5155
|
+
let nextId$10 = 0;
|
|
5155
5156
|
var TnInputComponent = class TnInputComponent {
|
|
5156
5157
|
inputEl = viewChild.required("inputEl", ...ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []);
|
|
5157
5158
|
inputType = input(InputType.PlainText, ...ngDevMode ? [{ debugName: "inputType" }] : /* istanbul ignore next */ []);
|
|
@@ -5206,7 +5207,7 @@ var TnInputComponent = class TnInputComponent {
|
|
|
5206
5207
|
const base = this.testId();
|
|
5207
5208
|
return ["toggle-password", ...Array.isArray(base) ? base : [base]];
|
|
5208
5209
|
}, ...ngDevMode ? [{ debugName: "passwordToggleTestId" }] : /* istanbul ignore next */ []);
|
|
5209
|
-
id = `tn-input-${nextId$
|
|
5210
|
+
id = `tn-input-${nextId$10++}`;
|
|
5210
5211
|
value = signal("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
5211
5212
|
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
5212
5213
|
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
@@ -6544,11 +6545,11 @@ const TN_CHIP_INPUT_LABELS = new InjectionToken("TN_CHIP_INPUT_LABELS", {
|
|
|
6544
6545
|
providedIn: "root",
|
|
6545
6546
|
factory: () => TN_CHIP_INPUT_DEFAULT_LABELS
|
|
6546
6547
|
});
|
|
6547
|
-
let nextId$
|
|
6548
|
+
let nextId$9 = 0;
|
|
6548
6549
|
var TnChipInputComponent = class TnChipInputComponent {
|
|
6549
6550
|
overlay = inject(Overlay);
|
|
6550
6551
|
viewContainerRef = inject(ViewContainerRef);
|
|
6551
|
-
uid = `tn-chip-input-${nextId$
|
|
6552
|
+
uid = `tn-chip-input-${nextId$9++}`;
|
|
6552
6553
|
placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
6553
6554
|
disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
6554
6555
|
separatorKeys = input(["Enter", ","], ...ngDevMode ? [{ debugName: "separatorKeys" }] : /* istanbul ignore next */ []);
|
|
@@ -8352,6 +8353,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8352
8353
|
}]
|
|
8353
8354
|
}
|
|
8354
8355
|
});
|
|
8356
|
+
let nextId$8 = 0;
|
|
8355
8357
|
var TnSlideToggleComponent = class TnSlideToggleComponent {
|
|
8356
8358
|
toggleEl = viewChild.required("toggleEl", ...ngDevMode ? [{ debugName: "toggleEl" }] : /* istanbul ignore next */ []);
|
|
8357
8359
|
labelPosition = input("after", ...ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []);
|
|
@@ -8367,7 +8369,7 @@ var TnSlideToggleComponent = class TnSlideToggleComponent {
|
|
|
8367
8369
|
checked = input(false, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
8368
8370
|
change = output();
|
|
8369
8371
|
toggleChange = output();
|
|
8370
|
-
id = `tn-slide-toggle-${
|
|
8372
|
+
id = `tn-slide-toggle-${nextId$8++}`;
|
|
8371
8373
|
internalChecked = signal(false, ...ngDevMode ? [{ debugName: "internalChecked" }] : /* istanbul ignore next */ []);
|
|
8372
8374
|
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
8373
8375
|
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
@@ -9359,6 +9361,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9359
9361
|
}]
|
|
9360
9362
|
}
|
|
9361
9363
|
});
|
|
9364
|
+
let nextId$7 = 0;
|
|
9362
9365
|
var TnExpansionPanelComponent = class TnExpansionPanelComponent {
|
|
9363
9366
|
title = input(void 0, ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
9364
9367
|
elevation = input("medium", ...ngDevMode ? [{ debugName: "elevation" }] : /* istanbul ignore next */ []);
|
|
@@ -9377,7 +9380,7 @@ var TnExpansionPanelComponent = class TnExpansionPanelComponent {
|
|
|
9377
9380
|
const internal = this.internalExpanded();
|
|
9378
9381
|
return internal !== null ? internal : this.expanded();
|
|
9379
9382
|
}, ...ngDevMode ? [{ debugName: "effectiveExpanded" }] : /* istanbul ignore next */ []);
|
|
9380
|
-
contentId = `tn-expansion-panel-content-${
|
|
9383
|
+
contentId = `tn-expansion-panel-content-${nextId$7++}`;
|
|
9381
9384
|
toggle() {
|
|
9382
9385
|
if (this.disabled()) return;
|
|
9383
9386
|
const newExpanded = !this.effectiveExpanded();
|
|
@@ -9645,6 +9648,7 @@ var TnExpansionPanelHarness = class TnExpansionPanelHarness extends ComponentHar
|
|
|
9645
9648
|
if (await this.isExpanded()) await this.toggle();
|
|
9646
9649
|
}
|
|
9647
9650
|
};
|
|
9651
|
+
let nextId$6 = 0;
|
|
9648
9652
|
var TnCheckboxLabelDirective = class TnCheckboxLabelDirective {
|
|
9649
9653
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
9650
9654
|
minVersion: "12.0.0",
|
|
@@ -9690,7 +9694,7 @@ var TnCheckboxComponent = class TnCheckboxComponent {
|
|
|
9690
9694
|
change = output();
|
|
9691
9695
|
labelContent = contentChildren(TnCheckboxLabelDirective, ...ngDevMode ? [{ debugName: "labelContent" }] : /* istanbul ignore next */ []);
|
|
9692
9696
|
hasProjectedLabel = computed(() => this.labelContent().length > 0, ...ngDevMode ? [{ debugName: "hasProjectedLabel" }] : /* istanbul ignore next */ []);
|
|
9693
|
-
id = `tn-checkbox-${
|
|
9697
|
+
id = `tn-checkbox-${nextId$6++}`;
|
|
9694
9698
|
internalChecked = signal(false, ...ngDevMode ? [{ debugName: "internalChecked" }] : /* istanbul ignore next */ []);
|
|
9695
9699
|
cvaControlled = signal(false, ...ngDevMode ? [{ debugName: "cvaControlled" }] : /* istanbul ignore next */ []);
|
|
9696
9700
|
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
@@ -10019,7 +10023,7 @@ var TnCheckboxHarness = class TnCheckboxHarness extends ComponentHarness {
|
|
|
10019
10023
|
await (await this._label()).click();
|
|
10020
10024
|
}
|
|
10021
10025
|
};
|
|
10022
|
-
let nextId$
|
|
10026
|
+
let nextId$5 = 0;
|
|
10023
10027
|
var TnCheckboxGroupComponent = class TnCheckboxGroupComponent {
|
|
10024
10028
|
options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
10025
10029
|
inline = input(false, ...ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []);
|
|
@@ -10035,7 +10039,7 @@ var TnCheckboxGroupComponent = class TnCheckboxGroupComponent {
|
|
|
10035
10039
|
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
10036
10040
|
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
10037
10041
|
ariaRequired = computed(() => this.required() || this.fieldAria.required() === true, ...ngDevMode ? [{ debugName: "ariaRequired" }] : /* istanbul ignore next */ []);
|
|
10038
|
-
requiredTextId = `tn-checkbox-group-required-${nextId$
|
|
10042
|
+
requiredTextId = `tn-checkbox-group-required-${nextId$5++}`;
|
|
10039
10043
|
resolvedAriaLabel = computed(() => {
|
|
10040
10044
|
const label = this.ariaLabel();
|
|
10041
10045
|
if (!label) return null;
|
|
@@ -10325,6 +10329,7 @@ var TnCheckboxGroupHarness = class TnCheckboxGroupHarness extends ComponentHarne
|
|
|
10325
10329
|
}
|
|
10326
10330
|
};
|
|
10327
10331
|
const TN_RADIO_GROUP = new InjectionToken("TN_RADIO_GROUP");
|
|
10332
|
+
let nextId$4 = 0;
|
|
10328
10333
|
var TnRadioComponent = class TnRadioComponent {
|
|
10329
10334
|
radioEl = viewChild.required("radioEl", ...ngDevMode ? [{ debugName: "radioEl" }] : /* istanbul ignore next */ []);
|
|
10330
10335
|
label = input("Radio", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
@@ -10336,7 +10341,7 @@ var TnRadioComponent = class TnRadioComponent {
|
|
|
10336
10341
|
resolvedTestId = controlTestId(this.testId);
|
|
10337
10342
|
error = input(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
10338
10343
|
change = output();
|
|
10339
|
-
id = `tn-radio-${
|
|
10344
|
+
id = `tn-radio-${nextId$4++}`;
|
|
10340
10345
|
group = inject(TN_RADIO_GROUP, { optional: true });
|
|
10341
10346
|
standaloneChecked = signal(false, ...ngDevMode ? [{ debugName: "standaloneChecked" }] : /* istanbul ignore next */ []);
|
|
10342
10347
|
checked = computed(() => this.group ? this.group.isSelected(this.value()) : this.standaloneChecked(), ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
@@ -12115,7 +12120,7 @@ function dismissibleErrorState(sources) {
|
|
|
12115
12120
|
resolvedDismissTooltip: computed(() => sources.dismissTooltip() ?? resolvedDismissAriaLabel())
|
|
12116
12121
|
};
|
|
12117
12122
|
}
|
|
12118
|
-
let nextId$
|
|
12123
|
+
let nextId$3 = 0;
|
|
12119
12124
|
const FOCUSABLE_SELECTOR = [
|
|
12120
12125
|
"input:not([disabled])",
|
|
12121
12126
|
"select:not([disabled])",
|
|
@@ -12125,7 +12130,7 @@ const FOCUSABLE_SELECTOR = [
|
|
|
12125
12130
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
12126
12131
|
].join(",");
|
|
12127
12132
|
var TnFormFieldComponent = class TnFormFieldComponent {
|
|
12128
|
-
uid = `tn-form-field-${nextId$
|
|
12133
|
+
uid = `tn-form-field-${nextId$3++}`;
|
|
12129
12134
|
errorId = `${this.uid}-error`;
|
|
12130
12135
|
hintId = `${this.uid}-hint`;
|
|
12131
12136
|
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
@@ -12641,7 +12646,7 @@ var TnFormFieldHarness = class TnFormFieldHarness extends ComponentHarness {
|
|
|
12641
12646
|
return await subscript.hasClass("tn-form-field-subscript-dynamic") ? "dynamic" : "fixed";
|
|
12642
12647
|
}
|
|
12643
12648
|
};
|
|
12644
|
-
let nextId$
|
|
12649
|
+
let nextId$2 = 0;
|
|
12645
12650
|
const EMPTY_STATE = {
|
|
12646
12651
|
invalid: false,
|
|
12647
12652
|
interacted: false,
|
|
@@ -12656,7 +12661,7 @@ var TnFormErrorsComponent = class TnFormErrorsComponent {
|
|
|
12656
12661
|
dismissAriaLabel = input(void 0, ...ngDevMode ? [{ debugName: "dismissAriaLabel" }] : /* istanbul ignore next */ []);
|
|
12657
12662
|
dismissTooltip = input(void 0, ...ngDevMode ? [{ debugName: "dismissTooltip" }] : /* istanbul ignore next */ []);
|
|
12658
12663
|
dismiss = output();
|
|
12659
|
-
errorId = `tn-form-errors-${nextId$
|
|
12664
|
+
errorId = `tn-form-errors-${nextId$2++}`;
|
|
12660
12665
|
errorResolver = inject(TN_FORM_FIELD_ERRORS, { optional: true });
|
|
12661
12666
|
state = signal(EMPTY_STATE, ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
12662
12667
|
errorMessage = computed(() => {
|
|
@@ -15265,11 +15270,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15265
15270
|
}]
|
|
15266
15271
|
}
|
|
15267
15272
|
});
|
|
15268
|
-
let nextId = 0;
|
|
15273
|
+
let nextId$1 = 0;
|
|
15269
15274
|
var TnListSubheaderComponent = class TnListSubheaderComponent {
|
|
15270
15275
|
inset = input(false, ...ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []);
|
|
15271
15276
|
owner = ariaOwner();
|
|
15272
|
-
textId = `tn-list-subheader-${nextId++}`;
|
|
15277
|
+
textId = `tn-list-subheader-${nextId$1++}`;
|
|
15273
15278
|
ownerKind = computed(() => {
|
|
15274
15279
|
const role = this.owner.role();
|
|
15275
15280
|
return role === "list" || role === "listbox" ? role : "other";
|
|
@@ -25545,6 +25550,7 @@ const TN_SIDE_PANEL_CONTENT_LABEL = "Panel content";
|
|
|
25545
25550
|
const TN_SIDE_PANEL_OVERFLOW_TOLERANCE_PX = 13;
|
|
25546
25551
|
const TN_SIDE_PANEL_ATTACHED_CLASS = "tn-side-panel__overlay--attached";
|
|
25547
25552
|
const TN_SIDE_PANEL_OPEN_CLASS = "tn-side-panel__overlay--open";
|
|
25553
|
+
let nextId = 0;
|
|
25548
25554
|
var TnSidePanelActionDirective = class TnSidePanelActionDirective {
|
|
25549
25555
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
25550
25556
|
minVersion: "12.0.0",
|
|
@@ -25671,7 +25677,7 @@ var TnSidePanelComponent = class TnSidePanelComponent {
|
|
|
25671
25677
|
hasActions = computed(() => this.actionContent().length > 0, ...ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []);
|
|
25672
25678
|
titleSlotContent = contentChildren(TnSidePanelTitleDirective, ...ngDevMode ? [{ debugName: "titleSlotContent" }] : /* istanbul ignore next */ []);
|
|
25673
25679
|
hasTitleSlot = computed(() => this.titleSlotContent().length > 0, ...ngDevMode ? [{ debugName: "hasTitleSlot" }] : /* istanbul ignore next */ []);
|
|
25674
|
-
panelId = `tn-side-panel-${
|
|
25680
|
+
panelId = `tn-side-panel-${nextId++}`;
|
|
25675
25681
|
titleId = `${this.panelId}-title`;
|
|
25676
25682
|
hasTitle = computed(() => this.title().trim() !== "", ...ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []);
|
|
25677
25683
|
resolvedAriaLabelledby = computed(() => this.hasTitle() ? this.titleId : this.ariaLabelledby(), ...ngDevMode ? [{ debugName: "resolvedAriaLabelledby" }] : /* istanbul ignore next */ []);
|