From a46ec3fe537a770375860fdbc770cb97dcfdbc20 Mon Sep 17 00:00:00 2001 From: Marcelo Serpa Date: Thu, 18 Apr 2024 17:16:14 -0600 Subject: [PATCH 1/2] Remove "experimental" designation for `BoxControl` --- packages/components/src/box-control/README.md | 6 +----- packages/components/src/box-control/index.tsx | 2 +- packages/components/src/box-control/stories/index.story.tsx | 2 +- packages/components/src/index.ts | 4 ++++ packages/components/src/tools-panel/tools-panel/README.md | 2 +- storybook/manager-head.html | 5 ++++- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/components/src/box-control/README.md b/packages/components/src/box-control/README.md index 2fd214b79157f7..364509b0189bcd 100644 --- a/packages/components/src/box-control/README.md +++ b/packages/components/src/box-control/README.md @@ -1,16 +1,12 @@ # BoxControl -
-This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes. -
- BoxControl components let users set values for Top, Right, Bottom, and Left. This can be used as an input control for values like `padding` or `margin`. ## Usage ```jsx import { useState } from 'react'; -import { __experimentalBoxControl as BoxControl } from '@wordpress/components'; +import { BoxControl } from '@wordpress/components'; const Example = () => { const [ values, setValues ] = useState( { diff --git a/packages/components/src/box-control/index.tsx b/packages/components/src/box-control/index.tsx index 9c3452d4ccb806..3f9791c2ba4d7a 100644 --- a/packages/components/src/box-control/index.tsx +++ b/packages/components/src/box-control/index.tsx @@ -51,7 +51,7 @@ function useUniqueId( idProp?: string ) { * This can be used as an input control for values like `padding` or `margin`. * * ```jsx - * import { __experimentalBoxControl as BoxControl } from '@wordpress/components'; + * import { BoxControl } from '@wordpress/components'; * import { useState } from '@wordpress/element'; * * const Example = () => { diff --git a/packages/components/src/box-control/stories/index.story.tsx b/packages/components/src/box-control/stories/index.story.tsx index 1b6604048f6d52..783f9d047b1bb0 100644 --- a/packages/components/src/box-control/stories/index.story.tsx +++ b/packages/components/src/box-control/stories/index.story.tsx @@ -14,7 +14,7 @@ import { useState } from '@wordpress/element'; import BoxControl from '../'; const meta: Meta< typeof BoxControl > = { - title: 'Components (Experimental)/BoxControl', + title: 'Components/BoxControl', component: BoxControl, argTypes: { values: { control: { type: null } }, diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index a824162cb24129..8660863a58f4e3 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -36,8 +36,12 @@ export { } from './border-box-control'; export { BorderControl as __experimentalBorderControl } from './border-control'; export { + /** + * @deprecated Import `BoxControl` instead. + */ default as __experimentalBoxControl, applyValueToSides as __experimentalApplyValueToSides, + default as BoxControl, } from './box-control'; export { default as Button } from './button'; export { default as ButtonGroup } from './button-group'; diff --git a/packages/components/src/tools-panel/tools-panel/README.md b/packages/components/src/tools-panel/tools-panel/README.md index df41b623eefb6c..feec34319c689a 100644 --- a/packages/components/src/tools-panel/tools-panel/README.md +++ b/packages/components/src/tools-panel/tools-panel/README.md @@ -60,7 +60,7 @@ import styled from '@emotion/styled'; * WordPress dependencies */ import { - __experimentalBoxControl as BoxControl, + BoxControl, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem, __experimentalUnitControl as UnitControl, diff --git a/storybook/manager-head.html b/storybook/manager-head.html index 629f06bf98edf9..a52e797ae6d2f6 100644 --- a/storybook/manager-head.html +++ b/storybook/manager-head.html @@ -1,6 +1,9 @@