codexly-ui 0.15.8 → 0.15.10

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,18 @@ 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 and
15969
+ // banner are both a single side-by-side row (flex items-center) with no title/chart conflict.
15970
+ const stacked = this.layout() === 'horizontal' || this.layout() === 'bar';
15971
+ const layoutCls = stacked ? 'flex flex-col gap-2' : 'flex items-center gap-3';
15969
15972
  return `${layoutCls} ${base}`;
15970
15973
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
15971
15974
  _barHeights = computed(() => {
@@ -16059,17 +16062,17 @@ class ClxStatCardComponent {
16059
16062
  <!-- Title: its own full-width row, so a long label never fights the icon/value/sparkline
16060
16063
  row for space and never truncates. -->
16061
16064
  <div class="w-full">
16062
- <span class="text-xs text-clx-text-muted">{{ metric().title }}</span>
16065
+ <span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
16063
16066
  </div>
16064
16067
 
16065
16068
  <!-- 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()">
16069
+ <div class="w-full flex items-center gap-2">
16070
+ <div class="shrink-0 w-9 h-9 rounded-lg flex items-center justify-center" [class]="_iconBg()">
16068
16071
  <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16069
16072
  </div>
16070
16073
 
16071
16074
  <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">
16075
+ <span class="text-lg font-semibold text-clx-text leading-tight">
16073
16076
  {{ _formattedValue() }}
16074
16077
  </span>
16075
16078
  @if (_hasTrend()) {
@@ -16077,7 +16080,7 @@ class ClxStatCardComponent {
16077
16080
  [color]="_trendColor()"
16078
16081
  variant="light"
16079
16082
  shape="pill"
16080
- class="self-start gap-1 mt-0.5">
16083
+ class="self-start gap-1">
16081
16084
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16082
16085
  {{ metric().trend }}
16083
16086
  </span>
@@ -16085,7 +16088,7 @@ class ClxStatCardComponent {
16085
16088
  </div>
16086
16089
 
16087
16090
  <!-- Sparkline -->
16088
- <div style="flex: 0 0 64px; height: 48px; position: relative; overflow: hidden;">
16091
+ <div style="flex: 0 0 56px; height: 36px; position: relative; overflow: hidden;">
16089
16092
  <svg style="position: absolute; inset: 0; width: 100%; height: 100%;"
16090
16093
  viewBox="0 0 140 64" preserveAspectRatio="none">
16091
16094
  <defs>
@@ -16103,19 +16106,23 @@ class ClxStatCardComponent {
16103
16106
  }
16104
16107
 
16105
16108
  @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>
16109
+ <!-- Title: its own full-width row, same reasoning as horizontal — never shares space with
16110
+ the icon/value/bars row, so it never truncates in a narrow (1-column) cell. -->
16111
+ <div class="w-full">
16112
+ <span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
16113
16113
  </div>
16114
16114
 
16115
- <!-- Col derecha: barras + tendencia -->
16116
- <div class="shrink-0 flex flex-col items-end justify-between gap-2 self-stretch" style="width: 160px;">
16115
+ <div class="w-full flex items-center gap-2">
16116
+ <!-- Icon + value -->
16117
+ <div class="flex items-center gap-2 min-w-0 flex-1">
16118
+ <div class="shrink-0 w-9 h-9 rounded-full flex items-center justify-center" [class]="_iconBgSubtle()">
16119
+ <span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
16120
+ </div>
16121
+ <span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
16122
+ </div>
16123
+
16117
16124
  <!-- Bar chart -->
16118
- <div class="flex items-end gap-1" style="height: 44px;">
16125
+ <div class="shrink-0 flex items-end gap-1" style="height: 32px;">
16119
16126
  @for (h of _barHeights(); track $index) {
16120
16127
  <div class="w-1.5 opacity-80"
16121
16128
  [class]="_iconBg()"
@@ -16123,15 +16130,37 @@ class ClxStatCardComponent {
16123
16130
  </div>
16124
16131
  }
16125
16132
  </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
16133
  </div>
16134
+
16135
+ @if (_hasTrend()) {
16136
+ <div class="w-full flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
16137
+ {{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
16138
+ <span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
16139
+ <span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
16140
+ </div>
16141
+ }
16142
+ }
16143
+
16144
+ @if (layout() === 'banner') {
16145
+ <!-- Full-width row: icon chip left, title+value stacked right. No sparkline/bars — meant to
16146
+ read as a flat announcement strip rather than a metric card. -->
16147
+ <div class="shrink-0 w-10 h-10 rounded-lg flex items-center justify-center" [class]="_iconBgSubtle()">
16148
+ <span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
16149
+ </div>
16150
+ <div class="min-w-0 flex-1">
16151
+ <p class="text-xs text-clx-text-muted truncate">{{ metric().title }}</p>
16152
+ <p class="text-xl font-bold text-clx-text leading-tight">{{ _formattedValue() }}</p>
16153
+ </div>
16154
+ @if (_hasTrend()) {
16155
+ <span clx-badge
16156
+ [color]="_trendColor()"
16157
+ variant="light"
16158
+ shape="pill"
16159
+ class="shrink-0 gap-1">
16160
+ <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16161
+ {{ metric().trend }}
16162
+ </span>
16163
+ }
16135
16164
  }
16136
16165
 
16137
16166
  @if (layout() === 'vertical') {
@@ -16174,17 +16203,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16174
16203
  <!-- Title: its own full-width row, so a long label never fights the icon/value/sparkline
16175
16204
  row for space and never truncates. -->
16176
16205
  <div class="w-full">
16177
- <span class="text-xs text-clx-text-muted">{{ metric().title }}</span>
16206
+ <span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
16178
16207
  </div>
16179
16208
 
16180
16209
  <!-- 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()">
16210
+ <div class="w-full flex items-center gap-2">
16211
+ <div class="shrink-0 w-9 h-9 rounded-lg flex items-center justify-center" [class]="_iconBg()">
16183
16212
  <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16184
16213
  </div>
16185
16214
 
16186
16215
  <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">
16216
+ <span class="text-lg font-semibold text-clx-text leading-tight">
16188
16217
  {{ _formattedValue() }}
16189
16218
  </span>
16190
16219
  @if (_hasTrend()) {
@@ -16192,7 +16221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16192
16221
  [color]="_trendColor()"
16193
16222
  variant="light"
16194
16223
  shape="pill"
16195
- class="self-start gap-1 mt-0.5">
16224
+ class="self-start gap-1">
16196
16225
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16197
16226
  {{ metric().trend }}
16198
16227
  </span>
@@ -16200,7 +16229,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16200
16229
  </div>
16201
16230
 
16202
16231
  <!-- Sparkline -->
16203
- <div style="flex: 0 0 64px; height: 48px; position: relative; overflow: hidden;">
16232
+ <div style="flex: 0 0 56px; height: 36px; position: relative; overflow: hidden;">
16204
16233
  <svg style="position: absolute; inset: 0; width: 100%; height: 100%;"
16205
16234
  viewBox="0 0 140 64" preserveAspectRatio="none">
16206
16235
  <defs>
@@ -16218,19 +16247,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16218
16247
  }
16219
16248
 
16220
16249
  @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>
16250
+ <!-- Title: its own full-width row, same reasoning as horizontal — never shares space with
16251
+ the icon/value/bars row, so it never truncates in a narrow (1-column) cell. -->
16252
+ <div class="w-full">
16253
+ <span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
16228
16254
  </div>
16229
16255
 
16230
- <!-- Col derecha: barras + tendencia -->
16231
- <div class="shrink-0 flex flex-col items-end justify-between gap-2 self-stretch" style="width: 160px;">
16256
+ <div class="w-full flex items-center gap-2">
16257
+ <!-- Icon + value -->
16258
+ <div class="flex items-center gap-2 min-w-0 flex-1">
16259
+ <div class="shrink-0 w-9 h-9 rounded-full flex items-center justify-center" [class]="_iconBgSubtle()">
16260
+ <span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
16261
+ </div>
16262
+ <span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
16263
+ </div>
16264
+
16232
16265
  <!-- Bar chart -->
16233
- <div class="flex items-end gap-1" style="height: 44px;">
16266
+ <div class="shrink-0 flex items-end gap-1" style="height: 32px;">
16234
16267
  @for (h of _barHeights(); track $index) {
16235
16268
  <div class="w-1.5 opacity-80"
16236
16269
  [class]="_iconBg()"
@@ -16238,15 +16271,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16238
16271
  </div>
16239
16272
  }
16240
16273
  </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
16274
  </div>
16275
+
16276
+ @if (_hasTrend()) {
16277
+ <div class="w-full flex items-center gap-1 text-xs text-clx-text-subtle whitespace-nowrap">
16278
+ {{ metric().trendDirection === 'up' ? 'Increased By' : 'Decreased By' }}
16279
+ <span class="font-semibold" [class]="_trendTextClass()">{{ metric().trend }}</span>
16280
+ <span clx-icon [name]="_trendArrowIcon()" size="sm" [class]="_trendTextClass()"></span>
16281
+ </div>
16282
+ }
16283
+ }
16284
+
16285
+ @if (layout() === 'banner') {
16286
+ <!-- Full-width row: icon chip left, title+value stacked right. No sparkline/bars — meant to
16287
+ read as a flat announcement strip rather than a metric card. -->
16288
+ <div class="shrink-0 w-10 h-10 rounded-lg flex items-center justify-center" [class]="_iconBgSubtle()">
16289
+ <span clx-icon [name]="metric().icon" size="sm" [class]="_iconTextBase()"></span>
16290
+ </div>
16291
+ <div class="min-w-0 flex-1">
16292
+ <p class="text-xs text-clx-text-muted truncate">{{ metric().title }}</p>
16293
+ <p class="text-xl font-bold text-clx-text leading-tight">{{ _formattedValue() }}</p>
16294
+ </div>
16295
+ @if (_hasTrend()) {
16296
+ <span clx-badge
16297
+ [color]="_trendColor()"
16298
+ variant="light"
16299
+ shape="pill"
16300
+ class="shrink-0 gap-1">
16301
+ <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16302
+ {{ metric().trend }}
16303
+ </span>
16304
+ }
16250
16305
  }
16251
16306
 
16252
16307
  @if (layout() === 'vertical') {