@financinha/ui 0.13.1 → 0.14.0

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.cjs CHANGED
@@ -2911,6 +2911,15 @@ var SIZE = {
2911
2911
  default: "size-10 text-sm",
2912
2912
  lg: "size-12 text-base"
2913
2913
  };
2914
+ var ICON_SIZE = {
2915
+ sm: "text-base leading-none [&>svg]:size-4",
2916
+ default: "text-xl leading-none [&>svg]:size-5",
2917
+ lg: "text-xl leading-none [&>svg]:size-5"
2918
+ };
2919
+ var TONE = {
2920
+ neutral: "bg-muted text-muted-foreground",
2921
+ success: "bg-success-50 text-success-500 dark:bg-success-800/40 dark:text-success-300"
2922
+ };
2914
2923
  var STATUS_COLOR = {
2915
2924
  success: "bg-success-400",
2916
2925
  warning: "bg-warning-400",
@@ -2926,6 +2935,8 @@ function BankAvatar({
2926
2935
  name,
2927
2936
  src,
2928
2937
  initials,
2938
+ icon,
2939
+ tone = "neutral",
2929
2940
  color,
2930
2941
  textColor,
2931
2942
  size = "default",
@@ -2959,7 +2970,8 @@ function BankAvatar({
2959
2970
  className: (0, import_cn28.cn)(
2960
2971
  "flex items-center justify-center overflow-hidden rounded-lg font-semibold",
2961
2972
  SIZE[size],
2962
- showLogo ? "bg-white ring-1 ring-border" : !color && "bg-muted text-muted-foreground"
2973
+ showLogo ? "bg-white ring-1 ring-border" : !color && TONE[tone],
2974
+ !showLogo && icon != null && ICON_SIZE[size]
2963
2975
  ),
2964
2976
  style: showLogo ? void 0 : { backgroundColor: color, color: textColor },
2965
2977
  children: showLogo ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
@@ -2970,7 +2982,7 @@ function BankAvatar({
2970
2982
  className: "size-full object-contain",
2971
2983
  onError: () => setFailed(true)
2972
2984
  }
2973
- ) : initials ?? initialsOf(name)
2985
+ ) : icon ?? initials ?? initialsOf(name)
2974
2986
  }
2975
2987
  ),
2976
2988
  status ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(