codexly-ui 0.0.54 → 0.0.56

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.
@@ -5225,7 +5225,7 @@ const DRAWER_WIDTH_MAP = {
5225
5225
  md: '420px',
5226
5226
  lg: '560px',
5227
5227
  };
5228
- const DRAWER_CONTAINER_CLASS = 'flex flex-col bg-white shadow-2xl overflow-hidden h-full';
5228
+ const DRAWER_CONTAINER_CLASS = 'flex flex-col bg-white shadow-2xl overflow-hidden h-screen';
5229
5229
  const CLX_DRAWER_SIZE = new InjectionToken('CLX_DRAWER_SIZE');
5230
5230
 
5231
5231
  class ClxDrawerComponent {
@@ -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,19 +11033,21 @@ 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
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: { classAttribute: "flex h-screen overflow-hidden" }, ngImport: i0, template: `
11037
11053
  <!-- Mobile backdrop -->
@@ -13908,8 +13924,6 @@ class ClxDrawerService {
13908
13924
  hasBackdrop,
13909
13925
  backdropClass: 'clx-modal-backdrop',
13910
13926
  panelClass: extraClasses,
13911
- width: DRAWER_WIDTH_MAP[size],
13912
- height: '100vh',
13913
13927
  scrollStrategy: this._overlay.scrollStrategies.block(),
13914
13928
  positionStrategy: this._overlay.position().global().right('0').top('0'),
13915
13929
  }));