codexly-ui 0.12.27 → 0.12.29
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 +46 -14
- 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
|
@@ -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,9 +13399,9 @@ 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">
|
|
13388
13406
|
<span clx-icon name="filter_list" size="sm" class="text-clx-text-subtle"></span>
|
|
13389
13407
|
<span class="text-sm font-semibold text-clx-text-label">Filtros</span>
|
|
@@ -13391,14 +13409,20 @@ class ClxFilterPanelComponent {
|
|
|
13391
13409
|
<span [class]="_badgeCls()">{{ _activeCount() }}</span>
|
|
13392
13410
|
}
|
|
13393
13411
|
</div>
|
|
13394
|
-
|
|
13395
|
-
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
|
|
13412
|
+
<div class="flex items-center gap-1">
|
|
13413
|
+
@if (_activeCount() > 0 && !panelCollapsed()) {
|
|
13414
|
+
<button clx-button type="button" variant="ghost" color="slate" size="sm" (click)="$event.stopPropagation(); _reset()">
|
|
13415
|
+
Limpiar
|
|
13416
|
+
</button>
|
|
13417
|
+
}
|
|
13418
|
+
@if (collapsible()) {
|
|
13419
|
+
<span clx-icon [name]="panelCollapsed() ? 'expand_more' : 'expand_less'" size="sm" class="text-clx-text-subtle"></span>
|
|
13420
|
+
}
|
|
13421
|
+
</div>
|
|
13399
13422
|
</div>
|
|
13400
13423
|
|
|
13401
13424
|
<!-- Fields -->
|
|
13425
|
+
@if (!panelCollapsed()) {
|
|
13402
13426
|
<div class="overflow-y-auto flex-1">
|
|
13403
13427
|
@for (field of fields(); track field.key) {
|
|
13404
13428
|
<div class="border-b border-clx-border-soft last:border-0">
|
|
@@ -13507,6 +13531,7 @@ class ClxFilterPanelComponent {
|
|
|
13507
13531
|
</button>
|
|
13508
13532
|
</div>
|
|
13509
13533
|
}
|
|
13534
|
+
}
|
|
13510
13535
|
`, 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
13536
|
}
|
|
13512
13537
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxFilterPanelComponent, decorators: [{
|
|
@@ -13517,7 +13542,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
13517
13542
|
imports: [FormsModule, ClxIconComponent, ClxButtonComponent, ClxCheckboxComponent, ClxSliderComponent, ClxRadioGroupComponent, ClxRadioComponent, ClxSelectComponent],
|
|
13518
13543
|
template: `
|
|
13519
13544
|
<!-- Header -->
|
|
13520
|
-
<div class="
|
|
13545
|
+
<div [class]="_headerClass()" (click)="collapsible() ? _togglePanel() : null">
|
|
13521
13546
|
<div class="flex items-center gap-2">
|
|
13522
13547
|
<span clx-icon name="filter_list" size="sm" class="text-clx-text-subtle"></span>
|
|
13523
13548
|
<span class="text-sm font-semibold text-clx-text-label">Filtros</span>
|
|
@@ -13525,14 +13550,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
13525
13550
|
<span [class]="_badgeCls()">{{ _activeCount() }}</span>
|
|
13526
13551
|
}
|
|
13527
13552
|
</div>
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13553
|
+
<div class="flex items-center gap-1">
|
|
13554
|
+
@if (_activeCount() > 0 && !panelCollapsed()) {
|
|
13555
|
+
<button clx-button type="button" variant="ghost" color="slate" size="sm" (click)="$event.stopPropagation(); _reset()">
|
|
13556
|
+
Limpiar
|
|
13557
|
+
</button>
|
|
13558
|
+
}
|
|
13559
|
+
@if (collapsible()) {
|
|
13560
|
+
<span clx-icon [name]="panelCollapsed() ? 'expand_more' : 'expand_less'" size="sm" class="text-clx-text-subtle"></span>
|
|
13561
|
+
}
|
|
13562
|
+
</div>
|
|
13533
13563
|
</div>
|
|
13534
13564
|
|
|
13535
13565
|
<!-- Fields -->
|
|
13566
|
+
@if (!panelCollapsed()) {
|
|
13536
13567
|
<div class="overflow-y-auto flex-1">
|
|
13537
13568
|
@for (field of fields(); track field.key) {
|
|
13538
13569
|
<div class="border-b border-clx-border-soft last:border-0">
|
|
@@ -13641,12 +13672,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
13641
13672
|
</button>
|
|
13642
13673
|
</div>
|
|
13643
13674
|
}
|
|
13675
|
+
}
|
|
13644
13676
|
`,
|
|
13645
13677
|
encapsulation: ViewEncapsulation.None,
|
|
13646
13678
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13647
13679
|
host: { '[class]': '_hostClass()' },
|
|
13648
13680
|
}]
|
|
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"] }] } });
|
|
13681
|
+
}], 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
13682
|
|
|
13651
13683
|
class ClxCarouselDirective {
|
|
13652
13684
|
templateRef;
|