@fileverse/ui 5.1.7 → 5.1.8
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.es.d.ts +1 -0
- package/dist/index.es.js +14 -12
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -1026,6 +1026,7 @@ export declare const Tooltip: React_2.ForwardRefExoticComponent<TooltipProps & R
|
|
|
1026
1026
|
export declare interface TooltipProps extends React_2.HTMLAttributes<HTMLElement>, VariantProps<typeof tooltipVariants> {
|
|
1027
1027
|
text: string | React_2.ReactNode;
|
|
1028
1028
|
sideOffset?: number;
|
|
1029
|
+
asTriggerChild?: boolean;
|
|
1029
1030
|
open?: boolean;
|
|
1030
1031
|
}
|
|
1031
1032
|
|
package/dist/index.es.js
CHANGED
|
@@ -36606,30 +36606,32 @@ const w9e = (e, t) => ps(e) ? new M9e(t) : new k9e(t, {
|
|
|
36606
36606
|
beakAlignment: o,
|
|
36607
36607
|
sideOffset: r = 5,
|
|
36608
36608
|
open: i,
|
|
36609
|
-
|
|
36610
|
-
|
|
36611
|
-
|
|
36612
|
-
|
|
36613
|
-
|
|
36609
|
+
asTriggerChild: c,
|
|
36610
|
+
...d
|
|
36611
|
+
}, l) => {
|
|
36612
|
+
const u = ({
|
|
36613
|
+
position: h,
|
|
36614
|
+
beakAlignment: p
|
|
36614
36615
|
}) => {
|
|
36615
|
-
const
|
|
36616
|
-
return
|
|
36616
|
+
const m = h === "bottom" || h === "top", k = h === "right" || h === "left";
|
|
36617
|
+
return m && p === "start" ? "[&>span]:!left-[10%]" : k && p === "start" ? "[&>span]:!top-[20%]" : m && p === "end" ? "[&>span]:!left-[80%]" : k && p === "end" ? "[&>span]:!top-[60%]" : k && p === "center" ? "my-0 -mx-1" : "-my-1";
|
|
36617
36618
|
};
|
|
36618
36619
|
return /* @__PURE__ */ f.jsx(C9e, { children: /* @__PURE__ */ f.jsxs(b9e, { open: i, children: [
|
|
36619
36620
|
/* @__PURE__ */ f.jsx(
|
|
36620
36621
|
L9e,
|
|
36621
36622
|
{
|
|
36622
36623
|
"data-testid": "tooltip-trigger",
|
|
36623
|
-
onClick: (
|
|
36624
|
-
|
|
36624
|
+
onClick: (h) => {
|
|
36625
|
+
h.currentTarget.blur();
|
|
36625
36626
|
},
|
|
36627
|
+
asChild: c,
|
|
36626
36628
|
children: e
|
|
36627
36629
|
}
|
|
36628
36630
|
),
|
|
36629
36631
|
/* @__PURE__ */ f.jsx(N9e, { children: /* @__PURE__ */ f.jsx(
|
|
36630
36632
|
Pn.div,
|
|
36631
36633
|
{
|
|
36632
|
-
ref:
|
|
36634
|
+
ref: l,
|
|
36633
36635
|
initial: ui[a || "top"].initial,
|
|
36634
36636
|
animate: ui[a || "top"].animate,
|
|
36635
36637
|
exit: ui[a || "top"].exit,
|
|
@@ -36647,10 +36649,10 @@ const w9e = (e, t) => ps(e) ? new M9e(t) : new k9e(t, {
|
|
|
36647
36649
|
className: T(
|
|
36648
36650
|
"max-w-sm min-h-[2vh] overflow-hidden rounded color-bg-tooltip p-2 text-helper-text-sm color-text-tooltip",
|
|
36649
36651
|
S9e({ position: a, className: t }),
|
|
36650
|
-
|
|
36652
|
+
u({ position: a, beakAlignment: o }),
|
|
36651
36653
|
t
|
|
36652
36654
|
),
|
|
36653
|
-
...
|
|
36655
|
+
...d,
|
|
36654
36656
|
side: a || "top",
|
|
36655
36657
|
align: o || "center",
|
|
36656
36658
|
children: [
|