From 694272e705d2551c68d428bff5204d467c92fea2 Mon Sep 17 00:00:00 2001 From: Bernardo Sunderhus Date: Tue, 18 Apr 2023 08:49:29 +0000 Subject: [PATCH] chore(react-date-picker-compat): adopt custom JSX pragma --- ...er-compat-f143ceb3-20ad-4819-bf20-0dc080c494ef.json | 7 +++++++ .../react-datepicker-compat/package.json | 1 + .../src/components/DatePicker/renderDatePicker.tsx | 10 +++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 change/@fluentui-react-datepicker-compat-f143ceb3-20ad-4819-bf20-0dc080c494ef.json diff --git a/change/@fluentui-react-datepicker-compat-f143ceb3-20ad-4819-bf20-0dc080c494ef.json b/change/@fluentui-react-datepicker-compat-f143ceb3-20ad-4819-bf20-0dc080c494ef.json new file mode 100644 index 00000000000000..8104b06982e8c0 --- /dev/null +++ b/change/@fluentui-react-datepicker-compat-f143ceb3-20ad-4819-bf20-0dc080c494ef.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: adopt custom JSX pragma", + "packageName": "@fluentui/react-datepicker-compat", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-datepicker-compat/package.json b/packages/react-components/react-datepicker-compat/package.json index 8b5c5c2132295f..fea32a772edf8f 100644 --- a/packages/react-components/react-datepicker-compat/package.json +++ b/packages/react-components/react-datepicker-compat/package.json @@ -36,6 +36,7 @@ "dependencies": { "@fluentui/react-theme": "^9.1.7", "@fluentui/react-utilities": "^9.8.0", + "@fluentui/react-jsx-runtime": "9.0.0-alpha.1", "@fluentui/keyboard-keys": "^9.0.2", "@fluentui/react-field": "^9.1.0", "@fluentui/react-icons": "^2.0.196", diff --git a/packages/react-components/react-datepicker-compat/src/components/DatePicker/renderDatePicker.tsx b/packages/react-components/react-datepicker-compat/src/components/DatePicker/renderDatePicker.tsx index ec0bd1391b231d..c6e978b782ab04 100644 --- a/packages/react-components/react-datepicker-compat/src/components/DatePicker/renderDatePicker.tsx +++ b/packages/react-components/react-datepicker-compat/src/components/DatePicker/renderDatePicker.tsx @@ -1,6 +1,10 @@ -import * as React from 'react'; +/** @jsxRuntime classic */ +/** @jsx createElement */ + import { PopoverTrigger } from '@fluentui/react-popover'; -import { getSlots } from '@fluentui/react-utilities'; +import { createElement } from '@fluentui/react-jsx-runtime'; + +import { getSlotsNext } from '@fluentui/react-utilities'; import type { CalendarProps } from '../Calendar/Calendar.types'; import type { DatePickerSlots, DatePickerState } from './DatePicker.types'; import type { PopoverProps } from '@fluentui/react-popover'; @@ -9,7 +13,7 @@ import type { PopoverProps } from '@fluentui/react-popover'; * Render the final JSX of DatePicker */ export const renderDatePicker_unstable = (state: DatePickerState) => { - const { slots, slotProps } = getSlots(state); + const { slots, slotProps } = getSlotsNext(state); return (