codexly-ui 0.0.19 → 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';
@@ -11055,7 +11091,7 @@ class ClxMenuItemComponent {
11055
11091
  collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
11056
11092
  _geom = computed(() => {
11057
11093
  if (this.collapsed())
11058
- return 'px-0 justify-center';
11094
+ return 'w-16 px-0 justify-center';
11059
11095
  return this.nested() ? NAV_ITEM_L2 : NAV_ITEM_L1;
11060
11096
  }, ...(ngDevMode ? [{ debugName: "_geom" }] : []));
11061
11097
  _iconCls = computed(() => resolveColor(this.color()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
@@ -11139,7 +11175,7 @@ class ClxMenuComponent {
11139
11175
  }
11140
11176
  _iconCls = computed(() => resolveColor(this.color()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
11141
11177
  _buttonCls = computed(() => {
11142
- const geom = this.collapsed() ? 'px-0 justify-center' : NAV_ITEM_L1;
11178
+ const geom = this.collapsed() ? 'w-16 px-0 justify-center' : NAV_ITEM_L1;
11143
11179
  const base = `${NAV_ITEM_BASE} ${geom}`;
11144
11180
  const t = resolveColor(this.color());
11145
11181
  if (this._isChildActive()) {
@@ -11251,8 +11287,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11251
11287
 
11252
11288
  class ClxNavGroupComponent {
11253
11289
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
11290
+ collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
11254
11291
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxNavGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11255
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.21", type: ClxNavGroupComponent, isStandalone: true, selector: "clx-nav-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "textContent": "label()" }, classAttribute: "block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest text-slate-500 select-none" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11292
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.21", type: ClxNavGroupComponent, isStandalone: true, selector: "clx-nav-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "textContent": "!collapsed() ? label() : \"\"", "class.!p-0": "collapsed()", "class.!h-0": "collapsed()", "class.!pt-0": "collapsed()", "class.!pb-0": "collapsed()" }, classAttribute: "block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest text-slate-500 select-none overflow-hidden transition-all duration-300" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11256
11293
  }
11257
11294
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxNavGroupComponent, decorators: [{
11258
11295
  type: Component,
@@ -11263,11 +11300,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11263
11300
  encapsulation: ViewEncapsulation.None,
11264
11301
  changeDetection: ChangeDetectionStrategy.OnPush,
11265
11302
  host: {
11266
- class: 'block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest text-slate-500 select-none',
11267
- '[textContent]': 'label()',
11303
+ class: 'block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest text-slate-500 select-none overflow-hidden transition-all duration-300',
11304
+ '[textContent]': '!collapsed() ? label() : ""',
11305
+ '[class.!p-0]': 'collapsed()',
11306
+ '[class.!h-0]': 'collapsed()',
11307
+ '[class.!pt-0]': 'collapsed()',
11308
+ '[class.!pb-0]': 'collapsed()',
11268
11309
  },
11269
11310
  }]
11270
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
11311
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }] } });
11271
11312
 
11272
11313
  // ── Base classes ─────────────────────────────────────────────────────────────
11273
11314
  const TABLE_BASE_CLASS = 'w-full text-left border-collapse text-sm';