: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/* harmony default export */ const dashicon = (Dashicon);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/icon/index.js
size = 'string' === typeof icon ? 20 : 24,
if ('string' === typeof icon) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dashicon, {
if ((0,external_wp_element_namespaceObject.isValidElement)(icon) && dashicon === icon.type) {
return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
if ('function' === typeof icon) {
return (0,external_wp_element_namespaceObject.createElement)(icon, {
if (icon && (icon.type === 'svg' || icon.type === external_wp_primitives_namespaceObject.SVG)) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
if ((0,external_wp_element_namespaceObject.isValidElement)(icon)) {
return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
// @ts-ignore Just forwarding the size prop along
/* harmony default export */ const build_module_icon = (Icon);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/button/index.js
const disabledEventsOnDisabledButton = ['onMouseDown', 'onClick'];
function button_useDeprecatedProps({
let computedVariant = variant;
// @todo Mark `isPressed` as deprecated
'aria-pressed': isPressed
(_computedSize = computedSize) !== null && _computedSize !== void 0 ? _computedSize : computedSize = 'small';
(_computedVariant = computedVariant) !== null && _computedVariant !== void 0 ? _computedVariant : computedVariant = 'primary';
(_computedVariant2 = computedVariant) !== null && _computedVariant2 !== void 0 ? _computedVariant2 : computedVariant = 'tertiary';
(_computedVariant3 = computedVariant) !== null && _computedVariant3 !== void 0 ? _computedVariant3 : computedVariant = 'secondary';
external_wp_deprecated_default()('wp.components.Button `isDefault` prop', {
alternative: 'variant="secondary"'
(_computedVariant4 = computedVariant) !== null && _computedVariant4 !== void 0 ? _computedVariant4 : computedVariant = 'secondary';
(_computedVariant5 = computedVariant) !== null && _computedVariant5 !== void 0 ? _computedVariant5 : computedVariant = 'link';
function UnforwardedButton(props, ref) {
__experimentalIsFocusable: isFocusable,
} = button_useDeprecatedProps(props);
'aria-checked': ariaChecked,
'aria-pressed': ariaPressed,
'aria-selected': ariaSelected,
} = 'href' in buttonOrAnchorProps ? buttonOrAnchorProps : {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(Button, 'components-button__description');
const hasChildren = 'string' === typeof children && !!children || Array.isArray(children) && children?.[0] && children[0] !== null &&
// Tooltip should not considered as a child
children?.[0]?.props?.className !== 'components-tooltip';
const truthyAriaPressedValues = [true, 'true', 'mixed'];
const classes = dist_clsx('components-button', className, {
'is-next-40px-default-size': __next40pxDefaultSize,
'is-secondary': variant === 'secondary',
'is-primary': variant === 'primary',
'is-small': size === 'small',
'is-compact': size === 'compact',
'is-tertiary': variant === 'tertiary',
'is-pressed': truthyAriaPressedValues.includes(ariaPressed),
'is-pressed-mixed': ariaPressed === 'mixed',
'is-link': variant === 'link',
'is-destructive': isDestructive,
'has-text': !!icon && (hasChildren || text),
const trulyDisabled = disabled && !isFocusable;
const Tag = href !== undefined && !trulyDisabled ? 'a' : 'button';
const buttonProps = Tag === 'button' ? {
'aria-checked': ariaChecked,
'aria-pressed': ariaPressed,
'aria-selected': ariaSelected
const anchorProps = Tag === 'a' ? {
const disableEventProps = {};
if (disabled && isFocusable) {
// In this case, the button will be disabled, but still focusable and
// perceivable by screen reader users.
buttonProps['aria-disabled'] = true;
anchorProps['aria-disabled'] = true;
for (const disabledEvent of disabledEventsOnDisabledButton) {
disableEventProps[disabledEvent] = event => {
// Should show the tooltip if...
const shouldShowTooltip = !trulyDisabled && (
// An explicit tooltip is passed or...
showTooltip && !!label ||
// There's a shortcut or...
// There's a label and...
// The children are empty and...
// The tooltip is not explicitly disabled.
const descriptionId = describedBy ? instanceId : undefined;
const describedById = additionalProps['aria-describedby'] || descriptionId;
'aria-label': additionalProps['aria-label'] || label,
'aria-describedby': describedById,
const elementChildren = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [icon && iconPosition === 'left' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
}), text && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
}), children, icon && iconPosition === 'right' && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
const element = Tag === 'a' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("a", {
children: elementChildren
}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("button", {
children: elementChildren
// In order to avoid some React reconciliation issues, we are always rendering
// the `Tooltip` component even when `shouldShowTooltip` is `false`.
// In order to make sure that the tooltip doesn't show when it shouldn't,
// we don't pass the props to the `Tooltip` component.
const tooltipProps = shouldShowTooltip ? {
text: children?.length && describedBy ? describedBy : label,
placement: tooltipPosition &&
// Convert legacy `position` values to be used with the new `placement` prop
positionToPlacement(tooltipPosition)
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tooltip, {
}), describedBy && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(visually_hidden_component, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
* Lets users take actions and make choices with a single click or tap.
* import { Button } from '@wordpress/components';
* const Mybutton = () => (
* onClick={ handleClick }
const Button = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedButton);
/* harmony default export */ const build_module_button = (Button);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/number-control/styles/number-control-styles.js
function number_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)."; }
var number_control_styles_ref = true ? {
styles: "input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;}"
const htmlArrowStyles = ({
return number_control_styles_ref;
const number_control_styles_Input = /*#__PURE__*/emotion_styled_base_browser_esm(input_control, true ? {
} : 0)(htmlArrowStyles, ";" + ( true ? "" : 0));
const SpinButton = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_button, true ? {
} : 0)("&&&&&{color:", COLORS.theme.accent, ";}" + ( true ? "" : 0));
const smallSpinButtons = /*#__PURE__*/emotion_react_browser_esm_css("width:", space(5), ";min-width:", space(5), ";height:", space(5), ";" + ( true ? "" : 0), true ? "" : 0);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/math.js
* Parses and retrieves a number value.
* @param {unknown} value The incoming value.
* @return {number} The parsed number value.
function getNumber(value) {
const number = Number(value);
return isNaN(number) ? 0 : number;
* @param {Array<number|string>} args Values to add together.
* @return {number} The sum of values.
return args.reduce( /** @type {(sum:number, arg: number|string) => number} */
(sum, arg) => sum + getNumber(arg), 0);
* Safely subtracts 2 values.
* @param {Array<number|string>} args Values to subtract together.
* @return {number} The difference of the values.
function subtract(...args) {
return args.reduce( /** @type {(diff:number, arg: number|string, index:number) => number} */
const value = getNumber(arg);
return index === 0 ? value : diff - value;
* Determines the decimal position of a number value.
* @param {number} value The number to evaluate.
* @return {number} The number of decimal places.
function getPrecision(value) {
const split = (value + '').split('.');
return split[1] !== undefined ? split[1].length : 0;
* Clamps a value based on a min/max range.
* @param {number} value The value.
* @param {number} min The minimum range.
* @param {number} max The maximum range.
* @return {number} The clamped value.
function math_clamp(value, min, max) {
const baseValue = getNumber(value);
return Math.max(min, Math.min(baseValue, max));
* Clamps a value based on a min/max range with rounding
* @param {number | string} value The value.
* @param {number} min The minimum range.
* @param {number} max The maximum range.
* @param {number} step A multiplier for the value.
* @return {number} The rounded and clamped value.
function roundClamp(value = 0, min = Infinity, max = Infinity, step = 1) {
const baseValue = getNumber(value);
const stepValue = getNumber(step);
const precision = getPrecision(step);
const rounded = Math.round(baseValue / stepValue) * stepValue;
const clampedValue = math_clamp(rounded, min, max);
return precision ? getNumber(clampedValue.toFixed(precision)) : clampedValue;
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/h-stack/utils.js