codexly-ui 0.12.26 → 0.12.28
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 +48 -20
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +12 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -9927,7 +9927,7 @@ class ClxWizardComponent {
|
|
|
9927
9927
|
<button
|
|
9928
9928
|
clx-button
|
|
9929
9929
|
type="button"
|
|
9930
|
-
|
|
9930
|
+
emphasis="secondary"
|
|
9931
9931
|
variant="ghost"
|
|
9932
9932
|
size="sm"
|
|
9933
9933
|
icon="arrow_back"
|
|
@@ -10035,7 +10035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
10035
10035
|
<button
|
|
10036
10036
|
clx-button
|
|
10037
10037
|
type="button"
|
|
10038
|
-
|
|
10038
|
+
emphasis="secondary"
|
|
10039
10039
|
variant="ghost"
|
|
10040
10040
|
size="sm"
|
|
10041
10041
|
icon="arrow_back"
|
|
@@ -13287,6 +13287,15 @@ class ClxFilterPanelComponent {
|
|
|
13287
13287
|
* resolution untouched. */
|
|
13288
13288
|
applyButtonTextColor = input(undefined, ...(ngDevMode ? [{ debugName: "applyButtonTextColor" }] : /* istanbul ignore next */ []));
|
|
13289
13289
|
applyButtonSize = input('sm', ...(ngDevMode ? [{ debugName: "applyButtonSize" }] : /* istanbul ignore next */ []));
|
|
13290
|
+
/** Lets the whole panel collapse down to just its "Filtros" header row (click to toggle) — for
|
|
13291
|
+
* narrow layouts where a host wants to reclaim vertical space once the visitor is done
|
|
13292
|
+
* adjusting filters, without unmounting the panel (its field values/expand-state are preserved
|
|
13293
|
+
* underneath, just hidden). False (the default) keeps the current always-expanded behavior. */
|
|
13294
|
+
collapsible = input(false, ...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
|
|
13295
|
+
/** Two-way — a host can control/observe collapse state (e.g. persist it, or start collapsed on
|
|
13296
|
+
* mobile) as well as let the header click toggle it internally. Only takes effect when
|
|
13297
|
+
* collapsible() is true; the header row itself is always visible regardless. */
|
|
13298
|
+
panelCollapsed = model(false, ...(ngDevMode ? [{ debugName: "panelCollapsed" }] : /* istanbul ignore next */ []));
|
|
13290
13299
|
_color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
|
|
13291
13300
|
_applyButtonColor = computed(() => this.applyButtonColor() ?? this._color(), ...(ngDevMode ? [{ debugName: "_applyButtonColor" }] : /* istanbul ignore next */ []));
|
|
13292
13301
|
/** Outer border — was a hardcoded border-clx-border (a fixed global CSS var, same gray in every
|
|
@@ -13297,6 +13306,15 @@ class ClxFilterPanelComponent {
|
|
|
13297
13306
|
const t = resolveColor(this._themeSvc.cardBorderColor());
|
|
13298
13307
|
return `flex flex-col bg-clx-surface border ${t.borderLight} rounded-xl overflow-hidden`;
|
|
13299
13308
|
}, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
|
|
13309
|
+
_headerClass = computed(() => {
|
|
13310
|
+
const base = 'flex items-center justify-between px-4 py-3';
|
|
13311
|
+
const border = this.panelCollapsed() ? '' : ' border-b border-clx-border-soft';
|
|
13312
|
+
const clickable = this.collapsible() ? ' cursor-pointer select-none' : '';
|
|
13313
|
+
return base + border + clickable;
|
|
13314
|
+
}, ...(ngDevMode ? [{ debugName: "_headerClass" }] : /* istanbul ignore next */ []));
|
|
13315
|
+
_togglePanel() {
|
|
13316
|
+
this.panelCollapsed.update(v => !v);
|
|
13317
|
+
}
|
|
13300
13318
|
values = model({}, ...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
|
|
13301
13319
|
filterChange = output();
|
|
13302
13320
|
applyChange = output();
|
|
@@ -13381,24 +13399,28 @@ class ClxFilterPanelComponent {
|
|
|
13381
13399
|
return `text-xs px-1.5 py-0.5 rounded-full font-medium ${t.bgSubtle} ${t.textSubtle}`;
|
|
13382
13400
|
}
|
|
13383
13401
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxFilterPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13384
|
-
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: `
|
|
13402
|
+
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 }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, panelCollapsed: { classPropertyName: "panelCollapsed", publicName: "panelCollapsed", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { panelCollapsed: "panelCollapsedChange", values: "valuesChange", filterChange: "filterChange", applyChange: "applyChange" }, host: { properties: { "class": "_hostClass()" } }, ngImport: i0, template: `
|
|
13385
13403
|
<!-- Header -->
|
|
13386
|
-
<div class="
|
|
13404
|
+
<div [class]="_headerClass()" (click)="collapsible() ? _togglePanel() : null">
|
|
13387
13405
|
<div class="flex items-center gap-2">
|
|
13406
|
+
@if (collapsible()) {
|
|
13407
|
+
<span clx-icon [name]="panelCollapsed() ? 'expand_more' : 'expand_less'" size="sm" class="text-clx-text-subtle"></span>
|
|
13408
|
+
}
|
|
13388
13409
|
<span clx-icon name="filter_list" size="sm" class="text-clx-text-subtle"></span>
|
|
13389
13410
|
<span class="text-sm font-semibold text-clx-text-label">Filtros</span>
|
|
13390
13411
|
@if (_activeCount() > 0) {
|
|
13391
13412
|
<span [class]="_badgeCls()">{{ _activeCount() }}</span>
|
|
13392
13413
|
}
|
|
13393
13414
|
</div>
|
|
13394
|
-
@if (_activeCount() > 0) {
|
|
13395
|
-
<button clx-button type="button" variant="ghost" color="slate" size="sm" (click)="_reset()">
|
|
13415
|
+
@if (_activeCount() > 0 && !panelCollapsed()) {
|
|
13416
|
+
<button clx-button type="button" variant="ghost" color="slate" size="sm" (click)="$event.stopPropagation(); _reset()">
|
|
13396
13417
|
Limpiar
|
|
13397
13418
|
</button>
|
|
13398
13419
|
}
|
|
13399
13420
|
</div>
|
|
13400
13421
|
|
|
13401
13422
|
<!-- Fields -->
|
|
13423
|
+
@if (!panelCollapsed()) {
|
|
13402
13424
|
<div class="overflow-y-auto flex-1">
|
|
13403
13425
|
@for (field of fields(); track field.key) {
|
|
13404
13426
|
<div class="border-b border-clx-border-soft last:border-0">
|
|
@@ -13507,6 +13529,7 @@ class ClxFilterPanelComponent {
|
|
|
13507
13529
|
</button>
|
|
13508
13530
|
</div>
|
|
13509
13531
|
}
|
|
13532
|
+
}
|
|
13510
13533
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }, { 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: ClxCheckboxComponent, selector: "clx-checkbox", inputs: ["color", "variant", "size", "label", "value", "disabled"] }, { kind: "component", type: ClxSliderComponent, selector: "clx-slider", inputs: ["label", "hint", "errorMessage", "activeColor", "size", "min", "max", "step", "showTooltip", "showMinMax", "marks", "disabled"] }, { kind: "component", type: ClxRadioGroupComponent, selector: "clx-radio-group", inputs: ["color", "variant", "size", "direction", "disabled"] }, { kind: "component", type: ClxRadioComponent, selector: "clx-radio", inputs: ["value", "label", "color", "variant", "size"] }, { kind: "component", type: ClxSelectComponent, selector: "clx-select", inputs: ["label", "placeholder", "options", "multiple", "searchable", "searchPlaceholder", "activeColor", "size", "hint", "errorMessage", "disabled", "async", "loadOptions", "debounceMs", "minChars"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
13511
13534
|
}
|
|
13512
13535
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxFilterPanelComponent, decorators: [{
|
|
@@ -13517,22 +13540,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
13517
13540
|
imports: [FormsModule, ClxIconComponent, ClxButtonComponent, ClxCheckboxComponent, ClxSliderComponent, ClxRadioGroupComponent, ClxRadioComponent, ClxSelectComponent],
|
|
13518
13541
|
template: `
|
|
13519
13542
|
<!-- Header -->
|
|
13520
|
-
<div class="
|
|
13543
|
+
<div [class]="_headerClass()" (click)="collapsible() ? _togglePanel() : null">
|
|
13521
13544
|
<div class="flex items-center gap-2">
|
|
13545
|
+
@if (collapsible()) {
|
|
13546
|
+
<span clx-icon [name]="panelCollapsed() ? 'expand_more' : 'expand_less'" size="sm" class="text-clx-text-subtle"></span>
|
|
13547
|
+
}
|
|
13522
13548
|
<span clx-icon name="filter_list" size="sm" class="text-clx-text-subtle"></span>
|
|
13523
13549
|
<span class="text-sm font-semibold text-clx-text-label">Filtros</span>
|
|
13524
13550
|
@if (_activeCount() > 0) {
|
|
13525
13551
|
<span [class]="_badgeCls()">{{ _activeCount() }}</span>
|
|
13526
13552
|
}
|
|
13527
13553
|
</div>
|
|
13528
|
-
@if (_activeCount() > 0) {
|
|
13529
|
-
<button clx-button type="button" variant="ghost" color="slate" size="sm" (click)="_reset()">
|
|
13554
|
+
@if (_activeCount() > 0 && !panelCollapsed()) {
|
|
13555
|
+
<button clx-button type="button" variant="ghost" color="slate" size="sm" (click)="$event.stopPropagation(); _reset()">
|
|
13530
13556
|
Limpiar
|
|
13531
13557
|
</button>
|
|
13532
13558
|
}
|
|
13533
13559
|
</div>
|
|
13534
13560
|
|
|
13535
13561
|
<!-- Fields -->
|
|
13562
|
+
@if (!panelCollapsed()) {
|
|
13536
13563
|
<div class="overflow-y-auto flex-1">
|
|
13537
13564
|
@for (field of fields(); track field.key) {
|
|
13538
13565
|
<div class="border-b border-clx-border-soft last:border-0">
|
|
@@ -13641,12 +13668,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
13641
13668
|
</button>
|
|
13642
13669
|
</div>
|
|
13643
13670
|
}
|
|
13671
|
+
}
|
|
13644
13672
|
`,
|
|
13645
13673
|
encapsulation: ViewEncapsulation.None,
|
|
13646
13674
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13647
13675
|
host: { '[class]': '_hostClass()' },
|
|
13648
13676
|
}]
|
|
13649
|
-
}], 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"] }] } });
|
|
13677
|
+
}], 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 }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], panelCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelCollapsed", required: false }] }, { type: i0.Output, args: ["panelCollapsedChange"] }], 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"] }] } });
|
|
13650
13678
|
|
|
13651
13679
|
class ClxCarouselDirective {
|
|
13652
13680
|
templateRef;
|
|
@@ -16730,7 +16758,7 @@ class ClxCartComponent {
|
|
|
16730
16758
|
<div class="flex items-center justify-between">
|
|
16731
16759
|
<div class="flex items-center gap-2">
|
|
16732
16760
|
<h2 class="text-base font-semibold text-clx-text-label">Productos</h2>
|
|
16733
|
-
<span clx-badge variant="
|
|
16761
|
+
<span clx-badge variant="solid" [color]="color()" size="sm">{{ _totalUnits() }}</span>
|
|
16734
16762
|
</div>
|
|
16735
16763
|
<button
|
|
16736
16764
|
clx-button type="button" variant="light" color="red" icon="delete"
|
|
@@ -16875,7 +16903,7 @@ class ClxCartComponent {
|
|
|
16875
16903
|
</div>
|
|
16876
16904
|
@if (coupon()) {
|
|
16877
16905
|
@if (coupon()!.valid) {
|
|
16878
|
-
<div class="flex items-center gap-1.5 text-
|
|
16906
|
+
<div class="flex items-center gap-1.5 text-green-500">
|
|
16879
16907
|
<span clx-icon name="check_circle" size="sm"></span>
|
|
16880
16908
|
<code class="text-xs font-bold">{{ coupon()!.code }}</code>
|
|
16881
16909
|
<span class="text-xs">aplicado</span>
|
|
@@ -16897,16 +16925,16 @@ class ClxCartComponent {
|
|
|
16897
16925
|
<dd class="font-medium">{{ _subtotal() | currency:'COP':'$':'1.0-0' }}</dd>
|
|
16898
16926
|
</div>
|
|
16899
16927
|
@if (_savingsAmount() > 0) {
|
|
16900
|
-
<div class="flex justify-between text-
|
|
16928
|
+
<div class="flex justify-between text-green-500">
|
|
16901
16929
|
<dt>Descuento productos</dt>
|
|
16902
16930
|
<dd class="font-medium">-{{ _savingsAmount() | currency:'COP':'$':'1.0-0' }}</dd>
|
|
16903
16931
|
</div>
|
|
16904
16932
|
}
|
|
16905
16933
|
@if (coupon()?.valid) {
|
|
16906
|
-
<div class="flex justify-between text-
|
|
16934
|
+
<div class="flex justify-between text-green-500">
|
|
16907
16935
|
<dt>
|
|
16908
16936
|
Cupón
|
|
16909
|
-
<code class="bg-
|
|
16937
|
+
<code class="bg-green-50 px-1 rounded text-xs ml-1">{{ coupon()!.code }}</code>
|
|
16910
16938
|
</dt>
|
|
16911
16939
|
<dd class="font-medium">-{{ _couponDiscount() | currency:'COP':'$':'1.0-0' }}</dd>
|
|
16912
16940
|
</div>
|
|
@@ -17011,7 +17039,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
17011
17039
|
<div class="flex items-center justify-between">
|
|
17012
17040
|
<div class="flex items-center gap-2">
|
|
17013
17041
|
<h2 class="text-base font-semibold text-clx-text-label">Productos</h2>
|
|
17014
|
-
<span clx-badge variant="
|
|
17042
|
+
<span clx-badge variant="solid" [color]="color()" size="sm">{{ _totalUnits() }}</span>
|
|
17015
17043
|
</div>
|
|
17016
17044
|
<button
|
|
17017
17045
|
clx-button type="button" variant="light" color="red" icon="delete"
|
|
@@ -17156,7 +17184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
17156
17184
|
</div>
|
|
17157
17185
|
@if (coupon()) {
|
|
17158
17186
|
@if (coupon()!.valid) {
|
|
17159
|
-
<div class="flex items-center gap-1.5 text-
|
|
17187
|
+
<div class="flex items-center gap-1.5 text-green-500">
|
|
17160
17188
|
<span clx-icon name="check_circle" size="sm"></span>
|
|
17161
17189
|
<code class="text-xs font-bold">{{ coupon()!.code }}</code>
|
|
17162
17190
|
<span class="text-xs">aplicado</span>
|
|
@@ -17178,16 +17206,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
17178
17206
|
<dd class="font-medium">{{ _subtotal() | currency:'COP':'$':'1.0-0' }}</dd>
|
|
17179
17207
|
</div>
|
|
17180
17208
|
@if (_savingsAmount() > 0) {
|
|
17181
|
-
<div class="flex justify-between text-
|
|
17209
|
+
<div class="flex justify-between text-green-500">
|
|
17182
17210
|
<dt>Descuento productos</dt>
|
|
17183
17211
|
<dd class="font-medium">-{{ _savingsAmount() | currency:'COP':'$':'1.0-0' }}</dd>
|
|
17184
17212
|
</div>
|
|
17185
17213
|
}
|
|
17186
17214
|
@if (coupon()?.valid) {
|
|
17187
|
-
<div class="flex justify-between text-
|
|
17215
|
+
<div class="flex justify-between text-green-500">
|
|
17188
17216
|
<dt>
|
|
17189
17217
|
Cupón
|
|
17190
|
-
<code class="bg-
|
|
17218
|
+
<code class="bg-green-50 px-1 rounded text-xs ml-1">{{ coupon()!.code }}</code>
|
|
17191
17219
|
</dt>
|
|
17192
17220
|
<dd class="font-medium">-{{ _couponDiscount() | currency:'COP':'$':'1.0-0' }}</dd>
|
|
17193
17221
|
</div>
|