mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-02 16:59:35 +01:00
6e4458c935
Props peterwilsoncc, desrosj. Fixes #53192. Built from https://develop.svn.wordpress.org/trunk@50940 git-svn-id: http://core.svn.wordpress.org/trunk@50549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
309 lines
10 KiB
JavaScript
309 lines
10 KiB
JavaScript
this["wp"] = this["wp"] || {}; this["wp"]["primitives"] =
|
|
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = "G8AQ");
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ({
|
|
|
|
/***/ "G8AQ":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, "Circle", function() { return /* reexport */ Circle; });
|
|
__webpack_require__.d(__webpack_exports__, "G", function() { return /* reexport */ G; });
|
|
__webpack_require__.d(__webpack_exports__, "Path", function() { return /* reexport */ Path; });
|
|
__webpack_require__.d(__webpack_exports__, "Polygon", function() { return /* reexport */ Polygon; });
|
|
__webpack_require__.d(__webpack_exports__, "Rect", function() { return /* reexport */ Rect; });
|
|
__webpack_require__.d(__webpack_exports__, "Defs", function() { return /* reexport */ Defs; });
|
|
__webpack_require__.d(__webpack_exports__, "RadialGradient", function() { return /* reexport */ RadialGradient; });
|
|
__webpack_require__.d(__webpack_exports__, "LinearGradient", function() { return /* reexport */ LinearGradient; });
|
|
__webpack_require__.d(__webpack_exports__, "Stop", function() { return /* reexport */ Stop; });
|
|
__webpack_require__.d(__webpack_exports__, "SVG", function() { return /* reexport */ SVG; });
|
|
__webpack_require__.d(__webpack_exports__, "HorizontalRule", function() { return /* reexport */ HorizontalRule; });
|
|
__webpack_require__.d(__webpack_exports__, "BlockQuotation", function() { return /* reexport */ BlockQuotation; });
|
|
__webpack_require__.d(__webpack_exports__, "View", function() { return /* reexport */ View; });
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__("TSYQ");
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
|
// EXTERNAL MODULE: external ["wp","element"]
|
|
var external_wp_element_ = __webpack_require__("GRId");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/svg/index.js
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
|
|
|
|
/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */
|
|
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'circle'>} props
|
|
*
|
|
* @return {JSX.Element} Circle component
|
|
*/
|
|
|
|
const Circle = props => Object(external_wp_element_["createElement"])('circle', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'g'>} props
|
|
*
|
|
* @return {JSX.Element} G component
|
|
*/
|
|
|
|
const G = props => Object(external_wp_element_["createElement"])('g', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'path'>} props
|
|
*
|
|
* @return {JSX.Element} Path component
|
|
*/
|
|
|
|
const Path = props => Object(external_wp_element_["createElement"])('path', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'polygon'>} props
|
|
*
|
|
* @return {JSX.Element} Polygon component
|
|
*/
|
|
|
|
const Polygon = props => Object(external_wp_element_["createElement"])('polygon', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'rect'>} props
|
|
*
|
|
* @return {JSX.Element} Rect component
|
|
*/
|
|
|
|
const Rect = props => Object(external_wp_element_["createElement"])('rect', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'defs'>} props
|
|
*
|
|
* @return {JSX.Element} Defs component
|
|
*/
|
|
|
|
const Defs = props => Object(external_wp_element_["createElement"])('defs', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props
|
|
*
|
|
* @return {JSX.Element} RadialGradient component
|
|
*/
|
|
|
|
const RadialGradient = props => Object(external_wp_element_["createElement"])('radialGradient', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props
|
|
*
|
|
* @return {JSX.Element} LinearGradient component
|
|
*/
|
|
|
|
const LinearGradient = props => Object(external_wp_element_["createElement"])('linearGradient', props);
|
|
/**
|
|
* @param {import('react').ComponentPropsWithoutRef<'stop'>} props
|
|
*
|
|
* @return {JSX.Element} Stop component
|
|
*/
|
|
|
|
const Stop = props => Object(external_wp_element_["createElement"])('stop', props);
|
|
/**
|
|
*
|
|
* @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
|
|
* Other props will be passed through to svg component.
|
|
*
|
|
* @return {JSX.Element} Stop component
|
|
*/
|
|
|
|
const SVG = ({
|
|
className,
|
|
isPressed,
|
|
...props
|
|
}) => {
|
|
const appliedProps = { ...props,
|
|
className: classnames_default()(className, {
|
|
'is-pressed': isPressed
|
|
}) || undefined,
|
|
role: 'img',
|
|
'aria-hidden': true,
|
|
focusable: false
|
|
}; // Disable reason: We need to have a way to render HTML tag for web.
|
|
// eslint-disable-next-line react/forbid-elements
|
|
|
|
return Object(external_wp_element_["createElement"])("svg", appliedProps);
|
|
};
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/horizontal-rule/index.js
|
|
const HorizontalRule = 'hr';
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/block-quotation/index.js
|
|
const BlockQuotation = 'blockquote';
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/view/index.js
|
|
const View = 'div';
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@wordpress/primitives/build-module/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "GRId":
|
|
/***/ (function(module, exports) {
|
|
|
|
(function() { module.exports = window["wp"]["element"]; }());
|
|
|
|
/***/ }),
|
|
|
|
/***/ "TSYQ":
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
Copyright (c) 2018 Jed Watson.
|
|
Licensed under the MIT License (MIT), see
|
|
http://jedwatson.github.io/classnames
|
|
*/
|
|
/* global define */
|
|
|
|
(function () {
|
|
'use strict';
|
|
|
|
var hasOwn = {}.hasOwnProperty;
|
|
|
|
function classNames() {
|
|
var classes = [];
|
|
|
|
for (var i = 0; i < arguments.length; i++) {
|
|
var arg = arguments[i];
|
|
if (!arg) continue;
|
|
|
|
var argType = typeof arg;
|
|
|
|
if (argType === 'string' || argType === 'number') {
|
|
classes.push(arg);
|
|
} else if (Array.isArray(arg)) {
|
|
if (arg.length) {
|
|
var inner = classNames.apply(null, arg);
|
|
if (inner) {
|
|
classes.push(inner);
|
|
}
|
|
}
|
|
} else if (argType === 'object') {
|
|
if (arg.toString === Object.prototype.toString) {
|
|
for (var key in arg) {
|
|
if (hasOwn.call(arg, key) && arg[key]) {
|
|
classes.push(key);
|
|
}
|
|
}
|
|
} else {
|
|
classes.push(arg.toString());
|
|
}
|
|
}
|
|
}
|
|
|
|
return classes.join(' ');
|
|
}
|
|
|
|
if ( true && module.exports) {
|
|
classNames.default = classNames;
|
|
module.exports = classNames;
|
|
} else if (true) {
|
|
// register as 'classnames', consistent with npm package name
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
|
return classNames;
|
|
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
} else {}
|
|
}());
|
|
|
|
|
|
/***/ })
|
|
|
|
/******/ }); |