@tedi-design-system/angular 10.0.0-rc.1 → 10.0.0-rc.3

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.
@@ -8726,20 +8726,23 @@ class FeedbackTextComponent {
8726
8726
  * @default left
8727
8727
  */
8728
8728
  position = input("left", ...(ngDevMode ? [{ debugName: "position" }] : []));
8729
+ // Callers forwarding optional values can pass undefined; keep the defaults
8730
+ resolvedType = computed(() => this.type() ?? "hint", ...(ngDevMode ? [{ debugName: "resolvedType" }] : []));
8731
+ resolvedPosition = computed(() => this.position() ?? "left", ...(ngDevMode ? [{ debugName: "resolvedPosition" }] : []));
8729
8732
  role = computed(() => {
8730
- if (this.type() === "valid" || this.type() === "error") {
8733
+ if (this.resolvedType() === "valid" || this.resolvedType() === "error") {
8731
8734
  return "alert";
8732
8735
  }
8733
8736
  return undefined;
8734
8737
  }, ...(ngDevMode ? [{ debugName: "role" }] : []));
8735
8738
  ariaLive = computed(() => {
8736
- if (this.type() === "error" || this.type() === "valid") {
8739
+ if (this.resolvedType() === "error" || this.resolvedType() === "valid") {
8737
8740
  return "assertive";
8738
8741
  }
8739
8742
  return "polite";
8740
8743
  }, ...(ngDevMode ? [{ debugName: "ariaLive" }] : []));
8741
8744
  classes = computed(() => {
8742
- return `tedi-feedback-text tedi-feedback-text--${this.type()} tedi-feedback-text--${this.position()}`;
8745
+ return `tedi-feedback-text tedi-feedback-text--${this.resolvedType()} tedi-feedback-text--${this.resolvedPosition()}`;
8743
8746
  }, ...(ngDevMode ? [{ debugName: "classes" }] : []));
8744
8747
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: FeedbackTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8745
8748
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.24", type: FeedbackTextComponent, isStandalone: true, selector: "tedi-feedback-text", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "elementId()", "attr.role": "role()", "attr.aria-live": "ariaLive()" } }, ngImport: i0, template: "{{ text() }}\n", styles: [".tedi-feedback-text{display:block;font-size:var(--body-small-regular-size);color:var(--general-text-tertiary)}.tedi-feedback-text--valid{color:var(--form-general-feedback-success-text)}.tedi-feedback-text--error{color:var(--form-general-feedback-error-text)}.tedi-feedback-text--left{flex-grow:1;text-align:left}.tedi-feedback-text--right{flex-grow:0;text-align:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });