codexly-ui 0.12.0 → 0.12.2

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.
@@ -12097,30 +12097,35 @@ const TOAST_DEFAULT_ICON = {
12097
12097
  };
12098
12098
  const c = CLX_COLOR_MAP;
12099
12099
  // ─── Card background (tinted surface) per type ────────────────────────────────
12100
+ // Solid, fixed hex pairs (light/dark) instead of a Tailwind shade class — the
12101
+ // ClxColor shade system has no per-theme variant (this library themes via
12102
+ // [data-clx-theme], not Tailwind's `dark:` classlist), so a single shade either
12103
+ // looks right in light and washed-out/garish in dark, or vice-versa. Applied as
12104
+ // inline style via [style.background] in the component, not a utility class.
12100
12105
  const TOAST_BG_MAP = {
12101
- red: c.red.bgSubtle,
12102
- orange: c.orange.bgSubtle,
12103
- amber: c.amber.bgSubtle,
12104
- yellow: c.yellow.bgSubtle,
12105
- lime: c.lime.bgSubtle,
12106
- green: c.green.bgSubtle,
12107
- emerald: c.emerald.bgSubtle,
12108
- teal: c.teal.bgSubtle,
12109
- cyan: c.cyan.bgSubtle,
12110
- sky: c.sky.bgSubtle,
12111
- blue: c.blue.bgSubtle,
12112
- indigo: c.indigo.bgSubtle,
12113
- violet: c.violet.bgSubtle,
12114
- purple: c.purple.bgSubtle,
12115
- fuchsia: c.fuchsia.bgSubtle,
12116
- pink: c.pink.bgSubtle,
12117
- rose: c.rose.bgSubtle,
12118
- slate: c.slate.bgSubtle,
12119
- gray: c.gray.bgSubtle,
12120
- zinc: c.zinc.bgSubtle,
12121
- neutral: c.neutral.bgSubtle,
12122
- stone: c.stone.bgSubtle,
12123
- white: c.white.bgSubtle,
12106
+ red: { light: '#fef2f2', dark: '#2c1315' },
12107
+ orange: { light: '#fff7ed', dark: '#2c1a0a' },
12108
+ amber: { light: '#fffbeb', dark: '#2c2308' },
12109
+ yellow: { light: '#fefce8', dark: '#2b2708' },
12110
+ lime: { light: '#f7fee7', dark: '#1c2708' },
12111
+ green: { light: '#f0fdf4', dark: '#0d2415' },
12112
+ emerald: { light: '#ecfdf5', dark: '#0d2820' },
12113
+ teal: { light: '#f0fdfa', dark: '#0b2824' },
12114
+ cyan: { light: '#ecfeff', dark: '#082a30' },
12115
+ sky: { light: '#f0f9ff', dark: '#0b2431' },
12116
+ blue: { light: '#eff6ff', dark: '#0d2043' },
12117
+ indigo: { light: '#eef2ff', dark: '#1a1a3a' },
12118
+ violet: { light: '#f5f3ff', dark: '#211a3d' },
12119
+ purple: { light: '#faf5ff', dark: '#241a3a' },
12120
+ fuchsia: { light: '#fdf4ff', dark: '#2c1830' },
12121
+ pink: { light: '#fdf2f8', dark: '#2c1521' },
12122
+ rose: { light: '#fff1f2', dark: '#2c1418' },
12123
+ slate: { light: '#f8fafc', dark: '#1e293b' },
12124
+ gray: { light: '#f9fafb', dark: '#1f2937' },
12125
+ zinc: { light: '#fafafa', dark: '#27272a' },
12126
+ neutral: { light: '#fafafa', dark: '#262626' },
12127
+ stone: { light: '#fafaf9', dark: '#292524' },
12128
+ white: { light: '#ffffff', dark: '#1e293b' },
12124
12129
  };
12125
12130
  // ─── Card border color per type ───────────────────────────────────────────────
12126
12131
  const TOAST_BORDER_MAP = {
@@ -12239,6 +12244,7 @@ class ClxToastComponent {
12239
12244
  entry = input.required(...(ngDevMode ? [{ debugName: "entry" }] : /* istanbul ignore next */ []));
12240
12245
  dismiss = output();
12241
12246
  _animate = inject(ClxAnimateService);
12247
+ _themeSvc = inject(ClxThemeService);
12242
12248
  _el = inject((ElementRef));
12243
12249
  _zone;
12244
12250
  constructor() {
@@ -12253,7 +12259,7 @@ class ClxToastComponent {
12253
12259
  _destroyed = false;
12254
12260
  // ─── Derived visuals ──────────────────────────────────────────────────────
12255
12261
  _icon = computed(() => this.entry().icon ?? TOAST_DEFAULT_ICON[this.entry().type], ...(ngDevMode ? [{ debugName: "_icon" }] : /* istanbul ignore next */ []));
12256
- _bgClass = computed(() => TOAST_BG_MAP[this.entry().type], ...(ngDevMode ? [{ debugName: "_bgClass" }] : /* istanbul ignore next */ []));
12262
+ _bgColor = computed(() => this._themeSvc.isDark() ? TOAST_BG_MAP[this.entry().type].dark : TOAST_BG_MAP[this.entry().type].light, ...(ngDevMode ? [{ debugName: "_bgColor" }] : /* istanbul ignore next */ []));
12257
12263
  _borderClass = computed(() => TOAST_BORDER_MAP[this.entry().type], ...(ngDevMode ? [{ debugName: "_borderClass" }] : /* istanbul ignore next */ []));
12258
12264
  _iconBgClass = computed(() => TOAST_ICON_BG_MAP[this.entry().type], ...(ngDevMode ? [{ debugName: "_iconBgClass" }] : /* istanbul ignore next */ []));
12259
12265
  _colorClass = computed(() => TOAST_COLOR_MAP[this.entry().type], ...(ngDevMode ? [{ debugName: "_colorClass" }] : /* istanbul ignore next */ []));
@@ -12353,7 +12359,8 @@ class ClxToastComponent {
12353
12359
  <div
12354
12360
  #card
12355
12361
  class="clx-toast-card relative flex items-start gap-3.5 w-full backdrop-blur-md shadow-lg rounded-xl border px-4 py-3.5 overflow-hidden"
12356
- [class]="_bgClass() + ' ' + _borderClass()"
12362
+ [class]="_borderClass()"
12363
+ [style.background]="_bgColor()"
12357
12364
  (mouseenter)="_onMouseEnter()"
12358
12365
  (mouseleave)="_onMouseLeave()"
12359
12366
  >
@@ -12445,7 +12452,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
12445
12452
  <div
12446
12453
  #card
12447
12454
  class="clx-toast-card relative flex items-start gap-3.5 w-full backdrop-blur-md shadow-lg rounded-xl border px-4 py-3.5 overflow-hidden"
12448
- [class]="_bgClass() + ' ' + _borderClass()"
12455
+ [class]="_borderClass()"
12456
+ [style.background]="_bgColor()"
12449
12457
  (mouseenter)="_onMouseEnter()"
12450
12458
  (mouseleave)="_onMouseLeave()"
12451
12459
  >