diff --git a/change/@fluentui-react-field-e41be758-df09-47c8-bd8f-4ddb5b61c2ad.json b/change/@fluentui-react-field-e41be758-df09-47c8-bd8f-4ddb5b61c2ad.json new file mode 100644 index 00000000000000..8c677ec0c59cf0 --- /dev/null +++ b/change/@fluentui-react-field-e41be758-df09-47c8-bd8f-4ddb5b61c2ad.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "chore: Migrate to new package structure.", + "packageName": "@fluentui/react-field", + "email": "tristan.watanabe@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-field/.npmignore b/packages/react-components/react-field/.npmignore index 52d2a7273a151d..f7ce568a6dbf7c 100644 --- a/packages/react-components/react-field/.npmignore +++ b/packages/react-components/react-field/.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-field/.storybook/main.js b/packages/react-components/react-field/.storybook/main.js index bea03d1fb52af8..26536b61b387f6 100644 --- a/packages/react-components/react-field/.storybook/main.js +++ b/packages/react-components/react-field/.storybook/main.js @@ -2,12 +2,7 @@ const rootMain = require('../../../../.storybook/main'); module.exports = /** @type {Omit} */ ({ ...rootMain, - stories: [ - ...rootMain.stories, - '../src/**/*.stories.mdx', - '../src/stories/Field/index.stories.@(ts|tsx)', - '../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-field/.storybook/tsconfig.json b/packages/react-components/react-field/.storybook/tsconfig.json index f9f60e1234ed49..ea89218a3d916f 100644 --- a/packages/react-components/react-field/.storybook/tsconfig.json +++ b/packages/react-components/react-field/.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-field/Spec.md b/packages/react-components/react-field/docs/Spec.md similarity index 100% rename from packages/react-components/react-field/Spec.md rename to packages/react-components/react-field/docs/Spec.md diff --git a/packages/react-components/react-field/src/stories/Field/FieldDefault.stories.tsx b/packages/react-components/react-field/stories/Field/FieldDefault.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldDefault.stories.tsx rename to packages/react-components/react-field/stories/Field/FieldDefault.stories.tsx diff --git a/packages/react-components/react-field/src/stories/Field/FieldDescription.md b/packages/react-components/react-field/stories/Field/FieldDescription.md similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldDescription.md rename to packages/react-components/react-field/stories/Field/FieldDescription.md diff --git a/packages/react-components/react-field/src/stories/Field/FieldHint.stories.tsx b/packages/react-components/react-field/stories/Field/FieldHint.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldHint.stories.tsx rename to packages/react-components/react-field/stories/Field/FieldHint.stories.tsx diff --git a/packages/react-components/react-field/src/stories/Field/FieldHorizontal.stories.tsx b/packages/react-components/react-field/stories/Field/FieldHorizontal.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldHorizontal.stories.tsx rename to packages/react-components/react-field/stories/Field/FieldHorizontal.stories.tsx diff --git a/packages/react-components/react-field/src/stories/Field/FieldLabel.stories.tsx b/packages/react-components/react-field/stories/Field/FieldLabel.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldLabel.stories.tsx rename to packages/react-components/react-field/stories/Field/FieldLabel.stories.tsx diff --git a/packages/react-components/react-field/src/stories/Field/FieldRequired.stories.tsx b/packages/react-components/react-field/stories/Field/FieldRequired.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldRequired.stories.tsx rename to packages/react-components/react-field/stories/Field/FieldRequired.stories.tsx diff --git a/packages/react-components/react-field/src/stories/Field/FieldSize.stories.tsx b/packages/react-components/react-field/stories/Field/FieldSize.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldSize.stories.tsx rename to packages/react-components/react-field/stories/Field/FieldSize.stories.tsx diff --git a/packages/react-components/react-field/src/stories/Field/FieldValidationState.stories.tsx b/packages/react-components/react-field/stories/Field/FieldValidationState.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/FieldValidationState.stories.tsx rename to packages/react-components/react-field/stories/Field/FieldValidationState.stories.tsx diff --git a/packages/react-components/react-field/src/stories/Field/index.stories.tsx b/packages/react-components/react-field/stories/Field/index.stories.tsx similarity index 100% rename from packages/react-components/react-field/src/stories/Field/index.stories.tsx rename to packages/react-components/react-field/stories/Field/index.stories.tsx diff --git a/packages/react-components/react-field/tsconfig.lib.json b/packages/react-components/react-field/tsconfig.lib.json index 7f94e04299ed85..008c602dc19d24 100644 --- a/packages/react-components/react-field/tsconfig.lib.json +++ b/packages/react-components/react-field/tsconfig.lib.json @@ -9,14 +9,6 @@ "inlineSources": true, "types": ["static-assets", "environment"] }, - "exclude": [ - "./src/common/**", - "**/*.spec.ts", - "**/*.spec.tsx", - "**/*.test.ts", - "**/*.test.tsx", - "**/*.stories.ts", - "**/*.stories.tsx" - ], + "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.stories.ts", "**/*.stories.tsx"], "include": ["./src/**/*.ts", "./src/**/*.tsx"] }