@financinha/ui 0.13.0 → 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 +22 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +22 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 &&
|
|
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)(
|
|
@@ -3500,9 +3512,9 @@ var import_cn37 = require("cn");
|
|
|
3500
3512
|
var import_lucide_react13 = require("lucide-react");
|
|
3501
3513
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3502
3514
|
var ICON_TONE2 = {
|
|
3503
|
-
success: "bg-success-
|
|
3504
|
-
warning: "bg-warning-
|
|
3505
|
-
tip: "bg-primary-
|
|
3515
|
+
success: "bg-success-100 text-success-500 dark:bg-success-800/60 dark:text-success-300",
|
|
3516
|
+
warning: "bg-warning-200 text-warning-500 dark:bg-warning-800/60 dark:text-warning-300",
|
|
3517
|
+
tip: "bg-primary-200 text-primary-500 dark:bg-primary-800/60 dark:text-primary-300"
|
|
3506
3518
|
};
|
|
3507
3519
|
var TITLE_TONE = {
|
|
3508
3520
|
success: "text-success-500 dark:text-success-300",
|
|
@@ -3568,7 +3580,11 @@ function InsightCard({
|
|
|
3568
3580
|
"div",
|
|
3569
3581
|
{
|
|
3570
3582
|
"data-slot": "insight-card-content",
|
|
3571
|
-
className:
|
|
3583
|
+
className: (0, import_cn37.cn)(
|
|
3584
|
+
"flex flex-col px-(--card-spacing) text-sm leading-relaxed text-neutral-600 dark:text-neutral-300",
|
|
3585
|
+
// sm sem linhas: 20 px entre os insights, porque só o espaço os separa. Com linhas, 12 px de cada lado da linha.
|
|
3586
|
+
sm && !divided ? "gap-5" : "gap-3"
|
|
3587
|
+
),
|
|
3572
3588
|
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(InsightCardContext.Provider, { value: contexto, children })
|
|
3573
3589
|
}
|
|
3574
3590
|
)
|