codexly-ui 0.1.16 → 0.1.18
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.
|
@@ -27,6 +27,12 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
/* ── Suppress transitions during window resize ───────────────────────────── */
|
|
31
|
+
html.clx-resizing *, html.clx-resizing *::before, html.clx-resizing *::after {
|
|
32
|
+
transition: none !important;
|
|
33
|
+
animation: none !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
/* ── Scrollbar ───────────────────────────────────────────────────────────── */
|
|
31
37
|
::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; }
|
|
32
38
|
::-webkit-scrollbar-track { background-color: transparent; }
|
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -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 =
|
|
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 =
|
|
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 */ []));
|
|
@@ -11799,6 +11819,8 @@ class ClxAppLayoutComponent {
|
|
|
11799
11819
|
}, ...(ngDevMode ? [{ debugName: "_sidebarCls" }] : /* istanbul ignore next */ []));
|
|
11800
11820
|
_mql;
|
|
11801
11821
|
_mqlListener;
|
|
11822
|
+
_resizeTimer = null;
|
|
11823
|
+
_resizeListener;
|
|
11802
11824
|
ngOnInit() {
|
|
11803
11825
|
const win = this._document.defaultView;
|
|
11804
11826
|
if (!win)
|
|
@@ -11821,9 +11843,26 @@ class ClxAppLayoutComponent {
|
|
|
11821
11843
|
});
|
|
11822
11844
|
};
|
|
11823
11845
|
this._mql.addEventListener('change', this._mqlListener);
|
|
11846
|
+
// Disable CSS transitions during window resize to prevent jank
|
|
11847
|
+
this._resizeListener = () => {
|
|
11848
|
+
this._document.documentElement.classList.add('clx-resizing');
|
|
11849
|
+
if (this._resizeTimer !== null)
|
|
11850
|
+
clearTimeout(this._resizeTimer);
|
|
11851
|
+
this._resizeTimer = setTimeout(() => {
|
|
11852
|
+
this._document.documentElement.classList.remove('clx-resizing');
|
|
11853
|
+
this._resizeTimer = null;
|
|
11854
|
+
}, 150);
|
|
11855
|
+
};
|
|
11856
|
+
this._zone.runOutsideAngular(() => {
|
|
11857
|
+
win.addEventListener('resize', this._resizeListener, { passive: true });
|
|
11858
|
+
});
|
|
11824
11859
|
}
|
|
11825
11860
|
ngOnDestroy() {
|
|
11826
11861
|
this._mql?.removeEventListener('change', this._mqlListener);
|
|
11862
|
+
const win = this._document.defaultView;
|
|
11863
|
+
win?.removeEventListener('resize', this._resizeListener);
|
|
11864
|
+
if (this._resizeTimer !== null)
|
|
11865
|
+
clearTimeout(this._resizeTimer);
|
|
11827
11866
|
}
|
|
11828
11867
|
_toggleCollapsed() {
|
|
11829
11868
|
const next = !this.collapsed();
|