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