codexly-ui 0.15.10 → 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");
@@ -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,13 +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 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';
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';
15971
15975
  const layoutCls = stacked ? 'flex flex-col gap-2' : 'flex items-center gap-3';
15972
- return `${layoutCls} ${base}`;
15976
+ return `${layoutCls} ${surface} ${sizing}`;
15973
15977
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
15974
15978
  _barHeights = computed(() => {
15975
15979
  const data = this.chartData();
@@ -16142,27 +16146,48 @@ class ClxStatCardComponent {
16142
16146
  }
16143
16147
 
16144
16148
  @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
+ <!-- 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>
16149
16153
  </div>
16150
16154
  <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>
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>
16153
16157
  </div>
16154
16158
  @if (_hasTrend()) {
16155
- <span clx-badge
16156
- [color]="_trendColor()"
16157
- variant="light"
16158
- shape="pill"
16159
- class="shrink-0 gap-1">
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
16160
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16161
16161
  {{ metric().trend }}
16162
16162
  </span>
16163
16163
  }
16164
16164
  }
16165
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
+
16166
16191
  @if (layout() === 'vertical') {
16167
16192
  <!-- Col izquierda: badge + valor + título -->
16168
16193
  <div class="flex flex-col justify-between flex-1 min-w-0 gap-1">
@@ -16283,27 +16308,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16283
16308
  }
16284
16309
 
16285
16310
  @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>
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>
16290
16315
  </div>
16291
16316
  <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>
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>
16294
16319
  </div>
16295
16320
  @if (_hasTrend()) {
16296
- <span clx-badge
16297
- [color]="_trendColor()"
16298
- variant="light"
16299
- shape="pill"
16300
- class="shrink-0 gap-1">
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">
16301
16322
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16302
16323
  {{ metric().trend }}
16303
16324
  </span>
16304
16325
  }
16305
16326
  }
16306
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
+
16307
16353
  @if (layout() === 'vertical') {
16308
16354
  <!-- Col izquierda: badge + valor + título -->
16309
16355
  <div class="flex flex-col justify-between flex-1 min-w-0 gap-1">