From cb722fb6fc9b6bb6f8c035bee8055140d5f8a840 Mon Sep 17 00:00:00 2001 From: YuanboXue-Amber Date: Thu, 4 Jan 2024 11:14:55 +0100 Subject: [PATCH 1/5] release --- apps/public-docsite-v9/package.json | 2 +- apps/vr-tests-react-components/package.json | 2 +- .../src/stories/TimePicker.stories.tsx | 2 +- ...picker-compat-44d079da-05f8-4e7e-ad30-fc70601e7267.json | 7 +++++++ ...ompat-preview-8dca177c-555d-4973-8aa1-5ea98786788c.json | 7 +++++++ .../react-timepicker-compat-preview/package.json | 2 +- .../react-components/react-timepicker-compat/package.json | 2 +- 7 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 change/@fluentui-react-timepicker-compat-44d079da-05f8-4e7e-ad30-fc70601e7267.json create mode 100644 change/@fluentui-react-timepicker-compat-preview-8dca177c-555d-4973-8aa1-5ea98786788c.json diff --git a/apps/public-docsite-v9/package.json b/apps/public-docsite-v9/package.json index 090fdacd60a3a9..28716fa24e7f55 100644 --- a/apps/public-docsite-v9/package.json +++ b/apps/public-docsite-v9/package.json @@ -38,7 +38,7 @@ "@fluentui/react-search-preview": "*", "@fluentui/react-motion-preview": "*", "@fluentui/react-teaching-popover-preview": "*", - "@fluentui/react-timepicker-compat-preview": "*", + "@fluentui/react-timepicker-compat": "*", "@griffel/react": "^1.5.14", "@microsoft/applicationinsights-web": "^3", "react": "17.0.2", diff --git a/apps/vr-tests-react-components/package.json b/apps/vr-tests-react-components/package.json index 1f256b2ba40437..0eec0fe602fc8c 100644 --- a/apps/vr-tests-react-components/package.json +++ b/apps/vr-tests-react-components/package.json @@ -65,7 +65,7 @@ "@fluentui/react-text": "*", "@fluentui/react-textarea": "*", "@fluentui/react-theme": "*", - "@fluentui/react-timepicker-compat-preview": "*", + "@fluentui/react-timepicker-compat": "*", "@fluentui/react-toast": "*", "@fluentui/react-tooltip": "*", "@fluentui/react-toolbar": "*", diff --git a/apps/vr-tests-react-components/src/stories/TimePicker.stories.tsx b/apps/vr-tests-react-components/src/stories/TimePicker.stories.tsx index 3f05ca477af18b..cd510c112cd7d5 100644 --- a/apps/vr-tests-react-components/src/stories/TimePicker.stories.tsx +++ b/apps/vr-tests-react-components/src/stories/TimePicker.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { ComponentMeta } from '@storybook/react'; import { Steps, StoryWright } from 'storywright'; -import { TimePicker } from '@fluentui/react-timepicker-compat-preview'; +import { TimePicker } from '@fluentui/react-timepicker-compat'; export default { title: 'TimePicker compat', diff --git a/change/@fluentui-react-timepicker-compat-44d079da-05f8-4e7e-ad30-fc70601e7267.json b/change/@fluentui-react-timepicker-compat-44d079da-05f8-4e7e-ad30-fc70601e7267.json new file mode 100644 index 00000000000000..376043a8b44d27 --- /dev/null +++ b/change/@fluentui-react-timepicker-compat-44d079da-05f8-4e7e-ad30-fc70601e7267.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Stable release", + "packageName": "@fluentui/react-timepicker-compat", + "email": "yuanboxue@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-timepicker-compat-preview-8dca177c-555d-4973-8aa1-5ea98786788c.json b/change/@fluentui-react-timepicker-compat-preview-8dca177c-555d-4973-8aa1-5ea98786788c.json new file mode 100644 index 00000000000000..349033b8617599 --- /dev/null +++ b/change/@fluentui-react-timepicker-compat-preview-8dca177c-555d-4973-8aa1-5ea98786788c.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Deprecate preview package. Use @fluentui/react-timepicker-compat instead.", + "packageName": "@fluentui/react-timepicker-compat-preview", + "email": "yuanboxue@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-timepicker-compat-preview/package.json b/packages/react-components/react-timepicker-compat-preview/package.json index d2fc3e6bbc831d..7dcb8cba43a829 100644 --- a/packages/react-components/react-timepicker-compat-preview/package.json +++ b/packages/react-components/react-timepicker-compat-preview/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/react-timepicker-compat-preview", - "version": "0.1.9", + "version": "0.1.10", "description": "Fluent UI TimePicker Compat Component", "main": "lib-commonjs/index.js", "module": "lib/index.js", diff --git a/packages/react-components/react-timepicker-compat/package.json b/packages/react-components/react-timepicker-compat/package.json index 6cb7b67fc7e89f..74fc8b914c260a 100644 --- a/packages/react-components/react-timepicker-compat/package.json +++ b/packages/react-components/react-timepicker-compat/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/react-timepicker-compat", - "version": "0.0.1", + "version": "0.0.2", "description": "Fluent UI TimePicker Compat Component", "main": "lib-commonjs/index.js", "module": "lib/index.js", From 35900f399da079a2b743e106f0905664775b1bda Mon Sep 17 00:00:00 2001 From: YuanboXue-Amber Date: Fri, 5 Jan 2024 10:15:30 +0100 Subject: [PATCH 2/5] deprecate compat-preview --- .../react-timepicker-compat-preview.api.md | 22 +++++++++---------- .../package.json | 2 +- .../src/components/TimePicker/TimePicker.tsx | 1 + .../components/TimePicker/TimePicker.types.ts | 12 ++++++++++ .../src/components/TimePicker/timeMath.ts | 2 ++ .../components/TimePicker/useTimePicker.tsx | 2 ++ .../TimePicker/useTimePickerStyles.styles.ts | 4 ++++ 7 files changed, 33 insertions(+), 12 deletions(-) diff --git a/packages/react-components/react-timepicker-compat-preview/etc/react-timepicker-compat-preview.api.md b/packages/react-components/react-timepicker-compat-preview/etc/react-timepicker-compat-preview.api.md index d68a251a9d72b1..491c5cc745799c 100644 --- a/packages/react-components/react-timepicker-compat-preview/etc/react-timepicker-compat-preview.api.md +++ b/packages/react-components/react-timepicker-compat-preview/etc/react-timepicker-compat-preview.api.md @@ -13,19 +13,19 @@ import * as React_2 from 'react'; import type { SelectionEvents } from '@fluentui/react-combobox'; import type { SlotClassNames } from '@fluentui/react-utilities'; -// @public +// @public @deprecated export function formatDateToTimeString(date: Date, { hourCycle, showSeconds }?: TimeFormatOptions): string; -// @public +// @public @deprecated export const TimePicker: ForwardRefComponent; -// @public (undocumented) +// @public @deprecated (undocumented) export const timePickerClassNames: SlotClassNames; -// @public +// @public @deprecated export type TimePickerErrorType = 'invalid-input' | 'out-of-bounds' | 'required-input'; -// @public +// @public @deprecated export type TimePickerProps = Omit, 'input'>, 'children' | 'size'> & Pick & TimeFormatOptions & { startHour?: Hour; endHour?: Hour; @@ -38,28 +38,28 @@ export type TimePickerProps = Omit, 'input parseTimeStringToDate?: (time: string | undefined) => TimeStringValidationResult; }; -// @public (undocumented) +// @public @deprecated (undocumented) export type TimePickerSlots = ComboboxSlots; -// @public +// @public @deprecated export type TimePickerState = ComboboxState & Required> & { submittedText: string | undefined; }; -// @public (undocumented) +// @public @deprecated (undocumented) export type TimeSelectionData = { selectedTime: Date | null; selectedTimeText: string | undefined; errorType: TimePickerErrorType | undefined; }; -// @public (undocumented) +// @public @deprecated (undocumented) export type TimeSelectionEvents = SelectionEvents | React_2.FocusEvent; -// @public +// @public @deprecated export const useTimePicker_unstable: (props: TimePickerProps, ref: React_2.Ref) => TimePickerState; -// @public +// @public @deprecated export const useTimePickerStyles_unstable: (state: TimePickerState) => TimePickerState; // (No @packageDocumentation comment for this package) diff --git a/packages/react-components/react-timepicker-compat-preview/package.json b/packages/react-components/react-timepicker-compat-preview/package.json index 7dcb8cba43a829..d2fc3e6bbc831d 100644 --- a/packages/react-components/react-timepicker-compat-preview/package.json +++ b/packages/react-components/react-timepicker-compat-preview/package.json @@ -1,6 +1,6 @@ { "name": "@fluentui/react-timepicker-compat-preview", - "version": "0.1.10", + "version": "0.1.9", "description": "Fluent UI TimePicker Compat Component", "main": "lib-commonjs/index.js", "module": "lib/index.js", diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx index 1d9698709f8b7f..87fdfd5b68beb8 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx @@ -8,6 +8,7 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts'; /** * TimePicker Compat component + * @deprecated */ export const TimePicker: ForwardRefComponent = React.forwardRef((props, ref) => { const state = useTimePicker_unstable(props, ref); diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts index c46c6de4937b13..8489f6d635b582 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts @@ -51,6 +51,7 @@ export type TimePickerOption = { /** * Error types returned by the `onValidationResult` callback. + * @deprecated */ export type TimePickerErrorType = 'invalid-input' | 'out-of-bounds' | 'required-input'; @@ -59,9 +60,18 @@ export type TimeStringValidationResult = { errorType?: TimePickerErrorType; }; +/** + * @deprecated + */ export type TimePickerSlots = ComboboxSlots; +/** + * @deprecated + */ export type TimeSelectionEvents = SelectionEvents | React.FocusEvent; +/** + * @deprecated + */ export type TimeSelectionData = { /** * The Date object associated with the selected option. For freeform TimePicker it can also be the Date object parsed from the user input. @@ -94,6 +104,7 @@ export type TimeFormatOptions = { /** * TimePicker Props + * @deprecated */ export type TimePickerProps = Omit, 'input'>, 'children' | 'size'> & Pick< @@ -160,6 +171,7 @@ export type TimePickerProps = Omit, 'input /** * State used in rendering TimePicker + * @deprecated */ export type TimePickerState = ComboboxState & Required> & { diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts index 1c120b2ad4bfcf..c583cdb9049d69 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts @@ -43,6 +43,8 @@ export function keyToDate(key: string): Date | null { * formatDateToTimeString(date); // Returns "23:45" in CET * formatDateToTimeString(date, \{ showSeconds: true \}); // Returns "23:45:12" in CET * formatDateToTimeString(date, \{ hourCycle: 'h12', showSeconds: true \}); // Returns "11:45:12 PM" in CET + * + * @deprecated */ export function formatDateToTimeString(date: Date, { hourCycle, showSeconds }: TimeFormatOptions = {}): string { return date.toLocaleTimeString(undefined, { diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx index e14998e1a6008a..df66c59468a451 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx @@ -29,6 +29,8 @@ import { * * @param props - props from this instance of TimePicker * @param ref - reference to root HTMLElement of TimePicker + * + * @deprecated */ export const useTimePicker_unstable = (props: TimePickerProps, ref: React.Ref): TimePickerState => { const { diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts index b1a125ecf5d339..990b2bfe51cb73 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts @@ -3,6 +3,9 @@ import type { SlotClassNames } from '@fluentui/react-utilities'; import type { TimePickerSlots, TimePickerState } from './TimePicker.types'; import { useComboboxStyles_unstable } from '@fluentui/react-combobox'; +/** + * @deprecated + */ export const timePickerClassNames: SlotClassNames = { root: 'fui-TimePicker', input: 'fui-TimePicker__input', @@ -18,6 +21,7 @@ const useStyles = makeStyles({ /** * Apply styling to the TimePicker slots based on the state + * @deprecated */ export const useTimePickerStyles_unstable = (state: TimePickerState): TimePickerState => { const styles = useStyles(); From 6ed0a3704ffdec2ef663be99fe85436533c7f542 Mon Sep 17 00:00:00 2001 From: YuanboXue-Amber Date: Fri, 5 Jan 2024 10:36:37 +0100 Subject: [PATCH 3/5] add deprecate message --- .../src/components/TimePicker/TimePicker.tsx | 2 +- .../src/components/TimePicker/TimePicker.types.ts | 12 ++++++------ .../src/components/TimePicker/timeMath.ts | 2 +- .../src/components/TimePicker/useTimePicker.tsx | 2 +- .../TimePicker/useTimePickerStyles.styles.ts | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx index 87fdfd5b68beb8..237447919099b9 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx @@ -8,7 +8,7 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts'; /** * TimePicker Compat component - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export const TimePicker: ForwardRefComponent = React.forwardRef((props, ref) => { const state = useTimePicker_unstable(props, ref); diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts index 8489f6d635b582..c3371afc613948 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts @@ -51,7 +51,7 @@ export type TimePickerOption = { /** * Error types returned by the `onValidationResult` callback. - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export type TimePickerErrorType = 'invalid-input' | 'out-of-bounds' | 'required-input'; @@ -61,16 +61,16 @@ export type TimeStringValidationResult = { }; /** - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export type TimePickerSlots = ComboboxSlots; /** - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export type TimeSelectionEvents = SelectionEvents | React.FocusEvent; /** - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export type TimeSelectionData = { /** @@ -104,7 +104,7 @@ export type TimeFormatOptions = { /** * TimePicker Props - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export type TimePickerProps = Omit, 'input'>, 'children' | 'size'> & Pick< @@ -171,7 +171,7 @@ export type TimePickerProps = Omit, 'input /** * State used in rendering TimePicker - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export type TimePickerState = ComboboxState & Required> & { diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts index c583cdb9049d69..cac562a35e9c35 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.ts @@ -44,7 +44,7 @@ export function keyToDate(key: string): Date | null { * formatDateToTimeString(date, \{ showSeconds: true \}); // Returns "23:45:12" in CET * formatDateToTimeString(date, \{ hourCycle: 'h12', showSeconds: true \}); // Returns "11:45:12 PM" in CET * - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export function formatDateToTimeString(date: Date, { hourCycle, showSeconds }: TimeFormatOptions = {}): string { return date.toLocaleTimeString(undefined, { diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx index df66c59468a451..0e131342ba3619 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx @@ -30,7 +30,7 @@ import { * @param props - props from this instance of TimePicker * @param ref - reference to root HTMLElement of TimePicker * - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export const useTimePicker_unstable = (props: TimePickerProps, ref: React.Ref): TimePickerState => { const { diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts index 990b2bfe51cb73..ece941b2f362de 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts @@ -4,7 +4,7 @@ import type { TimePickerSlots, TimePickerState } from './TimePicker.types'; import { useComboboxStyles_unstable } from '@fluentui/react-combobox'; /** - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export const timePickerClassNames: SlotClassNames = { root: 'fui-TimePicker', @@ -21,7 +21,7 @@ const useStyles = makeStyles({ /** * Apply styling to the TimePicker slots based on the state - * @deprecated + * @deprecated use \@fluentui/react-timepicker-compat */ export const useTimePickerStyles_unstable = (state: TimePickerState): TimePickerState => { const styles = useStyles(); From 1f8ff7b01926051cc5fda30e6eeacc99b982690b Mon Sep 17 00:00:00 2001 From: YuanboXue-Amber Date: Fri, 5 Jan 2024 11:00:40 +0100 Subject: [PATCH 4/5] add // eslint-disable deprecation/deprecation to tests --- .../src/components/TimePicker/TimePicker.cy.tsx | 1 + .../src/components/TimePicker/TimePicker.test.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx index 01c127e4f8c071..6bd02035b53b23 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx @@ -1,3 +1,4 @@ +// eslint-disable deprecation/deprecation import * as React from 'react'; import { mount as mountBase } from '@cypress/react'; diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx index 927bc8f5f69a4f..e6001113019f71 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx @@ -1,3 +1,4 @@ +// eslint-disable deprecation/deprecation import * as React from 'react'; import { render, fireEvent } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; From fafa091c6d87cbd4d79997bb2252f1f50cca8243 Mon Sep 17 00:00:00 2001 From: YuanboXue-Amber Date: Fri, 5 Jan 2024 11:26:36 +0100 Subject: [PATCH 5/5] add eslint-disable deprecation/deprecation --- .../src/components/TimePicker/TimePicker.cy.tsx | 2 +- .../src/components/TimePicker/TimePicker.test.tsx | 2 +- .../src/components/TimePicker/TimePicker.tsx | 1 + .../src/components/TimePicker/TimePicker.types.ts | 1 + .../src/components/TimePicker/index.ts | 1 + .../src/components/TimePicker/timeMath.test.ts | 1 + .../src/components/TimePicker/useTimePicker.tsx | 1 + .../src/components/TimePicker/useTimePickerStyles.styles.ts | 1 + .../react-timepicker-compat-preview/src/index.ts | 1 + .../stories/TimePicker/TimePickerControlled.stories.tsx | 1 + .../stories/TimePicker/TimePickerDefault.stories.tsx | 1 + .../TimePicker/TimePickerFreeformCustomParsing.stories.tsx | 1 + .../TimePicker/TimePickerFreeformWithErrorHandling.stories.tsx | 1 + .../stories/TimePicker/TimePickerWithDatePicker.stories.tsx | 1 + .../stories/TimePicker/index.stories.tsx | 1 + 15 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx index 6bd02035b53b23..85d6fb162a3aee 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.cy.tsx @@ -1,4 +1,4 @@ -// eslint-disable deprecation/deprecation +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { mount as mountBase } from '@cypress/react'; diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx index e6001113019f71..fb6b6f54af0e7f 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.test.tsx @@ -1,4 +1,4 @@ -// eslint-disable deprecation/deprecation +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { render, fireEvent } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx index 237447919099b9..bfd6966c486dd1 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import type { ForwardRefComponent } from '@fluentui/react-utilities'; import { useTimePicker_unstable } from './useTimePicker'; diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts index c3371afc613948..46498526ff7fd4 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/TimePicker.types.ts @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import type { ComboboxSlots, ComboboxState, ComboboxProps, SelectionEvents } from '@fluentui/react-combobox'; import type { ComponentProps } from '@fluentui/react-utilities'; diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/index.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/index.ts index ec9749b359c983..08b70909de0d08 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/index.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/index.ts @@ -2,4 +2,5 @@ export * from './TimePicker'; export * from './TimePicker.types'; export * from './useTimePicker'; export * from './useTimePickerStyles.styles'; +// eslint-disable-next-line deprecation/deprecation export { formatDateToTimeString } from './timeMath'; diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.test.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.test.ts index a46d4a52ed2289..ed3e615657ee7a 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.test.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/timeMath.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import { dateToKey, keyToDate, diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx index 0e131342ba3619..29a73bd91c230f 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePicker.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { elementContains, diff --git a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts index ece941b2f362de..e402386f6babc4 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/components/TimePicker/useTimePickerStyles.styles.ts @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import { makeStyles, mergeClasses } from '@griffel/react'; import type { SlotClassNames } from '@fluentui/react-utilities'; import type { TimePickerSlots, TimePickerState } from './TimePicker.types'; diff --git a/packages/react-components/react-timepicker-compat-preview/src/index.ts b/packages/react-components/react-timepicker-compat-preview/src/index.ts index e90b420cb342cb..7ecf5d77ca46a8 100644 --- a/packages/react-components/react-timepicker-compat-preview/src/index.ts +++ b/packages/react-components/react-timepicker-compat-preview/src/index.ts @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ export { TimePicker, timePickerClassNames, diff --git a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerControlled.stories.tsx b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerControlled.stories.tsx index a0e9239bfb0342..da2bc0a59bc472 100644 --- a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerControlled.stories.tsx +++ b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerControlled.stories.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { Field, makeStyles } from '@fluentui/react-components'; import { TimePicker, TimePickerProps, formatDateToTimeString } from '@fluentui/react-timepicker-compat-preview'; diff --git a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerDefault.stories.tsx b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerDefault.stories.tsx index cd84a2f829f3c6..461776ffca3061 100644 --- a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerDefault.stories.tsx +++ b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerDefault.stories.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { Field, makeStyles } from '@fluentui/react-components'; import { TimePicker, TimePickerProps } from '@fluentui/react-timepicker-compat-preview'; diff --git a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformCustomParsing.stories.tsx b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformCustomParsing.stories.tsx index 702639551386f6..22a3fd16e796be 100644 --- a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformCustomParsing.stories.tsx +++ b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformCustomParsing.stories.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { Field, makeStyles } from '@fluentui/react-components'; import { TimePicker, TimePickerProps } from '@fluentui/react-timepicker-compat-preview'; diff --git a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformWithErrorHandling.stories.tsx b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformWithErrorHandling.stories.tsx index 945493048bb47f..70fb3007e86ee6 100644 --- a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformWithErrorHandling.stories.tsx +++ b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerFreeformWithErrorHandling.stories.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { Field, FieldProps, makeStyles } from '@fluentui/react-components'; import { TimePicker, TimePickerErrorType, TimePickerProps } from '@fluentui/react-timepicker-compat-preview'; diff --git a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerWithDatePicker.stories.tsx b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerWithDatePicker.stories.tsx index c19732eafccd14..db288733eb9c5b 100644 --- a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerWithDatePicker.stories.tsx +++ b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/TimePickerWithDatePicker.stories.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import * as React from 'react'; import { Field, makeStyles } from '@fluentui/react-components'; import { DatePicker, DatePickerProps } from '@fluentui/react-datepicker-compat'; diff --git a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/index.stories.tsx b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/index.stories.tsx index c82a96a16da05e..dfb5a6f63f6f3e 100644 --- a/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/index.stories.tsx +++ b/packages/react-components/react-timepicker-compat-preview/stories/TimePicker/index.stories.tsx @@ -1,3 +1,4 @@ +/* eslint-disable deprecation/deprecation */ import { TimePicker } from '@fluentui/react-timepicker-compat-preview'; import descriptionMd from './TimePickerDescription.md';