codexly-ui 0.1.15 → 0.1.17

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.
@@ -5471,6 +5471,7 @@ class ClxAlertComponent {
5471
5471
  _resolve = inject(CLX_ALERT_RESOLVE);
5472
5472
  _animate = inject(ClxAnimateService);
5473
5473
  _el = inject((ElementRef));
5474
+ _themeSvc = inject(ClxThemeService);
5474
5475
  _zone;
5475
5476
  constructor() {
5476
5477
  const zone = inject(NgZone, { optional: true });
@@ -5478,17 +5479,36 @@ class ClxAlertComponent {
5478
5479
  }
5479
5480
  // ─── Resolved options ─────────────────────────────────────────────────────
5480
5481
  get _type() { return this._opts.type ?? 'info'; }
5482
+ get _isConfirm() { return this._type === 'confirm'; }
5481
5483
  _icon = signal(ALERT_ICON_MAP[this._type], ...(ngDevMode ? [{ debugName: "_icon" }] : /* istanbul ignore next */ []));
5482
- _iconBg = signal(ALERT_ICON_BG_MAP[this._type], ...(ngDevMode ? [{ debugName: "_iconBg" }] : /* istanbul ignore next */ []));
5483
- _iconColor = signal(ALERT_ICON_COLOR_MAP[this._type], ...(ngDevMode ? [{ debugName: "_iconColor" }] : /* istanbul ignore next */ []));
5484
- _progressColor = signal(ALERT_PROGRESS_COLOR_MAP[this._type], ...(ngDevMode ? [{ debugName: "_progressColor" }] : /* istanbul ignore next */ []));
5485
5484
  _title = signal(this._opts.title ?? '', ...(ngDevMode ? [{ debugName: "_title" }] : /* istanbul ignore next */ []));
5486
5485
  _message = signal(this._opts.message ?? '', ...(ngDevMode ? [{ debugName: "_message" }] : /* istanbul ignore next */ []));
5487
5486
  _showCancel = signal(this._opts.showCancelButton ?? this._opts.type === 'confirm', ...(ngDevMode ? [{ debugName: "_showCancel" }] : /* istanbul ignore next */ []));
5487
+ _iconBg = computed(() => {
5488
+ if (!this._isConfirm)
5489
+ return ALERT_ICON_BG_MAP[this._type];
5490
+ return resolveColor(this._themeSvc.config().primaryColor).bgSubtle;
5491
+ }, ...(ngDevMode ? [{ debugName: "_iconBg" }] : /* istanbul ignore next */ []));
5492
+ _iconColor = computed(() => {
5493
+ if (!this._isConfirm)
5494
+ return ALERT_ICON_COLOR_MAP[this._type];
5495
+ return resolveColor(this._themeSvc.config().primaryColor).textSubtle;
5496
+ }, ...(ngDevMode ? [{ debugName: "_iconColor" }] : /* istanbul ignore next */ []));
5497
+ _progressColor = computed(() => {
5498
+ if (!this._isConfirm)
5499
+ return ALERT_PROGRESS_COLOR_MAP[this._type];
5500
+ return resolveColor(this._themeSvc.config().primaryColor).bg;
5501
+ }, ...(ngDevMode ? [{ debugName: "_progressColor" }] : /* istanbul ignore next */ []));
5488
5502
  _confirmText = signal(this._opts.confirmButton?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
5489
- _confirmColor = signal(this._opts.confirmButton?.color ?? ALERT_CONFIRM_COLOR_MAP[this._type], ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5503
+ _confirmColor = computed(() => {
5504
+ if (this._opts.confirmButton?.color)
5505
+ return this._opts.confirmButton.color;
5506
+ if (this._isConfirm)
5507
+ return this._themeSvc.config().primaryColor;
5508
+ return ALERT_CONFIRM_COLOR_MAP[this._type];
5509
+ }, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
5490
5510
  _cancelText = signal(this._opts.cancelButton?.text ?? 'Cancelar', ...(ngDevMode ? [{ debugName: "_cancelText" }] : /* istanbul ignore next */ []));
5491
- _cancelColor = signal(this._opts.cancelButton?.color ?? 'slate', ...(ngDevMode ? [{ debugName: "_cancelColor" }] : /* istanbul ignore next */ []));
5511
+ _cancelColor = computed(() => this._opts.cancelButton?.color ?? this._themeSvc.config().secondaryColor, ...(ngDevMode ? [{ debugName: "_cancelColor" }] : /* istanbul ignore next */ []));
5492
5512
  _cancelVariant = signal(this._opts.cancelButton?.variant ?? 'ghost', ...(ngDevMode ? [{ debugName: "_cancelVariant" }] : /* istanbul ignore next */ []));
5493
5513
  // ─── Timer state ─────────────────────────────────────────────────────────
5494
5514
  _timerTotal = signal(this._opts.timer ?? 0, ...(ngDevMode ? [{ debugName: "_timerTotal" }] : /* istanbul ignore next */ []));
@@ -12042,10 +12062,9 @@ class ClxMenuItemComponent {
12042
12062
  return this.nested() ? NAV_ITEM_L2 : NAV_ITEM_L1;
12043
12063
  }, ...(ngDevMode ? [{ debugName: "_geom" }] : /* istanbul ignore next */ []));
12044
12064
  _iconCls = computed(() => resolveColor(this._resolvedColor()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : /* istanbul ignore next */ []));
12045
- _idleIconCls = computed(() => NAV_ITEM_IDLE, ...(ngDevMode ? [{ debugName: "_idleIconCls" }] : /* istanbul ignore next */ []));
12046
12065
  _idleCls = computed(() => {
12047
12066
  const hover = resolveColor(this._resolvedColor()).hoverBgMuted;
12048
- return `${NAV_ITEM_BASE} ${this._geom()} ${NAV_ITEM_IDLE} ${hover}`;
12067
+ return `${NAV_ITEM_BASE} ${this._geom()} ${hover}`;
12049
12068
  }, ...(ngDevMode ? [{ debugName: "_idleCls" }] : /* istanbul ignore next */ []));
12050
12069
  _activeCls = computed(() => {
12051
12070
  const t = resolveColor(this._resolvedColor());
@@ -12065,10 +12084,10 @@ class ClxMenuItemComponent {
12065
12084
  [class]="rla.isActive ? _activeCls() : _idleCls()"
12066
12085
  [title]="collapsed() ? label() : ''">
12067
12086
  @if (icon()) {
12068
- <span clx-icon [name]="icon()" size="sm" [class]="rla.isActive ? _iconCls() : _idleIconCls()"></span>
12087
+ <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12069
12088
  }
12070
12089
  @if (!collapsed()) {
12071
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12090
+ <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12072
12091
  }
12073
12092
  </a>
12074
12093
  } @else {
@@ -12078,10 +12097,10 @@ class ClxMenuItemComponent {
12078
12097
  [title]="collapsed() ? label() : ''"
12079
12098
  (click)="itemClick.emit()">
12080
12099
  @if (icon()) {
12081
- <span clx-icon [name]="icon()" size="sm" [class]="active() ? _iconCls() : _idleIconCls()"></span>
12100
+ <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12082
12101
  }
12083
12102
  @if (!collapsed()) {
12084
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12103
+ <span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12085
12104
  }
12086
12105
  </button>
12087
12106
  }
@@ -12103,10 +12122,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12103
12122
  [class]="rla.isActive ? _activeCls() : _idleCls()"
12104
12123
  [title]="collapsed() ? label() : ''">
12105
12124
  @if (icon()) {
12106
- <span clx-icon [name]="icon()" size="sm" [class]="rla.isActive ? _iconCls() : _idleIconCls()"></span>
12125
+ <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12107
12126
  }
12108
12127
  @if (!collapsed()) {
12109
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12128
+ <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12110
12129
  }
12111
12130
  </a>
12112
12131
  } @else {
@@ -12116,10 +12135,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12116
12135
  [title]="collapsed() ? label() : ''"
12117
12136
  (click)="itemClick.emit()">
12118
12137
  @if (icon()) {
12119
- <span clx-icon [name]="icon()" size="sm" [class]="active() ? _iconCls() : _idleIconCls()"></span>
12138
+ <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12120
12139
  }
12121
12140
  @if (!collapsed()) {
12122
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12141
+ <span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12123
12142
  }
12124
12143
  </button>
12125
12144
  }
@@ -12169,7 +12188,7 @@ class ClxMenuComponent {
12169
12188
  return `${base} ${t.textSubtle} font-semibold`;
12170
12189
  return `${base} ${t.textSubtle} font-semibold border-l-2 ${t.borderLight} !pl-[22px]`;
12171
12190
  }
12172
- return `${base} ${NAV_ITEM_IDLE} ${t.hoverBgMuted}`;
12191
+ return `${base} ${t.hoverBgMuted}`;
12173
12192
  }
12174
12193
  NAV_CHILDREN_WRAPPER = NAV_CHILDREN_WRAPPER;
12175
12194
  NAV_CHILDREN_INNER = NAV_CHILDREN_INNER;
@@ -12192,7 +12211,7 @@ class ClxMenuComponent {
12192
12211
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12193
12212
  }
12194
12213
  @if (!collapsed()) {
12195
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12214
+ <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12196
12215
  <span
12197
12216
  clx-icon
12198
12217
  name="expand_more"
@@ -12212,7 +12231,7 @@ class ClxMenuComponent {
12212
12231
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12213
12232
  }
12214
12233
  @if (!collapsed()) {
12215
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12234
+ <span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12216
12235
  <span
12217
12236
  clx-icon
12218
12237
  name="expand_more"
@@ -12255,7 +12274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12255
12274
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12256
12275
  }
12257
12276
  @if (!collapsed()) {
12258
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12277
+ <span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12259
12278
  <span
12260
12279
  clx-icon
12261
12280
  name="expand_more"
@@ -12275,7 +12294,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12275
12294
  <span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
12276
12295
  }
12277
12296
  @if (!collapsed()) {
12278
- <span class="flex-1 text-left truncate">{{ label() }}</span>
12297
+ <span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
12279
12298
  <span
12280
12299
  clx-icon
12281
12300
  name="expand_more"