Files
aso/public/dashboard/assets/DialogContent.9d59da83.js
2023-02-15 10:47:39 +07:00

2 lines
5.2 KiB
JavaScript

import{w as W,v as k,r as d,t as u,bF as O,bG as G,O as l,z as t,P as w,x as B,X as V,y as T,aM as q,f as s,D as m,E as R,bv as J}from"./index.eaf14aef.js";function Q(o){return k("MuiDialog",o)}const Z=W("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),D=Z,oo=d.exports.createContext({}),eo=oo,ao=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],ro=u(O,{name:"MuiDialog",slot:"Backdrop",overrides:(o,e)=>e.backdrop})({zIndex:-1}),to=o=>{const{classes:e,scroll:a,maxWidth:r,fullWidth:i,fullScreen:n}=o,p={root:["root"],container:["container",`scroll${l(a)}`],paper:["paper",`paperScroll${l(a)}`,`paperWidth${l(String(r))}`,i&&"paperFullWidth",n&&"paperFullScreen"]};return R(p,Q,e)},io=u(G,{name:"MuiDialog",slot:"Root",overridesResolver:(o,e)=>e.root})({"@media print":{position:"absolute !important"}}),so=u("div",{name:"MuiDialog",slot:"Container",overridesResolver:(o,e)=>{const{ownerState:a}=o;return[e.container,e[`scroll${l(a.scroll)}`]]}})(({ownerState:o})=>t({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"}})),lo=u(w,{name:"MuiDialog",slot:"Paper",overridesResolver:(o,e)=>{const{ownerState:a}=o;return[e.paper,e[`scrollPaper${l(a.scroll)}`],e[`paperWidth${l(String(a.maxWidth))}`],a.fullWidth&&e.paperFullWidth,a.fullScreen&&e.paperFullScreen]}})(({theme:o,ownerState:e})=>t({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}`,[`&.${D.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}`,[`&.${D.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,[`&.${D.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),no=d.exports.forwardRef(function(e,a){const r=B({props:e,name:"MuiDialog"}),i=V(),n={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":p,"aria-labelledby":g,BackdropComponent:h,BackdropProps:F,children:N,className:U,disableEscapeKeyDown:y=!1,fullScreen:A=!1,fullWidth:E=!1,maxWidth:I="sm",onBackdropClick:$,onClose:b,open:P,PaperComponent:L=w,PaperProps:M={},scroll:X="paper",TransitionComponent:Y=J,transitionDuration:S=n,TransitionProps:_}=r,j=T(r,ao),x=t({},r,{disableEscapeKeyDown:y,fullScreen:A,fullWidth:E,maxWidth:I,scroll:X}),f=to(x),C=d.exports.useRef(),z=c=>{C.current=c.target===c.currentTarget},K=c=>{!C.current||(C.current=null,$&&$(c),b&&b(c,"backdropClick"))},v=q(g),H=d.exports.useMemo(()=>({titleId:v}),[v]);return s(io,t({className:m(f.root,U),closeAfterTransition:!0,components:{Backdrop:ro},componentsProps:{backdrop:t({transitionDuration:S,as:h},F)},disableEscapeKeyDown:y,onClose:b,open:P,ref:a,onClick:K,ownerState:x},j,{children:s(Y,t({appear:!0,in:P,timeout:S,role:"presentation"},_,{children:s(so,{className:m(f.container),onMouseDown:z,ownerState:x,children:s(lo,t({as:L,elevation:24,role:"dialog","aria-describedby":p,"aria-labelledby":v},M,{className:m(f.paper,M.className),ownerState:x,children:s(eo.Provider,{value:H,children:N})}))})}))}))}),fo=no;function po(o){return k("MuiDialogContent",o)}W("MuiDialogContent",["root","dividers"]);function Co(o){return k("MuiDialogTitle",o)}const co=W("MuiDialogTitle",["root"]),uo=co,go=["className","dividers"],xo=o=>{const{classes:e,dividers:a}=o;return R({root:["root",a&&"dividers"]},po,e)},mo=u("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:a}=o;return[e.root,a.dividers&&e.dividers]}})(({theme:o,ownerState:e})=>t({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}`}:{[`.${uo.root} + &`]:{paddingTop:0}})),ho=d.exports.forwardRef(function(e,a){const r=B({props:e,name:"MuiDialogContent"}),{className:i,dividers:n=!1}=r,p=T(r,go),g=t({},r,{dividers:n}),h=xo(g);return s(mo,t({className:m(h.root,i),ownerState:g,ref:a},p))}),vo=ho;export{fo as D,vo as a,eo as b,D as d,Co as g};