codexly-ui 0.19.3 → 0.19.5
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/fesm2022/codexly-ui.mjs +20 -10
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +11 -11
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, inject, PLATFORM_ID, signal, effect, Injectable, ElementRef, HostAttributeToken, output, Directive, forwardRef, contentChild, model, ApplicationRef, EnvironmentInjector, RendererFactory2, createComponent, DestroyRef, untracked, ViewChildren, HostListener, viewChild, ViewChild, Injector, ChangeDetectorRef, NgZone, contentChildren, ContentChildren, numberAttribute, booleanAttribute, Input } from '@angular/core';
|
|
3
3
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
-
import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT, NgStyle, CurrencyPipe, DecimalPipe } from '@angular/common';
|
|
4
|
+
import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT, NgStyle, NgOptimizedImage, CurrencyPipe, DecimalPipe } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormControl, NgControl, TouchedChangeEvent, ReactiveFormsModule, FormGroup, Validators, FormsModule } from '@angular/forms';
|
|
7
7
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -3129,7 +3129,15 @@ class ClxTooltipDirective {
|
|
|
3129
3129
|
const { signal } = this._abort;
|
|
3130
3130
|
host.addEventListener('mouseenter', () => this._scheduleShow(), { signal });
|
|
3131
3131
|
host.addEventListener('mouseleave', () => this._scheduleHide(), { signal });
|
|
3132
|
-
|
|
3132
|
+
// :focus-visible, not a bare 'focus' check — a modal/drawer restores focus to its trigger
|
|
3133
|
+
// button programmatically when it closes (standard a11y behavior), which fires 'focus' on
|
|
3134
|
+
// this host with no real hover/keyboard interaction behind it. That reopened the tooltip and
|
|
3135
|
+
// left it stuck floating over the page after the modal was dismissed. :focus-visible only
|
|
3136
|
+
// matches when the browser itself determines the focus came from keyboard navigation, not
|
|
3137
|
+
// from a programmatic .focus() call or a mouse/touch click — exactly the real-vs-restored
|
|
3138
|
+
// distinction needed here.
|
|
3139
|
+
host.addEventListener('focus', () => { if (host.matches(':focus-visible'))
|
|
3140
|
+
this._scheduleShow(); }, { signal });
|
|
3133
3141
|
host.addEventListener('blur', () => this._scheduleHide(), { signal });
|
|
3134
3142
|
// Touch devices fire 'mouseenter'/'focus' on tap but never a real
|
|
3135
3143
|
// 'mouseleave' — dismiss immediately (no fade) so the bubble can't
|
|
@@ -17118,12 +17126,13 @@ class ClxProductComponent {
|
|
|
17118
17126
|
|
|
17119
17127
|
<!-- Image Container -->
|
|
17120
17128
|
<div [class]="_imageContainerClass()">
|
|
17121
|
-
@if (product()?.main_image) {
|
|
17129
|
+
@if (product()?.main_image; as mainImage) {
|
|
17122
17130
|
<img
|
|
17123
|
-
[
|
|
17131
|
+
[ngSrc]="mainImage"
|
|
17124
17132
|
[alt]="product()!.name"
|
|
17125
17133
|
[class]="_imageClass()"
|
|
17126
|
-
[
|
|
17134
|
+
[priority]="priority()"
|
|
17135
|
+
fill
|
|
17127
17136
|
/>
|
|
17128
17137
|
} @else {
|
|
17129
17138
|
<div class="w-full h-full flex items-center justify-center bg-clx-surface-2">
|
|
@@ -17212,14 +17221,14 @@ class ClxProductComponent {
|
|
|
17212
17221
|
</div>
|
|
17213
17222
|
</article>
|
|
17214
17223
|
}
|
|
17215
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ClxBadgeComponent, selector: "span[clx-badge]", inputs: ["variant", "color", "size", "shape", "positioned"] }, { kind: "component", type: ClxButtonComponent, selector: "button[clx-button], a[clx-button]", inputs: ["variant", "color", "emphasis", "textColor", "size", "shape", "loading", "disabled", "block", "icon", "iconPosition", "iconOnly", "badge", "badgeColor"] }, { kind: "component", type: ClxSkeletonComponent, selector: "clx-skeleton", inputs: ["variant", "size", "width", "height"] }, { kind: "directive", type: ClxTooltipDirective, selector: "[clxTooltip]", inputs: ["clxTooltip", "clxTooltipPosition", "clxTooltipColor", "clxTooltipSize", "clxTooltipDelay"] }, { kind: "pipe", type: CurrencyPipe, name: "currency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
17224
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "component", type: ClxBadgeComponent, selector: "span[clx-badge]", inputs: ["variant", "color", "size", "shape", "positioned"] }, { kind: "component", type: ClxButtonComponent, selector: "button[clx-button], a[clx-button]", inputs: ["variant", "color", "emphasis", "textColor", "size", "shape", "loading", "disabled", "block", "icon", "iconPosition", "iconOnly", "badge", "badgeColor"] }, { kind: "component", type: ClxSkeletonComponent, selector: "clx-skeleton", inputs: ["variant", "size", "width", "height"] }, { kind: "directive", type: ClxTooltipDirective, selector: "[clxTooltip]", inputs: ["clxTooltip", "clxTooltipPosition", "clxTooltipColor", "clxTooltipSize", "clxTooltipDelay"] }, { kind: "pipe", type: CurrencyPipe, name: "currency" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
17216
17225
|
}
|
|
17217
17226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxProductComponent, decorators: [{
|
|
17218
17227
|
type: Component,
|
|
17219
17228
|
args: [{
|
|
17220
17229
|
selector: 'clx-product',
|
|
17221
17230
|
standalone: true,
|
|
17222
|
-
imports: [CurrencyPipe, ClxBadgeComponent, ClxButtonComponent, ClxSkeletonComponent, ClxTooltipDirective],
|
|
17231
|
+
imports: [CurrencyPipe, NgOptimizedImage, ClxBadgeComponent, ClxButtonComponent, ClxSkeletonComponent, ClxTooltipDirective],
|
|
17223
17232
|
template: `
|
|
17224
17233
|
@if (loading()) {
|
|
17225
17234
|
@if (_h()) {
|
|
@@ -17255,12 +17264,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
17255
17264
|
|
|
17256
17265
|
<!-- Image Container -->
|
|
17257
17266
|
<div [class]="_imageContainerClass()">
|
|
17258
|
-
@if (product()?.main_image) {
|
|
17267
|
+
@if (product()?.main_image; as mainImage) {
|
|
17259
17268
|
<img
|
|
17260
|
-
[
|
|
17269
|
+
[ngSrc]="mainImage"
|
|
17261
17270
|
[alt]="product()!.name"
|
|
17262
17271
|
[class]="_imageClass()"
|
|
17263
|
-
[
|
|
17272
|
+
[priority]="priority()"
|
|
17273
|
+
fill
|
|
17264
17274
|
/>
|
|
17265
17275
|
} @else {
|
|
17266
17276
|
<div class="w-full h-full flex items-center justify-center bg-clx-surface-2">
|