@privy-io/react-auth
Version:
React client for the Privy Auth API
181 lines (162 loc) • 4.53 kB
JavaScript
;var e=require("@heroicons/react/24/outline/ArrowPathIcon"),r=require("@heroicons/react/24/outline/EyeIcon"),t=require("@heroicons/react/24/outline/EyeSlashIcon"),o=require("styled-components"),i=require("./ModalHeader-BCPQgekO.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=/*#__PURE__*/n(e),s=/*#__PURE__*/n(r),l=/*#__PURE__*/n(t);let d=o.css`
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.008px;
text-align: left;
transition: color 0.1s ease-in;
`;const p=o.styled.span`
${d}
transition: color 0.1s ease-in;
color: ${({error:e})=>e?"var(--privy-color-error)":"var(--privy-color-foreground-3)"};
text-transform: ${({error:e})=>e?"":"capitalize"};
&[aria-hidden='true'] {
visibility: hidden;
}
`,c=o.styled.div`
display: flex;
flex-direction: column;
justify-content: center;
flex-grow: 1;
`,x=o.styled(i.PrimaryButton)`
${({$hideAnimations:e})=>e&&o.css`
&& {
transition: none;
}
`}
`;let y=o.css`
&& {
width: 100%;
border-width: 1px;
border-radius: var(--privy-border-radius-md);
border-color: var(--privy-color-foreground-3);
background: var(--privy-color-background);
color: var(--privy-color-foreground);
padding: 12px;
font-size: 16px;
font-style: normal;
font-weight: 300;
line-height: 22px; /* 137.5% */
}
`;const h=o.styled.input`
${y}
&::placeholder {
color: var(--privy-color-foreground-3);
font-style: italic;
font-size: 14px;
}
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`,u=o.styled.div`
${y}
`,v=o.styled.div`
position: relative;
width: 100%;
display: flex;
align-items: center;
justify-content: ${({centered:e})=>e?"center":"space-between"};
`,g=o.styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 32px 0;
gap: 4px;
& h3 {
font-size: 18px;
font-style: normal;
font-weight: 600;
line-height: 24px;
}
& p {
max-width: 300px;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
}
`,f=o.styled.div`
display: flex;
flex-direction: column;
gap: 10px;
padding-bottom: 1rem;
`,m=o.styled.div`
display: flex;
text-align: left;
align-items: center;
gap: 8px;
max-width: 300px;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
letter-spacing: -0.008px;
margin: 0 8px;
color: var(--privy-color-foreground-2);
> :first-child {
min-width: 24px;
}
`;o.styled.div`
height: var(--privy-height-modal-full);
@media (max-width: 440px) {
height: var(--privy-height-modal-compact);
}
`;const w=o.styled(i.Button)`
display: flex;
flex: 1;
gap: 4px;
justify-content: center;
&& {
background: var(--privy-color-background);
border-radius: var(--privy-border-radius-md);
border-color: var(--privy-color-foreground-3);
border-width: 1px;
}
`,b=o.styled.div`
position: absolute;
right: 0.5rem;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
`,k=o.styled(a.default)`
height: 1.25rem;
width: 1.25rem;
stroke: var(--privy-color-accent);
cursor: pointer;
:active {
stroke: var(--privy-color-accent-light);
}
`,I=o.styled(l.default)`
height: 1.25rem;
width: 1.25rem;
stroke: var(--privy-color-accent);
cursor: pointer;
:active {
stroke: var(--privy-color-accent-light);
}
`,$=o.styled(s.default)`
height: 1.25rem;
width: 1.25rem;
stroke: var(--privy-color-accent);
cursor: pointer;
:active {
stroke: var(--privy-color-accent-light);
}
`,j=o.styled.progress`
height: 4px;
width: 100%;
margin: 8px 0;
/* border-radius: 9999px; */
::-webkit-progress-bar {
border-radius: 8px;
background: var(--privy-color-foreground-4);
}
::-webkit-progress-value {
border-radius: 8px;
transition: all 0.1s ease-out;
background: ${({label:e})=>("Strong"===e?"#78dca6":"Medium"===e&&"var(--privy-color-warn)")||"var(--privy-color-error)"};
}
`;exports.DetailItem=m,exports.Details=f,exports.EmbeddedWalletScreenContainer=c,exports.ExportButton=w,exports.Header=g,exports.HiddenIcon=I,exports.InputRightIcons=b,exports.NoAnimationPrimaryButton=x,exports.PasswordContainer=v,exports.PasswordDisplay=u,exports.PasswordInput=h,exports.RegenerateIcon=k,exports.ShownIcon=$,exports.StatusText=p,exports.StrengthMeter=j;