@eintrek/erp-theme 1.4.7 → 1.4.8
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/dist/components/ui/avatar.d.ts +1 -1
- package/dist/index.esm.js +7 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -13
package/dist/index.js
CHANGED
|
@@ -208,8 +208,13 @@ function AspectRatio({ ...props }) {
|
|
|
208
208
|
function Avatar({ className, ...props }) {
|
|
209
209
|
return (require$$1.jsx(AvatarPrimitive__namespace.Root, { "data-slot": "avatar", className: cn$1("relative flex size-8 shrink-0 overflow-hidden rounded-full", className), ...props }));
|
|
210
210
|
}
|
|
211
|
-
function AvatarImage({ className, ...props }) {
|
|
212
|
-
|
|
211
|
+
function AvatarImage({ className, src, ...props }) {
|
|
212
|
+
// Empty/undefined src still mounts an <img> in some browsers and shows a
|
|
213
|
+
// broken-image glyph over AvatarFallback (e.g. a black "N" badge). Skip it.
|
|
214
|
+
if (src == null || src === "") {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
return (require$$1.jsx(AvatarPrimitive__namespace.Image, { "data-slot": "avatar-image", src: src, className: cn$1("aspect-square size-full", className), ...props }));
|
|
213
218
|
}
|
|
214
219
|
function AvatarFallback({ className, ...props }) {
|
|
215
220
|
return (require$$1.jsx(AvatarPrimitive__namespace.Fallback, { "data-slot": "avatar-fallback", className: cn$1("bg-muted flex size-full items-center justify-center rounded-full", className), ...props }));
|