umwd-components 0.1.741 → 0.1.742

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.
@@ -4,4 +4,4 @@
4
4
  * @copyright Jelle Paulus
5
5
  * @license MIT
6
6
  */
7
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("next/link"),i=require("../StyledLink.js"),o=require("react-dom"),t=require("../../data/actions/auth-actions.js"),s=require("../../lib/utils.js"),a=require("@mui/material/CardHeader"),n=require("@mui/material/CardContent"),l=require("@mui/material/CardActions"),d=require("@mui/material/Card"),u=require("@mui/material/TextField"),c=require("@mui/material/Stack"),m=require("@mui/material/Container"),x=require("@mui/material/Typography"),p=require("../SubmitButton.js"),h=require("../StrapiErrors.js"),g=require("@mui/material/styles"),j=require("../common/cookie-consent/CookieConsentContext.js"),b=require("../common/cookie-consent/CookieConsentButton.js"),y=require("@mui/material/Paper"),q=require("@mui/icons-material/Cookie");const f={zodErrors:null,strapiErrors:null,data:null,message:null};exports.default=function({data:k}){const{title:C="Sign In",subtitle:v="Enter your details to sign in to your account",maxWidth:S="lg",sx:w={},glass:E=!1,registration_url:T="/signup",redirect_url:_="/",forgot_password_url:z="/forgot-password",dashboard:F=!1}=k,[P,W]=o.useFormState(t.loginUserAction,f),B=g.useTheme(),{consentGiven:L}=F?{consentGiven:!0}:j.useCookieConsent();return!1===L?e.jsx(m,{maxWidth:S||"lg",sx:{my:1,...w},children:e.jsx(y,{sx:{backdropFilter:"blur(3px)",backgroundColor:s.setOpacity(B.palette.background.paper,E?.1:1),border:E?"1px solid rgba(255, 255, 255, 0.15)":"none",p:2},children:e.jsxs(c,{direction:"column",spacing:2,children:[e.jsxs(x,{variant:"body1",children:["You need to accept cookies to sign in. To learn more about our use of cookies, view our"," ",e.jsxs(i.StyledLink,{href:"/privacy-policy",target:"_self",sx:{fontWeight:"bold",color:"primary.main"},children:[" ","Privacy Policy."," "]})," ","You can also manage your cookie settings at any time using the cookie ",e.jsx(q,{fontSize:"inherit"})," icon in the footer."]}),e.jsx(b.default,{})]})})}):e.jsx(m,{maxWidth:S||"lg",sx:{my:1,...w},children:e.jsxs("form",{action:W,children:[e.jsx("input",{type:"hidden",name:"redirect",value:_}),e.jsxs(d,{sx:{backdropFilter:"blur(3px)",backgroundColor:s.setOpacity(B.palette.background.paper,E?.1:1),border:E?"1px solid rgba(255, 255, 255, 0.15)":"none"},children:[e.jsx(a,{title:C,subheader:v}),e.jsx(n,{children:e.jsxs(c,{spacing:2,children:[e.jsx(u,{id:"identifier",name:"identifier",label:"identifier",variant:"outlined",error:null!=P?.zodErrors?.identifier,helperText:P?.zodErrors?.identifier}),e.jsx(u,{id:"password",name:"password",label:"password",type:"password",variant:"outlined",error:null!=P?.zodErrors?.password,helperText:P?.zodErrors?.password})]})}),e.jsxs(l,{children:[e.jsx(p.SubmitButton,{text:"Sign In",loadingText:"Loading"}),e.jsx(h.StrapiErrors,{error:P?.strapiErrors}),P.message&&e.jsx(x,{sx:{pt:2},variant:"body2",color:"error",children:P.message})]})]}),!1===F&&e.jsxs(e.Fragment,{children:[e.jsx(x,{sx:{pt:2},variant:"body2",children:"Don't have an account?"}),e.jsx(r,{href:T,children:"Sign Up"}),e.jsx(x,{sx:{pt:2},variant:"body2",children:"Forgot your password?"}),e.jsx(r,{href:z,children:"Reset Password"})]})]})})};
7
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("next/link"),i=require("../StyledLink.js"),o=require("react"),t=require("../../data/actions/auth-actions.js"),s=require("../../lib/utils.js"),n=require("@mui/material/CardHeader"),a=require("@mui/material/CardContent"),l=require("@mui/material/CardActions"),d=require("@mui/material/Card"),u=require("@mui/material/TextField"),c=require("@mui/material/Stack"),x=require("@mui/material/Container"),p=require("@mui/material/Typography"),m=require("../SubmitButton.js"),h=require("../StrapiErrors.js"),g=require("@mui/material/styles"),j=require("../common/cookie-consent/CookieConsentContext.js"),b=require("../common/cookie-consent/CookieConsentButton.js"),y=require("@mui/material/Paper"),q=require("@mui/icons-material/Cookie");const f={zodErrors:null,strapiErrors:null,data:null,message:null};exports.default=function({data:k}){const{title:C="Sign In",subtitle:v="Enter your details to sign in to your account",maxWidth:S="lg",sx:w={},glass:E=!1,registration_url:T="/signup",redirect_url:_="/",forgot_password_url:z="/forgot-password",dashboard:F=!1}=k,[P,W]=o.useActionState(t.loginUserAction,f),A=g.useTheme(),{consentGiven:B}=F?{consentGiven:!0}:j.useCookieConsent();return!1===B?e.jsx(x,{maxWidth:S||"lg",sx:{my:1,...w},children:e.jsx(y,{sx:{backdropFilter:"blur(3px)",backgroundColor:s.setOpacity(A.palette.background.paper,E?.1:1),border:E?"1px solid rgba(255, 255, 255, 0.15)":"none",p:2},children:e.jsxs(c,{direction:"column",spacing:2,children:[e.jsxs(p,{variant:"body1",children:["You need to accept cookies to sign in. To learn more about our use of cookies, view our"," ",e.jsxs(i.StyledLink,{href:"/privacy-policy",target:"_self",sx:{fontWeight:"bold",color:"primary.main"},children:[" ","Privacy Policy."," "]})," ","You can also manage your cookie settings at any time using the cookie ",e.jsx(q,{fontSize:"inherit"})," icon in the footer."]}),e.jsx(b.default,{})]})})}):e.jsx(x,{maxWidth:S||"lg",sx:{my:1,...w},children:e.jsxs("form",{action:W,children:[e.jsx("input",{type:"hidden",name:"redirect",value:_}),e.jsxs(d,{sx:{backdropFilter:"blur(3px)",backgroundColor:s.setOpacity(A.palette.background.paper,E?.1:1),border:E?"1px solid rgba(255, 255, 255, 0.15)":"none"},children:[e.jsx(n,{title:C,subheader:v}),e.jsx(a,{children:e.jsxs(c,{spacing:2,children:[e.jsx(u,{id:"identifier",name:"identifier",label:"identifier",variant:"outlined",error:null!=P?.zodErrors?.identifier,helperText:P?.zodErrors?.identifier}),e.jsx(u,{id:"password",name:"password",label:"password",type:"password",variant:"outlined",error:null!=P?.zodErrors?.password,helperText:P?.zodErrors?.password})]})}),e.jsxs(l,{children:[e.jsx(m.SubmitButton,{text:"Sign In",loadingText:"Loading"}),e.jsx(h.StrapiErrors,{error:P?.strapiErrors}),P.message&&e.jsx(p,{sx:{pt:2},variant:"body2",color:"error",children:P.message})]})]}),!1===F&&e.jsxs(e.Fragment,{children:[e.jsx(p,{sx:{pt:2},variant:"body2",children:"Don't have an account?"}),e.jsx(r,{href:T,children:"Sign Up"}),e.jsx(p,{sx:{pt:2},variant:"body2",children:"Forgot your password?"}),e.jsx(r,{href:z,children:"Reset Password"})]})]})})};