/* Adapted from HeroUI ce90ea3. Copyright 2025 NextUI Inc. * Apache-2.0; see third-party/HEROUI-LICENSE. hv- namespace and Vue/Reka adapters. */ /* Popover component styles */ /* Base popover styles */ .hv-popover { @apply origin-(--reka-popper-transform-origin) bg-overlay p-0 text-sm; border-radius: min(32px, var(--radius-3xl)); box-shadow: var(--overlay-shadow); /* React Aria supplies this constraint inline; Reka exposes the available size. */ max-height: var(--reka-popover-content-available-height); /* Entering animations */ &[data-entering="true"] { @apply animate-in duration-150 ease-smooth fade-in-0 zoom-in-90; /* Placement-specific translations */ &[data-side="top"] { @apply slide-in-from-bottom-1; } &[data-side="bottom"] { @apply slide-in-from-top-1; } &[data-side="left"] { @apply slide-in-from-right-1; } &[data-side="right"] { @apply slide-in-from-left-1; } } /* Exiting animations */ &[data-exiting="true"] { @apply animate-out duration-100 ease-smooth zoom-out-95 fade-out; /* Stays non-interactive while closing, even if the exit animation is interrupted. */ @apply pointer-events-none; } &[data-exiting="true"], &[data-entering="true"] { @apply transition-[opacity,transform] will-change-[opacity,transform]; } /* Arrow styling */ & [data-slot="popover-overlay-arrow"] { fill: var(--overlay); } } /* Popover dialog */ .hv-popover__dialog { @apply p-4 outline-none; /* Keep arrows outside the surface visible; scroll the dialog's content instead. */ max-height: inherit; overflow-y: auto; overscroll-behavior: contain; } /* Popover heading */ .hv-popover__heading { @apply font-medium; } /* Popover trigger */ .hv-popover__trigger { @apply inline-block; /** * Transitions * CRITICAL: motion-reduce must be AFTER transition for correct override specificity */ transition: color 150ms var(--ease-smooth), background-color 150ms var(--ease-smooth), box-shadow 150ms var(--ease-out); @apply motion-reduce:transition-none; cursor: var(--cursor-interactive); /* Focus state */ &:focus-visible:not([data-focused]), &[data-focus-visible="true"] { @apply status-focused; } /* Disabled state */ &:disabled, &[aria-disabled="true"] { @apply status-disabled; } } /* Reka owns an inline pointer-events rule; exiting surfaces must stay inactive. */ .hv-popover[data-exiting="true"] { pointer-events: none !important; } /* React Aria supplies this stacking level inline; Reka reads it from Content. */ .hv-popover { z-index: var(--z-index-overlay); } .hv-popover__trigger.hv-button { display: inline-flex; }