codexly-ui 0.10.6 → 0.10.7
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 +12 -4
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +12 -6
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -14081,6 +14081,11 @@ class ClxProductComponent {
|
|
|
14081
14081
|
layout = input('vertical', ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
14082
14082
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
14083
14083
|
clxColor = input('indigo', ...(ngDevMode ? [{ debugName: "clxColor" }] : /* istanbul ignore next */ []));
|
|
14084
|
+
/** 'cover' (default) fills the frame edge-to-edge, cropping overflow — right for photos shot to
|
|
14085
|
+
* fill the frame (apparel on a model). 'contain' keeps the whole image visible with padding
|
|
14086
|
+
* around it — right for products photographed against negative space (helmets, boxed goods),
|
|
14087
|
+
* where 'cover' would crop into the product itself. */
|
|
14088
|
+
imageFit = input('cover', ...(ngDevMode ? [{ debugName: "imageFit" }] : /* istanbul ignore next */ []));
|
|
14084
14089
|
addToCart = output();
|
|
14085
14090
|
addToWishlist = output();
|
|
14086
14091
|
PRODUCT_TAG_LABEL = PRODUCT_TAG_LABEL;
|
|
@@ -14098,6 +14103,9 @@ class ClxProductComponent {
|
|
|
14098
14103
|
_imageContainerClass = computed(() => this._h()
|
|
14099
14104
|
? `relative shrink-0 w-full aspect-square sm:aspect-auto ${this._sm() ? 'sm:w-32' : 'sm:w-44'} overflow-hidden rounded-t-2xl sm:rounded-t-none sm:rounded-l-2xl`
|
|
14100
14105
|
: 'relative w-full aspect-square overflow-hidden rounded-t-2xl', ...(ngDevMode ? [{ debugName: "_imageContainerClass" }] : /* istanbul ignore next */ []));
|
|
14106
|
+
_imageClass = computed(() => this.imageFit() === 'contain'
|
|
14107
|
+
? 'w-full h-full object-contain p-6 transition-transform duration-500 group-hover:scale-105'
|
|
14108
|
+
: 'w-full h-full object-cover transition-transform duration-500 group-hover:scale-105', ...(ngDevMode ? [{ debugName: "_imageClass" }] : /* istanbul ignore next */ []));
|
|
14101
14109
|
_contentClass = computed(() => 'flex flex-col gap-2 flex-1 p-3', ...(ngDevMode ? [{ debugName: "_contentClass" }] : /* istanbul ignore next */ []));
|
|
14102
14110
|
_actionsClass = computed(() => this._h()
|
|
14103
14111
|
? 'flex flex-col sm:flex-row items-stretch sm:items-center gap-2 mt-3'
|
|
@@ -14119,7 +14127,7 @@ class ClxProductComponent {
|
|
|
14119
14127
|
return `${sz} font-bold ${color}`;
|
|
14120
14128
|
}, ...(ngDevMode ? [{ debugName: "_priceClass" }] : /* istanbul ignore next */ []));
|
|
14121
14129
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxProductComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14122
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxProductComponent, isStandalone: true, selector: "clx-product", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, clxColor: { classPropertyName: "clxColor", publicName: "clxColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", addToWishlist: "addToWishlist" }, ngImport: i0, template: `
|
|
14130
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxProductComponent, isStandalone: true, selector: "clx-product", inputs: { product: { classPropertyName: "product", publicName: "product", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, clxColor: { classPropertyName: "clxColor", publicName: "clxColor", isSignal: true, isRequired: false, transformFunction: null }, imageFit: { classPropertyName: "imageFit", publicName: "imageFit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", addToWishlist: "addToWishlist" }, ngImport: i0, template: `
|
|
14123
14131
|
@if (loading()) {
|
|
14124
14132
|
@if (_h()) {
|
|
14125
14133
|
<!-- Skeleton Horizontal -->
|
|
@@ -14158,7 +14166,7 @@ class ClxProductComponent {
|
|
|
14158
14166
|
<img
|
|
14159
14167
|
[src]="product()!.main_image"
|
|
14160
14168
|
[alt]="product()!.name"
|
|
14161
|
-
class="
|
|
14169
|
+
[class]="_imageClass()"
|
|
14162
14170
|
[loading]="priority() ? 'eager' : 'lazy'"
|
|
14163
14171
|
/>
|
|
14164
14172
|
} @else {
|
|
@@ -14293,7 +14301,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
14293
14301
|
<img
|
|
14294
14302
|
[src]="product()!.main_image"
|
|
14295
14303
|
[alt]="product()!.name"
|
|
14296
|
-
class="
|
|
14304
|
+
[class]="_imageClass()"
|
|
14297
14305
|
[loading]="priority() ? 'eager' : 'lazy'"
|
|
14298
14306
|
/>
|
|
14299
14307
|
} @else {
|
|
@@ -14385,7 +14393,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
14385
14393
|
encapsulation: ViewEncapsulation.None,
|
|
14386
14394
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14387
14395
|
}]
|
|
14388
|
-
}], propDecorators: { product: [{ type: i0.Input, args: [{ isSignal: true, alias: "product", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], priority: [{ type: i0.Input, args: [{ isSignal: true, alias: "priority", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], clxColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "clxColor", required: false }] }], addToCart: [{ type: i0.Output, args: ["addToCart"] }], addToWishlist: [{ type: i0.Output, args: ["addToWishlist"] }] } });
|
|
14396
|
+
}], propDecorators: { product: [{ type: i0.Input, args: [{ isSignal: true, alias: "product", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], priority: [{ type: i0.Input, args: [{ isSignal: true, alias: "priority", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], clxColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "clxColor", required: false }] }], imageFit: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageFit", required: false }] }], addToCart: [{ type: i0.Output, args: ["addToCart"] }], addToWishlist: [{ type: i0.Output, args: ["addToWishlist"] }] } });
|
|
14389
14397
|
|
|
14390
14398
|
class ClxProductDetailComponent {
|
|
14391
14399
|
product = input(null, ...(ngDevMode ? [{ debugName: "product" }] : /* istanbul ignore next */ []));
|