-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-headless-components-preview): add TeachingPopover #36205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mainframev
wants to merge
6
commits into
microsoft:master
Choose a base branch
from
mainframev:feat/headless-add-teaching-popover
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f7c2c3c
feat(react-headless-components-preview): add TeachingPopover component
mainframev f4f2049
docs: polish stories visually
mainframev b79d513
chore: address review comments
mainframev fc4e944
fix: address fixes after review
mainframev 8e5464b
chore: add bundle size stats
mainframev f08ed50
test: add e2e and unit tests
mainframev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-headless-components-preview-7c305eb6-2458-4126-b561-228475292c80.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "feat: add headless TeachingPopover composed on top of the headless Popover and the v9 react-teaching-popover base hooks", | ||
| "packageName": "@fluentui/react-headless-components-preview", | ||
| "email": "viktorgenaev@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
312 changes: 312 additions & 0 deletions
312
...omponents/react-headless-components-preview/library/etc/teaching-popover.api.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,312 @@ | ||
| ## API Report File for "@fluentui/react-headless-components-preview" | ||
|
|
||
| > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
|
|
||
| ```ts | ||
|
|
||
| import type { ARIAButtonType } from '@fluentui/react-aria'; | ||
| import type { ComponentProps } from '@fluentui/react-utilities'; | ||
| import type { ComponentState } from '@fluentui/react-utilities'; | ||
| import type { EventData } from '@fluentui/react-utilities'; | ||
| import type { EventHandler } from '@fluentui/react-utilities'; | ||
| import type { ForwardRefComponent } from '@fluentui/react-utilities'; | ||
| import type { JSXElement } from '@fluentui/react-utilities'; | ||
| import type { PopoverContextValue as PopoverContextValue_2 } from '@fluentui/react-popover'; | ||
| import type { PopoverTriggerChildProps } from '@fluentui/react-popover'; | ||
| import { PositioningShorthand } from '@fluentui/react-positioning'; | ||
| import * as React_2 from 'react'; | ||
| import { renderTeachingPopoverBody_unstable as renderTeachingPopoverBody } from '@fluentui/react-teaching-popover'; | ||
| import { renderTeachingPopoverCarouselCard_unstable as renderTeachingPopoverCarouselCard } from '@fluentui/react-teaching-popover'; | ||
| import { renderTeachingPopoverCarouselNav_unstable as renderTeachingPopoverCarouselNav } from '@fluentui/react-teaching-popover'; | ||
| import { renderTeachingPopoverCarouselPageCount_unstable as renderTeachingPopoverCarouselPageCount } from '@fluentui/react-teaching-popover'; | ||
| import type { Slot } from '@fluentui/react-utilities'; | ||
| import { TeachingPopoverBodyProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverBodySlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverBodyState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselCardProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselCardSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselCardState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselFooterButtonBaseProps as TeachingPopoverCarouselFooterButtonProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselFooterButtonSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselFooterButtonBaseState as TeachingPopoverCarouselFooterButtonState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselNavButtonBaseProps as TeachingPopoverCarouselNavButtonProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselNavButtonSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselNavButtonBaseState as TeachingPopoverCarouselNavButtonState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselNavBaseProps as TeachingPopoverCarouselNavProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselNavSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselNavBaseState as TeachingPopoverCarouselNavState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselPageCountProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselPageCountRenderFunction } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselPageCountSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselPageCountState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselBaseProps as TeachingPopoverCarouselProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverCarouselBaseState as TeachingPopoverCarouselState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverFooterBaseProps as TeachingPopoverFooterProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverFooterBaseState as TeachingPopoverFooterState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverHeaderBaseProps as TeachingPopoverHeaderProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverHeaderSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverHeaderBaseState as TeachingPopoverHeaderState } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverTitleBaseProps as TeachingPopoverTitleProps } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverTitleSlots } from '@fluentui/react-teaching-popover'; | ||
| import { TeachingPopoverTitleBaseState as TeachingPopoverTitleState } from '@fluentui/react-teaching-popover'; | ||
| import type { TriggerProps } from '@fluentui/react-utilities'; | ||
| import { useTeachingPopoverBody_unstable as useTeachingPopoverBody } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverCarouselBase_unstable as useTeachingPopoverCarousel } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverCarouselCard_unstable as useTeachingPopoverCarouselCard } from '@fluentui/react-teaching-popover'; | ||
| import type { useTeachingPopoverCarouselContextValues_unstable } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverCarouselFooterButtonBase_unstable as useTeachingPopoverCarouselFooterButton } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverCarouselNavBase_unstable as useTeachingPopoverCarouselNav } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverCarouselNavButtonBase_unstable as useTeachingPopoverCarouselNavButton } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverCarouselPageCount_unstable as useTeachingPopoverCarouselPageCount } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverFooterBase_unstable as useTeachingPopoverFooter } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverHeaderBase_unstable as useTeachingPopoverHeader } from '@fluentui/react-teaching-popover'; | ||
| import { useTeachingPopoverTitleBase_unstable as useTeachingPopoverTitle } from '@fluentui/react-teaching-popover'; | ||
|
|
||
| // @public | ||
| export type NavButtonRenderFunction = TeachingPopoverCarouselNavState['renderNavButton']; | ||
|
|
||
| // @public | ||
| export const renderTeachingPopover: (state: TeachingPopoverState, contextValues: TeachingPopoverContextValues) => React_2.ReactElement; | ||
|
|
||
| export { renderTeachingPopoverBody } | ||
|
|
||
| // @public (undocumented) | ||
| export const renderTeachingPopoverCarousel: (state: TeachingPopoverCarouselState, contextValues: TeachingPopoverCarouselContextValues) => JSXElement; | ||
|
|
||
| export { renderTeachingPopoverCarouselCard } | ||
|
|
||
| // @public (undocumented) | ||
| export const renderTeachingPopoverCarouselFooter: (state: TeachingPopoverCarouselFooterState) => JSXElement; | ||
|
|
||
| // @public (undocumented) | ||
| export const renderTeachingPopoverCarouselFooterButton: (state: TeachingPopoverCarouselFooterButtonState) => JSXElement; | ||
|
|
||
| export { renderTeachingPopoverCarouselNav } | ||
|
|
||
| // @public (undocumented) | ||
| export const renderTeachingPopoverCarouselNavButton: (state: TeachingPopoverCarouselNavButtonState) => JSXElement; | ||
|
|
||
| export { renderTeachingPopoverCarouselPageCount } | ||
|
|
||
| // @public | ||
| export const renderTeachingPopoverFooter: (state: TeachingPopoverFooterState) => JSXElement; | ||
|
|
||
| // @public (undocumented) | ||
| export const renderTeachingPopoverHeader: (state: TeachingPopoverHeaderState) => JSXElement; | ||
|
|
||
| // @public (undocumented) | ||
| export const renderTeachingPopoverSurface: (state: TeachingPopoverSurfaceState) => JSXElement; | ||
|
|
||
| // @public (undocumented) | ||
| export const renderTeachingPopoverTitle: (state: TeachingPopoverTitleState) => JSXElement; | ||
|
|
||
| // @public | ||
| export const renderTeachingPopoverTrigger: (state: TeachingPopoverTriggerState) => JSXElement | null; | ||
|
|
||
| // @public | ||
| export const TeachingPopover: { | ||
| (props: TeachingPopoverProps): JSXElement; | ||
| displayName: string; | ||
| }; | ||
|
|
||
| // @public | ||
| export type TeachingPopoverBaseBridgedContextValue = Pick<PopoverContextValue_2, 'open' | 'setOpen' | 'toggleOpen' | 'triggerRef' | 'contentRef' | 'arrowRef' | 'openOnHover' | 'openOnContext' | 'withArrow'>; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverBody: ForwardRefComponent<TeachingPopoverBodyProps>; | ||
|
|
||
| export { TeachingPopoverBodyProps } | ||
|
|
||
| export { TeachingPopoverBodySlots } | ||
|
|
||
| export { TeachingPopoverBodyState } | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverCarousel: ForwardRefComponent<TeachingPopoverCarouselProps>; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverCarouselCard: ForwardRefComponent<TeachingPopoverCarouselCardProps>; | ||
|
|
||
| export { TeachingPopoverCarouselCardProps } | ||
|
|
||
| export { TeachingPopoverCarouselCardSlots } | ||
|
|
||
| export { TeachingPopoverCarouselCardState } | ||
|
|
||
| // @public | ||
| export type TeachingPopoverCarouselContextValues = ReturnType<typeof useTeachingPopoverCarouselContextValues_unstable>; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverCarouselFooter: ForwardRefComponent<TeachingPopoverCarouselFooterProps>; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverCarouselFooterButton: ForwardRefComponent<TeachingPopoverCarouselFooterButtonProps>; | ||
|
|
||
| export { TeachingPopoverCarouselFooterButtonProps } | ||
|
|
||
| export { TeachingPopoverCarouselFooterButtonSlots } | ||
|
|
||
| export { TeachingPopoverCarouselFooterButtonState } | ||
|
|
||
| // @public (undocumented) | ||
| export type TeachingPopoverCarouselFooterProps = ComponentProps<TeachingPopoverCarouselFooterSlots>; | ||
|
|
||
| // @public (undocumented) | ||
| export type TeachingPopoverCarouselFooterSlots = { | ||
| root: NonNullable<Slot<'div'>>; | ||
| previous?: Slot<TeachingPopoverCarouselFooterButtonProps>; | ||
| next: NonNullable<Slot<TeachingPopoverCarouselFooterButtonProps>>; | ||
| }; | ||
|
|
||
| // @public (undocumented) | ||
| export type TeachingPopoverCarouselFooterState = ComponentState<TeachingPopoverCarouselFooterSlots>; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverCarouselNav: ForwardRefComponent<TeachingPopoverCarouselNavProps>; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverCarouselNavButton: ForwardRefComponent<TeachingPopoverCarouselNavButtonProps>; | ||
|
|
||
| export { TeachingPopoverCarouselNavButtonProps } | ||
|
|
||
| export { TeachingPopoverCarouselNavButtonSlots } | ||
|
|
||
| export { TeachingPopoverCarouselNavButtonState } | ||
|
|
||
| export { TeachingPopoverCarouselNavProps } | ||
|
|
||
| export { TeachingPopoverCarouselNavSlots } | ||
|
|
||
| export { TeachingPopoverCarouselNavState } | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverCarouselPageCount: ForwardRefComponent<TeachingPopoverCarouselPageCountProps>; | ||
|
|
||
| export { TeachingPopoverCarouselPageCountProps } | ||
|
|
||
| export { TeachingPopoverCarouselPageCountRenderFunction } | ||
|
|
||
| export { TeachingPopoverCarouselPageCountSlots } | ||
|
|
||
| export { TeachingPopoverCarouselPageCountState } | ||
|
|
||
| export { TeachingPopoverCarouselProps } | ||
|
|
||
| export { TeachingPopoverCarouselSlots } | ||
|
|
||
| export { TeachingPopoverCarouselState } | ||
|
|
||
| // @public (undocumented) | ||
| export type TeachingPopoverContextValues = { | ||
| popover: PopoverContextValue; | ||
| basePopover: TeachingPopoverBaseBridgedContextValue; | ||
| }; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverFooter: ForwardRefComponent<TeachingPopoverFooterProps>; | ||
|
|
||
| export { TeachingPopoverFooterProps } | ||
|
|
||
| export { TeachingPopoverFooterState } | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverHeader: ForwardRefComponent<TeachingPopoverHeaderProps>; | ||
|
|
||
| export { TeachingPopoverHeaderProps } | ||
|
|
||
| export { TeachingPopoverHeaderSlots } | ||
|
|
||
| export { TeachingPopoverHeaderState } | ||
|
|
||
| // @public | ||
| export type TeachingPopoverProps = PopoverProps; | ||
|
|
||
| // @public | ||
| export type TeachingPopoverState = PopoverState; | ||
|
|
||
| // @public | ||
| export const TeachingPopoverSurface: ForwardRefComponent<TeachingPopoverSurfaceProps>; | ||
|
|
||
| // @public (undocumented) | ||
| export type TeachingPopoverSurfaceProps = ComponentProps<TeachingPopoverSurfaceSlots>; | ||
|
|
||
| // @public | ||
| export type TeachingPopoverSurfaceSlots = { | ||
| root: Slot<'dialog'>; | ||
| }; | ||
|
|
||
| // @public (undocumented) | ||
| export type TeachingPopoverSurfaceState = ComponentState<TeachingPopoverSurfaceSlots> & { | ||
| withArrow: boolean | undefined; | ||
| arrowRef: React_2.RefObject<HTMLDivElement | null>; | ||
| 'data-open': string; | ||
| }; | ||
|
|
||
| // @public (undocumented) | ||
| export const TeachingPopoverTitle: ForwardRefComponent<TeachingPopoverTitleProps>; | ||
|
|
||
| export { TeachingPopoverTitleProps } | ||
|
|
||
| export { TeachingPopoverTitleSlots } | ||
|
|
||
| export { TeachingPopoverTitleState } | ||
|
|
||
| // @public | ||
| export const TeachingPopoverTrigger: React_2.FC<TeachingPopoverTriggerProps>; | ||
|
|
||
| // @public | ||
| export type TeachingPopoverTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType> = PopoverTriggerChildProps<Type, HeadlessPopoverTriggerChildExtras>; | ||
|
|
||
| // @public | ||
| export type TeachingPopoverTriggerProps = Omit<TriggerProps<TeachingPopoverTriggerChildProps>, 'children'> & { | ||
| children: React_2.ReactElement; | ||
| disableButtonEnhancement?: boolean; | ||
| }; | ||
|
|
||
| // @public | ||
| export type TeachingPopoverTriggerState = { | ||
| children: React_2.ReactElement | null; | ||
| }; | ||
|
|
||
| // @public | ||
| export const useTeachingPopover: (props: TeachingPopoverProps) => TeachingPopoverState; | ||
|
|
||
| export { useTeachingPopoverBody } | ||
|
|
||
| export { useTeachingPopoverCarousel } | ||
|
|
||
| export { useTeachingPopoverCarouselCard } | ||
|
|
||
| // @public (undocumented) | ||
| export const useTeachingPopoverCarouselContextValues: (state: TeachingPopoverCarouselState) => TeachingPopoverCarouselContextValues; | ||
|
|
||
| // @public (undocumented) | ||
| export const useTeachingPopoverCarouselFooter: (props: TeachingPopoverCarouselFooterProps, ref: React_2.Ref<HTMLDivElement>) => TeachingPopoverCarouselFooterState; | ||
|
|
||
| export { useTeachingPopoverCarouselFooterButton } | ||
|
|
||
| export { useTeachingPopoverCarouselNav } | ||
|
|
||
| export { useTeachingPopoverCarouselNavButton } | ||
|
|
||
| export { useTeachingPopoverCarouselPageCount } | ||
|
|
||
| // @public | ||
| export const useTeachingPopoverContextValues: (state: TeachingPopoverState) => TeachingPopoverContextValues; | ||
|
|
||
| export { useTeachingPopoverFooter } | ||
|
|
||
| export { useTeachingPopoverHeader } | ||
|
|
||
| // @public | ||
| export const useTeachingPopoverSurface: (props: TeachingPopoverSurfaceProps, ref: React_2.Ref<HTMLDialogElement>) => TeachingPopoverSurfaceState; | ||
|
|
||
| export { useTeachingPopoverTitle } | ||
|
|
||
| // @public | ||
| export const useTeachingPopoverTrigger: (props: TeachingPopoverTriggerProps) => TeachingPopoverTriggerState; | ||
|
|
||
| // (No @packageDocumentation comment for this package) | ||
|
|
||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.