codexly-ui 0.15.7 → 0.15.9
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 +67 -55
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -15957,13 +15957,17 @@ class ClxStatCardComponent {
|
|
|
15957
15957
|
_hostClass = computed(() => {
|
|
15958
15958
|
const border = resolveColor(this.color()).borderLight;
|
|
15959
15959
|
const radius = resolveContainerRadius(this._themeSvc.config().borderRadius);
|
|
15960
|
-
// h-full
|
|
15961
|
-
//
|
|
15962
|
-
//
|
|
15963
|
-
|
|
15964
|
-
//
|
|
15965
|
-
//
|
|
15966
|
-
const
|
|
15960
|
+
// h-full + justify-center so a parent grid cell taller than this card's natural content
|
|
15961
|
+
// centers it instead of stretching it — but the card must never grow past h-full (no
|
|
15962
|
+
// min-h-fit here): a parent CSS Grid cell is a hard size, and overflowing it eats into the
|
|
15963
|
+
// grid's own row gap/next row visually even though the grid's gap value is unchanged. Instead
|
|
15964
|
+
// every layout's internal content (padding/icon/font sizes below) is kept compact enough to
|
|
15965
|
+
// actually fit the grid's default rowHeight (92px × h).
|
|
15966
|
+
const base = `bg-clx-surface ${radius} shadow-md border ${border} p-3 w-full h-full justify-center overflow-hidden min-w-[200px]`;
|
|
15967
|
+
// horizontal and bar stack a full-width title row above their icon/value/chart row (flex-col)
|
|
15968
|
+
// so the title never shares space with — and never truncates against — the chart; vertical
|
|
15969
|
+
// keeps a single side-by-side row (flex items-center), it has no title/chart space conflict.
|
|
15970
|
+
const layoutCls = this.layout() !== 'vertical' ? 'flex flex-col gap-2' : 'flex items-center gap-3';
|
|
15967
15971
|
return `${layoutCls} ${base}`;
|
|
15968
15972
|
}, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
|
|
15969
15973
|
_barHeights = computed(() => {
|
|
@@ -16057,17 +16061,17 @@ class ClxStatCardComponent {
|
|
|
16057
16061
|
<!-- Title: its own full-width row, so a long label never fights the icon/value/sparkline
|
|
16058
16062
|
row for space and never truncates. -->
|
|
16059
16063
|
<div class="w-full">
|
|
16060
|
-
<span class="text-xs text-clx-text-muted">{{ metric().title }}</span>
|
|
16064
|
+
<span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
|
|
16061
16065
|
</div>
|
|
16062
16066
|
|
|
16063
16067
|
<!-- Icon + value/trend + sparkline, second row -->
|
|
16064
|
-
<div class="w-full flex items-center gap-
|
|
16065
|
-
<div class="shrink-0 w-
|
|
16068
|
+
<div class="w-full flex items-center gap-2">
|
|
16069
|
+
<div class="shrink-0 w-9 h-9 rounded-lg flex items-center justify-center" [class]="_iconBg()">
|
|
16066
16070
|
<span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
|
|
16067
16071
|
</div>
|
|
16068
16072
|
|
|
16069
16073
|
<div class="flex flex-col gap-0.5 min-w-0 flex-1">
|
|
16070
|
-
<span class="text-
|
|
16074
|
+
<span class="text-lg font-semibold text-clx-text leading-tight">
|
|
16071
16075
|
{{ _formattedValue() }}
|
|
16072
16076
|
</span>
|
|
16073
16077
|
@if (_hasTrend()) {
|
|
@@ -16075,7 +16079,7 @@ class ClxStatCardComponent {
|
|
|
16075
16079
|
[color]="_trendColor()"
|
|
16076
16080
|
variant="light"
|
|
16077
16081
|
shape="pill"
|
|
16078
|
-
class="self-start gap-1
|
|
16082
|
+
class="self-start gap-1">
|
|
16079
16083
|
<span clx-icon [name]="_trendIcon()" size="xxs"></span>
|
|
16080
16084
|
{{ metric().trend }}
|
|
16081
16085
|
</span>
|
|
@@ -16083,7 +16087,7 @@ class ClxStatCardComponent {
|
|
|
16083
16087
|
</div>
|
|
16084
16088
|
|
|
16085
16089
|
<!-- Sparkline -->
|
|
16086
|
-
<div style="flex: 0 0
|
|
16090
|
+
<div style="flex: 0 0 56px; height: 36px; position: relative; overflow: hidden;">
|
|
16087
16091
|
<svg style="position: absolute; inset: 0; width: 100%; height: 100%;"
|
|
16088
16092
|
viewBox="0 0 140 64" preserveAspectRatio="none">
|
|
16089
16093
|
<defs>
|
|
@@ -16101,19 +16105,23 @@ class ClxStatCardComponent {
|
|
|
16101
16105
|
}
|
|
16102
16106
|
|
|
16103
16107
|
@if (layout() === 'bar') {
|
|
16104
|
-
<!--
|
|
16105
|
-
|
|
16106
|
-
|
|
16107
|
-
|
|
16108
|
-
</div>
|
|
16109
|
-
<span class="text-sm text-clx-text-muted truncate">{{ metric().title }}</span>
|
|
16110
|
-
<span class="text-2xl font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
|
|
16108
|
+
<!-- Title: its own full-width row, same reasoning as horizontal — never shares space with
|
|
16109
|
+
the icon/value/bars row, so it never truncates in a narrow (1-column) cell. -->
|
|
16110
|
+
<div class="w-full">
|
|
16111
|
+
<span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
|
|
16111
16112
|
</div>
|
|
16112
16113
|
|
|
16113
|
-
|
|
16114
|
-
|
|
16114
|
+
<div class="w-full flex items-center gap-2">
|
|
16115
|
+
<!-- Icon + value -->
|
|
16116
|
+
<div class="flex items-center gap-2 min-w-0 flex-1">
|
|
16117
|
+
<div class="shrink-0 w-9 h-9 rounded-full flex items-center justify-center" [class]="_iconBgSubtle()">
|
|
16118
|
+
<span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
|
|
16119
|
+
</div>
|
|
16120
|
+
<span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
|
|
16121
|
+
</div>
|
|
16122
|
+
|
|
16115
16123
|
<!-- Bar chart -->
|
|
16116
|
-
<div class="flex items-end gap-1" style="height:
|
|
16124
|
+
<div class="shrink-0 flex items-end gap-1" style="height: 32px;">
|
|
16117
16125
|
@for (h of _barHeights(); track $index) {
|
|
16118
16126
|
<div class="w-1.5 opacity-80"
|
|
16119
16127
|
[class]="_iconBg()"
|
|
@@ -16121,15 +16129,15 @@ class ClxStatCardComponent {
|
|
|
16121
16129
|
</div>
|
|
16122
16130
|
}
|
|
16123
16131
|
</div>
|
|
16124
|
-
<!-- Tendencia -->
|
|
16125
|
-
@if (_hasTrend()) {
|
|
16126
|
-
<div class="flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
|
|
16127
|
-
{{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
|
|
16128
|
-
<span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
|
|
16129
|
-
<span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
|
|
16130
|
-
</div>
|
|
16131
|
-
}
|
|
16132
16132
|
</div>
|
|
16133
|
+
|
|
16134
|
+
@if (_hasTrend()) {
|
|
16135
|
+
<div class="w-full flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
|
|
16136
|
+
{{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
|
|
16137
|
+
<span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
|
|
16138
|
+
<span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
|
|
16139
|
+
</div>
|
|
16140
|
+
}
|
|
16133
16141
|
}
|
|
16134
16142
|
|
|
16135
16143
|
@if (layout() === 'vertical') {
|
|
@@ -16172,17 +16180,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16172
16180
|
<!-- Title: its own full-width row, so a long label never fights the icon/value/sparkline
|
|
16173
16181
|
row for space and never truncates. -->
|
|
16174
16182
|
<div class="w-full">
|
|
16175
|
-
<span class="text-xs text-clx-text-muted">{{ metric().title }}</span>
|
|
16183
|
+
<span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
|
|
16176
16184
|
</div>
|
|
16177
16185
|
|
|
16178
16186
|
<!-- Icon + value/trend + sparkline, second row -->
|
|
16179
|
-
<div class="w-full flex items-center gap-
|
|
16180
|
-
<div class="shrink-0 w-
|
|
16187
|
+
<div class="w-full flex items-center gap-2">
|
|
16188
|
+
<div class="shrink-0 w-9 h-9 rounded-lg flex items-center justify-center" [class]="_iconBg()">
|
|
16181
16189
|
<span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
|
|
16182
16190
|
</div>
|
|
16183
16191
|
|
|
16184
16192
|
<div class="flex flex-col gap-0.5 min-w-0 flex-1">
|
|
16185
|
-
<span class="text-
|
|
16193
|
+
<span class="text-lg font-semibold text-clx-text leading-tight">
|
|
16186
16194
|
{{ _formattedValue() }}
|
|
16187
16195
|
</span>
|
|
16188
16196
|
@if (_hasTrend()) {
|
|
@@ -16190,7 +16198,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16190
16198
|
[color]="_trendColor()"
|
|
16191
16199
|
variant="light"
|
|
16192
16200
|
shape="pill"
|
|
16193
|
-
class="self-start gap-1
|
|
16201
|
+
class="self-start gap-1">
|
|
16194
16202
|
<span clx-icon [name]="_trendIcon()" size="xxs"></span>
|
|
16195
16203
|
{{ metric().trend }}
|
|
16196
16204
|
</span>
|
|
@@ -16198,7 +16206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16198
16206
|
</div>
|
|
16199
16207
|
|
|
16200
16208
|
<!-- Sparkline -->
|
|
16201
|
-
<div style="flex: 0 0
|
|
16209
|
+
<div style="flex: 0 0 56px; height: 36px; position: relative; overflow: hidden;">
|
|
16202
16210
|
<svg style="position: absolute; inset: 0; width: 100%; height: 100%;"
|
|
16203
16211
|
viewBox="0 0 140 64" preserveAspectRatio="none">
|
|
16204
16212
|
<defs>
|
|
@@ -16216,19 +16224,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16216
16224
|
}
|
|
16217
16225
|
|
|
16218
16226
|
@if (layout() === 'bar') {
|
|
16219
|
-
<!--
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
</div>
|
|
16224
|
-
<span class="text-sm text-clx-text-muted truncate">{{ metric().title }}</span>
|
|
16225
|
-
<span class="text-2xl font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
|
|
16227
|
+
<!-- Title: its own full-width row, same reasoning as horizontal — never shares space with
|
|
16228
|
+
the icon/value/bars row, so it never truncates in a narrow (1-column) cell. -->
|
|
16229
|
+
<div class="w-full">
|
|
16230
|
+
<span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
|
|
16226
16231
|
</div>
|
|
16227
16232
|
|
|
16228
|
-
|
|
16229
|
-
|
|
16233
|
+
<div class="w-full flex items-center gap-2">
|
|
16234
|
+
<!-- Icon + value -->
|
|
16235
|
+
<div class="flex items-center gap-2 min-w-0 flex-1">
|
|
16236
|
+
<div class="shrink-0 w-9 h-9 rounded-full flex items-center justify-center" [class]="_iconBgSubtle()">
|
|
16237
|
+
<span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
|
|
16238
|
+
</div>
|
|
16239
|
+
<span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
|
|
16240
|
+
</div>
|
|
16241
|
+
|
|
16230
16242
|
<!-- Bar chart -->
|
|
16231
|
-
<div class="flex items-end gap-1" style="height:
|
|
16243
|
+
<div class="shrink-0 flex items-end gap-1" style="height: 32px;">
|
|
16232
16244
|
@for (h of _barHeights(); track $index) {
|
|
16233
16245
|
<div class="w-1.5 opacity-80"
|
|
16234
16246
|
[class]="_iconBg()"
|
|
@@ -16236,15 +16248,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16236
16248
|
</div>
|
|
16237
16249
|
}
|
|
16238
16250
|
</div>
|
|
16239
|
-
<!-- Tendencia -->
|
|
16240
|
-
@if (_hasTrend()) {
|
|
16241
|
-
<div class="flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
|
|
16242
|
-
{{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
|
|
16243
|
-
<span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
|
|
16244
|
-
<span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
|
|
16245
|
-
</div>
|
|
16246
|
-
}
|
|
16247
16251
|
</div>
|
|
16252
|
+
|
|
16253
|
+
@if (_hasTrend()) {
|
|
16254
|
+
<div class="w-full flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
|
|
16255
|
+
{{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
|
|
16256
|
+
<span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
|
|
16257
|
+
<span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
|
|
16258
|
+
</div>
|
|
16259
|
+
}
|
|
16248
16260
|
}
|
|
16249
16261
|
|
|
16250
16262
|
@if (layout() === 'vertical') {
|