@financinha/ui 0.14.0 → 0.14.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/dist/index.cjs +22 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2644,15 +2644,25 @@ import * as React28 from "react";
|
|
|
2644
2644
|
import { cn as cn28 } from "cn";
|
|
2645
2645
|
import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2646
2646
|
var SIZE = {
|
|
2647
|
-
sm: "size-8 text-xs",
|
|
2648
|
-
default: "size-10 text-sm",
|
|
2649
|
-
lg: "size-12 text-base"
|
|
2647
|
+
sm: "size-8 rounded-md text-xs",
|
|
2648
|
+
default: "size-10 rounded-lg text-sm",
|
|
2649
|
+
lg: "size-12 rounded-lg text-base"
|
|
2650
2650
|
};
|
|
2651
2651
|
var ICON_SIZE = {
|
|
2652
2652
|
sm: "text-base leading-none [&>svg]:size-4",
|
|
2653
2653
|
default: "text-xl leading-none [&>svg]:size-5",
|
|
2654
2654
|
lg: "text-xl leading-none [&>svg]:size-5"
|
|
2655
2655
|
};
|
|
2656
|
+
var OWNER_SIZE = {
|
|
2657
|
+
sm: { circle: "h-4 w-4", count: "h-4 min-w-4 px-1" },
|
|
2658
|
+
default: { circle: "h-5 w-5", count: "h-5 min-w-5 px-1" },
|
|
2659
|
+
lg: { circle: "h-5 w-5", count: "h-5 min-w-5 px-1" }
|
|
2660
|
+
};
|
|
2661
|
+
var STATUS_SIZE = {
|
|
2662
|
+
sm: "size-2.5",
|
|
2663
|
+
default: "size-3",
|
|
2664
|
+
lg: "size-3"
|
|
2665
|
+
};
|
|
2656
2666
|
var TONE = {
|
|
2657
2667
|
neutral: "bg-muted text-muted-foreground",
|
|
2658
2668
|
success: "bg-success-50 text-success-500 dark:bg-success-800/40 dark:text-success-300"
|
|
@@ -2705,7 +2715,7 @@ function BankAvatar({
|
|
|
2705
2715
|
"aria-hidden": true,
|
|
2706
2716
|
"data-slot": "bank-avatar-image",
|
|
2707
2717
|
className: cn28(
|
|
2708
|
-
"flex items-center justify-center overflow-hidden
|
|
2718
|
+
"flex items-center justify-center overflow-hidden font-semibold",
|
|
2709
2719
|
SIZE[size],
|
|
2710
2720
|
showLogo ? "bg-white ring-1 ring-border" : !color && TONE[tone],
|
|
2711
2721
|
!showLogo && icon != null && ICON_SIZE[size]
|
|
@@ -2728,7 +2738,8 @@ function BankAvatar({
|
|
|
2728
2738
|
"aria-hidden": true,
|
|
2729
2739
|
"data-slot": "bank-avatar-status",
|
|
2730
2740
|
className: cn28(
|
|
2731
|
-
"absolute -top-1 -right-1
|
|
2741
|
+
"absolute -top-1 -right-1 rounded-full ring-2 ring-background",
|
|
2742
|
+
STATUS_SIZE[size],
|
|
2732
2743
|
STATUS_COLOR[status]
|
|
2733
2744
|
)
|
|
2734
2745
|
}
|
|
@@ -2739,12 +2750,14 @@ function BankAvatar({
|
|
|
2739
2750
|
"aria-hidden": true,
|
|
2740
2751
|
"data-slot": "bank-avatar-owner",
|
|
2741
2752
|
className: cn28(
|
|
2742
|
-
|
|
2743
|
-
//
|
|
2744
|
-
|
|
2753
|
+
"absolute -right-1 -bottom-1 flex items-center justify-center overflow-hidden rounded-full text-xs font-semibold ring-2 ring-background",
|
|
2754
|
+
// Inicial e número com cores diferentes, para não se confundirem. No claro: inicial em cinza escuro com
|
|
2755
|
+
// a letra branca, número em cinza claro. No escuro: número claro (como o "+3" do Avatar group) e
|
|
2756
|
+
// inicial escura. Nada de lilás (é da opção escolhida e da IA) nem de roxo 500 (é da ação principal).
|
|
2757
|
+
"count" in owner ? "bg-neutral-100 text-muted-foreground dark:bg-neutral-300 dark:text-neutral-800" : "bg-neutral-400 text-white dark:bg-muted dark:text-muted-foreground",
|
|
2745
2758
|
// Só o número cresce na largura; foto e inicial ficam num círculo fixo (sem isso a foto
|
|
2746
2759
|
// esticava o selo até a largura dela).
|
|
2747
|
-
"count" in owner ?
|
|
2760
|
+
"count" in owner ? OWNER_SIZE[size].count : OWNER_SIZE[size].circle
|
|
2748
2761
|
),
|
|
2749
2762
|
children: "count" in owner ? owner.count : owner.src ? /* @__PURE__ */ jsx27("img", { src: owner.src, alt: "", className: "size-full object-cover" }) : initialsOf(owner.name).charAt(0)
|
|
2750
2763
|
}
|