@photoroom/ui 0.1.570 → 0.1.571
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.
|
@@ -10,6 +10,7 @@ export type TooltipProps = Readonly<{
|
|
|
10
10
|
defaultOpen?: boolean;
|
|
11
11
|
triggerTabIndex?: number;
|
|
12
12
|
sideOffset?: number;
|
|
13
|
+
withArrow?: boolean;
|
|
13
14
|
/**
|
|
14
15
|
* Never open the tooltip from focus, only from hover (or tap on mobile). Prevents it
|
|
15
16
|
* flashing when a focus scope (e.g. a Dialog) autofocuses the trigger on mount. Pair
|
|
@@ -23,5 +24,5 @@ export type TooltipProps = Readonly<{
|
|
|
23
24
|
*
|
|
24
25
|
* ⚠️ The component that is passed as a trigger MUST forward the ref
|
|
25
26
|
*/
|
|
26
|
-
export declare const Tooltip: ({ children, content, isTriggerDisabled, className, triggerClassName, withPortal, side, defaultOpen, triggerTabIndex, sideOffset, disableFocusOpen, ...props }: TooltipProps) => import("react").JSX.Element;
|
|
27
|
+
export declare const Tooltip: ({ children, content, isTriggerDisabled, className, triggerClassName, withPortal, side, defaultOpen, triggerTabIndex, sideOffset, withArrow, disableFocusOpen, ...props }: TooltipProps) => import("react").JSX.Element;
|
|
27
28
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/unsorted/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAM5D,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/unsorted/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAM5D,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,0KAcrB,YAAY,gCAqGd,CAAC"}
|
package/index.mjs
CHANGED
|
@@ -10992,45 +10992,45 @@ var _h = Jm, vh = Qm, yh = eh, bh = ih, xh = oh, Sh = uh, Ch = /* @__PURE__ */ y
|
|
|
10992
10992
|
_(i), b(i), y(i), x(i), re(r) || he(), ee(r);
|
|
10993
10993
|
var z = g(i) || he();
|
|
10994
10994
|
m(i), h(i) || he(), v(i), v(i), T(o), O(o), k(o) || he(), M(r), N(r), ne(r), ie(r), ae(r), A(o), j(o), ce(r), le(r), F(r), S(i), C(i), ue(a), de(a), R(s), te(r) || pe(s), P(r), w(i), me(), he(), I(), L(), fe(), pe(s), te(r) && pe(s), E(o), D(o), oe(r), se(r), e.isMobile = z;
|
|
10995
|
-
})))(), Th = ({ children: e, content: t, isTriggerDisabled: n, className: r, triggerClassName: i, withPortal: a = !0, side: o = "bottom", defaultOpen: s = !1, triggerTabIndex: c = 0, sideOffset: l,
|
|
10996
|
-
let
|
|
10997
|
-
|
|
10998
|
-
|
|
10995
|
+
})))(), Th = ({ children: e, content: t, isTriggerDisabled: n, className: r, triggerClassName: i, withPortal: a = !0, side: o = "bottom", defaultOpen: s = !1, triggerTabIndex: c = 0, sideOffset: l, withArrow: u = !0, disableFocusOpen: d = !1, ...f }) => {
|
|
10996
|
+
let p = Oe(), [m, h] = Ne(s), g = V(!1), _ = a ? bh : ve, v = d ? () => {
|
|
10997
|
+
g.current = !0, queueMicrotask(() => {
|
|
10998
|
+
g.current = !1;
|
|
10999
10999
|
});
|
|
11000
11000
|
} : void 0;
|
|
11001
11001
|
return /* @__PURE__ */ I(_h, { children: /* @__PURE__ */ L(vh, {
|
|
11002
11002
|
delayDuration: 0,
|
|
11003
|
-
open:
|
|
11003
|
+
open: m,
|
|
11004
11004
|
onOpenChange: (e) => {
|
|
11005
|
-
if (e &&
|
|
11006
|
-
|
|
11005
|
+
if (e && g.current) {
|
|
11006
|
+
g.current = !1;
|
|
11007
11007
|
return;
|
|
11008
11008
|
}
|
|
11009
|
-
|
|
11009
|
+
h(e);
|
|
11010
11010
|
},
|
|
11011
11011
|
defaultOpen: s,
|
|
11012
11012
|
children: [/* @__PURE__ */ I(yh, {
|
|
11013
11013
|
asChild: !0,
|
|
11014
11014
|
children: n ? /* @__PURE__ */ I("span", {
|
|
11015
11015
|
className: U("inline-block", i),
|
|
11016
|
-
"aria-describedby":
|
|
11016
|
+
"aria-describedby": p,
|
|
11017
11017
|
tabIndex: c,
|
|
11018
|
-
onFocusCapture:
|
|
11018
|
+
onFocusCapture: v,
|
|
11019
11019
|
children: e
|
|
11020
11020
|
}) : /* @__PURE__ */ I("span", {
|
|
11021
11021
|
className: U("inline-block", i),
|
|
11022
|
-
"aria-describedby":
|
|
11023
|
-
onFocusCapture:
|
|
11024
|
-
onClick: () => wh.isMobile &&
|
|
11022
|
+
"aria-describedby": p,
|
|
11023
|
+
onFocusCapture: v,
|
|
11024
|
+
onClick: () => wh.isMobile && h(!0),
|
|
11025
11025
|
children: e
|
|
11026
11026
|
})
|
|
11027
|
-
}), t && /* @__PURE__ */ I(
|
|
11027
|
+
}), t && /* @__PURE__ */ I(_, { children: /* @__PURE__ */ L(xh, {
|
|
11028
11028
|
side: o,
|
|
11029
11029
|
sideOffset: l,
|
|
11030
11030
|
className: U("component-400 rounded-250 bg-background-tooltip z-50 px-1.5 pt-[5px] pb-1.5 [word-break:break-word] text-white", "max-w-[100vw]", "[&_strong]:component-400 [&_strong]:bg-white-alpha-300 [&_strong]:rounded-[2px] [&_strong]:px-[2px]", "[&_b]:component-400 [&_b]:bg-white-alpha-300 [&_b]:rounded-[2px] [&_b]:px-[2px]", "[&_a]:underline", o === "bottom" && "animate-tooltip-slide-down", o === "top" && "animate-tooltip-slide-up", o === "left" && "animate-tooltip-slide-left", o === "right" && "animate-tooltip-slide-right", r),
|
|
11031
|
-
id:
|
|
11032
|
-
...
|
|
11033
|
-
children: [t, /* @__PURE__ */ I(Sh, {
|
|
11031
|
+
id: p,
|
|
11032
|
+
...f,
|
|
11033
|
+
children: [t, u && /* @__PURE__ */ I(Sh, {
|
|
11034
11034
|
className: "fill-background-tooltip",
|
|
11035
11035
|
asChild: !0,
|
|
11036
11036
|
children: /* @__PURE__ */ I("svg", {
|