codexly-ui 0.15.10 → 0.15.12

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,20 @@ 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. Kept
15968
+ // light/close together (400→500, not the base shade down to -2 steps) so it reads as a tint
15969
+ // rather than a saturated block.
15970
+ const surface = this.layout() === 'banner'
15971
+ ? `bg-gradient-to-br from-${parseColorInput(this.color()).color}-400 to-${parseColorInput(this.color()).color}-500`
15972
+ : `bg-clx-surface border ${resolveColor(this.color()).borderLight}`;
15973
+ // horizontal, bar and corner each stack a full-width row above another (flex-col) — corner's
15974
+ // top row (badge/icon) and bottom row (value/title) never share space either; vertical and
15975
+ // banner are a single side-by-side row (flex items-center) with no stacking needed.
15976
+ const stacked = this.layout() === 'horizontal' || this.layout() === 'bar' || this.layout() === 'corner';
15971
15977
  const layoutCls = stacked ? 'flex flex-col gap-2' : 'flex items-center gap-3';
15972
- return `${layoutCls} ${base}`;
15978
+ return `${layoutCls} ${surface} ${sizing}`;
15973
15979
  }, ...(ngDevMode ? [{ debugName: "_hostClass" }] : /* istanbul ignore next */ []));
15974
15980
  _barHeights = computed(() => {
15975
15981
  const data = this.chartData();
@@ -16142,27 +16148,48 @@ class ClxStatCardComponent {
16142
16148
  }
16143
16149
 
16144
16150
  @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>
16151
+ <!-- Solid gradient fill in the chosen color (not the subtle chip the other layouts use) —
16152
+ icon sits in a translucent chip, title+value in white. Stands out by color, not width. -->
16153
+ <div class="shrink-0 w-10.5 h-10.5 rounded-[11px] flex items-center justify-center bg-white/20">
16154
+ <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16149
16155
  </div>
16150
16156
  <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>
16157
+ <p class="text-xs text-white/75 truncate">{{ metric().title }}</p>
16158
+ <p class="text-lg font-bold text-white leading-tight">{{ _formattedValue() }}</p>
16153
16159
  </div>
16154
16160
  @if (_hasTrend()) {
16155
- <span clx-badge
16156
- [color]="_trendColor()"
16157
- variant="light"
16158
- shape="pill"
16159
- class="shrink-0 gap-1">
16161
+ <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
16162
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16161
16163
  {{ metric().trend }}
16162
16164
  </span>
16163
16165
  }
16164
16166
  }
16165
16167
 
16168
+ @if (layout() === 'corner') {
16169
+ <!-- Diagonal composition: trend badge top-left, icon top-right, value+label bottom-left. -->
16170
+ <div class="w-full flex items-start justify-between">
16171
+ @if (_hasTrend()) {
16172
+ <span clx-badge
16173
+ [color]="_trendColor()"
16174
+ variant="light"
16175
+ shape="pill"
16176
+ class="gap-1">
16177
+ <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16178
+ {{ metric().trend }}
16179
+ </span>
16180
+ } @else {
16181
+ <span></span>
16182
+ }
16183
+ <div class="shrink-0 w-8.5 h-8.5 rounded-[9px] flex items-center justify-center" [class]="_iconBg()">
16184
+ <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16185
+ </div>
16186
+ </div>
16187
+ <div class="w-full flex flex-col gap-0.5">
16188
+ <span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
16189
+ <span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
16190
+ </div>
16191
+ }
16192
+
16166
16193
  @if (layout() === 'vertical') {
16167
16194
  <!-- Col izquierda: badge + valor + título -->
16168
16195
  <div class="flex flex-col justify-between flex-1 min-w-0 gap-1">
@@ -16283,27 +16310,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16283
16310
  }
16284
16311
 
16285
16312
  @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>
16313
+ <!-- Solid gradient fill in the chosen color (not the subtle chip the other layouts use) —
16314
+ icon sits in a translucent chip, title+value in white. Stands out by color, not width. -->
16315
+ <div class="shrink-0 w-10.5 h-10.5 rounded-[11px] flex items-center justify-center bg-white/20">
16316
+ <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16290
16317
  </div>
16291
16318
  <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>
16319
+ <p class="text-xs text-white/75 truncate">{{ metric().title }}</p>
16320
+ <p class="text-lg font-bold text-white leading-tight">{{ _formattedValue() }}</p>
16294
16321
  </div>
16295
16322
  @if (_hasTrend()) {
16296
- <span clx-badge
16297
- [color]="_trendColor()"
16298
- variant="light"
16299
- shape="pill"
16300
- class="shrink-0 gap-1">
16323
+ <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
16324
  <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16302
16325
  {{ metric().trend }}
16303
16326
  </span>
16304
16327
  }
16305
16328
  }
16306
16329
 
16330
+ @if (layout() === 'corner') {
16331
+ <!-- Diagonal composition: trend badge top-left, icon top-right, value+label bottom-left. -->
16332
+ <div class="w-full flex items-start justify-between">
16333
+ @if (_hasTrend()) {
16334
+ <span clx-badge
16335
+ [color]="_trendColor()"
16336
+ variant="light"
16337
+ shape="pill"
16338
+ class="gap-1">
16339
+ <span clx-icon [name]="_trendIcon()" size="xxs"></span>
16340
+ {{ metric().trend }}
16341
+ </span>
16342
+ } @else {
16343
+ <span></span>
16344
+ }
16345
+ <div class="shrink-0 w-8.5 h-8.5 rounded-[9px] flex items-center justify-center" [class]="_iconBg()">
16346
+ <span clx-icon [name]="metric().icon" size="sm" class="text-white"></span>
16347
+ </div>
16348
+ </div>
16349
+ <div class="w-full flex flex-col gap-0.5">
16350
+ <span class="text-lg font-semibold text-clx-text leading-tight">{{ _formattedValue() }}</span>
16351
+ <span class="text-xs text-clx-text-muted leading-none">{{ metric().title }}</span>
16352
+ </div>
16353
+ }
16354
+
16307
16355
  @if (layout() === 'vertical') {
16308
16356
  <!-- Col izquierda: badge + valor + título -->
16309
16357
  <div class="flex flex-col justify-between flex-1 min-w-0 gap-1">