codexly-ui 0.18.3 → 0.19.0
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) {
|