diff --git a/.vscode/settings.json b/.vscode/settings.json index ff320b97c0..a9cfb3a071 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,7 @@ }, "eslint.enable": true, - "eslint.workingDirectories": [{ "pattern": "./packages/framework/eslint-config-rules" }], // use the common eslint config file + "eslint.workingDirectories": [{ "pattern": "./packages/configs/eslint-config-rules" }], // use the common eslint config file "explorer.fileNesting.enabled": true, "explorer.fileNesting.patterns": { diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47598bb0d3..62e0f82c71 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,8 +65,7 @@ Reach out to Samuel Freiberg with any questions related to E2E testing. 1. `index.ts` - This is the file listed as `main` inside your package.json and simply exports other files. - 1. `.tsx` - This is the file that will actually define your function component, and compose it into a higher order component with slots, theming, and design tokens. - Note that we need the comment `/** @jsxRuntime classic */ -/** @jsx withSlots */` at the top of this file. An explanation can be found in the comment at `packages/experimental/use-slots/src/withSlots.tsx` + 1. `.tsx` - This is the file that will actually define your function component, and compose it into a higher order component with slots, theming, and design tokens. - Note that we need the comment `/** @jsxImportSource @fluentui-react-native/framework-base */` at the top of this file. An explanation can be found in the comment at `packages/experimental/use-slots/src/withSlots.tsx` 1. `..tsx` (Optional) - Optional extra files to subdivide your code however you see fit. You can also add platform specific files as you see fit. diff --git a/apps/component-generator/component-templates/ComponentTemplate/src/ComponentName.tsx b/apps/component-generator/component-templates/ComponentTemplate/src/ComponentName.tsx index 0a1b0d3a43..64e79adaad 100644 --- a/apps/component-generator/component-templates/ComponentTemplate/src/ComponentName.tsx +++ b/apps/component-generator/component-templates/ComponentTemplate/src/ComponentName.tsx @@ -1,11 +1,12 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework */ import * as React from 'react'; import { View } from 'react-native'; -import { componentName, ComponentNameType, ComponentNameProps } from './ComponentName.types'; +import type { ComponentNameType, ComponentNameProps } from './ComponentName.types'; +import { componentName } from './ComponentName.types'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { stylingSettings } from './ComponentName.styling'; -import { compose, mergeProps, withSlots, UseSlots } from '@fluentui-react-native/framework'; +import type { UseSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { useComponentName } from './useComponentName'; /** * A function which determines if a set of styles should be applied to the component given the current state and props of the component-name. diff --git a/apps/fluent-tester/babel.config.js b/apps/fluent-tester/babel.config.js index 21ca3f7b3f..aa7d482ebf 100644 --- a/apps/fluent-tester/babel.config.js +++ b/apps/fluent-tester/babel.config.js @@ -1,3 +1 @@ -module.exports = { - presets: [['module:@react-native/babel-preset', { runtime: 'classic' }]], -}; +module.exports = require('@fluentui-react-native/babel-config'); diff --git a/apps/fluent-tester/package.json b/apps/fluent-tester/package.json index d246b99640..2e1f03eef8 100644 --- a/apps/fluent-tester/package.json +++ b/apps/fluent-tester/package.json @@ -105,6 +105,7 @@ "devDependencies": { "@babel/core": "^7.20.0", "@babel/runtime": "^7.20.0", + "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/experimental-native-font-metrics": "workspace:*", "@fluentui-react-native/focus-zone": "workspace:*", diff --git a/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx b/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx index cc05310dc2..92efc3e4fc 100644 --- a/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx +++ b/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx @@ -1,4 +1,4 @@ -import React, { useState, useCallback } from 'react'; +import { useState, useCallback } from 'react'; import type { FunctionComponent } from 'react'; import { View, Text, Platform } from 'react-native'; diff --git a/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx b/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx index 81c38341ca..c0d1e05de5 100644 --- a/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx +++ b/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Platform } from 'react-native'; import type { ColorValue } from 'react-native'; diff --git a/apps/win32/babel.config.js b/apps/win32/babel.config.js index f7b3da3b33..aa7d482ebf 100644 --- a/apps/win32/babel.config.js +++ b/apps/win32/babel.config.js @@ -1,3 +1 @@ -module.exports = { - presets: ['module:@react-native/babel-preset'], -}; +module.exports = require('@fluentui-react-native/babel-config'); diff --git a/apps/win32/package.json b/apps/win32/package.json index 37248eea80..0113b4f395 100644 --- a/apps/win32/package.json +++ b/apps/win32/package.json @@ -41,6 +41,7 @@ }, "devDependencies": { "@babel/core": "^7.20.0", + "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", diff --git a/change/@fluentui-react-native-4bfc2ee8-9c20-42fa-8041-8a994caa8bcf.json b/change/@fluentui-react-native-4bfc2ee8-9c20-42fa-8041-8a994caa8bcf.json new file mode 100644 index 0000000000..dd62ddb9d6 --- /dev/null +++ b/change/@fluentui-react-native-4bfc2ee8-9c20-42fa-8041-8a994caa8bcf.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui/react-native", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-avatar-09960bc9-e5a6-4dc7-aedf-eeac3688bd98.json b/change/@fluentui-react-native-avatar-09960bc9-e5a6-4dc7-aedf-eeac3688bd98.json new file mode 100644 index 0000000000..883dca423c --- /dev/null +++ b/change/@fluentui-react-native-avatar-09960bc9-e5a6-4dc7-aedf-eeac3688bd98.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/avatar", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-badge-a1d57d94-fb18-4046-8ee7-b6774698dba0.json b/change/@fluentui-react-native-badge-a1d57d94-fb18-4046-8ee7-b6774698dba0.json new file mode 100644 index 0000000000..d538c6319f --- /dev/null +++ b/change/@fluentui-react-native-badge-a1d57d94-fb18-4046-8ee7-b6774698dba0.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/badge", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-button-9248e4fe-6988-4eaa-8360-e24c43b890ed.json b/change/@fluentui-react-native-button-9248e4fe-6988-4eaa-8360-e24c43b890ed.json new file mode 100644 index 0000000000..0df8c447c9 --- /dev/null +++ b/change/@fluentui-react-native-button-9248e4fe-6988-4eaa-8360-e24c43b890ed.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/button", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-callout-30c3ca67-e8ba-4daa-9d57-cbc3ec99f941.json b/change/@fluentui-react-native-callout-30c3ca67-e8ba-4daa-9d57-cbc3ec99f941.json new file mode 100644 index 0000000000..18d0a76657 --- /dev/null +++ b/change/@fluentui-react-native-callout-30c3ca67-e8ba-4daa-9d57-cbc3ec99f941.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/callout", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-checkbox-6dfdfd35-c380-4527-9045-2606eb25f2d8.json b/change/@fluentui-react-native-checkbox-6dfdfd35-c380-4527-9045-2606eb25f2d8.json new file mode 100644 index 0000000000..40d478baa2 --- /dev/null +++ b/change/@fluentui-react-native-checkbox-6dfdfd35-c380-4527-9045-2606eb25f2d8.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/checkbox", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-chip-24f22b86-b15f-40df-988d-ca739b526a00.json b/change/@fluentui-react-native-chip-24f22b86-b15f-40df-988d-ca739b526a00.json new file mode 100644 index 0000000000..78d0b90201 --- /dev/null +++ b/change/@fluentui-react-native-chip-24f22b86-b15f-40df-988d-ca739b526a00.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/chip", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-composition-9e2757eb-0355-41d2-a214-aa65b6ff7b0d.json b/change/@fluentui-react-native-composition-9e2757eb-0355-41d2-a214-aa65b6ff7b0d.json new file mode 100644 index 0000000000..85deb03566 --- /dev/null +++ b/change/@fluentui-react-native-composition-9e2757eb-0355-41d2-a214-aa65b6ff7b0d.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/composition", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-contextual-menu-5a7d5755-2454-45e0-9e48-a935ea22aa40.json b/change/@fluentui-react-native-contextual-menu-5a7d5755-2454-45e0-9e48-a935ea22aa40.json new file mode 100644 index 0000000000..1e86a15ee5 --- /dev/null +++ b/change/@fluentui-react-native-contextual-menu-5a7d5755-2454-45e0-9e48-a935ea22aa40.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/contextual-menu", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-divider-4e39f1a6-fe0a-4db3-9614-183dad71abfc.json b/change/@fluentui-react-native-divider-4e39f1a6-fe0a-4db3-9614-183dad71abfc.json new file mode 100644 index 0000000000..dd17aea036 --- /dev/null +++ b/change/@fluentui-react-native-divider-4e39f1a6-fe0a-4db3-9614-183dad71abfc.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/divider", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-drawer-2a44ed1d-7418-4323-b266-355ad13ff939.json b/change/@fluentui-react-native-drawer-2a44ed1d-7418-4323-b266-355ad13ff939.json new file mode 100644 index 0000000000..7deff5d08b --- /dev/null +++ b/change/@fluentui-react-native-drawer-2a44ed1d-7418-4323-b266-355ad13ff939.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/drawer", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-dropdown-7f119070-8bde-4506-9e18-3d4ae54b38fb.json b/change/@fluentui-react-native-dropdown-7f119070-8bde-4506-9e18-3d4ae54b38fb.json new file mode 100644 index 0000000000..e5df54915e --- /dev/null +++ b/change/@fluentui-react-native-dropdown-7f119070-8bde-4506-9e18-3d4ae54b38fb.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/dropdown", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-activity-indicator-0017597c-ab5b-480f-bb1f-36c5a54750f1.json b/change/@fluentui-react-native-experimental-activity-indicator-0017597c-ab5b-480f-bb1f-36c5a54750f1.json new file mode 100644 index 0000000000..1a8ec2efed --- /dev/null +++ b/change/@fluentui-react-native-experimental-activity-indicator-0017597c-ab5b-480f-bb1f-36c5a54750f1.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-activity-indicator", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-appearance-additions-adbf1ac8-3071-4621-a99d-56f462f02407.json b/change/@fluentui-react-native-experimental-appearance-additions-adbf1ac8-3071-4621-a99d-56f462f02407.json new file mode 100644 index 0000000000..d469f23a82 --- /dev/null +++ b/change/@fluentui-react-native-experimental-appearance-additions-adbf1ac8-3071-4621-a99d-56f462f02407.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-appearance-additions", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-avatar-c68c31af-abc7-49f5-aaab-4edafae8f041.json b/change/@fluentui-react-native-experimental-avatar-c68c31af-abc7-49f5-aaab-4edafae8f041.json new file mode 100644 index 0000000000..5c6a1ed9c7 --- /dev/null +++ b/change/@fluentui-react-native-experimental-avatar-c68c31af-abc7-49f5-aaab-4edafae8f041.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-avatar", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-checkbox-933e00cc-19db-4608-b0fa-8cfa6b42c3f8.json b/change/@fluentui-react-native-experimental-checkbox-933e00cc-19db-4608-b0fa-8cfa6b42c3f8.json new file mode 100644 index 0000000000..e1c421e226 --- /dev/null +++ b/change/@fluentui-react-native-experimental-checkbox-933e00cc-19db-4608-b0fa-8cfa6b42c3f8.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-checkbox", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-expander-a61ea4e1-edd9-47c6-ae3c-7050b12826a7.json b/change/@fluentui-react-native-experimental-expander-a61ea4e1-edd9-47c6-ae3c-7050b12826a7.json new file mode 100644 index 0000000000..247b305bf9 --- /dev/null +++ b/change/@fluentui-react-native-experimental-expander-a61ea4e1-edd9-47c6-ae3c-7050b12826a7.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-expander", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-menu-button-40f4579f-74e5-4830-a707-c0d0e89e8d92.json b/change/@fluentui-react-native-experimental-menu-button-40f4579f-74e5-4830-a707-c0d0e89e8d92.json new file mode 100644 index 0000000000..bf47e35932 --- /dev/null +++ b/change/@fluentui-react-native-experimental-menu-button-40f4579f-74e5-4830-a707-c0d0e89e8d92.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-menu-button", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-shadow-2335230d-e03e-4232-9de1-64eac64b6a93.json b/change/@fluentui-react-native-experimental-shadow-2335230d-e03e-4232-9de1-64eac64b6a93.json new file mode 100644 index 0000000000..e96b7ffad9 --- /dev/null +++ b/change/@fluentui-react-native-experimental-shadow-2335230d-e03e-4232-9de1-64eac64b6a93.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-shadow", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-shimmer-76154866-f87d-405c-9fa5-f0e3c891263e.json b/change/@fluentui-react-native-experimental-shimmer-76154866-f87d-405c-9fa5-f0e3c891263e.json new file mode 100644 index 0000000000..c1caf3fe5d --- /dev/null +++ b/change/@fluentui-react-native-experimental-shimmer-76154866-f87d-405c-9fa5-f0e3c891263e.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-shimmer", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-focus-trap-zone-a09f211f-3f8e-4c15-8ec6-1604716044a4.json b/change/@fluentui-react-native-focus-trap-zone-a09f211f-3f8e-4c15-8ec6-1604716044a4.json new file mode 100644 index 0000000000..c6f0e5d080 --- /dev/null +++ b/change/@fluentui-react-native-focus-trap-zone-a09f211f-3f8e-4c15-8ec6-1604716044a4.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/focus-trap-zone", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-focus-zone-3421219c-f3c1-4c0d-914a-7cf95e8d557d.json b/change/@fluentui-react-native-focus-zone-3421219c-f3c1-4c0d-914a-7cf95e8d557d.json new file mode 100644 index 0000000000..3ffc877763 --- /dev/null +++ b/change/@fluentui-react-native-focus-zone-3421219c-f3c1-4c0d-914a-7cf95e8d557d.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/focus-zone", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-framework-766daf63-fe18-42dd-ae63-26d329d7a36a.json b/change/@fluentui-react-native-framework-766daf63-fe18-42dd-ae63-26d329d7a36a.json new file mode 100644 index 0000000000..9c9fb708e7 --- /dev/null +++ b/change/@fluentui-react-native-framework-766daf63-fe18-42dd-ae63-26d329d7a36a.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/framework", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-framework-base-478fb9c5-a6db-442b-8677-e06d462087b6.json b/change/@fluentui-react-native-framework-base-478fb9c5-a6db-442b-8677-e06d462087b6.json new file mode 100644 index 0000000000..7e3a784663 --- /dev/null +++ b/change/@fluentui-react-native-framework-base-478fb9c5-a6db-442b-8677-e06d462087b6.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/framework-base", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-icon-00b4c2a6-37d7-4306-b867-203e88a9fd85.json b/change/@fluentui-react-native-icon-00b4c2a6-37d7-4306-b867-203e88a9fd85.json new file mode 100644 index 0000000000..29c75593a3 --- /dev/null +++ b/change/@fluentui-react-native-icon-00b4c2a6-37d7-4306-b867-203e88a9fd85.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/icon", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-input-56f70a45-0a16-4de9-8e81-bb3285750818.json b/change/@fluentui-react-native-input-56f70a45-0a16-4de9-8e81-bb3285750818.json new file mode 100644 index 0000000000..7f4760d87b --- /dev/null +++ b/change/@fluentui-react-native-input-56f70a45-0a16-4de9-8e81-bb3285750818.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/input", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-interactive-hooks-1d7d8d8e-690d-4536-801d-f6fbffba5a95.json b/change/@fluentui-react-native-interactive-hooks-1d7d8d8e-690d-4536-801d-f6fbffba5a95.json new file mode 100644 index 0000000000..425879134f --- /dev/null +++ b/change/@fluentui-react-native-interactive-hooks-1d7d8d8e-690d-4536-801d-f6fbffba5a95.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/interactive-hooks", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-link-e1c9c169-73e7-4809-bb6f-9f1ada9ce58e.json b/change/@fluentui-react-native-link-e1c9c169-73e7-4809-bb6f-9f1ada9ce58e.json new file mode 100644 index 0000000000..bc28726d7b --- /dev/null +++ b/change/@fluentui-react-native-link-e1c9c169-73e7-4809-bb6f-9f1ada9ce58e.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/link", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-button-438d6f0a-279b-45ef-903b-f98e8c42a858.json b/change/@fluentui-react-native-menu-button-438d6f0a-279b-45ef-903b-f98e8c42a858.json new file mode 100644 index 0000000000..b393a2250a --- /dev/null +++ b/change/@fluentui-react-native-menu-button-438d6f0a-279b-45ef-903b-f98e8c42a858.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/menu-button", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-c1bed1d4-d936-4ba9-9b7d-61f6a54cc70a.json b/change/@fluentui-react-native-menu-c1bed1d4-d936-4ba9-9b7d-61f6a54cc70a.json new file mode 100644 index 0000000000..abd3393d20 --- /dev/null +++ b/change/@fluentui-react-native-menu-c1bed1d4-d936-4ba9-9b7d-61f6a54cc70a.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/menu", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-notification-e67aa402-3afe-449f-b140-d42c3e1c7b66.json b/change/@fluentui-react-native-notification-e67aa402-3afe-449f-b140-d42c3e1c7b66.json new file mode 100644 index 0000000000..fb6620d834 --- /dev/null +++ b/change/@fluentui-react-native-notification-e67aa402-3afe-449f-b140-d42c3e1c7b66.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/notification", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-overflow-13485534-62f4-482f-a5bf-6be3c2074593.json b/change/@fluentui-react-native-overflow-13485534-62f4-482f-a5bf-6be3c2074593.json new file mode 100644 index 0000000000..de9722aed2 --- /dev/null +++ b/change/@fluentui-react-native-overflow-13485534-62f4-482f-a5bf-6be3c2074593.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/overflow", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-persona-4bea6f18-e29a-4759-a5f6-29f9ab0eed50.json b/change/@fluentui-react-native-persona-4bea6f18-e29a-4759-a5f6-29f9ab0eed50.json new file mode 100644 index 0000000000..58f229280b --- /dev/null +++ b/change/@fluentui-react-native-persona-4bea6f18-e29a-4759-a5f6-29f9ab0eed50.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/persona", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-persona-coin-763e3e10-c0a6-4676-bda9-26d501ea59f9.json b/change/@fluentui-react-native-persona-coin-763e3e10-c0a6-4676-bda9-26d501ea59f9.json new file mode 100644 index 0000000000..372d450ef9 --- /dev/null +++ b/change/@fluentui-react-native-persona-coin-763e3e10-c0a6-4676-bda9-26d501ea59f9.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/persona-coin", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-popover-5635a65f-c4a4-400b-800b-5ef19280d368.json b/change/@fluentui-react-native-popover-5635a65f-c4a4-400b-800b-5ef19280d368.json new file mode 100644 index 0000000000..7c57e0afa7 --- /dev/null +++ b/change/@fluentui-react-native-popover-5635a65f-c4a4-400b-800b-5ef19280d368.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/popover", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-pressable-0f274370-43a0-4cc9-8383-86dde99be9b6.json b/change/@fluentui-react-native-pressable-0f274370-43a0-4cc9-8383-86dde99be9b6.json new file mode 100644 index 0000000000..a6344d7b1a --- /dev/null +++ b/change/@fluentui-react-native-pressable-0f274370-43a0-4cc9-8383-86dde99be9b6.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/pressable", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-radio-group-7e3bd67f-f7f5-4d0b-ae69-bc1196a29d94.json b/change/@fluentui-react-native-radio-group-7e3bd67f-f7f5-4d0b-ae69-bc1196a29d94.json new file mode 100644 index 0000000000..b37bf1b05d --- /dev/null +++ b/change/@fluentui-react-native-radio-group-7e3bd67f-f7f5-4d0b-ae69-bc1196a29d94.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/radio-group", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-separator-a54a9c99-a857-4cc0-9ba7-f8f53a5cee71.json b/change/@fluentui-react-native-separator-a54a9c99-a857-4cc0-9ba7-f8f53a5cee71.json new file mode 100644 index 0000000000..f0cdfc6243 --- /dev/null +++ b/change/@fluentui-react-native-separator-a54a9c99-a857-4cc0-9ba7-f8f53a5cee71.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/separator", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-spinner-873f2993-e123-436c-a402-3e682644f8fb.json b/change/@fluentui-react-native-spinner-873f2993-e123-436c-a402-3e682644f8fb.json new file mode 100644 index 0000000000..42a3e14fad --- /dev/null +++ b/change/@fluentui-react-native-spinner-873f2993-e123-436c-a402-3e682644f8fb.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/spinner", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-stack-9e7c4d67-554c-47e2-8ab8-75eec339719e.json b/change/@fluentui-react-native-stack-9e7c4d67-554c-47e2-8ab8-75eec339719e.json new file mode 100644 index 0000000000..f0a693aa89 --- /dev/null +++ b/change/@fluentui-react-native-stack-9e7c4d67-554c-47e2-8ab8-75eec339719e.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/stack", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-switch-3bbf9262-1730-4e5e-b6c3-83087c702b53.json b/change/@fluentui-react-native-switch-3bbf9262-1730-4e5e-b6c3-83087c702b53.json new file mode 100644 index 0000000000..d651034321 --- /dev/null +++ b/change/@fluentui-react-native-switch-3bbf9262-1730-4e5e-b6c3-83087c702b53.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/switch", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tablist-db2bf0ff-4fbf-457d-bc21-fdd7a3c645d3.json b/change/@fluentui-react-native-tablist-db2bf0ff-4fbf-457d-bc21-fdd7a3c645d3.json new file mode 100644 index 0000000000..211287a204 --- /dev/null +++ b/change/@fluentui-react-native-tablist-db2bf0ff-4fbf-457d-bc21-fdd7a3c645d3.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/tablist", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tester-8cecc612-844c-4a4b-b81b-87e63cdd8c75.json b/change/@fluentui-react-native-tester-8cecc612-844c-4a4b-b81b-87e63cdd8c75.json new file mode 100644 index 0000000000..903db275af --- /dev/null +++ b/change/@fluentui-react-native-tester-8cecc612-844c-4a4b-b81b-87e63cdd8c75.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/tester", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tester-win32-efc377e3-39a6-4173-a93d-7098e0019300.json b/change/@fluentui-react-native-tester-win32-efc377e3-39a6-4173-a93d-7098e0019300.json new file mode 100644 index 0000000000..a3d92d2b5d --- /dev/null +++ b/change/@fluentui-react-native-tester-win32-efc377e3-39a6-4173-a93d-7098e0019300.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch repo to use the jsx-runtime", + "packageName": "@fluentui-react-native/tester-win32", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-text-a75c1039-09b0-46aa-8f40-f753b49dca71.json b/change/@fluentui-react-native-text-a75c1039-09b0-46aa-8f40-f753b49dca71.json new file mode 100644 index 0000000000..810aa04235 --- /dev/null +++ b/change/@fluentui-react-native-text-a75c1039-09b0-46aa-8f40-f753b49dca71.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/text", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tooltip-feabf003-af85-4d39-8a90-78faf9bd9e96.json b/change/@fluentui-react-native-tooltip-feabf003-af85-4d39-8a90-78faf9bd9e96.json new file mode 100644 index 0000000000..792ec78f0f --- /dev/null +++ b/change/@fluentui-react-native-tooltip-feabf003-af85-4d39-8a90-78faf9bd9e96.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/tooltip", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-slot-df572b7f-6ba0-4358-8ae5-0c6b9f3f0c64.json b/change/@fluentui-react-native-use-slot-df572b7f-6ba0-4358-8ae5-0c6b9f3f0c64.json new file mode 100644 index 0000000000..05c5d45bcf --- /dev/null +++ b/change/@fluentui-react-native-use-slot-df572b7f-6ba0-4358-8ae5-0c6b9f3f0c64.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/use-slot", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-slots-14e2f1a7-2010-4efb-9430-0e4ac7fd8b04.json b/change/@fluentui-react-native-use-slots-14e2f1a7-2010-4efb-9430-0e4ac7fd8b04.json new file mode 100644 index 0000000000..72037048e8 --- /dev/null +++ b/change/@fluentui-react-native-use-slots-14e2f1a7-2010-4efb-9430-0e4ac7fd8b04.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/use-slots", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-vibrancy-view-f08ee803-af7c-46e2-8c28-f1fee52dd3ba.json b/change/@fluentui-react-native-vibrancy-view-f08ee803-af7c-46e2-8c28-f1fee52dd3ba.json new file mode 100644 index 0000000000..b8843e4bae --- /dev/null +++ b/change/@fluentui-react-native-vibrancy-view-f08ee803-af7c-46e2-8c28-f1fee52dd3ba.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@fluentui-react-native/vibrancy-view", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-foundation-composable-da289f0b-2985-4fd8-a42e-b6d1b28c7ca3.json b/change/@uifabricshared-foundation-composable-da289f0b-2985-4fd8-a42e-b6d1b28c7ca3.json new file mode 100644 index 0000000000..7099310e55 --- /dev/null +++ b/change/@uifabricshared-foundation-composable-da289f0b-2985-4fd8-a42e-b6d1b28c7ca3.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "convert repo to modern jsx-runtime", + "packageName": "@uifabricshared/foundation-composable", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/docs/pages/Theming/Tokens/UsageWithComponentTokens.md b/docs/pages/Theming/Tokens/UsageWithComponentTokens.md index 8a6a82b17d..35bf812aa0 100644 --- a/docs/pages/Theming/Tokens/UsageWithComponentTokens.md +++ b/docs/pages/Theming/Tokens/UsageWithComponentTokens.md @@ -7,8 +7,7 @@ This page covers how to access color tokens to fill out a component's tokens. Most components in FURN build a component's styling out of the tokens and theme that are fed into the component. The `compose` framework takes in an object with a `tokens` property, which you can use to define how a component's tokens are filled out. The `tokens` property can be assigned to a function which takes a `Theme` object as an argument and returns an object that is the component's `Token` type. Inside the function, you can access the alias function from the theme as you would if you had the theme inside a component's render function. ```tsx -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Theme, TokenSettings, buildProps, compose, mergeProps, withSlots, UseSlots } from '@fluentui-react-native/framework'; import { fontStyles } from '@fluentui-react-native/tokens'; import { Text } from '@fluentui-react-native/experimental-text'; diff --git a/packages/components/Avatar/package.json b/packages/components/Avatar/package.json index e92685ed83..58f8f471b5 100644 --- a/packages/components/Avatar/package.json +++ b/packages/components/Avatar/package.json @@ -36,6 +36,7 @@ "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/badge": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", "@fluentui-react-native/theming-utils": "workspace:*", diff --git a/packages/components/Avatar/src/Avatar.tsx b/packages/components/Avatar/src/Avatar.tsx index e85486e03c..4a3d006d27 100644 --- a/packages/components/Avatar/src/Avatar.tsx +++ b/packages/components/Avatar/src/Avatar.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Fragment } from 'react'; import { Image, View, Text, Platform } from 'react-native'; import { PresenceBadge } from '@fluentui-react-native/badge'; import type { UseSlots, Slots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon } from '@fluentui-react-native/icon'; import { Svg, Path } from 'react-native-svg'; diff --git a/packages/components/Avatar/src/__tests__/Avatar.test.tsx b/packages/components/Avatar/src/__tests__/Avatar.test.tsx index 494d8d6914..4a8ea62acc 100644 --- a/packages/components/Avatar/src/__tests__/Avatar.test.tsx +++ b/packages/components/Avatar/src/__tests__/Avatar.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Avatar } from '..'; diff --git a/packages/components/Badge/package.json b/packages/components/Badge/package.json index 3450a8d78a..126d6785e4 100644 --- a/packages/components/Badge/package.json +++ b/packages/components/Badge/package.json @@ -31,6 +31,7 @@ "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/experimental-shadow": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", diff --git a/packages/components/Badge/src/Badge.tsx b/packages/components/Badge/src/Badge.tsx index 2dd81b3f02..d91b5906d5 100644 --- a/packages/components/Badge/src/Badge.tsx +++ b/packages/components/Badge/src/Badge.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import { Children } from 'react'; import { View, I18nManager } from 'react-native'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Badge/src/CounterBadge/CounterBadge.tsx b/packages/components/Badge/src/CounterBadge/CounterBadge.tsx index 1e2d167231..38a0a6f783 100644 --- a/packages/components/Badge/src/CounterBadge/CounterBadge.tsx +++ b/packages/components/Badge/src/CounterBadge/CounterBadge.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import React, { Children } from 'react'; import { View, I18nManager } from 'react-native'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx b/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx index 274c65f3c9..00d83c153e 100644 --- a/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx +++ b/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View, Platform } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Svg, Path } from 'react-native-svg'; import { stylingSettings } from './PresenceBadge.styling'; diff --git a/packages/components/Badge/src/__tests__/Badge.test.tsx b/packages/components/Badge/src/__tests__/Badge.test.tsx index 107bf19ebd..0beab6e254 100644 --- a/packages/components/Badge/src/__tests__/Badge.test.tsx +++ b/packages/components/Badge/src/__tests__/Badge.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Badge, CounterBadge, PresenceBadge } from '../'; diff --git a/packages/components/Button/package.json b/packages/components/Button/package.json index b088718575..2f5e5ee36d 100644 --- a/packages/components/Button/package.json +++ b/packages/components/Button/package.json @@ -34,6 +34,7 @@ "@fluentui-react-native/experimental-activity-indicator": "workspace:*", "@fluentui-react-native/experimental-shadow": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/pressable": "workspace:*", diff --git a/packages/components/Button/src/Button.test.tsx b/packages/components/Button/src/Button.test.tsx index 5adf700072..e11d59ce08 100644 --- a/packages/components/Button/src/Button.test.tsx +++ b/packages/components/Button/src/Button.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Pressable, Text } from 'react-native'; import { Icon } from '@fluentui-react-native/icon'; diff --git a/packages/components/Button/src/Button.tsx b/packages/components/Button/src/Button.tsx index 7e498fbf9a..79a4c7a038 100644 --- a/packages/components/Button/src/Button.tsx +++ b/packages/components/Button/src/Button.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, memoize, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, memoize, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import type { IPressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx b/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx index b78ef38eb1..961cfaea3a 100644 --- a/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx +++ b/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import { compose } from '@fluentui-react-native/framework'; diff --git a/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx b/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx index 3e1d122b49..9b59759233 100644 --- a/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx +++ b/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { CompoundButton } from './CompoundButton'; diff --git a/packages/components/Button/src/CompoundButton/CompoundButton.tsx b/packages/components/Button/src/CompoundButton/CompoundButton.tsx index c48c0e17f1..46239b4c65 100644 --- a/packages/components/Button/src/CompoundButton/CompoundButton.tsx +++ b/packages/components/Button/src/CompoundButton/CompoundButton.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/FAB/FAB.mobile.tsx b/packages/components/Button/src/FAB/FAB.mobile.tsx index 2c041c1e90..df6b305ff5 100644 --- a/packages/components/Button/src/FAB/FAB.mobile.tsx +++ b/packages/components/Button/src/FAB/FAB.mobile.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import type { IPressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/FAB/FAB.test.tsx b/packages/components/Button/src/FAB/FAB.test.tsx index 29107b8b2b..fdbe970f17 100644 --- a/packages/components/Button/src/FAB/FAB.test.tsx +++ b/packages/components/Button/src/FAB/FAB.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { FAB } from './FAB'; diff --git a/packages/components/Button/src/FAB/FAB.tsx b/packages/components/Button/src/FAB/FAB.tsx index 2f75b6acbb..c19a2e2373 100644 --- a/packages/components/Button/src/FAB/FAB.tsx +++ b/packages/components/Button/src/FAB/FAB.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type * as React from 'react'; import { Pressable } from 'react-native'; diff --git a/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx b/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx index e9c2bf6e4e..7e0bc34376 100644 --- a/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx +++ b/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import { compose } from '@fluentui-react-native/framework'; diff --git a/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx b/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx index 91812fc1fc..c06bbea21d 100644 --- a/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx +++ b/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { ToggleButton } from './ToggleButton'; diff --git a/packages/components/Button/src/ToggleButton/ToggleButton.tsx b/packages/components/Button/src/ToggleButton/ToggleButton.tsx index cae9858d0b..a3fa7d89f4 100644 --- a/packages/components/Button/src/ToggleButton/ToggleButton.tsx +++ b/packages/components/Button/src/ToggleButton/ToggleButton.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/deprecated/Button.android.tsx b/packages/components/Button/src/deprecated/Button.android.tsx index 97c3b6919f..e755dfb0d4 100644 --- a/packages/components/Button/src/deprecated/Button.android.tsx +++ b/packages/components/Button/src/deprecated/Button.android.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Pressable, View } from 'react-native'; @@ -9,7 +8,6 @@ import { useAsPressable, useViewCommandFocus } from '@fluentui-react-native/inte import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Button/src/deprecated/Button.test.tsx b/packages/components/Button/src/deprecated/Button.test.tsx index 64e9897182..0232bff796 100644 --- a/packages/components/Button/src/deprecated/Button.test.tsx +++ b/packages/components/Button/src/deprecated/Button.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Button } from './Button'; diff --git a/packages/components/Button/src/deprecated/Button.tsx b/packages/components/Button/src/deprecated/Button.tsx index 2458998d13..36960622ee 100644 --- a/packages/components/Button/src/deprecated/Button.tsx +++ b/packages/components/Button/src/deprecated/Button.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -9,7 +8,6 @@ import { useAsPressable, useKeyProps, useViewCommandFocus, useOnPressWithFocus } import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Callout/package.json b/packages/components/Callout/package.json index 44e8ef5b63..01e69fb330 100644 --- a/packages/components/Callout/package.json +++ b/packages/components/Callout/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", "@uifabricshared/foundation-compose": "workspace:*", diff --git a/packages/components/Callout/src/__tests__/Callout.test.tsx b/packages/components/Callout/src/__tests__/Callout.test.tsx index f493264af0..8a11512f37 100644 --- a/packages/components/Callout/src/__tests__/Callout.test.tsx +++ b/packages/components/Callout/src/__tests__/Callout.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Callout } from '..'; diff --git a/packages/components/Checkbox/package.json b/packages/components/Checkbox/package.json index ef8df79374..41e6de8a8c 100644 --- a/packages/components/Checkbox/package.json +++ b/packages/components/Checkbox/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/pressable": "workspace:*", "@fluentui-react-native/styling-utils": "workspace:*", diff --git a/packages/components/Checkbox/src/Checkbox.macos.tsx b/packages/components/Checkbox/src/Checkbox.macos.tsx index 7a63492ae3..77c11aff65 100644 --- a/packages/components/Checkbox/src/Checkbox.macos.tsx +++ b/packages/components/Checkbox/src/Checkbox.macos.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import type { IViewProps } from '@fluentui-react-native/adapters'; diff --git a/packages/components/Checkbox/src/Checkbox.tsx b/packages/components/Checkbox/src/Checkbox.tsx index cc952be831..78834f4a95 100644 --- a/packages/components/Checkbox/src/Checkbox.tsx +++ b/packages/components/Checkbox/src/Checkbox.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Pressable, Platform } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Svg, Path } from 'react-native-svg'; diff --git a/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx b/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx index 2c1b5cf403..4ac3cd5e7e 100644 --- a/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx +++ b/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Text, View } from 'react-native'; import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; diff --git a/packages/components/Checkbox/src/deprecated/Checkbox.tsx b/packages/components/Checkbox/src/deprecated/Checkbox.tsx index 90adbb0ea4..14d54961ee 100644 --- a/packages/components/Checkbox/src/deprecated/Checkbox.tsx +++ b/packages/components/Checkbox/src/deprecated/Checkbox.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -16,7 +15,6 @@ import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import { backgroundColorTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Chip/package.json b/packages/components/Chip/package.json index ee66bd831a..7935eb6413 100644 --- a/packages/components/Chip/package.json +++ b/packages/components/Chip/package.json @@ -30,6 +30,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/text": "workspace:*", diff --git a/packages/components/Chip/src/Chip.mobile.tsx b/packages/components/Chip/src/Chip.mobile.tsx index e76ee4e31a..aeec473fc3 100644 --- a/packages/components/Chip/src/Chip.mobile.tsx +++ b/packages/components/Chip/src/Chip.mobile.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import { Children } from 'react'; import { Pressable, I18nManager } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Chip/src/Chip.tsx b/packages/components/Chip/src/Chip.tsx index 4b157ac062..9e424f884c 100644 --- a/packages/components/Chip/src/Chip.tsx +++ b/packages/components/Chip/src/Chip.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import { Pressable } from 'react-native'; diff --git a/packages/components/Chip/src/__tests__/Chip.test.tsx b/packages/components/Chip/src/__tests__/Chip.test.tsx index 88364d7be6..1cc1c1cad6 100644 --- a/packages/components/Chip/src/__tests__/Chip.test.tsx +++ b/packages/components/Chip/src/__tests__/Chip.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Chip } from '../'; diff --git a/packages/components/Chip/src/assets/DismissIcon.tsx b/packages/components/Chip/src/assets/DismissIcon.tsx index 13b3ba68e6..31b6add407 100644 --- a/packages/components/Chip/src/assets/DismissIcon.tsx +++ b/packages/components/Chip/src/assets/DismissIcon.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import Svg, { Path } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/components/ContextualMenu/package.json b/packages/components/ContextualMenu/package.json index ebb7f48e42..b82a3f12ff 100644 --- a/packages/components/ContextualMenu/package.json +++ b/packages/components/ContextualMenu/package.json @@ -36,6 +36,7 @@ "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/callout": "workspace:*", "@fluentui-react-native/focus-zone": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/text": "workspace:*", diff --git a/packages/components/ContextualMenu/src/ContextualMenu.tsx b/packages/components/ContextualMenu/src/ContextualMenu.tsx index f18aae018a..ad7aaa27ec 100644 --- a/packages/components/ContextualMenu/src/ContextualMenu.tsx +++ b/packages/components/ContextualMenu/src/ContextualMenu.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View, ScrollView, Platform } from 'react-native'; @@ -9,7 +8,6 @@ import type { IFocusable } from '@fluentui-react-native/interactive-hooks'; import { useSelectedKey } from '@fluentui-react-native/interactive-hooks'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/ContextualMenuItem.tsx b/packages/components/ContextualMenu/src/ContextualMenuItem.tsx index 4376af7526..2a78171f24 100644 --- a/packages/components/ContextualMenu/src/ContextualMenuItem.tsx +++ b/packages/components/ContextualMenu/src/ContextualMenuItem.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -8,7 +7,6 @@ import { useAsPressable, useKeyProps, useViewCommandFocus } from '@fluentui-reac import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/Submenu.tsx b/packages/components/ContextualMenu/src/Submenu.tsx index d49cd62621..efb1c2ebdc 100644 --- a/packages/components/ContextualMenu/src/Submenu.tsx +++ b/packages/components/ContextualMenu/src/Submenu.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View, ScrollView, Platform, I18nManager } from 'react-native'; @@ -9,7 +8,6 @@ import type { IFocusable } from '@fluentui-react-native/interactive-hooks'; import { useKeyDownProps, useSelectedKey } from '@fluentui-react-native/interactive-hooks'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/SubmenuItem.tsx b/packages/components/ContextualMenu/src/SubmenuItem.tsx index b8906df2d7..feadcbbe6d 100644 --- a/packages/components/ContextualMenu/src/SubmenuItem.tsx +++ b/packages/components/ContextualMenu/src/SubmenuItem.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { I18nManager, Platform, View } from 'react-native'; @@ -9,7 +8,6 @@ import { useKeyDownProps, useViewCommandFocus, useAsPressable } from '@fluentui- import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx b/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx index 7b73f23447..0a10ec2275 100644 --- a/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx +++ b/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { ContextualMenu } from '..'; diff --git a/packages/components/Divider/package.json b/packages/components/Divider/package.json index 23eccb7986..37e696299b 100644 --- a/packages/components/Divider/package.json +++ b/packages/components/Divider/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", diff --git a/packages/components/Divider/src/Divider.tsx b/packages/components/Divider/src/Divider.tsx index 962318ab07..32b6599ca8 100644 --- a/packages/components/Divider/src/Divider.tsx +++ b/packages/components/Divider/src/Divider.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ /** @jsxFrag */ import React from 'react'; import { View } from 'react-native'; import type { ViewProps } from 'react-native'; -import { withSlots, compressible, useSlot, useFluentTheme, patchTokens } from '@fluentui-react-native/framework'; +import { compressible, useSlot, useFluentTheme, patchTokens } from '@fluentui-react-native/framework'; import type { UseTokens } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import type { IconPropsV1 as IconProps } from '@fluentui-react-native/icon'; diff --git a/packages/components/Divider/src/__tests__/Divider.test.tsx b/packages/components/Divider/src/__tests__/Divider.test.tsx index f8fab53302..8da5a09735 100644 --- a/packages/components/Divider/src/__tests__/Divider.test.tsx +++ b/packages/components/Divider/src/__tests__/Divider.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Divider } from '../Divider'; diff --git a/packages/components/FocusTrapZone/package.json b/packages/components/FocusTrapZone/package.json index d9e2f5cc06..420c847bb2 100644 --- a/packages/components/FocusTrapZone/package.json +++ b/packages/components/FocusTrapZone/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", "@uifabricshared/foundation-settings": "workspace:*" diff --git a/packages/components/FocusZone/package.json b/packages/components/FocusZone/package.json index 7c6cb4edad..c81edf07e3 100644 --- a/packages/components/FocusZone/package.json +++ b/packages/components/FocusZone/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", "@uifabricshared/foundation-settings": "workspace:*" diff --git a/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx b/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx index 105b2ae6dd..592330be60 100644 --- a/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx +++ b/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Button } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Icon/package.json b/packages/components/Icon/package.json index aa62fdd5de..b63c63a133 100644 --- a/packages/components/Icon/package.json +++ b/packages/components/Icon/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/text": "workspace:*" }, "devDependencies": { diff --git a/packages/components/Icon/src/FontIcon/FontIcon.tsx b/packages/components/Icon/src/FontIcon/FontIcon.tsx index 5f518b8b2f..d847394391 100644 --- a/packages/components/Icon/src/FontIcon/FontIcon.tsx +++ b/packages/components/Icon/src/FontIcon/FontIcon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Text } from 'react-native'; import { mergeProps, stagedComponent } from '@fluentui-react-native/framework'; diff --git a/packages/components/Icon/src/Icon.tsx b/packages/components/Icon/src/Icon.tsx index 98303e31a1..1d5cab3601 100644 --- a/packages/components/Icon/src/Icon.tsx +++ b/packages/components/Icon/src/Icon.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { FontIcon } from './FontIcon/FontIcon'; import type { IconProps } from './Icon.types'; import { SvgIcon } from './SvgIcon/SvgIcon'; diff --git a/packages/components/Icon/src/SvgIcon/SvgIcon.tsx b/packages/components/Icon/src/SvgIcon/SvgIcon.tsx index 69a03e8aa6..51b046b62f 100644 --- a/packages/components/Icon/src/SvgIcon/SvgIcon.tsx +++ b/packages/components/Icon/src/SvgIcon/SvgIcon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Platform, View } from 'react-native'; import { mergeProps, stagedComponent } from '@fluentui-react-native/framework'; diff --git a/packages/components/Icon/src/__tests__/Icon.test.tsx b/packages/components/Icon/src/__tests__/Icon.test.tsx index e488ad1017..73b08bd533 100644 --- a/packages/components/Icon/src/__tests__/Icon.test.tsx +++ b/packages/components/Icon/src/__tests__/Icon.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { Path, Svg } from 'react-native-svg'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Icon/src/legacy/Icon.tsx b/packages/components/Icon/src/legacy/Icon.tsx index cba6fd9294..ee160fefe6 100644 --- a/packages/components/Icon/src/legacy/Icon.tsx +++ b/packages/components/Icon/src/legacy/Icon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Image, Platform, View } from 'react-native'; import type { ImageStyle, TextStyle } from 'react-native'; diff --git a/packages/components/Input/package.json b/packages/components/Input/package.json index aad34de986..ef4b17fce4 100644 --- a/packages/components/Input/package.json +++ b/packages/components/Input/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/styling-utils": "workspace:*", diff --git a/packages/components/Input/src/Input.mobile.tsx b/packages/components/Input/src/Input.mobile.tsx index 8ba3302ea2..5040b4a280 100644 --- a/packages/components/Input/src/Input.mobile.tsx +++ b/packages/components/Input/src/Input.mobile.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Fragment } from 'react'; import { Pressable, ScrollView, TextInput, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { createIconProps } from '@fluentui-react-native/icon'; import { Icon } from '@fluentui-react-native/icon'; import type { FocusState } from '@fluentui-react-native/interactive-hooks'; diff --git a/packages/components/Input/src/Input.tsx b/packages/components/Input/src/Input.tsx index 82554916cc..0537647d49 100644 --- a/packages/components/Input/src/Input.tsx +++ b/packages/components/Input/src/Input.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Pressable, ScrollView, TextInput, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; diff --git a/packages/components/Input/src/__tests__/Input.test.tsx b/packages/components/Input/src/__tests__/Input.test.tsx index 92701e6ca2..a57fdf81f8 100644 --- a/packages/components/Input/src/__tests__/Input.test.tsx +++ b/packages/components/Input/src/__tests__/Input.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Input } from '../Input'; diff --git a/packages/components/Link/package.json b/packages/components/Link/package.json index d92c3857ad..d3b7d906ba 100644 --- a/packages/components/Link/package.json +++ b/packages/components/Link/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", diff --git a/packages/components/Link/src/Link.tsx b/packages/components/Link/src/Link.tsx index 4b1f0bb906..c15c763e25 100644 --- a/packages/components/Link/src/Link.tsx +++ b/packages/components/Link/src/Link.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Platform, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { stylingSettings } from './Link.styling'; diff --git a/packages/components/Link/src/__tests__/Link.test.tsx b/packages/components/Link/src/__tests__/Link.test.tsx index 509dca3ab6..804d63307e 100644 --- a/packages/components/Link/src/__tests__/Link.test.tsx +++ b/packages/components/Link/src/__tests__/Link.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Alert } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Link/src/legacy/Link.tsx b/packages/components/Link/src/legacy/Link.tsx index 4f3717b8ef..0ca49364fd 100644 --- a/packages/components/Link/src/legacy/Link.tsx +++ b/packages/components/Link/src/legacy/Link.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Linking, View } from 'react-native'; @@ -8,7 +7,6 @@ import { useAsPressable, useKeyProps, useOnPressWithFocus, useViewCommandFocus } import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Link/src/legacy/__tests__/Link.test.tsx b/packages/components/Link/src/legacy/__tests__/Link.test.tsx index aaf811c259..c94e78f976 100644 --- a/packages/components/Link/src/legacy/__tests__/Link.test.tsx +++ b/packages/components/Link/src/legacy/__tests__/Link.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { View } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Menu/package.json b/packages/components/Menu/package.json index 9850ba9e64..c45793f051 100644 --- a/packages/components/Menu/package.json +++ b/packages/components/Menu/package.json @@ -34,6 +34,7 @@ "@fluentui-react-native/callout": "workspace:*", "@fluentui-react-native/focus-zone": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/text": "workspace:*", diff --git a/packages/components/Menu/src/MenuDivider/MenuDivider.tsx b/packages/components/Menu/src/MenuDivider/MenuDivider.tsx index 121d4904a2..69c266b486 100644 --- a/packages/components/Menu/src/MenuDivider/MenuDivider.tsx +++ b/packages/components/Menu/src/MenuDivider/MenuDivider.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { stylingSettings } from './MenuDivider.styling'; import type { MenuDividerProps, MenuDividerType } from './MenuDivider.types'; diff --git a/packages/components/Menu/src/MenuGroup/MenuGroup.tsx b/packages/components/Menu/src/MenuGroup/MenuGroup.tsx index c7780cdb3f..45e60d98e5 100644 --- a/packages/components/Menu/src/MenuGroup/MenuGroup.tsx +++ b/packages/components/Menu/src/MenuGroup/MenuGroup.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Platform, View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { UseSlots } from '@fluentui-react-native/framework'; import type { MenuGroupProps, MenuGroupType } from './MenuGroup.types'; diff --git a/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx b/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx index f01fbb05f2..f2ea3abf0a 100644 --- a/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx +++ b/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx @@ -1,8 +1,7 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { UseSlots } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Menu/src/MenuItem/MenuItem.tsx b/packages/components/Menu/src/MenuItem/MenuItem.tsx index 994f48028d..f59928f95f 100644 --- a/packages/components/Menu/src/MenuItem/MenuItem.tsx +++ b/packages/components/Menu/src/MenuItem/MenuItem.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { I18nManager, Image, Pressable, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, memoize, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, memoize, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { SvgXml } from 'react-native-svg'; diff --git a/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx b/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx index 2f734d2294..a211a660ba 100644 --- a/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx +++ b/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Image, Platform, Pressable, View } from 'react-native'; import type { Slots, UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { SvgXml } from 'react-native-svg'; diff --git a/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx b/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx index b4d703aa00..9847960194 100644 --- a/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx +++ b/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Image, Platform, Pressable, View } from 'react-native'; import type { Slots, UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { SvgXml } from 'react-native-svg'; diff --git a/packages/components/Menu/src/MenuList/MenuList.tsx b/packages/components/Menu/src/MenuList/MenuList.tsx index 90d2785971..e83af30d5f 100644 --- a/packages/components/Menu/src/MenuList/MenuList.tsx +++ b/packages/components/Menu/src/MenuList/MenuList.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Platform, ScrollView, View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { stylingSettings } from './MenuList.styling'; import type { MenuListProps, MenuListState, MenuListType } from './MenuList.types'; diff --git a/packages/components/Menu/src/__tests__/Menu.test.tsx b/packages/components/Menu/src/__tests__/Menu.test.tsx index 7fc6cce6eb..96f7396e41 100644 --- a/packages/components/Menu/src/__tests__/Menu.test.tsx +++ b/packages/components/Menu/src/__tests__/Menu.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { ButtonV1 as Button } from '@fluentui-react-native/button'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/MenuButton/package.json b/packages/components/MenuButton/package.json index 3322611c85..bd5c643d45 100644 --- a/packages/components/MenuButton/package.json +++ b/packages/components/MenuButton/package.json @@ -35,6 +35,7 @@ "dependencies": { "@fluentui-react-native/button": "workspace:*", "@fluentui-react-native/contextual-menu": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", diff --git a/packages/components/MenuButton/src/MenuButton.macos.tsx b/packages/components/MenuButton/src/MenuButton.macos.tsx index f7b9bc7684..88fb896cd8 100644 --- a/packages/components/MenuButton/src/MenuButton.macos.tsx +++ b/packages/components/MenuButton/src/MenuButton.macos.tsx @@ -4,8 +4,7 @@ * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Image } from 'react-native'; import type { ImageResolvedAssetSource } from 'react-native'; @@ -13,7 +12,6 @@ import type { IconProps } from '@fluentui-react-native/icon'; import { createIconProps } from '@fluentui-react-native/icon'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/MenuButton/src/MenuButton.tsx b/packages/components/MenuButton/src/MenuButton.tsx index 1622b626f6..10bf210b10 100644 --- a/packages/components/MenuButton/src/MenuButton.tsx +++ b/packages/components/MenuButton/src/MenuButton.tsx @@ -1,12 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React, { useRef, useState, useCallback } from 'react'; import { ButtonV1 as Button } from '@fluentui-react-native/button'; import { ContextualMenu, ContextualMenuItem, SubmenuItem, Submenu } from '@fluentui-react-native/contextual-menu'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx b/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx index 9a88ddb5fb..493f5875fa 100644 --- a/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx +++ b/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import type { MenuButtonItemProps } from '..'; diff --git a/packages/components/Notification/package.json b/packages/components/Notification/package.json index 93e19dda40..9acf1fa273 100644 --- a/packages/components/Notification/package.json +++ b/packages/components/Notification/package.json @@ -35,6 +35,7 @@ "@fluentui-react-native/experimental-appearance-additions": "workspace:*", "@fluentui-react-native/experimental-shadow": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/pressable": "workspace:*", diff --git a/packages/components/Notification/src/Notification.tsx b/packages/components/Notification/src/Notification.tsx index c5f460dd00..f3d1980ff3 100644 --- a/packages/components/Notification/src/Notification.tsx +++ b/packages/components/Notification/src/Notification.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { PressableProps, ViewStyle, ViewProps } from 'react-native'; import { useWindowDimensions, View } from 'react-native'; @@ -7,7 +6,7 @@ import type { SizeClassIOS } from '@fluentui-react-native/experimental-appearanc import { useHorizontalSizeClass } from '@fluentui-react-native/experimental-appearance-additions'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, memoize } from '@fluentui-react-native/framework'; +import { compose, mergeProps, memoize } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; import { Pressable } from '@fluentui-react-native/pressable'; diff --git a/packages/components/Notification/src/__tests__/Notification.test.tsx b/packages/components/Notification/src/__tests__/Notification.test.tsx index b6c1d40053..3bfdba8488 100644 --- a/packages/components/Notification/src/__tests__/Notification.test.tsx +++ b/packages/components/Notification/src/__tests__/Notification.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Notification } from '../Notification'; diff --git a/packages/components/Persona/package.json b/packages/components/Persona/package.json index 29e01ede34..1d5c4fb799 100644 --- a/packages/components/Persona/package.json +++ b/packages/components/Persona/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/persona-coin": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", diff --git a/packages/components/Persona/src/Persona.tsx b/packages/components/Persona/src/Persona.tsx index 8fd71d4757..a5e62ed761 100644 --- a/packages/components/Persona/src/Persona.tsx +++ b/packages/components/Persona/src/Persona.tsx @@ -1,12 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View, Text } from 'react-native'; import { filterViewProps } from '@fluentui-react-native/adapters'; import { PersonaCoin } from '@fluentui-react-native/persona-coin'; import { foregroundColorTokens } from '@fluentui-react-native/tokens'; import type { ISlots, IRenderData } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/PersonaCoin/package.json b/packages/components/PersonaCoin/package.json index e065d7dc3f..aa584c1049 100644 --- a/packages/components/PersonaCoin/package.json +++ b/packages/components/PersonaCoin/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", diff --git a/packages/components/PersonaCoin/src/PersonaCoin.tsx b/packages/components/PersonaCoin/src/PersonaCoin.tsx index f215f3da22..a3eb4ec57d 100644 --- a/packages/components/PersonaCoin/src/PersonaCoin.tsx +++ b/packages/components/PersonaCoin/src/PersonaCoin.tsx @@ -1,11 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Image, View, Text } from 'react-native'; import { filterViewProps, filterImageProps } from '@fluentui-react-native/adapters'; import { foregroundColorTokens } from '@fluentui-react-native/tokens'; import type { ISlots, IRenderData } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import { compose } from '@uifabricshared/foundation-compose'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Pressable/package.json b/packages/components/Pressable/package.json index ac5230b02b..66b3062f64 100644 --- a/packages/components/Pressable/package.json +++ b/packages/components/Pressable/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", "@uifabricshared/foundation-settings": "workspace:*" diff --git a/packages/components/RadioGroup/package.json b/packages/components/RadioGroup/package.json index 71b1b00f8d..88a4f32126 100644 --- a/packages/components/RadioGroup/package.json +++ b/packages/components/RadioGroup/package.json @@ -33,6 +33,7 @@ "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/focus-zone": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/pressable": "workspace:*", "@fluentui-react-native/text": "workspace:*", diff --git a/packages/components/RadioGroup/src/Radio/Radio.ios.tsx b/packages/components/RadioGroup/src/Radio/Radio.ios.tsx index b0c8a0e548..719c7970d0 100644 --- a/packages/components/RadioGroup/src/Radio/Radio.ios.tsx +++ b/packages/components/RadioGroup/src/Radio/Radio.ios.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Platform, Pressable, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { PressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Svg, Path } from 'react-native-svg'; diff --git a/packages/components/RadioGroup/src/Radio/Radio.tsx b/packages/components/RadioGroup/src/Radio/Radio.tsx index 4cf0a79548..04eebafbd5 100644 --- a/packages/components/RadioGroup/src/Radio/Radio.tsx +++ b/packages/components/RadioGroup/src/Radio/Radio.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Platform, Pressable, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { PressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx b/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx index b7f874fd08..6432d26b28 100644 --- a/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx +++ b/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Radio } from '../Radio'; diff --git a/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx b/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx index b38e8d91df..fc73041ea4 100644 --- a/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx +++ b/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { stylingSettings } from './RadioGroup.styling'; diff --git a/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx b/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx index a511530af4..faa4035cf0 100644 --- a/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx +++ b/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Radio } from '../../Radio/Radio'; diff --git a/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx b/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx index 6421435ed9..1f66031b44 100644 --- a/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx @@ -1,14 +1,7 @@ -/** - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * @format - */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import { compose } from '@uifabricshared/foundation-compose'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/RadioButton.tsx b/packages/components/RadioGroup/src/legacy/RadioButton.tsx index 9531c16398..c1e1da3364 100644 --- a/packages/components/RadioGroup/src/legacy/RadioButton.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioButton.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ 'use strict'; import * as React from 'react'; import { View } from 'react-native'; @@ -9,7 +8,6 @@ import { useAsPressable, useOnPressWithFocus, useViewCommandFocus } from '@fluen import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens, backgroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx b/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx index 743cac7ef3..e023d6ae1f 100644 --- a/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ 'use strict'; import * as React from 'react'; import { View, I18nManager } from 'react-native'; @@ -10,7 +9,6 @@ import { useAsPressable, useViewCommandFocus, useKeyDownProps } from '@fluentui- import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens, backgroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/RadioGroup.tsx b/packages/components/RadioGroup/src/legacy/RadioGroup.tsx index 8b07d860e3..64e0da5017 100644 --- a/packages/components/RadioGroup/src/legacy/RadioGroup.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioGroup.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -8,7 +7,6 @@ import { useSelectedKey } from '@fluentui-react-native/interactive-hooks'; import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx b/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx index fb6687f4b7..e53b765d38 100644 --- a/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx +++ b/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { RadioButton } from '../RadioButton'; diff --git a/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx b/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx index e9f0d3630b..dd30dd81c2 100644 --- a/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx +++ b/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { View } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Separator/package.json b/packages/components/Separator/package.json index 8add1f9a55..19a39e22ab 100644 --- a/packages/components/Separator/package.json +++ b/packages/components/Separator/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", "@fluentui-react-native/use-styling": "workspace:*" }, diff --git a/packages/components/Separator/src/Separator.tsx b/packages/components/Separator/src/Separator.tsx index c1d7da969d..8763125539 100644 --- a/packages/components/Separator/src/Separator.tsx +++ b/packages/components/Separator/src/Separator.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './Separator.styling'; import type { SeparatorProps, SeparatorType } from './Separator.types'; diff --git a/packages/components/Separator/src/__tests__/Separator.test.tsx b/packages/components/Separator/src/__tests__/Separator.test.tsx index 66b11a12ed..cce9c3232b 100644 --- a/packages/components/Separator/src/__tests__/Separator.test.tsx +++ b/packages/components/Separator/src/__tests__/Separator.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Separator } from '..'; diff --git a/packages/components/Stack/package.json b/packages/components/Stack/package.json index e89c5cdb0b..52c149bdd7 100644 --- a/packages/components/Stack/package.json +++ b/packages/components/Stack/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", "@uifabricshared/foundation-composable": "workspace:*", "@uifabricshared/foundation-compose": "workspace:*", diff --git a/packages/components/Stack/src/Stack.tsx b/packages/components/Stack/src/Stack.tsx index 6d1fd2a4a3..93ac975c79 100644 --- a/packages/components/Stack/src/Stack.tsx +++ b/packages/components/Stack/src/Stack.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import type { StyleProp, ViewStyle } from 'react-native'; @@ -7,7 +6,6 @@ import type { StyleProp, ViewStyle } from 'react-native'; import { filterViewProps } from '@fluentui-react-native/adapters'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Stack/src/__tests__/Stack.test.tsx b/packages/components/Stack/src/__tests__/Stack.test.tsx index 43739a340c..b3d800d649 100644 --- a/packages/components/Stack/src/__tests__/Stack.test.tsx +++ b/packages/components/Stack/src/__tests__/Stack.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { Text } from '@fluentui-react-native/text'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Switch/package.json b/packages/components/Switch/package.json index f45fd5c73e..2528ce0e9b 100644 --- a/packages/components/Switch/package.json +++ b/packages/components/Switch/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@fluentui-react-native/theming-utils": "workspace:*", diff --git a/packages/components/Switch/src/Switch.tsx b/packages/components/Switch/src/Switch.tsx index b30ef92628..ed546c91ca 100644 --- a/packages/components/Switch/src/Switch.tsx +++ b/packages/components/Switch/src/Switch.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { StyleProp, TextStyle } from 'react-native'; import { View, AccessibilityInfo, Pressable, Animated, Platform } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, memoize, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, memoize, mergeProps } from '@fluentui-react-native/framework'; import { Text } from '@fluentui-react-native/text'; import { stylingSettings } from './Switch.styling'; diff --git a/packages/components/Switch/src/__tests__/Switch.test.tsx b/packages/components/Switch/src/__tests__/Switch.test.tsx index b8f43b9012..a2412548c9 100644 --- a/packages/components/Switch/src/__tests__/Switch.test.tsx +++ b/packages/components/Switch/src/__tests__/Switch.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Switch } from '../Switch'; diff --git a/packages/components/TabList/package.json b/packages/components/TabList/package.json index 066bf29b5a..daf06a40ae 100644 --- a/packages/components/TabList/package.json +++ b/packages/components/TabList/package.json @@ -33,6 +33,7 @@ "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/focus-zone": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/icon": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/text": "workspace:*", diff --git a/packages/components/TabList/src/Tab/Tab.tsx b/packages/components/TabList/src/Tab/Tab.tsx index caeb7308a7..d6a8ceb50f 100644 --- a/packages/components/TabList/src/Tab/Tab.tsx +++ b/packages/components/TabList/src/Tab/Tab.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ /** @jsxFrag */ import React from 'react'; @@ -7,7 +6,7 @@ import { View, Pressable } from 'react-native'; import type { ViewProps } from 'react-native'; import type { UseTokens } from '@fluentui-react-native/framework'; -import { withSlots, compressible, useSlot, useFluentTheme, applyTokenLayers, mergeProps } from '@fluentui-react-native/framework'; +import { compressible, useSlot, useFluentTheme, applyTokenLayers, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import type { IconPropsV1 as IconProps } from '@fluentui-react-native/icon'; import type { PressablePropsExtended } from '@fluentui-react-native/interactive-hooks'; diff --git a/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx b/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx index b99d4aa52f..d85663f286 100644 --- a/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx +++ b/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import Tab from '../Tab'; diff --git a/packages/components/TabList/src/TabList/TabList.tsx b/packages/components/TabList/src/TabList/TabList.tsx index e78aee657a..450a906dba 100644 --- a/packages/components/TabList/src/TabList/TabList.tsx +++ b/packages/components/TabList/src/TabList/TabList.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './TabList.styling'; import type { TabListType, TabListProps } from './TabList.types'; diff --git a/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx b/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx index 3542a29502..af4ca45659 100644 --- a/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx +++ b/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import Tab from '../../Tab/Tab'; diff --git a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx index a811fded97..7aee136acd 100644 --- a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx +++ b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx @@ -1,5 +1,3 @@ -/** @jsxRuntime classic */ -import React from 'react'; import { Animated } from 'react-native'; import { stagedComponent } from '@fluentui-react-native/framework'; diff --git a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx index 470b12a37b..11732f552c 100644 --- a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx +++ b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx @@ -1,6 +1,3 @@ -/** @jsxRuntime classic */ - -import React from 'react'; import { View } from 'react-native'; import type { Animated, ViewProps, ViewStyle } from 'react-native'; diff --git a/packages/components/Text/package.json b/packages/components/Text/package.json index 0a4e9c1f54..a149a33acd 100644 --- a/packages/components/Text/package.json +++ b/packages/components/Text/package.json @@ -32,6 +32,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", diff --git a/packages/components/Text/src/Text.tsx b/packages/components/Text/src/Text.tsx index 00b5794c52..f6b7c607c4 100644 --- a/packages/components/Text/src/Text.tsx +++ b/packages/components/Text/src/Text.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { I18nManager, Platform, Text as RNText } from 'react-native'; import type { UseTokens, FontWeightValue } from '@fluentui-react-native/framework'; -import { fontStyles, withSlots, useFluentTheme, mergeStyles, compressible, patchTokens } from '@fluentui-react-native/framework'; +import { fontStyles, useFluentTheme, mergeStyles, compressible, patchTokens } from '@fluentui-react-native/framework'; import { useKeyProps } from '@fluentui-react-native/interactive-hooks'; import { globalTokens } from '@fluentui-react-native/theme-tokens'; diff --git a/packages/components/Text/src/__tests__/Text.test.tsx b/packages/components/Text/src/__tests__/Text.test.tsx index 54189475dc..49849f43fc 100644 --- a/packages/components/Text/src/__tests__/Text.test.tsx +++ b/packages/components/Text/src/__tests__/Text.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Text } from '../Text'; diff --git a/packages/configs/babel-config/babel.config.js b/packages/configs/babel-config/babel.config.js index 975b636e48..c983ab96be 100644 --- a/packages/configs/babel-config/babel.config.js +++ b/packages/configs/babel-config/babel.config.js @@ -7,16 +7,7 @@ module.exports = { targets: { node: 'current' }, }, ], - '@babel/preset-react', ['@babel/preset-typescript', { allowSyntheticDefaultImports: true }], ['module:@react-native/babel-preset', { runtime: 'automatic' }], ], - overrides: [ - { - plugins: [ - [require('@babel/plugin-transform-react-jsx'), { runtime: 'automatic' }], - [require('@babel/plugin-transform-react-jsx-source')], - ], - }, - ], }; diff --git a/packages/configs/babel-config/babel.react.config.js b/packages/configs/babel-config/babel.react.config.js index 3bac67a819..6dcf6634a9 100644 --- a/packages/configs/babel-config/babel.react.config.js +++ b/packages/configs/babel-config/babel.react.config.js @@ -7,7 +7,7 @@ module.exports = { targets: { node: 'current' }, }, ], - '@babel/preset-react', + ['@babel/preset-react', { runtime: 'automatic' }], ['@babel/preset-typescript', { allowSyntheticDefaultImports: true }], ], overrides: [ diff --git a/packages/framework/eslint-config-rules/.npmignore b/packages/configs/eslint-config-rules/.npmignore similarity index 100% rename from packages/framework/eslint-config-rules/.npmignore rename to packages/configs/eslint-config-rules/.npmignore diff --git a/packages/framework/eslint-config-rules/CHANGELOG.json b/packages/configs/eslint-config-rules/CHANGELOG.json similarity index 100% rename from packages/framework/eslint-config-rules/CHANGELOG.json rename to packages/configs/eslint-config-rules/CHANGELOG.json diff --git a/packages/framework/eslint-config-rules/CHANGELOG.md b/packages/configs/eslint-config-rules/CHANGELOG.md similarity index 100% rename from packages/framework/eslint-config-rules/CHANGELOG.md rename to packages/configs/eslint-config-rules/CHANGELOG.md diff --git a/packages/framework/eslint-config-rules/eslint.config.js b/packages/configs/eslint-config-rules/eslint.config.js similarity index 97% rename from packages/framework/eslint-config-rules/eslint.config.js rename to packages/configs/eslint-config-rules/eslint.config.js index 962857bc76..4a18897f48 100644 --- a/packages/framework/eslint-config-rules/eslint.config.js +++ b/packages/configs/eslint-config-rules/eslint.config.js @@ -38,6 +38,8 @@ module.exports = [ 'no-prototype-builtins': 'off', 'no-undef': 'off', 'react/display-name': 'off', + 'react/react-in-jsx-scope': 'off', + 'react/jsx-uses-react': 'off', 'react-hooks/exhaustive-deps': 'off', // This should be fixed in the future but is a big change 'no-restricted-exports': [ 'error', diff --git a/packages/framework/eslint-config-rules/package.json b/packages/configs/eslint-config-rules/package.json similarity index 100% rename from packages/framework/eslint-config-rules/package.json rename to packages/configs/eslint-config-rules/package.json diff --git a/packages/framework/eslint-config-rules/tsconfig.json b/packages/configs/eslint-config-rules/tsconfig.json similarity index 100% rename from packages/framework/eslint-config-rules/tsconfig.json rename to packages/configs/eslint-config-rules/tsconfig.json diff --git a/packages/deprecated/foundation-composable/docs/GuideHOC.md b/packages/deprecated/foundation-composable/docs/GuideHOC.md index 7464541dc7..3c5d870458 100644 --- a/packages/deprecated/foundation-composable/docs/GuideHOC.md +++ b/packages/deprecated/foundation-composable/docs/GuideHOC.md @@ -113,8 +113,7 @@ Here we will use the same interfaces and helpers but implement `ButtonBase` and We will use the optional TState to pass additional arguments between `usePrepareProps` and `render`. Note that the state can be anything, it is simply a payload to be passed from one function to the next. ```tsx -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ export interface IButtonState { disabled?: boolean; diff --git a/packages/experimental/ActivityIndicator/package.json b/packages/experimental/ActivityIndicator/package.json index 1177c5c131..fb78cd70fd 100644 --- a/packages/experimental/ActivityIndicator/package.json +++ b/packages/experimental/ActivityIndicator/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "assert-never": "^1.2.1" }, "devDependencies": { diff --git a/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx b/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx index e213cf0d4f..b070182f20 100644 --- a/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx +++ b/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { useRef, useEffect, useCallback } from 'react'; import { Animated, Easing, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildUseStyling } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildUseStyling } from '@fluentui-react-native/framework'; import { Svg, Path } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx b/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx index c9e81c5a7c..569b212ff6 100644 --- a/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx +++ b/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { ActivityIndicator as CoreActivityIndicator } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { coreStylingSettings } from './ActivityIndicator.styling'; import type { CoreActivityIndicatorType, ActivityIndicatorProps } from './ActivityIndicator.types'; diff --git a/packages/experimental/AppearanceAdditions/package.json b/packages/experimental/AppearanceAdditions/package.json index 561f976044..cf85a2a02a 100644 --- a/packages/experimental/AppearanceAdditions/package.json +++ b/packages/experimental/AppearanceAdditions/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "use-subscription": "^1.11.0" }, "devDependencies": { diff --git a/packages/experimental/Avatar/package.json b/packages/experimental/Avatar/package.json index c8ffd2d8d5..d3f15a0496 100644 --- a/packages/experimental/Avatar/package.json +++ b/packages/experimental/Avatar/package.json @@ -33,7 +33,8 @@ "directory": "packages/experimental/Avatar" }, "dependencies": { - "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/experimental/Avatar/src/NativeAvatar.tsx b/packages/experimental/Avatar/src/NativeAvatar.tsx index 5610b2f1fe..a4770e90be 100644 --- a/packages/experimental/Avatar/src/NativeAvatar.tsx +++ b/packages/experimental/Avatar/src/NativeAvatar.tsx @@ -3,13 +3,12 @@ * Licensed under the MIT License. * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ImageURISource, ViewProps, ColorValue } from 'react-native'; import { NativeModules, TurboModuleRegistry } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, buildProps, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, buildProps, mergeProps } from '@fluentui-react-native/framework'; const avatarName = 'NativeAvatar'; diff --git a/packages/experimental/Checkbox/package.json b/packages/experimental/Checkbox/package.json index 52ee3707e7..737b8a3cd4 100644 --- a/packages/experimental/Checkbox/package.json +++ b/packages/experimental/Checkbox/package.json @@ -32,7 +32,8 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/checkbox": "workspace:*", - "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/experimental/Checkbox/src/Checkbox.macos.tsx b/packages/experimental/Checkbox/src/Checkbox.macos.tsx index 7880e9f076..5ef72c1070 100644 --- a/packages/experimental/Checkbox/src/Checkbox.macos.tsx +++ b/packages/experimental/Checkbox/src/Checkbox.macos.tsx @@ -1,15 +1,9 @@ -/** - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * @format - */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { IViewProps } from '@fluentui-react-native/adapters'; import type { CheckboxTokens, CheckboxProps, CheckboxState } from '@fluentui-react-native/checkbox'; import { checkboxName } from '@fluentui-react-native/checkbox'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildProps } from '@fluentui-react-native/framework'; import NativeCheckboxView from './MacOSCheckboxNativeComponent'; diff --git a/packages/experimental/Checkbox/src/Checkbox.tsx b/packages/experimental/Checkbox/src/Checkbox.tsx index 4601ee9541..02740895ba 100644 --- a/packages/experimental/Checkbox/src/Checkbox.tsx +++ b/packages/experimental/Checkbox/src/Checkbox.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { CheckboxV1 } from '@fluentui-react-native/checkbox'; if (__DEV__) { diff --git a/packages/experimental/Drawer/package.json b/packages/experimental/Drawer/package.json index 4e9923a9eb..6a7011ea1e 100644 --- a/packages/experimental/Drawer/package.json +++ b/packages/experimental/Drawer/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", "@fluentui-react-native/use-styling": "workspace:*" diff --git a/packages/experimental/Drawer/src/Drawer.tsx b/packages/experimental/Drawer/src/Drawer.tsx index 50b5a77e65..c94e088193 100644 --- a/packages/experimental/Drawer/src/Drawer.tsx +++ b/packages/experimental/Drawer/src/Drawer.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Animated, Modal, TouchableWithoutFeedback, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './Drawer.styling'; import type { DrawerType, DrawerProps } from './Drawer.types'; diff --git a/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx b/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx index 2985bb540a..32be8c3145 100644 --- a/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx +++ b/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Text } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/Dropdown/package.json b/packages/experimental/Dropdown/package.json index b2d752915e..fcf85726da 100644 --- a/packages/experimental/Dropdown/package.json +++ b/packages/experimental/Dropdown/package.json @@ -34,6 +34,7 @@ "@fluentui-react-native/button": "workspace:*", "@fluentui-react-native/callout": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/interactive-hooks": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*" diff --git a/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx b/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx index a4cf9b6b33..99b0d8986c 100644 --- a/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx +++ b/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View } from 'react-native'; import type { ButtonProps } from '@fluentui-react-native/button'; import { ButtonV1 as Button } from '@fluentui-react-native/button'; import type { UseTokens } from '@fluentui-react-native/framework'; -import { buildUseTokens, compressible, useSlot, withSlots } from '@fluentui-react-native/framework'; +import { buildUseTokens, compressible, useSlot } from '@fluentui-react-native/framework'; import type { PressablePropsExtended } from '@fluentui-react-native/interactive-hooks'; import type { SvgProps } from 'react-native-svg'; import { Path, Svg } from 'react-native-svg'; diff --git a/packages/experimental/Dropdown/src/Listbox/Listbox.tsx b/packages/experimental/Dropdown/src/Listbox/Listbox.tsx index 6e0fa36e72..572beef5ae 100644 --- a/packages/experimental/Dropdown/src/Listbox/Listbox.tsx +++ b/packages/experimental/Dropdown/src/Listbox/Listbox.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View } from 'react-native'; @@ -7,7 +6,7 @@ import type { IViewProps } from '@fluentui-react-native/adapters'; import type { ICalloutProps } from '@fluentui-react-native/callout'; import { Callout } from '@fluentui-react-native/callout'; import type { UseTokens } from '@fluentui-react-native/framework'; -import { buildUseTokens, compressible, useSlot, withSlots } from '@fluentui-react-native/framework'; +import { buildUseTokens, compressible, useSlot } from '@fluentui-react-native/framework'; import type { ListboxProps, ListboxTokens } from './Listbox.types'; import { listboxName } from './Listbox.types'; diff --git a/packages/experimental/Dropdown/src/Option/Option.tsx b/packages/experimental/Dropdown/src/Option/Option.tsx index 20d9eefc86..a6382d8a9f 100644 --- a/packages/experimental/Dropdown/src/Option/Option.tsx +++ b/packages/experimental/Dropdown/src/Option/Option.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Path, Svg } from 'react-native-svg'; diff --git a/packages/experimental/Expander/package.json b/packages/experimental/Expander/package.json index df33d60a56..87b0815fdb 100644 --- a/packages/experimental/Expander/package.json +++ b/packages/experimental/Expander/package.json @@ -34,7 +34,8 @@ "directory": "packages/experimental/Expander" }, "dependencies": { - "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/experimental/Expander/src/Expander.tsx b/packages/experimental/Expander/src/Expander.tsx index 3acbb38c5d..63800555c8 100644 --- a/packages/experimental/Expander/src/Expander.tsx +++ b/packages/experimental/Expander/src/Expander.tsx @@ -1,15 +1,8 @@ -/** - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * @format - */ - -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildProps } from '@fluentui-react-native/framework'; import type { ExpanderType, ExpanderProps, ExpanderViewProps } from './Expander.types'; import { expanderName } from './Expander.types'; diff --git a/packages/experimental/MenuButton/package.json b/packages/experimental/MenuButton/package.json index eb2f3ab56e..86f7a9a3a7 100644 --- a/packages/experimental/MenuButton/package.json +++ b/packages/experimental/MenuButton/package.json @@ -33,6 +33,7 @@ "@fluentui-react-native/button": "workspace:*", "@fluentui-react-native/contextual-menu": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/tokens": "workspace:*" }, "devDependencies": { diff --git a/packages/experimental/MenuButton/src/MenuButton.tsx b/packages/experimental/MenuButton/src/MenuButton.tsx index 53825c1360..bcb41409c7 100644 --- a/packages/experimental/MenuButton/src/MenuButton.tsx +++ b/packages/experimental/MenuButton/src/MenuButton.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React, { useRef, useState, useCallback, useMemo } from 'react'; import { Platform } from 'react-native'; import { ButtonV1 as Button } from '@fluentui-react-native/button'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { SvgXml } from 'react-native-svg'; import { stylingSettings } from './MenuButton.styling'; diff --git a/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx b/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx index d049e64555..57a0f1bb3e 100644 --- a/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx +++ b/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import type { MenuButtonItemProps } from '..'; diff --git a/packages/experimental/MenuButton/src/renderContextualMenu.tsx b/packages/experimental/MenuButton/src/renderContextualMenu.tsx index 1f7828378a..f19f3cd706 100644 --- a/packages/experimental/MenuButton/src/renderContextualMenu.tsx +++ b/packages/experimental/MenuButton/src/renderContextualMenu.tsx @@ -1,5 +1,3 @@ -/** @jsxRuntime classic */ -/* @jsxFrag React.Fragment */ import * as React from 'react'; import type { ContextualMenuProps } from '@fluentui-react-native/contextual-menu'; diff --git a/packages/experimental/Overflow/package.json b/packages/experimental/Overflow/package.json index b900694ec2..0047bf89df 100644 --- a/packages/experimental/Overflow/package.json +++ b/packages/experimental/Overflow/package.json @@ -30,7 +30,8 @@ "directory": "packages/experimental/Overflow" }, "dependencies": { - "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/experimental/Overflow/src/Overflow/Overflow.tsx b/packages/experimental/Overflow/src/Overflow/Overflow.tsx index 56b4e5d891..9ec996449d 100644 --- a/packages/experimental/Overflow/src/Overflow/Overflow.tsx +++ b/packages/experimental/Overflow/src/Overflow/Overflow.tsx @@ -1,4 +1,3 @@ -/** @jsxRuntime classic */ import * as React from 'react'; import { View } from 'react-native'; diff --git a/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx b/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx index f82b1beec9..8ce16638f9 100644 --- a/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx +++ b/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx @@ -1,4 +1,3 @@ -/** @jsxRuntime classic */ import * as React from 'react'; import type { StyleProp, ViewProps, ViewStyle } from 'react-native'; diff --git a/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx b/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx index cc7cdf8d5a..c99a0f52c6 100644 --- a/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx +++ b/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { ButtonV1 } from '@fluentui-react-native/button'; import { Menu, MenuPopover, MenuTrigger, MenuItem } from '@fluentui-react-native/menu'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/Popover/package.json b/packages/experimental/Popover/package.json index 06b92d0d12..cda5ed7c0a 100644 --- a/packages/experimental/Popover/package.json +++ b/packages/experimental/Popover/package.json @@ -31,7 +31,8 @@ }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", - "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/experimental/Popover/src/Popover.tsx b/packages/experimental/Popover/src/Popover.tsx index fcdcf50e53..d0223c4275 100644 --- a/packages/experimental/Popover/src/Popover.tsx +++ b/packages/experimental/Popover/src/Popover.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { UseTokens } from '@fluentui-react-native/framework'; import { compressible, buildUseTokens } from '@fluentui-react-native/framework'; diff --git a/packages/experimental/Shadow/package.json b/packages/experimental/Shadow/package.json index 7f8587a878..0ad402da66 100644 --- a/packages/experimental/Shadow/package.json +++ b/packages/experimental/Shadow/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/pressable": "workspace:*", "@fluentui-react-native/theme-types": "workspace:*" }, diff --git a/packages/experimental/Shimmer/package.json b/packages/experimental/Shimmer/package.json index 961e482983..7db0e54908 100644 --- a/packages/experimental/Shimmer/package.json +++ b/packages/experimental/Shimmer/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/theming-utils": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", "@fluentui-react-native/use-styling": "workspace:*", diff --git a/packages/experimental/Shimmer/src/Shimmer.test.tsx b/packages/experimental/Shimmer/src/Shimmer.test.tsx index 140991e837..b7d72ce93e 100644 --- a/packages/experimental/Shimmer/src/Shimmer.test.tsx +++ b/packages/experimental/Shimmer/src/Shimmer.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Shimmer } from './Shimmer'; diff --git a/packages/experimental/Shimmer/src/Shimmer.tsx b/packages/experimental/Shimmer/src/Shimmer.tsx index 7f3b728523..d2b1d6aec1 100644 --- a/packages/experimental/Shimmer/src/Shimmer.tsx +++ b/packages/experimental/Shimmer/src/Shimmer.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { useRef, useEffect, useMemo, useCallback } from 'react'; import type { ScaleXTransform, TranslateXTransform } from 'react-native'; import { Animated, I18nManager } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildUseStyling } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildUseStyling } from '@fluentui-react-native/framework'; import assertNever from 'assert-never'; import { Circle, ClipPath, Defs, LinearGradient, Rect, Stop, Svg, G } from 'react-native-svg'; diff --git a/packages/experimental/Shimmer/src/Shimmer.win32.tsx b/packages/experimental/Shimmer/src/Shimmer.win32.tsx index ce98d85549..2bdacd42fd 100644 --- a/packages/experimental/Shimmer/src/Shimmer.win32.tsx +++ b/packages/experimental/Shimmer/src/Shimmer.win32.tsx @@ -1,16 +1,8 @@ -/** - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * @format - */ - -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { processColor, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; import { compose, mergeProps } from '@fluentui-react-native/framework'; -import { withSlots } from '@fluentui-react-native/framework'; import { assertNever } from 'assert-never'; import type { SvgProps } from 'react-native-svg'; import { ClipPath, Defs, LinearGradient, Path, Rect, Stop, Svg } from 'react-native-svg'; diff --git a/packages/experimental/Spinner/package.json b/packages/experimental/Spinner/package.json index a126169e4b..2989e9e4a9 100644 --- a/packages/experimental/Spinner/package.json +++ b/packages/experimental/Spinner/package.json @@ -31,6 +31,7 @@ }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@fluentui-react-native/theme-tokens": "workspace:*", "@fluentui-react-native/use-styling": "workspace:*" diff --git a/packages/experimental/Spinner/src/Spinner.android.tsx b/packages/experimental/Spinner/src/Spinner.android.tsx index 0d66fe57f3..603f47a3ac 100644 --- a/packages/experimental/Spinner/src/Spinner.android.tsx +++ b/packages/experimental/Spinner/src/Spinner.android.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { useEffect, useCallback } from 'react'; import type { ColorValue } from 'react-native'; import { Animated, Easing, View } from 'react-native'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { UseSlots } from '@fluentui-react-native/framework'; import { Path, Svg } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/experimental/Spinner/src/Spinner.tsx b/packages/experimental/Spinner/src/Spinner.tsx index 7e5236bd17..0814cd586c 100644 --- a/packages/experimental/Spinner/src/Spinner.tsx +++ b/packages/experimental/Spinner/src/Spinner.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Animated, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Svg } from 'react-native-svg'; import type { SpinnerProps, SpinnerType } from './Spinner.types'; diff --git a/packages/experimental/Spinner/src/Spinner.win32.tsx b/packages/experimental/Spinner/src/Spinner.win32.tsx index 059926ccd8..c616ae0b11 100644 --- a/packages/experimental/Spinner/src/Spinner.win32.tsx +++ b/packages/experimental/Spinner/src/Spinner.win32.tsx @@ -1,16 +1,9 @@ -/** - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * @format - */ - -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ColorValue } from 'react-native'; import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Path, Svg } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/experimental/Stack/package.json b/packages/experimental/Stack/package.json index 2b43e877cc..5208064b45 100644 --- a/packages/experimental/Stack/package.json +++ b/packages/experimental/Stack/package.json @@ -33,6 +33,7 @@ "dependencies": { "@fluentui-react-native/adapters": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/tokens": "workspace:*" }, "devDependencies": { diff --git a/packages/experimental/Stack/src/Stack.tsx b/packages/experimental/Stack/src/Stack.tsx index f316a470e5..8a7ebd7e82 100644 --- a/packages/experimental/Stack/src/Stack.tsx +++ b/packages/experimental/Stack/src/Stack.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import type { ViewProps } from 'react-native'; import { filterViewProps } from '@fluentui-react-native/adapters'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps, getTypedMemoCache } from '@fluentui-react-native/framework'; +import { compose, mergeProps, getTypedMemoCache } from '@fluentui-react-native/framework'; import { stylingSettings } from './Stack.styling'; import { stackName } from './Stack.types'; diff --git a/packages/experimental/Stack/src/StackItem/StackItem.tsx b/packages/experimental/Stack/src/StackItem/StackItem.tsx index 5097bce419..ea4d0eaa3e 100644 --- a/packages/experimental/Stack/src/StackItem/StackItem.tsx +++ b/packages/experimental/Stack/src/StackItem/StackItem.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './StackItem.styles'; import { stackItemName } from './StackItem.types'; diff --git a/packages/experimental/Stack/src/__tests__/Stack.test.tsx b/packages/experimental/Stack/src/__tests__/Stack.test.tsx index 43739a340c..b3d800d649 100644 --- a/packages/experimental/Stack/src/__tests__/Stack.test.tsx +++ b/packages/experimental/Stack/src/__tests__/Stack.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { Text } from '@fluentui-react-native/text'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/Tooltip/package.json b/packages/experimental/Tooltip/package.json index 54caa08f47..58302ff0a8 100644 --- a/packages/experimental/Tooltip/package.json +++ b/packages/experimental/Tooltip/package.json @@ -31,7 +31,8 @@ }, "dependencies": { "@fluentui-react-native/callout": "workspace:*", - "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/packages/experimental/Tooltip/src/Tooltip.tsx b/packages/experimental/Tooltip/src/Tooltip.tsx index 8db684cc14..687e7e3d96 100644 --- a/packages/experimental/Tooltip/src/Tooltip.tsx +++ b/packages/experimental/Tooltip/src/Tooltip.tsx @@ -1,10 +1,3 @@ -/** - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * @format - */ - -/** @jsxRuntime classic */ import * as React from 'react'; import { findNodeHandle } from 'react-native'; diff --git a/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx b/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx index 70e5e963e4..9dfe33f119 100644 --- a/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx +++ b/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { ButtonV1 } from '@fluentui-react-native/button'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/VibrancyView/src/VibrancyView.tsx b/packages/experimental/VibrancyView/src/VibrancyView.tsx index e27005df96..046296af40 100644 --- a/packages/experimental/VibrancyView/src/VibrancyView.tsx +++ b/packages/experimental/VibrancyView/src/VibrancyView.tsx @@ -4,9 +4,6 @@ * @format */ -/** @jsxRuntime classic */ -import React from 'react'; - import type { VibrancyViewProps } from './VibrancyView.types'; import NativeVibrancyView from './VibrancyViewNativeComponent'; diff --git a/packages/framework-base/jsx-runtime.js b/packages/framework-base/jsx-runtime.js new file mode 100644 index 0000000000..306ed84cf6 --- /dev/null +++ b/packages/framework-base/jsx-runtime.js @@ -0,0 +1,2 @@ +const { jsx, jsxs, Fragment } = require('./lib-commonjs/component-patterns/jsx-runtime'); +module.exports = { jsx, jsxs, Fragment }; diff --git a/packages/framework-base/package.json b/packages/framework-base/package.json index 219ed423b1..158b45e125 100644 --- a/packages/framework-base/package.json +++ b/packages/framework-base/package.json @@ -18,9 +18,9 @@ "types": "./lib/index.d.ts" }, "./jsx-runtime": { - "import": "./lib/jsx-runtime.js", - "require": "./lib-commonjs/jsx-runtime.js", - "types": "./lib/jsx-runtime.d.ts" + "import": "./lib/component-patterns/jsx-runtime.js", + "require": "./lib-commonjs/component-patterns/jsx-runtime.js", + "types": "./lib/component-patterns/jsx-runtime.d.ts" } }, "scripts": { diff --git a/packages/framework-base/src/jsx-runtime.ts b/packages/framework-base/src/component-patterns/jsx-runtime.ts similarity index 82% rename from packages/framework-base/src/jsx-runtime.ts rename to packages/framework-base/src/component-patterns/jsx-runtime.ts index b5f19bddf7..48c28a8da3 100644 --- a/packages/framework-base/src/jsx-runtime.ts +++ b/packages/framework-base/src/component-patterns/jsx-runtime.ts @@ -1,6 +1,6 @@ import type React from 'react'; import * as ReactJSX from 'react/jsx-runtime'; -import { renderForJsxRuntime } from './component-patterns/render'; +import { renderForJsxRuntime } from './render'; export function jsx(type: React.ElementType, props: React.PropsWithChildren, key?: React.Key): React.ReactElement { return renderForJsxRuntime(type, props, key, ReactJSX.jsx); @@ -9,3 +9,5 @@ export function jsx(type: React.ElementType, props: React.PropsWithChildren, key?: React.Key): React.ReactElement { return renderForJsxRuntime(type, props, key, ReactJSX.jsxs); } + +export { Fragment } from 'react/jsx-runtime'; diff --git a/packages/framework-base/src/component-patterns/stagedComponent.tsx b/packages/framework-base/src/component-patterns/stagedComponent.tsx index 492370ebe4..d81d9154da 100644 --- a/packages/framework-base/src/component-patterns/stagedComponent.tsx +++ b/packages/framework-base/src/component-patterns/stagedComponent.tsx @@ -1,9 +1,7 @@ /** - * @jsxRuntime classic - * @jsx withSlots + * @jsxImportSource . */ import * as React from 'react'; -import { withSlots } from './withSlots'; import type { StagedComponent, TwoStageRender, StagedRender, ComposableFunction } from './render.types'; diff --git a/packages/framework-base/src/index.ts b/packages/framework-base/src/index.ts index 3a2fd0510d..92e6245050 100644 --- a/packages/framework-base/src/index.ts +++ b/packages/framework-base/src/index.ts @@ -37,4 +37,4 @@ export type { } from './component-patterns/render.types'; export { withSlots } from './component-patterns/withSlots'; export { stagedComponent, twoStageComponent } from './component-patterns/stagedComponent'; -export { jsx, jsxs } from './jsx-runtime'; +export { jsx, jsxs, Fragment } from './component-patterns/jsx-runtime'; diff --git a/packages/framework/composition/src/composeFactory.test.tsx b/packages/framework/composition/src/composeFactory.test.tsx index d37ea7e758..c889f82595 100644 --- a/packages/framework/composition/src/composeFactory.test.tsx +++ b/packages/framework/composition/src/composeFactory.test.tsx @@ -1,9 +1,7 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ViewProps, TextProps, ColorValue } from 'react-native'; import { View, Text } from 'react-native'; -import { withSlots } from '@fluentui-react-native/framework-base'; import type { ThemeHelper } from '@fluentui-react-native/use-styling'; import * as renderer from 'react-test-renderer'; diff --git a/packages/framework/framework/src/compressible.test.tsx b/packages/framework/framework/src/compressible.test.tsx index 9020255e26..776efadba5 100644 --- a/packages/framework/framework/src/compressible.test.tsx +++ b/packages/framework/framework/src/compressible.test.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { TextProps, TextStyle } from 'react-native'; import { Text, View } from 'react-native'; @@ -7,7 +6,6 @@ import { Text, View } from 'react-native'; import { mergeStyles } from '@fluentui-react-native/framework-base'; import type { Theme } from '@fluentui-react-native/theme-types'; import { useSlot } from '@fluentui-react-native/use-slot'; -import { withSlots } from '@fluentui-react-native/framework-base'; import { applyTokenLayers } from '@fluentui-react-native/use-tokens'; import * as renderer from 'react-test-renderer'; diff --git a/packages/framework/use-slot/README.md b/packages/framework/use-slot/README.md index 3ff6910be6..098ab09244 100644 --- a/packages/framework/use-slot/README.md +++ b/packages/framework/use-slot/README.md @@ -51,8 +51,7 @@ The helper will return a `React.FunctionComponent` that will forward props (with Consuming these by hand are a bit tedious. To aid in this the `useSlot` hook function is provided. Besides enabling automatic tree compression (for component types that support it), this also allows components to be authored as pluggable bits in the render tree. Usage looks something like: ```ts -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ const baseStyle = { /* some text styling defaults set here */ diff --git a/packages/framework/use-slot/src/useSlot.test.tsx b/packages/framework/use-slot/src/useSlot.test.tsx index 505b02bf4a..f05d40778b 100644 --- a/packages/framework/use-slot/src/useSlot.test.tsx +++ b/packages/framework/use-slot/src/useSlot.test.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { TextProps } from 'react-native'; import { Text, View } from 'react-native'; @@ -10,7 +9,6 @@ import * as renderer from 'react-test-renderer'; import type { NativeReactType } from '@fluentui-react-native/framework-base'; import { stagedComponent } from '@fluentui-react-native/framework-base'; import { useSlot } from './useSlot'; -import { withSlots } from '@fluentui-react-native/framework-base'; type PluggableTextProps = React.PropsWithChildren & { inner?: NativeReactType | React.FunctionComponent }; diff --git a/packages/framework/use-slots/src/buildUseSlots.test.tsx b/packages/framework/use-slots/src/buildUseSlots.test.tsx index c04f126622..5b48b3e6e0 100644 --- a/packages/framework/use-slots/src/buildUseSlots.test.tsx +++ b/packages/framework/use-slots/src/buildUseSlots.test.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ViewProps, TextProps } from 'react-native'; import { View, Text } from 'react-native'; -import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base'; +import { stagedComponent } from '@fluentui-react-native/framework-base'; import * as renderer from 'react-test-renderer'; import { buildUseSlots } from './buildUseSlots'; diff --git a/packages/framework/use-slots/src/useSlots.samples.test.tsx b/packages/framework/use-slots/src/useSlots.samples.test.tsx index 20a19879fb..cb0ecf4015 100644 --- a/packages/framework/use-slots/src/useSlots.samples.test.tsx +++ b/packages/framework/use-slots/src/useSlots.samples.test.tsx @@ -1,9 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ +import React from 'react'; import type { CSSProperties } from 'react'; import { mergeProps } from '@fluentui-react-native/framework-base'; -import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base'; +import { stagedComponent } from '@fluentui-react-native/framework-base'; import * as renderer from 'react-test-renderer'; import { buildUseSlots } from './buildUseSlots'; diff --git a/packages/libraries/core/tsconfig.json b/packages/libraries/core/tsconfig.json index 555ee5da3d..5b9a63270e 100644 --- a/packages/libraries/core/tsconfig.json +++ b/packages/libraries/core/tsconfig.json @@ -2,7 +2,6 @@ "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", "compilerOptions": { "baseUrl": ".", - "jsx": "react", "outDir": "lib", "declaration": true, "sourceMap": true, diff --git a/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx b/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx index 76df738426..4ff3950cf0 100644 --- a/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx +++ b/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Pressable } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/scripts/configs/tsconfig.json b/scripts/configs/tsconfig.json index 2839078494..cb5889a210 100644 --- a/scripts/configs/tsconfig.json +++ b/scripts/configs/tsconfig.json @@ -20,7 +20,8 @@ "skipLibCheck": true, "skipDefaultLibCheck": true, "sourceMap": true, - "jsx": "react", + "jsx": "react-jsx", + "jsxImportSource": "react", "resolveJsonModule": true, "types": ["jest", "node"] }, diff --git a/scripts/src/tasks/depcheck.js b/scripts/src/tasks/depcheck.js index 70bc286f04..d8f9589d3a 100644 --- a/scripts/src/tasks/depcheck.js +++ b/scripts/src/tasks/depcheck.js @@ -67,7 +67,7 @@ export class DepcheckCommand extends Command { reporter = getReporter(); projectRoot = getProjectRoot(); - ignored = new Set(injectedDevDeps(this.projectRoot)); + ignored = new Set(['@fluentui-react-native/framework-base', ...injectedDevDeps(this.projectRoot)]); /** @type {Issue[]} */ issues = []; @@ -90,6 +90,7 @@ export class DepcheckCommand extends Command { const options = mergeOneLevel( { ignorePatterns: ['/lib/*', '/lib-commonjs/*'], + // ignore framework-base as depcheck doesn't understand @jsxImportSource specials: [depcheck.special.eslint, depcheck.special.jest, depcheck.special.ttypescript], }, depcheckOptions, diff --git a/yarn.lock b/yarn.lock index 2ffa7e32f5..0ef9864a7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2503,6 +2503,7 @@ __metadata: "@fluentui-react-native/badge": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -2565,6 +2566,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/experimental-shadow": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -2614,6 +2616,7 @@ __metadata: "@fluentui-react-native/experimental-activity-indicator": "workspace:*" "@fluentui-react-native/experimental-shadow": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" @@ -2666,6 +2669,7 @@ __metadata: "@fluentui-react-native/adapters": "workspace:*" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -2706,6 +2710,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" @@ -2757,6 +2762,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" @@ -2848,6 +2854,7 @@ __metadata: "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" @@ -3057,6 +3064,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -3100,6 +3108,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -3141,6 +3150,7 @@ __metadata: "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" @@ -3211,9 +3221,9 @@ __metadata: languageName: unknown linkType: soft -"@fluentui-react-native/eslint-config-rules@workspace:*, @fluentui-react-native/eslint-config-rules@workspace:packages/framework/eslint-config-rules": +"@fluentui-react-native/eslint-config-rules@workspace:*, @fluentui-react-native/eslint-config-rules@workspace:packages/configs/eslint-config-rules": version: 0.0.0-use.local - resolution: "@fluentui-react-native/eslint-config-rules@workspace:packages/framework/eslint-config-rules" + resolution: "@fluentui-react-native/eslint-config-rules@workspace:packages/configs/eslint-config-rules" dependencies: "@fluentui-react-native/scripts": "workspace:*" "@microsoft/eslint-plugin-sdl": "npm:^1.1.0" @@ -3231,6 +3241,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3266,6 +3277,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3300,6 +3312,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3336,6 +3349,7 @@ __metadata: "@fluentui-react-native/checkbox": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" @@ -3371,6 +3385,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3405,6 +3420,7 @@ __metadata: "@fluentui-react-native/contextual-menu": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -3482,6 +3498,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -3520,6 +3537,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theming-utils": "workspace:*" @@ -3562,6 +3580,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -3601,6 +3620,7 @@ __metadata: "@fluentui-react-native/adapters": "workspace:*" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -3640,6 +3660,7 @@ __metadata: "@fluentui-react-native/adapters": "workspace:*" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -3738,6 +3759,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" @@ -3791,6 +3813,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" @@ -3895,6 +3918,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -3953,6 +3977,7 @@ __metadata: "@fluentui-react-native/button": "workspace:*" "@fluentui-react-native/contextual-menu": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -4000,6 +4025,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" @@ -4071,6 +4097,7 @@ __metadata: "@fluentui-react-native/experimental-appearance-additions": "workspace:*" "@fluentui-react-native/experimental-shadow": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" @@ -4119,6 +4146,7 @@ __metadata: "@fluentui-react-native/button": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/menu": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -4160,6 +4188,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -4200,6 +4229,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/persona-coin": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -4239,6 +4269,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -4271,6 +4302,7 @@ __metadata: "@fluentui-react-native/adapters": "workspace:*" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" @@ -4308,6 +4340,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" @@ -4415,6 +4448,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -4453,6 +4487,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/text": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -4491,6 +4526,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -4551,6 +4587,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -4595,6 +4632,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" @@ -4658,6 +4696,7 @@ __metadata: resolution: "@fluentui-react-native/tester-win32@workspace:apps/win32" dependencies: "@babel/core": "npm:^7.20.0" + "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tester": "workspace:*" @@ -4696,6 +4735,7 @@ __metadata: "@fluentui-react-native/android-theme": "workspace:*" "@fluentui-react-native/apple-theme": "workspace:*" "@fluentui-react-native/avatar": "workspace:*" + "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/badge": "workspace:*" "@fluentui-react-native/button": "workspace:*" "@fluentui-react-native/callout": "workspace:*" @@ -4793,6 +4833,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" @@ -4989,6 +5030,7 @@ __metadata: "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*"