codexly-ui 0.0.21 → 0.0.24

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.
@@ -10900,7 +10900,7 @@ class ClxAppLayoutComponent {
10900
10900
  width = 'w-72';
10901
10901
  }
10902
10902
  else if (isDesktopCollapsed) {
10903
- width = 'w-16';
10903
+ width = 'w-20';
10904
10904
  }
10905
10905
  else {
10906
10906
  width = 'w-72';
@@ -10908,7 +10908,7 @@ class ClxAppLayoutComponent {
10908
10908
  const isOverlay = isDesktopCollapsed && hovered;
10909
10909
  return [
10910
10910
  `fixed inset-y-0 left-0 z-30 ${width} flex flex-col`,
10911
- 'bg-slate-900 overflow-y-auto shrink-0',
10911
+ 'bg-slate-900 overflow-hidden shrink-0',
10912
10912
  'transition-[width,transform] duration-300 ease-in-out',
10913
10913
  isOverlay ? 'shadow-2xl' : '',
10914
10914
  'lg:transition-[width] lg:relative lg:inset-auto lg:z-30 lg:translate-x-0',
@@ -10981,7 +10981,15 @@ class ClxAppLayoutComponent {
10981
10981
  (mouseenter)="_onSidebarEnter()"
10982
10982
  (mouseleave)="_onSidebarLeave()"
10983
10983
  aria-label="Navegación principal">
10984
- <ng-content select="[clx-sidebar]"></ng-content>
10984
+
10985
+ <!-- Brand slot -->
10986
+ <div class="border-b border-slate-700/50 shrink-0 overflow-hidden">
10987
+ <ng-content select="clx-brand"></ng-content>
10988
+ </div>
10989
+
10990
+ <div class="flex-1 overflow-y-auto overflow-x-hidden">
10991
+ <ng-content select="[clx-sidebar]"></ng-content>
10992
+ </div>
10985
10993
  </aside>
10986
10994
 
10987
10995
  <!-- Right panel -->
@@ -11035,7 +11043,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11035
11043
  (mouseenter)="_onSidebarEnter()"
11036
11044
  (mouseleave)="_onSidebarLeave()"
11037
11045
  aria-label="Navegación principal">
11038
- <ng-content select="[clx-sidebar]"></ng-content>
11046
+
11047
+ <!-- Brand slot -->
11048
+ <div class="border-b border-slate-700/50 shrink-0 overflow-hidden">
11049
+ <ng-content select="clx-brand"></ng-content>
11050
+ </div>
11051
+
11052
+ <div class="flex-1 overflow-y-auto overflow-x-hidden">
11053
+ <ng-content select="[clx-sidebar]"></ng-content>
11054
+ </div>
11039
11055
  </aside>
11040
11056
 
11041
11057
  <!-- Right panel -->
@@ -11072,6 +11088,50 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11072
11088
  }]
11073
11089
  }], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], collapsedChange: [{ type: i0.Output, args: ["collapsedChange"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
11074
11090
 
11091
+ class ClxBrandComponent {
11092
+ logo = input.required(...(ngDevMode ? [{ debugName: "logo" }] : []));
11093
+ name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
11094
+ description = input('', ...(ngDevMode ? [{ debugName: "description" }] : []));
11095
+ collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
11096
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxBrandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11097
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: ClxBrandComponent, isStandalone: true, selector: "clx-brand", inputs: { logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: `
11098
+ <div class="flex items-center gap-3 px-4 py-4">
11099
+ <img [src]="logo()" [alt]="name()" class="h-8 w-8 shrink-0 object-contain" />
11100
+ @if (!collapsed()) {
11101
+ <div class="min-w-0 overflow-hidden">
11102
+ <p class="text-white text-sm font-semibold truncate leading-tight">{{ name() }}</p>
11103
+ @if (description()) {
11104
+ <p class="text-slate-400 text-xs truncate leading-tight">{{ description() }}</p>
11105
+ }
11106
+ </div>
11107
+ }
11108
+ </div>
11109
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11110
+ }
11111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxBrandComponent, decorators: [{
11112
+ type: Component,
11113
+ args: [{
11114
+ selector: 'clx-brand',
11115
+ standalone: true,
11116
+ template: `
11117
+ <div class="flex items-center gap-3 px-4 py-4">
11118
+ <img [src]="logo()" [alt]="name()" class="h-8 w-8 shrink-0 object-contain" />
11119
+ @if (!collapsed()) {
11120
+ <div class="min-w-0 overflow-hidden">
11121
+ <p class="text-white text-sm font-semibold truncate leading-tight">{{ name() }}</p>
11122
+ @if (description()) {
11123
+ <p class="text-slate-400 text-xs truncate leading-tight">{{ description() }}</p>
11124
+ }
11125
+ </div>
11126
+ }
11127
+ </div>
11128
+ `,
11129
+ encapsulation: ViewEncapsulation.None,
11130
+ changeDetection: ChangeDetectionStrategy.OnPush,
11131
+ host: { class: 'block' },
11132
+ }]
11133
+ }], propDecorators: { logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: true }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }] } });
11134
+
11075
11135
  // ── Item geometry ──────────────────────────────────────────────────────────────
11076
11136
  const NAV_ITEM_BASE = 'flex items-center gap-3 w-full text-sm font-medium transition-colors duration-150 cursor-pointer select-none';
11077
11137
  const NAV_ITEM_L1 = 'px-6 py-3';
@@ -11089,18 +11149,21 @@ class ClxMenuItemComponent {
11089
11149
  color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : []));
11090
11150
  nested = input(false, ...(ngDevMode ? [{ debugName: "nested" }] : []));
11091
11151
  collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
11152
+ _inheritedColor = signal(null, ...(ngDevMode ? [{ debugName: "_inheritedColor" }] : []));
11153
+ _resolvedColor = computed(() => this._inheritedColor() ?? this.color(), ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : []));
11154
+ inheritColor(c) { this._inheritedColor.set(c); }
11092
11155
  _geom = computed(() => {
11093
11156
  if (this.collapsed())
11094
- return 'w-16 px-0 justify-center';
11157
+ return 'w-full py-3 px-0 justify-center';
11095
11158
  return this.nested() ? NAV_ITEM_L2 : NAV_ITEM_L1;
11096
11159
  }, ...(ngDevMode ? [{ debugName: "_geom" }] : []));
11097
- _iconCls = computed(() => resolveColor(this.color()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
11160
+ _iconCls = computed(() => resolveColor(this._resolvedColor()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
11098
11161
  _idleCls = computed(() => {
11099
- const t = resolveColor(this.color());
11162
+ const t = resolveColor(this._resolvedColor());
11100
11163
  return `${NAV_ITEM_BASE} ${this._geom()} ${NAV_ITEM_IDLE} ${t.hoverBgMuted}`;
11101
11164
  }, ...(ngDevMode ? [{ debugName: "_idleCls" }] : []));
11102
11165
  _activeCls = computed(() => {
11103
- const t = resolveColor(this.color());
11166
+ const t = resolveColor(this._resolvedColor());
11104
11167
  if (this.collapsed()) {
11105
11168
  return `${NAV_ITEM_BASE} ${this._geom()} ${t.textSubtle} font-semibold`;
11106
11169
  }
@@ -11172,10 +11235,16 @@ class ClxMenuComponent {
11172
11235
  constructor() {
11173
11236
  effect(() => { if (this._isChildActive())
11174
11237
  this._isExpanded.set(true); });
11238
+ effect(() => { if (this.collapsed())
11239
+ this._isExpanded.set(false); });
11240
+ effect(() => {
11241
+ const color = this.color();
11242
+ this._childItems?.forEach(c => c.inheritColor(color));
11243
+ });
11175
11244
  }
11176
11245
  _iconCls = computed(() => resolveColor(this.color()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
11177
11246
  _buttonCls = computed(() => {
11178
- const geom = this.collapsed() ? 'w-16 px-0 justify-center' : NAV_ITEM_L1;
11247
+ const geom = this.collapsed() ? 'w-full py-3 px-0 justify-center' : NAV_ITEM_L1;
11179
11248
  const base = `${NAV_ITEM_BASE} ${geom}`;
11180
11249
  const t = resolveColor(this.color());
11181
11250
  if (this._isChildActive()) {
@@ -11189,15 +11258,16 @@ class ClxMenuComponent {
11189
11258
  NAV_CHILDREN_INNER = NAV_CHILDREN_INNER;
11190
11259
  NAV_CHILDREN_LIST = NAV_CHILDREN_LIST;
11191
11260
  ngAfterContentInit() {
11192
- this._syncChildRoutes();
11261
+ this._syncChildren();
11193
11262
  this._childItems.changes
11194
11263
  .pipe(takeUntilDestroyed(this._destroyRef))
11195
- .subscribe(() => this._syncChildRoutes());
11264
+ .subscribe(() => this._syncChildren());
11196
11265
  }
11197
- _syncChildRoutes() {
11266
+ _syncChildren() {
11267
+ const color = this.color();
11198
11268
  this._childRoutes = this._childItems
11199
11269
  .filter(c => !!c.route())
11200
- .map(c => c.route());
11270
+ .map(c => { c.inheritColor(color); return c.route(); });
11201
11271
  }
11202
11272
  _toggle() {
11203
11273
  this._isExpanded.update(v => !v);
@@ -11224,17 +11294,15 @@ class ClxMenuComponent {
11224
11294
  }
11225
11295
  </button>
11226
11296
 
11227
- @if (!collapsed()) {
11228
- <div
11229
- [class]="NAV_CHILDREN_WRAPPER"
11230
- [style.grid-template-rows]="_isExpanded() ? '1fr' : '0fr'">
11231
- <div [class]="NAV_CHILDREN_INNER">
11232
- <div [class]="NAV_CHILDREN_LIST">
11233
- <ng-content></ng-content>
11234
- </div>
11297
+ <div
11298
+ [class]="NAV_CHILDREN_WRAPPER"
11299
+ [style.grid-template-rows]="(!collapsed() && _isExpanded()) ? '1fr' : '0fr'">
11300
+ <div [class]="NAV_CHILDREN_INNER">
11301
+ <div [class]="NAV_CHILDREN_LIST">
11302
+ <ng-content></ng-content>
11235
11303
  </div>
11236
11304
  </div>
11237
- }
11305
+ </div>
11238
11306
  `, isInline: true, dependencies: [{ kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11239
11307
  }
11240
11308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxMenuComponent, decorators: [{
@@ -11264,17 +11332,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11264
11332
  }
11265
11333
  </button>
11266
11334
 
11267
- @if (!collapsed()) {
11268
- <div
11269
- [class]="NAV_CHILDREN_WRAPPER"
11270
- [style.grid-template-rows]="_isExpanded() ? '1fr' : '0fr'">
11271
- <div [class]="NAV_CHILDREN_INNER">
11272
- <div [class]="NAV_CHILDREN_LIST">
11273
- <ng-content></ng-content>
11274
- </div>
11335
+ <div
11336
+ [class]="NAV_CHILDREN_WRAPPER"
11337
+ [style.grid-template-rows]="(!collapsed() && _isExpanded()) ? '1fr' : '0fr'">
11338
+ <div [class]="NAV_CHILDREN_INNER">
11339
+ <div [class]="NAV_CHILDREN_LIST">
11340
+ <ng-content></ng-content>
11275
11341
  </div>
11276
11342
  </div>
11277
- }
11343
+ </div>
11278
11344
  `,
11279
11345
  encapsulation: ViewEncapsulation.None,
11280
11346
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -11289,24 +11355,33 @@ class ClxNavGroupComponent {
11289
11355
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
11290
11356
  collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
11291
11357
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxNavGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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 });
11358
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.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: { classAttribute: "block" }, ngImport: i0, template: `
11359
+ @if (!collapsed()) {
11360
+ <span class="block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest text-slate-500 select-none">{{ label() }}</span>
11361
+ } @else {
11362
+ <span class="flex items-center justify-center w-full py-3">
11363
+ <span class="w-1.5 h-1.5 rounded-full bg-slate-600"></span>
11364
+ </span>
11365
+ }
11366
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11293
11367
  }
11294
11368
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxNavGroupComponent, decorators: [{
11295
11369
  type: Component,
11296
11370
  args: [{
11297
11371
  selector: 'clx-nav-group',
11298
11372
  standalone: true,
11299
- template: '',
11373
+ template: `
11374
+ @if (!collapsed()) {
11375
+ <span class="block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest text-slate-500 select-none">{{ label() }}</span>
11376
+ } @else {
11377
+ <span class="flex items-center justify-center w-full py-3">
11378
+ <span class="w-1.5 h-1.5 rounded-full bg-slate-600"></span>
11379
+ </span>
11380
+ }
11381
+ `,
11300
11382
  encapsulation: ViewEncapsulation.None,
11301
11383
  changeDetection: ChangeDetectionStrategy.OnPush,
11302
- host: {
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()',
11309
- },
11384
+ host: { class: 'block' },
11310
11385
  }]
11311
11386
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }] } });
11312
11387
 
@@ -13928,5 +14003,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
13928
14003
  * Generated bundle index. Do not edit.
13929
14004
  */
13930
14005
 
13931
- export { CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_COLOR_HEX, CLX_COLOR_MAP, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_RADIO_GROUP, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxChartComponent, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxModalComponent, ClxModalService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxTimelineComponent, ClxTimelineItemComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, parseColorInput, resolveColor };
14006
+ export { CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_COLOR_HEX, CLX_COLOR_MAP, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_RADIO_GROUP, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxChartComponent, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxModalComponent, ClxModalService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxTimelineComponent, ClxTimelineItemComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, parseColorInput, resolveColor };
13932
14007
  //# sourceMappingURL=codexly-ui.mjs.map