codexly-ui 0.7.3 → 0.7.5
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.
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
resolveColor().border by replacing "border-" with "border-t-" at runtime. */
|
|
13
13
|
@source inline("{bg,text,border,border-t,hover:bg,hover:text,hover:border,focus:border,focus-within:border,focus-visible:ring}-{red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose,slate,gray,zinc,neutral,stone}-{50,100,200,300,400,500,600,700,800,900,950}");
|
|
14
14
|
|
|
15
|
-
/* hoverBgMuted: hover
|
|
16
|
-
@source inline("hover:bg-{red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose,slate,gray,zinc,neutral,stone}-{50,100,200,300,400,500,600,700,800,900,950}/10");
|
|
15
|
+
/* hoverBgMuted / bgMuted: {hover:,}bg-{c}-{s}/10 */
|
|
16
|
+
@source inline("{hover:bg,bg}-{red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose,slate,gray,zinc,neutral,stone}-{50,100,200,300,400,500,600,700,800,900,950}/10");
|
|
17
17
|
|
|
18
18
|
/* focus/focus-within ring: focus:ring-{c}-{s}/20, focus-within:ring-{c}-{s}/20 */
|
|
19
19
|
@source inline("{focus:ring,focus-within:ring}-{red,orange,amber,yellow,lime,green,emerald,teal,cyan,sky,blue,indigo,violet,purple,fuchsia,pink,rose,slate,gray,zinc,neutral,stone}-{50,100,200,300,400,500,600,700,800,900,950}/20");
|
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -49,6 +49,7 @@ function resolveColor(input) {
|
|
|
49
49
|
// ── New semantic tokens ─────────────────────────────────────────────────
|
|
50
50
|
bg: `bg-${c}-${s}`,
|
|
51
51
|
bgSubtle: `bg-${c}-${subtleS}`,
|
|
52
|
+
bgMuted: `bg-${c}-${s}/10`,
|
|
52
53
|
text: textOn,
|
|
53
54
|
textSubtle: `text-${c}-${s}`,
|
|
54
55
|
border: `border-${c}-${s}`,
|
|
@@ -91,6 +92,7 @@ function resolveColor(input) {
|
|
|
91
92
|
const WHITE_TOKENS = {
|
|
92
93
|
bg: 'bg-white',
|
|
93
94
|
bgSubtle: 'bg-white/10',
|
|
95
|
+
bgMuted: 'bg-white/10',
|
|
94
96
|
text: 'text-gray-900',
|
|
95
97
|
textSubtle: 'text-white',
|
|
96
98
|
border: 'border-white',
|
|
@@ -9697,11 +9699,10 @@ class ClxMenuComponent {
|
|
|
9697
9699
|
const geom = this.collapsed() ? NAV_ITEM_COLLAPSED : NAV_ITEM_L1;
|
|
9698
9700
|
const t = resolveColor(this._color());
|
|
9699
9701
|
const typography = resolveNavZoneTypography(this._resolved());
|
|
9700
|
-
// Active state reuses the same light hover
|
|
9701
|
-
//
|
|
9702
|
-
const activeBg = t.hoverBgMuted.replace('hover:', '');
|
|
9702
|
+
// Active state reuses the same light tint as hover (bgMuted) instead of the darker
|
|
9703
|
+
// bgSubtle token, so selected and hovered read as the same shade.
|
|
9703
9704
|
if (isActive) {
|
|
9704
|
-
return `${NAV_ITEM_BASE} ${typography} ${geom} ${t.textSubtle} ${
|
|
9705
|
+
return `${NAV_ITEM_BASE} ${typography} ${geom} ${t.textSubtle} ${t.bgMuted} rounded-lg`;
|
|
9705
9706
|
}
|
|
9706
9707
|
return `${NAV_ITEM_BASE} ${typography} ${geom} ${t.hoverBgMuted} rounded-lg`;
|
|
9707
9708
|
}
|
|
@@ -9864,9 +9865,20 @@ class ClxMenuItemComponent {
|
|
|
9864
9865
|
}, ...(ngDevMode ? [{ debugName: "_geom" }] : /* istanbul ignore next */ []));
|
|
9865
9866
|
_iconCls = computed(() => resolveColor(this._resolved().color).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : /* istanbul ignore next */ []));
|
|
9866
9867
|
_typography = computed(() => resolveNavZoneTypography(this._resolved()), ...(ngDevMode ? [{ debugName: "_typography" }] : /* istanbul ignore next */ []));
|
|
9867
|
-
|
|
9868
|
+
// Nested items (children under a clx-menu module) stay flat — only the label/icon color
|
|
9869
|
+
// changes. Top-level items (e.g. Dashboard) get the same hover/active pill as clx-menu.
|
|
9870
|
+
_idleCls = computed(() => {
|
|
9871
|
+
if (!this.nested()) {
|
|
9872
|
+
const hover = resolveColor(this._resolved().color).hoverBgMuted;
|
|
9873
|
+
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()} ${hover} rounded-lg`;
|
|
9874
|
+
}
|
|
9875
|
+
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()}`;
|
|
9876
|
+
}, ...(ngDevMode ? [{ debugName: "_idleCls" }] : /* istanbul ignore next */ []));
|
|
9868
9877
|
_activeCls = computed(() => {
|
|
9869
9878
|
const t = resolveColor(this._resolved().color);
|
|
9879
|
+
if (!this.nested()) {
|
|
9880
|
+
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()} ${t.textSubtle} ${t.bgMuted} rounded-lg`;
|
|
9881
|
+
}
|
|
9870
9882
|
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()} ${t.textSubtle}`;
|
|
9871
9883
|
}, ...(ngDevMode ? [{ debugName: "_activeCls" }] : /* istanbul ignore next */ []));
|
|
9872
9884
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|