diff --git a/change/@fluentui-react-aria-53588dbd-e71a-4ad5-8878-786cf4b0ab8e.json b/change/@fluentui-react-aria-53588dbd-e71a-4ad5-8878-786cf4b0ab8e.json new file mode 100644 index 0000000000000..e0ad3d87e7092 --- /dev/null +++ b/change/@fluentui-react-aria-53588dbd-e71a-4ad5-8878-786cf4b0ab8e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: Migrate to new package structure.", + "packageName": "@fluentui/react-aria", + "email": "tristan.watanabe@gmail.com", + "dependentChangeType": "none" +} diff --git a/packages/react-components/react-aria/.npmignore b/packages/react-components/react-aria/.npmignore index 52d2a7273a151..f7ce568a6dbf7 100644 --- a/packages/react-components/react-aria/.npmignore +++ b/packages/react-components/react-aria/.npmignore @@ -3,10 +3,11 @@ bundle-size/ config/ coverage/ -e2e/ +docs/ etc/ node_modules/ src/ +stories/ dist/types/ temp/ __fixtures__ @@ -16,7 +17,7 @@ __tests__ *.api.json *.log *.spec.* -*.stories.* +*.cy.* *.test.* *.yml diff --git a/packages/react-components/react-aria/.storybook/main.js b/packages/react-components/react-aria/.storybook/main.js index f57cfd09509e7..26536b61b387f 100644 --- a/packages/react-components/react-aria/.storybook/main.js +++ b/packages/react-components/react-aria/.storybook/main.js @@ -2,7 +2,7 @@ const rootMain = require('../../../../.storybook/main'); module.exports = /** @type {Omit} */ ({ ...rootMain, - stories: [...rootMain.stories, '../src/**/*.stories.mdx', '../src/**/index.stories.@(ts|tsx)'], + stories: [...rootMain.stories, '../stories/**/*.stories.mdx', '../stories/**/index.stories.@(ts|tsx)'], addons: [...rootMain.addons], webpackFinal: (config, options) => { const localConfig = { ...rootMain.webpackFinal(config, options) }; diff --git a/packages/react-components/react-aria/.storybook/tsconfig.json b/packages/react-components/react-aria/.storybook/tsconfig.json index f9f60e1234ed4..ea89218a3d916 100644 --- a/packages/react-components/react-aria/.storybook/tsconfig.json +++ b/packages/react-components/react-aria/.storybook/tsconfig.json @@ -6,5 +6,5 @@ "checkJs": true, "types": ["static-assets", "environment", "storybook__addons"] }, - "include": ["../src/**/*.stories.ts", "../src/**/*.stories.tsx", "*.js"] + "include": ["../stories/**/*.stories.ts", "../stories/**/*.stories.tsx", "*.js"] } diff --git a/packages/react-components/react-aria/Spec.md b/packages/react-components/react-aria/docs/Spec.md similarity index 100% rename from packages/react-components/react-aria/Spec.md rename to packages/react-components/react-aria/docs/Spec.md diff --git a/packages/react-components/react-aria/src/button/useARIAButton.stories.tsx b/packages/react-components/react-aria/stories/useARIAButton/index.stories.tsx similarity index 92% rename from packages/react-components/react-aria/src/button/useARIAButton.stories.tsx rename to packages/react-components/react-aria/stories/useARIAButton/index.stories.tsx index bb0f78f392416..1b5cc18a8adf7 100644 --- a/packages/react-components/react-aria/src/button/useARIAButton.stories.tsx +++ b/packages/react-components/react-aria/stories/useARIAButton/index.stories.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { useARIAButtonShorthand } from '../button'; -import type { ARIAButtonSlotProps } from '../button'; +import { useARIAButtonShorthand } from '../../src/button'; +import type { ARIAButtonSlotProps } from '../../src/button'; import { getSlots } from '@fluentui/react-components'; import type { ComponentState, Slot } from '@fluentui/react-components'; diff --git a/packages/react-components/react-aria/tsconfig.spec.json b/packages/react-components/react-aria/tsconfig.spec.json index 469fcba4d7ba7..911456fe4b4d9 100644 --- a/packages/react-components/react-aria/tsconfig.spec.json +++ b/packages/react-components/react-aria/tsconfig.spec.json @@ -5,5 +5,13 @@ "outDir": "dist", "types": ["jest", "node"] }, - "include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"] + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.d.ts", + "./src/testing/**/*.ts", + "./src/testing/**/*.tsx" + ] }