-
Notifications
You must be signed in to change notification settings - Fork 1
/
4912-1a8cae0bd62e327ea6dd.js
1 lines (1 loc) · 61.5 KB
/
4912-1a8cae0bd62e327ea6dd.js
1
(self.webpackChunkzent_docs=self.webpackChunkzent_docs||[]).push([[4912],{94912:(n,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>z});var t=a(73450),p=a(27378),o=a(57318),e=a(57097),c=a(3454),l=a(82285),i=a(71457),u=a(24246);function r(n,s){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);s&&(t=t.filter((function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),a.push.apply(a,t)}return a}function k(n){for(var s=1;s<arguments.length;s++){var a=null!=arguments[s]?arguments[s]:{};s%2?r(Object(a),!0).forEach((function(s){(0,t.Z)(n,s,a[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s))}))}return n}var d=function(){return(0,u.jsxs)("div",{className:"zent-doc-tooltip-container",children:[(0,u.jsx)(e.u,{trigger:"hover",title:"Hover Trigger",children:(0,u.jsx)(c.z,{type:"primary",children:"Hover"})}),(0,u.jsx)(e.u,{trigger:"click",title:"Click Trigger",children:(0,u.jsx)(c.z,{type:"primary",children:"Click"})}),(0,u.jsx)(e.u,{trigger:"focus",title:"Focus Trigger",children:(0,u.jsx)(l.I,{defaultValue:"Focus"})})]})},g=function(){var n="hover";return(0,u.jsxs)("div",{className:"zent-doc-tooltip-positions",children:[(0,u.jsxs)("div",{className:"zent-doc-tooltip-positions-top-row",children:[(0,u.jsx)(e.u,{trigger:n,position:"top-left",title:"TL",children:(0,u.jsx)(c.z,{children:"TopLeft"})}),(0,u.jsx)(e.u,{trigger:n,position:"top-center",title:"TC",children:(0,u.jsx)(c.z,{children:"TopCenter"})}),(0,u.jsx)(e.u,{trigger:n,position:"top-right",title:"TR",children:(0,u.jsx)(c.z,{children:"TopRight"})})]}),(0,u.jsxs)("div",{className:"zent-doc-tooltip-positions-bottom-row",children:[(0,u.jsx)(e.u,{trigger:n,position:"bottom-left",title:"BL",children:(0,u.jsx)(c.z,{children:"BottomLeft"})}),(0,u.jsx)(e.u,{trigger:n,position:"bottom-center",title:"BC",children:(0,u.jsx)(c.z,{children:"BottomCenter"})}),(0,u.jsx)(e.u,{trigger:n,position:"bottom-right",title:"BR",children:(0,u.jsx)(c.z,{children:"BottomRight"})})]}),(0,u.jsx)("div",{className:"zent-doc-tooltip-positions-left-col",children:(0,u.jsx)(e.u,{trigger:n,position:"left-center",title:"LC",children:(0,u.jsx)(c.z,{children:"LeftCenter"})})}),(0,u.jsx)("div",{className:"zent-doc-tooltip-positions-right-col",children:(0,u.jsx)(e.u,{trigger:n,position:"right-center",title:"RC",children:(0,u.jsx)(c.z,{children:"RightCenter"})})})]})},m=function(){return(0,u.jsxs)("div",{className:"zent-doc-tooltip-container",children:[(0,u.jsx)(e.u,{centerArrow:!0,trigger:"hover",position:"top-left",title:"centerArrow is true",children:(0,u.jsx)("span",{className:"zent-doc-tooltip-tag",children:"Y"})}),(0,u.jsx)(e.u,{trigger:"hover",position:"top-left",title:"centerArrow is false",children:(0,u.jsx)("span",{className:"zent-doc-tooltip-tag",children:"N"})})]})},h=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{visible:!1}),(0,t.Z)(this,"close",(()=>{this.setState({visible:!1})})),(0,t.Z)(this,"open",(()=>{this.setState({visible:!0})}))}render(){var n=(0,u.jsx)("div",{children:(0,u.jsx)("p",{style:{marginBottom:10},children:"You can close Tooltip from outside"})});return(0,u.jsxs)("div",{className:"zent-doc-tooltip-none-trigger-container",children:[(0,u.jsx)(e.u,{title:n,trigger:"none",visible:this.state.visible,children:(0,u.jsx)(c.z,{type:"primary",onClick:this.open,children:"Open"})}),(0,u.jsx)(c.z,{disabled:!this.state.visible,onClick:this.close,children:"Close from outside"})]})}}return(0,u.jsx)(n,{})},v=function(){return(0,u.jsxs)("div",{className:"zent-doc-tooltip-container",children:[(0,u.jsx)(e.u,{trigger:"hover",title:"Content",fixMouseEventsOnDisabledChildren:!0,children:(0,u.jsx)(c.z,{type:"primary",disabled:!0,children:"Button"})}),(0,u.jsx)(e.u,{trigger:"hover",title:"Content",children:(0,u.jsx)(l.I,{disabled:!0})}),(0,u.jsx)(e.u,{trigger:"hover",title:"Content",children:(0,u.jsx)(i.Y,{disabled:!0,style:{marginLeft:"12px"}})}),(0,u.jsx)(e.u,{trigger:"hover",title:"Content",fixMouseEventsOnDisabledChildren:!0,children:(0,u.jsx)(c.z.Directive,{type:"primary",disabled:!0,children:(0,u.jsx)("a",{href:"",children:" ButtonDirective "})})})]})};function y(n){return(0,u.jsx)(n.tag,k(k({},n.attributes),{},{dangerouslySetInnerHTML:{__html:n.html}}))}function b(n){return(0,u.jsx)(y,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function f(n){return(0,u.jsx)(y,{tag:"style",html:n.style})}function x(n,s){for(;n;)return n.offsetTop&&"static"!==getComputedStyle(n).position&&(s+=n.offsetTop),x(n.parentNode,s);return s}class j extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{showCode:!1}),(0,t.Z)(this,"toggle",(()=>{this.setState({showCode:!this.state.showCode})}))}render(){var n=this.state.showCode,s=this.props,a=s.title,t=s.src,p=s.children;return(0,u.jsxs)("div",{className:"zandoc-react-demo",children:[(0,u.jsx)("div",{className:"zandoc-react-demo__preview",children:p}),(0,u.jsxs)("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle,children:[(0,u.jsx)("div",{className:"zandoc-react-demo__title",children:(0,u.jsx)("p",{children:a||""})}),(0,u.jsx)("i",{className:"zenticon zenticon-caret-up zandoc-react-demo__toggle ".concat(n?"zandoc-react-demo__toggle-on":"zandoc-react-demo__toggle-off")})]}),n&&(0,u.jsx)("pre",{className:"zandoc-react-demo__code",children:(0,u.jsx)(y,{tag:"code",html:t,attributes:{className:"language-jsx"}})})]})}}class z extends p.Component{componentDidMount(){var n=location.hash;if(n){var s=document.querySelector('a[href="'.concat(n,'"]'));s&&(0,o.l)(document.documentElement,0,x(s,-9))}}render(){return p.createElement("div",{className:"zandoc-react-container"},p.createElement(f,{style:".zent-doc-tooltip-container {\n\t\tdisplay: flex;\n\t\tjustify-content: left;\n\t\talign-items: center;\n\t}\n\n\t\t.zent-doc-tooltip-container .zent-doc-tooltip-tag {\n\t\t\tborder: 1px solid #e5e5e5;\n\t\t\tborder-radius: 20%;\n\t\t\tpadding: 3px;\n\t\t\tfont-size: 12px;\n\t\t\tcursor: default\n\t\t}\n\n\t\t.zent-doc-tooltip-container .zent-doc-tooltip-tag:not(:last-child) {\n\t\tmargin-right: 10px;\n}\n\n\t\t.zent-doc-tooltip-container .zent-input-wrapper {\n\t\t\tmargin-left: 10px;\n\t\t}\n\n.zent-doc-tooltip-positions {\n\t\twidth: 630px;\n position: relative;\n }\n\n.zent-doc-tooltip-positions-top-row,\n\t\t.zent-doc-tooltip-positions-bottom-row {\n\t\t\tdisplay: flex;\n justify-content: center;\n }\n\n.zent-doc-tooltip-positions-top-row .zent-tooltip-wrapper:not(:last-child), .zent-doc-tooltip-positions-bottom-row .zent-tooltip-wrapper:not(:last-child) {\n margin-right: 10px\n }\n\n.zent-doc-tooltip-positions-bottom-row {\n margin-top: 64px;\n }\n\n.zent-doc-tooltip-positions-left-col, .zent-doc-tooltip-positions-right-col {\n position: absolute;\n top: 0;\n display: flex;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n }\n\n.zent-doc-tooltip-positions-left-col .zent-btn, .zent-doc-tooltip-positions-right-col .zent-btn {\n\t\t\t\tmargin-left: 0 !important;\n\t\t\t}\n\n.zent-doc-tooltip-positions-left-col .zent-btn:not(:last-child), .zent-doc-tooltip-positions-right-col .zent-btn:not(:last-child) {\n margin-bottom: 10px;\n }\n\n.zent-doc-tooltip-positions-left-col {\n left: 0;\n }\n\n.zent-doc-tooltip-positions-right-col {\n right: -10px;\n }\n\n.zent-doc-tooltip-positions .zent-tooltip-wrapper .zent-btn {\n width: 120px;\n }\n\n.zent-doc-tooltip-none-trigger-container {\n display: flex;\n justify-content: left;\n\t}\n\n.zent-doc-tooltip-none-trigger-container .zent-tooltip-wrapper {\n\t\t\tmargin-right: 10px;\n\t\t}"}),p.createElement(b,{html:'<h2 class="anchor-heading"><a href="#tooltip">¶</a><a href="javascript:void(0)" id="tooltip" class="anchor-point"></a>Tooltip</h2>\n<ul>\n<li>Triggers: click, hover and focus</li>\n<li>Only display prompt like HTML <code>title</code>,no more operation</li>\n</ul>\n<h3 class="anchor-heading"><a href="#demos">¶</a><a href="javascript:void(0)" id="demos" class="anchor-point"></a>Demos</h3>'}),p.createElement(j,{title:"Three trigger modes: click, hover and focus",id:"Demotrigger",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tooltip</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Input</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Hover Trigger<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">Hover</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>click<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Click Trigger<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">Click</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>focus<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Focus Trigger<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Input</span></span> <span class="token attr-name">defaultValue</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Focus<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(d)),p.createElement(j,{title:"12 positions",id:"Demopositions",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tooltip</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">const</span> trigger <span class="token operator">=</span> <span class="token string">\'hover\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-positions<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-positions-top-row<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>TL<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">TopLeft</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-center<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>TC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">TopCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-right<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>TR<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">TopRight</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-positions-bottom-row<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>bottom-left<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>BL<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">BottomLeft</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>bottom-center<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>BC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">BottomCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>bottom-right<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>BR<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">BottomRight</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-positions-left-col<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>left-center<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>LC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">LeftCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-positions-right-col<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>right-center<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>RC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">RightCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(g)),p.createElement(j,{title:"Use `centerArrow` to control arrow position",id:"Democenterarrow",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tooltip</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Input</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">centerArrow</span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>centerArrow is true<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>span</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-tag<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token constant">Y</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>centerArrow is false<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>span</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-tag<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token constant">N</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(m)),p.createElement(j,{title:"Control visibility from outside",id:"Democontrolled",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Tooltip</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">NoneTriggerDemo</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n <span class="token literal-property property">visible</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">close</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n <span class="token literal-property property">visible</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">open</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n <span class="token literal-property property">visible</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">const</span> content <span class="token operator">=</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>p</span> <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> <span class="token literal-property property">marginBottom</span><span class="token operator">:</span> <span class="token number">10</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">You</span> can close <span class="token maybe-class-name">Tooltip</span> <span class="token keyword module">from</span> outside<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>p</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-none-trigger-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">title</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>content<span class="token punctuation">}</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>none<span class="token punctuation">"</span></span> <span class="token attr-name">visible</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">.</span><span class="token property-access">visible</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span> <span class="token attr-name">onClick</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">open</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token maybe-class-name">Open</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">disabled</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token operator">!</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">.</span><span class="token property-access">visible</span><span class="token punctuation">}</span></span> <span class="token attr-name">onClick</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">close</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token maybe-class-name">Close</span> <span class="token keyword module">from</span> outside\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">NoneTriggerDemo</span></span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(h)),p.createElement(j,{title:"Disabled elements",id:"Demodisabled",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Button</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Input</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Radio</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Tooltip</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-tooltip-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span>\n <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Content<span class="token punctuation">"</span></span>\n <span class="token attr-name">fixMouseEventsOnDisabledChildren</span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span>\n <span class="token maybe-class-name">Button</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Content<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Input</span></span> <span class="token attr-name">disabled</span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Content<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Radio</span></span> <span class="token attr-name">disabled</span> <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> <span class="token literal-property property">marginLeft</span><span class="token operator">:</span> <span class="token string">\'12px\'</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Tooltip</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span>\n <span class="token attr-name">title</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Content<span class="token punctuation">"</span></span>\n <span class="token attr-name">fixMouseEventsOnDisabledChildren</span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button.Directive</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span> <span class="token maybe-class-name">ButtonDirective</span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button.Directive</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Tooltip</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(v)),p.createElement(b,{html:'<h3 class="anchor-heading"><a href="#api">¶</a><a href="javascript:void(0)" id="api" class="anchor-point"></a>API</h3>\n<table class="table">\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n<th>Type</th>\n<th>Required</th>\n<th>Default</th>\n<th>Alternative</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>title</td>\n<td>Tooltip content</td>\n<td><code>node</code></td>\n<td>Yes</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>trigger</td>\n<td>Trigger method</td>\n<td>string</td>\n<td>No</td>\n<td><code>\'hover\'</code></td>\n<td><code>\'click\'</code>\n, \n<code>\'hover\'</code>\n, \n<code>\'focus\'</code></td>\n</tr>\n<tr>\n<td>position</td>\n<td>Tooltip content position, naming rule: content position relative to trigger + arrow position relative to Tooltip. Can be a placement function, see \n<code>Popover.Position.create</code></td>\n<td>string \n|\n func</td>\n<td>No</td>\n<td><code>\'top-center\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>centerArrow</td>\n<td>Always center arrow to trigger</td>\n<td>bool</td>\n<td>No</td>\n<td><code>false</code></td>\n<td></td>\n</tr>\n<tr>\n<td>cushion</td>\n<td>Same as the \n<code>cushion</code>\n in Popover, which is usually the distance between the edge of the Tooltip and the trigger element</td>\n<td>number</td>\n<td>No</td>\n<td><code>10</code></td>\n<td></td>\n</tr>\n<tr>\n<td>containerSelector</td>\n<td>tooltip\'s parent node CSS selector</td>\n<td>string</td>\n<td>No</td>\n<td><code>\'body\'</code></td>\n<td>all legal CSS selector</td>\n</tr>\n<tr>\n<td>visible</td>\n<td>Tooltip switch to controlled mode if this prop is set</td>\n<td>bool</td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>onVisibleChange</td>\n<td>Must be used with \n<code>visible</code></td>\n<td>func</td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>className</td>\n<td>Custom class name</td>\n<td>string</td>\n<td>No</td>\n<td><code>\'\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>style</td>\n<td>Custom styles</td>\n<td>CSSProperties</td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#extra-api-to-trigger">¶</a><a href="javascript:void(0)" id="extra-api-to-trigger" class="anchor-point"></a>Extra API to trigger</h4>\n<p><code>Tooltip</code> has some additional props depends on different triggers. Like <code>Pop</code>.</p>\n<h4 class="anchor-heading"><a href="#click">¶</a><a href="javascript:void(0)" id="click" class="anchor-point"></a>Click</h4>\n<table class="table">\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n<th>Type</th>\n<th>Required</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>closeOnClickOutside</td>\n<td>Close Tooltip when click outside trigger and content</td>\n<td>bool</td>\n<td>No</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>isOutside</td>\n<td>Callback to determine if click is outside of Tooltip</td>\n<td>func</td>\n<td>No</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#hover">¶</a><a href="javascript:void(0)" id="hover" class="anchor-point"></a>Hover</h4>\n<table class="table">\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n<th>Type</th>\n<th>Required</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>mouseEnterDelay</td>\n<td>Hover open delay(in ms)</td>\n<td>number</td>\n<td>No</td>\n<td><code>200</code></td>\n</tr>\n<tr>\n<td>mouseLeaveDelay</td>\n<td>Hover close delay(in ms)</td>\n<td>number</td>\n<td>No</td>\n<td><code>200</code></td>\n</tr>\n<tr>\n<td>isOutside</td>\n<td>Callback to determine if mouse is outside of Tooltip</td>\n<td>func</td>\n<td>No</td>\n<td></td>\n</tr>\n<tr>\n<td>quirk</td>\n<td>Switch to quirk mode, you don\'t have to move from inside to outside to trigger a close in quirk mode</td>\n<td>bool</td>\n<td>No</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>fixMouseEventsOnDisabledChildren</td>\n<td>Fix mouse events on disabled Input/Button</td>\n<td>boolean</td>\n<td>No</td>\n<td><code>false</code></td>\n</tr>\n</tbody>\n</table>\n<p><strong>PS:</strong><code>fixMouseEventsOnDisabledChildren</code> is only works with Zent components.</p>\n<p>Why</p>\n<ul>\n<li><a href="https://github.com/youzan/zent/issues/142">Mouse events don\'t trigger on disabled button</a></li>\n</ul>\n<p>Workaround</p>\n<ul>\n<li>Wrap the disabled button/input in another element.</li>\n<li>Then add {pointer-events: none} style to the disabled button/input.</li>\n</ul>\n<h4 class="anchor-heading"><a href="#none">¶</a><a href="javascript:void(0)" id="none" class="anchor-point"></a>None</h4>\n<p>When using this trigger, <code>onConfirm</code> and <code>onCancel</code> will not close <code>Tooltip</code> automatically, you are responsible for controlling <code>visible</code> to close <code>Tooltip</code>.</p>'}))}}},4246:(n,s,a)=>{"use strict";a.d(s,{E:()=>u});var t=a(59312),p=a(24246),o=a(60042),e=a.n(o),c=a(27378),l=a(57961),i=a(1348);function u(n){var s=(0,c.useContext)(i.d),a=n.value,o=n.disabled,u=void 0===o?s.value:o,r=n.readOnly,k=void 0!==r&&r,d=n.isValueEqual,g=void 0===d?Object.is:d,m=n.className,h=n.style,v=n.children,y=n.onChange,b=(0,c.useMemo)((function(){return{value:a,disabled:u,readOnly:k,isValueEqual:g,onRadioChange:y}}),[a,u,k,g,y]);return(0,p.jsx)(l.Z.Provider,(0,t.pi)({value:b},{children:(0,p.jsx)("div",(0,t.pi)({className:e()("zent-radio-group",m),style:h,"data-zv":"10.0.10"},{children:v}),void 0)}),void 0)}s.Z=u},57961:(n,s,a)=>{"use strict";var t=(0,a(27378).createContext)(null);t.displayName="RadioGroupContext",s.Z=t},71457:(n,s,a)=>{"use strict";a.d(s,{Y:()=>g,Z:()=>m});var t=a(59312),p=a(24246),o=a(60042),e=a.n(o),c=a(1535),l=a(27378);function i(n,s){var a=(0,l.useRef)(s);a.current=s;var p=n&&n.onRadioChange;return(0,l.useCallback)((function(n){var s=function(n,s){var a=Object.create(n);return a.target=(0,t.pi)((0,t.pi)({},s),{type:"radio",checked:n.target.checked}),a}(n,a.current);if(p)p(s);else{var o=a.current.onChange;o&&o(s)}}),[p])}function u(n,s,a){var t=function(n,s,a){return"boolean"==typeof a.disabled?a.disabled:s&&"boolean"==typeof s.disabled?s.disabled:n.value}(n,s,a),p=function(n,s){return"boolean"==typeof s.readOnly?s.readOnly:!!n&&n.readOnly}(s,a);return{checked:s?s.isValueEqual(s.value,a.value):!!a.checked,disabled:t,readOnly:p}}var r=a(4246),k=a(1348),d=a(57961);function g(n){var s=n.className,a=n.style,o=n.children,r=(n.value,n.width),g=n.labelStyle,m=(n.onMouseEnter,n.onMouseLeave,(0,t._T)(n,["className","style","children","value","width","labelStyle","onMouseEnter","onMouseLeave"])),h=(0,l.useContext)(k.d),v=(0,l.useContext)(d.Z),y=u(h,v,n),b=y.checked,f=y.disabled,x=y.readOnly,j=i(v,n),z=e()(s,"zent-radio-wrap",{"zent-radio-checked":!!b,"zent-radio-disabled":f||x}),T=(0,c.Z)(r),C=(0,t.pi)((0,t.pi)({},a),T);return(0,p.jsxs)("label",(0,t.pi)({className:z,style:C,onMouseEnter:n.onMouseEnter,onMouseLeave:n.onMouseLeave,"data-zv":"10.0.10"},{children:[(0,p.jsxs)("span",(0,t.pi)({className:"zent-radio","data-zv":"10.0.10"},{children:[(0,p.jsx)("span",{className:"zent-radio-inner","data-zv":"10.0.10"},void 0),(0,p.jsx)("input",(0,t.pi)({},m,{type:"radio",checked:!!b,disabled:f,readOnly:x,onChange:j,"data-zv":"10.0.10"}),void 0)]}),void 0),void 0!==o&&(0,p.jsx)("span",(0,t.pi)({className:"zent-radio-label",style:g,"data-zv":"10.0.10"},{children:o}),void 0)]}),void 0)}g.Button=function(n){var s=n.className,a=n.style,o=n.children,r=(n.value,n.width),g=n.onMouseEnter,m=n.onMouseLeave,h=(0,t._T)(n,["className","style","children","value","width","onMouseEnter","onMouseLeave"]),v=(0,l.useContext)(k.d),y=(0,l.useContext)(d.Z);if(!y)throw new Error("Radio.Button must be nested within Radio.Group");var b=u(v,y,n),f=b.checked,x=b.disabled,j=b.readOnly,z=i(y,n),T=e()(s,"zent-radio-button",{"zent-radio-button--checked":!!f,"zent-radio-button--disabled":x||j}),C=(0,c.Z)(r),w=(0,t.pi)((0,t.pi)({},a),C);return(0,p.jsxs)("label",(0,t.pi)({className:T,style:w,onMouseEnter:g,onMouseLeave:m,"data-zv":"10.0.10"},{children:[(0,p.jsx)("input",(0,t.pi)({},h,{type:"radio",checked:!!f,disabled:x,readOnly:j,onChange:z,"data-zv":"10.0.10"}),void 0),(0,p.jsx)("span",(0,t.pi)({className:"zent-radio-button__content","data-zv":"10.0.10"},{children:o}),void 0)]}),void 0)},g.Group=r.Z;var m=g},57097:(n,s,a)=>{"use strict";a.d(s,{u:()=>d});var t=a(59312),p=a(24246),o=a(27378),e=a(60042),c=a.n(e),l=a(42690),i=a(33806),u=function(n){function s(){return null!==n&&n.apply(this,arguments)||this}return(0,t.ZT)(s,n),s}(i.ZP.Trigger.Base),r=a(50707),k=i.ZP.Trigger,d=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.popoverRef=(0,o.createRef)(),s}return(0,t.ZT)(s,n),s.prototype.renderContent=function(){var n=this.props.title;return(0,p.jsxs)(i.ZP.Content,{children:[(0,p.jsx)("div",(0,t.pi)({className:"zent-tooltip-v2-inner","data-zv":"10.0.10"},{children:n}),void 0),(0,p.jsx)("i",{className:"zent-tooltip-v2-arrow","data-zv":"10.0.10"},void 0)]},void 0)},s.prototype.renderTrigger=function(){var n=this.props.children;if("click"===this.props.trigger){var s=this.props.closeOnClickOutside,a=void 0===s||s;return(0,p.jsx)(k.Click,(0,t.pi)({closeOnClickOutside:a},{children:n}),void 0)}if("hover"===this.props.trigger){var o=this.props,e=o.mouseLeaveDelay,c=void 0===e?200:e,l=o.mouseEnterDelay,i=void 0===l?200:l,r=o.anchorOnly,d=o.fixMouseEventsOnDisabledChildren;return(0,p.jsx)(k.Hover,(0,t.pi)({showDelay:i,hideDelay:c,anchorOnly:r,fixMouseEventsOnDisabledChildren:d},{children:n}),void 0)}return"focus"===this.props.trigger?(0,p.jsx)(k.Focus,{children:n},void 0):"none"===this.props.trigger?(0,p.jsx)(u,{children:n},void 0):null},s.prototype.render=function(){var n=this.props,s=n.className,a=n.trigger,o=n.visible,e=n.position,u=n.cushion,k=n.centerArrow,d=n.containerSelector,g=n.style,m=c()("zent-tooltip-v2",s),h=this.props.onVisibleChange;return"none"===a&&(h=h||l.Z),(0,p.jsxs)(i.ZP,(0,t.pi)({visible:o,onVisibleChange:h,className:m,cushion:u,position:(0,r.Z)(e,k),containerSelector:d,ref:this.popoverRef,style:g},{children:[this.renderTrigger(),this.renderContent()]}),void 0)},s.defaultProps={trigger:"hover",position:"top-center",cushion:8,centerArrow:!1,containerSelector:"body"},s}(o.Component)},1535:(n,s,a)=>{"use strict";function t(n){return"string"==typeof n||"number"==typeof n?{width:n}:{}}a.d(s,{Z:()=>t})}}]);