@firecms/ui 3.0.0-canary.201 → 3.0.0-canary.203
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/Avatar.d.ts +1 -0
- package/dist/index.es.js +40 -33
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +40 -33
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Avatar.tsx +4 -1
package/dist/index.umd.js
CHANGED
@@ -624,7 +624,7 @@
|
|
624
624
|
return t7;
|
625
625
|
};
|
626
626
|
const AvatarInner = (t0, ref) => {
|
627
|
-
const $ = reactCompilerRuntime.c(
|
627
|
+
const $ = reactCompilerRuntime.c(25);
|
628
628
|
let alt;
|
629
629
|
let children;
|
630
630
|
let className;
|
@@ -632,6 +632,7 @@
|
|
632
632
|
let props;
|
633
633
|
let src;
|
634
634
|
let style;
|
635
|
+
let t1;
|
635
636
|
if ($[0] !== t0) {
|
636
637
|
({
|
637
638
|
src,
|
@@ -640,6 +641,7 @@
|
|
640
641
|
className,
|
641
642
|
style,
|
642
643
|
outerClassName,
|
644
|
+
hover: t1,
|
643
645
|
...props
|
644
646
|
} = t0);
|
645
647
|
$[0] = t0;
|
@@ -650,6 +652,7 @@
|
|
650
652
|
$[5] = props;
|
651
653
|
$[6] = src;
|
652
654
|
$[7] = style;
|
655
|
+
$[8] = t1;
|
653
656
|
} else {
|
654
657
|
alt = $[1];
|
655
658
|
children = $[2];
|
@@ -658,51 +661,55 @@
|
|
658
661
|
props = $[5];
|
659
662
|
src = $[6];
|
660
663
|
style = $[7];
|
664
|
+
t1 = $[8];
|
661
665
|
}
|
666
|
+
const hover = t1 === void 0 ? true : t1;
|
662
667
|
const [isImageError, setIsImageError] = React.useState(false);
|
663
|
-
let
|
664
|
-
if ($[
|
665
|
-
|
668
|
+
let t2;
|
669
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
670
|
+
t2 = () => {
|
666
671
|
setIsImageError(true);
|
667
672
|
};
|
668
|
-
$[
|
673
|
+
$[9] = t2;
|
669
674
|
} else {
|
670
|
-
|
675
|
+
t2 = $[9];
|
671
676
|
}
|
672
|
-
const handleImageError =
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
$[10] =
|
677
|
+
const handleImageError = t2;
|
678
|
+
const t3 = hover && "hover:bg-surface-accent-200 hover:dark:bg-surface-accent-700";
|
679
|
+
let t4;
|
680
|
+
if ($[10] !== outerClassName || $[11] !== t3) {
|
681
|
+
t4 = cls("rounded-full flex items-center justify-center overflow-hidden", "p-1 w-12 h-12 min-w-12 min-h-12", t3, outerClassName);
|
682
|
+
$[10] = outerClassName;
|
683
|
+
$[11] = t3;
|
684
|
+
$[12] = t4;
|
678
685
|
} else {
|
679
|
-
|
686
|
+
t4 = $[12];
|
680
687
|
}
|
681
|
-
let
|
682
|
-
if ($[
|
683
|
-
|
684
|
-
$[
|
685
|
-
$[
|
686
|
-
$[
|
687
|
-
$[
|
688
|
-
$[
|
689
|
-
$[
|
688
|
+
let t5;
|
689
|
+
if ($[13] !== alt || $[14] !== children || $[15] !== className || $[16] !== isImageError || $[17] !== src) {
|
690
|
+
t5 = src && !isImageError ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: cls("bg-surface-accent-100 dark:bg-surface-accent-800", "w-full h-full object-cover rounded-full", className), src, alt, onError: handleImageError }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: cls("bg-surface-accent-100 dark:bg-surface-accent-800", "flex items-center justify-center", "w-full h-full py-1.5 text-lg font-medium text-surface-accent-900 dark:text-white rounded-full", className), children });
|
691
|
+
$[13] = alt;
|
692
|
+
$[14] = children;
|
693
|
+
$[15] = className;
|
694
|
+
$[16] = isImageError;
|
695
|
+
$[17] = src;
|
696
|
+
$[18] = t5;
|
690
697
|
} else {
|
691
|
-
|
698
|
+
t5 = $[18];
|
692
699
|
}
|
693
|
-
let
|
694
|
-
if ($[
|
695
|
-
|
696
|
-
$[
|
697
|
-
$[
|
698
|
-
$[
|
699
|
-
$[20] = t2;
|
700
|
-
$[21] = t3;
|
700
|
+
let t6;
|
701
|
+
if ($[19] !== props || $[20] !== ref || $[21] !== style || $[22] !== t4 || $[23] !== t5) {
|
702
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx("button", { ref, style, ...props, className: t4, children: t5 });
|
703
|
+
$[19] = props;
|
704
|
+
$[20] = ref;
|
705
|
+
$[21] = style;
|
701
706
|
$[22] = t4;
|
707
|
+
$[23] = t5;
|
708
|
+
$[24] = t6;
|
702
709
|
} else {
|
703
|
-
|
710
|
+
t6 = $[24];
|
704
711
|
}
|
705
|
-
return
|
712
|
+
return t6;
|
706
713
|
};
|
707
714
|
const Avatar = React.forwardRef(AvatarInner);
|
708
715
|
const BooleanSwitch = React.forwardRef(function BooleanSwitch2({
|