From 58c270935e42a57b7add0b848c9021e3fe07e2b7 Mon Sep 17 00:00:00 2001 From: Humberto Makoto Morimoto Burgos Date: Wed, 8 Jan 2025 16:56:05 -0800 Subject: [PATCH 01/10] chore: Updating FluentProvider types to avoid implicit import in API definition. --- .../library/etc/react-provider.api.md | 163 +----------------- .../FluentProvider/FluentProvider.tsx | 6 +- .../FluentProvider/useFluentProvider.ts | 2 +- 3 files changed, 11 insertions(+), 160 deletions(-) diff --git a/packages/react-components/react-provider/library/etc/react-provider.api.md b/packages/react-components/react-provider/library/etc/react-provider.api.md index e7e94b84cad4f2..95c2f646ae9ee8 100644 --- a/packages/react-components/react-provider/library/etc/react-provider.api.md +++ b/packages/react-components/react-provider/library/etc/react-provider.api.md @@ -4,17 +4,17 @@ ```ts -import { ComponentProps } from '@fluentui/react-utilities'; +import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; import type { CustomStyleHooksContextValue_unstable } from '@fluentui/react-shared-contexts'; +import { ForwardRefComponent } from '@fluentui/react-utilities'; import type { IconDirectionContextValue } from '@fluentui/react-icons/lib/providers'; -import { OverridesContextValue_unstable } from '@fluentui/react-shared-contexts'; +import type { OverridesContextValue_unstable } from '@fluentui/react-shared-contexts'; import type { PartialTheme } from '@fluentui/react-theme'; import type { ProviderContextValue_unstable } from '@fluentui/react-shared-contexts'; import * as React_2 from 'react'; import type { Slot } from '@fluentui/react-utilities'; import { SlotClassNames } from '@fluentui/react-utilities'; -import { Theme } from '@fluentui/tokens'; import type { ThemeClassNameContextValue_unstable } from '@fluentui/react-shared-contexts'; import type { ThemeContextValue_unstable } from '@fluentui/react-shared-contexts'; import type { TooltipVisibilityContextValue_unstable } from '@fluentui/react-shared-contexts'; @@ -23,160 +23,7 @@ import type { TooltipVisibilityContextValue_unstable } from '@fluentui/react-sha export function createCSSRuleFromTheme(selector: string, theme: PartialTheme | undefined): string; // @public (undocumented) -export const FluentProvider: React_2.ForwardRefExoticComponent, "dir"> & { - applyStylesToPortals?: boolean | undefined; - customStyleHooks_unstable?: Partial<{ - useAccordionHeaderStyles_unstable: (state: unknown) => void; - useAccordionItemStyles_unstable: (state: unknown) => void; - useAccordionPanelStyles_unstable: (state: unknown) => void; - useAccordionStyles_unstable: (state: unknown) => void; - useAvatarStyles_unstable: (state: unknown) => void; - useAvatarGroupStyles_unstable: (state: unknown) => void; - useAvatarGroupItemStyles_unstable: (state: unknown) => void; - useAvatarGroupPopoverStyles_unstable: (state: unknown) => void; - useBadgeStyles_unstable: (state: unknown) => void; - useCounterBadgeStyles_unstable: (state: unknown) => void; - useCardHeaderStyles_unstable: (state: unknown) => void; - useCardStyles_unstable: (state: unknown) => void; - useCardFooterStyles_unstable: (state: unknown) => void; - useCardPreviewStyles_unstable: (state: unknown) => void; - usePresenceBadgeStyles_unstable: (state: unknown) => void; - useButtonStyles_unstable: (state: unknown) => void; - useCompoundButtonStyles_unstable: (state: unknown) => void; - useMenuButtonStyles_unstable: (state: unknown) => void; - useSplitButtonStyles_unstable: (state: unknown) => void; - useToggleButtonStyles_unstable: (state: unknown) => void; - useCheckboxStyles_unstable: (state: unknown) => void; - useComboboxStyles_unstable: (state: unknown) => void; - useDropdownStyles_unstable: (state: unknown) => void; - useListboxStyles_unstable: (state: unknown) => void; - useListStyles_unstable: (state: unknown) => void; - useListItemStyles_unstable: (state: unknown) => void; - useListItemButtonStyles_unstable: (state: unknown) => void; - useOptionStyles_unstable: (state: unknown) => void; - useOptionGroupStyles_unstable: (state: unknown) => void; - useDividerStyles_unstable: (state: unknown) => void; - useInputStyles_unstable: (state: unknown) => void; - useImageStyles_unstable: (state: unknown) => void; - useLabelStyles_unstable: (state: unknown) => void; - useLinkStyles_unstable: (state: unknown) => void; - useMenuDividerStyles_unstable: (state: unknown) => void; - useMenuGroupHeaderStyles_unstable: (state: unknown) => void; - useMenuGroupStyles_unstable: (state: unknown) => void; - useMenuItemCheckboxStyles_unstable: (state: unknown) => void; - useMenuItemSwitchStyles_unstable: (state: unknown) => void; - useMenuItemRadioStyles_unstable: (state: unknown) => void; - useMenuItemStyles_unstable: (state: unknown) => void; - useMenuItemLinkStyles_unstable: (state: unknown) => void; - useMenuListStyles_unstable: (state: unknown) => void; - useMenuPopoverStyles_unstable: (state: unknown) => void; - useMenuSplitGroupStyles_unstable: (state: unknown) => void; - usePersonaStyles_unstable: (state: unknown) => void; - usePopoverSurfaceStyles_unstable: (state: unknown) => void; - useRadioGroupStyles_unstable: (state: unknown) => void; - useRadioStyles_unstable: (state: unknown) => void; - useSelectStyles_unstable: (state: unknown) => void; - useSliderStyles_unstable: (state: unknown) => void; - useSpinButtonStyles_unstable: (state: unknown) => void; - useSpinnerStyles_unstable: (state: unknown) => void; - useSwitchStyles_unstable: (state: unknown) => void; - useTabStyles_unstable: (state: unknown) => void; - useTabListStyles_unstable: (state: unknown) => void; - useTextStyles_unstable: (state: unknown) => void; - useTextareaStyles_unstable: (state: unknown) => void; - useTooltipStyles_unstable: (state: unknown) => void; - useDialogTitleStyles_unstable: (state: unknown) => void; - useDialogBodyStyles_unstable: (state: unknown) => void; - useDialogActionsStyles_unstable: (state: unknown) => void; - useDialogSurfaceStyles_unstable: (state: unknown) => void; - useDialogContentStyles_unstable: (state: unknown) => void; - useProgressBarStyles_unstable: (state: unknown) => void; - useToolbarButtonStyles_unstable: (state: unknown) => void; - useToolbarRadioButtonStyles_unstable: (state: unknown) => void; - useToolbarGroupStyles_unstable: (state: unknown) => void; - useToolbarToggleButtonStyles_unstable: (state: unknown) => void; - useToolbarDividerStyles_unstable: (state: unknown) => void; - useToolbarStyles_unstable: (state: unknown) => void; - useTableCellStyles_unstable: (state: unknown) => void; - useTableRowStyles_unstable: (state: unknown) => void; - useTableBodyStyles_unstable: (state: unknown) => void; - useTableStyles_unstable: (state: unknown) => void; - useTableHeaderStyles_unstable: (state: unknown) => void; - useTableHeaderCellStyles_unstable: (state: unknown) => void; - useTableResizeHandleStyles_unstable: (state: unknown) => void; - useTableSelectionCellStyles_unstable: (state: unknown) => void; - useTableCellActionsStyles_unstable: (state: unknown) => void; - useTableCellLayoutStyles_unstable: (state: unknown) => void; - useDataGridCellStyles_unstable: (state: unknown) => void; - useDataGridRowStyles_unstable: (state: unknown) => void; - useDataGridBodyStyles_unstable: (state: unknown) => void; - useDataGridStyles_unstable: (state: unknown) => void; - useDataGridHeaderStyles_unstable: (state: unknown) => void; - useDataGridHeaderCellStyles_unstable: (state: unknown) => void; - useDataGridSelectionCellStyles_unstable: (state: unknown) => void; - useDrawerStyles_unstable: (state: unknown) => void; - useDrawerInlineStyles_unstable: (state: unknown) => void; - useDrawerOverlayStyles_unstable: (state: unknown) => void; - useInlineDrawerStyles_unstable: (state: unknown) => void; - useOverlayDrawerStyles_unstable: (state: unknown) => void; - useDrawerHeaderStyles_unstable: (state: unknown) => void; - useDrawerHeaderNavigationStyles_unstable: (state: unknown) => void; - useDrawerHeaderTitleStyles_unstable: (state: unknown) => void; - useDrawerBodyStyles_unstable: (state: unknown) => void; - useDrawerFooterStyles_unstable: (state: unknown) => void; - useInteractionTagStyles_unstable: (state: unknown) => void; - useInteractionTagPrimaryStyles_unstable: (state: unknown) => void; - useInteractionTagSecondaryStyles_unstable: (state: unknown) => void; - useTagStyles_unstable: (state: unknown) => void; - useTagGroupStyles_unstable: (state: unknown) => void; - useBreadcrumbStyles_unstable: (state: unknown) => void; - useBreadcrumbButtonStyles_unstable: (state: unknown) => void; - useBreadcrumbItemStyles_unstable: (state: unknown) => void; - useBreadcrumbDividerStyles_unstable: (state: unknown) => void; - useMessageBarStyles_unstable: (state: unknown) => void; - useMessageBarBodyStyles_unstable: (state: unknown) => void; - useMessageBarTitleStyles_unstable: (state: unknown) => void; - useMessageBarActionsStyles_unstable: (state: unknown) => void; - useMessageBarGroupStyles_unstable: (state: unknown) => void; - useToasterStyles_unstable: (state: unknown) => void; - useTeachingPopoverStyles_unstable: (state: unknown) => void; - useTeachingPopoverActionsStyles_unstable: (state: unknown) => void; - useTeachingPopoverBodyStyles_unstable: (state: unknown) => void; - useTeachingPopoverButtonStyles_unstable: (state: unknown) => void; - useTeachingPopoverCarouselStyles_unstable: (state: unknown) => void; - useTeachingPopoverHeaderStyles_unstable: (state: unknown) => void; - useTeachingPopoverPageCountStyles_unstable: (state: unknown) => void; - useTeachingPopoverSurfaceStyles_unstable: (state: unknown) => void; - useTeachingPopoverTitleStyles_unstable: (state: unknown) => void; - useTimePickerCompatStyles_unstable: (state: unknown) => void; - useTagPickerInputStyles_unstable: (state: unknown) => void; - useTagPickerButtonStyles_unstable: (state: unknown) => void; - useTagPickerControlStyles_unstable: (state: unknown) => void; - useTagPickerGroupStyles_unstable: (state: unknown) => void; - useTagPickerListStyles_unstable: (state: unknown) => void; - useTagPickerOptionStyles_unstable: (state: unknown) => void; - useTagPickerOptionGroupStyles_unstable: (state: unknown) => void; - useColorSwatchStyles_unstable: (state: unknown) => void; - useImageSwatchStyles_unstable: (state: unknown) => void; - useEmptySwatchStyles_unstable: (state: unknown) => void; - useSwatchPickerRowStyles_unstable: (state: unknown) => void; - useSwatchPickerStyles_unstable: (state: unknown) => void; - useCarouselViewportStyles_unstable: (state: unknown) => void; - useCarouselSliderStyles_unstable: (state: unknown) => void; - useCarouselStyles_unstable: (state: unknown) => void; - useCarouselAutoplayButtonStyles_unstable: (state: unknown) => void; - useCarouselButtonStyles_unstable: (state: unknown) => void; - useCarouselCardStyles_unstable: (state: unknown) => void; - useCarouselNavStyles_unstable: (state: unknown) => void; - useCarouselNavButtonStyles_unstable: (state: unknown) => void; - useCarouselNavContainerStyles_unstable: (state: unknown) => void; - useCarouselNavImageButtonStyles_unstable: (state: unknown) => void; - }> | undefined; - dir?: "ltr" | "rtl" | undefined; - targetDocument?: Document | undefined; - theme?: Partial | undefined; - overrides_unstable?: OverridesContextValue_unstable | undefined; -} & React_2.RefAttributes>; +export const FluentProvider: ForwardRefComponent; // @public (undocumented) export const fluentProviderClassNames: SlotClassNames; @@ -222,7 +69,7 @@ export type FluentProviderState = ComponentState & Pick JSX.Element; // @public -export const useFluentProvider_unstable: (props: FluentProviderProps, ref: React_2.Ref) => FluentProviderState; +export const useFluentProvider_unstable: (props: FluentProviderProps, ref: React_2.Ref) => FluentProviderState; // @public (undocumented) export function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues; diff --git a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx index 6fbcb494a3c1a6..12a29e0bece674 100644 --- a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx +++ b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx @@ -1,11 +1,15 @@ import * as React from 'react'; +import { ForwardRefComponent } from '@fluentui/react-utilities'; import { renderFluentProvider_unstable } from './renderFluentProvider'; import { useFluentProvider_unstable } from './useFluentProvider'; import { useFluentProviderStyles_unstable } from './useFluentProviderStyles.styles'; import { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues'; import type { FluentProviderProps } from './FluentProvider.types'; -export const FluentProvider = React.forwardRef((props, ref) => { +export const FluentProvider: ForwardRefComponent = React.forwardRef< + HTMLDivElement, + FluentProviderProps +>((props, ref) => { const state = useFluentProvider_unstable(props, ref); useFluentProviderStyles_unstable(state); diff --git a/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts b/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts index b13cc39defd1b3..e6b9612d09da69 100644 --- a/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts +++ b/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts @@ -31,7 +31,7 @@ const DEFAULT_RENDERER_ATTRIBUTES = {}; */ export const useFluentProvider_unstable = ( props: FluentProviderProps, - ref: React.Ref, + ref: React.Ref, ): FluentProviderState => { 'use no memo'; From cab075f5aefa0f09d46ac16c6327f4c93dc97ca6 Mon Sep 17 00:00:00 2001 From: Humberto Makoto Morimoto Burgos Date: Wed, 8 Jan 2025 17:09:54 -0800 Subject: [PATCH 02/10] Adding change file. --- ...eact-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json diff --git a/change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json b/change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json new file mode 100644 index 00000000000000..8c515cab3cd6cb --- /dev/null +++ b/change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "chore: Updating FluentProvider types to avoid implicit import in API definition.", + "packageName": "@fluentui/react-provider", + "email": "makotom@microsoft.com", + "dependentChangeType": "patch" +} From adb160cc6b7ce34c4172321ab81154aec96de1c9 Mon Sep 17 00:00:00 2001 From: KHMakoto Date: Thu, 9 Jan 2025 11:18:24 -0800 Subject: [PATCH 03/10] Reverting change to ref type. --- .../react-provider/library/etc/react-provider.api.md | 2 +- .../library/src/components/FluentProvider/FluentProvider.tsx | 4 ++-- .../src/components/FluentProvider/useFluentProvider.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-components/react-provider/library/etc/react-provider.api.md b/packages/react-components/react-provider/library/etc/react-provider.api.md index 95c2f646ae9ee8..3c3a24d05bc0f4 100644 --- a/packages/react-components/react-provider/library/etc/react-provider.api.md +++ b/packages/react-components/react-provider/library/etc/react-provider.api.md @@ -69,7 +69,7 @@ export type FluentProviderState = ComponentState & Pick JSX.Element; // @public -export const useFluentProvider_unstable: (props: FluentProviderProps, ref: React_2.Ref) => FluentProviderState; +export const useFluentProvider_unstable: (props: FluentProviderProps, ref: React_2.Ref) => FluentProviderState; // @public (undocumented) export function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues; diff --git a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx index 12a29e0bece674..5827f6b1f3b299 100644 --- a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx +++ b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx @@ -7,7 +7,7 @@ import { useFluentProviderContextValues_unstable } from './useFluentProviderCont import type { FluentProviderProps } from './FluentProvider.types'; export const FluentProvider: ForwardRefComponent = React.forwardRef< - HTMLDivElement, + HTMLElement, FluentProviderProps >((props, ref) => { const state = useFluentProvider_unstable(props, ref); @@ -16,6 +16,6 @@ export const FluentProvider: ForwardRefComponent = React.fo const contextValues = useFluentProviderContextValues_unstable(state); return renderFluentProvider_unstable(state, contextValues); -}); +}) as ForwardRefComponent; FluentProvider.displayName = 'FluentProvider'; diff --git a/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts b/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts index e6b9612d09da69..b13cc39defd1b3 100644 --- a/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts +++ b/packages/react-components/react-provider/library/src/components/FluentProvider/useFluentProvider.ts @@ -31,7 +31,7 @@ const DEFAULT_RENDERER_ATTRIBUTES = {}; */ export const useFluentProvider_unstable = ( props: FluentProviderProps, - ref: React.Ref, + ref: React.Ref, ): FluentProviderState => { 'use no memo'; From eeaf21f1e66b6e586bd9757cf19968f565642c60 Mon Sep 17 00:00:00 2001 From: KHMakoto Date: Thu, 9 Jan 2025 11:41:33 -0800 Subject: [PATCH 04/10] Moving import to be just a type import. --- .../react-provider/library/etc/react-provider.api.md | 2 +- .../library/src/components/FluentProvider/FluentProvider.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-components/react-provider/library/etc/react-provider.api.md b/packages/react-components/react-provider/library/etc/react-provider.api.md index 3c3a24d05bc0f4..de54394ef0a815 100644 --- a/packages/react-components/react-provider/library/etc/react-provider.api.md +++ b/packages/react-components/react-provider/library/etc/react-provider.api.md @@ -7,7 +7,7 @@ import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; import type { CustomStyleHooksContextValue_unstable } from '@fluentui/react-shared-contexts'; -import { ForwardRefComponent } from '@fluentui/react-utilities'; +import type { ForwardRefComponent } from '@fluentui/react-utilities'; import type { IconDirectionContextValue } from '@fluentui/react-icons/lib/providers'; import type { OverridesContextValue_unstable } from '@fluentui/react-shared-contexts'; import type { PartialTheme } from '@fluentui/react-theme'; diff --git a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx index 5827f6b1f3b299..d5d0c76e000acc 100644 --- a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx +++ b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx @@ -1,5 +1,7 @@ import * as React from 'react'; -import { ForwardRefComponent } from '@fluentui/react-utilities'; + +import type { ForwardRefComponent } from '@fluentui/react-utilities'; + import { renderFluentProvider_unstable } from './renderFluentProvider'; import { useFluentProvider_unstable } from './useFluentProvider'; import { useFluentProviderStyles_unstable } from './useFluentProviderStyles.styles'; From 73e0375ded130bd61927792298a790451f83051f Mon Sep 17 00:00:00 2001 From: KHMakoto Date: Thu, 9 Jan 2025 14:10:44 -0800 Subject: [PATCH 05/10] Removing warnings from API generation in react-tabster package. --- .../react-tabster/src/hooks/useIsNavigatingWithKeyboard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/react-tabster/src/hooks/useIsNavigatingWithKeyboard.ts b/packages/react-components/react-tabster/src/hooks/useIsNavigatingWithKeyboard.ts index ce23ff78a953cf..81a57a227a8b46 100644 --- a/packages/react-components/react-tabster/src/hooks/useIsNavigatingWithKeyboard.ts +++ b/packages/react-components/react-tabster/src/hooks/useIsNavigatingWithKeyboard.ts @@ -3,7 +3,7 @@ import { useKeyborgRef } from './useKeyborgRef'; /** * Instantiates [keyborg](https://github.com/microsoft/keyborg) and checks if the user is navigating with the keyboard. - * @returns {() => boolean} + * @returns \{() =\> boolean\} */ export function useIsNavigatingWithKeyboard(): () => boolean { const keyborgRef = useKeyborgRef(); From bfc2eb8876ebbb2ef1c83da476e0b527c15d205a Mon Sep 17 00:00:00 2001 From: KHMakoto Date: Thu, 9 Jan 2025 14:23:38 -0800 Subject: [PATCH 06/10] Updating API in react-motion-components-preview package. --- .../etc/react-motion-components-preview.api.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/react-components/react-motion-components-preview/library/etc/react-motion-components-preview.api.md b/packages/react-components/react-motion-components-preview/library/etc/react-motion-components-preview.api.md index d9efd381278b6e..fba94f92528fba 100644 --- a/packages/react-components/react-motion-components-preview/library/etc/react-motion-components-preview.api.md +++ b/packages/react-components/react-motion-components-preview/library/etc/react-motion-components-preview.api.md @@ -36,6 +36,9 @@ export const createCollapsePresence: PresenceMotionFnCreator; +// @public +export const createScalePresence: PresenceMotionFnCreator; + // @public export const Fade: PresenceComponent< {}>; @@ -46,19 +49,13 @@ export const FadeRelaxed: PresenceComponent< {}>; export const FadeSnappy: PresenceComponent< {}>; // @public -export const Scale: PresenceComponent< { -animateOpacity?: boolean | undefined; -}>; +export const Scale: PresenceComponent; // @public (undocumented) -export const ScaleRelaxed: PresenceComponent< { -animateOpacity?: boolean | undefined; -}>; +export const ScaleRelaxed: PresenceComponent; // @public (undocumented) -export const ScaleSnappy: PresenceComponent< { -animateOpacity?: boolean | undefined; -}>; +export const ScaleSnappy: PresenceComponent; // (No @packageDocumentation comment for this package) From cc717acd54da573b2e1c94f2602b5bdaccccc43c Mon Sep 17 00:00:00 2001 From: KHMakoto Date: Thu, 9 Jan 2025 14:48:31 -0800 Subject: [PATCH 07/10] Updating API in react-color-picker-preview, react-toast and react-tooltip packages. --- .../library/etc/react-color-picker-preview.api.md | 9 +++++---- .../react-toast/library/etc/react-toast.api.md | 1 + .../react-tooltip/library/etc/react-tooltip.api.md | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/react-components/react-color-picker-preview/library/etc/react-color-picker-preview.api.md b/packages/react-components/react-color-picker-preview/library/etc/react-color-picker-preview.api.md index 5c78ccfa5aa480..0ff850de65940e 100644 --- a/packages/react-components/react-color-picker-preview/library/etc/react-color-picker-preview.api.md +++ b/packages/react-components/react-color-picker-preview/library/etc/react-color-picker-preview.api.md @@ -35,7 +35,7 @@ export const ColorArea: ForwardRefComponent; export const colorAreaClassNames: SlotClassNames; // @public -export type ColorAreaProps = Omit>, 'color' | 'onChange'> & { +export type ColorAreaProps = Omit>, 'color' | 'onChange'> & Pick & { color?: HsvColor; defaultColor?: HsvColor; onChange?: EventHandler; @@ -50,7 +50,7 @@ export type ColorAreaSlots = { }; // @public -export type ColorAreaState = ComponentState> & Pick; +export type ColorAreaState = ComponentState> & Pick; // @public export const ColorPicker: ForwardRefComponent; @@ -62,6 +62,7 @@ export const colorPickerClassNames: SlotClassNames; export type ColorPickerProps = Omit>, 'color'> & { color: HsvColor; onColorChange?: EventHandler; + shape?: 'rounded' | 'square'; }; // @public (undocumented) @@ -79,7 +80,7 @@ export const ColorSlider: ForwardRefComponent; export const colorSliderClassNames: SlotClassNames; // @public -export type ColorSliderProps = Omit, 'input'>, 'defaultValue' | 'onChange' | 'value' | 'color'> & { +export type ColorSliderProps = Omit, 'input'>, 'defaultValue' | 'onChange' | 'value' | 'color'> & Pick & { channel?: string; onChange?: EventHandler; vertical?: boolean; @@ -96,7 +97,7 @@ export type ColorSliderSlots = { }; // @public -export type ColorSliderState = ComponentState & Pick; +export type ColorSliderState = ComponentState & Pick; // @public export const renderAlphaSlider_unstable: (state: AlphaSliderState) => JSX.Element; diff --git a/packages/react-components/react-toast/library/etc/react-toast.api.md b/packages/react-components/react-toast/library/etc/react-toast.api.md index d60e0e05c3769c..c5c8d6f1c179fc 100644 --- a/packages/react-components/react-toast/library/etc/react-toast.api.md +++ b/packages/react-components/react-toast/library/etc/react-toast.api.md @@ -133,6 +133,7 @@ export type ToastSlots = { // @public export type ToastState = ComponentState & { backgroundAppearance: BackgroundAppearanceContextValue; + intent?: ToastIntent | undefined; }; // @public (undocumented) diff --git a/packages/react-components/react-tooltip/library/etc/react-tooltip.api.md b/packages/react-components/react-tooltip/library/etc/react-tooltip.api.md index ada8f59ee9266d..d0d85dc974e426 100644 --- a/packages/react-components/react-tooltip/library/etc/react-tooltip.api.md +++ b/packages/react-components/react-tooltip/library/etc/react-tooltip.api.md @@ -56,7 +56,7 @@ export type TooltipState = ComponentState & Pick; -} & Pick, 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onPointerEnter' | 'onPointerLeave'>; +} & Pick, 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'onBlur' | 'onFocus' | 'onPointerEnter' | 'onPointerLeave' | 'aria-haspopup' | 'aria-expanded'>; // @public export const useTooltip_unstable: (props: TooltipProps) => TooltipState; From 0660aab83c96b15585e553b9380aad8d98269550 Mon Sep 17 00:00:00 2001 From: KHMakoto Date: Thu, 9 Jan 2025 15:16:40 -0800 Subject: [PATCH 08/10] Updating API in react-nav-preview and react-virtualizer packages. --- .../library/etc/react-nav-preview.api.md | 4 +++- .../library/etc/react-virtualizer.api.md | 11 ++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/react-components/react-nav-preview/library/etc/react-nav-preview.api.md b/packages/react-components/react-nav-preview/library/etc/react-nav-preview.api.md index 70ed49272f741a..0ce49da49a38d3 100644 --- a/packages/react-components/react-nav-preview/library/etc/react-nav-preview.api.md +++ b/packages/react-components/react-nav-preview/library/etc/react-nav-preview.api.md @@ -228,7 +228,9 @@ export type NavDrawerProps = ComponentProps & DrawerProps & NavP export type NavDrawerSlots = DrawerSlots; // @public -export type NavDrawerState = DrawerState & NavContextValue; +export type NavDrawerState = DrawerState & NavContextValue & { + size?: 'small' | 'medium' | 'large' | 'full'; +}; // @public export const NavItem: ForwardRefComponent; diff --git a/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md b/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md index 6b3c901b351b61..3bcd16bcd68144 100644 --- a/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md +++ b/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md @@ -6,10 +6,7 @@ import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; -import type { FC } from 'react'; -import type { MutableRefObject } from 'react'; import * as React_2 from 'react'; -import type { RefObject } from 'react'; import type { Slot } from '@fluentui/react-utilities'; import type { SlotClassNames } from '@fluentui/react-utilities'; @@ -132,7 +129,7 @@ export const useVirtualizerScrollViewStyles_unstable: (state: VirtualizerScrollV export const useVirtualizerStyles_unstable: (state: VirtualizerState) => VirtualizerState; // @public -export const Virtualizer: FC; +export const Virtualizer: React_2.FC; // @public export type VirtualizerChildRenderFunction = (index: number, isScrolling: boolean) => React_2.ReactNode; @@ -152,10 +149,10 @@ export const VirtualizerContextProvider: React_2.Provider; - nodeSizes: RefObject; + progressiveSizes: React_2.RefObject; + nodeSizes: React_2.RefObject; setFlaggedIndex: (index: number | null) => void; - currentIndex: RefObject; + currentIndex: React_2.RefObject; }; // @public (undocumented) From 9661dd5b61694d21571516029d01d8cd115c9371 Mon Sep 17 00:00:00 2001 From: Humberto Makoto Morimoto Burgos Date: Fri, 10 Jan 2025 10:34:44 -0800 Subject: [PATCH 09/10] Addressing PR feedback. --- .../src/components/FluentProvider/FluentProvider.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx index d5d0c76e000acc..e732fb42d1ec59 100644 --- a/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx +++ b/packages/react-components/react-provider/library/src/components/FluentProvider/FluentProvider.tsx @@ -8,16 +8,13 @@ import { useFluentProviderStyles_unstable } from './useFluentProviderStyles.styl import { useFluentProviderContextValues_unstable } from './useFluentProviderContextValues'; import type { FluentProviderProps } from './FluentProvider.types'; -export const FluentProvider: ForwardRefComponent = React.forwardRef< - HTMLElement, - FluentProviderProps ->((props, ref) => { +export const FluentProvider: ForwardRefComponent = React.forwardRef((props, ref) => { const state = useFluentProvider_unstable(props, ref); useFluentProviderStyles_unstable(state); const contextValues = useFluentProviderContextValues_unstable(state); return renderFluentProvider_unstable(state, contextValues); -}) as ForwardRefComponent; +}); FluentProvider.displayName = 'FluentProvider'; From b98f3a22dd32bff28e4ed8a168ad715b8b2a57af Mon Sep 17 00:00:00 2001 From: Makoto Morimoto Date: Mon, 13 Jan 2025 10:53:12 -0800 Subject: [PATCH 10/10] Update change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json Co-authored-by: Martin Hochel --- ...tui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json b/change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json index 8c515cab3cd6cb..c7f52f2deb033f 100644 --- a/change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json +++ b/change/@fluentui-react-provider-9f506bc2-b69a-4140-b85e-67b97c87e955.json @@ -1,6 +1,6 @@ { "type": "minor", - "comment": "chore: Updating FluentProvider types to avoid implicit import in API definition.", + "comment": "fix: Updating FluentProvider types to avoid implicit import in API definition.", "packageName": "@fluentui/react-provider", "email": "makotom@microsoft.com", "dependentChangeType": "patch"