@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.cjs
CHANGED
|
@@ -2907,15 +2907,25 @@ var React28 = __toESM(require("react"), 1);
|
|
|
2907
2907
|
var import_cn28 = require("cn");
|
|
2908
2908
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2909
2909
|
var SIZE = {
|
|
2910
|
-
sm: "size-8 text-xs",
|
|
2911
|
-
default: "size-10 text-sm",
|
|
2912
|
-
lg: "size-12 text-base"
|
|
2910
|
+
sm: "size-8 rounded-md text-xs",
|
|
2911
|
+
default: "size-10 rounded-lg text-sm",
|
|
2912
|
+
lg: "size-12 rounded-lg text-base"
|
|
2913
2913
|
};
|
|
2914
2914
|
var ICON_SIZE = {
|
|
2915
2915
|
sm: "text-base leading-none [&>svg]:size-4",
|
|
2916
2916
|
default: "text-xl leading-none [&>svg]:size-5",
|
|
2917
2917
|
lg: "text-xl leading-none [&>svg]:size-5"
|
|
2918
2918
|
};
|
|
2919
|
+
var OWNER_SIZE = {
|
|
2920
|
+
sm: { circle: "h-4 w-4", count: "h-4 min-w-4 px-1" },
|
|
2921
|
+
default: { circle: "h-5 w-5", count: "h-5 min-w-5 px-1" },
|
|
2922
|
+
lg: { circle: "h-5 w-5", count: "h-5 min-w-5 px-1" }
|
|
2923
|
+
};
|
|
2924
|
+
var STATUS_SIZE = {
|
|
2925
|
+
sm: "size-2.5",
|
|
2926
|
+
default: "size-3",
|
|
2927
|
+
lg: "size-3"
|
|
2928
|
+
};
|
|
2919
2929
|
var TONE = {
|
|
2920
2930
|
neutral: "bg-muted text-muted-foreground",
|
|
2921
2931
|
success: "bg-success-50 text-success-500 dark:bg-success-800/40 dark:text-success-300"
|
|
@@ -2968,7 +2978,7 @@ function BankAvatar({
|
|
|
2968
2978
|
"aria-hidden": true,
|
|
2969
2979
|
"data-slot": "bank-avatar-image",
|
|
2970
2980
|
className: (0, import_cn28.cn)(
|
|
2971
|
-
"flex items-center justify-center overflow-hidden
|
|
2981
|
+
"flex items-center justify-center overflow-hidden font-semibold",
|
|
2972
2982
|
SIZE[size],
|
|
2973
2983
|
showLogo ? "bg-white ring-1 ring-border" : !color && TONE[tone],
|
|
2974
2984
|
!showLogo && icon != null && ICON_SIZE[size]
|
|
@@ -2991,7 +3001,8 @@ function BankAvatar({
|
|
|
2991
3001
|
"aria-hidden": true,
|
|
2992
3002
|
"data-slot": "bank-avatar-status",
|
|
2993
3003
|
className: (0, import_cn28.cn)(
|
|
2994
|
-
"absolute -top-1 -right-1
|
|
3004
|
+
"absolute -top-1 -right-1 rounded-full ring-2 ring-background",
|
|
3005
|
+
STATUS_SIZE[size],
|
|
2995
3006
|
STATUS_COLOR[status]
|
|
2996
3007
|
)
|
|
2997
3008
|
}
|
|
@@ -3002,12 +3013,14 @@ function BankAvatar({
|
|
|
3002
3013
|
"aria-hidden": true,
|
|
3003
3014
|
"data-slot": "bank-avatar-owner",
|
|
3004
3015
|
className: (0, import_cn28.cn)(
|
|
3005
|
-
|
|
3006
|
-
//
|
|
3007
|
-
|
|
3016
|
+
"absolute -right-1 -bottom-1 flex items-center justify-center overflow-hidden rounded-full text-xs font-semibold ring-2 ring-background",
|
|
3017
|
+
// Inicial e número com cores diferentes, para não se confundirem. No claro: inicial em cinza escuro com
|
|
3018
|
+
// a letra branca, número em cinza claro. No escuro: número claro (como o "+3" do Avatar group) e
|
|
3019
|
+
// inicial escura. Nada de lilás (é da opção escolhida e da IA) nem de roxo 500 (é da ação principal).
|
|
3020
|
+
"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",
|
|
3008
3021
|
// Só o número cresce na largura; foto e inicial ficam num círculo fixo (sem isso a foto
|
|
3009
3022
|
// esticava o selo até a largura dela).
|
|
3010
|
-
"count" in owner ?
|
|
3023
|
+
"count" in owner ? OWNER_SIZE[size].count : OWNER_SIZE[size].circle
|
|
3011
3024
|
),
|
|
3012
3025
|
children: "count" in owner ? owner.count : owner.src ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { src: owner.src, alt: "", className: "size-full object-cover" }) : initialsOf(owner.name).charAt(0)
|
|
3013
3026
|
}
|