@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.js
CHANGED
|
@@ -2094,8 +2094,7 @@ function contrastingTextColor(backgroundHex) {
|
|
|
2094
2094
|
function getInitials(name, max = 2) {
|
|
2095
2095
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
2096
2096
|
if (parts.length === 0) return "?";
|
|
2097
|
-
|
|
2098
|
-
return letters.toUpperCase() || "?";
|
|
2097
|
+
return parts.slice(0, Math.max(1, max)).map((part) => part.charAt(0)).join("").toUpperCase();
|
|
2099
2098
|
}
|
|
2100
2099
|
function getAvatarColors(name) {
|
|
2101
2100
|
const normalized = name.trim().toLowerCase();
|
|
@@ -8009,12 +8008,11 @@ function PaymentIcon({
|
|
|
8009
8008
|
}) {
|
|
8010
8009
|
const iconBrand = paymentIconBrandFromStripe(brand);
|
|
8011
8010
|
const Icon = PAYMENT_ICON_FLAT_ROUNDED[iconBrand];
|
|
8012
|
-
const
|
|
8013
|
-
const resolvedHeight = height ?? resolvedWidth / ASPECT;
|
|
8011
|
+
const resolvedHeight = height ?? width / ASPECT;
|
|
8014
8012
|
return /* @__PURE__ */ jsx(
|
|
8015
8013
|
Icon,
|
|
8016
8014
|
{
|
|
8017
|
-
width
|
|
8015
|
+
width,
|
|
8018
8016
|
height: resolvedHeight,
|
|
8019
8017
|
className: cn("inline-block shrink-0", className)
|
|
8020
8018
|
}
|