Skip to content

Commit 4901573

Browse files
chore: fix conflicts
1 parent 80fa562 commit 4901573

2 files changed

Lines changed: 19 additions & 16 deletions

File tree

apps/sim/components/emcn/components/popover/popover.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,18 @@ const STYLES = {
118118
default: {
119119
active: 'bg-[var(--border-1)] text-[var(--text-primary)] [&_svg]:text-[var(--text-primary)]',
120120
hover:
121-
'hover:bg-[var(--border-1)] hover:text-[var(--text-primary)] hover:[&_svg]:text-[var(--text-primary)]',
121+
'hover-hover:bg-[var(--border-1)] hover-hover:text-[var(--text-primary)] hover-hover:[&_svg]:text-[var(--text-primary)]',
122122
},
123123
secondary: {
124124
active: 'bg-[var(--brand-secondary)] text-white [&_svg]:text-white',
125-
hover: 'hover:bg-[var(--brand-secondary)] hover:text-white hover:[&_svg]:text-white',
125+
hover:
126+
'hover-hover:bg-[var(--brand-secondary)] hover-hover:text-white hover-hover:[&_svg]:text-white',
126127
},
127128
inverted: {
128129
active:
129130
'bg-[#363636] text-white [&_svg]:text-white dark:bg-[var(--surface-5)] dark:text-[var(--text-primary)] dark:[&_svg]:text-[var(--text-primary)]',
130131
hover:
131-
'hover:bg-[#363636] hover:text-white hover:[&_svg]:text-white dark:hover:bg-[var(--surface-5)] dark:hover:text-[var(--text-primary)] dark:hover:[&_svg]:text-[var(--text-primary)]',
132+
'hover-hover:bg-[#363636] hover-hover:text-white hover-hover:[&_svg]:text-white dark:hover-hover:bg-[var(--surface-5)] dark:hover-hover:text-[var(--text-primary)] dark:hover-hover:[&_svg]:text-[var(--text-primary)]',
132133
},
133134
},
134135
} as const
@@ -606,7 +607,7 @@ const PopoverContent = React.forwardRef<
606607
onCloseAutoFocus={handleCloseAutoFocus}
607608
{...restProps}
608609
className={cn(
609-
'z-[10000200] flex flex-col outline-none will-change-transform',
610+
'z-[var(--z-popover)] flex flex-col outline-none will-change-transform',
610611
showArrow ? 'overflow-visible' : 'overflow-auto',
611612
STYLES.colorScheme[colorScheme].content,
612613
STYLES.content,
@@ -629,13 +630,7 @@ const PopoverContent = React.forwardRef<
629630
...style,
630631
}}
631632
>
632-
{showArrow ? (
633-
<div data-popover-scroll className='min-h-0 flex-1 overflow-auto'>
634-
{children}
635-
</div>
636-
) : (
637-
children
638-
)}
633+
{children}
639634
{showArrow && (
640635
<PopoverPrimitive.Arrow width={14} height={7} asChild>
641636
<svg
@@ -791,7 +786,7 @@ const PopoverItem = React.forwardRef<HTMLDivElement, PopoverItemProps>(
791786
STYLES.colorScheme[colorScheme].text,
792787
STYLES.size[size].item,
793788
getItemStateClasses(variant, colorScheme, !!isActive),
794-
suppressHover && 'hover:!bg-transparent',
789+
suppressHover && 'hover-hover:!bg-transparent',
795790
disabled && 'pointer-events-none cursor-not-allowed opacity-50',
796791
className
797792
)}
@@ -985,7 +980,7 @@ const PopoverFolder = React.forwardRef<HTMLDivElement, PopoverFolderProps>(
985980
STYLES.colorScheme[colorScheme].text,
986981
STYLES.size[size].item,
987982
getItemStateClasses(variant, colorScheme, isActive || isHoverOpen),
988-
suppressHover && 'hover:!bg-transparent',
983+
suppressHover && 'hover-hover:!bg-transparent',
989984
className
990985
)}
991986
role='menuitem'
@@ -1007,7 +1002,7 @@ const PopoverFolder = React.forwardRef<HTMLDivElement, PopoverFolderProps>(
10071002
createPortal(
10081003
<DismissableLayerBranch
10091004
className={cn(
1010-
'fixed z-[10000201] min-w-[120px]',
1005+
'fixed z-[calc(var(--z-popover)+1)] min-w-[120px]',
10111006
STYLES.content,
10121007
STYLES.colorScheme[colorScheme].content,
10131008
'shadow-lg'
@@ -1208,4 +1203,4 @@ export {
12081203
usePopoverContext,
12091204
}
12101205

1211-
export type { PopoverSize, PopoverColorScheme }
1206+
export type { PopoverSize, PopoverColorScheme }

apps/sim/tailwind.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,13 @@ export default {
201201
},
202202
},
203203
},
204-
plugins: [require('tailwindcss-animate'), require('@tailwindcss/typography')],
204+
plugins: [
205+
require('tailwindcss-animate'),
206+
require('@tailwindcss/typography'),
207+
require('tailwindcss/plugin')(
208+
({ addVariant }: { addVariant: (name: string, definition: string) => void }) => {
209+
addVariant('hover-hover', '@media (hover: hover) and (pointer: fine)')
210+
}
211+
),
212+
],
205213
} satisfies Config

0 commit comments

Comments
 (0)