@tedi-design-system/react 16.0.0-rc.7 → 16.0.0-rc.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/bundle-stats.html +1 -1
- package/package.json +1 -1
- package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay-content.es.js +13 -11
- package/src/tedi/components/overlays/overlay/overlay-trigger.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay-trigger.es.js +21 -17
- package/src/tedi/components/overlays/overlay/overlay.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay.d.ts +2 -0
- package/src/tedi/components/overlays/overlay/overlay.es.js +114 -88
- package/src/tedi/components/overlays/tooltip/tooltip.cjs.js +1 -1
- package/src/tedi/components/overlays/tooltip/tooltip.es.js +21 -14
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),d=require("react"),j=require("./overlay.cjs.js"),F=s=>{const{children:u,classNames:e,labelledBy:y,describedBy:f}=s,{open:l,x:m,y:h,strategy:g,focusManager:o,floating:b,arrowRef:v,getFloatingProps:x,placement:w,context:i,arrow:t,scrollLock:c,contentId:p}=d.useContext(j.OverlayContext);return d.useEffect(()=>{c&&(l?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))},[l,c]),l?n.jsx(r.FloatingPortal,{children:n.jsx(r.FloatingFocusManager,{modal:(o==null?void 0:o.modal)||!1,...o,context:i,children:n.jsxs("div",{...x({ref:b,tabIndex:-1,id:p,"aria-labelledby":y,"aria-describedby":f,style:{position:g,left:m,top:h},className:e==null?void 0:e.content}),"data-placement":w,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:a=>v.current=a,context:i,className:e==null?void 0:e.arrow,height:t==null?void 0:t.height,width:t==null?void 0:t.width,"data-testid":"overlay-arrow"}),u]})})}):null};exports.OverlayContent=F;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { FloatingPortal as
|
|
3
|
-
import { useContext as
|
|
4
|
-
import { OverlayContext as
|
|
1
|
+
import { jsx as n, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { FloatingPortal as x, FloatingFocusManager as F, FloatingArrow as E } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import { useContext as C, useEffect as j } from "react";
|
|
4
|
+
import { OverlayContext as B } from "./overlay.es.js";
|
|
5
5
|
const S = (a) => {
|
|
6
6
|
const { children: c, classNames: e, labelledBy: s, describedBy: m } = a, {
|
|
7
7
|
open: l,
|
|
@@ -15,16 +15,18 @@ const S = (a) => {
|
|
|
15
15
|
placement: p,
|
|
16
16
|
context: r,
|
|
17
17
|
arrow: t,
|
|
18
|
-
scrollLock:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
scrollLock: d,
|
|
19
|
+
contentId: v
|
|
20
|
+
} = C(B);
|
|
21
|
+
return j(() => {
|
|
22
|
+
d && (l ? (document.documentElement.style.overflow = "hidden", document.documentElement.scrollHeight > window.innerHeight && (document.body.style.overflow = "scroll")) : (document.documentElement.style.overflow = "", document.body.style.overflow = ""));
|
|
23
|
+
}, [l, d]), l ? /* @__PURE__ */ n(x, { children: /* @__PURE__ */ n(F, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: /* @__PURE__ */ w(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
26
|
...g({
|
|
26
27
|
ref: u,
|
|
27
28
|
tabIndex: -1,
|
|
29
|
+
id: v,
|
|
28
30
|
"aria-labelledby": s,
|
|
29
31
|
"aria-describedby": m,
|
|
30
32
|
style: {
|
|
@@ -38,9 +40,9 @@ const S = (a) => {
|
|
|
38
40
|
"data-testid": "overlay-content",
|
|
39
41
|
children: [
|
|
40
42
|
/* @__PURE__ */ n(
|
|
41
|
-
|
|
43
|
+
E,
|
|
42
44
|
{
|
|
43
|
-
ref: (
|
|
45
|
+
ref: (i) => b.current = i,
|
|
44
46
|
context: r,
|
|
45
47
|
className: e == null ? void 0 : e.arrow,
|
|
46
48
|
height: t == null ? void 0 : t.height,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),y=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),b=require("../../../../../external/classnames/index.cjs.js"),r=require("react"),p=require("../../base/icon/icon.cjs.js"),x=require("./overlay.cjs.js"),t=require("./overlay.module.scss.cjs.js"),q=require("../../../providers/label-provider/use-labels.cjs.js"),_=s=>{const{children:e,className:l}=s,{getLabel:c}=q.useLabels(),{getReferenceProps:o,reference:a,openWith:u,open:d,role:g,contentId:f}=r.useContext(x.OverlayContext),i=y.useMergeRefs([a,e.ref]),n=g==="tooltip"?{"aria-describedby":d?f:void 0}:{};return r.isValidElement(e)?r.cloneElement(e,o({ref:i,tabIndex:0,...n,label:e.type===p.Icon?c("tooltip.icon-trigger"):void 0,...e.props})):v.jsx("div",{...o({ref:i,tabIndex:0,className:b.default(t.default["tedi-overlay__trigger"],t.default["tedi-overlay__trigger--text"],{[t.default["tedi-overlay__trigger--click"]]:u==="click"},l),...n}),children:e})};exports.OverlayTrigger=_;
|
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMergeRefs as
|
|
3
|
-
import
|
|
4
|
-
import { useContext as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { OverlayContext as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useMergeRefs as g } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import v from "../../../../../external/classnames/index.es.js";
|
|
4
|
+
import { useContext as x, isValidElement as y, cloneElement as b } from "react";
|
|
5
|
+
import { Icon as _ } from "../../base/icon/icon.es.js";
|
|
6
|
+
import { OverlayContext as u } from "./overlay.es.js";
|
|
7
7
|
import r from "./overlay.module.scss.es.js";
|
|
8
|
-
import { useLabels as
|
|
9
|
-
const
|
|
10
|
-
const { children: e, className:
|
|
11
|
-
|
|
8
|
+
import { useLabels as I } from "../../../providers/label-provider/use-labels.es.js";
|
|
9
|
+
const R = (s) => {
|
|
10
|
+
const { children: e, className: n } = s, { getLabel: l } = I(), { getReferenceProps: t, reference: c, openWith: m, open: a, role: p, contentId: f } = x(u), o = g([c, e.ref]), i = p === "tooltip" ? {
|
|
11
|
+
"aria-describedby": a ? f : void 0
|
|
12
|
+
} : {};
|
|
13
|
+
return y(e) ? b(
|
|
12
14
|
e,
|
|
13
15
|
t({
|
|
14
16
|
ref: o,
|
|
15
17
|
tabIndex: 0,
|
|
16
|
-
|
|
18
|
+
...i,
|
|
19
|
+
label: e.type === _ ? l("tooltip.icon-trigger") : void 0,
|
|
17
20
|
...e.props
|
|
18
21
|
})
|
|
19
|
-
) : /* @__PURE__ */
|
|
22
|
+
) : /* @__PURE__ */ d(
|
|
20
23
|
"div",
|
|
21
24
|
{
|
|
22
25
|
...t({
|
|
23
26
|
ref: o,
|
|
24
27
|
tabIndex: 0,
|
|
25
|
-
className:
|
|
28
|
+
className: v(
|
|
26
29
|
r["tedi-overlay__trigger"],
|
|
27
30
|
r["tedi-overlay__trigger--text"],
|
|
28
31
|
{
|
|
29
|
-
[r["tedi-overlay__trigger--click"]]:
|
|
32
|
+
[r["tedi-overlay__trigger--click"]]: m === "click"
|
|
30
33
|
},
|
|
31
|
-
|
|
32
|
-
)
|
|
34
|
+
n
|
|
35
|
+
),
|
|
36
|
+
...i
|
|
33
37
|
}),
|
|
34
38
|
children: e
|
|
35
39
|
}
|
|
36
40
|
);
|
|
37
41
|
};
|
|
38
42
|
export {
|
|
39
|
-
|
|
43
|
+
R as OverlayTrigger
|
|
40
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("react/jsx-runtime"),t=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),n=require("react"),z=require("./overlay-content.cjs.js"),B=require("./overlay-trigger.cjs.js"),J=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),a=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),K=require("../../../helpers/hooks/use-is-touch-device.cjs.js"),N=require("../../../helpers/hooks/use-is-mounted.cjs.js"),Q=3,j=n.createContext({open:!1,onOpenChange:()=>{},isMounted:!1,openWith:"hover",reference:()=>{},floating:()=>{},focusManager:{},arrowRef:{current:null},x:0,y:0,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{width:0,height:0,x:0,y:0,centerOffset:0},placement:"top",context:{},scrollLock:void 0,contentId:""}),i=S=>{const E=K.useIsTouchDevice(),{children:L,placement:W="top",openWith:s=E?"click":"hover",defaultOpen:A=!1,open:c,onToggle:r,role:u="tooltip",arrowDimensions:e,offset:G=Q+((e==null?void 0:e.height)??0),focusManager:d,dismissible:v,scrollLock:y}=S,{order:O=["reference","content"],initialFocus:M,modal:f,...x}=d??{},C=M!==void 0?M:f?0:void 0,[m,F]=n.useState(A),g=n.useRef(null),R=N.useIsMounted(),p=n.useMemo(()=>r&&typeof c<"u"?c:m,[r,c,m]),h=n.useCallback(U=>{typeof c>"u"&&F(U),r==null||r(U)},[c,F,r]),{x:q,y:I,refs:l,strategy:P,context:o,middlewareData:b,placement:w}=t.useFloating({placement:W,open:p,onOpenChange:h,middleware:[a.offset(G),a.flip(),a.shift({padding:8}),a.arrow({element:g,padding:4})],whileElementsMounted:J.autoUpdate}),{getReferenceProps:k,getFloatingProps:T}=t.useInteractions([t.useHover(o,{enabled:s==="hover",handleClose:t.safePolygon()}),t.useClick(o,{toggle:v}),t.useFocus(o,{enabled:s==="hover"}),t.useRole(o,{role:u}),t.useDismiss(o,{enabled:v,outsidePressEvent:s==="click"?"mousedown":"pointerdown"})]),_=n.useId(),H=n.useMemo(()=>({open:p,onOpenChange:h,isMounted:R,openWith:s,focusManager:d?{order:O,modal:f,initialFocus:C,...x}:void 0,reference:l.setReference,floating:l.setFloating,arrowRef:g,x:q,y:I,strategy:P,getReferenceProps:k,getFloatingProps:T,arrow:{width:e==null?void 0:e.width,height:e==null?void 0:e.height,...b.arrow},context:o,placement:w,scrollLock:y,role:u,contentId:_}),[p,h,R,s,d,l.setReference,l.setFloating,g,q,I,P,k,T,e==null?void 0:e.width,e==null?void 0:e.height,b.arrow,o,w,y,u,_,f,O,C,x]);return V.jsx(j.Provider,{value:H,children:L})};i.Trigger=B.OverlayTrigger;i.Content=z.OverlayContent;exports.Overlay=i;exports.OverlayContext=j;exports.default=i;
|
|
@@ -88,6 +88,8 @@ export interface OverlayContextType {
|
|
|
88
88
|
placement: Placement;
|
|
89
89
|
context: FloatingContext<ReferenceType>;
|
|
90
90
|
scrollLock?: boolean;
|
|
91
|
+
role?: UseRoleProps['role'];
|
|
92
|
+
contentId: string;
|
|
91
93
|
}
|
|
92
94
|
export declare const OverlayContext: import('react').Context<OverlayContextType>;
|
|
93
95
|
export declare const Overlay: {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useFloating as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { OverlayContent as
|
|
5
|
-
import { OverlayTrigger as
|
|
6
|
-
import { autoUpdate as
|
|
7
|
-
import { offset as
|
|
8
|
-
import { useIsTouchDevice as
|
|
9
|
-
import { useIsMounted as
|
|
10
|
-
const
|
|
1
|
+
import { jsx as U } from "react/jsx-runtime";
|
|
2
|
+
import { useFloating as V, useInteractions as q, useHover as z, useClick as B, useFocus as J, useRole as K, useDismiss as N, safePolygon as Q } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import { createContext as X, useState as Y, useRef as Z, useMemo as T, useCallback as _, useId as $ } from "react";
|
|
4
|
+
import { OverlayContent as D } from "./overlay-content.es.js";
|
|
5
|
+
import { OverlayTrigger as ee } from "./overlay-trigger.es.js";
|
|
6
|
+
import { autoUpdate as te } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
|
|
7
|
+
import { offset as oe, flip as ne, shift as re, arrow as se } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
|
|
8
|
+
import { useIsTouchDevice as ce } from "../../../helpers/hooks/use-is-touch-device.es.js";
|
|
9
|
+
import { useIsMounted as le } from "../../../helpers/hooks/use-is-mounted.es.js";
|
|
10
|
+
const ae = 3, ie = X({
|
|
11
11
|
open: !1,
|
|
12
12
|
onOpenChange: () => {
|
|
13
13
|
},
|
|
@@ -33,96 +33,122 @@ const se = 3, ae = K({
|
|
|
33
33
|
},
|
|
34
34
|
placement: "top",
|
|
35
35
|
context: {},
|
|
36
|
-
scrollLock: void 0
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
scrollLock: void 0,
|
|
37
|
+
contentId: ""
|
|
38
|
+
}), E = (L) => {
|
|
39
|
+
const W = ce(), {
|
|
40
|
+
children: j,
|
|
41
|
+
placement: A = "top",
|
|
42
|
+
openWith: n = W ? "click" : "hover",
|
|
43
|
+
defaultOpen: G = !1,
|
|
44
|
+
open: r,
|
|
45
|
+
onToggle: o,
|
|
46
|
+
role: c = "tooltip",
|
|
46
47
|
arrowDimensions: e,
|
|
47
|
-
offset:
|
|
48
|
-
focusManager:
|
|
49
|
-
dismissible:
|
|
50
|
-
scrollLock:
|
|
51
|
-
} =
|
|
52
|
-
(
|
|
53
|
-
typeof
|
|
48
|
+
offset: H = ae + ((e == null ? void 0 : e.height) ?? 0),
|
|
49
|
+
focusManager: l,
|
|
50
|
+
dismissible: d,
|
|
51
|
+
scrollLock: p
|
|
52
|
+
} = L, { order: g = ["reference", "content"], initialFocus: h, modal: a, ...m } = l ?? {}, v = h !== void 0 ? h : a ? 0 : void 0, [y, O] = Y(G), i = Z(null), x = le(), f = T(() => o && typeof r < "u" ? r : y, [o, r, y]), u = _(
|
|
53
|
+
(k) => {
|
|
54
|
+
typeof r > "u" && O(k), o == null || o(k);
|
|
54
55
|
},
|
|
55
|
-
[
|
|
56
|
-
), { x:
|
|
57
|
-
placement:
|
|
58
|
-
open:
|
|
59
|
-
onOpenChange:
|
|
56
|
+
[r, O, o]
|
|
57
|
+
), { x: F, y: C, refs: s, strategy: M, context: t, middlewareData: P, placement: R } = V({
|
|
58
|
+
placement: A,
|
|
59
|
+
open: f,
|
|
60
|
+
onOpenChange: u,
|
|
60
61
|
middleware: [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
element:
|
|
62
|
+
oe(H),
|
|
63
|
+
ne(),
|
|
64
|
+
re({ padding: 8 }),
|
|
65
|
+
se({
|
|
66
|
+
element: i,
|
|
66
67
|
padding: 4
|
|
67
68
|
})
|
|
68
69
|
],
|
|
69
|
-
whileElementsMounted:
|
|
70
|
-
}), { getReferenceProps:
|
|
71
|
-
|
|
72
|
-
enabled:
|
|
73
|
-
handleClose:
|
|
70
|
+
whileElementsMounted: te
|
|
71
|
+
}), { getReferenceProps: w, getFloatingProps: I } = q([
|
|
72
|
+
z(t, {
|
|
73
|
+
enabled: n === "hover",
|
|
74
|
+
handleClose: Q()
|
|
74
75
|
}),
|
|
75
|
-
|
|
76
|
-
toggle:
|
|
76
|
+
B(t, {
|
|
77
|
+
toggle: d
|
|
77
78
|
}),
|
|
78
|
-
|
|
79
|
-
enabled:
|
|
79
|
+
J(t, {
|
|
80
|
+
enabled: n === "hover"
|
|
80
81
|
}),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
enabled:
|
|
84
|
-
outsidePressEvent:
|
|
82
|
+
K(t, { role: c }),
|
|
83
|
+
N(t, {
|
|
84
|
+
enabled: d,
|
|
85
|
+
outsidePressEvent: n === "click" ? "mousedown" : "pointerdown"
|
|
85
86
|
})
|
|
86
|
-
])
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
arrow
|
|
110
|
-
width: e == null ? void 0 : e.width,
|
|
111
|
-
height: e == null ? void 0 : e.height,
|
|
112
|
-
...L.arrow
|
|
113
|
-
},
|
|
114
|
-
context: o,
|
|
115
|
-
placement: W,
|
|
116
|
-
scrollLock: M
|
|
87
|
+
]), b = $(), S = T(
|
|
88
|
+
() => ({
|
|
89
|
+
open: f,
|
|
90
|
+
onOpenChange: u,
|
|
91
|
+
isMounted: x,
|
|
92
|
+
openWith: n,
|
|
93
|
+
focusManager: l ? {
|
|
94
|
+
order: g,
|
|
95
|
+
modal: a,
|
|
96
|
+
initialFocus: v,
|
|
97
|
+
...m
|
|
98
|
+
} : void 0,
|
|
99
|
+
reference: s.setReference,
|
|
100
|
+
floating: s.setFloating,
|
|
101
|
+
arrowRef: i,
|
|
102
|
+
x: F,
|
|
103
|
+
y: C,
|
|
104
|
+
strategy: M,
|
|
105
|
+
getReferenceProps: w,
|
|
106
|
+
getFloatingProps: I,
|
|
107
|
+
arrow: {
|
|
108
|
+
width: e == null ? void 0 : e.width,
|
|
109
|
+
height: e == null ? void 0 : e.height,
|
|
110
|
+
...P.arrow
|
|
117
111
|
},
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
context: t,
|
|
113
|
+
placement: R,
|
|
114
|
+
scrollLock: p,
|
|
115
|
+
role: c,
|
|
116
|
+
contentId: b
|
|
117
|
+
}),
|
|
118
|
+
[
|
|
119
|
+
f,
|
|
120
|
+
u,
|
|
121
|
+
x,
|
|
122
|
+
n,
|
|
123
|
+
l,
|
|
124
|
+
s.setReference,
|
|
125
|
+
s.setFloating,
|
|
126
|
+
i,
|
|
127
|
+
F,
|
|
128
|
+
C,
|
|
129
|
+
M,
|
|
130
|
+
w,
|
|
131
|
+
I,
|
|
132
|
+
e == null ? void 0 : e.width,
|
|
133
|
+
e == null ? void 0 : e.height,
|
|
134
|
+
P.arrow,
|
|
135
|
+
t,
|
|
136
|
+
R,
|
|
137
|
+
p,
|
|
138
|
+
c,
|
|
139
|
+
b,
|
|
140
|
+
a,
|
|
141
|
+
g,
|
|
142
|
+
v,
|
|
143
|
+
m
|
|
144
|
+
]
|
|
120
145
|
);
|
|
146
|
+
return /* @__PURE__ */ U(ie.Provider, { value: S, children: j });
|
|
121
147
|
};
|
|
122
|
-
|
|
123
|
-
|
|
148
|
+
E.Trigger = ee;
|
|
149
|
+
E.Content = D;
|
|
124
150
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
151
|
+
E as Overlay,
|
|
152
|
+
ie as OverlayContext,
|
|
153
|
+
E as default
|
|
128
154
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),s=require("../overlay/overlay.cjs.js"),l=require("./tooltip-content.cjs.js"),u=require("./tooltip-trigger.cjs.js"),c=7,a=14,e=o=>{const{openWith:t="hover",focusManager:r,...n}=o;return i.jsx(s.Overlay,{arrowDimensions:{width:a,height:c},openWith:t,role:"tooltip",focusManager:{modal:!1,order:["reference","content"],returnFocus:!0,...r},...n})};e.Trigger=u.TooltipTrigger;e.Content=l.TooltipContent;exports.Tooltip=e;exports.default=e;
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Overlay as
|
|
3
|
-
import { TooltipContent as
|
|
4
|
-
import { TooltipTrigger as
|
|
5
|
-
const
|
|
6
|
-
const { openWith:
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Overlay as s } from "../overlay/overlay.es.js";
|
|
3
|
+
import { TooltipContent as a } from "./tooltip-content.es.js";
|
|
4
|
+
import { TooltipTrigger as m } from "./tooltip-trigger.es.js";
|
|
5
|
+
const p = 7, c = 14, o = (r) => {
|
|
6
|
+
const { openWith: t = "hover", focusManager: e, ...n } = r;
|
|
7
|
+
return /* @__PURE__ */ i(
|
|
8
|
+
s,
|
|
9
9
|
{
|
|
10
10
|
arrowDimensions: {
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
11
|
+
width: c,
|
|
12
|
+
height: p
|
|
13
13
|
},
|
|
14
|
-
openWith:
|
|
15
|
-
|
|
14
|
+
openWith: t,
|
|
15
|
+
role: "tooltip",
|
|
16
|
+
focusManager: {
|
|
17
|
+
modal: !1,
|
|
18
|
+
order: ["reference", "content"],
|
|
19
|
+
returnFocus: !0,
|
|
20
|
+
...e
|
|
21
|
+
},
|
|
22
|
+
...n
|
|
16
23
|
}
|
|
17
24
|
);
|
|
18
25
|
};
|
|
19
|
-
o.Trigger =
|
|
20
|
-
o.Content =
|
|
26
|
+
o.Trigger = m;
|
|
27
|
+
o.Content = a;
|
|
21
28
|
export {
|
|
22
29
|
o as Tooltip,
|
|
23
30
|
o as default
|