codexly-ui 0.10.6 → 0.10.8
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 +19 -5
- 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;
|
|
@@ -14094,10 +14099,19 @@ class ClxProductComponent {
|
|
|
14094
14099
|
_buttonSize = computed(() => this._sm() ? 'sm' : 'md', ...(ngDevMode ? [{ debugName: "_buttonSize" }] : /* istanbul ignore next */ []));
|
|
14095
14100
|
_skeletonW = computed(() => this._sm() ? 'sm:w-32' : 'sm:w-44', ...(ngDevMode ? [{ debugName: "_skeletonW" }] : /* istanbul ignore next */ []));
|
|
14096
14101
|
_skeletonH = computed(() => this._sm() ? '160px' : '200px', ...(ngDevMode ? [{ debugName: "_skeletonH" }] : /* istanbul ignore next */ []));
|
|
14097
|
-
_cardClass = computed(() =>
|
|
14102
|
+
_cardClass = computed(() => {
|
|
14103
|
+
const hover = this._disabled() ? '' : 'hover:shadow-xl hover:-translate-y-0.5';
|
|
14104
|
+
return `bg-clx-surface rounded-2xl shadow-sm transition-[box-shadow,transform] duration-300 overflow-hidden group ${hover} ${this._h() ? 'flex flex-col sm:flex-row' : 'flex flex-col'}`;
|
|
14105
|
+
}, ...(ngDevMode ? [{ debugName: "_cardClass" }] : /* istanbul ignore next */ []));
|
|
14098
14106
|
_imageContainerClass = computed(() => this._h()
|
|
14099
14107
|
? `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
14108
|
: 'relative w-full aspect-square overflow-hidden rounded-t-2xl', ...(ngDevMode ? [{ debugName: "_imageContainerClass" }] : /* istanbul ignore next */ []));
|
|
14109
|
+
_imageClass = computed(() => {
|
|
14110
|
+
const zoom = this._disabled() ? '' : 'group-hover:scale-105';
|
|
14111
|
+
return this.imageFit() === 'contain'
|
|
14112
|
+
? `w-full h-full object-contain p-6 transition-transform duration-500 ${zoom}`
|
|
14113
|
+
: `w-full h-full object-cover transition-transform duration-500 ${zoom}`;
|
|
14114
|
+
}, ...(ngDevMode ? [{ debugName: "_imageClass" }] : /* istanbul ignore next */ []));
|
|
14101
14115
|
_contentClass = computed(() => 'flex flex-col gap-2 flex-1 p-3', ...(ngDevMode ? [{ debugName: "_contentClass" }] : /* istanbul ignore next */ []));
|
|
14102
14116
|
_actionsClass = computed(() => this._h()
|
|
14103
14117
|
? 'flex flex-col sm:flex-row items-stretch sm:items-center gap-2 mt-3'
|
|
@@ -14119,7 +14133,7 @@ class ClxProductComponent {
|
|
|
14119
14133
|
return `${sz} font-bold ${color}`;
|
|
14120
14134
|
}, ...(ngDevMode ? [{ debugName: "_priceClass" }] : /* istanbul ignore next */ []));
|
|
14121
14135
|
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: `
|
|
14136
|
+
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
14137
|
@if (loading()) {
|
|
14124
14138
|
@if (_h()) {
|
|
14125
14139
|
<!-- Skeleton Horizontal -->
|
|
@@ -14158,7 +14172,7 @@ class ClxProductComponent {
|
|
|
14158
14172
|
<img
|
|
14159
14173
|
[src]="product()!.main_image"
|
|
14160
14174
|
[alt]="product()!.name"
|
|
14161
|
-
class="
|
|
14175
|
+
[class]="_imageClass()"
|
|
14162
14176
|
[loading]="priority() ? 'eager' : 'lazy'"
|
|
14163
14177
|
/>
|
|
14164
14178
|
} @else {
|
|
@@ -14293,7 +14307,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
14293
14307
|
<img
|
|
14294
14308
|
[src]="product()!.main_image"
|
|
14295
14309
|
[alt]="product()!.name"
|
|
14296
|
-
class="
|
|
14310
|
+
[class]="_imageClass()"
|
|
14297
14311
|
[loading]="priority() ? 'eager' : 'lazy'"
|
|
14298
14312
|
/>
|
|
14299
14313
|
} @else {
|
|
@@ -14385,7 +14399,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
14385
14399
|
encapsulation: ViewEncapsulation.None,
|
|
14386
14400
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14387
14401
|
}]
|
|
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"] }] } });
|
|
14402
|
+
}], 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
14403
|
|
|
14390
14404
|
class ClxProductDetailComponent {
|
|
14391
14405
|
product = input(null, ...(ngDevMode ? [{ debugName: "product" }] : /* istanbul ignore next */ []));
|