@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/index.umd.js CHANGED
@@ -624,7 +624,7 @@
624
624
  return t7;
625
625
  };
626
626
  const AvatarInner = (t0, ref) => {
627
- const $ = reactCompilerRuntime.c(23);
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 t1;
664
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
665
- t1 = () => {
668
+ let t2;
669
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
670
+ t2 = () => {
666
671
  setIsImageError(true);
667
672
  };
668
- $[8] = t1;
673
+ $[9] = t2;
669
674
  } else {
670
- t1 = $[8];
675
+ t2 = $[9];
671
676
  }
672
- const handleImageError = t1;
673
- let t2;
674
- if ($[9] !== outerClassName) {
675
- t2 = cls("rounded-full flex items-center justify-center overflow-hidden", "p-1 hover:bg-surface-accent-200 hover:dark:bg-surface-accent-700 w-12 h-12 min-w-12 min-h-12", outerClassName);
676
- $[9] = outerClassName;
677
- $[10] = t2;
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
- t2 = $[10];
686
+ t4 = $[12];
680
687
  }
681
- let t3;
682
- if ($[11] !== alt || $[12] !== children || $[13] !== className || $[14] !== isImageError || $[15] !== src) {
683
- t3 = 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 });
684
- $[11] = alt;
685
- $[12] = children;
686
- $[13] = className;
687
- $[14] = isImageError;
688
- $[15] = src;
689
- $[16] = t3;
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
- t3 = $[16];
698
+ t5 = $[18];
692
699
  }
693
- let t4;
694
- if ($[17] !== props || $[18] !== ref || $[19] !== style || $[20] !== t2 || $[21] !== t3) {
695
- t4 = /* @__PURE__ */ jsxRuntime.jsx("button", { ref, style, ...props, className: t2, children: t3 });
696
- $[17] = props;
697
- $[18] = ref;
698
- $[19] = style;
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
- t4 = $[22];
710
+ t6 = $[24];
704
711
  }
705
- return t4;
712
+ return t6;
706
713
  };
707
714
  const Avatar = React.forwardRef(AvatarInner);
708
715
  const BooleanSwitch = React.forwardRef(function BooleanSwitch2({