codexly-ui 0.12.7 → 0.12.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 +34 -17
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +15 -2
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -15331,9 +15331,12 @@ class ClxProductComponent {
|
|
|
15331
15331
|
_buttonSize = computed(() => this._sm() ? 'sm' : 'md', ...(ngDevMode ? [{ debugName: "_buttonSize" }] : /* istanbul ignore next */ []));
|
|
15332
15332
|
_skeletonW = computed(() => this._sm() ? 'sm:w-32' : 'sm:w-44', ...(ngDevMode ? [{ debugName: "_skeletonW" }] : /* istanbul ignore next */ []));
|
|
15333
15333
|
_skeletonH = computed(() => this._sm() ? '160px' : '200px', ...(ngDevMode ? [{ debugName: "_skeletonH" }] : /* istanbul ignore next */ []));
|
|
15334
|
+
/** Themed border — same accent as the rest of the card (clxColor), same borderLight treatment
|
|
15335
|
+
* as clx-card's own elevated variant. */
|
|
15334
15336
|
_cardClass = computed(() => {
|
|
15335
15337
|
const hover = this._disabled() ? '' : 'hover:shadow-md hover:-translate-y-0.5';
|
|
15336
|
-
|
|
15338
|
+
const t = resolveColor(this.clxColor());
|
|
15339
|
+
return `bg-clx-surface rounded-2xl shadow-sm border ${t.borderLight} transition-[box-shadow,transform] duration-200 overflow-hidden group ${hover} ${this._h() ? 'flex flex-col sm:flex-row' : 'flex flex-col'}`;
|
|
15337
15340
|
}, ...(ngDevMode ? [{ debugName: "_cardClass" }] : /* istanbul ignore next */ []));
|
|
15338
15341
|
_imageContainerClass = computed(() => this._h()
|
|
15339
15342
|
? `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`
|
|
@@ -15944,9 +15947,15 @@ const WISHLIST_SORT_OPTIONS = [
|
|
|
15944
15947
|
];
|
|
15945
15948
|
|
|
15946
15949
|
class ClxWishlistComponent {
|
|
15950
|
+
_themeSvc = inject(ClxThemeService);
|
|
15947
15951
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
15948
15952
|
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
15949
|
-
|
|
15953
|
+
/** Optional per-instance override — when unset, every zone below resolves independently from
|
|
15954
|
+
* the app-wide theme (search input from formControls.input, "Agregar todo"/badge/"Añadir al
|
|
15955
|
+
* carrito" from primaryColor, pagination from its own paginationStyle()), same convention as
|
|
15956
|
+
* clx-input/clx-select/clx-pagination themselves. Previously this was a required-looking input
|
|
15957
|
+
* defaulting to a hardcoded 'indigo' that every zone read directly, bypassing theme entirely. */
|
|
15958
|
+
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
15950
15959
|
sortOptions = input(WISHLIST_SORT_OPTIONS, ...(ngDevMode ? [{ debugName: "sortOptions" }] : /* istanbul ignore next */ []));
|
|
15951
15960
|
currentPage = model(1, ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
|
|
15952
15961
|
pageSize = model(WISHLIST_PAGE_SIZE_DEFAULT, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
@@ -15954,6 +15963,9 @@ class ClxWishlistComponent {
|
|
|
15954
15963
|
searchValue = model('', ...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
15955
15964
|
_searchModel = '';
|
|
15956
15965
|
_sortModel = null;
|
|
15966
|
+
_inputColor = computed(() => this.color() ?? this._themeSvc.formControlColor('input'), ...(ngDevMode ? [{ debugName: "_inputColor" }] : /* istanbul ignore next */ []));
|
|
15967
|
+
_selectColor = computed(() => this.color() ?? this._themeSvc.formControlColor('select'), ...(ngDevMode ? [{ debugName: "_selectColor" }] : /* istanbul ignore next */ []));
|
|
15968
|
+
_accentColor = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_accentColor" }] : /* istanbul ignore next */ []));
|
|
15957
15969
|
onRemove = output();
|
|
15958
15970
|
onAddToCart = output();
|
|
15959
15971
|
onSearchChange = output();
|
|
@@ -15963,7 +15975,12 @@ class ClxWishlistComponent {
|
|
|
15963
15975
|
/** Emitted from the empty-state's "Ir a la tienda" CTA — the host navigates to the catalog. */
|
|
15964
15976
|
onBrowseCatalog = output();
|
|
15965
15977
|
_skeletonItems = Array.from({ length: 6 });
|
|
15966
|
-
|
|
15978
|
+
/** Themed border — falls back to cardBorderColor() (itself falling back to primaryColor) when
|
|
15979
|
+
* `color` is unset, same borderLight treatment as clx-card's own elevated variant. */
|
|
15980
|
+
_cardClass = computed(() => {
|
|
15981
|
+
const t = resolveColor(this.color() ?? this._themeSvc.cardBorderColor());
|
|
15982
|
+
return `bg-clx-surface rounded-2xl shadow-sm border ${t.borderLight} transition-[box-shadow,transform] duration-200 overflow-hidden group hover:shadow-md hover:-translate-y-0.5 flex flex-col sm:flex-row`;
|
|
15983
|
+
}, ...(ngDevMode ? [{ debugName: "_cardClass" }] : /* istanbul ignore next */ []));
|
|
15967
15984
|
_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';
|
|
15968
15985
|
_imageClass = 'w-full h-full object-cover transition-transform duration-500 group-hover:scale-105';
|
|
15969
15986
|
_contentClass = 'relative flex flex-col gap-2 flex-1 p-3 min-w-0';
|
|
@@ -16045,7 +16062,7 @@ class ClxWishlistComponent {
|
|
|
16045
16062
|
placeholder="Search Here"
|
|
16046
16063
|
prefixIcon="search"
|
|
16047
16064
|
size="md"
|
|
16048
|
-
[color]="
|
|
16065
|
+
[color]="_inputColor()"
|
|
16049
16066
|
[(ngModel)]="_searchModel"
|
|
16050
16067
|
(ngModelChange)="handleSearch($event)"
|
|
16051
16068
|
/>
|
|
@@ -16054,7 +16071,7 @@ class ClxWishlistComponent {
|
|
|
16054
16071
|
<clx-select
|
|
16055
16072
|
placeholder="Sort By"
|
|
16056
16073
|
[options]="sortOptions()"
|
|
16057
|
-
[activeColor]="
|
|
16074
|
+
[activeColor]="_selectColor()"
|
|
16058
16075
|
size="md"
|
|
16059
16076
|
[(ngModel)]="_sortModel"
|
|
16060
16077
|
(ngModelChange)="handleSort($event)"
|
|
@@ -16066,13 +16083,13 @@ class ClxWishlistComponent {
|
|
|
16066
16083
|
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
|
16067
16084
|
<div class="flex items-center gap-2">
|
|
16068
16085
|
<h2 class="text-base font-semibold text-clx-text-label">Productos</h2>
|
|
16069
|
-
<span clx-badge variant="light" [color]="
|
|
16086
|
+
<span clx-badge variant="light" [color]="_accentColor()" size="sm">{{ _totalItems() }}</span>
|
|
16070
16087
|
</div>
|
|
16071
16088
|
<button
|
|
16072
16089
|
clx-button
|
|
16073
16090
|
type="button"
|
|
16074
16091
|
variant="light"
|
|
16075
|
-
[color]="
|
|
16092
|
+
[color]="_accentColor()"
|
|
16076
16093
|
icon="arrow_forward"
|
|
16077
16094
|
iconPosition="right"
|
|
16078
16095
|
[disabled]="_totalItems() === 0"
|
|
@@ -16106,7 +16123,7 @@ class ClxWishlistComponent {
|
|
|
16106
16123
|
icon="favorite"
|
|
16107
16124
|
heading="Sin favoritos"
|
|
16108
16125
|
description="No tienes productos guardados."
|
|
16109
|
-
[ctaColor]="
|
|
16126
|
+
[ctaColor]="_accentColor()"
|
|
16110
16127
|
ctaIcon="storefront"
|
|
16111
16128
|
ctaLabel="Ir a la tienda"
|
|
16112
16129
|
(cta)="onBrowseCatalog.emit()">
|
|
@@ -16117,7 +16134,7 @@ class ClxWishlistComponent {
|
|
|
16117
16134
|
<div class="grid grid-cols-1 xl:grid-cols-2 gap-4">
|
|
16118
16135
|
@for (item of _pagedItems(); track item.id; let first = $first) {
|
|
16119
16136
|
<!-- misma estructura y clases que clx-product layout=horizontal -->
|
|
16120
|
-
<article [class]="_cardClass">
|
|
16137
|
+
<article [class]="_cardClass()">
|
|
16121
16138
|
|
|
16122
16139
|
<!-- Image Container -->
|
|
16123
16140
|
<div [class]="_imageContainerClass">
|
|
@@ -16188,7 +16205,7 @@ class ClxWishlistComponent {
|
|
|
16188
16205
|
<button
|
|
16189
16206
|
clx-button
|
|
16190
16207
|
type="button"
|
|
16191
|
-
[color]="
|
|
16208
|
+
[color]="_accentColor()"
|
|
16192
16209
|
variant="solid"
|
|
16193
16210
|
size="md"
|
|
16194
16211
|
icon="shopping_cart"
|
|
@@ -16252,7 +16269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16252
16269
|
placeholder="Search Here"
|
|
16253
16270
|
prefixIcon="search"
|
|
16254
16271
|
size="md"
|
|
16255
|
-
[color]="
|
|
16272
|
+
[color]="_inputColor()"
|
|
16256
16273
|
[(ngModel)]="_searchModel"
|
|
16257
16274
|
(ngModelChange)="handleSearch($event)"
|
|
16258
16275
|
/>
|
|
@@ -16261,7 +16278,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16261
16278
|
<clx-select
|
|
16262
16279
|
placeholder="Sort By"
|
|
16263
16280
|
[options]="sortOptions()"
|
|
16264
|
-
[activeColor]="
|
|
16281
|
+
[activeColor]="_selectColor()"
|
|
16265
16282
|
size="md"
|
|
16266
16283
|
[(ngModel)]="_sortModel"
|
|
16267
16284
|
(ngModelChange)="handleSort($event)"
|
|
@@ -16273,13 +16290,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16273
16290
|
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
|
16274
16291
|
<div class="flex items-center gap-2">
|
|
16275
16292
|
<h2 class="text-base font-semibold text-clx-text-label">Productos</h2>
|
|
16276
|
-
<span clx-badge variant="light" [color]="
|
|
16293
|
+
<span clx-badge variant="light" [color]="_accentColor()" size="sm">{{ _totalItems() }}</span>
|
|
16277
16294
|
</div>
|
|
16278
16295
|
<button
|
|
16279
16296
|
clx-button
|
|
16280
16297
|
type="button"
|
|
16281
16298
|
variant="light"
|
|
16282
|
-
[color]="
|
|
16299
|
+
[color]="_accentColor()"
|
|
16283
16300
|
icon="arrow_forward"
|
|
16284
16301
|
iconPosition="right"
|
|
16285
16302
|
[disabled]="_totalItems() === 0"
|
|
@@ -16313,7 +16330,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16313
16330
|
icon="favorite"
|
|
16314
16331
|
heading="Sin favoritos"
|
|
16315
16332
|
description="No tienes productos guardados."
|
|
16316
|
-
[ctaColor]="
|
|
16333
|
+
[ctaColor]="_accentColor()"
|
|
16317
16334
|
ctaIcon="storefront"
|
|
16318
16335
|
ctaLabel="Ir a la tienda"
|
|
16319
16336
|
(cta)="onBrowseCatalog.emit()">
|
|
@@ -16324,7 +16341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16324
16341
|
<div class="grid grid-cols-1 xl:grid-cols-2 gap-4">
|
|
16325
16342
|
@for (item of _pagedItems(); track item.id; let first = $first) {
|
|
16326
16343
|
<!-- misma estructura y clases que clx-product layout=horizontal -->
|
|
16327
|
-
<article [class]="_cardClass">
|
|
16344
|
+
<article [class]="_cardClass()">
|
|
16328
16345
|
|
|
16329
16346
|
<!-- Image Container -->
|
|
16330
16347
|
<div [class]="_imageContainerClass">
|
|
@@ -16395,7 +16412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16395
16412
|
<button
|
|
16396
16413
|
clx-button
|
|
16397
16414
|
type="button"
|
|
16398
|
-
[color]="
|
|
16415
|
+
[color]="_accentColor()"
|
|
16399
16416
|
variant="solid"
|
|
16400
16417
|
size="md"
|
|
16401
16418
|
icon="shopping_cart"
|