Files
supabase/packages/config/css/animations.css
T
Anthony Lio c145f3e046 fix(docs): guide nav collapsible parity (#49945)
## What kind of change does this PR introduce?

visual parity fix and refresh + component extraction (stacked on #49942)

## What is the current behavior?

guide and reference sidebars each hand-roll their own collapsible
section visuals

## What is the new behavior?

- adds `NavSection` composition components (`NavSectionCaret`,
`NavSectionContent`, `NavSectionList`) shared by both navs via radix
`asChild`, so the rail, caret, and motion have a single source of truth
- fixes ui drift between both so navs get the same left rail beside
expanded children, the same caret and animation
- enhances link click area so space between rows is part of the click
target

| state | preview |
| -------|------|
| before | <img width="430" height="288" alt="image"
src="https://github.com/user-attachments/assets/0052d4b7-7793-43cf-8416-2a5445b95148"
/> |
| after | <img width="430" height="288" alt="image"
src="https://github.com/user-attachments/assets/42713ee3-e147-4e53-a58d-3f3de278264d"
/> |

## How to test?

1. run `pnpm dev:docs`
2. open [guide
page](http://localhost:3001/docs/guides/integrations/build-a-supabase-oauth-integration)
3. open [reference
page](http://localhost:3001/docs/reference/dart/introduction)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added animated expand/collapse behavior and rotating caret indicators
to documentation navigation sections.
  * Added active-child indicators for clearer navigation context.

* **Improvements**
* Standardized spacing, borders, and animation styles across guide and
reference navigation.
* Improved collapsible animations to support varying content sizes more
reliably.
* Navigation items without links or child content, including disabled
nested items, are no longer displayed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-10 15:03:55 +03:00

308 lines
5.9 KiB
CSS

/*
* Tailwind v4 animation tokens + the @keyframes they reference.
*
* Each --animate-* token in @theme generates an `animate-{name}` utility.
* Keyframes live outside @theme since they're @-rules, not design tokens.
*
* Migrated from packages/config/ui.config.js (theme.extend.keyframes /
* theme.extend.animation) and packages/config/tailwind.config.js
* (theme.extend.keyframes / theme.extend.animation).
*/
@theme {
--animate-fade-in: fadeIn 300ms both;
--animate-fade-out: fadeOut 300ms both;
/* may be unused — verify before pruning */
--animate-dropdown-content-show: overlayContentShow 100ms cubic-bezier(0.16, 1, 0.3, 1);
/* may be unused — verify before pruning */
--animate-dropdown-content-hide: overlayContentHide 100ms cubic-bezier(0.16, 1, 0.3, 1);
--animate-overlay-show: overlayContentShow 300ms cubic-bezier(0.16, 1, 0.3, 1);
--animate-overlay-hide: overlayContentHide 300ms cubic-bezier(0.16, 1, 0.3, 1);
/* may be unused — verify before pruning */
--animate-fade-in-overlay-bg: fadeInOverlayBg 300ms;
/* may be unused — verify before pruning */
--animate-fade-out-overlay-bg: fadeOutOverlayBg 300ms;
--animate-slide-down: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
--animate-slide-up: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
--animate-slide-down-normal: slideDownNormal 300ms cubic-bezier(0.87, 0, 0.13, 1);
--animate-slide-up-normal: slideUpNormal 300ms cubic-bezier(0.87, 0, 0.13, 1);
/* may be unused — verify before pruning */
--animate-panel-slide-left-out: panelSlideLeftOut 200ms cubic-bezier(0.87, 0, 0.13, 1);
/* may be unused — verify before pruning */
--animate-panel-slide-left-in: panelSlideLeftIn 250ms cubic-bezier(0.87, 0, 0.13, 1);
/* may be unused — verify before pruning */
--animate-panel-slide-right-out: panelSlideRightOut 200ms cubic-bezier(0.87, 0, 0.13, 1);
/* may be unused — verify before pruning */
--animate-panel-slide-right-in: panelSlideRightIn 250ms cubic-bezier(0.87, 0, 0.13, 1);
--animate-line-loading: lineLoading 1.8s infinite;
--animate-line-loading-slower: lineLoading 2.3s infinite;
/* may be unused — verify before pruning */
--animate-dropdownFadeIn: dropdownFadeIn 0.1s ease-out;
/* may be unused — verify before pruning */
--animate-dropdownFadeOut: dropdownFadeOut 0.1s ease-out;
--animate-flash-code: flash-code 1s forwards;
--animate-flash-code-slow: flash-code 2s forwards;
--animate-accordion-down: accordion-down 0.15s ease-out;
--animate-accordion-up: accordion-up 0.15s ease-out;
--animate-collapsible-down: collapsible-down 0.1s ease-out;
--animate-collapsible-up: collapsible-up 0.1s ease-out;
}
@keyframes fadeIn {
0% {
transform: scale(0.95);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes fadeOut {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0.95);
opacity: 0;
}
}
@keyframes overlayContentShow {
0% {
opacity: 0;
transform: translate(0%, -2%) scale(1);
}
100% {
opacity: 1;
transform: translate(0%, 0%) scale(1);
}
}
@keyframes overlayContentHide {
0% {
opacity: 1;
transform: translate(0%, 0%) scale(1);
}
100% {
opacity: 0;
transform: translate(0%, -2%) scale(1);
}
}
@keyframes dropdownFadeIn {
0% {
transform: scale(0.95);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes dropdownFadeOut {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0.95);
opacity: 0;
}
}
@keyframes fadeInOverlayBg {
0% {
opacity: 0;
}
100% {
opacity: 0.75;
}
}
@keyframes fadeOutOverlayBg {
0% {
opacity: 0.75;
}
100% {
opacity: 0;
}
}
@keyframes slideDown {
0% {
height: 0;
opacity: 0;
}
100% {
height: var(--radix-accordion-content-height, var(--radix-collapsible-content-height));
opacity: 1;
}
}
@keyframes slideUp {
0% {
height: var(--radix-accordion-content-height, var(--radix-collapsible-content-height));
opacity: 1;
}
100% {
height: 0;
opacity: 0;
}
}
@keyframes slideDownNormal {
0% {
height: 0;
opacity: 0;
}
100% {
height: inherit;
opacity: 1;
}
}
@keyframes slideUpNormal {
0% {
height: inherit;
opacity: 1;
}
100% {
height: 0;
opacity: 0;
}
}
@keyframes panelSlideLeftOut {
0% {
transform: translateX(-100%);
opacity: 0;
}
100% {
transform: translateX(0);
opacity: 1;
}
}
@keyframes panelSlideLeftIn {
0% {
transform: translateX(0);
opacity: 1;
}
100% {
transform: translateX(-100%);
opacity: 0;
}
}
@keyframes panelSlideRightOut {
0% {
transform: translateX(100%);
opacity: 0;
}
100% {
transform: translateX(0);
opacity: 1;
}
}
@keyframes panelSlideRightIn {
0% {
transform: translateX(0);
opacity: 1;
}
100% {
transform: translateX(100%);
opacity: 0;
}
}
@keyframes lineLoading {
0% {
margin-left: -10%;
width: 80px;
}
25% {
width: 240px;
}
50% {
margin-left: 100%;
width: 80px;
}
75% {
width: 240px;
}
100% {
margin-left: -10%;
width: 80px;
}
}
@keyframes flash-code {
0% {
background-color: rgba(63, 207, 142, 0.1);
}
100% {
background-color: transparent;
}
}
@keyframes accordion-down {
from {
height: 0;
}
to {
height: var(--radix-accordion-content-height);
}
}
@keyframes accordion-up {
from {
height: var(--radix-accordion-content-height);
}
to {
height: 0;
}
}
@keyframes collapsible-down {
from {
height: 0;
}
to {
height: var(--radix-collapsible-content-height);
}
}
@keyframes collapsible-up {
from {
height: var(--radix-collapsible-content-height);
}
to {
height: 0;
}
}
@keyframes tw-shimmer {
from {
background-position: 100% 0;
}
to {
background-position: 0 0;
}
}