diff --git a/package.json b/package.json index 54685beda377ca..dc024131b4796a 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,7 @@ "npm": ">=6.9.0 <7" }, "config": { - "GUTENBERG_PHASE": 2, - "COMPONENT_SYSTEM_PHASE": 1 + "GUTENBERG_PHASE": 2 }, "dependencies": { "@wordpress/a11y": "file:packages/a11y", diff --git a/packages/components/src/ui/context/component-system-provider.js b/packages/components/src/ui/context/component-system-provider.js deleted file mode 100644 index 2d97eb3eed80c6..00000000000000 --- a/packages/components/src/ui/context/component-system-provider.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Internal dependencies - */ -import { ContextSystemProvider } from './context-system-provider'; - -/** - * @param {Object} props - * @param {string[]} [props.__unstableNextInclude] - * @param {import('react').ReactNode} props.children - * @param {any} props.value - */ -export function ComponentSystemProvider( { - __unstableNextInclude = [], - children, - value = {}, -} ) { - if ( process.env.COMPONENT_SYSTEM_PHASE === 1 ) { - const contextValue = { ...value }; - - __unstableNextInclude.forEach( ( namespace ) => { - const baseValue = contextValue[ namespace ] || {}; - contextValue[ namespace ] = { - ...baseValue, - __unstableVersion: 'next', - }; - } ); - - return ( - - { children } - - ); - } - - return children; -} diff --git a/packages/components/src/ui/context/index.js b/packages/components/src/ui/context/index.js index 96d346496b6eee..e19795d7b7a13b 100644 --- a/packages/components/src/ui/context/index.js +++ b/packages/components/src/ui/context/index.js @@ -1,4 +1,3 @@ -export { ComponentSystemProvider } from './component-system-provider'; export { ContextSystemProvider, useComponentsContext, diff --git a/storybook/main.js b/storybook/main.js index d410195ee23b1b..18f7790acbe428 100644 --- a/storybook/main.js +++ b/storybook/main.js @@ -5,9 +5,7 @@ const stories = [ '../packages/icons/src/**/stories/*.js', ].filter( Boolean ); -const customEnvVariables = { - COMPONENT_SYSTEM_PHASE: 1, -}; +const customEnvVariables = {}; module.exports = { stories, diff --git a/typings/gutenberg-env/index.d.ts b/typings/gutenberg-env/index.d.ts index efdd71bd328783..0d4d4e47028daf 100644 --- a/typings/gutenberg-env/index.d.ts +++ b/typings/gutenberg-env/index.d.ts @@ -1,6 +1,5 @@ interface Environment { NODE_ENV: unknown; - COMPONENT_SYSTEM_PHASE: number | undefined; FORCE_REDUCED_MOTION: boolean | undefined; } interface Process { diff --git a/webpack.config.js b/webpack.config.js index 4915d8e0b385f1..af7269181c007e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -178,13 +178,6 @@ module.exports = { 10 ) || 1 ), - // Inject the `COMPONENT_SYSTEM_PHASE` global, used for controlling Component System roll-out. - 'process.env.COMPONENT_SYSTEM_PHASE': JSON.stringify( - parseInt( - process.env.npm_package_config_COMPONENT_SYSTEM_PHASE, - 10 - ) || 0 - ), 'process.env.FORCE_REDUCED_MOTION': JSON.stringify( process.env.FORCE_REDUCED_MOTION ),