UNPKG

@privy-io/react-auth

Version:

React client for the Privy Auth API

135 lines (117 loc) 3.24 kB
"use strict";var r=require("styled-components"),o=require("./ErrorMessage-BfTVyue9.js");let e=r.styled.label` display: block; position: relative; width: 100%; height: 56px; && > :first-child { position: absolute; left: 0.75em; top: 50%; transform: translate(0, -50%); } && > input { font-size: 16px; line-height: 24px; color: var(--privy-color-foreground); padding: 12px 88px 12px 52px; flex-grow: 1; background: var(--privy-color-background); border: 1px solid ${({$error:r})=>r?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"}; border-radius: var(--privy-border-radius-md); width: 100%; height: 100%; /* Tablet and Up */ @media (min-width: 441px) { font-size: 14px; padding-right: 78px; } :focus { outline: none; border-color: ${({$error:r})=>r?"var(--privy-color-error) !important":"var(--privy-color-accent-light)"}; box-shadow: ${({$error:r})=>r?"none":"0 0 0 1px var(--privy-color-accent-light)"}; } :autofill, :-webkit-autofill { background: var(--privy-color-background); } && > input::placeholder { color: var(--privy-color-foreground-3); } &:disabled { opacity: 0.4; /* Make it visually appear disabled */ cursor: not-allowed; /* Change cursor to not-allowed */ } &:disabled, &:disabled:hover, &:disabled > span { color: var(--privy-color-foreground-3); /* Change text color to grey */ } } && > button:last-child { right: 0px; line-height: 24px; padding: 13px 17px; :focus { outline: none; } &:disabled { opacity: 0.4; /* Make it visually appear disabled */ cursor: not-allowed; /* Change cursor to not-allowed */ } &:disabled, &:disabled:hover, &:disabled > span { color: var(--privy-color-foreground-3); /* Change text color to grey */ } } `;const i=r.styled(e)` background-color: var(--privy-color-background); transition: background-color 200ms ease; && > button { right: 0; line-height: 24px; position: absolute; padding: 13px 17px; background-color: #090; :focus { outline: none; border-color: var(--privy-color-accent); } } `,t=r.styled(e)` && > input { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: ${r=>r.$stacked?"16px":"88px"}; border: 1px solid ${({$error:r})=>r?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"}; && > input::placeholder { color: var(--privy-color-foreground-3); } } && > :last-child { right: 16px; position: absolute; top: 50%; transform: translate(0, -50%); } && > button:last-child { right: 0px; line-height: 24px; padding: 13px 17px; :focus { outline: none; } } `,a=r.styled.div` width: 100%; /* Add styling for the ErrorMessage within EmailInput */ && > ${o.ErrorMessage} { display: block; text-align: left; padding-left: var(--privy-border-radius-md); padding-bottom: 5px; } `;exports.EmailInputForm=t,exports.EmailUpdateForm=i,exports.InputContainerForm=a;