@designsystem-se/af-angular 39.2.1-beta.1 → 39.2.1-beta.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.
@@ -7797,12 +7797,12 @@ let DigiToolsThemeProvider = class DigiToolsThemeProvider {
7797
7797
  this.el = r.nativeElement;
7798
7798
  }
7799
7799
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: DigiToolsThemeProvider, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
7800
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: DigiToolsThemeProvider, isStandalone: true, selector: "digi-tools-theme-provider", inputs: { afBrand: "afBrand" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7800
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: DigiToolsThemeProvider, isStandalone: true, selector: "digi-tools-theme-provider", inputs: { afBrand: "afBrand", afTheme: "afTheme" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7801
7801
  };
7802
7802
  DigiToolsThemeProvider = __decorate([
7803
7803
  ProxyCmp({
7804
7804
  defineCustomElementFn: defineCustomElement$4e,
7805
- inputs: ['afBrand']
7805
+ inputs: ['afBrand', 'afTheme']
7806
7806
  }),
7807
7807
  __metadata("design:paramtypes", [ChangeDetectorRef, ElementRef, NgZone])
7808
7808
  ], DigiToolsThemeProvider);
@@ -7813,7 +7813,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
7813
7813
  changeDetection: ChangeDetectionStrategy.OnPush,
7814
7814
  template: '<ng-content></ng-content>',
7815
7815
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
7816
- inputs: ['afBrand'],
7816
+ inputs: ['afBrand', 'afTheme'],
7817
7817
  }]
7818
7818
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
7819
7819
  let DigiTypography = class DigiTypography {
@@ -8287,8 +8287,25 @@ class ValueAccessor {
8287
8287
  this.onChange(value);
8288
8288
  }
8289
8289
  }
8290
- _handleBlurEvent() {
8291
- this.onTouched();
8290
+ _handleBlurEvent(event) {
8291
+ const host = this.el.nativeElement;
8292
+ const relatedTarget = event?.relatedTarget;
8293
+ if (relatedTarget && host.contains(relatedTarget)) {
8294
+ return;
8295
+ }
8296
+ if (relatedTarget) {
8297
+ this.onTouched();
8298
+ return;
8299
+ }
8300
+ // Programmatic .focus() often has relatedTarget === null. Wait until
8301
+ // nested host→input hops have settled, then treat as blur only if
8302
+ // focus actually left the component.
8303
+ setTimeout(() => {
8304
+ const active = document.activeElement;
8305
+ if (!active || !host.contains(active)) {
8306
+ this.onTouched();
8307
+ }
8308
+ });
8292
8309
  }
8293
8310
  registerOnChange(fn) {
8294
8311
  this.onChange = fn;
@@ -8300,14 +8317,14 @@ class ValueAccessor {
8300
8317
  this.el.nativeElement.disabled = isDisabled;
8301
8318
  }
8302
8319
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
8303
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.19", type: ValueAccessor, isStandalone: true, host: { listeners: { "focusout": "_handleBlurEvent()" } }, ngImport: i0 }); }
8320
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.19", type: ValueAccessor, isStandalone: true, host: { listeners: { "focusout": "_handleBlurEvent($event)" } }, ngImport: i0 }); }
8304
8321
  }
8305
8322
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ValueAccessor, decorators: [{
8306
8323
  type: Directive,
8307
8324
  args: [{}]
8308
8325
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { _handleBlurEvent: [{
8309
8326
  type: HostListener,
8310
- args: ['focusout']
8327
+ args: ['focusout', ['$event']]
8311
8328
  }] } });
8312
8329
 
8313
8330
  class BooleanValueAccessor extends ValueAccessor {