Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

@github-actions github-actions bot Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask.normal.chromium.png 5 Changed
vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 1098 Changed
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 1197 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 482 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 481 Changed
vr-tests-react-components/Charts-DonutChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 622 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 734 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 86 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 53 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 54 Changed

There were 1 duplicate changes discarded. Check the build logs for more information.

"type": "minor",
"comment": "feat: expose base hooks for Popover and PopoverSurface",
"packageName": "@fluentui/react-popover",
"email": "dmytrokirpa@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export type OpenPopoverEvents = MouseEvent | TouchEvent | React_2.FocusEvent<HTM
// @public
export const Popover: React_2.FC<PopoverProps>;

// @public (undocumented)
export type PopoverBaseProps = Omit<PopoverProps, 'appearance' | 'size'>;

// @public (undocumented)
export type PopoverBaseState = Omit<PopoverState, 'appearance' | 'components' | 'size' | 'surfaceMotion'>;

// @public
export type PopoverContextValue = Pick<PopoverState, 'open' | 'toggleOpen' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'withArrow' | 'arrowRef' | 'size' | 'appearance' | 'trapFocus' | 'inertTrapFocus' | 'inline'>;

Expand Down Expand Up @@ -86,6 +92,12 @@ export type PopoverState = ComponentState<InternalPopoverSlots> & Pick<PopoverPr
// @public
export const PopoverSurface: ForwardRefComponent<PopoverSurfaceProps>;

// @public (undocumented)
export type PopoverSurfaceBaseProps = PopoverSurfaceProps;

// @public (undocumented)
export type PopoverSurfaceBaseState = Omit<PopoverSurfaceState, 'appearance' | 'size'>;

// @public (undocumented)
export const popoverSurfaceClassNames: SlotClassNames<PopoverSurfaceSlots>;

Expand Down Expand Up @@ -128,20 +140,26 @@ export type PopoverTriggerState = {
export const renderPopover_unstable: (state: PopoverState) => JSXElement;

// @public
export const renderPopoverSurface_unstable: (state: PopoverSurfaceState) => JSXElement;
export const renderPopoverSurface_unstable: (state: PopoverSurfaceBaseState) => JSXElement;

// @public
export const renderPopoverTrigger_unstable: (state: PopoverTriggerState) => JSXElement | null;

// @public
export const usePopover_unstable: (props: PopoverProps) => PopoverState;

// @internal
export const usePopoverBase_unstable: (props: PopoverBaseProps) => PopoverBaseState;

// @public (undocumented)
export const usePopoverContext_unstable: <T>(selector: ContextSelector<PopoverContextValue, T>) => T;

// @public
export const usePopoverSurface_unstable: (props: PopoverSurfaceProps, ref: React_2.Ref<HTMLDivElement>) => PopoverSurfaceState;

// @internal
export const usePopoverSurfaceBase_unstable: (props: PopoverSurfaceBaseProps, ref: React_2.Ref<HTMLDivElement>) => PopoverSurfaceBaseState;

// @public
export const usePopoverSurfaceStyles_unstable: (state: PopoverSurfaceState) => PopoverSurfaceState;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import { assertSlots } from '@fluentui/react-utilities';
import type { JSXElement } from '@fluentui/react-utilities';
import { Portal } from '@fluentui/react-portal';
import type { PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface.types';
import type { PopoverSurfaceBaseState, PopoverSurfaceSlots } from './PopoverSurface.types';

/**
* Render the final JSX of PopoverSurface
*/
export const renderPopoverSurface_unstable = (state: PopoverSurfaceState): JSXElement => {
export const renderPopoverSurface_unstable = (state: PopoverSurfaceBaseState): JSXElement => {
assertSlots<PopoverSurfaceSlots>(state);

const surface = (
Expand Down
27 changes: 18 additions & 9 deletions packages/react-components/react-popover/library/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
export { Popover, renderPopover_unstable, usePopover_unstable } from './Popover';
export type { OnOpenChangeData, OpenPopoverEvents, PopoverProps, PopoverSize, PopoverState } from './Popover';
export { Popover, renderPopover_unstable, usePopover_unstable, usePopoverBase_unstable } from './Popover';
export type {
OnOpenChangeData,
OpenPopoverEvents,
PopoverProps,
PopoverSize,
PopoverState,
PopoverBaseProps,
PopoverBaseState,
} from './Popover';
export {
PopoverSurface,
arrowHeights,
popoverSurfaceClassNames,
renderPopoverSurface_unstable,
usePopoverSurfaceStyles_unstable,
usePopoverSurface_unstable,
usePopoverSurfaceBase_unstable,
} from './PopoverSurface';
export type {
PopoverSurfaceProps,
PopoverSurfaceSlots,
PopoverSurfaceState,
PopoverSurfaceBaseProps,
PopoverSurfaceBaseState,
} from './PopoverSurface';
export type { PopoverSurfaceProps, PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface';
export { PopoverProvider, usePopoverContext_unstable } from './popoverContext';
export type { PopoverContextValue } from './popoverContext';
export { PopoverTrigger, renderPopoverTrigger_unstable, usePopoverTrigger_unstable } from './PopoverTrigger';
export type { PopoverTriggerChildProps, PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger';

// Experimental APIs
// export type { PopoverBaseProps, PopoverBaseState } from './Popover';
// export { usePopoverBase_unstable } from './Popover';
// export type { PopoverSurfaceBaseProps, PopoverSurfaceBaseState } from './PopoverSurface';
// export { usePopoverSurfaceBase_unstable } from './PopoverSurface';
Loading