codexly-ui 0.12.14 → 0.12.16
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 +53 -15
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +26 -3
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -13267,6 +13267,14 @@ class ClxFilterPanelComponent {
|
|
|
13267
13267
|
applyButtonSize = input('sm', ...(ngDevMode ? [{ debugName: "applyButtonSize" }] : /* istanbul ignore next */ []));
|
|
13268
13268
|
_color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
|
|
13269
13269
|
_applyButtonColor = computed(() => this.applyButtonColor() ?? this._color(), ...(ngDevMode ? [{ debugName: "_applyButtonColor" }] : /* istanbul ignore next */ []));
|
|
13270
|
+
/** Outer border — was a hardcoded border-clx-border (a fixed global CSS var, same gray in every
|
|
13271
|
+
* theme) instead of reading the theme like every other card-shaped component (clx-card,
|
|
13272
|
+
* clx-product, clx-wishlist, clx-notification all use cardBorderColor/borderLight). Now
|
|
13273
|
+
* consistent with those. */
|
|
13274
|
+
_hostClass = computed(() => {
|
|
13275
|
+
const t = resolveColor(this._themeSvc.cardBorderColor());
|
|
13276
|
+
return `flex flex-col bg-clx-surface border ${t.borderLight} rounded-xl overflow-hidden`;
|
|
13277
|
+
}, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
|
|
13270
13278
|
values = model({}, ...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
|
|
13271
13279
|
filterChange = output();
|
|
13272
13280
|
applyChange = output();
|
|
@@ -13351,7 +13359,7 @@ class ClxFilterPanelComponent {
|
|
|
13351
13359
|
return `text-xs px-1.5 py-0.5 rounded-full font-medium ${t.bgSubtle} ${t.textSubtle}`;
|
|
13352
13360
|
}
|
|
13353
13361
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxFilterPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13354
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxFilterPanelComponent, isStandalone: true, selector: "clx-filter-panel", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, showApply: { classPropertyName: "showApply", publicName: "showApply", isSignal: true, isRequired: false, transformFunction: null }, applyButtonColor: { classPropertyName: "applyButtonColor", publicName: "applyButtonColor", isSignal: true, isRequired: false, transformFunction: null }, applyButtonTextColor: { classPropertyName: "applyButtonTextColor", publicName: "applyButtonTextColor", isSignal: true, isRequired: false, transformFunction: null }, applyButtonSize: { classPropertyName: "applyButtonSize", publicName: "applyButtonSize", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { values: "valuesChange", filterChange: "filterChange", applyChange: "applyChange" }, host: {
|
|
13362
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxFilterPanelComponent, isStandalone: true, selector: "clx-filter-panel", inputs: { fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, showApply: { classPropertyName: "showApply", publicName: "showApply", isSignal: true, isRequired: false, transformFunction: null }, applyButtonColor: { classPropertyName: "applyButtonColor", publicName: "applyButtonColor", isSignal: true, isRequired: false, transformFunction: null }, applyButtonTextColor: { classPropertyName: "applyButtonTextColor", publicName: "applyButtonTextColor", isSignal: true, isRequired: false, transformFunction: null }, applyButtonSize: { classPropertyName: "applyButtonSize", publicName: "applyButtonSize", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { values: "valuesChange", filterChange: "filterChange", applyChange: "applyChange" }, host: { properties: { "class": "_hostClass()" } }, ngImport: i0, template: `
|
|
13355
13363
|
<!-- Header -->
|
|
13356
13364
|
<div class="flex items-center justify-between px-4 py-3 border-b border-clx-border-soft">
|
|
13357
13365
|
<div class="flex items-center gap-2">
|
|
@@ -13614,7 +13622,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
13614
13622
|
`,
|
|
13615
13623
|
encapsulation: ViewEncapsulation.None,
|
|
13616
13624
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13617
|
-
host: { class: '
|
|
13625
|
+
host: { '[class]': '_hostClass()' },
|
|
13618
13626
|
}]
|
|
13619
13627
|
}], propDecorators: { fields: [{ type: i0.Input, args: [{ isSignal: true, alias: "fields", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], showApply: [{ type: i0.Input, args: [{ isSignal: true, alias: "showApply", required: false }] }], applyButtonColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyButtonColor", required: false }] }], applyButtonTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyButtonTextColor", required: false }] }], applyButtonSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyButtonSize", required: false }] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: false }] }, { type: i0.Output, args: ["valuesChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], applyChange: [{ type: i0.Output, args: ["applyChange"] }] } });
|
|
13620
13628
|
|
|
@@ -15338,6 +15346,9 @@ class ClxProductComponent {
|
|
|
15338
15346
|
* variant="ghost" (text tinted at textSubtle strength, not a solid fill), so contrast risk is
|
|
15339
15347
|
* low, but this is still exposed for full parity with clx-product-detail/clx-wishlist. */
|
|
15340
15348
|
actionTextColor = input(undefined, ...(ngDevMode ? [{ debugName: "actionTextColor" }] : /* istanbul ignore next */ []));
|
|
15349
|
+
/** Card drop shadow — same ClxCardShadow scale as clx-card ('none' turns it off entirely).
|
|
15350
|
+
* Falls back to 'sm', the shadow this card has always rendered with. */
|
|
15351
|
+
shadow = input(undefined, ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
15341
15352
|
imageFit = input('cover', ...(ngDevMode ? [{ debugName: "imageFit" }] : /* istanbul ignore next */ []));
|
|
15342
15353
|
addToCart = output();
|
|
15343
15354
|
addToWishlist = output();
|
|
@@ -15361,9 +15372,10 @@ class ClxProductComponent {
|
|
|
15361
15372
|
* so a host that pins clxColor to a one-off brand accent doesn't also drag the card border
|
|
15362
15373
|
* along with it. */
|
|
15363
15374
|
_cardClass = computed(() => {
|
|
15364
|
-
const
|
|
15375
|
+
const shadowCls = CARD_SHADOW_MAP[this.shadow() ?? 'sm'];
|
|
15376
|
+
const hover = this._disabled() ? '' : (this.shadow() === 'none' ? 'hover:-translate-y-0.5' : 'hover:shadow-md hover:-translate-y-0.5');
|
|
15365
15377
|
const t = resolveColor(this._themeSvc.cardBorderColor());
|
|
15366
|
-
return `bg-clx-surface rounded-2xl
|
|
15378
|
+
return `bg-clx-surface rounded-2xl ${shadowCls} border ${t.borderLight} transition-[box-shadow,transform] duration-200 overflow-hidden group ${hover} ${this._h() ? 'flex flex-col sm:flex-row' : 'flex flex-col'}`;
|
|
15367
15379
|
}, ...(ngDevMode ? [{ debugName: "_cardClass" }] : /* istanbul ignore next */ []));
|
|
15368
15380
|
_imageContainerClass = computed(() => this._h()
|
|
15369
15381
|
? `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`
|
|
@@ -15395,7 +15407,7 @@ class ClxProductComponent {
|
|
|
15395
15407
|
return `${sz} font-bold ${color}`;
|
|
15396
15408
|
}, ...(ngDevMode ? [{ debugName: "_priceClass" }] : /* istanbul ignore next */ []));
|
|
15397
15409
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxProductComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15398
|
-
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 }, actionTextColor: { classPropertyName: "actionTextColor", publicName: "actionTextColor", isSignal: true, isRequired: false, transformFunction: null }, imageFit: { classPropertyName: "imageFit", publicName: "imageFit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", addToWishlist: "addToWishlist", viewOptions: "viewOptions" }, ngImport: i0, template: `
|
|
15410
|
+
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 }, actionTextColor: { classPropertyName: "actionTextColor", publicName: "actionTextColor", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, imageFit: { classPropertyName: "imageFit", publicName: "imageFit", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addToCart: "addToCart", addToWishlist: "addToWishlist", viewOptions: "viewOptions" }, ngImport: i0, template: `
|
|
15399
15411
|
@if (loading()) {
|
|
15400
15412
|
@if (_h()) {
|
|
15401
15413
|
<!-- Skeleton Horizontal -->
|
|
@@ -15665,7 +15677,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
15665
15677
|
encapsulation: ViewEncapsulation.None,
|
|
15666
15678
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15667
15679
|
}]
|
|
15668
|
-
}], 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 }] }], actionTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTextColor", 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"] }], viewOptions: [{ type: i0.Output, args: ["viewOptions"] }] } });
|
|
15680
|
+
}], 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 }] }], actionTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTextColor", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", 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"] }], viewOptions: [{ type: i0.Output, args: ["viewOptions"] }] } });
|
|
15669
15681
|
|
|
15670
15682
|
class ClxProductDetailComponent {
|
|
15671
15683
|
product = input(null, ...(ngDevMode ? [{ debugName: "product" }] : /* istanbul ignore next */ []));
|
|
@@ -16016,6 +16028,9 @@ class ClxWishlistComponent {
|
|
|
16016
16028
|
/** Text color for each item's own "Añadir al carrito" (variant="solid") — independent of
|
|
16017
16029
|
* `color`, same rationale as checkoutAllTextColor. */
|
|
16018
16030
|
addToCartTextColor = input(undefined, ...(ngDevMode ? [{ debugName: "addToCartTextColor" }] : /* istanbul ignore next */ []));
|
|
16031
|
+
/** Product card drop shadow — same ClxCardShadow scale as clx-card ('none' turns it off
|
|
16032
|
+
* entirely). Falls back to 'sm', the shadow these cards have always rendered with. */
|
|
16033
|
+
shadow = input(undefined, ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
16019
16034
|
sortOptions = input(WISHLIST_SORT_OPTIONS, ...(ngDevMode ? [{ debugName: "sortOptions" }] : /* istanbul ignore next */ []));
|
|
16020
16035
|
currentPage = model(1, ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
|
|
16021
16036
|
pageSize = model(WISHLIST_PAGE_SIZE_DEFAULT, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
@@ -16042,7 +16057,9 @@ class ClxWishlistComponent {
|
|
|
16042
16057
|
* along with it. */
|
|
16043
16058
|
_cardClass = computed(() => {
|
|
16044
16059
|
const t = resolveColor(this._themeSvc.cardBorderColor());
|
|
16045
|
-
|
|
16060
|
+
const shadowCls = CARD_SHADOW_MAP[this.shadow() ?? 'sm'];
|
|
16061
|
+
const hover = this.shadow() === 'none' ? 'hover:-translate-y-0.5' : 'hover:shadow-md hover:-translate-y-0.5';
|
|
16062
|
+
return `bg-clx-surface rounded-2xl ${shadowCls} border ${t.borderLight} transition-[box-shadow,transform] duration-200 overflow-hidden group ${hover} flex flex-col sm:flex-row`;
|
|
16046
16063
|
}, ...(ngDevMode ? [{ debugName: "_cardClass" }] : /* istanbul ignore next */ []));
|
|
16047
16064
|
_imageContainerClass = 'relative shrink-0 w-full p-2.5 aspect-square sm:aspect-auto sm:w-40 overflow-hidden rounded-t-2xl sm:rounded-t-none sm:rounded-l-2xl';
|
|
16048
16065
|
_imageClass = 'w-full h-full object-cover transition-transform duration-500 group-hover:scale-105';
|
|
@@ -16113,7 +16130,7 @@ class ClxWishlistComponent {
|
|
|
16113
16130
|
this.onCheckoutAll.emit(this._filtered());
|
|
16114
16131
|
}
|
|
16115
16132
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxWishlistComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16116
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxWishlistComponent, isStandalone: true, selector: "clx-wishlist", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, checkoutAllTextColor: { classPropertyName: "checkoutAllTextColor", publicName: "checkoutAllTextColor", isSignal: true, isRequired: false, transformFunction: null }, addToCartTextColor: { classPropertyName: "addToCartTextColor", publicName: "addToCartTextColor", isSignal: true, isRequired: false, transformFunction: null }, sortOptions: { classPropertyName: "sortOptions", publicName: "sortOptions", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, sortValue: { classPropertyName: "sortValue", publicName: "sortValue", isSignal: true, isRequired: false, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentPage: "currentPageChange", pageSize: "pageSizeChange", sortValue: "sortValueChange", searchValue: "searchValueChange", onRemove: "onRemove", onAddToCart: "onAddToCart", onSearchChange: "onSearchChange", onSortChange: "onSortChange", onPageChange: "onPageChange", onCheckoutAll: "onCheckoutAll", onBrowseCatalog: "onBrowseCatalog" }, ngImport: i0, template: `
|
|
16133
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxWishlistComponent, isStandalone: true, selector: "clx-wishlist", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, checkoutAllTextColor: { classPropertyName: "checkoutAllTextColor", publicName: "checkoutAllTextColor", isSignal: true, isRequired: false, transformFunction: null }, addToCartTextColor: { classPropertyName: "addToCartTextColor", publicName: "addToCartTextColor", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, sortOptions: { classPropertyName: "sortOptions", publicName: "sortOptions", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, sortValue: { classPropertyName: "sortValue", publicName: "sortValue", isSignal: true, isRequired: false, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentPage: "currentPageChange", pageSize: "pageSizeChange", sortValue: "sortValueChange", searchValue: "searchValueChange", onRemove: "onRemove", onAddToCart: "onAddToCart", onSearchChange: "onSearchChange", onSortChange: "onSortChange", onPageChange: "onPageChange", onCheckoutAll: "onCheckoutAll", onBrowseCatalog: "onBrowseCatalog" }, ngImport: i0, template: `
|
|
16117
16134
|
<div class="flex flex-col gap-6">
|
|
16118
16135
|
|
|
16119
16136
|
@if (loading() || items().length > 0) {
|
|
@@ -16516,7 +16533,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16516
16533
|
encapsulation: ViewEncapsulation.None,
|
|
16517
16534
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16518
16535
|
}]
|
|
16519
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], checkoutAllTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkoutAllTextColor", required: false }] }], addToCartTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "addToCartTextColor", required: false }] }], sortOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortOptions", required: false }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], sortValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortValue", required: false }] }, { type: i0.Output, args: ["sortValueChange"] }], searchValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchValue", required: false }] }, { type: i0.Output, args: ["searchValueChange"] }], onRemove: [{ type: i0.Output, args: ["onRemove"] }], onAddToCart: [{ type: i0.Output, args: ["onAddToCart"] }], onSearchChange: [{ type: i0.Output, args: ["onSearchChange"] }], onSortChange: [{ type: i0.Output, args: ["onSortChange"] }], onPageChange: [{ type: i0.Output, args: ["onPageChange"] }], onCheckoutAll: [{ type: i0.Output, args: ["onCheckoutAll"] }], onBrowseCatalog: [{ type: i0.Output, args: ["onBrowseCatalog"] }] } });
|
|
16536
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], checkoutAllTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkoutAllTextColor", required: false }] }], addToCartTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "addToCartTextColor", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], sortOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortOptions", required: false }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], sortValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortValue", required: false }] }, { type: i0.Output, args: ["sortValueChange"] }], searchValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchValue", required: false }] }, { type: i0.Output, args: ["searchValueChange"] }], onRemove: [{ type: i0.Output, args: ["onRemove"] }], onAddToCart: [{ type: i0.Output, args: ["onAddToCart"] }], onSearchChange: [{ type: i0.Output, args: ["onSearchChange"] }], onSortChange: [{ type: i0.Output, args: ["onSortChange"] }], onPageChange: [{ type: i0.Output, args: ["onPageChange"] }], onCheckoutAll: [{ type: i0.Output, args: ["onCheckoutAll"] }], onBrowseCatalog: [{ type: i0.Output, args: ["onBrowseCatalog"] }] } });
|
|
16520
16537
|
|
|
16521
16538
|
class ClxCartComponent {
|
|
16522
16539
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
@@ -16529,7 +16546,28 @@ class ClxCartComponent {
|
|
|
16529
16546
|
* showing a code input that always fails would read as broken, not "not built yet". */
|
|
16530
16547
|
showCoupon = input(true, ...(ngDevMode ? [{ debugName: "showCoupon" }] : /* istanbul ignore next */ []));
|
|
16531
16548
|
coupon = model(null, ...(ngDevMode ? [{ debugName: "coupon" }] : /* istanbul ignore next */ []));
|
|
16549
|
+
/** Drop shadow for the item cards and Order Summary panel — same ClxCardShadow scale as
|
|
16550
|
+
* clx-card ('none' turns it off entirely). Falls back to 'sm', the shadow these have always
|
|
16551
|
+
* rendered with. */
|
|
16552
|
+
shadow = input(undefined, ...(ngDevMode ? [{ debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
16553
|
+
_themeSvc = inject(ClxThemeService);
|
|
16532
16554
|
_quantityColor = computed(() => this.quantityColor() ?? this.color(), ...(ngDevMode ? [{ debugName: "_quantityColor" }] : /* istanbul ignore next */ []));
|
|
16555
|
+
/** Item cards — was bg-clx-surface + shadow-sm with NO border at all (unlike clx-product/
|
|
16556
|
+
* clx-wishlist, which already read cardBorderColor). Now consistent: themed border +
|
|
16557
|
+
* configurable shadow, same borderLight treatment as clx-card's own elevated variant. */
|
|
16558
|
+
_cardClass = computed(() => {
|
|
16559
|
+
const t = resolveColor(this._themeSvc.cardBorderColor());
|
|
16560
|
+
const shadowCls = CARD_SHADOW_MAP[this.shadow() ?? 'sm'];
|
|
16561
|
+
const hover = this.shadow() === 'none' ? 'hover:-translate-y-0.5' : 'hover:shadow-md hover:-translate-y-0.5';
|
|
16562
|
+
return `bg-clx-surface rounded-2xl ${shadowCls} border ${t.borderLight} flex gap-0 overflow-hidden group transition-[box-shadow,transform] duration-200 ${hover}`;
|
|
16563
|
+
}, ...(ngDevMode ? [{ debugName: "_cardClass" }] : /* istanbul ignore next */ []));
|
|
16564
|
+
/** Order Summary panel — same border/shadow treatment as _cardClass, but no hover lift (it's a
|
|
16565
|
+
* static panel, not a clickable card). */
|
|
16566
|
+
_summaryClass = computed(() => {
|
|
16567
|
+
const t = resolveColor(this._themeSvc.cardBorderColor());
|
|
16568
|
+
const shadowCls = CARD_SHADOW_MAP[this.shadow() ?? 'sm'];
|
|
16569
|
+
return `bg-clx-surface rounded-2xl ${shadowCls} border ${t.borderLight} p-5 flex flex-col gap-4`;
|
|
16570
|
+
}, ...(ngDevMode ? [{ debugName: "_summaryClass" }] : /* istanbul ignore next */ []));
|
|
16533
16571
|
onRemove = output();
|
|
16534
16572
|
onQuantityChange = output();
|
|
16535
16573
|
onClearCart = output();
|
|
@@ -16565,7 +16603,7 @@ class ClxCartComponent {
|
|
|
16565
16603
|
this.coupon.set(null);
|
|
16566
16604
|
}
|
|
16567
16605
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxCartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16568
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxCartComponent, isStandalone: true, selector: "clx-cart", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, quantityColor: { classPropertyName: "quantityColor", publicName: "quantityColor", isSignal: true, isRequired: false, transformFunction: null }, showCoupon: { classPropertyName: "showCoupon", publicName: "showCoupon", isSignal: true, isRequired: false, transformFunction: null }, coupon: { classPropertyName: "coupon", publicName: "coupon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { coupon: "couponChange", onRemove: "onRemove", onQuantityChange: "onQuantityChange", onClearCart: "onClearCart", onApplyCoupon: "onApplyCoupon", onCheckout: "onCheckout", onBrowseCatalog: "onBrowseCatalog" }, ngImport: i0, template: `
|
|
16606
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxCartComponent, isStandalone: true, selector: "clx-cart", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, quantityColor: { classPropertyName: "quantityColor", publicName: "quantityColor", isSignal: true, isRequired: false, transformFunction: null }, showCoupon: { classPropertyName: "showCoupon", publicName: "showCoupon", isSignal: true, isRequired: false, transformFunction: null }, coupon: { classPropertyName: "coupon", publicName: "coupon", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { coupon: "couponChange", onRemove: "onRemove", onQuantityChange: "onQuantityChange", onClearCart: "onClearCart", onApplyCoupon: "onApplyCoupon", onCheckout: "onCheckout", onBrowseCatalog: "onBrowseCatalog" }, ngImport: i0, template: `
|
|
16569
16607
|
<!-- ── Loading ─────────────────────────────────────────────────────────────── -->
|
|
16570
16608
|
@if (loading()) {
|
|
16571
16609
|
|
|
@@ -16629,7 +16667,7 @@ class ClxCartComponent {
|
|
|
16629
16667
|
|
|
16630
16668
|
<!-- Item cards -->
|
|
16631
16669
|
@for (item of items(); track item.id) {
|
|
16632
|
-
<article class="
|
|
16670
|
+
<article [class]="_cardClass()">
|
|
16633
16671
|
|
|
16634
16672
|
<!-- Image — fixed square -->
|
|
16635
16673
|
<div class="relative shrink-0 w-28 h-28 p-2.5 lg:w-36 lg:h-36 overflow-hidden">
|
|
@@ -16729,7 +16767,7 @@ class ClxCartComponent {
|
|
|
16729
16767
|
<!-- ══ RIGHT — Order Summary ══════════════════════════════════════════════ -->
|
|
16730
16768
|
<aside class="w-full lg:w-80 shrink-0 lg:sticky lg:top-6 flex flex-col gap-4">
|
|
16731
16769
|
|
|
16732
|
-
<div class="
|
|
16770
|
+
<div [class]="_summaryClass()">
|
|
16733
16771
|
<h2 class="text-base font-semibold text-clx-text-label">Order Summary</h2>
|
|
16734
16772
|
|
|
16735
16773
|
<!-- Coupon -->
|
|
@@ -16910,7 +16948,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16910
16948
|
|
|
16911
16949
|
<!-- Item cards -->
|
|
16912
16950
|
@for (item of items(); track item.id) {
|
|
16913
|
-
<article class="
|
|
16951
|
+
<article [class]="_cardClass()">
|
|
16914
16952
|
|
|
16915
16953
|
<!-- Image — fixed square -->
|
|
16916
16954
|
<div class="relative shrink-0 w-28 h-28 p-2.5 lg:w-36 lg:h-36 overflow-hidden">
|
|
@@ -17010,7 +17048,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
17010
17048
|
<!-- ══ RIGHT — Order Summary ══════════════════════════════════════════════ -->
|
|
17011
17049
|
<aside class="w-full lg:w-80 shrink-0 lg:sticky lg:top-6 flex flex-col gap-4">
|
|
17012
17050
|
|
|
17013
|
-
<div class="
|
|
17051
|
+
<div [class]="_summaryClass()">
|
|
17014
17052
|
<h2 class="text-base font-semibold text-clx-text-label">Order Summary</h2>
|
|
17015
17053
|
|
|
17016
17054
|
<!-- Coupon -->
|
|
@@ -17109,7 +17147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
17109
17147
|
}
|
|
17110
17148
|
`,
|
|
17111
17149
|
}]
|
|
17112
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], quantityColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "quantityColor", required: false }] }], showCoupon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCoupon", required: false }] }], coupon: [{ type: i0.Input, args: [{ isSignal: true, alias: "coupon", required: false }] }, { type: i0.Output, args: ["couponChange"] }], onRemove: [{ type: i0.Output, args: ["onRemove"] }], onQuantityChange: [{ type: i0.Output, args: ["onQuantityChange"] }], onClearCart: [{ type: i0.Output, args: ["onClearCart"] }], onApplyCoupon: [{ type: i0.Output, args: ["onApplyCoupon"] }], onCheckout: [{ type: i0.Output, args: ["onCheckout"] }], onBrowseCatalog: [{ type: i0.Output, args: ["onBrowseCatalog"] }] } });
|
|
17150
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], quantityColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "quantityColor", required: false }] }], showCoupon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCoupon", required: false }] }], coupon: [{ type: i0.Input, args: [{ isSignal: true, alias: "coupon", required: false }] }, { type: i0.Output, args: ["couponChange"] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], onRemove: [{ type: i0.Output, args: ["onRemove"] }], onQuantityChange: [{ type: i0.Output, args: ["onQuantityChange"] }], onClearCart: [{ type: i0.Output, args: ["onClearCart"] }], onApplyCoupon: [{ type: i0.Output, args: ["onApplyCoupon"] }], onCheckout: [{ type: i0.Output, args: ["onCheckout"] }], onBrowseCatalog: [{ type: i0.Output, args: ["onBrowseCatalog"] }] } });
|
|
17113
17151
|
|
|
17114
17152
|
class ClxCartSummaryDrawer {
|
|
17115
17153
|
data = inject(CLX_MODAL_DATA);
|