Skip to content
Draft
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
2 changes: 1 addition & 1 deletion apps/ts-minbar-test-react-components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
packProjectPackages,
} from '@fluentui/scripts-projects-test';

const tsVersion = '3.9';
const tsVersion = '4.5';
const testName = 'ts-minbar-react-components';

async function performTest() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
Copy link
Collaborator

@fabricteam fabricteam Jun 18, 2024

Choose a reason for hiding this comment

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

🕵 fluentuiv9 Open the Visual Regressions report to inspect the affected screenshots

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.basic - Dark Mode.normal.chromium.png 0 Added
Avatar Converged.basic.normal.chromium.png 0 Added
Card Converged - Interactive 9 screenshots
Image Name Diff(in Pixels) Image Type
Card Converged - Interactive.appearance interactive - Subtle - High Contrast.click.chromium.png 0 Added
Card Converged - Interactive.appearance interactive - Subtle - High Contrast.hover.chromium.png 0 Added
Card Converged - Interactive.appearance interactive - Subtle - High Contrast.normal.chromium.png 0 Added
Card Converged - Interactive.appearance interactive - Filled - Dark Mode.click.chromium.png 0 Removed
Card Converged - Interactive.appearance interactive - Filled - Dark Mode.hover.chromium.png 0 Removed
Card Converged - Interactive.appearance interactive - Filled - Dark Mode.normal.chromium.png 0 Removed
Card Converged - Interactive.appearance interactive - Filled - High Contrast.click.chromium.png 0 Removed
Card Converged - Interactive.appearance interactive - Filled - High Contrast.hover.chromium.png 0 Removed
Card Converged - Interactive.appearance interactive - Filled - High Contrast.normal.chromium.png 0 Removed
SwatchPicker Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
SwatchPicker Converged.default.default.chromium.png 0 Added

"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-aria",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-breadcrumb",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-button",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-datepicker-compat",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-dialog",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: deprecates ComponentState.components property",
"packageName": "@fluentui/react-drawer",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-infolabel",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-jsx-runtime",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-link",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-menu",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-migration-v0-v9",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-migration-v8-v9",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-nav-preview",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-popover",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: deprecates ComponentState.components property",
"packageName": "@fluentui/react-search",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-swatch-picker",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-table",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-tabs",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: deprecates ComponentState.components property",
"packageName": "@fluentui/react-tag-picker",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-tags",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feature: support for data-* attributes",
"packageName": "@fluentui/react-teaching-popover",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-toast",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-toolbar",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "chore: slot API react v17/18 support",
"packageName": "@fluentui/react-utilities",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "chore: deprecates ComponentState.components property",
"packageName": "@fluentui/react-virtualizer",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
```ts

import type { AnnounceContextValue } from '@fluentui/react-shared-contexts';
import type { DistributiveOmit } from '@fluentui/react-utilities';
import type { DistributivePick } from '@fluentui/react-utilities';
import type { ExtractSlotProps } from '@fluentui/react-utilities';
import type { HTMLDataAttributes } from '@fluentui/react-utilities';
import * as React_2 from 'react';
import type { ResolveShorthandFunction } from '@fluentui/react-utilities';
import type { Slot } from '@fluentui/react-utilities';
Expand Down Expand Up @@ -67,16 +70,16 @@ export type ARIAButtonElement<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = H
export type ARIAButtonElementIntersection<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = UnionToIntersection<ARIAButtonElement<AlternateAs>>;

// @public
export type ARIAButtonProps<Type extends ARIAButtonType = ARIAButtonType> = React_2.PropsWithRef<JSX.IntrinsicElements[Type]> & {
export type ARIAButtonProps<Type extends ARIAButtonType = ARIAButtonType> = DistributiveOmit<React_2.PropsWithRef<JSX.IntrinsicElements[Type]>, 'children'> & {
disabled?: boolean;
disabledFocusable?: boolean;
};

// @public
export type ARIAButtonResultProps<Type extends ARIAButtonType, Props> = Props & UnionToIntersection<ARIAButtonAlteredProps<Type>>;
export type ARIAButtonResultProps<Type extends ARIAButtonType, Props> = Props & UnionToIntersection<ARIAButtonAlteredProps<Type>> & HTMLDataAttributes;

// @public (undocumented)
export type ARIAButtonSlotProps<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = ExtractSlotProps<Slot<'button', AlternateAs>> & Pick<ARIAButtonProps<ARIAButtonType>, 'disabled' | 'disabledFocusable'>;
export type ARIAButtonSlotProps<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = ExtractSlotProps<Slot<'button', AlternateAs>> & DistributivePick<ARIAButtonProps<ARIAButtonType>, 'disabled' | 'disabledFocusable'>;

// @public (undocumented)
export type ARIAButtonType = 'button' | 'a' | 'div';
Expand Down Expand Up @@ -108,7 +111,7 @@ export const useActiveDescendantContext: () => ActiveDescendantContextValue;
export function useARIAButtonProps<Type extends ARIAButtonType, Props extends ARIAButtonProps<Type>>(type?: Type, props?: Props): ARIAButtonResultProps<Type, Props>;

// @internal @deprecated (undocumented)
export const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps>;
export const useARIAButtonShorthand: ResolveShorthandFunction<any>;

// @public (undocumented)
export const useAriaLiveAnnouncer_unstable: (props: AriaLiveAnnouncerProps) => AriaLiveAnnouncerState;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import type { ExtractSlotProps, Slot, UnionToIntersection } from '@fluentui/react-utilities';
import type {
DistributiveOmit,
DistributivePick,
ExtractSlotProps,
HTMLDataAttributes,
Slot,
UnionToIntersection,
} from '@fluentui/react-utilities';
import * as React from 'react';

export type ARIAButtonType = 'button' | 'a' | 'div';
Expand All @@ -18,8 +25,9 @@ export type ARIAButtonElementIntersection<AlternateAs extends 'a' | 'div' = 'a'
/**
* Props expected by `useARIAButtonProps` hooks
*/
export type ARIAButtonProps<Type extends ARIAButtonType = ARIAButtonType> = React.PropsWithRef<
JSX.IntrinsicElements[Type]
export type ARIAButtonProps<Type extends ARIAButtonType = ARIAButtonType> = DistributiveOmit<
React.PropsWithRef<JSX.IntrinsicElements[Type]>,
'children'
> & {
disabled?: boolean;
/**
Expand All @@ -36,7 +44,7 @@ export type ARIAButtonProps<Type extends ARIAButtonType = ARIAButtonType> = Reac
export type ARIAButtonSlotProps<AlternateAs extends 'a' | 'div' = 'a' | 'div'> = ExtractSlotProps<
Slot<'button', AlternateAs>
> &
Pick<ARIAButtonProps<ARIAButtonType>, 'disabled' | 'disabledFocusable'>;
DistributivePick<ARIAButtonProps<ARIAButtonType>, 'disabled' | 'disabledFocusable'>;

/**
* Props that will be modified internally by `useARIAButtonProps` by each case.
Expand All @@ -63,4 +71,5 @@ export type ARIAButtonAlteredProps<Type extends ARIAButtonType> =
* Merge of props provided by the user and props provided internally.
*/
export type ARIAButtonResultProps<Type extends ARIAButtonType, Props> = Props &
UnionToIntersection<ARIAButtonAlteredProps<Type>>;
UnionToIntersection<ARIAButtonAlteredProps<Type>> &
HTMLDataAttributes;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { resolveShorthand } from '@fluentui/react-utilities';
import { useARIAButtonProps } from './useARIAButtonProps';
import type { ResolveShorthandFunction } from '@fluentui/react-utilities';
import type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './types';
import type { ARIAButtonProps, ARIAButtonType } from './types';

/**
* @internal
Expand All @@ -14,10 +14,14 @@ import type { ARIAButtonProps, ARIAButtonSlotProps, ARIAButtonType } from './typ
* for multiple scenarios of shorthand properties. Ensuring 1st rule of ARIA for cases
* where no attribute addition is required.
*/
// eslint-disable-next-line deprecation/deprecation
export const useARIAButtonShorthand: ResolveShorthandFunction<ARIAButtonSlotProps> = (value, options) => {
// eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-explicit-any
export const useARIAButtonShorthand: ResolveShorthandFunction<any> = ((value, options) => {
// eslint-disable-next-line deprecation/deprecation
const shorthand = resolveShorthand(value, options);
const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(shorthand?.as ?? 'button', shorthand);
const shorthandARIAButton = useARIAButtonProps<ARIAButtonType, ARIAButtonProps>(
shorthand?.as ?? 'button',
shorthand as ARIAButtonProps,
);
return shorthand && shorthandARIAButton;
};
// eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-explicit-any
}) as ResolveShorthandFunction<any>;
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { ButtonSlots } from '@fluentui/react-button';
import { ButtonState } from '@fluentui/react-button';
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { DistributiveOmit } from '@fluentui/react-utilities';
import type { DistributivePick } from '@fluentui/react-utilities';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import * as React_2 from 'react';
import type { Slot } from '@fluentui/react-utilities';
Expand All @@ -26,15 +28,15 @@ export const BreadcrumbButton: ForwardRefComponent<BreadcrumbButtonProps>;
export const breadcrumbButtonClassNames: SlotClassNames<BreadcrumbButtonSlots>;

// @public
export type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> & Pick<BreadcrumbProps, 'size'> & Pick<ButtonProps, 'disabled' | 'disabledFocusable'> & {
export type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> & Pick<BreadcrumbProps, 'size'> & DistributivePick<ButtonProps, 'disabled' | 'disabledFocusable'> & {
current?: boolean;
};

// @public (undocumented)
export type BreadcrumbButtonSlots = ButtonSlots;

// @public
export type BreadcrumbButtonState = ComponentState<BreadcrumbButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components'> & Required<Pick<BreadcrumbButtonProps, 'current' | 'size'>>;
export type BreadcrumbButtonState = ComponentState<BreadcrumbButtonSlots> & DistributiveOmit<ButtonState, keyof ButtonSlots | 'components'> & Required<Pick<BreadcrumbButtonProps, 'current' | 'size'>>;

// @public (undocumented)
export const breadcrumbClassNames: SlotClassNames<BreadcrumbSlots>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const BreadcrumbButton: ForwardRefComponent<BreadcrumbButtonProps> = Reac
useCustomStyleHook_unstable('useBreadcrumbButtonStyles_unstable')(state);

return renderBreadcrumbButton_unstable(state);
});
// Casting is required due to lack of distributive union to support unions on @types/react
}) as ForwardRefComponent<BreadcrumbButtonProps>;

BreadcrumbButton.displayName = 'BreadcrumbButton';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';
import type { ComponentProps, ComponentState, DistributiveOmit, DistributivePick } from '@fluentui/react-utilities';
import { ButtonProps, ButtonSlots, ButtonState } from '@fluentui/react-button';
import { BreadcrumbProps } from '../Breadcrumb/Breadcrumb.types';

Expand All @@ -9,7 +9,7 @@ export type BreadcrumbButtonSlots = ButtonSlots;
*/
export type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> &
Pick<BreadcrumbProps, 'size'> &
Pick<ButtonProps, 'disabled' | 'disabledFocusable'> & {
DistributivePick<ButtonProps, 'disabled' | 'disabledFocusable'> & {
/**
* Defines current sate of BreadcrumbButton.
*
Expand All @@ -22,5 +22,5 @@ export type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> &
* State used in rendering BreadcrumbButton
*/
export type BreadcrumbButtonState = ComponentState<BreadcrumbButtonSlots> &
Omit<ButtonState, keyof ButtonSlots | 'components'> &
DistributiveOmit<ButtonState, keyof ButtonSlots | 'components'> &
Required<Pick<BreadcrumbButtonProps, 'current' | 'size'>>;
Loading