codexly-ui 0.7.4 → 0.8.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/fesm2022/codexly-ui.mjs +29 -4
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +27 -7
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -577,6 +577,14 @@ class ClxThemeService {
|
|
|
577
577
|
cardTitleStyle = computed(() => ({
|
|
578
578
|
weight: this._config().cardTitle?.weight ?? 600,
|
|
579
579
|
}), ...(ngDevMode ? [{ debugName: "cardTitleStyle" }] : /* istanbul ignore next */ []));
|
|
580
|
+
/** Resolved style for ClxListItemComponent's [clxContent] label — falls back to 600 */
|
|
581
|
+
listItemLabelStyle = computed(() => ({
|
|
582
|
+
weight: this._config().listItemLabel?.weight ?? 600,
|
|
583
|
+
}), ...(ngDevMode ? [{ debugName: "listItemLabelStyle" }] : /* istanbul ignore next */ []));
|
|
584
|
+
/** Resolved style for ClxTimelineItemComponent's event title — falls back to 600 */
|
|
585
|
+
timelineTitleStyle = computed(() => ({
|
|
586
|
+
weight: this._config().timelineTitle?.weight ?? 600,
|
|
587
|
+
}), ...(ngDevMode ? [{ debugName: "timelineTitleStyle" }] : /* istanbul ignore next */ []));
|
|
580
588
|
constructor() {
|
|
581
589
|
effect(() => {
|
|
582
590
|
if (!this._isBrowser)
|
|
@@ -591,6 +599,12 @@ class ClxThemeService {
|
|
|
591
599
|
this._applyColorVar('--clx-secondary', '--clx-secondary-light', cfg.secondaryColor);
|
|
592
600
|
this._applyTextColor(cfg.textColor, this.isDark());
|
|
593
601
|
});
|
|
602
|
+
effect(() => {
|
|
603
|
+
if (!this._isBrowser)
|
|
604
|
+
return;
|
|
605
|
+
document.documentElement.style.setProperty('--clx-listitem-label-weight', String(this.listItemLabelStyle().weight));
|
|
606
|
+
document.documentElement.style.setProperty('--clx-timeline-title-weight', String(this.timelineTitleStyle().weight));
|
|
607
|
+
});
|
|
594
608
|
effect(() => {
|
|
595
609
|
if (!this._isBrowser)
|
|
596
610
|
return;
|
|
@@ -1552,7 +1566,7 @@ class ClxListItemComponent {
|
|
|
1552
1566
|
}, ...(ngDevMode ? [{ debugName: "_numberClass" }] : /* istanbul ignore next */ []));
|
|
1553
1567
|
_labelClass = computed(() => {
|
|
1554
1568
|
const { label } = this._ctx.sizeTokens();
|
|
1555
|
-
const weight = this.sublabel() ?
|
|
1569
|
+
const weight = this.sublabel() ? `font-[${this._themeSvc.listItemLabelStyle().weight}]` : 'font-normal';
|
|
1556
1570
|
return `${weight} text-clx-text-label truncate ${label}`;
|
|
1557
1571
|
}, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
|
|
1558
1572
|
_metaClass = computed(() => {
|
|
@@ -2151,7 +2165,7 @@ class ClxTimelineItemComponent {
|
|
|
2151
2165
|
|
|
2152
2166
|
<div [class]="'flex-1 min-w-0 ' + _ctx.sizeTokens().contentPb">
|
|
2153
2167
|
<div class="flex items-start justify-between gap-2">
|
|
2154
|
-
<p [class]="'font-
|
|
2168
|
+
<p [class]="'font-(--clx-timeline-title-weight) text-clx-text-label leading-snug ' + _ctx.sizeTokens().title">
|
|
2155
2169
|
{{ title() }}
|
|
2156
2170
|
</p>
|
|
2157
2171
|
@if (time()) {
|
|
@@ -2183,7 +2197,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2183
2197
|
|
|
2184
2198
|
<div [class]="'flex-1 min-w-0 ' + _ctx.sizeTokens().contentPb">
|
|
2185
2199
|
<div class="flex items-start justify-between gap-2">
|
|
2186
|
-
<p [class]="'font-
|
|
2200
|
+
<p [class]="'font-(--clx-timeline-title-weight) text-clx-text-label leading-snug ' + _ctx.sizeTokens().title">
|
|
2187
2201
|
{{ title() }}
|
|
2188
2202
|
</p>
|
|
2189
2203
|
@if (time()) {
|
|
@@ -9865,9 +9879,20 @@ class ClxMenuItemComponent {
|
|
|
9865
9879
|
}, ...(ngDevMode ? [{ debugName: "_geom" }] : /* istanbul ignore next */ []));
|
|
9866
9880
|
_iconCls = computed(() => resolveColor(this._resolved().color).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : /* istanbul ignore next */ []));
|
|
9867
9881
|
_typography = computed(() => resolveNavZoneTypography(this._resolved()), ...(ngDevMode ? [{ debugName: "_typography" }] : /* istanbul ignore next */ []));
|
|
9868
|
-
|
|
9882
|
+
// Nested items (children under a clx-menu module) stay flat — only the label/icon color
|
|
9883
|
+
// changes. Top-level items (e.g. Dashboard) get the same hover/active pill as clx-menu.
|
|
9884
|
+
_idleCls = computed(() => {
|
|
9885
|
+
if (!this.nested()) {
|
|
9886
|
+
const hover = resolveColor(this._resolved().color).hoverBgMuted;
|
|
9887
|
+
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()} ${hover} rounded-lg`;
|
|
9888
|
+
}
|
|
9889
|
+
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()}`;
|
|
9890
|
+
}, ...(ngDevMode ? [{ debugName: "_idleCls" }] : /* istanbul ignore next */ []));
|
|
9869
9891
|
_activeCls = computed(() => {
|
|
9870
9892
|
const t = resolveColor(this._resolved().color);
|
|
9893
|
+
if (!this.nested()) {
|
|
9894
|
+
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()} ${t.textSubtle} ${t.bgMuted} rounded-lg`;
|
|
9895
|
+
}
|
|
9871
9896
|
return `${NAV_ITEM_BASE} ${this._typography()} ${this._geom()} ${t.textSubtle}`;
|
|
9872
9897
|
}, ...(ngDevMode ? [{ debugName: "_activeCls" }] : /* istanbul ignore next */ []));
|
|
9873
9898
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|