codexly-ui 0.18.3 → 0.19.1
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.
package/assets/styles/_theme.css
CHANGED
|
@@ -41,13 +41,15 @@
|
|
|
41
41
|
--clx-backdrop-modal: rgba(15, 23, 42, 0.40);
|
|
42
42
|
--clx-backdrop-alert: rgba(15, 23, 42, 0.45);
|
|
43
43
|
|
|
44
|
-
/* ── Scrollbar ── */
|
|
45
|
-
--clx-scrollbar: #cbd5e1; /* slate-300 */
|
|
46
|
-
--clx-scrollbar-hover: #94a3b8; /* slate-400 */
|
|
47
|
-
|
|
48
44
|
/* ── Theme accents (overridden dynamically by ClxThemeService) ── */
|
|
49
45
|
--clx-secondary: #64748b; /* slate-500 */
|
|
50
46
|
--clx-secondary-light: #f1f5f9; /* slate-100 */
|
|
47
|
+
|
|
48
|
+
/* ── Scrollbar (overridden dynamically by ClxThemeService from scrollColor — own tokens,
|
|
49
|
+
not shared with --clx-primary/--clx-secondary, so its own "resting" shade doesn't
|
|
50
|
+
have to compromise with what those need for badges/hover fills elsewhere) ── */
|
|
51
|
+
--clx-scroll: #94a3b8; /* slate-400 — hover */
|
|
52
|
+
--clx-scroll-light: #cbd5e1; /* slate-300 — resting state */
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
/* ── Dark theme ───────────────────────────────────────────────────────────── */
|
|
@@ -81,9 +83,9 @@
|
|
|
81
83
|
--clx-backdrop-modal: rgba(2, 6, 23, 0.65);
|
|
82
84
|
--clx-backdrop-alert: rgba(2, 6, 23, 0.70);
|
|
83
85
|
|
|
84
|
-
/* ── Scrollbar ── */
|
|
85
|
-
--clx-
|
|
86
|
-
--clx-
|
|
86
|
+
/* ── Scrollbar (see :root for why these are independent of --clx-secondary) ── */
|
|
87
|
+
--clx-scroll: #475569; /* slate-600 — hover */
|
|
88
|
+
--clx-scroll-light: #334155; /* slate-700 — resting state */
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
/* ── Tailwind v4: registrar vars como colores utilitarios ─────────────────── */
|
package/assets/styles/styles.css
CHANGED
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
::-webkit-scrollbar-thumb {
|
|
50
|
-
background-color: var(--clx-
|
|
50
|
+
background-color: var(--clx-scroll-light);
|
|
51
51
|
border-radius: 0.5rem;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
::-webkit-scrollbar-thumb:hover {
|
|
55
|
-
background-color: var(--clx-
|
|
55
|
+
background-color: var(--clx-scroll);
|
|
56
56
|
}
|
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -705,7 +705,9 @@ class ClxThemeService {
|
|
|
705
705
|
const cfg = this._config();
|
|
706
706
|
this._applyColorVar('--clx-primary', '--clx-primary-light', cfg.primaryColor);
|
|
707
707
|
this._applyColorVar('--clx-secondary', '--clx-secondary-light', cfg.secondaryColor);
|
|
708
|
-
|
|
708
|
+
// lightShade 300 (not the default 100) — see _applyColorVar's own doc comment on why a
|
|
709
|
+
// scrollbar's resting state can't share primary/secondary's much lighter "light" shade.
|
|
710
|
+
this._applyColorVar('--clx-scroll', '--clx-scroll-light', cfg.scrollColor ?? cfg.primaryColor, 300);
|
|
709
711
|
this._applyTextColor(cfg.textColor, this.isDark());
|
|
710
712
|
});
|
|
711
713
|
effect(() => {
|
|
@@ -735,13 +737,19 @@ class ClxThemeService {
|
|
|
735
737
|
toggle() {
|
|
736
738
|
this.setMode(this.isDark() ? 'light' : 'dark');
|
|
737
739
|
}
|
|
738
|
-
|
|
740
|
+
/** lightShade defaults to 100 — right for primary/secondary, whose "light" variant backs
|
|
741
|
+
* subtle badge/hover fills meant to barely tint a surface. A scrollbar thumb needs its own
|
|
742
|
+
* resting-state shade instead: shade 100 of any color reads as nearly invisible against an
|
|
743
|
+
* off-white page background regardless of which color/shade was configured (confirmed with
|
|
744
|
+
* scrollColor: 'slate-400' and 'slate-500' alike — the shade passed in never reached the
|
|
745
|
+
* resting state at all, only the hover one). */
|
|
746
|
+
_applyColorVar(varName, lightVarName, input, lightShade = 100) {
|
|
739
747
|
if (!input)
|
|
740
748
|
return;
|
|
741
749
|
const { color, shade } = parseColorInput(input);
|
|
742
750
|
document.documentElement.style.setProperty(varName, resolvePaletteHex(color, shade));
|
|
743
751
|
if (lightVarName) {
|
|
744
|
-
document.documentElement.style.setProperty(lightVarName, resolvePaletteHex(color,
|
|
752
|
+
document.documentElement.style.setProperty(lightVarName, resolvePaletteHex(color, lightShade));
|
|
745
753
|
}
|
|
746
754
|
}
|
|
747
755
|
_applyTextColor(input, dark) {
|
|
@@ -11069,7 +11077,7 @@ class ClxAppLayoutComponent {
|
|
|
11069
11077
|
openSidebar() { this._sidebarOpen.set(true); }
|
|
11070
11078
|
closeSidebar() { this._sidebarOpen.set(false); }
|
|
11071
11079
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxAppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11072
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxAppLayoutComponent, isStandalone: true, selector: "clx-app-layout", inputs: { activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsedChange: "collapsedChange", expandedChange: "expandedChange" }, host: { classAttribute: "flex h-
|
|
11080
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxAppLayoutComponent, isStandalone: true, selector: "clx-app-layout", inputs: { activeColor: { classPropertyName: "activeColor", publicName: "activeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsedChange: "collapsedChange", expandedChange: "expandedChange" }, host: { classAttribute: "flex h-dvh overflow-hidden" }, ngImport: i0, template: `
|
|
11073
11081
|
<!-- Mobile backdrop -->
|
|
11074
11082
|
@if (_showBackdrop()) {
|
|
11075
11083
|
<div
|
|
@@ -11188,7 +11196,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11188
11196
|
`,
|
|
11189
11197
|
encapsulation: ViewEncapsulation.None,
|
|
11190
11198
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11191
|
-
|
|
11199
|
+
// h-dvh (dynamic viewport height), not h-screen (100vh): on Android Chrome, 100vh is computed
|
|
11200
|
+
// against the *largest* viewport (as if the address bar / nav buttons were hidden), so once that
|
|
11201
|
+
// browser chrome is actually on-screen the host is taller than what's visible — clipping the
|
|
11202
|
+
// bottom of <main>'s scrollable content (e.g. a table's pagination footer) below the fold even
|
|
11203
|
+
// though the content itself scrolls fine. 100dvh tracks the real visible viewport instead.
|
|
11204
|
+
host: { class: 'flex h-dvh overflow-hidden' },
|
|
11192
11205
|
}]
|
|
11193
11206
|
}], ctorParameters: () => [], propDecorators: { activeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeColor", required: false }] }], collapsedChange: [{ type: i0.Output, args: ["collapsedChange"] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }] } });
|
|
11194
11207
|
|