Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

### Internal

- Remove `Picker` from private APIs ([#75394](https://github.com/WordPress/gutenberg/pull/75394)).
- Expose `useDrag` from `@use-gesture/react` package via private API's ([#66735](https://github.com/WordPress/gutenberg/pull/66735)).
- `Disabled`, `Modal`, `Popover`, `Tooltip`: Move context code to separate files to help docgen prop extraction ([#75316](https://github.com/WordPress/gutenberg/pull/75316)).
- Update Emotion dependencies to ensure compatibility with React 19 ([#75324](https://github.com/WordPress/gutenberg/pull/75324)).
Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/private-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {
ValidatedToggleGroupControl,
} from './validated-form-controls';
import { ValidatedFormTokenField } from './validated-form-controls/components/form-token-field';
import { Picker } from './color-picker/picker';

export const privateApis = {};
lock( privateApis, {
Expand All @@ -46,7 +45,6 @@ lock( privateApis, {
DateCalendar,
DateRangeCalendar,
TZDate,
Picker,
useDrag,
ValidatedInputControl,
ValidatedCheckboxControl,
Expand Down
4 changes: 4 additions & 0 deletions packages/dataviews/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
- Add new `adaptiveSelect` DataForm control. [#74937](https://github.com/WordPress/gutenberg/pull/74937)
- DataViews: Consistent rendering of selection checkbox and actions in grid layout. [#75056](https://github.com/WordPress/gutenberg/pull/75056)

### Internal

- DataForm: Use public `ColorPicker` component instead of internal `Picker` in color control. [#75394](https://github.com/WordPress/gutenberg/pull/75394)

## 11.3.0 (2026-01-29)

### Enhancements
Expand Down
17 changes: 9 additions & 8 deletions packages/dataviews/src/components/dataform-controls/color.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { colord } from 'colord';
* WordPress dependencies
*/
import {
ColorPicker,
Dropdown,
privateApis,
__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
Expand All @@ -20,14 +21,14 @@ import type { DataFormControlProps } from '../../types';
import { unlock } from '../../lock-unlock';
import getCustomValidity from './utils/get-custom-validity';

const { ValidatedInputControl, Picker } = unlock( privateApis );
const { ValidatedInputControl } = unlock( privateApis );

const ColorPicker = ( {
const ColorPickerDropdown = ( {
color,
onColorChange,
}: {
color: string;
onColorChange: ( colorObject: any ) => void;
onColorChange: ( newColor: string ) => void;
} ) => {
const validColor = color && colord( color ).isValid() ? color : '#ffffff';

Expand Down Expand Up @@ -59,8 +60,8 @@ const ColorPicker = ( {
) }
renderContent={ () => (
<div style={ { padding: '16px' } }>
<Picker
color={ colord( validColor ) }
<ColorPicker
color={ validColor }
onChange={ onColorChange }
enableAlpha
/>
Expand All @@ -82,8 +83,8 @@ export default function Color< Item >( {
const value = field.getValue( { item: data } ) || '';

const handleColorChange = useCallback(
( colorObject: any ) => {
onChange( setValue( { item: data, value: colorObject.toHex() } ) );
( newColor: string ) => {
onChange( setValue( { item: data, value: newColor } ) );
},
[ data, onChange, setValue ]
);
Expand All @@ -108,7 +109,7 @@ export default function Color< Item >( {
hideLabelFromVision={ hideLabelFromVision }
type="text"
prefix={
<ColorPicker
<ColorPickerDropdown
color={ value }
onColorChange={ handleColorChange }
/>
Expand Down
Loading