Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

1.4 KB
Raw Blame
.content {
  transform-origin: center center;
}

.content[data-state="open"] {
  animation: dialogContentIn 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.content[data-state="closed"] {
  animation: dialogContentOut 180ms cubic-bezier(0.4, 0, 1, 1) both;
}

/* A closing dialog must be inert: its handlers are stale (ConfirmDialog even
   freezes its last-open content), so e.g. a click landing on the fading
   confirm button must not fire. Disable pointer events on descendants only —
   the container keeps Radix's inline `pointer-events: auto`, which we rely on
   as a shield so clicks during the fade-out do not reach the page beneath. */
.content[data-state="closed"] * {
  pointer-events: none;
}

.overlay[data-state="open"] {
  animation: dialogOverlayIn 200ms ease-out both;
}

.overlay[data-state="closed"] {
  /* Same duration as the content exit: the overlay shields the rest of the
     viewport from clicks for as long as the closing content is visible. */
  animation: dialogOverlayOut 180ms ease-in both;
}

@keyframes dialogContentIn {
  0% {
    opacity: 0;
    scale: 0.95;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    scale: 1;
  }
}

@keyframes dialogContentOut {
  from {
    opacity: 1;
    scale: 1;
  }

  to {
    opacity: 0;
    scale: 0.95;
  }
}

@keyframes dialogOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes dialogOverlayOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}