text: (self.webpackChunkzent_docs=self.webpackChunkzent_docs||[]).push([[464],{80464:(n,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>q});var t=a(73450),p=a(27378),e=a(57318),o=a(92497),c=a(96681),l=a(82285),u=a(11497),i=a(71457),r=a(33938),k=a(24246);function d(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 m(n){for(var s=1;s<arguments.length;s++){var a=null!=arguments[s]?arguments[s]:{};s%2?d(Object(a),!0).forEach((function(s){(0,t.Z)(n,s,a[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s))}))}return n}var g=function(){return(0,k.jsxs)("div",{className:"zent-doc-pop-container",children:[(0,k.jsx)(o.X,{trigger:"hover",content:"Hover Trigger",children:(0,k.jsx)(c.z,{type:"primary",children:"Hover"})}),(0,k.jsx)(o.X,{trigger:"click",content:"Click Trigger",children:(0,k.jsx)(c.z,{type:"primary",children:"Click"})}),(0,k.jsx)(o.X,{trigger:"focus",content:"Focus Trigger",children:(0,k.jsx)(l.I,{defaultValue:"Focus",inline:!0})})]})},h=function(){var n="hover";return(0,k.jsxs)("div",{className:"zent-doc-pop-positions",children:[(0,k.jsxs)("div",{className:"zent-doc-pop-positions-top-row",children:[(0,k.jsx)(o.X,{trigger:n,position:"top-left",content:"TL",children:(0,k.jsx)(c.z,{children:"TopLeft"})}),(0,k.jsx)(o.X,{trigger:n,position:"top-center",content:"TC",children:(0,k.jsx)(c.z,{children:"TopCenter"})}),(0,k.jsx)(o.X,{trigger:n,position:"top-right",content:"TR",children:(0,k.jsx)(c.z,{children:"TopRight"})})]}),(0,k.jsxs)("div",{className:"zent-doc-pop-positions-bottom-row",children:[(0,k.jsx)(o.X,{trigger:n,position:"bottom-left",content:"BL",children:(0,k.jsx)(c.z,{children:"BottomLeft"})}),(0,k.jsx)(o.X,{trigger:n,position:"bottom-center",content:"BC",children:(0,k.jsx)(c.z,{children:"BottomCenter"})}),(0,k.jsx)(o.X,{trigger:n,position:"bottom-right",content:"BR",children:(0,k.jsx)(c.z,{children:"BottomRight"})})]}),(0,k.jsxs)("div",{className:"zent-doc-pop-positions-left-col",children:[(0,k.jsx)(o.X,{trigger:n,position:"left-top",content:"LT",children:(0,k.jsx)(c.z,{children:"LeftTop"})}),(0,k.jsx)(o.X,{trigger:n,position:"left-center",content:"LC",children:(0,k.jsx)(c.z,{children:"LeftCenter"})}),(0,k.jsx)(o.X,{trigger:n,position:"left-bottom",content:"LB",children:(0,k.jsx)(c.z,{children:"LeftBottom"})})]}),(0,k.jsxs)("div",{className:"zent-doc-pop-positions-right-col",children:[(0,k.jsx)(o.X,{trigger:n,position:"right-top",content:"RT",children:(0,k.jsx)(c.z,{children:"RightTop"})}),(0,k.jsx)(o.X,{trigger:n,position:"right-center",content:"RC",children:(0,k.jsx)(c.z,{children:"RightCenter"})}),(0,k.jsx)(o.X,{trigger:n,position:"right-bottom",content:"RB",children:(0,k.jsx)(c.z,{children:"RightBottom"})})]})]})},v=function(){return(0,k.jsxs)("div",{className:"zent-doc-pop-container",children:[(0,k.jsx)(o.X,{centerArrow:!0,trigger:"hover",position:"top-left",content:"centerArrow is true",children:(0,k.jsx)("div",{className:"zent-doc-pop-tag",children:"Y"})}),(0,k.jsx)(o.X,{trigger:"hover",position:"top-left",content:"centerArrow is false",children:(0,k.jsx)("div",{className:"zent-doc-pop-tag",children:"N"})})]})},f=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"confirmHandler",(()=>{u.Hj.alert({content:"Pop Closed",parentComponent:this})}))}render(){return(0,k.jsx)(o.X,{trigger:"click",content:(0,k.jsx)("span",{style:{maxWidth:100,wordBreak:"break-all",display:"inline-block"},children:"1111d kdsalkdsa kdsklda kdslkda kdanmcmdj 9209 kjfslk kdslkd"}),onConfirm:this.confirmHandler,children:(0,k.jsx)(c.z,{type:"primary",children:"Open"})})}}return(0,k.jsx)(n,{})},y=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"confirmHandler",(()=>{u.Hj.alert({content:"Pop opened",parentComponent:this})}))}render(){return(0,k.jsx)(o.X,{trigger:"click",header:"Pop title",content:"Pop content",type:"primary",confirmText:"Error",cancelText:"Close",onConfirm:this.confirmHandler,children:(0,k.jsx)(c.z,{type:"primary",children:"Open"})})}}return(0,k.jsx)(n,{})},b=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{visible:!1}),(0,t.Z)(this,"onBeforeClose",(()=>new Promise((n=>{setTimeout(n,500)}))))}onBeforeShow(n){setTimeout(n,500)}render(){return(0,k.jsx)(o.X,{content:"Delay 500ms to close",trigger:"click",onBeforeShow:this.onBeforeShow,onBeforeClose:this.onBeforeClose,children:(0,k.jsx)(c.z,{type:"primary",children:"Delay 500ms to open"})})}}return(0,k.jsx)(n,{})},x=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,k.jsxs)("div",{children:[(0,k.jsx)("p",{style:{marginBottom:10},children:"You can close Pop from inside"}),(0,k.jsx)(c.z,{type:"primary",onClick:this.close,children:"Close"})]});return(0,k.jsxs)("div",{className:"zent-doc-pop-none-trigger-container",children:[(0,k.jsx)(o.X,{content:n,trigger:"none",visible:this.state.visible,children:(0,k.jsx)(c.z,{type:"primary",onClick:this.open,children:"Open"})}),(0,k.jsx)(c.z,{disabled:!this.state.visible,onClick:this.close,children:"Close from outside"})]})}}return(0,k.jsx)(n,{})},C=function(){var n=o.X.withPop((function({pop:n}){return(0,k.jsxs)("div",{children:[(0,k.jsx)("div",{style:{marginBottom:16},children:"Pop content"}),(0,k.jsx)(c.z,{onClick:n.close,children:"Close"})]})}));return(0,k.jsx)(o.X,{trigger:"click",content:(0,k.jsx)(n,{}),children:(0,k.jsx)(c.z,{type:"primary",children:"Open"})})},w=function(){return(0,k.jsxs)("div",{className:"zent-doc-pop-container",children:[(0,k.jsx)(o.X,{centerArrow:!0,trigger:"hover",position:"top-left",content:"content",children:(0,k.jsx)(i.Y,{disabled:!0})}),(0,k.jsx)(o.X,{centerArrow:!0,trigger:"hover",position:"top-left",content:"content",children:(0,k.jsx)(r.X,{disabled:!0})}),(0,k.jsx)(o.X,{trigger:"hover",position:"top-center",content:"content",children:(0,k.jsx)(l.I,{disabled:!0,className:"zent-pop-disabled-mr"})}),(0,k.jsx)(o.X,{trigger:"hover",position:"top-center",content:"content",fixMouseEventsOnDisabledChildren:!0,children:(0,k.jsx)(c.z,{type:"primary",disabled:!0,children:"Button"})}),(0,k.jsx)(o.X,{trigger:"hover",position:"top-center",content:"content",fixMouseEventsOnDisabledChildren:!0,children:(0,k.jsx)(c.z.Directive,{type:"primary",disabled:!0,children:(0,k.jsx)("a",{href:"",children:" ButtonDirective "})})})]})};function j(n){return(0,k.jsx)(n.tag,m(m({},n.attributes),{},{dangerouslySetInnerHTML:{__html:n.html}}))}function z(n){return(0,k.jsx)(j,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function P(n){return(0,k.jsx)(j,{tag:"style",html:n.style})}function N(n,s){for(;n;)return n.offsetTop&&"static"!==getComputedStyle(n).position&&(s+=n.offsetTop),N(n.parentNode,s);return s}class B 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,k.jsxs)("div",{className:"zandoc-react-demo",children:[(0,k.jsx)("div",{className:"zandoc-react-demo__preview",children:p}),(0,k.jsxs)("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle,children:[(0,k.jsx)("div",{className:"zandoc-react-demo__title",children:(0,k.jsx)("p",{children:a||""})}),(0,k.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,k.jsx)("pre",{className:"zandoc-react-demo__code",children:(0,k.jsx)(j,{tag:"code",html:t,attributes:{className:"language-jsx"}})})]})}}class q extends p.Component{componentDidMount(){var n=location.hash;if(n){var s=document.querySelector('a[href="'.concat(n,'"]'));s&&(0,e.l)(document.documentElement,0,N(s,-9))}}render(){return p.createElement("div",{className:"zandoc-react-container"},p.createElement(P,{style:".zent-doc-pop-container {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t.zent-doc-pop-container .zent-input-wrapper {\n\t\t\tmargin-left: 10px;\n\t\t}\n\n.zent-doc-pop-positions {\n    position: relative;\n  }\n\n.zent-doc-pop-positions-top-row,\n\t\t.zent-doc-pop-positions-bottom-row {\n      text-align: center;\n    }\n\n.zent-doc-pop-positions-top-row .zent-pop-wrapper:not(:last-child), .zent-doc-pop-positions-bottom-row .zent-pop-wrapper:not(:last-child) {\n        margin-right: 10px;\n      }\n\n.zent-doc-pop-positions-bottom-row {\n      margin-top: 200px;\n    }\n\n.zent-doc-pop-positions-left-col, .zent-doc-pop-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-pop-positions-left-col >*, .zent-doc-pop-positions-right-col >* {\n\t\t\t\tmargin-left: 0 !important;\n\t\t\t}\n\n.zent-doc-pop-positions-left-col >*:not(:last-child), .zent-doc-pop-positions-right-col >*:not(:last-child) {\n\t\t\t\tmargin-bottom: 10px;\n      }\n\n.zent-doc-pop-positions-left-col {\n      left: 0;\n    }\n\n.zent-doc-pop-positions-right-col {\n      right: 0;\n    }\n\n.zent-doc-pop-positions .zent-pop-wrapper .zent-btn {\n        width: 120px;\n      }\n\n.zent-doc-pop-tag {\n\twidth: 20px;\n\theight: 20px;\n\ttext-align: center;\n\tline-height: 20px;\n\tborder: 1px solid #e5e5e5;\n\tborder-radius: 5px;\n\tmargin-right: 10px;\n}\n\n.zent-doc-pop-none-trigger-container .zent-pop-wrapper {\n\t\t\tmargin-right: 10px;\n\t\t}\n\n.zent-pop-disabled-mr {\n\t\tmargin-right:16px;\n\t}"}),p.createElement(z,{html:'<h2 class="anchor-heading"><a href="#pop">¶</a><a href="javascript:void(0)" id="pop" class="anchor-point"></a>Pop</h2>\n<p>A floating card opened by clicking, hovering or focusing.</p>\n<h3 class="anchor-heading"><a href="#guides">¶</a><a href="javascript:void(0)" id="guides" class="anchor-point"></a>Guides</h3>\n<ul>\n<li>Triggers: click, hover and focus</li>\n<li>Can be used as tooltip</li>\n<li>Supports arbitary content in popup</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(B,{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">Pop</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">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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 attr-name">inline</span> <span class="token punctuation">/></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>\n  <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span>'},p.createElement(g)),p.createElement(B,{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">Pop</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">&lt;</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-pop-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">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</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-top<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>LT<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">&lt;</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">LeftTop</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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-bottom<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>LB<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">&lt;</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">LeftBottom</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</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-top<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>RT<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">&lt;</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">RightTop</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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-bottom<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>RB<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">&lt;</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">RightBottom</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>\n  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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(h)),p.createElement(B,{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">Pop</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">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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-pop-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">&lt;/</span>div</span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">content</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">&lt;</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-pop-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">&lt;/</span>div</span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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(v)),p.createElement(B,{title:"Confirm Pop",id:"Democonfirm",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Sweetalert</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">Wrapper</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n  <span class="token function-variable function">confirmHandler</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 maybe-class-name">Sweetalert</span><span class="token punctuation">.</span><span class="token method function property-access">alert</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n      content<span class="token operator">:</span> <span class="token string">\'Pop Closed\'</span><span class="token punctuation">,</span>\n      parentComponent<span class="token operator">:</span> <span class="token keyword">this</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 control-flow">return</span> <span class="token punctuation">(</span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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>click<span class="token punctuation">"</span></span>\n        <span class="token attr-name">content</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>\n          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span>\n            <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>\n              maxWidth<span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n              wordBreak<span class="token operator">:</span> <span class="token string">\'break-all\'</span><span class="token punctuation">,</span>\n              display<span class="token operator">:</span> <span class="token string">\'inline-block\'</span><span class="token punctuation">,</span>\n            <span class="token punctuation">}</span><span class="token punctuation">}</span></span>\n          <span class="token punctuation">></span></span>\n            <span class="token number">1111</span>d kdsalkdsa kdsklda kdslkda kdanmcmdj <span class="token number">9209</span> kjfslk kdslkd\n          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span>\n        <span class="token punctuation">}</span></span>\n        <span class="token attr-name">onConfirm</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">confirmHandler</span><span class="token punctuation">}</span></span>\n      <span class="token punctuation">></span></span>\n        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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">Open</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></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">&lt;</span><span class="token class-name">Wrapper</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(f)),p.createElement(B,{title:"Custom confirm pop",id:"Democustomconfirm",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Sweetalert</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">Wrapper</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n  <span class="token function-variable function">confirmHandler</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 maybe-class-name">Sweetalert</span><span class="token punctuation">.</span><span class="token method function property-access">alert</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n      content<span class="token operator">:</span> <span class="token string">\'Pop opened\'</span><span class="token punctuation">,</span>\n      parentComponent<span class="token operator">:</span> <span class="token keyword">this</span>\n    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n  <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 control-flow">return</span> <span class="token punctuation">(</span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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>click<span class="token punctuation">"</span></span>\n        <span class="token attr-name">header</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Pop title<span class="token punctuation">"</span></span>\n        <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Pop content<span class="token punctuation">"</span></span>\n        <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>\n        <span class="token attr-name">confirmText</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Error<span class="token punctuation">"</span></span>\n        <span class="token attr-name">cancelText</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Close<span class="token punctuation">"</span></span>\n        <span class="token attr-name">onConfirm</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">confirmHandler</span><span class="token punctuation">}</span></span>\n      <span class="token punctuation">></span></span>\n        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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">Open</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></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">&lt;</span><span class="token class-name">Wrapper</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(y)),p.createElement(B,{title:"Delayed open / close",id:"Demodelay",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</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">Controlled</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    visible<span class="token operator">:</span> <span class="token boolean">false</span>\n  <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n  <span class="token function">onBeforeShow</span><span class="token punctuation">(</span><span class="token parameter">cont</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n    <span class="token function">setTimeout</span><span class="token punctuation">(</span>cont<span class="token punctuation">,</span> <span class="token number">500</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">onBeforeClose</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 control-flow">return</span> <span class="token keyword">new</span> <span class="token class-name">Promise</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">resolve</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n      <span class="token function">setTimeout</span><span class="token punctuation">(</span>resolve<span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">)</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 control-flow">return</span> <span class="token punctuation">(</span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</span></span>\n        <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Delay 500ms to close<span class="token punctuation">"</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>click<span class="token punctuation">"</span></span>\n        <span class="token attr-name">onBeforeShow</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">onBeforeShow</span><span class="token punctuation">}</span></span>\n        <span class="token attr-name">onBeforeClose</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">onBeforeClose</span><span class="token punctuation">}</span></span>\n      <span class="token punctuation">></span></span>\n        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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">Delay</span> <span class="token number">500</span>ms to open<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></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>\n  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Controlled</span></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(b)),p.createElement(B,{title:"Control visiblity 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">Pop</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    visible<span class="token operator">:</span> <span class="token boolean">false</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      visible<span class="token operator">:</span> <span class="token boolean">false</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      visible<span class="token operator">:</span> <span class="token boolean">true</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">&lt;</span>div</span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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> marginBottom<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">Pop</span> <span class="token keyword module">from</span> inside<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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">close</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">Close</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</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">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</span></span>\n          <span class="token attr-name">content</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>\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>none<span class="token punctuation">"</span></span>\n          <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>\n        <span class="token punctuation">></span></span>\n          <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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><span class="token maybe-class-name">Open</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</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><span class="token maybe-class-name">Close</span> <span class="token keyword module">from</span> outside<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</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>\n  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">NoneTriggerDemo</span></span> <span class="token punctuation">/></span></span>\n  <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span>'},p.createElement(x)),p.createElement(B,{title:"withPop High Order Component",id:"Demowithpop",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</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 comment">// 点击 close 按钮可以关闭弹层</span>\n<span class="token keyword">const</span> <span class="token maybe-class-name">Content</span> <span class="token operator">=</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">.</span><span class="token method function property-access">withPop</span><span class="token punctuation">(</span><span class="token keyword">function</span> <span class="token function"><span class="token maybe-class-name">Content</span></span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> pop <span class="token punctuation">}</span></span><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">&lt;</span>div</span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</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> marginBottom<span class="token operator">:</span> <span class="token number">16</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">Pop</span> content<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Button</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>pop<span class="token punctuation">.</span><span class="token property-access">close</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">Close</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</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><span class="token punctuation">)</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">&lt;</span><span class="token class-name">Pop</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">content</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Content</span></span> <span class="token punctuation">/></span></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">&lt;</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">Open</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></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(C)),p.createElement(B,{title:"Disabled form inputs",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">Pop</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">Checkbox</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">&lt;</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-pop-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">&lt;</span><span class="token class-name">Pop</span></span>\n      <span class="token attr-name">centerArrow</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">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>\n      <span class="token attr-name">content</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 punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Radio</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">Radio</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</span></span>\n      <span class="token attr-name">centerArrow</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">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>\n      <span class="token attr-name">content</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 punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Checkbox</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">Checkbox</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">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>\n      <span class="token attr-name">content</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 punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Input</span></span> <span class="token attr-name">disabled</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-pop-disabled-mr<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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">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>\n      <span class="token attr-name">content</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">&lt;</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">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">Pop</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">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>\n      <span class="token attr-name">content</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">&lt;</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">&lt;</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">&lt;/</span>a</span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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">&lt;/</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</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(w)),p.createElement(z,{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>content</td>\n<td>Pop 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>\'none\'</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>Pop content position, naming rule: content position relative to trigger + arrow position relative to Pop. 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 Pop 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>header</td>\n<td>Pop header</td>\n<td>node</td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>block</td>\n<td>Is trigger a block element</td>\n<td>bool</td>\n<td>No</td>\n<td><code>false</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onShow</td>\n<td>Callback after Pop has opened</td>\n<td>func</td>\n<td>No</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onClose</td>\n<td>Callback after Pop has closed</td>\n<td>func</td>\n<td>No</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onBeforeShow</td>\n<td>Callback before Pop has opened, only user actions can trigger this callback, setting \n<code>visible</code>\n won\'t trigger this callback</td>\n<td>func</td>\n<td>No</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onBeforeClose</td>\n<td>Callback before Pop has closed, only user actions can trigger this callback, setting \n<code>visible</code>\n won\'t trigger this callback</td>\n<td>func</td>\n<td>No</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onConfirm</td>\n<td>Confirm callback</td>\n<td>func</td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>onCancel</td>\n<td>Cancel callback</td>\n<td>func</td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>confirmText</td>\n<td>Confirm button text</td>\n<td>string</td>\n<td>No</td>\n<td><code>\'Confirm\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>cancelText</td>\n<td>Cancel button text</td>\n<td>string</td>\n<td>No</td>\n<td><code>\'Cancel\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>type</td>\n<td>Confirm button type</td>\n<td>string</td>\n<td>No</td>\n<td><code>\'primary\'</code></td>\n<td><code>\'default\'</code></td>\n</tr>\n<tr>\n<td>visible</td>\n<td>Pop switch to controlled mode if this prop is set, must be used with \n<code>onVisibleChange</code></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>onPositionUpdated</td>\n<td>callback after position updates, a position update does not imply a position change</td>\n<td>func</td>\n<td>No</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onPositionReady</td>\n<td>callback after content enter viewport, only called once within the life cycle</td>\n<td>func</td>\n<td>No</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>containerSelector</td>\n<td>pop\'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>className</td>\n<td>Custom content class name</td>\n<td>string</td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>style</td>\n<td>Custom content style</td>\n<td><code>CSSProperties</code></td>\n<td>No</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p><code>Pop</code> has some additional props depends on different triggers.</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 Pop when click outside trigger and content</td>\n<td>bool</td>\n<td>No</td>\n<td><code>true</code></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>anchorOnly</td>\n<td>Only use trigger as hot area</td>\n<td>boolean</td>\n<td>No</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>fixMouseEventsOnDisabledChildren</td>\n<td>Fix mouse events on disabled children</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 effective on 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>Pop</code> automatically, you are responsible for controlling <code>visible</code> to close <code>Pop</code>.</p>\n<h4 class="anchor-heading"><a href="#withpop-hoc">¶</a><a href="javascript:void(0)" id="withpop-hoc" class="anchor-point"></a>withPop HOC</h4>\n<p>This HOC exposes some useful <code>Pop</code> methods.</p>\n<p>Possible senario: close <code>Pop</code> within its content.</p>\n<table class="table">\n<thead>\n<tr>\n<th>Property</th>\n<th>Description</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>open</td>\n<td>Open Pop</td>\n<td>func</td>\n</tr>\n<tr>\n<td>close</td>\n<td>Close Pop</td>\n<td>func</td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#adjustposition">¶</a><a href="javascript:void(0)" id="adjustposition" class="anchor-point"></a><code>adjustPosition</code></h4>\n<p>Use this function to manually adjust <code>Pop</code> position.</p>\n<h4 class="anchor-heading"><a href="#getwrappedpopover">¶</a><a href="javascript:void(0)" id="getwrappedpopover" class="anchor-point"></a><code>getWrappedPopover</code></h4>\n<p>Use this function to get the internal <code>Popover</code> instance.</p>\n<h3 class="anchor-heading"><a href="#faq">¶</a><a href="javascript:void(0)" id="faq" class="anchor-point"></a>FAQ</h3>\n<h4 class="anchor-heading"><a href="#wrong-popup-position-with-long">¶</a><a href="javascript:void(0)" id="wrong-popup-position-with-long" class="anchor-point"></a>Wrong popup position with long text content</h4>\n<p>It is likely you are passing a long string directly into <code>content</code> if this happens. Give <code>content</code> a width to make sure <code>Pop</code> can get the right width.</p>\n<h4 class="anchor-heading"><a href="#centerarrow">¶</a><a href="javascript:void(0)" id="centerarrow" class="anchor-point"></a>centerArrow</h4>\n<p><code>Pop</code> aligns edges of its content and trigger by default, the distance between the arrow and content edge is fixed except when <code>position</code> is set to <code>\'*-center\'</code>. The arrow will appear outside of trigger\'s edge when trigger size is small. When this happens you can set <code>centerArrow</code> to <code>true</code> to always align arrow to trigger\'s center.</p>\n<h4 class="anchor-heading"><a href="#onconfirm-and-oncancel">¶</a><a href="javascript:void(0)" id="onconfirm-and-oncancel" class="anchor-point"></a>onConfirm and onCancel</h4>\n<p>These two callbacks supports asynchronous mode, buttons will change into loading state when pending on result.</p>\n<ul>\n<li>If return value is a <code>Promise</code>, <code>Pop</code> will close on <code>Promise</code> <code>resolve</code>.</li>\n<li>If callback has parameters, it will be called with a <code>close</code> argument, <code>Pop</code> will not close until you call <code>close</code>.</li>\n</ul>'}))}}},33938:(n,s,a)=>{"use strict";a.d(s,{X:()=>k});var t=a(59312),p=a(24246),e=a(60042),o=a.n(e),c=a(27378),l=a(1535),u=a(23130),i=a(1348),r=a(4008);function k(n){var s=(0,c.useContext)(i.d),a=(0,c.useContext)(u.Z),e=(0,c.useRef)(n);e.current=n;var r,k=a&&a.onChange,d=(0,c.useCallback)((function(n){var s=e.current,a=s.value,p=s.onChange;if(k)k(a);else if(p){var o=Object.create(n);o.target=(0,t.pi)((0,t.pi)({},e.current),{type:"checkbox",checked:n.target.checked}),p(o)}}),[k]),m=(n.checked,n.className),g=n.style,h=(n.disabled,n.readOnly,n.children),v=n.indeterminate,f=n.width,y=(n.value,n.labelStyle),b=n.onMouseEnter,x=n.onMouseLeave,C=(0,t._T)(n,["checked","className","style","disabled","readOnly","children","indeterminate","width","value","labelStyle","onMouseEnter","onMouseLeave"]),w=function(n,s){return"boolean"==typeof s.readOnly?s.readOnly:!!n&&n.readOnly}(a,n),j=function(n,s,a){return"boolean"==typeof a.disabled?a.disabled:s?s.disabled:n.value}(s,a,n);if(a){var z=a.value,P=a.isValueEqual;r=-1!==z.findIndex((function(s){return P(s,n.value)}))}else r=!!n.checked;return(0,p.jsxs)("label",(0,t.pi)({className:o()("zent-checkbox-wrap",m,{"zent-checkbox-checked":!!r,"zent-checkbox-disabled":j||w,"zent-checkbox-indeterminate":v}),style:(0,t.pi)((0,t.pi)({},g),(0,l.Z)(f)),onMouseEnter:b,onMouseLeave:x,"data-zv":"9.12.7"},{children:[(0,p.jsxs)("span",(0,t.pi)({className:"zent-checkbox","data-zv":"9.12.7"},{children:[(0,p.jsx)("span",{className:"zent-checkbox-inner","data-zv":"9.12.7"},void 0),(0,p.jsx)("input",(0,t.pi)({},C,{type:"checkbox",checked:r&&!v,disabled:j,readOnly:w,onChange:d,"data-zv":"9.12.7"}),void 0)]}),void 0),null!=h&&!0!==h&&!1!==h?(0,p.jsx)("div",(0,t.pi)({className:"zent-checkbox-label",style:y,"data-zv":"9.12.7"},{children:h}),void 0):null]}),void 0)}k.Group=r.Z,s.Z=k},4008:(n,s,a)=>{"use strict";a.d(s,{c:()=>k});var t=a(59312),p=a(24246),e=a(27378),o=a(60042),c=a.n(o),l=a(41925),u=a(23130),i=a(1348),r=u.Z.Provider,k=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.getGroupContext=(0,l.Z)((function(n,a,t,p){return{value:Array.isArray(n)?n:[],disabled:a,readOnly:t,isValueEqual:p,onChange:s.onCheckboxChange}})),s.onCheckboxChange=function(n){var a=s.props,t=a.isValueEqual,p=a.onChange,e=a.value;if(p){var o=e?e.slice():[],c=o.findIndex((function(s){return t(s,n)}));-1!==c?o.splice(c,1):o.push(n),p(o)}},s}return(0,t.ZT)(s,n),s.prototype.render=function(){var n=this.props,s=n.className,a=n.style,e=n.children,o=n.value,l=n.disabled,u=void 0===l?this.context.value:l,i=n.readOnly,k=void 0!==i&&i,d=n.isValueEqual,m=c()("zent-checkbox-group",s);return(0,p.jsx)(r,(0,t.pi)({value:this.getGroupContext(o,u,k,d)},{children:(0,p.jsx)("div",(0,t.pi)({className:m,style:a,"data-zv":"9.12.7"},{children:e}),void 0)}),void 0)},s.defaultProps={isValueEqual:Object.is,value:[]},s.contextType=i.d,s}(e.Component);s.Z=k},23130:(n,s,a)=>{"use strict";var t=a(27378);s.Z=(0,t.createContext)(null)},69024:(n,s,a)=>{"use strict";a.d(s,{V:()=>P,Z:()=>N});var t=a(59312),p=a(24246),e=a(27378),o=a(14623),c=a(53552),l=a(79352),u=a(60042),i=a.n(u),r=a(58801),k=a(27036),d=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.dialogEl=null,s.onClickClose=function(n){var a=s.props.onClose;a&&a(n)},s}return(0,t.ZT)(s,n),s.prototype.componentDidMount=function(){this.resetTransformOrigin()},s.prototype.componentDidUpdate=function(){this.resetTransformOrigin()},s.prototype.resetTransformOrigin=function(n){void 0===n&&(n=this.props);var s=n.mousePosition;if(s&&s.x>=0&&s.y>=0&&this.dialogEl&&this.dialogEl.getBoundingClientRect){var a=this.dialogEl.getBoundingClientRect(),t=a.left,p=a.top,e=s.x-t+"px "+(s.y-p)+"px 0",o=this.dialogEl.style;["Webkit","Moz","Ms","ms"].forEach((function(n){o[n+"TransformOrigin"]=e})),o.transformOrigin=e}},s.prototype.renderHeader=function(){var n=this.props.title;return n?(n="number"==typeof n||"string"==typeof n?(0,p.jsx)("span",(0,t.pi)({className:"zent-dialog-r-title-text","data-zv":"9.12.7"},{children:n}),void 0):n,(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-header","data-zv":"9.12.7"},{children:(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-title","data-zv":"9.12.7"},{children:n}),void 0)}),void 0)):null},s.prototype.render=function(){var n=this,s=this.props,a=s.className,e=s.closeBtn,o=s.footer,c=s.style,l=s.children,u=this.renderHeader(),r=i()("zent-dialog-r-close",{"zent-dialog-r-has-title":!!u}),d=e&&(0,p.jsx)("button",(0,t.pi)({type:"button",className:r,onClick:this.onClickClose,"data-zv":"9.12.7"},{children:(0,p.jsx)(k.Z,{type:"close"},void 0)}),void 0),m=o&&(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-footer","data-zv":"9.12.7"},{children:o}),void 0);return(0,p.jsxs)("div",(0,t.pi)({className:i()("zent-dialog-r",a,{"zent-dialog-r--has-header":!!u,"zent-dialog-r--has-footer":!!m,"zent-dialog-r--no-close-btn":!d}),style:c,ref:function(s){return n.dialogEl=s},"data-zv":"9.12.7"},{children:[d,u,(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-body","data-zv":"9.12.7"},{children:(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-body-content","data-zv":"9.12.7"},{children:l}),void 0)}),void 0),m]}),void 0)},s}(e.Component),m=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.rootRef=(0,e.createRef)(),s.onMaskClick=function(n){n.target===n.currentTarget&&s.props.mask&&s.props.maskClosable&&s.props.onClose(n)},s}return(0,t.ZT)(s,n),s.prototype.componentDidMount=function(){var n=document.activeElement,s=this.rootRef.current;s!==n&&s&&!s.contains(n)&&function(n){if(n){var s=(0,r.Z)();n.focus(),window.scroll(s.x,s.y)}}(s)},s.prototype.render=function(){var n=this.props,s=n.mask,a=n.visible,e=n.children;return(0,p.jsxs)("div",(0,t.pi)({ref:this.rootRef,tabIndex:-1,className:"zent-dialog-r-root","data-zv":"9.12.7"},{children:[a&&s&&(0,p.jsx)("div",{className:"zent-dialog-r-backdrop","data-zv":"9.12.7"},void 0),(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-wrap",onClick:this.onMaskClick,"data-zv":"9.12.7"},{children:e}),void 0)]}),void 0)},s}(e.Component),g=a(31542),h=a.t(g,2),v=a(70453),f=a(42690),y=a(14805),b=new Map,x=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.state={visible:!0},s.closeOptions={},s.onClosed=function(){var n=s.props,a=n.options.onClose,t=n.container,p=s.closeOptions.triggerOnClose;(void 0===p||p)&&a&&a(),g.unmountComponentAtNode(t)},s.onClose=function(n){s.close({triggerOnClose:!1!==n})},s}return(0,t.ZT)(s,n),s.prototype.close=function(n){void 0===n&&(n={}),this.closeOptions=n,this.setState({visible:!1})},s.prototype.componentWillUnmount=function(){var n=this.props.options.dialogId;b.delete(n)},s.prototype.render=function(){var n=this.props.options,s=this.state.visible;return(0,p.jsx)(N,(0,t.pi)({},n,{onClose:this.onClose,onClosed:this.onClosed,visible:s}),void 0)},s}(e.Component);function C(n,s){void 0===s&&(s={});var a=b.get(n);if(a){var t=a.current;t&&t.close(s)}}function w(n){if(void 0===n&&(n={}),!l.Z)return f.Z;var s=n.dialogId,a=void 0===s?(0,v.Z)("__zent-dialog__"):s,o=n.parentComponent;!function(n){if(b.has(n))throw new Error("Duplicate dialog id found: "+n)}(a);var c=(0,y.Z)("div"),u=o?g.unstable_renderSubtreeIntoContainer.bind(h,o):g.render,i=(0,e.createRef)();return u((0,p.jsx)(x,{ref:i,options:(0,t.pi)((0,t.pi)({},n),{dialogId:a}),container:c},void 0),c),function(n,s){b.set(n,s)}(a,i),function(n){void 0===n&&(n=!0),C(a,{triggerOnClose:!1!==n})}}var j=a(49744),z=null;l.Z&&(0,j.Oo)(document.documentElement,"click",(function(n){z={x:n.clientX,y:n.clientY}}),{capture:!0});var P=function(n){function s(s){var a=n.call(this,s)||this;return a.lastMousePosition=null,a.onClose=function(n){var s=a.props.onClose;s&&s(n)},a.onExited=function(){var n=a.props.onClosed;a.setState({exiting:!1}),n&&n()},a.state={prevOpen:s.visible,exiting:!1},a}return(0,t.ZT)(s,n),s.getDerivedStateFromProps=function(n,s){var a=s.prevOpen;return n.visible===a?null:n.visible?{prevOpen:n.visible,exiting:!1}:{prevOpen:n.visible,exiting:!0}},s.prototype.render=function(){var n=this.props,s=n.visible,a=n.closeBtn,e=n.style,l=n.onOpened,u=(n.onClosed,n.mask),i=n.maskClosable,r=n.children,k=(0,t._T)(n,["visible","closeBtn","style","onOpened","onClosed","mask","maskClosable","children"]),g=this.state.exiting;return this.lastMousePosition=s?this.lastMousePosition||z:null,(0,p.jsx)(c.ZP,(0,t.pi)({visible:s||g,onClose:this.onClose,className:"zent-dialog-r-anchor",closeOnESC:a,blockPageScroll:!0},{children:(0,p.jsx)(m,(0,t.pi)({mask:u,maskClosable:i,visible:s,onClose:this.onClose},{children:(0,p.jsx)(o.Z,(0,t.pi)({appear:!0,mountOnEnter:!0,unmountOnExit:!0,in:s,timeout:300,classNames:"zent-zoom",onEntered:l,onExited:this.onExited},{children:(0,p.jsx)(d,(0,t.pi)({},k,{style:e,closeBtn:a,mousePosition:this.lastMousePosition},{children:r}),void 0)}),void 0)}),void 0)}),void 0)},s.defaultProps={onClose:function(){},visible:!1,className:"",style:{},title:"",closeBtn:!0,mask:!0,maskClosable:!0,footer:null},s.openDialog=w,s.closeDialog=C,s}(e.Component),N=P},4246:(n,s,a)=>{"use strict";a.d(s,{E:()=>i});var t=a(59312),p=a(24246),e=a(60042),o=a.n(e),c=a(27378),l=a(57961),u=a(1348);function i(n){var s=(0,c.useContext)(u.d),a=n.value,e=n.disabled,i=void 0===e?s.value:e,r=n.readOnly,k=void 0!==r&&r,d=n.isValueEqual,m=void 0===d?Object.is:d,g=n.className,h=n.style,v=n.children,f=n.onChange,y=(0,c.useMemo)((function(){return{value:a,disabled:i,readOnly:k,isValueEqual:m,onRadioChange:f}}),[a,i,k,m,f]);return(0,p.jsx)(l.Z.Provider,(0,t.pi)({value:y},{children:(0,p.jsx)("div",(0,t.pi)({className:o()("zent-radio-group",g),style:h,"data-zv":"9.12.7"},{children:v}),void 0)}),void 0)}s.Z=i},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:()=>m,Z:()=>g});var t=a(59312),p=a(24246),e=a(60042),o=a.n(e),c=a(1535),l=a(27378);function u(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 e=a.current.onChange;e&&e(s)}}),[p])}function i(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 m(n){var s=n.className,a=n.style,e=n.children,r=(n.value,n.width),m=n.labelStyle,g=(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),f=i(h,v,n),y=f.checked,b=f.disabled,x=f.readOnly,C=u(v,n),w=o()(s,"zent-radio-wrap",{"zent-radio-checked":!!y,"zent-radio-disabled":b||x}),j=(0,c.Z)(r),z=(0,t.pi)((0,t.pi)({},a),j);return(0,p.jsxs)("label",(0,t.pi)({className:w,style:z,onMouseEnter:n.onMouseEnter,onMouseLeave:n.onMouseLeave,"data-zv":"9.12.7"},{children:[(0,p.jsxs)("span",(0,t.pi)({className:"zent-radio","data-zv":"9.12.7"},{children:[(0,p.jsx)("span",{className:"zent-radio-inner","data-zv":"9.12.7"},void 0),(0,p.jsx)("input",(0,t.pi)({},g,{type:"radio",checked:!!y,disabled:b,readOnly:x,onChange:C,"data-zv":"9.12.7"}),void 0)]}),void 0),void 0!==e&&(0,p.jsx)("span",(0,t.pi)({className:"zent-radio-label",style:m,"data-zv":"9.12.7"},{children:e}),void 0)]}),void 0)}m.Button=function(n){var s=n.className,a=n.style,e=n.children,r=(n.value,n.width),m=n.onMouseEnter,g=n.onMouseLeave,h=(0,t._T)(n,["className","style","children","value","width","onMouseEnter","onMouseLeave"]),v=(0,l.useContext)(k.d),f=(0,l.useContext)(d.Z);if(!f)throw new Error("Radio.Button must be nested within Radio.Group");var y=i(v,f,n),b=y.checked,x=y.disabled,C=y.readOnly,w=u(f,n),j=o()(s,"zent-radio-button",{"zent-radio-button--checked":!!b,"zent-radio-button--disabled":x||C}),z=(0,c.Z)(r),P=(0,t.pi)((0,t.pi)({},a),z);return(0,p.jsxs)("label",(0,t.pi)({className:j,style:P,onMouseEnter:m,onMouseLeave:g,"data-zv":"9.12.7"},{children:[(0,p.jsx)("input",(0,t.pi)({},h,{type:"radio",checked:!!b,disabled:x,readOnly:C,onChange:w,"data-zv":"9.12.7"}),void 0),(0,p.jsx)("span",(0,t.pi)({className:"zent-radio-button__content","data-zv":"9.12.7"},{children:e}),void 0)]}),void 0)},m.Group=r.Z;var g=m},11497:(n,s,a)=>{"use strict";a.d(s,{Hj:()=>f});var t=a(59312),p=a(24246),e=a(60042),o=a.n(e),c=a(52074),l=a(69024).Z,u=a(27036),i=a(27378),r=a(90347),k=a(65436),d=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.state={loading:!1},s.onClick=function(){var n=s.props,a=n.onClick,t=(0,n.getClose)();if(!a)return t();var p=a.length>0,e=p?a(t):a();if((0,k.Z)(e))return s.setState({loading:!0}),void e.then((function(){t()}),(function(){s.setState({loading:!1})}));p||!1===e||t()},s}return(0,t.ZT)(s,n),s.prototype.render=function(){var n=this.props,s=n.className,a=n.type,e=n.text,o=this.state.loading;return(0,p.jsx)(r.ZP,(0,t.pi)({type:a,className:s,loading:o,onClick:this.onClick},{children:e}),void 0)},s}(i.Component),m={info:"info-circle-o",success:"check-circle-o",error:"close-circle-o",warning:"error-circle-o"},g=l.openDialog;function h(n,s){var a,e=n.className,l=void 0===e?"":e,i=n.confirmType,r=void 0===i?"primary":i,k=n.closeBtn,h=void 0!==k&&k,v=n.maskClosable,f=void 0!==v&&v,y=n.title,b=n.type,x=n.content,C=n.onConfirm,w=n.onCancel,j=n.confirmText,z=n.cancelText,P=n.parentComponent,N=n.onClose,B=null;return B=g({closeBtn:h,maskClosable:f,className:o()("zent-sweetalert-"+s,(a={},a[l]=!!l,a)),title:(0,p.jsx)(c.Z,(0,t.pi)({componentName:"Sweetalert"},{children:function(n){var s=m[b];return(0,p.jsxs)("div",(0,t.pi)({className:"zent-sweetalert-"+(b?"icon-":"")+"title","data-zv":"9.12.7"},{children:[b&&(0,p.jsx)(u.Z,{className:"zent-sweetalert-type-icon",type:s},void 0),y||n.title]}),void 0)}}),void 0),children:x,footer:(0,p.jsx)(c.Z,(0,t.pi)({componentName:"Sweetalert"},{children:function(n){var a="alert"===s;return(0,p.jsxs)("div",(0,t.pi)({className:"sweet-"+s+"-actions","data-zv":"9.12.7"},{children:[!a&&(0,p.jsx)(d,{type:"default",className:"zent-sweetalert-"+s+"-btn-cancel",getClose:function(){return B},onClick:w,text:z||n.cancel},"sweetalert-cancel"),(0,p.jsx)(d,{type:r,className:"zent-sweetalert-"+s+"-btn-confirm",getClose:function(){return B},onClick:C,text:j||(a?n.ok:n.confirm)},"sweetalert-confirm")]}),void 0)}}),void 0),parentComponent:P,onClose:N})}function v(n){return void 0===n&&(n={}),h(n,"alert")}var f={alert:v,info:v,confirm:function(n){return void 0===n&&(n={}),h(n,"confirm")}}},58801:(n,s,a)=>{"use strict";function t(){var n=window.pageXOffset,s=window.pageYOffset;return{x:void 0!==n?n:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==s?s:(document.documentElement||document.body.parentNode||document.body).scrollTop}}a.d(s,{Z:()=>t})},1535:(n,s,a)=>{"use strict";function t(n){return"string"==typeof n||"number"==typeof n?{width:n}:{}}a.d(s,{Z:()=>t})}}]);