codexly-ui 0.0.55 → 0.0.57

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.
@@ -10950,7 +10950,9 @@ class ClxAppLayoutComponent {
10950
10950
  _sidebarOpen = signal(false, ...(ngDevMode ? [{ debugName: "_sidebarOpen" }] : /* istanbul ignore next */ []));
10951
10951
  collapsed = signal(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
10952
10952
  _hovered = signal(false, ...(ngDevMode ? [{ debugName: "_hovered" }] : /* istanbul ignore next */ []));
10953
+ _transitioning = signal(false, ...(ngDevMode ? [{ debugName: "_transitioning" }] : /* istanbul ignore next */ []));
10953
10954
  _isMobile = signal(true, ...(ngDevMode ? [{ debugName: "_isMobile" }] : /* istanbul ignore next */ []));
10955
+ _transitionTimer = null;
10954
10956
  collapsedChange = output();
10955
10957
  expandedChange = output();
10956
10958
  constructor() {
@@ -10974,12 +10976,15 @@ class ClxAppLayoutComponent {
10974
10976
  width = 'w-72';
10975
10977
  }
10976
10978
  const isOverlay = isDesktopCollapsed && hovered;
10979
+ const transition = this._transitioning()
10980
+ ? 'transition-[width,transform] duration-300 ease-in-out'
10981
+ : '';
10977
10982
  return [
10978
10983
  `fixed inset-y-0 left-0 z-30 ${width} flex flex-col`,
10979
10984
  'bg-slate-900 overflow-hidden shrink-0',
10980
- 'transition-[width,transform] duration-300 ease-in-out',
10985
+ transition,
10981
10986
  isOverlay ? 'shadow-2xl' : '',
10982
- 'lg:transition-[width] lg:relative lg:inset-auto lg:z-30 lg:translate-x-0',
10987
+ 'lg:relative lg:inset-auto lg:z-30 lg:translate-x-0',
10983
10988
  (!this._isMobile() || this._sidebarOpen()) ? 'translate-x-0' : '-translate-x-full',
10984
10989
  ].join(' ');
10985
10990
  }, ...(ngDevMode ? [{ debugName: "_sidebarCls" }] : /* istanbul ignore next */ []));
@@ -11010,8 +11015,17 @@ class ClxAppLayoutComponent {
11010
11015
  }
11011
11016
  ngOnDestroy() {
11012
11017
  this._mql?.removeEventListener('change', this._mqlListener);
11018
+ if (this._transitionTimer)
11019
+ clearTimeout(this._transitionTimer);
11020
+ }
11021
+ _enableTransition() {
11022
+ this._transitioning.set(true);
11023
+ if (this._transitionTimer)
11024
+ clearTimeout(this._transitionTimer);
11025
+ this._transitionTimer = setTimeout(() => this._transitioning.set(false), 320);
11013
11026
  }
11014
11027
  _toggleCollapsed() {
11028
+ this._enableTransition();
11015
11029
  const next = !this.collapsed();
11016
11030
  this.collapsed.set(next);
11017
11031
  this._hovered.set(false);
@@ -11019,21 +11033,23 @@ class ClxAppLayoutComponent {
11019
11033
  }
11020
11034
  _onSidebarEnter() {
11021
11035
  if (this.collapsed() && !this._isMobile()) {
11036
+ this._enableTransition();
11022
11037
  this._hovered.set(true);
11023
11038
  this.expandedChange.emit(true);
11024
11039
  }
11025
11040
  }
11026
11041
  _onSidebarLeave() {
11027
11042
  if (this._hovered()) {
11043
+ this._enableTransition();
11028
11044
  this._hovered.set(false);
11029
11045
  this.expandedChange.emit(false);
11030
11046
  }
11031
11047
  }
11032
- toggleSidebar() { this._sidebarOpen.update(v => !v); }
11033
- openSidebar() { this._sidebarOpen.set(true); }
11034
- closeSidebar() { this._sidebarOpen.set(false); }
11048
+ toggleSidebar() { this._enableTransition(); this._sidebarOpen.update(v => !v); }
11049
+ openSidebar() { this._enableTransition(); this._sidebarOpen.set(true); }
11050
+ closeSidebar() { this._enableTransition(); this._sidebarOpen.set(false); }
11035
11051
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxAppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11036
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxAppLayoutComponent, isStandalone: true, selector: "clx-app-layout", inputs: { activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsedChange: "collapsedChange", expandedChange: "expandedChange" }, host: { classAttribute: "flex h-screen overflow-hidden" }, ngImport: i0, template: `
11052
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxAppLayoutComponent, isStandalone: true, selector: "clx-app-layout", inputs: { activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsedChange: "collapsedChange", expandedChange: "expandedChange" }, host: { styleAttribute: "position:fixed;inset:0", classAttribute: "flex overflow-hidden" }, ngImport: i0, template: `
11037
11053
  <!-- Mobile backdrop -->
11038
11054
  @if (_showBackdrop()) {
11039
11055
  <div
@@ -11152,7 +11168,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
11152
11168
  `,
11153
11169
  encapsulation: ViewEncapsulation.None,
11154
11170
  changeDetection: ChangeDetectionStrategy.OnPush,
11155
- host: { class: 'flex h-screen overflow-hidden' },
11171
+ host: { class: 'flex overflow-hidden', style: 'position:fixed;inset:0' },
11156
11172
  }]
11157
11173
  }], ctorParameters: () => [], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], collapsedChange: [{ type: i0.Output, args: ["collapsedChange"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
11158
11174