| ... | @@ -85,7 +85,7 @@ export function ComposerBannerStack({ className, items }: ComposerBannerStackPro | ... | @@ -85,7 +85,7 @@ export function ComposerBannerStack({ className, items }: ComposerBannerStackPro |
| 85 | <div className={cn("group/banner-stack mx-auto mb-2 max-w-3xl", className)}> | 85 | <div className={cn("group/banner-stack mx-auto mb-2 max-w-3xl", className)}> |
| 86 | <div | 86 | <div |
| 87 | className={cn( | 87 | className={cn( |
| 88 | "relative", | 88 | "relative flex flex-col-reverse", |
| 89 | hasStack ? "group-hover/banner-stack:z-50 group-focus-within/banner-stack:z-50" : null, | 89 | hasStack ? "group-hover/banner-stack:z-50 group-focus-within/banner-stack:z-50" : null, |
| 90 | )} | 90 | )} |
| 91 | > | 91 | > |
| ... | @@ -119,30 +119,39 @@ export function ComposerBannerStack({ className, items }: ComposerBannerStackPro | ... | @@ -119,30 +119,39 @@ export function ComposerBannerStack({ className, items }: ComposerBannerStackPro |
| 119 | </div> | 119 | </div> |
| 120 | {hasStack ? ( | 120 | {hasStack ? ( |
| 121 | <div | 121 | <div |
| | 122 | data-composer-banner-stack-expanded-items="true" |
| 122 | className={cn( | 123 | className={cn( |
| 123 | "pointer-events-none absolute inset-x-0 bottom-[calc(100%+0.5rem)] z-20 space-y-2 opacity-0", | 124 | "relative z-20 grid grid-rows-[0fr] transition-[grid-template-rows] duration-150 ease-out", |
| 124 | "transition-[opacity,transform] duration-150 ease-out", | 125 | "group-hover/banner-stack:grid-rows-[1fr] group-focus-within/banner-stack:grid-rows-[1fr]", |
| 125 | "translate-y-1 transform-gpu will-change-[opacity,transform]", | | |
| 126 | "group-hover/banner-stack:pointer-events-auto group-hover/banner-stack:translate-y-0 group-hover/banner-stack:opacity-100", | | |
| 127 | "group-focus-within/banner-stack:pointer-events-auto group-focus-within/banner-stack:translate-y-0 group-focus-within/banner-stack:opacity-100", | | |
| 128 | )} | 126 | )} |
| 129 | > | 127 | > |
| 130 | {stackedItems.map((item) => ( | 128 | <div className="min-h-0 overflow-hidden"> |
| 131 | <div | 129 | <div |
| 132 | key={item.id} | 130 | className={cn( |
| 133 | className={cn(exitingItemId === item.id ? "pointer-events-none" : null)} | 131 | "invisible pointer-events-none space-y-2 pb-2 opacity-0", |
| 134 | style={{ | 132 | "translate-y-1 transform-gpu transition-[opacity,transform] duration-150 ease-out will-change-[opacity,transform]", |
| 135 | ...exitTransitionStyle, | 133 | "group-hover/banner-stack:visible group-hover/banner-stack:pointer-events-auto group-hover/banner-stack:translate-y-0 group-hover/banner-stack:opacity-100", |
| 136 | ...(exitingItemId === item.id ? stackedExitStyle : restingStyle), | 134 | "group-focus-within/banner-stack:visible group-focus-within/banner-stack:pointer-events-auto group-focus-within/banner-stack:translate-y-0 group-focus-within/banner-stack:opacity-100", |
| 137 | }} | 135 | )} |
| 138 | > | 136 | > |
| 139 | <ComposerBannerStackAlert | 137 | {stackedItems.map((item) => ( |
| 140 | item={item} | 138 | <div |
| 141 | exiting={exitingItemId === item.id} | 139 | key={item.id} |
| 142 | onDismissRequest={() => requestDismiss(item)} | 140 | className={cn(exitingItemId === item.id ? "pointer-events-none" : null)} |
| 143 | /> | 141 | style={{ |
| | 142 | ...exitTransitionStyle, |
| | 143 | ...(exitingItemId === item.id ? stackedExitStyle : restingStyle), |
| | 144 | }} |
| | 145 | > |
| | 146 | <ComposerBannerStackAlert |
| | 147 | item={item} |
| | 148 | exiting={exitingItemId === item.id} |
| | 149 | onDismissRequest={() => requestDismiss(item)} |
| | 150 | /> |
| | 151 | </div> |
| | 152 | ))} |
| 144 | </div> | 153 | </div> |
| 145 | ))} | 154 | </div> |
| 146 | </div> | 155 | </div> |
| 147 | ) : null} | 156 | ) : null} |
| 148 | </div> | 157 | </div> |