@eclass/ui-kit 1.39.1 → 1.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -559,5 +559,5 @@ to {
|
|
|
559
559
|
> * {
|
|
560
560
|
pointer-events: auto;
|
|
561
561
|
}
|
|
562
|
-
`,kc=16,yD=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:s}=G$(r);return S.createElement("div",{style:{position:"fixed",zIndex:9999,top:kc,left:kc,right:kc,bottom:kc,pointerEvents:"none",...o},className:a,onMouseEnter:s.startPause,onMouseLeave:s.endPause},l.map(u=>{let c=u.position||t,f=s.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),d=mD(c,f);return S.createElement(hD,{id:u.id,key:u.id,onHeightUpdate:s.updateHeight,className:u.visible?gD:"",style:d},u.type==="custom"?Sc(u.message,u):i?i(u):S.createElement(vD,{toast:u,position:c}))}))};const Ww=e=>{function t(n){var o,a;return(a=(o=n.match(/(\w+)/g))==null?void 0:o.length)!=null?a:0}let r=3e3;return e&&t(e)>5&&(r=6e3),r};function bD({message:e,state:t,show:r,m:n}){const i=F.useCallback(()=>{bt(o=>C($w,{isFlash:!0,state:t,canDismiss:!0,onClick:()=>bt.dismiss(o.id),children:e}),{duration:Ww(e),id:bc[t].id})},[e,t]);return F.useEffect(()=>{r&&i()},[r,i]),C(fe,{children:C(yD,{toastOptions:{className:"toastContainer",style:{background:"transparent",boxShadow:"none"}}})})}const xD=({state:e,message:t})=>{const[r,n]=F.useState(!1);return F.useEffect(()=>{if(r){const o=setTimeout(()=>{n(!1)},Ww(t));return()=>clearTimeout(o)}},[t,r]),{show:r,active:()=>{r||n(!0)},config:{state:e,message:t}}};function Hw({showModal:e,typeAlert:t,title:r,description:n,optionsButton:i}){const[o]=lS("(min-width: 650px)"),a=i.length>1;return q(gl,{isOpen:e,onClose:()=>{},closeOnEsc:!1,closeOnOverlayClick:!1,size:o?"xl":"sm",children:[C(kh,{}),q(Eh,{children:[q(fe,{alignItems:"center",justifyContent:"center",textAlign:"center",py:
|
|
562
|
+
`,kc=16,yD=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:s}=G$(r);return S.createElement("div",{style:{position:"fixed",zIndex:9999,top:kc,left:kc,right:kc,bottom:kc,pointerEvents:"none",...o},className:a,onMouseEnter:s.startPause,onMouseLeave:s.endPause},l.map(u=>{let c=u.position||t,f=s.calculateOffset(u,{reverseOrder:e,gutter:n,defaultPosition:t}),d=mD(c,f);return S.createElement(hD,{id:u.id,key:u.id,onHeightUpdate:s.updateHeight,className:u.visible?gD:"",style:d},u.type==="custom"?Sc(u.message,u):i?i(u):S.createElement(vD,{toast:u,position:c}))}))};const Ww=e=>{function t(n){var o,a;return(a=(o=n.match(/(\w+)/g))==null?void 0:o.length)!=null?a:0}let r=3e3;return e&&t(e)>5&&(r=6e3),r};function bD({message:e,state:t,show:r,m:n}){const i=F.useCallback(()=>{bt(o=>C($w,{isFlash:!0,state:t,canDismiss:!0,onClick:()=>bt.dismiss(o.id),children:e}),{duration:Ww(e),id:bc[t].id})},[e,t]);return F.useEffect(()=>{r&&i()},[r,i]),C(fe,{children:C(yD,{toastOptions:{className:"toastContainer",style:{background:"transparent",boxShadow:"none"}}})})}const xD=({state:e,message:t})=>{const[r,n]=F.useState(!1);return F.useEffect(()=>{if(r){const o=setTimeout(()=>{n(!1)},Ww(t));return()=>clearTimeout(o)}},[t,r]),{show:r,active:()=>{r||n(!0)},config:{state:e,message:t}}};function Hw({showModal:e,typeAlert:t,title:r,description:n,optionsButton:i}){const[o]=lS("(min-width: 650px)"),a=i.length>1;return q(gl,{isOpen:e,onClose:()=>{},closeOnEsc:!1,closeOnOverlayClick:!1,size:o?"xl":"sm",children:[C(kh,{}),q(Eh,{children:[q(fe,{alignItems:"center",justifyContent:"center",textAlign:"center",py:"2rem",children:[C(fe,{display:"flex",justifyContent:"center",children:bc[t].icon}),C(Th,{py:"1rem",children:r}),C(Ph,{py:"0.5rem",px:"2rem",children:n})]}),C(oR,{colorScheme:"#E6E6E6",size:"2",opacity:"1"}),C(_h,{justifyContent:"center",padding:"0",children:i.map((l,s)=>C(fe,{width:"99%",textAlign:"center",padding:"1rem",borderLeftWidth:a&&l.id===i[1].id?"1px":"0",borderLeftColor:"#E6E6E6",children:C(bl,{textDecorationLine:!1,fontSize:"1rem",onClick:()=>l.action(),children:l.label})},s))})]})]})}Hw.displayName="ModalAlert",de.Alert=$w,de.Btn=gc,de.BtnLink=bl,de.BtnPrimary=rm,de.BtnSecondary=kw,de.BtnTertiary=Tw,de.CourseList=Bw,de.CourseStatus=Ow,de.FlashNotification=bD,de.Icons=b$,de.Label=hc,de.ModalAlert=Hw,de.NewTooltip=x$,de.Progress=Sw,de.Ripples=Ah,de.TinyAlert=Ew,de.dataFake=C$,de.maxWidthCoursesList=E$,de.theme=p$,de.useFlashNotification=xD,de.vars=W,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
563
563
|
//# sourceMappingURL=eclass-ui-kit.umd.js.map
|