@sesionario/blocks 1.32.0 → 1.33.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/avatar.cjs +1 -2
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.js +1 -2
- package/dist/avatar.js.map +1 -1
- package/dist/charts.cjs +259 -254
- package/dist/charts.cjs.map +1 -1
- package/dist/charts.js +259 -254
- package/dist/charts.js.map +1 -1
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2125,8 +2125,7 @@ function contrastingTextColor(backgroundHex) {
|
|
|
2125
2125
|
function getInitials(name, max = 2) {
|
|
2126
2126
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
2127
2127
|
if (parts.length === 0) return "?";
|
|
2128
|
-
|
|
2129
|
-
return letters.toUpperCase() || "?";
|
|
2128
|
+
return parts.slice(0, Math.max(1, max)).map((part) => part.charAt(0)).join("").toUpperCase();
|
|
2130
2129
|
}
|
|
2131
2130
|
function getAvatarColors(name) {
|
|
2132
2131
|
const normalized = name.trim().toLowerCase();
|
|
@@ -8040,12 +8039,11 @@ function PaymentIcon({
|
|
|
8040
8039
|
}) {
|
|
8041
8040
|
const iconBrand = paymentIconBrandFromStripe(brand);
|
|
8042
8041
|
const Icon = PAYMENT_ICON_FLAT_ROUNDED[iconBrand];
|
|
8043
|
-
const
|
|
8044
|
-
const resolvedHeight = height ?? resolvedWidth / ASPECT;
|
|
8042
|
+
const resolvedHeight = height ?? width / ASPECT;
|
|
8045
8043
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8046
8044
|
Icon,
|
|
8047
8045
|
{
|
|
8048
|
-
width
|
|
8046
|
+
width,
|
|
8049
8047
|
height: resolvedHeight,
|
|
8050
8048
|
className: cn("inline-block shrink-0", className)
|
|
8051
8049
|
}
|