codexly-ui 0.12.27 → 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.
@@ -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="flex items-center justify-between px-4 py-3 border-b border-clx-border-soft">
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="flex items-center justify-between px-4 py-3 border-b border-clx-border-soft">
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;