diff --git a/change/@fluentui-react-combobox-05c147ce-b714-4845-8ccd-ec6268ba92cf.json b/change/@fluentui-react-combobox-05c147ce-b714-4845-8ccd-ec6268ba92cf.json new file mode 100644 index 00000000000000..ca59d97315668b --- /dev/null +++ b/change/@fluentui-react-combobox-05c147ce-b714-4845-8ccd-ec6268ba92cf.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "export selection types from combobox", + "packageName": "@fluentui/react-combobox", + "email": "mgodbolt@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-combobox/etc/react-combobox.api.md b/packages/react-components/react-combobox/etc/react-combobox.api.md index bb95e10b2eaedd..359a21b2dd24ec 100644 --- a/packages/react-components/react-combobox/etc/react-combobox.api.md +++ b/packages/react-components/react-combobox/etc/react-combobox.api.md @@ -144,6 +144,13 @@ export type OptionGroupSlots = { // @public export type OptionGroupState = ComponentState; +// @public (undocumented) +export type OptionOnSelectData = { + optionValue: string | undefined; + optionText: string | undefined; + selectedOptions: string[]; +}; + // @public export type OptionProps = ComponentProps> & { disabled?: boolean; @@ -185,6 +192,9 @@ export const renderOption_unstable: (state: OptionState) => JSX.Element; // @public export const renderOptionGroup_unstable: (state: OptionGroupState) => JSX.Element; +// @public (undocumented) +export type SelectionEvents = React_2.ChangeEvent | React_2.KeyboardEvent | React_2.MouseEvent; + // @public export const useCombobox_unstable: (props: ComboboxProps, ref: React_2.Ref) => ComboboxState; diff --git a/packages/react-components/react-combobox/src/Selection.ts b/packages/react-components/react-combobox/src/Selection.ts new file mode 100644 index 00000000000000..d86fba9de50e2c --- /dev/null +++ b/packages/react-components/react-combobox/src/Selection.ts @@ -0,0 +1 @@ +export * from './utils/Selection.types'; diff --git a/packages/react-components/react-combobox/src/index.ts b/packages/react-components/react-combobox/src/index.ts index bb95cbfb3cb5b4..a67185022f463e 100644 --- a/packages/react-components/react-combobox/src/index.ts +++ b/packages/react-components/react-combobox/src/index.ts @@ -58,3 +58,4 @@ export { useOptionGroup_unstable, } from './OptionGroup'; export type { OptionGroupProps, OptionGroupSlots, OptionGroupState } from './OptionGroup'; +export type { OptionOnSelectData, SelectionEvents } from './Selection';