codexly-ui 0.0.18 → 0.0.20

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.
@@ -11036,7 +11036,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11036
11036
  }]
11037
11037
  }], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], collapsedChange: [{ type: i0.Output, args: ["collapsedChange"] }] } });
11038
11038
 
11039
- const CLX_MENU_COLOR = new InjectionToken('CLX_MENU_COLOR');
11040
11039
  // ── Item geometry ──────────────────────────────────────────────────────────────
11041
11040
  const NAV_ITEM_BASE = 'flex items-center gap-3 w-full text-sm font-medium transition-colors duration-150 cursor-pointer select-none';
11042
11041
  const NAV_ITEM_L1 = 'px-6 py-3';
@@ -11054,21 +11053,18 @@ class ClxMenuItemComponent {
11054
11053
  color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : []));
11055
11054
  nested = input(false, ...(ngDevMode ? [{ debugName: "nested" }] : []));
11056
11055
  collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
11057
- _menuColorFn = inject(CLX_MENU_COLOR, { optional: true });
11058
- _hasParent = !!this._menuColorFn;
11059
- _resolvedColor = computed(() => this._menuColorFn?.() ?? this.color(), ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : []));
11060
11056
  _geom = computed(() => {
11061
11057
  if (this.collapsed())
11062
- return 'px-0 justify-center';
11058
+ return 'w-16 px-0 justify-center';
11063
11059
  return this.nested() ? NAV_ITEM_L2 : NAV_ITEM_L1;
11064
11060
  }, ...(ngDevMode ? [{ debugName: "_geom" }] : []));
11065
- _iconCls = computed(() => resolveColor(this._resolvedColor()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
11061
+ _iconCls = computed(() => resolveColor(this.color()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
11066
11062
  _idleCls = computed(() => {
11067
- const t = resolveColor(this._resolvedColor());
11063
+ const t = resolveColor(this.color());
11068
11064
  return `${NAV_ITEM_BASE} ${this._geom()} ${NAV_ITEM_IDLE} ${t.hoverBgMuted}`;
11069
11065
  }, ...(ngDevMode ? [{ debugName: "_idleCls" }] : []));
11070
11066
  _activeCls = computed(() => {
11071
- const t = resolveColor(this._resolvedColor());
11067
+ const t = resolveColor(this.color());
11072
11068
  if (this.collapsed()) {
11073
11069
  return `${NAV_ITEM_BASE} ${this._geom()} ${t.textSubtle} font-semibold`;
11074
11070
  }
@@ -11085,7 +11081,7 @@ class ClxMenuItemComponent {
11085
11081
  [title]="collapsed() ? label() : ''"
11086
11082
  (click)="route() ? null : $event.preventDefault()">
11087
11083
  @if (icon()) {
11088
- <span clx-icon [name]="icon()" size="sm" [class]="rla.isActive || !_hasParent ? _iconCls() : 'text-slate-500'"></span>
11084
+ <span clx-icon [name]="icon()" size="sm" [class]="rla.isActive || nested() ? _iconCls() : 'text-slate-500'"></span>
11089
11085
  }
11090
11086
  @if (!collapsed()) {
11091
11087
  <span class="flex-1 truncate">{{ label() }}</span>
@@ -11109,7 +11105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11109
11105
  [title]="collapsed() ? label() : ''"
11110
11106
  (click)="route() ? null : $event.preventDefault()">
11111
11107
  @if (icon()) {
11112
- <span clx-icon [name]="icon()" size="sm" [class]="rla.isActive || !_hasParent ? _iconCls() : 'text-slate-500'"></span>
11108
+ <span clx-icon [name]="icon()" size="sm" [class]="rla.isActive || nested() ? _iconCls() : 'text-slate-500'"></span>
11113
11109
  }
11114
11110
  @if (!collapsed()) {
11115
11111
  <span class="flex-1 truncate">{{ label() }}</span>
@@ -11143,7 +11139,7 @@ class ClxMenuComponent {
11143
11139
  }
11144
11140
  _iconCls = computed(() => resolveColor(this.color()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : []));
11145
11141
  _buttonCls = computed(() => {
11146
- const geom = this.collapsed() ? 'px-0 justify-center' : NAV_ITEM_L1;
11142
+ const geom = this.collapsed() ? 'w-16 px-0 justify-center' : NAV_ITEM_L1;
11147
11143
  const base = `${NAV_ITEM_BASE} ${geom}`;
11148
11144
  const t = resolveColor(this.color());
11149
11145
  if (this._isChildActive()) {
@@ -11171,9 +11167,7 @@ class ClxMenuComponent {
11171
11167
  this._isExpanded.update(v => !v);
11172
11168
  }
11173
11169
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11174
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, providers: [
11175
- { provide: CLX_MENU_COLOR, useFactory: (self) => () => self.color(), deps: [ClxMenuComponent] },
11176
- ], queries: [{ propertyName: "_childItems", predicate: ClxMenuItemComponent, descendants: true }], ngImport: i0, template: `
11170
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, queries: [{ propertyName: "_childItems", predicate: ClxMenuItemComponent, descendants: true }], ngImport: i0, template: `
11177
11171
  <button
11178
11172
  type="button"
11179
11173
  [class]="_buttonCls()"
@@ -11213,9 +11207,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11213
11207
  selector: 'clx-menu',
11214
11208
  standalone: true,
11215
11209
  imports: [ClxIconComponent],
11216
- providers: [
11217
- { provide: CLX_MENU_COLOR, useFactory: (self) => () => self.color(), deps: [ClxMenuComponent] },
11218
- ],
11219
11210
  template: `
11220
11211
  <button
11221
11212
  type="button"
@@ -11260,8 +11251,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11260
11251
 
11261
11252
  class ClxNavGroupComponent {
11262
11253
  label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
11254
+ collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
11263
11255
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxNavGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11264
- 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 });
11256
+ 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 });
11265
11257
  }
11266
11258
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ClxNavGroupComponent, decorators: [{
11267
11259
  type: Component,
@@ -11272,11 +11264,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
11272
11264
  encapsulation: ViewEncapsulation.None,
11273
11265
  changeDetection: ChangeDetectionStrategy.OnPush,
11274
11266
  host: {
11275
- class: 'block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest text-slate-500 select-none',
11276
- '[textContent]': 'label()',
11267
+ 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',
11268
+ '[textContent]': '!collapsed() ? label() : ""',
11269
+ '[class.!p-0]': 'collapsed()',
11270
+ '[class.!h-0]': 'collapsed()',
11271
+ '[class.!pt-0]': 'collapsed()',
11272
+ '[class.!pb-0]': 'collapsed()',
11277
11273
  },
11278
11274
  }]
11279
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
11275
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }] } });
11280
11276
 
11281
11277
  // ── Base classes ─────────────────────────────────────────────────────────────
11282
11278
  const TABLE_BASE_CLASS = 'w-full text-left border-collapse text-sm';