return Object(external_wp_element_["createElement"])(CircularOptionPicker, {
options: gradientOptions,
actions: clearable && Object(external_wp_element_["createElement"])(CircularOptionPicker.ButtonAction, {
}, Object(external_wp_i18n_["__"])('Clear'))
}, !disableCustomGradients && Object(external_wp_element_["createElement"])(CustomGradientPicker, {
// EXTERNAL MODULE: ./node_modules/react-merge-refs/dist/react-merge-refs.esm.js
var react_merge_refs_esm = __webpack_require__("LFnd");
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/modal/frame.js
function frame_createSuper(Derived) { var hasNativeReflectConstruct = frame_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
function frame_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function ModalFrameContent(_ref) {
var overlayClassName = _ref.overlayClassName,
contentLabel = _ref.contentLabel,
describedby = _ref$aria.describedby,
labelledby = _ref$aria.labelledby,
children = _ref.children,
className = _ref.className,
focusOnMount = _ref.focusOnMount,
shouldCloseOnEsc = _ref.shouldCloseOnEsc,
onRequestClose = _ref.onRequestClose;
function handleEscapeKeyDown(event) {
if (shouldCloseOnEsc && event.keyCode === external_wp_keycodes_["ESCAPE"]) {
var focusOnMountRef = Object(external_wp_compose_["useFocusOnMount"])(focusOnMount);
var constrainedTabbingRef = Object(external_wp_compose_["useConstrainedTabbing"])();
var focusReturnRef = Object(external_wp_compose_["useFocusReturn"])();
return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions
Object(external_wp_element_["createElement"])("div", {
className: classnames_default()('components-modal__screen-overlay', overlayClassName),
onKeyDown: handleEscapeKeyDown
}, Object(external_wp_element_["createElement"])("div", {
className: classnames_default()('components-modal__frame', className),
ref: Object(react_merge_refs_esm["a" /* default */])([constrainedTabbingRef, focusReturnRef, focusOnMountRef]),
"aria-label": contentLabel,
"aria-labelledby": contentLabel ? null : labelledby,
"aria-describedby": describedby,
var frame_ModalFrame = /*#__PURE__*/function (_Component) {
Object(inherits["a" /* default */])(ModalFrame, _Component);
var _super = frame_createSuper(ModalFrame);
Object(classCallCheck["a" /* default */])(this, ModalFrame);
_this = _super.apply(this, arguments);
_this.handleFocusOutside = _this.handleFocusOutside.bind(Object(assertThisInitialized["a" /* default */])(_this));
* Callback function called when clicked outside the modal.
* @param {Object} event Mouse click event.
Object(createClass["a" /* default */])(ModalFrame, [{
key: "handleFocusOutside",
value: function handleFocusOutside(event) {
if (this.props.shouldCloseOnClickOutside && this.props.onRequestClose) {
this.props.onRequestClose(event);
* Renders the modal frame element.
* @return {WPElement} The modal frame element.
value: function render() {
return Object(external_wp_element_["createElement"])(ModalFrameContent, this.props);
}(external_wp_element_["Component"]);
/* harmony default export */ var modal_frame = (with_focus_outside(frame_ModalFrame));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/modal/header.js
var header_ModalHeader = function ModalHeader(_ref) {
closeLabel = _ref.closeLabel,
headingId = _ref.headingId,
isDismissible = _ref.isDismissible;
var label = closeLabel ? closeLabel : Object(external_wp_i18n_["__"])('Close dialog');
return Object(external_wp_element_["createElement"])("div", {
className: "components-modal__header"
}, Object(external_wp_element_["createElement"])("div", {
className: "components-modal__header-heading-container"
}, icon && Object(external_wp_element_["createElement"])("span", {
className: "components-modal__icon-container",
}, icon), title && Object(external_wp_element_["createElement"])("h1", {
className: "components-modal__header-heading"
}, title)), isDismissible && Object(external_wp_element_["createElement"])(build_module_button["a" /* default */], {
icon: library_close["a" /* default */],
/* harmony default export */ var modal_header = (header_ModalHeader);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/modal/aria-helper.js
var LIVE_REGION_ARIA_ROLES = new Set(['alert', 'status', 'log', 'marquee', 'timer']);
* Hides all elements in the body element from screen-readers except
* the provided element and elements that should not be hidden from
* The reason we do this is because `aria-modal="true"` currently is bugged
* in Safari, and support is spotty in other browsers overall. In the future
* we should consider removing these helper functions in favor of
* @param {Element} unhiddenElement The element that should not be hidden.
function hideApp(unhiddenElement) {
var elements = document.body.children;
Object(external_lodash_["forEach"])(elements, function (element) {
if (element === unhiddenElement) {
if (elementShouldBeHidden(element)) {
element.setAttribute('aria-hidden', 'true');
hiddenElements.push(element);
* Determines if the passed element should not be hidden from screen readers.
* @param {HTMLElement} element The element that should be checked.
* @return {boolean} Whether the element should not be hidden from screen-readers.
function elementShouldBeHidden(element) {
var role = element.getAttribute('role');
return !(element.tagName === 'SCRIPT' || element.hasAttribute('aria-hidden') || element.hasAttribute('aria-live') || LIVE_REGION_ARIA_ROLES.has(role));
* Makes all elements in the body that have been hidden by `hideApp`
* visible again to screen-readers.
Object(external_lodash_["forEach"])(hiddenElements, function (element) {
element.removeAttribute('aria-hidden');
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/modal/index.js
function modal_createSuper(Derived) { var hasNativeReflectConstruct = modal_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
function modal_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
// Used to count the number of open modals.
var modal_Modal = /*#__PURE__*/function (_Component) {
Object(inherits["a" /* default */])(Modal, _Component);
var _super = modal_createSuper(Modal);
Object(classCallCheck["a" /* default */])(this, Modal);
_this = _super.call(this, props);
* Appends the modal's node to the DOM, so the portal can render the
* modal in it. Also calls the openFirstModal when this is the first modal to be
Object(createClass["a" /* default */])(Modal, [{
key: "componentDidMount",
value: function componentDidMount() {
if (openModalCount === 1) {
* Removes the modal's node from the DOM. Also calls closeLastModal when this is
* the last modal to be closed.
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (openModalCount === 0) {
* Prepares the DOM for the modals to be rendered.
* Every modal is mounted in a separate div appended to a parent div
* that is appended to the document body.
* The parent div will be created if it does not yet exist, and the
* separate div for this specific modal will be appended to that.
value: function prepareDOM() {
if (!modal_parentElement) {
modal_parentElement = document.createElement('div');
document.body.appendChild(modal_parentElement);
this.node = document.createElement('div');
modal_parentElement.appendChild(this.node);
* Removes the specific mounting point for this modal from the DOM.
value: function cleanDOM() {
modal_parentElement.removeChild(this.node);
* Prepares the DOM for this modal and any additional modal to be mounted.
* It appends an additional div to the body for the modals to be rendered in,
* it hides any other elements from screen-readers and adds an additional class
* to the body to prevent scrolling while the modal is open.
value: function openFirstModal() {
hideApp(modal_parentElement);
document.body.classList.add(this.props.bodyOpenClassName);
* Cleans up the DOM after the last modal is closed and makes the app available
* for screen-readers again.
value: function closeLastModal() {
document.body.classList.remove(this.props.bodyOpenClassName);
* @return {WPElement} The modal element.
value: function render() {
var _this$props = this.props,
onRequestClose = _this$props.onRequestClose,
title = _this$props.title,
closeButtonLabel = _this$props.closeButtonLabel,
children = _this$props.children,
instanceId = _this$props.instanceId,
isDismissible = _this$props.isDismissible,
isDismissable = _this$props.isDismissable,
otherProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["onRequestClose", "title", "icon", "closeButtonLabel", "children", "aria", "instanceId", "isDismissible", "isDismissable"]);
var headingId = aria.labelledby || "components-modal-header-".concat(instanceId);
external_wp_deprecated_default()('isDismissable prop of the Modal component', {
alternative: 'isDismissible prop (renamed) of the Modal component'
} // Disable reason: this stops mouse events from triggering tooltips and
// other elements underneath the modal overlay.
return Object(external_wp_element_["createPortal"])(Object(external_wp_element_["createElement"])(modal_frame, Object(esm_extends["a" /* default */])({
onRequestClose: onRequestClose,
labelledby: title ? headingId : null,
describedby: aria.describedby
}, otherProps), Object(external_wp_element_["createElement"])("div", {
className: 'components-modal__content',
}, Object(external_wp_element_["createElement"])(modal_header, {
closeLabel: closeButtonLabel,
isDismissible: isDismissible || isDismissable,
}), children)), this.node);
}(external_wp_element_["Component"]);
modal_Modal.defaultProps = {
bodyOpenClassName: 'modal-open',
shouldCloseOnClickOutside: true,
/* harmony default export */ var modal = (Object(external_wp_compose_["withInstanceId"])(modal_Modal));
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/guide/icons.js
var icons_PageControlIcon = function PageControlIcon(_ref) {
var isSelected = _ref.isSelected;
return Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], {
xmlns: "http://www.w3.org/2000/svg"
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Circle"], {
fill: isSelected ? '#419ECD' : '#E1E3E6'
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/guide/page-control.js
function PageControl(_ref) {
var currentPage = _ref.currentPage,
numberOfPages = _ref.numberOfPages,
setCurrentPage = _ref.setCurrentPage;
return Object(external_wp_element_["createElement"])("ul", {
className: "components-guide__page-control",
"aria-label": Object(external_wp_i18n_["__"])('Guide controls')
}, Object(external_lodash_["times"])(numberOfPages, function (page) {
return Object(external_wp_element_["createElement"])("li", {
key: page // Set aria-current="step" on the active page, see https://www.w3.org/TR/wai-aria-1.1/#aria-current