@truenas/ui-components 0.8.19 → 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,7 +8353,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8352
8353
|
}]
|
|
8353
8354
|
}
|
|
8354
8355
|
});
|
|
8355
|
-
let nextId$
|
|
8356
|
+
let nextId$8 = 0;
|
|
8356
8357
|
var TnSlideToggleComponent = class TnSlideToggleComponent {
|
|
8357
8358
|
toggleEl = viewChild.required("toggleEl", ...ngDevMode ? [{ debugName: "toggleEl" }] : /* istanbul ignore next */ []);
|
|
8358
8359
|
labelPosition = input("after", ...ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []);
|
|
@@ -8368,7 +8369,7 @@ var TnSlideToggleComponent = class TnSlideToggleComponent {
|
|
|
8368
8369
|
checked = input(false, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
8369
8370
|
change = output();
|
|
8370
8371
|
toggleChange = output();
|
|
8371
|
-
id = `tn-slide-toggle-${nextId$
|
|
8372
|
+
id = `tn-slide-toggle-${nextId$8++}`;
|
|
8372
8373
|
internalChecked = signal(false, ...ngDevMode ? [{ debugName: "internalChecked" }] : /* istanbul ignore next */ []);
|
|
8373
8374
|
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
8374
8375
|
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
@@ -9360,6 +9361,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9360
9361
|
}]
|
|
9361
9362
|
}
|
|
9362
9363
|
});
|
|
9364
|
+
let nextId$7 = 0;
|
|
9363
9365
|
var TnExpansionPanelComponent = class TnExpansionPanelComponent {
|
|
9364
9366
|
title = input(void 0, ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
9365
9367
|
elevation = input("medium", ...ngDevMode ? [{ debugName: "elevation" }] : /* istanbul ignore next */ []);
|
|
@@ -9378,7 +9380,7 @@ var TnExpansionPanelComponent = class TnExpansionPanelComponent {
|
|
|
9378
9380
|
const internal = this.internalExpanded();
|
|
9379
9381
|
return internal !== null ? internal : this.expanded();
|
|
9380
9382
|
}, ...ngDevMode ? [{ debugName: "effectiveExpanded" }] : /* istanbul ignore next */ []);
|
|
9381
|
-
contentId = `tn-expansion-panel-content-${
|
|
9383
|
+
contentId = `tn-expansion-panel-content-${nextId$7++}`;
|
|
9382
9384
|
toggle() {
|
|
9383
9385
|
if (this.disabled()) return;
|
|
9384
9386
|
const newExpanded = !this.effectiveExpanded();
|
|
@@ -9646,7 +9648,7 @@ var TnExpansionPanelHarness = class TnExpansionPanelHarness extends ComponentHar
|
|
|
9646
9648
|
if (await this.isExpanded()) await this.toggle();
|
|
9647
9649
|
}
|
|
9648
9650
|
};
|
|
9649
|
-
let nextId$
|
|
9651
|
+
let nextId$6 = 0;
|
|
9650
9652
|
var TnCheckboxLabelDirective = class TnCheckboxLabelDirective {
|
|
9651
9653
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
9652
9654
|
minVersion: "12.0.0",
|
|
@@ -9692,7 +9694,7 @@ var TnCheckboxComponent = class TnCheckboxComponent {
|
|
|
9692
9694
|
change = output();
|
|
9693
9695
|
labelContent = contentChildren(TnCheckboxLabelDirective, ...ngDevMode ? [{ debugName: "labelContent" }] : /* istanbul ignore next */ []);
|
|
9694
9696
|
hasProjectedLabel = computed(() => this.labelContent().length > 0, ...ngDevMode ? [{ debugName: "hasProjectedLabel" }] : /* istanbul ignore next */ []);
|
|
9695
|
-
id = `tn-checkbox-${nextId$
|
|
9697
|
+
id = `tn-checkbox-${nextId$6++}`;
|
|
9696
9698
|
internalChecked = signal(false, ...ngDevMode ? [{ debugName: "internalChecked" }] : /* istanbul ignore next */ []);
|
|
9697
9699
|
cvaControlled = signal(false, ...ngDevMode ? [{ debugName: "cvaControlled" }] : /* istanbul ignore next */ []);
|
|
9698
9700
|
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
@@ -10021,7 +10023,7 @@ var TnCheckboxHarness = class TnCheckboxHarness extends ComponentHarness {
|
|
|
10021
10023
|
await (await this._label()).click();
|
|
10022
10024
|
}
|
|
10023
10025
|
};
|
|
10024
|
-
let nextId$
|
|
10026
|
+
let nextId$5 = 0;
|
|
10025
10027
|
var TnCheckboxGroupComponent = class TnCheckboxGroupComponent {
|
|
10026
10028
|
options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
10027
10029
|
inline = input(false, ...ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []);
|
|
@@ -10037,7 +10039,7 @@ var TnCheckboxGroupComponent = class TnCheckboxGroupComponent {
|
|
|
10037
10039
|
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
10038
10040
|
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
10039
10041
|
ariaRequired = computed(() => this.required() || this.fieldAria.required() === true, ...ngDevMode ? [{ debugName: "ariaRequired" }] : /* istanbul ignore next */ []);
|
|
10040
|
-
requiredTextId = `tn-checkbox-group-required-${nextId$
|
|
10042
|
+
requiredTextId = `tn-checkbox-group-required-${nextId$5++}`;
|
|
10041
10043
|
resolvedAriaLabel = computed(() => {
|
|
10042
10044
|
const label = this.ariaLabel();
|
|
10043
10045
|
if (!label) return null;
|
|
@@ -10327,7 +10329,7 @@ var TnCheckboxGroupHarness = class TnCheckboxGroupHarness extends ComponentHarne
|
|
|
10327
10329
|
}
|
|
10328
10330
|
};
|
|
10329
10331
|
const TN_RADIO_GROUP = new InjectionToken("TN_RADIO_GROUP");
|
|
10330
|
-
let nextId$
|
|
10332
|
+
let nextId$4 = 0;
|
|
10331
10333
|
var TnRadioComponent = class TnRadioComponent {
|
|
10332
10334
|
radioEl = viewChild.required("radioEl", ...ngDevMode ? [{ debugName: "radioEl" }] : /* istanbul ignore next */ []);
|
|
10333
10335
|
label = input("Radio", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
@@ -10339,7 +10341,7 @@ var TnRadioComponent = class TnRadioComponent {
|
|
|
10339
10341
|
resolvedTestId = controlTestId(this.testId);
|
|
10340
10342
|
error = input(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
10341
10343
|
change = output();
|
|
10342
|
-
id = `tn-radio-${nextId$
|
|
10344
|
+
id = `tn-radio-${nextId$4++}`;
|
|
10343
10345
|
group = inject(TN_RADIO_GROUP, { optional: true });
|
|
10344
10346
|
standaloneChecked = signal(false, ...ngDevMode ? [{ debugName: "standaloneChecked" }] : /* istanbul ignore next */ []);
|
|
10345
10347
|
checked = computed(() => this.group ? this.group.isSelected(this.value()) : this.standaloneChecked(), ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
@@ -12118,7 +12120,7 @@ function dismissibleErrorState(sources) {
|
|
|
12118
12120
|
resolvedDismissTooltip: computed(() => sources.dismissTooltip() ?? resolvedDismissAriaLabel())
|
|
12119
12121
|
};
|
|
12120
12122
|
}
|
|
12121
|
-
let nextId$
|
|
12123
|
+
let nextId$3 = 0;
|
|
12122
12124
|
const FOCUSABLE_SELECTOR = [
|
|
12123
12125
|
"input:not([disabled])",
|
|
12124
12126
|
"select:not([disabled])",
|
|
@@ -12128,7 +12130,7 @@ const FOCUSABLE_SELECTOR = [
|
|
|
12128
12130
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
12129
12131
|
].join(",");
|
|
12130
12132
|
var TnFormFieldComponent = class TnFormFieldComponent {
|
|
12131
|
-
uid = `tn-form-field-${nextId$
|
|
12133
|
+
uid = `tn-form-field-${nextId$3++}`;
|
|
12132
12134
|
errorId = `${this.uid}-error`;
|
|
12133
12135
|
hintId = `${this.uid}-hint`;
|
|
12134
12136
|
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
@@ -12644,7 +12646,7 @@ var TnFormFieldHarness = class TnFormFieldHarness extends ComponentHarness {
|
|
|
12644
12646
|
return await subscript.hasClass("tn-form-field-subscript-dynamic") ? "dynamic" : "fixed";
|
|
12645
12647
|
}
|
|
12646
12648
|
};
|
|
12647
|
-
let nextId$
|
|
12649
|
+
let nextId$2 = 0;
|
|
12648
12650
|
const EMPTY_STATE = {
|
|
12649
12651
|
invalid: false,
|
|
12650
12652
|
interacted: false,
|
|
@@ -12659,7 +12661,7 @@ var TnFormErrorsComponent = class TnFormErrorsComponent {
|
|
|
12659
12661
|
dismissAriaLabel = input(void 0, ...ngDevMode ? [{ debugName: "dismissAriaLabel" }] : /* istanbul ignore next */ []);
|
|
12660
12662
|
dismissTooltip = input(void 0, ...ngDevMode ? [{ debugName: "dismissTooltip" }] : /* istanbul ignore next */ []);
|
|
12661
12663
|
dismiss = output();
|
|
12662
|
-
errorId = `tn-form-errors-${nextId$
|
|
12664
|
+
errorId = `tn-form-errors-${nextId$2++}`;
|
|
12663
12665
|
errorResolver = inject(TN_FORM_FIELD_ERRORS, { optional: true });
|
|
12664
12666
|
state = signal(EMPTY_STATE, ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
12665
12667
|
errorMessage = computed(() => {
|
|
@@ -15268,11 +15270,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
15268
15270
|
}]
|
|
15269
15271
|
}
|
|
15270
15272
|
});
|
|
15271
|
-
let nextId = 0;
|
|
15273
|
+
let nextId$1 = 0;
|
|
15272
15274
|
var TnListSubheaderComponent = class TnListSubheaderComponent {
|
|
15273
15275
|
inset = input(false, ...ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []);
|
|
15274
15276
|
owner = ariaOwner();
|
|
15275
|
-
textId = `tn-list-subheader-${nextId++}`;
|
|
15277
|
+
textId = `tn-list-subheader-${nextId$1++}`;
|
|
15276
15278
|
ownerKind = computed(() => {
|
|
15277
15279
|
const role = this.owner.role();
|
|
15278
15280
|
return role === "list" || role === "listbox" ? role : "other";
|
|
@@ -25548,6 +25550,7 @@ const TN_SIDE_PANEL_CONTENT_LABEL = "Panel content";
|
|
|
25548
25550
|
const TN_SIDE_PANEL_OVERFLOW_TOLERANCE_PX = 13;
|
|
25549
25551
|
const TN_SIDE_PANEL_ATTACHED_CLASS = "tn-side-panel__overlay--attached";
|
|
25550
25552
|
const TN_SIDE_PANEL_OPEN_CLASS = "tn-side-panel__overlay--open";
|
|
25553
|
+
let nextId = 0;
|
|
25551
25554
|
var TnSidePanelActionDirective = class TnSidePanelActionDirective {
|
|
25552
25555
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
25553
25556
|
minVersion: "12.0.0",
|
|
@@ -25674,7 +25677,7 @@ var TnSidePanelComponent = class TnSidePanelComponent {
|
|
|
25674
25677
|
hasActions = computed(() => this.actionContent().length > 0, ...ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []);
|
|
25675
25678
|
titleSlotContent = contentChildren(TnSidePanelTitleDirective, ...ngDevMode ? [{ debugName: "titleSlotContent" }] : /* istanbul ignore next */ []);
|
|
25676
25679
|
hasTitleSlot = computed(() => this.titleSlotContent().length > 0, ...ngDevMode ? [{ debugName: "hasTitleSlot" }] : /* istanbul ignore next */ []);
|
|
25677
|
-
panelId = `tn-side-panel-${
|
|
25680
|
+
panelId = `tn-side-panel-${nextId++}`;
|
|
25678
25681
|
titleId = `${this.panelId}-title`;
|
|
25679
25682
|
hasTitle = computed(() => this.title().trim() !== "", ...ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []);
|
|
25680
25683
|
resolvedAriaLabelledby = computed(() => this.hasTitle() ? this.titleId : this.ariaLabelledby(), ...ngDevMode ? [{ debugName: "resolvedAriaLabelledby" }] : /* istanbul ignore next */ []);
|