diff --git a/change/@fluentui-react-dialog-a27523cc-5d13-4fd5-ac46-23fc9218bc73.json b/change/@fluentui-react-dialog-a27523cc-5d13-4fd5-ac46-23fc9218bc73.json new file mode 100644 index 00000000000000..7a1a2e6f2034b2 --- /dev/null +++ b/change/@fluentui-react-dialog-a27523cc-5d13-4fd5-ac46-23fc9218bc73.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "removes exposing of internal type FluentTriggerComponent", + "packageName": "@fluentui/react-dialog", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-dialog/etc/react-dialog.api.md b/packages/react-components/react-dialog/etc/react-dialog.api.md index 1d4dbc5ba5fde4..f8055ff2e33602 100644 --- a/packages/react-components/react-dialog/etc/react-dialog.api.md +++ b/packages/react-components/react-dialog/etc/react-dialog.api.md @@ -10,7 +10,6 @@ import { ARIAButtonResultProps } from '@fluentui/react-aria'; import { ARIAButtonType } from '@fluentui/react-aria'; import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; -import type { FluentTriggerComponent } from '@fluentui/react-utilities'; import type { ForwardRefComponent } from '@fluentui/react-utilities'; import { JSXElementConstructor } from 'react'; import * as React_2 from 'react'; @@ -163,7 +162,7 @@ export type DialogTitleSlots = { export type DialogTitleState = ComponentState; // @public -export const DialogTrigger: React_2.FC & FluentTriggerComponent; +export const DialogTrigger: React_2.FC; // @public (undocumented) export type DialogTriggerAction = 'open' | 'close'; diff --git a/packages/react-components/react-dialog/src/components/DialogTrigger/DialogTrigger.tsx b/packages/react-components/react-dialog/src/components/DialogTrigger/DialogTrigger.tsx index 84b2a6b4863395..7b4277be498bff 100644 --- a/packages/react-components/react-dialog/src/components/DialogTrigger/DialogTrigger.tsx +++ b/packages/react-components/react-dialog/src/components/DialogTrigger/DialogTrigger.tsx @@ -14,11 +14,12 @@ import type { FluentTriggerComponent } from '@fluentui/react-utilities'; * to it's wrapped child, but it won't be able to alter the dialog `open` state anymore, * in that case the user must provide a `controlled state` */ -export const DialogTrigger: React.FC & FluentTriggerComponent = props => { +export const DialogTrigger: React.FC = props => { const state = useDialogTrigger_unstable(props); return renderDialogTrigger_unstable(state); }; DialogTrigger.displayName = 'DialogTrigger'; -DialogTrigger.isFluentTriggerComponent = true; +// type casting here is required to ensure internal type FluentTriggerComponent is not leaked +(DialogTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;