2 lines
6.0 KiB
JavaScript
2 lines
6.0 KiB
JavaScript
import{g as k,a as y,r as p,s as u,aM as V,aN as G,b as d,_ as r,P as _,u as $,v as J,e as M,j as c,h as m,i as P,aH as Q,T as Z}from"./index.4524613b.js";import{u as oo}from"./useId.5c752e65.js";import{r as eo,i as ao,a as to}from"./jsx-runtime_commonjs-proxy.08daee49.js";function ro(o){return y("MuiDialog",o)}const io=k("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),W=io,so=p.exports.createContext({}),F=so,lo=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],no=u(V,{name:"MuiDialog",slot:"Backdrop",overrides:(o,e)=>e.backdrop})({zIndex:-1}),co=o=>{const{classes:e,scroll:a,maxWidth:t,fullWidth:s,fullScreen:i}=o,l={root:["root"],container:["container",`scroll${d(a)}`],paper:["paper",`paperScroll${d(a)}`,`paperWidth${d(String(t))}`,s&&"paperFullWidth",i&&"paperFullScreen"]};return P(l,ro,e)},po=u(G,{name:"MuiDialog",slot:"Root",overridesResolver:(o,e)=>e.root})({"@media print":{position:"absolute !important"}}),uo=u("div",{name:"MuiDialog",slot:"Container",overridesResolver:(o,e)=>{const{ownerState:a}=o;return[e.container,e[`scroll${d(a.scroll)}`]]}})(({ownerState:o})=>r({height:"100%","@media print":{height:"auto"},outline:0},o.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},o.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),go=u(_,{name:"MuiDialog",slot:"Paper",overridesResolver:(o,e)=>{const{ownerState:a}=o;return[e.paper,e[`scrollPaper${d(a.scroll)}`],e[`paperWidth${d(String(a.maxWidth))}`],a.fullWidth&&e.paperFullWidth,a.fullScreen&&e.paperFullScreen]}})(({theme:o,ownerState:e})=>r({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:o.breakpoints.unit==="px"?Math.max(o.breakpoints.values.xs,444):`${o.breakpoints.values.xs}${o.breakpoints.unit}`,[`&.${W.paperScrollBody}`]:{[o.breakpoints.down(Math.max(o.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${o.breakpoints.values[e.maxWidth]}${o.breakpoints.unit}`,[`&.${W.paperScrollBody}`]:{[o.breakpoints.down(o.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${W.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),xo=p.exports.forwardRef(function(e,a){const t=$({props:e,name:"MuiDialog"}),s=J(),i={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{"aria-describedby":l,"aria-labelledby":n,BackdropComponent:g,BackdropProps:h,children:U,className:j,disableEscapeKeyDown:T=!1,fullScreen:I=!1,fullWidth:A=!1,maxWidth:q="sm",onBackdropClick:w,onClose:v,open:R,PaperComponent:L=_,PaperProps:B={},scroll:Y="paper",TransitionComponent:z=Q,transitionDuration:N=i,TransitionProps:E}=t,H=M(t,lo),f=r({},t,{disableEscapeKeyDown:T,fullScreen:I,fullWidth:A,maxWidth:q,scroll:Y}),b=co(f),C=p.exports.useRef(),K=x=>{C.current=x.target===x.currentTarget},X=x=>{!C.current||(C.current=null,w&&w(x),v&&v(x,"backdropClick"))},D=oo(n),O=p.exports.useMemo(()=>({titleId:D}),[D]);return c(po,r({className:m(b.root,j),closeAfterTransition:!0,components:{Backdrop:no},componentsProps:{backdrop:r({transitionDuration:N,as:g},h)},disableEscapeKeyDown:T,onClose:v,open:R,ref:a,onClick:X,ownerState:f},H,{children:c(z,r({appear:!0,in:R,timeout:N,role:"presentation"},E,{children:c(uo,{className:m(b.container),onMouseDown:K,ownerState:f,children:c(go,r({as:L,elevation:24,role:"dialog","aria-describedby":l,"aria-labelledby":D},B,{className:m(b.paper,B.className),ownerState:f,children:c(F.Provider,{value:O,children:U})}))})}))}))}),Fo=xo;function mo(o){return y("MuiDialogContent",o)}k("MuiDialogContent",["root","dividers"]);function fo(o){return y("MuiDialogTitle",o)}const ho=k("MuiDialogTitle",["root"]),vo=ho,bo=["className","dividers"],Co=o=>{const{classes:e,dividers:a}=o;return P({root:["root",a&&"dividers"]},mo,e)},Do=u("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:a}=o;return[e.root,a.dividers&&e.dividers]}})(({theme:o,ownerState:e})=>r({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(o.vars||o).palette.divider}`,borderBottom:`1px solid ${(o.vars||o).palette.divider}`}:{[`.${vo.root} + &`]:{paddingTop:0}})),Wo=p.exports.forwardRef(function(e,a){const t=$({props:e,name:"MuiDialogContent"}),{className:s,dividers:i=!1}=t,l=M(t,bo),n=r({},t,{dividers:i}),g=Co(n);return c(Do,r({className:m(g.root,s),ownerState:n,ref:a},l))}),Uo=Wo,ko=["className","id"],yo=o=>{const{classes:e}=o;return P({root:["root"]},fo,e)},$o=u(Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(o,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),Mo=p.exports.forwardRef(function(e,a){const t=$({props:e,name:"MuiDialogTitle"}),{className:s,id:i}=t,l=M(t,ko),n=t,g=yo(n),{titleId:h=i}=p.exports.useContext(F);return c($o,r({component:"h2",className:m(g.root,s),ownerState:n,ref:a,variant:"h6",id:i!=null?i:h},l))}),jo=Mo;var S={},Po=ao.exports;Object.defineProperty(S,"__esModule",{value:!0});var So=S.default=void 0,To=Po(eo()),wo=to,Ro=(0,To.default)((0,wo.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");So=S.default=Ro;export{Fo as D,Uo as a,jo as b,So as c,W as d};
|