: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/toggle-group-control/toggle-group-control-option/component.js
function UnforwardedToggleGroupControlOption(props, ref) {
const optionLabel = restProps['aria-label'] || label;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(toggle_group_control_option_base_component, {
"aria-label": optionLabel,
* `ToggleGroupControlOption` is a form component and is meant to be used as a
* child of `ToggleGroupControl`.
* __experimentalToggleGroupControl as ToggleGroupControl,
* __experimentalToggleGroupControlOption as ToggleGroupControlOption,
* } from '@wordpress/components';
* <ToggleGroupControl label="my label" value="vertical" isBlock>
* <ToggleGroupControlOption value="horizontal" label="Horizontal" />
* <ToggleGroupControlOption value="vertical" label="Vertical" />
const ToggleGroupControlOption = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedToggleGroupControlOption);
/* harmony default export */ const toggle_group_control_option_component = (ToggleGroupControlOption);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/font-size-picker/constants.js
* List of T-shirt abbreviations.
* When there are 5 font sizes or fewer, we assume that the font sizes are
* ordered by size and show T-shirt labels.
const T_SHIRT_ABBREVIATIONS = [/* translators: S stands for 'small' and is a size label. */
(0,external_wp_i18n_namespaceObject.__)('S'), /* translators: M stands for 'medium' and is a size label. */
(0,external_wp_i18n_namespaceObject.__)('M'), /* translators: L stands for 'large' and is a size label. */
(0,external_wp_i18n_namespaceObject.__)('L'), /* translators: XL stands for 'extra large' and is a size label. */
(0,external_wp_i18n_namespaceObject.__)('XL'), /* translators: XXL stands for 'extra extra large' and is a size label. */
(0,external_wp_i18n_namespaceObject.__)('XXL')];
* When there are 5 font sizes or fewer, we assume that the font sizes are
* ordered by size and show T-shirt labels.
const T_SHIRT_NAMES = [(0,external_wp_i18n_namespaceObject.__)('Small'), (0,external_wp_i18n_namespaceObject.__)('Medium'), (0,external_wp_i18n_namespaceObject.__)('Large'), (0,external_wp_i18n_namespaceObject.__)('Extra Large'), (0,external_wp_i18n_namespaceObject.__)('Extra Extra Large')];
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/font-size-picker/font-size-picker-toggle-group.js
const FontSizePickerToggleGroup = props => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(toggle_group_control_component, {
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: __next40pxDefaultSize,
label: (0,external_wp_i18n_namespaceObject.__)('Font size'),
hideLabelFromVision: true,
children: fontSizes.map((fontSize, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(toggle_group_control_option_component, {
label: T_SHIRT_ABBREVIATIONS[index],
"aria-label": fontSize.name || T_SHIRT_NAMES[index],
/* harmony default export */ const font_size_picker_toggle_group = (FontSizePickerToggleGroup);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/font-size-picker/index.js
const DEFAULT_UNITS = ['px', 'em', 'rem', 'vw', 'vh'];
const UnforwardedFontSizePicker = (props, ref) => {
__next40pxDefaultSize = false,
disableCustomFontSizes = false,
units: unitsProp = DEFAULT_UNITS,
const units = useCustomUnits({
availableUnits: unitsProp
const shouldUseSelectControl = fontSizes.length > 5;
const selectedFontSize = fontSizes.find(fontSize => fontSize.size === value);
const isCustomValue = !!value && !selectedFontSize;
const [showCustomValueControl, setShowCustomValueControl] = (0,external_wp_element_namespaceObject.useState)(!disableCustomFontSizes && isCustomValue);
const headerHint = (0,external_wp_element_namespaceObject.useMemo)(() => {
if (showCustomValueControl) {
return (0,external_wp_i18n_namespaceObject.__)('Custom');
if (!shouldUseSelectControl) {
return selectedFontSize.name || T_SHIRT_NAMES[fontSizes.indexOf(selectedFontSize)];
const commonUnit = getCommonSizeUnit(fontSizes);
return `(${commonUnit})`;
}, [showCustomValueControl, shouldUseSelectControl, selectedFontSize, fontSizes]);
if (fontSizes.length === 0 && disableCustomFontSizes) {
// If neither the value or first font size is a string, then FontSizePicker
// operates in a legacy "unitless" mode where UnitControl can only be used
// to select px values and onChange() is always called with number values.
const hasUnits = typeof value === 'string' || typeof fontSizes[0]?.size === 'string';
const [valueQuantity, valueUnit] = parseQuantityAndUnitFromRawValue(value, units);
const isValueUnitRelative = !!valueUnit && ['em', 'rem', 'vw', 'vh'].includes(valueUnit);
const isDisabled = value === undefined;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_Container, {
className: "components-font-size-picker",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(visually_hidden_component, {
children: (0,external_wp_i18n_namespaceObject.__)('Font size')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(spacer_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_Header, {
className: "components-font-size-picker__header",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(HeaderLabel, {
"aria-label": `${(0,external_wp_i18n_namespaceObject.__)('Size')} ${headerHint || ''}`,
children: [(0,external_wp_i18n_namespaceObject.__)('Size'), headerHint && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(HeaderHint, {
className: "components-font-size-picker__header__hint",
}), !disableCustomFontSizes && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(HeaderToggle, {
label: showCustomValueControl ? (0,external_wp_i18n_namespaceObject.__)('Use size preset') : (0,external_wp_i18n_namespaceObject.__)('Set custom size'),
setShowCustomValueControl(!showCustomValueControl);
isPressed: showCustomValueControl,
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
children: [!!fontSizes.length && shouldUseSelectControl && !showCustomValueControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_size_picker_select, {
__next40pxDefaultSize: __next40pxDefaultSize,
disableCustomFontSizes: disableCustomFontSizes,
if (newValue === undefined) {
onChange?.(hasUnits ? newValue : Number(newValue), fontSizes.find(fontSize => fontSize.size === newValue));
onSelectCustom: () => setShowCustomValueControl(true)
}), !shouldUseSelectControl && !showCustomValueControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(font_size_picker_toggle_group, {
__next40pxDefaultSize: __next40pxDefaultSize,
if (newValue === undefined) {
onChange?.(hasUnits ? newValue : Number(newValue), fontSizes.find(fontSize => fontSize.size === newValue));
}), !disableCustomFontSizes && showCustomValueControl && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(flex_component, {
className: "components-font-size-picker__custom-size-control",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(flex_item_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(unit_control, {
__next40pxDefaultSize: __next40pxDefaultSize,
label: (0,external_wp_i18n_namespaceObject.__)('Custom'),
hideLabelFromVision: true,
if (newValue === undefined) {
onChange?.(hasUnits ? newValue : parseInt(newValue, 10));
units: hasUnits ? units : [],
}), withSlider && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(flex_item_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(spacer_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(range_control, {
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: __next40pxDefaultSize,
className: "components-font-size-picker__custom-input",
label: (0,external_wp_i18n_namespaceObject.__)('Custom Size'),
hideLabelFromVision: true,
initialPosition: fallbackFontSize,
if (newValue === undefined) {
onChange?.(newValue + (valueUnit !== null && valueUnit !== void 0 ? valueUnit : 'px'));
max: isValueUnitRelative ? 10 : 100,
step: isValueUnitRelative ? 0.1 : 1
}), withReset && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(flex_item_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Button, {
__experimentalIsFocusable: true,
__next40pxDefaultSize: true,
size: size === '__unstable-large' || props.__next40pxDefaultSize ? 'default' : 'small',
children: (0,external_wp_i18n_namespaceObject.__)('Reset')
const FontSizePicker = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedFontSizePicker);
/* harmony default export */ const font_size_picker = (FontSizePicker);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-file-upload/index.js
* FormFileUpload is a component that allows users to select files from their local device.
* import { FormFileUpload } from '@wordpress/components';
* const MyFormFileUpload = () => (
* onChange={ ( event ) => console.log( event.currentTarget.files ) }
function FormFileUpload({
const ref = (0,external_wp_element_namespaceObject.useRef)(null);
const openFileDialog = () => {
const ui = render ? render({
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_button, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "components-form-file-upload",
children: [ui, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
"data-testid": "form-file-upload-input"
/* harmony default export */ const form_file_upload = (FormFileUpload);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-toggle/index.js
const form_toggle_noop = () => {};
* FormToggle switches a single setting on or off.
* import { FormToggle } from '@wordpress/components';
* import { useState } from '@wordpress/element';
* const MyFormToggle = () => {
* const [ isChecked, setChecked ] = useState( true );
* onChange={ () => setChecked( ( state ) => ! state ) }
function FormToggle(props, ref) {
onChange = form_toggle_noop,
const wrapperClasses = dist_clsx('components-form-toggle', className, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
className: wrapperClasses,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
className: "components-form-toggle__input",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "components-form-toggle__track"
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "components-form-toggle__thumb"
/* harmony default export */ const form_toggle = ((0,external_wp_element_namespaceObject.forwardRef)(FormToggle));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-token-field/token.js
const token_noop = () => {};
onClickRemove = token_noop,
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(Token);
const tokenClasses = dist_clsx('components-form-token-field__token', {
'is-error': 'error' === status,
'is-success': 'success' === status,
'is-validating': 'validating' === status,
'is-borderless': isBorderless,
const onClick = () => onClickRemove({
const transformedValue = displayTransform(value);
const termPositionAndCount = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */