@daimo/pay
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
268 lines (257 loc) • 6.69 kB
JavaScript
import { keyframes } from 'styled-components';
import styled from '../../../styles/styled/index.js';
import { motion } from 'framer-motion';
import { ModalBody } from '../../Common/Modal/styles.js';
const Shimmer = keyframes `
0%{ transform: translate(-100%) rotate(-45deg); }
100%{ transform: translate(100%) rotate(-80deg); }
`;
const InfoBox = styled.div `
padding: 24px 24px 28px;
border-radius: var(--ck-tertiary-border-radius, 24px);
box-shadow: var(--ck-tertiary-box-shadow, none);
background: var(--ck-body-background-tertiary);
${ModalBody} {
max-width: none;
}
`;
const InfoBoxButtons = styled.div `
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
margin: 5px -8px -12px;
button {
}
`;
const LearnMoreContainer = styled(motion.div) `
text-align: center;
margin-top: 16px;
margin-bottom: -6px;
`;
const LearnMoreButton = styled(motion.button) `
appearance: none;
user-select: none;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
height: 42px;
padding: 0 16px;
border-radius: 6px;
background: none;
color: var(--ck-body-color-muted);
font-size: 15px;
line-height: 18px;
font-weight: 500;
/* will-change: transform; */
transition:
color 200ms ease,
transform 100ms ease;
svg {
transition: all 100ms ease-out;
display: block;
position: relative;
top: 2px;
left: 2px;
transform: translateZ(0px);
path,
circle {
transition: all 100ms ease-out;
}
path:last-of-type {
transform-origin: 0 0;
transform: scaleX(1.3) skewY(-12deg);
opacity: 0;
}
circle {
transform: translate(20%, -15%);
}
}
&:hover {
color: var(--ck-body-color-muted-hover);
svg {
path,
circle {
opacity: 1;
transform: none;
}
}
}
&:active {
transform: scale(0.96);
}
`;
styled(motion.div) `
display: flex;
flex-direction: column;
gap: 12px;
padding: 0 0 16px;
overflow-y: scroll;
max-height: 20rem;
&::-webkit-scrollbar {
display: none;
}
`;
styled(motion.button) `
cursor: pointer;
user-select: none;
position: relative;
display: flex;
align-items: center;
padding: 0 20px;
width: 100%;
height: 64px;
font-size: 17px;
font-weight: var(--ck-primary-button-font-weight, 500);
line-height: 20px;
text-align: var(--ck-body-button-text-align, left);
transition: 180ms ease;
transition-property: background, color, box-shadow, transform, opacity;
will-change: transform, box-shadow, background-color, color, opacity;
--fallback-color: var(--ck-primary-button-color);
--fallback-background: var(--ck-primary-button-background);
--fallback-box-shadow: var(--ck-primary-button-box-shadow);
--fallback-border-radius: var(--ck-primary-button-border-radius);
--color: var(--ck-primary-button-color, var(--fallback-color));
--background: var(--ck-primary-button-background, var(--fallback-background));
--box-shadow: var(--ck-primary-button-box-shadow, var(--fallback-box-shadow));
--border-radius: var(
--ck-primary-button-border-radius,
var(--fallback-border-radius)
);
--hover-color: var(--ck-primary-button-hover-color, var(--color));
--hover-background: var(
--ck-primary-button-hover-background,
var(--background)
);
--hover-box-shadow: var(
--ck-primary-button-hover-box-shadow,
var(--box-shadow)
);
--hover-border-radius: var(
--ck-primary-button-hover-border-radius,
var(--border-radius)
);
--active-color: var(--ck-primary-button-active-color, var(--hover-color));
--active-background: var(
--ck-primary-button-active-background,
var(--hover-background)
);
--active-box-shadow: var(
--ck-primary-button-active-box-shadow,
var(--hover-box-shadow)
);
--active-border-radius: var(
--ck-primary-button-active-border-radius,
var(--hover-border-radius)
);
color: var(--color);
background: var(--background);
box-shadow: var(--box-shadow);
border-radius: var(--border-radius);
&:disabled {
transition: 180ms ease;
opacity: 0.4;
}
--bg: var(--background);
&:not(:disabled) {
&:hover {
color: var(--hover-color);
background: var(--hover-background);
box-shadow: var(--hover-box-shadow);
border-radius: var(--hover-border-radius);
--bg: var(--hover-background, var(--background));
}
&:focus-visible {
transition-duration: 100ms;
color: var(--hover-color);
background: var(--hover-background);
box-shadow: var(--hover-box-shadow);
border-radius: var(--hover-border-radius);
--bg: var(--hover-background, var(--background));
}
&:active {
color: var(--active-color);
background: var(--active-background);
box-shadow: var(--active-box-shadow);
border-radius: var(--active-border-radius);
--bg: var(--active-background, var(--background));
}
}
`;
styled(motion.span) `
position: relative;
top: var(--ck-recent-badge-top-offset, 0.5px);
display: inline-block;
padding: 10px 7px;
line-height: 0;
font-size: 13px;
font-weight: 400;
border-radius: var(--ck-recent-badge-border-radius, var(--border-radius));
color: var(
--ck-recent-badge-color,
var(--ck-accent-color, var(--ck-body-color-muted, currentColor))
);
background: var(--ck-recent-badge-background, transparent);
overflow: hidden;
span {
display: inline-block;
position: relative;
}
&:before {
z-index: 1;
content: "";
position: absolute;
inset: 0;
opacity: 0.4;
box-shadow: var(--ck-recent-badge-box-shadow, inset 0 0 0 1px currentColor);
border-radius: inherit;
}
&:after {
z-index: 2;
content: "";
position: absolute;
inset: -10%;
top: -110%;
aspect-ratio: 1/1;
opacity: 0.7;
background: linear-gradient(
170deg,
transparent 10%,
var(--ck-recent-badge-background, var(--bg)) 50%,
transparent 90%
);
animation: ${Shimmer} 2s linear infinite;
}
`;
styled(motion.span) `
display: flex;
align-items: center;
gap: 9px;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 2px 0;
padding-right: 38px;
`;
styled(motion.div) `
position: absolute;
right: 20px;
width: 32px;
height: 32px;
overflow: hidden;
svg,
img {
display: block;
position: relative;
pointer-events: none;
overflow: hidden;
border-radius: 27.5%;
width: 100%;
height: 100%;
}
`;
export { InfoBox, InfoBoxButtons, LearnMoreButton, LearnMoreContainer };
//# sourceMappingURL=styles.js.map