codexly-ui 0.15.9 → 0.15.11
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.
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
/* ring (default): ring-{c}-{s}/30 */
|
|
22
22
|
@source inline("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}/30");
|
|
23
23
|
|
|
24
|
+
/* ClxStatCardComponent's 'banner' layout: solid gradient fill built from bgBase/bgDark
|
|
25
|
+
(bg-{c}-{s} / bg-{c}-{darker 2 steps}), string-replaced to from-/to- at runtime. */
|
|
26
|
+
@source inline("bg-gradient-to-br");
|
|
27
|
+
@source inline("{from,to}-{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}");
|
|
28
|
+
@source inline("from-white/80 to-white/80 from-white to-white");
|
|
29
|
+
|
|
24
30
|
/* 'white' special-case tokens (WHITE_TOKENS in clx-color.types.ts) */
|
|
25
31
|
@source inline("{bg,hover:bg,focus:ring,focus-within:ring,border,focus:border,focus-within:border,hover:border,border-t}-{white,black,transparent}");
|
|
26
32
|
@source inline("border-white/30 border-t-white bg-white/10 bg-white/30 bg-white/80 border-white/20 border-white/50 border-white/80 text-white/60 text-white/70 ring-white/30 ring-white/40 ring-white/20 hover:bg-gray-100 text-gray-900");
|
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -15955,7 +15955,6 @@ class ClxStatCardComponent {
|
|
|
15955
15955
|
color = input('indigo', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
15956
15956
|
layout = input('horizontal', ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
15957
15957
|
_hostClass = computed(() => {
|
|
15958
|
-
const border = resolveColor(this.color()).borderLight;
|
|
15959
15958
|
const radius = resolveContainerRadius(this._themeSvc.config().borderRadius);
|
|
15960
15959
|
// h-full + justify-center so a parent grid cell taller than this card's natural content
|
|
15961
15960
|
// centers it instead of stretching it — but the card must never grow past h-full (no
|
|
@@ -15963,12 +15962,18 @@ class ClxStatCardComponent {
|
|
|
15963
15962
|
// grid's own row gap/next row visually even though the grid's gap value is unchanged. Instead
|
|
15964
15963
|
// every layout's internal content (padding/icon/font sizes below) is kept compact enough to
|
|
15965
15964
|
// actually fit the grid's default rowHeight (92px × h).
|
|
15966
|
-
const
|
|
15967
|
-
//
|
|
15968
|
-
// so
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
|
|
15965
|
+
const sizing = `${radius} shadow-md p-3 w-full h-full justify-center overflow-hidden min-w-[200px]`;
|
|
15966
|
+
// banner is a solid gradient fill in the chosen color (no border, no surface bg — it IS the
|
|
15967
|
+
// color) so it reads as a distinct "announcement" card rather than another bordered tile.
|
|
15968
|
+
const surface = this.layout() === 'banner'
|
|
15969
|
+
? `bg-gradient-to-br ${resolveColor(this.color()).bgBase.replace('bg-', 'from-')} ${resolveColor(this.color()).bgDark.replace('bg-', 'to-')}`
|
|
15970
|
+
: `bg-clx-surface border ${resolveColor(this.color()).borderLight}`;
|
|
15971
|
+
// horizontal, bar and corner each stack a full-width row above another (flex-col) — corner's
|
|
15972
|
+
// top row (badge/icon) and bottom row (value/title) never share space either; vertical and
|
|
15973
|
+
// banner are a single side-by-side row (flex items-center) with no stacking needed.
|
|
15974
|
+
const stacked = this.layout() === 'horizontal' || this.layout() === 'bar' || this.layout() === 'corner';
|
|
15975
|
+
const layoutCls = stacked ? 'flex flex-col gap-2' : 'flex items-center gap-3';
|
|
15976
|
+
return `${layoutCls} ${surface} ${sizing}`;
|
|
15972
15977
|
}, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
|
|
15973
15978
|
_barHeights = computed(() => {
|
|
15974
15979
|
const data = this.chartData();
|
|
@@ -16140,6 +16145,49 @@ class ClxStatCardComponent {
|
|
|
16140
16145
|
}
|
|
16141
16146
|
}
|
|
16142
16147
|
|
|
16148
|
+
@if (layout() === 'banner') {
|
|
16149
|
+
<!-- Solid gradient fill in the chosen color (not the subtle chip the other layouts use) —
|
|
16150
|
+
icon sits in a translucent chip, title+value in white. Stands out by color, not width. -->
|
|
16151
|
+
<div class="shrink-0 w-10.5 h-10.5 rounded-[11px] flex items-center justify-center bg-white/20">
|
|
16152
|
+
<span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
|
|
16153
|
+
</div>
|
|
16154
|
+
<div class="min-w-0 flex-1">
|
|
16155
|
+
<p class="text-xs text-white/75 truncate">{{ metric().title }}</p>
|
|
16156
|
+
<p class="text-lg font-bold text-white leading-tight">{{ _formattedValue() }}</p>
|
|
16157
|
+
</div>
|
|
16158
|
+
@if (_hasTrend()) {
|
|
16159
|
+
<span class="shrink-0 inline-flex items-center gap-1 text-[10.5px] font-semibold px-2 py-0.5 rounded-full bg-white/20 text-white">
|
|
16160
|
+
<span clx-icon [name]="_trendIcon()" size="xxs"></span>
|
|
16161
|
+
{{ metric().trend }}
|
|
16162
|
+
</span>
|
|
16163
|
+
}
|
|
16164
|
+
}
|
|
16165
|
+
|
|
16166
|
+
@if (layout() === 'corner') {
|
|
16167
|
+
<!-- Diagonal composition: trend badge top-left, icon top-right, value+label bottom-left. -->
|
|
16168
|
+
<div class="w-full flex items-start justify-between">
|
|
16169
|
+
@if (_hasTrend()) {
|
|
16170
|
+
<span clx-badge
|
|
16171
|
+
[color]="_trendColor()"
|
|
16172
|
+
variant="light"
|
|
16173
|
+
shape="pill"
|
|
16174
|
+
class="gap-1">
|
|
16175
|
+
<span clx-icon [name]="_trendIcon()" size="xxs"></span>
|
|
16176
|
+
{{ metric().trend }}
|
|
16177
|
+
</span>
|
|
16178
|
+
} @else {
|
|
16179
|
+
<span></span>
|
|
16180
|
+
}
|
|
16181
|
+
<div class="shrink-0 w-8.5 h-8.5 rounded-[9px] flex items-center justify-center" [class]="_iconBg()">
|
|
16182
|
+
<span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
|
|
16183
|
+
</div>
|
|
16184
|
+
</div>
|
|
16185
|
+
<div class="w-full flex flex-col gap-0.5">
|
|
16186
|
+
<span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
|
|
16187
|
+
<span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
|
|
16188
|
+
</div>
|
|
16189
|
+
}
|
|
16190
|
+
|
|
16143
16191
|
@if (layout() === 'vertical') {
|
|
16144
16192
|
<!-- Col izquierda: badge + valor + título -->
|
|
16145
16193
|
<div class="flex flex-col justify-between flex-1 min-w-0 gap-1">
|
|
@@ -16259,6 +16307,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16259
16307
|
}
|
|
16260
16308
|
}
|
|
16261
16309
|
|
|
16310
|
+
@if (layout() === 'banner') {
|
|
16311
|
+
<!-- Solid gradient fill in the chosen color (not the subtle chip the other layouts use) —
|
|
16312
|
+
icon sits in a translucent chip, title+value in white. Stands out by color, not width. -->
|
|
16313
|
+
<div class="shrink-0 w-10.5 h-10.5 rounded-[11px] flex items-center justify-center bg-white/20">
|
|
16314
|
+
<span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
|
|
16315
|
+
</div>
|
|
16316
|
+
<div class="min-w-0 flex-1">
|
|
16317
|
+
<p class="text-xs text-white/75 truncate">{{ metric().title }}</p>
|
|
16318
|
+
<p class="text-lg font-bold text-white leading-tight">{{ _formattedValue() }}</p>
|
|
16319
|
+
</div>
|
|
16320
|
+
@if (_hasTrend()) {
|
|
16321
|
+
<span class="shrink-0 inline-flex items-center gap-1 text-[10.5px] font-semibold px-2 py-0.5 rounded-full bg-white/20 text-white">
|
|
16322
|
+
<span clx-icon [name]="_trendIcon()" size="xxs"></span>
|
|
16323
|
+
{{ metric().trend }}
|
|
16324
|
+
</span>
|
|
16325
|
+
}
|
|
16326
|
+
}
|
|
16327
|
+
|
|
16328
|
+
@if (layout() === 'corner') {
|
|
16329
|
+
<!-- Diagonal composition: trend badge top-left, icon top-right, value+label bottom-left. -->
|
|
16330
|
+
<div class="w-full flex items-start justify-between">
|
|
16331
|
+
@if (_hasTrend()) {
|
|
16332
|
+
<span clx-badge
|
|
16333
|
+
[color]="_trendColor()"
|
|
16334
|
+
variant="light"
|
|
16335
|
+
shape="pill"
|
|
16336
|
+
class="gap-1">
|
|
16337
|
+
<span clx-icon [name]="_trendIcon()" size="xxs"></span>
|
|
16338
|
+
{{ metric().trend }}
|
|
16339
|
+
</span>
|
|
16340
|
+
} @else {
|
|
16341
|
+
<span></span>
|
|
16342
|
+
}
|
|
16343
|
+
<div class="shrink-0 w-8.5 h-8.5 rounded-[9px] flex items-center justify-center" [class]="_iconBg()">
|
|
16344
|
+
<span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
|
|
16345
|
+
</div>
|
|
16346
|
+
</div>
|
|
16347
|
+
<div class="w-full flex flex-col gap-0.5">
|
|
16348
|
+
<span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
|
|
16349
|
+
<span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
|
|
16350
|
+
</div>
|
|
16351
|
+
}
|
|
16352
|
+
|
|
16262
16353
|
@if (layout() === 'vertical') {
|
|
16263
16354
|
<!-- Col izquierda: badge + valor + título -->
|
|
16264
16355
|
<div class="flex flex-col justify-between flex-1 min-w-0 gap-1">
|