Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
__experimentalToggleGroupControl as ToggleGroupControl,
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
__experimentalUnitControl as UnitControl,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
__experimentalVStack as VStack,
__experimentalToolsPanelItem as ToolsPanelItem,
__experimentalUseCustomUnits as useCustomUnits,
Expand Down Expand Up @@ -298,7 +298,7 @@ function GridControls( {
panelId={ panelId }
>
<FlexItem style={ { width: '50%' } }>
<InputControl
<WCInputControl
label={ __( 'Column span' ) }
type="number"
onChange={ ( value ) => {
Expand All @@ -322,7 +322,7 @@ function GridControls( {
/>
</FlexItem>
<FlexItem style={ { width: '50%' } }>
<InputControl
<WCInputControl
label={ __( 'Row span' ) }
type="number"
onChange={ ( value ) => {
Expand Down Expand Up @@ -359,7 +359,7 @@ function GridControls( {
panelId={ panelId }
>
<FlexItem style={ { width: '50%' } }>
<InputControl
<WCInputControl
label={ __( 'Column' ) }
type="number"
onChange={ ( value ) => {
Expand Down Expand Up @@ -393,7 +393,7 @@ function GridControls( {
/>
</FlexItem>
<FlexItem style={ { width: '50%' } }>
<InputControl
<WCInputControl
label={ __( 'Row' ) }
type="number"
onChange={ ( value ) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
FormFileUpload,
Placeholder,
DropZone,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
withFilters,
} from '@wordpress/components';
Expand Down Expand Up @@ -33,7 +33,7 @@ const InsertFromURLPopover = ( {
className="block-editor-media-placeholder__url-input-form"
onSubmit={ onSubmit }
>
<InputControl
<WCInputControl
label={ __( 'URL' ) }
type="text" // Use text instead of URL to allow relative paths (e.g., /image/image.jpg)
hideLabelFromVision
Expand Down
4 changes: 2 additions & 2 deletions packages/block-editor/src/components/url-input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';
import {
BaseControl,
Button,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
Spinner,
Popover,
privateApis as componentsPrivateApis,
Expand Down Expand Up @@ -436,7 +436,7 @@ function Control( {

const MaybeValidatedInputControl = isValidated
? ValidatedInputControl
: InputControl;
: WCInputControl;

return (
<BaseControl { ...controlProps }>
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/embed/embed-placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { __, _x } from '@wordpress/i18n';
import {
Button,
Placeholder,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
} from '@wordpress/components';
import { BlockIcon } from '@wordpress/block-editor';
import { Link, Stack } from '@wordpress/ui';
Expand All @@ -27,7 +27,7 @@ export default function EmbedPlaceholder( {
) }
>
<form onSubmit={ onSubmit }>
<InputControl
<WCInputControl
type="url"
value={ value || '' }
className="wp-block-embed__placeholder-input"
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/rss/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ToolbarGroup,
TextControl,
ExternalLink,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
__experimentalToolsPanel as ToolsPanel,
__experimentalToolsPanelItem as ToolsPanelItem,
} from '@wordpress/components';
Expand Down Expand Up @@ -88,7 +88,7 @@ export default function RSSEdit( { attributes, setAttributes, name } ) {
onSubmit={ onSubmitURL }
className="wp-block-rss__placeholder-form"
>
<InputControl
<WCInputControl
label={ label }
type="url"
hideLabelFromVision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {
BaseControl,
Button,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
} from '@wordpress/components';
import { speak } from '@wordpress/a11y';
import {
Expand Down Expand Up @@ -415,7 +415,7 @@ function CalendarDateControl< Item >( {
</Stack>

{ /* Manual date input */ }
<InputControl
<WCInputControl
ref={ validityTargetRef }
type="date"
label={ __( 'Date' ) }
Expand Down Expand Up @@ -651,7 +651,7 @@ function CalendarDateRangeControl< Item >( {
justify="space-between"
className="dataviews-controls__date-range-inputs"
>
<InputControl
<WCInputControl
ref={ fromInputRef }
type="date"
label={ __( 'From' ) }
Expand All @@ -665,7 +665,7 @@ function CalendarDateRangeControl< Item >( {
min={ minConstraint }
max={ maxConstraint }
/>
<InputControl
<WCInputControl
ref={ toInputRef }
type="date"
label={ __( 'To' ) }
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/blog-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { decodeEntities } from '@wordpress/html-entities';
import {
Button,
Dropdown,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
} from '@wordpress/components';
import { useState, useMemo } from '@wordpress/element';
import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
Expand Down Expand Up @@ -103,7 +103,7 @@ export default function BlogTitle() {
title={ __( 'Blog title' ) }
onClose={ onClose }
/>
<InputControl
<WCInputControl
placeholder={ __( 'No title' ) }
value={ postsPageTitle }
onChange={ debounce( setPostsPageTitle, 300 ) }
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/post-url/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n';
import {
ExternalLink,
Button,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
__experimentalVStack as VStack,
Expand Down Expand Up @@ -101,7 +101,7 @@ export default function PostURL( { onClose } ) {
<div>
{ isEditable && (
<>
<InputControl
<WCInputControl
prefix={
<InputControlPrefixWrapper>
/
Expand Down
4 changes: 2 additions & 2 deletions packages/fields/src/actions/duplicate-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Button,
__experimentalHStack as HStack,
__experimentalVStack as VStack,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
} from '@wordpress/components';
import type { BasePost, CoreDataError } from '../types';
import { getItemTitle } from './utils';
Expand Down Expand Up @@ -145,7 +145,7 @@ const duplicatePost: Action< BasePost > = {
) }
</div>
) }
<InputControl
<WCInputControl
label={ __( 'Title' ) }
placeholder={ __( 'No title' ) }
value={ getItemTitle( item ) }
Expand Down
4 changes: 2 additions & 2 deletions packages/fields/src/actions/reorder-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Button,
__experimentalHStack as HStack,
__experimentalVStack as VStack,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
} from '@wordpress/components';
import type { CoreDataError, BasePost } from '../types';

Expand Down Expand Up @@ -85,7 +85,7 @@ function ReorderModal( {
'Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.'
) }
</div>
<InputControl
<WCInputControl
label={ __( 'Order' ) }
type="number"
value={
Expand Down
4 changes: 2 additions & 2 deletions packages/fields/src/fields/slug/slug-edit.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Button,
ExternalLink,
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
__experimentalVStack as VStack,
Expand Down Expand Up @@ -79,7 +79,7 @@ const SlugEdit = ( {
{ __( 'Learn more' ) }
</ExternalLink>
</VStack>
<InputControl
<WCInputControl
prefix={
<InputControlPrefixWrapper>
/
Expand Down
4 changes: 2 additions & 2 deletions packages/format-library/src/link/css-classes-setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from '@wordpress/element';
import { useInstanceId } from '@wordpress/compose';
import { __ } from '@wordpress/i18n';
import {
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
CheckboxControl,
} from '@wordpress/components';
import { Stack, VisuallyHidden } from '@wordpress/ui';
Expand Down Expand Up @@ -66,7 +66,7 @@ const CSSClassesSettingComponent = ( { setting, value, onChange } ) => {
/>
{ isSettingActive && (
<div id={ controlledRegionId }>
<InputControl
<WCInputControl
label={ __( 'CSS classes' ) }
value={ value?.cssClasses }
onChange={ handleSettingChange }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
__experimentalInputControl as InputControl,
__experimentalInputControl as WCInputControl,
Button,
Modal,
} from '@wordpress/components';
Expand Down Expand Up @@ -45,7 +45,7 @@ export default function RenameDialog( {
} }
>
<Stack gap="sm" direction="column">
<InputControl
<WCInputControl
autoComplete="off"
value={ newName }
onChange={ setNewName }
Expand Down
1 change: 1 addition & 0 deletions tools/eslint/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ export default dedupePlugins( [
Autocomplete: 'WCAutocomplete',
Badge: 'WCBadge',
Icon: 'WCIcon',
__experimentalInputControl: 'WCInputControl',
Tooltip: 'WCTooltip',
},
},
Expand Down
Loading