Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

@github-actions github-actions bot Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask - RTL.normal.chromium.png 6 Changed
vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 3308 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 858 Changed
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 3349 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 849 Changed
vr-tests-react-components/Charts-DonutChart 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 7530 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 5570 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 732 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 623 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 59 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 53 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 45 Changed
vr-tests-react-components/TagPicker 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.chromium.png 1319 Changed
vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png 658 Changed
vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png 677 Changed
vr-tests-web-components/Avatar 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Avatar. - Dark Mode.normal.chromium.png 10380 Changed
vr-tests-web-components/MenuList 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/MenuList. - Dark Mode.normal.chromium.png 498 Changed
vr-tests-web-components/MenuList. - RTL.2nd selected.chromium.png 17 Changed
vr-tests-web-components/MenuList. - RTL.normal.chromium_1.png 39083 Changed
vr-tests-web-components/RadioGroup 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/RadioGroup. - Dark Mode.normal.chromium_1.png 89 Changed
vr-tests/Callout 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Callout.Rendering callout attached to a rectangle.default.chromium.png 1835 Changed
vr-tests/Coachmark 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Coachmark.Collapsed.default.chromium.png 159 Changed
vr-tests/Keytip 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Keytip.Offset.default.chromium.png 86 Changed
vr-tests/Keytip.Root.default.chromium.png 55 Changed
vr-tests/react-charting-LineChart 6 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-LineChart.Events.default.chromium.png 17 Changed
vr-tests/react-charting-LineChart.Events - Dark Mode.default.chromium.png 16 Changed
vr-tests/react-charting-LineChart.Events - RTL.default.chromium.png 15 Changed
vr-tests/react-charting-LineChart.Multiple - Dark Mode.default.chromium.png 181 Changed
vr-tests/react-charting-LineChart.Multiple - RTL.default.chromium.png 200 Changed
vr-tests/react-charting-LineChart.Multiple.default.chromium.png 192 Changed
vr-tests/react-charting-MultiStackBarChart 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-MultiStackBarChart.Basic_Absolute - Dark Mode.default.chromium.png 363 Changed
vr-tests/react-charting-MultiStackBarChart.Basic_Absolute - RTL.default.chromium.png 343 Changed
vr-tests/react-charting-MultiStackBarChart.Basic_PartToWhole.default.chromium.png 359 Changed
vr-tests/react-charting-VerticalBarChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-VerticalBarChart.Basic - Secondary Y Axis.default.chromium.png 3 Changed

There were 7 duplicate changes discarded. Check the build logs for more information.

"type": "patch",
"comment": "feat: add base hooks for TagPicker components",
"packageName": "@fluentui/react-tag-picker",
"email": "dmytrokirpa@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { OptionState } from '@fluentui/react-combobox';
import * as React_2 from 'react';
import { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';
import type { TagGroupBaseState } from '@fluentui/react-tags';
import { TagGroupContextValues } from '@fluentui/react-tags';
import type { TagGroupSlots } from '@fluentui/react-tags';
import type { TagGroupState } from '@fluentui/react-tags';
Expand Down Expand Up @@ -59,9 +60,21 @@ export const renderTagPickerOptionGroup: (state: TagPickerOptionGroupState) => J
// @public
export const TagPicker: React_2.FC<TagPickerProps>;

// @public
export type TagPickerBaseProps = Omit<TagPickerProps, 'size' | 'appearance'>;

// @public
export type TagPickerBaseState = Omit<TagPickerState, 'size' | 'appearance'>;

// @public
export const TagPickerButton: ForwardRefComponent<TagPickerButtonProps>;

// @public
export type TagPickerButtonBaseProps = Omit<TagPickerButtonProps, 'size' | 'appearance'>;

// @public
export type TagPickerButtonBaseState = Omit<TagPickerButtonState, 'size'>;

// @public (undocumented)
export const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots>;

Expand Down Expand Up @@ -110,6 +123,12 @@ export type TagPickerContextValues = {
// @public
export const TagPickerControl: ForwardRefComponent<TagPickerControlProps>;

// @public
export type TagPickerControlBaseProps = TagPickerControlProps;

// @public
export type TagPickerControlBaseState = Omit<TagPickerControlState, 'size' | 'appearance'>;

// @public (undocumented)
export const tagPickerControlClassNames: SlotClassNames<TagPickerControlSlots & TagPickerControlInternalSlots>;

Expand All @@ -132,6 +151,14 @@ export type TagPickerControlState = ComponentState<TagPickerControlSlots & TagPi
// @public
export const TagPickerGroup: ForwardRefComponent<TagPickerGroupProps>;

// @public
export type TagPickerGroupBaseProps = TagPickerGroupProps;

// @public
export type TagPickerGroupBaseState = TagGroupBaseState & {
hasSelectedOptions: boolean;
};

// @public (undocumented)
export const tagPickerGroupClassNames: SlotClassNames<TagPickerGroupSlots>;

Expand All @@ -149,6 +176,12 @@ export type TagPickerGroupState = TagGroupState & {
// @public
export const TagPickerInput: ForwardRefComponent<TagPickerInputProps>;

// @public
export type TagPickerInputBaseProps = Omit<TagPickerInputProps, 'appearance'>;

// @public
export type TagPickerInputBaseState = Omit<TagPickerInputState, 'size'>;

// @public (undocumented)
export const tagPickerInputClassNames: SlotClassNames<TagPickerInputSlots>;

Expand Down Expand Up @@ -262,9 +295,15 @@ export type TagPickerState = ComponentState<TagPickerSlots> & Pick<ComboboxState
// @public
export const useTagPicker_unstable: (props: TagPickerProps) => TagPickerState;

// @public
export const useTagPickerBase_unstable: (props: TagPickerBaseProps) => TagPickerBaseState;

// @public
export const useTagPickerButton_unstable: (props: TagPickerButtonProps, ref: React_2.Ref<HTMLButtonElement>) => TagPickerButtonState;

// @public
export const useTagPickerButtonBase_unstable: (props: TagPickerButtonBaseProps, ref: React_2.Ref<HTMLButtonElement>) => TagPickerButtonBaseState;

// @public
export const useTagPickerButtonStyles_unstable: (state: TagPickerButtonState) => TagPickerButtonState;

Expand All @@ -274,6 +313,9 @@ export const useTagPickerContext_unstable: <T>(selector: ContextSelector<TagPick
// @public
export const useTagPickerControl_unstable: (props: TagPickerControlProps, ref: React_2.Ref<HTMLDivElement>) => TagPickerControlState;

// @public
export const useTagPickerControlBase_unstable: (props: TagPickerControlBaseProps, ref: React_2.Ref<HTMLDivElement>) => TagPickerControlBaseState;

// @public
export const useTagPickerControlStyles_unstable: (state: TagPickerControlState) => TagPickerControlState;

Expand All @@ -283,12 +325,18 @@ export function useTagPickerFilter({ filter: filterOverride, noOptionsElement, r
// @public
export const useTagPickerGroup_unstable: (props: TagPickerGroupProps, ref: React_2.Ref<HTMLDivElement>) => TagPickerGroupState;

// @public
export const useTagPickerGroupBase_unstable: (props: TagPickerGroupBaseProps, ref: React_2.Ref<HTMLDivElement>) => TagPickerGroupBaseState;

// @public
export const useTagPickerGroupStyles_unstable: (state: TagPickerGroupState) => TagPickerGroupState;

// @public
export const useTagPickerInput_unstable: (propsArg: TagPickerInputProps, ref: React_2.Ref<HTMLInputElement>) => TagPickerInputState;

// @public
export const useTagPickerInputBase_unstable: (propsArg: TagPickerInputBaseProps, ref: React_2.Ref<HTMLInputElement>) => TagPickerInputBaseState;

// @public
export const useTagPickerInputStyles_unstable: (state: TagPickerInputState) => TagPickerInputState;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluentui/react-tag-picker",
"version": "9.8.5",
"version": "9.8.2",
"description": "FluentUI TagPicker component",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
Expand All @@ -26,12 +26,12 @@
"@fluentui/react-tabster": "^9.26.13",
"@fluentui/react-aria": "^9.17.10",
"@fluentui/react-icons": "^2.0.245",
"@fluentui/react-combobox": "^9.17.0",
"@fluentui/react-tags": "^9.8.0",
"@fluentui/react-combobox": "^9.16.18",
"@fluentui/react-tags": "^9.7.17",
"@fluentui/react-context-selector": "^9.2.15",
"@fluentui/react-positioning": "^9.22.0",
"@fluentui/keyboard-keys": "^9.0.8",
"@fluentui/react-field": "^9.5.0",
"@fluentui/react-field": "^9.4.16",
"@griffel/react": "^1.5.32",
"@swc/helpers": "^0.5.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export type {
TagPickerBaseProps,
TagPickerBaseState,
TagPickerContextValues,
TagPickerOnOpenChangeData,
TagPickerOnOptionSelectData,
Expand All @@ -7,4 +9,9 @@ export type {
TagPickerSlots,
TagPickerState,
} from './components/TagPicker/index';
export { TagPicker, renderTagPicker_unstable, useTagPicker_unstable } from './components/TagPicker/index';
export {
TagPicker,
renderTagPicker_unstable,
useTagPickerBase_unstable,
useTagPicker_unstable,
} from './components/TagPicker/index';
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export type {
TagPickerButtonBaseProps,
TagPickerButtonBaseState,
TagPickerButtonProps,
TagPickerButtonSlots,
TagPickerButtonState,
Expand All @@ -8,5 +10,6 @@ export {
renderTagPickerButton_unstable,
tagPickerButtonClassNames,
useTagPickerButtonStyles_unstable,
useTagPickerButtonBase_unstable,
useTagPickerButton_unstable,
} from './components/TagPickerButton/index';
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export type {
TagPickerControlBaseProps,
TagPickerControlBaseState,
TagPickerControlCSSProperties,
TagPickerControlInternalSlots,
TagPickerControlProps,
Expand All @@ -12,5 +14,6 @@ export {
tagPickerControlAsideWidthToken,
tagPickerControlClassNames,
useTagPickerControlStyles_unstable,
useTagPickerControlBase_unstable,
useTagPickerControl_unstable,
} from './components/TagPickerControl/index';
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
export type { TagPickerGroupProps, TagPickerGroupSlots, TagPickerGroupState } from './components/TagPickerGroup/index';
export type {
TagPickerGroupBaseProps,
TagPickerGroupBaseState,
TagPickerGroupProps,
TagPickerGroupSlots,
TagPickerGroupState,
} from './components/TagPickerGroup/index';
export {
TagPickerGroup,
renderTagPickerGroup_unstable,
tagPickerGroupClassNames,
useTagPickerGroupStyles_unstable,
useTagPickerGroupBase_unstable,
useTagPickerGroup_unstable,
} from './components/TagPickerGroup/index';
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
export type { TagPickerInputProps, TagPickerInputSlots, TagPickerInputState } from './components/TagPickerInput/index';
export type {
TagPickerInputBaseProps,
TagPickerInputBaseState,
TagPickerInputProps,
TagPickerInputSlots,
TagPickerInputState,
} from './components/TagPickerInput/index';
export {
TagPickerInput,
renderTagPickerInput_unstable,
tagPickerInputClassNames,
useTagPickerInputStyles_unstable,
useTagPickerInputBase_unstable,
useTagPickerInput_unstable,
} from './components/TagPickerInput/index';
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,13 @@ export type TagPickerContextValues = {
activeDescendant: ActiveDescendantContextValue;
listbox: ListboxContextValue;
};

/**
* TagPicker Base Props - omits design-only props
*/
export type TagPickerBaseProps = Omit<TagPickerProps, 'size' | 'appearance'>;

/**
* TagPicker Base State - omits design-only state
*/
export type TagPickerBaseState = Omit<TagPickerState, 'size' | 'appearance'>;
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export { TagPicker } from './TagPicker';
export type {
TagPickerBaseProps,
TagPickerBaseState,
TagPickerContextValues,
TagPickerOnOpenChangeData,
TagPickerOnOptionSelectData,
Expand All @@ -9,4 +11,4 @@ export type {
TagPickerState,
} from './TagPicker.types';
export { renderTagPicker_unstable } from './renderTagPicker';
export { useTagPicker_unstable } from './useTagPicker';
export { useTagPickerBase_unstable, useTagPicker_unstable } from './useTagPicker';
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
import * as React from 'react';
import { elementContains, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';
import type {
TagPickerBaseProps,
TagPickerBaseState,
TagPickerOnOpenChangeData,
TagPickerOnOptionSelectData,
TagPickerProps,
TagPickerState,
} from './TagPicker.types';
import { optionClassNames } from '@fluentui/react-combobox';
import { PositioningShorthandValue, resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';
import {
type PositioningShorthandValue,
resolvePositioningShorthand,
usePositioning,
} from '@fluentui/react-positioning';
import { useActiveDescendant } from '@fluentui/react-aria';
import { useComboboxBaseState } from '@fluentui/react-combobox';

Expand All @@ -25,11 +31,27 @@ const fallbackPositions: PositioningShorthandValue[] = ['above', 'after', 'after
* @param props - props from this instance of Picker
*/
export const useTagPicker_unstable = (props: TagPickerProps): TagPickerState => {
const { size = 'medium', appearance = 'outline', ...baseProps } = props;
const state = useTagPickerBase_unstable(baseProps);

return {
...state,
size,
appearance,
};
};

/**
* Create the base state required to render TagPicker, without design-only props.
*
* @param props - props from this instance of TagPicker (without size, appearance)
*/
export const useTagPickerBase_unstable = (props: TagPickerBaseProps): TagPickerBaseState => {
const popoverId = useId('picker-listbox');
const triggerInnerRef = React.useRef<HTMLInputElement | HTMLButtonElement>(null);
const secondaryActionRef = React.useRef<HTMLSpanElement>(null);
const tagPickerGroupRef = React.useRef<HTMLDivElement>(null);
const { positioning, size = 'medium', inline = false, noPopover = false, disableAutoFocus } = props;
const { positioning, inline = false, noPopover = false, disableAutoFocus } = props;

const { targetRef, containerRef } = usePositioning({
position: 'below' as const,
Expand Down Expand Up @@ -86,15 +108,13 @@ export const useTagPicker_unstable = (props: TagPickerProps): TagPickerState =>
secondaryActionRef,
tagPickerGroupRef,
targetRef,
size,
inline,
open: comboboxState.open,
mountNode: comboboxState.mountNode,
onOptionClick: useEventCallback(event => {
comboboxState.onOptionClick(event);
comboboxState.setOpen(event, false);
}),
appearance: comboboxState.appearance,
clearSelection: comboboxState.clearSelection,
getOptionById: comboboxState.getOptionById,
getOptionsMatchingValue: comboboxState.getOptionsMatchingValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ export type TagPickerButtonState = ComponentState<TagPickerButtonSlots> &
Pick<TagPickerContextValue, 'size'> & {
hasSelectedOption: boolean;
};

/**
* TagPickerButton Base Props - omits design-only props
*/
export type TagPickerButtonBaseProps = Omit<TagPickerButtonProps, 'size' | 'appearance'>;

/**
* TagPickerButton Base State - omits design-only state
*/
export type TagPickerButtonBaseState = Omit<TagPickerButtonState, 'size'>;
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
export { TagPickerButton } from './TagPickerButton';
export type { TagPickerButtonProps, TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';
export type {
TagPickerButtonBaseProps,
TagPickerButtonBaseState,
TagPickerButtonProps,
TagPickerButtonSlots,
TagPickerButtonState,
} from './TagPickerButton.types';
export { renderTagPickerButton_unstable } from './renderTagPickerButton';
export { useTagPickerButton_unstable } from './useTagPickerButton';
export { useTagPickerButtonBase_unstable, useTagPickerButton_unstable } from './useTagPickerButton';
export { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';
Loading
Loading