: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
} : 0)("grid-column:1/-1;border:none;height:", config_values.borderWidth, ";background-color:", props => props.variant === 'toolbar' ? TOOLBAR_VARIANT_BORDER_COLOR : DIVIDER_COLOR, ";margin-block:", space(2), ";margin-inline:", ITEM_PADDING_INLINE, ";outline:2px solid transparent;" + ( true ? "" : 0));
const SubmenuChevronIcon = /*#__PURE__*/emotion_styled_base_browser_esm(build_module_icon, true ? {
} : 0)("width:", space(1.5), ";", rtl({
}), ";" + ( true ? "" : 0));
const styles_DropdownMenuItemLabel = /*#__PURE__*/emotion_styled_base_browser_esm(truncate_component, true ? {
} : 0)("font-size:", font('default.fontSize'), ";line-height:20px;color:inherit;" + ( true ? "" : 0));
const styles_DropdownMenuItemHelpText = /*#__PURE__*/emotion_styled_base_browser_esm(truncate_component, true ? {
} : 0)("font-size:", font('helpText.fontSize'), ";line-height:16px;color:", COLORS.gray['700'], ";[data-active-item]:not( [data-focus-visible] ) *:not( ", dropdown_menu_v2_styles_DropdownMenu, " ) &,[aria-disabled='true'] *:not( ", dropdown_menu_v2_styles_DropdownMenu, " ) &{color:inherit;}" + ( true ? "" : 0));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dropdown-menu-v2/index.js
// eslint-disable-next-line no-restricted-imports
const DropdownMenuContext = (0,external_wp_element_namespaceObject.createContext)(undefined);
const DropdownMenuItem = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuItem({
const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_DropdownMenuItem, {
accessibleWhenDisabled: true,
hideOnClick: hideOnClick,
store: dropdownMenuContext?.store,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemPrefixWrapper, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(DropdownMenuItemContentWrapper, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemChildrenWrapper, {
}), suffix && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSuffixWrapper, {
const DropdownMenuCheckboxItem = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuCheckboxItem({
const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_DropdownMenuCheckboxItem, {
accessibleWhenDisabled: true,
hideOnClick: hideOnClick,
store: dropdownMenuContext?.store,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuItemCheck, {
store: dropdownMenuContext?.store,
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemPrefixWrapper, {})
// Override some ariakit inline styles
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(DropdownMenuItemContentWrapper, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemChildrenWrapper, {
}), suffix && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSuffixWrapper, {
const radioCheck = /*#__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.Circle, {
const DropdownMenuRadioItem = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuRadioItem({
const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_DropdownMenuRadioItem, {
accessibleWhenDisabled: true,
hideOnClick: hideOnClick,
store: dropdownMenuContext?.store,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuItemCheck, {
store: dropdownMenuContext?.store,
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemPrefixWrapper, {})
// Override some ariakit inline styles
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(DropdownMenuItemContentWrapper, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuItemChildrenWrapper, {
}), suffix && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSuffixWrapper, {
const DropdownMenuGroup = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuGroup(props, ref) {
const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuGroup, {
store: dropdownMenuContext?.store
const dropdown_menu_v2_UnconnectedDropdownMenu = (props, ref) => {
// From internal components context
} = useContextSystem(props, 'DropdownMenu');
const parentContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext);
const computedDirection = (0,external_wp_i18n_namespaceObject.isRTL)() ? 'rtl' : 'ltr';
// If an explicit value for the `placement` prop is not passed,
// apply a default placement of `bottom-start` for the root dropdown,
// and of `right-start` for nested dropdowns.
let computedPlacement = (_props$placement = props.placement) !== null && _props$placement !== void 0 ? _props$placement : parentContext?.store ? 'right-start' : 'bottom-start';
// Swap left/right in case of RTL direction
if (computedDirection === 'rtl') {
if (/right/.test(computedPlacement)) {
computedPlacement = computedPlacement.replace('right', 'left');
} else if (/left/.test(computedPlacement)) {
computedPlacement = computedPlacement.replace('left', 'right');
const dropdownMenuStore = useMenuStore({
parent: parentContext?.store,
placement: computedPlacement,
onOpenChange?.(willBeOpen);
rtl: computedDirection === 'rtl'
const contextValue = (0,external_wp_element_namespaceObject.useMemo)(() => ({
store: dropdownMenuStore,
}), [dropdownMenuStore, variant]);
// Extract the side from the applied placement — useful for animations.
const appliedPlacementSide = dropdownMenuStore.useState('placement').split('-')[0];
if (dropdownMenuStore.parent && !((0,external_wp_element_namespaceObject.isValidElement)(trigger) && DropdownMenuItem === trigger.type)) {
// eslint-disable-next-line no-console
console.warn('For nested DropdownMenus, the `trigger` should always be a `DropdownMenuItem`.');
const hideOnEscape = (0,external_wp_element_namespaceObject.useCallback)(event => {
// Pressing Escape can cause unexpected consequences (ie. exiting
// full screen mode on MacOs, close parent modals...).
// Returning `true` causes the menu to hide.
const wrapperProps = (0,external_wp_element_namespaceObject.useMemo)(() => ({
direction: computedDirection
}), [computedDirection]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MenuButton, {
store: dropdownMenuStore,
render: dropdownMenuStore.parent ? (0,external_wp_element_namespaceObject.cloneElement)(trigger, {
// Add submenu arrow, unless a `suffix` is explicitly specified
suffix: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [trigger.props.suffix, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SubmenuChevronIcon, {
icon: chevron_right_small,
preserveAspectRatio: "xMidYMid slice"
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dropdown_menu_v2_styles_DropdownMenu, {
// Root menu has an 8px distance from its trigger,
// otherwise 0 (which causes the submenu to slightly overlap)
gutter: gutter !== null && gutter !== void 0 ? gutter : dropdownMenuStore.parent ? 0 : 8
// Align nested menu by the same (but opposite) amount
// as the menu container's padding.
shift: shift !== null && shift !== void 0 ? shift : dropdownMenuStore.parent ? -4 : 0,
hideOnHoverOutside: false,
"data-side": appliedPlacementSide,
wrapperProps: wrapperProps,
hideOnEscape: hideOnEscape,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(DropdownMenuContext.Provider, {
const dropdown_menu_v2_DropdownMenu = contextConnect(dropdown_menu_v2_UnconnectedDropdownMenu, 'DropdownMenu');
const DropdownMenuSeparator = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuSeparator(props, ref) {
const dropdownMenuContext = (0,external_wp_element_namespaceObject.useContext)(DropdownMenuContext);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuSeparator, {
store: dropdownMenuContext?.store,
variant: dropdownMenuContext?.variant
const DropdownMenuItemLabel = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuItemLabel(props, ref) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuItemLabel, {
const DropdownMenuItemHelpText = (0,external_wp_element_namespaceObject.forwardRef)(function DropdownMenuItemHelpText(props, ref) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(styles_DropdownMenuItemHelpText, {
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/theme/styles.js
function theme_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 colorVariables = ({
const shades = Object.entries(colors.gray || {}).map(([k, v]) => `--wp-components-color-gray-${k}: ${v};`).join('');
return [/*#__PURE__*/emotion_react_browser_esm_css("--wp-components-color-accent:", colors.accent, ";--wp-components-color-accent-darker-10:", colors.accentDarker10, ";--wp-components-color-accent-darker-20:", colors.accentDarker20, ";--wp-components-color-accent-inverted:", colors.accentInverted, ";--wp-components-color-background:", colors.background, ";--wp-components-color-foreground:", colors.foreground, ";--wp-components-color-foreground-inverted:", colors.foregroundInverted, ";", shades, ";" + ( true ? "" : 0), true ? "" : 0)];
const theme_styles_Wrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
styles: "color:var( --wp-components-color-foreground, currentColor )"
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/theme/color-algorithms.js
function generateThemeVariables(inputs) {
const generatedColors = {
...generateAccentDependentColors(inputs.accent),
...generateBackgroundDependentColors(inputs.background)
warnContrastIssues(checkContrasts(inputs, generatedColors));
function validateInputs(inputs) {
for (const [key, value] of Object.entries(inputs)) {
if (typeof value !== 'undefined' && !w(value).isValid()) {
true ? external_wp_warning_default()(`wp.components.Theme: "${value}" is not a valid color value for the '${key}' prop.`) : 0;
function checkContrasts(inputs, outputs) {
const background = inputs.background || COLORS.white;
const accent = inputs.accent || '#3858e9';
const foreground = outputs.foreground || COLORS.gray[900];
const gray = outputs.gray || COLORS.gray;
accent: w(background).isReadable(accent) ? undefined : `The background color ("${background}") does not have sufficient contrast against the accent color ("${accent}").`,
foreground: w(background).isReadable(foreground) ? undefined : `The background color provided ("${background}") does not have sufficient contrast against the standard foreground colors.`,
grays: w(background).contrast(gray[600]) >= 3 && w(background).contrast(gray[700]) >= 4.5 ? undefined : `The background color provided ("${background}") cannot generate a set of grayscale foreground colors with sufficient contrast. Try adjusting the color to be lighter or darker.`
function warnContrastIssues(issues) {
for (const error of Object.values(issues)) {
true ? external_wp_warning_default()('wp.components.Theme: ' + error) : 0;
function generateAccentDependentColors(accent) {
accentDarker10: w(accent).darken(0.1).toHex(),
accentDarker20: w(accent).darken(0.2).toHex(),
accentInverted: getForegroundForColor(accent)
function generateBackgroundDependentColors(background) {
const foreground = getForegroundForColor(background);
foregroundInverted: getForegroundForColor(foreground),
gray: generateShades(background, foreground)
function getForegroundForColor(color) {
return w(color).isDark() ? COLORS.white : COLORS.gray[900];
function generateShades(background, foreground) {
// How much darkness you need to add to #fff to get the COLORS.gray[n] color
// Darkness of COLORS.gray[ 900 ], relative to #fff
const direction = w(background).isDark() ? 'lighten' : 'darken';
// Lightness delta between the background and foreground colors
const range = Math.abs(w(background).toHsl().l - w(foreground).toHsl().l) / 100;
Object.entries(SHADES).forEach(([key, value]) => {
result[parseInt(key)] = w(background)[direction](value / limit * range).toHex();
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/theme/index.js
* `Theme` allows defining theme variables for components in the `@wordpress/components` package.
* Multiple `Theme` components can be nested in order to override specific theme variables.
* const Example = () => {
* <Button variant="primary">I'm red</Button>
* <Button variant="primary">I'm blue</Button>
const classes = (0,external_wp_element_namespaceObject.useMemo)(() => cx(...colorVariables(generateThemeVariables({
})), className), [accent, background, className, cx]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(theme_styles_Wrapper, {
/* harmony default export */ const theme = (Theme);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/context.js
const TabsContext = (0,external_wp_element_namespaceObject.createContext)(undefined);
const useTabsContext = () => (0,external_wp_element_namespaceObject.useContext)(TabsContext);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tabs/styles.js
// eslint-disable-next-line no-restricted-imports
const TabListWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {