@radix-ui/react-tooltip
Advanced tools
Comparing version 0.1.2-rc.8 to 0.1.2-rc.9
@@ -1,2 +0,2 @@ | ||
var e,o=require("@radix-ui/react-id").useId,t=E({},require("@radix-ui/react-visually-hidden")),r=require("@radix-ui/react-slot").Slottable,n=require("@radix-ui/react-portal").Portal,i=require("@radix-ui/react-popper"),l=E({},i),u=i.createPopperScope,a=require("@radix-ui/react-primitive").Primitive,s=require("@radix-ui/react-presence").Presence,c=require("@radix-ui/react-use-rect").useRect,p=require("@radix-ui/react-use-previous").usePrevious,d=require("@radix-ui/react-use-escape-keydown").useEscapeKeydown,T=require("@radix-ui/react-use-controllable-state").useControllableState,f=require("@radix-ui/react-context").createContextScope,m=require("@radix-ui/react-compose-refs").useComposedRefs,C=require("@radix-ui/primitive").composeEventHandlers,x=E({},require("react")),w=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function E(e,o){return Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),e}const[v,g]=f("Tooltip",[u]);exports.createTooltipScope=g;const b=u(),_=700,[y,q]=v("TooltipProvider",{isOpenDelayed:!0,delayDuration:_,onTooltipOpen:()=>{},onTooltipClose:()=>{}}),h=e=>{const{__scopeTooltip:o,delayDuration:t=_,skipDelayDuration:r=300,children:n}=e,[i,l]=x.useState(!0),u=x.useRef(0);return x.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),/*#__PURE__*/x.createElement(y,{scope:o,isOpenDelayed:i,delayDuration:t,onTooltipOpen:x.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onTooltipClose:x.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),r)}),[r])},n)};exports.TooltipProvider=h;const[D,O]=v("Tooltip"),R=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i=!1,onOpenChange:u,delayDuration:a}=e,s=q("Tooltip",t),c=b(t),[d,f]=x.useState(null),m=o(),C=x.useRef(0),w=x.useRef(!1),E=null!=a?a:s.delayDuration,v=!w.current&&s.isOpenDelayed?E:0,g=p(Boolean(v)),{onTooltipOpen:_,onTooltipClose:y}=s,[h=!1,O]=T({prop:n,defaultProp:i,onChange:e=>{e?(document.dispatchEvent(new CustomEvent("tooltip.open")),_()):(w.current=!1,y()),null==u||u(e)}}),R=x.useMemo((()=>h?g?"delayed-open":"instant-open":"closed"),[g,h]);return x.useEffect((()=>()=>window.clearTimeout(C.current)),[]),/*#__PURE__*/x.createElement(l.Root,c,/*#__PURE__*/x.createElement(D,{scope:t,contentId:m,open:h,stateAttribute:R,trigger:d,onTriggerChange:f,onFocus:x.useCallback((()=>{w.current=!0,O(!0)}),[O]),onOpen:x.useCallback((()=>{window.clearTimeout(C.current),C.current=window.setTimeout((()=>O(!0)),v)}),[v,O]),onClose:x.useCallback((()=>{window.clearTimeout(C.current),O(!1)}),[O])},r))};exports.Tooltip=R;const k=/*#__PURE__*/x.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,n=O("TooltipTrigger",t),i=b(t),u=m(o,n.onTriggerChange);/*#__PURE__*/return x.createElement(l.Anchor,w({asChild:!0},i),/*#__PURE__*/x.createElement(a.button,w({"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute},r,{ref:u,onMouseEnter:C(e.onMouseEnter,n.onOpen),onMouseLeave:C(e.onMouseLeave,n.onClose),onMouseDown:C(e.onMouseDown,n.onClose),onFocus:C(e.onFocus,n.onFocus),onBlur:C(e.onBlur,n.onClose),onClick:C(e.onClick,n.onClose)})))}));exports.TooltipTrigger=k;const M=/*#__PURE__*/x.forwardRef(((e,o)=>{const{forceMount:t,...r}=e,n=O("TooltipContent",e.__scopeTooltip);/*#__PURE__*/return x.createElement(s,{present:t||n.open},/*#__PURE__*/x.createElement(P,w({ref:o},r)))}));exports.TooltipContent=M;const P=/*#__PURE__*/x.forwardRef(((e,o)=>{const{__scopeTooltip:i,children:u,"aria-label":a,portalled:s=!0,...c}=e,p=O("TooltipContent",i),T=b(i),f=s?n:x.Fragment,{onClose:m}=p;return d((()=>m())),x.useEffect((()=>(document.addEventListener("tooltip.open",m),()=>document.removeEventListener("tooltip.open",m))),[m]),/*#__PURE__*/x.createElement(f,null,/*#__PURE__*/x.createElement(S,{__scopeTooltip:i}),/*#__PURE__*/x.createElement(l.Content,w({"data-state":p.stateAttribute},T,c,{ref:o,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),/*#__PURE__*/x.createElement(r,null,u),/*#__PURE__*/x.createElement(t.Root,{id:p.contentId,role:"tooltip"},a||u)))})),A=/*#__PURE__*/x.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,n=b(t);/*#__PURE__*/return x.createElement(l.Arrow,w({},n,r,{ref:o}))}));/*#__PURE__*/function S(e){const{__scopeTooltip:o}=e,t=O("CheckTriggerMoved",o),r=c(t.trigger),n=null==r?void 0:r.left,i=p(n),l=null==r?void 0:r.top,u=p(l),a=t.onClose;return x.useEffect((()=>{(void 0!==i&&i!==n||void 0!==u&&u!==l)&&a()}),[a,i,u,n,l]),null}exports.TooltipArrow=A;const F=h;exports.Provider=F;const I=R;exports.Root=I;const L=k;exports.Trigger=L;const B=M;exports.Content=B;const j=A;exports.Arrow=j; | ||
var e,o=require("@radix-ui/react-id").useId,t=v({},require("@radix-ui/react-visually-hidden")),r=require("@radix-ui/react-slot").Slottable,n=require("@radix-ui/react-portal").Portal,i=require("@radix-ui/react-popper"),l=v({},i),u=i.createPopperScope,a=require("@radix-ui/react-primitive").Primitive,s=require("@radix-ui/react-presence").Presence,c=require("@radix-ui/react-use-rect").useRect,p=require("@radix-ui/react-use-previous").usePrevious,d=require("@radix-ui/react-use-escape-keydown").useEscapeKeydown,T=require("@radix-ui/react-use-controllable-state").useControllableState,f=require("@radix-ui/react-context").createContextScope,m=require("@radix-ui/react-compose-refs").useComposedRefs,C=require("@radix-ui/primitive").composeEventHandlers,x=v({},require("react")),w=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function v(e,o){return Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),e}const[g,E]=f("Tooltip",[u]);exports.createTooltipScope=E;const b=u(),_=700,[y,q]=g("TooltipProvider",{isOpenDelayed:!0,delayDuration:_,onTooltipOpen:()=>{},onTooltipClose:()=>{}}),h=e=>{const{__scopeTooltip:o,delayDuration:t=_,skipDelayDuration:r=300,children:n}=e,[i,l]=x.useState(!0),u=x.useRef(0);return x.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),/*#__PURE__*/x.createElement(y,{scope:o,isOpenDelayed:i,delayDuration:t,onTooltipOpen:x.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onTooltipClose:x.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),r)}),[r])},n)};exports.TooltipProvider=h;const[O,D]=g("Tooltip"),R=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i=!1,onOpenChange:u,delayDuration:a}=e,s=q("Tooltip",t),c=b(t),[d,f]=x.useState(null),m=o(),C=x.useRef(0),w=x.useRef(!1),v=null!=a?a:s.delayDuration,g=!w.current&&s.isOpenDelayed?v:0,E=p(Boolean(g)),{onTooltipOpen:_,onTooltipClose:y}=s,[h=!1,D]=T({prop:n,defaultProp:i,onChange:e=>{e?(document.dispatchEvent(new CustomEvent("tooltip.open")),_()):(w.current=!1,y()),null==u||u(e)}}),R=x.useMemo((()=>h?E?"delayed-open":"instant-open":"closed"),[E,h]);return x.useEffect((()=>()=>window.clearTimeout(C.current)),[]),/*#__PURE__*/x.createElement(l.Root,c,/*#__PURE__*/x.createElement(O,{scope:t,contentId:m,open:h,stateAttribute:R,trigger:d,onTriggerChange:f,onFocus:x.useCallback((()=>{w.current=!0,D(!0)}),[D]),onOpen:x.useCallback((()=>{window.clearTimeout(C.current),C.current=window.setTimeout((()=>D(!0)),g)}),[g,D]),onClose:x.useCallback((()=>{window.clearTimeout(C.current),D(!1)}),[D])},r))};exports.Tooltip=R;const k=/*#__PURE__*/x.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,n=D("TooltipTrigger",t),i=b(t),u=m(o,n.onTriggerChange);/*#__PURE__*/return x.createElement(l.Anchor,w({asChild:!0},i),/*#__PURE__*/x.createElement(a.button,w({"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute},r,{ref:u,onMouseOver:C(e.onMouseOver,n.onOpen),onMouseLeave:C(e.onMouseLeave,n.onClose),onMouseDown:C(e.onMouseDown,n.onClose),onFocus:C(e.onFocus,n.onFocus),onBlur:C(e.onBlur,n.onClose),onClick:C(e.onClick,n.onClose)})))}));exports.TooltipTrigger=k;const M=/*#__PURE__*/x.forwardRef(((e,o)=>{const{forceMount:t,...r}=e,n=D("TooltipContent",e.__scopeTooltip);/*#__PURE__*/return x.createElement(s,{present:t||n.open},/*#__PURE__*/x.createElement(P,w({ref:o},r)))}));exports.TooltipContent=M;const P=/*#__PURE__*/x.forwardRef(((e,o)=>{const{__scopeTooltip:i,children:u,"aria-label":a,portalled:s=!0,...c}=e,p=D("TooltipContent",i),T=b(i),f=s?n:x.Fragment,{onClose:m}=p;return d((()=>m())),x.useEffect((()=>(document.addEventListener("tooltip.open",m),()=>document.removeEventListener("tooltip.open",m))),[m]),/*#__PURE__*/x.createElement(f,null,/*#__PURE__*/x.createElement(S,{__scopeTooltip:i}),/*#__PURE__*/x.createElement(l.Content,w({"data-state":p.stateAttribute},T,c,{ref:o,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),/*#__PURE__*/x.createElement(r,null,u),/*#__PURE__*/x.createElement(t.Root,{id:p.contentId,role:"tooltip"},a||u)))})),A=/*#__PURE__*/x.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,n=b(t);/*#__PURE__*/return x.createElement(l.Arrow,w({},n,r,{ref:o}))}));/*#__PURE__*/function S(e){const{__scopeTooltip:o}=e,t=D("CheckTriggerMoved",o),r=c(t.trigger),n=null==r?void 0:r.left,i=p(n),l=null==r?void 0:r.top,u=p(l),a=t.onClose;return x.useEffect((()=>{(void 0!==i&&i!==n||void 0!==u&&u!==l)&&a()}),[a,i,u,n,l]),null}exports.TooltipArrow=A;const F=h;exports.Provider=F;const I=R;exports.Root=I;const L=k;exports.Trigger=L;const B=M;exports.Content=B;const j=A;exports.Arrow=j; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{useId as e}from"@radix-ui/react-id";import*as o from"@radix-ui/react-visually-hidden";import{Slottable as t}from"@radix-ui/react-slot";import{Portal as r}from"@radix-ui/react-portal";import*as n from"@radix-ui/react-popper";import{createPopperScope as i}from"@radix-ui/react-popper";import{Primitive as l}from"@radix-ui/react-primitive";import{Presence as a}from"@radix-ui/react-presence";import{useRect as p}from"@radix-ui/react-use-rect";import{usePrevious as c}from"@radix-ui/react-use-previous";import{useEscapeKeydown as s}from"@radix-ui/react-use-escape-keydown";import{useControllableState as u}from"@radix-ui/react-use-controllable-state";import{createContextScope as d}from"@radix-ui/react-context";import{useComposedRefs as m}from"@radix-ui/react-compose-refs";import{composeEventHandlers as f}from"@radix-ui/primitive";import*as T from"react";import x from"@babel/runtime/helpers/esm/extends";const[C,w]=d("Tooltip",[i]);export{w as createTooltipScope};const g=i(),E=700,[v,_]=C("TooltipProvider",{isOpenDelayed:!0,delayDuration:E,onTooltipOpen:()=>{},onTooltipClose:()=>{}});export const TooltipProvider=e=>{const{__scopeTooltip:o,delayDuration:t=E,skipDelayDuration:r=300,children:n}=e,[i,l]=T.useState(!0),a=T.useRef(0);return T.useEffect((()=>{const e=a.current;return()=>window.clearTimeout(e)}),[]),/*#__PURE__*/T.createElement(v,{scope:o,isOpenDelayed:i,delayDuration:t,onTooltipOpen:T.useCallback((()=>{window.clearTimeout(a.current),l(!1)}),[]),onTooltipClose:T.useCallback((()=>{window.clearTimeout(a.current),a.current=window.setTimeout((()=>l(!0)),r)}),[r])},n)};/*#__PURE__*/const[b,y]=C("Tooltip");export const Tooltip=o=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:l=!1,onOpenChange:a,delayDuration:p}=o,s=_("Tooltip",t),d=g(t),[m,f]=T.useState(null),x=e(),C=T.useRef(0),w=T.useRef(!1),E=null!=p?p:s.delayDuration,v=!w.current&&s.isOpenDelayed?E:0,y=c(Boolean(v)),{onTooltipOpen:h,onTooltipClose:D}=s,[k=!1,O]=u({prop:i,defaultProp:l,onChange:e=>{e?(document.dispatchEvent(new CustomEvent("tooltip.open")),h()):(w.current=!1,D()),null==a||a(e)}}),R=T.useMemo((()=>k?y?"delayed-open":"instant-open":"closed"),[y,k]);return T.useEffect((()=>()=>window.clearTimeout(C.current)),[]),/*#__PURE__*/T.createElement(n.Root,d,/*#__PURE__*/T.createElement(b,{scope:t,contentId:x,open:k,stateAttribute:R,trigger:m,onTriggerChange:f,onFocus:T.useCallback((()=>{w.current=!0,O(!0)}),[O]),onOpen:T.useCallback((()=>{window.clearTimeout(C.current),C.current=window.setTimeout((()=>O(!0)),v)}),[v,O]),onClose:T.useCallback((()=>{window.clearTimeout(C.current),O(!1)}),[O])},r))};/*#__PURE__*/export const TooltipTrigger=/*#__PURE__*/T.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,i=y("TooltipTrigger",t),a=g(t),p=m(o,i.onTriggerChange);/*#__PURE__*/return T.createElement(n.Anchor,x({asChild:!0},a),/*#__PURE__*/T.createElement(l.button,x({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:p,onMouseEnter:f(e.onMouseEnter,i.onOpen),onMouseLeave:f(e.onMouseLeave,i.onClose),onMouseDown:f(e.onMouseDown,i.onClose),onFocus:f(e.onFocus,i.onFocus),onBlur:f(e.onBlur,i.onClose),onClick:f(e.onClick,i.onClose)})))}));/*#__PURE__*/export const TooltipContent=/*#__PURE__*/T.forwardRef(((e,o)=>{const{forceMount:t,...r}=e,n=y("TooltipContent",e.__scopeTooltip);/*#__PURE__*/return T.createElement(a,{present:t||n.open},/*#__PURE__*/T.createElement(h,x({ref:o},r)))}));const h=/*#__PURE__*/T.forwardRef(((e,i)=>{const{__scopeTooltip:l,children:a,"aria-label":p,portalled:c=!0,...u}=e,d=y("TooltipContent",l),m=g(l),f=c?r:T.Fragment,{onClose:C}=d;return s((()=>C())),T.useEffect((()=>(document.addEventListener("tooltip.open",C),()=>document.removeEventListener("tooltip.open",C))),[C]),/*#__PURE__*/T.createElement(f,null,/*#__PURE__*/T.createElement(D,{__scopeTooltip:l}),/*#__PURE__*/T.createElement(n.Content,x({"data-state":d.stateAttribute},m,u,{ref:i,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),/*#__PURE__*/T.createElement(t,null,a),/*#__PURE__*/T.createElement(o.Root,{id:d.contentId,role:"tooltip"},p||a)))}));/*#__PURE__*/export const TooltipArrow=/*#__PURE__*/T.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,i=g(t);/*#__PURE__*/return T.createElement(n.Arrow,x({},i,r,{ref:o}))}));/*#__PURE__*/function D(e){const{__scopeTooltip:o}=e,t=y("CheckTriggerMoved",o),r=p(t.trigger),n=null==r?void 0:r.left,i=c(n),l=null==r?void 0:r.top,a=c(l),s=t.onClose;return T.useEffect((()=>{(void 0!==i&&i!==n||void 0!==a&&a!==l)&&s()}),[s,i,a,n,l]),null}export const Provider=TooltipProvider;export const Root=Tooltip;export const Trigger=TooltipTrigger;export const Content=TooltipContent;export const Arrow=TooltipArrow; | ||
import{useId as e}from"@radix-ui/react-id";import*as o from"@radix-ui/react-visually-hidden";import{Slottable as t}from"@radix-ui/react-slot";import{Portal as r}from"@radix-ui/react-portal";import*as n from"@radix-ui/react-popper";import{createPopperScope as i}from"@radix-ui/react-popper";import{Primitive as l}from"@radix-ui/react-primitive";import{Presence as a}from"@radix-ui/react-presence";import{useRect as p}from"@radix-ui/react-use-rect";import{usePrevious as c}from"@radix-ui/react-use-previous";import{useEscapeKeydown as s}from"@radix-ui/react-use-escape-keydown";import{useControllableState as u}from"@radix-ui/react-use-controllable-state";import{createContextScope as d}from"@radix-ui/react-context";import{useComposedRefs as m}from"@radix-ui/react-compose-refs";import{composeEventHandlers as f}from"@radix-ui/primitive";import*as T from"react";import x from"@babel/runtime/helpers/esm/extends";const[C,w]=d("Tooltip",[i]);export{w as createTooltipScope};const g=i(),v=700,[E,_]=C("TooltipProvider",{isOpenDelayed:!0,delayDuration:v,onTooltipOpen:()=>{},onTooltipClose:()=>{}});export const TooltipProvider=e=>{const{__scopeTooltip:o,delayDuration:t=v,skipDelayDuration:r=300,children:n}=e,[i,l]=T.useState(!0),a=T.useRef(0);return T.useEffect((()=>{const e=a.current;return()=>window.clearTimeout(e)}),[]),/*#__PURE__*/T.createElement(E,{scope:o,isOpenDelayed:i,delayDuration:t,onTooltipOpen:T.useCallback((()=>{window.clearTimeout(a.current),l(!1)}),[]),onTooltipClose:T.useCallback((()=>{window.clearTimeout(a.current),a.current=window.setTimeout((()=>l(!0)),r)}),[r])},n)};/*#__PURE__*/const[b,y]=C("Tooltip");export const Tooltip=o=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:l=!1,onOpenChange:a,delayDuration:p}=o,s=_("Tooltip",t),d=g(t),[m,f]=T.useState(null),x=e(),C=T.useRef(0),w=T.useRef(!1),v=null!=p?p:s.delayDuration,E=!w.current&&s.isOpenDelayed?v:0,y=c(Boolean(E)),{onTooltipOpen:h,onTooltipClose:D}=s,[O=!1,k]=u({prop:i,defaultProp:l,onChange:e=>{e?(document.dispatchEvent(new CustomEvent("tooltip.open")),h()):(w.current=!1,D()),null==a||a(e)}}),R=T.useMemo((()=>O?y?"delayed-open":"instant-open":"closed"),[y,O]);return T.useEffect((()=>()=>window.clearTimeout(C.current)),[]),/*#__PURE__*/T.createElement(n.Root,d,/*#__PURE__*/T.createElement(b,{scope:t,contentId:x,open:O,stateAttribute:R,trigger:m,onTriggerChange:f,onFocus:T.useCallback((()=>{w.current=!0,k(!0)}),[k]),onOpen:T.useCallback((()=>{window.clearTimeout(C.current),C.current=window.setTimeout((()=>k(!0)),E)}),[E,k]),onClose:T.useCallback((()=>{window.clearTimeout(C.current),k(!1)}),[k])},r))};/*#__PURE__*/export const TooltipTrigger=/*#__PURE__*/T.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,i=y("TooltipTrigger",t),a=g(t),p=m(o,i.onTriggerChange);/*#__PURE__*/return T.createElement(n.Anchor,x({asChild:!0},a),/*#__PURE__*/T.createElement(l.button,x({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:p,onMouseOver:f(e.onMouseOver,i.onOpen),onMouseLeave:f(e.onMouseLeave,i.onClose),onMouseDown:f(e.onMouseDown,i.onClose),onFocus:f(e.onFocus,i.onFocus),onBlur:f(e.onBlur,i.onClose),onClick:f(e.onClick,i.onClose)})))}));/*#__PURE__*/export const TooltipContent=/*#__PURE__*/T.forwardRef(((e,o)=>{const{forceMount:t,...r}=e,n=y("TooltipContent",e.__scopeTooltip);/*#__PURE__*/return T.createElement(a,{present:t||n.open},/*#__PURE__*/T.createElement(h,x({ref:o},r)))}));const h=/*#__PURE__*/T.forwardRef(((e,i)=>{const{__scopeTooltip:l,children:a,"aria-label":p,portalled:c=!0,...u}=e,d=y("TooltipContent",l),m=g(l),f=c?r:T.Fragment,{onClose:C}=d;return s((()=>C())),T.useEffect((()=>(document.addEventListener("tooltip.open",C),()=>document.removeEventListener("tooltip.open",C))),[C]),/*#__PURE__*/T.createElement(f,null,/*#__PURE__*/T.createElement(D,{__scopeTooltip:l}),/*#__PURE__*/T.createElement(n.Content,x({"data-state":d.stateAttribute},m,u,{ref:i,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),/*#__PURE__*/T.createElement(t,null,a),/*#__PURE__*/T.createElement(o.Root,{id:d.contentId,role:"tooltip"},p||a)))}));/*#__PURE__*/export const TooltipArrow=/*#__PURE__*/T.forwardRef(((e,o)=>{const{__scopeTooltip:t,...r}=e,i=g(t);/*#__PURE__*/return T.createElement(n.Arrow,x({},i,r,{ref:o}))}));/*#__PURE__*/function D(e){const{__scopeTooltip:o}=e,t=y("CheckTriggerMoved",o),r=p(t.trigger),n=null==r?void 0:r.left,i=c(n),l=null==r?void 0:r.top,a=c(l),s=t.onClose;return T.useEffect((()=>{(void 0!==i&&i!==n||void 0!==a&&a!==l)&&s()}),[s,i,a,n,l]),null}export const Provider=TooltipProvider;export const Root=Tooltip;export const Trigger=TooltipTrigger;export const Content=TooltipContent;export const Arrow=TooltipArrow; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-tooltip", | ||
"version": "0.1.2-rc.8", | ||
"version": "0.1.2-rc.9", | ||
"license": "MIT", | ||
@@ -23,8 +23,8 @@ "source": "src/index.ts", | ||
"@radix-ui/react-context": "0.1.1", | ||
"@radix-ui/react-id": "0.1.2-rc.5", | ||
"@radix-ui/react-popper": "0.1.2-rc.4", | ||
"@radix-ui/react-portal": "0.1.2-rc.17", | ||
"@radix-ui/react-id": "0.1.2-rc.6", | ||
"@radix-ui/react-popper": "0.1.2-rc.5", | ||
"@radix-ui/react-portal": "0.1.2-rc.18", | ||
"@radix-ui/react-presence": "0.1.1", | ||
"@radix-ui/react-primitive": "0.1.2-rc.4", | ||
"@radix-ui/react-slot": "0.1.2-rc.4", | ||
"@radix-ui/react-primitive": "0.1.2-rc.5", | ||
"@radix-ui/react-slot": "0.1.2-rc.5", | ||
"@radix-ui/react-use-controllable-state": "0.1.0", | ||
@@ -34,3 +34,3 @@ "@radix-ui/react-use-escape-keydown": "0.1.0", | ||
"@radix-ui/react-use-rect": "0.1.1", | ||
"@radix-ui/react-visually-hidden": "0.1.2-rc.4" | ||
"@radix-ui/react-visually-hidden": "0.1.2-rc.5" | ||
}, | ||
@@ -37,0 +37,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
58754
+ Added@radix-ui/react-arrow@0.1.2-rc.5(transitive)
+ Added@radix-ui/react-id@0.1.2-rc.6(transitive)
+ Added@radix-ui/react-popper@0.1.2-rc.5(transitive)
+ Added@radix-ui/react-portal@0.1.2-rc.18(transitive)
+ Added@radix-ui/react-primitive@0.1.2-rc.5(transitive)
+ Added@radix-ui/react-slot@0.1.2-rc.5(transitive)
+ Added@radix-ui/react-visually-hidden@0.1.2-rc.5(transitive)
- Removed@radix-ui/react-arrow@0.1.2-rc.4(transitive)
- Removed@radix-ui/react-id@0.1.2-rc.5(transitive)
- Removed@radix-ui/react-popper@0.1.2-rc.4(transitive)
- Removed@radix-ui/react-portal@0.1.2-rc.17(transitive)
- Removed@radix-ui/react-primitive@0.1.2-rc.4(transitive)
- Removed@radix-ui/react-slot@0.1.2-rc.4(transitive)
- Removed@radix-ui/react-visually-hidden@0.1.2-rc.4(transitive)