Skip to content

Commit 428202c

Browse files
fix: resolve stacking context issues in popup based components (#213)
Co-authored-by: iza <[email protected]>
1 parent 6cceb75 commit 428202c

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

apps/dashboard/components/layout/organization-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export function OrganizationSelector() {
218218
</DropdownMenuTrigger>
219219
<DropdownMenuContent
220220
align="start"
221-
className="z-110 w-72 rounded-none border-t-0 border-r border-l-0 bg-sidebar p-0"
221+
className="w-72 rounded-none border-t-0 border-r border-l-0 bg-sidebar p-0"
222222
sideOffset={0}
223223
>
224224
<DropdownMenuItem

apps/dashboard/components/ui/alert-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function AlertDialogOverlay({
3434
return (
3535
<AlertDialogPrimitive.Overlay
3636
className={cn(
37-
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[120] bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
37+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
3838
className
3939
)}
4040
data-slot="alert-dialog-overlay"
@@ -52,7 +52,7 @@ function AlertDialogContent({
5252
<AlertDialogOverlay />
5353
<AlertDialogPrimitive.Content
5454
className={cn(
55-
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[130] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg',
55+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg',
5656
className
5757
)}
5858
data-slot="alert-dialog-content"

apps/dashboard/components/ui/dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function DialogOverlay({
3737
return (
3838
<DialogPrimitive.Overlay
3939
className={cn(
40-
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[120] bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
40+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
4141
className
4242
)}
4343
data-slot="dialog-overlay"
@@ -59,7 +59,7 @@ function DialogContent({
5959
<DialogOverlay />
6060
<DialogPrimitive.Content
6161
className={cn(
62-
'data-[state=closed]:fade-out-0 overflow-hidden data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[130] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-5 rounded-lg border bg-card p-5 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg',
62+
'data-[state=closed]:fade-out-0 overflow-hidden data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-5 rounded-lg border bg-card p-5 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg',
6363
className
6464
)}
6565
data-slot="dialog-content"

apps/dashboard/components/ui/drawer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function DrawerOverlay({
3636
return (
3737
<DrawerPrimitive.Overlay
3838
className={cn(
39-
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-120 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
39+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
4040
className
4141
)}
4242
data-slot="drawer-overlay"
@@ -55,7 +55,7 @@ function DrawerContent({
5555
<DrawerOverlay />
5656
<DrawerPrimitive.Content
5757
className={cn(
58-
'group/drawer-content fixed z-130 flex h-auto flex-col bg-background',
58+
'group/drawer-content fixed z-50 flex h-auto flex-col bg-background',
5959
'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b',
6060
'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t',
6161
'data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm',

apps/dashboard/components/ui/sheet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function SheetOverlay({
3535
return (
3636
<SheetPrimitive.Overlay
3737
className={cn(
38-
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-110 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
38+
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in',
3939
className
4040
)}
4141
data-slot="sheet-overlay"
@@ -57,7 +57,7 @@ function SheetContent({
5757
<SheetOverlay />
5858
<SheetPrimitive.Content
5959
className={cn(
60-
'fixed z-110 flex flex-col gap-0 bg-card shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500',
60+
'fixed z-50 flex flex-col gap-0 bg-card shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500',
6161
side === 'right' &&
6262
'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 m-3 h-[calc(100%-1.5rem)] w-[calc(100%-1.5rem)] border p-0 sm:max-w-lg',
6363
side === 'left' &&

0 commit comments

Comments
 (0)