diff --git a/packages/ui/src/Button/index.tsx b/packages/ui/src/Button/index.tsx index 1851bf08c5..a211130375 100644 --- a/packages/ui/src/Button/index.tsx +++ b/packages/ui/src/Button/index.tsx @@ -179,6 +179,8 @@ export const Button = forwardRef( actionType = 'default', type = 'button', priority = 'primary', + // needed for the Radix's `asChild` prop to work correctly + // https://www.radix-ui.com/primitives/docs/guides/composition#composing-with-your-own-react-components ...props }, ref, @@ -187,6 +189,7 @@ export const Button = forwardRef( return ( ( ? theme.borderRadius.sm : theme.borderRadius.full } - {...props} > {IconComponent && ( diff --git a/packages/ui/src/DropdownMenu/checkbox-item.tsx b/packages/ui/src/DropdownMenu/CheckboxItem.tsx similarity index 100% rename from packages/ui/src/DropdownMenu/checkbox-item.tsx rename to packages/ui/src/DropdownMenu/CheckboxItem.tsx diff --git a/packages/ui/src/DropdownMenu/content.tsx b/packages/ui/src/DropdownMenu/Content.tsx similarity index 100% rename from packages/ui/src/DropdownMenu/content.tsx rename to packages/ui/src/DropdownMenu/Content.tsx diff --git a/packages/ui/src/DropdownMenu/item.tsx b/packages/ui/src/DropdownMenu/Item.tsx similarity index 100% rename from packages/ui/src/DropdownMenu/item.tsx rename to packages/ui/src/DropdownMenu/Item.tsx diff --git a/packages/ui/src/DropdownMenu/radio-group.tsx b/packages/ui/src/DropdownMenu/RadioGroup.tsx similarity index 100% rename from packages/ui/src/DropdownMenu/radio-group.tsx rename to packages/ui/src/DropdownMenu/RadioGroup.tsx diff --git a/packages/ui/src/DropdownMenu/radio-item.tsx b/packages/ui/src/DropdownMenu/RadioItem.tsx similarity index 100% rename from packages/ui/src/DropdownMenu/radio-item.tsx rename to packages/ui/src/DropdownMenu/RadioItem.tsx diff --git a/packages/ui/src/DropdownMenu/root.tsx b/packages/ui/src/DropdownMenu/Root.tsx similarity index 91% rename from packages/ui/src/DropdownMenu/root.tsx rename to packages/ui/src/DropdownMenu/Root.tsx index 1c2f12c3f4..d27a292fb7 100644 --- a/packages/ui/src/DropdownMenu/root.tsx +++ b/packages/ui/src/DropdownMenu/Root.tsx @@ -1,11 +1,11 @@ import { ReactNode } from 'react'; import { Root as RadixDropdownMenuRoot } from '@radix-ui/react-dropdown-menu'; -import { Trigger } from './trigger.tsx'; -import { Content } from './content.tsx'; -import { RadioGroup } from './radio-group.tsx'; -import { RadioItem } from './radio-item.tsx'; -import { CheckboxItem } from './checkbox-item.tsx'; -import { Item } from './item.tsx'; +import { Trigger } from './Trigger.tsx'; +import { Content } from './Content.tsx'; +import { RadioGroup } from './RadioGroup.tsx'; +import { RadioItem } from './RadioItem.tsx'; +import { CheckboxItem } from './CheckboxItem.tsx'; +import { Item } from './Item.tsx'; interface ControlledDropdownMenuProps { /** diff --git a/packages/ui/src/DropdownMenu/trigger.tsx b/packages/ui/src/DropdownMenu/Trigger.tsx similarity index 100% rename from packages/ui/src/DropdownMenu/trigger.tsx rename to packages/ui/src/DropdownMenu/Trigger.tsx diff --git a/packages/ui/src/DropdownMenu/index.tsx b/packages/ui/src/DropdownMenu/index.tsx index 877c2bbab3..d0959d4f1d 100644 --- a/packages/ui/src/DropdownMenu/index.tsx +++ b/packages/ui/src/DropdownMenu/index.tsx @@ -1,9 +1,9 @@ -export { DropdownMenu } from './root'; +export { DropdownMenu } from './Root.tsx'; -export type { DropdownMenuProps } from './root'; -export type { DropdownMenuTriggerProps } from './trigger'; -export type { DropdownMenuContentProps } from './content'; -export type { DropdownMenuRadioGroupProps } from './radio-group'; -export type { DropdownMenuRadioItemProps } from './radio-item'; -export type { DropdownMenuCheckboxItemProps } from './checkbox-item'; -export type { DropdownMenuItemProps } from './item'; +export type { DropdownMenuProps } from './Root.tsx'; +export type { DropdownMenuTriggerProps } from './Trigger.tsx'; +export type { DropdownMenuContentProps } from './Content.tsx'; +export type { DropdownMenuRadioGroupProps } from './RadioGroup.tsx'; +export type { DropdownMenuRadioItemProps } from './RadioItem.tsx'; +export type { DropdownMenuCheckboxItemProps } from './CheckboxItem.tsx'; +export type { DropdownMenuItemProps } from './Item.tsx'; diff --git a/packages/ui/src/utils/popover.ts b/packages/ui/src/utils/popover.ts index b71bba0907..7ec4cdf859 100644 --- a/packages/ui/src/utils/popover.ts +++ b/packages/ui/src/utils/popover.ts @@ -24,6 +24,6 @@ export const PopoverContent = styled.div` border-radius: ${props => props.theme.borderRadius.sm}; backdrop-filter: blur(${props => props.theme.blur.lg}); - transform-origin: var(--radix-tooltip-content-transform-origin); + transform-origin: var(--radix-popper-transform-origin); animation: ${scaleIn} 0.15s ease-out; `;