codexly-ui 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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, inject, PLATFORM_ID, signal, effect, Injectable, ElementRef, output, Directive, contentChild, forwardRef, Renderer2, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent, untracked, HostListener, viewChild, ViewChild, Injector, ChangeDetectorRef, NgZone, model, contentChildren, ContentChildren, ViewChildren, Input, numberAttribute, booleanAttribute } from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, inject, PLATFORM_ID, signal, effect, Injectable, ElementRef, HostAttributeToken, output, Directive, contentChild, forwardRef, Renderer2, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent, untracked, HostListener, viewChild, ViewChild, Injector, ChangeDetectorRef, NgZone, model, contentChildren, ContentChildren, ViewChildren, Input, numberAttribute, booleanAttribute } from '@angular/core';
3
3
  import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT, NgStyle, CurrencyPipe, DecimalPipe } from '@angular/common';
4
4
  import * as i1$1 from '@angular/forms';
5
5
  import { NG_VALUE_ACCESSOR, FormControl, NgControl, ReactiveFormsModule, FormGroup, Validators, FormsModule } from '@angular/forms';
@@ -782,10 +782,12 @@ class ClxButtonComponent {
782
782
  _ripples = signal([], ...(ngDevMode ? [{ debugName: "_ripples" }] : /* istanbul ignore next */ []));
783
783
  _nextId = 0;
784
784
  _el = inject((ElementRef));
785
- /** Static `class="..."` written by the consumer template, captured before the `[class]`
786
- * host binding below overwrites it otherwise any consumer-supplied classes (e.g.
787
- * positioning utilities like `absolute`/`group-hover:opacity-100`) would be silently lost. */
788
- _consumerClass = this._el.nativeElement.getAttribute('class') ?? '';
785
+ /** Static `class="..."` written by the consumer template. Read via `HostAttributeToken`
786
+ * (resolved from the template's static attribute at DI time) rather than
787
+ * `ElementRef.nativeElement.getAttribute`, since the `[class]` host binding below hasn't
788
+ * necessarily painted yet when the constructor runs — otherwise any consumer-supplied
789
+ * classes (e.g. positioning utilities like `absolute`/`top-1`) would be silently lost. */
790
+ _consumerClass = inject(new HostAttributeToken('class'), { optional: true }) ?? '';
789
791
  _inactive = computed(() => this.loading() || this.disabled(), ...(ngDevMode ? [{ debugName: "_inactive" }] : /* istanbul ignore next */ []));
790
792
  _badgeClass = computed(() => {
791
793
  const t = resolveColor(this.badgeColor());