codexly-ui 0.0.20 → 0.0.21

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.
@@ -10886,17 +10886,32 @@ class ClxAppLayoutComponent {
10886
10886
  activeColor = input('indigo', ...(ngDevMode ? [{ debugName: "activeColor" }] : []));
10887
10887
  _sidebarOpen = signal(false, ...(ngDevMode ? [{ debugName: "_sidebarOpen" }] : []));
10888
10888
  collapsed = signal(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
10889
+ _hovered = signal(false, ...(ngDevMode ? [{ debugName: "_hovered" }] : []));
10889
10890
  _isMobile = signal(true, ...(ngDevMode ? [{ debugName: "_isMobile" }] : []));
10890
10891
  collapsedChange = output();
10892
+ expandedChange = output();
10891
10893
  _showBackdrop = computed(() => this._sidebarOpen() && this._isMobile(), ...(ngDevMode ? [{ debugName: "_showBackdrop" }] : []));
10894
+ _isExpanded = computed(() => !this.collapsed() || this._hovered(), ...(ngDevMode ? [{ debugName: "_isExpanded" }] : []));
10892
10895
  _sidebarCls = computed(() => {
10893
- const col = this.collapsed() && !this._isMobile();
10894
- const width = col ? 'w-16' : 'w-72';
10896
+ const isDesktopCollapsed = this.collapsed() && !this._isMobile();
10897
+ const hovered = this._hovered();
10898
+ let width;
10899
+ if (isDesktopCollapsed && hovered) {
10900
+ width = 'w-72';
10901
+ }
10902
+ else if (isDesktopCollapsed) {
10903
+ width = 'w-16';
10904
+ }
10905
+ else {
10906
+ width = 'w-72';
10907
+ }
10908
+ const isOverlay = isDesktopCollapsed && hovered;
10895
10909
  return [
10896
10910
  `fixed inset-y-0 left-0 z-30 ${width} flex flex-col`,
10897
10911
  'bg-slate-900 overflow-y-auto shrink-0',
10898
10912
  'transition-[width,transform] duration-300 ease-in-out',
10899
- 'lg:transition-[width] lg:relative lg:inset-auto lg:z-auto lg:translate-x-0',
10913
+ isOverlay ? 'shadow-2xl' : '',
10914
+ 'lg:transition-[width] lg:relative lg:inset-auto lg:z-30 lg:translate-x-0',
10900
10915
  (!this._isMobile() || this._sidebarOpen()) ? 'translate-x-0' : '-translate-x-full',
10901
10916
  ].join(' ');
10902
10917
  }, ...(ngDevMode ? [{ debugName: "_sidebarCls" }] : []));
@@ -10931,13 +10946,26 @@ class ClxAppLayoutComponent {
10931
10946
  _toggleCollapsed() {
10932
10947
  const next = !this.collapsed();
10933
10948
  this.collapsed.set(next);
10949
+ this._hovered.set(false);
10934
10950
  this.collapsedChange.emit(next);
10935
10951
  }
10952
+ _onSidebarEnter() {
10953
+ if (this.collapsed() && !this._isMobile()) {
10954
+ this._hovered.set(true);
10955
+ this.expandedChange.emit(true);
10956
+ }
10957
+ }
10958
+ _onSidebarLeave() {
10959
+ if (this._hovered()) {
10960
+ this._hovered.set(false);
10961
+ this.expandedChange.emit(false);
10962
+ }
10963
+ }
10936
10964
  toggleSidebar() { this._sidebarOpen.update(v => !v); }
10937
10965
  openSidebar() { this._sidebarOpen.set(true); }
10938
10966
  closeSidebar() { this._sidebarOpen.set(false); }
10939
10967
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxAppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10940
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: ClxAppLayoutComponent, isStandalone: true, selector: "clx-app-layout", inputs: { activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsedChange: "collapsedChange" }, host: { classAttribute: "flex h-screen overflow-hidden" }, ngImport: i0, template: `
10968
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", 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: `
10941
10969
  <!-- Mobile backdrop -->
10942
10970
  @if (_showBackdrop()) {
10943
10971
  <div
@@ -10948,7 +10976,11 @@ class ClxAppLayoutComponent {
10948
10976
  }
10949
10977
 
10950
10978
  <!-- Sidebar -->
10951
- <aside [class]="_sidebarCls()" aria-label="Navegación principal">
10979
+ <aside
10980
+ [class]="_sidebarCls()"
10981
+ (mouseenter)="_onSidebarEnter()"
10982
+ (mouseleave)="_onSidebarLeave()"
10983
+ aria-label="Navegación principal">
10952
10984
  <ng-content select="[clx-sidebar]"></ng-content>
10953
10985
  </aside>
10954
10986
 
@@ -10998,7 +11030,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
10998
11030
  }
10999
11031
 
11000
11032
  <!-- Sidebar -->
11001
- <aside [class]="_sidebarCls()" aria-label="Navegación principal">
11033
+ <aside
11034
+ [class]="_sidebarCls()"
11035
+ (mouseenter)="_onSidebarEnter()"
11036
+ (mouseleave)="_onSidebarLeave()"
11037
+ aria-label="Navegación principal">
11002
11038
  <ng-content select="[clx-sidebar]"></ng-content>
11003
11039
  </aside>
11004
11040
 
@@ -11034,7 +11070,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11034
11070
  changeDetection: ChangeDetectionStrategy.OnPush,
11035
11071
  host: { class: 'flex h-screen overflow-hidden' },
11036
11072
  }]
11037
- }], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], collapsedChange: [{ type: i0.Output, args: ["collapsedChange"] }] } });
11073
+ }], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], collapsedChange: [{ type: i0.Output, args: ["collapsedChange"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
11038
11074
 
11039
11075
  // ── Item geometry ──────────────────────────────────────────────────────────────
11040
11076
  const NAV_ITEM_BASE = 'flex items-center gap-3 w-full text-sm font-medium transition-colors duration-150 cursor-pointer select-none';