leptos-captcha 0.3.0

Simple Captcha / PoW component for Leptos
Documentation
/* The outer captcha container */
.leptos-captcha {
    margin: .5rem 0;
    border-left: 5px solid hsl(0, 60%, 44%);
    line-height: 1;
    padding-left: .25rem;
    transition: border-left 250ms;
    color: #3f3f3f;
}

/* The outer captcha container in pending state */
.leptos-captcha[data-state="pending"] {
    border-left: 5px solid hsl(57, 60%, 44%);
}

/* The outer captcha container in verified state */
.leptos-captcha[data-state="verified"] {
    border-left: 5px solid hsl(113, 60%, 44%);
}

/* The label for the hidden input */
.leptos-captcha > label {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin: 0;
    padding: 0;
}

/* The icons in front and back */
.leptos-captcha .icon-front,
.leptos-captcha .icon-back {
    width: 1.5rem;
    opacity: .8;
    transition: color 250ms;
}

/* The icon in the back */
.leptos-captcha .icon-back {
    margin-bottom: -.25rem;
}

/* The icon in the back in verified state */
.leptos-captcha[data-state="verified"] .icon-back {
    color: hsl(113, 60%, 44%);
}

/* The inner text content */
.leptos-captcha .text {
    font-size: 1.1rem;
    font-weight: bold;
}

/* The inner text content in pending state */
.leptos-captcha .pending {
    color: hsl(57, 60%, 44%);
}

/* The inner text content in verified state */
.leptos-captcha .verified {
    color: hsl(113, 60%, 44%);
}

.spinner {
    display: inline-block;
    position: relative;
    width: 1.5rem;
    height: 1.5rem;
}

.spinner div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    margin: .125rem;
    border: .125rem solid #3f3f3f;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #3f3f3f transparent transparent transparent;
}

.spinner div:nth-child(1) {
    animation-delay: -0.45s;
}

.spinner div:nth-child(2) {
    animation-delay: -0.3s;
}

.spinner div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}