feat: add Surface, Link and Spinner components
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix; Vue state adapters. */
|
||||
|
||||
/* Base link styles */
|
||||
.hv-link {
|
||||
@apply relative inline-flex h-fit w-fit items-center rounded-xl font-medium text-link no-underline decoration-separator-tertiary decoration-[1.5px] underline-offset-4 no-highlight;
|
||||
|
||||
/**
|
||||
* Transitions
|
||||
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
||||
*/
|
||||
transition:
|
||||
color 100ms var(--ease-smooth),
|
||||
background-color 150ms var(--ease-smooth),
|
||||
box-shadow 150ms var(--ease-out),
|
||||
opacity 100ms var(--ease-out);
|
||||
@apply motion-reduce:transition-none;
|
||||
|
||||
/* Cursor */
|
||||
cursor: var(--cursor-interactive);
|
||||
|
||||
/* Hover state */
|
||||
@media (hover: hover) {
|
||||
&:hover,
|
||||
&[data-hovered="true"] {
|
||||
@apply underline decoration-muted/50;
|
||||
|
||||
.hv-link__icon {
|
||||
@apply opacity-100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Pressed state */
|
||||
&:active,
|
||||
&[data-pressed="true"] {
|
||||
@apply underline decoration-muted;
|
||||
|
||||
.hv-link__icon {
|
||||
@apply opacity-100;
|
||||
}
|
||||
}
|
||||
|
||||
/* Focus state */
|
||||
&:focus-visible:not([data-focused]),
|
||||
&[data-focus-visible="true"] {
|
||||
@apply status-focused;
|
||||
|
||||
.hv-link__icon {
|
||||
@apply opacity-100;
|
||||
}
|
||||
}
|
||||
|
||||
/* Disabled state */
|
||||
&[aria-disabled="true"] {
|
||||
@apply status-disabled;
|
||||
}
|
||||
|
||||
.hv-link__icon {
|
||||
@apply pointer-events-none inline-flex size-[0.75em] shrink-0 items-center justify-center text-current opacity-60;
|
||||
|
||||
/**
|
||||
* Transitions
|
||||
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
||||
*/
|
||||
transition: opacity 150ms var(--ease-out);
|
||||
@apply motion-reduce:transition-none;
|
||||
|
||||
& svg {
|
||||
@apply transform-gpu;
|
||||
}
|
||||
}
|
||||
|
||||
.hv-link__icon[data-default-icon="true"] {
|
||||
@apply ms-1 pb-1.5;
|
||||
}
|
||||
|
||||
/* Handle Link with Button Variants */
|
||||
&.hv-button {
|
||||
@apply gap-0 no-underline;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user