diff --git a/change/@fluentui-react-components-cffefe01-cd63-4bbe-b5b2-2e8d73321715.json b/change/@fluentui-react-components-cffefe01-cd63-4bbe-b5b2-2e8d73321715.json new file mode 100644 index 00000000000000..3164c62ac2c47d --- /dev/null +++ b/change/@fluentui-react-components-cffefe01-cd63-4bbe-b5b2-2e8d73321715.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: Move tabster FocusIndicator story doc to Concepts/Accessiblity folder of this package.", + "packageName": "@fluentui/react-components", + "email": "tristan.watanabe@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabster-cce2c26f-9e0b-43f6-a8e8-bf2f680e1f31.json b/change/@fluentui-react-tabster-cce2c26f-9e0b-43f6-a8e8-bf2f680e1f31.json new file mode 100644 index 00000000000000..3f5de08ca6ae36 --- /dev/null +++ b/change/@fluentui-react-tabster-cce2c26f-9e0b-43f6-a8e8-bf2f680e1f31.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: Migrate to new package structure.", + "packageName": "@fluentui/react-tabster", + "email": "tristan.watanabe@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-tabster/src/stories/Tabster/FocusIndicator.stories.mdx b/packages/react-components/react-components/src/Concepts/Accessibility/FocusIndicator.stories.mdx similarity index 100% rename from packages/react-components/react-tabster/src/stories/Tabster/FocusIndicator.stories.mdx rename to packages/react-components/react-components/src/Concepts/Accessibility/FocusIndicator.stories.mdx diff --git a/packages/react-components/react-tabster/.npmignore b/packages/react-components/react-tabster/.npmignore index 52d2a7273a151d..f7ce568a6dbf7c 100644 --- a/packages/react-components/react-tabster/.npmignore +++ b/packages/react-components/react-tabster/.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-tabster/.storybook/main.js b/packages/react-components/react-tabster/.storybook/main.js deleted file mode 100644 index f57cfd09509e78..00000000000000 --- a/packages/react-components/react-tabster/.storybook/main.js +++ /dev/null @@ -1,14 +0,0 @@ -const rootMain = require('../../../../.storybook/main'); - -module.exports = /** @type {Omit} */ ({ - ...rootMain, - stories: [...rootMain.stories, '../src/**/*.stories.mdx', '../src/**/index.stories.@(ts|tsx)'], - addons: [...rootMain.addons], - webpackFinal: (config, options) => { - const localConfig = { ...rootMain.webpackFinal(config, options) }; - - // add your own webpack tweaks if needed - - return localConfig; - }, -}); diff --git a/packages/react-components/react-tabster/.storybook/preview.js b/packages/react-components/react-tabster/.storybook/preview.js deleted file mode 100644 index 1939500a3d18c7..00000000000000 --- a/packages/react-components/react-tabster/.storybook/preview.js +++ /dev/null @@ -1,7 +0,0 @@ -import * as rootPreview from '../../../../.storybook/preview'; - -/** @type {typeof rootPreview.decorators} */ -export const decorators = [...rootPreview.decorators]; - -/** @type {typeof rootPreview.parameters} */ -export const parameters = { ...rootPreview.parameters }; diff --git a/packages/react-components/react-tabster/.storybook/tsconfig.json b/packages/react-components/react-tabster/.storybook/tsconfig.json deleted file mode 100644 index f9f60e1234ed49..00000000000000 --- a/packages/react-components/react-tabster/.storybook/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "", - "allowJs": true, - "checkJs": true, - "types": ["static-assets", "environment", "storybook__addons"] - }, - "include": ["../src/**/*.stories.ts", "../src/**/*.stories.tsx", "*.js"] -} diff --git a/packages/react-components/react-tabster/package.json b/packages/react-components/react-tabster/package.json index e9c97d26d044e5..de4db906528780 100644 --- a/packages/react-components/react-tabster/package.json +++ b/packages/react-components/react-tabster/package.json @@ -19,9 +19,7 @@ "e2e:local": "cypress open --component", "just": "just-scripts", "lint": "just-scripts lint", - "storybook": "start-storybook", "test": "jest --passWithNoTests", - "start": "yarn storybook", "type-check": "tsc -b tsconfig.json", "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor" }, diff --git a/packages/react-components/react-tabster/e2e/useKeyborg.e2e.tsx b/packages/react-components/react-tabster/src/useKeyborg.cy.tsx similarity index 92% rename from packages/react-components/react-tabster/e2e/useKeyborg.e2e.tsx rename to packages/react-components/react-tabster/src/useKeyborg.cy.tsx index 452868f7cf33e1..a027be8a0b4cba 100644 --- a/packages/react-components/react-tabster/e2e/useKeyborg.e2e.tsx +++ b/packages/react-components/react-tabster/src/useKeyborg.cy.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { KEYBOARD_NAV_ATTRIBUTE } from '../src/focus/constants'; +import { KEYBOARD_NAV_ATTRIBUTE } from './focus/constants'; import { useKeyboardNavAttribute } from '@fluentui/react-tabster'; import { mount as mountBase } from '@cypress/react'; import { FluentProvider } from '@fluentui/react-provider'; diff --git a/packages/react-components/react-tabster/e2e/tsconfig.json b/packages/react-components/react-tabster/tsconfig.cy.json similarity index 70% rename from packages/react-components/react-tabster/e2e/tsconfig.json rename to packages/react-components/react-tabster/tsconfig.cy.json index f6b23b30d510ba..93a140885851da 100644 --- a/packages/react-components/react-tabster/e2e/tsconfig.json +++ b/packages/react-components/react-tabster/tsconfig.cy.json @@ -1,9 +1,9 @@ { - "extends": "../tsconfig.json", + "extends": "./tsconfig.json", "compilerOptions": { "isolatedModules": false, "types": ["node", "cypress", "cypress-storybook/cypress", "cypress-real-events"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.ts", "**/*.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx"] } diff --git a/packages/react-components/react-tabster/tsconfig.json b/packages/react-components/react-tabster/tsconfig.json index 9087bac77cc8d7..c8027a33f2aeb3 100644 --- a/packages/react-components/react-tabster/tsconfig.json +++ b/packages/react-components/react-tabster/tsconfig.json @@ -19,10 +19,7 @@ "path": "./tsconfig.spec.json" }, { - "path": "./.storybook/tsconfig.json" - }, - { - "path": "./e2e/tsconfig.json" + "path": "./tsconfig.cy.json" } ] } diff --git a/packages/react-components/react-tabster/tsconfig.lib.json b/packages/react-components/react-tabster/tsconfig.lib.json index 008c602dc19d24..47002ae1f756b3 100644 --- a/packages/react-components/react-tabster/tsconfig.lib.json +++ b/packages/react-components/react-tabster/tsconfig.lib.json @@ -9,6 +9,6 @@ "inlineSources": true, "types": ["static-assets", "environment"] }, - "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.stories.ts", "**/*.stories.tsx"], + "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.cy.ts", "**/*.cy.tsx"], "include": ["./src/**/*.ts", "./src/**/*.tsx"] }