codexly-ui 0.1.16 → 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 */ []));