UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

114 lines (100 loc) • 2.45 kB
.backdrop { position: fixed; inset: 0; min-height: 100dvh; background-color: rgb(0 0 0 / 0.5); transition: opacity var(--ac-transition-normal); touch-action: none; @supports (-webkit-touch-callout: none) { position: absolute; } &[data-starting-style], &[data-ending-style] { opacity: 0; } } .popup { box-sizing: border-box; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32rem; max-width: calc(100vw - 2rem); max-height: 85vh; overflow-y: auto; padding: var(--ac-space-6); border-radius: var(--ac-radius-lg); border: 1px solid var(--ac-border); background-color: var(--ac-background); color: var(--ac-foreground); box-shadow: 0 10px 30px -5px rgb(0 0 0 / 0.1), 0 4px 10px -5px rgb(0 0 0 / 0.04); transition: opacity var(--ac-transition-normal), transform var(--ac-transition-normal); touch-action: none; &[data-starting-style], &[data-ending-style] { opacity: 0; transform: translate(-50%, -50%) scale(0.95); } } .header { display: flex; flex-direction: column; gap: var(--ac-space-1); text-align: center; } @media (min-width: 640px) { .header { text-align: left; } } .footer { display: flex; flex-direction: column-reverse; gap: var(--ac-space-2); padding-top: var(--ac-space-4); } @media (min-width: 640px) { .footer { flex-direction: row; justify-content: flex-end; } } .title { font-size: var(--ac-text-lg); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; } .description { font-size: var(--ac-text-sm); color: var(--ac-muted-foreground); } .close { position: absolute; top: var(--ac-space-3); right: var(--ac-space-3); display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; padding: 0; border: none; border-radius: var(--ac-radius-xs); background: transparent; color: var(--ac-muted-foreground); cursor: pointer; transition: background-color var(--ac-transition-fast), color var(--ac-transition-fast); outline: none; @media (hover: hover) { &:hover { background-color: color-mix(in oklch, var(--ac-muted), transparent 50%); color: var(--ac-foreground); } } &:focus-visible { outline: 2px solid var(--ac-ring); outline-offset: -1px; } }