: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
// When `multiple`, just use the native browser styles
// without setting explicit height.
if (!__next40pxDefaultSize) {
sizes.default = sizes.compact;
const style = sizes[selectSize] || sizes.default;
return /*#__PURE__*/emotion_react_browser_esm_css(style, true ? "" : 0, true ? "" : 0);
const chevronIconSize = 18;
if (!__next40pxDefaultSize) {
padding.default = padding.compact;
const selectedPadding = padding[selectSize] || padding.default;
paddingLeft: selectedPadding,
paddingRight: selectedPadding + chevronIconSize,
paddingTop: selectedPadding,
paddingBottom: selectedPadding
const overflowStyles = ({
overflow: multiple ? 'auto' : 'hidden'
// TODO: Resolve need to use &&& to increase specificity
// https://github.com/WordPress/gutenberg/issues/18483
const Select = /*#__PURE__*/emotion_styled_base_browser_esm("select", true ? {
} : 0)("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:", COLORS.gray[900], ";display:block;font-family:inherit;margin:0;width:100%;max-width:none;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;", select_control_styles_disabledStyles, ";", fontSizeStyles, ";", select_control_styles_sizeStyles, ";", sizePaddings, ";", overflowStyles, ";}" + ( true ? "" : 0));
const DownArrowWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("margin-inline-end:", space(-1), ";line-height:0;" + ( true ? "" : 0));
const InputControlSuffixWrapperWithClickThrough = /*#__PURE__*/emotion_styled_base_browser_esm(input_suffix_wrapper, true ? {
} : 0)("position:absolute;pointer-events:none;", rtl({
}), ";" + ( true ? "" : 0));
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
* @param {IconProps} props icon is the SVG component to render
* size is a number specifiying the icon size in pixels
* Other props will be passed to wrapped SVG component
* @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element.
* @return {JSX.Element} Icon component
return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
/* harmony default export */ const icons_build_module_icon = ((0,external_wp_element_namespaceObject.forwardRef)(icon_Icon));
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
const chevronDown = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
/* harmony default export */ const chevron_down = (chevronDown);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/select-control/chevron-down.js
const SelectControlChevronDown = () => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InputControlSuffixWrapperWithClickThrough, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DownArrowWrapper, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_build_module_icon, {
/* harmony default export */ const select_control_chevron_down = (SelectControlChevronDown);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/select-control/index.js
function select_control_useUniqueId(idProp) {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(SelectControl);
const id = `inspector-select-control-${instanceId}`;
function UnforwardedSelectControl(props, ref) {
__next40pxDefaultSize = false,
__nextHasNoMarginBottom = false,
} = useDeprecated36pxDefaultSizeProp(props);
const id = select_control_useUniqueId(idProp);
const helpId = help ? `${id}__help` : undefined;
// Disable reason: A select with an onchange throws a warning.
if (!options?.length && !children) {
const handleOnChange = event => {
const selectedOptions = Array.from(event.target.options).filter(({
const newValues = selectedOptions.map(({
props.onChange?.(newValues, {
props.onChange?.(event.target.value, {
const classes = dist_clsx('components-select-control', className);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(base_control, {
__nextHasNoMarginBottom: __nextHasNoMarginBottom,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(input_base, {
hideLabelFromVision: hideLabelFromVision,
suffix: suffix || !multiple && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(select_control_chevron_down, {}),
labelPosition: labelPosition,
__next40pxDefaultSize: __next40pxDefaultSize,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Select, {
__next40pxDefaultSize: __next40pxDefaultSize,
"aria-describedby": helpId,
className: "components-select-control__input",
onChange: handleOnChange,
children: children || options.map((option, index) => {
const key = option.id || `${option.label}-${option.value}-${index}`;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("option", {
disabled: option.disabled,
* `SelectControl` allows users to select from a single or multiple option menu.
* It functions as a wrapper around the browser's native `<select>` element.
* import { SelectControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
* const MySelectControl = () => {
* const [ size, setSize ] = useState( '50%' );
* { label: 'Big', value: '100%' },
* { label: 'Medium', value: '50%' },
* { label: 'Small', value: '25%' },
const SelectControl = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedSelectControl);
/* harmony default export */ const select_control = (SelectControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/hooks/use-controlled-state.js
* @property {T} [initial] Initial value
* @property {T | ""} fallback Fallback value
/** @type {Readonly<{ initial: undefined, fallback: '' }>} */
* Defaults to empty string, as that is preferred for usage with
* <input />, <textarea />, and <select /> form elements.
* Custom hooks for "controlled" components to track and consolidate internal
* state and incoming values. This is useful for components that render
* `input`, `textarea`, or `select` HTML elements.
* https://reactjs.org/docs/forms.html#controlled-components
* At first, a component using useControlledState receives an initial prop
* value, which is used as initial internal state.
* This internal state can be maintained and updated without
* relying on new incoming prop values.
* Unlike the basic useState hook, useControlledState's state can
* be updated if a new incoming prop value is changed.
* @param {T | undefined} currentState The current value.
* @param {Options<T>} [options=defaultOptions] Additional options for the hook.
* @return {[T | "", (nextState: T) => void]} The controlled value and the value setter.
function use_controlled_state_useControlledState(currentState, options = defaultOptions) {
const [internalState, setInternalState] = (0,external_wp_element_namespaceObject.useState)(currentState);
const hasCurrentState = isValueDefined(currentState);
* Resets internal state if value every changes from uncontrolled <-> controlled.
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (hasCurrentState && internalState) {
setInternalState(undefined);
}, [hasCurrentState, internalState]);
const state = getDefinedValue([currentState, internalState, initial], fallback);
/* eslint-disable jsdoc/no-undefined-types */
/** @type {(nextState: T) => void} */
const setState = (0,external_wp_element_namespaceObject.useCallback)(nextState => {
setInternalState(nextState);
/* eslint-enable jsdoc/no-undefined-types */
return [state, setState];
/* harmony default export */ const use_controlled_state = (use_controlled_state_useControlledState);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/range-control/utils.js
* A float supported clamp function for a specific value.
* @param value The value to clamp.
* @param min The minimum value.
* @param max The maximum value.
* @return A (float) number
function floatClamp(value, min, max) {
if (typeof value !== 'number') {
return parseFloat(`${math_clamp(value, min, max)}`);
* Hook to store a clamped value, derived from props.
* @return The controlled value and the value setter.
function useControlledRangeValue(settings) {
const [state, setInternalState] = use_controlled_state(floatClamp(valueProp, min, max), {
initial: floatClamp(initial !== null && initial !== void 0 ? initial : null, min, max),
const setState = (0,external_wp_element_namespaceObject.useCallback)(nextValue => {
if (nextValue === null) {
setInternalState(floatClamp(nextValue, min, max));
}, [min, max, setInternalState]);
// `state` can't be an empty string because we specified a fallback value of
// `null` in `useControlledState`
return [state, setState];
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/range-control/styles/range-control-styles.js
function range_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
const rangeHeightValue = 30;
const rangeHeight = () => /*#__PURE__*/emotion_react_browser_esm_css({
height: rangeHeightValue,
minHeight: rangeHeightValue
}, true ? "" : 0, true ? "" : 0);
const deprecatedHeight = ({
}) => !__next40pxDefaultSize && /*#__PURE__*/emotion_react_browser_esm_css({
minHeight: rangeHeightValue
}, true ? "" : 0, true ? "" : 0);
const range_control_styles_Root = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("-webkit-tap-highlight-color:transparent;align-items:center;display:flex;justify-content:flex-start;padding:0;position:relative;touch-action:none;width:100%;min-height:40px;", deprecatedHeight, ";" + ( true ? "" : 0));
color = COLORS.ui.borderFocus
}) => /*#__PURE__*/emotion_react_browser_esm_css({
}, true ? "" : 0, true ? "" : 0);
if (!__nextHasNoMarginBottom) {
return /*#__PURE__*/emotion_react_browser_esm_css({
marginBottom: marks ? 16 : undefined
}, true ? "" : 0, true ? "" : 0);
const range_control_styles_Wrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("display:block;flex:1;position:relative;width:100%;", wrapperColor, ";", rangeHeight, ";", wrapperMargin, ";" + ( true ? "" : 0));
const BeforeIconWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
} : 0)("display:flex;margin-top:", railHeight, "px;", rtl({
}), ";" + ( true ? "" : 0));
const AfterIconWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
} : 0)("display:flex;margin-top:", railHeight, "px;", rtl({
}), ";" + ( true ? "" : 0));
const railBackgroundColor = ({