@sesionario/blocks 1.21.0 → 1.22.1
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 +69 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +70 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1686,17 +1686,17 @@ function TenantAvatar({
|
|
|
1686
1686
|
logo,
|
|
1687
1687
|
size = "md"
|
|
1688
1688
|
}) {
|
|
1689
|
-
const sizeClass = size === "sm" ? "size-6
|
|
1689
|
+
const sizeClass = size === "sm" ? "size-6" : "size-8";
|
|
1690
1690
|
const textClass = size === "sm" ? "text-xs" : "text-sm";
|
|
1691
1691
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1692
1692
|
"div",
|
|
1693
1693
|
{
|
|
1694
1694
|
className: cn(
|
|
1695
|
-
"flex shrink-0 items-center justify-center overflow-hidden font-medium",
|
|
1695
|
+
"relative flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium",
|
|
1696
1696
|
sizeClass
|
|
1697
1697
|
),
|
|
1698
1698
|
style: logo ? void 0 : avatarFallbackStyle(name),
|
|
1699
|
-
children: logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "", className: "
|
|
1699
|
+
children: logo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "", className: "absolute -inset-px object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: textClass, children: getInitials(name) })
|
|
1700
1700
|
}
|
|
1701
1701
|
);
|
|
1702
1702
|
}
|
|
@@ -1713,7 +1713,7 @@ function SwitcherSkeleton({
|
|
|
1713
1713
|
"pointer-events-none flex size-8 items-center justify-center rounded-md",
|
|
1714
1714
|
className
|
|
1715
1715
|
),
|
|
1716
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-
|
|
1716
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-full bg-muted" })
|
|
1717
1717
|
}
|
|
1718
1718
|
);
|
|
1719
1719
|
}
|
|
@@ -1726,7 +1726,7 @@ function SwitcherSkeleton({
|
|
|
1726
1726
|
className
|
|
1727
1727
|
),
|
|
1728
1728
|
children: [
|
|
1729
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-
|
|
1729
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-8 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
1730
1730
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
1731
1731
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-24 animate-pulse rounded bg-muted" }),
|
|
1732
1732
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 w-16 animate-pulse rounded bg-muted" })
|
|
@@ -1769,7 +1769,7 @@ function OrgSwitcher({
|
|
|
1769
1769
|
triggerClassNameProp
|
|
1770
1770
|
),
|
|
1771
1771
|
children: [
|
|
1772
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-
|
|
1772
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "size-4 text-muted-foreground" }) }),
|
|
1773
1773
|
!collapsed ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid min-w-0 flex-1 text-left leading-tight", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: labels.empty }) }) : null
|
|
1774
1774
|
]
|
|
1775
1775
|
}
|
|
@@ -1786,7 +1786,7 @@ function OrgSwitcher({
|
|
|
1786
1786
|
className
|
|
1787
1787
|
),
|
|
1788
1788
|
children: [
|
|
1789
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-
|
|
1789
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "size-4 text-muted-foreground" }) }),
|
|
1790
1790
|
!collapsed ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid min-w-0 flex-1 text-left leading-tight", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium text-muted-foreground", children: labels.empty }) }) : null
|
|
1791
1791
|
]
|
|
1792
1792
|
}
|
|
@@ -2223,14 +2223,7 @@ function MenuAvatar({
|
|
|
2223
2223
|
"relative flex shrink-0 overflow-hidden rounded-full",
|
|
2224
2224
|
sizeClass
|
|
2225
2225
|
),
|
|
2226
|
-
children: image ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2227
|
-
"img",
|
|
2228
|
-
{
|
|
2229
|
-
src: image,
|
|
2230
|
-
alt: "",
|
|
2231
|
-
className: "aspect-square size-full object-cover"
|
|
2232
|
-
}
|
|
2233
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2226
|
+
children: image ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: image, alt: "", className: "absolute -inset-px object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2234
2227
|
"span",
|
|
2235
2228
|
{
|
|
2236
2229
|
className: "flex size-full items-center justify-center text-xs font-semibold",
|
|
@@ -2672,8 +2665,6 @@ function AvatarEditor({
|
|
|
2672
2665
|
canvas.width = displaySize;
|
|
2673
2666
|
canvas.height = displaySize;
|
|
2674
2667
|
ctx.clearRect(0, 0, displaySize, displaySize);
|
|
2675
|
-
ctx.fillStyle = "#1a1a2e";
|
|
2676
|
-
ctx.fillRect(0, 0, displaySize, displaySize);
|
|
2677
2668
|
ctx.save();
|
|
2678
2669
|
ctx.translate(displaySize / 2, displaySize / 2);
|
|
2679
2670
|
ctx.rotate(rotation * Math.PI / 180);
|
|
@@ -2695,28 +2686,6 @@ function AvatarEditor({
|
|
|
2695
2686
|
drawHeight
|
|
2696
2687
|
);
|
|
2697
2688
|
ctx.restore();
|
|
2698
|
-
ctx.globalCompositeOperation = "destination-in";
|
|
2699
|
-
ctx.beginPath();
|
|
2700
|
-
ctx.arc(
|
|
2701
|
-
displaySize / 2,
|
|
2702
|
-
displaySize / 2,
|
|
2703
|
-
displaySize / 2 - 4,
|
|
2704
|
-
0,
|
|
2705
|
-
Math.PI * 2
|
|
2706
|
-
);
|
|
2707
|
-
ctx.fill();
|
|
2708
|
-
ctx.globalCompositeOperation = "source-over";
|
|
2709
|
-
ctx.strokeStyle = "hsl(var(--primary))";
|
|
2710
|
-
ctx.lineWidth = 3;
|
|
2711
|
-
ctx.beginPath();
|
|
2712
|
-
ctx.arc(
|
|
2713
|
-
displaySize / 2,
|
|
2714
|
-
displaySize / 2,
|
|
2715
|
-
displaySize / 2 - 2,
|
|
2716
|
-
0,
|
|
2717
|
-
Math.PI * 2
|
|
2718
|
-
);
|
|
2719
|
-
ctx.stroke();
|
|
2720
2689
|
const dataUrl = generateOutput();
|
|
2721
2690
|
if (dataUrl) {
|
|
2722
2691
|
onChange?.(dataUrl);
|
|
@@ -2822,6 +2791,8 @@ function AvatarEditor({
|
|
|
2822
2791
|
const gapSize = isLarge ? "gap-6" : "gap-4";
|
|
2823
2792
|
const controlGap = isLarge ? "gap-3" : "gap-2";
|
|
2824
2793
|
const sliderHeight = isLarge ? "[&_[role=slider]]:h-6 [&_[role=slider]]:w-6" : "";
|
|
2794
|
+
const guideRadius = size / 2 - 2;
|
|
2795
|
+
const guideCenter = size / 2;
|
|
2825
2796
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2826
2797
|
"div",
|
|
2827
2798
|
{
|
|
@@ -2885,6 +2856,36 @@ function AvatarEditor({
|
|
|
2885
2856
|
onTouchEnd: handleMouseUp
|
|
2886
2857
|
}
|
|
2887
2858
|
),
|
|
2859
|
+
imageLoaded && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2860
|
+
"svg",
|
|
2861
|
+
{
|
|
2862
|
+
width: size,
|
|
2863
|
+
height: size,
|
|
2864
|
+
className: "pointer-events-none absolute inset-0",
|
|
2865
|
+
"aria-hidden": "true",
|
|
2866
|
+
children: [
|
|
2867
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2868
|
+
"path",
|
|
2869
|
+
{
|
|
2870
|
+
d: `M0 0H${size}V${size}H0Z M${guideCenter - guideRadius} ${guideCenter}a${guideRadius} ${guideRadius} 0 1 0 ${guideRadius * 2} 0a${guideRadius} ${guideRadius} 0 1 0 ${-guideRadius * 2} 0`,
|
|
2871
|
+
fill: "rgb(0 0 0 / 0.45)",
|
|
2872
|
+
fillRule: "evenodd"
|
|
2873
|
+
}
|
|
2874
|
+
),
|
|
2875
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2876
|
+
"circle",
|
|
2877
|
+
{
|
|
2878
|
+
cx: guideCenter,
|
|
2879
|
+
cy: guideCenter,
|
|
2880
|
+
r: guideRadius,
|
|
2881
|
+
fill: "none",
|
|
2882
|
+
stroke: "hsl(var(--primary))",
|
|
2883
|
+
strokeWidth: "3"
|
|
2884
|
+
}
|
|
2885
|
+
)
|
|
2886
|
+
]
|
|
2887
|
+
}
|
|
2888
|
+
),
|
|
2888
2889
|
showGrid && imageLoaded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2889
2890
|
"div",
|
|
2890
2891
|
{
|
|
@@ -3434,14 +3435,14 @@ function AvatarEditorDialog({
|
|
|
3434
3435
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3435
3436
|
"div",
|
|
3436
3437
|
{
|
|
3437
|
-
className: "w-full h-full rounded-full overflow-hidden bg-muted border-2 border-border flex items-center justify-center",
|
|
3438
|
+
className: "relative w-full h-full rounded-full overflow-hidden bg-muted border-2 border-border flex items-center justify-center",
|
|
3438
3439
|
style: { width: displaySize, height: displaySize },
|
|
3439
3440
|
children: value ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3440
3441
|
"img",
|
|
3441
3442
|
{
|
|
3442
3443
|
src: value || "/placeholder.svg",
|
|
3443
3444
|
alt: "Avatar",
|
|
3444
|
-
className: "
|
|
3445
|
+
className: "absolute -inset-px object-cover"
|
|
3445
3446
|
}
|
|
3446
3447
|
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3447
3448
|
"div",
|
|
@@ -7332,6 +7333,32 @@ function PaymentIcon({
|
|
|
7332
7333
|
}
|
|
7333
7334
|
);
|
|
7334
7335
|
}
|
|
7336
|
+
var BrandX = React7.forwardRef(function BrandX2({
|
|
7337
|
+
className,
|
|
7338
|
+
size = 24,
|
|
7339
|
+
"aria-label": ariaLabel,
|
|
7340
|
+
"aria-labelledby": ariaLabelledby,
|
|
7341
|
+
...props
|
|
7342
|
+
}, ref) {
|
|
7343
|
+
const labelled = Boolean(ariaLabel || ariaLabelledby);
|
|
7344
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7345
|
+
"svg",
|
|
7346
|
+
{
|
|
7347
|
+
ref,
|
|
7348
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7349
|
+
viewBox: "0 0 24 24",
|
|
7350
|
+
fill: "currentColor",
|
|
7351
|
+
...props,
|
|
7352
|
+
"aria-label": ariaLabel,
|
|
7353
|
+
"aria-labelledby": ariaLabelledby,
|
|
7354
|
+
"aria-hidden": labelled ? void 0 : true,
|
|
7355
|
+
width: size,
|
|
7356
|
+
height: size,
|
|
7357
|
+
className: cn("shrink-0", className),
|
|
7358
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z" })
|
|
7359
|
+
}
|
|
7360
|
+
);
|
|
7361
|
+
});
|
|
7335
7362
|
function MessageGroup({ className, ...props }) {
|
|
7336
7363
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7337
7364
|
"div",
|
|
@@ -8676,6 +8703,7 @@ Object.defineProperty(exports, "useMessageScrollerVisibility", {
|
|
|
8676
8703
|
});
|
|
8677
8704
|
exports.AvatarEditor = AvatarEditor;
|
|
8678
8705
|
exports.AvatarEditorDialog = AvatarEditorDialog;
|
|
8706
|
+
exports.BrandX = BrandX;
|
|
8679
8707
|
exports.Bubble = Bubble;
|
|
8680
8708
|
exports.BubbleContent = BubbleContent;
|
|
8681
8709
|
exports.BubbleGroup = BubbleGroup;
|