codexly-ui 0.15.8 → 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.
@@ -15957,15 +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 + justify-center (not h-full alone) so a parent grid cell taller than this card's
15961
- // natural content centers it instead of stretching/cramming it — a card whose content is
15962
- // genuinely shorter than the cell just sits centered, never squeezed or clipped. min-h-fit
15963
- // guards the opposite case: a cell shorter than the content (e.g. horizontal's sparkline row)
15964
- // still lets the card grow to its real height instead of clipping via overflow-hidden.
15965
- const base = `bg-clx-surface ${radius} shadow-md border ${border} p-4 w-full h-full justify-center min-h-fit min-w-[200px]`;
15966
- // horizontal stacks its title row above its icon/value/sparkline row (flex-col); vertical/bar
15967
- // keep a single side-by-side row (flex items-center) as before.
15968
- const layoutCls = this.layout() === 'horizontal' ? 'flex flex-col gap-2' : 'flex items-center gap-3';
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';
15969
15971
  return `${layoutCls} ${base}`;
15970
15972
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
15971
15973
  _barHeights = computed(() => {
@@ -16059,17 +16061,17 @@ class ClxStatCardComponent {
16059
16061
  <!-- Title: its own full-width row, so a long label never fights the icon/value/sparkline
16060
16062
  row for space and never truncates. -->
16061
16063
  <div class="w-full">
16062
- <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>
16063
16065
  </div>
16064
16066
 
16065
16067
  <!-- Icon + value/trend + sparkline, second row -->
16066
- <div class="w-full flex items-center gap-3">
16067
- <div class="shrink-0 w-10 h-10 rounded-lg flex items-center justify-center" [class]="_iconBg()">
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()">
16068
16070
  <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16069
16071
  </div>
16070
16072
 
16071
16073
  <div class="flex flex-col gap-0.5 min-w-0 flex-1">
16072
- <span class="text-xl font-semibold text-clx-text leading-tight">
16074
+ <span class="text-lg font-semibold text-clx-text leading-tight">
16073
16075
  {{ _formattedValue() }}
16074
16076
  </span>
16075
16077
  @if (_hasTrend()) {
@@ -16077,7 +16079,7 @@ class ClxStatCardComponent {
16077
16079
  [color]="_trendColor()"
16078
16080
  variant="light"
16079
16081
  shape="pill"
16080
- class="self-start gap-1 mt-0.5">
16082
+ class="self-start gap-1">
16081
16083
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16082
16084
  {{ metric().trend }}
16083
16085
  </span>
@@ -16085,7 +16087,7 @@ class ClxStatCardComponent {
16085
16087
  </div>
16086
16088
 
16087
16089
  <!-- Sparkline -->
16088
- <div style="flex: 0 0 64px; height: 48px; position: relative; overflow: hidden;">
16090
+ <div style="flex: 0 0 56px; height: 36px; position: relative; overflow: hidden;">
16089
16091
  <svg style="position: absolute; inset: 0; width: 100%; height: 100%;"
16090
16092
  viewBox="0 0 140 64" preserveAspectRatio="none">
16091
16093
  <defs>
@@ -16103,19 +16105,23 @@ class ClxStatCardComponent {
16103
16105
  }
16104
16106
 
16105
16107
  @if (layout() === 'bar') {
16106
- <!-- Col izquierda: ícono circular + título + valor -->
16107
- <div class="flex flex-col gap-1 min-w-0 flex-1">
16108
- <div class="w-10 h-10 rounded-full flex items-center justify-center mb-2" [class]="_iconBgSubtle()">
16109
- <span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
16110
- </div>
16111
- <span class="text-sm text-clx-text-muted truncate">{{ metric().title }}</span>
16112
- <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>
16113
16112
  </div>
16114
16113
 
16115
- <!-- Col derecha: barras + tendencia -->
16116
- <div class="shrink-0 flex flex-col items-end justify-between gap-2 self-stretch" style="width: 160px;">
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
+
16117
16123
  <!-- Bar chart -->
16118
- <div class="flex items-end gap-1" style="height: 44px;">
16124
+ <div class="shrink-0 flex items-end gap-1" style="height: 32px;">
16119
16125
  @for (h of _barHeights(); track $index) {
16120
16126
  <div class="w-1.5 opacity-80"
16121
16127
  [class]="_iconBg()"
@@ -16123,15 +16129,15 @@ class ClxStatCardComponent {
16123
16129
  </div>
16124
16130
  }
16125
16131
  </div>
16126
- <!-- Tendencia -->
16127
- @if (_hasTrend()) {
16128
- <div class="flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
16129
- {{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
16130
- <span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
16131
- <span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
16132
- </div>
16133
- }
16134
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
+ }
16135
16141
  }
16136
16142
 
16137
16143
  @if (layout() === 'vertical') {
@@ -16174,17 +16180,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16174
16180
  <!-- Title: its own full-width row, so a long label never fights the icon/value/sparkline
16175
16181
  row for space and never truncates. -->
16176
16182
  <div class="w-full">
16177
- <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>
16178
16184
  </div>
16179
16185
 
16180
16186
  <!-- Icon + value/trend + sparkline, second row -->
16181
- <div class="w-full flex items-center gap-3">
16182
- <div class="shrink-0 w-10 h-10 rounded-lg flex items-center justify-center" [class]="_iconBg()">
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()">
16183
16189
  <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16184
16190
  </div>
16185
16191
 
16186
16192
  <div class="flex flex-col gap-0.5 min-w-0 flex-1">
16187
- <span class="text-xl font-semibold text-clx-text leading-tight">
16193
+ <span class="text-lg font-semibold text-clx-text leading-tight">
16188
16194
  {{ _formattedValue() }}
16189
16195
  </span>
16190
16196
  @if (_hasTrend()) {
@@ -16192,7 +16198,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16192
16198
  [color]="_trendColor()"
16193
16199
  variant="light"
16194
16200
  shape="pill"
16195
- class="self-start gap-1 mt-0.5">
16201
+ class="self-start gap-1">
16196
16202
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16197
16203
  {{ metric().trend }}
16198
16204
  </span>
@@ -16200,7 +16206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16200
16206
  </div>
16201
16207
 
16202
16208
  <!-- Sparkline -->
16203
- <div style="flex: 0 0 64px; height: 48px; position: relative; overflow: hidden;">
16209
+ <div style="flex: 0 0 56px; height: 36px; position: relative; overflow: hidden;">
16204
16210
  <svg style="position: absolute; inset: 0; width: 100%; height: 100%;"
16205
16211
  viewBox="0 0 140 64" preserveAspectRatio="none">
16206
16212
  <defs>
@@ -16218,19 +16224,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16218
16224
  }
16219
16225
 
16220
16226
  @if (layout() === 'bar') {
16221
- <!-- Col izquierda: ícono circular + título + valor -->
16222
- <div class="flex flex-col gap-1 min-w-0 flex-1">
16223
- <div class="w-10 h-10 rounded-full flex items-center justify-center mb-2" [class]="_iconBgSubtle()">
16224
- <span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
16225
- </div>
16226
- <span class="text-sm text-clx-text-muted truncate">{{ metric().title }}</span>
16227
- <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>
16228
16231
  </div>
16229
16232
 
16230
- <!-- Col derecha: barras + tendencia -->
16231
- <div class="shrink-0 flex flex-col items-end justify-between gap-2 self-stretch" style="width: 160px;">
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
+
16232
16242
  <!-- Bar chart -->
16233
- <div class="flex items-end gap-1" style="height: 44px;">
16243
+ <div class="shrink-0 flex items-end gap-1" style="height: 32px;">
16234
16244
  @for (h of _barHeights(); track $index) {
16235
16245
  <div class="w-1.5 opacity-80"
16236
16246
  [class]="_iconBg()"
@@ -16238,15 +16248,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16238
16248
  </div>
16239
16249
  }
16240
16250
  </div>
16241
- <!-- Tendencia -->
16242
- @if (_hasTrend()) {
16243
- <div class="flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
16244
- {{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
16245
- <span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
16246
- <span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
16247
- </div>
16248
- }
16249
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
+ }
16250
16260
  }
16251
16261
 
16252
16262
  @if (layout() === 'vertical') {