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
19 changes: 4 additions & 15 deletions packages/components/src/border-box-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export type BorderSide = keyof Borders;

export type BorderBoxControlProps = ColorProps &
LabelProps &
Pick< BorderControlProps, 'enableStyle' > & {
Pick<
BorderControlProps,
'enableStyle' | '__next40pxDefaultSize' | 'size'
> & {
/**
* A callback function invoked when any border value is changed. The value
* received may be a "flat" border object, one that has properties defining
Expand All @@ -45,20 +48,6 @@ export type BorderBoxControlProps = ColorProps &
* properties but for each side; `top`, `right`, `bottom`, and `left`.
*/
value: AnyBorder;
/**
* Size of the control.
*
* @deprecated This prop no longer has any effect.
* @ignore
*/
size?: 'default' | '__unstable-large';
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
};

export type LinkedButtonProps = {
Expand Down
12 changes: 4 additions & 8 deletions packages/components/src/box-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ type UnitControlPassthroughProps = Omit<
>;

type DeprecatedBoxControlProps = {
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
/**
* @deprecated Pass to the `inputProps` prop instead.
* @ignore
Expand All @@ -46,7 +39,10 @@ type DeprecatedBoxControlProps = {
onMouseOut?: UnitControlProps[ 'onMouseOut' ];
};

export type BoxControlProps = Pick< UnitControlProps, 'units' > &
export type BoxControlProps = Pick<
UnitControlProps,
'units' | '__next40pxDefaultSize'
> &
DeprecatedBoxControlProps & {
/**
* If this property is true, a button to reset the box control is rendered.
Expand Down
21 changes: 6 additions & 15 deletions packages/components/src/font-size-picker/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
export type FontSizePickerProps = {
import type { ToggleGroupControlProps } from '../toggle-group-control/types';

export type FontSizePickerProps = Pick<
ToggleGroupControlProps,
'__next40pxDefaultSize' | 'size'
> & {
/**
* If `true`, it will not be possible to choose a custom fontSize. The user
* will be forced to pick one of the pre-defined sizes passed in fontSizes.
Expand Down Expand Up @@ -74,20 +79,6 @@ export type FontSizePickerProps = {
* @ignore
*/
__nextHasNoMarginBottom?: boolean;
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
/**
* Size of the control.
*
* @deprecated This prop no longer has any effect.
* @ignore
*/
size?: 'default' | '__unstable-large';
};

export type FontSize = {
Expand Down
23 changes: 1 addition & 22 deletions packages/components/src/number-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ import type { InputControlProps } from '../input-control/types';

export type NumberControlProps = Omit<
InputControlProps,
| 'isDragEnabled'
| 'min'
| 'max'
| 'required'
| 'step'
| 'type'
| 'value'
| '__next40pxDefaultSize'
'isDragEnabled' | 'min' | 'max' | 'required' | 'step' | 'type' | 'value'
> & {
/**
* If true, the default `input` HTML arrows will be hidden.
Expand Down Expand Up @@ -98,18 +91,4 @@ export type NumberControlProps = Omit<
* The value of the input.
*/
value?: number | string;
/**
* Do not throw a warning for the deprecated 36px default size.
* For internal components of other components that already throw the warning.
*
* @ignore
*/
__shouldNotWarnDeprecated36pxSize?: boolean;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do a full clean up of __shouldNotWarnDeprecated36pxSize separately.

/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
};
9 changes: 2 additions & 7 deletions packages/components/src/range-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {
*/
import type { BaseControlProps } from '../base-control/types';
import type { IconType } from '../icon';
import type { NumberControlProps } from '../number-control/types';

export type NumericProps = {
/**
Expand Down Expand Up @@ -78,6 +79,7 @@ export type RangeControlProps = Pick<
BaseControlProps,
'__nextHasNoMarginBottom' | 'hideLabelFromVision' | 'help'
> &
Pick< NumberControlProps, '__next40pxDefaultSize' > &
MarksProps & {
/**
* If this property is added, an Icon component will be rendered
Expand Down Expand Up @@ -199,13 +201,6 @@ export type RangeControlProps = Pick<
* @default 10
*/
shiftStep?: number;
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
/**
* Forcing the Tooltip UI to show or hide. This is overridden to `false`
* when `step` is set to the special string value `any`.
Expand Down
9 changes: 1 addition & 8 deletions packages/components/src/tree-select/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,8 @@ export interface Tree {
export interface TreeSelectProps
extends Omit<
SelectControlSingleSelectionProps,
'value' | 'multiple' | 'onChange' | '__next40pxDefaultSize'
'value' | 'multiple' | 'onChange'
> {
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
/**
* If this property is added, an option will be added with this label to represent empty selection.
*/
Expand Down
19 changes: 1 addition & 18 deletions packages/components/src/unit-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ export type UnitSelectControlProps = {

export type UnitControlProps = Pick< InputControlProps, 'size' > &
Omit< UnitSelectControlProps, 'size' | 'unit' > &
Omit<
NumberControlProps,
'spinControls' | 'suffix' | 'type' | '__next40pxDefaultSize'
> & {
Omit< NumberControlProps, 'spinControls' | 'suffix' | 'type' > & {
/**
* If `true`, the unit `<select>` is hidden.
*
Expand Down Expand Up @@ -110,18 +107,4 @@ export type UnitControlProps = Pick< InputControlProps, 'size' > &
* Callback when either the quantity or the unit inputs gains focus.
*/
onFocus?: FocusEventHandler< HTMLInputElement | HTMLSelectElement >;
/**
* Do not throw a warning for the deprecated 36px default size.
* For internal components of other components that already throw the warning.
*
* @ignore
*/
__shouldNotWarnDeprecated36pxSize?: boolean;
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @deprecated Default behavior since WordPress 7.1. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
};
Loading