fix: atoms issues (#26983)

* fix: missiing imports

* chore: add popover components for atoms

* chore: keep openapi spec up to date
This commit is contained in:
Rajiv Sahal authored and GitHub committed 2026-01-19 08:09:57 +00:00
1 parent 02530b86f3
commit adc4272545
4 files changed
+97 -6

No files matched your search

@@ -1,11 +1,10 @@
import type { Schedule } from "@calcom/lib/schedules/transformers/getScheduleListItemData";
import { useEffect, useRef } from "react";
import { Schedule } from "@calcom/lib/schedules/transformers/getTransformedSchedles";
export function useEnsureDefaultSchedule(
schedules: Schedule[],
onUpdateSchedule: (scheduleId: number) => void | Promise<void>
) {
): void {
const onUpdateRef = useRef(onUpdateSchedule);
useEffect(() => {
+1
View File
@@ -78,6 +78,7 @@
"types": "./dist/index.d.ts",
"dependencies": {
"@radix-ui/react-dialog-atoms": "npm:@radix-ui/[email protected]",
"@radix-ui/react-popover-atoms": "npm:@radix-ui/[email protected]",
"@radix-ui/react-slot": "1.1.2",
"@radix-ui/react-switch": "1.1.0",
"@radix-ui/react-toast": "1.1.5",
@@ -0,0 +1,31 @@
/*
In this file we can edit all the Primitives from radix-ui/react-popover
when building atoms package this will automatically replace the PopoverPrimitives used in components from all over the monorepo
ensuring that we don't have issues with atoms.
*/
import * as PopoverPrimitives from "@radix-ui/react-popover-atoms";
const Popover: typeof PopoverPrimitives.Root = PopoverPrimitives.Root;
const PopoverTrigger: typeof PopoverPrimitives.Trigger = PopoverPrimitives.Trigger;
const PopoverAnchor: typeof PopoverPrimitives.Anchor = PopoverPrimitives.Anchor;
const PopoverClose: typeof PopoverPrimitives.Close = PopoverPrimitives.Close;
const PopoverContent: typeof PopoverPrimitives.Content = PopoverPrimitives.Content;
const PopoverArrow: typeof PopoverPrimitives.Arrow = PopoverPrimitives.Arrow;
const PopoverPortal = ({ children, ...props }: PopoverPrimitives.PopoverPortalProps): JSX.Element => {
return (
<PopoverPrimitives.Portal {...props}>
<div className="calcom-atoms">{children}</div>
</PopoverPrimitives.Portal>
);
};
export const Root: typeof PopoverPrimitives.Root = Popover;
export const Trigger: typeof PopoverPrimitives.Trigger = PopoverTrigger;
export const Anchor: typeof PopoverPrimitives.Anchor = PopoverAnchor;
export const Close: typeof PopoverPrimitives.Close = PopoverClose;
export const Portal: typeof PopoverPortal = PopoverPortal;
export const Content: typeof PopoverPrimitives.Content = PopoverContent;
export const Arrow: typeof PopoverPrimitives.Arrow = PopoverArrow;
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose, PopoverPortal, PopoverArrow };