UNPKG

@particle-network/connectkit

Version:
147 lines (138 loc) 3.2 kB
"use client"; import { __esm } from "./chunk-Y7A564BU.mjs"; // src/pages/connecting/styles.ts import { motion } from "framer-motion"; import { css, keyframes, styled } from "styled-components"; var ConnectingContainer, dist, shakeKeyframes, outlineKeyframes, ConnectingAnimation, RetryButton, RetryIconContainer, StatusContainer; var init_styles = __esm({ "src/pages/connecting/styles.ts"() { "use strict"; ConnectingContainer = styled(motion.div)` width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; `; dist = 2; shakeKeyframes = keyframes` 0%{ transform:none; } 25%{ transform:translateX(${dist}px); } 50%{ transform:translateX(-${dist}px); } 75%{ transform:translateX(${dist}px); } 100%{ transform:none; } `; outlineKeyframes = keyframes` 0%{ opacity:1; } 100%{ opacity:0; } `; ConnectingAnimation = styled(motion.div)` user-select: none; position: relative; --spinner-error-opacity: 0; &:before { content: ''; position: absolute; inset: 1px; opacity: 0; background: var(--pcm-error-color); ${(props) => props.$circle && css` inset: -5px; border-radius: 50%; background: none; box-shadow: inset 0 0 0 3.5px var(--pcm-error-color); `} } ${(props) => props.$shake && css` animation: ${shakeKeyframes} 220ms ease-out both; &:before { animation: ${outlineKeyframes} 220ms ease-out 750ms both; } `} `; RetryButton = styled(motion.button)` z-index: 5; appearance: none; position: absolute; right: 2px; bottom: 2px; padding: 0; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 16px; cursor: pointer; overflow: hidden; background: none; border: none; color: var(--pcm-body-background); transition: color 200ms ease; box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15); &:before { z-index: 3; content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 200ms ease; background: var(--pcm-body-color); } &:hover:before { opacity: 0.1; } `; RetryIconContainer = styled(motion.div)` position: absolute; inset: 0; &:before { z-index: 1; content: ''; position: absolute; inset: 3px; border-radius: 16px; background: conic-gradient(from 90deg, currentColor 10%, var(--pcm-accent-color) 80%); } svg { z-index: 2; display: block; position: relative; width: 100%; height: 100%; } `; StatusContainer = styled(motion.div)` position: relative; padding: 0; margin-top: 28px; scale: 0.95; opacity: 0; will-change: transform, height; color: var(--pcm-body-color); padding-bottom: 16px; div:first-child { font-weight: 500; margin-bottom: 10px; font-size: 16px; } span { color: var(--pcm-body-color-secondary); white-space: pre-wrap; font-size: 14px; } `; } }); export { ConnectingContainer, ConnectingAnimation, RetryButton, RetryIconContainer, StatusContainer, init_styles }; //# sourceMappingURL=chunk-75EHPGGI.mjs.map