diff --git a/change/@fluentui-priority-overflow-2c844a3d-c7c4-463a-a01b-e6b6f99fc506.json b/change/@fluentui-priority-overflow-2c844a3d-c7c4-463a-a01b-e6b6f99fc506.json new file mode 100644 index 0000000000000..40ca589867aec --- /dev/null +++ b/change/@fluentui-priority-overflow-2c844a3d-c7c4-463a-a01b-e6b6f99fc506.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark internal APIs with @internal", + "packageName": "@fluentui/priority-overflow", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-aria-ccb225e9-c32b-4c60-96ae-319c57a16154.json b/change/@fluentui-react-aria-ccb225e9-c32b-4c60-96ae-319c57a16154.json new file mode 100644 index 0000000000000..89bb182957b60 --- /dev/null +++ b/change/@fluentui-react-aria-ccb225e9-c32b-4c60-96ae-319c57a16154.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark internal APIs with @internal", + "packageName": "@fluentui/react-aria", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-context-selector-50de2bb5-bc52-44e1-b7bf-d8b0a8d59ea0.json b/change/@fluentui-react-context-selector-50de2bb5-bc52-44e1-b7bf-d8b0a8d59ea0.json new file mode 100644 index 0000000000000..5f9213c73b47c --- /dev/null +++ b/change/@fluentui-react-context-selector-50de2bb5-bc52-44e1-b7bf-d8b0a8d59ea0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark teams-prg owned APIs with @internal", + "packageName": "@fluentui/react-context-selector", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-overflow-9da3c60d-8115-4fb0-b709-1320b2fdd9e0.json b/change/@fluentui-react-overflow-9da3c60d-8115-4fb0-b709-1320b2fdd9e0.json new file mode 100644 index 0000000000000..6dc211ec9344d --- /dev/null +++ b/change/@fluentui-react-overflow-9da3c60d-8115-4fb0-b709-1320b2fdd9e0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark teams-prg owned APIs with @internal", + "packageName": "@fluentui/react-overflow", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-positioning-6c6fc9bb-ff3e-4821-9604-7e8dbd2d8b4d.json b/change/@fluentui-react-positioning-6c6fc9bb-ff3e-4821-9604-7e8dbd2d8b4d.json new file mode 100644 index 0000000000000..784514ff2d75a --- /dev/null +++ b/change/@fluentui-react-positioning-6c6fc9bb-ff3e-4821-9604-7e8dbd2d8b4d.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark teams-prg owned APIs with @internal", + "packageName": "@fluentui/react-positioning", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-shared-contexts-c334fb19-85e5-4741-bca8-0b0008b52acf.json b/change/@fluentui-react-shared-contexts-c334fb19-85e5-4741-bca8-0b0008b52acf.json new file mode 100644 index 0000000000000..bfd5c15be3c57 --- /dev/null +++ b/change/@fluentui-react-shared-contexts-c334fb19-85e5-4741-bca8-0b0008b52acf.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark teams-prg owned APIs with @internal", + "packageName": "@fluentui/react-shared-contexts", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-tabster-5fad693e-af5b-47a2-b490-a471a95d69aa.json b/change/@fluentui-react-tabster-5fad693e-af5b-47a2-b490-a471a95d69aa.json new file mode 100644 index 0000000000000..1858c1ea77cca --- /dev/null +++ b/change/@fluentui-react-tabster-5fad693e-af5b-47a2-b490-a471a95d69aa.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark teams-prg owned APIs with @internal", + "packageName": "@fluentui/react-tabster", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-utilities-a47f1bfe-44a7-4967-834d-a9ca23064f2b.json b/change/@fluentui-react-utilities-a47f1bfe-44a7-4967-834d-a9ca23064f2b.json new file mode 100644 index 0000000000000..c12233a9d6b8d --- /dev/null +++ b/change/@fluentui-react-utilities-a47f1bfe-44a7-4967-834d-a9ca23064f2b.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Mark teams-prg owned APIs with @internal", + "packageName": "@fluentui/react-utilities", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/priority-overflow/etc/priority-overflow.api.md b/packages/react-components/priority-overflow/etc/priority-overflow.api.md index af7adf29ee841..c0511c2801bf2 100644 --- a/packages/react-components/priority-overflow/etc/priority-overflow.api.md +++ b/packages/react-components/priority-overflow/etc/priority-overflow.api.md @@ -3,17 +3,20 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -// @public (undocumented) + +// Warning: (ae-internal-missing-underscore) The name "createOverflowManager" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export function createOverflowManager(): OverflowManager; // @public (undocumented) export interface ObserveOptions { - minimumVisible?: number; - onUpdateItemVisibility: OnUpdateItemVisibility; - onUpdateOverflow: OnUpdateOverflow; - overflowAxis?: OverflowAxis; - overflowDirection?: OverflowDirection; - padding?: number; + minimumVisible?: number; + onUpdateItemVisibility: OnUpdateItemVisibility; + onUpdateOverflow: OnUpdateOverflow; + overflowAxis?: OverflowAxis; + overflowDirection?: OverflowDirection; + padding?: number; } // @public (undocumented) @@ -21,10 +24,10 @@ export type OnUpdateItemVisibility = (data: OnUpdateItemVisibilityPayload) => vo // @public (undocumented) export interface OnUpdateItemVisibilityPayload { - // (undocumented) - item: OverflowItemEntry; - // (undocumented) - visible: boolean; + // (undocumented) + item: OverflowItemEntry; + // (undocumented) + visible: boolean; } // @public @@ -38,12 +41,12 @@ export type OverflowDirection = 'start' | 'end'; // @public export interface OverflowEventPayload { - // (undocumented) - groupVisibility: Record; - // (undocumented) - invisibleItems: OverflowItemEntry[]; - // (undocumented) - visibleItems: OverflowItemEntry[]; + // (undocumented) + groupVisibility: Record; + // (undocumented) + invisibleItems: OverflowItemEntry[]; + // (undocumented) + visibleItems: OverflowItemEntry[]; } // @public (undocumented) @@ -51,22 +54,25 @@ export type OverflowGroupState = 'visible' | 'hidden' | 'overflow'; // @public (undocumented) export interface OverflowItemEntry { - element: HTMLElement; - // (undocumented) - groupId?: string; - id: string; - priority: number; + element: HTMLElement; + // (undocumented) + groupId?: string; + id: string; + priority: number; } -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "OverflowManager" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export interface OverflowManager { - addItem: (items: OverflowItemEntry) => void; - disconnect: () => void; - forceUpdate: () => void; - observe: (container: HTMLElement, options: ObserveOptions) => void; - removeItem: (itemId: string) => void; - update: () => void; + addItem: (items: OverflowItemEntry) => void; + disconnect: () => void; + forceUpdate: () => void; + observe: (container: HTMLElement, options: ObserveOptions) => void; + removeItem: (itemId: string) => void; + update: () => void; } // (No @packageDocumentation comment for this package) + ``` diff --git a/packages/react-components/priority-overflow/src/overflowManager.ts b/packages/react-components/priority-overflow/src/overflowManager.ts index e51462bf22e12..c853f914feaeb 100644 --- a/packages/react-components/priority-overflow/src/overflowManager.ts +++ b/packages/react-components/priority-overflow/src/overflowManager.ts @@ -3,6 +3,7 @@ import { createPriorityQueue } from './priorityQueue'; import type { OverflowGroupState, OverflowItemEntry, OverflowManager, ObserveOptions } from './types'; /** + * @internal * @returns overflow manager instance */ export function createOverflowManager(): OverflowManager { diff --git a/packages/react-components/priority-overflow/src/types.ts b/packages/react-components/priority-overflow/src/types.ts index 1071f3d11a2ef..f5c5f66d5f9c7 100644 --- a/packages/react-components/priority-overflow/src/types.ts +++ b/packages/react-components/priority-overflow/src/types.ts @@ -76,6 +76,9 @@ export interface ObserveOptions { onUpdateOverflow: OnUpdateOverflow; } +/** + * @internal + */ export interface OverflowManager { /** * Starts observing the container and managing the overflow state diff --git a/packages/react-components/react-aria/etc/react-aria.api.md b/packages/react-components/react-aria/etc/react-aria.api.md index 8b33888eab1df..322b892129bfb 100644 --- a/packages/react-components/react-aria/etc/react-aria.api.md +++ b/packages/react-components/react-aria/etc/react-aria.api.md @@ -14,7 +14,9 @@ export type ARIAButtonSlotProps = ExtractSlotProps> & { disabledFocusable?: boolean; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "mergeARIADisabled" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function mergeARIADisabled(shorthand: { 'aria-disabled'?: string | boolean; disabled?: boolean; diff --git a/packages/react-components/react-aria/src/utils/mergeARIADisabled.ts b/packages/react-components/react-aria/src/utils/mergeARIADisabled.ts index 33553254832c8..5fc9661187c10 100644 --- a/packages/react-components/react-aria/src/utils/mergeARIADisabled.ts +++ b/packages/react-components/react-aria/src/utils/mergeARIADisabled.ts @@ -1,4 +1,5 @@ /** + * @internal * Merges disabled declaration with `aria-disabled` */ export function mergeARIADisabled(shorthand: { 'aria-disabled'?: string | boolean; disabled?: boolean }) { diff --git a/packages/react-components/react-context-selector/etc/react-context-selector.api.md b/packages/react-components/react-context-selector/etc/react-context-selector.api.md index 05bf7b7e66716..e1993a52f0ac5 100644 --- a/packages/react-components/react-context-selector/etc/react-context-selector.api.md +++ b/packages/react-components/react-context-selector/etc/react-context-selector.api.md @@ -6,37 +6,53 @@ import * as React_2 from 'react'; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "Context" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type Context = React_2.Context & { Provider: React_2.FC>; Consumer: never; }; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "ContextSelector" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type ContextSelector = (value: Value) => SelectedValue; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "ContextValue" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type ContextValue = { listeners: ((payload: readonly [ContextVersion, Value]) => void)[]; value: React_2.MutableRefObject; version: React_2.MutableRefObject; }; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "ContextValues" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type ContextValues = ContextValue & { listeners: ((payload: readonly [ContextVersion, Record]) => void)[]; }; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "ContextVersion" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type ContextVersion = number; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "createContext" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export const createContext: (defaultValue: Value) => Context; -// @public +// Warning: (ae-internal-missing-underscore) The name "useContextSelector" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const useContextSelector: (context: Context, selector: ContextSelector) => SelectedValue; -// @public +// Warning: (ae-internal-missing-underscore) The name "useHasParentContext" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function useHasParentContext(context: Context): boolean; // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-context-selector/src/createContext.ts b/packages/react-components/react-context-selector/src/createContext.ts index bd6f911ea9946..d1f22abec54de 100644 --- a/packages/react-components/react-context-selector/src/createContext.ts +++ b/packages/react-components/react-context-selector/src/createContext.ts @@ -44,6 +44,9 @@ const createProvider = (Original: React.Provider>) => return (Provider as unknown) as React.Provider>; }; +/** + * @internal + */ export const createContext = (defaultValue: Value): Context => { const context = React.createContext>({ value: { current: defaultValue }, diff --git a/packages/react-components/react-context-selector/src/types.ts b/packages/react-components/react-context-selector/src/types.ts index 0a70692c56bb2..e2bdc05685702 100644 --- a/packages/react-components/react-context-selector/src/types.ts +++ b/packages/react-components/react-context-selector/src/types.ts @@ -1,14 +1,26 @@ import * as React from 'react'; +/** + * @internal + */ export type Context = React.Context & { Provider: React.FC>; Consumer: never; }; +/** + * @internal + */ export type ContextSelector = (value: Value) => SelectedValue; +/** + * @internal + */ export type ContextVersion = number; +/** + * @internal + */ export type ContextValue = { /** Holds a set of subscribers from components. */ listeners: ((payload: readonly [ContextVersion, Value]) => void)[]; @@ -20,6 +32,9 @@ export type ContextValue = { version: React.MutableRefObject; }; +/** + * @internal + */ export type ContextValues = ContextValue & { /** List of listners to publish changes */ listeners: ((payload: readonly [ContextVersion, Record]) => void)[]; diff --git a/packages/react-components/react-context-selector/src/useContextSelector.ts b/packages/react-components/react-context-selector/src/useContextSelector.ts index d1a872033e16e..4c2dea929d457 100644 --- a/packages/react-components/react-context-selector/src/useContextSelector.ts +++ b/packages/react-components/react-context-selector/src/useContextSelector.ts @@ -13,6 +13,7 @@ type ContextReducer = React.Reducer< >; /** + * @internal * This hook returns context selected value by selector. * It will only accept context created by `createContext`. * It will trigger re-render if only the selected value is referencially changed. diff --git a/packages/react-components/react-context-selector/src/useHasParentContext.ts b/packages/react-components/react-context-selector/src/useHasParentContext.ts index f1eb88bc04857..542ab81697848 100644 --- a/packages/react-components/react-context-selector/src/useHasParentContext.ts +++ b/packages/react-components/react-context-selector/src/useHasParentContext.ts @@ -2,6 +2,7 @@ import * as React from 'react'; import { Context, ContextValue } from './types'; /** + * @internal * Utility hook for contexts created by react-context-selector to determine if a parent context exists * WARNING: This hook will not work for native React contexts * diff --git a/packages/react-components/react-overflow/etc/react-overflow.api.md b/packages/react-components/react-overflow/etc/react-overflow.api.md index ff100624b706e..a93c73947eeee 100644 --- a/packages/react-components/react-overflow/etc/react-overflow.api.md +++ b/packages/react-components/react-overflow/etc/react-overflow.api.md @@ -5,7 +5,6 @@ ```ts import type { ObserveOptions } from '@fluentui/priority-overflow'; -import type { OnUpdateItemVisibility } from '@fluentui/priority-overflow'; import type { OnUpdateOverflow } from '@fluentui/priority-overflow'; import { OverflowGroupState } from '@fluentui/priority-overflow'; import type { OverflowItemEntry } from '@fluentui/priority-overflow'; @@ -41,19 +40,20 @@ export type OverflowProps = Partial(update: OnUpdateOverflow, options: Omit) => UseOverflowContainerReturn; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "UseOverflowContainerReturn" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export interface UseOverflowContainerReturn { containerRef: React_2.RefObject; registerItem: OverflowContextValue['registerItem']; @@ -63,7 +63,9 @@ export interface UseOverflowContainerReturn { // @public (undocumented) export const useOverflowCount: () => number; -// @public +// Warning: (ae-internal-missing-underscore) The name "useOverflowItem" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function useOverflowItem(id: string, priority?: number, groupId?: string): React_2.RefObject; // @public (undocumented) diff --git a/packages/react-components/react-overflow/src/index.ts b/packages/react-components/react-overflow/src/index.ts index e173e88a48127..46b1aee8a9904 100644 --- a/packages/react-components/react-overflow/src/index.ts +++ b/packages/react-components/react-overflow/src/index.ts @@ -4,7 +4,7 @@ export { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM, DATA_OVERFLOW_MENU } from './cons export type { UseOverflowContainerReturn } from './types'; export { useIsOverflowGroupVisible } from './useIsOverflowGroupVisible'; export { useIsOverflowItemVisible } from './useIsOverflowItemVisible'; -export { updateVisibilityAttribute, useOverflowContainer } from './useOverflowContainer'; +export { useOverflowContainer } from './useOverflowContainer'; export { useOverflowCount } from './useOverflowCount'; export { useOverflowItem } from './useOverflowItem'; export { useOverflowMenu } from './useOverflowMenu'; diff --git a/packages/react-components/react-overflow/src/types.ts b/packages/react-components/react-overflow/src/types.ts index b4e34b0b6d326..1b8698e72ae01 100644 --- a/packages/react-components/react-overflow/src/types.ts +++ b/packages/react-components/react-overflow/src/types.ts @@ -1,6 +1,9 @@ import * as React from 'react'; import { OverflowContextValue } from './overflowContext'; +/** + * @internal + */ export interface UseOverflowContainerReturn { /** * Ref to apply to the container that will overflow diff --git a/packages/react-components/react-overflow/src/useOverflowContainer.ts b/packages/react-components/react-overflow/src/useOverflowContainer.ts index 40845c414ff53..49172f9115563 100644 --- a/packages/react-components/react-overflow/src/useOverflowContainer.ts +++ b/packages/react-components/react-overflow/src/useOverflowContainer.ts @@ -1,6 +1,9 @@ import * as React from 'react'; import { createOverflowManager } from '@fluentui/priority-overflow'; +/** + * @internal + */ import type { OnUpdateItemVisibility, OnUpdateOverflow, @@ -13,7 +16,7 @@ import { UseOverflowContainerReturn } from './types'; import { DATA_OVERFLOWING, DATA_OVERFLOW_ITEM } from './constants'; /** - * + * @internal * @param update - Callback when overflow state changes * @param options - Options to configure the overflow container * @returns - ref to attach to an intrinsic HTML element and imperative functions diff --git a/packages/react-components/react-overflow/src/useOverflowItem.ts b/packages/react-components/react-overflow/src/useOverflowItem.ts index ae49784cc8a22..007a5b116343a 100644 --- a/packages/react-components/react-overflow/src/useOverflowItem.ts +++ b/packages/react-components/react-overflow/src/useOverflowItem.ts @@ -3,6 +3,7 @@ import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities'; import { useOverflowContext } from './overflowContext'; /** + * @internal * Registers an overflow item * @param id - unique identifier for the item used by the overflow manager * @param priority - higher priority means the item overflows later diff --git a/packages/react-components/react-positioning/etc/react-positioning.api.md b/packages/react-components/react-positioning/etc/react-positioning.api.md index cf9dc8c10758c..26d33702a4688 100644 --- a/packages/react-components/react-positioning/etc/react-positioning.api.md +++ b/packages/react-components/react-positioning/etc/react-positioning.api.md @@ -16,16 +16,22 @@ export type AutoSize = 'height' | 'height-always' | 'width' | 'width-always' | ' // @public (undocumented) export type Boundary = HTMLElement | Array | 'clippingParents' | 'scrollParent' | 'window'; -// @public +// Warning: (ae-internal-missing-underscore) The name "createArrowHeightStyles" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function createArrowHeightStyles(arrowHeight: number): { width: string; height: string; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "createArrowStyles" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function createArrowStyles(options: CreateArrowStylesOptions): GriffelStyle; -// @public +// Warning: (ae-internal-missing-underscore) The name "CreateArrowStylesOptions" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export type CreateArrowStylesOptions = { arrowHeight: number | undefined; borderWidth?: GriffelStyle['borderBottomWidth']; @@ -36,7 +42,9 @@ export type CreateArrowStylesOptions = { // @public export function createVirtualElementFromClick(nativeEvent: MouseEvent): PositioningVirtualElement; -// @public +// Warning: (ae-internal-missing-underscore) The name "mergeArrowOffset" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function mergeArrowOffset(userOffset: Offset | undefined | null, arrowHeight: number): Offset; // @public (undocumented) @@ -101,14 +109,18 @@ export type PositioningVirtualElement = { // @public (undocumented) export function resolvePositioningShorthand(shorthand: PositioningShorthand | undefined | null): Readonly; -// @public +// Warning: (ae-internal-missing-underscore) The name "usePositioning" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function usePositioning(options?: UsePopperOptions): { targetRef: React_2.MutableRefObject; containerRef: React_2.MutableRefObject; arrowRef: React_2.MutableRefObject; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "usePositioningMouseTarget" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const usePositioningMouseTarget: (initialState?: PositioningVirtualElement | (() => PositioningVirtualElement) | undefined) => readonly [PositioningVirtualElement | undefined, (event: React_2.MouseEvent | MouseEvent | undefined | null) => void]; // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-positioning/src/createArrowStyles.ts b/packages/react-components/react-positioning/src/createArrowStyles.ts index 68122059dbfb1..d91b14cc7e2ce 100644 --- a/packages/react-components/react-positioning/src/createArrowStyles.ts +++ b/packages/react-components/react-positioning/src/createArrowStyles.ts @@ -3,6 +3,7 @@ import { tokens } from '@fluentui/react-theme'; import type { GriffelStyle } from '@griffel/react'; /** + * @internal * Options parameter for the createArrowStyles function */ export type CreateArrowStylesOptions = { @@ -37,6 +38,7 @@ export type CreateArrowStylesOptions = { }; /** + * @internal * Helper that creates a makeStyles rule for an arrow element. * For runtime arrow size toggling simply create extra classnames to apply to the arrow element * @@ -113,6 +115,7 @@ export function createArrowStyles(options: CreateArrowStylesOptions): GriffelSty } /** + * @internal * Creates CSS styles to size the arrow created by createArrowStyles to the given height. * * Use this when you need to create classes for several different arrow sizes. If you only need a diff --git a/packages/react-components/react-positioning/src/usePositioning.ts b/packages/react-components/react-positioning/src/usePositioning.ts index 2648e4f764f7b..6204f48e12cdc 100644 --- a/packages/react-components/react-positioning/src/usePositioning.ts +++ b/packages/react-components/react-positioning/src/usePositioning.ts @@ -278,6 +278,7 @@ function usePopperOptions(options: PositioningOptions, popperOriginalPositionRef } /** + * @internal * Exposes Popper positioning API via React hook. Contains few important differences between an official "react-popper" * package: * - style attributes are applied directly on DOM to avoid re-renders diff --git a/packages/react-components/react-positioning/src/usePositioningMouseTarget.ts b/packages/react-components/react-positioning/src/usePositioningMouseTarget.ts index 049186f3cc451..38ca692b33de4 100644 --- a/packages/react-components/react-positioning/src/usePositioningMouseTarget.ts +++ b/packages/react-components/react-positioning/src/usePositioningMouseTarget.ts @@ -3,6 +3,7 @@ import { createVirtualElementFromClick } from './createVirtualElementFromClick'; import { PositioningVirtualElement } from './types'; /** + * @internal * A state hook that manages a popper virtual element from mouseevents. * Useful for scenarios where a component needs to be positioned by mouse click (e.g. contextmenu) * React synthetic events are not persisted by this hook diff --git a/packages/react-components/react-positioning/src/utils/mergeArrowOffset.ts b/packages/react-components/react-positioning/src/utils/mergeArrowOffset.ts index 351b1295b74e4..d19998b624078 100644 --- a/packages/react-components/react-positioning/src/utils/mergeArrowOffset.ts +++ b/packages/react-components/react-positioning/src/utils/mergeArrowOffset.ts @@ -1,6 +1,7 @@ import type { Offset, OffsetObject } from '../types'; /** + * @internal * Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the * height of the arrow. A simple utility to merge a provided offset with an arrow height to return the final offset * diff --git a/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md b/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md index 7d438e777c2ea..16bcb2f1dc99b 100644 --- a/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md +++ b/packages/react-components/react-shared-contexts/etc/react-shared-contexts.api.md @@ -7,7 +7,9 @@ import * as React_2 from 'react'; import type { Theme } from '@fluentui/react-theme'; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "Provider_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export const Provider_unstable: React_2.Provider; // @public (undocumented) @@ -22,32 +24,46 @@ export type ThemeClassNameContextValue_unstable = string; // @public (undocumented) export const ThemeClassNameProvider_unstable: React_2.Provider; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "ThemeContext_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export const ThemeContext_unstable: React_2.Context; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "ThemeContextValue_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type ThemeContextValue_unstable = Theme | Partial | undefined; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "ThemeProvider_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export const ThemeProvider_unstable: React_2.Provider; -// @public +// Warning: (ae-internal-missing-underscore) The name "TooltipVisibilityContextValue_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export type TooltipVisibilityContextValue_unstable = { visibleTooltip?: { hide: () => void; }; }; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "TooltipVisibilityProvider_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export const TooltipVisibilityProvider_unstable: React_2.Provider; // @public (undocumented) export function useFluent_unstable(): ProviderContextValue_unstable; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "useThemeClassName_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export function useThemeClassName_unstable(): ThemeClassNameContextValue_unstable; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "useTooltipVisibility_unstable" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export function useTooltipVisibility_unstable(): TooltipVisibilityContextValue_unstable; // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-shared-contexts/src/ProviderContext/ProviderContext.ts b/packages/react-components/react-shared-contexts/src/ProviderContext/ProviderContext.ts index 7b3a2dbc24ab1..67e005c6061c0 100644 --- a/packages/react-components/react-shared-contexts/src/ProviderContext/ProviderContext.ts +++ b/packages/react-components/react-shared-contexts/src/ProviderContext/ProviderContext.ts @@ -8,12 +8,18 @@ export type ProviderContextValue = { targetDocument?: Document; }; +/** + * @internal + */ const ProviderContext = React.createContext({ targetDocument: typeof document === 'object' ? document : undefined, dir: 'ltr', }); -export const { Provider } = ProviderContext; +/** + * @internal + */ +export const Provider = ProviderContext.Provider; export function useFluent(): ProviderContextValue { return React.useContext(ProviderContext); diff --git a/packages/react-components/react-shared-contexts/src/ThemeClassNameContext/ThemeClassNameContext.ts b/packages/react-components/react-shared-contexts/src/ThemeClassNameContext/ThemeClassNameContext.ts index c704df172de38..94f64e0780e3d 100644 --- a/packages/react-components/react-shared-contexts/src/ThemeClassNameContext/ThemeClassNameContext.ts +++ b/packages/react-components/react-shared-contexts/src/ThemeClassNameContext/ThemeClassNameContext.ts @@ -3,15 +3,17 @@ import * as React from 'react'; export type ThemeClassNameContextValue = string; /** + * @internal * Used to provide a CSS class that applies theme css variables * * Useful for elements in the React tree (can read context) but not in the DOM Tree. E.g. Portals */ const ThemeClassNameContext = React.createContext(''); -export const { Provider: ThemeClassNameProvider } = ThemeClassNameContext; +export const ThemeClassNameProvider = ThemeClassNameContext.Provider; /** + * @internal * @returns CSS class that applies css variables */ export function useThemeClassName(): ThemeClassNameContextValue { diff --git a/packages/react-components/react-shared-contexts/src/ThemeContext/ThemeContext.ts b/packages/react-components/react-shared-contexts/src/ThemeContext/ThemeContext.ts index c5030de85a000..36c650d037ac4 100644 --- a/packages/react-components/react-shared-contexts/src/ThemeContext/ThemeContext.ts +++ b/packages/react-components/react-shared-contexts/src/ThemeContext/ThemeContext.ts @@ -1,8 +1,17 @@ import * as React from 'react'; import type { Theme } from '@fluentui/react-theme'; +/** + * @internal + */ export type ThemeContextValue = Theme | Partial | undefined; +/** + * @internal + */ export const ThemeContext = React.createContext(undefined); -export const { Provider: ThemeProvider } = ThemeContext; +/** + * @internal + */ +export const ThemeProvider = ThemeContext.Provider; diff --git a/packages/react-components/react-shared-contexts/src/TooltipVisibilityContext/TooltipContext.ts b/packages/react-components/react-shared-contexts/src/TooltipVisibilityContext/TooltipContext.ts index 8892ba2ed8187..429a1f1be0399 100644 --- a/packages/react-components/react-shared-contexts/src/TooltipVisibilityContext/TooltipContext.ts +++ b/packages/react-components/react-shared-contexts/src/TooltipVisibilityContext/TooltipContext.ts @@ -1,6 +1,7 @@ import * as React from 'react'; /** + * @internal * The context provided by TooltipProvider */ export type TooltipVisibilityContextValue = { @@ -14,12 +15,19 @@ export type TooltipVisibilityContextValue = { }; /** + * @internal * Context shared by all of the tooltips in the app */ const TooltipVisibilityContext = React.createContext({}); -export const { Provider: TooltipVisibilityProvider } = TooltipVisibilityContext; +/** + * @internal + */ +export const TooltipVisibilityProvider = TooltipVisibilityContext.Provider; +/** + * @internal + */ export function useTooltipVisibility(): TooltipVisibilityContextValue { return React.useContext(TooltipVisibilityContext); } diff --git a/packages/react-components/react-tabster/etc/react-tabster.api.md b/packages/react-components/react-tabster/etc/react-tabster.api.md index 7dca55159a335..1f764fc6a28ad 100644 --- a/packages/react-components/react-tabster/etc/react-tabster.api.md +++ b/packages/react-components/react-tabster/etc/react-tabster.api.md @@ -80,7 +80,9 @@ export interface UseModalAttributesOptions { trapFocus?: boolean; } -// @public +// Warning: (ae-internal-missing-underscore) The name "useTabsterAttributes" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const useTabsterAttributes: (props: Types.TabsterAttributeProps) => Types.TabsterDOMAttribute; // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-tabster/src/hooks/useTabsterAttributes.ts b/packages/react-components/react-tabster/src/hooks/useTabsterAttributes.ts index 46eb3c9161a0a..8e17cf083e9eb 100644 --- a/packages/react-components/react-tabster/src/hooks/useTabsterAttributes.ts +++ b/packages/react-components/react-tabster/src/hooks/useTabsterAttributes.ts @@ -2,6 +2,7 @@ import { getTabsterAttribute, Types as TabsterTypes } from 'tabster'; import { useTabster } from './useTabster'; /** + * @internal * Hook that returns tabster attributes while ensuring tabster exists */ export const useTabsterAttributes = (props: TabsterTypes.TabsterAttributeProps): TabsterTypes.TabsterDOMAttribute => { diff --git a/packages/react-components/react-utilities/etc/react-utilities.api.md b/packages/react-components/react-utilities/etc/react-utilities.api.md index 6f6a649df47e9..5700ec55fc60e 100644 --- a/packages/react-components/react-utilities/etc/react-utilities.api.md +++ b/packages/react-components/react-utilities/etc/react-utilities.api.md @@ -7,13 +7,17 @@ import { DispatchWithoutAction } from 'react'; import * as React_2 from 'react'; -// @public +// Warning: (ae-internal-missing-underscore) The name "applyTriggerPropsToChildren" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const applyTriggerPropsToChildren: (children: React_2.ReactElement> | ((props: TTriggerProps) => React_2.ReactElement | null) | null | undefined, triggerProps: TTriggerProps) => React_2.ReactElement | null; // @public export function canUseDOM(): boolean; -// @public +// Warning: (ae-internal-missing-underscore) The name "clamp" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const clamp: (value: number, min: number, max: number) => number; // @public @@ -31,7 +35,9 @@ export type ComponentState = { // @public export type ExtractSlotProps = Exclude; -// @public +// Warning: (ae-internal-missing-underscore) The name "FluentTriggerComponent" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export type FluentTriggerComponent = { isFluentTriggerComponent?: boolean; }; @@ -55,7 +61,9 @@ export const getPartitionedNativeProps: ; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "getRTLSafeKey" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const getRTLSafeKey: (key: string, dir: 'ltr' | 'rtl') => string; // @public @@ -64,12 +72,16 @@ export function getSlots(state: ComponentState): { slotProps: ObjectSlotProps; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "getTriggerChild" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const getTriggerChild:

(children: React_2.ReactNode) => React_2.ReactElement> & { ref?: React_2.Ref | undefined; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "RefObjectFunction" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export type RefObjectFunction = React_2.RefObject & ((value: T) => void); // @public @@ -90,7 +102,9 @@ export type ResolveShorthandOptions = { defaultProps?: Props; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "shouldPreventDefaultOnKeyDown" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function shouldPreventDefaultOnKeyDown(e: KeyboardEvent | React_2.KeyboardEvent): boolean; // @public @@ -124,41 +138,59 @@ export type SlotShorthandValue = React_2.ReactChild | React_2.ReactNodeArray | R // @public export const SSRProvider: React_2.FC; -// @public +// Warning: (ae-internal-missing-underscore) The name "useControllableState" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const useControllableState: (options: UseControllableStateOptions) => [State, React_2.Dispatch>]; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "UseControllableStateOptions" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type UseControllableStateOptions = { defaultState?: State | (() => State); state: State | undefined; initialState: State; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "useEventCallback" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const useEventCallback: (fn: (...args: Args) => Return) => (...args: Args) => Return; -// @public +// Warning: (ae-internal-missing-underscore) The name "useFirstMount" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function useFirstMount(): boolean; -// @public +// Warning: (ae-internal-missing-underscore) The name "useForceUpdate" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function useForceUpdate(): DispatchWithoutAction; // @public export function useId(prefix?: string, providedId?: string): string; -// @public +// Warning: (ae-internal-missing-underscore) The name "useIsomorphicLayoutEffect" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const useIsomorphicLayoutEffect: typeof React_2.useEffect; // @public export function useIsSSR(): boolean; -// @public +// Warning: (ae-internal-missing-underscore) The name "useMergedEventCallbacks" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function useMergedEventCallbacks(callback1: ((...args: Args) => void) | undefined, callback2: ((...args: Args) => void) | undefined): (...args: Args) => void; -// @public +// Warning: (ae-internal-missing-underscore) The name "useMergedRefs" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function useMergedRefs(...refs: (React_2.Ref | undefined)[]): RefObjectFunction; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "UseOnClickOrScrollOutsideOptions" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export type UseOnClickOrScrollOutsideOptions = { element: Document | undefined; refs: React_2.MutableRefObject[]; @@ -167,16 +199,24 @@ export type UseOnClickOrScrollOutsideOptions = { callback: (ev: MouseEvent | TouchEvent) => void; }; -// @public +// Warning: (ae-internal-missing-underscore) The name "useOnClickOutside" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const useOnClickOutside: (options: UseOnClickOrScrollOutsideOptions) => void; -// @public +// Warning: (ae-internal-missing-underscore) The name "useOnScrollOutside" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export const useOnScrollOutside: (options: UseOnClickOrScrollOutsideOptions) => void; -// @public (undocumented) +// Warning: (ae-internal-missing-underscore) The name "usePrevious" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) export const usePrevious: (value: ValueType) => ValueType | null; -// @public +// Warning: (ae-internal-missing-underscore) The name "useTimeout" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal export function useTimeout(): readonly [(fn: () => void, delay: number) => void, () => void]; // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-utilities/src/hooks/useControllableState.ts b/packages/react-components/react-utilities/src/hooks/useControllableState.ts index 283a6de253b83..3cb467a3cbdcd 100644 --- a/packages/react-components/react-utilities/src/hooks/useControllableState.ts +++ b/packages/react-components/react-utilities/src/hooks/useControllableState.ts @@ -1,5 +1,8 @@ import * as React from 'react'; +/** + * @internal + */ export type UseControllableStateOptions = { /** * User-provided default state or initializer, for uncontrolled usage. @@ -21,6 +24,8 @@ function isFactoryDispatch(newState: React.SetStateAction): newSta } /** + * @internal + * * A `useState`-like hook to manage a value that could be either controlled or uncontrolled, * such as a checked state or text input string. * diff --git a/packages/react-components/react-utilities/src/hooks/useEventCallback.ts b/packages/react-components/react-utilities/src/hooks/useEventCallback.ts index 4ea7143b414e3..b52d1d4ddb872 100644 --- a/packages/react-components/react-utilities/src/hooks/useEventCallback.ts +++ b/packages/react-components/react-utilities/src/hooks/useEventCallback.ts @@ -2,6 +2,7 @@ import * as React from 'react'; import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'; /** + * @internal * https://reactjs.org/docs/hooks-faq.html#how-to-read-an-often-changing-value-from-usecallback * * Modified `useCallback` that can be used when dependencies change too frequently. Can occur when diff --git a/packages/react-components/react-utilities/src/hooks/useFirstMount.ts b/packages/react-components/react-utilities/src/hooks/useFirstMount.ts index 3bcd21475247d..0c046529894d5 100644 --- a/packages/react-components/react-utilities/src/hooks/useFirstMount.ts +++ b/packages/react-components/react-utilities/src/hooks/useFirstMount.ts @@ -1,6 +1,7 @@ import * as React from 'react'; /** + * @internal * Checks if components was mounted the first time. * Since concurrent mode will be released in the future this needs to be verified * Currently (React 17) will always render the initial mount once diff --git a/packages/react-components/react-utilities/src/hooks/useForceUpdate.ts b/packages/react-components/react-utilities/src/hooks/useForceUpdate.ts index f5d3530a54623..e7d279701c3d7 100644 --- a/packages/react-components/react-utilities/src/hooks/useForceUpdate.ts +++ b/packages/react-components/react-utilities/src/hooks/useForceUpdate.ts @@ -1,6 +1,7 @@ import { useReducer } from 'react'; /** + * @internal * Forces a re-render, similar to `forceUpdate` in class components. */ export function useForceUpdate() { diff --git a/packages/react-components/react-utilities/src/hooks/useId.ts b/packages/react-components/react-utilities/src/hooks/useId.ts index c6416adb779f6..8f403fd362c2b 100644 --- a/packages/react-components/react-utilities/src/hooks/useId.ts +++ b/packages/react-components/react-utilities/src/hooks/useId.ts @@ -3,8 +3,6 @@ import { defaultSSRContextValue, useSSRContext } from '../ssr/index'; /** * Resets generated IDs, should be used only in tests. - * - * @private */ export function resetIdsForTests(): void { defaultSSRContextValue.current = 0; diff --git a/packages/react-components/react-utilities/src/hooks/useIsomorphicLayoutEffect.ts b/packages/react-components/react-utilities/src/hooks/useIsomorphicLayoutEffect.ts index 7c8a42b8b3196..03a58dbcc4662 100644 --- a/packages/react-components/react-utilities/src/hooks/useIsomorphicLayoutEffect.ts +++ b/packages/react-components/react-utilities/src/hooks/useIsomorphicLayoutEffect.ts @@ -2,6 +2,7 @@ import * as React from 'react'; import { canUseDOM } from '../ssr/index'; /** + * @internal * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally * useEffect on the server (no-op) and useLayoutEffect in the browser. We occasionally need useLayoutEffect to * ensure we don't get a render flash for certain operations, but we may also need affected components to render on diff --git a/packages/react-components/react-utilities/src/hooks/useMergedEventCallbacks.ts b/packages/react-components/react-utilities/src/hooks/useMergedEventCallbacks.ts index 9fbffd3387742..799fd5e57f217 100644 --- a/packages/react-components/react-utilities/src/hooks/useMergedEventCallbacks.ts +++ b/packages/react-components/react-utilities/src/hooks/useMergedEventCallbacks.ts @@ -1,6 +1,7 @@ import { useEventCallback } from './useEventCallback'; /** + * @internal * Combine two event callbacks into a single callback function that calls each one in order. * * This is useful to add an event listener to an existing element without overwriting the current listener, if any. diff --git a/packages/react-components/react-utilities/src/hooks/useMergedRefs.ts b/packages/react-components/react-utilities/src/hooks/useMergedRefs.ts index 11464490c17df..699ec119603fd 100644 --- a/packages/react-components/react-utilities/src/hooks/useMergedRefs.ts +++ b/packages/react-components/react-utilities/src/hooks/useMergedRefs.ts @@ -1,12 +1,14 @@ import * as React from 'react'; /** + * @internal * A Ref function which can be treated like a ref object in that it has an attached * current property, which will be updated as the ref is evaluated. */ export type RefObjectFunction = React.RefObject & ((value: T) => void); /** + * @internal * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that * updates all provided refs * @param refs - Refs to collectively update with one ref value. diff --git a/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts b/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts index c841decdda47f..5201703dc5a87 100644 --- a/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts +++ b/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts @@ -1,6 +1,9 @@ import * as React from 'react'; import { useEventCallback } from './useEventCallback'; +/** + * @internal + */ export type UseOnClickOrScrollOutsideOptions = { /** * The element to listen for the click event @@ -30,6 +33,7 @@ export type UseOnClickOrScrollOutsideOptions = { }; /** + * @internal * Utility to perform checks where a click/touch event was made outside a component */ export const useOnClickOutside = (options: UseOnClickOrScrollOutsideOptions) => { diff --git a/packages/react-components/react-utilities/src/hooks/useOnScrollOutside.ts b/packages/react-components/react-utilities/src/hooks/useOnScrollOutside.ts index 4a38e992cf61a..a1fb3ac20ccad 100644 --- a/packages/react-components/react-utilities/src/hooks/useOnScrollOutside.ts +++ b/packages/react-components/react-utilities/src/hooks/useOnScrollOutside.ts @@ -3,6 +3,7 @@ import { useEventCallback } from './useEventCallback'; import type { UseOnClickOrScrollOutsideOptions } from './useOnClickOutside'; /** + * @internal * Utility to perform checks where a click/touch event was made outside a component */ export const useOnScrollOutside = (options: UseOnClickOrScrollOutsideOptions) => { diff --git a/packages/react-components/react-utilities/src/hooks/usePrevious.ts b/packages/react-components/react-utilities/src/hooks/usePrevious.ts index 4805d4a9a7ad1..0ffe4d6cd8fdd 100644 --- a/packages/react-components/react-utilities/src/hooks/usePrevious.ts +++ b/packages/react-components/react-utilities/src/hooks/usePrevious.ts @@ -1,5 +1,8 @@ import * as React from 'react'; +/** + * @internal + */ export const usePrevious = (value: ValueType) => { const ref = React.useRef(null); React.useEffect(() => { diff --git a/packages/react-components/react-utilities/src/hooks/useTimeout.ts b/packages/react-components/react-utilities/src/hooks/useTimeout.ts index d23eac6ce09d2..250c64fdf9b9d 100644 --- a/packages/react-components/react-utilities/src/hooks/useTimeout.ts +++ b/packages/react-components/react-utilities/src/hooks/useTimeout.ts @@ -1,6 +1,7 @@ import * as React from 'react'; /** + * @internal * Helper to manage a browser timeout. * Ensures that the timeout isn't set multiple times at once, * and is cleaned up when the component is unloaded. diff --git a/packages/react-components/react-utilities/src/trigger/applyTriggerPropsToChildren.ts b/packages/react-components/react-utilities/src/trigger/applyTriggerPropsToChildren.ts index cb63665cba84c..977860994be08 100644 --- a/packages/react-components/react-utilities/src/trigger/applyTriggerPropsToChildren.ts +++ b/packages/react-components/react-utilities/src/trigger/applyTriggerPropsToChildren.ts @@ -2,6 +2,7 @@ import * as React from 'react'; import { isFluentTrigger } from './isFluentTrigger'; /** + * @internal * Apply the trigger props to the children, either by calling the render function, or cloning with the new props. */ export const applyTriggerPropsToChildren = ( diff --git a/packages/react-components/react-utilities/src/trigger/getTriggerChild.ts b/packages/react-components/react-utilities/src/trigger/getTriggerChild.ts index 3d0dbe78cb5ce..0778ad4f7ab99 100644 --- a/packages/react-components/react-utilities/src/trigger/getTriggerChild.ts +++ b/packages/react-components/react-utilities/src/trigger/getTriggerChild.ts @@ -2,6 +2,7 @@ import * as React from 'react'; import { isFluentTrigger } from './isFluentTrigger'; /** + * @internal * Gets the trigger element of a FluentTriggerComponent (such as Tooltip or MenuTrigger). * * In the case where the immediate child is itself a FluentTriggerComponent and/or React Fragment, diff --git a/packages/react-components/react-utilities/src/trigger/types.ts b/packages/react-components/react-utilities/src/trigger/types.ts index 0b2754de88332..734644e788379 100644 --- a/packages/react-components/react-utilities/src/trigger/types.ts +++ b/packages/react-components/react-utilities/src/trigger/types.ts @@ -1,4 +1,5 @@ /** + * @internal * Allows a component to be tagged as a FluentUI trigger component. * * Triggers are special-case components: they attach event listeners and other props on their child, diff --git a/packages/react-components/react-utilities/src/utils/clamp.ts b/packages/react-components/react-utilities/src/utils/clamp.ts index 1f883838410b8..c444472cc9ba7 100644 --- a/packages/react-components/react-utilities/src/utils/clamp.ts +++ b/packages/react-components/react-utilities/src/utils/clamp.ts @@ -1,4 +1,5 @@ /** + * @internal * Clamps `value` to a number between the min and max. * * @param value - the value to be clamped diff --git a/packages/react-components/react-utilities/src/utils/getRTLSafeKey.ts b/packages/react-components/react-utilities/src/utils/getRTLSafeKey.ts index 50ddeed1a03c5..2e6ac70e2d15b 100644 --- a/packages/react-components/react-utilities/src/utils/getRTLSafeKey.ts +++ b/packages/react-components/react-utilities/src/utils/getRTLSafeKey.ts @@ -1,4 +1,5 @@ /** + * @internal * Finds and swaps a provided key for it's right to left format. */ export const getRTLSafeKey = (key: string, dir: 'ltr' | 'rtl') => { diff --git a/packages/react-components/react-utilities/src/utils/shouldPreventDefaultOnKeyDown.ts b/packages/react-components/react-utilities/src/utils/shouldPreventDefaultOnKeyDown.ts index 6e17b3bcae955..617434a2d11f8 100644 --- a/packages/react-components/react-utilities/src/utils/shouldPreventDefaultOnKeyDown.ts +++ b/packages/react-components/react-utilities/src/utils/shouldPreventDefaultOnKeyDown.ts @@ -2,6 +2,7 @@ import { Space, Enter } from '@fluentui/keyboard-keys'; import * as React from 'react'; /** + * @internal * Checks if the keyboard event should preventDefault() for Enter and Spacebar keys * * Useful for situations where a keydown needs to be transformed to a click event