codexly-ui 0.6.16 → 0.6.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.
- package/fesm2022/codexly-ui.mjs +41 -9
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +26 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -564,6 +564,19 @@ class ClxThemeService {
|
|
|
564
564
|
weight: override?.weight ?? defaultWeight,
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
+
/** Resolved style for ClxPageHeaderComponent's title — falls back to the default
|
|
568
|
+
* text-clx-text-label color (no override) / 2xl / emphasis */
|
|
569
|
+
pageHeaderTitleStyle = computed(() => this._resolvePageHeaderZoneStyle(this._config().pageHeaderTitle, '2xl', 'emphasis'), ...(ngDevMode ? [{ debugName: "pageHeaderTitleStyle" }] : /* istanbul ignore next */ []));
|
|
570
|
+
/** Resolved style for ClxPageHeaderComponent's subtitle — falls back to the default
|
|
571
|
+
* text-clx-text-muted color (no override) / sm / label */
|
|
572
|
+
pageHeaderSubtitleStyle = computed(() => this._resolvePageHeaderZoneStyle(this._config().pageHeaderSubtitle, 'sm', 'label'), ...(ngDevMode ? [{ debugName: "pageHeaderSubtitleStyle" }] : /* istanbul ignore next */ []));
|
|
573
|
+
_resolvePageHeaderZoneStyle(override, defaultSize, defaultWeight) {
|
|
574
|
+
return {
|
|
575
|
+
color: override?.color,
|
|
576
|
+
size: override?.size ?? defaultSize,
|
|
577
|
+
weight: override?.weight ?? defaultWeight,
|
|
578
|
+
};
|
|
579
|
+
}
|
|
567
580
|
constructor() {
|
|
568
581
|
effect(() => {
|
|
569
582
|
if (!this._isBrowser)
|
|
@@ -9869,15 +9882,12 @@ class ClxMenuItemComponent {
|
|
|
9869
9882
|
_iconCls = computed(() => resolveColor(this._resolved().color).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : /* istanbul ignore next */ []));
|
|
9870
9883
|
_idleCls = computed(() => {
|
|
9871
9884
|
const hover = resolveColor(this._resolved().color).hoverBgMuted;
|
|
9872
|
-
return `${NAV_ITEM_BASE} ${resolveNavZoneIdle(this._resolved())} ${this._geom()} ${hover}`;
|
|
9885
|
+
return `${NAV_ITEM_BASE} ${resolveNavZoneIdle(this._resolved())} ${this._geom()} ${hover} rounded-lg`;
|
|
9873
9886
|
}, ...(ngDevMode ? [{ debugName: "_idleCls" }] : /* istanbul ignore next */ []));
|
|
9874
9887
|
_activeCls = computed(() => {
|
|
9875
9888
|
const t = resolveColor(this._resolved().color);
|
|
9876
9889
|
const typography = resolveNavZoneActive(this._resolved());
|
|
9877
|
-
|
|
9878
|
-
return `${NAV_ITEM_BASE} ${typography} ${this._geom()} ${t.textSubtle}`;
|
|
9879
|
-
}
|
|
9880
|
-
return `${NAV_ITEM_BASE} ${typography} ${this._geom()} ${t.textSubtle} border-l-2 ${t.borderLight} !pl-[22px] ${t.hoverBgMuted}`;
|
|
9890
|
+
return `${NAV_ITEM_BASE} ${typography} ${this._geom()} ${t.textSubtle} ${t.bgSubtle} rounded-lg`;
|
|
9881
9891
|
}, ...(ngDevMode ? [{ debugName: "_activeCls" }] : /* istanbul ignore next */ []));
|
|
9882
9892
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9883
9893
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMenuItemComponent, isStandalone: true, selector: "clx-menu-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, nested: { classPropertyName: "nested", publicName: "nested", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
@@ -10012,6 +10022,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
10012
10022
|
args: [{ selector: '[clxPageHeaderTitle]', standalone: true }]
|
|
10013
10023
|
}] });
|
|
10014
10024
|
|
|
10025
|
+
const TEXT_SIZE_CLASS = {
|
|
10026
|
+
sm: 'text-sm',
|
|
10027
|
+
base: 'text-base',
|
|
10028
|
+
lg: 'text-lg',
|
|
10029
|
+
xl: 'text-xl',
|
|
10030
|
+
'2xl': 'text-2xl',
|
|
10031
|
+
'3xl': 'text-3xl',
|
|
10032
|
+
};
|
|
10033
|
+
const WEIGHT_CLASS = {
|
|
10034
|
+
label: 'font-(--clx-font-weight-label)',
|
|
10035
|
+
emphasis: 'font-(--clx-font-weight-emphasis)',
|
|
10036
|
+
};
|
|
10015
10037
|
/**
|
|
10016
10038
|
* Standard page title block: an optional back button, title + optional subtitle on the
|
|
10017
10039
|
* left, a free-content slot (button, select, badge...) on the right. Replaces the
|
|
@@ -10031,6 +10053,16 @@ class ClxPageHeaderComponent {
|
|
|
10031
10053
|
_titleSlot = contentChild(ClxPageHeaderTitleDirective, ...(ngDevMode ? [{ debugName: "_titleSlot" }] : /* istanbul ignore next */ []));
|
|
10032
10054
|
_hasCustomTitle = computed(() => !!this._titleSlot(), ...(ngDevMode ? [{ debugName: "_hasCustomTitle" }] : /* istanbul ignore next */ []));
|
|
10033
10055
|
_color = computed(() => this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
|
|
10056
|
+
_titleClass = computed(() => {
|
|
10057
|
+
const s = this._themeSvc.pageHeaderTitleStyle();
|
|
10058
|
+
const colorCls = s.color ? resolveColor(s.color).textSubtle : 'text-clx-text-label';
|
|
10059
|
+
return `${TEXT_SIZE_CLASS[s.size]} ${WEIGHT_CLASS[s.weight]} ${colorCls} truncate`;
|
|
10060
|
+
}, ...(ngDevMode ? [{ debugName: "_titleClass" }] : /* istanbul ignore next */ []));
|
|
10061
|
+
_subtitleClass = computed(() => {
|
|
10062
|
+
const s = this._themeSvc.pageHeaderSubtitleStyle();
|
|
10063
|
+
const colorCls = s.color ? resolveColor(s.color).textSubtle : 'text-clx-text-muted';
|
|
10064
|
+
return `${TEXT_SIZE_CLASS[s.size]} ${WEIGHT_CLASS[s.weight]} ${colorCls} mt-0.5`;
|
|
10065
|
+
}, ...(ngDevMode ? [{ debugName: "_subtitleClass" }] : /* istanbul ignore next */ []));
|
|
10034
10066
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10035
10067
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxPageHeaderComponent, isStandalone: true, selector: "clx-page-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, showBack: { classPropertyName: "showBack", publicName: "showBack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { back: "back" }, host: { classAttribute: "flex items-center gap-3 flex-wrap" }, queries: [{ propertyName: "_titleSlot", first: true, predicate: ClxPageHeaderTitleDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
10036
10068
|
@if (showBack()) {
|
|
@@ -10045,9 +10077,9 @@ class ClxPageHeaderComponent {
|
|
|
10045
10077
|
</div>
|
|
10046
10078
|
} @else {
|
|
10047
10079
|
<div class="min-w-0">
|
|
10048
|
-
<h1 class="
|
|
10080
|
+
<h1 [class]="_titleClass()">{{ title() }}</h1>
|
|
10049
10081
|
@if (subtitle()) {
|
|
10050
|
-
<p class="
|
|
10082
|
+
<p [class]="_subtitleClass()">{{ subtitle() }}</p>
|
|
10051
10083
|
}
|
|
10052
10084
|
</div>
|
|
10053
10085
|
}
|
|
@@ -10077,9 +10109,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
10077
10109
|
</div>
|
|
10078
10110
|
} @else {
|
|
10079
10111
|
<div class="min-w-0">
|
|
10080
|
-
<h1 class="
|
|
10112
|
+
<h1 [class]="_titleClass()">{{ title() }}</h1>
|
|
10081
10113
|
@if (subtitle()) {
|
|
10082
|
-
<p class="
|
|
10114
|
+
<p [class]="_subtitleClass()">{{ subtitle() }}</p>
|
|
10083
10115
|
}
|
|
10084
10116
|
</div>
|
|
10085
10117
|
}
|