codexly-ui 0.12.1 → 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.
- package/fesm2022/codexly-ui.mjs +37 -31
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +2 -1
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -12096,33 +12096,36 @@ const TOAST_DEFAULT_ICON = {
|
|
|
12096
12096
|
white: 'info',
|
|
12097
12097
|
};
|
|
12098
12098
|
const c = CLX_COLOR_MAP;
|
|
12099
|
-
// ─── Card background (tinted surface) per type
|
|
12100
|
-
// (
|
|
12101
|
-
//
|
|
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.
|
|
12102
12105
|
const TOAST_BG_MAP = {
|
|
12103
|
-
red:
|
|
12104
|
-
orange:
|
|
12105
|
-
amber:
|
|
12106
|
-
yellow:
|
|
12107
|
-
lime:
|
|
12108
|
-
green:
|
|
12109
|
-
emerald:
|
|
12110
|
-
teal:
|
|
12111
|
-
cyan:
|
|
12112
|
-
sky:
|
|
12113
|
-
blue:
|
|
12114
|
-
indigo:
|
|
12115
|
-
violet:
|
|
12116
|
-
purple:
|
|
12117
|
-
fuchsia:
|
|
12118
|
-
pink:
|
|
12119
|
-
rose:
|
|
12120
|
-
slate:
|
|
12121
|
-
gray:
|
|
12122
|
-
zinc:
|
|
12123
|
-
neutral:
|
|
12124
|
-
stone:
|
|
12125
|
-
white:
|
|
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' },
|
|
12126
12129
|
};
|
|
12127
12130
|
// ─── Card border color per type ───────────────────────────────────────────────
|
|
12128
12131
|
const TOAST_BORDER_MAP = {
|
|
@@ -12241,6 +12244,7 @@ class ClxToastComponent {
|
|
|
12241
12244
|
entry = input.required(...(ngDevMode ? [{ debugName: "entry" }] : /* istanbul ignore next */ []));
|
|
12242
12245
|
dismiss = output();
|
|
12243
12246
|
_animate = inject(ClxAnimateService);
|
|
12247
|
+
_themeSvc = inject(ClxThemeService);
|
|
12244
12248
|
_el = inject((ElementRef));
|
|
12245
12249
|
_zone;
|
|
12246
12250
|
constructor() {
|
|
@@ -12255,7 +12259,7 @@ class ClxToastComponent {
|
|
|
12255
12259
|
_destroyed = false;
|
|
12256
12260
|
// ─── Derived visuals ──────────────────────────────────────────────────────
|
|
12257
12261
|
_icon = computed(() => this.entry().icon ?? TOAST_DEFAULT_ICON[this.entry().type], ...(ngDevMode ? [{ debugName: "_icon" }] : /* istanbul ignore next */ []));
|
|
12258
|
-
|
|
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 */ []));
|
|
12259
12263
|
_borderClass = computed(() => TOAST_BORDER_MAP[this.entry().type], ...(ngDevMode ? [{ debugName: "_borderClass" }] : /* istanbul ignore next */ []));
|
|
12260
12264
|
_iconBgClass = computed(() => TOAST_ICON_BG_MAP[this.entry().type], ...(ngDevMode ? [{ debugName: "_iconBgClass" }] : /* istanbul ignore next */ []));
|
|
12261
12265
|
_colorClass = computed(() => TOAST_COLOR_MAP[this.entry().type], ...(ngDevMode ? [{ debugName: "_colorClass" }] : /* istanbul ignore next */ []));
|
|
@@ -12354,8 +12358,9 @@ class ClxToastComponent {
|
|
|
12354
12358
|
<!-- Toast card -->
|
|
12355
12359
|
<div
|
|
12356
12360
|
#card
|
|
12357
|
-
class="clx-toast-card relative flex items-start gap-3.5 w-full
|
|
12358
|
-
[class]="
|
|
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"
|
|
12362
|
+
[class]="_borderClass()"
|
|
12363
|
+
[style.background]="_bgColor()"
|
|
12359
12364
|
(mouseenter)="_onMouseEnter()"
|
|
12360
12365
|
(mouseleave)="_onMouseLeave()"
|
|
12361
12366
|
>
|
|
@@ -12446,8 +12451,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
12446
12451
|
<!-- Toast card -->
|
|
12447
12452
|
<div
|
|
12448
12453
|
#card
|
|
12449
|
-
class="clx-toast-card relative flex items-start gap-3.5 w-full
|
|
12450
|
-
[class]="
|
|
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"
|
|
12455
|
+
[class]="_borderClass()"
|
|
12456
|
+
[style.background]="_bgColor()"
|
|
12451
12457
|
(mouseenter)="_onMouseEnter()"
|
|
12452
12458
|
(mouseleave)="_onMouseLeave()"
|
|
12453
12459
|
>
|