: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tab-panel/index.js
// eslint-disable-next-line no-restricted-imports
// Separate the actual tab name from the instance ID. This is
// necessary because Ariakit internally uses the element ID when
// a new tab is selected, but our implementation looks specifically
// for the tab name to be passed to the `onSelect` callback.
const extractTabName = id => {
if (typeof id === 'undefined' || id === null) {
return id.match(/^tab-panel-[0-9]*-(.*)/)?.[1];
* TabPanel is an ARIA-compliant tabpanel.
* TabPanels organize content across different screens, data sets, and interactions.
* It has two sections: a list of tabs, and the view to show when tabs are chosen.
* import { TabPanel } from '@wordpress/components';
* const onSelect = ( tabName ) => {
* console.log( 'Selecting tab', tabName );
* const MyTabPanel = () => (
* className="my-tab-panel"
* activeClass="active-tab"
* { ( tab ) => <p>{ tab.title }</p> }
const UnforwardedTabPanel = ({
orientation = 'horizontal',
activeClass = 'is-active',
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(tab_panel_TabPanel, 'tab-panel');
const prependInstanceId = (0,external_wp_element_namespaceObject.useCallback)(tabName => {
if (typeof tabName === 'undefined') {
return `${instanceId}-${tabName}`;
const tabStore = useTabStore({
setSelectedId: newTabValue => {
if (typeof newTabValue === 'undefined' || newTabValue === null) {
const newTab = tabs.find(t => prependInstanceId(t.name) === newTabValue);
if (newTab?.disabled || newTab === selectedTab) {
const simplifiedTabName = extractTabName(newTabValue);
if (typeof simplifiedTabName === 'undefined') {
onSelect?.(simplifiedTabName);
defaultSelectedId: prependInstanceId(initialTabName)
const selectedTabName = extractTabName(tabStore.useState('selectedId'));
const setTabStoreSelectedId = (0,external_wp_element_namespaceObject.useCallback)(tabName => {
tabStore.setState('selectedId', prependInstanceId(tabName));
}, [prependInstanceId, tabStore]);
const selectedTab = tabs.find(({
}) => name === selectedTabName);
const previousSelectedTabName = (0,external_wp_compose_namespaceObject.usePrevious)(selectedTabName);
// Ensure `onSelect` is called when the initial tab is selected.
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (previousSelectedTabName !== selectedTabName && selectedTabName === initialTabName && !!selectedTabName) {
onSelect?.(selectedTabName);
}, [selectedTabName, initialTabName, onSelect, previousSelectedTabName]);
// Handle selecting the initial tab.
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
// If there's a selected tab, don't override it.
const initialTab = tabs.find(tab => tab.name === initialTabName);
// Wait for the denoted initial tab to be declared before making a
// selection. This ensures that if a tab is declared lazily it can
// still receive initial selection.
if (initialTabName && !initialTab) {
if (initialTab && !initialTab.disabled) {
// Select the initial tab if it's not disabled.
setTabStoreSelectedId(initialTab.name);
// Fallback to the first enabled tab when the initial tab is
// disabled or it can't be found.
const firstEnabledTab = tabs.find(tab => !tab.disabled);
setTabStoreSelectedId(firstEnabledTab.name);
}, [tabs, selectedTab, initialTabName, instanceId, setTabStoreSelectedId]);
// Handle the currently selected tab becoming disabled.
(0,external_wp_element_namespaceObject.useEffect)(() => {
// This effect only runs when the selected tab is defined and becomes disabled.
if (!selectedTab?.disabled) {
const firstEnabledTab = tabs.find(tab => !tab.disabled);
// If the currently selected tab becomes disabled, select the first enabled tab.
setTabStoreSelectedId(firstEnabledTab.name);
}, [tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tab_list_TabList, {
className: "components-tab-panel__tabs",
children: tabs.map(tab => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tab, {
id: prependInstanceId(tab.name),
className: dist_clsx('components-tab-panel__tabs-item', tab.className, {
[activeClass]: tab.name === selectedTabName
"aria-controls": `${prependInstanceId(tab.name)}-view`,
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_button, {
label: tab.icon && tab.title,
children: !tab.icon && tab.title
}), selectedTab && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TabPanel, {
id: `${prependInstanceId(selectedTab.name)}-view`,
tabId: prependInstanceId(selectedTab.name),
className: "components-tab-panel__tab-content",
children: children(selectedTab)
const tab_panel_TabPanel = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedTabPanel);
/* harmony default export */ const tab_panel = (tab_panel_TabPanel);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/text-control/index.js
function UnforwardedTextControl(props, ref) {
__next40pxDefaultSize = false,
const id = (0,external_wp_compose_namespaceObject.useInstanceId)(TextControl, 'inspector-text-control', idProp);
const onChangeValue = event => onChange(event.target.value);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(base_control, {
__nextHasNoMarginBottom: __nextHasNoMarginBottom,
hideLabelFromVision: hideLabelFromVision,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("input", {
className: dist_clsx('components-text-control__input', {
'is-next-40px-default-size': __next40pxDefaultSize
"aria-describedby": !!help ? id + '__help' : undefined,
* TextControl components let users enter and edit text.
* import { TextControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
* const MyTextControl = () => {
* const [ className, setClassName ] = useState( '' );
* label="Additional CSS Class"
* onChange={ ( value ) => setClassName( value ) }
const TextControl = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedTextControl);
/* harmony default export */ const text_control = (TextControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/input/base.js
const inputStyleNeutral = /*#__PURE__*/emotion_react_browser_esm_css("box-shadow:0 0 0 transparent;border-radius:", config_values.radiusBlockUi, ";border:", config_values.borderWidth, " solid ", COLORS.ui.border, ";@media not ( prefers-reduced-motion ){transition:box-shadow 0.1s linear;}" + ( true ? "" : 0), true ? "" : 0);
const inputStyleFocus = /*#__PURE__*/emotion_react_browser_esm_css("border-color:", COLORS.theme.accent, ";box-shadow:0 0 0 calc( ", config_values.borderWidthFocus, " - ", config_values.borderWidth, " ) ", COLORS.theme.accent, ";outline:2px solid transparent;" + ( true ? "" : 0), true ? "" : 0);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/breakpoint-values.js
/* harmony default export */ const breakpoint_values = ({
// admin sidebar auto folds
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/breakpoint.js
* @param {keyof breakpoints} point
* @return {string} Media query declaration.
const breakpoint = point => `@media (min-width: ${breakpoint_values[point]})`;
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/input/input-control.js
const inputControl = /*#__PURE__*/emotion_react_browser_esm_css("display:block;font-family:", font('default.fontFamily'), ";padding:6px 8px;", inputStyleNeutral, ";font-size:", font('mobileTextMinFontSize'), ";line-height:normal;", breakpoint('small'), "{font-size:", font('default.fontSize'), ";line-height:normal;}&:focus{", inputStyleFocus, ";}&::-webkit-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}&::-moz-placeholder{opacity:1;color:", COLORS.ui.darkGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.darkGrayPlaceholder, ";}.is-dark-theme &{&::-webkit-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}&::-moz-placeholder{opacity:1;color:", COLORS.ui.lightGrayPlaceholder, ";}&:-ms-input-placeholder{color:", COLORS.ui.lightGrayPlaceholder, ";}}" + ( true ? "" : 0), true ? "" : 0);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/textarea-control/styles/textarea-control-styles.js
const StyledTextarea = /*#__PURE__*/emotion_styled_base_browser_esm("textarea", true ? {
} : 0)("width:100%;", inputControl, ";" + ( true ? "" : 0));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/textarea-control/index.js
function UnforwardedTextareaControl(props, ref) {
const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(TextareaControl);
const id = `inspector-textarea-control-${instanceId}`;
const onChangeValue = event => onChange(event.target.value);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(base_control, {
__nextHasNoMarginBottom: __nextHasNoMarginBottom,
hideLabelFromVision: hideLabelFromVision,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(StyledTextarea, {
className: "components-textarea-control__input",
"aria-describedby": !!help ? id + '__help' : undefined,
* TextareaControls are TextControls that allow for multiple lines of text, and
* wrap overflow text onto a new line. They are a fixed height and scroll
* vertically when the cursor reaches the bottom of the field.
* import { TextareaControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
* const MyTextareaControl = () => {
* const [ text, setText ] = useState( '' );
* onChange={ ( value ) => setText( value ) }
const TextareaControl = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedTextareaControl);
/* harmony default export */ const textarea_control = (TextareaControl);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/text-highlight/index.js
* Highlights occurrences of a given string within another string of text. Wraps
* each match with a `<mark>` tag which provides browser default styling.
* import { TextHighlight } from '@wordpress/components';
* const MyTextHighlight = () => (
* text="Why do we like Gutenberg? Because Gutenberg is the best!"
const TextHighlight = props => {
const trimmedHighlightText = highlight.trim();
if (!trimmedHighlightText) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
const regex = new RegExp(`(${escapeRegExp(trimmedHighlightText)})`, 'gi');
return (0,external_wp_element_namespaceObject.createInterpolateElement)(text.replace(regex, '<mark>$&</mark>'), {
mark: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("mark", {})
/* harmony default export */ const text_highlight = (TextHighlight);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/tip.js
const tip = /*#__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: "M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"
/* harmony default export */ const library_tip = (tip);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tip/index.js
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "components-tip",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_build_module_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {