Skip to content

Commit ed74753

Browse files
committed
fixup! feat(react-headless-components-preview): scaffold the package and add first components (microsoft#35931)
1 parent 23b6841 commit ed74753

1 file changed

Lines changed: 130 additions & 0 deletions

File tree

packages/react-components/react-headless-components-preview/library/etc/react-headless-components-preview.api.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,16 @@ import type { BreadcrumbSlots as BreadcrumbSlots_2 } from '@fluentui/react-bread
4040
import type { ButtonBaseProps } from '@fluentui/react-button';
4141
import { ButtonBaseState } from '@fluentui/react-button';
4242
import type { ButtonSlots as ButtonSlots_2 } from '@fluentui/react-button';
43+
<<<<<<< HEAD
4344
import type { CheckboxBaseProps } from '@fluentui/react-checkbox';
4445
import { CheckboxBaseState } from '@fluentui/react-checkbox';
4546
import type { CheckboxSlots as CheckboxSlots_2 } from '@fluentui/react-checkbox';
4647
import { ComponentProps } from '@fluentui/react-utilities';
48+
||||||| parent of a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
49+
=======
50+
import type { ComponentProps } from '@fluentui/react-utilities';
51+
import type { ComponentState } from '@fluentui/react-utilities';
52+
>>>>>>> a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
4753
import { ContextSelector } from '@fluentui/react-context-selector';
4854
import type { DividerBaseProps } from '@fluentui/react-divider';
4955
import { DividerBaseState } from '@fluentui/react-divider';
@@ -57,6 +63,7 @@ import type { InputBaseProps } from '@fluentui/react-input';
5763
import { InputBaseState } from '@fluentui/react-input';
5864
import type { InputSlots as InputSlots_2 } from '@fluentui/react-input';
5965
import { JSXElement } from '@fluentui/react-utilities';
66+
<<<<<<< HEAD
6067
import type { LinkBaseProps } from '@fluentui/react-link';
6168
import { LinkBaseState } from '@fluentui/react-link';
6269
import type { LinkSlots as LinkSlots_2 } from '@fluentui/react-link';
@@ -121,6 +128,12 @@ import { TextareaBaseState } from '@fluentui/react-textarea';
121128
import type { TextareaSlots as TextareaSlots_2 } from '@fluentui/react-textarea';
122129
import type { ToggleButtonBaseProps } from '@fluentui/react-button';
123130
import type { ToggleButtonBaseState } from '@fluentui/react-button';
131+
||||||| parent of a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
132+
import type * as React_2 from 'react';
133+
=======
134+
import * as React_2 from 'react';
135+
import type { Slot } from '@fluentui/react-utilities';
136+
>>>>>>> a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
124137

125138
// @public
126139
export const Accordion: ForwardRefComponent<AccordionProps>;
@@ -461,6 +474,91 @@ export type RatingSlots = RatingSlots_2;
461474
// @public
462475
export type RatingState = RatingBaseState;
463476

477+
// @public
478+
export type OnOpenChangeData = {
479+
open: boolean;
480+
};
481+
482+
// @public
483+
export type OpenPopoverEvents = MouseEvent | TouchEvent | React_2.FocusEvent<HTMLElement> | React_2.KeyboardEvent<HTMLElement> | React_2.MouseEvent<HTMLElement>;
484+
485+
// @public
486+
export const Popover: React_2.FC<PopoverProps>;
487+
488+
// @public
489+
export type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'toggleOpen' | 'triggerRef' | 'contentRef' | 'arrowRef' | 'openOnHover' | 'openOnContext' | 'trapFocus' | 'withArrow' | 'inline'>;
490+
491+
// @public
492+
export type PopoverProps = {
493+
children: [React_2.ReactElement, React_2.ReactElement] | React_2.ReactElement;
494+
open?: boolean;
495+
defaultOpen?: boolean;
496+
onOpenChange?: (e: OpenPopoverEvents, data: OnOpenChangeData) => void;
497+
openOnHover?: boolean;
498+
openOnContext?: boolean;
499+
mouseLeaveDelay?: number;
500+
positioning?: PopoverPositioningProps;
501+
withArrow?: boolean;
502+
trapFocus?: boolean;
503+
disableAutoFocus?: boolean;
504+
closeOnScroll?: boolean;
505+
closeOnIframeFocus?: boolean;
506+
inline?: boolean;
507+
};
508+
509+
// @public
510+
export type PopoverState = Required<Pick<PopoverProps, 'open' | 'inline'>> & Pick<PopoverProps, 'onOpenChange' | 'openOnContext' | 'openOnHover' | 'trapFocus' | 'withArrow' | 'disableAutoFocus'> & {
511+
setOpen: (e: OpenPopoverEvents, open: boolean) => void;
512+
toggleOpen: (e: OpenPopoverEvents) => void;
513+
triggerRef: React_2.MutableRefObject<HTMLElement | null>;
514+
contentRef: React_2.MutableRefObject<HTMLElement | null>;
515+
arrowRef: React_2.MutableRefObject<HTMLDivElement | null>;
516+
popoverTrigger: React_2.ReactElement | undefined;
517+
popoverSurface: React_2.ReactElement | undefined;
518+
contextTarget: {
519+
x: number;
520+
y: number;
521+
} | undefined;
522+
setContextTarget: (target: {
523+
x: number;
524+
y: number;
525+
} | undefined) => void;
526+
};
527+
528+
// @public
529+
export const PopoverSurface: ForwardRefComponent<PopoverSurfaceProps>;
530+
531+
// @public
532+
export type PopoverSurfaceProps = ComponentProps<PopoverSurfaceSlots>;
533+
534+
// @public
535+
export type PopoverSurfaceSlots = {
536+
root: Slot<'div'>;
537+
};
538+
539+
// @public
540+
export type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & {
541+
inline: boolean;
542+
withArrow: boolean | undefined;
543+
arrowRef: React_2.MutableRefObject<HTMLDivElement | null>;
544+
'data-open': string;
545+
'data-placement': string;
546+
};
547+
548+
// @public
549+
export const PopoverTrigger: React_2.FC<PopoverTriggerProps>;
550+
551+
// @public
552+
export type PopoverTriggerProps = {
553+
children: React_2.ReactElement;
554+
disableButtonEnhancement?: boolean;
555+
};
556+
557+
// @public
558+
export type PopoverTriggerState = {
559+
children: React_2.ReactElement | null;
560+
};
561+
464562
// @public
465563
export const renderAccordion: (state: AccordionBaseState, contextValues: AccordionContextValues_2) => JSXElement;
466564

@@ -501,6 +599,7 @@ export const renderCheckbox: (state: CheckboxBaseState) => JSXElement;
501599
export const renderDivider: (state: DividerBaseState) => JSXElement;
502600

503601
// @public
602+
<<<<<<< HEAD
504603
export const renderField: (state: FieldBaseState, contextValues: FieldContextValues) => JSXElement;
505604

506605
// @public
@@ -755,6 +854,18 @@ export type ToggleButtonState = ToggleButtonBaseState & {
755854
'data-checked'?: string;
756855
};
757856
};
857+
||||||| parent of a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
858+
=======
859+
export const renderPopover: (state: PopoverState, contextValues: {
860+
popover: PopoverContextValue;
861+
}) => React_2.ReactElement;
862+
863+
// @public
864+
export const renderPopoverSurface: (state: PopoverSurfaceState) => React_2.ReactElement;
865+
866+
// @public
867+
export const renderPopoverTrigger: (state: PopoverTriggerState) => React_2.ReactElement | null;
868+
>>>>>>> a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
758869

759870
// @public
760871
export const useAccordion: (props: AccordionProps, ref: React_2.Ref<HTMLElement>) => AccordionState;
@@ -808,6 +919,7 @@ export const useCheckbox: (props: CheckboxProps, ref: React_2.Ref<HTMLInputEleme
808919
export const useDivider: (props: DividerProps, ref: React_2.Ref<HTMLElement>) => DividerState;
809920

810921
// @public
922+
<<<<<<< HEAD
811923
export const useField: (props: FieldProps, ref: React_2.Ref<HTMLDivElement>) => FieldState;
812924

813925
// @public
@@ -869,6 +981,24 @@ export const useTextarea: (props: TextareaProps, ref: React_2.Ref<HTMLTextAreaEl
869981

870982
// @public
871983
export const useToggleButton: (props: ToggleButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => ToggleButtonState;
984+
||||||| parent of a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
985+
=======
986+
export const usePopover: (props: PopoverProps, ref: React_2.Ref<HTMLElement>) => PopoverState;
987+
988+
// @public
989+
export const usePopoverContext: <T>(selector: ContextSelector<PopoverContextValue, T>) => T;
990+
991+
// @public
992+
export const usePopoverContextValues: (state: PopoverState) => {
993+
popover: PopoverContextValue;
994+
};
995+
996+
// @public
997+
export const usePopoverSurface: (props: PopoverSurfaceProps, ref: React_2.Ref<HTMLDivElement>) => PopoverSurfaceState;
998+
999+
// @public
1000+
export const usePopoverTrigger: (props: PopoverTriggerProps) => PopoverTriggerState;
1001+
>>>>>>> a6cea01d80 (fixup! feat(react-headless-components-preview): scaffold the package and add first components (#35931))
8721002

8731003
// (No @packageDocumentation comment for this package)
8741004

0 commit comments

Comments
 (0)